@stencil/core 4.43.2-dev.1773120108.778b0cd → 4.43.2-dev.1773293109.9080c9d

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/cli/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- Stencil CLI v4.43.2-dev.1773120108.778b0cd | MIT Licensed | https://stenciljs.com
2
+ Stencil CLI v4.43.2-dev.1773293109.9080c9d | MIT Licensed | https://stenciljs.com
3
3
  */
4
4
  var __create = Object.create;
5
5
  var __defProp = Object.defineProperty;
@@ -3053,8 +3053,35 @@ var unescape = (s, { windowsPathsNoEscape = false } = {}) => {
3053
3053
  };
3054
3054
 
3055
3055
  // node_modules/minimatch/dist/esm/ast.js
3056
+ var _a;
3056
3057
  var types = /* @__PURE__ */ new Set(["!", "?", "+", "*", "@"]);
3057
3058
  var isExtglobType = (c) => types.has(c);
3059
+ var isExtglobAST = (c) => isExtglobType(c.type);
3060
+ var adoptionMap = /* @__PURE__ */ new Map([
3061
+ ["!", ["@"]],
3062
+ ["?", ["?", "@"]],
3063
+ ["@", ["@"]],
3064
+ ["*", ["*", "+", "?", "@"]],
3065
+ ["+", ["+", "@"]]
3066
+ ]);
3067
+ var adoptionWithSpaceMap = /* @__PURE__ */ new Map([
3068
+ ["!", ["?"]],
3069
+ ["@", ["?"]],
3070
+ ["+", ["?", "*"]]
3071
+ ]);
3072
+ var adoptionAnyMap = /* @__PURE__ */ new Map([
3073
+ ["!", ["?", "@"]],
3074
+ ["?", ["?", "@"]],
3075
+ ["@", ["?", "@"]],
3076
+ ["*", ["*", "+", "?", "@"]],
3077
+ ["+", ["+", "@", "?", "*"]]
3078
+ ]);
3079
+ var usurpMap = /* @__PURE__ */ new Map([
3080
+ ["!", /* @__PURE__ */ new Map([["!", "@"]])],
3081
+ ["?", /* @__PURE__ */ new Map([["*", "*"], ["+", "*"]])],
3082
+ ["@", /* @__PURE__ */ new Map([["!", "!"], ["?", "?"], ["@", "@"], ["*", "*"], ["+", "+"]])],
3083
+ ["+", /* @__PURE__ */ new Map([["?", "*"], ["*", "*"]])]
3084
+ ]);
3058
3085
  var startNoTraversal = "(?!(?:^|/)\\.\\.?(?:$|/))";
3059
3086
  var startNoDot = "(?!\\.)";
3060
3087
  var addPatternStart = /* @__PURE__ */ new Set(["[", "."]);
@@ -3064,8 +3091,8 @@ var regExpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
3064
3091
  var qmark = "[^/]";
3065
3092
  var star = qmark + "*?";
3066
3093
  var starNoEmpty = qmark + "+?";
3067
- var _root, _hasMagic, _uflag, _parts, _parent, _parentIndex, _negs, _filledNegs, _options, _toString, _emptyExt, _AST_instances, fillNegs_fn, _AST_static, parseAST_fn, partsToRegExp_fn, parseGlob_fn;
3068
- var _AST = class _AST {
3094
+ var _root, _hasMagic, _uflag, _parts, _parent, _parentIndex, _negs, _filledNegs, _options, _toString, _emptyExt, _AST_instances, fillNegs_fn, _AST_static, parseAST_fn, canAdoptWithSpace_fn, canAdopt_fn, canAdoptType_fn, adoptWithSpace_fn, adopt_fn, canUsurpType_fn, canUsurp_fn, usurp_fn, flatten_fn, partsToRegExp_fn, parseGlob_fn;
3095
+ var AST = class {
3069
3096
  constructor(type, parent, options = {}) {
3070
3097
  __privateAdd(this, _AST_instances);
3071
3098
  __publicField(this, "type");
@@ -3118,44 +3145,44 @@ var _AST = class _AST {
3118
3145
  for (const p of parts) {
3119
3146
  if (p === "")
3120
3147
  continue;
3121
- if (typeof p !== "string" && !(p instanceof _AST && __privateGet(p, _parent) === this)) {
3148
+ if (typeof p !== "string" && !(p instanceof _a && __privateGet(p, _parent) === this)) {
3122
3149
  throw new Error("invalid part: " + p);
3123
3150
  }
3124
3151
  __privateGet(this, _parts).push(p);
3125
3152
  }
3126
3153
  }
3127
3154
  toJSON() {
3128
- var _a;
3155
+ var _a2;
3129
3156
  const ret = this.type === null ? __privateGet(this, _parts).slice().map((p) => typeof p === "string" ? p : p.toJSON()) : [this.type, ...__privateGet(this, _parts).map((p) => p.toJSON())];
3130
3157
  if (this.isStart() && !this.type)
3131
3158
  ret.unshift([]);
3132
- if (this.isEnd() && (this === __privateGet(this, _root) || __privateGet(__privateGet(this, _root), _filledNegs) && ((_a = __privateGet(this, _parent)) == null ? void 0 : _a.type) === "!")) {
3159
+ if (this.isEnd() && (this === __privateGet(this, _root) || __privateGet(__privateGet(this, _root), _filledNegs) && ((_a2 = __privateGet(this, _parent)) == null ? void 0 : _a2.type) === "!")) {
3133
3160
  ret.push({});
3134
3161
  }
3135
3162
  return ret;
3136
3163
  }
3137
3164
  isStart() {
3138
- var _a;
3165
+ var _a2;
3139
3166
  if (__privateGet(this, _root) === this)
3140
3167
  return true;
3141
- if (!((_a = __privateGet(this, _parent)) == null ? void 0 : _a.isStart()))
3168
+ if (!((_a2 = __privateGet(this, _parent)) == null ? void 0 : _a2.isStart()))
3142
3169
  return false;
3143
3170
  if (__privateGet(this, _parentIndex) === 0)
3144
3171
  return true;
3145
3172
  const p = __privateGet(this, _parent);
3146
3173
  for (let i = 0; i < __privateGet(this, _parentIndex); i++) {
3147
3174
  const pp = __privateGet(p, _parts)[i];
3148
- if (!(pp instanceof _AST && pp.type === "!")) {
3175
+ if (!(pp instanceof _a && pp.type === "!")) {
3149
3176
  return false;
3150
3177
  }
3151
3178
  }
3152
3179
  return true;
3153
3180
  }
3154
3181
  isEnd() {
3155
- var _a, _b, _c;
3182
+ var _a2, _b, _c;
3156
3183
  if (__privateGet(this, _root) === this)
3157
3184
  return true;
3158
- if (((_a = __privateGet(this, _parent)) == null ? void 0 : _a.type) === "!")
3185
+ if (((_a2 = __privateGet(this, _parent)) == null ? void 0 : _a2.type) === "!")
3159
3186
  return true;
3160
3187
  if (!((_b = __privateGet(this, _parent)) == null ? void 0 : _b.isEnd()))
3161
3188
  return false;
@@ -3171,16 +3198,16 @@ var _AST = class _AST {
3171
3198
  this.push(part.clone(this));
3172
3199
  }
3173
3200
  clone(parent) {
3174
- const c = new _AST(this.type, parent);
3201
+ const c = new _a(this.type, parent);
3175
3202
  for (const p of __privateGet(this, _parts)) {
3176
3203
  c.copyIn(p);
3177
3204
  }
3178
3205
  return c;
3179
3206
  }
3180
3207
  static fromGlob(pattern, options = {}) {
3181
- var _a;
3182
- const ast = new _AST(null, void 0, options);
3183
- __privateMethod(_a = _AST, _AST_static, parseAST_fn).call(_a, pattern, ast, 0, options);
3208
+ var _a2;
3209
+ const ast = new _a(null, void 0, options);
3210
+ __privateMethod(_a2 = _a, _AST_static, parseAST_fn).call(_a2, pattern, ast, 0, options, 0);
3184
3211
  return ast;
3185
3212
  }
3186
3213
  // returns the regular expression if there's magic, or the unescaped
@@ -3273,15 +3300,17 @@ var _AST = class _AST {
3273
3300
  // is ^(?!\.), we can just prepend (?!\.) to the pattern (either root
3274
3301
  // or start or whatever) and prepend ^ or / at the Regexp construction.
3275
3302
  toRegExpSource(allowDot) {
3276
- var _a;
3303
+ var _a2;
3277
3304
  const dot = allowDot != null ? allowDot : !!__privateGet(this, _options).dot;
3278
- if (__privateGet(this, _root) === this)
3305
+ if (__privateGet(this, _root) === this) {
3306
+ __privateMethod(this, _AST_instances, flatten_fn).call(this);
3279
3307
  __privateMethod(this, _AST_instances, fillNegs_fn).call(this);
3280
- if (!this.type) {
3308
+ }
3309
+ if (!isExtglobAST(this)) {
3281
3310
  const noEmpty = this.isStart() && this.isEnd();
3282
3311
  const src = __privateGet(this, _parts).map((p) => {
3283
- var _a2;
3284
- const [re, _, hasMagic, uflag] = typeof p === "string" ? __privateMethod(_a2 = _AST, _AST_static, parseGlob_fn).call(_a2, p, __privateGet(this, _hasMagic), noEmpty) : p.toRegExpSource(allowDot);
3312
+ var _a3;
3313
+ const [re, _, hasMagic, uflag] = typeof p === "string" ? __privateMethod(_a3 = _a, _AST_static, parseGlob_fn).call(_a3, p, __privateGet(this, _hasMagic), noEmpty) : p.toRegExpSource(allowDot);
3285
3314
  __privateSet(this, _hasMagic, __privateGet(this, _hasMagic) || hasMagic);
3286
3315
  __privateSet(this, _uflag, __privateGet(this, _uflag) || uflag);
3287
3316
  return re;
@@ -3304,7 +3333,7 @@ var _AST = class _AST {
3304
3333
  }
3305
3334
  }
3306
3335
  let end = "";
3307
- if (this.isEnd() && __privateGet(__privateGet(this, _root), _filledNegs) && ((_a = __privateGet(this, _parent)) == null ? void 0 : _a.type) === "!") {
3336
+ if (this.isEnd() && __privateGet(__privateGet(this, _root), _filledNegs) && ((_a2 = __privateGet(this, _parent)) == null ? void 0 : _a2.type) === "!") {
3308
3337
  end = "(?:$|\\/)";
3309
3338
  }
3310
3339
  const final2 = start2 + src + end;
@@ -3320,9 +3349,10 @@ var _AST = class _AST {
3320
3349
  let body = __privateMethod(this, _AST_instances, partsToRegExp_fn).call(this, dot);
3321
3350
  if (this.isStart() && this.isEnd() && !body && this.type !== "!") {
3322
3351
  const s = this.toString();
3323
- __privateSet(this, _parts, [s]);
3324
- this.type = null;
3325
- __privateSet(this, _hasMagic, void 0);
3352
+ const me = this;
3353
+ __privateSet(me, _parts, [s]);
3354
+ me.type = null;
3355
+ __privateSet(me, _hasMagic, void 0);
3326
3356
  return [s, unescape(this.toString()), false, false];
3327
3357
  }
3328
3358
  let bodyDotAllowed = !repeated || allowDot || dot || !startNoDot ? "" : __privateMethod(this, _AST_instances, partsToRegExp_fn).call(this, true);
@@ -3391,8 +3421,9 @@ fillNegs_fn = function() {
3391
3421
  return this;
3392
3422
  };
3393
3423
  _AST_static = new WeakSet();
3394
- parseAST_fn = function(str, ast, pos, opt) {
3395
- var _a, _b;
3424
+ parseAST_fn = function(str, ast, pos, opt, extDepth) {
3425
+ var _a2, _b, _c, _d, _e;
3426
+ const maxDepth = (_a2 = opt.maxExtglobRecursion) != null ? _a2 : 2;
3396
3427
  let escaping = false;
3397
3428
  let inBrace = false;
3398
3429
  let braceStart = -1;
@@ -3424,11 +3455,12 @@ parseAST_fn = function(str, ast, pos, opt) {
3424
3455
  acc2 += c;
3425
3456
  continue;
3426
3457
  }
3427
- if (!opt.noext && isExtglobType(c) && str.charAt(i2) === "(") {
3458
+ const doRecurse = !opt.noext && isExtglobType(c) && str.charAt(i2) === "(" && extDepth <= maxDepth;
3459
+ if (doRecurse) {
3428
3460
  ast.push(acc2);
3429
3461
  acc2 = "";
3430
- const ext2 = new _AST(c, ast);
3431
- i2 = __privateMethod(_a = _AST, _AST_static, parseAST_fn).call(_a, str, ext2, i2, opt);
3462
+ const ext2 = new _a(c, ast);
3463
+ i2 = __privateMethod(_b = _a, _AST_static, parseAST_fn).call(_b, str, ext2, i2, opt, extDepth + 1);
3432
3464
  ast.push(ext2);
3433
3465
  continue;
3434
3466
  }
@@ -3438,7 +3470,7 @@ parseAST_fn = function(str, ast, pos, opt) {
3438
3470
  return i2;
3439
3471
  }
3440
3472
  let i = pos + 1;
3441
- let part = new _AST(null, ast);
3473
+ let part = new _a(null, ast);
3442
3474
  const parts = [];
3443
3475
  let acc = "";
3444
3476
  while (i < str.length) {
@@ -3465,19 +3497,22 @@ parseAST_fn = function(str, ast, pos, opt) {
3465
3497
  acc += c;
3466
3498
  continue;
3467
3499
  }
3468
- if (isExtglobType(c) && str.charAt(i) === "(") {
3500
+ const doRecurse = isExtglobType(c) && str.charAt(i) === "(" && /* c8 ignore start - the maxDepth is sufficient here */
3501
+ (extDepth <= maxDepth || ast && __privateMethod(_c = ast, _AST_instances, canAdoptType_fn).call(_c, c));
3502
+ if (doRecurse) {
3503
+ const depthAdd = ast && __privateMethod(_d = ast, _AST_instances, canAdoptType_fn).call(_d, c) ? 0 : 1;
3469
3504
  part.push(acc);
3470
3505
  acc = "";
3471
- const ext2 = new _AST(c, part);
3506
+ const ext2 = new _a(c, part);
3472
3507
  part.push(ext2);
3473
- i = __privateMethod(_b = _AST, _AST_static, parseAST_fn).call(_b, str, ext2, i, opt);
3508
+ i = __privateMethod(_e = _a, _AST_static, parseAST_fn).call(_e, str, ext2, i, opt, extDepth + depthAdd);
3474
3509
  continue;
3475
3510
  }
3476
3511
  if (c === "|") {
3477
3512
  part.push(acc);
3478
3513
  acc = "";
3479
3514
  parts.push(part);
3480
- part = new _AST(null, ast);
3515
+ part = new _a(null, ast);
3481
3516
  continue;
3482
3517
  }
3483
3518
  if (c === ")") {
@@ -3496,6 +3531,100 @@ parseAST_fn = function(str, ast, pos, opt) {
3496
3531
  __privateSet(ast, _parts, [str.substring(pos - 1)]);
3497
3532
  return i;
3498
3533
  };
3534
+ canAdoptWithSpace_fn = function(child) {
3535
+ return __privateMethod(this, _AST_instances, canAdopt_fn).call(this, child, adoptionWithSpaceMap);
3536
+ };
3537
+ canAdopt_fn = function(child, map2 = adoptionMap) {
3538
+ if (!child || typeof child !== "object" || child.type !== null || __privateGet(child, _parts).length !== 1 || this.type === null) {
3539
+ return false;
3540
+ }
3541
+ const gc = __privateGet(child, _parts)[0];
3542
+ if (!gc || typeof gc !== "object" || gc.type === null) {
3543
+ return false;
3544
+ }
3545
+ return __privateMethod(this, _AST_instances, canAdoptType_fn).call(this, gc.type, map2);
3546
+ };
3547
+ canAdoptType_fn = function(c, map2 = adoptionAnyMap) {
3548
+ var _a2;
3549
+ return !!((_a2 = map2.get(this.type)) == null ? void 0 : _a2.includes(c));
3550
+ };
3551
+ adoptWithSpace_fn = function(child, index) {
3552
+ const gc = __privateGet(child, _parts)[0];
3553
+ const blank = new _a(null, gc, this.options);
3554
+ __privateGet(blank, _parts).push("");
3555
+ gc.push(blank);
3556
+ __privateMethod(this, _AST_instances, adopt_fn).call(this, child, index);
3557
+ };
3558
+ adopt_fn = function(child, index) {
3559
+ const gc = __privateGet(child, _parts)[0];
3560
+ __privateGet(this, _parts).splice(index, 1, ...__privateGet(gc, _parts));
3561
+ for (const p of __privateGet(gc, _parts)) {
3562
+ if (typeof p === "object")
3563
+ __privateSet(p, _parent, this);
3564
+ }
3565
+ __privateSet(this, _toString, void 0);
3566
+ };
3567
+ canUsurpType_fn = function(c) {
3568
+ const m = usurpMap.get(this.type);
3569
+ return !!(m == null ? void 0 : m.has(c));
3570
+ };
3571
+ canUsurp_fn = function(child) {
3572
+ if (!child || typeof child !== "object" || child.type !== null || __privateGet(child, _parts).length !== 1 || this.type === null || __privateGet(this, _parts).length !== 1) {
3573
+ return false;
3574
+ }
3575
+ const gc = __privateGet(child, _parts)[0];
3576
+ if (!gc || typeof gc !== "object" || gc.type === null) {
3577
+ return false;
3578
+ }
3579
+ return __privateMethod(this, _AST_instances, canUsurpType_fn).call(this, gc.type);
3580
+ };
3581
+ usurp_fn = function(child) {
3582
+ const m = usurpMap.get(this.type);
3583
+ const gc = __privateGet(child, _parts)[0];
3584
+ const nt = m == null ? void 0 : m.get(gc.type);
3585
+ if (!nt)
3586
+ return false;
3587
+ __privateSet(this, _parts, __privateGet(gc, _parts));
3588
+ for (const p of __privateGet(this, _parts)) {
3589
+ if (typeof p === "object")
3590
+ __privateSet(p, _parent, this);
3591
+ }
3592
+ this.type = nt;
3593
+ __privateSet(this, _toString, void 0);
3594
+ __privateSet(this, _emptyExt, false);
3595
+ };
3596
+ flatten_fn = function() {
3597
+ var _a2, _b;
3598
+ if (!isExtglobAST(this)) {
3599
+ for (const p of __privateGet(this, _parts)) {
3600
+ if (typeof p === "object")
3601
+ __privateMethod(_a2 = p, _AST_instances, flatten_fn).call(_a2);
3602
+ }
3603
+ } else {
3604
+ let iterations = 0;
3605
+ let done = false;
3606
+ do {
3607
+ done = true;
3608
+ for (let i = 0; i < __privateGet(this, _parts).length; i++) {
3609
+ const c = __privateGet(this, _parts)[i];
3610
+ if (typeof c === "object") {
3611
+ __privateMethod(_b = c, _AST_instances, flatten_fn).call(_b);
3612
+ if (__privateMethod(this, _AST_instances, canAdopt_fn).call(this, c)) {
3613
+ done = false;
3614
+ __privateMethod(this, _AST_instances, adopt_fn).call(this, c, i);
3615
+ } else if (__privateMethod(this, _AST_instances, canAdoptWithSpace_fn).call(this, c)) {
3616
+ done = false;
3617
+ __privateMethod(this, _AST_instances, adoptWithSpace_fn).call(this, c, i);
3618
+ } else if (__privateMethod(this, _AST_instances, canUsurp_fn).call(this, c)) {
3619
+ done = false;
3620
+ __privateMethod(this, _AST_instances, usurp_fn).call(this, c);
3621
+ }
3622
+ }
3623
+ }
3624
+ } while (!done && ++iterations < 10);
3625
+ }
3626
+ __privateSet(this, _toString, void 0);
3627
+ };
3499
3628
  partsToRegExp_fn = function(dot) {
3500
3629
  return __privateGet(this, _parts).map((p) => {
3501
3630
  if (typeof p === "string") {
@@ -3510,11 +3639,13 @@ parseGlob_fn = function(glob, hasMagic, noEmpty = false) {
3510
3639
  let escaping = false;
3511
3640
  let re = "";
3512
3641
  let uflag = false;
3642
+ let inStar = false;
3513
3643
  for (let i = 0; i < glob.length; i++) {
3514
3644
  const c = glob.charAt(i);
3515
3645
  if (escaping) {
3516
3646
  escaping = false;
3517
3647
  re += (reSpecials.has(c) ? "\\" : "") + c;
3648
+ inStar = false;
3518
3649
  continue;
3519
3650
  }
3520
3651
  if (c === "\\") {
@@ -3532,16 +3663,19 @@ parseGlob_fn = function(glob, hasMagic, noEmpty = false) {
3532
3663
  uflag = uflag || needUflag;
3533
3664
  i += consumed - 1;
3534
3665
  hasMagic = hasMagic || magic;
3666
+ inStar = false;
3535
3667
  continue;
3536
3668
  }
3537
3669
  }
3538
3670
  if (c === "*") {
3539
- if (noEmpty && glob === "*")
3540
- re += starNoEmpty;
3541
- else
3542
- re += star;
3671
+ if (inStar)
3672
+ continue;
3673
+ inStar = true;
3674
+ re += noEmpty && /^[*]+$/.test(glob) ? starNoEmpty : star;
3543
3675
  hasMagic = true;
3544
3676
  continue;
3677
+ } else {
3678
+ inStar = false;
3545
3679
  }
3546
3680
  if (c === "?") {
3547
3681
  re += qmark;
@@ -3552,8 +3686,8 @@ parseGlob_fn = function(glob, hasMagic, noEmpty = false) {
3552
3686
  }
3553
3687
  return [re, unescape(glob), !!hasMagic, uflag];
3554
3688
  };
3555
- __privateAdd(_AST, _AST_static);
3556
- var AST = _AST;
3689
+ __privateAdd(AST, _AST_static);
3690
+ _a = AST;
3557
3691
 
3558
3692
  // node_modules/minimatch/dist/esm/escape.js
3559
3693
  var escape = (s, { windowsPathsNoEscape = false } = {}) => {
@@ -3692,28 +3826,33 @@ var match = (list, pattern, options = {}) => {
3692
3826
  minimatch.match = match;
3693
3827
  var globMagic = /[?*]|[+@!]\(.*?\)|\[|\]/;
3694
3828
  var regExpEscape2 = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
3829
+ var _Minimatch_instances, matchGlobstar_fn, matchGlobStarBodySections_fn, matchOne_fn;
3695
3830
  var Minimatch = class {
3696
- options;
3697
- set;
3698
- pattern;
3699
- windowsPathsNoEscape;
3700
- nonegate;
3701
- negate;
3702
- comment;
3703
- empty;
3704
- preserveMultipleSlashes;
3705
- partial;
3706
- globSet;
3707
- globParts;
3708
- nocase;
3709
- isWindows;
3710
- platform;
3711
- windowsNoMagicRoot;
3712
- regexp;
3713
3831
  constructor(pattern, options = {}) {
3832
+ __privateAdd(this, _Minimatch_instances);
3833
+ __publicField(this, "options");
3834
+ __publicField(this, "set");
3835
+ __publicField(this, "pattern");
3836
+ __publicField(this, "windowsPathsNoEscape");
3837
+ __publicField(this, "nonegate");
3838
+ __publicField(this, "negate");
3839
+ __publicField(this, "comment");
3840
+ __publicField(this, "empty");
3841
+ __publicField(this, "preserveMultipleSlashes");
3842
+ __publicField(this, "partial");
3843
+ __publicField(this, "globSet");
3844
+ __publicField(this, "globParts");
3845
+ __publicField(this, "nocase");
3846
+ __publicField(this, "isWindows");
3847
+ __publicField(this, "platform");
3848
+ __publicField(this, "windowsNoMagicRoot");
3849
+ __publicField(this, "maxGlobstarRecursion");
3850
+ __publicField(this, "regexp");
3851
+ var _a2;
3714
3852
  assertValidPattern(pattern);
3715
3853
  options = options || {};
3716
3854
  this.options = options;
3855
+ this.maxGlobstarRecursion = (_a2 = options.maxGlobstarRecursion) != null ? _a2 : 200;
3717
3856
  this.pattern = pattern;
3718
3857
  this.platform = options.platform || defaultPlatform;
3719
3858
  this.isWindows = this.platform === "win32";
@@ -3981,10 +4120,11 @@ var Minimatch = class {
3981
4120
  for (let i = 0; i < globParts.length - 1; i++) {
3982
4121
  for (let j = i + 1; j < globParts.length; j++) {
3983
4122
  const matched = this.partsMatch(globParts[i], globParts[j], !this.preserveMultipleSlashes);
3984
- if (!matched)
3985
- continue;
3986
- globParts[i] = matched;
3987
- globParts[j] = [];
4123
+ if (matched) {
4124
+ globParts[i] = [];
4125
+ globParts[j] = matched;
4126
+ break;
4127
+ }
3988
4128
  }
3989
4129
  }
3990
4130
  return globParts.filter((gs) => gs.length);
@@ -4045,7 +4185,8 @@ var Minimatch = class {
4045
4185
  // out of pattern, then that's fine, as long as all
4046
4186
  // the parts match.
4047
4187
  matchOne(file, pattern, partial = false) {
4048
- const options = this.options;
4188
+ let fileStartIndex = 0;
4189
+ let patternStartIndex = 0;
4049
4190
  if (this.isWindows) {
4050
4191
  const fileDrive = typeof file[0] === "string" && /^[a-z]:$/i.test(file[0]);
4051
4192
  const fileUNC = !fileDrive && file[0] === "" && file[1] === "" && file[2] === "?" && /^[a-z]:$/i.test(file[3]);
@@ -4054,14 +4195,14 @@ var Minimatch = class {
4054
4195
  const fdi = fileUNC ? 3 : fileDrive ? 0 : void 0;
4055
4196
  const pdi = patternUNC ? 3 : patternDrive ? 0 : void 0;
4056
4197
  if (typeof fdi === "number" && typeof pdi === "number") {
4057
- const [fd, pd] = [file[fdi], pattern[pdi]];
4198
+ const [fd, pd] = [
4199
+ file[fdi],
4200
+ pattern[pdi]
4201
+ ];
4058
4202
  if (fd.toLowerCase() === pd.toLowerCase()) {
4059
4203
  pattern[pdi] = fd;
4060
- if (pdi > fdi) {
4061
- pattern = pattern.slice(pdi);
4062
- } else if (fdi > pdi) {
4063
- file = file.slice(fdi);
4064
- }
4204
+ patternStartIndex = pdi;
4205
+ fileStartIndex = fdi;
4065
4206
  }
4066
4207
  }
4067
4208
  }
@@ -4069,71 +4210,10 @@ var Minimatch = class {
4069
4210
  if (optimizationLevel >= 2) {
4070
4211
  file = this.levelTwoFileOptimize(file);
4071
4212
  }
4072
- this.debug("matchOne", this, { file, pattern });
4073
- this.debug("matchOne", file.length, pattern.length);
4074
- for (var fi = 0, pi = 0, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) {
4075
- this.debug("matchOne loop");
4076
- var p = pattern[pi];
4077
- var f = file[fi];
4078
- this.debug(pattern, p, f);
4079
- if (p === false) {
4080
- return false;
4081
- }
4082
- if (p === GLOBSTAR) {
4083
- this.debug("GLOBSTAR", [pattern, p, f]);
4084
- var fr = fi;
4085
- var pr = pi + 1;
4086
- if (pr === pl) {
4087
- this.debug("** at the end");
4088
- for (; fi < fl; fi++) {
4089
- if (file[fi] === "." || file[fi] === ".." || !options.dot && file[fi].charAt(0) === ".")
4090
- return false;
4091
- }
4092
- return true;
4093
- }
4094
- while (fr < fl) {
4095
- var swallowee = file[fr];
4096
- this.debug("\nglobstar while", file, fr, pattern, pr, swallowee);
4097
- if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) {
4098
- this.debug("globstar found match!", fr, fl, swallowee);
4099
- return true;
4100
- } else {
4101
- if (swallowee === "." || swallowee === ".." || !options.dot && swallowee.charAt(0) === ".") {
4102
- this.debug("dot detected!", file, fr, pattern, pr);
4103
- break;
4104
- }
4105
- this.debug("globstar swallow a segment, and continue");
4106
- fr++;
4107
- }
4108
- }
4109
- if (partial) {
4110
- this.debug("\n>>> no match, partial?", file, fr, pattern, pr);
4111
- if (fr === fl) {
4112
- return true;
4113
- }
4114
- }
4115
- return false;
4116
- }
4117
- let hit;
4118
- if (typeof p === "string") {
4119
- hit = f === p;
4120
- this.debug("string match", p, f, hit);
4121
- } else {
4122
- hit = p.test(f);
4123
- this.debug("pattern match", p, f, hit);
4124
- }
4125
- if (!hit)
4126
- return false;
4127
- }
4128
- if (fi === fl && pi === pl) {
4129
- return true;
4130
- } else if (fi === fl) {
4131
- return partial;
4132
- } else if (pi === pl) {
4133
- return fi === fl - 1 && file[fi] === "";
4134
- } else {
4135
- throw new Error("wtf?");
4213
+ if (pattern.includes(GLOBSTAR)) {
4214
+ return __privateMethod(this, _Minimatch_instances, matchGlobstar_fn).call(this, file, pattern, partial, fileStartIndex, patternStartIndex);
4136
4215
  }
4216
+ return __privateMethod(this, _Minimatch_instances, matchOne_fn).call(this, file, pattern, partial, fileStartIndex, patternStartIndex);
4137
4217
  }
4138
4218
  braceExpand() {
4139
4219
  return braceExpand(this.pattern, this.options);
@@ -4272,6 +4352,135 @@ var Minimatch = class {
4272
4352
  return minimatch.defaults(def).Minimatch;
4273
4353
  }
4274
4354
  };
4355
+ _Minimatch_instances = new WeakSet();
4356
+ matchGlobstar_fn = function(file, pattern, partial, fileIndex, patternIndex) {
4357
+ const firstgs = pattern.indexOf(GLOBSTAR, patternIndex);
4358
+ const lastgs = pattern.lastIndexOf(GLOBSTAR);
4359
+ const [head, body, tail] = partial ? [
4360
+ pattern.slice(patternIndex, firstgs),
4361
+ pattern.slice(firstgs + 1),
4362
+ []
4363
+ ] : [
4364
+ pattern.slice(patternIndex, firstgs),
4365
+ pattern.slice(firstgs + 1, lastgs),
4366
+ pattern.slice(lastgs + 1)
4367
+ ];
4368
+ if (head.length) {
4369
+ const fileHead = file.slice(fileIndex, fileIndex + head.length);
4370
+ if (!__privateMethod(this, _Minimatch_instances, matchOne_fn).call(this, fileHead, head, partial, 0, 0))
4371
+ return false;
4372
+ fileIndex += head.length;
4373
+ }
4374
+ let fileTailMatch = 0;
4375
+ if (tail.length) {
4376
+ if (tail.length + fileIndex > file.length)
4377
+ return false;
4378
+ let tailStart = file.length - tail.length;
4379
+ if (__privateMethod(this, _Minimatch_instances, matchOne_fn).call(this, file, tail, partial, tailStart, 0)) {
4380
+ fileTailMatch = tail.length;
4381
+ } else {
4382
+ if (file[file.length - 1] !== "" || fileIndex + tail.length === file.length) {
4383
+ return false;
4384
+ }
4385
+ tailStart--;
4386
+ if (!__privateMethod(this, _Minimatch_instances, matchOne_fn).call(this, file, tail, partial, tailStart, 0))
4387
+ return false;
4388
+ fileTailMatch = tail.length + 1;
4389
+ }
4390
+ }
4391
+ if (!body.length) {
4392
+ let sawSome = !!fileTailMatch;
4393
+ for (let i2 = fileIndex; i2 < file.length - fileTailMatch; i2++) {
4394
+ const f = String(file[i2]);
4395
+ sawSome = true;
4396
+ if (f === "." || f === ".." || !this.options.dot && f.startsWith(".")) {
4397
+ return false;
4398
+ }
4399
+ }
4400
+ return partial || sawSome;
4401
+ }
4402
+ const bodySegments = [[[], 0]];
4403
+ let currentBody = bodySegments[0];
4404
+ let nonGsParts = 0;
4405
+ const nonGsPartsSums = [0];
4406
+ for (const b of body) {
4407
+ if (b === GLOBSTAR) {
4408
+ nonGsPartsSums.push(nonGsParts);
4409
+ currentBody = [[], 0];
4410
+ bodySegments.push(currentBody);
4411
+ } else {
4412
+ currentBody[0].push(b);
4413
+ nonGsParts++;
4414
+ }
4415
+ }
4416
+ let i = bodySegments.length - 1;
4417
+ const fileLength = file.length - fileTailMatch;
4418
+ for (const b of bodySegments) {
4419
+ b[1] = fileLength - (nonGsPartsSums[i--] + b[0].length);
4420
+ }
4421
+ return !!__privateMethod(this, _Minimatch_instances, matchGlobStarBodySections_fn).call(this, file, bodySegments, fileIndex, 0, partial, 0, !!fileTailMatch);
4422
+ };
4423
+ matchGlobStarBodySections_fn = function(file, bodySegments, fileIndex, bodyIndex, partial, globStarDepth, sawTail) {
4424
+ const bs = bodySegments[bodyIndex];
4425
+ if (!bs) {
4426
+ for (let i = fileIndex; i < file.length; i++) {
4427
+ sawTail = true;
4428
+ const f = file[i];
4429
+ if (f === "." || f === ".." || !this.options.dot && f.startsWith(".")) {
4430
+ return false;
4431
+ }
4432
+ }
4433
+ return sawTail;
4434
+ }
4435
+ const [body, after] = bs;
4436
+ while (fileIndex <= after) {
4437
+ const m = __privateMethod(this, _Minimatch_instances, matchOne_fn).call(this, file.slice(0, fileIndex + body.length), body, partial, fileIndex, 0);
4438
+ if (m && globStarDepth < this.maxGlobstarRecursion) {
4439
+ const sub = __privateMethod(this, _Minimatch_instances, matchGlobStarBodySections_fn).call(this, file, bodySegments, fileIndex + body.length, bodyIndex + 1, partial, globStarDepth + 1, sawTail);
4440
+ if (sub !== false)
4441
+ return sub;
4442
+ }
4443
+ const f = file[fileIndex];
4444
+ if (f === "." || f === ".." || !this.options.dot && f.startsWith(".")) {
4445
+ return false;
4446
+ }
4447
+ fileIndex++;
4448
+ }
4449
+ return partial || null;
4450
+ };
4451
+ matchOne_fn = function(file, pattern, partial, fileIndex, patternIndex) {
4452
+ let fi;
4453
+ let pi;
4454
+ let pl;
4455
+ let fl;
4456
+ for (fi = fileIndex, pi = patternIndex, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) {
4457
+ this.debug("matchOne loop");
4458
+ let p = pattern[pi];
4459
+ let f = file[fi];
4460
+ this.debug(pattern, p, f);
4461
+ if (p === false || p === GLOBSTAR)
4462
+ return false;
4463
+ let hit;
4464
+ if (typeof p === "string") {
4465
+ hit = f === p;
4466
+ this.debug("string match", p, f, hit);
4467
+ } else {
4468
+ hit = p.test(f);
4469
+ this.debug("pattern match", p, f, hit);
4470
+ }
4471
+ if (!hit)
4472
+ return false;
4473
+ }
4474
+ if (fi === fl && pi === pl) {
4475
+ return true;
4476
+ } else if (fi === fl) {
4477
+ return partial;
4478
+ } else if (pi === pl) {
4479
+ return fi === fl - 1 && file[fi] === "";
4480
+ } else {
4481
+ throw new Error("wtf?");
4482
+ }
4483
+ };
4275
4484
  minimatch.AST = AST;
4276
4485
  minimatch.Minimatch = Minimatch;
4277
4486
  minimatch.escape = escape;
@@ -4908,9 +5117,9 @@ var taskWatch = async (coreCompiler, config) => {
4908
5117
  });
4909
5118
  if (devServer) {
4910
5119
  const rmDevServerLog = watcher.on("buildFinish", () => {
4911
- var _a;
5120
+ var _a2;
4912
5121
  rmDevServerLog();
4913
- const url = (_a = devServer == null ? void 0 : devServer.browserUrl) != null ? _a : "UNKNOWN URL";
5122
+ const url = (_a2 = devServer == null ? void 0 : devServer.browserUrl) != null ? _a2 : "UNKNOWN URL";
4914
5123
  config.logger.info(`${config.logger.cyan(url)}
4915
5124
  `);
4916
5125
  });
@@ -4944,8 +5153,8 @@ var isInteractive = (sys, flags, object) => {
4944
5153
  tty: sys.isTTY() ? true : false,
4945
5154
  ci: ["CI", "BUILD_ID", "BUILD_NUMBER", "BITBUCKET_COMMIT", "CODEBUILD_BUILD_ARN"].filter(
4946
5155
  (v) => {
4947
- var _a;
4948
- return !!((_a = sys.getEnvironmentVar) == null ? void 0 : _a.call(sys, v));
5156
+ var _a2;
5157
+ return !!((_a2 = sys.getEnvironmentVar) == null ? void 0 : _a2.call(sys, v));
4949
5158
  }
4950
5159
  ).length > 0 || !!flags.ci
4951
5160
  });
@@ -5051,22 +5260,22 @@ function hasAppTarget(config) {
5051
5260
  );
5052
5261
  }
5053
5262
  function isUsingYarn(sys) {
5054
- var _a, _b;
5055
- return ((_b = (_a = sys.getEnvironmentVar) == null ? void 0 : _a.call(sys, "npm_execpath")) == null ? void 0 : _b.includes("yarn")) || false;
5263
+ var _a2, _b;
5264
+ return ((_b = (_a2 = sys.getEnvironmentVar) == null ? void 0 : _a2.call(sys, "npm_execpath")) == null ? void 0 : _b.includes("yarn")) || false;
5056
5265
  }
5057
5266
  function getActiveTargets(config) {
5058
5267
  const result = config.outputTargets.map((t) => t.type);
5059
5268
  return Array.from(new Set(result));
5060
5269
  }
5061
5270
  var prepareData = async (coreCompiler, config, sys, duration_ms, component_count = void 0) => {
5062
- var _a, _b, _c;
5271
+ var _a2, _b, _c;
5063
5272
  const { typescript, rollup } = coreCompiler.versions || { typescript: "unknown", rollup: "unknown" };
5064
5273
  const { packages, packagesNoVersions } = await getInstalledPackages(sys, config);
5065
5274
  const targets = getActiveTargets(config);
5066
5275
  const yarn = isUsingYarn(sys);
5067
5276
  const stencil = coreCompiler.version || "unknown";
5068
5277
  const system = `${sys.name} ${sys.version}`;
5069
- const os_name = (_a = sys.details) == null ? void 0 : _a.platform;
5278
+ const os_name = (_a2 = sys.details) == null ? void 0 : _a2.platform;
5070
5279
  const os_version = (_b = sys.details) == null ? void 0 : _b.release;
5071
5280
  const cpu_model = (_c = sys.details) == null ? void 0 : _c.cpuModel;
5072
5281
  const build = coreCompiler.buildId || "unknown";
@@ -5183,21 +5392,21 @@ async function npmPackages(sys, ionicPackages) {
5183
5392
  const appRootDir = sys.getCurrentDirectory();
5184
5393
  const packageLockJson = await tryFn(readJson, sys, sys.resolvePath(appRootDir + "/package-lock.json"));
5185
5394
  return ionicPackages.map(([k, v]) => {
5186
- var _a, _b, _c, _d;
5187
- let version = (_d = (_c = (_a = packageLockJson == null ? void 0 : packageLockJson.dependencies[k]) == null ? void 0 : _a.version) != null ? _c : (_b = packageLockJson == null ? void 0 : packageLockJson.devDependencies[k]) == null ? void 0 : _b.version) != null ? _d : v;
5395
+ var _a2, _b, _c, _d;
5396
+ let version = (_d = (_c = (_a2 = packageLockJson == null ? void 0 : packageLockJson.dependencies[k]) == null ? void 0 : _a2.version) != null ? _c : (_b = packageLockJson == null ? void 0 : packageLockJson.devDependencies[k]) == null ? void 0 : _b.version) != null ? _d : v;
5188
5397
  version = version.includes("file:") ? sanitizeDeclaredVersion(v) : version;
5189
5398
  return `${k}@${version}`;
5190
5399
  });
5191
5400
  }
5192
5401
  async function yarnPackages(sys, ionicPackages) {
5193
- var _a;
5402
+ var _a2;
5194
5403
  const appRootDir = sys.getCurrentDirectory();
5195
5404
  const yarnLock = sys.readFileSync(sys.resolvePath(appRootDir + "/yarn.lock"));
5196
- const yarnLockYml = (_a = sys.parseYarnLockFile) == null ? void 0 : _a.call(sys, yarnLock);
5405
+ const yarnLockYml = (_a2 = sys.parseYarnLockFile) == null ? void 0 : _a2.call(sys, yarnLock);
5197
5406
  return ionicPackages.map(([k, v]) => {
5198
- var _a2;
5407
+ var _a3;
5199
5408
  const identifiedVersion = `${k}@${v}`;
5200
- let version = (_a2 = yarnLockYml == null ? void 0 : yarnLockYml.object[identifiedVersion]) == null ? void 0 : _a2.version;
5409
+ let version = (_a3 = yarnLockYml == null ? void 0 : yarnLockYml.object[identifiedVersion]) == null ? void 0 : _a3.version;
5201
5410
  version = version && version.includes("undefined") ? sanitizeDeclaredVersion(identifiedVersion) : version;
5202
5411
  return `${k}@${version}`;
5203
5412
  });
@@ -5512,8 +5721,8 @@ var toPascalCase = (str) => str.split("-").reduce((res, part) => res + part[0].t
5512
5721
 
5513
5722
  // src/cli/task-telemetry.ts
5514
5723
  var taskTelemetry = async (flags, sys, logger) => {
5515
- var _a;
5516
- const prompt = logger.dim(((_a = sys.details) == null ? void 0 : _a.platform) === "windows" ? ">" : "$");
5724
+ var _a2;
5725
+ const prompt = logger.dim(((_a2 = sys.details) == null ? void 0 : _a2.platform) === "windows" ? ">" : "$");
5517
5726
  const isEnabling = flags.args.includes("on");
5518
5727
  const isDisabling = flags.args.includes("off");
5519
5728
  const INFORMATION = `Opt in or out of telemetry. Information about the data we collect is available on our website: ${logger.bold(
@@ -5551,8 +5760,8 @@ var taskTelemetry = async (flags, sys, logger) => {
5551
5760
 
5552
5761
  // src/cli/task-help.ts
5553
5762
  var taskHelp = async (flags, logger, sys) => {
5554
- var _a;
5555
- const prompt = logger.dim(((_a = sys.details) == null ? void 0 : _a.platform) === "windows" ? ">" : "$");
5763
+ var _a2;
5764
+ const prompt = logger.dim(((_a2 = sys.details) == null ? void 0 : _a2.platform) === "windows" ? ">" : "$");
5556
5765
  console.log(`
5557
5766
  ${logger.bold("Build:")} ${logger.dim("Build components for development or production.")}
5558
5767
 
@@ -5651,7 +5860,7 @@ var taskServe = async (config) => {
5651
5860
 
5652
5861
  // src/cli/task-test.ts
5653
5862
  var taskTest = async (config) => {
5654
- var _a;
5863
+ var _a2;
5655
5864
  config.buildDocs = false;
5656
5865
  const testingRunOpts = {
5657
5866
  e2e: !!config.flags.e2e,
@@ -5671,7 +5880,7 @@ var taskTest = async (config) => {
5671
5880
  );
5672
5881
  }
5673
5882
  }
5674
- const diagnostics = await ((_a = config.sys.lazyRequire) == null ? void 0 : _a.ensure(config.rootDir, ensureModuleIds));
5883
+ const diagnostics = await ((_a2 = config.sys.lazyRequire) == null ? void 0 : _a2.ensure(config.rootDir, ensureModuleIds));
5675
5884
  if (diagnostics && diagnostics.length > 0) {
5676
5885
  config.logger.printDiagnostics(diagnostics);
5677
5886
  return config.sys.exit(1);
@@ -5757,8 +5966,8 @@ var run = async (init) => {
5757
5966
  }
5758
5967
  };
5759
5968
  var runTask = async (coreCompiler, config, task, sys) => {
5760
- var _a;
5761
- const flags = createConfigFlags((_a = config.flags) != null ? _a : { task });
5969
+ var _a2;
5970
+ const flags = createConfigFlags((_a2 = config.flags) != null ? _a2 : { task });
5762
5971
  config.flags = flags;
5763
5972
  if (!config.sys) {
5764
5973
  config.sys = sys;