@rindo/core 3.1.0 → 3.2.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/sys/node/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- Rindo Node System v3.1.0 | MIT Licensed | https://rindojs.web.app
2
+ Rindo Node System v3.2.1 | MIT Licensed | https://rindojs.web.app
3
3
  */
4
4
  function _interopDefaultLegacy(e) {
5
5
  return e && "object" == typeof e && "default" in e ? e : {
@@ -1282,7 +1282,7 @@ lockfile = createCommonjsModule((function(e) {
1282
1282
  }
1283
1283
  })), function e(t, r) {
1284
1284
  return R.apply(this, arguments);
1285
- }), z = t.walk = (N = (0, (d || n()).default)((function*(e, t, r = new Set) {
1285
+ }), W = t.walk = (N = (0, (d || n()).default)((function*(e, t, r = new Set) {
1286
1286
  var n, i, o, a;
1287
1287
  let l = [], c = yield ne(e);
1288
1288
  for (r.size && (c = c.filter((function(e) {
@@ -1301,7 +1301,7 @@ lockfile = createCommonjsModule((function(e) {
1301
1301
  basename: c,
1302
1302
  absolute: f,
1303
1303
  mtime: +h.mtime
1304
- }), h.isDirectory() && (l = l.concat(yield z(f, u, r)));
1304
+ }), h.isDirectory() && (l = l.concat(yield W(f, u, r)));
1305
1305
  }
1306
1306
  return l;
1307
1307
  })), function e(t, r) {
@@ -1313,7 +1313,7 @@ lockfile = createCommonjsModule((function(e) {
1313
1313
  })), function e(t) {
1314
1314
  return I.apply(this, arguments);
1315
1315
  });
1316
- let W = (P = (0, (d || n()).default)((function*(e) {
1316
+ let z = (P = (0, (d || n()).default)((function*(e) {
1317
1317
  if (!(yield se(e))) return;
1318
1318
  const t = yield J(e);
1319
1319
  for (let e = 0; e < t.length; ++e) {
@@ -1324,7 +1324,7 @@ lockfile = createCommonjsModule((function(e) {
1324
1324
  return P.apply(this, arguments);
1325
1325
  });
1326
1326
  t.writeFilePreservingEol = (j = (0, (d || n()).default)((function*(e, t) {
1327
- const r = (yield W(e)) || (y || o()).default.EOL;
1327
+ const r = (yield z(e)) || (y || o()).default.EOL;
1328
1328
  "\n" !== r && (t = t.replace(/\n/g, r)), yield ee(e, t);
1329
1329
  })), function e(t, r) {
1330
1330
  return j.apply(this, arguments);
@@ -5651,16 +5651,16 @@ exports.createNodeLogger = e => {
5651
5651
  return createTerminalLogger(t);
5652
5652
  }, exports.createNodeSys = function createNodeSys(e = {}) {
5653
5653
  var t;
5654
- const r = null !== (t = null == e ? void 0 : e.process) && void 0 !== t ? t : global.process, n = new Set, i = [], o = require$$6.cpus(), s = o.length, a = require$$6.platform(), l = path__default.default.join(__dirname, "..", "..", "compiler", "rindo.js"), c = path__default.default.join(__dirname, "..", "..", "dev-server", "index.js"), u = () => {
5654
+ const r = null !== (t = null == e ? void 0 : e.process) && void 0 !== t ? t : global.process, n = null == e ? void 0 : e.logger, i = new Set, o = [], s = require$$6.cpus(), a = s.length, l = require$$6.platform(), c = path__default.default.join(__dirname, "..", "..", "compiler", "rindo.js"), u = path__default.default.join(__dirname, "..", "..", "dev-server", "index.js"), f = () => {
5655
5655
  const e = [];
5656
5656
  let t;
5657
- for (;"function" == typeof (t = i.pop()); ) try {
5657
+ for (;"function" == typeof (t = o.pop()); ) try {
5658
5658
  const n = t();
5659
5659
  (r = n) && ("object" == typeof r || "function" == typeof r) && "function" == typeof r.then && e.push(n);
5660
5660
  } catch (e) {}
5661
5661
  var r;
5662
5662
  return e.length > 0 ? Promise.all(e) : null;
5663
- }, f = {
5663
+ }, h = {
5664
5664
  name: "node",
5665
5665
  version: r.versions.node,
5666
5666
  access: e => new Promise((t => {
@@ -5674,10 +5674,10 @@ exports.createNodeLogger = e => {
5674
5674
  return t;
5675
5675
  },
5676
5676
  addDestroy(e) {
5677
- n.add(e);
5677
+ i.add(e);
5678
5678
  },
5679
5679
  removeDestroy(e) {
5680
- n.delete(e);
5680
+ i.delete(e);
5681
5681
  },
5682
5682
  applyPrerenderGlobalPatch(e) {
5683
5683
  if ("function" != typeof global.fetch) {
@@ -5748,36 +5748,36 @@ exports.createNodeLogger = e => {
5748
5748
  },
5749
5749
  async destroy() {
5750
5750
  const e = [];
5751
- n.forEach((t => {
5751
+ i.forEach((t => {
5752
5752
  try {
5753
5753
  const r = t();
5754
5754
  r && r.then && e.push(r);
5755
5755
  } catch (e) {
5756
5756
  console.error(`node sys destroy: ${e}`);
5757
5757
  }
5758
- })), e.length > 0 && await Promise.all(e), n.clear();
5758
+ })), e.length > 0 && await Promise.all(e), i.clear();
5759
5759
  },
5760
5760
  dynamicImport: e => Promise.resolve(require(e)),
5761
5761
  encodeToBase64: e => Buffer.from(e).toString("base64"),
5762
5762
  ensureDependencies: async () => (console.warn("ensureDependencies will be removed in a future version of Rindo."),
5763
5763
  console.warn("To get the rindoPath, please use getCompilerExecutingPath()."), {
5764
- rindoPath: f.getCompilerExecutingPath(),
5764
+ rindoPath: h.getCompilerExecutingPath(),
5765
5765
  diagnostics: []
5766
5766
  }),
5767
5767
  async ensureResources() {
5768
5768
  console.warn("ensureResources is a no-op, and will be removed in a future version of Rindo");
5769
5769
  },
5770
5770
  exit: async e => {
5771
- await u(), exit(e);
5771
+ await f(), exit(e);
5772
5772
  },
5773
5773
  getCurrentDirectory: () => normalizePath(r.cwd()),
5774
- getCompilerExecutingPath: () => l,
5775
- getDevServerExecutingPath: () => c,
5774
+ getCompilerExecutingPath: () => c,
5775
+ getDevServerExecutingPath: () => u,
5776
5776
  getEnvironmentVar: e => process.env[e],
5777
5777
  getLocalModulePath: () => null,
5778
5778
  getRemoteModuleUrl: () => null,
5779
5779
  glob: asyncGlob,
5780
- hardwareConcurrency: s,
5780
+ hardwareConcurrency: a,
5781
5781
  isSymbolicLink: e => new Promise((t => {
5782
5782
  try {
5783
5783
  fs__default.default.lstat(e, ((e, r) => {
@@ -5790,7 +5790,7 @@ exports.createNodeLogger = e => {
5790
5790
  nextTick: r.nextTick,
5791
5791
  normalizePath,
5792
5792
  onProcessInterrupt: e => {
5793
- i.includes(e) || i.push(e);
5793
+ o.includes(e) || o.push(e);
5794
5794
  },
5795
5795
  platformPath: path__default.default,
5796
5796
  readDir: e => new Promise((t => {
@@ -5936,8 +5936,8 @@ exports.createNodeLogger = e => {
5936
5936
  return t;
5937
5937
  },
5938
5938
  setupCompiler(e) {
5939
- const t = e.ts, r = t.sys.watchDirectory, n = t.sys.watchFile;
5940
- f.watchTimeout = 80, f.events = (() => {
5939
+ const t = e.ts, r = t.sys.watchDirectory, i = t.sys.watchFile;
5940
+ h.watchTimeout = 80, h.events = (() => {
5941
5941
  const e = [], t = t => {
5942
5942
  const r = e.findIndex((e => e.callback === t));
5943
5943
  return r > -1 && (e.splice(r, 1), !0);
@@ -5976,28 +5976,34 @@ exports.createNodeLogger = e => {
5976
5976
  e.length = 0;
5977
5977
  }
5978
5978
  };
5979
- })(), f.watchDirectory = (e, t, n) => {
5980
- const i = r(e, (e => {
5981
- t(normalizePath(e), "fileUpdate");
5982
- }), n), o = () => {
5983
- i.close();
5979
+ })(), h.watchDirectory = (e, t, i) => {
5980
+ null == n || n.debug(`NODE_SYS_DEBUG::watchDir ${e}`);
5981
+ const o = r(e, (r => {
5982
+ null == n || n.debug(`NODE_SYS_DEBUG::watchDir:callback dir=${e} changedPath=${r}`),
5983
+ t(normalizePath(r), "fileUpdate");
5984
+ }), i), s = () => {
5985
+ o.close();
5984
5986
  };
5985
- return f.addDestroy(o), {
5987
+ return h.addDestroy(s), {
5986
5988
  close() {
5987
- f.removeDestroy(o), i.close();
5989
+ h.removeDestroy(s), o.close();
5988
5990
  }
5989
5991
  };
5990
- }, f.watchFile = (e, r) => {
5991
- const i = n(e, ((e, n) => {
5992
- e = normalizePath(e), n === t.FileWatcherEventKind.Created ? (r(e, "fileAdd"), f.events.emit("fileAdd", e)) : n === t.FileWatcherEventKind.Changed ? (r(e, "fileUpdate"),
5993
- f.events.emit("fileUpdate", e)) : n === t.FileWatcherEventKind.Deleted && (r(e, "fileDelete"),
5994
- f.events.emit("fileDelete", e));
5995
- })), o = () => {
5996
- i.close();
5992
+ }, h.watchFile = (e, r) => {
5993
+ null == n || n.debug(`NODE_SYS_DEBUG::watchFile ${e}`);
5994
+ const o = i(e, ((e, n) => {
5995
+ e = normalizePath(e), n === t.FileWatcherEventKind.Created ? (r(e, "fileAdd"), h.events.emit("fileAdd", e)) : n === t.FileWatcherEventKind.Changed ? (r(e, "fileUpdate"),
5996
+ h.events.emit("fileUpdate", e)) : n === t.FileWatcherEventKind.Deleted && (r(e, "fileDelete"),
5997
+ h.events.emit("fileDelete", e));
5998
+ }), 250, {
5999
+ watchFile: t.WatchFileKind.FixedPollingInterval,
6000
+ fallbackPolling: t.PollingWatchKind.FixedInterval
6001
+ }), s = () => {
6002
+ o.close();
5997
6003
  };
5998
- return f.addDestroy(o), {
6004
+ return h.addDestroy(s), {
5999
6005
  close() {
6000
- f.removeDestroy(o), i.close();
6006
+ h.removeDestroy(s), o.close();
6001
6007
  }
6002
6008
  };
6003
6009
  };
@@ -6077,14 +6083,14 @@ exports.createNodeLogger = e => {
6077
6083
  })),
6078
6084
  copy: nodeCopyTasks,
6079
6085
  details: {
6080
- cpuModel: (Array.isArray(o) && o.length > 0 ? o[0] && o[0].model : "") || "",
6086
+ cpuModel: (Array.isArray(s) && s.length > 0 ? s[0] && s[0].model : "") || "",
6081
6087
  freemem: () => require$$6.freemem(),
6082
- platform: "darwin" === a || "linux" === a ? a : "win32" === a ? "windows" : "",
6088
+ platform: "darwin" === l || "linux" === l ? l : "win32" === l ? "windows" : "",
6083
6089
  release: require$$6.release(),
6084
6090
  totalmem: require$$6.totalmem()
6085
6091
  }
6086
- }, h = new NodeResolveModule;
6087
- return f.lazyRequire = new NodeLazyRequire(h, {
6092
+ }, p = new NodeResolveModule;
6093
+ return h.lazyRequire = new NodeLazyRequire(p, {
6088
6094
  "@types/jest": {
6089
6095
  minVersion: "24.9.1",
6090
6096
  recommendedVersion: "27.0.3",
@@ -6112,7 +6118,7 @@ exports.createNodeLogger = e => {
6112
6118
  minVersion: "4.3.1",
6113
6119
  recommendedVersion: "4.3.1"
6114
6120
  }
6115
- }), r.on("SIGINT", u), r.on("exit", u), f;
6121
+ }), r.on("SIGINT", f), r.on("exit", f), h;
6116
6122
  }, exports.setupNodeProcess = function setupNodeProcess(e) {
6117
6123
  e.process.on("unhandledRejection", (t => {
6118
6124
  if (!shouldIgnoreError(t)) {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rindo/core/sys/node",
3
- "version": "3.1.0",
3
+ "version": "3.2.1",
4
4
  "description": "Rindo Node System.",
5
5
  "main": "./index.js",
6
6
  "types": "./index.d.ts",
@@ -1,5 +1,5 @@
1
1
  /*!
2
- Rindo Node System Worker v3.1.0 | MIT Licensed | https://rindojs.web.app
2
+ Rindo Node System Worker v3.2.1 | MIT Licensed | https://rindojs.web.app
3
3
  */
4
4
  function _interopNamespace(e) {
5
5
  if (e && e.__esModule) return e;
package/testing/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- Rindo Testing v3.1.0 | MIT Licensed | https://rindojs.web.app
2
+ Rindo Testing v3.2.1 | MIT Licensed | https://rindojs.web.app
3
3
  */
4
4
  function _lazyRequire(e) {
5
5
  return new Proxy({}, {
@@ -1518,7 +1518,7 @@ const formatComponentRuntimeMembers = (e, t = !0) => ({
1518
1518
  if (!n.includes(t.code) && (i = t.messageText, isIterable(t.next))) for (const r of t.next) i += flattenDiagnosticMessageText(e, r);
1519
1519
  return o && (i = i.replace("type 'RindoConfig'", "Rindo Config"), i = i.replace("Object literal may only specify known properties, but ", ""),
1520
1520
  i = i.replace("Object literal may only specify known properties, and ", "")), i.trim();
1521
- }, isJest27TransformOptions = e => null != e && "object" == typeof e && e.hasOwnProperty("config");
1521
+ }, isOutputTargetDistLazy = e => "dist-lazy" === e.type, isOutputTargetWww = e => "www" === e.type, isJest27TransformOptions = e => null != e && "object" == typeof e && e.hasOwnProperty("config");
1522
1522
 
1523
1523
  let _tsCompilerOptions = null, _tsCompilerOptionsKey = null;
1524
1524
 
@@ -3154,7 +3154,7 @@ const COMMON_DIR_MODULE_EXTS = [ ".tsx", ".ts", ".mjs", ".js", ".jsx", ".json",
3154
3154
  d("/");
3155
3155
  const D = {
3156
3156
  name: "in-memory",
3157
- version: "3.1.0",
3157
+ version: "3.2.1",
3158
3158
  events: a,
3159
3159
  access: async e => u(e),
3160
3160
  accessSync: u,
@@ -3784,7 +3784,7 @@ class E2EElement extends index_cjs.MockHTMLElement {
3784
3784
  }
3785
3785
  }
3786
3786
 
3787
- const env = process.env, isOutputTargetDistLazy = e => e.type === DIST_LAZY, isOutputTargetWww = e => e.type === WWW, DIST_LAZY = "dist-lazy", WWW = "www";
3787
+ const env = process.env;
3788
3788
 
3789
3789
  exports.MockHeaders = MockHeaders, exports.MockRequest = MockRequest, exports.MockResponse = MockResponse,
3790
3790
  exports.createJestPuppeteerEnvironment = function createJestPuppeteerEnvironment() {
@@ -3996,6 +3996,7 @@ exports.createJestPuppeteerEnvironment = function createJestPuppeteerEnvironment
3996
3996
  }), exports.mockLogger = mockLogger, exports.mockModule = (e = {}) => ({
3997
3997
  cmps: [],
3998
3998
  coreRuntimeApis: [],
3999
+ outputTargetCoreRuntimeApis: {},
3999
4000
  collectionName: "",
4000
4001
  dtsFilePath: "",
4001
4002
  excludeFromCollection: !1,
@@ -31,7 +31,7 @@ module.exports = {
31
31
  testPathIgnorePatterns: ['/.cache', '/.rindo', '/.vscode', '/dist', '/node_modules', '/www'],
32
32
  testRegex: '(/__tests__/.*|\\.?(test|spec))\\.' + moduleExtensionRegexp + '$',
33
33
  transform: {
34
- '^.+\\.(ts|tsx|jsx|css)$': path.join(testingDir, 'jest-preprocessor.js'),
34
+ '^.+\\.(ts|tsx|jsx|css|mjs)$': path.join(testingDir, 'jest-preprocessor.js'),
35
35
  },
36
36
  watchPathIgnorePatterns: ['^.+\\.d\\.ts$'],
37
37
  };
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rindo/core/testing",
3
- "version": "3.1.0",
3
+ "version": "3.2.1",
4
4
  "description": "Rindo testing suite.",
5
5
  "main": "./index.js",
6
6
  "types": "./index.d.ts",