Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ The `commandName` option is only used in help output
so that the wizard describes itself using the command
that was actually run.

The wizard handles `--help` itself and otherwise takes over the terminal
The wizard handles `--help` and `--version` itself
and otherwise takes over the terminal
until the developer finishes, then restores it and prints a transcript of
the run. It resolves when the wizard is done, and only rejects if the
wizard could not run at all: a step that fails reports itself to the
Expand Down Expand Up @@ -139,14 +140,21 @@ Every other argument is forwarded to the wizard untouched.
The wizard is an [Ink] application under `src/lib`:

- `wizard.ts` is the entrypoint the package exports.
It parses arguments, handles `--help`, and hands off to the renderer.
It parses arguments, handles `--help` and `--version`,
and hands off to the renderer.
- `render.tsx` runs the app full-screen
and reprints its transcript on exit.
- `app.tsx` is the state machine driving the run,
one phase per step, and holds all of the rendering.
- `steps/` holds the logic for each step, with no UI in it.
- `util/` holds the Seam API client, dotenv handling,
and the subprocess runner.
- `version.ts` holds the package version reported by `--version`.
It ships a `0.0.0` placeholder that `prepack.ts` replaces with the
version from `package.json` when the package is packed,
recompiling just that module with `tsconfig.prepack.json`.
The version is only correct in a packed or published package,
not when running from a clone.

Modules under `src/lib` are imported through the `lib/*` path alias
rather than parent-relative specifiers.
Expand Down
229 changes: 229 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
"test:debug": "vitest --inspect-brk --no-file-parallelism",
"lint": "eslint .",
"postlint": "prettier --check --ignore-path .gitignore .",
"prepack": "tsx ./prepack.ts",
"postversion": "git push --follow-tags",
"wizard": "tsx src/bin/cli.ts",
"inspect": "tsx --inspect src/bin/cli.ts",
Expand Down Expand Up @@ -94,6 +95,7 @@
"eslint-plugin-import": "^2.32.0",
"eslint-plugin-simple-import-sort": "^12.1.1",
"eslint-plugin-unused-imports": "^4.1.4",
"execa": "^10.0.0",
"ink-testing-library": "^4.0.0",
"jiti": "^2.4.2",
"neostandard": "^0.13.0",
Expand Down
Loading
Loading