fix(create-vc-app): scope npx examples in README, clean up abandoned host-app#222
Merged
Conversation
…host-app README's `npx create-vc-app …` examples were missing the @vc-shell/ scope and would not resolve to the published package. Verifying each example in /tmp also surfaced that the host-app project type is documented but abandoned: the CLI surface was removed in 219517d but the template directory, the README references, and the unguarded label lookup were left behind. --type host-app today half-scaffolds 13 files then crashes on a padEnd lookup of a missing PROJECT_TYPE_LABELS entry. README: - Prefix all npx examples with @vc-shell/ - Drop host-app from description, type table, and example command list CLI cleanup of the abandoned type: - Remove orphan src/templates/host-app/ directory - Add isProjectType guard + validation in init.ts so unknown --type values fail fast with a clear error before any directory work - Defensive fallback in output.ts so an unknown ProjectType can never crash printSuccess Args typing (drops the casts the validation made unnecessary): - Extract CLIArgs to types.ts, type initCommand and addModuleCommand signatures with it, drop all `as Record<string, unknown>` casts at call sites and inside the commands (also in init.test.ts) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
📦 Preview published for commit Install the preview with dist-tag: npm install @vc-shell/framework@pr-222Or pin to the exact commit: npm install @vc-shell/framework@2.0.3-pr222.ba0d3c5Published packages (dist-tag
|
maksimzinchuk
approved these changes
May 4, 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.
Summary
npx create-vc-app …examples with@vc-shell/so they actually resolve to the published package; drop the abandonedhost-approw, example, and--typevalue.src/templates/host-app/directory (its surface plumbing was removed in 219517d but the templates and the unguardedPROJECT_TYPE_LABELSlookup were left behind, so--type host-apphalf-scaffolds 13 files then crashes onpadEnd); addisProjectTypevalidation ininit.tsso any unknown--typefails fast with a clear error before any directory work; add a defensive?? options.projectTypefallback inoutput.tsso an unknownProjectTypecan never crashprintSuccess.CLIArgstotypes.ts, typeinitCommandandaddModuleCommandsignatures with it, drop all 19as Record<string, unknown>/args.X as Ycasts at call sites, inside the commands, and ininit.test.ts.Test plan
cd cli/create-vc-app && npx tsc --noEmit— cleancd cli/create-vc-app && npx vitest run --config vitest.config.ts— 50/50 tests passyarn workspace @vc-shell/create-vc-app build— builds clean/tmp, run all README examples against the local build:--type standalone --module-name "Products" --dashboard --mocks→ exit 0, full project--type dynamic-module --module-name "Reviews"→ exit 0, full moduleadd-module orders(inside the standalone) → exit 0, module + main.ts/bootstrap.ts updates--type host-app …→ exit 1,Unknown project type: "host-app". Valid types: standalone, dynamic-module, no files created--type bogus→ same clean error, no files🤖 Generated with Claude Code