Skip to content

Commit ec2c184

Browse files
author
Dane Pilcher
committed
Merge branch 'main' into apiid-resolver
2 parents e50269c + cf342cc commit ec2c184

File tree

71 files changed

+1302
-353
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+1302
-353
lines changed

.changeset/few-candles-wink.md

Lines changed: 0 additions & 8 deletions
This file was deleted.

.changeset/great-mugs-warn.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/itchy-flowers-reply.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'@aws-amplify/backend-data': patch
3+
'@aws-amplify/backend': patch
4+
---
5+
6+
Allow apiKeyAuthorizationMode to be undefined if defaultAuthorizationMode is apiKey
File renamed without changes.

.changeset/silent-files-appear.md

Lines changed: 0 additions & 6 deletions
This file was deleted.

.eslint_dictionary.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@
101101
"lstat",
102102
"macos",
103103
"matchers",
104+
"mebibytes",
104105
"mfas",
105106
"minify",
106107
"mkdtemp",

.github/actions/build_with_cache/action.yml

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,36 @@ name: build_with_cache
22
description: builds the source code if cache miss and caches the result
33
inputs:
44
node-version:
5-
default: 18
5+
required: true
6+
cdk-version:
7+
required: true
68
runs:
79
using: composite
810
steps:
11+
# Validate that non-blank inputs are provided.
12+
# This is to ensure that inputs are plumbed and not defaulted accidentally in action call chains.
13+
# The 'required' input property does not assert this if value is provided at runtime.
14+
- name: Validate input
15+
shell: bash
16+
run: |
17+
if [ -z "${{ inputs.cdk-version }}" ]; then
18+
echo "CDK version must be provided"
19+
exit 1;
20+
fi
21+
if [ -z "${{ inputs.node-version }}" ]; then
22+
echo "Node version must be provided"
23+
exit 1;
24+
fi
925
- uses: ./.github/actions/install_with_cache
26+
with:
27+
node-version: ${{ inputs.node-version }}
28+
cdk-version: ${{ inputs.cdk-version }}
1029
# cache build output based on commit sha
1130
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # version 4.0.2
1231
id: build-cache
1332
with:
1433
path: '**/lib'
15-
key: ${{ github.sha }}-node${{ inputs.node-version }}
34+
key: ${{ github.sha }}-node${{ inputs.node-version }}-cdk${{ inputs.cdk-version }}
1635
enableCrossOsArchive: true
1736
# only build if cache miss
1837
- if: steps.build-cache.outputs.cache-hit != 'true'

.github/actions/install_with_cache/action.yml

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,41 @@ name: install_with_cache
22
description: installs node_modules if cache miss and stores in the cache
33
inputs:
44
node-version:
5-
default: 18
5+
required: true
6+
cdk-version:
7+
required: true
68
runs:
79
using: composite
810
steps:
11+
# Validate that non-blank inputs are provided.
12+
# This is to ensure that inputs are plumbed and not defaulted accidentally in action call chains.
13+
# The 'required' input property does not assert this if value is provided at runtime.
14+
- name: Validate input
15+
shell: bash
16+
run: |
17+
if [ -z "${{ inputs.cdk-version }}" ]; then
18+
echo "CDK version must be provided"
19+
exit 1;
20+
fi
21+
if [ -z "${{ inputs.node-version }}" ]; then
22+
echo "Node version must be provided"
23+
exit 1;
24+
fi
925
# cache node_modules based on package-lock.json hash
1026
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # version 4.0.2
1127
id: npm-cache
1228
with:
1329
path: |
1430
node_modules
1531
packages/**/node_modules
16-
key: ${{ runner.os }}-${{ hashFiles('package-lock.json') }}-node${{ inputs.node-version }}
32+
key: ${{ runner.os }}-${{ hashFiles('package-lock.json') }}-node${{ inputs.node-version }}-cdk${{ inputs.cdk-version }}
1733
# only install if cache miss
1834
- if: steps.npm-cache.outputs.cache-hit != 'true'
1935
shell: bash
20-
run: npm ci
36+
run: |
37+
npm ci
38+
if [[ ${{ inputs.cdk-version }} != 'FROM_PACKAGE_LOCK' ]]; then
39+
echo "Installing CDK version ${{ inputs.cdk-version }}"
40+
npm install --no-save aws-cdk@${{ inputs.cdk-version }} aws-cdk-lib@${{ inputs.cdk-version }}
41+
npx cdk --version
42+
fi

.github/actions/restore_build_cache/action.yml

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,35 @@ description: composes restoring node_modules and restoring build artifacts
33
inputs:
44
node-version:
55
description: node version used to configure environment with
6-
default: 18
6+
required: true
7+
cdk-version:
8+
required: true
79
runs:
810
using: composite
911
steps:
12+
# Validate that non-blank inputs are provided.
13+
# This is to ensure that inputs are plumbed and not defaulted accidentally in action call chains.
14+
# The 'required' input property does not assert this if value is provided at runtime.
15+
- name: Validate input
16+
shell: bash
17+
run: |
18+
if [ -z "${{ inputs.cdk-version }}" ]; then
19+
echo "CDK version must be provided"
20+
exit 1;
21+
fi
22+
if [ -z "${{ inputs.node-version }}" ]; then
23+
echo "Node version must be provided"
24+
exit 1;
25+
fi
1026
- uses: ./.github/actions/restore_install_cache
27+
with:
28+
node-version: ${{ inputs.node-version }}
29+
cdk-version: ${{ inputs.cdk-version }}
1130
# restore build output from cache
1231
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # version 4.0.2
1332
id: build-cache
1433
with:
1534
path: '**/lib'
16-
key: ${{ github.sha }}-node${{ inputs.node-version }}
35+
key: ${{ github.sha }}-node${{ inputs.node-version }}-cdk${{ inputs.cdk-version }}
1736
fail-on-cache-miss: true
1837
enableCrossOsArchive: true

.github/actions/restore_install_cache/action.yml

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,32 @@ description: restores node_modules from the cache and fails if no cache entry fo
33
inputs:
44
node-version:
55
description: node version used to configure environment with
6-
default: 18
6+
required: true
7+
cdk-version:
8+
required: true
79
runs:
810
using: composite
911
steps:
12+
# Validate that non-blank inputs are provided.
13+
# This is to ensure that inputs are plumbed and not defaulted accidentally in action call chains.
14+
# The 'required' input property does not assert this if value is provided at runtime.
15+
- name: Validate input
16+
shell: bash
17+
run: |
18+
if [ -z "${{ inputs.cdk-version }}" ]; then
19+
echo "CDK version must be provided"
20+
exit 1;
21+
fi
22+
if [ -z "${{ inputs.node-version }}" ]; then
23+
echo "Node version must be provided"
24+
exit 1;
25+
fi
1026
# restore node_modules from cache
1127
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # version 4.0.2
1228
id: npm-cache
1329
with:
1430
path: |
1531
node_modules
1632
packages/**/node_modules
17-
key: ${{ runner.os }}-${{ hashFiles('package-lock.json') }}-node${{ inputs.node-version }}
33+
key: ${{ runner.os }}-${{ hashFiles('package-lock.json') }}-node${{ inputs.node-version }}-cdk${{ inputs.cdk-version }}
1834
fail-on-cache-miss: true

0 commit comments

Comments
 (0)