@delta-infra/cli 1.0.51 → 1.0.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/checksums.txt +5 -5
- package/package.json +1 -1
- package/scripts/install-wizard.js +28 -10
package/checksums.txt
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
08df8c6329b69f363f83ff087036847d68c48e615cd3aba8ba2bccfe844c772b delta-cli-darwin-amd64.tar.gz
|
|
2
|
+
d74afe9f43075392830771729da309df1e1246bdfa1a00c7135c3bb6c12593e9 delta-cli-darwin-arm64.tar.gz
|
|
3
|
+
d0c71ce2a0dd060e6ac6eb7fc5e80b7f2722897369c37a74aeff221374f8286b delta-cli-linux-amd64.tar.gz
|
|
4
|
+
b9207c9190f43ea9b059db3f9f2b4d0137bd2e1f6845d672120ccc35da32f842 delta-cli-linux-arm64.tar.gz
|
|
5
|
+
5a2fe95cbbd9ba0e27127b94e0d2d933de1f3a076f399c9c7783e05e347d0158 delta-cli-windows-amd64.zip
|
package/package.json
CHANGED
|
@@ -106,8 +106,12 @@ function runSilentAsync(cmd, args, opts = {}) {
|
|
|
106
106
|
execFile(actualCmd, actualArgs, {
|
|
107
107
|
stdio: ["ignore", "pipe", "pipe"],
|
|
108
108
|
...opts,
|
|
109
|
-
}, (err, stdout) => {
|
|
110
|
-
if (err)
|
|
109
|
+
}, (err, stdout, stderr) => {
|
|
110
|
+
if (err) {
|
|
111
|
+
err.stdout = stdout;
|
|
112
|
+
err.stderr = stderr;
|
|
113
|
+
reject(err);
|
|
114
|
+
}
|
|
111
115
|
else resolve(stdout);
|
|
112
116
|
});
|
|
113
117
|
});
|
|
@@ -127,6 +131,7 @@ function osHomedir() {
|
|
|
127
131
|
|
|
128
132
|
function isInteractiveEnv() {
|
|
129
133
|
return !!process.stdin.isTTY &&
|
|
134
|
+
!!process.stdout.isTTY &&
|
|
130
135
|
!process.env.CI &&
|
|
131
136
|
!process.env.NO_COLOR &&
|
|
132
137
|
process.env.TERM !== "dumb";
|
|
@@ -254,12 +259,22 @@ async function skillsAlreadyInstalled() {
|
|
|
254
259
|
}
|
|
255
260
|
|
|
256
261
|
function installSkillsFromLocalPackage() {
|
|
257
|
-
const
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
+
const candidates = [];
|
|
263
|
+
try {
|
|
264
|
+
const npmRoot = runSilent("npm", ["root", "-g"], { timeout: 10000 })
|
|
265
|
+
.toString().trim();
|
|
266
|
+
candidates.push(path.join(npmRoot, PKG, "skills"));
|
|
267
|
+
} catch {}
|
|
268
|
+
candidates.push(path.join(__dirname, "..", "skills"));
|
|
269
|
+
|
|
270
|
+
let pkgSkillsDir = null;
|
|
271
|
+
for (const c of candidates) {
|
|
272
|
+
if (fs.existsSync(path.join(c, "delta-sandbox", "SKILL.md"))) {
|
|
273
|
+
pkgSkillsDir = c;
|
|
274
|
+
break;
|
|
275
|
+
}
|
|
262
276
|
}
|
|
277
|
+
if (!pkgSkillsDir) return false;
|
|
263
278
|
|
|
264
279
|
const home = osHomedir();
|
|
265
280
|
const agentsDir = path.join(home, ".agents", "skills");
|
|
@@ -306,21 +321,24 @@ async function stepInstallSkills(msg) {
|
|
|
306
321
|
} catch { }
|
|
307
322
|
|
|
308
323
|
const urls = [
|
|
309
|
-
`https://gh
|
|
310
|
-
`https://
|
|
324
|
+
`https://gh.ddlc.top/https://github.com/${SKILLS_REPO}`,
|
|
325
|
+
`https://ghproxy.net/https://github.com/${SKILLS_REPO}`,
|
|
311
326
|
`https://github.com/${SKILLS_REPO}`,
|
|
312
327
|
];
|
|
313
328
|
let lastErr;
|
|
314
329
|
for (const url of urls) {
|
|
315
330
|
try {
|
|
331
|
+
s.start(`${msg.step2Spinner} (try ${url.split("/")[2]})`);
|
|
316
332
|
await runSilentAsync("npx", ["-y", "skills", "add", url, "-y", "-g"], {
|
|
317
|
-
timeout:
|
|
333
|
+
timeout: 15000,
|
|
318
334
|
env: { ...process.env, GIT_TERMINAL_PROMPT: "0" },
|
|
319
335
|
});
|
|
320
336
|
s.stop(msg.step2Done);
|
|
321
337
|
return;
|
|
322
338
|
} catch (e) {
|
|
323
339
|
lastErr = e;
|
|
340
|
+
if (e && e.stderr) console.error(`[skills mirror failed] ${url}: ${e.stderr.toString().trim().slice(0, 200)}`);
|
|
341
|
+
else if (e && e.message) console.error(`[skills mirror failed] ${url}: ${e.message}`);
|
|
324
342
|
}
|
|
325
343
|
}
|
|
326
344
|
throw lastErr;
|