@vltpkg/cli-js 1.3.8 → 1.4.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-WLKANIOE.js → access-422UGEWN.js} +8 -8
- package/{bugs-5Q3QSTWP.js → bugs-RED7Y33Q.js} +17 -17
- package/{build-XSFR63AW.js → build-IHMPBWRO.js} +9 -9
- package/{cache-UVPK5J5A.js → cache-FJP2RZJX.js} +31 -19
- package/cache-unzip-src-unzip.js +21 -1
- package/{chunk-IUL6MPP6.js → chunk-2AMOC4DN.js} +4 -4
- package/{chunk-BGA3WB7H.js → chunk-4UCADW6S.js} +5 -5
- package/{chunk-GZ5MYMBT.js → chunk-5IJTPZXP.js} +1 -1
- package/{chunk-43HNQWPQ.js → chunk-5RHABCYI.js} +76 -11
- package/{chunk-XCDLOQZZ.js → chunk-5TNXLRW2.js} +33 -20
- package/{chunk-IHXJVKAE.js → chunk-5Y4SYLJ2.js} +2 -1
- package/chunk-6IF3RJND.js +81 -0
- package/{chunk-3U6QWN62.js → chunk-7T3XAYP4.js} +1 -1
- package/{chunk-WHLYMMI2.js → chunk-ASLX43R3.js} +3 -3
- package/{chunk-OAP2ROTL.js → chunk-C23TDXRG.js} +1 -1
- package/{chunk-H77JYU7F.js → chunk-DNRR3XMG.js} +12 -3
- package/{chunk-IBGFQR23.js → chunk-FLH4YC6W.js} +21 -0
- package/{chunk-XDSZO74H.js → chunk-FZUYGJZU.js} +7 -7
- package/{chunk-PJJCFMLW.js → chunk-GIIAODRI.js} +4 -4
- package/{chunk-QNDM4DVO.js → chunk-HZXJ423P.js} +1 -1
- package/{chunk-CB65DPZ2.js → chunk-I7UMHYZX.js} +151 -27
- package/{chunk-6P5CFJR7.js → chunk-ISE4IRHF.js} +4 -4
- package/{chunk-TLY4VGMH.js → chunk-LHPEBLOU.js} +1 -1
- package/{chunk-EL4GVZK5.js → chunk-MKWPTN3C.js} +2 -2
- package/{chunk-5KOLUYXH.js → chunk-OAJ3PO3Z.js} +57 -11
- package/{chunk-NWHKSRO3.js → chunk-OVPHE4O7.js} +93 -10
- package/{chunk-WKA5UYNA.js → chunk-PHJJPY5G.js} +3 -3
- package/{chunk-SV4WK3KX.js → chunk-PLG3OYCX.js} +2 -2
- package/{chunk-KMOOTBHM.js → chunk-QCSUWACA.js} +1 -1
- package/{chunk-6D54UN4T.js → chunk-SR2VOY5J.js} +1 -1
- package/chunk-T6FBP4OU.js +76 -0
- package/{chunk-A2TSRXZD.js → chunk-THSYN5EK.js} +1 -1
- package/{chunk-DL3H4EMY.js → chunk-TO23PR7J.js} +22 -15
- package/{chunk-OWMR2EDW.js → chunk-TPRK6IDA.js} +1 -1
- package/chunk-UGCKF5ZE.js +57 -0
- package/{chunk-SE2FSMBR.js → chunk-WF6KLKRN.js} +26 -10
- package/{chunk-FIUUAQGC.js → chunk-X4FVR4R5.js} +23 -18
- package/{chunk-6BQKR2FM.js → chunk-ZJMJ7MCT.js} +1 -1
- package/{ci-EDRETPUF.js → ci-YSKNNO5M.js} +10 -10
- package/cli-package.json +1 -1
- package/{config-MVNXGEOQ.js → config-CSPCDMR3.js} +9 -8
- package/{config-OKBXU7TU.js → config-HO7GY3QT.js} +11 -10
- package/{create-R7BXYJSU.js → create-2TJT3AHJ.js} +19 -18
- package/{deprecate-YSUKBKQM.js → deprecate-7FRJI2RL.js} +11 -11
- package/{dist-tag-MIGYSR4F.js → dist-tag-WCFF5OEG.js} +8 -8
- package/{docs-4WVIN75H.js → docs-JMBPTU23.js} +17 -17
- package/{exec-IXHDQLAM.js → exec-FBOUKZZ2.js} +19 -18
- package/{exec-cache-EA7GHIK7.js → exec-cache-X3ZWM5S3.js} +16 -16
- package/{exec-local-GM4LH56M.js → exec-local-Y3KQC22N.js} +16 -15
- package/{help-TCXGBICU.js → help-PUKVH5X7.js} +4 -4
- package/{init-MWZDWQHM.js → init-GOKAQXXZ.js} +10 -10
- package/{install-HPI5HU3C.js → install-XFN4UFOC.js} +116 -16
- package/{list-2CX6REPJ.js → list-43JFFG5D.js} +19 -19
- package/{login-RAY23CVG.js → login-RSTZKNKN.js} +13 -12
- package/{logout-ICB5OMGY.js → logout-4576FFXZ.js} +8 -8
- package/{outdated-FYHPXRMT.js → outdated-ACQ5A2Y7.js} +15 -15
- package/{pack-E5MNPQXK.js → pack-QQVJ3G25.js} +15 -12
- package/package.json +1 -1
- package/{ping-REQ2KSAR.js → ping-QCDQQRO5.js} +8 -8
- package/{pkg-YB4GSRII.js → pkg-CSOJV7UC.js} +17 -12
- package/{profile-GKBW6GRI.js → profile-VL4HPW3N.js} +8 -8
- package/{publish-4ZQJYYLF.js → publish-2YBO6ZXE.js} +23 -18
- package/{query-SKXBF3MJ.js → query-IHHFMJRT.js} +19 -19
- package/{registry-MQJJCWJY.js → registry-W7BRZZZ2.js} +5 -5
- package/registry-client-src-revalidate.js +75 -9
- package/{repo-ACPTZI2C.js → repo-L3BXAAWS.js} +17 -17
- package/{reporter-4KK2JNGO.js → reporter-5NYOHBO7.js} +11 -10
- package/{run-YW3ITX2A.js → run-AMUUVLTI.js} +16 -15
- package/{run-exec-7VQX3OFG.js → run-exec-5W3XWQZA.js} +16 -15
- package/security-archive-src-update-expired.js +46 -12
- package/{setup-PLEKCMXN.js → setup-TFM4GJF7.js} +16 -15
- package/{src-XQ7KVUVN.js → src-4CYCUWZL.js} +29 -24
- package/{src-PXDFMQ6W.js → src-I3GMULFP.js} +4 -4
- package/{src-GP7VLT7P.js → src-LUTN2ODD.js} +58 -9
- package/{token-GB7RPE5J.js → token-OANOBE3G.js} +8 -8
- package/{uninstall-RLCECX37.js → uninstall-YXTQ4AIZ.js} +12 -12
- package/{unpublish-3ZXEAVHF.js → unpublish-SZXYMYIU.js} +8 -8
- package/{update-VDZP6EZN.js → update-FHLMWGIM.js} +16 -15
- package/{version-MRELJPOK.js → version-ZWFCTU5V.js} +16 -11
- package/{view-LCXMTGCJ.js → view-NFNJXMLV.js} +11 -11
- 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-PNRDBS45.js → whoami-O7GOSGCI.js} +8 -8
- package/chunk-4JAZZRKR.js +0 -76
|
@@ -18,10 +18,10 @@ import {
|
|
|
18
18
|
statusText,
|
|
19
19
|
storeRoot,
|
|
20
20
|
tokenRefusal
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-SR2VOY5J.js";
|
|
22
22
|
import {
|
|
23
23
|
userAgent
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-ZJMJ7MCT.js";
|
|
25
25
|
import {
|
|
26
26
|
I,
|
|
27
27
|
logRequest
|
|
@@ -36,7 +36,7 @@ import {
|
|
|
36
36
|
asError,
|
|
37
37
|
integrityHex,
|
|
38
38
|
integrityRE
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-FLH4YC6W.js";
|
|
40
40
|
import {
|
|
41
41
|
error
|
|
42
42
|
} from "./chunk-WZWDS3W4.js";
|
|
@@ -11273,14 +11273,14 @@ var require_retry_agent = __commonJS({
|
|
|
11273
11273
|
this.#options = options;
|
|
11274
11274
|
}
|
|
11275
11275
|
dispatch(opts, handler) {
|
|
11276
|
-
const
|
|
11276
|
+
const retry2 = new RetryHandler({
|
|
11277
11277
|
...opts,
|
|
11278
11278
|
retryOptions: this.#options
|
|
11279
11279
|
}, {
|
|
11280
11280
|
dispatch: this.#agent.dispatch.bind(this.#agent),
|
|
11281
11281
|
handler
|
|
11282
11282
|
});
|
|
11283
|
-
return this.#agent.dispatch(opts,
|
|
11283
|
+
return this.#agent.dispatch(opts, retry2);
|
|
11284
11284
|
}
|
|
11285
11285
|
close() {
|
|
11286
11286
|
return this.#agent.close();
|
|
@@ -13770,7 +13770,7 @@ var require_snapshot_recorder = __commonJS({
|
|
|
13770
13770
|
"use strict";
|
|
13771
13771
|
var { writeFile: writeFile3, readFile: readFile3, mkdir: mkdir3 } = __require("node:fs/promises");
|
|
13772
13772
|
var { dirname: dirname4, resolve: resolve5 } = __require("node:path");
|
|
13773
|
-
var { setTimeout:
|
|
13773
|
+
var { setTimeout: setTimeout4, clearTimeout: clearTimeout2 } = __require("node:timers");
|
|
13774
13774
|
var { InvalidArgumentError, UndiciError } = require_errors();
|
|
13775
13775
|
var { hashId, isUrlExcludedFactory, normalizeHeaders, createHeaderFilters } = require_snapshot_utils();
|
|
13776
13776
|
function formatRequestKey(opts, headerFilters, matchOptions = {}) {
|
|
@@ -14104,7 +14104,7 @@ var require_snapshot_recorder = __commonJS({
|
|
|
14104
14104
|
* Schedules a flush (debounced to avoid excessive writes)
|
|
14105
14105
|
*/
|
|
14106
14106
|
#scheduleFlush() {
|
|
14107
|
-
this.#flushTimeout =
|
|
14107
|
+
this.#flushTimeout = setTimeout4(() => {
|
|
14108
14108
|
this.saveSnapshots().catch(() => {
|
|
14109
14109
|
});
|
|
14110
14110
|
if (this.#autoFlush) {
|
|
@@ -19487,7 +19487,7 @@ var require_request2 = __commonJS({
|
|
|
19487
19487
|
var { URLSerializer } = require_data_url();
|
|
19488
19488
|
var { kConstruct } = require_symbols();
|
|
19489
19489
|
var assert = __require("node:assert");
|
|
19490
|
-
var { getMaxListeners, setMaxListeners, defaultMaxListeners } = __require("node:events");
|
|
19490
|
+
var { getMaxListeners, setMaxListeners: setMaxListeners2, defaultMaxListeners } = __require("node:events");
|
|
19491
19491
|
var kAbortController = /* @__PURE__ */ Symbol("abortController");
|
|
19492
19492
|
var requestFinalizer = new FinalizationRegistry(({ signal, abort }) => {
|
|
19493
19493
|
signal.removeEventListener("abort", abort);
|
|
@@ -19727,7 +19727,7 @@ var require_request2 = __commonJS({
|
|
|
19727
19727
|
const acRef = new WeakRef(ac);
|
|
19728
19728
|
const abort = buildAbort(acRef);
|
|
19729
19729
|
if (abortSignalHasEventHandlerLeakWarning && getMaxListeners(signal) === defaultMaxListeners) {
|
|
19730
|
-
|
|
19730
|
+
setMaxListeners2(1500, signal);
|
|
19731
19731
|
}
|
|
19732
19732
|
util.addAbortListener(signal, abort);
|
|
19733
19733
|
requestFinalizer.register(ac, { signal, abort }, abort);
|
|
@@ -26153,8 +26153,9 @@ import { randomUUID } from "node:crypto";
|
|
|
26153
26153
|
import { closeSync, openSync, readFileSync as readFileSync2, readSync } from "node:fs";
|
|
26154
26154
|
import { availableParallelism } from "node:os";
|
|
26155
26155
|
import { dirname as dirname3, resolve as resolve4 } from "node:path";
|
|
26156
|
+
import { setMaxListeners } from "node:events";
|
|
26156
26157
|
import { pipeline } from "node:stream";
|
|
26157
|
-
import { setTimeout as
|
|
26158
|
+
import { setTimeout as setTimeout3 } from "node:timers/promises";
|
|
26158
26159
|
import { createGunzip } from "node:zlib";
|
|
26159
26160
|
|
|
26160
26161
|
// ../../src/registry-client/src/is-iterable.ts
|
|
@@ -27408,6 +27409,40 @@ var readBody = async (response, entry) => {
|
|
|
27408
27409
|
});
|
|
27409
27410
|
};
|
|
27410
27411
|
|
|
27412
|
+
// ../../src/registry-client/src/retry.ts
|
|
27413
|
+
import { setTimeout as setTimeout2 } from "node:timers/promises";
|
|
27414
|
+
var retry = (err, { state: { counter }, opts }, cb) => {
|
|
27415
|
+
const { code, statusCode, headers } = err;
|
|
27416
|
+
const { method } = opts;
|
|
27417
|
+
const { signal } = opts;
|
|
27418
|
+
const {
|
|
27419
|
+
maxRetries,
|
|
27420
|
+
minTimeout,
|
|
27421
|
+
maxTimeout,
|
|
27422
|
+
timeoutFactor,
|
|
27423
|
+
methods,
|
|
27424
|
+
statusCodes,
|
|
27425
|
+
errorCodes
|
|
27426
|
+
} = opts.retryOptions;
|
|
27427
|
+
if (code && code !== "UND_ERR_REQ_RETRY" && !errorCodes.includes(code) || !methods.includes(method) || typeof statusCode === "number" && !statusCodes.includes(statusCode) || counter > maxRetries) {
|
|
27428
|
+
cb(err);
|
|
27429
|
+
return;
|
|
27430
|
+
}
|
|
27431
|
+
const ra = String(headers?.["retry-after"] ?? "");
|
|
27432
|
+
const secs = Number(ra);
|
|
27433
|
+
const after = Number.isNaN(secs) ? Date.parse(ra) - Date.now() : secs * 1e3;
|
|
27434
|
+
const wait = Math.min(
|
|
27435
|
+
after > 0 ? after : minTimeout * timeoutFactor ** (counter - 1),
|
|
27436
|
+
maxTimeout
|
|
27437
|
+
);
|
|
27438
|
+
setTimeout2(wait, null, {
|
|
27439
|
+
signal: signal instanceof AbortSignal ? signal : void 0
|
|
27440
|
+
}).then(
|
|
27441
|
+
() => cb(null),
|
|
27442
|
+
(er) => cb(er)
|
|
27443
|
+
);
|
|
27444
|
+
};
|
|
27445
|
+
|
|
27411
27446
|
// ../../src/registry-client/src/oidc.ts
|
|
27412
27447
|
var import_undici2 = __toESM(require_undici(), 1);
|
|
27413
27448
|
var log2 = (...args) => (
|
|
@@ -27595,7 +27630,15 @@ var RegistryClient = class {
|
|
|
27595
27630
|
#decoded = /* @__PURE__ */ new WeakMap();
|
|
27596
27631
|
// request() calls not settled yet, awaited by drain()
|
|
27597
27632
|
#inFlight = /* @__PURE__ */ new Set();
|
|
27633
|
+
#signal;
|
|
27634
|
+
/** the request's own signal joined with the client's */
|
|
27635
|
+
#withSignal(own) {
|
|
27636
|
+
const c = this.#signal;
|
|
27637
|
+
return !c || own === c || !(own instanceof AbortSignal) ? own ?? c : AbortSignal.any([own, c]);
|
|
27638
|
+
}
|
|
27598
27639
|
constructor(options) {
|
|
27640
|
+
this.#signal = options.signal;
|
|
27641
|
+
if (options.signal) setMaxListeners(0, options.signal);
|
|
27599
27642
|
const {
|
|
27600
27643
|
cache = xdg.cache(),
|
|
27601
27644
|
"fetch-retry-factor": timeoutFactor = 2,
|
|
@@ -27628,6 +27671,7 @@ var RegistryClient = class {
|
|
|
27628
27671
|
minTimeout,
|
|
27629
27672
|
maxTimeout,
|
|
27630
27673
|
retryAfter: true,
|
|
27674
|
+
retry,
|
|
27631
27675
|
errorCodes: [
|
|
27632
27676
|
"ECONNREFUSED",
|
|
27633
27677
|
"ECONNRESET",
|
|
@@ -27831,7 +27875,7 @@ var RegistryClient = class {
|
|
|
27831
27875
|
const rt = response.getHeaderString("retry-after");
|
|
27832
27876
|
const retryAfter = rt ? Number(rt) : -1;
|
|
27833
27877
|
if (retryAfter > 0) {
|
|
27834
|
-
await
|
|
27878
|
+
await setTimeout3(retryAfter * 1e3, null, { signal });
|
|
27835
27879
|
}
|
|
27836
27880
|
return await this.#checkLogin(url, options);
|
|
27837
27881
|
}
|
|
@@ -27971,6 +28015,7 @@ var RegistryClient = class {
|
|
|
27971
28015
|
const u = typeof url === "string" ? new URL(url) : url;
|
|
27972
28016
|
const o = {
|
|
27973
28017
|
...options,
|
|
28018
|
+
signal: this.#withSignal(options.signal),
|
|
27974
28019
|
method: options.method ?? "GET",
|
|
27975
28020
|
path: u.pathname.replace(/\/+$/, "") + u.search,
|
|
27976
28021
|
origin: u.origin,
|
|
@@ -28029,6 +28074,7 @@ var RegistryClient = class {
|
|
|
28029
28074
|
} while (this.#inFlight.size);
|
|
28030
28075
|
}
|
|
28031
28076
|
async request(url, options = {}) {
|
|
28077
|
+
options.signal = this.#withSignal(options.signal);
|
|
28032
28078
|
let settle;
|
|
28033
28079
|
const tracked = new Promise((res) => settle = res);
|
|
28034
28080
|
this.#inFlight.add(tracked);
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
AbortError,
|
|
14
14
|
SecurityArchive,
|
|
15
15
|
pRetry
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-5TNXLRW2.js";
|
|
17
17
|
import {
|
|
18
18
|
Monorepo,
|
|
19
19
|
PackageJson,
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
getUser,
|
|
22
22
|
minimatch,
|
|
23
23
|
platformCheck
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-I7UMHYZX.js";
|
|
25
25
|
import {
|
|
26
26
|
asDepID,
|
|
27
27
|
baseDepID,
|
|
@@ -36,10 +36,10 @@ import {
|
|
|
36
36
|
joinExtra,
|
|
37
37
|
splitDepID,
|
|
38
38
|
splitExtra
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-PLG3OYCX.js";
|
|
40
40
|
import {
|
|
41
41
|
Spec as Spec2
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-5IJTPZXP.js";
|
|
43
43
|
import {
|
|
44
44
|
load,
|
|
45
45
|
walkUp
|
|
@@ -47,7 +47,7 @@ import {
|
|
|
47
47
|
import {
|
|
48
48
|
userAgent,
|
|
49
49
|
userAgentHeaders
|
|
50
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-ZJMJ7MCT.js";
|
|
51
51
|
import {
|
|
52
52
|
graphStep,
|
|
53
53
|
promiseSpawn
|
|
@@ -100,7 +100,7 @@ import {
|
|
|
100
100
|
shortDependencyTypes,
|
|
101
101
|
subset,
|
|
102
102
|
tarballFormat
|
|
103
|
-
} from "./chunk-
|
|
103
|
+
} from "./chunk-FLH4YC6W.js";
|
|
104
104
|
import {
|
|
105
105
|
error,
|
|
106
106
|
syntaxError,
|
|
@@ -5543,11 +5543,11 @@ var exec = async (options) => {
|
|
|
5543
5543
|
projectRoot,
|
|
5544
5544
|
"script-shell": shell2 = false,
|
|
5545
5545
|
color = false,
|
|
5546
|
-
signal,
|
|
5547
5546
|
...spawnOptions
|
|
5548
5547
|
} = options;
|
|
5549
5548
|
const [spawnCmd, spawnArgs] = withShellArgs(shell2, arg0, args);
|
|
5550
5549
|
const p = promiseSpawn(spawnCmd, spawnArgs, {
|
|
5550
|
+
// `signal` kills it when aborted
|
|
5551
5551
|
...spawnOptions,
|
|
5552
5552
|
shell: shell2,
|
|
5553
5553
|
stdio: "pipe",
|
|
@@ -5566,6 +5566,10 @@ var exec = async (options) => {
|
|
|
5566
5566
|
windowsHide: true
|
|
5567
5567
|
});
|
|
5568
5568
|
proxySignals(p.process);
|
|
5569
|
+
p.process.on("error", () => {
|
|
5570
|
+
p.process.stdout.destroy();
|
|
5571
|
+
p.process.stderr.destroy();
|
|
5572
|
+
});
|
|
5569
5573
|
return await p;
|
|
5570
5574
|
};
|
|
5571
5575
|
var execFG = async (options) => {
|
|
@@ -10647,6 +10651,9 @@ var parseDir = (options, scurry, packageJson, depsFound, graph, fromNode, currDi
|
|
|
10647
10651
|
registry: fromNode.registry ?? options.registry
|
|
10648
10652
|
});
|
|
10649
10653
|
const { spec: modifiedSpec, queryModifier } = maybeApplyModifierToSpec(spec2, name, modifierRefs);
|
|
10654
|
+
if (modifiedSpec !== spec2 && modifiedSpec.bareSpec === "-") {
|
|
10655
|
+
continue;
|
|
10656
|
+
}
|
|
10650
10657
|
spec2 = modifiedSpec;
|
|
10651
10658
|
graph.placePackage(
|
|
10652
10659
|
fromNode,
|
|
@@ -11939,6 +11946,29 @@ var GraphModifier = class _GraphModifier {
|
|
|
11939
11946
|
}
|
|
11940
11947
|
return false;
|
|
11941
11948
|
}
|
|
11949
|
+
/**
|
|
11950
|
+
* Selector of the modifier that wins the direct `importer -> spec.name`
|
|
11951
|
+
* edge, if it removes it (value `-`). Same pick as tryNewDependency:
|
|
11952
|
+
* complete entries whose qualifier accepts the spec, highest
|
|
11953
|
+
* specificity, importer-anchored before lone on ties.
|
|
11954
|
+
*/
|
|
11955
|
+
removesImporterEdge(importer, spec2) {
|
|
11956
|
+
const anchored = [];
|
|
11957
|
+
const lone = [];
|
|
11958
|
+
for (const mod2 of this.#modifiers) {
|
|
11959
|
+
const { last } = mod2.breadcrumb;
|
|
11960
|
+
if (last.name !== spec2.name || !matchesQualifier(last, spec2))
|
|
11961
|
+
continue;
|
|
11962
|
+
const { prev } = last;
|
|
11963
|
+
if (!prev) lone.push(mod2);
|
|
11964
|
+
else if (!prev.prev && matchesImporter(prev, importer))
|
|
11965
|
+
anchored.push(mod2);
|
|
11966
|
+
}
|
|
11967
|
+
const all = [...anchored, ...lone];
|
|
11968
|
+
const [winner] = specificitySort(all.map((m) => m.breadcrumb));
|
|
11969
|
+
const mod = all.find((m) => m.breadcrumb === winner);
|
|
11970
|
+
return mod?.value === "-" ? mod.query : void 0;
|
|
11971
|
+
}
|
|
11942
11972
|
/**
|
|
11943
11973
|
* Loads the modifiers defined in `vlt.json` into memory.
|
|
11944
11974
|
*/
|
|
@@ -12324,6 +12354,7 @@ var getImporterSpecs = (options) => {
|
|
|
12324
12354
|
const { add, graph, remove } = options;
|
|
12325
12355
|
const addResult = new AddImportersDependenciesMapImpl();
|
|
12326
12356
|
const removeResult = new RemoveImportersDependenciesMapImpl();
|
|
12357
|
+
const removedEdges = /* @__PURE__ */ new Set();
|
|
12327
12358
|
for (const importer of graph.importers) {
|
|
12328
12359
|
const addDeps = /* @__PURE__ */ new Map();
|
|
12329
12360
|
const removeDeps = /* @__PURE__ */ new Set();
|
|
@@ -12350,6 +12381,10 @@ var getImporterSpecs = (options) => {
|
|
|
12350
12381
|
continue;
|
|
12351
12382
|
}
|
|
12352
12383
|
const spec2 = Spec2.parse(depName, depSpec, options);
|
|
12384
|
+
if (options.modifiers?.removesImporterEdge(importer, spec2)) {
|
|
12385
|
+
if (edge) removedEdges.add(edge);
|
|
12386
|
+
continue;
|
|
12387
|
+
}
|
|
12353
12388
|
if (spec2.type === "workspace" && !edge?.to) {
|
|
12354
12389
|
const wsExists = [...graph.importers].some(
|
|
12355
12390
|
(n) => n.name === depName
|
|
@@ -12455,6 +12490,7 @@ var getImporterSpecs = (options) => {
|
|
|
12455
12490
|
return {
|
|
12456
12491
|
add: addResult,
|
|
12457
12492
|
remove: removeResult,
|
|
12493
|
+
removedEdges,
|
|
12458
12494
|
staleSpecs,
|
|
12459
12495
|
transientAdd,
|
|
12460
12496
|
transientRemove
|
|
@@ -13768,6 +13804,12 @@ var fetchManifestsForDeps = async (packageInfo, graph, fromNode, deps, scurry, o
|
|
|
13768
13804
|
if (queryModifier && completeModifier && "spec" in activeModifier.modifier) {
|
|
13769
13805
|
spec2 = activeModifier.modifier.spec;
|
|
13770
13806
|
if (spec2.bareSpec === "-") {
|
|
13807
|
+
if (isExplicit) {
|
|
13808
|
+
throw error(
|
|
13809
|
+
`Cannot add ${originalSpec.name}: it is removed by a graph modifier`,
|
|
13810
|
+
{ code: "ECONFIG", found: queryModifier }
|
|
13811
|
+
);
|
|
13812
|
+
}
|
|
13771
13813
|
continue;
|
|
13772
13814
|
}
|
|
13773
13815
|
}
|
|
@@ -13880,6 +13922,8 @@ var fetchManifestsForDeps = async (packageInfo, graph, fromNode, deps, scurry, o
|
|
|
13880
13922
|
throw er;
|
|
13881
13923
|
})
|
|
13882
13924
|
);
|
|
13925
|
+
manifestPromise.catch(() => {
|
|
13926
|
+
});
|
|
13883
13927
|
const fetchTask = {
|
|
13884
13928
|
spec: spec2,
|
|
13885
13929
|
type: type2,
|
|
@@ -13894,6 +13938,7 @@ var fetchManifestsForDeps = async (packageInfo, graph, fromNode, deps, scurry, o
|
|
|
13894
13938
|
};
|
|
13895
13939
|
fetchTasks.push(fetchTask);
|
|
13896
13940
|
}
|
|
13941
|
+
await Promise.all(fetchTasks.map((t) => t.manifestPromise));
|
|
13897
13942
|
for (const fetchTask of fetchTasks) {
|
|
13898
13943
|
const manifest = await fetchTask.manifestPromise;
|
|
13899
13944
|
placementTasks.push({
|
|
@@ -14293,7 +14338,11 @@ var refreshIdealGraph = async ({
|
|
|
14293
14338
|
transientAdd,
|
|
14294
14339
|
transientRemove,
|
|
14295
14340
|
explicit
|
|
14296
|
-
)
|
|
14341
|
+
).catch((er) => {
|
|
14342
|
+
for (const p of extractPromises ?? []) p.catch(() => {
|
|
14343
|
+
});
|
|
14344
|
+
throw er;
|
|
14345
|
+
});
|
|
14297
14346
|
}
|
|
14298
14347
|
graph.lockedResolutions = void 0;
|
|
14299
14348
|
for (const importer of graph.importers) {
|
|
@@ -14351,6 +14400,12 @@ var buildIdealFromStartingGraph = async (options) => {
|
|
|
14351
14400
|
if (importerSpecs.staleSpecs.size) {
|
|
14352
14401
|
options.graph.lockfileStale = true;
|
|
14353
14402
|
}
|
|
14403
|
+
for (const edge of importerSpecs.removedEdges) {
|
|
14404
|
+
edge.from.edgesOut.delete(edge.name);
|
|
14405
|
+
edge.to?.edgesIn.delete(edge);
|
|
14406
|
+
options.graph.edges.delete(edge);
|
|
14407
|
+
options.graph.lockfileStale = true;
|
|
14408
|
+
}
|
|
14354
14409
|
await refreshIdealGraph({
|
|
14355
14410
|
...options,
|
|
14356
14411
|
explicit,
|
|
@@ -15258,7 +15313,7 @@ var reify = async (options) => {
|
|
|
15258
15313
|
);
|
|
15259
15314
|
const noModifiedDependencies = !options.add?.modifiedDependencies && !options.remove?.modifiedDependencies;
|
|
15260
15315
|
const hasLockfiles = !!scurry.lstatSync("vlt-lock.json") && !!scurry.lstatSync("node_modules/.vlt-lock.json");
|
|
15261
|
-
const skipOptionalOnly = noModifiedDependencies && diff2.optionalOnly;
|
|
15316
|
+
const skipOptionalOnly = noModifiedDependencies && diff2.optionalOnly && !diff2.nodes.delete.size && !diff2.edges.delete.size;
|
|
15262
15317
|
const skippable = skipOptionalOnly && !options.update && hasLockfiles;
|
|
15263
15318
|
const res = { diff: diff2 };
|
|
15264
15319
|
if (!diff2.hasChanges() || skippable) {
|
|
@@ -15395,6 +15450,7 @@ var uninstall = async (options, remove) => {
|
|
|
15395
15450
|
remove,
|
|
15396
15451
|
mainManifest,
|
|
15397
15452
|
loadManifests: true,
|
|
15453
|
+
modifiers,
|
|
15398
15454
|
remover
|
|
15399
15455
|
});
|
|
15400
15456
|
if (options.lockfileOnly) {
|
|
@@ -15417,6 +15473,7 @@ var uninstall = async (options, remove) => {
|
|
|
15417
15473
|
actual: act,
|
|
15418
15474
|
graph,
|
|
15419
15475
|
loadManifests: true,
|
|
15476
|
+
modifiers,
|
|
15420
15477
|
remover
|
|
15421
15478
|
});
|
|
15422
15479
|
return { graph, diff: diff2 };
|
|
@@ -15702,7 +15759,7 @@ var install = async (options, add) => {
|
|
|
15702
15759
|
}
|
|
15703
15760
|
}
|
|
15704
15761
|
}
|
|
15705
|
-
if (importerSpecs.add.modifiedDependencies || importerSpecs.remove.modifiedDependencies || specChanges.length > 0 || lockfileGraph.optionsChanged) {
|
|
15762
|
+
if (importerSpecs.add.modifiedDependencies || importerSpecs.remove.modifiedDependencies || importerSpecs.removedEdges.size > 0 || specChanges.length > 0 || lockfileGraph.optionsChanged) {
|
|
15706
15763
|
const details = [];
|
|
15707
15764
|
if (lockfileGraph.optionsChanged) {
|
|
15708
15765
|
details.push(" Configuration options have changed:");
|
|
@@ -15738,6 +15795,11 @@ var install = async (options, add) => {
|
|
|
15738
15795
|
);
|
|
15739
15796
|
}
|
|
15740
15797
|
}
|
|
15798
|
+
for (const edge of importerSpecs.removedEdges) {
|
|
15799
|
+
details.push(
|
|
15800
|
+
` ${edge.from.location}: ${edge.name} is removed by a graph modifier`
|
|
15801
|
+
);
|
|
15802
|
+
}
|
|
15741
15803
|
const lockfilePath = resolve13(
|
|
15742
15804
|
options.projectRoot,
|
|
15743
15805
|
"vlt-lock.json"
|
|
@@ -15750,6 +15812,27 @@ var install = async (options, add) => {
|
|
|
15750
15812
|
);
|
|
15751
15813
|
}
|
|
15752
15814
|
}
|
|
15815
|
+
if (modifiers && add?.modifiedDependencies) {
|
|
15816
|
+
const wsIds = new Set(
|
|
15817
|
+
[...fullMonorepo?.values() ?? []].map((ws) => ws.id)
|
|
15818
|
+
);
|
|
15819
|
+
for (const [id2, deps] of add) {
|
|
15820
|
+
const mainImporter = id2 === joinDepIDTuple(["file", "."]);
|
|
15821
|
+
if (!mainImporter && !wsIds.has(id2)) continue;
|
|
15822
|
+
for (const { spec: spec2 } of deps.values()) {
|
|
15823
|
+
const found = modifiers.removesImporterEdge(
|
|
15824
|
+
{ importer: true, mainImporter },
|
|
15825
|
+
spec2
|
|
15826
|
+
);
|
|
15827
|
+
if (found) {
|
|
15828
|
+
throw error(
|
|
15829
|
+
`Cannot add ${spec2.name}: it is removed by a graph modifier`,
|
|
15830
|
+
{ code: "ECONFIG", found }
|
|
15831
|
+
);
|
|
15832
|
+
}
|
|
15833
|
+
}
|
|
15834
|
+
}
|
|
15835
|
+
}
|
|
15753
15836
|
const remover = new RollbackRemove();
|
|
15754
15837
|
if (options.cleanInstall) {
|
|
15755
15838
|
const nodeModulesPath = resolve13(
|
|
@@ -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
|
openUrl
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-TPRK6IDA.js";
|
|
15
15
|
import {
|
|
16
16
|
stderr
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-FZUYGJZU.js";
|
|
18
18
|
import {
|
|
19
19
|
mermaidOutput
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-OVPHE4O7.js";
|
|
21
21
|
import {
|
|
22
22
|
ViewClass
|
|
23
23
|
} from "./chunk-4KCU2KZL.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
|
Spec as Spec2
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-5IJTPZXP.js";
|
|
15
15
|
import {
|
|
16
16
|
Spec,
|
|
17
17
|
currentDefaultRegistryName,
|
|
18
18
|
defaultRegistryName
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-FLH4YC6W.js";
|
|
20
20
|
import {
|
|
21
21
|
error
|
|
22
22
|
} from "./chunk-WZWDS3W4.js";
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
} from "./chunk-WGDTG44V.js";
|
|
15
15
|
import {
|
|
16
16
|
commandAliases
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-WF6KLKRN.js";
|
|
18
18
|
|
|
19
19
|
// ../../node_modules/.vlt/~npm~package-json-from-dist@1.0.1/node_modules/package-json-from-dist/dist/esm/index.js
|
|
20
20
|
import { readFileSync } from "node:fs";
|
|
@@ -0,0 +1,76 @@
|
|
|
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-422UGEWN.js"),
|
|
22
|
+
"./commands/bugs.ts": () => import("./bugs-RED7Y33Q.js"),
|
|
23
|
+
"./commands/build.ts": () => import("./build-IHMPBWRO.js"),
|
|
24
|
+
"./commands/cache.ts": () => import("./cache-FJP2RZJX.js"),
|
|
25
|
+
"./commands/ci.ts": () => import("./ci-YSKNNO5M.js"),
|
|
26
|
+
"./commands/config.ts": () => import("./config-HO7GY3QT.js"),
|
|
27
|
+
"./commands/create.ts": () => import("./create-2TJT3AHJ.js"),
|
|
28
|
+
"./commands/deprecate.ts": () => import("./deprecate-7FRJI2RL.js"),
|
|
29
|
+
"./commands/dist-tag.ts": () => import("./dist-tag-WCFF5OEG.js"),
|
|
30
|
+
"./commands/docs.ts": () => import("./docs-JMBPTU23.js"),
|
|
31
|
+
"./commands/exec-cache.ts": () => import("./exec-cache-X3ZWM5S3.js"),
|
|
32
|
+
"./commands/exec-local.ts": () => import("./exec-local-Y3KQC22N.js"),
|
|
33
|
+
"./commands/exec.ts": () => import("./exec-FBOUKZZ2.js"),
|
|
34
|
+
"./commands/help.ts": () => import("./help-PUKVH5X7.js"),
|
|
35
|
+
"./commands/init.ts": () => import("./init-GOKAQXXZ.js"),
|
|
36
|
+
"./commands/install.ts": () => import("./install-XFN4UFOC.js"),
|
|
37
|
+
"./commands/install/reporter.ts": () => import("./reporter-5NYOHBO7.js"),
|
|
38
|
+
"./commands/list.ts": () => import("./list-43JFFG5D.js"),
|
|
39
|
+
"./commands/login.ts": () => import("./login-RSTZKNKN.js"),
|
|
40
|
+
"./commands/logout.ts": () => import("./logout-4576FFXZ.js"),
|
|
41
|
+
"./commands/outdated.ts": () => import("./outdated-ACQ5A2Y7.js"),
|
|
42
|
+
"./commands/pack.ts": () => import("./pack-QQVJ3G25.js"),
|
|
43
|
+
"./commands/ping.ts": () => import("./ping-QCDQQRO5.js"),
|
|
44
|
+
"./commands/pkg.ts": () => import("./pkg-CSOJV7UC.js"),
|
|
45
|
+
"./commands/profile.ts": () => import("./profile-VL4HPW3N.js"),
|
|
46
|
+
"./commands/publish.ts": () => import("./publish-2YBO6ZXE.js"),
|
|
47
|
+
"./commands/query.ts": () => import("./query-IHHFMJRT.js"),
|
|
48
|
+
"./commands/registry.ts": () => import("./registry-W7BRZZZ2.js"),
|
|
49
|
+
"./commands/repo.ts": () => import("./repo-L3BXAAWS.js"),
|
|
50
|
+
"./commands/run-exec.ts": () => import("./run-exec-5W3XWQZA.js"),
|
|
51
|
+
"./commands/run.ts": () => import("./run-AMUUVLTI.js"),
|
|
52
|
+
"./commands/setup.ts": () => import("./setup-TFM4GJF7.js"),
|
|
53
|
+
"./commands/token.ts": () => import("./token-OANOBE3G.js"),
|
|
54
|
+
"./commands/uninstall.ts": () => import("./uninstall-YXTQ4AIZ.js"),
|
|
55
|
+
"./commands/unpublish.ts": () => import("./unpublish-SZXYMYIU.js"),
|
|
56
|
+
"./commands/update.ts": () => import("./update-FHLMWGIM.js"),
|
|
57
|
+
"./commands/version.ts": () => import("./version-ZWFCTU5V.js"),
|
|
58
|
+
"./commands/view.ts": () => import("./view-NFNJXMLV.js"),
|
|
59
|
+
"./commands/whoami.ts": () => import("./whoami-O7GOSGCI.js")
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
// ../../src/cli-sdk/src/load-command.ts
|
|
63
|
+
var loadCommand = async (command) => {
|
|
64
|
+
try {
|
|
65
|
+
return await globImport_commands_ts(`./commands/${command}.ts`);
|
|
66
|
+
} catch (e) {
|
|
67
|
+
throw error("Could not load command", {
|
|
68
|
+
found: command,
|
|
69
|
+
cause: e
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
export {
|
|
75
|
+
loadCommand
|
|
76
|
+
};
|