@rindo/core 3.2.3 → 3.2.4

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.
Files changed (49) hide show
  1. package/cli/index.cjs +11 -16
  2. package/cli/index.js +11 -16
  3. package/cli/package.json +1 -1
  4. package/compiler/package.json +1 -1
  5. package/compiler/rindo.js +2765 -2560
  6. package/compiler/rindo.min.js +2 -2
  7. package/dev-server/client/index.js +1 -1
  8. package/dev-server/client/package.json +1 -1
  9. package/dev-server/connector.html +2 -2
  10. package/dev-server/index.js +1 -1
  11. package/dev-server/package.json +1 -1
  12. package/dev-server/server-process.js +2 -2
  13. package/dev-server/ws.js +1 -1
  14. package/internal/app-data/package.json +1 -1
  15. package/internal/client/css-shim.js +1 -1
  16. package/internal/client/dom.js +1 -1
  17. package/internal/client/index.js +89 -38
  18. package/internal/client/package.json +1 -1
  19. package/internal/client/patch-browser.js +1 -1
  20. package/internal/client/patch-esm.js +1 -1
  21. package/internal/client/shadow-css.js +1 -1
  22. package/internal/hydrate/index.js +34 -28
  23. package/internal/hydrate/package.json +1 -1
  24. package/internal/hydrate/shadow-css.js +1 -2
  25. package/internal/package.json +1 -1
  26. package/internal/rindo-private.d.ts +14 -3
  27. package/internal/rindo-public-compiler.d.ts +11 -0
  28. package/internal/rindo-public-runtime.d.ts +1 -0
  29. package/internal/testing/index.js +19 -13
  30. package/internal/testing/package.json +1 -1
  31. package/internal/testing/shadow-css.js +1 -2
  32. package/mock-doc/index.cjs +2 -2
  33. package/mock-doc/index.js +2 -2
  34. package/mock-doc/package.json +1 -1
  35. package/package.json +7 -7
  36. package/screenshot/package.json +1 -1
  37. package/sys/node/autoprefixer.js +2 -2
  38. package/sys/node/glob.js +1 -1
  39. package/sys/node/graceful-fs.js +1 -1
  40. package/sys/node/index.js +290 -283
  41. package/sys/node/node-fetch.js +1 -4
  42. package/sys/node/package.json +1 -1
  43. package/sys/node/worker.js +1 -1
  44. package/testing/index.js +46 -24
  45. package/testing/jest/jest-setup-test-framework.d.ts +8 -0
  46. package/testing/package.json +1 -1
  47. package/testing/reset-build-conditionals.d.ts +10 -0
  48. package/testing/spec-page.d.ts +5 -0
  49. package/sys/node/713.node-fetch.js +0 -452
package/cli/index.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- Rindo CLI (CommonJS) v3.2.3 | MIT Licensed | https://rindojs.web.app
2
+ Rindo CLI (CommonJS) v3.2.4 | MIT Licensed | https://rindojs.web.app
3
3
  */
4
4
  'use strict';
5
5
 
@@ -1965,6 +1965,7 @@ const taskDocs = async (coreCompiler, config) => {
1965
1965
  * @param coreCompiler the CoreCompiler we're using currently, here we're
1966
1966
  * mainly accessing the `path` module
1967
1967
  * @param config the user-supplied config, which we need here to access `.sys`.
1968
+ * @returns a void promise
1968
1969
  */
1969
1970
  const taskGenerate = async (coreCompiler, config) => {
1970
1971
  if (!IS_NODE_ENV) {
@@ -2356,6 +2357,7 @@ const taskServe = async (config) => {
2356
2357
  /**
2357
2358
  * Entrypoint for any Rindo tests
2358
2359
  * @param config a validated Rindo configuration entity
2360
+ * @returns a void promise
2359
2361
  */
2360
2362
  const taskTest = async (config) => {
2361
2363
  if (!IS_NODE_ENV) {
@@ -2469,29 +2471,22 @@ const run = async (init) => {
2469
2471
  };
2470
2472
  /**
2471
2473
  * Run a specified task
2474
+ *
2472
2475
  * @param coreCompiler an instance of a minimal, bootstrap compiler for running the specified task
2473
2476
  * @param config a configuration for the Rindo project to apply to the task run
2474
2477
  * @param task the task to run
2475
2478
  * @param sys the {@link CompilerSystem} for interacting with the operating system
2476
2479
  * @public
2480
+ * @returns a void promise
2477
2481
  */
2478
2482
  const runTask = async (coreCompiler, config, task, sys) => {
2479
- var _a, _b, _c, _d, _e, _f, _g, _h;
2483
+ var _a, _b, _c;
2480
2484
  const logger = (_a = config.logger) !== null && _a !== void 0 ? _a : createLogger();
2481
- const rootDir = (_b = config.rootDir) !== null && _b !== void 0 ? _b : '/';
2482
- const configSys = (_c = sys !== null && sys !== void 0 ? sys : config.sys) !== null && _c !== void 0 ? _c : coreCompiler.createSystem({ logger });
2483
- const strictConfig = {
2484
- ...config,
2485
- flags: createConfigFlags((_d = config.flags) !== null && _d !== void 0 ? _d : { task }),
2486
- hydratedFlag: (_e = config.hydratedFlag) !== null && _e !== void 0 ? _e : null,
2487
- logger,
2488
- outputTargets: (_f = config.outputTargets) !== null && _f !== void 0 ? _f : [],
2489
- packageJsonFilePath: configSys.platformPath.join(rootDir, 'package.json'),
2490
- rootDir,
2491
- sys: configSys,
2492
- testing: (_g = config.testing) !== null && _g !== void 0 ? _g : {},
2493
- transformAliasedImportPaths: (_h = config.transformAliasedImportPaths) !== null && _h !== void 0 ? _h : false,
2494
- };
2485
+ const flags = createConfigFlags((_b = config.flags) !== null && _b !== void 0 ? _b : { task });
2486
+ config.logger = logger;
2487
+ config.flags = flags;
2488
+ config.sys = (_c = sys !== null && sys !== void 0 ? sys : config.sys) !== null && _c !== void 0 ? _c : coreCompiler.createSystem({ logger });
2489
+ const strictConfig = coreCompiler.validateConfig(config, {}).config;
2495
2490
  switch (task) {
2496
2491
  case 'build':
2497
2492
  await taskBuild(coreCompiler, strictConfig);
package/cli/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- Rindo CLI v3.2.3 | MIT Licensed | https://rindojs.web.app
2
+ Rindo CLI v3.2.4 | MIT Licensed | https://rindojs.web.app
3
3
  */
4
4
  /**
5
5
  * Default style mode id
@@ -1941,6 +1941,7 @@ const taskDocs = async (coreCompiler, config) => {
1941
1941
  * @param coreCompiler the CoreCompiler we're using currently, here we're
1942
1942
  * mainly accessing the `path` module
1943
1943
  * @param config the user-supplied config, which we need here to access `.sys`.
1944
+ * @returns a void promise
1944
1945
  */
1945
1946
  const taskGenerate = async (coreCompiler, config) => {
1946
1947
  if (!IS_NODE_ENV) {
@@ -2332,6 +2333,7 @@ const taskServe = async (config) => {
2332
2333
  /**
2333
2334
  * Entrypoint for any Rindo tests
2334
2335
  * @param config a validated Rindo configuration entity
2336
+ * @returns a void promise
2335
2337
  */
2336
2338
  const taskTest = async (config) => {
2337
2339
  if (!IS_NODE_ENV) {
@@ -2445,29 +2447,22 @@ const run = async (init) => {
2445
2447
  };
2446
2448
  /**
2447
2449
  * Run a specified task
2450
+ *
2448
2451
  * @param coreCompiler an instance of a minimal, bootstrap compiler for running the specified task
2449
2452
  * @param config a configuration for the Rindo project to apply to the task run
2450
2453
  * @param task the task to run
2451
2454
  * @param sys the {@link CompilerSystem} for interacting with the operating system
2452
2455
  * @public
2456
+ * @returns a void promise
2453
2457
  */
2454
2458
  const runTask = async (coreCompiler, config, task, sys) => {
2455
- var _a, _b, _c, _d, _e, _f, _g, _h;
2459
+ var _a, _b, _c;
2456
2460
  const logger = (_a = config.logger) !== null && _a !== void 0 ? _a : createLogger();
2457
- const rootDir = (_b = config.rootDir) !== null && _b !== void 0 ? _b : '/';
2458
- const configSys = (_c = sys !== null && sys !== void 0 ? sys : config.sys) !== null && _c !== void 0 ? _c : coreCompiler.createSystem({ logger });
2459
- const strictConfig = {
2460
- ...config,
2461
- flags: createConfigFlags((_d = config.flags) !== null && _d !== void 0 ? _d : { task }),
2462
- hydratedFlag: (_e = config.hydratedFlag) !== null && _e !== void 0 ? _e : null,
2463
- logger,
2464
- outputTargets: (_f = config.outputTargets) !== null && _f !== void 0 ? _f : [],
2465
- packageJsonFilePath: configSys.platformPath.join(rootDir, 'package.json'),
2466
- rootDir,
2467
- sys: configSys,
2468
- testing: (_g = config.testing) !== null && _g !== void 0 ? _g : {},
2469
- transformAliasedImportPaths: (_h = config.transformAliasedImportPaths) !== null && _h !== void 0 ? _h : false,
2470
- };
2461
+ const flags = createConfigFlags((_b = config.flags) !== null && _b !== void 0 ? _b : { task });
2462
+ config.logger = logger;
2463
+ config.flags = flags;
2464
+ config.sys = (_c = sys !== null && sys !== void 0 ? sys : config.sys) !== null && _c !== void 0 ? _c : coreCompiler.createSystem({ logger });
2465
+ const strictConfig = coreCompiler.validateConfig(config, {}).config;
2471
2466
  switch (task) {
2472
2467
  case 'build':
2473
2468
  await taskBuild(coreCompiler, strictConfig);
package/cli/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rindo/core/cli",
3
- "version": "3.2.3",
3
+ "version": "3.2.4",
4
4
  "description": "Rindo CLI.",
5
5
  "main": "./index.cjs",
6
6
  "module": "./index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rindo/core/compiler",
3
- "version": "3.2.3",
3
+ "version": "3.2.4",
4
4
  "description": "Rindo Compiler.",
5
5
  "main": "./rindo.js",
6
6
  "types": "./rindo.d.ts",