Skip to content

fix(create-vc-app): scope npx examples in README, clean up abandoned host-app#222

Merged
maksimzinchuk merged 1 commit into
mainfrom
fix/stale-cli-doc
May 4, 2026
Merged

fix(create-vc-app): scope npx examples in README, clean up abandoned host-app#222
maksimzinchuk merged 1 commit into
mainfrom
fix/stale-cli-doc

Conversation

@asvishnyakov
Copy link
Copy Markdown
Member

Summary

  • README: prefix all npx create-vc-app … examples with @vc-shell/ so they actually resolve to the published package; drop the abandoned host-app row, example, and --type value.
  • CLI: delete the orphan src/templates/host-app/ directory (its surface plumbing was removed in 219517d but the templates and the unguarded PROJECT_TYPE_LABELS lookup were left behind, so --type host-app half-scaffolds 13 files then crashes on padEnd); add isProjectType validation in init.ts so any unknown --type fails fast with a clear error before any directory work; add a defensive ?? options.projectType fallback in output.ts so an unknown ProjectType can never crash printSuccess.
  • Args typing: extract CLIArgs to types.ts, type initCommand and addModuleCommand signatures with it, drop all 19 as Record<string, unknown> / args.X as Y casts at call sites, inside the commands, and in init.test.ts.

Test plan

  • cd cli/create-vc-app && npx tsc --noEmit — clean
  • cd cli/create-vc-app && npx vitest run --config vitest.config.ts — 50/50 tests pass
  • yarn workspace @vc-shell/create-vc-app build — builds clean
  • In /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 module
    • add-module orders (inside the standalone) → exit 0, module + main.ts/bootstrap.ts updates
  • Negative cases:
    • --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

…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>
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 4, 2026

📦 Preview published for commit ba0d3c5

Install the preview with dist-tag:

npm install @vc-shell/framework@pr-222

Or pin to the exact commit:

npm install @vc-shell/framework@2.0.3-pr222.ba0d3c5

Published packages (dist-tag pr-222, version 2.0.3-pr222.ba0d3c5):

  • @vc-shell/framework
  • @vc-shell/api-client-generator
  • @vc-shell/create-vc-app
  • @vc-shell/config-generator
  • @vc-shell/migrate
  • @vc-shell/ts-config
  • @vc-shell/mf-config
  • @vc-shell/mf-host
  • @vc-shell/mf-module
  • @vc-shell/vc-app-skill

@maksimzinchuk maksimzinchuk merged commit 5ccd1cd into main May 4, 2026
7 checks passed
@maksimzinchuk maksimzinchuk deleted the fix/stale-cli-doc branch May 4, 2026 10:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants