@ditojs/server 1.29.0 → 1.30.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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ditojs/server",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.30.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",
|
|
@@ -22,10 +22,10 @@
|
|
|
22
22
|
"node >= 18"
|
|
23
23
|
],
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@ditojs/admin": "^1.
|
|
26
|
-
"@ditojs/build": "^1.
|
|
27
|
-
"@ditojs/router": "^1.
|
|
28
|
-
"@ditojs/utils": "^1.
|
|
25
|
+
"@ditojs/admin": "^1.30.0",
|
|
26
|
+
"@ditojs/build": "^1.30.0",
|
|
27
|
+
"@ditojs/router": "^1.30.0",
|
|
28
|
+
"@ditojs/utils": "^1.30.0",
|
|
29
29
|
"@koa/cors": "^4.0.0",
|
|
30
30
|
"@koa/multer": "^3.0.2",
|
|
31
31
|
"@originjs/vite-plugin-commonjs": "^1.0.3",
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
"typescript": "^5.0.2"
|
|
91
91
|
},
|
|
92
92
|
"types": "types",
|
|
93
|
-
"gitHead": "
|
|
93
|
+
"gitHead": "5d09dc24ecb77b511f3c25643275ea1b9514fb52",
|
|
94
94
|
"scripts": {
|
|
95
95
|
"types": "tsc --noEmit ./src/index.d.ts"
|
|
96
96
|
},
|
package/src/app/Application.js
CHANGED
|
@@ -819,12 +819,13 @@ export class Application extends Koa {
|
|
|
819
819
|
addedFiles.length > 0 ||
|
|
820
820
|
removedFiles.length > 0
|
|
821
821
|
) {
|
|
822
|
-
const changeCount = (files, increment) =>
|
|
823
|
-
files.length > 0
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
822
|
+
const changeCount = async (files, increment) => {
|
|
823
|
+
if (files.length > 0) {
|
|
824
|
+
await AssetModel.query(trx)
|
|
825
|
+
.whereIn('key', files.map(file => file.key))
|
|
826
|
+
.increment('count', increment)
|
|
827
|
+
}
|
|
828
|
+
}
|
|
828
829
|
await Promise.all([
|
|
829
830
|
changeCount(addedFiles, 1),
|
|
830
831
|
changeCount(removedFiles, -1)
|
|
@@ -6,11 +6,7 @@ import { createVuePlugin } from 'vite-plugin-vue2'
|
|
|
6
6
|
import {
|
|
7
7
|
viteCommonjs as createCommonJsPlugin
|
|
8
8
|
} from '@originjs/vite-plugin-commonjs'
|
|
9
|
-
import {
|
|
10
|
-
createRollupImportsResolver,
|
|
11
|
-
testModuleIdentifier,
|
|
12
|
-
getPostCssConfig
|
|
13
|
-
} from '@ditojs/build'
|
|
9
|
+
import { testModuleIdentifier, getPostCssConfig } from '@ditojs/build'
|
|
14
10
|
import { merge } from '@ditojs/utils'
|
|
15
11
|
import { Controller } from './Controller.js'
|
|
16
12
|
import { handleConnectMiddleware } from '../middleware/index.js'
|
|
@@ -237,8 +233,7 @@ export class AdminController extends Controller {
|
|
|
237
233
|
{
|
|
238
234
|
find: '@',
|
|
239
235
|
replacement: root
|
|
240
|
-
}
|
|
241
|
-
createRollupImportsResolver({ cwd: root })
|
|
236
|
+
}
|
|
242
237
|
]
|
|
243
238
|
}
|
|
244
239
|
}, config))
|