testeranto 0.134.0 → 0.140.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/.aider.chat.history.md +14577 -0
- package/.aider.input.history +566 -0
- package/.aider.tags.cache.v3/{8d/fa/12860238755bcfab9af8a93c52ab.val → bd/91/b71f967fd074cf4b757081b429b7.val} +0 -0
- package/.aider.tags.cache.v3/cache.db +0 -0
- package/.aider.tags.cache.v3/{18/8b/7dfca822129dad10b5cacadf7728.val → fb/96/b0f91c7e75e08fc5a6907633cf99.val} +0 -0
- package/README.md +29 -423
- package/bundle.js +1 -1
- package/dist/common/src/CoreTypes.js +2 -0
- package/dist/common/src/Init.js +4 -1
- package/dist/common/src/Node.js +1 -1
- package/dist/common/src/PM/PM_WithEslintAndTsc.js +10 -8
- package/dist/common/src/PM/__tests__/nodeSidecar.testeranto.js +2 -2
- package/dist/common/src/PM/main.js +12 -7
- package/dist/common/src/PM/node.js +10 -3
- package/dist/common/src/Web.js +2 -2
- package/dist/common/src/build.js +7 -72
- package/dist/common/src/defaultConfig.js +0 -1
- package/dist/common/src/esbuildConfigs/eslint-formatter-testeranto.js +16 -1
- package/dist/common/src/esbuildConfigs/node.js +2 -16
- package/dist/common/src/esbuildConfigs/pure.js +2 -16
- package/dist/common/src/esbuildConfigs/rebuildPlugin.js +22 -0
- package/dist/common/src/esbuildConfigs/web.js +2 -16
- package/dist/common/src/lib/abstractBase.js +8 -1
- package/dist/common/src/lib/basebuilder.js +4 -0
- package/dist/common/src/lib/classBuilder.js +2 -3
- package/dist/common/src/lib/core.js +2 -0
- package/dist/common/src/run.js +1 -1
- package/dist/common/src/utils/buildTemplates.js +88 -0
- package/dist/common/tsconfig.common.tsbuildinfo +1 -1
- package/dist/module/src/Init.js +4 -1
- package/dist/module/src/Node.js +1 -1
- package/dist/module/src/PM/PM_WithEslintAndTsc.js +10 -8
- package/dist/module/src/PM/__tests__/nodeSidecar.testeranto.js +2 -2
- package/dist/module/src/PM/main.js +12 -7
- package/dist/module/src/PM/node.js +10 -3
- package/dist/module/src/Project.js +41 -47
- package/dist/module/src/TestReport.js +34 -31
- package/dist/module/src/Web.js +2 -2
- package/dist/module/src/build.js +7 -72
- package/dist/module/src/defaultConfig.js +0 -1
- package/dist/module/src/esbuildConfigs/eslint-formatter-testeranto.js +16 -1
- package/dist/module/src/esbuildConfigs/node.js +2 -16
- package/dist/module/src/esbuildConfigs/pure.js +2 -16
- package/dist/module/src/esbuildConfigs/rebuildPlugin.js +17 -0
- package/dist/module/src/esbuildConfigs/web.js +2 -16
- package/dist/module/src/lib/abstractBase.js +8 -1
- package/dist/module/src/lib/basebuilder.js +4 -0
- package/dist/module/src/lib/classBuilder.js +2 -3
- package/dist/module/src/lib/core.js +2 -0
- package/dist/module/src/run.js +1 -1
- package/dist/module/src/utils/buildTemplates.js +82 -0
- package/dist/module/tsconfig.module.tsbuildinfo +1 -1
- package/dist/prebuild/Project.js +77 -29
- package/dist/prebuild/TestReport.js +51 -32
- package/dist/prebuild/build.mjs +132 -131
- package/dist/prebuild/esbuildConfigs/eslint-formatter-testeranto.mjs +14 -1
- package/dist/prebuild/init-docs.mjs +0 -4
- package/dist/prebuild/run.mjs +50 -31
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/dist/types/src/CoreTypes.d.ts +53 -0
- package/dist/types/src/Node.d.ts +3 -3
- package/dist/types/src/PM/__tests__/nodeSidecar.testeranto.d.ts +2 -4
- package/dist/types/src/PM/__tests__/pureSidecar.testeranto.d.ts +2 -4
- package/dist/types/src/PM/__tests__/webSidecar.testeranto.d.ts +2 -4
- package/dist/types/src/PM/index.d.ts +1 -1
- package/dist/types/src/PM/nodeSidecar.d.ts +2 -2
- package/dist/types/src/Pure.d.ts +3 -3
- package/dist/types/src/Types.d.ts +21 -61
- package/dist/types/src/Web.d.ts +3 -3
- package/dist/types/src/esbuildConfigs/rebuildPlugin.d.ts +6 -0
- package/dist/types/src/lib/abstractBase.d.ts +10 -16
- package/dist/types/src/lib/basebuilder.d.ts +3 -3
- package/dist/types/src/lib/classBuilder.d.ts +2 -2
- package/dist/types/src/lib/core.d.ts +2 -2
- package/dist/types/src/lib/index.d.ts +7 -6
- package/dist/types/src/lib/types.d.ts +8 -8
- package/dist/types/src/mothership/test.d.ts +2 -2
- package/dist/types/src/utils/buildTemplates.d.ts +3 -0
- package/dist/types/tsconfig.types.tsbuildinfo +1 -1
- package/docs/index.md +567 -0
- package/docs/style.md +116 -0
- package/docs.html +537 -0
- package/example.css +351 -0
- package/fonts/M_PLUS_Rounded_1c/MPLUSRounded1c-Black.ttf +0 -0
- package/fonts/M_PLUS_Rounded_1c/MPLUSRounded1c-Bold.ttf +0 -0
- package/fonts/M_PLUS_Rounded_1c/MPLUSRounded1c-ExtraBold.ttf +0 -0
- package/fonts/M_PLUS_Rounded_1c/MPLUSRounded1c-Light.ttf +0 -0
- package/fonts/M_PLUS_Rounded_1c/MPLUSRounded1c-Medium.ttf +0 -0
- package/fonts/M_PLUS_Rounded_1c/MPLUSRounded1c-Regular.ttf +0 -0
- package/fonts/M_PLUS_Rounded_1c/MPLUSRounded1c-Thin.ttf +0 -0
- package/fonts/M_PLUS_Rounded_1c/OFL.txt +91 -0
- package/index.html +245 -24
- package/logo.svg +72 -0
- package/package.json +11 -2
- package/scripts/compile-docs.js +89 -0
- package/src/CoreTypes.ts +152 -0
- package/src/Init.ts +4 -4
- package/src/Node.ts +13 -13
- package/src/PM/PM_WithEslintAndTsc.ts +46 -15
- package/src/PM/__tests__/nodeSidecar.testeranto.ts +13 -20
- package/src/PM/__tests__/pureSidecar.testeranto.ts +8 -15
- package/src/PM/__tests__/webSidecar.testeranto.ts +8 -15
- package/src/PM/index.ts +1 -1
- package/src/PM/main.ts +17 -16
- package/src/PM/node.ts +10 -10
- package/src/PM/nodeSidecar.ts +2 -2
- package/src/PM/pure.ts +0 -4
- package/src/Project.tsx +289 -292
- package/src/Pure.ts +13 -14
- package/src/PureSidecar.ts +1 -0
- package/src/TestReport.tsx +179 -165
- package/src/Types.ts +52 -151
- package/src/Web.ts +15 -14
- package/src/build.ts +22 -72
- package/src/defaultConfig.ts +2 -1
- package/src/esbuildConfigs/eslint-formatter-testeranto.ts +17 -1
- package/src/esbuildConfigs/node.ts +2 -18
- package/src/esbuildConfigs/pure.ts +2 -18
- package/src/esbuildConfigs/rebuildPlugin.ts +23 -0
- package/src/esbuildConfigs/web.ts +2 -18
- package/src/lib/BaseSuite.test.ts +457 -0
- package/src/lib/BaseSuite.ts +155 -0
- package/src/lib/abstractBase.ts +13 -163
- package/src/lib/basebuilder.ts +11 -11
- package/src/lib/classBuilder.ts +13 -7
- package/src/lib/core.ts +13 -17
- package/src/lib/index.ts +21 -24
- package/src/lib/types.ts +23 -9
- package/src/mothership/test.ts +13 -10
- package/src/run.ts +1 -1
- package/src/style.css +1 -1
- package/src/utils/buildTemplates.ts +88 -0
- package/style.css +496 -0
- package/testeranto/bundles/node/{mothership/chunk-V2EQEXU2.mjs → allTests/chunk-4PJCC2XT.mjs} +66 -59
- package/testeranto/bundles/node/allTests/metafile.json +4151 -0
- package/testeranto/bundles/node/allTests/src/PM/__tests__/nodeSidecar.testeranto.mjs +187 -0
- package/testeranto/bundles/node/{mothership → allTests}/src/PM/__tests__/pureSidecar.testeranto.mjs +1 -1
- package/testeranto/bundles/node/{mothership → allTests}/src/PM/__tests__/webSidecar.testeranto.mjs +1 -1
- package/testeranto/bundles/node/allTests/src/lib/BaseSuite.test.mjs +305 -0
- package/testeranto/bundles/node/{mothership → allTests}/src/mothership/test.mjs +1 -1
- package/testeranto/dev.html +29 -0
- package/testeranto/index.html +28 -27
- package/testeranto/reports/allTests/config.json +57 -0
- package/testeranto/reports/{mothership/index.html → allTests/dev.html} +2 -0
- package/testeranto/reports/allTests/index.html +26 -0
- package/testeranto/reports/{mothership/src/PM/__tests__/sidecar.testeranto/node/index.html → allTests/src/PM/__tests__/nodeSidecar.testeranto/node/dev.html} +4 -3
- package/testeranto/reports/allTests/src/PM/__tests__/nodeSidecar.testeranto/node/index.html +21 -0
- package/testeranto/reports/allTests/src/PM/__tests__/nodeSidecar.testeranto/node/lint_errors.json +80 -0
- package/testeranto/reports/allTests/src/PM/__tests__/nodeSidecar.testeranto/node/message +1 -0
- package/testeranto/reports/allTests/src/PM/__tests__/nodeSidecar.testeranto/node/prompt.txt +8 -0
- package/testeranto/reports/allTests/src/PM/__tests__/nodeSidecar.testeranto/node/type_errors.txt +28 -0
- package/testeranto/reports/{mothership/src/PM/__tests__/webSidecar.testeranto/node/index.html → allTests/src/PM/__tests__/pureSidecar.testeranto/node/dev.html} +4 -3
- package/testeranto/reports/allTests/src/PM/__tests__/pureSidecar.testeranto/node/index.html +21 -0
- package/testeranto/reports/{mothership → allTests}/src/PM/__tests__/pureSidecar.testeranto/node/lint_errors.json +12 -12
- package/testeranto/reports/allTests/src/PM/__tests__/pureSidecar.testeranto/node/message +1 -0
- package/testeranto/reports/allTests/src/PM/__tests__/pureSidecar.testeranto/node/prompt.txt +8 -0
- package/testeranto/reports/allTests/src/PM/__tests__/pureSidecar.testeranto/node/type_errors.txt +32 -0
- package/testeranto/reports/{mothership/src/PM/__tests__/nodeSidecar.testeranto/node/index.html → allTests/src/PM/__tests__/webSidecar.testeranto/node/dev.html} +4 -3
- package/testeranto/reports/allTests/src/PM/__tests__/webSidecar.testeranto/node/index.html +21 -0
- package/testeranto/reports/{mothership → allTests}/src/PM/__tests__/webSidecar.testeranto/node/lint_errors.json +12 -12
- package/testeranto/reports/allTests/src/PM/__tests__/webSidecar.testeranto/node/message +1 -0
- package/testeranto/reports/allTests/src/PM/__tests__/webSidecar.testeranto/node/prompt.txt +8 -0
- package/testeranto/reports/allTests/src/PM/__tests__/webSidecar.testeranto/node/type_errors.txt +32 -0
- package/testeranto/reports/allTests/src/lib/BaseSuite.test/node/console_log.txt +35 -0
- package/testeranto/reports/{mothership/src/PM/__tests__/pureSidecar.testeranto/node/index.html → allTests/src/lib/BaseSuite.test/node/dev.html} +4 -3
- package/testeranto/reports/allTests/src/lib/BaseSuite.test/node/index.html +21 -0
- package/testeranto/reports/allTests/src/lib/BaseSuite.test/node/lint_errors.json +608 -0
- package/testeranto/reports/allTests/src/lib/BaseSuite.test/node/message +1 -0
- package/testeranto/reports/allTests/src/lib/BaseSuite.test/node/prompt.txt +7 -0
- package/testeranto/reports/allTests/src/lib/BaseSuite.test/node/type_errors.txt +68 -0
- package/testeranto/reports/allTests/src/mothership/test/node/dev.html +21 -0
- package/testeranto/reports/allTests/src/mothership/test/node/index.html +21 -0
- package/testeranto/reports/allTests/src/mothership/test/node/message +1 -0
- package/testeranto/reports/allTests/src/mothership/test/node/prompt.txt +8 -0
- package/testeranto/reports/allTests/src/mothership/test/node/type_errors.txt +24 -0
- package/testeranto/reports/allTests/summary.json +37 -0
- package/testeranto.config.ts +16 -26
- package/tsc.log +66 -69
- package/.aider.tags.cache.v3/cache.db-shm +0 -0
- package/.aider.tags.cache.v3/cache.db-wal +0 -0
- package/dist/common/src/SP__Polygon.test.js +0 -10
- package/dist/module/src/ReportClient.js +0 -132
- package/dist/module/src/SP__Polygon.test.js +0 -8
- package/dist/prebuild/ReportClient.js +0 -3
- package/src/ReportClient.tsx +0 -164
- package/src/SP__Polygon.test.ts +0 -13
- package/testeranto/ReportClient.css +0 -11367
- package/testeranto/ReportClient.js +0 -24641
- package/testeranto/bundles/node/mothership/metafile.json +0 -389
- package/testeranto/bundles/node/mothership/src/PM/__tests__/nodeSidecar.testeranto.mjs +0 -1219
- package/testeranto/bundles/node/mothership/src/PM/__tests__/sidecar.testeranto.mjs +0 -1199
- package/testeranto/reports/mothership/config.json +0 -25
- package/testeranto/reports/mothership/src/PM/__tests__/nodeSidecar.testeranto/node/console_log.txt +0 -0
- package/testeranto/reports/mothership/src/PM/__tests__/nodeSidecar.testeranto/node/lint_errors.json +0 -1564
- package/testeranto/reports/mothership/src/PM/__tests__/nodeSidecar.testeranto/node/prompt.txt +0 -22
- package/testeranto/reports/mothership/src/PM/__tests__/nodeSidecar.testeranto/node/type_errors.txt +0 -35
- package/testeranto/reports/mothership/src/PM/__tests__/pureSidecar.testeranto/node/prompt.txt +0 -12
- package/testeranto/reports/mothership/src/PM/__tests__/pureSidecar.testeranto/node/type_errors.txt +0 -26
- package/testeranto/reports/mothership/src/PM/__tests__/sidecar.testeranto/node/bdd_errors.txt +0 -1
- package/testeranto/reports/mothership/src/PM/__tests__/sidecar.testeranto/node/console_log.txt +0 -0
- package/testeranto/reports/mothership/src/PM/__tests__/sidecar.testeranto/node/lint_errors.json +0 -1564
- package/testeranto/reports/mothership/src/PM/__tests__/sidecar.testeranto/node/log.txt +0 -0
- package/testeranto/reports/mothership/src/PM/__tests__/sidecar.testeranto/node/prompt.txt +0 -22
- package/testeranto/reports/mothership/src/PM/__tests__/sidecar.testeranto/node/tests.json +0 -56
- package/testeranto/reports/mothership/src/PM/__tests__/sidecar.testeranto/node/type_errors.txt +0 -29
- package/testeranto/reports/mothership/src/PM/__tests__/webSidecar.testeranto/node/prompt.txt +0 -12
- package/testeranto/reports/mothership/src/PM/__tests__/webSidecar.testeranto/node/type_errors.txt +0 -26
- package/testeranto/reports/mothership/src/mothership/test/node/bdd_errors.txt +0 -1
- package/testeranto/reports/mothership/src/mothership/test/node/console_log.txt +0 -4
- package/testeranto/reports/mothership/src/mothership/test/node/index.html +0 -20
- package/testeranto/reports/mothership/src/mothership/test/node/log.txt +0 -0
- package/testeranto/reports/mothership/src/mothership/test/node/prompt.txt +0 -12
- package/testeranto/reports/mothership/src/mothership/test/node/tests.json +0 -24
- package/testeranto/reports/mothership/src/mothership/test/node/type_errors.txt +0 -18
- package/testeranto/reports/mothership/summary.json +0 -9
- /package/dist/{types/src/SP__Polygon.test.d.ts → module/src/CoreTypes.js} +0 -0
- /package/testeranto/bundles/node/{mothership → allTests}/chunk-PG6KUKNP.mjs +0 -0
- /package/testeranto/bundles/pure/{mothership → allTests}/metafile.json +0 -0
- /package/testeranto/bundles/web/{mothership → allTests}/metafile.json +0 -0
- /package/testeranto/reports/{mothership/src/PM/__tests__/nodeSidecar.testeranto → allTests/src/lib/BaseSuite.test}/node/log.txt +0 -0
- /package/testeranto/reports/{mothership → allTests}/src/mothership/test/node/lint_errors.json +0 -0
|
@@ -150,9 +150,16 @@ class PM_Node extends _1.PM {
|
|
|
150
150
|
if (error) {
|
|
151
151
|
console.error(`❗️testArtiFactory failed`, targetDir, error);
|
|
152
152
|
}
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
153
|
+
// fs.writeFileSync(
|
|
154
|
+
// path.resolve(
|
|
155
|
+
// targetDir.split("/").slice(0, -1).join("/"),
|
|
156
|
+
// "manifest"
|
|
157
|
+
// ),
|
|
158
|
+
// fPaths.join(`\n`),
|
|
159
|
+
// {
|
|
160
|
+
// encoding: "utf-8",
|
|
161
|
+
// }
|
|
162
|
+
// );
|
|
156
163
|
if (Buffer.isBuffer(value)) {
|
|
157
164
|
fs_1.default.writeFileSync(fPath, value, "binary");
|
|
158
165
|
res();
|
package/dist/common/src/Web.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
3
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
4
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
5
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
6
|
};
|
|
@@ -10,8 +12,6 @@ const index_js_1 = require("./lib/index.js");
|
|
|
10
12
|
let errorCallback = (e) => { };
|
|
11
13
|
let unhandledrejectionCallback = (event) => {
|
|
12
14
|
console.log("window.addEventListener unhandledrejection", event);
|
|
13
|
-
// cb({ error: event.reason.message });
|
|
14
|
-
// throw event;
|
|
15
15
|
};
|
|
16
16
|
class WebTesteranto extends core_js_1.default {
|
|
17
17
|
constructor(input, testSpecification, testImplementation, testResourceRequirement, testInterface) {
|
package/dist/common/src/build.js
CHANGED
|
@@ -48,6 +48,7 @@ const web_js_1 = __importDefault(require("./esbuildConfigs/web.js"));
|
|
|
48
48
|
const pure_js_1 = __importDefault(require("./esbuildConfigs/pure.js"));
|
|
49
49
|
const web_html_js_1 = __importDefault(require("./web.html.js"));
|
|
50
50
|
const utils_js_1 = require("./utils.js");
|
|
51
|
+
const buildTemplates_js_1 = require("./utils/buildTemplates.js");
|
|
51
52
|
readline_1.default.emitKeypressEvents(process.stdin);
|
|
52
53
|
if (process.stdin.isTTY)
|
|
53
54
|
process.stdin.setRawMode(true);
|
|
@@ -144,59 +145,11 @@ Promise.resolve(`${process.cwd() + "/" + "testeranto.config.ts"}`).then(s => __i
|
|
|
144
145
|
if (!fs_1.default.existsSync(`testeranto/reports/${testName}`)) {
|
|
145
146
|
fs_1.default.mkdirSync(`testeranto/reports/${testName}`);
|
|
146
147
|
}
|
|
147
|
-
fs_1.default.writeFileSync(`${process.cwd()}/testeranto/reports/${testName}/index.html`,
|
|
148
|
-
|
|
149
|
-
<html lang="en">
|
|
150
|
-
|
|
151
|
-
<head>
|
|
152
|
-
<meta name="description" content="Webpage description goes here" />
|
|
153
|
-
<meta charset="utf-8" />
|
|
154
|
-
<title>${pckge.name} - testeranto</title>
|
|
155
|
-
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
156
|
-
<meta name="author" content="" />
|
|
157
|
-
|
|
158
|
-
<link rel="stylesheet" href="../ReportClient.css" />
|
|
159
|
-
<script type="module" src="../ReportClient.js"></script>
|
|
160
|
-
|
|
161
|
-
</head>
|
|
162
|
-
|
|
163
|
-
<body>
|
|
164
|
-
<div id="root">
|
|
165
|
-
react is loading
|
|
166
|
-
</div>
|
|
167
|
-
</body>
|
|
168
|
-
|
|
169
|
-
</html>
|
|
170
|
-
`);
|
|
148
|
+
fs_1.default.writeFileSync(`${process.cwd()}/testeranto/reports/${testName}/index.html`, (0, buildTemplates_js_1.testReportPage)(pckge.name, bigConfig.reportDomain));
|
|
149
|
+
fs_1.default.writeFileSync(`${process.cwd()}/testeranto/reports/${testName}/dev.html`, (0, buildTemplates_js_1.testReportPage)(pckge.name, "/"));
|
|
171
150
|
fs_1.default.writeFileSync(`testeranto/reports/${testName}/config.json`, JSON.stringify(config, null, 2));
|
|
172
|
-
fs_1.default.writeFileSync(`${process.cwd()}/testeranto/index.html`,
|
|
173
|
-
|
|
174
|
-
<html lang="en">
|
|
175
|
-
|
|
176
|
-
<head>
|
|
177
|
-
<meta name="description" content="Webpage description goes here" />
|
|
178
|
-
<meta charset="utf-8" />
|
|
179
|
-
<title>${pckge.name} - testeranto</title>
|
|
180
|
-
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
181
|
-
<meta name="author" content="" />
|
|
182
|
-
|
|
183
|
-
<script type="application/json" id="bigConfig">
|
|
184
|
-
${JSON.stringify(Object.keys(bigConfig.projects))}
|
|
185
|
-
</script>
|
|
186
|
-
|
|
187
|
-
<link rel="stylesheet" href="Project.css" />
|
|
188
|
-
<script type="module" src="Project.js"></script>
|
|
189
|
-
|
|
190
|
-
</head>
|
|
191
|
-
|
|
192
|
-
<body>
|
|
193
|
-
<div id="root">
|
|
194
|
-
react is loading
|
|
195
|
-
</div>
|
|
196
|
-
</body>
|
|
197
|
-
|
|
198
|
-
</html>
|
|
199
|
-
`);
|
|
151
|
+
fs_1.default.writeFileSync(`${process.cwd()}/testeranto/index.html`, (0, buildTemplates_js_1.testsReportPage)(pckge.name, bigConfig.reportDomain, bigConfig.projects));
|
|
152
|
+
fs_1.default.writeFileSync(`${process.cwd()}/testeranto/dev.html`, (0, buildTemplates_js_1.testsReportPage)(pckge.name, "/", bigConfig.projects));
|
|
200
153
|
Promise.resolve(Promise.all([...getSecondaryEndpointsPoints("web")].map(async (sourceFilePath) => {
|
|
201
154
|
const sourceFileSplit = sourceFilePath.split("/");
|
|
202
155
|
const sourceDir = sourceFileSplit.slice(0, -1);
|
|
@@ -243,26 +196,8 @@ Promise.resolve(`${process.cwd() + "/" + "testeranto.config.ts"}`).then(s => __i
|
|
|
243
196
|
.slice(0, -1)
|
|
244
197
|
.join(".")}/${runtime}`;
|
|
245
198
|
await fs_1.default.mkdirSync(folder, { recursive: true });
|
|
246
|
-
fs_1.default.writeFileSync(`${folder}/index.html`,
|
|
247
|
-
|
|
248
|
-
<html lang="en">
|
|
249
|
-
|
|
250
|
-
<head>
|
|
251
|
-
<meta name="description" content="Webpage description goes here" />
|
|
252
|
-
<meta charset="utf-8" />
|
|
253
|
-
<title>${testName} - testeranto</title>
|
|
254
|
-
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
255
|
-
<meta name="author" content="" />
|
|
256
|
-
|
|
257
|
-
<link rel="stylesheet" href="../../../../../../TestReport.css" />
|
|
258
|
-
<script src="../../../../../../TestReport.js"></script>
|
|
259
|
-
|
|
260
|
-
</head>
|
|
261
|
-
|
|
262
|
-
<body>
|
|
263
|
-
<div id="root"/>
|
|
264
|
-
</body>
|
|
265
|
-
`);
|
|
199
|
+
fs_1.default.writeFileSync(`${folder}/index.html`, (0, buildTemplates_js_1.idkPage)(testName, bigConfig.reportDomain));
|
|
200
|
+
fs_1.default.writeFileSync(`${folder}/dev.html`, (0, buildTemplates_js_1.idkPage)(testName, ""));
|
|
266
201
|
});
|
|
267
202
|
});
|
|
268
203
|
[
|
|
@@ -2,5 +2,20 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.default = default_1;
|
|
4
4
|
function default_1(results) {
|
|
5
|
-
return
|
|
5
|
+
return results
|
|
6
|
+
.filter((r) => r.messages.length)
|
|
7
|
+
.map((r) => {
|
|
8
|
+
const path = r.filePath.replace(process.cwd() + "/", "");
|
|
9
|
+
return [
|
|
10
|
+
path,
|
|
11
|
+
...r.messages.map((m) => {
|
|
12
|
+
var _a;
|
|
13
|
+
return [
|
|
14
|
+
`${m.line}:${m.column} ${m.message} (${m.ruleId || ""})`,
|
|
15
|
+
...(((_a = m.suggestions) === null || _a === void 0 ? void 0 : _a.map((s) => `- ${s.message}${s.fix ? " (fix)" : ""}`)) || []),
|
|
16
|
+
].join("\n");
|
|
17
|
+
}),
|
|
18
|
+
].join("\n");
|
|
19
|
+
})
|
|
20
|
+
.join("\n\n");
|
|
6
21
|
}
|
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
const index_js_1 = __importDefault(require("./index.js"));
|
|
7
7
|
const inputFilesPlugin_js_1 = __importDefault(require("./inputFilesPlugin.js"));
|
|
8
8
|
const featuresPlugin_1 = __importDefault(require("./featuresPlugin"));
|
|
9
|
+
const rebuildPlugin_js_1 = __importDefault(require("./rebuildPlugin.js"));
|
|
9
10
|
exports.default = (config, entryPoints, testName) => {
|
|
10
11
|
const { inputFilesPluginFactory, register } = (0, inputFilesPlugin_js_1.default)("node", testName);
|
|
11
12
|
return Object.assign(Object.assign({}, (0, index_js_1.default)(config)), { splitting: true, outdir: `testeranto/bundles/node/${testName}/`,
|
|
@@ -19,22 +20,7 @@ exports.default = (config, entryPoints, testName) => {
|
|
|
19
20
|
}, platform: "node", external: ["react", ...config.externals], entryPoints: [...entryPoints], plugins: [
|
|
20
21
|
featuresPlugin_1.default,
|
|
21
22
|
inputFilesPluginFactory,
|
|
22
|
-
|
|
23
|
-
name: "rebuild-notify",
|
|
24
|
-
setup: (build) => {
|
|
25
|
-
build.onStart(() => {
|
|
26
|
-
console.log(`> node build starting...`);
|
|
27
|
-
});
|
|
28
|
-
build.onEnd((result) => {
|
|
29
|
-
console.log(`> node build ended with ${result.errors.length} errors`);
|
|
30
|
-
if (result.errors.length > 0) {
|
|
31
|
-
console.log(result);
|
|
32
|
-
}
|
|
33
|
-
// console.log(result);
|
|
34
|
-
// result.errors.length !== 0 && process.exit(-1);
|
|
35
|
-
});
|
|
36
|
-
},
|
|
37
|
-
},
|
|
23
|
+
(0, rebuildPlugin_js_1.default)("node"),
|
|
38
24
|
...(config.nodePlugins.map((p) => p(register, entryPoints)) || []),
|
|
39
25
|
] });
|
|
40
26
|
};
|
|
@@ -8,6 +8,7 @@ const inputFilesPlugin_js_1 = __importDefault(require("./inputFilesPlugin.js"));
|
|
|
8
8
|
const featuresPlugin_js_1 = __importDefault(require("./featuresPlugin.js"));
|
|
9
9
|
const node_module_1 = require("node:module");
|
|
10
10
|
const consoleDetectorPlugin_js_1 = require("./consoleDetectorPlugin.js");
|
|
11
|
+
const rebuildPlugin_js_1 = __importDefault(require("./rebuildPlugin.js"));
|
|
11
12
|
exports.default = (config, entryPoints, testName) => {
|
|
12
13
|
const { inputFilesPluginFactory, register } = (0, inputFilesPlugin_js_1.default)("pure", testName);
|
|
13
14
|
return Object.assign(Object.assign({}, (0, index_js_1.default)(config)), { drop: [], splitting: true, outdir: `testeranto/bundles/pure/${testName}/`,
|
|
@@ -33,22 +34,7 @@ exports.default = (config, entryPoints, testName) => {
|
|
|
33
34
|
});
|
|
34
35
|
},
|
|
35
36
|
},
|
|
36
|
-
|
|
37
|
-
name: "rebuild-notify",
|
|
38
|
-
setup: (build) => {
|
|
39
|
-
build.onStart(() => {
|
|
40
|
-
console.log(`> pure build starting...`);
|
|
41
|
-
});
|
|
42
|
-
build.onEnd((result) => {
|
|
43
|
-
console.log(`> pure build ended with ${result.errors.length} errors`);
|
|
44
|
-
if (result.errors.length > 0) {
|
|
45
|
-
console.log(result);
|
|
46
|
-
}
|
|
47
|
-
// console.log(result);
|
|
48
|
-
// result.errors.length !== 0 && process.exit(-1);
|
|
49
|
-
});
|
|
50
|
-
},
|
|
51
|
-
},
|
|
37
|
+
(0, rebuildPlugin_js_1.default)("pure"),
|
|
52
38
|
...((config.nodePlugins || []).map((p) => p(register, entryPoints)) ||
|
|
53
39
|
[]),
|
|
54
40
|
] });
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const fs_1 = __importDefault(require("fs"));
|
|
7
|
+
exports.default = (r) => {
|
|
8
|
+
return {
|
|
9
|
+
name: "rebuild-notify",
|
|
10
|
+
setup: (build) => {
|
|
11
|
+
build.onStart(() => {
|
|
12
|
+
console.log(`> web build starting...`);
|
|
13
|
+
});
|
|
14
|
+
build.onEnd((result) => {
|
|
15
|
+
console.log(`> web build ended with ${result.errors.length} errors`);
|
|
16
|
+
if (result.errors.length > 0) {
|
|
17
|
+
fs_1.default.writeFileSync(`./testeranto/reports${r}_build_errors`, JSON.stringify(result, null, 2));
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
},
|
|
21
|
+
};
|
|
22
|
+
};
|
|
@@ -8,6 +8,7 @@ const path_1 = __importDefault(require("path"));
|
|
|
8
8
|
const index_js_1 = __importDefault(require("./index.js"));
|
|
9
9
|
const inputFilesPlugin_js_1 = __importDefault(require("./inputFilesPlugin.js"));
|
|
10
10
|
const featuresPlugin_js_1 = __importDefault(require("./featuresPlugin.js"));
|
|
11
|
+
const rebuildPlugin_js_1 = __importDefault(require("./rebuildPlugin.js"));
|
|
11
12
|
exports.default = (config, entryPoints, testName) => {
|
|
12
13
|
const { inputFilesPluginFactory, register } = (0, inputFilesPlugin_js_1.default)("web", testName);
|
|
13
14
|
return Object.assign(Object.assign({}, (0, index_js_1.default)(config)), { treeShaking: true, outdir: `testeranto/bundles/web/${testName}`, alias: {
|
|
@@ -41,22 +42,7 @@ exports.default = (config, entryPoints, testName) => {
|
|
|
41
42
|
// 'fs': false,
|
|
42
43
|
// }
|
|
43
44
|
}),
|
|
44
|
-
|
|
45
|
-
name: "rebuild-notify",
|
|
46
|
-
setup: (build) => {
|
|
47
|
-
build.onStart(() => {
|
|
48
|
-
console.log(`> web build starting...`);
|
|
49
|
-
});
|
|
50
|
-
build.onEnd((result) => {
|
|
51
|
-
console.log(`> web build ended with ${result.errors.length} errors`);
|
|
52
|
-
if (result.errors.length > 0) {
|
|
53
|
-
console.log(result);
|
|
54
|
-
}
|
|
55
|
-
// console.log(result);
|
|
56
|
-
// result.errors.length !== 0 && process.exit(-1);
|
|
57
|
-
});
|
|
58
|
-
},
|
|
59
|
-
},
|
|
45
|
+
(0, rebuildPlugin_js_1.default)("web"),
|
|
60
46
|
...((config.webPlugins || []).map((p) => p(register, entryPoints)) || []),
|
|
61
47
|
] });
|
|
62
48
|
};
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
3
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
5
|
exports.BaseCheck = exports.BaseThen = exports.BaseWhen = exports.BaseGiven = exports.BaseSuite = void 0;
|
|
4
6
|
const pmProxy_js_1 = require("./pmProxy.js");
|
|
@@ -105,7 +107,12 @@ class BaseGiven {
|
|
|
105
107
|
return {
|
|
106
108
|
key: this.key,
|
|
107
109
|
name: this.name,
|
|
108
|
-
whens: this.whens.map((w) =>
|
|
110
|
+
whens: this.whens.map((w) => {
|
|
111
|
+
if (w && w.toObj)
|
|
112
|
+
return w.toObj();
|
|
113
|
+
console.error("w is not as expected!", w);
|
|
114
|
+
return {};
|
|
115
|
+
}),
|
|
109
116
|
thens: this.thens.map((t) => t.toObj()),
|
|
110
117
|
error: this.error ? [this.error, this.error.stack] : null,
|
|
111
118
|
failed: this.failed,
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
3
|
+
/* eslint-disable @typescript-eslint/no-empty-object-type */
|
|
4
|
+
/* eslint-disable no-async-promise-executor */
|
|
5
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
7
|
exports.BaseBuilder = void 0;
|
|
4
8
|
class BaseBuilder {
|
|
@@ -12,14 +12,13 @@ class ClassBuilder extends basebuilder_js_1.BaseBuilder {
|
|
|
12
12
|
}, {});
|
|
13
13
|
const classyGivens = Object.entries(testImplementation.givens).reduce((a, [key, g]) => {
|
|
14
14
|
a[key] = (features, whens, thens, ...initialValues) => {
|
|
15
|
-
// console.log("givEn", givEn.toString());
|
|
16
15
|
return new givenKlasser.prototype.constructor(key, features, whens, thens, testImplementation.givens[key], initialValues);
|
|
17
16
|
};
|
|
18
17
|
return a;
|
|
19
18
|
}, {});
|
|
20
19
|
const classyWhens = Object.entries(testImplementation.whens).reduce((a, [key, whEn]) => {
|
|
21
|
-
a[key] = (payload) => {
|
|
22
|
-
return new whenKlasser.prototype.constructor(`${whEn.name}: ${payload && payload.toString()}`, whEn(payload));
|
|
20
|
+
a[key] = (...payload) => {
|
|
21
|
+
return new whenKlasser.prototype.constructor(`${whEn.name}: ${payload && payload.toString()}`, whEn(...payload));
|
|
23
22
|
};
|
|
24
23
|
return a;
|
|
25
24
|
}, {});
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
4
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
3
5
|
const index_js_1 = require("./index.js");
|
|
4
6
|
const abstractBase_js_1 = require("./abstractBase.js");
|
|
5
7
|
const classBuilder_js_1 = require("./classBuilder.js");
|
package/dist/common/src/run.js
CHANGED
|
@@ -49,7 +49,7 @@ process.stdin.on("keypress", (str, key) => {
|
|
|
49
49
|
process.exit(-1);
|
|
50
50
|
}
|
|
51
51
|
});
|
|
52
|
-
|
|
52
|
+
const testName = process.argv[2];
|
|
53
53
|
const mode = process.argv[3];
|
|
54
54
|
if (mode !== "once" && mode !== "dev") {
|
|
55
55
|
console.error("the 2nd argument should be 'dev' or 'once' ");
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.idkPage = exports.testsReportPage = exports.testReportPage = void 0;
|
|
4
|
+
const testReportPage = (packageName, domain) => {
|
|
5
|
+
return `
|
|
6
|
+
<!DOCTYPE html>
|
|
7
|
+
<html lang="en">
|
|
8
|
+
|
|
9
|
+
<head>
|
|
10
|
+
<meta name="description" content="Webpage description goes here" />
|
|
11
|
+
<meta charset="utf-8" />
|
|
12
|
+
<title>${packageName} - testeranto</title>
|
|
13
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
14
|
+
<meta name="author" content="" />
|
|
15
|
+
|
|
16
|
+
<base href="${domain}" target="_blank">
|
|
17
|
+
|
|
18
|
+
<link rel="stylesheet" href="../ReportClient.css" />
|
|
19
|
+
<script type="module" src="../ReportClient.js"></script>
|
|
20
|
+
|
|
21
|
+
</head>
|
|
22
|
+
|
|
23
|
+
<body>
|
|
24
|
+
<div id="root">
|
|
25
|
+
react is loading
|
|
26
|
+
</div>
|
|
27
|
+
</body>
|
|
28
|
+
|
|
29
|
+
</html>
|
|
30
|
+
`;
|
|
31
|
+
};
|
|
32
|
+
exports.testReportPage = testReportPage;
|
|
33
|
+
const testsReportPage = (packageName, domain, projects) => {
|
|
34
|
+
return `
|
|
35
|
+
<!DOCTYPE html>
|
|
36
|
+
<html lang="en">
|
|
37
|
+
|
|
38
|
+
<head>
|
|
39
|
+
<meta name="description" content="Webpage description goes here" />
|
|
40
|
+
<meta charset="utf-8" />
|
|
41
|
+
<title>${packageName} - testeranto</title>
|
|
42
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
43
|
+
<meta name="author" content="" />
|
|
44
|
+
<base href="${domain}" target="_blank">
|
|
45
|
+
|
|
46
|
+
<script type="application/json" id="bigConfig">
|
|
47
|
+
${JSON.stringify(Object.keys(projects))}
|
|
48
|
+
</script>
|
|
49
|
+
|
|
50
|
+
<link rel="stylesheet" href="./testeranto/Project.css" />
|
|
51
|
+
<script type="module" src="./testeranto/Project.js"></script>
|
|
52
|
+
|
|
53
|
+
</head>
|
|
54
|
+
|
|
55
|
+
<body>
|
|
56
|
+
<div id="root">
|
|
57
|
+
react is loading
|
|
58
|
+
</div>
|
|
59
|
+
</body>
|
|
60
|
+
|
|
61
|
+
</html>
|
|
62
|
+
`;
|
|
63
|
+
};
|
|
64
|
+
exports.testsReportPage = testsReportPage;
|
|
65
|
+
const idkPage = (testName, domain) => {
|
|
66
|
+
return `
|
|
67
|
+
<!DOCTYPE html>
|
|
68
|
+
<html lang="en">
|
|
69
|
+
|
|
70
|
+
<head>
|
|
71
|
+
<meta name="description" content="Webpage description goes here" />
|
|
72
|
+
<base href="${domain}" target="_blank">
|
|
73
|
+
<meta charset="utf-8" />
|
|
74
|
+
<title>${testName} - testeranto</title>
|
|
75
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
76
|
+
<meta name="author" content="" />
|
|
77
|
+
|
|
78
|
+
<link rel="stylesheet" href="./testeranto/TestReport.css" />
|
|
79
|
+
<script src="./testeranto/TestReport.js"></script>
|
|
80
|
+
|
|
81
|
+
</head>
|
|
82
|
+
|
|
83
|
+
<body>
|
|
84
|
+
<div id="root"/>
|
|
85
|
+
</body>
|
|
86
|
+
`;
|
|
87
|
+
};
|
|
88
|
+
exports.idkPage = idkPage;
|