-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(storage): set allowedByApp to listCallerAccessGrants (#13934)
- Loading branch information
1 parent
5145064
commit 05ef3d8
Showing
10 changed files
with
140 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,32 @@ | ||
This project is used to rollup the TS types from the AWS SDK into the custom AWS clients. You can regenerate them | ||
by running the `build` script in this project, and commit the generated file changes. | ||
## What is this package? | ||
|
||
To update the generated types files, you need to: | ||
Amplify JS uses custom AWS API clients in limited scope. These API handlers' types are compatible with those of | ||
AWS SDK, and trimmed to the parameters used by the Amplify library. | ||
|
||
1. Update existing `*.d.ts` files in this folder or add new ones. | ||
1. If new `*.d.ts` file is added, update the `dts-bundler.config.js` with additional entries. | ||
This package is used to rollup the TS types from the AWS SDK into the custom AWS clients. You can regenerate them | ||
by running the `build` script in this project, then review & commit the generated file changes. | ||
|
||
## How to update the custom AWS clients types? | ||
|
||
Since custom AWS clients are used in limited scope, in most cases you don't need to add any new services. Instead, you | ||
may need to update the SDK versions or exporting additional types. Here's the steps: | ||
|
||
1. Make sure the `package.json` dev dependencies entry contains the AWS SDK service client you are working with and | ||
more importantly the version is upgraded to that supports the feature you are working with. | ||
1. Open the `*.d.ts` file for the AWS client you need to upgrade, and make sure the interfaces you need are exported. | ||
1. Open the `dts-bundler.config.js` file and make sure the entry to the `*.d.ts` file you are working with exists and | ||
the `outFile` path is expected. | ||
* You need to update the `libraries.inlinedLibraries` to include the AWS SDK service client package to bundle | ||
the TS interfaces there. | ||
1. Run the generating script `yarn && yarn build`. The generated files will be shown in the console. | ||
1. Inspect generated files and make sure headers are not changed. | ||
1. Commit the changes | ||
* If you only want to work with a single AWS service instead of changing all the definitions for all the services, | ||
you can comment out other service entries from the `dts-bundler.config.js`. | ||
1. Inspect the bundled TypeScript definition file in the `outFile` path. To better compare the diffs, you need to | ||
re-format the generated code. | ||
* You need to make sure any license headers and previous notes are not changed. | ||
* The bundled TypeScript definition file may import more types transitive dependencies of AWS SDK package. In this | ||
case you may need to tweak the `libraries.inlinedLibraries` config until all the necessary dependency types are | ||
bundled. | ||
* You need to make sure the imported packages of the bundle file(e.g. `@aws-sdk/types`) are also added to the | ||
Amplify library's **runtime dependency**. | ||
* You **must** make sure the documented manual changes are re-applied to the newly generated bundle file. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.