@kne/fastify-file-manager 1.1.0 → 1.1.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/index.js +7 -1
- package/package.json +2 -2
package/index.js
CHANGED
|
@@ -9,6 +9,7 @@ module.exports = fp(
|
|
|
9
9
|
root: path.join(process.cwd(), 'static'),
|
|
10
10
|
namespace: 'default',
|
|
11
11
|
prefix: '/api/static',
|
|
12
|
+
dbTableNamePrefix: 't_file_manager_',
|
|
12
13
|
multipart: {},
|
|
13
14
|
static: {},
|
|
14
15
|
authenticateFileRead: async () => {},
|
|
@@ -23,7 +24,12 @@ module.exports = fp(
|
|
|
23
24
|
name: 'fileManager',
|
|
24
25
|
options,
|
|
25
26
|
modules: [
|
|
26
|
-
[
|
|
27
|
+
[
|
|
28
|
+
'models',
|
|
29
|
+
await fastify.sequelize.addModels(path.resolve(__dirname, './libs/models'), {
|
|
30
|
+
prefix: options.dbTableNamePrefix
|
|
31
|
+
})
|
|
32
|
+
],
|
|
27
33
|
['services', path.resolve(__dirname, './libs/services')],
|
|
28
34
|
['controllers', path.resolve(__dirname, './libs/controllers')]
|
|
29
35
|
]
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kne/fastify-file-manager",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.2",
|
|
4
4
|
"description": "用于管理静态文件上传查看等",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
},
|
|
33
33
|
"homepage": "https://github.com/kne-union/fastify-file-manager#readme",
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@kne/fastify-sequelize": "^2.0.
|
|
35
|
+
"@kne/fastify-sequelize": "^2.0.1",
|
|
36
36
|
"fastify": "^4.27.0",
|
|
37
37
|
"husky": "^9.0.11",
|
|
38
38
|
"prettier": "^3.2.5",
|