@stencil/core 3.2.1-dev.1682485310.23f1e66 → 3.2.1-dev.1682658131.2c03eca
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 +1 -1
- package/cli/index.js +1 -1
- package/cli/package.json +1 -1
- package/compiler/package.json +1 -1
- package/compiler/stencil.js +4 -4
- package/compiler/stencil.min.js +2 -2
- package/dev-server/client/index.js +1 -1
- package/dev-server/client/package.json +1 -1
- package/dev-server/connector.html +2 -2
- package/dev-server/index.js +1 -1
- package/dev-server/package.json +1 -1
- package/dev-server/server-process.js +2 -2
- package/internal/app-data/package.json +1 -1
- package/internal/client/css-shim.js +1 -1
- package/internal/client/dom.js +1 -1
- package/internal/client/index.js +1 -1
- package/internal/client/package.json +1 -1
- package/internal/client/patch-browser.js +1 -1
- package/internal/client/patch-esm.js +1 -1
- package/internal/client/shadow-css.js +1 -1
- package/internal/hydrate/package.json +1 -1
- package/internal/package.json +1 -1
- package/internal/testing/package.json +1 -1
- package/mock-doc/index.cjs +1 -1
- package/mock-doc/index.js +1 -1
- package/mock-doc/package.json +1 -1
- package/package.json +1 -1
- package/readme.md +1 -1
- package/screenshot/package.json +1 -1
- package/sys/node/713.node-fetch.js +0 -1
- package/sys/node/index.js +1 -1
- package/sys/node/package.json +1 -1
- package/sys/node/worker.js +1 -1
- package/testing/index.js +372 -363
- package/testing/jest/jest-setup-test-framework.d.ts +8 -0
- package/testing/jest/test/jest-setup-test-framework.spec.d.ts +1 -0
- package/testing/package.json +1 -1
package/testing/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
Stencil Testing v3.2.1-dev.
|
|
2
|
+
Stencil Testing v3.2.1-dev.1682658131.2c03eca | MIT Licensed | https://stenciljs.com
|
|
3
3
|
*/
|
|
4
4
|
function _lazyRequire(e) {
|
|
5
5
|
return new Proxy({}, {
|
|
@@ -50,7 +50,7 @@ function createCommonjsModule(e, t, r) {
|
|
|
50
50
|
|
|
51
51
|
async function startPuppeteerBrowser(e) {
|
|
52
52
|
if (!e.flags.e2e) return null;
|
|
53
|
-
const t = process.env, r = e.testing.browserExecutablePath ? "puppeteer-core" : "puppeteer", s = e.sys.lazyRequire.getModulePath(e.rootDir, r), n = e.sys.platformPath.join(s, "package.json"),
|
|
53
|
+
const t = process.env, r = e.testing.browserExecutablePath ? "puppeteer-core" : "puppeteer", s = e.sys.lazyRequire.getModulePath(e.rootDir, r), n = e.sys.platformPath.join(s, "package.json"), o = e.sys.lazyRequire.require(e.rootDir, s);
|
|
54
54
|
t.__STENCIL_PUPPETEER_MODULE__ = s;
|
|
55
55
|
try {
|
|
56
56
|
const r = e.sys.readFileSync(n, "utf8"), s = JSON.parse(r);
|
|
@@ -64,23 +64,23 @@ async function startPuppeteerBrowser(e) {
|
|
|
64
64
|
e.logger.debug(`puppeteer headless: ${e.testing.browserHeadless}`), Array.isArray(e.testing.browserArgs) && e.logger.debug(`puppeteer args: ${e.testing.browserArgs.join(" ")}`),
|
|
65
65
|
"boolean" == typeof e.testing.browserDevtools && e.logger.debug(`puppeteer devtools: ${e.testing.browserDevtools}`),
|
|
66
66
|
"number" == typeof e.testing.browserSlowMo && e.logger.debug(`puppeteer slowMo: ${e.testing.browserSlowMo}`);
|
|
67
|
-
const
|
|
67
|
+
const i = {
|
|
68
68
|
ignoreHTTPSErrors: !0,
|
|
69
69
|
slowMo: e.testing.browserSlowMo
|
|
70
70
|
};
|
|
71
71
|
let a;
|
|
72
|
-
if (e.testing.browserWSEndpoint) a = await
|
|
72
|
+
if (e.testing.browserWSEndpoint) a = await o.connect({
|
|
73
73
|
browserWSEndpoint: e.testing.browserWSEndpoint,
|
|
74
|
-
...
|
|
74
|
+
...i
|
|
75
75
|
}); else {
|
|
76
76
|
const t = {
|
|
77
77
|
args: e.testing.browserArgs,
|
|
78
78
|
headless: e.testing.browserHeadless,
|
|
79
79
|
devtools: e.testing.browserDevtools,
|
|
80
|
-
...
|
|
80
|
+
...i
|
|
81
81
|
};
|
|
82
82
|
e.testing.browserExecutablePath && (t.executablePath = e.testing.browserExecutablePath),
|
|
83
|
-
a = await
|
|
83
|
+
a = await o.launch({
|
|
84
84
|
...t
|
|
85
85
|
});
|
|
86
86
|
}
|
|
@@ -142,30 +142,30 @@ function getCompilerOptions(e) {
|
|
|
142
142
|
};
|
|
143
143
|
if (1 === e.category && (r.level = "error"), e.file && "number" == typeof e.start) {
|
|
144
144
|
r.absFilePath = e.file.fileName;
|
|
145
|
-
const n = "string" != typeof (s = e.file.text) ? [] : (s = s.replace(/\\r/g, "\n")).split("\n"),
|
|
146
|
-
lineIndex:
|
|
147
|
-
lineNumber:
|
|
148
|
-
text: n[
|
|
149
|
-
errorCharStart:
|
|
145
|
+
const n = "string" != typeof (s = e.file.text) ? [] : (s = s.replace(/\\r/g, "\n")).split("\n"), o = e.file.getLineAndCharacterOfPosition(e.start), i = {
|
|
146
|
+
lineIndex: o.line,
|
|
147
|
+
lineNumber: o.line + 1,
|
|
148
|
+
text: n[o.line],
|
|
149
|
+
errorCharStart: o.character,
|
|
150
150
|
errorLength: Math.max(null !== (t = e.length) && void 0 !== t ? t : 0, 1)
|
|
151
151
|
};
|
|
152
|
-
if (r.lineNumber =
|
|
153
|
-
0 ===
|
|
154
|
-
|
|
152
|
+
if (r.lineNumber = i.lineNumber, r.columnNumber = i.errorCharStart + 1, r.lines.push(i),
|
|
153
|
+
0 === i.errorLength && i.errorCharStart > 0 && (i.errorLength = 1, i.errorCharStart--),
|
|
154
|
+
i.lineIndex > 0) {
|
|
155
155
|
const e = {
|
|
156
|
-
lineIndex:
|
|
157
|
-
lineNumber:
|
|
158
|
-
text: n[
|
|
156
|
+
lineIndex: i.lineIndex - 1,
|
|
157
|
+
lineNumber: i.lineNumber - 1,
|
|
158
|
+
text: n[i.lineIndex - 1],
|
|
159
159
|
errorCharStart: -1,
|
|
160
160
|
errorLength: -1
|
|
161
161
|
};
|
|
162
162
|
r.lines.unshift(e);
|
|
163
163
|
}
|
|
164
|
-
if (
|
|
164
|
+
if (i.lineIndex + 1 < n.length) {
|
|
165
165
|
const e = {
|
|
166
|
-
lineIndex:
|
|
167
|
-
lineNumber:
|
|
168
|
-
text: n[
|
|
166
|
+
lineIndex: i.lineIndex + 1,
|
|
167
|
+
lineNumber: i.lineNumber + 1,
|
|
168
|
+
text: n[i.lineIndex + 1],
|
|
169
169
|
errorCharStart: -1,
|
|
170
170
|
errorLength: -1
|
|
171
171
|
};
|
|
@@ -249,7 +249,7 @@ async function runJest(e, t) {
|
|
|
249
249
|
testLocationInResults: !1,
|
|
250
250
|
"test-location-in-results": !1,
|
|
251
251
|
...n
|
|
252
|
-
}, n.config = function
|
|
252
|
+
}, n.config = function o(e) {
|
|
253
253
|
const t = e.testing, r = require("jest-config").defaults, s = Object.keys(r), n = {};
|
|
254
254
|
return Object.keys(t).forEach((e => {
|
|
255
255
|
s.includes(e) && (n[e] = t[e]);
|
|
@@ -265,11 +265,11 @@ async function runJest(e, t) {
|
|
|
265
265
|
n.maxWorkers = parseInt(n.maxWorkers, 10);
|
|
266
266
|
} catch (e) {}
|
|
267
267
|
return "string" == typeof n.ci && (n.ci = "true" === n.ci || "" === n.ci), n;
|
|
268
|
-
}(e),
|
|
268
|
+
}(e), o = function o(e, t) {
|
|
269
269
|
const r = t.projects ? t.projects : [];
|
|
270
270
|
return r.push(e.rootDir), r;
|
|
271
|
-
}(e, n), {runCLI:
|
|
272
|
-
r = !!(await
|
|
271
|
+
}(e, n), {runCLI: i} = require("@jest/core");
|
|
272
|
+
r = !!(await i(n, o)).results.success;
|
|
273
273
|
} catch (t) {
|
|
274
274
|
e.logger.error(`runJest: ${t}`);
|
|
275
275
|
}
|
|
@@ -317,11 +317,11 @@ function compareHtml(e, t, r) {
|
|
|
317
317
|
});
|
|
318
318
|
}
|
|
319
319
|
}
|
|
320
|
-
const
|
|
320
|
+
const o = index_cjs.parseHtmlToFragment(t), i = index_cjs.serializeNodeToHtml(o, {
|
|
321
321
|
prettyHtml: !0,
|
|
322
322
|
excludeTags: [ "body" ]
|
|
323
323
|
});
|
|
324
|
-
return s !==
|
|
324
|
+
return s !== i ? (expect(s).toBe(i), {
|
|
325
325
|
message: () => "HTML does not match",
|
|
326
326
|
pass: !1
|
|
327
327
|
}) : {
|
|
@@ -376,12 +376,18 @@ function resetBuildConditionals(e) {
|
|
|
376
376
|
e.scopedSlotTextContentFix = !1, e.slotChildNodesFix = !1;
|
|
377
377
|
}
|
|
378
378
|
|
|
379
|
+
function removeDomNodes(e) {
|
|
380
|
+
var t, r;
|
|
381
|
+
null != e && ((null === (t = e.childNodes) || void 0 === t ? void 0 : t.length) || e.remove(),
|
|
382
|
+
null === (r = e.childNodes) || void 0 === r || r.forEach(removeDomNodes));
|
|
383
|
+
}
|
|
384
|
+
|
|
379
385
|
function assertPath(e) {
|
|
380
386
|
if ("string" != typeof e) throw new TypeError("Path must be a string. Received " + JSON.stringify(e));
|
|
381
387
|
}
|
|
382
388
|
|
|
383
389
|
function normalizeStringPosix(e, t) {
|
|
384
|
-
var r, s, n,
|
|
390
|
+
var r, s, n, o = "", i = 0, a = -1, l = 0;
|
|
385
391
|
for (s = 0; s <= e.length; ++s) {
|
|
386
392
|
if (s < e.length) r = e.charCodeAt(s); else {
|
|
387
393
|
if (47 === r) break;
|
|
@@ -389,27 +395,27 @@ function normalizeStringPosix(e, t) {
|
|
|
389
395
|
}
|
|
390
396
|
if (47 === r) {
|
|
391
397
|
if (a === s - 1 || 1 === l) ; else if (a !== s - 1 && 2 === l) {
|
|
392
|
-
if (
|
|
393
|
-
if ((n =
|
|
394
|
-
-1 === n ? (
|
|
398
|
+
if (o.length < 2 || 2 !== i || 46 !== o.charCodeAt(o.length - 1) || 46 !== o.charCodeAt(o.length - 2)) if (o.length > 2) {
|
|
399
|
+
if ((n = o.lastIndexOf("/")) !== o.length - 1) {
|
|
400
|
+
-1 === n ? (o = "", i = 0) : i = (o = o.slice(0, n)).length - 1 - o.lastIndexOf("/"),
|
|
395
401
|
a = s, l = 0;
|
|
396
402
|
continue;
|
|
397
403
|
}
|
|
398
|
-
} else if (2 ===
|
|
399
|
-
|
|
404
|
+
} else if (2 === o.length || 1 === o.length) {
|
|
405
|
+
o = "", i = 0, a = s, l = 0;
|
|
400
406
|
continue;
|
|
401
407
|
}
|
|
402
|
-
t && (
|
|
403
|
-
} else
|
|
408
|
+
t && (o.length > 0 ? o += "/.." : o = "..", i = 2);
|
|
409
|
+
} else o.length > 0 ? o += "/" + e.slice(a + 1, s) : o = e.slice(a + 1, s), i = s - a - 1;
|
|
404
410
|
a = s, l = 0;
|
|
405
411
|
} else 46 === r && -1 !== l ? ++l : l = -1;
|
|
406
412
|
}
|
|
407
|
-
return
|
|
413
|
+
return o;
|
|
408
414
|
}
|
|
409
415
|
|
|
410
416
|
function specifierIncluded$1(e, t) {
|
|
411
|
-
var r, s, n,
|
|
412
|
-
for (r = 0; r < 3; ++r) if ((s = parseInt(
|
|
417
|
+
var r, s, n, o = e.split("."), i = t.split(" "), a = i.length > 1 ? i[0] : "=", l = (i.length > 1 ? i[1] : i[0]).split(".");
|
|
418
|
+
for (r = 0; r < 3; ++r) if ((s = parseInt(o[r] || 0, 10)) !== (n = parseInt(l[r] || 0, 10))) return "<" === a ? s < n : ">=" === a && s >= n;
|
|
413
419
|
return ">=" === a;
|
|
414
420
|
}
|
|
415
421
|
|
|
@@ -421,9 +427,9 @@ function matchesRange$1(e, t) {
|
|
|
421
427
|
}
|
|
422
428
|
|
|
423
429
|
function specifierIncluded(e) {
|
|
424
|
-
var t, r, s, n = e.split(" "),
|
|
425
|
-
for (t = 0; t < 3; ++t) if ((r = parseInt(current[t] || 0, 10)) !== (s = parseInt(
|
|
426
|
-
return ">=" ===
|
|
430
|
+
var t, r, s, n = e.split(" "), o = n.length > 1 ? n[0] : "=", i = (n.length > 1 ? n[1] : n[0]).split(".");
|
|
431
|
+
for (t = 0; t < 3; ++t) if ((r = parseInt(current[t] || 0, 10)) !== (s = parseInt(i[t] || 0, 10))) return "<" === o ? r < s : ">=" === o && r >= s;
|
|
432
|
+
return ">=" === o;
|
|
427
433
|
}
|
|
428
434
|
|
|
429
435
|
function matchesRange(e) {
|
|
@@ -544,19 +550,19 @@ async function initPageEvents(e) {
|
|
|
544
550
|
}
|
|
545
551
|
|
|
546
552
|
async function pageSpyOnEvent(e, t, r) {
|
|
547
|
-
const s = new EventSpy(t), n = "document" !== r ? () => window : () => document,
|
|
548
|
-
return await addE2EListener(e,
|
|
553
|
+
const s = new EventSpy(t), n = "document" !== r ? () => window : () => document, o = await e.evaluateHandle(n);
|
|
554
|
+
return await addE2EListener(e, o, t, (e => {
|
|
549
555
|
s.push(e);
|
|
550
556
|
})), s;
|
|
551
557
|
}
|
|
552
558
|
|
|
553
559
|
async function waitForEvent(e, t, r) {
|
|
554
560
|
const s = .5 * jasmine.DEFAULT_TIMEOUT_INTERVAL, n = await e.evaluate(((e, t, r) => new Promise(((s, n) => {
|
|
555
|
-
const
|
|
561
|
+
const o = setTimeout((() => {
|
|
556
562
|
n(new Error(`waitForEvent() timeout, eventName: ${t}`));
|
|
557
563
|
}), r);
|
|
558
564
|
e.addEventListener(t, (e => {
|
|
559
|
-
clearTimeout(
|
|
565
|
+
clearTimeout(o), s(window.stencilSerializeEvent(e));
|
|
560
566
|
}), {
|
|
561
567
|
once: !0
|
|
562
568
|
});
|
|
@@ -625,7 +631,7 @@ function browserContextEvents() {
|
|
|
625
631
|
}
|
|
626
632
|
|
|
627
633
|
async function find(e, t, r) {
|
|
628
|
-
const {lightSelector: s, shadowSelector: n, text:
|
|
634
|
+
const {lightSelector: s, shadowSelector: n, text: o, contains: i} = getSelector(r);
|
|
629
635
|
let a;
|
|
630
636
|
if (a = "string" == typeof s ? await async function l(e, t, r, s) {
|
|
631
637
|
let n = await t.$(r);
|
|
@@ -653,20 +659,20 @@ async function find(e, t, r) {
|
|
|
653
659
|
}(e), s;
|
|
654
660
|
}), t, r, s);
|
|
655
661
|
return n ? n.asElement() : null;
|
|
656
|
-
}(e, t,
|
|
662
|
+
}(e, t, o, i), !a) return null;
|
|
657
663
|
const u = new E2EElement(e, a);
|
|
658
664
|
return await u.e2eSync(), u;
|
|
659
665
|
}
|
|
660
666
|
|
|
661
667
|
async function findAll(e, t, r) {
|
|
662
|
-
const s = [], {lightSelector: n, shadowSelector:
|
|
663
|
-
if (0 ===
|
|
664
|
-
if (
|
|
665
|
-
const r = getPuppeteerExecution(
|
|
668
|
+
const s = [], {lightSelector: n, shadowSelector: o} = getSelector(r), i = await t.$$(n);
|
|
669
|
+
if (0 === i.length) return s;
|
|
670
|
+
if (o) for (let t = 0; t < i.length; t++) {
|
|
671
|
+
const r = getPuppeteerExecution(i[t]), n = await r.evaluateHandle(((e, t) => {
|
|
666
672
|
if (!e.shadowRoot) throw new Error(`shadow root does not exist for element: ${e.tagName.toLowerCase()}`);
|
|
667
673
|
return e.shadowRoot.querySelectorAll(t);
|
|
668
|
-
}),
|
|
669
|
-
await
|
|
674
|
+
}), i[t], o);
|
|
675
|
+
await i[t].dispose();
|
|
670
676
|
const a = await n.getProperties();
|
|
671
677
|
await n.dispose();
|
|
672
678
|
for (const t of a.values()) {
|
|
@@ -676,8 +682,8 @@ async function findAll(e, t, r) {
|
|
|
676
682
|
await t.e2eSync(), s.push(t);
|
|
677
683
|
}
|
|
678
684
|
}
|
|
679
|
-
} else for (let t = 0; t <
|
|
680
|
-
const r = new E2EElement(e,
|
|
685
|
+
} else for (let t = 0; t < i.length; t++) {
|
|
686
|
+
const r = new E2EElement(e, i[t]);
|
|
681
687
|
await r.e2eSync(), s.push(r);
|
|
682
688
|
}
|
|
683
689
|
return s;
|
|
@@ -720,7 +726,7 @@ function writeFile(e, t) {
|
|
|
720
726
|
}));
|
|
721
727
|
}
|
|
722
728
|
|
|
723
|
-
async function compareScreenshot(e, t, r, s, n,
|
|
729
|
+
async function compareScreenshot(e, t, r, s, n, o, i, a) {
|
|
724
730
|
const l = `${crypto$3.createHash("md5").update(r).digest("hex")}.png`, c = path$2.join(t.imagesDir, l);
|
|
725
731
|
await async function u(e, t) {
|
|
726
732
|
const r = await function s(e) {
|
|
@@ -729,7 +735,7 @@ async function compareScreenshot(e, t, r, s, n, i, o, a) {
|
|
|
729
735
|
}));
|
|
730
736
|
}(e);
|
|
731
737
|
r || await writeFile(e, t);
|
|
732
|
-
}(c, r), r = null,
|
|
738
|
+
}(c, r), r = null, i && (i = normalizePath(path$2.relative(t.rootDir, i)));
|
|
733
739
|
const d = function h(e, t) {
|
|
734
740
|
if ("string" != typeof t || 0 === t.trim().length) throw new Error("invalid test description");
|
|
735
741
|
const r = crypto$3.createHash("md5");
|
|
@@ -742,9 +748,9 @@ async function compareScreenshot(e, t, r, s, n, i, o, a) {
|
|
|
742
748
|
device: e.device,
|
|
743
749
|
userAgent: e.userAgent,
|
|
744
750
|
desc: s,
|
|
745
|
-
testPath:
|
|
751
|
+
testPath: i,
|
|
746
752
|
width: n,
|
|
747
|
-
height:
|
|
753
|
+
height: o,
|
|
748
754
|
deviceScaleFactor: e.viewport.deviceScaleFactor,
|
|
749
755
|
hasTouch: e.viewport.hasTouch,
|
|
750
756
|
isLandscape: e.viewport.isLandscape,
|
|
@@ -758,14 +764,14 @@ async function compareScreenshot(e, t, r, s, n, i, o, a) {
|
|
|
758
764
|
device: e.device,
|
|
759
765
|
userAgent: e.userAgent,
|
|
760
766
|
width: n,
|
|
761
|
-
height:
|
|
767
|
+
height: o,
|
|
762
768
|
deviceScaleFactor: e.viewport.deviceScaleFactor,
|
|
763
769
|
hasTouch: e.viewport.hasTouch,
|
|
764
770
|
isLandscape: e.viewport.isLandscape,
|
|
765
771
|
isMobile: e.viewport.isMobile,
|
|
766
772
|
allowableMismatchedPixels: t.allowableMismatchedPixels,
|
|
767
773
|
allowableMismatchedRatio: t.allowableMismatchedRatio,
|
|
768
|
-
testPath:
|
|
774
|
+
testPath: i
|
|
769
775
|
}
|
|
770
776
|
};
|
|
771
777
|
if (t.updateMaster) return await writeScreenshotData(t.currentBuildDir, p), p.diff;
|
|
@@ -787,7 +793,7 @@ async function compareScreenshot(e, t, r, s, n, i, o, a) {
|
|
|
787
793
|
};
|
|
788
794
|
p.diff.mismatchedPixels = await async function g(e, t) {
|
|
789
795
|
return new Promise(((r, s) => {
|
|
790
|
-
const n = .5 * jasmine.DEFAULT_TIMEOUT_INTERVAL,
|
|
796
|
+
const n = .5 * jasmine.DEFAULT_TIMEOUT_INTERVAL, o = setTimeout((() => {
|
|
791
797
|
s(`getMismatchedPixels timeout: ${n}ms`);
|
|
792
798
|
}), n);
|
|
793
799
|
try {
|
|
@@ -796,14 +802,14 @@ async function compareScreenshot(e, t, r, s, n, i, o, a) {
|
|
|
796
802
|
env: process.env,
|
|
797
803
|
cwd: process.cwd(),
|
|
798
804
|
stdio: [ "pipe", "pipe", "pipe", "ipc" ]
|
|
799
|
-
},
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
})),
|
|
803
|
-
clearTimeout(
|
|
804
|
-
})),
|
|
805
|
+
}, i = child_process$2.fork(e, [], n);
|
|
806
|
+
i.on("message", (e => {
|
|
807
|
+
i.kill(), clearTimeout(o), r(e);
|
|
808
|
+
})), i.on("error", (e => {
|
|
809
|
+
clearTimeout(o), s(e);
|
|
810
|
+
})), i.send(t);
|
|
805
811
|
} catch (e) {
|
|
806
|
-
clearTimeout(
|
|
812
|
+
clearTimeout(o), s(`getMismatchedPixels error: ${e}`);
|
|
807
813
|
}
|
|
808
814
|
}));
|
|
809
815
|
}(t.pixelmatchModulePath, n);
|
|
@@ -820,9 +826,9 @@ async function e2eGoTo(e, t, r = {}) {
|
|
|
820
826
|
if ("string" != typeof s) throw new Error("invalid gotoTest() browser url");
|
|
821
827
|
const n = s + t.substring(1);
|
|
822
828
|
r.waitUntil || (r.waitUntil = env.__STENCIL_BROWSER_WAIT_UNTIL);
|
|
823
|
-
const
|
|
824
|
-
if (!
|
|
825
|
-
return await waitForStencil(e, r),
|
|
829
|
+
const o = await e._e2eGoto(n, r);
|
|
830
|
+
if (!o.ok()) throw new Error(`Testing unable to load ${t}, HTTP status: ${o.status()}`);
|
|
831
|
+
return await waitForStencil(e, r), o;
|
|
826
832
|
}
|
|
827
833
|
|
|
828
834
|
async function e2eSetContent(e, t, r = {}) {
|
|
@@ -831,18 +837,18 @@ async function e2eSetContent(e, t, r = {}) {
|
|
|
831
837
|
const s = [], n = env.__STENCIL_APP_SCRIPT_URL__;
|
|
832
838
|
if ("string" != typeof n) throw new Error("invalid e2eSetContent() app script url");
|
|
833
839
|
s.push("<!doctype html>"), s.push("<html>"), s.push("<head>");
|
|
834
|
-
const
|
|
835
|
-
"string" == typeof
|
|
840
|
+
const o = env.__STENCIL_APP_STYLE_URL__;
|
|
841
|
+
"string" == typeof o && s.push(`<link rel="stylesheet" href="${o}">`), s.push(`<script type="module" src="${n}"><\/script>`),
|
|
836
842
|
s.push("</head>"), s.push("<body>"), s.push(t), s.push("</body>"), s.push("</html>");
|
|
837
|
-
const
|
|
843
|
+
const i = env.__STENCIL_BROWSER_URL__;
|
|
838
844
|
await e.setRequestInterception(!0), e.on("request", (e => {
|
|
839
|
-
|
|
845
|
+
i === e.url() ? e.respond({
|
|
840
846
|
status: 200,
|
|
841
847
|
contentType: "text/html",
|
|
842
848
|
body: s.join("\n")
|
|
843
849
|
}) : e.continue();
|
|
844
850
|
})), r.waitUntil || (r.waitUntil = env.__STENCIL_BROWSER_WAIT_UNTIL);
|
|
845
|
-
const a = await e._e2eGoto(
|
|
851
|
+
const a = await e._e2eGoto(i, r);
|
|
846
852
|
if (!a.ok()) throw new Error("Testing unable to load content");
|
|
847
853
|
return await waitForStencil(e, r), a;
|
|
848
854
|
}
|
|
@@ -933,13 +939,13 @@ function getAppStyleUrl(e, t) {
|
|
|
933
939
|
function getAppUrl(e, t, r) {
|
|
934
940
|
const s = e.outputTargets.find(isOutputTargetWww);
|
|
935
941
|
if (s) {
|
|
936
|
-
const e = s.buildDir, n = path$2.join(e, r),
|
|
937
|
-
return new URL(
|
|
942
|
+
const e = s.buildDir, n = path$2.join(e, r), o = path$2.relative(s.dir, n);
|
|
943
|
+
return new URL(o, t).href;
|
|
938
944
|
}
|
|
939
945
|
const n = e.outputTargets.find(isOutputTargetDistLazy);
|
|
940
946
|
if (n) {
|
|
941
|
-
const s = n.esmDir,
|
|
942
|
-
return new URL(
|
|
947
|
+
const s = n.esmDir, o = path$2.join(s, r), i = path$2.relative(e.rootDir, o);
|
|
948
|
+
return new URL(i, t).href;
|
|
943
949
|
}
|
|
944
950
|
return t;
|
|
945
951
|
}
|
|
@@ -962,35 +968,35 @@ constants$2 = {
|
|
|
962
968
|
FLAG_INCLUDE_PRERELEASE: 1,
|
|
963
969
|
FLAG_LOOSE: 2
|
|
964
970
|
}, re_1 = createCommonjsModule((function(e, t) {
|
|
965
|
-
const {MAX_SAFE_COMPONENT_LENGTH: r} = constants$2, s = (t = e.exports = {}).re = [], n = t.src = [],
|
|
966
|
-
let
|
|
971
|
+
const {MAX_SAFE_COMPONENT_LENGTH: r} = constants$2, s = (t = e.exports = {}).re = [], n = t.src = [], o = t.t = {};
|
|
972
|
+
let i = 0;
|
|
967
973
|
const a = (e, t, r) => {
|
|
968
|
-
const a =
|
|
969
|
-
debug_1(e, a, t),
|
|
974
|
+
const a = i++;
|
|
975
|
+
debug_1(e, a, t), o[e] = a, n[a] = t, s[a] = new RegExp(t, r ? "g" : void 0);
|
|
970
976
|
};
|
|
971
977
|
a("NUMERICIDENTIFIER", "0|[1-9]\\d*"), a("NUMERICIDENTIFIERLOOSE", "[0-9]+"), a("NONNUMERICIDENTIFIER", "\\d*[a-zA-Z-][a-zA-Z0-9-]*"),
|
|
972
|
-
a("MAINVERSION", `(${n[
|
|
973
|
-
a("MAINVERSIONLOOSE", `(${n[
|
|
974
|
-
a("PRERELEASEIDENTIFIER", `(?:${n[
|
|
975
|
-
a("PRERELEASEIDENTIFIERLOOSE", `(?:${n[
|
|
976
|
-
a("PRERELEASE", `(?:-(${n[
|
|
977
|
-
a("PRERELEASELOOSE", `(?:-?(${n[
|
|
978
|
-
a("BUILDIDENTIFIER", "[0-9A-Za-z-]+"), a("BUILD", `(?:\\+(${n[
|
|
979
|
-
a("FULLPLAIN", `v?${n[
|
|
980
|
-
a("LOOSEPLAIN", `[v=\\s]*${n[
|
|
981
|
-
a("LOOSE", `^${n[
|
|
982
|
-
a("XRANGEIDENTIFIER", `${n[
|
|
983
|
-
a("XRANGEPLAINLOOSE", `[v=\\s]*(${n[
|
|
984
|
-
a("XRANGE", `^${n[
|
|
978
|
+
a("MAINVERSION", `(${n[o.NUMERICIDENTIFIER]})\\.(${n[o.NUMERICIDENTIFIER]})\\.(${n[o.NUMERICIDENTIFIER]})`),
|
|
979
|
+
a("MAINVERSIONLOOSE", `(${n[o.NUMERICIDENTIFIERLOOSE]})\\.(${n[o.NUMERICIDENTIFIERLOOSE]})\\.(${n[o.NUMERICIDENTIFIERLOOSE]})`),
|
|
980
|
+
a("PRERELEASEIDENTIFIER", `(?:${n[o.NUMERICIDENTIFIER]}|${n[o.NONNUMERICIDENTIFIER]})`),
|
|
981
|
+
a("PRERELEASEIDENTIFIERLOOSE", `(?:${n[o.NUMERICIDENTIFIERLOOSE]}|${n[o.NONNUMERICIDENTIFIER]})`),
|
|
982
|
+
a("PRERELEASE", `(?:-(${n[o.PRERELEASEIDENTIFIER]}(?:\\.${n[o.PRERELEASEIDENTIFIER]})*))`),
|
|
983
|
+
a("PRERELEASELOOSE", `(?:-?(${n[o.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${n[o.PRERELEASEIDENTIFIERLOOSE]})*))`),
|
|
984
|
+
a("BUILDIDENTIFIER", "[0-9A-Za-z-]+"), a("BUILD", `(?:\\+(${n[o.BUILDIDENTIFIER]}(?:\\.${n[o.BUILDIDENTIFIER]})*))`),
|
|
985
|
+
a("FULLPLAIN", `v?${n[o.MAINVERSION]}${n[o.PRERELEASE]}?${n[o.BUILD]}?`), a("FULL", `^${n[o.FULLPLAIN]}$`),
|
|
986
|
+
a("LOOSEPLAIN", `[v=\\s]*${n[o.MAINVERSIONLOOSE]}${n[o.PRERELEASELOOSE]}?${n[o.BUILD]}?`),
|
|
987
|
+
a("LOOSE", `^${n[o.LOOSEPLAIN]}$`), a("GTLT", "((?:<|>)?=?)"), a("XRANGEIDENTIFIERLOOSE", `${n[o.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),
|
|
988
|
+
a("XRANGEIDENTIFIER", `${n[o.NUMERICIDENTIFIER]}|x|X|\\*`), a("XRANGEPLAIN", `[v=\\s]*(${n[o.XRANGEIDENTIFIER]})(?:\\.(${n[o.XRANGEIDENTIFIER]})(?:\\.(${n[o.XRANGEIDENTIFIER]})(?:${n[o.PRERELEASE]})?${n[o.BUILD]}?)?)?`),
|
|
989
|
+
a("XRANGEPLAINLOOSE", `[v=\\s]*(${n[o.XRANGEIDENTIFIERLOOSE]})(?:\\.(${n[o.XRANGEIDENTIFIERLOOSE]})(?:\\.(${n[o.XRANGEIDENTIFIERLOOSE]})(?:${n[o.PRERELEASELOOSE]})?${n[o.BUILD]}?)?)?`),
|
|
990
|
+
a("XRANGE", `^${n[o.GTLT]}\\s*${n[o.XRANGEPLAIN]}$`), a("XRANGELOOSE", `^${n[o.GTLT]}\\s*${n[o.XRANGEPLAINLOOSE]}$`),
|
|
985
991
|
a("COERCE", `(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?(?:$|[^\\d])`),
|
|
986
|
-
a("COERCERTL", n[
|
|
987
|
-
t.tildeTrimReplace = "$1~", a("TILDE", `^${n[
|
|
988
|
-
a("TILDELOOSE", `^${n[
|
|
989
|
-
a("CARETTRIM", `(\\s*)${n[
|
|
990
|
-
a("CARETLOOSE", `^${n[
|
|
991
|
-
a("COMPARATOR", `^${n[
|
|
992
|
-
t.comparatorTrimReplace = "$1$2$3", a("HYPHENRANGE", `^\\s*(${n[
|
|
993
|
-
a("HYPHENRANGELOOSE", `^\\s*(${n[
|
|
992
|
+
a("COERCERTL", n[o.COERCE], !0), a("LONETILDE", "(?:~>?)"), a("TILDETRIM", `(\\s*)${n[o.LONETILDE]}\\s+`, !0),
|
|
993
|
+
t.tildeTrimReplace = "$1~", a("TILDE", `^${n[o.LONETILDE]}${n[o.XRANGEPLAIN]}$`),
|
|
994
|
+
a("TILDELOOSE", `^${n[o.LONETILDE]}${n[o.XRANGEPLAINLOOSE]}$`), a("LONECARET", "(?:\\^)"),
|
|
995
|
+
a("CARETTRIM", `(\\s*)${n[o.LONECARET]}\\s+`, !0), t.caretTrimReplace = "$1^", a("CARET", `^${n[o.LONECARET]}${n[o.XRANGEPLAIN]}$`),
|
|
996
|
+
a("CARETLOOSE", `^${n[o.LONECARET]}${n[o.XRANGEPLAINLOOSE]}$`), a("COMPARATORLOOSE", `^${n[o.GTLT]}\\s*(${n[o.LOOSEPLAIN]})$|^$`),
|
|
997
|
+
a("COMPARATOR", `^${n[o.GTLT]}\\s*(${n[o.FULLPLAIN]})$|^$`), a("COMPARATORTRIM", `(\\s*)${n[o.GTLT]}\\s*(${n[o.LOOSEPLAIN]}|${n[o.XRANGEPLAIN]})`, !0),
|
|
998
|
+
t.comparatorTrimReplace = "$1$2$3", a("HYPHENRANGE", `^\\s*(${n[o.XRANGEPLAIN]})\\s+-\\s+(${n[o.XRANGEPLAIN]})\\s*$`),
|
|
999
|
+
a("HYPHENRANGELOOSE", `^\\s*(${n[o.XRANGEPLAINLOOSE]})\\s+-\\s+(${n[o.XRANGEPLAINLOOSE]})\\s*$`),
|
|
994
1000
|
a("STAR", "(<|>)?=?\\s*\\*"), a("GTE0", "^\\s*>=\\s*0\\.0\\.0\\s*$"), a("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$");
|
|
995
1001
|
}));
|
|
996
1002
|
|
|
@@ -1188,8 +1194,8 @@ const formatComponentRuntimeMembers = (e, t = !0) => ({
|
|
|
1188
1194
|
}, noop = () => {}, isFunction = e => "function" == typeof e, isString = e => "string" == typeof e, isIterable = e => (e => null != e)(e) && isFunction(e[Symbol.iterator]), windowsPathRegex = /^(?:[a-zA-Z]:|[\\/]{2}[^\\/]+[\\/]+[^\\/]+)?[\\/]$/, hasError = e => null != e && 0 !== e.length && e.some((e => "error" === e.level && "runtime" !== e.type)), normalizePath = e => {
|
|
1189
1195
|
if ("string" != typeof e) throw new Error("invalid path to normalize");
|
|
1190
1196
|
e = normalizeSlashes(e.trim());
|
|
1191
|
-
const t = pathComponents(e, getRootLength(e)), r = reducePathComponents(t), s = r[0], n = r[1],
|
|
1192
|
-
return "" ===
|
|
1197
|
+
const t = pathComponents(e, getRootLength(e)), r = reducePathComponents(t), s = r[0], n = r[1], o = s + r.slice(1).join("/");
|
|
1198
|
+
return "" === o ? "." : "" === s && n && e.includes("/") && !n.startsWith(".") && !n.startsWith("@") ? "./" + o : o;
|
|
1193
1199
|
}, normalizeSlashes = e => e.replace(backslashRegExp, "/"), backslashRegExp = /\\/g, reducePathComponents = e => {
|
|
1194
1200
|
if (!Array.isArray(e) || 0 === e.length) return [];
|
|
1195
1201
|
const t = [ e[0] ];
|
|
@@ -1226,8 +1232,8 @@ const formatComponentRuntimeMembers = (e, t = !0) => ({
|
|
|
1226
1232
|
if (-1 !== r) {
|
|
1227
1233
|
const t = r + 3, s = e.indexOf("/", t);
|
|
1228
1234
|
if (-1 !== s) {
|
|
1229
|
-
const n = e.slice(0, r),
|
|
1230
|
-
if ("file" === n && ("" ===
|
|
1235
|
+
const n = e.slice(0, r), o = e.slice(t, s);
|
|
1236
|
+
if ("file" === n && ("" === o || "localhost" === o) && isVolumeCharacter(e.charCodeAt(s + 1))) {
|
|
1231
1237
|
const t = getFileUrlVolumeSeparatorEnd(e, s + 2);
|
|
1232
1238
|
if (-1 !== t) {
|
|
1233
1239
|
if (47 === e.charCodeAt(t)) return ~(t + 1);
|
|
@@ -1254,12 +1260,12 @@ const formatComponentRuntimeMembers = (e, t = !0) => ({
|
|
|
1254
1260
|
var r, s;
|
|
1255
1261
|
if ("string" == typeof t) return t;
|
|
1256
1262
|
if (void 0 === t) return "";
|
|
1257
|
-
const n = [],
|
|
1258
|
-
|
|
1259
|
-
let
|
|
1260
|
-
if (!n.includes(t.code) && (
|
|
1261
|
-
return
|
|
1262
|
-
|
|
1263
|
+
const n = [], o = (null !== (s = null === (r = e.file) || void 0 === r ? void 0 : r.fileName) && void 0 !== s ? s : "").includes("stencil.config");
|
|
1264
|
+
o && n.push(2322);
|
|
1265
|
+
let i = "";
|
|
1266
|
+
if (!n.includes(t.code) && (i = t.messageText, isIterable(t.next))) for (const r of t.next) i += flattenDiagnosticMessageText(e, r);
|
|
1267
|
+
return o && (i = i.replace("type 'StencilConfig'", "Stencil Config"), i = i.replace("Object literal may only specify known properties, but ", ""),
|
|
1268
|
+
i = i.replace("Object literal may only specify known properties, and ", "")), i.trim();
|
|
1263
1269
|
}, isOutputTargetDistLazy = e => "dist-lazy" === e.type, isOutputTargetWww = e => "www" === e.type, isJest27TransformOptions = e => null != e && "object" == typeof e && e.hasOwnProperty("config");
|
|
1264
1270
|
|
|
1265
1271
|
let _tsCompilerOptions = null, _tsCompilerOptionsKey = null;
|
|
@@ -1283,12 +1289,12 @@ const jestPreprocessor = {
|
|
|
1283
1289
|
currentDirectory: s.rootDir
|
|
1284
1290
|
}, n = getCompilerOptions(s.rootDir);
|
|
1285
1291
|
n && (n.baseUrl && (r.baseUrl = n.baseUrl), n.paths && (r.paths = n.paths));
|
|
1286
|
-
const
|
|
1287
|
-
if (
|
|
1288
|
-
const e =
|
|
1292
|
+
const o = transpile(e, r), i = o.diagnostics.some((e => "error" === e.level));
|
|
1293
|
+
if (o.diagnostics && i) {
|
|
1294
|
+
const e = o.diagnostics.map(formatDiagnostic).join("\n\n");
|
|
1289
1295
|
throw new Error(e);
|
|
1290
1296
|
}
|
|
1291
|
-
return
|
|
1297
|
+
return o.code;
|
|
1292
1298
|
}
|
|
1293
1299
|
return e;
|
|
1294
1300
|
},
|
|
@@ -1304,10 +1310,10 @@ const jestPreprocessor = {
|
|
|
1304
1310
|
if (t === r) return !0;
|
|
1305
1311
|
if (t && r && "object" == typeof t && "object" == typeof r) {
|
|
1306
1312
|
const s = Array.isArray(t), n = Array.isArray(r);
|
|
1307
|
-
let
|
|
1313
|
+
let o, i, a;
|
|
1308
1314
|
if (s && n) {
|
|
1309
|
-
if (
|
|
1310
|
-
for (
|
|
1315
|
+
if (i = t.length, i != r.length) return !1;
|
|
1316
|
+
for (o = i; 0 != o--; ) if (!e(t[o], r[o])) return !1;
|
|
1311
1317
|
return !0;
|
|
1312
1318
|
}
|
|
1313
1319
|
if (s != n) return !1;
|
|
@@ -1318,9 +1324,9 @@ const jestPreprocessor = {
|
|
|
1318
1324
|
if (u != d) return !1;
|
|
1319
1325
|
if (u && d) return t.toString() == r.toString();
|
|
1320
1326
|
const h = Object.keys(t);
|
|
1321
|
-
if (
|
|
1322
|
-
for (
|
|
1323
|
-
for (
|
|
1327
|
+
if (i = h.length, i !== Object.keys(r).length) return !1;
|
|
1328
|
+
for (o = i; 0 != o--; ) if (!Object.prototype.hasOwnProperty.call(r, h[o])) return !1;
|
|
1329
|
+
for (o = i; 0 != o--; ) if (a = h[o], !e(t[a], r[a])) return !1;
|
|
1324
1330
|
return !0;
|
|
1325
1331
|
}
|
|
1326
1332
|
return t != t && r != r;
|
|
@@ -1724,9 +1730,9 @@ class BuildContext {
|
|
|
1724
1730
|
}
|
|
1725
1731
|
return {
|
|
1726
1732
|
duration: () => r.duration(),
|
|
1727
|
-
finish: (e, s, n,
|
|
1733
|
+
finish: (e, s, n, o) => {
|
|
1728
1734
|
if ((!this.hasFinished || t) && (t && this.config.watch && (e = `${this.config.logger.cyan("[" + this.buildId + "]")} ${e}`),
|
|
1729
|
-
r.finish(e, s, n,
|
|
1735
|
+
r.finish(e, s, n, o), !t)) {
|
|
1730
1736
|
const e = {
|
|
1731
1737
|
buildId: this.buildId,
|
|
1732
1738
|
messages: this.buildMessages.slice(),
|
|
@@ -1842,12 +1848,12 @@ class Cache {
|
|
|
1842
1848
|
if (null != t) {
|
|
1843
1849
|
if (e - t < ONE_DAY) return;
|
|
1844
1850
|
const r = this.cacheFs.sys, s = await r.readDir(this.config.cacheDir), n = s.map((e => path$2.join(this.config.cacheDir, e)));
|
|
1845
|
-
let
|
|
1846
|
-
const
|
|
1851
|
+
let o = 0;
|
|
1852
|
+
const i = n.map((async t => {
|
|
1847
1853
|
const s = (await r.stat(t)).mtimeMs;
|
|
1848
|
-
e - s > ONE_WEEK && (await r.removeFile(t),
|
|
1854
|
+
e - s > ONE_WEEK && (await r.removeFile(t), o++);
|
|
1849
1855
|
}));
|
|
1850
|
-
await Promise.all(
|
|
1856
|
+
await Promise.all(i), this.logger.debug(`clearExpiredCache, cachedFileNames: ${s.length}, totalCleared: ${o}`);
|
|
1851
1857
|
}
|
|
1852
1858
|
this.logger.debug("clearExpiredCache, set last clear"), await this.sys.cacheStorage.set(EXP_STORAGE_KEY, e);
|
|
1853
1859
|
}
|
|
@@ -1890,11 +1896,11 @@ const MAX_FAILED = 100, ONE_DAY = 864e5, ONE_WEEK = 7 * ONE_DAY, EXP_STORAGE_KEY
|
|
|
1890
1896
|
}), () => t(n);
|
|
1891
1897
|
}
|
|
1892
1898
|
if ("string" == typeof r && "function" == typeof s) {
|
|
1893
|
-
const n = r.toLowerCase().trim(),
|
|
1899
|
+
const n = r.toLowerCase().trim(), o = s;
|
|
1894
1900
|
return e.push({
|
|
1895
1901
|
eventName: n,
|
|
1896
|
-
callback:
|
|
1897
|
-
}), () => t(
|
|
1902
|
+
callback: o
|
|
1903
|
+
}), () => t(o);
|
|
1898
1904
|
}
|
|
1899
1905
|
return () => !1;
|
|
1900
1906
|
},
|
|
@@ -1909,23 +1915,23 @@ const MAX_FAILED = 100, ONE_DAY = 864e5, ONE_WEEK = 7 * ONE_DAY, EXP_STORAGE_KEY
|
|
|
1909
1915
|
if (!0 === r.inMemoryOnly) {
|
|
1910
1916
|
let n = e;
|
|
1911
1917
|
n.endsWith("/") || (n += "/");
|
|
1912
|
-
const
|
|
1918
|
+
const i = e.split("/");
|
|
1913
1919
|
t.forEach(((t, n) => {
|
|
1914
1920
|
if (!n.startsWith(e)) return;
|
|
1915
1921
|
const a = n.split("/");
|
|
1916
|
-
if ((a.length ===
|
|
1922
|
+
if ((a.length === i.length + 1 || r.recursive && a.length > i.length) && t.exists) {
|
|
1917
1923
|
const e = {
|
|
1918
1924
|
absPath: n,
|
|
1919
|
-
relPath: a[
|
|
1925
|
+
relPath: a[i.length],
|
|
1920
1926
|
isDirectory: t.isDirectory,
|
|
1921
1927
|
isFile: t.isFile
|
|
1922
1928
|
};
|
|
1923
|
-
|
|
1929
|
+
o(r, e) || s.push(e);
|
|
1924
1930
|
}
|
|
1925
1931
|
}));
|
|
1926
1932
|
} else await n(e, e, r, s);
|
|
1927
1933
|
return s.sort(((e, t) => e.absPath < t.absPath ? -1 : e.absPath > t.absPath ? 1 : 0));
|
|
1928
|
-
}, n = async (t, r, s,
|
|
1934
|
+
}, n = async (t, r, s, i) => {
|
|
1929
1935
|
const l = await e.readDir(r);
|
|
1930
1936
|
if (l.length > 0) {
|
|
1931
1937
|
const e = m(r);
|
|
@@ -1936,10 +1942,10 @@ const MAX_FAILED = 100, ONE_DAY = 864e5, ONE_WEEK = 7 * ONE_DAY, EXP_STORAGE_KEY
|
|
|
1936
1942
|
isDirectory: c.isDirectory,
|
|
1937
1943
|
isFile: c.isFile
|
|
1938
1944
|
};
|
|
1939
|
-
|
|
1945
|
+
o(s, u) || (i.push(u), !0 === s.recursive && !0 === c.isDirectory && await n(t, r, s, i));
|
|
1940
1946
|
})));
|
|
1941
1947
|
}
|
|
1942
|
-
},
|
|
1948
|
+
}, o = (e, t) => {
|
|
1943
1949
|
if (t.isDirectory) {
|
|
1944
1950
|
if (Array.isArray(e.excludeDirNames)) {
|
|
1945
1951
|
const r = path$2.basename(t.absPath);
|
|
@@ -1950,7 +1956,7 @@ const MAX_FAILED = 100, ONE_DAY = 864e5, ONE_WEEK = 7 * ONE_DAY, EXP_STORAGE_KEY
|
|
|
1950
1956
|
if (e.excludeExtensions.some((e => r.endsWith(e)))) return !0;
|
|
1951
1957
|
}
|
|
1952
1958
|
return !1;
|
|
1953
|
-
},
|
|
1959
|
+
}, i = async e => {
|
|
1954
1960
|
const t = m(e);
|
|
1955
1961
|
t.queueWriteToDisk || (t.queueDeleteFromDisk = !0);
|
|
1956
1962
|
}, a = async t => {
|
|
@@ -1984,26 +1990,26 @@ const MAX_FAILED = 100, ONE_DAY = 864e5, ONE_WEEK = 7 * ONE_DAY, EXP_STORAGE_KEY
|
|
|
1984
1990
|
}, c = async (t, s, n) => {
|
|
1985
1991
|
if ("string" != typeof t) throw new Error(`writeFile, invalid filePath: ${t}`);
|
|
1986
1992
|
if ("string" != typeof s) throw new Error(`writeFile, invalid content: ${t}`);
|
|
1987
|
-
const
|
|
1993
|
+
const o = {
|
|
1988
1994
|
ignored: !1,
|
|
1989
1995
|
changedContent: !1,
|
|
1990
1996
|
queuedWrite: !1
|
|
1991
1997
|
};
|
|
1992
|
-
if (!0 === shouldIgnore(t)) return
|
|
1993
|
-
const
|
|
1994
|
-
if (
|
|
1995
|
-
"string" == typeof
|
|
1996
|
-
|
|
1997
|
-
!1 === n.useCache && (
|
|
1998
|
+
if (!0 === shouldIgnore(t)) return o.ignored = !0, o;
|
|
1999
|
+
const i = m(t);
|
|
2000
|
+
if (i.exists = !0, i.isFile = !0, i.isDirectory = !1, i.queueDeleteFromDisk = !1,
|
|
2001
|
+
"string" == typeof i.fileText ? o.changedContent = i.fileText.replace(/\r/g, "") !== s.replace(/\r/g, "") : o.changedContent = !0,
|
|
2002
|
+
i.fileText = s, o.queuedWrite = !1, null != n && ("string" == typeof n.outputTargetType && r.set(t, n.outputTargetType),
|
|
2003
|
+
!1 === n.useCache && (i.useCache = !1)), null != n && !0 === n.inMemoryOnly) i.queueWriteToDisk ? o.queuedWrite = !0 : i.queueWriteToDisk = !1,
|
|
1998
2004
|
await u(t, !0); else if (null != n && !0 === n.immediateWrite) {
|
|
1999
|
-
if (
|
|
2005
|
+
if (o.changedContent || !0 !== n.useCache) {
|
|
2000
2006
|
const r = await e.readFile(t);
|
|
2001
|
-
"string" == typeof r && (
|
|
2002
|
-
|
|
2007
|
+
"string" == typeof r && (o.changedContent = i.fileText.replace(/\r/g, "") !== r.replace(/\r/g, "")),
|
|
2008
|
+
o.changedContent && (await u(t, !1), await e.writeFile(t, i.fileText));
|
|
2003
2009
|
}
|
|
2004
|
-
} else
|
|
2005
|
-
|
|
2006
|
-
return
|
|
2010
|
+
} else i.queueWriteToDisk || !0 !== o.changedContent || (i.queueWriteToDisk = !0,
|
|
2011
|
+
o.queuedWrite = !0);
|
|
2012
|
+
return o;
|
|
2007
2013
|
}, u = async (e, t) => {
|
|
2008
2014
|
const r = [];
|
|
2009
2015
|
for (;"string" == typeof (e = path$2.dirname(e)) && e.length > 0 && "/" !== e && !1 === e.endsWith(":/") && !1 === e.endsWith(":\\"); ) r.push(e);
|
|
@@ -2077,13 +2083,13 @@ const MAX_FAILED = 100, ONE_DAY = 864e5, ONE_WEEK = 7 * ONE_DAY, EXP_STORAGE_KEY
|
|
|
2077
2083
|
Promise.all(l.map((async e => {
|
|
2078
2084
|
if ("string" != typeof e) throw new Error("unable to writeFile without filePath");
|
|
2079
2085
|
return h(e);
|
|
2080
|
-
})))),
|
|
2086
|
+
})))), o = await (t => {
|
|
2081
2087
|
const r = Promise.all(t.map((async t => {
|
|
2082
2088
|
const [r, s] = t;
|
|
2083
2089
|
return await e.copyFile(r, s), [ r, s ];
|
|
2084
2090
|
})));
|
|
2085
2091
|
return r;
|
|
2086
|
-
})(r.filesToCopy),
|
|
2092
|
+
})(r.filesToCopy), i = await (async t => await Promise.all(t.map((async t => {
|
|
2087
2093
|
if ("string" != typeof t) throw new Error("unable to unlink without filePath");
|
|
2088
2094
|
return await e.removeFile(t), t;
|
|
2089
2095
|
}))))(r.filesToDelete), a = await (async t => {
|
|
@@ -2093,9 +2099,9 @@ const MAX_FAILED = 100, ONE_DAY = 864e5, ONE_WEEK = 7 * ONE_DAY, EXP_STORAGE_KEY
|
|
|
2093
2099
|
})(r.dirsToDelete);
|
|
2094
2100
|
var l;
|
|
2095
2101
|
return r.filesToDelete.forEach(f), r.dirsToDelete.forEach(p), {
|
|
2096
|
-
filesCopied:
|
|
2102
|
+
filesCopied: o,
|
|
2097
2103
|
filesWritten: n,
|
|
2098
|
-
filesDeleted:
|
|
2104
|
+
filesDeleted: i,
|
|
2099
2105
|
dirsDeleted: a,
|
|
2100
2106
|
dirsAdded: s
|
|
2101
2107
|
};
|
|
@@ -2113,7 +2119,7 @@ const MAX_FAILED = 100, ONE_DAY = 864e5, ONE_WEEK = 7 * ONE_DAY, EXP_STORAGE_KEY
|
|
|
2113
2119
|
r.sort(((e, t) => {
|
|
2114
2120
|
const r = e.split("/").length, s = t.split("/").length;
|
|
2115
2121
|
return r < s ? 1 : r > s ? -1 : 0;
|
|
2116
|
-
})), await Promise.all(r.map(
|
|
2122
|
+
})), await Promise.all(r.map(i)), e.forEach((e => {
|
|
2117
2123
|
const t = m(e);
|
|
2118
2124
|
t.isFile = !1, t.isDirectory = !0, t.queueWriteToDisk = !0, t.queueDeleteFromDisk = !1;
|
|
2119
2125
|
}));
|
|
@@ -2158,9 +2164,9 @@ const MAX_FAILED = 100, ONE_DAY = 864e5, ONE_WEEK = 7 * ONE_DAY, EXP_STORAGE_KEY
|
|
|
2158
2164
|
const t = await s(e, {
|
|
2159
2165
|
recursive: !0
|
|
2160
2166
|
});
|
|
2161
|
-
await Promise.all(t.map((e => e.relPath.endsWith(".gitkeep") ? null :
|
|
2167
|
+
await Promise.all(t.map((e => e.relPath.endsWith(".gitkeep") ? null : i(e.absPath))));
|
|
2162
2168
|
} catch (e) {}
|
|
2163
|
-
})(e) : !0 === t.isFile && await
|
|
2169
|
+
})(e) : !0 === t.isFile && await i(e);
|
|
2164
2170
|
},
|
|
2165
2171
|
stat: a,
|
|
2166
2172
|
statSync: l,
|
|
@@ -2201,10 +2207,10 @@ const MAX_FAILED = 100, ONE_DAY = 864e5, ONE_WEEK = 7 * ONE_DAY, EXP_STORAGE_KEY
|
|
|
2201
2207
|
} else if (!0 === e.queueDeleteFromDisk) e.isDirectory && !t.dirsToEnsure.includes(r) ? t.dirsToDelete.push(r) : e.isFile && !t.filesToWrite.includes(r) && t.filesToDelete.push(r); else if ("string" == typeof e.queueCopyFileToDest) {
|
|
2202
2208
|
const s = r, n = e.queueCopyFileToDest;
|
|
2203
2209
|
t.filesToCopy.push([ s, n ]);
|
|
2204
|
-
const
|
|
2205
|
-
t.dirsToEnsure.includes(
|
|
2206
|
-
const
|
|
2207
|
-
|
|
2210
|
+
const o = normalizePath(path$2.dirname(n));
|
|
2211
|
+
t.dirsToEnsure.includes(o) || t.dirsToEnsure.push(o);
|
|
2212
|
+
const i = t.dirsToDelete.indexOf(o);
|
|
2213
|
+
i > -1 && t.dirsToDelete.splice(i, 1);
|
|
2208
2214
|
const a = t.filesToDelete.indexOf(n);
|
|
2209
2215
|
a > -1 && t.filesToDelete.splice(a, 1);
|
|
2210
2216
|
}
|
|
@@ -2301,10 +2307,10 @@ class TestingLogger {
|
|
|
2301
2307
|
|
|
2302
2308
|
(posix = {
|
|
2303
2309
|
resolve: function e() {
|
|
2304
|
-
var t, r, s, n = "",
|
|
2305
|
-
for (r = arguments.length - 1; r >= -1 && !
|
|
2306
|
-
s = t), assertPath(s), 0 !== s.length && (n = s + "/" + n,
|
|
2307
|
-
return n = normalizeStringPosix(n, !
|
|
2310
|
+
var t, r, s, n = "", o = !1;
|
|
2311
|
+
for (r = arguments.length - 1; r >= -1 && !o; r--) r >= 0 ? s = arguments[r] : (void 0 === t && (t = process.cwd()),
|
|
2312
|
+
s = t), assertPath(s), 0 !== s.length && (n = s + "/" + n, o = 47 === s.charCodeAt(0));
|
|
2313
|
+
return n = normalizeStringPosix(n, !o), o ? n.length > 0 ? "/" + n : "/" : n.length > 0 ? n : ".";
|
|
2308
2314
|
},
|
|
2309
2315
|
normalize: function e(t) {
|
|
2310
2316
|
var r, s;
|
|
@@ -2322,70 +2328,70 @@ class TestingLogger {
|
|
|
2322
2328
|
return void 0 === t ? "." : posix.normalize(t);
|
|
2323
2329
|
},
|
|
2324
2330
|
relative: function e(t, r) {
|
|
2325
|
-
var s, n,
|
|
2331
|
+
var s, n, o, i, a, l, c, u, d, h;
|
|
2326
2332
|
if (assertPath(t), assertPath(r), t === r) return "";
|
|
2327
2333
|
if ((t = posix.resolve(t)) === (r = posix.resolve(r))) return "";
|
|
2328
2334
|
for (s = 1; s < t.length && 47 === t.charCodeAt(s); ++s) ;
|
|
2329
|
-
for (
|
|
2330
|
-
for (l =
|
|
2335
|
+
for (o = (n = t.length) - s, i = 1; i < r.length && 47 === r.charCodeAt(i); ++i) ;
|
|
2336
|
+
for (l = o < (a = r.length - i) ? o : a, c = -1, u = 0; u <= l; ++u) {
|
|
2331
2337
|
if (u === l) {
|
|
2332
2338
|
if (a > l) {
|
|
2333
|
-
if (47 === r.charCodeAt(
|
|
2334
|
-
if (0 === u) return r.slice(
|
|
2335
|
-
} else
|
|
2339
|
+
if (47 === r.charCodeAt(i + u)) return r.slice(i + u + 1);
|
|
2340
|
+
if (0 === u) return r.slice(i + u);
|
|
2341
|
+
} else o > l && (47 === t.charCodeAt(s + u) ? c = u : 0 === u && (c = 0));
|
|
2336
2342
|
break;
|
|
2337
2343
|
}
|
|
2338
|
-
if ((d = t.charCodeAt(s + u)) !== r.charCodeAt(
|
|
2344
|
+
if ((d = t.charCodeAt(s + u)) !== r.charCodeAt(i + u)) break;
|
|
2339
2345
|
47 === d && (c = u);
|
|
2340
2346
|
}
|
|
2341
2347
|
for (h = "", u = s + c + 1; u <= n; ++u) u !== n && 47 !== t.charCodeAt(u) || (0 === h.length ? h += ".." : h += "/..");
|
|
2342
|
-
return h.length > 0 ? h + r.slice(
|
|
2343
|
-
r.slice(
|
|
2348
|
+
return h.length > 0 ? h + r.slice(i + c) : (i += c, 47 === r.charCodeAt(i) && ++i,
|
|
2349
|
+
r.slice(i));
|
|
2344
2350
|
},
|
|
2345
2351
|
_makeLong: function e(t) {
|
|
2346
2352
|
return t;
|
|
2347
2353
|
},
|
|
2348
2354
|
dirname: function e(t) {
|
|
2349
|
-
var r, s, n,
|
|
2355
|
+
var r, s, n, o;
|
|
2350
2356
|
if (assertPath(t), 0 === t.length) return ".";
|
|
2351
|
-
for (r = 47 === t.charCodeAt(0), s = -1, n = !0,
|
|
2357
|
+
for (r = 47 === t.charCodeAt(0), s = -1, n = !0, o = t.length - 1; o >= 1; --o) if (47 === t.charCodeAt(o)) {
|
|
2352
2358
|
if (!n) {
|
|
2353
|
-
s =
|
|
2359
|
+
s = o;
|
|
2354
2360
|
break;
|
|
2355
2361
|
}
|
|
2356
2362
|
} else n = !1;
|
|
2357
2363
|
return -1 === s ? r ? "/" : "." : r && 1 === s ? "//" : t.slice(0, s);
|
|
2358
2364
|
},
|
|
2359
2365
|
basename: function e(t, r) {
|
|
2360
|
-
var s, n,
|
|
2366
|
+
var s, n, o, i, a, l, c;
|
|
2361
2367
|
if (void 0 !== r && "string" != typeof r) throw new TypeError('"ext" argument must be a string');
|
|
2362
|
-
if (assertPath(t), s = 0, n = -1,
|
|
2368
|
+
if (assertPath(t), s = 0, n = -1, o = !0, void 0 !== r && r.length > 0 && r.length <= t.length) {
|
|
2363
2369
|
if (r.length === t.length && r === t) return "";
|
|
2364
|
-
for (a = r.length - 1, l = -1,
|
|
2365
|
-
if (!
|
|
2366
|
-
s =
|
|
2370
|
+
for (a = r.length - 1, l = -1, i = t.length - 1; i >= 0; --i) if (47 === (c = t.charCodeAt(i))) {
|
|
2371
|
+
if (!o) {
|
|
2372
|
+
s = i + 1;
|
|
2367
2373
|
break;
|
|
2368
2374
|
}
|
|
2369
|
-
} else -1 === l && (
|
|
2375
|
+
} else -1 === l && (o = !1, l = i + 1), a >= 0 && (c === r.charCodeAt(a) ? -1 == --a && (n = i) : (a = -1,
|
|
2370
2376
|
n = l));
|
|
2371
2377
|
return s === n ? n = l : -1 === n && (n = t.length), t.slice(s, n);
|
|
2372
2378
|
}
|
|
2373
|
-
for (
|
|
2374
|
-
if (!
|
|
2375
|
-
s =
|
|
2379
|
+
for (i = t.length - 1; i >= 0; --i) if (47 === t.charCodeAt(i)) {
|
|
2380
|
+
if (!o) {
|
|
2381
|
+
s = i + 1;
|
|
2376
2382
|
break;
|
|
2377
2383
|
}
|
|
2378
|
-
} else -1 === n && (
|
|
2384
|
+
} else -1 === n && (o = !1, n = i + 1);
|
|
2379
2385
|
return -1 === n ? "" : t.slice(s, n);
|
|
2380
2386
|
},
|
|
2381
2387
|
extname: function e(t) {
|
|
2382
|
-
var r, s, n,
|
|
2383
|
-
for (assertPath(t), r = -1, s = 0, n = -1,
|
|
2384
|
-
n = a + 1), 46 === l ? -1 === r ? r = a : 1 !==
|
|
2388
|
+
var r, s, n, o, i, a, l;
|
|
2389
|
+
for (assertPath(t), r = -1, s = 0, n = -1, o = !0, i = 0, a = t.length - 1; a >= 0; --a) if (47 !== (l = t.charCodeAt(a))) -1 === n && (o = !1,
|
|
2390
|
+
n = a + 1), 46 === l ? -1 === r ? r = a : 1 !== i && (i = 1) : -1 !== r && (i = -1); else if (!o) {
|
|
2385
2391
|
s = a + 1;
|
|
2386
2392
|
break;
|
|
2387
2393
|
}
|
|
2388
|
-
return -1 === r || -1 === n || 0 ===
|
|
2394
|
+
return -1 === r || -1 === n || 0 === i || 1 === i && r === n - 1 && r === s + 1 ? "" : t.slice(r, n);
|
|
2389
2395
|
},
|
|
2390
2396
|
format: function e(t) {
|
|
2391
2397
|
if (null === t || "object" != typeof t) throw new TypeError('The "pathObject" argument must be of type Object. Received type ' + typeof t);
|
|
@@ -2395,7 +2401,7 @@ class TestingLogger {
|
|
|
2395
2401
|
}("/", t);
|
|
2396
2402
|
},
|
|
2397
2403
|
parse: function e(t) {
|
|
2398
|
-
var r, s, n,
|
|
2404
|
+
var r, s, n, o, i, a, l, c, u, d;
|
|
2399
2405
|
if (assertPath(t), r = {
|
|
2400
2406
|
root: "",
|
|
2401
2407
|
dir: "",
|
|
@@ -2403,14 +2409,14 @@ class TestingLogger {
|
|
|
2403
2409
|
ext: "",
|
|
2404
2410
|
name: ""
|
|
2405
2411
|
}, 0 === t.length) return r;
|
|
2406
|
-
for ((n = 47 === (s = t.charCodeAt(0))) ? (r.root = "/",
|
|
2407
|
-
a = 0, l = -1, c = !0, u = t.length - 1, d = 0; u >=
|
|
2408
|
-
l = u + 1), 46 === s ? -1 ===
|
|
2412
|
+
for ((n = 47 === (s = t.charCodeAt(0))) ? (r.root = "/", o = 1) : o = 0, i = -1,
|
|
2413
|
+
a = 0, l = -1, c = !0, u = t.length - 1, d = 0; u >= o; --u) if (47 !== (s = t.charCodeAt(u))) -1 === l && (c = !1,
|
|
2414
|
+
l = u + 1), 46 === s ? -1 === i ? i = u : 1 !== d && (d = 1) : -1 !== i && (d = -1); else if (!c) {
|
|
2409
2415
|
a = u + 1;
|
|
2410
2416
|
break;
|
|
2411
2417
|
}
|
|
2412
|
-
return -1 ===
|
|
2413
|
-
r.base = t.slice(1, l)) : (r.name = t.slice(a,
|
|
2418
|
+
return -1 === i || -1 === l || 0 === d || 1 === d && i === l - 1 && i === a + 1 ? -1 !== l && (r.base = r.name = 0 === a && n ? t.slice(1, l) : t.slice(a, l)) : (0 === a && n ? (r.name = t.slice(1, i),
|
|
2419
|
+
r.base = t.slice(1, l)) : (r.name = t.slice(a, i), r.base = t.slice(a, l)), r.ext = t.slice(i, l)),
|
|
2414
2420
|
a > 0 ? r.dir = t.slice(0, a - 1) : n && (r.dir = "/"), r;
|
|
2415
2421
|
},
|
|
2416
2422
|
sep: "/",
|
|
@@ -2435,7 +2441,7 @@ caller = function() {
|
|
|
2435
2441
|
return t;
|
|
2436
2442
|
}, e = (new Error).stack, Error.prepareStackTrace = t, e[2].getFileName();
|
|
2437
2443
|
}, pathParse = createCommonjsModule((function(e) {
|
|
2438
|
-
var t, r, s = "win32" === process.platform, n = /^(((?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?[\\\/]?)(?:[^\\\/]*[\\\/])*)((\.{1,2}|[^\\\/]+?|)(\.[^.\/\\]*|))[\\\/]*$/,
|
|
2444
|
+
var t, r, s = "win32" === process.platform, n = /^(((?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?[\\\/]?)(?:[^\\\/]*[\\\/])*)((\.{1,2}|[^\\\/]+?|)(\.[^.\/\\]*|))[\\\/]*$/, o = {
|
|
2439
2445
|
parse: function(e) {
|
|
2440
2446
|
if ("string" != typeof e) throw new TypeError("Parameter 'pathString' must be a string, not " + typeof e);
|
|
2441
2447
|
var t = function r(e) {
|
|
@@ -2464,25 +2470,25 @@ caller = function() {
|
|
|
2464
2470
|
ext: r[4],
|
|
2465
2471
|
name: r[3]
|
|
2466
2472
|
};
|
|
2467
|
-
}, e.exports = s ?
|
|
2473
|
+
}, e.exports = s ? o.parse : r.parse, e.exports.posix = r.parse, e.exports.win32 = o.parse;
|
|
2468
2474
|
})), parse = path__default.default.parse || pathParse, getNodeModulesDirs = function e(t, r) {
|
|
2469
|
-
var s, n,
|
|
2470
|
-
for (/^([A-Za-z]:)/.test(t) ?
|
|
2475
|
+
var s, n, o = "/";
|
|
2476
|
+
for (/^([A-Za-z]:)/.test(t) ? o = "" : /^\\\\/.test(t) && (o = "\\\\"), s = [ t ],
|
|
2471
2477
|
n = parse(t); n.dir !== s[s.length - 1]; ) s.push(n.dir), n = parse(n.dir);
|
|
2472
2478
|
return s.reduce((function(e, t) {
|
|
2473
2479
|
return e.concat(r.map((function(e) {
|
|
2474
|
-
return path__default.default.resolve(
|
|
2480
|
+
return path__default.default.resolve(o, t, e);
|
|
2475
2481
|
})));
|
|
2476
2482
|
}), []);
|
|
2477
2483
|
}, nodeModulesPaths = function e(t, r, s) {
|
|
2478
|
-
var n,
|
|
2484
|
+
var n, o = r && r.moduleDirectory ? [].concat(r.moduleDirectory) : [ "node_modules" ];
|
|
2479
2485
|
return r && "function" == typeof r.paths ? r.paths(s, t, (function() {
|
|
2480
|
-
return getNodeModulesDirs(t,
|
|
2481
|
-
}), r) : (n = getNodeModulesDirs(t,
|
|
2486
|
+
return getNodeModulesDirs(t, o);
|
|
2487
|
+
}), r) : (n = getNodeModulesDirs(t, o), r && r.paths ? n.concat(r.paths) : n);
|
|
2482
2488
|
}, normalizeOptions = function(e, t) {
|
|
2483
2489
|
return t || {};
|
|
2484
2490
|
}, slice = Array.prototype.slice, toStr = Object.prototype.toString, implementation = function e(t) {
|
|
2485
|
-
var r, s, n,
|
|
2491
|
+
var r, s, n, o, i, a, l, c = this;
|
|
2486
2492
|
if ("function" != typeof c || "[object Function]" !== toStr.call(c)) throw new TypeError("Function.prototype.bind called on incompatible " + c);
|
|
2487
2493
|
for (r = slice.call(arguments, 1), n = function() {
|
|
2488
2494
|
if (this instanceof s) {
|
|
@@ -2490,8 +2496,8 @@ caller = function() {
|
|
|
2490
2496
|
return Object(e) === e ? e : this;
|
|
2491
2497
|
}
|
|
2492
2498
|
return c.apply(t, r.concat(slice.call(arguments)));
|
|
2493
|
-
},
|
|
2494
|
-
return s = Function("binder", "return function (" +
|
|
2499
|
+
}, o = Math.max(0, c.length - r.length), i = [], a = 0; a < o; a++) i.push("$" + a);
|
|
2500
|
+
return s = Function("binder", "return function (" + i.join(",") + "){ return binder.apply(this,arguments); }")(n),
|
|
2495
2501
|
c.prototype && ((l = function e() {}).prototype = c.prototype, s.prototype = new l,
|
|
2496
2502
|
l.prototype = null), s;
|
|
2497
2503
|
}, functionBind = Function.prototype.bind || implementation, src = functionBind.call(Function.call, Object.prototype.hasOwnProperty);
|
|
@@ -2616,13 +2622,13 @@ defaultIsFile$1 = function e(t, r) {
|
|
|
2616
2622
|
}
|
|
2617
2623
|
}));
|
|
2618
2624
|
}, getPackageCandidates$1 = function e(t, r, s) {
|
|
2619
|
-
var n,
|
|
2620
|
-
for (n = 0; n <
|
|
2621
|
-
return
|
|
2625
|
+
var n, o = nodeModulesPaths(r, s, t);
|
|
2626
|
+
for (n = 0; n < o.length; n++) o[n] = path__default.default.join(o[n], t);
|
|
2627
|
+
return o;
|
|
2622
2628
|
}, async = function e(t, r, s) {
|
|
2623
2629
|
function n(e) {
|
|
2624
2630
|
if (/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/.test(t)) T = path__default.default.resolve(e, t),
|
|
2625
|
-
"." !== t && ".." !== t && "/" !== t.slice(-1) || (T += "/"), /\/$/.test(t) && T === e ? l(T, C.package,
|
|
2631
|
+
"." !== t && ".." !== t && "/" !== t.slice(-1) || (T += "/"), /\/$/.test(t) && T === e ? l(T, C.package, o) : i(T, C.package, o); else {
|
|
2626
2632
|
if (E && isCoreModule(t)) return S(null, t);
|
|
2627
2633
|
!function r(e, t, s) {
|
|
2628
2634
|
var n = function() {
|
|
@@ -2640,7 +2646,7 @@ defaultIsFile$1 = function e(t, r) {
|
|
|
2640
2646
|
}));
|
|
2641
2647
|
}
|
|
2642
2648
|
}
|
|
2643
|
-
function
|
|
2649
|
+
function o(e, r, s) {
|
|
2644
2650
|
e ? S(e) : r ? S(null, r, s) : l(T, (function(e, r, s) {
|
|
2645
2651
|
if (e) S(e); else if (r) maybeRealpath(f, r, C, (function(e, t) {
|
|
2646
2652
|
e ? S(e) : S(null, t, s);
|
|
@@ -2650,20 +2656,20 @@ defaultIsFile$1 = function e(t, r) {
|
|
|
2650
2656
|
}
|
|
2651
2657
|
}));
|
|
2652
2658
|
}
|
|
2653
|
-
function
|
|
2659
|
+
function i(e, t, r) {
|
|
2654
2660
|
var s = t, n = r;
|
|
2655
2661
|
"function" == typeof s && (n = s, s = void 0), function e(t, r, s) {
|
|
2656
|
-
function
|
|
2662
|
+
function o(s, o, a) {
|
|
2657
2663
|
var u, h, p;
|
|
2658
|
-
return c =
|
|
2659
|
-
p = C.pathFilter(c, r, h)) ? e([ "" ].concat(w.slice()), path__default.default.resolve(a, p), c) : void d(l,
|
|
2664
|
+
return c = o, s ? n(s) : a && c && C.pathFilter && (h = (u = path__default.default.relative(a, l)).slice(0, u.length - t[0].length),
|
|
2665
|
+
p = C.pathFilter(c, r, h)) ? e([ "" ].concat(w.slice()), path__default.default.resolve(a, p), c) : void d(l, i);
|
|
2660
2666
|
}
|
|
2661
|
-
function
|
|
2662
|
-
return s ? n(s) :
|
|
2667
|
+
function i(s, o) {
|
|
2668
|
+
return s ? n(s) : o ? n(null, l, c) : void e(t.slice(1), r, c);
|
|
2663
2669
|
}
|
|
2664
2670
|
var l, c;
|
|
2665
2671
|
if (0 === t.length) return n(null, void 0, s);
|
|
2666
|
-
l = r + t[0], (c = s) ?
|
|
2672
|
+
l = r + t[0], (c = s) ? o(null, c) : a(path__default.default.dirname(l), o);
|
|
2667
2673
|
}([ "" ].concat(w), e, s);
|
|
2668
2674
|
}
|
|
2669
2675
|
function a(e, t) {
|
|
@@ -2674,8 +2680,8 @@ defaultIsFile$1 = function e(t, r) {
|
|
|
2674
2680
|
if (!s) return a(path__default.default.dirname(e), t);
|
|
2675
2681
|
m(p, n, (function(r, s) {
|
|
2676
2682
|
r && t(r);
|
|
2677
|
-
var
|
|
2678
|
-
|
|
2683
|
+
var o = s;
|
|
2684
|
+
o && C.packageFilter && (o = C.packageFilter(o, n)), t(null, o, e);
|
|
2679
2685
|
}));
|
|
2680
2686
|
}));
|
|
2681
2687
|
}));
|
|
@@ -2684,31 +2690,31 @@ defaultIsFile$1 = function e(t, r) {
|
|
|
2684
2690
|
var s = r, n = t;
|
|
2685
2691
|
"function" == typeof n && (s = n, n = C.package), maybeRealpath(f, e, C, (function(t, r) {
|
|
2686
2692
|
if (t) return s(t);
|
|
2687
|
-
var
|
|
2688
|
-
d(
|
|
2689
|
-
return t ? s(t) : r ? void m(p,
|
|
2693
|
+
var o = path__default.default.join(r, "package.json");
|
|
2694
|
+
d(o, (function(t, r) {
|
|
2695
|
+
return t ? s(t) : r ? void m(p, o, (function(t, r) {
|
|
2690
2696
|
var n, a;
|
|
2691
|
-
return t ? s(t) : ((n = r) && C.packageFilter && (n = C.packageFilter(n,
|
|
2692
|
-
s(a)) : ("." !== n.main && "./" !== n.main || (n.main = "index"), void
|
|
2697
|
+
return t ? s(t) : ((n = r) && C.packageFilter && (n = C.packageFilter(n, o)), n && n.main ? "string" != typeof n.main ? ((a = new TypeError("package “" + n.name + "” `main` must be a string")).code = "INVALID_PACKAGE_MAIN",
|
|
2698
|
+
s(a)) : ("." !== n.main && "./" !== n.main || (n.main = "index"), void i(path__default.default.resolve(e, n.main), n, (function(t, r, n) {
|
|
2693
2699
|
return t ? s(t) : r ? s(null, r, n) : n ? void l(path__default.default.resolve(e, n.main), n, (function(t, r, n) {
|
|
2694
|
-
return t ? s(t) : r ? s(null, r, n) : void
|
|
2695
|
-
})) :
|
|
2696
|
-
}))) : void
|
|
2697
|
-
})) :
|
|
2700
|
+
return t ? s(t) : r ? s(null, r, n) : void i(path__default.default.join(e, "index"), n, s);
|
|
2701
|
+
})) : i(path__default.default.join(e, "index"), n, s);
|
|
2702
|
+
}))) : void i(path__default.default.join(e, "/index"), n, s));
|
|
2703
|
+
})) : i(path__default.default.join(e, "index"), n, s);
|
|
2698
2704
|
}));
|
|
2699
2705
|
}));
|
|
2700
2706
|
}
|
|
2701
2707
|
function c(e, t) {
|
|
2702
|
-
function r(t, r,
|
|
2703
|
-
return t ? e(t) : r ? e(null, r,
|
|
2708
|
+
function r(t, r, o) {
|
|
2709
|
+
return t ? e(t) : r ? e(null, r, o) : void l(n, C.package, s);
|
|
2704
2710
|
}
|
|
2705
2711
|
function s(r, s, n) {
|
|
2706
2712
|
return r ? e(r) : s ? e(null, s, n) : void c(e, t.slice(1));
|
|
2707
2713
|
}
|
|
2708
2714
|
if (0 === t.length) return e(null, void 0);
|
|
2709
2715
|
var n = t[0];
|
|
2710
|
-
h(path__default.default.dirname(n), (function
|
|
2711
|
-
return s ? e(s) : a ? void
|
|
2716
|
+
h(path__default.default.dirname(n), (function o(s, a) {
|
|
2717
|
+
return s ? e(s) : a ? void i(n, C.package, r) : c(e, t.slice(1));
|
|
2712
2718
|
}));
|
|
2713
2719
|
}
|
|
2714
2720
|
var u, d, h, p, f, m, g, y, w, E, _, v, b, T, S = s, C = r;
|
|
@@ -2848,64 +2854,64 @@ defaultIsFile = function e(t) {
|
|
|
2848
2854
|
return JSON.parse(s);
|
|
2849
2855
|
} catch (e) {}
|
|
2850
2856
|
}, getPackageCandidates = function e(t, r, s) {
|
|
2851
|
-
var n,
|
|
2852
|
-
for (n = 0; n <
|
|
2853
|
-
return
|
|
2857
|
+
var n, o = nodeModulesPaths(r, s, t);
|
|
2858
|
+
for (n = 0; n < o.length; n++) o[n] = path__default.default.join(o[n], t);
|
|
2859
|
+
return o;
|
|
2854
2860
|
}, sync = function e(t, r) {
|
|
2855
2861
|
function s(e) {
|
|
2856
|
-
var t, r, s,
|
|
2857
|
-
if (l && l.dir && l.pkg &&
|
|
2858
|
-
(r =
|
|
2862
|
+
var t, r, s, o, l = n(path__default.default.dirname(e));
|
|
2863
|
+
if (l && l.dir && l.pkg && i.pathFilter && (t = path__default.default.relative(l.dir, e),
|
|
2864
|
+
(r = i.pathFilter(l.pkg, e, t)) && (e = path__default.default.resolve(l.dir, r))),
|
|
2859
2865
|
a(e)) return e;
|
|
2860
|
-
for (s = 0; s < p.length; s++) if (
|
|
2866
|
+
for (s = 0; s < p.length; s++) if (o = e + p[s], a(o)) return o;
|
|
2861
2867
|
}
|
|
2862
2868
|
function n(e) {
|
|
2863
2869
|
var t, r;
|
|
2864
|
-
if ("" !== e && "/" !== e && !("win32" === process.platform && /^\w:[/\\]*$/.test(e) || /[/\\]node_modules[/\\]*$/.test(e))) return t = path__default.default.join(maybeRealpathSync(u, e,
|
|
2865
|
-
a(t) ? ((r = d(l, t)) &&
|
|
2870
|
+
if ("" !== e && "/" !== e && !("win32" === process.platform && /^\w:[/\\]*$/.test(e) || /[/\\]node_modules[/\\]*$/.test(e))) return t = path__default.default.join(maybeRealpathSync(u, e, i), "package.json"),
|
|
2871
|
+
a(t) ? ((r = d(l, t)) && i.packageFilter && (r = i.packageFilter(r, e)), {
|
|
2866
2872
|
pkg: r,
|
|
2867
2873
|
dir: e
|
|
2868
2874
|
}) : n(path__default.default.dirname(e));
|
|
2869
2875
|
}
|
|
2870
|
-
function
|
|
2871
|
-
var t, r, n, c, h = path__default.default.join(maybeRealpathSync(u, e,
|
|
2876
|
+
function o(e) {
|
|
2877
|
+
var t, r, n, c, h = path__default.default.join(maybeRealpathSync(u, e, i), "/package.json");
|
|
2872
2878
|
if (a(h)) {
|
|
2873
2879
|
try {
|
|
2874
2880
|
t = d(l, h);
|
|
2875
2881
|
} catch (e) {}
|
|
2876
|
-
if (t &&
|
|
2882
|
+
if (t && i.packageFilter && (t = i.packageFilter(t, e)), t && t.main) {
|
|
2877
2883
|
if ("string" != typeof t.main) throw (r = new TypeError("package “" + t.name + "” `main` must be a string")).code = "INVALID_PACKAGE_MAIN",
|
|
2878
2884
|
r;
|
|
2879
2885
|
"." !== t.main && "./" !== t.main || (t.main = "index");
|
|
2880
2886
|
try {
|
|
2881
2887
|
if (n = s(path__default.default.resolve(e, t.main))) return n;
|
|
2882
|
-
if (c =
|
|
2888
|
+
if (c = o(path__default.default.resolve(e, t.main))) return c;
|
|
2883
2889
|
} catch (e) {}
|
|
2884
2890
|
}
|
|
2885
2891
|
}
|
|
2886
2892
|
return s(path__default.default.join(e, "/index"));
|
|
2887
2893
|
}
|
|
2888
|
-
var
|
|
2894
|
+
var i, a, l, c, u, d, h, p, f, m, g, y, w, E, _, v;
|
|
2889
2895
|
if ("string" != typeof t) throw new TypeError("Path must be a string.");
|
|
2890
|
-
if (
|
|
2891
|
-
c =
|
|
2892
|
-
|
|
2893
|
-
if (h =
|
|
2894
|
-
m =
|
|
2895
|
-
y = maybeRealpathSync(u, path__default.default.resolve(m),
|
|
2896
|
+
if (i = normalizeOptions(0, r), a = i.isFile || defaultIsFile, l = i.readFileSync || fs__default.default.readFileSync,
|
|
2897
|
+
c = i.isDirectory || defaultIsDir, u = i.realpathSync || defaultRealpathSync, d = i.readPackageSync || defaultReadPackageSync,
|
|
2898
|
+
i.readFileSync && i.readPackageSync) throw new TypeError("`readFileSync` and `readPackageSync` are mutually exclusive.");
|
|
2899
|
+
if (h = i.packageIterator, p = i.extensions || [ ".js" ], f = !1 !== i.includeCoreModules,
|
|
2900
|
+
m = i.basedir || path__default.default.dirname(caller()), g = i.filename || m, i.paths = i.paths || [],
|
|
2901
|
+
y = maybeRealpathSync(u, path__default.default.resolve(m), i), /^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/.test(t)) {
|
|
2896
2902
|
if (w = path__default.default.resolve(y, t), "." !== t && ".." !== t && "/" !== t.slice(-1) || (w += "/"),
|
|
2897
|
-
E = s(w) ||
|
|
2903
|
+
E = s(w) || o(w)) return maybeRealpathSync(u, E, i);
|
|
2898
2904
|
} else {
|
|
2899
2905
|
if (f && isCoreModule(t)) return t;
|
|
2900
2906
|
if (_ = function b(e, t) {
|
|
2901
2907
|
var r, n, a, l, u = function() {
|
|
2902
|
-
return getPackageCandidates(e, t,
|
|
2903
|
-
}, d = h ? h(e, t, u,
|
|
2908
|
+
return getPackageCandidates(e, t, i);
|
|
2909
|
+
}, d = h ? h(e, t, u, i) : u();
|
|
2904
2910
|
for (r = 0; r < d.length; r++) if (n = d[r], c(path__default.default.dirname(n))) {
|
|
2905
2911
|
if (a = s(n)) return a;
|
|
2906
|
-
if (l =
|
|
2912
|
+
if (l = o(n)) return l;
|
|
2907
2913
|
}
|
|
2908
|
-
}(t, y), _) return maybeRealpathSync(u, _,
|
|
2914
|
+
}(t, y), _) return maybeRealpathSync(u, _, i);
|
|
2909
2915
|
}
|
|
2910
2916
|
throw (v = new Error("Cannot find module '" + t + "' from '" + g + "'")).code = "MODULE_NOT_FOUND",
|
|
2911
2917
|
v;
|
|
@@ -2932,20 +2938,20 @@ const COMMON_DIR_MODULE_EXTS = [ ".tsx", ".ts", ".mjs", ".js", ".jsx", ".json",
|
|
|
2932
2938
|
let s = (r = normalizePath(r)).split("/").filter((e => e.length));
|
|
2933
2939
|
const n = s.lastIndexOf("node_modules");
|
|
2934
2940
|
n > -1 && n < s.length - 1 && (s = s.slice(n + 1));
|
|
2935
|
-
let
|
|
2936
|
-
|
|
2937
|
-
const
|
|
2938
|
-
return "@stencil/core" ===
|
|
2941
|
+
let o = s.shift();
|
|
2942
|
+
o.startsWith("@") && (o += "/" + s.shift());
|
|
2943
|
+
const i = s.join("/");
|
|
2944
|
+
return "@stencil/core" === o ? ((e, t) => {
|
|
2939
2945
|
let r = (t = normalizePath(t)).split("/");
|
|
2940
2946
|
const s = r.lastIndexOf("node_modules");
|
|
2941
2947
|
s > -1 && s < r.length - 1 && (r = r.slice(s + 1), r = r[0].startsWith("@") ? r.slice(2) : r.slice(1),
|
|
2942
2948
|
t = r.join("/"));
|
|
2943
2949
|
const n = new URL("../", e).href;
|
|
2944
2950
|
return new URL("./" + t, n).href;
|
|
2945
|
-
})(e.getCompilerExecutingPath(),
|
|
2946
|
-
moduleId:
|
|
2947
|
-
version: t.get(
|
|
2948
|
-
path:
|
|
2951
|
+
})(e.getCompilerExecutingPath(), i) : e.getRemoteModuleUrl({
|
|
2952
|
+
moduleId: o,
|
|
2953
|
+
version: t.get(o),
|
|
2954
|
+
path: i
|
|
2949
2955
|
});
|
|
2950
2956
|
}, knownUrlSkips = [ "/@stencil/core/internal.js", "/@stencil/core/internal.json", "/@stencil/core/internal.mjs", "/@stencil/core/internal/stencil-core.js/index.json", "/@stencil/core/internal/stencil-core.js.json", "/@stencil/core/internal/stencil-core.js/package.json", "/@stencil/core.js", "/@stencil/core.json", "/@stencil/core.mjs", "/@stencil/core.css", "/@stencil/core/index.js", "/@stencil/core/index.json", "/@stencil/core/index.mjs", "/@stencil/core/index.css", "/@stencil/package.json" ], fetchModuleAsync = async (e, t, r, s, n) => {
|
|
2951
2957
|
if (!((e => {
|
|
@@ -2954,11 +2960,11 @@ const COMMON_DIR_MODULE_EXTS = [ ".tsx", ".ts", ".mjs", ".js", ".jsx", ".json",
|
|
|
2954
2960
|
const r = e.split("/"), s = r[r.length - 2], n = r[r.length - 1];
|
|
2955
2961
|
return !("node_modules" !== s || !isCommonDirModuleFile(n));
|
|
2956
2962
|
})(n) || known404Urls.has(s) || (e => knownUrlSkips.some((t => e.endsWith(t))))(s))) try {
|
|
2957
|
-
const
|
|
2958
|
-
if (
|
|
2959
|
-
if (
|
|
2960
|
-
const
|
|
2961
|
-
return await (async (e, t, r, s, n,
|
|
2963
|
+
const o = await ((e, t, r) => e && isFunction(e.fetch) ? e.fetch(t, r) : fetch(t, r))(e, s);
|
|
2964
|
+
if (o) {
|
|
2965
|
+
if (o.ok) {
|
|
2966
|
+
const i = await o.clone().text();
|
|
2967
|
+
return await (async (e, t, r, s, n, o) => {
|
|
2962
2968
|
r.endsWith("package.json") && ((e, t) => {
|
|
2963
2969
|
try {
|
|
2964
2970
|
const r = JSON.parse(t);
|
|
@@ -2966,14 +2972,14 @@ const COMMON_DIR_MODULE_EXTS = [ ".tsx", ".ts", ".mjs", ".js", ".jsx", ".json",
|
|
|
2966
2972
|
e.set(t, r);
|
|
2967
2973
|
})(e, r.name, r.version);
|
|
2968
2974
|
} catch (e) {}
|
|
2969
|
-
})(
|
|
2970
|
-
let
|
|
2971
|
-
for (;"/" !==
|
|
2972
|
-
|
|
2975
|
+
})(o, n);
|
|
2976
|
+
let i = path$2.dirname(s);
|
|
2977
|
+
for (;"/" !== i && "" !== i; ) t ? (t.clearFileCache(i), await t.sys.createDir(i)) : await e.createDir(i),
|
|
2978
|
+
i = path$2.dirname(i);
|
|
2973
2979
|
t ? (t.clearFileCache(s), await t.sys.writeFile(s, n)) : await e.writeFile(s, n);
|
|
2974
|
-
})(e, t, s, n,
|
|
2980
|
+
})(e, t, s, n, i, r), i;
|
|
2975
2981
|
}
|
|
2976
|
-
404 ===
|
|
2982
|
+
404 === o.status && known404Urls.add(s);
|
|
2977
2983
|
}
|
|
2978
2984
|
} catch (e) {
|
|
2979
2985
|
console.error(e);
|
|
@@ -3010,8 +3016,8 @@ const COMMON_DIR_MODULE_EXTS = [ ".tsx", ".ts", ".mjs", ".js", ".jsx", ".json",
|
|
|
3010
3016
|
let r = BLUE, s = "Build", n = "";
|
|
3011
3017
|
"error" === e.level ? (r = RED, s = "Error") : "warn" === e.level && (r = YELLOW,
|
|
3012
3018
|
s = "Warning"), e.header && (s = e.header);
|
|
3013
|
-
const
|
|
3014
|
-
if (
|
|
3019
|
+
const o = e.relFilePath || e.absFilePath;
|
|
3020
|
+
if (o && (n += o, "number" == typeof e.lineNumber && e.lineNumber > 0 && (n += ", line " + e.lineNumber,
|
|
3015
3021
|
"number" == typeof e.columnNumber && e.columnNumber > 0 && (n += ", column " + e.columnNumber)),
|
|
3016
3022
|
n += "\n"), n += e.messageText, e.lines && e.lines.length > 0 && (e.lines.forEach((e => {
|
|
3017
3023
|
n += "\n" + e.lineNumber + ": " + e.text;
|
|
@@ -3022,7 +3028,7 @@ const COMMON_DIR_MODULE_EXTS = [ ".tsx", ".ts", ".mjs", ".js", ".jsx", ".json",
|
|
|
3022
3028
|
})(t, e)));
|
|
3023
3029
|
}
|
|
3024
3030
|
};
|
|
3025
|
-
})(), s = new Map, n = new Set,
|
|
3031
|
+
})(), s = new Map, n = new Set, o = e => n.add(e), i = e => n.delete(e), a = buildEvents(), l = IS_BROWSER_ENV && navigator.hardwareConcurrency || 1, c = e => {
|
|
3026
3032
|
if ("/" === e || "" === e) return "/";
|
|
3027
3033
|
const t = path$2.dirname(e), r = path$2.basename(e);
|
|
3028
3034
|
return t.endsWith("/") ? normalizePath(`${t}${r}`) : normalizePath(`${t}/${r}`);
|
|
@@ -3042,8 +3048,8 @@ const COMMON_DIR_MODULE_EXTS = [ ".tsx", ".ts", ".mjs", ".js", ".jsx", ".json",
|
|
|
3042
3048
|
}, h = (e, t, r) => {
|
|
3043
3049
|
const n = path$2.dirname(e);
|
|
3044
3050
|
t && t.recursive && !(e => "/" === e || windowsPathRegex.test(e))(n) && h(n, t, r);
|
|
3045
|
-
const
|
|
3046
|
-
|
|
3051
|
+
const o = s.get(e);
|
|
3052
|
+
o ? (o.isDirectory = !0, o.isFile = !1) : (s.set(e, {
|
|
3047
3053
|
basename: path$2.basename(e),
|
|
3048
3054
|
dirname: n,
|
|
3049
3055
|
isDirectory: !0,
|
|
@@ -3067,10 +3073,10 @@ const COMMON_DIR_MODULE_EXTS = [ ".tsx", ".ts", ".mjs", ".js", ".jsx", ".json",
|
|
|
3067
3073
|
}), g = (e, t, r) => {
|
|
3068
3074
|
const n = E(e);
|
|
3069
3075
|
if (!n.error && !r.error) if (n.isFile) {
|
|
3070
|
-
const n = path$2.dirname(t),
|
|
3076
|
+
const n = path$2.dirname(t), o = d(n, {
|
|
3071
3077
|
recursive: !0
|
|
3072
|
-
}),
|
|
3073
|
-
r.newDirs.push(...
|
|
3078
|
+
}), i = s.get(e).data, a = b(t, i);
|
|
3079
|
+
r.newDirs.push(...o.newDirs), r.renamed.push({
|
|
3074
3080
|
oldPath: e,
|
|
3075
3081
|
newPath: t,
|
|
3076
3082
|
isDirectory: !1,
|
|
@@ -3168,11 +3174,11 @@ const COMMON_DIR_MODULE_EXTS = [ ".tsx", ".ts", ".mjs", ".js", ".jsx", ".json",
|
|
|
3168
3174
|
d("/");
|
|
3169
3175
|
const C = {
|
|
3170
3176
|
name: "in-memory",
|
|
3171
|
-
version: "3.2.1-dev.
|
|
3177
|
+
version: "3.2.1-dev.1682658131.2c03eca",
|
|
3172
3178
|
events: a,
|
|
3173
3179
|
access: async e => u(e),
|
|
3174
3180
|
accessSync: u,
|
|
3175
|
-
addDestroy:
|
|
3181
|
+
addDestroy: o,
|
|
3176
3182
|
copyFile: async (e, t) => (b(t, f(e)), !0),
|
|
3177
3183
|
createDir: async (e, t) => d(e, t),
|
|
3178
3184
|
createDirSync: d,
|
|
@@ -3216,7 +3222,7 @@ const COMMON_DIR_MODULE_EXTS = [ ".tsx", ".ts", ".mjs", ".js", ".jsx", ".json",
|
|
|
3216
3222
|
readFileSync: f,
|
|
3217
3223
|
realpath: async e => m(e),
|
|
3218
3224
|
realpathSync: m,
|
|
3219
|
-
removeDestroy:
|
|
3225
|
+
removeDestroy: i,
|
|
3220
3226
|
rename: async (e, t) => {
|
|
3221
3227
|
const r = {
|
|
3222
3228
|
oldPath: e = normalizePath(e),
|
|
@@ -3260,7 +3266,7 @@ const COMMON_DIR_MODULE_EXTS = [ ".tsx", ".ts", ".mjs", ".js", ".jsx", ".json",
|
|
|
3260
3266
|
e > -1 && r.watcherCallbacks.splice(e, 1);
|
|
3261
3267
|
}
|
|
3262
3268
|
};
|
|
3263
|
-
return
|
|
3269
|
+
return o(n), r ? (r.isDirectory = !0, r.isFile = !1, r.watcherCallbacks = r.watcherCallbacks || [],
|
|
3264
3270
|
r.watcherCallbacks.push(t)) : s.set(e, {
|
|
3265
3271
|
basename: path$2.basename(e),
|
|
3266
3272
|
dirname: path$2.dirname(e),
|
|
@@ -3270,7 +3276,7 @@ const COMMON_DIR_MODULE_EXTS = [ ".tsx", ".ts", ".mjs", ".js", ".jsx", ".json",
|
|
|
3270
3276
|
data: void 0
|
|
3271
3277
|
}), {
|
|
3272
3278
|
close() {
|
|
3273
|
-
|
|
3279
|
+
i(n), n();
|
|
3274
3280
|
}
|
|
3275
3281
|
};
|
|
3276
3282
|
},
|
|
@@ -3283,7 +3289,7 @@ const COMMON_DIR_MODULE_EXTS = [ ".tsx", ".ts", ".mjs", ".js", ".jsx", ".json",
|
|
|
3283
3289
|
e > -1 && r.watcherCallbacks.splice(e, 1);
|
|
3284
3290
|
}
|
|
3285
3291
|
};
|
|
3286
|
-
return
|
|
3292
|
+
return o(n), r ? (r.isDirectory = !1, r.isFile = !0, r.watcherCallbacks = r.watcherCallbacks || [],
|
|
3287
3293
|
r.watcherCallbacks.push(t)) : s.set(e, {
|
|
3288
3294
|
basename: path$2.basename(e),
|
|
3289
3295
|
dirname: path$2.dirname(e),
|
|
@@ -3293,7 +3299,7 @@ const COMMON_DIR_MODULE_EXTS = [ ".tsx", ".ts", ".mjs", ".js", ".jsx", ".json",
|
|
|
3293
3299
|
data: void 0
|
|
3294
3300
|
}), {
|
|
3295
3301
|
close() {
|
|
3296
|
-
|
|
3302
|
+
i(n), n();
|
|
3297
3303
|
}
|
|
3298
3304
|
};
|
|
3299
3305
|
},
|
|
@@ -3306,18 +3312,18 @@ const COMMON_DIR_MODULE_EXTS = [ ".tsx", ".ts", ".mjs", ".js", ".jsx", ".json",
|
|
|
3306
3312
|
return "number" == typeof t && (s = s.slice(0, t)), s;
|
|
3307
3313
|
},
|
|
3308
3314
|
createWorkerController: HAS_WEB_WORKER ? e => ((e, t) => {
|
|
3309
|
-
let r, s = 0, n = !1,
|
|
3315
|
+
let r, s = 0, n = !1, o = !1, i = 0;
|
|
3310
3316
|
const a = new Map, l = [], c = [], u = Math.max(Math.min(t, e.hardwareConcurrency), 2) - 1, d = Promise.resolve(), h = e => console.error(e), p = () => {
|
|
3311
3317
|
let t = null;
|
|
3312
|
-
const s = e.getCompilerExecutingPath(),
|
|
3313
|
-
name: "stencil.worker." +
|
|
3318
|
+
const s = e.getCompilerExecutingPath(), o = {
|
|
3319
|
+
name: "stencil.worker." + i++
|
|
3314
3320
|
};
|
|
3315
3321
|
try {
|
|
3316
|
-
t = new Worker(s,
|
|
3322
|
+
t = new Worker(s, o);
|
|
3317
3323
|
} catch (e) {
|
|
3318
3324
|
null == r && (r = new Blob([ `importScripts('${s}');` ], {
|
|
3319
3325
|
type: "application/javascript"
|
|
3320
|
-
})), t = new Worker(URL.createObjectURL(r),
|
|
3326
|
+
})), t = new Worker(URL.createObjectURL(r), o);
|
|
3321
3327
|
}
|
|
3322
3328
|
const l = {
|
|
3323
3329
|
worker: t,
|
|
@@ -3346,7 +3352,7 @@ const COMMON_DIR_MODULE_EXTS = [ ".tsx", ".ts", ".mjs", ".js", ".jsx", ".json",
|
|
|
3346
3352
|
} else t = p(), c.push(t);
|
|
3347
3353
|
t.activeTasks++, t.sendQueue.push(e);
|
|
3348
3354
|
}, g = () => {
|
|
3349
|
-
|
|
3355
|
+
o = !1, l.forEach(m), l.length = 0, c.forEach(f);
|
|
3350
3356
|
}, y = (...e) => new Promise(((t, r) => {
|
|
3351
3357
|
if (n) r("task canceled"); else {
|
|
3352
3358
|
const n = {
|
|
@@ -3356,7 +3362,7 @@ const COMMON_DIR_MODULE_EXTS = [ ".tsx", ".ts", ".mjs", ".js", ".jsx", ".json",
|
|
|
3356
3362
|
l.push(n), a.set(n.stencilId, {
|
|
3357
3363
|
resolve: t,
|
|
3358
3364
|
reject: r
|
|
3359
|
-
}),
|
|
3365
|
+
}), o || (o = !0, d.then(g));
|
|
3360
3366
|
}
|
|
3361
3367
|
}));
|
|
3362
3368
|
return {
|
|
@@ -3387,11 +3393,11 @@ const COMMON_DIR_MODULE_EXTS = [ ".tsx", ".ts", ".mjs", ".js", ".jsx", ".json",
|
|
|
3387
3393
|
return C.resolveModuleId = e => ((e, t, r) => {
|
|
3388
3394
|
const s = ((e, t, r) => ({
|
|
3389
3395
|
async isFile(s, n) {
|
|
3390
|
-
const
|
|
3391
|
-
if ((await t.stat(
|
|
3392
|
-
if (shouldFetchModule(
|
|
3393
|
-
const r = getNodeModuleFetchUrl(e, packageVersions,
|
|
3394
|
-
return void n(null, "string" == typeof await fetchModuleAsync(e, t, packageVersions, r,
|
|
3396
|
+
const o = normalizeFsPath(s);
|
|
3397
|
+
if ((await t.stat(o)).isFile) n(null, !0); else {
|
|
3398
|
+
if (shouldFetchModule(o) && r.some((e => o.endsWith(e)))) {
|
|
3399
|
+
const r = getNodeModuleFetchUrl(e, packageVersions, o);
|
|
3400
|
+
return void n(null, "string" == typeof await fetchModuleAsync(e, t, packageVersions, r, o));
|
|
3395
3401
|
}
|
|
3396
3402
|
n(null, !1);
|
|
3397
3403
|
}
|
|
@@ -3404,7 +3410,7 @@ const COMMON_DIR_MODULE_EXTS = [ ".tsx", ".ts", ".mjs", ".js", ".jsx", ".json",
|
|
|
3404
3410
|
void s(null, !0);
|
|
3405
3411
|
if (isCommonDirModuleFile(n)) return void s(null, !1);
|
|
3406
3412
|
for (const r of COMMON_DIR_FILENAMES) {
|
|
3407
|
-
const
|
|
3413
|
+
const o = getCommonDirUrl(e, packageVersions, n, r), i = getCommonDirName(n, r), a = await fetchModuleAsync(e, t, packageVersions, o, i);
|
|
3408
3414
|
if (isString(a)) return void s(null, !0);
|
|
3409
3415
|
}
|
|
3410
3416
|
}
|
|
@@ -3423,13 +3429,13 @@ const COMMON_DIR_MODULE_EXTS = [ ".tsx", ".ts", ".mjs", ".js", ".jsx", ".json",
|
|
|
3423
3429
|
}))(e, null, r.exts);
|
|
3424
3430
|
return s.basedir = path$2.dirname(normalizeFsPath(r.containingFile)), r.packageFilter ? s.packageFilter = r.packageFilter : null !== r.packageFilter && (s.packageFilter = e => (isString(e.main) && "" !== e.main || (e.main = "package.json"),
|
|
3425
3431
|
e)), new Promise(((e, t) => {
|
|
3426
|
-
resolve(r.moduleId, s, ((s, n,
|
|
3432
|
+
resolve(r.moduleId, s, ((s, n, o) => {
|
|
3427
3433
|
if (s) t(s); else {
|
|
3428
3434
|
n = normalizePath(n);
|
|
3429
3435
|
const t = {
|
|
3430
3436
|
moduleId: r.moduleId,
|
|
3431
3437
|
resolveId: n,
|
|
3432
|
-
pkgData:
|
|
3438
|
+
pkgData: o,
|
|
3433
3439
|
pkgDirPath: getPackageDirPath(n, r.moduleId)
|
|
3434
3440
|
};
|
|
3435
3441
|
e(t);
|
|
@@ -3470,7 +3476,7 @@ const COMMON_DIR_MODULE_EXTS = [ ".tsx", ".ts", ".mjs", ".js", ".jsx", ".json",
|
|
|
3470
3476
|
t = e;
|
|
3471
3477
|
}
|
|
3472
3478
|
}
|
|
3473
|
-
}), !function
|
|
3479
|
+
}), !function o(e) {
|
|
3474
3480
|
return "diskReads" in e && "diskWrites" in e;
|
|
3475
3481
|
}(r)) throw new Error("could not generate TestingSystem");
|
|
3476
3482
|
return r;
|
|
@@ -3578,8 +3584,8 @@ class E2EElement extends index_cjs.MockHTMLElement {
|
|
|
3578
3584
|
waitForVisible() {
|
|
3579
3585
|
return new Promise(((e, t) => {
|
|
3580
3586
|
const r = setInterval((async () => {
|
|
3581
|
-
await this.isVisible() && (clearInterval(r), clearTimeout(
|
|
3582
|
-
}), 10), s = .5 * jasmine.DEFAULT_TIMEOUT_INTERVAL, n = new Error(`waitForVisible timed out: ${s}ms`),
|
|
3587
|
+
await this.isVisible() && (clearInterval(r), clearTimeout(o), e());
|
|
3588
|
+
}), 10), s = .5 * jasmine.DEFAULT_TIMEOUT_INTERVAL, n = new Error(`waitForVisible timed out: ${s}ms`), o = setTimeout((() => {
|
|
3583
3589
|
clearTimeout(r), t(n);
|
|
3584
3590
|
}), s);
|
|
3585
3591
|
}));
|
|
@@ -3587,8 +3593,8 @@ class E2EElement extends index_cjs.MockHTMLElement {
|
|
|
3587
3593
|
waitForNotVisible() {
|
|
3588
3594
|
return new Promise(((e, t) => {
|
|
3589
3595
|
const r = setInterval((async () => {
|
|
3590
|
-
await this.isVisible() || (clearInterval(r), clearTimeout(
|
|
3591
|
-
}), 10), s = .5 * jasmine.DEFAULT_TIMEOUT_INTERVAL, n = new Error(`waitForNotVisible timed out: ${s}ms`),
|
|
3596
|
+
await this.isVisible() || (clearInterval(r), clearTimeout(o), e());
|
|
3597
|
+
}), 10), s = .5 * jasmine.DEFAULT_TIMEOUT_INTERVAL, n = new Error(`waitForNotVisible timed out: ${s}ms`), o = setTimeout((() => {
|
|
3592
3598
|
clearTimeout(r), t(n);
|
|
3593
3599
|
}), s);
|
|
3594
3600
|
}));
|
|
@@ -3847,15 +3853,15 @@ exports.createJestPuppeteerEnvironment = function createJestPuppeteerEnvironment
|
|
|
3847
3853
|
var e;
|
|
3848
3854
|
const t = null !== (e = require("jest-runner").default) && void 0 !== e ? e : require("jest-runner");
|
|
3849
3855
|
return class r extends t {
|
|
3850
|
-
async runTests(e, t, r, s, n,
|
|
3851
|
-
const
|
|
3856
|
+
async runTests(e, t, r, s, n, o) {
|
|
3857
|
+
const i = process.env;
|
|
3852
3858
|
if (e = e.filter((e => function t(e, r) {
|
|
3853
3859
|
const s = (e = e.toLowerCase().replace(/\\/g, "/")).includes(".e2e.") || e.includes("/e2e.");
|
|
3854
3860
|
return !("true" !== r.__STENCIL_E2E_TESTS__ || !s) || "true" === r.__STENCIL_SPEC_TESTS__ && !s;
|
|
3855
|
-
}(e.path,
|
|
3856
|
-
const a = JSON.parse(
|
|
3857
|
-
for (let l = 0; l < a.length; l++) setScreenshotEmulateData(a[l],
|
|
3858
|
-
} else await super.runTests(e, t, r, s, n,
|
|
3861
|
+
}(e.path, i))), "true" === i.__STENCIL_SCREENSHOT__) {
|
|
3862
|
+
const a = JSON.parse(i.__STENCIL_EMULATE_CONFIGS__);
|
|
3863
|
+
for (let l = 0; l < a.length; l++) setScreenshotEmulateData(a[l], i), await super.runTests(e, t, r, s, n, o);
|
|
3864
|
+
} else await super.runTests(e, t, r, s, n, o);
|
|
3859
3865
|
}
|
|
3860
3866
|
};
|
|
3861
3867
|
}, exports.createTesting = async e => {
|
|
@@ -3867,14 +3873,14 @@ exports.createJestPuppeteerEnvironment = function createJestPuppeteerEnvironment
|
|
|
3867
3873
|
})), e.flags.args.includes("--watchAll") && (e.watch = !0), e;
|
|
3868
3874
|
}(e);
|
|
3869
3875
|
const {createCompiler: r} = require("../compiler/stencil.js"), s = await r(e);
|
|
3870
|
-
let n,
|
|
3871
|
-
const
|
|
3876
|
+
let n, o;
|
|
3877
|
+
const i = async () => {
|
|
3872
3878
|
const t = [];
|
|
3873
3879
|
e && (e.sys && e.sys.destroy && t.push(e.sys.destroy()), e = null), n && (n.close && t.push(n.close()),
|
|
3874
|
-
n = null),
|
|
3880
|
+
n = null), o && (o.close && t.push(o.close()), o = null), await Promise.all(t);
|
|
3875
3881
|
};
|
|
3876
3882
|
return {
|
|
3877
|
-
destroy:
|
|
3883
|
+
destroy: i,
|
|
3878
3884
|
run: async (t = {}) => {
|
|
3879
3885
|
let r, a = !1, l = !1, c = null;
|
|
3880
3886
|
const u = [];
|
|
@@ -3897,9 +3903,9 @@ exports.createJestPuppeteerEnvironment = function createJestPuppeteerEnvironment
|
|
|
3897
3903
|
})), c.start()) : t = s.build()), e.devServer.openBrowser = !1, e.devServer.gzip = !1,
|
|
3898
3904
|
e.devServer.reloadStrategy = null;
|
|
3899
3905
|
const l = await Promise.all([ index_js.start(e.devServer, e.logger), startPuppeteerBrowser(e) ]);
|
|
3900
|
-
if (n = l[0],
|
|
3906
|
+
if (n = l[0], o = l[1], t) {
|
|
3901
3907
|
const r = await t;
|
|
3902
|
-
if (!r || !e.watch && hasError(r && r.diagnostics)) return await
|
|
3908
|
+
if (!r || !e.watch && hasError(r && r.diagnostics)) return await i(), !1;
|
|
3903
3909
|
}
|
|
3904
3910
|
n && (r.__STENCIL_BROWSER_URL__ = n.browserUrl, e.logger.debug(`e2e dev server url: ${r.__STENCIL_BROWSER_URL__}`),
|
|
3905
3911
|
r.__STENCIL_APP_SCRIPT_URL__ = function d(e, t) {
|
|
@@ -3933,13 +3939,13 @@ exports.createJestPuppeteerEnvironment = function createJestPuppeteerEnvironment
|
|
|
3933
3939
|
waitBeforeScreenshot: e.testing.waitBeforeScreenshot,
|
|
3934
3940
|
pixelmatchModulePath: s
|
|
3935
3941
|
}), e.flags.updateScreenshot || await r.pullMasterBuild(), n.finish("screenshot, initBuild finished");
|
|
3936
|
-
const
|
|
3937
|
-
t.__STENCIL_SCREENSHOT_BUILD__ = r.toJson(
|
|
3942
|
+
const o = await Promise.all([ await r.getMasterBuild(), await r.getScreenshotCache() ]), i = o[0], a = o[1];
|
|
3943
|
+
t.__STENCIL_SCREENSHOT_BUILD__ = r.toJson(i, a);
|
|
3938
3944
|
const l = e.logger.createTimeSpan("screenshot, tests started", !0), c = await runJest(e, t);
|
|
3939
3945
|
l.finish(`screenshot, tests finished, passed: ${c}`);
|
|
3940
3946
|
try {
|
|
3941
3947
|
const t = e.logger.createTimeSpan("screenshot, completeTimespan started", !0);
|
|
3942
|
-
let s = await r.completeBuild(
|
|
3948
|
+
let s = await r.completeBuild(i);
|
|
3943
3949
|
if (t.finish("screenshot, completeTimespan finished"), s) {
|
|
3944
3950
|
const t = e.logger.createTimeSpan("screenshot, publishBuild started", !0);
|
|
3945
3951
|
if (s = await r.publishBuild(s), t.finish("screenshot, publishBuild finished"),
|
|
@@ -3976,7 +3982,10 @@ exports.createJestPuppeteerEnvironment = function createJestPuppeteerEnvironment
|
|
|
3976
3982
|
testing.resetPlatform(), testing.setErrorHandler(void 0), resetBuildConditionals(appData.BUILD),
|
|
3977
3983
|
testing.modeResolutionChain.length = 0;
|
|
3978
3984
|
})), afterEach((async () => {
|
|
3979
|
-
|
|
3985
|
+
var e, t, r, s, n, o;
|
|
3986
|
+
global.__CLOSE_OPEN_PAGES__ && await global.__CLOSE_OPEN_PAGES__(), testing.stopAutoApplyChanges();
|
|
3987
|
+
const i = null === (n = null === (s = null === (r = null === (t = null === (e = global.window) || void 0 === e ? void 0 : e.document) || void 0 === t ? void 0 : t.childNodes) || void 0 === r ? void 0 : r[1]) || void 0 === s ? void 0 : s.childNodes) || void 0 === n ? void 0 : n.find((e => "BODY" === e.nodeName));
|
|
3988
|
+
null === (o = null == i ? void 0 : i.childNodes) || void 0 === o || o.forEach(removeDomNodes),
|
|
3980
3989
|
index_cjs.teardownGlobal(global), global.Context = {}, global.resourcesUrl = "/build";
|
|
3981
3990
|
}));
|
|
3982
3991
|
const t = jasmine.getEnv();
|
|
@@ -4077,19 +4086,19 @@ exports.createJestPuppeteerEnvironment = function createJestPuppeteerEnvironment
|
|
|
4077
4086
|
const t = process.env;
|
|
4078
4087
|
"true" === t.__STENCIL_SCREENSHOT__ ? e.compareScreenshot = (r, s) => {
|
|
4079
4088
|
const n = global;
|
|
4080
|
-
let
|
|
4081
|
-
if (n.currentSpec && ("string" == typeof n.currentSpec.fullName && (
|
|
4082
|
-
"string" == typeof n.currentSpec.testPath && (a = n.currentSpec.testPath)), "string" == typeof r ? (
|
|
4083
|
-
"object" == typeof s && (
|
|
4084
|
-
|
|
4085
|
-
if (n.screenshotDescriptions.has(
|
|
4086
|
-
return n.screenshotDescriptions.add(
|
|
4089
|
+
let o, i = "", a = "";
|
|
4090
|
+
if (n.currentSpec && ("string" == typeof n.currentSpec.fullName && (i = n.currentSpec.fullName),
|
|
4091
|
+
"string" == typeof n.currentSpec.testPath && (a = n.currentSpec.testPath)), "string" == typeof r ? (i.length > 0 ? i += ", " + r : i = r,
|
|
4092
|
+
"object" == typeof s && (o = s)) : "object" == typeof r && (o = r), i = i.trim(),
|
|
4093
|
+
o = o || {}, !i) throw new Error(`Invalid screenshot description in "${a}"`);
|
|
4094
|
+
if (n.screenshotDescriptions.has(i)) throw new Error(`Screenshot description "${i}" found in "${a}" cannot be used for multiple screenshots and must be unique. To make screenshot descriptions unique within the same test, use the first argument to "compareScreenshot", such as "compareScreenshot('more to the description')".`);
|
|
4095
|
+
return n.screenshotDescriptions.add(i), async function l(e, t, r, s, n) {
|
|
4087
4096
|
if ("string" != typeof t.__STENCIL_EMULATE__) throw new Error("compareScreenshot, missing screenshot emulate env var");
|
|
4088
4097
|
if ("string" != typeof t.__STENCIL_SCREENSHOT_BUILD__) throw new Error("compareScreenshot, missing screen build env var");
|
|
4089
|
-
const
|
|
4098
|
+
const o = JSON.parse(t.__STENCIL_EMULATE__), i = JSON.parse(t.__STENCIL_SCREENSHOT_BUILD__);
|
|
4090
4099
|
await function a(e) {
|
|
4091
4100
|
return new Promise((t => setTimeout(t, e)));
|
|
4092
|
-
}(
|
|
4101
|
+
}(i.timeoutBeforeScreenshot), await e.evaluate((() => new Promise((e => {
|
|
4093
4102
|
window.requestAnimationFrame((() => {
|
|
4094
4103
|
e();
|
|
4095
4104
|
}));
|
|
@@ -4107,11 +4116,11 @@ exports.createJestPuppeteerEnvironment = function createJestPuppeteerEnvironment
|
|
|
4107
4116
|
width: e.clip.width,
|
|
4108
4117
|
height: e.clip.height
|
|
4109
4118
|
}), t;
|
|
4110
|
-
}(n), u = await e.screenshot(l), d = "number" == typeof n.pixelmatchThreshold ? n.pixelmatchThreshold :
|
|
4111
|
-
let h =
|
|
4119
|
+
}(n), u = await e.screenshot(l), d = "number" == typeof n.pixelmatchThreshold ? n.pixelmatchThreshold : i.pixelmatchThreshold;
|
|
4120
|
+
let h = o.viewport.width, p = o.viewport.height;
|
|
4112
4121
|
return n && n.clip && ("number" == typeof n.clip.width && (h = n.clip.width), "number" == typeof n.clip.height && (p = n.clip.height)),
|
|
4113
|
-
await compareScreenshot(
|
|
4114
|
-
}(e, t,
|
|
4122
|
+
await compareScreenshot(o, i, u, r, h, p, s, d);
|
|
4123
|
+
}(e, t, i, a, o);
|
|
4115
4124
|
} : e.compareScreenshot = async () => ({
|
|
4116
4125
|
mismatchedPixels: 0,
|
|
4117
4126
|
allowableMismatchedPixels: 1,
|
|
@@ -4159,13 +4168,13 @@ exports.createJestPuppeteerEnvironment = function createJestPuppeteerEnvironment
|
|
|
4159
4168
|
e();
|
|
4160
4169
|
}))));
|
|
4161
4170
|
};
|
|
4162
|
-
const
|
|
4171
|
+
const o = !0 === e.failOnConsoleError, i = !0 === e.failOnNetworkError;
|
|
4163
4172
|
t.on("console", (e => {
|
|
4164
4173
|
if ("error" === e.type() && (r.push({
|
|
4165
4174
|
type: "error",
|
|
4166
4175
|
message: e.text(),
|
|
4167
4176
|
location: e.location().url
|
|
4168
|
-
}),
|
|
4177
|
+
}), o)) throw new Error(serializeConsoleMessage(e));
|
|
4169
4178
|
!function t(e) {
|
|
4170
4179
|
const t = serializeConsoleMessage(e), r = e.type(), s = "warning" === r ? "warn" : r;
|
|
4171
4180
|
"debug" !== s && ("function" == typeof console[s] ? console[s](t) : console.log(r, t));
|
|
@@ -4181,7 +4190,7 @@ exports.createJestPuppeteerEnvironment = function createJestPuppeteerEnvironment
|
|
|
4181
4190
|
type: "requestfailed",
|
|
4182
4191
|
message: e.failure().errorText,
|
|
4183
4192
|
location: e.url()
|
|
4184
|
-
}),
|
|
4193
|
+
}), i) throw new Error(e.failure().errorText);
|
|
4185
4194
|
console.error("requestfailed", e.url());
|
|
4186
4195
|
})), "string" == typeof e.html ? await e2eSetContent(t, e.html, {
|
|
4187
4196
|
waitUntil: e.waitUntil
|
|
@@ -4212,10 +4221,10 @@ exports.createJestPuppeteerEnvironment = function createJestPuppeteerEnvironment
|
|
|
4212
4221
|
waitForChanges: testing.flushAll,
|
|
4213
4222
|
flushLoadModule: testing.flushLoadModule,
|
|
4214
4223
|
flushQueue: testing.flushQueue
|
|
4215
|
-
},
|
|
4224
|
+
}, o = e.components.map((e => {
|
|
4216
4225
|
if (null == e.COMPILER_META) throw new Error('Invalid component class: Missing static "COMPILER_META" property.');
|
|
4217
4226
|
r.add(e.COMPILER_META.tagName), e.isProxied = !1, function t(e) {
|
|
4218
|
-
var t, r, s, n,
|
|
4227
|
+
var t, r, s, n, o, i;
|
|
4219
4228
|
"function" == typeof (null === (t = e.prototype) || void 0 === t ? void 0 : t.__componentWillLoad) && (e.prototype.componentWillLoad = e.prototype.__componentWillLoad,
|
|
4220
4229
|
e.prototype.__componentWillLoad = null), "function" == typeof (null === (r = e.prototype) || void 0 === r ? void 0 : r.__componentWillUpdate) && (e.prototype.componentWillUpdate = e.prototype.__componentWillUpdate,
|
|
4221
4230
|
e.prototype.__componentWillUpdate = null), "function" == typeof (null === (s = e.prototype) || void 0 === s ? void 0 : s.__componentWillRender) && (e.prototype.componentWillRender = e.prototype.__componentWillRender,
|
|
@@ -4224,12 +4233,12 @@ exports.createJestPuppeteerEnvironment = function createJestPuppeteerEnvironment
|
|
|
4224
4233
|
const e = this.__componentWillLoad();
|
|
4225
4234
|
return null != e && "function" == typeof e.then ? testing.writeTask((() => e)) : testing.writeTask((() => Promise.resolve())),
|
|
4226
4235
|
e;
|
|
4227
|
-
}), "function" == typeof (null === (
|
|
4236
|
+
}), "function" == typeof (null === (o = e.prototype) || void 0 === o ? void 0 : o.componentWillUpdate) && (e.prototype.__componentWillUpdate = e.prototype.componentWillUpdate,
|
|
4228
4237
|
e.prototype.componentWillUpdate = function() {
|
|
4229
4238
|
const e = this.__componentWillUpdate();
|
|
4230
4239
|
return null != e && "function" == typeof e.then ? testing.writeTask((() => e)) : testing.writeTask((() => Promise.resolve())),
|
|
4231
4240
|
e;
|
|
4232
|
-
}), "function" == typeof (null === (
|
|
4241
|
+
}), "function" == typeof (null === (i = e.prototype) || void 0 === i ? void 0 : i.componentWillRender) && (e.prototype.__componentWillRender = e.prototype.componentWillRender,
|
|
4233
4242
|
e.prototype.componentWillRender = function() {
|
|
4234
4243
|
const e = this.__componentWillRender();
|
|
4235
4244
|
return null != e && "function" == typeof e.then ? testing.writeTask((() => e)) : testing.writeTask((() => Promise.resolve())),
|
|
@@ -4244,15 +4253,15 @@ exports.createJestPuppeteerEnvironment = function createJestPuppeteerEnvironment
|
|
|
4244
4253
|
})), e.style = t;
|
|
4245
4254
|
} else 1 === n.length && (e.style = n[0].styleStr);
|
|
4246
4255
|
testing.registerModule(s, e);
|
|
4247
|
-
const
|
|
4256
|
+
const o = ((e, t) => [ e, t.map((e => ((e, t) => {
|
|
4248
4257
|
let r = 0;
|
|
4249
4258
|
"shadow" === e.encapsulation ? (r |= 1, e.shadowDelegatesFocus && (r |= 16)) : "scoped" === e.encapsulation && (r |= 2),
|
|
4250
4259
|
"shadow" !== e.encapsulation && e.htmlTagNames.includes("slot") && (r |= 4), e.hasMode && (r |= 32);
|
|
4251
4260
|
const s = formatComponentRuntimeMembers(e, t), n = formatHostListeners(e);
|
|
4252
4261
|
return trimFalsy([ r, e.tagName, Object.keys(s).length > 0 ? s : void 0, n.length > 0 ? n : void 0 ]);
|
|
4253
4262
|
})(e, !0))) ])(s, [ e.COMPILER_META ]);
|
|
4254
|
-
return
|
|
4255
|
-
})),
|
|
4263
|
+
return o;
|
|
4264
|
+
})), i = (e => {
|
|
4256
4265
|
const t = e.some((e => e.htmlTagNames.includes("slot"))), r = e.some((e => "shadow" === e.encapsulation)), s = e.some((e => "shadow" !== e.encapsulation && e.htmlTagNames.includes("slot"))), n = {
|
|
4257
4266
|
allRenderFn: e.every((e => e.hasRenderFn)),
|
|
4258
4267
|
cmpDidLoad: e.some((e => e.hasComponentDidLoadFn)),
|
|
@@ -4312,8 +4321,8 @@ exports.createJestPuppeteerEnvironment = function createJestPuppeteerEnvironment
|
|
|
4312
4321
|
return n.asyncLoading = n.cmpWillUpdate || n.cmpWillLoad || n.cmpWillRender, n.vdomAttribute = n.vdomAttribute || n.reflect,
|
|
4313
4322
|
n.vdomPropOrAttr = n.vdomPropOrAttr || n.reflect, n;
|
|
4314
4323
|
})(e.components.map((e => e.COMPILER_META)));
|
|
4315
|
-
if (e.strictBuild ? Object.assign(appData.BUILD,
|
|
4316
|
-
!0 ===
|
|
4324
|
+
if (e.strictBuild ? Object.assign(appData.BUILD, i) : Object.keys(i).forEach((e => {
|
|
4325
|
+
!0 === i[e] && (appData.BUILD[e] = !0);
|
|
4317
4326
|
})), appData.BUILD.asyncLoading = !0, e.hydrateClientSide ? (appData.BUILD.hydrateClientSide = !0,
|
|
4318
4327
|
appData.BUILD.hydrateServerSide = !1) : e.hydrateServerSide && (appData.BUILD.hydrateServerSide = !0,
|
|
4319
4328
|
appData.BUILD.hydrateClientSide = !1), appData.BUILD.cloneNodeFix = !1, appData.BUILD.shadowDomShim = !1,
|
|
@@ -4329,7 +4338,7 @@ exports.createJestPuppeteerEnvironment = function createJestPuppeteerEnvironment
|
|
|
4329
4338
|
if ("string" == typeof e.userAgent) try {
|
|
4330
4339
|
n.win.navigator.userAgent = e.userAgent;
|
|
4331
4340
|
} catch (e) {}
|
|
4332
|
-
if (testing.bootstrapLazy(
|
|
4341
|
+
if (testing.bootstrapLazy(o), "function" == typeof e.template) {
|
|
4333
4342
|
const t = {
|
|
4334
4343
|
$ancestorComponent$: void 0,
|
|
4335
4344
|
$flags$: 0,
|