@rindo/core 3.0.0-alpha.0 → 3.0.0-alpha.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.
package/testing/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- Rindo Testing v3.0.0-alpha.0 | MIT Licensed | https://rindojs.web.app
2
+ Rindo Testing v3.0.0-alpha.2 | MIT Licensed | https://rindojs.web.app
3
3
  */
4
4
  function _lazyRequire(e) {
5
5
  return new Proxy({}, {
@@ -36,37 +36,56 @@ function _interopNamespace(e) {
36
36
  })), t.default = e, Object.freeze(t);
37
37
  }
38
38
 
39
+ function createCommonjsModule(e, t, r) {
40
+ return e(r = {
41
+ path: t,
42
+ exports: {},
43
+ require: function(e, t) {
44
+ return function s() {
45
+ throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs");
46
+ }(null == t && r.path);
47
+ }
48
+ }, r.exports), r.exports;
49
+ }
50
+
39
51
  async function startPuppeteerBrowser(e) {
40
52
  if (!e.flags.e2e) return null;
41
- const t = process.env, r = e.testing.browserExecutablePath ? "puppeteer-core" : "puppeteer", s = e.sys.lazyRequire.getModulePath(e.rootDir, r), n = e.sys.lazyRequire.require(e.rootDir, s);
42
- t.__RINDO_PUPPETEER_MODULE__ = s, t.__RINDO_BROWSER_WAIT_UNTIL = e.testing.browserWaitUntil,
43
- e.flags.devtools && (e.testing.browserDevtools = !0, e.testing.browserHeadless = !1,
44
- t.__RINDO_E2E_DEVTOOLS__ = "true"), e.logger.debug(`puppeteer: ${s}`), e.logger.debug(`puppeteer headless: ${e.testing.browserHeadless}`),
45
- Array.isArray(e.testing.browserArgs) && e.logger.debug(`puppeteer args: ${e.testing.browserArgs.join(" ")}`),
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
+ t.__RINDO_PUPPETEER_MODULE__ = s;
55
+ try {
56
+ const r = e.sys.readFileSync(n, "utf8"), s = JSON.parse(r);
57
+ t.__RINDO_PUPPETEER_VERSION__ = major_1(s.version);
58
+ } catch (e) {
59
+ console.error(`An error occurred determining the version of Puppeteer installed:\n${e}`),
60
+ t.__RINDO_PUPPETEER_VERSION__ = void 0;
61
+ }
62
+ t.__RINDO_BROWSER_WAIT_UNTIL = e.testing.browserWaitUntil, e.flags.devtools && (e.testing.browserDevtools = !0,
63
+ e.testing.browserHeadless = !1, t.__RINDO_E2E_DEVTOOLS__ = "true"), e.logger.debug(`puppeteer: ${s}`),
64
+ e.logger.debug(`puppeteer headless: ${e.testing.browserHeadless}`), Array.isArray(e.testing.browserArgs) && e.logger.debug(`puppeteer args: ${e.testing.browserArgs.join(" ")}`),
46
65
  "boolean" == typeof e.testing.browserDevtools && e.logger.debug(`puppeteer devtools: ${e.testing.browserDevtools}`),
47
66
  "number" == typeof e.testing.browserSlowMo && e.logger.debug(`puppeteer slowMo: ${e.testing.browserSlowMo}`);
48
- const o = {
67
+ const i = {
49
68
  ignoreHTTPSErrors: !0,
50
69
  slowMo: e.testing.browserSlowMo
51
70
  };
52
- let i;
53
- if (e.testing.browserWSEndpoint) i = await n.connect({
71
+ let a;
72
+ if (e.testing.browserWSEndpoint) a = await o.connect({
54
73
  browserWSEndpoint: e.testing.browserWSEndpoint,
55
- ...o
74
+ ...i
56
75
  }); else {
57
76
  const t = {
58
77
  args: e.testing.browserArgs,
59
78
  headless: e.testing.browserHeadless,
60
79
  devtools: e.testing.browserDevtools,
61
- ...o
80
+ ...i
62
81
  };
63
82
  e.testing.browserExecutablePath && (t.executablePath = e.testing.browserExecutablePath),
64
- i = await n.launch({
83
+ a = await o.launch({
65
84
  ...t
66
85
  });
67
86
  }
68
- return t.__RINDO_BROWSER_WS_ENDPOINT__ = i.wsEndpoint(), e.logger.debug(`puppeteer browser wsEndpoint: ${t.__RINDO_BROWSER_WS_ENDPOINT__}`),
69
- i;
87
+ return t.__RINDO_BROWSER_WS_ENDPOINT__ = a.wsEndpoint(), e.logger.debug(`puppeteer browser wsEndpoint: ${t.__RINDO_BROWSER_WS_ENDPOINT__}`),
88
+ a;
70
89
  }
71
90
 
72
91
  function transpile(e, t = {}) {
@@ -517,7 +536,7 @@ function mockCompilerCtx(e) {
517
536
  }, n = async (t, r, s, i) => {
518
537
  const a = await e.readDir(r);
519
538
  if (a.length > 0) {
520
- const e = v(r);
539
+ const e = E(r);
521
540
  e.exists = !0, e.isFile = !1, e.isDirectory = !0, await Promise.all(a.map((async e => {
522
541
  const r = normalizePath(e), a = normalizePath(path$2.relative(t, r)), c = await l(r), u = {
523
542
  absPath: r,
@@ -540,7 +559,7 @@ function mockCompilerCtx(e) {
540
559
  }
541
560
  return !1;
542
561
  }, i = async e => {
543
- const t = v(e);
562
+ const t = E(e);
544
563
  t.isFile = !1, t.isDirectory = !0, t.queueWriteToDisk || (t.queueDeleteFromDisk = !0);
545
564
  try {
546
565
  const t = await s(e, {
@@ -549,10 +568,10 @@ function mockCompilerCtx(e) {
549
568
  await Promise.all(t.map((e => e.relPath.endsWith(".gitkeep") ? null : a(e.absPath))));
550
569
  } catch (e) {}
551
570
  }, a = async e => {
552
- const t = v(e);
571
+ const t = E(e);
553
572
  t.queueWriteToDisk || (t.queueDeleteFromDisk = !0);
554
573
  }, l = async t => {
555
- const r = v(t);
574
+ const r = E(t);
556
575
  if ("boolean" != typeof r.isDirectory || "boolean" != typeof r.isFile) {
557
576
  const s = await e.stat(t);
558
577
  s.error ? r.exists = !1 : (r.exists = !0, s.isFile ? (r.isFile = !0, r.isDirectory = !1,
@@ -566,7 +585,7 @@ function mockCompilerCtx(e) {
566
585
  size: "number" == typeof r.size ? r.size : 0
567
586
  };
568
587
  }, c = t => {
569
- const r = v(t);
588
+ const r = E(t);
570
589
  if ("boolean" != typeof r.isDirectory || "boolean" != typeof r.isFile) {
571
590
  const s = e.statSync(t);
572
591
  s.error ? r.exists = !1 : (r.exists = !0, s.isFile ? (r.isFile = !0, r.isDirectory = !1,
@@ -588,7 +607,7 @@ function mockCompilerCtx(e) {
588
607
  queuedWrite: !1
589
608
  };
590
609
  if (!0 === shouldIgnore(t)) return o.ignored = !0, o;
591
- const i = v(t);
610
+ const i = E(t);
592
611
  if (i.exists = !0, i.isFile = !0, i.isDirectory = !1, i.queueDeleteFromDisk = !1,
593
612
  "string" == typeof i.fileText ? o.changedContent = i.fileText.replace(/\r/g, "") !== s.replace(/\r/g, "") : o.changedContent = !0,
594
613
  i.fileText = s, o.queuedWrite = !1, null != n && ("string" == typeof n.outputTargetType && r.set(t, n.outputTargetType),
@@ -609,7 +628,7 @@ function mockCompilerCtx(e) {
609
628
  }, h = async (t, r) => {
610
629
  const s = [];
611
630
  for (const n of t) {
612
- const t = v(n);
631
+ const t = E(n);
613
632
  if (!0 !== t.exists || !0 !== t.isDirectory) try {
614
633
  t.exists = !0, t.isDirectory = !0, t.isFile = !1, r || await e.createDir(n), s.push(n);
615
634
  } catch (e) {}
@@ -625,7 +644,7 @@ function mockCompilerCtx(e) {
625
644
  if ("string" != typeof e) throw new Error("unable to writeFile without filePath");
626
645
  return m(e);
627
646
  }))), m = async t => {
628
- const r = v(t);
647
+ const r = E(t);
629
648
  if (null == r.fileText) throw new Error(`unable to find item fileText to write: ${t}`);
630
649
  return await e.writeFile(t, r.fileText), !1 === r.useCache && _(t), t;
631
650
  }, g = async t => await Promise.all(t.map((async t => {
@@ -644,7 +663,7 @@ function mockCompilerCtx(e) {
644
663
  e = normalizePath(e);
645
664
  const r = t.get(e);
646
665
  null == r || r.queueWriteToDisk || t.delete(e);
647
- }, v = e => {
666
+ }, E = e => {
648
667
  e = normalizePath(e);
649
668
  let r = t.get(e);
650
669
  return null != r || t.set(e, r = {
@@ -659,25 +678,25 @@ function mockCompilerCtx(e) {
659
678
  queueWriteToDisk: null,
660
679
  useCache: null
661
680
  }), r;
662
- }, b = 5242880;
681
+ }, v = 5242880;
663
682
  return {
664
683
  access: async e => {
665
- const t = v(e);
684
+ const t = E(e);
666
685
  return "boolean" != typeof t.exists ? (await l(e)).exists : t.exists;
667
686
  },
668
687
  accessSync: e => {
669
- const t = v(e);
688
+ const t = E(e);
670
689
  return "boolean" != typeof t.exists ? c(e).exists : t.exists;
671
690
  },
672
691
  cancelDeleteDirectoriesFromDisk: e => {
673
692
  for (const t of e) {
674
- const e = v(t);
693
+ const e = E(t);
675
694
  !0 === e.queueDeleteFromDisk && (e.queueDeleteFromDisk = !1);
676
695
  }
677
696
  },
678
697
  cancelDeleteFilesFromDisk: e => {
679
698
  for (const t of e) {
680
- const e = v(t);
699
+ const e = E(t);
681
700
  !0 === e.isFile && !0 === e.queueDeleteFromDisk && (e.queueDeleteFromDisk = !1);
682
701
  }
683
702
  },
@@ -697,7 +716,7 @@ function mockCompilerCtx(e) {
697
716
  };
698
717
  },
699
718
  copyFile: async (e, t) => {
700
- v(e).queueCopyFileToDest = t;
719
+ E(e).queueCopyFileToDest = t;
701
720
  },
702
721
  emptyDirs: async e => {
703
722
  e = e.filter(isString).map(normalizePath).reduce(((e, t) => (e.includes(t) || e.push(t),
@@ -710,7 +729,7 @@ function mockCompilerCtx(e) {
710
729
  const r = e.split("/").length, s = t.split("/").length;
711
730
  return r < s ? 1 : r > s ? -1 : 0;
712
731
  })), await Promise.all(r.map(a)), e.forEach((e => {
713
- const t = v(e);
732
+ const t = E(e);
714
733
  t.isFile = !1, t.isDirectory = !0, t.queueWriteToDisk = !0, t.queueDeleteFromDisk = !1;
715
734
  }));
716
735
  },
@@ -724,24 +743,24 @@ function mockCompilerCtx(e) {
724
743
  });
725
744
  })), e.forEach((e => e.files.sort())), e.sort(((e, t) => e.type < t.type ? -1 : e.type > t.type ? 1 : 0));
726
745
  },
727
- getItem: v,
746
+ getItem: E,
728
747
  getMemoryStats: () => `data length: ${t.size}`,
729
748
  readFile: async (t, r) => {
730
749
  if (null == r || !0 === r.useCache || void 0 === r.useCache) {
731
- const e = v(t);
750
+ const e = E(t);
732
751
  if (e.exists && "string" == typeof e.fileText) return e.fileText;
733
752
  }
734
- const s = await e.readFile(t), n = v(t);
735
- return "string" == typeof s ? s.length < b && (n.exists = !0, n.isFile = !0, n.isDirectory = !1,
753
+ const s = await e.readFile(t), n = E(t);
754
+ return "string" == typeof s ? s.length < v && (n.exists = !0, n.isFile = !0, n.isDirectory = !1,
736
755
  n.fileText = s) : n.exists = !1, s;
737
756
  },
738
757
  readFileSync: (t, r) => {
739
758
  if (null == r || !0 === r.useCache || void 0 === r.useCache) {
740
- const e = v(t);
759
+ const e = E(t);
741
760
  if (e.exists && "string" == typeof e.fileText) return e.fileText;
742
761
  }
743
- const s = e.readFileSync(t), n = v(t);
744
- return "string" == typeof s ? s.length < b && (n.exists = !0, n.isFile = !0, n.isDirectory = !1,
762
+ const s = e.readFileSync(t), n = E(t);
763
+ return "string" == typeof s ? s.length < v && (n.exists = !0, n.isFile = !0, n.isDirectory = !1,
745
764
  n.fileText = s) : n.exists = !1, s;
746
765
  },
747
766
  readdir: s,
@@ -815,13 +834,11 @@ async function addE2EListener(e, t, r, s) {
815
834
  e._e2eEvents.set(n, {
816
835
  eventName: r,
817
836
  callback: s
818
- });
819
- const o = t.executionContext();
820
- await o.evaluate(((e, t, r) => {
837
+ }), await t.evaluate(((e, t, r) => {
821
838
  e.addEventListener(r, (e => {
822
839
  window.rindoOnEvent(t, window.rindoSerializeEvent(e));
823
840
  }));
824
- }), t, n, r);
841
+ }), n, r);
825
842
  }
826
843
 
827
844
  function browserContextEvents() {
@@ -910,7 +927,7 @@ async function findAll(e, t, r) {
910
927
  const s = [], {lightSelector: n, shadowSelector: o} = getSelector(r), i = await t.$$(n);
911
928
  if (0 === i.length) return s;
912
929
  if (o) for (let t = 0; t < i.length; t++) {
913
- const r = i[t].executionContext(), n = await r.evaluateHandle(((e, t) => {
930
+ const r = getPuppeteerExecution(i[t]), n = await r.evaluateHandle(((e, t) => {
914
931
  if (!e.shadowRoot) throw new Error(`shadow root does not exist for element: ${e.tagName.toLowerCase()}`);
915
932
  return e.shadowRoot.querySelectorAll(t);
916
933
  }), i[t], o);
@@ -948,6 +965,10 @@ function getSelector(e) {
948
965
  return t;
949
966
  }
950
967
 
968
+ function getPuppeteerExecution(e) {
969
+ return parseInt(process.env.__RINDO_PUPPETEER_VERSION__, 10) >= 17 ? e.frame : e.executionContext();
970
+ }
971
+
951
972
  async function writeScreenshotData(e, t) {
952
973
  const r = function s(e, t) {
953
974
  const r = `${t}.json`;
@@ -1188,9 +1209,185 @@ function getAppUrl(e, t, r) {
1188
1209
  return t;
1189
1210
  }
1190
1211
 
1191
- var posix, pathBrowserify, caller, pathParse, parse, getNodeModulesDirs, nodeModulesPaths, normalizeOptions, ERROR_MESSAGE, slice, toStr, implementation, functionBind, src, isCoreModule, realpathFS$1, defaultIsFile$1, defaultIsDir$1, defaultRealpath, maybeRealpath, defaultReadPackage, getPackageCandidates$1, async, current, core, mod, core_1, isCore, realpathFS, defaultIsFile, defaultIsDir, defaultRealpathSync, maybeRealpathSync, defaultReadPackageSync, getPackageCandidates, sync, resolve;
1212
+ var debug_1, constants$2, re_1, parseOptions_1, identifiers, semver, major_1, posix, pathBrowserify, caller, pathParse, parse, getNodeModulesDirs, nodeModulesPaths, normalizeOptions, ERROR_MESSAGE, slice, toStr, implementation, functionBind, src, isCoreModule, realpathFS$1, defaultIsFile$1, defaultIsDir$1, defaultRealpath, maybeRealpath, defaultReadPackage, getPackageCandidates$1, async, current, core, mod, core_1, isCore, realpathFS, defaultIsFile, defaultIsDir, defaultRealpathSync, maybeRealpathSync, defaultReadPackageSync, getPackageCandidates, sync, resolve;
1213
+
1214
+ const rindo_js = require("../compiler/rindo.js"), appData = _lazyRequire("@rindo/core/internal/app-data"), testing = _lazyRequire("@rindo/core/internal/testing"), index_cjs = _lazyRequire("../mock-doc/index.cjs"), path$2 = require("path"), crypto$3 = require("crypto"), os$2 = require("os"), process$3 = require("process"), fs$2 = require("fs"), index_js = _lazyRequire("../dev-server/index.js"), child_process$2 = require("child_process"), path__default = _interopDefaultLegacy(path$2), os__namespace = _interopNamespace(os$2), process__namespace = _interopNamespace(process$3), fs__default = _interopDefaultLegacy(fs$2), debug = ("object" == typeof process && process.env,
1215
+ () => {});
1216
+
1217
+ debug_1 = debug;
1218
+
1219
+ const MAX_SAFE_INTEGER$1 = Number.MAX_SAFE_INTEGER || 9007199254740991;
1220
+
1221
+ constants$2 = {
1222
+ SEMVER_SPEC_VERSION: "2.0.0",
1223
+ MAX_LENGTH: 256,
1224
+ MAX_SAFE_INTEGER: MAX_SAFE_INTEGER$1,
1225
+ MAX_SAFE_COMPONENT_LENGTH: 16
1226
+ }, re_1 = createCommonjsModule((function(e, t) {
1227
+ const {MAX_SAFE_COMPONENT_LENGTH: r} = constants$2, s = (t = e.exports = {}).re = [], n = t.src = [], o = t.t = {};
1228
+ let i = 0;
1229
+ const a = (e, t, r) => {
1230
+ const a = i++;
1231
+ debug_1(e, a, t), o[e] = a, n[a] = t, s[a] = new RegExp(t, r ? "g" : void 0);
1232
+ };
1233
+ a("NUMERICIDENTIFIER", "0|[1-9]\\d*"), a("NUMERICIDENTIFIERLOOSE", "[0-9]+"), a("NONNUMERICIDENTIFIER", "\\d*[a-zA-Z-][a-zA-Z0-9-]*"),
1234
+ a("MAINVERSION", `(${n[o.NUMERICIDENTIFIER]})\\.(${n[o.NUMERICIDENTIFIER]})\\.(${n[o.NUMERICIDENTIFIER]})`),
1235
+ a("MAINVERSIONLOOSE", `(${n[o.NUMERICIDENTIFIERLOOSE]})\\.(${n[o.NUMERICIDENTIFIERLOOSE]})\\.(${n[o.NUMERICIDENTIFIERLOOSE]})`),
1236
+ a("PRERELEASEIDENTIFIER", `(?:${n[o.NUMERICIDENTIFIER]}|${n[o.NONNUMERICIDENTIFIER]})`),
1237
+ a("PRERELEASEIDENTIFIERLOOSE", `(?:${n[o.NUMERICIDENTIFIERLOOSE]}|${n[o.NONNUMERICIDENTIFIER]})`),
1238
+ a("PRERELEASE", `(?:-(${n[o.PRERELEASEIDENTIFIER]}(?:\\.${n[o.PRERELEASEIDENTIFIER]})*))`),
1239
+ a("PRERELEASELOOSE", `(?:-?(${n[o.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${n[o.PRERELEASEIDENTIFIERLOOSE]})*))`),
1240
+ a("BUILDIDENTIFIER", "[0-9A-Za-z-]+"), a("BUILD", `(?:\\+(${n[o.BUILDIDENTIFIER]}(?:\\.${n[o.BUILDIDENTIFIER]})*))`),
1241
+ a("FULLPLAIN", `v?${n[o.MAINVERSION]}${n[o.PRERELEASE]}?${n[o.BUILD]}?`), a("FULL", `^${n[o.FULLPLAIN]}$`),
1242
+ a("LOOSEPLAIN", `[v=\\s]*${n[o.MAINVERSIONLOOSE]}${n[o.PRERELEASELOOSE]}?${n[o.BUILD]}?`),
1243
+ a("LOOSE", `^${n[o.LOOSEPLAIN]}$`), a("GTLT", "((?:<|>)?=?)"), a("XRANGEIDENTIFIERLOOSE", `${n[o.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),
1244
+ 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]}?)?)?`),
1245
+ a("XRANGEPLAINLOOSE", `[v=\\s]*(${n[o.XRANGEIDENTIFIERLOOSE]})(?:\\.(${n[o.XRANGEIDENTIFIERLOOSE]})(?:\\.(${n[o.XRANGEIDENTIFIERLOOSE]})(?:${n[o.PRERELEASELOOSE]})?${n[o.BUILD]}?)?)?`),
1246
+ a("XRANGE", `^${n[o.GTLT]}\\s*${n[o.XRANGEPLAIN]}$`), a("XRANGELOOSE", `^${n[o.GTLT]}\\s*${n[o.XRANGEPLAINLOOSE]}$`),
1247
+ a("COERCE", `(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?(?:$|[^\\d])`),
1248
+ a("COERCERTL", n[o.COERCE], !0), a("LONETILDE", "(?:~>?)"), a("TILDETRIM", `(\\s*)${n[o.LONETILDE]}\\s+`, !0),
1249
+ t.tildeTrimReplace = "$1~", a("TILDE", `^${n[o.LONETILDE]}${n[o.XRANGEPLAIN]}$`),
1250
+ a("TILDELOOSE", `^${n[o.LONETILDE]}${n[o.XRANGEPLAINLOOSE]}$`), a("LONECARET", "(?:\\^)"),
1251
+ a("CARETTRIM", `(\\s*)${n[o.LONECARET]}\\s+`, !0), t.caretTrimReplace = "$1^", a("CARET", `^${n[o.LONECARET]}${n[o.XRANGEPLAIN]}$`),
1252
+ a("CARETLOOSE", `^${n[o.LONECARET]}${n[o.XRANGEPLAINLOOSE]}$`), a("COMPARATORLOOSE", `^${n[o.GTLT]}\\s*(${n[o.LOOSEPLAIN]})$|^$`),
1253
+ a("COMPARATOR", `^${n[o.GTLT]}\\s*(${n[o.FULLPLAIN]})$|^$`), a("COMPARATORTRIM", `(\\s*)${n[o.GTLT]}\\s*(${n[o.LOOSEPLAIN]}|${n[o.XRANGEPLAIN]})`, !0),
1254
+ t.comparatorTrimReplace = "$1$2$3", a("HYPHENRANGE", `^\\s*(${n[o.XRANGEPLAIN]})\\s+-\\s+(${n[o.XRANGEPLAIN]})\\s*$`),
1255
+ a("HYPHENRANGELOOSE", `^\\s*(${n[o.XRANGEPLAINLOOSE]})\\s+-\\s+(${n[o.XRANGEPLAINLOOSE]})\\s*$`),
1256
+ a("STAR", "(<|>)?=?\\s*\\*"), a("GTE0", "^\\s*>=\\s*0\\.0\\.0\\s*$"), a("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$");
1257
+ }));
1258
+
1259
+ const opts = [ "includePrerelease", "loose", "rtl" ];
1260
+
1261
+ parseOptions_1 = e => e ? "object" != typeof e ? {
1262
+ loose: !0
1263
+ } : opts.filter((t => e[t])).reduce(((e, t) => (e[t] = !0, e)), {}) : {};
1264
+
1265
+ const numeric = /^[0-9]+$/, compareIdentifiers$1 = (e, t) => {
1266
+ const r = numeric.test(e), s = numeric.test(t);
1267
+ return r && s && (e = +e, t = +t), e === t ? 0 : r && !s ? -1 : s && !r ? 1 : e < t ? -1 : 1;
1268
+ };
1269
+
1270
+ identifiers = {
1271
+ compareIdentifiers: compareIdentifiers$1,
1272
+ rcompareIdentifiers: (e, t) => compareIdentifiers$1(t, e)
1273
+ };
1274
+
1275
+ const {MAX_LENGTH, MAX_SAFE_INTEGER} = constants$2, {re, t} = re_1, {compareIdentifiers} = identifiers;
1276
+
1277
+ class SemVer {
1278
+ constructor(e, r) {
1279
+ if (r = parseOptions_1(r), e instanceof SemVer) {
1280
+ if (e.loose === !!r.loose && e.includePrerelease === !!r.includePrerelease) return e;
1281
+ e = e.version;
1282
+ } else if ("string" != typeof e) throw new TypeError(`Invalid Version: ${e}`);
1283
+ if (e.length > MAX_LENGTH) throw new TypeError(`version is longer than ${MAX_LENGTH} characters`);
1284
+ debug_1("SemVer", e, r), this.options = r, this.loose = !!r.loose, this.includePrerelease = !!r.includePrerelease;
1285
+ const s = e.trim().match(r.loose ? re[t.LOOSE] : re[t.FULL]);
1286
+ if (!s) throw new TypeError(`Invalid Version: ${e}`);
1287
+ if (this.raw = e, this.major = +s[1], this.minor = +s[2], this.patch = +s[3], this.major > MAX_SAFE_INTEGER || this.major < 0) throw new TypeError("Invalid major version");
1288
+ if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) throw new TypeError("Invalid minor version");
1289
+ if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) throw new TypeError("Invalid patch version");
1290
+ s[4] ? this.prerelease = s[4].split(".").map((e => {
1291
+ if (/^[0-9]+$/.test(e)) {
1292
+ const t = +e;
1293
+ if (t >= 0 && t < MAX_SAFE_INTEGER) return t;
1294
+ }
1295
+ return e;
1296
+ })) : this.prerelease = [], this.build = s[5] ? s[5].split(".") : [], this.format();
1297
+ }
1298
+ format() {
1299
+ return this.version = `${this.major}.${this.minor}.${this.patch}`, this.prerelease.length && (this.version += `-${this.prerelease.join(".")}`),
1300
+ this.version;
1301
+ }
1302
+ toString() {
1303
+ return this.version;
1304
+ }
1305
+ compare(e) {
1306
+ if (debug_1("SemVer.compare", this.version, this.options, e), !(e instanceof SemVer)) {
1307
+ if ("string" == typeof e && e === this.version) return 0;
1308
+ e = new SemVer(e, this.options);
1309
+ }
1310
+ return e.version === this.version ? 0 : this.compareMain(e) || this.comparePre(e);
1311
+ }
1312
+ compareMain(e) {
1313
+ return e instanceof SemVer || (e = new SemVer(e, this.options)), compareIdentifiers(this.major, e.major) || compareIdentifiers(this.minor, e.minor) || compareIdentifiers(this.patch, e.patch);
1314
+ }
1315
+ comparePre(e) {
1316
+ if (e instanceof SemVer || (e = new SemVer(e, this.options)), this.prerelease.length && !e.prerelease.length) return -1;
1317
+ if (!this.prerelease.length && e.prerelease.length) return 1;
1318
+ if (!this.prerelease.length && !e.prerelease.length) return 0;
1319
+ let t = 0;
1320
+ do {
1321
+ const r = this.prerelease[t], s = e.prerelease[t];
1322
+ if (debug_1("prerelease compare", t, r, s), void 0 === r && void 0 === s) return 0;
1323
+ if (void 0 === s) return 1;
1324
+ if (void 0 === r) return -1;
1325
+ if (r !== s) return compareIdentifiers(r, s);
1326
+ } while (++t);
1327
+ }
1328
+ compareBuild(e) {
1329
+ e instanceof SemVer || (e = new SemVer(e, this.options));
1330
+ let t = 0;
1331
+ do {
1332
+ const r = this.build[t], s = e.build[t];
1333
+ if (debug_1("prerelease compare", t, r, s), void 0 === r && void 0 === s) return 0;
1334
+ if (void 0 === s) return 1;
1335
+ if (void 0 === r) return -1;
1336
+ if (r !== s) return compareIdentifiers(r, s);
1337
+ } while (++t);
1338
+ }
1339
+ inc(e, t) {
1340
+ switch (e) {
1341
+ case "premajor":
1342
+ this.prerelease.length = 0, this.patch = 0, this.minor = 0, this.major++, this.inc("pre", t);
1343
+ break;
1344
+
1345
+ case "preminor":
1346
+ this.prerelease.length = 0, this.patch = 0, this.minor++, this.inc("pre", t);
1347
+ break;
1348
+
1349
+ case "prepatch":
1350
+ this.prerelease.length = 0, this.inc("patch", t), this.inc("pre", t);
1351
+ break;
1352
+
1353
+ case "prerelease":
1354
+ 0 === this.prerelease.length && this.inc("patch", t), this.inc("pre", t);
1355
+ break;
1356
+
1357
+ case "major":
1358
+ 0 === this.minor && 0 === this.patch && 0 !== this.prerelease.length || this.major++,
1359
+ this.minor = 0, this.patch = 0, this.prerelease = [];
1360
+ break;
1361
+
1362
+ case "minor":
1363
+ 0 === this.patch && 0 !== this.prerelease.length || this.minor++, this.patch = 0,
1364
+ this.prerelease = [];
1365
+ break;
1366
+
1367
+ case "patch":
1368
+ 0 === this.prerelease.length && this.patch++, this.prerelease = [];
1369
+ break;
1370
+
1371
+ case "pre":
1372
+ if (0 === this.prerelease.length) this.prerelease = [ 0 ]; else {
1373
+ let e = this.prerelease.length;
1374
+ for (;--e >= 0; ) "number" == typeof this.prerelease[e] && (this.prerelease[e]++,
1375
+ e = -2);
1376
+ -1 === e && this.prerelease.push(0);
1377
+ }
1378
+ t && (0 === compareIdentifiers(this.prerelease[0], t) ? isNaN(this.prerelease[1]) && (this.prerelease = [ t, 0 ]) : this.prerelease = [ t, 0 ]);
1379
+ break;
1380
+
1381
+ default:
1382
+ throw new Error(`invalid increment argument: ${e}`);
1383
+ }
1384
+ return this.format(), this.raw = this.version, this;
1385
+ }
1386
+ }
1387
+
1388
+ semver = SemVer, major_1 = (e, t) => new semver(e, t).major;
1192
1389
 
1193
- const rindo_js = require("../compiler/rindo.js"), appData = _lazyRequire("@rindo/core/internal/app-data"), testing = _lazyRequire("@rindo/core/internal/testing"), index_cjs = _lazyRequire("../mock-doc/index.cjs"), path$2 = require("path"), crypto$3 = require("crypto"), os$2 = require("os"), process$3 = require("process"), fs$2 = require("fs"), index_js = _lazyRequire("../dev-server/index.js"), child_process$2 = require("child_process"), path__default = _interopDefaultLegacy(path$2), os__namespace = _interopNamespace(os$2), process__namespace = _interopNamespace(process$3), fs__default = _interopDefaultLegacy(fs$2), formatComponentRuntimeMembers = (e, t = !0) => ({
1390
+ const formatComponentRuntimeMembers = (e, t = !0) => ({
1194
1391
  ...formatPropertiesRuntimeMember(e.properties),
1195
1392
  ...formatStatesRuntimeMember(e.states),
1196
1393
  ...t ? formatMethodsRuntimeMember(e.methods) : {}
@@ -2216,17 +2413,7 @@ caller = function() {
2216
2413
  return Error.prepareStackTrace = function(e, t) {
2217
2414
  return t;
2218
2415
  }, e = (new Error).stack, Error.prepareStackTrace = t, e[2].getFileName();
2219
- }, pathParse = function createCommonjsModule(e, t, r) {
2220
- return e(r = {
2221
- path: t,
2222
- exports: {},
2223
- require: function(e, t) {
2224
- return function s() {
2225
- throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs");
2226
- }(null == t && r.path);
2227
- }
2228
- }, r.exports), r.exports;
2229
- }((function(e) {
2416
+ }, pathParse = createCommonjsModule((function(e) {
2230
2417
  var t, r, s = "win32" === process.platform, n = /^(((?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?[\\\/]?)(?:[^\\\/]*[\\\/])*)((\.{1,2}|[^\\\/]+?|)(\.[^.\/\\]*|))[\\\/]*$/, o = {
2231
2418
  parse: function(e) {
2232
2419
  if ("string" != typeof e) throw new TypeError("Parameter 'pathString' must be a string, not " + typeof e);
@@ -2415,31 +2602,31 @@ defaultIsFile$1 = function e(t, r) {
2415
2602
  }, async = function e(t, r, s) {
2416
2603
  function n(e) {
2417
2604
  if (/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/.test(t)) T = path__default.default.resolve(e, t),
2418
- "." !== t && ".." !== t && "/" !== t.slice(-1) || (T += "/"), /\/$/.test(t) && T === e ? l(T, S.package, o) : i(T, S.package, o); else {
2419
- if (_ && isCoreModule(t)) return D(null, t);
2605
+ "." !== t && ".." !== t && "/" !== t.slice(-1) || (T += "/"), /\/$/.test(t) && T === e ? l(T, D.package, o) : i(T, D.package, o); else {
2606
+ if (_ && isCoreModule(t)) return S(null, t);
2420
2607
  !function r(e, t, s) {
2421
2608
  var n = function() {
2422
- return getPackageCandidates$1(e, t, S);
2609
+ return getPackageCandidates$1(e, t, D);
2423
2610
  };
2424
- c(s, y ? y(e, t, n, S) : n());
2611
+ c(s, y ? y(e, t, n, D) : n());
2425
2612
  }(t, e, (function(e, r, s) {
2426
- if (e) D(e); else {
2427
- if (r) return maybeRealpath(f, r, S, (function(e, t) {
2428
- e ? D(e) : D(null, t, s);
2613
+ if (e) S(e); else {
2614
+ if (r) return maybeRealpath(f, r, D, (function(e, t) {
2615
+ e ? S(e) : S(null, t, s);
2429
2616
  }));
2430
- var n = new Error("Cannot find module '" + t + "' from '" + b + "'");
2431
- n.code = "MODULE_NOT_FOUND", D(n);
2617
+ var n = new Error("Cannot find module '" + t + "' from '" + v + "'");
2618
+ n.code = "MODULE_NOT_FOUND", S(n);
2432
2619
  }
2433
2620
  }));
2434
2621
  }
2435
2622
  }
2436
2623
  function o(e, r, s) {
2437
- e ? D(e) : r ? D(null, r, s) : l(T, (function(e, r, s) {
2438
- if (e) D(e); else if (r) maybeRealpath(f, r, S, (function(e, t) {
2439
- e ? D(e) : D(null, t, s);
2624
+ e ? S(e) : r ? S(null, r, s) : l(T, (function(e, r, s) {
2625
+ if (e) S(e); else if (r) maybeRealpath(f, r, D, (function(e, t) {
2626
+ e ? S(e) : S(null, t, s);
2440
2627
  })); else {
2441
- var n = new Error("Cannot find module '" + t + "' from '" + b + "'");
2442
- n.code = "MODULE_NOT_FOUND", D(n);
2628
+ var n = new Error("Cannot find module '" + t + "' from '" + v + "'");
2629
+ n.code = "MODULE_NOT_FOUND", S(n);
2443
2630
  }
2444
2631
  }));
2445
2632
  }
@@ -2448,8 +2635,8 @@ defaultIsFile$1 = function e(t, r) {
2448
2635
  "function" == typeof s && (n = s, s = void 0), function e(t, r, s) {
2449
2636
  function o(s, o, a) {
2450
2637
  var u, h, p;
2451
- return c = o, s ? n(s) : a && c && S.pathFilter && (h = (u = path__default.default.relative(a, l)).slice(0, u.length - t[0].length),
2452
- p = S.pathFilter(c, r, h)) ? e([ "" ].concat(w.slice()), path__default.default.resolve(a, p), c) : void d(l, i);
2638
+ return c = o, s ? n(s) : a && c && D.pathFilter && (h = (u = path__default.default.relative(a, l)).slice(0, u.length - t[0].length),
2639
+ p = D.pathFilter(c, r, h)) ? e([ "" ].concat(w.slice()), path__default.default.resolve(a, p), c) : void d(l, i);
2453
2640
  }
2454
2641
  function i(s, o) {
2455
2642
  return s ? n(s) : o ? n(null, l, c) : void e(t.slice(1), r, c);
@@ -2460,7 +2647,7 @@ defaultIsFile$1 = function e(t, r) {
2460
2647
  }([ "" ].concat(w), e, s);
2461
2648
  }
2462
2649
  function a(e, t) {
2463
- return "" === e || "/" === e || "win32" === process.platform && /^\w:[/\\]*$/.test(e) || /[/\\]node_modules[/\\]*$/.test(e) ? t(null) : void maybeRealpath(f, e, S, (function(r, s) {
2650
+ return "" === e || "/" === e || "win32" === process.platform && /^\w:[/\\]*$/.test(e) || /[/\\]node_modules[/\\]*$/.test(e) ? t(null) : void maybeRealpath(f, e, D, (function(r, s) {
2464
2651
  if (r) return a(path__default.default.dirname(e), t);
2465
2652
  var n = path__default.default.join(s, "package.json");
2466
2653
  d(n, (function(r, s) {
@@ -2468,20 +2655,20 @@ defaultIsFile$1 = function e(t, r) {
2468
2655
  m(p, n, (function(r, s) {
2469
2656
  r && t(r);
2470
2657
  var o = s;
2471
- o && S.packageFilter && (o = S.packageFilter(o, n)), t(null, o, e);
2658
+ o && D.packageFilter && (o = D.packageFilter(o, n)), t(null, o, e);
2472
2659
  }));
2473
2660
  }));
2474
2661
  }));
2475
2662
  }
2476
2663
  function l(e, t, r) {
2477
2664
  var s = r, n = t;
2478
- "function" == typeof n && (s = n, n = S.package), maybeRealpath(f, e, S, (function(t, r) {
2665
+ "function" == typeof n && (s = n, n = D.package), maybeRealpath(f, e, D, (function(t, r) {
2479
2666
  if (t) return s(t);
2480
2667
  var o = path__default.default.join(r, "package.json");
2481
2668
  d(o, (function(t, r) {
2482
2669
  return t ? s(t) : r ? void m(p, o, (function(t, r) {
2483
2670
  var n, a;
2484
- return t ? s(t) : ((n = r) && S.packageFilter && (n = S.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",
2671
+ return t ? s(t) : ((n = r) && D.packageFilter && (n = D.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",
2485
2672
  s(a)) : ("." !== n.main && "./" !== n.main || (n.main = "index"), void i(path__default.default.resolve(e, n.main), n, (function(t, r, n) {
2486
2673
  return t ? s(t) : r ? s(null, r, n) : n ? void l(path__default.default.resolve(e, n.main), n, (function(t, r, n) {
2487
2674
  return t ? s(t) : r ? s(null, r, n) : void i(path__default.default.join(e, "index"), n, s);
@@ -2493,7 +2680,7 @@ defaultIsFile$1 = function e(t, r) {
2493
2680
  }
2494
2681
  function c(e, t) {
2495
2682
  function r(t, r, o) {
2496
- return t ? e(t) : r ? e(null, r, o) : void l(n, S.package, s);
2683
+ return t ? e(t) : r ? e(null, r, o) : void l(n, D.package, s);
2497
2684
  }
2498
2685
  function s(r, s, n) {
2499
2686
  return r ? e(r) : s ? e(null, s, n) : void c(e, t.slice(1));
@@ -2501,22 +2688,22 @@ defaultIsFile$1 = function e(t, r) {
2501
2688
  if (0 === t.length) return e(null, void 0);
2502
2689
  var n = t[0];
2503
2690
  h(path__default.default.dirname(n), (function o(s, a) {
2504
- return s ? e(s) : a ? void i(n, S.package, r) : c(e, t.slice(1));
2691
+ return s ? e(s) : a ? void i(n, D.package, r) : c(e, t.slice(1));
2505
2692
  }));
2506
2693
  }
2507
- var u, d, h, p, f, m, g, y, w, _, v, b, E, T, D = s, S = r;
2508
- return "function" == typeof r && (D = S, S = {}), "string" != typeof t ? (u = new TypeError("Path must be a string."),
2694
+ var u, d, h, p, f, m, g, y, w, _, E, v, b, T, S = s, D = r;
2695
+ return "function" == typeof r && (S = D, D = {}), "string" != typeof t ? (u = new TypeError("Path must be a string."),
2509
2696
  process.nextTick((function() {
2510
- D(u);
2511
- }))) : (S = normalizeOptions(0, S), d = S.isFile || defaultIsFile$1, h = S.isDirectory || defaultIsDir$1,
2512
- p = S.readFile || fs__default.default.readFile, f = S.realpath || defaultRealpath,
2513
- m = S.readPackage || defaultReadPackage, S.readFile && S.readPackage ? (g = new TypeError("`readFile` and `readPackage` are mutually exclusive."),
2697
+ S(u);
2698
+ }))) : (D = normalizeOptions(0, D), d = D.isFile || defaultIsFile$1, h = D.isDirectory || defaultIsDir$1,
2699
+ p = D.readFile || fs__default.default.readFile, f = D.realpath || defaultRealpath,
2700
+ m = D.readPackage || defaultReadPackage, D.readFile && D.readPackage ? (g = new TypeError("`readFile` and `readPackage` are mutually exclusive."),
2514
2701
  process.nextTick((function() {
2515
- D(g);
2516
- }))) : (y = S.packageIterator, w = S.extensions || [ ".js" ], _ = !1 !== S.includeCoreModules,
2517
- v = S.basedir || path__default.default.dirname(caller()), b = S.filename || v, S.paths = S.paths || [],
2518
- E = path__default.default.resolve(v), void maybeRealpath(f, E, S, (function(e, t) {
2519
- e ? D(e) : n(t);
2702
+ S(g);
2703
+ }))) : (y = D.packageIterator, w = D.extensions || [ ".js" ], _ = !1 !== D.includeCoreModules,
2704
+ E = D.basedir || path__default.default.dirname(caller()), v = D.filename || E, D.paths = D.paths || [],
2705
+ b = path__default.default.resolve(E), void maybeRealpath(f, b, D, (function(e, t) {
2706
+ e ? S(e) : n(t);
2520
2707
  }))));
2521
2708
  };
2522
2709
 
@@ -2678,7 +2865,7 @@ defaultIsFile = function e(t) {
2678
2865
  }
2679
2866
  return s(path__default.default.join(e, "/index"));
2680
2867
  }
2681
- var i, a, l, c, u, d, h, p, f, m, g, y, w, _, v, b;
2868
+ var i, a, l, c, u, d, h, p, f, m, g, y, w, _, E, v;
2682
2869
  if ("string" != typeof t) throw new TypeError("Path must be a string.");
2683
2870
  if (i = normalizeOptions(0, r), a = i.isFile || defaultIsFile, l = i.readFileSync || fs__default.default.readFileSync,
2684
2871
  c = i.isDirectory || defaultIsDir, u = i.realpathSync || defaultRealpathSync, d = i.readPackageSync || defaultReadPackageSync,
@@ -2690,7 +2877,7 @@ defaultIsFile = function e(t) {
2690
2877
  _ = s(w) || o(w)) return maybeRealpathSync(u, _, i);
2691
2878
  } else {
2692
2879
  if (f && isCoreModule(t)) return t;
2693
- if (v = function E(e, t) {
2880
+ if (E = function b(e, t) {
2694
2881
  var r, n, a, l, u = function() {
2695
2882
  return getPackageCandidates(e, t, i);
2696
2883
  }, d = h ? h(e, t, u, i) : u();
@@ -2698,10 +2885,10 @@ defaultIsFile = function e(t) {
2698
2885
  if (a = s(n)) return a;
2699
2886
  if (l = o(n)) return l;
2700
2887
  }
2701
- }(t, y), v) return maybeRealpathSync(u, v, i);
2888
+ }(t, y), E) return maybeRealpathSync(u, E, i);
2702
2889
  }
2703
- throw (b = new Error("Cannot find module '" + t + "' from '" + g + "'")).code = "MODULE_NOT_FOUND",
2704
- b;
2890
+ throw (v = new Error("Cannot find module '" + t + "' from '" + g + "'")).code = "MODULE_NOT_FOUND",
2891
+ v;
2705
2892
  }, async.core = core_1, async.isCore = isCore, async.sync = sync, resolve = async;
2706
2893
 
2707
2894
  const COMMON_DIR_MODULE_EXTS = [ ".tsx", ".ts", ".mjs", ".js", ".jsx", ".json", ".md" ], COMMON_DIR_FILENAMES = [ "package.json", "index.js", "index.mjs" ], getCommonDirName = (e, t) => e + "/" + t, isCommonDirModuleFile = e => COMMON_DIR_MODULE_EXTS.some((t => e.endsWith(t))), shouldFetchModule = e => IS_FETCH_ENV && IS_BROWSER_ENV && isNodeModulePath(e), isNodeModulePath = e => normalizePath(e).split("/").includes("node_modules"), getPackageDirPath = (e, t) => {
@@ -2843,7 +3030,7 @@ const COMMON_DIR_MODULE_EXTS = [ ".tsx", ".ts", ".mjs", ".js", ".jsx", ".json",
2843
3030
  isFile: !1,
2844
3031
  watcherCallbacks: null,
2845
3032
  data: void 0
2846
- }), r.newDirs.push(e), b(e, new Set));
3033
+ }), r.newDirs.push(e), v(e, new Set));
2847
3034
  }, p = e => {
2848
3035
  e = c(e);
2849
3036
  const t = [], r = s.get(e);
@@ -2862,7 +3049,7 @@ const COMMON_DIR_MODULE_EXTS = [ ".tsx", ".ts", ".mjs", ".js", ".jsx", ".json",
2862
3049
  if (!n.error && !r.error) if (n.isFile) {
2863
3050
  const n = path$2.dirname(t), o = d(n, {
2864
3051
  recursive: !0
2865
- }), i = s.get(e).data, a = E(t, i);
3052
+ }), i = s.get(e).data, a = b(t, i);
2866
3053
  r.newDirs.push(...o.newDirs), r.renamed.push({
2867
3054
  oldPath: e,
2868
3055
  newPath: t,
@@ -2901,11 +3088,11 @@ const COMMON_DIR_MODULE_EXTS = [ ".tsx", ".ts", ".mjs", ".js", ".jsx", ".json",
2901
3088
  if (t && t.recursive) for (const e of n) {
2902
3089
  const n = s.get(e);
2903
3090
  if (n) if (n.isDirectory) w(e, t, r); else if (n.isFile) {
2904
- const t = v(e);
3091
+ const t = E(e);
2905
3092
  t.error ? r.error = t.error : r.removedFiles.push(e);
2906
3093
  }
2907
3094
  } else if (n.length > 0) return void (r.error = "cannot delete directory that contains files/subdirectories");
2908
- s.delete(e), b(e, new Set), r.removedDirs.push(e);
3095
+ s.delete(e), v(e, new Set), r.removedDirs.push(e);
2909
3096
  }
2910
3097
  }, _ = e => {
2911
3098
  e = c(e);
@@ -2923,7 +3110,7 @@ const COMMON_DIR_MODULE_EXTS = [ ".tsx", ".ts", ".mjs", ".js", ".jsx", ".json",
2923
3110
  size: 0,
2924
3111
  error: `ENOENT: no such file or directory, statSync '${e}'`
2925
3112
  };
2926
- }, v = e => {
3113
+ }, E = e => {
2927
3114
  e = c(e);
2928
3115
  const t = {
2929
3116
  basename: path$2.basename(e),
@@ -2933,14 +3120,14 @@ const COMMON_DIR_MODULE_EXTS = [ ".tsx", ".ts", ".mjs", ".js", ".jsx", ".json",
2933
3120
  }, r = s.get(e);
2934
3121
  if (r) {
2935
3122
  if (r.watcherCallbacks) for (const t of r.watcherCallbacks) t(e, "fileDelete");
2936
- s.delete(e), b(e, new Set);
3123
+ s.delete(e), v(e, new Set);
2937
3124
  }
2938
3125
  return t;
2939
- }, b = (e, t) => {
3126
+ }, v = (e, t) => {
2940
3127
  const r = c(path$2.dirname(e)), n = s.get(r);
2941
3128
  if (n && n.isDirectory && n.watcherCallbacks) for (const t of n.watcherCallbacks) t(e, null);
2942
- t.has(r) || (t.add(r), b(r, t));
2943
- }, E = (e, t) => {
3129
+ t.has(r) || (t.add(r), v(r, t));
3130
+ }, b = (e, t) => {
2944
3131
  const r = {
2945
3132
  path: e = c(e),
2946
3133
  error: null
@@ -2955,18 +3142,18 @@ const COMMON_DIR_MODULE_EXTS = [ ".tsx", ".ts", ".mjs", ".js", ".jsx", ".json",
2955
3142
  isFile: !0,
2956
3143
  watcherCallbacks: null,
2957
3144
  data: t
2958
- }), b(e, new Set);
3145
+ }), v(e, new Set);
2959
3146
  return r;
2960
- }, T = "undefined" != typeof self ? null === self || void 0 === self ? void 0 : self.fetch : "undefined" != typeof window ? null === window || void 0 === window ? void 0 : window.fetch : "undefined" != typeof global ? null === global || void 0 === global ? void 0 : global.fetch : void 0, D = Promise.resolve();
3147
+ }, T = "undefined" != typeof self ? null === self || void 0 === self ? void 0 : self.fetch : "undefined" != typeof window ? null === window || void 0 === window ? void 0 : window.fetch : "undefined" != typeof global ? null === global || void 0 === global ? void 0 : global.fetch : void 0, S = Promise.resolve();
2961
3148
  d("/");
2962
- const S = {
3149
+ const D = {
2963
3150
  name: "in-memory",
2964
- version: "3.0.0-alpha.0",
3151
+ version: "3.0.0-alpha.2",
2965
3152
  events: a,
2966
3153
  access: async e => u(e),
2967
3154
  accessSync: u,
2968
3155
  addDestroy: o,
2969
- copyFile: async (e, t) => (E(t, f(e)), !0),
3156
+ copyFile: async (e, t) => (b(t, f(e)), !0),
2970
3157
  createDir: async (e, t) => d(e, t),
2971
3158
  createDirSync: d,
2972
3159
  homeDir: () => os__namespace.homedir(),
@@ -2989,7 +3176,7 @@ const COMMON_DIR_MODULE_EXTS = [ ".tsx", ".ts", ".mjs", ".js", ".jsx", ".json",
2989
3176
  encodeToBase64: e => btoa(unescape(encodeURIComponent(e))),
2990
3177
  exit: async e => r.warn(`exit ${e}`),
2991
3178
  getCurrentDirectory: () => "/",
2992
- getCompilerExecutingPath: () => IS_WEB_WORKER_ENV ? location.href : S.getRemoteModuleUrl({
3179
+ getCompilerExecutingPath: () => IS_WEB_WORKER_ENV ? location.href : D.getRemoteModuleUrl({
2993
3180
  moduleId: "@rindo/core",
2994
3181
  path: "compiler/rindo.min.js"
2995
3182
  }),
@@ -3000,7 +3187,7 @@ const COMMON_DIR_MODULE_EXTS = [ ".tsx", ".ts", ".mjs", ".js", ".jsx", ".json",
3000
3187
  },
3001
3188
  hardwareConcurrency: l,
3002
3189
  isSymbolicLink: async e => !1,
3003
- nextTick: e => D.then(e),
3190
+ nextTick: e => S.then(e),
3004
3191
  normalizePath: c,
3005
3192
  platformPath: pathBrowserify,
3006
3193
  readDir: async e => p(e),
@@ -3030,7 +3217,7 @@ const COMMON_DIR_MODULE_EXTS = [ ".tsx", ".ts", ".mjs", ".js", ".jsx", ".json",
3030
3217
  });
3031
3218
  t.error ? r.error = t.error : (r.oldDirs.push(...t.removedDirs), r.oldFiles.push(...t.removedFiles));
3032
3219
  } else if (r.isFile) {
3033
- const t = v(e);
3220
+ const t = E(e);
3034
3221
  t.error ? r.error = t.error : r.oldFiles.push(e);
3035
3222
  }
3036
3223
  return r;
@@ -3042,8 +3229,8 @@ const COMMON_DIR_MODULE_EXTS = [ ".tsx", ".ts", ".mjs", ".js", ".jsx", ".json",
3042
3229
  stat: async e => _(e),
3043
3230
  statSync: _,
3044
3231
  tmpDirSync: () => "/.tmp",
3045
- removeFile: async e => v(e),
3046
- removeFileSync: v,
3232
+ removeFile: async e => E(e),
3233
+ removeFileSync: E,
3047
3234
  watchDirectory: (e, t) => {
3048
3235
  e = c(e);
3049
3236
  const r = s.get(e), n = () => {
@@ -3091,8 +3278,8 @@ const COMMON_DIR_MODULE_EXTS = [ ".tsx", ".ts", ".mjs", ".js", ".jsx", ".json",
3091
3278
  };
3092
3279
  },
3093
3280
  watchTimeout: 32,
3094
- writeFile: async (e, t) => E(e, t),
3095
- writeFileSync: E,
3281
+ writeFile: async (e, t) => b(e, t),
3282
+ writeFileSync: b,
3096
3283
  generateContentHash: async (e, t) => {
3097
3284
  const r = await crypto.subtle.digest("SHA-256", (new TextEncoder).encode(e));
3098
3285
  let s = Array.from(new Uint8Array(r)).map((e => e.toString(16).padStart(2, "0"))).join("");
@@ -3163,7 +3350,7 @@ const COMMON_DIR_MODULE_EXTS = [ ".tsx", ".ts", ".mjs", ".js", ".jsx", ".json",
3163
3350
  },
3164
3351
  maxWorkers: u
3165
3352
  };
3166
- })(S, e) : null,
3353
+ })(D, e) : null,
3167
3354
  details: {
3168
3355
  cpuModel: "",
3169
3356
  freemem: () => 0,
@@ -3177,7 +3364,7 @@ const COMMON_DIR_MODULE_EXTS = [ ".tsx", ".ts", ".mjs", ".js", ".jsx", ".json",
3177
3364
  filePaths: []
3178
3365
  })
3179
3366
  };
3180
- return S.resolveModuleId = e => ((e, t, r) => {
3367
+ return D.resolveModuleId = e => ((e, t, r) => {
3181
3368
  const s = ((e, t, r) => ({
3182
3369
  async isFile(s, n) {
3183
3370
  const o = normalizeFsPath(s);
@@ -3229,7 +3416,7 @@ const COMMON_DIR_MODULE_EXTS = [ ".tsx", ".ts", ".mjs", ".js", ".jsx", ".json",
3229
3416
  }
3230
3417
  }));
3231
3418
  }));
3232
- })(S, 0, e), S;
3419
+ })(D, 0, e), D;
3233
3420
  }, createTestingSystem = () => {
3234
3421
  let e = 0, t = 0;
3235
3422
  const r = createSystem();
@@ -3351,7 +3538,7 @@ class E2EElement extends index_cjs.MockHTMLElement {
3351
3538
  this._validate();
3352
3539
  let e = !1;
3353
3540
  try {
3354
- const t = this._elmHandle.executionContext();
3541
+ const t = getPuppeteerExecution(this._elmHandle);
3355
3542
  e = await t.evaluate((e => new Promise((t => {
3356
3543
  window.requestAnimationFrame((() => {
3357
3544
  if (e.isConnected) {
@@ -3400,7 +3587,7 @@ class E2EElement extends index_cjs.MockHTMLElement {
3400
3587
  }
3401
3588
  async getProperty(e) {
3402
3589
  this._validate();
3403
- const t = this._elmHandle.executionContext();
3590
+ const t = getPuppeteerExecution(this._elmHandle);
3404
3591
  return await t.evaluate(((e, t) => e[t]), this._elmHandle, e);
3405
3592
  }
3406
3593
  setProperty(e, t) {
@@ -3557,7 +3744,7 @@ class E2EElement extends index_cjs.MockHTMLElement {
3557
3744
  }
3558
3745
  async e2eRunActions() {
3559
3746
  if (0 === this._queuedActions.length) return;
3560
- const e = this._elmHandle.executionContext(), t = await e.evaluate(((e, t) => e.componentOnReady().then((() => {
3747
+ const e = getPuppeteerExecution(this._elmHandle), t = await e.evaluate(((e, t) => e.componentOnReady().then((() => {
3561
3748
  let r = null;
3562
3749
  return t.forEach((t => {
3563
3750
  if (t.methodName) r = e[t.methodName].apply(e, t.methodArgs); else if (t.setPropertyName) e[t.setPropertyName] = t.setPropertyValue; else if (t.setAttributeName) e.setAttribute(t.setAttributeName, t.setAttributeValue); else if (t.removeAttribute) e.removeAttribute(t.removeAttribute); else if (t.toggleAttributeName) "boolean" == typeof t.toggleAttributeForce ? e.toggleAttribute(t.toggleAttributeName, t.toggleAttributeForce) : e.toggleAttribute(t.toggleAttributeName); else if (t.classAdd) e.classList.add(t.classAdd); else if (t.classRemove) e.classList.remove(t.classRemove); else if (t.classToggle) e.classList.toggle(t.classToggle); else if (t.eventName) {
@@ -3572,7 +3759,7 @@ class E2EElement extends index_cjs.MockHTMLElement {
3572
3759
  return this._queuedActions.length = 0, t;
3573
3760
  }
3574
3761
  async e2eSync() {
3575
- const e = this._elmHandle.executionContext(), {outerHTML: t, shadowRootHTML: r} = await e.evaluate((e => ({
3762
+ const e = getPuppeteerExecution(this._elmHandle), {outerHTML: t, shadowRootHTML: r} = await e.evaluate((e => ({
3576
3763
  outerHTML: e.outerHTML,
3577
3764
  shadowRootHTML: e.shadowRoot ? e.shadowRoot.innerHTML : null
3578
3765
  })), this._elmHandle);