testeranto 0.110.0 → 0.111.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 (176) hide show
  1. package/package.json +1 -1
  2. package/src/PM/main.ts +418 -92
  3. package/src/ReportClient.tsx +38 -30
  4. package/src/run.ts +4 -371
  5. package/tsc.log +8 -6
  6. package/dist/common/Init.js +0 -68
  7. package/dist/common/Node.js +0 -27
  8. package/dist/common/PM/index.js +0 -7
  9. package/dist/common/PM/main.js +0 -984
  10. package/dist/common/PM/node.js +0 -128
  11. package/dist/common/PM/web.js +0 -121
  12. package/dist/common/ReportServer.js +0 -22
  13. package/dist/common/SubPackages/react/component/node.js +0 -19
  14. package/dist/common/SubPackages/react/component/web.js +0 -19
  15. package/dist/common/SubPackages/react/jsx/index.js +0 -21
  16. package/dist/common/SubPackages/react/jsx/node.js +0 -10
  17. package/dist/common/SubPackages/react/jsx/web.js +0 -10
  18. package/dist/common/SubPackages/react-dom/component/node.js +0 -88
  19. package/dist/common/SubPackages/react-dom/component/web.js +0 -67
  20. package/dist/common/SubPackages/react-dom/jsx/index.js +0 -2
  21. package/dist/common/SubPackages/react-dom/jsx/node.js +0 -39
  22. package/dist/common/SubPackages/react-dom/jsx/web.js +0 -128
  23. package/dist/common/SubPackages/react-test-renderer/MemoExoticComponent/node.js +0 -54
  24. package/dist/common/SubPackages/react-test-renderer/component/index.js +0 -2
  25. package/dist/common/SubPackages/react-test-renderer/component/interface.js +0 -70
  26. package/dist/common/SubPackages/react-test-renderer/component/node.js +0 -8
  27. package/dist/common/SubPackages/react-test-renderer/component/web.js +0 -8
  28. package/dist/common/SubPackages/react-test-renderer/fc/node.js +0 -60
  29. package/dist/common/SubPackages/react-test-renderer/fc/web.js +0 -60
  30. package/dist/common/SubPackages/react-test-renderer/jsx/index.js +0 -67
  31. package/dist/common/SubPackages/react-test-renderer/jsx/node.js +0 -10
  32. package/dist/common/SubPackages/react-test-renderer/jsx/web.js +0 -10
  33. package/dist/common/SubPackages/react-test-renderer/jsx-promised/index.js +0 -52
  34. package/dist/common/SubPackages/react-test-renderer/jsx-promised/node.js +0 -10
  35. package/dist/common/SubPackages/react-test-renderer/jsx-promised/web.js +0 -10
  36. package/dist/common/Types.js +0 -2
  37. package/dist/common/Web.js +0 -49
  38. package/dist/common/build.js +0 -222
  39. package/dist/common/defaultConfig.js +0 -20
  40. package/dist/common/esbuildConfigs/eslint-formatter-testeranto.js +0 -6
  41. package/dist/common/esbuildConfigs/featuresPlugin.js +0 -39
  42. package/dist/common/esbuildConfigs/index.js +0 -21
  43. package/dist/common/esbuildConfigs/inputFilesPlugin.js +0 -27
  44. package/dist/common/esbuildConfigs/node.js +0 -37
  45. package/dist/common/esbuildConfigs/web.js +0 -50
  46. package/dist/common/init-docs.js +0 -53
  47. package/dist/common/lib/abstractBase.js +0 -329
  48. package/dist/common/lib/basebuilder.js +0 -98
  49. package/dist/common/lib/classBuilder.js +0 -40
  50. package/dist/common/lib/core.js +0 -117
  51. package/dist/common/lib/index.js +0 -21
  52. package/dist/common/lib/types.js +0 -2
  53. package/dist/common/package.json +0 -3
  54. package/dist/common/puppeteerConfiger.js +0 -24
  55. package/dist/common/run.js +0 -297
  56. package/dist/common/tsconfig.common.tsbuildinfo +0 -1
  57. package/dist/common/utils.js +0 -43
  58. package/dist/common/web.html.js +0 -22
  59. package/dist/module/Footer.js +0 -4
  60. package/dist/module/Init.js +0 -63
  61. package/dist/module/Node.js +0 -20
  62. package/dist/module/PM/index.js +0 -3
  63. package/dist/module/PM/main.js +0 -944
  64. package/dist/module/PM/node.js +0 -121
  65. package/dist/module/PM/web.js +0 -117
  66. package/dist/module/ReportClient.js +0 -97
  67. package/dist/module/ReportServer.js +0 -17
  68. package/dist/module/SubPackages/react/component/node.js +0 -14
  69. package/dist/module/SubPackages/react/component/web.js +0 -14
  70. package/dist/module/SubPackages/react/jsx/index.js +0 -15
  71. package/dist/module/SubPackages/react/jsx/node.js +0 -5
  72. package/dist/module/SubPackages/react/jsx/web.js +0 -5
  73. package/dist/module/SubPackages/react-dom/component/node.js +0 -80
  74. package/dist/module/SubPackages/react-dom/component/web.js +0 -62
  75. package/dist/module/SubPackages/react-dom/jsx/index.js +0 -1
  76. package/dist/module/SubPackages/react-dom/jsx/node.js +0 -31
  77. package/dist/module/SubPackages/react-dom/jsx/web.js +0 -90
  78. package/dist/module/SubPackages/react-test-renderer/MemoExoticComponent/node.js +0 -16
  79. package/dist/module/SubPackages/react-test-renderer/component/index.js +0 -1
  80. package/dist/module/SubPackages/react-test-renderer/component/interface.js +0 -31
  81. package/dist/module/SubPackages/react-test-renderer/component/node.js +0 -3
  82. package/dist/module/SubPackages/react-test-renderer/component/web.js +0 -3
  83. package/dist/module/SubPackages/react-test-renderer/fc/node.js +0 -22
  84. package/dist/module/SubPackages/react-test-renderer/fc/web.js +0 -22
  85. package/dist/module/SubPackages/react-test-renderer/jsx/index.js +0 -28
  86. package/dist/module/SubPackages/react-test-renderer/jsx/node.js +0 -5
  87. package/dist/module/SubPackages/react-test-renderer/jsx/web.js +0 -5
  88. package/dist/module/SubPackages/react-test-renderer/jsx-promised/index.js +0 -16
  89. package/dist/module/SubPackages/react-test-renderer/jsx-promised/node.js +0 -5
  90. package/dist/module/SubPackages/react-test-renderer/jsx-promised/web.js +0 -5
  91. package/dist/module/TestReport.js +0 -91
  92. package/dist/module/Types.js +0 -1
  93. package/dist/module/Web.js +0 -42
  94. package/dist/module/build.js +0 -184
  95. package/dist/module/defaultConfig.js +0 -18
  96. package/dist/module/esbuildConfigs/eslint-formatter-testeranto.js +0 -3
  97. package/dist/module/esbuildConfigs/featuresPlugin.js +0 -34
  98. package/dist/module/esbuildConfigs/index.js +0 -19
  99. package/dist/module/esbuildConfigs/inputFilesPlugin.js +0 -22
  100. package/dist/module/esbuildConfigs/node.js +0 -32
  101. package/dist/module/esbuildConfigs/web.js +0 -45
  102. package/dist/module/init-docs.js +0 -15
  103. package/dist/module/lib/abstractBase.js +0 -321
  104. package/dist/module/lib/basebuilder.js +0 -94
  105. package/dist/module/lib/classBuilder.js +0 -36
  106. package/dist/module/lib/core.js +0 -114
  107. package/dist/module/lib/index.js +0 -17
  108. package/dist/module/lib/types.js +0 -1
  109. package/dist/module/package.json +0 -3
  110. package/dist/module/puppeteerConfiger.js +0 -19
  111. package/dist/module/run.js +0 -259
  112. package/dist/module/tsconfig.module.tsbuildinfo +0 -1
  113. package/dist/module/utils.js +0 -29
  114. package/dist/module/web.html.js +0 -20
  115. package/dist/prebuild/ReportClient.css +0 -11367
  116. package/dist/prebuild/ReportClient.js +0 -23641
  117. package/dist/prebuild/ReportServer.mjs +0 -16
  118. package/dist/prebuild/TestReport.css +0 -11367
  119. package/dist/prebuild/TestReport.js +0 -27484
  120. package/dist/prebuild/build.mjs +0 -376
  121. package/dist/prebuild/esbuildConfigs/eslint-formatter-testeranto.mjs +0 -9
  122. package/dist/prebuild/init-docs.mjs +0 -104
  123. package/dist/prebuild/run.mjs +0 -1190
  124. package/dist/tsconfig.tsbuildinfo +0 -1
  125. package/dist/types/Init.d.ts +0 -2
  126. package/dist/types/Node.d.ts +0 -12
  127. package/dist/types/PM/index.d.ts +0 -34
  128. package/dist/types/PM/main.d.ts +0 -59
  129. package/dist/types/PM/node.d.ts +0 -40
  130. package/dist/types/PM/web.d.ts +0 -38
  131. package/dist/types/ReportServer.d.ts +0 -1
  132. package/dist/types/SubPackages/react/component/node.d.ts +0 -7
  133. package/dist/types/SubPackages/react/component/web.d.ts +0 -7
  134. package/dist/types/SubPackages/react/jsx/index.d.ts +0 -12
  135. package/dist/types/SubPackages/react/jsx/node.d.ts +0 -4
  136. package/dist/types/SubPackages/react/jsx/web.d.ts +0 -4
  137. package/dist/types/SubPackages/react-dom/component/node.d.ts +0 -11
  138. package/dist/types/SubPackages/react-dom/component/web.d.ts +0 -20
  139. package/dist/types/SubPackages/react-dom/jsx/index.d.ts +0 -6
  140. package/dist/types/SubPackages/react-dom/jsx/node.d.ts +0 -7
  141. package/dist/types/SubPackages/react-dom/jsx/web.d.ts +0 -5
  142. package/dist/types/SubPackages/react-test-renderer/MemoExoticComponent/node.d.ts +0 -6
  143. package/dist/types/SubPackages/react-test-renderer/component/index.d.ts +0 -13
  144. package/dist/types/SubPackages/react-test-renderer/component/interface.d.ts +0 -9
  145. package/dist/types/SubPackages/react-test-renderer/component/node.d.ts +0 -4
  146. package/dist/types/SubPackages/react-test-renderer/component/web.d.ts +0 -4
  147. package/dist/types/SubPackages/react-test-renderer/fc/node.d.ts +0 -8
  148. package/dist/types/SubPackages/react-test-renderer/fc/web.d.ts +0 -9
  149. package/dist/types/SubPackages/react-test-renderer/jsx/index.d.ts +0 -16
  150. package/dist/types/SubPackages/react-test-renderer/jsx/node.d.ts +0 -9
  151. package/dist/types/SubPackages/react-test-renderer/jsx/web.d.ts +0 -9
  152. package/dist/types/SubPackages/react-test-renderer/jsx-promised/index.d.ts +0 -15
  153. package/dist/types/SubPackages/react-test-renderer/jsx-promised/node.d.ts +0 -5
  154. package/dist/types/SubPackages/react-test-renderer/jsx-promised/web.d.ts +0 -5
  155. package/dist/types/Types.d.ts +0 -61
  156. package/dist/types/Web.d.ts +0 -9
  157. package/dist/types/build.d.ts +0 -1
  158. package/dist/types/defaultConfig.d.ts +0 -3
  159. package/dist/types/esbuildConfigs/eslint-formatter-testeranto.d.ts +0 -2
  160. package/dist/types/esbuildConfigs/featuresPlugin.d.ts +0 -5
  161. package/dist/types/esbuildConfigs/index.d.ts +0 -4
  162. package/dist/types/esbuildConfigs/inputFilesPlugin.d.ts +0 -6
  163. package/dist/types/esbuildConfigs/node.d.ts +0 -4
  164. package/dist/types/esbuildConfigs/web.d.ts +0 -4
  165. package/dist/types/init-docs.d.ts +0 -1
  166. package/dist/types/lib/abstractBase.d.ts +0 -110
  167. package/dist/types/lib/basebuilder.d.ts +0 -27
  168. package/dist/types/lib/classBuilder.d.ts +0 -7
  169. package/dist/types/lib/core.d.ts +0 -7
  170. package/dist/types/lib/index.d.ts +0 -83
  171. package/dist/types/lib/types.d.ts +0 -14
  172. package/dist/types/puppeteerConfiger.d.ts +0 -4
  173. package/dist/types/run.d.ts +0 -1
  174. package/dist/types/tsconfig.types.tsbuildinfo +0 -1
  175. package/dist/types/utils.d.ts +0 -9
  176. package/dist/types/web.html.d.ts +0 -2
@@ -1,376 +0,0 @@
1
- import { createRequire } from 'module';const require = createRequire(import.meta.url);
2
-
3
- // src/build.ts
4
- import fs2 from "fs";
5
- import path3 from "path";
6
- import readline from "readline";
7
- import { glob } from "glob";
8
- import esbuild from "esbuild";
9
-
10
- // src/esbuildConfigs/index.ts
11
- var esbuildConfigs_default = (config) => {
12
- return {
13
- // packages: "external",
14
- target: "esnext",
15
- format: "esm",
16
- splitting: true,
17
- outExtension: { ".js": ".mjs" },
18
- outbase: config.outbase,
19
- jsx: "transform",
20
- bundle: true,
21
- minify: config.minify === true,
22
- write: true,
23
- loader: {
24
- ".js": "jsx",
25
- ".png": "binary",
26
- ".jpg": "binary"
27
- }
28
- };
29
- };
30
-
31
- // src/esbuildConfigs/inputFilesPlugin.ts
32
- import fs from "fs";
33
- var otherInputs = {};
34
- var register = (entrypoint, sources) => {
35
- if (!otherInputs[entrypoint]) {
36
- otherInputs[entrypoint] = /* @__PURE__ */ new Set();
37
- }
38
- sources.forEach((s) => otherInputs[entrypoint].add(s));
39
- };
40
- var inputFilesPlugin_default = (platform, entryPoints) => {
41
- return {
42
- register,
43
- inputFilesPluginFactory: {
44
- name: "metafileWriter",
45
- setup(build) {
46
- build.onEnd((result) => {
47
- fs.writeFileSync(
48
- `docs/${platform}/metafile.json`,
49
- JSON.stringify(result, null, 2)
50
- );
51
- });
52
- }
53
- }
54
- };
55
- };
56
-
57
- // src/esbuildConfigs/featuresPlugin.ts
58
- import path from "path";
59
- var featuresPlugin_default = {
60
- name: "feature-markdown",
61
- setup(build) {
62
- build.onResolve({ filter: /\.md$/ }, (args) => {
63
- if (args.resolveDir === "")
64
- return;
65
- return {
66
- path: path.isAbsolute(args.path) ? args.path : path.join(args.resolveDir, args.path),
67
- namespace: "feature-markdown"
68
- };
69
- });
70
- build.onLoad(
71
- { filter: /.*/, namespace: "feature-markdown" },
72
- async (args) => {
73
- return {
74
- contents: `file://${args.path}`,
75
- loader: "text"
76
- // contents: JSON.stringify({ path: args.path }),
77
- // loader: "json",
78
- // contents: JSON.stringify({
79
- // // html: markdownHTML,
80
- // raw: markdownContent,
81
- // filename: args.path, //path.basename(args.path),
82
- // }),
83
- // loader: "json",
84
- };
85
- }
86
- );
87
- }
88
- };
89
-
90
- // src/esbuildConfigs/node.ts
91
- var node_default = (config, entryPoints) => {
92
- const { inputFilesPluginFactory, register: register2 } = inputFilesPlugin_default(
93
- "node",
94
- entryPoints
95
- );
96
- return {
97
- ...esbuildConfigs_default(config),
98
- splitting: true,
99
- outdir: config.outdir + "/node",
100
- // inject: [`./node_modules/testeranto/dist/cjs-shim.js`],
101
- metafile: true,
102
- supported: {
103
- "dynamic-import": true
104
- },
105
- define: {
106
- "process.env.FLUENTFFMPEG_COV": "0"
107
- },
108
- absWorkingDir: process.cwd(),
109
- banner: {
110
- js: `import { createRequire } from 'module';const require = createRequire(import.meta.url);`
111
- },
112
- platform: "node",
113
- external: ["react", ...config.externals],
114
- entryPoints: [...entryPoints],
115
- plugins: [
116
- featuresPlugin_default,
117
- inputFilesPluginFactory,
118
- {
119
- name: "rebuild-notify",
120
- setup(build) {
121
- build.onEnd((result) => {
122
- console.log(
123
- `> node build ended with ${result.errors.length} errors`
124
- );
125
- if (result.errors.length > 0) {
126
- console.log(result);
127
- }
128
- });
129
- }
130
- },
131
- ...config.nodePlugins.map((p) => p(register2, entryPoints)) || []
132
- ]
133
- };
134
- };
135
-
136
- // src/esbuildConfigs/web.ts
137
- import path2 from "path";
138
- var web_default = (config, entryPoints) => {
139
- const { inputFilesPluginFactory, register: register2 } = inputFilesPlugin_default(
140
- "web",
141
- entryPoints
142
- );
143
- return {
144
- ...esbuildConfigs_default(config),
145
- outdir: config.outdir + "/web",
146
- alias: {
147
- react: path2.resolve("./node_modules/react")
148
- },
149
- metafile: true,
150
- external: [
151
- "path",
152
- "fs",
153
- "stream",
154
- "http",
155
- "constants",
156
- "net",
157
- "assert",
158
- "tls",
159
- "os",
160
- "child_process",
161
- "readline",
162
- "zlib",
163
- "crypto",
164
- "https",
165
- "util",
166
- "process",
167
- "dns"
168
- ],
169
- platform: "browser",
170
- entryPoints: [...entryPoints],
171
- plugins: [
172
- featuresPlugin_default,
173
- inputFilesPluginFactory,
174
- {
175
- name: "rebuild-notify",
176
- setup(build) {
177
- build.onEnd((result) => {
178
- console.log(
179
- `> web build ended with ${result.errors.length} errors`
180
- );
181
- if (result.errors.length > 0) {
182
- console.log(result);
183
- }
184
- });
185
- }
186
- },
187
- ...config.nodePlugins.map((p) => p(register2, entryPoints)) || []
188
- ]
189
- };
190
- };
191
-
192
- // src/web.html.ts
193
- var web_html_default = (jsfilePath, htmlFilePath) => `
194
- <!DOCTYPE html>
195
- <html lang="en">
196
-
197
- <head>
198
- <script type="module" src="${jsfilePath}"></script>
199
-
200
- </head>
201
-
202
- <body>
203
- <h1>${htmlFilePath}</h1>
204
- <div id="root">
205
-
206
- </div>
207
- </body>
208
-
209
- <footer></footer>
210
-
211
- </html>
212
- `;
213
-
214
- // src/build.ts
215
- readline.emitKeypressEvents(process.stdin);
216
- if (process.stdin.isTTY)
217
- process.stdin.setRawMode(true);
218
- var getRunnables = (tests, payload = {
219
- nodeEntryPoints: {},
220
- webEntryPoints: {}
221
- }) => {
222
- return tests.reduce((pt, cv, cndx, cry) => {
223
- if (cv[1] === "node") {
224
- pt.nodeEntryPoints[cv[0]] = path3.resolve(
225
- `./docs/node/${cv[0].split(".").slice(0, -1).concat("mjs").join(".")}`
226
- );
227
- } else if (cv[1] === "web") {
228
- pt.webEntryPoints[cv[0]] = path3.resolve(
229
- `./docs/web/${cv[0].split(".").slice(0, -1).concat("mjs").join(".")}`
230
- );
231
- }
232
- if (cv[3].length) {
233
- getRunnables(cv[3], payload);
234
- }
235
- return pt;
236
- }, payload);
237
- };
238
- import(process.cwd() + "/" + process.argv[2]).then(async (module) => {
239
- const rawConfig = module.default;
240
- const getSecondaryEndpointsPoints = (runtime) => {
241
- const meta = (ts, st) => {
242
- ts.forEach((t) => {
243
- if (t[1] === runtime) {
244
- st.add(t[0]);
245
- }
246
- if (Array.isArray(t[3])) {
247
- meta(t[3], st);
248
- }
249
- });
250
- return st;
251
- };
252
- return Array.from(meta(config.tests, /* @__PURE__ */ new Set()));
253
- };
254
- const config = {
255
- ...rawConfig,
256
- buildDir: process.cwd() + "/" + rawConfig.outdir
257
- };
258
- let nodeDone = false;
259
- let webDone = false;
260
- let mode = config.devMode ? "DEV" : "PROD";
261
- let status = "build";
262
- const { nodeEntryPoints, webEntryPoints } = getRunnables(config.tests);
263
- const onNodeDone = () => {
264
- nodeDone = true;
265
- onDone();
266
- };
267
- const onWebDone = () => {
268
- webDone = true;
269
- onDone();
270
- };
271
- const onDone = async () => {
272
- if (nodeDone && webDone) {
273
- status = "built";
274
- }
275
- if (nodeDone && webDone && status === "built") {
276
- }
277
- if (nodeDone && webDone && mode === "PROD") {
278
- console.log("Testeranto-EsBuild is all done. Goodbye!");
279
- process.exit();
280
- } else {
281
- if (mode === "PROD") {
282
- console.log("waiting for tests to finish");
283
- console.log(
284
- JSON.stringify(
285
- {
286
- nodeDone,
287
- webDone,
288
- mode
289
- },
290
- null,
291
- 2
292
- )
293
- );
294
- } else {
295
- console.log("waiting for tests to change");
296
- }
297
- if (config.devMode) {
298
- console.log("ready and watching for changes...");
299
- } else {
300
- }
301
- }
302
- };
303
- console.log(
304
- `Press 'q' to shutdown gracefully. Press 'x' to shutdown forcefully.`
305
- );
306
- process.stdin.on("keypress", (str, key) => {
307
- if (key.name === "q") {
308
- console.log("Testeranto-Build is shutting down...");
309
- mode = "PROD";
310
- onDone();
311
- }
312
- if (key.name === "x") {
313
- console.log("Testeranto-Build is shutting down forcefully...");
314
- process.exit(-1);
315
- }
316
- });
317
- fs2.writeFileSync(
318
- `${config.outdir}/testeranto.json`,
319
- JSON.stringify(config, null, 2)
320
- );
321
- Promise.resolve(
322
- Promise.all(
323
- [...getSecondaryEndpointsPoints("web")].map(async (sourceFilePath) => {
324
- const sourceFileSplit = sourceFilePath.split("/");
325
- const sourceDir = sourceFileSplit.slice(0, -1);
326
- const sourceFileName = sourceFileSplit[sourceFileSplit.length - 1];
327
- const sourceFileNameMinusJs = sourceFileName.split(".").slice(0, -1).join(".");
328
- const htmlFilePath = path3.normalize(
329
- `${process.cwd()}/${config.outdir}/web/${sourceDir.join(
330
- "/"
331
- )}/${sourceFileNameMinusJs}.html`
332
- );
333
- const jsfilePath = `./${sourceFileNameMinusJs}.mjs`;
334
- return fs2.promises.mkdir(path3.dirname(htmlFilePath), { recursive: true }).then(
335
- (x) => fs2.writeFileSync(
336
- htmlFilePath,
337
- web_html_default(jsfilePath, htmlFilePath)
338
- )
339
- );
340
- })
341
- )
342
- );
343
- glob(`./${config.outdir}/chunk-*.mjs`, {
344
- ignore: "node_modules/**"
345
- }).then((chunks) => {
346
- chunks.forEach((chunk) => {
347
- fs2.unlinkSync(chunk);
348
- });
349
- });
350
- await Promise.all([
351
- esbuild.context(node_default(config, Object.keys(nodeEntryPoints))).then(async (nodeContext) => {
352
- if (config.devMode) {
353
- await nodeContext.watch().then((v) => {
354
- onNodeDone();
355
- });
356
- } else {
357
- nodeContext.rebuild().then((v) => {
358
- onNodeDone();
359
- });
360
- }
361
- return nodeContext;
362
- }),
363
- esbuild.context(web_default(config, Object.keys(webEntryPoints))).then(async (webContext) => {
364
- if (config.devMode) {
365
- await webContext.watch().then((v) => {
366
- onWebDone();
367
- });
368
- } else {
369
- webContext.rebuild().then((v) => {
370
- onWebDone();
371
- });
372
- }
373
- return webContext;
374
- })
375
- ]);
376
- });
@@ -1,9 +0,0 @@
1
- import { createRequire } from 'module';const require = createRequire(import.meta.url);
2
-
3
- // src/esbuildConfigs/eslint-formatter-testeranto.ts
4
- function eslint_formatter_testeranto_default(results) {
5
- return JSON.stringify(results, null, 2);
6
- }
7
- export {
8
- eslint_formatter_testeranto_default as default
9
- };
@@ -1,104 +0,0 @@
1
- import { createRequire } from 'module';const require = createRequire(import.meta.url);
2
-
3
- // src/init-docs.ts
4
- import fs2 from "fs";
5
-
6
- // src/Init.ts
7
- import fs from "fs";
8
- var Init_default = async (partialConfig) => {
9
- const config = {
10
- ...partialConfig,
11
- buildDir: process.cwd() + "/" + partialConfig.outdir
12
- };
13
- try {
14
- fs.mkdirSync(`${process.cwd()}/${config.outdir}`);
15
- } catch {
16
- }
17
- fs.writeFileSync(
18
- `${config.outdir}/index.html`,
19
- `
20
- <!DOCTYPE html>
21
- <html lang="en">
22
-
23
- <head>
24
- <meta name="description" content="Webpage description goes here" />
25
- <meta charset="utf-8" />
26
- <title>kokomoBay - testeranto</title>
27
- <meta name="viewport" content="width=device-width, initial-scale=1" />
28
- <meta name="author" content="" />
29
-
30
- <link rel="stylesheet" href="/kokomoBay/docs/ReportClient.css" />
31
- <script type="module" src="/kokomoBay/docs/ReportClient.js"></script>
32
-
33
- </head>
34
-
35
- <body>
36
- <div id="root">
37
- react is loading
38
- </div>
39
- </body>
40
-
41
- </html>
42
- `
43
- );
44
- fs.copyFileSync(
45
- `node_modules/testeranto/dist/prebuild/ReportClient.js`,
46
- `${config.outdir}/ReportClient.js`
47
- );
48
- fs.copyFileSync(
49
- `node_modules/testeranto/dist/prebuild/ReportClient.css`,
50
- `${config.outdir}/ReportClient.css`
51
- );
52
- fs.copyFileSync(
53
- `node_modules/testeranto/dist/prebuild/TestReport.js`,
54
- `${config.outdir}/TestReport.js`
55
- );
56
- fs.copyFileSync(
57
- `node_modules/testeranto/dist/prebuild/TestReport.css`,
58
- `${config.outdir}/TestReport.css`
59
- );
60
- fs.writeFileSync(
61
- `${config.outdir}/testeranto.json`,
62
- JSON.stringify(
63
- {
64
- ...config,
65
- buildDir: process.cwd() + "/" + config.outdir
66
- },
67
- null,
68
- 2
69
- )
70
- );
71
- try {
72
- fs.mkdirSync(`${process.cwd()}/${config.outdir}/node`);
73
- } catch {
74
- }
75
- try {
76
- fs.mkdirSync(`${process.cwd()}/${config.outdir}/web`);
77
- } catch {
78
- }
79
- try {
80
- fs.mkdirSync(`${process.cwd()}/${config.outdir}/features`);
81
- } catch {
82
- }
83
- try {
84
- fs.mkdirSync(`${process.cwd()}/${config.outdir}/ts`);
85
- } catch {
86
- }
87
- };
88
-
89
- // src/init-docs.ts
90
- console.log("Initializing a testeranto project");
91
- if (!process.argv[2]) {
92
- console.log("You didn't pass a config file, so I will create one for you.");
93
- fs2.writeFileSync(
94
- "testeranto.mts",
95
- fs2.readFileSync("node_modules/testeranto/src/defaultConfig.ts")
96
- );
97
- import(process.cwd() + "/testeranto.mts").then((module) => {
98
- Init_default(module.default);
99
- });
100
- } else {
101
- import(process.cwd() + "/" + process.argv[2]).then((module) => {
102
- Init_default(module.default);
103
- });
104
- }