From 99f3d2594c3bd981343a5b3a7a58d2f942a693b2 Mon Sep 17 00:00:00 2001 From: neverland Date: Wed, 29 Jul 2026 11:47:00 +0800 Subject: [PATCH] chore: run rs setup from source --- package.json | 2 +- scripts/rs.js | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100755 scripts/rs.js diff --git a/package.json b/package.json index 6213676..b033dea 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "doc:build": "node --run build && pnpm --dir website build", "format": "oxfmt .", "lint": "rs lint --type-check", - "prepare": "pnpm --filter rstack build && rs setup", + "prepare": "node scripts/rs.js setup", "test": "pnpm --filter './packages/**' test" }, "devDependencies": { diff --git a/scripts/rs.js b/scripts/rs.js new file mode 100755 index 0000000..247d7f1 --- /dev/null +++ b/scripts/rs.js @@ -0,0 +1,10 @@ +#!/usr/bin/env node +// Repository-only CLI entry for running Rstack from source without requiring dist. +import pkg from '../packages/rstack/package.json' with { type: 'json' }; + +// The published CLI receives this version at build time, so provide it before loading the source. +globalThis.RSTACK_VERSION = pkg.version; + +const { runCLI } = await import('../packages/rstack/src/index.ts'); + +await runCLI();