@slidev/cli 0.42.3 → 0.42.5

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.
@@ -1,7 +1,7 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
2
2
 
3
3
 
4
- var _chunkQL6EDWJQjs = require('./chunk-QL6EDWJQ.js');
4
+ var _chunkGPOP6RE3js = require('./chunk-GPOP6RE3.js');
5
5
 
6
6
 
7
7
 
@@ -15,9 +15,10 @@ var _chunk6ZL4B4HQjs = require('./chunk-6ZL4B4HQ.js');
15
15
 
16
16
  var _chunkMJQETB73js = require('./chunk-MJQETB73.js');
17
17
 
18
- // ../../node_modules/.pnpm/semver@7.5.1/node_modules/semver/internal/constants.js
18
+ // ../../node_modules/.pnpm/semver@7.5.2/node_modules/semver/internal/constants.js
19
19
  var require_constants = _chunkMJQETB73js.__commonJS.call(void 0, {
20
- "../../node_modules/.pnpm/semver@7.5.1/node_modules/semver/internal/constants.js"(exports, module) {
20
+ "../../node_modules/.pnpm/semver@7.5.2/node_modules/semver/internal/constants.js"(exports, module) {
21
+ "use strict";
21
22
  var SEMVER_SPEC_VERSION = "2.0.0";
22
23
  var MAX_LENGTH = 256;
23
24
  var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || /* istanbul ignore next */
@@ -44,31 +45,36 @@ var require_constants = _chunkMJQETB73js.__commonJS.call(void 0, {
44
45
  }
45
46
  });
46
47
 
47
- // ../../node_modules/.pnpm/semver@7.5.1/node_modules/semver/internal/debug.js
48
+ // ../../node_modules/.pnpm/semver@7.5.2/node_modules/semver/internal/debug.js
48
49
  var require_debug = _chunkMJQETB73js.__commonJS.call(void 0, {
49
- "../../node_modules/.pnpm/semver@7.5.1/node_modules/semver/internal/debug.js"(exports, module) {
50
+ "../../node_modules/.pnpm/semver@7.5.2/node_modules/semver/internal/debug.js"(exports, module) {
51
+ "use strict";
50
52
  var debug2 = typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...args) => console.error("SEMVER", ...args) : () => {
51
53
  };
52
54
  module.exports = debug2;
53
55
  }
54
56
  });
55
57
 
56
- // ../../node_modules/.pnpm/semver@7.5.1/node_modules/semver/internal/re.js
58
+ // ../../node_modules/.pnpm/semver@7.5.2/node_modules/semver/internal/re.js
57
59
  var require_re = _chunkMJQETB73js.__commonJS.call(void 0, {
58
- "../../node_modules/.pnpm/semver@7.5.1/node_modules/semver/internal/re.js"(exports, module) {
60
+ "../../node_modules/.pnpm/semver@7.5.2/node_modules/semver/internal/re.js"(exports, module) {
61
+ "use strict";
59
62
  var { MAX_SAFE_COMPONENT_LENGTH } = require_constants();
60
63
  var debug2 = require_debug();
61
64
  exports = module.exports = {};
62
65
  var re = exports.re = [];
66
+ var safeRe = exports.safeRe = [];
63
67
  var src2 = exports.src = [];
64
68
  var t = exports.t = {};
65
69
  var R = 0;
66
70
  var createToken = (name, value, isGlobal) => {
71
+ const safe2 = value.split("\\s*").join("\\s{0,1}").split("\\s+").join("\\s");
67
72
  const index = R++;
68
73
  debug2(name, index, value);
69
74
  t[name] = index;
70
75
  src2[index] = value;
71
76
  re[index] = new RegExp(value, isGlobal ? "g" : void 0);
77
+ safeRe[index] = new RegExp(safe2, isGlobal ? "g" : void 0);
72
78
  };
73
79
  createToken("NUMERICIDENTIFIER", "0|[1-9]\\d*");
74
80
  createToken("NUMERICIDENTIFIERLOOSE", "[0-9]+");
@@ -116,9 +122,10 @@ var require_re = _chunkMJQETB73js.__commonJS.call(void 0, {
116
122
  }
117
123
  });
118
124
 
119
- // ../../node_modules/.pnpm/semver@7.5.1/node_modules/semver/internal/parse-options.js
125
+ // ../../node_modules/.pnpm/semver@7.5.2/node_modules/semver/internal/parse-options.js
120
126
  var require_parse_options = _chunkMJQETB73js.__commonJS.call(void 0, {
121
- "../../node_modules/.pnpm/semver@7.5.1/node_modules/semver/internal/parse-options.js"(exports, module) {
127
+ "../../node_modules/.pnpm/semver@7.5.2/node_modules/semver/internal/parse-options.js"(exports, module) {
128
+ "use strict";
122
129
  var looseOption = Object.freeze({ loose: true });
123
130
  var emptyOpts = Object.freeze({});
124
131
  var parseOptions = (options) => {
@@ -134,9 +141,10 @@ var require_parse_options = _chunkMJQETB73js.__commonJS.call(void 0, {
134
141
  }
135
142
  });
136
143
 
137
- // ../../node_modules/.pnpm/semver@7.5.1/node_modules/semver/internal/identifiers.js
144
+ // ../../node_modules/.pnpm/semver@7.5.2/node_modules/semver/internal/identifiers.js
138
145
  var require_identifiers = _chunkMJQETB73js.__commonJS.call(void 0, {
139
- "../../node_modules/.pnpm/semver@7.5.1/node_modules/semver/internal/identifiers.js"(exports, module) {
146
+ "../../node_modules/.pnpm/semver@7.5.2/node_modules/semver/internal/identifiers.js"(exports, module) {
147
+ "use strict";
140
148
  var numeric = /^[0-9]+$/;
141
149
  var compareIdentifiers = (a, b) => {
142
150
  const anum = numeric.test(a);
@@ -155,12 +163,13 @@ var require_identifiers = _chunkMJQETB73js.__commonJS.call(void 0, {
155
163
  }
156
164
  });
157
165
 
158
- // ../../node_modules/.pnpm/semver@7.5.1/node_modules/semver/classes/semver.js
166
+ // ../../node_modules/.pnpm/semver@7.5.2/node_modules/semver/classes/semver.js
159
167
  var require_semver = _chunkMJQETB73js.__commonJS.call(void 0, {
160
- "../../node_modules/.pnpm/semver@7.5.1/node_modules/semver/classes/semver.js"(exports, module) {
168
+ "../../node_modules/.pnpm/semver@7.5.2/node_modules/semver/classes/semver.js"(exports, module) {
169
+ "use strict";
161
170
  var debug2 = require_debug();
162
171
  var { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants();
163
- var { re, t } = require_re();
172
+ var { safeRe: re, t } = require_re();
164
173
  var parseOptions = require_parse_options();
165
174
  var { compareIdentifiers } = require_identifiers();
166
175
  var SemVer = class {
@@ -386,8 +395,10 @@ var require_semver = _chunkMJQETB73js.__commonJS.call(void 0, {
386
395
  default:
387
396
  throw new Error(`invalid increment argument: ${release}`);
388
397
  }
389
- this.format();
390
- this.raw = this.version;
398
+ this.raw = this.format();
399
+ if (this.build.length) {
400
+ this.raw += `+${this.build.join(".")}`;
401
+ }
391
402
  return this;
392
403
  }
393
404
  };
@@ -395,9 +406,10 @@ var require_semver = _chunkMJQETB73js.__commonJS.call(void 0, {
395
406
  }
396
407
  });
397
408
 
398
- // ../../node_modules/.pnpm/semver@7.5.1/node_modules/semver/functions/parse.js
409
+ // ../../node_modules/.pnpm/semver@7.5.2/node_modules/semver/functions/parse.js
399
410
  var require_parse = _chunkMJQETB73js.__commonJS.call(void 0, {
400
- "../../node_modules/.pnpm/semver@7.5.1/node_modules/semver/functions/parse.js"(exports, module) {
411
+ "../../node_modules/.pnpm/semver@7.5.2/node_modules/semver/functions/parse.js"(exports, module) {
412
+ "use strict";
401
413
  var SemVer = require_semver();
402
414
  var parse2 = (version3, options, throwErrors = false) => {
403
415
  if (version3 instanceof SemVer) {
@@ -416,9 +428,10 @@ var require_parse = _chunkMJQETB73js.__commonJS.call(void 0, {
416
428
  }
417
429
  });
418
430
 
419
- // ../../node_modules/.pnpm/semver@7.5.1/node_modules/semver/functions/valid.js
431
+ // ../../node_modules/.pnpm/semver@7.5.2/node_modules/semver/functions/valid.js
420
432
  var require_valid = _chunkMJQETB73js.__commonJS.call(void 0, {
421
- "../../node_modules/.pnpm/semver@7.5.1/node_modules/semver/functions/valid.js"(exports, module) {
433
+ "../../node_modules/.pnpm/semver@7.5.2/node_modules/semver/functions/valid.js"(exports, module) {
434
+ "use strict";
422
435
  var parse2 = require_parse();
423
436
  var valid = (version3, options) => {
424
437
  const v = parse2(version3, options);
@@ -428,9 +441,10 @@ var require_valid = _chunkMJQETB73js.__commonJS.call(void 0, {
428
441
  }
429
442
  });
430
443
 
431
- // ../../node_modules/.pnpm/semver@7.5.1/node_modules/semver/functions/clean.js
444
+ // ../../node_modules/.pnpm/semver@7.5.2/node_modules/semver/functions/clean.js
432
445
  var require_clean = _chunkMJQETB73js.__commonJS.call(void 0, {
433
- "../../node_modules/.pnpm/semver@7.5.1/node_modules/semver/functions/clean.js"(exports, module) {
446
+ "../../node_modules/.pnpm/semver@7.5.2/node_modules/semver/functions/clean.js"(exports, module) {
447
+ "use strict";
434
448
  var parse2 = require_parse();
435
449
  var clean = (version3, options) => {
436
450
  const s = parse2(version3.trim().replace(/^[=v]+/, ""), options);
@@ -440,9 +454,10 @@ var require_clean = _chunkMJQETB73js.__commonJS.call(void 0, {
440
454
  }
441
455
  });
442
456
 
443
- // ../../node_modules/.pnpm/semver@7.5.1/node_modules/semver/functions/inc.js
457
+ // ../../node_modules/.pnpm/semver@7.5.2/node_modules/semver/functions/inc.js
444
458
  var require_inc = _chunkMJQETB73js.__commonJS.call(void 0, {
445
- "../../node_modules/.pnpm/semver@7.5.1/node_modules/semver/functions/inc.js"(exports, module) {
459
+ "../../node_modules/.pnpm/semver@7.5.2/node_modules/semver/functions/inc.js"(exports, module) {
460
+ "use strict";
446
461
  var SemVer = require_semver();
447
462
  var inc = (version3, release, options, identifier, identifierBase) => {
448
463
  if (typeof options === "string") {
@@ -463,9 +478,10 @@ var require_inc = _chunkMJQETB73js.__commonJS.call(void 0, {
463
478
  }
464
479
  });
465
480
 
466
- // ../../node_modules/.pnpm/semver@7.5.1/node_modules/semver/functions/diff.js
481
+ // ../../node_modules/.pnpm/semver@7.5.2/node_modules/semver/functions/diff.js
467
482
  var require_diff = _chunkMJQETB73js.__commonJS.call(void 0, {
468
- "../../node_modules/.pnpm/semver@7.5.1/node_modules/semver/functions/diff.js"(exports, module) {
483
+ "../../node_modules/.pnpm/semver@7.5.2/node_modules/semver/functions/diff.js"(exports, module) {
484
+ "use strict";
469
485
  var parse2 = require_parse();
470
486
  var diff = (version1, version22) => {
471
487
  const v1 = parse2(version1, null, true);
@@ -478,6 +494,19 @@ var require_diff = _chunkMJQETB73js.__commonJS.call(void 0, {
478
494
  const highVersion = v1Higher ? v1 : v2;
479
495
  const lowVersion = v1Higher ? v2 : v1;
480
496
  const highHasPre = !!highVersion.prerelease.length;
497
+ const lowHasPre = !!lowVersion.prerelease.length;
498
+ if (lowHasPre && !highHasPre) {
499
+ if (!lowVersion.patch && !lowVersion.minor) {
500
+ return "major";
501
+ }
502
+ if (highVersion.patch) {
503
+ return "patch";
504
+ }
505
+ if (highVersion.minor) {
506
+ return "minor";
507
+ }
508
+ return "major";
509
+ }
481
510
  const prefix = highHasPre ? "pre" : "";
482
511
  if (v1.major !== v2.major) {
483
512
  return prefix + "major";
@@ -488,51 +517,46 @@ var require_diff = _chunkMJQETB73js.__commonJS.call(void 0, {
488
517
  if (v1.patch !== v2.patch) {
489
518
  return prefix + "patch";
490
519
  }
491
- if (highHasPre) {
492
- return "prerelease";
493
- }
494
- if (lowVersion.patch) {
495
- return "patch";
496
- }
497
- if (lowVersion.minor) {
498
- return "minor";
499
- }
500
- return "major";
520
+ return "prerelease";
501
521
  };
502
522
  module.exports = diff;
503
523
  }
504
524
  });
505
525
 
506
- // ../../node_modules/.pnpm/semver@7.5.1/node_modules/semver/functions/major.js
526
+ // ../../node_modules/.pnpm/semver@7.5.2/node_modules/semver/functions/major.js
507
527
  var require_major = _chunkMJQETB73js.__commonJS.call(void 0, {
508
- "../../node_modules/.pnpm/semver@7.5.1/node_modules/semver/functions/major.js"(exports, module) {
528
+ "../../node_modules/.pnpm/semver@7.5.2/node_modules/semver/functions/major.js"(exports, module) {
529
+ "use strict";
509
530
  var SemVer = require_semver();
510
531
  var major = (a, loose) => new SemVer(a, loose).major;
511
532
  module.exports = major;
512
533
  }
513
534
  });
514
535
 
515
- // ../../node_modules/.pnpm/semver@7.5.1/node_modules/semver/functions/minor.js
536
+ // ../../node_modules/.pnpm/semver@7.5.2/node_modules/semver/functions/minor.js
516
537
  var require_minor = _chunkMJQETB73js.__commonJS.call(void 0, {
517
- "../../node_modules/.pnpm/semver@7.5.1/node_modules/semver/functions/minor.js"(exports, module) {
538
+ "../../node_modules/.pnpm/semver@7.5.2/node_modules/semver/functions/minor.js"(exports, module) {
539
+ "use strict";
518
540
  var SemVer = require_semver();
519
541
  var minor = (a, loose) => new SemVer(a, loose).minor;
520
542
  module.exports = minor;
521
543
  }
522
544
  });
523
545
 
524
- // ../../node_modules/.pnpm/semver@7.5.1/node_modules/semver/functions/patch.js
546
+ // ../../node_modules/.pnpm/semver@7.5.2/node_modules/semver/functions/patch.js
525
547
  var require_patch = _chunkMJQETB73js.__commonJS.call(void 0, {
526
- "../../node_modules/.pnpm/semver@7.5.1/node_modules/semver/functions/patch.js"(exports, module) {
548
+ "../../node_modules/.pnpm/semver@7.5.2/node_modules/semver/functions/patch.js"(exports, module) {
549
+ "use strict";
527
550
  var SemVer = require_semver();
528
551
  var patch = (a, loose) => new SemVer(a, loose).patch;
529
552
  module.exports = patch;
530
553
  }
531
554
  });
532
555
 
533
- // ../../node_modules/.pnpm/semver@7.5.1/node_modules/semver/functions/prerelease.js
556
+ // ../../node_modules/.pnpm/semver@7.5.2/node_modules/semver/functions/prerelease.js
534
557
  var require_prerelease = _chunkMJQETB73js.__commonJS.call(void 0, {
535
- "../../node_modules/.pnpm/semver@7.5.1/node_modules/semver/functions/prerelease.js"(exports, module) {
558
+ "../../node_modules/.pnpm/semver@7.5.2/node_modules/semver/functions/prerelease.js"(exports, module) {
559
+ "use strict";
536
560
  var parse2 = require_parse();
537
561
  var prerelease = (version3, options) => {
538
562
  const parsed = parse2(version3, options);
@@ -542,36 +566,40 @@ var require_prerelease = _chunkMJQETB73js.__commonJS.call(void 0, {
542
566
  }
543
567
  });
544
568
 
545
- // ../../node_modules/.pnpm/semver@7.5.1/node_modules/semver/functions/compare.js
569
+ // ../../node_modules/.pnpm/semver@7.5.2/node_modules/semver/functions/compare.js
546
570
  var require_compare = _chunkMJQETB73js.__commonJS.call(void 0, {
547
- "../../node_modules/.pnpm/semver@7.5.1/node_modules/semver/functions/compare.js"(exports, module) {
571
+ "../../node_modules/.pnpm/semver@7.5.2/node_modules/semver/functions/compare.js"(exports, module) {
572
+ "use strict";
548
573
  var SemVer = require_semver();
549
574
  var compare = (a, b, loose) => new SemVer(a, loose).compare(new SemVer(b, loose));
550
575
  module.exports = compare;
551
576
  }
552
577
  });
553
578
 
554
- // ../../node_modules/.pnpm/semver@7.5.1/node_modules/semver/functions/rcompare.js
579
+ // ../../node_modules/.pnpm/semver@7.5.2/node_modules/semver/functions/rcompare.js
555
580
  var require_rcompare = _chunkMJQETB73js.__commonJS.call(void 0, {
556
- "../../node_modules/.pnpm/semver@7.5.1/node_modules/semver/functions/rcompare.js"(exports, module) {
581
+ "../../node_modules/.pnpm/semver@7.5.2/node_modules/semver/functions/rcompare.js"(exports, module) {
582
+ "use strict";
557
583
  var compare = require_compare();
558
584
  var rcompare = (a, b, loose) => compare(b, a, loose);
559
585
  module.exports = rcompare;
560
586
  }
561
587
  });
562
588
 
563
- // ../../node_modules/.pnpm/semver@7.5.1/node_modules/semver/functions/compare-loose.js
589
+ // ../../node_modules/.pnpm/semver@7.5.2/node_modules/semver/functions/compare-loose.js
564
590
  var require_compare_loose = _chunkMJQETB73js.__commonJS.call(void 0, {
565
- "../../node_modules/.pnpm/semver@7.5.1/node_modules/semver/functions/compare-loose.js"(exports, module) {
591
+ "../../node_modules/.pnpm/semver@7.5.2/node_modules/semver/functions/compare-loose.js"(exports, module) {
592
+ "use strict";
566
593
  var compare = require_compare();
567
594
  var compareLoose = (a, b) => compare(a, b, true);
568
595
  module.exports = compareLoose;
569
596
  }
570
597
  });
571
598
 
572
- // ../../node_modules/.pnpm/semver@7.5.1/node_modules/semver/functions/compare-build.js
599
+ // ../../node_modules/.pnpm/semver@7.5.2/node_modules/semver/functions/compare-build.js
573
600
  var require_compare_build = _chunkMJQETB73js.__commonJS.call(void 0, {
574
- "../../node_modules/.pnpm/semver@7.5.1/node_modules/semver/functions/compare-build.js"(exports, module) {
601
+ "../../node_modules/.pnpm/semver@7.5.2/node_modules/semver/functions/compare-build.js"(exports, module) {
602
+ "use strict";
575
603
  var SemVer = require_semver();
576
604
  var compareBuild = (a, b, loose) => {
577
605
  const versionA = new SemVer(a, loose);
@@ -582,81 +610,90 @@ var require_compare_build = _chunkMJQETB73js.__commonJS.call(void 0, {
582
610
  }
583
611
  });
584
612
 
585
- // ../../node_modules/.pnpm/semver@7.5.1/node_modules/semver/functions/sort.js
613
+ // ../../node_modules/.pnpm/semver@7.5.2/node_modules/semver/functions/sort.js
586
614
  var require_sort = _chunkMJQETB73js.__commonJS.call(void 0, {
587
- "../../node_modules/.pnpm/semver@7.5.1/node_modules/semver/functions/sort.js"(exports, module) {
615
+ "../../node_modules/.pnpm/semver@7.5.2/node_modules/semver/functions/sort.js"(exports, module) {
616
+ "use strict";
588
617
  var compareBuild = require_compare_build();
589
618
  var sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose));
590
619
  module.exports = sort;
591
620
  }
592
621
  });
593
622
 
594
- // ../../node_modules/.pnpm/semver@7.5.1/node_modules/semver/functions/rsort.js
623
+ // ../../node_modules/.pnpm/semver@7.5.2/node_modules/semver/functions/rsort.js
595
624
  var require_rsort = _chunkMJQETB73js.__commonJS.call(void 0, {
596
- "../../node_modules/.pnpm/semver@7.5.1/node_modules/semver/functions/rsort.js"(exports, module) {
625
+ "../../node_modules/.pnpm/semver@7.5.2/node_modules/semver/functions/rsort.js"(exports, module) {
626
+ "use strict";
597
627
  var compareBuild = require_compare_build();
598
628
  var rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose));
599
629
  module.exports = rsort;
600
630
  }
601
631
  });
602
632
 
603
- // ../../node_modules/.pnpm/semver@7.5.1/node_modules/semver/functions/gt.js
633
+ // ../../node_modules/.pnpm/semver@7.5.2/node_modules/semver/functions/gt.js
604
634
  var require_gt = _chunkMJQETB73js.__commonJS.call(void 0, {
605
- "../../node_modules/.pnpm/semver@7.5.1/node_modules/semver/functions/gt.js"(exports, module) {
635
+ "../../node_modules/.pnpm/semver@7.5.2/node_modules/semver/functions/gt.js"(exports, module) {
636
+ "use strict";
606
637
  var compare = require_compare();
607
638
  var gt = (a, b, loose) => compare(a, b, loose) > 0;
608
639
  module.exports = gt;
609
640
  }
610
641
  });
611
642
 
612
- // ../../node_modules/.pnpm/semver@7.5.1/node_modules/semver/functions/lt.js
643
+ // ../../node_modules/.pnpm/semver@7.5.2/node_modules/semver/functions/lt.js
613
644
  var require_lt = _chunkMJQETB73js.__commonJS.call(void 0, {
614
- "../../node_modules/.pnpm/semver@7.5.1/node_modules/semver/functions/lt.js"(exports, module) {
645
+ "../../node_modules/.pnpm/semver@7.5.2/node_modules/semver/functions/lt.js"(exports, module) {
646
+ "use strict";
615
647
  var compare = require_compare();
616
648
  var lt = (a, b, loose) => compare(a, b, loose) < 0;
617
649
  module.exports = lt;
618
650
  }
619
651
  });
620
652
 
621
- // ../../node_modules/.pnpm/semver@7.5.1/node_modules/semver/functions/eq.js
653
+ // ../../node_modules/.pnpm/semver@7.5.2/node_modules/semver/functions/eq.js
622
654
  var require_eq = _chunkMJQETB73js.__commonJS.call(void 0, {
623
- "../../node_modules/.pnpm/semver@7.5.1/node_modules/semver/functions/eq.js"(exports, module) {
655
+ "../../node_modules/.pnpm/semver@7.5.2/node_modules/semver/functions/eq.js"(exports, module) {
656
+ "use strict";
624
657
  var compare = require_compare();
625
658
  var eq = (a, b, loose) => compare(a, b, loose) === 0;
626
659
  module.exports = eq;
627
660
  }
628
661
  });
629
662
 
630
- // ../../node_modules/.pnpm/semver@7.5.1/node_modules/semver/functions/neq.js
663
+ // ../../node_modules/.pnpm/semver@7.5.2/node_modules/semver/functions/neq.js
631
664
  var require_neq = _chunkMJQETB73js.__commonJS.call(void 0, {
632
- "../../node_modules/.pnpm/semver@7.5.1/node_modules/semver/functions/neq.js"(exports, module) {
665
+ "../../node_modules/.pnpm/semver@7.5.2/node_modules/semver/functions/neq.js"(exports, module) {
666
+ "use strict";
633
667
  var compare = require_compare();
634
668
  var neq = (a, b, loose) => compare(a, b, loose) !== 0;
635
669
  module.exports = neq;
636
670
  }
637
671
  });
638
672
 
639
- // ../../node_modules/.pnpm/semver@7.5.1/node_modules/semver/functions/gte.js
673
+ // ../../node_modules/.pnpm/semver@7.5.2/node_modules/semver/functions/gte.js
640
674
  var require_gte = _chunkMJQETB73js.__commonJS.call(void 0, {
641
- "../../node_modules/.pnpm/semver@7.5.1/node_modules/semver/functions/gte.js"(exports, module) {
675
+ "../../node_modules/.pnpm/semver@7.5.2/node_modules/semver/functions/gte.js"(exports, module) {
676
+ "use strict";
642
677
  var compare = require_compare();
643
678
  var gte = (a, b, loose) => compare(a, b, loose) >= 0;
644
679
  module.exports = gte;
645
680
  }
646
681
  });
647
682
 
648
- // ../../node_modules/.pnpm/semver@7.5.1/node_modules/semver/functions/lte.js
683
+ // ../../node_modules/.pnpm/semver@7.5.2/node_modules/semver/functions/lte.js
649
684
  var require_lte = _chunkMJQETB73js.__commonJS.call(void 0, {
650
- "../../node_modules/.pnpm/semver@7.5.1/node_modules/semver/functions/lte.js"(exports, module) {
685
+ "../../node_modules/.pnpm/semver@7.5.2/node_modules/semver/functions/lte.js"(exports, module) {
686
+ "use strict";
651
687
  var compare = require_compare();
652
688
  var lte = (a, b, loose) => compare(a, b, loose) <= 0;
653
689
  module.exports = lte;
654
690
  }
655
691
  });
656
692
 
657
- // ../../node_modules/.pnpm/semver@7.5.1/node_modules/semver/functions/cmp.js
693
+ // ../../node_modules/.pnpm/semver@7.5.2/node_modules/semver/functions/cmp.js
658
694
  var require_cmp = _chunkMJQETB73js.__commonJS.call(void 0, {
659
- "../../node_modules/.pnpm/semver@7.5.1/node_modules/semver/functions/cmp.js"(exports, module) {
695
+ "../../node_modules/.pnpm/semver@7.5.2/node_modules/semver/functions/cmp.js"(exports, module) {
696
+ "use strict";
660
697
  var eq = require_eq();
661
698
  var neq = require_neq();
662
699
  var gt = require_gt();
@@ -703,12 +740,13 @@ var require_cmp = _chunkMJQETB73js.__commonJS.call(void 0, {
703
740
  }
704
741
  });
705
742
 
706
- // ../../node_modules/.pnpm/semver@7.5.1/node_modules/semver/functions/coerce.js
743
+ // ../../node_modules/.pnpm/semver@7.5.2/node_modules/semver/functions/coerce.js
707
744
  var require_coerce = _chunkMJQETB73js.__commonJS.call(void 0, {
708
- "../../node_modules/.pnpm/semver@7.5.1/node_modules/semver/functions/coerce.js"(exports, module) {
745
+ "../../node_modules/.pnpm/semver@7.5.2/node_modules/semver/functions/coerce.js"(exports, module) {
746
+ "use strict";
709
747
  var SemVer = require_semver();
710
748
  var parse2 = require_parse();
711
- var { re, t } = require_re();
749
+ var { safeRe: re, t } = require_re();
712
750
  var coerce = (version3, options) => {
713
751
  if (version3 instanceof SemVer) {
714
752
  return version3;
@@ -1395,9 +1433,10 @@ var require_lru_cache = _chunkMJQETB73js.__commonJS.call(void 0, {
1395
1433
  }
1396
1434
  });
1397
1435
 
1398
- // ../../node_modules/.pnpm/semver@7.5.1/node_modules/semver/classes/range.js
1436
+ // ../../node_modules/.pnpm/semver@7.5.2/node_modules/semver/classes/range.js
1399
1437
  var require_range = _chunkMJQETB73js.__commonJS.call(void 0, {
1400
- "../../node_modules/.pnpm/semver@7.5.1/node_modules/semver/classes/range.js"(exports, module) {
1438
+ "../../node_modules/.pnpm/semver@7.5.2/node_modules/semver/classes/range.js"(exports, module) {
1439
+ "use strict";
1401
1440
  var Range = class {
1402
1441
  constructor(range, options) {
1403
1442
  options = parseOptions(options);
@@ -1417,10 +1456,10 @@ var require_range = _chunkMJQETB73js.__commonJS.call(void 0, {
1417
1456
  this.options = options;
1418
1457
  this.loose = !!options.loose;
1419
1458
  this.includePrerelease = !!options.includePrerelease;
1420
- this.raw = range;
1421
- this.set = range.split("||").map((r) => this.parseRange(r.trim())).filter((c2) => c2.length);
1459
+ this.raw = range.trim().split(/\s+/).join(" ");
1460
+ this.set = this.raw.split("||").map((r) => this.parseRange(r)).filter((c2) => c2.length);
1422
1461
  if (!this.set.length) {
1423
- throw new TypeError(`Invalid SemVer Range: ${range}`);
1462
+ throw new TypeError(`Invalid SemVer Range: ${this.raw}`);
1424
1463
  }
1425
1464
  if (this.set.length > 1) {
1426
1465
  const first = this.set[0];
@@ -1439,16 +1478,13 @@ var require_range = _chunkMJQETB73js.__commonJS.call(void 0, {
1439
1478
  this.format();
1440
1479
  }
1441
1480
  format() {
1442
- this.range = this.set.map((comps) => {
1443
- return comps.join(" ").trim();
1444
- }).join("||").trim();
1481
+ this.range = this.set.map((comps) => comps.join(" ").trim()).join("||").trim();
1445
1482
  return this.range;
1446
1483
  }
1447
1484
  toString() {
1448
1485
  return this.range;
1449
1486
  }
1450
1487
  parseRange(range) {
1451
- range = range.trim();
1452
1488
  const memoOpts = (this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) | (this.options.loose && FLAG_LOOSE);
1453
1489
  const memoKey = memoOpts + ":" + range;
1454
1490
  const cached = cache.get(memoKey);
@@ -1463,7 +1499,6 @@ var require_range = _chunkMJQETB73js.__commonJS.call(void 0, {
1463
1499
  debug2("comparator trim", range);
1464
1500
  range = range.replace(re[t.TILDETRIM], tildeTrimReplace);
1465
1501
  range = range.replace(re[t.CARETTRIM], caretTrimReplace);
1466
- range = range.split(/\s+/).join(" ");
1467
1502
  let rangeList = range.split(" ").map((comp) => parseComparator(comp, this.options)).join(" ").split(/\s+/).map((comp) => replaceGTE0(comp, this.options));
1468
1503
  if (loose) {
1469
1504
  rangeList = rangeList.filter((comp) => {
@@ -1529,7 +1564,7 @@ var require_range = _chunkMJQETB73js.__commonJS.call(void 0, {
1529
1564
  var debug2 = require_debug();
1530
1565
  var SemVer = require_semver();
1531
1566
  var {
1532
- re,
1567
+ safeRe: re,
1533
1568
  t,
1534
1569
  comparatorTrimReplace,
1535
1570
  tildeTrimReplace,
@@ -1563,9 +1598,9 @@ var require_range = _chunkMJQETB73js.__commonJS.call(void 0, {
1563
1598
  return comp;
1564
1599
  };
1565
1600
  var isX = (id) => !id || id.toLowerCase() === "x" || id === "*";
1566
- var replaceTildes = (comp, options) => comp.trim().split(/\s+/).map((c2) => {
1567
- return replaceTilde(c2, options);
1568
- }).join(" ");
1601
+ var replaceTildes = (comp, options) => {
1602
+ return comp.trim().split(/\s+/).map((c2) => replaceTilde(c2, options)).join(" ");
1603
+ };
1569
1604
  var replaceTilde = (comp, options) => {
1570
1605
  const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE];
1571
1606
  return comp.replace(r, (_, M, m, p, pr) => {
@@ -1587,9 +1622,9 @@ var require_range = _chunkMJQETB73js.__commonJS.call(void 0, {
1587
1622
  return ret;
1588
1623
  });
1589
1624
  };
1590
- var replaceCarets = (comp, options) => comp.trim().split(/\s+/).map((c2) => {
1591
- return replaceCaret(c2, options);
1592
- }).join(" ");
1625
+ var replaceCarets = (comp, options) => {
1626
+ return comp.trim().split(/\s+/).map((c2) => replaceCaret(c2, options)).join(" ");
1627
+ };
1593
1628
  var replaceCaret = (comp, options) => {
1594
1629
  debug2("caret", comp, options);
1595
1630
  const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET];
@@ -1636,9 +1671,7 @@ var require_range = _chunkMJQETB73js.__commonJS.call(void 0, {
1636
1671
  };
1637
1672
  var replaceXRanges = (comp, options) => {
1638
1673
  debug2("replaceXRanges", comp, options);
1639
- return comp.split(/\s+/).map((c2) => {
1640
- return replaceXRange(c2, options);
1641
- }).join(" ");
1674
+ return comp.split(/\s+/).map((c2) => replaceXRange(c2, options)).join(" ");
1642
1675
  };
1643
1676
  var replaceXRange = (comp, options) => {
1644
1677
  comp = comp.trim();
@@ -1756,9 +1789,10 @@ var require_range = _chunkMJQETB73js.__commonJS.call(void 0, {
1756
1789
  }
1757
1790
  });
1758
1791
 
1759
- // ../../node_modules/.pnpm/semver@7.5.1/node_modules/semver/classes/comparator.js
1792
+ // ../../node_modules/.pnpm/semver@7.5.2/node_modules/semver/classes/comparator.js
1760
1793
  var require_comparator = _chunkMJQETB73js.__commonJS.call(void 0, {
1761
- "../../node_modules/.pnpm/semver@7.5.1/node_modules/semver/classes/comparator.js"(exports, module) {
1794
+ "../../node_modules/.pnpm/semver@7.5.2/node_modules/semver/classes/comparator.js"(exports, module) {
1795
+ "use strict";
1762
1796
  var ANY = Symbol("SemVer ANY");
1763
1797
  var Comparator = class {
1764
1798
  static get ANY() {
@@ -1773,6 +1807,7 @@ var require_comparator = _chunkMJQETB73js.__commonJS.call(void 0, {
1773
1807
  comp = comp.value;
1774
1808
  }
1775
1809
  }
1810
+ comp = comp.trim().split(/\s+/).join(" ");
1776
1811
  debug2("comparator", comp, options);
1777
1812
  this.options = options;
1778
1813
  this.loose = !!options.loose;
@@ -1859,7 +1894,7 @@ var require_comparator = _chunkMJQETB73js.__commonJS.call(void 0, {
1859
1894
  };
1860
1895
  module.exports = Comparator;
1861
1896
  var parseOptions = require_parse_options();
1862
- var { re, t } = require_re();
1897
+ var { safeRe: re, t } = require_re();
1863
1898
  var cmp = require_cmp();
1864
1899
  var debug2 = require_debug();
1865
1900
  var SemVer = require_semver();
@@ -1867,9 +1902,10 @@ var require_comparator = _chunkMJQETB73js.__commonJS.call(void 0, {
1867
1902
  }
1868
1903
  });
1869
1904
 
1870
- // ../../node_modules/.pnpm/semver@7.5.1/node_modules/semver/functions/satisfies.js
1905
+ // ../../node_modules/.pnpm/semver@7.5.2/node_modules/semver/functions/satisfies.js
1871
1906
  var require_satisfies = _chunkMJQETB73js.__commonJS.call(void 0, {
1872
- "../../node_modules/.pnpm/semver@7.5.1/node_modules/semver/functions/satisfies.js"(exports, module) {
1907
+ "../../node_modules/.pnpm/semver@7.5.2/node_modules/semver/functions/satisfies.js"(exports, module) {
1908
+ "use strict";
1873
1909
  var Range = require_range();
1874
1910
  var satisfies3 = (version3, range, options) => {
1875
1911
  try {
@@ -1883,18 +1919,20 @@ var require_satisfies = _chunkMJQETB73js.__commonJS.call(void 0, {
1883
1919
  }
1884
1920
  });
1885
1921
 
1886
- // ../../node_modules/.pnpm/semver@7.5.1/node_modules/semver/ranges/to-comparators.js
1922
+ // ../../node_modules/.pnpm/semver@7.5.2/node_modules/semver/ranges/to-comparators.js
1887
1923
  var require_to_comparators = _chunkMJQETB73js.__commonJS.call(void 0, {
1888
- "../../node_modules/.pnpm/semver@7.5.1/node_modules/semver/ranges/to-comparators.js"(exports, module) {
1924
+ "../../node_modules/.pnpm/semver@7.5.2/node_modules/semver/ranges/to-comparators.js"(exports, module) {
1925
+ "use strict";
1889
1926
  var Range = require_range();
1890
1927
  var toComparators = (range, options) => new Range(range, options).set.map((comp) => comp.map((c2) => c2.value).join(" ").trim().split(" "));
1891
1928
  module.exports = toComparators;
1892
1929
  }
1893
1930
  });
1894
1931
 
1895
- // ../../node_modules/.pnpm/semver@7.5.1/node_modules/semver/ranges/max-satisfying.js
1932
+ // ../../node_modules/.pnpm/semver@7.5.2/node_modules/semver/ranges/max-satisfying.js
1896
1933
  var require_max_satisfying = _chunkMJQETB73js.__commonJS.call(void 0, {
1897
- "../../node_modules/.pnpm/semver@7.5.1/node_modules/semver/ranges/max-satisfying.js"(exports, module) {
1934
+ "../../node_modules/.pnpm/semver@7.5.2/node_modules/semver/ranges/max-satisfying.js"(exports, module) {
1935
+ "use strict";
1898
1936
  var SemVer = require_semver();
1899
1937
  var Range = require_range();
1900
1938
  var maxSatisfying = (versions, range, options) => {
@@ -1920,9 +1958,10 @@ var require_max_satisfying = _chunkMJQETB73js.__commonJS.call(void 0, {
1920
1958
  }
1921
1959
  });
1922
1960
 
1923
- // ../../node_modules/.pnpm/semver@7.5.1/node_modules/semver/ranges/min-satisfying.js
1961
+ // ../../node_modules/.pnpm/semver@7.5.2/node_modules/semver/ranges/min-satisfying.js
1924
1962
  var require_min_satisfying = _chunkMJQETB73js.__commonJS.call(void 0, {
1925
- "../../node_modules/.pnpm/semver@7.5.1/node_modules/semver/ranges/min-satisfying.js"(exports, module) {
1963
+ "../../node_modules/.pnpm/semver@7.5.2/node_modules/semver/ranges/min-satisfying.js"(exports, module) {
1964
+ "use strict";
1926
1965
  var SemVer = require_semver();
1927
1966
  var Range = require_range();
1928
1967
  var minSatisfying = (versions, range, options) => {
@@ -1948,9 +1987,10 @@ var require_min_satisfying = _chunkMJQETB73js.__commonJS.call(void 0, {
1948
1987
  }
1949
1988
  });
1950
1989
 
1951
- // ../../node_modules/.pnpm/semver@7.5.1/node_modules/semver/ranges/min-version.js
1990
+ // ../../node_modules/.pnpm/semver@7.5.2/node_modules/semver/ranges/min-version.js
1952
1991
  var require_min_version = _chunkMJQETB73js.__commonJS.call(void 0, {
1953
- "../../node_modules/.pnpm/semver@7.5.1/node_modules/semver/ranges/min-version.js"(exports, module) {
1992
+ "../../node_modules/.pnpm/semver@7.5.2/node_modules/semver/ranges/min-version.js"(exports, module) {
1993
+ "use strict";
1954
1994
  var SemVer = require_semver();
1955
1995
  var Range = require_range();
1956
1996
  var gt = require_gt();
@@ -2004,9 +2044,10 @@ var require_min_version = _chunkMJQETB73js.__commonJS.call(void 0, {
2004
2044
  }
2005
2045
  });
2006
2046
 
2007
- // ../../node_modules/.pnpm/semver@7.5.1/node_modules/semver/ranges/valid.js
2047
+ // ../../node_modules/.pnpm/semver@7.5.2/node_modules/semver/ranges/valid.js
2008
2048
  var require_valid2 = _chunkMJQETB73js.__commonJS.call(void 0, {
2009
- "../../node_modules/.pnpm/semver@7.5.1/node_modules/semver/ranges/valid.js"(exports, module) {
2049
+ "../../node_modules/.pnpm/semver@7.5.2/node_modules/semver/ranges/valid.js"(exports, module) {
2050
+ "use strict";
2010
2051
  var Range = require_range();
2011
2052
  var validRange = (range, options) => {
2012
2053
  try {
@@ -2019,9 +2060,10 @@ var require_valid2 = _chunkMJQETB73js.__commonJS.call(void 0, {
2019
2060
  }
2020
2061
  });
2021
2062
 
2022
- // ../../node_modules/.pnpm/semver@7.5.1/node_modules/semver/ranges/outside.js
2063
+ // ../../node_modules/.pnpm/semver@7.5.2/node_modules/semver/ranges/outside.js
2023
2064
  var require_outside = _chunkMJQETB73js.__commonJS.call(void 0, {
2024
- "../../node_modules/.pnpm/semver@7.5.1/node_modules/semver/ranges/outside.js"(exports, module) {
2065
+ "../../node_modules/.pnpm/semver@7.5.2/node_modules/semver/ranges/outside.js"(exports, module) {
2066
+ "use strict";
2025
2067
  var SemVer = require_semver();
2026
2068
  var Comparator = require_comparator();
2027
2069
  var { ANY } = Comparator;
@@ -2087,27 +2129,30 @@ var require_outside = _chunkMJQETB73js.__commonJS.call(void 0, {
2087
2129
  }
2088
2130
  });
2089
2131
 
2090
- // ../../node_modules/.pnpm/semver@7.5.1/node_modules/semver/ranges/gtr.js
2132
+ // ../../node_modules/.pnpm/semver@7.5.2/node_modules/semver/ranges/gtr.js
2091
2133
  var require_gtr = _chunkMJQETB73js.__commonJS.call(void 0, {
2092
- "../../node_modules/.pnpm/semver@7.5.1/node_modules/semver/ranges/gtr.js"(exports, module) {
2134
+ "../../node_modules/.pnpm/semver@7.5.2/node_modules/semver/ranges/gtr.js"(exports, module) {
2135
+ "use strict";
2093
2136
  var outside = require_outside();
2094
2137
  var gtr = (version3, range, options) => outside(version3, range, ">", options);
2095
2138
  module.exports = gtr;
2096
2139
  }
2097
2140
  });
2098
2141
 
2099
- // ../../node_modules/.pnpm/semver@7.5.1/node_modules/semver/ranges/ltr.js
2142
+ // ../../node_modules/.pnpm/semver@7.5.2/node_modules/semver/ranges/ltr.js
2100
2143
  var require_ltr = _chunkMJQETB73js.__commonJS.call(void 0, {
2101
- "../../node_modules/.pnpm/semver@7.5.1/node_modules/semver/ranges/ltr.js"(exports, module) {
2144
+ "../../node_modules/.pnpm/semver@7.5.2/node_modules/semver/ranges/ltr.js"(exports, module) {
2145
+ "use strict";
2102
2146
  var outside = require_outside();
2103
2147
  var ltr = (version3, range, options) => outside(version3, range, "<", options);
2104
2148
  module.exports = ltr;
2105
2149
  }
2106
2150
  });
2107
2151
 
2108
- // ../../node_modules/.pnpm/semver@7.5.1/node_modules/semver/ranges/intersects.js
2152
+ // ../../node_modules/.pnpm/semver@7.5.2/node_modules/semver/ranges/intersects.js
2109
2153
  var require_intersects = _chunkMJQETB73js.__commonJS.call(void 0, {
2110
- "../../node_modules/.pnpm/semver@7.5.1/node_modules/semver/ranges/intersects.js"(exports, module) {
2154
+ "../../node_modules/.pnpm/semver@7.5.2/node_modules/semver/ranges/intersects.js"(exports, module) {
2155
+ "use strict";
2111
2156
  var Range = require_range();
2112
2157
  var intersects = (r1, r2, options) => {
2113
2158
  r1 = new Range(r1, options);
@@ -2118,9 +2163,10 @@ var require_intersects = _chunkMJQETB73js.__commonJS.call(void 0, {
2118
2163
  }
2119
2164
  });
2120
2165
 
2121
- // ../../node_modules/.pnpm/semver@7.5.1/node_modules/semver/ranges/simplify.js
2166
+ // ../../node_modules/.pnpm/semver@7.5.2/node_modules/semver/ranges/simplify.js
2122
2167
  var require_simplify = _chunkMJQETB73js.__commonJS.call(void 0, {
2123
- "../../node_modules/.pnpm/semver@7.5.1/node_modules/semver/ranges/simplify.js"(exports, module) {
2168
+ "../../node_modules/.pnpm/semver@7.5.2/node_modules/semver/ranges/simplify.js"(exports, module) {
2169
+ "use strict";
2124
2170
  var satisfies3 = require_satisfies();
2125
2171
  var compare = require_compare();
2126
2172
  module.exports = (versions, range, options) => {
@@ -2167,9 +2213,10 @@ var require_simplify = _chunkMJQETB73js.__commonJS.call(void 0, {
2167
2213
  }
2168
2214
  });
2169
2215
 
2170
- // ../../node_modules/.pnpm/semver@7.5.1/node_modules/semver/ranges/subset.js
2216
+ // ../../node_modules/.pnpm/semver@7.5.2/node_modules/semver/ranges/subset.js
2171
2217
  var require_subset = _chunkMJQETB73js.__commonJS.call(void 0, {
2172
- "../../node_modules/.pnpm/semver@7.5.1/node_modules/semver/ranges/subset.js"(exports, module) {
2218
+ "../../node_modules/.pnpm/semver@7.5.2/node_modules/semver/ranges/subset.js"(exports, module) {
2219
+ "use strict";
2173
2220
  var Range = require_range();
2174
2221
  var Comparator = require_comparator();
2175
2222
  var { ANY } = Comparator;
@@ -2329,9 +2376,10 @@ var require_subset = _chunkMJQETB73js.__commonJS.call(void 0, {
2329
2376
  }
2330
2377
  });
2331
2378
 
2332
- // ../../node_modules/.pnpm/semver@7.5.1/node_modules/semver/index.js
2379
+ // ../../node_modules/.pnpm/semver@7.5.2/node_modules/semver/index.js
2333
2380
  var require_semver2 = _chunkMJQETB73js.__commonJS.call(void 0, {
2334
- "../../node_modules/.pnpm/semver@7.5.1/node_modules/semver/index.js"(exports, module) {
2381
+ "../../node_modules/.pnpm/semver@7.5.2/node_modules/semver/index.js"(exports, module) {
2382
+ "use strict";
2335
2383
  var internalRe = require_re();
2336
2384
  var constants2 = require_constants();
2337
2385
  var SemVer = require_semver();
@@ -2431,7 +2479,7 @@ async function createServer(options, viteConfig = {}, serverOptions = {}) {
2431
2479
  const pluginOptions = rawConfig.slidev || {};
2432
2480
  process.env.EDITOR = process.env.EDITOR || "code";
2433
2481
  const server = await _vite.createServer.call(void 0,
2434
- await _chunkQL6EDWJQjs.mergeViteConfigs.call(void 0,
2482
+ await _chunkGPOP6RE3js.mergeViteConfigs.call(void 0,
2435
2483
  options,
2436
2484
  viteConfig,
2437
2485
  {
@@ -2441,7 +2489,7 @@ async function createServer(options, viteConfig = {}, serverOptions = {}) {
2441
2489
  ]
2442
2490
  },
2443
2491
  plugins: [
2444
- await _chunkQL6EDWJQjs.ViteSlidevPlugin.call(void 0, options, pluginOptions, serverOptions)
2492
+ await _chunkGPOP6RE3js.ViteSlidevPlugin.call(void 0, options, pluginOptions, serverOptions)
2445
2493
  ]
2446
2494
  },
2447
2495
  "serve"
@@ -2454,12 +2502,12 @@ async function createServer(options, viteConfig = {}, serverOptions = {}) {
2454
2502
  var _fs = require('@slidev/parser/fs'); var parser = _interopRequireWildcard(_fs);
2455
2503
 
2456
2504
  // package.json
2457
- var version = "0.42.3";
2505
+ var version = "0.42.5";
2458
2506
 
2459
2507
  // node/themes.ts
2460
2508
  var _prompts = require('prompts'); var _prompts2 = _interopRequireDefault(_prompts);
2461
2509
 
2462
- // ../../node_modules/.pnpm/@antfu+ni@0.21.3/node_modules/@antfu/ni/dist/shared/ni.f25270c8.mjs
2510
+ // ../../node_modules/.pnpm/@antfu+ni@0.21.4/node_modules/@antfu/ni/dist/shared/ni.377238f7.mjs
2463
2511
 
2464
2512
  var _readline = require('readline'); var _readline2 = _interopRequireDefault(_readline);
2465
2513
  var _events = require('events'); var _events2 = _interopRequireDefault(_events);
@@ -2479,12 +2527,14 @@ var _util = require('util'); var _util2 = _interopRequireDefault(_util);
2479
2527
 
2480
2528
 
2481
2529
  var _tty = require('tty'); var _tty2 = _interopRequireDefault(_tty);
2482
- var npmRun = (agent) => (args) => {
2483
- if (args.length > 1)
2484
- return `${agent} run ${args[0]} -- ${args.slice(1).join(" ")}`;
2485
- else
2486
- return `${agent} run ${args[0]}`;
2487
- };
2530
+ function npmRun(agent) {
2531
+ return (args) => {
2532
+ if (args.length > 1)
2533
+ return `${agent} run ${args[0]} -- ${args.slice(1).join(" ")}`;
2534
+ else
2535
+ return `${agent} run ${args[0]}`;
2536
+ };
2537
+ }
2488
2538
  var yarn = {
2489
2539
  "agent": "yarn {0}",
2490
2540
  "run": "yarn run {0}",
@@ -2578,42 +2628,49 @@ function getDefaultExportFromCjs(x) {
2578
2628
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
2579
2629
  }
2580
2630
  var { hasOwnProperty } = Object.prototype;
2581
- var eol = typeof process !== "undefined" && process.platform === "win32" ? "\r\n" : "\n";
2582
- var encode = (obj, opt) => {
2583
- const children = [];
2584
- let out = "";
2631
+ var encode = (obj, opt = {}) => {
2585
2632
  if (typeof opt === "string") {
2586
- opt = {
2587
- section: opt,
2588
- whitespace: false
2589
- };
2590
- } else {
2591
- opt = opt || /* @__PURE__ */ Object.create(null);
2592
- opt.whitespace = opt.whitespace === true;
2593
- }
2633
+ opt = { section: opt };
2634
+ }
2635
+ opt.align = opt.align === true;
2636
+ opt.newline = opt.newline === true;
2637
+ opt.sort = opt.sort === true;
2638
+ opt.whitespace = opt.whitespace === true || opt.align === true;
2639
+ opt.platform = opt.platform || typeof process !== "undefined" && process.platform;
2640
+ opt.bracketedArray = opt.bracketedArray !== false;
2641
+ const eol = opt.platform === "win32" ? "\r\n" : "\n";
2594
2642
  const separator = opt.whitespace ? " = " : "=";
2595
- for (const k of Object.keys(obj)) {
2643
+ const children = [];
2644
+ const keys = opt.sort ? Object.keys(obj).sort() : Object.keys(obj);
2645
+ let padToChars = 0;
2646
+ if (opt.align) {
2647
+ padToChars = safe(
2648
+ keys.filter((k) => obj[k] === null || Array.isArray(obj[k]) || typeof obj[k] !== "object").map((k) => Array.isArray(obj[k]) ? `${k}[]` : k).concat([""]).reduce((a, b) => safe(a).length >= safe(b).length ? a : b)
2649
+ ).length;
2650
+ }
2651
+ let out = "";
2652
+ const arraySuffix = opt.bracketedArray ? "[]" : "";
2653
+ for (const k of keys) {
2596
2654
  const val = obj[k];
2597
2655
  if (val && Array.isArray(val)) {
2598
2656
  for (const item2 of val) {
2599
- out += safe(k + "[]") + separator + safe(item2) + eol;
2657
+ out += safe(`${k}${arraySuffix}`).padEnd(padToChars, " ") + separator + safe(item2) + eol;
2600
2658
  }
2601
2659
  } else if (val && typeof val === "object") {
2602
2660
  children.push(k);
2603
2661
  } else {
2604
- out += safe(k) + separator + safe(val) + eol;
2662
+ out += safe(k).padEnd(padToChars, " ") + separator + safe(val) + eol;
2605
2663
  }
2606
2664
  }
2607
2665
  if (opt.section && out.length) {
2608
- out = "[" + safe(opt.section) + "]" + eol + out;
2666
+ out = "[" + safe(opt.section) + "]" + (opt.newline ? eol + eol : eol) + out;
2609
2667
  }
2610
2668
  for (const k of children) {
2611
- const nk = dotSplit(k).join("\\.");
2669
+ const nk = splitSections(k, ".").join("\\.");
2612
2670
  const section = (opt.section ? opt.section + "." : "") + nk;
2613
- const { whitespace } = opt;
2614
2671
  const child = encode(obj[k], {
2615
- section,
2616
- whitespace
2672
+ ...opt,
2673
+ section
2617
2674
  });
2618
2675
  if (out.length && child.length) {
2619
2676
  out += eol;
@@ -2622,15 +2679,35 @@ var encode = (obj, opt) => {
2622
2679
  }
2623
2680
  return out;
2624
2681
  };
2625
- var dotSplit = (str) => str.replace(/\1/g, "LITERAL\\1LITERAL").replace(/\\\./g, "").split(/\./).map((part) => part.replace(/\1/g, "\\.").replace(/\2LITERAL\\1LITERAL\2/g, ""));
2626
- var decode = (str) => {
2682
+ function splitSections(str, separator) {
2683
+ var lastMatchIndex = 0;
2684
+ var lastSeparatorIndex = 0;
2685
+ var nextIndex = 0;
2686
+ var sections = [];
2687
+ do {
2688
+ nextIndex = str.indexOf(separator, lastMatchIndex);
2689
+ if (nextIndex !== -1) {
2690
+ lastMatchIndex = nextIndex + separator.length;
2691
+ if (nextIndex > 0 && str[nextIndex - 1] === "\\") {
2692
+ continue;
2693
+ }
2694
+ sections.push(str.slice(lastSeparatorIndex, nextIndex));
2695
+ lastSeparatorIndex = nextIndex + separator.length;
2696
+ }
2697
+ } while (nextIndex !== -1);
2698
+ sections.push(str.slice(lastSeparatorIndex));
2699
+ return sections;
2700
+ }
2701
+ var decode = (str, opt = {}) => {
2702
+ opt.bracketedArray = opt.bracketedArray !== false;
2627
2703
  const out = /* @__PURE__ */ Object.create(null);
2628
2704
  let p = out;
2629
2705
  let section = null;
2630
- const re = /^\[([^\]]*)\]$|^([^=]+)(=(.*))?$/i;
2706
+ const re = /^\[([^\]]*)\]\s*$|^([^=]+)(=(.*))?$/i;
2631
2707
  const lines2 = str.split(/[\r\n]+/g);
2708
+ const duplicates = {};
2632
2709
  for (const line of lines2) {
2633
- if (!line || line.match(/^\s*[;#]/)) {
2710
+ if (!line || line.match(/^\s*[;#]/) || line.match(/^\s*$/)) {
2634
2711
  continue;
2635
2712
  }
2636
2713
  const match = line.match(re);
@@ -2647,7 +2724,13 @@ var decode = (str) => {
2647
2724
  continue;
2648
2725
  }
2649
2726
  const keyRaw = unsafe(match[2]);
2650
- const isArray = keyRaw.length > 2 && keyRaw.slice(-2) === "[]";
2727
+ let isArray;
2728
+ if (opt.bracketedArray) {
2729
+ isArray = keyRaw.length > 2 && keyRaw.slice(-2) === "[]";
2730
+ } else {
2731
+ duplicates[keyRaw] = ((duplicates == null ? void 0 : duplicates[keyRaw]) || 0) + 1;
2732
+ isArray = duplicates[keyRaw] > 1;
2733
+ }
2651
2734
  const key = isArray ? keyRaw.slice(0, -2) : keyRaw;
2652
2735
  if (key === "__proto__") {
2653
2736
  continue;
@@ -2672,7 +2755,7 @@ var decode = (str) => {
2672
2755
  if (!hasOwnProperty.call(out, k) || typeof out[k] !== "object" || Array.isArray(out[k])) {
2673
2756
  continue;
2674
2757
  }
2675
- const parts = dotSplit(k);
2758
+ const parts = splitSections(k, ".");
2676
2759
  p = out;
2677
2760
  const l = parts.pop();
2678
2761
  const nl = l.replace(/\\\./g, ".");
@@ -2750,6 +2833,7 @@ var ini = {
2750
2833
  safe,
2751
2834
  unsafe
2752
2835
  };
2836
+ var ini$1 = /* @__PURE__ */ getDefaultExportFromCjs(ini);
2753
2837
  var Node = class {
2754
2838
 
2755
2839
 
@@ -2969,17 +3053,17 @@ async function getConfig() {
2969
3053
  packageManager = _nullishCoalesce(JSON.parse(_fs3.default.readFileSync(result, "utf8")).packageManager, () => ( ""));
2970
3054
  const [, agent, version3] = packageManager.match(new RegExp(`^(${Object.values(LOCKS).join("|")})@(d).*?$`)) || [];
2971
3055
  if (agent)
2972
- config = Object.assign({}, defaultConfig, { defaultAgent: agent === "yarn" && parseInt(version3) > 1 ? "yarn@berry" : agent });
3056
+ config = Object.assign({}, defaultConfig, { defaultAgent: agent === "yarn" && Number.parseInt(version3) > 1 ? "yarn@berry" : agent });
2973
3057
  else if (!_fs3.default.existsSync(rcPath))
2974
3058
  config = defaultConfig;
2975
3059
  else
2976
- config = Object.assign({}, defaultConfig, ini.parse(_fs3.default.readFileSync(rcPath, "utf-8")));
3060
+ config = Object.assign({}, defaultConfig, ini$1.parse(_fs3.default.readFileSync(rcPath, "utf-8")));
2977
3061
  }
2978
3062
  return config;
2979
3063
  }
2980
- async function getDefaultAgent() {
3064
+ async function getDefaultAgent(programmatic) {
2981
3065
  const { defaultAgent } = await getConfig();
2982
- if (defaultAgent === "prompt" && process.env.CI)
3066
+ if (defaultAgent === "prompt" && (programmatic || process.env.CI))
2983
3067
  return "npm";
2984
3068
  return defaultAgent;
2985
3069
  }
@@ -2987,15 +3071,7 @@ async function getGlobalAgent() {
2987
3071
  const { globalAgent } = await getConfig();
2988
3072
  return globalAgent;
2989
3073
  }
2990
- var crossSpawnExports = {};
2991
- var crossSpawn = {
2992
- get exports() {
2993
- return crossSpawnExports;
2994
- },
2995
- set exports(v) {
2996
- crossSpawnExports = v;
2997
- }
2998
- };
3074
+ var crossSpawn$1 = { exports: {} };
2999
3075
  var windows;
3000
3076
  var hasRequiredWindows;
3001
3077
  function requireWindows() {
@@ -3146,7 +3222,7 @@ var getPathInfo$1 = (cmd, opt) => {
3146
3222
  pathExtExe
3147
3223
  };
3148
3224
  };
3149
- var which$2 = (cmd, opt, cb) => {
3225
+ var which$3 = (cmd, opt, cb) => {
3150
3226
  if (typeof opt === "function") {
3151
3227
  cb = opt;
3152
3228
  opt = {};
@@ -3209,17 +3285,9 @@ var whichSync$1 = (cmd, opt) => {
3209
3285
  return null;
3210
3286
  throw getNotFoundError$1(cmd);
3211
3287
  };
3212
- var which_1 = which$2;
3213
- which$2.sync = whichSync$1;
3214
- var pathKeyExports = {};
3215
- var pathKey$2 = {
3216
- get exports() {
3217
- return pathKeyExports;
3218
- },
3219
- set exports(v) {
3220
- pathKeyExports = v;
3221
- }
3222
- };
3288
+ var which_1 = which$3;
3289
+ which$3.sync = whichSync$1;
3290
+ var pathKey$2 = { exports: {} };
3223
3291
  var pathKey$1 = (options = {}) => {
3224
3292
  const environment = options.env || process.env;
3225
3293
  const platform = options.platform || process.platform;
@@ -3229,9 +3297,10 @@ var pathKey$1 = (options = {}) => {
3229
3297
  return Object.keys(environment).reverse().find((key) => key.toUpperCase() === "PATH") || "Path";
3230
3298
  };
3231
3299
  pathKey$2.exports = pathKey$1;
3232
- pathKeyExports.default = pathKey$1;
3300
+ pathKey$2.exports.default = pathKey$1;
3301
+ var pathKeyExports = pathKey$2.exports;
3233
3302
  var path$1 = _path2.default;
3234
- var which$1 = which_1;
3303
+ var which$2 = which_1;
3235
3304
  var getPathKey = pathKeyExports;
3236
3305
  function resolveCommandAttempt(parsed, withoutPathExt) {
3237
3306
  const env2 = parsed.options.env || process.env;
@@ -3246,7 +3315,7 @@ function resolveCommandAttempt(parsed, withoutPathExt) {
3246
3315
  }
3247
3316
  let resolved;
3248
3317
  try {
3249
- resolved = which$1.sync(parsed.command, {
3318
+ resolved = which$2.sync(parsed.command, {
3250
3319
  path: env2[getPathKey({ env: env2 })],
3251
3320
  pathExt: withoutPathExt ? path$1.delimiter : void 0
3252
3321
  });
@@ -3426,11 +3495,13 @@ function spawnSync(command, args, options) {
3426
3495
  result.error = result.error || enoent.verifyENOENTSync(result.status, parsed);
3427
3496
  return result;
3428
3497
  }
3429
- crossSpawn.exports = spawn;
3430
- crossSpawnExports.spawn = spawn;
3431
- crossSpawnExports.sync = spawnSync;
3432
- crossSpawnExports._parse = parse;
3433
- crossSpawnExports._enoent = enoent;
3498
+ crossSpawn$1.exports = spawn;
3499
+ crossSpawn$1.exports.spawn = spawn;
3500
+ crossSpawn$1.exports.sync = spawnSync;
3501
+ crossSpawn$1.exports._parse = parse;
3502
+ crossSpawn$1.exports._enoent = enoent;
3503
+ var crossSpawnExports = crossSpawn$1.exports;
3504
+ var crossSpawn = /* @__PURE__ */ getDefaultExportFromCjs(crossSpawnExports);
3434
3505
  function stripFinalNewline(input) {
3435
3506
  const LF = typeof input === "string" ? "\n" : "\n".charCodeAt();
3436
3507
  const CR = typeof input === "string" ? "\r" : "\r".charCodeAt();
@@ -3988,28 +4059,12 @@ var normalizeStdio = (options) => {
3988
4059
  const length = Math.max(stdio.length, aliases.length);
3989
4060
  return Array.from({ length }, (value, index) => stdio[index]);
3990
4061
  };
3991
- var signalExitExports = {};
3992
- var signalExit = {
3993
- get exports() {
3994
- return signalExitExports;
3995
- },
3996
- set exports(v) {
3997
- signalExitExports = v;
3998
- }
3999
- };
4000
- var signalsExports = {};
4001
- var signals$1 = {
4002
- get exports() {
4003
- return signalsExports;
4004
- },
4005
- set exports(v) {
4006
- signalsExports = v;
4007
- }
4008
- };
4062
+ var signalExit = { exports: {} };
4063
+ var signals$1 = { exports: {} };
4009
4064
  var hasRequiredSignals;
4010
4065
  function requireSignals() {
4011
4066
  if (hasRequiredSignals)
4012
- return signalsExports;
4067
+ return signals$1.exports;
4013
4068
  hasRequiredSignals = 1;
4014
4069
  (function(module) {
4015
4070
  module.exports = [
@@ -4044,7 +4099,7 @@ function requireSignals() {
4044
4099
  );
4045
4100
  }
4046
4101
  })(signals$1);
4047
- return signalsExports;
4102
+ return signals$1.exports;
4048
4103
  }
4049
4104
  var process$1 = commonjsGlobal.process;
4050
4105
  var processOk = function(process2) {
@@ -4111,7 +4166,7 @@ if (!processOk(process$1)) {
4111
4166
  process$1.reallyExit = originalProcessReallyExit;
4112
4167
  emitter.count -= 1;
4113
4168
  };
4114
- signalExitExports.unload = unload;
4169
+ signalExit.exports.unload = unload;
4115
4170
  emit = function emit2(event, code, signal) {
4116
4171
  if (emitter.emitted[event]) {
4117
4172
  return;
@@ -4137,7 +4192,7 @@ if (!processOk(process$1)) {
4137
4192
  }
4138
4193
  };
4139
4194
  });
4140
- signalExitExports.signals = function() {
4195
+ signalExit.exports.signals = function() {
4141
4196
  return signals;
4142
4197
  };
4143
4198
  loaded = false;
@@ -4158,7 +4213,7 @@ if (!processOk(process$1)) {
4158
4213
  process$1.emit = processEmit;
4159
4214
  process$1.reallyExit = processReallyExit;
4160
4215
  };
4161
- signalExitExports.load = load;
4216
+ signalExit.exports.load = load;
4162
4217
  originalProcessReallyExit = process$1.reallyExit;
4163
4218
  processReallyExit = function processReallyExit2(code) {
4164
4219
  if (!processOk(commonjsGlobal.process)) {
@@ -4199,6 +4254,8 @@ var originalProcessReallyExit;
4199
4254
  var processReallyExit;
4200
4255
  var originalProcessEmit;
4201
4256
  var processEmit;
4257
+ var signalExitExports = signalExit.exports;
4258
+ var onExit = /* @__PURE__ */ getDefaultExportFromCjs(signalExitExports);
4202
4259
  var DEFAULT_FORCE_KILL_TIMEOUT = 1e3 * 5;
4203
4260
  var spawnedKill = (kill, signal = "SIGTERM", options = {}) => {
4204
4261
  const killResult = kill(signal);
@@ -4262,7 +4319,7 @@ var setExitHandler = async (spawned, { cleanup, detached }, timedPromise) => {
4262
4319
  if (!cleanup || detached) {
4263
4320
  return timedPromise;
4264
4321
  }
4265
- const removeExitHandler = signalExitExports(() => {
4322
+ const removeExitHandler = onExit(() => {
4266
4323
  spawned.kill();
4267
4324
  });
4268
4325
  return timedPromise.finally(() => {
@@ -4305,15 +4362,7 @@ var addPipeMethods = (spawned) => {
4305
4362
  spawned.pipeAll = pipeToTarget.bind(void 0, spawned, "all");
4306
4363
  }
4307
4364
  };
4308
- var getStreamExports = {};
4309
- var getStream$1 = {
4310
- get exports() {
4311
- return getStreamExports;
4312
- },
4313
- set exports(v) {
4314
- getStreamExports = v;
4315
- }
4316
- };
4365
+ var getStream$2 = { exports: {} };
4317
4366
  var { PassThrough: PassThroughStream } = _stream2.default;
4318
4367
  var bufferStream$1 = (options) => {
4319
4368
  options = { ...options };
@@ -4396,10 +4445,12 @@ async function getStream(inputStream, options) {
4396
4445
  });
4397
4446
  return stream2.getBufferedValue();
4398
4447
  }
4399
- getStream$1.exports = getStream;
4400
- getStreamExports.buffer = (stream2, options) => getStream(stream2, { ...options, encoding: "buffer" });
4401
- getStreamExports.array = (stream2, options) => getStream(stream2, { ...options, array: true });
4402
- getStreamExports.MaxBufferError = MaxBufferError;
4448
+ getStream$2.exports = getStream;
4449
+ getStream$2.exports.buffer = (stream2, options) => getStream(stream2, { ...options, encoding: "buffer" });
4450
+ getStream$2.exports.array = (stream2, options) => getStream(stream2, { ...options, array: true });
4451
+ getStream$2.exports.MaxBufferError = MaxBufferError;
4452
+ var getStreamExports = getStream$2.exports;
4453
+ var getStream$1 = /* @__PURE__ */ getDefaultExportFromCjs(getStreamExports);
4403
4454
  var { PassThrough } = _stream2.default;
4404
4455
  var mergeStream = function() {
4405
4456
  var sources = [];
@@ -4433,6 +4484,7 @@ var mergeStream = function() {
4433
4484
  }
4434
4485
  }
4435
4486
  };
4487
+ var mergeStream$1 = /* @__PURE__ */ getDefaultExportFromCjs(mergeStream);
4436
4488
  var validateInputOptions = (input) => {
4437
4489
  if (input !== void 0) {
4438
4490
  throw new TypeError("The `input` and `inputFile` options cannot be both set.");
@@ -4460,7 +4512,7 @@ var makeAllStream = (spawned, { all }) => {
4460
4512
  if (!all || !spawned.stdout && !spawned.stderr) {
4461
4513
  return;
4462
4514
  }
4463
- const mixed = mergeStream();
4515
+ const mixed = mergeStream$1();
4464
4516
  if (spawned.stdout) {
4465
4517
  mixed.add(spawned.stdout);
4466
4518
  }
@@ -4485,9 +4537,9 @@ var getStreamPromise = (stream2, { encoding, buffer, maxBuffer }) => {
4485
4537
  return;
4486
4538
  }
4487
4539
  if (encoding) {
4488
- return getStreamExports(stream2, { encoding, maxBuffer });
4540
+ return getStream$1(stream2, { encoding, maxBuffer });
4489
4541
  }
4490
- return getStreamExports.buffer(stream2, { maxBuffer });
4542
+ return getStream$1.buffer(stream2, { maxBuffer });
4491
4543
  };
4492
4544
  var getSpawnedResult = async ({ stdout, stderr, all }, { encoding, buffer, maxBuffer }, processDone) => {
4493
4545
  const stdoutPromise = getStreamPromise(stdout, { encoding, buffer, maxBuffer });
@@ -4504,8 +4556,8 @@ var getSpawnedResult = async ({ stdout, stderr, all }, { encoding, buffer, maxBu
4504
4556
  ]);
4505
4557
  }
4506
4558
  };
4507
- var nativePromisePrototype = (async () => {
4508
- })().constructor.prototype;
4559
+ var nativePromisePrototype = (/* @__PURE__ */ (async () => {
4560
+ })()).constructor.prototype;
4509
4561
  var descriptors = ["then", "catch", "finally"].map((property) => [
4510
4562
  property,
4511
4563
  Reflect.getOwnPropertyDescriptor(nativePromisePrototype, property)
@@ -4580,7 +4632,7 @@ var getEnv = ({ env: envOption, extendEnv, preferLocal, localDir, execPath }) =>
4580
4632
  return env2;
4581
4633
  };
4582
4634
  var handleArguments = (file, args, options = {}) => {
4583
- const parsed = crossSpawnExports._parse(file, args, options);
4635
+ const parsed = crossSpawn._parse(file, args, options);
4584
4636
  file = parsed.command;
4585
4637
  args = parsed.args;
4586
4638
  options = parsed.options;
@@ -4988,8 +5040,9 @@ var supportsHyperlinks = {
4988
5040
  stdout: supportsHyperlink(process.stdout),
4989
5041
  stderr: supportsHyperlink(process.stderr)
4990
5042
  };
5043
+ var supportsHyperlinks$1 = /* @__PURE__ */ getDefaultExportFromCjs(supportsHyperlinks);
4991
5044
  function terminalLink(text2, url2, { target = "stdout", ...options } = {}) {
4992
- if (!supportsHyperlinks[target]) {
5045
+ if (!supportsHyperlinks$1[target]) {
4993
5046
  if (options.fallback === false) {
4994
5047
  return text2;
4995
5048
  }
@@ -4997,19 +5050,10 @@ function terminalLink(text2, url2, { target = "stdout", ...options } = {}) {
4997
5050
  }
4998
5051
  return ansiEscapes.link(text2, url2);
4999
5052
  }
5000
- terminalLink.isSupported = supportsHyperlinks.stdout;
5053
+ terminalLink.isSupported = supportsHyperlinks$1.stdout;
5001
5054
  terminalLink.stderr = (text2, url2, options = {}) => terminalLink(text2, url2, { target: "stderr", ...options });
5002
- terminalLink.stderr.isSupported = supportsHyperlinks.stderr;
5003
- var promptsExports = {};
5004
- var prompts$3 = {
5005
- get exports() {
5006
- return promptsExports;
5007
- },
5008
- set exports(v) {
5009
- promptsExports = v;
5010
- }
5011
- };
5012
- var prompts$2 = {};
5055
+ terminalLink.stderr.isSupported = supportsHyperlinks$1.stderr;
5056
+ var prompts$3 = {};
5013
5057
  var FORCE_COLOR$1;
5014
5058
  var NODE_DISABLE_COLORS$1;
5015
5059
  var NO_COLOR$1;
@@ -7061,10 +7105,10 @@ var elements = {
7061
7105
  const p = new el[type](args);
7062
7106
  const onAbort = opts.onAbort || noop2;
7063
7107
  const onSubmit = opts.onSubmit || noop2;
7064
- const onExit = opts.onExit || noop2;
7108
+ const onExit2 = opts.onExit || noop2;
7065
7109
  p.on("state", args.onState || noop2);
7066
7110
  p.on("submit", (x) => res(onSubmit(x)));
7067
- p.on("exit", (x) => res(onExit(x)));
7111
+ p.on("exit", (x) => res(onExit2(x)));
7068
7112
  p.on("abort", (x) => rej(onAbort(x)));
7069
7113
  });
7070
7114
  }
@@ -7112,8 +7156,8 @@ var elements = {
7112
7156
  args.choices = [].concat(args.choices || []);
7113
7157
  return toPrompt("AutocompletePrompt", args);
7114
7158
  };
7115
- })(prompts$2);
7116
- var prompts$1 = prompts$2;
7159
+ })(prompts$3);
7160
+ var prompts$2 = prompts$3;
7117
7161
  var passOn = ["suggest", "format", "onState", "validate", "onRender", "type"];
7118
7162
  var noop = () => {
7119
7163
  };
@@ -7147,7 +7191,7 @@ async function prompt(questions = [], { onSubmit = noop, onCancel = noop } = {})
7147
7191
  throw new Error("prompt message is required");
7148
7192
  }
7149
7193
  ({ name, type } = question);
7150
- if (prompts$1[type] === void 0) {
7194
+ if (prompts$2[type] === void 0) {
7151
7195
  throw new Error(`prompt type (${type}) is not defined`);
7152
7196
  }
7153
7197
  if (override2[question.name] !== void 0) {
@@ -7158,7 +7202,7 @@ async function prompt(questions = [], { onSubmit = noop, onCancel = noop } = {})
7158
7202
  }
7159
7203
  }
7160
7204
  try {
7161
- answer = prompt._injected ? getInjectedAnswer(prompt._injected, question.initial) : await prompts$1[type](question);
7205
+ answer = prompt._injected ? getInjectedAnswer(prompt._injected, question.initial) : await prompts$2[type](question);
7162
7206
  answers[name] = answer = await getFormattedAnswer(question, answer, true);
7163
7207
  quit = await onSubmit(question, answer, answers);
7164
7208
  } catch (err) {
@@ -7182,11 +7226,9 @@ function inject(answers) {
7182
7226
  function override(answers) {
7183
7227
  prompt._override = Object.assign({}, answers);
7184
7228
  }
7185
- var lib$1 = Object.assign(prompt, { prompt, prompts: prompts$1, inject, override });
7186
- (function(module) {
7187
- module.exports = lib$1;
7188
- })(prompts$3);
7189
- var prompts = /* @__PURE__ */ getDefaultExportFromCjs(promptsExports);
7229
+ var lib$1 = Object.assign(prompt, { prompt, prompts: prompts$2, inject, override });
7230
+ var prompts = lib$1;
7231
+ var prompts$1 = /* @__PURE__ */ getDefaultExportFromCjs(prompts);
7190
7232
  var isexe = isexe_1;
7191
7233
  var { join: join2, delimiter, sep, posix } = _path2.default;
7192
7234
  var isWindows = process.platform === "win32";
@@ -7206,7 +7248,11 @@ var getPathInfo = (cmd, {
7206
7248
  ];
7207
7249
  if (isWindows) {
7208
7250
  const pathExtExe = optPathExt || [".EXE", ".CMD", ".BAT", ".COM"].join(optDelimiter);
7209
- const pathExt = pathExtExe.split(optDelimiter);
7251
+ const pathExt = pathExtExe.split(optDelimiter).reduce((acc, item2) => {
7252
+ acc.push(item2);
7253
+ acc.push(item2.toLowerCase());
7254
+ return acc;
7255
+ }, []);
7210
7256
  if (cmd.includes(".") && pathExt[0] !== "") {
7211
7257
  pathExt.unshift("");
7212
7258
  }
@@ -7269,6 +7315,7 @@ var whichSync = (cmd, opt = {}) => {
7269
7315
  };
7270
7316
  var lib = which;
7271
7317
  which.sync = whichSync;
7318
+ var which$1 = /* @__PURE__ */ getDefaultExportFromCjs(lib);
7272
7319
  var CLI_TEMP_DIR = _path.join.call(void 0, _os2.default.tmpdir(), "antfu-ni");
7273
7320
  function remove(arr, v) {
7274
7321
  const index = arr.indexOf(v);
@@ -7280,14 +7327,14 @@ function exclude(arr, v) {
7280
7327
  return arr.slice().filter((item2) => item2 !== v);
7281
7328
  }
7282
7329
  function cmdExists(cmd) {
7283
- return lib.sync(cmd, { nothrow: true }) !== null;
7330
+ return which$1.sync(cmd, { nothrow: true }) !== null;
7284
7331
  }
7285
7332
  function getVoltaPrefix() {
7286
7333
  const VOLTA_PREFIX = "volta run";
7287
7334
  const hasVoltaCommand = cmdExists("volta");
7288
7335
  return hasVoltaCommand ? VOLTA_PREFIX : "";
7289
7336
  }
7290
- async function detect({ autoInstall, cwd } = {}) {
7337
+ async function detect({ autoInstall, programmatic, cwd } = {}) {
7291
7338
  let agent = null;
7292
7339
  let version3 = null;
7293
7340
  const lockPath = await findUp(Object.keys(LOCKS), { cwd });
@@ -7302,13 +7349,13 @@ async function detect({ autoInstall, cwd } = {}) {
7302
7349
  if (typeof pkg.packageManager === "string") {
7303
7350
  const [name, ver] = pkg.packageManager.split("@");
7304
7351
  version3 = ver;
7305
- if (name === "yarn" && parseInt(ver) > 1)
7352
+ if (name === "yarn" && Number.parseInt(ver) > 1)
7306
7353
  agent = "yarn@berry";
7307
- else if (name === "pnpm" && parseInt(ver) < 7)
7354
+ else if (name === "pnpm" && Number.parseInt(ver) < 7)
7308
7355
  agent = "pnpm@6";
7309
7356
  else if (name in AGENTS)
7310
7357
  agent = name;
7311
- else
7358
+ else if (!programmatic)
7312
7359
  console.warn("[ni] Unknown packageManager:", pkg.packageManager);
7313
7360
  }
7314
7361
  } catch (e5) {
@@ -7316,14 +7363,14 @@ async function detect({ autoInstall, cwd } = {}) {
7316
7363
  }
7317
7364
  if (!agent && lockPath)
7318
7365
  agent = LOCKS[_path2.default.basename(lockPath)];
7319
- if (agent && !cmdExists(agent.split("@")[0])) {
7366
+ if (agent && !cmdExists(agent.split("@")[0]) && !programmatic) {
7320
7367
  if (!autoInstall) {
7321
7368
  console.warn(`[ni] Detected ${agent} but it doesn't seem to be installed.
7322
7369
  `);
7323
7370
  if (process.env.CI)
7324
7371
  process.exit(1);
7325
7372
  const link = terminalLink(agent, INSTALL_PAGE[agent]);
7326
- const { tryInstall } = await prompts({
7373
+ const { tryInstall } = await prompts$1({
7327
7374
  name: "tryInstall",
7328
7375
  type: "confirm",
7329
7376
  message: `Would you like to globally install ${link}?`
@@ -7462,13 +7509,13 @@ function init(open, close) {
7462
7509
  return txt === void 0 ? chain([open], [blk]) : $.enabled ? run$1([blk], txt + "") : txt + "";
7463
7510
  };
7464
7511
  }
7465
- var version2 = "0.21.3";
7512
+ var version2 = "0.21.4";
7466
7513
  var DEBUG_SIGN = "?";
7467
7514
  async function run(fn, args, options = {}) {
7468
7515
  const debug2 = args.includes(DEBUG_SIGN);
7469
7516
  if (debug2)
7470
7517
  remove(args, DEBUG_SIGN);
7471
- let cwd = process.cwd();
7518
+ let cwd = _nullishCoalesce(options.cwd, () => ( process.cwd()));
7472
7519
  let command;
7473
7520
  if (args.length === 1 && (args[0] === "--version" || args[0] === "-v")) {
7474
7521
  console.log(`@antfu/ni v${version2}`);
@@ -7496,9 +7543,9 @@ async function run(fn, args, options = {}) {
7496
7543
  if (isGlobal) {
7497
7544
  command = await fn(await getGlobalAgent(), args);
7498
7545
  } else {
7499
- let agent = await detect({ ...options, cwd }) || await getDefaultAgent();
7546
+ let agent = await detect({ ...options, cwd }) || await getDefaultAgent(options.programmatic);
7500
7547
  if (agent === "prompt") {
7501
- agent = (await prompts({
7548
+ agent = (await prompts$1({
7502
7549
  name: "agent",
7503
7550
  type: "select",
7504
7551
  message: "Choose the agent",
@@ -7508,6 +7555,7 @@ async function run(fn, args, options = {}) {
7508
7555
  return;
7509
7556
  }
7510
7557
  command = await fn(agent, args, {
7558
+ programmatic: options.programmatic,
7511
7559
  hasLock: Boolean(agent),
7512
7560
  cwd
7513
7561
  });
@@ -7524,7 +7572,7 @@ async function run(fn, args, options = {}) {
7524
7572
  await execaCommand(command, { stdio: "inherit", encoding: "utf-8", cwd });
7525
7573
  }
7526
7574
 
7527
- // ../../node_modules/.pnpm/@antfu+ni@0.21.3/node_modules/@antfu/ni/dist/index.mjs
7575
+ // ../../node_modules/.pnpm/@antfu+ni@0.21.4/node_modules/@antfu/ni/dist/index.mjs
7528
7576
 
7529
7577
 
7530
7578