@ezetgalaxy/titan 25.11.6 → 25.11.7
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/package.json
CHANGED
package/templates/titan/titan.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import fs from "fs";
|
|
2
2
|
import path from "path";
|
|
3
|
+
import { bundle } from "./bundle.js";
|
|
3
4
|
|
|
4
5
|
const cyan = (t) => `\x1b[36m${t}\x1b[0m`;
|
|
5
6
|
const green = (t) => `\x1b[32m${t}\x1b[0m`;
|
|
@@ -38,8 +39,15 @@ const t = {
|
|
|
38
39
|
return addRoute("POST", route);
|
|
39
40
|
},
|
|
40
41
|
|
|
41
|
-
start(port = 3000, msg = "") {
|
|
42
|
+
async start(port = 3000, msg = "") {
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
console.log(cyan("[Titan] Bundling actions..."));
|
|
46
|
+
await bundle();
|
|
47
|
+
|
|
42
48
|
const base = path.join(process.cwd(), "server");
|
|
49
|
+
fs.mkdirSync(base, { recursive: true });
|
|
50
|
+
|
|
43
51
|
|
|
44
52
|
fs.writeFileSync(
|
|
45
53
|
path.join(base, "routes.json"),
|
|
@@ -52,6 +60,7 @@ const t = {
|
|
|
52
60
|
);
|
|
53
61
|
|
|
54
62
|
console.log(green(`Titan: routes.json + action_map.json written -> ${base}`));
|
|
63
|
+
|
|
55
64
|
if (msg) console.log(cyan(msg));
|
|
56
65
|
}
|
|
57
66
|
};
|