rsbuild-plugin-arethetypeswrong 0.2.0 → 0.3.1
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/dist/453.js +185 -26
- package/dist/854.js +156 -0
- package/dist/{727.js → @arethetypeswrong/core.js} +7 -8
- package/dist/{45.js → createTarball.js} +126 -149
- package/dist/{408.js → getExitCode.js} +8 -4
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/render.js +1836 -0
- package/dist/{520.js → utils.js} +3 -3
- package/package.json +15 -19
- package/dist/131.js +0 -124
- package/dist/131.js.LICENSE.txt +0 -3
- package/dist/218.js +0 -1
- package/dist/356.js +0 -66617
- package/dist/363.js +0 -7
- package/dist/rslib-runtime.js +0 -48
- /package/dist/{727.js.LICENSE.txt → @arethetypeswrong/core.js.LICENSE.txt} +0 -0
- /package/dist/{356.js.LICENSE.txt → getExitCode.js.LICENSE.txt} +0 -0
- /package/dist/{408.js.LICENSE.txt → render.js.LICENSE.txt} +0 -0
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { __webpack_require__ } from "./rslib-runtime.js";
|
|
2
1
|
import promises from "node:fs/promises";
|
|
2
|
+
import node_path, { delimiter, dirname, normalize, resolve } from "node:path";
|
|
3
|
+
import node_process, { cwd as external_node_process_cwd } from "node:process";
|
|
4
|
+
import { createRequire } from "node:module";
|
|
3
5
|
import { spawn } from "node:child_process";
|
|
4
6
|
import { PassThrough } from "node:stream";
|
|
5
7
|
import node_readline from "node:readline";
|
|
6
|
-
import "./363.js";
|
|
7
|
-
import { delimiter, node_path, dirname, normalize, resolve } from "./131.js";
|
|
8
|
-
import { node_process, cwd as external_node_process_cwd } from "./218.js";
|
|
9
8
|
const constants_AGENTS = [
|
|
10
9
|
"npm",
|
|
11
10
|
"yarn",
|
|
@@ -160,39 +159,18 @@ async function handlePackageManager(filepath, options) {
|
|
|
160
159
|
function isMetadataYarnClassic(metadataPath) {
|
|
161
160
|
return metadataPath.endsWith(".yarn_integrity");
|
|
162
161
|
}
|
|
163
|
-
|
|
164
|
-
var main_l = Object.create;
|
|
165
|
-
var main_u = Object.defineProperty;
|
|
166
|
-
var main_d = Object.getOwnPropertyDescriptor;
|
|
167
|
-
var main_f = Object.getOwnPropertyNames;
|
|
168
|
-
var main_p = Object.getPrototypeOf;
|
|
169
|
-
var m = Object.prototype.hasOwnProperty;
|
|
170
|
-
var h = (e, t)=>()=>(t || e((t = {
|
|
162
|
+
var main_l = (e, t)=>()=>(t || e((t = {
|
|
171
163
|
exports: {}
|
|
172
164
|
}).exports, t), t.exports);
|
|
173
|
-
var
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
if (!m.call(e, s) && s !== n) main_u(e, s, {
|
|
177
|
-
get: ((e)=>t[e]).bind(null, s),
|
|
178
|
-
enumerable: !(r = main_d(t, s)) || r.enumerable
|
|
179
|
-
});
|
|
180
|
-
}
|
|
181
|
-
return e;
|
|
182
|
-
};
|
|
183
|
-
var _ = (e, t, n)=>(n = null != e ? main_l(main_p(e)) : {}, g(!t && e && e.__esModule ? n : main_u(n, "default", {
|
|
184
|
-
value: e,
|
|
185
|
-
enumerable: true
|
|
186
|
-
}), e));
|
|
187
|
-
var v = /* @__PURE__ */ (0, external_module_.createRequire)(import.meta.url);
|
|
188
|
-
const y = /^path$/i;
|
|
189
|
-
const b = {
|
|
165
|
+
var main_u = /* @__PURE__ */ createRequire(import.meta.url);
|
|
166
|
+
const main_d = /^path$/i;
|
|
167
|
+
const main_f = {
|
|
190
168
|
key: "PATH",
|
|
191
169
|
value: ""
|
|
192
170
|
};
|
|
193
|
-
function
|
|
171
|
+
function p(e) {
|
|
194
172
|
for(const t in e){
|
|
195
|
-
if (!Object.prototype.hasOwnProperty.call(e, t) || !
|
|
173
|
+
if (!Object.prototype.hasOwnProperty.call(e, t) || !main_d.test(t)) continue;
|
|
196
174
|
const n = e[t];
|
|
197
175
|
if (!n) break;
|
|
198
176
|
return {
|
|
@@ -200,32 +178,34 @@ function x(e) {
|
|
|
200
178
|
value: n
|
|
201
179
|
};
|
|
202
180
|
}
|
|
203
|
-
return
|
|
181
|
+
return main_f;
|
|
204
182
|
}
|
|
205
|
-
function
|
|
183
|
+
function m(e, t) {
|
|
206
184
|
const i = t.value.split(delimiter);
|
|
207
|
-
|
|
208
|
-
let s;
|
|
185
|
+
const o = [];
|
|
186
|
+
let s = e;
|
|
187
|
+
let c;
|
|
209
188
|
do {
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
}while (
|
|
189
|
+
o.push(resolve(s, "node_modules", ".bin"));
|
|
190
|
+
c = s;
|
|
191
|
+
s = dirname(s);
|
|
192
|
+
}while (s !== c);
|
|
193
|
+
const l = o.concat(i).join(delimiter);
|
|
214
194
|
return {
|
|
215
195
|
key: t.key,
|
|
216
|
-
value:
|
|
196
|
+
value: l
|
|
217
197
|
};
|
|
218
198
|
}
|
|
219
|
-
function
|
|
199
|
+
function h(e, t) {
|
|
220
200
|
const n = {
|
|
221
201
|
...process.env,
|
|
222
202
|
...t
|
|
223
203
|
};
|
|
224
|
-
const r =
|
|
204
|
+
const r = m(e, p(n));
|
|
225
205
|
n[r.key] = r.value;
|
|
226
206
|
return n;
|
|
227
207
|
}
|
|
228
|
-
const
|
|
208
|
+
const g = (e)=>{
|
|
229
209
|
let t = e.length;
|
|
230
210
|
const n = new PassThrough();
|
|
231
211
|
const r = ()=>{
|
|
@@ -239,10 +219,10 @@ const w = (e)=>{
|
|
|
239
219
|
}
|
|
240
220
|
return n;
|
|
241
221
|
};
|
|
242
|
-
var
|
|
222
|
+
var _ = /* @__PURE__ */ main_l((e, t)=>{
|
|
243
223
|
t.exports = a;
|
|
244
224
|
a.sync = o;
|
|
245
|
-
var n =
|
|
225
|
+
var n = main_u("fs");
|
|
246
226
|
function r(e, t) {
|
|
247
227
|
var n = void 0 !== t.pathExt ? t.pathExt : process.env.PATHEXT;
|
|
248
228
|
if (!n) return true;
|
|
@@ -267,10 +247,10 @@ var T = h((exports, t)=>{
|
|
|
267
247
|
return i(n.statSync(e), e, t);
|
|
268
248
|
}
|
|
269
249
|
});
|
|
270
|
-
var
|
|
250
|
+
var v = /* @__PURE__ */ main_l((e, t)=>{
|
|
271
251
|
t.exports = r;
|
|
272
252
|
r.sync = i;
|
|
273
|
-
var n =
|
|
253
|
+
var n = main_u("fs");
|
|
274
254
|
function r(e, t, r) {
|
|
275
255
|
n.stat(e, function(e, n) {
|
|
276
256
|
r(e, e ? false : a(n, t));
|
|
@@ -292,55 +272,54 @@ var E = h((exports, t)=>{
|
|
|
292
272
|
var c = parseInt("010", 8);
|
|
293
273
|
var l = parseInt("001", 8);
|
|
294
274
|
var u = s | c;
|
|
295
|
-
|
|
296
|
-
return d;
|
|
275
|
+
return n & l || n & c && i === o || n & s && r === a || n & u && 0 === a;
|
|
297
276
|
}
|
|
298
277
|
});
|
|
299
|
-
var
|
|
300
|
-
|
|
301
|
-
var
|
|
302
|
-
|
|
303
|
-
t.exports =
|
|
304
|
-
|
|
305
|
-
function
|
|
278
|
+
var y = /* @__PURE__ */ main_l((e, t)=>{
|
|
279
|
+
main_u("fs");
|
|
280
|
+
var n;
|
|
281
|
+
n = "win32" === process.platform || global.TESTING_WINDOWS ? _() : v();
|
|
282
|
+
t.exports = r;
|
|
283
|
+
r.sync = i;
|
|
284
|
+
function r(e, t, i) {
|
|
306
285
|
if ("function" == typeof t) {
|
|
307
|
-
|
|
286
|
+
i = t;
|
|
308
287
|
t = {};
|
|
309
288
|
}
|
|
310
|
-
if (!
|
|
289
|
+
if (!i) {
|
|
311
290
|
if ("function" != typeof Promise) throw new TypeError("callback not provided");
|
|
312
|
-
return new Promise(function(n,
|
|
313
|
-
|
|
314
|
-
if (e)
|
|
291
|
+
return new Promise(function(n, i) {
|
|
292
|
+
r(e, t || {}, function(e, t) {
|
|
293
|
+
if (e) i(e);
|
|
315
294
|
else n(t);
|
|
316
295
|
});
|
|
317
296
|
});
|
|
318
297
|
}
|
|
319
|
-
|
|
298
|
+
n(e, t || {}, function(e, n) {
|
|
320
299
|
if (e) {
|
|
321
300
|
if ("EACCES" === e.code || t && t.ignoreErrors) {
|
|
322
301
|
e = null;
|
|
323
|
-
|
|
302
|
+
n = false;
|
|
324
303
|
}
|
|
325
304
|
}
|
|
326
|
-
|
|
305
|
+
i(e, n);
|
|
327
306
|
});
|
|
328
307
|
}
|
|
329
|
-
function
|
|
308
|
+
function i(e, t) {
|
|
330
309
|
try {
|
|
331
|
-
return
|
|
310
|
+
return n.sync(e, t || {});
|
|
332
311
|
} catch (e) {
|
|
333
312
|
if (t && t.ignoreErrors || "EACCES" === e.code) return false;
|
|
334
313
|
throw e;
|
|
335
314
|
}
|
|
336
315
|
}
|
|
337
316
|
});
|
|
338
|
-
var
|
|
317
|
+
var b = /* @__PURE__ */ main_l((e, t)=>{
|
|
339
318
|
const n = "win32" === process.platform || "cygwin" === process.env.OSTYPE || "msys" === process.env.OSTYPE;
|
|
340
|
-
const r =
|
|
319
|
+
const r = main_u("path");
|
|
341
320
|
const i = n ? ";" : ":";
|
|
342
|
-
const a =
|
|
343
|
-
const o = (e)=>Object.assign(new Error(`not found: ${e}`), {
|
|
321
|
+
const a = y();
|
|
322
|
+
const o = (e)=>Object.assign(/* @__PURE__ */ new Error(`not found: ${e}`), {
|
|
344
323
|
code: "ENOENT"
|
|
345
324
|
});
|
|
346
325
|
const s = (e, t)=>{
|
|
@@ -379,8 +358,7 @@ var O = h((exports, t)=>{
|
|
|
379
358
|
const c = i[n];
|
|
380
359
|
const l = /^".*"$/.test(c) ? c.slice(1, -1) : c;
|
|
381
360
|
const d = r.join(l, e);
|
|
382
|
-
|
|
383
|
-
a(f(p, n, 0));
|
|
361
|
+
a(f(!l && /^\.[\\\/]/.test(e) ? e.slice(0, 2) + d : d, n, 0));
|
|
384
362
|
});
|
|
385
363
|
const f = (e, n, r)=>new Promise((i, o)=>{
|
|
386
364
|
if (r === c.length) return i(d(n + 1));
|
|
@@ -407,10 +385,9 @@ var O = h((exports, t)=>{
|
|
|
407
385
|
for(let e = 0; e < i.length; e++){
|
|
408
386
|
const n = f + i[e];
|
|
409
387
|
try {
|
|
410
|
-
|
|
388
|
+
if (a.sync(n, {
|
|
411
389
|
pathExt: c
|
|
412
|
-
});
|
|
413
|
-
if (e) if (!t.all) return n;
|
|
390
|
+
})) if (!t.all) return n;
|
|
414
391
|
else l.push(n);
|
|
415
392
|
} catch (e) {}
|
|
416
393
|
}
|
|
@@ -422,20 +399,19 @@ var O = h((exports, t)=>{
|
|
|
422
399
|
t.exports = c;
|
|
423
400
|
c.sync = l;
|
|
424
401
|
});
|
|
425
|
-
var
|
|
402
|
+
var x = /* @__PURE__ */ main_l((e, t)=>{
|
|
426
403
|
const n = (e = {})=>{
|
|
427
404
|
const t = e.env || process.env;
|
|
428
|
-
|
|
429
|
-
if ("win32" !== n) return "PATH";
|
|
405
|
+
if ("win32" !== (e.platform || process.platform)) return "PATH";
|
|
430
406
|
return Object.keys(t).reverse().find((e)=>"PATH" === e.toUpperCase()) || "Path";
|
|
431
407
|
};
|
|
432
408
|
t.exports = n;
|
|
433
409
|
t.exports.default = n;
|
|
434
410
|
});
|
|
435
|
-
var
|
|
436
|
-
const n =
|
|
437
|
-
const r =
|
|
438
|
-
const i =
|
|
411
|
+
var S = /* @__PURE__ */ main_l((e, t)=>{
|
|
412
|
+
const n = main_u("path");
|
|
413
|
+
const r = b();
|
|
414
|
+
const i = x();
|
|
439
415
|
function a(e, t) {
|
|
440
416
|
const a = e.options.env || process.env;
|
|
441
417
|
const o = process.cwd();
|
|
@@ -463,7 +439,7 @@ var A = h((exports, t)=>{
|
|
|
463
439
|
}
|
|
464
440
|
t.exports = o;
|
|
465
441
|
});
|
|
466
|
-
var
|
|
442
|
+
var C = /* @__PURE__ */ main_l((e, t)=>{
|
|
467
443
|
const n = /([()\][%!^"`<>&|;, *?])/g;
|
|
468
444
|
function r(e) {
|
|
469
445
|
e = e.replace(n, "^$1");
|
|
@@ -471,8 +447,8 @@ var j = h((exports, t)=>{
|
|
|
471
447
|
}
|
|
472
448
|
function i(e, t) {
|
|
473
449
|
e = `${e}`;
|
|
474
|
-
e = e.replace(/(
|
|
475
|
-
e = e.replace(/(
|
|
450
|
+
e = e.replace(/(?=(\\+?)?)\1"/g, "$1$1\\\"");
|
|
451
|
+
e = e.replace(/(?=(\\+?)?)\1$/, "$1$1");
|
|
476
452
|
e = `"${e}"`;
|
|
477
453
|
e = e.replace(n, "^$1");
|
|
478
454
|
if (t) e = e.replace(n, "^$1");
|
|
@@ -481,11 +457,11 @@ var j = h((exports, t)=>{
|
|
|
481
457
|
t.exports.command = r;
|
|
482
458
|
t.exports.argument = i;
|
|
483
459
|
});
|
|
484
|
-
var
|
|
460
|
+
var w = /* @__PURE__ */ main_l((e, t)=>{
|
|
485
461
|
t.exports = /^#!(.*)/;
|
|
486
462
|
});
|
|
487
|
-
var
|
|
488
|
-
const n =
|
|
463
|
+
var T = /* @__PURE__ */ main_l((e, t)=>{
|
|
464
|
+
const n = w();
|
|
489
465
|
t.exports = (e = "")=>{
|
|
490
466
|
const t = e.match(n);
|
|
491
467
|
if (!t) return null;
|
|
@@ -495,9 +471,9 @@ var N = h((exports, t)=>{
|
|
|
495
471
|
return i ? `${a} ${i}` : a;
|
|
496
472
|
};
|
|
497
473
|
});
|
|
498
|
-
var
|
|
499
|
-
const n =
|
|
500
|
-
const r =
|
|
474
|
+
var E = /* @__PURE__ */ main_l((e, t)=>{
|
|
475
|
+
const n = main_u("fs");
|
|
476
|
+
const r = T();
|
|
501
477
|
function i(e) {
|
|
502
478
|
const t = 150;
|
|
503
479
|
const i = Buffer.alloc(t);
|
|
@@ -511,11 +487,11 @@ var P = h((exports, t)=>{
|
|
|
511
487
|
}
|
|
512
488
|
t.exports = i;
|
|
513
489
|
});
|
|
514
|
-
var
|
|
515
|
-
const n =
|
|
516
|
-
const r =
|
|
517
|
-
const i =
|
|
518
|
-
const a =
|
|
490
|
+
var D = /* @__PURE__ */ main_l((e, t)=>{
|
|
491
|
+
const n = main_u("path");
|
|
492
|
+
const r = S();
|
|
493
|
+
const i = C();
|
|
494
|
+
const a = E();
|
|
519
495
|
const o = "win32" === process.platform;
|
|
520
496
|
const s = /\.(?:com|exe)$/i;
|
|
521
497
|
const c = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;
|
|
@@ -529,7 +505,7 @@ var F = h((exports, t)=>{
|
|
|
529
505
|
}
|
|
530
506
|
return e.file;
|
|
531
507
|
}
|
|
532
|
-
function
|
|
508
|
+
function d(e) {
|
|
533
509
|
if (!o) return e;
|
|
534
510
|
const t = l(e);
|
|
535
511
|
const r = !s.test(t);
|
|
@@ -538,21 +514,20 @@ var F = h((exports, t)=>{
|
|
|
538
514
|
e.command = n.normalize(e.command);
|
|
539
515
|
e.command = i.command(e.command);
|
|
540
516
|
e.args = e.args.map((e)=>i.argument(e, r));
|
|
541
|
-
const a = [
|
|
542
|
-
e.command
|
|
543
|
-
].concat(e.args).join(" ");
|
|
544
517
|
e.args = [
|
|
545
518
|
"/d",
|
|
546
519
|
"/s",
|
|
547
520
|
"/c",
|
|
548
|
-
`"${
|
|
521
|
+
`"${[
|
|
522
|
+
e.command
|
|
523
|
+
].concat(e.args).join(" ")}"`
|
|
549
524
|
];
|
|
550
525
|
e.command = process.env.comspec || "cmd.exe";
|
|
551
526
|
e.options.windowsVerbatimArguments = true;
|
|
552
527
|
}
|
|
553
528
|
return e;
|
|
554
529
|
}
|
|
555
|
-
function
|
|
530
|
+
function f(e, t, n) {
|
|
556
531
|
if (t && !Array.isArray(t)) {
|
|
557
532
|
n = t;
|
|
558
533
|
t = null;
|
|
@@ -569,14 +544,14 @@ var F = h((exports, t)=>{
|
|
|
569
544
|
args: t
|
|
570
545
|
}
|
|
571
546
|
};
|
|
572
|
-
return n.shell ? r :
|
|
547
|
+
return n.shell ? r : d(r);
|
|
573
548
|
}
|
|
574
|
-
t.exports =
|
|
549
|
+
t.exports = f;
|
|
575
550
|
});
|
|
576
|
-
var
|
|
551
|
+
var O = /* @__PURE__ */ main_l((e, t)=>{
|
|
577
552
|
const n = "win32" === process.platform;
|
|
578
553
|
function r(e, t) {
|
|
579
|
-
return Object.assign(new Error(`${t} ${e.command} ENOENT`), {
|
|
554
|
+
return Object.assign(/* @__PURE__ */ new Error(`${t} ${e.command} ENOENT`), {
|
|
580
555
|
code: "ENOENT",
|
|
581
556
|
errno: "ENOENT",
|
|
582
557
|
syscall: `${t} ${e.command}`,
|
|
@@ -589,7 +564,7 @@ var I = h((exports, t)=>{
|
|
|
589
564
|
const r = e.emit;
|
|
590
565
|
e.emit = function(n, i) {
|
|
591
566
|
if ("exit" === n) {
|
|
592
|
-
const n = a(i, t
|
|
567
|
+
const n = a(i, t);
|
|
593
568
|
if (n) return r.call(e, "error", n);
|
|
594
569
|
}
|
|
595
570
|
return r.apply(e, arguments);
|
|
@@ -610,10 +585,10 @@ var I = h((exports, t)=>{
|
|
|
610
585
|
notFoundError: r
|
|
611
586
|
};
|
|
612
587
|
});
|
|
613
|
-
var
|
|
614
|
-
const n =
|
|
615
|
-
const r =
|
|
616
|
-
const i =
|
|
588
|
+
var k = /* @__PURE__ */ main_l((e, t)=>{
|
|
589
|
+
const n = main_u("child_process");
|
|
590
|
+
const r = D();
|
|
591
|
+
const i = O();
|
|
617
592
|
function a(e, t, a) {
|
|
618
593
|
const o = r(e, t, a);
|
|
619
594
|
const s = n.spawn(o.command, o.args, o.options);
|
|
@@ -632,8 +607,8 @@ var L = h((exports, t)=>{
|
|
|
632
607
|
t.exports._parse = r;
|
|
633
608
|
t.exports._enoent = i;
|
|
634
609
|
});
|
|
635
|
-
var
|
|
636
|
-
var
|
|
610
|
+
var A = k();
|
|
611
|
+
var j = class extends Error {
|
|
637
612
|
result;
|
|
638
613
|
output;
|
|
639
614
|
get exitCode() {
|
|
@@ -645,22 +620,20 @@ var z = class extends Error {
|
|
|
645
620
|
this.output = t;
|
|
646
621
|
}
|
|
647
622
|
};
|
|
648
|
-
const
|
|
623
|
+
const M = {
|
|
649
624
|
timeout: void 0,
|
|
650
625
|
persist: false
|
|
651
626
|
};
|
|
652
|
-
const
|
|
627
|
+
const N = {
|
|
653
628
|
windowsHide: true
|
|
654
629
|
};
|
|
655
|
-
function
|
|
656
|
-
const n = normalize(e);
|
|
657
|
-
const r = t ?? [];
|
|
630
|
+
function P(e, t) {
|
|
658
631
|
return {
|
|
659
|
-
command:
|
|
660
|
-
args:
|
|
632
|
+
command: normalize(e),
|
|
633
|
+
args: t ?? []
|
|
661
634
|
};
|
|
662
635
|
}
|
|
663
|
-
function
|
|
636
|
+
function F(e) {
|
|
664
637
|
const t = new AbortController();
|
|
665
638
|
for (const n of e){
|
|
666
639
|
if (n.aborted) {
|
|
@@ -676,12 +649,12 @@ function U(e) {
|
|
|
676
649
|
}
|
|
677
650
|
return t.signal;
|
|
678
651
|
}
|
|
679
|
-
async function
|
|
652
|
+
async function I(e) {
|
|
680
653
|
let t = "";
|
|
681
654
|
for await (const n of e)t += n.toString();
|
|
682
655
|
return t;
|
|
683
656
|
}
|
|
684
|
-
var
|
|
657
|
+
var L = class {
|
|
685
658
|
_process;
|
|
686
659
|
_aborted = false;
|
|
687
660
|
_options;
|
|
@@ -701,7 +674,7 @@ var G = class {
|
|
|
701
674
|
}
|
|
702
675
|
constructor(e, t, n){
|
|
703
676
|
this._options = {
|
|
704
|
-
...
|
|
677
|
+
...M,
|
|
705
678
|
...n
|
|
706
679
|
};
|
|
707
680
|
this._command = e;
|
|
@@ -720,7 +693,7 @@ var G = class {
|
|
|
720
693
|
return this._process?.killed === true;
|
|
721
694
|
}
|
|
722
695
|
pipe(e, t, n) {
|
|
723
|
-
return
|
|
696
|
+
return z(e, t, {
|
|
724
697
|
...n,
|
|
725
698
|
stdin: this
|
|
726
699
|
});
|
|
@@ -731,7 +704,7 @@ var G = class {
|
|
|
731
704
|
const t = [];
|
|
732
705
|
if (this._streamErr) t.push(this._streamErr);
|
|
733
706
|
if (this._streamOut) t.push(this._streamOut);
|
|
734
|
-
const n =
|
|
707
|
+
const n = g(t);
|
|
735
708
|
const r = node_readline.createInterface({
|
|
736
709
|
input: n
|
|
737
710
|
});
|
|
@@ -739,14 +712,14 @@ var G = class {
|
|
|
739
712
|
await this._processClosed;
|
|
740
713
|
e.removeAllListeners();
|
|
741
714
|
if (this._thrownError) throw this._thrownError;
|
|
742
|
-
if (this._options?.throwOnError && 0 !== this.exitCode && void 0 !== this.exitCode) throw new
|
|
715
|
+
if (this._options?.throwOnError && 0 !== this.exitCode && void 0 !== this.exitCode) throw new j(this);
|
|
743
716
|
}
|
|
744
717
|
async _waitForOutput() {
|
|
745
718
|
const e = this._process;
|
|
746
719
|
if (!e) throw new Error("No process was started");
|
|
747
720
|
const [t, n] = await Promise.all([
|
|
748
|
-
this._streamOut ?
|
|
749
|
-
this._streamErr ?
|
|
721
|
+
this._streamOut ? I(this._streamOut) : "",
|
|
722
|
+
this._streamErr ? I(this._streamErr) : ""
|
|
750
723
|
]);
|
|
751
724
|
await this._processClosed;
|
|
752
725
|
if (this._options?.stdin) await this._options.stdin;
|
|
@@ -757,7 +730,7 @@ var G = class {
|
|
|
757
730
|
stdout: t,
|
|
758
731
|
exitCode: this.exitCode
|
|
759
732
|
};
|
|
760
|
-
if (this._options.throwOnError && 0 !== this.exitCode && void 0 !== this.exitCode) throw new
|
|
733
|
+
if (this._options.throwOnError && 0 !== this.exitCode && void 0 !== this.exitCode) throw new j(this, r);
|
|
761
734
|
return r;
|
|
762
735
|
}
|
|
763
736
|
then(e, t) {
|
|
@@ -769,7 +742,7 @@ var G = class {
|
|
|
769
742
|
const e = external_node_process_cwd();
|
|
770
743
|
const n = this._options;
|
|
771
744
|
const r = {
|
|
772
|
-
...
|
|
745
|
+
...N,
|
|
773
746
|
...n.nodeOptions
|
|
774
747
|
};
|
|
775
748
|
const i = [];
|
|
@@ -777,10 +750,10 @@ var G = class {
|
|
|
777
750
|
if (void 0 !== n.timeout) i.push(AbortSignal.timeout(n.timeout));
|
|
778
751
|
if (void 0 !== n.signal) i.push(n.signal);
|
|
779
752
|
if (true === n.persist) r.detached = true;
|
|
780
|
-
if (i.length > 0) r.signal =
|
|
781
|
-
r.env =
|
|
782
|
-
const { command: a, args: s } =
|
|
783
|
-
const c = (0,
|
|
753
|
+
if (i.length > 0) r.signal = F(i);
|
|
754
|
+
r.env = h(e, r.env);
|
|
755
|
+
const { command: a, args: s } = P(this._command, this._args);
|
|
756
|
+
const c = (0, A._parse)(a, s, r);
|
|
784
757
|
const l = spawn(c.command, c.args, c.options);
|
|
785
758
|
if (l.stderr) this._streamErr = l.stderr;
|
|
786
759
|
if (l.stdout) this._streamOut = l.stdout;
|
|
@@ -810,12 +783,12 @@ var G = class {
|
|
|
810
783
|
if (this._resolveClose) this._resolveClose();
|
|
811
784
|
};
|
|
812
785
|
};
|
|
813
|
-
const
|
|
814
|
-
const r = new
|
|
786
|
+
const R = (e, t, n)=>{
|
|
787
|
+
const r = new L(e, t, n);
|
|
815
788
|
r.spawn();
|
|
816
789
|
return r;
|
|
817
790
|
};
|
|
818
|
-
const
|
|
791
|
+
const z = R;
|
|
819
792
|
async function createTarball(root, pkg) {
|
|
820
793
|
const tarballPath = node_path.join(root, `${normalizeNpmPackageName(pkg.name)}-${pkg.version}.tgz`);
|
|
821
794
|
const detectResult = await detect({
|
|
@@ -841,35 +814,39 @@ async function createTarball(root, pkg) {
|
|
|
841
814
|
tarballPath
|
|
842
815
|
]
|
|
843
816
|
];
|
|
844
|
-
case "
|
|
845
|
-
case "
|
|
846
|
-
case "deno":
|
|
847
|
-
case void 0:
|
|
817
|
+
case "pnpm":
|
|
818
|
+
case "pnpm@6":
|
|
848
819
|
return [
|
|
849
|
-
"
|
|
820
|
+
"pnpm",
|
|
850
821
|
[
|
|
851
822
|
"pack"
|
|
852
823
|
]
|
|
853
824
|
];
|
|
854
|
-
case "
|
|
855
|
-
case "
|
|
825
|
+
case "npm":
|
|
826
|
+
case "bun":
|
|
827
|
+
case "deno":
|
|
828
|
+
case void 0:
|
|
829
|
+
default:
|
|
856
830
|
return [
|
|
857
|
-
"
|
|
831
|
+
"npm",
|
|
858
832
|
[
|
|
859
833
|
"pack"
|
|
860
834
|
]
|
|
861
835
|
];
|
|
862
836
|
}
|
|
863
837
|
}();
|
|
864
|
-
await
|
|
838
|
+
await R(command, args, {
|
|
865
839
|
nodeOptions: {
|
|
866
840
|
cwd: root
|
|
867
|
-
}
|
|
841
|
+
},
|
|
842
|
+
throwOnError: true
|
|
868
843
|
});
|
|
869
844
|
return {
|
|
870
845
|
path: tarballPath,
|
|
871
846
|
async [Symbol.asyncDispose] () {
|
|
872
|
-
|
|
847
|
+
try {
|
|
848
|
+
await promises.unlink(tarballPath);
|
|
849
|
+
} catch {}
|
|
873
850
|
}
|
|
874
851
|
};
|
|
875
852
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
import { problemFlags } from "./
|
|
1
|
+
/*! LICENSE: getExitCode.js.LICENSE.txt */
|
|
2
|
+
import { problemFlags, problemAffectsResolutionKind } from "./854.js";
|
|
3
|
+
import { allResolutionKinds } from "./utils.js";
|
|
3
4
|
/**
|
|
4
5
|
* @license
|
|
5
6
|
Copyright 2023 Andrew Branch
|
|
@@ -15,8 +16,11 @@ THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR I
|
|
|
15
16
|
const ignoreResolutions = opts?.ignoreResolutions ?? [];
|
|
16
17
|
return analysis.problems.some((problem)=>{
|
|
17
18
|
const notRuleIgnored = !ignoreRules.includes(problemFlags[problem.kind]);
|
|
18
|
-
|
|
19
|
-
|
|
19
|
+
if (!notRuleIgnored) return false;
|
|
20
|
+
const affectedKinds = allResolutionKinds.filter((rk)=>problemAffectsResolutionKind(problem, rk, analysis));
|
|
21
|
+
if (0 === affectedKinds.length) return true;
|
|
22
|
+
const notResolutionIgnored = affectedKinds.some((rk)=>!ignoreResolutions.includes(rk));
|
|
23
|
+
return notResolutionIgnored;
|
|
20
24
|
}) ? 1 : 0;
|
|
21
25
|
}
|
|
22
26
|
export { getExitCode };
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { pluginAreTheTypesWrong } from "./
|
|
1
|
+
export { pluginAreTheTypesWrong } from "./453.js";
|