feat(pgpm): improve export command UX with smart defaults #501
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.
feat(pgpm): improve export command UX with smart defaults
Summary
This PR improves the UX of the
pgpm exportcommand by:databasesanddatabase_idsprompts now uselisttype instead ofcheckbox, since only one selection was actually being useddatabase_idsinstead of just the selected onemetaExtensionNamenow defaults to{databaseName}-serviceinstead of justsvcanswersobject toinitModulewithmoduleName,moduleDesc, andaccessto skip redundant prompts during export{name} database schema for {databaseName}, meta package gets{metaExtensionName} service utilities for managing domains, APIs, and servicesUpdates since last revision
accessfrom'public'to'restricted'per feedbackpackageIdentifierfrom answers (no longer required per feedback)Review & Testing Checklist for Human
selectedDatabase!.id) - ifdbsResult.rows.find()returns undefined, this will throw. Consider whether error handling is needed.access: 'restricted'is the desired default - This was changed from'public'per feedback; verify this is correct for exported packages.pgpm exportin a workspace with a database to verify:access: restrictedanswersfield names match boilerplate template - The fieldsmoduleName,moduleDesc,accessshould match what the module boilerplate template expectsNotes