@d5render/cli 0.1.50 → 0.1.53
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/bin/copilot.js +1 -2
- package/bin/d5cli +13 -13
- package/package.json +1 -1
package/bin/copilot.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import process$1, { argv
|
|
1
|
+
import process$1, { argv } from "node:process";
|
|
2
2
|
import { dirname, join } from "node:path";
|
|
3
3
|
import { fileURLToPath } from "node:url";
|
|
4
4
|
|
|
@@ -18844,7 +18844,6 @@ const tools = [
|
|
|
18844
18844
|
"--deny-tool",
|
|
18845
18845
|
"github-mcp-server"
|
|
18846
18846
|
];
|
|
18847
|
-
if (platform === "linux") tools.push("--model", "gemini-3-pro-preview");
|
|
18848
18847
|
function toEnv(key, defaultValue) {
|
|
18849
18848
|
return envJson[key] || process.env[key] || defaultValue;
|
|
18850
18849
|
}
|
package/bin/d5cli
CHANGED
|
@@ -46,7 +46,6 @@ const tools = [
|
|
|
46
46
|
"--deny-tool",
|
|
47
47
|
"github-mcp-server"
|
|
48
48
|
];
|
|
49
|
-
if (platform === "linux") tools.push("--model", "gemini-3-pro-preview");
|
|
50
49
|
function toEnv(key, defaultValue) {
|
|
51
50
|
return envJson[key] || process.env[key] || defaultValue;
|
|
52
51
|
}
|
|
@@ -108,7 +107,7 @@ function installCopilot() {
|
|
|
108
107
|
//#endregion
|
|
109
108
|
//#region package.json
|
|
110
109
|
var name = "@d5render/cli";
|
|
111
|
-
var version = "0.1.
|
|
110
|
+
var version = "0.1.53";
|
|
112
111
|
|
|
113
112
|
//#endregion
|
|
114
113
|
//#region packages/gitlab/url.ts
|
|
@@ -191,12 +190,6 @@ async function deploy() {
|
|
|
191
190
|
if (!env.CI) return;
|
|
192
191
|
const HOME = env.USERPROFILE ?? env.HOME ?? env.HOMEPATH;
|
|
193
192
|
if (!HOME) throw new Error("cannot find `USERPROFILE` directory");
|
|
194
|
-
const config = join(HOME, ".copilot/config.json"), dir = join(HOME, ".copilot/skills/code-review");
|
|
195
|
-
console.log("deploy...");
|
|
196
|
-
if (existsSync(config)) {
|
|
197
|
-
rmSync(config);
|
|
198
|
-
console.log("removed config cache.");
|
|
199
|
-
}
|
|
200
193
|
const changelog = readFileSync(join(RUNTIME_CWD, "CHANGELOG.md"), "utf8");
|
|
201
194
|
const cachepath = join(TEMP, "CHANGELOG-" + env.CI_RUNNER_ID || "0");
|
|
202
195
|
let cache = "";
|
|
@@ -207,6 +200,12 @@ async function deploy() {
|
|
|
207
200
|
console.log("updated CHANGELOG cache.");
|
|
208
201
|
await dingding("NOTICE", `code-review/SKILL.md 更新\n\n细节请参考 [线上文档内容.skills](https://www.npmjs.com/package/@d5render/cli?activeTab=code)`);
|
|
209
202
|
}
|
|
203
|
+
const config = join(HOME, ".copilot/config.json"), dir = join(HOME, ".copilot/skills/code-review");
|
|
204
|
+
console.log("deploy...");
|
|
205
|
+
if (existsSync(config)) {
|
|
206
|
+
rmSync(config);
|
|
207
|
+
console.log("removed config cache.");
|
|
208
|
+
}
|
|
210
209
|
if (existsSync(dir)) rmSync(dir, {
|
|
211
210
|
recursive: true,
|
|
212
211
|
force: true
|
|
@@ -285,15 +284,16 @@ Otherwise, use chinese as default language to call the mcp tool '${name$1}-${rep
|
|
|
285
284
|
"pipe",
|
|
286
285
|
"pipe"
|
|
287
286
|
],
|
|
288
|
-
...platform === "win32" && { windowsHide: true }
|
|
287
|
+
...platform === "win32" && { windowsHide: true },
|
|
288
|
+
env: {
|
|
289
|
+
HTTP_PROXY: process.env.HTTP_PROXY || process.env.http_proxy || "",
|
|
290
|
+
HTTPS_PROXY: process.env.HTTPS_PROXY || process.env.https_proxy || ""
|
|
291
|
+
}
|
|
289
292
|
});
|
|
290
293
|
copilot.stdout.on("data", (chunk) => console.log(String(chunk)));
|
|
291
294
|
copilot.stderr.on("data", (chunk) => console.error(String(chunk)));
|
|
292
295
|
return new Promise((res, rej) => {
|
|
293
|
-
copilot.on("close", (code) =>
|
|
294
|
-
if (!code) rej(/* @__PURE__ */ new Error("CI ERROR: 代码审查任务失败,请自行检查日志"));
|
|
295
|
-
else res();
|
|
296
|
-
});
|
|
296
|
+
copilot.on("close", (code) => res());
|
|
297
297
|
});
|
|
298
298
|
}
|
|
299
299
|
function findCopilopt() {
|