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
|
@@ -1,553 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'module';const require = createRequire(import.meta.url);
|
|
2
|
-
|
|
3
|
-
// src/build-tests.ts
|
|
4
|
-
import process2 from "process";
|
|
5
|
-
|
|
6
|
-
// src/Project.ts
|
|
7
|
-
import { spawn } from "child_process";
|
|
8
|
-
import esbuild from "esbuild";
|
|
9
|
-
import fs2 from "fs";
|
|
10
|
-
import path4 from "path";
|
|
11
|
-
import readline from "readline";
|
|
12
|
-
import { glob } from "glob";
|
|
13
|
-
|
|
14
|
-
// src/esbuildConfigs/index.ts
|
|
15
|
-
var esbuildConfigs_default = (config) => {
|
|
16
|
-
return {
|
|
17
|
-
// packages: "external",
|
|
18
|
-
target: "esnext",
|
|
19
|
-
format: "esm",
|
|
20
|
-
splitting: true,
|
|
21
|
-
outExtension: { ".js": ".mjs" },
|
|
22
|
-
outbase: config.outbase,
|
|
23
|
-
jsx: "transform",
|
|
24
|
-
bundle: true,
|
|
25
|
-
minify: config.minify === true,
|
|
26
|
-
write: true,
|
|
27
|
-
loader: {
|
|
28
|
-
".js": "jsx",
|
|
29
|
-
".png": "binary",
|
|
30
|
-
".jpg": "binary"
|
|
31
|
-
}
|
|
32
|
-
};
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
// src/esbuildConfigs/inputFilesPlugin.ts
|
|
36
|
-
import fs from "fs";
|
|
37
|
-
import path from "path";
|
|
38
|
-
var otherInputs = {};
|
|
39
|
-
var register = (entrypoint, sources) => {
|
|
40
|
-
if (!otherInputs[entrypoint]) {
|
|
41
|
-
otherInputs[entrypoint] = /* @__PURE__ */ new Set();
|
|
42
|
-
}
|
|
43
|
-
sources.forEach((s) => otherInputs[entrypoint].add(s));
|
|
44
|
-
};
|
|
45
|
-
function tree(meta, key) {
|
|
46
|
-
const outputKey = Object.keys(meta.outputs).find((k) => {
|
|
47
|
-
return meta.outputs[k].entryPoint === key;
|
|
48
|
-
});
|
|
49
|
-
if (!outputKey) {
|
|
50
|
-
console.error("No outputkey found");
|
|
51
|
-
process.exit(-1);
|
|
52
|
-
}
|
|
53
|
-
return Object.keys(meta.outputs[outputKey].inputs).filter(
|
|
54
|
-
(k) => k.startsWith("src")
|
|
55
|
-
);
|
|
56
|
-
}
|
|
57
|
-
var inputFilesPlugin_default = (platform, entryPoints) => {
|
|
58
|
-
return {
|
|
59
|
-
register,
|
|
60
|
-
inputFilesPluginFactory: {
|
|
61
|
-
name: "metafileWriter",
|
|
62
|
-
setup(build) {
|
|
63
|
-
build.onEnd((result) => {
|
|
64
|
-
fs.writeFileSync(
|
|
65
|
-
`docs/${platform}/metafile.json`,
|
|
66
|
-
JSON.stringify(result, null, 2)
|
|
67
|
-
);
|
|
68
|
-
if (result.errors.length === 0) {
|
|
69
|
-
entryPoints.forEach((entryPoint) => {
|
|
70
|
-
const filePath = path.join(
|
|
71
|
-
"./docs/",
|
|
72
|
-
platform,
|
|
73
|
-
entryPoint.split(".").slice(0, -1).join("."),
|
|
74
|
-
`inputFiles.json`
|
|
75
|
-
);
|
|
76
|
-
const dirName = path.dirname(filePath);
|
|
77
|
-
if (!fs.existsSync(dirName)) {
|
|
78
|
-
fs.mkdirSync(dirName, { recursive: true });
|
|
79
|
-
}
|
|
80
|
-
const promptPath = path.join(
|
|
81
|
-
"./docs/",
|
|
82
|
-
platform,
|
|
83
|
-
entryPoint.split(".").slice(0, -1).join("."),
|
|
84
|
-
`prompt.txt`
|
|
85
|
-
);
|
|
86
|
-
const testPaths = path.join(
|
|
87
|
-
"./docs/",
|
|
88
|
-
platform,
|
|
89
|
-
entryPoint.split(".").slice(0, -1).join("."),
|
|
90
|
-
`tests.json`
|
|
91
|
-
);
|
|
92
|
-
const featuresPath = path.join(
|
|
93
|
-
"./docs/",
|
|
94
|
-
platform,
|
|
95
|
-
entryPoint.split(".").slice(0, -1).join("."),
|
|
96
|
-
`featurePrompt.txt`
|
|
97
|
-
);
|
|
98
|
-
const stderrPath = path.join(
|
|
99
|
-
"./docs/",
|
|
100
|
-
platform,
|
|
101
|
-
entryPoint.split(".").slice(0, -1).join("."),
|
|
102
|
-
`stderr.log`
|
|
103
|
-
);
|
|
104
|
-
const stdoutPath = path.join(
|
|
105
|
-
"./docs/",
|
|
106
|
-
platform,
|
|
107
|
-
entryPoint.split(".").slice(0, -1).join("."),
|
|
108
|
-
`stdout.log`
|
|
109
|
-
);
|
|
110
|
-
if (result.metafile) {
|
|
111
|
-
const addableFiles = tree(
|
|
112
|
-
result.metafile,
|
|
113
|
-
entryPoint.split("/").slice(1).join("/")
|
|
114
|
-
).map((y) => {
|
|
115
|
-
if (otherInputs[y]) {
|
|
116
|
-
return Array.from(otherInputs[y]);
|
|
117
|
-
}
|
|
118
|
-
return y;
|
|
119
|
-
}).flat();
|
|
120
|
-
const typeErrorFiles = addableFiles.map(
|
|
121
|
-
(t) => `docs/types/${t}.type_errors.txt`
|
|
122
|
-
);
|
|
123
|
-
fs.writeFileSync(
|
|
124
|
-
promptPath,
|
|
125
|
-
`
|
|
126
|
-
${addableFiles.map((x) => {
|
|
127
|
-
return `/add ${x}`;
|
|
128
|
-
}).join("\n")}
|
|
129
|
-
|
|
130
|
-
${typeErrorFiles.map((x) => {
|
|
131
|
-
return `/read ${x}`;
|
|
132
|
-
}).join("\n")}
|
|
133
|
-
|
|
134
|
-
/read ${testPaths}
|
|
135
|
-
/read ${stdoutPath}
|
|
136
|
-
/read ${stderrPath}
|
|
137
|
-
|
|
138
|
-
/load ${featuresPath}
|
|
139
|
-
|
|
140
|
-
/code Fix the failing tests described in ${testPaths}. Correct any type signature errors described in the files [${typeErrorFiles.join(
|
|
141
|
-
", "
|
|
142
|
-
)}]. Implement any method which throws "Function not implemented."
|
|
143
|
-
`
|
|
144
|
-
);
|
|
145
|
-
}
|
|
146
|
-
});
|
|
147
|
-
}
|
|
148
|
-
});
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
};
|
|
152
|
-
};
|
|
153
|
-
|
|
154
|
-
// src/esbuildConfigs/featuresPlugin.ts
|
|
155
|
-
import path2 from "path";
|
|
156
|
-
var featuresPlugin_default = {
|
|
157
|
-
name: "feature-markdown",
|
|
158
|
-
setup(build) {
|
|
159
|
-
build.onResolve({ filter: /\.md$/ }, (args) => {
|
|
160
|
-
if (args.resolveDir === "")
|
|
161
|
-
return;
|
|
162
|
-
return {
|
|
163
|
-
path: path2.isAbsolute(args.path) ? args.path : path2.join(args.resolveDir, args.path),
|
|
164
|
-
namespace: "feature-markdown"
|
|
165
|
-
};
|
|
166
|
-
});
|
|
167
|
-
build.onLoad(
|
|
168
|
-
{ filter: /.*/, namespace: "feature-markdown" },
|
|
169
|
-
async (args) => {
|
|
170
|
-
return {
|
|
171
|
-
contents: `file://${args.path}`,
|
|
172
|
-
loader: "text"
|
|
173
|
-
// contents: JSON.stringify({ path: args.path }),
|
|
174
|
-
// loader: "json",
|
|
175
|
-
// contents: JSON.stringify({
|
|
176
|
-
// // html: markdownHTML,
|
|
177
|
-
// raw: markdownContent,
|
|
178
|
-
// filename: args.path, //path.basename(args.path),
|
|
179
|
-
// }),
|
|
180
|
-
// loader: "json",
|
|
181
|
-
};
|
|
182
|
-
}
|
|
183
|
-
);
|
|
184
|
-
}
|
|
185
|
-
};
|
|
186
|
-
|
|
187
|
-
// src/esbuildConfigs/node.ts
|
|
188
|
-
var node_default = (config, entryPoints) => {
|
|
189
|
-
const { inputFilesPluginFactory, register: register2 } = inputFilesPlugin_default(
|
|
190
|
-
"node",
|
|
191
|
-
entryPoints
|
|
192
|
-
);
|
|
193
|
-
return {
|
|
194
|
-
...esbuildConfigs_default(config),
|
|
195
|
-
splitting: true,
|
|
196
|
-
outdir: config.outdir + "/node",
|
|
197
|
-
// inject: [`./node_modules/testeranto/dist/cjs-shim.js`],
|
|
198
|
-
metafile: true,
|
|
199
|
-
supported: {
|
|
200
|
-
"dynamic-import": true
|
|
201
|
-
},
|
|
202
|
-
define: {
|
|
203
|
-
"process.env.FLUENTFFMPEG_COV": "0"
|
|
204
|
-
},
|
|
205
|
-
absWorkingDir: process.cwd(),
|
|
206
|
-
banner: {
|
|
207
|
-
js: `import { createRequire } from 'module';const require = createRequire(import.meta.url);`
|
|
208
|
-
},
|
|
209
|
-
platform: "node",
|
|
210
|
-
external: [
|
|
211
|
-
// "testeranto.json",
|
|
212
|
-
// "features.test.js",
|
|
213
|
-
"react",
|
|
214
|
-
// "events",
|
|
215
|
-
// "ganache"
|
|
216
|
-
...config.externals
|
|
217
|
-
],
|
|
218
|
-
entryPoints: [...entryPoints],
|
|
219
|
-
plugins: [
|
|
220
|
-
featuresPlugin_default,
|
|
221
|
-
// markdownPlugin({}),
|
|
222
|
-
...config.nodePlugins.map((p) => p(register2, entryPoints)) || [],
|
|
223
|
-
inputFilesPluginFactory,
|
|
224
|
-
// inputFilesPlugin("node", entryPoints),
|
|
225
|
-
{
|
|
226
|
-
name: "rebuild-notify",
|
|
227
|
-
setup(build) {
|
|
228
|
-
build.onEnd((result) => {
|
|
229
|
-
console.log(`node build ended with ${result.errors.length} errors`);
|
|
230
|
-
if (result.errors.length > 0) {
|
|
231
|
-
console.log(result);
|
|
232
|
-
}
|
|
233
|
-
});
|
|
234
|
-
}
|
|
235
|
-
}
|
|
236
|
-
]
|
|
237
|
-
};
|
|
238
|
-
};
|
|
239
|
-
|
|
240
|
-
// src/esbuildConfigs/web.ts
|
|
241
|
-
import path3 from "path";
|
|
242
|
-
var web_default = (config, entryPoints) => {
|
|
243
|
-
const { inputFilesPluginFactory, register: register2 } = inputFilesPlugin_default(
|
|
244
|
-
"web",
|
|
245
|
-
entryPoints
|
|
246
|
-
);
|
|
247
|
-
return {
|
|
248
|
-
...esbuildConfigs_default(config),
|
|
249
|
-
// inject: ["./node_modules/testeranto/dist/cjs-shim.js"],
|
|
250
|
-
// banner: {
|
|
251
|
-
// js: `import { createRequire } from 'module';const require = createRequire(import.meta.url);`,
|
|
252
|
-
// },
|
|
253
|
-
// splitting: true,
|
|
254
|
-
outdir: config.outdir + "/web",
|
|
255
|
-
alias: {
|
|
256
|
-
react: path3.resolve("./node_modules/react")
|
|
257
|
-
},
|
|
258
|
-
metafile: true,
|
|
259
|
-
external: [
|
|
260
|
-
// "testeranto.json",
|
|
261
|
-
// "features.test.ts",
|
|
262
|
-
// "url",
|
|
263
|
-
// "react",
|
|
264
|
-
"path",
|
|
265
|
-
"fs",
|
|
266
|
-
"stream",
|
|
267
|
-
"http",
|
|
268
|
-
"constants",
|
|
269
|
-
"net",
|
|
270
|
-
"assert",
|
|
271
|
-
"tls",
|
|
272
|
-
"os",
|
|
273
|
-
"child_process",
|
|
274
|
-
"readline",
|
|
275
|
-
"zlib",
|
|
276
|
-
"crypto",
|
|
277
|
-
"https",
|
|
278
|
-
"util",
|
|
279
|
-
"process",
|
|
280
|
-
"dns"
|
|
281
|
-
],
|
|
282
|
-
platform: "browser",
|
|
283
|
-
entryPoints: [...entryPoints],
|
|
284
|
-
plugins: [
|
|
285
|
-
featuresPlugin_default,
|
|
286
|
-
// markdownPlugin({}),
|
|
287
|
-
...config.nodePlugins.map((p) => p(register2, entryPoints)) || [],
|
|
288
|
-
inputFilesPluginFactory,
|
|
289
|
-
{
|
|
290
|
-
name: "rebuild-notify",
|
|
291
|
-
setup(build) {
|
|
292
|
-
build.onEnd((result) => {
|
|
293
|
-
console.log(`web build ended with ${result.errors.length} errors`);
|
|
294
|
-
if (result.errors.length > 0) {
|
|
295
|
-
console.log(result);
|
|
296
|
-
}
|
|
297
|
-
});
|
|
298
|
-
}
|
|
299
|
-
}
|
|
300
|
-
]
|
|
301
|
-
};
|
|
302
|
-
};
|
|
303
|
-
|
|
304
|
-
// src/web.html.ts
|
|
305
|
-
var web_html_default = (jsfilePath, htmlFilePath) => `
|
|
306
|
-
<!DOCTYPE html>
|
|
307
|
-
<html lang="en">
|
|
308
|
-
|
|
309
|
-
<head>
|
|
310
|
-
<script type="module" src="${jsfilePath}"></script>
|
|
311
|
-
|
|
312
|
-
</head>
|
|
313
|
-
|
|
314
|
-
<body>
|
|
315
|
-
<h1>${htmlFilePath}</h1>
|
|
316
|
-
<div id="root">
|
|
317
|
-
|
|
318
|
-
</div>
|
|
319
|
-
</body>
|
|
320
|
-
|
|
321
|
-
<footer></footer>
|
|
322
|
-
|
|
323
|
-
</html>
|
|
324
|
-
`;
|
|
325
|
-
|
|
326
|
-
// src/Project.ts
|
|
327
|
-
readline.emitKeypressEvents(process.stdin);
|
|
328
|
-
if (process.stdin.isTTY)
|
|
329
|
-
process.stdin.setRawMode(true);
|
|
330
|
-
var logContent = [];
|
|
331
|
-
function parseTsErrors() {
|
|
332
|
-
try {
|
|
333
|
-
const regex = /(^src(.*?))\(\d*,\d*\): error/gm;
|
|
334
|
-
const brokenFilesToLines = {};
|
|
335
|
-
for (let i = 0; i < logContent.length - 1; i++) {
|
|
336
|
-
let m;
|
|
337
|
-
while ((m = regex.exec(logContent[i])) !== null) {
|
|
338
|
-
if (m.index === regex.lastIndex) {
|
|
339
|
-
regex.lastIndex++;
|
|
340
|
-
}
|
|
341
|
-
if (!brokenFilesToLines[m[1]]) {
|
|
342
|
-
brokenFilesToLines[m[1]] = /* @__PURE__ */ new Set();
|
|
343
|
-
}
|
|
344
|
-
brokenFilesToLines[m[1]].add(i);
|
|
345
|
-
}
|
|
346
|
-
}
|
|
347
|
-
const final = Object.keys(brokenFilesToLines).reduce((mm, lm, ndx) => {
|
|
348
|
-
mm[lm] = Array.from(brokenFilesToLines[lm]).map((l, ndx3) => {
|
|
349
|
-
const a = Array.from(brokenFilesToLines[lm]);
|
|
350
|
-
return Object.keys(a).reduce((mm2, lm2, ndx2) => {
|
|
351
|
-
const acc = [];
|
|
352
|
-
let j = a[lm2] + 1;
|
|
353
|
-
let working = true;
|
|
354
|
-
while (j < logContent.length - 1 && working) {
|
|
355
|
-
if (!logContent[j].match(regex) && working && !logContent[j].match(/^..\/(.*?)\(\d*,\d*\)/)) {
|
|
356
|
-
acc.push(logContent[j]);
|
|
357
|
-
} else {
|
|
358
|
-
working = false;
|
|
359
|
-
}
|
|
360
|
-
j++;
|
|
361
|
-
}
|
|
362
|
-
mm2[lm] = [logContent[l], ...acc];
|
|
363
|
-
return mm2;
|
|
364
|
-
}, {})[lm];
|
|
365
|
-
});
|
|
366
|
-
return mm;
|
|
367
|
-
}, {});
|
|
368
|
-
Object.keys(final).forEach((k) => {
|
|
369
|
-
fs2.mkdirSync(`./docs/types/${k.split("/").slice(0, -1).join("/")}`, {
|
|
370
|
-
recursive: true
|
|
371
|
-
});
|
|
372
|
-
fs2.writeFileSync(
|
|
373
|
-
`./docs/types/${k}.type_errors.txt`,
|
|
374
|
-
final[k].flat().flat().join("\r\n")
|
|
375
|
-
);
|
|
376
|
-
});
|
|
377
|
-
} catch (error) {
|
|
378
|
-
console.error("Error reading or parsing the log file:", error);
|
|
379
|
-
process.exit(1);
|
|
380
|
-
}
|
|
381
|
-
}
|
|
382
|
-
var compile = () => {
|
|
383
|
-
return new Promise((resolve, reject) => {
|
|
384
|
-
const tsc = spawn("tsc", ["-noEmit"]);
|
|
385
|
-
tsc.stdout.on("data", (data) => {
|
|
386
|
-
const lines = data.toString().split("\n");
|
|
387
|
-
logContent.push(...lines);
|
|
388
|
-
});
|
|
389
|
-
tsc.stderr.on("data", (data) => {
|
|
390
|
-
console.error(`stderr: ${data}`);
|
|
391
|
-
process.exit(-1);
|
|
392
|
-
});
|
|
393
|
-
tsc.on("close", (code) => {
|
|
394
|
-
parseTsErrors();
|
|
395
|
-
console.log("tsc done");
|
|
396
|
-
resolve(`tsc process exited with code ${code}`);
|
|
397
|
-
});
|
|
398
|
-
});
|
|
399
|
-
};
|
|
400
|
-
var ITProject = class {
|
|
401
|
-
constructor(configs) {
|
|
402
|
-
this.nodeDone = false;
|
|
403
|
-
this.webDone = false;
|
|
404
|
-
this.onNodeDone = () => {
|
|
405
|
-
this.nodeDone = true;
|
|
406
|
-
this.onDone();
|
|
407
|
-
};
|
|
408
|
-
this.onWebDone = () => {
|
|
409
|
-
this.webDone = true;
|
|
410
|
-
this.onDone();
|
|
411
|
-
};
|
|
412
|
-
this.onDone = () => {
|
|
413
|
-
if (this.nodeDone && this.webDone && this.mode === "PROD") {
|
|
414
|
-
console.log("Testeranto-EsBuild is all done. Goodbye!");
|
|
415
|
-
process.exit();
|
|
416
|
-
} else {
|
|
417
|
-
if (this.mode === "PROD") {
|
|
418
|
-
console.log("waiting for tests to finish");
|
|
419
|
-
console.log(
|
|
420
|
-
JSON.stringify(
|
|
421
|
-
{
|
|
422
|
-
nodeDone: this.nodeDone,
|
|
423
|
-
webDone: this.webDone,
|
|
424
|
-
mode: this.mode
|
|
425
|
-
},
|
|
426
|
-
null,
|
|
427
|
-
2
|
|
428
|
-
)
|
|
429
|
-
);
|
|
430
|
-
} else {
|
|
431
|
-
console.log("waiting for tests to change");
|
|
432
|
-
}
|
|
433
|
-
console.log("press 'q' to quit");
|
|
434
|
-
}
|
|
435
|
-
};
|
|
436
|
-
this.config = configs;
|
|
437
|
-
this.mode = this.config.devMode ? "DEV" : "PROD";
|
|
438
|
-
process.stdin.on("keypress", (str, key) => {
|
|
439
|
-
if (key.name === "q") {
|
|
440
|
-
console.log("Testeranto-EsBuild is shutting down...");
|
|
441
|
-
this.mode = "PROD";
|
|
442
|
-
this.onDone();
|
|
443
|
-
}
|
|
444
|
-
});
|
|
445
|
-
fs2.writeFileSync(
|
|
446
|
-
`${this.config.outdir}/testeranto.json`,
|
|
447
|
-
JSON.stringify(
|
|
448
|
-
{
|
|
449
|
-
...this.config,
|
|
450
|
-
buildDir: process.cwd() + "/" + this.config.outdir
|
|
451
|
-
},
|
|
452
|
-
null,
|
|
453
|
-
2
|
|
454
|
-
)
|
|
455
|
-
);
|
|
456
|
-
Promise.resolve(
|
|
457
|
-
Promise.all(
|
|
458
|
-
[...this.getSecondaryEndpointsPoints("web")].map(
|
|
459
|
-
async (sourceFilePath) => {
|
|
460
|
-
const sourceFileSplit = sourceFilePath.split("/");
|
|
461
|
-
const sourceDir = sourceFileSplit.slice(0, -1);
|
|
462
|
-
const sourceFileName = sourceFileSplit[sourceFileSplit.length - 1];
|
|
463
|
-
const sourceFileNameMinusJs = sourceFileName.split(".").slice(0, -1).join(".");
|
|
464
|
-
const htmlFilePath = path4.normalize(
|
|
465
|
-
`${process.cwd()}/${this.config.outdir}/web/${sourceDir.join(
|
|
466
|
-
"/"
|
|
467
|
-
)}/${sourceFileNameMinusJs}.html`
|
|
468
|
-
);
|
|
469
|
-
const jsfilePath = `./${sourceFileNameMinusJs}.mjs`;
|
|
470
|
-
return fs2.promises.mkdir(path4.dirname(htmlFilePath), { recursive: true }).then(
|
|
471
|
-
(x) => fs2.writeFileSync(
|
|
472
|
-
htmlFilePath,
|
|
473
|
-
web_html_default(jsfilePath, htmlFilePath)
|
|
474
|
-
)
|
|
475
|
-
);
|
|
476
|
-
}
|
|
477
|
-
)
|
|
478
|
-
)
|
|
479
|
-
);
|
|
480
|
-
const [nodeEntryPoints, webEntryPoints] = getRunnables(this.config.tests);
|
|
481
|
-
glob(`./${this.config.outdir}/chunk-*.mjs`, {
|
|
482
|
-
ignore: "node_modules/**"
|
|
483
|
-
}).then((chunks) => {
|
|
484
|
-
chunks.forEach((chunk) => {
|
|
485
|
-
fs2.unlinkSync(chunk);
|
|
486
|
-
});
|
|
487
|
-
});
|
|
488
|
-
Promise.all([
|
|
489
|
-
compile(),
|
|
490
|
-
esbuild.context(node_default(this.config, nodeEntryPoints)).then(async (nodeContext) => {
|
|
491
|
-
if (this.config.devMode) {
|
|
492
|
-
await nodeContext.watch().then((v) => {
|
|
493
|
-
this.onNodeDone();
|
|
494
|
-
});
|
|
495
|
-
} else {
|
|
496
|
-
nodeContext.rebuild().then((v) => {
|
|
497
|
-
this.onNodeDone();
|
|
498
|
-
});
|
|
499
|
-
}
|
|
500
|
-
return nodeContext;
|
|
501
|
-
}),
|
|
502
|
-
esbuild.context(web_default(this.config, webEntryPoints)).then(async (webContext) => {
|
|
503
|
-
if (this.config.devMode) {
|
|
504
|
-
await webContext.watch().then((v) => {
|
|
505
|
-
this.onWebDone();
|
|
506
|
-
});
|
|
507
|
-
} else {
|
|
508
|
-
webContext.rebuild().then((v) => {
|
|
509
|
-
this.onWebDone();
|
|
510
|
-
});
|
|
511
|
-
}
|
|
512
|
-
return webContext;
|
|
513
|
-
})
|
|
514
|
-
]);
|
|
515
|
-
}
|
|
516
|
-
getSecondaryEndpointsPoints(runtime) {
|
|
517
|
-
const meta = (ts, st) => {
|
|
518
|
-
ts.forEach((t) => {
|
|
519
|
-
if (t[1] === runtime) {
|
|
520
|
-
st.add(t[0]);
|
|
521
|
-
}
|
|
522
|
-
if (Array.isArray(t[3])) {
|
|
523
|
-
meta(t[3], st);
|
|
524
|
-
}
|
|
525
|
-
});
|
|
526
|
-
return st;
|
|
527
|
-
};
|
|
528
|
-
return Array.from(meta(this.config.tests, /* @__PURE__ */ new Set()));
|
|
529
|
-
}
|
|
530
|
-
};
|
|
531
|
-
var getRunnables = (tests, payload = [/* @__PURE__ */ new Set(), /* @__PURE__ */ new Set()]) => {
|
|
532
|
-
return tests.reduce((pt, cv, cndx, cry) => {
|
|
533
|
-
if (cv[1] === "node") {
|
|
534
|
-
pt[0].add(cv[0]);
|
|
535
|
-
} else if (cv[1] === "web") {
|
|
536
|
-
pt[1].add(cv[0]);
|
|
537
|
-
}
|
|
538
|
-
if (cv[3].length) {
|
|
539
|
-
getRunnables(cv[3], payload);
|
|
540
|
-
}
|
|
541
|
-
return pt;
|
|
542
|
-
}, payload);
|
|
543
|
-
};
|
|
544
|
-
|
|
545
|
-
// src/build-tests.ts
|
|
546
|
-
if (!process2.argv[2]) {
|
|
547
|
-
console.log("You didn't pass a config file");
|
|
548
|
-
process2.exit(-1);
|
|
549
|
-
} else {
|
|
550
|
-
import(process2.cwd() + "/" + process2.argv[2]).then((module) => {
|
|
551
|
-
new ITProject(module.default);
|
|
552
|
-
});
|
|
553
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const execCommand: (command: any) => Promise<void>;
|
package/dist/types/src/Node.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import Testeranto from "./lib/core.js";
|
|
2
|
-
import { ITTestResourceRequest } from "./lib/index.js";
|
|
3
|
-
import type { IBaseTest, ITestImplementation, ITestSpecification } from "./Types.js";
|
|
4
|
-
import { ITestInterface, INodeTestInterface } from "./lib/types.js";
|
|
5
|
-
export declare class NodeTesteranto<TestShape extends IBaseTest<unknown, unknown, unknown, unknown, unknown, unknown, unknown, Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>>> extends Testeranto<TestShape> {
|
|
6
|
-
constructor(input: TestShape["iinput"], testSpecification: ITestSpecification<TestShape>, testImplementation: ITestImplementation<TestShape>, testResourceRequirement: ITTestResourceRequest, testInterface: Partial<ITestInterface<TestShape>>);
|
|
7
|
-
receiveTestResourceConfig(partialTestResource: string): Promise<{
|
|
8
|
-
features: string[];
|
|
9
|
-
failed: number;
|
|
10
|
-
}>;
|
|
11
|
-
}
|
|
12
|
-
declare const _default: <ITestShape extends IBaseTest<unknown, unknown, unknown, unknown, unknown, unknown, unknown, Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>>>(input: ITestShape["iinput"], testSpecification: ITestSpecification<ITestShape>, testImplementation: ITestImplementation<ITestShape, object>, testInterface: Partial<INodeTestInterface<ITestShape>>, testResourceRequirement?: ITTestResourceRequest) => Promise<Testeranto<ITestShape>>;
|
|
13
|
-
export default _default;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { IBaseConfig, IRunTime } from "./lib/types.js";
|
|
2
|
-
export declare class ITProject {
|
|
3
|
-
config: IBaseConfig;
|
|
4
|
-
mode: `DEV` | `PROD`;
|
|
5
|
-
nodeDone: boolean;
|
|
6
|
-
webDone: boolean;
|
|
7
|
-
constructor(configs: IBaseConfig);
|
|
8
|
-
onNodeDone: () => void;
|
|
9
|
-
onWebDone: () => void;
|
|
10
|
-
onDone: () => void;
|
|
11
|
-
getSecondaryEndpointsPoints(runtime?: IRunTime): string[];
|
|
12
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { IBaseTest, IPartialNodeInterface, ITestImplementation, ITestSpecification } from "../Types";
|
|
2
|
-
declare type IInput = string;
|
|
3
|
-
export declare type IImpl<ISpec extends IBaseTest> = ITestImplementation<ISpec>;
|
|
4
|
-
export declare type ISpec<T extends IBaseTest> = ITestSpecification<T>;
|
|
5
|
-
declare const _default: <ITestShape extends any>(testInput: IInput, testSpecifications: ISpec<ITestShape>, testImplementations: ITestImplementation<ITestShape, object>, testInterface?: Partial<import("../lib/types.js").INodeTestInterface<ITestShape>> | undefined) => Promise<import("../lib/core.js").default<ITestShape>>;
|
|
6
|
-
export default _default;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { IBaseTest, ITestImplementation, ITestSpecification } from "../../../Types";
|
|
3
|
-
declare type IInput = typeof React.Component;
|
|
4
|
-
export declare type IImpl<ISpec extends IBaseTest, IState> = ITestImplementation<ISpec, object>;
|
|
5
|
-
export declare type ISpec<T extends IBaseTest> = ITestSpecification<T>;
|
|
6
|
-
declare const _default: <ITestShape extends any, IState>(testImplementations: ITestImplementation<ITestShape, object>, testSpecifications: ISpec<ITestShape>, testInput: IInput) => Promise<import("../../../lib/core.js").default<ITestShape>>;
|
|
7
|
-
export default _default;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { IBaseTest, ITestImplementation, ITestSpecification } from "../../../Types";
|
|
3
|
-
declare type IInput = typeof React.Component;
|
|
4
|
-
export declare type IImpl<ISpec extends IBaseTest, IState> = ITestImplementation<ISpec, object>;
|
|
5
|
-
export declare type ISpec<T extends IBaseTest> = ITestSpecification<T>;
|
|
6
|
-
declare const _default: <ITestShape extends any>(testImplementations: ITestImplementation<ITestShape, object>, testSpecifications: ISpec<ITestShape>, testInput: IInput) => Promise<import("../../../lib/core.js").default<ITestShape>>;
|
|
7
|
-
export default _default;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { CElement } from "react";
|
|
2
|
-
import { IBaseTest, IPartialInterface, ITestImplementation, ITestSpecification } from "../../../Types";
|
|
3
|
-
export declare type IWhenShape = any;
|
|
4
|
-
export declare type IThenShape = any;
|
|
5
|
-
export declare type InitialState = unknown;
|
|
6
|
-
export declare type IInput = () => JSX.Element;
|
|
7
|
-
export declare type ISelection = CElement<any, any>;
|
|
8
|
-
export declare type IStore = CElement<any, any>;
|
|
9
|
-
export declare type ISubject = CElement<any, any>;
|
|
10
|
-
export declare type ITestImpl<ITestShape extends IBaseTest> = ITestImplementation<ITestShape>;
|
|
11
|
-
export declare type ITestSpec<ITestShape extends IBaseTest> = ITestSpecification<ITestShape>;
|
|
12
|
-
export declare const testInterface: IPartialInterface<any>;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { IPartialInterface } from "../../../Types";
|
|
2
|
-
import { ITestImpl, ITestSpec, IInput } from "./index.js";
|
|
3
|
-
declare const _default: <ITestShape extends any>(testImplementations: ITestImpl<ITestShape>, testSpecifications: ITestSpec<ITestShape>, testInput: IInput, testInterface?: Partial<import("../../../lib/types.js").ITestInterface<ITestShape>>) => Promise<import("../../../lib/core.js").default<ITestShape>>;
|
|
4
|
-
export default _default;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { IPartialWebInterface } from "../../../Types";
|
|
2
|
-
import { ITestImpl, ITestSpec, IInput } from "./index.js";
|
|
3
|
-
declare const _default: <ITestShape extends any>(testImplementations: ITestImpl<ITestShape>, testSpecifications: ITestSpec<ITestShape>, testInput: IInput, testInterface: Partial<import("../../../lib/types").IWebTestInterface<ITestShape>>) => Promise<import("../../../lib/core").default<ITestShape>>;
|
|
4
|
-
export default _default;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import React, { ReactNode } from "react";
|
|
2
|
-
import { renderToStaticMarkup, renderToStaticNodeStream } from "react-dom/server";
|
|
3
|
-
import Stream from "stream";
|
|
4
|
-
import { ITestImplementation, ITestSpecification } from "../../../Types";
|
|
5
|
-
declare type IInput = typeof React.Component;
|
|
6
|
-
export declare type IThenShape = any;
|
|
7
|
-
export declare type ISelection = ReactNode;
|
|
8
|
-
export declare type IStore = ReactNode;
|
|
9
|
-
export declare type ISubject = ReactNode;
|
|
10
|
-
export { renderToStaticMarkup, renderToStaticNodeStream, Stream };
|
|
11
|
-
declare const _default: <ITestShape extends any>(testImplementations: ITestImplementation<ITestShape, object>, testSpecifications: ITestSpecification<ITestShape>, testInput: IInput) => Promise<import("../../../lib/core.js").default<ITestShape>>;
|
|
12
|
-
export default _default;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import ReactDom from "react-dom/client";
|
|
3
|
-
import { IPartialWebInterface, ITestImplementation, ITestSpecification } from "../../../Types";
|
|
4
|
-
declare type IInput = typeof React.Component;
|
|
5
|
-
export declare type IStore = {
|
|
6
|
-
htmlElement: HTMLElement;
|
|
7
|
-
reactElement: any;
|
|
8
|
-
domRoot: ReactDom.Root;
|
|
9
|
-
};
|
|
10
|
-
declare const _default: <ITestShape extends any, IWhen, IGiven>(testInput: IInput, testSpecifications: ITestSpecification<ITestShape>, testImplementations: any, testInterface?: IPartialWebInterface<any>) => Promise<import("../../../lib/core.js").default<ITestShape>>;
|
|
11
|
-
export default _default;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
export declare type IInput = (props?: any) => JSX.Element;
|
|
3
|
-
export declare type IState = unknown;
|
|
4
|
-
export declare type ISelection = HTMLElement;
|
|
5
|
-
export declare type IStore = HTMLElement;
|
|
6
|
-
export declare type IWhenShape = any;
|
|
7
|
-
export declare type IThenShape = any;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { renderToStaticMarkup, renderToStaticNodeStream } from "react-dom/server";
|
|
2
|
-
import Stream from 'stream';
|
|
3
|
-
import { ITestImplementation, ITestSpecification } from "../../../Types";
|
|
4
|
-
export { renderToStaticMarkup, renderToStaticNodeStream, Stream };
|
|
5
|
-
declare const _default: <ITestShape extends any>(testImplementations: any, testSpecifications: ITestSpecification<ITestShape>, testInput: ITestShape["iinput"]) => Promise<import("../../../lib/core.js").default<ITestShape>>;
|
|
6
|
-
export default _default;
|