@xuda.io/drive_module 1.1.1400 → 1.1.1402

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 CHANGED
@@ -31,21 +31,10 @@ const _utils = await import(path.join(process.env.XUDA_HOME, 'common', 'xuda-cpi
31
31
  const module_path = path.join(process.env.XUDA_HOME, 'cpi') + (!_conf.is_debug ? '/node_modules/@xuda.io' : '');
32
32
  const fs_module = await import(`${module_path}/fs_module/index.mjs`);
33
33
  const db_module = await import(`${module_path}/db_module/index.mjs`);
34
- const misc_module = await import(`${module_path}/misc_module/index.mjs`);
35
- const jobs_ms = await import(`${module_path}/jobs_module/index_ms.mjs`);
36
- const plugins_ms = await import(`${module_path}/plugins_module/index_ms.mjs`);
37
- const email_ms = await import(`${module_path}/email_module/index_ms.mjs`);
38
- const deploy_ms = await import(`${module_path}/deploy_module/index_ms.mjs`);
39
- const notification_ms = await import(`${module_path}/notification_module/index_ms.mjs`);
40
- const drive_ms = await import(`${module_path}/drive_module/index_ms.mjs`);
41
- const session_ms = await import(`${module_path}/session_module/index_ms.mjs`);
34
+
42
35
  const account_ms = await import(`${module_path}/account_module/index_ms.mjs`);
43
- const marketplace_ms = await import(`${module_path}/marketplace_module/index_ms.mjs`);
36
+
44
37
  const misc_ms = await import(`${module_path}/misc_module/index_ms.mjs`);
45
- const support_ms = await import(`${module_path}/support_module/index_ms.mjs`);
46
- const build_ms = await import(`${module_path}/build_module/index_ms.mjs`);
47
- const backup_ms = await import(`${module_path}/backup_module/index_ms.mjs`);
48
- const team_ms = await import(`${module_path}/team_module/index_ms.mjs`);
49
38
 
50
39
  ////////////////////////////////////////////
51
40
 
@@ -526,7 +515,7 @@ export const delete_drive_files = async (req, job_id, headers) => {
526
515
  save_ret = await db_module.save_app_couch_doc(app_id_reference, doc);
527
516
  }
528
517
 
529
- misc_module.rsync_drive_resources_to_remote_servers('studio', app_id_reference);
518
+ misc_ms.rsync_drive_resources_to_remote_servers('studio', app_id_reference);
530
519
  break;
531
520
  }
532
521
 
@@ -625,7 +614,7 @@ export const update_drive_file = async (req, job_id, headers, file_obj) => {
625
614
  const app_id_reference = await _common.get_project_app_id(app_id);
626
615
  save_ret = await db_module.save_app_couch_doc(app_id_reference, doc);
627
616
 
628
- misc_module.rsync_drive_resources_to_remote_servers('studio', app_id_reference);
617
+ misc_ms.rsync_drive_resources_to_remote_servers('studio', app_id_reference);
629
618
  break;
630
619
  }
631
620
  case 'workspace': {
@@ -752,7 +741,7 @@ export const create_drive_folder = async (req, job_id, headers) => {
752
741
  await create_directory(fs_target_dir, 0o775, true);
753
742
  doc._id = target_dir;
754
743
  save_ret = await db_module.save_app_couch_doc(app_id_master, doc);
755
- misc_module.rsync_drive_resources_to_remote_servers('studio', app_id_master);
744
+ misc_ms.rsync_drive_resources_to_remote_servers('studio', app_id_master);
756
745
  break;
757
746
  }
758
747
 
@@ -871,7 +860,7 @@ export const rename_drive_folder = async (req) => {
871
860
  doc_ret.data._id = new_path;
872
861
  delete doc_ret.data._rev;
873
862
 
874
- misc_module.rsync_drive_resources_to_remote_servers('studio', app_id_reference);
863
+ misc_ms.rsync_drive_resources_to_remote_servers('studio', app_id_reference);
875
864
  break;
876
865
  }
877
866
  case 'workspace': {
@@ -1207,7 +1196,7 @@ export const upload_drive_file = async (req, job_id, headers = {}, file_obj) =>
1207
1196
  doc._id = file_name;
1208
1197
 
1209
1198
  save_ret = await db_module.save_app_couch_doc(ref, doc);
1210
- misc_module.rsync_drive_resources_to_remote_servers('studio', app_id);
1199
+ misc_ms.rsync_drive_resources_to_remote_servers('studio', app_id);
1211
1200
  break;
1212
1201
  }
1213
1202
  case 'workspace': {
@@ -2039,7 +2028,7 @@ export default {
2039
2028
  await _utils.run_ssh_script(`npm i --prefix ${studio_drive_script_program_folder};`);
2040
2029
  const build_ret = await _utils.run_ssh_script(`npm run build --prefix ${studio_drive_script_program_folder};`);
2041
2030
 
2042
- misc_module.rsync_drive_resources_to_remote_servers('studio', app_id);
2031
+ misc_ms.rsync_drive_resources_to_remote_servers('studio', app_id);
2043
2032
  const vite_build_res = {
2044
2033
  code: 1,
2045
2034
  data: {
package/index_ms.mjs CHANGED
@@ -46,7 +46,7 @@ const send_to_queue =async function(ms_method, ...args) {
46
46
  const timeout = setTimeout(() => {
47
47
  delete queue[queue_id];
48
48
  reject(new Error(`Queue timeout for ${ms_method}`));
49
- }, 30000); // 30 second timeout
49
+ }, 300000); // 300 second timeout
50
50
 
51
51
  // Wrap resolve to clean up
52
52
  queue[queue_id].resolve = (value) => {
@@ -61,7 +61,8 @@ const send_to_queue =async function(ms_method, ...args) {
61
61
  delete queue[queue_id];
62
62
  reject(error);
63
63
  };
64
-
64
+
65
+ try{
65
66
  global[`_${global.module_in}_ch`].sendToQueue(
66
67
  'drive_module',
67
68
  Buffer.from(
@@ -74,6 +75,9 @@ const send_to_queue =async function(ms_method, ...args) {
74
75
  )
75
76
  );
76
77
 
78
+ }catch(err){
79
+ debugger
80
+ }
77
81
  })
78
82
 
79
83
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/drive_module",
3
- "version": "1.1.1400",
3
+ "version": "1.1.1402",
4
4
  "description": "Xuda Drive Server Module",
5
5
  "main": "index.mjs",
6
6
  "dependencies": {