@vltpkg/cli-js 1.3.8 → 1.4.0

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 (87) hide show
  1. package/{access-WLKANIOE.js → access-422UGEWN.js} +8 -8
  2. package/{bugs-5Q3QSTWP.js → bugs-RED7Y33Q.js} +17 -17
  3. package/{build-XSFR63AW.js → build-IHMPBWRO.js} +9 -9
  4. package/{cache-UVPK5J5A.js → cache-FJP2RZJX.js} +31 -19
  5. package/cache-unzip-src-unzip.js +21 -1
  6. package/{chunk-IUL6MPP6.js → chunk-2AMOC4DN.js} +4 -4
  7. package/{chunk-BGA3WB7H.js → chunk-4UCADW6S.js} +5 -5
  8. package/{chunk-GZ5MYMBT.js → chunk-5IJTPZXP.js} +1 -1
  9. package/{chunk-43HNQWPQ.js → chunk-5RHABCYI.js} +76 -11
  10. package/{chunk-XCDLOQZZ.js → chunk-5TNXLRW2.js} +33 -20
  11. package/{chunk-IHXJVKAE.js → chunk-5Y4SYLJ2.js} +2 -1
  12. package/chunk-6IF3RJND.js +81 -0
  13. package/{chunk-3U6QWN62.js → chunk-7T3XAYP4.js} +1 -1
  14. package/{chunk-WHLYMMI2.js → chunk-ASLX43R3.js} +3 -3
  15. package/{chunk-OAP2ROTL.js → chunk-C23TDXRG.js} +1 -1
  16. package/{chunk-H77JYU7F.js → chunk-DNRR3XMG.js} +12 -3
  17. package/{chunk-IBGFQR23.js → chunk-FLH4YC6W.js} +21 -0
  18. package/{chunk-XDSZO74H.js → chunk-FZUYGJZU.js} +7 -7
  19. package/{chunk-PJJCFMLW.js → chunk-GIIAODRI.js} +4 -4
  20. package/{chunk-QNDM4DVO.js → chunk-HZXJ423P.js} +1 -1
  21. package/{chunk-CB65DPZ2.js → chunk-I7UMHYZX.js} +151 -27
  22. package/{chunk-6P5CFJR7.js → chunk-ISE4IRHF.js} +4 -4
  23. package/{chunk-TLY4VGMH.js → chunk-LHPEBLOU.js} +1 -1
  24. package/{chunk-EL4GVZK5.js → chunk-MKWPTN3C.js} +2 -2
  25. package/{chunk-5KOLUYXH.js → chunk-OAJ3PO3Z.js} +57 -11
  26. package/{chunk-NWHKSRO3.js → chunk-OVPHE4O7.js} +93 -10
  27. package/{chunk-WKA5UYNA.js → chunk-PHJJPY5G.js} +3 -3
  28. package/{chunk-SV4WK3KX.js → chunk-PLG3OYCX.js} +2 -2
  29. package/{chunk-KMOOTBHM.js → chunk-QCSUWACA.js} +1 -1
  30. package/{chunk-6D54UN4T.js → chunk-SR2VOY5J.js} +1 -1
  31. package/chunk-T6FBP4OU.js +76 -0
  32. package/{chunk-A2TSRXZD.js → chunk-THSYN5EK.js} +1 -1
  33. package/{chunk-DL3H4EMY.js → chunk-TO23PR7J.js} +22 -15
  34. package/{chunk-OWMR2EDW.js → chunk-TPRK6IDA.js} +1 -1
  35. package/chunk-UGCKF5ZE.js +57 -0
  36. package/{chunk-SE2FSMBR.js → chunk-WF6KLKRN.js} +26 -10
  37. package/{chunk-FIUUAQGC.js → chunk-X4FVR4R5.js} +23 -18
  38. package/{chunk-6BQKR2FM.js → chunk-ZJMJ7MCT.js} +1 -1
  39. package/{ci-EDRETPUF.js → ci-YSKNNO5M.js} +10 -10
  40. package/cli-package.json +1 -1
  41. package/{config-MVNXGEOQ.js → config-CSPCDMR3.js} +9 -8
  42. package/{config-OKBXU7TU.js → config-HO7GY3QT.js} +11 -10
  43. package/{create-R7BXYJSU.js → create-2TJT3AHJ.js} +19 -18
  44. package/{deprecate-YSUKBKQM.js → deprecate-7FRJI2RL.js} +11 -11
  45. package/{dist-tag-MIGYSR4F.js → dist-tag-WCFF5OEG.js} +8 -8
  46. package/{docs-4WVIN75H.js → docs-JMBPTU23.js} +17 -17
  47. package/{exec-IXHDQLAM.js → exec-FBOUKZZ2.js} +19 -18
  48. package/{exec-cache-EA7GHIK7.js → exec-cache-X3ZWM5S3.js} +16 -16
  49. package/{exec-local-GM4LH56M.js → exec-local-Y3KQC22N.js} +16 -15
  50. package/{help-TCXGBICU.js → help-PUKVH5X7.js} +4 -4
  51. package/{init-MWZDWQHM.js → init-GOKAQXXZ.js} +10 -10
  52. package/{install-HPI5HU3C.js → install-XFN4UFOC.js} +116 -16
  53. package/{list-2CX6REPJ.js → list-43JFFG5D.js} +19 -19
  54. package/{login-RAY23CVG.js → login-RSTZKNKN.js} +13 -12
  55. package/{logout-ICB5OMGY.js → logout-4576FFXZ.js} +8 -8
  56. package/{outdated-FYHPXRMT.js → outdated-ACQ5A2Y7.js} +15 -15
  57. package/{pack-E5MNPQXK.js → pack-QQVJ3G25.js} +15 -12
  58. package/package.json +1 -1
  59. package/{ping-REQ2KSAR.js → ping-QCDQQRO5.js} +8 -8
  60. package/{pkg-YB4GSRII.js → pkg-CSOJV7UC.js} +17 -12
  61. package/{profile-GKBW6GRI.js → profile-VL4HPW3N.js} +8 -8
  62. package/{publish-4ZQJYYLF.js → publish-2YBO6ZXE.js} +23 -18
  63. package/{query-SKXBF3MJ.js → query-IHHFMJRT.js} +19 -19
  64. package/{registry-MQJJCWJY.js → registry-W7BRZZZ2.js} +5 -5
  65. package/registry-client-src-revalidate.js +75 -9
  66. package/{repo-ACPTZI2C.js → repo-L3BXAAWS.js} +17 -17
  67. package/{reporter-4KK2JNGO.js → reporter-5NYOHBO7.js} +11 -10
  68. package/{run-YW3ITX2A.js → run-AMUUVLTI.js} +16 -15
  69. package/{run-exec-7VQX3OFG.js → run-exec-5W3XWQZA.js} +16 -15
  70. package/security-archive-src-update-expired.js +46 -12
  71. package/{setup-PLEKCMXN.js → setup-TFM4GJF7.js} +16 -15
  72. package/{src-XQ7KVUVN.js → src-4CYCUWZL.js} +29 -24
  73. package/{src-PXDFMQ6W.js → src-I3GMULFP.js} +4 -4
  74. package/{src-GP7VLT7P.js → src-LUTN2ODD.js} +58 -9
  75. package/{token-GB7RPE5J.js → token-OANOBE3G.js} +8 -8
  76. package/{uninstall-RLCECX37.js → uninstall-YXTQ4AIZ.js} +12 -12
  77. package/{unpublish-3ZXEAVHF.js → unpublish-SZXYMYIU.js} +8 -8
  78. package/{update-VDZP6EZN.js → update-FHLMWGIM.js} +16 -15
  79. package/{version-MRELJPOK.js → version-ZWFCTU5V.js} +16 -11
  80. package/{view-LCXMTGCJ.js → view-NFNJXMLV.js} +11 -11
  81. package/vlr.js +1 -1
  82. package/vlrx.js +1 -1
  83. package/vlt.js +1 -1
  84. package/vlx.js +1 -1
  85. package/vlxl.js +1 -1
  86. package/{whoami-PNRDBS45.js → whoami-O7GOSGCI.js} +8 -8
  87. package/chunk-4JAZZRKR.js +0 -76
@@ -0,0 +1,81 @@
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/tar/src/clonefile.ts
14
+ import { isBuiltin } from "node:module";
15
+ var codes = {
16
+ 1: "EPERM",
17
+ 2: "ENOENT",
18
+ 5: "EIO",
19
+ 13: "EACCES",
20
+ 17: "EEXIST",
21
+ 18: "EXDEV",
22
+ 20: "ENOTDIR",
23
+ 22: "EINVAL",
24
+ 28: "ENOSPC",
25
+ 45: "ENOTSUP",
26
+ 62: "ELOOP",
27
+ 63: "ENAMETOOLONG"
28
+ };
29
+ var lib;
30
+ var load = () => {
31
+ if (lib !== void 0) return lib;
32
+ lib = null;
33
+ if (process.platform !== "darwin" || !isBuiltin("node:ffi")) {
34
+ return lib;
35
+ }
36
+ const emitWarning = process.emitWarning;
37
+ process.emitWarning = (warning, ...rest) => {
38
+ const [type] = rest;
39
+ const name = typeof type === "string" ? type : type?.type;
40
+ if (name !== "ExperimentalWarning" || !/\bFFI\b/.test(String(warning))) {
41
+ emitWarning.call(process, warning, ...rest);
42
+ }
43
+ };
44
+ try {
45
+ const ffi = process.getBuiltinModule("node:ffi");
46
+ const system = new ffi.DynamicLibrary("libSystem.B.dylib");
47
+ lib = {
48
+ clonefile: system.getFunction("clonefile", {
49
+ return: "int32",
50
+ arguments: ["string", "string", "uint32"]
51
+ }),
52
+ error: system.getFunction("__error", {
53
+ return: "pointer",
54
+ arguments: []
55
+ }),
56
+ getInt32: ffi.getInt32
57
+ };
58
+ } catch {
59
+ } finally {
60
+ process.emitWarning = emitWarning;
61
+ }
62
+ return lib;
63
+ };
64
+ var cloneAvailable = () => !!load();
65
+ var cloneDir = (src, dst) => {
66
+ const l = load();
67
+ if (!l) return "ENOTSUP";
68
+ try {
69
+ if (l.clonefile(src, dst, 0) === 0) return true;
70
+ const errno = l.getInt32(l.error(), 0);
71
+ return codes[errno] ?? `E${errno}`;
72
+ } catch {
73
+ lib = null;
74
+ return "ENOTSUP";
75
+ }
76
+ };
77
+
78
+ export {
79
+ cloneAvailable,
80
+ cloneDir
81
+ };
@@ -11,7 +11,7 @@ import {createRequire as _vlt_createRequire} from "node:module";
11
11
  var require = _vlt_createRequire(import.meta.filename);
12
12
  import {
13
13
  getId
14
- } from "./chunk-SV4WK3KX.js";
14
+ } from "./chunk-PLG3OYCX.js";
15
15
 
16
16
  // ../../src/cli-sdk/src/stub-node.ts
17
17
  var createStubNode = (spec, name, version, options) => ({
@@ -13,10 +13,10 @@ import {
13
13
  actual,
14
14
  callLimit,
15
15
  createVirtualRoot
16
- } from "./chunk-NWHKSRO3.js";
16
+ } from "./chunk-OVPHE4O7.js";
17
17
  import {
18
18
  SecurityArchive
19
- } from "./chunk-XCDLOQZZ.js";
19
+ } from "./chunk-5TNXLRW2.js";
20
20
  import {
21
21
  error
22
22
  } from "./chunk-WZWDS3W4.js";
@@ -140,7 +140,7 @@ var reloadConfig = async (folder) => {
140
140
  unload("project");
141
141
  } catch {
142
142
  }
143
- const { Config } = await import("./config-MVNXGEOQ.js");
143
+ const { Config } = await import("./config-CSPCDMR3.js");
144
144
  return Config.load(folder, process.argv, true);
145
145
  };
146
146
 
@@ -34,7 +34,7 @@ var run = async (command) => {
34
34
  if (command) {
35
35
  process.argv.splice(2, 0, command);
36
36
  }
37
- const vlt = await import("./src-XQ7KVUVN.js");
37
+ const vlt = await import("./src-4CYCUWZL.js");
38
38
  await vlt.default();
39
39
  };
40
40
 
@@ -16,7 +16,7 @@ import {
16
16
  import {
17
17
  isManifest,
18
18
  normalizeBinPaths
19
- } from "./chunk-IBGFQR23.js";
19
+ } from "./chunk-FLH4YC6W.js";
20
20
  import {
21
21
  error
22
22
  } from "./chunk-WZWDS3W4.js";
@@ -1034,7 +1034,8 @@ import {
1034
1034
  openSync,
1035
1035
  readdirSync,
1036
1036
  readFileSync as readFileSync3,
1037
- statSync as statSync2
1037
+ statSync as statSync2,
1038
+ utimesSync
1038
1039
  } from "node:fs";
1039
1040
  import { join as join2, relative as relative2 } from "node:path";
1040
1041
  import { isDeepStrictEqual } from "node:util";
@@ -1057,9 +1058,15 @@ var storeEntryNames = (root) => {
1057
1058
  };
1058
1059
  var storeCopiedPath = (storeEntry) => storeEntry + ".copied";
1059
1060
  var markStoreEntryCopied = (storeEntry) => {
1061
+ const marker = storeCopiedPath(storeEntry);
1060
1062
  try {
1061
- closeSync(openSync(storeCopiedPath(storeEntry), "wx"));
1063
+ const now = /* @__PURE__ */ new Date();
1064
+ utimesSync(marker, now, now);
1062
1065
  } catch {
1066
+ try {
1067
+ closeSync(openSync(marker, "a"));
1068
+ } catch {
1069
+ }
1063
1070
  }
1064
1071
  };
1065
1072
  var removeStoreEntry = (storeEntry) => {
@@ -1068,6 +1075,7 @@ var removeStoreEntry = (storeEntry) => {
1068
1075
  rimrafSync(storeCopiedPath(storeEntry));
1069
1076
  };
1070
1077
  var storeEntryTime = (storeEntry) => (statSync2(storeIndexPath(storeEntry), noThrow) ?? statSync2(storeEntry, noThrow))?.mtimeMs ?? 0;
1078
+ var storeEntryLastCopied = (storeEntry) => statSync2(storeCopiedPath(storeEntry), noThrow)?.mtimeMs ?? storeEntryTime(storeEntry);
1071
1079
  var storeEntryCopied = (storeEntry, index = readStoreIndex(storeEntry)) => !!index && (index.scripts || !!lstatSync2(storeCopiedPath(storeEntry), noThrow)) && !!lstatSync2(storeEntry, noThrow)?.isDirectory();
1072
1080
  var storeEntryLinked = (storeEntry, index = readStoreIndex(storeEntry)) => !!index?.files.some(
1073
1081
  ([p]) => (lstatSync2(join2(storeEntry, p), noThrow)?.nlink ?? 1) > 1
@@ -1144,6 +1152,7 @@ export {
1144
1152
  markStoreEntryCopied,
1145
1153
  removeStoreEntry,
1146
1154
  storeEntryTime,
1155
+ storeEntryLastCopied,
1147
1156
  storeEntryCopied,
1148
1157
  storeEntryLinked,
1149
1158
  verifyStoreEntry
@@ -16,7 +16,27 @@ import {
16
16
  } from "./chunk-WZWDS3W4.js";
17
17
 
18
18
  // ../../src/fast-split/src/index.ts
19
+ var splitTwo = (str, delim) => {
20
+ const a = str.indexOf(delim);
21
+ return a === -1 ? [str] : [str.substring(0, a), str.substring(a + delim.length)];
22
+ };
23
+ var splitThree = (str, delim) => {
24
+ const a = str.indexOf(delim);
25
+ if (a === -1) return [str];
26
+ const l = delim.length;
27
+ const b = str.indexOf(delim, a + l);
28
+ return b === -1 ? [str.substring(0, a), str.substring(a + l)] : [
29
+ str.substring(0, a),
30
+ str.substring(a + l, b),
31
+ str.substring(b + l)
32
+ ];
33
+ };
19
34
  function fastSplit(str, delim, limit = -1, onPart) {
35
+ if (onPart === void 0) {
36
+ if (limit === 2) return splitTwo(str, delim);
37
+ if (limit === 3)
38
+ return splitThree(str, delim);
39
+ }
20
40
  let i = 0;
21
41
  let p = 0;
22
42
  const l = delim.length;
@@ -2551,6 +2571,7 @@ export {
2551
2571
  gitHostWebsites,
2552
2572
  defaultScopeRegistries,
2553
2573
  getOptions,
2574
+ builtinProtocols,
2554
2575
  isSpec,
2555
2576
  currentDefaultRegistryName,
2556
2577
  Spec,
@@ -12,7 +12,7 @@ var require = _vlt_createRequire(import.meta.filename);
12
12
  import {
13
13
  generateDefaultHelp,
14
14
  generateFullHelp
15
- } from "./chunk-KMOOTBHM.js";
15
+ } from "./chunk-QCSUWACA.js";
16
16
  import {
17
17
  flush,
18
18
  trackCommand,
@@ -20,13 +20,13 @@ import {
20
20
  } from "./chunk-G2YT2GWF.js";
21
21
  import {
22
22
  parseError
23
- } from "./chunk-IHXJVKAE.js";
23
+ } from "./chunk-5Y4SYLJ2.js";
24
24
  import {
25
25
  hasConfiguredRegistry,
26
26
  hasNpmRegistry,
27
27
  missingNpmRegistryError,
28
28
  missingRegistryError
29
- } from "./chunk-A2TSRXZD.js";
29
+ } from "./chunk-THSYN5EK.js";
30
30
  import {
31
31
  isLazyView,
32
32
  isViewClass,
@@ -35,10 +35,10 @@ import {
35
35
  import {
36
36
  isGraphRunError,
37
37
  splitDepID
38
- } from "./chunk-SV4WK3KX.js";
38
+ } from "./chunk-PLG3OYCX.js";
39
39
  import {
40
40
  defaultView
41
- } from "./chunk-SE2FSMBR.js";
41
+ } from "./chunk-WF6KLKRN.js";
42
42
  import {
43
43
  emitter
44
44
  } from "./chunk-U7TEQCBN.js";
@@ -48,7 +48,7 @@ import {
48
48
  import {
49
49
  isErrorWithCause,
50
50
  isObject
51
- } from "./chunk-IBGFQR23.js";
51
+ } from "./chunk-FLH4YC6W.js";
52
52
 
53
53
  // ../../src/cli-sdk/src/print-err.ts
54
54
  import { mkdirSync, readFileSync, writeFileSync } from "node:fs";
@@ -635,7 +635,7 @@ var outputCommand = async (cliCommand, conf, { start, vltVersion } = {
635
635
  ...formatOptions,
636
636
  colors: stderrColor
637
637
  });
638
- await flushAndExit(process.exitCode);
638
+ conf.abort();
639
639
  }
640
640
  };
641
641
 
@@ -12,16 +12,16 @@ var require = _vlt_createRequire(import.meta.filename);
12
12
  import {
13
13
  init,
14
14
  install
15
- } from "./chunk-NWHKSRO3.js";
15
+ } from "./chunk-OVPHE4O7.js";
16
16
  import {
17
17
  commandUsage
18
- } from "./chunk-TLY4VGMH.js";
18
+ } from "./chunk-LHPEBLOU.js";
19
19
  import {
20
20
  assertWSConfig,
21
21
  minimatch,
22
22
  resolveWSConfig,
23
23
  splitNegatedPatterns
24
- } from "./chunk-CB65DPZ2.js";
24
+ } from "./chunk-I7UMHYZX.js";
25
25
  import {
26
26
  load,
27
27
  save
@@ -79,7 +79,7 @@ var command = async (conf) => {
79
79
  conf.options.projectRoot,
80
80
  conf.options.packageJson
81
81
  );
82
- const workspacesConfig = load("workspaces", assertWSConfig) ?? (source === "package.json" ? Object.values(parsedWSConfig).flat() : void 0);
82
+ const workspacesConfig = load("workspaces", assertWSConfig) ?? (source ? Object.values(parsedWSConfig).flat() : void 0);
83
83
  const results = [];
84
84
  const addToConfig = [];
85
85
  for (const workspace of conf.values.workspace) {
@@ -12,7 +12,7 @@ var require = _vlt_createRequire(import.meta.filename);
12
12
  import {
13
13
  getTokenByURL,
14
14
  registryKeys
15
- } from "./chunk-5KOLUYXH.js";
15
+ } from "./chunk-OAJ3PO3Z.js";
16
16
 
17
17
  // ../../src/cli-sdk/src/query-auth.ts
18
18
  var createGetAuthHeader = (conf) => {
@@ -13,10 +13,10 @@ import {
13
13
  graphRun,
14
14
  graphRunSync,
15
15
  joinDepIDTuple
16
- } from "./chunk-SV4WK3KX.js";
16
+ } from "./chunk-PLG3OYCX.js";
17
17
  import {
18
18
  Spec
19
- } from "./chunk-GZ5MYMBT.js";
19
+ } from "./chunk-5IJTPZXP.js";
20
20
  import {
21
21
  load,
22
22
  parse as parse2,
@@ -43,7 +43,7 @@ import {
43
43
  parse,
44
44
  parseRange,
45
45
  satisfies
46
- } from "./chunk-IBGFQR23.js";
46
+ } from "./chunk-FLH4YC6W.js";
47
47
  import {
48
48
  error
49
49
  } from "./chunk-WZWDS3W4.js";
@@ -338,7 +338,7 @@ var require_promise_retry = __commonJS({
338
338
  fn = temp;
339
339
  }
340
340
  operation = retry.operation(options);
341
- return new Promise(function(resolve5, reject) {
341
+ return new Promise(function(resolve6, reject) {
342
342
  operation.attempt(function(number) {
343
343
  Promise.resolve().then(function() {
344
344
  return fn(function(err) {
@@ -347,7 +347,7 @@ var require_promise_retry = __commonJS({
347
347
  }
348
348
  throw errcode(new Error("Retrying"), "EPROMISERETRY", { retried: err });
349
349
  }, number);
350
- }).then(resolve5, function(err) {
350
+ }).then(resolve6, function(err) {
351
351
  if (isRetryError(err)) {
352
352
  err = err.retried;
353
353
  if (operation.retry(err || new Error())) {
@@ -3836,10 +3836,10 @@ var Minipass = class extends EventEmitter {
3836
3836
  * Return a void Promise that resolves once the stream ends.
3837
3837
  */
3838
3838
  async promise() {
3839
- return new Promise((resolve5, reject) => {
3839
+ return new Promise((resolve6, reject) => {
3840
3840
  this.on(DESTROYED, () => reject(new Error("stream destroyed")));
3841
3841
  this.on("error", (er) => reject(er));
3842
- this.on("end", () => resolve5());
3842
+ this.on("end", () => resolve6());
3843
3843
  });
3844
3844
  }
3845
3845
  /**
@@ -3863,7 +3863,7 @@ var Minipass = class extends EventEmitter {
3863
3863
  return Promise.resolve({ done: false, value: res });
3864
3864
  if (this[EOF])
3865
3865
  return stop();
3866
- let resolve5;
3866
+ let resolve6;
3867
3867
  let reject;
3868
3868
  const onerr = (er) => {
3869
3869
  this.off("data", ondata);
@@ -3877,19 +3877,19 @@ var Minipass = class extends EventEmitter {
3877
3877
  this.off("end", onend);
3878
3878
  this.off(DESTROYED, ondestroy);
3879
3879
  this.pause();
3880
- resolve5({ value, done: !!this[EOF] });
3880
+ resolve6({ value, done: !!this[EOF] });
3881
3881
  };
3882
3882
  const onend = () => {
3883
3883
  this.off("error", onerr);
3884
3884
  this.off("data", ondata);
3885
3885
  this.off(DESTROYED, ondestroy);
3886
3886
  stop();
3887
- resolve5({ done: true, value: void 0 });
3887
+ resolve6({ done: true, value: void 0 });
3888
3888
  };
3889
3889
  const ondestroy = () => onerr(new Error("stream destroyed"));
3890
3890
  return new Promise((res2, rej) => {
3891
3891
  reject = rej;
3892
- resolve5 = res2;
3892
+ resolve6 = res2;
3893
3893
  this.once(DESTROYED, ondestroy);
3894
3894
  this.once("error", onerr);
3895
3895
  this.once("end", onend);
@@ -4865,9 +4865,9 @@ var PathBase = class {
4865
4865
  if (this.#asyncReaddirInFlight) {
4866
4866
  await this.#asyncReaddirInFlight;
4867
4867
  } else {
4868
- let resolve5 = () => {
4868
+ let resolve6 = () => {
4869
4869
  };
4870
- this.#asyncReaddirInFlight = new Promise((res) => resolve5 = res);
4870
+ this.#asyncReaddirInFlight = new Promise((res) => resolve6 = res);
4871
4871
  try {
4872
4872
  for (const e of await this.#fs.promises.readdir(fullpath, {
4873
4873
  withFileTypes: true
@@ -4880,7 +4880,7 @@ var PathBase = class {
4880
4880
  children.provisional = 0;
4881
4881
  }
4882
4882
  this.#asyncReaddirInFlight = void 0;
4883
- resolve5();
4883
+ resolve6();
4884
4884
  }
4885
4885
  return children.slice(0, children.provisional);
4886
4886
  }
@@ -5110,7 +5110,7 @@ var PathScurryBase = class {
5110
5110
  *
5111
5111
  * @internal
5112
5112
  */
5113
- constructor(cwd = process.cwd(), pathImpl, sep2, { nocase, childrenCacheSize = 16 * 1024, fs = defaultFS } = {}) {
5113
+ constructor(cwd = process.cwd(), pathImpl, sep3, { nocase, childrenCacheSize = 16 * 1024, fs = defaultFS } = {}) {
5114
5114
  this.#fs = fsFromOption(fs);
5115
5115
  if (cwd instanceof URL || cwd.startsWith("file://")) {
5116
5116
  cwd = fileURLToPath3(cwd);
@@ -5121,7 +5121,7 @@ var PathScurryBase = class {
5121
5121
  this.#resolveCache = new ResolveCache();
5122
5122
  this.#resolvePosixCache = new ResolveCache();
5123
5123
  this.#children = new ChildrenCache(childrenCacheSize);
5124
- const split = cwdPath.substring(this.rootPath.length).split(sep2);
5124
+ const split = cwdPath.substring(this.rootPath.length).split(sep3);
5125
5125
  if (split.length === 1 && !split[0]) {
5126
5126
  split.pop();
5127
5127
  }
@@ -5718,7 +5718,126 @@ var Path = process.platform === "win32" ? PathWin32 : PathPosix;
5718
5718
  var PathScurry = process.platform === "win32" ? PathScurryWin32 : process.platform === "darwin" ? PathScurryDarwin : PathScurryPosix;
5719
5719
 
5720
5720
  // ../../src/workspaces/src/index.ts
5721
- import { basename as basename2, posix as posix2, resolve as resolve4 } from "node:path";
5721
+ import { basename as basename2, posix as posix2, resolve as resolve5 } from "node:path";
5722
+
5723
+ // ../../src/workspaces/src/pnpm-workspace.ts
5724
+ import { readFileSync as readFileSync3 } from "node:fs";
5725
+ import { resolve as resolve4 } from "node:path";
5726
+ var sep2 = (prev, flow) => !prev || (flow ? /[\s[,]/ : /\s/).test(prev);
5727
+ var skipQuoted = (s, i) => {
5728
+ const q = s.charAt(i);
5729
+ for (let j = i + 1; j < s.length && s.charAt(j) !== "\n"; j++) {
5730
+ const c = s.charAt(j);
5731
+ if (q === '"' && c === "\\") j++;
5732
+ else if (c === q) {
5733
+ if (q === "'" && s.charAt(j + 1) === "'") j++;
5734
+ else return j + 1;
5735
+ }
5736
+ }
5737
+ return -1;
5738
+ };
5739
+ var isQuote = (c) => c === "'" || c === '"';
5740
+ var stripComment = (line, flow) => {
5741
+ for (let i = 0; i < line.length; i++) {
5742
+ const c = line.charAt(i);
5743
+ const prev = line.charAt(i - 1);
5744
+ if (isQuote(c) && sep2(prev, flow)) {
5745
+ const end = skipQuoted(line, i);
5746
+ if (end < 0) break;
5747
+ i = end - 1;
5748
+ } else if (c === "#" && sep2(prev, false)) {
5749
+ return line.slice(0, i).trimEnd();
5750
+ }
5751
+ }
5752
+ return line.trimEnd();
5753
+ };
5754
+ var splitFlow = (s) => {
5755
+ const items = [];
5756
+ let start = 1;
5757
+ for (let i = 1; i < s.length; i++) {
5758
+ const c = s.charAt(i);
5759
+ if (isQuote(c) && sep2(s.charAt(i - 1), true)) {
5760
+ const end = skipQuoted(s, i);
5761
+ if (end < 0) return void 0;
5762
+ i = end - 1;
5763
+ } else if (c === "[" || c === "{") {
5764
+ return void 0;
5765
+ } else if (c === "," || c === "]") {
5766
+ const item = s.slice(start, i).trim();
5767
+ if (item) items.push(item);
5768
+ else if (c === ",") return void 0;
5769
+ if (c === "]") {
5770
+ return /^(?:\n|$)/.test(s.slice(i + 1)) ? items : void 0;
5771
+ }
5772
+ start = i + 1;
5773
+ }
5774
+ }
5775
+ return void 0;
5776
+ };
5777
+ var splitBlock = (lines) => {
5778
+ const items = [];
5779
+ let indent;
5780
+ for (const line of lines) {
5781
+ const l = stripComment(line, false);
5782
+ if (!l.trim()) continue;
5783
+ const m = /^ *- +(?=\S)/.exec(l);
5784
+ if (!m) {
5785
+ if (/^\S/.test(l) && l !== "-") break;
5786
+ return void 0;
5787
+ }
5788
+ const i = l.indexOf("-");
5789
+ indent ??= i;
5790
+ if (i !== indent) return void 0;
5791
+ items.push(l.slice(m[0].length));
5792
+ }
5793
+ return items;
5794
+ };
5795
+ var scalar = (s, flow) => {
5796
+ if (/^'(?:[^']|'')*'$/.test(s)) {
5797
+ return s.slice(1, -1).replace(/''/g, "'");
5798
+ }
5799
+ if (s.startsWith('"')) {
5800
+ try {
5801
+ return JSON.parse(s);
5802
+ } catch {
5803
+ return void 0;
5804
+ }
5805
+ }
5806
+ return /^[-?:,[\]{}#&*!|>'"%@`]/.test(s) || /: |:$|\s['"]/.test(s) || flow && /[{}\n]/.test(s) ? void 0 : s;
5807
+ };
5808
+ var parsePnpmWorkspacePackages = (yaml) => {
5809
+ const lines = yaml.replace(/^\uFEFF/, "").split(/\r?\n/);
5810
+ const keys = lines.flatMap((l, i) => {
5811
+ const m = /^(['"]?)packages\1[ \t]*:(?=[ \t]|$)/.exec(l);
5812
+ return m ? [{ i, value: l.slice(m[0].length) }] : [];
5813
+ });
5814
+ const [key, dup] = keys;
5815
+ if (!key || dup) return void 0;
5816
+ const flow = key.value.trimStart().startsWith("[");
5817
+ const rest = stripComment(key.value, flow).trim();
5818
+ const after = lines.slice(key.i + 1);
5819
+ const raw = flow ? splitFlow(
5820
+ [rest, ...after.map((l) => stripComment(l, true))].join("\n")
5821
+ ) : rest ? void 0 : splitBlock(after);
5822
+ const out = raw?.map((r) => scalar(r, flow));
5823
+ if (!out?.every((v) => v !== void 0)) return void 0;
5824
+ const globs = out.filter((v) => v !== "." && v !== "./");
5825
+ return globs.some((g) => !g.startsWith("!")) ? globs : void 0;
5826
+ };
5827
+ var readPnpmWorkspacePackages = (projectRoot) => {
5828
+ let yaml;
5829
+ try {
5830
+ yaml = readFileSync3(
5831
+ resolve4(projectRoot, "pnpm-workspace.yaml"),
5832
+ "utf8"
5833
+ );
5834
+ } catch {
5835
+ return void 0;
5836
+ }
5837
+ return parsePnpmWorkspacePackages(yaml);
5838
+ };
5839
+
5840
+ // ../../src/workspaces/src/index.ts
5722
5841
  var isSyntaxError = (err) => {
5723
5842
  if (err instanceof SyntaxError) return true;
5724
5843
  if (err instanceof Error) {
@@ -5812,11 +5931,14 @@ var resolveWSConfig = (projectRoot, packageJson = new PackageJson()) => {
5812
5931
  return { config: asWSConfig(fromVltJson), source: "vlt.json" };
5813
5932
  }
5814
5933
  const workspaces = packageJson.maybeRead(projectRoot)?.workspaces;
5815
- if (workspaces === void 0) return { config: {} };
5934
+ if (workspaces === void 0) {
5935
+ const packages = readPnpmWorkspacePackages(projectRoot);
5936
+ return packages ? { config: { packages }, source: "pnpm-workspace.yaml" } : { config: {} };
5937
+ }
5816
5938
  return {
5817
5939
  config: asManifestWSConfig(
5818
5940
  workspaces,
5819
- resolve4(projectRoot, "package.json")
5941
+ resolve5(projectRoot, "package.json")
5820
5942
  ),
5821
5943
  source: "package.json"
5822
5944
  };
@@ -5854,16 +5976,17 @@ var Monorepo = class _Monorepo {
5854
5976
  return [...this.values()].length;
5855
5977
  }
5856
5978
  constructor(projectRoot, options = {}) {
5857
- this.projectRoot = resolve4(projectRoot);
5979
+ this.projectRoot = resolve5(projectRoot);
5858
5980
  this.scurry = options.scurry ?? new PathScurry(projectRoot);
5859
5981
  this.packageJson = options.packageJson ?? new PackageJson();
5860
5982
  this.#config = options.config;
5861
5983
  if (options.load) this.load(options.load);
5862
5984
  }
5863
5985
  /**
5864
- * Load the workspace definitions from vlt.json, or from the root
5865
- * package.json when vlt.json declares none, canonicalizing the result
5866
- * into the effective `{[group:string]:string[]}` form.
5986
+ * Load the workspace definitions from vlt.json, else the root
5987
+ * package.json, else pnpm-workspace.yaml (see {@link resolveWSConfig}),
5988
+ * canonicalizing the result into the effective
5989
+ * `{[group:string]:string[]}` form.
5867
5990
  *
5868
5991
  * Eg:
5869
5992
  * - `"src/*"` => `{packages:["src/*"]}`
@@ -5941,7 +6064,7 @@ var Monorepo = class _Monorepo {
5941
6064
  // Either load a workspace from disk, or from our internal set,
5942
6065
  // and assign it to the named group
5943
6066
  #loadWS(path2, group) {
5944
- const fullpath = resolve4(this.projectRoot, path2);
6067
+ const fullpath = resolve5(this.projectRoot, path2);
5945
6068
  const loaded = this.#workspaces.get(fullpath);
5946
6069
  if (loaded) return loaded;
5947
6070
  const fromCache = workspaceCache.get(fullpath);
@@ -6043,7 +6166,7 @@ var Monorepo = class _Monorepo {
6043
6166
  throw error(
6044
6167
  `Failed to parse package.json in workspace "${rel}"`,
6045
6168
  {
6046
- path: resolve4(this.projectRoot, rel, "package.json"),
6169
+ path: resolve5(this.projectRoot, rel, "package.json"),
6047
6170
  cause: err
6048
6171
  }
6049
6172
  );
@@ -6235,8 +6358,9 @@ var Monorepo = class _Monorepo {
6235
6358
  /**
6236
6359
  * Convenience method to instantiate and load in one call.
6237
6360
  * Returns undefined if the project is not a monorepo workspaces root,
6238
- * meaning neither `vlt.json` nor the root `package.json` declares any
6239
- * workspaces. Otherwise returns the loaded Monorepo.
6361
+ * meaning none of `vlt.json`, the root `package.json` or
6362
+ * `pnpm-workspace.yaml` declares any workspaces. Otherwise returns
6363
+ * the loaded Monorepo.
6240
6364
  */
6241
6365
  static maybeLoad(projectRoot, options = { load: {} }) {
6242
6366
  if (options.config) {
@@ -11,18 +11,18 @@ import {createRequire as _vlt_createRequire} from "node:module";
11
11
  var require = _vlt_createRequire(import.meta.filename);
12
12
  import {
13
13
  asUnknownSpecPrefix
14
- } from "./chunk-A2TSRXZD.js";
14
+ } from "./chunk-THSYN5EK.js";
15
15
  import {
16
16
  addKey,
17
17
  asDependency
18
- } from "./chunk-NWHKSRO3.js";
18
+ } from "./chunk-OVPHE4O7.js";
19
19
  import {
20
20
  joinDepIDTuple,
21
21
  splitDepID
22
- } from "./chunk-SV4WK3KX.js";
22
+ } from "./chunk-PLG3OYCX.js";
23
23
  import {
24
24
  Spec
25
- } from "./chunk-GZ5MYMBT.js";
25
+ } from "./chunk-5IJTPZXP.js";
26
26
 
27
27
  // ../../src/cli-sdk/src/parse-add-remove-args.ts
28
28
  import { isAbsolute, relative, resolve } from "node:path";
@@ -12,7 +12,7 @@ var require = _vlt_createRequire(import.meta.filename);
12
12
  import {
13
13
  commandAliases,
14
14
  jack
15
- } from "./chunk-SE2FSMBR.js";
15
+ } from "./chunk-WF6KLKRN.js";
16
16
 
17
17
  // ../../src/cli-sdk/src/config/usage.ts
18
18
  var toArr = (v) => Array.isArray(v) ? v : [v];
@@ -15,10 +15,10 @@ import {
15
15
  } from "./chunk-SRWDPPLX.js";
16
16
  import {
17
17
  minimatch
18
- } from "./chunk-CB65DPZ2.js";
18
+ } from "./chunk-I7UMHYZX.js";
19
19
  import {
20
20
  Spec
21
- } from "./chunk-GZ5MYMBT.js";
21
+ } from "./chunk-5IJTPZXP.js";
22
22
  import {
23
23
  parse,
24
24
  stringify