Skip to content
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

Sandbox hooks #298

Closed
wants to merge 100 commits into from
Closed

Sandbox hooks #298

wants to merge 100 commits into from

Conversation

sdstolworthy
Copy link
Contributor

Issue #, if available:

Description of changes:

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

sdstolworthy and others added 23 commits September 21, 2023 21:08
* feat: sandbox options add format

* test: add format to available options

* fix: sandbox command option format

* add changeset

* chore: update API.md

* refactor: move get_config_path to client-config

* chore: type and lint

* chore: update API.md

* chore: import formatChoices to sandbox

* chore: change template literal

* chore: update types, use Enum

* chore: update types for FormatOption

* chore: fix type

* chore: move getConfigPath to internal api

* chore: rename getClientConfigPath

* chore: rename FormatChoice

* chore: update API.md

* chore: add index.js to internal.ts

* chore: remove configFileName and formatChoices from API

* fix: test

* sandbox: initial implementation of deployment hooks

* sandbox: simplify hook registration example

* lint: fix lints

* refactor: use events instead of hooks

* api: update api description files

* logging: added debug logging

* tests: fix broken test

* sandbox: base event handler on node:events EventEmitter

* tests: fix broken test

* chore: move getConfigPath from GenerateConfigCommand to generateClientConfigToFile

* Update packages/client-config/src/paths/get_client_config_path.ts

Co-authored-by: Kamil Sobol <[email protected]>

* chore: rename FormatChoice to ClientConfigFormat

* refactor: generateClientConfigToFile to accept out and format

* test: update tests for generate config and sandbox

* Update packages/cli/src/commands/sandbox/sandbox_command.ts

Co-authored-by: Edward Foyle <[email protected]>

* test: misc var change

* chore: move ClientConfigFormat to public API

* chore: update API.md

* test: add test for getClientConfigPath

* test: use path.join to resolve windows slash

* test: use path.join to resolve windows slash

* chore: fix linting error

* chore: fix linting error

* chore: remove defaultOptions

* test: add asserts for both out and format

* test: add absolut path test

* fix: throw error if provided file path

* fix: broken test

* fix: integrate format into event callback

* api: update api description files

* fix: address pr comments

* chore: rename --out to --outDir

* fix: use lstatSync to detect file path

* chore: update API.md

* chore: changeset

* chore: remove un-used var

* fix: package-lock resolve registry

* chore: ignore spell of lstat

* chore: refactor mock-fs with node:mock

* chore: remove un-used var

* chore: make getClientConfigPath async

* fix: path for windows

* chore: remove auto-generated changelogs

* fix: remove references to deleted events

* api: update api description files

* refactor: rename event, move generate-config-adapter

* refactor: remove sandbox config adapter

* refactor: use args.out directly for config write path

* refactor: use exported getClientConfigPath from client-config package

* refactor: use mocks for test

* fix: explicitly export getClientConfigPath

* Update packages/sandbox/src/file_watching_sandbox.ts

Co-authored-by: Kamil Sobol <[email protected]>

* fix: remove unused import

* Update packages/cli/src/commands/sandbox/sandbox_command.ts

Co-authored-by: Amplifiyer <[email protected]>

* refactor: extract getBackendIdentifier

* test: add test to validate that successfulDeployment event is emitted

* test: refactor to allow asserting that a specific callback was registered

* fix: remove unused import

* refactor: creator method for registering sandbox events

* fix: remove unused import

* fix: fix naming, refactor for readability

---------

Co-authored-by: MJ☔ <[email protected]>
Co-authored-by: MJ Zhang <[email protected]>
Co-authored-by: Kamil Sobol <[email protected]>
Co-authored-by: Edward Foyle <[email protected]>
Co-authored-by: Amplifiyer <[email protected]>
@changeset-bot
Copy link

changeset-bot bot commented Sep 27, 2023

🦋 Changeset detected

Latest commit: f0b70c3

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@aws-amplify/sandbox Minor
@aws-amplify/backend-cli Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@sdstolworthy sdstolworthy added the run-e2e Label that will include e2e tests in PR checks workflow label Sep 27, 2023
@sobolk sobolk deleted the sandbox-hooks branch December 2, 2024 19:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
run-e2e Label that will include e2e tests in PR checks workflow
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants