testeranto 0.79.32 → 0.79.33
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/TaskMan1.Dockerfile +1 -0
- package/dist/common/Project.js +0 -14
- package/dist/common/TaskManBackEnd.js +92 -90
- package/dist/common/tsconfig.common.tsbuildinfo +1 -1
- package/dist/module/Project.js +0 -14
- package/dist/module/TaskManBackEnd.js +92 -90
- package/dist/module/tsconfig.module.tsbuildinfo +1 -1
- package/dist/prebuild/TaskManBackEnd.mjs +67 -59
- package/dist/types/TaskManBackEnd.d.ts +2 -1
- package/dist/types/tsconfig.types.tsbuildinfo +1 -1
- package/package.json +6 -7
- package/src/Project.ts +0 -25
- package/src/TaskManBackEnd.ts +116 -111
package/TaskMan1.Dockerfile
CHANGED
|
@@ -22,6 +22,7 @@ COPY ./testeranto.mts /usr/src/app/testeranto.mts
|
|
|
22
22
|
COPY ./tsconfig.json /usr/src/app/tsconfig.json
|
|
23
23
|
|
|
24
24
|
RUN yarn testeranto-esbuild
|
|
25
|
+
# COPY ./docs/ /usr/src/app/docs
|
|
25
26
|
# # COPY ./testeranto.json /usr/src/app/testeranto.json
|
|
26
27
|
# # COPY prebuild.sh /usr/src/app
|
|
27
28
|
# # COPY postBuild.sh /usr/src/app
|
package/dist/common/Project.js
CHANGED
|
@@ -102,20 +102,6 @@ class ITProject {
|
|
|
102
102
|
});
|
|
103
103
|
});
|
|
104
104
|
Promise.all([
|
|
105
|
-
fs_1.default.promises.writeFile(`${config.outdir}/testeranto.json`, JSON.stringify(Object.assign(Object.assign({}, config), { buildDir: process.cwd() + "/" + config.outdir }), null, 2)),
|
|
106
|
-
// esbuild
|
|
107
|
-
// .context(esbuildFeaturesConfiger(config))
|
|
108
|
-
// .then(async (featuresContext) => {
|
|
109
|
-
// if (mode == "DEV") {
|
|
110
|
-
// await featuresContext.watch();
|
|
111
|
-
// onFeaturesDone();
|
|
112
|
-
// } else {
|
|
113
|
-
// featuresContext.rebuild().then((v) => {
|
|
114
|
-
// onFeaturesDone();
|
|
115
|
-
// });
|
|
116
|
-
// }
|
|
117
|
-
// return featuresContext;
|
|
118
|
-
// }),
|
|
119
105
|
esbuild_1.default
|
|
120
106
|
.context((0, node_js_1.default)(config, nodeEntryPoints))
|
|
121
107
|
.then(async (nodeContext) => {
|
|
@@ -60,46 +60,47 @@ function listToTree(fileList) {
|
|
|
60
60
|
}
|
|
61
61
|
return root.children;
|
|
62
62
|
}
|
|
63
|
-
|
|
64
|
-
.
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
63
|
+
exports.default = () => {
|
|
64
|
+
new mongodb_1.MongoClient(`mongodb://${process.env.MONGO_HOST || "127.0.0.1"}:27017`)
|
|
65
|
+
.connect()
|
|
66
|
+
.then(async (conn) => {
|
|
67
|
+
const db = conn.db("taskman");
|
|
68
|
+
await mongoose_1.default.connect(`mongodb://${process.env.MONGO_HOST || "127.0.0.1"}:27017/taskman`);
|
|
69
|
+
const usersModel = mongoose_1.default.model("User", mongooseSchemas_1.userSchema);
|
|
70
|
+
const kanbanModel = mongoose_1.default.model("Kanban", mongooseSchemas_1.kanbanSchema);
|
|
71
|
+
const ganttModel = mongoose_1.default.model("Gantt", mongooseSchemas_1.ganttSchema);
|
|
72
|
+
const featuresModel = mongoose_1.default.model("Features", mongooseSchemas_1.featuresSchema);
|
|
73
|
+
// const roomsModel = mongoose.model<any>("Rooms", RoomSchema);
|
|
74
|
+
// const huddleModdle = mongoose.model<any>("Huddles", HuddleSchema);
|
|
75
|
+
const MessagesModel = mongoose_1.default.model("Messages", mongooseSchemas_1.chatCatMessageSchema);
|
|
76
|
+
const ChatChannel = mongoose_1.default.model("ChatChannel", mongooseSchemas_1.channelsFeature);
|
|
77
|
+
const huddleModdle = ChatChannel.discriminator("Huddle", mongooseSchemas_1.HuddleSchema);
|
|
78
|
+
const roomsModel = ChatChannel.discriminator("Room", mongooseSchemas_1.RoomSchema);
|
|
79
|
+
app.get("/TaskManFrontend.js", (req, res) => {
|
|
80
|
+
res.sendFile(`${process.cwd()}/TaskManFrontEnd.js`);
|
|
81
|
+
});
|
|
82
|
+
app.get("/TaskManFrontEnd.css", (req, res) => {
|
|
83
|
+
res.sendFile(`${process.cwd()}/TaskManFrontEnd.css`);
|
|
84
|
+
});
|
|
85
|
+
// app.get(`/preMergeCheck`, async (req, res) => {
|
|
86
|
+
// const commit = req.params["commit"];
|
|
87
|
+
// // res.json(await keyedModels[key].find({}));
|
|
88
|
+
// });
|
|
89
|
+
// app.get("/TaskManFrontend.js", (req, res) => {
|
|
90
|
+
// res.sendFile(
|
|
91
|
+
// `${process.cwd()}/node_modules/testeranto/dist/prebuild/TaskManFrontEnd.js`
|
|
92
|
+
// );
|
|
93
|
+
// });
|
|
94
|
+
// app.get("/TaskManFrontEnd.css", (req, res) => {
|
|
95
|
+
// res.sendFile(
|
|
96
|
+
// `${process.cwd()}/node_modules/testeranto/dist/prebuild/TaskManFrontEnd.css`
|
|
97
|
+
// );
|
|
98
|
+
// });
|
|
99
|
+
app.get("/testeranto.json", (req, res) => {
|
|
100
|
+
res.sendFile(`${process.cwd()}/docs/testeranto.json`);
|
|
101
|
+
});
|
|
102
|
+
app.get("/", (req, res) => {
|
|
103
|
+
res.send(`<!DOCTYPE html>
|
|
103
104
|
<html lang="en">
|
|
104
105
|
|
|
105
106
|
<head>
|
|
@@ -117,58 +118,59 @@ new mongodb_1.MongoClient(`mongodb://${process.env.MONGO_HOST || "127.0.0.1"}:27
|
|
|
117
118
|
<body><div id="root">react is loading</div></body>
|
|
118
119
|
|
|
119
120
|
</html>`);
|
|
120
|
-
});
|
|
121
|
-
app.listen(port, () => {
|
|
122
|
-
console.log(`Example app listening on port ${port}`);
|
|
123
|
-
});
|
|
124
|
-
///////////////////////////////////////////////
|
|
125
|
-
const keyedModels = {
|
|
126
|
-
users: usersModel,
|
|
127
|
-
kanbans: kanbanModel,
|
|
128
|
-
features: featuresModel,
|
|
129
|
-
gantts: ganttModel,
|
|
130
|
-
rooms: roomsModel,
|
|
131
|
-
huddles: huddleModdle,
|
|
132
|
-
messages: MessagesModel,
|
|
133
|
-
};
|
|
134
|
-
Object.keys(keyedModels).forEach((key) => {
|
|
135
|
-
app.get(`/${key}.json`, async (req, res) => {
|
|
136
|
-
console.log("GET", key, keyedModels[key]);
|
|
137
|
-
res.json(await keyedModels[key].find({}));
|
|
138
121
|
});
|
|
139
|
-
app.
|
|
140
|
-
|
|
141
|
-
.find({ id: { $eq: req.params["id"] } })
|
|
142
|
-
.toArray());
|
|
122
|
+
app.listen(port, () => {
|
|
123
|
+
console.log(`Example app listening on port ${port}`);
|
|
143
124
|
});
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
125
|
+
///////////////////////////////////////////////
|
|
126
|
+
const keyedModels = {
|
|
127
|
+
users: usersModel,
|
|
128
|
+
kanbans: kanbanModel,
|
|
129
|
+
features: featuresModel,
|
|
130
|
+
gantts: ganttModel,
|
|
131
|
+
rooms: roomsModel,
|
|
132
|
+
huddles: huddleModdle,
|
|
133
|
+
messages: MessagesModel,
|
|
134
|
+
};
|
|
135
|
+
Object.keys(keyedModels).forEach((key) => {
|
|
136
|
+
app.get(`/${key}.json`, async (req, res) => {
|
|
137
|
+
console.log("GET", key, keyedModels[key]);
|
|
138
|
+
res.json(await keyedModels[key].find({}));
|
|
139
|
+
});
|
|
140
|
+
app.get(`/${key}/:id.json`, async (req, res) => {
|
|
141
|
+
res.json(await keyedModels[key]
|
|
142
|
+
.find({ id: { $eq: req.params["id"] } })
|
|
143
|
+
.toArray());
|
|
144
|
+
});
|
|
145
|
+
app.post(`/${key}/:id.json`, async (req, res) => {
|
|
146
|
+
res.json(await keyedModels[key]
|
|
147
|
+
.find({ id: { $eq: req.params["id"] } })
|
|
148
|
+
.toArray());
|
|
149
|
+
});
|
|
150
|
+
app.post(`/${key}.json`, async (req, res) => {
|
|
151
|
+
res.json(await keyedModels[key]
|
|
152
|
+
.find({ id: { $eq: req.params["id"] } })
|
|
153
|
+
.toArray());
|
|
154
|
+
});
|
|
148
155
|
});
|
|
149
|
-
app.
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
156
|
+
app.use("/docs", express_1.default.static(path_1.default.join(process.cwd(), "docs")));
|
|
157
|
+
app.get("/docGal/fs.json", (req, res) => {
|
|
158
|
+
const directoryPath = "./"; // Replace with the desired directory path
|
|
159
|
+
// const textFiles = findTextFiles(directoryPath);
|
|
160
|
+
res.json(listToTree(findTextFiles(directoryPath)));
|
|
161
|
+
// res.send(`<!DOCTYPE html>
|
|
162
|
+
// <html lang="en">
|
|
163
|
+
// <head>
|
|
164
|
+
// <meta name="description" content="Webpage description goes here" />
|
|
165
|
+
// <meta charset="utf-8" />
|
|
166
|
+
// <meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
167
|
+
// <meta name="author" content="" />
|
|
168
|
+
// <title>TaskMan</title>
|
|
169
|
+
// <link rel="stylesheet" href="/TaskManFrontEnd.css" />
|
|
170
|
+
// <script type="module" src="/TaskManFrontEnd.js"></script>
|
|
171
|
+
// </head>
|
|
172
|
+
// <body><div id="root">react is loading</div></body>
|
|
173
|
+
// </html>`);
|
|
153
174
|
});
|
|
154
175
|
});
|
|
155
|
-
|
|
156
|
-
app.get("/docGal/fs.json", (req, res) => {
|
|
157
|
-
const directoryPath = "./"; // Replace with the desired directory path
|
|
158
|
-
// const textFiles = findTextFiles(directoryPath);
|
|
159
|
-
res.json(listToTree(findTextFiles(directoryPath)));
|
|
160
|
-
// res.send(`<!DOCTYPE html>
|
|
161
|
-
// <html lang="en">
|
|
162
|
-
// <head>
|
|
163
|
-
// <meta name="description" content="Webpage description goes here" />
|
|
164
|
-
// <meta charset="utf-8" />
|
|
165
|
-
// <meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
166
|
-
// <meta name="author" content="" />
|
|
167
|
-
// <title>TaskMan</title>
|
|
168
|
-
// <link rel="stylesheet" href="/TaskManFrontEnd.css" />
|
|
169
|
-
// <script type="module" src="/TaskManFrontEnd.js"></script>
|
|
170
|
-
// </head>
|
|
171
|
-
// <body><div id="root">react is loading</div></body>
|
|
172
|
-
// </html>`);
|
|
173
|
-
});
|
|
174
|
-
});
|
|
176
|
+
};
|