@vulkano/core 1.4.0 → 1.5.0
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.js +26 -62
- package/bootstrap/express.js +38 -4
- package/bootstrap/logger.js +59 -0
- package/bootstrap/server.js +525 -426
- package/database/mongodb.js +2 -2
- package/libs/Crontab.js +13 -5
- package/package.json +2 -1
- package/bun.lockb +0 -0
package/database/mongodb.js
CHANGED
|
@@ -16,7 +16,7 @@ global.Mixed = mongoose.Schema.Types.Mixed;
|
|
|
16
16
|
|
|
17
17
|
const AllModels = require('./models')();
|
|
18
18
|
|
|
19
|
-
module.exports = function loadDatabaseApplication() {
|
|
19
|
+
module.exports = async function loadDatabaseApplication() {
|
|
20
20
|
|
|
21
21
|
const {
|
|
22
22
|
config
|
|
@@ -66,7 +66,7 @@ module.exports = function loadDatabaseApplication() {
|
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
if (!mongoose.connection.readyState) {
|
|
69
|
-
mongoose.connect(toConnect, connectionProps);
|
|
69
|
+
await mongoose.connect(toConnect, connectionProps);
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
const db = mongoose.connection;
|
package/libs/Crontab.js
CHANGED
|
@@ -2,17 +2,25 @@ const Cron = require('cron').CronJob;
|
|
|
2
2
|
|
|
3
3
|
module.exports = {
|
|
4
4
|
|
|
5
|
-
schedule(
|
|
5
|
+
schedule(props) {
|
|
6
|
+
|
|
7
|
+
const {
|
|
8
|
+
time,
|
|
9
|
+
start,
|
|
10
|
+
task,
|
|
11
|
+
onComplete,
|
|
12
|
+
timeZone
|
|
13
|
+
} = props || {};
|
|
6
14
|
|
|
7
15
|
const config = {
|
|
8
|
-
cronTime:
|
|
16
|
+
cronTime: time,
|
|
9
17
|
onTick: task || ( () => {} ),
|
|
10
|
-
onComplete:
|
|
18
|
+
onComplete: onComplete || ( () => {} ),
|
|
11
19
|
timeZone: timeZone || 'America/New_York',
|
|
12
|
-
start: true
|
|
20
|
+
start: typeof start !== 'undefined' ? start : true
|
|
13
21
|
};
|
|
14
22
|
|
|
15
|
-
return
|
|
23
|
+
return Cron.from(config);
|
|
16
24
|
|
|
17
25
|
}
|
|
18
26
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vulkano/core",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0",
|
|
4
4
|
"description": "A MVC framework using Express 4",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Vulkano Team",
|
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
"url": "https://github.com/vulkanojs/vulkano-core/issues"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
+
"@socket.io/mongo-adapter": "^0.3.2",
|
|
31
32
|
"@socket.io/redis-adapter": "^8.3.0",
|
|
32
33
|
"axios": "^1.6.8",
|
|
33
34
|
"bluebird": "^3.7.2",
|
package/bun.lockb
DELETED
|
Binary file
|