@d5render/cli 0.1.39 → 0.1.40

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 +6 -8
  2. package/package.json +1 -1
package/bin/d5cli CHANGED
@@ -2,7 +2,7 @@
2
2
  import { execSync, spawn } from "node:child_process";
3
3
  import { copyFileSync, existsSync, mkdirSync, readFileSync, readdirSync, rmSync, writeFileSync } from "node:fs";
4
4
  import { dirname, join } from "node:path";
5
- import { arch, argv, env, exit, platform } from "node:process";
5
+ import { argv, env, exit, platform } from "node:process";
6
6
  import { fileURLToPath } from "node:url";
7
7
 
8
8
  //#region copilot/server/config.ts
@@ -109,7 +109,7 @@ function installCopilot() {
109
109
  //#endregion
110
110
  //#region package.json
111
111
  var name = "@d5render/cli";
112
- var version = "0.1.39";
112
+ var version = "0.1.40";
113
113
 
114
114
  //#endregion
115
115
  //#region packages/gitlab/url.ts
@@ -278,8 +278,8 @@ Otherwise, use chinese as default language to call the mcp tool '${name$1}-${rep
278
278
  ],
279
279
  ...platform === "win32" && { windowsHide: true }
280
280
  });
281
- copilot.stdout.on("data", (chunk) => console.log(String(chunk)));
282
- copilot.stderr.on("data", (chunk) => console.error(String(chunk)));
281
+ copilot.stdout.on("data", (chunk) => console.log("Stdout:" + String(chunk)));
282
+ copilot.stderr.on("data", (chunk) => console.error("Stderr:" + String(chunk)));
283
283
  copilot.on("close", (code) => {
284
284
  if (!code) dingding("CRITICAL", "CI ERROR: 代码审查任务失败,请自行检查日志");
285
285
  exit(code);
@@ -289,10 +289,6 @@ Otherwise, use chinese as default language to call the mcp tool '${name$1}-${rep
289
289
  * 根据操作系统和架构获取对应的 copilot 包名
290
290
  */
291
291
  function getCopilotPackageName() {
292
- if (platform === "win32" && arch === "x64") return "@github/copilot-win32-x64";
293
- else if (platform === "linux" && arch === "x64") return "@github/copilot-linux-x64";
294
- else if (platform === "linux" && arch === "arm64") return "@github/copilot-linux-arm64";
295
- else if (platform === "darwin" && arch === "arm64") return "@github/copilot-darwin-arm64";
296
292
  return "@github/copilot";
297
293
  }
298
294
  function findCopilopt() {
@@ -316,6 +312,8 @@ function findCopilopt() {
316
312
  if (!existsSync(pkg)) throw new Error("安装的包找不到正确版本 " + pkg);
317
313
  const copilotPackage = JSON.parse(readFileSync(pkg, "utf8"));
318
314
  const binPath = typeof copilotPackage.bin === "string" ? copilotPackage.bin : copilotPackage.bin?.copilot || copilotPackage.bin?.[platformPackage] || copilotPackage.bin?.["@github/copilot"];
315
+ console.log("binPath:", binPath);
316
+ console.log("copilotPackage:", copilotPackage);
319
317
  if (!binPath) throw new Error("non copilot executable found");
320
318
  const copilotVersion = copilotPackage.version || "unknown";
321
319
  const copilotPath = join(copilot, binPath);
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.39",
7
+ "version": "0.1.40",
8
8
  "devDependencies": {
9
9
  "@modelcontextprotocol/sdk": "^1.25.1",
10
10
  "@types/node": "^25.0.3",