refactor(cli): extract shared scaffold logic into scaffold-shared (1/3) - #536
Merged
Conversation
Contributor
🚀 Package Preview Available!Install this PR's preview build with npm: npm i @base44-preview/cli@0.0.54-pr.536.1c139b6Prefer not to change any import paths? Install using npm alias so your code still imports npm i "base44@npm:@base44-preview/cli@0.0.54-pr.536.1c139b6"Or add it to your {
"dependencies": {
"base44": "npm:@base44-preview/cli@0.0.54-pr.536.1c139b6"
}
}
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 :)
moranshe-max
force-pushed
the
feature/scaffold-shared
branch
3 times, most recently
from
June 10, 2026 12:44
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) <noreply@anthropic.com>
moranshe-max
force-pushed
the
feature/scaffold-shared
branch
from
June 10, 2026 13:07
64d9bd8 to
d26c239
Compare
kfirstri
approved these changes
Jun 10, 2026
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