@ditojs/server 2.40.0 → 2.42.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/package.json +6 -6
- package/src/app/Application.js +7 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ditojs/server",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.42.0",
|
|
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.0",
|
|
29
|
+
"@ditojs/build": "^2.42.0",
|
|
30
|
+
"@ditojs/router": "^2.42.0",
|
|
31
|
+
"@ditojs/utils": "^2.42.0",
|
|
32
32
|
"@koa/cors": "^5.0.0",
|
|
33
33
|
"@koa/multer": "^3.0.2",
|
|
34
34
|
"@originjs/vite-plugin-commonjs": "^1.0.3",
|
|
@@ -90,5 +90,5 @@
|
|
|
90
90
|
"typescript": "^5.7.2"
|
|
91
91
|
},
|
|
92
92
|
"types": "types",
|
|
93
|
-
"gitHead": "
|
|
93
|
+
"gitHead": "341a85f8955b17c459c0c47371896a633cbce29e"
|
|
94
94
|
}
|
package/src/app/Application.js
CHANGED
|
@@ -166,10 +166,15 @@ 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`.
|
|
170
171
|
if (isPlainObject(modules)) {
|
|
171
172
|
for (const [key, module] of Object.entries(modules)) {
|
|
172
|
-
if (
|
|
173
|
+
if (
|
|
174
|
+
module &&
|
|
175
|
+
module.name !== key &&
|
|
176
|
+
module.name?.match(/^_?(.*?)\d*$/)?.[1] === key
|
|
177
|
+
) {
|
|
173
178
|
Object.defineProperty(module, 'name', {
|
|
174
179
|
value: key,
|
|
175
180
|
writable: false,
|