@vltpkg/cli-js 1.0.0-rc.32 → 1.0.0-rc.34

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 (85) hide show
  1. package/{access-SQZRJLJA.js → access-SXQICNAN.js} +23 -12
  2. package/{bugs-BMZ5UERM.js → bugs-OOPMFRCI.js} +19 -17
  3. package/{build-LGQI6OGM.js → build-HDXI5OA7.js} +13 -9
  4. package/{cache-JWHNATAX.js → cache-RW4Y4XNQ.js} +19 -14
  5. package/cache-unzip-src-unzip.js +434 -428
  6. package/{chunk-6YXVQ5HC.js → chunk-2PLIV3N3.js} +1 -27
  7. package/{chunk-G6PG3AGN.js → chunk-3SQ5Y324.js} +11 -8
  8. package/{chunk-ZUP6UTME.js → chunk-4RZDJQ5U.js} +42 -61
  9. package/{chunk-M2WD7IBO.js → chunk-4ZXA6RLP.js} +1 -1
  10. package/{chunk-R44FR7BY.js → chunk-7NHXV6AH.js} +439 -433
  11. package/{chunk-SIXXDCBI.js → chunk-CCQYIYTA.js} +7 -7
  12. package/{chunk-FXDRM4ZO.js → chunk-CLVRCGOZ.js} +247 -235
  13. package/{chunk-YCQTLBWF.js → chunk-CNSTFT7U.js} +1 -1
  14. package/{chunk-7XE7OES7.js → chunk-D5CP6O6G.js} +3 -3
  15. package/{chunk-YQXDHMHG.js → chunk-E5YE7UTZ.js} +3167 -2991
  16. package/chunk-E74WGW5C.js +49 -0
  17. package/{chunk-DFNHGGGV.js → chunk-EFWPI6IY.js} +1 -1
  18. package/{chunk-5UXEBLLT.js → chunk-EHEVBLDB.js} +68 -7
  19. package/{chunk-JBVLIV37.js → chunk-EQ633HIM.js} +14 -13
  20. package/{chunk-DM3WGEVB.js → chunk-F2FKLPZD.js} +7 -7
  21. package/chunk-FAG776ZD.js +137 -0
  22. package/{chunk-HQ4US6G3.js → chunk-FWKQ7YDF.js} +1049 -980
  23. package/chunk-HB7CKTYO.js +75 -0
  24. package/{chunk-KRGA5VLT.js → chunk-ICJRCXSG.js} +31 -27
  25. package/{chunk-FBTBHRPG.js → chunk-LCDBW6IT.js} +1 -1
  26. package/{chunk-IAKUGHGT.js → chunk-MT76WHSM.js} +1 -1
  27. package/{chunk-3TVABXAG.js → chunk-MU7Y4R5E.js} +3 -3
  28. package/{chunk-JKAZKVQU.js → chunk-PW6S6AIO.js} +15 -11
  29. package/{chunk-DI2CYYXF.js → chunk-U6DM3ROE.js} +706 -442
  30. package/chunk-UBLFPJHV.js +40 -0
  31. package/{chunk-SDBTQF2Y.js → chunk-UCD3RJYG.js} +5 -5
  32. package/{chunk-XFQ2EH5D.js → chunk-VM2RMMY4.js} +3 -3
  33. package/{chunk-DIKKTUBV.js → chunk-VZ7UNZHR.js} +3 -3
  34. package/{chunk-2V4AQPBR.js → chunk-WP6CYBPM.js} +81 -46
  35. package/{chunk-LEX7YPHR.js → chunk-WXMYKCQW.js} +118 -92
  36. package/{chunk-LRPTCGTW.js → chunk-XA47WS4N.js} +11 -15
  37. package/{chunk-NLFBANVO.js → chunk-Y7CQIZ7Y.js} +106 -150
  38. package/{ci-FQJANSQW.js → ci-MTYU2K2A.js} +14 -10
  39. package/cli-package.json +6 -2
  40. package/{config-4KQTTXJH.js → config-6NXV2BXW.js} +15 -13
  41. package/{config-LRL3N7TN.js → config-TVAXCTQO.js} +13 -11
  42. package/{create-KN6AXEA6.js → create-LXI5DCDW.js} +24 -19
  43. package/{deprecate-P26WHVFB.js → deprecate-2AQBL5XT.js} +22 -14
  44. package/{devtools-6NFQDW4L.js → devtools-HGLF4KAO.js} +82 -28
  45. package/{dist-tag-FA2BT7SA.js → dist-tag-BFSYLRIH.js} +16 -9
  46. package/{docs-OAPIY4SC.js → docs-ADPJ4B4C.js} +19 -17
  47. package/{exec-CVZGHJZS.js → exec-GMS54RAC.js} +24 -19
  48. package/{exec-cache-3AHODVRN.js → exec-cache-R5LVZL5Z.js} +22 -17
  49. package/{exec-local-I4OJX76E.js → exec-local-TVCLZGIM.js} +17 -14
  50. package/{help-QFIQSPNS.js → help-6CECUD6C.js} +5 -4
  51. package/{init-QLADIAP5.js → init-XXFLGYVP.js} +12 -10
  52. package/{install-B7CU2BLC.js → install-6KMXYSF5.js} +27 -12
  53. package/{list-OTFV3LOM.js → list-RUO3SUKY.js} +20 -15
  54. package/{login-LG2ZOIDQ.js → login-6I2CGO7I.js} +23 -9
  55. package/{logout-KUI773AM.js → logout-JTU4BJKH.js} +19 -8
  56. package/{pack-C55TTBIQ.js → pack-NCWH2TUA.js} +17 -13
  57. package/package.json +8 -1
  58. package/{ping-VNUOC26G.js → ping-4MEAC2WD.js} +17 -10
  59. package/{pkg-H4RJEBK5.js → pkg-ENSKG6G7.js} +13 -11
  60. package/{profile-DIJ5JUSE.js → profile-62YHNFSO.js} +16 -8
  61. package/{publish-XF2TRBPH.js → publish-PPY724N2.js} +58 -23
  62. package/{query-BGP5JMJ7.js → query-NLWXKOOT.js} +61 -15
  63. package/registry-QGI44LG4.js +117 -0
  64. package/registry-client-package.json +6 -2
  65. package/registry-client-src-revalidate.js +1245 -977
  66. package/{repo-NCEHK7KB.js → repo-BFRAXIVU.js} +19 -17
  67. package/{reporter-OB6SNHOZ.js → reporter-2XBYWAVU.js} +3 -2
  68. package/{run-ZNJJYEJF.js → run-7O65747G.js} +17 -14
  69. package/{run-exec-F5OV7MVN.js → run-exec-2OYWHL6K.js} +19 -14
  70. package/security-archive-src-update-expired.js +16 -11
  71. package/setup-MMIDAIJI.js +181 -0
  72. package/{src-M3WI7TSB.js → src-OK3KHDYR.js} +25 -17
  73. package/{token-KXCVRJGF.js → token-VLVXUW54.js} +20 -9
  74. package/{uninstall-33SUWR6K.js → uninstall-TAG6QIAG.js} +15 -11
  75. package/{unpublish-7AZPBZF2.js → unpublish-Y4L5J2IA.js} +17 -9
  76. package/{update-2EQF6IKZ.js → update-RYH4RKBS.js} +14 -10
  77. package/{version-HFYI3SEX.js → version-COHB32ON.js} +12 -10
  78. package/{view-C5OT36OB.js → view-P7U4MF43.js} +18 -14
  79. package/vlr.js +1 -1
  80. package/vlrx.js +1 -1
  81. package/vlt.js +1 -1
  82. package/vlx.js +1 -1
  83. package/vlxl.js +1 -1
  84. package/{whoami-KKFV3XR6.js → whoami-47MVFMZC.js} +19 -8
  85. package/chunk-FXIBCUIM.js +0 -73
@@ -0,0 +1,40 @@
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
+
13
+ // ../../src/output/src/index.ts
14
+ import EventEmitter from "node:events";
15
+ var OutputEmitter = class {
16
+ emitter = new EventEmitter();
17
+ emit(eventName, payload) {
18
+ this.emitter.emit(eventName, payload);
19
+ }
20
+ on(eventName, handler) {
21
+ this.emitter.on(eventName, handler);
22
+ }
23
+ off(eventName, handler) {
24
+ this.emitter.off(eventName, handler);
25
+ }
26
+ };
27
+ var emitter = new OutputEmitter();
28
+ var logRequest = (url, state, details = {}) => {
29
+ emitter.emit("request", { url, state, ...details });
30
+ };
31
+ var graphStep = (step) => {
32
+ emitter.emit("graphStep", { step, state: "start" });
33
+ return () => emitter.emit("graphStep", { step, state: "stop" });
34
+ };
35
+
36
+ export {
37
+ emitter,
38
+ logRequest,
39
+ graphStep
40
+ };
@@ -14,26 +14,26 @@ import {
14
14
  } from "./chunk-RIYFGX27.js";
15
15
  import {
16
16
  createHostContextsMap
17
- } from "./chunk-XFQ2EH5D.js";
17
+ } from "./chunk-VM2RMMY4.js";
18
18
  import {
19
19
  stderr,
20
20
  stdout,
21
21
  styleTextStdout
22
- } from "./chunk-5UXEBLLT.js";
22
+ } from "./chunk-EHEVBLDB.js";
23
23
  import {
24
24
  Query,
25
25
  actual,
26
26
  isRunResult
27
- } from "./chunk-YQXDHMHG.js";
27
+ } from "./chunk-E5YE7UTZ.js";
28
28
  import {
29
29
  require_emoji_regex
30
30
  } from "./chunk-VTEFO2FT.js";
31
31
  import {
32
32
  Monorepo
33
- } from "./chunk-KRGA5VLT.js";
33
+ } from "./chunk-ICJRCXSG.js";
34
34
  import {
35
35
  isErrorWithCause
36
- } from "./chunk-6YXVQ5HC.js";
36
+ } from "./chunk-2PLIV3N3.js";
37
37
  import {
38
38
  error
39
39
  } from "./chunk-WZWDS3W4.js";
@@ -13,10 +13,10 @@ import {
13
13
  actual,
14
14
  callLimit,
15
15
  createVirtualRoot
16
- } from "./chunk-YQXDHMHG.js";
16
+ } from "./chunk-E5YE7UTZ.js";
17
17
  import {
18
18
  SecurityArchive
19
- } from "./chunk-DM3WGEVB.js";
19
+ } from "./chunk-F2FKLPZD.js";
20
20
  import {
21
21
  error
22
22
  } from "./chunk-WZWDS3W4.js";
@@ -115,7 +115,7 @@ var reloadConfig = async (folder) => {
115
115
  unload("project");
116
116
  } catch {
117
117
  }
118
- const { Config } = await import("./config-LRL3N7TN.js");
118
+ const { Config } = await import("./config-TVAXCTQO.js");
119
119
  return Config.load(folder, process.argv, true);
120
120
  };
121
121
 
@@ -12,19 +12,19 @@ var require = _vlt_createRequire(import.meta.filename);
12
12
  import {
13
13
  init,
14
14
  install
15
- } from "./chunk-YQXDHMHG.js";
15
+ } from "./chunk-E5YE7UTZ.js";
16
16
  import {
17
17
  asWSConfig,
18
18
  assertWSConfig,
19
19
  minimatch
20
- } from "./chunk-KRGA5VLT.js";
20
+ } from "./chunk-ICJRCXSG.js";
21
21
  import {
22
22
  load,
23
23
  save
24
24
  } from "./chunk-HTOTG4TS.js";
25
25
  import {
26
26
  commandUsage
27
- } from "./chunk-FBTBHRPG.js";
27
+ } from "./chunk-LCDBW6IT.js";
28
28
 
29
29
  // ../../src/cli-sdk/src/commands/init.ts
30
30
  import { mkdirSync } from "node:fs";
@@ -16,40 +16,6 @@ import {
16
16
  error
17
17
  } from "./chunk-WZWDS3W4.js";
18
18
 
19
- // ../../node_modules/.vlt/~npm~package-json-from-dist@1.0.1/node_modules/package-json-from-dist/dist/esm/index.js
20
- import { readFileSync } from "node:fs";
21
- import { dirname, resolve, sep } from "node:path";
22
- import { fileURLToPath } from "node:url";
23
- var NM = `${sep}node_modules${sep}`;
24
- var STORE = `.store${sep}`;
25
- var PKG = `${sep}package${sep}`;
26
- var DIST = `${sep}dist${sep}`;
27
- var findPackageJson = (from, pathFromSrc = "../package.json") => {
28
- const f2 = typeof from === "object" || from.startsWith("file://") ? fileURLToPath(from) : from;
29
- const __dirname = dirname(f2);
30
- const nms = __dirname.lastIndexOf(NM);
31
- if (nms !== -1) {
32
- const nm = __dirname.substring(0, nms + NM.length);
33
- const pkgDir = __dirname.substring(nms + NM.length);
34
- if (pkgDir.startsWith(STORE)) {
35
- const pkg = pkgDir.indexOf(PKG, STORE.length);
36
- if (pkg) {
37
- return resolve(nm, pkgDir.substring(0, pkg + PKG.length), "package.json");
38
- }
39
- }
40
- const pkgName = pkgDir.startsWith("@") ? pkgDir.split(sep, 2).join(sep) : String(pkgDir.split(sep)[0]);
41
- return resolve(nm, pkgName, "package.json");
42
- } else {
43
- const d2 = __dirname.lastIndexOf(DIST);
44
- if (d2 !== -1) {
45
- return resolve(__dirname.substring(0, d2), "package.json");
46
- } else {
47
- return resolve(__dirname, pathFromSrc);
48
- }
49
- }
50
- };
51
- var loadPackageJson = (from, pathFromSrc = "../package.json") => JSON.parse(readFileSync(findPackageJson(from, pathFromSrc), "utf8"));
52
-
53
19
  // ../../node_modules/.vlt/~npm~jackspeak@4.2.3/node_modules/jackspeak/dist/esm/index.js
54
20
  import { inspect, parseArgs } from "node:util";
55
21
 
@@ -1136,9 +1102,11 @@ var canonicalCommands = {
1136
1102
  profile: "profile",
1137
1103
  publish: "publish",
1138
1104
  query: "query",
1105
+ registry: "registry",
1139
1106
  repo: "repo",
1140
1107
  "run-exec": "run-exec",
1141
1108
  run: "run",
1109
+ setup: "setup",
1142
1110
  token: "token",
1143
1111
  uninstall: "uninstall",
1144
1112
  unpublish: "unpublish",
@@ -1240,25 +1208,45 @@ var definition = j2.heading("Configuration").description(
1240
1208
  }).opt({
1241
1209
  registry: {
1242
1210
  hint: "url",
1243
- default: "https://registry.npmjs.org/",
1244
1211
  description: `Sets the registry for fetching packages, when no registry
1245
1212
  is explicitly set on a specifier.
1246
1213
 
1247
1214
  For example, \`express@latest\` will be resolved by looking
1248
1215
  up the metadata from this registry.
1249
1216
 
1250
- Note that alias specifiers starting with \`npm:\` will
1251
- still map to \`https://registry.npmjs.org/\` if this is
1252
- changed, unless the a new mapping is created via the
1253
- \`--registries\` option.
1217
+ There is **no default**. When unset, bare specifiers fall
1218
+ back to the registry alias named by
1219
+ \`--default-registry-alias\` (\`npm\` by default). If that
1220
+ alias is also unconfigured, commands that need a registry
1221
+ fail with a config error. Run \`vlt setup\` (or
1222
+ \`vlt login\`) to configure one.
1223
+
1224
+ See https://docs.vlt.sh/cli
1225
+ `
1226
+ },
1227
+ "default-registry-alias": {
1228
+ hint: "name",
1229
+ default: "npm",
1230
+ description: `The name of the registry alias (a key in
1231
+ \`--registries\`) that bare specifiers (e.g.
1232
+ \`express@latest\`) and transitive dependencies without an
1233
+ explicit registry protocol resolve through, when neither
1234
+ \`--registry\` nor a matching \`--scoped-registries\` entry
1235
+ applies.
1236
+
1237
+ Defaults to \`npm\`. Note that the \`npm\` alias has **no**
1238
+ built-in URL -- it must be configured (for example via
1239
+ \`vlt setup\`, which points it at your vlt.io registry),
1240
+ otherwise bare specifiers will have no registry to resolve
1241
+ against.
1254
1242
  `
1255
1243
  }
1256
1244
  }).optList({
1257
1245
  registries: {
1258
1246
  hint: "name=url",
1259
- description: `Specify named registry hosts by their prefix. To set the
1260
- default registry used for non-namespaced specifiers,
1261
- use the \`--registry\` option.
1247
+ description: `Specify named registry hosts by their prefix. To choose
1248
+ which alias is used for non-namespaced specifiers, use the
1249
+ \`--default-registry-alias\` option.
1262
1250
 
1263
1251
  Prefixes can be used as a package alias. For example:
1264
1252
 
@@ -1266,9 +1254,10 @@ var definition = j2.heading("Configuration").description(
1266
1254
  vlt --registries loc=http://reg.local install foo@loc:foo@1.x
1267
1255
  \`\`\`
1268
1256
 
1269
- By default, the public npm registry is registered to the
1270
- \`npm:\` prefix. It is not recommended to change this
1271
- mapping in most cases.
1257
+ There is **no** built-in \`npm\` registry URL; the \`npm\`
1258
+ alias must be configured (e.g. via \`vlt setup\`) before it
1259
+ can be used. The \`gh\` and \`jsr\` aliases have built-in
1260
+ defaults that can be overridden here.
1272
1261
  `
1273
1262
  },
1274
1263
  "scoped-registries": {
@@ -1626,6 +1615,39 @@ var definition = j2.heading("Configuration").description(
1626
1615
  "silent"
1627
1616
  ]
1628
1617
  }
1618
+ }).opt({
1619
+ loglevel: {
1620
+ hint: "level",
1621
+ default: "info",
1622
+ description: `Sets the verbosity of diagnostic logging written to
1623
+ stderr (registry requests, warnings, etc). This is
1624
+ independent of \`--view\`, which controls a command's
1625
+ result output on stdout.
1626
+
1627
+ - silent: No diagnostic logging.
1628
+ - error: Only errors.
1629
+ - warn: Errors and warnings.
1630
+ - info: Default. High-level progress.
1631
+ - verbose: Adds per-request logging (each registry URL
1632
+ with its cache/stale/fetch outcome and status code).
1633
+ - debug: Everything, including low-level detail.
1634
+
1635
+ \`--verbose\` is shorthand for \`--loglevel=verbose\`.`,
1636
+ validOptions: [
1637
+ "silent",
1638
+ "error",
1639
+ "warn",
1640
+ "info",
1641
+ "verbose",
1642
+ "debug"
1643
+ ]
1644
+ }
1645
+ }).flag({
1646
+ verbose: {
1647
+ description: `Shorthand for \`--loglevel=verbose\`. Streams each
1648
+ registry request to stderr with its cache/fetch outcome
1649
+ and status code, useful for debugging request behavior.`
1650
+ }
1629
1651
  }).optList({
1630
1652
  "dashboard-root": {
1631
1653
  hint: "path",
@@ -1638,6 +1660,12 @@ var definition = j2.heading("Configuration").description(
1638
1660
  description: `Save installed packages to a package.json file as
1639
1661
  devDependencies`
1640
1662
  },
1663
+ "save-exact": {
1664
+ short: "E",
1665
+ description: `Save installed packages to package.json with an exact
1666
+ version rather than using the default semver range
1667
+ operator (e.g. \`1.2.3\` instead of \`^1.2.3\`).`
1668
+ },
1641
1669
  "save-optional": {
1642
1670
  short: "O",
1643
1671
  description: `Save installed packages to a package.json file as
@@ -1654,6 +1682,14 @@ var definition = j2.heading("Configuration").description(
1654
1682
  devDependencies or optionalDependencies, but you want to
1655
1683
  move it to be a non-optional production dependency.`
1656
1684
  }
1685
+ }).opt({
1686
+ "save-prefix": {
1687
+ description: `The version prefix to use when saving dependencies to
1688
+ package.json (e.g. \`^\`, \`~\`, \`>=\`, or empty string
1689
+ for exact versions). Defaults to \`^\`.
1690
+ Ignored when \`--save-exact\` is set.`,
1691
+ default: "^"
1692
+ }
1657
1693
  }).opt({
1658
1694
  "expect-results": {
1659
1695
  hint: "value",
@@ -1752,7 +1788,6 @@ var getSortedCliOptions = () => {
1752
1788
  var getSortedKeys = () => Object.keys(definition.toJSON()).sort((a, b2) => a.localeCompare(b2));
1753
1789
 
1754
1790
  export {
1755
- loadPackageJson,
1756
1791
  jack,
1757
1792
  defaultView,
1758
1793
  commands,