jspm 4.1.5 → 4.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/dist/cli.js +698 -436
  2. package/dist/jspm.js +9 -9
  3. package/package.json +41 -41
package/dist/cli.js CHANGED
@@ -294,10 +294,110 @@ var require_sver = __commonJS({
294
294
  var MAJOR_RANGE = 1;
295
295
  var STABLE_RANGE = 2;
296
296
  var EXACT_RANGE = 3;
297
+ var LOWER_BOUND = 4;
298
+ var UPPER_BOUND = 5;
299
+ var INTERSECTION_RANGE = 6;
300
+ var UNION_RANGE = 7;
297
301
  var TYPE = Symbol("type");
298
302
  var VERSION = Symbol("version");
303
+ var RANGE_SET = Symbol("rangeSet");
304
+ var BOUND_INCLUSIVE = Symbol("boundInclusive");
305
+ var comparatorRegEx = /^(>=|<=|>|<|=)\s*(.+)$/;
306
+ var partialRegEx = /^(0|[1-9]\d*)(?:\.(0|[1-9]\d*)(?:\.(0|[1-9]\d*)(?:-([\da-z-]+(?:\.[\da-z-]+)*))?(\+[\da-z-]+)?)?)?$/i;
307
+ function effectiveVersion(range) {
308
+ if (range[VERSION])
309
+ return range[VERSION];
310
+ if (range[RANGE_SET] && range[RANGE_SET].length > 0)
311
+ return effectiveVersion(range[RANGE_SET][0]);
312
+ return null;
313
+ }
314
+ function effectiveUpperBound(range) {
315
+ let type = range[TYPE];
316
+ if (type === WILDCARD_RANGE || type === LOWER_BOUND)
317
+ return null;
318
+ if (type === MAJOR_RANGE)
319
+ return new Semver(range[VERSION][MAJOR] + 1 + ".0.0");
320
+ if (type === STABLE_RANGE)
321
+ return new Semver(range[VERSION][MAJOR] + "." + (range[VERSION][MINOR] + 1) + ".0");
322
+ if (type === EXACT_RANGE || type === UPPER_BOUND)
323
+ return range[VERSION];
324
+ if (type === INTERSECTION_RANGE) {
325
+ let min = null;
326
+ for (let r of range[RANGE_SET]) {
327
+ let ub = effectiveUpperBound(r);
328
+ if (ub !== null && (min === null || Semver.compare(ub, min) < 0))
329
+ min = ub;
330
+ }
331
+ return min;
332
+ }
333
+ if (type === UNION_RANGE) {
334
+ let max = null;
335
+ for (let r of range[RANGE_SET]) {
336
+ let ub = effectiveUpperBound(r);
337
+ if (ub === null)
338
+ return null;
339
+ if (max === null || Semver.compare(ub, max) > 0)
340
+ max = ub;
341
+ }
342
+ return max;
343
+ }
344
+ return range[VERSION] || null;
345
+ }
346
+ function createUpperBoundFromHyphen(verStr) {
347
+ let fullVer = verStr.match(semverRegEx);
348
+ if (fullVer) {
349
+ return new SemverRange2("<=" + verStr);
350
+ }
351
+ let partialMatch = verStr.match(partialRegEx);
352
+ if (partialMatch) {
353
+ let major = parseInt(partialMatch[1], 10);
354
+ let hasMinor = partialMatch[2] !== void 0;
355
+ let minor = hasMinor ? parseInt(partialMatch[2], 10) : void 0;
356
+ if (hasMinor) {
357
+ return new SemverRange2("<" + major + "." + (minor + 1) + ".0");
358
+ } else {
359
+ return new SemverRange2("<" + (major + 1) + ".0.0");
360
+ }
361
+ }
362
+ return new SemverRange2("<=" + verStr);
363
+ }
299
364
  var SemverRange2 = class {
300
365
  constructor(versionRange) {
366
+ versionRange = versionRange.trim();
367
+ versionRange = versionRange.replace(/(>=|<=|>|<|=)\s+/g, "$1");
368
+ if (versionRange.includes("||")) {
369
+ let parts = versionRange.split("||").map((p) => p.trim()).filter(Boolean);
370
+ if (parts.length >= 2) {
371
+ this[TYPE] = UNION_RANGE;
372
+ this[RANGE_SET] = parts.map((p) => new SemverRange2(p));
373
+ return;
374
+ }
375
+ if (parts.length === 1)
376
+ versionRange = parts[0];
377
+ else {
378
+ this[TYPE] = WILDCARD_RANGE;
379
+ return;
380
+ }
381
+ }
382
+ let hyphenMatch = versionRange.match(/^(\S+)\s+-\s+(\S+)$/);
383
+ if (hyphenMatch) {
384
+ this[TYPE] = INTERSECTION_RANGE;
385
+ this[RANGE_SET] = [
386
+ new SemverRange2(">=" + hyphenMatch[1]),
387
+ createUpperBoundFromHyphen(hyphenMatch[2])
388
+ ];
389
+ return;
390
+ }
391
+ let tokens = versionRange.split(/\s+/);
392
+ if (tokens.length > 1) {
393
+ this[TYPE] = INTERSECTION_RANGE;
394
+ this[RANGE_SET] = tokens.map((t) => new SemverRange2(t));
395
+ return;
396
+ }
397
+ versionRange = versionRange.replace(/\.[xX*]/g, "");
398
+ if (/^[xX*]$/.test(versionRange) || versionRange === "") {
399
+ versionRange = "*";
400
+ }
301
401
  if (versionRange === "*" || versionRange === "") {
302
402
  this[TYPE] = WILDCARD_RANGE;
303
403
  return;
@@ -317,7 +417,9 @@ var require_sver = __commonJS({
317
417
  this[TYPE] = STABLE_RANGE;
318
418
  }
319
419
  this[VERSION][PRE] = this[VERSION][PRE] || [];
320
- } else if (versionRange.startsWith("^^")) {
420
+ return;
421
+ }
422
+ if (versionRange.startsWith("^^")) {
321
423
  this[VERSION] = new Semver(versionRange.substr(2));
322
424
  this[TYPE] = MAJOR_RANGE;
323
425
  } else if (versionRange[0] === "^") {
@@ -333,13 +435,98 @@ var require_sver = __commonJS({
333
435
  } else if (versionRange[0] === "~") {
334
436
  this[VERSION] = new Semver(versionRange.substr(1));
335
437
  this[TYPE] = STABLE_RANGE;
438
+ } else if (comparatorRegEx.test(versionRange)) {
439
+ let match2 = versionRange.match(comparatorRegEx);
440
+ this._parseComparator(match2[1], match2[2].trim());
441
+ return;
336
442
  } else {
337
443
  this[VERSION] = new Semver(versionRange);
338
444
  this[TYPE] = EXACT_RANGE;
339
445
  }
340
- if (this[VERSION][TAG] && this[TYPE] !== EXACT_RANGE)
446
+ if (this[VERSION] && this[VERSION][TAG] && this[TYPE] !== EXACT_RANGE)
341
447
  this[TYPE] = EXACT_RANGE;
342
448
  }
449
+ _parseComparator(op, verStr) {
450
+ if (op === "=") {
451
+ let fullVer = verStr.match(semverRegEx);
452
+ if (fullVer) {
453
+ this[VERSION] = new Semver(verStr);
454
+ this[TYPE] = EXACT_RANGE;
455
+ } else {
456
+ let temp = new SemverRange2(verStr);
457
+ this[TYPE] = temp[TYPE];
458
+ this[VERSION] = temp[VERSION];
459
+ if (temp[RANGE_SET])
460
+ this[RANGE_SET] = temp[RANGE_SET];
461
+ if (temp[BOUND_INCLUSIVE] !== void 0)
462
+ this[BOUND_INCLUSIVE] = temp[BOUND_INCLUSIVE];
463
+ }
464
+ return;
465
+ }
466
+ let isLower = op === ">=" || op === ">";
467
+ let isInclusive = op === ">=" || op === "<=";
468
+ let partialMatch = verStr.match(partialRegEx);
469
+ if (!partialMatch) {
470
+ this[VERSION] = new Semver(op + verStr);
471
+ this[TYPE] = EXACT_RANGE;
472
+ return;
473
+ }
474
+ let major = parseInt(partialMatch[1], 10);
475
+ let hasMinor = partialMatch[2] !== void 0;
476
+ let minor = hasMinor ? parseInt(partialMatch[2], 10) : void 0;
477
+ let hasPatch = partialMatch[3] !== void 0;
478
+ if (hasPatch) {
479
+ this[VERSION] = new Semver(verStr);
480
+ this[TYPE] = isLower ? LOWER_BOUND : UPPER_BOUND;
481
+ this[BOUND_INCLUSIVE] = isInclusive;
482
+ } else if (hasMinor) {
483
+ if (isLower) {
484
+ if (isInclusive) {
485
+ this[VERSION] = new Semver(major + "." + minor + ".0");
486
+ } else {
487
+ this[VERSION] = new Semver(major + "." + (minor + 1) + ".0");
488
+ }
489
+ this[TYPE] = LOWER_BOUND;
490
+ this[BOUND_INCLUSIVE] = true;
491
+ } else {
492
+ if (isInclusive) {
493
+ this[VERSION] = new Semver(major + "." + (minor + 1) + ".0");
494
+ } else {
495
+ this[VERSION] = new Semver(major + "." + minor + ".0");
496
+ }
497
+ this[TYPE] = UPPER_BOUND;
498
+ this[BOUND_INCLUSIVE] = false;
499
+ }
500
+ } else {
501
+ if (isLower) {
502
+ if (isInclusive) {
503
+ this[VERSION] = new Semver(major + ".0.0");
504
+ } else {
505
+ this[VERSION] = new Semver(major + 1 + ".0.0");
506
+ }
507
+ this[TYPE] = LOWER_BOUND;
508
+ this[BOUND_INCLUSIVE] = true;
509
+ } else {
510
+ if (isInclusive) {
511
+ this[VERSION] = new Semver(major + 1 + ".0.0");
512
+ } else {
513
+ this[VERSION] = new Semver(major + ".0.0");
514
+ }
515
+ this[TYPE] = UPPER_BOUND;
516
+ this[BOUND_INCLUSIVE] = false;
517
+ }
518
+ }
519
+ }
520
+ _testBound(version3) {
521
+ if (version3[TAG])
522
+ return false;
523
+ let cmp = Semver.compare(version3, this[VERSION]);
524
+ if (this[TYPE] === LOWER_BOUND)
525
+ return this[BOUND_INCLUSIVE] ? cmp >= 0 : cmp > 0;
526
+ if (this[TYPE] === UPPER_BOUND)
527
+ return this[BOUND_INCLUSIVE] ? cmp <= 0 : cmp < 0;
528
+ return false;
529
+ }
343
530
  get isExact() {
344
531
  return this[TYPE] === EXACT_RANGE;
345
532
  }
@@ -358,6 +545,18 @@ var require_sver = __commonJS({
358
545
  get isWildcard() {
359
546
  return this[TYPE] === WILDCARD_RANGE;
360
547
  }
548
+ get isLowerBound() {
549
+ return this[TYPE] === LOWER_BOUND;
550
+ }
551
+ get isUpperBound() {
552
+ return this[TYPE] === UPPER_BOUND;
553
+ }
554
+ get isIntersection() {
555
+ return this[TYPE] === INTERSECTION_RANGE;
556
+ }
557
+ get isUnion() {
558
+ return this[TYPE] === UNION_RANGE;
559
+ }
361
560
  get type() {
362
561
  switch (this[TYPE]) {
363
562
  case WILDCARD_RANGE:
@@ -368,11 +567,25 @@ var require_sver = __commonJS({
368
567
  return "stable";
369
568
  case EXACT_RANGE:
370
569
  return "exact";
570
+ case LOWER_BOUND:
571
+ return "lower_bound";
572
+ case UPPER_BOUND:
573
+ return "upper_bound";
574
+ case INTERSECTION_RANGE:
575
+ return "intersection";
576
+ case UNION_RANGE:
577
+ return "union";
371
578
  }
372
579
  }
373
580
  get version() {
374
581
  return this[VERSION];
375
582
  }
583
+ get rangeSet() {
584
+ return this[RANGE_SET];
585
+ }
586
+ get boundInclusive() {
587
+ return this[BOUND_INCLUSIVE];
588
+ }
376
589
  gt(range) {
377
590
  return SemverRange2.compare(this, range) === 1;
378
591
  }
@@ -389,21 +602,54 @@ var require_sver = __commonJS({
389
602
  return unstable || !version3[PRE] && !version3[TAG];
390
603
  if (this[TYPE] === EXACT_RANGE)
391
604
  return this[VERSION].eq(version3);
392
- if (version3[TAG])
393
- return false;
394
- if (this[VERSION][MAJOR] !== version3[MAJOR])
395
- return false;
396
- if (this[TYPE] === MAJOR_RANGE ? this[VERSION][MINOR] > version3[MINOR] : this[VERSION][MINOR] !== version3[MINOR])
397
- return false;
398
- if ((this[TYPE] === MAJOR_RANGE ? this[VERSION][MINOR] === version3[MINOR] : true) && this[VERSION][PATCH] > version3[PATCH])
399
- return false;
400
- if (version3[PRE] === void 0 || version3[PRE].length === 0)
401
- return true;
402
- if (this[VERSION][PRE] === void 0 || this[VERSION][PRE].length === 0)
403
- return unstable;
404
- if (unstable === false && (this[VERSION][MINOR] !== version3[MINOR] || this[VERSION][PATCH] !== version3[PATCH]))
405
- return false;
406
- return prereleaseCompare(this[VERSION][PRE], version3[PRE]) !== 1;
605
+ if (this[TYPE] === MAJOR_RANGE || this[TYPE] === STABLE_RANGE) {
606
+ if (version3[TAG])
607
+ return false;
608
+ if (this[VERSION][MAJOR] !== version3[MAJOR])
609
+ return false;
610
+ if (this[TYPE] === MAJOR_RANGE ? this[VERSION][MINOR] > version3[MINOR] : this[VERSION][MINOR] !== version3[MINOR])
611
+ return false;
612
+ if ((this[TYPE] === MAJOR_RANGE ? this[VERSION][MINOR] === version3[MINOR] : true) && this[VERSION][PATCH] > version3[PATCH])
613
+ return false;
614
+ if (version3[PRE] === void 0 || version3[PRE].length === 0)
615
+ return true;
616
+ if (this[VERSION][PRE] === void 0 || this[VERSION][PRE].length === 0)
617
+ return unstable;
618
+ if (unstable === false && (this[VERSION][MINOR] !== version3[MINOR] || this[VERSION][PATCH] !== version3[PATCH]))
619
+ return false;
620
+ return prereleaseCompare(this[VERSION][PRE], version3[PRE]) !== 1;
621
+ }
622
+ if (this[TYPE] === LOWER_BOUND || this[TYPE] === UPPER_BOUND) {
623
+ if (version3[TAG])
624
+ return false;
625
+ if (!unstable && version3[PRE] && version3[PRE].length) {
626
+ if (!this[VERSION][PRE] || !this[VERSION][PRE].length || this[VERSION][MAJOR] !== version3[MAJOR] || this[VERSION][MINOR] !== version3[MINOR] || this[VERSION][PATCH] !== version3[PATCH])
627
+ return false;
628
+ }
629
+ return this._testBound(version3);
630
+ }
631
+ if (this[TYPE] === INTERSECTION_RANGE) {
632
+ if (version3[TAG]) {
633
+ return this[RANGE_SET].every((r) => r.has(version3, unstable));
634
+ }
635
+ if (!unstable && version3[PRE] && version3[PRE].length) {
636
+ let hasTupleMatch = this[RANGE_SET].some((r) => {
637
+ let v = r[VERSION];
638
+ return v && v[PRE] && v[PRE].length && v[MAJOR] === version3[MAJOR] && v[MINOR] === version3[MINOR] && v[PATCH] === version3[PATCH];
639
+ });
640
+ if (!hasTupleMatch)
641
+ return false;
642
+ }
643
+ return this[RANGE_SET].every((r) => {
644
+ if (r[TYPE] === LOWER_BOUND || r[TYPE] === UPPER_BOUND)
645
+ return r._testBound(version3);
646
+ return r.has(version3, !unstable ? true : unstable);
647
+ });
648
+ }
649
+ if (this[TYPE] === UNION_RANGE) {
650
+ return this[RANGE_SET].some((r) => r.has(version3, unstable));
651
+ }
652
+ return false;
407
653
  }
408
654
  contains(range) {
409
655
  if (!(range instanceof SemverRange2))
@@ -412,7 +658,19 @@ var require_sver = __commonJS({
412
658
  return true;
413
659
  if (range[TYPE] === WILDCARD_RANGE)
414
660
  return false;
415
- return range[TYPE] >= this[TYPE] && this.has(range[VERSION], true);
661
+ if (this[TYPE] === UNION_RANGE)
662
+ return this[RANGE_SET].some((r) => r.contains(range));
663
+ if (range[TYPE] === UNION_RANGE)
664
+ return range[RANGE_SET].every((r) => this.contains(r));
665
+ if (range[TYPE] === INTERSECTION_RANGE)
666
+ return range[RANGE_SET].some((r) => this.contains(r));
667
+ if (this[TYPE] === INTERSECTION_RANGE)
668
+ return this[RANGE_SET].every((r) => r.contains(range));
669
+ if (this[TYPE] <= EXACT_RANGE && range[TYPE] <= EXACT_RANGE)
670
+ return range[TYPE] >= this[TYPE] && this.has(range[VERSION], true);
671
+ if ((this[TYPE] === LOWER_BOUND || this[TYPE] === UPPER_BOUND) && range[TYPE] === EXACT_RANGE)
672
+ return this.has(range[VERSION], true);
673
+ return false;
416
674
  }
417
675
  intersect(range) {
418
676
  if (!(range instanceof SemverRange2))
@@ -427,23 +685,56 @@ var require_sver = __commonJS({
427
685
  return range.has(this[VERSION], true) ? this : void 0;
428
686
  if (range[TYPE] === EXACT_RANGE)
429
687
  return this.has(range[VERSION], true) ? range : void 0;
430
- let higherRange, lowerRange, polarity;
431
- if (range[VERSION].gt(this[VERSION])) {
432
- higherRange = range;
433
- lowerRange = this;
434
- polarity = true;
435
- } else {
436
- higherRange = this;
437
- lowerRange = range;
438
- polarity = false;
439
- }
440
- if (!lowerRange.has(higherRange[VERSION], true))
441
- return;
442
- if (lowerRange[TYPE] === MAJOR_RANGE)
443
- return polarity ? range : this;
444
- let intersection = new SemverRange2(higherRange[VERSION].toString());
445
- intersection[TYPE] = STABLE_RANGE;
446
- return intersection;
688
+ if (this[TYPE] === UNION_RANGE) {
689
+ let results = this[RANGE_SET].map((r) => r.intersect(range)).filter(Boolean);
690
+ if (results.length === 0)
691
+ return void 0;
692
+ if (results.length === 1)
693
+ return results[0];
694
+ let union = Object.create(SemverRange2.prototype);
695
+ union[TYPE] = UNION_RANGE;
696
+ union[RANGE_SET] = results;
697
+ return union;
698
+ }
699
+ if (range[TYPE] === UNION_RANGE)
700
+ return range.intersect(this);
701
+ if (this[TYPE] === INTERSECTION_RANGE && range[TYPE] === INTERSECTION_RANGE) {
702
+ let result2 = Object.create(SemverRange2.prototype);
703
+ result2[TYPE] = INTERSECTION_RANGE;
704
+ result2[RANGE_SET] = [...this[RANGE_SET], ...range[RANGE_SET]];
705
+ return result2;
706
+ }
707
+ if (this[TYPE] === INTERSECTION_RANGE) {
708
+ let result2 = Object.create(SemverRange2.prototype);
709
+ result2[TYPE] = INTERSECTION_RANGE;
710
+ result2[RANGE_SET] = [...this[RANGE_SET], range];
711
+ return result2;
712
+ }
713
+ if (range[TYPE] === INTERSECTION_RANGE)
714
+ return range.intersect(this);
715
+ if (this[TYPE] <= EXACT_RANGE && range[TYPE] <= EXACT_RANGE) {
716
+ let higherRange, lowerRange, polarity;
717
+ if (range[VERSION].gt(this[VERSION])) {
718
+ higherRange = range;
719
+ lowerRange = this;
720
+ polarity = true;
721
+ } else {
722
+ higherRange = this;
723
+ lowerRange = range;
724
+ polarity = false;
725
+ }
726
+ if (!lowerRange.has(higherRange[VERSION], true))
727
+ return;
728
+ if (lowerRange[TYPE] === MAJOR_RANGE)
729
+ return polarity ? range : this;
730
+ let intersection = new SemverRange2(higherRange[VERSION].toString());
731
+ intersection[TYPE] = STABLE_RANGE;
732
+ return intersection;
733
+ }
734
+ let result = Object.create(SemverRange2.prototype);
735
+ result[TYPE] = INTERSECTION_RANGE;
736
+ result[RANGE_SET] = [this, range];
737
+ return result;
447
738
  }
448
739
  bestMatch(versions, unstable = false) {
449
740
  let maxSemver;
@@ -476,6 +767,14 @@ var require_sver = __commonJS({
476
767
  return "~" + version3.toString();
477
768
  case EXACT_RANGE:
478
769
  return version3.toString();
770
+ case LOWER_BOUND:
771
+ return (this[BOUND_INCLUSIVE] ? ">=" : ">") + version3.toString();
772
+ case UPPER_BOUND:
773
+ return (this[BOUND_INCLUSIVE] ? "<=" : "<") + version3.toString();
774
+ case INTERSECTION_RANGE:
775
+ return this[RANGE_SET].map((r) => r.toString()).join(" ");
776
+ case UNION_RANGE:
777
+ return this[RANGE_SET].map((r) => r.toString()).join(" || ");
479
778
  }
480
779
  }
481
780
  toJSON() {
@@ -488,7 +787,9 @@ var require_sver = __commonJS({
488
787
  }
489
788
  static isValid(range) {
490
789
  let semverRange = new SemverRange2(range);
491
- return semverRange[TYPE] !== EXACT_RANGE || semverRange[VERSION][TAG] === void 0;
790
+ if (semverRange[TYPE] === EXACT_RANGE)
791
+ return semverRange[VERSION][TAG] === void 0;
792
+ return true;
492
793
  }
493
794
  static compare(r1, r2) {
494
795
  if (!(r1 instanceof SemverRange2))
@@ -501,9 +802,28 @@ var require_sver = __commonJS({
501
802
  return 1;
502
803
  if (r2[TYPE] === WILDCARD_RANGE)
503
804
  return -1;
504
- let cmp = Semver.compare(r1[VERSION], r2[VERSION]);
505
- if (cmp !== 0) {
805
+ let u1 = effectiveUpperBound(r1);
806
+ let u2 = effectiveUpperBound(r2);
807
+ if (u1 === null && u2 === null) {
808
+ let v12 = effectiveVersion(r1);
809
+ let v22 = effectiveVersion(r2);
810
+ if (v12 && v22)
811
+ return Semver.compare(v12, v22);
812
+ return 0;
813
+ }
814
+ if (u1 === null)
815
+ return 1;
816
+ if (u2 === null)
817
+ return -1;
818
+ let cmp = Semver.compare(u1, u2);
819
+ if (cmp !== 0)
506
820
  return cmp;
821
+ let v1 = effectiveVersion(r1);
822
+ let v2 = effectiveVersion(r2);
823
+ if (v1 && v2) {
824
+ cmp = Semver.compare(v1, v2);
825
+ if (cmp !== 0)
826
+ return cmp;
507
827
  }
508
828
  if (r1[TYPE] === r2[TYPE])
509
829
  return 0;
@@ -686,25 +1006,25 @@ var require_brace_expansion = __commonJS({
686
1006
  var pad = n2.some(isPadded);
687
1007
  N = [];
688
1008
  for (var i = x; test(i, y); i += incr) {
689
- var c18;
1009
+ var c17;
690
1010
  if (isAlphaSequence) {
691
- c18 = String.fromCharCode(i);
692
- if (c18 === "\\")
693
- c18 = "";
1011
+ c17 = String.fromCharCode(i);
1012
+ if (c17 === "\\")
1013
+ c17 = "";
694
1014
  } else {
695
- c18 = String(i);
1015
+ c17 = String(i);
696
1016
  if (pad) {
697
- var need = width - c18.length;
1017
+ var need = width - c17.length;
698
1018
  if (need > 0) {
699
1019
  var z = new Array(need + 1).join("0");
700
1020
  if (i < 0)
701
- c18 = "-" + z + c18.slice(1);
1021
+ c17 = "-" + z + c17.slice(1);
702
1022
  else
703
- c18 = z + c18;
1023
+ c17 = z + c17;
704
1024
  }
705
1025
  }
706
1026
  }
707
- N.push(c18);
1027
+ N.push(c17);
708
1028
  }
709
1029
  } else {
710
1030
  N = [];
@@ -780,25 +1100,25 @@ var init_brace_expressions = __esm({
780
1100
  let rangeStart = "";
781
1101
  WHILE:
782
1102
  while (i < glob.length) {
783
- const c18 = glob.charAt(i);
784
- if ((c18 === "!" || c18 === "^") && i === pos + 1) {
1103
+ const c17 = glob.charAt(i);
1104
+ if ((c17 === "!" || c17 === "^") && i === pos + 1) {
785
1105
  negate = true;
786
1106
  i++;
787
1107
  continue;
788
1108
  }
789
- if (c18 === "]" && sawStart && !escaping) {
1109
+ if (c17 === "]" && sawStart && !escaping) {
790
1110
  endPos = i + 1;
791
1111
  break;
792
1112
  }
793
1113
  sawStart = true;
794
- if (c18 === "\\") {
1114
+ if (c17 === "\\") {
795
1115
  if (!escaping) {
796
1116
  escaping = true;
797
1117
  i++;
798
1118
  continue;
799
1119
  }
800
1120
  }
801
- if (c18 === "[" && !escaping) {
1121
+ if (c17 === "[" && !escaping) {
802
1122
  for (const [cls, [unip, u, neg]] of Object.entries(posixClasses)) {
803
1123
  if (glob.startsWith(cls, i)) {
804
1124
  if (rangeStart) {
@@ -816,26 +1136,26 @@ var init_brace_expressions = __esm({
816
1136
  }
817
1137
  escaping = false;
818
1138
  if (rangeStart) {
819
- if (c18 > rangeStart) {
820
- ranges.push(braceEscape(rangeStart) + "-" + braceEscape(c18));
821
- } else if (c18 === rangeStart) {
822
- ranges.push(braceEscape(c18));
1139
+ if (c17 > rangeStart) {
1140
+ ranges.push(braceEscape(rangeStart) + "-" + braceEscape(c17));
1141
+ } else if (c17 === rangeStart) {
1142
+ ranges.push(braceEscape(c17));
823
1143
  }
824
1144
  rangeStart = "";
825
1145
  i++;
826
1146
  continue;
827
1147
  }
828
1148
  if (glob.startsWith("-]", i + 1)) {
829
- ranges.push(braceEscape(c18 + "-"));
1149
+ ranges.push(braceEscape(c17 + "-"));
830
1150
  i += 2;
831
1151
  continue;
832
1152
  }
833
1153
  if (glob.startsWith("-", i + 1)) {
834
- rangeStart = c18;
1154
+ rangeStart = c17;
835
1155
  i += 2;
836
1156
  continue;
837
1157
  }
838
- ranges.push(braceEscape(c18));
1158
+ ranges.push(braceEscape(c17));
839
1159
  i++;
840
1160
  }
841
1161
  if (endPos < i) {
@@ -873,7 +1193,7 @@ var init_ast = __esm({
873
1193
  init_brace_expressions();
874
1194
  init_unescape();
875
1195
  types = /* @__PURE__ */ new Set(["!", "?", "+", "*", "@"]);
876
- isExtglobType = (c18) => types.has(c18);
1196
+ isExtglobType = (c17) => types.has(c17);
877
1197
  startNoTraversal = "(?!(?:^|/)\\.\\.?(?:$|/))";
878
1198
  startNoDot = "(?!\\.)";
879
1199
  addPatternStart = /* @__PURE__ */ new Set(["[", "."]);
@@ -987,11 +1307,11 @@ var init_ast = __esm({
987
1307
  this.push(part.clone(this));
988
1308
  }
989
1309
  clone(parent) {
990
- const c18 = new _AST(this.type, parent);
1310
+ const c17 = new _AST(this.type, parent);
991
1311
  for (const p of __privateGet(this, _parts)) {
992
- c18.copyIn(p);
1312
+ c17.copyIn(p);
993
1313
  }
994
- return c18;
1314
+ return c17;
995
1315
  }
996
1316
  static fromGlob(pattern, options = {}) {
997
1317
  var _a;
@@ -1217,38 +1537,38 @@ var init_ast = __esm({
1217
1537
  let i2 = pos;
1218
1538
  let acc2 = "";
1219
1539
  while (i2 < str.length) {
1220
- const c18 = str.charAt(i2++);
1221
- if (escaping || c18 === "\\") {
1540
+ const c17 = str.charAt(i2++);
1541
+ if (escaping || c17 === "\\") {
1222
1542
  escaping = !escaping;
1223
- acc2 += c18;
1543
+ acc2 += c17;
1224
1544
  continue;
1225
1545
  }
1226
1546
  if (inBrace) {
1227
1547
  if (i2 === braceStart + 1) {
1228
- if (c18 === "^" || c18 === "!") {
1548
+ if (c17 === "^" || c17 === "!") {
1229
1549
  braceNeg = true;
1230
1550
  }
1231
- } else if (c18 === "]" && !(i2 === braceStart + 2 && braceNeg)) {
1551
+ } else if (c17 === "]" && !(i2 === braceStart + 2 && braceNeg)) {
1232
1552
  inBrace = false;
1233
1553
  }
1234
- acc2 += c18;
1554
+ acc2 += c17;
1235
1555
  continue;
1236
- } else if (c18 === "[") {
1556
+ } else if (c17 === "[") {
1237
1557
  inBrace = true;
1238
1558
  braceStart = i2;
1239
1559
  braceNeg = false;
1240
- acc2 += c18;
1560
+ acc2 += c17;
1241
1561
  continue;
1242
1562
  }
1243
- if (!opt.noext && isExtglobType(c18) && str.charAt(i2) === "(") {
1563
+ if (!opt.noext && isExtglobType(c17) && str.charAt(i2) === "(") {
1244
1564
  ast.push(acc2);
1245
1565
  acc2 = "";
1246
- const ext2 = new _AST(c18, ast);
1566
+ const ext2 = new _AST(c17, ast);
1247
1567
  i2 = __privateMethod(_a = _AST, _parseAST, parseAST_fn).call(_a, str, ext2, i2, opt);
1248
1568
  ast.push(ext2);
1249
1569
  continue;
1250
1570
  }
1251
- acc2 += c18;
1571
+ acc2 += c17;
1252
1572
  }
1253
1573
  ast.push(acc2);
1254
1574
  return i2;
@@ -1258,45 +1578,45 @@ var init_ast = __esm({
1258
1578
  const parts = [];
1259
1579
  let acc = "";
1260
1580
  while (i < str.length) {
1261
- const c18 = str.charAt(i++);
1262
- if (escaping || c18 === "\\") {
1581
+ const c17 = str.charAt(i++);
1582
+ if (escaping || c17 === "\\") {
1263
1583
  escaping = !escaping;
1264
- acc += c18;
1584
+ acc += c17;
1265
1585
  continue;
1266
1586
  }
1267
1587
  if (inBrace) {
1268
1588
  if (i === braceStart + 1) {
1269
- if (c18 === "^" || c18 === "!") {
1589
+ if (c17 === "^" || c17 === "!") {
1270
1590
  braceNeg = true;
1271
1591
  }
1272
- } else if (c18 === "]" && !(i === braceStart + 2 && braceNeg)) {
1592
+ } else if (c17 === "]" && !(i === braceStart + 2 && braceNeg)) {
1273
1593
  inBrace = false;
1274
1594
  }
1275
- acc += c18;
1595
+ acc += c17;
1276
1596
  continue;
1277
- } else if (c18 === "[") {
1597
+ } else if (c17 === "[") {
1278
1598
  inBrace = true;
1279
1599
  braceStart = i;
1280
1600
  braceNeg = false;
1281
- acc += c18;
1601
+ acc += c17;
1282
1602
  continue;
1283
1603
  }
1284
- if (isExtglobType(c18) && str.charAt(i) === "(") {
1604
+ if (isExtglobType(c17) && str.charAt(i) === "(") {
1285
1605
  part.push(acc);
1286
1606
  acc = "";
1287
- const ext2 = new _AST(c18, part);
1607
+ const ext2 = new _AST(c17, part);
1288
1608
  part.push(ext2);
1289
1609
  i = __privateMethod(_b = _AST, _parseAST, parseAST_fn).call(_b, str, ext2, i, opt);
1290
1610
  continue;
1291
1611
  }
1292
- if (c18 === "|") {
1612
+ if (c17 === "|") {
1293
1613
  part.push(acc);
1294
1614
  acc = "";
1295
1615
  parts.push(part);
1296
1616
  part = new _AST(null, ast);
1297
1617
  continue;
1298
1618
  }
1299
- if (c18 === ")") {
1619
+ if (c17 === ")") {
1300
1620
  if (acc === "" && __privateGet(ast, _parts).length === 0) {
1301
1621
  __privateSet(ast, _emptyExt, true);
1302
1622
  }
@@ -1305,7 +1625,7 @@ var init_ast = __esm({
1305
1625
  ast.push(...parts, part);
1306
1626
  return i;
1307
1627
  }
1308
- acc += c18;
1628
+ acc += c17;
1309
1629
  }
1310
1630
  ast.type = null;
1311
1631
  __privateSet(ast, _hasMagic, void 0);
@@ -1329,13 +1649,13 @@ var init_ast = __esm({
1329
1649
  let re = "";
1330
1650
  let uflag = false;
1331
1651
  for (let i = 0; i < glob.length; i++) {
1332
- const c18 = glob.charAt(i);
1652
+ const c17 = glob.charAt(i);
1333
1653
  if (escaping) {
1334
1654
  escaping = false;
1335
- re += (reSpecials.has(c18) ? "\\" : "") + c18;
1655
+ re += (reSpecials.has(c17) ? "\\" : "") + c17;
1336
1656
  continue;
1337
1657
  }
1338
- if (c18 === "\\") {
1658
+ if (c17 === "\\") {
1339
1659
  if (i === glob.length - 1) {
1340
1660
  re += "\\\\";
1341
1661
  } else {
@@ -1343,7 +1663,7 @@ var init_ast = __esm({
1343
1663
  }
1344
1664
  continue;
1345
1665
  }
1346
- if (c18 === "[") {
1666
+ if (c17 === "[") {
1347
1667
  const [src, needUflag, consumed, magic] = parseClass(glob, i);
1348
1668
  if (consumed) {
1349
1669
  re += src;
@@ -1353,7 +1673,7 @@ var init_ast = __esm({
1353
1673
  continue;
1354
1674
  }
1355
1675
  }
1356
- if (c18 === "*") {
1676
+ if (c17 === "*") {
1357
1677
  if (noEmpty && glob === "*")
1358
1678
  re += starNoEmpty;
1359
1679
  else
@@ -1361,12 +1681,12 @@ var init_ast = __esm({
1361
1681
  hasMagic = true;
1362
1682
  continue;
1363
1683
  }
1364
- if (c18 === "?") {
1684
+ if (c17 === "?") {
1365
1685
  re += qmark;
1366
1686
  hasMagic = true;
1367
1687
  continue;
1368
1688
  }
1369
- re += regExpEscape(c18);
1689
+ re += regExpEscape(c17);
1370
1690
  }
1371
1691
  return [re, unescape2(glob), !!hasMagic, uflag];
1372
1692
  };
@@ -2321,8 +2641,9 @@ async function writeHtmlOutput(mapFile, generator, pins, env2, flags, silent = f
2321
2641
  } catch (e) {
2322
2642
  throw new JspmError(`Failed to read HTML file ${c4.cyan(mapFile)} for injection.`);
2323
2643
  }
2644
+ const entryPoints = pins.length ? pins : Object.keys(generator.getMap().imports || {});
2324
2645
  const outputHtml = await generator.htmlInject(html, {
2325
- pins: pins ?? true,
2646
+ pins: entryPoints,
2326
2647
  htmlUrl: generator.mapUrl,
2327
2648
  // URL of the output map
2328
2649
  rootUrl: generator.rootUrl,
@@ -2409,6 +2730,7 @@ async function getGenerator(flags, configOverride = null, inputMap) {
2409
2730
  resolutions: getResolutions(flags),
2410
2731
  cache: getCacheMode(flags),
2411
2732
  integrity: flags.integrity,
2733
+ scopedLink: true,
2412
2734
  typeScript: true,
2413
2735
  commonJS: true,
2414
2736
  // TODO: only for --local flag
@@ -2833,7 +3155,7 @@ async function getLatestEsms(generator, provider2) {
2833
3155
  {
2834
3156
  name: "es-module-shims",
2835
3157
  registry: "npm",
2836
- ranges: [new import_sver.SemverRange("*")]
3158
+ range: new import_sver.SemverRange("*")
2837
3159
  },
2838
3160
  generator.traceMap.installer.defaultProvider
2839
3161
  );
@@ -2901,7 +3223,7 @@ function expandExportsResolutions(exports, env2, files, exportsResolutions = /*
2901
3223
  }
2902
3224
  }
2903
3225
  }
2904
- function expandTargetResolutions(exports, files, env2, targetList, envExclusions = env2.map((condition) => conditionMutualExclusions[condition]).filter((c18) => c18), firstOnly) {
3226
+ function expandTargetResolutions(exports, files, env2, targetList, envExclusions = env2.map((condition) => conditionMutualExclusions[condition]).filter((c17) => c17), firstOnly) {
2905
3227
  if (typeof exports === "string") {
2906
3228
  if (exports.startsWith("./"))
2907
3229
  targetList.add(exports);
@@ -3930,8 +4252,8 @@ function decodeInteger(mappings, pos, state, j) {
3930
4252
  let shift = 0;
3931
4253
  let integer = 0;
3932
4254
  do {
3933
- const c18 = mappings.charCodeAt(pos++);
3934
- integer = charToInt[c18];
4255
+ const c17 = mappings.charCodeAt(pos++);
4256
+ integer = charToInt[c17];
3935
4257
  value |= (integer & 31) << shift;
3936
4258
  shift += 5;
3937
4259
  } while (integer & 32);
@@ -4912,8 +5234,8 @@ function getMemberReturnExpressionWhenCalled(members, memberName) {
4912
5234
  return UNKNOWN_RETURN_EXPRESSION;
4913
5235
  return [members[memberName].returns, false];
4914
5236
  }
4915
- function skipThrough(node, st, c18) {
4916
- c18(node, st);
5237
+ function skipThrough(node, st, c17) {
5238
+ c17(node, st);
4917
5239
  }
4918
5240
  function ignore(_node, _st, _c) {
4919
5241
  }
@@ -8705,9 +9027,9 @@ var init_node_entry = __esm({
8705
9027
  intToChar = new Uint8Array(64);
8706
9028
  charToInt = new Uint8Array(128);
8707
9029
  for (let i = 0; i < chars$1.length; i++) {
8708
- const c18 = chars$1.charCodeAt(i);
8709
- intToChar[i] = c18;
8710
- charToInt[c18] = i;
9030
+ const c17 = chars$1.charCodeAt(i);
9031
+ intToChar[i] = c17;
9032
+ charToInt[c17] = i;
8711
9033
  }
8712
9034
  td = typeof TextDecoder !== "undefined" ? /* @__PURE__ */ new TextDecoder() : typeof Buffer !== "undefined" ? {
8713
9035
  decode(buf) {
@@ -12060,284 +12382,284 @@ var init_node_entry = __esm({
12060
12382
  valueOf: returnsString
12061
12383
  }, objectMembers);
12062
12384
  base$1 = {};
12063
- base$1.Program = base$1.BlockStatement = base$1.StaticBlock = function(node, st, c18) {
12385
+ base$1.Program = base$1.BlockStatement = base$1.StaticBlock = function(node, st, c17) {
12064
12386
  for (var i = 0, list2 = node.body; i < list2.length; i += 1) {
12065
12387
  var stmt = list2[i];
12066
- c18(stmt, st, "Statement");
12388
+ c17(stmt, st, "Statement");
12067
12389
  }
12068
12390
  };
12069
12391
  base$1.Statement = skipThrough;
12070
12392
  base$1.EmptyStatement = ignore;
12071
- base$1.ExpressionStatement = base$1.ParenthesizedExpression = base$1.ChainExpression = function(node, st, c18) {
12072
- return c18(node.expression, st, "Expression");
12393
+ base$1.ExpressionStatement = base$1.ParenthesizedExpression = base$1.ChainExpression = function(node, st, c17) {
12394
+ return c17(node.expression, st, "Expression");
12073
12395
  };
12074
- base$1.IfStatement = function(node, st, c18) {
12075
- c18(node.test, st, "Expression");
12076
- c18(node.consequent, st, "Statement");
12396
+ base$1.IfStatement = function(node, st, c17) {
12397
+ c17(node.test, st, "Expression");
12398
+ c17(node.consequent, st, "Statement");
12077
12399
  if (node.alternate) {
12078
- c18(node.alternate, st, "Statement");
12400
+ c17(node.alternate, st, "Statement");
12079
12401
  }
12080
12402
  };
12081
- base$1.LabeledStatement = function(node, st, c18) {
12082
- return c18(node.body, st, "Statement");
12403
+ base$1.LabeledStatement = function(node, st, c17) {
12404
+ return c17(node.body, st, "Statement");
12083
12405
  };
12084
12406
  base$1.BreakStatement = base$1.ContinueStatement = ignore;
12085
- base$1.WithStatement = function(node, st, c18) {
12086
- c18(node.object, st, "Expression");
12087
- c18(node.body, st, "Statement");
12407
+ base$1.WithStatement = function(node, st, c17) {
12408
+ c17(node.object, st, "Expression");
12409
+ c17(node.body, st, "Statement");
12088
12410
  };
12089
- base$1.SwitchStatement = function(node, st, c18) {
12090
- c18(node.discriminant, st, "Expression");
12411
+ base$1.SwitchStatement = function(node, st, c17) {
12412
+ c17(node.discriminant, st, "Expression");
12091
12413
  for (var i$1 = 0, list$1 = node.cases; i$1 < list$1.length; i$1 += 1) {
12092
12414
  var cs = list$1[i$1];
12093
12415
  if (cs.test) {
12094
- c18(cs.test, st, "Expression");
12416
+ c17(cs.test, st, "Expression");
12095
12417
  }
12096
12418
  for (var i = 0, list2 = cs.consequent; i < list2.length; i += 1) {
12097
12419
  var cons = list2[i];
12098
- c18(cons, st, "Statement");
12420
+ c17(cons, st, "Statement");
12099
12421
  }
12100
12422
  }
12101
12423
  };
12102
- base$1.SwitchCase = function(node, st, c18) {
12424
+ base$1.SwitchCase = function(node, st, c17) {
12103
12425
  if (node.test) {
12104
- c18(node.test, st, "Expression");
12426
+ c17(node.test, st, "Expression");
12105
12427
  }
12106
12428
  for (var i = 0, list2 = node.consequent; i < list2.length; i += 1) {
12107
12429
  var cons = list2[i];
12108
- c18(cons, st, "Statement");
12430
+ c17(cons, st, "Statement");
12109
12431
  }
12110
12432
  };
12111
- base$1.ReturnStatement = base$1.YieldExpression = base$1.AwaitExpression = function(node, st, c18) {
12433
+ base$1.ReturnStatement = base$1.YieldExpression = base$1.AwaitExpression = function(node, st, c17) {
12112
12434
  if (node.argument) {
12113
- c18(node.argument, st, "Expression");
12435
+ c17(node.argument, st, "Expression");
12114
12436
  }
12115
12437
  };
12116
- base$1.ThrowStatement = base$1.SpreadElement = function(node, st, c18) {
12117
- return c18(node.argument, st, "Expression");
12438
+ base$1.ThrowStatement = base$1.SpreadElement = function(node, st, c17) {
12439
+ return c17(node.argument, st, "Expression");
12118
12440
  };
12119
- base$1.TryStatement = function(node, st, c18) {
12120
- c18(node.block, st, "Statement");
12441
+ base$1.TryStatement = function(node, st, c17) {
12442
+ c17(node.block, st, "Statement");
12121
12443
  if (node.handler) {
12122
- c18(node.handler, st);
12444
+ c17(node.handler, st);
12123
12445
  }
12124
12446
  if (node.finalizer) {
12125
- c18(node.finalizer, st, "Statement");
12447
+ c17(node.finalizer, st, "Statement");
12126
12448
  }
12127
12449
  };
12128
- base$1.CatchClause = function(node, st, c18) {
12450
+ base$1.CatchClause = function(node, st, c17) {
12129
12451
  if (node.param) {
12130
- c18(node.param, st, "Pattern");
12452
+ c17(node.param, st, "Pattern");
12131
12453
  }
12132
- c18(node.body, st, "Statement");
12454
+ c17(node.body, st, "Statement");
12133
12455
  };
12134
- base$1.WhileStatement = base$1.DoWhileStatement = function(node, st, c18) {
12135
- c18(node.test, st, "Expression");
12136
- c18(node.body, st, "Statement");
12456
+ base$1.WhileStatement = base$1.DoWhileStatement = function(node, st, c17) {
12457
+ c17(node.test, st, "Expression");
12458
+ c17(node.body, st, "Statement");
12137
12459
  };
12138
- base$1.ForStatement = function(node, st, c18) {
12460
+ base$1.ForStatement = function(node, st, c17) {
12139
12461
  if (node.init) {
12140
- c18(node.init, st, "ForInit");
12462
+ c17(node.init, st, "ForInit");
12141
12463
  }
12142
12464
  if (node.test) {
12143
- c18(node.test, st, "Expression");
12465
+ c17(node.test, st, "Expression");
12144
12466
  }
12145
12467
  if (node.update) {
12146
- c18(node.update, st, "Expression");
12468
+ c17(node.update, st, "Expression");
12147
12469
  }
12148
- c18(node.body, st, "Statement");
12470
+ c17(node.body, st, "Statement");
12149
12471
  };
12150
- base$1.ForInStatement = base$1.ForOfStatement = function(node, st, c18) {
12151
- c18(node.left, st, "ForInit");
12152
- c18(node.right, st, "Expression");
12153
- c18(node.body, st, "Statement");
12472
+ base$1.ForInStatement = base$1.ForOfStatement = function(node, st, c17) {
12473
+ c17(node.left, st, "ForInit");
12474
+ c17(node.right, st, "Expression");
12475
+ c17(node.body, st, "Statement");
12154
12476
  };
12155
- base$1.ForInit = function(node, st, c18) {
12477
+ base$1.ForInit = function(node, st, c17) {
12156
12478
  if (node.type === "VariableDeclaration") {
12157
- c18(node, st);
12479
+ c17(node, st);
12158
12480
  } else {
12159
- c18(node, st, "Expression");
12481
+ c17(node, st, "Expression");
12160
12482
  }
12161
12483
  };
12162
12484
  base$1.DebuggerStatement = ignore;
12163
- base$1.FunctionDeclaration = function(node, st, c18) {
12164
- return c18(node, st, "Function");
12485
+ base$1.FunctionDeclaration = function(node, st, c17) {
12486
+ return c17(node, st, "Function");
12165
12487
  };
12166
- base$1.VariableDeclaration = function(node, st, c18) {
12488
+ base$1.VariableDeclaration = function(node, st, c17) {
12167
12489
  for (var i = 0, list2 = node.declarations; i < list2.length; i += 1) {
12168
12490
  var decl = list2[i];
12169
- c18(decl, st);
12491
+ c17(decl, st);
12170
12492
  }
12171
12493
  };
12172
- base$1.VariableDeclarator = function(node, st, c18) {
12173
- c18(node.id, st, "Pattern");
12494
+ base$1.VariableDeclarator = function(node, st, c17) {
12495
+ c17(node.id, st, "Pattern");
12174
12496
  if (node.init) {
12175
- c18(node.init, st, "Expression");
12497
+ c17(node.init, st, "Expression");
12176
12498
  }
12177
12499
  };
12178
- base$1.Function = function(node, st, c18) {
12500
+ base$1.Function = function(node, st, c17) {
12179
12501
  if (node.id) {
12180
- c18(node.id, st, "Pattern");
12502
+ c17(node.id, st, "Pattern");
12181
12503
  }
12182
12504
  for (var i = 0, list2 = node.params; i < list2.length; i += 1) {
12183
12505
  var param = list2[i];
12184
- c18(param, st, "Pattern");
12506
+ c17(param, st, "Pattern");
12185
12507
  }
12186
- c18(node.body, st, node.expression ? "Expression" : "Statement");
12508
+ c17(node.body, st, node.expression ? "Expression" : "Statement");
12187
12509
  };
12188
- base$1.Pattern = function(node, st, c18) {
12510
+ base$1.Pattern = function(node, st, c17) {
12189
12511
  if (node.type === "Identifier") {
12190
- c18(node, st, "VariablePattern");
12512
+ c17(node, st, "VariablePattern");
12191
12513
  } else if (node.type === "MemberExpression") {
12192
- c18(node, st, "MemberPattern");
12514
+ c17(node, st, "MemberPattern");
12193
12515
  } else {
12194
- c18(node, st);
12516
+ c17(node, st);
12195
12517
  }
12196
12518
  };
12197
12519
  base$1.VariablePattern = ignore;
12198
12520
  base$1.MemberPattern = skipThrough;
12199
- base$1.RestElement = function(node, st, c18) {
12200
- return c18(node.argument, st, "Pattern");
12521
+ base$1.RestElement = function(node, st, c17) {
12522
+ return c17(node.argument, st, "Pattern");
12201
12523
  };
12202
- base$1.ArrayPattern = function(node, st, c18) {
12524
+ base$1.ArrayPattern = function(node, st, c17) {
12203
12525
  for (var i = 0, list2 = node.elements; i < list2.length; i += 1) {
12204
12526
  var elt = list2[i];
12205
12527
  if (elt) {
12206
- c18(elt, st, "Pattern");
12528
+ c17(elt, st, "Pattern");
12207
12529
  }
12208
12530
  }
12209
12531
  };
12210
- base$1.ObjectPattern = function(node, st, c18) {
12532
+ base$1.ObjectPattern = function(node, st, c17) {
12211
12533
  for (var i = 0, list2 = node.properties; i < list2.length; i += 1) {
12212
12534
  var prop = list2[i];
12213
12535
  if (prop.type === "Property") {
12214
12536
  if (prop.computed) {
12215
- c18(prop.key, st, "Expression");
12537
+ c17(prop.key, st, "Expression");
12216
12538
  }
12217
- c18(prop.value, st, "Pattern");
12539
+ c17(prop.value, st, "Pattern");
12218
12540
  } else if (prop.type === "RestElement") {
12219
- c18(prop.argument, st, "Pattern");
12541
+ c17(prop.argument, st, "Pattern");
12220
12542
  }
12221
12543
  }
12222
12544
  };
12223
12545
  base$1.Expression = skipThrough;
12224
12546
  base$1.ThisExpression = base$1.Super = base$1.MetaProperty = ignore;
12225
- base$1.ArrayExpression = function(node, st, c18) {
12547
+ base$1.ArrayExpression = function(node, st, c17) {
12226
12548
  for (var i = 0, list2 = node.elements; i < list2.length; i += 1) {
12227
12549
  var elt = list2[i];
12228
12550
  if (elt) {
12229
- c18(elt, st, "Expression");
12551
+ c17(elt, st, "Expression");
12230
12552
  }
12231
12553
  }
12232
12554
  };
12233
- base$1.ObjectExpression = function(node, st, c18) {
12555
+ base$1.ObjectExpression = function(node, st, c17) {
12234
12556
  for (var i = 0, list2 = node.properties; i < list2.length; i += 1) {
12235
12557
  var prop = list2[i];
12236
- c18(prop, st);
12558
+ c17(prop, st);
12237
12559
  }
12238
12560
  };
12239
12561
  base$1.FunctionExpression = base$1.ArrowFunctionExpression = base$1.FunctionDeclaration;
12240
- base$1.SequenceExpression = function(node, st, c18) {
12562
+ base$1.SequenceExpression = function(node, st, c17) {
12241
12563
  for (var i = 0, list2 = node.expressions; i < list2.length; i += 1) {
12242
12564
  var expr = list2[i];
12243
- c18(expr, st, "Expression");
12565
+ c17(expr, st, "Expression");
12244
12566
  }
12245
12567
  };
12246
- base$1.TemplateLiteral = function(node, st, c18) {
12568
+ base$1.TemplateLiteral = function(node, st, c17) {
12247
12569
  for (var i = 0, list2 = node.quasis; i < list2.length; i += 1) {
12248
12570
  var quasi = list2[i];
12249
- c18(quasi, st);
12571
+ c17(quasi, st);
12250
12572
  }
12251
12573
  for (var i$1 = 0, list$1 = node.expressions; i$1 < list$1.length; i$1 += 1) {
12252
12574
  var expr = list$1[i$1];
12253
- c18(expr, st, "Expression");
12575
+ c17(expr, st, "Expression");
12254
12576
  }
12255
12577
  };
12256
12578
  base$1.TemplateElement = ignore;
12257
- base$1.UnaryExpression = base$1.UpdateExpression = function(node, st, c18) {
12258
- c18(node.argument, st, "Expression");
12579
+ base$1.UnaryExpression = base$1.UpdateExpression = function(node, st, c17) {
12580
+ c17(node.argument, st, "Expression");
12259
12581
  };
12260
- base$1.BinaryExpression = base$1.LogicalExpression = function(node, st, c18) {
12261
- c18(node.left, st, "Expression");
12262
- c18(node.right, st, "Expression");
12582
+ base$1.BinaryExpression = base$1.LogicalExpression = function(node, st, c17) {
12583
+ c17(node.left, st, "Expression");
12584
+ c17(node.right, st, "Expression");
12263
12585
  };
12264
- base$1.AssignmentExpression = base$1.AssignmentPattern = function(node, st, c18) {
12265
- c18(node.left, st, "Pattern");
12266
- c18(node.right, st, "Expression");
12586
+ base$1.AssignmentExpression = base$1.AssignmentPattern = function(node, st, c17) {
12587
+ c17(node.left, st, "Pattern");
12588
+ c17(node.right, st, "Expression");
12267
12589
  };
12268
- base$1.ConditionalExpression = function(node, st, c18) {
12269
- c18(node.test, st, "Expression");
12270
- c18(node.consequent, st, "Expression");
12271
- c18(node.alternate, st, "Expression");
12590
+ base$1.ConditionalExpression = function(node, st, c17) {
12591
+ c17(node.test, st, "Expression");
12592
+ c17(node.consequent, st, "Expression");
12593
+ c17(node.alternate, st, "Expression");
12272
12594
  };
12273
- base$1.NewExpression = base$1.CallExpression = function(node, st, c18) {
12274
- c18(node.callee, st, "Expression");
12595
+ base$1.NewExpression = base$1.CallExpression = function(node, st, c17) {
12596
+ c17(node.callee, st, "Expression");
12275
12597
  if (node.arguments) {
12276
12598
  for (var i = 0, list2 = node.arguments; i < list2.length; i += 1) {
12277
12599
  var arg = list2[i];
12278
- c18(arg, st, "Expression");
12600
+ c17(arg, st, "Expression");
12279
12601
  }
12280
12602
  }
12281
12603
  };
12282
- base$1.MemberExpression = function(node, st, c18) {
12283
- c18(node.object, st, "Expression");
12604
+ base$1.MemberExpression = function(node, st, c17) {
12605
+ c17(node.object, st, "Expression");
12284
12606
  if (node.computed) {
12285
- c18(node.property, st, "Expression");
12607
+ c17(node.property, st, "Expression");
12286
12608
  }
12287
12609
  };
12288
- base$1.ExportNamedDeclaration = base$1.ExportDefaultDeclaration = function(node, st, c18) {
12610
+ base$1.ExportNamedDeclaration = base$1.ExportDefaultDeclaration = function(node, st, c17) {
12289
12611
  if (node.declaration) {
12290
- c18(node.declaration, st, node.type === "ExportNamedDeclaration" || node.declaration.id ? "Statement" : "Expression");
12612
+ c17(node.declaration, st, node.type === "ExportNamedDeclaration" || node.declaration.id ? "Statement" : "Expression");
12291
12613
  }
12292
12614
  if (node.source) {
12293
- c18(node.source, st, "Expression");
12615
+ c17(node.source, st, "Expression");
12294
12616
  }
12295
12617
  };
12296
- base$1.ExportAllDeclaration = function(node, st, c18) {
12618
+ base$1.ExportAllDeclaration = function(node, st, c17) {
12297
12619
  if (node.exported) {
12298
- c18(node.exported, st);
12620
+ c17(node.exported, st);
12299
12621
  }
12300
- c18(node.source, st, "Expression");
12622
+ c17(node.source, st, "Expression");
12301
12623
  };
12302
- base$1.ImportDeclaration = function(node, st, c18) {
12624
+ base$1.ImportDeclaration = function(node, st, c17) {
12303
12625
  for (var i = 0, list2 = node.specifiers; i < list2.length; i += 1) {
12304
12626
  var spec = list2[i];
12305
- c18(spec, st);
12627
+ c17(spec, st);
12306
12628
  }
12307
- c18(node.source, st, "Expression");
12629
+ c17(node.source, st, "Expression");
12308
12630
  };
12309
- base$1.ImportExpression = function(node, st, c18) {
12310
- c18(node.source, st, "Expression");
12631
+ base$1.ImportExpression = function(node, st, c17) {
12632
+ c17(node.source, st, "Expression");
12311
12633
  };
12312
12634
  base$1.ImportSpecifier = base$1.ImportDefaultSpecifier = base$1.ImportNamespaceSpecifier = base$1.Identifier = base$1.PrivateIdentifier = base$1.Literal = ignore;
12313
- base$1.TaggedTemplateExpression = function(node, st, c18) {
12314
- c18(node.tag, st, "Expression");
12315
- c18(node.quasi, st, "Expression");
12635
+ base$1.TaggedTemplateExpression = function(node, st, c17) {
12636
+ c17(node.tag, st, "Expression");
12637
+ c17(node.quasi, st, "Expression");
12316
12638
  };
12317
- base$1.ClassDeclaration = base$1.ClassExpression = function(node, st, c18) {
12318
- return c18(node, st, "Class");
12639
+ base$1.ClassDeclaration = base$1.ClassExpression = function(node, st, c17) {
12640
+ return c17(node, st, "Class");
12319
12641
  };
12320
- base$1.Class = function(node, st, c18) {
12642
+ base$1.Class = function(node, st, c17) {
12321
12643
  if (node.id) {
12322
- c18(node.id, st, "Pattern");
12644
+ c17(node.id, st, "Pattern");
12323
12645
  }
12324
12646
  if (node.superClass) {
12325
- c18(node.superClass, st, "Expression");
12647
+ c17(node.superClass, st, "Expression");
12326
12648
  }
12327
- c18(node.body, st);
12649
+ c17(node.body, st);
12328
12650
  };
12329
- base$1.ClassBody = function(node, st, c18) {
12651
+ base$1.ClassBody = function(node, st, c17) {
12330
12652
  for (var i = 0, list2 = node.body; i < list2.length; i += 1) {
12331
12653
  var elt = list2[i];
12332
- c18(elt, st);
12654
+ c17(elt, st);
12333
12655
  }
12334
12656
  };
12335
- base$1.MethodDefinition = base$1.PropertyDefinition = base$1.Property = function(node, st, c18) {
12657
+ base$1.MethodDefinition = base$1.PropertyDefinition = base$1.Property = function(node, st, c17) {
12336
12658
  if (node.computed) {
12337
- c18(node.key, st, "Expression");
12659
+ c17(node.key, st, "Expression");
12338
12660
  }
12339
12661
  if (node.value) {
12340
- c18(node.value, st, "Expression");
12662
+ c17(node.value, st, "Expression");
12341
12663
  }
12342
12664
  };
12343
12665
  ArrowFunctionExpression$1 = "ArrowFunctionExpression";
@@ -22756,11 +23078,11 @@ ${next}` : out;
22756
23078
  return false;
22757
23079
  };
22758
23080
  pp$6.updateContext = function(prevType) {
22759
- var update2, type = this.type;
23081
+ var update, type = this.type;
22760
23082
  if (type.keyword && prevType === types$1.dot) {
22761
23083
  this.exprAllowed = false;
22762
- } else if (update2 = type.updateContext) {
22763
- update2.call(this, prevType);
23084
+ } else if (update = type.updateContext) {
23085
+ update.call(this, prevType);
22764
23086
  } else {
22765
23087
  this.exprAllowed = type.beforeExpr;
22766
23088
  }
@@ -23028,13 +23350,13 @@ ${next}` : out;
23028
23350
  expr = this.parseAwait(forInit);
23029
23351
  sawUnary = true;
23030
23352
  } else if (this.type.prefix) {
23031
- var node = this.startNode(), update2 = this.type === types$1.incDec;
23353
+ var node = this.startNode(), update = this.type === types$1.incDec;
23032
23354
  node.operator = this.value;
23033
23355
  node.prefix = true;
23034
23356
  this.next();
23035
- node.argument = this.parseMaybeUnary(null, true, update2, forInit);
23357
+ node.argument = this.parseMaybeUnary(null, true, update, forInit);
23036
23358
  this.checkExpressionErrors(refDestructuringErrors, true);
23037
- if (update2) {
23359
+ if (update) {
23038
23360
  this.checkLValSimple(node.argument);
23039
23361
  } else if (this.strict && node.operator === "delete" && node.argument.type === "Identifier") {
23040
23362
  this.raiseRecoverable(node.start, "Deleting local variable in strict mode");
@@ -23043,7 +23365,7 @@ ${next}` : out;
23043
23365
  } else {
23044
23366
  sawUnary = true;
23045
23367
  }
23046
- expr = this.finishNode(node, update2 ? "UpdateExpression" : "UnaryExpression");
23368
+ expr = this.finishNode(node, update ? "UpdateExpression" : "UnaryExpression");
23047
23369
  } else if (!sawUnary && this.type === types$1.privateId) {
23048
23370
  if ((forInit || this.privateNameStack.length === 0) && this.options.checkPrivateFields) {
23049
23371
  this.unexpected();
@@ -24069,12 +24391,12 @@ ${next}` : out;
24069
24391
  if (i >= l) {
24070
24392
  return -1;
24071
24393
  }
24072
- var c18 = s.charCodeAt(i);
24073
- if (!(forceU || this.switchU) || c18 <= 55295 || c18 >= 57344 || i + 1 >= l) {
24074
- return c18;
24394
+ var c17 = s.charCodeAt(i);
24395
+ if (!(forceU || this.switchU) || c17 <= 55295 || c17 >= 57344 || i + 1 >= l) {
24396
+ return c17;
24075
24397
  }
24076
24398
  var next = s.charCodeAt(i + 1);
24077
- return next >= 56320 && next <= 57343 ? (c18 << 10) + next - 56613888 : c18;
24399
+ return next >= 56320 && next <= 57343 ? (c17 << 10) + next - 56613888 : c17;
24078
24400
  };
24079
24401
  RegExpValidationState.prototype.nextIndex = function nextIndex(i, forceU) {
24080
24402
  if (forceU === void 0)
@@ -24084,8 +24406,8 @@ ${next}` : out;
24084
24406
  if (i >= l) {
24085
24407
  return l;
24086
24408
  }
24087
- var c18 = s.charCodeAt(i), next;
24088
- if (!(forceU || this.switchU) || c18 <= 55295 || c18 >= 57344 || i + 1 >= l || (next = s.charCodeAt(i + 1)) < 56320 || next > 57343) {
24409
+ var c17 = s.charCodeAt(i), next;
24410
+ if (!(forceU || this.switchU) || c17 <= 55295 || c17 >= 57344 || i + 1 >= l || (next = s.charCodeAt(i + 1)) < 56320 || next > 57343) {
24089
24411
  return i + 1;
24090
24412
  }
24091
24413
  return i + 2;
@@ -28133,7 +28455,7 @@ ${val.stack}`;
28133
28455
 
28134
28456
  // src/cli.ts
28135
28457
  import { readFileSync as readFileSync3 } from "node:fs";
28136
- import c17 from "picocolors";
28458
+ import c16 from "picocolors";
28137
28459
 
28138
28460
  // ../node_modules/cac/dist/index.mjs
28139
28461
  import { EventEmitter } from "events";
@@ -28740,11 +29062,11 @@ init_utils();
28740
29062
  init_init();
28741
29063
  import { pathToFileURL as pathToFileURL2 } from "node:url";
28742
29064
  import c7 from "picocolors";
28743
- async function install(flags) {
29065
+ async function install(flags, update = false) {
28744
29066
  const log2 = withType("install/install");
28745
29067
  log2(`Flags: ${JSON.stringify(flags)}`);
28746
29068
  const env2 = await getEnv(flags);
28747
- const input = await getInputMap(flags);
29069
+ const input = update ? {} : await getInputMap(flags);
28748
29070
  log2(`Input map parsed: ${input}`);
28749
29071
  let generator, staticDeps, dynamicDeps;
28750
29072
  try {
@@ -28893,71 +29215,10 @@ async function handleLocalFile(resolvedModule, inlinePins, generator) {
28893
29215
  inlinePins.push(...pins);
28894
29216
  }
28895
29217
 
28896
- // src/update.ts
28897
- init_utils();
28898
- init_logger();
28899
- init_init();
28900
- import c9 from "picocolors";
28901
- async function update(packages, flags) {
28902
- const log2 = withType("update/update");
28903
- log2(`Updating packages: ${packages.join(", ")}`);
28904
- log2(`Flags: ${JSON.stringify(flags)}`);
28905
- const env2 = await getEnv(flags);
28906
- const generator = await getGenerator(flags);
28907
- let inputPins = [];
28908
- const input = await getInputMap(flags);
28909
- if (typeof input !== "undefined") {
28910
- inputPins = await generator.addMappings(input);
28911
- }
28912
- log2(`Input map parsed: ${input}`);
28913
- if (packages.length === 0 && inputPins.length === 0) {
28914
- !flags.quiet && console.warn(
28915
- `${c9.red(
28916
- "Warning:"
28917
- )} Nothing to update. Please provide a list of packages or a non-empty input file.`
28918
- );
28919
- try {
28920
- const projectConfig = await initProject({
28921
- quiet: flags.quiet,
28922
- dir: process.cwd()
28923
- });
28924
- !flags.quiet && console.log(`${c9.blue("Info:")} Current project: ${c9.bold(projectConfig.name)}`);
28925
- if (projectConfig.version) {
28926
- !flags.quiet && console.log(`${c9.blue("Info:")} Project version: ${c9.bold(projectConfig.version)}`);
28927
- }
28928
- } catch (e) {
28929
- if (e instanceof JspmError && !flags.quiet) {
28930
- console.warn(`${c9.yellow("Warning:")} ${e.message}`);
28931
- }
28932
- }
28933
- return;
28934
- } else {
28935
- try {
28936
- const projectConfig = await initProject({
28937
- quiet: flags.quiet,
28938
- dir: process.cwd()
28939
- });
28940
- log2(`Project validated: ${projectConfig.name}`);
28941
- } catch (e) {
28942
- if (e instanceof JspmError && !flags.quiet) {
28943
- console.warn(`${c9.yellow("Warning:")} ${e.message}`);
28944
- }
28945
- }
28946
- !flags.quiet && startSpinner(
28947
- `Updating ${c9.bold(packages.length ? packages.join(", ") : "everything")}. (${env2.join(
28948
- ", "
28949
- )})`
28950
- );
28951
- await generator.update(packages.length ? packages : void 0);
28952
- stopSpinner();
28953
- }
28954
- return await writeOutput(generator, null, env2, flags, flags.quiet);
28955
- }
28956
-
28957
29218
  // src/config-cmd.ts
28958
29219
  init_config();
28959
29220
  init_utils();
28960
- import c10 from "picocolors";
29221
+ import c9 from "picocolors";
28961
29222
  async function configCmd(action, configKey, value, flags) {
28962
29223
  const scope = flags.local ? "local" : "user";
28963
29224
  if (flags.provider) {
@@ -29000,7 +29261,7 @@ async function getConfig(key, flags) {
29000
29261
  const value = getConfigValue(config, key);
29001
29262
  if (value === void 0) {
29002
29263
  if (!flags.quiet) {
29003
- console.log(`${c10.yellow("Warning:")} Configuration key '${key}' is not set.`);
29264
+ console.log(`${c9.yellow("Warning:")} Configuration key '${key}' is not set.`);
29004
29265
  }
29005
29266
  return;
29006
29267
  }
@@ -29022,7 +29283,7 @@ async function setConfig(key, value, scope, flags) {
29022
29283
  await updateConfig(updates, scope);
29023
29284
  if (!flags.quiet) {
29024
29285
  console.log(
29025
- `${c10.green("Ok:")} Set ${scope} config ${c10.cyan(key)} to ${typeof parsedValue === "object" ? JSON.stringify(parsedValue) : parsedValue}`
29286
+ `${c9.green("Ok:")} Set ${scope} config ${c9.cyan(key)} to ${typeof parsedValue === "object" ? JSON.stringify(parsedValue) : parsedValue}`
29026
29287
  );
29027
29288
  }
29028
29289
  } catch (err) {
@@ -29033,7 +29294,7 @@ async function deleteConfig(key, scope, flags) {
29033
29294
  const config = await loadConfig();
29034
29295
  if (getConfigValue(config, key) === void 0) {
29035
29296
  if (!flags.quiet) {
29036
- console.log(`${c10.yellow("Warning:")} Configuration key '${key}' does not exist.`);
29297
+ console.log(`${c9.yellow("Warning:")} Configuration key '${key}' does not exist.`);
29037
29298
  }
29038
29299
  return;
29039
29300
  }
@@ -29041,7 +29302,7 @@ async function deleteConfig(key, scope, flags) {
29041
29302
  try {
29042
29303
  await saveConfig(config, scope);
29043
29304
  if (!flags.quiet) {
29044
- console.log(`${c10.green("Ok:")} Deleted ${scope} config key ${c10.cyan(key)}`);
29305
+ console.log(`${c9.green("Ok:")} Deleted ${scope} config key ${c9.cyan(key)}`);
29045
29306
  }
29046
29307
  } catch (err) {
29047
29308
  throw new JspmError(`Failed to update configuration: ${err.message}`);
@@ -29142,7 +29403,7 @@ init_node_entry();
29142
29403
  init_utils();
29143
29404
  init_init();
29144
29405
  import jspmRollup from "@jspm/plugin-rollup";
29145
- import c11 from "picocolors";
29406
+ import c10 from "picocolors";
29146
29407
  async function build(flags) {
29147
29408
  const projectConfig = await initProject(flags);
29148
29409
  const env2 = await getEnv(flags);
@@ -29176,7 +29437,7 @@ async function build(flags) {
29176
29437
  const generator = await getGenerator(flags);
29177
29438
  try {
29178
29439
  if (!flags.quiet)
29179
- startSpinner(`Building package ${c11.cyan(projectConfig.name)}...`);
29440
+ startSpinner(`Building package ${c10.cyan(projectConfig.name)}...`);
29180
29441
  const baseUrl = pathToFileURL4(projectConfig.projectPath).href;
29181
29442
  const externalPackages = Object.keys(projectConfig.dependencies || {});
29182
29443
  const bundle = await rollup({
@@ -29255,7 +29516,7 @@ async function build(flags) {
29255
29516
  stopSpinner();
29256
29517
  if (flags.install !== false) {
29257
29518
  if (!flags.quiet) {
29258
- console.log(`${c11.cyan("Info:")} Generating import map in build directory...`);
29519
+ console.log(`${c10.cyan("Info:")} Generating import map in build directory...`);
29259
29520
  }
29260
29521
  const map = getInputPath(flags);
29261
29522
  process.chdir(flags.out);
@@ -29272,22 +29533,22 @@ async function build(flags) {
29272
29533
  try {
29273
29534
  await install(installFlags);
29274
29535
  if (!flags.quiet) {
29275
- console.log(`${c11.green("\u2713")} Import map generated in ${c11.cyan(flags.out)}`);
29536
+ console.log(`${c10.green("\u2713")} Import map generated in ${c10.cyan(flags.out)}`);
29276
29537
  }
29277
29538
  } catch (error2) {
29278
29539
  if (!flags.quiet) {
29279
- console.warn(`${c11.yellow("Warning:")} Failed to generate import map: ${error2.message}`);
29540
+ console.warn(`${c10.yellow("Warning:")} Failed to generate import map: ${error2.message}`);
29280
29541
  }
29281
29542
  }
29282
29543
  }
29283
29544
  if (!flags.quiet) {
29284
- const infoMsg = flags.install !== false ? `${c11.green("\u2713")} Built ${c11.cyan(projectConfig.name)} to ${c11.cyan(
29545
+ const infoMsg = flags.install !== false ? `${c10.green("\u2713")} Built ${c10.cyan(projectConfig.name)} to ${c10.cyan(
29285
29546
  flags.out
29286
- )} with import map.` : `${c11.green("\u2713")} Built ${c11.cyan(projectConfig.name)} to ${c11.cyan(
29547
+ )} with import map.` : `${c10.green("\u2713")} Built ${c10.cyan(projectConfig.name)} to ${c10.cyan(
29287
29548
  flags.out
29288
29549
  )}.
29289
29550
 
29290
- ${c11.cyan("Info:")} Run ${c11.bold(
29551
+ ${c10.cyan("Info:")} Run ${c10.bold(
29291
29552
  `jspm -d ${flags.out} install --release`
29292
29553
  )} to create a production import map.`;
29293
29554
  console.log(infoMsg);
@@ -29348,7 +29609,7 @@ function cssPlugin({ minify, baseUrl }) {
29348
29609
  import fs8 from "node:fs/promises";
29349
29610
  import path6 from "node:path";
29350
29611
  import { pathToFileURL as pathToFileURL5 } from "node:url";
29351
- import c12 from "picocolors";
29612
+ import c11 from "picocolors";
29352
29613
 
29353
29614
  // node_modules/open/index.js
29354
29615
  import process6 from "node:process";
@@ -29824,20 +30085,20 @@ init_utils();
29824
30085
  init_logger();
29825
30086
  init_config();
29826
30087
  function showShortcuts(directory) {
29827
- console.log(`${c12.magenta(c12.bold("\nKeyboard shortcuts:"))}
29828
- \u2192 ${c12.bold(c12.bgBlueBright(c12.whiteBright(" o ")))} ${c12.dim("Open package URL in the browser")}
29829
- \u2192 ${c12.bold(c12.bgBlueBright(c12.whiteBright(" l ")))} ${c12.dim(
30088
+ console.log(`${c11.magenta(c11.bold("\nKeyboard shortcuts:"))}
30089
+ \u2192 ${c11.bold(c11.bgBlueBright(c11.whiteBright(" o ")))} ${c11.dim("Open package URL in the browser")}
30090
+ \u2192 ${c11.bold(c11.bgBlueBright(c11.whiteBright(" l ")))} ${c11.dim(
29830
30091
  "Open package listing page in the browser"
29831
30092
  )}
29832
- \u2192 ${c12.bold(c12.bgBlueBright(c12.whiteBright(" c ")))} ${c12.dim(
30093
+ \u2192 ${c11.bold(c11.bgBlueBright(c11.whiteBright(" c ")))} ${c11.dim(
29833
30094
  "Copy HTML usage script code snippet to clipboard"
29834
30095
  )}
29835
- \u2192 ${c12.bold(c12.bgBlueBright(c12.whiteBright(" p ")))} ${c12.dim(
30096
+ \u2192 ${c11.bold(c11.bgBlueBright(c11.whiteBright(" p ")))} ${c11.dim(
29836
30097
  "Open self-contained preview URL in the browser"
29837
30098
  )}
29838
- \u2192 ${c12.bold(c12.bgBlueBright(c12.whiteBright(" r ")))} ${c12.dim("Force republish")}
29839
- \u2192 ${c12.bold(c12.bgBlueBright(c12.whiteBright(" q ")))} ${c12.dim("Stop (or Ctrl+C)")}`);
29840
- console.log(`${c12.blue("Info:")} Watching for changes in ${c12.cyan(directory)}...`);
30099
+ \u2192 ${c11.bold(c11.bgBlueBright(c11.whiteBright(" r ")))} ${c11.dim("Force republish")}
30100
+ \u2192 ${c11.bold(c11.bgBlueBright(c11.whiteBright(" q ")))} ${c11.dim("Stop (or Ctrl+C)")}`);
30101
+ console.log(`${c11.blue("Info:")} Watching for changes in ${c11.cyan(directory)}...`);
29841
30102
  process.stdin.setRawMode?.(true);
29842
30103
  process.stdin.resume();
29843
30104
  }
@@ -29858,6 +30119,9 @@ async function readJsonFile(filePath, defaultValue = {}) {
29858
30119
  }
29859
30120
  async function eject(flags) {
29860
30121
  const log2 = withType("publish/eject");
30122
+ console.warn(
30123
+ `${c11.yellow("Warning:")} jspm publish is experimental and should only be used for prototyping. Unlike the https://ga.jspm.io/ CDN which is stable, reliability guarantees are not provided for publishing on https://jspm.io/. For reliable package delivery, use npm publish \u2014 all npm packages are available on the https://ga.jspm.io/ CDN.`
30124
+ );
29861
30125
  const pkg = flags.eject;
29862
30126
  if (!pkg.startsWith("app:")) {
29863
30127
  throw new JspmError(`Only the app: JSPM registry is currently supported for ejection.`);
@@ -29876,17 +30140,20 @@ async function eject(flags) {
29876
30140
  if (name.includes("@"))
29877
30141
  name = name.slice(0, name.indexOf("@"));
29878
30142
  const version3 = pkg.slice(4 + name.length + 1);
29879
- startSpinner(`Ejecting ${c12.bold(pkg)}...`);
30143
+ startSpinner(`Ejecting ${c11.bold(pkg)}...`);
29880
30144
  await generator.eject({ name, version: version3, provider: provider2 }, ".");
29881
30145
  stopSpinner();
29882
- startSpinner(`Merging published import map for ${c12.bold(pkg)}...`);
30146
+ startSpinner(`Merging published import map for ${c11.bold(pkg)}...`);
29883
30147
  const env2 = await getEnv(flags);
29884
30148
  await writeOutput(generator, null, env2, flags, flags.quiet);
29885
30149
  stopSpinner();
29886
- console.log(`${c12.green("Ok:")} Package ${c12.green(pkg)} ejected into ${c12.bold(flags.dir)}`);
30150
+ console.log(`${c11.green("Ok:")} Package ${c11.green(pkg)} ejected into ${c11.bold(flags.dir)}`);
29887
30151
  }
29888
30152
  async function publish(flags = {}) {
29889
30153
  const log2 = withType("publish/publish");
30154
+ console.warn(
30155
+ `${c11.yellow("Warning:")} jspm publish is experimental and should only be used for prototyping. Unlike the https://ga.jspm.io/ CDN which is stable, reliability guarantees are not provided for publishing on https://jspm.io/. For reliable package delivery, use npm publish \u2014 all npm packages are available on the https://ga.jspm.io/ CDN.`
30156
+ );
29890
30157
  const { initProject: initProject2 } = await Promise.resolve().then(() => (init_init(), init_exports));
29891
30158
  try {
29892
30159
  const projectConfig = await initProject2({
@@ -29953,11 +30220,11 @@ async function publishOnce(name, version3, directory, flags, logSnippet, prepare
29953
30220
  );
29954
30221
  }
29955
30222
  if (prepareScript) {
29956
- console.log(`${c12.blue("Info:")} Running ${c12.bold("prepare")} script...`);
30223
+ console.log(`${c11.blue("Info:")} Running ${c11.bold("prepare")} script...`);
29957
30224
  await runPackageScript(prepareScript, directory);
29958
- console.log(`${c12.blue("Info:")} ${c12.bold("prepare")} script completed`);
30225
+ console.log(`${c11.blue("Info:")} ${c11.bold("prepare")} script completed`);
29959
30226
  }
29960
- startSpinner(`Publishing ${c12.bold(`${name}@${version3}`)} to ${publishProvider}...`);
30227
+ startSpinner(`Publishing ${c11.bold(`${name}@${version3}`)} to ${publishProvider}...`);
29961
30228
  const generator = await getGenerator(flags, {
29962
30229
  mapUrl: pathToFileURL5(`${directory}/`)
29963
30230
  });
@@ -29972,16 +30239,16 @@ async function publishOnce(name, version3, directory, flags, logSnippet, prepare
29972
30239
  });
29973
30240
  stopSpinner();
29974
30241
  console.log(
29975
- `${c12.green("Ok:")} Package published to ${c12.green(packageUrl)} with import map ${c12.green(
30242
+ `${c11.green("Ok:")} Package published to ${c11.green(packageUrl)} with import map ${c11.green(
29976
30243
  mapUrl
29977
30244
  )}`
29978
30245
  );
29979
30246
  if (codeSnippet && logSnippet) {
29980
30247
  console.log(
29981
30248
  `
29982
- ${c12.magentaBright(c12.bold("HTML Usage:"))}
30249
+ ${c11.magentaBright(c11.bold("HTML Usage:"))}
29983
30250
 
29984
- ${c12.greenBright(
30251
+ ${c11.greenBright(
29985
30252
  cliHtmlHighlight(codeSnippet)
29986
30253
  )}`
29987
30254
  );
@@ -30021,7 +30288,7 @@ async function startWatchMode(name, version3, directory, ignore2, include, flags
30021
30288
  hideShortcuts();
30022
30289
  }
30023
30290
  console.log(`
30024
- ${c12.blue("Info:")} Watch mode stopped`);
30291
+ ${c11.blue("Info:")} Watch mode stopped`);
30025
30292
  process.exit(0);
30026
30293
  }
30027
30294
  process.on("SIGINT", stopWatch);
@@ -30095,7 +30362,7 @@ ${codeSnippet.split("\n").filter((l) => !l.startsWith("<!--") || !l.endsWith("--
30095
30362
  else
30096
30363
  hideShortcuts();
30097
30364
  console.log(
30098
- `${c12.blue("Info:")} ${forcedRepublish ? "Requesting republish" : changes.length > 1 ? "Multiple changes detected" : `${path6.relative(directory, changes[0]).replace(/\\/g, "/")} changed`}, republishing...`
30365
+ `${c11.blue("Info:")} ${forcedRepublish ? "Requesting republish" : changes.length > 1 ? "Multiple changes detected" : `${path6.relative(directory, changes[0]).replace(/\\/g, "/")} changed`}, republishing...`
30099
30366
  );
30100
30367
  }
30101
30368
  forcedRepublish = false;
@@ -30114,7 +30381,7 @@ ${codeSnippet.split("\n").filter((l) => !l.startsWith("<!--") || !l.endsWith("--
30114
30381
  }
30115
30382
  } catch (error2) {
30116
30383
  lastRunWasError = true;
30117
- console.error(`${c12.red("Error:")} Watch mode error`);
30384
+ console.error(`${c11.red("Error:")} Watch mode error`);
30118
30385
  console.error(error2);
30119
30386
  startSpinner("Waiting for update to fix the error...");
30120
30387
  waiting = true;
@@ -30123,22 +30390,22 @@ ${codeSnippet.split("\n").filter((l) => !l.startsWith("<!--") || !l.endsWith("--
30123
30390
  }
30124
30391
 
30125
30392
  // src/auth.ts
30126
- import c13 from "picocolors";
30393
+ import c12 from "picocolors";
30127
30394
  init_utils();
30128
30395
  init_config();
30129
30396
  async function list() {
30130
- console.log(`${c13.magenta(c13.bold("Available providers:"))}`);
30397
+ console.log(`${c12.magenta(c12.bold("Available providers:"))}`);
30131
30398
  const providers = availableProviders.filter((provider2) => !provider2.includes("#"));
30132
30399
  const config = await loadConfig();
30133
30400
  const configuredProviders = config.providers || {};
30134
30401
  for (const provider2 of providers) {
30135
30402
  const isAuthenticated = !!configuredProviders[provider2]?.authToken;
30136
- const authStatus = isAuthenticated ? c13.green("authenticated") : c13.yellow("not authenticated");
30137
- console.log(` ${c13.cyan(provider2)} ${c13.dim("\u2192")} ${authStatus}`);
30403
+ const authStatus = isAuthenticated ? c12.green("authenticated") : c12.yellow("not authenticated");
30404
+ console.log(` ${c12.cyan(provider2)} ${c12.dim("\u2192")} ${authStatus}`);
30138
30405
  }
30139
30406
  console.log();
30140
30407
  console.log(
30141
- `${c13.blue("Info:")} Use ${c13.bold("jspm auth <provider>")} to authenticate with a provider.`
30408
+ `${c12.blue("Info:")} Use ${c12.bold("jspm auth <provider>")} to authenticate with a provider.`
30142
30409
  );
30143
30410
  }
30144
30411
  async function provider(providerName, flags = {}) {
@@ -30155,7 +30422,7 @@ async function provider(providerName, flags = {}) {
30155
30422
  username,
30156
30423
  verify: (url, instructions) => {
30157
30424
  console.log(`To authenticate with ${providerName}:`);
30158
- console.log(`${c13.bold(c13.blue(url))}`);
30425
+ console.log(`${c12.bold(c12.blue(url))}`);
30159
30426
  console.log(`${instructions}
30160
30427
  `);
30161
30428
  if (shouldOpen) {
@@ -30176,12 +30443,12 @@ async function provider(providerName, flags = {}) {
30176
30443
  }
30177
30444
  config.providers[provider2].authToken = result.token;
30178
30445
  await saveConfig(config, "user");
30179
- console.log(`${c13.green("Ok:")} Authentication successful`);
30446
+ console.log(`${c12.green("Ok:")} Authentication successful`);
30180
30447
  console.log(
30181
- `${c13.blue("Info:")} Token saved in JSPM configuration for provider '${provider2}'`
30448
+ `${c12.blue("Info:")} Token saved in JSPM configuration for provider '${provider2}'`
30182
30449
  );
30183
30450
  } else {
30184
- console.log(`${c13.yellow("Warning:")} Authentication completed but no token was returned`);
30451
+ console.log(`${c12.yellow("Warning:")} Authentication completed but no token was returned`);
30185
30452
  }
30186
30453
  } catch (error2) {
30187
30454
  if (error2.message?.includes("does not support authentication")) {
@@ -30196,7 +30463,7 @@ import { fileURLToPath as fileURLToPath3, pathToFileURL as pathToFileURL6 } from
30196
30463
  import { basename as basename4, dirname as dirname5, join as join5, relative as relative4, resolve as resolve4 } from "node:path";
30197
30464
  import { createServer } from "node:http";
30198
30465
  import { readFile as readFile4, stat as stat3 } from "node:fs/promises";
30199
- import c15 from "picocolors";
30466
+ import c14 from "picocolors";
30200
30467
 
30201
30468
  // ../node_modules/mime/dist/types/other.js
30202
30469
  var types3 = {
@@ -32032,7 +32299,7 @@ function createHotMap(map) {
32032
32299
 
32033
32300
  // src/serve-utils.ts
32034
32301
  import { stat as stat2 } from "node:fs/promises";
32035
- import c14 from "picocolors";
32302
+ import c13 from "picocolors";
32036
32303
  init_utils();
32037
32304
  var showingShortcuts = false;
32038
32305
  var showingShortcutsWatch = false;
@@ -32048,7 +32315,7 @@ function showShortcuts2(serverUrl, isWatchMode = false) {
32048
32315
  }
32049
32316
  if (isWatchMode) {
32050
32317
  showingShortcutsWatch = true;
32051
- console.log(`${c14.blue("Info:")} Watching for file changes...`);
32318
+ console.log(`${c13.blue("Info:")} Watching for file changes...`);
32052
32319
  }
32053
32320
  process.stdin.setRawMode?.(true);
32054
32321
  process.stdin.resume();
@@ -32063,15 +32330,15 @@ function setupKeyHandler(serverUrl) {
32063
32330
  case "q":
32064
32331
  hideShortcuts2();
32065
32332
  console.log(`
32066
- ${c14.blue("Info:")} Server stopped`);
32333
+ ${c13.blue("Info:")} Server stopped`);
32067
32334
  process.exit(0);
32068
32335
  break;
32069
32336
  case "o":
32070
- console.log(`${c14.blue("Info:")} Opening ${serverUrl} in browser`);
32337
+ console.log(`${c13.blue("Info:")} Opening ${serverUrl} in browser`);
32071
32338
  open_default(serverUrl);
32072
32339
  break;
32073
32340
  case "c":
32074
- console.log(`${c14.blue("Info:")} Copied server URL to clipboard`);
32341
+ console.log(`${c13.blue("Info:")} Copied server URL to clipboard`);
32075
32342
  copyToClipboard(serverUrl);
32076
32343
  break;
32077
32344
  }
@@ -32108,13 +32375,13 @@ function lintMessage({
32108
32375
  code
32109
32376
  }) {
32110
32377
  hideShortcuts2();
32111
- console.log(`${c14.yellow("Warning:")} Problem in HTML file ${c14.bold(file)}:`);
32112
- console.log(`${c14.yellow(` \u2192 ${name}`)}${description ? `
32113
- ${c14.dim(description)}` : ""}`);
32378
+ console.log(`${c13.yellow("Warning:")} Problem in HTML file ${c13.bold(file)}:`);
32379
+ console.log(`${c13.yellow(` \u2192 ${name}`)}${description ? `
32380
+ ${c13.dim(description)}` : ""}`);
32114
32381
  if (code) {
32115
32382
  if (code.title)
32116
32383
  console.log(`
32117
- ${c14.magenta(code.title)}`);
32384
+ ${c13.magenta(code.title)}`);
32118
32385
  console.log(`
32119
32386
  ${cliHtmlHighlight(code.snippet)}
32120
32387
  `);
@@ -32223,12 +32490,12 @@ async function serve(flags = {}) {
32223
32490
  } else if (filePath.endsWith(".jsx") || filePath.endsWith(".tsx")) {
32224
32491
  lintMessage({
32225
32492
  file: relativePath,
32226
- name: `JSX is not supported in ${c15.bold("jspm serve")}`,
32493
+ name: `JSX is not supported in ${c14.bold("jspm serve")}`,
32227
32494
  description: `Consider one of the following alternatives:
32228
- 1. Run an initial preprocessor step separately compiling e.g. ${c15.bold(
32495
+ 1. Run an initial preprocessor step separately compiling e.g. ${c14.bold(
32229
32496
  "src/**/*.jsx"
32230
- )} into ${c15.bold("lib/**/*.js")}.
32231
- 2. Use a JSX-like templating library like htm (${c15.cyan("https://www.npmjs.com/package/htm")}).
32497
+ )} into ${c14.bold("lib/**/*.js")}.
32498
+ 2. Use a JSX-like templating library like htm (${c14.cyan("https://www.npmjs.com/package/htm")}).
32232
32499
  3. Consider alternative React-based workflow tooling for JSX application workflows.`
32233
32500
  });
32234
32501
  const content = await readFile4(filePath, "utf8");
@@ -32248,8 +32515,8 @@ async function serve(flags = {}) {
32248
32515
  } catch (error2) {
32249
32516
  hideShortcuts2();
32250
32517
  console.error(
32251
- `${c15.red(`TypeScript ${error2.code || "Error"}`)}: ${error2.message}
32252
- ${c15.bold(
32518
+ `${c14.red(`TypeScript ${error2.code || "Error"}`)}: ${error2.message}
32519
+ ${c14.bold(
32253
32520
  `${relative4(resolvedDir, filePath).replace(/\\/g, "/")}:[${error2.startLine || ""}:${error2.startColumn || ""}]`
32254
32521
  )}
32255
32522
  ${error2.snippet}`
@@ -32277,7 +32544,7 @@ ${error2.snippet}`
32277
32544
  lintMessage({
32278
32545
  file: relativePath2,
32279
32546
  name: `Inline import map not tracked by this serve instance`,
32280
- description: `The HTML file has an inline import map, but that is not being watched by this server. Use ${c15.bold(
32547
+ description: `The HTML file has an inline import map, but that is not being watched by this server. Use ${c14.bold(
32281
32548
  `jspm serve -m ${relativePath2}`
32282
32549
  )} to run a server tracking the install of the inline import map in this HTML file.`
32283
32550
  });
@@ -32288,7 +32555,7 @@ ${error2.snippet}`
32288
32555
  name: `Missing the ${missingMap ? "import map script " : ""}${missingMap && missingEsms ? "and the " : ""}${missingEsms ? "ES Module Shims polyfill" : ""}`,
32289
32556
  description: `This application will not support hot reloading${missingEsms ? missingMap ? "" : " or work in Chrome 132, Safari 18.3 or Firefox" : ""}.`,
32290
32557
  code: {
32291
- title: `Add the following HTML snippet to ${c15.bold(relativePath2)}:`,
32558
+ title: `Add the following HTML snippet to ${c14.bold(relativePath2)}:`,
32292
32559
  snippet: await esmsCodeSnippet(relMapPath)
32293
32560
  }
32294
32561
  });
@@ -32337,10 +32604,10 @@ ${error2.snippet}`
32337
32604
  if (mapDeps && !inMap) {
32338
32605
  lintMessage({
32339
32606
  file: relativePath2,
32340
- name: `Module ${c15.bold(
32341
- c15.cyan(relModule)
32607
+ name: `Module ${c14.bold(
32608
+ c14.cyan(relModule)
32342
32609
  )} is not part of the JSPM project import map graph so may not load correctly`,
32343
- description: `To fix, add it as an entry point export in the ${c15.bold(
32610
+ description: `To fix, add it as an entry point export in the ${c14.bold(
32344
32611
  "package.json"
32345
32612
  )}.`,
32346
32613
  code: {
@@ -32354,11 +32621,11 @@ ${error2.snippet}`
32354
32621
  if (module !== projectConfig.name && !module.startsWith(`${projectConfig.name}/`)) {
32355
32622
  lintMessage({
32356
32623
  file: relativePath2,
32357
- name: `Bare module specifier import ${c15.bold(
32358
- c15.cyan(`'${module}'`)
32624
+ name: `Bare module specifier import ${c14.bold(
32625
+ c14.cyan(`'${module}'`)
32359
32626
  )} is not mapped by the import map. Either update the package.json "name" or update the HTML to use an import of "jspm" or "jspm/...".`,
32360
- description: `Only bare specifiers matching the project name ${c15.cyan(
32361
- c15.bold(`'${projectConfig.name}'`)
32627
+ description: `Only bare specifiers matching the project name ${c14.cyan(
32628
+ c14.bold(`'${projectConfig.name}'`)
32362
32629
  )} are mapped.`,
32363
32630
  code: {
32364
32631
  title: "Correct JSPM HTML Script:",
@@ -32368,12 +32635,12 @@ ${error2.snippet}`
32368
32635
  } else if (Object.entries(entries).length === 0) {
32369
32636
  lintMessage({
32370
32637
  file: relativePath2,
32371
- name: `Bare module specifier import ${c15.bold(
32372
- c15.cyan(`'${module}'`)
32638
+ name: `Bare module specifier import ${c14.bold(
32639
+ c14.cyan(`'${module}'`)
32373
32640
  )} is not mapped by the import map`,
32374
32641
  description: `The project package.json file doesn't define any entry points in its "exports" field. Try adding one.`,
32375
32642
  code: {
32376
- title: `To map import ${c15.cyan(`'${projectConfig.name}'`)} in package.json:`,
32643
+ title: `To map import ${c14.cyan(`'${projectConfig.name}'`)} in package.json:`,
32377
32644
  snippet: `
32378
32645
  "exports": {
32379
32646
  ".": "./entrypoint.js"
@@ -32384,14 +32651,14 @@ ${error2.snippet}`
32384
32651
  } else if (!Object.entries(entries).some((mod) => mod[0] === module)) {
32385
32652
  lintMessage({
32386
32653
  file: relativePath2,
32387
- name: `Bare module specifier import ${c15.bold(
32388
- c15.cyan(`'${module}'`)
32654
+ name: `Bare module specifier import ${c14.bold(
32655
+ c14.cyan(`'${module}'`)
32389
32656
  )} is not mapped by the import map`,
32390
32657
  description: `To fix, either add it as an entry point exportor make sure to only import one of the defined entry points from the package.json.`,
32391
32658
  code: printedAvailableExports ? void 0 : Object.entries(entries).length > 0 ? {
32392
32659
  title: "Available package.json entry points:",
32393
32660
  snippet: Object.entries(entries).map(
32394
- ([impt, modules]) => `${c15.green(impt)} \u2192 ${modules.map((m) => c15.cyan(m)).join(", ")}`
32661
+ ([impt, modules]) => `${c14.green(impt)} \u2192 ${modules.map((m) => c14.cyan(m)).join(", ")}`
32395
32662
  ).join("\n")
32396
32663
  } : {
32397
32664
  title: "package.json:",
@@ -32428,27 +32695,27 @@ ${error2.snippet}`
32428
32695
  });
32429
32696
  server.listen(port, async () => {
32430
32697
  console.log("");
32431
- console.log(`${c15.blue("App name: ")} ${c15.dim(name)}`);
32432
- console.log(`${c15.blue("Server URL: ")} ${c15.bold(serverUrl)}`);
32433
- console.log(`${c15.blue("Serving Path: ")} ${c15.dim(resolvedDir)}`);
32698
+ console.log(`${c14.blue("App name: ")} ${c14.dim(name)}`);
32699
+ console.log(`${c14.blue("Server URL: ")} ${c14.bold(serverUrl)}`);
32700
+ console.log(`${c14.blue("Serving Path: ")} ${c14.dim(resolvedDir)}`);
32434
32701
  if (!flags.static) {
32435
32702
  console.log(
32436
- `${c15.blue("Watcher: ")} ${c15.dim(
32703
+ `${c14.blue("Watcher: ")} ${c14.dim(
32437
32704
  `Enabled (pass --no-watch to disable)${flags.install ? ", reinstalling importmap.js on changes with hot reloading" : " for hot reloading only"}`
32438
32705
  )}`
32439
32706
  );
32440
32707
  } else {
32441
- console.log(`${c15.blue("Watcher: ")} ${c15.dim("Disabled")}`);
32708
+ console.log(`${c14.blue("Watcher: ")} ${c14.dim("Disabled")}`);
32442
32709
  }
32443
32710
  if (flags.typeStripping) {
32444
32711
  console.log(
32445
- `${c15.blue("Middleware: ")} ${c15.dim(
32712
+ `${c14.blue("Middleware: ")} ${c14.dim(
32446
32713
  `TypeScript type stripping${!flags.static ? ", hot reloading via importmap.js injection" : ", importmap.js unmodified"}`
32447
32714
  )}`
32448
32715
  );
32449
32716
  } else {
32450
32717
  console.log(
32451
- `${c15.blue("Middleware: ")} ${c15.dim(
32718
+ `${c14.blue("Middleware: ")} ${c14.dim(
32452
32719
  `Type stripping disabled${!flags.static ? ", hot reloading via importmap.js injection" : " - the server is performing no content modifications"}`
32453
32720
  )}`
32454
32721
  );
@@ -32462,7 +32729,7 @@ ${error2.snippet}`
32462
32729
  console.log("");
32463
32730
  } catch (e) {
32464
32731
  stopSpinner();
32465
- console.error(`${c15.red("Install Error:")} `, e instanceof JspmError ? e.message : e);
32732
+ console.error(`${c14.red("Install Error:")} `, e instanceof JspmError ? e.message : e);
32466
32733
  return null;
32467
32734
  }
32468
32735
  if (!result)
@@ -32526,7 +32793,7 @@ ${error2.snippet}`
32526
32793
  hideShortcuts2();
32527
32794
  const displayPath = relative4(resolvedDir, changes[0]).replace(/\\/g, "/");
32528
32795
  console.log(
32529
- `${c15.blue("Watch:")} ${changes.length > 1 ? `${changes.length} files changed` : `${displayPath} changed`}`
32796
+ `${c14.blue("Watch:")} ${changes.length > 1 ? `${changes.length} files changed` : `${displayPath} changed`}`
32530
32797
  );
32531
32798
  let newMap;
32532
32799
  if (generateMap && (mapError || changes.some(
@@ -32554,10 +32821,10 @@ ${error2.snippet}`
32554
32821
  }
32555
32822
  }, 500);
32556
32823
  }
32557
- console.log(`${c15.magenta(c15.bold("Keyboard shortcuts:"))}
32558
- \u2192 ${c15.bold(c15.bgBlueBright(c15.whiteBright(" o ")))} ${c15.dim("Open server URL in the browser")}`);
32824
+ console.log(`${c14.magenta(c14.bold("Keyboard shortcuts:"))}
32825
+ \u2192 ${c14.bold(c14.bgBlueBright(c14.whiteBright(" o ")))} ${c14.dim("Open server URL in the browser")}`);
32559
32826
  console.log(
32560
- ` \u2192 ${c15.bold(c15.bgBlueBright(c15.whiteBright(" q ")))} ${c15.dim("Stop server (or Ctrl+C)")}`
32827
+ ` \u2192 ${c14.bold(c14.bgBlueBright(c14.whiteBright(" q ")))} ${c14.dim("Stop server (or Ctrl+C)")}`
32561
32828
  );
32562
32829
  console.log("");
32563
32830
  showShortcuts2(serverUrl, !flags.static);
@@ -32574,7 +32841,7 @@ ${error2.snippet}`
32574
32841
  const cleanExit = () => {
32575
32842
  hideShortcuts2();
32576
32843
  console.log(`
32577
- ${c15.blue("Info:")} Server stopped`);
32844
+ ${c14.blue("Info:")} Server stopped`);
32578
32845
  process.exit(0);
32579
32846
  };
32580
32847
  process.on("SIGINT", cleanExit);
@@ -32608,7 +32875,7 @@ init_logger();
32608
32875
  init_init();
32609
32876
  import { relative as relative5 } from "node:path";
32610
32877
  import { getPackageConfig, lookup } from "@jspm/generator";
32611
- import c16 from "picocolors";
32878
+ import c15 from "picocolors";
32612
32879
  async function listCurrentProjectExports(flags) {
32613
32880
  try {
32614
32881
  const projectDir = flags.dir || process.cwd();
@@ -32616,12 +32883,12 @@ async function listCurrentProjectExports(flags) {
32616
32883
  quiet: flags.quiet,
32617
32884
  dir: projectDir
32618
32885
  });
32619
- !flags.quiet && startSpinner(`Scanning exports for current project: ${c16.bold(projectConfig.name)}...`);
32886
+ !flags.quiet && startSpinner(`Scanning exports for current project: ${c15.bold(projectConfig.name)}...`);
32620
32887
  if (!projectConfig.exports) {
32621
32888
  stopSpinner();
32622
32889
  !flags.quiet && console.log(
32623
32890
  `
32624
- ${c16.yellow("Warning:")} Project "${projectConfig.name}" has no exports defined in package.json.`
32891
+ ${c15.yellow("Warning:")} Project "${projectConfig.name}" has no exports defined in package.json.`
32625
32892
  );
32626
32893
  return;
32627
32894
  }
@@ -32640,20 +32907,20 @@ ${c16.yellow("Warning:")} Project "${projectConfig.name}" has no exports defined
32640
32907
  );
32641
32908
  stopSpinner();
32642
32909
  console.log(
32643
- `${c16.bold("Package")}: ${c16.bold(projectConfig.name)}@${c16.bold(
32910
+ `${c15.bold("Package")}: ${c15.bold(projectConfig.name)}@${c15.bold(
32644
32911
  projectConfig.version || "local"
32645
32912
  )}`
32646
32913
  );
32647
32914
  if (!flags.quiet) {
32648
32915
  if (projectConfig.description) {
32649
- console.log(`${c16.bold("Description:")} ${projectConfig.description}`);
32916
+ console.log(`${c15.bold("Description:")} ${projectConfig.description}`);
32650
32917
  }
32651
32918
  if (projectConfig.license) {
32652
- console.log(`${c16.bold("License:")} ${c16.yellow(projectConfig.license)}`);
32919
+ console.log(`${c15.bold("License:")} ${c15.yellow(projectConfig.license)}`);
32653
32920
  }
32654
32921
  }
32655
32922
  !flags.quiet && console.log(`
32656
- ${c16.bold(c16.black(`Current Project Exports`))}`);
32923
+ ${c15.bold(c15.black(`Current Project Exports`))}`);
32657
32924
  const exportEntries = Object.entries(entries);
32658
32925
  let displayedEntries = 0;
32659
32926
  const limit = flags.limit ? parseInt(flags.limit.toString()) : 20;
@@ -32665,8 +32932,8 @@ ${c16.bold(c16.black(`Current Project Exports`))}`);
32665
32932
  if (displayedEntries >= limit) {
32666
32933
  break;
32667
32934
  }
32668
- const formattedSubpath = c16.green(subpath);
32669
- const formattedTarget = c16.cyan(filePaths.join(", "));
32935
+ const formattedSubpath = c15.green(subpath);
32936
+ const formattedTarget = c15.cyan(filePaths.join(", "));
32670
32937
  !flags.quiet && console.log(`${formattedSubpath} \u2192 ${formattedTarget}`);
32671
32938
  displayedEntries++;
32672
32939
  }
@@ -32674,13 +32941,13 @@ ${c16.bold(c16.black(`Current Project Exports`))}`);
32674
32941
  const remainingCount = totalFilteredCount - displayedEntries;
32675
32942
  !flags.quiet && console.log(
32676
32943
  `
32677
- ${c16.yellow("...")}${c16.bold(remainingCount)} more ${remainingCount === 1 ? "item" : "items"} (use ${c16.cyan("--filter")} or ${c16.cyan("--limit")} to extend listing)`
32944
+ ${c15.yellow("...")}${c15.bold(remainingCount)} more ${remainingCount === 1 ? "item" : "items"} (use ${c15.cyan("--filter")} or ${c15.cyan("--limit")} to extend listing)`
32678
32945
  );
32679
32946
  } else if (flags.filter && displayedEntries === 0) {
32680
- !flags.quiet && console.log(`${c16.yellow("No exports match the filter:")} ${flags.filter}`);
32947
+ !flags.quiet && console.log(`${c15.yellow("No exports match the filter:")} ${flags.filter}`);
32681
32948
  } else if (displayedEntries === 0) {
32682
32949
  !flags.quiet && console.log(
32683
- `${c16.yellow(
32950
+ `${c15.yellow(
32684
32951
  "Note:"
32685
32952
  )} Project has exports defined but they may not match any files in the project or are not in the expected format.`
32686
32953
  );
@@ -32701,7 +32968,7 @@ async function ls(packageSpec, flags) {
32701
32968
  }
32702
32969
  log2(`Listing package exports for: ${packageSpec}`);
32703
32970
  try {
32704
- !flags.quiet && startSpinner(`Looking up package ${c16.bold(packageSpec)}...`);
32971
+ !flags.quiet && startSpinner(`Looking up package ${c15.bold(packageSpec)}...`);
32705
32972
  const lookupOptions = flags.provider ? { provider: flags.provider } : {};
32706
32973
  const lookupResult = await lookup(packageSpec, lookupOptions);
32707
32974
  if (!lookupResult || !lookupResult.resolved) {
@@ -32716,17 +32983,17 @@ async function ls(packageSpec, flags) {
32716
32983
  throw new JspmError(`Package "${packageSpec}" found but failed to fetch its configuration`);
32717
32984
  }
32718
32985
  console.log(
32719
- `${c16.bold("Package")}: ${c16.bold(resolvedPackage.name)}@${c16.bold(resolvedPackage.version)}`
32986
+ `${c15.bold("Package")}: ${c15.bold(resolvedPackage.name)}@${c15.bold(resolvedPackage.version)}`
32720
32987
  );
32721
32988
  if (!flags.quiet) {
32722
32989
  if (pjson.description) {
32723
- console.log(`${c16.bold("Description:")} ${pjson.description}`);
32990
+ console.log(`${c15.bold("Description:")} ${pjson.description}`);
32724
32991
  }
32725
32992
  if (pjson.license) {
32726
- console.log(`${c16.bold("License:")} ${c16.yellow(pjson.license)}`);
32993
+ console.log(`${c15.bold("License:")} ${c15.yellow(pjson.license)}`);
32727
32994
  }
32728
32995
  if (pjson.homepage) {
32729
- console.log(`${c16.bold("Homepage:")} ${c16.blue(pjson.homepage)}`);
32996
+ console.log(`${c15.bold("Homepage:")} ${c15.blue(pjson.homepage)}`);
32730
32997
  }
32731
32998
  if (pjson.repository) {
32732
32999
  let repoUrl = "";
@@ -32737,19 +33004,19 @@ async function ls(packageSpec, flags) {
32737
33004
  }
32738
33005
  if (repoUrl) {
32739
33006
  repoUrl = repoUrl.replace(/^git\+|\.git$/g, "").replace("git://", "https://").replace("git@github.com:", "https://github.com/");
32740
- console.log(`${c16.bold("Repository:")} ${c16.blue(repoUrl)}`);
33007
+ console.log(`${c15.bold("Repository:")} ${c15.blue(repoUrl)}`);
32741
33008
  }
32742
33009
  }
32743
33010
  }
32744
33011
  if (!pjson.exports) {
32745
33012
  !flags.quiet && console.log(
32746
33013
  `
32747
- ${c16.yellow("Warning:")} Package "${resolvedPackage.name}@${resolvedPackage.version}" has no exports defined.`
33014
+ ${c15.yellow("Warning:")} Package "${resolvedPackage.name}@${resolvedPackage.version}" has no exports defined.`
32748
33015
  );
32749
33016
  return;
32750
33017
  }
32751
33018
  !flags.quiet && console.log(`
32752
- ${c16.bold(c16.black(`Package Exports`))}`);
33019
+ ${c15.bold(c15.black(`Package Exports`))}`);
32753
33020
  const exportEntries = typeof pjson.exports === "string" || typeof pjson.exports === "object" && pjson.exports !== null && Object.keys(pjson.exports).every((expt) => !expt.startsWith(".")) ? [".", pjson.exports] : Object.entries(pjson.exports);
32754
33021
  let displayedEntries = 0;
32755
33022
  const limit = flags.limit ? parseInt(flags.limit.toString()) : 20;
@@ -32761,8 +33028,8 @@ ${c16.bold(c16.black(`Package Exports`))}`);
32761
33028
  if (displayedEntries >= limit) {
32762
33029
  break;
32763
33030
  }
32764
- const formattedSubpath = c16.green(subpath);
32765
- const formattedTarget = c16.cyan(JSON.stringify(target, null, 2));
33031
+ const formattedSubpath = c15.green(subpath);
33032
+ const formattedTarget = c15.cyan(JSON.stringify(target, null, 2));
32766
33033
  !flags.quiet && console.log(`${formattedSubpath} \u2192 ${formattedTarget}`);
32767
33034
  displayedEntries++;
32768
33035
  }
@@ -32770,13 +33037,13 @@ ${c16.bold(c16.black(`Package Exports`))}`);
32770
33037
  const remainingCount = totalFilteredCount - displayedEntries;
32771
33038
  !flags.quiet && console.log(
32772
33039
  `
32773
- ${c16.yellow("...")}${c16.bold(remainingCount)} more ${remainingCount === 1 ? "item" : "items"} (use ${c16.cyan("--filter")} or ${c16.cyan("--limit")} to extend listing)`
33040
+ ${c15.yellow("...")}${c15.bold(remainingCount)} more ${remainingCount === 1 ? "item" : "items"} (use ${c15.cyan("--filter")} or ${c15.cyan("--limit")} to extend listing)`
32774
33041
  );
32775
33042
  } else if (flags.filter && displayedEntries === 0) {
32776
- !flags.quiet && console.log(`${c16.yellow("No exports match the filter:")} ${flags.filter}`);
33043
+ !flags.quiet && console.log(`${c15.yellow("No exports match the filter:")} ${flags.filter}`);
32777
33044
  } else if (displayedEntries === 0) {
32778
33045
  !flags.quiet && console.log(
32779
- `${c16.yellow(
33046
+ `${c15.yellow(
32780
33047
  "Note:"
32781
33048
  )} Package has exports defined but they are not in the expected format.`
32782
33049
  );
@@ -32794,7 +33061,7 @@ ${c16.yellow("...")}${c16.bold(remainingCount)} more ${remainingCount === 1 ? "i
32794
33061
  // src/cli.ts
32795
33062
  init_init();
32796
33063
  var { version: version2 } = JSON.parse(readFileSync3(new URL("../package.json", import.meta.url), "utf8"));
32797
- var cli = dist_default(c17.yellow("jspm"));
33064
+ var cli = dist_default(c16.yellow("jspm"));
32798
33065
  var generateOpts = (cac2, release = false) => cac2.option(
32799
33066
  "-m, --map <file>",
32800
33067
  "File containing initial import map (defaults to importmap.json, supports .js with a JSON import map embedded, or HTML with an inline import map)",
@@ -32976,23 +33243,13 @@ Enhanced Security and Performance:
32976
33243
  - Use --preload to generate preload link tags when using HTML output, improving load performance
32977
33244
  - Preload supports both "static" (explicit imports) and "dynamic" (conditional imports) modes`
32978
33245
  ).action(wrapCommand(install));
32979
- outputOpts(generateOpts(cli.command("update [...packages]", "Update packages").alias("upgrade"))).example(
33246
+ outputOpts(generateOpts(cli.command("update", "Update packages").alias("upgrade"))).example(
32980
33247
  (name) => `
32981
- $ ${name} update react-dom
33248
+ $ ${name} update
32982
33249
 
32983
- Update the react-dom package.
33250
+ Update all resolutions.
32984
33251
  `
32985
- ).usage(
32986
- `update [flags] [...packages]
32987
-
32988
- Updates packages in an import map to the latest versions that are compatible with the local "package.json". The given packages must be valid package specifiers, such as "npm:react@18.0.0", "denoland:oak" or "lit", and must be present in the initial import map.
32989
-
32990
- Import Map Handling:
32991
- - Takes an input import map (--map) and produces an updated output map (--out)
32992
- - Only specified packages are updated; all other mappings remain unchanged
32993
- - Works with the same map formats as install (JSON, JS, HTML)
32994
- - If no packages are specified, attempts to update all top-level imports`
32995
- ).action(wrapCommand(update));
33252
+ ).usage(`update [flags]`).action(wrapCommand((flags) => install(flags, true)));
32996
33253
  outputOpts(
32997
33254
  generateOpts(
32998
33255
  cli.command("serve", "Start a local development server").option("-p, --port <number>", "Port to run the server on", {
@@ -33115,7 +33372,7 @@ optionally using the JSPM overrides for these via the "jspm" property in the pac
33115
33372
  Any build import map shoud be generated separately via a subsequent install operation on the
33116
33373
  build folder, for example like:
33117
33374
 
33118
- ${c17.bold("jspm install -d dist -C production --flatten-scopes --combine-subpaths")}
33375
+ ${c16.bold("jspm install -d dist -C production --flatten-scopes --combine-subpaths")}
33119
33376
 
33120
33377
  to generate an optimized production map.
33121
33378
  `
@@ -33176,6 +33433,11 @@ Download the application package foo@bar into the folder foo, merging its import
33176
33433
 
33177
33434
  Manages publishes to the JSPM providers, currently in experimental preview.
33178
33435
 
33436
+ WARNING: jspm publish is experimental and should only be used for prototyping.
33437
+ Unlike the https://ga.jspm.io/ CDN which is stable, reliability guarantees are
33438
+ not provided for publishing on https://jspm.io/. For reliable package delivery,
33439
+ use npm publish \u2014 all npm packages are available on the https://ga.jspm.io/ CDN.
33440
+
33179
33441
  For publishing (default):
33180
33442
 
33181
33443
  jspm publish
@@ -33303,14 +33565,14 @@ function defaultHelpCb(helpSections) {
33303
33565
  return [];
33304
33566
  }
33305
33567
  helpSections[0].body = `
33306
- ${c17.yellowBright("\u25A3 ")}${c17.bold(
33307
- c17.whiteBright(" JSPM ")
33308
- )} - ${c17.whiteBright("Import Map Package Management")}`;
33568
+ ${c16.yellowBright("\u25A3 ")}${c16.bold(
33569
+ c16.whiteBright(" JSPM ")
33570
+ )} - ${c16.whiteBright("Import Map Package Management")}`;
33309
33571
  for (const section of Object.values(helpSections)) {
33310
33572
  if (section.title?.startsWith("For more info")) {
33311
33573
  section.title = "";
33312
- section.body = `${c17.bold(
33313
- `For more info on a specific command <cmd>, ${c17.yellow("jspm <cmd> --help")} flag.`
33574
+ section.body = `${c16.bold(
33575
+ `For more info on a specific command <cmd>, ${c16.yellow("jspm <cmd> --help")} flag.`
33314
33576
  )}`;
33315
33577
  }
33316
33578
  if (section.title === "Options") {
@@ -33329,7 +33591,7 @@ ${c17.yellowBright("\u25A3 ")}${c17.bold(
33329
33591
  }
33330
33592
  for (const section of Object.values(helpSections)) {
33331
33593
  if (section.title)
33332
- section.title = c17.bold(section.title);
33594
+ section.title = c16.bold(section.title);
33333
33595
  }
33334
33596
  return helpSections;
33335
33597
  }