Release 1.0.0: TypeScript, CI, interface picker, --path & --host#1
Merged
Conversation
Modernize toolchain and add new flags: - Migrate to TypeScript + tsup build (src/cli.ts → dist/cli.js) - Upgrade yargs 17 → 18, prettier 2 → 3, husky 7 → 9 - Drop unused pretty-quick dev dep - Add GitHub Actions workflows (check, release via npm trusted publishing) - Replace dns.lookup with os.networkInterfaces(); prompt with classified numbered list when multiple non-internal IPv4 interfaces are detected - Validate --port is an integer in [1, 65535] - Wire up -P short alias - Add --path flag for deep-linking - Add --host flag to override auto-detected LAN IP - Set Node engines to ^20.19.0 || ^22.12.0 || >=23 - Replace static screenshot with vhs-generated demo gif - Rewrite README with Options table and examples
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
Modernizes the toolchain and ships v1.0.0. Single PR per agreed strategy — solo repo, coherent release story.
Toolchain
src/cli.ts, built todist/cli.jswith the shebang preserved). Lint viatsc --noEmit.yargs17 → 18,prettier2 → 3,husky7 → 9. Drop unusedpretty-quickdev dep.engines: ^20.19.0 || ^22.12.0 || >=23(yargs 18 requirement).CI
.github/workflows/check.yml— runs on PRs and viaworkflow_call(Node 22.x, lint + build)..github/workflows/release.yml— runs on push tomaster(Node 24.x, build, version bump viaphips28/gh-action-bump-version, publish to npm with provenance via trusted publishing —id-token: write, noNPM_TOKENneeded).formspark/use-formspark.CLI fixes
dns.lookup(os.hostname())(returns loopback on Debian/Ubuntu,.localon macOS) with iteration overos.networkInterfaces().wifi/ethernet/vpn/virtual/other), sort by priority, and prompt with a numbered list (Enter accepts default).--portis an integer in[1, 65535].-Pshort alias (was referenced but never bound).asynckeywords.New flags
--path— append a route, e.g.--path /admin.--host— override the auto-detected LAN IP (Docker, multi-NIC, demos).Docs / assets
static/demo.tapechecked in for regeneration;--host 192.168.1.42keeps real IPs out of the recording).Versioning
Version is
1.0.0-rc.0in this branch. The release workflow's autobumper does a patch bump on merge, which (per semver) drops the prerelease tag and lands at1.0.0.feat:/BREAKINGkeywords on the merge commit message — those would trigger minor/major bumps. The merge commit defaults to a patch bump, which is what we want.Pre-merge prerequisite
Before merging, configure npm Trusted Publishing on npmjs.com for
localview:formspark/localview, workflow:release.ymlWithout this, the publish step in
release.ymlwill fail (no token, no trusted publisher).Test plan
npm run lintcleannpm run buildproducesdist/cli.js~6 KB with shebang preservednode dist/cli.js --port 8080renders QR with correct LAN IP-P 9090short flag works--port abc/--port 99999/ no port → exit 1 with usage hint--path /adminand--path adminboth produce/adminin URL--host 192.168.1.42skips picker entirely1.0.0on npm