@vltpkg/cli-js 1.0.8 → 1.0.9
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.
- package/{access-FOYRQGJC.js → access-5DJJIIGD.js} +3 -3
- package/{bugs-ORVU4I5O.js → bugs-NRHU4ENC.js} +9 -9
- package/{build-JLVAGEEU.js → build-5VZJTEBD.js} +6 -6
- package/{cache-RIOSSQD3.js → cache-QZ5XII4U.js} +4 -4
- package/{chunk-OB73T23B.js → chunk-2HDWM6AD.js} +1 -1
- package/{chunk-NC3QYZPW.js → chunk-6NQBG3ZR.js} +3 -3
- package/{chunk-5QAFAGO5.js → chunk-6WMR7BLF.js} +6 -6
- package/{chunk-UYIA44HE.js → chunk-A6TBJ4AB.js} +4 -4
- package/{chunk-AGHW2E24.js → chunk-ATYE2HQV.js} +68 -11
- package/{chunk-BJBFEQRR.js → chunk-BHJT53TP.js} +1 -0
- package/{chunk-WY4PAM6D.js → chunk-EBXBZ2Y5.js} +2 -2
- package/{chunk-ZXIF4PVX.js → chunk-GKCU7R4B.js} +4 -4
- package/{chunk-YCVPEZRM.js → chunk-HRY5MJCA.js} +29 -7
- package/{chunk-ADLHAQRA.js → chunk-KCXN2GTX.js} +1 -1
- package/{chunk-7D7SNVBV.js → chunk-LHMEJF6J.js} +8 -8
- package/{chunk-3L2ERW54.js → chunk-SBEZ7RUC.js} +2 -2
- package/{chunk-5CNTLC2U.js → chunk-USRMYD4F.js} +1 -1
- package/chunk-XEPCV7DP.js +75 -0
- package/{chunk-MUG5K6X2.js → chunk-XFI4THXZ.js} +1 -1
- package/{ci-2666LKEC.js → ci-MBYD4AGJ.js} +5 -5
- package/cli-package.json +1 -1
- package/{config-WMYY5J37.js → config-DTZ7EWQF.js} +6 -5
- package/{config-3N7PBEXH.js → config-RQKPUW5B.js} +5 -4
- package/{create-AEQSO6KX.js → create-CYTNZ66Z.js} +10 -10
- package/{deprecate-MW76DAZ5.js → deprecate-H3L4MPZS.js} +6 -6
- package/{dist-tag-XGQLYA6C.js → dist-tag-CZHTW7C6.js} +3 -3
- package/{docs-7CCTL3OY.js → docs-Z76UCNLH.js} +9 -9
- package/{exec-GWCIDNOH.js → exec-PGPFYCAM.js} +10 -10
- package/{exec-cache-AML2HUTJ.js → exec-cache-HPILZWUY.js} +8 -8
- package/{exec-local-JRTO2XG4.js → exec-local-VKDC6XAQ.js} +8 -8
- package/{help-4KSCV7GN.js → help-QPZESL4Y.js} +1 -1
- package/{init-OHVBHXB7.js → init-MMQV6UC5.js} +6 -6
- package/{install-TFDEHY5J.js → install-KZPDV66V.js} +6 -6
- package/{list-UD4SDHVE.js → list-PJ2U4FE7.js} +10 -10
- package/{login-B6TIQW62.js → login-L3D5FQGT.js} +6 -6
- package/{logout-H3CXGLDN.js → logout-SRZ574SQ.js} +3 -3
- package/{pack-YYK4LKBQ.js → pack-OI5JLA3R.js} +7 -7
- package/package.json +1 -1
- package/{ping-G765RWLM.js → ping-VQ662NAP.js} +3 -3
- package/{pkg-D4S3SPUH.js → pkg-HNPRMTWV.js} +7 -7
- package/{profile-YDQGMWYP.js → profile-Z7IOODZ4.js} +3 -3
- package/{publish-ANHSZPIM.js → publish-KTUUX25U.js} +10 -10
- package/{query-PZ6C6AZJ.js → query-MV5HKRIT.js} +10 -10
- package/registry-BMWXMQS4.js +1 -1
- package/registry-client-package.json +1 -1
- package/registry-client-src-revalidate.js +64 -7
- package/{repo-ZA3TMERE.js → repo-ZBCD65WE.js} +9 -9
- package/{run-N4NK35UT.js → run-QJK5LA6Q.js} +8 -8
- package/{run-exec-N5FT4QO7.js → run-exec-EAASMT5O.js} +8 -8
- package/{setup-MWWDSKQZ.js → setup-Q7NTAV26.js} +32 -14
- package/{src-6PISL6QX.js → src-MEEFRFWA.js} +3 -3
- package/{src-U4EBFPPT.js → src-MOKZQTH2.js} +163 -205
- package/{src-6UF5YTTL.js → src-YVODDQYK.js} +6 -6
- package/{token-FFUAFL43.js → token-NQRHTTKG.js} +3 -3
- package/{uninstall-A4PUG6RI.js → uninstall-E2SVGYI3.js} +6 -6
- package/{unpublish-OJEGZDGQ.js → unpublish-IE4KYVM4.js} +4 -4
- package/{update-ENR6ICMR.js → update-KZOWARII.js} +5 -5
- package/{version-K3BUGG7X.js → version-T6PTPZPR.js} +7 -7
- package/{view-SWVQLQCB.js → view-MVYV7YZ2.js} +5 -4
- package/vlr.js +1 -1
- package/vlrx.js +1 -1
- package/vlt.js +1 -1
- package/vlx.js +1 -1
- package/vlxl.js +1 -1
- package/{whoami-MA733O2T.js → whoami-A5RM2Z7Z.js} +3 -3
- package/chunk-AQ3XJJUP.js +0 -75
- package/{chunk-FG633ZKS.js → chunk-2YJ5MESP.js} +3 -3
- package/{chunk-JXVDCQZF.js → chunk-MXCWH7WC.js} +3 -3
- package/{chunk-OWML62W5.js → chunk-USTJECVS.js} +3 -3
|
@@ -10,12 +10,10 @@ globalThis.clearInterval = _vlt_clearInterval;
|
|
|
10
10
|
import {createRequire as _vlt_createRequire} from "node:module";
|
|
11
11
|
var require = _vlt_createRequire(import.meta.filename);
|
|
12
12
|
import {
|
|
13
|
-
rimraf
|
|
14
|
-
|
|
13
|
+
rimraf,
|
|
14
|
+
rimrafSync
|
|
15
|
+
} from "./chunk-BHJT53TP.js";
|
|
15
16
|
import "./chunk-VE6CCH33.js";
|
|
16
|
-
import {
|
|
17
|
-
asError
|
|
18
|
-
} from "./chunk-VFBCWAOC.js";
|
|
19
17
|
import {
|
|
20
18
|
error
|
|
21
19
|
} from "./chunk-WZWDS3W4.js";
|
|
@@ -23,6 +21,13 @@ import "./chunk-PZLD7RTK.js";
|
|
|
23
21
|
|
|
24
22
|
// ../../src/tar/src/unpack.ts
|
|
25
23
|
import { randomBytes } from "node:crypto";
|
|
24
|
+
import {
|
|
25
|
+
lstatSync,
|
|
26
|
+
mkdirSync,
|
|
27
|
+
readFileSync,
|
|
28
|
+
renameSync,
|
|
29
|
+
writeFileSync
|
|
30
|
+
} from "node:fs";
|
|
26
31
|
import { lstat, mkdir, rename, writeFile } from "node:fs/promises";
|
|
27
32
|
import {
|
|
28
33
|
basename as basename2,
|
|
@@ -525,7 +530,7 @@ var parseKVLine = (set, line) => {
|
|
|
525
530
|
};
|
|
526
531
|
|
|
527
532
|
// ../../src/tar/src/unpack.ts
|
|
528
|
-
import { unzip as unzipCB } from "node:zlib";
|
|
533
|
+
import { unzip as unzipCB, unzipSync as unzipSyncCB } from "node:zlib";
|
|
529
534
|
|
|
530
535
|
// ../../src/tar/src/find-tar-dir.ts
|
|
531
536
|
var findTarDir = (path, tarDir) => {
|
|
@@ -550,24 +555,30 @@ var parseMaxUnpackedBytes = (raw) => {
|
|
|
550
555
|
var maxUnpackedBytes = parseMaxUnpackedBytes(
|
|
551
556
|
process.env.VLT_TAR_MAX_UNPACKED_BYTES
|
|
552
557
|
);
|
|
558
|
+
var unzipMax = (len) => Math.min(maxUnpackedBytes, len * MAX_DECOMPRESSION_RATIO);
|
|
559
|
+
var unzipError = (er, found, max) => er.code === "ERR_BUFFER_TOO_LARGE" ? error("tarball exceeds maximum unpacked size", {
|
|
560
|
+
found,
|
|
561
|
+
max,
|
|
562
|
+
cause: er
|
|
563
|
+
}) : er;
|
|
553
564
|
var unzip = async (input) => {
|
|
554
|
-
const max =
|
|
555
|
-
maxUnpackedBytes,
|
|
556
|
-
input.length * MAX_DECOMPRESSION_RATIO
|
|
557
|
-
);
|
|
565
|
+
const max = unzipMax(input.length);
|
|
558
566
|
return new Promise(
|
|
559
|
-
(res, rej) => unzipCB(
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
max,
|
|
565
|
-
cause: er
|
|
566
|
-
}) : er
|
|
567
|
-
);
|
|
568
|
-
})
|
|
567
|
+
(res, rej) => unzipCB(
|
|
568
|
+
input,
|
|
569
|
+
{ maxOutputLength: max },
|
|
570
|
+
(er, result) => er ? rej(unzipError(er, input.length, max)) : res(result)
|
|
571
|
+
)
|
|
569
572
|
);
|
|
570
573
|
};
|
|
574
|
+
var unzipSync = (input) => {
|
|
575
|
+
const max = unzipMax(input.length);
|
|
576
|
+
try {
|
|
577
|
+
return unzipSyncCB(input, { maxOutputLength: max });
|
|
578
|
+
} catch (er) {
|
|
579
|
+
throw unzipError(er, input.length, max);
|
|
580
|
+
}
|
|
581
|
+
};
|
|
571
582
|
var exists = async (path) => {
|
|
572
583
|
try {
|
|
573
584
|
await lstat(path);
|
|
@@ -673,7 +684,13 @@ var unpack = async (tarData, target) => {
|
|
|
673
684
|
target
|
|
674
685
|
);
|
|
675
686
|
};
|
|
676
|
-
var
|
|
687
|
+
var unpackSync = (tarData, target) => {
|
|
688
|
+
const isGzip = tarData[0] === 31 && tarData[1] === 139;
|
|
689
|
+
unpackUnzippedSync(isGzip ? unzipSync(tarData) : tarData, target);
|
|
690
|
+
};
|
|
691
|
+
var unpackFileSync = (file, target, offset = 0) => unpackSync(readFileSync(file).subarray(offset), target);
|
|
692
|
+
var tmpName = (target) => dirname(target) + sep + "." + basename2(target) + "." + tmpSuffix();
|
|
693
|
+
var parseTarball = (buffer, tmp2) => {
|
|
677
694
|
const isGzip = buffer[0] === 31 && buffer[1] === 139;
|
|
678
695
|
if (isGzip) {
|
|
679
696
|
throw error("still gzipped after unzipping", {
|
|
@@ -689,7 +706,9 @@ var unpackUnzipped = async (buffer, target) => {
|
|
|
689
706
|
if (buffer.length < 1024) {
|
|
690
707
|
throw error(
|
|
691
708
|
"Invalid tarball: not terminated by 1024 null bytes",
|
|
692
|
-
{
|
|
709
|
+
{
|
|
710
|
+
found: buffer.length
|
|
711
|
+
}
|
|
693
712
|
);
|
|
694
713
|
}
|
|
695
714
|
for (let i = buffer.length - 1024; i < buffer.length; i++) {
|
|
@@ -700,86 +719,90 @@ var unpackUnzipped = async (buffer, target) => {
|
|
|
700
719
|
);
|
|
701
720
|
}
|
|
702
721
|
}
|
|
703
|
-
const
|
|
704
|
-
|
|
705
|
-
let
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
if (
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
const key = entryKey(dest);
|
|
729
|
-
if (entries.get(key)?.dir === true) {
|
|
730
|
-
throw error("file/directory collision in tarball", {
|
|
731
|
-
path: dest
|
|
732
|
-
});
|
|
733
|
-
}
|
|
734
|
-
entries.set(key, {
|
|
735
|
-
path: dest,
|
|
736
|
-
body,
|
|
737
|
-
executable: 1 === ((h.mode ?? 1638) & 1),
|
|
738
|
-
dir: false
|
|
722
|
+
const entries = /* @__PURE__ */ new Map();
|
|
723
|
+
let tarDir = void 0;
|
|
724
|
+
let offset = 0;
|
|
725
|
+
let h;
|
|
726
|
+
let ex = void 0;
|
|
727
|
+
let gex = void 0;
|
|
728
|
+
while (offset < buffer.length && !(h = new Header(buffer, offset, ex, gex)).nullBlock) {
|
|
729
|
+
offset += 512;
|
|
730
|
+
ex = void 0;
|
|
731
|
+
gex = void 0;
|
|
732
|
+
const size = h.size ?? 0;
|
|
733
|
+
const body = buffer.subarray(offset, offset + size);
|
|
734
|
+
if (!h.cksumValid) continue;
|
|
735
|
+
offset += 512 * Math.ceil(size / 512);
|
|
736
|
+
switch (h.type) {
|
|
737
|
+
case "File":
|
|
738
|
+
if (!tarDir) tarDir = findTarDir(h.path, tarDir);
|
|
739
|
+
if (!tarDir) continue;
|
|
740
|
+
if (!checkFs(h, tarDir, tmp2)) continue;
|
|
741
|
+
{
|
|
742
|
+
const dest = resolve(tmp2, h.path.substring(tarDir.length));
|
|
743
|
+
const key = entryKey(dest);
|
|
744
|
+
if (entries.get(key)?.dir === true) {
|
|
745
|
+
throw error("file/directory collision in tarball", {
|
|
746
|
+
path: dest
|
|
739
747
|
});
|
|
740
748
|
}
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
749
|
+
entries.set(key, {
|
|
750
|
+
path: dest,
|
|
751
|
+
body,
|
|
752
|
+
executable: 1 === ((h.mode ?? 1638) & 1),
|
|
753
|
+
dir: false
|
|
754
|
+
});
|
|
755
|
+
}
|
|
756
|
+
break;
|
|
757
|
+
case "Directory":
|
|
758
|
+
if (!tarDir) tarDir = findTarDir(h.path, tarDir);
|
|
759
|
+
if (!tarDir) continue;
|
|
760
|
+
if (!checkFs(h, tarDir, tmp2)) continue;
|
|
761
|
+
{
|
|
762
|
+
const dest = resolve(tmp2, h.path.substring(tarDir.length));
|
|
763
|
+
const key = entryKey(dest);
|
|
764
|
+
if (entries.get(key)?.dir === false) {
|
|
765
|
+
throw error("file/directory collision in tarball", {
|
|
766
|
+
path: dest
|
|
757
767
|
});
|
|
758
768
|
}
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
769
|
+
entries.set(key, {
|
|
770
|
+
path: dest,
|
|
771
|
+
dir: true
|
|
772
|
+
});
|
|
773
|
+
}
|
|
774
|
+
break;
|
|
775
|
+
case "GlobalExtendedHeader":
|
|
776
|
+
gex = Pax.parse(body.toString(), gex, true);
|
|
777
|
+
break;
|
|
778
|
+
case "ExtendedHeader":
|
|
779
|
+
case "OldExtendedHeader":
|
|
780
|
+
ex = Pax.parse(body.toString(), ex, false);
|
|
781
|
+
break;
|
|
782
|
+
case "NextFileHasLongPath":
|
|
783
|
+
case "OldGnuLongPath":
|
|
784
|
+
ex ??= /* @__PURE__ */ Object.create(null);
|
|
785
|
+
ex.path = body.toString().replace(/\0.*/, "");
|
|
786
|
+
break;
|
|
787
|
+
}
|
|
788
|
+
}
|
|
789
|
+
const dirs = /* @__PURE__ */ new Set();
|
|
790
|
+
const files = [];
|
|
791
|
+
for (const e of entries.values()) {
|
|
792
|
+
if (e.dir) dirs.add(e.path);
|
|
793
|
+
else {
|
|
794
|
+
dirs.add(dirname(e.path));
|
|
795
|
+
files.push(e);
|
|
796
|
+
}
|
|
797
|
+
}
|
|
798
|
+
return { dirs, files };
|
|
799
|
+
};
|
|
800
|
+
var unpackUnzipped = async (buffer, target) => {
|
|
801
|
+
const tmp2 = tmpName(target);
|
|
802
|
+
const og = tmp2 + ".ORIGINAL";
|
|
803
|
+
let succeeded = false;
|
|
804
|
+
try {
|
|
805
|
+
const { dirs, files } = parseTarball(buffer, tmp2);
|
|
783
806
|
rethrowFirst(
|
|
784
807
|
await Promise.allSettled(
|
|
785
808
|
[...dirs].map(
|
|
@@ -809,128 +832,63 @@ var unpackUnzipped = async (buffer, target) => {
|
|
|
809
832
|
}
|
|
810
833
|
}
|
|
811
834
|
};
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
this.onMessage = onMessage;
|
|
841
|
-
}
|
|
842
|
-
async process(req) {
|
|
843
|
-
const { target, tarData, id: id2 } = req;
|
|
844
|
-
try {
|
|
845
|
-
await unpack(tarData, target);
|
|
846
|
-
const m = { id: id2, ok: true };
|
|
847
|
-
this.onMessage(m);
|
|
848
|
-
} catch (error2) {
|
|
849
|
-
const m = { id: id2, error: error2 };
|
|
850
|
-
this.onMessage(m);
|
|
835
|
+
var unpackUnzippedSync = (buffer, target) => {
|
|
836
|
+
const tmp2 = tmpName(target);
|
|
837
|
+
const og = tmp2 + ".ORIGINAL";
|
|
838
|
+
let succeeded = false;
|
|
839
|
+
try {
|
|
840
|
+
const { dirs, files } = parseTarball(buffer, tmp2);
|
|
841
|
+
for (const d of dirs) {
|
|
842
|
+
mkdirSync(d, { recursive: true, mode: 511 });
|
|
843
|
+
}
|
|
844
|
+
for (const f of files) {
|
|
845
|
+
writeFileSync(f.path, f.body, {
|
|
846
|
+
mode: f.executable ? 511 : 438
|
|
847
|
+
});
|
|
848
|
+
}
|
|
849
|
+
const targetExists = !!lstatSync(target, {
|
|
850
|
+
throwIfNoEntry: false
|
|
851
|
+
});
|
|
852
|
+
if (targetExists) renameSync(target, og);
|
|
853
|
+
renameSync(tmp2, target);
|
|
854
|
+
if (targetExists) rimrafSync(og);
|
|
855
|
+
succeeded = true;
|
|
856
|
+
} finally {
|
|
857
|
+
if (!succeeded) {
|
|
858
|
+
if (lstatSync(og, { throwIfNoEntry: false })) {
|
|
859
|
+
rimrafSync(target);
|
|
860
|
+
renameSync(og, target);
|
|
861
|
+
}
|
|
862
|
+
rimrafSync(tmp2);
|
|
851
863
|
}
|
|
852
864
|
}
|
|
853
865
|
};
|
|
854
866
|
|
|
855
867
|
// ../../src/tar/src/pool.ts
|
|
868
|
+
import { readFile } from "node:fs/promises";
|
|
869
|
+
var syncUnpack = process.env.VLT_TAR_SYNC !== "0";
|
|
856
870
|
var Pool = class {
|
|
857
871
|
/**
|
|
858
|
-
*
|
|
859
|
-
*
|
|
860
|
-
*/
|
|
861
|
-
/* c8 ignore next */
|
|
862
|
-
jobs = 8 * (Math.max(os.availableParallelism(), 2) - 1);
|
|
863
|
-
/**
|
|
864
|
-
* Set of currently active worker threads
|
|
865
|
-
*/
|
|
866
|
-
workers = /* @__PURE__ */ new Set();
|
|
867
|
-
/**
|
|
868
|
-
* Queue of requests awaiting an available worker
|
|
869
|
-
*/
|
|
870
|
-
queue = [];
|
|
871
|
-
/**
|
|
872
|
-
* All requests that have not yet been confirmed completed, both
|
|
873
|
-
* those currently assigned to a worker and those still waiting in
|
|
874
|
-
* the queue. Entries are removed once the request resolves or
|
|
875
|
-
* rejects, releasing the reference to its tarball buffer.
|
|
872
|
+
* Provide the tardata to be unpacked, and the location where it's to be
|
|
873
|
+
* placed. Resolves when the tarball has been extracted.
|
|
876
874
|
*/
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
const { id: id2 } = m;
|
|
881
|
-
const ur = this.pending.get(id2);
|
|
882
|
-
if (!ur) return;
|
|
883
|
-
this.pending.delete(id2);
|
|
884
|
-
if (isResponseOK(m)) {
|
|
885
|
-
ur.resolve();
|
|
886
|
-
} else {
|
|
887
|
-
ur.reject(
|
|
888
|
-
error(
|
|
889
|
-
asError(m.error, "failed without error message").message,
|
|
890
|
-
{
|
|
891
|
-
found: m,
|
|
892
|
-
cause: m.error
|
|
893
|
-
}
|
|
894
|
-
)
|
|
895
|
-
);
|
|
896
|
-
}
|
|
897
|
-
const next = this.queue.shift();
|
|
898
|
-
if (!next) {
|
|
899
|
-
this.workers.delete(w);
|
|
900
|
-
} else {
|
|
901
|
-
void w.process(next);
|
|
902
|
-
}
|
|
903
|
-
}
|
|
904
|
-
// create a new worker
|
|
905
|
-
#createWorker(req) {
|
|
906
|
-
const w = new Worker(
|
|
907
|
-
(m) => this.#onMessage(w, m)
|
|
908
|
-
);
|
|
909
|
-
this.workers.add(w);
|
|
910
|
-
void w.process(req);
|
|
875
|
+
async unpack(tarData, target) {
|
|
876
|
+
if (!syncUnpack) return unpack(tarData, target);
|
|
877
|
+
unpackSync(tarData, target);
|
|
911
878
|
}
|
|
912
879
|
/**
|
|
913
|
-
*
|
|
914
|
-
*
|
|
915
|
-
*
|
|
916
|
-
*
|
|
917
|
-
* Returned promise resolves when the provided tarball has been extracted.
|
|
880
|
+
* Same, reading the tarball from a file and skipping `offset` leading
|
|
881
|
+
* bytes, so a cache entry is unpacked without loading it into the
|
|
882
|
+
* registry client's in-memory cache.
|
|
918
883
|
*/
|
|
919
|
-
async
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
if (this.workers.size < this.jobs) {
|
|
923
|
-
this.#createWorker(ur);
|
|
924
|
-
} else {
|
|
925
|
-
this.queue.push(ur);
|
|
884
|
+
async unpackFile(file, target, offset = 0) {
|
|
885
|
+
if (!syncUnpack) {
|
|
886
|
+
return unpack((await readFile(file)).subarray(offset), target);
|
|
926
887
|
}
|
|
927
|
-
|
|
888
|
+
unpackFileSync(file, target, offset);
|
|
928
889
|
}
|
|
929
890
|
};
|
|
930
891
|
export {
|
|
931
892
|
Pool,
|
|
932
|
-
UnpackRequest,
|
|
933
|
-
Worker,
|
|
934
|
-
isResponseOK,
|
|
935
893
|
unpack
|
|
936
894
|
};
|
|
@@ -11,11 +11,11 @@ import {createRequire as _vlt_createRequire} from "node:module";
|
|
|
11
11
|
var require = _vlt_createRequire(import.meta.filename);
|
|
12
12
|
import {
|
|
13
13
|
loadCommand
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-XEPCV7DP.js";
|
|
15
15
|
import {
|
|
16
16
|
Config
|
|
17
|
-
} from "./chunk-
|
|
18
|
-
import "./chunk-
|
|
17
|
+
} from "./chunk-EBXBZ2Y5.js";
|
|
18
|
+
import "./chunk-HRY5MJCA.js";
|
|
19
19
|
import "./chunk-ZWKI5OSF.js";
|
|
20
20
|
import {
|
|
21
21
|
flushAndExit,
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
outputCommand,
|
|
24
24
|
stderr,
|
|
25
25
|
stdout
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-MXCWH7WC.js";
|
|
27
27
|
import "./chunk-YAIKXFLN.js";
|
|
28
28
|
import "./chunk-G2YT2GWF.js";
|
|
29
29
|
import {
|
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
} from "./chunk-GDJ7JT2R.js";
|
|
32
32
|
import "./chunk-5JFRXIK2.js";
|
|
33
33
|
import "./chunk-WGDTG44V.js";
|
|
34
|
-
import "./chunk-
|
|
34
|
+
import "./chunk-USTJECVS.js";
|
|
35
35
|
import "./chunk-YOE3VZFX.js";
|
|
36
36
|
import "./chunk-XKVU23NC.js";
|
|
37
37
|
import {
|
|
@@ -45,9 +45,9 @@ import {
|
|
|
45
45
|
} from "./chunk-E74WGW5C.js";
|
|
46
46
|
import "./chunk-LPIBYUMT.js";
|
|
47
47
|
import "./chunk-UBLFPJHV.js";
|
|
48
|
+
import "./chunk-VFBCWAOC.js";
|
|
48
49
|
import "./chunk-XNLSTHDK.js";
|
|
49
50
|
import "./chunk-VE6CCH33.js";
|
|
50
|
-
import "./chunk-VFBCWAOC.js";
|
|
51
51
|
import "./chunk-WZWDS3W4.js";
|
|
52
52
|
import "./chunk-PZLD7RTK.js";
|
|
53
53
|
|
|
@@ -25,15 +25,15 @@ import {
|
|
|
25
25
|
normalizeRegistryKey,
|
|
26
26
|
registryBase,
|
|
27
27
|
setToken
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-ATYE2HQV.js";
|
|
29
29
|
import "./chunk-HAYXR3MW.js";
|
|
30
30
|
import "./chunk-E74WGW5C.js";
|
|
31
31
|
import "./chunk-LPIBYUMT.js";
|
|
32
32
|
import "./chunk-UBLFPJHV.js";
|
|
33
|
+
import "./chunk-VFBCWAOC.js";
|
|
33
34
|
import "./chunk-XNLSTHDK.js";
|
|
34
|
-
import "./chunk-
|
|
35
|
+
import "./chunk-BHJT53TP.js";
|
|
35
36
|
import "./chunk-VE6CCH33.js";
|
|
36
|
-
import "./chunk-VFBCWAOC.js";
|
|
37
37
|
import {
|
|
38
38
|
error
|
|
39
39
|
} 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
|
parseRemoveArgs
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-KCXN2GTX.js";
|
|
15
15
|
import {
|
|
16
16
|
uninstall
|
|
17
|
-
} from "./chunk-
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
17
|
+
} from "./chunk-LHMEJF6J.js";
|
|
18
|
+
import "./chunk-2YJ5MESP.js";
|
|
19
|
+
import "./chunk-USTJECVS.js";
|
|
20
20
|
import "./chunk-YOE3VZFX.js";
|
|
21
21
|
import {
|
|
22
22
|
commandUsage
|
|
@@ -30,10 +30,10 @@ import "./chunk-HTOTG4TS.js";
|
|
|
30
30
|
import "./chunk-E74WGW5C.js";
|
|
31
31
|
import "./chunk-LPIBYUMT.js";
|
|
32
32
|
import "./chunk-UBLFPJHV.js";
|
|
33
|
+
import "./chunk-VFBCWAOC.js";
|
|
33
34
|
import "./chunk-XNLSTHDK.js";
|
|
34
|
-
import "./chunk-
|
|
35
|
+
import "./chunk-BHJT53TP.js";
|
|
35
36
|
import "./chunk-VE6CCH33.js";
|
|
36
|
-
import "./chunk-VFBCWAOC.js";
|
|
37
37
|
import "./chunk-WZWDS3W4.js";
|
|
38
38
|
import "./chunk-PZLD7RTK.js";
|
|
39
39
|
|
|
@@ -21,17 +21,17 @@ import {
|
|
|
21
21
|
import "./chunk-XISRK3R5.js";
|
|
22
22
|
import {
|
|
23
23
|
RegistryClient
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-ATYE2HQV.js";
|
|
25
25
|
import "./chunk-HAYXR3MW.js";
|
|
26
26
|
import "./chunk-E74WGW5C.js";
|
|
27
27
|
import "./chunk-LPIBYUMT.js";
|
|
28
28
|
import "./chunk-UBLFPJHV.js";
|
|
29
|
-
import "./chunk-XNLSTHDK.js";
|
|
30
|
-
import "./chunk-BJBFEQRR.js";
|
|
31
|
-
import "./chunk-VE6CCH33.js";
|
|
32
29
|
import {
|
|
33
30
|
asError
|
|
34
31
|
} from "./chunk-VFBCWAOC.js";
|
|
32
|
+
import "./chunk-XNLSTHDK.js";
|
|
33
|
+
import "./chunk-BHJT53TP.js";
|
|
34
|
+
import "./chunk-VE6CCH33.js";
|
|
35
35
|
import {
|
|
36
36
|
error
|
|
37
37
|
} from "./chunk-WZWDS3W4.js";
|
|
@@ -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
|
update
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
14
|
+
} from "./chunk-LHMEJF6J.js";
|
|
15
|
+
import "./chunk-2YJ5MESP.js";
|
|
16
|
+
import "./chunk-USTJECVS.js";
|
|
17
17
|
import "./chunk-YOE3VZFX.js";
|
|
18
18
|
import {
|
|
19
19
|
commandUsage
|
|
@@ -27,10 +27,10 @@ import "./chunk-HTOTG4TS.js";
|
|
|
27
27
|
import "./chunk-E74WGW5C.js";
|
|
28
28
|
import "./chunk-LPIBYUMT.js";
|
|
29
29
|
import "./chunk-UBLFPJHV.js";
|
|
30
|
+
import "./chunk-VFBCWAOC.js";
|
|
30
31
|
import "./chunk-XNLSTHDK.js";
|
|
31
|
-
import "./chunk-
|
|
32
|
+
import "./chunk-BHJT53TP.js";
|
|
32
33
|
import "./chunk-VE6CCH33.js";
|
|
33
|
-
import "./chunk-VFBCWAOC.js";
|
|
34
34
|
import {
|
|
35
35
|
error
|
|
36
36
|
} from "./chunk-WZWDS3W4.js";
|
|
@@ -11,18 +11,18 @@ import {createRequire as _vlt_createRequire} from "node:module";
|
|
|
11
11
|
var require = _vlt_createRequire(import.meta.filename);
|
|
12
12
|
import {
|
|
13
13
|
createHostContextsMap
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-6NQBG3ZR.js";
|
|
15
15
|
import {
|
|
16
16
|
Query,
|
|
17
17
|
actual
|
|
18
|
-
} from "./chunk-
|
|
19
|
-
import "./chunk-
|
|
18
|
+
} from "./chunk-LHMEJF6J.js";
|
|
19
|
+
import "./chunk-2YJ5MESP.js";
|
|
20
20
|
import {
|
|
21
21
|
is,
|
|
22
22
|
isClean,
|
|
23
23
|
minimatch,
|
|
24
24
|
spawn
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-USTJECVS.js";
|
|
26
26
|
import "./chunk-YOE3VZFX.js";
|
|
27
27
|
import {
|
|
28
28
|
commandUsage
|
|
@@ -33,15 +33,15 @@ import "./chunk-HTOTG4TS.js";
|
|
|
33
33
|
import "./chunk-E74WGW5C.js";
|
|
34
34
|
import "./chunk-LPIBYUMT.js";
|
|
35
35
|
import "./chunk-UBLFPJHV.js";
|
|
36
|
-
import "./chunk-XNLSTHDK.js";
|
|
37
|
-
import "./chunk-BJBFEQRR.js";
|
|
38
|
-
import "./chunk-VE6CCH33.js";
|
|
39
36
|
import {
|
|
40
37
|
asError,
|
|
41
38
|
inc,
|
|
42
39
|
parse,
|
|
43
40
|
versionIncrements
|
|
44
41
|
} from "./chunk-VFBCWAOC.js";
|
|
42
|
+
import "./chunk-XNLSTHDK.js";
|
|
43
|
+
import "./chunk-BHJT53TP.js";
|
|
44
|
+
import "./chunk-VE6CCH33.js";
|
|
45
45
|
import {
|
|
46
46
|
error
|
|
47
47
|
} from "./chunk-WZWDS3W4.js";
|
|
@@ -14,12 +14,12 @@ import {
|
|
|
14
14
|
} from "./chunk-DBANBIL2.js";
|
|
15
15
|
import {
|
|
16
16
|
PackageInfoClient
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-HRY5MJCA.js";
|
|
18
18
|
import "./chunk-ZWKI5OSF.js";
|
|
19
19
|
import {
|
|
20
20
|
SecurityArchive
|
|
21
|
-
} from "./chunk-
|
|
22
|
-
import "./chunk-
|
|
21
|
+
} from "./chunk-2YJ5MESP.js";
|
|
22
|
+
import "./chunk-USTJECVS.js";
|
|
23
23
|
import {
|
|
24
24
|
getId
|
|
25
25
|
} from "./chunk-YOE3VZFX.js";
|
|
@@ -33,9 +33,10 @@ import "./chunk-XISRK3R5.js";
|
|
|
33
33
|
import "./chunk-HTOTG4TS.js";
|
|
34
34
|
import "./chunk-E74WGW5C.js";
|
|
35
35
|
import "./chunk-LPIBYUMT.js";
|
|
36
|
+
import "./chunk-UBLFPJHV.js";
|
|
37
|
+
import "./chunk-VFBCWAOC.js";
|
|
36
38
|
import "./chunk-XNLSTHDK.js";
|
|
37
39
|
import "./chunk-VE6CCH33.js";
|
|
38
|
-
import "./chunk-VFBCWAOC.js";
|
|
39
40
|
import {
|
|
40
41
|
error
|
|
41
42
|
} from "./chunk-WZWDS3W4.js";
|
package/vlr.js
CHANGED
|
@@ -12,7 +12,7 @@ import {createRequire as _vlt_createRequire} from "node:module";
|
|
|
12
12
|
var require = _vlt_createRequire(import.meta.filename);
|
|
13
13
|
import {
|
|
14
14
|
run
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-USRMYD4F.js";
|
|
16
16
|
import "./chunk-PZLD7RTK.js";
|
|
17
17
|
|
|
18
18
|
// ../build/src/bins/vlr.ts
|