testeranto 0.79.69 → 0.81.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.aider.chat.history.md +980 -0
- package/.aider.input.history +87 -0
- package/.aider.tags.cache.v3/1c/30/af1de2ad7a137afeddb1b01e0c27.val +0 -0
- package/.aider.tags.cache.v3/1d/63/88318b65ce58b6bb0487e8ce2656.val +0 -0
- package/.aider.tags.cache.v3/2e/67/16ae65530b40038e48e00d666c63.val +0 -0
- package/.aider.tags.cache.v3/6f/94/80488a232866fcce7ee657da488b.val +0 -0
- package/.aider.tags.cache.v3/cache.db +0 -0
- package/.eslintrc.js +5 -2
- package/README.md +10 -107
- package/build-tests.ts +16 -0
- package/dist/common/build-tests.js +38 -0
- package/dist/common/init-docs.js +8 -0
- package/dist/common/run-tests.js +34 -0
- package/dist/common/src/Aider.js +143 -0
- package/dist/common/src/Init.js +10 -0
- package/dist/common/{PM → src/PM}/main.js +58 -49
- package/dist/common/{PM → src/PM}/node.js +1 -1
- package/dist/common/{Project.js → src/Project.js} +46 -38
- package/dist/common/{Puppeteer.js → src/Puppeteer.js} +51 -40
- package/dist/common/{SubPackages → src/SubPackages}/react-dom/jsx/web.js +37 -38
- package/dist/common/{SubPackages → src/SubPackages}/react-test-renderer/jsx/index.js +17 -2
- package/dist/common/src/esbuildConfigs/inputFilesPlugin.js +79 -0
- package/dist/common/{esbuildConfigs → src/esbuildConfigs}/node.js +5 -3
- package/dist/common/{esbuildConfigs → src/esbuildConfigs}/web.js +4 -4
- package/dist/common/{lib → src/lib}/abstractBase.js +80 -24
- package/dist/common/{lib → src/lib}/basebuilder.js +14 -3
- package/dist/common/{lib → src/lib}/core.js +47 -3
- package/dist/common/testeranto.js +15 -0
- package/dist/common/tsconfig.common.tsbuildinfo +1 -1
- package/dist/module/build-tests.js +10 -0
- package/dist/module/init-docs.js +3 -0
- package/dist/module/run-tests.js +6 -0
- package/dist/module/src/Aider.js +136 -0
- package/dist/module/src/Init.js +5 -0
- package/dist/module/{PM → src/PM}/main.js +58 -49
- package/dist/module/{PM → src/PM}/node.js +1 -1
- package/dist/module/{Project.js → src/Project.js} +46 -38
- package/dist/module/{Puppeteer.js → src/Puppeteer.js} +51 -40
- package/dist/module/{SubPackages → src/SubPackages}/react-dom/jsx/web.js +37 -38
- package/dist/module/src/SubPackages/react-test-renderer/jsx/index.js +34 -0
- package/dist/module/src/esbuildConfigs/inputFilesPlugin.js +74 -0
- package/dist/module/{esbuildConfigs → src/esbuildConfigs}/node.js +4 -2
- package/dist/module/{esbuildConfigs → src/esbuildConfigs}/web.js +4 -4
- package/dist/module/{lib → src/lib}/abstractBase.js +80 -24
- package/dist/module/{lib → src/lib}/basebuilder.js +14 -3
- package/dist/module/{lib → src/lib}/core.js +47 -3
- package/dist/module/testeranto.js +13 -0
- package/dist/module/tsconfig.module.tsbuildinfo +1 -1
- package/dist/types/build-tests.d.ts +3 -0
- package/dist/types/init-docs.d.ts +2 -0
- package/dist/types/run-tests.d.ts +2 -0
- package/dist/types/src/Aider.d.ts +1 -0
- package/dist/types/{PM → src/PM}/index.d.ts +1 -1
- package/dist/types/{PM → src/PM}/main.d.ts +7 -1
- package/dist/types/{Project.d.ts → src/Project.d.ts} +6 -1
- package/dist/types/{Types.d.ts → src/Types.d.ts} +3 -2
- package/dist/types/{lib → src/lib}/abstractBase.d.ts +1 -0
- package/dist/types/testeranto.d.ts +16 -0
- package/dist/types/tsconfig.types.tsbuildinfo +1 -1
- package/init-docs.ts +5 -0
- package/package.json +54 -29
- package/run-tests.ts +9 -0
- package/secret +1 -0
- package/secret.env +2 -0
- package/src/Aider.ts +168 -0
- package/src/Init.ts +0 -31
- package/src/PM/index.ts +1 -1
- package/src/PM/main.ts +71 -61
- package/src/PM/node.ts +1 -1
- package/src/Project.ts +55 -48
- package/src/Puppeteer.ts +66 -52
- package/src/SubPackages/react-dom/jsx/web.ts +46 -49
- package/src/SubPackages/react-test-renderer/jsx/index.ts +25 -2
- package/src/Types.ts +3 -1
- package/src/esbuildConfigs/inputFilesPlugin.ts +78 -31
- package/src/esbuildConfigs/node.ts +2 -2
- package/src/esbuildConfigs/web.ts +4 -4
- package/src/lib/abstractBase.ts +88 -30
- package/src/lib/basebuilder.ts +17 -3
- package/src/lib/core.ts +55 -13
- package/testeranto.ts +13 -0
- package/tsconfig.common.json +12 -4
- package/tsconfig.json +9 -2
- package/tsconfig.module.json +2 -2
- package/tsconfig.types.json +1 -1
- package/Report.Dockerfile +0 -44
- package/dist/common/Features.js +0 -51
- package/dist/common/Init.js +0 -30
- package/dist/common/Reporter.js +0 -112
- package/dist/common/Scheduler.js +0 -1
- package/dist/common/TaskManBackEnd.js +0 -167
- package/dist/common/esbuildConfigs/inputFilesPlugin.js +0 -49
- package/dist/common/mongooseSchemas.js +0 -56
- package/dist/common/preload.js +0 -15
- package/dist/common/report.html.js +0 -31
- package/dist/module/ExampleTab.js +0 -112
- package/dist/module/Features.js +0 -41
- package/dist/module/Init.js +0 -25
- package/dist/module/Reporter.js +0 -107
- package/dist/module/Scheduler.js +0 -1
- package/dist/module/SubPackages/react-test-renderer/jsx/index.js +0 -19
- package/dist/module/TaskManBackEnd.js +0 -162
- package/dist/module/TaskManFrontEnd.js +0 -605
- package/dist/module/esbuildConfigs/inputFilesPlugin.js +0 -44
- package/dist/module/mongooseSchemas.js +0 -50
- package/dist/module/preload.js +0 -15
- package/dist/module/report.html.js +0 -29
- package/dist/prebuild/TaskManBackEnd.mjs +0 -170
- package/dist/prebuild/TaskManFrontEnd.css +0 -12301
- package/dist/prebuild/TaskManFrontEnd.js +0 -81262
- package/dist/types/Features.d.ts +0 -35
- package/dist/types/Reporter.d.ts +0 -1
- package/dist/types/Scheduler.d.ts +0 -0
- package/dist/types/TaskManBackEnd.d.ts +0 -3
- package/dist/types/mongooseSchemas.d.ts +0 -124
- package/dist/types/preload.d.ts +0 -0
- package/dist/types/report.html.d.ts +0 -2
- package/src/ExampleTab.tsx +0 -219
- package/src/Features.ts +0 -64
- package/src/Reporter.ts +0 -126
- package/src/Scheduler.ts +0 -0
- package/src/TaskManBackEnd.ts +0 -226
- package/src/TaskManFrontEnd.tsx +0 -1254
- package/src/mongooseSchemas.ts +0 -105
- package/src/preload.ts +0 -17
- package/src/report.html.ts +0 -29
- package/tests/Rectangle.test.ts +0 -189
- package/trash/TaskMan.Dockerfile +0 -23
- package/trash/TaskMan1.Dockerfile +0 -43
- package/trash/devBot.dockerfile +0 -12
- package/trash/docker-compose-dev.yml +0 -9
- package/trash/docker-compose-prod.yml +0 -18
- package/trash/electronBuild.ts +0 -32
- /package/dist/common/{Node.js → src/Node.js} +0 -0
- /package/dist/common/{PM → src/PM}/index.js +0 -0
- /package/dist/common/{PM → src/PM}/web.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/puppeteer.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react/component/node.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react/component/web.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react/jsx/index.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react/jsx/node.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react/jsx/web.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react-dom/component/node.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react-dom/component/web.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react-dom/jsx/index.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react-dom/jsx/node.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react-test-renderer/MemoExoticComponent/node.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react-test-renderer/component/index.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react-test-renderer/component/interface.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react-test-renderer/component/node.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react-test-renderer/component/web.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react-test-renderer/fc/node.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react-test-renderer/fc/web.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react-test-renderer/jsx/node.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react-test-renderer/jsx/web.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react-test-renderer/jsx-promised/index.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react-test-renderer/jsx-promised/node.js +0 -0
- /package/dist/common/{SubPackages → src/SubPackages}/react-test-renderer/jsx-promised/web.js +0 -0
- /package/dist/common/{Types.js → src/Types.js} +0 -0
- /package/dist/common/{Web.js → src/Web.js} +0 -0
- /package/dist/common/{esbuildConfigs → src/esbuildConfigs}/features.js +0 -0
- /package/dist/common/{esbuildConfigs → src/esbuildConfigs}/index.js +0 -0
- /package/dist/common/{esbuildConfigs → src/esbuildConfigs}/report.js +0 -0
- /package/dist/common/{esbuildConfigs → src/esbuildConfigs}/tests.js +0 -0
- /package/dist/common/{lib → src/lib}/classBuilder.js +0 -0
- /package/dist/common/{lib → src/lib}/index.js +0 -0
- /package/dist/common/{lib → src/lib}/types.js +0 -0
- /package/dist/common/{puppeteerConfiger.js → src/puppeteerConfiger.js} +0 -0
- /package/dist/common/{utils.js → src/utils.js} +0 -0
- /package/dist/common/{web.html.js → src/web.html.js} +0 -0
- /package/dist/module/{Node.js → src/Node.js} +0 -0
- /package/dist/module/{PM → src/PM}/index.js +0 -0
- /package/dist/module/{PM → src/PM}/web.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/puppeteer.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react/component/node.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react/component/web.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react/jsx/index.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react/jsx/node.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react/jsx/web.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react-dom/component/node.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react-dom/component/web.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react-dom/jsx/index.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react-dom/jsx/node.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react-test-renderer/MemoExoticComponent/node.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react-test-renderer/component/index.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react-test-renderer/component/interface.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react-test-renderer/component/node.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react-test-renderer/component/web.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react-test-renderer/fc/node.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react-test-renderer/fc/web.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react-test-renderer/jsx/node.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react-test-renderer/jsx/web.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react-test-renderer/jsx-promised/index.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react-test-renderer/jsx-promised/node.js +0 -0
- /package/dist/module/{SubPackages → src/SubPackages}/react-test-renderer/jsx-promised/web.js +0 -0
- /package/dist/module/{Types.js → src/Types.js} +0 -0
- /package/dist/module/{Web.js → src/Web.js} +0 -0
- /package/dist/module/{esbuildConfigs → src/esbuildConfigs}/features.js +0 -0
- /package/dist/module/{esbuildConfigs → src/esbuildConfigs}/index.js +0 -0
- /package/dist/module/{esbuildConfigs → src/esbuildConfigs}/report.js +0 -0
- /package/dist/module/{esbuildConfigs → src/esbuildConfigs}/tests.js +0 -0
- /package/dist/module/{lib → src/lib}/classBuilder.js +0 -0
- /package/dist/module/{lib → src/lib}/index.js +0 -0
- /package/dist/module/{lib → src/lib}/types.js +0 -0
- /package/dist/module/{puppeteerConfiger.js → src/puppeteerConfiger.js} +0 -0
- /package/dist/module/{utils.js → src/utils.js} +0 -0
- /package/dist/module/{web.html.js → src/web.html.js} +0 -0
- /package/dist/types/{Init.d.ts → src/Init.d.ts} +0 -0
- /package/dist/types/{Node.d.ts → src/Node.d.ts} +0 -0
- /package/dist/types/{PM → src/PM}/node.d.ts +0 -0
- /package/dist/types/{PM → src/PM}/web.d.ts +0 -0
- /package/dist/types/{Puppeteer.d.ts → src/Puppeteer.d.ts} +0 -0
- /package/dist/types/{SubPackages → src/SubPackages}/puppeteer.d.ts +0 -0
- /package/dist/types/{SubPackages → src/SubPackages}/react/component/node.d.ts +0 -0
- /package/dist/types/{SubPackages → src/SubPackages}/react/component/web.d.ts +0 -0
- /package/dist/types/{SubPackages → src/SubPackages}/react/jsx/index.d.ts +0 -0
- /package/dist/types/{SubPackages → src/SubPackages}/react/jsx/node.d.ts +0 -0
- /package/dist/types/{SubPackages → src/SubPackages}/react/jsx/web.d.ts +0 -0
- /package/dist/types/{SubPackages → src/SubPackages}/react-dom/component/node.d.ts +0 -0
- /package/dist/types/{SubPackages → src/SubPackages}/react-dom/component/web.d.ts +0 -0
- /package/dist/types/{SubPackages → src/SubPackages}/react-dom/jsx/index.d.ts +0 -0
- /package/dist/types/{SubPackages → src/SubPackages}/react-dom/jsx/node.d.ts +0 -0
- /package/dist/types/{SubPackages → src/SubPackages}/react-dom/jsx/web.d.ts +0 -0
- /package/dist/types/{SubPackages → src/SubPackages}/react-test-renderer/MemoExoticComponent/node.d.ts +0 -0
- /package/dist/types/{SubPackages → src/SubPackages}/react-test-renderer/component/index.d.ts +0 -0
- /package/dist/types/{SubPackages → src/SubPackages}/react-test-renderer/component/interface.d.ts +0 -0
- /package/dist/types/{SubPackages → src/SubPackages}/react-test-renderer/component/node.d.ts +0 -0
- /package/dist/types/{SubPackages → src/SubPackages}/react-test-renderer/component/web.d.ts +0 -0
- /package/dist/types/{SubPackages → src/SubPackages}/react-test-renderer/fc/node.d.ts +0 -0
- /package/dist/types/{SubPackages → src/SubPackages}/react-test-renderer/fc/web.d.ts +0 -0
- /package/dist/types/{SubPackages → src/SubPackages}/react-test-renderer/jsx/index.d.ts +0 -0
- /package/dist/types/{SubPackages → src/SubPackages}/react-test-renderer/jsx/node.d.ts +0 -0
- /package/dist/types/{SubPackages → src/SubPackages}/react-test-renderer/jsx/web.d.ts +0 -0
- /package/dist/types/{SubPackages → src/SubPackages}/react-test-renderer/jsx-promised/index.d.ts +0 -0
- /package/dist/types/{SubPackages → src/SubPackages}/react-test-renderer/jsx-promised/node.d.ts +0 -0
- /package/dist/types/{SubPackages → src/SubPackages}/react-test-renderer/jsx-promised/web.d.ts +0 -0
- /package/dist/types/{Web.d.ts → src/Web.d.ts} +0 -0
- /package/dist/types/{esbuildConfigs → src/esbuildConfigs}/features.d.ts +0 -0
- /package/dist/types/{esbuildConfigs → src/esbuildConfigs}/index.d.ts +0 -0
- /package/dist/types/{esbuildConfigs → src/esbuildConfigs}/inputFilesPlugin.d.ts +0 -0
- /package/dist/types/{esbuildConfigs → src/esbuildConfigs}/node.d.ts +0 -0
- /package/dist/types/{esbuildConfigs → src/esbuildConfigs}/report.d.ts +0 -0
- /package/dist/types/{esbuildConfigs → src/esbuildConfigs}/tests.d.ts +0 -0
- /package/dist/types/{esbuildConfigs → src/esbuildConfigs}/web.d.ts +0 -0
- /package/dist/types/{lib → src/lib}/basebuilder.d.ts +0 -0
- /package/dist/types/{lib → src/lib}/classBuilder.d.ts +0 -0
- /package/dist/types/{lib → src/lib}/core.d.ts +0 -0
- /package/dist/types/{lib → src/lib}/index.d.ts +0 -0
- /package/dist/types/{lib → src/lib}/types.d.ts +0 -0
- /package/dist/types/{puppeteerConfiger.d.ts → src/puppeteerConfiger.d.ts} +0 -0
- /package/dist/types/{utils.d.ts → src/utils.d.ts} +0 -0
- /package/dist/types/{web.html.d.ts → src/web.html.d.ts} +0 -0
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const fs_1 = __importDefault(require("fs"));
|
|
7
|
+
const path_1 = __importDefault(require("path"));
|
|
8
|
+
exports.default = (platform, entryPoints) => {
|
|
9
|
+
return {
|
|
10
|
+
name: "metafileWriter",
|
|
11
|
+
setup(build) {
|
|
12
|
+
build.onEnd((result) => {
|
|
13
|
+
if (result.errors.length === 0) {
|
|
14
|
+
entryPoints.forEach((entryPoint) => {
|
|
15
|
+
const filePath = path_1.default.join("./docs/", platform, entryPoint.split(".").slice(0, -1).join("."), `inputFiles.json`);
|
|
16
|
+
const promptPath = path_1.default.join("./docs/", platform, entryPoint.split(".").slice(0, -1).join("."), `prompt.txt`);
|
|
17
|
+
const testPaths = path_1.default.join("./docs/", platform, entryPoint.split(".").slice(0, -1).join("."), `tests.json`);
|
|
18
|
+
const dirName = path_1.default.dirname(filePath);
|
|
19
|
+
if (!fs_1.default.existsSync(dirName)) {
|
|
20
|
+
fs_1.default.mkdirSync(dirName, { recursive: true });
|
|
21
|
+
}
|
|
22
|
+
const j = Object.keys(Object.keys(result.metafile.outputs)
|
|
23
|
+
.filter((s) => {
|
|
24
|
+
if (!result.metafile.outputs[s].entryPoint) {
|
|
25
|
+
return false;
|
|
26
|
+
}
|
|
27
|
+
return (path_1.default.resolve(result.metafile.outputs[s].entryPoint) ===
|
|
28
|
+
path_1.default.resolve(entryPoint));
|
|
29
|
+
})
|
|
30
|
+
.reduce((mm, el) => {
|
|
31
|
+
mm.push(result.metafile.outputs[el].inputs);
|
|
32
|
+
return mm;
|
|
33
|
+
}, [])[0]).filter((f) => {
|
|
34
|
+
const regex = /^src\/.*/g;
|
|
35
|
+
const matches = f.match(regex);
|
|
36
|
+
const passes = (matches === null || matches === void 0 ? void 0 : matches.length) === 1;
|
|
37
|
+
return passes;
|
|
38
|
+
});
|
|
39
|
+
// .filter((f: string) => {
|
|
40
|
+
// const regex = /.*\.test\..*/g;
|
|
41
|
+
// const matches = f.match(regex);
|
|
42
|
+
// const passes = matches?.length === 1;
|
|
43
|
+
// return !passes;
|
|
44
|
+
// })
|
|
45
|
+
const jsonContent = JSON.stringify(j);
|
|
46
|
+
fs_1.default.writeFileSync(filePath, jsonContent);
|
|
47
|
+
fs_1.default.writeFileSync(promptPath, `
|
|
48
|
+
${j
|
|
49
|
+
.map((x) => {
|
|
50
|
+
return `/add ${x}`;
|
|
51
|
+
})
|
|
52
|
+
.join("\n")}
|
|
53
|
+
/read ${testPaths}
|
|
54
|
+
|
|
55
|
+
/code fix the failing tests described in ${filePath}.
|
|
56
|
+
`);
|
|
57
|
+
// fs.writeFileSync(
|
|
58
|
+
// promptPath,
|
|
59
|
+
// `
|
|
60
|
+
// from aider.coders import Coder
|
|
61
|
+
// from aider.models import Model
|
|
62
|
+
// import os
|
|
63
|
+
// model = Model("deepseek")
|
|
64
|
+
// coder = Coder.create(main_model=model)
|
|
65
|
+
// coder.run("/read-only", "${testPaths}")
|
|
66
|
+
// ${j
|
|
67
|
+
// .map((x) => {
|
|
68
|
+
// return `coder.run("/add", "${x}")`;
|
|
69
|
+
// })
|
|
70
|
+
// .join("\n")}
|
|
71
|
+
// coder.run("fix the failing tests described in ${filePath}.")
|
|
72
|
+
// `
|
|
73
|
+
// );
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
},
|
|
78
|
+
};
|
|
79
|
+
};
|
|
@@ -4,9 +4,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const index_js_1 = __importDefault(require("./index.js"));
|
|
7
|
-
const
|
|
7
|
+
const inputFilesPlugin_js_1 = __importDefault(require("./inputFilesPlugin.js"));
|
|
8
8
|
exports.default = (config, entryPoints) => {
|
|
9
|
-
return Object.assign(Object.assign({}, (0, index_js_1.default)(config)), { splitting: true, outdir: config.outdir + "/node",
|
|
9
|
+
return Object.assign(Object.assign({}, (0, index_js_1.default)(config)), { splitting: true, outdir: config.outdir + "/node",
|
|
10
|
+
// inject: [`./node_modules/testeranto/dist/cjs-shim.js`],
|
|
11
|
+
metafile: true, supported: {
|
|
10
12
|
"dynamic-import": true,
|
|
11
13
|
}, define: {
|
|
12
14
|
"process.env.FLUENTFFMPEG_COV": "0",
|
|
@@ -21,7 +23,7 @@ exports.default = (config, entryPoints) => {
|
|
|
21
23
|
...config.externals,
|
|
22
24
|
], entryPoints: [...entryPoints], plugins: [
|
|
23
25
|
...(config.nodePlugins || []),
|
|
24
|
-
(0,
|
|
26
|
+
(0, inputFilesPlugin_js_1.default)("node", entryPoints),
|
|
25
27
|
{
|
|
26
28
|
name: "rebuild-notify",
|
|
27
29
|
setup(build) {
|
|
@@ -16,10 +16,10 @@ exports.default = (config, entryPoints) => {
|
|
|
16
16
|
outdir: config.outdir + "/web", alias: {
|
|
17
17
|
react: path_1.default.resolve("./node_modules/react"),
|
|
18
18
|
}, metafile: true, external: [
|
|
19
|
-
"testeranto.json",
|
|
20
|
-
"features.test.ts",
|
|
19
|
+
// "testeranto.json",
|
|
20
|
+
// "features.test.ts",
|
|
21
21
|
// "url",
|
|
22
|
-
"react",
|
|
22
|
+
// "react",
|
|
23
23
|
"path",
|
|
24
24
|
"fs",
|
|
25
25
|
"stream",
|
|
@@ -39,7 +39,7 @@ exports.default = (config, entryPoints) => {
|
|
|
39
39
|
"dns",
|
|
40
40
|
], platform: "browser", entryPoints: [...entryPoints], plugins: [
|
|
41
41
|
...(config.webPlugins || []),
|
|
42
|
-
(0, inputFilesPlugin_js_1.default)("
|
|
42
|
+
(0, inputFilesPlugin_js_1.default)("web", entryPoints),
|
|
43
43
|
{
|
|
44
44
|
name: "rebuild-notify",
|
|
45
45
|
setup(build) {
|
|
@@ -10,10 +10,22 @@ class BaseSuite {
|
|
|
10
10
|
this.fails = [];
|
|
11
11
|
}
|
|
12
12
|
toObj() {
|
|
13
|
+
const givens = Object.keys(this.givens).map((k) => this.givens[k].toObj());
|
|
14
|
+
const features = Object.keys(this.givens)
|
|
15
|
+
.map((k) => this.givens[k].features)
|
|
16
|
+
.flat()
|
|
17
|
+
.filter((value, index, array) => {
|
|
18
|
+
return array.indexOf(value) === index;
|
|
19
|
+
})
|
|
20
|
+
.reduce((mm, lm) => {
|
|
21
|
+
mm[lm] = lm;
|
|
22
|
+
return mm;
|
|
23
|
+
}, {});
|
|
13
24
|
return {
|
|
14
25
|
name: this.name,
|
|
15
|
-
givens
|
|
26
|
+
givens,
|
|
16
27
|
fails: this.fails,
|
|
28
|
+
features,
|
|
17
29
|
};
|
|
18
30
|
}
|
|
19
31
|
setup(s, artifactory, tr, pm) {
|
|
@@ -230,6 +242,7 @@ class BaseGiven {
|
|
|
230
242
|
},
|
|
231
243
|
});
|
|
232
244
|
this.store = await this.givenThat(subject, testResourceConfiguration, givenArtifactory, this.givenCB, beforeEachProxy);
|
|
245
|
+
// console.log("mark6", this.store);
|
|
233
246
|
for (const [whenNdx, whenStep] of this.whens.entries()) {
|
|
234
247
|
await whenStep.test(this.store, testResourceConfiguration, tLog, pm, `suite-${suiteNdx}/given-${key}/when/${whenNdx}`);
|
|
235
248
|
}
|
|
@@ -239,9 +252,10 @@ class BaseGiven {
|
|
|
239
252
|
}
|
|
240
253
|
}
|
|
241
254
|
catch (e) {
|
|
255
|
+
console.error(e);
|
|
242
256
|
this.error = e;
|
|
243
|
-
tLog(e);
|
|
244
|
-
tLog("\u0007"); // bell
|
|
257
|
+
tLog(e.stack);
|
|
258
|
+
// tLog("\u0007"); // bell
|
|
245
259
|
// throw e;
|
|
246
260
|
}
|
|
247
261
|
finally {
|
|
@@ -327,6 +341,7 @@ class BaseGiven {
|
|
|
327
341
|
return Reflect.get(...arguments);
|
|
328
342
|
},
|
|
329
343
|
});
|
|
344
|
+
// console.log("mark5", this.store, key);
|
|
330
345
|
await this.afterEach(this.store, key, givenArtifactory, afterEachProxy);
|
|
331
346
|
}
|
|
332
347
|
catch (e) {
|
|
@@ -352,6 +367,14 @@ class BaseWhen {
|
|
|
352
367
|
tLog(" When:", this.name);
|
|
353
368
|
const name = this.name;
|
|
354
369
|
const andWhenProxy = new Proxy(pm, {
|
|
370
|
+
// set(obj, prop, value) {
|
|
371
|
+
// return Reflect.set(...arguments);
|
|
372
|
+
// // if (prop === "eyeCount" && value % 2 !== 0) {
|
|
373
|
+
// // console.log("Monsters must have an even number of eyes");
|
|
374
|
+
// // } else {
|
|
375
|
+
// // return Reflect.set(...arguments);
|
|
376
|
+
// // }
|
|
377
|
+
// },
|
|
355
378
|
get(target, prop, receiver) {
|
|
356
379
|
if (prop === "writeFileSync") {
|
|
357
380
|
return (fp, contents) =>
|
|
@@ -368,22 +391,12 @@ class BaseWhen {
|
|
|
368
391
|
return pages.map((page) => {
|
|
369
392
|
return new Proxy(page, {
|
|
370
393
|
get(pTarget, pProp, pReciever) {
|
|
394
|
+
// console.log("mark get", pTarget, pProp, pReciever);
|
|
371
395
|
if (pProp === "screenshot") {
|
|
372
396
|
return async (x) => {
|
|
373
|
-
// console.log(
|
|
374
|
-
// "custom-screenshot-MARK-afterEachProxy",
|
|
375
|
-
// window["custom-screenshot"].toString()
|
|
376
|
-
// );
|
|
377
397
|
return pm.customScreenShot(Object.assign(Object.assign({}, x), { path: `${testResourceConfiguration.fs}/${key}/afterEach` +
|
|
378
398
|
"/" +
|
|
379
399
|
x.path }), page);
|
|
380
|
-
// return await pTarget[pProp]({
|
|
381
|
-
// ...x,
|
|
382
|
-
// path:
|
|
383
|
-
// `${testResourceConfiguration.fs}/suite-${suiteNdx}/given-${key}/afterEach` +
|
|
384
|
-
// "/" +
|
|
385
|
-
// x.path,
|
|
386
|
-
// });
|
|
387
400
|
};
|
|
388
401
|
}
|
|
389
402
|
else if (pProp === "mainFrame") {
|
|
@@ -401,6 +414,33 @@ class BaseWhen {
|
|
|
401
414
|
return pTarget[pProp].bind(pTarget);
|
|
402
415
|
// return target[pProp];
|
|
403
416
|
}
|
|
417
|
+
else if (pProp === "click") {
|
|
418
|
+
// console.log("mark12", arguments);
|
|
419
|
+
// return Reflect.get(target, prop, receiver);
|
|
420
|
+
// return pTarget[pProp].bind(pTarget);
|
|
421
|
+
// return target[pProp];
|
|
422
|
+
return (selector, options) => {
|
|
423
|
+
// console.log("mark13", selector, options);
|
|
424
|
+
// debugger;
|
|
425
|
+
pTarget[pProp](selector, options);
|
|
426
|
+
};
|
|
427
|
+
}
|
|
428
|
+
else if (pProp === "$") {
|
|
429
|
+
return Reflect.get(...arguments);
|
|
430
|
+
// return Reflect.get(target, prop, receiver);
|
|
431
|
+
// return pTarget[pProp].bind(pTarget);
|
|
432
|
+
// return target[pProp];
|
|
433
|
+
// return pTarget[pProp].bind(pTarget);
|
|
434
|
+
// return async (s) => {
|
|
435
|
+
// console.log("mark17", s);
|
|
436
|
+
// console.log("pTarget", pTarget);
|
|
437
|
+
// console.log("pProp", pProp);
|
|
438
|
+
// console.log("pReciever", pReciever);
|
|
439
|
+
// // return "XXX";
|
|
440
|
+
// // debugger;
|
|
441
|
+
// return await pTarget[pProp](s);
|
|
442
|
+
// };
|
|
443
|
+
}
|
|
404
444
|
else {
|
|
405
445
|
return Reflect.get(...arguments);
|
|
406
446
|
}
|
|
@@ -420,13 +460,21 @@ class BaseWhen {
|
|
|
420
460
|
return Reflect.get(...arguments);
|
|
421
461
|
},
|
|
422
462
|
});
|
|
423
|
-
|
|
424
|
-
return await this.andWhen(store, this.whenCB, testResourceConfiguration, andWhenProxy);
|
|
425
|
-
}
|
|
426
|
-
catch (e) {
|
|
463
|
+
return this.andWhen(store, this.whenCB, testResourceConfiguration, andWhenProxy).catch((e) => {
|
|
427
464
|
this.error = true;
|
|
428
|
-
throw e;
|
|
429
|
-
}
|
|
465
|
+
// throw e;
|
|
466
|
+
});
|
|
467
|
+
// try {
|
|
468
|
+
// return await this.andWhen(
|
|
469
|
+
// store,
|
|
470
|
+
// this.whenCB,
|
|
471
|
+
// testResourceConfiguration,
|
|
472
|
+
// andWhenProxy
|
|
473
|
+
// );
|
|
474
|
+
// } catch (e) {
|
|
475
|
+
// this.error = true;
|
|
476
|
+
// throw e;
|
|
477
|
+
// }
|
|
430
478
|
}
|
|
431
479
|
}
|
|
432
480
|
exports.BaseWhen = BaseWhen;
|
|
@@ -507,10 +555,18 @@ class BaseThen {
|
|
|
507
555
|
return Reflect.get(...arguments);
|
|
508
556
|
},
|
|
509
557
|
});
|
|
510
|
-
const x = await this.butThen(
|
|
511
|
-
//
|
|
512
|
-
|
|
513
|
-
|
|
558
|
+
// const x = await this.butThen(
|
|
559
|
+
// store,
|
|
560
|
+
// this.thenCB,
|
|
561
|
+
// testResourceConfiguration,
|
|
562
|
+
// butThenProxy
|
|
563
|
+
// );
|
|
564
|
+
// return x;
|
|
565
|
+
return this.butThen(store, this.thenCB, testResourceConfiguration, butThenProxy).catch((e) => {
|
|
566
|
+
console.log("mar123");
|
|
567
|
+
this.error = true;
|
|
568
|
+
throw e;
|
|
569
|
+
});
|
|
514
570
|
}
|
|
515
571
|
catch (e) {
|
|
516
572
|
console.log("test failed", e);
|
|
@@ -16,12 +16,15 @@ class BaseBuilder {
|
|
|
16
16
|
this.specs = testSpecification(this.Suites(), this.Given(), this.When(), this.Then(), this.Check());
|
|
17
17
|
this.testJobs = this.specs.map((suite) => {
|
|
18
18
|
const suiteRunner = (suite) => async (puppetMaster, tLog) => {
|
|
19
|
-
await puppetMaster.startPuppeteer({
|
|
19
|
+
const puppeteerBrowser = await puppetMaster.startPuppeteer({
|
|
20
20
|
browserWSEndpoint: puppetMaster.testResourceConfiguration.browserWSEndpoint,
|
|
21
21
|
}, puppetMaster.testResourceConfiguration.fs);
|
|
22
|
-
|
|
22
|
+
const x = await suite.run(input, puppetMaster.testResourceConfiguration, (fPath, value) => puppetMaster.testArtiFactoryfileWriter(tLog, (p) => {
|
|
23
23
|
this.artifacts.push(p);
|
|
24
24
|
})(puppetMaster.testResourceConfiguration.fs + "/" + fPath, value), tLog, puppetMaster);
|
|
25
|
+
// await puppetMaster.browser.disconnect();
|
|
26
|
+
// puppeteerBrowser.close();
|
|
27
|
+
return x;
|
|
25
28
|
};
|
|
26
29
|
const runner = suiteRunner(suite);
|
|
27
30
|
return {
|
|
@@ -31,7 +34,7 @@ class BaseBuilder {
|
|
|
31
34
|
},
|
|
32
35
|
runner,
|
|
33
36
|
receiveTestResourceConfig: async function (puppetMaster) {
|
|
34
|
-
await puppetMaster.mkdirSync();
|
|
37
|
+
// await puppetMaster.mkdirSync();
|
|
35
38
|
const logFilePath = "log.txt";
|
|
36
39
|
const access = await puppetMaster.createWriteStream(logFilePath);
|
|
37
40
|
const tLog = (...l) => {
|
|
@@ -46,6 +49,14 @@ class BaseBuilder {
|
|
|
46
49
|
return suiteDone.givens[k].error;
|
|
47
50
|
}).length;
|
|
48
51
|
puppetMaster.writeFileSync(`exitcode`, numberOfFailures.toString());
|
|
52
|
+
// if (numberOfFailures > 0) {
|
|
53
|
+
// puppetMaster.writeFileSync(
|
|
54
|
+
// `prompt`,
|
|
55
|
+
// `
|
|
56
|
+
// aider --message "make a script that prints hello" hello.js
|
|
57
|
+
// `
|
|
58
|
+
// );
|
|
59
|
+
// }
|
|
49
60
|
puppetMaster.writeFileSync(`tests.json`, JSON.stringify(this.toObj(), null, 2));
|
|
50
61
|
console.log(`exiting gracefully with ${numberOfFailures} failures.`);
|
|
51
62
|
return {
|
|
@@ -48,11 +48,55 @@ class Testeranto extends classBuilder_js_1.ClassBuilder {
|
|
|
48
48
|
}
|
|
49
49
|
}, class When extends abstractBase_js_1.BaseWhen {
|
|
50
50
|
async andWhen(store, whenCB, testResource, pm) {
|
|
51
|
-
|
|
51
|
+
try {
|
|
52
|
+
return await fullTestInterface.andWhen(store, whenCB, testResource, pm);
|
|
53
|
+
}
|
|
54
|
+
catch (e) {
|
|
55
|
+
throw e;
|
|
56
|
+
}
|
|
57
|
+
// return fullTestInterface
|
|
58
|
+
// .andWhen(store, whenCB, testResource, pm)
|
|
59
|
+
// .catch((e) => {
|
|
60
|
+
// throw e;
|
|
61
|
+
// });
|
|
62
|
+
// return new Promise((res, rej) => {
|
|
63
|
+
// fullTestInterface.andWhen(store, whenCB, testResource, pm);
|
|
64
|
+
// });
|
|
65
|
+
// return await fullTestInterface.andWhen(
|
|
66
|
+
// store,
|
|
67
|
+
// whenCB,
|
|
68
|
+
// testResource,
|
|
69
|
+
// pm
|
|
70
|
+
// );
|
|
52
71
|
}
|
|
53
72
|
}, class Then extends abstractBase_js_1.BaseThen {
|
|
54
|
-
async butThen(store, thenCB,
|
|
55
|
-
return
|
|
73
|
+
async butThen(store, thenCB, testResource, pm) {
|
|
74
|
+
return fullTestInterface
|
|
75
|
+
.butThen(store, thenCB, testResource, pm)
|
|
76
|
+
.then((v) => {
|
|
77
|
+
return v;
|
|
78
|
+
}, (e) => {
|
|
79
|
+
console.log(" ERROR ", e);
|
|
80
|
+
throw e;
|
|
81
|
+
});
|
|
82
|
+
// try {
|
|
83
|
+
// console.log("mark 4");
|
|
84
|
+
// return await fullTestInterface.butThen(
|
|
85
|
+
// store,
|
|
86
|
+
// thenCB,
|
|
87
|
+
// testResource,
|
|
88
|
+
// pm
|
|
89
|
+
// );
|
|
90
|
+
// } catch (e) {
|
|
91
|
+
// console.log("mar123");
|
|
92
|
+
// throw e;
|
|
93
|
+
// }
|
|
94
|
+
// return await fullTestInterface.butThen(
|
|
95
|
+
// store,
|
|
96
|
+
// thenCB,
|
|
97
|
+
// testResourceConfiguration,
|
|
98
|
+
// pm
|
|
99
|
+
// );
|
|
56
100
|
}
|
|
57
101
|
}, class Check extends abstractBase_js_1.BaseCheck {
|
|
58
102
|
constructor(name, features, checkCallback, whens, thens, initialValues) {
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = {
|
|
4
|
+
botEmail: "adamwong246@gmail.com",
|
|
5
|
+
taskman: "adamwong246/kokomobay-taskman",
|
|
6
|
+
outdir: "docs",
|
|
7
|
+
tests: [["./src/LoginButton.test.tsx", "web", { ports: 0 }, []]],
|
|
8
|
+
debugger: true,
|
|
9
|
+
clearScreen: false,
|
|
10
|
+
devMode: true,
|
|
11
|
+
minify: false,
|
|
12
|
+
outbase: ".",
|
|
13
|
+
ports: [],
|
|
14
|
+
externals: [],
|
|
15
|
+
};
|