@stencil/core 4.27.0 → 4.27.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.
- 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 +10 -10
- 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/index.js +80 -53
- package/internal/client/package.json +1 -1
- package/internal/client/patch-browser.js +3 -3
- package/internal/hydrate/index.js +79 -53
- package/internal/hydrate/package.json +1 -1
- package/internal/hydrate/runner.js +105 -106
- package/internal/package.json +1 -1
- package/internal/testing/index.js +77 -52
- 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/screenshot/index.js +1 -1
- package/screenshot/package.json +1 -1
- package/screenshot/pixel-match.js +1 -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 +1 -1
- package/testing/package.json +1 -1
|
@@ -34,7 +34,6 @@ __export(index_exports, {
|
|
|
34
34
|
createEvent: () => createEvent,
|
|
35
35
|
defineCustomElement: () => defineCustomElement,
|
|
36
36
|
disconnectedCallback: () => disconnectedCallback,
|
|
37
|
-
doc: () => doc,
|
|
38
37
|
flushAll: () => flushAll,
|
|
39
38
|
flushLoadModule: () => flushLoadModule,
|
|
40
39
|
flushQueue: () => flushQueue,
|
|
@@ -290,7 +289,6 @@ function flushLoadModule(bundleId) {
|
|
|
290
289
|
// src/testing/platform/testing-window.ts
|
|
291
290
|
var import_mock_doc = require("../../mock-doc/index.cjs");
|
|
292
291
|
var win = (0, import_mock_doc.setupGlobal)(global);
|
|
293
|
-
var doc = win.document;
|
|
294
292
|
|
|
295
293
|
// src/testing/platform/testing-platform.ts
|
|
296
294
|
var supportsShadow = true;
|
|
@@ -395,9 +393,9 @@ var isComplexType = (o) => {
|
|
|
395
393
|
};
|
|
396
394
|
|
|
397
395
|
// src/utils/query-nonce-meta-tag-content.ts
|
|
398
|
-
function queryNonceMetaTagContent(
|
|
396
|
+
function queryNonceMetaTagContent(doc) {
|
|
399
397
|
var _a, _b, _c;
|
|
400
|
-
return (_c = (_b = (_a =
|
|
398
|
+
return (_c = (_b = (_a = doc.head) == null ? void 0 : _a.querySelector('meta[name="csp-nonce"]')) == null ? void 0 : _b.getAttribute("content")) != null ? _c : void 0;
|
|
401
399
|
}
|
|
402
400
|
|
|
403
401
|
// src/utils/regular-expression.ts
|
|
@@ -1252,8 +1250,8 @@ var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
|
|
|
1252
1250
|
delete hostElm["s-sc"];
|
|
1253
1251
|
}
|
|
1254
1252
|
}
|
|
1255
|
-
if (!plt.$orgLocNodes$ || !plt.$orgLocNodes$.size) {
|
|
1256
|
-
initializeDocumentHydrate(
|
|
1253
|
+
if (win.document && (!plt.$orgLocNodes$ || !plt.$orgLocNodes$.size)) {
|
|
1254
|
+
initializeDocumentHydrate(win.document.body, plt.$orgLocNodes$ = /* @__PURE__ */ new Map());
|
|
1257
1255
|
}
|
|
1258
1256
|
hostElm[HYDRATE_ID] = hostId;
|
|
1259
1257
|
hostElm.removeAttribute(HYDRATE_ID);
|
|
@@ -1579,8 +1577,8 @@ function addSlot(slotName, slotId, childVNode, node, parentVNode, childRenderNod
|
|
|
1579
1577
|
childVNode.$name$ = slotName || null;
|
|
1580
1578
|
childVNode.$tag$ = "slot";
|
|
1581
1579
|
const parentNodeId = (parentVNode == null ? void 0 : parentVNode.$elm$) ? parentVNode.$elm$["s-id"] || parentVNode.$elm$.getAttribute("s-id") : "";
|
|
1582
|
-
if (import_app_data5.BUILD.shadowDom && shadowRootNodes) {
|
|
1583
|
-
const slot = childVNode.$elm$ =
|
|
1580
|
+
if (import_app_data5.BUILD.shadowDom && shadowRootNodes && win.document) {
|
|
1581
|
+
const slot = childVNode.$elm$ = win.document.createElement(childVNode.$tag$);
|
|
1584
1582
|
if (childVNode.$name$) {
|
|
1585
1583
|
childVNode.$elm$.setAttribute("name", slotName);
|
|
1586
1584
|
}
|
|
@@ -2063,10 +2061,10 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
2063
2061
|
var _a;
|
|
2064
2062
|
const scopeId2 = getScopeId(cmpMeta, mode);
|
|
2065
2063
|
const style = styles.get(scopeId2);
|
|
2066
|
-
if (!import_app_data9.BUILD.attachStyles) {
|
|
2064
|
+
if (!import_app_data9.BUILD.attachStyles || !win.document) {
|
|
2067
2065
|
return scopeId2;
|
|
2068
2066
|
}
|
|
2069
|
-
styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode :
|
|
2067
|
+
styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : win.document;
|
|
2070
2068
|
if (style) {
|
|
2071
2069
|
if (typeof style === "string") {
|
|
2072
2070
|
styleContainerNode = styleContainerNode.head || styleContainerNode;
|
|
@@ -2079,9 +2077,9 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
2079
2077
|
if (import_app_data9.BUILD.hydrateClientSide && styleContainerNode.host && (styleElm = styleContainerNode.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`))) {
|
|
2080
2078
|
styleElm.innerHTML = style;
|
|
2081
2079
|
} else {
|
|
2082
|
-
styleElm = document.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`) ||
|
|
2080
|
+
styleElm = document.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`) || win.document.createElement("style");
|
|
2083
2081
|
styleElm.innerHTML = style;
|
|
2084
|
-
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(
|
|
2082
|
+
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(win.document);
|
|
2085
2083
|
if (nonce != null) {
|
|
2086
2084
|
styleElm.setAttribute("nonce", nonce);
|
|
2087
2085
|
}
|
|
@@ -2149,7 +2147,10 @@ var attachStyles = (hostRef) => {
|
|
|
2149
2147
|
var getScopeId = (cmp, mode) => "sc-" + (import_app_data9.BUILD.mode && mode && cmp.$flags$ & 32 /* hasMode */ ? cmp.$tagName$ + "-" + mode : cmp.$tagName$);
|
|
2150
2148
|
var convertScopedToShadow = (css) => css.replace(/\/\*!@([^\/]+)\*\/[^\{]+\{/g, "$1{");
|
|
2151
2149
|
var hydrateScopedToShadow = () => {
|
|
2152
|
-
|
|
2150
|
+
if (!win.document) {
|
|
2151
|
+
return;
|
|
2152
|
+
}
|
|
2153
|
+
const styles2 = win.document.querySelectorAll(`[${HYDRATED_STYLE_ID}]`);
|
|
2153
2154
|
let i2 = 0;
|
|
2154
2155
|
for (; i2 < styles2.length; i2++) {
|
|
2155
2156
|
registerStyle(styles2[i2].getAttribute(HYDRATED_STYLE_ID), convertScopedToShadow(styles2[i2].innerHTML), true);
|
|
@@ -2366,9 +2367,9 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
|
2366
2367
|
);
|
|
2367
2368
|
}
|
|
2368
2369
|
if (import_app_data12.BUILD.vdomText && newVNode2.$text$ !== null) {
|
|
2369
|
-
elm = newVNode2.$elm$ =
|
|
2370
|
+
elm = newVNode2.$elm$ = win.document.createTextNode(newVNode2.$text$);
|
|
2370
2371
|
} else if (import_app_data12.BUILD.slotRelocation && newVNode2.$flags$ & 1 /* isSlotReference */) {
|
|
2371
|
-
elm = newVNode2.$elm$ = import_app_data12.BUILD.isDebug || import_app_data12.BUILD.hydrateServerSide ? slotReferenceDebugNode(newVNode2) :
|
|
2372
|
+
elm = newVNode2.$elm$ = import_app_data12.BUILD.isDebug || import_app_data12.BUILD.hydrateServerSide ? slotReferenceDebugNode(newVNode2) : win.document.createTextNode("");
|
|
2372
2373
|
if (import_app_data12.BUILD.vdomAttribute) {
|
|
2373
2374
|
updateElement(null, newVNode2, isSvgMode);
|
|
2374
2375
|
}
|
|
@@ -2376,10 +2377,15 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
|
2376
2377
|
if (import_app_data12.BUILD.svg && !isSvgMode) {
|
|
2377
2378
|
isSvgMode = newVNode2.$tag$ === "svg";
|
|
2378
2379
|
}
|
|
2379
|
-
|
|
2380
|
+
if (!win.document) {
|
|
2381
|
+
throw new Error(
|
|
2382
|
+
"You are trying to render a Stencil component in an environment that doesn't support the DOM. Make sure to populate the [`window`](https://developer.mozilla.org/en-US/docs/Web/API/Window/window) object before rendering a component."
|
|
2383
|
+
);
|
|
2384
|
+
}
|
|
2385
|
+
elm = newVNode2.$elm$ = import_app_data12.BUILD.svg ? win.document.createElementNS(
|
|
2380
2386
|
isSvgMode ? SVG_NS : HTML_NS,
|
|
2381
2387
|
!useNativeShadowDom && import_app_data12.BUILD.slotRelocation && newVNode2.$flags$ & 2 /* isSlotFallback */ ? "slot-fb" : newVNode2.$tag$
|
|
2382
|
-
) :
|
|
2388
|
+
) : win.document.createElement(
|
|
2383
2389
|
!useNativeShadowDom && import_app_data12.BUILD.slotRelocation && newVNode2.$flags$ & 2 /* isSlotFallback */ ? "slot-fb" : newVNode2.$tag$
|
|
2384
2390
|
);
|
|
2385
2391
|
if (import_app_data12.BUILD.svg && isSvgMode && newVNode2.$tag$ === "foreignObject") {
|
|
@@ -2814,8 +2820,8 @@ render() {
|
|
|
2814
2820
|
markSlotContentForRelocation(rootVnode.$elm$);
|
|
2815
2821
|
for (const relocateData of relocateNodes) {
|
|
2816
2822
|
const nodeToRelocate = relocateData.$nodeToRelocate$;
|
|
2817
|
-
if (!nodeToRelocate["s-ol"]) {
|
|
2818
|
-
const orgLocationNode = import_app_data12.BUILD.isDebug || import_app_data12.BUILD.hydrateServerSide ? originalLocationDebugNode(nodeToRelocate) :
|
|
2823
|
+
if (!nodeToRelocate["s-ol"] && win.document) {
|
|
2824
|
+
const orgLocationNode = import_app_data12.BUILD.isDebug || import_app_data12.BUILD.hydrateServerSide ? originalLocationDebugNode(nodeToRelocate) : win.document.createTextNode("");
|
|
2819
2825
|
orgLocationNode["s-nr"] = nodeToRelocate;
|
|
2820
2826
|
insertBefore(nodeToRelocate.parentNode, nodeToRelocate["s-ol"] = orgLocationNode, nodeToRelocate);
|
|
2821
2827
|
}
|
|
@@ -2886,12 +2892,18 @@ render() {
|
|
|
2886
2892
|
}
|
|
2887
2893
|
contentRef = void 0;
|
|
2888
2894
|
};
|
|
2889
|
-
var slotReferenceDebugNode = (slotVNode) =>
|
|
2890
|
-
|
|
2891
|
-
)
|
|
2892
|
-
|
|
2893
|
-
|
|
2894
|
-
|
|
2895
|
+
var slotReferenceDebugNode = (slotVNode) => {
|
|
2896
|
+
var _a;
|
|
2897
|
+
return (_a = win.document) == null ? void 0 : _a.createComment(
|
|
2898
|
+
`<slot${slotVNode.$name$ ? ' name="' + slotVNode.$name$ + '"' : ""}> (host=${hostTagName.toLowerCase()})`
|
|
2899
|
+
);
|
|
2900
|
+
};
|
|
2901
|
+
var originalLocationDebugNode = (nodeToRelocate) => {
|
|
2902
|
+
var _a;
|
|
2903
|
+
return (_a = win.document) == null ? void 0 : _a.createComment(
|
|
2904
|
+
`org-location for ` + (nodeToRelocate.localName ? `<${nodeToRelocate.localName}> (host=${nodeToRelocate["s-hn"]})` : `[${nodeToRelocate.textContent}]`)
|
|
2905
|
+
);
|
|
2906
|
+
};
|
|
2895
2907
|
|
|
2896
2908
|
// src/runtime/update-component.ts
|
|
2897
2909
|
var attachToAncestor = (hostRef, ancestorComponent) => {
|
|
@@ -3570,7 +3582,10 @@ var connectedCallback = (elm) => {
|
|
|
3570
3582
|
}
|
|
3571
3583
|
};
|
|
3572
3584
|
var setContentReference = (elm) => {
|
|
3573
|
-
|
|
3585
|
+
if (!win.document) {
|
|
3586
|
+
return;
|
|
3587
|
+
}
|
|
3588
|
+
const contentRefElm = elm["s-cr"] = win.document.createComment(
|
|
3574
3589
|
import_app_data17.BUILD.isDebug ? `content-ref (host=${elm.localName})` : ""
|
|
3575
3590
|
);
|
|
3576
3591
|
contentRefElm["s-cn"] = true;
|
|
@@ -3744,18 +3759,22 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
3744
3759
|
performance.mark("st:app:start");
|
|
3745
3760
|
}
|
|
3746
3761
|
installDevTools();
|
|
3762
|
+
if (!win.document) {
|
|
3763
|
+
console.warn("Stencil: No document found. Skipping bootstrapping lazy components.");
|
|
3764
|
+
return;
|
|
3765
|
+
}
|
|
3747
3766
|
const endBootstrap = createTime("bootstrapLazy");
|
|
3748
3767
|
const cmpTags = [];
|
|
3749
3768
|
const exclude = options.exclude || [];
|
|
3750
3769
|
const customElements2 = win.customElements;
|
|
3751
|
-
const head =
|
|
3770
|
+
const head = win.document.head;
|
|
3752
3771
|
const metaCharset = /* @__PURE__ */ head.querySelector("meta[charset]");
|
|
3753
|
-
const dataStyles = /* @__PURE__ */
|
|
3772
|
+
const dataStyles = /* @__PURE__ */ win.document.createElement("style");
|
|
3754
3773
|
const deferredConnectedCallbacks = [];
|
|
3755
3774
|
let appLoadFallback;
|
|
3756
3775
|
let isBootstrapping = true;
|
|
3757
3776
|
Object.assign(plt, options);
|
|
3758
|
-
plt.$resourcesUrl$ = new URL(options.resourcesUrl || "./",
|
|
3777
|
+
plt.$resourcesUrl$ = new URL(options.resourcesUrl || "./", win.document.baseURI).href;
|
|
3759
3778
|
if (import_app_data20.BUILD.asyncQueue) {
|
|
3760
3779
|
if (options.syncQueue) {
|
|
3761
3780
|
plt.$flags$ |= 4 /* queueSync */;
|
|
@@ -3905,7 +3924,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
3905
3924
|
}
|
|
3906
3925
|
if (dataStyles.innerHTML.length) {
|
|
3907
3926
|
dataStyles.setAttribute("data-styles", "");
|
|
3908
|
-
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(
|
|
3927
|
+
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(win.document);
|
|
3909
3928
|
if (nonce != null) {
|
|
3910
3929
|
dataStyles.setAttribute("nonce", nonce);
|
|
3911
3930
|
}
|
|
@@ -3931,7 +3950,7 @@ var Fragment = (_, children) => children;
|
|
|
3931
3950
|
// src/runtime/host-listener.ts
|
|
3932
3951
|
var import_app_data21 = require("@stencil/core/internal/app-data");
|
|
3933
3952
|
var addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) => {
|
|
3934
|
-
if (import_app_data21.BUILD.hostListener && listeners) {
|
|
3953
|
+
if (import_app_data21.BUILD.hostListener && listeners && win.document) {
|
|
3935
3954
|
if (import_app_data21.BUILD.hostListenerTargetParent) {
|
|
3936
3955
|
if (attachParentListeners) {
|
|
3937
3956
|
listeners = listeners.filter(([flags]) => flags & 32 /* TargetParent */);
|
|
@@ -3940,7 +3959,7 @@ var addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) =>
|
|
|
3940
3959
|
}
|
|
3941
3960
|
}
|
|
3942
3961
|
listeners.map(([flags, name, method]) => {
|
|
3943
|
-
const target = import_app_data21.BUILD.hostListenerTarget ? getHostListenerTarget(elm, flags) : elm;
|
|
3962
|
+
const target = import_app_data21.BUILD.hostListenerTarget ? getHostListenerTarget(win.document, elm, flags) : elm;
|
|
3944
3963
|
const handler = hostListenerProxy(hostRef, method);
|
|
3945
3964
|
const opts = hostListenerOpts(flags);
|
|
3946
3965
|
plt.ael(target, name, handler, opts);
|
|
@@ -3964,12 +3983,19 @@ var hostListenerProxy = (hostRef, methodName) => (ev) => {
|
|
|
3964
3983
|
consoleError(e, hostRef.$hostElement$);
|
|
3965
3984
|
}
|
|
3966
3985
|
};
|
|
3967
|
-
var getHostListenerTarget = (elm, flags) => {
|
|
3968
|
-
if (import_app_data21.BUILD.hostListenerTargetDocument && flags & 4 /* TargetDocument */)
|
|
3969
|
-
|
|
3970
|
-
|
|
3971
|
-
if (import_app_data21.BUILD.
|
|
3986
|
+
var getHostListenerTarget = (doc, elm, flags) => {
|
|
3987
|
+
if (import_app_data21.BUILD.hostListenerTargetDocument && flags & 4 /* TargetDocument */) {
|
|
3988
|
+
return doc;
|
|
3989
|
+
}
|
|
3990
|
+
if (import_app_data21.BUILD.hostListenerTargetWindow && flags & 8 /* TargetWindow */) {
|
|
3991
|
+
return win;
|
|
3992
|
+
}
|
|
3993
|
+
if (import_app_data21.BUILD.hostListenerTargetBody && flags & 16 /* TargetBody */) {
|
|
3994
|
+
return doc.body;
|
|
3995
|
+
}
|
|
3996
|
+
if (import_app_data21.BUILD.hostListenerTargetParent && flags & 32 /* TargetParent */ && elm.parentElement) {
|
|
3972
3997
|
return elm.parentElement;
|
|
3998
|
+
}
|
|
3973
3999
|
return elm;
|
|
3974
4000
|
};
|
|
3975
4001
|
var hostListenerOpts = (flags) => supportsListenerOptions ? {
|
|
@@ -3984,12 +4010,12 @@ var setNonce = (nonce) => plt.$nonce$ = nonce;
|
|
|
3984
4010
|
var setPlatformOptions = (opts) => Object.assign(plt, opts);
|
|
3985
4011
|
|
|
3986
4012
|
// src/runtime/vdom/vdom-annotations.ts
|
|
3987
|
-
var insertVdomAnnotations = (
|
|
3988
|
-
if (
|
|
3989
|
-
const docData = STENCIL_DOC_DATA in
|
|
4013
|
+
var insertVdomAnnotations = (doc, staticComponents) => {
|
|
4014
|
+
if (doc != null) {
|
|
4015
|
+
const docData = STENCIL_DOC_DATA in doc ? doc[STENCIL_DOC_DATA] : { ...DEFAULT_DOC_DATA };
|
|
3990
4016
|
docData.staticComponents = new Set(staticComponents);
|
|
3991
4017
|
const orgLocationNodes = [];
|
|
3992
|
-
parseVNodeAnnotations(
|
|
4018
|
+
parseVNodeAnnotations(doc, doc.body, docData, orgLocationNodes);
|
|
3993
4019
|
orgLocationNodes.forEach((orgLocationNode) => {
|
|
3994
4020
|
var _a;
|
|
3995
4021
|
if (orgLocationNode != null && orgLocationNode["s-nr"]) {
|
|
@@ -4015,11 +4041,11 @@ var insertVdomAnnotations = (doc2, staticComponents) => {
|
|
|
4015
4041
|
return;
|
|
4016
4042
|
}
|
|
4017
4043
|
}
|
|
4018
|
-
const commentBeforeTextNode =
|
|
4044
|
+
const commentBeforeTextNode = doc.createComment(childId);
|
|
4019
4045
|
commentBeforeTextNode.nodeValue = `${TEXT_NODE_ID}.${childId}`;
|
|
4020
4046
|
insertBefore(nodeRef.parentNode, commentBeforeTextNode, nodeRef);
|
|
4021
4047
|
} else if (nodeRef.nodeType === 8 /* CommentNode */) {
|
|
4022
|
-
const commentBeforeTextNode =
|
|
4048
|
+
const commentBeforeTextNode = doc.createComment(childId);
|
|
4023
4049
|
commentBeforeTextNode.nodeValue = `${COMMENT_NODE_ID}.${childId}`;
|
|
4024
4050
|
nodeRef.parentNode.insertBefore(commentBeforeTextNode, nodeRef);
|
|
4025
4051
|
}
|
|
@@ -4038,7 +4064,7 @@ var insertVdomAnnotations = (doc2, staticComponents) => {
|
|
|
4038
4064
|
});
|
|
4039
4065
|
}
|
|
4040
4066
|
};
|
|
4041
|
-
var parseVNodeAnnotations = (
|
|
4067
|
+
var parseVNodeAnnotations = (doc, node, docData, orgLocationNodes) => {
|
|
4042
4068
|
var _a;
|
|
4043
4069
|
if (node == null) {
|
|
4044
4070
|
return;
|
|
@@ -4054,13 +4080,13 @@ var parseVNodeAnnotations = (doc2, node, docData, orgLocationNodes) => {
|
|
|
4054
4080
|
const cmpData = {
|
|
4055
4081
|
nodeIds: 0
|
|
4056
4082
|
};
|
|
4057
|
-
insertVNodeAnnotations(
|
|
4083
|
+
insertVNodeAnnotations(doc, childNode, hostRef.$vnode$, docData, cmpData);
|
|
4058
4084
|
}
|
|
4059
|
-
parseVNodeAnnotations(
|
|
4085
|
+
parseVNodeAnnotations(doc, childNode, docData, orgLocationNodes);
|
|
4060
4086
|
});
|
|
4061
4087
|
}
|
|
4062
4088
|
};
|
|
4063
|
-
var insertVNodeAnnotations = (
|
|
4089
|
+
var insertVNodeAnnotations = (doc, hostElm, vnode, docData, cmpData) => {
|
|
4064
4090
|
if (vnode != null) {
|
|
4065
4091
|
const hostId = ++docData.hostIds;
|
|
4066
4092
|
hostElm.setAttribute(HYDRATE_ID, hostId);
|
|
@@ -4070,7 +4096,7 @@ var insertVNodeAnnotations = (doc2, hostElm, vnode, docData, cmpData) => {
|
|
|
4070
4096
|
if (vnode.$children$ != null) {
|
|
4071
4097
|
const depth = 0;
|
|
4072
4098
|
vnode.$children$.forEach((vnodeChild, index) => {
|
|
4073
|
-
insertChildVNodeAnnotations(
|
|
4099
|
+
insertChildVNodeAnnotations(doc, vnodeChild, cmpData, hostId, depth, index);
|
|
4074
4100
|
});
|
|
4075
4101
|
}
|
|
4076
4102
|
if (hostElm && vnode && vnode.$elm$ && !hostElm.hasAttribute(HYDRATE_CHILD_ID)) {
|
|
@@ -4091,7 +4117,7 @@ var insertVNodeAnnotations = (doc2, hostElm, vnode, docData, cmpData) => {
|
|
|
4091
4117
|
}
|
|
4092
4118
|
}
|
|
4093
4119
|
};
|
|
4094
|
-
var insertChildVNodeAnnotations = (
|
|
4120
|
+
var insertChildVNodeAnnotations = (doc, vnodeChild, cmpData, hostId, depth, index) => {
|
|
4095
4121
|
const childElm = vnodeChild.$elm$;
|
|
4096
4122
|
if (childElm == null) {
|
|
4097
4123
|
return;
|
|
@@ -4110,7 +4136,7 @@ var insertChildVNodeAnnotations = (doc2, vnodeChild, cmpData, hostId, depth, ind
|
|
|
4110
4136
|
const nodeName = parentNode == null ? void 0 : parentNode.nodeName;
|
|
4111
4137
|
if (nodeName !== "STYLE" && nodeName !== "SCRIPT") {
|
|
4112
4138
|
const textNodeId = `${TEXT_NODE_ID}.${childId}`;
|
|
4113
|
-
const commentBeforeTextNode =
|
|
4139
|
+
const commentBeforeTextNode = doc.createComment(textNodeId);
|
|
4114
4140
|
insertBefore(parentNode, commentBeforeTextNode, childElm);
|
|
4115
4141
|
}
|
|
4116
4142
|
} else if (childElm.nodeType === 8 /* CommentNode */) {
|
|
@@ -4123,7 +4149,7 @@ var insertChildVNodeAnnotations = (doc2, vnodeChild, cmpData, hostId, depth, ind
|
|
|
4123
4149
|
if (vnodeChild.$children$ != null) {
|
|
4124
4150
|
const childDepth = depth + 1;
|
|
4125
4151
|
vnodeChild.$children$.forEach((vnode, index2) => {
|
|
4126
|
-
insertChildVNodeAnnotations(
|
|
4152
|
+
insertChildVNodeAnnotations(doc, vnode, cmpData, hostId, childDepth, index2);
|
|
4127
4153
|
});
|
|
4128
4154
|
}
|
|
4129
4155
|
};
|
|
@@ -4143,7 +4169,6 @@ var insertChildVNodeAnnotations = (doc2, vnodeChild, cmpData, hostId, depth, ind
|
|
|
4143
4169
|
createEvent,
|
|
4144
4170
|
defineCustomElement,
|
|
4145
4171
|
disconnectedCallback,
|
|
4146
|
-
doc,
|
|
4147
4172
|
flushAll,
|
|
4148
4173
|
flushLoadModule,
|
|
4149
4174
|
flushQueue,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stencil/core/internal/testing",
|
|
3
|
-
"version": "4.27.
|
|
3
|
+
"version": "4.27.1",
|
|
4
4
|
"description": "Stencil internal testing platform to be imported by the Stencil Compiler. Breaking changes can and will happen at any time.",
|
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"private": true
|
package/mock-doc/index.cjs
CHANGED
package/mock-doc/index.js
CHANGED
package/mock-doc/package.json
CHANGED
package/package.json
CHANGED
package/screenshot/index.js
CHANGED
package/screenshot/package.json
CHANGED
package/sys/node/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
Stencil Node System v4.27.
|
|
2
|
+
Stencil Node System v4.27.1 | MIT Licensed | https://stenciljs.com
|
|
3
3
|
*/
|
|
4
4
|
"use strict";var Fs=Object.create;var er=Object.defineProperty;var $s=Object.getOwnPropertyDescriptor;var Bs=Object.getOwnPropertyNames;var Hs=Object.getPrototypeOf,js=Object.prototype.hasOwnProperty;var dn=n=>{throw TypeError(n)};var Us=(n,e,t)=>e in n?er(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var ge=(n,e)=>()=>(e||n((e={exports:{}}).exports,e),e.exports),hn=(n,e)=>{for(var t in e)er(n,t,{get:e[t],enumerable:!0})},pn=(n,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Bs(e))!js.call(n,i)&&i!==t&&er(n,i,{get:()=>e[i],enumerable:!(r=$s(e,i))||r.enumerable});return n};var ye=(n,e,t)=>(t=n!=null?Fs(Hs(n)):{},pn(e||!n||!n.__esModule?er(t,"default",{value:n,enumerable:!0}):t,n)),Xs=n=>pn(er({},"__esModule",{value:!0}),n);var Mr=(n,e,t)=>Us(n,typeof e!="symbol"?e+"":e,t),Ir=(n,e,t)=>e.has(n)||dn("Cannot "+t);var J=(n,e,t)=>(Ir(n,e,"read from private field"),t?t.call(n):e.get(n)),He=(n,e,t)=>e.has(n)?dn("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(n):e.set(n,t),Ee=(n,e,t,r)=>(Ir(n,e,"write to private field"),r?r.call(n,t):e.set(n,t),t),At=(n,e,t)=>(Ir(n,e,"access private method"),t);var yn=ge((jl,tr)=>{"use strict";var Js=typeof process<"u"&&process.env.TERM_PROGRAM==="Hyper",Ws=typeof process<"u"&&process.platform==="win32",gn=typeof process<"u"&&process.platform==="linux",Nr={ballotDisabled:"\u2612",ballotOff:"\u2610",ballotOn:"\u2611",bullet:"\u2022",bulletWhite:"\u25E6",fullBlock:"\u2588",heart:"\u2764",identicalTo:"\u2261",line:"\u2500",mark:"\u203B",middot:"\xB7",minus:"\uFF0D",multiplication:"\xD7",obelus:"\xF7",pencilDownRight:"\u270E",pencilRight:"\u270F",pencilUpRight:"\u2710",percent:"%",pilcrow2:"\u2761",pilcrow:"\xB6",plusMinus:"\xB1",question:"?",section:"\xA7",starsOff:"\u2606",starsOn:"\u2605",upDownArrow:"\u2195"},mn=Object.assign({},Nr,{check:"\u221A",cross:"\xD7",ellipsisLarge:"...",ellipsis:"...",info:"i",questionSmall:"?",pointer:">",pointerSmall:"\xBB",radioOff:"( )",radioOn:"(*)",warning:"\u203C"}),vn=Object.assign({},Nr,{ballotCross:"\u2718",check:"\u2714",cross:"\u2716",ellipsisLarge:"\u22EF",ellipsis:"\u2026",info:"\u2139",questionFull:"\uFF1F",questionSmall:"\uFE56",pointer:gn?"\u25B8":"\u276F",pointerSmall:gn?"\u2023":"\u203A",radioOff:"\u25EF",radioOn:"\u25C9",warning:"\u26A0"});tr.exports=Ws&&!Js?mn:vn;Reflect.defineProperty(tr.exports,"common",{enumerable:!1,value:Nr});Reflect.defineProperty(tr.exports,"windows",{enumerable:!1,value:mn});Reflect.defineProperty(tr.exports,"other",{enumerable:!1,value:vn})});var En=ge((Ul,Fr)=>{"use strict";var Vs=n=>n!==null&&typeof n=="object"&&!Array.isArray(n),Gs=/[\u001b\u009b][[\]#;?()]*(?:(?:(?:[^\W_]*;?[^\W_]*)\u0007)|(?:(?:[0-9]{1,4}(;[0-9]{0,4})*)?[~0-9=<>cf-nqrtyA-PRZ]))/g,zs=()=>typeof process<"u"?process.env.FORCE_COLOR!=="0":!1,bn=()=>{let n={enabled:zs(),visible:!0,styles:{},keys:{}},e=s=>{let o=s.open=`\x1B[${s.codes[0]}m`,a=s.close=`\x1B[${s.codes[1]}m`,c=s.regex=new RegExp(`\\u001b\\[${s.codes[1]}m`,"g");return s.wrap=(u,h)=>{u.includes(a)&&(u=u.replace(c,a+o));let g=o+u+a;return h?g.replace(/\r*\n/g,`${a}$&${o}`):g},s},t=(s,o,a)=>typeof s=="function"?s(o):s.wrap(o,a),r=(s,o)=>{if(s===""||s==null)return"";if(n.enabled===!1)return s;if(n.visible===!1)return"";let a=""+s,c=a.includes(`
|
|
5
5
|
`),u=o.length;for(u>0&&o.includes("unstyle")&&(o=[...new Set(["unstyle",...o])].reverse());u-- >0;)a=t(n.styles[o[u]],a,c);return a},i=(s,o,a)=>{n.styles[s]=e({name:s,codes:o}),(n.keys[a]||(n.keys[a]=[])).push(s),Reflect.defineProperty(n,s,{configurable:!0,enumerable:!0,set(u){n.alias(s,u)},get(){let u=h=>r(h,u.stack);return Reflect.setPrototypeOf(u,n),u.stack=this.stack?this.stack.concat(s):[s],u}})};return i("reset",[0,0],"modifier"),i("bold",[1,22],"modifier"),i("dim",[2,22],"modifier"),i("italic",[3,23],"modifier"),i("underline",[4,24],"modifier"),i("inverse",[7,27],"modifier"),i("hidden",[8,28],"modifier"),i("strikethrough",[9,29],"modifier"),i("black",[30,39],"color"),i("red",[31,39],"color"),i("green",[32,39],"color"),i("yellow",[33,39],"color"),i("blue",[34,39],"color"),i("magenta",[35,39],"color"),i("cyan",[36,39],"color"),i("white",[37,39],"color"),i("gray",[90,39],"color"),i("grey",[90,39],"color"),i("bgBlack",[40,49],"bg"),i("bgRed",[41,49],"bg"),i("bgGreen",[42,49],"bg"),i("bgYellow",[43,49],"bg"),i("bgBlue",[44,49],"bg"),i("bgMagenta",[45,49],"bg"),i("bgCyan",[46,49],"bg"),i("bgWhite",[47,49],"bg"),i("blackBright",[90,39],"bright"),i("redBright",[91,39],"bright"),i("greenBright",[92,39],"bright"),i("yellowBright",[93,39],"bright"),i("blueBright",[94,39],"bright"),i("magentaBright",[95,39],"bright"),i("cyanBright",[96,39],"bright"),i("whiteBright",[97,39],"bright"),i("bgBlackBright",[100,49],"bgBright"),i("bgRedBright",[101,49],"bgBright"),i("bgGreenBright",[102,49],"bgBright"),i("bgYellowBright",[103,49],"bgBright"),i("bgBlueBright",[104,49],"bgBright"),i("bgMagentaBright",[105,49],"bgBright"),i("bgCyanBright",[106,49],"bgBright"),i("bgWhiteBright",[107,49],"bgBright"),n.ansiRegex=Gs,n.hasColor=n.hasAnsi=s=>(n.ansiRegex.lastIndex=0,typeof s=="string"&&s!==""&&n.ansiRegex.test(s)),n.alias=(s,o)=>{let a=typeof o=="string"?n[o]:o;if(typeof a!="function")throw new TypeError("Expected alias to be the name of an existing color (string) or a function");a.stack||(Reflect.defineProperty(a,"name",{value:s}),n.styles[s]=a,a.stack=[s]),Reflect.defineProperty(n,s,{configurable:!0,enumerable:!0,set(c){n.alias(s,c)},get(){let c=u=>r(u,c.stack);return Reflect.setPrototypeOf(c,n),c.stack=this.stack?this.stack.concat(a.stack):a.stack,c}})},n.theme=s=>{if(!Vs(s))throw new TypeError("Expected theme to be an object");for(let o of Object.keys(s))n.alias(o,s[o]);return n},n.alias("unstyle",s=>typeof s=="string"&&s!==""?(n.ansiRegex.lastIndex=0,s.replace(n.ansiRegex,"")):""),n.alias("noop",s=>s),n.none=n.clear=n.noop,n.stripColor=n.unstyle,n.symbols=yn(),n.define=i,n};Fr.exports=bn();Fr.exports.create=bn});var In=ge((kc,Mn)=>{Mn.exports=function(n){var e={};function t(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return n[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}return t.m=n,t.c=e,t.i=function(r){return r},t.d=function(r,i,s){t.o(r,i)||Object.defineProperty(r,i,{configurable:!1,enumerable:!0,get:s})},t.n=function(r){var i=r&&r.__esModule?function(){return r.default}:function(){return r};return t.d(i,"a",i),i},t.o=function(r,i){return Object.prototype.hasOwnProperty.call(r,i)},t.p="",t(t.s=14)}([function(n,e){n.exports=require("path")},function(n,e,t){"use strict";e.__esModule=!0;var r=t(173),i=s(r);function s(o){return o&&o.__esModule?o:{default:o}}e.default=function(o){return function(){var a=o.apply(this,arguments);return new i.default(function(c,u){function h(g,T){try{var S=a[g](T),p=S.value}catch(b){u(b);return}if(S.done)c(p);else return i.default.resolve(p).then(function(b){h("next",b)},function(b){h("throw",b)})}return h("next")})}}},function(n,e){n.exports=require("util")},function(n,e){n.exports=require("fs")},function(n,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class r extends Error{constructor(u,h){super(u),this.code=h}}e.MessageError=r;class i extends r{constructor(u,h,g){super(u,h),this.process=g}}e.ProcessSpawnError=i;class s extends r{}e.SecurityError=s;class o extends r{}e.ProcessTermError=o;class a extends Error{constructor(u,h){super(u),this.responseCode=h}}e.ResponseError=a},function(n,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getFirstSuitableFolder=e.readFirstAvailableStream=e.makeTempDir=e.hardlinksWork=e.writeFilePreservingEol=e.getFileSizeOnDisk=e.walk=e.symlink=e.find=e.readJsonAndFile=e.readJson=e.readFileAny=e.hardlinkBulk=e.copyBulk=e.unlink=e.glob=e.link=e.chmod=e.lstat=e.exists=e.mkdirp=e.stat=e.access=e.rename=e.readdir=e.realpath=e.readlink=e.writeFile=e.open=e.readFileBuffer=e.lockQueue=e.constants=void 0;var r;function i(){return r=$(t(1))}let s=(()=>{var Y=(0,(r||i()).default)(function*(G,U,j,V){let re=(()=>{var oe=(0,(r||i()).default)(function*(Pe){let pe=Pe.src,ne=Pe.dest,_t=Pe.type,Ke=Pe.onFresh||_e,Te=Pe.onDone||_e;if(ae.has(ne.toLowerCase())?V.verbose(`The case-insensitive file ${ne} shouldn't be copied twice in one bulk copy`):ae.add(ne.toLowerCase()),_t==="symlink"){yield Se((l||f()).default.dirname(ne)),Ke(),Ie.symlink.push({dest:ne,linkname:pe}),Te();return}if(U.ignoreBasenames.indexOf((l||f()).default.basename(pe))>=0)return;let xe=yield Re(pe),gt;xe.isDirectory()&&(gt=yield De(pe));let We;try{We=yield Re(ne)}catch(Be){if(Be.code!=="ENOENT")throw Be}if(We){let Be=xe.isSymbolicLink()&&We.isSymbolicLink(),mt=xe.isDirectory()&&We.isDirectory(),ut=xe.isFile()&&We.isFile();if(ut&&he.has(ne)){Te(),V.verbose(V.lang("verboseFileSkipArtifact",pe));return}if(ut&&xe.size===We.size&&(0,(X||Z()).fileDatesEqual)(xe.mtime,We.mtime)){Te(),V.verbose(V.lang("verboseFileSkip",pe,ne,xe.size,+xe.mtime));return}if(Be){let ke=yield le(pe);if(ke===(yield le(ne))){Te(),V.verbose(V.lang("verboseFileSkipSymlink",pe,ne,ke));return}}if(mt){let ke=yield De(ne);Ut(gt,"src files not initialised");for(var ot=ke,Ct=Array.isArray(ot),Ye=0,ot=Ct?ot:ot[Symbol.iterator]();;){var Jt;if(Ct){if(Ye>=ot.length)break;Jt=ot[Ye++]}else{if(Ye=ot.next(),Ye.done)break;Jt=Ye.value}let Ot=Jt;if(gt.indexOf(Ot)<0){let vt=(l||f()).default.join(ne,Ot);if(j.add(vt),(yield Re(vt)).isDirectory())for(var at=yield De(vt),St=Array.isArray(at),Qe=0,at=St?at:at[Symbol.iterator]();;){var Wt;if(St){if(Qe>=at.length)break;Wt=at[Qe++]}else{if(Qe=at.next(),Qe.done)break;Wt=Qe.value}let kr=Wt;j.add((l||f()).default.join(vt,kr))}}}}}if(We&&We.isSymbolicLink()&&(yield(0,(X||Z()).unlink)(ne),We=null),xe.isSymbolicLink()){Ke();let Be=yield le(pe);Ie.symlink.push({dest:ne,linkname:Be}),Te()}else if(xe.isDirectory()){We||(V.verbose(V.lang("verboseFileFolder",ne)),yield Se(ne));let Be=ne.split((l||f()).default.sep);for(;Be.length;)ae.add(Be.join((l||f()).default.sep).toLowerCase()),Be.pop();Ut(gt,"src files not initialised");let mt=gt.length;mt||Te();for(var lt=gt,Lt=Array.isArray(lt),Ze=0,lt=Lt?lt:lt[Symbol.iterator]();;){var $e;if(Lt){if(Ze>=lt.length)break;$e=lt[Ze++]}else{if(Ze=lt.next(),Ze.done)break;$e=Ze.value}let ut=$e;G.push({dest:(l||f()).default.join(ne,ut),onFresh:Ke,onDone:function(ke){function Ot(){return ke.apply(this,arguments)}return Ot.toString=function(){return ke.toString()},Ot}(function(){--mt===0&&Te()}),src:(l||f()).default.join(pe,ut)})}}else if(xe.isFile())Ke(),Ie.file.push({src:pe,dest:ne,atime:xe.atime,mtime:xe.mtime,mode:xe.mode}),Te();else throw new Error(`unsure how to copy this: ${pe}`)});return function(pe){return oe.apply(this,arguments)}})(),he=new Set(U.artifactFiles||[]),ae=new Set;for(var se=G,ue=Array.isArray(se),ie=0,se=ue?se:se[Symbol.iterator]();;){var ze;if(ue){if(ie>=se.length)break;ze=se[ie++]}else{if(ie=se.next(),ie.done)break;ze=ie.value}let oe=ze,Pe=oe.onDone;oe.onDone=function(){U.onProgress(oe.dest),Pe&&Pe()}}U.onStart(G.length);let Ie={file:[],symlink:[],link:[]};for(;G.length;){let oe=G.splice(0,kt);yield Promise.all(oe.map(re))}for(var Ne=he,xt=Array.isArray(Ne),it=0,Ne=xt?Ne:Ne[Symbol.iterator]();;){var Mt;if(xt){if(it>=Ne.length)break;Mt=Ne[it++]}else{if(it=Ne.next(),it.done)break;Mt=it.value}let oe=Mt;j.has(oe)&&(V.verbose(V.lang("verboseFilePhantomExtraneous",oe)),j.delete(oe))}for(var Fe=j,qt=Array.isArray(Fe),st=0,Fe=qt?Fe:Fe[Symbol.iterator]();;){var It;if(qt){if(st>=Fe.length)break;It=Fe[st++]}else{if(st=Fe.next(),st.done)break;It=st.value}let oe=It;ae.has(oe.toLowerCase())&&j.delete(oe)}return Ie});return function(U,j,V,re){return Y.apply(this,arguments)}})(),o=(()=>{var Y=(0,(r||i()).default)(function*(G,U,j,V){let re=(()=>{var oe=(0,(r||i()).default)(function*(Pe){let pe=Pe.src,ne=Pe.dest,_t=Pe.onFresh||_e,Ke=Pe.onDone||_e;if(ae.has(ne.toLowerCase())){Ke();return}if(ae.add(ne.toLowerCase()),U.ignoreBasenames.indexOf((l||f()).default.basename(pe))>=0)return;let Te=yield Re(pe),xe;Te.isDirectory()&&(xe=yield De(pe));let gt=yield nt(ne);if(gt){let $e=yield Re(ne),Be=Te.isSymbolicLink()&&$e.isSymbolicLink(),mt=Te.isDirectory()&&$e.isDirectory(),ut=Te.isFile()&&$e.isFile();if(Te.mode!==$e.mode)try{yield Oe(ne,Te.mode)}catch(ke){V.verbose(ke)}if(ut&&he.has(ne)){Ke(),V.verbose(V.lang("verboseFileSkipArtifact",pe));return}if(ut&&Te.ino!==null&&Te.ino===$e.ino){Ke(),V.verbose(V.lang("verboseFileSkip",pe,ne,Te.ino));return}if(Be){let ke=yield le(pe);if(ke===(yield le(ne))){Ke(),V.verbose(V.lang("verboseFileSkipSymlink",pe,ne,ke));return}}if(mt){let ke=yield De(ne);Ut(xe,"src files not initialised");for(var Ye=ke,We=Array.isArray(Ye),Ct=0,Ye=We?Ye:Ye[Symbol.iterator]();;){var ot;if(We){if(Ct>=Ye.length)break;ot=Ye[Ct++]}else{if(Ct=Ye.next(),Ct.done)break;ot=Ct.value}let Ot=ot;if(xe.indexOf(Ot)<0){let vt=(l||f()).default.join(ne,Ot);if(j.add(vt),(yield Re(vt)).isDirectory())for(var Qe=yield De(vt),Jt=Array.isArray(Qe),St=0,Qe=Jt?Qe:Qe[Symbol.iterator]();;){var at;if(Jt){if(St>=Qe.length)break;at=Qe[St++]}else{if(St=Qe.next(),St.done)break;at=St.value}let kr=at;j.add((l||f()).default.join(vt,kr))}}}}}if(Te.isSymbolicLink()){_t();let $e=yield le(pe);Ie.symlink.push({dest:ne,linkname:$e}),Ke()}else if(Te.isDirectory()){V.verbose(V.lang("verboseFileFolder",ne)),yield Se(ne);let $e=ne.split((l||f()).default.sep);for(;$e.length;)ae.add($e.join((l||f()).default.sep).toLowerCase()),$e.pop();Ut(xe,"src files not initialised");let Be=xe.length;Be||Ke();for(var Ze=xe,Wt=Array.isArray(Ze),Lt=0,Ze=Wt?Ze:Ze[Symbol.iterator]();;){var lt;if(Wt){if(Lt>=Ze.length)break;lt=Ze[Lt++]}else{if(Lt=Ze.next(),Lt.done)break;lt=Lt.value}let mt=lt;G.push({onFresh:_t,src:(l||f()).default.join(pe,mt),dest:(l||f()).default.join(ne,mt),onDone:function(ut){function ke(){return ut.apply(this,arguments)}return ke.toString=function(){return ut.toString()},ke}(function(){--Be===0&&Ke()})})}}else if(Te.isFile())_t(),Ie.link.push({src:pe,dest:ne,removeDest:gt}),Ke();else throw new Error(`unsure how to copy this: ${pe}`)});return function(pe){return oe.apply(this,arguments)}})(),he=new Set(U.artifactFiles||[]),ae=new Set;for(var se=G,ue=Array.isArray(se),ie=0,se=ue?se:se[Symbol.iterator]();;){var ze;if(ue){if(ie>=se.length)break;ze=se[ie++]}else{if(ie=se.next(),ie.done)break;ze=ie.value}let oe=ze,Pe=oe.onDone||_e;oe.onDone=function(){U.onProgress(oe.dest),Pe()}}U.onStart(G.length);let Ie={file:[],symlink:[],link:[]};for(;G.length;){let oe=G.splice(0,kt);yield Promise.all(oe.map(re))}for(var Ne=he,xt=Array.isArray(Ne),it=0,Ne=xt?Ne:Ne[Symbol.iterator]();;){var Mt;if(xt){if(it>=Ne.length)break;Mt=Ne[it++]}else{if(it=Ne.next(),it.done)break;Mt=it.value}let oe=Mt;j.has(oe)&&(V.verbose(V.lang("verboseFilePhantomExtraneous",oe)),j.delete(oe))}for(var Fe=j,qt=Array.isArray(Fe),st=0,Fe=qt?Fe:Fe[Symbol.iterator]();;){var It;if(qt){if(st>=Fe.length)break;It=Fe[st++]}else{if(st=Fe.next(),st.done)break;It=st.value}let oe=It;ae.has(oe.toLowerCase())&&j.delete(oe)}return Ie});return function(U,j,V,re){return Y.apply(this,arguments)}})(),a=e.copyBulk=(()=>{var Y=(0,(r||i()).default)(function*(G,U,j){let V={onStart:j&&j.onStart||_e,onProgress:j&&j.onProgress||_e,possibleExtraneous:j?j.possibleExtraneous:new Set,ignoreBasenames:j&&j.ignoreBasenames||[],artifactFiles:j&&j.artifactFiles||[]},re=yield s(G,V,V.possibleExtraneous,U);V.onStart(re.file.length+re.symlink.length+re.link.length);let he=re.file,ae=new Map;yield(E||A()).queue(he,(()=>{var ie=(0,(r||i()).default)(function*(se){let ze;for(;ze=ae.get(se.dest);)yield ze;U.verbose(U.lang("verboseFileCopy",se.src,se.dest));let Ie=(0,(X||Z()).copyFile)(se,function(){return ae.delete(se.dest)});return ae.set(se.dest,Ie),V.onProgress(se.dest),Ie});return function(se){return ie.apply(this,arguments)}})(),kt);let ue=re.symlink;yield(E||A()).queue(ue,function(ie){let se=(l||f()).default.resolve((l||f()).default.dirname(ie.dest),ie.linkname);return U.verbose(U.lang("verboseFileSymlink",ie.dest,se)),S(se,ie.dest)})});return function(U,j,V){return Y.apply(this,arguments)}})(),c=e.hardlinkBulk=(()=>{var Y=(0,(r||i()).default)(function*(G,U,j){let V={onStart:j&&j.onStart||_e,onProgress:j&&j.onProgress||_e,possibleExtraneous:j?j.possibleExtraneous:new Set,artifactFiles:j&&j.artifactFiles||[],ignoreBasenames:[]},re=yield o(G,V,V.possibleExtraneous,U);V.onStart(re.file.length+re.symlink.length+re.link.length);let he=re.link;yield(E||A()).queue(he,(()=>{var ue=(0,(r||i()).default)(function*(ie){U.verbose(U.lang("verboseFileLink",ie.src,ie.dest)),ie.removeDest&&(yield(0,(X||Z()).unlink)(ie.dest)),yield cr(ie.src,ie.dest)});return function(ie){return ue.apply(this,arguments)}})(),kt);let ae=re.symlink;yield(E||A()).queue(ae,function(ue){let ie=(l||f()).default.resolve((l||f()).default.dirname(ue.dest),ue.linkname);return U.verbose(U.lang("verboseFileSymlink",ue.dest,ie)),S(ie,ue.dest)})});return function(U,j,V){return Y.apply(this,arguments)}})(),u=e.readFileAny=(()=>{var Y=(0,(r||i()).default)(function*(G){for(var V=G,U=Array.isArray(V),j=0,V=U?V:V[Symbol.iterator]();;){var re;if(U){if(j>=V.length)break;re=V[j++]}else{if(j=V.next(),j.done)break;re=j.value}let he=re;if(yield nt(he))return Pr(he)}return null});return function(U){return Y.apply(this,arguments)}})(),h=e.readJson=(()=>{var Y=(0,(r||i()).default)(function*(G){return(yield g(G)).object});return function(U){return Y.apply(this,arguments)}})(),g=e.readJsonAndFile=(()=>{var Y=(0,(r||i()).default)(function*(G){let U=yield Pr(G);try{return{object:(0,(F||H()).default)(JSON.parse(Zt(U))),content:U}}catch(j){throw j.message=`${G}: ${j.message}`,j}});return function(U){return Y.apply(this,arguments)}})(),T=e.find=(()=>{var Y=(0,(r||i()).default)(function*(G,U){let j=U.split((l||f()).default.sep);for(;j.length;){let V=j.concat(G).join((l||f()).default.sep);if(yield nt(V))return V;j.pop()}return!1});return function(U,j){return Y.apply(this,arguments)}})(),S=e.symlink=(()=>{var Y=(0,(r||i()).default)(function*(G,U){try{if((yield Re(U)).isSymbolicLink()&&(yield Me(U))===G)return}catch(j){if(j.code!=="ENOENT")throw j}if(yield(0,(X||Z()).unlink)(U),process.platform==="win32")yield dr(G,U,"junction");else{let j;try{j=(l||f()).default.relative((C||L()).default.realpathSync((l||f()).default.dirname(U)),(C||L()).default.realpathSync(G))}catch(V){if(V.code!=="ENOENT")throw V;j=(l||f()).default.relative((l||f()).default.dirname(U),G)}yield dr(j||".",U)}});return function(U,j){return Y.apply(this,arguments)}})(),p=e.walk=(()=>{var Y=(0,(r||i()).default)(function*(G,U,j=new Set){let V=[],re=yield De(G);j.size&&(re=re.filter(function(se){return!j.has(se)}));for(var ue=re,he=Array.isArray(ue),ae=0,ue=he?ue:ue[Symbol.iterator]();;){var ie;if(he){if(ae>=ue.length)break;ie=ue[ae++]}else{if(ae=ue.next(),ae.done)break;ie=ae.value}let se=ie,ze=U?(l||f()).default.join(U,se):se,Ie=(l||f()).default.join(G,se),xt=yield Re(Ie);V.push({relative:ze,basename:se,absolute:Ie,mtime:+xt.mtime}),xt.isDirectory()&&(V=V.concat(yield p(Ie,ze,j)))}return V});return function(U,j){return Y.apply(this,arguments)}})(),b=e.getFileSizeOnDisk=(()=>{var Y=(0,(r||i()).default)(function*(G){let U=yield Re(G),j=U.size,V=U.blksize;return Math.ceil(j/V)*V});return function(U){return Y.apply(this,arguments)}})(),x=(()=>{var Y=(0,(r||i()).default)(function*(G){if(!(yield nt(G)))return;let U=yield Q(G);for(let j=0;j<U.length;++j){if(U[j]===Is)return`\r
|
package/sys/node/package.json
CHANGED
package/sys/node/worker.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
Stencil Node System Worker v4.27.
|
|
2
|
+
Stencil Node System Worker v4.27.1 | MIT Licensed | https://stenciljs.com
|
|
3
3
|
*/
|
|
4
4
|
"use strict";var f=Object.create;var d=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var E=Object.getOwnPropertyNames;var y=Object.getPrototypeOf,R=Object.prototype.hasOwnProperty;var g=(n,t,r,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let e of E(t))!R.call(n,e)&&e!==r&&d(n,e,{get:()=>t[e],enumerable:!(s=p(t,e))||s.enumerable});return n};var c=(n,t,r)=>(r=n!=null?f(y(n)):{},g(t||!n||!n.__esModule?d(r,"default",{value:n,enumerable:!0}):r,n));var l=c(require("../../compiler/stencil.js")),m=c(require("../../sys/node/index.js"));var a=(n,t)=>{let r=e=>{e&&e.code==="ERR_IPC_CHANNEL_CLOSED"&&n.exit(0)},s=(e,o)=>{let i={stencilId:e,stencilRtnValue:null,stencilRtnError:"Error"};typeof o=="string"?i.stencilRtnError+=": "+o:o&&(o.stack?i.stencilRtnError+=": "+o.stack:o.message&&(i.stencilRtnError+=":"+o.message)),n.send(i,r)};n.on("message",async e=>{if(e&&typeof e.stencilId=="number")try{let o={stencilId:e.stencilId,stencilRtnValue:await t(e),stencilRtnError:null};n.send(o,r)}catch(o){s(e.stencilId,o)}}),n.on("unhandledRejection",e=>{s(-1,e)})};var k=m.createNodeSys({process}),M=l.createWorkerMessageHandler(k);a(process,M);
|
package/testing/index.js
CHANGED