@vltpkg/cli-js 1.0.3 → 1.0.4

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 (69) hide show
  1. package/{access-5WETTBDZ.js → access-RYNHM3DJ.js} +1 -1
  2. package/{bugs-KONFLIQQ.js → bugs-ZHOC4U52.js} +6 -6
  3. package/{build-S7G2DU7I.js → build-HTM6Z7OQ.js} +3 -3
  4. package/{cache-Z4OIMLXQ.js → cache-74GIE5TO.js} +1 -1
  5. package/cache-unzip-src-unzip.js +23 -1
  6. package/{chunk-HNCE3YE5.js → chunk-2CLRMD5A.js} +947 -391
  7. package/{chunk-NXEH3NQZ.js → chunk-A2EWSQPE.js} +2 -2
  8. package/{chunk-UXIRAU5T.js → chunk-AIQ7Z62O.js} +1 -1
  9. package/{chunk-G7UPIJAP.js → chunk-AK3RSABL.js} +4 -4
  10. package/{chunk-XQSBCMSC.js → chunk-AMDP7LYB.js} +2 -2
  11. package/{chunk-5QJEOGEM.js → chunk-GXWZ5T4W.js} +1 -1
  12. package/{chunk-DYCF76WI.js → chunk-JOEHZSS7.js} +1 -1
  13. package/{chunk-TMBNGWXK.js → chunk-MZIM7X37.js} +3 -3
  14. package/{chunk-LZGKX7JI.js → chunk-OR5LSCSK.js} +75 -67
  15. package/{chunk-FFOXTPQA.js → chunk-PDLEQEZ3.js} +124 -75
  16. package/{chunk-W2Q5EIMH.js → chunk-R55OHZ2R.js} +3 -3
  17. package/{chunk-5UPPEUG2.js → chunk-RB6SUM6U.js} +3 -3
  18. package/chunk-SKQHW56B.js +75 -0
  19. package/{chunk-5B23EKN4.js → chunk-WNDUKE42.js} +20 -13
  20. package/{chunk-UAAZW4N6.js → chunk-YRKCPGWZ.js} +2 -2
  21. package/{chunk-FWKQ7YDF.js → chunk-ZWKI5OSF.js} +118 -117
  22. package/{ci-RZZE375O.js → ci-XT7IAX2Y.js} +4 -4
  23. package/cli-package.json +1 -1
  24. package/{config-MDFY3ORD.js → config-B2LF4SJ7.js} +4 -4
  25. package/{config-LL3RLMZG.js → config-SRLA2XPZ.js} +4 -4
  26. package/{create-GVSDTOGQ.js → create-VKNML6FC.js} +8 -8
  27. package/{deprecate-T4TQLGXQ.js → deprecate-IM4HEDIP.js} +4 -4
  28. package/{devtools-HGLF4KAO.js → devtools-66MVSNF5.js} +30 -30
  29. package/{dist-tag-GO46UQUN.js → dist-tag-EKVJAQ66.js} +1 -1
  30. package/{docs-FJME563T.js → docs-4DHMAMOU.js} +6 -6
  31. package/{exec-M22KBPCK.js → exec-7C74Z3WB.js} +8 -8
  32. package/{exec-cache-3UNLDUAP.js → exec-cache-QTUCQWSA.js} +6 -6
  33. package/{exec-local-YHVO5RLU.js → exec-local-ZCNI2JHK.js} +5 -5
  34. package/{help-ZEWMLOJX.js → help-IKRPBT2R.js} +1 -1
  35. package/{init-4HPZY2KN.js → init-PCQ4YK7R.js} +4 -4
  36. package/{install-2TZIP4PJ.js → install-OAQ4K3XX.js} +5 -5
  37. package/{list-NFFXER43.js → list-WYBKBCZU.js} +5 -5
  38. package/{login-KV5YC5Z2.js → login-TTRCQ43Z.js} +1 -1
  39. package/{logout-I2VT3NAR.js → logout-3J77F4OO.js} +1 -1
  40. package/{pack-47ZKFSHI.js → pack-ZLFGYGVZ.js} +6 -6
  41. package/package.json +1 -1
  42. package/{ping-Q7Y7QV63.js → ping-IRLV5C4D.js} +1 -1
  43. package/{pkg-VTJS2ISJ.js → pkg-EKOQ4XKM.js} +5 -5
  44. package/{profile-YXZYVEUX.js → profile-7UBKGJBP.js} +1 -1
  45. package/{publish-CBN67KN2.js → publish-2ODYT4R2.js} +7 -7
  46. package/{query-U3QHF3ZE.js → query-ADSAKEK4.js} +5 -5
  47. package/registry-client-package.json +1 -1
  48. package/registry-client-src-revalidate.js +970 -392
  49. package/{repo-4UIQRBI7.js → repo-3THXRT64.js} +6 -6
  50. package/{reporter-DKZTTACW.js → reporter-6BFJCFVZ.js} +82 -82
  51. package/{run-5DUYI6GL.js → run-2QLSVP6M.js} +5 -5
  52. package/{run-exec-HPNBVAXH.js → run-exec-VYD2Q4BD.js} +5 -5
  53. package/{setup-23W5FQVW.js → setup-TDX5NXUN.js} +1 -1
  54. package/{src-2NB67FPG.js → src-AVMBIRBC.js} +5 -5
  55. package/{src-6OKPBJJT.js → src-SWL4UPPI.js} +1 -1
  56. package/{src-M5RRGKUM.js → src-X66SVM5T.js} +31 -11
  57. package/{token-SRCS5CRU.js → token-3RDRZ4AO.js} +1 -1
  58. package/{uninstall-JXHAFXZ2.js → uninstall-CNAFZTLA.js} +5 -5
  59. package/{unpublish-GRYB5KQH.js → unpublish-7YHQQYZG.js} +1 -1
  60. package/{update-GDLL4ER6.js → update-3W27EZWN.js} +4 -4
  61. package/{version-JVG4CI4L.js → version-K37LT6GZ.js} +4 -4
  62. package/{view-ABQLVL4L.js → view-ZVAYKUL2.js} +9 -9
  63. package/vlr.js +1 -1
  64. package/vlrx.js +1 -1
  65. package/vlt.js +1 -1
  66. package/vlx.js +1 -1
  67. package/vlxl.js +1 -1
  68. package/{whoami-RCCZ7BXI.js → whoami-IOUW56D6.js} +1 -1
  69. package/chunk-RNJSI3NZ.js +0 -75
@@ -1285,7 +1285,7 @@ var range = (a, b, str) => {
1285
1285
  return result;
1286
1286
  };
1287
1287
 
1288
- // ../../node_modules/.vlt/~npm~brace-expansion@5.0.7/node_modules/brace-expansion/dist/esm/index.js
1288
+ // ../../node_modules/.vlt/~npm~brace-expansion@5.0.9/node_modules/brace-expansion/dist/esm/index.js
1289
1289
  var escSlash = "\0SLASH" + Math.random() + "\0";
1290
1290
  var escOpen = "\0OPEN" + Math.random() + "\0";
1291
1291
  var escClose = "\0CLOSE" + Math.random() + "\0";
@@ -1302,6 +1302,7 @@ var closePattern = /\\}/g;
1302
1302
  var commaPattern = /\\,/g;
1303
1303
  var periodPattern = /\\\./g;
1304
1304
  var EXPANSION_MAX = 1e5;
1305
+ var EXPANSION_MAX_LENGTH = 4e6;
1305
1306
  function numeric(str) {
1306
1307
  return !isNaN(str) ? parseInt(str, 10) : str.charCodeAt(0);
1307
1308
  }
@@ -1336,11 +1337,11 @@ function expand(str, options = {}) {
1336
1337
  if (!str) {
1337
1338
  return [];
1338
1339
  }
1339
- const { max = EXPANSION_MAX } = options;
1340
+ const { max = EXPANSION_MAX, maxLength = EXPANSION_MAX_LENGTH } = options;
1340
1341
  if (str.slice(0, 2) === "{}") {
1341
1342
  str = "\\{\\}" + str.slice(2);
1342
1343
  }
1343
- return expand_(escapeBraces(str), max, true).map(unescapeBraces);
1344
+ return expand_(escapeBraces(str), max, maxLength, true).map(unescapeBraces);
1344
1345
  }
1345
1346
  function embrace(str) {
1346
1347
  return "{" + str + "}";
@@ -1354,20 +1355,87 @@ function lte(i, y) {
1354
1355
  function gte(i, y) {
1355
1356
  return i >= y;
1356
1357
  }
1357
- function expand_(str, max, isTop) {
1358
- const expansions = [];
1358
+ function combine(acc, pre, values, max, maxLength, dropEmpties) {
1359
+ const out = [];
1360
+ let length = 0;
1361
+ for (let a = 0; a < acc.length; a++) {
1362
+ for (let v = 0; v < values.length; v++) {
1363
+ if (out.length >= max)
1364
+ return out;
1365
+ const expansion = acc[a] + pre + values[v];
1366
+ if (dropEmpties && !expansion)
1367
+ continue;
1368
+ if (length + expansion.length > maxLength)
1369
+ return out;
1370
+ out.push(expansion);
1371
+ length += expansion.length;
1372
+ }
1373
+ }
1374
+ return out;
1375
+ }
1376
+ function expandSequence(body, isAlphaSequence, max, maxLength) {
1377
+ const n = body.split(/\.\./);
1378
+ const N = [];
1379
+ if (n[0] === void 0 || n[1] === void 0) {
1380
+ return N;
1381
+ }
1382
+ const x = numeric(n[0]);
1383
+ const y = numeric(n[1]);
1384
+ const width = Math.max(n[0].length, n[1].length);
1385
+ let incr = n.length === 3 && n[2] !== void 0 ? Math.max(Math.abs(numeric(n[2])), 1) : 1;
1386
+ let test = lte;
1387
+ const reverse = y < x;
1388
+ if (reverse) {
1389
+ incr *= -1;
1390
+ test = gte;
1391
+ }
1392
+ const pad = n.some(isPadded);
1393
+ let length = 0;
1394
+ for (let i = x; test(i, y) && N.length < max; i += incr) {
1395
+ let c;
1396
+ if (isAlphaSequence) {
1397
+ c = String.fromCharCode(i);
1398
+ if (c === "\\") {
1399
+ c = "";
1400
+ }
1401
+ } else {
1402
+ c = String(i);
1403
+ if (pad) {
1404
+ const need = width - c.length;
1405
+ if (need > 0) {
1406
+ const z = new Array(need + 1).join("0");
1407
+ if (i < 0) {
1408
+ c = "-" + z + c.slice(1);
1409
+ } else {
1410
+ c = z + c;
1411
+ }
1412
+ }
1413
+ }
1414
+ }
1415
+ if (length + c.length > maxLength)
1416
+ break;
1417
+ N.push(c);
1418
+ length += c.length;
1419
+ }
1420
+ return N;
1421
+ }
1422
+ function expand_(str, max, maxLength, isTop) {
1423
+ let acc = [""];
1424
+ let dropEmpties = false;
1425
+ let firstGroup = true;
1359
1426
  for (; ; ) {
1360
1427
  const m = balanced("{", "}", str);
1361
- if (!m)
1362
- return [str];
1428
+ if (!m) {
1429
+ return combine(acc, str, [""], max, maxLength, dropEmpties);
1430
+ }
1363
1431
  const pre = m.pre;
1364
- if (/\$$/.test(m.pre)) {
1365
- const post2 = m.post.length ? expand_(m.post, max, false) : [""];
1366
- for (let k = 0; k < post2.length && k < max; k++) {
1367
- const expansion = pre + "{" + m.body + "}" + post2[k];
1368
- expansions.push(expansion);
1369
- }
1370
- return expansions;
1432
+ if (/\$$/.test(pre)) {
1433
+ acc = combine(acc, pre + "{" + m.body + "}", [""], max, maxLength, dropEmpties && !m.post.length);
1434
+ firstGroup = false;
1435
+ if (!m.post.length)
1436
+ break;
1437
+ str = m.post;
1438
+ continue;
1371
1439
  }
1372
1440
  const isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body);
1373
1441
  const isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body);
@@ -1379,77 +1447,58 @@ function expand_(str, max, isTop) {
1379
1447
  isTop = true;
1380
1448
  continue;
1381
1449
  }
1382
- return [str];
1450
+ return combine(acc, pre + "{" + m.body + "}" + m.post, [""], max, maxLength, dropEmpties);
1383
1451
  }
1384
- const post = m.post.length ? expand_(m.post, max, false) : [""];
1385
- let n;
1452
+ if (firstGroup) {
1453
+ dropEmpties = isTop && !isSequence;
1454
+ firstGroup = false;
1455
+ }
1456
+ let values;
1386
1457
  if (isSequence) {
1387
- n = m.body.split(/\.\./);
1458
+ values = expandSequence(m.body, isAlphaSequence, max, maxLength);
1388
1459
  } else {
1389
- n = parseCommaParts(m.body);
1460
+ let n = parseCommaParts(m.body);
1390
1461
  if (n.length === 1 && n[0] !== void 0) {
1391
- n = expand_(n[0], max, false).map(embrace);
1462
+ n = expand_(n[0], max, maxLength, false).map(embrace);
1392
1463
  if (n.length === 1) {
1393
- return post.map((p) => m.pre + n[0] + p);
1464
+ acc = combine(acc, pre + n[0], [""], max, maxLength, dropEmpties && !m.post.length);
1465
+ if (!m.post.length)
1466
+ break;
1467
+ str = m.post;
1468
+ continue;
1394
1469
  }
1395
1470
  }
1396
- }
1397
- let N;
1398
- if (isSequence && n[0] !== void 0 && n[1] !== void 0) {
1399
- const x = numeric(n[0]);
1400
- const y = numeric(n[1]);
1401
- const width = Math.max(n[0].length, n[1].length);
1402
- let incr = n.length === 3 && n[2] !== void 0 ? Math.max(Math.abs(numeric(n[2])), 1) : 1;
1403
- let test = lte;
1404
- const reverse = y < x;
1405
- if (reverse) {
1406
- incr *= -1;
1407
- test = gte;
1408
- }
1409
- const pad = n.some(isPadded);
1410
- N = [];
1411
- for (let i = x; test(i, y) && N.length < max; i += incr) {
1412
- let c;
1413
- if (isAlphaSequence) {
1414
- c = String.fromCharCode(i);
1415
- if (c === "\\") {
1416
- c = "";
1417
- }
1418
- } else {
1419
- c = String(i);
1420
- if (pad) {
1421
- const need = width - c.length;
1422
- if (need > 0) {
1423
- const z = new Array(need + 1).join("0");
1424
- if (i < 0) {
1425
- c = "-" + z + c.slice(1);
1426
- } else {
1427
- c = z + c;
1428
- }
1429
- }
1430
- }
1471
+ let dropsEmpties = dropEmpties && !m.post.length && !pre;
1472
+ for (let d = 0; dropsEmpties && d < acc.length; d++) {
1473
+ if (acc[d]) {
1474
+ dropsEmpties = false;
1431
1475
  }
1432
- N.push(c);
1433
- }
1434
- } else {
1435
- N = [];
1436
- for (let j = 0; j < n.length; j++) {
1437
- N.push.apply(N, expand_(n[j], max, false));
1438
1476
  }
1439
- }
1440
- for (let j = 0; j < N.length; j++) {
1441
- for (let k = 0; k < post.length && expansions.length < max; k++) {
1442
- const expansion = pre + N[j] + post[k];
1443
- if (!isTop || isSequence || expansion) {
1444
- expansions.push(expansion);
1477
+ values = [];
1478
+ let valuesLength = 0;
1479
+ outer: for (let j = 0; j < n.length; j++) {
1480
+ const expanded = expand_(n[j], max, maxLength, false);
1481
+ for (let k = 0; k < expanded.length; k++) {
1482
+ const v = expanded[k];
1483
+ if (dropsEmpties && !v)
1484
+ continue;
1485
+ if (values.length >= max || valuesLength + v.length > maxLength) {
1486
+ break outer;
1487
+ }
1488
+ values.push(v);
1489
+ valuesLength += v.length;
1445
1490
  }
1446
1491
  }
1447
1492
  }
1448
- return expansions;
1493
+ acc = combine(acc, pre, values, max, maxLength, dropEmpties && !m.post.length);
1494
+ if (!m.post.length)
1495
+ break;
1496
+ str = m.post;
1449
1497
  }
1498
+ return acc;
1450
1499
  }
1451
1500
 
1452
- // ../../node_modules/.vlt/~npm~minimatch@10.2.5/node_modules/minimatch/dist/esm/assert-valid-pattern.js
1501
+ // ../../node_modules/.vlt/~npm~minimatch@10.2.6/node_modules/minimatch/dist/esm/assert-valid-pattern.js
1453
1502
  var MAX_PATTERN_LENGTH = 1024 * 64;
1454
1503
  var assertValidPattern = (pattern) => {
1455
1504
  if (typeof pattern !== "string") {
@@ -1460,7 +1509,7 @@ var assertValidPattern = (pattern) => {
1460
1509
  }
1461
1510
  };
1462
1511
 
1463
- // ../../node_modules/.vlt/~npm~minimatch@10.2.5/node_modules/minimatch/dist/esm/brace-expressions.js
1512
+ // ../../node_modules/.vlt/~npm~minimatch@10.2.6/node_modules/minimatch/dist/esm/brace-expressions.js
1464
1513
  var posixClasses = {
1465
1514
  "[:alnum:]": ["\\p{L}\\p{Nl}\\p{Nd}", true],
1466
1515
  "[:alpha:]": ["\\p{L}\\p{Nl}", true],
@@ -1569,7 +1618,7 @@ var parseClass = (glob, position) => {
1569
1618
  return [comb, uflag, endPos - pos, true];
1570
1619
  };
1571
1620
 
1572
- // ../../node_modules/.vlt/~npm~minimatch@10.2.5/node_modules/minimatch/dist/esm/unescape.js
1621
+ // ../../node_modules/.vlt/~npm~minimatch@10.2.6/node_modules/minimatch/dist/esm/unescape.js
1573
1622
  var unescape = (s, { windowsPathsNoEscape = false, magicalBraces = true } = {}) => {
1574
1623
  if (magicalBraces) {
1575
1624
  return windowsPathsNoEscape ? s.replace(/\[([^/\\])\]/g, "$1") : s.replace(/((?!\\).|^)\[([^/\\])\]/g, "$1$2").replace(/\\([^/])/g, "$1");
@@ -1577,7 +1626,7 @@ var unescape = (s, { windowsPathsNoEscape = false, magicalBraces = true } = {})
1577
1626
  return windowsPathsNoEscape ? s.replace(/\[([^/\\{}])\]/g, "$1") : s.replace(/((?!\\).|^)\[([^/\\{}])\]/g, "$1$2").replace(/\\([^/{}])/g, "$1");
1578
1627
  };
1579
1628
 
1580
- // ../../node_modules/.vlt/~npm~minimatch@10.2.5/node_modules/minimatch/dist/esm/ast.js
1629
+ // ../../node_modules/.vlt/~npm~minimatch@10.2.6/node_modules/minimatch/dist/esm/ast.js
1581
1630
  var _a;
1582
1631
  var types = /* @__PURE__ */ new Set(["!", "?", "+", "*", "@"]);
1583
1632
  var isExtglobType = (c) => types.has(c);
@@ -2221,7 +2270,7 @@ var AST = class {
2221
2270
  };
2222
2271
  _a = AST;
2223
2272
 
2224
- // ../../node_modules/.vlt/~npm~minimatch@10.2.5/node_modules/minimatch/dist/esm/escape.js
2273
+ // ../../node_modules/.vlt/~npm~minimatch@10.2.6/node_modules/minimatch/dist/esm/escape.js
2225
2274
  var escape = (s, { windowsPathsNoEscape = false, magicalBraces = false } = {}) => {
2226
2275
  if (magicalBraces) {
2227
2276
  return windowsPathsNoEscape ? s.replace(/[?*()[\]{}]/g, "[$&]") : s.replace(/[?*()[\]\\{}]/g, "\\$&");
@@ -2229,7 +2278,7 @@ var escape = (s, { windowsPathsNoEscape = false, magicalBraces = false } = {}) =
2229
2278
  return windowsPathsNoEscape ? s.replace(/[?*()[\]]/g, "[$&]") : s.replace(/[?*()[\]\\]/g, "\\$&");
2230
2279
  };
2231
2280
 
2232
- // ../../node_modules/.vlt/~npm~minimatch@10.2.5/node_modules/minimatch/dist/esm/index.js
2281
+ // ../../node_modules/.vlt/~npm~minimatch@10.2.6/node_modules/minimatch/dist/esm/index.js
2233
2282
  var minimatch = (p, pattern, options = {}) => {
2234
2283
  assertValidPattern(pattern);
2235
2284
  if (!options.nocomment && pattern.charAt(0) === "#") {
@@ -14,7 +14,7 @@ import {
14
14
  } from "./chunk-RIYFGX27.js";
15
15
  import {
16
16
  createHostContextsMap
17
- } from "./chunk-TMBNGWXK.js";
17
+ } from "./chunk-MZIM7X37.js";
18
18
  import {
19
19
  stderr,
20
20
  stdout,
@@ -27,10 +27,10 @@ import {
27
27
  Query,
28
28
  actual,
29
29
  isRunResult
30
- } from "./chunk-LZGKX7JI.js";
30
+ } from "./chunk-OR5LSCSK.js";
31
31
  import {
32
32
  Monorepo
33
- } from "./chunk-FFOXTPQA.js";
33
+ } from "./chunk-PDLEQEZ3.js";
34
34
  import {
35
35
  isErrorWithCause
36
36
  } from "./chunk-IITIX4ID.js";
@@ -11,14 +11,14 @@ import {createRequire as _vlt_createRequire} from "node:module";
11
11
  var require = _vlt_createRequire(import.meta.filename);
12
12
  import {
13
13
  PackageInfoClient
14
- } from "./chunk-G7UPIJAP.js";
14
+ } from "./chunk-AK3RSABL.js";
15
15
  import {
16
16
  findCmdShimIfExists,
17
17
  install
18
- } from "./chunk-LZGKX7JI.js";
18
+ } from "./chunk-OR5LSCSK.js";
19
19
  import {
20
20
  PathScurry
21
- } from "./chunk-FFOXTPQA.js";
21
+ } from "./chunk-PDLEQEZ3.js";
22
22
  import {
23
23
  Spec
24
24
  } from "./chunk-XU5SMHXP.js";
@@ -0,0 +1,75 @@
1
+ var global = globalThis;
2
+ import {Buffer} from "node:buffer";
3
+ import {setTimeout as _vlt_setTimeout,clearTimeout as _vlt_clearTimeout,setImmediate as _vlt_setImmediate,clearImmediate as _vlt_clearImmediate,setInterval as _vlt_setInterval,clearInterval as _vlt_clearInterval} from "node:timers";
4
+ globalThis.setTimeout = _vlt_setTimeout;
5
+ globalThis.clearTimeout = _vlt_clearTimeout;
6
+ globalThis.setImmediate = _vlt_setImmediate;
7
+ globalThis.clearImmediate = _vlt_clearImmediate;
8
+ globalThis.setInterval = _vlt_setInterval;
9
+ globalThis.clearInterval = _vlt_clearInterval;
10
+ import {createRequire as _vlt_createRequire} from "node:module";
11
+ var require = _vlt_createRequire(import.meta.filename);
12
+ import {
13
+ error
14
+ } from "./chunk-WZWDS3W4.js";
15
+ import {
16
+ __glob
17
+ } from "./chunk-PZLD7RTK.js";
18
+
19
+ // import("./commands/**/*.ts") in ../../src/cli-sdk/src/load-command.ts
20
+ var globImport_commands_ts = __glob({
21
+ "./commands/access.ts": () => import("./access-RYNHM3DJ.js"),
22
+ "./commands/bugs.ts": () => import("./bugs-ZHOC4U52.js"),
23
+ "./commands/build.ts": () => import("./build-HTM6Z7OQ.js"),
24
+ "./commands/cache.ts": () => import("./cache-74GIE5TO.js"),
25
+ "./commands/ci.ts": () => import("./ci-XT7IAX2Y.js"),
26
+ "./commands/config.ts": () => import("./config-B2LF4SJ7.js"),
27
+ "./commands/create.ts": () => import("./create-VKNML6FC.js"),
28
+ "./commands/deprecate.ts": () => import("./deprecate-IM4HEDIP.js"),
29
+ "./commands/dist-tag.ts": () => import("./dist-tag-EKVJAQ66.js"),
30
+ "./commands/docs.ts": () => import("./docs-4DHMAMOU.js"),
31
+ "./commands/exec-cache.ts": () => import("./exec-cache-QTUCQWSA.js"),
32
+ "./commands/exec-local.ts": () => import("./exec-local-ZCNI2JHK.js"),
33
+ "./commands/exec.ts": () => import("./exec-7C74Z3WB.js"),
34
+ "./commands/help.ts": () => import("./help-IKRPBT2R.js"),
35
+ "./commands/init.ts": () => import("./init-PCQ4YK7R.js"),
36
+ "./commands/install.ts": () => import("./install-OAQ4K3XX.js"),
37
+ "./commands/install/reporter.ts": () => import("./reporter-6BFJCFVZ.js"),
38
+ "./commands/list.ts": () => import("./list-WYBKBCZU.js"),
39
+ "./commands/login.ts": () => import("./login-TTRCQ43Z.js"),
40
+ "./commands/logout.ts": () => import("./logout-3J77F4OO.js"),
41
+ "./commands/pack.ts": () => import("./pack-ZLFGYGVZ.js"),
42
+ "./commands/ping.ts": () => import("./ping-IRLV5C4D.js"),
43
+ "./commands/pkg.ts": () => import("./pkg-EKOQ4XKM.js"),
44
+ "./commands/profile.ts": () => import("./profile-7UBKGJBP.js"),
45
+ "./commands/publish.ts": () => import("./publish-2ODYT4R2.js"),
46
+ "./commands/query.ts": () => import("./query-ADSAKEK4.js"),
47
+ "./commands/registry.ts": () => import("./registry-CZPFR3OF.js"),
48
+ "./commands/repo.ts": () => import("./repo-3THXRT64.js"),
49
+ "./commands/run-exec.ts": () => import("./run-exec-VYD2Q4BD.js"),
50
+ "./commands/run.ts": () => import("./run-2QLSVP6M.js"),
51
+ "./commands/setup.ts": () => import("./setup-TDX5NXUN.js"),
52
+ "./commands/token.ts": () => import("./token-3RDRZ4AO.js"),
53
+ "./commands/uninstall.ts": () => import("./uninstall-CNAFZTLA.js"),
54
+ "./commands/unpublish.ts": () => import("./unpublish-7YHQQYZG.js"),
55
+ "./commands/update.ts": () => import("./update-3W27EZWN.js"),
56
+ "./commands/version.ts": () => import("./version-K37LT6GZ.js"),
57
+ "./commands/view.ts": () => import("./view-ZVAYKUL2.js"),
58
+ "./commands/whoami.ts": () => import("./whoami-IOUW56D6.js")
59
+ });
60
+
61
+ // ../../src/cli-sdk/src/load-command.ts
62
+ var loadCommand = async (command) => {
63
+ try {
64
+ return await globImport_commands_ts(`./commands/${command}.ts`);
65
+ } catch (e) {
66
+ throw error("Could not load command", {
67
+ found: command,
68
+ cause: e
69
+ });
70
+ }
71
+ };
72
+
73
+ export {
74
+ loadCommand
75
+ };
@@ -23,6 +23,9 @@ import {
23
23
  import {
24
24
  XDG
25
25
  } from "./chunk-XNLSTHDK.js";
26
+ import {
27
+ defaultRegistryName
28
+ } from "./chunk-IITIX4ID.js";
26
29
  import {
27
30
  error
28
31
  } from "./chunk-WZWDS3W4.js";
@@ -250,16 +253,20 @@ var __CODE_SPLIT_SCRIPT_NAME = resolve(import.meta.dirname, "security-archive-sr
250
253
  // ../../src/security-archive/src/index.ts
251
254
  var SOCKET_API_V0_URL = "https://api.socket.dev/v0/purl?alerts=true";
252
255
  var SOCKET_PUBLIC_API_TOKEN = "sktsec_t_--RAN5U4ivauy4w37-6aoKyYPDt5ZbaT5JBVMqiwKo_api";
253
- var targetSecurityRegisty = "https://registry.npmjs.org/";
254
- var usesTargetRegistry = (node) => {
255
- const depID = node.id;
256
- const specOptions = node.options;
257
- const [nodeType, nodeRegistry] = splitDepID(depID);
258
- if (nodeType !== "registry") {
259
- return false;
260
- }
261
- const reg = specOptions.registries?.[nodeRegistry];
262
- return reg === targetSecurityRegisty;
256
+ var npmRegistryURL = "https://registry.npmjs.org/";
257
+ var normalizeRegistryURL = (url) => url.endsWith("/") ? url : `${url}/`;
258
+ var nodeRegistryURL = (node) => {
259
+ const [type, reg] = splitDepID(node.id);
260
+ if (type !== "registry") return;
261
+ const url = /^https?:\/\//.test(reg) ? reg : node.options.registries?.[reg];
262
+ return url ? normalizeRegistryURL(url) : void 0;
263
+ };
264
+ var usesNpmRegistry = (node) => {
265
+ const origin = nodeRegistryURL(node);
266
+ if (!origin) return false;
267
+ if (origin === npmRegistryURL) return true;
268
+ const npmAlias = node.options.registries?.[defaultRegistryName];
269
+ return !!npmAlias && normalizeRegistryURL(npmAlias) === origin;
263
270
  };
264
271
  var { version } = loadPackageJson(
265
272
  import.meta.filename,
@@ -412,7 +419,7 @@ var SecurityArchive = class _SecurityArchive extends I {
412
419
  const queue = /* @__PURE__ */ new Set();
413
420
  for (const node of this.#nodesByID.values()) {
414
421
  const normalizedId = baseDepID(node.id);
415
- if (usesTargetRegistry(node) && !this.has(normalizedId) && !this.#expired.has(normalizedId)) {
422
+ if (usesNpmRegistry(node) && !this.has(normalizedId) && !this.#expired.has(normalizedId)) {
416
423
  const purl = `pkg:npm/${node.name}@${node.version}`;
417
424
  queue.add({ purl });
418
425
  }
@@ -512,12 +519,12 @@ var SecurityArchive = class _SecurityArchive extends I {
512
519
  }
513
520
  }
514
521
  /**
515
- * Validates that all public-registry packages in the nodes
522
+ * Validates that all npm-ecosystem packages in the nodes
516
523
  * have a valid report data in the current in-memory cache.
517
524
  */
518
525
  #validateReportData() {
519
526
  for (const node of this.#nodesByID.values()) {
520
- if (usesTargetRegistry(node)) {
527
+ if (usesNpmRegistry(node)) {
521
528
  if (!this.has(baseDepID(node.id))) {
522
529
  this.ok = false;
523
530
  return;
@@ -13,10 +13,10 @@ import {
13
13
  Ct,
14
14
  Qn,
15
15
  require_lib
16
- } from "./chunk-FWKQ7YDF.js";
16
+ } from "./chunk-ZWKI5OSF.js";
17
17
  import {
18
18
  minimatch
19
- } from "./chunk-FFOXTPQA.js";
19
+ } from "./chunk-PDLEQEZ3.js";
20
20
  import {
21
21
  Spec
22
22
  } from "./chunk-XU5SMHXP.js";