mirror of
https://github.com/modelstudioai/cli.git
synced 2026-09-14 19:49:23 +08:00
chore(dev): run CLI workspace entries from source
- use tsx for bl/kscli dev and test runners - point local library exports to src while keeping publishConfig on dist - switch vendored telemetry modules to .cjs for source-run compatibility - update stress/e2e helpers and agent docs for the new source execution path
This commit is contained in:
@@ -33,13 +33,7 @@ pnpm install
|
||||
|
||||
### Running the CLI from source
|
||||
|
||||
Open two terminals:
|
||||
|
||||
```bash
|
||||
# Terminal 1 — watch-build core
|
||||
pnpm dev
|
||||
|
||||
# Terminal 2 — run any bl command
|
||||
pnpm bl auth login --api-key sk-xxxxx
|
||||
pnpm bl text chat --message "hello"
|
||||
pnpm bl video generate --prompt "a cat walking"
|
||||
|
||||
@@ -33,13 +33,7 @@ pnpm install
|
||||
|
||||
### 从源码运行 CLI
|
||||
|
||||
开两个终端:
|
||||
|
||||
```bash
|
||||
# 终端 1 —— core watch 重建
|
||||
pnpm dev
|
||||
|
||||
# 终端 2 —— 跑任意 bl 命令
|
||||
pnpm bl auth login --api-key sk-xxxxx
|
||||
pnpm bl text chat --message "你好"
|
||||
pnpm bl video generate --prompt "一只走路的猫"
|
||||
|
||||
@@ -114,23 +114,23 @@ defineCommand({ auth }) → runtime/authStage → ctx.client → command.run(ctx
|
||||
```sh
|
||||
# 各种凭证组合
|
||||
unset DASHSCOPE_API_KEY ALIBABA_CLOUD_ACCESS_KEY_ID ALIBABA_CLOUD_ACCESS_KEY_SECRET
|
||||
HOME=/tmp/empty node packages/cli/src/main.ts auth status
|
||||
HOME=/tmp/empty pnpm -F bailian-cli exec tsx src/main.ts auth status
|
||||
|
||||
# flag 注入(凭证域 flag 只在对应业务命令可见,auth status 不接收)
|
||||
node packages/cli/src/main.ts text chat --message hi --api-key sk-xxx --dry-run
|
||||
node packages/cli/src/main.ts token-plan list-seats --access-key-id ak-xxx --access-key-secret sec-xxx --dry-run
|
||||
node packages/cli/src/main.ts auth login --open-api --access-key-id ak-xxx --access-key-secret sec-xxx --dry-run
|
||||
pnpm -F bailian-cli exec tsx src/main.ts text chat --message hi --api-key sk-xxx --dry-run
|
||||
pnpm -F bailian-cli exec tsx src/main.ts token-plan list-seats --access-key-id ak-xxx --access-key-secret sec-xxx --dry-run
|
||||
pnpm -F bailian-cli exec tsx src/main.ts auth login --open-api --access-key-id ak-xxx --access-key-secret sec-xxx --dry-run
|
||||
|
||||
# env 注入
|
||||
DASHSCOPE_API_KEY=sk-xxx node packages/cli/src/main.ts auth status
|
||||
ALIBABA_CLOUD_ACCESS_KEY_ID=ak-xxx ALIBABA_CLOUD_ACCESS_KEY_SECRET=sec-xxx node packages/cli/src/main.ts auth status
|
||||
DASHSCOPE_API_KEY=sk-xxx pnpm -F bailian-cli exec tsx src/main.ts auth status
|
||||
ALIBABA_CLOUD_ACCESS_KEY_ID=ak-xxx ALIBABA_CLOUD_ACCESS_KEY_SECRET=sec-xxx pnpm -F bailian-cli exec tsx src/main.ts auth status
|
||||
```
|
||||
|
||||
Console 登录/网关相关改动:
|
||||
|
||||
```sh
|
||||
node packages/cli/src/main.ts auth login --console
|
||||
node packages/cli/src/main.ts usage stats --dry-run --output json
|
||||
pnpm -F bailian-cli exec tsx src/main.ts auth login --console
|
||||
pnpm -F bailian-cli exec tsx src/main.ts usage stats --dry-run --output json
|
||||
```
|
||||
|
||||
## 常见漏点
|
||||
|
||||
@@ -109,15 +109,15 @@ packages/commands/src/index.ts
|
||||
|
||||
```sh
|
||||
pnpm run sync:skill-assets
|
||||
node packages/cli/src/main.ts <new-command> --help
|
||||
node packages/cli/src/main.ts
|
||||
pnpm -F bailian-cli exec tsx src/main.ts <new-command> --help
|
||||
pnpm -F bailian-cli exec tsx src/main.ts
|
||||
vp test packages/cli/tests/e2e/<topic>.e2e.test.ts
|
||||
```
|
||||
|
||||
如改了 `kscli` 入口:
|
||||
|
||||
```sh
|
||||
node packages/kscli/src/main.ts <command> --help
|
||||
pnpm -F knowledge-studio-cli exec tsx src/main.ts <command> --help
|
||||
```
|
||||
|
||||
## 常见漏点
|
||||
|
||||
@@ -45,8 +45,8 @@
|
||||
## 完成后自查
|
||||
|
||||
```sh
|
||||
node packages/cli/src/main.ts <command> --help # 看新 flag 出现在 Flags
|
||||
node packages/cli/src/main.ts <command> --new-flag x # 实测一遍
|
||||
pnpm -F bailian-cli exec tsx src/main.ts <command> --help # 看新 flag 出现在 Flags
|
||||
pnpm -F bailian-cli exec tsx src/main.ts <command> --new-flag x # 实测一遍
|
||||
```
|
||||
|
||||
## 常见漏点
|
||||
|
||||
@@ -66,12 +66,12 @@ config 文件 ─┘
|
||||
|
||||
```sh
|
||||
# 三个来源都试一遍
|
||||
node packages/cli/src/main.ts config show --output json | grep <new-field>
|
||||
XXX=value node packages/cli/src/main.ts config show --output json | grep <new-field>
|
||||
node packages/cli/src/main.ts config show --xxx value --output json | grep <new-field>
|
||||
pnpm -F bailian-cli exec tsx src/main.ts config show --output json | grep <new-field>
|
||||
XXX=value pnpm -F bailian-cli exec tsx src/main.ts config show --output json | grep <new-field>
|
||||
pnpm -F bailian-cli exec tsx src/main.ts config show --xxx value --output json | grep <new-field>
|
||||
|
||||
# 写到文件(会改用户 HOME,必要时先用临时 HOME)
|
||||
node packages/cli/src/main.ts config set --key <key> --value <value>
|
||||
pnpm -F bailian-cli exec tsx src/main.ts config set --key <key> --value <value>
|
||||
cat ~/.bailian/config.json
|
||||
```
|
||||
|
||||
|
||||
@@ -110,14 +110,14 @@ process.exit(err.exitCode)
|
||||
|
||||
```sh
|
||||
# 触发对应错误,看 text 输出
|
||||
HOME=/tmp/empty node packages/cli/src/main.ts text chat --message "x"
|
||||
HOME=/tmp/empty pnpm -F bailian-cli exec tsx src/main.ts text chat --message "x"
|
||||
|
||||
# 看 JSON 输出(应包含 cause 字段当 cause 存在时)
|
||||
HOME=/tmp/empty node packages/cli/src/main.ts text chat --message "x" --output json
|
||||
HOME=/tmp/empty pnpm -F bailian-cli exec tsx src/main.ts text chat --message "x" --output json
|
||||
|
||||
# 模拟网络层错误,验证 errno 透传
|
||||
DASHSCOPE_BASE_URL=https://nonexistent-host.invalid \
|
||||
node packages/cli/src/main.ts text chat --message hi
|
||||
pnpm -F bailian-cli exec tsx src/main.ts text chat --message hi
|
||||
# 预期:"Network request failed: ENOTFOUND ..." + Caused by 链
|
||||
```
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
### C. 构建配置
|
||||
|
||||
- [ ] `packages/*/vite.config.ts` 的 entry / dts / exports 设置符合包类型:
|
||||
- library 包(core/runtime/commands):导出 `dist/index.mjs` + dts + `@bailian-cli/source` dev export
|
||||
- library 包(core/runtime/commands):本地 `exports` 默认指向 `src/index.ts`;`publishConfig.exports` 覆盖发布入口为 `dist/index.mjs`;dts 产物正常生成
|
||||
- binary 包(cli/kscli):entry 指向 `src/main.ts`,有 shebang,`exports: true`
|
||||
- [ ] cli / kscli 的 bundle 必须把 workspace 包(`bailian-cli-core` / `bailian-cli-runtime` / `bailian-cli-commands`)当 **external**(不内联),确认 dist 中仍是 package import
|
||||
- [ ] cli / kscli 的 binary bundle 第一行必须有 `#!/usr/bin/env node` shebang
|
||||
|
||||
@@ -42,9 +42,9 @@
|
||||
|
||||
```sh
|
||||
# 默认模型走通
|
||||
node packages/cli/src/main.ts <command> --message "test"
|
||||
pnpm -F bailian-cli exec tsx src/main.ts <command> --message "test"
|
||||
# 显式指定新模型
|
||||
node packages/cli/src/main.ts <command> --model <new-model> --message "test"
|
||||
pnpm -F bailian-cli exec tsx src/main.ts <command> --model <new-model> --message "test"
|
||||
```
|
||||
|
||||
## 常见漏点
|
||||
|
||||
@@ -115,7 +115,7 @@ pnpm run test:stress -- video-edit --reuse-fixtures -- --count 3
|
||||
|
||||
### 子进程调用方式
|
||||
|
||||
- **实际执行**:`node packages/cli/src/main.ts <args>`,`cwd` 为 `packages/cli`
|
||||
- **实际执行**:仓库本地 `tsx src/main.ts <args>`,`cwd` 为 `packages/cli`
|
||||
- **禁止**用 `pnpm run dev` 跑子任务:`pnpm` 会向 stdout 打生命周期日志,污染 JSON 解析
|
||||
- **报告中的「完整命令」**:用 `pnpm run dev ...` 展示(`buildDisplayCommand`)
|
||||
|
||||
@@ -191,7 +191,7 @@ pnpm run test:stress -- video-edit --reuse-fixtures -- --count 3
|
||||
### 只改压测脚本时
|
||||
|
||||
- [ ] `lib/paths.mjs` 解析的 `CLI_PACKAGE` / `MONOREPO_ROOT` 仍正确
|
||||
- [ ] 子进程仍为 `node` + `src/main.ts`,未改回裸 `pnpm run dev` 执行任务
|
||||
- [ ] 子进程仍为仓库本地 `tsx` + `src/main.ts`,未改回裸 `pnpm run dev` 执行任务
|
||||
- [ ] 未对子进程加 `--quiet`,视频未加 `--async`
|
||||
- [ ] `parsers.mjs` 与文档中的成功判定一致
|
||||
- [ ] 根 `package.json` 仅保留 `test:stress` 入口指向 `run.mjs`
|
||||
|
||||
@@ -61,12 +61,12 @@ grep -rnE "https://dashscope[a-z-]*\.aliyuncs\.com" packages/ --include="*.ts" \
|
||||
|
||||
```sh
|
||||
# 验证错误 hint 不再泄漏旧 URL
|
||||
HOME=/tmp/empty node packages/cli/src/main.ts text chat --message x
|
||||
HOME=/tmp/empty pnpm -F bailian-cli exec tsx src/main.ts text chat --message x
|
||||
# 看输出的 Get API Key URL 是否走新值
|
||||
|
||||
# 验证 banner / help
|
||||
node packages/cli/src/main.ts # banner
|
||||
node packages/cli/src/main.ts help # help 命令
|
||||
pnpm -F bailian-cli exec tsx src/main.ts # banner
|
||||
pnpm -F bailian-cli exec tsx src/main.ts help # help 命令
|
||||
```
|
||||
|
||||
## 常见漏点
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
"test:stress": "node packages/cli/tests/stress/run.mjs"
|
||||
},
|
||||
"devDependencies": {
|
||||
"tsx": "catalog:",
|
||||
"vite-plus": "catalog:"
|
||||
},
|
||||
"engines": {
|
||||
|
||||
@@ -40,10 +40,10 @@
|
||||
"registry": "https://registry.npmjs.org/"
|
||||
},
|
||||
"scripts": {
|
||||
"generate:reference": "node --experimental-strip-types ../../tools/generate-reference.ts && sh -c 'cd ../.. && vp check --fix skills/bailian-cli/reference'",
|
||||
"sync:skill-version": "node --experimental-strip-types ../../tools/sync-skill-metadata.ts",
|
||||
"generate:reference": "tsx ../../tools/generate-reference.ts && sh -c 'cd ../.. && vp check --fix skills/bailian-cli/reference'",
|
||||
"sync:skill-version": "tsx ../../tools/sync-skill-metadata.ts",
|
||||
"build": "vp pack",
|
||||
"dev": "node src/main.ts",
|
||||
"dev": "tsx src/main.ts",
|
||||
"test": "vp test",
|
||||
"check": "vp check"
|
||||
},
|
||||
|
||||
@@ -28,6 +28,15 @@ export function monorepoRoot(): string {
|
||||
return join(cliPackageRoot, "..", "..");
|
||||
}
|
||||
|
||||
function localBin(name: string): string {
|
||||
return join(
|
||||
monorepoRoot(),
|
||||
"node_modules",
|
||||
".bin",
|
||||
process.platform === "win32" ? `${name}.cmd` : name,
|
||||
);
|
||||
}
|
||||
|
||||
function readE2eRunSessionFromOutputDir(): string | undefined {
|
||||
try {
|
||||
const p = join(monorepoRoot(), "test", "output", E2E_RUN_SESSION_FILENAME);
|
||||
@@ -150,7 +159,7 @@ export interface RunCliResult {
|
||||
}
|
||||
|
||||
/**
|
||||
* 子进程执行 CLI(等价于在 `packages/cli` 下 `node src/main.ts ...`)。
|
||||
* 子进程执行 CLI(等价于在 `packages/cli` 下 `tsx src/main.ts ...`)。
|
||||
* request_id 等诊断信息在 stderr;`--output json` 时 JSON 在 stdout。
|
||||
*/
|
||||
export async function runCli(
|
||||
@@ -158,7 +167,7 @@ export async function runCli(
|
||||
envOverrides: NodeJS.ProcessEnv = {},
|
||||
): Promise<RunCliResult> {
|
||||
try {
|
||||
const { stdout, stderr } = await execFileAsync("node", [mainTs, ...args], {
|
||||
const { stdout, stderr } = await execFileAsync(localBin("tsx"), [mainTs, ...args], {
|
||||
cwd: cliPackageRoot,
|
||||
encoding: "utf8",
|
||||
maxBuffer: 32 * 1024 * 1024,
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
/**
|
||||
* 子进程执行 CLI:spawn node main.ts,解析 stdout。
|
||||
* 子进程执行 CLI:spawn 仓库本地 tsx main.ts,解析 stdout。
|
||||
*/
|
||||
import { spawn } from "node:child_process";
|
||||
import { resolveTsxBin } from "./paths.mjs";
|
||||
import { truncateLog, extractError, isRateLimitFailure } from "./parsers.mjs";
|
||||
import { captureTraceIdsFromText, enrichTraceIdsAsync } from "./trace-ids.mjs";
|
||||
|
||||
@@ -51,12 +52,13 @@ export function executeSingleCli(ctx) {
|
||||
parseStdout,
|
||||
readFileOptional,
|
||||
asrOutPath,
|
||||
TSX_BIN = resolveTsxBin(),
|
||||
} = ctx;
|
||||
|
||||
const startedAt = Date.now();
|
||||
|
||||
return new Promise((resolve) => {
|
||||
const child = spawn("node", [MAIN_TS, ...stressCliArgs(cliArgs)], {
|
||||
const child = spawn(TSX_BIN, [MAIN_TS, ...stressCliArgs(cliArgs)], {
|
||||
cwd: CLI_PACKAGE,
|
||||
env: process.env,
|
||||
stdio: ["ignore", "pipe", "pipe"],
|
||||
|
||||
@@ -6,7 +6,7 @@ import { join } from "node:path";
|
||||
import { execFile } from "node:child_process";
|
||||
import { promisify } from "node:util";
|
||||
|
||||
import { DEFAULT_CLI_PACKAGE, MONOREPO_ROOT, resolveMainTs } from "./paths.mjs";
|
||||
import { DEFAULT_CLI_PACKAGE, MONOREPO_ROOT, resolveMainTs, resolveTsxBin } from "./paths.mjs";
|
||||
import { parseStressArgv, optFrom } from "./argv-parse.mjs";
|
||||
import { resolveStressCountAndConcurrency } from "./stress-config.mjs";
|
||||
import { SubmissionRateLimiter } from "./rate-limit.mjs";
|
||||
@@ -38,6 +38,7 @@ export function defineStressTarget(config) {
|
||||
const globals = ctx?.globals ?? {};
|
||||
const CLI_PACKAGE = optFrom(ARGV, "CLI_PACKAGE") || DEFAULT_CLI_PACKAGE;
|
||||
const MAIN_TS = resolveMainTs(CLI_PACKAGE);
|
||||
const TSX_BIN = resolveTsxBin();
|
||||
|
||||
const canonical = ctx?.canonicalTarget ?? config.canonical;
|
||||
const {
|
||||
@@ -142,9 +143,9 @@ export function defineStressTarget(config) {
|
||||
return stressExit(ctx, 1);
|
||||
}
|
||||
try {
|
||||
await execFileAsync("node", ["--version"], { encoding: "utf8" });
|
||||
await execFileAsync(TSX_BIN, ["--version"], { encoding: "utf8" });
|
||||
} catch {
|
||||
console.error("未找到 node。");
|
||||
console.error("未找到仓库本地 tsx,请先运行 pnpm install。");
|
||||
return stressExit(ctx, 1);
|
||||
}
|
||||
|
||||
@@ -177,6 +178,7 @@ export function defineStressTarget(config) {
|
||||
return executeSingleCli({
|
||||
MAIN_TS,
|
||||
CLI_PACKAGE,
|
||||
TSX_BIN,
|
||||
TIMEOUT_MS,
|
||||
MAX_LOG_CAPTURE,
|
||||
index,
|
||||
|
||||
@@ -16,7 +16,22 @@ export const DEFAULT_CLI_PACKAGE = join(STRESS_ROOT, "..", "..");
|
||||
/** monorepo 根目录 */
|
||||
export const MONOREPO_ROOT = join(DEFAULT_CLI_PACKAGE, "..", "..");
|
||||
|
||||
/** CLI 入口 main.ts(ts-node 或直接 node ts 由项目脚本决定) */
|
||||
/** CLI 入口 main.ts(由仓库本地 tsx 执行) */
|
||||
export function resolveMainTs(cliPackage = DEFAULT_CLI_PACKAGE) {
|
||||
return join(cliPackage, "src", "main.ts");
|
||||
}
|
||||
|
||||
/** monorepo 本地 bin 路径,避免 `pnpm run` 生命周期日志污染 stdout */
|
||||
export function resolveLocalBin(name) {
|
||||
return join(
|
||||
MONOREPO_ROOT,
|
||||
"node_modules",
|
||||
".bin",
|
||||
process.platform === "win32" ? `${name}.cmd` : name,
|
||||
);
|
||||
}
|
||||
|
||||
/** tsx 可执行文件路径 */
|
||||
export function resolveTsxBin() {
|
||||
return resolveLocalBin("tsx");
|
||||
}
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
"moduleDetection": "force",
|
||||
"module": "nodenext",
|
||||
"moduleResolution": "nodenext",
|
||||
"customConditions": ["@bailian-cli/source"],
|
||||
"resolveJsonModule": true,
|
||||
"types": ["node"],
|
||||
"strict": true,
|
||||
|
||||
@@ -20,8 +20,8 @@
|
||||
"types": "./dist/index.d.mts",
|
||||
"exports": {
|
||||
".": {
|
||||
"@bailian-cli/source": "./src/index.ts",
|
||||
"default": "./dist/index.mjs"
|
||||
"types": "./src/index.ts",
|
||||
"default": "./src/index.ts"
|
||||
},
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
"moduleDetection": "force",
|
||||
"module": "nodenext",
|
||||
"moduleResolution": "nodenext",
|
||||
"customConditions": ["@bailian-cli/source"],
|
||||
"resolveJsonModule": true,
|
||||
"types": ["node"],
|
||||
"strict": true,
|
||||
|
||||
@@ -6,9 +6,6 @@ export default defineConfig({
|
||||
dts: {
|
||||
tsgo: true,
|
||||
},
|
||||
exports: {
|
||||
devExports: "@bailian-cli/source",
|
||||
},
|
||||
},
|
||||
lint: {
|
||||
options: {
|
||||
|
||||
+1
-1
@@ -1,3 +1,3 @@
|
||||
declare const RemoteEventPlugin: unknown;
|
||||
|
||||
export default RemoteEventPlugin;
|
||||
export = RemoteEventPlugin;
|
||||
+1
-1
@@ -4,4 +4,4 @@ declare class RemoteTracker {
|
||||
send(gokey: string): Promise<void>;
|
||||
}
|
||||
|
||||
export default RemoteTracker;
|
||||
export = RemoteTracker;
|
||||
@@ -20,8 +20,8 @@
|
||||
"types": "./dist/index.d.mts",
|
||||
"exports": {
|
||||
".": {
|
||||
"@bailian-cli/source": "./src/index.ts",
|
||||
"default": "./dist/index.mjs"
|
||||
"types": "./src/index.ts",
|
||||
"default": "./src/index.ts"
|
||||
},
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* 1. NODE_ENV=development — Node 圈通用约定,测试同学/CI 可显式声明
|
||||
* 2. 当前模块文件路径不在 node_modules 里 — 自动识别从源码运行(pnpm dev /
|
||||
* npm link / 直接 node packages/cli/src/main.ts),避免开发者忘记设环境变量
|
||||
* npm link / 直接 pnpm -F bailian-cli exec tsx src/main.ts),避免开发者忘记设环境变量
|
||||
* 时仍把数据打到 prod
|
||||
*
|
||||
* 缓存结果,模块加载期算一次就行。
|
||||
|
||||
@@ -3,8 +3,8 @@ import { join } from "path";
|
||||
import { getConfigDir, ensureConfigDir } from "../config/paths.ts";
|
||||
import { buildRemoteAemOptions, type TrackingEvent } from "./event.ts";
|
||||
import { detectEnv } from "./env.ts";
|
||||
import Tracker from "../../lib/remote-telemetry/tracker.js";
|
||||
import EventPlugin from "../../lib/remote-telemetry/event-plugin.js";
|
||||
import Tracker from "../../lib/remote-telemetry/tracker.cjs";
|
||||
import EventPlugin from "../../lib/remote-telemetry/event-plugin.cjs";
|
||||
|
||||
const TELEMETRY_FILE = () => join(getConfigDir(), "telemetry.jsonl");
|
||||
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
"moduleDetection": "force",
|
||||
"module": "nodenext",
|
||||
"moduleResolution": "nodenext",
|
||||
"customConditions": ["@bailian-cli/source"],
|
||||
"resolveJsonModule": true,
|
||||
"types": ["node"],
|
||||
"strict": true,
|
||||
|
||||
@@ -6,9 +6,6 @@ export default defineConfig({
|
||||
dts: {
|
||||
tsgo: true,
|
||||
},
|
||||
exports: {
|
||||
devExports: "@bailian-cli/source",
|
||||
},
|
||||
},
|
||||
lint: {
|
||||
options: {
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
},
|
||||
"scripts": {
|
||||
"build": "vp pack",
|
||||
"dev": "node src/main.ts",
|
||||
"dev": "tsx src/main.ts",
|
||||
"test": "vp test",
|
||||
"check": "vp check"
|
||||
},
|
||||
|
||||
@@ -18,6 +18,15 @@ export function monorepoRoot(): string {
|
||||
return join(kscliPackageRoot, "..", "..");
|
||||
}
|
||||
|
||||
function localBin(name: string): string {
|
||||
return join(
|
||||
monorepoRoot(),
|
||||
"node_modules",
|
||||
".bin",
|
||||
process.platform === "win32" ? `${name}.cmd` : name,
|
||||
);
|
||||
}
|
||||
|
||||
// ---- E2E gating helpers ----
|
||||
|
||||
// ---- .env loader (cached) ----
|
||||
@@ -73,14 +82,14 @@ export interface RunCliResult {
|
||||
}
|
||||
|
||||
/**
|
||||
* 子进程执行 kscli(等价于 `node packages/kscli/src/main.ts ...`)。
|
||||
* 子进程执行 kscli(等价于 `tsx packages/kscli/src/main.ts ...`)。
|
||||
*/
|
||||
export async function runKscli(
|
||||
args: string[],
|
||||
envOverrides: NodeJS.ProcessEnv = {},
|
||||
): Promise<RunCliResult> {
|
||||
try {
|
||||
const { stdout, stderr } = await execFileAsync("node", [mainTs, ...args], {
|
||||
const { stdout, stderr } = await execFileAsync(localBin("tsx"), [mainTs, ...args], {
|
||||
cwd: kscliPackageRoot,
|
||||
encoding: "utf8",
|
||||
maxBuffer: 32 * 1024 * 1024,
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
"moduleDetection": "force",
|
||||
"module": "nodenext",
|
||||
"moduleResolution": "nodenext",
|
||||
"customConditions": ["@bailian-cli/source"],
|
||||
"resolveJsonModule": true,
|
||||
"types": ["node"],
|
||||
"strict": true,
|
||||
|
||||
@@ -20,8 +20,8 @@
|
||||
"types": "./dist/index.d.mts",
|
||||
"exports": {
|
||||
".": {
|
||||
"@bailian-cli/source": "./src/index.ts",
|
||||
"default": "./dist/index.mjs"
|
||||
"types": "./src/index.ts",
|
||||
"default": "./src/index.ts"
|
||||
},
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
"moduleDetection": "force",
|
||||
"module": "nodenext",
|
||||
"moduleResolution": "nodenext",
|
||||
"customConditions": ["@bailian-cli/source"],
|
||||
"resolveJsonModule": true,
|
||||
"types": ["node"],
|
||||
"strict": true,
|
||||
|
||||
@@ -6,9 +6,6 @@ export default defineConfig({
|
||||
dts: {
|
||||
tsgo: true,
|
||||
},
|
||||
exports: {
|
||||
devExports: "@bailian-cli/source",
|
||||
},
|
||||
},
|
||||
lint: {
|
||||
options: {
|
||||
|
||||
Generated
+315
-22
@@ -18,6 +18,9 @@ catalogs:
|
||||
chalk:
|
||||
specifier: ^5.6.2
|
||||
version: 5.6.2
|
||||
tsx:
|
||||
specifier: ^4.23.0
|
||||
version: 4.23.0
|
||||
undici:
|
||||
specifier: ^8.4.1
|
||||
version: 8.4.1
|
||||
@@ -36,9 +39,12 @@ importers:
|
||||
|
||||
.:
|
||||
devDependencies:
|
||||
tsx:
|
||||
specifier: 'catalog:'
|
||||
version: 4.23.0
|
||||
vite-plus:
|
||||
specifier: 'catalog:'
|
||||
version: 0.1.22(@types/node@25.6.0)(jiti@2.6.1)(typescript@6.0.3)(vite@8.0.10(@types/node@25.6.0)(jiti@2.6.1)(yaml@2.8.3))(yaml@2.8.3)
|
||||
version: 0.1.22(@types/node@25.6.0)(esbuild@0.28.1)(jiti@2.6.1)(tsx@4.23.0)(typescript@6.0.3)(vite@8.0.10(@types/node@25.6.0)(esbuild@0.28.1)(jiti@2.6.1)(tsx@4.23.0)(yaml@2.8.3))(yaml@2.8.3)
|
||||
|
||||
packages/cli:
|
||||
dependencies:
|
||||
@@ -78,7 +84,7 @@ importers:
|
||||
version: 8.4.1
|
||||
vite-plus:
|
||||
specifier: 0.1.22
|
||||
version: 0.1.22(@types/node@24.12.2)(jiti@2.6.1)(typescript@6.0.3)(vite@8.0.10(@types/node@24.12.2)(jiti@2.6.1)(yaml@2.8.3))(yaml@2.8.3)
|
||||
version: 0.1.22(@types/node@24.12.2)(esbuild@0.28.1)(jiti@2.6.1)(tsx@4.23.0)(typescript@6.0.3)(vite@8.0.10(@types/node@24.12.2)(esbuild@0.28.1)(jiti@2.6.1)(tsx@4.23.0)(yaml@2.8.3))(yaml@2.8.3)
|
||||
yaml:
|
||||
specifier: 'catalog:'
|
||||
version: 2.8.3
|
||||
@@ -112,7 +118,7 @@ importers:
|
||||
version: 6.0.3
|
||||
vite-plus:
|
||||
specifier: 0.1.22
|
||||
version: 0.1.22(@types/node@24.12.2)(jiti@2.6.1)(typescript@6.0.3)(vite@8.0.10(@types/node@24.12.2)(jiti@2.6.1)(yaml@2.8.3))(yaml@2.8.3)
|
||||
version: 0.1.22(@types/node@24.12.2)(esbuild@0.28.1)(jiti@2.6.1)(tsx@4.23.0)(typescript@6.0.3)(vite@8.0.10(@types/node@24.12.2)(esbuild@0.28.1)(jiti@2.6.1)(tsx@4.23.0)(yaml@2.8.3))(yaml@2.8.3)
|
||||
|
||||
packages/core:
|
||||
dependencies:
|
||||
@@ -131,7 +137,7 @@ importers:
|
||||
version: 6.0.3
|
||||
vite-plus:
|
||||
specifier: 'catalog:'
|
||||
version: 0.1.22(@types/node@24.12.2)(jiti@2.6.1)(typescript@6.0.3)(vite@8.0.10(@types/node@24.12.2)(jiti@2.6.1)(yaml@2.8.3))(yaml@2.8.3)
|
||||
version: 0.1.22(@types/node@24.12.2)(esbuild@0.28.1)(jiti@2.6.1)(tsx@4.23.0)(typescript@6.0.3)(vite@8.0.10(@types/node@24.12.2)(esbuild@0.28.1)(jiti@2.6.1)(tsx@4.23.0)(yaml@2.8.3))(yaml@2.8.3)
|
||||
|
||||
packages/kscli:
|
||||
dependencies:
|
||||
@@ -171,7 +177,7 @@ importers:
|
||||
version: 8.4.1
|
||||
vite-plus:
|
||||
specifier: 0.1.22
|
||||
version: 0.1.22(@types/node@24.12.2)(jiti@2.6.1)(typescript@6.0.3)(vite@8.0.10(@types/node@24.12.2)(jiti@2.6.1)(yaml@2.8.3))(yaml@2.8.3)
|
||||
version: 0.1.22(@types/node@24.12.2)(esbuild@0.28.1)(jiti@2.6.1)(tsx@4.23.0)(typescript@6.0.3)(vite@8.0.10(@types/node@24.12.2)(esbuild@0.28.1)(jiti@2.6.1)(tsx@4.23.0)(yaml@2.8.3))(yaml@2.8.3)
|
||||
yaml:
|
||||
specifier: 'catalog:'
|
||||
version: 2.8.3
|
||||
@@ -208,7 +214,7 @@ importers:
|
||||
version: 6.0.3
|
||||
vite-plus:
|
||||
specifier: 0.1.22
|
||||
version: 0.1.22(@types/node@24.12.2)(jiti@2.6.1)(typescript@6.0.3)(vite@8.0.10(@types/node@24.12.2)(jiti@2.6.1)(yaml@2.8.3))(yaml@2.8.3)
|
||||
version: 0.1.22(@types/node@24.12.2)(esbuild@0.28.1)(jiti@2.6.1)(tsx@4.23.0)(typescript@6.0.3)(vite@8.0.10(@types/node@24.12.2)(esbuild@0.28.1)(jiti@2.6.1)(tsx@4.23.0)(yaml@2.8.3))(yaml@2.8.3)
|
||||
yaml:
|
||||
specifier: 'catalog:'
|
||||
version: 2.8.3
|
||||
@@ -232,6 +238,162 @@ packages:
|
||||
'@emnapi/wasi-threads@1.2.1':
|
||||
resolution: {integrity: sha512-uTII7OYF+/Mes/MrcIOYp5yOtSMLBWSIoLPpcgwipoiKbli6k322tcoFsxoIIxPDqW01SQGAgko4EzZi2BNv2w==}
|
||||
|
||||
'@esbuild/aix-ppc64@0.28.1':
|
||||
resolution: {integrity: sha512-Svl7tq8k/08+p6CXPpRjQ1fKX+1odH/BQbb48fV6fj3CWHhsoIOoY87w1oHXm0qEpkIK3ZfVgp0hed3XBXzXMQ==}
|
||||
engines: {node: '>=18'}
|
||||
cpu: [ppc64]
|
||||
os: [aix]
|
||||
|
||||
'@esbuild/android-arm64@0.28.1':
|
||||
resolution: {integrity: sha512-34EGEbCIAgosYz6goLcopX6Mo7NyGv9tfwEM2/7Ce2VcVRk568iSvniGWcUXIy7wEDR1wzolcxcriFVrWYcwBg==}
|
||||
engines: {node: '>=18'}
|
||||
cpu: [arm64]
|
||||
os: [android]
|
||||
|
||||
'@esbuild/android-arm@0.28.1':
|
||||
resolution: {integrity: sha512-0k2F129Xdio1TdJfzJ8sy1Q47vUD2NnwdhiAf7drUN1EBTfPf4hsFCtmMgu/6m8JSzsBrlmVjudMBQqOfG8usQ==}
|
||||
engines: {node: '>=18'}
|
||||
cpu: [arm]
|
||||
os: [android]
|
||||
|
||||
'@esbuild/android-x64@0.28.1':
|
||||
resolution: {integrity: sha512-dbwY7ltSMDWsRatcRpCnES4F+im88OCUgGZjy52shC7GqHRE/cYlxNbB4Z4UpJswpcc4Qxd2oE/ufM0p61IKng==}
|
||||
engines: {node: '>=18'}
|
||||
cpu: [x64]
|
||||
os: [android]
|
||||
|
||||
'@esbuild/darwin-arm64@0.28.1':
|
||||
resolution: {integrity: sha512-TZbWkQY7kvTAXbXUT7uVACR5cMHsDiSz9z7ZKAX/RTq/WJEk3QyRr0wZpNhBDX+/0CtdqUIJlOiodQcta6tY3Q==}
|
||||
engines: {node: '>=18'}
|
||||
cpu: [arm64]
|
||||
os: [darwin]
|
||||
|
||||
'@esbuild/darwin-x64@0.28.1':
|
||||
resolution: {integrity: sha512-zfdzgK9ACBNZLI/CyHTOx81SyNbM6YXn7rxSgX97VjyiPl9W1i4Ka4fgKECEoFCKGpvBj5qArWIGgQjOwkgskQ==}
|
||||
engines: {node: '>=18'}
|
||||
cpu: [x64]
|
||||
os: [darwin]
|
||||
|
||||
'@esbuild/freebsd-arm64@0.28.1':
|
||||
resolution: {integrity: sha512-wG2EA8ENdEI0qhkSZMjfqrdY+ziCYCPMmtZjjIwOmXFjmyzEHn+UUxk5of+SYsjtfs3VpnlC7QLzSI5hY/rOAw==}
|
||||
engines: {node: '>=18'}
|
||||
cpu: [arm64]
|
||||
os: [freebsd]
|
||||
|
||||
'@esbuild/freebsd-x64@0.28.1':
|
||||
resolution: {integrity: sha512-i7dZ9vQgnvSCzi/rYCXNgtF/U+eKZNJBzu3eTQbRgHnM7tNSizLOkRFAl3qzVc/Op/u5YkHHa4pf/3DOYHthLQ==}
|
||||
engines: {node: '>=18'}
|
||||
cpu: [x64]
|
||||
os: [freebsd]
|
||||
|
||||
'@esbuild/linux-arm64@0.28.1':
|
||||
resolution: {integrity: sha512-yHs+0uc8+nvEAfAfxrWQKK5peSNzBc4PegcMO0EJ2hT71uA7vB8Ihg2e77R2P7SG5uYjPbHlLLmve4LLLRCf0g==}
|
||||
engines: {node: '>=18'}
|
||||
cpu: [arm64]
|
||||
os: [linux]
|
||||
|
||||
'@esbuild/linux-arm@0.28.1':
|
||||
resolution: {integrity: sha512-qVXBOHQS+d5Y722GwJzJUtOLlX7km3CraOaGormF1pDtPd2C/l1SHRPgjLunLGe51Sh5YYWKMFDyV4SxgMQYTQ==}
|
||||
engines: {node: '>=18'}
|
||||
cpu: [arm]
|
||||
os: [linux]
|
||||
|
||||
'@esbuild/linux-ia32@0.28.1':
|
||||
resolution: {integrity: sha512-d1z4ZuP0ajrfz/FhGT4vv278rX8KnPPJx8i5+AtK7TYbx9Le9F1hyzurZpkEyjkGa9dUGhQow4C1NmeGvqxN2w==}
|
||||
engines: {node: '>=18'}
|
||||
cpu: [ia32]
|
||||
os: [linux]
|
||||
|
||||
'@esbuild/linux-loong64@0.28.1':
|
||||
resolution: {integrity: sha512-M5sRjUVZrkm1OAPR3dlOYzNmN+loZKGVi1VUQGrwuqLcbR6qeAz+famMhjASeH3YVKvZz+zT1jlh/keC3Rj/lg==}
|
||||
engines: {node: '>=18'}
|
||||
cpu: [loong64]
|
||||
os: [linux]
|
||||
|
||||
'@esbuild/linux-mips64el@0.28.1':
|
||||
resolution: {integrity: sha512-mRObBZeHh2OxcBFPWE/FjylkRgZdYuiTR3vaTozquCGOH14iP9oN4x4Ge81CoIDYQrXmIxpFumJBu5MtZpnQJQ==}
|
||||
engines: {node: '>=18'}
|
||||
cpu: [mips64el]
|
||||
os: [linux]
|
||||
|
||||
'@esbuild/linux-ppc64@0.28.1':
|
||||
resolution: {integrity: sha512-slScBsMAb3GFDcdrCgLwZtPYRoH2H/youv10QiZyRjmsP48fznoveWytSgCI/R0ZcUgpc0ZhIUEx6LHts8yrfQ==}
|
||||
engines: {node: '>=18'}
|
||||
cpu: [ppc64]
|
||||
os: [linux]
|
||||
|
||||
'@esbuild/linux-riscv64@0.28.1':
|
||||
resolution: {integrity: sha512-kw0owk1o0GFETUJyW0jc0G4Yzs0BHZn0JDZ8JRT088vjJYX777BAs1fDGxAC+q831qOs2DTC96mNsG2opdfyyQ==}
|
||||
engines: {node: '>=18'}
|
||||
cpu: [riscv64]
|
||||
os: [linux]
|
||||
|
||||
'@esbuild/linux-s390x@0.28.1':
|
||||
resolution: {integrity: sha512-/lAIjX8aYFRByhh6L5rYtPEDRqa9de/4V/juOXcta5frjvzXO4/sqEtyytse0g3zZFuWu5cDN0MkLz2qRDD2Ag==}
|
||||
engines: {node: '>=18'}
|
||||
cpu: [s390x]
|
||||
os: [linux]
|
||||
|
||||
'@esbuild/linux-x64@0.28.1':
|
||||
resolution: {integrity: sha512-u/anNYF2mmVOEDwLtnQ1wOr3EZ9sTNGLWrsYGYwHWzGA3Si84IOkHXlbWTD1NB+9/1lcnweYKO54uhxZydNzfA==}
|
||||
engines: {node: '>=18'}
|
||||
cpu: [x64]
|
||||
os: [linux]
|
||||
|
||||
'@esbuild/netbsd-arm64@0.28.1':
|
||||
resolution: {integrity: sha512-oks0DYbLwWMmaakTsCb+zL4E+aHRVLom9IJZOAthMQEPiQmydXHkziYEsGYRx0uNV/IjEKGAV941JzH02pflqw==}
|
||||
engines: {node: '>=18'}
|
||||
cpu: [arm64]
|
||||
os: [netbsd]
|
||||
|
||||
'@esbuild/netbsd-x64@0.28.1':
|
||||
resolution: {integrity: sha512-aeL6lAnN89Hz43Mlh1G8ARasbuoYvSITDEx0tHh5b7jJnHcssqgjy9Yx430GDpmCa6OyrKoS0aNRjKundRizGg==}
|
||||
engines: {node: '>=18'}
|
||||
cpu: [x64]
|
||||
os: [netbsd]
|
||||
|
||||
'@esbuild/openbsd-arm64@0.28.1':
|
||||
resolution: {integrity: sha512-MEFJe5C3R8pwXdZ5Y21oo6m7ePiS0d9pWucn99O/wvyJZChoIQKrQDxKrGeW8F5+T0okTHesAmDeiHDTIq0V/Q==}
|
||||
engines: {node: '>=18'}
|
||||
cpu: [arm64]
|
||||
os: [openbsd]
|
||||
|
||||
'@esbuild/openbsd-x64@0.28.1':
|
||||
resolution: {integrity: sha512-i/ZLIOafE0Z8cI/XANJAixoJL/uRAoS2xOA3rb0xN+KK0K177cMAsQYkzHtBrtMXAKuAc7HGgcWiZ/sRC1Nxgw==}
|
||||
engines: {node: '>=18'}
|
||||
cpu: [x64]
|
||||
os: [openbsd]
|
||||
|
||||
'@esbuild/openharmony-arm64@0.28.1':
|
||||
resolution: {integrity: sha512-ge+Z7EXFNt2BO1oAMsVpiQ8EwndV9i1xXerAeTIK7AtPs3bKFXQM7nlRxDSIUIMeueR1CNXxqztLzdNeReKBJg==}
|
||||
engines: {node: '>=18'}
|
||||
cpu: [arm64]
|
||||
os: [openharmony]
|
||||
|
||||
'@esbuild/sunos-x64@0.28.1':
|
||||
resolution: {integrity: sha512-BEjgtECkL3vY+SaSQ6nzVfiALUeFxpawyp8Jmf5PtYhf1Ug40N1h/hxlhts+f1FvSvarEigdxS3BlSMI2PJLcQ==}
|
||||
engines: {node: '>=18'}
|
||||
cpu: [x64]
|
||||
os: [sunos]
|
||||
|
||||
'@esbuild/win32-arm64@0.28.1':
|
||||
resolution: {integrity: sha512-lCv9eK/H6ZJWbE7bh2nw54CZ9M2nupBxJcTsdk/QQnWkdSjKGuxmmH8/GWrlT1eMmZfn4dGcCjRte397WqfQXA==}
|
||||
engines: {node: '>=18'}
|
||||
cpu: [arm64]
|
||||
os: [win32]
|
||||
|
||||
'@esbuild/win32-ia32@0.28.1':
|
||||
resolution: {integrity: sha512-zvb/mB2bSCoJOpoCBgYKKpX6YM6mJBlBUVUtVj41DlZJVEB6/0CKlRYxP5wWl1C1ILiCoAU5wZZ4q1P3qeS6Eg==}
|
||||
engines: {node: '>=18'}
|
||||
cpu: [ia32]
|
||||
os: [win32]
|
||||
|
||||
'@esbuild/win32-x64@0.28.1':
|
||||
resolution: {integrity: sha512-bm4Mowrv+GXMlpWX++EcXw/iLyd1o3+bJkC2DkWXYVvgZCqD/bSj9ctZeAMC3cIxgjRVR2Dufaiu4YPxr5gW1A==}
|
||||
engines: {node: '>=18'}
|
||||
cpu: [x64]
|
||||
os: [win32]
|
||||
|
||||
'@napi-rs/wasm-runtime@1.1.4':
|
||||
resolution: {integrity: sha512-3NQNNgA1YSlJb/kMH1ildASP9HW7/7kYnRI2szWJaofaS1hWmbGI4H+d3+22aGzXXN9IJ+n+GiFVcGipJP18ow==}
|
||||
peerDependencies:
|
||||
@@ -881,6 +1043,11 @@ packages:
|
||||
es-module-lexer@1.7.0:
|
||||
resolution: {integrity: sha512-jEQoCwk8hyb2AZziIOLhDqpm5+2ww5uIE6lkO/6jcOCusfk6LhMHpXXfBLXTZ7Ydyt0j4VoUQv6uGNYbdW+kBA==}
|
||||
|
||||
esbuild@0.28.1:
|
||||
resolution: {integrity: sha512-HrJrvZv5ayxBzPfwphOoNzkzOIIlifzk0KJrGK2c8R4+LKpMtpYLQeUdjnwjWv/LZlkH2laZk+4w78pi99D4Vw==}
|
||||
engines: {node: '>=18'}
|
||||
hasBin: true
|
||||
|
||||
fast-deep-equal@3.1.3:
|
||||
resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==}
|
||||
|
||||
@@ -1101,6 +1268,11 @@ packages:
|
||||
tslib@2.8.1:
|
||||
resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==}
|
||||
|
||||
tsx@4.23.0:
|
||||
resolution: {integrity: sha512-eUdUIaCr963q2h5u3+QwvYp0+eqPvn+egeqZUm0hwERCqqx1E3kK5ehbGCvqSE5MQAULr67ww0cA3jKc3YkM1w==}
|
||||
engines: {node: '>=18.0.0'}
|
||||
hasBin: true
|
||||
|
||||
type-fest@4.41.0:
|
||||
resolution: {integrity: sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA==}
|
||||
engines: {node: '>=16'}
|
||||
@@ -1222,6 +1394,84 @@ snapshots:
|
||||
tslib: 2.8.1
|
||||
optional: true
|
||||
|
||||
'@esbuild/aix-ppc64@0.28.1':
|
||||
optional: true
|
||||
|
||||
'@esbuild/android-arm64@0.28.1':
|
||||
optional: true
|
||||
|
||||
'@esbuild/android-arm@0.28.1':
|
||||
optional: true
|
||||
|
||||
'@esbuild/android-x64@0.28.1':
|
||||
optional: true
|
||||
|
||||
'@esbuild/darwin-arm64@0.28.1':
|
||||
optional: true
|
||||
|
||||
'@esbuild/darwin-x64@0.28.1':
|
||||
optional: true
|
||||
|
||||
'@esbuild/freebsd-arm64@0.28.1':
|
||||
optional: true
|
||||
|
||||
'@esbuild/freebsd-x64@0.28.1':
|
||||
optional: true
|
||||
|
||||
'@esbuild/linux-arm64@0.28.1':
|
||||
optional: true
|
||||
|
||||
'@esbuild/linux-arm@0.28.1':
|
||||
optional: true
|
||||
|
||||
'@esbuild/linux-ia32@0.28.1':
|
||||
optional: true
|
||||
|
||||
'@esbuild/linux-loong64@0.28.1':
|
||||
optional: true
|
||||
|
||||
'@esbuild/linux-mips64el@0.28.1':
|
||||
optional: true
|
||||
|
||||
'@esbuild/linux-ppc64@0.28.1':
|
||||
optional: true
|
||||
|
||||
'@esbuild/linux-riscv64@0.28.1':
|
||||
optional: true
|
||||
|
||||
'@esbuild/linux-s390x@0.28.1':
|
||||
optional: true
|
||||
|
||||
'@esbuild/linux-x64@0.28.1':
|
||||
optional: true
|
||||
|
||||
'@esbuild/netbsd-arm64@0.28.1':
|
||||
optional: true
|
||||
|
||||
'@esbuild/netbsd-x64@0.28.1':
|
||||
optional: true
|
||||
|
||||
'@esbuild/openbsd-arm64@0.28.1':
|
||||
optional: true
|
||||
|
||||
'@esbuild/openbsd-x64@0.28.1':
|
||||
optional: true
|
||||
|
||||
'@esbuild/openharmony-arm64@0.28.1':
|
||||
optional: true
|
||||
|
||||
'@esbuild/sunos-x64@0.28.1':
|
||||
optional: true
|
||||
|
||||
'@esbuild/win32-arm64@0.28.1':
|
||||
optional: true
|
||||
|
||||
'@esbuild/win32-ia32@0.28.1':
|
||||
optional: true
|
||||
|
||||
'@esbuild/win32-x64@0.28.1':
|
||||
optional: true
|
||||
|
||||
'@napi-rs/wasm-runtime@1.1.4(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0)':
|
||||
dependencies:
|
||||
'@emnapi/core': 1.10.0
|
||||
@@ -1476,7 +1726,7 @@ snapshots:
|
||||
'@typescript/native-preview-win32-arm64': 7.0.0-dev.20260328.1
|
||||
'@typescript/native-preview-win32-x64': 7.0.0-dev.20260328.1
|
||||
|
||||
'@voidzero-dev/vite-plus-core@0.1.22(@types/node@24.12.2)(jiti@2.6.1)(typescript@6.0.3)(yaml@2.8.3)':
|
||||
'@voidzero-dev/vite-plus-core@0.1.22(@types/node@24.12.2)(esbuild@0.28.1)(jiti@2.6.1)(tsx@4.23.0)(typescript@6.0.3)(yaml@2.8.3)':
|
||||
dependencies:
|
||||
'@oxc-project/runtime': 0.129.0
|
||||
'@oxc-project/types': 0.129.0
|
||||
@@ -1484,12 +1734,14 @@ snapshots:
|
||||
postcss: 8.5.12
|
||||
optionalDependencies:
|
||||
'@types/node': 24.12.2
|
||||
esbuild: 0.28.1
|
||||
fsevents: 2.3.3
|
||||
jiti: 2.6.1
|
||||
tsx: 4.23.0
|
||||
typescript: 6.0.3
|
||||
yaml: 2.8.3
|
||||
|
||||
'@voidzero-dev/vite-plus-core@0.1.22(@types/node@25.6.0)(jiti@2.6.1)(typescript@6.0.3)(yaml@2.8.3)':
|
||||
'@voidzero-dev/vite-plus-core@0.1.22(@types/node@25.6.0)(esbuild@0.28.1)(jiti@2.6.1)(tsx@4.23.0)(typescript@6.0.3)(yaml@2.8.3)':
|
||||
dependencies:
|
||||
'@oxc-project/runtime': 0.129.0
|
||||
'@oxc-project/types': 0.129.0
|
||||
@@ -1497,8 +1749,10 @@ snapshots:
|
||||
postcss: 8.5.12
|
||||
optionalDependencies:
|
||||
'@types/node': 25.6.0
|
||||
esbuild: 0.28.1
|
||||
fsevents: 2.3.3
|
||||
jiti: 2.6.1
|
||||
tsx: 4.23.0
|
||||
typescript: 6.0.3
|
||||
yaml: 2.8.3
|
||||
|
||||
@@ -1520,11 +1774,11 @@ snapshots:
|
||||
'@voidzero-dev/vite-plus-linux-x64-musl@0.1.22':
|
||||
optional: true
|
||||
|
||||
'@voidzero-dev/vite-plus-test@0.1.22(@types/node@24.12.2)(jiti@2.6.1)(typescript@6.0.3)(vite@8.0.10(@types/node@24.12.2)(jiti@2.6.1)(yaml@2.8.3))(yaml@2.8.3)':
|
||||
'@voidzero-dev/vite-plus-test@0.1.22(@types/node@24.12.2)(esbuild@0.28.1)(jiti@2.6.1)(tsx@4.23.0)(typescript@6.0.3)(vite@8.0.10(@types/node@24.12.2)(esbuild@0.28.1)(jiti@2.6.1)(tsx@4.23.0)(yaml@2.8.3))(yaml@2.8.3)':
|
||||
dependencies:
|
||||
'@standard-schema/spec': 1.1.0
|
||||
'@types/chai': 5.2.3
|
||||
'@voidzero-dev/vite-plus-core': 0.1.22(@types/node@24.12.2)(jiti@2.6.1)(typescript@6.0.3)(yaml@2.8.3)
|
||||
'@voidzero-dev/vite-plus-core': 0.1.22(@types/node@24.12.2)(esbuild@0.28.1)(jiti@2.6.1)(tsx@4.23.0)(typescript@6.0.3)(yaml@2.8.3)
|
||||
es-module-lexer: 1.7.0
|
||||
obug: 2.1.1
|
||||
pixelmatch: 7.2.0
|
||||
@@ -1534,7 +1788,7 @@ snapshots:
|
||||
tinybench: 2.9.0
|
||||
tinyexec: 1.1.2
|
||||
tinyglobby: 0.2.16
|
||||
vite: 8.0.10(@types/node@24.12.2)(jiti@2.6.1)(yaml@2.8.3)
|
||||
vite: 8.0.10(@types/node@24.12.2)(esbuild@0.28.1)(jiti@2.6.1)(tsx@4.23.0)(yaml@2.8.3)
|
||||
ws: 8.20.0
|
||||
optionalDependencies:
|
||||
'@types/node': 24.12.2
|
||||
@@ -1560,11 +1814,11 @@ snapshots:
|
||||
- utf-8-validate
|
||||
- yaml
|
||||
|
||||
'@voidzero-dev/vite-plus-test@0.1.22(@types/node@25.6.0)(jiti@2.6.1)(typescript@6.0.3)(vite@8.0.10(@types/node@25.6.0)(jiti@2.6.1)(yaml@2.8.3))(yaml@2.8.3)':
|
||||
'@voidzero-dev/vite-plus-test@0.1.22(@types/node@25.6.0)(esbuild@0.28.1)(jiti@2.6.1)(tsx@4.23.0)(typescript@6.0.3)(vite@8.0.10(@types/node@25.6.0)(esbuild@0.28.1)(jiti@2.6.1)(tsx@4.23.0)(yaml@2.8.3))(yaml@2.8.3)':
|
||||
dependencies:
|
||||
'@standard-schema/spec': 1.1.0
|
||||
'@types/chai': 5.2.3
|
||||
'@voidzero-dev/vite-plus-core': 0.1.22(@types/node@25.6.0)(jiti@2.6.1)(typescript@6.0.3)(yaml@2.8.3)
|
||||
'@voidzero-dev/vite-plus-core': 0.1.22(@types/node@25.6.0)(esbuild@0.28.1)(jiti@2.6.1)(tsx@4.23.0)(typescript@6.0.3)(yaml@2.8.3)
|
||||
es-module-lexer: 1.7.0
|
||||
obug: 2.1.1
|
||||
pixelmatch: 7.2.0
|
||||
@@ -1574,7 +1828,7 @@ snapshots:
|
||||
tinybench: 2.9.0
|
||||
tinyexec: 1.1.2
|
||||
tinyglobby: 0.2.16
|
||||
vite: 8.0.10(@types/node@25.6.0)(jiti@2.6.1)(yaml@2.8.3)
|
||||
vite: 8.0.10(@types/node@25.6.0)(esbuild@0.28.1)(jiti@2.6.1)(tsx@4.23.0)(yaml@2.8.3)
|
||||
ws: 8.20.0
|
||||
optionalDependencies:
|
||||
'@types/node': 25.6.0
|
||||
@@ -1650,6 +1904,35 @@ snapshots:
|
||||
|
||||
es-module-lexer@1.7.0: {}
|
||||
|
||||
esbuild@0.28.1:
|
||||
optionalDependencies:
|
||||
'@esbuild/aix-ppc64': 0.28.1
|
||||
'@esbuild/android-arm': 0.28.1
|
||||
'@esbuild/android-arm64': 0.28.1
|
||||
'@esbuild/android-x64': 0.28.1
|
||||
'@esbuild/darwin-arm64': 0.28.1
|
||||
'@esbuild/darwin-x64': 0.28.1
|
||||
'@esbuild/freebsd-arm64': 0.28.1
|
||||
'@esbuild/freebsd-x64': 0.28.1
|
||||
'@esbuild/linux-arm': 0.28.1
|
||||
'@esbuild/linux-arm64': 0.28.1
|
||||
'@esbuild/linux-ia32': 0.28.1
|
||||
'@esbuild/linux-loong64': 0.28.1
|
||||
'@esbuild/linux-mips64el': 0.28.1
|
||||
'@esbuild/linux-ppc64': 0.28.1
|
||||
'@esbuild/linux-riscv64': 0.28.1
|
||||
'@esbuild/linux-s390x': 0.28.1
|
||||
'@esbuild/linux-x64': 0.28.1
|
||||
'@esbuild/netbsd-arm64': 0.28.1
|
||||
'@esbuild/netbsd-x64': 0.28.1
|
||||
'@esbuild/openbsd-arm64': 0.28.1
|
||||
'@esbuild/openbsd-x64': 0.28.1
|
||||
'@esbuild/openharmony-arm64': 0.28.1
|
||||
'@esbuild/sunos-x64': 0.28.1
|
||||
'@esbuild/win32-arm64': 0.28.1
|
||||
'@esbuild/win32-ia32': 0.28.1
|
||||
'@esbuild/win32-x64': 0.28.1
|
||||
|
||||
fast-deep-equal@3.1.3: {}
|
||||
|
||||
fast-uri@3.1.2: {}
|
||||
@@ -1868,6 +2151,12 @@ snapshots:
|
||||
tslib@2.8.1:
|
||||
optional: true
|
||||
|
||||
tsx@4.23.0:
|
||||
dependencies:
|
||||
esbuild: 0.28.1
|
||||
optionalDependencies:
|
||||
fsevents: 2.3.3
|
||||
|
||||
type-fest@4.41.0: {}
|
||||
|
||||
typescript@6.0.3: {}
|
||||
@@ -1879,12 +2168,12 @@ snapshots:
|
||||
|
||||
undici@8.4.1: {}
|
||||
|
||||
vite-plus@0.1.22(@types/node@24.12.2)(jiti@2.6.1)(typescript@6.0.3)(vite@8.0.10(@types/node@24.12.2)(jiti@2.6.1)(yaml@2.8.3))(yaml@2.8.3):
|
||||
vite-plus@0.1.22(@types/node@24.12.2)(esbuild@0.28.1)(jiti@2.6.1)(tsx@4.23.0)(typescript@6.0.3)(vite@8.0.10(@types/node@24.12.2)(esbuild@0.28.1)(jiti@2.6.1)(tsx@4.23.0)(yaml@2.8.3))(yaml@2.8.3):
|
||||
dependencies:
|
||||
'@oxc-project/types': 0.129.0
|
||||
'@oxlint/plugins': 1.61.0
|
||||
'@voidzero-dev/vite-plus-core': 0.1.22(@types/node@24.12.2)(jiti@2.6.1)(typescript@6.0.3)(yaml@2.8.3)
|
||||
'@voidzero-dev/vite-plus-test': 0.1.22(@types/node@24.12.2)(jiti@2.6.1)(typescript@6.0.3)(vite@8.0.10(@types/node@24.12.2)(jiti@2.6.1)(yaml@2.8.3))(yaml@2.8.3)
|
||||
'@voidzero-dev/vite-plus-core': 0.1.22(@types/node@24.12.2)(esbuild@0.28.1)(jiti@2.6.1)(tsx@4.23.0)(typescript@6.0.3)(yaml@2.8.3)
|
||||
'@voidzero-dev/vite-plus-test': 0.1.22(@types/node@24.12.2)(esbuild@0.28.1)(jiti@2.6.1)(tsx@4.23.0)(typescript@6.0.3)(vite@8.0.10(@types/node@24.12.2)(esbuild@0.28.1)(jiti@2.6.1)(tsx@4.23.0)(yaml@2.8.3))(yaml@2.8.3)
|
||||
oxfmt: 0.48.0
|
||||
oxlint: 1.63.0(oxlint-tsgolint@0.22.1)
|
||||
oxlint-tsgolint: 0.22.1
|
||||
@@ -1928,12 +2217,12 @@ snapshots:
|
||||
- vite
|
||||
- yaml
|
||||
|
||||
vite-plus@0.1.22(@types/node@25.6.0)(jiti@2.6.1)(typescript@6.0.3)(vite@8.0.10(@types/node@25.6.0)(jiti@2.6.1)(yaml@2.8.3))(yaml@2.8.3):
|
||||
vite-plus@0.1.22(@types/node@25.6.0)(esbuild@0.28.1)(jiti@2.6.1)(tsx@4.23.0)(typescript@6.0.3)(vite@8.0.10(@types/node@25.6.0)(esbuild@0.28.1)(jiti@2.6.1)(tsx@4.23.0)(yaml@2.8.3))(yaml@2.8.3):
|
||||
dependencies:
|
||||
'@oxc-project/types': 0.129.0
|
||||
'@oxlint/plugins': 1.61.0
|
||||
'@voidzero-dev/vite-plus-core': 0.1.22(@types/node@25.6.0)(jiti@2.6.1)(typescript@6.0.3)(yaml@2.8.3)
|
||||
'@voidzero-dev/vite-plus-test': 0.1.22(@types/node@25.6.0)(jiti@2.6.1)(typescript@6.0.3)(vite@8.0.10(@types/node@25.6.0)(jiti@2.6.1)(yaml@2.8.3))(yaml@2.8.3)
|
||||
'@voidzero-dev/vite-plus-core': 0.1.22(@types/node@25.6.0)(esbuild@0.28.1)(jiti@2.6.1)(tsx@4.23.0)(typescript@6.0.3)(yaml@2.8.3)
|
||||
'@voidzero-dev/vite-plus-test': 0.1.22(@types/node@25.6.0)(esbuild@0.28.1)(jiti@2.6.1)(tsx@4.23.0)(typescript@6.0.3)(vite@8.0.10(@types/node@25.6.0)(esbuild@0.28.1)(jiti@2.6.1)(tsx@4.23.0)(yaml@2.8.3))(yaml@2.8.3)
|
||||
oxfmt: 0.48.0
|
||||
oxlint: 1.63.0(oxlint-tsgolint@0.22.1)
|
||||
oxlint-tsgolint: 0.22.1
|
||||
@@ -1977,7 +2266,7 @@ snapshots:
|
||||
- vite
|
||||
- yaml
|
||||
|
||||
vite@8.0.10(@types/node@24.12.2)(jiti@2.6.1)(yaml@2.8.3):
|
||||
vite@8.0.10(@types/node@24.12.2)(esbuild@0.28.1)(jiti@2.6.1)(tsx@4.23.0)(yaml@2.8.3):
|
||||
dependencies:
|
||||
lightningcss: 1.32.0
|
||||
picomatch: 4.0.4
|
||||
@@ -1986,11 +2275,13 @@ snapshots:
|
||||
tinyglobby: 0.2.16
|
||||
optionalDependencies:
|
||||
'@types/node': 24.12.2
|
||||
esbuild: 0.28.1
|
||||
fsevents: 2.3.3
|
||||
jiti: 2.6.1
|
||||
tsx: 4.23.0
|
||||
yaml: 2.8.3
|
||||
|
||||
vite@8.0.10(@types/node@25.6.0)(jiti@2.6.1)(yaml@2.8.3):
|
||||
vite@8.0.10(@types/node@25.6.0)(esbuild@0.28.1)(jiti@2.6.1)(tsx@4.23.0)(yaml@2.8.3):
|
||||
dependencies:
|
||||
lightningcss: 1.32.0
|
||||
picomatch: 4.0.4
|
||||
@@ -1999,8 +2290,10 @@ snapshots:
|
||||
tinyglobby: 0.2.16
|
||||
optionalDependencies:
|
||||
'@types/node': 25.6.0
|
||||
esbuild: 0.28.1
|
||||
fsevents: 2.3.3
|
||||
jiti: 2.6.1
|
||||
tsx: 4.23.0
|
||||
yaml: 2.8.3
|
||||
|
||||
widest-line@5.0.0:
|
||||
|
||||
@@ -7,6 +7,7 @@ catalog:
|
||||
ajv: ^8.20.0
|
||||
boxen: ^8.0.1
|
||||
chalk: ^5.6.2
|
||||
tsx: ^4.23.0
|
||||
typescript: ^5
|
||||
undici: ^8.4.1
|
||||
vite: npm:@voidzero-dev/vite-plus-core@latest
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
* Committed to git; consumed by the `bailian-cli` Agent Skill (`npx skills add modelstudioai/cli`).
|
||||
*
|
||||
* Run: pnpm --filter bailian-cli run generate:reference
|
||||
* (Also run via `pnpm run sync:skill-assets` or the repo pre-commit hook; requires built `bailian-cli-core`.)
|
||||
* Also run via `pnpm run sync:skill-assets` or the repo pre-commit hook.
|
||||
* Uses tsx because workspace packages resolve to source locally.
|
||||
* Requires built `bailian-cli-core` for shared flag constants.
|
||||
*/
|
||||
import { mkdirSync, readdirSync, rmSync, writeFileSync } from "node:fs";
|
||||
import { dirname, join } from "node:path";
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
"noEmit": true,
|
||||
"module": "nodenext",
|
||||
"moduleResolution": "nodenext",
|
||||
"customConditions": ["@bailian-cli/source"],
|
||||
"allowImportingTsExtensions": true,
|
||||
"esModuleInterop": true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user