Implement project specific undeploy command #98
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The solution implements a project-specific undeployment mechanism that:
Implementation Details
1. Improved Structure for Deployment Information
When
ops ide deploy
is executed, the system now saves information about deployed packages and actions in a file with an improved structure:.ops/deployment.json
in the project rootpackages
: An array of package names that have been deployedpackageActions
: An object that maps each package to an array of its actionsExample:
Sidenote 1: could be useful to automatically add the
.ops
dir to the .gitignore file when creating a project?Sidenote 2: should we make this retro compatible for projects prior to this fix?
2. Project-Specific Undeployment
When
ops ide undeploy
is executed without arguments:.ops/deployment.json
3. Single Action Undeployment
When
ops ide undeploy contact/index
is executed:.ops/deployment.json
file to remove the action from the listreferences apache/openserverless#117