mirror of
https://github.com/modelstudioai/cli.git
synced 2026-09-14 19:49:23 +08:00
Merge branch 'main' into feat/model-usage-and-detail
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env sh
|
||||
set -eu
|
||||
|
||||
# Regenerate skill reference + SKILL metadata (needs bailian-cli-core dist).
|
||||
# Regenerate skill reference + SKILL metadata from source (no package build).
|
||||
pnpm run sync:skill-assets
|
||||
|
||||
# Stage generator output so it is included in this commit.
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
|
||||
- [ ] `.vite-hooks/pre-commit` 改动后,`pnpm install` 重新软链(走 `prepare: vp config`)
|
||||
- [ ] 增加 hook 时,确认在干净 clone 后能自动激活
|
||||
- [ ] pre-commit 会跑 `pnpm run sync:skill-assets`(先 build core,再 `generate:reference` + `sync:skill-version`)并 `git add` skill 资产,最后 `vp staged`
|
||||
- [ ] pre-commit 会跑 `pnpm run sync:skill-assets`(`generate:reference` 含格式化 + `sync:skill-version`,直接读源码、无需先 build)并 `git add` skill 资产,最后 `vp staged`
|
||||
|
||||
### F. CI / 发版工具
|
||||
|
||||
|
||||
+1
-1
@@ -16,7 +16,7 @@
|
||||
"ready": "vp check && vp run -r test && vp run -r build",
|
||||
"prepare": "vp config",
|
||||
"check": "vp check",
|
||||
"sync:skill-assets": "pnpm --filter \"bailian-cli^...\" run build && pnpm --filter bailian-cli run generate:reference && pnpm --filter bailian-cli run sync:skill-version",
|
||||
"sync:skill-assets": "pnpm --filter bailian-cli run generate:reference && pnpm --filter bailian-cli run sync:skill-version",
|
||||
"dev": "pnpm -F bailian-cli-core dev",
|
||||
"bl": "pnpm -F bailian-cli dev",
|
||||
"kscli": "pnpm -F knowledge-studio-cli dev",
|
||||
|
||||
@@ -7,8 +7,7 @@
|
||||
*
|
||||
* Run: pnpm --filter bailian-cli run generate:reference
|
||||
* 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.
|
||||
* Uses tsx and reads workspace packages from source
|
||||
*/
|
||||
import { mkdirSync, readdirSync, rmSync, writeFileSync } from "node:fs";
|
||||
import { dirname, join } from "node:path";
|
||||
@@ -19,8 +18,10 @@ import {
|
||||
MODEL_AUTH_FLAGS,
|
||||
OPENAPI_AUTH_FLAGS,
|
||||
credentialFlagDefs,
|
||||
} from "../packages/core/dist/index.mjs";
|
||||
import type { AnyCommand, FlagDef, FlagsDef } from "../packages/core/src/index.ts";
|
||||
type AnyCommand,
|
||||
type FlagDef,
|
||||
type FlagsDef,
|
||||
} from "../packages/core/src/index.ts";
|
||||
import { commands } from "../packages/cli/src/commands.ts";
|
||||
|
||||
const __dirname = dirname(fileURLToPath(import.meta.url));
|
||||
|
||||
Reference in New Issue
Block a user