@dnax/core 0.67.5 ā 0.68.1
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/app/index.ts +3 -0
- package/lib/index.ts +10 -9
- package/package.json +1 -1
package/app/index.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import consola from "consola";
|
|
2
2
|
import { Cfg, loadCfg } from "../config";
|
|
3
3
|
import { init } from "../lib";
|
|
4
|
+
import { initScript } from "../lib/scripts";
|
|
4
5
|
import { hookDatabase } from "../lib/database";
|
|
5
6
|
import boxen from "boxen";
|
|
6
7
|
import { loadSocket } from "../lib/socket";
|
|
@@ -109,6 +110,8 @@ async function runApp(config?: configRunApp, clb?: Function): Promise<Server> {
|
|
|
109
110
|
});
|
|
110
111
|
}
|
|
111
112
|
}
|
|
113
|
+
|
|
114
|
+
initScript();
|
|
112
115
|
}
|
|
113
116
|
|
|
114
117
|
return server;
|
package/lib/index.ts
CHANGED
|
@@ -6,7 +6,6 @@ import { initCron } from "./cron";
|
|
|
6
6
|
import { loadPermissions } from "./permissions";
|
|
7
7
|
import { loadSocket } from "../lib/socket";
|
|
8
8
|
import { loadAutoRoutes } from "./routes";
|
|
9
|
-
import { initScript } from "../lib/scripts";
|
|
10
9
|
import { syncAdapterFileSystem } from "./media";
|
|
11
10
|
import { runGenTypes } from "../types/gen";
|
|
12
11
|
import consola from "consola";
|
|
@@ -16,10 +15,10 @@ import ora from "ora";
|
|
|
16
15
|
async function init(cf = { app: null }) {
|
|
17
16
|
console.clear();
|
|
18
17
|
console.log("\n");
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
spinner.color = "green"; */
|
|
18
|
+
const spinner = ora("Initializing...").start();
|
|
19
|
+
spinner.color = "green";
|
|
22
20
|
|
|
21
|
+
//console.log("š Initializing...".blue);
|
|
23
22
|
await loadSocket();
|
|
24
23
|
//consola.success("Loaded socket");
|
|
25
24
|
// load all tenants database
|
|
@@ -60,14 +59,16 @@ async function init(cf = { app: null }) {
|
|
|
60
59
|
|
|
61
60
|
//consola.success("Loaded scripts");
|
|
62
61
|
//spinner.clear();
|
|
63
|
-
|
|
62
|
+
spinner.stop();
|
|
63
|
+
spinner.clear();
|
|
64
64
|
console.log(
|
|
65
|
-
"\n
|
|
65
|
+
"\n---------------------------------------".gray +
|
|
66
66
|
"\n⨠Your server is up and running\n".green.bold +
|
|
67
|
-
"
|
|
67
|
+
"---------------------------------------\n".gray +
|
|
68
|
+
`š Environment : ${process.env.NODE_ENV || "development"}\n`.gray +
|
|
69
|
+
`š Started at : ${new Date().toLocaleString()}\n`.gray +
|
|
70
|
+
"---------------------------------------\n".gray
|
|
68
71
|
);
|
|
69
|
-
|
|
70
|
-
initScript();
|
|
71
72
|
}
|
|
72
73
|
|
|
73
74
|
export { init };
|