@stencil/core 4.43.2-dev.1773120108.778b0cd → 4.43.2-dev.1773206571.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.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- Stencil CLI (CommonJS) v4.43.2-dev.1773120108.778b0cd | MIT Licensed | https://stenciljs.com
2
+ Stencil CLI (CommonJS) v4.43.2-dev.1773206571.9080c9d | MIT Licensed | https://stenciljs.com
3
3
  */
4
4
  "use strict";
5
5
  var __create = Object.create;
@@ -3059,8 +3059,35 @@ var unescape = (s, { windowsPathsNoEscape = false } = {}) => {
3059
3059
  };
3060
3060
 
3061
3061
  // node_modules/minimatch/dist/esm/ast.js
3062
+ var _a;
3062
3063
  var types = /* @__PURE__ */ new Set(["!", "?", "+", "*", "@"]);
3063
3064
  var isExtglobType = (c) => types.has(c);
3065
+ var isExtglobAST = (c) => isExtglobType(c.type);
3066
+ var adoptionMap = /* @__PURE__ */ new Map([
3067
+ ["!", ["@"]],
3068
+ ["?", ["?", "@"]],
3069
+ ["@", ["@"]],
3070
+ ["*", ["*", "+", "?", "@"]],
3071
+ ["+", ["+", "@"]]
3072
+ ]);
3073
+ var adoptionWithSpaceMap = /* @__PURE__ */ new Map([
3074
+ ["!", ["?"]],
3075
+ ["@", ["?"]],
3076
+ ["+", ["?", "*"]]
3077
+ ]);
3078
+ var adoptionAnyMap = /* @__PURE__ */ new Map([
3079
+ ["!", ["?", "@"]],
3080
+ ["?", ["?", "@"]],
3081
+ ["@", ["?", "@"]],
3082
+ ["*", ["*", "+", "?", "@"]],
3083
+ ["+", ["+", "@", "?", "*"]]
3084
+ ]);
3085
+ var usurpMap = /* @__PURE__ */ new Map([
3086
+ ["!", /* @__PURE__ */ new Map([["!", "@"]])],
3087
+ ["?", /* @__PURE__ */ new Map([["*", "*"], ["+", "*"]])],
3088
+ ["@", /* @__PURE__ */ new Map([["!", "!"], ["?", "?"], ["@", "@"], ["*", "*"], ["+", "+"]])],
3089
+ ["+", /* @__PURE__ */ new Map([["?", "*"], ["*", "*"]])]
3090
+ ]);
3064
3091
  var startNoTraversal = "(?!(?:^|/)\\.\\.?(?:$|/))";
3065
3092
  var startNoDot = "(?!\\.)";
3066
3093
  var addPatternStart = /* @__PURE__ */ new Set(["[", "."]);
@@ -3070,8 +3097,8 @@ var regExpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
3070
3097
  var qmark = "[^/]";
3071
3098
  var star = qmark + "*?";
3072
3099
  var starNoEmpty = qmark + "+?";
3073
- var _root, _hasMagic, _uflag, _parts, _parent, _parentIndex, _negs, _filledNegs, _options, _toString, _emptyExt, _AST_instances, fillNegs_fn, _AST_static, parseAST_fn, partsToRegExp_fn, parseGlob_fn;
3074
- var _AST = class _AST {
3100
+ 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;
3101
+ var AST = class {
3075
3102
  constructor(type, parent, options = {}) {
3076
3103
  __privateAdd(this, _AST_instances);
3077
3104
  __publicField(this, "type");
@@ -3124,44 +3151,44 @@ var _AST = class _AST {
3124
3151
  for (const p of parts) {
3125
3152
  if (p === "")
3126
3153
  continue;
3127
- if (typeof p !== "string" && !(p instanceof _AST && __privateGet(p, _parent) === this)) {
3154
+ if (typeof p !== "string" && !(p instanceof _a && __privateGet(p, _parent) === this)) {
3128
3155
  throw new Error("invalid part: " + p);
3129
3156
  }
3130
3157
  __privateGet(this, _parts).push(p);
3131
3158
  }
3132
3159
  }
3133
3160
  toJSON() {
3134
- var _a;
3161
+ var _a2;
3135
3162
  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())];
3136
3163
  if (this.isStart() && !this.type)
3137
3164
  ret.unshift([]);
3138
- if (this.isEnd() && (this === __privateGet(this, _root) || __privateGet(__privateGet(this, _root), _filledNegs) && ((_a = __privateGet(this, _parent)) == null ? void 0 : _a.type) === "!")) {
3165
+ if (this.isEnd() && (this === __privateGet(this, _root) || __privateGet(__privateGet(this, _root), _filledNegs) && ((_a2 = __privateGet(this, _parent)) == null ? void 0 : _a2.type) === "!")) {
3139
3166
  ret.push({});
3140
3167
  }
3141
3168
  return ret;
3142
3169
  }
3143
3170
  isStart() {
3144
- var _a;
3171
+ var _a2;
3145
3172
  if (__privateGet(this, _root) === this)
3146
3173
  return true;
3147
- if (!((_a = __privateGet(this, _parent)) == null ? void 0 : _a.isStart()))
3174
+ if (!((_a2 = __privateGet(this, _parent)) == null ? void 0 : _a2.isStart()))
3148
3175
  return false;
3149
3176
  if (__privateGet(this, _parentIndex) === 0)
3150
3177
  return true;
3151
3178
  const p = __privateGet(this, _parent);
3152
3179
  for (let i = 0; i < __privateGet(this, _parentIndex); i++) {
3153
3180
  const pp = __privateGet(p, _parts)[i];
3154
- if (!(pp instanceof _AST && pp.type === "!")) {
3181
+ if (!(pp instanceof _a && pp.type === "!")) {
3155
3182
  return false;
3156
3183
  }
3157
3184
  }
3158
3185
  return true;
3159
3186
  }
3160
3187
  isEnd() {
3161
- var _a, _b, _c;
3188
+ var _a2, _b, _c;
3162
3189
  if (__privateGet(this, _root) === this)
3163
3190
  return true;
3164
- if (((_a = __privateGet(this, _parent)) == null ? void 0 : _a.type) === "!")
3191
+ if (((_a2 = __privateGet(this, _parent)) == null ? void 0 : _a2.type) === "!")
3165
3192
  return true;
3166
3193
  if (!((_b = __privateGet(this, _parent)) == null ? void 0 : _b.isEnd()))
3167
3194
  return false;
@@ -3177,16 +3204,16 @@ var _AST = class _AST {
3177
3204
  this.push(part.clone(this));
3178
3205
  }
3179
3206
  clone(parent) {
3180
- const c = new _AST(this.type, parent);
3207
+ const c = new _a(this.type, parent);
3181
3208
  for (const p of __privateGet(this, _parts)) {
3182
3209
  c.copyIn(p);
3183
3210
  }
3184
3211
  return c;
3185
3212
  }
3186
3213
  static fromGlob(pattern, options = {}) {
3187
- var _a;
3188
- const ast = new _AST(null, void 0, options);
3189
- __privateMethod(_a = _AST, _AST_static, parseAST_fn).call(_a, pattern, ast, 0, options);
3214
+ var _a2;
3215
+ const ast = new _a(null, void 0, options);
3216
+ __privateMethod(_a2 = _a, _AST_static, parseAST_fn).call(_a2, pattern, ast, 0, options, 0);
3190
3217
  return ast;
3191
3218
  }
3192
3219
  // returns the regular expression if there's magic, or the unescaped
@@ -3279,15 +3306,17 @@ var _AST = class _AST {
3279
3306
  // is ^(?!\.), we can just prepend (?!\.) to the pattern (either root
3280
3307
  // or start or whatever) and prepend ^ or / at the Regexp construction.
3281
3308
  toRegExpSource(allowDot) {
3282
- var _a;
3309
+ var _a2;
3283
3310
  const dot = allowDot != null ? allowDot : !!__privateGet(this, _options).dot;
3284
- if (__privateGet(this, _root) === this)
3311
+ if (__privateGet(this, _root) === this) {
3312
+ __privateMethod(this, _AST_instances, flatten_fn).call(this);
3285
3313
  __privateMethod(this, _AST_instances, fillNegs_fn).call(this);
3286
- if (!this.type) {
3314
+ }
3315
+ if (!isExtglobAST(this)) {
3287
3316
  const noEmpty = this.isStart() && this.isEnd();
3288
3317
  const src = __privateGet(this, _parts).map((p) => {
3289
- var _a2;
3290
- const [re, _, hasMagic, uflag] = typeof p === "string" ? __privateMethod(_a2 = _AST, _AST_static, parseGlob_fn).call(_a2, p, __privateGet(this, _hasMagic), noEmpty) : p.toRegExpSource(allowDot);
3318
+ var _a3;
3319
+ const [re, _, hasMagic, uflag] = typeof p === "string" ? __privateMethod(_a3 = _a, _AST_static, parseGlob_fn).call(_a3, p, __privateGet(this, _hasMagic), noEmpty) : p.toRegExpSource(allowDot);
3291
3320
  __privateSet(this, _hasMagic, __privateGet(this, _hasMagic) || hasMagic);
3292
3321
  __privateSet(this, _uflag, __privateGet(this, _uflag) || uflag);
3293
3322
  return re;
@@ -3310,7 +3339,7 @@ var _AST = class _AST {
3310
3339
  }
3311
3340
  }
3312
3341
  let end = "";
3313
- if (this.isEnd() && __privateGet(__privateGet(this, _root), _filledNegs) && ((_a = __privateGet(this, _parent)) == null ? void 0 : _a.type) === "!") {
3342
+ if (this.isEnd() && __privateGet(__privateGet(this, _root), _filledNegs) && ((_a2 = __privateGet(this, _parent)) == null ? void 0 : _a2.type) === "!") {
3314
3343
  end = "(?:$|\\/)";
3315
3344
  }
3316
3345
  const final2 = start2 + src + end;
@@ -3326,9 +3355,10 @@ var _AST = class _AST {
3326
3355
  let body = __privateMethod(this, _AST_instances, partsToRegExp_fn).call(this, dot);
3327
3356
  if (this.isStart() && this.isEnd() && !body && this.type !== "!") {
3328
3357
  const s = this.toString();
3329
- __privateSet(this, _parts, [s]);
3330
- this.type = null;
3331
- __privateSet(this, _hasMagic, void 0);
3358
+ const me = this;
3359
+ __privateSet(me, _parts, [s]);
3360
+ me.type = null;
3361
+ __privateSet(me, _hasMagic, void 0);
3332
3362
  return [s, unescape(this.toString()), false, false];
3333
3363
  }
3334
3364
  let bodyDotAllowed = !repeated || allowDot || dot || !startNoDot ? "" : __privateMethod(this, _AST_instances, partsToRegExp_fn).call(this, true);
@@ -3397,8 +3427,9 @@ fillNegs_fn = function() {
3397
3427
  return this;
3398
3428
  };
3399
3429
  _AST_static = new WeakSet();
3400
- parseAST_fn = function(str, ast, pos, opt) {
3401
- var _a, _b;
3430
+ parseAST_fn = function(str, ast, pos, opt, extDepth) {
3431
+ var _a2, _b, _c, _d, _e;
3432
+ const maxDepth = (_a2 = opt.maxExtglobRecursion) != null ? _a2 : 2;
3402
3433
  let escaping = false;
3403
3434
  let inBrace = false;
3404
3435
  let braceStart = -1;
@@ -3430,11 +3461,12 @@ parseAST_fn = function(str, ast, pos, opt) {
3430
3461
  acc2 += c;
3431
3462
  continue;
3432
3463
  }
3433
- if (!opt.noext && isExtglobType(c) && str.charAt(i2) === "(") {
3464
+ const doRecurse = !opt.noext && isExtglobType(c) && str.charAt(i2) === "(" && extDepth <= maxDepth;
3465
+ if (doRecurse) {
3434
3466
  ast.push(acc2);
3435
3467
  acc2 = "";
3436
- const ext2 = new _AST(c, ast);
3437
- i2 = __privateMethod(_a = _AST, _AST_static, parseAST_fn).call(_a, str, ext2, i2, opt);
3468
+ const ext2 = new _a(c, ast);
3469
+ i2 = __privateMethod(_b = _a, _AST_static, parseAST_fn).call(_b, str, ext2, i2, opt, extDepth + 1);
3438
3470
  ast.push(ext2);
3439
3471
  continue;
3440
3472
  }
@@ -3444,7 +3476,7 @@ parseAST_fn = function(str, ast, pos, opt) {
3444
3476
  return i2;
3445
3477
  }
3446
3478
  let i = pos + 1;
3447
- let part = new _AST(null, ast);
3479
+ let part = new _a(null, ast);
3448
3480
  const parts = [];
3449
3481
  let acc = "";
3450
3482
  while (i < str.length) {
@@ -3471,19 +3503,22 @@ parseAST_fn = function(str, ast, pos, opt) {
3471
3503
  acc += c;
3472
3504
  continue;
3473
3505
  }
3474
- if (isExtglobType(c) && str.charAt(i) === "(") {
3506
+ const doRecurse = isExtglobType(c) && str.charAt(i) === "(" && /* c8 ignore start - the maxDepth is sufficient here */
3507
+ (extDepth <= maxDepth || ast && __privateMethod(_c = ast, _AST_instances, canAdoptType_fn).call(_c, c));
3508
+ if (doRecurse) {
3509
+ const depthAdd = ast && __privateMethod(_d = ast, _AST_instances, canAdoptType_fn).call(_d, c) ? 0 : 1;
3475
3510
  part.push(acc);
3476
3511
  acc = "";
3477
- const ext2 = new _AST(c, part);
3512
+ const ext2 = new _a(c, part);
3478
3513
  part.push(ext2);
3479
- i = __privateMethod(_b = _AST, _AST_static, parseAST_fn).call(_b, str, ext2, i, opt);
3514
+ i = __privateMethod(_e = _a, _AST_static, parseAST_fn).call(_e, str, ext2, i, opt, extDepth + depthAdd);
3480
3515
  continue;
3481
3516
  }
3482
3517
  if (c === "|") {
3483
3518
  part.push(acc);
3484
3519
  acc = "";
3485
3520
  parts.push(part);
3486
- part = new _AST(null, ast);
3521
+ part = new _a(null, ast);
3487
3522
  continue;
3488
3523
  }
3489
3524
  if (c === ")") {
@@ -3502,6 +3537,100 @@ parseAST_fn = function(str, ast, pos, opt) {
3502
3537
  __privateSet(ast, _parts, [str.substring(pos - 1)]);
3503
3538
  return i;
3504
3539
  };
3540
+ canAdoptWithSpace_fn = function(child) {
3541
+ return __privateMethod(this, _AST_instances, canAdopt_fn).call(this, child, adoptionWithSpaceMap);
3542
+ };
3543
+ canAdopt_fn = function(child, map2 = adoptionMap) {
3544
+ if (!child || typeof child !== "object" || child.type !== null || __privateGet(child, _parts).length !== 1 || this.type === null) {
3545
+ return false;
3546
+ }
3547
+ const gc = __privateGet(child, _parts)[0];
3548
+ if (!gc || typeof gc !== "object" || gc.type === null) {
3549
+ return false;
3550
+ }
3551
+ return __privateMethod(this, _AST_instances, canAdoptType_fn).call(this, gc.type, map2);
3552
+ };
3553
+ canAdoptType_fn = function(c, map2 = adoptionAnyMap) {
3554
+ var _a2;
3555
+ return !!((_a2 = map2.get(this.type)) == null ? void 0 : _a2.includes(c));
3556
+ };
3557
+ adoptWithSpace_fn = function(child, index) {
3558
+ const gc = __privateGet(child, _parts)[0];
3559
+ const blank = new _a(null, gc, this.options);
3560
+ __privateGet(blank, _parts).push("");
3561
+ gc.push(blank);
3562
+ __privateMethod(this, _AST_instances, adopt_fn).call(this, child, index);
3563
+ };
3564
+ adopt_fn = function(child, index) {
3565
+ const gc = __privateGet(child, _parts)[0];
3566
+ __privateGet(this, _parts).splice(index, 1, ...__privateGet(gc, _parts));
3567
+ for (const p of __privateGet(gc, _parts)) {
3568
+ if (typeof p === "object")
3569
+ __privateSet(p, _parent, this);
3570
+ }
3571
+ __privateSet(this, _toString, void 0);
3572
+ };
3573
+ canUsurpType_fn = function(c) {
3574
+ const m = usurpMap.get(this.type);
3575
+ return !!(m == null ? void 0 : m.has(c));
3576
+ };
3577
+ canUsurp_fn = function(child) {
3578
+ if (!child || typeof child !== "object" || child.type !== null || __privateGet(child, _parts).length !== 1 || this.type === null || __privateGet(this, _parts).length !== 1) {
3579
+ return false;
3580
+ }
3581
+ const gc = __privateGet(child, _parts)[0];
3582
+ if (!gc || typeof gc !== "object" || gc.type === null) {
3583
+ return false;
3584
+ }
3585
+ return __privateMethod(this, _AST_instances, canUsurpType_fn).call(this, gc.type);
3586
+ };
3587
+ usurp_fn = function(child) {
3588
+ const m = usurpMap.get(this.type);
3589
+ const gc = __privateGet(child, _parts)[0];
3590
+ const nt = m == null ? void 0 : m.get(gc.type);
3591
+ if (!nt)
3592
+ return false;
3593
+ __privateSet(this, _parts, __privateGet(gc, _parts));
3594
+ for (const p of __privateGet(this, _parts)) {
3595
+ if (typeof p === "object")
3596
+ __privateSet(p, _parent, this);
3597
+ }
3598
+ this.type = nt;
3599
+ __privateSet(this, _toString, void 0);
3600
+ __privateSet(this, _emptyExt, false);
3601
+ };
3602
+ flatten_fn = function() {
3603
+ var _a2, _b;
3604
+ if (!isExtglobAST(this)) {
3605
+ for (const p of __privateGet(this, _parts)) {
3606
+ if (typeof p === "object")
3607
+ __privateMethod(_a2 = p, _AST_instances, flatten_fn).call(_a2);
3608
+ }
3609
+ } else {
3610
+ let iterations = 0;
3611
+ let done = false;
3612
+ do {
3613
+ done = true;
3614
+ for (let i = 0; i < __privateGet(this, _parts).length; i++) {
3615
+ const c = __privateGet(this, _parts)[i];
3616
+ if (typeof c === "object") {
3617
+ __privateMethod(_b = c, _AST_instances, flatten_fn).call(_b);
3618
+ if (__privateMethod(this, _AST_instances, canAdopt_fn).call(this, c)) {
3619
+ done = false;
3620
+ __privateMethod(this, _AST_instances, adopt_fn).call(this, c, i);
3621
+ } else if (__privateMethod(this, _AST_instances, canAdoptWithSpace_fn).call(this, c)) {
3622
+ done = false;
3623
+ __privateMethod(this, _AST_instances, adoptWithSpace_fn).call(this, c, i);
3624
+ } else if (__privateMethod(this, _AST_instances, canUsurp_fn).call(this, c)) {
3625
+ done = false;
3626
+ __privateMethod(this, _AST_instances, usurp_fn).call(this, c);
3627
+ }
3628
+ }
3629
+ }
3630
+ } while (!done && ++iterations < 10);
3631
+ }
3632
+ __privateSet(this, _toString, void 0);
3633
+ };
3505
3634
  partsToRegExp_fn = function(dot) {
3506
3635
  return __privateGet(this, _parts).map((p) => {
3507
3636
  if (typeof p === "string") {
@@ -3516,11 +3645,13 @@ parseGlob_fn = function(glob, hasMagic, noEmpty = false) {
3516
3645
  let escaping = false;
3517
3646
  let re = "";
3518
3647
  let uflag = false;
3648
+ let inStar = false;
3519
3649
  for (let i = 0; i < glob.length; i++) {
3520
3650
  const c = glob.charAt(i);
3521
3651
  if (escaping) {
3522
3652
  escaping = false;
3523
3653
  re += (reSpecials.has(c) ? "\\" : "") + c;
3654
+ inStar = false;
3524
3655
  continue;
3525
3656
  }
3526
3657
  if (c === "\\") {
@@ -3538,16 +3669,19 @@ parseGlob_fn = function(glob, hasMagic, noEmpty = false) {
3538
3669
  uflag = uflag || needUflag;
3539
3670
  i += consumed - 1;
3540
3671
  hasMagic = hasMagic || magic;
3672
+ inStar = false;
3541
3673
  continue;
3542
3674
  }
3543
3675
  }
3544
3676
  if (c === "*") {
3545
- if (noEmpty && glob === "*")
3546
- re += starNoEmpty;
3547
- else
3548
- re += star;
3677
+ if (inStar)
3678
+ continue;
3679
+ inStar = true;
3680
+ re += noEmpty && /^[*]+$/.test(glob) ? starNoEmpty : star;
3549
3681
  hasMagic = true;
3550
3682
  continue;
3683
+ } else {
3684
+ inStar = false;
3551
3685
  }
3552
3686
  if (c === "?") {
3553
3687
  re += qmark;
@@ -3558,8 +3692,8 @@ parseGlob_fn = function(glob, hasMagic, noEmpty = false) {
3558
3692
  }
3559
3693
  return [re, unescape(glob), !!hasMagic, uflag];
3560
3694
  };
3561
- __privateAdd(_AST, _AST_static);
3562
- var AST = _AST;
3695
+ __privateAdd(AST, _AST_static);
3696
+ _a = AST;
3563
3697
 
3564
3698
  // node_modules/minimatch/dist/esm/escape.js
3565
3699
  var escape = (s, { windowsPathsNoEscape = false } = {}) => {
@@ -3698,28 +3832,33 @@ var match = (list, pattern, options = {}) => {
3698
3832
  minimatch.match = match;
3699
3833
  var globMagic = /[?*]|[+@!]\(.*?\)|\[|\]/;
3700
3834
  var regExpEscape2 = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
3835
+ var _Minimatch_instances, matchGlobstar_fn, matchGlobStarBodySections_fn, matchOne_fn;
3701
3836
  var Minimatch = class {
3702
- options;
3703
- set;
3704
- pattern;
3705
- windowsPathsNoEscape;
3706
- nonegate;
3707
- negate;
3708
- comment;
3709
- empty;
3710
- preserveMultipleSlashes;
3711
- partial;
3712
- globSet;
3713
- globParts;
3714
- nocase;
3715
- isWindows;
3716
- platform;
3717
- windowsNoMagicRoot;
3718
- regexp;
3719
3837
  constructor(pattern, options = {}) {
3838
+ __privateAdd(this, _Minimatch_instances);
3839
+ __publicField(this, "options");
3840
+ __publicField(this, "set");
3841
+ __publicField(this, "pattern");
3842
+ __publicField(this, "windowsPathsNoEscape");
3843
+ __publicField(this, "nonegate");
3844
+ __publicField(this, "negate");
3845
+ __publicField(this, "comment");
3846
+ __publicField(this, "empty");
3847
+ __publicField(this, "preserveMultipleSlashes");
3848
+ __publicField(this, "partial");
3849
+ __publicField(this, "globSet");
3850
+ __publicField(this, "globParts");
3851
+ __publicField(this, "nocase");
3852
+ __publicField(this, "isWindows");
3853
+ __publicField(this, "platform");
3854
+ __publicField(this, "windowsNoMagicRoot");
3855
+ __publicField(this, "maxGlobstarRecursion");
3856
+ __publicField(this, "regexp");
3857
+ var _a2;
3720
3858
  assertValidPattern(pattern);
3721
3859
  options = options || {};
3722
3860
  this.options = options;
3861
+ this.maxGlobstarRecursion = (_a2 = options.maxGlobstarRecursion) != null ? _a2 : 200;
3723
3862
  this.pattern = pattern;
3724
3863
  this.platform = options.platform || defaultPlatform;
3725
3864
  this.isWindows = this.platform === "win32";
@@ -3987,10 +4126,11 @@ var Minimatch = class {
3987
4126
  for (let i = 0; i < globParts.length - 1; i++) {
3988
4127
  for (let j = i + 1; j < globParts.length; j++) {
3989
4128
  const matched = this.partsMatch(globParts[i], globParts[j], !this.preserveMultipleSlashes);
3990
- if (!matched)
3991
- continue;
3992
- globParts[i] = matched;
3993
- globParts[j] = [];
4129
+ if (matched) {
4130
+ globParts[i] = [];
4131
+ globParts[j] = matched;
4132
+ break;
4133
+ }
3994
4134
  }
3995
4135
  }
3996
4136
  return globParts.filter((gs) => gs.length);
@@ -4051,7 +4191,8 @@ var Minimatch = class {
4051
4191
  // out of pattern, then that's fine, as long as all
4052
4192
  // the parts match.
4053
4193
  matchOne(file, pattern, partial = false) {
4054
- const options = this.options;
4194
+ let fileStartIndex = 0;
4195
+ let patternStartIndex = 0;
4055
4196
  if (this.isWindows) {
4056
4197
  const fileDrive = typeof file[0] === "string" && /^[a-z]:$/i.test(file[0]);
4057
4198
  const fileUNC = !fileDrive && file[0] === "" && file[1] === "" && file[2] === "?" && /^[a-z]:$/i.test(file[3]);
@@ -4060,14 +4201,14 @@ var Minimatch = class {
4060
4201
  const fdi = fileUNC ? 3 : fileDrive ? 0 : void 0;
4061
4202
  const pdi = patternUNC ? 3 : patternDrive ? 0 : void 0;
4062
4203
  if (typeof fdi === "number" && typeof pdi === "number") {
4063
- const [fd, pd] = [file[fdi], pattern[pdi]];
4204
+ const [fd, pd] = [
4205
+ file[fdi],
4206
+ pattern[pdi]
4207
+ ];
4064
4208
  if (fd.toLowerCase() === pd.toLowerCase()) {
4065
4209
  pattern[pdi] = fd;
4066
- if (pdi > fdi) {
4067
- pattern = pattern.slice(pdi);
4068
- } else if (fdi > pdi) {
4069
- file = file.slice(fdi);
4070
- }
4210
+ patternStartIndex = pdi;
4211
+ fileStartIndex = fdi;
4071
4212
  }
4072
4213
  }
4073
4214
  }
@@ -4075,71 +4216,10 @@ var Minimatch = class {
4075
4216
  if (optimizationLevel >= 2) {
4076
4217
  file = this.levelTwoFileOptimize(file);
4077
4218
  }
4078
- this.debug("matchOne", this, { file, pattern });
4079
- this.debug("matchOne", file.length, pattern.length);
4080
- for (var fi = 0, pi = 0, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) {
4081
- this.debug("matchOne loop");
4082
- var p = pattern[pi];
4083
- var f = file[fi];
4084
- this.debug(pattern, p, f);
4085
- if (p === false) {
4086
- return false;
4087
- }
4088
- if (p === GLOBSTAR) {
4089
- this.debug("GLOBSTAR", [pattern, p, f]);
4090
- var fr = fi;
4091
- var pr = pi + 1;
4092
- if (pr === pl) {
4093
- this.debug("** at the end");
4094
- for (; fi < fl; fi++) {
4095
- if (file[fi] === "." || file[fi] === ".." || !options.dot && file[fi].charAt(0) === ".")
4096
- return false;
4097
- }
4098
- return true;
4099
- }
4100
- while (fr < fl) {
4101
- var swallowee = file[fr];
4102
- this.debug("\nglobstar while", file, fr, pattern, pr, swallowee);
4103
- if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) {
4104
- this.debug("globstar found match!", fr, fl, swallowee);
4105
- return true;
4106
- } else {
4107
- if (swallowee === "." || swallowee === ".." || !options.dot && swallowee.charAt(0) === ".") {
4108
- this.debug("dot detected!", file, fr, pattern, pr);
4109
- break;
4110
- }
4111
- this.debug("globstar swallow a segment, and continue");
4112
- fr++;
4113
- }
4114
- }
4115
- if (partial) {
4116
- this.debug("\n>>> no match, partial?", file, fr, pattern, pr);
4117
- if (fr === fl) {
4118
- return true;
4119
- }
4120
- }
4121
- return false;
4122
- }
4123
- let hit;
4124
- if (typeof p === "string") {
4125
- hit = f === p;
4126
- this.debug("string match", p, f, hit);
4127
- } else {
4128
- hit = p.test(f);
4129
- this.debug("pattern match", p, f, hit);
4130
- }
4131
- if (!hit)
4132
- return false;
4133
- }
4134
- if (fi === fl && pi === pl) {
4135
- return true;
4136
- } else if (fi === fl) {
4137
- return partial;
4138
- } else if (pi === pl) {
4139
- return fi === fl - 1 && file[fi] === "";
4140
- } else {
4141
- throw new Error("wtf?");
4219
+ if (pattern.includes(GLOBSTAR)) {
4220
+ return __privateMethod(this, _Minimatch_instances, matchGlobstar_fn).call(this, file, pattern, partial, fileStartIndex, patternStartIndex);
4142
4221
  }
4222
+ return __privateMethod(this, _Minimatch_instances, matchOne_fn).call(this, file, pattern, partial, fileStartIndex, patternStartIndex);
4143
4223
  }
4144
4224
  braceExpand() {
4145
4225
  return braceExpand(this.pattern, this.options);
@@ -4278,6 +4358,135 @@ var Minimatch = class {
4278
4358
  return minimatch.defaults(def).Minimatch;
4279
4359
  }
4280
4360
  };
4361
+ _Minimatch_instances = new WeakSet();
4362
+ matchGlobstar_fn = function(file, pattern, partial, fileIndex, patternIndex) {
4363
+ const firstgs = pattern.indexOf(GLOBSTAR, patternIndex);
4364
+ const lastgs = pattern.lastIndexOf(GLOBSTAR);
4365
+ const [head, body, tail] = partial ? [
4366
+ pattern.slice(patternIndex, firstgs),
4367
+ pattern.slice(firstgs + 1),
4368
+ []
4369
+ ] : [
4370
+ pattern.slice(patternIndex, firstgs),
4371
+ pattern.slice(firstgs + 1, lastgs),
4372
+ pattern.slice(lastgs + 1)
4373
+ ];
4374
+ if (head.length) {
4375
+ const fileHead = file.slice(fileIndex, fileIndex + head.length);
4376
+ if (!__privateMethod(this, _Minimatch_instances, matchOne_fn).call(this, fileHead, head, partial, 0, 0))
4377
+ return false;
4378
+ fileIndex += head.length;
4379
+ }
4380
+ let fileTailMatch = 0;
4381
+ if (tail.length) {
4382
+ if (tail.length + fileIndex > file.length)
4383
+ return false;
4384
+ let tailStart = file.length - tail.length;
4385
+ if (__privateMethod(this, _Minimatch_instances, matchOne_fn).call(this, file, tail, partial, tailStart, 0)) {
4386
+ fileTailMatch = tail.length;
4387
+ } else {
4388
+ if (file[file.length - 1] !== "" || fileIndex + tail.length === file.length) {
4389
+ return false;
4390
+ }
4391
+ tailStart--;
4392
+ if (!__privateMethod(this, _Minimatch_instances, matchOne_fn).call(this, file, tail, partial, tailStart, 0))
4393
+ return false;
4394
+ fileTailMatch = tail.length + 1;
4395
+ }
4396
+ }
4397
+ if (!body.length) {
4398
+ let sawSome = !!fileTailMatch;
4399
+ for (let i2 = fileIndex; i2 < file.length - fileTailMatch; i2++) {
4400
+ const f = String(file[i2]);
4401
+ sawSome = true;
4402
+ if (f === "." || f === ".." || !this.options.dot && f.startsWith(".")) {
4403
+ return false;
4404
+ }
4405
+ }
4406
+ return partial || sawSome;
4407
+ }
4408
+ const bodySegments = [[[], 0]];
4409
+ let currentBody = bodySegments[0];
4410
+ let nonGsParts = 0;
4411
+ const nonGsPartsSums = [0];
4412
+ for (const b of body) {
4413
+ if (b === GLOBSTAR) {
4414
+ nonGsPartsSums.push(nonGsParts);
4415
+ currentBody = [[], 0];
4416
+ bodySegments.push(currentBody);
4417
+ } else {
4418
+ currentBody[0].push(b);
4419
+ nonGsParts++;
4420
+ }
4421
+ }
4422
+ let i = bodySegments.length - 1;
4423
+ const fileLength = file.length - fileTailMatch;
4424
+ for (const b of bodySegments) {
4425
+ b[1] = fileLength - (nonGsPartsSums[i--] + b[0].length);
4426
+ }
4427
+ return !!__privateMethod(this, _Minimatch_instances, matchGlobStarBodySections_fn).call(this, file, bodySegments, fileIndex, 0, partial, 0, !!fileTailMatch);
4428
+ };
4429
+ matchGlobStarBodySections_fn = function(file, bodySegments, fileIndex, bodyIndex, partial, globStarDepth, sawTail) {
4430
+ const bs = bodySegments[bodyIndex];
4431
+ if (!bs) {
4432
+ for (let i = fileIndex; i < file.length; i++) {
4433
+ sawTail = true;
4434
+ const f = file[i];
4435
+ if (f === "." || f === ".." || !this.options.dot && f.startsWith(".")) {
4436
+ return false;
4437
+ }
4438
+ }
4439
+ return sawTail;
4440
+ }
4441
+ const [body, after] = bs;
4442
+ while (fileIndex <= after) {
4443
+ const m = __privateMethod(this, _Minimatch_instances, matchOne_fn).call(this, file.slice(0, fileIndex + body.length), body, partial, fileIndex, 0);
4444
+ if (m && globStarDepth < this.maxGlobstarRecursion) {
4445
+ const sub = __privateMethod(this, _Minimatch_instances, matchGlobStarBodySections_fn).call(this, file, bodySegments, fileIndex + body.length, bodyIndex + 1, partial, globStarDepth + 1, sawTail);
4446
+ if (sub !== false)
4447
+ return sub;
4448
+ }
4449
+ const f = file[fileIndex];
4450
+ if (f === "." || f === ".." || !this.options.dot && f.startsWith(".")) {
4451
+ return false;
4452
+ }
4453
+ fileIndex++;
4454
+ }
4455
+ return partial || null;
4456
+ };
4457
+ matchOne_fn = function(file, pattern, partial, fileIndex, patternIndex) {
4458
+ let fi;
4459
+ let pi;
4460
+ let pl;
4461
+ let fl;
4462
+ for (fi = fileIndex, pi = patternIndex, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) {
4463
+ this.debug("matchOne loop");
4464
+ let p = pattern[pi];
4465
+ let f = file[fi];
4466
+ this.debug(pattern, p, f);
4467
+ if (p === false || p === GLOBSTAR)
4468
+ return false;
4469
+ let hit;
4470
+ if (typeof p === "string") {
4471
+ hit = f === p;
4472
+ this.debug("string match", p, f, hit);
4473
+ } else {
4474
+ hit = p.test(f);
4475
+ this.debug("pattern match", p, f, hit);
4476
+ }
4477
+ if (!hit)
4478
+ return false;
4479
+ }
4480
+ if (fi === fl && pi === pl) {
4481
+ return true;
4482
+ } else if (fi === fl) {
4483
+ return partial;
4484
+ } else if (pi === pl) {
4485
+ return fi === fl - 1 && file[fi] === "";
4486
+ } else {
4487
+ throw new Error("wtf?");
4488
+ }
4489
+ };
4281
4490
  minimatch.AST = AST;
4282
4491
  minimatch.Minimatch = Minimatch;
4283
4492
  minimatch.escape = escape;
@@ -4914,9 +5123,9 @@ var taskWatch = async (coreCompiler, config) => {
4914
5123
  });
4915
5124
  if (devServer) {
4916
5125
  const rmDevServerLog = watcher.on("buildFinish", () => {
4917
- var _a;
5126
+ var _a2;
4918
5127
  rmDevServerLog();
4919
- const url = (_a = devServer == null ? void 0 : devServer.browserUrl) != null ? _a : "UNKNOWN URL";
5128
+ const url = (_a2 = devServer == null ? void 0 : devServer.browserUrl) != null ? _a2 : "UNKNOWN URL";
4920
5129
  config.logger.info(`${config.logger.cyan(url)}
4921
5130
  `);
4922
5131
  });
@@ -4950,8 +5159,8 @@ var isInteractive = (sys, flags, object) => {
4950
5159
  tty: sys.isTTY() ? true : false,
4951
5160
  ci: ["CI", "BUILD_ID", "BUILD_NUMBER", "BITBUCKET_COMMIT", "CODEBUILD_BUILD_ARN"].filter(
4952
5161
  (v) => {
4953
- var _a;
4954
- return !!((_a = sys.getEnvironmentVar) == null ? void 0 : _a.call(sys, v));
5162
+ var _a2;
5163
+ return !!((_a2 = sys.getEnvironmentVar) == null ? void 0 : _a2.call(sys, v));
4955
5164
  }
4956
5165
  ).length > 0 || !!flags.ci
4957
5166
  });
@@ -5057,22 +5266,22 @@ function hasAppTarget(config) {
5057
5266
  );
5058
5267
  }
5059
5268
  function isUsingYarn(sys) {
5060
- var _a, _b;
5061
- return ((_b = (_a = sys.getEnvironmentVar) == null ? void 0 : _a.call(sys, "npm_execpath")) == null ? void 0 : _b.includes("yarn")) || false;
5269
+ var _a2, _b;
5270
+ return ((_b = (_a2 = sys.getEnvironmentVar) == null ? void 0 : _a2.call(sys, "npm_execpath")) == null ? void 0 : _b.includes("yarn")) || false;
5062
5271
  }
5063
5272
  function getActiveTargets(config) {
5064
5273
  const result = config.outputTargets.map((t) => t.type);
5065
5274
  return Array.from(new Set(result));
5066
5275
  }
5067
5276
  var prepareData = async (coreCompiler, config, sys, duration_ms, component_count = void 0) => {
5068
- var _a, _b, _c;
5277
+ var _a2, _b, _c;
5069
5278
  const { typescript, rollup } = coreCompiler.versions || { typescript: "unknown", rollup: "unknown" };
5070
5279
  const { packages, packagesNoVersions } = await getInstalledPackages(sys, config);
5071
5280
  const targets = getActiveTargets(config);
5072
5281
  const yarn = isUsingYarn(sys);
5073
5282
  const stencil = coreCompiler.version || "unknown";
5074
5283
  const system = `${sys.name} ${sys.version}`;
5075
- const os_name = (_a = sys.details) == null ? void 0 : _a.platform;
5284
+ const os_name = (_a2 = sys.details) == null ? void 0 : _a2.platform;
5076
5285
  const os_version = (_b = sys.details) == null ? void 0 : _b.release;
5077
5286
  const cpu_model = (_c = sys.details) == null ? void 0 : _c.cpuModel;
5078
5287
  const build = coreCompiler.buildId || "unknown";
@@ -5189,21 +5398,21 @@ async function npmPackages(sys, ionicPackages) {
5189
5398
  const appRootDir = sys.getCurrentDirectory();
5190
5399
  const packageLockJson = await tryFn(readJson, sys, sys.resolvePath(appRootDir + "/package-lock.json"));
5191
5400
  return ionicPackages.map(([k, v]) => {
5192
- var _a, _b, _c, _d;
5193
- 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;
5401
+ var _a2, _b, _c, _d;
5402
+ 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;
5194
5403
  version = version.includes("file:") ? sanitizeDeclaredVersion(v) : version;
5195
5404
  return `${k}@${version}`;
5196
5405
  });
5197
5406
  }
5198
5407
  async function yarnPackages(sys, ionicPackages) {
5199
- var _a;
5408
+ var _a2;
5200
5409
  const appRootDir = sys.getCurrentDirectory();
5201
5410
  const yarnLock = sys.readFileSync(sys.resolvePath(appRootDir + "/yarn.lock"));
5202
- const yarnLockYml = (_a = sys.parseYarnLockFile) == null ? void 0 : _a.call(sys, yarnLock);
5411
+ const yarnLockYml = (_a2 = sys.parseYarnLockFile) == null ? void 0 : _a2.call(sys, yarnLock);
5203
5412
  return ionicPackages.map(([k, v]) => {
5204
- var _a2;
5413
+ var _a3;
5205
5414
  const identifiedVersion = `${k}@${v}`;
5206
- let version = (_a2 = yarnLockYml == null ? void 0 : yarnLockYml.object[identifiedVersion]) == null ? void 0 : _a2.version;
5415
+ let version = (_a3 = yarnLockYml == null ? void 0 : yarnLockYml.object[identifiedVersion]) == null ? void 0 : _a3.version;
5207
5416
  version = version && version.includes("undefined") ? sanitizeDeclaredVersion(identifiedVersion) : version;
5208
5417
  return `${k}@${version}`;
5209
5418
  });
@@ -5518,8 +5727,8 @@ var toPascalCase = (str) => str.split("-").reduce((res, part) => res + part[0].t
5518
5727
 
5519
5728
  // src/cli/task-telemetry.ts
5520
5729
  var taskTelemetry = async (flags, sys, logger) => {
5521
- var _a;
5522
- const prompt = logger.dim(((_a = sys.details) == null ? void 0 : _a.platform) === "windows" ? ">" : "$");
5730
+ var _a2;
5731
+ const prompt = logger.dim(((_a2 = sys.details) == null ? void 0 : _a2.platform) === "windows" ? ">" : "$");
5523
5732
  const isEnabling = flags.args.includes("on");
5524
5733
  const isDisabling = flags.args.includes("off");
5525
5734
  const INFORMATION = `Opt in or out of telemetry. Information about the data we collect is available on our website: ${logger.bold(
@@ -5557,8 +5766,8 @@ var taskTelemetry = async (flags, sys, logger) => {
5557
5766
 
5558
5767
  // src/cli/task-help.ts
5559
5768
  var taskHelp = async (flags, logger, sys) => {
5560
- var _a;
5561
- const prompt = logger.dim(((_a = sys.details) == null ? void 0 : _a.platform) === "windows" ? ">" : "$");
5769
+ var _a2;
5770
+ const prompt = logger.dim(((_a2 = sys.details) == null ? void 0 : _a2.platform) === "windows" ? ">" : "$");
5562
5771
  console.log(`
5563
5772
  ${logger.bold("Build:")} ${logger.dim("Build components for development or production.")}
5564
5773
 
@@ -5657,7 +5866,7 @@ var taskServe = async (config) => {
5657
5866
 
5658
5867
  // src/cli/task-test.ts
5659
5868
  var taskTest = async (config) => {
5660
- var _a;
5869
+ var _a2;
5661
5870
  config.buildDocs = false;
5662
5871
  const testingRunOpts = {
5663
5872
  e2e: !!config.flags.e2e,
@@ -5677,7 +5886,7 @@ var taskTest = async (config) => {
5677
5886
  );
5678
5887
  }
5679
5888
  }
5680
- const diagnostics = await ((_a = config.sys.lazyRequire) == null ? void 0 : _a.ensure(config.rootDir, ensureModuleIds));
5889
+ const diagnostics = await ((_a2 = config.sys.lazyRequire) == null ? void 0 : _a2.ensure(config.rootDir, ensureModuleIds));
5681
5890
  if (diagnostics && diagnostics.length > 0) {
5682
5891
  config.logger.printDiagnostics(diagnostics);
5683
5892
  return config.sys.exit(1);
@@ -5763,8 +5972,8 @@ var run = async (init) => {
5763
5972
  }
5764
5973
  };
5765
5974
  var runTask = async (coreCompiler, config, task, sys) => {
5766
- var _a;
5767
- const flags = createConfigFlags((_a = config.flags) != null ? _a : { task });
5975
+ var _a2;
5976
+ const flags = createConfigFlags((_a2 = config.flags) != null ? _a2 : { task });
5768
5977
  config.flags = flags;
5769
5978
  if (!config.sys) {
5770
5979
  config.sys = sys;