@xuda.io/drive_module 1.1.1411 → 1.1.1413

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.
Files changed (3) hide show
  1. package/index.mjs +7 -7
  2. package/index_msa.mjs +282 -0
  3. package/package.json +1 -1
package/index.mjs CHANGED
@@ -35,7 +35,7 @@ const db_module = await import(`${module_path}/db_module/index.mjs`);
35
35
 
36
36
  const account_ms = await import(`${module_path}/account_module/index_ms.mjs`);
37
37
 
38
- const misc_ms = await import(`${module_path}/misc_module/index_ms.mjs`);
38
+ const misc_msa = await import(`${module_path}/misc_module/index_msa.mjs`);
39
39
 
40
40
  ////////////////////////////////////////////
41
41
 
@@ -516,7 +516,7 @@ export const delete_drive_files = async (req, job_id, headers) => {
516
516
  save_ret = await db_module.save_app_couch_doc(app_id_reference, doc);
517
517
  }
518
518
 
519
- misc_ms.rsync_drive_resources_to_remote_servers('studio', app_id_reference);
519
+ misc_msa.rsync_drive_resources_to_remote_servers('studio', app_id_reference);
520
520
  break;
521
521
  }
522
522
 
@@ -615,7 +615,7 @@ export const update_drive_file = async (req, job_id, headers, file_obj) => {
615
615
  const app_id_reference = await _common.get_project_app_id(app_id);
616
616
  save_ret = await db_module.save_app_couch_doc(app_id_reference, doc);
617
617
 
618
- misc_ms.rsync_drive_resources_to_remote_servers('studio', app_id_reference);
618
+ misc_msa.rsync_drive_resources_to_remote_servers('studio', app_id_reference);
619
619
  break;
620
620
  }
621
621
  case 'workspace': {
@@ -742,7 +742,7 @@ export const create_drive_folder = async (req, job_id, headers) => {
742
742
  await create_directory(fs_target_dir, 0o775, true);
743
743
  doc._id = target_dir;
744
744
  save_ret = await db_module.save_app_couch_doc(app_id_master, doc);
745
- misc_ms.rsync_drive_resources_to_remote_servers('studio', app_id_master);
745
+ misc_msa.rsync_drive_resources_to_remote_servers('studio', app_id_master);
746
746
  break;
747
747
  }
748
748
 
@@ -861,7 +861,7 @@ export const rename_drive_folder = async (req) => {
861
861
  doc_ret.data._id = new_path;
862
862
  delete doc_ret.data._rev;
863
863
 
864
- misc_ms.rsync_drive_resources_to_remote_servers('studio', app_id_reference);
864
+ misc_msa.rsync_drive_resources_to_remote_servers('studio', app_id_reference);
865
865
  break;
866
866
  }
867
867
  case 'workspace': {
@@ -1197,7 +1197,7 @@ export const upload_drive_file = async (req, job_id, headers = {}, file_obj) =>
1197
1197
  doc._id = file_name;
1198
1198
 
1199
1199
  save_ret = await db_module.save_app_couch_doc(ref, doc);
1200
- misc_ms.rsync_drive_resources_to_remote_servers('studio', app_id);
1200
+ misc_msa.rsync_drive_resources_to_remote_servers('studio', app_id);
1201
1201
  break;
1202
1202
  }
1203
1203
  case 'workspace': {
@@ -2018,7 +2018,7 @@ export default {
2018
2018
  await _utils.run_ssh_script(`npm i --prefix ${studio_drive_script_program_folder};`);
2019
2019
  const build_ret = await _utils.run_ssh_script(`npm run build --prefix ${studio_drive_script_program_folder};`);
2020
2020
 
2021
- misc_ms.rsync_drive_resources_to_remote_servers('studio', app_id);
2021
+ misc_msa.rsync_drive_resources_to_remote_servers('studio', app_id);
2022
2022
  const vite_build_res = {
2023
2023
  code: 1,
2024
2024
  data: {
package/index_msa.mjs ADDED
@@ -0,0 +1,282 @@
1
+ // =====================================================
2
+ // Queue wrapper – generated from index.mjs
3
+ // Queue target : drive_module
4
+ // =====================================================
5
+
6
+
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
+
19
+
20
+ export const get_drive_files = function (...args) {
21
+ broker.send_to_queue_async("get_drive_files", ...args);
22
+ };
23
+
24
+ export const get_drive_file_info = function (...args) {
25
+ broker.send_to_queue_async("get_drive_file_info", ...args);
26
+ };
27
+
28
+ export const delete_drive_files = function (...args) {
29
+ broker.send_to_queue_async("delete_drive_files", ...args);
30
+ };
31
+
32
+ export const update_drive_file = function (...args) {
33
+ broker.send_to_queue_async("update_drive_file", ...args);
34
+ };
35
+
36
+ export const create_drive_folder = function (...args) {
37
+ broker.send_to_queue_async("create_drive_folder", ...args);
38
+ };
39
+
40
+ export const rename_drive_file = function (...args) {
41
+ broker.send_to_queue_async("rename_drive_file", ...args);
42
+ };
43
+
44
+ export const rename_drive_folder = function (...args) {
45
+ broker.send_to_queue_async("rename_drive_folder", ...args);
46
+ };
47
+
48
+ export const update_drive_file_sharing_mode = function (...args) {
49
+ broker.send_to_queue_async("update_drive_file_sharing_mode", ...args);
50
+ };
51
+
52
+ export const extract_drive_file = function (...args) {
53
+ broker.send_to_queue_async("extract_drive_file", ...args);
54
+ };
55
+
56
+ export const delete_file_bulk = function (...args) {
57
+ broker.send_to_queue_async("delete_file_bulk", ...args);
58
+ };
59
+
60
+ export const upload_drive_file = function (...args) {
61
+ broker.send_to_queue_async("upload_drive_file", ...args);
62
+ };
63
+
64
+ export const check_drive_file = function (...args) {
65
+ broker.send_to_queue_async("check_drive_file", ...args);
66
+ };
67
+
68
+ export const run_drive_pending_ocr = function (...args) {
69
+ broker.send_to_queue_async("run_drive_pending_ocr", ...args);
70
+ };
71
+
72
+ export const get_drive_size = function (...args) {
73
+ broker.send_to_queue_async("get_drive_size", ...args);
74
+ };
75
+
76
+ export const copy_file_to_another_bucket = function (...args) {
77
+ broker.send_to_queue_async("copy_file_to_another_bucket", ...args);
78
+ };
79
+
80
+ export const delete_file_from_bucket = function (...args) {
81
+ broker.send_to_queue_async("delete_file_from_bucket", ...args);
82
+ };
83
+
84
+ export const update_drive_file_tags = function (...args) {
85
+ broker.send_to_queue_async("update_drive_file_tags", ...args);
86
+ };
87
+
88
+ export const compile_javascript_program_in_studio_drive = function (...args) {
89
+ broker.send_to_queue_async("compile_javascript_program_in_studio_drive", ...args);
90
+ };
91
+
92
+ export const update_drive_addons = function (...args) {
93
+ broker.send_to_queue_async("update_drive_addons", ...args);
94
+ };
95
+
96
+ export const get_drive_files_workspace = function (...args) {
97
+ broker.send_to_queue_async("get_drive_files_workspace", ...args);
98
+ };
99
+
100
+ export const get_drive_files_studio = function (...args) {
101
+ broker.send_to_queue_async("get_drive_files_studio", ...args);
102
+ };
103
+
104
+ export const get_drive_files_user = function (...args) {
105
+ broker.send_to_queue_async("get_drive_files_user", ...args);
106
+ };
107
+
108
+ export const get_drive_file_info_workspace = function (...args) {
109
+ broker.send_to_queue_async("get_drive_file_info_workspace", ...args);
110
+ };
111
+
112
+ export const get_drive_file_info_studio = function (...args) {
113
+ broker.send_to_queue_async("get_drive_file_info_studio", ...args);
114
+ };
115
+
116
+ export const get_drive_file_info_user = function (...args) {
117
+ broker.send_to_queue_async("get_drive_file_info_user", ...args);
118
+ };
119
+
120
+ export const delete_drive_files_workspace = function (...args) {
121
+ broker.send_to_queue_async("delete_drive_files_workspace", ...args);
122
+ };
123
+
124
+ export const delete_drive_files_studio = function (...args) {
125
+ broker.send_to_queue_async("delete_drive_files_studio", ...args);
126
+ };
127
+
128
+ export const delete_drive_files_user = function (...args) {
129
+ broker.send_to_queue_async("delete_drive_files_user", ...args);
130
+ };
131
+
132
+ export const extract_drive_file_workspace = function (...args) {
133
+ broker.send_to_queue_async("extract_drive_file_workspace", ...args);
134
+ };
135
+
136
+ export const extract_drive_file_studio = function (...args) {
137
+ broker.send_to_queue_async("extract_drive_file_studio", ...args);
138
+ };
139
+
140
+ export const extract_drive_file_user = function (...args) {
141
+ broker.send_to_queue_async("extract_drive_file_user", ...args);
142
+ };
143
+
144
+ export const upload_drive_file_workspace = function (...args) {
145
+ broker.send_to_queue_async("upload_drive_file_workspace", ...args);
146
+ };
147
+
148
+ export const upload_drive_file_studio = function (...args) {
149
+ broker.send_to_queue_async("upload_drive_file_studio", ...args);
150
+ };
151
+
152
+ export const upload_drive_file_user = function (...args) {
153
+ broker.send_to_queue_async("upload_drive_file_user", ...args);
154
+ };
155
+
156
+ export const update_drive_file_workspace = function (...args) {
157
+ broker.send_to_queue_async("update_drive_file_workspace", ...args);
158
+ };
159
+
160
+ export const update_drive_file_studio = function (...args) {
161
+ broker.send_to_queue_async("update_drive_file_studio", ...args);
162
+ };
163
+
164
+ export const update_drive_file_user = function (...args) {
165
+ broker.send_to_queue_async("update_drive_file_user", ...args);
166
+ };
167
+
168
+ export const create_drive_folder_workspace = function (...args) {
169
+ broker.send_to_queue_async("create_drive_folder_workspace", ...args);
170
+ };
171
+
172
+ export const create_drive_folder_studio = function (...args) {
173
+ broker.send_to_queue_async("create_drive_folder_studio", ...args);
174
+ };
175
+
176
+ export const create_drive_folder_user = function (...args) {
177
+ broker.send_to_queue_async("create_drive_folder_user", ...args);
178
+ };
179
+
180
+ export const rename_drive_file_workspace = function (...args) {
181
+ broker.send_to_queue_async("rename_drive_file_workspace", ...args);
182
+ };
183
+
184
+ export const rename_drive_file_studio = function (...args) {
185
+ broker.send_to_queue_async("rename_drive_file_studio", ...args);
186
+ };
187
+
188
+ export const rename_drive_file_user = function (...args) {
189
+ broker.send_to_queue_async("rename_drive_file_user", ...args);
190
+ };
191
+
192
+ export const rename_drive_folder_workspace = function (...args) {
193
+ broker.send_to_queue_async("rename_drive_folder_workspace", ...args);
194
+ };
195
+
196
+ export const rename_drive_folder_studio = function (...args) {
197
+ broker.send_to_queue_async("rename_drive_folder_studio", ...args);
198
+ };
199
+
200
+ export const rename_drive_folder_user = function (...args) {
201
+ broker.send_to_queue_async("rename_drive_folder_user", ...args);
202
+ };
203
+
204
+ export const update_drive_file_sharing_mode_workspace = function (...args) {
205
+ broker.send_to_queue_async("update_drive_file_sharing_mode_workspace", ...args);
206
+ };
207
+
208
+ export const update_drive_file_sharing_mode_studio = function (...args) {
209
+ broker.send_to_queue_async("update_drive_file_sharing_mode_studio", ...args);
210
+ };
211
+
212
+ export const update_drive_file_sharing_mode_user = function (...args) {
213
+ broker.send_to_queue_async("update_drive_file_sharing_mode_user", ...args);
214
+ };
215
+
216
+ export const delete_file_bulk_workspace = function (...args) {
217
+ broker.send_to_queue_async("delete_file_bulk_workspace", ...args);
218
+ };
219
+
220
+ export const delete_file_bulk_studio = function (...args) {
221
+ broker.send_to_queue_async("delete_file_bulk_studio", ...args);
222
+ };
223
+
224
+ export const delete_file_bulk_user = function (...args) {
225
+ broker.send_to_queue_async("delete_file_bulk_user", ...args);
226
+ };
227
+
228
+ export const check_drive_file_workspace = function (...args) {
229
+ broker.send_to_queue_async("check_drive_file_workspace", ...args);
230
+ };
231
+
232
+ export const check_drive_file_studio = function (...args) {
233
+ broker.send_to_queue_async("check_drive_file_studio", ...args);
234
+ };
235
+
236
+ export const check_drive_file_user = function (...args) {
237
+ broker.send_to_queue_async("check_drive_file_user", ...args);
238
+ };
239
+
240
+ export const update_drive_file_tags_workspace = function (...args) {
241
+ broker.send_to_queue_async("update_drive_file_tags_workspace", ...args);
242
+ };
243
+
244
+ export const update_drive_file_tags_studio = function (...args) {
245
+ broker.send_to_queue_async("update_drive_file_tags_studio", ...args);
246
+ };
247
+
248
+ export const update_drive_file_tags_user = function (...args) {
249
+ broker.send_to_queue_async("update_drive_file_tags_user", ...args);
250
+ };
251
+
252
+ export const update_drive_addons_workspace = function (...args) {
253
+ broker.send_to_queue_async("update_drive_addons_workspace", ...args);
254
+ };
255
+
256
+ export const update_drive_addons_studio = function (...args) {
257
+ broker.send_to_queue_async("update_drive_addons_studio", ...args);
258
+ };
259
+
260
+ export const update_drive_addons_user = function (...args) {
261
+ broker.send_to_queue_async("update_drive_addons_user", ...args);
262
+ };
263
+
264
+ export const getExtensionFromUrl = function (...args) {
265
+ broker.send_to_queue_async("getExtensionFromUrl", ...args);
266
+ };
267
+
268
+ export const get_user_drive_file = function (...args) {
269
+ broker.send_to_queue_async("get_user_drive_file", ...args);
270
+ };
271
+
272
+ export const save_user_drive_file = function (...args) {
273
+ broker.send_to_queue_async("save_user_drive_file", ...args);
274
+ };
275
+
276
+ export const find_contact_query = function (...args) {
277
+ broker.send_to_queue_async("find_contact_query", ...args);
278
+ };
279
+
280
+ export const file_upload_validator = function (...args) {
281
+ broker.send_to_queue_async("file_upload_validator", ...args);
282
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/drive_module",
3
- "version": "1.1.1411",
3
+ "version": "1.1.1413",
4
4
  "description": "Xuda Drive Server Module",
5
5
  "main": "index.mjs",
6
6
  "dependencies": {