@d5render/cli 0.1.24 → 0.1.27

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.
Files changed (2) hide show
  1. package/bin/d5cli +24 -3
  2. package/package.json +1 -1
package/bin/d5cli CHANGED
@@ -7,7 +7,7 @@ import { fileURLToPath } from "node:url";
7
7
 
8
8
  //#region package.json
9
9
  var name$1 = "@d5render/cli";
10
- var version = "0.1.24";
10
+ var version = "0.1.27";
11
11
 
12
12
  //#endregion
13
13
  //#region packages/gitlab/url.ts
@@ -239,6 +239,7 @@ function installCopilot() {
239
239
  //#endregion
240
240
  //#region copilot/bin/index.ts
241
241
  try {
242
+ console.log("开始代码审查-1");
242
243
  codereview();
243
244
  } catch (error) {
244
245
  sendding("CRITICAL", "CRITICAL CI ERROR: 未知错误,请自行检查日志");
@@ -251,6 +252,7 @@ function codereview() {
251
252
  return;
252
253
  }
253
254
  install();
255
+ console.log("开始代码审查-2");
254
256
  const prompt = `Load skills, then call the mcp tool '${name}-${getHash}' to load code-review commits, if the task encounters an error, throw that.
255
257
  Otherwise, use chinese as default language to call the mcp tool '${name}-${report}'`;
256
258
  const copilot = spawn("node", [
@@ -267,10 +269,29 @@ Otherwise, use chinese as default language to call the mcp tool '${name}-${repor
267
269
  "pipe",
268
270
  "pipe"
269
271
  ],
272
+ env: {
273
+ ...env,
274
+ NODE_NO_WARNINGS: "1",
275
+ PYTHONUNBUFFERED: "1"
276
+ },
270
277
  ...platform === "win32" && { windowsHide: true }
271
278
  });
272
- copilot.stdout.on("data", (chunk) => console.log(String(chunk)));
273
- copilot.stderr.on("data", (chunk) => console.error(String(chunk)));
279
+ copilot.stdout.setEncoding("utf8");
280
+ copilot.stderr.setEncoding("utf8");
281
+ let str = "";
282
+ function write(chunk) {
283
+ console.log(String(chunk));
284
+ }
285
+ copilot.stdout.on("data", (chunk) => {
286
+ str += chunk;
287
+ process.stdout.write(chunk);
288
+ write(chunk);
289
+ });
290
+ copilot.stderr.on("data", (chunk) => {
291
+ str += chunk;
292
+ process.stderr.write(chunk);
293
+ write(chunk);
294
+ });
274
295
  copilot.on("close", (code) => {
275
296
  sendding("CRITICAL", "CRITICAL CI ERROR: 代码审查任务失败,请自行检查日志");
276
297
  exit(code);
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "license": "MIT",
5
5
  "author": "jasirou",
6
6
  "main": "./bin/d5cli",
7
- "version": "0.1.24",
7
+ "version": "0.1.27",
8
8
  "devDependencies": {
9
9
  "@modelcontextprotocol/sdk": "^1.25.1",
10
10
  "@types/node": "^25.0.3",