@ditojs/server 2.42.0 → 2.42.2

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ditojs/server",
3
- "version": "2.42.0",
3
+ "version": "2.42.2",
4
4
  "type": "module",
5
5
  "description": "Dito.js Server – Dito.js is a declarative and modern web framework, based on Objection.js, Koa.js and Vue.js",
6
6
  "repository": "https://github.com/ditojs/dito/tree/master/packages/server",
@@ -25,10 +25,10 @@
25
25
  "node >= 18"
26
26
  ],
27
27
  "dependencies": {
28
- "@ditojs/admin": "^2.42.0",
29
- "@ditojs/build": "^2.42.0",
30
- "@ditojs/router": "^2.42.0",
31
- "@ditojs/utils": "^2.42.0",
28
+ "@ditojs/admin": "^2.42.2",
29
+ "@ditojs/build": "^2.42.1",
30
+ "@ditojs/router": "^2.42.1",
31
+ "@ditojs/utils": "^2.42.1",
32
32
  "@koa/cors": "^5.0.0",
33
33
  "@koa/multer": "^3.0.2",
34
34
  "@originjs/vite-plugin-commonjs": "^1.0.3",
@@ -62,11 +62,11 @@
62
62
  "passthrough-counter": "^1.0.0",
63
63
  "picocolors": "^1.1.1",
64
64
  "picomatch": "^4.0.2",
65
- "pino": "^9.5.0",
65
+ "pino": "^9.6.0",
66
66
  "pino-pretty": "^13.0.0",
67
67
  "pluralize": "^8.0.0",
68
68
  "repl": "^0.1.3",
69
- "type-fest": "^4.30.0",
69
+ "type-fest": "^4.31.0",
70
70
  "uuid": "^11.0.3"
71
71
  },
72
72
  "peerDependencies": {
@@ -84,11 +84,11 @@
84
84
  "@types/koa-session": "^6.4.5",
85
85
  "@types/koa-static": "^4.0.4",
86
86
  "@types/koa__cors": "^5.0.0",
87
- "@types/node": "^22.10.1",
87
+ "@types/node": "^22.10.5",
88
88
  "knex": "^3.1.0",
89
89
  "objection": "^3.1.5",
90
90
  "typescript": "^5.7.2"
91
91
  },
92
92
  "types": "types",
93
- "gitHead": "341a85f8955b17c459c0c47371896a633cbce29e"
93
+ "gitHead": "8fd62e4e39794833c20c1fb109c772cc6dab2ed4"
94
94
  }
@@ -168,12 +168,14 @@ export class Application extends Koa {
168
168
  // Naming fix for a weird vite 6 bug where the model classes are sometimes
169
169
  // prefixed with `_`, sometimes suffixed with numbers, but only when
170
170
  // imported through `vite.config.js`.
171
+ // NOTE: This only happens when `Application` is imported into
172
+ // `admin.vite.config.js` in order to call `app.defineAdminViteConfig()`
171
173
  if (isPlainObject(modules)) {
172
174
  for (const [key, module] of Object.entries(modules)) {
173
175
  if (
174
176
  module &&
175
177
  module.name !== key &&
176
- module.name?.match(/^_?(.*?)\d*$/)?.[1] === key
178
+ module.name?.replace(/^_|\d+$/g, '') === key
177
179
  ) {
178
180
  Object.defineProperty(module, 'name', {
179
181
  value: key,