testeranto 0.75.0 → 0.79.3
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/README.md +25 -24
- package/devBot.dockerfile +12 -0
- package/dist/common/Node.js +1 -0
- package/dist/common/PM/index.js +0 -64
- package/dist/common/PM/main.js +278 -7
- package/dist/common/PM/node.js +4 -0
- package/dist/common/PM/web.js +3 -0
- package/dist/common/Project.js +6 -2
- package/dist/common/Puppeteer.js +12 -17
- package/dist/common/Reporter.js +1 -8
- package/dist/common/SubPackages/react-dom/component/web.js +5 -25
- package/dist/common/SubPackages/react-dom/jsx/web.js +80 -55
- package/dist/common/SubPackages/react-test-renderer/component/index.js +0 -86
- package/dist/common/SubPackages/react-test-renderer/component/interface.js +68 -0
- package/dist/common/SubPackages/react-test-renderer/component/node.js +2 -2
- package/dist/common/SubPackages/react-test-renderer/component/web.js +2 -2
- package/dist/common/TaskManBackEnd.js +156 -0
- package/dist/common/Types.js +0 -2
- package/dist/common/esbuildConfigs/index.js +1 -0
- package/dist/common/esbuildConfigs/inputFilesPlugin.js +49 -0
- package/dist/common/esbuildConfigs/node.js +3 -1
- package/dist/common/esbuildConfigs/web.js +3 -1
- package/dist/common/lib/abstractBase.js +222 -17
- package/dist/common/lib/basebuilder.js +4 -38
- package/dist/common/lib/classBuilder.js +1 -3
- package/dist/common/lib/core.js +3 -5
- package/dist/common/mongooseSchemas.js +56 -0
- package/dist/common/tsconfig.common.tsbuildinfo +1 -1
- package/dist/common/utils.js +16 -0
- package/dist/module/ExampleTab.js +112 -0
- package/dist/module/Node.js +1 -0
- package/dist/module/PM/index.js +0 -64
- package/dist/module/PM/main.js +278 -7
- package/dist/module/PM/node.js +4 -0
- package/dist/module/PM/web.js +3 -0
- package/dist/module/Project.js +6 -2
- package/dist/module/Puppeteer.js +12 -17
- package/dist/module/Reporter.js +1 -8
- package/dist/module/SubPackages/react-dom/component/web.js +5 -25
- package/dist/module/SubPackages/react-dom/jsx/web.js +80 -55
- package/dist/module/SubPackages/react-test-renderer/component/index.js +1 -59
- package/dist/module/SubPackages/react-test-renderer/component/interface.js +39 -0
- package/dist/module/SubPackages/react-test-renderer/component/node.js +1 -1
- package/dist/module/SubPackages/react-test-renderer/component/web.js +1 -1
- package/dist/module/TaskManBackEnd.js +151 -0
- package/dist/module/TaskManFrontEnd.js +600 -0
- package/dist/module/Types.js +0 -2
- package/dist/module/esbuildConfigs/index.js +1 -0
- package/dist/module/esbuildConfigs/inputFilesPlugin.js +44 -0
- package/dist/module/esbuildConfigs/node.js +3 -1
- package/dist/module/esbuildConfigs/web.js +3 -1
- package/dist/module/lib/abstractBase.js +222 -17
- package/dist/module/lib/basebuilder.js +4 -38
- package/dist/module/lib/classBuilder.js +1 -3
- package/dist/module/lib/core.js +3 -5
- package/dist/module/mongooseSchemas.js +50 -0
- package/dist/module/tsconfig.module.tsbuildinfo +1 -1
- package/dist/module/utils.js +9 -0
- package/dist/prebuild/Report.js +117 -36
- package/dist/prebuild/TaskManBackEnd.mjs +185 -0
- package/dist/prebuild/TaskManFrontEnd.css +12301 -0
- package/dist/prebuild/TaskManFrontEnd.js +81737 -0
- package/dist/types/Node.d.ts +1 -1
- package/dist/types/PM/index.d.ts +2 -1
- package/dist/types/PM/main.d.ts +6 -3
- package/dist/types/PM/node.d.ts +2 -0
- package/dist/types/PM/web.d.ts +1 -0
- package/dist/types/SubPackages/puppeteer.d.ts +1 -1
- package/dist/types/SubPackages/react/component/node.d.ts +1 -1
- package/dist/types/SubPackages/react/component/web.d.ts +1 -1
- package/dist/types/SubPackages/react/jsx/node.d.ts +2 -2
- package/dist/types/SubPackages/react/jsx/web.d.ts +2 -2
- package/dist/types/SubPackages/react-dom/component/node.d.ts +2 -2
- package/dist/types/SubPackages/react-dom/component/web.d.ts +8 -2
- package/dist/types/SubPackages/react-dom/jsx/node.d.ts +2 -2
- package/dist/types/SubPackages/react-dom/jsx/web.d.ts +2 -2
- package/dist/types/SubPackages/react-test-renderer/MemoExoticComponent/node.d.ts +2 -2
- package/dist/types/SubPackages/react-test-renderer/component/index.d.ts +0 -7
- package/dist/types/SubPackages/react-test-renderer/component/interface.d.ts +9 -0
- package/dist/types/SubPackages/react-test-renderer/component/node.d.ts +1 -2
- package/dist/types/SubPackages/react-test-renderer/component/web.d.ts +1 -2
- package/dist/types/SubPackages/react-test-renderer/fc/node.d.ts +1 -1
- package/dist/types/SubPackages/react-test-renderer/fc/web.d.ts +1 -1
- package/dist/types/SubPackages/react-test-renderer/jsx/node.d.ts +1 -2
- package/dist/types/SubPackages/react-test-renderer/jsx/web.d.ts +1 -2
- package/dist/types/SubPackages/react-test-renderer/jsx-promised/node.d.ts +1 -2
- package/dist/types/SubPackages/react-test-renderer/jsx-promised/web.d.ts +1 -2
- package/dist/types/TaskManBackEnd.d.ts +1 -0
- package/dist/types/Types.d.ts +19 -19
- package/dist/types/Web.d.ts +1 -1
- package/dist/types/esbuildConfigs/inputFilesPlugin.d.ts +5 -0
- package/dist/types/lib/abstractBase.d.ts +8 -8
- package/dist/types/lib/basebuilder.d.ts +1 -1
- package/dist/types/lib/classBuilder.d.ts +1 -1
- package/dist/types/lib/core.d.ts +1 -1
- package/dist/types/lib/index.d.ts +5 -5
- package/dist/types/lib/types.d.ts +15 -13
- package/dist/types/mongooseSchemas.d.ts +124 -0
- package/dist/types/tsconfig.types.tsbuildinfo +1 -1
- package/dist/types/utils.d.ts +2 -0
- package/docker-compose-dev.yml +9 -0
- package/docker-compose-prod.yml +18 -0
- package/package.json +20 -7
- package/src/ExampleTab.tsx +219 -0
- package/src/Node.ts +31 -2
- package/src/PM/index.ts +6 -83
- package/src/PM/main.ts +389 -11
- package/src/PM/node.ts +6 -0
- package/src/PM/web.ts +4 -0
- package/src/Project.ts +10 -2
- package/src/Puppeteer.ts +16 -17
- package/src/Report.tsx +17 -40
- package/src/Reporter.ts +1 -9
- package/src/SubPackages/react-dom/component/web.ts +10 -30
- package/src/SubPackages/react-dom/jsx/web.ts +111 -74
- package/src/SubPackages/react-test-renderer/component/index.ts +0 -66
- package/src/SubPackages/react-test-renderer/component/interface.ts +48 -0
- package/src/SubPackages/react-test-renderer/component/node.ts +2 -1
- package/src/SubPackages/react-test-renderer/component/web.ts +2 -1
- package/src/TaskManBackEnd.ts +200 -0
- package/src/TaskManFrontEnd.tsx +1222 -0
- package/src/Types.ts +136 -28
- package/src/Web.ts +32 -2
- package/src/esbuildConfigs/index.ts +1 -0
- package/src/esbuildConfigs/inputFilesPlugin.ts +65 -0
- package/src/esbuildConfigs/node.ts +3 -1
- package/src/esbuildConfigs/web.ts +4 -0
- package/src/lib/abstractBase.ts +337 -34
- package/src/lib/basebuilder.ts +17 -52
- package/src/lib/classBuilder.ts +14 -2
- package/src/lib/core.ts +18 -7
- package/src/lib/index.ts +115 -7
- package/src/lib/types.ts +143 -35
- package/src/mongooseSchemas.ts +105 -0
- package/src/utils.ts +15 -0
- package/yarn-error.log +3144 -0
|
@@ -0,0 +1,200 @@
|
|
|
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 {
|
|
7
|
+
ganttSchema,
|
|
8
|
+
IKanban,
|
|
9
|
+
IUser,
|
|
10
|
+
kanbanSchema,
|
|
11
|
+
userSchema,
|
|
12
|
+
featuresSchema,
|
|
13
|
+
IGantt,
|
|
14
|
+
RoomSchema,
|
|
15
|
+
HuddleSchema,
|
|
16
|
+
IChatChannel,
|
|
17
|
+
channelsFeature,
|
|
18
|
+
chatCatMessageSchema,
|
|
19
|
+
} from "./mongooseSchemas";
|
|
20
|
+
|
|
21
|
+
// export const chatChannel = new mongoose.Schema<IChatChannel>({
|
|
22
|
+
// // name: { type: String, required: true },
|
|
23
|
+
// users: [
|
|
24
|
+
// {
|
|
25
|
+
// type: mongoose.Schema.Types.ObjectId,
|
|
26
|
+
// ref: "User",
|
|
27
|
+
// required: true,
|
|
28
|
+
// },
|
|
29
|
+
// ],
|
|
30
|
+
// });
|
|
31
|
+
|
|
32
|
+
const app = express();
|
|
33
|
+
const port = 3000;
|
|
34
|
+
|
|
35
|
+
function findTextFiles(dir: string, fileList: string[] = []) {
|
|
36
|
+
const files = fs.readdirSync(dir);
|
|
37
|
+
|
|
38
|
+
for (const file of files) {
|
|
39
|
+
const filePath = path.join(dir, file);
|
|
40
|
+
const fileStat = fs.statSync(filePath);
|
|
41
|
+
|
|
42
|
+
if (fileStat.isDirectory() && file !== "node_modules") {
|
|
43
|
+
findTextFiles(filePath, fileList); // Recursive call for subdirectories
|
|
44
|
+
} else if (path.extname(file) === ".txt") {
|
|
45
|
+
fileList.push(filePath);
|
|
46
|
+
} else if (path.extname(file) === ".md") {
|
|
47
|
+
fileList.push(filePath);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
return fileList;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
function listToTree(fileList) {
|
|
54
|
+
const root: { name: string; children: any[] } = {
|
|
55
|
+
name: "root",
|
|
56
|
+
children: [],
|
|
57
|
+
};
|
|
58
|
+
for (const path of fileList) {
|
|
59
|
+
const parts = path.split("/");
|
|
60
|
+
let current = root;
|
|
61
|
+
for (let i = 0; i < parts.length; i++) {
|
|
62
|
+
const part = parts[i];
|
|
63
|
+
if (!part) continue; // Skip empty parts (e.g., from leading '/')
|
|
64
|
+
let child = current.children.find((c) => c.name === part);
|
|
65
|
+
if (!child) {
|
|
66
|
+
child = { name: part, children: [] };
|
|
67
|
+
current.children.push(child);
|
|
68
|
+
}
|
|
69
|
+
current = child;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
return root.children;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
new MongoClient(`mongodb://localhost:27017`).connect().then(async (conn) => {
|
|
76
|
+
const db = conn.db("taskman");
|
|
77
|
+
await mongoose.connect("mongodb://127.0.0.1:27017/taskman");
|
|
78
|
+
|
|
79
|
+
const usersModel = mongoose.model<IUser>("User", userSchema);
|
|
80
|
+
const kanbanModel = mongoose.model<IKanban>("Kanban", kanbanSchema);
|
|
81
|
+
const ganttModel = mongoose.model<IGantt>("Gantt", ganttSchema);
|
|
82
|
+
const featuresModel = mongoose.model<any>("Features", featuresSchema);
|
|
83
|
+
// const roomsModel = mongoose.model<any>("Rooms", RoomSchema);
|
|
84
|
+
// const huddleModdle = mongoose.model<any>("Huddles", HuddleSchema);
|
|
85
|
+
|
|
86
|
+
const MessagesModel = mongoose.model<any>("Messages", chatCatMessageSchema);
|
|
87
|
+
|
|
88
|
+
const ChatChannel = mongoose.model("ChatChannel", channelsFeature);
|
|
89
|
+
const huddleModdle = ChatChannel.discriminator("Huddle", HuddleSchema);
|
|
90
|
+
const roomsModel = ChatChannel.discriminator("Room", RoomSchema);
|
|
91
|
+
|
|
92
|
+
app.get(`/preMergeCheck`, async (req, res) => {
|
|
93
|
+
const commit = req.params["commit"];
|
|
94
|
+
// res.json(await keyedModels[key].find({}));
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
app.get("/TaskManFrontend.js", (req, res) => {
|
|
98
|
+
res.sendFile(
|
|
99
|
+
`${process.cwd()}/node_modules/testeranto/dist/prebuild/TaskManFrontEnd.js`
|
|
100
|
+
);
|
|
101
|
+
});
|
|
102
|
+
|
|
103
|
+
app.get("/TaskManFrontEnd.css", (req, res) => {
|
|
104
|
+
res.sendFile(
|
|
105
|
+
`${process.cwd()}/node_modules/testeranto/dist/prebuild/TaskManFrontEnd.css`
|
|
106
|
+
);
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
app.get("/testeranto.json", (req, res) => {
|
|
110
|
+
res.sendFile(`${process.cwd()}/docs/testeranto.json`);
|
|
111
|
+
});
|
|
112
|
+
|
|
113
|
+
app.get("/", (req, res) => {
|
|
114
|
+
res.send(`<!DOCTYPE html>
|
|
115
|
+
<html lang="en">
|
|
116
|
+
|
|
117
|
+
<head>
|
|
118
|
+
<meta name="description" content="Webpage description goes here" />
|
|
119
|
+
<meta charset="utf-8" />
|
|
120
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
121
|
+
<meta name="author" content="" />
|
|
122
|
+
|
|
123
|
+
<title>TaskMan</title>
|
|
124
|
+
|
|
125
|
+
<link rel="stylesheet" href="/TaskManFrontEnd.css" />
|
|
126
|
+
<script type="module" src="/TaskManFrontEnd.js"></script>
|
|
127
|
+
</head>
|
|
128
|
+
|
|
129
|
+
<body><div id="root">react is loading</div></body>
|
|
130
|
+
|
|
131
|
+
</html>`);
|
|
132
|
+
});
|
|
133
|
+
|
|
134
|
+
app.listen(port, () => {
|
|
135
|
+
console.log(`Example app listening on port ${port}`);
|
|
136
|
+
});
|
|
137
|
+
|
|
138
|
+
///////////////////////////////////////////////
|
|
139
|
+
|
|
140
|
+
const keyedModels = {
|
|
141
|
+
users: usersModel,
|
|
142
|
+
kanbans: kanbanModel,
|
|
143
|
+
features: featuresModel,
|
|
144
|
+
gantts: ganttModel,
|
|
145
|
+
rooms: roomsModel,
|
|
146
|
+
huddles: huddleModdle,
|
|
147
|
+
messages: MessagesModel,
|
|
148
|
+
};
|
|
149
|
+
|
|
150
|
+
Object.keys(keyedModels).forEach((key) => {
|
|
151
|
+
app.get(`/${key}.json`, async (req, res) => {
|
|
152
|
+
console.log("GET", key, keyedModels[key]);
|
|
153
|
+
res.json(await keyedModels[key].find({}));
|
|
154
|
+
});
|
|
155
|
+
|
|
156
|
+
app.get(`/${key}/:id.json`, async (req, res) => {
|
|
157
|
+
res.json(
|
|
158
|
+
await keyedModels[key].find({ id: { $eq: req.params["id"] } }).toArray()
|
|
159
|
+
);
|
|
160
|
+
});
|
|
161
|
+
|
|
162
|
+
app.post(`/${key}/:id.json`, async (req, res) => {
|
|
163
|
+
res.json(
|
|
164
|
+
await keyedModels[key].find({ id: { $eq: req.params["id"] } }).toArray()
|
|
165
|
+
);
|
|
166
|
+
});
|
|
167
|
+
|
|
168
|
+
app.post(`/${key}.json`, async (req, res) => {
|
|
169
|
+
res.json(
|
|
170
|
+
await keyedModels[key].find({ id: { $eq: req.params["id"] } }).toArray()
|
|
171
|
+
);
|
|
172
|
+
});
|
|
173
|
+
});
|
|
174
|
+
|
|
175
|
+
app.use("/docs", express.static(path.join(process.cwd(), "docs")));
|
|
176
|
+
|
|
177
|
+
app.get("/docGal/fs.json", (req, res) => {
|
|
178
|
+
const directoryPath = "./"; // Replace with the desired directory path
|
|
179
|
+
// const textFiles = findTextFiles(directoryPath);
|
|
180
|
+
res.json(listToTree(findTextFiles(directoryPath)));
|
|
181
|
+
// res.send(`<!DOCTYPE html>
|
|
182
|
+
// <html lang="en">
|
|
183
|
+
|
|
184
|
+
// <head>
|
|
185
|
+
// <meta name="description" content="Webpage description goes here" />
|
|
186
|
+
// <meta charset="utf-8" />
|
|
187
|
+
// <meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
188
|
+
// <meta name="author" content="" />
|
|
189
|
+
|
|
190
|
+
// <title>TaskMan</title>
|
|
191
|
+
|
|
192
|
+
// <link rel="stylesheet" href="/TaskManFrontEnd.css" />
|
|
193
|
+
// <script type="module" src="/TaskManFrontEnd.js"></script>
|
|
194
|
+
// </head>
|
|
195
|
+
|
|
196
|
+
// <body><div id="root">react is loading</div></body>
|
|
197
|
+
|
|
198
|
+
// </html>`);
|
|
199
|
+
});
|
|
200
|
+
});
|