testeranto 0.79.39 → 0.79.40
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/dist/common/Init.js +20 -16
- package/dist/common/TaskManBackEnd.js +17 -22
- package/dist/common/tsconfig.common.tsbuildinfo +1 -1
- package/dist/module/Init.js +20 -16
- package/dist/module/TaskManBackEnd.js +17 -22
- package/dist/module/tsconfig.module.tsbuildinfo +1 -1
- package/dist/prebuild/TaskManBackEnd.mjs +2 -22
- package/dist/types/tsconfig.types.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/Init.ts +24 -27
- package/src/TaskManBackEnd.ts +17 -17
package/package.json
CHANGED
package/src/Init.ts
CHANGED
|
@@ -1,29 +1,4 @@
|
|
|
1
|
-
import readline from "readline";
|
|
2
1
|
import fs from "fs";
|
|
3
|
-
import path from "path";
|
|
4
|
-
import { jsonc } from "jsonc";
|
|
5
|
-
import { v4 as uuidv4 } from "uuid";
|
|
6
|
-
|
|
7
|
-
import { IBuiltConfig, IRunTime } from "./lib/types";
|
|
8
|
-
|
|
9
|
-
import { PM_Main } from "./PM/main.js";
|
|
10
|
-
import { destinationOfRuntime } from "./utils.js";
|
|
11
|
-
|
|
12
|
-
var mode: "DEV" | "PROD" = process.argv[2] === "-dev" ? "DEV" : "PROD";
|
|
13
|
-
|
|
14
|
-
const node2web: Record<string, string[]> = {};
|
|
15
|
-
const web2node: Record<string, string[]> = {};
|
|
16
|
-
const childProcesses: Record<string, "loaded" | "running" | "done"> = {};
|
|
17
|
-
|
|
18
|
-
readline.emitKeypressEvents(process.stdin);
|
|
19
|
-
if (process.stdin.isTTY) process.stdin.setRawMode(true);
|
|
20
|
-
|
|
21
|
-
console.log("\n Puppeteer is running. Press 'q' to quit\n");
|
|
22
|
-
process.stdin.on("keypress", (str, key) => {
|
|
23
|
-
if (key.name === "q") {
|
|
24
|
-
process.exit();
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
2
|
|
|
28
3
|
export default async (partialConfig) => {
|
|
29
4
|
const config = {
|
|
@@ -45,10 +20,32 @@ export default async (partialConfig) => {
|
|
|
45
20
|
|
|
46
21
|
fs.copyFileSync(
|
|
47
22
|
"./node_modules/testeranto/dist/prebuild/TaskManFrontEnd.js",
|
|
48
|
-
"docs/TaskManFrontEnd.js"
|
|
23
|
+
"./docs/TaskManFrontEnd.js"
|
|
49
24
|
);
|
|
50
25
|
fs.copyFileSync(
|
|
51
26
|
"./node_modules/testeranto/dist/prebuild/TaskManFrontEnd.css",
|
|
52
|
-
"docs/TaskManFrontEnd.css"
|
|
27
|
+
"./docs/TaskManFrontEnd.css"
|
|
28
|
+
);
|
|
29
|
+
|
|
30
|
+
fs.writeFileSync(
|
|
31
|
+
`${config.outdir}/index.html`,
|
|
32
|
+
`<!DOCTYPE html>
|
|
33
|
+
<html lang="en">
|
|
34
|
+
|
|
35
|
+
<head>
|
|
36
|
+
<meta name="description" content="Webpage description goes here" />
|
|
37
|
+
<meta charset="utf-8" />
|
|
38
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
39
|
+
<meta name="author" content="" />
|
|
40
|
+
|
|
41
|
+
<title>TaskMan</title>
|
|
42
|
+
|
|
43
|
+
<link rel="stylesheet" href="/docs/TaskManFrontEnd.css" />
|
|
44
|
+
<script type="module" src="/docs/TaskManFrontEnd.js"></script>
|
|
45
|
+
</head>
|
|
46
|
+
|
|
47
|
+
<body><div id="root">react is loading</div></body>
|
|
48
|
+
|
|
49
|
+
</html>`
|
|
53
50
|
);
|
|
54
51
|
};
|
package/src/TaskManBackEnd.ts
CHANGED
|
@@ -111,11 +111,11 @@ export default (partialConfig: IBaseConfig) => {
|
|
|
111
111
|
const roomsModel = ChatChannel.discriminator("Room", RoomSchema);
|
|
112
112
|
|
|
113
113
|
app.get("/TaskManFrontend.js", (req, res) => {
|
|
114
|
-
res.sendFile(`${process.cwd()}/TaskManFrontEnd.js`);
|
|
114
|
+
res.sendFile(`${process.cwd()}/docs/TaskManFrontEnd.js`);
|
|
115
115
|
});
|
|
116
116
|
|
|
117
117
|
app.get("/TaskManFrontEnd.css", (req, res) => {
|
|
118
|
-
res.sendFile(`${process.cwd()}/TaskManFrontEnd.css`);
|
|
118
|
+
res.sendFile(`${process.cwd()}/docs/TaskManFrontEnd.css`);
|
|
119
119
|
});
|
|
120
120
|
|
|
121
121
|
// app.get(`/preMergeCheck`, async (req, res) => {
|
|
@@ -140,26 +140,26 @@ export default (partialConfig: IBaseConfig) => {
|
|
|
140
140
|
// res.json(config);
|
|
141
141
|
// });
|
|
142
142
|
|
|
143
|
-
app.get("/", (req, res) => {
|
|
144
|
-
|
|
145
|
-
<html lang="en">
|
|
143
|
+
// app.get("/", (req, res) => {
|
|
144
|
+
// res.send(`<!DOCTYPE html>
|
|
145
|
+
// <html lang="en">
|
|
146
146
|
|
|
147
|
-
<head>
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
147
|
+
// <head>
|
|
148
|
+
// <meta name="description" content="Webpage description goes here" />
|
|
149
|
+
// <meta charset="utf-8" />
|
|
150
|
+
// <meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
151
|
+
// <meta name="author" content="" />
|
|
152
152
|
|
|
153
|
-
|
|
153
|
+
// <title>TaskMan</title>
|
|
154
154
|
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
</head>
|
|
155
|
+
// <link rel="stylesheet" href="/TaskManFrontEnd.css" />
|
|
156
|
+
// <script type="module" src="/TaskManFrontEnd.js"></script>
|
|
157
|
+
// </head>
|
|
158
158
|
|
|
159
|
-
<body><div id="root">react is loading</div></body>
|
|
159
|
+
// <body><div id="root">react is loading</div></body>
|
|
160
160
|
|
|
161
|
-
</html>`);
|
|
162
|
-
});
|
|
161
|
+
// </html>`);
|
|
162
|
+
// });
|
|
163
163
|
|
|
164
164
|
app.listen(port, () => {
|
|
165
165
|
console.log(`Example app listening on port ${port}`);
|