testeranto 0.79.68 → 0.80.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/.eslintrc.js +5 -2
- package/README.md +7 -108
- 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 +96 -0
- package/dist/common/src/Init.js +10 -0
- package/dist/common/{PM → src/PM}/main.js +9 -3
- package/dist/common/{Puppeteer.js → src/Puppeteer.js} +8 -4
- package/dist/common/{SubPackages → src/SubPackages}/react-dom/jsx/web.js +37 -38
- package/dist/common/{esbuildConfigs → src/esbuildConfigs}/inputFilesPlugin.js +5 -2
- package/dist/common/{esbuildConfigs → src/esbuildConfigs}/node.js +5 -3
- package/dist/common/{esbuildConfigs → src/esbuildConfigs}/web.js +1 -1
- package/dist/common/{lib → src/lib}/abstractBase.js +41 -13
- package/dist/common/{lib → src/lib}/basebuilder.js +8 -0
- 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 +89 -0
- package/dist/module/src/Init.js +5 -0
- package/dist/module/{PM → src/PM}/main.js +9 -3
- package/dist/module/{Puppeteer.js → src/Puppeteer.js} +8 -4
- package/dist/module/{SubPackages → src/SubPackages}/react-dom/jsx/web.js +37 -38
- package/dist/module/{esbuildConfigs → src/esbuildConfigs}/inputFilesPlugin.js +5 -2
- package/dist/module/{esbuildConfigs → src/esbuildConfigs}/node.js +4 -2
- package/dist/module/{esbuildConfigs → src/esbuildConfigs}/web.js +1 -1
- package/dist/module/{lib → src/lib}/abstractBase.js +41 -13
- package/dist/module/{lib → src/lib}/basebuilder.js +8 -0
- 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/{Types.d.ts → src/Types.d.ts} +3 -2
- 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 +49 -20
- package/run-tests.ts +9 -0
- package/src/Aider.ts +125 -0
- package/src/Init.ts +0 -31
- package/src/PM/index.ts +1 -1
- package/src/PM/main.ts +11 -5
- package/src/Puppeteer.ts +11 -4
- package/src/SubPackages/react-dom/jsx/web.ts +46 -49
- package/src/Types.ts +3 -1
- package/src/esbuildConfigs/inputFilesPlugin.ts +32 -30
- package/src/esbuildConfigs/node.ts +2 -2
- package/src/esbuildConfigs/web.ts +1 -1
- package/src/lib/abstractBase.ts +42 -15
- package/src/lib/basebuilder.ts +9 -0
- 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/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/TaskManBackEnd.js +0 -162
- package/dist/module/TaskManFrontEnd.js +0 -600
- 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 -81264
- 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 -1222
- 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}/node.js +0 -0
- /package/dist/common/{PM → src/PM}/web.js +0 -0
- /package/dist/common/{Project.js → src/Project.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/index.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}/core.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}/node.js +0 -0
- /package/dist/module/{PM → src/PM}/web.js +0 -0
- /package/dist/module/{Project.js → src/Project.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/index.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}/core.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}/main.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/{Project.d.ts → src/Project.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}/abstractBase.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
|
@@ -3,7 +3,7 @@ import { BuildOptions } from "esbuild";
|
|
|
3
3
|
import { IBaseConfig } from "../lib/types";
|
|
4
4
|
|
|
5
5
|
import baseEsBuildConfig from "./index.js";
|
|
6
|
-
import inputFilesPlugin from "./inputFilesPlugin";
|
|
6
|
+
import inputFilesPlugin from "./inputFilesPlugin.js";
|
|
7
7
|
|
|
8
8
|
export default (
|
|
9
9
|
config: IBaseConfig,
|
|
@@ -16,7 +16,7 @@ export default (
|
|
|
16
16
|
|
|
17
17
|
outdir: config.outdir + "/node",
|
|
18
18
|
|
|
19
|
-
inject: [`./node_modules/testeranto/dist/cjs-shim.js`],
|
|
19
|
+
// inject: [`./node_modules/testeranto/dist/cjs-shim.js`],
|
|
20
20
|
metafile: true,
|
|
21
21
|
supported: {
|
|
22
22
|
"dynamic-import": true,
|
package/src/lib/abstractBase.ts
CHANGED
|
@@ -406,6 +406,7 @@ export abstract class BaseGiven<
|
|
|
406
406
|
this.givenCB,
|
|
407
407
|
beforeEachProxy
|
|
408
408
|
);
|
|
409
|
+
console.log("mark6", this.store);
|
|
409
410
|
|
|
410
411
|
for (const [whenNdx, whenStep] of this.whens.entries()) {
|
|
411
412
|
await whenStep.test(
|
|
@@ -428,9 +429,11 @@ export abstract class BaseGiven<
|
|
|
428
429
|
tester(t);
|
|
429
430
|
}
|
|
430
431
|
} catch (e) {
|
|
432
|
+
console.error(e);
|
|
431
433
|
this.error = e;
|
|
432
|
-
tLog(e);
|
|
433
|
-
tLog("\u0007"); // bell
|
|
434
|
+
tLog(e.stack);
|
|
435
|
+
// tLog("\u0007"); // bell
|
|
436
|
+
|
|
434
437
|
// throw e;
|
|
435
438
|
} finally {
|
|
436
439
|
try {
|
|
@@ -532,6 +535,7 @@ export abstract class BaseGiven<
|
|
|
532
535
|
},
|
|
533
536
|
});
|
|
534
537
|
|
|
538
|
+
console.log("mark5", this.store, key);
|
|
535
539
|
await this.afterEach(this.store, key, givenArtifactory, afterEachProxy);
|
|
536
540
|
} catch (e) {
|
|
537
541
|
console.error("afterEach failed! no error will be recorded!", e);
|
|
@@ -579,6 +583,15 @@ export abstract class BaseWhen<ITestShape extends IBaseTest> {
|
|
|
579
583
|
|
|
580
584
|
const name = this.name;
|
|
581
585
|
const andWhenProxy = new Proxy(pm, {
|
|
586
|
+
// set(obj, prop, value) {
|
|
587
|
+
// return Reflect.set(...arguments);
|
|
588
|
+
// // if (prop === "eyeCount" && value % 2 !== 0) {
|
|
589
|
+
// // console.log("Monsters must have an even number of eyes");
|
|
590
|
+
// // } else {
|
|
591
|
+
// // return Reflect.set(...arguments);
|
|
592
|
+
// // }
|
|
593
|
+
// },
|
|
594
|
+
|
|
582
595
|
get(target, prop, receiver) {
|
|
583
596
|
if (prop === "writeFileSync") {
|
|
584
597
|
return (fp, contents) =>
|
|
@@ -597,13 +610,9 @@ export abstract class BaseWhen<ITestShape extends IBaseTest> {
|
|
|
597
610
|
return pages.map((page) => {
|
|
598
611
|
return new Proxy(page, {
|
|
599
612
|
get(pTarget, pProp, pReciever) {
|
|
613
|
+
// console.log("mark get", pTarget, pProp, pReciever);
|
|
600
614
|
if (pProp === "screenshot") {
|
|
601
615
|
return async (x) => {
|
|
602
|
-
// console.log(
|
|
603
|
-
// "custom-screenshot-MARK-afterEachProxy",
|
|
604
|
-
// window["custom-screenshot"].toString()
|
|
605
|
-
// );
|
|
606
|
-
|
|
607
616
|
return pm.customScreenShot(
|
|
608
617
|
{
|
|
609
618
|
...x,
|
|
@@ -614,14 +623,6 @@ export abstract class BaseWhen<ITestShape extends IBaseTest> {
|
|
|
614
623
|
},
|
|
615
624
|
page
|
|
616
625
|
);
|
|
617
|
-
|
|
618
|
-
// return await pTarget[pProp]({
|
|
619
|
-
// ...x,
|
|
620
|
-
// path:
|
|
621
|
-
// `${testResourceConfiguration.fs}/suite-${suiteNdx}/given-${key}/afterEach` +
|
|
622
|
-
// "/" +
|
|
623
|
-
// x.path,
|
|
624
|
-
// });
|
|
625
626
|
};
|
|
626
627
|
} else if (pProp === "mainFrame") {
|
|
627
628
|
return () => pTarget[pProp]();
|
|
@@ -635,6 +636,32 @@ export abstract class BaseWhen<ITestShape extends IBaseTest> {
|
|
|
635
636
|
// return Reflect.get(target, prop, receiver);
|
|
636
637
|
return pTarget[pProp].bind(pTarget);
|
|
637
638
|
// return target[pProp];
|
|
639
|
+
} else if (pProp === "click") {
|
|
640
|
+
// console.log("mark12", arguments);
|
|
641
|
+
// return Reflect.get(target, prop, receiver);
|
|
642
|
+
// return pTarget[pProp].bind(pTarget);
|
|
643
|
+
// return target[pProp];
|
|
644
|
+
return (selector, options) => {
|
|
645
|
+
// console.log("mark13", selector, options);
|
|
646
|
+
// debugger;
|
|
647
|
+
pTarget[pProp](selector, options);
|
|
648
|
+
};
|
|
649
|
+
} else if (pProp === "$") {
|
|
650
|
+
return Reflect.get(...arguments);
|
|
651
|
+
// return Reflect.get(target, prop, receiver);
|
|
652
|
+
// return pTarget[pProp].bind(pTarget);
|
|
653
|
+
// return target[pProp];
|
|
654
|
+
// return pTarget[pProp].bind(pTarget);
|
|
655
|
+
|
|
656
|
+
// return async (s) => {
|
|
657
|
+
// console.log("mark17", s);
|
|
658
|
+
// console.log("pTarget", pTarget);
|
|
659
|
+
// console.log("pProp", pProp);
|
|
660
|
+
// console.log("pReciever", pReciever);
|
|
661
|
+
// // return "XXX";
|
|
662
|
+
// // debugger;
|
|
663
|
+
// return await pTarget[pProp](s);
|
|
664
|
+
// };
|
|
638
665
|
} else {
|
|
639
666
|
return Reflect.get(...arguments);
|
|
640
667
|
}
|
package/src/lib/basebuilder.ts
CHANGED
|
@@ -147,6 +147,15 @@ export abstract class BaseBuilder<
|
|
|
147
147
|
}).length;
|
|
148
148
|
puppetMaster.writeFileSync(`exitcode`, numberOfFailures.toString());
|
|
149
149
|
|
|
150
|
+
// if (numberOfFailures > 0) {
|
|
151
|
+
// puppetMaster.writeFileSync(
|
|
152
|
+
// `prompt`,
|
|
153
|
+
// `
|
|
154
|
+
// aider --message "make a script that prints hello" hello.js
|
|
155
|
+
// `
|
|
156
|
+
// );
|
|
157
|
+
// }
|
|
158
|
+
|
|
150
159
|
puppetMaster.writeFileSync(
|
|
151
160
|
`tests.json`,
|
|
152
161
|
JSON.stringify(this.toObj(), null, 2)
|
package/testeranto.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
botEmail: "adamwong246@gmail.com",
|
|
3
|
+
taskman: "adamwong246/kokomobay-taskman",
|
|
4
|
+
outdir: "docs",
|
|
5
|
+
tests: [["./src/LoginButton.test.tsx", "web", { ports: 0 }, []]],
|
|
6
|
+
debugger: true,
|
|
7
|
+
clearScreen: false,
|
|
8
|
+
devMode: true,
|
|
9
|
+
minify: false,
|
|
10
|
+
outbase: ".",
|
|
11
|
+
ports: [],
|
|
12
|
+
externals: [],
|
|
13
|
+
};
|
package/tsconfig.common.json
CHANGED
|
@@ -18,7 +18,10 @@
|
|
|
18
18
|
"jsx": "react",
|
|
19
19
|
"resolveJsonModule": true,
|
|
20
20
|
"strictNullChecks": true,
|
|
21
|
-
"lib": [
|
|
21
|
+
"lib": [
|
|
22
|
+
"dom",
|
|
23
|
+
"dom.iterable"
|
|
24
|
+
],
|
|
22
25
|
"skipLibCheck": true,
|
|
23
26
|
"strict": false,
|
|
24
27
|
"forceConsistentCasingInFileNames": true,
|
|
@@ -30,6 +33,11 @@
|
|
|
30
33
|
"outDir": "dist/common/",
|
|
31
34
|
"alwaysStrict": true
|
|
32
35
|
},
|
|
33
|
-
"include": [
|
|
34
|
-
|
|
35
|
-
|
|
36
|
+
"include": [
|
|
37
|
+
"./**/*.*ts",
|
|
38
|
+
"index.d.ts"
|
|
39
|
+
],
|
|
40
|
+
"exclude": [
|
|
41
|
+
"node_modules"
|
|
42
|
+
]
|
|
43
|
+
}
|
package/tsconfig.json
CHANGED
|
@@ -3,6 +3,9 @@
|
|
|
3
3
|
"compilerOptions": {
|
|
4
4
|
"module": "esnext",
|
|
5
5
|
"allowSyntheticDefaultImports": true,
|
|
6
|
+
"moduleResolution": "node",
|
|
7
|
+
"target": "es2020",
|
|
8
|
+
"esModuleInterop": true,
|
|
6
9
|
}
|
|
7
10
|
},
|
|
8
11
|
"declaration": true,
|
|
@@ -36,9 +39,13 @@
|
|
|
36
39
|
"alwaysStrict": true
|
|
37
40
|
},
|
|
38
41
|
"include": [
|
|
39
|
-
"src/**/*.*ts",
|
|
40
|
-
"
|
|
42
|
+
"./node_modules/testeranto/src/**/*.*ts",
|
|
43
|
+
"./**/*.*ts",
|
|
44
|
+
"./**/*.*tsx",
|
|
41
45
|
"index.d.ts",
|
|
46
|
+
"build-tests.ts",
|
|
47
|
+
"run-tests.ts",
|
|
48
|
+
"testeranto.ts",
|
|
42
49
|
],
|
|
43
50
|
"exclude": [
|
|
44
51
|
"node_modules",
|
package/tsconfig.module.json
CHANGED
package/tsconfig.types.json
CHANGED
package/Report.Dockerfile
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
FROM node:18.18.0
|
|
2
|
-
ENV HOST 0.0.0.0
|
|
3
|
-
RUN apt-get update && \
|
|
4
|
-
apt-get install -y --no-install-recommends \
|
|
5
|
-
python3 \
|
|
6
|
-
make \
|
|
7
|
-
g++ && \
|
|
8
|
-
rm -rf /var/lib/apt/lists/*
|
|
9
|
-
|
|
10
|
-
RUN yarn global add node-gyp
|
|
11
|
-
|
|
12
|
-
RUN mkdir -p /usr/src/app
|
|
13
|
-
RUN mkdir -p /usr/src/app/docs
|
|
14
|
-
WORKDIR /usr/src/app
|
|
15
|
-
COPY package.json /usr/src/app
|
|
16
|
-
RUN yarn install
|
|
17
|
-
COPY ./src/ /usr/src/app/src
|
|
18
|
-
COPY ./subPackages/ /usr/src/app/subPackages
|
|
19
|
-
COPY ./testeranto.mts /usr/src/app/testeranto.mts
|
|
20
|
-
COPY ./tsconfig.json /usr/src/app/tsconfig.json
|
|
21
|
-
COPY ./init.mts /usr/src/app/init.mts
|
|
22
|
-
COPY ./report.mts /usr/src/app/report.mts
|
|
23
|
-
RUN yarn run init
|
|
24
|
-
# RUN yarn report
|
|
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 8080
|
|
40
|
-
EXPOSE 27017
|
|
41
|
-
# ENV MONGO_CONNECTION=mongodb+srv://testerantokokomobay:<db_password>@report.7rred.mongodb.net/?retryWrites=true&w=majority&appName=report
|
|
42
|
-
# ENV PORT=8080
|
|
43
|
-
# # CMD ['yarn', 'testeranto-testrun', '&', 'yarn', 'testeranto-taskman']
|
|
44
|
-
CMD ["yarn", "report"]
|
package/dist/common/Features.js
DELETED
|
@@ -1,51 +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.DirectedGraph = exports.TesterantoGraphDirectedAcyclic = exports.TesterantoGraphDirected = exports.TesterantoGraphUndirected = exports.BaseFeature = void 0;
|
|
7
|
-
const graphology_umd_js_1 = __importDefault(require("graphology/dist/graphology.umd.js"));
|
|
8
|
-
const { DirectedGraph, UndirectedGraph } = graphology_umd_js_1.default;
|
|
9
|
-
exports.DirectedGraph = DirectedGraph;
|
|
10
|
-
class TesterantoGraph {
|
|
11
|
-
constructor(name) {
|
|
12
|
-
this.name = name;
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
class BaseFeature {
|
|
16
|
-
constructor(name) {
|
|
17
|
-
this.name = name;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
exports.BaseFeature = BaseFeature;
|
|
21
|
-
class TesterantoGraphUndirected {
|
|
22
|
-
constructor(name) {
|
|
23
|
-
this.name = name;
|
|
24
|
-
this.graph = new UndirectedGraph();
|
|
25
|
-
}
|
|
26
|
-
connect(a, b, relation) {
|
|
27
|
-
this.graph.mergeEdge(a, b, { type: relation });
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
exports.TesterantoGraphUndirected = TesterantoGraphUndirected;
|
|
31
|
-
class TesterantoGraphDirected {
|
|
32
|
-
constructor(name) {
|
|
33
|
-
this.name = name;
|
|
34
|
-
this.graph = new DirectedGraph();
|
|
35
|
-
}
|
|
36
|
-
connect(to, from, relation) {
|
|
37
|
-
this.graph.mergeEdge(to, from, { type: relation });
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
exports.TesterantoGraphDirected = TesterantoGraphDirected;
|
|
41
|
-
class TesterantoGraphDirectedAcyclic {
|
|
42
|
-
constructor(name) {
|
|
43
|
-
this.name = name;
|
|
44
|
-
this.graph = new DirectedGraph();
|
|
45
|
-
}
|
|
46
|
-
connect(to, from, relation) {
|
|
47
|
-
this.graph.mergeEdge(to, from, { type: relation });
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
exports.TesterantoGraphDirectedAcyclic = TesterantoGraphDirectedAcyclic;
|
|
51
|
-
exports.default = {};
|
package/dist/common/Init.js
DELETED
|
@@ -1,30 +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
|
-
const fs_1 = __importDefault(require("fs"));
|
|
7
|
-
exports.default = async (partialConfig) => {
|
|
8
|
-
const config = Object.assign(Object.assign({}, partialConfig), { buildDir: process.cwd() + "/" + partialConfig.outdir });
|
|
9
|
-
fs_1.default.writeFileSync(`${config.outdir}/testeranto.json`, JSON.stringify(Object.assign(Object.assign({}, config), { buildDir: process.cwd() + "/" + config.outdir }), null, 2));
|
|
10
|
-
fs_1.default.copyFileSync("./node_modules/testeranto/dist/prebuild/TaskManFrontEnd.js", "./docs/TaskManFrontEnd.js");
|
|
11
|
-
fs_1.default.copyFileSync("./node_modules/testeranto/dist/prebuild/TaskManFrontEnd.css", "./docs/TaskManFrontEnd.css");
|
|
12
|
-
fs_1.default.writeFileSync(`${config.outdir}/index.html`, `<!DOCTYPE html>
|
|
13
|
-
<html lang="en">
|
|
14
|
-
|
|
15
|
-
<head>
|
|
16
|
-
<meta name="description" content="Webpage description goes here" />
|
|
17
|
-
<meta charset="utf-8" />
|
|
18
|
-
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
19
|
-
<meta name="author" content="" />
|
|
20
|
-
|
|
21
|
-
<title>TaskMan</title>
|
|
22
|
-
|
|
23
|
-
<link rel="stylesheet" href="/docs/TaskManFrontEnd.css" />
|
|
24
|
-
<script type="module" src="/docs/TaskManFrontEnd.js"></script>
|
|
25
|
-
</head>
|
|
26
|
-
|
|
27
|
-
<body><div id="root">react is loading</div></body>
|
|
28
|
-
|
|
29
|
-
</html>`);
|
|
30
|
-
};
|
package/dist/common/Reporter.js
DELETED
|
@@ -1,112 +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
|
-
const readline_1 = __importDefault(require("readline"));
|
|
7
|
-
const fs_1 = __importDefault(require("fs"));
|
|
8
|
-
const jsonc_1 = require("jsonc");
|
|
9
|
-
const puppeteer_core_1 = __importDefault(require("puppeteer-core"));
|
|
10
|
-
// import { PM_Main } from "./PM/main.js";
|
|
11
|
-
// var mode: "DEV" | "PROD" = process.argv[2] === "-dev" ? "DEV" : "PROD";
|
|
12
|
-
// const node2web: Record<string, string[]> = {};
|
|
13
|
-
// const web2node: Record<string, string[]> = {};
|
|
14
|
-
// const childProcesses: Record<string, "loaded" | "running" | "done"> = {};
|
|
15
|
-
readline_1.default.emitKeypressEvents(process.stdin);
|
|
16
|
-
if (process.stdin.isTTY)
|
|
17
|
-
process.stdin.setRawMode(true);
|
|
18
|
-
console.log("\n Puppeteer is running. Press 'q' to quit\n");
|
|
19
|
-
process.stdin.on("keypress", (str, key) => {
|
|
20
|
-
if (key.name === "q") {
|
|
21
|
-
process.exit();
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
const main = async () => {
|
|
25
|
-
const configs = jsonc_1.jsonc.parse((await fs_1.default.readFileSync("./docs/testeranto.json")).toString());
|
|
26
|
-
// const pm = new PM_Main(configs);
|
|
27
|
-
// await puppeteer.launch(options);
|
|
28
|
-
const browser = await puppeteer_core_1.default.launch({
|
|
29
|
-
waitForInitialPage: false,
|
|
30
|
-
executablePath: "/opt/homebrew/bin/chromium",
|
|
31
|
-
headless: false,
|
|
32
|
-
args: [
|
|
33
|
-
"--allow-file-access-from-files",
|
|
34
|
-
"--allow-running-insecure-content",
|
|
35
|
-
// "--auto-open-devtools-for-tabs",
|
|
36
|
-
"--disable-dev-shm-usage",
|
|
37
|
-
"--disable-extensions",
|
|
38
|
-
"--disable-gpu",
|
|
39
|
-
"--disable-setuid-sandbox",
|
|
40
|
-
"--disable-site-isolation-trials",
|
|
41
|
-
"--disable-web-security",
|
|
42
|
-
"--disable-web-security",
|
|
43
|
-
"--no-first-run",
|
|
44
|
-
"--no-sandbox",
|
|
45
|
-
"--no-startup-window",
|
|
46
|
-
"--no-zygote",
|
|
47
|
-
"--reduce-security-for-testing",
|
|
48
|
-
"--remote-allow-origins=*",
|
|
49
|
-
// "--remote-allow-origins=ws://localhost:3234",
|
|
50
|
-
"--unsafely-treat-insecure-origin-as-secure=*",
|
|
51
|
-
// "--disable-features=IsolateOrigins",
|
|
52
|
-
// "--single-process",
|
|
53
|
-
// "--unsafely-treat-insecure-origin-as-secure",
|
|
54
|
-
// "--unsafely-treat-insecure-origin-as-secure=ws://192.168.0.101:3234",
|
|
55
|
-
// `--remote-debugging-port=3234`,
|
|
56
|
-
],
|
|
57
|
-
}
|
|
58
|
-
// "."
|
|
59
|
-
);
|
|
60
|
-
console.log("Creating new page...");
|
|
61
|
-
const page = await browser.newPage();
|
|
62
|
-
await page.setViewport({ width: 0, height: 0 });
|
|
63
|
-
console.log("Requesting url...");
|
|
64
|
-
await page.goto(`file://${process.cwd()}/docs/report.html?local=true`);
|
|
65
|
-
// configs.tests.forEach(([test, runtime, secondaryArtifacts]) => {
|
|
66
|
-
// if (runtime === "node") {
|
|
67
|
-
// pm.launchNode(test, destinationOfRuntime(test, "node"));
|
|
68
|
-
// } else if (runtime === "web") {
|
|
69
|
-
// pm.launchWeb(test, destinationOfRuntime(test, "web"));
|
|
70
|
-
// } else {
|
|
71
|
-
// console.error("runtime makes no sense", runtime);
|
|
72
|
-
// }
|
|
73
|
-
// });
|
|
74
|
-
// console.log("ready and watching for changes...", configs.buildDir);
|
|
75
|
-
// fs.watch(
|
|
76
|
-
// configs.buildDir,
|
|
77
|
-
// {
|
|
78
|
-
// recursive: true,
|
|
79
|
-
// },
|
|
80
|
-
// (eventType, changedFile) => {
|
|
81
|
-
// if (changedFile) {
|
|
82
|
-
// configs.tests.forEach(([test, runtime, secondaryArtifacts]) => {
|
|
83
|
-
// if (eventType === "change" || eventType === "rename") {
|
|
84
|
-
// if (
|
|
85
|
-
// changedFile ===
|
|
86
|
-
// test
|
|
87
|
-
// .replace("./", "node/")
|
|
88
|
-
// .split(".")
|
|
89
|
-
// .slice(0, -1)
|
|
90
|
-
// .concat("mjs")
|
|
91
|
-
// .join(".")
|
|
92
|
-
// ) {
|
|
93
|
-
// pm.launchNode(test, destinationOfRuntime(test, "node"));
|
|
94
|
-
// }
|
|
95
|
-
// if (
|
|
96
|
-
// changedFile ===
|
|
97
|
-
// test
|
|
98
|
-
// .replace("./", "web/")
|
|
99
|
-
// .split(".")
|
|
100
|
-
// .slice(0, -1)
|
|
101
|
-
// .concat("mjs")
|
|
102
|
-
// .join(".")
|
|
103
|
-
// ) {
|
|
104
|
-
// pm.launchWeb(test, destinationOfRuntime(test, "web"));
|
|
105
|
-
// }
|
|
106
|
-
// }
|
|
107
|
-
// });
|
|
108
|
-
// }
|
|
109
|
-
// }
|
|
110
|
-
// );
|
|
111
|
-
};
|
|
112
|
-
main();
|
package/dist/common/Scheduler.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
@@ -1,167 +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
|
-
const express_1 = __importDefault(require("express"));
|
|
7
|
-
const mongodb_1 = require("mongodb");
|
|
8
|
-
const mongoose_1 = __importDefault(require("mongoose"));
|
|
9
|
-
const path_1 = __importDefault(require("path"));
|
|
10
|
-
const fs_1 = __importDefault(require("fs"));
|
|
11
|
-
const mongooseSchemas_1 = require("./mongooseSchemas");
|
|
12
|
-
console.log("hello TaskMan Backend", process.env);
|
|
13
|
-
const port = process.env.PORT || "8080";
|
|
14
|
-
const mongoConnect = process.env.MONGO_CONNECTION || "mongodb://127.0.0.1:27017";
|
|
15
|
-
function findTextFiles(dir, fileList = []) {
|
|
16
|
-
const files = fs_1.default.readdirSync(dir);
|
|
17
|
-
for (const file of files) {
|
|
18
|
-
const filePath = path_1.default.join(dir, file);
|
|
19
|
-
const fileStat = fs_1.default.statSync(filePath);
|
|
20
|
-
if (fileStat.isDirectory() && file !== "node_modules") {
|
|
21
|
-
findTextFiles(filePath, fileList); // Recursive call for subdirectories
|
|
22
|
-
}
|
|
23
|
-
else if (path_1.default.extname(file) === ".txt") {
|
|
24
|
-
fileList.push(filePath);
|
|
25
|
-
}
|
|
26
|
-
else if (path_1.default.extname(file) === ".md") {
|
|
27
|
-
fileList.push(filePath);
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
return fileList;
|
|
31
|
-
}
|
|
32
|
-
function listToTree(fileList) {
|
|
33
|
-
const root = {
|
|
34
|
-
name: "root",
|
|
35
|
-
children: [],
|
|
36
|
-
};
|
|
37
|
-
for (const path of fileList) {
|
|
38
|
-
const parts = path.split("/");
|
|
39
|
-
let current = root;
|
|
40
|
-
for (let i = 0; i < parts.length; i++) {
|
|
41
|
-
const part = parts[i];
|
|
42
|
-
if (!part)
|
|
43
|
-
continue; // Skip empty parts (e.g., from leading '/')
|
|
44
|
-
let child = current.children.find((c) => c.name === part);
|
|
45
|
-
if (!child) {
|
|
46
|
-
child = { name: part, children: [] };
|
|
47
|
-
current.children.push(child);
|
|
48
|
-
}
|
|
49
|
-
current = child;
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
return root.children;
|
|
53
|
-
}
|
|
54
|
-
exports.default = (partialConfig) => {
|
|
55
|
-
const config = Object.assign(Object.assign({}, partialConfig), { buildDir: process.cwd() + "/" + partialConfig.outdir });
|
|
56
|
-
fs_1.default.writeFileSync(`${config.outdir}/testeranto.json`, JSON.stringify(config, null, 2));
|
|
57
|
-
const app = (0, express_1.default)();
|
|
58
|
-
new mongodb_1.MongoClient(mongoConnect).connect().then(async (conn) => {
|
|
59
|
-
const db = conn.db("taskman");
|
|
60
|
-
await mongoose_1.default.connect(`${mongoConnect}/taskman`);
|
|
61
|
-
// await mongoose.connect(
|
|
62
|
-
// `mongodb://${process.env.MONGO_HOST || "127.0.0.1"}:27017/taskman`
|
|
63
|
-
// );
|
|
64
|
-
const usersModel = mongoose_1.default.model("User", mongooseSchemas_1.userSchema);
|
|
65
|
-
const kanbanModel = mongoose_1.default.model("Kanban", mongooseSchemas_1.kanbanSchema);
|
|
66
|
-
const ganttModel = mongoose_1.default.model("Gantt", mongooseSchemas_1.ganttSchema);
|
|
67
|
-
const featuresModel = mongoose_1.default.model("Features", mongooseSchemas_1.featuresSchema);
|
|
68
|
-
// const roomsModel = mongoose.model<any>("Rooms", RoomSchema);
|
|
69
|
-
// const huddleModdle = mongoose.model<any>("Huddles", HuddleSchema);
|
|
70
|
-
const MessagesModel = mongoose_1.default.model("Messages", mongooseSchemas_1.chatCatMessageSchema);
|
|
71
|
-
const ChatChannel = mongoose_1.default.model("ChatChannel", mongooseSchemas_1.channelsFeature);
|
|
72
|
-
const huddleModdle = ChatChannel.discriminator("Huddle", mongooseSchemas_1.HuddleSchema);
|
|
73
|
-
const roomsModel = ChatChannel.discriminator("Room", mongooseSchemas_1.RoomSchema);
|
|
74
|
-
app.get("/TaskManFrontend.js", (req, res) => {
|
|
75
|
-
res.sendFile(`${process.cwd()}/docs/TaskManFrontEnd.js`);
|
|
76
|
-
});
|
|
77
|
-
app.get("/TaskManFrontEnd.css", (req, res) => {
|
|
78
|
-
res.sendFile(`${process.cwd()}/docs/TaskManFrontEnd.css`);
|
|
79
|
-
});
|
|
80
|
-
// app.get(`/preMergeCheck`, async (req, res) => {
|
|
81
|
-
// const commit = req.params["commit"];
|
|
82
|
-
// // res.json(await keyedModels[key].find({}));
|
|
83
|
-
// });
|
|
84
|
-
// app.get("/TaskManFrontend.js", (req, res) => {
|
|
85
|
-
// res.sendFile(
|
|
86
|
-
// `${process.cwd()}/node_modules/testeranto/dist/prebuild/TaskManFrontEnd.js`
|
|
87
|
-
// );
|
|
88
|
-
// });
|
|
89
|
-
// app.get("/TaskManFrontEnd.css", (req, res) => {
|
|
90
|
-
// res.sendFile(
|
|
91
|
-
// `${process.cwd()}/node_modules/testeranto/dist/prebuild/TaskManFrontEnd.css`
|
|
92
|
-
// );
|
|
93
|
-
// });
|
|
94
|
-
// app.get("/testeranto.json", (req, res) => {
|
|
95
|
-
// // res.sendFile(`${process.cwd()}/docs/testeranto.json`);
|
|
96
|
-
// res.json(config);
|
|
97
|
-
// });
|
|
98
|
-
// app.get("/", (req, res) => {
|
|
99
|
-
// res.send(`<!DOCTYPE html>
|
|
100
|
-
// <html lang="en">
|
|
101
|
-
// <head>
|
|
102
|
-
// <meta name="description" content="Webpage description goes here" />
|
|
103
|
-
// <meta charset="utf-8" />
|
|
104
|
-
// <meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
105
|
-
// <meta name="author" content="" />
|
|
106
|
-
// <title>TaskMan</title>
|
|
107
|
-
// <link rel="stylesheet" href="/TaskManFrontEnd.css" />
|
|
108
|
-
// <script type="module" src="/TaskManFrontEnd.js"></script>
|
|
109
|
-
// </head>
|
|
110
|
-
// <body><div id="root">react is loading</div></body>
|
|
111
|
-
// </html>`);
|
|
112
|
-
// });
|
|
113
|
-
app.listen(port, () => {
|
|
114
|
-
console.log(`Example app listening on port ${port}`);
|
|
115
|
-
});
|
|
116
|
-
///////////////////////////////////////////////
|
|
117
|
-
const keyedModels = {
|
|
118
|
-
users: usersModel,
|
|
119
|
-
kanbans: kanbanModel,
|
|
120
|
-
features: featuresModel,
|
|
121
|
-
gantts: ganttModel,
|
|
122
|
-
rooms: roomsModel,
|
|
123
|
-
huddles: huddleModdle,
|
|
124
|
-
messages: MessagesModel,
|
|
125
|
-
};
|
|
126
|
-
Object.keys(keyedModels).forEach((key) => {
|
|
127
|
-
app.get(`/${key}.json`, async (req, res) => {
|
|
128
|
-
console.log("GET", key, keyedModels[key]);
|
|
129
|
-
res.json(await keyedModels[key].find({}));
|
|
130
|
-
});
|
|
131
|
-
app.get(`/${key}/:id.json`, async (req, res) => {
|
|
132
|
-
res.json(await keyedModels[key]
|
|
133
|
-
.find({ id: { $eq: req.params["id"] } })
|
|
134
|
-
.toArray());
|
|
135
|
-
});
|
|
136
|
-
app.post(`/${key}/:id.json`, async (req, res) => {
|
|
137
|
-
res.json(await keyedModels[key]
|
|
138
|
-
.find({ id: { $eq: req.params["id"] } })
|
|
139
|
-
.toArray());
|
|
140
|
-
});
|
|
141
|
-
app.post(`/${key}.json`, async (req, res) => {
|
|
142
|
-
res.json(await keyedModels[key]
|
|
143
|
-
.find({ id: { $eq: req.params["id"] } })
|
|
144
|
-
.toArray());
|
|
145
|
-
});
|
|
146
|
-
});
|
|
147
|
-
app.use("/", express_1.default.static(path_1.default.join(process.cwd())));
|
|
148
|
-
app.get("/docGal/fs.json", (req, res) => {
|
|
149
|
-
const directoryPath = "./"; // Replace with the desired directory path
|
|
150
|
-
// const textFiles = findTextFiles(directoryPath);
|
|
151
|
-
res.json(listToTree(findTextFiles(directoryPath)));
|
|
152
|
-
// res.send(`<!DOCTYPE html>
|
|
153
|
-
// <html lang="en">
|
|
154
|
-
// <head>
|
|
155
|
-
// <meta name="description" content="Webpage description goes here" />
|
|
156
|
-
// <meta charset="utf-8" />
|
|
157
|
-
// <meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
158
|
-
// <meta name="author" content="" />
|
|
159
|
-
// <title>TaskMan</title>
|
|
160
|
-
// <link rel="stylesheet" href="/TaskManFrontEnd.css" />
|
|
161
|
-
// <script type="module" src="/TaskManFrontEnd.js"></script>
|
|
162
|
-
// </head>
|
|
163
|
-
// <body><div id="root">react is loading</div></body>
|
|
164
|
-
// </html>`);
|
|
165
|
-
});
|
|
166
|
-
});
|
|
167
|
-
};
|