@rindo/core 4.27.0 → 4.27.2

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.
@@ -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(doc2) {
396
+ function queryNonceMetaTagContent(doc) {
399
397
  var _a, _b, _c;
400
- return (_c = (_b = (_a = doc2.head) == null ? void 0 : _a.querySelector('meta[name="csp-nonce"]')) == null ? void 0 : _b.getAttribute("content")) != null ? _c : void 0;
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(doc.body, plt.$orgLocNodes$ = /* @__PURE__ */ new Map());
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$ = doc.createElement(childVNode.$tag$);
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 : doc;
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}"]`) || doc.createElement("style");
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(doc);
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
- const styles2 = doc.querySelectorAll(`[${HYDRATED_STYLE_ID}]`);
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$ = doc.createTextNode(newVNode2.$text$);
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) : doc.createTextNode("");
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
- elm = newVNode2.$elm$ = import_app_data12.BUILD.svg ? doc.createElementNS(
2380
+ if (!win.document) {
2381
+ throw new Error(
2382
+ "You are trying to render a Rindo 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
- ) : doc.createElement(
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) : doc.createTextNode("");
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,10 +2892,10 @@ render() {
2886
2892
  }
2887
2893
  contentRef = void 0;
2888
2894
  };
2889
- var slotReferenceDebugNode = (slotVNode) => doc.createComment(
2895
+ var slotReferenceDebugNode = (slotVNode) => win.document.createComment(
2890
2896
  `<slot${slotVNode.$name$ ? ' name="' + slotVNode.$name$ + '"' : ""}> (host=${hostTagName.toLowerCase()})`
2891
2897
  );
2892
- var originalLocationDebugNode = (nodeToRelocate) => doc.createComment(
2898
+ var originalLocationDebugNode = (nodeToRelocate) => win.document.createComment(
2893
2899
  `org-location for ` + (nodeToRelocate.localName ? `<${nodeToRelocate.localName}> (host=${nodeToRelocate["s-hn"]})` : `[${nodeToRelocate.textContent}]`)
2894
2900
  );
2895
2901
 
@@ -3570,7 +3576,10 @@ var connectedCallback = (elm) => {
3570
3576
  }
3571
3577
  };
3572
3578
  var setContentReference = (elm) => {
3573
- const contentRefElm = elm["s-cr"] = doc.createComment(
3579
+ if (!win.document) {
3580
+ return;
3581
+ }
3582
+ const contentRefElm = elm["s-cr"] = win.document.createComment(
3574
3583
  import_app_data17.BUILD.isDebug ? `content-ref (host=${elm.localName})` : ""
3575
3584
  );
3576
3585
  contentRefElm["s-cn"] = true;
@@ -3744,18 +3753,22 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
3744
3753
  performance.mark("st:app:start");
3745
3754
  }
3746
3755
  installDevTools();
3756
+ if (!win.document) {
3757
+ console.warn("Rindo: No document found. Skipping bootstrapping lazy components.");
3758
+ return;
3759
+ }
3747
3760
  const endBootstrap = createTime("bootstrapLazy");
3748
3761
  const cmpTags = [];
3749
3762
  const exclude = options.exclude || [];
3750
3763
  const customElements2 = win.customElements;
3751
- const head = doc.head;
3764
+ const head = win.document.head;
3752
3765
  const metaCharset = /* @__PURE__ */ head.querySelector("meta[charset]");
3753
- const dataStyles = /* @__PURE__ */ doc.createElement("style");
3766
+ const dataStyles = /* @__PURE__ */ win.document.createElement("style");
3754
3767
  const deferredConnectedCallbacks = [];
3755
3768
  let appLoadFallback;
3756
3769
  let isBootstrapping = true;
3757
3770
  Object.assign(plt, options);
3758
- plt.$resourcesUrl$ = new URL(options.resourcesUrl || "./", doc.baseURI).href;
3771
+ plt.$resourcesUrl$ = new URL(options.resourcesUrl || "./", win.document.baseURI).href;
3759
3772
  if (import_app_data20.BUILD.asyncQueue) {
3760
3773
  if (options.syncQueue) {
3761
3774
  plt.$flags$ |= 4 /* queueSync */;
@@ -3905,7 +3918,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
3905
3918
  }
3906
3919
  if (dataStyles.innerHTML.length) {
3907
3920
  dataStyles.setAttribute("data-styles", "");
3908
- const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
3921
+ const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(win.document);
3909
3922
  if (nonce != null) {
3910
3923
  dataStyles.setAttribute("nonce", nonce);
3911
3924
  }
@@ -3931,7 +3944,7 @@ var Fragment = (_, children) => children;
3931
3944
  // src/runtime/host-listener.ts
3932
3945
  var import_app_data21 = require("@rindo/core/internal/app-data");
3933
3946
  var addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) => {
3934
- if (import_app_data21.BUILD.hostListener && listeners) {
3947
+ if (import_app_data21.BUILD.hostListener && listeners && win.document) {
3935
3948
  if (import_app_data21.BUILD.hostListenerTargetParent) {
3936
3949
  if (attachParentListeners) {
3937
3950
  listeners = listeners.filter(([flags]) => flags & 32 /* TargetParent */);
@@ -3940,7 +3953,7 @@ var addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) =>
3940
3953
  }
3941
3954
  }
3942
3955
  listeners.map(([flags, name, method]) => {
3943
- const target = import_app_data21.BUILD.hostListenerTarget ? getHostListenerTarget(elm, flags) : elm;
3956
+ const target = import_app_data21.BUILD.hostListenerTarget ? getHostListenerTarget(win.document, elm, flags) : elm;
3944
3957
  const handler = hostListenerProxy(hostRef, method);
3945
3958
  const opts = hostListenerOpts(flags);
3946
3959
  plt.ael(target, name, handler, opts);
@@ -3964,12 +3977,19 @@ var hostListenerProxy = (hostRef, methodName) => (ev) => {
3964
3977
  consoleError(e, hostRef.$hostElement$);
3965
3978
  }
3966
3979
  };
3967
- var getHostListenerTarget = (elm, flags) => {
3968
- if (import_app_data21.BUILD.hostListenerTargetDocument && flags & 4 /* TargetDocument */) return doc;
3969
- if (import_app_data21.BUILD.hostListenerTargetWindow && flags & 8 /* TargetWindow */) return win;
3970
- if (import_app_data21.BUILD.hostListenerTargetBody && flags & 16 /* TargetBody */) return doc.body;
3971
- if (import_app_data21.BUILD.hostListenerTargetParent && flags & 32 /* TargetParent */ && elm.parentElement)
3980
+ var getHostListenerTarget = (doc, elm, flags) => {
3981
+ if (import_app_data21.BUILD.hostListenerTargetDocument && flags & 4 /* TargetDocument */) {
3982
+ return doc;
3983
+ }
3984
+ if (import_app_data21.BUILD.hostListenerTargetWindow && flags & 8 /* TargetWindow */) {
3985
+ return win;
3986
+ }
3987
+ if (import_app_data21.BUILD.hostListenerTargetBody && flags & 16 /* TargetBody */) {
3988
+ return doc.body;
3989
+ }
3990
+ if (import_app_data21.BUILD.hostListenerTargetParent && flags & 32 /* TargetParent */ && elm.parentElement) {
3972
3991
  return elm.parentElement;
3992
+ }
3973
3993
  return elm;
3974
3994
  };
3975
3995
  var hostListenerOpts = (flags) => supportsListenerOptions ? {
@@ -3984,12 +4004,12 @@ var setNonce = (nonce) => plt.$nonce$ = nonce;
3984
4004
  var setPlatformOptions = (opts) => Object.assign(plt, opts);
3985
4005
 
3986
4006
  // src/runtime/vdom/vdom-annotations.ts
3987
- var insertVdomAnnotations = (doc2, staticComponents) => {
3988
- if (doc2 != null) {
3989
- const docData = RINDO_DOC_DATA in doc2 ? doc2[RINDO_DOC_DATA] : { ...DEFAULT_DOC_DATA };
4007
+ var insertVdomAnnotations = (doc, staticComponents) => {
4008
+ if (doc != null) {
4009
+ const docData = RINDO_DOC_DATA in doc ? doc[RINDO_DOC_DATA] : { ...DEFAULT_DOC_DATA };
3990
4010
  docData.staticComponents = new Set(staticComponents);
3991
4011
  const orgLocationNodes = [];
3992
- parseVNodeAnnotations(doc2, doc2.body, docData, orgLocationNodes);
4012
+ parseVNodeAnnotations(doc, doc.body, docData, orgLocationNodes);
3993
4013
  orgLocationNodes.forEach((orgLocationNode) => {
3994
4014
  var _a;
3995
4015
  if (orgLocationNode != null && orgLocationNode["s-nr"]) {
@@ -4015,11 +4035,11 @@ var insertVdomAnnotations = (doc2, staticComponents) => {
4015
4035
  return;
4016
4036
  }
4017
4037
  }
4018
- const commentBeforeTextNode = doc2.createComment(childId);
4038
+ const commentBeforeTextNode = doc.createComment(childId);
4019
4039
  commentBeforeTextNode.nodeValue = `${TEXT_NODE_ID}.${childId}`;
4020
4040
  insertBefore(nodeRef.parentNode, commentBeforeTextNode, nodeRef);
4021
4041
  } else if (nodeRef.nodeType === 8 /* CommentNode */) {
4022
- const commentBeforeTextNode = doc2.createComment(childId);
4042
+ const commentBeforeTextNode = doc.createComment(childId);
4023
4043
  commentBeforeTextNode.nodeValue = `${COMMENT_NODE_ID}.${childId}`;
4024
4044
  nodeRef.parentNode.insertBefore(commentBeforeTextNode, nodeRef);
4025
4045
  }
@@ -4038,7 +4058,7 @@ var insertVdomAnnotations = (doc2, staticComponents) => {
4038
4058
  });
4039
4059
  }
4040
4060
  };
4041
- var parseVNodeAnnotations = (doc2, node, docData, orgLocationNodes) => {
4061
+ var parseVNodeAnnotations = (doc, node, docData, orgLocationNodes) => {
4042
4062
  var _a;
4043
4063
  if (node == null) {
4044
4064
  return;
@@ -4054,13 +4074,13 @@ var parseVNodeAnnotations = (doc2, node, docData, orgLocationNodes) => {
4054
4074
  const cmpData = {
4055
4075
  nodeIds: 0
4056
4076
  };
4057
- insertVNodeAnnotations(doc2, childNode, hostRef.$vnode$, docData, cmpData);
4077
+ insertVNodeAnnotations(doc, childNode, hostRef.$vnode$, docData, cmpData);
4058
4078
  }
4059
- parseVNodeAnnotations(doc2, childNode, docData, orgLocationNodes);
4079
+ parseVNodeAnnotations(doc, childNode, docData, orgLocationNodes);
4060
4080
  });
4061
4081
  }
4062
4082
  };
4063
- var insertVNodeAnnotations = (doc2, hostElm, vnode, docData, cmpData) => {
4083
+ var insertVNodeAnnotations = (doc, hostElm, vnode, docData, cmpData) => {
4064
4084
  if (vnode != null) {
4065
4085
  const hostId = ++docData.hostIds;
4066
4086
  hostElm.setAttribute(HYDRATE_ID, hostId);
@@ -4070,7 +4090,7 @@ var insertVNodeAnnotations = (doc2, hostElm, vnode, docData, cmpData) => {
4070
4090
  if (vnode.$children$ != null) {
4071
4091
  const depth = 0;
4072
4092
  vnode.$children$.forEach((vnodeChild, index) => {
4073
- insertChildVNodeAnnotations(doc2, vnodeChild, cmpData, hostId, depth, index);
4093
+ insertChildVNodeAnnotations(doc, vnodeChild, cmpData, hostId, depth, index);
4074
4094
  });
4075
4095
  }
4076
4096
  if (hostElm && vnode && vnode.$elm$ && !hostElm.hasAttribute(HYDRATE_CHILD_ID)) {
@@ -4091,7 +4111,7 @@ var insertVNodeAnnotations = (doc2, hostElm, vnode, docData, cmpData) => {
4091
4111
  }
4092
4112
  }
4093
4113
  };
4094
- var insertChildVNodeAnnotations = (doc2, vnodeChild, cmpData, hostId, depth, index) => {
4114
+ var insertChildVNodeAnnotations = (doc, vnodeChild, cmpData, hostId, depth, index) => {
4095
4115
  const childElm = vnodeChild.$elm$;
4096
4116
  if (childElm == null) {
4097
4117
  return;
@@ -4110,7 +4130,7 @@ var insertChildVNodeAnnotations = (doc2, vnodeChild, cmpData, hostId, depth, ind
4110
4130
  const nodeName = parentNode == null ? void 0 : parentNode.nodeName;
4111
4131
  if (nodeName !== "STYLE" && nodeName !== "SCRIPT") {
4112
4132
  const textNodeId = `${TEXT_NODE_ID}.${childId}`;
4113
- const commentBeforeTextNode = doc2.createComment(textNodeId);
4133
+ const commentBeforeTextNode = doc.createComment(textNodeId);
4114
4134
  insertBefore(parentNode, commentBeforeTextNode, childElm);
4115
4135
  }
4116
4136
  } else if (childElm.nodeType === 8 /* CommentNode */) {
@@ -4123,7 +4143,7 @@ var insertChildVNodeAnnotations = (doc2, vnodeChild, cmpData, hostId, depth, ind
4123
4143
  if (vnodeChild.$children$ != null) {
4124
4144
  const childDepth = depth + 1;
4125
4145
  vnodeChild.$children$.forEach((vnode, index2) => {
4126
- insertChildVNodeAnnotations(doc2, vnode, cmpData, hostId, childDepth, index2);
4146
+ insertChildVNodeAnnotations(doc, vnode, cmpData, hostId, childDepth, index2);
4127
4147
  });
4128
4148
  }
4129
4149
  };
@@ -4143,7 +4163,6 @@ var insertChildVNodeAnnotations = (doc2, vnodeChild, cmpData, hostId, depth, ind
4143
4163
  createEvent,
4144
4164
  defineCustomElement,
4145
4165
  disconnectedCallback,
4146
- doc,
4147
4166
  flushAll,
4148
4167
  flushLoadModule,
4149
4168
  flushQueue,
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rindo/core/internal/testing",
3
- "version": "4.27.0",
3
+ "version": "4.27.2",
4
4
  "description": "Rindo internal testing platform to be imported by the Rindo Compiler. Breaking changes can and will happen at any time.",
5
5
  "main": "./index.js",
6
6
  "private": true
@@ -1,5 +1,5 @@
1
1
  /*!
2
- Rindo Mock Doc (CommonJS) v4.27.0 | MIT Licensed | https://rindojs.web.app
2
+ Rindo Mock Doc (CommonJS) v4.27.2 | MIT Licensed | https://rindojs.web.app
3
3
  */
4
4
  "use strict";
5
5
  var __defProp = Object.defineProperty;
package/mock-doc/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- Rindo Mock Doc v4.27.0 | MIT Licensed | https://rindojs.web.app
2
+ Rindo Mock Doc v4.27.2 | MIT Licensed | https://rindojs.web.app
3
3
  */
4
4
 
5
5
  // src/runtime/runtime-constants.ts
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rindo/core/mock-doc",
3
- "version": "4.27.0",
3
+ "version": "4.27.2",
4
4
  "description": "Mock window, document and DOM outside of a browser environment.",
5
5
  "main": "./index.cjs",
6
6
  "module": "./index.js",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rindo/core",
3
- "version": "4.27.0",
3
+ "version": "4.27.2",
4
4
  "license": "MIT",
5
5
  "main": "./internal/rindo-core/index.cjs",
6
6
  "module": "./internal/rindo-core/index.js",
@@ -24,9 +24,9 @@
24
24
  ],
25
25
  "exports": {
26
26
  ".": {
27
+ "types": "./internal/rindo-core/index.d.ts",
27
28
  "import": "./internal/rindo-core/index.js",
28
- "require": "./internal/rindo-core/index.cjs",
29
- "types": "./internal/rindo-core/index.d.ts"
29
+ "require": "./internal/rindo-core/index.cjs"
30
30
  },
31
31
  "./cli": {
32
32
  "import": "./cli/index.js",
@@ -48,40 +48,40 @@
48
48
  "import": "./internal/testing/*"
49
49
  },
50
50
  "./internal/app-data": {
51
+ "types": "./internal/app-data/index.d.ts",
51
52
  "import": "./internal/app-data/index.js",
52
- "require": "./internal/app-data/index.cjs",
53
- "types": "./internal/app-data/index.d.ts"
53
+ "require": "./internal/app-data/index.cjs"
54
54
  },
55
55
  "./mock-doc": {
56
+ "types": "./mock-doc/index.d.ts",
56
57
  "import": "./mock-doc/index.js",
57
- "require": "./mock-doc/index.cjs",
58
- "types": "./mock-doc/index.d.ts"
58
+ "require": "./mock-doc/index.cjs"
59
59
  },
60
60
  "./compiler": {
61
+ "types": "./compiler/rindo.d.ts",
61
62
  "import": "./compiler/rindo.js",
62
- "require": "./compiler/rindo.js",
63
- "types": "./compiler/rindo.d.ts"
63
+ "require": "./compiler/rindo.js"
64
64
  },
65
65
  "./compiler/*": {
66
- "import": "./compiler/*",
67
- "types": "./compiler/*"
66
+ "types": "./compiler/*",
67
+ "import": "./compiler/*"
68
68
  },
69
69
  "./screenshot": {
70
- "require": "./screenshot/index.js",
71
- "types": "./screenshot/index.d.ts"
70
+ "types": "./screenshot/index.d.ts",
71
+ "require": "./screenshot/index.js"
72
72
  },
73
73
  "./sys/node": {
74
+ "types": "./sys/node/index.d.ts",
74
75
  "import": "./sys/node/index.js",
75
- "require": "./sys/node/index.js",
76
- "types": "./sys/node/index.d.ts"
76
+ "require": "./sys/node/index.js"
77
77
  },
78
78
  "./sys/node/*": {
79
79
  "import": "./sys/node/*",
80
80
  "require": "./sys/node/*"
81
81
  },
82
82
  "./testing": {
83
- "import": "./testing/index.js",
84
83
  "types": "./testing/index.d.ts",
84
+ "import": "./testing/index.js",
85
85
  "require": "./testing/index.js"
86
86
  },
87
87
  "./testing/jest-preset": {
@@ -1,5 +1,5 @@
1
1
  /*
2
- Rindo Screenshot v4.27.0 | MIT Licensed | https://rindojs.web.app
2
+ Rindo Screenshot v4.27.2 | MIT Licensed | https://rindojs.web.app
3
3
  */
4
4
  "use strict";
5
5
  var __create = Object.create;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rindo/core/screenshot",
3
- "version": "4.27.0",
3
+ "version": "4.27.2",
4
4
  "description": "Rindo Screenshot.",
5
5
  "main": "./index.js",
6
6
  "types": "./index.d.ts",
@@ -1,5 +1,5 @@
1
1
  /*
2
- Rindo Screenshot Pixel Match v4.27.0 | MIT Licensed | https://rindojs.web.app
2
+ Rindo Screenshot Pixel Match v4.27.2 | MIT Licensed | https://rindojs.web.app
3
3
  */
4
4
  "use strict";
5
5
  var __create = Object.create;
package/sys/node/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- Rindo Node System v4.27.0 | MIT Licensed | https://rindojs.web.app
2
+ Rindo Node System v4.27.2 | MIT Licensed | https://rindojs.web.app
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rindo/core/sys/node",
3
- "version": "4.27.0",
3
+ "version": "4.27.2",
4
4
  "description": "Rindo Node System.",
5
5
  "main": "./index.js",
6
6
  "types": "./index.d.ts",
@@ -1,4 +1,4 @@
1
1
  /*!
2
- Rindo Node System Worker v4.27.0 | MIT Licensed | https://rindojs.web.app
2
+ Rindo Node System Worker v4.27.2 | MIT Licensed | https://rindojs.web.app
3
3
  */
4
4
  "use strict";var f=Object.create;var s=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var E=Object.getOwnPropertyNames;var y=Object.getPrototypeOf,R=Object.prototype.hasOwnProperty;var g=(r,e,d,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of E(e))!R.call(r,o)&&o!==d&&s(r,o,{get:()=>e[o],enumerable:!(t=p(e,o))||t.enumerable});return r};var a=(r,e,d)=>(d=r!=null?f(y(r)):{},g(e||!r||!r.__esModule?s(d,"default",{value:r,enumerable:!0}):d,r));var l=a(require("../../compiler/rindo.js")),m=a(require("../../sys/node/index.js"));var c=(r,e)=>{let d=o=>{o&&o.code==="ERR_IPC_CHANNEL_CLOSED"&&r.exit(0)},t=(o,n)=>{let i={rindoId:o,rindoRtnValue:null,rindoRtnError:"Error"};typeof n=="string"?i.rindoRtnError+=": "+n:n&&(n.stack?i.rindoRtnError+=": "+n.stack:n.message&&(i.rindoRtnError+=":"+n.message)),r.send(i,d)};r.on("message",async o=>{if(o&&typeof o.rindoId=="number")try{let n={rindoId:o.rindoId,rindoRtnValue:await e(o),rindoRtnError:null};r.send(n,d)}catch(n){t(o.rindoId,n)}}),r.on("unhandledRejection",o=>{t(-1,o)})};var k=m.createNodeSys({process}),M=l.createWorkerMessageHandler(k);c(process,M);
package/testing/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- Rindo Testing v4.27.0 | MIT Licensed | https://rindojs.web.app
2
+ Rindo Testing v4.27.2 | MIT Licensed | https://rindojs.web.app
3
3
  */
4
4
  "use strict";
5
5
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rindo/core/testing",
3
- "version": "4.27.0",
3
+ "version": "4.27.2",
4
4
  "description": "Rindo testing suite.",
5
5
  "main": "./index.js",
6
6
  "types": "./index.d.ts",