@stencil/core 4.18.0 → 4.18.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/cli/index.cjs +106 -215
  2. package/cli/index.js +107 -217
  3. package/cli/package.json +1 -1
  4. package/compiler/package.json +1 -1
  5. package/compiler/stencil.js +1686 -2826
  6. package/dev-server/client/index.js +1 -1
  7. package/dev-server/client/package.json +1 -1
  8. package/dev-server/connector.html +2 -2
  9. package/dev-server/index.js +1 -1
  10. package/dev-server/package.json +1 -1
  11. package/dev-server/server-process.js +117 -227
  12. package/internal/app-data/index.cjs +1 -0
  13. package/internal/app-data/index.js +1 -0
  14. package/internal/app-data/package.json +1 -1
  15. package/internal/client/index.js +53 -36
  16. package/internal/client/package.json +1 -1
  17. package/internal/client/patch-browser.js +1 -1
  18. package/internal/client/shadow-css.js +1 -2
  19. package/internal/hydrate/index.js +53 -36
  20. package/internal/hydrate/package.json +1 -1
  21. package/internal/hydrate/runner.js +52 -89
  22. package/internal/package.json +1 -1
  23. package/internal/stencil-public-compiler.d.ts +12 -1
  24. package/internal/stencil-public-runtime.d.ts +1 -0
  25. package/internal/testing/index.js +52 -35
  26. package/internal/testing/package.json +1 -1
  27. package/mock-doc/index.cjs +378 -493
  28. package/mock-doc/index.d.ts +1 -1
  29. package/mock-doc/index.js +378 -493
  30. package/mock-doc/package.json +1 -1
  31. package/package.json +5 -6
  32. package/screenshot/index.js +43 -85
  33. package/screenshot/package.json +1 -1
  34. package/screenshot/pixel-match.js +14 -27
  35. package/sys/node/glob.js +1 -1
  36. package/sys/node/index.js +42 -42
  37. package/sys/node/package.json +1 -1
  38. package/sys/node/worker.js +1 -1
  39. package/testing/index.js +148 -268
  40. package/testing/jest/jest-27-and-under/jest-facade.d.ts +1 -1
  41. package/testing/jest/jest-28/jest-facade.d.ts +5 -5
  42. package/testing/jest/jest-29/jest-facade.d.ts +5 -5
  43. package/testing/package.json +1 -1
package/cli/index.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- Stencil CLI (CommonJS) v4.18.0 | MIT Licensed | https://stenciljs.com
2
+ Stencil CLI (CommonJS) v4.18.1 | MIT Licensed | https://stenciljs.com
3
3
  */
4
4
  "use strict";
5
5
  var __create = Object.create;
@@ -135,56 +135,33 @@ var require_action = __commonJS({
135
135
  "node_modules/prompts/lib/util/action.js"(exports2, module2) {
136
136
  "use strict";
137
137
  module2.exports = (key, isSelect) => {
138
- if (key.meta && key.name !== "escape")
139
- return;
138
+ if (key.meta && key.name !== "escape") return;
140
139
  if (key.ctrl) {
141
- if (key.name === "a")
142
- return "first";
143
- if (key.name === "c")
144
- return "abort";
145
- if (key.name === "d")
146
- return "abort";
147
- if (key.name === "e")
148
- return "last";
149
- if (key.name === "g")
150
- return "reset";
140
+ if (key.name === "a") return "first";
141
+ if (key.name === "c") return "abort";
142
+ if (key.name === "d") return "abort";
143
+ if (key.name === "e") return "last";
144
+ if (key.name === "g") return "reset";
151
145
  }
152
146
  if (isSelect) {
153
- if (key.name === "j")
154
- return "down";
155
- if (key.name === "k")
156
- return "up";
157
- }
158
- if (key.name === "return")
159
- return "submit";
160
- if (key.name === "enter")
161
- return "submit";
162
- if (key.name === "backspace")
163
- return "delete";
164
- if (key.name === "delete")
165
- return "deleteForward";
166
- if (key.name === "abort")
167
- return "abort";
168
- if (key.name === "escape")
169
- return "exit";
170
- if (key.name === "tab")
171
- return "next";
172
- if (key.name === "pagedown")
173
- return "nextPage";
174
- if (key.name === "pageup")
175
- return "prevPage";
176
- if (key.name === "home")
177
- return "home";
178
- if (key.name === "end")
179
- return "end";
180
- if (key.name === "up")
181
- return "up";
182
- if (key.name === "down")
183
- return "down";
184
- if (key.name === "right")
185
- return "right";
186
- if (key.name === "left")
187
- return "left";
147
+ if (key.name === "j") return "down";
148
+ if (key.name === "k") return "up";
149
+ }
150
+ if (key.name === "return") return "submit";
151
+ if (key.name === "enter") return "submit";
152
+ if (key.name === "backspace") return "delete";
153
+ if (key.name === "delete") return "deleteForward";
154
+ if (key.name === "abort") return "abort";
155
+ if (key.name === "escape") return "exit";
156
+ if (key.name === "tab") return "next";
157
+ if (key.name === "pagedown") return "nextPage";
158
+ if (key.name === "pageup") return "prevPage";
159
+ if (key.name === "home") return "home";
160
+ if (key.name === "end") return "end";
161
+ if (key.name === "up") return "up";
162
+ if (key.name === "down") return "down";
163
+ if (key.name === "right") return "right";
164
+ if (key.name === "left") return "left";
188
165
  return false;
189
166
  };
190
167
  }
@@ -214,20 +191,15 @@ var require_src = __commonJS({
214
191
  var beep = "\x07";
215
192
  var cursor = {
216
193
  to(x, y) {
217
- if (!y)
218
- return `${CSI}${x + 1}G`;
194
+ if (!y) return `${CSI}${x + 1}G`;
219
195
  return `${CSI}${y + 1};${x + 1}H`;
220
196
  },
221
197
  move(x, y) {
222
198
  let ret = "";
223
- if (x < 0)
224
- ret += `${CSI}${-x}D`;
225
- else if (x > 0)
226
- ret += `${CSI}${x}C`;
227
- if (y < 0)
228
- ret += `${CSI}${-y}A`;
229
- else if (y > 0)
230
- ret += `${CSI}${y}B`;
199
+ if (x < 0) ret += `${CSI}${-x}D`;
200
+ else if (x > 0) ret += `${CSI}${x}C`;
201
+ if (y < 0) ret += `${CSI}${-y}A`;
202
+ else if (y > 0) ret += `${CSI}${y}B`;
231
203
  return ret;
232
204
  },
233
205
  up: (count = 1) => `${CSI}${count}A`,
@@ -274,8 +246,7 @@ var require_clear = __commonJS({
274
246
  var { erase, cursor } = require_src();
275
247
  var width = (str) => [...strip(str)].length;
276
248
  module2.exports = function(prompt, perLine) {
277
- if (!perLine)
278
- return erase.line + cursor.to(0);
249
+ if (!perLine) return erase.line + cursor.to(0);
279
250
  let rows = 0;
280
251
  const lines = prompt.split(/\r?\n/);
281
252
  for (let line of lines) {
@@ -363,8 +334,7 @@ var require_lines = __commonJS({
363
334
  var strip = require_strip();
364
335
  module2.exports = function(msg, perLine) {
365
336
  let lines = String(strip(msg) || "").split(/\r?\n/);
366
- if (!perLine)
367
- return lines.length;
337
+ if (!perLine) return lines.length;
368
338
  return lines.map((l) => Math.ceil(l.length / perLine)).reduce((a, b) => a + b);
369
339
  };
370
340
  }
@@ -380,8 +350,7 @@ var require_wrap = __commonJS({
380
350
  return (msg || "").split(/\r?\n/g).map((line) => line.split(/\s+/g).reduce((arr, w) => {
381
351
  if (w.length + tab.length >= width || arr[arr.length - 1].length + w.length + 1 < width)
382
352
  arr[arr.length - 1] += ` ${w}`;
383
- else
384
- arr.push(`${tab}${w}`);
353
+ else arr.push(`${tab}${w}`);
385
354
  return arr;
386
355
  }, [tab]).join("\n")).join("\n");
387
356
  };
@@ -395,8 +364,7 @@ var require_entriesToDisplay = __commonJS({
395
364
  module2.exports = (cursor, total, maxVisible) => {
396
365
  maxVisible = maxVisible || total;
397
366
  let startIndex = Math.min(total - maxVisible, cursor - Math.floor(maxVisible / 2));
398
- if (startIndex < 0)
399
- startIndex = 0;
367
+ if (startIndex < 0) startIndex = 0;
400
368
  let endIndex = Math.min(startIndex + maxVisible, total);
401
369
  return { startIndex, endIndex };
402
370
  };
@@ -438,8 +406,7 @@ var require_prompt = __commonJS({
438
406
  this.onRender = (opts.onRender || (() => void 0)).bind(this);
439
407
  const rl = readline.createInterface({ input: this.in, escapeCodeTimeout: 50 });
440
408
  readline.emitKeypressEvents(this.in, rl);
441
- if (this.in.isTTY)
442
- this.in.setRawMode(true);
409
+ if (this.in.isTTY) this.in.setRawMode(true);
443
410
  const isSelect = ["SelectPrompt", "MultiselectPrompt"].indexOf(this.constructor.name) > -1;
444
411
  const keypress = (str, key) => {
445
412
  let a = action(key, isSelect);
@@ -454,8 +421,7 @@ var require_prompt = __commonJS({
454
421
  this.close = () => {
455
422
  this.out.write(cursor.show);
456
423
  this.in.removeListener("keypress", keypress);
457
- if (this.in.isTTY)
458
- this.in.setRawMode(false);
424
+ if (this.in.isTTY) this.in.setRawMode(false);
459
425
  rl.close();
460
426
  this.emit(this.aborted ? "abort" : this.exited ? "exit" : "submit", this.value);
461
427
  this.closed = true;
@@ -474,8 +440,7 @@ var require_prompt = __commonJS({
474
440
  }
475
441
  render() {
476
442
  this.onRender(color);
477
- if (this.firstRender)
478
- this.firstRender = false;
443
+ if (this.firstRender) this.firstRender = false;
479
444
  }
480
445
  };
481
446
  module2.exports = Prompt;
@@ -565,16 +530,14 @@ var require_text = __commonJS({
565
530
  this.close();
566
531
  }
567
532
  next() {
568
- if (!this.placeholder)
569
- return this.bell();
533
+ if (!this.placeholder) return this.bell();
570
534
  this.value = this.initial;
571
535
  this.cursor = this.rendered.length;
572
536
  this.fire();
573
537
  this.render();
574
538
  }
575
539
  moveCursor(n) {
576
- if (this.placeholder)
577
- return;
540
+ if (this.placeholder) return;
578
541
  this.cursor = this.cursor + n;
579
542
  this.cursorOffset += n;
580
543
  }
@@ -587,8 +550,7 @@ var require_text = __commonJS({
587
550
  this.render();
588
551
  }
589
552
  delete() {
590
- if (this.isCursorAtStart())
591
- return this.bell();
553
+ if (this.isCursorAtStart()) return this.bell();
592
554
  let s1 = this.value.slice(0, this.cursor - 1);
593
555
  let s2 = this.value.slice(this.cursor);
594
556
  this.value = `${s1}${s2}`;
@@ -602,8 +564,7 @@ var require_text = __commonJS({
602
564
  this.render();
603
565
  }
604
566
  deleteForward() {
605
- if (this.cursor * this.scale >= this.rendered.length || this.placeholder)
606
- return this.bell();
567
+ if (this.cursor * this.scale >= this.rendered.length || this.placeholder) return this.bell();
607
568
  let s1 = this.value.slice(0, this.cursor);
608
569
  let s2 = this.value.slice(this.cursor + 1);
609
570
  this.value = `${s1}${s2}`;
@@ -624,14 +585,12 @@ var require_text = __commonJS({
624
585
  this.render();
625
586
  }
626
587
  left() {
627
- if (this.cursor <= 0 || this.placeholder)
628
- return this.bell();
588
+ if (this.cursor <= 0 || this.placeholder) return this.bell();
629
589
  this.moveCursor(-1);
630
590
  this.render();
631
591
  }
632
592
  right() {
633
- if (this.cursor * this.scale >= this.rendered.length || this.placeholder)
634
- return this.bell();
593
+ if (this.cursor * this.scale >= this.rendered.length || this.placeholder) return this.bell();
635
594
  this.moveCursor(1);
636
595
  this.render();
637
596
  }
@@ -642,8 +601,7 @@ var require_text = __commonJS({
642
601
  return this.cursor === this.rendered.length || this.placeholder && this.cursor === this.rendered.length + 1;
643
602
  }
644
603
  render() {
645
- if (this.closed)
646
- return;
604
+ if (this.closed) return;
647
605
  if (!this.firstRender) {
648
606
  if (this.outputError)
649
607
  this.out.write(cursor.down(lines(this.outputError, this.out.columns) - 1) + clear(this.outputError, this.out.columns));
@@ -760,19 +718,15 @@ var require_select = __commonJS({
760
718
  this.render();
761
719
  }
762
720
  _(c, key) {
763
- if (c === " ")
764
- return this.submit();
721
+ if (c === " ") return this.submit();
765
722
  }
766
723
  get selection() {
767
724
  return this.choices[this.cursor];
768
725
  }
769
726
  render() {
770
- if (this.closed)
771
- return;
772
- if (this.firstRender)
773
- this.out.write(cursor.hide);
774
- else
775
- this.out.write(clear(this.outputText, this.out.columns));
727
+ if (this.closed) return;
728
+ if (this.firstRender) this.out.write(cursor.hide);
729
+ else this.out.write(clear(this.outputText, this.out.columns));
776
730
  super.render();
777
731
  let { startIndex, endIndex } = entriesToDisplay(this.cursor, this.choices.length, this.optionsPerPage);
778
732
  this.outputText = [
@@ -857,14 +811,12 @@ var require_toggle = __commonJS({
857
811
  this.close();
858
812
  }
859
813
  deactivate() {
860
- if (this.value === false)
861
- return this.bell();
814
+ if (this.value === false) return this.bell();
862
815
  this.value = false;
863
816
  this.render();
864
817
  }
865
818
  activate() {
866
- if (this.value === true)
867
- return this.bell();
819
+ if (this.value === true) return this.bell();
868
820
  this.value = true;
869
821
  this.render();
870
822
  }
@@ -895,17 +847,13 @@ var require_toggle = __commonJS({
895
847
  this.value = true;
896
848
  } else if (c === "0") {
897
849
  this.value = false;
898
- } else
899
- return this.bell();
850
+ } else return this.bell();
900
851
  this.render();
901
852
  }
902
853
  render() {
903
- if (this.closed)
904
- return;
905
- if (this.firstRender)
906
- this.out.write(cursor.hide);
907
- else
908
- this.out.write(clear(this.outputText, this.out.columns));
854
+ if (this.closed) return;
855
+ if (this.firstRender) this.out.write(cursor.hide);
856
+ else this.out.write(clear(this.outputText, this.out.columns));
909
857
  super.render();
910
858
  this.outputText = [
911
859
  style.symbol(this.done, this.aborted),
@@ -1251,8 +1199,7 @@ var require_date = __commonJS({
1251
1199
  return this._date;
1252
1200
  }
1253
1201
  set date(date) {
1254
- if (date)
1255
- this._date.setTime(date.getTime());
1202
+ if (date) this._date.setTime(date.getTime());
1256
1203
  }
1257
1204
  set mask(mask) {
1258
1205
  let result;
@@ -1265,8 +1212,7 @@ var require_date = __commonJS({
1265
1212
  let parts = this.parts.reduce((arr, i) => {
1266
1213
  if (typeof i === "string" && typeof arr[arr.length - 1] === "string")
1267
1214
  arr[arr.length - 1] += i;
1268
- else
1269
- arr.push(i);
1215
+ else arr.push(i);
1270
1216
  return arr;
1271
1217
  }, []);
1272
1218
  this.parts.splice(0);
@@ -1329,15 +1275,13 @@ var require_date = __commonJS({
1329
1275
  }
1330
1276
  left() {
1331
1277
  let prev = this.parts[this.cursor].prev();
1332
- if (prev == null)
1333
- return this.bell();
1278
+ if (prev == null) return this.bell();
1334
1279
  this.moveCursor(this.parts.indexOf(prev));
1335
1280
  this.render();
1336
1281
  }
1337
1282
  right() {
1338
1283
  let next = this.parts[this.cursor].next();
1339
- if (next == null)
1340
- return this.bell();
1284
+ if (next == null) return this.bell();
1341
1285
  this.moveCursor(this.parts.indexOf(next));
1342
1286
  this.render();
1343
1287
  }
@@ -1354,12 +1298,9 @@ var require_date = __commonJS({
1354
1298
  }
1355
1299
  }
1356
1300
  render() {
1357
- if (this.closed)
1358
- return;
1359
- if (this.firstRender)
1360
- this.out.write(cursor.hide);
1361
- else
1362
- this.out.write(clear(this.outputText, this.out.columns));
1301
+ if (this.closed) return;
1302
+ if (this.firstRender) this.out.write(cursor.hide);
1303
+ else this.out.write(clear(this.outputText, this.out.columns));
1363
1304
  super.render();
1364
1305
  this.outputText = [
1365
1306
  style.symbol(this.done, this.aborted),
@@ -1486,8 +1427,7 @@ var require_number = __commonJS({
1486
1427
  if (this.value === "") {
1487
1428
  this.value = this.min - this.inc;
1488
1429
  }
1489
- if (this.value >= this.max)
1490
- return this.bell();
1430
+ if (this.value >= this.max) return this.bell();
1491
1431
  this.value += this.inc;
1492
1432
  this.color = `cyan`;
1493
1433
  this.fire();
@@ -1498,8 +1438,7 @@ var require_number = __commonJS({
1498
1438
  if (this.value === "") {
1499
1439
  this.value = this.min + this.inc;
1500
1440
  }
1501
- if (this.value <= this.min)
1502
- return this.bell();
1441
+ if (this.value <= this.min) return this.bell();
1503
1442
  this.value -= this.inc;
1504
1443
  this.color = `cyan`;
1505
1444
  this.fire();
@@ -1507,8 +1446,7 @@ var require_number = __commonJS({
1507
1446
  }
1508
1447
  delete() {
1509
1448
  let val = this.value.toString();
1510
- if (val.length === 0)
1511
- return this.bell();
1449
+ if (val.length === 0) return this.bell();
1512
1450
  this.value = this.parse(val = val.slice(0, -1)) || ``;
1513
1451
  if (this.value !== "" && this.value < this.min) {
1514
1452
  this.value = this.min;
@@ -1523,27 +1461,21 @@ var require_number = __commonJS({
1523
1461
  this.render();
1524
1462
  }
1525
1463
  _(c, key) {
1526
- if (!this.valid(c))
1527
- return this.bell();
1464
+ if (!this.valid(c)) return this.bell();
1528
1465
  const now = Date.now();
1529
- if (now - this.lastHit > 1e3)
1530
- this.typed = ``;
1466
+ if (now - this.lastHit > 1e3) this.typed = ``;
1531
1467
  this.typed += c;
1532
1468
  this.lastHit = now;
1533
1469
  this.color = `cyan`;
1534
- if (c === `.`)
1535
- return this.fire();
1470
+ if (c === `.`) return this.fire();
1536
1471
  this.value = Math.min(this.parse(this.typed), this.max);
1537
- if (this.value > this.max)
1538
- this.value = this.max;
1539
- if (this.value < this.min)
1540
- this.value = this.min;
1472
+ if (this.value > this.max) this.value = this.max;
1473
+ if (this.value < this.min) this.value = this.min;
1541
1474
  this.fire();
1542
1475
  this.render();
1543
1476
  }
1544
1477
  render() {
1545
- if (this.closed)
1546
- return;
1478
+ if (this.closed) return;
1547
1479
  if (!this.firstRender) {
1548
1480
  if (this.outputError)
1549
1481
  this.out.write(cursor.down(lines(this.outputError, this.out.columns) - 1) + clear(this.outputError, this.out.columns));
@@ -1672,8 +1604,7 @@ var require_multiselect = __commonJS({
1672
1604
  this.render();
1673
1605
  }
1674
1606
  right() {
1675
- if (this.value.filter((e) => e.selected).length >= this.maxChoices)
1676
- return this.bell();
1607
+ if (this.value.filter((e) => e.selected).length >= this.maxChoices) return this.bell();
1677
1608
  this.value[this.cursor].selected = true;
1678
1609
  this.render();
1679
1610
  }
@@ -1773,10 +1704,8 @@ Instructions:
1773
1704
  return output.join(" ");
1774
1705
  }
1775
1706
  render() {
1776
- if (this.closed)
1777
- return;
1778
- if (this.firstRender)
1779
- this.out.write(cursor.hide);
1707
+ if (this.closed) return;
1708
+ if (this.firstRender) this.out.write(cursor.hide);
1780
1709
  super.render();
1781
1710
  let prompt = [
1782
1711
  style.symbol(this.done, this.aborted),
@@ -1849,15 +1778,13 @@ var require_autocomplete = __commonJS({
1849
1778
  this.select = i;
1850
1779
  if (this.suggestions.length > 0)
1851
1780
  this.value = getVal(this.suggestions, i);
1852
- else
1853
- this.value = this.fallback.value;
1781
+ else this.value = this.fallback.value;
1854
1782
  this.fire();
1855
1783
  }
1856
1784
  async complete(cb) {
1857
1785
  const p = this.completing = this.suggest(this.input, this.choices);
1858
1786
  const suggestions = await p;
1859
- if (this.completing !== p)
1860
- return;
1787
+ if (this.completing !== p) return;
1861
1788
  this.suggestions = suggestions.map((s, i, arr) => ({ title: getTitle(arr, i), value: getVal(arr, i), description: s.description }));
1862
1789
  this.completing = false;
1863
1790
  const l = Math.max(suggestions.length - 1, 0);
@@ -1909,8 +1836,7 @@ var require_autocomplete = __commonJS({
1909
1836
  this.render();
1910
1837
  }
1911
1838
  delete() {
1912
- if (this.cursor === 0)
1913
- return this.bell();
1839
+ if (this.cursor === 0) return this.bell();
1914
1840
  let s1 = this.input.slice(0, this.cursor - 1);
1915
1841
  let s2 = this.input.slice(this.cursor);
1916
1842
  this.input = `${s1}${s2}`;
@@ -1919,8 +1845,7 @@ var require_autocomplete = __commonJS({
1919
1845
  this.render();
1920
1846
  }
1921
1847
  deleteForward() {
1922
- if (this.cursor * this.scale >= this.rendered.length)
1923
- return this.bell();
1848
+ if (this.cursor * this.scale >= this.rendered.length) return this.bell();
1924
1849
  let s1 = this.input.slice(0, this.cursor);
1925
1850
  let s2 = this.input.slice(this.cursor + 1);
1926
1851
  this.input = `${s1}${s2}`;
@@ -1954,8 +1879,7 @@ var require_autocomplete = __commonJS({
1954
1879
  next() {
1955
1880
  if (this.select === this.suggestions.length - 1) {
1956
1881
  this.moveSelect(0);
1957
- } else
1958
- this.moveSelect(this.select + 1);
1882
+ } else this.moveSelect(this.select + 1);
1959
1883
  this.render();
1960
1884
  }
1961
1885
  nextPage() {
@@ -1967,14 +1891,12 @@ var require_autocomplete = __commonJS({
1967
1891
  this.render();
1968
1892
  }
1969
1893
  left() {
1970
- if (this.cursor <= 0)
1971
- return this.bell();
1894
+ if (this.cursor <= 0) return this.bell();
1972
1895
  this.cursor = this.cursor - 1;
1973
1896
  this.render();
1974
1897
  }
1975
1898
  right() {
1976
- if (this.cursor * this.scale >= this.rendered.length)
1977
- return this.bell();
1899
+ if (this.cursor * this.scale >= this.rendered.length) return this.bell();
1978
1900
  this.cursor = this.cursor + 1;
1979
1901
  this.render();
1980
1902
  }
@@ -1992,12 +1914,9 @@ var require_autocomplete = __commonJS({
1992
1914
  return prefix + " " + title + color.gray(desc || "");
1993
1915
  }
1994
1916
  render() {
1995
- if (this.closed)
1996
- return;
1997
- if (this.firstRender)
1998
- this.out.write(cursor.hide);
1999
- else
2000
- this.out.write(clear(this.outputText, this.out.columns));
1917
+ if (this.closed) return;
1918
+ if (this.firstRender) this.out.write(cursor.hide);
1919
+ else this.out.write(clear(this.outputText, this.out.columns));
2001
1920
  super.render();
2002
1921
  let { startIndex, endIndex } = entriesToDisplay(this.select, this.choices.length, this.limit);
2003
1922
  this.outputText = [
@@ -2069,8 +1988,7 @@ var require_autocompleteMultiselect = __commonJS({
2069
1988
  this.render();
2070
1989
  }
2071
1990
  right() {
2072
- if (this.value.filter((e) => e.selected).length >= this.maxChoices)
2073
- return this.bell();
1991
+ if (this.value.filter((e) => e.selected).length >= this.maxChoices) return this.bell();
2074
1992
  this.filteredOptions[this.cursor].selected = true;
2075
1993
  this.render();
2076
1994
  }
@@ -2147,10 +2065,8 @@ Filtered results for: ${this.inputValue ? this.inputValue : color.gray("Enter so
2147
2065
  }
2148
2066
  renderOption(cursor2, v, i) {
2149
2067
  let title;
2150
- if (v.disabled)
2151
- title = cursor2 === i ? color.gray().underline(v.title) : color.strikethrough().gray(v.title);
2152
- else
2153
- title = cursor2 === i ? color.cyan().underline(v.title) : v.title;
2068
+ if (v.disabled) title = cursor2 === i ? color.gray().underline(v.title) : color.strikethrough().gray(v.title);
2069
+ else title = cursor2 === i ? color.cyan().underline(v.title) : v.title;
2154
2070
  return (v.selected ? color.green(figures.radioOn) : figures.radioOff) + " " + title;
2155
2071
  }
2156
2072
  renderDoneOrInstructions() {
@@ -2164,10 +2080,8 @@ Filtered results for: ${this.inputValue ? this.inputValue : color.gray("Enter so
2164
2080
  return output.join(" ");
2165
2081
  }
2166
2082
  render() {
2167
- if (this.closed)
2168
- return;
2169
- if (this.firstRender)
2170
- this.out.write(cursor.hide);
2083
+ if (this.closed) return;
2084
+ if (this.firstRender) this.out.write(cursor.hide);
2171
2085
  super.render();
2172
2086
  let prompt = [
2173
2087
  style.symbol(this.done, this.aborted),
@@ -2243,12 +2157,9 @@ var require_confirm = __commonJS({
2243
2157
  return this.bell();
2244
2158
  }
2245
2159
  render() {
2246
- if (this.closed)
2247
- return;
2248
- if (this.firstRender)
2249
- this.out.write(cursor.hide);
2250
- else
2251
- this.out.write(clear(this.outputText, this.out.columns));
2160
+ if (this.closed) return;
2161
+ if (this.firstRender) this.out.write(cursor.hide);
2162
+ else this.out.write(clear(this.outputText, this.out.columns));
2252
2163
  super.render();
2253
2164
  this.outputText = [
2254
2165
  style.symbol(this.done, this.aborted),
@@ -2372,11 +2283,9 @@ var require_lib = __commonJS({
2372
2283
  type = await type(answer, { ...answers }, question);
2373
2284
  question["type"] = type;
2374
2285
  }
2375
- if (!type)
2376
- continue;
2286
+ if (!type) continue;
2377
2287
  for (let key in question) {
2378
- if (passOn.includes(key))
2379
- continue;
2288
+ if (passOn.includes(key)) continue;
2380
2289
  let value = question[key];
2381
2290
  question[key] = typeof value === "function" ? await value(answer, { ...answers }, lastPrompt) : value;
2382
2291
  }
@@ -2402,8 +2311,7 @@ var require_lib = __commonJS({
2402
2311
  } catch (err2) {
2403
2312
  quit = !await onCancel(question, answers);
2404
2313
  }
2405
- if (quit)
2406
- return answers;
2314
+ if (quit) return answers;
2407
2315
  }
2408
2316
  return answers;
2409
2317
  }
@@ -2725,18 +2633,15 @@ var reducePathComponents = (components) => {
2725
2633
  const reduced = [components[0]];
2726
2634
  for (let i = 1; i < components.length; i++) {
2727
2635
  const component = components[i];
2728
- if (!component)
2729
- continue;
2730
- if (component === ".")
2731
- continue;
2636
+ if (!component) continue;
2637
+ if (component === ".") continue;
2732
2638
  if (component === "..") {
2733
2639
  if (reduced.length > 1) {
2734
2640
  if (reduced[reduced.length - 1] !== "..") {
2735
2641
  reduced.pop();
2736
2642
  continue;
2737
2643
  }
2738
- } else if (reduced[0])
2739
- continue;
2644
+ } else if (reduced[0]) continue;
2740
2645
  }
2741
2646
  reduced.push(component);
2742
2647
  }
@@ -2747,23 +2652,18 @@ var getRootLength = (path) => {
2747
2652
  return rootLength < 0 ? ~rootLength : rootLength;
2748
2653
  };
2749
2654
  var getEncodedRootLength = (path) => {
2750
- if (!path)
2751
- return 0;
2655
+ if (!path) return 0;
2752
2656
  const ch0 = path.charCodeAt(0);
2753
2657
  if (ch0 === 47 /* slash */ || ch0 === 92 /* backslash */) {
2754
- if (path.charCodeAt(1) !== ch0)
2755
- return 1;
2658
+ if (path.charCodeAt(1) !== ch0) return 1;
2756
2659
  const p1 = path.indexOf(ch0 === 47 /* slash */ ? "/" : altDirectorySeparator, 2);
2757
- if (p1 < 0)
2758
- return path.length;
2660
+ if (p1 < 0) return path.length;
2759
2661
  return p1 + 1;
2760
2662
  }
2761
2663
  if (isVolumeCharacter(ch0) && path.charCodeAt(1) === 58 /* colon */) {
2762
2664
  const ch2 = path.charCodeAt(2);
2763
- if (ch2 === 47 /* slash */ || ch2 === 92 /* backslash */)
2764
- return 3;
2765
- if (path.length === 2)
2766
- return 2;
2665
+ if (ch2 === 47 /* slash */ || ch2 === 92 /* backslash */) return 3;
2666
+ if (path.length === 2) return 2;
2767
2667
  }
2768
2668
  const schemeEnd = path.indexOf(urlSchemeSeparator);
2769
2669
  if (schemeEnd !== -1) {
@@ -2792,12 +2692,10 @@ var getEncodedRootLength = (path) => {
2792
2692
  var isVolumeCharacter = (charCode) => charCode >= 97 /* a */ && charCode <= 122 /* z */ || charCode >= 65 /* A */ && charCode <= 90 /* Z */;
2793
2693
  var getFileUrlVolumeSeparatorEnd = (url, start) => {
2794
2694
  const ch0 = url.charCodeAt(start);
2795
- if (ch0 === 58 /* colon */)
2796
- return start + 1;
2695
+ if (ch0 === 58 /* colon */) return start + 1;
2797
2696
  if (ch0 === 37 /* percent */ && url.charCodeAt(start + 1) === 51 /* _3 */) {
2798
2697
  const ch2 = url.charCodeAt(start + 2);
2799
- if (ch2 === 97 /* a */ || ch2 === 65 /* A */)
2800
- return start + 3;
2698
+ if (ch2 === 97 /* a */ || ch2 === 65 /* A */) return start + 3;
2801
2699
  }
2802
2700
  return -1;
2803
2701
  };
@@ -2935,8 +2833,7 @@ var parseArgs = (flags, args) => {
2935
2833
  };
2936
2834
  var parseCLITerm = (flags, args) => {
2937
2835
  const arg = args.shift();
2938
- if (arg === void 0)
2939
- return;
2836
+ if (arg === void 0) return;
2940
2837
  const isNegatedBoolean = !readOnlyArrayHasStringMember(BOOLEAN_CLI_FLAGS, normalizeFlagName(arg)) && readOnlyArrayHasStringMember(BOOLEAN_CLI_FLAGS, normalizeNegativeFlagName(arg));
2941
2838
  const isNegatedBooleanOrString = !readOnlyArrayHasStringMember(BOOLEAN_STRING_CLI_FLAGS, normalizeFlagName(arg)) && readOnlyArrayHasStringMember(BOOLEAN_STRING_CLI_FLAGS, normalizeNegativeFlagName(arg));
2942
2839
  if (arg.startsWith("--") && arg.includes("=")) {
@@ -3141,13 +3038,7 @@ var findConfig = async (opts) => {
3141
3038
 
3142
3039
  // src/cli/load-compiler.ts
3143
3040
  var loadCoreCompiler = async (sys) => {
3144
- const compilerMod = await sys.dynamicImport(sys.getCompilerExecutingPath());
3145
- if (globalThis.stencil) {
3146
- return globalThis.stencil;
3147
- } else {
3148
- globalThis.stencil = compilerMod;
3149
- return compilerMod;
3150
- }
3041
+ return await sys.dynamicImport(sys.getCompilerExecutingPath());
3151
3042
  };
3152
3043
 
3153
3044
  // src/cli/logs.ts