@nocobase/plugin-file-manager 1.5.0-beta.2 → 1.5.0-beta.21
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/dist/client/index.js +1 -1
- package/dist/externalVersion.js +6 -6
- package/dist/node_modules/@aws-sdk/client-s3/package.json +1 -1
- package/dist/node_modules/mime-match/package.json +1 -1
- package/dist/node_modules/mkdirp/package.json +1 -1
- package/dist/node_modules/multer-aliyun-oss/index.js +14 -14
- package/dist/node_modules/multer-aliyun-oss/package.json +1 -1
- package/dist/node_modules/multer-cos/index.js +3 -3
- package/dist/node_modules/multer-cos/package.json +1 -1
- package/dist/node_modules/multer-s3/package.json +1 -1
- package/dist/server/server.d.ts +1 -1
- package/dist/server/server.js +18 -12
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"_from":"multer-cos","_id":"multer-cos@1.0.2","_inBundle":false,"_integrity":"sha512-4F8P1VTCSNhiem+BFJFLe3Ixco6cIuAQ6j7U+PBRvdbBJRZgq5Q+vaDMMBWJ1HmPGOOP3AyKS5yk2f0nbFoqqA==","_location":"/multer-cos","_phantomChildren":{},"_requested":{"type":"tag","registry":true,"raw":"multer-cos","name":"multer-cos","escapedName":"multer-cos","rawSpec":"","saveSpec":null,"fetchSpec":"latest"},"_requiredBy":["#USER","/"],"_resolved":"https://registry.npmjs.org/multer-cos/-/multer-cos-1.0.2.tgz","_shasum":"95c7c06cdee1b9311675a895481f9d946de6dcf3","_spec":"multer-cos","_where":"/Users/lanbo/workplace/websocket","author":{"name":"lanbosm"},"bugs":{"url":"https://github.com/lanbosm/multer-COS/issues"},"bundleDependencies":false,"deprecated":false,"description":"Streaming multer storage engine for QCloud COS","devDependencies":{"cos-nodejs-sdk-v5":"^2.2.6","dotenv":"^5.0.1","multer":"^1.3.0"},"engines":{"node":">= 6.10.0"},"homepage":"https://github.com/lanbosm/multer-COS#readme","keywords":["express","multer","COS"],"license":"MIT","main":"index.js","name":"multer-cos","repository":{"type":"git","url":"git+ssh://git@github.com/lanbosm/multer-COS.git"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"version":"1.0.3","_lastModified":"
|
|
1
|
+
{"_from":"multer-cos","_id":"multer-cos@1.0.2","_inBundle":false,"_integrity":"sha512-4F8P1VTCSNhiem+BFJFLe3Ixco6cIuAQ6j7U+PBRvdbBJRZgq5Q+vaDMMBWJ1HmPGOOP3AyKS5yk2f0nbFoqqA==","_location":"/multer-cos","_phantomChildren":{},"_requested":{"type":"tag","registry":true,"raw":"multer-cos","name":"multer-cos","escapedName":"multer-cos","rawSpec":"","saveSpec":null,"fetchSpec":"latest"},"_requiredBy":["#USER","/"],"_resolved":"https://registry.npmjs.org/multer-cos/-/multer-cos-1.0.2.tgz","_shasum":"95c7c06cdee1b9311675a895481f9d946de6dcf3","_spec":"multer-cos","_where":"/Users/lanbo/workplace/websocket","author":{"name":"lanbosm"},"bugs":{"url":"https://github.com/lanbosm/multer-COS/issues"},"bundleDependencies":false,"deprecated":false,"description":"Streaming multer storage engine for QCloud COS","devDependencies":{"cos-nodejs-sdk-v5":"^2.2.6","dotenv":"^5.0.1","multer":"^1.3.0"},"engines":{"node":">= 6.10.0"},"homepage":"https://github.com/lanbosm/multer-COS#readme","keywords":["express","multer","COS"],"license":"MIT","main":"index.js","name":"multer-cos","repository":{"type":"git","url":"git+ssh://git@github.com/lanbosm/multer-COS.git"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"version":"1.0.3","_lastModified":"2025-01-03T00:41:29.755Z"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"multer-s3","version":"3.0.1","description":"Streaming multer storage engine for AWS S3","main":"index.js","scripts":{"test":"standard && mocha test/basic.js"},"engines":{"node":">= 12.0.0"},"repository":{"type":"git","url":"git+https://github.com/badunk/multer-s3.git"},"keywords":["multer","s3","amazon","aws"],"author":"badunk","license":"MIT","bugs":{"url":"https://github.com/badunk/multer-s3/issues"},"homepage":"https://github.com/badunk/multer-s3#readme","dependencies":{"@aws-sdk/lib-storage":"^3.46.0","file-type":"^3.3.0","html-comment-regex":"^1.1.2","run-parallel":"^1.1.6"},"peerDependencies":{"@aws-sdk/client-s3":"^3.0.0"},"devDependencies":{"express":"^4.13.1","form-data":"^1.0.0-rc3","mocha":"^2.2.5","multer":"^1.1.0","on-finished":"^2.3.0","standard":"^5.4.1","xtend":"^4.0.1"},"_lastModified":"
|
|
1
|
+
{"name":"multer-s3","version":"3.0.1","description":"Streaming multer storage engine for AWS S3","main":"index.js","scripts":{"test":"standard && mocha test/basic.js"},"engines":{"node":">= 12.0.0"},"repository":{"type":"git","url":"git+https://github.com/badunk/multer-s3.git"},"keywords":["multer","s3","amazon","aws"],"author":"badunk","license":"MIT","bugs":{"url":"https://github.com/badunk/multer-s3/issues"},"homepage":"https://github.com/badunk/multer-s3#readme","dependencies":{"@aws-sdk/lib-storage":"^3.46.0","file-type":"^3.3.0","html-comment-regex":"^1.1.2","run-parallel":"^1.1.6"},"peerDependencies":{"@aws-sdk/client-s3":"^3.0.0"},"devDependencies":{"express":"^4.13.1","form-data":"^1.0.0-rc3","mocha":"^2.2.5","multer":"^1.1.0","on-finished":"^2.3.0","standard":"^5.4.1","xtend":"^4.0.1"},"_lastModified":"2025-01-03T00:41:25.906Z"}
|
package/dist/server/server.d.ts
CHANGED
|
@@ -31,7 +31,7 @@ export default class PluginFileManagerServer extends Plugin {
|
|
|
31
31
|
transaction: any;
|
|
32
32
|
}): Promise<void>;
|
|
33
33
|
install(): Promise<void>;
|
|
34
|
-
|
|
34
|
+
handleSyncMessage(message: any): Promise<void>;
|
|
35
35
|
beforeLoad(): Promise<void>;
|
|
36
36
|
load(): Promise<void>;
|
|
37
37
|
}
|
package/dist/server/server.js
CHANGED
|
@@ -144,7 +144,7 @@ class PluginFileManagerServer extends import_server.Plugin {
|
|
|
144
144
|
});
|
|
145
145
|
}
|
|
146
146
|
}
|
|
147
|
-
async
|
|
147
|
+
async handleSyncMessage(message) {
|
|
148
148
|
if (message.type === "storageChange") {
|
|
149
149
|
const storage = await this.db.getRepository("storages").findOne({
|
|
150
150
|
filterByTk: message.storageId
|
|
@@ -154,7 +154,7 @@ class PluginFileManagerServer extends import_server.Plugin {
|
|
|
154
154
|
}
|
|
155
155
|
}
|
|
156
156
|
if (message.type === "storageRemove") {
|
|
157
|
-
const id =
|
|
157
|
+
const id = message.storageId;
|
|
158
158
|
this.storagesCache.delete(id);
|
|
159
159
|
}
|
|
160
160
|
}
|
|
@@ -178,19 +178,25 @@ class PluginFileManagerServer extends import_server.Plugin {
|
|
|
178
178
|
directory: (0, import_path.resolve)(__dirname, "./collections")
|
|
179
179
|
});
|
|
180
180
|
const Storage = this.db.getModel("storages");
|
|
181
|
-
Storage.afterSave((m) => {
|
|
181
|
+
Storage.afterSave((m, { transaction }) => {
|
|
182
182
|
this.storagesCache.set(m.id, m.toJSON());
|
|
183
|
-
this.
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
183
|
+
this.sendSyncMessage(
|
|
184
|
+
{
|
|
185
|
+
type: "storageChange",
|
|
186
|
+
storageId: m.id
|
|
187
|
+
},
|
|
188
|
+
{ transaction }
|
|
189
|
+
);
|
|
187
190
|
});
|
|
188
|
-
Storage.afterDestroy((m) => {
|
|
191
|
+
Storage.afterDestroy((m, { transaction }) => {
|
|
189
192
|
this.storagesCache.delete(m.id);
|
|
190
|
-
this.
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
193
|
+
this.sendSyncMessage(
|
|
194
|
+
{
|
|
195
|
+
type: "storageRemove",
|
|
196
|
+
storageId: m.id
|
|
197
|
+
},
|
|
198
|
+
{ transaction }
|
|
199
|
+
);
|
|
194
200
|
});
|
|
195
201
|
this.app.acl.registerSnippet({
|
|
196
202
|
name: `pm.${this.name}.storages`,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nocobase/plugin-file-manager",
|
|
3
|
-
"version": "1.5.0-beta.
|
|
3
|
+
"version": "1.5.0-beta.21",
|
|
4
4
|
"displayName": "File manager",
|
|
5
5
|
"displayName.zh-CN": "文件管理器",
|
|
6
6
|
"description": "Provides files storage services with files collection template and attachment field.",
|
|
@@ -43,5 +43,5 @@
|
|
|
43
43
|
"Collections",
|
|
44
44
|
"Collection fields"
|
|
45
45
|
],
|
|
46
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "6a2c545d9e5e4f073592c810e704e6b0fe9aa096"
|
|
47
47
|
}
|