@vltpkg/cli-js 1.5.0 → 1.6.1
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/{access-QPX4QXV4.js → access-YSLEWR2C.js} +8 -8
- package/{bugs-TLOECXEM.js → bugs-S6CRUEA2.js} +23 -19
- package/{build-IQOS3LKO.js → build-SG3KPX3W.js} +49 -14
- package/{cache-O5IBYYSB.js → cache-HA77ROM7.js} +16 -13
- package/cache-unzip-src-unzip.js +23 -4
- package/{chunk-3S3W7QEM.js → chunk-3E3ISOYM.js} +10 -5
- package/{chunk-43EJ4Q42.js → chunk-3JIN46K5.js} +1 -1
- package/{chunk-5KW6AOTT.js → chunk-4GMNWW4C.js} +1 -1
- package/{chunk-6W5XMVIZ.js → chunk-4UAIPIAV.js} +7 -7
- package/{chunk-7UWRR6EE.js → chunk-5Q2HSLVV.js} +1 -1
- package/{chunk-LUVDMEW4.js → chunk-6D3QAFNZ.js} +1 -1
- package/{chunk-LH7J5BDU.js → chunk-6XVW7CWJ.js} +3 -3
- package/{chunk-UZ6ICZE3.js → chunk-7M2VTFLP.js} +12 -1
- package/{chunk-XCQCYB6G.js → chunk-AEVT3CHK.js} +142 -16
- package/{chunk-SMXXFQPI.js → chunk-AHLBPSGQ.js} +3 -3
- package/{chunk-6LZM3I4Q.js → chunk-BF5DRGRZ.js} +25 -4
- package/chunk-BH5CVXNY.js +115 -0
- package/{chunk-CS6AYPY5.js → chunk-BQMHDAYL.js} +6 -13
- package/{chunk-2U4PVHP4.js → chunk-C4RJ4NNS.js} +137 -47
- package/{chunk-F7NPYSI2.js → chunk-CAV7FKWQ.js} +2 -2
- package/chunk-DXED4ARV.js +436 -0
- package/chunk-E74WGW5C.js +49 -0
- package/{chunk-CMLDLZZ3.js → chunk-EFHOWRKU.js} +56 -0
- package/{chunk-IFEZ6BFV.js → chunk-EMTGRCSE.js} +2 -2
- package/{chunk-4TSHLSRK.js → chunk-EYGOEAJM.js} +1 -1
- package/{chunk-DBANBIL2.js → chunk-FZCPQWCJ.js} +1 -0
- package/chunk-GCTREKA4.js +115 -0
- package/{chunk-CW56EJIL.js → chunk-HT6FS4VB.js} +1 -1
- package/{chunk-VR7NRWAD.js → chunk-IHERL3TA.js} +17 -16
- package/chunk-JV5XR5JQ.js +349 -0
- package/{chunk-T5EP7QEF.js → chunk-JZXNHIQE.js} +28 -28
- package/{chunk-IJUVVD7E.js → chunk-KD5ZK72K.js} +1 -1
- package/{chunk-C6ZVVEFV.js → chunk-KURQHX54.js} +5 -3
- package/{chunk-GUP55DM6.js → chunk-L3ZF7OYM.js} +2 -2
- package/{chunk-X6JKMIOU.js → chunk-LGQVZTYR.js} +4 -36
- package/{chunk-G3FZ2ZJK.js → chunk-M242QVJS.js} +1 -1
- package/chunk-MCDLJZXT.js +82 -0
- package/{chunk-WHWPAYZY.js → chunk-MSWOR3FV.js} +35 -7
- package/chunk-N3V6EK5I.js +77 -0
- package/{chunk-ISAMD2FE.js → chunk-N6HV7JWC.js} +1 -1
- package/{chunk-MYX4JCIJ.js → chunk-NO53Y3QO.js} +1 -1
- package/chunk-O6MQ7NN6.js +1155 -0
- package/{chunk-XCSNI6AO.js → chunk-OWL5G4K4.js} +4 -4
- package/{chunk-35EG6T3J.js → chunk-Q2UEILN6.js} +21 -9
- package/{chunk-Z5D5KODU.js → chunk-VGPLFOJO.js} +4 -2
- package/{chunk-ARE7FKDG.js → chunk-W24SBFY5.js} +5 -5
- package/{chunk-XD5KUDXX.js → chunk-WMMKUVAT.js} +10 -8
- package/{chunk-4UH3KMTD.js → chunk-ZJE3OTP3.js} +258 -451
- package/{ci-ESVUMOZO.js → ci-GVLL72SS.js} +21 -17
- package/cli-package.json +3 -1
- package/{config-ZVVLFKR7.js → config-KH6AEMHI.js} +13 -12
- package/{config-TMB2X6DW.js → config-TIPKOPYS.js} +10 -9
- package/{create-BLTNKSBQ.js → create-SKNEZEZY.js} +28 -24
- package/{deprecate-VA6PGHYL.js → deprecate-RFRLJZVL.js} +12 -12
- package/{dist-tag-OYJREFO2.js → dist-tag-LVYOTJHJ.js} +8 -8
- package/{docs-6OC3OQNM.js → docs-INXRFEGY.js} +23 -19
- package/{exec-AZPGFVRY.js → exec-5MA5XRPZ.js} +28 -24
- package/{exec-cache-D75UY2WI.js → exec-cache-7GS4KLWJ.js} +24 -20
- package/{exec-local-E2JKB4X4.js → exec-local-RE4KVTMN.js} +22 -18
- package/{help-UPW77X5N.js → help-JHLP565L.js} +5 -4
- package/{init-SNO6QL7C.js → init-4UFHO67B.js} +13 -12
- package/{install-TEJM2YVX.js → install-Z33YVCDK.js} +108 -52
- package/{list-NHCC2RNB.js → list-XAMKR6TL.js} +29 -22
- package/{login-XNZXCGFD.js → login-6NXUO5FF.js} +14 -13
- package/{logout-YCM7O36Q.js → logout-6P7LWTAY.js} +8 -8
- package/{outdated-4LA7N63W.js → outdated-YNUSWZJD.js} +18 -17
- package/{pack-RC4CZSWF.js → pack-LMQYH75V.js} +15 -14
- package/package.json +1 -1
- package/{ping-RLVAZGDL.js → ping-VLFZ3WCY.js} +8 -8
- package/{pkg-FED5C6TP.js → pkg-JMPBHKSW.js} +16 -15
- package/{profile-DJZNLQPG.js → profile-PJJAA2YM.js} +8 -8
- package/{publish-54AMVMTQ.js → publish-33RFJ2HJ.js} +24 -20
- package/{query-ZQLMSJ7O.js → query-LUUOK57K.js} +29 -22
- package/{registry-6HKQYSZX.js → registry-ZGGWVLBM.js} +5 -5
- package/registry-client-src-revalidate.js +41 -11
- package/{repo-ITA4BLZ4.js → repo-VLHLQP2S.js} +23 -19
- package/{reporter-UYVR2WMB.js → reporter-SNSM2TDC.js} +61 -15
- package/{run-TP2HTJRN.js → run-USWK7R3N.js} +22 -18
- package/{run-exec-UGCC53DV.js → run-exec-PHE44AWW.js} +22 -18
- package/security-archive-src-update-expired.js +24 -5
- package/{setup-XPAM5U3Z.js → setup-JMY47ERY.js} +206 -27
- package/{skills-YD2TB2VD.js → skills-7PYMTDER.js} +41 -56
- package/{skills-LR6GXW3X.js → skills-YMMV6TMN.js} +24 -21
- package/{src-34D4DOOH.js → src-2ZS4VHJP.js} +25 -19
- package/{src-H6DFCAPH.js → src-A5ZJNOHN.js} +6 -4
- package/{src-LHDC4NJO.js → src-W2VQULRG.js} +2 -2
- package/{token-OF63PFTQ.js → token-YKHELNVQ.js} +10 -9
- package/{uninstall-B54FQ5KQ.js → uninstall-Q46HWR5S.js} +53 -17
- package/{unpublish-CSHIGMDQ.js → unpublish-LBANPSJ5.js} +8 -8
- package/{update-HS4VJ5ZG.js → update-B2EGLZHI.js} +19 -17
- package/{version-L7S3DHUS.js → version-IEOBL3NN.js} +14 -13
- package/{view-NWKKWFVA.js → view-JCA5VT6F.js} +13 -13
- package/vlr.js +1 -1
- package/vlrx.js +1 -1
- package/vlt.js +1 -1
- package/vlx.js +1 -1
- package/vlxl.js +1 -1
- package/{whoami-65K35VGW.js → whoami-OWJUPO3X.js} +8 -8
- package/chunk-T2VBCUF5.js +0 -77
|
@@ -10,6 +10,7 @@ globalThis.clearInterval = _vlt_clearInterval;
|
|
|
10
10
|
import {createRequire as _vlt_createRequire} from "node:module";
|
|
11
11
|
var require = _vlt_createRequire(import.meta.filename);
|
|
12
12
|
import {
|
|
13
|
+
editGitignore,
|
|
13
14
|
filterNodesByQueryParts,
|
|
14
15
|
load2 as load,
|
|
15
16
|
lstat,
|
|
@@ -22,21 +23,23 @@ import {
|
|
|
22
23
|
skillsDirs,
|
|
23
24
|
unmountSkill,
|
|
24
25
|
unshare
|
|
25
|
-
} from "./chunk-
|
|
26
|
-
import "./chunk-
|
|
27
|
-
import
|
|
26
|
+
} from "./chunk-C4RJ4NNS.js";
|
|
27
|
+
import "./chunk-AHLBPSGQ.js";
|
|
28
|
+
import {
|
|
29
|
+
Monorepo
|
|
30
|
+
} from "./chunk-KURQHX54.js";
|
|
28
31
|
import {
|
|
29
32
|
splitDepID
|
|
30
|
-
} from "./chunk-
|
|
31
|
-
import "./chunk-
|
|
33
|
+
} from "./chunk-CAV7FKWQ.js";
|
|
34
|
+
import "./chunk-6D3QAFNZ.js";
|
|
32
35
|
import "./chunk-HTOTG4TS.js";
|
|
33
|
-
import "./chunk-
|
|
36
|
+
import "./chunk-M242QVJS.js";
|
|
34
37
|
import "./chunk-B6RIGNEO.js";
|
|
35
38
|
import "./chunk-XNLSTHDK.js";
|
|
36
39
|
import "./chunk-Y5PA7DVK.js";
|
|
37
40
|
import {
|
|
38
41
|
parse
|
|
39
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-BF5DRGRZ.js";
|
|
40
43
|
import "./chunk-WZWDS3W4.js";
|
|
41
44
|
import "./chunk-PZLD7RTK.js";
|
|
42
45
|
|
|
@@ -144,6 +147,7 @@ var scan = (dir, pkgName) => {
|
|
|
144
147
|
return found;
|
|
145
148
|
};
|
|
146
149
|
var rank = (node) => {
|
|
150
|
+
if (node.importer) return 0;
|
|
147
151
|
let r = 2;
|
|
148
152
|
for (const { from } of node.edgesIn) {
|
|
149
153
|
if (from.mainImporter) return 0;
|
|
@@ -163,7 +167,7 @@ var aliasOf = (node) => {
|
|
|
163
167
|
const n = (edges.find((e) => e.from.mainImporter) ?? edges.find((e) => e.from.importer))?.name;
|
|
164
168
|
return n === node.name ? void 0 : n;
|
|
165
169
|
};
|
|
166
|
-
var scannable = (node) =>
|
|
170
|
+
var scannable = (node) => node.importer ? !node.mainImporter : node.inVltStore() && splitDepID(node.id)[0] !== "file";
|
|
167
171
|
var shipsSkills = (node) => scannable(node) && scan(realOr(resolve(node.projectRoot, node.location)), node.name).length > 0;
|
|
168
172
|
var discoverSkills = (nodes, scurry, mounts = []) => {
|
|
169
173
|
const key = (name, path) => `${lc(name)}\0${norm(path)}`;
|
|
@@ -220,49 +224,6 @@ var discoverSkills = (nodes, scurry, mounts = []) => {
|
|
|
220
224
|
return { skills, scanned };
|
|
221
225
|
};
|
|
222
226
|
|
|
223
|
-
// ../../src/graph/src/skills/gitignore.ts
|
|
224
|
-
import { lstatSync, readFileSync as readFileSync2, writeFileSync } from "node:fs";
|
|
225
|
-
import { join } from "node:path";
|
|
226
|
-
var GITIGNORE_BEGIN = "# >>> vlt agent skills (links into node_modules)";
|
|
227
|
-
var GITIGNORE_END = "# <<< vlt agent skills";
|
|
228
|
-
var sorted = (names) => [...names].sort((a, b) => a.localeCompare(b, "en")).map((n) => `/${n}`);
|
|
229
|
-
var update = (file, { add, remove }) => {
|
|
230
|
-
const st = lstatSync(file, { throwIfNoEntry: false });
|
|
231
|
-
if (st && !st.isFile()) return "refused";
|
|
232
|
-
const text = st ? readFileSync2(file, "utf8") : "";
|
|
233
|
-
const eol = text.includes("\r\n") ? "\r\n" : "\n";
|
|
234
|
-
const lines = text.split(eol);
|
|
235
|
-
const begin = lines.findIndex((l) => l.trim() === GITIGNORE_BEGIN);
|
|
236
|
-
const end = lines.findIndex(
|
|
237
|
-
(l, i) => begin !== -1 && i > begin && l.trim() === GITIGNORE_END
|
|
238
|
-
);
|
|
239
|
-
let out;
|
|
240
|
-
if (end === -1) {
|
|
241
|
-
if (!add.length) return "ok";
|
|
242
|
-
out = (text && !text.endsWith(eol) ? text + eol : text) + [GITIGNORE_BEGIN, ...sorted(add), GITIGNORE_END].join(eol) + eol;
|
|
243
|
-
} else {
|
|
244
|
-
const rm = new Set(sorted(remove));
|
|
245
|
-
const block = lines.slice(begin + 1, end).filter((l) => !rm.has(l.trim()));
|
|
246
|
-
const have = new Set(block.map((l) => l.trim()));
|
|
247
|
-
lines.splice(
|
|
248
|
-
begin + 1,
|
|
249
|
-
end - begin - 1,
|
|
250
|
-
...block,
|
|
251
|
-
...sorted(add).filter((l) => !have.has(l))
|
|
252
|
-
);
|
|
253
|
-
out = lines.join(eol);
|
|
254
|
-
}
|
|
255
|
-
if (out !== text) writeFileSync(file, out);
|
|
256
|
-
return "ok";
|
|
257
|
-
};
|
|
258
|
-
var editGitignore = (dir, edit) => {
|
|
259
|
-
try {
|
|
260
|
-
return update(join(dir, ".gitignore"), edit);
|
|
261
|
-
} catch {
|
|
262
|
-
return "refused";
|
|
263
|
-
}
|
|
264
|
-
};
|
|
265
|
-
|
|
266
227
|
// ../../src/graph/src/skills/mask.ts
|
|
267
228
|
var escape = (s) => s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
268
229
|
var globRegExp = (pattern) => new RegExp(`^${pattern.split("*").map(escape).join(".*")}$`, "i");
|
|
@@ -316,6 +277,17 @@ var dirsOf = (o, create = false) => skillsDirs({
|
|
|
316
277
|
env: o.env,
|
|
317
278
|
create
|
|
318
279
|
});
|
|
280
|
+
var workspaceDirs = (graph, scurry) => [...graph.importers].filter((n) => !n.mainImporter).map((n) => ({
|
|
281
|
+
id: n.id,
|
|
282
|
+
path: realOr(n.resolvedLocation(scurry))
|
|
283
|
+
}));
|
|
284
|
+
var allWorkspaces = (m) => m ? [
|
|
285
|
+
...Monorepo.load(m.projectRoot, {
|
|
286
|
+
config: m.config,
|
|
287
|
+
scurry: m.scurry,
|
|
288
|
+
packageJson: m.packageJson
|
|
289
|
+
}).values()
|
|
290
|
+
].map((ws) => ({ id: ws.id, path: realOr(ws.fullpath) })) : [];
|
|
319
291
|
var liveOwners = (mounts) => mounts.flatMap(
|
|
320
292
|
(m) => m.owner && existsSync(m.target) ? [m.owner] : []
|
|
321
293
|
);
|
|
@@ -347,7 +319,11 @@ var report = (dropped, unscanned) => unscanned && dropped.length ? {
|
|
|
347
319
|
var listSkills = async (o) => {
|
|
348
320
|
const { graph, nodes, parts, unscanned } = await selectNodes(o);
|
|
349
321
|
const { targets, scan: scan2, skipped } = dirsOf(o);
|
|
350
|
-
const { skills } = discoverSkills(
|
|
322
|
+
const { skills } = discoverSkills(
|
|
323
|
+
nodes,
|
|
324
|
+
o.scurry,
|
|
325
|
+
readMounts(scan2, { workspaces: workspaceDirs(graph, o.scurry) })
|
|
326
|
+
);
|
|
351
327
|
const { picked, dropped } = pick(skills, parts, unscanned);
|
|
352
328
|
return {
|
|
353
329
|
project: graph.mainImporter.name,
|
|
@@ -375,7 +351,8 @@ var linkSkills = async (o) => {
|
|
|
375
351
|
conflicts: [],
|
|
376
352
|
dirs: targets.map((d) => d.dir)
|
|
377
353
|
};
|
|
378
|
-
const
|
|
354
|
+
const workspaces = workspaceDirs(graph, o.scurry);
|
|
355
|
+
const mounts = readMounts(scan2, { workspaces });
|
|
379
356
|
const byName = new Map(
|
|
380
357
|
mounts.map((m) => [`${m.dir.dir}\0${lc2(m.name)}`, m])
|
|
381
358
|
);
|
|
@@ -431,7 +408,9 @@ var linkSkills = async (o) => {
|
|
|
431
408
|
const gone = [];
|
|
432
409
|
const foreign = [];
|
|
433
410
|
const kept = /* @__PURE__ */ new Set();
|
|
411
|
+
const made = /* @__PURE__ */ new Set();
|
|
434
412
|
const where = /* @__PURE__ */ new Map();
|
|
413
|
+
let every;
|
|
435
414
|
for (const { dir, winner, losers, m } of picks) {
|
|
436
415
|
if (winner) {
|
|
437
416
|
if (m && m.name !== winner.skill) {
|
|
@@ -439,10 +418,16 @@ var linkSkills = async (o) => {
|
|
|
439
418
|
gone.push(m);
|
|
440
419
|
}
|
|
441
420
|
const mount = `${dir.dir}/${winner.skill}`;
|
|
442
|
-
const r = mountSkill(winner, dir);
|
|
421
|
+
const r = mountSkill(winner, dir, m?.name === winner.skill);
|
|
422
|
+
if (r === "linked") made.add(mount);
|
|
443
423
|
if (r === "conflict") {
|
|
444
424
|
res.conflicts.push(mount);
|
|
445
|
-
|
|
425
|
+
every ??= allWorkspaces(o.monorepo);
|
|
426
|
+
if (!readMounts([dir], { workspaces: every }).some(
|
|
427
|
+
(l) => l.name === winner.skill
|
|
428
|
+
)) {
|
|
429
|
+
foreign.push({ dir, name: winner.skill });
|
|
430
|
+
}
|
|
446
431
|
} else {
|
|
447
432
|
const k = `${winner.id}\0${winner.skill}`;
|
|
448
433
|
const linked = where.get(k) ?? [];
|
|
@@ -455,7 +440,7 @@ var linkSkills = async (o) => {
|
|
|
455
440
|
for (const s of losers)
|
|
456
441
|
res.conflicts.push(`${dir.dir}/${s.skill} (${label(s)})`);
|
|
457
442
|
}
|
|
458
|
-
const after = readMounts(scan2);
|
|
443
|
+
const after = readMounts(scan2, { workspaces, made });
|
|
459
444
|
const present = [];
|
|
460
445
|
for (const m of after) {
|
|
461
446
|
if (o.apply ? kept.has(m.mount) : !stale(m)) {
|
|
@@ -11,21 +11,21 @@ import {createRequire as _vlt_createRequire} from "node:module";
|
|
|
11
11
|
var require = _vlt_createRequire(import.meta.filename);
|
|
12
12
|
import {
|
|
13
13
|
mermaidOutput
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-ZJE3OTP3.js";
|
|
15
15
|
import {
|
|
16
16
|
assertQuery,
|
|
17
17
|
linkSkills,
|
|
18
18
|
listSkills
|
|
19
|
-
} from "./chunk-
|
|
20
|
-
import "./chunk-
|
|
19
|
+
} from "./chunk-C4RJ4NNS.js";
|
|
20
|
+
import "./chunk-AHLBPSGQ.js";
|
|
21
21
|
import {
|
|
22
22
|
styleTextStdout
|
|
23
|
-
} from "./chunk-
|
|
24
|
-
import "./chunk-
|
|
25
|
-
import "./chunk-
|
|
23
|
+
} from "./chunk-MSWOR3FV.js";
|
|
24
|
+
import "./chunk-LGQVZTYR.js";
|
|
25
|
+
import "./chunk-EYGOEAJM.js";
|
|
26
26
|
import {
|
|
27
27
|
commandUsage
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-HT6FS4VB.js";
|
|
29
29
|
import {
|
|
30
30
|
configLabel,
|
|
31
31
|
savedLine,
|
|
@@ -35,20 +35,24 @@ import {
|
|
|
35
35
|
} from "./chunk-W4T5CGCO.js";
|
|
36
36
|
import {
|
|
37
37
|
configWriteTarget
|
|
38
|
-
} from "./chunk-
|
|
39
|
-
import "./chunk-
|
|
38
|
+
} from "./chunk-AEVT3CHK.js";
|
|
39
|
+
import "./chunk-IHERL3TA.js";
|
|
40
40
|
import "./chunk-SRWDPPLX.js";
|
|
41
|
-
import "./chunk-
|
|
42
|
-
import "./chunk-
|
|
41
|
+
import "./chunk-JV5XR5JQ.js";
|
|
42
|
+
import "./chunk-EMTGRCSE.js";
|
|
43
|
+
import "./chunk-KURQHX54.js";
|
|
43
44
|
import "./chunk-4KCU2KZL.js";
|
|
44
45
|
import "./chunk-WGDTG44V.js";
|
|
45
|
-
import "./chunk-
|
|
46
|
-
import "./chunk-
|
|
47
|
-
import "./chunk-
|
|
48
|
-
import "./chunk-
|
|
46
|
+
import "./chunk-E74WGW5C.js";
|
|
47
|
+
import "./chunk-GCTREKA4.js";
|
|
48
|
+
import "./chunk-MCDLJZXT.js";
|
|
49
|
+
import "./chunk-7M2VTFLP.js";
|
|
50
|
+
import "./chunk-EFHOWRKU.js";
|
|
51
|
+
import "./chunk-CAV7FKWQ.js";
|
|
52
|
+
import "./chunk-6D3QAFNZ.js";
|
|
49
53
|
import "./chunk-HTOTG4TS.js";
|
|
50
|
-
import "./chunk-
|
|
51
|
-
import "./chunk-
|
|
54
|
+
import "./chunk-M242QVJS.js";
|
|
55
|
+
import "./chunk-4GMNWW4C.js";
|
|
52
56
|
import "./chunk-SUU2WETN.js";
|
|
53
57
|
import "./chunk-B6RIGNEO.js";
|
|
54
58
|
import "./chunk-XNLSTHDK.js";
|
|
@@ -57,7 +61,7 @@ import "./chunk-PDWPFR5T.js";
|
|
|
57
61
|
import "./chunk-Y5PA7DVK.js";
|
|
58
62
|
import {
|
|
59
63
|
asError
|
|
60
|
-
} from "./chunk-
|
|
64
|
+
} from "./chunk-BF5DRGRZ.js";
|
|
61
65
|
import {
|
|
62
66
|
error
|
|
63
67
|
} from "./chunk-WZWDS3W4.js";
|
|
@@ -154,9 +158,8 @@ var usage = () => commandUsage({
|
|
|
154
158
|
\`.agents/skills\`, plus \`<folder>/skills\` for each agent folder
|
|
155
159
|
at the project root (e.g. \`.claude/\`), or the \`skills-dir\`
|
|
156
160
|
config. When packages ship skills with the same name, one is
|
|
157
|
-
linked and the others are reported. Only links made by vlt
|
|
158
|
-
|
|
159
|
-
removed; anything else in the way is skipped.
|
|
161
|
+
linked and the others are reported. Only links made by vlt are
|
|
162
|
+
ever replaced or removed; anything else in the way is skipped.
|
|
160
163
|
|
|
161
164
|
Use --target or a query after the subcommand to select packages
|
|
162
165
|
using DSS query syntax. End a selector with
|
|
@@ -11,47 +11,52 @@ import {createRequire as _vlt_createRequire} from "node:module";
|
|
|
11
11
|
var require = _vlt_createRequire(import.meta.filename);
|
|
12
12
|
import {
|
|
13
13
|
loadCommand
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-N3V6EK5I.js";
|
|
15
15
|
import {
|
|
16
16
|
flushAndExit,
|
|
17
17
|
indent,
|
|
18
18
|
outputCommand,
|
|
19
19
|
stderr,
|
|
20
20
|
stdout
|
|
21
|
-
} from "./chunk-
|
|
22
|
-
import
|
|
23
|
-
loadPackageJson
|
|
24
|
-
} from "./chunk-X6JKMIOU.js";
|
|
21
|
+
} from "./chunk-MSWOR3FV.js";
|
|
22
|
+
import "./chunk-LGQVZTYR.js";
|
|
25
23
|
import {
|
|
26
24
|
asRootError,
|
|
27
25
|
findRootError
|
|
28
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-EYGOEAJM.js";
|
|
29
27
|
import {
|
|
30
28
|
Config
|
|
31
|
-
} from "./chunk-
|
|
32
|
-
import "./chunk-
|
|
29
|
+
} from "./chunk-AEVT3CHK.js";
|
|
30
|
+
import "./chunk-IHERL3TA.js";
|
|
33
31
|
import "./chunk-SRWDPPLX.js";
|
|
34
|
-
import "./chunk-
|
|
32
|
+
import "./chunk-EMTGRCSE.js";
|
|
35
33
|
import {
|
|
36
34
|
setVltJsonOnly
|
|
37
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-KURQHX54.js";
|
|
38
36
|
import "./chunk-4KCU2KZL.js";
|
|
39
37
|
import "./chunk-WGDTG44V.js";
|
|
40
|
-
import
|
|
38
|
+
import {
|
|
39
|
+
loadPackageJson
|
|
40
|
+
} from "./chunk-E74WGW5C.js";
|
|
41
|
+
import "./chunk-GCTREKA4.js";
|
|
42
|
+
import "./chunk-MCDLJZXT.js";
|
|
43
|
+
import "./chunk-7M2VTFLP.js";
|
|
41
44
|
import {
|
|
42
45
|
getSortedCliOptions,
|
|
43
46
|
getSortedKeys
|
|
44
|
-
} from "./chunk-
|
|
45
|
-
import "./chunk-
|
|
46
|
-
import "./chunk-
|
|
47
|
+
} from "./chunk-EFHOWRKU.js";
|
|
48
|
+
import "./chunk-CAV7FKWQ.js";
|
|
49
|
+
import "./chunk-6D3QAFNZ.js";
|
|
47
50
|
import "./chunk-HTOTG4TS.js";
|
|
48
|
-
import "./chunk-
|
|
51
|
+
import "./chunk-4GMNWW4C.js";
|
|
49
52
|
import "./chunk-SUU2WETN.js";
|
|
50
53
|
import "./chunk-B6RIGNEO.js";
|
|
51
54
|
import "./chunk-XNLSTHDK.js";
|
|
52
55
|
import "./chunk-6IF3RJND.js";
|
|
53
56
|
import "./chunk-Y5PA7DVK.js";
|
|
54
|
-
import
|
|
57
|
+
import {
|
|
58
|
+
isError
|
|
59
|
+
} from "./chunk-BF5DRGRZ.js";
|
|
55
60
|
import "./chunk-WZWDS3W4.js";
|
|
56
61
|
import "./chunk-PZLD7RTK.js";
|
|
57
62
|
|
|
@@ -67,7 +72,7 @@ var loadVlt = async (cwd, argv) => {
|
|
|
67
72
|
} catch (e) {
|
|
68
73
|
const code = findRootError(e, { code: "ECONFIG" }) ? "ECONFIG" : "JACKSPEAK";
|
|
69
74
|
const err = asRootError(e, { code });
|
|
70
|
-
const { found, path, wanted, name } = err.cause;
|
|
75
|
+
const { found, path, wanted, name, cause } = err.cause;
|
|
71
76
|
const isConfigFile = typeof path === "string";
|
|
72
77
|
const msg = isConfigFile ? `Problem in Config File ${path}` : code === "ECONFIG" ? "Config Error" : "Invalid Option Flag";
|
|
73
78
|
const validOptions = wanted || code === "ECONFIG" ? void 0 : isConfigFile ? getSortedKeys() : getSortedCliOptions();
|
|
@@ -82,6 +87,7 @@ var loadVlt = async (cwd, argv) => {
|
|
|
82
87
|
);
|
|
83
88
|
}
|
|
84
89
|
if (wanted) stderr(indent(`Wanted: ${format(wanted)}`));
|
|
90
|
+
if (isError(cause)) stderr(indent(`Cause: ${cause.message}`));
|
|
85
91
|
if (validOptions) {
|
|
86
92
|
stderr(indent("Valid Options:"));
|
|
87
93
|
stderr(indent(validOptions.join("\n"), 4));
|
|
@@ -105,7 +111,7 @@ var run = async () => {
|
|
|
105
111
|
}
|
|
106
112
|
setVltJsonOnly(vlt.command === "ci");
|
|
107
113
|
const { monorepo } = vlt.options;
|
|
108
|
-
if (vlt.get("workspace") === void 0) {
|
|
114
|
+
if (vlt.get("workspace") === void 0 && !vlt.globalRoot) {
|
|
109
115
|
const ws = monorepo?.get(cwd);
|
|
110
116
|
if (ws) {
|
|
111
117
|
vlt.values.workspace = [ws.path];
|
|
@@ -130,7 +136,7 @@ var run = async () => {
|
|
|
130
136
|
return flushAndExit(process.exitCode || 1);
|
|
131
137
|
}
|
|
132
138
|
if (vlt.command === "registry") {
|
|
133
|
-
const { dispatchRegistry } = await import("./registry-
|
|
139
|
+
const { dispatchRegistry } = await import("./registry-ZGGWVLBM.js");
|
|
134
140
|
await dispatchRegistry(vlt);
|
|
135
141
|
}
|
|
136
142
|
const command = await loadCommand(vlt.command);
|
|
@@ -14,6 +14,7 @@ import {
|
|
|
14
14
|
RegistryClient,
|
|
15
15
|
cacheKey,
|
|
16
16
|
clearRuntimeTokens,
|
|
17
|
+
defaultRegistryKey,
|
|
17
18
|
deleteToken,
|
|
18
19
|
getKC,
|
|
19
20
|
getToken,
|
|
@@ -28,23 +29,23 @@ import {
|
|
|
28
29
|
runtimeTokens,
|
|
29
30
|
setRuntimeToken,
|
|
30
31
|
setToken
|
|
31
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-Q2UEILN6.js";
|
|
32
33
|
import "./chunk-QNHBAGXQ.js";
|
|
33
34
|
import {
|
|
34
35
|
userAgent
|
|
35
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-M242QVJS.js";
|
|
36
37
|
import {
|
|
37
38
|
assertOk,
|
|
38
39
|
registryErrorMessage,
|
|
39
40
|
requestError,
|
|
40
41
|
storeRoot
|
|
41
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-4GMNWW4C.js";
|
|
42
43
|
import "./chunk-SUU2WETN.js";
|
|
43
44
|
import "./chunk-B6RIGNEO.js";
|
|
44
45
|
import "./chunk-XNLSTHDK.js";
|
|
45
46
|
import "./chunk-PDWPFR5T.js";
|
|
46
47
|
import "./chunk-Y5PA7DVK.js";
|
|
47
|
-
import "./chunk-
|
|
48
|
+
import "./chunk-BF5DRGRZ.js";
|
|
48
49
|
import "./chunk-WZWDS3W4.js";
|
|
49
50
|
import "./chunk-PZLD7RTK.js";
|
|
50
51
|
export {
|
|
@@ -53,6 +54,7 @@ export {
|
|
|
53
54
|
assertOk,
|
|
54
55
|
cacheKey,
|
|
55
56
|
clearRuntimeTokens,
|
|
57
|
+
defaultRegistryKey,
|
|
56
58
|
deleteToken,
|
|
57
59
|
getKC,
|
|
58
60
|
getToken,
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
unpackSync,
|
|
29
29
|
unpackToStoreSync,
|
|
30
30
|
verifyStoreEntry
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-N6HV7JWC.js";
|
|
32
32
|
import {
|
|
33
33
|
cloneAvailable,
|
|
34
34
|
cloneDir
|
|
@@ -37,7 +37,7 @@ import {
|
|
|
37
37
|
rimrafSync
|
|
38
38
|
} from "./chunk-PDWPFR5T.js";
|
|
39
39
|
import "./chunk-Y5PA7DVK.js";
|
|
40
|
-
import "./chunk-
|
|
40
|
+
import "./chunk-BF5DRGRZ.js";
|
|
41
41
|
import "./chunk-WZWDS3W4.js";
|
|
42
42
|
import "./chunk-PZLD7RTK.js";
|
|
43
43
|
|
|
@@ -11,12 +11,12 @@ import {createRequire as _vlt_createRequire} from "node:module";
|
|
|
11
11
|
var require = _vlt_createRequire(import.meta.filename);
|
|
12
12
|
import {
|
|
13
13
|
commandUsage
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-HT6FS4VB.js";
|
|
15
15
|
import {
|
|
16
16
|
requireRegistry
|
|
17
|
-
} from "./chunk-
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
17
|
+
} from "./chunk-7M2VTFLP.js";
|
|
18
|
+
import "./chunk-EFHOWRKU.js";
|
|
19
|
+
import "./chunk-6D3QAFNZ.js";
|
|
20
20
|
import {
|
|
21
21
|
RegistryClient,
|
|
22
22
|
deleteToken,
|
|
@@ -25,16 +25,16 @@ import {
|
|
|
25
25
|
normalizeRegistryKey,
|
|
26
26
|
registryBase,
|
|
27
27
|
setToken
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-Q2UEILN6.js";
|
|
29
29
|
import "./chunk-QNHBAGXQ.js";
|
|
30
|
-
import "./chunk-
|
|
31
|
-
import "./chunk-
|
|
30
|
+
import "./chunk-M242QVJS.js";
|
|
31
|
+
import "./chunk-4GMNWW4C.js";
|
|
32
32
|
import "./chunk-SUU2WETN.js";
|
|
33
33
|
import "./chunk-B6RIGNEO.js";
|
|
34
34
|
import "./chunk-XNLSTHDK.js";
|
|
35
35
|
import "./chunk-PDWPFR5T.js";
|
|
36
36
|
import "./chunk-Y5PA7DVK.js";
|
|
37
|
-
import "./chunk-
|
|
37
|
+
import "./chunk-BF5DRGRZ.js";
|
|
38
38
|
import {
|
|
39
39
|
error
|
|
40
40
|
} from "./chunk-WZWDS3W4.js";
|
|
@@ -169,7 +169,8 @@ var views = {
|
|
|
169
169
|
var listTokens = async (rc, registry, identity, alias) => {
|
|
170
170
|
const localTok = await getToken(
|
|
171
171
|
normalizeRegistryKey(registry),
|
|
172
|
-
identity
|
|
172
|
+
identity,
|
|
173
|
+
rc.defaultRegistryKey
|
|
173
174
|
);
|
|
174
175
|
if (!localTok) {
|
|
175
176
|
return { registry, alias, tokens: [] };
|
|
@@ -11,32 +11,48 @@ import {createRequire as _vlt_createRequire} from "node:module";
|
|
|
11
11
|
var require = _vlt_createRequire(import.meta.filename);
|
|
12
12
|
import {
|
|
13
13
|
parseRemoveArgs
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-BQMHDAYL.js";
|
|
15
15
|
import {
|
|
16
16
|
uninstall
|
|
17
|
-
} from "./chunk-
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
17
|
+
} from "./chunk-ZJE3OTP3.js";
|
|
18
|
+
import "./chunk-C4RJ4NNS.js";
|
|
19
|
+
import "./chunk-AHLBPSGQ.js";
|
|
20
20
|
import {
|
|
21
21
|
commandUsage
|
|
22
|
-
} from "./chunk-
|
|
23
|
-
import
|
|
24
|
-
|
|
22
|
+
} from "./chunk-HT6FS4VB.js";
|
|
23
|
+
import {
|
|
24
|
+
deferSelfRemove,
|
|
25
|
+
refuseSelfUninstall,
|
|
26
|
+
runningStoreDep
|
|
27
|
+
} from "./chunk-DXED4ARV.js";
|
|
28
|
+
import {
|
|
29
|
+
assertGlobalOptions,
|
|
30
|
+
parseGlobalRemoveArgs,
|
|
31
|
+
removeGlobalPackages,
|
|
32
|
+
resolveGlobalBinDir
|
|
33
|
+
} from "./chunk-O6MQ7NN6.js";
|
|
34
|
+
import "./chunk-BH5CVXNY.js";
|
|
35
|
+
import "./chunk-JV5XR5JQ.js";
|
|
36
|
+
import "./chunk-EMTGRCSE.js";
|
|
37
|
+
import "./chunk-KURQHX54.js";
|
|
25
38
|
import {
|
|
26
39
|
lazyView
|
|
27
40
|
} from "./chunk-4KCU2KZL.js";
|
|
28
|
-
import "./chunk-
|
|
29
|
-
import "./chunk-
|
|
30
|
-
import "./chunk-
|
|
31
|
-
import "./chunk-
|
|
41
|
+
import "./chunk-E74WGW5C.js";
|
|
42
|
+
import "./chunk-GCTREKA4.js";
|
|
43
|
+
import "./chunk-MCDLJZXT.js";
|
|
44
|
+
import "./chunk-7M2VTFLP.js";
|
|
45
|
+
import "./chunk-EFHOWRKU.js";
|
|
46
|
+
import "./chunk-CAV7FKWQ.js";
|
|
47
|
+
import "./chunk-6D3QAFNZ.js";
|
|
32
48
|
import "./chunk-HTOTG4TS.js";
|
|
33
|
-
import "./chunk-
|
|
49
|
+
import "./chunk-M242QVJS.js";
|
|
34
50
|
import "./chunk-SUU2WETN.js";
|
|
35
51
|
import "./chunk-B6RIGNEO.js";
|
|
36
52
|
import "./chunk-XNLSTHDK.js";
|
|
37
53
|
import "./chunk-PDWPFR5T.js";
|
|
38
54
|
import "./chunk-Y5PA7DVK.js";
|
|
39
|
-
import "./chunk-
|
|
55
|
+
import "./chunk-BF5DRGRZ.js";
|
|
40
56
|
import "./chunk-WZWDS3W4.js";
|
|
41
57
|
import "./chunk-PZLD7RTK.js";
|
|
42
58
|
|
|
@@ -63,29 +79,49 @@ var usage = () => commandUsage({
|
|
|
63
79
|
"allow-scripts": {
|
|
64
80
|
value: "<query>",
|
|
65
81
|
description: "Filter which packages are allowed to run lifecycle scripts using DSS query syntax."
|
|
82
|
+
},
|
|
83
|
+
global: {
|
|
84
|
+
description: "Uninstall global packages, removing their workspace and bins."
|
|
66
85
|
}
|
|
67
86
|
}
|
|
68
87
|
});
|
|
69
88
|
var views = {
|
|
70
|
-
json: (i) => i.graph.toJSON(),
|
|
89
|
+
json: (i) => "graph" in i ? i.graph.toJSON() : { self: i.self },
|
|
71
90
|
human: lazyView(
|
|
72
|
-
async () => (await import("./reporter-
|
|
91
|
+
async () => (await import("./reporter-SNSM2TDC.js")).InstallReporter
|
|
73
92
|
)
|
|
74
93
|
};
|
|
75
94
|
var command = async (conf) => {
|
|
95
|
+
if (conf.globalRoot) {
|
|
96
|
+
assertGlobalOptions(conf);
|
|
97
|
+
const refused = await refuseSelfUninstall(conf);
|
|
98
|
+
if (refused) return { self: refused };
|
|
99
|
+
}
|
|
76
100
|
const { monorepo, scurry } = conf.options;
|
|
77
|
-
const
|
|
101
|
+
const global = conf.globalRoot ? parseGlobalRemoveArgs(conf) : void 0;
|
|
102
|
+
const binDir = global ? await resolveGlobalBinDir(conf).catch(() => void 0) : void 0;
|
|
103
|
+
const { remove } = global ?? parseRemoveArgs(conf, scurry, monorepo);
|
|
78
104
|
const allowScripts = conf.get("allow-scripts") ? String(conf.get("allow-scripts")) : ":not(*)";
|
|
105
|
+
const keep = conf.globalRoot ? await runningStoreDep(conf.globalRoot) : void 0;
|
|
79
106
|
const { graph, skills } = await uninstall(
|
|
80
107
|
{
|
|
81
108
|
...conf.options,
|
|
82
109
|
allowScripts,
|
|
83
110
|
allowSkills: conf.get("allow-skills"),
|
|
84
111
|
skillsDirs: conf.get("skills-dir"),
|
|
85
|
-
lockfileOnly: conf.options["lockfile-only"]
|
|
112
|
+
lockfileOnly: conf.options["lockfile-only"],
|
|
113
|
+
...keep ? { keepNodes: /* @__PURE__ */ new Set([keep]) } : null
|
|
86
114
|
},
|
|
87
115
|
remove
|
|
88
116
|
);
|
|
117
|
+
if (global) {
|
|
118
|
+
await deferSelfRemove(conf.projectRoot, graph, keep);
|
|
119
|
+
await removeGlobalPackages(
|
|
120
|
+
conf.projectRoot,
|
|
121
|
+
global.dirs,
|
|
122
|
+
binDir?.dir ?? conf.globalBinDir
|
|
123
|
+
);
|
|
124
|
+
}
|
|
89
125
|
return { graph, ...skills ? { skills } : null };
|
|
90
126
|
};
|
|
91
127
|
export {
|
|
@@ -14,30 +14,30 @@ import {
|
|
|
14
14
|
} from "./chunk-HOF7LEIC.js";
|
|
15
15
|
import {
|
|
16
16
|
commandUsage
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-HT6FS4VB.js";
|
|
18
18
|
import {
|
|
19
19
|
resolveRegistry
|
|
20
|
-
} from "./chunk-
|
|
21
|
-
import "./chunk-
|
|
20
|
+
} from "./chunk-7M2VTFLP.js";
|
|
21
|
+
import "./chunk-EFHOWRKU.js";
|
|
22
22
|
import {
|
|
23
23
|
Spec
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-6D3QAFNZ.js";
|
|
25
25
|
import {
|
|
26
26
|
RegistryClient,
|
|
27
27
|
registryBase
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-Q2UEILN6.js";
|
|
29
29
|
import "./chunk-QNHBAGXQ.js";
|
|
30
|
-
import "./chunk-
|
|
30
|
+
import "./chunk-M242QVJS.js";
|
|
31
31
|
import {
|
|
32
32
|
assertOk,
|
|
33
33
|
requestError
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-4GMNWW4C.js";
|
|
35
35
|
import "./chunk-SUU2WETN.js";
|
|
36
36
|
import "./chunk-B6RIGNEO.js";
|
|
37
37
|
import "./chunk-XNLSTHDK.js";
|
|
38
38
|
import "./chunk-PDWPFR5T.js";
|
|
39
39
|
import "./chunk-Y5PA7DVK.js";
|
|
40
|
-
import "./chunk-
|
|
40
|
+
import "./chunk-BF5DRGRZ.js";
|
|
41
41
|
import {
|
|
42
42
|
error
|
|
43
43
|
} from "./chunk-WZWDS3W4.js";
|