@vltpkg/cli-js 1.2.0 → 1.3.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.
Files changed (85) hide show
  1. package/{access-FTHPFPUJ.js → access-ATF2FQHI.js} +10 -10
  2. package/{bugs-QS6HQUO2.js → bugs-P26XZBIE.js} +19 -19
  3. package/{build-H27SXMAS.js → build-UABOHT3O.js} +11 -11
  4. package/{cache-IB4HMFDT.js → cache-R2SEGAZJ.js} +15 -15
  5. package/cache-unzip-src-unzip.js +31 -12
  6. package/{chunk-LD4BQJBG.js → chunk-2QA7DUYM.js} +4 -4
  7. package/{chunk-B2FK2HHL.js → chunk-3WBHQEWL.js} +57 -17
  8. package/{chunk-G5NJ7CYI.js → chunk-64VFL4WI.js} +1 -1
  9. package/{chunk-LKQ5R4VX.js → chunk-73YPXX6C.js} +4 -4
  10. package/{chunk-7KFMQ3BR.js → chunk-7AYULBUY.js} +5 -5
  11. package/{chunk-LEGPLJWK.js → chunk-B7YWFGLB.js} +5 -5
  12. package/{chunk-G5BSQ6DP.js → chunk-BP3PQ67D.js} +30 -0
  13. package/{chunk-6G7MTZGS.js → chunk-BUKZHMMK.js} +110 -21
  14. package/{chunk-YTT3UHUB.js → chunk-CRGWLUGC.js} +1 -1
  15. package/{chunk-UNWQVOLY.js → chunk-CSZTT7QN.js} +6 -6
  16. package/{chunk-GUATFMMU.js → chunk-CU752KW7.js} +1 -1
  17. package/{chunk-6A3XS52F.js → chunk-ENSGPOLR.js} +13 -0
  18. package/chunk-GVQDUMNW.js +75 -0
  19. package/{chunk-55DYW2MP.js → chunk-I6QGYSB4.js} +1 -1
  20. package/{chunk-O44Z6MAV.js → chunk-J4NHRZX6.js} +1 -1
  21. package/{chunk-SYGF27W7.js → chunk-JIQBZ2UT.js} +2 -2
  22. package/{chunk-5PP77V44.js → chunk-KH3ERNCA.js} +4 -3
  23. package/{chunk-FSZF2RSQ.js → chunk-KPMPYRBZ.js} +4 -4
  24. package/{chunk-JTUZP2OD.js → chunk-LCAH3OGR.js} +1 -1
  25. package/{chunk-3CUFJPBK.js → chunk-MC6CESRA.js} +1 -1
  26. package/{chunk-VHHLO5L6.js → chunk-OKJ4U3PP.js} +1 -1
  27. package/{chunk-NJZSCUD4.js → chunk-OOYLF23O.js} +14 -11
  28. package/{chunk-OE6VHHN4.js → chunk-P6LBJWJN.js} +78 -31
  29. package/{chunk-UQUIO7LW.js → chunk-PBBULTAG.js} +4 -3
  30. package/{chunk-BHJT53TP.js → chunk-PDWPFR5T.js} +1 -1
  31. package/{chunk-5YB6UIC3.js → chunk-QXKWSPKX.js} +58 -25
  32. package/{chunk-FOJCK57G.js → chunk-U3WCCLFD.js} +3 -3
  33. package/{chunk-QA6RE2GS.js → chunk-X2WYIUFQ.js} +57 -22
  34. package/{chunk-VE6CCH33.js → chunk-Y5PA7DVK.js} +1 -0
  35. package/{chunk-YFNQ6HZ3.js → chunk-YL5D7SKZ.js} +3 -3
  36. package/{chunk-5BD4QGW2.js → chunk-ZPVVD6CI.js} +6 -6
  37. package/{ci-XJBYXFFJ.js → ci-3R6MFNVV.js} +12 -12
  38. package/cli-package.json +2 -2
  39. package/{config-4Y46SH5K.js → config-4SAA7FD2.js} +9 -9
  40. package/{config-H2Q4ABSS.js → config-WPVXQDM5.js} +11 -11
  41. package/{create-LUYL2QI4.js → create-MS4GFBDA.js} +20 -20
  42. package/{deprecate-5ANCI2L6.js → deprecate-JTTM44ZL.js} +13 -13
  43. package/{devtools-UEMPW5GG.js → devtools-UMJUK42W.js} +2 -2
  44. package/{dist-tag-SD2CRWIL.js → dist-tag-HJEVOOH3.js} +10 -10
  45. package/{docs-B6LVNWTP.js → docs-6OIBQSV6.js} +19 -19
  46. package/{exec-CJ5KQA72.js → exec-LCWL6Z3E.js} +20 -20
  47. package/{exec-cache-EE7DAOW2.js → exec-cache-6UBB7RI2.js} +18 -18
  48. package/{exec-local-HT3VBN6S.js → exec-local-C7MPFSOE.js} +17 -17
  49. package/{help-GZ44WYDS.js → help-DC77D3YW.js} +4 -4
  50. package/{init-HVXRXFVY.js → init-B6G7COKW.js} +12 -12
  51. package/{install-E2C7EE6P.js → install-LJPM2XSF.js} +18 -18
  52. package/{list-V4V6SHJP.js → list-4KT3WIIG.js} +20 -20
  53. package/{login-VRFV7MCE.js → login-CFYSVNFH.js} +14 -14
  54. package/{logout-SU75R7BN.js → logout-5ZUJHYWI.js} +10 -10
  55. package/{pack-IVGKUXTL.js → pack-YP5WBIT6.js} +13 -13
  56. package/package.json +1 -1
  57. package/{ping-WB222SDT.js → ping-LLMQAG3Y.js} +10 -10
  58. package/{pkg-LAAFNONA.js → pkg-QTMOXWRT.js} +13 -13
  59. package/{profile-P3AVHRDI.js → profile-IA3ELAPB.js} +10 -10
  60. package/{publish-IUNB3KH5.js → publish-QSIXKUCZ.js} +36 -21
  61. package/{query-XCN55INS.js → query-KHXMK2ED.js} +20 -20
  62. package/{registry-QQLWJHJI.js → registry-MXAA4HVJ.js} +5 -5
  63. package/registry-client-src-revalidate.js +76 -30
  64. package/{repo-BQDWUCX5.js → repo-XKG2HZ46.js} +19 -19
  65. package/{reporter-5BVUNWQ6.js → reporter-47XFGNJH.js} +75 -75
  66. package/{run-QT7DX243.js → run-3OEGBMSR.js} +17 -17
  67. package/{run-exec-XYUI7GLN.js → run-exec-IH5YQF4G.js} +17 -17
  68. package/security-archive-src-update-expired.js +1 -1
  69. package/{setup-CXDJXRAG.js → setup-LRR3VSGV.js} +17 -17
  70. package/{src-OKMGXMAD.js → src-EJSVFFXB.js} +24 -14
  71. package/{src-UBAERP25.js → src-N3QY4ITW.js} +16 -16
  72. package/{src-2BUT4WYP.js → src-PKFKIVVK.js} +6 -6
  73. package/{token-CBOK6DMT.js → token-UBMP2WBT.js} +10 -10
  74. package/{uninstall-27VP46KJ.js → uninstall-4F4QIOAW.js} +14 -14
  75. package/{unpublish-F4637OQX.js → unpublish-JPDDQZXF.js} +10 -10
  76. package/{update-NGWLJJ22.js → update-CVJFMZOK.js} +17 -17
  77. package/{version-WPD2KNVC.js → version-I7K3J2O2.js} +12 -12
  78. package/{view-YKFTRRPD.js → view-G5O4ZBLM.js} +11 -11
  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-I5Q6RTAP.js → whoami-NG7XVRAL.js} +10 -10
  85. package/chunk-SPRVRSEL.js +0 -75
@@ -13,10 +13,10 @@ import {
13
13
  graphRun,
14
14
  graphRunSync,
15
15
  joinDepIDTuple
16
- } from "./chunk-SYGF27W7.js";
16
+ } from "./chunk-JIQBZ2UT.js";
17
17
  import {
18
18
  Spec
19
- } from "./chunk-G5NJ7CYI.js";
19
+ } from "./chunk-64VFL4WI.js";
20
20
  import {
21
21
  load,
22
22
  parse as parse2,
@@ -29,8 +29,9 @@ import {
29
29
  whichSync
30
30
  } from "./chunk-U7TEQCBN.js";
31
31
  import {
32
+ ot,
32
33
  ts
33
- } from "./chunk-VE6CCH33.js";
34
+ } from "./chunk-Y5PA7DVK.js";
34
35
  import {
35
36
  Range,
36
37
  Version,
@@ -40,8 +41,9 @@ import {
40
41
  longDependencyTypes,
41
42
  normalizeManifest,
42
43
  parse,
44
+ parseRange,
43
45
  satisfies
44
- } from "./chunk-G5BSQ6DP.js";
46
+ } from "./chunk-BP3PQ67D.js";
45
47
  import {
46
48
  error
47
49
  } from "./chunk-WZWDS3W4.js";
@@ -5771,6 +5773,59 @@ var assertWSConfig = (conf, path2) => {
5771
5773
  wanted: "string | string[] | { [group: string]: string | string[] }"
5772
5774
  });
5773
5775
  };
5776
+ var manifestWSIgnoredKeys = /* @__PURE__ */ new Set(["nohoist"]);
5777
+ var asManifestWSConfig = (conf, path2) => {
5778
+ if (conf && typeof conf === "object" && !Array.isArray(conf)) {
5779
+ const groups = Object.keys(conf).filter(
5780
+ (k) => k !== "packages" && !manifestWSIgnoredKeys.has(k)
5781
+ );
5782
+ if (groups.length) {
5783
+ throw error(
5784
+ 'Named workspace groups are not supported in package.json. Move them to the "workspaces" field of vlt.json to use them.',
5785
+ {
5786
+ path: path2,
5787
+ found: groups,
5788
+ wanted: "string | string[] | { packages: string[] }"
5789
+ }
5790
+ );
5791
+ }
5792
+ const { packages } = conf;
5793
+ if (packages === void 0) return {};
5794
+ return asWSConfig({ packages }, path2);
5795
+ }
5796
+ return asWSConfig(conf, path2);
5797
+ };
5798
+ var resolveWSConfig = (projectRoot, packageJson = new PackageJson()) => {
5799
+ const fromVltJson = load("workspaces", assertWSConfig);
5800
+ if (fromVltJson !== void 0) {
5801
+ return { config: asWSConfig(fromVltJson), source: "vlt.json" };
5802
+ }
5803
+ const workspaces = packageJson.maybeRead(projectRoot)?.workspaces;
5804
+ if (workspaces === void 0) return { config: {} };
5805
+ return {
5806
+ config: asManifestWSConfig(
5807
+ workspaces,
5808
+ resolve4(projectRoot, "package.json")
5809
+ ),
5810
+ source: "package.json"
5811
+ };
5812
+ };
5813
+ var splitNegatedPatterns = (all) => {
5814
+ const patterns = [];
5815
+ let ignore = [];
5816
+ for (const orig of all) {
5817
+ const excl = /^!+/.exec(orig);
5818
+ const stripped = excl ? orig.slice(excl[0].length) : orig;
5819
+ const pattern = stripped.replace(/^\.?\/+/, "");
5820
+ if (excl && excl[0].length % 2 === 1) {
5821
+ ignore.push(pattern);
5822
+ continue;
5823
+ }
5824
+ ignore = ignore.filter((ign) => !minimatch(pattern, ign));
5825
+ patterns.push(pattern);
5826
+ }
5827
+ return { patterns, ignore };
5828
+ };
5774
5829
  var Monorepo = class _Monorepo {
5775
5830
  /** The project root where vlt.json is found */
5776
5831
  projectRoot;
@@ -5795,9 +5850,9 @@ var Monorepo = class _Monorepo {
5795
5850
  if (options.load) this.load(options.load);
5796
5851
  }
5797
5852
  /**
5798
- * Load the workspace definitions from vlt.json,
5799
- * canonicalizing the result into the effective `{[group:string]:string[]}`
5800
- * form.
5853
+ * Load the workspace definitions from vlt.json, or from the root
5854
+ * package.json when vlt.json declares none, canonicalizing the result
5855
+ * into the effective `{[group:string]:string[]}` form.
5801
5856
  *
5802
5857
  * Eg:
5803
5858
  * - `"src/*"` => `{packages:["src/*"]}`
@@ -5805,9 +5860,10 @@ var Monorepo = class _Monorepo {
5805
5860
  */
5806
5861
  get config() {
5807
5862
  if (this.#config) return this.#config;
5808
- this.#config = asWSConfig(
5809
- load("workspaces", assertWSConfig) ?? {}
5810
- );
5863
+ this.#config = resolveWSConfig(
5864
+ this.projectRoot,
5865
+ this.packageJson
5866
+ ).config;
5811
5867
  return this.#config;
5812
5868
  }
5813
5869
  /**
@@ -5902,7 +5958,7 @@ var Monorepo = class _Monorepo {
5902
5958
  }
5903
5959
  // can't be cached, because it's dependent on the matches set
5904
5960
  // but still worthwhile to have it defined in one place
5905
- #globOptions(matches, parseErrors) {
5961
+ #globOptions(matches, ignore, parseErrors) {
5906
5962
  const inMatches = (p) => {
5907
5963
  return !!p?.relativePosix() && (matches.has(p.relativePosix()) || inMatches(p.parent));
5908
5964
  };
@@ -5913,12 +5969,15 @@ var Monorepo = class _Monorepo {
5913
5969
  scurry: this.scurry,
5914
5970
  withFileTypes: false,
5915
5971
  ignore: {
5916
- childrenIgnored: (p) => basename2(p.relativePosix()) === "node_modules" || inMatches(p),
5972
+ childrenIgnored: (p) => basename2(p.relativePosix()) === "node_modules" || // only prunes the subtree for a `!foo/**` style negation,
5973
+ // matching npm -- a bare `!foo` still gets walked into
5974
+ !!ignore?.childrenIgnored(p) || inMatches(p),
5917
5975
  // ignore if fails to load package.json
5918
5976
  ignored: (p) => {
5919
5977
  p.lstatSync();
5920
5978
  const rel = p.relativePosix();
5921
5979
  if (!rel) return true;
5980
+ if (ignore?.ignored(p)) return true;
5922
5981
  const maybeDelete = [];
5923
5982
  for (const m of matches) {
5924
5983
  if (rel.startsWith(m + "/")) return true;
@@ -5946,10 +6005,21 @@ var Monorepo = class _Monorepo {
5946
6005
  }
5947
6006
  };
5948
6007
  }
6008
+ // patterns are always an array: asWSConfig normalizes every
6009
+ // WorkspaceConfig shape to string[], and the path filter is a Set
5949
6010
  #glob(pattern) {
6011
+ const { patterns, ignore } = splitNegatedPatterns(pattern);
5950
6012
  const matches = /* @__PURE__ */ new Set();
6013
+ if (!patterns.length) return matches;
5951
6014
  const parseErrors = /* @__PURE__ */ new Map();
5952
- ts(pattern, this.#globOptions(matches, parseErrors));
6015
+ ts(
6016
+ patterns,
6017
+ this.#globOptions(
6018
+ matches,
6019
+ ignore.length ? new ot(ignore, {}) : void 0,
6020
+ parseErrors
6021
+ )
6022
+ );
5953
6023
  for (const [rel, err] of parseErrors) {
5954
6024
  let isNested = false;
5955
6025
  for (const m of matches) {
@@ -5978,6 +6048,12 @@ var Monorepo = class _Monorepo {
5978
6048
  * This does *not* get the full set of dependencies, or expand any
5979
6049
  * `workspace:` dependencies that are not loaded.
5980
6050
  *
6051
+ * Bare semver specs are matched by name, and linked only when the
6052
+ * local workspace version satisfies the range -- the same test
6053
+ * `@vltpkg/satisfies` applies at resolution time, so the two agree on
6054
+ * which deps are local. Specs that aren't parseable ranges, such as
6055
+ * dist-tags, still match by name alone.
6056
+ *
5981
6057
  * Call with the `forceLoad` param set to `true` to attempt a full
5982
6058
  * load if any deps are not currently loaded.
5983
6059
  */
@@ -5994,15 +6070,20 @@ var Monorepo = class _Monorepo {
5994
6070
  const deps = manifest[depType];
5995
6071
  if (!deps) continue;
5996
6072
  for (const [dep, spec] of Object.entries(deps)) {
5997
- if (spec.startsWith("workspace:")) {
6073
+ if (spec.startsWith("workspace:") || !spec.includes(":")) {
5998
6074
  let depWS = this.#workspaces.get(dep);
6075
+ if (depWS && depWS.name !== dep) depWS = void 0;
5999
6076
  if (!depWS) {
6000
6077
  if (!forceLoad) continue;
6001
6078
  if (didForceLoad) continue;
6002
6079
  didForceLoad = true;
6003
6080
  this.load();
6004
6081
  depWS = this.#workspaces.get(dep);
6005
- if (!depWS) continue;
6082
+ if (depWS?.name !== dep) continue;
6083
+ }
6084
+ const range2 = spec.includes(":") ? void 0 : parseRange(spec);
6085
+ if (range2 && !satisfies(depWS.manifest.version ?? "", range2)) {
6086
+ continue;
6006
6087
  }
6007
6088
  depWorkspaces.push(depWS);
6008
6089
  }
@@ -6142,13 +6223,20 @@ var Monorepo = class _Monorepo {
6142
6223
  }
6143
6224
  /**
6144
6225
  * Convenience method to instantiate and load in one call.
6145
- * Returns undefined if the project is not a monorepo workspaces
6146
- * root, otherwise returns the loaded Monorepo.
6226
+ * Returns undefined if the project is not a monorepo workspaces root,
6227
+ * meaning neither `vlt.json` nor the root `package.json` declares any
6228
+ * workspaces. Otherwise returns the loaded Monorepo.
6147
6229
  */
6148
6230
  static maybeLoad(projectRoot, options = { load: {} }) {
6149
- const config = load("workspaces", assertWSConfig);
6150
- if (!config) return;
6151
- return new _Monorepo(projectRoot, { load: {}, ...options });
6231
+ if (options.config) {
6232
+ return new _Monorepo(projectRoot, { load: {}, ...options });
6233
+ }
6234
+ const { config, source } = resolveWSConfig(
6235
+ projectRoot,
6236
+ options.packageJson
6237
+ );
6238
+ if (!source) return;
6239
+ return new _Monorepo(projectRoot, { load: {}, ...options, config });
6152
6240
  }
6153
6241
  /**
6154
6242
  * Convenience method to instantiate and load in one call.
@@ -6198,7 +6286,8 @@ export {
6198
6286
  PackageJson,
6199
6287
  minimatch,
6200
6288
  PathScurry,
6201
- asWSConfig,
6202
6289
  assertWSConfig,
6290
+ resolveWSConfig,
6291
+ splitNegatedPatterns,
6203
6292
  Monorepo
6204
6293
  };
@@ -12,7 +12,7 @@ var require = _vlt_createRequire(import.meta.filename);
12
12
  import {
13
13
  isError,
14
14
  isObject
15
- } from "./chunk-G5BSQ6DP.js";
15
+ } from "./chunk-BP3PQ67D.js";
16
16
 
17
17
  // ../../src/output/src/error.ts
18
18
  var parseError = (err) => {
@@ -12,7 +12,7 @@ var require = _vlt_createRequire(import.meta.filename);
12
12
  import {
13
13
  generateDefaultHelp,
14
14
  generateFullHelp
15
- } from "./chunk-GUATFMMU.js";
15
+ } from "./chunk-CU752KW7.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-YTT3UHUB.js";
23
+ } from "./chunk-CRGWLUGC.js";
24
24
  import {
25
25
  hasConfiguredRegistry,
26
26
  hasNpmRegistry,
27
27
  missingNpmRegistryError,
28
28
  missingRegistryError
29
- } from "./chunk-O44Z6MAV.js";
29
+ } from "./chunk-J4NHRZX6.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-SYGF27W7.js";
38
+ } from "./chunk-JIQBZ2UT.js";
39
39
  import {
40
40
  defaultView
41
- } from "./chunk-6A3XS52F.js";
41
+ } from "./chunk-ENSGPOLR.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-G5BSQ6DP.js";
51
+ } from "./chunk-BP3PQ67D.js";
52
52
 
53
53
  // ../../src/cli-sdk/src/print-err.ts
54
54
  import { mkdirSync, readFileSync, writeFileSync } from "node:fs";
@@ -14,7 +14,7 @@ import {
14
14
  } from "./chunk-WGDTG44V.js";
15
15
  import {
16
16
  commandAliases
17
- } from "./chunk-6A3XS52F.js";
17
+ } from "./chunk-ENSGPOLR.js";
18
18
 
19
19
  // ../../node_modules/.vlt/~npm~package-json-from-dist@1.0.1/node_modules/package-json-from-dist/dist/esm/index.js
20
20
  import { readFileSync } from "node:fs";
@@ -1780,6 +1780,19 @@ var definition = j2.heading("Configuration").description(
1780
1780
  },
1781
1781
  "lockfile-only": {
1782
1782
  description: "Only update the lockfile (vlt-lock.json) and package.json files, skip all node_modules operations including package extraction and filesystem changes."
1783
+ },
1784
+ "brotli-tarballs": {
1785
+ description: `Resolve to the Brotli (\`.tar.br\`) tarball when the
1786
+ registry advertises one for a version, transferring far
1787
+ less than the gzip \`.tgz\`.
1788
+
1789
+ The \`.tar.br\` is its own artifact and hashes
1790
+ differently, so a version installed this way records that
1791
+ hash in \`vlt-lock.json\`. An existing lockfile keeps
1792
+ whichever artifact it already pinned; set
1793
+ \`--no-brotli-tarballs\` before resolving to pin the
1794
+ \`.tgz\` instead.`,
1795
+ default: true
1783
1796
  }
1784
1797
  }).opt({
1785
1798
  "allow-scripts": {
@@ -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-ATF2FQHI.js"),
22
+ "./commands/bugs.ts": () => import("./bugs-P26XZBIE.js"),
23
+ "./commands/build.ts": () => import("./build-UABOHT3O.js"),
24
+ "./commands/cache.ts": () => import("./cache-R2SEGAZJ.js"),
25
+ "./commands/ci.ts": () => import("./ci-3R6MFNVV.js"),
26
+ "./commands/config.ts": () => import("./config-WPVXQDM5.js"),
27
+ "./commands/create.ts": () => import("./create-MS4GFBDA.js"),
28
+ "./commands/deprecate.ts": () => import("./deprecate-JTTM44ZL.js"),
29
+ "./commands/dist-tag.ts": () => import("./dist-tag-HJEVOOH3.js"),
30
+ "./commands/docs.ts": () => import("./docs-6OIBQSV6.js"),
31
+ "./commands/exec-cache.ts": () => import("./exec-cache-6UBB7RI2.js"),
32
+ "./commands/exec-local.ts": () => import("./exec-local-C7MPFSOE.js"),
33
+ "./commands/exec.ts": () => import("./exec-LCWL6Z3E.js"),
34
+ "./commands/help.ts": () => import("./help-DC77D3YW.js"),
35
+ "./commands/init.ts": () => import("./init-B6G7COKW.js"),
36
+ "./commands/install.ts": () => import("./install-LJPM2XSF.js"),
37
+ "./commands/install/reporter.ts": () => import("./reporter-47XFGNJH.js"),
38
+ "./commands/list.ts": () => import("./list-4KT3WIIG.js"),
39
+ "./commands/login.ts": () => import("./login-CFYSVNFH.js"),
40
+ "./commands/logout.ts": () => import("./logout-5ZUJHYWI.js"),
41
+ "./commands/pack.ts": () => import("./pack-YP5WBIT6.js"),
42
+ "./commands/ping.ts": () => import("./ping-LLMQAG3Y.js"),
43
+ "./commands/pkg.ts": () => import("./pkg-QTMOXWRT.js"),
44
+ "./commands/profile.ts": () => import("./profile-IA3ELAPB.js"),
45
+ "./commands/publish.ts": () => import("./publish-QSIXKUCZ.js"),
46
+ "./commands/query.ts": () => import("./query-KHXMK2ED.js"),
47
+ "./commands/registry.ts": () => import("./registry-MXAA4HVJ.js"),
48
+ "./commands/repo.ts": () => import("./repo-XKG2HZ46.js"),
49
+ "./commands/run-exec.ts": () => import("./run-exec-IH5YQF4G.js"),
50
+ "./commands/run.ts": () => import("./run-3OEGBMSR.js"),
51
+ "./commands/setup.ts": () => import("./setup-LRR3VSGV.js"),
52
+ "./commands/token.ts": () => import("./token-UBMP2WBT.js"),
53
+ "./commands/uninstall.ts": () => import("./uninstall-4F4QIOAW.js"),
54
+ "./commands/unpublish.ts": () => import("./unpublish-JPDDQZXF.js"),
55
+ "./commands/update.ts": () => import("./update-CVJFMZOK.js"),
56
+ "./commands/version.ts": () => import("./version-I7K3J2O2.js"),
57
+ "./commands/view.ts": () => import("./view-G5O4ZBLM.js"),
58
+ "./commands/whoami.ts": () => import("./whoami-NG7XVRAL.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
+ };
@@ -12,7 +12,7 @@ var require = _vlt_createRequire(import.meta.filename);
12
12
  import {
13
13
  commandAliases,
14
14
  jack
15
- } from "./chunk-6A3XS52F.js";
15
+ } from "./chunk-ENSGPOLR.js";
16
16
 
17
17
  // ../../src/cli-sdk/src/config/usage.ts
18
18
  var toArr = (v) => Array.isArray(v) ? v : [v];
@@ -14,7 +14,7 @@ import {
14
14
  defaultRegistryName,
15
15
  isErrorWithCause,
16
16
  isObject
17
- } from "./chunk-G5BSQ6DP.js";
17
+ } from "./chunk-BP3PQ67D.js";
18
18
  import {
19
19
  error
20
20
  } from "./chunk-WZWDS3W4.js";
@@ -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
  Spec as Spec2
14
- } from "./chunk-G5NJ7CYI.js";
14
+ } from "./chunk-64VFL4WI.js";
15
15
  import {
16
16
  Spec,
17
17
  currentDefaultRegistryName,
18
18
  defaultRegistryName
19
- } from "./chunk-G5BSQ6DP.js";
19
+ } from "./chunk-BP3PQ67D.js";
20
20
  import {
21
21
  error
22
22
  } from "./chunk-WZWDS3W4.js";
@@ -16,10 +16,10 @@ import {
16
16
  } from "./chunk-ZWKI5OSF.js";
17
17
  import {
18
18
  minimatch
19
- } from "./chunk-6G7MTZGS.js";
19
+ } from "./chunk-BUKZHMMK.js";
20
20
  import {
21
21
  Spec
22
- } from "./chunk-G5NJ7CYI.js";
22
+ } from "./chunk-64VFL4WI.js";
23
23
  import {
24
24
  parse,
25
25
  stringify
@@ -770,7 +770,8 @@ var packTarball = async (manifest, dir, config) => {
770
770
  files,
771
771
  integrity,
772
772
  shasum,
773
- resolvedManifest: processedManifest
773
+ resolvedManifest: processedManifest,
774
+ packDir
774
775
  };
775
776
  } finally {
776
777
  config.options.packageJson.write(packDir, manifest);
@@ -11,19 +11,19 @@ import {createRequire as _vlt_createRequire} from "node:module";
11
11
  var require = _vlt_createRequire(import.meta.filename);
12
12
  import {
13
13
  openUrl
14
- } from "./chunk-3CUFJPBK.js";
14
+ } from "./chunk-MC6CESRA.js";
15
15
  import {
16
16
  stderr
17
- } from "./chunk-UNWQVOLY.js";
17
+ } from "./chunk-CSZTT7QN.js";
18
18
  import {
19
19
  mermaidOutput
20
- } from "./chunk-B2FK2HHL.js";
20
+ } from "./chunk-3WBHQEWL.js";
21
21
  import {
22
22
  ViewClass
23
23
  } from "./chunk-4KCU2KZL.js";
24
24
  import {
25
25
  getTokenByURL
26
- } from "./chunk-OE6VHHN4.js";
26
+ } from "./chunk-P6LBJWJN.js";
27
27
 
28
28
  // ../../src/cli-sdk/src/query-auth.ts
29
29
  var createGetAuthHeader = (conf) => async (url) => getTokenByURL(url, conf.options.identity);
@@ -14,7 +14,7 @@ var require = _vlt_createRequire(import.meta.filename);
14
14
  var package_default = {
15
15
  name: "@vltpkg/user-agent",
16
16
  description: "The User-Agent string that vlt sends with every outbound request",
17
- version: "1.2.0",
17
+ version: "1.3.1",
18
18
  repository: {
19
19
  type: "git",
20
20
  url: "git+https://github.com/vltpkg/vltpkg.git",
@@ -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
  stderr
14
- } from "./chunk-UNWQVOLY.js";
14
+ } from "./chunk-CSZTT7QN.js";
15
15
  import {
16
16
  urlOpen
17
17
  } from "./chunk-APMYKJI2.js";
@@ -19,7 +19,7 @@ var run = async (command) => {
19
19
  if (command) {
20
20
  process.argv.splice(2, 0, command);
21
21
  }
22
- const vlt = await import("./src-UBAERP25.js");
22
+ const vlt = await import("./src-N3QY4ITW.js");
23
23
  await vlt.default();
24
24
  };
25
25
 
@@ -12,15 +12,16 @@ var require = _vlt_createRequire(import.meta.filename);
12
12
  import {
13
13
  init,
14
14
  install
15
- } from "./chunk-B2FK2HHL.js";
15
+ } from "./chunk-3WBHQEWL.js";
16
16
  import {
17
17
  commandUsage
18
- } from "./chunk-55DYW2MP.js";
18
+ } from "./chunk-I6QGYSB4.js";
19
19
  import {
20
- asWSConfig,
21
20
  assertWSConfig,
22
- minimatch
23
- } from "./chunk-6G7MTZGS.js";
21
+ minimatch,
22
+ resolveWSConfig,
23
+ splitNegatedPatterns
24
+ } from "./chunk-BUKZHMMK.js";
24
25
  import {
25
26
  load,
26
27
  save
@@ -74,8 +75,11 @@ Modify/add properties using \`vlt pkg\`. For example:
74
75
  var command = async (conf) => {
75
76
  const allowScripts = conf.get("allow-scripts") ? String(conf.get("allow-scripts")) : ":not(*)";
76
77
  if (conf.values.workspace?.length) {
77
- const workspacesConfig = load("workspaces", assertWSConfig);
78
- const parsedWSConfig = asWSConfig(workspacesConfig ?? {});
78
+ const { config: parsedWSConfig, source } = resolveWSConfig(
79
+ conf.options.projectRoot,
80
+ conf.options.packageJson
81
+ );
82
+ const workspacesConfig = load("workspaces", assertWSConfig) ?? (source === "package.json" ? Object.values(parsedWSConfig).flat() : void 0);
79
83
  const results = [];
80
84
  const addToConfig = [];
81
85
  for (const workspace of conf.values.workspace) {
@@ -83,10 +87,9 @@ var command = async (conf) => {
83
87
  mkdirSync(cwd, { recursive: true });
84
88
  results.push(await init({ cwd }));
85
89
  const isMatched = Object.values(parsedWSConfig).some(
86
- (patterns) => {
87
- return patterns.some(
88
- (pattern) => minimatch(workspace, pattern)
89
- );
90
+ (group) => {
91
+ const { patterns, ignore } = splitNegatedPatterns(group);
92
+ return patterns.some((pattern) => minimatch(workspace, pattern)) && !ignore.some((pattern) => minimatch(workspace, pattern));
90
93
  }
91
94
  );
92
95
  if (!isMatched) {