Skip to content

Commit

Permalink
Merge branch 'main' of github.com:aws-amplify/amplify-js into chore/s…
Browse files Browse the repository at this point in the history
…torage-options-refactor
  • Loading branch information
ashika112 committed Sep 11, 2024
2 parents 783191f + a76b594 commit ed5ebd4
Show file tree
Hide file tree
Showing 1,018 changed files with 15,944 additions and 21,222 deletions.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
/packages/core/src/clients/internal @ukhan-amazon @haverchuck @cshfang @jimblanc @HuiSF
/packages/core/src/Hub @ukhan-amazon @haverchuck @cshfang @jimblanc @HuiSF
/packages/adapter-nextjs @ukhan-amazon @haverchuck @cshfang @jimblanc @HuiSF
/packages/rtn-web-browser @ukhan-amazon @haverchuck @cshfang @jimblanc @HuiSF
/packages/storage/src/providers/s3/apis/internal @ukhan-amazon @haverchuck @cshfang @jimblanc @HuiSF
/packages/storage/src/providers/s3/apis/server @ukhan-amazon @haverchuck @cshfang @jimblanc @HuiSF
/packages/api-rest/src/apis/server.ts @ukhan-amazon @haverchuck @cshfang @jimblanc @HuiSF
Expand Down
1 change: 0 additions & 1 deletion .github/ISSUE_TEMPLATE/1.bug_report.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
name: Bug report
description: Create a report to help us improve Amplify JS
labels: pending-triage

body:
- type: markdown
Expand Down
1 change: 0 additions & 1 deletion .github/ISSUE_TEMPLATE/2.feature_request.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
name: Feature request
description: Suggest an idea for Amplify JS
labels: pending-triage

body:
- type: markdown
Expand Down
23 changes: 0 additions & 23 deletions .github/ISSUE_TEMPLATE/3.usage-question.md

This file was deleted.

46 changes: 0 additions & 46 deletions .github/ISSUE_TEMPLATE/4.rfc.md

This file was deleted.

26 changes: 16 additions & 10 deletions .github/actions/load-verdaccio-with-amplify-js/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ runs:
steps:
- name: Start verdaccio
run: |
npx [email protected] &
# This version supports Node.js v22
npx [email protected] &
while ! nc -z localhost 4873; do
echo "Verdaccio not running yet"
sleep 1
Expand All @@ -18,25 +19,30 @@ runs:
- name: Install and run npm-cli-login
shell: bash
env:
NPM_REGISTRY: http://localhost:4873/
NPM_REGISTRY_HOST: localhost:4873
NPM_REGISTRY: http://localhost:4873
NPM_USER: verdaccio
NPM_PASS: verdaccio
NPM_EMAIL: [email protected]
run: |
npm i -g npm-cli-adduser
npm-cli-adduser
sleep 1
- name: Configure registry and git
# Make the HTTP request that npm addUser makes to avoid the "Exit handler never called" error
TOKEN=$(curl -s \
-H "Accept: application/json" \
-H "Content-Type:application/json" \
-X PUT --data "{\"name\": \"$NPM_USER\", \"password\": \"$NPM_PASS\", \"email\": \"$NPM_EMAIL\"}" \
$NPM_REGISTRY/-/user/org.couchdb.user:$NPM_USER 2>&1 | jq -r '.token')
# Set the Verdaccio registry and set the token for logging in
yarn config set registry $NPM_REGISTRY
npm set registry $NPM_REGISTRY
npm set //"$NPM_REGISTRY_HOST"/:_authToken $TOKEN
- name: Configure git
shell: bash
working-directory: ./amplify-js
env:
NPM_REGISTRY: http://localhost:4873/
NPM_USER: verdaccio
NPM_PASS: verdaccio
NPM_EMAIL: [email protected]
run: |
yarn config set registry $NPM_REGISTRY
npm set registry $NPM_REGISTRY
git config --global user.email $NPM_EMAIL
git config --global user.name $NPM_USER
git status
Expand Down
6 changes: 4 additions & 2 deletions .github/actions/node-and-build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@ inputs:
is-prebuild:
required: false
default: false
node_version:
required: false
runs:
using: 'composite'
steps:
- name: Setup Node.js 18
- name: Setup Node.js
uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1
with:
node-version: 18.20.2
node-version: ${{ inputs.node_version || '18.x' }}
env:
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 2
- uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0
Expand Down
7 changes: 4 additions & 3 deletions .github/dependency-review/dependecy-review-config.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
allow-licenses:
- 'Apache-2.0'
- '0BSD'
- 'BSL-1.0'
- 'Apache-2.0'
- 'BlueOak-1.0.0'
- 'BSD-1-Clause'
- 'BSD-2-Clause-FreeBSD'
- 'BSD-2-Clause'
- 'BSD-3-Clause-Attribution'
- 'BSD-3-Clause'
- 'BSL-1.0'
- 'CC-BY-3.0'
- 'CC-BY-4.0'
- 'CC0-1.0'
- 'curl'
- 'ISC'
- 'JSON'
Expand All @@ -20,4 +22,3 @@ allow-licenses:
- 'Unlicense'
- 'WTFPL'
- 'Zlib'
- 'CC0-1.0'
4 changes: 4 additions & 0 deletions .github/integ-config/detox-integ-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,7 @@
- test_name: 'integ_rn_ios_api_v6_rn_72_detox_cli'
working_directory: amplify-js-samples-staging/samples/react-native/api/v6/ApiGRAPHQL
timeout_minutes: 120
- test_name: 'integ_rn_ios_oidc_signout'
working_directory: amplify-js-samples-staging/samples/react-native/auth/HosteduiApp
timeout_minutes: 120
host_signout_page: true
31 changes: 26 additions & 5 deletions .github/integ-config/integ-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -514,6 +514,13 @@ tests:
sample_name: [sign-in-with-oauth]
spec: sign-in-with-oauth
browser: [chrome]
- test_name: integ_vue_sign_out_of_oidc_provider
desc: 'Sign-out of OIDC provider'
framework: vue
category: auth
sample_name: [sign-in-with-oauth]
spec: sign-out-oidc-provider
browser: [chrome]

# AUTH GEN2
- test_name: integ_react_javascript_authentication_gen2
Expand Down Expand Up @@ -595,6 +602,13 @@ tests:
sample_name: [sign-in-with-oauth]
spec: sign-in-with-oauth
browser: [chrome]
- test_name: subdomain_authentication
desc: 'Sign-in with the OAuth flow and subdomains'
framework: next
category: auth
sample_name: [subdomains]
spec: subdomains
browser: [chrome]

# DISABLED Angular/Vue tests:
# TODO: delete tests or add custom ui logic to support them.
Expand Down Expand Up @@ -822,14 +836,14 @@ tests:
sample_name: [storage-gen2]
spec: storage-gen2
browser: *minimal_browser_list
- test_name: storage-guest-access
desc: 'Next Storage guest access'
- test_name: integ_next_storage
desc: 'Next Storage Auth'
framework: next
category: storage
sample_name: [guest-access]
sample_name: [storage-auth]
spec: storage-client-server
browser: *minimal_browser_list
browser: [chrome] # firefox issues with secure cookies in cypress, manual testing works fine

# INAPPMESSAGING
- test_name: integ_in_app_messaging
desc: 'React InApp Messaging'
Expand All @@ -856,3 +870,10 @@ tests:
spec: ssr-context-isolation
yarn_script: ci:ssr-context-isolation
browser: [chrome]
- test_name: integ_node_envs
desc: 'Node.js environment tests'
framework: node
category: integration
sample_name: auth-gql-storage
yarn_script: ci:node-env-test
node_versions: ['18.x', '20.x', '22.x']
11 changes: 10 additions & 1 deletion .github/workflows/callable-e2e-test-detox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,15 @@ on:
timeout_minutes:
required: true
type: number
host_signout_page:
required: false
type: boolean
default: false

jobs:
e2e-test:
name: E2E-Detox ${{ inputs.test_name }}
runs-on: macos-latest
runs-on: macos-latest-large
timeout-minutes: ${{ inputs.timeout_minutes }}

steps:
Expand Down Expand Up @@ -70,6 +74,11 @@ jobs:
JEST_JUNIT_OUTPUT_NAME: detox-test-results.xml
working-directory: ${{ inputs.working_directory }}
shell: bash
- name: Start the http-server and host the oidc signout page locally (background).
if: ${{ inputs.host_signout_page }}
run: yarn host:signout
working-directory: ${{ inputs.working_directory }}
shell: bash
- name: Detox run
run: |
$GITHUB_WORKSPACE/amplify-js/scripts/retry-yarn-script.sh -s 'detox test -c ios.sim.debug -u' -n 3
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/callable-e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ on:
yarn_script:
required: false
type: string
node_versions:
required: false
type: string

env:
AMPLIFY_DIR: /home/runner/work/amplify-js/amplify-js/amplify-js
Expand All @@ -54,6 +57,8 @@ jobs:
- ${{ fromJson(inputs.browser) }}
sample_name:
- ${{ fromJson(inputs.sample_name) }}
node_version:
- ${{ fromJson(inputs.node_versions) }}
fail-fast: false
timeout-minutes: ${{ inputs.timeout_minutes }}

Expand All @@ -64,6 +69,8 @@ jobs:
path: amplify-js
- name: Setup node and build the repository
uses: ./amplify-js/.github/actions/node-and-build
with:
node_version: ${{ matrix.node_version }}
- name: Setup samples staging repository
uses: ./amplify-js/.github/actions/setup-samples-staging
with:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/callable-e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ jobs:
timeout_minutes: ${{ matrix.integ-config.timeout_minutes || 35 }}
retry_count: ${{ matrix.integ-config.retry_count || 3 }}
yarn_script: ${{ matrix.integ-config.yarn_script || '' }}
node_versions: ${{ toJSON(matrix.integ-config.node_versions) || '[""]' }}

# e2e-test-runner-headless:
# name: E2E test runnner_headless
Expand Down Expand Up @@ -74,3 +75,4 @@ jobs:
test_name: ${{ matrix.integ-config.test_name }}
working_directory: ${{ matrix.integ-config.working_directory }}
timeout_minutes: ${{ matrix.integ-config.timeout_minutes || 45 }}
host_signout_page: ${{ matrix.integ-config.host_signout_page || false }}
22 changes: 22 additions & 0 deletions .github/workflows/issue-closed.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Issue Closed

on:
issues:
types: [closed]

permissions:
issues: write

jobs:
cleanup-labels:
runs-on: ubuntu-latest
if: ${{ (contains(github.event.issue.labels.*.name, 'pending-community-response') || contains(github.event.issue.labels.*.name, 'pending-maintainer-response') || contains(github.event.issue.labels.*.name, 'pending-triage')) }}
steps:
- name: Remove unnecessary labels after closing
shell: bash
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ISSUE_NUMBER: ${{ github.event.issue.number }}
REPOSITORY_NAME: ${{ github.event.repository.full_name }}
run: |
gh issue edit $ISSUE_NUMBER --repo $REPOSITORY_NAME --remove-label "pending-community-response" --remove-label "pending-maintainer-response" --remove-label "pending-triage"
31 changes: 31 additions & 0 deletions .github/workflows/issue-comment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Issue Comment

on:
issue_comment:
types: [created]

jobs:
adjust-labels:
runs-on: ubuntu-latest
permissions:
issues: write
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ISSUE_NUMBER: ${{ github.event.issue.number }}
REPOSITORY_NAME: ${{ github.event.repository.full_name }}
steps:
- name: Remove pending-community-response when new comment received
if: ${{ !contains(fromJSON('["MEMBER", "OWNER"]'), github.event.comment.author_association) && !github.event.issue.pull_request }}
shell: bash
run: |
gh issue edit $ISSUE_NUMBER --repo $REPOSITORY_NAME --remove-label "pending-community-response"
- name: Add pending-maintainer-response when new community comment received
if: ${{ !contains(fromJSON('["MEMBER", "OWNER"]'), github.event.comment.author_association) }}
shell: bash
run: |
gh issue edit $ISSUE_NUMBER --repo $REPOSITORY_NAME --add-label "pending-maintainer-response"
- name: Remove pending-maintainer-response when new owner/member comment received
if: ${{ contains(fromJSON('["MEMBER", "OWNER"]'), github.event.comment.author_association) }}
shell: bash
run: |
gh issue edit $ISSUE_NUMBER --repo $REPOSITORY_NAME --remove-label "pending-maintainer-response"
21 changes: 21 additions & 0 deletions .github/workflows/issue-labeled.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Issue Labeled

on:
issues:
types: [labeled]

jobs:
remove-pending-triage-label:
runs-on: ubuntu-latest
if: ${{ contains(fromJSON('["question", "bug", "feature-request"]'), github.event.label.name) }}
permissions:
issues: write
steps:
- name: Remove the pending-triage label
shell: bash
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ISSUE_NUMBER: ${{ github.event.issue.number }}
REPOSITORY_NAME: ${{ github.event.repository.full_name }}
run: |
gh issue edit $ISSUE_NUMBER --repo $REPOSITORY_NAME --remove-label "pending-triage"
Loading

0 comments on commit ed5ebd4

Please sign in to comment.