refactor(cli): extract shared scaffold logic into scaffold-shared (1/3)#536
Open
moranshe-max wants to merge 1 commit into
Open
refactor(cli): extract shared scaffold logic into scaffold-shared (1/3)#536moranshe-max wants to merge 1 commit into
moranshe-max wants to merge 1 commit into
Conversation
Contributor
🚀 Package Preview Available!Install this PR's preview build with npm: npm i @base44-preview/[email protected]Prefer not to change any import paths? Install using npm alias so your code still imports npm i "base44@npm:@base44-preview/[email protected]"Or add it to your {
"dependencies": {
"base44": "npm:@base44-preview/[email protected]"
}
}
Preview published to npm registry — try new features instantly! |
This was referenced Jun 9, 2026
kfirstri
reviewed
Jun 10, 2026
kfirstri
reviewed
Jun 10, 2026
kfirstri
reviewed
Jun 10, 2026
kfirstri
reviewed
Jun 10, 2026
kfirstri
requested changes
Jun 10, 2026
kfirstri
left a comment
Collaborator
There was a problem hiding this comment.
Looks good, Small changes :)
d77abe1 to
64d9bd8
Compare
Move create's post-scaffold steps (push entities, deploy site, install AI skills, print the project/dashboard/site summary) plus getTemplateById and DEFAULT_TEMPLATE_ID into a new scaffold-shared.ts, so they can be reused by sibling commands. Pure refactor — no behavior change. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
64d9bd8 to
d26c239
Compare
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Note
Description
Extracts the shared post-scaffold setup logic (entity push, site deploy, AI agent skills install, and project summary printing) out of the
createcommand into a newscaffold-shared.tsmodule. This decouples the reusable setup flow from thecreate.tscommand wiring so it can be shared by other scaffolding commands, with no change to user-facing behavior.Related Issue
None
Type of Change
Changes Made
packages/cli/src/cli/commands/project/scaffold-shared.tsexposingDEFAULT_TEMPLATE_ID,getTemplateById(),completeProjectSetup(), andprintProjectSummary().create.tsintocompleteProjectSetup().printProjectSummary().create.tsto import these shared helpers; removed now-unused imports (execa,confirm,isCancel,getDashboardUrl,deploySite,pushEntities,readProjectConfig,join).ctxparameter increateInteractive/createNonInteractive/executeCreatefrom a narrowedPick<CLIContext, ...>to the fullCLIContextso it can be passed through to the shared helpers.Testing
Checklist
Additional Notes
Pure refactoring: the logic and prompts are moved verbatim with no behavioral change.
completeProjectSetup()documents that it requiressetAppConfig()to have run first sogetDashboardUrl()/getAppClient()resolve.🤖 Generated by Claude | 2026-06-10 13:07 UTC | 1c139b6