From 8f8a6b66fcc2cb21c3c9dfa2a030430c22a2baad Mon Sep 17 00:00:00 2001 From: Ivan Artemiev <29709626+iartemiev@users.noreply.github.com> Date: Wed, 18 Dec 2024 11:58:57 -0500 Subject: [PATCH] chore: rename amplify-api-next refs to amplify-data (#416) --- .changeset/six-zoos-fly.md | 2 ++ .../action.yml | 6 +++--- .github/actions/node-and-build/action.yml | 6 +++--- .github/actions/npm-publish/action.yml | 2 +- .github/actions/setup-samples-staging/action.yml | 2 +- .github/workflows/callable-check-api.yml | 6 +++--- .github/workflows/callable-check-changeset.yml | 6 +++--- .github/workflows/callable-check-package-lock.yml | 6 +++--- .github/workflows/callable-check-type-perf.yml | 6 +++--- .github/workflows/callable-e2e-test-detox.yml | 14 +++++++------- .github/workflows/callable-e2e-test.yml | 14 +++++++------- .github/workflows/callable-e2e-tests.yml | 4 ++-- .github/workflows/callable-local-e2e-tests.yml | 10 +++++----- .github/workflows/callable-npm-publish-preid.yml | 6 +++--- .github/workflows/callable-npm-publish-release.yml | 10 +++++----- ...next.yml => callable-prebuild-amplify-data.yml} | 6 +++--- .../callable-prebuild-samples-staging.yml | 4 ++-- .../workflows/callable-release-verification.yml | 2 +- .../workflows/callable-ts-version-unit-test.yml | 8 ++++---- .github/workflows/callable-unit-tests.yml | 6 +++--- .github/workflows/pr.yml | 4 ++-- .github/workflows/prepare-revert-pr.yml | 6 +++--- .github/workflows/push-main-release.yml | 12 ++++++------ .github/workflows/push-preid-release.yml | 4 ++-- package-lock.json | 4 ++-- package.json | 4 ++-- packages/data-schema/package.json | 2 +- packages/data-schema/src/ModelField.ts | 13 ++++++++----- packages/e2e-tests/README.md | 4 ++-- 29 files changed, 92 insertions(+), 87 deletions(-) create mode 100644 .changeset/six-zoos-fly.md rename .github/actions/{load-verdaccio-with-amplify-api-next => load-verdaccio-with-amplify-data}/action.yml (82%) rename .github/workflows/{callable-prebuild-amplify-api-next.yml => callable-prebuild-amplify-data.yml} (79%) diff --git a/.changeset/six-zoos-fly.md b/.changeset/six-zoos-fly.md new file mode 100644 index 000000000..a845151cc --- /dev/null +++ b/.changeset/six-zoos-fly.md @@ -0,0 +1,2 @@ +--- +--- diff --git a/.github/actions/load-verdaccio-with-amplify-api-next/action.yml b/.github/actions/load-verdaccio-with-amplify-data/action.yml similarity index 82% rename from .github/actions/load-verdaccio-with-amplify-api-next/action.yml rename to .github/actions/load-verdaccio-with-amplify-data/action.yml index cf4a403db..4727bff76 100644 --- a/.github/actions/load-verdaccio-with-amplify-api-next/action.yml +++ b/.github/actions/load-verdaccio-with-amplify-data/action.yml @@ -1,5 +1,5 @@ -name: Load Verdaccio with amplify-api-next -description: Turn on Verdaccio and load up all of the amplify-api-next build artifacts +name: Load Verdaccio with amplify-data +description: Turn on Verdaccio and load up all of the amplify-data build artifacts runs: using: 'composite' @@ -16,7 +16,7 @@ runs: # Run your commands after verdaccio is up and running echo "Verdaccio is up and running, proceeding with the script..." shell: bash - working-directory: ./amplify-api-next + working-directory: ./amplify-data - name: Upload artifact uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 https://github.com/actions/upload-artifact/commit/0b7f8abb1508181956e8e162db84b466c27e18ce if: failure() diff --git a/.github/actions/node-and-build/action.yml b/.github/actions/node-and-build/action.yml index 5de8fd33a..4db657a01 100644 --- a/.github/actions/node-and-build/action.yml +++ b/.github/actions/node-and-build/action.yml @@ -31,15 +31,15 @@ runs: if: inputs.force == 'true' run: npm i --force shell: bash - working-directory: ./amplify-api-next + working-directory: ./amplify-data # TODO We should be able to skip yarn / bootstrap if we cache enough things. Leaving because skipping causes issues. - name: Install if: inputs.force != 'true' && (inputs.is-prebuild != 'true' || steps.cache-build-artifacts.outputs.cache-hit != 'true') run: npm i shell: bash - working-directory: ./amplify-api-next + working-directory: ./amplify-data - name: Build packages if: steps.cache-build-artifacts.outputs.cache-hit != 'true' run: npm run build shell: bash - working-directory: ./amplify-api-next + working-directory: ./amplify-data diff --git a/.github/actions/npm-publish/action.yml b/.github/actions/npm-publish/action.yml index 7d9eb1b46..fc5b65bdc 100644 --- a/.github/actions/npm-publish/action.yml +++ b/.github/actions/npm-publish/action.yml @@ -33,7 +33,7 @@ runs: - name: Run npm publish if: github.repository_owner == 'aws-amplify' shell: bash - working-directory: ./amplify-api-next + working-directory: ./amplify-data env: NPM_TOKEN: ${{ inputs.npm_token }} GH_SHA: ${{ github.sha }} diff --git a/.github/actions/setup-samples-staging/action.yml b/.github/actions/setup-samples-staging/action.yml index 8973e1232..c454de50e 100644 --- a/.github/actions/setup-samples-staging/action.yml +++ b/.github/actions/setup-samples-staging/action.yml @@ -27,7 +27,7 @@ runs: token: ${{ inputs.AMPLIFY_JS_SAMPLES_STAGING_READ }} # We test on the staging branch that corresponds to the current - # `amplify-api-next` branch (when it exists), and otherwise test on the + # `amplify-data` branch (when it exists), and otherwise test on the # default branch (`main`) - name: Staging repo branch selection shell: bash diff --git a/.github/workflows/callable-check-api.yml b/.github/workflows/callable-check-api.yml index 457d71046..8697f8613 100644 --- a/.github/workflows/callable-check-api.yml +++ b/.github/workflows/callable-check-api.yml @@ -10,11 +10,11 @@ jobs: - name: Checkout repository uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0 https://github.com/actions/checkout/commit/24cb9080177205b6e8c946b17badbe402adc938f with: - path: amplify-api-next + path: amplify-data - name: Setup node and build the repository - uses: ./amplify-api-next/.github/actions/node-and-build + uses: ./amplify-data/.github/actions/node-and-build - name: Run checks - working-directory: ./amplify-api-next + working-directory: ./amplify-data run: npm run check:api - name: API Check Instructions if: failure() diff --git a/.github/workflows/callable-check-changeset.yml b/.github/workflows/callable-check-changeset.yml index 928dc64b3..747d67b02 100644 --- a/.github/workflows/callable-check-changeset.yml +++ b/.github/workflows/callable-check-changeset.yml @@ -11,13 +11,13 @@ jobs: uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0 https://github.com/actions/checkout/commit/24cb9080177205b6e8c946b17badbe402adc938f with: path: - amplify-api-next + amplify-data # check out full history fetch-depth: 0 - name: Setup node and build the repository - uses: ./amplify-api-next/.github/actions/node-and-build + uses: ./amplify-data/.github/actions/node-and-build - name: Run checks - working-directory: ./amplify-api-next + working-directory: ./amplify-data run: npx changeset status --since origin/main - name: API Check Instructions if: failure() diff --git a/.github/workflows/callable-check-package-lock.yml b/.github/workflows/callable-check-package-lock.yml index b8450f8d7..028b7e1a8 100644 --- a/.github/workflows/callable-check-package-lock.yml +++ b/.github/workflows/callable-check-package-lock.yml @@ -10,11 +10,11 @@ jobs: - name: Checkout repository uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0 https://github.com/actions/checkout/commit/24cb9080177205b6e8c946b17badbe402adc938f with: - path: amplify-api-next + path: amplify-data - name: Setup node and build the repository - uses: ./amplify-api-next/.github/actions/node-and-build + uses: ./amplify-data/.github/actions/node-and-build - name: Run checks - working-directory: ./amplify-api-next + working-directory: ./amplify-data run: npm run check:package-lock - name: API Check Instructions if: failure() diff --git a/.github/workflows/callable-check-type-perf.yml b/.github/workflows/callable-check-type-perf.yml index 14e2bfae2..3f5a673d3 100644 --- a/.github/workflows/callable-check-type-perf.yml +++ b/.github/workflows/callable-check-type-perf.yml @@ -10,11 +10,11 @@ jobs: - name: Checkout repository uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0 https://github.com/actions/checkout/commit/24cb9080177205b6e8c946b17badbe402adc938f with: - path: amplify-api-next + path: amplify-data - name: Setup node and build the repository - uses: ./amplify-api-next/.github/actions/node-and-build + uses: ./amplify-data/.github/actions/node-and-build - name: Run checks - working-directory: ./amplify-api-next + working-directory: ./amplify-data run: npm run check:type-perf - name: Type Perf Check Instructions if: failure() diff --git a/.github/workflows/callable-e2e-test-detox.yml b/.github/workflows/callable-e2e-test-detox.yml index e81d79369..3b0181ae7 100644 --- a/.github/workflows/callable-e2e-test-detox.yml +++ b/.github/workflows/callable-e2e-test-detox.yml @@ -24,20 +24,20 @@ jobs: - name: Checkout repository uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 with: - path: amplify-api-next + path: amplify-data - name: Setup node and build the repository - uses: ./amplify-api-next/.github/actions/node-and-build + uses: ./amplify-data/.github/actions/node-and-build - name: Setup samples staging repository - uses: ./amplify-api-next/.github/actions/setup-samples-staging + uses: ./amplify-data/.github/actions/setup-samples-staging with: AMPLIFY_JS_SAMPLES_STAGING_READ: ${{ secrets.AMPLIFY_JS_SAMPLES_STAGING_READ }} - - name: Load Verdaccio with amplify-api-next - uses: ./amplify-api-next/.github/actions/load-verdaccio-with-amplify-api-next + - name: Load Verdaccio with amplify-data + uses: ./amplify-data/.github/actions/load-verdaccio-with-amplify-data - name: Yarn Install working-directory: ${{ inputs.working_directory }} run: | echo "Current NPM registry: " $(yarn config get registry) - $GITHUB_WORKSPACE/amplify-api-next/scripts/retry-yarn-script.sh -s 'install --frozen-lockfile --non-interactive' -n 3 + $GITHUB_WORKSPACE/amplify-data/scripts/retry-yarn-script.sh -s 'install --frozen-lockfile --non-interactive' -n 3 shell: bash - name: Install CocoaPods run: | @@ -72,6 +72,6 @@ jobs: shell: bash - name: Detox run run: | - $GITHUB_WORKSPACE/amplify-api-next/scripts/retry-yarn-script.sh -s 'detox test -c ios.sim.debug -u' -n 3 + $GITHUB_WORKSPACE/amplify-data/scripts/retry-yarn-script.sh -s 'detox test -c ios.sim.debug -u' -n 3 working-directory: ${{ inputs.working_directory }} shell: bash diff --git a/.github/workflows/callable-e2e-test.yml b/.github/workflows/callable-e2e-test.yml index b56825a31..4267e2361 100644 --- a/.github/workflows/callable-e2e-test.yml +++ b/.github/workflows/callable-e2e-test.yml @@ -38,7 +38,7 @@ on: required: false type: string env: - AMPLIFY_DIR: /home/runner/work/amplify-api-next/amplify-api-next/amplify-api-next + AMPLIFY_DIR: /home/runner/work/amplify-data/amplify-data/amplify-data jobs: e2e-test: @@ -57,15 +57,15 @@ jobs: - name: Checkout repository uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 with: - path: amplify-api-next + path: amplify-data - name: Setup node and build the repository - uses: ./amplify-api-next/.github/actions/node-and-build + uses: ./amplify-data/.github/actions/node-and-build - name: Setup samples staging repository - uses: ./amplify-api-next/.github/actions/setup-samples-staging + uses: ./amplify-data/.github/actions/setup-samples-staging with: AMPLIFY_JS_SAMPLES_STAGING_READ: ${{ secrets.AMPLIFY_JS_SAMPLES_STAGING_READ }} - name: Load Verdaccio with AmplifyApiNext - uses: ./amplify-api-next/.github/actions/load-verdaccio-with-amplify-api-next + uses: ./amplify-data/.github/actions/load-verdaccio-with-amplify-data - name: Run cypress tests for ${{ inputs.test_name }} dev shell: bash working-directory: amplify-js-samples-staging @@ -82,7 +82,7 @@ jobs: E2E_YARN_SCRIPT: ${{ inputs.yarn_script }} run: | if [ -z "$E2E_YARN_SCRIPT" ]; then - ../amplify-api-next/scripts/retry-yarn-script.sh -s \ + ../amplify-data/scripts/retry-yarn-script.sh -s \ "ci:test \ $E2E_FRAMEWORK \ $E2E_CATEGORY \ @@ -113,7 +113,7 @@ jobs: E2E_YARN_SCRIPT: ${{ inputs.yarn_script }} run: | if [ -z "$E2E_YARN_SCRIPT" ]; then - ../amplify-api-next/scripts/retry-yarn-script.sh -s \ + ../amplify-data/scripts/retry-yarn-script.sh -s \ "ci:test \ $E2E_FRAMEWORK \ $E2E_CATEGORY \ diff --git a/.github/workflows/callable-e2e-tests.yml b/.github/workflows/callable-e2e-tests.yml index 7b36b338b..0b1348a86 100644 --- a/.github/workflows/callable-e2e-tests.yml +++ b/.github/workflows/callable-e2e-tests.yml @@ -10,13 +10,13 @@ jobs: - name: Checkout repository uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 with: - path: amplify-api-next + path: amplify-data - name: Read integ config files id: load_config run: | echo "INTEG_CONFIG=$(cat .github/integ-config/integ-all.yml | yq '.tests' -o=json | jq -c .)" >> $GITHUB_OUTPUT echo "DETOX_INTEG_CONFIG=$(cat .github/integ-config/detox-integ-all.yml | yq -o=json | jq -c .)" >> $GITHUB_OUTPUT - working-directory: ./amplify-api-next + working-directory: ./amplify-data outputs: integ-config: ${{ steps.load_config.outputs.INTEG_CONFIG }} detox-integ-config: ${{ steps.load_config.outputs.DETOX_INTEG_CONFIG }} diff --git a/.github/workflows/callable-local-e2e-tests.yml b/.github/workflows/callable-local-e2e-tests.yml index 3e5aca256..0d9d94e2f 100644 --- a/.github/workflows/callable-local-e2e-tests.yml +++ b/.github/workflows/callable-local-e2e-tests.yml @@ -11,18 +11,18 @@ jobs: - name: Checkout repository uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0 https://github.com/actions/checkout/commit/24cb9080177205b6e8c946b17badbe402adc938f with: - path: amplify-api-next + path: amplify-data - name: Setup node and build the repository - uses: ./amplify-api-next/.github/actions/node-and-build + uses: ./amplify-data/.github/actions/node-and-build - name: Write Amplify outputs - working-directory: ./amplify-api-next + working-directory: ./amplify-data env: AMPLIFY_OUTPUTS_BASE64: ${{ secrets.E2E_NODE_AMPLIFY_OUTPUTS_BASE64 }} run: | echo $AMPLIFY_OUTPUTS_BASE64 | base64 --decode > ./packages/e2e-tests/node/amplify_outputs.json - name: Install Node Sample Dependencies - working-directory: ./amplify-api-next + working-directory: ./amplify-data run: npm run e2e-node:install - name: Run tests - working-directory: ./amplify-api-next + working-directory: ./amplify-data run: npm run e2e-node:test diff --git a/.github/workflows/callable-npm-publish-preid.yml b/.github/workflows/callable-npm-publish-preid.yml index 864ac7106..be3d9da63 100644 --- a/.github/workflows/callable-npm-publish-preid.yml +++ b/.github/workflows/callable-npm-publish-preid.yml @@ -33,14 +33,14 @@ jobs: - name: Checkout repository uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0 https://github.com/actions/checkout/commit/24cb9080177205b6e8c946b17badbe402adc938f with: - path: amplify-api-next + path: amplify-data token: ${{ secrets.GH_TOKEN_AMPLIFY_WRITE }} - name: Setup node and build the repository - uses: ./amplify-api-next/.github/actions/node-and-build + uses: ./amplify-data/.github/actions/node-and-build - name: Run npm publish - uses: ./amplify-api-next/.github/actions/npm-publish + uses: ./amplify-data/.github/actions/npm-publish with: target: preid preid: ${{ inputs.preid }} diff --git a/.github/workflows/callable-npm-publish-release.yml b/.github/workflows/callable-npm-publish-release.yml index 045bf1c02..24a848f09 100644 --- a/.github/workflows/callable-npm-publish-release.yml +++ b/.github/workflows/callable-npm-publish-release.yml @@ -10,14 +10,14 @@ jobs: - name: Checkout repository uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0 https://github.com/actions/checkout/commit/24cb9080177205b6e8c946b17badbe402adc938f with: - path: amplify-api-next + path: amplify-data token: ${{ secrets.GH_TOKEN_AMPLIFY_WRITE }} - name: Setup node and build the repository - uses: ./amplify-api-next/.github/actions/node-and-build + uses: ./amplify-data/.github/actions/node-and-build - name: Run npm publish - uses: ./amplify-api-next/.github/actions/npm-publish + uses: ./amplify-data/.github/actions/npm-publish with: target: release npm_token: ${{ secrets.NPM_TOKEN }} @@ -33,11 +33,11 @@ jobs: git config --global user.name $GITHUB_USER - name: Update lockfile with newly published version - working-directory: ./amplify-api-next + working-directory: ./amplify-data run: npm i - name: Commit version and changelog - working-directory: ./amplify-api-next + working-directory: ./amplify-data run: | git add . git commit -m "release: publish [ci skip]" diff --git a/.github/workflows/callable-prebuild-amplify-api-next.yml b/.github/workflows/callable-prebuild-amplify-data.yml similarity index 79% rename from .github/workflows/callable-prebuild-amplify-api-next.yml rename to .github/workflows/callable-prebuild-amplify-data.yml index 41a37dd97..e83ec68f0 100644 --- a/.github/workflows/callable-prebuild-amplify-api-next.yml +++ b/.github/workflows/callable-prebuild-amplify-data.yml @@ -1,4 +1,4 @@ -name: Prebuild amplify-api-next +name: Prebuild amplify-data on: workflow_call: @@ -15,8 +15,8 @@ jobs: - name: Checkout repository uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0 https://github.com/actions/checkout/commit/24cb9080177205b6e8c946b17badbe402adc938f with: - path: amplify-api-next + path: amplify-data - name: Setup node and build the repository - uses: ./amplify-api-next/.github/actions/node-and-build + uses: ./amplify-data/.github/actions/node-and-build with: is-prebuild: true diff --git a/.github/workflows/callable-prebuild-samples-staging.yml b/.github/workflows/callable-prebuild-samples-staging.yml index 1befd7f9a..8b8de3157 100644 --- a/.github/workflows/callable-prebuild-samples-staging.yml +++ b/.github/workflows/callable-prebuild-samples-staging.yml @@ -13,8 +13,8 @@ jobs: - name: Checkout repository uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 with: - path: amplify-api-next + path: amplify-data - name: Setup samples staging - uses: ./amplify-api-next/.github/actions/setup-samples-staging + uses: ./amplify-data/.github/actions/setup-samples-staging with: AMPLIFY_JS_SAMPLES_STAGING_READ: ${{ secrets.AMPLIFY_JS_SAMPLES_STAGING_READ }} diff --git a/.github/workflows/callable-release-verification.yml b/.github/workflows/callable-release-verification.yml index 5b265dd06..52104ad42 100644 --- a/.github/workflows/callable-release-verification.yml +++ b/.github/workflows/callable-release-verification.yml @@ -4,7 +4,7 @@ on: workflow_call jobs: prebuild-ubuntu: - uses: ./.github/workflows/callable-prebuild-amplify-api-next.yml + uses: ./.github/workflows/callable-prebuild-amplify-data.yml with: runs_on: ubuntu-latest prebuild-samples-staging: diff --git a/.github/workflows/callable-ts-version-unit-test.yml b/.github/workflows/callable-ts-version-unit-test.yml index b7d853b7f..1e7adee6f 100644 --- a/.github/workflows/callable-ts-version-unit-test.yml +++ b/.github/workflows/callable-ts-version-unit-test.yml @@ -14,16 +14,16 @@ jobs: - name: Checkout repository uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0 https://github.com/actions/checkout/commit/24cb9080177205b6e8c946b17badbe402adc938f with: - path: amplify-api-next + path: amplify-data - name: Install specific typescript version env: VERSION: ${{ inputs.tsVersion }} - working-directory: ./amplify-api-next + working-directory: ./amplify-data run: npm i typescript@$VERSION - name: Setup node and build the repository - uses: ./amplify-api-next/.github/actions/node-and-build + uses: ./amplify-data/.github/actions/node-and-build with: force: true - name: Run tests - working-directory: ./amplify-api-next + working-directory: ./amplify-data run: npm run lint && npm run test diff --git a/.github/workflows/callable-unit-tests.yml b/.github/workflows/callable-unit-tests.yml index ce36a517b..2b69a5b87 100644 --- a/.github/workflows/callable-unit-tests.yml +++ b/.github/workflows/callable-unit-tests.yml @@ -10,9 +10,9 @@ jobs: - name: Checkout repository uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0 https://github.com/actions/checkout/commit/24cb9080177205b6e8c946b17badbe402adc938f with: - path: amplify-api-next + path: amplify-data - name: Setup node and build the repository - uses: ./amplify-api-next/.github/actions/node-and-build + uses: ./amplify-data/.github/actions/node-and-build - name: Run tests - working-directory: ./amplify-api-next + working-directory: ./amplify-data run: npm run lint && npm run test diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 2cb7a3749..bca6f76eb 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -15,9 +15,9 @@ jobs: - name: Checkout repository uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0 https://github.com/actions/checkout/commit/24cb9080177205b6e8c946b17badbe402adc938f with: - path: amplify-api-next + path: amplify-data - name: Setup node and build the repository - uses: ./amplify-api-next/.github/actions/node-and-build + uses: ./amplify-data/.github/actions/node-and-build with: is-prebuild: true check-dependencies: diff --git a/.github/workflows/prepare-revert-pr.yml b/.github/workflows/prepare-revert-pr.yml index 9882f3369..e5ec3f04a 100644 --- a/.github/workflows/prepare-revert-pr.yml +++ b/.github/workflows/prepare-revert-pr.yml @@ -25,14 +25,14 @@ jobs: - name: Checkout repository uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0 https://github.com/actions/checkout/commit/24cb9080177205b6e8c946b17badbe402adc938f with: - path: amplify-api-next + path: amplify-data token: ${{ secrets.GITHUB_TOKEN }} # fetch full history so that we can properly lookup past releases fetch-depth: 0 - name: Setup node and build the repository - uses: ./amplify-api-next/.github/actions/node-and-build + uses: ./amplify-data/.github/actions/node-and-build with: is-prebuild: true - name: Generate Revert PR - working-directory: ./amplify-api-next + working-directory: ./amplify-data run: npx tsx ./scripts/prepare-revert-pr.ts diff --git a/.github/workflows/push-main-release.yml b/.github/workflows/push-main-release.yml index e4edced7a..cd2deda77 100644 --- a/.github/workflows/push-main-release.yml +++ b/.github/workflows/push-main-release.yml @@ -8,7 +8,7 @@ concurrency: on: push: branches: - # NOTE: to run E2E tests against an `amplify-api-next` branch, add the name + # NOTE: to run E2E tests against an `amplify-data` branch, add the name # of that branch (and corresponding `amplify-js-samples-staging` branch, if # testing sample / test changes) here. # Must disable publishing to NPM prior to adding this branch to avoid @@ -17,7 +17,7 @@ on: jobs: prebuild-ubuntu: - uses: ./.github/workflows/callable-prebuild-amplify-api-next.yml + uses: ./.github/workflows/callable-prebuild-amplify-data.yml with: runs_on: ubuntu-latest # This step is included at the top level as a workround (i.e. not in a @@ -38,19 +38,19 @@ jobs: - name: Checkout repository uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0 https://github.com/actions/checkout/commit/24cb9080177205b6e8c946b17badbe402adc938f with: - path: amplify-api-next + path: amplify-data - name: Setup node and build the repository - uses: ./amplify-api-next/.github/actions/node-and-build + uses: ./amplify-data/.github/actions/node-and-build - name: Configure AWS test execution credentials uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # version 4.0.2 with: role-to-assume: ${{ secrets.SANDBOX_E2E_RUNNER_ROLE_ARN }} aws-region: us-west-2 - name: Install Sandbox E2E Dependencies - working-directory: ./amplify-api-next + working-directory: ./amplify-data run: npm run e2e-sandbox:install - name: Run E2E sandbox tests - working-directory: ./amplify-api-next + working-directory: ./amplify-data run: npm run e2e-sandbox:test release-verification-testing: secrets: inherit diff --git a/.github/workflows/push-preid-release.yml b/.github/workflows/push-preid-release.yml index 5e886af9c..c16361127 100644 --- a/.github/workflows/push-preid-release.yml +++ b/.github/workflows/push-preid-release.yml @@ -17,9 +17,9 @@ jobs: - name: Checkout repository uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0 https://github.com/actions/checkout/commit/24cb9080177205b6e8c946b17badbe402adc938f with: - path: amplify-api-next + path: amplify-data - name: Setup node and build the repository - uses: ./amplify-api-next/.github/actions/node-and-build + uses: ./amplify-data/.github/actions/node-and-build with: is-prebuild: true e2e: diff --git a/package-lock.json b/package-lock.json index 5a6198c41..20da177bb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,10 +1,10 @@ { - "name": "amplify-api-next-monorepo", + "name": "amplify-data-monorepo", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "amplify-api-next-monorepo", + "name": "amplify-data-monorepo", "license": "Apache-2.0", "workspaces": [ "packages/*", diff --git a/package.json b/package.json index 79e7461af..f70dfc37c 100644 --- a/package.json +++ b/package.json @@ -1,9 +1,9 @@ { - "name": "amplify-api-next-monorepo", + "name": "amplify-data-monorepo", "license": "Apache-2.0", "repository": { "type": "git", - "url": "https://github.com/aws-amplify/amplify-api-next.git" + "url": "https://github.com/aws-amplify/amplify-data.git" }, "private": true, "workspaces": [ diff --git a/packages/data-schema/package.json b/packages/data-schema/package.json index e87815287..e50ad5d01 100644 --- a/packages/data-schema/package.json +++ b/packages/data-schema/package.json @@ -4,7 +4,7 @@ "license": "Apache-2.0", "repository": { "type": "git", - "url": "https://github.com/aws-amplify/amplify-api-next.git" + "url": "https://github.com/aws-amplify/amplify-data.git" }, "main": "./dist/cjs/index.js", "module": "./dist/esm/index.mjs", diff --git a/packages/data-schema/src/ModelField.ts b/packages/data-schema/src/ModelField.ts index e76bff894..c5388162b 100644 --- a/packages/data-schema/src/ModelField.ts +++ b/packages/data-schema/src/ModelField.ts @@ -103,11 +103,11 @@ export type ModelField< [__auth]?: Auth; [brandSymbol]: typeof brandName; - /** - * Internal non-omittable method that allows `BaseModelField` to retain a reference to `T` type arg in `ModelField`. - * Since all public methods are omittable, the evaluated `BaseModelField` loses type information unless + /** + * Internal non-omittable method that allows `BaseModelField` to retain a reference to `T` type arg in `ModelField`. + * Since all public methods are omittable, the evaluated `BaseModelField` loses type information unless * some property on the type is guaranteed to reference `T` - * Context: https://github.com/aws-amplify/amplify-api-next/pull/406/files#r1869481467 + * Context: https://github.com/aws-amplify/amplify-data/pull/406/files#r1869481467 */ [internal](): ModelField; @@ -119,7 +119,10 @@ export type ModelField< /** * Converts a field type definition to an array of the field type. */ - array(): ModelField, Exclude | 'array'>; + array(): ModelField< + ArrayField, + Exclude | 'array' + >; // TODO: should be T, but .array breaks this constraint. Fix later /** * Sets a default value for the scalar type. diff --git a/packages/e2e-tests/README.md b/packages/e2e-tests/README.md index c3293ebfd..0783f8e13 100644 --- a/packages/e2e-tests/README.md +++ b/packages/e2e-tests/README.md @@ -1,4 +1,4 @@ -# `amplify-api-next` E2E Tests +# `amplify-data` E2E Tests This package contains automated tests for validating functionality E2E in Node. @@ -67,7 +67,7 @@ the IAM OIDC provider. ### IAM trust policy restrictions for OIDC provider: Currently, the trust policy for the OIDC provider is set to only allow execution -of the `main` branch on `amplify-api-next`, since this branch contains appropriate +of the `main` branch on `amplify-data`, since this branch contains appropriate restrictions to limit E2E runs (test runs only occur when an approved PR has been merged to `main`).