-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: init multi-bucket support * refactor: BackendOutput type * update package-lock * temp * feat: update schema and client_config * feat: increment schema and client_config versions to 1.1 * rename to buckets and remove friendlyName * chore: add changeset * chore: update API.md * fix: remove duplicated code * fix: construct test * feat: validate isDefault * chore: remove as any * test: fix client_config_contributor * chore: update package-lock * fix: getOutput * refactor: backend_output_client * refactor: DefaultBackendOutputClient * revert changes on addBackendOutputEntry, use appendToBackendOutputList * update JSdocs for construct * make storageOutput more specific * add factoryCounter and hasDefault * use factoryCounter as postfix * update changeset * fix: buckets output schema * feat: add name to buckets * feat: throw no isdefault error before deploy * chore: remove post-deploy error * refactor: use factoryCounter for policy * refactor: pass buckets to appendToBackendOutputList * remove StorageOutputPayloadToStore * fix construct test * revert BackendOutput type * chore: update changeset * fix: client_config_contributer_v1 and test * fix: pin api-extractor to 7.40.0 * chore: update API.md * refactor: use global factoryCounter for policy * refactor: use addBackendOutputEntry for default * test: fix storage construct test * this works * move DeepPartial * remove StorageBucketsPayload * refactor: use Aspects to validate storage * fix: add buckets to metadata * fix: factory unit test * fix: metadata_output_storage_strategy unit test * fix: not export AmplifyStorage * refactor: addOrUpdateMetadata * update package-lock * update package-lock * Update packages/backend-storage/src/factory.ts Co-authored-by: Amplifiyer <[email protected]> * Update packages/backend-storage/src/factory.ts Co-authored-by: Amplifiyer <[email protected]> * refactor: remove redundant code in StorageClientConfigContributor * test: add unit tests for construct and factory * fix: one bucket no default case * fix: unit test * test log currentCodebaseOutputs and npmOutputs * fix: convert bucketName, storageRegion into bucket_name, aws_region * fix: client_config_contributor_v1.test * refactor: use Aspect to replact factory static * fix: buckets keys * fix: unit test * fix MultipleDefaultBucketError and add more unit tests * remove policyCount static * Update packages/backend-storage/src/factory.ts Co-authored-by: Amplifiyer <[email protected]> * refactor StorageValidator * Refactor: storeOutput to factory * remove comment * Update packages/backend-storage/src/factory.ts Co-authored-by: Kamil Sobol <[email protected]> * Update packages/backend-storage/src/factory.ts Co-authored-by: Kamil Sobol <[email protected]> * Update packages/backend-storage/src/factory.ts Co-authored-by: Kamil Sobol <[email protected]> * Update packages/backend-storage/src/construct.ts Co-authored-by: Kamil Sobol <[email protected]> * Revert "test log currentCodebaseOutputs and npmOutputs" This reverts commit 4ce8db5. * rename defaultStorageFound * remove firstStorage from getInstance * rename buckets to storage, and fix unit tests * use isStorageProcessed * fix construct test * fix StackMetadataBackendOutputStorageStrategy unit test * fix a typo to make lint happy * Update packages/backend-storage/src/factory.ts Co-authored-by: Amplifiyer <[email protected]> * Update packages/client-config/src/client-config-contributor/client_config_contributor_v1.ts Co-authored-by: Edward Foyle <[email protected]> * fix type error in client_config_contributer_v1 * refactor: use early return * test: fix test name * refactor: move Aspects to another file * refactor: remove this.node * Update packages/backend-storage/src/storage_outputs_aspect.ts Co-authored-by: Amplifiyer <[email protected]> * add isMatch to match outputs * add unit test for aspects --------- Co-authored-by: Kamil Sobol <[email protected]> Co-authored-by: Amplifiyer <[email protected]> Co-authored-by: Kamil Sobol <[email protected]> Co-authored-by: Edward Foyle <[email protected]>
- Loading branch information
1 parent
36feb29
commit d8b43d2
Showing
29 changed files
with
695 additions
and
181 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
'@aws-amplify/deployed-backend-client': minor | ||
'@aws-amplify/backend-output-schemas': minor | ||
'@aws-amplify/backend-output-storage': minor | ||
'@aws-amplify/backend-storage': minor | ||
'@aws-amplify/client-config': minor | ||
'@aws-amplify/plugin-types': minor | ||
'@aws-amplify/backend': minor | ||
--- | ||
|
||
support adding more than one bucket |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,9 +1,16 @@ | ||
import { z } from 'zod'; | ||
|
||
const bucketSchema = z.object({ | ||
name: z.string(), | ||
bucketName: z.string(), | ||
storageRegion: z.string(), | ||
}); | ||
|
||
export const storageOutputSchema = z.object({ | ||
version: z.literal('1'), | ||
payload: z.object({ | ||
bucketName: z.string(), | ||
storageRegion: z.string(), | ||
buckets: z.string(z.array(bucketSchema)).optional(), // JSON serialized array of bucketSchema | ||
}), | ||
}); |
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
Oops, something went wrong.