@ditojs/server 2.41.0 → 2.42.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/package.json +9 -9
- package/src/app/Application.js +9 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ditojs/server",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.42.1",
|
|
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.
|
|
29
|
-
"@ditojs/build": "^2.
|
|
30
|
-
"@ditojs/router": "^2.
|
|
31
|
-
"@ditojs/utils": "^2.
|
|
28
|
+
"@ditojs/admin": "^2.42.1",
|
|
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.
|
|
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.
|
|
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.
|
|
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": "
|
|
93
|
+
"gitHead": "9cff900dd34edc92b1f57619e938f2ec7eb99f67"
|
|
94
94
|
}
|
package/src/app/Application.js
CHANGED
|
@@ -166,10 +166,17 @@ export class Application extends Koa {
|
|
|
166
166
|
|
|
167
167
|
fixModuleClassNames(modules) {
|
|
168
168
|
// Naming fix for a weird vite 6 bug where the model classes are sometimes
|
|
169
|
-
// prefixed with `_`, but only when
|
|
169
|
+
// prefixed with `_`, sometimes suffixed with numbers, but only when
|
|
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()`
|
|
170
173
|
if (isPlainObject(modules)) {
|
|
171
174
|
for (const [key, module] of Object.entries(modules)) {
|
|
172
|
-
if (
|
|
175
|
+
if (
|
|
176
|
+
module &&
|
|
177
|
+
module.name !== key &&
|
|
178
|
+
module.name?.replace(/^_|\d+$/g, '') === key
|
|
179
|
+
) {
|
|
173
180
|
Object.defineProperty(module, 'name', {
|
|
174
181
|
value: key,
|
|
175
182
|
writable: false,
|