@d5render/cli 0.1.82 → 0.1.83
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/d5cli +29 -10
- package/package.json +1 -1
package/bin/d5cli
CHANGED
|
@@ -8,7 +8,7 @@ import { fileURLToPath } from "node:url";
|
|
|
8
8
|
|
|
9
9
|
//#region package.json
|
|
10
10
|
var name$1 = "@d5render/cli";
|
|
11
|
-
var version = "0.1.
|
|
11
|
+
var version = "0.1.83";
|
|
12
12
|
|
|
13
13
|
//#endregion
|
|
14
14
|
//#region packages/env.ts
|
|
@@ -311,6 +311,11 @@ async function deploy() {
|
|
|
311
311
|
//#endregion
|
|
312
312
|
//#region review/copilot/index.ts
|
|
313
313
|
const bind = "copilot";
|
|
314
|
+
const TOKEN_KEYS = [
|
|
315
|
+
"COPILOT_GITHUB_TOKEN",
|
|
316
|
+
"GH_TOKEN",
|
|
317
|
+
"GITHUB_TOKEN"
|
|
318
|
+
];
|
|
314
319
|
async function cli() {
|
|
315
320
|
await deploy();
|
|
316
321
|
const httpProxy = env.HTTP_PROXY || env.http_proxy || "";
|
|
@@ -320,18 +325,32 @@ async function cli() {
|
|
|
320
325
|
console.log("@d5render/cli version:", VERSION);
|
|
321
326
|
const childEnv = platform === "win32" ? void 0 : env;
|
|
322
327
|
if (childEnv) {
|
|
323
|
-
console.log("child env keys count:", Object.keys(childEnv).length);
|
|
324
|
-
console.log("child env token keys present:", [
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
328
|
+
console.log("[env] child env keys count:", Object.keys(childEnv).length);
|
|
329
|
+
console.log("[env] child env token keys present:", TOKEN_KEYS.filter((k) => childEnv[k]).join(", ") || "(none)");
|
|
330
|
+
const check = spawnSync(process.execPath, ["-e", `
|
|
331
|
+
const ok = process.env.COPILOT_GITHUB_TOKEN ? 'OK' : 'MISSING';
|
|
332
|
+
console.log('[env] env injected:', ok);
|
|
333
|
+
const keys = ['COPILOT_GITHUB_TOKEN','GH_TOKEN','GITHUB_TOKEN'];
|
|
334
|
+
const lengths = keys.map(k => k + '=' + (process.env[k]?.length ?? 0)).join(', ');
|
|
335
|
+
console.log('[env] token lengths (7~8 may be literal [MASKED]):', lengths);
|
|
336
|
+
`.trim()], {
|
|
330
337
|
env: childEnv,
|
|
331
338
|
encoding: "utf8"
|
|
332
339
|
});
|
|
333
|
-
|
|
334
|
-
|
|
340
|
+
(check.stdout?.trim() || check.stderr?.trim() || "").split("\n").forEach((line) => console.log(line));
|
|
341
|
+
const parentLengths = TOKEN_KEYS.map((k) => `${k}=${env[k]?.length ?? 0}`).join(", ");
|
|
342
|
+
console.log("[env] parent process token lengths:", parentLengths);
|
|
343
|
+
try {
|
|
344
|
+
const whichOut = spawnSync(platform === "win32" ? "where copilot" : "which copilot", [], {
|
|
345
|
+
shell: true,
|
|
346
|
+
encoding: "utf8"
|
|
347
|
+
});
|
|
348
|
+
const pathOut = (whichOut.stdout?.trim() || whichOut.stderr?.trim() || "").split("\n")[0];
|
|
349
|
+
console.log("[env] copilot executable:", pathOut || "(not found)");
|
|
350
|
+
} catch {
|
|
351
|
+
console.log("[env] copilot executable: (resolve failed)");
|
|
352
|
+
}
|
|
353
|
+
} else console.log("[env] child env: inherits process.env (win32)");
|
|
335
354
|
const child = spawn(bind, [
|
|
336
355
|
...tools,
|
|
337
356
|
"-p",
|