@vltpkg/cli-js 1.0.3 → 1.0.4

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 (69) hide show
  1. package/{access-5WETTBDZ.js → access-RYNHM3DJ.js} +1 -1
  2. package/{bugs-KONFLIQQ.js → bugs-ZHOC4U52.js} +6 -6
  3. package/{build-S7G2DU7I.js → build-HTM6Z7OQ.js} +3 -3
  4. package/{cache-Z4OIMLXQ.js → cache-74GIE5TO.js} +1 -1
  5. package/cache-unzip-src-unzip.js +23 -1
  6. package/{chunk-HNCE3YE5.js → chunk-2CLRMD5A.js} +947 -391
  7. package/{chunk-NXEH3NQZ.js → chunk-A2EWSQPE.js} +2 -2
  8. package/{chunk-UXIRAU5T.js → chunk-AIQ7Z62O.js} +1 -1
  9. package/{chunk-G7UPIJAP.js → chunk-AK3RSABL.js} +4 -4
  10. package/{chunk-XQSBCMSC.js → chunk-AMDP7LYB.js} +2 -2
  11. package/{chunk-5QJEOGEM.js → chunk-GXWZ5T4W.js} +1 -1
  12. package/{chunk-DYCF76WI.js → chunk-JOEHZSS7.js} +1 -1
  13. package/{chunk-TMBNGWXK.js → chunk-MZIM7X37.js} +3 -3
  14. package/{chunk-LZGKX7JI.js → chunk-OR5LSCSK.js} +75 -67
  15. package/{chunk-FFOXTPQA.js → chunk-PDLEQEZ3.js} +124 -75
  16. package/{chunk-W2Q5EIMH.js → chunk-R55OHZ2R.js} +3 -3
  17. package/{chunk-5UPPEUG2.js → chunk-RB6SUM6U.js} +3 -3
  18. package/chunk-SKQHW56B.js +75 -0
  19. package/{chunk-5B23EKN4.js → chunk-WNDUKE42.js} +20 -13
  20. package/{chunk-UAAZW4N6.js → chunk-YRKCPGWZ.js} +2 -2
  21. package/{chunk-FWKQ7YDF.js → chunk-ZWKI5OSF.js} +118 -117
  22. package/{ci-RZZE375O.js → ci-XT7IAX2Y.js} +4 -4
  23. package/cli-package.json +1 -1
  24. package/{config-MDFY3ORD.js → config-B2LF4SJ7.js} +4 -4
  25. package/{config-LL3RLMZG.js → config-SRLA2XPZ.js} +4 -4
  26. package/{create-GVSDTOGQ.js → create-VKNML6FC.js} +8 -8
  27. package/{deprecate-T4TQLGXQ.js → deprecate-IM4HEDIP.js} +4 -4
  28. package/{devtools-HGLF4KAO.js → devtools-66MVSNF5.js} +30 -30
  29. package/{dist-tag-GO46UQUN.js → dist-tag-EKVJAQ66.js} +1 -1
  30. package/{docs-FJME563T.js → docs-4DHMAMOU.js} +6 -6
  31. package/{exec-M22KBPCK.js → exec-7C74Z3WB.js} +8 -8
  32. package/{exec-cache-3UNLDUAP.js → exec-cache-QTUCQWSA.js} +6 -6
  33. package/{exec-local-YHVO5RLU.js → exec-local-ZCNI2JHK.js} +5 -5
  34. package/{help-ZEWMLOJX.js → help-IKRPBT2R.js} +1 -1
  35. package/{init-4HPZY2KN.js → init-PCQ4YK7R.js} +4 -4
  36. package/{install-2TZIP4PJ.js → install-OAQ4K3XX.js} +5 -5
  37. package/{list-NFFXER43.js → list-WYBKBCZU.js} +5 -5
  38. package/{login-KV5YC5Z2.js → login-TTRCQ43Z.js} +1 -1
  39. package/{logout-I2VT3NAR.js → logout-3J77F4OO.js} +1 -1
  40. package/{pack-47ZKFSHI.js → pack-ZLFGYGVZ.js} +6 -6
  41. package/package.json +1 -1
  42. package/{ping-Q7Y7QV63.js → ping-IRLV5C4D.js} +1 -1
  43. package/{pkg-VTJS2ISJ.js → pkg-EKOQ4XKM.js} +5 -5
  44. package/{profile-YXZYVEUX.js → profile-7UBKGJBP.js} +1 -1
  45. package/{publish-CBN67KN2.js → publish-2ODYT4R2.js} +7 -7
  46. package/{query-U3QHF3ZE.js → query-ADSAKEK4.js} +5 -5
  47. package/registry-client-package.json +1 -1
  48. package/registry-client-src-revalidate.js +970 -392
  49. package/{repo-4UIQRBI7.js → repo-3THXRT64.js} +6 -6
  50. package/{reporter-DKZTTACW.js → reporter-6BFJCFVZ.js} +82 -82
  51. package/{run-5DUYI6GL.js → run-2QLSVP6M.js} +5 -5
  52. package/{run-exec-HPNBVAXH.js → run-exec-VYD2Q4BD.js} +5 -5
  53. package/{setup-23W5FQVW.js → setup-TDX5NXUN.js} +1 -1
  54. package/{src-2NB67FPG.js → src-AVMBIRBC.js} +5 -5
  55. package/{src-6OKPBJJT.js → src-SWL4UPPI.js} +1 -1
  56. package/{src-M5RRGKUM.js → src-X66SVM5T.js} +31 -11
  57. package/{token-SRCS5CRU.js → token-3RDRZ4AO.js} +1 -1
  58. package/{uninstall-JXHAFXZ2.js → uninstall-CNAFZTLA.js} +5 -5
  59. package/{unpublish-GRYB5KQH.js → unpublish-7YHQQYZG.js} +1 -1
  60. package/{update-GDLL4ER6.js → update-3W27EZWN.js} +4 -4
  61. package/{version-JVG4CI4L.js → version-K37LT6GZ.js} +4 -4
  62. package/{view-ABQLVL4L.js → view-ZVAYKUL2.js} +9 -9
  63. package/vlr.js +1 -1
  64. package/vlrx.js +1 -1
  65. package/vlt.js +1 -1
  66. package/vlx.js +1 -1
  67. package/vlxl.js +1 -1
  68. package/{whoami-RCCZ7BXI.js → whoami-IOUW56D6.js} +1 -1
  69. package/chunk-RNJSI3NZ.js +0 -75
@@ -19,7 +19,7 @@ import "./chunk-XU5SMHXP.js";
19
19
  import "./chunk-WP6CYBPM.js";
20
20
  import {
21
21
  RegistryClient
22
- } from "./chunk-HNCE3YE5.js";
22
+ } from "./chunk-2CLRMD5A.js";
23
23
  import "./chunk-HAYXR3MW.js";
24
24
  import "./chunk-E74WGW5C.js";
25
25
  import "./chunk-LPIBYUMT.js";
@@ -14,19 +14,19 @@ import {
14
14
  } from "./chunk-CLVRCGOZ.js";
15
15
  import {
16
16
  createHostContextsMap
17
- } from "./chunk-TMBNGWXK.js";
17
+ } from "./chunk-MZIM7X37.js";
18
18
  import {
19
19
  PackageInfoClient
20
- } from "./chunk-G7UPIJAP.js";
21
- import "./chunk-FWKQ7YDF.js";
20
+ } from "./chunk-AK3RSABL.js";
21
+ import "./chunk-ZWKI5OSF.js";
22
22
  import {
23
23
  Query,
24
24
  actual
25
- } from "./chunk-LZGKX7JI.js";
25
+ } from "./chunk-OR5LSCSK.js";
26
26
  import {
27
27
  SecurityArchive
28
- } from "./chunk-5B23EKN4.js";
29
- import "./chunk-FFOXTPQA.js";
28
+ } from "./chunk-WNDUKE42.js";
29
+ import "./chunk-PDLEQEZ3.js";
30
30
  import "./chunk-OCJDISSI.js";
31
31
  import {
32
32
  commandUsage
@@ -11,9 +11,9 @@ import {createRequire as _vlt_createRequire} from "node:module";
11
11
  var require = _vlt_createRequire(import.meta.filename);
12
12
  import {
13
13
  build
14
- } from "./chunk-LZGKX7JI.js";
15
- import "./chunk-5B23EKN4.js";
16
- import "./chunk-FFOXTPQA.js";
14
+ } from "./chunk-OR5LSCSK.js";
15
+ import "./chunk-WNDUKE42.js";
16
+ import "./chunk-PDLEQEZ3.js";
17
17
  import "./chunk-OCJDISSI.js";
18
18
  import {
19
19
  commandUsage
@@ -34,7 +34,7 @@ import {
34
34
  } from "./chunk-4KCU2KZL.js";
35
35
  import {
36
36
  CacheEntry
37
- } from "./chunk-HNCE3YE5.js";
37
+ } from "./chunk-2CLRMD5A.js";
38
38
  import "./chunk-HAYXR3MW.js";
39
39
  import "./chunk-E74WGW5C.js";
40
40
  import "./chunk-LPIBYUMT.js";
@@ -4544,6 +4544,15 @@ var Cache = class _Cache extends I {
4544
4544
  import { pathToFileURL } from "node:url";
4545
4545
  import { gunzipSync } from "node:zlib";
4546
4546
  var __CODE_SPLIT_SCRIPT_NAME = import.meta.filename;
4547
+ var MAX_DECOMPRESSION_RATIO = 1e3;
4548
+ var defaultMaxUnpackedBytes = 2 * 1024 * 1024 * 1024;
4549
+ var parseMaxUnpackedBytes = (raw) => {
4550
+ const n7 = Number(raw);
4551
+ return Number.isFinite(n7) && n7 >= 1 ? Math.floor(n7) : defaultMaxUnpackedBytes;
4552
+ };
4553
+ var maxUnpackedBytes = parseMaxUnpackedBytes(
4554
+ process.env.VLT_TAR_MAX_UNPACKED_BYTES
4555
+ );
4547
4556
  var isMain = (path) => path === __CODE_SPLIT_SCRIPT_NAME || path === pathToFileURL(__CODE_SPLIT_SCRIPT_NAME).toString();
4548
4557
  var main = async (path, input = process.stdin) => {
4549
4558
  if (!path) {
@@ -4586,7 +4595,20 @@ var main = async (path, input = process.stdin) => {
4586
4595
  const headSizeOriginal = readSize(buffer, 0);
4587
4596
  const body = buffer.subarray(headSizeOriginal);
4588
4597
  if (body[0] === 31 && body[1] === 139) {
4589
- const unz = gunzipSync(body);
4598
+ let unz;
4599
+ try {
4600
+ unz = gunzipSync(body, {
4601
+ maxOutputLength: Math.min(
4602
+ maxUnpackedBytes,
4603
+ body.length * MAX_DECOMPRESSION_RATIO
4604
+ )
4605
+ });
4606
+ } catch (er) {
4607
+ if (er.code !== "ERR_BUFFER_TOO_LARGE") {
4608
+ throw er;
4609
+ }
4610
+ return null;
4611
+ }
4590
4612
  const headersBuffer = buffer.subarray(7, headSizeOriginal);
4591
4613
  const headers = [];
4592
4614
  let i = 0;