Skip to content

fix: e2e tests #763

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

Closed
wants to merge 109 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
109 commits
Select commit Hold shift + click to select a range
a0480cb
build(deps): bump react-devtools-core in /examples/simple_react (#558)
dependabot[bot] Nov 13, 2023
23b369d
Add amplify comment when writing to .gitignore (#632)
rtpascual Nov 13, 2023
c109576
build(deps): bump axios, aws-amplify and @aws-amplify/api in /example…
dependabot[bot] Nov 13, 2023
1c602f6
test: fix create amplify installation in canary tests (#635)
sobolk Nov 13, 2023
07b0dfc
feat: add zero-config auth to amplifyconfiguration.json (#624)
bombguy Nov 13, 2023
dca1d4d
chore: ping postcss version for dependabot (#640)
0618 Nov 13, 2023
01ebbc4
feat: generate mobile friendly config (#641)
sobolk Nov 14, 2023
bd8b5d1
update data/resource template; bump data-schema versions (#645)
iartemiev Nov 14, 2023
07b741d
change backend.getStack to backend.createStack (#646)
edwardfoyle Nov 14, 2023
65fe3a8
remove unused type (#644)
edwardfoyle Nov 14, 2023
cd5feee
fix: Expand auth types (#638)
awsluja Nov 14, 2023
3a472c4
Version Packages (#633)
github-actions[bot] Nov 14, 2023
869a849
Update profile error messages (#647)
hoangnbn Nov 15, 2023
fc71c49
feat(formgen): change output directory of model documents in formgen …
sdstolworthy Nov 15, 2023
3cda50c
chore: bump to latest data cdk construct, and explicitly set deploy s…
alharris-at Nov 15, 2023
79ac139
fix: sandbox client config options (#643)
rtpascual Nov 15, 2023
9bc3c47
Version Packages (#651)
github-actions[bot] Nov 15, 2023
85bbab4
fix: use correct logical id for identity pool (#658)
alharris-at Nov 15, 2023
7641877
test: restrict live canary run time (#659)
sobolk Nov 15, 2023
688db7b
feat: flip to use AmplifyTable deploy strategy for data (#654)
alharris-at Nov 15, 2023
70685f3
feat: Add usage data metrics for sandbox (#642)
Amplifiyer Nov 16, 2023
5cc2522
use latest aws-amplify in project_creator (#661)
iartemiev Nov 16, 2023
50934da
fix: add required fields to mobile config (#670)
sobolk Nov 16, 2023
725eb84
Version Packages (#660)
github-actions[bot] Nov 16, 2023
0a69096
fix: dependabot alert for postcss (#666)
0618 Nov 16, 2023
730afd8
fix: handling !pattern in gitignore to avoid excluding everything fro…
Amplifiyer Nov 16, 2023
dce8a0e
Feat: Use sandbox id by default for generation commands (#669)
sdstolworthy Nov 16, 2023
0029543
Respect idiomatic tsconfig setup when type checking amplify directory…
edwardfoyle Nov 16, 2023
ad4ff92
fix: Force colors to not be stripped off when piping child process st…
Amplifiyer Nov 16, 2023
385776a
chore: delete examples (#676)
0618 Nov 16, 2023
cb855df
chore: refactor packageJsonReader and generate installationIds from h…
Amplifiyer Nov 16, 2023
48c2580
fix: Auth assume role action (#679)
awsluja Nov 16, 2023
0af242d
chore: bump data construct to support sandbox/pipeline/cdk attributio…
alharris-at Nov 17, 2023
d81af85
fix: `--version` for amplify and disable subcommands version (#664)
0618 Nov 17, 2023
4fee488
chore: avoid crashing sandbox on failing to retrieve metadata (#681)
Amplifiyer Nov 17, 2023
b999768
Version Packages (#672)
github-actions[bot] Nov 17, 2023
f1717d9
fix: remove id input validations in order to fall back to stack id (#…
sdstolworthy Nov 17, 2023
fe2d96f
test: run e2e tests in parallel (#674)
sobolk Nov 17, 2023
cc8b66c
fix(form-generator): update form renderer to render amplify js v6 cod…
letsbelopez Nov 17, 2023
8495fd1
test: fix cache and package lock (#688)
sobolk Nov 17, 2023
c47e03e
feat: add missing fields for mobile config (#689)
sobolk Nov 17, 2023
ef3f5eb
Change account setup URL (#692)
hoangnbn Nov 17, 2023
e15afec
add comments, link to docs in defineAuth template (#619)
josefaidt Nov 17, 2023
e39562b
move to ubuntu 4 core (#696)
sobolk Nov 17, 2023
c28d536
Version Packages (#686)
github-actions[bot] Nov 17, 2023
f449188
fix(@aws-amplify/backend-data) - Align authorization modes with the a…
stocaaro Nov 17, 2023
14274f4
Version Packages (#700)
github-actions[bot] Nov 17, 2023
a2ed0ae
fix: update tests for new validation (#701)
alharris-at Nov 18, 2023
748dc53
add @aws-amplify/backend-cli to envinfo command (#705)
josefaidt Nov 20, 2023
aa9045e
add npx to "get started" command in create-amplify (#707)
josefaidt Nov 20, 2023
3c8dbde
Update CODEOWNERS, include srquinn21 (#710)
Amplifiyer Nov 20, 2023
8258926
Fix creating android model files that have path embedded in it (#711)
Amplifiyer Nov 20, 2023
d010539
fix: turn off type checking if amplify/tsconfig.json is not found (#706)
Amplifiyer Nov 20, 2023
85e6191
feat: usage data consent (#685)
bombguy Nov 20, 2023
733518a
test: add e2e testing for config generation (#682)
rtpascual Nov 20, 2023
aabe5dd
Bump to minor version for usage data consent (#713)
Amplifiyer Nov 20, 2023
7822cee
fix: hide tsc --showConfig output since its used for validation only …
Amplifiyer Nov 20, 2023
590662a
Change secret name argument to kebab-case (#699)
hoangnbn Nov 20, 2023
5f336ff
fix: close file handle warning (#715)
bombguy Nov 20, 2023
840e9b9
Version Packages (#702)
github-actions[bot] Nov 20, 2023
d2a84b2
fix: typedoc version for conflict (#719)
0618 Nov 20, 2023
f081c22
Fix(formgen): exclude timestamps (#725)
sdstolworthy Nov 21, 2023
43d09b6
fix: update package.json metadata (#723)
Amplifiyer Nov 21, 2023
ee7acf7
Changes to README and CONTRIBUTING guides for Amplify Backend (#724)
arundna Nov 21, 2023
096fc62
Version Packages (#726)
github-actions[bot] Nov 21, 2023
d06b5d8
chore: add readme for auth with examples (#703)
awsluja Nov 21, 2023
5ed51cb
Update data schema for e2e hotswappable test as per the new getting s…
Amplifiyer Nov 22, 2023
babe148
Version Packages (#732)
github-actions[bot] Nov 22, 2023
308d172
chore: add friction and comment/test about not changing critical conf…
alharris-at Nov 22, 2023
5aca60c
add secrets docs link, fixes #503 (#727)
josefaidt Nov 22, 2023
7398baa
build: health checks tweaks - remove schedule, run manually, narrow d…
sobolk Nov 27, 2023
b399419
chore: remove empty files (#741)
0618 Nov 27, 2023
6577ebf
chore: change branch to poc/pms-create-amplify
0618 Nov 28, 2023
63e498b
fix: gitIgnore test
0618 Nov 28, 2023
2649b52
Merge branch 'main' into poc/pms-create-amplify
0618 Nov 28, 2023
b12306f
fix: refactor e2e for pms
0618 Nov 28, 2023
0fdb132
chore: update package.lock
0618 Nov 28, 2023
e6fab21
chore: add types for is-ci (#743)
rtpascual Nov 28, 2023
dfe3aab
Merge branch 'main' into poc/pms-create-amplify
0618 Nov 28, 2023
5023934
chore: update package.lock
0618 Nov 29, 2023
12c183b
temp: refactor
0618 Nov 28, 2023
020f87a
temp: run 1 test
0618 Nov 29, 2023
1ca1400
temp: fix npx
0618 Nov 29, 2023
307e613
temp: install packages for yarn
0618 Nov 29, 2023
7d9537b
temp: update initial_project_file_generator
0618 Nov 29, 2023
333d33d
temp: install ts for yarn
0618 Nov 29, 2023
ab0af4e
temp: ignore node_modules and yarn.lock
0618 Nov 29, 2023
43ec0c6
temp: create yarn.lock for yarn stable
0618 Nov 29, 2023
efcbca4
temp: fix yarn-stable init
0618 Nov 29, 2023
cd672ba
require backend identifier in deployer, remove redundant deploymentTy…
sobolk Nov 29, 2023
5fc04ca
temp: fix --help
0618 Nov 29, 2023
db775ad
Refactor error handling, introduce two new AmplifyErrors (#744)
Amplifiyer Nov 29, 2023
2ab3397
fix: assert for gitignore
0618 Nov 29, 2023
c6c39d0
`defineFunction` initial implementation (#742)
edwardfoyle Nov 30, 2023
d2c3baa
fix: filter non-sandbox stacks (#736)
johnpc Nov 30, 2023
7fb3ee5
Changeset push check (#752)
edwardfoyle Nov 30, 2023
d47d773
fix tsconfig resolution (#753)
edwardfoyle Nov 30, 2023
d4e52ba
chore: change yarn stable install
0618 Nov 30, 2023
1c1ca48
Merge branch 'main' into poc/pms-create-amplify
0618 Nov 30, 2023
4a1a848
fix: not install yarn stable globally
0618 Dec 1, 2023
8facb32
Stack cleanup fix (#755)
edwardfoyle Dec 2, 2023
15fa887
add @yarnpkg/sdks base
0618 Dec 2, 2023
d25ba85
yarn stable use node-modules
0618 Dec 3, 2023
068c40b
remove emoji
0618 Dec 3, 2023
6a994f0
remove @yarnpkg/sdks
0618 Dec 3, 2023
430f0a1
yarn stable use node 18.18
0618 Dec 4, 2023
f1eb76a
yarn stable use node 20
0618 Dec 4, 2023
435cba0
chore: change workflow trigger
0618 Dec 4, 2023
96d88d1
Merge branch 'main' into poc/fix-e2e
0618 Dec 4, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 0 additions & 5 deletions .changeset/chilled-parents-march.md

This file was deleted.

11 changes: 11 additions & 0 deletions .changeset/curly-toes-doubt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
'@aws-amplify/integration-tests': patch
'@aws-amplify/backend-deployer': patch
'create-amplify': patch
'@aws-amplify/platform-core': patch
'@aws-amplify/backend-data': patch
'@aws-amplify/sandbox': patch
'@aws-amplify/backend-cli': patch
---

Refactor error handling, introduce two new AmplifyErrors
2 changes: 2 additions & 0 deletions .changeset/eight-bags-walk.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
5 changes: 5 additions & 0 deletions .changeset/few-carpets-search.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@aws-amplify/backend-function': minor
---

Initial implementation of new 'defineFunction' entry point
5 changes: 5 additions & 0 deletions .changeset/few-pillows-pay.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@aws-amplify/backend': patch
---

add link to docs in secrets jsdoc
5 changes: 0 additions & 5 deletions .changeset/giant-meals-itch.md

This file was deleted.

7 changes: 7 additions & 0 deletions .changeset/mighty-bottles-leave.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@aws-amplify/backend-deployer': minor
'@aws-amplify/sandbox': patch
'@aws-amplify/backend-cli': patch
---

require backend identifier in deployer, remove redundant deploymentType parameter
7 changes: 7 additions & 0 deletions .changeset/mighty-rockets-shake.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'create-amplify': patch
'@aws-amplify/plugin-types': minor
'@aws-amplify/backend': minor
---

Expose new `defineFunction` interface
5 changes: 5 additions & 0 deletions .changeset/plenty-maps-doubt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@aws-amplify/backend-data': patch
---

Add messaging and test about not updating provision strategy
2 changes: 2 additions & 0 deletions .changeset/proud-vans-protect.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
5 changes: 5 additions & 0 deletions .changeset/rotten-swans-study.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@aws-amplify/deployed-backend-client': patch
---

filter non-sandbox stacks
5 changes: 0 additions & 5 deletions .changeset/spotty-ravens-glow.md

This file was deleted.

2 changes: 2 additions & 0 deletions .changeset/young-cherries-know.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
9 changes: 9 additions & 0 deletions .eslint_dictionary.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"argv",
"arn",
"arns",
"birthdate",
"bundler",
"cdk",
"changelog",
Expand All @@ -25,6 +26,7 @@
"deployer",
"disambiguator",
"downlevel",
"durations",
"dynamodb",
"ecma",
"enum",
Expand All @@ -43,7 +45,9 @@
"globals",
"grantable",
"graphql",
"homedir",
"hotswap",
"hotswapped",
"iamv2",
"identitypool",
"idps",
Expand All @@ -58,6 +62,7 @@
"localhost",
"lsof",
"lstat",
"macos",
"matchers",
"mfas",
"mkdtemp",
Expand Down Expand Up @@ -90,6 +95,8 @@
"schema",
"schemas",
"searchable",
"semver",
"serializable",
"shopify",
"shortstat",
"sigint",
Expand All @@ -105,6 +112,7 @@
"syncable",
"timestamps",
"tmpdir",
"todos",
"toggleable",
"tokenized",
"totp",
Expand All @@ -124,6 +132,7 @@
"versioned",
"versioning",
"whoami",
"workspace",
"yaml",
"yargs"
]
1 change: 1 addition & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ module.exports = {
ecmaVersion: 'latest',
sourceType: 'module',
project: ['**/tsconfig.json'],
tsconfigRootDir: __dirname,
},
plugins: [
'@typescript-eslint',
Expand Down
9 changes: 3 additions & 6 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
# These owners will be the default owners for everything in
# the repo. Unless a later match takes precedence.
* @edwardfoyle @sobolk @Amplifiyer

# Examples
/examples @edwardfoyle @sobolk @Amplifiyer @swaminator @renebrandel @wrpeck @abdallahshaban557 @josefaidt
* @edwardfoyle @sobolk @Amplifiyer @srquinn21

# API approval - public surface and dependencies.
**/API.md @edwardfoyle @sobolk @Amplifiyer
**/package.json @edwardfoyle @sobolk @Amplifiyer
**/API.md @edwardfoyle @sobolk @Amplifiyer @srquinn21
**/package.json @edwardfoyle @sobolk @Amplifiyer @srquinn21
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ body:
description: |
Please copy and paste output of the following command. This will be automatically formatted into code, so no need for backticks.
```bash
npx envinfo --system --binaries --npmPackages "@aws-amplify/backend,typescript,aws-cdk,aws-cdk-lib,aws-amplify" --showNotFound
npx envinfo --system --binaries --npmPackages "@aws-amplify/backend,@aws-amplify/backend-cli,typescript,aws-cdk,aws-cdk-lib,aws-amplify" --showNotFound
```
render: plain text
validations:
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ body:
description: |
Please copy and paste output of the following command. This will be automatically formatted into code, so no need for backticks.
```bash
npx envinfo --system --binaries --npmPackages "@aws-amplify/backend,typescript,aws-cdk,aws-cdk-lib,aws-amplify" --showNotFound
npx envinfo --system --binaries --npmPackages "@aws-amplify/backend,@aws-amplify/backend-cli,typescript,aws-cdk,aws-cdk-lib,aws-amplify" --showNotFound
```
render: plain text
validations:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/canary_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ jobs:
npm run test
live_dependency_health_checks:
runs-on: ubuntu-latest
timeout-minutes: 15
permissions:
# these permissions are required for the configure-aws-credentials action to get a JWT from GitHub
id-token: write
Expand Down
28 changes: 18 additions & 10 deletions .github/workflows/health_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,16 @@ on:
pull_request:
branches:
- main
schedule:
- cron: '0 12 * * *' # every day 12:00 UTC
workflow_dispatch:

jobs:
install:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
# Windows install must happen on the same worker size as subsequent jobs.
# Larger workers use different drive (C: instead of D:) to check out project and NPM installation
# creates file system links that include drive letter.
os: [ubuntu-latest, macos-latest, amplify-backend_windows-latest_8-core]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # version 3.6.0
Expand All @@ -33,7 +35,7 @@ jobs:
- build
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
os: [ubuntu-latest, macos-latest, amplify-backend_windows-latest_8-core]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # version 3.6.0
Expand All @@ -53,13 +55,14 @@ jobs:
run_e2e: ${{ steps.check.outputs.run_e2e }}
steps:
# if this workflow is running on a push (ie merge to main), then e2e tests always run
# if this workflow is triggered manually, then e2e tests always run
# if the workflow is running on a pull request, we perform an additional check for the run-e2e label
# this is not a security measure (that is already handled by the pull_request event behavior) but rather a way for PR authors to easily check e2e test results if they wish
# the reason it doesn't run all the time is because it will always fail for external contributor PRs (they don't have access to repo secrets) and we don't want to waste resources running e2e on every PR commit
- name: Check event is push or pull request has run-e2e label
- name: Check event is push to main or pull request has run-e2e label
id: check
run: |
if [[ ${{ github.event_name }} == 'push' ]] || gh api /repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }} | jq -r '.labels[].name' | grep run-e2e --quiet; then
if [[ ${{ github.event_name }} == 'push' ]] || [[ ${{ github.event_name }} == 'workflow_dispatch' ]] || gh api /repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }} | jq -r '.labels[].name' | grep run-e2e --quiet; then
echo setting run_e2e to true;
echo "run_e2e=true" >> "$GITHUB_OUTPUT";
else
Expand All @@ -72,9 +75,14 @@ jobs:
# will finish running other test matrices even if one fails
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
os:
[
amplify-backend_ubuntu-latest_4-core,
macos-latest-xl,
amplify-backend_windows-latest_8-core,
]
runs-on: ${{ matrix.os }}
timeout-minutes: 60
timeout-minutes: 25
needs:
- do_include_e2e
- build
Expand Down Expand Up @@ -139,7 +147,7 @@ jobs:
- uses: ./.github/actions/setup_node
- uses: ./.github/actions/restore_build_cache
- run: npm run docs
- if: github.event_name == 'push'
- if: ${{ github.event_name == 'push' && github.ref_name == 'main' }}
uses: peaceiris/actions-gh-pages@373f7f263a76c20808c831209c920827a82a2847 # version 3.9.3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
Expand Down Expand Up @@ -180,7 +188,7 @@ jobs:
- uses: ./.github/actions/restore_install_cache
- run: npm run check:package-versions
update_or_publish_versions:
if: github.event_name == 'push'
if: ${{ github.event_name == 'push' && github.ref_name == 'main' }}
needs:
- build
runs-on: ubuntu-latest
Expand Down
13 changes: 8 additions & 5 deletions .github/workflows/poc-e2e-flow-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ name: 'poc-e2e-flow-test'
on: # TODO: need to change the trigger
push:
branches:
- poc/e2e-create-amplify
- poc/package-manager-support
pull_request:
branches:
- poc/package-manager-support

jobs:
install:
Expand Down Expand Up @@ -37,18 +40,18 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
pkg-manager: [npm, yarn, pnpm]
pkg-manager: [npm, yarn, yarn-stable, pnpm]
node-version: [20]
include:
- os: ubuntu-latest
pkg-manager: yarn-stable
node-version: 19 # TODO: use Node 20 once https://github.com/yarnpkg/berry/pull/5961 is released
node-version: 18.18 # TODO: use Node 20 once https://github.com/yarnpkg/berry/pull/5961 is released
- os: macos-latest
pkg-manager: yarn-stable
node-version: 19 # TODO: use Node 20 once https://github.com/yarnpkg/berry/pull/5961 is released
node-version: 18.18 # TODO: use Node 20 once https://github.com/yarnpkg/berry/pull/5961 is released
- os: windows-latest
pkg-manager: yarn-stable
node-version: 19 # TODO: use Node 20 once https://github.com/yarnpkg/berry/pull/5961 is released
node-version: 18.18 # TODO: use Node 20 once https://github.com/yarnpkg/berry/pull/5961 is released
env:
ACKAGE_MANAGER_EXECUTABLE: ${{ matrix.pkg-manager }} # TODO: remove PACKAGE_MANAGER_EXECUTABLE once CLI is able to getPackageManager().
runs-on: ${{ matrix.os }}
Expand Down
4 changes: 4 additions & 0 deletions .husky/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx changeset status --since main
76 changes: 69 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,79 @@ GitHub provides additional document on [forking a repository](https://help.githu

Looking at the existing issues is a great way to find something to contribute on. As our projects, by default, use the default GitHub issue labels (enhancement/bug/duplicate/help wanted/invalid/question/wontfix), looking at any 'help wanted' issues is a great place to start.

## Code of Conduct
## Contribute to create-amplify package

### Set up your local development environment

```sh
# clone project repo
cd <project directory>
npm run install:local
npm run test
```

This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct).
For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact
[email protected] with any additional questions or comments.
`npm run install:local` will run `npm install`, then build all packages in the project and run `npm link`

## Security issue notifications
`npm run test` will run all the unit tests in the project

If you discover a potential security issue in this project we ask that you notify AWS/Amazon Security via our [vulnerability reporting page](http://aws.amazon.com/security/vulnerability-reporting/). Please do **not** create a public github issue.
You should now be able to run the new `amplify` CLI.

## Contribute to create-amplify package
#### Other helpful scripts

`npm run watch` will start the tsc server and watch for changes in all packages

`npm run test:coverage:threshold` will let you know if your changes are passing test coverage limits

`npm run test:dir packages/<package directory>` will run only the tests in that directory

`npm run vend` will start a local npm proxy and publish the local packages to this proxy so they can be installed / used as if they were published on npm

`npm run e2e` will run the E2E test suite. Note: you must have valid AWS credentials configured locally to run this command successfully.

### Creating changesets

This repo uses [changesets](https://github.com/changesets/changesets) for versioning and releasing changes.

All changes that affect release artifacts must have a corresponding changeset. To create a changeset run `changeset`.
This will start a walkthrough to author the changeset file. This file should be committed to the repo.

### Publishing packages locally

Publishing packages locally allows you to install local package changes as if they were published to NPM. This is useful for testing or demo scenarios.

To set up a local npm proxy and publish the current local state to the proxy, run `npm run vend`.
This will start a local npm proxy using [Verdaccio](https://verdaccio.org/) and run `changeset version` and `changeset publish`.

This will also point your local npm config to the local npm proxy. At this point you can npm install any packages in the repo and it will pull from the local proxy instead of directly from npm.

To stop the local server and reset your npm registry run `npm run stop:npm-proxy`.

To clear the proxy package cache run `npm run clean:npm-proxy`. This will stop the local proxy and remove all packages you have published.

To start the npm proxy without immediately publishing, run `npm run start:npm-proxy`.

To publish a snapshot to an already running npm proxy run `npm run publish:snapshot:local latest`

### Adding a package

This repo uses a monorepo structure managed by npm workspaces. All the packages in the workspace are under `packages/*`

There are package templates for some common scenarios in the `templates` directory.
These templates can be copied to a new package directory using `npm run new -- --template=<template> --name=<new name>`
`--template` specifies which template to use and `--name` specifies the new package name.
Valid templates are the directories in the `templates` directory

If you are adding a new package that does not have a template, consider adding a template for that package type.
You'll probably want to use an existing template as a starting point for the new package.

At a minimum, each package needs:

1. A `package.json` file
2. A `tsconfig.json` file. This file should extend `tsconfig.base.json`
3. An `api-extractor.json` file. This file should extend `api-extractor.base.json`
4. An `update:api` script in the `package.json` file
5. A `typedoc.json` file
6. An `.npmignore` file

### Dev

Expand Down
Loading