testeranto 0.94.0 → 0.110.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/README.md +1 -0
- package/bundle.js +80 -33
- package/dist/common/{src/Init.js → Init.js} +28 -0
- package/dist/common/{src/PM → PM}/main.js +272 -111
- package/dist/common/{src/PM → PM}/node.js +20 -5
- package/dist/common/{src/PM → PM}/web.js +19 -4
- package/dist/common/ReportServer.js +22 -0
- package/dist/common/{src/SubPackages → SubPackages}/react/jsx/index.js +0 -12
- package/dist/common/{src/SubPackages → SubPackages}/react/jsx/node.js +1 -6
- package/dist/common/{src/SubPackages → SubPackages}/react-dom/component/node.js +3 -16
- package/dist/common/{src/SubPackages → SubPackages}/react-dom/component/web.js +3 -3
- package/dist/common/{src/SubPackages → SubPackages}/react-dom/jsx/node.js +1 -1
- package/dist/common/{src/SubPackages → SubPackages}/react-dom/jsx/web.js +41 -30
- package/dist/common/{src/SubPackages → SubPackages}/react-test-renderer/MemoExoticComponent/node.js +17 -7
- package/dist/common/{src/SubPackages → SubPackages}/react-test-renderer/component/interface.js +17 -7
- package/dist/common/{src/SubPackages → SubPackages}/react-test-renderer/fc/node.js +17 -7
- package/dist/common/{src/SubPackages → SubPackages}/react-test-renderer/fc/web.js +17 -7
- package/dist/common/{src/SubPackages → SubPackages}/react-test-renderer/jsx/index.js +18 -14
- package/dist/common/{src/SubPackages → SubPackages}/react-test-renderer/jsx-promised/index.js +17 -7
- package/dist/common/build.js +222 -0
- package/dist/common/{src/defaultConfig.js → defaultConfig.js} +1 -0
- package/dist/common/esbuildConfigs/eslint-formatter-testeranto.js +6 -0
- package/dist/common/esbuildConfigs/inputFilesPlugin.js +27 -0
- package/dist/common/{src/esbuildConfigs → esbuildConfigs}/node.js +3 -14
- package/dist/common/{src/esbuildConfigs → esbuildConfigs}/web.js +3 -14
- package/dist/common/{src/init-docs.js → init-docs.js} +20 -10
- package/dist/common/{src/lib → lib}/abstractBase.js +20 -92
- package/dist/common/{src/lib → lib}/basebuilder.js +23 -10
- package/dist/common/{src/lib → lib}/classBuilder.js +1 -3
- package/dist/common/{src/lib → lib}/core.js +26 -10
- package/dist/common/{src/lib → lib}/index.js +0 -1
- package/dist/common/run.js +297 -0
- package/dist/common/tsconfig.common.tsbuildinfo +1 -1
- package/dist/common/utils.js +43 -0
- package/dist/module/Footer.js +4 -0
- package/dist/module/Init.js +63 -0
- package/dist/module/{src/PM → PM}/main.js +253 -102
- package/dist/module/{src/PM → PM}/node.js +20 -5
- package/dist/module/{src/PM → PM}/web.js +19 -4
- package/dist/module/ReportClient.js +97 -0
- package/dist/module/ReportServer.js +17 -0
- package/dist/module/SubPackages/react/jsx/index.js +15 -0
- package/dist/module/{src/SubPackages → SubPackages}/react/jsx/node.js +1 -6
- package/dist/module/{src/SubPackages → SubPackages}/react-dom/component/node.js +3 -16
- package/dist/module/{src/SubPackages → SubPackages}/react-dom/component/web.js +3 -3
- package/dist/module/{src/SubPackages → SubPackages}/react-dom/jsx/node.js +3 -3
- package/dist/module/{src/SubPackages → SubPackages}/react-dom/jsx/web.js +24 -23
- package/dist/module/{src/SubPackages → SubPackages}/react-test-renderer/jsx/index.js +1 -7
- package/dist/module/TestReport.js +91 -0
- package/dist/module/build.js +184 -0
- package/dist/module/{src/defaultConfig.js → defaultConfig.js} +1 -0
- package/dist/module/esbuildConfigs/eslint-formatter-testeranto.js +3 -0
- package/dist/module/esbuildConfigs/inputFilesPlugin.js +22 -0
- package/dist/module/{src/esbuildConfigs → esbuildConfigs}/node.js +3 -14
- package/dist/module/{src/esbuildConfigs → esbuildConfigs}/web.js +3 -14
- package/dist/module/{src/init-docs.js → init-docs.js} +1 -1
- package/dist/module/{src/lib → lib}/abstractBase.js +20 -92
- package/dist/module/{src/lib → lib}/basebuilder.js +23 -10
- package/dist/module/{src/lib → lib}/classBuilder.js +1 -3
- package/dist/module/{src/lib → lib}/core.js +26 -10
- package/dist/module/{src/lib → lib}/index.js +0 -1
- package/dist/module/run.js +259 -0
- package/dist/module/tsconfig.module.tsbuildinfo +1 -1
- package/dist/module/utils.js +29 -0
- package/dist/prebuild/ReportClient.css +11367 -0
- package/dist/prebuild/ReportClient.js +23641 -0
- package/dist/prebuild/ReportServer.mjs +16 -0
- package/dist/prebuild/TestReport.css +11367 -0
- package/dist/prebuild/TestReport.js +27484 -0
- package/dist/prebuild/build.mjs +376 -0
- package/dist/prebuild/esbuildConfigs/eslint-formatter-testeranto.mjs +9 -0
- package/dist/prebuild/init-docs.mjs +64 -8
- package/dist/prebuild/{run-tests.mjs → run.mjs} +501 -182
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/dist/types/Node.d.ts +12 -0
- package/dist/types/{src/PM → PM}/index.d.ts +11 -3
- package/dist/types/{src/PM → PM}/main.d.ts +24 -15
- package/dist/types/{src/PM → PM}/node.d.ts +11 -6
- package/dist/types/{src/PM → PM}/web.d.ts +11 -7
- package/dist/types/SubPackages/react/component/node.d.ts +7 -0
- package/dist/types/SubPackages/react/component/web.d.ts +7 -0
- package/dist/types/SubPackages/react/jsx/index.d.ts +12 -0
- package/dist/types/SubPackages/react/jsx/node.d.ts +4 -0
- package/dist/types/SubPackages/react/jsx/web.d.ts +4 -0
- package/dist/types/SubPackages/react-dom/component/node.d.ts +11 -0
- package/dist/types/SubPackages/react-dom/component/web.d.ts +20 -0
- package/dist/types/SubPackages/react-dom/jsx/index.d.ts +6 -0
- package/dist/types/SubPackages/react-dom/jsx/node.d.ts +7 -0
- package/dist/types/SubPackages/react-dom/jsx/web.d.ts +5 -0
- package/dist/types/SubPackages/react-test-renderer/MemoExoticComponent/node.d.ts +6 -0
- package/dist/types/SubPackages/react-test-renderer/component/index.d.ts +13 -0
- package/dist/types/SubPackages/react-test-renderer/component/node.d.ts +4 -0
- package/dist/types/SubPackages/react-test-renderer/component/web.d.ts +4 -0
- package/dist/types/SubPackages/react-test-renderer/fc/node.d.ts +8 -0
- package/dist/types/SubPackages/react-test-renderer/fc/web.d.ts +9 -0
- package/dist/types/SubPackages/react-test-renderer/jsx/index.d.ts +16 -0
- package/dist/types/SubPackages/react-test-renderer/jsx/node.d.ts +9 -0
- package/dist/types/SubPackages/react-test-renderer/jsx/web.d.ts +9 -0
- package/dist/types/SubPackages/react-test-renderer/jsx-promised/index.d.ts +15 -0
- package/dist/types/SubPackages/react-test-renderer/jsx-promised/node.d.ts +5 -0
- package/dist/types/SubPackages/react-test-renderer/jsx-promised/web.d.ts +5 -0
- package/dist/types/Types.d.ts +61 -0
- package/dist/types/Web.d.ts +9 -0
- package/dist/types/defaultConfig.d.ts +3 -0
- package/dist/types/esbuildConfigs/eslint-formatter-testeranto.d.ts +2 -0
- package/dist/types/{src/esbuildConfigs → esbuildConfigs}/index.d.ts +1 -1
- package/dist/types/{src/esbuildConfigs → esbuildConfigs}/inputFilesPlugin.d.ts +0 -1
- package/dist/types/{src/esbuildConfigs → esbuildConfigs}/node.d.ts +1 -1
- package/dist/types/{src/esbuildConfigs → esbuildConfigs}/web.d.ts +1 -1
- package/dist/types/lib/abstractBase.d.ts +110 -0
- package/dist/types/lib/basebuilder.d.ts +27 -0
- package/dist/types/lib/classBuilder.d.ts +7 -0
- package/dist/types/lib/core.d.ts +7 -0
- package/dist/types/lib/index.d.ts +83 -0
- package/dist/types/lib/types.d.ts +14 -0
- package/dist/types/run.d.ts +1 -0
- package/dist/types/tsconfig.types.tsbuildinfo +1 -1
- package/dist/types/utils.d.ts +9 -0
- package/package.json +50 -39
- package/src/Footer.tsx +4 -0
- package/src/Init.ts +48 -0
- package/src/Node.ts +23 -17
- package/src/PM/index.ts +13 -9
- package/src/PM/main.ts +337 -139
- package/src/PM/node.ts +43 -8
- package/src/PM/web.ts +34 -6
- package/src/ReportClient.tsx +155 -0
- package/src/ReportServer.ts +21 -0
- package/src/SubPackages/react/component/node.ts +68 -24
- package/src/SubPackages/react/component/web.ts +68 -25
- package/src/SubPackages/react/jsx/index.ts +39 -18
- package/src/SubPackages/react/jsx/node.ts +23 -10
- package/src/SubPackages/react/jsx/web.ts +27 -14
- package/src/SubPackages/react-dom/component/node.ts +42 -50
- package/src/SubPackages/react-dom/component/web.ts +28 -10
- package/src/SubPackages/react-dom/jsx/node.ts +54 -56
- package/src/SubPackages/react-dom/jsx/web.ts +55 -42
- package/src/SubPackages/react-test-renderer/MemoExoticComponent/node.ts +23 -7
- package/src/SubPackages/react-test-renderer/component/index.ts +38 -5
- package/src/SubPackages/react-test-renderer/component/node.ts +24 -5
- package/src/SubPackages/react-test-renderer/component/web.ts +22 -5
- package/src/SubPackages/react-test-renderer/fc/node.ts +41 -7
- package/src/SubPackages/react-test-renderer/fc/web.ts +43 -11
- package/src/SubPackages/react-test-renderer/jsx/index.ts +39 -16
- package/src/SubPackages/react-test-renderer/jsx/node.ts +22 -5
- package/src/SubPackages/react-test-renderer/jsx/web.ts +22 -5
- package/src/SubPackages/react-test-renderer/jsx-promised/index.ts +39 -6
- package/src/SubPackages/react-test-renderer/jsx-promised/node.ts +27 -10
- package/src/SubPackages/react-test-renderer/jsx-promised/web.ts +26 -12
- package/src/TestReport.tsx +176 -0
- package/src/Types.ts +131 -129
- package/src/Web.ts +24 -18
- package/src/build.ts +240 -0
- package/src/defaultConfig.ts +2 -1
- package/src/esbuildConfigs/eslint-formatter-testeranto.ts +5 -0
- package/src/esbuildConfigs/featuresPlugin.ts +0 -1
- package/src/esbuildConfigs/index.ts +1 -1
- package/src/esbuildConfigs/inputFilesPlugin.ts +2 -114
- package/src/esbuildConfigs/node.ts +7 -19
- package/src/esbuildConfigs/web.ts +6 -21
- package/src/init-docs.ts +2 -1
- package/src/lib/abstractBase.ts +140 -195
- package/src/lib/basebuilder.ts +57 -45
- package/src/lib/classBuilder.ts +15 -15
- package/src/lib/core.ts +44 -35
- package/src/lib/index.ts +47 -98
- package/src/lib/readme.md +12 -0
- package/src/lib/types.ts +40 -231
- package/src/run.ts +398 -0
- package/src/style.css +8 -0
- package/src/utils.ts +74 -2
- package/tsc.log +106 -0
- package/Bundle.Dockerfile +0 -52
- package/bin/init-docs.js +0 -24
- package/dist/common/dist/module/src/Init.js +0 -40
- package/dist/common/src/Aider.js +0 -143
- package/dist/common/src/Project.js +0 -227
- package/dist/common/src/Puppeteer.js +0 -111
- package/dist/common/src/SubPackages/puppeteer.js +0 -21
- package/dist/common/src/build-tests.js +0 -39
- package/dist/common/src/esbuildConfigs/features.js +0 -14
- package/dist/common/src/esbuildConfigs/inputFilesPlugin.js +0 -87
- package/dist/common/src/esbuildConfigs/report.js +0 -14
- package/dist/common/src/esbuildConfigs/tests.js +0 -13
- package/dist/common/src/run-tests.js +0 -39
- package/dist/common/src/utils.js +0 -16
- package/dist/common/testeranto.js +0 -15
- package/dist/module/src/Aider.js +0 -136
- package/dist/module/src/Init.js +0 -35
- package/dist/module/src/Project.js +0 -220
- package/dist/module/src/Puppeteer.js +0 -106
- package/dist/module/src/SubPackages/puppeteer.js +0 -16
- package/dist/module/src/SubPackages/react/jsx/index.js +0 -27
- package/dist/module/src/build-tests.js +0 -11
- package/dist/module/src/esbuildConfigs/features.js +0 -12
- package/dist/module/src/esbuildConfigs/inputFilesPlugin.js +0 -82
- package/dist/module/src/esbuildConfigs/report.js +0 -14
- package/dist/module/src/esbuildConfigs/tests.js +0 -11
- package/dist/module/src/run-tests.js +0 -11
- package/dist/module/src/utils.js +0 -9
- package/dist/module/testeranto.js +0 -13
- package/dist/prebuild/build-tests.mjs +0 -553
- package/dist/types/dist/module/src/Init.d.ts +0 -2
- package/dist/types/src/Aider.d.ts +0 -1
- package/dist/types/src/Node.d.ts +0 -13
- package/dist/types/src/Project.d.ts +0 -12
- package/dist/types/src/Puppeteer.d.ts +0 -2
- package/dist/types/src/SubPackages/puppeteer.d.ts +0 -6
- package/dist/types/src/SubPackages/react/component/node.d.ts +0 -7
- package/dist/types/src/SubPackages/react/component/web.d.ts +0 -7
- package/dist/types/src/SubPackages/react/jsx/index.d.ts +0 -12
- package/dist/types/src/SubPackages/react/jsx/node.d.ts +0 -4
- package/dist/types/src/SubPackages/react/jsx/web.d.ts +0 -4
- package/dist/types/src/SubPackages/react-dom/component/node.d.ts +0 -12
- package/dist/types/src/SubPackages/react-dom/component/web.d.ts +0 -11
- package/dist/types/src/SubPackages/react-dom/jsx/index.d.ts +0 -7
- package/dist/types/src/SubPackages/react-dom/jsx/node.d.ts +0 -6
- package/dist/types/src/SubPackages/react-dom/jsx/web.d.ts +0 -5
- package/dist/types/src/SubPackages/react-test-renderer/MemoExoticComponent/node.d.ts +0 -5
- package/dist/types/src/SubPackages/react-test-renderer/component/index.d.ts +0 -13
- package/dist/types/src/SubPackages/react-test-renderer/component/node.d.ts +0 -8
- package/dist/types/src/SubPackages/react-test-renderer/component/web.d.ts +0 -3
- package/dist/types/src/SubPackages/react-test-renderer/fc/node.d.ts +0 -8
- package/dist/types/src/SubPackages/react-test-renderer/fc/web.d.ts +0 -8
- package/dist/types/src/SubPackages/react-test-renderer/jsx/index.d.ts +0 -17
- package/dist/types/src/SubPackages/react-test-renderer/jsx/node.d.ts +0 -8
- package/dist/types/src/SubPackages/react-test-renderer/jsx/web.d.ts +0 -8
- package/dist/types/src/SubPackages/react-test-renderer/jsx-promised/index.d.ts +0 -16
- package/dist/types/src/SubPackages/react-test-renderer/jsx-promised/node.d.ts +0 -4
- package/dist/types/src/SubPackages/react-test-renderer/jsx-promised/web.d.ts +0 -4
- package/dist/types/src/Types.d.ts +0 -51
- package/dist/types/src/Web.d.ts +0 -10
- package/dist/types/src/defaultConfig.d.ts +0 -3
- package/dist/types/src/esbuildConfigs/features.d.ts +0 -4
- package/dist/types/src/esbuildConfigs/report.d.ts +0 -0
- package/dist/types/src/esbuildConfigs/tests.d.ts +0 -4
- package/dist/types/src/lib/abstractBase.d.ts +0 -110
- package/dist/types/src/lib/basebuilder.d.ts +0 -27
- package/dist/types/src/lib/classBuilder.d.ts +0 -7
- package/dist/types/src/lib/core.d.ts +0 -8
- package/dist/types/src/lib/index.d.ts +0 -60
- package/dist/types/src/lib/types.d.ts +0 -68
- package/dist/types/src/utils.d.ts +0 -2
- package/dist/types/testeranto.d.ts +0 -16
- package/docker-compose.yml +0 -37
- package/src/Aider.ts +0 -168
- package/src/Project.ts +0 -292
- package/src/Puppeteer.ts +0 -143
- package/src/SubPackages/puppeteer.ts +0 -51
- package/src/build-tests.ts +0 -12
- package/src/esbuildConfigs/features.ts +0 -17
- package/src/esbuildConfigs/report.ts +0 -15
- package/src/esbuildConfigs/tests.ts +0 -14
- package/src/run-tests.ts +0 -12
- package/testeranto.ts +0 -13
- package/dist/common/{src/Node.js → Node.js} +0 -0
- package/dist/common/{src/PM → PM}/index.js +0 -0
- package/dist/common/{src/SubPackages → SubPackages}/react/component/node.js +0 -0
- package/dist/common/{src/SubPackages → SubPackages}/react/component/web.js +0 -0
- package/dist/common/{src/SubPackages → SubPackages}/react/jsx/web.js +0 -0
- package/dist/common/{src/SubPackages → SubPackages}/react-dom/jsx/index.js +0 -0
- package/dist/common/{src/SubPackages → SubPackages}/react-test-renderer/component/index.js +0 -0
- package/dist/common/{src/SubPackages → SubPackages}/react-test-renderer/component/node.js +0 -0
- package/dist/common/{src/SubPackages → SubPackages}/react-test-renderer/component/web.js +0 -0
- package/dist/common/{src/SubPackages → SubPackages}/react-test-renderer/jsx/node.js +0 -0
- package/dist/common/{src/SubPackages → SubPackages}/react-test-renderer/jsx/web.js +0 -0
- package/dist/common/{src/SubPackages → SubPackages}/react-test-renderer/jsx-promised/node.js +1 -1
- package/dist/common/{src/SubPackages → SubPackages}/react-test-renderer/jsx-promised/web.js +0 -0
- package/dist/common/{src/Types.js → Types.js} +0 -0
- package/dist/common/{src/Web.js → Web.js} +0 -0
- package/dist/common/{src/esbuildConfigs → esbuildConfigs}/featuresPlugin.js +0 -0
- package/dist/common/{src/esbuildConfigs → esbuildConfigs}/index.js +0 -0
- package/dist/common/{src/lib → lib}/types.js +0 -0
- package/dist/common/{src/puppeteerConfiger.js → puppeteerConfiger.js} +0 -0
- package/dist/common/{src/web.html.js → web.html.js} +0 -0
- package/dist/module/{src/Node.js → Node.js} +0 -0
- package/dist/module/{src/PM → PM}/index.js +0 -0
- package/dist/module/{src/SubPackages → SubPackages}/react/component/node.js +0 -0
- package/dist/module/{src/SubPackages → SubPackages}/react/component/web.js +0 -0
- package/dist/module/{src/SubPackages → SubPackages}/react/jsx/web.js +0 -0
- package/dist/module/{src/SubPackages → SubPackages}/react-dom/jsx/index.js +0 -0
- package/dist/module/{src/SubPackages → SubPackages}/react-test-renderer/MemoExoticComponent/node.js +0 -0
- package/dist/module/{src/SubPackages → SubPackages}/react-test-renderer/component/index.js +0 -0
- package/dist/module/{src/SubPackages → SubPackages}/react-test-renderer/component/interface.js +0 -0
- package/dist/module/{src/SubPackages → SubPackages}/react-test-renderer/component/node.js +0 -0
- package/dist/module/{src/SubPackages → SubPackages}/react-test-renderer/component/web.js +0 -0
- package/dist/module/{src/SubPackages → SubPackages}/react-test-renderer/fc/node.js +0 -0
- package/dist/module/{src/SubPackages → SubPackages}/react-test-renderer/fc/web.js +0 -0
- package/dist/module/{src/SubPackages → SubPackages}/react-test-renderer/jsx/node.js +0 -0
- package/dist/module/{src/SubPackages → SubPackages}/react-test-renderer/jsx/web.js +0 -0
- package/dist/module/{src/SubPackages → SubPackages}/react-test-renderer/jsx-promised/index.js +0 -0
- package/dist/module/{src/SubPackages → SubPackages}/react-test-renderer/jsx-promised/node.js +1 -1
- /package/dist/module/{src/SubPackages → SubPackages}/react-test-renderer/jsx-promised/web.js +0 -0
- /package/dist/module/{src/Types.js → Types.js} +0 -0
- /package/dist/module/{src/Web.js → Web.js} +0 -0
- /package/dist/module/{src/esbuildConfigs → esbuildConfigs}/featuresPlugin.js +0 -0
- /package/dist/module/{src/esbuildConfigs → esbuildConfigs}/index.js +0 -0
- /package/dist/module/{src/lib → lib}/types.js +0 -0
- /package/dist/module/{src/puppeteerConfiger.js → puppeteerConfiger.js} +0 -0
- /package/dist/module/{src/web.html.js → web.html.js} +0 -0
- /package/dist/types/{src/Init.d.ts → Init.d.ts} +0 -0
- /package/dist/types/{src/build-tests.d.ts → ReportServer.d.ts} +0 -0
- /package/dist/types/{src/SubPackages → SubPackages}/react-test-renderer/component/interface.d.ts +0 -0
- /package/dist/types/{src/init-docs.d.ts → build.d.ts} +0 -0
- /package/dist/types/{src/esbuildConfigs → esbuildConfigs}/featuresPlugin.d.ts +0 -0
- /package/dist/types/{src/run-tests.d.ts → init-docs.d.ts} +0 -0
- /package/dist/types/{src/puppeteerConfiger.d.ts → puppeteerConfiger.d.ts} +0 -0
- /package/dist/types/{src/web.html.d.ts → web.html.d.ts} +0 -0
package/src/run.ts
ADDED
|
@@ -0,0 +1,398 @@
|
|
|
1
|
+
import ansiC from "ansi-colors";
|
|
2
|
+
import { watch } from "fs";
|
|
3
|
+
import path from "path";
|
|
4
|
+
import crypto from "node:crypto";
|
|
5
|
+
import fs from "fs";
|
|
6
|
+
import tsc from "tsc-prog";
|
|
7
|
+
import { ESLint } from "eslint";
|
|
8
|
+
import ts from "typescript";
|
|
9
|
+
import readline from "readline";
|
|
10
|
+
|
|
11
|
+
import { PM_Main } from "./PM/main";
|
|
12
|
+
import {
|
|
13
|
+
lintExitCodePather,
|
|
14
|
+
lintPather,
|
|
15
|
+
tscExitCodePather,
|
|
16
|
+
tscPather,
|
|
17
|
+
} from "./utils";
|
|
18
|
+
import { IBaseConfig, IBuiltConfig, IRunnables, ITestTypes } from "./lib";
|
|
19
|
+
|
|
20
|
+
console.log(ansiC.inverse("Press 'x' to shutdown forcefully."));
|
|
21
|
+
|
|
22
|
+
readline.emitKeypressEvents(process.stdin);
|
|
23
|
+
if (process.stdin.isTTY) process.stdin.setRawMode(true);
|
|
24
|
+
|
|
25
|
+
process.stdin.on("keypress", (str, key) => {
|
|
26
|
+
if (key.name === "x") {
|
|
27
|
+
console.log(ansiC.inverse("Shutting down forcefully..."));
|
|
28
|
+
process.exit(-1);
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
async function fileHash(filePath, algorithm = "md5") {
|
|
33
|
+
return new Promise<string>((resolve, reject) => {
|
|
34
|
+
const hash = crypto.createHash(algorithm);
|
|
35
|
+
const fileStream = fs.createReadStream(filePath);
|
|
36
|
+
|
|
37
|
+
fileStream.on("data", (data) => {
|
|
38
|
+
hash.update(data);
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
fileStream.on("end", () => {
|
|
42
|
+
const fileHash = hash.digest("hex");
|
|
43
|
+
resolve(fileHash);
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
fileStream.on("error", (error) => {
|
|
47
|
+
reject(`Error reading file: ${error.message}`);
|
|
48
|
+
});
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
async function filesHash(files: string[], algorithm = "md5") {
|
|
53
|
+
return new Promise<string>((resolve, reject) => {
|
|
54
|
+
resolve(
|
|
55
|
+
files.reduce(async (mm: Promise<string>, f) => {
|
|
56
|
+
return (await mm) + (await fileHash(f));
|
|
57
|
+
}, Promise.resolve(""))
|
|
58
|
+
);
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
const getRunnables = (
|
|
62
|
+
tests: ITestTypes[],
|
|
63
|
+
payload = {
|
|
64
|
+
nodeEntryPoints: {},
|
|
65
|
+
webEntryPoints: {},
|
|
66
|
+
}
|
|
67
|
+
): IRunnables => {
|
|
68
|
+
return tests.reduce((pt, cv, cndx, cry) => {
|
|
69
|
+
if (cv[1] === "node") {
|
|
70
|
+
pt.nodeEntryPoints[cv[0]] = path.resolve(
|
|
71
|
+
`./docs/node/${cv[0].split(".").slice(0, -1).concat("mjs").join(".")}`
|
|
72
|
+
);
|
|
73
|
+
} else if (cv[1] === "web") {
|
|
74
|
+
pt.webEntryPoints[cv[0]] = path.resolve(
|
|
75
|
+
`./docs/web/${cv[0].split(".").slice(0, -1).concat("mjs").join(".")}`
|
|
76
|
+
);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
if (cv[3].length) {
|
|
80
|
+
getRunnables(cv[3], payload);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
return pt;
|
|
84
|
+
}, payload as IRunnables);
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
const changes: Record<string, string> = {};
|
|
88
|
+
|
|
89
|
+
const tscCheck = async ({
|
|
90
|
+
entrypoint,
|
|
91
|
+
addableFiles,
|
|
92
|
+
platform,
|
|
93
|
+
}: {
|
|
94
|
+
platform: "web" | "node";
|
|
95
|
+
entrypoint: string;
|
|
96
|
+
addableFiles: string[];
|
|
97
|
+
}) => {
|
|
98
|
+
console.log(ansiC.green(ansiC.inverse(`tsc < ${entrypoint}`)));
|
|
99
|
+
const program = tsc.createProgramFromConfig({
|
|
100
|
+
basePath: process.cwd(), // always required, used for relative paths
|
|
101
|
+
configFilePath: "tsconfig.json", // config to inherit from (optional)
|
|
102
|
+
compilerOptions: {
|
|
103
|
+
rootDir: "src",
|
|
104
|
+
outDir: tscPather(entrypoint, platform),
|
|
105
|
+
// declaration: true,
|
|
106
|
+
// skipLibCheck: true,
|
|
107
|
+
noEmit: true,
|
|
108
|
+
},
|
|
109
|
+
include: addableFiles, //["src/**/*"],
|
|
110
|
+
// exclude: ["**/*.test.ts", "**/*.spec.ts"],
|
|
111
|
+
});
|
|
112
|
+
const tscPath = tscPather(entrypoint, platform);
|
|
113
|
+
|
|
114
|
+
let allDiagnostics = program.getSemanticDiagnostics();
|
|
115
|
+
|
|
116
|
+
const d: string[] = [];
|
|
117
|
+
allDiagnostics.forEach((diagnostic) => {
|
|
118
|
+
if (diagnostic.file) {
|
|
119
|
+
let { line, character } = ts.getLineAndCharacterOfPosition(
|
|
120
|
+
diagnostic.file,
|
|
121
|
+
diagnostic.start!
|
|
122
|
+
);
|
|
123
|
+
let message = ts.flattenDiagnosticMessageText(
|
|
124
|
+
diagnostic.messageText,
|
|
125
|
+
"\n"
|
|
126
|
+
);
|
|
127
|
+
d.push(
|
|
128
|
+
`${diagnostic.file.fileName} (${line + 1},${character + 1}): ${message}`
|
|
129
|
+
);
|
|
130
|
+
} else {
|
|
131
|
+
d.push(ts.flattenDiagnosticMessageText(diagnostic.messageText, "\n"));
|
|
132
|
+
}
|
|
133
|
+
});
|
|
134
|
+
|
|
135
|
+
fs.writeFileSync(tscPath, d.join("\n"));
|
|
136
|
+
fs.writeFileSync(
|
|
137
|
+
tscExitCodePather(entrypoint, platform),
|
|
138
|
+
d.length.toString()
|
|
139
|
+
);
|
|
140
|
+
};
|
|
141
|
+
|
|
142
|
+
const eslint = new ESLint();
|
|
143
|
+
const formatter = await eslint.loadFormatter(
|
|
144
|
+
"./node_modules/testeranto/dist/prebuild/esbuildConfigs/eslint-formatter-testeranto.mjs"
|
|
145
|
+
);
|
|
146
|
+
|
|
147
|
+
const eslintCheck = async (
|
|
148
|
+
entrypoint: string,
|
|
149
|
+
platform: "web" | "node",
|
|
150
|
+
addableFiles: string[]
|
|
151
|
+
) => {
|
|
152
|
+
console.log(ansiC.green(ansiC.inverse(`eslint < ${entrypoint}`)));
|
|
153
|
+
const results = (await eslint.lintFiles(addableFiles))
|
|
154
|
+
.filter((r) => r.messages.length)
|
|
155
|
+
.filter((r) => {
|
|
156
|
+
return r.messages[0].ruleId !== null;
|
|
157
|
+
})
|
|
158
|
+
.map((r) => {
|
|
159
|
+
delete r.source;
|
|
160
|
+
return r;
|
|
161
|
+
});
|
|
162
|
+
|
|
163
|
+
fs.writeFileSync(
|
|
164
|
+
lintPather(entrypoint, platform),
|
|
165
|
+
await formatter.format(results)
|
|
166
|
+
);
|
|
167
|
+
fs.writeFileSync(
|
|
168
|
+
lintExitCodePather(entrypoint, platform),
|
|
169
|
+
results.length.toString()
|
|
170
|
+
);
|
|
171
|
+
};
|
|
172
|
+
|
|
173
|
+
const makePrompt = async (
|
|
174
|
+
entryPoint: string,
|
|
175
|
+
addableFiles: string[],
|
|
176
|
+
platform: "web" | "node"
|
|
177
|
+
) => {
|
|
178
|
+
const promptPath = path.join(
|
|
179
|
+
"./docs/",
|
|
180
|
+
platform,
|
|
181
|
+
entryPoint.split(".").slice(0, -1).join("."),
|
|
182
|
+
`prompt.txt`
|
|
183
|
+
);
|
|
184
|
+
|
|
185
|
+
const testPaths = path.join(
|
|
186
|
+
"./docs/",
|
|
187
|
+
platform,
|
|
188
|
+
entryPoint.split(".").slice(0, -1).join("."),
|
|
189
|
+
`tests.json`
|
|
190
|
+
);
|
|
191
|
+
|
|
192
|
+
const featuresPath = path.join(
|
|
193
|
+
"./docs/",
|
|
194
|
+
platform,
|
|
195
|
+
entryPoint.split(".").slice(0, -1).join("."),
|
|
196
|
+
`featurePrompt.txt`
|
|
197
|
+
);
|
|
198
|
+
|
|
199
|
+
fs.writeFileSync(
|
|
200
|
+
promptPath,
|
|
201
|
+
`
|
|
202
|
+
${addableFiles
|
|
203
|
+
.map((x) => {
|
|
204
|
+
return `/add ${x}`;
|
|
205
|
+
})
|
|
206
|
+
.join("\n")}
|
|
207
|
+
|
|
208
|
+
/read ${lintPather(entryPoint, platform)}
|
|
209
|
+
/read ${tscPather(entryPoint, platform)}
|
|
210
|
+
/read ${testPaths}
|
|
211
|
+
|
|
212
|
+
/load ${featuresPath}
|
|
213
|
+
|
|
214
|
+
/code Fix the failing tests described in ${testPaths}. Correct any type signature errors described in the files ${tscPather(
|
|
215
|
+
entryPoint,
|
|
216
|
+
platform
|
|
217
|
+
)}. Implement any method which throws "Function not implemented. Resolve the lint errors described in ${lintPather(
|
|
218
|
+
entryPoint,
|
|
219
|
+
platform
|
|
220
|
+
)}"
|
|
221
|
+
`
|
|
222
|
+
);
|
|
223
|
+
};
|
|
224
|
+
|
|
225
|
+
type IOutputs = Record<
|
|
226
|
+
string,
|
|
227
|
+
{
|
|
228
|
+
entryPoint: string;
|
|
229
|
+
inputs: Record<string, string>;
|
|
230
|
+
}
|
|
231
|
+
>;
|
|
232
|
+
|
|
233
|
+
const metafileOutputs = async (platform: "web" | "node") => {
|
|
234
|
+
const metafile = JSON.parse(
|
|
235
|
+
fs.readFileSync(`docs/${platform}/metafile.json`).toString()
|
|
236
|
+
).metafile;
|
|
237
|
+
|
|
238
|
+
if (!metafile) return;
|
|
239
|
+
|
|
240
|
+
const outputs: IOutputs = metafile.outputs;
|
|
241
|
+
|
|
242
|
+
Object.keys(outputs).forEach(async (k) => {
|
|
243
|
+
const addableFiles = Object.keys(outputs[k].inputs).filter((i) => {
|
|
244
|
+
if (!fs.existsSync(i)) return false;
|
|
245
|
+
if (i.startsWith("node_modules")) return false;
|
|
246
|
+
return true;
|
|
247
|
+
});
|
|
248
|
+
|
|
249
|
+
const f = `${k.split(".").slice(0, -1).join(".")}/`;
|
|
250
|
+
if (!fs.existsSync(f)) {
|
|
251
|
+
fs.mkdirSync(f);
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
const entrypoint = outputs[k].entryPoint;
|
|
255
|
+
|
|
256
|
+
if (entrypoint) {
|
|
257
|
+
const changeDigest = await filesHash(addableFiles);
|
|
258
|
+
|
|
259
|
+
if (changeDigest === changes[entrypoint]) {
|
|
260
|
+
// skip
|
|
261
|
+
} else {
|
|
262
|
+
changes[entrypoint] = changeDigest;
|
|
263
|
+
tscCheck({ platform, addableFiles, entrypoint });
|
|
264
|
+
eslintCheck(entrypoint, platform, addableFiles);
|
|
265
|
+
makePrompt(entrypoint, addableFiles, platform);
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
});
|
|
269
|
+
};
|
|
270
|
+
|
|
271
|
+
import(process.cwd() + "/" + process.argv[2]).then(async (module) => {
|
|
272
|
+
const rawConfig: IBaseConfig = module.default;
|
|
273
|
+
|
|
274
|
+
const config: IBuiltConfig = {
|
|
275
|
+
...rawConfig,
|
|
276
|
+
buildDir: process.cwd() + "/" + rawConfig.outdir,
|
|
277
|
+
};
|
|
278
|
+
|
|
279
|
+
let mode = config.devMode ? "DEV" : "PROD";
|
|
280
|
+
const fileHashes = {};
|
|
281
|
+
let pm: PM_Main | undefined = new PM_Main(config);
|
|
282
|
+
|
|
283
|
+
console.log(ansiC.inverse(`Press 'q' to shutdown gracefully`));
|
|
284
|
+
process.stdin.on("keypress", (str, key) => {
|
|
285
|
+
if (key.name === "q") {
|
|
286
|
+
console.log(
|
|
287
|
+
ansiC.inverse("Testeranto-Run is shutting down gracefully...")
|
|
288
|
+
);
|
|
289
|
+
mode = "PROD";
|
|
290
|
+
// onDone();
|
|
291
|
+
nodeMetafileWatcher.close();
|
|
292
|
+
webMetafileWatcher.close();
|
|
293
|
+
pm.shutDown();
|
|
294
|
+
}
|
|
295
|
+
});
|
|
296
|
+
|
|
297
|
+
metafileOutputs("node");
|
|
298
|
+
const nodeMetafileWatcher = watch(
|
|
299
|
+
"docs/node/metafile.json",
|
|
300
|
+
async (e, filename) => {
|
|
301
|
+
console.log(ansiC.green(ansiC.inverse(`< ${e} ${filename} (node)`)));
|
|
302
|
+
metafileOutputs("node");
|
|
303
|
+
}
|
|
304
|
+
);
|
|
305
|
+
|
|
306
|
+
metafileOutputs("web");
|
|
307
|
+
const webMetafileWatcher = watch(
|
|
308
|
+
"docs/web/metafile.json",
|
|
309
|
+
async (e, filename) => {
|
|
310
|
+
console.log(ansiC.green(ansiC.inverse(`< ${e} ${filename} (web)`)));
|
|
311
|
+
metafileOutputs("web");
|
|
312
|
+
}
|
|
313
|
+
);
|
|
314
|
+
|
|
315
|
+
await pm.startPuppeteer(
|
|
316
|
+
{
|
|
317
|
+
slowMo: 1,
|
|
318
|
+
// timeout: 1,
|
|
319
|
+
waitForInitialPage: false,
|
|
320
|
+
executablePath:
|
|
321
|
+
// process.env.CHROMIUM_PATH || "/opt/homebrew/bin/chromium",
|
|
322
|
+
"/opt/homebrew/bin/chromium",
|
|
323
|
+
headless: true,
|
|
324
|
+
dumpio: true,
|
|
325
|
+
// timeout: 0,
|
|
326
|
+
devtools: true,
|
|
327
|
+
|
|
328
|
+
args: [
|
|
329
|
+
"--auto-open-devtools-for-tabs",
|
|
330
|
+
`--remote-debugging-port=3234`,
|
|
331
|
+
|
|
332
|
+
// "--disable-features=IsolateOrigins,site-per-process",
|
|
333
|
+
"--disable-site-isolation-trials",
|
|
334
|
+
"--allow-insecure-localhost",
|
|
335
|
+
"--allow-file-access-from-files",
|
|
336
|
+
"--allow-running-insecure-content",
|
|
337
|
+
|
|
338
|
+
"--disable-dev-shm-usage",
|
|
339
|
+
"--disable-extensions",
|
|
340
|
+
"--disable-gpu",
|
|
341
|
+
"--disable-setuid-sandbox",
|
|
342
|
+
"--disable-site-isolation-trials",
|
|
343
|
+
"--disable-web-security",
|
|
344
|
+
"--no-first-run",
|
|
345
|
+
"--no-sandbox",
|
|
346
|
+
"--no-startup-window",
|
|
347
|
+
// "--no-zygote",
|
|
348
|
+
"--reduce-security-for-testing",
|
|
349
|
+
"--remote-allow-origins=*",
|
|
350
|
+
"--unsafely-treat-insecure-origin-as-secure=*",
|
|
351
|
+
// "--disable-features=IsolateOrigins",
|
|
352
|
+
// "--remote-allow-origins=ws://localhost:3234",
|
|
353
|
+
// "--single-process",
|
|
354
|
+
// "--unsafely-treat-insecure-origin-as-secure",
|
|
355
|
+
// "--unsafely-treat-insecure-origin-as-secure=ws://192.168.0.101:3234",
|
|
356
|
+
|
|
357
|
+
// "--disk-cache-dir=/dev/null",
|
|
358
|
+
// "--disk-cache-size=1",
|
|
359
|
+
// "--start-maximized",
|
|
360
|
+
],
|
|
361
|
+
},
|
|
362
|
+
"."
|
|
363
|
+
);
|
|
364
|
+
|
|
365
|
+
const { nodeEntryPoints, webEntryPoints } = getRunnables(config.tests);
|
|
366
|
+
|
|
367
|
+
Object.entries(nodeEntryPoints).forEach(
|
|
368
|
+
([k, outputFile]: [string, string]) => {
|
|
369
|
+
pm.launchNode(k, outputFile);
|
|
370
|
+
try {
|
|
371
|
+
watch(outputFile, async (e, filename) => {
|
|
372
|
+
const hash = await fileHash(outputFile);
|
|
373
|
+
if (fileHashes[k] !== hash) {
|
|
374
|
+
fileHashes[k] = hash;
|
|
375
|
+
console.log(ansiC.green(ansiC.inverse(`< ${e} ${filename}`)));
|
|
376
|
+
pm.launchNode(k, outputFile);
|
|
377
|
+
}
|
|
378
|
+
});
|
|
379
|
+
} catch (e) {
|
|
380
|
+
console.error(e);
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
);
|
|
384
|
+
|
|
385
|
+
Object.entries(webEntryPoints).forEach(
|
|
386
|
+
([k, outputFile]: [string, string]) => {
|
|
387
|
+
pm.launchWeb(k, outputFile);
|
|
388
|
+
watch(outputFile, async (e, filename) => {
|
|
389
|
+
const hash = await fileHash(outputFile);
|
|
390
|
+
if (fileHashes[k] !== hash) {
|
|
391
|
+
fileHashes[k] = hash;
|
|
392
|
+
console.log(ansiC.green(ansiC.inverse(`< ${e} ${filename}`)));
|
|
393
|
+
pm.launchWeb(k, outputFile);
|
|
394
|
+
}
|
|
395
|
+
});
|
|
396
|
+
}
|
|
397
|
+
);
|
|
398
|
+
});
|
package/src/style.css
ADDED
package/src/utils.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
// import { configs } from "eslint-plugin-react";
|
|
2
1
|
import path from "path";
|
|
3
|
-
|
|
2
|
+
|
|
3
|
+
import { IRunTime, IBuiltConfig } from "./lib";
|
|
4
4
|
|
|
5
5
|
export const destinationOfRuntime = (
|
|
6
6
|
f: string,
|
|
@@ -13,3 +13,75 @@ export const destinationOfRuntime = (
|
|
|
13
13
|
.slice(0, -1)
|
|
14
14
|
.join(".");
|
|
15
15
|
};
|
|
16
|
+
|
|
17
|
+
export const tscPather = (entryPoint: string, platform: "web" | "node") => {
|
|
18
|
+
return path.join(
|
|
19
|
+
"./docs/",
|
|
20
|
+
platform,
|
|
21
|
+
entryPoint.split(".").slice(0, -1).join("."),
|
|
22
|
+
`type_errors.txt`
|
|
23
|
+
);
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export const tscExitCodePather = (
|
|
27
|
+
entryPoint: string,
|
|
28
|
+
platform: "web" | "node"
|
|
29
|
+
) => {
|
|
30
|
+
return path.join(
|
|
31
|
+
"./docs/",
|
|
32
|
+
platform,
|
|
33
|
+
entryPoint.split(".").slice(0, -1).join("."),
|
|
34
|
+
`type_errors.txt`
|
|
35
|
+
);
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export const lintPather = (entryPoint: string, platform: "web" | "node") => {
|
|
39
|
+
return path.join(
|
|
40
|
+
"./docs/",
|
|
41
|
+
platform,
|
|
42
|
+
entryPoint.split(".").slice(0, -1).join("."),
|
|
43
|
+
`lint_errors.json`
|
|
44
|
+
);
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
export const lintExitCodePather = (
|
|
48
|
+
entryPoint: string,
|
|
49
|
+
platform: "web" | "node"
|
|
50
|
+
) => {
|
|
51
|
+
return path.join(
|
|
52
|
+
"./docs/",
|
|
53
|
+
platform,
|
|
54
|
+
entryPoint.split(".").slice(0, -1).join("."),
|
|
55
|
+
`lint_errors.txt`
|
|
56
|
+
);
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
export const bddPather = (entryPoint: string, platform: "web" | "node") => {
|
|
60
|
+
return path.join(
|
|
61
|
+
"./docs/",
|
|
62
|
+
platform,
|
|
63
|
+
entryPoint.split(".").slice(0, -1).join("."),
|
|
64
|
+
`tests.json`
|
|
65
|
+
);
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
export const bddExitCodePather = (
|
|
69
|
+
entryPoint: string,
|
|
70
|
+
platform: "web" | "node"
|
|
71
|
+
) => {
|
|
72
|
+
return path.join(
|
|
73
|
+
"./docs/",
|
|
74
|
+
platform,
|
|
75
|
+
entryPoint.split(".").slice(0, -1).join("."),
|
|
76
|
+
`bdd_errors.txt`
|
|
77
|
+
);
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
export const promptPather = (entryPoint: string, platform: "web" | "node") => {
|
|
81
|
+
return path.join(
|
|
82
|
+
"./docs/",
|
|
83
|
+
platform,
|
|
84
|
+
entryPoint.split(".").slice(0, -1).join("."),
|
|
85
|
+
`prompt.txt`
|
|
86
|
+
);
|
|
87
|
+
};
|
package/tsc.log
ADDED
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
$ /Users/adam/Code/testeranto/node_modules/.bin/tsc --noEmit
|
|
2
|
+
src/esbuildConfigs/node.ts(62,7): error TS2741: Property 'setup' is missing in type 'Plugin' but required in type 'import("/Users/adam/Code/testeranto/node_modules/esbuild/lib/main").Plugin'.
|
|
3
|
+
src/esbuildConfigs/web.ts(73,7): error TS2741: Property 'setup' is missing in type 'Plugin' but required in type 'import("/Users/adam/Code/testeranto/node_modules/esbuild/lib/main").Plugin'.
|
|
4
|
+
src/lib/abstractBase.ts(5,27): error TS2307: Cannot find module '../../dist/types/src/Types.js' or its corresponding type declarations.
|
|
5
|
+
src/lib/abstractBase.ts(158,11): error TS2345: Argument of type '(t: I["then"]) => unknown' is not assignable to parameter of type '(t: Awaited<I["then"]> | undefined) => boolean'.
|
|
6
|
+
Type 'unknown' is not assignable to type 'boolean'.
|
|
7
|
+
src/lib/abstractBase.ts(703,68): error TS2554: Expected 5 arguments, but got 4.
|
|
8
|
+
src/lib/index.ts(1,27): error TS2307: Cannot find module '../../dist/types/src/Types.js' or its corresponding type declarations.
|
|
9
|
+
src/lib/index.ts(43,8): error TS18046: 'thenCb' is of type 'unknown'.
|
|
10
|
+
src/lib/index.ts(44,19): error TS2322: Type 'unknown' is not assignable to type 'Promise<unknown>'.
|
|
11
|
+
src/Node.ts(58,56): error TS2345: Argument of type 'PM_Node' is not assignable to parameter of type 'PM'.
|
|
12
|
+
Types of property 'customScreenShot' are incompatible.
|
|
13
|
+
Type '(opts: ScreencastOptions, cdpPage: CdpPage) => any' is not assignable to type '(opts: object, page?: string | undefined) => any'.
|
|
14
|
+
Types of parameters 'cdpPage' and 'page' are incompatible.
|
|
15
|
+
Type 'string | undefined' is not assignable to type 'CdpPage'.
|
|
16
|
+
Type 'undefined' is not assignable to type 'CdpPage'.
|
|
17
|
+
src/PM/main.ts(227,24): error TS18048: 'page' is possibly 'undefined'.
|
|
18
|
+
src/PM/main.ts(258,9): error TS2322: Type 'string' is not assignable to type '`${string}.webm`'.
|
|
19
|
+
src/PM/main.ts(261,17): error TS2538: Type 'undefined' cannot be used as an index type.
|
|
20
|
+
src/PM/main.ts(300,3): error TS2416: Property 'customScreenShot' in type 'PM_Main' is not assignable to the same property in base type 'PM'.
|
|
21
|
+
Type '(opts: object, cdpPage?: CdpPage | undefined) => void' is not assignable to type '(opts: object, page?: string | undefined) => any'.
|
|
22
|
+
Types of parameters 'cdpPage' and 'page' are incompatible.
|
|
23
|
+
Type 'string | undefined' is not assignable to type 'CdpPage | undefined'.
|
|
24
|
+
Type 'string' is not assignable to type 'CdpPage'.
|
|
25
|
+
src/PM/main.ts(735,15): error TS2345: Argument of type 'Page' is not assignable to parameter of type 'Page | PromiseLike<Page>'.
|
|
26
|
+
Type 'import("/Users/adam/Code/testeranto/node_modules/puppeteer-core/lib/types").Page' is not assignable to type 'import("/Users/adam/Code/testeranto/node_modules/puppeteer-core/lib/esm/puppeteer/api/Page").Page'.
|
|
27
|
+
Property '#private' in type 'Page' refers to a different member that cannot be accessed from within type 'Page'.
|
|
28
|
+
src/PM/node.ts(88,3): error TS2416: Property 'customScreenShot' in type 'PM_Node' is not assignable to the same property in base type 'PM'.
|
|
29
|
+
Type '(opts: ScreencastOptions, cdpPage: CdpPage) => any' is not assignable to type '(opts: object, page?: string | undefined) => any'.
|
|
30
|
+
Types of parameters 'cdpPage' and 'page' are incompatible.
|
|
31
|
+
Type 'string | undefined' is not assignable to type 'CdpPage'.
|
|
32
|
+
Type 'undefined' is not assignable to type 'CdpPage'.
|
|
33
|
+
src/ReportClient.tsx(151,38): error TS2345: Argument of type 'FunctionComponentElement<{}>' is not assignable to parameter of type 'ReactNode'.
|
|
34
|
+
Property 'children' is missing in type 'FunctionComponentElement<{}>' but required in type 'ReactPortal'.
|
|
35
|
+
src/SubPackages/react-dom/component/web.ts(90,13): error TS2345: Argument of type 'CElement<any, TesterantoComponent>' is not assignable to parameter of type 'ReactNode'.
|
|
36
|
+
Property 'children' is missing in type 'ComponentElement<any, TesterantoComponent>' but required in type 'ReactPortal'.
|
|
37
|
+
src/SubPackages/react-dom/jsx/node.ts(50,17): error TS2345: Argument of type 'FunctionComponentElement<any>' is not assignable to parameter of type 'I["istore"] | PromiseLike<I["istore"]>'.
|
|
38
|
+
Type 'FunctionComponentElement<any>' is not assignable to type 'I["istore"]'.
|
|
39
|
+
'I["istore"]' could be instantiated with an arbitrary type which could be unrelated to 'FunctionComponentElement<any>'.
|
|
40
|
+
src/SubPackages/react-dom/jsx/web.ts(71,38): error TS2339: Property 'createRoot' does not exist on type 'typeof import("/Users/adam/Code/testeranto/node_modules/@types/react-dom/index")'.
|
|
41
|
+
src/SubPackages/react-test-renderer/component/interface.ts(16,52): error TS2345: Argument of type 'CElement<any, Component<any, any, any>>' is not assignable to parameter of type 'ReactElement<unknown, string | JSXElementConstructor<any>>'.
|
|
42
|
+
Types of property 'type' are incompatible.
|
|
43
|
+
Type 'ComponentClass<any, any>' is not assignable to type 'string | JSXElementConstructor<any>'.
|
|
44
|
+
Type 'ComponentClass<any, any>' is not assignable to type 'new (props: any) => Component<any, any, any>'.
|
|
45
|
+
Construct signature return types 'Component<any, any, any>' and 'Component<any, any, any>' are incompatible.
|
|
46
|
+
The types returned by 'render()' are incompatible between these types.
|
|
47
|
+
Type 'React.ReactNode' is not assignable to type 'import("/Users/adam/Code/testeranto/node_modules/@types/react-dom/node_modules/@types/react/index").ReactNode'.
|
|
48
|
+
Type 'ReactElement<any, string | JSXElementConstructor<any>>' is not assignable to type 'ReactNode'.
|
|
49
|
+
Property 'children' is missing in type 'ReactElement<any, string | JSXElementConstructor<any>>' but required in type 'ReactPortal'.
|
|
50
|
+
src/SubPackages/react-test-renderer/fc/node.ts(66,13): error TS2345: Argument of type 'DetailedReactHTMLElement<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>' is not assignable to parameter of type 'ReactElement<unknown, string | JSXElementConstructor<any>>'.
|
|
51
|
+
Types of property 'key' are incompatible.
|
|
52
|
+
Type 'Key | null' is not assignable to type 'string | null'.
|
|
53
|
+
Type 'number' is not assignable to type 'string'.
|
|
54
|
+
src/SubPackages/react-test-renderer/fc/node.ts(66,33): error TS2769: No overload matches this call.
|
|
55
|
+
The last overload gave the following error.
|
|
56
|
+
Argument of type 'I["isubject"]' is not assignable to parameter of type 'string | FunctionComponent<(c?: any) => I["given"]> | ComponentClass<(c?: any) => I["given"], any>'.
|
|
57
|
+
Type 'I["isubject"]' is not assignable to type 'ComponentClass<(c?: any) => I["given"], any>'.
|
|
58
|
+
src/SubPackages/react-test-renderer/fc/node.ts(81,13): error TS2339: Property 'unmount' does not exist on type 'I["istore"]'.
|
|
59
|
+
src/SubPackages/react-test-renderer/fc/web.ts(63,13): error TS2345: Argument of type 'DetailedReactHTMLElement<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>' is not assignable to parameter of type 'ReactElement<unknown, string | JSXElementConstructor<any>>'.
|
|
60
|
+
Types of property 'key' are incompatible.
|
|
61
|
+
Type 'Key | null' is not assignable to type 'string | null'.
|
|
62
|
+
Type 'number' is not assignable to type 'string'.
|
|
63
|
+
src/SubPackages/react-test-renderer/fc/web.ts(63,33): error TS2769: No overload matches this call.
|
|
64
|
+
The last overload gave the following error.
|
|
65
|
+
Argument of type 'I["isubject"]' is not assignable to parameter of type 'string | FunctionComponent<(c?: any) => I["given"]> | ComponentClass<(c?: any) => I["given"], any>'.
|
|
66
|
+
Type 'I["isubject"]' is not assignable to type 'ComponentClass<(c?: any) => I["given"], any>'.
|
|
67
|
+
src/SubPackages/react-test-renderer/jsx/index.ts(78,9): error TS2345: Argument of type 'CElement<any, Component<any, any, any>>' is not assignable to parameter of type 'ReactElement<unknown, string | JSXElementConstructor<any>>'.
|
|
68
|
+
Types of property 'type' are incompatible.
|
|
69
|
+
Type 'ComponentClass<any, any>' is not assignable to type 'string | JSXElementConstructor<any>'.
|
|
70
|
+
Type 'ComponentClass<any, any>' is not assignable to type 'new (props: any) => Component<any, any, any>'.
|
|
71
|
+
Construct signature return types 'Component<any, any, any>' and 'Component<any, any, any>' are incompatible.
|
|
72
|
+
The types returned by 'render()' are incompatible between these types.
|
|
73
|
+
Type 'React.ReactNode' is not assignable to type 'import("/Users/adam/Code/testeranto/node_modules/@types/react-dom/node_modules/@types/react/index").ReactNode'.
|
|
74
|
+
Type 'ReactElement<any, string | JSXElementConstructor<any>>' is not assignable to type 'ReactNode'.
|
|
75
|
+
Property 'children' is missing in type 'ReactElement<any, string | JSXElementConstructor<any>>' but required in type 'ReactPortal'.
|
|
76
|
+
src/SubPackages/react-test-renderer/jsx/node.ts(26,34): error TS2344: Type 'I' does not satisfy the constraint 'Ibdd_in<ReactTestRenderer, ReactTestRenderer, ReactTestRenderer, ReactTestRenderer, unknown, unknown, unknown>'.
|
|
77
|
+
Type 'Ibdd_in<unknown, unknown, unknown, unknown, unknown, unknown, unknown>' is not assignable to type 'Ibdd_in<ReactTestRenderer, ReactTestRenderer, ReactTestRenderer, ReactTestRenderer, unknown, unknown, unknown>'.
|
|
78
|
+
Type 'unknown' is not assignable to type 'ReactTestRenderer'.
|
|
79
|
+
src/SubPackages/react-test-renderer/jsx/node.ts(27,33): error TS2344: Type 'I' does not satisfy the constraint 'Ibdd_in<ReactTestRenderer, ReactTestRenderer, ReactTestRenderer, ReactTestRenderer, unknown, unknown, unknown>'.
|
|
80
|
+
Type 'Ibdd_in<unknown, unknown, unknown, unknown, unknown, unknown, unknown>' is not assignable to type 'Ibdd_in<ReactTestRenderer, ReactTestRenderer, ReactTestRenderer, ReactTestRenderer, unknown, unknown, unknown>'.
|
|
81
|
+
Type 'unknown' is not assignable to type 'ReactTestRenderer'.
|
|
82
|
+
src/SubPackages/react-test-renderer/jsx/web.ts(26,34): error TS2344: Type 'I' does not satisfy the constraint 'Ibdd_in<ReactTestRenderer, ReactTestRenderer, ReactTestRenderer, ReactTestRenderer, unknown, unknown, unknown>'.
|
|
83
|
+
Type 'Ibdd_in<unknown, unknown, unknown, unknown, unknown, unknown, unknown>' is not assignable to type 'Ibdd_in<ReactTestRenderer, ReactTestRenderer, ReactTestRenderer, ReactTestRenderer, unknown, unknown, unknown>'.
|
|
84
|
+
Type 'unknown' is not assignable to type 'ReactTestRenderer'.
|
|
85
|
+
src/SubPackages/react-test-renderer/jsx/web.ts(27,33): error TS2344: Type 'I' does not satisfy the constraint 'Ibdd_in<ReactTestRenderer, ReactTestRenderer, ReactTestRenderer, ReactTestRenderer, unknown, unknown, unknown>'.
|
|
86
|
+
Type 'Ibdd_in<unknown, unknown, unknown, unknown, unknown, unknown, unknown>' is not assignable to type 'Ibdd_in<ReactTestRenderer, ReactTestRenderer, ReactTestRenderer, ReactTestRenderer, unknown, unknown, unknown>'.
|
|
87
|
+
Type 'unknown' is not assignable to type 'ReactTestRenderer'.
|
|
88
|
+
src/SubPackages/react-test-renderer/MemoExoticComponent/node.ts(43,37): error TS2345: Argument of type 'DetailedReactHTMLElement<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>' is not assignable to parameter of type 'ReactElement<unknown, string | JSXElementConstructor<any>>'.
|
|
89
|
+
Types of property 'key' are incompatible.
|
|
90
|
+
Type 'Key | null' is not assignable to type 'string | null'.
|
|
91
|
+
Type 'number' is not assignable to type 'string'.
|
|
92
|
+
src/SubPackages/react-test-renderer/MemoExoticComponent/node.ts(43,57): error TS2769: No overload matches this call.
|
|
93
|
+
The last overload gave the following error.
|
|
94
|
+
Argument of type 'I["isubject"]' is not assignable to parameter of type 'string | FunctionComponent<(c?: any) => I["given"]> | ComponentClass<(c?: any) => I["given"], any>'.
|
|
95
|
+
Type 'ReactTestRenderer' is not assignable to type 'string | FunctionComponent<(c?: any) => I["given"]> | ComponentClass<(c?: any) => I["given"], any>'.
|
|
96
|
+
Type 'I["isubject"]' is not assignable to type 'ComponentClass<(c?: any) => I["given"], any>'.
|
|
97
|
+
Type 'ReactTestRenderer' is not assignable to type 'ComponentClass<(c?: any) => I["given"], any>'.
|
|
98
|
+
Type 'ReactTestRenderer' provides no match for the signature 'new (props: (c?: any) => I["given"], context?: any): Component<(c?: any) => I["given"], any, any>'.
|
|
99
|
+
src/SubPackages/react/component/node.ts(84,14): error TS2349: This expression is not callable.
|
|
100
|
+
Type 'unknown' has no call signatures.
|
|
101
|
+
src/SubPackages/react/component/web.ts(83,14): error TS2349: This expression is not callable.
|
|
102
|
+
Type 'unknown' has no call signatures.
|
|
103
|
+
src/TestReport.tsx(155,56): error TS2739: Type '{ key: string; name: string; whens: { name: string; error: string; }[]; thens: { name: string; error: string; }[]; }' is missing the following properties from type '{ key: string; name: string; error: string[]; features: string[]; whens: { name: string; error: string; }[]; thens: { name: string; error: string; }[]; }': error, features
|
|
104
|
+
src/TestReport.tsx(172,38): error TS2345: Argument of type 'FunctionComponentElement<{}>' is not assignable to parameter of type 'ReactNode'.
|
|
105
|
+
Property 'children' is missing in type 'FunctionComponentElement<{}>' but required in type 'ReactPortal'.
|
|
106
|
+
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
|
package/Bundle.Dockerfile
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
FROM node:18.18.0
|
|
2
|
-
RUN apt-get update && \
|
|
3
|
-
apt-get install -y --no-install-recommends \
|
|
4
|
-
python3 \
|
|
5
|
-
make \
|
|
6
|
-
g++ && \
|
|
7
|
-
rm -rf /var/lib/apt/lists/*
|
|
8
|
-
# FROM shivjm/node-chromium:node18-chromium81-alpine
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
RUN yarn global add node-gyp
|
|
13
|
-
|
|
14
|
-
RUN mkdir -p /usr/src/app
|
|
15
|
-
RUN mkdir -p /usr/src/app/docs
|
|
16
|
-
WORKDIR /usr/src/app
|
|
17
|
-
COPY package.json /usr/src/app
|
|
18
|
-
RUN yarn install
|
|
19
|
-
COPY ./src/ /usr/src/app/src
|
|
20
|
-
COPY ./subPackages/ /usr/src/app/subPackages
|
|
21
|
-
COPY ./testeranto.mts /usr/src/app/testeranto.mts
|
|
22
|
-
COPY ./tsconfig.json /usr/src/app/tsconfig.json
|
|
23
|
-
COPY ./init.mts /usr/src/app/init.mts
|
|
24
|
-
COPY ./bundle.mts /usr/src/app/bundle.mts
|
|
25
|
-
COPY ./test.mts /usr/src/app/test.mts
|
|
26
|
-
|
|
27
|
-
RUN yarn run init
|
|
28
|
-
|
|
29
|
-
RUN apt-get update && apt-get install -y chromium
|
|
30
|
-
RUN /usr/bin/chromium --no-sandbox --version > /etc/chromium-version
|
|
31
|
-
|
|
32
|
-
ENV CHROMIUM_PATH=/usr/bin/chromium
|
|
33
|
-
RUN yarn bundle
|
|
34
|
-
# COPY ./docs/ /usr/src/app/docs
|
|
35
|
-
# # COPY ./testeranto.json /usr/src/app/testeranto.json
|
|
36
|
-
# # COPY prebuild.sh /usr/src/app
|
|
37
|
-
# # COPY postBuild.sh /usr/src/app
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
# # RUN yarn build
|
|
41
|
-
|
|
42
|
-
# RUN cp ./node_modules/testeranto/dist/prebuild/TaskManBackEnd.mjs /usr/src/app/TaskManBackEnd.mjs
|
|
43
|
-
# RUN cp ./node_modules/testeranto/dist/prebuild/TaskManFrontEnd.js /usr/src/app/TaskManFrontEnd.js
|
|
44
|
-
# RUN cp ./node_modules/testeranto/dist/prebuild/TaskManFrontEnd.css /usr/src/app/TaskManFrontEnd.css
|
|
45
|
-
|
|
46
|
-
# # RUN ts-node-esm ./node_modules/testeranto/dist/prebuild/TaskManBackEnd.mjs
|
|
47
|
-
|
|
48
|
-
# EXPOSE 3000
|
|
49
|
-
# EXPOSE 27017
|
|
50
|
-
# ENV MONGO_HOST=host.docker.internal
|
|
51
|
-
# # # CMD ['yarn', 'testeranto-testrun', '&', 'yarn', 'testeranto-taskman']
|
|
52
|
-
CMD ["yarn", "test"]
|
package/bin/init-docs.js
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import fs from "fs";
|
|
3
|
-
import Init from "../dist/module/src/Init";
|
|
4
|
-
console.log("Initializing a testeranto project");
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
if (!process.argv[2]) {
|
|
9
|
-
console.log("You didn't pass a config file, so I will create one for you.")
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
fs.writeFileSync("testeranto.mts", fs.readFileSync("node_modules/testeranto/src/defaultConfig.ts"))
|
|
13
|
-
import(process.cwd() + "/" + "testeranto.mts").then((module) => {
|
|
14
|
-
Init(module.default);
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}
|
|
19
|
-
else {
|
|
20
|
-
import(process.cwd() + "/" + process.argv[2]).then((module) => {
|
|
21
|
-
Init(module.default);
|
|
22
|
-
});
|
|
23
|
-
|
|
24
|
-
}
|