@vltpkg/cli-js 1.1.1 → 1.3.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.
- package/{access-YYMAAPHV.js → access-HIVJOWXZ.js} +10 -10
- package/{bugs-RK5JBPSC.js → bugs-2KFUYMPS.js} +19 -19
- package/{build-DVJSYCNF.js → build-CX6YZ4LS.js} +12 -12
- package/{cache-JKQNGZ7L.js → cache-I6L5ZRGD.js} +145 -16
- package/cache-unzip-src-unzip.js +2953 -164
- package/{src-MOKZQTH2.js → chunk-263MHLR3.js} +299 -43
- package/{chunk-3LUM7NX5.js → chunk-2HXJ4ZSF.js} +3 -3
- package/{chunk-GDJ7JT2R.js → chunk-33HBY5CF.js} +1 -1
- package/{chunk-MZA6N2TA.js → chunk-C6LK7C3L.js} +4 -4
- package/{chunk-34TE4HZS.js → chunk-CU752KW7.js} +2 -2
- package/{chunk-2PWSMJD7.js → chunk-D2LEK7VS.js} +1 -1
- package/{chunk-CEHPRPGQ.js → chunk-ENSGPOLR.js} +46 -0
- package/{chunk-V4YCZZHY.js → chunk-EP7AVBIO.js} +16 -8
- package/{chunk-DS7YMIHP.js → chunk-FHMIECHI.js} +158 -59
- package/chunk-GDV5LSQ2.js +75 -0
- package/{chunk-BWEH7DHQ.js → chunk-HCZOVC3Y.js} +1 -1
- package/{chunk-CBASIDQH.js → chunk-I6QGYSB4.js} +1 -1
- package/{chunk-KDF7PEBY.js → chunk-ILRJWH6A.js} +5 -5
- package/{chunk-JZJWASXL.js → chunk-J2WL3A3C.js} +134 -68
- package/{chunk-YOE3VZFX.js → chunk-J3R4XWB3.js} +2 -2
- package/{chunk-DF5K4CYR.js → chunk-JFHEXCG5.js} +5 -5
- package/{chunk-LR42WTKN.js → chunk-MJWUULO6.js} +14 -12
- package/{chunk-QQYTPGIL.js → chunk-N4RCKCHY.js} +1 -1
- package/{chunk-X2AWQGYG.js → chunk-P4LLYWCG.js} +112 -23
- package/{chunk-BHJT53TP.js → chunk-PDWPFR5T.js} +1 -1
- package/{chunk-XIF734VO.js → chunk-QETVMIIT.js} +4 -4
- package/{chunk-WE2TQN32.js → chunk-QWJDHBV7.js} +4 -3
- package/{chunk-VFBCWAOC.js → chunk-RH2Y7MPW.js} +29 -0
- package/{chunk-LN2A74PF.js → chunk-SVMH3NDM.js} +277 -50
- package/{chunk-DR4Z63B6.js → chunk-TYLYZKVA.js} +14 -11
- package/{chunk-XKVU23NC.js → chunk-V7EQZOO5.js} +1 -1
- package/{chunk-YBVTY6ZW.js → chunk-VBADA6QU.js} +1 -1
- package/{chunk-GDT6KI4I.js → chunk-W6UMN2YJ.js} +4 -4
- package/{chunk-VE6CCH33.js → chunk-Y5PA7DVK.js} +1 -0
- package/{chunk-6FT6K5YN.js → chunk-YZWFWSY7.js} +25 -7
- package/{chunk-SNOBGFNM.js → chunk-ZNUXDX6R.js} +50 -8
- package/{ci-WVYVR4XK.js → ci-BX54SEU3.js} +12 -12
- package/cli-package.json +3 -2
- package/{config-VYOTYBGS.js → config-HFF6XDCV.js} +9 -9
- package/{config-2MFZVP2N.js → config-WBVJX42R.js} +12 -12
- package/{create-OJPLHBRR.js → create-W67HRHWZ.js} +20 -20
- package/{deprecate-V4PKGFF7.js → deprecate-5T6JTGJ3.js} +14 -14
- package/{devtools-UEMPW5GG.js → devtools-UMJUK42W.js} +2 -2
- package/{dist-tag-DNLV4VDE.js → dist-tag-YIZTS7GF.js} +10 -10
- package/{docs-LXHDCGL5.js → docs-G7CKMPCL.js} +19 -19
- package/{exec-P32YSP44.js → exec-YYCAZZ6Z.js} +20 -20
- package/{exec-cache-JZ5PDTOY.js → exec-cache-6ENHAGC6.js} +18 -18
- package/{exec-local-HHA464H4.js → exec-local-OXG3PSLF.js} +17 -17
- package/{help-GVTTOYUL.js → help-RMOIAILM.js} +4 -4
- package/{init-RENGG74N.js → init-UPEQXC4D.js} +12 -12
- package/{install-V6VXOBH2.js → install-U7LLEQU6.js} +18 -18
- package/{list-7N7Y5OXB.js → list-N6CKPXTK.js} +20 -20
- package/{login-D2QSAUJC.js → login-MCO4ZLVF.js} +14 -14
- package/{logout-QPOYBQNF.js → logout-BJ4QRZYG.js} +10 -10
- package/{pack-4YYGXP3A.js → pack-U6PYRFZ6.js} +13 -13
- package/package.json +1 -1
- package/{ping-QYRIZONU.js → ping-VFB6SCMH.js} +10 -10
- package/{pkg-WQTNABKT.js → pkg-ZNK5SCF4.js} +13 -13
- package/{profile-PRI7WXK7.js → profile-TW32HLYA.js} +10 -10
- package/{publish-PSBYJQS7.js → publish-AHOITWZQ.js} +36 -21
- package/{query-UFYLQW4N.js → query-KKP5PNSQ.js} +20 -20
- package/{registry-YTJZ3AQD.js → registry-VHB65BWD.js} +5 -5
- package/registry-client-src-revalidate.js +5936 -5801
- package/{repo-4S6ETFXX.js → repo-BHTVK5KE.js} +19 -19
- package/{reporter-GLWYHI2Y.js → reporter-VQU7HYKM.js} +77 -77
- package/{run-OU7NUB7A.js → run-UD32OTUJ.js} +17 -17
- package/{run-exec-QPBY7ULE.js → run-exec-NOCIUNGL.js} +17 -17
- package/security-archive-src-update-expired.js +1 -1
- package/{setup-23QXG473.js → setup-PBCWOSTV.js} +18 -18
- package/{src-575IYJOL.js → src-LRKPUV4J.js} +16 -16
- package/src-T5FBZFMV.js +222 -0
- package/{src-3GN7TDNH.js → src-Z44JKVWS.js} +9 -7
- package/{token-FCIA3RGD.js → token-PCPB6NOL.js} +10 -10
- package/{uninstall-BQVZVKB5.js → uninstall-LOGSQXFS.js} +14 -14
- package/{unpublish-YGJ5HEYF.js → unpublish-O3UFCTEJ.js} +10 -10
- package/{update-WCGV66JK.js → update-WBCLWGLN.js} +17 -17
- package/{version-7EA3UQG7.js → version-S3LCB2TQ.js} +13 -13
- package/{view-5FWIENVE.js → view-LMPENVAJ.js} +12 -12
- 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-O4ZTBIC4.js → whoami-LYMG7R3P.js} +10 -10
- package/chunk-WD74RJXW.js +0 -75
|
@@ -13,14 +13,14 @@ import {
|
|
|
13
13
|
AbortError,
|
|
14
14
|
SecurityArchive,
|
|
15
15
|
pRetry
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-JFHEXCG5.js";
|
|
17
17
|
import {
|
|
18
18
|
Monorepo,
|
|
19
19
|
PackageJson,
|
|
20
20
|
getUser,
|
|
21
21
|
minimatch,
|
|
22
22
|
platformCheck
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-P4LLYWCG.js";
|
|
24
24
|
import {
|
|
25
25
|
asDepID,
|
|
26
26
|
baseDepID,
|
|
@@ -35,10 +35,10 @@ import {
|
|
|
35
35
|
joinExtra,
|
|
36
36
|
splitDepID,
|
|
37
37
|
splitExtra
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-J3R4XWB3.js";
|
|
39
39
|
import {
|
|
40
40
|
Spec as Spec2
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-V7EQZOO5.js";
|
|
42
42
|
import {
|
|
43
43
|
load,
|
|
44
44
|
walkUp
|
|
@@ -46,11 +46,17 @@ import {
|
|
|
46
46
|
import {
|
|
47
47
|
userAgent,
|
|
48
48
|
userAgentHeaders
|
|
49
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-VBADA6QU.js";
|
|
50
50
|
import {
|
|
51
51
|
graphStep,
|
|
52
52
|
promiseSpawn
|
|
53
53
|
} from "./chunk-U7TEQCBN.js";
|
|
54
|
+
import {
|
|
55
|
+
XDG
|
|
56
|
+
} from "./chunk-XNLSTHDK.js";
|
|
57
|
+
import {
|
|
58
|
+
rimraf
|
|
59
|
+
} from "./chunk-PDWPFR5T.js";
|
|
54
60
|
import {
|
|
55
61
|
Spec,
|
|
56
62
|
Version,
|
|
@@ -59,6 +65,8 @@ import {
|
|
|
59
65
|
asNormalizedManifest,
|
|
60
66
|
assertPathSafeName,
|
|
61
67
|
assertRecordStringString,
|
|
68
|
+
brotliTarballName,
|
|
69
|
+
brotliTarballUrl,
|
|
62
70
|
compare,
|
|
63
71
|
defaultGitHostArchives,
|
|
64
72
|
defaultGitHosts,
|
|
@@ -89,14 +97,9 @@ import {
|
|
|
89
97
|
patch,
|
|
90
98
|
satisfies,
|
|
91
99
|
shortDependencyTypes,
|
|
92
|
-
subset
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
XDG
|
|
96
|
-
} from "./chunk-XNLSTHDK.js";
|
|
97
|
-
import {
|
|
98
|
-
rimraf
|
|
99
|
-
} from "./chunk-BHJT53TP.js";
|
|
100
|
+
subset,
|
|
101
|
+
tarballFormat
|
|
102
|
+
} from "./chunk-RH2Y7MPW.js";
|
|
100
103
|
import {
|
|
101
104
|
error,
|
|
102
105
|
typeError
|
|
@@ -4471,6 +4474,7 @@ var stringifyNode = (node) => {
|
|
|
4471
4474
|
};
|
|
4472
4475
|
|
|
4473
4476
|
// ../../src/graph/src/node.ts
|
|
4477
|
+
var brotliAlternate = (dist2) => brotliTarballUrl(dist2?.tarball, dist2?.alternates);
|
|
4474
4478
|
var Node = class _Node {
|
|
4475
4479
|
get [Symbol.toStringTag]() {
|
|
4476
4480
|
return "@vltpkg/graph.Node";
|
|
@@ -4574,6 +4578,29 @@ var Node = class _Node {
|
|
|
4574
4578
|
* The manifest this node represents in the graph.
|
|
4575
4579
|
*/
|
|
4576
4580
|
manifest;
|
|
4581
|
+
/**
|
|
4582
|
+
* Whether this node's artifact is the `.tar.br`: from the manifest's
|
|
4583
|
+
* `dist.alternates` at construction, or overwritten by the lockfile's
|
|
4584
|
+
* flag bit when the node came from one (so an existing lockfile keeps
|
|
4585
|
+
* whichever artifact it pinned). Only consulted while `resolved` is
|
|
4586
|
+
* still unset -- once there is a URL, it is the answer (see the
|
|
4587
|
+
* getter).
|
|
4588
|
+
*/
|
|
4589
|
+
#brotli = false;
|
|
4590
|
+
/**
|
|
4591
|
+
* True when this node's artifact is the registry's Brotli (`.tar.br`)
|
|
4592
|
+
* tarball rather than the gzip `.tgz`, which makes `integrity` that
|
|
4593
|
+
* artifact's hash. `resolved` is authoritative whenever it is set, so
|
|
4594
|
+
* the two can never drift; the stored bit only carries the lockfile's
|
|
4595
|
+
* answer across to `setResolved()`, which has to know the extension
|
|
4596
|
+
* before it can build the URL.
|
|
4597
|
+
*/
|
|
4598
|
+
get brotli() {
|
|
4599
|
+
return this.resolved ? tarballFormat(this.resolved) === "brotli" : this.#brotli;
|
|
4600
|
+
}
|
|
4601
|
+
set brotli(brotli) {
|
|
4602
|
+
this.#brotli = brotli;
|
|
4603
|
+
}
|
|
4577
4604
|
/**
|
|
4578
4605
|
* Project where this node resides
|
|
4579
4606
|
*/
|
|
@@ -4623,6 +4650,11 @@ var Node = class _Node {
|
|
|
4623
4650
|
* Record of binary names to their paths in the package, if any.
|
|
4624
4651
|
*/
|
|
4625
4652
|
bins;
|
|
4653
|
+
/**
|
|
4654
|
+
* True if the package has a root binding.gyp, when known without a
|
|
4655
|
+
* disk check (placed from the global store). Not persisted.
|
|
4656
|
+
*/
|
|
4657
|
+
bindingGyp;
|
|
4626
4658
|
/**
|
|
4627
4659
|
* True if this node has been built as part of the reify step.
|
|
4628
4660
|
*/
|
|
@@ -4701,6 +4733,7 @@ var Node = class _Node {
|
|
|
4701
4733
|
}
|
|
4702
4734
|
this.graph = options.graph;
|
|
4703
4735
|
this.manifest = manifest;
|
|
4736
|
+
this.#brotli = options["brotli-tarballs"] !== false && !!brotliAlternate(manifest?.dist);
|
|
4704
4737
|
this.#name = name || this.manifest?.name;
|
|
4705
4738
|
this.version = version || this.manifest?.version;
|
|
4706
4739
|
}
|
|
@@ -4718,8 +4751,22 @@ var Node = class _Node {
|
|
|
4718
4751
|
}
|
|
4719
4752
|
#registryNodeResolved(tuple) {
|
|
4720
4753
|
const spec2 = hydrateTuple(tuple, this.#name, this.#options);
|
|
4721
|
-
|
|
4722
|
-
|
|
4754
|
+
const dist2 = this.manifest?.dist;
|
|
4755
|
+
const tarball = dist2?.tarball || spec2.conventionalRegistryTarball;
|
|
4756
|
+
const brotli = this.#brotli ? (
|
|
4757
|
+
// the manifest's own reference when there is one, and otherwise
|
|
4758
|
+
// the registry's naming for it: same stem as the `.tgz`, a
|
|
4759
|
+
// different extension. That convention is what lets a lockfile
|
|
4760
|
+
// node -- which has no manifest -- spend one flag bit rather
|
|
4761
|
+
// than a second URL.
|
|
4762
|
+
brotliAlternate(dist2) ?? (tarball && brotliTarballName(tarball))
|
|
4763
|
+
) : void 0;
|
|
4764
|
+
if (brotli) {
|
|
4765
|
+
this.resolved = brotli;
|
|
4766
|
+
return;
|
|
4767
|
+
}
|
|
4768
|
+
this.resolved = tarball;
|
|
4769
|
+
this.integrity ??= dist2?.integrity;
|
|
4723
4770
|
}
|
|
4724
4771
|
get options() {
|
|
4725
4772
|
return this.#options;
|
|
@@ -7482,6 +7529,7 @@ var score = async (state) => {
|
|
|
7482
7529
|
|
|
7483
7530
|
// ../../src/query/src/pseudo/scripts.ts
|
|
7484
7531
|
var nodeNeedsBuild = (node) => {
|
|
7532
|
+
if (node.buildState === "needed") return true;
|
|
7485
7533
|
const { manifest } = node;
|
|
7486
7534
|
if (!manifest) return false;
|
|
7487
7535
|
if (manifest.hasInstallScript) return true;
|
|
@@ -9082,15 +9130,15 @@ import { dirname as dirname2, resolve as resolve3 } from "node:path";
|
|
|
9082
9130
|
|
|
9083
9131
|
// ../../src/graph/src/lockfile/types.ts
|
|
9084
9132
|
var LOCKFILE_VERSION = 1;
|
|
9085
|
-
var getFlagNumFromNode = (node) => node.optional
|
|
9133
|
+
var getFlagNumFromNode = (node) => (node.optional ? LockfileNodeFlagOptional : 0) | (node.dev ? LockfileNodeFlagDev : 0) | (node.brotli ? LockfileNodeFlagBrotli : 0);
|
|
9086
9134
|
var getBooleanFlagsFromNum = (flags) => ({
|
|
9087
9135
|
dev: !!(flags & LockfileNodeFlagDev),
|
|
9088
|
-
optional: !!(flags & LockfileNodeFlagOptional)
|
|
9136
|
+
optional: !!(flags & LockfileNodeFlagOptional),
|
|
9137
|
+
brotli: !!(flags & LockfileNodeFlagBrotli)
|
|
9089
9138
|
});
|
|
9090
|
-
var LockfileNodeFlagNone = 0;
|
|
9091
9139
|
var LockfileNodeFlagOptional = 1;
|
|
9092
9140
|
var LockfileNodeFlagDev = 2;
|
|
9093
|
-
var
|
|
9141
|
+
var LockfileNodeFlagBrotli = 4;
|
|
9094
9142
|
var BuildStateNone = void 0;
|
|
9095
9143
|
var BuildStateNeeded = 1;
|
|
9096
9144
|
var BuildStateBuilt = 2;
|
|
@@ -9684,7 +9732,9 @@ var Graph = class {
|
|
|
9684
9732
|
toFoundNode.manifest = manifest;
|
|
9685
9733
|
this.manifests.set(toFoundNode.id, manifest);
|
|
9686
9734
|
}
|
|
9687
|
-
toFoundNode.
|
|
9735
|
+
if (!toFoundNode.brotli) {
|
|
9736
|
+
toFoundNode.integrity ??= manifest.dist?.integrity;
|
|
9737
|
+
}
|
|
9688
9738
|
}
|
|
9689
9739
|
return toFoundNode;
|
|
9690
9740
|
}
|
|
@@ -9704,7 +9754,7 @@ var Graph = class {
|
|
|
9704
9754
|
toNode.dev = flags.dev;
|
|
9705
9755
|
toNode.optional = flags.optional;
|
|
9706
9756
|
if (samePackage) copyPackageMetadata(toNode, samePackage);
|
|
9707
|
-
toNode.integrity ??= manifest?.dist?.integrity;
|
|
9757
|
+
if (!toNode.brotli) toNode.integrity ??= manifest?.dist?.integrity;
|
|
9708
9758
|
if (extra) {
|
|
9709
9759
|
const { modifier, peerSetHash } = splitExtra(extra);
|
|
9710
9760
|
toNode.modifier = modifier;
|
|
@@ -10006,10 +10056,11 @@ var loadNodes = (graph, nodes, options, actual2, throwOnMissingManifest) => {
|
|
|
10006
10056
|
node.peerSetHash = peerSetHash;
|
|
10007
10057
|
}
|
|
10008
10058
|
}
|
|
10009
|
-
const { dev: dev2, optional: optional2 } = getBooleanFlagsFromNum(flags);
|
|
10059
|
+
const { dev: dev2, optional: optional2, brotli } = getBooleanFlagsFromNum(flags);
|
|
10010
10060
|
node.options = options;
|
|
10011
10061
|
node.dev = dev2;
|
|
10012
10062
|
node.optional = optional2;
|
|
10063
|
+
node.brotli = brotli;
|
|
10013
10064
|
node.integrity = integrity ?? referenceNode?.integrity;
|
|
10014
10065
|
node.resolved = type2 === "remote" ? filepath : resolved ?? referenceNode?.resolved;
|
|
10015
10066
|
node.resolvedFromLockfile = !!(node.integrity && node.resolved);
|
|
@@ -10503,9 +10554,6 @@ var load4 = (options) => {
|
|
|
10503
10554
|
return graph;
|
|
10504
10555
|
};
|
|
10505
10556
|
|
|
10506
|
-
// ../../src/graph/src/reify/build.ts
|
|
10507
|
-
import { join as join2 } from "node:path";
|
|
10508
|
-
|
|
10509
10557
|
// ../../src/graph/src/non-empty-list.ts
|
|
10510
10558
|
var isNonEmptyList = (list) => !!list.length;
|
|
10511
10559
|
var nonEmptyList = (nodes) => isNonEmptyList(nodes) ? nodes : void 0;
|
|
@@ -10545,7 +10593,7 @@ var del = (diff2, node) => {
|
|
|
10545
10593
|
};
|
|
10546
10594
|
|
|
10547
10595
|
// ../../src/graph/src/reify/bin-chmod.ts
|
|
10548
|
-
import { statSync as statSync3
|
|
10596
|
+
import { statSync as statSync3 } from "node:fs";
|
|
10549
10597
|
import { chmod as chmod2 } from "node:fs/promises";
|
|
10550
10598
|
var binChmodAll = async (nodes, scurry) => {
|
|
10551
10599
|
const chmods = [];
|
|
@@ -10561,19 +10609,31 @@ var binChmod = async (node, scurry) => {
|
|
|
10561
10609
|
const path2 = scurry.resolve(
|
|
10562
10610
|
`${node.resolvedLocation(scurry)}/${bin}`
|
|
10563
10611
|
);
|
|
10564
|
-
|
|
10565
|
-
|
|
10612
|
+
let mode;
|
|
10613
|
+
try {
|
|
10614
|
+
mode = statSync3(path2).mode;
|
|
10615
|
+
} catch {
|
|
10616
|
+
continue;
|
|
10566
10617
|
}
|
|
10618
|
+
if ((mode & 73) === 73) continue;
|
|
10619
|
+
chmods.push(chmod2(path2, mode & 511 | 73));
|
|
10567
10620
|
}
|
|
10568
10621
|
await Promise.all(chmods);
|
|
10569
10622
|
};
|
|
10570
|
-
|
|
10571
|
-
|
|
10572
|
-
|
|
10573
|
-
|
|
10623
|
+
|
|
10624
|
+
// ../../src/graph/src/reify/binding-gyp.ts
|
|
10625
|
+
import { lstatSync } from "node:fs";
|
|
10626
|
+
import { join as join2 } from "node:path";
|
|
10627
|
+
var onDisk = (dir) => {
|
|
10628
|
+
try {
|
|
10629
|
+
return !!lstatSync(join2(dir, "binding.gyp"), {
|
|
10630
|
+
throwIfNoEntry: false
|
|
10631
|
+
})?.isFile();
|
|
10632
|
+
} catch {
|
|
10633
|
+
return false;
|
|
10574
10634
|
}
|
|
10575
|
-
await chmod2(path2, execMode);
|
|
10576
10635
|
};
|
|
10636
|
+
var hasBindingGyp = (node, scurry) => node.bindingGyp ?? onDisk(node.resolvedLocation(scurry));
|
|
10577
10637
|
|
|
10578
10638
|
// ../../src/graph/src/reify/scripts-manifest.ts
|
|
10579
10639
|
var scriptsManifest = (manifest, dir, packageJson) => manifest.hasInstallScript && !manifest.scripts ? packageJson.read(dir) : manifest;
|
|
@@ -10629,8 +10689,7 @@ var visit = async (packageJson, scurry, node, signal, _path) => {
|
|
|
10629
10689
|
preprepare,
|
|
10630
10690
|
postprepare
|
|
10631
10691
|
} = scripts2;
|
|
10632
|
-
const
|
|
10633
|
-
const hasImplicitInstall = hasBindingGyp && !install2 && !preinstall;
|
|
10692
|
+
const hasImplicitInstall = hasBindingGyp(node, scurry) && !install2 && !preinstall;
|
|
10634
10693
|
const runInstall = !!(install2 || preinstall || postinstall) || hasImplicitInstall;
|
|
10635
10694
|
if (runInstall) {
|
|
10636
10695
|
await run({
|
|
@@ -11768,7 +11827,7 @@ var GraphModifier = class _GraphModifier {
|
|
|
11768
11827
|
// ../../src/init/src/index.ts
|
|
11769
11828
|
import {
|
|
11770
11829
|
appendFileSync,
|
|
11771
|
-
existsSync as
|
|
11830
|
+
existsSync as existsSync2,
|
|
11772
11831
|
readFileSync as readFileSync3,
|
|
11773
11832
|
writeFileSync as writeFileSync2
|
|
11774
11833
|
} from "node:fs";
|
|
@@ -11800,7 +11859,7 @@ var GITIGNORE_ENTRY = "node_modules";
|
|
|
11800
11859
|
var NPMIGNORE_ENTRY = "vlt.json";
|
|
11801
11860
|
var ensureGitignore = (cwd) => {
|
|
11802
11861
|
const gitignorePath = resolve7(cwd, ".gitignore");
|
|
11803
|
-
if (!
|
|
11862
|
+
if (!existsSync2(gitignorePath)) {
|
|
11804
11863
|
writeFileSync2(gitignorePath, `${GITIGNORE_ENTRY}
|
|
11805
11864
|
`, "utf8");
|
|
11806
11865
|
return { path: gitignorePath };
|
|
@@ -11821,7 +11880,7 @@ var ensureGitignore = (cwd) => {
|
|
|
11821
11880
|
};
|
|
11822
11881
|
var ensureNpmignore = (cwd) => {
|
|
11823
11882
|
const npmignorePath = resolve7(cwd, ".npmignore");
|
|
11824
|
-
if (!
|
|
11883
|
+
if (!existsSync2(npmignorePath)) {
|
|
11825
11884
|
writeFileSync2(npmignorePath, `${NPMIGNORE_ENTRY}
|
|
11826
11885
|
`, "utf8");
|
|
11827
11886
|
return { path: npmignorePath };
|
|
@@ -12419,7 +12478,7 @@ var canonicalizePeerIds = (graph, options = {}) => {
|
|
|
12419
12478
|
};
|
|
12420
12479
|
|
|
12421
12480
|
// ../../src/graph/src/ideal/move-peer-store-dirs.ts
|
|
12422
|
-
import { existsSync as
|
|
12481
|
+
import { existsSync as existsSync3 } from "node:fs";
|
|
12423
12482
|
import { rename as rename2 } from "node:fs/promises";
|
|
12424
12483
|
var movePeerStoreDirs = async (moves, {
|
|
12425
12484
|
scurry,
|
|
@@ -12463,7 +12522,7 @@ var movePeerStoreDirs = async (moves, {
|
|
|
12463
12522
|
}
|
|
12464
12523
|
return;
|
|
12465
12524
|
}
|
|
12466
|
-
if (!
|
|
12525
|
+
if (!existsSync3(node.resolvedLocation(scurry))) {
|
|
12467
12526
|
node.extracted = false;
|
|
12468
12527
|
}
|
|
12469
12528
|
})
|
|
@@ -12586,39 +12645,42 @@ var extractNode = async (node, scurry, remover, options, packageInfo, diff2) =>
|
|
|
12586
12645
|
error: new Error("Platform check failed or package deprecated")
|
|
12587
12646
|
};
|
|
12588
12647
|
}
|
|
12648
|
+
const { scripts: scripts2, hasInstallScript } = manifest;
|
|
12589
12649
|
const extractOptions = {
|
|
12590
12650
|
from,
|
|
12591
12651
|
integrity,
|
|
12592
12652
|
resolved,
|
|
12593
|
-
fromLockfile: node.resolvedFromLockfile
|
|
12653
|
+
fromLockfile: node.resolvedFromLockfile,
|
|
12654
|
+
installScripts: !!(hasInstallScript || scripts2?.install || scripts2?.preinstall || scripts2?.postinstall)
|
|
12655
|
+
};
|
|
12656
|
+
const extracted = (r) => {
|
|
12657
|
+
if (r.integrity && !node.integrity) node.integrity = r.integrity;
|
|
12658
|
+
if (r.manifest && !node.manifest) {
|
|
12659
|
+
try {
|
|
12660
|
+
node.manifest = normalizeManifest(
|
|
12661
|
+
asManifest(JSON.parse(r.manifest))
|
|
12662
|
+
);
|
|
12663
|
+
} catch {
|
|
12664
|
+
}
|
|
12665
|
+
}
|
|
12666
|
+
if (r.bindingGyp !== void 0) node.bindingGyp = r.bindingGyp;
|
|
12667
|
+
return { success: true, node };
|
|
12594
12668
|
};
|
|
12595
12669
|
try {
|
|
12596
12670
|
await remover.rm(target);
|
|
12597
12671
|
if (removeOptionalFailedNode) {
|
|
12598
12672
|
try {
|
|
12599
|
-
|
|
12600
|
-
spec2,
|
|
12601
|
-
target,
|
|
12602
|
-
extractOptions
|
|
12673
|
+
return extracted(
|
|
12674
|
+
await packageInfo.extract(spec2, target, extractOptions)
|
|
12603
12675
|
);
|
|
12604
|
-
if (result.integrity && !node.integrity) {
|
|
12605
|
-
node.integrity = result.integrity;
|
|
12606
|
-
}
|
|
12607
|
-
return { success: true, node };
|
|
12608
12676
|
} catch (error2) {
|
|
12609
12677
|
removeOptionalFailedNode();
|
|
12610
12678
|
return { success: false, node, error: error2 };
|
|
12611
12679
|
}
|
|
12612
12680
|
} else {
|
|
12613
|
-
|
|
12614
|
-
spec2,
|
|
12615
|
-
target,
|
|
12616
|
-
extractOptions
|
|
12681
|
+
return extracted(
|
|
12682
|
+
await packageInfo.extract(spec2, target, extractOptions)
|
|
12617
12683
|
);
|
|
12618
|
-
if (result.integrity && !node.integrity) {
|
|
12619
|
-
node.integrity = result.integrity;
|
|
12620
|
-
}
|
|
12621
|
-
return { success: true, node };
|
|
12622
12684
|
}
|
|
12623
12685
|
} catch (error2) {
|
|
12624
12686
|
if (removeOptionalFailedNode) {
|
|
@@ -14464,7 +14526,6 @@ var deleteEdges = (diff2, scurry, remover) => {
|
|
|
14464
14526
|
};
|
|
14465
14527
|
|
|
14466
14528
|
// ../../src/graph/src/reify/check-needed-build.ts
|
|
14467
|
-
import { join as join3 } from "node:path";
|
|
14468
14529
|
var nodeNeedsBuild2 = (node, scurry, packageJson) => {
|
|
14469
14530
|
if (node.built) return false;
|
|
14470
14531
|
let manifest;
|
|
@@ -14478,8 +14539,7 @@ var nodeNeedsBuild2 = (node, scurry, packageJson) => {
|
|
|
14478
14539
|
const { scripts: scripts2 = {} } = manifest;
|
|
14479
14540
|
const runInstall = !!(scripts2.install || scripts2.preinstall || scripts2.postinstall);
|
|
14480
14541
|
if (runInstall) return true;
|
|
14481
|
-
|
|
14482
|
-
if (hasBindingGyp && !scripts2.install && !scripts2.preinstall)
|
|
14542
|
+
if (hasBindingGyp(node, scurry) && !scripts2.install && !scripts2.preinstall)
|
|
14483
14543
|
return true;
|
|
14484
14544
|
const prepable = node.id.startsWith("git") || node.importer || !node.inVltStore();
|
|
14485
14545
|
const runPrepare = !!(scripts2.prepare || scripts2.preprepare || scripts2.postprepare) && prepable;
|
|
@@ -14920,6 +14980,12 @@ var reify_ = async (options, diff2, remover, saveImportersPackageJson) => {
|
|
|
14920
14980
|
);
|
|
14921
14981
|
if (rmActions.length) await Promise.all(rmActions);
|
|
14922
14982
|
saveImportersPackageJson?.();
|
|
14983
|
+
for (const node of diff2.nodes.add) {
|
|
14984
|
+
const lfNode = lfData.nodes[node.id];
|
|
14985
|
+
if (lfNode && node.integrity && !lfNode[2]) {
|
|
14986
|
+
lfNode[2] = node.integrity;
|
|
14987
|
+
}
|
|
14988
|
+
}
|
|
14923
14989
|
saveData(lfData, scurry.resolve("vlt-lock.json"), false);
|
|
14924
14990
|
if (scurry.lstatSync("vlt.json")) {
|
|
14925
14991
|
copyFileSync(
|
|
@@ -14931,7 +14997,7 @@ var reify_ = async (options, diff2, remover, saveImportersPackageJson) => {
|
|
|
14931
14997
|
};
|
|
14932
14998
|
|
|
14933
14999
|
// ../../src/graph/src/install.ts
|
|
14934
|
-
import { existsSync as
|
|
15000
|
+
import { existsSync as existsSync6, rmSync as rmSync3 } from "node:fs";
|
|
14935
15001
|
import { resolve as resolve12 } from "node:path";
|
|
14936
15002
|
|
|
14937
15003
|
// ../../src/graph/src/lockfile/format-options-change.ts
|
|
@@ -14951,7 +15017,7 @@ var formatOptionsChange = ({
|
|
|
14951
15017
|
}) => `${section}:${key === void 0 ? "" : ` ${key}`} ` + (from === void 0 ? "(missing)" : `"${redactUserinfo(from)}"`) + ` -> ${to === void 0 ? "(removed)" : `"${redactUserinfo(to)}"`}`;
|
|
14952
15018
|
|
|
14953
15019
|
// ../../src/graph/src/uninstall.ts
|
|
14954
|
-
import { existsSync as
|
|
15020
|
+
import { existsSync as existsSync4, rmSync } from "node:fs";
|
|
14955
15021
|
import { resolve as resolve10 } from "node:path";
|
|
14956
15022
|
var uninstall = async (options, remove) => {
|
|
14957
15023
|
const mainManifest = options.packageJson.read(options.projectRoot);
|
|
@@ -15003,7 +15069,7 @@ var uninstall = async (options, remove) => {
|
|
|
15003
15069
|
options.projectRoot,
|
|
15004
15070
|
"node_modules/.vlt-lock.json"
|
|
15005
15071
|
);
|
|
15006
|
-
if (
|
|
15072
|
+
if (existsSync4(hiddenLockfile)) {
|
|
15007
15073
|
rmSync(hiddenLockfile, { force: true });
|
|
15008
15074
|
}
|
|
15009
15075
|
} catch {
|
|
@@ -15013,7 +15079,7 @@ var uninstall = async (options, remove) => {
|
|
|
15013
15079
|
};
|
|
15014
15080
|
|
|
15015
15081
|
// ../../src/graph/src/update.ts
|
|
15016
|
-
import { existsSync as
|
|
15082
|
+
import { existsSync as existsSync5, rmSync as rmSync2 } from "node:fs";
|
|
15017
15083
|
import { resolve as resolve11 } from "node:path";
|
|
15018
15084
|
var update = async (options) => {
|
|
15019
15085
|
let mainManifest = void 0;
|
|
@@ -15067,7 +15133,7 @@ var update = async (options) => {
|
|
|
15067
15133
|
options.projectRoot,
|
|
15068
15134
|
"node_modules/.vlt-lock.json"
|
|
15069
15135
|
);
|
|
15070
|
-
if (
|
|
15136
|
+
if (existsSync5(hiddenLockfile)) {
|
|
15071
15137
|
rmSync2(hiddenLockfile, { force: true });
|
|
15072
15138
|
}
|
|
15073
15139
|
} catch {
|
|
@@ -15163,7 +15229,7 @@ var install = async (options, add) => {
|
|
|
15163
15229
|
}
|
|
15164
15230
|
if (options.expectLockfile || options.frozenLockfile) {
|
|
15165
15231
|
const lockfilePath = resolve12(options.projectRoot, "vlt-lock.json");
|
|
15166
|
-
if (!
|
|
15232
|
+
if (!existsSync6(lockfilePath)) {
|
|
15167
15233
|
throw error(
|
|
15168
15234
|
"vlt-lock.json file is required when using --expect-lockfile, --frozen-lockfile, or ci command",
|
|
15169
15235
|
{
|
|
@@ -15299,7 +15365,7 @@ var install = async (options, add) => {
|
|
|
15299
15365
|
options.projectRoot,
|
|
15300
15366
|
"node_modules"
|
|
15301
15367
|
);
|
|
15302
|
-
if (
|
|
15368
|
+
if (existsSync6(nodeModulesPath)) {
|
|
15303
15369
|
await remover.rm(nodeModulesPath);
|
|
15304
15370
|
remover.confirm();
|
|
15305
15371
|
}
|
|
@@ -15367,7 +15433,7 @@ var install = async (options, add) => {
|
|
|
15367
15433
|
options.projectRoot,
|
|
15368
15434
|
"node_modules/.vlt-lock.json"
|
|
15369
15435
|
);
|
|
15370
|
-
if (
|
|
15436
|
+
if (existsSync6(hiddenLockfile)) {
|
|
15371
15437
|
rmSync3(hiddenLockfile, { force: true });
|
|
15372
15438
|
}
|
|
15373
15439
|
} catch {
|
|
@@ -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
|
Spec as Spec2
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-V7EQZOO5.js";
|
|
15
15
|
import {
|
|
16
16
|
Spec,
|
|
17
17
|
currentDefaultRegistryName,
|
|
18
18
|
defaultRegistryName
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-RH2Y7MPW.js";
|
|
20
20
|
import {
|
|
21
21
|
error
|
|
22
22
|
} from "./chunk-WZWDS3W4.js";
|
|
@@ -13,19 +13,19 @@ import {
|
|
|
13
13
|
asDepID,
|
|
14
14
|
baseDepID,
|
|
15
15
|
splitDepID
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-J3R4XWB3.js";
|
|
17
17
|
import {
|
|
18
18
|
userAgent
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-VBADA6QU.js";
|
|
20
20
|
import {
|
|
21
21
|
I
|
|
22
22
|
} from "./chunk-U7TEQCBN.js";
|
|
23
|
-
import {
|
|
24
|
-
defaultRegistryName
|
|
25
|
-
} from "./chunk-VFBCWAOC.js";
|
|
26
23
|
import {
|
|
27
24
|
XDG
|
|
28
25
|
} from "./chunk-XNLSTHDK.js";
|
|
26
|
+
import {
|
|
27
|
+
defaultRegistryName
|
|
28
|
+
} from "./chunk-RH2Y7MPW.js";
|
|
29
29
|
import {
|
|
30
30
|
error
|
|
31
31
|
} from "./chunk-WZWDS3W4.js";
|
|
@@ -12,7 +12,7 @@ var require = _vlt_createRequire(import.meta.filename);
|
|
|
12
12
|
import {
|
|
13
13
|
generateDefaultHelp,
|
|
14
14
|
generateFullHelp
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-CU752KW7.js";
|
|
16
16
|
import {
|
|
17
17
|
flush,
|
|
18
18
|
trackCommand,
|
|
@@ -20,13 +20,13 @@ import {
|
|
|
20
20
|
} from "./chunk-G2YT2GWF.js";
|
|
21
21
|
import {
|
|
22
22
|
parseError
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-33HBY5CF.js";
|
|
24
24
|
import {
|
|
25
25
|
hasConfiguredRegistry,
|
|
26
26
|
hasNpmRegistry,
|
|
27
27
|
missingNpmRegistryError,
|
|
28
28
|
missingRegistryError
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-D2LEK7VS.js";
|
|
30
30
|
import {
|
|
31
31
|
isLazyView,
|
|
32
32
|
isViewClass,
|
|
@@ -35,20 +35,20 @@ import {
|
|
|
35
35
|
import {
|
|
36
36
|
isGraphRunError,
|
|
37
37
|
splitDepID
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-J3R4XWB3.js";
|
|
39
39
|
import {
|
|
40
40
|
defaultView
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-ENSGPOLR.js";
|
|
42
42
|
import {
|
|
43
43
|
emitter
|
|
44
44
|
} from "./chunk-U7TEQCBN.js";
|
|
45
|
-
import {
|
|
46
|
-
isErrorWithCause,
|
|
47
|
-
isObject
|
|
48
|
-
} from "./chunk-VFBCWAOC.js";
|
|
49
45
|
import {
|
|
50
46
|
XDG
|
|
51
47
|
} from "./chunk-XNLSTHDK.js";
|
|
48
|
+
import {
|
|
49
|
+
isErrorWithCause,
|
|
50
|
+
isObject
|
|
51
|
+
} from "./chunk-RH2Y7MPW.js";
|
|
52
52
|
|
|
53
53
|
// ../../src/cli-sdk/src/print-err.ts
|
|
54
54
|
import { mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
@@ -64,7 +64,7 @@ var formatURL = (v, format) => v instanceof URL ? v.toString() : (
|
|
|
64
64
|
/* c8 ignore next */
|
|
65
65
|
format(v)
|
|
66
66
|
);
|
|
67
|
-
var hasCustomToString = (v) =>
|
|
67
|
+
var hasCustomToString = (v) => typeof v === "object" && v !== null && v.toString !== Object.prototype.toString;
|
|
68
68
|
var formatToString = (v, format) => hasCustomToString(v) ? v.toString() : format(v);
|
|
69
69
|
var formatArray = (v, format, joiner = ", ") => Array.isArray(v) ? v.join(joiner) : (
|
|
70
70
|
/* c8 ignore next */
|
|
@@ -209,8 +209,9 @@ var printCode = (err, usage, stderr2, format) => {
|
|
|
209
209
|
if (from) {
|
|
210
210
|
stderr2(indent(`From: ${format(from)}`));
|
|
211
211
|
}
|
|
212
|
-
|
|
213
|
-
|
|
212
|
+
const status = response?.statusCode;
|
|
213
|
+
if (status) {
|
|
214
|
+
stderr2(indent(`Status: ${format(status)}`));
|
|
214
215
|
}
|
|
215
216
|
return { file: true };
|
|
216
217
|
}
|
|
@@ -441,6 +442,7 @@ var tagStyle = (state, statusCode) => {
|
|
|
441
442
|
switch (state) {
|
|
442
443
|
case "cache":
|
|
443
444
|
case "stale":
|
|
445
|
+
case "store":
|
|
444
446
|
case "304":
|
|
445
447
|
return "green";
|
|
446
448
|
case "start":
|