@vltpkg/cli-js 1.4.0 → 1.6.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-422UGEWN.js → access-AJ654YKY.js} +13 -12
- package/{bugs-RED7Y33Q.js → bugs-N73DVYHD.js} +32 -25
- package/{build-IHMPBWRO.js → build-VZ3EZKMM.js} +65 -21
- package/{cache-FJP2RZJX.js → cache-VROEWG2C.js} +20 -17
- package/cache-unzip-src-unzip.js +58 -15
- package/{chunk-TPRK6IDA.js → chunk-22LZBDEC.js} +2 -2
- package/chunk-36UIE654.js +6248 -0
- package/{chunk-UGCKF5ZE.js → chunk-3JIN46K5.js} +1 -1
- package/{chunk-OAJ3PO3Z.js → chunk-44AWMA4F.js} +25 -13
- package/chunk-4E65BBTM.js +77 -0
- package/{chunk-SR2VOY5J.js → chunk-4GMNWW4C.js} +1 -1
- package/{chunk-5IJTPZXP.js → chunk-6D3QAFNZ.js} +1 -1
- package/{chunk-X4FVR4R5.js → chunk-75HGJVNG.js} +12 -10
- package/{chunk-THSYN5EK.js → chunk-7M2VTFLP.js} +12 -1
- package/{chunk-2AMOC4DN.js → chunk-ANW36H4T.js} +4 -4
- package/chunk-B6RIGNEO.js +626 -0
- package/{chunk-FLH4YC6W.js → chunk-BF5DRGRZ.js} +60 -15
- package/chunk-BH5CVXNY.js +115 -0
- package/{chunk-PLG3OYCX.js → chunk-CAV7FKWQ.js} +3 -2
- package/{chunk-C23TDXRG.js → chunk-CYK6I4M6.js} +1 -1
- package/chunk-DXED4ARV.js +436 -0
- package/chunk-E74WGW5C.js +49 -0
- package/{chunk-WF6KLKRN.js → chunk-EFHOWRKU.js} +103 -1
- package/chunk-EMTGRCSE.js +1111 -0
- package/{chunk-5Y4SYLJ2.js → chunk-EYGOEAJM.js} +1 -1
- package/{chunk-OVPHE4O7.js → chunk-F5LZMLAQ.js} +5335 -10902
- package/{chunk-HZXJ423P.js → chunk-FXD3IV2S.js} +4 -2
- package/chunk-GCTREKA4.js +115 -0
- package/{chunk-ZJMJ7MCT.js → chunk-GEQFMH5M.js} +1 -1
- package/{chunk-ISE4IRHF.js → chunk-GZVI75KX.js} +7 -14
- package/chunk-HOF7LEIC.js +24 -0
- package/{chunk-LHPEBLOU.js → chunk-HT6FS4VB.js} +1 -1
- package/{chunk-PHJJPY5G.js → chunk-IXAMCWIT.js} +5 -5
- package/{chunk-ASLX43R3.js → chunk-JCNI6ZHH.js} +7 -5
- package/chunk-JV5XR5JQ.js +349 -0
- package/{chunk-7T3XAYP4.js → chunk-KD5ZK72K.js} +1 -1
- package/{chunk-FZUYGJZU.js → chunk-KVWGMSPW.js} +137 -19
- package/{chunk-TO23PR7J.js → chunk-LCLRP64K.js} +14 -12
- package/{chunk-QCSUWACA.js → chunk-LGQVZTYR.js} +8 -36
- package/{chunk-5RHABCYI.js → chunk-LP3ORD3D.js} +143 -17
- package/chunk-MCDLJZXT.js +82 -0
- package/{chunk-DNRR3XMG.js → chunk-N6HV7JWC.js} +1 -1
- package/chunk-O6MQ7NN6.js +1155 -0
- package/{chunk-GIIAODRI.js → chunk-PC2HOBAQ.js} +7 -5
- package/{chunk-APMYKJI2.js → chunk-QNHBAGXQ.js} +1 -1
- package/chunk-RBQO54TG.js +59 -0
- package/chunk-SUU2WETN.js +268 -0
- package/{chunk-I7UMHYZX.js → chunk-TQQO2F56.js} +113 -1187
- package/{chunk-4UCADW6S.js → chunk-TWDSXQPN.js} +9 -7
- package/{chunk-MKWPTN3C.js → chunk-VLVMLSIF.js} +2 -2
- package/chunk-W4T5CGCO.js +52 -0
- package/{chunk-5TNXLRW2.js → chunk-YTDABXPD.js} +50 -12
- package/{ci-YSKNNO5M.js → ci-3BVMVQIT.js} +35 -13
- package/cli-package.json +3 -1
- package/{config-HO7GY3QT.js → config-2KQV7N5A.js} +16 -13
- package/{config-CSPCDMR3.js → config-EKHBW6I5.js} +12 -9
- package/{create-2TJT3AHJ.js → create-QVHNOIV3.js} +35 -29
- package/{deprecate-7FRJI2RL.js → deprecate-E254QBH6.js} +17 -15
- package/{dist-tag-WCFF5OEG.js → dist-tag-SITRFD7O.js} +13 -12
- package/{docs-JMBPTU23.js → docs-IDL2P7CA.js} +32 -25
- package/{exec-FBOUKZZ2.js → exec-7BK2W2WL.js} +35 -29
- package/{exec-cache-X3ZWM5S3.js → exec-cache-VY46L7DR.js} +27 -21
- package/{exec-local-Y3KQC22N.js → exec-local-D7R5T3DF.js} +26 -20
- package/{help-PUKVH5X7.js → help-RMRIEJQL.js} +6 -5
- package/{init-GOKAQXXZ.js → init-BGW4HJ6V.js} +15 -11
- package/{install-XFN4UFOC.js → install-U5GATZ2N.js} +144 -49
- package/{list-43JFFG5D.js → list-3VG4M2XL.js} +41 -28
- package/{login-RSTZKNKN.js → login-PHQWI6S6.js} +19 -16
- package/{logout-4576FFXZ.js → logout-DJCOGRFF.js} +13 -12
- package/{outdated-ACQ5A2Y7.js → outdated-JH3O6R3Y.js} +27 -22
- package/{pack-QQVJ3G25.js → pack-U5W5YWHK.js} +23 -18
- package/package.json +1 -1
- package/{ping-QCDQQRO5.js → ping-EKX43AOW.js} +13 -12
- package/{pkg-CSOJV7UC.js → pkg-SW5GMERT.js} +19 -14
- package/{profile-VL4HPW3N.js → profile-UGDRDMQ6.js} +13 -12
- package/{publish-2YBO6ZXE.js → publish-HTWKK3NN.js} +60 -45
- package/{query-IHHFMJRT.js → query-YE3FUVGG.js} +43 -30
- package/{registry-W7BRZZZ2.js → registry-ZGGWVLBM.js} +7 -7
- package/registry-client-src-revalidate.js +76 -22
- package/{repo-L3BXAAWS.js → repo-WDOCU6SE.js} +32 -25
- package/{reporter-5NYOHBO7.js → reporter-N5PAXB26.js} +121 -17
- package/{run-AMUUVLTI.js → run-IPARVIIQ.js} +26 -20
- package/{run-exec-5W3XWQZA.js → run-exec-C4RTREEW.js} +26 -20
- package/security-archive-src-update-expired.js +66 -21
- package/{setup-TFM4GJF7.js → setup-SYYUEHZL.js} +212 -32
- package/skills-KA2VR5Q5.js +480 -0
- package/skills-UBBMSBDQ.js +416 -0
- package/{src-4CYCUWZL.js → src-FUSTSM4J.js} +33 -22
- package/{src-I3GMULFP.js → src-QO5G2S4O.js} +11 -8
- package/{src-LUTN2ODD.js → src-W2VQULRG.js} +2 -2
- package/{token-OANOBE3G.js → token-UQNABECH.js} +15 -13
- package/{uninstall-YXTQ4AIZ.js → uninstall-FHBJ3OUV.js} +59 -18
- package/{unpublish-SZXYMYIU.js → unpublish-APJTEUBA.js} +31 -16
- package/{update-FHLMWGIM.js → update-NWZTL4S7.js} +52 -25
- package/{version-ZWFCTU5V.js → version-EMKKTL77.js} +20 -14
- package/{view-NFNJXMLV.js → view-BUUI33RV.js} +17 -15
- 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-O7GOSGCI.js → whoami-F6BSXGQ2.js} +13 -12
- package/chunk-G2YT2GWF.js +0 -120
- package/chunk-T6FBP4OU.js +0 -76
- package/chunk-U7TEQCBN.js +0 -880
|
@@ -13,1110 +13,34 @@ import {
|
|
|
13
13
|
graphRun,
|
|
14
14
|
graphRunSync,
|
|
15
15
|
joinDepIDTuple
|
|
16
|
-
} from "./chunk-
|
|
17
|
-
import {
|
|
18
|
-
Spec
|
|
19
|
-
} from "./chunk-5IJTPZXP.js";
|
|
16
|
+
} from "./chunk-CAV7FKWQ.js";
|
|
20
17
|
import {
|
|
21
18
|
load,
|
|
22
|
-
parse
|
|
19
|
+
parse,
|
|
23
20
|
stringify,
|
|
24
21
|
walkUp
|
|
25
22
|
} from "./chunk-HTOTG4TS.js";
|
|
26
23
|
import {
|
|
27
|
-
I
|
|
28
|
-
|
|
29
|
-
whichSync
|
|
30
|
-
} from "./chunk-U7TEQCBN.js";
|
|
24
|
+
I
|
|
25
|
+
} from "./chunk-B6RIGNEO.js";
|
|
31
26
|
import {
|
|
32
27
|
ot,
|
|
33
28
|
ts
|
|
34
29
|
} from "./chunk-Y5PA7DVK.js";
|
|
35
30
|
import {
|
|
36
|
-
Range,
|
|
37
|
-
Version,
|
|
38
31
|
asManifest,
|
|
39
|
-
isRange,
|
|
40
|
-
isSpec,
|
|
41
32
|
longDependencyTypes,
|
|
42
33
|
normalizeManifest,
|
|
43
|
-
parse,
|
|
44
34
|
parseRange,
|
|
45
35
|
satisfies
|
|
46
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-BF5DRGRZ.js";
|
|
47
37
|
import {
|
|
48
38
|
error
|
|
49
39
|
} from "./chunk-WZWDS3W4.js";
|
|
50
|
-
import {
|
|
51
|
-
__commonJS,
|
|
52
|
-
__toESM
|
|
53
|
-
} from "./chunk-PZLD7RTK.js";
|
|
54
|
-
|
|
55
|
-
// ../../node_modules/.vlt/~npm~err-code@2.0.3/node_modules/err-code/index.js
|
|
56
|
-
var require_err_code = __commonJS({
|
|
57
|
-
"../../node_modules/.vlt/~npm~err-code@2.0.3/node_modules/err-code/index.js"(exports, module) {
|
|
58
|
-
"use strict";
|
|
59
|
-
function assign(obj, props) {
|
|
60
|
-
for (const key in props) {
|
|
61
|
-
Object.defineProperty(obj, key, {
|
|
62
|
-
value: props[key],
|
|
63
|
-
enumerable: true,
|
|
64
|
-
configurable: true
|
|
65
|
-
});
|
|
66
|
-
}
|
|
67
|
-
return obj;
|
|
68
|
-
}
|
|
69
|
-
function createError(err, code, props) {
|
|
70
|
-
if (!err || typeof err === "string") {
|
|
71
|
-
throw new TypeError("Please pass an Error to err-code");
|
|
72
|
-
}
|
|
73
|
-
if (!props) {
|
|
74
|
-
props = {};
|
|
75
|
-
}
|
|
76
|
-
if (typeof code === "object") {
|
|
77
|
-
props = code;
|
|
78
|
-
code = void 0;
|
|
79
|
-
}
|
|
80
|
-
if (code != null) {
|
|
81
|
-
props.code = code;
|
|
82
|
-
}
|
|
83
|
-
try {
|
|
84
|
-
return assign(err, props);
|
|
85
|
-
} catch (_) {
|
|
86
|
-
props.message = err.message;
|
|
87
|
-
props.stack = err.stack;
|
|
88
|
-
const ErrClass = function() {
|
|
89
|
-
};
|
|
90
|
-
ErrClass.prototype = Object.create(Object.getPrototypeOf(err));
|
|
91
|
-
return assign(new ErrClass(), props);
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
module.exports = createError;
|
|
95
|
-
}
|
|
96
|
-
});
|
|
97
|
-
|
|
98
|
-
// ../../node_modules/.vlt/~npm~retry@0.12.0/node_modules/retry/lib/retry_operation.js
|
|
99
|
-
var require_retry_operation = __commonJS({
|
|
100
|
-
"../../node_modules/.vlt/~npm~retry@0.12.0/node_modules/retry/lib/retry_operation.js"(exports, module) {
|
|
101
|
-
function RetryOperation(timeouts, options) {
|
|
102
|
-
if (typeof options === "boolean") {
|
|
103
|
-
options = { forever: options };
|
|
104
|
-
}
|
|
105
|
-
this._originalTimeouts = JSON.parse(JSON.stringify(timeouts));
|
|
106
|
-
this._timeouts = timeouts;
|
|
107
|
-
this._options = options || {};
|
|
108
|
-
this._maxRetryTime = options && options.maxRetryTime || Infinity;
|
|
109
|
-
this._fn = null;
|
|
110
|
-
this._errors = [];
|
|
111
|
-
this._attempts = 1;
|
|
112
|
-
this._operationTimeout = null;
|
|
113
|
-
this._operationTimeoutCb = null;
|
|
114
|
-
this._timeout = null;
|
|
115
|
-
this._operationStart = null;
|
|
116
|
-
if (this._options.forever) {
|
|
117
|
-
this._cachedTimeouts = this._timeouts.slice(0);
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
module.exports = RetryOperation;
|
|
121
|
-
RetryOperation.prototype.reset = function() {
|
|
122
|
-
this._attempts = 1;
|
|
123
|
-
this._timeouts = this._originalTimeouts;
|
|
124
|
-
};
|
|
125
|
-
RetryOperation.prototype.stop = function() {
|
|
126
|
-
if (this._timeout) {
|
|
127
|
-
clearTimeout(this._timeout);
|
|
128
|
-
}
|
|
129
|
-
this._timeouts = [];
|
|
130
|
-
this._cachedTimeouts = null;
|
|
131
|
-
};
|
|
132
|
-
RetryOperation.prototype.retry = function(err) {
|
|
133
|
-
if (this._timeout) {
|
|
134
|
-
clearTimeout(this._timeout);
|
|
135
|
-
}
|
|
136
|
-
if (!err) {
|
|
137
|
-
return false;
|
|
138
|
-
}
|
|
139
|
-
var currentTime = (/* @__PURE__ */ new Date()).getTime();
|
|
140
|
-
if (err && currentTime - this._operationStart >= this._maxRetryTime) {
|
|
141
|
-
this._errors.unshift(new Error("RetryOperation timeout occurred"));
|
|
142
|
-
return false;
|
|
143
|
-
}
|
|
144
|
-
this._errors.push(err);
|
|
145
|
-
var timeout = this._timeouts.shift();
|
|
146
|
-
if (timeout === void 0) {
|
|
147
|
-
if (this._cachedTimeouts) {
|
|
148
|
-
this._errors.splice(this._errors.length - 1, this._errors.length);
|
|
149
|
-
this._timeouts = this._cachedTimeouts.slice(0);
|
|
150
|
-
timeout = this._timeouts.shift();
|
|
151
|
-
} else {
|
|
152
|
-
return false;
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
var self = this;
|
|
156
|
-
var timer = setTimeout(function() {
|
|
157
|
-
self._attempts++;
|
|
158
|
-
if (self._operationTimeoutCb) {
|
|
159
|
-
self._timeout = setTimeout(function() {
|
|
160
|
-
self._operationTimeoutCb(self._attempts);
|
|
161
|
-
}, self._operationTimeout);
|
|
162
|
-
if (self._options.unref) {
|
|
163
|
-
self._timeout.unref();
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
self._fn(self._attempts);
|
|
167
|
-
}, timeout);
|
|
168
|
-
if (this._options.unref) {
|
|
169
|
-
timer.unref();
|
|
170
|
-
}
|
|
171
|
-
return true;
|
|
172
|
-
};
|
|
173
|
-
RetryOperation.prototype.attempt = function(fn, timeoutOps) {
|
|
174
|
-
this._fn = fn;
|
|
175
|
-
if (timeoutOps) {
|
|
176
|
-
if (timeoutOps.timeout) {
|
|
177
|
-
this._operationTimeout = timeoutOps.timeout;
|
|
178
|
-
}
|
|
179
|
-
if (timeoutOps.cb) {
|
|
180
|
-
this._operationTimeoutCb = timeoutOps.cb;
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
var self = this;
|
|
184
|
-
if (this._operationTimeoutCb) {
|
|
185
|
-
this._timeout = setTimeout(function() {
|
|
186
|
-
self._operationTimeoutCb();
|
|
187
|
-
}, self._operationTimeout);
|
|
188
|
-
}
|
|
189
|
-
this._operationStart = (/* @__PURE__ */ new Date()).getTime();
|
|
190
|
-
this._fn(this._attempts);
|
|
191
|
-
};
|
|
192
|
-
RetryOperation.prototype.try = function(fn) {
|
|
193
|
-
console.log("Using RetryOperation.try() is deprecated");
|
|
194
|
-
this.attempt(fn);
|
|
195
|
-
};
|
|
196
|
-
RetryOperation.prototype.start = function(fn) {
|
|
197
|
-
console.log("Using RetryOperation.start() is deprecated");
|
|
198
|
-
this.attempt(fn);
|
|
199
|
-
};
|
|
200
|
-
RetryOperation.prototype.start = RetryOperation.prototype.try;
|
|
201
|
-
RetryOperation.prototype.errors = function() {
|
|
202
|
-
return this._errors;
|
|
203
|
-
};
|
|
204
|
-
RetryOperation.prototype.attempts = function() {
|
|
205
|
-
return this._attempts;
|
|
206
|
-
};
|
|
207
|
-
RetryOperation.prototype.mainError = function() {
|
|
208
|
-
if (this._errors.length === 0) {
|
|
209
|
-
return null;
|
|
210
|
-
}
|
|
211
|
-
var counts = {};
|
|
212
|
-
var mainError = null;
|
|
213
|
-
var mainErrorCount = 0;
|
|
214
|
-
for (var i = 0; i < this._errors.length; i++) {
|
|
215
|
-
var error2 = this._errors[i];
|
|
216
|
-
var message = error2.message;
|
|
217
|
-
var count = (counts[message] || 0) + 1;
|
|
218
|
-
counts[message] = count;
|
|
219
|
-
if (count >= mainErrorCount) {
|
|
220
|
-
mainError = error2;
|
|
221
|
-
mainErrorCount = count;
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
return mainError;
|
|
225
|
-
};
|
|
226
|
-
}
|
|
227
|
-
});
|
|
228
|
-
|
|
229
|
-
// ../../node_modules/.vlt/~npm~retry@0.12.0/node_modules/retry/lib/retry.js
|
|
230
|
-
var require_retry = __commonJS({
|
|
231
|
-
"../../node_modules/.vlt/~npm~retry@0.12.0/node_modules/retry/lib/retry.js"(exports) {
|
|
232
|
-
var RetryOperation = require_retry_operation();
|
|
233
|
-
exports.operation = function(options) {
|
|
234
|
-
var timeouts = exports.timeouts(options);
|
|
235
|
-
return new RetryOperation(timeouts, {
|
|
236
|
-
forever: options && options.forever,
|
|
237
|
-
unref: options && options.unref,
|
|
238
|
-
maxRetryTime: options && options.maxRetryTime
|
|
239
|
-
});
|
|
240
|
-
};
|
|
241
|
-
exports.timeouts = function(options) {
|
|
242
|
-
if (options instanceof Array) {
|
|
243
|
-
return [].concat(options);
|
|
244
|
-
}
|
|
245
|
-
var opts2 = {
|
|
246
|
-
retries: 10,
|
|
247
|
-
factor: 2,
|
|
248
|
-
minTimeout: 1 * 1e3,
|
|
249
|
-
maxTimeout: Infinity,
|
|
250
|
-
randomize: false
|
|
251
|
-
};
|
|
252
|
-
for (var key in options) {
|
|
253
|
-
opts2[key] = options[key];
|
|
254
|
-
}
|
|
255
|
-
if (opts2.minTimeout > opts2.maxTimeout) {
|
|
256
|
-
throw new Error("minTimeout is greater than maxTimeout");
|
|
257
|
-
}
|
|
258
|
-
var timeouts = [];
|
|
259
|
-
for (var i = 0; i < opts2.retries; i++) {
|
|
260
|
-
timeouts.push(this.createTimeout(i, opts2));
|
|
261
|
-
}
|
|
262
|
-
if (options && options.forever && !timeouts.length) {
|
|
263
|
-
timeouts.push(this.createTimeout(i, opts2));
|
|
264
|
-
}
|
|
265
|
-
timeouts.sort(function(a, b) {
|
|
266
|
-
return a - b;
|
|
267
|
-
});
|
|
268
|
-
return timeouts;
|
|
269
|
-
};
|
|
270
|
-
exports.createTimeout = function(attempt, opts2) {
|
|
271
|
-
var random = opts2.randomize ? Math.random() + 1 : 1;
|
|
272
|
-
var timeout = Math.round(random * opts2.minTimeout * Math.pow(opts2.factor, attempt));
|
|
273
|
-
timeout = Math.min(timeout, opts2.maxTimeout);
|
|
274
|
-
return timeout;
|
|
275
|
-
};
|
|
276
|
-
exports.wrap = function(obj, options, methods) {
|
|
277
|
-
if (options instanceof Array) {
|
|
278
|
-
methods = options;
|
|
279
|
-
options = null;
|
|
280
|
-
}
|
|
281
|
-
if (!methods) {
|
|
282
|
-
methods = [];
|
|
283
|
-
for (var key in obj) {
|
|
284
|
-
if (typeof obj[key] === "function") {
|
|
285
|
-
methods.push(key);
|
|
286
|
-
}
|
|
287
|
-
}
|
|
288
|
-
}
|
|
289
|
-
for (var i = 0; i < methods.length; i++) {
|
|
290
|
-
var method = methods[i];
|
|
291
|
-
var original = obj[method];
|
|
292
|
-
obj[method] = function retryWrapper(original2) {
|
|
293
|
-
var op = exports.operation(options);
|
|
294
|
-
var args = Array.prototype.slice.call(arguments, 1);
|
|
295
|
-
var callback = args.pop();
|
|
296
|
-
args.push(function(err) {
|
|
297
|
-
if (op.retry(err)) {
|
|
298
|
-
return;
|
|
299
|
-
}
|
|
300
|
-
if (err) {
|
|
301
|
-
arguments[0] = op.mainError();
|
|
302
|
-
}
|
|
303
|
-
callback.apply(this, arguments);
|
|
304
|
-
});
|
|
305
|
-
op.attempt(function() {
|
|
306
|
-
original2.apply(obj, args);
|
|
307
|
-
});
|
|
308
|
-
}.bind(obj, original);
|
|
309
|
-
obj[method].options = options;
|
|
310
|
-
}
|
|
311
|
-
};
|
|
312
|
-
}
|
|
313
|
-
});
|
|
314
|
-
|
|
315
|
-
// ../../node_modules/.vlt/~npm~retry@0.12.0/node_modules/retry/index.js
|
|
316
|
-
var require_retry2 = __commonJS({
|
|
317
|
-
"../../node_modules/.vlt/~npm~retry@0.12.0/node_modules/retry/index.js"(exports, module) {
|
|
318
|
-
module.exports = require_retry();
|
|
319
|
-
}
|
|
320
|
-
});
|
|
321
|
-
|
|
322
|
-
// ../../node_modules/.vlt/~npm~promise-retry@2.0.1/node_modules/promise-retry/index.js
|
|
323
|
-
var require_promise_retry = __commonJS({
|
|
324
|
-
"../../node_modules/.vlt/~npm~promise-retry@2.0.1/node_modules/promise-retry/index.js"(exports, module) {
|
|
325
|
-
"use strict";
|
|
326
|
-
var errcode = require_err_code();
|
|
327
|
-
var retry = require_retry2();
|
|
328
|
-
var hasOwn = Object.prototype.hasOwnProperty;
|
|
329
|
-
function isRetryError(err) {
|
|
330
|
-
return err && err.code === "EPROMISERETRY" && hasOwn.call(err, "retried");
|
|
331
|
-
}
|
|
332
|
-
function promiseRetry2(fn, options) {
|
|
333
|
-
var temp;
|
|
334
|
-
var operation;
|
|
335
|
-
if (typeof fn === "object" && typeof options === "function") {
|
|
336
|
-
temp = options;
|
|
337
|
-
options = fn;
|
|
338
|
-
fn = temp;
|
|
339
|
-
}
|
|
340
|
-
operation = retry.operation(options);
|
|
341
|
-
return new Promise(function(resolve6, reject) {
|
|
342
|
-
operation.attempt(function(number) {
|
|
343
|
-
Promise.resolve().then(function() {
|
|
344
|
-
return fn(function(err) {
|
|
345
|
-
if (isRetryError(err)) {
|
|
346
|
-
err = err.retried;
|
|
347
|
-
}
|
|
348
|
-
throw errcode(new Error("Retrying"), "EPROMISERETRY", { retried: err });
|
|
349
|
-
}, number);
|
|
350
|
-
}).then(resolve6, function(err) {
|
|
351
|
-
if (isRetryError(err)) {
|
|
352
|
-
err = err.retried;
|
|
353
|
-
if (operation.retry(err || new Error())) {
|
|
354
|
-
return;
|
|
355
|
-
}
|
|
356
|
-
}
|
|
357
|
-
reject(err);
|
|
358
|
-
});
|
|
359
|
-
});
|
|
360
|
-
});
|
|
361
|
-
}
|
|
362
|
-
module.exports = promiseRetry2;
|
|
363
|
-
}
|
|
364
|
-
});
|
|
365
|
-
|
|
366
|
-
// ../../src/pick-manifest/src/index.ts
|
|
367
|
-
import { readFileSync } from "node:fs";
|
|
368
|
-
var parsedNodeVersion = Version.parse(process.version);
|
|
369
|
-
var versionCache = /* @__PURE__ */ new Map();
|
|
370
|
-
var MAX_VERSION_CACHE = 32768;
|
|
371
|
-
var parsedVersion = (ver) => {
|
|
372
|
-
const cached = versionCache.get(ver);
|
|
373
|
-
if (cached !== void 0 || versionCache.has(ver)) return cached;
|
|
374
|
-
const parsed = parse(ver);
|
|
375
|
-
if (versionCache.size >= MAX_VERSION_CACHE) versionCache.clear();
|
|
376
|
-
versionCache.set(ver, parsed);
|
|
377
|
-
return parsed;
|
|
378
|
-
};
|
|
379
|
-
var isBefore = (version, before, verTimes) => {
|
|
380
|
-
if (!verTimes || !version || !before) return true;
|
|
381
|
-
const time = version && verTimes[version];
|
|
382
|
-
return !!time && Date.parse(time) <= before;
|
|
383
|
-
};
|
|
384
|
-
var checkList = (value, list) => {
|
|
385
|
-
if (typeof list === "string") {
|
|
386
|
-
list = [list];
|
|
387
|
-
}
|
|
388
|
-
if (!Array.isArray(list)) return true;
|
|
389
|
-
if (list.length === 1 && list[0] === "any") {
|
|
390
|
-
return true;
|
|
391
|
-
}
|
|
392
|
-
let negated = 0;
|
|
393
|
-
let match2 = false;
|
|
394
|
-
for (const entry of list) {
|
|
395
|
-
const negate = entry.startsWith("!");
|
|
396
|
-
const test = negate ? entry.slice(1) : entry;
|
|
397
|
-
if (negate) {
|
|
398
|
-
negated++;
|
|
399
|
-
if (value === test) {
|
|
400
|
-
return false;
|
|
401
|
-
}
|
|
402
|
-
} else {
|
|
403
|
-
match2 = match2 || value === test;
|
|
404
|
-
}
|
|
405
|
-
}
|
|
406
|
-
return match2 || negated === list.length;
|
|
407
|
-
};
|
|
408
|
-
var isMusl = (file) => file.includes("libc.musl-") || file.includes("ld-musl-");
|
|
409
|
-
var LDD_PATH = "/usr/bin/ldd";
|
|
410
|
-
var getFamilyFromFilesystem = () => {
|
|
411
|
-
try {
|
|
412
|
-
const content = readFileSync(LDD_PATH, "utf-8");
|
|
413
|
-
if (content.includes("musl")) {
|
|
414
|
-
return "musl";
|
|
415
|
-
}
|
|
416
|
-
if (content.includes("GNU C Library")) {
|
|
417
|
-
return "glibc";
|
|
418
|
-
}
|
|
419
|
-
return null;
|
|
420
|
-
} catch {
|
|
421
|
-
return void 0;
|
|
422
|
-
}
|
|
423
|
-
};
|
|
424
|
-
var getFamilyFromReport = () => {
|
|
425
|
-
try {
|
|
426
|
-
const processReport = process.report;
|
|
427
|
-
const originalExclude = processReport.excludeNetwork === true;
|
|
428
|
-
processReport.excludeNetwork = true;
|
|
429
|
-
const report = processReport.getReport();
|
|
430
|
-
processReport.excludeNetwork = originalExclude;
|
|
431
|
-
if (report?.header?.glibcRuntimeVersion) {
|
|
432
|
-
return "glibc";
|
|
433
|
-
}
|
|
434
|
-
if (Array.isArray(report?.sharedObjects) && report.sharedObjects.some(isMusl)) {
|
|
435
|
-
return "musl";
|
|
436
|
-
}
|
|
437
|
-
} catch {
|
|
438
|
-
}
|
|
439
|
-
return null;
|
|
440
|
-
};
|
|
441
|
-
var cachedLibcFamily = void 0;
|
|
442
|
-
var detectLibc = () => {
|
|
443
|
-
if (cachedLibcFamily !== void 0) {
|
|
444
|
-
return cachedLibcFamily ?? void 0;
|
|
445
|
-
}
|
|
446
|
-
if (process.platform !== "linux") {
|
|
447
|
-
cachedLibcFamily = null;
|
|
448
|
-
return void 0;
|
|
449
|
-
}
|
|
450
|
-
let family = getFamilyFromFilesystem();
|
|
451
|
-
if (!family) {
|
|
452
|
-
family = getFamilyFromReport();
|
|
453
|
-
}
|
|
454
|
-
cachedLibcFamily = family;
|
|
455
|
-
return family ?? void 0;
|
|
456
|
-
};
|
|
457
|
-
var platformCheck = (mani, nodeVersion, wantOs, wantArch, wantLibc) => {
|
|
458
|
-
const { engines, os, cpu, libc } = mani;
|
|
459
|
-
if (engines) {
|
|
460
|
-
const { node } = engines;
|
|
461
|
-
if (node && !satisfies(nodeVersion, node, true)) {
|
|
462
|
-
return false;
|
|
463
|
-
}
|
|
464
|
-
}
|
|
465
|
-
if (wantOs && !checkList(wantOs, os)) return false;
|
|
466
|
-
if (wantArch && !checkList(wantArch, cpu)) return false;
|
|
467
|
-
if (libc) {
|
|
468
|
-
const libcFamily = wantLibc ?? detectLibc();
|
|
469
|
-
if (!libcFamily) return false;
|
|
470
|
-
if (!checkList(libcFamily, libc)) return false;
|
|
471
|
-
}
|
|
472
|
-
return true;
|
|
473
|
-
};
|
|
474
|
-
var versionOk = (packument, version, nodeVersion, os, arch, libc, before) => {
|
|
475
|
-
const mani = packument.versions[version];
|
|
476
|
-
if (!mani) return false;
|
|
477
|
-
const { time } = packument;
|
|
478
|
-
return isBefore(version, before, time) && platformCheck(mani, nodeVersion, os, arch, libc);
|
|
479
|
-
};
|
|
480
|
-
function pickManifest(packument, wanted, opts2 = {}) {
|
|
481
|
-
const {
|
|
482
|
-
tag = "latest",
|
|
483
|
-
before,
|
|
484
|
-
"node-version": nodeVersion,
|
|
485
|
-
os = process.platform,
|
|
486
|
-
arch = process.arch,
|
|
487
|
-
libc
|
|
488
|
-
} = opts2;
|
|
489
|
-
const nv = !nodeVersion ? parsedNodeVersion : Version.parse(nodeVersion);
|
|
490
|
-
const libcFamily = libc ?? detectLibc();
|
|
491
|
-
const {
|
|
492
|
-
name,
|
|
493
|
-
time: verTimes,
|
|
494
|
-
versions: versions2,
|
|
495
|
-
"dist-tags": distTags2
|
|
496
|
-
} = packument;
|
|
497
|
-
const time = before && verTimes ? +new Date(before) : Infinity;
|
|
498
|
-
let range2 = void 0;
|
|
499
|
-
let spec = void 0;
|
|
500
|
-
if (typeof wanted === "object") {
|
|
501
|
-
if (isSpec(wanted)) {
|
|
502
|
-
const f = wanted.final;
|
|
503
|
-
range2 = f.range;
|
|
504
|
-
spec = f;
|
|
505
|
-
} else if (isRange(wanted)) {
|
|
506
|
-
range2 = wanted;
|
|
507
|
-
}
|
|
508
|
-
} else {
|
|
509
|
-
spec = Spec.parse(`${name}@${wanted}`).final;
|
|
510
|
-
range2 = spec.range;
|
|
511
|
-
}
|
|
512
|
-
if (!range2) {
|
|
513
|
-
if (!spec?.distTag) {
|
|
514
|
-
throw error(
|
|
515
|
-
"Only dist-tag or semver range specs are supported",
|
|
516
|
-
{ spec }
|
|
517
|
-
);
|
|
518
|
-
}
|
|
519
|
-
const ver = distTags2[spec.distTag];
|
|
520
|
-
if (!ver) return void 0;
|
|
521
|
-
const mani = versions2[ver];
|
|
522
|
-
if (mani && versionOk(packument, ver, nv, os, arch, libcFamily, time)) {
|
|
523
|
-
return mani;
|
|
524
|
-
} else {
|
|
525
|
-
range2 = new Range(`<=${ver}`);
|
|
526
|
-
}
|
|
527
|
-
}
|
|
528
|
-
if (range2.isAny) range2 = new Range("*", true);
|
|
529
|
-
const defaultVer = distTags2[tag];
|
|
530
|
-
const defTagVersion = defaultVer ? Version.parse(defaultVer) : void 0;
|
|
531
|
-
if (defaultVer && (range2.isAny || defTagVersion?.satisfies(range2)) && versionOk(packument, defaultVer, nv, os, arch, libcFamily, time)) {
|
|
532
|
-
return versions2[defaultVer];
|
|
533
|
-
}
|
|
534
|
-
const keys = Object.keys(versions2);
|
|
535
|
-
if (!keys.length) {
|
|
536
|
-
return void 0;
|
|
537
|
-
}
|
|
538
|
-
let found = void 0;
|
|
539
|
-
let foundIsDefTag = false;
|
|
540
|
-
for (const ver of keys) {
|
|
541
|
-
if (verTimes && (before ? !isBefore(ver, time, verTimes) : !verTimes[ver])) {
|
|
542
|
-
continue;
|
|
543
|
-
}
|
|
544
|
-
const mani = versions2[ver];
|
|
545
|
-
const version = parsedVersion(ver);
|
|
546
|
-
if (!version?.satisfies(range2)) {
|
|
547
|
-
continue;
|
|
548
|
-
}
|
|
549
|
-
const mc = {
|
|
550
|
-
version,
|
|
551
|
-
deprecated: !!mani.deprecated,
|
|
552
|
-
platform: platformCheck(mani, nv, os, arch, libcFamily),
|
|
553
|
-
prerelease: !!version.prerelease?.length,
|
|
554
|
-
mani
|
|
555
|
-
};
|
|
556
|
-
if (!found) {
|
|
557
|
-
found = mc;
|
|
558
|
-
if (defTagVersion?.equals(found.version)) {
|
|
559
|
-
foundIsDefTag = true;
|
|
560
|
-
}
|
|
561
|
-
continue;
|
|
562
|
-
}
|
|
563
|
-
const mok = !mc.deprecated && mc.platform;
|
|
564
|
-
const fok = !found.deprecated && found.platform;
|
|
565
|
-
if (mok !== fok) {
|
|
566
|
-
if (mok) {
|
|
567
|
-
found = mc;
|
|
568
|
-
foundIsDefTag = !!defTagVersion?.equals(mc.version);
|
|
569
|
-
}
|
|
570
|
-
} else if (mc.platform !== found.platform) {
|
|
571
|
-
if (mc.platform) {
|
|
572
|
-
found = mc;
|
|
573
|
-
foundIsDefTag = !!defTagVersion?.equals(mc.version);
|
|
574
|
-
}
|
|
575
|
-
} else if (mc.deprecated !== found.deprecated) {
|
|
576
|
-
if (!mc.deprecated) {
|
|
577
|
-
found = mc;
|
|
578
|
-
foundIsDefTag = !!defTagVersion?.equals(mc.version);
|
|
579
|
-
}
|
|
580
|
-
} else if (found.prerelease !== mc.prerelease) {
|
|
581
|
-
if (!mc.prerelease) {
|
|
582
|
-
found = mc;
|
|
583
|
-
foundIsDefTag = !!defTagVersion?.equals(mc.version);
|
|
584
|
-
}
|
|
585
|
-
} else if (defTagVersion?.equals(mc.version)) {
|
|
586
|
-
found = mc;
|
|
587
|
-
foundIsDefTag = true;
|
|
588
|
-
} else if (mc.version.greaterThan(found.version) && !foundIsDefTag) {
|
|
589
|
-
found = mc;
|
|
590
|
-
}
|
|
591
|
-
}
|
|
592
|
-
return found?.mani;
|
|
593
|
-
}
|
|
594
|
-
|
|
595
|
-
// ../../src/git/src/spawn.ts
|
|
596
|
-
var import_promise_retry = __toESM(require_promise_retry(), 1);
|
|
597
|
-
|
|
598
|
-
// ../../src/git/src/make-error.ts
|
|
599
|
-
var connectionErrorRe = new RegExp(
|
|
600
|
-
[
|
|
601
|
-
"remote error: Internal Server Error",
|
|
602
|
-
"The remote end hung up unexpectedly",
|
|
603
|
-
"Connection timed out",
|
|
604
|
-
"Operation timed out",
|
|
605
|
-
"Failed to connect to .* Timed out",
|
|
606
|
-
"Connection reset by peer",
|
|
607
|
-
"SSL_ERROR_SYSCALL",
|
|
608
|
-
"The requested URL returned error: 503"
|
|
609
|
-
].join("|")
|
|
610
|
-
);
|
|
611
|
-
var missingPathspecRe = /pathspec .* did not match any file\(s\) known to git/;
|
|
612
|
-
var makeError = (result) => connectionErrorRe.test(result.stderr) ? [
|
|
613
|
-
(n) => n < 3,
|
|
614
|
-
error("A git connection error occurred", result)
|
|
615
|
-
] : missingPathspecRe.test(result.stderr) ? [null, error("The git reference could not be found", result)] : [null, error("An unknown git error occurred", result)];
|
|
616
|
-
|
|
617
|
-
// ../../src/git/src/opts.ts
|
|
618
|
-
var gitEnv = {
|
|
619
|
-
GIT_ASKPASS: "echo",
|
|
620
|
-
GIT_SSH_COMMAND: "ssh -oStrictHostKeyChecking=accept-new"
|
|
621
|
-
};
|
|
622
|
-
var opts = (opts2 = {}) => ({
|
|
623
|
-
acceptFail: true,
|
|
624
|
-
...opts2,
|
|
625
|
-
env: opts2.env ?? { ...gitEnv, ...process.env },
|
|
626
|
-
stdio: "pipe",
|
|
627
|
-
stdioString: true,
|
|
628
|
-
shell: false
|
|
629
|
-
});
|
|
630
|
-
|
|
631
|
-
// ../../src/git/src/which.ts
|
|
632
|
-
var gitPath = void 0;
|
|
633
|
-
var which = (opts2 = {}) => {
|
|
634
|
-
if (opts2.git) {
|
|
635
|
-
return opts2.git;
|
|
636
|
-
}
|
|
637
|
-
let whichError = void 0;
|
|
638
|
-
if (opts2.git !== false) {
|
|
639
|
-
if (!gitPath) {
|
|
640
|
-
try {
|
|
641
|
-
gitPath = whichSync("git");
|
|
642
|
-
} catch (er) {
|
|
643
|
-
whichError = er;
|
|
644
|
-
}
|
|
645
|
-
}
|
|
646
|
-
}
|
|
647
|
-
if (!gitPath || opts2.git === false) {
|
|
648
|
-
return error(
|
|
649
|
-
"No git binary found in $PATH",
|
|
650
|
-
{
|
|
651
|
-
code: "ENOGIT",
|
|
652
|
-
cause: whichError
|
|
653
|
-
},
|
|
654
|
-
which
|
|
655
|
-
);
|
|
656
|
-
}
|
|
657
|
-
return gitPath;
|
|
658
|
-
};
|
|
659
|
-
|
|
660
|
-
// ../../src/git/src/spawn.ts
|
|
661
|
-
var spawn = async (gitArgs, opts2 = {}) => {
|
|
662
|
-
const gitPath2 = which(opts2);
|
|
663
|
-
if (gitPath2 instanceof Error) {
|
|
664
|
-
throw gitPath2;
|
|
665
|
-
}
|
|
666
|
-
const args = opts2.allowReplace || gitArgs[0] === "--no-replace-objects" ? gitArgs : ["--no-replace-objects", ...gitArgs];
|
|
667
|
-
const retryOpts = {
|
|
668
|
-
retries: opts2["fetch-retries"] || 3,
|
|
669
|
-
factor: opts2["fetch-retry-factor"] || 2,
|
|
670
|
-
maxTimeout: opts2["fetch-retry-maxtimeout"] || 6e4,
|
|
671
|
-
minTimeout: opts2["fetch-retry-mintimeout"] || 1e3
|
|
672
|
-
};
|
|
673
|
-
return (0, import_promise_retry.default)(async (retryFn, num) => {
|
|
674
|
-
const result = await promiseSpawn(gitPath2, args, opts(opts2));
|
|
675
|
-
if (result.status || result.signal) {
|
|
676
|
-
const [shouldRetry, gitError] = makeError(result);
|
|
677
|
-
if (!shouldRetry?.(num)) {
|
|
678
|
-
throw gitError;
|
|
679
|
-
}
|
|
680
|
-
retryFn(gitError);
|
|
681
|
-
}
|
|
682
|
-
return result;
|
|
683
|
-
}, retryOpts);
|
|
684
|
-
};
|
|
685
|
-
|
|
686
|
-
// ../../src/git/src/is.ts
|
|
687
|
-
import { stat } from "node:fs/promises";
|
|
688
|
-
var is = ({ cwd = process.cwd() } = {}) => stat(cwd + "/.git").then(
|
|
689
|
-
() => true,
|
|
690
|
-
() => false
|
|
691
|
-
);
|
|
692
|
-
|
|
693
|
-
// ../../src/git/src/is-clean.ts
|
|
694
|
-
var isClean = async (opts2 = {}) => {
|
|
695
|
-
const result = await spawn(
|
|
696
|
-
["status", "--porcelain=v1", "-uno"],
|
|
697
|
-
opts2
|
|
698
|
-
);
|
|
699
|
-
if (result.status || result.signal) {
|
|
700
|
-
throw error("git isClean check failed", result);
|
|
701
|
-
}
|
|
702
|
-
for (const line of result.stdout.split(/\r?\n+/)) {
|
|
703
|
-
if (line.trim()) return false;
|
|
704
|
-
}
|
|
705
|
-
return true;
|
|
706
|
-
};
|
|
707
|
-
|
|
708
|
-
// ../../src/git-scp-url/src/index.ts
|
|
709
|
-
var knownProtocols = /* @__PURE__ */ new Set([
|
|
710
|
-
"http:",
|
|
711
|
-
"https:",
|
|
712
|
-
"git:",
|
|
713
|
-
"git+ssh:",
|
|
714
|
-
"git+https:",
|
|
715
|
-
"ssh:"
|
|
716
|
-
]);
|
|
717
|
-
var memo = /* @__PURE__ */ new Map();
|
|
718
|
-
var correctProtocol = (arg) => {
|
|
719
|
-
const firstColon = arg.indexOf(":");
|
|
720
|
-
const proto = arg.slice(0, firstColon + 1);
|
|
721
|
-
const doubleSlash = arg.indexOf("//");
|
|
722
|
-
if (knownProtocols.has(proto)) {
|
|
723
|
-
if (doubleSlash === firstColon + 1) {
|
|
724
|
-
return arg;
|
|
725
|
-
}
|
|
726
|
-
return proto + "//" + arg.slice(firstColon + 1);
|
|
727
|
-
}
|
|
728
|
-
const firstAt = arg.indexOf("@");
|
|
729
|
-
if (firstAt > -1) {
|
|
730
|
-
if (firstAt > firstColon) {
|
|
731
|
-
return `git+ssh://${arg}`;
|
|
732
|
-
} else {
|
|
733
|
-
return arg;
|
|
734
|
-
}
|
|
735
|
-
}
|
|
736
|
-
return proto + "//" + arg.slice(firstColon + 1);
|
|
737
|
-
};
|
|
738
|
-
var correctUrl = (url) => {
|
|
739
|
-
const firstAt = url.indexOf("@");
|
|
740
|
-
const lastHash = url.lastIndexOf("#");
|
|
741
|
-
let firstColon = url.indexOf(":");
|
|
742
|
-
let lastColon = url.lastIndexOf(
|
|
743
|
-
":",
|
|
744
|
-
lastHash > -1 ? lastHash : Infinity
|
|
745
|
-
);
|
|
746
|
-
let corrected = url;
|
|
747
|
-
if (lastColon > firstAt) {
|
|
748
|
-
corrected = url.slice(0, lastColon) + "/" + url.slice(lastColon + 1);
|
|
749
|
-
firstColon = corrected.indexOf(":");
|
|
750
|
-
lastColon = corrected.lastIndexOf(":");
|
|
751
|
-
}
|
|
752
|
-
if (firstColon === -1 && !url.includes("//")) {
|
|
753
|
-
corrected = `git+ssh://${corrected}`;
|
|
754
|
-
}
|
|
755
|
-
return corrected;
|
|
756
|
-
};
|
|
757
|
-
var gitScpURL = (url) => {
|
|
758
|
-
const memoized = memo.get(url);
|
|
759
|
-
if (memoized) return memoized;
|
|
760
|
-
try {
|
|
761
|
-
const result = new URL(url);
|
|
762
|
-
if (result.hostname) {
|
|
763
|
-
memo.set(url, result);
|
|
764
|
-
return result;
|
|
765
|
-
}
|
|
766
|
-
} catch {
|
|
767
|
-
}
|
|
768
|
-
try {
|
|
769
|
-
const result = new URL(correctUrl(correctProtocol(url)));
|
|
770
|
-
if (result.hostname) {
|
|
771
|
-
memo.set(url, result);
|
|
772
|
-
return result;
|
|
773
|
-
}
|
|
774
|
-
} catch {
|
|
775
|
-
}
|
|
776
|
-
return void 0;
|
|
777
|
-
};
|
|
778
|
-
|
|
779
|
-
// ../../src/git/src/clone.ts
|
|
780
|
-
import { mkdir, stat as stat2 } from "node:fs/promises";
|
|
781
|
-
import { basename, resolve as resolve2 } from "node:path";
|
|
782
|
-
import { fileURLToPath as fileURLToPath2 } from "node:url";
|
|
783
|
-
|
|
784
|
-
// ../../src/git/src/is-windows.ts
|
|
785
|
-
var isWindows = (opts2) => (opts2.fakePlatform || process.platform) === "win32";
|
|
786
|
-
|
|
787
|
-
// ../../src/git/src/revs.ts
|
|
788
|
-
import { fileURLToPath } from "node:url";
|
|
789
|
-
|
|
790
|
-
// ../../src/git/src/lines-to-revs.ts
|
|
791
|
-
var linesToRevs = (lines) => finish(
|
|
792
|
-
lines.reduce(linesToRevsReducer, {
|
|
793
|
-
name: "",
|
|
794
|
-
versions: {},
|
|
795
|
-
"dist-tags": {},
|
|
796
|
-
refs: {},
|
|
797
|
-
shas: {}
|
|
798
|
-
})
|
|
799
|
-
);
|
|
800
|
-
var finish = (revs2) => distTags(versions(shaList(peelTags(revs2))));
|
|
801
|
-
var versions = (revs2) => {
|
|
802
|
-
for (const [version, entry] of Object.entries(revs2.versions)) {
|
|
803
|
-
entry.version = version;
|
|
804
|
-
}
|
|
805
|
-
return revs2;
|
|
806
|
-
};
|
|
807
|
-
var shaList = (revs2) => {
|
|
808
|
-
Object.entries(revs2.refs).forEach(([ref, doc]) => {
|
|
809
|
-
const shas = revs2.shas[doc.sha];
|
|
810
|
-
if (!shas) {
|
|
811
|
-
revs2.shas[doc.sha] = [ref];
|
|
812
|
-
} else {
|
|
813
|
-
shas.push(ref);
|
|
814
|
-
}
|
|
815
|
-
});
|
|
816
|
-
return revs2;
|
|
817
|
-
};
|
|
818
|
-
var peelTags = (revs2) => {
|
|
819
|
-
Object.entries(revs2.refs).filter(([ref]) => ref.endsWith("^{}")).forEach(([ref, peeled]) => {
|
|
820
|
-
const unpeeled = revs2.refs[ref.replace(/\^\{\}$/, "")];
|
|
821
|
-
if (unpeeled) {
|
|
822
|
-
unpeeled.sha = peeled.sha;
|
|
823
|
-
delete revs2.refs[ref];
|
|
824
|
-
}
|
|
825
|
-
});
|
|
826
|
-
return revs2;
|
|
827
|
-
};
|
|
828
|
-
var distTags = (revs2) => {
|
|
829
|
-
const HEAD = revs2.refs.HEAD ?? {
|
|
830
|
-
sha: void 0
|
|
831
|
-
};
|
|
832
|
-
for (const [v, ver] of Object.entries(revs2.versions)) {
|
|
833
|
-
if (ver.sha === revs2.refs.latest?.sha) {
|
|
834
|
-
revs2["dist-tags"].latest = v;
|
|
835
|
-
} else if (ver.sha === HEAD.sha) {
|
|
836
|
-
revs2["dist-tags"].HEAD = v;
|
|
837
|
-
if (!revs2.refs.latest) {
|
|
838
|
-
revs2["dist-tags"].latest = v;
|
|
839
|
-
}
|
|
840
|
-
}
|
|
841
|
-
}
|
|
842
|
-
return revs2;
|
|
843
|
-
};
|
|
844
|
-
var refType = (ref) => {
|
|
845
|
-
if (ref.startsWith("refs/tags/")) {
|
|
846
|
-
return "tag";
|
|
847
|
-
}
|
|
848
|
-
if (ref.startsWith("refs/heads/")) {
|
|
849
|
-
return "branch";
|
|
850
|
-
}
|
|
851
|
-
if (ref.startsWith("refs/pull/")) {
|
|
852
|
-
return "pull";
|
|
853
|
-
}
|
|
854
|
-
if (ref === "HEAD") {
|
|
855
|
-
return "head";
|
|
856
|
-
}
|
|
857
|
-
return "other";
|
|
858
|
-
};
|
|
859
|
-
var lineToRevDoc = (line) => {
|
|
860
|
-
let [sha, rawRef] = line.trim().split(/\s+/, 2);
|
|
861
|
-
if (sha === void 0 || rawRef === void 0) return void 0;
|
|
862
|
-
sha = sha.trim();
|
|
863
|
-
rawRef = rawRef.trim();
|
|
864
|
-
const type = refType(rawRef);
|
|
865
|
-
switch (type) {
|
|
866
|
-
case "tag": {
|
|
867
|
-
const ref = rawRef.slice("refs/tags/".length);
|
|
868
|
-
return { name: "", version: "", sha, ref, rawRef, type };
|
|
869
|
-
}
|
|
870
|
-
case "branch": {
|
|
871
|
-
const ref = rawRef.slice("refs/heads/".length);
|
|
872
|
-
return { name: "", version: "", sha, ref, rawRef, type };
|
|
873
|
-
}
|
|
874
|
-
case "pull": {
|
|
875
|
-
const ref = rawRef.slice("refs/".length).replace(/\/head$/, "");
|
|
876
|
-
return { name: "", version: "", sha, ref, rawRef, type };
|
|
877
|
-
}
|
|
878
|
-
case "head": {
|
|
879
|
-
const ref = "HEAD";
|
|
880
|
-
return { name: "", version: "", sha, ref, rawRef, type };
|
|
881
|
-
}
|
|
882
|
-
default:
|
|
883
|
-
return { name: "", version: "", sha, ref: rawRef, rawRef, type };
|
|
884
|
-
}
|
|
885
|
-
};
|
|
886
|
-
var linesToRevsReducer = (revs2, line) => {
|
|
887
|
-
const doc = lineToRevDoc(line);
|
|
888
|
-
if (!doc) {
|
|
889
|
-
return revs2;
|
|
890
|
-
}
|
|
891
|
-
revs2.refs[doc.ref] = doc;
|
|
892
|
-
revs2.refs[doc.rawRef] = doc;
|
|
893
|
-
if (doc.type === "tag") {
|
|
894
|
-
const match2 = doc.ref.endsWith("^{}") ? null : /v?(\d+\.\d+\.\d+(?:[-+].+)?)$/.exec(doc.ref);
|
|
895
|
-
if (match2) {
|
|
896
|
-
if (!match2[1])
|
|
897
|
-
throw error(`invalid semver tag`, { found: doc.ref });
|
|
898
|
-
const v = parse(match2[1]);
|
|
899
|
-
if (v) revs2.versions[String(v)] = doc;
|
|
900
|
-
}
|
|
901
|
-
}
|
|
902
|
-
return revs2;
|
|
903
|
-
};
|
|
904
|
-
|
|
905
|
-
// ../../src/git/src/revs.ts
|
|
906
|
-
var fetchMethod = async (repo, _, options) => {
|
|
907
|
-
const result = await spawn(["ls-remote", repo], options.context);
|
|
908
|
-
const revsDoc = linesToRevs(result.stdout.split("\n"));
|
|
909
|
-
return revsDoc;
|
|
910
|
-
};
|
|
911
|
-
var revsCache = new I({
|
|
912
|
-
max: 100,
|
|
913
|
-
ttl: 5 * 60 * 1e3,
|
|
914
|
-
allowStaleOnFetchAbort: true,
|
|
915
|
-
allowStaleOnFetchRejection: true,
|
|
916
|
-
fetchMethod
|
|
917
|
-
});
|
|
918
|
-
var revs = async (repo, opts2 = {}) => {
|
|
919
|
-
repo = String(gitScpURL(repo) ?? repo).replace(/^git\+/, "");
|
|
920
|
-
if (repo.startsWith("file://")) repo = fileURLToPath(repo);
|
|
921
|
-
if (opts2.noGitRevCache) {
|
|
922
|
-
const result = await fetchMethod(repo, void 0, {
|
|
923
|
-
context: opts2
|
|
924
|
-
});
|
|
925
|
-
revsCache.set(repo, result);
|
|
926
|
-
return result;
|
|
927
|
-
}
|
|
928
|
-
return await revsCache.fetch(repo, { context: opts2 });
|
|
929
|
-
};
|
|
930
|
-
|
|
931
|
-
// ../../src/git/src/resolve.ts
|
|
932
|
-
var resolve = async (repo, ref = "HEAD", opts2 = {}) => {
|
|
933
|
-
const revDoc = await revs(repo, opts2);
|
|
934
|
-
if (!revDoc) return void 0;
|
|
935
|
-
return resolveRef(revDoc, ref, opts2);
|
|
936
|
-
};
|
|
937
|
-
var resolveRef = (revDoc, ref = "HEAD", opts2 = {}) => {
|
|
938
|
-
const { spec } = opts2;
|
|
939
|
-
ref = spec?.gitCommittish || ref;
|
|
940
|
-
if (spec?.range) {
|
|
941
|
-
return pickManifest(revDoc, spec.range, opts2);
|
|
942
|
-
}
|
|
943
|
-
if (!ref) {
|
|
944
|
-
return revDoc.refs.HEAD;
|
|
945
|
-
}
|
|
946
|
-
if (revDoc.refs[ref]) {
|
|
947
|
-
return revDoc.refs[ref];
|
|
948
|
-
}
|
|
949
|
-
const sha = revDoc.shas[ref]?.[0];
|
|
950
|
-
if (sha) {
|
|
951
|
-
return revDoc.refs[sha];
|
|
952
|
-
}
|
|
953
|
-
return void 0;
|
|
954
|
-
};
|
|
955
|
-
|
|
956
|
-
// ../../src/git/src/clone.ts
|
|
957
|
-
var shallowHosts = /* @__PURE__ */ new Set([
|
|
958
|
-
"github.com",
|
|
959
|
-
"gist.github.com",
|
|
960
|
-
"gitlab.com",
|
|
961
|
-
"bitbucket.com",
|
|
962
|
-
"bitbucket.org"
|
|
963
|
-
]);
|
|
964
|
-
var clone = async (repo, ref = "HEAD", target, opts2 = {}) => {
|
|
965
|
-
repo = String(gitScpURL(repo) ?? repo).replace(/^git\+/, "");
|
|
966
|
-
if (repo.startsWith("file://")) repo = fileURLToPath2(repo);
|
|
967
|
-
const revs2 = await revs(repo, opts2);
|
|
968
|
-
return await clone_(
|
|
969
|
-
repo,
|
|
970
|
-
revs2,
|
|
971
|
-
ref,
|
|
972
|
-
revs2 && resolveRef(revs2, ref, opts2),
|
|
973
|
-
target || defaultTarget(repo, opts2.cwd),
|
|
974
|
-
opts2
|
|
975
|
-
);
|
|
976
|
-
};
|
|
977
|
-
var maybeShallow = (repo, opts2) => {
|
|
978
|
-
if (opts2["git-shallow"] === false || opts2["git-shallow"]) {
|
|
979
|
-
return opts2["git-shallow"];
|
|
980
|
-
}
|
|
981
|
-
const host = gitScpURL(repo)?.host ?? "";
|
|
982
|
-
return shallowHosts.has(host);
|
|
983
|
-
};
|
|
984
|
-
var defaultTarget = (repo, cwd = process.cwd()) => resolve2(cwd, basename(repo.replace(/[/\\]?\.git$/, "")));
|
|
985
|
-
var clone_ = (repo, revs2, ref, revDoc, target, opts2) => {
|
|
986
|
-
if (!revDoc || !revs2) {
|
|
987
|
-
return unresolved(repo, ref, target, opts2);
|
|
988
|
-
}
|
|
989
|
-
if (revDoc.sha === revs2.refs.HEAD?.sha) {
|
|
990
|
-
return plain(repo, revDoc, target, opts2);
|
|
991
|
-
}
|
|
992
|
-
if (revDoc.type === "tag" || revDoc.type === "branch") {
|
|
993
|
-
return branch(repo, revDoc, target, opts2);
|
|
994
|
-
}
|
|
995
|
-
return other(repo, revDoc, target, opts2);
|
|
996
|
-
};
|
|
997
|
-
var other = async (repo, revDoc, target, opts2) => {
|
|
998
|
-
const shallow = maybeShallow(repo, opts2);
|
|
999
|
-
const fetchOrigin = ["fetch", "origin", revDoc.rawRef].concat(
|
|
1000
|
-
shallow ? ["--depth=1"] : []
|
|
1001
|
-
);
|
|
1002
|
-
const git = (args) => spawn(args, { ...opts2, cwd: target });
|
|
1003
|
-
await mkdir(target, { recursive: true });
|
|
1004
|
-
await git(["init"]);
|
|
1005
|
-
if (isWindows(opts2)) {
|
|
1006
|
-
await git([
|
|
1007
|
-
"config",
|
|
1008
|
-
"--local",
|
|
1009
|
-
"--add",
|
|
1010
|
-
"core.longpaths",
|
|
1011
|
-
"true"
|
|
1012
|
-
]);
|
|
1013
|
-
}
|
|
1014
|
-
await git(["remote", "add", "origin", repo]);
|
|
1015
|
-
await git(fetchOrigin);
|
|
1016
|
-
await git(["checkout", revDoc.sha]);
|
|
1017
|
-
await updateSubmodules(target, opts2);
|
|
1018
|
-
return revDoc.sha;
|
|
1019
|
-
};
|
|
1020
|
-
var branch = async (repo, revDoc, target, opts2) => {
|
|
1021
|
-
const args = [
|
|
1022
|
-
"clone",
|
|
1023
|
-
"-b",
|
|
1024
|
-
revDoc.ref,
|
|
1025
|
-
repo,
|
|
1026
|
-
target,
|
|
1027
|
-
"--recurse-submodules"
|
|
1028
|
-
];
|
|
1029
|
-
if (maybeShallow(repo, opts2)) {
|
|
1030
|
-
args.push("--depth=1");
|
|
1031
|
-
}
|
|
1032
|
-
if (isWindows(opts2)) {
|
|
1033
|
-
args.push("--config", "core.longpaths=true");
|
|
1034
|
-
}
|
|
1035
|
-
await spawn(args, opts2);
|
|
1036
|
-
return revDoc.sha;
|
|
1037
|
-
};
|
|
1038
|
-
var plain = async (repo, revDoc, target, opts2) => {
|
|
1039
|
-
const args = ["clone", repo, target, "--recurse-submodules"];
|
|
1040
|
-
if (maybeShallow(repo, opts2)) {
|
|
1041
|
-
args.push("--depth=1");
|
|
1042
|
-
}
|
|
1043
|
-
if (isWindows(opts2)) {
|
|
1044
|
-
args.push("--config", "core.longpaths=true");
|
|
1045
|
-
}
|
|
1046
|
-
await spawn(args, opts2);
|
|
1047
|
-
return revDoc.sha;
|
|
1048
|
-
};
|
|
1049
|
-
var updateSubmodules = async (target, opts2) => {
|
|
1050
|
-
const hasSubmodules = await stat2(`${target}/.gitmodules`).then(() => true).catch(() => false);
|
|
1051
|
-
if (!hasSubmodules) {
|
|
1052
|
-
return;
|
|
1053
|
-
}
|
|
1054
|
-
await spawn(
|
|
1055
|
-
["submodule", "update", "-q", "--init", "--recursive"],
|
|
1056
|
-
{ ...opts2, cwd: target }
|
|
1057
|
-
);
|
|
1058
|
-
};
|
|
1059
|
-
var unresolved = async (repo, ref, target, opts2) => {
|
|
1060
|
-
const lp = isWindows(opts2) ? ["--config", "core.longpaths=true"] : [];
|
|
1061
|
-
const cloneArgs = [
|
|
1062
|
-
"clone",
|
|
1063
|
-
"--mirror",
|
|
1064
|
-
"-q",
|
|
1065
|
-
repo,
|
|
1066
|
-
target + "/.git"
|
|
1067
|
-
];
|
|
1068
|
-
const git = (args) => spawn(args, { ...opts2, cwd: target });
|
|
1069
|
-
await mkdir(target, { recursive: true });
|
|
1070
|
-
await git(cloneArgs.concat(lp));
|
|
1071
|
-
await git(["init"]);
|
|
1072
|
-
await git(["checkout", ref]);
|
|
1073
|
-
await updateSubmodules(target, opts2);
|
|
1074
|
-
const result = await git(["rev-parse", "--revs-only", "HEAD"]);
|
|
1075
|
-
return result.stdout;
|
|
1076
|
-
};
|
|
1077
|
-
|
|
1078
|
-
// ../../src/git/src/user.ts
|
|
1079
|
-
var getUser = async (opts2 = {}) => {
|
|
1080
|
-
let name = "";
|
|
1081
|
-
let email = "";
|
|
1082
|
-
const oldFlagUserNameResult = await spawn(
|
|
1083
|
-
["config", "--get", "user.name"],
|
|
1084
|
-
opts2
|
|
1085
|
-
);
|
|
1086
|
-
if (oldFlagUserNameResult.status || oldFlagUserNameResult.signal) {
|
|
1087
|
-
const userNameResult = await spawn(
|
|
1088
|
-
["config", "get", "user.name"],
|
|
1089
|
-
opts2
|
|
1090
|
-
);
|
|
1091
|
-
name = userNameResult.status || userNameResult.signal ? "" : userNameResult.stdout.trim();
|
|
1092
|
-
} else {
|
|
1093
|
-
name = oldFlagUserNameResult.stdout.trim();
|
|
1094
|
-
}
|
|
1095
|
-
const oldFlagUserEmailResult = await spawn(
|
|
1096
|
-
["config", "--get", "user.email"],
|
|
1097
|
-
opts2
|
|
1098
|
-
);
|
|
1099
|
-
if (oldFlagUserEmailResult.status || oldFlagUserEmailResult.signal) {
|
|
1100
|
-
const userEmailResult = await spawn(
|
|
1101
|
-
["config", "get", "user.email"],
|
|
1102
|
-
opts2
|
|
1103
|
-
);
|
|
1104
|
-
email = userEmailResult.status || userEmailResult.signal ? "" : userEmailResult.stdout.trim();
|
|
1105
|
-
} else {
|
|
1106
|
-
email = oldFlagUserEmailResult.stdout.trim();
|
|
1107
|
-
}
|
|
1108
|
-
if (!name && !email) {
|
|
1109
|
-
return void 0;
|
|
1110
|
-
}
|
|
1111
|
-
return {
|
|
1112
|
-
name,
|
|
1113
|
-
email
|
|
1114
|
-
};
|
|
1115
|
-
};
|
|
1116
40
|
|
|
1117
41
|
// ../../src/package-json/src/index.ts
|
|
1118
|
-
import { readFileSync
|
|
1119
|
-
import { resolve
|
|
42
|
+
import { readFileSync, writeFileSync, lstatSync } from "node:fs";
|
|
43
|
+
import { resolve } from "node:path";
|
|
1120
44
|
import { homedir } from "node:os";
|
|
1121
45
|
var exists = (path2) => {
|
|
1122
46
|
try {
|
|
@@ -1148,7 +72,7 @@ var PackageJson = class {
|
|
|
1148
72
|
if (cachedPackageJson) {
|
|
1149
73
|
return cachedPackageJson;
|
|
1150
74
|
}
|
|
1151
|
-
const filename = dir.endsWith("package.json") ?
|
|
75
|
+
const filename = dir.endsWith("package.json") ? resolve(dir) : resolve(dir, "package.json");
|
|
1152
76
|
const fail = (err) => error("Could not read package.json file", err, this.read);
|
|
1153
77
|
const cachedError = !reload && this.#errCache.get(dir);
|
|
1154
78
|
if (cachedError) {
|
|
@@ -1157,7 +81,7 @@ var PackageJson = class {
|
|
|
1157
81
|
try {
|
|
1158
82
|
const res = normalizeManifest(
|
|
1159
83
|
asManifest(
|
|
1160
|
-
|
|
84
|
+
parse(readFileSync(filename, { encoding: "utf8" }))
|
|
1161
85
|
),
|
|
1162
86
|
filename
|
|
1163
87
|
);
|
|
@@ -1185,7 +109,7 @@ var PackageJson = class {
|
|
|
1185
109
|
}
|
|
1186
110
|
}
|
|
1187
111
|
write(dir, manifest, indent) {
|
|
1188
|
-
const filename = dir.endsWith("package.json") ?
|
|
112
|
+
const filename = dir.endsWith("package.json") ? resolve(dir) : resolve(dir, "package.json");
|
|
1189
113
|
this.fix(manifest);
|
|
1190
114
|
try {
|
|
1191
115
|
writeFileSync(filename, stringify(manifest, void 0, indent));
|
|
@@ -1237,7 +161,7 @@ var PackageJson = class {
|
|
|
1237
161
|
find(cwd = process.cwd(), home = homedir()) {
|
|
1238
162
|
for (const dir of walkUp(cwd)) {
|
|
1239
163
|
if (dir === home) break;
|
|
1240
|
-
const packageJsonPath =
|
|
164
|
+
const packageJsonPath = resolve(dir, "package.json");
|
|
1241
165
|
if (exists(packageJsonPath)) {
|
|
1242
166
|
return packageJsonPath;
|
|
1243
167
|
}
|
|
@@ -2669,9 +1593,9 @@ var Minimatch = class {
|
|
|
2669
1593
|
}
|
|
2670
1594
|
didSomething = true;
|
|
2671
1595
|
parts.splice(gs, 1);
|
|
2672
|
-
const
|
|
2673
|
-
|
|
2674
|
-
globParts.push(
|
|
1596
|
+
const other = parts.slice(0);
|
|
1597
|
+
other[gs] = "**";
|
|
1598
|
+
globParts.push(other);
|
|
2675
1599
|
gs--;
|
|
2676
1600
|
}
|
|
2677
1601
|
if (!this.preserveMultipleSlashes) {
|
|
@@ -2731,10 +1655,10 @@ var Minimatch = class {
|
|
|
2731
1655
|
let ai = 0;
|
|
2732
1656
|
let bi = 0;
|
|
2733
1657
|
let result = [];
|
|
2734
|
-
let
|
|
1658
|
+
let which = "";
|
|
2735
1659
|
while (ai < a.length && bi < b.length) {
|
|
2736
1660
|
if (a[ai] === b[bi]) {
|
|
2737
|
-
result.push(
|
|
1661
|
+
result.push(which === "b" ? b[bi] : a[ai]);
|
|
2738
1662
|
ai++;
|
|
2739
1663
|
bi++;
|
|
2740
1664
|
} else if (emptyGSMatch && a[ai] === "**" && b[bi] === a[ai + 1]) {
|
|
@@ -2744,16 +1668,16 @@ var Minimatch = class {
|
|
|
2744
1668
|
result.push(b[bi]);
|
|
2745
1669
|
bi++;
|
|
2746
1670
|
} else if (a[ai] === "*" && b[bi] && (this.options.dot || !b[bi].startsWith(".")) && b[bi] !== "**") {
|
|
2747
|
-
if (
|
|
1671
|
+
if (which === "b")
|
|
2748
1672
|
return false;
|
|
2749
|
-
|
|
1673
|
+
which = "a";
|
|
2750
1674
|
result.push(a[ai]);
|
|
2751
1675
|
ai++;
|
|
2752
1676
|
bi++;
|
|
2753
1677
|
} else if (b[bi] === "*" && a[ai] && (this.options.dot || !a[ai].startsWith(".")) && a[ai] !== "**") {
|
|
2754
|
-
if (
|
|
1678
|
+
if (which === "a")
|
|
2755
1679
|
return false;
|
|
2756
|
-
|
|
1680
|
+
which = "b";
|
|
2757
1681
|
result.push(b[bi]);
|
|
2758
1682
|
ai++;
|
|
2759
1683
|
bi++;
|
|
@@ -3102,7 +2026,7 @@ minimatch.unescape = unescape;
|
|
|
3102
2026
|
|
|
3103
2027
|
// ../../node_modules/.vlt/~npm~path-scurry@2.0.2/node_modules/path-scurry/dist/esm/index.js
|
|
3104
2028
|
import { posix, win32 } from "node:path";
|
|
3105
|
-
import { fileURLToPath
|
|
2029
|
+
import { fileURLToPath } from "node:url";
|
|
3106
2030
|
import { lstatSync as lstatSync2, readdir as readdirCB, readdirSync, readlinkSync, realpathSync as rps } from "node:fs";
|
|
3107
2031
|
import * as actualFS from "node:fs";
|
|
3108
2032
|
import { lstat, readdir, readlink, realpath } from "node:fs/promises";
|
|
@@ -3160,10 +2084,10 @@ var Pipe = class {
|
|
|
3160
2084
|
dest;
|
|
3161
2085
|
opts;
|
|
3162
2086
|
ondrain;
|
|
3163
|
-
constructor(src, dest,
|
|
2087
|
+
constructor(src, dest, opts) {
|
|
3164
2088
|
this.src = src;
|
|
3165
2089
|
this.dest = dest;
|
|
3166
|
-
this.opts =
|
|
2090
|
+
this.opts = opts;
|
|
3167
2091
|
this.ondrain = () => src[RESUME]();
|
|
3168
2092
|
this.dest.on("drain", this.ondrain);
|
|
3169
2093
|
}
|
|
@@ -3186,8 +2110,8 @@ var PipeProxyErrors = class extends Pipe {
|
|
|
3186
2110
|
this.src.removeListener("error", this.proxyErrors);
|
|
3187
2111
|
super.unpipe();
|
|
3188
2112
|
}
|
|
3189
|
-
constructor(src, dest,
|
|
3190
|
-
super(src, dest,
|
|
2113
|
+
constructor(src, dest, opts) {
|
|
2114
|
+
super(src, dest, opts);
|
|
3191
2115
|
this.proxyErrors = (er) => this.dest.emit("error", er);
|
|
3192
2116
|
src.on("error", this.proxyErrors);
|
|
3193
2117
|
}
|
|
@@ -3560,22 +2484,22 @@ var Minipass = class extends EventEmitter {
|
|
|
3560
2484
|
*
|
|
3561
2485
|
* Triggers the flow of data.
|
|
3562
2486
|
*/
|
|
3563
|
-
pipe(dest,
|
|
2487
|
+
pipe(dest, opts) {
|
|
3564
2488
|
if (this[DESTROYED])
|
|
3565
2489
|
return dest;
|
|
3566
2490
|
this[DISCARDED] = false;
|
|
3567
2491
|
const ended = this[EMITTED_END];
|
|
3568
|
-
|
|
2492
|
+
opts = opts || {};
|
|
3569
2493
|
if (dest === proc.stdout || dest === proc.stderr)
|
|
3570
|
-
|
|
2494
|
+
opts.end = false;
|
|
3571
2495
|
else
|
|
3572
|
-
|
|
3573
|
-
|
|
2496
|
+
opts.end = opts.end !== false;
|
|
2497
|
+
opts.proxyErrors = !!opts.proxyErrors;
|
|
3574
2498
|
if (ended) {
|
|
3575
|
-
if (
|
|
2499
|
+
if (opts.end)
|
|
3576
2500
|
dest.end();
|
|
3577
2501
|
} else {
|
|
3578
|
-
this[PIPES].push(!
|
|
2502
|
+
this[PIPES].push(!opts.proxyErrors ? new Pipe(this, dest, opts) : new PipeProxyErrors(this, dest, opts));
|
|
3579
2503
|
if (this[ASYNC])
|
|
3580
2504
|
defer(() => this[RESUME]());
|
|
3581
2505
|
else
|
|
@@ -3836,10 +2760,10 @@ var Minipass = class extends EventEmitter {
|
|
|
3836
2760
|
* Return a void Promise that resolves once the stream ends.
|
|
3837
2761
|
*/
|
|
3838
2762
|
async promise() {
|
|
3839
|
-
return new Promise((
|
|
2763
|
+
return new Promise((resolve4, reject) => {
|
|
3840
2764
|
this.on(DESTROYED, () => reject(new Error("stream destroyed")));
|
|
3841
2765
|
this.on("error", (er) => reject(er));
|
|
3842
|
-
this.on("end", () =>
|
|
2766
|
+
this.on("end", () => resolve4());
|
|
3843
2767
|
});
|
|
3844
2768
|
}
|
|
3845
2769
|
/**
|
|
@@ -3863,7 +2787,7 @@ var Minipass = class extends EventEmitter {
|
|
|
3863
2787
|
return Promise.resolve({ done: false, value: res });
|
|
3864
2788
|
if (this[EOF])
|
|
3865
2789
|
return stop();
|
|
3866
|
-
let
|
|
2790
|
+
let resolve4;
|
|
3867
2791
|
let reject;
|
|
3868
2792
|
const onerr = (er) => {
|
|
3869
2793
|
this.off("data", ondata);
|
|
@@ -3877,19 +2801,19 @@ var Minipass = class extends EventEmitter {
|
|
|
3877
2801
|
this.off("end", onend);
|
|
3878
2802
|
this.off(DESTROYED, ondestroy);
|
|
3879
2803
|
this.pause();
|
|
3880
|
-
|
|
2804
|
+
resolve4({ value, done: !!this[EOF] });
|
|
3881
2805
|
};
|
|
3882
2806
|
const onend = () => {
|
|
3883
2807
|
this.off("error", onerr);
|
|
3884
2808
|
this.off("data", ondata);
|
|
3885
2809
|
this.off(DESTROYED, ondestroy);
|
|
3886
2810
|
stop();
|
|
3887
|
-
|
|
2811
|
+
resolve4({ done: true, value: void 0 });
|
|
3888
2812
|
};
|
|
3889
2813
|
const ondestroy = () => onerr(new Error("stream destroyed"));
|
|
3890
2814
|
return new Promise((res2, rej) => {
|
|
3891
2815
|
reject = rej;
|
|
3892
|
-
|
|
2816
|
+
resolve4 = res2;
|
|
3893
2817
|
this.once(DESTROYED, ondestroy);
|
|
3894
2818
|
this.once("error", onerr);
|
|
3895
2819
|
this.once("end", onend);
|
|
@@ -4217,7 +3141,7 @@ var PathBase = class {
|
|
|
4217
3141
|
*
|
|
4218
3142
|
* @internal
|
|
4219
3143
|
*/
|
|
4220
|
-
constructor(name, type = UNKNOWN, root, roots, nocase, children,
|
|
3144
|
+
constructor(name, type = UNKNOWN, root, roots, nocase, children, opts) {
|
|
4221
3145
|
this.name = name;
|
|
4222
3146
|
this.#matchName = nocase ? normalizeNocase(name) : normalize(name);
|
|
4223
3147
|
this.#type = type & TYPEMASK;
|
|
@@ -4225,14 +3149,14 @@ var PathBase = class {
|
|
|
4225
3149
|
this.roots = roots;
|
|
4226
3150
|
this.root = root || this;
|
|
4227
3151
|
this.#children = children;
|
|
4228
|
-
this.#fullpath =
|
|
4229
|
-
this.#relative =
|
|
4230
|
-
this.#relativePosix =
|
|
4231
|
-
this.parent =
|
|
3152
|
+
this.#fullpath = opts.fullpath;
|
|
3153
|
+
this.#relative = opts.relative;
|
|
3154
|
+
this.#relativePosix = opts.relativePosix;
|
|
3155
|
+
this.parent = opts.parent;
|
|
4232
3156
|
if (this.parent) {
|
|
4233
3157
|
this.#fs = this.parent.#fs;
|
|
4234
3158
|
} else {
|
|
4235
|
-
this.#fs = fsFromOption(
|
|
3159
|
+
this.#fs = fsFromOption(opts.fs);
|
|
4236
3160
|
}
|
|
4237
3161
|
}
|
|
4238
3162
|
/**
|
|
@@ -4304,7 +3228,7 @@ var PathBase = class {
|
|
|
4304
3228
|
*
|
|
4305
3229
|
* @internal
|
|
4306
3230
|
*/
|
|
4307
|
-
child(pathPart,
|
|
3231
|
+
child(pathPart, opts) {
|
|
4308
3232
|
if (pathPart === "" || pathPart === ".") {
|
|
4309
3233
|
return this;
|
|
4310
3234
|
}
|
|
@@ -4321,7 +3245,7 @@ var PathBase = class {
|
|
|
4321
3245
|
const s = this.parent ? this.sep : "";
|
|
4322
3246
|
const fullpath = this.#fullpath ? this.#fullpath + s + pathPart : void 0;
|
|
4323
3247
|
const pchild = this.newChild(pathPart, UNKNOWN, {
|
|
4324
|
-
...
|
|
3248
|
+
...opts,
|
|
4325
3249
|
parent: this,
|
|
4326
3250
|
fullpath
|
|
4327
3251
|
});
|
|
@@ -4865,9 +3789,9 @@ var PathBase = class {
|
|
|
4865
3789
|
if (this.#asyncReaddirInFlight) {
|
|
4866
3790
|
await this.#asyncReaddirInFlight;
|
|
4867
3791
|
} else {
|
|
4868
|
-
let
|
|
3792
|
+
let resolve4 = () => {
|
|
4869
3793
|
};
|
|
4870
|
-
this.#asyncReaddirInFlight = new Promise((res) =>
|
|
3794
|
+
this.#asyncReaddirInFlight = new Promise((res) => resolve4 = res);
|
|
4871
3795
|
try {
|
|
4872
3796
|
for (const e of await this.#fs.promises.readdir(fullpath, {
|
|
4873
3797
|
withFileTypes: true
|
|
@@ -4880,7 +3804,7 @@ var PathBase = class {
|
|
|
4880
3804
|
children.provisional = 0;
|
|
4881
3805
|
}
|
|
4882
3806
|
this.#asyncReaddirInFlight = void 0;
|
|
4883
|
-
|
|
3807
|
+
resolve4();
|
|
4884
3808
|
}
|
|
4885
3809
|
return children.slice(0, children.provisional);
|
|
4886
3810
|
}
|
|
@@ -5001,14 +3925,14 @@ var PathWin32 = class _PathWin32 extends PathBase {
|
|
|
5001
3925
|
*
|
|
5002
3926
|
* @internal
|
|
5003
3927
|
*/
|
|
5004
|
-
constructor(name, type = UNKNOWN, root, roots, nocase, children,
|
|
5005
|
-
super(name, type, root, roots, nocase, children,
|
|
3928
|
+
constructor(name, type = UNKNOWN, root, roots, nocase, children, opts) {
|
|
3929
|
+
super(name, type, root, roots, nocase, children, opts);
|
|
5006
3930
|
}
|
|
5007
3931
|
/**
|
|
5008
3932
|
* @internal
|
|
5009
3933
|
*/
|
|
5010
|
-
newChild(name, type = UNKNOWN,
|
|
5011
|
-
return new _PathWin32(name, type, this.root, this.roots, this.nocase, this.childrenCache(),
|
|
3934
|
+
newChild(name, type = UNKNOWN, opts = {}) {
|
|
3935
|
+
return new _PathWin32(name, type, this.root, this.roots, this.nocase, this.childrenCache(), opts);
|
|
5012
3936
|
}
|
|
5013
3937
|
/**
|
|
5014
3938
|
* @internal
|
|
@@ -5054,8 +3978,8 @@ var PathPosix = class _PathPosix extends PathBase {
|
|
|
5054
3978
|
*
|
|
5055
3979
|
* @internal
|
|
5056
3980
|
*/
|
|
5057
|
-
constructor(name, type = UNKNOWN, root, roots, nocase, children,
|
|
5058
|
-
super(name, type, root, roots, nocase, children,
|
|
3981
|
+
constructor(name, type = UNKNOWN, root, roots, nocase, children, opts) {
|
|
3982
|
+
super(name, type, root, roots, nocase, children, opts);
|
|
5059
3983
|
}
|
|
5060
3984
|
/**
|
|
5061
3985
|
* @internal
|
|
@@ -5072,8 +3996,8 @@ var PathPosix = class _PathPosix extends PathBase {
|
|
|
5072
3996
|
/**
|
|
5073
3997
|
* @internal
|
|
5074
3998
|
*/
|
|
5075
|
-
newChild(name, type = UNKNOWN,
|
|
5076
|
-
return new _PathPosix(name, type, this.root, this.roots, this.nocase, this.childrenCache(),
|
|
3999
|
+
newChild(name, type = UNKNOWN, opts = {}) {
|
|
4000
|
+
return new _PathPosix(name, type, this.root, this.roots, this.nocase, this.childrenCache(), opts);
|
|
5077
4001
|
}
|
|
5078
4002
|
};
|
|
5079
4003
|
var PathScurryBase = class {
|
|
@@ -5113,7 +4037,7 @@ var PathScurryBase = class {
|
|
|
5113
4037
|
constructor(cwd = process.cwd(), pathImpl, sep3, { nocase, childrenCacheSize = 16 * 1024, fs = defaultFS } = {}) {
|
|
5114
4038
|
this.#fs = fsFromOption(fs);
|
|
5115
4039
|
if (cwd instanceof URL || cwd.startsWith("file://")) {
|
|
5116
|
-
cwd =
|
|
4040
|
+
cwd = fileURLToPath(cwd);
|
|
5117
4041
|
}
|
|
5118
4042
|
const cwdPath = pathImpl.resolve(cwd);
|
|
5119
4043
|
this.roots = /* @__PURE__ */ Object.create(null);
|
|
@@ -5260,16 +4184,16 @@ var PathScurryBase = class {
|
|
|
5260
4184
|
}
|
|
5261
4185
|
return (entry.parent || entry).fullpath();
|
|
5262
4186
|
}
|
|
5263
|
-
async readdir(entry = this.cwd,
|
|
4187
|
+
async readdir(entry = this.cwd, opts = {
|
|
5264
4188
|
withFileTypes: true
|
|
5265
4189
|
}) {
|
|
5266
4190
|
if (typeof entry === "string") {
|
|
5267
4191
|
entry = this.cwd.resolve(entry);
|
|
5268
4192
|
} else if (!(entry instanceof PathBase)) {
|
|
5269
|
-
|
|
4193
|
+
opts = entry;
|
|
5270
4194
|
entry = this.cwd;
|
|
5271
4195
|
}
|
|
5272
|
-
const { withFileTypes } =
|
|
4196
|
+
const { withFileTypes } = opts;
|
|
5273
4197
|
if (!entry.canReaddir()) {
|
|
5274
4198
|
return [];
|
|
5275
4199
|
} else {
|
|
@@ -5277,16 +4201,16 @@ var PathScurryBase = class {
|
|
|
5277
4201
|
return withFileTypes ? p : p.map((e) => e.name);
|
|
5278
4202
|
}
|
|
5279
4203
|
}
|
|
5280
|
-
readdirSync(entry = this.cwd,
|
|
4204
|
+
readdirSync(entry = this.cwd, opts = {
|
|
5281
4205
|
withFileTypes: true
|
|
5282
4206
|
}) {
|
|
5283
4207
|
if (typeof entry === "string") {
|
|
5284
4208
|
entry = this.cwd.resolve(entry);
|
|
5285
4209
|
} else if (!(entry instanceof PathBase)) {
|
|
5286
|
-
|
|
4210
|
+
opts = entry;
|
|
5287
4211
|
entry = this.cwd;
|
|
5288
4212
|
}
|
|
5289
|
-
const { withFileTypes = true } =
|
|
4213
|
+
const { withFileTypes = true } = opts;
|
|
5290
4214
|
if (!entry.canReaddir()) {
|
|
5291
4215
|
return [];
|
|
5292
4216
|
} else if (withFileTypes) {
|
|
@@ -5373,14 +4297,14 @@ var PathScurryBase = class {
|
|
|
5373
4297
|
const e = entry.realpathSync();
|
|
5374
4298
|
return withFileTypes ? e : e?.fullpath();
|
|
5375
4299
|
}
|
|
5376
|
-
async walk(entry = this.cwd,
|
|
4300
|
+
async walk(entry = this.cwd, opts = {}) {
|
|
5377
4301
|
if (typeof entry === "string") {
|
|
5378
4302
|
entry = this.cwd.resolve(entry);
|
|
5379
4303
|
} else if (!(entry instanceof PathBase)) {
|
|
5380
|
-
|
|
4304
|
+
opts = entry;
|
|
5381
4305
|
entry = this.cwd;
|
|
5382
4306
|
}
|
|
5383
|
-
const { withFileTypes = true, follow = false, filter: filter2, walkFilter } =
|
|
4307
|
+
const { withFileTypes = true, follow = false, filter: filter2, walkFilter } = opts;
|
|
5384
4308
|
const results = [];
|
|
5385
4309
|
if (!filter2 || filter2(entry)) {
|
|
5386
4310
|
results.push(withFileTypes ? entry : entry.fullpath());
|
|
@@ -5425,14 +4349,14 @@ var PathScurryBase = class {
|
|
|
5425
4349
|
});
|
|
5426
4350
|
});
|
|
5427
4351
|
}
|
|
5428
|
-
walkSync(entry = this.cwd,
|
|
4352
|
+
walkSync(entry = this.cwd, opts = {}) {
|
|
5429
4353
|
if (typeof entry === "string") {
|
|
5430
4354
|
entry = this.cwd.resolve(entry);
|
|
5431
4355
|
} else if (!(entry instanceof PathBase)) {
|
|
5432
|
-
|
|
4356
|
+
opts = entry;
|
|
5433
4357
|
entry = this.cwd;
|
|
5434
4358
|
}
|
|
5435
|
-
const { withFileTypes = true, follow = false, filter: filter2, walkFilter } =
|
|
4359
|
+
const { withFileTypes = true, follow = false, filter: filter2, walkFilter } = opts;
|
|
5436
4360
|
const results = [];
|
|
5437
4361
|
if (!filter2 || filter2(entry)) {
|
|
5438
4362
|
results.push(withFileTypes ? entry : entry.fullpath());
|
|
@@ -5487,14 +4411,14 @@ var PathScurryBase = class {
|
|
|
5487
4411
|
[Symbol.iterator]() {
|
|
5488
4412
|
return this.iterateSync();
|
|
5489
4413
|
}
|
|
5490
|
-
*iterateSync(entry = this.cwd,
|
|
4414
|
+
*iterateSync(entry = this.cwd, opts = {}) {
|
|
5491
4415
|
if (typeof entry === "string") {
|
|
5492
4416
|
entry = this.cwd.resolve(entry);
|
|
5493
4417
|
} else if (!(entry instanceof PathBase)) {
|
|
5494
|
-
|
|
4418
|
+
opts = entry;
|
|
5495
4419
|
entry = this.cwd;
|
|
5496
4420
|
}
|
|
5497
|
-
const { withFileTypes = true, follow = false, filter: filter2, walkFilter } =
|
|
4421
|
+
const { withFileTypes = true, follow = false, filter: filter2, walkFilter } = opts;
|
|
5498
4422
|
if (!filter2 || filter2(entry)) {
|
|
5499
4423
|
yield withFileTypes ? entry : entry.fullpath();
|
|
5500
4424
|
}
|
|
@@ -5518,14 +4442,14 @@ var PathScurryBase = class {
|
|
|
5518
4442
|
}
|
|
5519
4443
|
}
|
|
5520
4444
|
}
|
|
5521
|
-
stream(entry = this.cwd,
|
|
4445
|
+
stream(entry = this.cwd, opts = {}) {
|
|
5522
4446
|
if (typeof entry === "string") {
|
|
5523
4447
|
entry = this.cwd.resolve(entry);
|
|
5524
4448
|
} else if (!(entry instanceof PathBase)) {
|
|
5525
|
-
|
|
4449
|
+
opts = entry;
|
|
5526
4450
|
entry = this.cwd;
|
|
5527
4451
|
}
|
|
5528
|
-
const { withFileTypes = true, follow = false, filter: filter2, walkFilter } =
|
|
4452
|
+
const { withFileTypes = true, follow = false, filter: filter2, walkFilter } = opts;
|
|
5529
4453
|
const results = new Minipass({ objectMode: true });
|
|
5530
4454
|
if (!filter2 || filter2(entry)) {
|
|
5531
4455
|
results.write(withFileTypes ? entry : entry.fullpath());
|
|
@@ -5587,14 +4511,14 @@ var PathScurryBase = class {
|
|
|
5587
4511
|
process2();
|
|
5588
4512
|
return results;
|
|
5589
4513
|
}
|
|
5590
|
-
streamSync(entry = this.cwd,
|
|
4514
|
+
streamSync(entry = this.cwd, opts = {}) {
|
|
5591
4515
|
if (typeof entry === "string") {
|
|
5592
4516
|
entry = this.cwd.resolve(entry);
|
|
5593
4517
|
} else if (!(entry instanceof PathBase)) {
|
|
5594
|
-
|
|
4518
|
+
opts = entry;
|
|
5595
4519
|
entry = this.cwd;
|
|
5596
4520
|
}
|
|
5597
|
-
const { withFileTypes = true, follow = false, filter: filter2, walkFilter } =
|
|
4521
|
+
const { withFileTypes = true, follow = false, filter: filter2, walkFilter } = opts;
|
|
5598
4522
|
const results = new Minipass({ objectMode: true });
|
|
5599
4523
|
const dirs = /* @__PURE__ */ new Set();
|
|
5600
4524
|
if (!filter2 || filter2(entry)) {
|
|
@@ -5652,9 +4576,9 @@ var PathScurryWin32 = class extends PathScurryBase {
|
|
|
5652
4576
|
* separator for generating path strings
|
|
5653
4577
|
*/
|
|
5654
4578
|
sep = "\\";
|
|
5655
|
-
constructor(cwd = process.cwd(),
|
|
5656
|
-
const { nocase = true } =
|
|
5657
|
-
super(cwd, win32, "\\", { ...
|
|
4579
|
+
constructor(cwd = process.cwd(), opts = {}) {
|
|
4580
|
+
const { nocase = true } = opts;
|
|
4581
|
+
super(cwd, win32, "\\", { ...opts, nocase });
|
|
5658
4582
|
this.nocase = nocase;
|
|
5659
4583
|
for (let p = this.cwd; p; p = p.parent) {
|
|
5660
4584
|
p.nocase = this.nocase;
|
|
@@ -5684,9 +4608,9 @@ var PathScurryPosix = class extends PathScurryBase {
|
|
|
5684
4608
|
* separator for generating path strings
|
|
5685
4609
|
*/
|
|
5686
4610
|
sep = "/";
|
|
5687
|
-
constructor(cwd = process.cwd(),
|
|
5688
|
-
const { nocase = false } =
|
|
5689
|
-
super(cwd, posix, "/", { ...
|
|
4611
|
+
constructor(cwd = process.cwd(), opts = {}) {
|
|
4612
|
+
const { nocase = false } = opts;
|
|
4613
|
+
super(cwd, posix, "/", { ...opts, nocase });
|
|
5690
4614
|
this.nocase = nocase;
|
|
5691
4615
|
}
|
|
5692
4616
|
/**
|
|
@@ -5709,20 +4633,20 @@ var PathScurryPosix = class extends PathScurryBase {
|
|
|
5709
4633
|
}
|
|
5710
4634
|
};
|
|
5711
4635
|
var PathScurryDarwin = class extends PathScurryPosix {
|
|
5712
|
-
constructor(cwd = process.cwd(),
|
|
5713
|
-
const { nocase = true } =
|
|
5714
|
-
super(cwd, { ...
|
|
4636
|
+
constructor(cwd = process.cwd(), opts = {}) {
|
|
4637
|
+
const { nocase = true } = opts;
|
|
4638
|
+
super(cwd, { ...opts, nocase });
|
|
5715
4639
|
}
|
|
5716
4640
|
};
|
|
5717
4641
|
var Path = process.platform === "win32" ? PathWin32 : PathPosix;
|
|
5718
4642
|
var PathScurry = process.platform === "win32" ? PathScurryWin32 : process.platform === "darwin" ? PathScurryDarwin : PathScurryPosix;
|
|
5719
4643
|
|
|
5720
4644
|
// ../../src/workspaces/src/index.ts
|
|
5721
|
-
import { basename
|
|
4645
|
+
import { basename, posix as posix2, resolve as resolve3 } from "node:path";
|
|
5722
4646
|
|
|
5723
4647
|
// ../../src/workspaces/src/pnpm-workspace.ts
|
|
5724
|
-
import { readFileSync as
|
|
5725
|
-
import { resolve as
|
|
4648
|
+
import { readFileSync as readFileSync2 } from "node:fs";
|
|
4649
|
+
import { resolve as resolve2 } from "node:path";
|
|
5726
4650
|
var sep2 = (prev, flow) => !prev || (flow ? /[\s[,]/ : /\s/).test(prev);
|
|
5727
4651
|
var skipQuoted = (s, i) => {
|
|
5728
4652
|
const q = s.charAt(i);
|
|
@@ -5827,8 +4751,8 @@ var parsePnpmWorkspacePackages = (yaml) => {
|
|
|
5827
4751
|
var readPnpmWorkspacePackages = (projectRoot) => {
|
|
5828
4752
|
let yaml;
|
|
5829
4753
|
try {
|
|
5830
|
-
yaml =
|
|
5831
|
-
|
|
4754
|
+
yaml = readFileSync2(
|
|
4755
|
+
resolve2(projectRoot, "pnpm-workspace.yaml"),
|
|
5832
4756
|
"utf8"
|
|
5833
4757
|
);
|
|
5834
4758
|
} catch {
|
|
@@ -5925,11 +4849,16 @@ var asManifestWSConfig = (conf, path2) => {
|
|
|
5925
4849
|
}
|
|
5926
4850
|
return asWSConfig(conf, path2);
|
|
5927
4851
|
};
|
|
5928
|
-
var
|
|
4852
|
+
var vltJsonOnly = false;
|
|
4853
|
+
var setVltJsonOnly = (value) => {
|
|
4854
|
+
vltJsonOnly = value;
|
|
4855
|
+
};
|
|
4856
|
+
var resolveWSConfig = (projectRoot, packageJson = new PackageJson(), vltJsonOnlyArg = vltJsonOnly) => {
|
|
5929
4857
|
const fromVltJson = load("workspaces", assertWSConfig);
|
|
5930
4858
|
if (fromVltJson !== void 0) {
|
|
5931
4859
|
return { config: asWSConfig(fromVltJson), source: "vlt.json" };
|
|
5932
4860
|
}
|
|
4861
|
+
if (vltJsonOnlyArg) return { config: {} };
|
|
5933
4862
|
const workspaces = packageJson.maybeRead(projectRoot)?.workspaces;
|
|
5934
4863
|
if (workspaces === void 0) {
|
|
5935
4864
|
const packages = readPnpmWorkspacePackages(projectRoot);
|
|
@@ -5938,11 +4867,15 @@ var resolveWSConfig = (projectRoot, packageJson = new PackageJson()) => {
|
|
|
5938
4867
|
return {
|
|
5939
4868
|
config: asManifestWSConfig(
|
|
5940
4869
|
workspaces,
|
|
5941
|
-
|
|
4870
|
+
resolve3(projectRoot, "package.json")
|
|
5942
4871
|
),
|
|
5943
4872
|
source: "package.json"
|
|
5944
4873
|
};
|
|
5945
4874
|
};
|
|
4875
|
+
var migratableWSConfig = ({
|
|
4876
|
+
config,
|
|
4877
|
+
source
|
|
4878
|
+
}) => source && source !== "vlt.json" ? Object.values(config).flat() : void 0;
|
|
5946
4879
|
var splitNegatedPatterns = (all) => {
|
|
5947
4880
|
const patterns = [];
|
|
5948
4881
|
let ignore = [];
|
|
@@ -5976,7 +4909,7 @@ var Monorepo = class _Monorepo {
|
|
|
5976
4909
|
return [...this.values()].length;
|
|
5977
4910
|
}
|
|
5978
4911
|
constructor(projectRoot, options = {}) {
|
|
5979
|
-
this.projectRoot =
|
|
4912
|
+
this.projectRoot = resolve3(projectRoot);
|
|
5980
4913
|
this.scurry = options.scurry ?? new PathScurry(projectRoot);
|
|
5981
4914
|
this.packageJson = options.packageJson ?? new PackageJson();
|
|
5982
4915
|
this.#config = options.config;
|
|
@@ -6064,7 +4997,7 @@ var Monorepo = class _Monorepo {
|
|
|
6064
4997
|
// Either load a workspace from disk, or from our internal set,
|
|
6065
4998
|
// and assign it to the named group
|
|
6066
4999
|
#loadWS(path2, group) {
|
|
6067
|
-
const fullpath =
|
|
5000
|
+
const fullpath = resolve3(this.projectRoot, path2);
|
|
6068
5001
|
const loaded = this.#workspaces.get(fullpath);
|
|
6069
5002
|
if (loaded) return loaded;
|
|
6070
5003
|
const fromCache = workspaceCache.get(fullpath);
|
|
@@ -6103,7 +5036,7 @@ var Monorepo = class _Monorepo {
|
|
|
6103
5036
|
scurry: this.scurry,
|
|
6104
5037
|
withFileTypes: false,
|
|
6105
5038
|
ignore: {
|
|
6106
|
-
childrenIgnored: (p) =>
|
|
5039
|
+
childrenIgnored: (p) => basename(p.relativePosix()) === "node_modules" || // only prunes the subtree for a `!foo/**` style negation,
|
|
6107
5040
|
// matching npm -- a bare `!foo` still gets walked into
|
|
6108
5041
|
!!ignore?.childrenIgnored(p) || inMatches(p),
|
|
6109
5042
|
// ignore if fails to load package.json
|
|
@@ -6166,7 +5099,7 @@ var Monorepo = class _Monorepo {
|
|
|
6166
5099
|
throw error(
|
|
6167
5100
|
`Failed to parse package.json in workspace "${rel}"`,
|
|
6168
5101
|
{
|
|
6169
|
-
path:
|
|
5102
|
+
path: resolve3(this.projectRoot, rel, "package.json"),
|
|
6170
5103
|
cause: err
|
|
6171
5104
|
}
|
|
6172
5105
|
);
|
|
@@ -6397,7 +5330,7 @@ var Workspace = class {
|
|
|
6397
5330
|
this.path = path2;
|
|
6398
5331
|
this.fullpath = fullpath;
|
|
6399
5332
|
this.manifest = manifest;
|
|
6400
|
-
this.name = manifest.name ??
|
|
5333
|
+
this.name = manifest.name ?? basename(path2);
|
|
6401
5334
|
}
|
|
6402
5335
|
get keys() {
|
|
6403
5336
|
if (this.#keys) {
|
|
@@ -6409,21 +5342,14 @@ var Workspace = class {
|
|
|
6409
5342
|
};
|
|
6410
5343
|
|
|
6411
5344
|
export {
|
|
6412
|
-
detectLibc,
|
|
6413
|
-
platformCheck,
|
|
6414
|
-
pickManifest,
|
|
6415
|
-
spawn,
|
|
6416
|
-
revs,
|
|
6417
|
-
resolve,
|
|
6418
|
-
clone,
|
|
6419
|
-
is,
|
|
6420
|
-
isClean,
|
|
6421
|
-
getUser,
|
|
6422
5345
|
PackageJson,
|
|
6423
5346
|
minimatch,
|
|
6424
5347
|
PathScurry,
|
|
6425
5348
|
assertWSConfig,
|
|
5349
|
+
setVltJsonOnly,
|
|
6426
5350
|
resolveWSConfig,
|
|
5351
|
+
migratableWSConfig,
|
|
6427
5352
|
splitNegatedPatterns,
|
|
6428
|
-
Monorepo
|
|
5353
|
+
Monorepo,
|
|
5354
|
+
workspaceCache
|
|
6429
5355
|
};
|