@vulkano/core 1.30.0 → 1.30.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/AGENTS.md +1 -1
- package/CHANGELOG.md +13 -0
- package/database/mongodb.js +17 -0
- package/package.json +7 -7
- package/pnpm-workspace.yaml +3 -2
package/AGENTS.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
## Overview
|
|
4
4
|
|
|
5
|
-
`@vulkano/core` (v1.30.
|
|
5
|
+
`@vulkano/core` (v1.30.1) is the engine of the Vulkano MVC framework. It bootstraps the environment, connects to the database, and auto-loads all models, controllers, services, and responses before starting the Express server. The user app only calls `require('@vulkano/core')`.
|
|
6
6
|
|
|
7
7
|
```
|
|
8
8
|
/**
|
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to `@vulkano/core` are documented here.
|
|
4
4
|
|
|
5
|
+
## [1.30.1]
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
- `database/mongodb.js` — registered `error`/`disconnected` listeners on `mongoose.connection`
|
|
9
|
+
before connecting. Node throws an uncaught exception on an EventEmitter `'error'` event with
|
|
10
|
+
no listener — a MongoDB connection drop after the initial connect (network blip, DB restart)
|
|
11
|
+
was crashing the entire process instead of just failing the queries in flight. Guarded against
|
|
12
|
+
duplicate registration if the loader is invoked more than once in the same process.
|
|
13
|
+
|
|
14
|
+
### Tests
|
|
15
|
+
- `test/unit/database/mongodb.test.js` — listeners registered before connect, no duplicate
|
|
16
|
+
registration on a second call, and emitting `'error'` on the connection no longer throws.
|
|
17
|
+
|
|
5
18
|
## [1.30.0]
|
|
6
19
|
|
|
7
20
|
### Added
|
package/database/mongodb.js
CHANGED
|
@@ -57,6 +57,23 @@ module.exports = async function loadDatabaseApplication() {
|
|
|
57
57
|
});
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
+
// Node throws an uncaught exception on an EventEmitter's 'error' event when
|
|
61
|
+
// nothing is listening for it — without this, a connection drop after the
|
|
62
|
+
// initial connect (network blip, MongoDB restart) crashes the whole
|
|
63
|
+
// process instead of just failing the queries in flight. Attached before
|
|
64
|
+
// connect() so it also catches errors emitted during the initial attempt.
|
|
65
|
+
if (!mongoose.connection.listenerCount('error')) {
|
|
66
|
+
mongoose.connection.on('error', (err) => {
|
|
67
|
+
console.log(` \x1b[41mERROR\x1b[0m: MongoDB connection error: ${err.message}`);
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
if (!mongoose.connection.listenerCount('disconnected')) {
|
|
72
|
+
mongoose.connection.on('disconnected', () => {
|
|
73
|
+
console.log(' \x1b[33mWARNING\x1b[0m: MongoDB disconnected.');
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
|
|
60
77
|
if (!mongoose.connection.readyState) {
|
|
61
78
|
await mongoose.connect(toConnect, connectionProps);
|
|
62
79
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vulkano/core",
|
|
3
|
-
"version": "1.30.
|
|
3
|
+
"version": "1.30.1",
|
|
4
4
|
"description": "A MVC framework using Express 4",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Vulkano Team",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"url": "https://github.com/vulkanojs/vulkano-core/issues"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"jest": "^30.
|
|
38
|
+
"jest": "^30.5.1",
|
|
39
39
|
"nodemon": "^3.1.14",
|
|
40
40
|
"socket.io-client": "^4.8.3",
|
|
41
41
|
"vite-plus": "catalog:"
|
|
@@ -54,18 +54,18 @@
|
|
|
54
54
|
"express-handlebars": "^9.0.1",
|
|
55
55
|
"express-jwt": "^8.5.1",
|
|
56
56
|
"express-session": "^1.19.0",
|
|
57
|
-
"express-useragent": "^2.2.
|
|
57
|
+
"express-useragent": "^2.2.3",
|
|
58
58
|
"frameguard": "^4.0.0",
|
|
59
59
|
"helmet": "^8.3.0",
|
|
60
|
-
"i18next": "^26.
|
|
60
|
+
"i18next": "^26.4.1",
|
|
61
61
|
"include-all": "^4.0.3",
|
|
62
62
|
"jwt-simple": "^0.5.6",
|
|
63
63
|
"mongoose": "^8.12.1",
|
|
64
64
|
"mongoose-paginate-v2": "^1.9.5",
|
|
65
|
-
"morgan": "^1.
|
|
66
|
-
"multer": "^2.
|
|
65
|
+
"morgan": "^1.12.0",
|
|
66
|
+
"multer": "^2.3.0",
|
|
67
67
|
"nunjucks": "^3.2.4",
|
|
68
|
-
"redis": "^6.1
|
|
68
|
+
"redis": "^6.2.1",
|
|
69
69
|
"socket.io": "^4.8.3",
|
|
70
70
|
"socket.io-adapter": "^2.5.8",
|
|
71
71
|
"undici": "^7.28.0"
|
package/pnpm-workspace.yaml
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
allowBuilds:
|
|
2
|
+
'@parcel/watcher': true
|
|
2
3
|
fsevents: set this to true or false
|
|
3
|
-
unrs-resolver:
|
|
4
|
+
unrs-resolver: true
|
|
4
5
|
catalog:
|
|
5
6
|
vite: npm:@voidzero-dev/vite-plus-core@latest
|
|
6
7
|
vitest: npm:@voidzero-dev/vite-plus-test@latest
|
|
7
|
-
vite-plus: ^0.
|
|
8
|
+
vite-plus: ^0.3.0
|
|
8
9
|
overrides:
|
|
9
10
|
vite: "catalog:"
|
|
10
11
|
vitest: "catalog:"
|