testeranto 0.79.3 → 0.79.4
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/TaskMan.Dockerfile +23 -0
- package/TaskMan1.Dockerfile +23 -0
- package/devBot.dockerfile +1 -1
- package/dist/TaskMan.Dockerfile +23 -0
- package/dist/common/TaskManBackEnd.js +29 -11
- package/dist/common/tsconfig.common.tsbuildinfo +1 -1
- package/dist/module/TaskManBackEnd.js +29 -11
- package/dist/module/tsconfig.module.tsbuildinfo +1 -1
- package/dist/prebuild/TaskManBackEnd.mjs +6 -11
- package/dist/types/tsconfig.types.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/TaskManBackEnd.ts +110 -92
- package/yarn-error.log +0 -3144
|
@@ -55,9 +55,11 @@ function listToTree(fileList) {
|
|
|
55
55
|
}
|
|
56
56
|
return root.children;
|
|
57
57
|
}
|
|
58
|
-
new MongoClient(`mongodb
|
|
58
|
+
new MongoClient(`mongodb://${process.env.MONGO_HOST || "127.0.0.1"}:27017`)
|
|
59
|
+
.connect()
|
|
60
|
+
.then(async (conn) => {
|
|
59
61
|
const db = conn.db("taskman");
|
|
60
|
-
await mongoose.connect("
|
|
62
|
+
await mongoose.connect(`mongodb://${process.env.MONGO_HOST || "127.0.0.1"}:27017/taskman`);
|
|
61
63
|
const usersModel = mongoose.model("User", userSchema);
|
|
62
64
|
const kanbanModel = mongoose.model("Kanban", kanbanSchema);
|
|
63
65
|
const ganttModel = mongoose.model("Gantt", ganttSchema);
|
|
@@ -68,16 +70,26 @@ new MongoClient(`mongodb://localhost:27017`).connect().then(async (conn) => {
|
|
|
68
70
|
const ChatChannel = mongoose.model("ChatChannel", channelsFeature);
|
|
69
71
|
const huddleModdle = ChatChannel.discriminator("Huddle", HuddleSchema);
|
|
70
72
|
const roomsModel = ChatChannel.discriminator("Room", RoomSchema);
|
|
71
|
-
app.get(`/preMergeCheck`, async (req, res) => {
|
|
72
|
-
const commit = req.params["commit"];
|
|
73
|
-
// res.json(await keyedModels[key].find({}));
|
|
74
|
-
});
|
|
75
73
|
app.get("/TaskManFrontend.js", (req, res) => {
|
|
76
|
-
res.sendFile(`${process.cwd()}/
|
|
74
|
+
res.sendFile(`${process.cwd()}/dist/prebuild/TaskManFrontEnd.js`);
|
|
77
75
|
});
|
|
78
76
|
app.get("/TaskManFrontEnd.css", (req, res) => {
|
|
79
|
-
res.sendFile(`${process.cwd()}/
|
|
77
|
+
res.sendFile(`${process.cwd()}/dist/prebuild/TaskManFrontEnd.css`);
|
|
80
78
|
});
|
|
79
|
+
// app.get(`/preMergeCheck`, async (req, res) => {
|
|
80
|
+
// const commit = req.params["commit"];
|
|
81
|
+
// // res.json(await keyedModels[key].find({}));
|
|
82
|
+
// });
|
|
83
|
+
// app.get("/TaskManFrontend.js", (req, res) => {
|
|
84
|
+
// res.sendFile(
|
|
85
|
+
// `${process.cwd()}/node_modules/testeranto/dist/prebuild/TaskManFrontEnd.js`
|
|
86
|
+
// );
|
|
87
|
+
// });
|
|
88
|
+
// app.get("/TaskManFrontEnd.css", (req, res) => {
|
|
89
|
+
// res.sendFile(
|
|
90
|
+
// `${process.cwd()}/node_modules/testeranto/dist/prebuild/TaskManFrontEnd.css`
|
|
91
|
+
// );
|
|
92
|
+
// });
|
|
81
93
|
app.get("/testeranto.json", (req, res) => {
|
|
82
94
|
res.sendFile(`${process.cwd()}/docs/testeranto.json`);
|
|
83
95
|
});
|
|
@@ -120,13 +132,19 @@ new MongoClient(`mongodb://localhost:27017`).connect().then(async (conn) => {
|
|
|
120
132
|
res.json(await keyedModels[key].find({}));
|
|
121
133
|
});
|
|
122
134
|
app.get(`/${key}/:id.json`, async (req, res) => {
|
|
123
|
-
res.json(await keyedModels[key]
|
|
135
|
+
res.json(await keyedModels[key]
|
|
136
|
+
.find({ id: { $eq: req.params["id"] } })
|
|
137
|
+
.toArray());
|
|
124
138
|
});
|
|
125
139
|
app.post(`/${key}/:id.json`, async (req, res) => {
|
|
126
|
-
res.json(await keyedModels[key]
|
|
140
|
+
res.json(await keyedModels[key]
|
|
141
|
+
.find({ id: { $eq: req.params["id"] } })
|
|
142
|
+
.toArray());
|
|
127
143
|
});
|
|
128
144
|
app.post(`/${key}.json`, async (req, res) => {
|
|
129
|
-
res.json(await keyedModels[key]
|
|
145
|
+
res.json(await keyedModels[key]
|
|
146
|
+
.find({ id: { $eq: req.params["id"] } })
|
|
147
|
+
.toArray());
|
|
130
148
|
});
|
|
131
149
|
});
|
|
132
150
|
app.use("/docs", express.static(path.join(process.cwd(), "docs")));
|