testeranto 0.75.0 → 0.79.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.
- package/.eslintrc.js +5 -2
- package/Bundle.Dockerfile +52 -0
- package/README.md +25 -24
- package/build-tests.ts +16 -0
- package/dist/common/build-tests.js +38 -0
- package/dist/common/init-docs.js +8 -0
- package/dist/common/run-tests.js +34 -0
- package/dist/common/src/Aider.js +96 -0
- package/dist/common/src/Init.js +10 -0
- package/dist/common/{Node.js → src/Node.js} +1 -0
- package/dist/common/src/PM/index.js +7 -0
- package/dist/common/{PM → src/PM}/main.js +287 -10
- package/dist/common/{PM → src/PM}/node.js +4 -0
- package/dist/common/{PM → src/PM}/web.js +3 -0
- package/dist/common/{Project.js → src/Project.js} +15 -57
- package/dist/common/{Puppeteer.js → src/Puppeteer.js} +65 -26
- package/dist/common/{SubPackages → src/SubPackages}/react-dom/component/web.js +5 -25
- package/dist/common/src/SubPackages/react-dom/jsx/web.js +117 -0
- package/dist/common/{SubPackages/react-test-renderer/component/index.js → src/SubPackages/react-test-renderer/component/interface.js} +0 -20
- package/dist/common/{SubPackages → src/SubPackages}/react-test-renderer/component/node.js +2 -2
- package/dist/common/{SubPackages → src/SubPackages}/react-test-renderer/component/web.js +2 -2
- package/dist/common/{Types.js → src/Types.js} +0 -2
- package/dist/common/{esbuildConfigs → src/esbuildConfigs}/index.js +1 -0
- package/dist/common/src/esbuildConfigs/inputFilesPlugin.js +52 -0
- package/dist/common/{esbuildConfigs → src/esbuildConfigs}/node.js +5 -1
- package/dist/common/src/esbuildConfigs/report.js +14 -0
- package/dist/common/{esbuildConfigs → src/esbuildConfigs}/web.js +3 -1
- package/dist/common/src/lib/abstractBase.js +581 -0
- package/dist/common/{lib → src/lib}/basebuilder.js +12 -38
- package/dist/common/{lib → src/lib}/classBuilder.js +1 -3
- package/dist/common/{lib → src/lib}/core.js +3 -5
- package/dist/common/src/lib/types.js +2 -0
- package/dist/common/src/utils.js +16 -0
- package/dist/common/testeranto.js +15 -0
- package/dist/common/tsconfig.common.tsbuildinfo +1 -1
- package/dist/module/build-tests.js +10 -0
- package/dist/module/init-docs.js +3 -0
- package/dist/module/run-tests.js +6 -0
- package/dist/module/src/Aider.js +89 -0
- package/dist/module/src/Init.js +5 -0
- package/dist/module/{Node.js → src/Node.js} +1 -0
- package/dist/module/src/PM/index.js +3 -0
- package/dist/module/src/PM/main.js +617 -0
- package/dist/module/{PM → src/PM}/node.js +4 -0
- package/dist/module/{PM → src/PM}/web.js +3 -0
- package/dist/module/{Project.js → src/Project.js} +15 -57
- package/dist/module/{Puppeteer.js → src/Puppeteer.js} +65 -26
- package/dist/module/{SubPackages → src/SubPackages}/react-dom/component/web.js +5 -25
- package/dist/module/src/SubPackages/react-dom/jsx/web.js +89 -0
- package/dist/module/{SubPackages/react-test-renderer/component/index.js → src/SubPackages/react-test-renderer/component/interface.js} +0 -20
- package/dist/module/{SubPackages → src/SubPackages}/react-test-renderer/component/node.js +1 -1
- package/dist/module/{SubPackages → src/SubPackages}/react-test-renderer/component/web.js +1 -1
- package/dist/module/{esbuildConfigs → src/esbuildConfigs}/index.js +1 -0
- package/dist/module/src/esbuildConfigs/inputFilesPlugin.js +47 -0
- package/dist/module/{esbuildConfigs → src/esbuildConfigs}/node.js +5 -1
- package/dist/module/src/esbuildConfigs/report.js +14 -0
- package/dist/module/{esbuildConfigs → src/esbuildConfigs}/web.js +3 -1
- package/dist/module/src/lib/abstractBase.js +573 -0
- package/dist/module/{lib → src/lib}/basebuilder.js +12 -38
- package/dist/module/{lib → src/lib}/classBuilder.js +1 -3
- package/dist/module/{lib → src/lib}/core.js +3 -5
- package/dist/module/src/utils.js +9 -0
- package/dist/module/testeranto.js +13 -0
- package/dist/module/tsconfig.module.tsbuildinfo +1 -1
- package/dist/types/build-tests.d.ts +3 -0
- package/dist/types/init-docs.d.ts +2 -0
- package/dist/types/run-tests.d.ts +2 -0
- package/dist/types/src/Aider.d.ts +1 -0
- package/dist/types/src/Init.d.ts +2 -0
- package/dist/types/src/Node.d.ts +6 -0
- package/dist/types/{PM → src/PM}/index.d.ts +3 -2
- package/dist/types/{PM → src/PM}/main.d.ts +6 -3
- package/dist/types/{PM → src/PM}/node.d.ts +2 -0
- package/dist/types/{PM → src/PM}/web.d.ts +1 -0
- package/dist/types/{Project.d.ts → src/Project.d.ts} +1 -1
- package/dist/types/src/Puppeteer.d.ts +2 -0
- package/dist/types/src/SubPackages/puppeteer.d.ts +6 -0
- package/dist/types/{SubPackages → src/SubPackages}/react/component/node.d.ts +1 -1
- package/dist/types/{SubPackages → src/SubPackages}/react/component/web.d.ts +1 -1
- package/dist/types/src/SubPackages/react/jsx/node.d.ts +4 -0
- package/dist/types/src/SubPackages/react/jsx/web.d.ts +4 -0
- package/dist/types/{SubPackages → src/SubPackages}/react-dom/component/node.d.ts +2 -2
- package/dist/types/src/SubPackages/react-dom/component/web.d.ts +11 -0
- package/dist/types/src/SubPackages/react-dom/jsx/node.d.ts +6 -0
- package/dist/types/src/SubPackages/react-dom/jsx/web.d.ts +5 -0
- package/dist/types/src/SubPackages/react-test-renderer/MemoExoticComponent/node.d.ts +5 -0
- package/dist/types/{SubPackages → src/SubPackages}/react-test-renderer/component/index.d.ts +0 -7
- package/dist/types/src/SubPackages/react-test-renderer/component/interface.d.ts +9 -0
- package/dist/types/{SubPackages → src/SubPackages}/react-test-renderer/component/node.d.ts +1 -2
- package/dist/types/src/SubPackages/react-test-renderer/component/web.d.ts +3 -0
- package/dist/types/{SubPackages → src/SubPackages}/react-test-renderer/fc/node.d.ts +1 -1
- package/dist/types/{SubPackages → src/SubPackages}/react-test-renderer/fc/web.d.ts +1 -1
- package/dist/types/{SubPackages → src/SubPackages}/react-test-renderer/jsx/node.d.ts +1 -2
- package/dist/types/{SubPackages → src/SubPackages}/react-test-renderer/jsx/web.d.ts +1 -2
- package/dist/types/src/SubPackages/react-test-renderer/jsx-promised/node.d.ts +4 -0
- package/dist/types/src/SubPackages/react-test-renderer/jsx-promised/web.d.ts +4 -0
- package/dist/types/src/Types.d.ts +51 -0
- package/dist/types/src/Web.d.ts +6 -0
- package/dist/types/src/esbuildConfigs/inputFilesPlugin.d.ts +5 -0
- package/dist/types/{lib → src/lib}/abstractBase.d.ts +8 -8
- package/dist/types/{lib → src/lib}/basebuilder.d.ts +1 -1
- package/dist/types/{lib → src/lib}/classBuilder.d.ts +1 -1
- package/dist/types/{lib → src/lib}/core.d.ts +1 -1
- package/dist/types/{lib → src/lib}/index.d.ts +5 -5
- package/dist/types/{lib → src/lib}/types.d.ts +15 -15
- package/dist/types/src/utils.d.ts +2 -0
- package/dist/types/testeranto.d.ts +16 -0
- package/dist/types/tsconfig.types.tsbuildinfo +1 -1
- package/docker-compose.yml +37 -0
- package/init-docs.ts +5 -0
- package/package.json +72 -25
- package/run-tests.ts +9 -0
- package/src/Aider.ts +125 -0
- package/src/Init.ts +20 -0
- package/src/Node.ts +31 -2
- package/src/PM/index.ts +7 -84
- package/src/PM/main.ts +400 -16
- package/src/PM/node.ts +6 -0
- package/src/PM/web.ts +4 -0
- package/src/Project.ts +33 -84
- package/src/Puppeteer.ts +115 -62
- package/src/SubPackages/react-dom/component/web.ts +10 -30
- package/src/SubPackages/react-dom/jsx/web.ts +110 -76
- package/src/SubPackages/react-test-renderer/component/index.ts +0 -66
- package/src/SubPackages/react-test-renderer/component/interface.ts +48 -0
- package/src/SubPackages/react-test-renderer/component/node.ts +2 -1
- package/src/SubPackages/react-test-renderer/component/web.ts +2 -1
- package/src/Types.ts +138 -29
- package/src/Web.ts +32 -2
- package/src/esbuildConfigs/index.ts +1 -0
- package/src/esbuildConfigs/inputFilesPlugin.ts +67 -0
- package/src/esbuildConfigs/node.ts +4 -2
- package/src/esbuildConfigs/report.ts +13 -13
- package/src/esbuildConfigs/web.ts +4 -0
- package/src/lib/abstractBase.ts +366 -36
- package/src/lib/basebuilder.ts +26 -52
- package/src/lib/classBuilder.ts +14 -2
- package/src/lib/core.ts +18 -7
- package/src/lib/index.ts +115 -7
- package/src/lib/types.ts +143 -37
- package/src/utils.ts +15 -0
- package/testeranto.ts +13 -0
- package/tsconfig.common.json +12 -4
- package/tsconfig.json +9 -3
- package/tsconfig.module.json +2 -3
- package/tsconfig.types.json +1 -2
- package/dist/common/Features.js +0 -84
- package/dist/common/PM/index.js +0 -71
- package/dist/common/Reporter.js +0 -119
- package/dist/common/Scheduler.js +0 -1
- package/dist/common/SubPackages/react-dom/jsx/web.js +0 -93
- package/dist/common/esbuildConfigs/report.js +0 -13
- package/dist/common/lib/abstractBase.js +0 -348
- package/dist/common/preload.js +0 -15
- package/dist/common/report.html.js +0 -31
- package/dist/module/Features.js +0 -73
- package/dist/module/PM/index.js +0 -67
- package/dist/module/PM/main.js +0 -340
- package/dist/module/Reporter.js +0 -114
- package/dist/module/Scheduler.js +0 -1
- package/dist/module/SubPackages/react-dom/jsx/web.js +0 -65
- package/dist/module/Types.js +0 -3
- package/dist/module/esbuildConfigs/report.js +0 -11
- package/dist/module/lib/abstractBase.js +0 -340
- package/dist/module/preload.js +0 -15
- package/dist/module/report.html.js +0 -29
- package/dist/prebuild/Report.css +0 -11358
- package/dist/prebuild/Report.js +0 -37585
- package/dist/types/Features.d.ts +0 -68
- package/dist/types/Node.d.ts +0 -6
- package/dist/types/SubPackages/puppeteer.d.ts +0 -6
- package/dist/types/SubPackages/react/jsx/node.d.ts +0 -4
- package/dist/types/SubPackages/react/jsx/web.d.ts +0 -4
- package/dist/types/SubPackages/react-dom/component/web.d.ts +0 -5
- package/dist/types/SubPackages/react-dom/jsx/node.d.ts +0 -6
- package/dist/types/SubPackages/react-dom/jsx/web.d.ts +0 -5
- package/dist/types/SubPackages/react-test-renderer/MemoExoticComponent/node.d.ts +0 -5
- package/dist/types/SubPackages/react-test-renderer/component/web.d.ts +0 -4
- package/dist/types/SubPackages/react-test-renderer/jsx-promised/node.d.ts +0 -5
- package/dist/types/SubPackages/react-test-renderer/jsx-promised/web.d.ts +0 -5
- package/dist/types/Types.d.ts +0 -50
- package/dist/types/Web.d.ts +0 -6
- package/dist/types/esbuildConfigs/report.d.ts +0 -4
- package/dist/types/preload.d.ts +0 -0
- package/dist/types/report.html.d.ts +0 -2
- package/electronBuild.ts +0 -32
- package/src/Features.ts +0 -118
- package/src/Report.tsx +0 -521
- package/src/Reporter.ts +0 -134
- package/src/Scheduler.ts +0 -0
- package/src/preload.ts +0 -17
- package/src/report.html.ts +0 -29
- package/tests/Rectangle.test.ts +0 -189
- /package/dist/common/{SubPackages → src/SubPackages}/puppeteer.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react/component/node.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react/component/web.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react/jsx/index.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react/jsx/node.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react/jsx/web.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react-dom/component/node.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react-dom/jsx/index.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react-dom/jsx/node.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react-test-renderer/MemoExoticComponent/node.js +0 -0
- /package/dist/common/{lib/types.js → src/SubPackages/react-test-renderer/component/index.js} +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react-test-renderer/fc/node.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react-test-renderer/fc/web.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react-test-renderer/jsx/index.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react-test-renderer/jsx/node.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react-test-renderer/jsx/web.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react-test-renderer/jsx-promised/index.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react-test-renderer/jsx-promised/node.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react-test-renderer/jsx-promised/web.js +0 -0
- /package/dist/common/{Web.js → src/Web.js} +0 -0
- /package/dist/common/{esbuildConfigs → src/esbuildConfigs}/features.js +0 -0
- /package/dist/common/{esbuildConfigs → src/esbuildConfigs}/tests.js +0 -0
- /package/dist/common/{lib → src/lib}/index.js +0 -0
- /package/dist/common/{puppeteerConfiger.js → src/puppeteerConfiger.js} +0 -0
- /package/dist/common/{web.html.js → src/web.html.js} +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/puppeteer.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react/component/node.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react/component/web.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react/jsx/index.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react/jsx/node.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react/jsx/web.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react-dom/component/node.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react-dom/jsx/index.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react-dom/jsx/node.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react-test-renderer/MemoExoticComponent/node.js +0 -0
- /package/dist/module/{lib/types.js → src/SubPackages/react-test-renderer/component/index.js} +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react-test-renderer/fc/node.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react-test-renderer/fc/web.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react-test-renderer/jsx/index.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react-test-renderer/jsx/node.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react-test-renderer/jsx/web.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react-test-renderer/jsx-promised/index.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react-test-renderer/jsx-promised/node.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react-test-renderer/jsx-promised/web.js +0 -0
- /package/dist/{types/Puppeteer.d.ts → module/src/Types.js} +0 -0
- /package/dist/module/{Web.js → src/Web.js} +0 -0
- /package/dist/module/{esbuildConfigs → src/esbuildConfigs}/features.js +0 -0
- /package/dist/module/{esbuildConfigs → src/esbuildConfigs}/tests.js +0 -0
- /package/dist/module/{lib → src/lib}/index.js +0 -0
- /package/dist/{types/Reporter.d.ts → module/src/lib/types.js} +0 -0
- /package/dist/module/{puppeteerConfiger.js → src/puppeteerConfiger.js} +0 -0
- /package/dist/module/{web.html.js → src/web.html.js} +0 -0
- /package/dist/types/{SubPackages → src/SubPackages}/react/jsx/index.d.ts +0 -0
- /package/dist/types/{SubPackages → src/SubPackages}/react-dom/jsx/index.d.ts +0 -0
- /package/dist/types/{SubPackages → src/SubPackages}/react-test-renderer/jsx/index.d.ts +0 -0
- /package/dist/types/{SubPackages → src/SubPackages}/react-test-renderer/jsx-promised/index.d.ts +0 -0
- /package/dist/types/{esbuildConfigs → src/esbuildConfigs}/features.d.ts +0 -0
- /package/dist/types/{esbuildConfigs → src/esbuildConfigs}/index.d.ts +0 -0
- /package/dist/types/{esbuildConfigs → src/esbuildConfigs}/node.d.ts +0 -0
- /package/dist/types/{Scheduler.d.ts → src/esbuildConfigs/report.d.ts} +0 -0
- /package/dist/types/{esbuildConfigs → src/esbuildConfigs}/tests.d.ts +0 -0
- /package/dist/types/{esbuildConfigs → src/esbuildConfigs}/web.d.ts +0 -0
- /package/dist/types/{puppeteerConfiger.d.ts → src/puppeteerConfiger.d.ts} +0 -0
- /package/dist/types/{web.html.d.ts → src/web.html.d.ts} +0 -0
|
@@ -5,9 +5,7 @@ import readline from "readline";
|
|
|
5
5
|
import { glob } from "glob";
|
|
6
6
|
import esbuildNodeConfiger from "./esbuildConfigs/node.js";
|
|
7
7
|
import esbuildWebConfiger from "./esbuildConfigs/web.js";
|
|
8
|
-
import esbuildFeaturesConfiger from "./esbuildConfigs/features.js";
|
|
9
8
|
import webHtmlFrame from "./web.html.js";
|
|
10
|
-
import reportHtmlFrame from "./report.html.js";
|
|
11
9
|
var mode = process.argv[2] === "-dev" ? "DEV" : "PROD";
|
|
12
10
|
readline.emitKeypressEvents(process.stdin);
|
|
13
11
|
if (process.stdin.isTTY)
|
|
@@ -19,15 +17,7 @@ process.stdin.on("keypress", (str, key) => {
|
|
|
19
17
|
onDone();
|
|
20
18
|
}
|
|
21
19
|
});
|
|
22
|
-
|
|
23
|
-
// const memoryUsage = process.memoryUsage();
|
|
24
|
-
// console.log("Memory usage:", memoryUsage);
|
|
25
|
-
// }, 10000); // Check every 10 seconds
|
|
26
|
-
let featuresDone, nodeDone, webDone = false;
|
|
27
|
-
const onFeaturesDone = () => {
|
|
28
|
-
featuresDone = true;
|
|
29
|
-
onDone();
|
|
30
|
-
};
|
|
20
|
+
let nodeDone, webDone = false;
|
|
31
21
|
const onNodeDone = () => {
|
|
32
22
|
nodeDone = true;
|
|
33
23
|
onDone();
|
|
@@ -38,12 +28,11 @@ const onWebDone = () => {
|
|
|
38
28
|
};
|
|
39
29
|
const onDone = () => {
|
|
40
30
|
console.log(JSON.stringify({
|
|
41
|
-
featuresDone,
|
|
42
31
|
nodeDone,
|
|
43
32
|
webDone,
|
|
44
33
|
mode,
|
|
45
34
|
}, null, 2));
|
|
46
|
-
if (
|
|
35
|
+
if (nodeDone && webDone && mode === "PROD") {
|
|
47
36
|
console.log("Testeranto-EsBuild is all done. Goodbye!");
|
|
48
37
|
process.exit();
|
|
49
38
|
}
|
|
@@ -52,9 +41,10 @@ const onDone = () => {
|
|
|
52
41
|
}
|
|
53
42
|
};
|
|
54
43
|
export class ITProject {
|
|
55
|
-
constructor(
|
|
44
|
+
constructor(configs) {
|
|
56
45
|
this.mode = `up`;
|
|
57
|
-
this.config =
|
|
46
|
+
this.config = configs;
|
|
47
|
+
fs.writeFileSync(`${this.config.outdir}/testeranto.json`, JSON.stringify(Object.assign(Object.assign({}, this.config), { buildDir: process.cwd() + "/" + this.config.outdir }), null, 2));
|
|
58
48
|
Promise.resolve(Promise.all([...this.getSecondaryEndpointsPoints("web")].map(async (sourceFilePath) => {
|
|
59
49
|
const sourceFileSplit = sourceFilePath.split("/");
|
|
60
50
|
const sourceDir = sourceFileSplit.slice(0, -1);
|
|
@@ -63,57 +53,24 @@ export class ITProject {
|
|
|
63
53
|
.split(".")
|
|
64
54
|
.slice(0, -1)
|
|
65
55
|
.join(".");
|
|
66
|
-
const htmlFilePath = path.normalize(`${process.cwd()}/${config.outdir}/web/${sourceDir.join("/")}/${sourceFileNameMinusJs}.html`);
|
|
56
|
+
const htmlFilePath = path.normalize(`${process.cwd()}/${this.config.outdir}/web/${sourceDir.join("/")}/${sourceFileNameMinusJs}.html`);
|
|
67
57
|
const jsfilePath = `./${sourceFileNameMinusJs}.mjs`;
|
|
68
58
|
return fs.promises
|
|
69
59
|
.mkdir(path.dirname(htmlFilePath), { recursive: true })
|
|
70
60
|
.then((x) => fs.writeFileSync(htmlFilePath, webHtmlFrame(jsfilePath, htmlFilePath)));
|
|
71
61
|
})));
|
|
72
62
|
const [nodeEntryPoints, webEntryPoints] = getRunnables(this.config.tests);
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
// return module.default.then((defaultModule) => {
|
|
78
|
-
// console.log("defaultModule", defaultModule);
|
|
79
|
-
// // defaultModule
|
|
80
|
-
// // .receiveTestResourceConfig(argz)
|
|
81
|
-
// // .then((x) => {
|
|
82
|
-
// // console.log("then", x);
|
|
83
|
-
// // return x;
|
|
84
|
-
// // })
|
|
85
|
-
// // .catch((e) => {
|
|
86
|
-
// // console.log("catch", e);
|
|
87
|
-
// // });
|
|
88
|
-
// });
|
|
89
|
-
// });
|
|
90
|
-
// });
|
|
91
|
-
glob(`./${config.outdir}/chunk-*.mjs`, { ignore: "node_modules/**" }).then((chunks) => {
|
|
63
|
+
console.log(`this.getSecondaryEndpointsPoints("web")`, this.getSecondaryEndpointsPoints("web"));
|
|
64
|
+
glob(`./${this.config.outdir}/chunk-*.mjs`, {
|
|
65
|
+
ignore: "node_modules/**",
|
|
66
|
+
}).then((chunks) => {
|
|
92
67
|
chunks.forEach((chunk) => {
|
|
93
68
|
fs.unlinkSync(chunk);
|
|
94
69
|
});
|
|
95
70
|
});
|
|
96
|
-
fs.copyFileSync("./node_modules/testeranto/dist/prebuild/Report.js", "./docs/Report.js");
|
|
97
|
-
fs.copyFileSync("./node_modules/testeranto/dist/prebuild/Report.css", "./docs/Report.css");
|
|
98
|
-
fs.writeFileSync(`${config.outdir}/report.html`, reportHtmlFrame());
|
|
99
71
|
Promise.all([
|
|
100
|
-
fs.promises.writeFile(`${config.outdir}/testeranto.json`, JSON.stringify(Object.assign(Object.assign({}, config), { buildDir: process.cwd() + "/" + config.outdir }), null, 2)),
|
|
101
|
-
esbuild
|
|
102
|
-
.context(esbuildFeaturesConfiger(config))
|
|
103
|
-
.then(async (featuresContext) => {
|
|
104
|
-
if (mode == "DEV") {
|
|
105
|
-
await featuresContext.watch();
|
|
106
|
-
onFeaturesDone();
|
|
107
|
-
}
|
|
108
|
-
else {
|
|
109
|
-
featuresContext.rebuild().then((v) => {
|
|
110
|
-
onFeaturesDone();
|
|
111
|
-
});
|
|
112
|
-
}
|
|
113
|
-
return featuresContext;
|
|
114
|
-
}),
|
|
115
72
|
esbuild
|
|
116
|
-
.context(esbuildNodeConfiger(config, nodeEntryPoints))
|
|
73
|
+
.context(esbuildNodeConfiger(this.config, nodeEntryPoints))
|
|
117
74
|
.then(async (nodeContext) => {
|
|
118
75
|
if (mode == "DEV") {
|
|
119
76
|
await nodeContext.watch().then((v) => {
|
|
@@ -128,7 +85,7 @@ export class ITProject {
|
|
|
128
85
|
return nodeContext;
|
|
129
86
|
}),
|
|
130
87
|
esbuild
|
|
131
|
-
.context(esbuildWebConfiger(config, webEntryPoints))
|
|
88
|
+
.context(esbuildWebConfiger(this.config, webEntryPoints))
|
|
132
89
|
.then(async (webContext) => {
|
|
133
90
|
if (mode == "DEV") {
|
|
134
91
|
await webContext.watch().then((v) => {
|
|
@@ -147,11 +104,12 @@ export class ITProject {
|
|
|
147
104
|
getSecondaryEndpointsPoints(runtime) {
|
|
148
105
|
const meta = (ts, st) => {
|
|
149
106
|
ts.forEach((t) => {
|
|
107
|
+
console.log("getSecondaryEndpointsPoints", t);
|
|
150
108
|
if (t[1] === runtime) {
|
|
151
109
|
st.add(t[0]);
|
|
152
110
|
}
|
|
153
|
-
if (Array.isArray(t[
|
|
154
|
-
meta(t[
|
|
111
|
+
if (Array.isArray(t[3])) {
|
|
112
|
+
meta(t[3], st);
|
|
155
113
|
}
|
|
156
114
|
});
|
|
157
115
|
return st;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import readline from "readline";
|
|
2
2
|
import fs from "fs";
|
|
3
|
-
import
|
|
4
|
-
import { jsonc } from "jsonc";
|
|
3
|
+
import watch from "recursive-watch";
|
|
5
4
|
import { PM_Main } from "./PM/main.js";
|
|
5
|
+
import { destinationOfRuntime } from "./utils.js";
|
|
6
6
|
var mode = process.argv[2] === "-dev" ? "DEV" : "PROD";
|
|
7
7
|
const node2web = {};
|
|
8
8
|
const web2node = {};
|
|
@@ -10,31 +10,39 @@ const childProcesses = {};
|
|
|
10
10
|
readline.emitKeypressEvents(process.stdin);
|
|
11
11
|
if (process.stdin.isTTY)
|
|
12
12
|
process.stdin.setRawMode(true);
|
|
13
|
+
// console.log("hello Puppeteer", process.env);
|
|
13
14
|
console.log("\n Puppeteer is running. Press 'q' to quit\n");
|
|
14
15
|
process.stdin.on("keypress", (str, key) => {
|
|
15
16
|
if (key.name === "q") {
|
|
16
17
|
process.exit();
|
|
17
18
|
}
|
|
18
19
|
});
|
|
19
|
-
|
|
20
|
-
const
|
|
21
|
-
|
|
20
|
+
export default async (partialConfig) => {
|
|
21
|
+
const config = Object.assign(Object.assign({}, partialConfig), { buildDir: process.cwd() + "/" + partialConfig.outdir });
|
|
22
|
+
fs.writeFileSync(`${config.outdir}/testeranto.json`, JSON.stringify(Object.assign(Object.assign({}, config), { buildDir: process.cwd() + "/" + config.outdir }), null, 2));
|
|
23
|
+
const pm = new PM_Main(config);
|
|
22
24
|
await pm.startPuppeteer({
|
|
25
|
+
// timeout: 1,
|
|
23
26
|
waitForInitialPage: false,
|
|
24
|
-
executablePath:
|
|
27
|
+
executablePath:
|
|
28
|
+
// process.env.CHROMIUM_PATH || "/opt/homebrew/bin/chromium",
|
|
29
|
+
"/opt/homebrew/bin/chromium",
|
|
25
30
|
headless: true,
|
|
26
31
|
dumpio: true,
|
|
32
|
+
// timeout: 0,
|
|
27
33
|
args: [
|
|
34
|
+
// "--auto-open-devtools-for-tabs",
|
|
35
|
+
"--disable-features=IsolateOrigins,site-per-process",
|
|
36
|
+
"--disable-site-isolation-trials",
|
|
37
|
+
"--allow-insecure-localhost",
|
|
28
38
|
"--allow-file-access-from-files",
|
|
29
39
|
"--allow-running-insecure-content",
|
|
30
|
-
"--auto-open-devtools-for-tabs",
|
|
31
40
|
"--disable-dev-shm-usage",
|
|
32
41
|
"--disable-extensions",
|
|
33
42
|
"--disable-gpu",
|
|
34
43
|
"--disable-setuid-sandbox",
|
|
35
44
|
"--disable-site-isolation-trials",
|
|
36
45
|
"--disable-web-security",
|
|
37
|
-
"--disable-web-security",
|
|
38
46
|
"--no-first-run",
|
|
39
47
|
"--no-sandbox",
|
|
40
48
|
"--no-startup-window",
|
|
@@ -53,30 +61,21 @@ const main = async () => {
|
|
|
53
61
|
// "--start-maximized",
|
|
54
62
|
],
|
|
55
63
|
}, ".");
|
|
56
|
-
|
|
57
|
-
return path
|
|
58
|
-
.normalize(`${configs.buildDir}/${r}/${f}`)
|
|
59
|
-
.split(".")
|
|
60
|
-
.slice(0, -1)
|
|
61
|
-
.join(".");
|
|
62
|
-
};
|
|
63
|
-
configs.tests.forEach(([test, runtime, secondaryArtifacts]) => {
|
|
64
|
+
config.tests.forEach(([test, runtime, tr, sidecars]) => {
|
|
64
65
|
if (runtime === "node") {
|
|
65
|
-
pm.launchNode(test, destinationOfRuntime(test, "node"));
|
|
66
|
+
pm.launchNode(test, destinationOfRuntime(test, "node", config));
|
|
66
67
|
}
|
|
67
68
|
else if (runtime === "web") {
|
|
68
|
-
pm.launchWeb(test, destinationOfRuntime(test, "web"));
|
|
69
|
+
pm.launchWeb(test, destinationOfRuntime(test, "web", config), sidecars);
|
|
69
70
|
}
|
|
70
71
|
else {
|
|
71
72
|
console.error("runtime makes no sense", runtime);
|
|
72
73
|
}
|
|
73
74
|
});
|
|
74
|
-
console.log("ready and watching for changes...",
|
|
75
|
-
|
|
76
|
-
recursive: true,
|
|
77
|
-
}, (eventType, changedFile) => {
|
|
75
|
+
console.log("ready and watching for changes...", config.buildDir);
|
|
76
|
+
watch(config.buildDir, (eventType, changedFile) => {
|
|
78
77
|
if (changedFile) {
|
|
79
|
-
|
|
78
|
+
config.tests.forEach(([test, runtime, tr, sidecars]) => {
|
|
80
79
|
if (eventType === "change" || eventType === "rename") {
|
|
81
80
|
if (changedFile ===
|
|
82
81
|
test
|
|
@@ -85,7 +84,7 @@ const main = async () => {
|
|
|
85
84
|
.slice(0, -1)
|
|
86
85
|
.concat("mjs")
|
|
87
86
|
.join(".")) {
|
|
88
|
-
pm.launchNode(test, destinationOfRuntime(test, "node"));
|
|
87
|
+
pm.launchNode(test, destinationOfRuntime(test, "node", config));
|
|
89
88
|
}
|
|
90
89
|
if (changedFile ===
|
|
91
90
|
test
|
|
@@ -94,11 +93,51 @@ const main = async () => {
|
|
|
94
93
|
.slice(0, -1)
|
|
95
94
|
.concat("mjs")
|
|
96
95
|
.join(".")) {
|
|
97
|
-
pm.launchWeb(test, destinationOfRuntime(test, "web"));
|
|
96
|
+
pm.launchWeb(test, destinationOfRuntime(test, "web", config), sidecars);
|
|
98
97
|
}
|
|
99
98
|
}
|
|
100
99
|
});
|
|
101
100
|
}
|
|
102
101
|
});
|
|
102
|
+
// does not work on linux
|
|
103
|
+
// fs.watch(
|
|
104
|
+
// config.buildDir,
|
|
105
|
+
// {
|
|
106
|
+
// recursive: true,
|
|
107
|
+
// },
|
|
108
|
+
// (eventType, changedFile) => {
|
|
109
|
+
// if (changedFile) {
|
|
110
|
+
// config.tests.forEach(([test, runtime, tr, sidecars]) => {
|
|
111
|
+
// if (eventType === "change" || eventType === "rename") {
|
|
112
|
+
// if (
|
|
113
|
+
// changedFile ===
|
|
114
|
+
// test
|
|
115
|
+
// .replace("./", "node/")
|
|
116
|
+
// .split(".")
|
|
117
|
+
// .slice(0, -1)
|
|
118
|
+
// .concat("mjs")
|
|
119
|
+
// .join(".")
|
|
120
|
+
// ) {
|
|
121
|
+
// pm.launchNode(test, destinationOfRuntime(test, "node", config));
|
|
122
|
+
// }
|
|
123
|
+
// if (
|
|
124
|
+
// changedFile ===
|
|
125
|
+
// test
|
|
126
|
+
// .replace("./", "web/")
|
|
127
|
+
// .split(".")
|
|
128
|
+
// .slice(0, -1)
|
|
129
|
+
// .concat("mjs")
|
|
130
|
+
// .join(".")
|
|
131
|
+
// ) {
|
|
132
|
+
// pm.launchWeb(
|
|
133
|
+
// test,
|
|
134
|
+
// destinationOfRuntime(test, "web", config),
|
|
135
|
+
// sidecars
|
|
136
|
+
// );
|
|
137
|
+
// }
|
|
138
|
+
// }
|
|
139
|
+
// });
|
|
140
|
+
// }
|
|
141
|
+
// }
|
|
142
|
+
// );
|
|
103
143
|
};
|
|
104
|
-
main();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createElement } from "react";
|
|
2
2
|
import ReactDom from "react-dom/client";
|
|
3
3
|
import Testeranto from "../../../Web.js";
|
|
4
|
-
export default (testInput, testSpecifications, testImplementations) => {
|
|
4
|
+
export default (testInput, testSpecifications, testImplementations, testInterface) => {
|
|
5
5
|
class TesterantoComponent extends testInput {
|
|
6
6
|
constructor(props) {
|
|
7
7
|
super(props);
|
|
@@ -14,7 +14,6 @@ export default (testInput, testSpecifications, testImplementations) => {
|
|
|
14
14
|
}
|
|
15
15
|
const t = Testeranto(testInput, testSpecifications, testImplementations, {
|
|
16
16
|
beforeAll: async (initialProps, artificer) => {
|
|
17
|
-
console.log("mark5", initialProps);
|
|
18
17
|
return await new Promise((resolve, rej) => {
|
|
19
18
|
const htmlElement = document.getElementById("root");
|
|
20
19
|
if (htmlElement) {
|
|
@@ -66,29 +65,10 @@ export default (testInput, testSpecifications, testImplementations) => {
|
|
|
66
65
|
butThen: async function (s, thenCB) {
|
|
67
66
|
return thenCB(s);
|
|
68
67
|
},
|
|
69
|
-
afterEach:
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
const parsedUrl = new URL(x.url());
|
|
74
|
-
parsedUrl.search = "";
|
|
75
|
-
const strippedUrl = parsedUrl.toString();
|
|
76
|
-
return (strippedUrl ===
|
|
77
|
-
"file:///Users/adam/Code/kokomoBay/docs/web/src/ClassicalComponent/react-dom/client.web.test.html");
|
|
78
|
-
// return true;
|
|
79
|
-
})[0];
|
|
80
|
-
const x = await page.screenshot({
|
|
81
|
-
path: "afterEachLog.jpg",
|
|
82
|
-
});
|
|
83
|
-
console.log("x", x);
|
|
84
|
-
// debugger;
|
|
85
|
-
// const div_root = document.getElementById("root");
|
|
86
|
-
// store.domRoot && store.domRoot.unmount(); //React 18
|
|
87
|
-
// store.remove();
|
|
88
|
-
// store.htmlElement.remove();
|
|
89
|
-
// store.htmlElement = document.createElement("root");
|
|
90
|
-
return store;
|
|
91
|
-
},
|
|
68
|
+
afterEach: (testInterface === null || testInterface === void 0 ? void 0 : testInterface.afterEach) ||
|
|
69
|
+
async function (store, ndx, artificer, utils) {
|
|
70
|
+
return store;
|
|
71
|
+
},
|
|
92
72
|
afterAll: async (store, artificer, utils) => {
|
|
93
73
|
// setTimeout(() => {
|
|
94
74
|
// console.log("This will run after 1 second");
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import React, { useEffect, useRef } from "react";
|
|
2
|
+
import { createElement } from "react";
|
|
3
|
+
import ReactDom from "react-dom/client";
|
|
4
|
+
import Testeranto from "../../../Web.js";
|
|
5
|
+
const TesterantoComponent = ({ done, innerComp, }) => {
|
|
6
|
+
const myContainer = useRef(null);
|
|
7
|
+
useEffect(() => {
|
|
8
|
+
console.log("useEffect called!", myContainer.current);
|
|
9
|
+
done(myContainer.current);
|
|
10
|
+
}, []);
|
|
11
|
+
return React.createElement("div", { ref: myContainer }, innerComp());
|
|
12
|
+
};
|
|
13
|
+
export default (testImplementations, testSpecifications, testInput) => {
|
|
14
|
+
const t = Testeranto(testInput, testSpecifications, testImplementations, {
|
|
15
|
+
beforeAll: async (reactElement, itr) => {
|
|
16
|
+
return await new Promise((resolve, rej) => {
|
|
17
|
+
const htmlElement = document.getElementById("root");
|
|
18
|
+
if (htmlElement) {
|
|
19
|
+
const domRoot = ReactDom.createRoot(htmlElement);
|
|
20
|
+
domRoot.render(createElement(TesterantoComponent, {
|
|
21
|
+
// ...initialProps,
|
|
22
|
+
innerComp: reactElement,
|
|
23
|
+
done: (reactElement) => {
|
|
24
|
+
resolve({
|
|
25
|
+
htmlElement,
|
|
26
|
+
reactElement,
|
|
27
|
+
domRoot,
|
|
28
|
+
});
|
|
29
|
+
},
|
|
30
|
+
}, []));
|
|
31
|
+
// resolve({ htmlElement });
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
},
|
|
35
|
+
beforeEach: async (subject, initializer, artificer, testResource, pm) => {
|
|
36
|
+
return new Promise((resolve, rej) => {
|
|
37
|
+
resolve(subject);
|
|
38
|
+
// const tc = TesterantoComponent({
|
|
39
|
+
// innerComp: () =>
|
|
40
|
+
// testInput({
|
|
41
|
+
// port: 3003,
|
|
42
|
+
// address: "some-address",
|
|
43
|
+
// secretKey: "someSecretKey",
|
|
44
|
+
// abi: "foo",
|
|
45
|
+
// }),
|
|
46
|
+
// done: (reactElement: any) => {
|
|
47
|
+
// console.log("mark9");
|
|
48
|
+
// resolve(reactElement);
|
|
49
|
+
// // process.nextTick(() => {
|
|
50
|
+
// // resolve(reactElement);
|
|
51
|
+
// // });
|
|
52
|
+
// },
|
|
53
|
+
// });
|
|
54
|
+
// console.log("mark9", tc);
|
|
55
|
+
// createPortal(tc, subject.domRoot);
|
|
56
|
+
});
|
|
57
|
+
},
|
|
58
|
+
andWhen: function (s, whenCB, tr, utils) {
|
|
59
|
+
return new Promise((resolve, rej) => {
|
|
60
|
+
console.log("mark9", s, whenCB);
|
|
61
|
+
resolve(whenCB(s, utils));
|
|
62
|
+
// process.nextTick(() => {
|
|
63
|
+
// resolve(whenCB()(s));
|
|
64
|
+
// });
|
|
65
|
+
});
|
|
66
|
+
},
|
|
67
|
+
butThen: async function (s, thenCB) {
|
|
68
|
+
return new Promise((resolve, rej) => {
|
|
69
|
+
resolve(thenCB(s));
|
|
70
|
+
});
|
|
71
|
+
},
|
|
72
|
+
afterEach: async function (store, ndx, artificer) {
|
|
73
|
+
return new Promise((resolve, rej) => {
|
|
74
|
+
resolve({});
|
|
75
|
+
});
|
|
76
|
+
},
|
|
77
|
+
afterAll: (store, artificer) => {
|
|
78
|
+
return new Promise((resolve, rej) => {
|
|
79
|
+
resolve({});
|
|
80
|
+
});
|
|
81
|
+
},
|
|
82
|
+
});
|
|
83
|
+
document.addEventListener("DOMContentLoaded", function () {
|
|
84
|
+
const rootElement = document.getElementById("root");
|
|
85
|
+
if (rootElement) {
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
return t;
|
|
89
|
+
};
|
|
@@ -1,25 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import renderer, { act } from "react-test-renderer";
|
|
3
|
-
// export const testInterface = {
|
|
4
|
-
// beforeEach: function (CComponent, props): Promise<renderer.ReactTestRenderer> {
|
|
5
|
-
// return new Promise((res, rej) => {
|
|
6
|
-
// let component: renderer.ReactTestRenderer;
|
|
7
|
-
// act(() => {
|
|
8
|
-
// component = renderer.create(
|
|
9
|
-
// CComponent(props)
|
|
10
|
-
// );
|
|
11
|
-
// res(component);
|
|
12
|
-
// });
|
|
13
|
-
// });
|
|
14
|
-
// },
|
|
15
|
-
// andWhen: async function (
|
|
16
|
-
// renderer: renderer.ReactTestRenderer,
|
|
17
|
-
// whenCB: () => (any) => any
|
|
18
|
-
// ): Promise<renderer.ReactTestRenderer> {
|
|
19
|
-
// await act(() => whenCB()(renderer));
|
|
20
|
-
// return renderer
|
|
21
|
-
// }
|
|
22
|
-
// }
|
|
23
3
|
export const testInterface = {
|
|
24
4
|
beforeEach: function (CComponent, propsAndChildren) {
|
|
25
5
|
function Link(props) {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import Testeranto from "../../../Node.js";
|
|
2
|
-
import { testInterface } from "./
|
|
2
|
+
import { testInterface } from "./interface.js";
|
|
3
3
|
export default (testImplementations, testSpecifications, testInput) => Testeranto(testInput, testSpecifications, testImplementations, testInterface);
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import Testeranto from "../../../Web.js";
|
|
2
|
-
import { testInterface } from "./
|
|
2
|
+
import { testInterface } from "./interface";
|
|
3
3
|
export default (testImplementations, testSpecifications, testInput) => Testeranto(testInput, testSpecifications, testImplementations, testInterface);
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import fs from "fs";
|
|
2
|
+
import path from "path";
|
|
3
|
+
export default (platform, entryPoints) => {
|
|
4
|
+
console.log("mark3", platform);
|
|
5
|
+
return {
|
|
6
|
+
name: "metafileWriter",
|
|
7
|
+
setup(build) {
|
|
8
|
+
build.onEnd((result) => {
|
|
9
|
+
if (result.errors.length === 0) {
|
|
10
|
+
entryPoints.forEach((entryPoint) => {
|
|
11
|
+
console.log("mark1", entryPoint);
|
|
12
|
+
const filePath = path.join("./docs/", platform, entryPoint.split(".").slice(0, -1).join("."), `inputFiles.json`);
|
|
13
|
+
const dirName = path.dirname(filePath);
|
|
14
|
+
if (!fs.existsSync(dirName)) {
|
|
15
|
+
fs.mkdirSync(dirName, { recursive: true });
|
|
16
|
+
}
|
|
17
|
+
const jsonContent = JSON.stringify(Object.keys(Object.keys(result.metafile.outputs)
|
|
18
|
+
.filter((s) => {
|
|
19
|
+
if (!result.metafile.outputs[s].entryPoint) {
|
|
20
|
+
return false;
|
|
21
|
+
}
|
|
22
|
+
return (path.resolve(result.metafile.outputs[s].entryPoint) ===
|
|
23
|
+
path.resolve(entryPoint));
|
|
24
|
+
})
|
|
25
|
+
.reduce((mm, el) => {
|
|
26
|
+
mm.push(result.metafile.outputs[el].inputs);
|
|
27
|
+
return mm;
|
|
28
|
+
}, [])[0])
|
|
29
|
+
.filter((f) => {
|
|
30
|
+
const regex = /^src\/.*/g;
|
|
31
|
+
const matches = f.match(regex);
|
|
32
|
+
const passes = (matches === null || matches === void 0 ? void 0 : matches.length) === 1;
|
|
33
|
+
return passes;
|
|
34
|
+
})
|
|
35
|
+
.filter((f) => {
|
|
36
|
+
const regex = /.*\.test\..*/g;
|
|
37
|
+
const matches = f.match(regex);
|
|
38
|
+
const passes = (matches === null || matches === void 0 ? void 0 : matches.length) === 1;
|
|
39
|
+
return !passes;
|
|
40
|
+
}));
|
|
41
|
+
fs.writeFileSync(filePath, jsonContent);
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
},
|
|
46
|
+
};
|
|
47
|
+
};
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import baseEsBuildConfig from "./index.js";
|
|
2
|
+
import inputFilesPlugin from "./inputFilesPlugin.js";
|
|
2
3
|
export default (config, entryPoints) => {
|
|
3
|
-
return Object.assign(Object.assign({}, baseEsBuildConfig(config)), { splitting: true, outdir: config.outdir + "/node",
|
|
4
|
+
return Object.assign(Object.assign({}, baseEsBuildConfig(config)), { splitting: true, outdir: config.outdir + "/node",
|
|
5
|
+
// inject: [`./node_modules/testeranto/dist/cjs-shim.js`],
|
|
6
|
+
metafile: true, supported: {
|
|
4
7
|
"dynamic-import": true,
|
|
5
8
|
}, define: {
|
|
6
9
|
"process.env.FLUENTFFMPEG_COV": "0",
|
|
@@ -15,6 +18,7 @@ export default (config, entryPoints) => {
|
|
|
15
18
|
...config.externals,
|
|
16
19
|
], entryPoints: [...entryPoints], plugins: [
|
|
17
20
|
...(config.nodePlugins || []),
|
|
21
|
+
inputFilesPlugin("node", entryPoints),
|
|
18
22
|
{
|
|
19
23
|
name: "rebuild-notify",
|
|
20
24
|
setup(build) {
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// import { BuildOptions } from "esbuild";
|
|
3
|
+
// import { IBaseConfig } from "../lib/types";
|
|
4
|
+
// export default (config: IBaseConfig): BuildOptions => {
|
|
5
|
+
// return {
|
|
6
|
+
// bundle: true,
|
|
7
|
+
// entryPoints: ["./node_modules/testeranto/dist/module/report.js"],
|
|
8
|
+
// minify: config.minify === true,
|
|
9
|
+
// outbase: config.outbase,
|
|
10
|
+
// write: true,
|
|
11
|
+
// outfile: `${config.outdir}/report.js`,
|
|
12
|
+
// external: ["tests.json", "features.test.js"],
|
|
13
|
+
// };
|
|
14
|
+
// };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import path from "path";
|
|
2
2
|
import baseEsBuildConfig from "./index.js";
|
|
3
|
+
import inputFilesPlugin from "./inputFilesPlugin.js";
|
|
3
4
|
export default (config, entryPoints) => {
|
|
4
5
|
return Object.assign(Object.assign({}, baseEsBuildConfig(config)), {
|
|
5
6
|
// inject: ["./node_modules/testeranto/dist/cjs-shim.js"],
|
|
@@ -9,7 +10,7 @@ export default (config, entryPoints) => {
|
|
|
9
10
|
// splitting: true,
|
|
10
11
|
outdir: config.outdir + "/web", alias: {
|
|
11
12
|
react: path.resolve("./node_modules/react"),
|
|
12
|
-
}, external: [
|
|
13
|
+
}, metafile: true, external: [
|
|
13
14
|
"testeranto.json",
|
|
14
15
|
"features.test.ts",
|
|
15
16
|
// "url",
|
|
@@ -33,6 +34,7 @@ export default (config, entryPoints) => {
|
|
|
33
34
|
"dns",
|
|
34
35
|
], platform: "browser", entryPoints: [...entryPoints], plugins: [
|
|
35
36
|
...(config.webPlugins || []),
|
|
37
|
+
inputFilesPlugin("web", entryPoints),
|
|
36
38
|
{
|
|
37
39
|
name: "rebuild-notify",
|
|
38
40
|
setup(build) {
|