testeranto 0.62.0 → 0.73.0

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 (186) hide show
  1. package/README.md +38 -26
  2. package/dist/cjs-shim.js +2 -2
  3. package/dist/common/Node.js +14 -51
  4. package/dist/common/PM/index.js +71 -0
  5. package/dist/common/PM/main.js +361 -0
  6. package/dist/common/PM/node.js +176 -0
  7. package/dist/common/PM/web.js +174 -0
  8. package/dist/common/Project.js +121 -266
  9. package/dist/common/Puppeteer.js +109 -0
  10. package/dist/common/Reporter.js +119 -0
  11. package/dist/common/Scheduler.js +1 -0
  12. package/dist/common/SubPackages/puppeteer.js +3 -1
  13. package/dist/common/SubPackages/react-dom/component/web.js +98 -45
  14. package/dist/common/SubPackages/react-dom/jsx/web.js +15 -7
  15. package/dist/common/SubPackages/react-test-renderer/MemoExoticComponent/node.js +1 -1
  16. package/dist/common/SubPackages/react-test-renderer/component/index.js +0 -1
  17. package/dist/common/SubPackages/react-test-renderer/fc/web.js +1 -1
  18. package/dist/common/SubPackages/react-test-renderer/jsx/index.js +1 -3
  19. package/dist/common/SubPackages/react-test-renderer/jsx/web.js +1 -1
  20. package/dist/common/SubPackages/react-test-renderer/jsx-promised/index.js +1 -1
  21. package/dist/common/Types.js +2 -32
  22. package/dist/common/Web.js +25 -37
  23. package/dist/common/esbuildConfigs/index.js +5 -5
  24. package/dist/common/esbuildConfigs/node.js +17 -15
  25. package/dist/common/esbuildConfigs/report.js +12 -47
  26. package/dist/common/esbuildConfigs/tests.js +0 -1
  27. package/dist/common/esbuildConfigs/web.js +17 -12
  28. package/dist/common/lib/abstractBase.js +190 -35
  29. package/dist/common/lib/basebuilder.js +56 -29
  30. package/dist/common/lib/classBuilder.js +8 -5
  31. package/dist/common/lib/core.js +42 -17
  32. package/dist/common/lib/index.js +11 -8
  33. package/dist/common/lib/types.js +2 -0
  34. package/dist/common/preload.js +14 -28
  35. package/dist/common/puppeteerConfiger.js +24 -0
  36. package/dist/common/tsconfig.common.tsbuildinfo +1 -1
  37. package/dist/module/Node.js +14 -51
  38. package/dist/module/PM/index.js +67 -0
  39. package/dist/module/PM/main.js +331 -0
  40. package/dist/module/PM/node.js +168 -0
  41. package/dist/module/PM/web.js +167 -0
  42. package/dist/module/Project.js +122 -267
  43. package/dist/module/Puppeteer.js +104 -0
  44. package/dist/module/Reporter.js +114 -0
  45. package/dist/module/Scheduler.js +1 -0
  46. package/dist/module/SubPackages/puppeteer.js +3 -1
  47. package/dist/module/SubPackages/react/jsx/node.js +1 -1
  48. package/dist/module/SubPackages/react/jsx/web.js +1 -1
  49. package/dist/module/SubPackages/react-dom/component/node.js +2 -2
  50. package/dist/module/SubPackages/react-dom/component/web.js +98 -45
  51. package/dist/module/SubPackages/react-dom/jsx/web.js +17 -9
  52. package/dist/module/SubPackages/react-test-renderer/MemoExoticComponent/node.js +1 -1
  53. package/dist/module/SubPackages/react-test-renderer/component/index.js +0 -1
  54. package/dist/module/SubPackages/react-test-renderer/fc/web.js +1 -1
  55. package/dist/module/SubPackages/react-test-renderer/jsx/index.js +1 -3
  56. package/dist/module/SubPackages/react-test-renderer/jsx/web.js +1 -1
  57. package/dist/module/SubPackages/react-test-renderer/jsx-promised/index.js +1 -1
  58. package/dist/module/Types.js +3 -30
  59. package/dist/module/Web.js +26 -38
  60. package/dist/module/esbuildConfigs/index.js +5 -5
  61. package/dist/module/esbuildConfigs/node.js +17 -15
  62. package/dist/module/esbuildConfigs/report.js +11 -48
  63. package/dist/module/esbuildConfigs/tests.js +0 -1
  64. package/dist/module/esbuildConfigs/web.js +17 -12
  65. package/dist/module/lib/abstractBase.js +190 -35
  66. package/dist/module/lib/basebuilder.js +56 -29
  67. package/dist/module/lib/classBuilder.js +8 -5
  68. package/dist/module/lib/core.js +44 -19
  69. package/dist/module/lib/index.js +11 -8
  70. package/dist/module/preload.js +15 -27
  71. package/dist/module/puppeteerConfiger.js +19 -0
  72. package/dist/module/tsconfig.module.tsbuildinfo +1 -1
  73. package/dist/prebuild/Report.css +1616 -584
  74. package/dist/prebuild/Report.js +2635 -2506
  75. package/dist/types/Node.d.ts +3 -2
  76. package/dist/types/PM/index.d.ts +19 -0
  77. package/dist/types/PM/main.d.ts +28 -0
  78. package/dist/types/PM/node.d.ts +26 -0
  79. package/dist/types/PM/web.d.ts +24 -0
  80. package/dist/types/Project.d.ts +1 -2
  81. package/dist/types/Puppeteer.d.ts +1 -0
  82. package/dist/types/Reporter.d.ts +1 -0
  83. package/dist/types/Scheduler.d.ts +0 -0
  84. package/dist/types/SubPackages/puppeteer.d.ts +3 -3
  85. package/dist/types/SubPackages/react/component/node.d.ts +1 -1
  86. package/dist/types/SubPackages/react/component/web.d.ts +1 -1
  87. package/dist/types/SubPackages/react/jsx/index.d.ts +1 -1
  88. package/dist/types/SubPackages/react/jsx/node.d.ts +1 -1
  89. package/dist/types/SubPackages/react/jsx/web.d.ts +2 -2
  90. package/dist/types/SubPackages/react-dom/component/node.d.ts +2 -2
  91. package/dist/types/SubPackages/react-dom/component/web.d.ts +1 -1
  92. package/dist/types/SubPackages/react-dom/jsx/node.d.ts +1 -1
  93. package/dist/types/SubPackages/react-dom/jsx/web.d.ts +1 -1
  94. package/dist/types/SubPackages/react-test-renderer/MemoExoticComponent/node.d.ts +1 -1
  95. package/dist/types/SubPackages/react-test-renderer/component/index.d.ts +1 -1
  96. package/dist/types/SubPackages/react-test-renderer/component/node.d.ts +1 -1
  97. package/dist/types/SubPackages/react-test-renderer/component/web.d.ts +1 -1
  98. package/dist/types/SubPackages/react-test-renderer/fc/node.d.ts +1 -1
  99. package/dist/types/SubPackages/react-test-renderer/fc/web.d.ts +1 -1
  100. package/dist/types/SubPackages/react-test-renderer/jsx/node.d.ts +1 -1
  101. package/dist/types/SubPackages/react-test-renderer/jsx/web.d.ts +3 -3
  102. package/dist/types/SubPackages/react-test-renderer/jsx-promised/index.d.ts +1 -1
  103. package/dist/types/SubPackages/react-test-renderer/jsx-promised/node.d.ts +1 -1
  104. package/dist/types/SubPackages/react-test-renderer/jsx-promised/web.d.ts +1 -1
  105. package/dist/types/Types.d.ts +19 -100
  106. package/dist/types/Web.d.ts +3 -2
  107. package/dist/types/esbuildConfigs/features.d.ts +1 -1
  108. package/dist/types/esbuildConfigs/index.d.ts +1 -1
  109. package/dist/types/esbuildConfigs/node.d.ts +1 -1
  110. package/dist/types/esbuildConfigs/report.d.ts +4 -0
  111. package/dist/types/esbuildConfigs/tests.d.ts +1 -1
  112. package/dist/types/esbuildConfigs/web.d.ts +1 -1
  113. package/dist/types/lib/abstractBase.d.ts +26 -24
  114. package/dist/types/lib/basebuilder.d.ts +10 -7
  115. package/dist/types/lib/classBuilder.d.ts +4 -3
  116. package/dist/types/lib/core.d.ts +5 -4
  117. package/dist/types/lib/index.d.ts +7 -5
  118. package/dist/types/lib/types.d.ts +62 -0
  119. package/dist/types/preload.d.ts +0 -1
  120. package/dist/types/puppeteerConfiger.d.ts +4 -0
  121. package/dist/types/tsconfig.types.tsbuildinfo +1 -1
  122. package/package.json +6 -7
  123. package/src/Node.ts +30 -85
  124. package/src/PM/index.ts +102 -0
  125. package/src/PM/main.ts +420 -0
  126. package/src/PM/node.ts +515 -0
  127. package/src/PM/web.ts +497 -0
  128. package/src/Project.ts +183 -619
  129. package/src/Puppeteer.ts +131 -0
  130. package/src/Report.tsx +158 -44
  131. package/src/Reporter.ts +134 -0
  132. package/src/Scheduler.ts +0 -0
  133. package/src/SubPackages/puppeteer.ts +19 -14
  134. package/src/SubPackages/react/component/node.ts +20 -32
  135. package/src/SubPackages/react/component/web.ts +20 -30
  136. package/src/SubPackages/react/jsx/index.ts +13 -24
  137. package/src/SubPackages/react/jsx/node.ts +5 -8
  138. package/src/SubPackages/react/jsx/web.ts +10 -8
  139. package/src/SubPackages/react-dom/component/node.ts +17 -23
  140. package/src/SubPackages/react-dom/component/web.ts +134 -95
  141. package/src/SubPackages/react-dom/jsx/web.ts +41 -48
  142. package/src/SubPackages/react-test-renderer/MemoExoticComponent/node.ts +27 -37
  143. package/src/SubPackages/react-test-renderer/component/index.ts +16 -30
  144. package/src/SubPackages/react-test-renderer/component/node.ts +5 -11
  145. package/src/SubPackages/react-test-renderer/component/web.ts +5 -11
  146. package/src/SubPackages/react-test-renderer/fc/node.ts +36 -50
  147. package/src/SubPackages/react-test-renderer/fc/web.ts +37 -50
  148. package/src/SubPackages/react-test-renderer/jsx/index.ts +15 -21
  149. package/src/SubPackages/react-test-renderer/jsx/node.ts +6 -10
  150. package/src/SubPackages/react-test-renderer/jsx/web.ts +7 -7
  151. package/src/SubPackages/react-test-renderer/jsx-promised/index.ts +13 -16
  152. package/src/Types.ts +73 -307
  153. package/src/Web.ts +40 -81
  154. package/src/cjs-shim.js +2 -2
  155. package/src/esbuildConfigs/features.ts +3 -4
  156. package/src/esbuildConfigs/index.ts +8 -8
  157. package/src/esbuildConfigs/node.ts +21 -20
  158. package/src/esbuildConfigs/report.ts +15 -51
  159. package/src/esbuildConfigs/tests.ts +3 -9
  160. package/src/esbuildConfigs/web.ts +22 -20
  161. package/src/lib/abstractBase.ts +312 -164
  162. package/src/lib/basebuilder.ts +123 -127
  163. package/src/lib/classBuilder.ts +30 -48
  164. package/src/lib/core.ts +115 -84
  165. package/src/lib/index.ts +58 -56
  166. package/src/lib/types.ts +197 -0
  167. package/src/preload.ts +14 -30
  168. package/src/puppeteerConfiger.ts +26 -0
  169. package/src/web.html.ts +1 -1
  170. package/dist/common/NodeWriter.js +0 -56
  171. package/dist/common/electron.js +0 -196
  172. package/dist/common/lib/browser.js +0 -26
  173. package/dist/common/nodeWriterElectron.js +0 -55
  174. package/dist/module/NodeWriter.js +0 -50
  175. package/dist/module/electron.js +0 -191
  176. package/dist/module/lib/browser.js +0 -22
  177. package/dist/module/nodeWriterElectron.js +0 -52
  178. package/dist/types/NodeWriter.d.ts +0 -2
  179. package/dist/types/lib/browser.d.ts +0 -6
  180. package/dist/types/nodeWriterElectron.d.ts +0 -2
  181. package/src/NodeWriter.ts +0 -69
  182. package/src/electron.ts +0 -250
  183. package/src/lib/browser.ts +0 -34
  184. package/src/nodeWriterElectron.ts +0 -71
  185. package/yarn-error.log +0 -3144
  186. /package/dist/{types/electron.d.ts → module/lib/types.js} +0 -0
@@ -1,12 +1,8 @@
1
1
  import { BuildOptions } from "esbuild";
2
2
 
3
- import { IBaseConfig, IJsonConfig } from "../Types";
3
+ import { IBaseConfig } from "../lib/types";
4
4
 
5
5
  import baseEsBuildConfig from "./index.js";
6
- import { jsonc } from "jsonc";
7
- import fs from "fs"
8
-
9
- // const jsonConfig = jsonc.parse((await fs.readFileSync("./testeranto.json")).toString()) as IJsonConfig;
10
6
 
11
7
  export default (
12
8
  config: IBaseConfig,
@@ -15,45 +11,50 @@ export default (
15
11
  return {
16
12
  ...baseEsBuildConfig(config),
17
13
 
14
+ splitting: true,
15
+
18
16
  outdir: config.outdir + "/node",
19
17
 
20
18
  inject: [`./node_modules/testeranto/dist/cjs-shim.js`],
21
19
 
22
20
  supported: {
23
- "dynamic-import": true
21
+ "dynamic-import": true,
24
22
  },
25
23
 
26
24
  define: {
27
- "process.env.FLUENTFFMPEG_COV": "0"
25
+ "process.env.FLUENTFFMPEG_COV": "0",
28
26
  },
29
27
  absWorkingDir: process.cwd(),
30
28
  banner: {
31
- js: `import { createRequire } from 'module';const require = createRequire(import.meta.url);`
29
+ js: `import { createRequire } from 'module';const require = createRequire(import.meta.url);`,
32
30
  },
33
31
  platform: "node",
34
32
 
35
33
  external: [
36
- "testeranto.json",
37
- "features.test.js",
38
- "react",
39
- "events",
34
+ // "testeranto.json",
35
+ // "features.test.js",
36
+ // "react",
37
+ // "events",
40
38
  // "ganache"
41
- ...config.externals
39
+ ...config.externals,
42
40
  ],
43
41
 
44
42
  entryPoints: [...entryPoints],
45
43
  plugins: [
46
44
  ...(config.nodePlugins || []),
47
45
  {
48
- name: 'rebuild-notify',
46
+ name: "rebuild-notify",
49
47
  setup(build) {
50
- build.onEnd(result => {
48
+ build.onEnd((result) => {
51
49
  console.log(`node build ended with ${result.errors.length} errors`);
52
- console.log(result)
53
- result.errors.length !== 0 && process.exit(-1);
54
- })
55
- }
50
+ if (result.errors.length > 0) {
51
+ console.log(result);
52
+ }
53
+ // console.log(result);
54
+ // result.errors.length !== 0 && process.exit(-1);
55
+ });
56
+ },
56
57
  },
57
58
  ],
58
59
  };
59
- }
60
+ };
@@ -1,51 +1,15 @@
1
- // import { jsonc } from "jsonc";
2
-
3
- // import { IBaseConfig, IJsonConfig } from "../Types";
4
-
5
- // import baseEsBuildConfig from "./index.js";
6
-
7
- // import fs from "fs"
8
- // import { BuildOptions } from "esbuild";
9
- // // import { CssModulesPlugin } from 'esbuild-css-modules-plugin';
10
- // const jsonConfig = jsonc.parse((await fs.readFileSync("./testeranto.json")).toString()) as IJsonConfig;
11
-
12
- // export default (config: IBaseConfig): BuildOptions => {
13
- // return {
14
- // bundle: true,
15
- // entryPoints: ["./node_modules/testeranto/dist/module/report.js"],
16
- // minify: config.minify === true,
17
- // outbase: config.outbase,
18
- // write: true,
19
- // outfile: `${jsonConfig.outdir}/report.js`,
20
- // external: [
21
- // "tests.json",
22
- // "features.test.js"
23
- // ],
24
- // // plugins: [
25
- // // CssModulesPlugin({
26
- // // // @see https://github.com/indooorsman/esbuild-css-modules-plugin/blob/main/index.d.ts for more details
27
- // // force: true,
28
- // // emitDeclarationFile: true,
29
- // // localsConvention: 'camelCaseOnly',
30
- // // namedExports: true,
31
- // // inject: false
32
- // // })
33
- // // ]
34
- // }
35
- // // return {
36
- // // bundle: true,
37
- // // entryPoints: [
38
- // // "./node_modules/testeranto/dist/module/Report.js",
39
- // // jsonConfig.features
40
- // // ],
41
- // // minify: config.minify === true,
42
- // // outbase: ".",
43
- // // outdir: 'docs',
44
- // // write: true,
45
- // // // outfile: `${jsonConfig.outdir}/Report.js`,
46
- // // external: [
47
- // // "features.test.js",
48
- // // "testeranto.json"
49
- // // ]
50
- // // }
51
- // }
1
+ import { BuildOptions } from "esbuild";
2
+
3
+ import { IBaseConfig } from "../lib/types";
4
+
5
+ export default (config: IBaseConfig): BuildOptions => {
6
+ return {
7
+ bundle: true,
8
+ entryPoints: ["./node_modules/testeranto/dist/module/report.js"],
9
+ minify: config.minify === true,
10
+ outbase: config.outbase,
11
+ write: true,
12
+ outfile: `${config.outdir}/report.js`,
13
+ external: ["tests.json", "features.test.js"],
14
+ };
15
+ };
@@ -1,11 +1,5 @@
1
- import { jsonc } from "jsonc";
2
-
3
- import { IBaseConfig, IJsonConfig } from "../Types";
4
-
5
- import fs from "fs"
6
1
  import { BuildOptions } from "esbuild";
7
-
8
- // const jsonConfig = jsonc.parse((await fs.readFileSync("./testeranto.json")).toString()) as IJsonConfig;
2
+ import { IBaseConfig } from "../lib/types";
9
3
 
10
4
  export default (config: IBaseConfig): BuildOptions => {
11
5
  return {
@@ -16,5 +10,5 @@ export default (config: IBaseConfig): BuildOptions => {
16
10
  write: true,
17
11
  outfile: `${config.outdir}/tests.test.js`,
18
12
  // external: ["graphology"]
19
- }
20
- }
13
+ };
14
+ };
@@ -1,40 +1,35 @@
1
1
  import { BuildOptions } from "esbuild";
2
2
  import path from "path";
3
3
 
4
- import { IBaseConfig, IJsonConfig } from "../Types";
4
+ import { IBaseConfig } from "../lib/types.js";
5
5
 
6
6
  import baseEsBuildConfig from "./index.js";
7
- import { jsonc } from "jsonc";
8
- import fs from "fs"
9
-
10
- // const jsonConfig = jsonc.parse((await fs.readFileSync("./testeranto.json")).toString()) as IJsonConfig;
11
7
 
12
8
  export default (
13
9
  config: IBaseConfig,
14
10
  entryPoints: Set<string> | string[]
15
11
  ): BuildOptions => {
16
12
  return {
17
-
18
13
  ...baseEsBuildConfig(config),
19
14
 
20
- // inject: ['./node_modules/testeranto/dist/cjs-shim.js'],
15
+ // inject: ["./node_modules/testeranto/dist/cjs-shim.js"],
21
16
  // banner: {
22
- // js: `import { createRequire } from 'module';const require = createRequire(import.meta.url);`
17
+ // js: `import { createRequire } from 'module';const require = createRequire(import.meta.url);`,
23
18
  // },
24
19
 
20
+ // splitting: true,
21
+
25
22
  outdir: config.outdir + "/web",
26
23
 
27
24
  alias: {
28
- react: path.resolve("./node_modules/react")
25
+ react: path.resolve("./node_modules/react"),
29
26
  },
30
27
 
31
28
  external: [
32
29
  "testeranto.json",
33
30
  "features.test.ts",
34
- // "url",
35
-
31
+ // "url",
36
32
  "react",
37
- "electron",
38
33
 
39
34
  "path",
40
35
  "fs",
@@ -49,7 +44,11 @@ export default (
49
44
  "readline",
50
45
  "zlib",
51
46
  "crypto",
52
- "https"
47
+ "https",
48
+
49
+ "util",
50
+ "process",
51
+ "dns",
53
52
  ],
54
53
 
55
54
  platform: "browser",
@@ -59,15 +58,18 @@ export default (
59
58
  plugins: [
60
59
  ...(config.webPlugins || []),
61
60
  {
62
- name: 'rebuild-notify',
61
+ name: "rebuild-notify",
63
62
  setup(build) {
64
- build.onEnd(result => {
63
+ build.onEnd((result) => {
65
64
  console.log(`web build ended with ${result.errors.length} errors`);
66
- console.log(result)
67
- result.errors.length !== 0 && process.exit(-1);
68
- })
69
- }
65
+ if (result.errors.length > 0) {
66
+ console.log(result);
67
+ }
68
+ // console.log(result);
69
+ // result.errors.length !== 0 && process.exit(-1);
70
+ });
71
+ },
70
72
  },
71
73
  ],
72
74
  };
73
- }
75
+ };