vlt 1.6.0 → 1.6.2
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-AJ654YKY.js → access-LNHKSCBO.js} +5 -5
- package/{bugs-N73DVYHD.js → bugs-PSOZGCKG.js} +15 -14
- package/{build-VZ3EZKMM.js → build-GBIF54BN.js} +11 -11
- package/{cache-VROEWG2C.js → cache-XOYAGCIO.js} +10 -8
- package/cache-unzip-src-unzip.js +190 -3
- package/chunk-24DWRCPS.js +79 -0
- package/chunk-2CFNQ4QB.js +77 -0
- package/{chunk-LP3ORD3D.js → chunk-3RYVF2GG.js} +2 -2
- package/{chunk-LCLRP64K.js → chunk-3UDBYFAH.js} +104 -16
- package/{chunk-36UIE654.js → chunk-6BD4RCTR.js} +46 -16
- package/{chunk-Y5PA7DVK.js → chunk-6ETYWCJN.js} +197 -1
- package/{chunk-TQQO2F56.js → chunk-6ISFYONV.js} +3 -2
- package/{chunk-FXD3IV2S.js → chunk-AQJR7QDA.js} +1 -1
- package/{chunk-VLVMLSIF.js → chunk-BGOXKLQ6.js} +27 -27
- package/{chunk-KVWGMSPW.js → chunk-C75GDQFE.js} +18 -3
- package/{chunk-TWDSXQPN.js → chunk-FRX5IFFY.js} +4 -4
- package/{chunk-DBANBIL2.js → chunk-FZCPQWCJ.js} +1 -0
- package/{chunk-EMTGRCSE.js → chunk-GJMDZJPJ.js} +1 -1
- package/{chunk-GEQFMH5M.js → chunk-HHSPE2DS.js} +1 -1
- package/{chunk-YTDABXPD.js → chunk-JASG7RHB.js} +2 -2
- package/{chunk-JCNI6ZHH.js → chunk-JNPVOACH.js} +4 -4
- package/{chunk-ANW36H4T.js → chunk-JYYIWXJX.js} +1 -1
- package/{chunk-22LZBDEC.js → chunk-L65CG5LE.js} +1 -1
- package/{chunk-PDWPFR5T.js → chunk-LEMHGORE.js} +1 -1
- package/{chunk-JV5XR5JQ.js → chunk-MCQTGFJY.js} +1 -1
- package/{chunk-O6MQ7NN6.js → chunk-N4SU52H5.js} +1 -1
- package/{chunk-44AWMA4F.js → chunk-NB7QVWHU.js} +84 -16
- package/{chunk-N6HV7JWC.js → chunk-QFPAFVRR.js} +39 -67
- package/{chunk-DXED4ARV.js → chunk-QGLGNPCQ.js} +2 -2
- package/{chunk-PC2HOBAQ.js → chunk-QGUQZURY.js} +9 -4
- package/{chunk-RBQO54TG.js → chunk-TGPL6YRK.js} +2 -2
- package/{chunk-F5LZMLAQ.js → chunk-TQBSL35R.js} +19 -12
- package/{chunk-IXAMCWIT.js → chunk-XWA55GAN.js} +3 -3
- package/{chunk-GZVI75KX.js → chunk-XWVEIWTT.js} +1 -1
- package/{chunk-75HGJVNG.js → chunk-Y53EROVE.js} +5 -5
- package/{chunk-CYK6I4M6.js → chunk-Z63CXYQF.js} +1 -1
- package/{chunk-B6RIGNEO.js → chunk-ZESNN24A.js} +11 -1
- package/{ci-3BVMVQIT.js → ci-XSH7DZGD.js} +13 -13
- package/cli-package.json +1 -1
- package/{config-2KQV7N5A.js → config-6XFBWC3U.js} +8 -7
- package/{config-EKHBW6I5.js → config-C73FLGQV.js} +7 -6
- package/{create-QVHNOIV3.js → create-UNCQKKBS.js} +16 -15
- package/{deprecate-E254QBH6.js → deprecate-HCVFAVZD.js} +9 -8
- package/{dist-tag-SITRFD7O.js → dist-tag-WXLJRWFJ.js} +5 -5
- package/{docs-IDL2P7CA.js → docs-5EFY7ZHN.js} +15 -14
- package/{exec-7BK2W2WL.js → exec-EC5D5GE3.js} +16 -15
- package/{exec-cache-VY46L7DR.js → exec-cache-EMUFVFCJ.js} +14 -13
- package/{exec-local-D7R5T3DF.js → exec-local-L5H4M37T.js} +13 -13
- package/{help-RMRIEJQL.js → help-FUHVZ6UH.js} +1 -1
- package/{init-BGW4HJ6V.js → init-63M6W7N4.js} +11 -11
- package/{install-U5GATZ2N.js → install-IHQRULIE.js} +20 -19
- package/{list-3VG4M2XL.js → list-EDXNWJJR.js} +16 -16
- package/{login-PHQWI6S6.js → login-OD7E5AO5.js} +10 -9
- package/{logout-DJCOGRFF.js → logout-V2WJTQV2.js} +5 -5
- package/{outdated-JH3O6R3Y.js → outdated-7N7NGSSR.js} +15 -14
- package/{pack-U5W5YWHK.js → pack-TKJW7AEB.js} +12 -12
- package/package.json +1 -1
- package/{ping-EKX43AOW.js → ping-PVWRNSCX.js} +5 -5
- package/{pkg-SW5GMERT.js → pkg-PDP4XR5S.js} +13 -13
- package/{profile-UGDRDMQ6.js → profile-BP5EALWS.js} +5 -5
- package/{publish-HTWKK3NN.js → publish-HCICK5LY.js} +14 -14
- package/{query-YE3FUVGG.js → query-TZ3BPC4B.js} +16 -16
- package/registry-client-src-revalidate.js +304 -44
- package/{repo-WDOCU6SE.js → repo-BYOSXG5J.js} +15 -14
- package/{reporter-N5PAXB26.js → reporter-S6DDAHQL.js} +12 -11
- package/{run-IPARVIIQ.js → run-JAVVTY7B.js} +13 -13
- package/{run-exec-C4RTREEW.js → run-exec-GGENQDEW.js} +13 -13
- package/security-archive-src-update-expired.js +1 -1
- package/{setup-SYYUEHZL.js → setup-I6GLYILV.js} +13 -12
- package/{skills-UBBMSBDQ.js → skills-5V6HKMA7.js} +14 -13
- package/{skills-KA2VR5Q5.js → skills-QOFA6XMM.js} +6 -6
- package/{src-FUSTSM4J.js → src-74IKO7PC.js} +12 -8
- package/src-GY57R4DK.js +659 -0
- package/{src-QO5G2S4O.js → src-REZNPR2X.js} +5 -5
- package/tar-src-placement-worker.js +6426 -0
- package/{token-UQNABECH.js → token-JEAMCRK6.js} +5 -5
- package/{uninstall-FHBJ3OUV.js → uninstall-WA4FJFVA.js} +14 -14
- package/{unpublish-APJTEUBA.js → unpublish-SG3J524L.js} +5 -5
- package/{update-NWZTL4S7.js → update-Y3KY2DZD.js} +15 -14
- package/{version-EMKKTL77.js → version-QBEPMA7Q.js} +11 -11
- package/{view-BUUI33RV.js → view-FYRF3SLJ.js} +9 -8
- 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-F6BSXGQ2.js → whoami-XSQ6SOIC.js} +5 -5
- package/chunk-4E65BBTM.js +0 -77
- package/src-W2VQULRG.js +0 -285
|
@@ -19,17 +19,17 @@ import "./chunk-EFHOWRKU.js";
|
|
|
19
19
|
import "./chunk-6D3QAFNZ.js";
|
|
20
20
|
import {
|
|
21
21
|
RegistryClient
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-NB7QVWHU.js";
|
|
23
23
|
import "./chunk-QNHBAGXQ.js";
|
|
24
|
-
import "./chunk-
|
|
24
|
+
import "./chunk-HHSPE2DS.js";
|
|
25
25
|
import {
|
|
26
26
|
assertOk
|
|
27
27
|
} from "./chunk-4GMNWW4C.js";
|
|
28
28
|
import "./chunk-SUU2WETN.js";
|
|
29
|
-
import "./chunk-
|
|
29
|
+
import "./chunk-ZESNN24A.js";
|
|
30
30
|
import "./chunk-XNLSTHDK.js";
|
|
31
|
-
import "./chunk-
|
|
32
|
-
import "./chunk-
|
|
31
|
+
import "./chunk-LEMHGORE.js";
|
|
32
|
+
import "./chunk-6ETYWCJN.js";
|
|
33
33
|
import "./chunk-BF5DRGRZ.js";
|
|
34
34
|
import {
|
|
35
35
|
error
|
|
@@ -14,20 +14,20 @@ import {
|
|
|
14
14
|
} from "./chunk-CLVRCGOZ.js";
|
|
15
15
|
import {
|
|
16
16
|
openUrl
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-L65CG5LE.js";
|
|
18
18
|
import {
|
|
19
19
|
createHostContextsMap
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-JNPVOACH.js";
|
|
21
21
|
import {
|
|
22
22
|
actual
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-6BD4RCTR.js";
|
|
24
24
|
import {
|
|
25
25
|
Query
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-TQBSL35R.js";
|
|
27
27
|
import {
|
|
28
28
|
SecurityArchive
|
|
29
|
-
} from "./chunk-
|
|
30
|
-
import "./chunk-
|
|
29
|
+
} from "./chunk-JASG7RHB.js";
|
|
30
|
+
import "./chunk-C75GDQFE.js";
|
|
31
31
|
import "./chunk-LGQVZTYR.js";
|
|
32
32
|
import "./chunk-EYGOEAJM.js";
|
|
33
33
|
import {
|
|
@@ -35,11 +35,11 @@ import {
|
|
|
35
35
|
} from "./chunk-HT6FS4VB.js";
|
|
36
36
|
import {
|
|
37
37
|
PackageInfoClient
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-3UDBYFAH.js";
|
|
39
39
|
import "./chunk-SRWDPPLX.js";
|
|
40
|
-
import "./chunk-
|
|
41
|
-
import "./chunk-
|
|
42
|
-
import "./chunk-
|
|
40
|
+
import "./chunk-MCQTGFJY.js";
|
|
41
|
+
import "./chunk-GJMDZJPJ.js";
|
|
42
|
+
import "./chunk-6ISFYONV.js";
|
|
43
43
|
import "./chunk-4KCU2KZL.js";
|
|
44
44
|
import "./chunk-WGDTG44V.js";
|
|
45
45
|
import "./chunk-E74WGW5C.js";
|
|
@@ -53,13 +53,14 @@ import {
|
|
|
53
53
|
} from "./chunk-6D3QAFNZ.js";
|
|
54
54
|
import "./chunk-HTOTG4TS.js";
|
|
55
55
|
import "./chunk-QNHBAGXQ.js";
|
|
56
|
-
import "./chunk-
|
|
56
|
+
import "./chunk-HHSPE2DS.js";
|
|
57
57
|
import "./chunk-4GMNWW4C.js";
|
|
58
58
|
import "./chunk-SUU2WETN.js";
|
|
59
|
-
import "./chunk-
|
|
59
|
+
import "./chunk-ZESNN24A.js";
|
|
60
60
|
import "./chunk-XNLSTHDK.js";
|
|
61
|
-
import "./chunk-
|
|
62
|
-
import "./chunk-
|
|
61
|
+
import "./chunk-24DWRCPS.js";
|
|
62
|
+
import "./chunk-LEMHGORE.js";
|
|
63
|
+
import "./chunk-6ETYWCJN.js";
|
|
63
64
|
import "./chunk-BF5DRGRZ.js";
|
|
64
65
|
import {
|
|
65
66
|
error
|
|
@@ -12,9 +12,9 @@ var require = _vlt_createRequire(import.meta.filename);
|
|
|
12
12
|
import {
|
|
13
13
|
actual,
|
|
14
14
|
build
|
|
15
|
-
} from "./chunk-
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
15
|
+
} from "./chunk-6BD4RCTR.js";
|
|
16
|
+
import "./chunk-TQBSL35R.js";
|
|
17
|
+
import "./chunk-JASG7RHB.js";
|
|
18
18
|
import {
|
|
19
19
|
commandUsage
|
|
20
20
|
} from "./chunk-HT6FS4VB.js";
|
|
@@ -22,11 +22,11 @@ import {
|
|
|
22
22
|
globalBinsLines,
|
|
23
23
|
linkGlobalBins,
|
|
24
24
|
resolveGlobalBinDir
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-N4SU52H5.js";
|
|
26
26
|
import "./chunk-BH5CVXNY.js";
|
|
27
|
-
import "./chunk-
|
|
28
|
-
import "./chunk-
|
|
29
|
-
import "./chunk-
|
|
27
|
+
import "./chunk-MCQTGFJY.js";
|
|
28
|
+
import "./chunk-GJMDZJPJ.js";
|
|
29
|
+
import "./chunk-6ISFYONV.js";
|
|
30
30
|
import "./chunk-GCTREKA4.js";
|
|
31
31
|
import "./chunk-MCDLJZXT.js";
|
|
32
32
|
import "./chunk-7M2VTFLP.js";
|
|
@@ -34,12 +34,12 @@ import "./chunk-EFHOWRKU.js";
|
|
|
34
34
|
import "./chunk-CAV7FKWQ.js";
|
|
35
35
|
import "./chunk-6D3QAFNZ.js";
|
|
36
36
|
import "./chunk-HTOTG4TS.js";
|
|
37
|
-
import "./chunk-
|
|
37
|
+
import "./chunk-HHSPE2DS.js";
|
|
38
38
|
import "./chunk-SUU2WETN.js";
|
|
39
|
-
import "./chunk-
|
|
39
|
+
import "./chunk-ZESNN24A.js";
|
|
40
40
|
import "./chunk-XNLSTHDK.js";
|
|
41
|
-
import "./chunk-
|
|
42
|
-
import "./chunk-
|
|
41
|
+
import "./chunk-LEMHGORE.js";
|
|
42
|
+
import "./chunk-6ETYWCJN.js";
|
|
43
43
|
import {
|
|
44
44
|
isErrorWithCause
|
|
45
45
|
} from "./chunk-BF5DRGRZ.js";
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
import {
|
|
16
16
|
stderr,
|
|
17
17
|
stdout
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-C75GDQFE.js";
|
|
19
19
|
import "./chunk-LGQVZTYR.js";
|
|
20
20
|
import "./chunk-EYGOEAJM.js";
|
|
21
21
|
import {
|
|
@@ -36,17 +36,16 @@ import {
|
|
|
36
36
|
} from "./chunk-6D3QAFNZ.js";
|
|
37
37
|
import {
|
|
38
38
|
CacheEntry
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-NB7QVWHU.js";
|
|
40
40
|
import "./chunk-QNHBAGXQ.js";
|
|
41
|
-
import "./chunk-
|
|
41
|
+
import "./chunk-HHSPE2DS.js";
|
|
42
42
|
import {
|
|
43
43
|
assertOk
|
|
44
44
|
} from "./chunk-4GMNWW4C.js";
|
|
45
45
|
import "./chunk-SUU2WETN.js";
|
|
46
|
-
import "./chunk-
|
|
46
|
+
import "./chunk-ZESNN24A.js";
|
|
47
47
|
import "./chunk-XNLSTHDK.js";
|
|
48
48
|
import {
|
|
49
|
-
readStoreIndex,
|
|
50
49
|
removeStoreEntry,
|
|
51
50
|
storeEntryCopied,
|
|
52
51
|
storeEntryLastCopied,
|
|
@@ -54,9 +53,12 @@ import {
|
|
|
54
53
|
storeEntryNames,
|
|
55
54
|
storeEntryTime,
|
|
56
55
|
verifyStoreEntry
|
|
57
|
-
} from "./chunk-
|
|
58
|
-
import
|
|
59
|
-
|
|
56
|
+
} from "./chunk-QFPAFVRR.js";
|
|
57
|
+
import {
|
|
58
|
+
readStoreIndex
|
|
59
|
+
} from "./chunk-24DWRCPS.js";
|
|
60
|
+
import "./chunk-LEMHGORE.js";
|
|
61
|
+
import "./chunk-6ETYWCJN.js";
|
|
60
62
|
import {
|
|
61
63
|
integrityHex
|
|
62
64
|
} from "./chunk-BF5DRGRZ.js";
|
package/cache-unzip-src-unzip.js
CHANGED
|
@@ -6964,6 +6964,193 @@ import {
|
|
|
6964
6964
|
unzipSync as unzipSyncCB
|
|
6965
6965
|
} from "node:zlib";
|
|
6966
6966
|
|
|
6967
|
+
// ../../src/output/src/trace.ts
|
|
6968
|
+
import { appendFileSync } from "node:fs";
|
|
6969
|
+
import { monitorEventLoopDelay, performance as performance2 } from "node:perf_hooks";
|
|
6970
|
+
import { threadId as ownThreadId } from "node:worker_threads";
|
|
6971
|
+
var sharedNow = () => performance2.timeOrigin + performance2.now();
|
|
6972
|
+
var defaultAppend = (file, data) => appendFileSync(file, data, { mode: 384 });
|
|
6973
|
+
var defaultWrite = (line) => process.stderr.write(line + "\n");
|
|
6974
|
+
var Tracer = class _Tracer {
|
|
6975
|
+
enabled;
|
|
6976
|
+
file;
|
|
6977
|
+
phases;
|
|
6978
|
+
#tid;
|
|
6979
|
+
#now;
|
|
6980
|
+
#append;
|
|
6981
|
+
#write;
|
|
6982
|
+
#flushLines;
|
|
6983
|
+
#flushMs;
|
|
6984
|
+
#buffer = [];
|
|
6985
|
+
#timer;
|
|
6986
|
+
#sampler;
|
|
6987
|
+
#marks = [];
|
|
6988
|
+
#start;
|
|
6989
|
+
#loop;
|
|
6990
|
+
#closed = false;
|
|
6991
|
+
constructor(options = {}) {
|
|
6992
|
+
this.file = options.file || void 0;
|
|
6993
|
+
this.phases = !!options.phases;
|
|
6994
|
+
this.enabled = !!this.file || this.phases;
|
|
6995
|
+
this.#tid = options.threadId ?? ownThreadId;
|
|
6996
|
+
this.#now = options.now ?? sharedNow;
|
|
6997
|
+
this.#append = options.append ?? defaultAppend;
|
|
6998
|
+
this.#write = options.write ?? defaultWrite;
|
|
6999
|
+
this.#flushLines = options.flushLines ?? 200;
|
|
7000
|
+
this.#flushMs = options.flushMs ?? 50;
|
|
7001
|
+
this.#start = this.#now();
|
|
7002
|
+
if (!this.enabled) return;
|
|
7003
|
+
const main2 = options.main ?? this.#tid === 0;
|
|
7004
|
+
if (main2) {
|
|
7005
|
+
this.#loop = monitorEventLoopDelay({ resolution: 20 });
|
|
7006
|
+
this.#loop.enable();
|
|
7007
|
+
const sampleMs = options.sampleMs ?? 20;
|
|
7008
|
+
if (this.file && sampleMs > 0) {
|
|
7009
|
+
this.#sampler = setInterval(() => this.sample(), sampleMs);
|
|
7010
|
+
this.#sampler.unref();
|
|
7011
|
+
}
|
|
7012
|
+
process.once("exit", () => this.close());
|
|
7013
|
+
}
|
|
7014
|
+
this.trace("open", { pid: process.pid });
|
|
7015
|
+
}
|
|
7016
|
+
/**
|
|
7017
|
+
* Build a tracer from the environment: `VLT_TRACE` names the file,
|
|
7018
|
+
* `VLT_PHASES` (any value but `0` or empty) asks for the summary.
|
|
7019
|
+
*/
|
|
7020
|
+
static fromEnv(env = process.env, options = {}) {
|
|
7021
|
+
const phases = env.VLT_PHASES;
|
|
7022
|
+
return new _Tracer({
|
|
7023
|
+
...options,
|
|
7024
|
+
file: env.VLT_TRACE,
|
|
7025
|
+
phases: !!phases && phases !== "0"
|
|
7026
|
+
});
|
|
7027
|
+
}
|
|
7028
|
+
/** Record one event. */
|
|
7029
|
+
trace(ev, fields) {
|
|
7030
|
+
if (!this.file || this.#closed) return;
|
|
7031
|
+
const event = { t: this.#now(), tid: this.#tid, ev };
|
|
7032
|
+
if (fields) {
|
|
7033
|
+
for (const [k3, v2] of Object.entries(fields)) {
|
|
7034
|
+
if (v2 !== void 0) event[k3] = v2;
|
|
7035
|
+
}
|
|
7036
|
+
}
|
|
7037
|
+
this.#buffer.push(JSON.stringify(event));
|
|
7038
|
+
if (this.#buffer.length >= this.#flushLines) this.flush();
|
|
7039
|
+
else if (!this.#timer) {
|
|
7040
|
+
this.#timer = setTimeout(() => this.flush(), this.#flushMs);
|
|
7041
|
+
this.#timer.unref();
|
|
7042
|
+
}
|
|
7043
|
+
}
|
|
7044
|
+
/**
|
|
7045
|
+
* Record a `<ev>:start` event now and return a function that records
|
|
7046
|
+
* `<ev>:end` with the elapsed `ms` (plus any fields it is given). The
|
|
7047
|
+
* same `fields` are stamped on both ends so the two can be paired.
|
|
7048
|
+
*/
|
|
7049
|
+
span(ev, fields) {
|
|
7050
|
+
if (!this.file) return noop;
|
|
7051
|
+
const t0 = this.#now();
|
|
7052
|
+
this.trace(`${ev}:start`, fields);
|
|
7053
|
+
return (end) => this.trace(`${ev}:end`, {
|
|
7054
|
+
...fields,
|
|
7055
|
+
...end,
|
|
7056
|
+
ms: Math.round((this.#now() - t0) * 1e3) / 1e3
|
|
7057
|
+
});
|
|
7058
|
+
}
|
|
7059
|
+
/**
|
|
7060
|
+
* Mark the start of a phase. The summary reports the ms between each
|
|
7061
|
+
* mark and the next one, and the trace records a `phase` event.
|
|
7062
|
+
*/
|
|
7063
|
+
mark(name2, fields) {
|
|
7064
|
+
if (!this.enabled) return;
|
|
7065
|
+
this.#marks.push({ name: name2, t: this.#now() });
|
|
7066
|
+
this.trace("phase", { ...fields, name: name2 });
|
|
7067
|
+
}
|
|
7068
|
+
/**
|
|
7069
|
+
* Record how busy a resource lane is: how many jobs it is running and
|
|
7070
|
+
* how many are waiting for a slot. The report derives idle time per
|
|
7071
|
+
* lane from these.
|
|
7072
|
+
*/
|
|
7073
|
+
lane(name2, busy, queued) {
|
|
7074
|
+
if (!this.file) return;
|
|
7075
|
+
this.trace("lane", { name: name2, busy, queued });
|
|
7076
|
+
}
|
|
7077
|
+
/** Record a memory sample. */
|
|
7078
|
+
sample() {
|
|
7079
|
+
if (!this.file) return;
|
|
7080
|
+
const m = process.memoryUsage();
|
|
7081
|
+
this.trace("rss", {
|
|
7082
|
+
rss: m.rss,
|
|
7083
|
+
heap: m.heapUsed,
|
|
7084
|
+
ext: m.external,
|
|
7085
|
+
ab: m.arrayBuffers
|
|
7086
|
+
});
|
|
7087
|
+
}
|
|
7088
|
+
/** Write buffered lines to the file. */
|
|
7089
|
+
flush() {
|
|
7090
|
+
if (this.#timer) {
|
|
7091
|
+
clearTimeout(this.#timer);
|
|
7092
|
+
this.#timer = void 0;
|
|
7093
|
+
}
|
|
7094
|
+
if (!this.file || !this.#buffer.length) return;
|
|
7095
|
+
const data = this.#buffer.join("\n") + "\n";
|
|
7096
|
+
this.#buffer = [];
|
|
7097
|
+
try {
|
|
7098
|
+
this.#append(this.file, data);
|
|
7099
|
+
} catch {
|
|
7100
|
+
}
|
|
7101
|
+
}
|
|
7102
|
+
/**
|
|
7103
|
+
* The one-line phase summary, or undefined when phases are off. Each
|
|
7104
|
+
* phase is reported as the ms from its mark to the next mark (or to
|
|
7105
|
+
* now, for the last one).
|
|
7106
|
+
*/
|
|
7107
|
+
summary() {
|
|
7108
|
+
if (!this.phases) return void 0;
|
|
7109
|
+
const now = this.#now();
|
|
7110
|
+
const parts = [];
|
|
7111
|
+
for (const [i, m] of this.#marks.entries()) {
|
|
7112
|
+
const next = this.#marks[i + 1]?.t ?? now;
|
|
7113
|
+
parts.push(`${m.name}=${Math.round(next - m.t)}`);
|
|
7114
|
+
}
|
|
7115
|
+
parts.push(`total=${Math.round(now - this.#start)}`);
|
|
7116
|
+
if (this.#loop) {
|
|
7117
|
+
const ms2 = (n7) => Math.round(n7 / 1e6);
|
|
7118
|
+
parts.push(
|
|
7119
|
+
`loop p50=${ms2(this.#loop.percentile(50))} p99=${ms2(this.#loop.percentile(99))} max=${ms2(this.#loop.max)}`
|
|
7120
|
+
);
|
|
7121
|
+
}
|
|
7122
|
+
const { maxRSS } = process.resourceUsage();
|
|
7123
|
+
parts.push(`maxrss=${Math.round(maxRSS / 1024)}MB`);
|
|
7124
|
+
return `PHASES ${parts.join(" ")}`;
|
|
7125
|
+
}
|
|
7126
|
+
/**
|
|
7127
|
+
* Stop sampling, flush, and print the summary. Runs at process exit
|
|
7128
|
+
* on the main thread; safe to call more than once.
|
|
7129
|
+
*/
|
|
7130
|
+
close() {
|
|
7131
|
+
if (this.#closed) return;
|
|
7132
|
+
if (this.#sampler) clearInterval(this.#sampler);
|
|
7133
|
+
if (this.enabled) {
|
|
7134
|
+
if (this.#loop) {
|
|
7135
|
+
this.#loop.disable();
|
|
7136
|
+
this.trace("exit", {
|
|
7137
|
+
loopP50: Math.round(this.#loop.percentile(50) / 1e6),
|
|
7138
|
+
loopP99: Math.round(this.#loop.percentile(99) / 1e6),
|
|
7139
|
+
loopMax: Math.round(this.#loop.max / 1e6),
|
|
7140
|
+
maxrss: process.resourceUsage().maxRSS
|
|
7141
|
+
});
|
|
7142
|
+
}
|
|
7143
|
+
const line = this.summary();
|
|
7144
|
+
this.flush();
|
|
7145
|
+
if (line) this.#write(line);
|
|
7146
|
+
}
|
|
7147
|
+
this.#closed = true;
|
|
7148
|
+
}
|
|
7149
|
+
};
|
|
7150
|
+
var noop = () => {
|
|
7151
|
+
};
|
|
7152
|
+
var tracer = Tracer.fromEnv();
|
|
7153
|
+
|
|
6967
7154
|
// ../../src/tar/src/find-tar-dir.ts
|
|
6968
7155
|
var findTarDir = (path, tarDir) => {
|
|
6969
7156
|
if (tarDir !== void 0) return tarDir;
|
|
@@ -7242,7 +7429,7 @@ import {
|
|
|
7242
7429
|
writeFileSync as writeFileSync2
|
|
7243
7430
|
} from "node:fs";
|
|
7244
7431
|
import { join as join2 } from "node:path";
|
|
7245
|
-
import { performance as
|
|
7432
|
+
import { performance as performance3 } from "node:perf_hooks";
|
|
7246
7433
|
import { debuglog as debuglog3 } from "node:util";
|
|
7247
7434
|
var debug3 = debuglog3("vlt");
|
|
7248
7435
|
var linkers = /* @__PURE__ */ new Set(["auto", "hardlink", "clone", "copy"]);
|
|
@@ -7313,7 +7500,7 @@ var explodeEntry = (store, buf, format) => {
|
|
|
7313
7500
|
};
|
|
7314
7501
|
var explode = async (cache, store, keys, integrities) => {
|
|
7315
7502
|
if (!storeEnabled()) return;
|
|
7316
|
-
const start =
|
|
7503
|
+
const start = performance3.now();
|
|
7317
7504
|
const s = {
|
|
7318
7505
|
exploded: /* @__PURE__ */ new Set(),
|
|
7319
7506
|
written: 0,
|
|
@@ -7355,7 +7542,7 @@ var explode = async (cache, store, keys, integrities) => {
|
|
|
7355
7542
|
keys.length
|
|
7356
7543
|
);
|
|
7357
7544
|
await Promise.all(Array.from({ length: lanes }, lane));
|
|
7358
|
-
s.ms = Math.round(
|
|
7545
|
+
s.ms = Math.round(performance3.now() - start);
|
|
7359
7546
|
debug3(
|
|
7360
7547
|
"global store: explode written=%d skipped=%d ignored=%d failed=%d bytes=%d ms=%d",
|
|
7361
7548
|
s.written,
|
|
@@ -0,0 +1,79 @@
|
|
|
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
|
+
isManifest,
|
|
14
|
+
normalizeBinPaths
|
|
15
|
+
} from "./chunk-BF5DRGRZ.js";
|
|
16
|
+
import {
|
|
17
|
+
error
|
|
18
|
+
} from "./chunk-WZWDS3W4.js";
|
|
19
|
+
|
|
20
|
+
// ../../src/tar/src/store-index.ts
|
|
21
|
+
import { readFileSync } from "node:fs";
|
|
22
|
+
import { debuglog } from "node:util";
|
|
23
|
+
var debug = debuglog("vlt");
|
|
24
|
+
var storeIndexPath = (storeEntry) => storeEntry + ".json";
|
|
25
|
+
var isRecord = (x) => !!x && typeof x === "object" && !Array.isArray(x);
|
|
26
|
+
var isOptString = (x) => x === void 0 || typeof x === "string";
|
|
27
|
+
var unsafePath = /(?:^|\/)\.{0,2}(?:\/|$)|\\/;
|
|
28
|
+
var isRelPath = (p) => typeof p === "string" && !unsafePath.test(p);
|
|
29
|
+
var isIndexFile = (f) => Array.isArray(f) && f.length === 3 && isRelPath(f[0]) && typeof f[1] === "number" && (f[2] === 0 || f[2] === 1);
|
|
30
|
+
var isStoreIndex = (x) => isRecord(x) && x.v === 1 && typeof x.scripts === "boolean" && isOptString(x.name) && isOptString(x.version) && (x.bins === void 0 || isRecord(x.bins) && Object.values(x.bins).every((b) => typeof b === "string")) && Array.isArray(x.dirs) && x.dirs.every(isRelPath) && Array.isArray(x.files) && x.files.every(isIndexFile) && isOptString(x.manifest);
|
|
31
|
+
var readStoreIndex = (storeEntry) => {
|
|
32
|
+
let index;
|
|
33
|
+
try {
|
|
34
|
+
index = JSON.parse(
|
|
35
|
+
readFileSync(storeIndexPath(storeEntry), "utf8")
|
|
36
|
+
);
|
|
37
|
+
} catch (er) {
|
|
38
|
+
if (er.code !== "ENOENT") {
|
|
39
|
+
debug("global store: invalid index", storeEntry);
|
|
40
|
+
}
|
|
41
|
+
return void 0;
|
|
42
|
+
}
|
|
43
|
+
if (isStoreIndex(index)) return index;
|
|
44
|
+
debug("global store: invalid index", storeEntry);
|
|
45
|
+
return void 0;
|
|
46
|
+
};
|
|
47
|
+
var storeIndexManifest = (packageJson, bindingGyp) => {
|
|
48
|
+
let pkg;
|
|
49
|
+
try {
|
|
50
|
+
pkg = JSON.parse(
|
|
51
|
+
packageJson.toString("utf8").replace(/^\uFEFF/, "")
|
|
52
|
+
);
|
|
53
|
+
} catch (cause) {
|
|
54
|
+
throw error("invalid package.json in tarball", { cause });
|
|
55
|
+
}
|
|
56
|
+
if (!isRecord(pkg)) {
|
|
57
|
+
throw error("invalid package.json in tarball", { found: pkg });
|
|
58
|
+
}
|
|
59
|
+
const { name, version, scripts, bin } = pkg;
|
|
60
|
+
const s = isRecord(scripts) ? scripts : {};
|
|
61
|
+
const result = {
|
|
62
|
+
scripts: !!(s.install || s.preinstall || s.postinstall) || bindingGyp
|
|
63
|
+
};
|
|
64
|
+
const bins = normalizeBinPaths({
|
|
65
|
+
name: typeof name === "string" ? name : void 0,
|
|
66
|
+
bin
|
|
67
|
+
});
|
|
68
|
+
if (bins && Object.keys(bins).length) result.bins = bins;
|
|
69
|
+
if (typeof name === "string") result.name = name;
|
|
70
|
+
if (typeof version === "string") result.version = version;
|
|
71
|
+
if (isManifest(pkg)) result.manifest = JSON.stringify(pkg);
|
|
72
|
+
return result;
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
export {
|
|
76
|
+
storeIndexPath,
|
|
77
|
+
readStoreIndex,
|
|
78
|
+
storeIndexManifest
|
|
79
|
+
};
|
|
@@ -0,0 +1,77 @@
|
|
|
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-LNHKSCBO.js"),
|
|
22
|
+
"./commands/bugs.ts": () => import("./bugs-PSOZGCKG.js"),
|
|
23
|
+
"./commands/build.ts": () => import("./build-GBIF54BN.js"),
|
|
24
|
+
"./commands/cache.ts": () => import("./cache-XOYAGCIO.js"),
|
|
25
|
+
"./commands/ci.ts": () => import("./ci-XSH7DZGD.js"),
|
|
26
|
+
"./commands/config.ts": () => import("./config-6XFBWC3U.js"),
|
|
27
|
+
"./commands/create.ts": () => import("./create-UNCQKKBS.js"),
|
|
28
|
+
"./commands/deprecate.ts": () => import("./deprecate-HCVFAVZD.js"),
|
|
29
|
+
"./commands/dist-tag.ts": () => import("./dist-tag-WXLJRWFJ.js"),
|
|
30
|
+
"./commands/docs.ts": () => import("./docs-5EFY7ZHN.js"),
|
|
31
|
+
"./commands/exec-cache.ts": () => import("./exec-cache-EMUFVFCJ.js"),
|
|
32
|
+
"./commands/exec-local.ts": () => import("./exec-local-L5H4M37T.js"),
|
|
33
|
+
"./commands/exec.ts": () => import("./exec-EC5D5GE3.js"),
|
|
34
|
+
"./commands/help.ts": () => import("./help-FUHVZ6UH.js"),
|
|
35
|
+
"./commands/init.ts": () => import("./init-63M6W7N4.js"),
|
|
36
|
+
"./commands/install.ts": () => import("./install-IHQRULIE.js"),
|
|
37
|
+
"./commands/install/reporter.ts": () => import("./reporter-S6DDAHQL.js"),
|
|
38
|
+
"./commands/list.ts": () => import("./list-EDXNWJJR.js"),
|
|
39
|
+
"./commands/login.ts": () => import("./login-OD7E5AO5.js"),
|
|
40
|
+
"./commands/logout.ts": () => import("./logout-V2WJTQV2.js"),
|
|
41
|
+
"./commands/outdated.ts": () => import("./outdated-7N7NGSSR.js"),
|
|
42
|
+
"./commands/pack.ts": () => import("./pack-TKJW7AEB.js"),
|
|
43
|
+
"./commands/ping.ts": () => import("./ping-PVWRNSCX.js"),
|
|
44
|
+
"./commands/pkg.ts": () => import("./pkg-PDP4XR5S.js"),
|
|
45
|
+
"./commands/profile.ts": () => import("./profile-BP5EALWS.js"),
|
|
46
|
+
"./commands/publish.ts": () => import("./publish-HCICK5LY.js"),
|
|
47
|
+
"./commands/query.ts": () => import("./query-TZ3BPC4B.js"),
|
|
48
|
+
"./commands/registry.ts": () => import("./registry-ZGGWVLBM.js"),
|
|
49
|
+
"./commands/repo.ts": () => import("./repo-BYOSXG5J.js"),
|
|
50
|
+
"./commands/run-exec.ts": () => import("./run-exec-GGENQDEW.js"),
|
|
51
|
+
"./commands/run.ts": () => import("./run-JAVVTY7B.js"),
|
|
52
|
+
"./commands/setup.ts": () => import("./setup-I6GLYILV.js"),
|
|
53
|
+
"./commands/skills.ts": () => import("./skills-5V6HKMA7.js"),
|
|
54
|
+
"./commands/token.ts": () => import("./token-JEAMCRK6.js"),
|
|
55
|
+
"./commands/uninstall.ts": () => import("./uninstall-WA4FJFVA.js"),
|
|
56
|
+
"./commands/unpublish.ts": () => import("./unpublish-SG3J524L.js"),
|
|
57
|
+
"./commands/update.ts": () => import("./update-Y3KY2DZD.js"),
|
|
58
|
+
"./commands/version.ts": () => import("./version-QBEPMA7Q.js"),
|
|
59
|
+
"./commands/view.ts": () => import("./view-FYRF3SLJ.js"),
|
|
60
|
+
"./commands/whoami.ts": () => import("./whoami-XSQ6SOIC.js")
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
// ../../src/cli-sdk/src/load-command.ts
|
|
64
|
+
var loadCommand = async (command) => {
|
|
65
|
+
try {
|
|
66
|
+
return await globImport_commands_ts(`./commands/${command}.ts`);
|
|
67
|
+
} catch (e) {
|
|
68
|
+
throw error("Could not load command", {
|
|
69
|
+
found: command,
|
|
70
|
+
cause: e
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
export {
|
|
76
|
+
loadCommand
|
|
77
|
+
};
|
|
@@ -11,13 +11,13 @@ 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-
|
|
14
|
+
} from "./chunk-3UDBYFAH.js";
|
|
15
15
|
import {
|
|
16
16
|
Monorepo,
|
|
17
17
|
PackageJson,
|
|
18
18
|
PathScurry,
|
|
19
19
|
workspaceCache
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-6ISFYONV.js";
|
|
21
21
|
import {
|
|
22
22
|
ensureGlobalProject,
|
|
23
23
|
globalCommands
|