@vulkano/core 1.30.0 → 1.31.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/AGENTS.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  ## Overview
4
4
 
5
- `@vulkano/core` (v1.30.0) 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')`.
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
@@ -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.0",
3
+ "version": "1.31.0",
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.4.2",
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.1",
57
+ "express-useragent": "^2.2.3",
58
58
  "frameguard": "^4.0.0",
59
59
  "helmet": "^8.3.0",
60
- "i18next": "^26.3.6",
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.11.0",
66
- "multer": "^2.2.0",
65
+ "morgan": "^1.12.0",
66
+ "multer": "^2.3.0",
67
67
  "nunjucks": "^3.2.4",
68
- "redis": "^6.1.0",
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"
@@ -1,10 +1,11 @@
1
1
  allowBuilds:
2
+ '@parcel/watcher': true
2
3
  fsevents: set this to true or false
3
- unrs-resolver: set this to true or false
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.2.4
8
+ vite-plus: ^0.3.0
8
9
  overrides:
9
10
  vite: "catalog:"
10
11
  vitest: "catalog:"
@@ -37,7 +37,12 @@ module.exports = (props) => {
37
37
  version
38
38
  } = app.pkg || {};
39
39
 
40
- const validEntry = Object.keys(inputs).find( (k) => k.indexOf(entry) >= 0 );
40
+ const validEntry = Object.keys(inputs).find( (k) => {
41
+ const val = inputs[k];
42
+ // dev manifest: keys are short names ("app"/"admin") -> exact key match
43
+ // prod manifest: keys are full paths, each entry carries exact "name" and "isEntry" boolean -> match by name and isEntry
44
+ return k === entry || (val && val.name === entry && val.isEntry);
45
+ });
41
46
 
42
47
  if (!validEntry) {
43
48
  return `<!-- Invalid Entry ${entry} -->`;