@xuda.io/drive_module 1.1.1404 → 1.1.1406
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.mjs +5 -4
- package/index_ms.mjs +78 -69
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -27,6 +27,7 @@ global._conf = (
|
|
|
27
27
|
|
|
28
28
|
const _common = await import(path.join(process.env.XUDA_HOME, 'common', 'xuda_node_common.mjs'));
|
|
29
29
|
const _utils = await import(path.join(process.env.XUDA_HOME, 'common', 'xuda-cpi-utils.mjs'));
|
|
30
|
+
const { get_account_default_project_id } = await import(path.join(process.env.XUDA_HOME, 'common', 'cache_cpi.mjs'));
|
|
30
31
|
|
|
31
32
|
const module_path = path.join(process.env.XUDA_HOME, 'cpi') + (!_conf.is_debug ? '/node_modules/@xuda.io' : '');
|
|
32
33
|
const fs_module = await import(`${module_path}/fs_module/index.mjs`);
|
|
@@ -1686,7 +1687,7 @@ const get_folder_size = async (dir, drive_type, app_id, uid) => {
|
|
|
1686
1687
|
if (drive_type === 'user') {
|
|
1687
1688
|
// opt.selector.uid = uid;
|
|
1688
1689
|
|
|
1689
|
-
const app_id = await
|
|
1690
|
+
const app_id = await get_account_default_project_id(uid);
|
|
1690
1691
|
ret = await db_module.find_app_couch_query(app_id, opt);
|
|
1691
1692
|
} else {
|
|
1692
1693
|
ret = await db_module.find_app_couch_query(app_id, opt);
|
|
@@ -2123,19 +2124,19 @@ export const getExtensionFromUrl = function (imageUrl) {
|
|
|
2123
2124
|
};
|
|
2124
2125
|
|
|
2125
2126
|
export const get_user_drive_file = async function (uid, filename) {
|
|
2126
|
-
const app_id = await
|
|
2127
|
+
const app_id = await get_account_default_project_id(uid);
|
|
2127
2128
|
const drive_ret = await db_module.get_app_couch_doc(app_id, filename);
|
|
2128
2129
|
return drive_ret;
|
|
2129
2130
|
};
|
|
2130
2131
|
|
|
2131
2132
|
export const save_user_drive_file = async function (uid, drive_doc) {
|
|
2132
|
-
const app_id = await
|
|
2133
|
+
const app_id = await get_account_default_project_id(uid);
|
|
2133
2134
|
const save_ret = await db_module.save_app_couch_doc(app_id, drive_doc);
|
|
2134
2135
|
return save_ret;
|
|
2135
2136
|
};
|
|
2136
2137
|
|
|
2137
2138
|
export const find_contact_query = async function (uid, opt) {
|
|
2138
|
-
const app_id = await
|
|
2139
|
+
const app_id = await get_account_default_project_id(uid);
|
|
2139
2140
|
const ret = await db_module.find_app_couch_query(app_id, opt);
|
|
2140
2141
|
return ret;
|
|
2141
2142
|
};
|
package/index_ms.mjs
CHANGED
|
@@ -3,271 +3,280 @@
|
|
|
3
3
|
// Queue target : drive_module
|
|
4
4
|
// =====================================================
|
|
5
5
|
|
|
6
|
-
import path from 'node:path';
|
|
7
6
|
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
import path from 'node:path';
|
|
8
|
+
|
|
9
|
+
const { MessageBroker } = await import(path.join(process.env.XUDA_HOME, 'common', 'ms_broker.mjs'));
|
|
10
|
+
|
|
11
|
+
const broker = new MessageBroker();
|
|
12
|
+
|
|
13
|
+
await broker.init({
|
|
14
|
+
queueName: 'drive_module',
|
|
15
|
+
module_in: global.module_in
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
|
|
10
19
|
|
|
11
20
|
export const get_drive_files = async function (...args) {
|
|
12
|
-
return await
|
|
21
|
+
return await broker.send_to_queue("get_drive_files", ...args);
|
|
13
22
|
};
|
|
14
23
|
|
|
15
24
|
export const get_drive_file_info = async function (...args) {
|
|
16
|
-
return await
|
|
25
|
+
return await broker.send_to_queue("get_drive_file_info", ...args);
|
|
17
26
|
};
|
|
18
27
|
|
|
19
28
|
export const delete_drive_files = async function (...args) {
|
|
20
|
-
return await
|
|
29
|
+
return await broker.send_to_queue("delete_drive_files", ...args);
|
|
21
30
|
};
|
|
22
31
|
|
|
23
32
|
export const update_drive_file = async function (...args) {
|
|
24
|
-
return await
|
|
33
|
+
return await broker.send_to_queue("update_drive_file", ...args);
|
|
25
34
|
};
|
|
26
35
|
|
|
27
36
|
export const create_drive_folder = async function (...args) {
|
|
28
|
-
return await
|
|
37
|
+
return await broker.send_to_queue("create_drive_folder", ...args);
|
|
29
38
|
};
|
|
30
39
|
|
|
31
40
|
export const rename_drive_file = async function (...args) {
|
|
32
|
-
return await
|
|
41
|
+
return await broker.send_to_queue("rename_drive_file", ...args);
|
|
33
42
|
};
|
|
34
43
|
|
|
35
44
|
export const rename_drive_folder = async function (...args) {
|
|
36
|
-
return await
|
|
45
|
+
return await broker.send_to_queue("rename_drive_folder", ...args);
|
|
37
46
|
};
|
|
38
47
|
|
|
39
48
|
export const update_drive_file_sharing_mode = async function (...args) {
|
|
40
|
-
return await
|
|
49
|
+
return await broker.send_to_queue("update_drive_file_sharing_mode", ...args);
|
|
41
50
|
};
|
|
42
51
|
|
|
43
52
|
export const extract_drive_file = async function (...args) {
|
|
44
|
-
return await
|
|
53
|
+
return await broker.send_to_queue("extract_drive_file", ...args);
|
|
45
54
|
};
|
|
46
55
|
|
|
47
56
|
export const delete_file_bulk = async function (...args) {
|
|
48
|
-
return await
|
|
57
|
+
return await broker.send_to_queue("delete_file_bulk", ...args);
|
|
49
58
|
};
|
|
50
59
|
|
|
51
60
|
export const upload_drive_file = async function (...args) {
|
|
52
|
-
return await
|
|
61
|
+
return await broker.send_to_queue("upload_drive_file", ...args);
|
|
53
62
|
};
|
|
54
63
|
|
|
55
64
|
export const check_drive_file = async function (...args) {
|
|
56
|
-
return await
|
|
65
|
+
return await broker.send_to_queue("check_drive_file", ...args);
|
|
57
66
|
};
|
|
58
67
|
|
|
59
68
|
export const run_drive_pending_ocr = async function (...args) {
|
|
60
|
-
return await
|
|
69
|
+
return await broker.send_to_queue("run_drive_pending_ocr", ...args);
|
|
61
70
|
};
|
|
62
71
|
|
|
63
72
|
export const get_drive_size = async function (...args) {
|
|
64
|
-
return await
|
|
73
|
+
return await broker.send_to_queue("get_drive_size", ...args);
|
|
65
74
|
};
|
|
66
75
|
|
|
67
76
|
export const copy_file_to_another_bucket = async function (...args) {
|
|
68
|
-
return await
|
|
77
|
+
return await broker.send_to_queue("copy_file_to_another_bucket", ...args);
|
|
69
78
|
};
|
|
70
79
|
|
|
71
80
|
export const delete_file_from_bucket = async function (...args) {
|
|
72
|
-
return await
|
|
81
|
+
return await broker.send_to_queue("delete_file_from_bucket", ...args);
|
|
73
82
|
};
|
|
74
83
|
|
|
75
84
|
export const update_drive_file_tags = async function (...args) {
|
|
76
|
-
return await
|
|
85
|
+
return await broker.send_to_queue("update_drive_file_tags", ...args);
|
|
77
86
|
};
|
|
78
87
|
|
|
79
88
|
export const compile_javascript_program_in_studio_drive = async function (...args) {
|
|
80
|
-
return await
|
|
89
|
+
return await broker.send_to_queue("compile_javascript_program_in_studio_drive", ...args);
|
|
81
90
|
};
|
|
82
91
|
|
|
83
92
|
export const update_drive_addons = async function (...args) {
|
|
84
|
-
return await
|
|
93
|
+
return await broker.send_to_queue("update_drive_addons", ...args);
|
|
85
94
|
};
|
|
86
95
|
|
|
87
96
|
export const get_drive_files_workspace = async function (...args) {
|
|
88
|
-
return await
|
|
97
|
+
return await broker.send_to_queue("get_drive_files_workspace", ...args);
|
|
89
98
|
};
|
|
90
99
|
|
|
91
100
|
export const get_drive_files_studio = async function (...args) {
|
|
92
|
-
return await
|
|
101
|
+
return await broker.send_to_queue("get_drive_files_studio", ...args);
|
|
93
102
|
};
|
|
94
103
|
|
|
95
104
|
export const get_drive_files_user = async function (...args) {
|
|
96
|
-
return await
|
|
105
|
+
return await broker.send_to_queue("get_drive_files_user", ...args);
|
|
97
106
|
};
|
|
98
107
|
|
|
99
108
|
export const get_drive_file_info_workspace = async function (...args) {
|
|
100
|
-
return await
|
|
109
|
+
return await broker.send_to_queue("get_drive_file_info_workspace", ...args);
|
|
101
110
|
};
|
|
102
111
|
|
|
103
112
|
export const get_drive_file_info_studio = async function (...args) {
|
|
104
|
-
return await
|
|
113
|
+
return await broker.send_to_queue("get_drive_file_info_studio", ...args);
|
|
105
114
|
};
|
|
106
115
|
|
|
107
116
|
export const get_drive_file_info_user = async function (...args) {
|
|
108
|
-
return await
|
|
117
|
+
return await broker.send_to_queue("get_drive_file_info_user", ...args);
|
|
109
118
|
};
|
|
110
119
|
|
|
111
120
|
export const delete_drive_files_workspace = async function (...args) {
|
|
112
|
-
return await
|
|
121
|
+
return await broker.send_to_queue("delete_drive_files_workspace", ...args);
|
|
113
122
|
};
|
|
114
123
|
|
|
115
124
|
export const delete_drive_files_studio = async function (...args) {
|
|
116
|
-
return await
|
|
125
|
+
return await broker.send_to_queue("delete_drive_files_studio", ...args);
|
|
117
126
|
};
|
|
118
127
|
|
|
119
128
|
export const delete_drive_files_user = async function (...args) {
|
|
120
|
-
return await
|
|
129
|
+
return await broker.send_to_queue("delete_drive_files_user", ...args);
|
|
121
130
|
};
|
|
122
131
|
|
|
123
132
|
export const extract_drive_file_workspace = async function (...args) {
|
|
124
|
-
return await
|
|
133
|
+
return await broker.send_to_queue("extract_drive_file_workspace", ...args);
|
|
125
134
|
};
|
|
126
135
|
|
|
127
136
|
export const extract_drive_file_studio = async function (...args) {
|
|
128
|
-
return await
|
|
137
|
+
return await broker.send_to_queue("extract_drive_file_studio", ...args);
|
|
129
138
|
};
|
|
130
139
|
|
|
131
140
|
export const extract_drive_file_user = async function (...args) {
|
|
132
|
-
return await
|
|
141
|
+
return await broker.send_to_queue("extract_drive_file_user", ...args);
|
|
133
142
|
};
|
|
134
143
|
|
|
135
144
|
export const upload_drive_file_workspace = async function (...args) {
|
|
136
|
-
return await
|
|
145
|
+
return await broker.send_to_queue("upload_drive_file_workspace", ...args);
|
|
137
146
|
};
|
|
138
147
|
|
|
139
148
|
export const upload_drive_file_studio = async function (...args) {
|
|
140
|
-
return await
|
|
149
|
+
return await broker.send_to_queue("upload_drive_file_studio", ...args);
|
|
141
150
|
};
|
|
142
151
|
|
|
143
152
|
export const upload_drive_file_user = async function (...args) {
|
|
144
|
-
return await
|
|
153
|
+
return await broker.send_to_queue("upload_drive_file_user", ...args);
|
|
145
154
|
};
|
|
146
155
|
|
|
147
156
|
export const update_drive_file_workspace = async function (...args) {
|
|
148
|
-
return await
|
|
157
|
+
return await broker.send_to_queue("update_drive_file_workspace", ...args);
|
|
149
158
|
};
|
|
150
159
|
|
|
151
160
|
export const update_drive_file_studio = async function (...args) {
|
|
152
|
-
return await
|
|
161
|
+
return await broker.send_to_queue("update_drive_file_studio", ...args);
|
|
153
162
|
};
|
|
154
163
|
|
|
155
164
|
export const update_drive_file_user = async function (...args) {
|
|
156
|
-
return await
|
|
165
|
+
return await broker.send_to_queue("update_drive_file_user", ...args);
|
|
157
166
|
};
|
|
158
167
|
|
|
159
168
|
export const create_drive_folder_workspace = async function (...args) {
|
|
160
|
-
return await
|
|
169
|
+
return await broker.send_to_queue("create_drive_folder_workspace", ...args);
|
|
161
170
|
};
|
|
162
171
|
|
|
163
172
|
export const create_drive_folder_studio = async function (...args) {
|
|
164
|
-
return await
|
|
173
|
+
return await broker.send_to_queue("create_drive_folder_studio", ...args);
|
|
165
174
|
};
|
|
166
175
|
|
|
167
176
|
export const create_drive_folder_user = async function (...args) {
|
|
168
|
-
return await
|
|
177
|
+
return await broker.send_to_queue("create_drive_folder_user", ...args);
|
|
169
178
|
};
|
|
170
179
|
|
|
171
180
|
export const rename_drive_file_workspace = async function (...args) {
|
|
172
|
-
return await
|
|
181
|
+
return await broker.send_to_queue("rename_drive_file_workspace", ...args);
|
|
173
182
|
};
|
|
174
183
|
|
|
175
184
|
export const rename_drive_file_studio = async function (...args) {
|
|
176
|
-
return await
|
|
185
|
+
return await broker.send_to_queue("rename_drive_file_studio", ...args);
|
|
177
186
|
};
|
|
178
187
|
|
|
179
188
|
export const rename_drive_file_user = async function (...args) {
|
|
180
|
-
return await
|
|
189
|
+
return await broker.send_to_queue("rename_drive_file_user", ...args);
|
|
181
190
|
};
|
|
182
191
|
|
|
183
192
|
export const rename_drive_folder_workspace = async function (...args) {
|
|
184
|
-
return await
|
|
193
|
+
return await broker.send_to_queue("rename_drive_folder_workspace", ...args);
|
|
185
194
|
};
|
|
186
195
|
|
|
187
196
|
export const rename_drive_folder_studio = async function (...args) {
|
|
188
|
-
return await
|
|
197
|
+
return await broker.send_to_queue("rename_drive_folder_studio", ...args);
|
|
189
198
|
};
|
|
190
199
|
|
|
191
200
|
export const rename_drive_folder_user = async function (...args) {
|
|
192
|
-
return await
|
|
201
|
+
return await broker.send_to_queue("rename_drive_folder_user", ...args);
|
|
193
202
|
};
|
|
194
203
|
|
|
195
204
|
export const update_drive_file_sharing_mode_workspace = async function (...args) {
|
|
196
|
-
return await
|
|
205
|
+
return await broker.send_to_queue("update_drive_file_sharing_mode_workspace", ...args);
|
|
197
206
|
};
|
|
198
207
|
|
|
199
208
|
export const update_drive_file_sharing_mode_studio = async function (...args) {
|
|
200
|
-
return await
|
|
209
|
+
return await broker.send_to_queue("update_drive_file_sharing_mode_studio", ...args);
|
|
201
210
|
};
|
|
202
211
|
|
|
203
212
|
export const update_drive_file_sharing_mode_user = async function (...args) {
|
|
204
|
-
return await
|
|
213
|
+
return await broker.send_to_queue("update_drive_file_sharing_mode_user", ...args);
|
|
205
214
|
};
|
|
206
215
|
|
|
207
216
|
export const delete_file_bulk_workspace = async function (...args) {
|
|
208
|
-
return await
|
|
217
|
+
return await broker.send_to_queue("delete_file_bulk_workspace", ...args);
|
|
209
218
|
};
|
|
210
219
|
|
|
211
220
|
export const delete_file_bulk_studio = async function (...args) {
|
|
212
|
-
return await
|
|
221
|
+
return await broker.send_to_queue("delete_file_bulk_studio", ...args);
|
|
213
222
|
};
|
|
214
223
|
|
|
215
224
|
export const delete_file_bulk_user = async function (...args) {
|
|
216
|
-
return await
|
|
225
|
+
return await broker.send_to_queue("delete_file_bulk_user", ...args);
|
|
217
226
|
};
|
|
218
227
|
|
|
219
228
|
export const check_drive_file_workspace = async function (...args) {
|
|
220
|
-
return await
|
|
229
|
+
return await broker.send_to_queue("check_drive_file_workspace", ...args);
|
|
221
230
|
};
|
|
222
231
|
|
|
223
232
|
export const check_drive_file_studio = async function (...args) {
|
|
224
|
-
return await
|
|
233
|
+
return await broker.send_to_queue("check_drive_file_studio", ...args);
|
|
225
234
|
};
|
|
226
235
|
|
|
227
236
|
export const check_drive_file_user = async function (...args) {
|
|
228
|
-
return await
|
|
237
|
+
return await broker.send_to_queue("check_drive_file_user", ...args);
|
|
229
238
|
};
|
|
230
239
|
|
|
231
240
|
export const update_drive_file_tags_workspace = async function (...args) {
|
|
232
|
-
return await
|
|
241
|
+
return await broker.send_to_queue("update_drive_file_tags_workspace", ...args);
|
|
233
242
|
};
|
|
234
243
|
|
|
235
244
|
export const update_drive_file_tags_studio = async function (...args) {
|
|
236
|
-
return await
|
|
245
|
+
return await broker.send_to_queue("update_drive_file_tags_studio", ...args);
|
|
237
246
|
};
|
|
238
247
|
|
|
239
248
|
export const update_drive_file_tags_user = async function (...args) {
|
|
240
|
-
return await
|
|
249
|
+
return await broker.send_to_queue("update_drive_file_tags_user", ...args);
|
|
241
250
|
};
|
|
242
251
|
|
|
243
252
|
export const update_drive_addons_workspace = async function (...args) {
|
|
244
|
-
return await
|
|
253
|
+
return await broker.send_to_queue("update_drive_addons_workspace", ...args);
|
|
245
254
|
};
|
|
246
255
|
|
|
247
256
|
export const update_drive_addons_studio = async function (...args) {
|
|
248
|
-
return await
|
|
257
|
+
return await broker.send_to_queue("update_drive_addons_studio", ...args);
|
|
249
258
|
};
|
|
250
259
|
|
|
251
260
|
export const update_drive_addons_user = async function (...args) {
|
|
252
|
-
return await
|
|
261
|
+
return await broker.send_to_queue("update_drive_addons_user", ...args);
|
|
253
262
|
};
|
|
254
263
|
|
|
255
264
|
export const getExtensionFromUrl = async function (...args) {
|
|
256
|
-
return await
|
|
265
|
+
return await broker.send_to_queue("getExtensionFromUrl", ...args);
|
|
257
266
|
};
|
|
258
267
|
|
|
259
268
|
export const get_user_drive_file = async function (...args) {
|
|
260
|
-
return await
|
|
269
|
+
return await broker.send_to_queue("get_user_drive_file", ...args);
|
|
261
270
|
};
|
|
262
271
|
|
|
263
272
|
export const save_user_drive_file = async function (...args) {
|
|
264
|
-
return await
|
|
273
|
+
return await broker.send_to_queue("save_user_drive_file", ...args);
|
|
265
274
|
};
|
|
266
275
|
|
|
267
276
|
export const find_contact_query = async function (...args) {
|
|
268
|
-
return await
|
|
277
|
+
return await broker.send_to_queue("find_contact_query", ...args);
|
|
269
278
|
};
|
|
270
279
|
|
|
271
280
|
export const file_upload_validator = async function (...args) {
|
|
272
|
-
return await
|
|
281
|
+
return await broker.send_to_queue("file_upload_validator", ...args);
|
|
273
282
|
};
|