testeranto 0.47.34 → 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 +151 -79
- 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
package/src/Features.ts
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import Graph from "graphology";
|
|
2
|
-
import pkg from "graphology";
|
|
1
|
+
import Graph from "graphology/dist/graphology.umd.js";
|
|
3
2
|
|
|
4
|
-
|
|
5
|
-
const { DirectedGraph, UndirectedGraph } = pkg;
|
|
3
|
+
const { DirectedGraph, UndirectedGraph } = Graph;
|
|
6
4
|
|
|
7
5
|
abstract class TesterantoGraph {
|
|
8
6
|
name: string;
|
|
@@ -56,60 +54,6 @@ export class TesterantoGraphDirectedAcyclic implements TesterantoGraph {
|
|
|
56
54
|
}
|
|
57
55
|
}
|
|
58
56
|
|
|
59
|
-
export class TesterantoFeatures {
|
|
60
|
-
features: Record<string, BaseFeature>;
|
|
61
|
-
graphs: {
|
|
62
|
-
undirected: TesterantoGraphUndirected[];
|
|
63
|
-
directed: TesterantoGraphDirected[];
|
|
64
|
-
dags: TesterantoGraphDirectedAcyclic[];
|
|
65
|
-
};
|
|
66
|
-
|
|
67
|
-
constructor(
|
|
68
|
-
features: Record<string, BaseFeature>,
|
|
69
|
-
graphs: {
|
|
70
|
-
undirected: TesterantoGraphUndirected[];
|
|
71
|
-
directed: TesterantoGraphDirected[];
|
|
72
|
-
dags: TesterantoGraphDirectedAcyclic[];
|
|
73
|
-
}
|
|
74
|
-
) {
|
|
75
|
-
this.features = features;
|
|
76
|
-
this.graphs = graphs;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
networks() {
|
|
80
|
-
return [
|
|
81
|
-
...this.graphs.undirected.values(),
|
|
82
|
-
...this.graphs.directed.values(),
|
|
83
|
-
...this.graphs.dags.values(),
|
|
84
|
-
];
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
toObj() {
|
|
88
|
-
return {
|
|
89
|
-
features: Object.entries(this.features).map(([name, feature]) => {
|
|
90
|
-
return {
|
|
91
|
-
...feature,
|
|
92
|
-
inNetworks: this.networks()
|
|
93
|
-
.filter((network) => {
|
|
94
|
-
return network.graph.hasNode(feature.name);
|
|
95
|
-
})
|
|
96
|
-
.map((network) => {
|
|
97
|
-
return {
|
|
98
|
-
network: network.name,
|
|
99
|
-
neighbors: network.graph.neighbors(feature.name),
|
|
100
|
-
};
|
|
101
|
-
}),
|
|
102
|
-
};
|
|
103
|
-
}),
|
|
104
|
-
networks: this.networks().map((network) => {
|
|
105
|
-
return {
|
|
106
|
-
...network,
|
|
107
|
-
};
|
|
108
|
-
}),
|
|
109
|
-
};
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
|
|
113
57
|
export type IT_FeatureNetwork = {
|
|
114
58
|
name: string;
|
|
115
59
|
// graph: DirectedGraph
|
package/src/Init.ts
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import fs from "fs";
|
|
2
|
+
|
|
3
|
+
export default async (partialConfig) => {
|
|
4
|
+
const config = {
|
|
5
|
+
...partialConfig,
|
|
6
|
+
buildDir: process.cwd() + "/" + partialConfig.outdir,
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
fs.writeFileSync(
|
|
10
|
+
`${config.outdir}/testeranto.json`,
|
|
11
|
+
JSON.stringify(
|
|
12
|
+
{
|
|
13
|
+
...config,
|
|
14
|
+
buildDir: process.cwd() + "/" + config.outdir,
|
|
15
|
+
},
|
|
16
|
+
null,
|
|
17
|
+
2
|
|
18
|
+
)
|
|
19
|
+
);
|
|
20
|
+
|
|
21
|
+
fs.copyFileSync(
|
|
22
|
+
"./node_modules/testeranto/dist/prebuild/TaskManFrontEnd.js",
|
|
23
|
+
"./docs/TaskManFrontEnd.js"
|
|
24
|
+
);
|
|
25
|
+
fs.copyFileSync(
|
|
26
|
+
"./node_modules/testeranto/dist/prebuild/TaskManFrontEnd.css",
|
|
27
|
+
"./docs/TaskManFrontEnd.css"
|
|
28
|
+
);
|
|
29
|
+
|
|
30
|
+
fs.writeFileSync(
|
|
31
|
+
`${config.outdir}/index.html`,
|
|
32
|
+
`<!DOCTYPE html>
|
|
33
|
+
<html lang="en">
|
|
34
|
+
|
|
35
|
+
<head>
|
|
36
|
+
<meta name="description" content="Webpage description goes here" />
|
|
37
|
+
<meta charset="utf-8" />
|
|
38
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
39
|
+
<meta name="author" content="" />
|
|
40
|
+
|
|
41
|
+
<title>TaskMan</title>
|
|
42
|
+
|
|
43
|
+
<link rel="stylesheet" href="/docs/TaskManFrontEnd.css" />
|
|
44
|
+
<script type="module" src="/docs/TaskManFrontEnd.js"></script>
|
|
45
|
+
</head>
|
|
46
|
+
|
|
47
|
+
<body><div id="root">react is loading</div></body>
|
|
48
|
+
|
|
49
|
+
</html>`
|
|
50
|
+
);
|
|
51
|
+
};
|
package/src/Node.ts
CHANGED
|
@@ -1,174 +1,88 @@
|
|
|
1
|
+
import Testeranto from "./lib/core.js";
|
|
1
2
|
import {
|
|
3
|
+
defaultTestResourceRequirement,
|
|
2
4
|
ITTestResourceConfiguration,
|
|
3
5
|
ITTestResourceRequest,
|
|
4
|
-
|
|
5
|
-
ITestArtificer,
|
|
6
|
-
ITestJob,
|
|
7
|
-
ITestSpecification,
|
|
8
|
-
defaultTestResourceRequirement,
|
|
9
|
-
} from "./core.js";
|
|
10
|
-
import TesterantoLevelTwo from "./core.js";
|
|
11
|
-
import { NodeWriter } from "./NodeWriter.js";
|
|
6
|
+
} from "./lib/index.js";
|
|
12
7
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
8
|
+
import type {
|
|
9
|
+
IBaseTest,
|
|
10
|
+
ITestImplementation,
|
|
11
|
+
ITestSpecification,
|
|
12
|
+
} from "./Types.js";
|
|
13
|
+
import { ITestInterface, INodeTestInterface } from "./lib/types.js";
|
|
19
14
|
|
|
20
|
-
|
|
21
|
-
process.exit(await failed ? 1 : 0);
|
|
22
|
-
})
|
|
23
|
-
}
|
|
15
|
+
import { PM_Node } from "./PM/node.js";
|
|
24
16
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
17
|
+
class NodeTesteranto<
|
|
18
|
+
TestShape extends IBaseTest<
|
|
19
|
+
unknown,
|
|
20
|
+
unknown,
|
|
21
|
+
unknown,
|
|
22
|
+
unknown,
|
|
23
|
+
unknown,
|
|
24
|
+
unknown,
|
|
25
|
+
unknown,
|
|
26
|
+
Record<string, any>,
|
|
27
|
+
Record<string, any>,
|
|
28
|
+
Record<string, any>,
|
|
29
|
+
Record<string, any>,
|
|
30
|
+
Record<string, any>
|
|
31
|
+
>
|
|
32
|
+
> extends Testeranto<TestShape> {
|
|
33
|
+
constructor(
|
|
34
|
+
input: TestShape["iinput"],
|
|
35
|
+
testSpecification: ITestSpecification<TestShape>,
|
|
36
|
+
testImplementation: ITestImplementation<TestShape>,
|
|
37
|
+
testResourceRequirement: ITTestResourceRequest,
|
|
38
|
+
testInterface: Partial<ITestInterface<TestShape>>
|
|
39
|
+
) {
|
|
40
|
+
super(
|
|
41
|
+
input,
|
|
42
|
+
testSpecification,
|
|
43
|
+
testImplementation,
|
|
44
|
+
testResourceRequirement,
|
|
45
|
+
testInterface
|
|
46
|
+
);
|
|
47
|
+
}
|
|
31
48
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
results: t.toObj(),
|
|
41
|
-
},
|
|
42
|
-
},
|
|
43
|
-
async (err) => {
|
|
44
|
-
if (!err) {
|
|
45
|
-
Promise.all([...artifacts, logPromise]).then(async () => {
|
|
46
|
-
process.exit(await failed ? 1 : 0);
|
|
47
|
-
})
|
|
48
|
-
} else {
|
|
49
|
-
console.error(err);
|
|
50
|
-
process.exit(1);
|
|
51
|
-
}
|
|
52
|
-
});
|
|
49
|
+
async receiveTestResourceConfig(partialTestResource: string) {
|
|
50
|
+
const t: ITTestResourceConfiguration = JSON.parse(partialTestResource);
|
|
51
|
+
console.log("receiveTestResourceConfig", t);
|
|
52
|
+
const pm = new PM_Node(t);
|
|
53
|
+
const { failed, artifacts, logPromise } =
|
|
54
|
+
await this.testJobs[0].receiveTestResourceConfig(pm);
|
|
55
|
+
pm.customclose();
|
|
56
|
+
}
|
|
53
57
|
}
|
|
54
58
|
|
|
55
59
|
export default async <
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
60
|
+
ITestShape extends IBaseTest<
|
|
61
|
+
unknown,
|
|
62
|
+
unknown,
|
|
63
|
+
unknown,
|
|
64
|
+
unknown,
|
|
65
|
+
unknown,
|
|
66
|
+
unknown,
|
|
67
|
+
unknown,
|
|
68
|
+
Record<string, any>,
|
|
69
|
+
Record<string, any>,
|
|
70
|
+
Record<string, any>,
|
|
71
|
+
Record<string, any>,
|
|
72
|
+
Record<string, any>
|
|
73
|
+
>
|
|
64
74
|
>(
|
|
65
|
-
input:
|
|
66
|
-
testSpecification: ITestSpecification<
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
>,
|
|
73
|
-
testImplementation,
|
|
74
|
-
testInterface: {
|
|
75
|
-
actionHandler?: (b: (...any) => any) => any;
|
|
76
|
-
andWhen: (
|
|
77
|
-
store: IStore,
|
|
78
|
-
actioner,
|
|
79
|
-
testResource: ITTestResourceConfiguration
|
|
80
|
-
) => Promise<ISelection>;
|
|
81
|
-
butThen?: (
|
|
82
|
-
store: IStore,
|
|
83
|
-
callback,
|
|
84
|
-
testResource: ITTestResourceConfiguration
|
|
85
|
-
) => Promise<ISelection>;
|
|
86
|
-
assertioner?: (t: IThenShape) => any;
|
|
87
|
-
|
|
88
|
-
afterAll?: (store: IStore, artificer: ITestArtificer) => any;
|
|
89
|
-
afterEach?: (
|
|
90
|
-
store: IStore,
|
|
91
|
-
key: string,
|
|
92
|
-
artificer: ITestArtificer
|
|
93
|
-
) => Promise<unknown>;
|
|
94
|
-
beforeAll?: (input: IInput, artificer: ITestArtificer) => Promise<ISubject>;
|
|
95
|
-
beforeEach?: (
|
|
96
|
-
subject: ISubject,
|
|
97
|
-
initialValues,
|
|
98
|
-
testResource: ITTestResourceConfiguration,
|
|
99
|
-
artificer: ITestArtificer
|
|
100
|
-
) => Promise<IStore>;
|
|
101
|
-
},
|
|
102
|
-
testResourceRequirement: ITTestResourceRequest = defaultTestResourceRequirement,
|
|
103
|
-
) => {
|
|
104
|
-
|
|
105
|
-
const mrt = new TesterantoLevelTwo(
|
|
75
|
+
input: ITestShape["iinput"],
|
|
76
|
+
testSpecification: ITestSpecification<ITestShape>,
|
|
77
|
+
testImplementation: ITestImplementation<ITestShape>,
|
|
78
|
+
testInterface: Partial<INodeTestInterface<ITestShape>>,
|
|
79
|
+
testResourceRequirement: ITTestResourceRequest = defaultTestResourceRequirement
|
|
80
|
+
): Promise<Testeranto<ITestShape>> => {
|
|
81
|
+
return new NodeTesteranto<ITestShape>(
|
|
106
82
|
input,
|
|
107
83
|
testSpecification,
|
|
108
84
|
testImplementation,
|
|
109
|
-
testInterface,
|
|
110
85
|
testResourceRequirement,
|
|
111
|
-
testInterface
|
|
112
|
-
testInterface.beforeEach || async function (subject: ISubject, initialValues: any, testResource: any) {
|
|
113
|
-
return subject as any;
|
|
114
|
-
},
|
|
115
|
-
testInterface.afterEach || (async (s) => s),
|
|
116
|
-
testInterface.afterAll || ((store: IStore) => undefined),
|
|
117
|
-
testInterface.butThen || (async (a) => a as any),
|
|
118
|
-
testInterface.andWhen,
|
|
119
|
-
testInterface.actionHandler ||
|
|
120
|
-
function (b: (...any: any[]) => any) {
|
|
121
|
-
return b;
|
|
122
|
-
},
|
|
123
|
-
NodeWriter
|
|
86
|
+
testInterface
|
|
124
87
|
);
|
|
125
|
-
|
|
126
|
-
const tl2: TesterantoLevelTwo<any, any, any, any, any, any, any, any> = mrt;
|
|
127
|
-
const t: ITestJob = tl2.testJobs[0];
|
|
128
|
-
const testResourceArg = process.argv[2] || `{}`;
|
|
129
|
-
|
|
130
|
-
try {
|
|
131
|
-
const partialTestResource = JSON.parse(
|
|
132
|
-
testResourceArg
|
|
133
|
-
) as ITTestResourceConfiguration;
|
|
134
|
-
|
|
135
|
-
if (partialTestResource.scheduled) {
|
|
136
|
-
console.log("test is scheduled", partialTestResource);
|
|
137
|
-
|
|
138
|
-
console.log(
|
|
139
|
-
"requesting test resources via IPC ...",
|
|
140
|
-
testResourceRequirement
|
|
141
|
-
);
|
|
142
|
-
/* @ts-ignore:next-line */
|
|
143
|
-
process.send({
|
|
144
|
-
type: "testeranto:hola",
|
|
145
|
-
data: {
|
|
146
|
-
requirement: {
|
|
147
|
-
...testResourceRequirement,
|
|
148
|
-
name: partialTestResource.name
|
|
149
|
-
}
|
|
150
|
-
},
|
|
151
|
-
});
|
|
152
|
-
|
|
153
|
-
console.log("awaiting test resources via IPC...");
|
|
154
|
-
process.on(
|
|
155
|
-
"message",
|
|
156
|
-
async function (packet: { data: { testResourceConfiguration } }) {
|
|
157
|
-
const resourcesFromPm2 = packet.data.testResourceConfiguration;
|
|
158
|
-
const secondTestResource = {
|
|
159
|
-
fs: ".",
|
|
160
|
-
...JSON.parse(JSON.stringify(partialTestResource)),
|
|
161
|
-
...JSON.parse(JSON.stringify(resourcesFromPm2)),
|
|
162
|
-
} as ITTestResourceConfiguration;
|
|
163
|
-
receiveTestResourceConfigScheduled(t, secondTestResource);
|
|
164
|
-
|
|
165
|
-
}
|
|
166
|
-
);
|
|
167
|
-
} else {
|
|
168
|
-
receiveTestResourceConfigUnscheduled(t, partialTestResource);
|
|
169
|
-
}
|
|
170
|
-
} catch (e) {
|
|
171
|
-
console.error(e);
|
|
172
|
-
process.exit(-1);
|
|
173
|
-
}
|
|
174
88
|
};
|
package/src/PM/index.ts
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Browser,
|
|
3
|
+
Page,
|
|
4
|
+
} from "puppeteer-core/lib/esm/puppeteer/puppeteer-core-browser";
|
|
5
|
+
import { ITLog, ITTestResourceConfiguration } from "../lib";
|
|
6
|
+
// import { Page } from "puppeteer-core";
|
|
7
|
+
|
|
8
|
+
type IFPaths = string[];
|
|
9
|
+
const fPaths: IFPaths = [];
|
|
10
|
+
|
|
11
|
+
export abstract class PM {
|
|
12
|
+
server: any;
|
|
13
|
+
browser: Browser;
|
|
14
|
+
testResourceConfiguration: ITTestResourceConfiguration;
|
|
15
|
+
|
|
16
|
+
abstract startPuppeteer(options: any, destfolder: string): Promise<Browser>;
|
|
17
|
+
abstract testArtiFactoryfileWriter(tLog: ITLog, callback: (Promise) => void);
|
|
18
|
+
abstract createWriteStream(filepath: string): any;
|
|
19
|
+
abstract writeFileSync(fp: string, contents: string);
|
|
20
|
+
abstract mkdirSync();
|
|
21
|
+
abstract existsSync(fp: string): boolean;
|
|
22
|
+
abstract write(accessObject: { uid: number }, contents: string): boolean;
|
|
23
|
+
abstract end(accessObject: { uid: number }): boolean;
|
|
24
|
+
abstract customScreenShot(opts: object, page: Page): any;
|
|
25
|
+
}
|