@longzai-intelligence-plugin/kit 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +15 -14
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { CheckReport, PluginCommandResult } from "@longzai-intelligence-plugin/c
|
|
|
4
4
|
/**
|
|
5
5
|
* 子进程执行服务,机制七的执行面
|
|
6
6
|
*
|
|
7
|
-
* 统一 cwd
|
|
7
|
+
* 统一 cwd 注入、超时、退出码、输出尾部摘录与可选流式转发,宿主无关,
|
|
8
8
|
* 使用 node 标准 child_process,bun 与 node 宿主均可运行
|
|
9
9
|
*/
|
|
10
10
|
/**
|
|
@@ -12,7 +12,7 @@ import { CheckReport, PluginCommandResult } from "@longzai-intelligence-plugin/c
|
|
|
12
12
|
*/
|
|
13
13
|
type ExecSpec = {
|
|
14
14
|
/**
|
|
15
|
-
*
|
|
15
|
+
* 命令名,如 `bun`
|
|
16
16
|
*/
|
|
17
17
|
command: string;
|
|
18
18
|
/**
|
|
@@ -127,7 +127,7 @@ type RootScriptProbe = {
|
|
|
127
127
|
* 探测目标仓 root 脚本形态
|
|
128
128
|
*
|
|
129
129
|
* @param repoRoot - 目标仓根绝对路径
|
|
130
|
-
* @param scriptName - scripts
|
|
130
|
+
* @param scriptName - scripts 键名,如 `lint`、`test`
|
|
131
131
|
* @returns 形态与原文
|
|
132
132
|
*/
|
|
133
133
|
declare function probeRootScript(repoRoot: string, scriptName: string): RootScriptProbe;
|
|
@@ -141,9 +141,10 @@ type QualityTaskInvocation = {
|
|
|
141
141
|
/**
|
|
142
142
|
* 质量任务的执行改道决策
|
|
143
143
|
*
|
|
144
|
-
*
|
|
145
|
-
* `bun
|
|
146
|
-
*
|
|
144
|
+
* @remarks
|
|
145
|
+
* 直跑形态执行 `bun run <scriptName>`
|
|
146
|
+
* forbid 哨兵与 echo 禁令形态改道 `bun turbo run <scriptName>`
|
|
147
|
+
* 脚本缺失返回 null,由调用方记 skip
|
|
147
148
|
* @param probe - 探测结果
|
|
148
149
|
* @param scriptName - scripts 键名
|
|
149
150
|
* @returns 执行命令与参数,缺失时为 null
|
|
@@ -160,23 +161,23 @@ type OutputFormat = 'text' | 'json';
|
|
|
160
161
|
*/
|
|
161
162
|
type RenderColor = {
|
|
162
163
|
/**
|
|
163
|
-
*
|
|
164
|
+
* 绿色,通过态
|
|
164
165
|
*/
|
|
165
166
|
green: (text: string) => string;
|
|
166
167
|
/**
|
|
167
|
-
*
|
|
168
|
+
* 红色,失败态
|
|
168
169
|
*/
|
|
169
170
|
red: (text: string) => string;
|
|
170
171
|
/**
|
|
171
|
-
*
|
|
172
|
+
* 黄色,警告态
|
|
172
173
|
*/
|
|
173
174
|
yellow: (text: string) => string;
|
|
174
175
|
/**
|
|
175
|
-
*
|
|
176
|
+
* 灰色,次要信息
|
|
176
177
|
*/
|
|
177
178
|
gray: (text: string) => string;
|
|
178
179
|
/**
|
|
179
|
-
*
|
|
180
|
+
* 加粗,汇总标题
|
|
180
181
|
*/
|
|
181
182
|
bold: (text: string) => string;
|
|
182
183
|
};
|
|
@@ -185,7 +186,7 @@ type RenderColor = {
|
|
|
185
186
|
*
|
|
186
187
|
* @param report - 检查报告
|
|
187
188
|
* @param color - 着色器
|
|
188
|
-
* @returns
|
|
189
|
+
* @returns 行数组,含逐项行与失败摘录面板与汇总行
|
|
189
190
|
*/
|
|
190
191
|
declare function renderCheckReportLines(report: CheckReport, color: RenderColor): string[];
|
|
191
192
|
/**
|
|
@@ -193,7 +194,7 @@ declare function renderCheckReportLines(report: CheckReport, color: RenderColor)
|
|
|
193
194
|
*/
|
|
194
195
|
type PrintPluginCommandResultOptions = {
|
|
195
196
|
/**
|
|
196
|
-
*
|
|
197
|
+
* 输出格式,text 人读或 json 机读
|
|
197
198
|
*/
|
|
198
199
|
format: OutputFormat;
|
|
199
200
|
/**
|
|
@@ -206,7 +207,7 @@ type PrintPluginCommandResultOptions = {
|
|
|
206
207
|
write: (line: string) => void;
|
|
207
208
|
};
|
|
208
209
|
/**
|
|
209
|
-
*
|
|
210
|
+
* 输出命令结果,text 或 json 双模式
|
|
210
211
|
*
|
|
211
212
|
* @param result - 命令结果
|
|
212
213
|
* @param options - 输出选项
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@longzai-intelligence-plugin/kit",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Longzai Intelligence Plugin 零框架工具包",
|
|
6
6
|
"keywords": [
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"clean": "lzi-dev-cli clean"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@longzai-intelligence-plugin/core": "0.0.
|
|
38
|
+
"@longzai-intelligence-plugin/core": "0.0.3",
|
|
39
39
|
"zod": "^4.4.3"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {}
|