Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(data): API V6 migration; 'core' util and config mapping updates; add API 'generateClient' and types; migrate subscription provider; REST client updates #12031

Merged
merged 106 commits into from
Sep 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
106 commits
Select commit Hold shift + click to select a range
3a0a21c
migrate generateClient code to 'next'; build config updates to allow …
david-mcafee Aug 23, 2023
b332f77
Merge branch 'next' into next-api-v6
david-mcafee Aug 29, 2023
82dccba
update config
david-mcafee Aug 29, 2023
b329ff2
update cache import
david-mcafee Aug 29, 2023
d511f15
config updates
david-mcafee Aug 29, 2023
f954659
update envrc; add TODO; config updates
david-mcafee Aug 29, 2023
a3aa4f0
update unit test
david-mcafee Aug 29, 2023
a0f5d45
add tests + fixtures + utils
david-mcafee Aug 30, 2023
229de78
update types
david-mcafee Aug 30, 2023
4efe8f8
Merge branch 'next' into next-api-v6
david-mcafee Aug 30, 2023
31bb50a
update yarn.lock
david-mcafee Aug 30, 2023
e8f5ad6
Disable datastore cpk canary (#11939)
elorzafe Aug 30, 2023
58057e6
update 'core' imports
david-mcafee Aug 31, 2023
253cd3d
update yarn.lock
david-mcafee Aug 31, 2023
68803a8
Merge branch 'next' into next-api-v6
david-mcafee Aug 31, 2023
bb54e4e
test
david-mcafee Aug 31, 2023
0b24be2
add back internals package.json
david-mcafee Aug 31, 2023
a27c826
revert api-graphql package.json changes
david-mcafee Aug 31, 2023
ace02f4
config updates
david-mcafee Aug 31, 2023
c29df95
add api-rest to global config
david-mcafee Aug 31, 2023
1e1f010
add pubsub to lerna config and package.json
david-mcafee Aug 31, 2023
c2912f0
update all core imports
david-mcafee Aug 31, 2023
daeac44
Merge branch 'next' into next-api-v6
david-mcafee Aug 31, 2023
1d88977
replace amplify.register with amplify.configure
david-mcafee Sep 1, 2023
8b869b4
add resolveConfig + resolveCredentials + error utils
david-mcafee Sep 1, 2023
2f2c6c1
fix: Canary workflows (#11963)
stocaaro Sep 1, 2023
ef3d04f
add preliminary api-graphql config and options types
david-mcafee Sep 1, 2023
29c8166
Merge branch 'next' into next-api-v6
david-mcafee Sep 1, 2023
d931d89
more auth changes
david-mcafee Sep 1, 2023
a24765a
Merge branch 'next' into next-api-v6
david-mcafee Sep 1, 2023
ae6c6ed
todos
david-mcafee Sep 2, 2023
f478dac
Draft version of internal post method (#11969)
elorzafe Sep 2, 2023
4399cc0
add todos
david-mcafee Sep 2, 2023
aaaf731
type updates; package.json updates
david-mcafee Sep 2, 2023
9c21be0
remove pubsub imports
david-mcafee Sep 2, 2023
b945cf6
update
david-mcafee Sep 5, 2023
0787b12
Merge branch 'next' into next-api-v6
david-mcafee Sep 5, 2023
650189e
Add cancel requests and subscriptions to V6 (#11978)
elorzafe Sep 6, 2023
9801391
Merge branch 'next' into next-api-v6
david-mcafee Sep 6, 2023
6cc2b99
update API config types
david-mcafee Sep 7, 2023
821e90c
type updates, API updates
david-mcafee Sep 7, 2023
aa234e2
revert yarn.lock changes
david-mcafee Sep 7, 2023
27e17d2
chore: Update to stabalize yarn.lock
stocaaro Sep 7, 2023
254f83b
fix(core): decode encoded cookie name while creating universal storag…
HuiSF Sep 8, 2023
eb6e0c1
Merge branch 'next/release' into next-api-v6
david-mcafee Sep 11, 2023
6a12d18
update singleton type config
david-mcafee Sep 11, 2023
b5fab7a
chore(fix): canary slack notification (#12003)
ashwinkumar6 Sep 11, 2023
ae86aa2
add API dependency and exports to 'aws-amplify' package
david-mcafee Sep 11, 2023
73dc347
add API category export mapping to 'aws-amplify'
david-mcafee Sep 11, 2023
38b3cb5
add additional API category export mappings to 'aws-amplify'
david-mcafee Sep 11, 2023
9929d33
api updates
david-mcafee Sep 11, 2023
f6b5b63
update 'parseAWSExports' util to support API config parsing
david-mcafee Sep 11, 2023
2c0b95f
update
david-mcafee Sep 12, 2023
af905b7
update 'parseAWSExports', update singleton types
david-mcafee Sep 12, 2023
048f969
update internalgraphqlapi
david-mcafee Sep 12, 2023
86fc783
internal graphql api updates
david-mcafee Sep 12, 2023
ffeec1c
Merge branch 'next-api-v6' into next-main-api-v6
david-mcafee Sep 12, 2023
64d390d
remove headers
david-mcafee Sep 12, 2023
e886d58
api updates
david-mcafee Sep 12, 2023
db9870c
port over auth fix from 'next/release'
david-mcafee Sep 12, 2023
f7b95c7
update auth fix; add generateClient export
david-mcafee Sep 12, 2023
9e86740
fix types exports
david-mcafee Sep 13, 2023
4e78cf3
debugging
david-mcafee Sep 13, 2023
c5a78e8
debugging
david-mcafee Sep 13, 2023
909a33d
Merge branch 'next/main' into next-main-api-v6
david-mcafee Sep 13, 2023
0bc98f4
debugging
david-mcafee Sep 13, 2023
eaf4ed7
cleanup
david-mcafee Sep 13, 2023
8d701e9
revert type change
david-mcafee Sep 13, 2023
9301d67
revert async
david-mcafee Sep 13, 2023
155dfd8
Revert "cleanup"
david-mcafee Sep 13, 2023
0285718
fix issues with API Key and IAM (#12029)
elorzafe Sep 13, 2023
69607e2
fix REST client PostOptions type
david-mcafee Sep 13, 2023
e25e2f9
update real time provider; update exports util; update internal graph…
david-mcafee Sep 13, 2023
a085a07
update parseAWSExports to map auth type; update subscription response…
david-mcafee Sep 13, 2023
03ffbdf
cleanup
david-mcafee Sep 13, 2023
3f40791
additional cleanup
david-mcafee Sep 13, 2023
d9159f4
additional cleanup
david-mcafee Sep 13, 2023
6af00c8
update preid
david-mcafee Sep 13, 2023
ddace2b
remove apikey from api config
david-mcafee Sep 13, 2023
32f80b4
remove types package
david-mcafee Sep 13, 2023
fdc9154
update core parseAWSExports
david-mcafee Sep 13, 2023
a1db8c1
fix type issue
david-mcafee Sep 13, 2023
b1f9639
remove preid; revert datastore dep
david-mcafee Sep 13, 2023
0cee999
fix types for post options
elorzafe Sep 13, 2023
7325a75
update API exports
david-mcafee Sep 13, 2023
9591ea1
fix types for post options (#12038)
david-mcafee Sep 13, 2023
d316256
add todo to api exports
david-mcafee Sep 13, 2023
fc87f24
Revert "update API exports"
david-mcafee Sep 13, 2023
05e6486
combine core imports
david-mcafee Sep 13, 2023
f95b8de
rest client fix
david-mcafee Sep 13, 2023
d9e7df7
add license
david-mcafee Sep 13, 2023
30c7725
temp disable v6 tests
david-mcafee Sep 13, 2023
92245e1
combine imports
david-mcafee Sep 13, 2023
8e085f7
update auth type mapping for cognito
david-mcafee Sep 14, 2023
389e942
disable tests
david-mcafee Sep 14, 2023
1f5567e
remove unused tests
david-mcafee Sep 14, 2023
857af81
Revert "remove unused tests"
david-mcafee Sep 14, 2023
7be783f
remove v6 tests
david-mcafee Sep 14, 2023
fc3c4f1
update jest config
david-mcafee Sep 14, 2023
217d8f2
update jest config for api-graphql
david-mcafee Sep 14, 2023
f16cc6b
remove v6 types package
david-mcafee Sep 14, 2023
bf5f947
update PubSub imports
david-mcafee Sep 14, 2023
5daedab
add V6 todo
david-mcafee Sep 14, 2023
f6547da
Merge branch 'main' into next-main-api-v6
david-mcafee Sep 14, 2023
fe9aa7d
regen yarn.lock
david-mcafee Sep 14, 2023
1f745b0
Merge branch 'next/main' into next-main-api-v6
david-mcafee Sep 14, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 18 additions & 18 deletions .github/canary-config/canary-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,24 +66,24 @@ tests:
spec: background-process-manager
browser: *extended_browser_list
# TODO: remove when updated CPK + related models tests are added
- test_name: integ_react_datastore_related_models
desc: 'DataStore - Related Models'
framework: react
category: datastore
sample_name: [related-models]
spec: related-models
browser: *minimal_browser_list
timeout_minutes: 45
retry_count: 10
- test_name: integ_react_datastore_cpk_related_models
desc: 'DataStore - Custom Primary Key + Related Models'
framework: react
category: datastore
sample_name: [v2/related-models]
spec: cpk-related-models
browser: *minimal_browser_list
timeout_minutes: 45
retry_count: 10
# - test_name: integ_react_datastore_related_models
# desc: 'DataStore - Related Models'
# framework: react
# category: datastore
# sample_name: [related-models]
# spec: related-models
# browser: *minimal_browser_list
# timeout_minutes: 45
# retry_count: 10
# - test_name: integ_react_datastore_cpk_related_models
# desc: 'DataStore - Custom Primary Key + Related Models'
# framework: react
# category: datastore
# sample_name: [v2/related-models]
# spec: cpk-related-models
# browser: *minimal_browser_list
# timeout_minutes: 45
# retry_count: 10
- test_name: integ_react_datastore_selective_sync
desc: 'DataStore - Selective Sync'
framework: react
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/callable-canary-e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
with:
# Minimal depth 2 so we can checkout the commit before possible merge commit.
fetch-depth: 2
path: amplify-js
path: amplify-js
- name: Setup Node.js 16
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0 https://github.com/actions/setup-node/commit/64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c
with:
Expand All @@ -81,8 +81,8 @@ jobs:
uses: ./amplify-js/.github/actions/setup-samples-staging
with:
GH_TOKEN_STAGING_READ: ${{ secrets.GH_TOKEN_STAGING_READ }}
- name: Modify package.json to run against aws-amplify latest
env:
- name: Modify package.json to run against aws-amplify latest
env:
E2E_FRAMEWORK: ${{ inputs.framework }}
E2E_CATEGORY: ${{ inputs.category }}
E2E_SAMPLE_NAME: ${{ matrix.sample_name }}
Expand All @@ -102,7 +102,7 @@ jobs:
E2E_RETRY_COUNT: ${{ inputs.retry_count }}
E2E_TEST_NAME: ${{ inputs.test_name }}
run: |
../amplify-js/.circleci/retry-yarn-script.sh -s \
../amplify-js/scripts/retry-yarn-script.sh -s \
"ci:test \
$E2E_FRAMEWORK \
$E2E_CATEGORY \
Expand All @@ -125,7 +125,7 @@ jobs:
E2E_RETRY_COUNT: ${{ inputs.retry_count }}
E2E_TEST_NAME: ${{ inputs.test_name }}
run: |
../amplify-js/.circleci/retry-yarn-script.sh -s \
../amplify-js/scripts/retry-yarn-script.sh -s \
"ci:test \
$E2E_FRAMEWORK \
$E2E_CATEGORY \
Expand All @@ -146,4 +146,4 @@ jobs:
path: |
amplify-js-samples-staging/cypress/videos
amplify-js-samples-staging/cypress/screenshots
retention-days: 14
retention-days: 14
4 changes: 2 additions & 2 deletions .github/workflows/callable-canary-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ jobs:
steps:
- name: Send slack message
env:
WORKFLOW_URL: ${{ env.WORKFLOW_URL }}
WORKFLOW_URL: '{ "URL": "${{ env.WORKFLOW_URL }}" }'
WEBHOOK_URL: ${{ env.WEBHOOK_URL }}
run: |
curl -X POST -H "Content-Type: application/json" \
--data {URL:$WORKFLOW_URL} \
--data "$WORKFLOW_URL" \
$WEBHOOK_URL
112 changes: 56 additions & 56 deletions .github/workflows/callable-canary-sampleapp-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
type: boolean
default: true

env:
env:
AMPLIFY_DIR: /home/runner/work/amplify-js/amplify-js/amplify-js
CYPRESS_GOOGLE_CLIENTID: ${{ secrets.CYPRESS_GOOGLE_CLIENTID }}
CYPRESS_GOOGLE_CLIENT_SECRET: ${{ secrets.CYPRESS_GOOGLE_CLIENT_SECRET }}
Expand All @@ -18,13 +18,13 @@ jobs:
build_apps:
name: Build Sample App Tests
runs-on: ubuntu-latest
steps:
steps:
- name: Checkout repository
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0 https://github.com/actions/checkout/commit/24cb9080177205b6e8c946b17badbe402adc938f
with:
# Minimal depth 2 so we can checkout the commit before possible merge commit.
fetch-depth: 2
path: amplify-js
path: amplify-js
- name: Setup samples staging repository
uses: ./amplify-js/.github/actions/setup-samples-staging
with:
Expand Down Expand Up @@ -53,18 +53,18 @@ jobs:
working-directory: amplify-js-samples-staging/samples/react/auth/new-react-app
- name: Start new application and run test
run: |
../amplify-js/.circleci/retry-yarn-script.sh -s \
"ci:test \
react \
auth \
new-react-app \
new-react-app \
chrome \
dev" \
-n 3
../amplify-js/scripts/retry-yarn-script.sh -s \
"ci:test \
react \
auth \
new-react-app \
new-react-app \
chrome \
dev" \
-n 3
working-directory: amplify-js-samples-staging
shell: bash

# Angular
- name: Install angular CLI
run: npm install -g @angular/cli
Expand All @@ -77,7 +77,7 @@ jobs:
- name: Copy files from samples staging repo
run: |
rm -r ./samples/angular/interactions/new-angular-app
cp -r ./samples/angular/interactions/chatbot-component ./samples/angular/interactions/new-angular-app
cp -r ./samples/angular/interactions/chatbot-component ./samples/angular/interactions/new-angular-app
working-directory: amplify-js-samples-staging
- name: Copy test file from samples staging repo
run: |
Expand All @@ -93,15 +93,15 @@ jobs:
working-directory: amplify-js-samples-staging/samples/angular/interactions/new-angular-app
- name: Start application and run test
run: |
../amplify-js/.circleci/retry-yarn-script.sh -s \
"ci:test \
angular \
interactions \
new-angular-app \
new-angular-app \
chrome \
dev" \
-n 3
../amplify-js/scripts/retry-yarn-script.sh -s \
"ci:test \
angular \
interactions \
new-angular-app \
new-angular-app \
chrome \
dev" \
-n 3
working-directory: amplify-js-samples-staging
shell: bash

Expand All @@ -115,7 +115,7 @@ jobs:
- name: Copy files from samples staging repo
run: |
rm -r ./samples/next/auth/new-next-app
cp -r ./samples/next/auth/auth-rsc ./samples/next/auth/new-next-app
cp -r ./samples/next/auth/auth-rsc ./samples/next/auth/new-next-app
working-directory: amplify-js-samples-staging
- name: Copy test file from samples staging repo
run: |
Expand All @@ -131,21 +131,21 @@ jobs:
working-directory: amplify-js-samples-staging/samples/next/auth/new-next-app
- name: Start application and run test
run: |
../amplify-js/.circleci/retry-yarn-script.sh -s \
"ci:test \
next \
auth \
new-next-app \
new-next-app \
chrome \
dev" \
-n 3
../amplify-js/scripts/retry-yarn-script.sh -s \
"ci:test \
next \
auth \
new-next-app \
new-next-app \
chrome \
dev" \
-n 3
working-directory: amplify-js-samples-staging
shell: bash

# Vue
- name: Create Vue application
run: |
run: |
npm init vue@3
working-directory: amplify-js-samples-staging/samples/vue/auth
- name: Copy files from samples staging repo
Expand All @@ -166,15 +166,15 @@ jobs:
working-directory: amplify-js-samples-staging/samples/vue/auth/new-vue-app
- name: Start application and run test
run: |
../amplify-js/.circleci/retry-yarn-script.sh -s \
"ci:test \
vue \
auth \
new-vue-app \
new-vue-app \
chrome \
dev" \
-n 3
../amplify-js/scripts/retry-yarn-script.sh -s \
"ci:test \
vue \
auth \
new-vue-app \
new-vue-app \
chrome \
dev" \
-n 3
working-directory: amplify-js-samples-staging
shell: bash

Expand All @@ -195,7 +195,7 @@ jobs:
- name: Copy files from samples staging repo
run: |
rm -r ./samples/javascript/auth/new-javascript-app
cp -r ./samples/javascript/auth/auth-cdn ./samples/javascript/auth/new-javascript-app
cp -r ./samples/javascript/auth/auth-cdn ./samples/javascript/auth/new-javascript-app
working-directory: amplify-js-samples-staging
- name: Copy test file from samples staging repo
run: |
Expand All @@ -208,15 +208,15 @@ jobs:
env:
AMPLIFY_DIR: ${{ env.AMPLIFY_DIR }}
run: |
../amplify-js/.circleci/retry-yarn-script.sh -s \
"ci:test \
javascript \
auth \
new-javascript-app \
new-javascript-app \
chrome \
dev \
$AMPLIFY_DIR" \
-n 3
../amplify-js/scripts/retry-yarn-script.sh -s \
"ci:test \
javascript \
auth \
new-javascript-app \
new-javascript-app \
chrome \
dev \
$AMPLIFY_DIR" \
-n 3
working-directory: amplify-js-samples-staging
shell: bash
shell: bash
5 changes: 4 additions & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@
"packages/analytics",
"packages/storage",
"packages/aws-amplify",
"packages/adapter-nextjs"
"packages/adapter-nextjs",
"packages/api",
"packages/api-rest",
"packages/api-graphql"
],
"exact": true,
"version": "independent",
Expand Down
8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,10 @@
"packages/analytics",
"packages/storage",
"packages/aws-amplify",
"packages/adapter-nextjs"
"packages/adapter-nextjs",
"packages/api",
"packages/api-graphql",
"packages/api-rest"
],
"nohoist": [
"**/@types/react-native",
Expand Down Expand Up @@ -113,7 +116,8 @@
"@types/babel__traverse": "7.20.0",
"path-scurry": "1.10.0",
"**/glob/minipass": "6.0.2",
"nx": "16.7.0"
"nx": "16.7.0",
"@smithy/types": "2.1.0"
},
"jest": {
"resetMocks": true,
Expand Down
Loading
Loading