@vltpkg/cli-js 1.0.6 → 1.0.8

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 (74) hide show
  1. package/{access-CMN3GDV4.js → access-FOYRQGJC.js} +3 -3
  2. package/{bugs-MEP373JU.js → bugs-ORVU4I5O.js} +21 -13
  3. package/{build-TKUT6V2P.js → build-JLVAGEEU.js} +6 -6
  4. package/{cache-3VLQ7CWL.js → cache-RIOSSQD3.js} +6 -6
  5. package/{chunk-FBHWUWBW.js → chunk-3L2ERW54.js} +3 -3
  6. package/{chunk-EJUKA3HX.js → chunk-5CNTLC2U.js} +1 -1
  7. package/{chunk-AHTQ5ADD.js → chunk-5QAFAGO5.js} +3 -3
  8. package/{chunk-3NGV7EC6.js → chunk-7D7SNVBV.js} +1177 -214
  9. package/{chunk-34VLICEH.js → chunk-ADLHAQRA.js} +5 -5
  10. package/{chunk-PND2URIT.js → chunk-AGHW2E24.js} +33 -21
  11. package/chunk-AQ3XJJUP.js +75 -0
  12. package/{chunk-ED2DDTQT.js → chunk-FG633ZKS.js} +31 -4
  13. package/{chunk-AL42Z2D3.js → chunk-JXVDCQZF.js} +16 -4
  14. package/{chunk-QWTGTFHN.js → chunk-MUG5K6X2.js} +1 -1
  15. package/{chunk-LQGUEFV6.js → chunk-NC3QYZPW.js} +3 -3
  16. package/chunk-OB73T23B.js +30 -0
  17. package/{chunk-SVBEF5PK.js → chunk-OWML62W5.js} +1 -1
  18. package/{chunk-LCDBW6IT.js → chunk-PTR5IGFQ.js} +1 -1
  19. package/{chunk-G7BEW32U.js → chunk-UYIA44HE.js} +4 -4
  20. package/{chunk-XVA4ZRW5.js → chunk-WY4PAM6D.js} +166 -43
  21. package/{chunk-WP6CYBPM.js → chunk-XISRK3R5.js} +21 -6
  22. package/{chunk-FEIPJIEN.js → chunk-YAIKXFLN.js} +1 -1
  23. package/{chunk-O7OUBUZ3.js → chunk-YCVPEZRM.js} +2 -2
  24. package/{chunk-3OPNZI6G.js → chunk-YOE3VZFX.js} +8 -7
  25. package/{chunk-4LBWNGU6.js → chunk-ZXIF4PVX.js} +13 -6
  26. package/{ci-ODHEBQNE.js → ci-2666LKEC.js} +7 -7
  27. package/cli-package.json +1 -1
  28. package/{config-5HCRQACM.js → config-3N7PBEXH.js} +7 -5
  29. package/{config-35TJIXFF.js → config-WMYY5J37.js} +6 -6
  30. package/{create-5BESMSRT.js → create-AEQSO6KX.js} +12 -12
  31. package/{deprecate-6YTC2E2E.js → deprecate-MW76DAZ5.js} +6 -6
  32. package/{devtools-OKXASR4F.js → devtools-UEMPW5GG.js} +29 -29
  33. package/{dist-tag-HHCPJPJL.js → dist-tag-XGQLYA6C.js} +3 -3
  34. package/{docs-M7KRVAON.js → docs-7CCTL3OY.js} +21 -13
  35. package/{exec-H664T76F.js → exec-GWCIDNOH.js} +12 -12
  36. package/{exec-cache-EQUYR4PE.js → exec-cache-AML2HUTJ.js} +10 -10
  37. package/{exec-local-OUOXFTQ6.js → exec-local-JRTO2XG4.js} +10 -10
  38. package/{help-F4DM2AQP.js → help-4KSCV7GN.js} +4 -4
  39. package/{init-7D5MFAP5.js → init-OHVBHXB7.js} +7 -7
  40. package/{install-OZBDTEAY.js → install-TFDEHY5J.js} +8 -8
  41. package/{list-DRQS77GZ.js → list-UD4SDHVE.js} +19 -13
  42. package/{login-JAWRM634.js → login-B6TIQW62.js} +21 -5
  43. package/{logout-3ACX34HP.js → logout-H3CXGLDN.js} +3 -3
  44. package/{pack-XUEMZORZ.js → pack-YYK4LKBQ.js} +8 -8
  45. package/package.json +1 -1
  46. package/{ping-FQGTZ5FI.js → ping-G765RWLM.js} +3 -3
  47. package/{pkg-D4OYJPRA.js → pkg-D4S3SPUH.js} +8 -8
  48. package/{profile-UNVFHARP.js → profile-YDQGMWYP.js} +3 -3
  49. package/{publish-FSZSNKBN.js → publish-ANHSZPIM.js} +11 -11
  50. package/{query-QHCEICAY.js → query-PZ6C6AZJ.js} +19 -13
  51. package/{registry-43SSGAPE.js → registry-BMWXMQS4.js} +2 -2
  52. package/registry-client-package.json +1 -1
  53. package/registry-client-src-revalidate.js +33 -21
  54. package/{repo-KHFU55BU.js → repo-ZA3TMERE.js} +21 -13
  55. package/{reporter-Y3LUXPQS.js → reporter-SDMDYYMJ.js} +75 -75
  56. package/{run-4GHCV2NW.js → run-N4NK35UT.js} +10 -10
  57. package/{run-exec-N2B7XW7Y.js → run-exec-N5FT4QO7.js} +10 -10
  58. package/security-archive-src-update-expired.js +6 -7
  59. package/{setup-3PSRN42W.js → setup-MWWDSKQZ.js} +45 -17
  60. package/{src-D7FPRPSM.js → src-6PISL6QX.js} +1 -1
  61. package/{src-2Q2V6EI2.js → src-6UF5YTTL.js} +12 -11
  62. package/{token-3RNS2EZO.js → token-FFUAFL43.js} +3 -3
  63. package/{uninstall-RBT3ENOD.js → uninstall-A4PUG6RI.js} +16 -9
  64. package/{unpublish-AS7IBBGN.js → unpublish-OJEGZDGQ.js} +3 -3
  65. package/{update-6CBZZ5PN.js → update-ENR6ICMR.js} +7 -7
  66. package/{version-PW4DD2HC.js → version-K3BUGG7X.js} +7 -7
  67. package/{view-LRZPRP7J.js → view-SWVQLQCB.js} +6 -6
  68. package/vlr.js +1 -1
  69. package/vlrx.js +1 -1
  70. package/vlt.js +1 -1
  71. package/vlx.js +1 -1
  72. package/vlxl.js +1 -1
  73. package/{whoami-EASZYMSY.js → whoami-MA733O2T.js} +3 -3
  74. package/chunk-VWCDSE2C.js +0 -75
@@ -11,22 +11,23 @@ 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-O7OUBUZ3.js";
14
+ } from "./chunk-YCVPEZRM.js";
15
15
  import {
16
16
  Monorepo,
17
17
  PackageJson,
18
18
  PathScurry
19
- } from "./chunk-SVBEF5PK.js";
19
+ } from "./chunk-OWML62W5.js";
20
20
  import {
21
21
  resetCaches
22
- } from "./chunk-3OPNZI6G.js";
22
+ } from "./chunk-YOE3VZFX.js";
23
23
  import {
24
24
  commands,
25
+ defaultValues,
25
26
  definition,
26
27
  getCommand,
27
28
  isRecordField,
28
29
  recordFields
29
- } from "./chunk-WP6CYBPM.js";
30
+ } from "./chunk-XISRK3R5.js";
30
31
  import {
31
32
  find,
32
33
  load,
@@ -63,6 +64,70 @@ var merge = (base, add) => Object.fromEntries(
63
64
  )
64
65
  );
65
66
 
67
+ // ../../src/cli-sdk/src/config/merge-layers.ts
68
+ var registrySelectors = [
69
+ "registry",
70
+ "default-registry-alias"
71
+ ];
72
+ var registrySelectionFields = [
73
+ "registry",
74
+ "registries",
75
+ "default-registry-alias"
76
+ ];
77
+ var isObj = (v) => !!v && typeof v === "object" && !Array.isArray(v);
78
+ var cloneValue = (v) => Array.isArray(v) ? v.map((x) => cloneValue(x)) : isObj(v) ? Object.fromEntries(
79
+ Object.entries(v).map(([k, x]) => [k, cloneValue(x)])
80
+ ) : v;
81
+ var cloneLayer = (data) => cloneValue(data);
82
+ var mergeRecord = (base, add) => {
83
+ const result = isObj(base) ? { ...base } : {};
84
+ for (const [k, v] of Object.entries(add)) {
85
+ if (v === null) delete result[k];
86
+ else result[k] = v;
87
+ }
88
+ return Object.keys(result).length ? result : void 0;
89
+ };
90
+ var mergeCommands = (base, add) => {
91
+ const result = isObj(base) ? { ...base } : {};
92
+ for (const [cmd, opts] of Object.entries(add)) {
93
+ if (opts === null) delete result[cmd];
94
+ else if (isObj(opts)) {
95
+ result[cmd] = mergeLayers([
96
+ isObj(result[cmd]) ? result[cmd] : void 0,
97
+ opts
98
+ ]);
99
+ }
100
+ }
101
+ return Object.keys(result).length ? result : void 0;
102
+ };
103
+ var mergeLayers = (layers) => {
104
+ const result = {};
105
+ for (const layer of layers) {
106
+ if (!isObj(layer)) continue;
107
+ for (const [k, v] of Object.entries(layer)) {
108
+ if (k === "command") {
109
+ const merged = isObj(v) ? mergeCommands(result.command, v) : void 0;
110
+ if (merged) result.command = merged;
111
+ else delete result.command;
112
+ } else if (v === null) {
113
+ delete result[k];
114
+ } else if (isRecordField(k) && isObj(v)) {
115
+ const merged = mergeRecord(result[k], v);
116
+ if (merged) result[k] = merged;
117
+ else delete result[k];
118
+ } else {
119
+ result[k] = v;
120
+ }
121
+ }
122
+ if (registrySelectionFields.some((f) => f in layer)) {
123
+ for (const f of registrySelectors) {
124
+ if (!(f in layer)) delete result[f];
125
+ }
126
+ }
127
+ }
128
+ return result;
129
+ };
130
+
66
131
  // ../../src/cli-sdk/src/config/index.ts
67
132
  var kCustomInspect = /* @__PURE__ */ Symbol.for("nodejs.util.inspect.custom");
68
133
  var reducePairs = (pairs) => {
@@ -79,6 +144,18 @@ var reducePairs = (pairs) => {
79
144
  return record;
80
145
  };
81
146
  var isRecordFieldValue = (k, v) => Array.isArray(v) && recordFields.includes(k);
147
+ var assertRegistryKeys = (registries, file) => {
148
+ if (!registries || typeof registries !== "object") return;
149
+ const obj = Array.isArray(registries) ? reducePairs(registries) : registries;
150
+ for (const key of Object.keys(obj)) {
151
+ if (key === "" || key.includes("~")) {
152
+ throw error("Reserved character found in registries name", {
153
+ path: file,
154
+ found: key
155
+ });
156
+ }
157
+ }
158
+ };
82
159
  var pairsToRecords = (obj) => {
83
160
  return Object.fromEntries(
84
161
  Object.entries(obj).map(([k, v]) => [
@@ -99,7 +176,16 @@ var recordsToPairs = (obj) => {
99
176
  ([k]) => !(k === "scurry" || k === "packageJson" || k === "monorepo" || k === "projectRoot" || k === "packageInfo")
100
177
  ).map(([k, v]) => [
101
178
  k,
102
- k === "command" && v && typeof v === "object" ? recordsToPairs(v) : !v || typeof v !== "object" || Array.isArray(v) || !isRecordField(k) ? v : Object.entries(v).map(([k2, v2]) => `${k2}=${v2}`)
179
+ k === "command" && v && typeof v === "object" ? (
180
+ // each command's own block gets converted too, mirroring
181
+ // pairsToRecords
182
+ Object.fromEntries(
183
+ Object.entries(v).map(([k2, v2]) => [
184
+ k2,
185
+ recordsToPairs(v2)
186
+ ])
187
+ )
188
+ ) : !v || typeof v !== "object" || Array.isArray(v) || !isRecordField(k) ? v : Object.entries(v).map(([k2, v2]) => `${k2}=${v2}`)
103
189
  ])
104
190
  );
105
191
  };
@@ -292,7 +378,12 @@ var Config = class _Config {
292
378
  async addConfigToFile(which, values) {
293
379
  return this.writeConfigFile(
294
380
  which,
295
- merge(await this.#maybeLoadConfigFile(which) ?? {}, values)
381
+ merge(
382
+ pairsToRecords(
383
+ await this.#maybeLoadConfigFile(which) ?? {}
384
+ ),
385
+ pairsToRecords(values)
386
+ )
296
387
  );
297
388
  }
298
389
  // called in this weird bound way so that it can be used by the
@@ -308,53 +399,79 @@ var Config = class _Config {
308
399
  wanted: "ConfigFileData"
309
400
  });
310
401
  }
311
- const { command, ...values } = recordsToPairs(c);
312
- const registries = c.registries;
313
- if (registries && typeof registries === "object") {
314
- const registriesObj = Array.isArray(registries) ? reducePairs(registries) : registries;
315
- for (const key of Object.keys(registriesObj)) {
316
- if (key === "" || key.includes("~")) {
317
- throw error("Reserved character found in registries name", {
318
- path: file,
319
- found: key
320
- });
402
+ const { command, ...values } = c;
403
+ assertRegistryKeys(values.registries, file);
404
+ if (command && typeof command === "object") {
405
+ for (const opts of Object.values(command)) {
406
+ if (opts && typeof opts === "object") {
407
+ assertRegistryKeys(opts.registries, file);
321
408
  }
322
409
  }
323
410
  }
324
- if (command) {
325
- for (const [c2, opts] of Object.entries(command)) {
326
- const cmd = getCommand(c2);
327
- if (cmd && opts && typeof opts === "object") {
328
- const cmdRegistries = opts.registries;
329
- if (cmdRegistries && typeof cmdRegistries === "object") {
330
- const cmdRegistriesObj = Array.isArray(cmdRegistries) ? reducePairs(cmdRegistries) : cmdRegistries;
331
- for (const key of Object.keys(cmdRegistriesObj)) {
332
- if (key === "" || key.includes("~")) {
333
- throw error(
334
- "Reserved character found in registries name",
335
- {
336
- path: file,
337
- found: key
338
- }
339
- );
340
- }
341
- }
342
- }
343
- this.commandValues[cmd] = merge(
344
- this.commandValues[cmd] ?? {},
345
- opts
346
- );
347
- }
411
+ const layer = cloneLayer(pairsToRecords(c));
412
+ const { command: _cmd, ...single } = mergeLayers([layer]);
413
+ try {
414
+ this.jack.validate(recordsToPairs(single));
415
+ } catch (er) {
416
+ if (er instanceof Error) {
417
+ const cause = typeof er.cause === "object" ? er.cause : {};
418
+ er.cause = { ...cause, path: file };
419
+ }
420
+ throw er;
421
+ }
422
+ this.#layers[file === find("user") ? "user" : "project"] = layer;
423
+ this.#applyLayers();
424
+ }
425
+ /**
426
+ * The raw config data from each `vlt.json` file, normalized to record
427
+ * form, before the layers are merged together. `undefined` for a layer
428
+ * with no file, or a file with no `config` field.
429
+ */
430
+ get layers() {
431
+ return this.#layers;
432
+ }
433
+ #layers = {};
434
+ /**
435
+ * Recompute the jack defaults and {@link Config#commandValues} from
436
+ * {@link Config#layers}.
437
+ *
438
+ * Everything is derived from `#layers`, and every known field is applied,
439
+ * so this is idempotent: re-reading a config file (which
440
+ * `addConfigToFile` and `deleteConfigKeys` both do) can't stack the user
441
+ * layer back on top of the project layer, and a field a layer stopped
442
+ * setting goes back to its definitional default.
443
+ */
444
+ #applyLayers() {
445
+ const { command, ...values } = mergeLayers([
446
+ this.#layers.user,
447
+ this.#layers.project
448
+ ]);
449
+ this.commandValues = {};
450
+ for (const [c, opts] of Object.entries(command ?? {})) {
451
+ const cmd = getCommand(c);
452
+ if (cmd && opts && typeof opts === "object") {
453
+ this.commandValues[cmd] = opts;
348
454
  }
349
455
  }
350
- this.jack.setConfigValues(values, file);
456
+ const pairs = recordsToPairs(values);
457
+ const applied = {};
458
+ for (const [field, dflt] of Object.entries(defaultValues)) {
459
+ applied[field] = field in pairs ? pairs[field] : dflt;
460
+ }
461
+ this.jack.setConfigValues(applied);
462
+ this.#options = void 0;
351
463
  }
352
464
  /**
353
465
  * if the file exists, parse and load it. returns object if data was
354
466
  * loaded, or undefined if not.
355
467
  */
356
468
  async #maybeLoadConfigFile(whichConfig) {
357
- return load("config", this.#validator, whichConfig);
469
+ const data = load("config", this.#validator, whichConfig);
470
+ if (data === void 0 && this.#layers[whichConfig] !== void 0) {
471
+ delete this.#layers[whichConfig];
472
+ this.#applyLayers();
473
+ }
474
+ return data;
358
475
  }
359
476
  /**
360
477
  * Deletes the specified config fields from the named file
@@ -482,10 +599,16 @@ var Config = class _Config {
482
599
  }
483
600
  };
484
601
  var isParsed = (c) => !!(c.values && c.positionals && c.command);
602
+ var configWriteTarget = (conf, fallback) => {
603
+ const which = conf.get("config");
604
+ return which === "user" || which === "project" ? which : fallback;
605
+ };
485
606
 
486
607
  export {
608
+ registrySelectionFields,
487
609
  kCustomInspect,
488
610
  pairsToRecords,
489
611
  recordsToPairs,
490
- Config
612
+ Config,
613
+ configWriteTarget
491
614
  };
@@ -1184,14 +1184,22 @@ j2.description(Object.keys(canonicalCommands).join(", "), {
1184
1184
  "Run `vlt <cmd> --help` for more information about a specific command"
1185
1185
  );
1186
1186
  var definition = j2.heading("Configuration").description(
1187
- `If a \`vlt.json\` file is present in the root of the current project,
1188
- then that will be used as a source of configuration information.
1187
+ `The \`vlt.json\` file in the XDG specified config directory is loaded
1188
+ first, and then the \`vlt.json\` file in the root of the current
1189
+ project, if present, is layered on top of it.
1189
1190
 
1190
- Next, the \`vlt.json\` file in the XDG specified config directory
1191
- will be checked, and loaded for any fields not set in the local project.
1191
+ Scalar values are overridden by the innermost layer that sets them.
1192
+ Object type values are merged together key by key. Set a field, or a
1193
+ key within an object field, to \`null\` in the JSON configuration to
1194
+ explicitly remove it.
1192
1195
 
1193
- Object type values will be merged together. Set a field to \`null\` in
1194
- the JSON configuration to explicitly remove it.
1196
+ Registry *selection* is an exception, since \`--registry\` outranks any
1197
+ \`--registries\` alias. A layer that sets any of \`registry\`,
1198
+ \`registries\`, or \`default-registry-alias\` owns selection: the
1199
+ \`registry\` and \`default-registry-alias\` it does *not* set are
1200
+ dropped, rather than inherited from an outer layer. So a project that
1201
+ configures its own registry is never sent to the user-level one, while
1202
+ the aliases in the user config stay addressable by name.
1195
1203
 
1196
1204
  Command-specific fields may be set in a nested \`command\` object that
1197
1205
  overrides any options defined at the top level.
@@ -1776,6 +1784,12 @@ var definition = j2.heading("Configuration").description(
1776
1784
  description: "Show all commands, bins, and flags"
1777
1785
  }
1778
1786
  });
1787
+ var defaultValues = Object.fromEntries(
1788
+ Object.entries(definition.toJSON()).map(([field, def]) => [
1789
+ field,
1790
+ def.default
1791
+ ])
1792
+ );
1779
1793
  var getSortedCliOptions = () => {
1780
1794
  const defs = definition.toJSON();
1781
1795
  return getSortedKeys().map((k2) => {
@@ -1796,6 +1810,7 @@ export {
1796
1810
  recordFields,
1797
1811
  isRecordField,
1798
1812
  definition,
1813
+ defaultValues,
1799
1814
  getSortedCliOptions,
1800
1815
  getSortedKeys
1801
1816
  };
@@ -14,7 +14,7 @@ import {
14
14
  } from "./chunk-WGDTG44V.js";
15
15
  import {
16
16
  commandAliases
17
- } from "./chunk-WP6CYBPM.js";
17
+ } from "./chunk-XISRK3R5.js";
18
18
  import {
19
19
  loadPackageJson
20
20
  } from "./chunk-E74WGW5C.js";
@@ -20,7 +20,7 @@ import {
20
20
  pickManifest,
21
21
  resolve,
22
22
  revs
23
- } from "./chunk-SVBEF5PK.js";
23
+ } from "./chunk-OWML62W5.js";
24
24
  import {
25
25
  Spec
26
26
  } from "./chunk-XKVU23NC.js";
@@ -111,7 +111,7 @@ var PackageInfoClient = class {
111
111
  #tarPoolPromise;
112
112
  async getRegistryClient() {
113
113
  if (this.#registryClient) return this.#registryClient;
114
- this.#registryClientPromise ??= import("./src-D7FPRPSM.js").then(({ RegistryClient }) => {
114
+ this.#registryClientPromise ??= import("./src-6PISL6QX.js").then(({ RegistryClient }) => {
115
115
  this.#registryClient = new RegistryClient(this.options);
116
116
  return this.#registryClient;
117
117
  });
@@ -187,15 +187,14 @@ var splitDepID = (id) => {
187
187
  seenSplitDepIDs.set(id, res);
188
188
  return res;
189
189
  };
190
+ var seenBaseDepIDs = /* @__PURE__ */ new Map();
190
191
  var baseDepID = (id) => {
192
+ const seen = seenBaseDepIDs.get(id);
193
+ if (seen) return seen;
191
194
  const [type, first, second] = splitDepID(id);
192
- switch (type) {
193
- case "git":
194
- case "registry":
195
- return joinDepIDTuple([type, first, second]);
196
- default:
197
- return joinDepIDTuple([type, first]);
198
- }
195
+ const res = type === "git" || type === "registry" ? joinDepIDTuple([type, first, second]) : joinDepIDTuple([type, first]);
196
+ seenBaseDepIDs.set(id, res);
197
+ return res;
199
198
  };
200
199
  var seenHydrated = /* @__PURE__ */ new Map();
201
200
  var hydrate = (id, name, options = {}) => {
@@ -411,6 +410,7 @@ var resetCaches = () => {
411
410
  seenHydratedTuples.clear();
412
411
  seenSplitDepIDs.clear();
413
412
  seenTuples.clear();
413
+ seenBaseDepIDs.clear();
414
414
  };
415
415
 
416
416
  // ../../src/dep-id/src/index.ts
@@ -870,6 +870,7 @@ export {
870
870
  splitDepID,
871
871
  baseDepID,
872
872
  hydrate,
873
+ getTuple,
873
874
  isPackageNameConfused,
874
875
  getId,
875
876
  joinExtra,
@@ -9,18 +9,24 @@ globalThis.setInterval = _vlt_setInterval;
9
9
  globalThis.clearInterval = _vlt_clearInterval;
10
10
  import {createRequire as _vlt_createRequire} from "node:module";
11
11
  var require = _vlt_createRequire(import.meta.filename);
12
+ import {
13
+ openUrl
14
+ } from "./chunk-OB73T23B.js";
12
15
  import {
13
16
  stderr
14
- } from "./chunk-AL42Z2D3.js";
17
+ } from "./chunk-JXVDCQZF.js";
15
18
  import {
16
19
  mermaidOutput
17
- } from "./chunk-3NGV7EC6.js";
20
+ } from "./chunk-7D7SNVBV.js";
18
21
  import {
19
22
  ViewClass
20
23
  } from "./chunk-4KCU2KZL.js";
21
24
  import {
22
- urlOpen
23
- } from "./chunk-HAYXR3MW.js";
25
+ getTokenByURL
26
+ } from "./chunk-AGHW2E24.js";
27
+
28
+ // ../../src/cli-sdk/src/query-auth.ts
29
+ var createGetAuthHeader = (conf) => async (url) => getTokenByURL(url, conf.options.identity);
24
30
 
25
31
  // ../../src/cli-sdk/src/mermaid-image-view.ts
26
32
  var MermaidImageView = class extends ViewClass {
@@ -36,16 +42,17 @@ var MermaidImageView = class extends ViewClass {
36
42
  stderr(`Generating PNG image...`);
37
43
  const filePath = await renderMermaidToPng(mermaidText);
38
44
  stderr(`Image saved to: ${filePath}`);
39
- await urlOpen(filePath);
45
+ await openUrl(filePath);
40
46
  } else {
41
47
  stderr(`Generating SVG image...`);
42
48
  const filePath = await renderMermaidToFile(mermaidText);
43
49
  stderr(`Image saved to: ${filePath}`);
44
- await urlOpen(filePath);
50
+ await openUrl(filePath);
45
51
  }
46
52
  }
47
53
  };
48
54
 
49
55
  export {
56
+ createGetAuthHeader,
50
57
  MermaidImageView
51
58
  };
@@ -11,15 +11,15 @@ import {createRequire as _vlt_createRequire} from "node:module";
11
11
  var require = _vlt_createRequire(import.meta.filename);
12
12
  import {
13
13
  install
14
- } from "./chunk-3NGV7EC6.js";
15
- import "./chunk-ED2DDTQT.js";
16
- import "./chunk-SVBEF5PK.js";
17
- import "./chunk-3OPNZI6G.js";
14
+ } from "./chunk-7D7SNVBV.js";
15
+ import "./chunk-FG633ZKS.js";
16
+ import "./chunk-OWML62W5.js";
17
+ import "./chunk-YOE3VZFX.js";
18
18
  import {
19
19
  commandUsage
20
- } from "./chunk-LCDBW6IT.js";
20
+ } from "./chunk-PTR5IGFQ.js";
21
21
  import "./chunk-XKVU23NC.js";
22
- import "./chunk-WP6CYBPM.js";
22
+ import "./chunk-XISRK3R5.js";
23
23
  import {
24
24
  lazyView
25
25
  } from "./chunk-4KCU2KZL.js";
@@ -60,7 +60,7 @@ var usage = () => commandUsage({
60
60
  var views = {
61
61
  json: (i) => i.graph.toJSON(),
62
62
  human: lazyView(
63
- async () => (await import("./reporter-Y3LUXPQS.js")).InstallReporter
63
+ async () => (await import("./reporter-SDMDYYMJ.js")).InstallReporter
64
64
  )
65
65
  };
66
66
  var command = async (conf) => {
package/cli-package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vltpkg/cli-sdk",
3
3
  "description": "The source for the vlt CLI",
4
- "version": "1.0.6",
4
+ "version": "1.0.8",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/vltpkg/vltpkg.git",
@@ -11,21 +11,22 @@ import {createRequire as _vlt_createRequire} from "node:module";
11
11
  var require = _vlt_createRequire(import.meta.filename);
12
12
  import {
13
13
  Config,
14
+ configWriteTarget,
14
15
  kCustomInspect,
15
16
  pairsToRecords,
16
17
  recordsToPairs
17
- } from "./chunk-XVA4ZRW5.js";
18
- import "./chunk-O7OUBUZ3.js";
18
+ } from "./chunk-WY4PAM6D.js";
19
+ import "./chunk-YCVPEZRM.js";
19
20
  import "./chunk-ZWKI5OSF.js";
20
- import "./chunk-SVBEF5PK.js";
21
- import "./chunk-3OPNZI6G.js";
21
+ import "./chunk-OWML62W5.js";
22
+ import "./chunk-YOE3VZFX.js";
22
23
  import "./chunk-XKVU23NC.js";
23
24
  import {
24
25
  commands,
25
26
  definition,
26
27
  isRecordField,
27
28
  recordFields
28
- } from "./chunk-WP6CYBPM.js";
29
+ } from "./chunk-XISRK3R5.js";
29
30
  import "./chunk-HTOTG4TS.js";
30
31
  import "./chunk-LPIBYUMT.js";
31
32
  import "./chunk-XNLSTHDK.js";
@@ -36,6 +37,7 @@ import "./chunk-PZLD7RTK.js";
36
37
  export {
37
38
  Config,
38
39
  commands,
40
+ configWriteTarget,
39
41
  definition,
40
42
  isRecordField,
41
43
  kCustomInspect,
@@ -16,22 +16,22 @@ import {
16
16
  import {
17
17
  pairsToRecords,
18
18
  recordsToPairs
19
- } from "./chunk-XVA4ZRW5.js";
20
- import "./chunk-O7OUBUZ3.js";
19
+ } from "./chunk-WY4PAM6D.js";
20
+ import "./chunk-YCVPEZRM.js";
21
21
  import "./chunk-ZWKI5OSF.js";
22
22
  import {
23
23
  asRootError
24
24
  } from "./chunk-GDJ7JT2R.js";
25
- import "./chunk-SVBEF5PK.js";
26
- import "./chunk-3OPNZI6G.js";
25
+ import "./chunk-OWML62W5.js";
26
+ import "./chunk-YOE3VZFX.js";
27
27
  import {
28
28
  commandUsage
29
- } from "./chunk-LCDBW6IT.js";
29
+ } from "./chunk-PTR5IGFQ.js";
30
30
  import "./chunk-XKVU23NC.js";
31
31
  import {
32
32
  getSortedKeys,
33
33
  isRecordField
34
- } from "./chunk-WP6CYBPM.js";
34
+ } from "./chunk-XISRK3R5.js";
35
35
  import {
36
36
  find,
37
37
  load
@@ -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
  vlxResolve
14
- } from "./chunk-AHTQ5ADD.js";
14
+ } from "./chunk-5QAFAGO5.js";
15
15
  import {
16
16
  ExecCommand,
17
17
  views
18
- } from "./chunk-G7BEW32U.js";
18
+ } from "./chunk-UYIA44HE.js";
19
19
  import "./chunk-RIYFGX27.js";
20
- import "./chunk-LQGUEFV6.js";
21
- import "./chunk-O7OUBUZ3.js";
20
+ import "./chunk-NC3QYZPW.js";
21
+ import "./chunk-YCVPEZRM.js";
22
22
  import "./chunk-ZWKI5OSF.js";
23
23
  import {
24
24
  styleTextStdout
25
- } from "./chunk-AL42Z2D3.js";
26
- import "./chunk-FEIPJIEN.js";
25
+ } from "./chunk-JXVDCQZF.js";
26
+ import "./chunk-YAIKXFLN.js";
27
27
  import "./chunk-G2YT2GWF.js";
28
28
  import "./chunk-GDJ7JT2R.js";
29
29
  import "./chunk-5JFRXIK2.js";
@@ -32,15 +32,15 @@ import "./chunk-WGDTG44V.js";
32
32
  import {
33
33
  exec,
34
34
  execFG
35
- } from "./chunk-3NGV7EC6.js";
36
- import "./chunk-ED2DDTQT.js";
37
- import "./chunk-SVBEF5PK.js";
38
- import "./chunk-3OPNZI6G.js";
35
+ } from "./chunk-7D7SNVBV.js";
36
+ import "./chunk-FG633ZKS.js";
37
+ import "./chunk-OWML62W5.js";
38
+ import "./chunk-YOE3VZFX.js";
39
39
  import {
40
40
  commandUsage
41
- } from "./chunk-LCDBW6IT.js";
41
+ } from "./chunk-PTR5IGFQ.js";
42
42
  import "./chunk-XKVU23NC.js";
43
- import "./chunk-WP6CYBPM.js";
43
+ import "./chunk-XISRK3R5.js";
44
44
  import "./chunk-4KCU2KZL.js";
45
45
  import "./chunk-HTOTG4TS.js";
46
46
  import "./chunk-E74WGW5C.js";
@@ -11,24 +11,24 @@ 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-O7OUBUZ3.js";
14
+ } from "./chunk-YCVPEZRM.js";
15
15
  import "./chunk-ZWKI5OSF.js";
16
16
  import {
17
17
  resolveRegistry
18
18
  } from "./chunk-5JFRXIK2.js";
19
- import "./chunk-SVBEF5PK.js";
20
- import "./chunk-3OPNZI6G.js";
19
+ import "./chunk-OWML62W5.js";
20
+ import "./chunk-YOE3VZFX.js";
21
21
  import {
22
22
  commandUsage
23
- } from "./chunk-LCDBW6IT.js";
23
+ } from "./chunk-PTR5IGFQ.js";
24
24
  import {
25
25
  Spec
26
26
  } from "./chunk-XKVU23NC.js";
27
- import "./chunk-WP6CYBPM.js";
27
+ import "./chunk-XISRK3R5.js";
28
28
  import "./chunk-HTOTG4TS.js";
29
29
  import {
30
30
  RegistryClient
31
- } from "./chunk-PND2URIT.js";
31
+ } from "./chunk-AGHW2E24.js";
32
32
  import "./chunk-HAYXR3MW.js";
33
33
  import "./chunk-E74WGW5C.js";
34
34
  import "./chunk-LPIBYUMT.js";