From d24ea482f1ba9a06dac7c23156443927acef56c6 Mon Sep 17 00:00:00 2001 From: Alexander Harris Date: Fri, 22 Apr 2022 16:25:49 -0700 Subject: [PATCH] chore: update documentation to point to our repo --- CONTRIBUTING.md | 69 ++++++--- LICENSE | 366 ++++++++++++++++++++++++------------------------ Readme.md | 66 +++------ 3 files changed, 251 insertions(+), 250 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 1b98cd8a6d..c234da314c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,4 +1,4 @@ -# Contributing to Amplify CLI +# Contributing to Amplify API Category Thank you for your interest in contributing to our project! 💛 @@ -25,7 +25,7 @@ Whether it's a bug report, new feature, correction, or additional documentation, Our work is done directly on Github and PR's are sent to the github repo by core team members and contributors. Everyone undergoes the same review process to get their changes into the repo. -This section should get you running with **Amplify CLI** and get you familiar with the basics of the codebase. +This section should get you running with **Amplify API Category** and get you familiar with the basics of the codebase. ### Local Environment Setup @@ -37,23 +37,23 @@ This section should get you running with **Amplify CLI** and get you familiar wi > If you are using Yarn v2, run `yarn set version classic` to change to Yarn Classic. -1. Start by [forking](https://docs.github.com/en/github/getting-started-with-github/fork-a-repo) the _master_ branch of [amplify-cli](https://github.com/aws-amplify/amplify-cli). Then clone it to your machine to work with it locally using one of the following methods: +1. Start by [forking](https://docs.github.com/en/github/getting-started-with-github/fork-a-repo) the _main_ branch of [amplify-category-api](https://github.com/aws-amplify/amplify-category-api). Then clone it to your machine to work with it locally using one of the following methods: ```sh # HTTPS - git clone https://github.com/[username]/amplify-cli.git + git clone https://github.com/[username]/amplify-category-api.git # SSH - git clone git@github.com:[username]/amplify-cli.git + git clone git@github.com:[username]/amplify-category-api.git # GitHub CLI - gh repo clone [username]/amplify-cli + gh repo clone [username]/amplify-category-api ``` 1. Move into your project folder: ```sh - cd amplify-cli + cd amplify-category-api ``` 1. Then, you can run the `setup-dev` script, which installs dependencies and performs initial configuration: @@ -66,13 +66,13 @@ This section should get you running with **Amplify CLI** and get you familiar wi yarn setup-dev-win ``` -> NOTE: Make sure to always [sync your fork](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/syncing-a-fork) with _master_ branch of amplify-cli +> NOTE: Make sure to always [sync your fork](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/syncing-a-fork) with _main_ branch of amplify-category-api ### Architecture of the codebase -Amplify CLI is a monorepo built with [Yarn Workspaces](https://yarnpkg.com/features/workspaces) and [Lerna](https://github.com/lerna/lerna). All the categories of Amplify live within the `packages/` directory in the root. Each category inside packages has its own `src/` and `package.json`. +Amplify API Category is a monorepo built with [Yarn Workspaces](https://yarnpkg.com/features/workspaces) and [Lerna](https://github.com/lerna/lerna). All the categories of Amplify live within the `packages/` directory in the root. Each category inside packages has its own `src/` and `package.json`. -[**Packages inside Amplify CLI Monorepo**](https://github.com/aws-amplify/amplify-cli/tree/master/packages) +[**Packages inside Amplify API Monorepo**](https://github.com/aws-amplify/amplify-category-api/tree/main/packages) ### Steps towards contributions @@ -85,6 +85,7 @@ Amplify CLI is a monorepo built with [Yarn Workspaces](https://yarnpkg.com/featu - Submit a PR #### What's with all the lint errors? + For a long time, the codebase had relatively lax lint checking. We have now added more strict rules but decided that it wasn't feasible to update all the code to adhere to the new rules at once. Instead we have opted for an iterative approach where lint errors are fixed as files are touched. If you are the first person to touch a file since the rules have been inforced we ask that you try your best to address @@ -100,7 +101,7 @@ Pull requests are welcome! You should open an issue to discuss your pull request, unless it's a trivial change. It's best to ensure that your proposed change would be accepted so that you don't waste your own time. If you would like to implement support for a significant feature that is not yet available, please talk to us beforehand to avoid any duplication of effort. -Pull requests should generally be opened against **_master_**. +Pull requests should generally be opened against **_main_**. Don't include any build files i.e. `dist/` in your PR. These will be built upon publish to npm and when a release is created on GitHub. @@ -114,7 +115,7 @@ Don't include any build files i.e. `dist/` in your PR. These will be built upon 1. Run `yarn lint` to find any linting errors 1. Then, push your branch: `git push origin HEAD` (pushes the current branch to origin remote) 1. Open GitHub to create a PR from your newly published branch. Fill out the PR template and submit a PR. -1. Finally, the Amplify CLI team will review your PR. Add reviewers based on the core member who is tracking the issue with you or code owners. _In the meantime, address any automated check that fail (such as linting, unit tests, etc. in CI)_ +1. Finally, the Amplify Data team will review your PR. Add reviewers based on the core member who is tracking the issue with you or code owners. _In the meantime, address any automated check that fail (such as linting, unit tests, etc. in CI)_ ## Bug Reports @@ -127,26 +128,24 @@ When filing a bug, please try to be as detailed as possible. In addition to the - Any modifications you've made relevant to the bug - Anything unusual about your environment or deployment - Guidelines for bug reports: -- Check to see if a [duplicate or closed issue](https://github.com/aws-amplify/amplify-cli/issues?q=is%3Aissue+) already exists! +- Check to see if a [duplicate or closed issue](https://github.com/aws-amplify/amplify-category-api/issues?q=is%3Aissue+) already exists! - Provide a short and descriptive issue title - Remove any sensitive data from your examples or snippets - Format any code snippets using [Markdown](https://docs.github.com/en/github/writing-on-github/creating-and-highlighting-code-blocks) syntax - If you're not using the latest version of the CLI, see if the issue still persists after upgrading - this helps to isolate regressions! - Finally, thank you for taking the time to read this, and taking the time to write a good bug report. - ## Commits Commit messages should follow the [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/#summary) specification. For example: -`git commit -m 'docs(cli): correct spelling of CHANGELOG'` +`git commit -m 'docs(api): correct spelling of CHANGELOG'` Valid commit types are as follows: + - `build` - `chore` - `ci` @@ -157,6 +156,29 @@ Valid commit types are as follows: - `refactor` - `style` - `test` + +However, we recommend running the monorepo's commit script (`yarn commit` or `npm run commit`) which provides an interactive way to write well formed commit messages: + +```sh +yarn commit +``` + +It helps in constructing a more comprehensive commit message with proper message title, body and footers to describe bug fix or feature implementation, to indicate BREAKING CHANGE, or to reference github issues. It will run through a series of question shown below: + +``` +? Select the type of change that you're committing: +? What is the scope of this change (e.g. component or file name)? +? Write a short, imperative tense description of the change: +? Provide a longer description of the change: (press enter to skip) +? Are there any breaking changes? Y/N +? Does this change affect any open issues? Y/N +? Add issue references (e.g. "fix #123", "re #123".): +``` + +While making a commit, for the question `What is the scope of this change`, enter the name of the package that received the major codebase changes. + +If the git commit directly addressed certain github issues, add the issue references after the `Add issue references` prompt. However, it is NOT required to search through all the github issues to find the ones that might be relevant and reference them in your commit. + ### Git Hooks You will notice the extra actions carried out when you run the `git commit` or `git push` commands on this monorepo, that's because the following git hooks are configured using [husky](https://github.com/typicode/husky/tree/master) (you can see them in the root [package.json](https://github.com/aws-amplify/amplify-cli/blob/f2ac2b27b6b0dbf0c52edbc696c35b71f539c944/package.json#L61) file): @@ -175,7 +197,7 @@ You will notice the extra actions carried out when you run the `git commit` or ` #### "commit-msg" hook: -The "commit-msg" hook ensures the commit message follows the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) convention, so that proper [CHANGELOG.md](https://github.com/aws-amplify/amplify-cli/blob/master/packages/amplify-cli/CHANGELOG.md) files and package versions are maintained. +The "commit-msg" hook ensures the commit message follows the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) convention, so that proper [CHANGELOG.md](https://github.com/aws-amplify/amplify-category-api/blob/main/CHANGELOG.md) files and package versions are maintained. #### "pre-commit" hook: @@ -183,7 +205,8 @@ The "pre-commit" hook runs the [verify-commit](https://github.com/aws-amplify/am #### "pre-push" hook: -The "pre-push" hook will build test files and run the `split-e2e-tests` script to ensure the correct configuration file is generated for our CICD workflow. +The "pre-push" hook will build test files and run the `split-e2e-tests` script to ensure the correct configuration file is generated for our CICD workflow. + ## Tests Please ensure that your change still passes unit tests, and ideally integration/UI tests. It's OK if you're still working on tests at the time that you submit, but be prepared to be asked about them. Wherever possible, pull requests should contain tests as appropriate. Bugfixes should contain tests that exercise the corrected behavior (i.e., the test should fail without the bugfix and pass with it), and new features should be accompanied by tests exercising the feature. @@ -218,10 +241,10 @@ Sometimes issues can be solved by doing a clean and fresh build. To start from a git clean -fdx ``` -1. Reset master branch to that of origin/master: +1. Reset main branch to that of origin/main: ```sh - git fetch origin && git checkout --track origin/master -B master + git fetch origin && git checkout --track origin/main -B main ``` 1. Then, run the `setup-dev` script: @@ -240,7 +263,7 @@ Generally, match the style of the surrounding code. Please ensure your changes d ## Finding Contributions -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`](https://github.com/aws-amplify/amplify-cli/labels/help-wanted) or [`good first issue`](https://github.com/aws-amplify/amplify-cli/labels/good%20first%20issue) is a great place to start. +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`](https://github.com/aws-amplify/amplify-category-api/labels/help-wanted) or [`good first issue`](https://github.com/aws-amplify/amplify-category-api/labels/good%20first%20issue) is a great place to start. You could also contribute by reporting bugs, reproduction of bugs with sample code, documentation and test improvements. @@ -259,6 +282,6 @@ If you discover a potential security issue in this project we ask that you notif ## Licensing -AWS Amplify CLI is [Apache 2.0](LICENSE)-licensed. Contributions you submit will be released under that license. +AWS Amplify Category API is [Apache 2.0](LICENSE)-licensed. Contributions you submit will be released under that license. We may ask you to sign a [Contributor License Agreement (CLA)](http://en.wikipedia.org/wiki/Contributor_License_Agreement) for larger changes. diff --git a/LICENSE b/LICENSE index 46f1701944..49e343a2e6 100644 --- a/LICENSE +++ b/LICENSE @@ -2,180 +2,180 @@ Version 2.0, January 2004 http://www.apache.org/licenses/ - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "{}" @@ -186,16 +186,16 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2017 - 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. +Copyright 2017 - 2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/Readme.md b/Readme.md index 32c5cae752..e8be976ac4 100644 --- a/Readme.md +++ b/Readme.md @@ -9,28 +9,28 @@ - - build:started + + build:started

### Reporting Bugs/Feature Requests -[![Open Bugs](https://img.shields.io/github/issues/aws-amplify/amplify-cli/bug?color=d73a4a&label=bugs)](https://github.com/aws-amplify/amplify-cli/issues?q=is%3Aissue+is%3Aopen+label%3Abug) -[![Feature Requests](https://img.shields.io/github/issues/aws-amplify/amplify-cli/feature-request?color=ff9001&label=feature%20requests)](https://github.com/aws-amplify/amplify-cli/issues?q=is%3Aissue+label%3Afeature-request+is%3Aopen) -[![Enhancements](https://img.shields.io/github/issues/aws-amplify/amplify-cli/enhancement?color=4287f5&label=enhancement)](https://github.com/aws-amplify/amplify-cli/issues?q=is%3Aissue+is%3Aopen+label%3Aenhancement) -[![Closed Issues](https://img.shields.io/github/issues-closed/aws-amplify/amplify-cli?color=%2325CC00&label=issues%20closed)](https://github.com/aws-amplify/amplify-cli/issues?q=is%3Aissue+is%3Aclosed+) +[![Open Bugs](https://img.shields.io/github/issues/aws-amplify/amplify-category-api/bug?color=d73a4a&label=bugs)](https://github.com/aws-amplify/amplify-category-api/issues?q=is%3Aissue+is%3Aopen+label%3Abug) +[![Feature Requests](https://img.shields.io/github/issues/aws-amplify/amplify-category-api/feature-request?color=ff9001&label=feature%20requests)](https://github.com/aws-amplify/amplify-category-api/issues?q=is%3Aissue+label%3Afeature-request+is%3Aopen) +[![Enhancements](https://img.shields.io/github/issues/aws-amplify/amplify-category-api/enhancement?color=4287f5&label=enhancement)](https://github.com/aws-amplify/amplify-category-api/issues?q=is%3Aissue+is%3Aopen+label%3Aenhancement) +[![Closed Issues](https://img.shields.io/github/issues-closed/aws-amplify/amplify-category-api?color=%2325CC00&label=issues%20closed)](https://github.com/aws-amplify/amplify-category-api/issues?q=is%3Aissue+is%3Aclosed+) -# AWS Amplify CLI +# AWS Amplify API Category The AWS Amplify CLI is a toolchain which includes a robust feature set for simplifying mobile and web application development. The CLI uses AWS CloudFormation and nested stacks to allow you to add or modify configurations locally before you push them for execution in your account. - [Install the CLI](#install-the-cli) -- [Commands Summary](#commands-summary) - [Tutorials](#tutorials) - [Contributing](#contributing) -- [Start building your app](https://aws-amplify.github.io/docs) -- [Changelog](https://github.com/aws-amplify/amplify-cli/releases/latest) +- [Changelog](https://github.com/aws-amplify/amplify-category-api/releases/latest) + +This repo manages the API category within Amplify CLI. The Category is responsible for managing graphql build and transformation processes, generating resources to deploy into your cloud stack in order to compute and store data for your graphql and REST endpoints, and providing inputs to codegen processes for use later in your end application. ## Install the CLI @@ -50,49 +50,27 @@ $ sudo npm install -g @aws-amplify/cli --unsafe-perm=true $ amplify configure ``` -## Commands Summary - -The Amplify CLI supports the commands shown in the following table. - -| Command | Description | -| ---------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| amplify configure | Configures the AWS access credentials, AWS Region and sets up a new AWS User Profile | -| amplify init | Initializes a new project, sets up deployment resources in the cloud and prepares your project for Amplify. | -| amplify configure project | Updates configuration settings used to setup the project during the init step. | -| amplify add `` | Adds cloud features to your app. | -| amplify update `` | Updates existing cloud features in your app. | -| amplify push [--no-gql-override] | Provisions cloud resources with the latest local developments. The 'no-gql-override' flag does not automatically compile your annotated GraphQL schema and will override your local AppSync resolvers and templates. | -| amplify pull | Fetch upstream backend environment definition changes from the cloud and updates the local environment to match that definition. | -| amplify publish | Runs `amplify push`, publishes a static assets to Amazon S3 and Amazon CloudFront (\*hosting category is required). | -| amplify status [ ``...] | Displays the state of local resources that haven't been pushed to the cloud (Create/Update/Delete). | -| amplify status -v [ ``...] | Verbose mode - Shows the detailed verbose diff between local and deployed resources, including cloudformation-diff | -| amplify serve | Runs `amplify push`, and then executes the project's start command to test run the client-side application. | -| amplify delete | Deletes resources tied to the project. | -| amplify help \| amplify `` help | Displays help for the core CLI. | -| amplify codegen add \| generate | Performs generation of strongly typed objects using a GraphQL schema. | -| amplify env add \| list \| remove \| get \| pull \| import \| checkout | See the [multienv docs](https://docs.amplify.aws/cli/teams/overview). | - ### Category specific commands: -- [auth (Amazon Cognito)](packages/amplify-category-auth/Readme.md) -- [storage (Amazon S3 & Amazon DynamoDB)](packages/amplify-category-storage/Readme.md) -- [function (AWS Lambda)](packages/amplify-category-function/Readme.md) -- [api (AWS AppSync & Amazon API Gateway)](packages/amplify-category-api/Readme.md) -- [analytics (Amazon Pinpoint)](packages/amplify-category-analytics/Readme.md) -- [hosting (Amazon S3 and Amazon CloudFront distribution)](packages/amplify-category-hosting/Readme.md) -- [notifications (Amazon Pinpoint)](packages/amplify-category-notifications/Readme.md) -- [interactions (Amazon Lex)](packages/amplify-category-interactions/Readme.md) -- [predictions (Amazon Rekognition, Amazon Textract, Amazon Translate, Amazon Polly, Amazon Transcribe, Amazon Comprehend, and Amazon SageMaker)](packages/amplify-category-predictions/Readme.md) +The following table lists the current set of commands supported by the Amplify API Category Plugin. + +| Command | Description | +| ---------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | +| amplify api add | Takes you through steps in the CLI to add an API resource to your backend. | +| amplify api add-graphql-datasource | Takes you through the steps in the CLI to import an already existing Aurora Serverless data source to an existing GraphQL API resource. | +| amplify api update | Takes you through steps in the CLI to update an API resource. | +| amplify api gql-compile | Compiles your GraphQL schema and generates a corresponding cloudformation template. | +| amplify api push | Provisions only API cloud resources with the latest local developments. | +| amplify api remove | Removes an API resource from your local backend. The resource is removed from the cloud on the next push command. | ## Tutorials - [Getting Started guide](https://docs.amplify.aws/start) - [GraphQL transform tutorial](https://docs.amplify.aws/cli/graphql-transformer/overview) -- [Native development with Amplify CLI and AWS AppSync](https://docs.amplify.aws/cli/graphql-transformer/codegen) ## Developing -To set up your local development environment, go to [Local Environment Setup](https://github.com/aws-amplify/amplify-cli/blob/master/CONTRIBUTING.md#local-environment-setup). +To set up your local development environment, go to [Local Environment Setup](https://github.com/aws-amplify/amplify-category-api/blob/main/CONTRIBUTING.md#local-environment-setup). To test your category, do the following: @@ -110,4 +88,4 @@ Before pushing code or sending a pull request, do the following: ## Contributing -We are thankful for any contributions from the community. Look at our [Contribution Guidelines](https://github.com/aws-amplify/amplify-cli/blob/master/CONTRIBUTING.md). +We are thankful for any contributions from the community. Look at our [Contribution Guidelines](https://github.com/aws-amplify/amplify-category-api/blob/main/CONTRIBUTING.md).