- cli/lib/rt.ts: the runtime layer on node: modules (spawn / spawnSync with Bun's defaults, exit codes and "Executable not found", which with PATHEXT, sleep, serve, Glob, hasher, gunzip, stdin, SQLite, packageRoot, config imports with a type-stripping fallback for Node 20); every Bun.* use in cli/ goes through it - tools/gen-embedded.ts -> cli/lib/embedded.ts: templates/, cli/shots/*.html and Play's Data safety form embedded (replaces Bun text imports; the bundle and the compiled sidecar carry them), checked fresh by bun run ci - package.json: bin dist/storebound.mjs (Node ESM bundle, tools/build-node.ts, prepack), engines node >=20 - bun run ci: node bundle + node smoke (real node: --version, help, check same as Bun, scan, release plan --help, init, MCP handshake + tool call); Forgejo CI sets up Node 20; tests/node-compat.test.ts guards cli/ - install writes npx MCP commands when run with Node; bin/storebound falls back to Node - docs: npx storebound init (Node 20+) or bunx storebound init
8 lines
577 B
Bash
Executable file
8 lines
577 B
Bash
Executable file
#!/bin/sh
|
|
# storebound launcher. On PATH while the Claude Code plugin is enabled; or symlink it anywhere.
|
|
# Bun runs the sources; without Bun, Node 20+ runs the npm bundle (dist/storebound.mjs, in the npm package).
|
|
here=$(cd "$(dirname "$0")" && pwd -P)
|
|
if command -v bun >/dev/null 2>&1; then exec bun "$here/../cli/index.ts" "$@"; fi
|
|
if [ -f "$here/../dist/storebound.mjs" ] && command -v node >/dev/null 2>&1; then exec node "$here/../dist/storebound.mjs" "$@"; fi
|
|
echo "storebound: needs Bun (https://bun.sh) or Node 20+ with the npm package (npx storebound)" >&2
|
|
exit 127
|