@vltpkg/cli-js 1.0.9 → 1.1.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 (77) hide show
  1. package/{access-5DJJIIGD.js → access-GLWBGQLN.js} +41 -10
  2. package/{bugs-NRHU4ENC.js → bugs-OCQYFWFE.js} +18 -18
  3. package/{build-5VZJTEBD.js → build-CPWGNTCM.js} +7 -8
  4. package/{cache-QZ5XII4U.js → cache-SL7DQMY2.js} +20 -14
  5. package/chunk-2IMBYPYC.js +190 -0
  6. package/{chunk-5JFRXIK2.js → chunk-2PWSMJD7.js} +20 -1
  7. package/{chunk-LHMEJF6J.js → chunk-47M7IZ5P.js} +94 -39
  8. package/{chunk-6NQBG3ZR.js → chunk-6LEMBT22.js} +30 -5
  9. package/chunk-A75UYRJC.js +75 -0
  10. package/{chunk-HAYXR3MW.js → chunk-APMYKJI2.js} +1 -1
  11. package/{chunk-A6TBJ4AB.js → chunk-BUXPKRYB.js} +4 -4
  12. package/{chunk-PTR5IGFQ.js → chunk-CBASIDQH.js} +1 -1
  13. package/{chunk-XISRK3R5.js → chunk-CEHPRPGQ.js} +38 -0
  14. package/{chunk-KCXN2GTX.js → chunk-CF5EGH4W.js} +12 -2
  15. package/{chunk-HRY5MJCA.js → chunk-CTQSUNNE.js} +35 -19
  16. package/{chunk-ATYE2HQV.js → chunk-GJGQTRAT.js} +165 -30
  17. package/{chunk-YAIKXFLN.js → chunk-HYCYL4RX.js} +1 -1
  18. package/{chunk-EBXBZ2Y5.js → chunk-J2XWQVDK.js} +98 -6
  19. package/{chunk-SBEZ7RUC.js → chunk-JSQUYHU7.js} +5 -5
  20. package/{chunk-GKCU7R4B.js → chunk-S6Y57MUS.js} +4 -4
  21. package/chunk-SNOBGFNM.js +129 -0
  22. package/{chunk-MXCWH7WC.js → chunk-TNEMFBP5.js} +41 -10
  23. package/{chunk-USRMYD4F.js → chunk-TUXWDPCQ.js} +1 -1
  24. package/{chunk-2HDWM6AD.js → chunk-TXTK2PKN.js} +2 -2
  25. package/{chunk-LPIBYUMT.js → chunk-U7TEQCBN.js} +27 -1
  26. package/{chunk-XFI4THXZ.js → chunk-WE2TQN32.js} +1 -1
  27. package/{chunk-USTJECVS.js → chunk-X2AWQGYG.js} +1 -1
  28. package/{chunk-6WMR7BLF.js → chunk-YKCGWKUE.js} +3 -3
  29. package/{chunk-2YJ5MESP.js → chunk-ZDQJWRCU.js} +1 -1
  30. package/{ci-MBYD4AGJ.js → ci-O2RSLTBX.js} +9 -10
  31. package/cli-package.json +1 -1
  32. package/{config-DTZ7EWQF.js → config-ZBIF32GS.js} +11 -11
  33. package/{config-RQKPUW5B.js → config-ZPH7V77F.js} +8 -6
  34. package/{create-CYTNZ66Z.js → create-2JX4RV5U.js} +17 -17
  35. package/{deprecate-H3L4MPZS.js → deprecate-XJLP2TUW.js} +21 -18
  36. package/{dist-tag-CZHTW7C6.js → dist-tag-F6ZFWGQU.js} +23 -25
  37. package/{docs-Z76UCNLH.js → docs-IJCZZ4V6.js} +18 -18
  38. package/{exec-PGPFYCAM.js → exec-IWSS2LUA.js} +17 -17
  39. package/{exec-cache-HPILZWUY.js → exec-cache-AG77OOEE.js} +15 -15
  40. package/{exec-local-VKDC6XAQ.js → exec-local-QXPWC4QG.js} +13 -14
  41. package/{help-QPZESL4Y.js → help-TGNDNWLP.js} +4 -4
  42. package/{init-MMQV6UC5.js → init-WU7BRPKR.js} +7 -8
  43. package/{install-KZPDV66V.js → install-74XKB5N7.js} +37 -14
  44. package/{list-PJ2U4FE7.js → list-TOEC6Q3A.js} +41 -29
  45. package/{login-L3D5FQGT.js → login-WJYMAFSL.js} +11 -11
  46. package/{logout-SRZ574SQ.js → logout-MTRQWI3L.js} +7 -7
  47. package/{pack-OI5JLA3R.js → pack-FFWGLSNC.js} +11 -12
  48. package/package.json +1 -1
  49. package/{ping-VQ662NAP.js → ping-DWUVTCJB.js} +7 -7
  50. package/{pkg-HNPRMTWV.js → pkg-KNZW5FIA.js} +10 -11
  51. package/{profile-Z7IOODZ4.js → profile-6W2ABNXL.js} +20 -7
  52. package/{publish-KTUUX25U.js → publish-HGNUONU3.js} +35 -65
  53. package/{query-MV5HKRIT.js → query-FSCYPETX.js} +35 -23
  54. package/{registry-BMWXMQS4.js → registry-YTJZ3AQD.js} +3 -3
  55. package/registry-client-package.json +6 -1
  56. package/registry-client-src-revalidate.js +241 -43
  57. package/{repo-ZBCD65WE.js → repo-OVIKYYWA.js} +18 -18
  58. package/{reporter-SDMDYYMJ.js → reporter-ZW7OMRZT.js} +23 -1
  59. package/{run-QJK5LA6Q.js → run-UPV3RPQJ.js} +13 -14
  60. package/{run-exec-EAASMT5O.js → run-exec-YJSMWMMP.js} +13 -14
  61. package/{setup-Q7NTAV26.js → setup-7DPMAPUY.js} +20 -19
  62. package/{src-YVODDQYK.js → src-BNCFK4FH.js} +15 -15
  63. package/{src-MEEFRFWA.js → src-XJT4IJSV.js} +11 -4
  64. package/{token-NQRHTTKG.js → token-GA73ER5V.js} +8 -8
  65. package/{uninstall-E2SVGYI3.js → uninstall-E3VKSC3B.js} +11 -11
  66. package/{unpublish-IE4KYVM4.js → unpublish-Q6MQHBPQ.js} +43 -40
  67. package/{update-KZOWARII.js → update-4CC44TR5.js} +34 -12
  68. package/{version-T6PTPZPR.js → version-CRZBXNDG.js} +23 -18
  69. package/{view-MVYV7YZ2.js → view-ILUULGSO.js} +9 -9
  70. package/vlr.js +1 -1
  71. package/vlrx.js +1 -1
  72. package/vlt.js +1 -1
  73. package/vlx.js +1 -1
  74. package/vlxl.js +1 -1
  75. package/{whoami-A5RM2Z7Z.js → whoami-Z4TSLYTR.js} +28 -12
  76. package/chunk-UBLFPJHV.js +0 -40
  77. package/chunk-XEPCV7DP.js +0 -75
@@ -11,33 +11,32 @@ import {createRequire as _vlt_createRequire} from "node:module";
11
11
  var require = _vlt_createRequire(import.meta.filename);
12
12
  import {
13
13
  packTarball
14
- } from "./chunk-XFI4THXZ.js";
14
+ } from "./chunk-WE2TQN32.js";
15
15
  import {
16
16
  createHostContextsMap
17
- } from "./chunk-6NQBG3ZR.js";
18
- import "./chunk-ZWKI5OSF.js";
17
+ } from "./chunk-6LEMBT22.js";
19
18
  import {
20
19
  prettyBytes
21
20
  } from "./chunk-XA47WS4N.js";
21
+ import "./chunk-ZWKI5OSF.js";
22
22
  import {
23
23
  Query,
24
24
  actual,
25
25
  run
26
- } from "./chunk-LHMEJF6J.js";
27
- import "./chunk-2YJ5MESP.js";
26
+ } from "./chunk-47M7IZ5P.js";
27
+ import "./chunk-ZDQJWRCU.js";
28
+ import {
29
+ commandUsage
30
+ } from "./chunk-CBASIDQH.js";
28
31
  import {
29
32
  minimatch
30
- } from "./chunk-USTJECVS.js";
33
+ } from "./chunk-X2AWQGYG.js";
31
34
  import "./chunk-YOE3VZFX.js";
32
- import {
33
- commandUsage
34
- } from "./chunk-PTR5IGFQ.js";
35
35
  import "./chunk-XKVU23NC.js";
36
- import "./chunk-XISRK3R5.js";
36
+ import "./chunk-CEHPRPGQ.js";
37
37
  import "./chunk-HTOTG4TS.js";
38
38
  import "./chunk-E74WGW5C.js";
39
- import "./chunk-LPIBYUMT.js";
40
- import "./chunk-UBLFPJHV.js";
39
+ import "./chunk-U7TEQCBN.js";
41
40
  import "./chunk-VFBCWAOC.js";
42
41
  import "./chunk-XNLSTHDK.js";
43
42
  import "./chunk-BHJT53TP.js";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vltpkg/cli-js",
3
3
  "description": "The vlt CLI",
4
- "version": "1.0.9",
4
+ "version": "1.1.0",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/vltpkg/vltpkg.git",
@@ -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
  requireRegistry
14
- } from "./chunk-5JFRXIK2.js";
14
+ } from "./chunk-2PWSMJD7.js";
15
15
  import {
16
16
  commandUsage
17
- } from "./chunk-PTR5IGFQ.js";
17
+ } from "./chunk-CBASIDQH.js";
18
18
  import "./chunk-XKVU23NC.js";
19
- import "./chunk-XISRK3R5.js";
19
+ import "./chunk-CEHPRPGQ.js";
20
20
  import {
21
21
  RegistryClient
22
- } from "./chunk-ATYE2HQV.js";
23
- import "./chunk-HAYXR3MW.js";
22
+ } from "./chunk-GJGQTRAT.js";
23
+ import "./chunk-APMYKJI2.js";
24
+ import "./chunk-SNOBGFNM.js";
24
25
  import "./chunk-E74WGW5C.js";
25
- import "./chunk-LPIBYUMT.js";
26
- import "./chunk-UBLFPJHV.js";
26
+ import "./chunk-U7TEQCBN.js";
27
27
  import "./chunk-VFBCWAOC.js";
28
28
  import "./chunk-XNLSTHDK.js";
29
29
  import "./chunk-BHJT53TP.js";
@@ -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
  views
14
- } from "./chunk-SBEZ7RUC.js";
14
+ } from "./chunk-JSQUYHU7.js";
15
15
  import {
16
16
  del,
17
17
  get,
@@ -19,30 +19,29 @@ import {
19
19
  } from "./chunk-DBANBIL2.js";
20
20
  import {
21
21
  createHostContextsMap
22
- } from "./chunk-6NQBG3ZR.js";
22
+ } from "./chunk-6LEMBT22.js";
23
23
  import {
24
24
  GraphModifier,
25
25
  Query,
26
26
  VIRTUAL_ROOT_ID,
27
27
  actual,
28
28
  init
29
- } from "./chunk-LHMEJF6J.js";
29
+ } from "./chunk-47M7IZ5P.js";
30
30
  import {
31
31
  SecurityArchive
32
- } from "./chunk-2YJ5MESP.js";
32
+ } from "./chunk-ZDQJWRCU.js";
33
+ import {
34
+ commandUsage
35
+ } from "./chunk-CBASIDQH.js";
33
36
  import {
34
37
  minimatch
35
- } from "./chunk-USTJECVS.js";
38
+ } from "./chunk-X2AWQGYG.js";
36
39
  import "./chunk-YOE3VZFX.js";
37
- import {
38
- commandUsage
39
- } from "./chunk-PTR5IGFQ.js";
40
40
  import "./chunk-XKVU23NC.js";
41
- import "./chunk-XISRK3R5.js";
41
+ import "./chunk-CEHPRPGQ.js";
42
42
  import "./chunk-HTOTG4TS.js";
43
43
  import "./chunk-E74WGW5C.js";
44
- import "./chunk-LPIBYUMT.js";
45
- import "./chunk-UBLFPJHV.js";
44
+ import "./chunk-U7TEQCBN.js";
46
45
  import "./chunk-VFBCWAOC.js";
47
46
  import "./chunk-XNLSTHDK.js";
48
47
  import "./chunk-BHJT53TP.js";
@@ -11,19 +11,21 @@ import {createRequire as _vlt_createRequire} from "node:module";
11
11
  var require = _vlt_createRequire(import.meta.filename);
12
12
  import {
13
13
  resolveRegistry
14
- } from "./chunk-5JFRXIK2.js";
14
+ } from "./chunk-2PWSMJD7.js";
15
15
  import {
16
16
  commandUsage
17
- } from "./chunk-PTR5IGFQ.js";
17
+ } from "./chunk-CBASIDQH.js";
18
18
  import "./chunk-XKVU23NC.js";
19
- import "./chunk-XISRK3R5.js";
19
+ import "./chunk-CEHPRPGQ.js";
20
20
  import {
21
21
  RegistryClient
22
- } from "./chunk-ATYE2HQV.js";
23
- import "./chunk-HAYXR3MW.js";
22
+ } from "./chunk-GJGQTRAT.js";
23
+ import "./chunk-APMYKJI2.js";
24
+ import {
25
+ assertOk
26
+ } from "./chunk-SNOBGFNM.js";
24
27
  import "./chunk-E74WGW5C.js";
25
- import "./chunk-LPIBYUMT.js";
26
- import "./chunk-UBLFPJHV.js";
28
+ import "./chunk-U7TEQCBN.js";
27
29
  import "./chunk-VFBCWAOC.js";
28
30
  import "./chunk-XNLSTHDK.js";
29
31
  import "./chunk-BHJT53TP.js";
@@ -96,6 +98,11 @@ var getProfile = async (conf, args) => {
96
98
  const registryUrl = new URL(await resolveRegistry(conf));
97
99
  const url = new URL("-/npm/v1/user", registryUrl);
98
100
  const response = await rc.request(url, { useCache: false });
101
+ assertOk(response, {
102
+ message: "Failed to fetch profile",
103
+ url,
104
+ advice: (statusCode) => statusCode === 401 || statusCode === 403 ? `Not logged in to ${registryUrl.origin}. Run \`vlt login\` and try again.` : void 0
105
+ });
99
106
  const data = response.json();
100
107
  const [property] = args;
101
108
  if (property) {
@@ -128,6 +135,12 @@ var setProfile = async (conf, args) => {
128
135
  otp: conf.options.otp,
129
136
  useCache: false
130
137
  });
138
+ assertOk(response, {
139
+ message: "Failed to update profile",
140
+ url,
141
+ method: "POST",
142
+ advice: (statusCode) => statusCode === 401 || statusCode === 403 ? `Not logged in to ${registryUrl.origin}. Run \`vlt login\` and try again.` : void 0
143
+ });
131
144
  const data = response.json();
132
145
  return { property, value: data[property] };
133
146
  };
@@ -11,53 +11,54 @@ import {createRequire as _vlt_createRequire} from "node:module";
11
11
  var require = _vlt_createRequire(import.meta.filename);
12
12
  import {
13
13
  packTarball
14
- } from "./chunk-XFI4THXZ.js";
14
+ } from "./chunk-WE2TQN32.js";
15
15
  import {
16
16
  createHostContextsMap
17
- } from "./chunk-6NQBG3ZR.js";
18
- import "./chunk-ZWKI5OSF.js";
17
+ } from "./chunk-6LEMBT22.js";
19
18
  import {
20
19
  prettyBytes
21
20
  } from "./chunk-XA47WS4N.js";
22
21
  import {
23
22
  stderr
24
- } from "./chunk-MXCWH7WC.js";
25
- import "./chunk-YAIKXFLN.js";
23
+ } from "./chunk-TNEMFBP5.js";
24
+ import "./chunk-HYCYL4RX.js";
26
25
  import "./chunk-G2YT2GWF.js";
27
26
  import "./chunk-GDJ7JT2R.js";
27
+ import "./chunk-ZWKI5OSF.js";
28
+ import "./chunk-WGDTG44V.js";
28
29
  import {
29
30
  resolveRegistry
30
- } from "./chunk-5JFRXIK2.js";
31
- import "./chunk-WGDTG44V.js";
31
+ } from "./chunk-2PWSMJD7.js";
32
32
  import {
33
33
  Query,
34
34
  actual,
35
35
  run
36
- } from "./chunk-LHMEJF6J.js";
37
- import "./chunk-2YJ5MESP.js";
36
+ } from "./chunk-47M7IZ5P.js";
37
+ import "./chunk-ZDQJWRCU.js";
38
+ import {
39
+ commandUsage
40
+ } from "./chunk-CBASIDQH.js";
38
41
  import {
39
42
  minimatch
40
- } from "./chunk-USTJECVS.js";
43
+ } from "./chunk-X2AWQGYG.js";
44
+ import "./chunk-4KCU2KZL.js";
41
45
  import "./chunk-YOE3VZFX.js";
42
- import {
43
- commandUsage
44
- } from "./chunk-PTR5IGFQ.js";
45
46
  import "./chunk-XKVU23NC.js";
46
- import "./chunk-XISRK3R5.js";
47
- import "./chunk-4KCU2KZL.js";
47
+ import "./chunk-CEHPRPGQ.js";
48
48
  import "./chunk-HTOTG4TS.js";
49
49
  import {
50
50
  RegistryClient,
51
51
  oidc,
52
52
  registryBase
53
- } from "./chunk-ATYE2HQV.js";
54
- import "./chunk-HAYXR3MW.js";
55
- import "./chunk-E74WGW5C.js";
56
- import "./chunk-LPIBYUMT.js";
57
- import "./chunk-UBLFPJHV.js";
53
+ } from "./chunk-GJGQTRAT.js";
54
+ import "./chunk-APMYKJI2.js";
58
55
  import {
59
- asError
60
- } from "./chunk-VFBCWAOC.js";
56
+ assertOk,
57
+ requestError
58
+ } from "./chunk-SNOBGFNM.js";
59
+ import "./chunk-E74WGW5C.js";
60
+ import "./chunk-U7TEQCBN.js";
61
+ import "./chunk-VFBCWAOC.js";
61
62
  import "./chunk-XNLSTHDK.js";
62
63
  import "./chunk-BHJT53TP.js";
63
64
  import "./chunk-VE6CCH33.js";
@@ -69,31 +70,6 @@ import "./chunk-PZLD7RTK.js";
69
70
  // ../../src/cli-sdk/src/commands/publish.ts
70
71
  import assert from "node:assert";
71
72
  import { dirname, resolve } from "node:path";
72
-
73
- // ../../src/cli-sdk/src/registry-error-message.ts
74
- import { STATUS_CODES } from "node:http";
75
- var registryErrorMessage = (response) => {
76
- const statusMessage = STATUS_CODES[response.statusCode];
77
- const status = `${response.statusCode}${statusMessage ? ` ${statusMessage}` : ""}`;
78
- let text;
79
- try {
80
- text = response.text().trim();
81
- } catch {
82
- return status;
83
- }
84
- if (!text) return status;
85
- let detail = text;
86
- try {
87
- const body = JSON.parse(text);
88
- if (body && typeof body === "object" && "error" in body && typeof body.error === "string" && body.error) {
89
- detail = body.error;
90
- }
91
- } catch {
92
- }
93
- return `${status} \u2014 ${detail}`;
94
- };
95
-
96
- // ../../src/cli-sdk/src/commands/publish.ts
97
73
  var needsRegistry = true;
98
74
  var usage = () => commandUsage({
99
75
  command: "publish",
@@ -334,6 +310,7 @@ var commandSingle = async (location, conf) => {
334
310
  registryUrl
335
311
  );
336
312
  if (!dry) {
313
+ const publishAdvice = (statusCode) => statusCode === 409 ? `${name}@${version} already exists in the registry. Bump the version and try again.` : statusCode === 404 ? "Make sure you're logged in and have access to publish the package." : statusCode === 401 ? `Not logged in to ${registryUrl.origin}. Run \`vlt login\` and try again.` : statusCode === 403 ? `${name} cannot be published by this account. Run \`vlt whoami\` to see who you are logged in as, and \`vlt login\` to switch accounts. A name already taken by someone else cannot be reused.` : void 0;
337
314
  let response;
338
315
  try {
339
316
  response = await rc.request(publishUrl, {
@@ -348,26 +325,19 @@ var commandSingle = async (location, conf) => {
348
325
  otp
349
326
  });
350
327
  } catch (err) {
351
- throw error("Failed to publish package", {
352
- cause: asError(err)
328
+ throw requestError(err, {
329
+ message: "Failed to publish package",
330
+ url: publishUrl,
331
+ method: "PUT",
332
+ advice: publishAdvice
353
333
  });
354
334
  }
355
- if (response.statusCode < 200 || response.statusCode >= 300) {
356
- let advice = "";
357
- if (response.statusCode === 409) {
358
- advice = `
359
- \u26A0\uFE0F ${name}@${version} already exists in the registry. Bump the version and try again.`;
360
- } else if (response.statusCode === 404) {
361
- advice = "\n\u26A0\uFE0F Make sure you're logged in and have access to publish the package.";
362
- }
363
- throw error(
364
- `Failed to publish package: ${registryErrorMessage(response)}${advice}`,
365
- {
366
- url: publishUrl,
367
- response
368
- }
369
- );
370
- }
335
+ assertOk(response, {
336
+ message: "Failed to publish package",
337
+ url: publishUrl,
338
+ method: "PUT",
339
+ advice: publishAdvice
340
+ });
371
341
  const notice = response.getHeaderString("npm-notice");
372
342
  if (notice) stderr(`\u26A0\uFE0F ${notice}`);
373
343
  }
@@ -12,22 +12,23 @@ var require = _vlt_createRequire(import.meta.filename);
12
12
  import {
13
13
  MermaidImageView,
14
14
  createGetAuthHeader
15
- } from "./chunk-GKCU7R4B.js";
15
+ } from "./chunk-S6Y57MUS.js";
16
16
  import {
17
17
  createDiffFilesProvider
18
18
  } from "./chunk-RIYFGX27.js";
19
- import "./chunk-2HDWM6AD.js";
19
+ import "./chunk-TXTK2PKN.js";
20
20
  import {
21
+ assertVltInstalled,
21
22
  createHostContextsMap
22
- } from "./chunk-6NQBG3ZR.js";
23
+ } from "./chunk-6LEMBT22.js";
23
24
  import {
24
25
  stdout
25
- } from "./chunk-MXCWH7WC.js";
26
- import "./chunk-YAIKXFLN.js";
26
+ } from "./chunk-TNEMFBP5.js";
27
+ import "./chunk-HYCYL4RX.js";
27
28
  import "./chunk-G2YT2GWF.js";
28
29
  import "./chunk-GDJ7JT2R.js";
29
- import "./chunk-5JFRXIK2.js";
30
30
  import "./chunk-WGDTG44V.js";
31
+ import "./chunk-2PWSMJD7.js";
31
32
  import {
32
33
  GraphModifier,
33
34
  Query,
@@ -36,24 +37,24 @@ import {
36
37
  humanReadableOutput,
37
38
  jsonOutput,
38
39
  mermaidOutput
39
- } from "./chunk-LHMEJF6J.js";
40
+ } from "./chunk-47M7IZ5P.js";
40
41
  import {
41
42
  SecurityArchive
42
- } from "./chunk-2YJ5MESP.js";
43
- import "./chunk-USTJECVS.js";
44
- import "./chunk-YOE3VZFX.js";
43
+ } from "./chunk-ZDQJWRCU.js";
45
44
  import {
46
45
  commandUsage
47
- } from "./chunk-PTR5IGFQ.js";
48
- import "./chunk-XKVU23NC.js";
49
- import "./chunk-XISRK3R5.js";
46
+ } from "./chunk-CBASIDQH.js";
47
+ import "./chunk-X2AWQGYG.js";
50
48
  import "./chunk-4KCU2KZL.js";
49
+ import "./chunk-YOE3VZFX.js";
50
+ import "./chunk-XKVU23NC.js";
51
+ import "./chunk-CEHPRPGQ.js";
51
52
  import "./chunk-HTOTG4TS.js";
52
- import "./chunk-ATYE2HQV.js";
53
- import "./chunk-HAYXR3MW.js";
53
+ import "./chunk-GJGQTRAT.js";
54
+ import "./chunk-APMYKJI2.js";
55
+ import "./chunk-SNOBGFNM.js";
54
56
  import "./chunk-E74WGW5C.js";
55
- import "./chunk-LPIBYUMT.js";
56
- import "./chunk-UBLFPJHV.js";
57
+ import "./chunk-U7TEQCBN.js";
57
58
  import "./chunk-VFBCWAOC.js";
58
59
  import "./chunk-XNLSTHDK.js";
59
60
  import "./chunk-BHJT53TP.js";
@@ -86,6 +87,11 @@ var usage = () => commandUsage({
86
87
  dependencies to include in the output. Using both options allows you to
87
88
  render subgraphs of the dependency graph.
88
89
 
90
+ The queried graph is the one built by \`vlt install\`. In a project
91
+ installed by another client there is no such graph and the command
92
+ errors instead of reporting every dependency as missing. Queries
93
+ using \`:host()\` load their graph from elsewhere and are exempt.
94
+
89
95
  Defaults to listing all dependencies of the project root and workspaces.`,
90
96
  examples: {
91
97
  [`'#foo'`]: {
@@ -163,7 +169,19 @@ var command = async (conf) => {
163
169
  );
164
170
  let graph;
165
171
  let securityArchive;
172
+ const defaultProjectQueryString = "*";
173
+ const defaultLocalScopeQueryString = ":host(local) *";
174
+ const positionalQueryString = conf.positionals[0];
175
+ const targetQueryString = conf.get("target");
176
+ const scopeQueryString = conf.get("scope");
177
+ const queryString = targetQueryString || positionalQueryString;
178
+ const usesHostContext = [queryString, scopeQueryString].some(
179
+ (q2) => q2?.includes(":host(")
180
+ );
166
181
  if (mainManifest) {
182
+ if (!usesHostContext) {
183
+ assertVltInstalled(conf.options.projectRoot, "query");
184
+ }
167
185
  graph = actual.load({
168
186
  ...conf.options,
169
187
  mainManifest,
@@ -175,12 +193,6 @@ var command = async (conf) => {
175
193
  nodes: [...graph.nodes.values()]
176
194
  });
177
195
  }
178
- const defaultProjectQueryString = "*";
179
- const defaultLocalScopeQueryString = ":host(local) *";
180
- const positionalQueryString = conf.positionals[0];
181
- const targetQueryString = conf.get("target");
182
- const scopeQueryString = conf.get("scope");
183
- const queryString = targetQueryString || positionalQueryString;
184
196
  const hostContexts = await createHostContextsMap(conf);
185
197
  const diffFiles = createDiffFilesProvider(conf.options.projectRoot);
186
198
  const getAuthHeader = createGetAuthHeader(conf);
@@ -11,14 +11,14 @@ import {createRequire as _vlt_createRequire} from "node:module";
11
11
  var require = _vlt_createRequire(import.meta.filename);
12
12
  import {
13
13
  resolveRegistry
14
- } from "./chunk-5JFRXIK2.js";
14
+ } from "./chunk-2PWSMJD7.js";
15
15
  import {
16
16
  commandUsage
17
- } from "./chunk-PTR5IGFQ.js";
17
+ } from "./chunk-CBASIDQH.js";
18
18
  import "./chunk-XKVU23NC.js";
19
19
  import {
20
20
  getCommand
21
- } from "./chunk-XISRK3R5.js";
21
+ } from "./chunk-CEHPRPGQ.js";
22
22
  import "./chunk-VFBCWAOC.js";
23
23
  import "./chunk-XNLSTHDK.js";
24
24
  import {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vltpkg/registry-client",
3
3
  "description": "Fetch package artifacts and metadata from registries",
4
- "version": "1.0.9",
4
+ "version": "1.1.0",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/vltpkg/vltpkg.git",
@@ -63,6 +63,11 @@
63
63
  "import": {
64
64
  "default": "./src/cache-entry.ts"
65
65
  }
66
+ },
67
+ "./registry-error": {
68
+ "import": {
69
+ "default": "./src/registry-error.ts"
70
+ }
66
71
  }
67
72
  },
68
73
  "files": [