@vltpkg/cli-js 1.0.10 → 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-4RPC3X5N.js → access-GLWBGQLN.js} +41 -10
  2. package/{bugs-K6QLQLL4.js → bugs-OCQYFWFE.js} +18 -18
  3. package/{build-VD4L5IED.js → build-CPWGNTCM.js} +7 -8
  4. package/{cache-Q6FUUEQF.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-FUCQ7ARR.js → chunk-47M7IZ5P.js} +26 -22
  8. package/{chunk-WAYVHANF.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-B5IILBX7.js → chunk-BUXPKRYB.js} +4 -4
  12. package/{chunk-5HPGL5WS.js → chunk-CBASIDQH.js} +1 -1
  13. package/{chunk-MNK55XSE.js → chunk-CEHPRPGQ.js} +21 -0
  14. package/{chunk-BSPUKIWY.js → chunk-CF5EGH4W.js} +12 -2
  15. package/{chunk-P5S2TFCF.js → chunk-CTQSUNNE.js} +14 -10
  16. package/{chunk-NWLS3VOQ.js → chunk-GJGQTRAT.js} +154 -26
  17. package/{chunk-5HBKYSTX.js → chunk-HYCYL4RX.js} +1 -1
  18. package/{chunk-NA732FNL.js → chunk-J2XWQVDK.js} +98 -6
  19. package/{chunk-DAS7TVRN.js → chunk-JSQUYHU7.js} +5 -5
  20. package/{chunk-XUP35M5Q.js → chunk-S6Y57MUS.js} +4 -4
  21. package/chunk-SNOBGFNM.js +129 -0
  22. package/{chunk-VL7RJVNN.js → chunk-TNEMFBP5.js} +20 -11
  23. package/{chunk-3564IL5W.js → chunk-TUXWDPCQ.js} +1 -1
  24. package/{chunk-ZNCVQQDT.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-TYRKIWGF.js → chunk-YKCGWKUE.js} +3 -3
  29. package/{chunk-2YJ5MESP.js → chunk-ZDQJWRCU.js} +1 -1
  30. package/{ci-G4PJWJQE.js → ci-O2RSLTBX.js} +9 -10
  31. package/cli-package.json +1 -1
  32. package/{config-WTIWWXRD.js → config-ZBIF32GS.js} +11 -11
  33. package/{config-66ARNESN.js → config-ZPH7V77F.js} +8 -6
  34. package/{create-DF6RQTHC.js → create-2JX4RV5U.js} +17 -17
  35. package/{deprecate-2KTC2HKH.js → deprecate-XJLP2TUW.js} +21 -18
  36. package/{dist-tag-QKJQIOGN.js → dist-tag-F6ZFWGQU.js} +23 -25
  37. package/{docs-YSWJTGYX.js → docs-IJCZZ4V6.js} +18 -18
  38. package/{exec-5XIMPSBI.js → exec-IWSS2LUA.js} +17 -17
  39. package/{exec-cache-OGX7WR5P.js → exec-cache-AG77OOEE.js} +15 -15
  40. package/{exec-local-SB7EPYED.js → exec-local-QXPWC4QG.js} +13 -14
  41. package/{help-GMCQHGVN.js → help-TGNDNWLP.js} +4 -4
  42. package/{init-KXIIWHBA.js → init-WU7BRPKR.js} +7 -8
  43. package/{install-ODTEMAMS.js → install-74XKB5N7.js} +37 -14
  44. package/{list-QS4FLJSU.js → list-TOEC6Q3A.js} +41 -29
  45. package/{login-6TGYRY43.js → login-WJYMAFSL.js} +11 -11
  46. package/{logout-GOAB7KHJ.js → logout-MTRQWI3L.js} +7 -7
  47. package/{pack-PJDH6PKP.js → pack-FFWGLSNC.js} +11 -12
  48. package/package.json +1 -1
  49. package/{ping-ANBW2IRW.js → ping-DWUVTCJB.js} +7 -7
  50. package/{pkg-GZWUXU65.js → pkg-KNZW5FIA.js} +10 -11
  51. package/{profile-BLY74CMB.js → profile-6W2ABNXL.js} +20 -7
  52. package/{publish-W2KOTNMB.js → publish-HGNUONU3.js} +33 -75
  53. package/{query-3PUMU5ON.js → query-FSCYPETX.js} +35 -23
  54. package/{registry-ONSDWNPV.js → registry-YTJZ3AQD.js} +3 -3
  55. package/registry-client-package.json +6 -1
  56. package/registry-client-src-revalidate.js +230 -39
  57. package/{repo-LZ6STH4C.js → repo-OVIKYYWA.js} +18 -18
  58. package/{reporter-SDMDYYMJ.js → reporter-ZW7OMRZT.js} +23 -1
  59. package/{run-JMIBADHE.js → run-UPV3RPQJ.js} +13 -14
  60. package/{run-exec-JEKM2O53.js → run-exec-YJSMWMMP.js} +13 -14
  61. package/{setup-BTBU3NAI.js → setup-7DPMAPUY.js} +20 -19
  62. package/{src-23VBKASP.js → src-BNCFK4FH.js} +15 -15
  63. package/{src-J4BAYOBO.js → src-XJT4IJSV.js} +11 -4
  64. package/{token-PUJ7QN6D.js → token-GA73ER5V.js} +8 -8
  65. package/{uninstall-OTISP2T7.js → uninstall-E3VKSC3B.js} +11 -11
  66. package/{unpublish-X75EEQAN.js → unpublish-Q6MQHBPQ.js} +43 -40
  67. package/{update-CKXX5POE.js → update-4CC44TR5.js} +34 -12
  68. package/{version-24B2X7M7.js → version-CRZBXNDG.js} +9 -10
  69. package/{view-Q7MAQ6R3.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-S6CQZFE3.js → whoami-Z4TSLYTR.js} +28 -12
  76. package/chunk-UBLFPJHV.js +0 -40
  77. package/chunk-Y3QEV76Q.js +0 -75
@@ -11,24 +11,28 @@ 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-5HPGL5WS.js";
17
+ } from "./chunk-CBASIDQH.js";
18
18
  import "./chunk-XKVU23NC.js";
19
- import "./chunk-MNK55XSE.js";
19
+ import "./chunk-CEHPRPGQ.js";
20
20
  import {
21
21
  RegistryClient
22
- } from "./chunk-NWLS3VOQ.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";
30
32
  import "./chunk-VE6CCH33.js";
31
- import "./chunk-WZWDS3W4.js";
33
+ import {
34
+ error
35
+ } from "./chunk-WZWDS3W4.js";
32
36
  import "./chunk-PZLD7RTK.js";
33
37
 
34
38
  // ../../src/cli-sdk/src/commands/whoami.ts
@@ -58,11 +62,23 @@ var views = {
58
62
  };
59
63
  var command = async (conf) => {
60
64
  const rc = new RegistryClient(conf.options);
61
- const response = await rc.request(
62
- new URL("-/whoami", await resolveRegistry(conf)),
63
- { useCache: false }
64
- );
65
+ const url = new URL("-/whoami", await resolveRegistry(conf));
66
+ const response = await rc.request(url, { useCache: false });
67
+ assertOk(response, {
68
+ message: "Failed to look up the current user",
69
+ url,
70
+ advice: (statusCode) => statusCode === 401 || statusCode === 403 ? `Not logged in to ${url.origin}. Run \`vlt login\` and try again.` : void 0
71
+ });
65
72
  const { username } = response.json();
73
+ if (typeof username !== "string" || !username) {
74
+ throw error("Registry did not report a username", {
75
+ code: "EREQUEST",
76
+ url,
77
+ wanted: "a `username` string",
78
+ found: username,
79
+ response
80
+ });
81
+ }
66
82
  return { username };
67
83
  };
68
84
  export {
package/chunk-UBLFPJHV.js DELETED
@@ -1,40 +0,0 @@
1
- var global = globalThis;
2
- import {Buffer} from "node:buffer";
3
- import {setTimeout as _vlt_setTimeout,clearTimeout as _vlt_clearTimeout,setImmediate as _vlt_setImmediate,clearImmediate as _vlt_clearImmediate,setInterval as _vlt_setInterval,clearInterval as _vlt_clearInterval} from "node:timers";
4
- globalThis.setTimeout = _vlt_setTimeout;
5
- globalThis.clearTimeout = _vlt_clearTimeout;
6
- globalThis.setImmediate = _vlt_setImmediate;
7
- globalThis.clearImmediate = _vlt_clearImmediate;
8
- globalThis.setInterval = _vlt_setInterval;
9
- globalThis.clearInterval = _vlt_clearInterval;
10
- import {createRequire as _vlt_createRequire} from "node:module";
11
- var require = _vlt_createRequire(import.meta.filename);
12
-
13
- // ../../src/output/src/index.ts
14
- import EventEmitter from "node:events";
15
- var OutputEmitter = class {
16
- emitter = new EventEmitter();
17
- emit(eventName, payload) {
18
- this.emitter.emit(eventName, payload);
19
- }
20
- on(eventName, handler) {
21
- this.emitter.on(eventName, handler);
22
- }
23
- off(eventName, handler) {
24
- this.emitter.off(eventName, handler);
25
- }
26
- };
27
- var emitter = new OutputEmitter();
28
- var logRequest = (url, state, details = {}) => {
29
- emitter.emit("request", { url, state, ...details });
30
- };
31
- var graphStep = (step) => {
32
- emitter.emit("graphStep", { step, state: "start" });
33
- return () => emitter.emit("graphStep", { step, state: "stop" });
34
- };
35
-
36
- export {
37
- emitter,
38
- logRequest,
39
- graphStep
40
- };
package/chunk-Y3QEV76Q.js DELETED
@@ -1,75 +0,0 @@
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-4RPC3X5N.js"),
22
- "./commands/bugs.ts": () => import("./bugs-K6QLQLL4.js"),
23
- "./commands/build.ts": () => import("./build-VD4L5IED.js"),
24
- "./commands/cache.ts": () => import("./cache-Q6FUUEQF.js"),
25
- "./commands/ci.ts": () => import("./ci-G4PJWJQE.js"),
26
- "./commands/config.ts": () => import("./config-WTIWWXRD.js"),
27
- "./commands/create.ts": () => import("./create-DF6RQTHC.js"),
28
- "./commands/deprecate.ts": () => import("./deprecate-2KTC2HKH.js"),
29
- "./commands/dist-tag.ts": () => import("./dist-tag-QKJQIOGN.js"),
30
- "./commands/docs.ts": () => import("./docs-YSWJTGYX.js"),
31
- "./commands/exec-cache.ts": () => import("./exec-cache-OGX7WR5P.js"),
32
- "./commands/exec-local.ts": () => import("./exec-local-SB7EPYED.js"),
33
- "./commands/exec.ts": () => import("./exec-5XIMPSBI.js"),
34
- "./commands/help.ts": () => import("./help-GMCQHGVN.js"),
35
- "./commands/init.ts": () => import("./init-KXIIWHBA.js"),
36
- "./commands/install.ts": () => import("./install-ODTEMAMS.js"),
37
- "./commands/install/reporter.ts": () => import("./reporter-SDMDYYMJ.js"),
38
- "./commands/list.ts": () => import("./list-QS4FLJSU.js"),
39
- "./commands/login.ts": () => import("./login-6TGYRY43.js"),
40
- "./commands/logout.ts": () => import("./logout-GOAB7KHJ.js"),
41
- "./commands/pack.ts": () => import("./pack-PJDH6PKP.js"),
42
- "./commands/ping.ts": () => import("./ping-ANBW2IRW.js"),
43
- "./commands/pkg.ts": () => import("./pkg-GZWUXU65.js"),
44
- "./commands/profile.ts": () => import("./profile-BLY74CMB.js"),
45
- "./commands/publish.ts": () => import("./publish-W2KOTNMB.js"),
46
- "./commands/query.ts": () => import("./query-3PUMU5ON.js"),
47
- "./commands/registry.ts": () => import("./registry-ONSDWNPV.js"),
48
- "./commands/repo.ts": () => import("./repo-LZ6STH4C.js"),
49
- "./commands/run-exec.ts": () => import("./run-exec-JEKM2O53.js"),
50
- "./commands/run.ts": () => import("./run-JMIBADHE.js"),
51
- "./commands/setup.ts": () => import("./setup-BTBU3NAI.js"),
52
- "./commands/token.ts": () => import("./token-PUJ7QN6D.js"),
53
- "./commands/uninstall.ts": () => import("./uninstall-OTISP2T7.js"),
54
- "./commands/unpublish.ts": () => import("./unpublish-X75EEQAN.js"),
55
- "./commands/update.ts": () => import("./update-CKXX5POE.js"),
56
- "./commands/version.ts": () => import("./version-24B2X7M7.js"),
57
- "./commands/view.ts": () => import("./view-Q7MAQ6R3.js"),
58
- "./commands/whoami.ts": () => import("./whoami-S6CQZFE3.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
- };