testeranto 0.47.33 → 0.47.52
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/.nvmrc +1 -0
- package/Bundle.Dockerfile +45 -0
- package/README.md +86 -11
- package/Report.Dockerfile +43 -0
- package/dist/cjs-shim.js +12 -0
- package/dist/common/Features.js +3 -37
- package/dist/common/Init.js +30 -0
- package/dist/common/Node.js +15 -66
- package/dist/common/PM/index.js +7 -0
- package/dist/common/PM/main.js +641 -0
- package/dist/common/PM/node.js +88 -0
- package/dist/common/PM/web.js +132 -0
- package/dist/common/Project.js +109 -637
- package/dist/common/Puppeteer.js +103 -0
- package/dist/common/Reporter.js +112 -0
- package/dist/common/Scheduler.js +1 -0
- package/dist/common/SubPackages/puppeteer.js +21 -0
- package/dist/common/{subPackages → SubPackages}/react/component/node.js +4 -4
- package/dist/common/{subPackages → SubPackages}/react/component/web.js +4 -4
- package/dist/common/SubPackages/react/jsx/index.js +25 -0
- package/dist/common/SubPackages/react/jsx/node.js +10 -0
- package/dist/common/SubPackages/react/jsx/web.js +10 -0
- package/dist/common/{subPackages/react-dom/jsx → SubPackages/react-dom/component}/node.js +6 -6
- package/dist/common/SubPackages/react-dom/component/web.js +93 -0
- package/dist/common/SubPackages/react-dom/jsx/index.js +2 -0
- package/dist/common/SubPackages/react-dom/jsx/node.js +39 -0
- package/dist/common/SubPackages/react-dom/jsx/web.js +118 -0
- package/dist/common/SubPackages/react-test-renderer/MemoExoticComponent/node.js +44 -0
- package/dist/common/SubPackages/react-test-renderer/component/index.js +2 -0
- package/dist/common/{subPackages/react-test-renderer/component/index.js → SubPackages/react-test-renderer/component/interface.js} +23 -33
- package/dist/common/{subPackages/react-test-renderer/jsx → SubPackages/react-test-renderer/component}/node.js +3 -5
- package/dist/common/{subPackages/react/jsx → SubPackages/react-test-renderer/component}/web.js +3 -5
- package/dist/common/SubPackages/react-test-renderer/fc/node.js +50 -0
- package/dist/common/SubPackages/react-test-renderer/fc/web.js +50 -0
- package/dist/common/{subPackages → SubPackages}/react-test-renderer/jsx/index.js +7 -3
- package/dist/common/SubPackages/react-test-renderer/jsx/node.js +10 -0
- package/dist/common/SubPackages/react-test-renderer/jsx/web.js +10 -0
- package/dist/common/SubPackages/react-test-renderer/jsx-promised/index.js +42 -0
- package/dist/common/{subPackages/react/jsx → SubPackages/react-test-renderer/jsx-promised}/node.js +2 -2
- package/dist/common/TaskManBackEnd.js +174 -0
- package/dist/common/Web.js +31 -108
- package/dist/common/esbuildConfigs/features.js +14 -0
- package/dist/common/esbuildConfigs/index.js +21 -0
- package/dist/common/esbuildConfigs/inputFilesPlugin.js +49 -0
- package/dist/common/esbuildConfigs/node.js +39 -0
- package/dist/common/esbuildConfigs/report.js +14 -0
- package/dist/common/esbuildConfigs/tests.js +13 -0
- package/dist/common/esbuildConfigs/web.js +57 -0
- package/dist/common/lib/abstractBase.js +553 -0
- package/dist/common/lib/basebuilder.js +79 -0
- package/dist/common/lib/classBuilder.js +42 -0
- package/dist/common/lib/core.js +75 -0
- package/dist/common/lib/index.js +22 -0
- package/dist/common/lib/types.js +2 -0
- package/dist/common/mongooseSchemas.js +56 -0
- package/dist/common/preload.js +14 -27
- package/dist/common/puppeteerConfiger.js +24 -0
- package/dist/common/report.html.js +31 -0
- package/dist/common/tsconfig.common.tsbuildinfo +1 -1
- package/dist/common/utils.js +16 -0
- package/dist/common/web.html.js +22 -0
- package/dist/module/ExampleTab.js +112 -0
- package/dist/module/Features.js +2 -35
- package/dist/module/Init.js +25 -0
- package/dist/module/Node.js +15 -66
- package/dist/module/PM/index.js +3 -0
- package/dist/module/PM/main.js +611 -0
- package/dist/module/PM/node.js +81 -0
- package/dist/module/PM/web.js +125 -0
- package/dist/module/Project.js +110 -615
- package/dist/module/Puppeteer.js +98 -0
- package/dist/module/Reporter.js +107 -0
- package/dist/module/Scheduler.js +1 -0
- package/dist/module/SubPackages/puppeteer.js +16 -0
- package/dist/module/{subPackages → SubPackages}/react/component/node.js +3 -3
- package/dist/module/{subPackages → SubPackages}/react/component/web.js +3 -3
- package/dist/module/SubPackages/react/jsx/index.js +19 -0
- package/dist/module/SubPackages/react/jsx/node.js +5 -0
- package/dist/module/SubPackages/react/jsx/web.js +5 -0
- package/dist/module/{subPackages → SubPackages}/react-dom/component/node.js +7 -7
- package/dist/module/SubPackages/react-dom/component/web.js +88 -0
- package/dist/module/SubPackages/react-dom/jsx/node.js +31 -0
- package/dist/module/SubPackages/react-dom/jsx/web.js +90 -0
- package/dist/module/SubPackages/react-test-renderer/MemoExoticComponent/node.js +16 -0
- package/dist/module/SubPackages/react-test-renderer/component/index.js +1 -0
- package/dist/module/SubPackages/react-test-renderer/component/interface.js +39 -0
- package/dist/module/{subPackages → SubPackages}/react-test-renderer/component/node.js +2 -2
- package/dist/module/{subPackages → SubPackages}/react-test-renderer/component/web.js +2 -2
- package/dist/module/{subPackages → SubPackages}/react-test-renderer/fc/node.js +3 -3
- package/dist/module/SubPackages/react-test-renderer/fc/web.js +22 -0
- package/dist/module/{subPackages → SubPackages}/react-test-renderer/jsx/index.js +7 -3
- package/dist/module/SubPackages/react-test-renderer/jsx/node.js +5 -0
- package/dist/module/SubPackages/react-test-renderer/jsx/web.js +5 -0
- package/dist/module/SubPackages/react-test-renderer/jsx-promised/index.js +16 -0
- package/dist/module/{subPackages/react-test-renderer/jsx → SubPackages/react-test-renderer/jsx-promised}/node.js +1 -1
- package/dist/module/TaskManBackEnd.js +169 -0
- package/dist/module/TaskManFrontEnd.js +600 -0
- package/dist/module/Web.js +31 -108
- package/dist/module/esbuildConfigs/features.js +12 -0
- package/dist/module/esbuildConfigs/index.js +19 -0
- package/dist/module/esbuildConfigs/inputFilesPlugin.js +44 -0
- package/dist/module/esbuildConfigs/node.js +34 -0
- package/dist/module/esbuildConfigs/report.js +14 -0
- package/dist/module/esbuildConfigs/tests.js +11 -0
- package/dist/module/esbuildConfigs/web.js +52 -0
- package/dist/module/lib/abstractBase.js +545 -0
- package/dist/module/lib/basebuilder.js +75 -0
- package/dist/module/lib/classBuilder.js +38 -0
- package/dist/module/lib/core.js +72 -0
- package/dist/module/lib/index.js +18 -0
- package/dist/module/lib/types.js +1 -0
- package/dist/module/mongooseSchemas.js +50 -0
- package/dist/module/preload.js +15 -26
- package/dist/module/puppeteerConfiger.js +19 -0
- package/dist/module/report.html.js +29 -0
- package/dist/module/tsconfig.module.tsbuildinfo +1 -1
- package/dist/module/utils.js +9 -0
- package/dist/module/web.html.js +20 -0
- package/dist/prebuild/TaskManBackEnd.mjs +174 -0
- package/dist/prebuild/TaskManFrontEnd.css +12301 -0
- package/dist/prebuild/TaskManFrontEnd.js +81264 -0
- package/dist/types/Features.d.ts +1 -34
- package/dist/types/Init.d.ts +2 -0
- package/dist/types/Node.d.ts +5 -11
- package/dist/types/PM/index.d.ts +20 -0
- package/dist/types/PM/main.d.ts +31 -0
- package/dist/types/PM/node.d.ts +27 -0
- package/dist/types/PM/web.d.ts +25 -0
- package/dist/types/Project.d.ts +3 -29
- package/dist/types/Puppeteer.d.ts +2 -0
- package/dist/types/Reporter.d.ts +1 -0
- package/dist/types/Scheduler.d.ts +0 -0
- package/dist/types/SubPackages/puppeteer.d.ts +6 -0
- 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 +12 -0
- package/dist/types/SubPackages/react-dom/component/web.d.ts +11 -0
- package/dist/types/SubPackages/react-dom/jsx/index.d.ts +6 -0
- package/dist/types/SubPackages/react-dom/jsx/node.d.ts +6 -0
- package/dist/types/SubPackages/react-dom/jsx/web.d.ts +5 -0
- package/dist/types/SubPackages/react-test-renderer/MemoExoticComponent/node.d.ts +5 -0
- package/dist/types/SubPackages/react-test-renderer/component/index.d.ts +13 -0
- package/dist/types/SubPackages/react-test-renderer/component/interface.d.ts +9 -0
- package/dist/types/SubPackages/react-test-renderer/component/node.d.ts +8 -0
- package/dist/types/SubPackages/react-test-renderer/component/web.d.ts +3 -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 +8 -0
- package/dist/types/{subPackages → SubPackages}/react-test-renderer/jsx/index.d.ts +5 -4
- package/dist/types/SubPackages/react-test-renderer/jsx/node.d.ts +8 -0
- package/dist/types/SubPackages/react-test-renderer/jsx/web.d.ts +8 -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 +4 -0
- package/dist/types/SubPackages/react-test-renderer/jsx-promised/web.d.ts +4 -0
- package/dist/types/TaskManBackEnd.d.ts +3 -0
- package/dist/types/Types.d.ts +49 -16
- package/dist/types/Web.d.ts +5 -11
- package/dist/types/esbuildConfigs/features.d.ts +4 -0
- package/dist/types/esbuildConfigs/index.d.ts +4 -0
- package/dist/types/esbuildConfigs/inputFilesPlugin.d.ts +5 -0
- package/dist/types/esbuildConfigs/node.d.ts +4 -0
- package/dist/types/esbuildConfigs/report.d.ts +0 -0
- package/dist/types/esbuildConfigs/tests.d.ts +4 -0
- package/dist/types/esbuildConfigs/web.d.ts +4 -0
- package/dist/types/lib/abstractBase.d.ts +104 -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 +8 -0
- package/dist/types/lib/index.d.ts +59 -0
- package/dist/types/lib/types.d.ts +62 -0
- package/dist/types/mongooseSchemas.d.ts +124 -0
- package/dist/types/preload.d.ts +0 -1
- package/dist/types/puppeteerConfiger.d.ts +4 -0
- package/dist/types/report.html.d.ts +2 -0
- package/dist/types/tsconfig.types.tsbuildinfo +1 -1
- package/dist/types/utils.d.ts +2 -0
- package/dist/types/web.html.d.ts +2 -0
- package/index.html +30 -0
- package/package.json +150 -78
- package/src/ExampleTab.tsx +219 -0
- package/src/Features.ts +2 -58
- package/src/Init.ts +51 -0
- package/src/Node.ts +71 -157
- package/src/PM/index.ts +25 -0
- package/src/PM/main.ts +830 -0
- package/src/PM/node.ts +128 -0
- package/src/PM/web.ts +166 -0
- package/src/Project.ts +158 -797
- package/src/Puppeteer.ts +141 -0
- package/src/Reporter.ts +126 -0
- package/src/Scheduler.ts +0 -0
- package/src/SubPackages/puppeteer.ts +51 -0
- package/src/SubPackages/react/component/node.ts +43 -0
- package/src/SubPackages/react/component/web.ts +43 -0
- package/src/SubPackages/react/jsx/index.ts +42 -0
- package/src/SubPackages/react/jsx/node.ts +26 -0
- package/src/SubPackages/react/jsx/web.ts +30 -0
- package/src/{subPackages → SubPackages}/react-dom/component/node.ts +24 -44
- package/src/SubPackages/react-dom/component/web.ts +143 -0
- package/src/SubPackages/react-dom/jsx/index.ts +6 -0
- package/src/SubPackages/react-dom/jsx/node.ts +68 -0
- package/src/SubPackages/react-dom/jsx/web.ts +139 -0
- package/src/SubPackages/react-test-renderer/MemoExoticComponent/node.ts +38 -0
- package/src/SubPackages/react-test-renderer/component/index.ts +23 -0
- package/src/SubPackages/react-test-renderer/component/interface.ts +48 -0
- package/src/SubPackages/react-test-renderer/component/node.ts +17 -0
- package/src/SubPackages/react-test-renderer/component/web.ts +17 -0
- package/src/SubPackages/react-test-renderer/fc/node.ts +49 -0
- package/src/SubPackages/react-test-renderer/fc/web.ts +48 -0
- package/src/SubPackages/react-test-renderer/jsx/index.ts +48 -0
- package/src/SubPackages/react-test-renderer/jsx/node.ts +20 -0
- package/src/SubPackages/react-test-renderer/jsx/web.ts +20 -0
- package/src/SubPackages/react-test-renderer/jsx-promised/index.ts +40 -0
- package/src/SubPackages/react-test-renderer/jsx-promised/node.ts +19 -0
- package/src/SubPackages/react-test-renderer/jsx-promised/web.ts +22 -0
- package/src/TaskManBackEnd.ts +228 -0
- package/src/TaskManFrontEnd.tsx +1222 -0
- package/src/Types.ts +222 -17
- package/src/Web.ts +86 -217
- package/src/cjs-shim.js +12 -0
- package/src/esbuildConfigs/features.ts +17 -0
- package/src/esbuildConfigs/index.ts +23 -0
- package/src/esbuildConfigs/inputFilesPlugin.ts +65 -0
- package/src/esbuildConfigs/node.ts +62 -0
- package/src/esbuildConfigs/report.ts +15 -0
- package/src/esbuildConfigs/tests.ts +14 -0
- package/src/esbuildConfigs/web.ts +79 -0
- package/src/lib/abstractBase.ts +910 -0
- package/src/lib/basebuilder.ts +214 -0
- package/src/lib/classBuilder.ts +131 -0
- package/src/lib/core.ts +224 -0
- package/src/lib/index.ts +226 -0
- package/src/lib/types.ts +303 -0
- package/src/mongooseSchemas.ts +105 -0
- package/src/preload.ts +14 -28
- package/src/puppeteerConfiger.ts +26 -0
- package/src/report.html.ts +29 -0
- package/src/utils.ts +15 -0
- package/src/web.html.ts +20 -0
- package/tests/Rectangle.test.ts +189 -0
- package/trash/TaskMan.Dockerfile +23 -0
- package/trash/TaskMan1.Dockerfile +43 -0
- package/trash/devBot.dockerfile +12 -0
- package/trash/docker-compose-dev.yml +9 -0
- package/trash/docker-compose-prod.yml +18 -0
- package/trash/electronBuild.ts +32 -0
- package/tsconfig.json +18 -6
- package/tsconfig.module.json +14 -4
- package/tsconfig.types.json +13 -4
- package/dist/common/NodeWriter.js +0 -56
- package/dist/common/core.js +0 -396
- package/dist/common/electron.js +0 -52
- package/dist/common/subPackages/react/jsx/index.js +0 -26
- package/dist/common/subPackages/react-dom/component/node.js +0 -101
- package/dist/common/subPackages/react-dom/component/web.js +0 -61
- package/dist/common/subPackages/react-dom/jsx/web.js +0 -76
- package/dist/common/subPackages/react-test-renderer/component/node.js +0 -8
- package/dist/common/subPackages/react-test-renderer/component/web.js +0 -8
- package/dist/module/NodeWriter.js +0 -50
- package/dist/module/Report.js +0 -186
- package/dist/module/core.js +0 -387
- package/dist/module/electron.js +0 -47
- package/dist/module/subPackages/react/jsx/index.js +0 -22
- package/dist/module/subPackages/react/jsx/node.js +0 -5
- package/dist/module/subPackages/react/jsx/web.js +0 -5
- package/dist/module/subPackages/react-dom/component/web.js +0 -56
- package/dist/module/subPackages/react-dom/jsx/node.js +0 -93
- package/dist/module/subPackages/react-dom/jsx/web.js +0 -48
- package/dist/module/subPackages/react-test-renderer/component/index.js +0 -52
- package/dist/types/NodeWriter.d.ts +0 -2
- package/dist/types/core.d.ts +0 -220
- package/dist/types/subPackages/react/component/node.d.ts +0 -12
- package/dist/types/subPackages/react/component/web.d.ts +0 -12
- package/dist/types/subPackages/react/jsx/index.d.ts +0 -15
- package/dist/types/subPackages/react/jsx/node.d.ts +0 -4
- package/dist/types/subPackages/react/jsx/web.d.ts +0 -4
- package/dist/types/subPackages/react-dom/component/node.d.ts +0 -14
- package/dist/types/subPackages/react-dom/component/web.d.ts +0 -19
- package/dist/types/subPackages/react-dom/jsx/node.d.ts +0 -14
- package/dist/types/subPackages/react-dom/jsx/web.d.ts +0 -15
- package/dist/types/subPackages/react-test-renderer/component/index.d.ts +0 -20
- package/dist/types/subPackages/react-test-renderer/component/node.d.ts +0 -9
- package/dist/types/subPackages/react-test-renderer/component/web.d.ts +0 -9
- package/dist/types/subPackages/react-test-renderer/jsx/node.d.ts +0 -4
- package/dist/types/subPackages/react-test-renderer/jsx/web.d.ts +0 -4
- package/src/NodeWriter.ts +0 -72
- package/src/Report.tsx +0 -392
- package/src/core.ts +0 -1396
- package/src/electron.ts +0 -59
- package/src/subPackages/react/component/node.ts +0 -75
- package/src/subPackages/react/component/web.ts +0 -80
- package/src/subPackages/react/jsx/index.ts +0 -64
- package/src/subPackages/react/jsx/node.ts +0 -29
- package/src/subPackages/react/jsx/web.ts +0 -29
- package/src/subPackages/react-dom/component/web.ts +0 -129
- package/src/subPackages/react-dom/jsx/node.ts +0 -150
- package/src/subPackages/react-dom/jsx/web.ts +0 -117
- package/src/subPackages/react-test-renderer/component/index.ts +0 -101
- package/src/subPackages/react-test-renderer/component/node.ts +0 -30
- package/src/subPackages/react-test-renderer/component/web.ts +0 -30
- package/src/subPackages/react-test-renderer/fc/node.tsx +0 -77
- package/src/subPackages/react-test-renderer/jsx/index.ts +0 -51
- package/src/subPackages/react-test-renderer/jsx/node.ts +0 -31
- package/src/subPackages/react-test-renderer/jsx/web.ts +0 -31
- /package/dist/common/{subPackages/react-test-renderer/jsx → SubPackages/react-test-renderer/jsx-promised}/web.js +0 -0
- /package/dist/{types/electron.d.ts → module/SubPackages/react-dom/jsx/index.js} +0 -0
- /package/dist/module/{subPackages/react-test-renderer/jsx → SubPackages/react-test-renderer/jsx-promised}/web.js +0 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export default () => `
|
|
2
|
+
<!DOCTYPE html>
|
|
3
|
+
<html lang="en">
|
|
4
|
+
|
|
5
|
+
<head>
|
|
6
|
+
<meta name="description" content="Webpage description goes here" />
|
|
7
|
+
<meta charset="utf-8" />
|
|
8
|
+
<title>kokomoBay - testeranto</title>
|
|
9
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
10
|
+
<meta name="author" content="" />
|
|
11
|
+
|
|
12
|
+
<link rel="stylesheet" href="./Report.css">
|
|
13
|
+
|
|
14
|
+
<script type="importmap">
|
|
15
|
+
{
|
|
16
|
+
"imports": {
|
|
17
|
+
"features.test.js": "./features.test.js",
|
|
18
|
+
"testeranto.json": "./testeranto.json"
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
</script>
|
|
22
|
+
|
|
23
|
+
<script type="module" src="./Report.js"></script>
|
|
24
|
+
</head>
|
|
25
|
+
|
|
26
|
+
<body><div id="root">react is loading</div></body>
|
|
27
|
+
|
|
28
|
+
</html>
|
|
29
|
+
`;
|
package/src/utils.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// import { configs } from "eslint-plugin-react";
|
|
2
|
+
import path from "path";
|
|
3
|
+
import { IBuiltConfig, IRunTime } from "./lib/types";
|
|
4
|
+
|
|
5
|
+
export const destinationOfRuntime = (
|
|
6
|
+
f: string,
|
|
7
|
+
r: IRunTime,
|
|
8
|
+
configs: IBuiltConfig
|
|
9
|
+
) => {
|
|
10
|
+
return path
|
|
11
|
+
.normalize(`${configs.buildDir}/${r}/${f}`)
|
|
12
|
+
.split(".")
|
|
13
|
+
.slice(0, -1)
|
|
14
|
+
.join(".");
|
|
15
|
+
};
|
package/src/web.html.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export default (jsfilePath: string, htmlFilePath: string) => `
|
|
2
|
+
<!DOCTYPE html>
|
|
3
|
+
<html lang="en">
|
|
4
|
+
|
|
5
|
+
<head>
|
|
6
|
+
<script type="module" src="${jsfilePath}"></script>
|
|
7
|
+
|
|
8
|
+
</head>
|
|
9
|
+
|
|
10
|
+
<body>
|
|
11
|
+
<h1>${htmlFilePath}</h1>
|
|
12
|
+
<div id="root">
|
|
13
|
+
|
|
14
|
+
</div>
|
|
15
|
+
</body>
|
|
16
|
+
|
|
17
|
+
<footer></footer>
|
|
18
|
+
|
|
19
|
+
</html>
|
|
20
|
+
`;
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
|
|
2
|
+
import { assert } from "chai";
|
|
3
|
+
|
|
4
|
+
import { ITestSpecification } from "../src/Types";
|
|
5
|
+
import { ITTestShape } from "../src/lib";
|
|
6
|
+
|
|
7
|
+
class Rectangle {
|
|
8
|
+
height: number;
|
|
9
|
+
width: number;
|
|
10
|
+
|
|
11
|
+
constructor(height = 2, width = 2) {
|
|
12
|
+
this.height = height;
|
|
13
|
+
this.width = width;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
getHeight() {
|
|
17
|
+
return this.height;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
getWidth() {
|
|
21
|
+
return this.width;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
setHeight(height: number) {
|
|
25
|
+
this.height = height;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
setWidth(width: number) {
|
|
29
|
+
this.width = width;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
area(): number {
|
|
33
|
+
return this.width * this.height;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
circumference(): number {
|
|
37
|
+
return this.width * 2 + this.height * 2;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
//////////////////////////////////////////////////////////////////////////////////
|
|
42
|
+
|
|
43
|
+
export type IRectangleTestShape = {
|
|
44
|
+
suites: {
|
|
45
|
+
Default: string;
|
|
46
|
+
},
|
|
47
|
+
givens: {
|
|
48
|
+
Default;
|
|
49
|
+
WidthOfOneAndHeightOfOne;
|
|
50
|
+
WidthAndHeightOf: [number, number];
|
|
51
|
+
},
|
|
52
|
+
whens: {
|
|
53
|
+
HeightIsPubliclySetTo: [number];
|
|
54
|
+
WidthIsPubliclySetTo: [number];
|
|
55
|
+
setWidth: [number];
|
|
56
|
+
setHeight: [number];
|
|
57
|
+
},
|
|
58
|
+
thens: {
|
|
59
|
+
AreaPlusCircumference: [number];
|
|
60
|
+
circumference: [number];
|
|
61
|
+
getWidth: [number];
|
|
62
|
+
getHeight: [number];
|
|
63
|
+
area: [number];
|
|
64
|
+
prototype: [string];
|
|
65
|
+
},
|
|
66
|
+
checks: {
|
|
67
|
+
Default;
|
|
68
|
+
WidthOfOneAndHeightOfOne;
|
|
69
|
+
WidthAndHeightOf: [number, number];
|
|
70
|
+
}
|
|
71
|
+
} & ITTestShape;
|
|
72
|
+
|
|
73
|
+
export const RectangleTesterantoBaseInterface = {};
|
|
74
|
+
|
|
75
|
+
export type WhenShape = any;
|
|
76
|
+
export type ThenShape = any;
|
|
77
|
+
export type GivenShape = any;
|
|
78
|
+
export type Input = Rectangle;
|
|
79
|
+
export type IRuntime = { runtime: "just node", entrypoint: "./Rect" };
|
|
80
|
+
export const RectangleTesterantoBasePrototype = Rectangle.prototype;
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
export const RectangleTesterantoBaseTestSpecification: ITestSpecification<
|
|
84
|
+
IRectangleTestShape,
|
|
85
|
+
Input,
|
|
86
|
+
Input,
|
|
87
|
+
WhenShape,
|
|
88
|
+
ThenShape,
|
|
89
|
+
GivenShape
|
|
90
|
+
> =
|
|
91
|
+
(Suite, Given, When, Then, Check) => {
|
|
92
|
+
return [
|
|
93
|
+
Suite.Default(
|
|
94
|
+
"Testing the Rectangle class",
|
|
95
|
+
{
|
|
96
|
+
"test0": Given.Default(
|
|
97
|
+
[`hello`],
|
|
98
|
+
[When.setWidth(4), When.setHeight(9)],
|
|
99
|
+
[Then.getWidth(4), Then.getHeight(9)]
|
|
100
|
+
),
|
|
101
|
+
"test1": Given.Default(
|
|
102
|
+
[`hello`],
|
|
103
|
+
[When.setWidth(4), When.setHeight(5)],
|
|
104
|
+
[
|
|
105
|
+
Then.getWidth(4),
|
|
106
|
+
Then.getHeight(5),
|
|
107
|
+
Then.area(20),
|
|
108
|
+
Then.AreaPlusCircumference(38),
|
|
109
|
+
]
|
|
110
|
+
),
|
|
111
|
+
"test2": Given.Default(
|
|
112
|
+
[`hello`],
|
|
113
|
+
[When.setHeight(4), When.setWidth(3)],
|
|
114
|
+
[Then.area(12)]
|
|
115
|
+
),
|
|
116
|
+
"test3": Given.Default(
|
|
117
|
+
[`hello`],
|
|
118
|
+
[When.setHeight(5), When.setWidth(5)],
|
|
119
|
+
[Then.area(25)]
|
|
120
|
+
)
|
|
121
|
+
},
|
|
122
|
+
[]
|
|
123
|
+
// Check.Default(
|
|
124
|
+
// "imperative style",
|
|
125
|
+
// async ({ PostToAdd }, { TheNumberIs }) => {
|
|
126
|
+
// const a = await PostToAdd(2);
|
|
127
|
+
// const b = parseInt(await PostToAdd(3));
|
|
128
|
+
// await TheNumberIs(b);
|
|
129
|
+
// await PostToAdd(2);
|
|
130
|
+
// await TheNumberIs(7);
|
|
131
|
+
// await PostToAdd(3);
|
|
132
|
+
// await TheNumberIs(10);
|
|
133
|
+
// assert.equal(await PostToAdd(-15), -5);
|
|
134
|
+
// await TheNumberIs(-5);
|
|
135
|
+
// }
|
|
136
|
+
// ),
|
|
137
|
+
// ]
|
|
138
|
+
),
|
|
139
|
+
];
|
|
140
|
+
};
|
|
141
|
+
|
|
142
|
+
export const RectangleTesterantoBaseTestImplementation = {
|
|
143
|
+
Suites: {
|
|
144
|
+
Default: "a default suite",
|
|
145
|
+
},
|
|
146
|
+
|
|
147
|
+
Givens: {
|
|
148
|
+
Default: () => new Rectangle(),
|
|
149
|
+
WidthOfOneAndHeightOfOne: () => new Rectangle(1, 1),
|
|
150
|
+
WidthAndHeightOf: (width, height) => new Rectangle(width, height),
|
|
151
|
+
},
|
|
152
|
+
|
|
153
|
+
Whens: {
|
|
154
|
+
HeightIsPubliclySetTo: (height) => (rectangle) =>
|
|
155
|
+
(rectangle.height = height),
|
|
156
|
+
WidthIsPubliclySetTo: (width) => (rectangle) => (rectangle.width = width),
|
|
157
|
+
setWidth: (width) => (rectangle) => rectangle.setWidth(width),
|
|
158
|
+
setHeight: (height) => (rectangle) => {
|
|
159
|
+
console.log("SET HEIGHT", rectangle, height);
|
|
160
|
+
rectangle.setHeight(height);
|
|
161
|
+
},
|
|
162
|
+
},
|
|
163
|
+
|
|
164
|
+
Thens: {
|
|
165
|
+
AreaPlusCircumference: (combined) => (rectangle) => {
|
|
166
|
+
assert.equal(rectangle.area() + rectangle.circumference(), combined);
|
|
167
|
+
},
|
|
168
|
+
getWidth: (width) => (rectangle) => assert.equal(rectangle.width, width),
|
|
169
|
+
|
|
170
|
+
getHeight: (height) => (rectangle) =>
|
|
171
|
+
assert.equal(rectangle.height, height),
|
|
172
|
+
|
|
173
|
+
area: (area) => (rectangle) => assert.equal(rectangle.area(), area),
|
|
174
|
+
|
|
175
|
+
prototype: (name) => (rectangle) => assert.equal(1, 1),
|
|
176
|
+
// throw new Error("Function not implemented.")
|
|
177
|
+
|
|
178
|
+
circumference: (circumference) => (rectangle) =>
|
|
179
|
+
assert.equal(rectangle.circumference(), circumference),
|
|
180
|
+
},
|
|
181
|
+
|
|
182
|
+
Checks: {
|
|
183
|
+
/* @ts-ignore:next-line */
|
|
184
|
+
AnEmptyState: () => {
|
|
185
|
+
return {};
|
|
186
|
+
},
|
|
187
|
+
},
|
|
188
|
+
};
|
|
189
|
+
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
FROM node:latest
|
|
2
|
+
RUN mkdir -p /usr/src/app
|
|
3
|
+
WORKDIR /usr/src/app
|
|
4
|
+
COPY package.json /usr/src/app
|
|
5
|
+
RUN yarn install
|
|
6
|
+
COPY ./src/ /usr/src/app/src
|
|
7
|
+
COPY prebuild.sh /usr/src/app
|
|
8
|
+
COPY postBuild.sh /usr/src/app
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
RUN yarn build
|
|
12
|
+
|
|
13
|
+
RUN cp ./dist/prebuild/TaskManBackEnd.mjs /usr/src/app/TaskManBackEnd.mjs
|
|
14
|
+
RUN cp ./dist/prebuild/TaskManFrontEnd.js /usr/src/app/TaskManFrontEnd.mjs
|
|
15
|
+
RUN cp ./dist/prebuild/TaskManFrontEnd.css /usr/src/app/TaskManFrontEnd.css
|
|
16
|
+
|
|
17
|
+
# RUN ts-node-esm ./node_modules/testeranto/dist/prebuild/TaskManBackEnd.mjs
|
|
18
|
+
|
|
19
|
+
EXPOSE 3000
|
|
20
|
+
EXPOSE 27017
|
|
21
|
+
ENV MONGO_HOST=host.docker.internal
|
|
22
|
+
# CMD ['yarn', 'testeranto-testrun', '&', 'yarn', 'testeranto-taskman']
|
|
23
|
+
CMD ["node", "./TaskManBackEnd.mjs"]
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
FROM node:18.18.0
|
|
2
|
+
|
|
3
|
+
# Install build dependencies
|
|
4
|
+
RUN apt-get update && \
|
|
5
|
+
apt-get install -y --no-install-recommends \
|
|
6
|
+
python3 \
|
|
7
|
+
make \
|
|
8
|
+
g++ && \
|
|
9
|
+
rm -rf /var/lib/apt/lists/*
|
|
10
|
+
|
|
11
|
+
RUN yarn global add node-gyp
|
|
12
|
+
|
|
13
|
+
RUN mkdir -p /usr/src/app
|
|
14
|
+
RUN mkdir -p /usr/src/app/docs
|
|
15
|
+
WORKDIR /usr/src/app
|
|
16
|
+
COPY package.json /usr/src/app
|
|
17
|
+
RUN yarn install
|
|
18
|
+
COPY ./src/ /usr/src/app/src
|
|
19
|
+
COPY ./subPackages/ /usr/src/app/subPackages
|
|
20
|
+
COPY ./testeranto.mts /usr/src/app/testeranto.mts
|
|
21
|
+
# COPY ./features.test.mts /usr/src/app/features.test.mts
|
|
22
|
+
COPY ./tsconfig.json /usr/src/app/tsconfig.json
|
|
23
|
+
|
|
24
|
+
RUN yarn testeranto-esbuild
|
|
25
|
+
# COPY ./docs/ /usr/src/app/docs
|
|
26
|
+
# # COPY ./testeranto.json /usr/src/app/testeranto.json
|
|
27
|
+
# # COPY prebuild.sh /usr/src/app
|
|
28
|
+
# # COPY postBuild.sh /usr/src/app
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
# # RUN yarn build
|
|
32
|
+
|
|
33
|
+
RUN cp ./node_modules/testeranto/dist/prebuild/TaskManBackEnd.mjs /usr/src/app/TaskManBackEnd.mjs
|
|
34
|
+
RUN cp ./node_modules/testeranto/dist/prebuild/TaskManFrontEnd.js /usr/src/app/TaskManFrontEnd.js
|
|
35
|
+
RUN cp ./node_modules/testeranto/dist/prebuild/TaskManFrontEnd.css /usr/src/app/TaskManFrontEnd.css
|
|
36
|
+
|
|
37
|
+
# # RUN ts-node-esm ./node_modules/testeranto/dist/prebuild/TaskManBackEnd.mjs
|
|
38
|
+
|
|
39
|
+
EXPOSE 3000
|
|
40
|
+
EXPOSE 27017
|
|
41
|
+
ENV MONGO_HOST=host.docker.internal
|
|
42
|
+
# # CMD ['yarn', 'testeranto-testrun', '&', 'yarn', 'testeranto-taskman']
|
|
43
|
+
CMD ["node", "./TaskManBackEnd.mjs"]
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
FROM node:latest
|
|
2
|
+
RUN mkdir -p /usr/src/app
|
|
3
|
+
WORKDIR /usr/src/app
|
|
4
|
+
COPY package.json /usr/src/app
|
|
5
|
+
RUN yarn install
|
|
6
|
+
COPY ./ /usr/src/app
|
|
7
|
+
|
|
8
|
+
# RUN yarn testeranto-esbuild
|
|
9
|
+
|
|
10
|
+
# EXPOSE 3000
|
|
11
|
+
# CMD ['yarn', 'testeranto-testrun', '&', 'yarn', 'testeranto-taskman']
|
|
12
|
+
CMD ['yarn', 'testeranto-taskman']
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
version: "3"
|
|
2
|
+
services:
|
|
3
|
+
app:
|
|
4
|
+
container_name: app
|
|
5
|
+
image: Dockerfile
|
|
6
|
+
restart: always
|
|
7
|
+
build: .
|
|
8
|
+
ports:
|
|
9
|
+
- "3000:3000"
|
|
10
|
+
links:
|
|
11
|
+
- mongo
|
|
12
|
+
mongo:
|
|
13
|
+
container_name: mongo
|
|
14
|
+
image: mongo
|
|
15
|
+
volumes:
|
|
16
|
+
- ./data:/data/db
|
|
17
|
+
ports:
|
|
18
|
+
- '27017:27017'
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import * as esbuild from 'esbuild'
|
|
2
|
+
|
|
3
|
+
let result = await esbuild.build({
|
|
4
|
+
entryPoints: ['src/electron.ts'],
|
|
5
|
+
bundle: true,
|
|
6
|
+
outfile: 'dist/prebuild/electron.js',
|
|
7
|
+
external: [
|
|
8
|
+
"assert",
|
|
9
|
+
"child_process",
|
|
10
|
+
"constants",
|
|
11
|
+
"crypto",
|
|
12
|
+
"fs",
|
|
13
|
+
"http",
|
|
14
|
+
"https",
|
|
15
|
+
"net",
|
|
16
|
+
"os",
|
|
17
|
+
"path",
|
|
18
|
+
"readline",
|
|
19
|
+
"stream",
|
|
20
|
+
"tls",
|
|
21
|
+
"util",
|
|
22
|
+
"zlib",
|
|
23
|
+
"node:module",
|
|
24
|
+
"node:url",
|
|
25
|
+
"node:path",
|
|
26
|
+
],
|
|
27
|
+
banner: {
|
|
28
|
+
js: `import { createRequire } from 'module';const require = createRequire(import.meta.url);`
|
|
29
|
+
},
|
|
30
|
+
// inject: [`./src/cjs-shim.js`],
|
|
31
|
+
})
|
|
32
|
+
// yarn esbuild src / electron.ts--outfile = dist / prebuild / electron.js--bundle--external: path--external: http--external: fs--external: net--external: os--external: util--external: https--external: stream--external: tls--external: readline--external: child_process--external: zlib--external: assert--external: crypto--external: constants
|
package/tsconfig.json
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"ts-node": {
|
|
3
3
|
"compilerOptions": {
|
|
4
|
-
"module": "esnext"
|
|
4
|
+
"module": "esnext",
|
|
5
|
+
"allowSyntheticDefaultImports": true,
|
|
5
6
|
}
|
|
6
7
|
},
|
|
7
8
|
"declaration": true,
|
|
@@ -13,12 +14,16 @@
|
|
|
13
14
|
"allowSyntheticDefaultImports": true,
|
|
14
15
|
"noImplicitAny": false,
|
|
15
16
|
"module": "esnext",
|
|
16
|
-
"target": "
|
|
17
|
+
"target": "ES2022",
|
|
17
18
|
"allowJs": true,
|
|
18
19
|
"jsx": "react",
|
|
19
20
|
"resolveJsonModule": true,
|
|
20
21
|
"strictNullChecks": true,
|
|
21
|
-
"lib": [
|
|
22
|
+
"lib": [
|
|
23
|
+
"dom",
|
|
24
|
+
"dom.iterable",
|
|
25
|
+
"esnext"
|
|
26
|
+
],
|
|
22
27
|
"skipLibCheck": true,
|
|
23
28
|
"strict": false,
|
|
24
29
|
"forceConsistentCasingInFileNames": true,
|
|
@@ -30,6 +35,13 @@
|
|
|
30
35
|
"outDir": "dist",
|
|
31
36
|
"alwaysStrict": true
|
|
32
37
|
},
|
|
33
|
-
"include": [
|
|
34
|
-
|
|
35
|
-
|
|
38
|
+
"include": [
|
|
39
|
+
"src/**/*.*ts",
|
|
40
|
+
"src/**/*.*tsx",
|
|
41
|
+
"index.d.ts",
|
|
42
|
+
],
|
|
43
|
+
"exclude": [
|
|
44
|
+
"node_modules",
|
|
45
|
+
"trash"
|
|
46
|
+
]
|
|
47
|
+
}
|
package/tsconfig.module.json
CHANGED
|
@@ -18,7 +18,11 @@
|
|
|
18
18
|
"jsx": "react",
|
|
19
19
|
"resolveJsonModule": true,
|
|
20
20
|
"strictNullChecks": true,
|
|
21
|
-
"lib": [
|
|
21
|
+
"lib": [
|
|
22
|
+
"dom",
|
|
23
|
+
"dom.iterable",
|
|
24
|
+
"esnext"
|
|
25
|
+
],
|
|
22
26
|
"skipLibCheck": true,
|
|
23
27
|
"strict": false,
|
|
24
28
|
"forceConsistentCasingInFileNames": true,
|
|
@@ -30,6 +34,12 @@
|
|
|
30
34
|
"outDir": "dist/module/",
|
|
31
35
|
"alwaysStrict": true
|
|
32
36
|
},
|
|
33
|
-
"include": [
|
|
34
|
-
|
|
35
|
-
|
|
37
|
+
"include": [
|
|
38
|
+
"src/**/*.*ts",
|
|
39
|
+
"src/**/*.*tsx",
|
|
40
|
+
"index.d.ts"
|
|
41
|
+
],
|
|
42
|
+
"exclude": [
|
|
43
|
+
"node_modules",
|
|
44
|
+
]
|
|
45
|
+
}
|
package/tsconfig.types.json
CHANGED
|
@@ -18,7 +18,11 @@
|
|
|
18
18
|
"jsx": "react",
|
|
19
19
|
"resolveJsonModule": true,
|
|
20
20
|
"strictNullChecks": true,
|
|
21
|
-
"lib": [
|
|
21
|
+
"lib": [
|
|
22
|
+
"dom",
|
|
23
|
+
"dom.iterable",
|
|
24
|
+
"esnext"
|
|
25
|
+
],
|
|
22
26
|
"skipLibCheck": true,
|
|
23
27
|
"strict": false,
|
|
24
28
|
"forceConsistentCasingInFileNames": true,
|
|
@@ -31,6 +35,11 @@
|
|
|
31
35
|
"outDir": "dist/types/",
|
|
32
36
|
"alwaysStrict": true
|
|
33
37
|
},
|
|
34
|
-
"include": [
|
|
35
|
-
|
|
36
|
-
|
|
38
|
+
"include": [
|
|
39
|
+
"src/**/*.*ts",
|
|
40
|
+
"index.d.ts"
|
|
41
|
+
],
|
|
42
|
+
"exclude": [
|
|
43
|
+
"node_modules",
|
|
44
|
+
]
|
|
45
|
+
}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.NodeWriter = void 0;
|
|
7
|
-
const fs_1 = __importDefault(require("fs"));
|
|
8
|
-
const path_1 = __importDefault(require("path"));
|
|
9
|
-
const fPaths = [];
|
|
10
|
-
exports.NodeWriter = {
|
|
11
|
-
createWriteStream: (filepath) => {
|
|
12
|
-
return fs_1.default.createWriteStream(filepath);
|
|
13
|
-
},
|
|
14
|
-
writeFileSync: (fp, contents) => {
|
|
15
|
-
fs_1.default.writeFileSync(fp, contents);
|
|
16
|
-
},
|
|
17
|
-
mkdirSync: async (fp) => {
|
|
18
|
-
await fs_1.default.mkdirSync(fp, { recursive: true });
|
|
19
|
-
},
|
|
20
|
-
testArtiFactoryfileWriter: (tLog, callback) => (fPath, value) => {
|
|
21
|
-
callback(new Promise((res, rej) => {
|
|
22
|
-
tLog("testArtiFactory =>", fPath);
|
|
23
|
-
const cleanPath = path_1.default.resolve(fPath);
|
|
24
|
-
fPaths.push(cleanPath.replace(process.cwd(), ``));
|
|
25
|
-
const targetDir = cleanPath.split("/").slice(0, -1).join("/");
|
|
26
|
-
fs_1.default.mkdir(targetDir, { recursive: true }, async (error) => {
|
|
27
|
-
if (error) {
|
|
28
|
-
console.error(`❗️testArtiFactory failed`, targetDir, error);
|
|
29
|
-
}
|
|
30
|
-
fs_1.default.writeFileSync(path_1.default.resolve(targetDir.split("/").slice(0, -1).join("/"), "manifest"), fPaths.join(`\n`), {
|
|
31
|
-
encoding: "utf-8",
|
|
32
|
-
});
|
|
33
|
-
if (Buffer.isBuffer(value)) {
|
|
34
|
-
fs_1.default.writeFileSync(fPath, value, "binary");
|
|
35
|
-
res();
|
|
36
|
-
}
|
|
37
|
-
else if (`string` === typeof value) {
|
|
38
|
-
fs_1.default.writeFileSync(fPath, value.toString(), {
|
|
39
|
-
encoding: "utf-8",
|
|
40
|
-
});
|
|
41
|
-
res();
|
|
42
|
-
}
|
|
43
|
-
else {
|
|
44
|
-
/* @ts-ignore:next-line */
|
|
45
|
-
const pipeStream = value;
|
|
46
|
-
const myFile = fs_1.default.createWriteStream(fPath);
|
|
47
|
-
pipeStream.pipe(myFile);
|
|
48
|
-
pipeStream.on("close", () => {
|
|
49
|
-
myFile.close();
|
|
50
|
-
res();
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
});
|
|
54
|
-
}));
|
|
55
|
-
}
|
|
56
|
-
};
|