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
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.RoomSchema = exports.HuddleSchema = exports.chatCatMessageSchema = exports.channelsFeature = exports.featuresSchema = exports.ganttSchema = exports.kanbanSchema = exports.userSchema = void 0;
|
|
7
|
-
const mongoose_1 = __importDefault(require("mongoose"));
|
|
8
|
-
exports.userSchema = new mongoose_1.default.Schema({
|
|
9
|
-
email: String,
|
|
10
|
-
channels: [{ type: mongoose_1.default.Schema.Types.ObjectId, ref: "Channel" }],
|
|
11
|
-
dmgroups: [{ type: mongoose_1.default.Schema.Types.ObjectId, ref: "Dmgroup" }],
|
|
12
|
-
});
|
|
13
|
-
exports.userSchema.virtual("features", {
|
|
14
|
-
ref: "Feature",
|
|
15
|
-
localField: "_id",
|
|
16
|
-
foreignField: "owner",
|
|
17
|
-
});
|
|
18
|
-
exports.kanbanSchema = new mongoose_1.default.Schema({
|
|
19
|
-
title: String,
|
|
20
|
-
});
|
|
21
|
-
exports.ganttSchema = new mongoose_1.default.Schema({
|
|
22
|
-
name: String,
|
|
23
|
-
type: String,
|
|
24
|
-
start: Date,
|
|
25
|
-
end: Date,
|
|
26
|
-
});
|
|
27
|
-
exports.featuresSchema = new mongoose_1.default.Schema({
|
|
28
|
-
title: String,
|
|
29
|
-
state: String,
|
|
30
|
-
});
|
|
31
|
-
exports.channelsFeature = new mongoose_1.default.Schema({});
|
|
32
|
-
exports.chatCatMessageSchema = new mongoose_1.default.Schema({
|
|
33
|
-
user: {
|
|
34
|
-
type: mongoose_1.default.Schema.Types.ObjectId,
|
|
35
|
-
ref: "User",
|
|
36
|
-
required: true,
|
|
37
|
-
},
|
|
38
|
-
room: {
|
|
39
|
-
type: mongoose_1.default.Schema.Types.ObjectId,
|
|
40
|
-
ref: "ChatCatRoom",
|
|
41
|
-
required: true,
|
|
42
|
-
maxlength: 100,
|
|
43
|
-
},
|
|
44
|
-
timestamp: {
|
|
45
|
-
type: Date,
|
|
46
|
-
default: Date.now(),
|
|
47
|
-
},
|
|
48
|
-
text: {
|
|
49
|
-
type: String,
|
|
50
|
-
maxlength: 1000,
|
|
51
|
-
},
|
|
52
|
-
});
|
|
53
|
-
exports.HuddleSchema = new mongoose_1.default.Schema({});
|
|
54
|
-
exports.RoomSchema = new mongoose_1.default.Schema({
|
|
55
|
-
name: { type: String, required: true },
|
|
56
|
-
});
|
package/dist/common/preload.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// import puppeteer from "puppeteer-core";
|
|
3
|
-
// import { NodeWriter } from "./NodeWriter";
|
|
4
|
-
// import puppeteerConfiger from "./puppeteerConfiger";
|
|
5
|
-
// (window as any).NodeWriter = NodeWriter;
|
|
6
|
-
// (window as any).browser = new Promise(async (res, rej) => {
|
|
7
|
-
// const browser = await puppeteerConfiger("2999").then(async (json) => {
|
|
8
|
-
// const b = await puppeteer.connect({
|
|
9
|
-
// browserWSEndpoint: json.webSocketDebuggerUrl,
|
|
10
|
-
// defaultViewport: null,
|
|
11
|
-
// });
|
|
12
|
-
// console.log("connected!", b.isConnected());
|
|
13
|
-
// return res(b);
|
|
14
|
-
// });
|
|
15
|
-
// });
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.default = () => `
|
|
4
|
-
<!DOCTYPE html>
|
|
5
|
-
<html lang="en">
|
|
6
|
-
|
|
7
|
-
<head>
|
|
8
|
-
<meta name="description" content="Webpage description goes here" />
|
|
9
|
-
<meta charset="utf-8" />
|
|
10
|
-
<title>kokomoBay - testeranto</title>
|
|
11
|
-
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
12
|
-
<meta name="author" content="" />
|
|
13
|
-
|
|
14
|
-
<link rel="stylesheet" href="./Report.css">
|
|
15
|
-
|
|
16
|
-
<script type="importmap">
|
|
17
|
-
{
|
|
18
|
-
"imports": {
|
|
19
|
-
"features.test.js": "./features.test.js",
|
|
20
|
-
"testeranto.json": "./testeranto.json"
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
</script>
|
|
24
|
-
|
|
25
|
-
<script type="module" src="./Report.js"></script>
|
|
26
|
-
</head>
|
|
27
|
-
|
|
28
|
-
<body><div id="root">react is loading</div></body>
|
|
29
|
-
|
|
30
|
-
</html>
|
|
31
|
-
`;
|
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
import React, { useEffect, useState } from "react";
|
|
2
|
-
import Col from 'react-bootstrap/Col';
|
|
3
|
-
import Nav from 'react-bootstrap/Nav';
|
|
4
|
-
import Row from 'react-bootstrap/Row';
|
|
5
|
-
import Tab from 'react-bootstrap/Tab';
|
|
6
|
-
import Tabs from 'react-bootstrap/Tabs';
|
|
7
|
-
import 'bootstrap/dist/css/bootstrap.min.css';
|
|
8
|
-
const queryString = window.location.search;
|
|
9
|
-
// Create a URLSearchParams object
|
|
10
|
-
const urlParams = new URLSearchParams(queryString);
|
|
11
|
-
console.log("urlParams", urlParams.has("local"));
|
|
12
|
-
// Get the value of a specific parameter
|
|
13
|
-
const isLocal = urlParams.get("local");
|
|
14
|
-
const urlFixer = (url) => {
|
|
15
|
-
if (isLocal) {
|
|
16
|
-
return `file:///Users/adam/Code/kokomoBay/${url}`;
|
|
17
|
-
}
|
|
18
|
-
else {
|
|
19
|
-
return `https://chromapdx.github.io/kokomoBay/${url}`;
|
|
20
|
-
}
|
|
21
|
-
};
|
|
22
|
-
const TextTab = (props) => {
|
|
23
|
-
const [text, setText] = useState('');
|
|
24
|
-
useEffect(() => {
|
|
25
|
-
fetch(props.url) // Replace with your API endpoint
|
|
26
|
-
.then(response => response.text())
|
|
27
|
-
.then(data => setText(data))
|
|
28
|
-
.catch(error => console.error('Error fetching text:', error));
|
|
29
|
-
}, []);
|
|
30
|
-
return React.createElement("code", null,
|
|
31
|
-
React.createElement("pre", null, text));
|
|
32
|
-
};
|
|
33
|
-
export default () => {
|
|
34
|
-
return (React.createElement(Tab.Container, { id: "left-tabs-example5", defaultActiveKey: "examples-0" },
|
|
35
|
-
React.createElement(Row, null,
|
|
36
|
-
React.createElement(Col, { sm: 3, lg: 2 },
|
|
37
|
-
React.createElement(Nav, { variant: "pills", className: "flex-column" },
|
|
38
|
-
React.createElement(Nav.Link, { eventKey: `manual-example-rectangle` }, "RECTANGLE"),
|
|
39
|
-
React.createElement(Nav.Link, { eventKey: `manual-example-ClassicalComponent` }, "ClassicalComponent"),
|
|
40
|
-
React.createElement(Nav.Link, { eventKey: `manual-example-react+sol` }, "React and solidity"))),
|
|
41
|
-
React.createElement(Col, { sm: 3, lg: 2 },
|
|
42
|
-
React.createElement(Tab.Content, null,
|
|
43
|
-
React.createElement(Tab.Pane, { eventKey: `manual-example-rectangle`, key: `manual-example-rectangle` },
|
|
44
|
-
React.createElement("pre", null, "In this contrived example, we are testing the Rectangle class. Node that because it uses no web-specific, nor node-specific language features, it can be run in either runtime, thought it more efficient and reasonable to test in node.")),
|
|
45
|
-
React.createElement(Tab.Pane, { eventKey: `manual-example-ClassicalComponent`, key: `manual-example-ClassicalComponent` },
|
|
46
|
-
React.createElement("pre", null, "Testing a react component with the react-test-renderer package.")),
|
|
47
|
-
React.createElement(Tab.Pane, { eventKey: `manual-example-react+sol`, key: `manual-example-react+sol` },
|
|
48
|
-
React.createElement("pre", null, "Testing a react component which is backed by a solidity contract. This test is performed _on_ the server but but _through_ the browser. The react element is renderer into an chromium window and accessed by puppeteer.")))),
|
|
49
|
-
React.createElement(Col, null,
|
|
50
|
-
React.createElement(Tab.Content, null,
|
|
51
|
-
React.createElement(Tab.Pane, { eventKey: `manual-example-rectangle`, key: `manual-example-rectangle` },
|
|
52
|
-
React.createElement(Tabs, { defaultActiveKey: "profile", id: "uncontrolled-tab-example", className: "mb-3" },
|
|
53
|
-
React.createElement(Tab, { eventKey: "Rectangle.ts", title: "Rectangle.ts" },
|
|
54
|
-
React.createElement(TextTab, { url: urlFixer("src/Rectangle.ts") })),
|
|
55
|
-
React.createElement(Tab, { eventKey: "Rectangle.test.specification.ts", title: "Rectangle.test.specification.ts" },
|
|
56
|
-
React.createElement(TextTab, { url: urlFixer("src/Rectangle.test.specification.ts") })),
|
|
57
|
-
React.createElement(Tab, { eventKey: "Rectangle.test.shape.ts", title: "Rectangle.test.shape.ts" },
|
|
58
|
-
React.createElement(TextTab, { url: urlFixer("src/Rectangle.test.shape.ts") })),
|
|
59
|
-
React.createElement(Tab, { eventKey: "Rectangle.test.implementation.ts", title: "Rectangle.test.implementation.ts" },
|
|
60
|
-
React.createElement(TextTab, { url: urlFixer("src/Rectangle.test.implementation.ts") })),
|
|
61
|
-
React.createElement(Tab, { eventKey: "Rectangle.test.interface.ts", title: "Rectangle.test.interface.ts" },
|
|
62
|
-
React.createElement(TextTab, { url: urlFixer("src/Rectangle.test.interface.ts") })),
|
|
63
|
-
React.createElement(Tab, { eventKey: "Rectangle.config", title: "Rectangle.config" },
|
|
64
|
-
React.createElement("code", null,
|
|
65
|
-
React.createElement("pre", null, `
|
|
66
|
-
...
|
|
67
|
-
|
|
68
|
-
// Run the test in node
|
|
69
|
-
"./src/Rectangle/Rectangle.test.node.ts",
|
|
70
|
-
"node",
|
|
71
|
-
{ ports: 0 },
|
|
72
|
-
[],
|
|
73
|
-
],
|
|
74
|
-
|
|
75
|
-
// Run the same test in chromium too!
|
|
76
|
-
"./src/Rectangle/Rectangle.test.web.ts",
|
|
77
|
-
"web",
|
|
78
|
-
{ ports: 0 },
|
|
79
|
-
[],
|
|
80
|
-
],
|
|
81
|
-
|
|
82
|
-
...
|
|
83
|
-
`))))),
|
|
84
|
-
React.createElement(Tab.Pane, { eventKey: `manual-example-ClassicalComponent`, key: `manual-example-ClassicalComponent` },
|
|
85
|
-
React.createElement(Tabs, { defaultActiveKey: "profile", id: "uncontrolled-tab-example", className: "mb-3" },
|
|
86
|
-
React.createElement(Tab, { eventKey: "ClassicalComponent/index.tsx", title: "ClassicalComponent/index.tsx" },
|
|
87
|
-
React.createElement(TextTab, { url: urlFixer("src/ClassicalComponent/index.tsx") })),
|
|
88
|
-
React.createElement(Tab, { eventKey: "ClassicalComponent/test.specification.ts", title: "ClassicalComponent/test.specification.ts" },
|
|
89
|
-
React.createElement(TextTab, { url: urlFixer("src/ClassicalComponent/test.specification.ts") })),
|
|
90
|
-
React.createElement(Tab, { eventKey: "ClassicalComponent/test.shape.ts", title: "ClassicalComponent/test.shape.ts" },
|
|
91
|
-
React.createElement(TextTab, { url: urlFixer("src/ClassicalComponent/test.shape.ts") })),
|
|
92
|
-
React.createElement(Tab, { eventKey: "ClassicalComponent/react-test-renderer/test.implementation.ts", title: "ClassicalComponent/react-test-renderer/test.implementation.ts" },
|
|
93
|
-
React.createElement(TextTab, { url: urlFixer("src/ClassicalComponent/react-test-renderer/test.implementation.ts") })),
|
|
94
|
-
React.createElement(Tab, { eventKey: "react-test-renderer/test.interface.ts", title: "react-test-renderer/test.interface.ts" },
|
|
95
|
-
React.createElement(TextTab, { url: "https://raw.githubusercontent.com/adamwong246/testeranto/master/src/subPackages/react-test-renderer/component/interface.ts" })))),
|
|
96
|
-
React.createElement(Tab.Pane, { eventKey: `manual-example-react+sol`, key: `manual-example-react+sol` },
|
|
97
|
-
React.createElement(Tabs, { defaultActiveKey: "profile", id: "uncontrolled-tab-example", className: "mb-3" },
|
|
98
|
-
React.createElement(Tab, { eventKey: "contracts/MyBaseContract.sol", title: "MyBaseContract.sol" },
|
|
99
|
-
React.createElement(TextTab, { url: urlFixer("contracts/MyBaseContract.sol") })),
|
|
100
|
-
React.createElement(Tab, { eventKey: "src/MyFirstContractUI.tsx", title: "MyFirstContractUI.tsx" },
|
|
101
|
-
React.createElement(TextTab, { url: urlFixer("src/MyFirstContractUI.tsx") })),
|
|
102
|
-
React.createElement(Tab, { eventKey: "src/MyFirstContract.specification.test.ts", title: "MyFirstContract.specification.test.ts" },
|
|
103
|
-
React.createElement(TextTab, { url: urlFixer("src/MyFirstContract.specification.test.ts") })),
|
|
104
|
-
React.createElement(Tab, { eventKey: "src/MyFirstContract.solidity-react.interface.test.ts", title: "MyFirstContract.solidity-react.interface.test.ts" },
|
|
105
|
-
React.createElement(TextTab, { url: urlFixer("src/MyFirstContract.solidity-react.interface.test.ts") })),
|
|
106
|
-
React.createElement(Tab, { eventKey: "src/MyFirstContract.solidity-react.implementation.test.ts", title: "MyFirstContract.solidity-react.implementation.test.ts" },
|
|
107
|
-
React.createElement(TextTab, { url: urlFixer("src/MyFirstContract.solidity-react.implementation.test.ts") })),
|
|
108
|
-
React.createElement(Tab, { eventKey: "src/MyFirstContract.solidity-react.shape.test.ts", title: "MyFirstContract.solidity-react.shape.test.ts" },
|
|
109
|
-
React.createElement(TextTab, { url: urlFixer("src/MyFirstContract.solidity-react.shape.test.ts") })),
|
|
110
|
-
React.createElement(Tab, { eventKey: "MyFirstContract.solidity-react-example-jpg", title: "screenshot" },
|
|
111
|
-
React.createElement("img", { src: urlFixer("docs/node/src/MyFirstContract.solidity-react.testeranto/suite-0/given-test1/when/0/afterEach/andWhen.jpg") })))))))));
|
|
112
|
-
};
|
package/dist/module/Features.js
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import Graph from "graphology/dist/graphology.umd.js";
|
|
2
|
-
const { DirectedGraph, UndirectedGraph } = Graph;
|
|
3
|
-
class TesterantoGraph {
|
|
4
|
-
constructor(name) {
|
|
5
|
-
this.name = name;
|
|
6
|
-
}
|
|
7
|
-
}
|
|
8
|
-
export class BaseFeature {
|
|
9
|
-
constructor(name) {
|
|
10
|
-
this.name = name;
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
export class TesterantoGraphUndirected {
|
|
14
|
-
constructor(name) {
|
|
15
|
-
this.name = name;
|
|
16
|
-
this.graph = new UndirectedGraph();
|
|
17
|
-
}
|
|
18
|
-
connect(a, b, relation) {
|
|
19
|
-
this.graph.mergeEdge(a, b, { type: relation });
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
export class TesterantoGraphDirected {
|
|
23
|
-
constructor(name) {
|
|
24
|
-
this.name = name;
|
|
25
|
-
this.graph = new DirectedGraph();
|
|
26
|
-
}
|
|
27
|
-
connect(to, from, relation) {
|
|
28
|
-
this.graph.mergeEdge(to, from, { type: relation });
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
export class TesterantoGraphDirectedAcyclic {
|
|
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
|
-
export { DirectedGraph };
|
|
41
|
-
export default {};
|
package/dist/module/Init.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import fs from "fs";
|
|
2
|
-
export default async (partialConfig) => {
|
|
3
|
-
const config = Object.assign(Object.assign({}, partialConfig), { buildDir: process.cwd() + "/" + partialConfig.outdir });
|
|
4
|
-
fs.writeFileSync(`${config.outdir}/testeranto.json`, JSON.stringify(Object.assign(Object.assign({}, config), { buildDir: process.cwd() + "/" + config.outdir }), null, 2));
|
|
5
|
-
fs.copyFileSync("./node_modules/testeranto/dist/prebuild/TaskManFrontEnd.js", "./docs/TaskManFrontEnd.js");
|
|
6
|
-
fs.copyFileSync("./node_modules/testeranto/dist/prebuild/TaskManFrontEnd.css", "./docs/TaskManFrontEnd.css");
|
|
7
|
-
fs.writeFileSync(`${config.outdir}/index.html`, `<!DOCTYPE html>
|
|
8
|
-
<html lang="en">
|
|
9
|
-
|
|
10
|
-
<head>
|
|
11
|
-
<meta name="description" content="Webpage description goes here" />
|
|
12
|
-
<meta charset="utf-8" />
|
|
13
|
-
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
14
|
-
<meta name="author" content="" />
|
|
15
|
-
|
|
16
|
-
<title>TaskMan</title>
|
|
17
|
-
|
|
18
|
-
<link rel="stylesheet" href="/docs/TaskManFrontEnd.css" />
|
|
19
|
-
<script type="module" src="/docs/TaskManFrontEnd.js"></script>
|
|
20
|
-
</head>
|
|
21
|
-
|
|
22
|
-
<body><div id="root">react is loading</div></body>
|
|
23
|
-
|
|
24
|
-
</html>`);
|
|
25
|
-
};
|
package/dist/module/Reporter.js
DELETED
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
import readline from "readline";
|
|
2
|
-
import fs from "fs";
|
|
3
|
-
import { jsonc } from "jsonc";
|
|
4
|
-
import puppeteer from "puppeteer-core";
|
|
5
|
-
// import { PM_Main } from "./PM/main.js";
|
|
6
|
-
// var mode: "DEV" | "PROD" = process.argv[2] === "-dev" ? "DEV" : "PROD";
|
|
7
|
-
// const node2web: Record<string, string[]> = {};
|
|
8
|
-
// const web2node: Record<string, string[]> = {};
|
|
9
|
-
// const childProcesses: Record<string, "loaded" | "running" | "done"> = {};
|
|
10
|
-
readline.emitKeypressEvents(process.stdin);
|
|
11
|
-
if (process.stdin.isTTY)
|
|
12
|
-
process.stdin.setRawMode(true);
|
|
13
|
-
console.log("\n Puppeteer is running. Press 'q' to quit\n");
|
|
14
|
-
process.stdin.on("keypress", (str, key) => {
|
|
15
|
-
if (key.name === "q") {
|
|
16
|
-
process.exit();
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
|
-
const main = async () => {
|
|
20
|
-
const configs = jsonc.parse((await fs.readFileSync("./docs/testeranto.json")).toString());
|
|
21
|
-
// const pm = new PM_Main(configs);
|
|
22
|
-
// await puppeteer.launch(options);
|
|
23
|
-
const browser = await puppeteer.launch({
|
|
24
|
-
waitForInitialPage: false,
|
|
25
|
-
executablePath: "/opt/homebrew/bin/chromium",
|
|
26
|
-
headless: false,
|
|
27
|
-
args: [
|
|
28
|
-
"--allow-file-access-from-files",
|
|
29
|
-
"--allow-running-insecure-content",
|
|
30
|
-
// "--auto-open-devtools-for-tabs",
|
|
31
|
-
"--disable-dev-shm-usage",
|
|
32
|
-
"--disable-extensions",
|
|
33
|
-
"--disable-gpu",
|
|
34
|
-
"--disable-setuid-sandbox",
|
|
35
|
-
"--disable-site-isolation-trials",
|
|
36
|
-
"--disable-web-security",
|
|
37
|
-
"--disable-web-security",
|
|
38
|
-
"--no-first-run",
|
|
39
|
-
"--no-sandbox",
|
|
40
|
-
"--no-startup-window",
|
|
41
|
-
"--no-zygote",
|
|
42
|
-
"--reduce-security-for-testing",
|
|
43
|
-
"--remote-allow-origins=*",
|
|
44
|
-
// "--remote-allow-origins=ws://localhost:3234",
|
|
45
|
-
"--unsafely-treat-insecure-origin-as-secure=*",
|
|
46
|
-
// "--disable-features=IsolateOrigins",
|
|
47
|
-
// "--single-process",
|
|
48
|
-
// "--unsafely-treat-insecure-origin-as-secure",
|
|
49
|
-
// "--unsafely-treat-insecure-origin-as-secure=ws://192.168.0.101:3234",
|
|
50
|
-
// `--remote-debugging-port=3234`,
|
|
51
|
-
],
|
|
52
|
-
}
|
|
53
|
-
// "."
|
|
54
|
-
);
|
|
55
|
-
console.log("Creating new page...");
|
|
56
|
-
const page = await browser.newPage();
|
|
57
|
-
await page.setViewport({ width: 0, height: 0 });
|
|
58
|
-
console.log("Requesting url...");
|
|
59
|
-
await page.goto(`file://${process.cwd()}/docs/report.html?local=true`);
|
|
60
|
-
// configs.tests.forEach(([test, runtime, secondaryArtifacts]) => {
|
|
61
|
-
// if (runtime === "node") {
|
|
62
|
-
// pm.launchNode(test, destinationOfRuntime(test, "node"));
|
|
63
|
-
// } else if (runtime === "web") {
|
|
64
|
-
// pm.launchWeb(test, destinationOfRuntime(test, "web"));
|
|
65
|
-
// } else {
|
|
66
|
-
// console.error("runtime makes no sense", runtime);
|
|
67
|
-
// }
|
|
68
|
-
// });
|
|
69
|
-
// console.log("ready and watching for changes...", configs.buildDir);
|
|
70
|
-
// fs.watch(
|
|
71
|
-
// configs.buildDir,
|
|
72
|
-
// {
|
|
73
|
-
// recursive: true,
|
|
74
|
-
// },
|
|
75
|
-
// (eventType, changedFile) => {
|
|
76
|
-
// if (changedFile) {
|
|
77
|
-
// configs.tests.forEach(([test, runtime, secondaryArtifacts]) => {
|
|
78
|
-
// if (eventType === "change" || eventType === "rename") {
|
|
79
|
-
// if (
|
|
80
|
-
// changedFile ===
|
|
81
|
-
// test
|
|
82
|
-
// .replace("./", "node/")
|
|
83
|
-
// .split(".")
|
|
84
|
-
// .slice(0, -1)
|
|
85
|
-
// .concat("mjs")
|
|
86
|
-
// .join(".")
|
|
87
|
-
// ) {
|
|
88
|
-
// pm.launchNode(test, destinationOfRuntime(test, "node"));
|
|
89
|
-
// }
|
|
90
|
-
// if (
|
|
91
|
-
// changedFile ===
|
|
92
|
-
// test
|
|
93
|
-
// .replace("./", "web/")
|
|
94
|
-
// .split(".")
|
|
95
|
-
// .slice(0, -1)
|
|
96
|
-
// .concat("mjs")
|
|
97
|
-
// .join(".")
|
|
98
|
-
// ) {
|
|
99
|
-
// pm.launchWeb(test, destinationOfRuntime(test, "web"));
|
|
100
|
-
// }
|
|
101
|
-
// }
|
|
102
|
-
// });
|
|
103
|
-
// }
|
|
104
|
-
// }
|
|
105
|
-
// );
|
|
106
|
-
};
|
|
107
|
-
main();
|
package/dist/module/Scheduler.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import renderer, { act } from "react-test-renderer";
|
|
3
|
-
export const testInterface = {
|
|
4
|
-
butThen: async function (s, thenCB, tr) {
|
|
5
|
-
console.log("butThen", thenCB.toString());
|
|
6
|
-
return thenCB(s);
|
|
7
|
-
},
|
|
8
|
-
beforeEach: function (CComponent, props) {
|
|
9
|
-
let component;
|
|
10
|
-
act(() => {
|
|
11
|
-
component = renderer.create(React.createElement(CComponent, props, []));
|
|
12
|
-
});
|
|
13
|
-
return component;
|
|
14
|
-
},
|
|
15
|
-
andWhen: async function (renderer, whenCB) {
|
|
16
|
-
await act(() => whenCB(renderer));
|
|
17
|
-
return renderer;
|
|
18
|
-
},
|
|
19
|
-
};
|
|
@@ -1,162 +0,0 @@
|
|
|
1
|
-
import express from "express";
|
|
2
|
-
import { MongoClient } from "mongodb";
|
|
3
|
-
import mongoose from "mongoose";
|
|
4
|
-
import path from "path";
|
|
5
|
-
import fs from "fs";
|
|
6
|
-
import { ganttSchema, kanbanSchema, userSchema, featuresSchema, RoomSchema, HuddleSchema, channelsFeature, chatCatMessageSchema, } from "./mongooseSchemas";
|
|
7
|
-
console.log("hello TaskMan Backend", process.env);
|
|
8
|
-
const port = process.env.PORT || "8080";
|
|
9
|
-
const mongoConnect = process.env.MONGO_CONNECTION || "mongodb://127.0.0.1:27017";
|
|
10
|
-
function findTextFiles(dir, fileList = []) {
|
|
11
|
-
const files = fs.readdirSync(dir);
|
|
12
|
-
for (const file of files) {
|
|
13
|
-
const filePath = path.join(dir, file);
|
|
14
|
-
const fileStat = fs.statSync(filePath);
|
|
15
|
-
if (fileStat.isDirectory() && file !== "node_modules") {
|
|
16
|
-
findTextFiles(filePath, fileList); // Recursive call for subdirectories
|
|
17
|
-
}
|
|
18
|
-
else if (path.extname(file) === ".txt") {
|
|
19
|
-
fileList.push(filePath);
|
|
20
|
-
}
|
|
21
|
-
else if (path.extname(file) === ".md") {
|
|
22
|
-
fileList.push(filePath);
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
return fileList;
|
|
26
|
-
}
|
|
27
|
-
function listToTree(fileList) {
|
|
28
|
-
const root = {
|
|
29
|
-
name: "root",
|
|
30
|
-
children: [],
|
|
31
|
-
};
|
|
32
|
-
for (const path of fileList) {
|
|
33
|
-
const parts = path.split("/");
|
|
34
|
-
let current = root;
|
|
35
|
-
for (let i = 0; i < parts.length; i++) {
|
|
36
|
-
const part = parts[i];
|
|
37
|
-
if (!part)
|
|
38
|
-
continue; // Skip empty parts (e.g., from leading '/')
|
|
39
|
-
let child = current.children.find((c) => c.name === part);
|
|
40
|
-
if (!child) {
|
|
41
|
-
child = { name: part, children: [] };
|
|
42
|
-
current.children.push(child);
|
|
43
|
-
}
|
|
44
|
-
current = child;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
return root.children;
|
|
48
|
-
}
|
|
49
|
-
export default (partialConfig) => {
|
|
50
|
-
const config = Object.assign(Object.assign({}, partialConfig), { buildDir: process.cwd() + "/" + partialConfig.outdir });
|
|
51
|
-
fs.writeFileSync(`${config.outdir}/testeranto.json`, JSON.stringify(config, null, 2));
|
|
52
|
-
const app = express();
|
|
53
|
-
new MongoClient(mongoConnect).connect().then(async (conn) => {
|
|
54
|
-
const db = conn.db("taskman");
|
|
55
|
-
await mongoose.connect(`${mongoConnect}/taskman`);
|
|
56
|
-
// await mongoose.connect(
|
|
57
|
-
// `mongodb://${process.env.MONGO_HOST || "127.0.0.1"}:27017/taskman`
|
|
58
|
-
// );
|
|
59
|
-
const usersModel = mongoose.model("User", userSchema);
|
|
60
|
-
const kanbanModel = mongoose.model("Kanban", kanbanSchema);
|
|
61
|
-
const ganttModel = mongoose.model("Gantt", ganttSchema);
|
|
62
|
-
const featuresModel = mongoose.model("Features", featuresSchema);
|
|
63
|
-
// const roomsModel = mongoose.model<any>("Rooms", RoomSchema);
|
|
64
|
-
// const huddleModdle = mongoose.model<any>("Huddles", HuddleSchema);
|
|
65
|
-
const MessagesModel = mongoose.model("Messages", chatCatMessageSchema);
|
|
66
|
-
const ChatChannel = mongoose.model("ChatChannel", channelsFeature);
|
|
67
|
-
const huddleModdle = ChatChannel.discriminator("Huddle", HuddleSchema);
|
|
68
|
-
const roomsModel = ChatChannel.discriminator("Room", RoomSchema);
|
|
69
|
-
app.get("/TaskManFrontend.js", (req, res) => {
|
|
70
|
-
res.sendFile(`${process.cwd()}/docs/TaskManFrontEnd.js`);
|
|
71
|
-
});
|
|
72
|
-
app.get("/TaskManFrontEnd.css", (req, res) => {
|
|
73
|
-
res.sendFile(`${process.cwd()}/docs/TaskManFrontEnd.css`);
|
|
74
|
-
});
|
|
75
|
-
// app.get(`/preMergeCheck`, async (req, res) => {
|
|
76
|
-
// const commit = req.params["commit"];
|
|
77
|
-
// // res.json(await keyedModels[key].find({}));
|
|
78
|
-
// });
|
|
79
|
-
// app.get("/TaskManFrontend.js", (req, res) => {
|
|
80
|
-
// res.sendFile(
|
|
81
|
-
// `${process.cwd()}/node_modules/testeranto/dist/prebuild/TaskManFrontEnd.js`
|
|
82
|
-
// );
|
|
83
|
-
// });
|
|
84
|
-
// app.get("/TaskManFrontEnd.css", (req, res) => {
|
|
85
|
-
// res.sendFile(
|
|
86
|
-
// `${process.cwd()}/node_modules/testeranto/dist/prebuild/TaskManFrontEnd.css`
|
|
87
|
-
// );
|
|
88
|
-
// });
|
|
89
|
-
// app.get("/testeranto.json", (req, res) => {
|
|
90
|
-
// // res.sendFile(`${process.cwd()}/docs/testeranto.json`);
|
|
91
|
-
// res.json(config);
|
|
92
|
-
// });
|
|
93
|
-
// app.get("/", (req, res) => {
|
|
94
|
-
// res.send(`<!DOCTYPE html>
|
|
95
|
-
// <html lang="en">
|
|
96
|
-
// <head>
|
|
97
|
-
// <meta name="description" content="Webpage description goes here" />
|
|
98
|
-
// <meta charset="utf-8" />
|
|
99
|
-
// <meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
100
|
-
// <meta name="author" content="" />
|
|
101
|
-
// <title>TaskMan</title>
|
|
102
|
-
// <link rel="stylesheet" href="/TaskManFrontEnd.css" />
|
|
103
|
-
// <script type="module" src="/TaskManFrontEnd.js"></script>
|
|
104
|
-
// </head>
|
|
105
|
-
// <body><div id="root">react is loading</div></body>
|
|
106
|
-
// </html>`);
|
|
107
|
-
// });
|
|
108
|
-
app.listen(port, () => {
|
|
109
|
-
console.log(`Example app listening on port ${port}`);
|
|
110
|
-
});
|
|
111
|
-
///////////////////////////////////////////////
|
|
112
|
-
const keyedModels = {
|
|
113
|
-
users: usersModel,
|
|
114
|
-
kanbans: kanbanModel,
|
|
115
|
-
features: featuresModel,
|
|
116
|
-
gantts: ganttModel,
|
|
117
|
-
rooms: roomsModel,
|
|
118
|
-
huddles: huddleModdle,
|
|
119
|
-
messages: MessagesModel,
|
|
120
|
-
};
|
|
121
|
-
Object.keys(keyedModels).forEach((key) => {
|
|
122
|
-
app.get(`/${key}.json`, async (req, res) => {
|
|
123
|
-
console.log("GET", key, keyedModels[key]);
|
|
124
|
-
res.json(await keyedModels[key].find({}));
|
|
125
|
-
});
|
|
126
|
-
app.get(`/${key}/:id.json`, async (req, res) => {
|
|
127
|
-
res.json(await keyedModels[key]
|
|
128
|
-
.find({ id: { $eq: req.params["id"] } })
|
|
129
|
-
.toArray());
|
|
130
|
-
});
|
|
131
|
-
app.post(`/${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}.json`, async (req, res) => {
|
|
137
|
-
res.json(await keyedModels[key]
|
|
138
|
-
.find({ id: { $eq: req.params["id"] } })
|
|
139
|
-
.toArray());
|
|
140
|
-
});
|
|
141
|
-
});
|
|
142
|
-
app.use("/", express.static(path.join(process.cwd())));
|
|
143
|
-
app.get("/docGal/fs.json", (req, res) => {
|
|
144
|
-
const directoryPath = "./"; // Replace with the desired directory path
|
|
145
|
-
// const textFiles = findTextFiles(directoryPath);
|
|
146
|
-
res.json(listToTree(findTextFiles(directoryPath)));
|
|
147
|
-
// res.send(`<!DOCTYPE html>
|
|
148
|
-
// <html lang="en">
|
|
149
|
-
// <head>
|
|
150
|
-
// <meta name="description" content="Webpage description goes here" />
|
|
151
|
-
// <meta charset="utf-8" />
|
|
152
|
-
// <meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
153
|
-
// <meta name="author" content="" />
|
|
154
|
-
// <title>TaskMan</title>
|
|
155
|
-
// <link rel="stylesheet" href="/TaskManFrontEnd.css" />
|
|
156
|
-
// <script type="module" src="/TaskManFrontEnd.js"></script>
|
|
157
|
-
// </head>
|
|
158
|
-
// <body><div id="root">react is loading</div></body>
|
|
159
|
-
// </html>`);
|
|
160
|
-
});
|
|
161
|
-
});
|
|
162
|
-
};
|