@xuda.io/runtime-bundle 1.0.1240 → 1.0.1242

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/js/xuda_worker.js CHANGED
@@ -45,7 +45,8 @@ if (worker_name.includes('Debug:')) {
45
45
  } else {
46
46
  importScripts(get_resource_filename(build, runtime_path + 'js/xuda-worker-bundle.min.js'));
47
47
  importScripts(runtime_path + 'node_modules/lodash/lodash.js');
48
- importScripts(runtime_path + 'node_modules/klona/full/index.mjs');
48
+ // importScripts(runtime_path + 'node_modules/klona/full/index.mjs');
49
+ importScripts('https://unpkg.com/klona@2.0.6/full/index.min.js');
49
50
  importScripts(runtime_path + 'node_modules/json5/dist/index.js');
50
51
  }
51
52
  }
@@ -1 +1 @@
1
- "use strict";var show_log=false;var ws_worker_id=null;var worker_name=this.name;var build=worker_name.split(":")[1].split(" ")[2];var domain=worker_name.split(":")[1].split(" ")[3];if(build==="undefined"){build=""}const get_url=function(domain,method,path){return`https://${domain}/${method}${path?"/"+path:""}`};const runtime_path=get_url(domain,"dist","runtime/");const get_resource_filename=function(build,filename){if(build){return filename.replace(/(\.\w+)$/,`.${build}$1`)}return filename};if(worker_name.includes("Debug:")){importScripts(get_resource_filename(build,runtime_path+"js/xuda-worker-bundle.js"));importScripts(runtime_path+"node_modules/lodash/lodash.js");importScripts(runtime_path+"node_modules/klona/full/index.mjs");importScripts(runtime_path+"node_modules/json5/dist/index.js")}else{if(worker_name.includes("Dev:")){let files=["xuda_common.js","xuda_GLB.js","xuda_datasource.js","xuda_utils.js","xuda_events.js","xuda_expression.js"];files.forEach(file=>{importScripts(file)});importScripts("../vendor/lodash.min.js");importScripts("..vendor/klona-2.0.6.min.js");importScripts("../vendor/json5.min.js")}else{importScripts(get_resource_filename(build,runtime_path+"js/xuda-worker-bundle.min.js"));importScripts(runtime_path+"node_modules/lodash/lodash.js");importScripts(runtime_path+"node_modules/klona/full/index.mjs");importScripts(runtime_path+"node_modules/json5/dist/index.js")}}if(!worker_name.includes("Slim ")){importScripts(runtime_path+"node_modules/pouchdb/dist/pouchdb.min.js");importScripts(runtime_path+"node_modules/pouchdb/dist/pouchdb.find.min.js")}glb.IS_WORKER=true;SESSION_ID=1e3;console.log("===========================================");console.log(" Worker started..."+(new Date).getTime());console.log("===========================================");const worker_post_message=function(data){if(!data.process_pid){delete data.process_pid}if(!data.service){delete data.service}try{postMessage(data)}catch(error){debugger}};self.addEventListener("message",async function(e){ws_worker_id=e.data.worker_id;if(!ws_worker_id)debugger;const _data=JSON.parse(e.data.data);if(e.data.service==="init"){worker_garbage_collector(_data.session_id)}const ret=await eval(func.utils.ws_worker.functions[e.data.service])(_data,e.data.promise_queue_id);if(!e.data.service||e.data.service==="init"||e.data.service==="datasource_create"){return}worker_post_message({fx_to_execute:"worker_response",worker_id:ws_worker_id,session_id:SESSION_ID,promise_queue_id:e.data.promise_queue_id,service:e.data.service,params:ret})},false);worker_post_message({worker_id:ws_worker_id,service:"worker_ready"});const worker_garbage_collector=function(SESSION_ID){setInterval(()=>{for(const[dsP,_ds]of Object.entries(SESSION_OBJ[SESSION_ID].DS_GLB)){if(_ds.is_worker&&_ds.stat==="idle"&&Date.now()-_ds.stat_ts>6e4&&_ds.tree_obj.menuType!=="component"&&_ds.tree_obj.menuType!=="globals"){func.datasource.del(SESSION_ID,dsP)}}},1e4)};
1
+ "use strict";var show_log=false;var ws_worker_id=null;var worker_name=this.name;var build=worker_name.split(":")[1].split(" ")[2];var domain=worker_name.split(":")[1].split(" ")[3];if(build==="undefined"){build=""}const get_url=function(domain,method,path){return`https://${domain}/${method}${path?"/"+path:""}`};const runtime_path=get_url(domain,"dist","runtime/");const get_resource_filename=function(build,filename){if(build){return filename.replace(/(\.\w+)$/,`.${build}$1`)}return filename};if(worker_name.includes("Debug:")){importScripts(get_resource_filename(build,runtime_path+"js/xuda-worker-bundle.js"));importScripts(runtime_path+"node_modules/lodash/lodash.js");importScripts(runtime_path+"node_modules/klona/full/index.mjs");importScripts(runtime_path+"node_modules/json5/dist/index.js")}else{if(worker_name.includes("Dev:")){let files=["xuda_common.js","xuda_GLB.js","xuda_datasource.js","xuda_utils.js","xuda_events.js","xuda_expression.js"];files.forEach(file=>{importScripts(file)});importScripts("../vendor/lodash.min.js");importScripts("..vendor/klona-2.0.6.min.js");importScripts("../vendor/json5.min.js")}else{importScripts(get_resource_filename(build,runtime_path+"js/xuda-worker-bundle.min.js"));importScripts(runtime_path+"node_modules/lodash/lodash.js");importScripts("https://unpkg.com/klona@2.0.6/full/index.min.js");importScripts(runtime_path+"node_modules/json5/dist/index.js")}}if(!worker_name.includes("Slim ")){importScripts(runtime_path+"node_modules/pouchdb/dist/pouchdb.min.js");importScripts(runtime_path+"node_modules/pouchdb/dist/pouchdb.find.min.js")}glb.IS_WORKER=true;SESSION_ID=1e3;console.log("===========================================");console.log(" Worker started..."+(new Date).getTime());console.log("===========================================");const worker_post_message=function(data){if(!data.process_pid){delete data.process_pid}if(!data.service){delete data.service}try{postMessage(data)}catch(error){debugger}};self.addEventListener("message",async function(e){ws_worker_id=e.data.worker_id;if(!ws_worker_id)debugger;const _data=JSON.parse(e.data.data);if(e.data.service==="init"){worker_garbage_collector(_data.session_id)}const ret=await eval(func.utils.ws_worker.functions[e.data.service])(_data,e.data.promise_queue_id);if(!e.data.service||e.data.service==="init"||e.data.service==="datasource_create"){return}worker_post_message({fx_to_execute:"worker_response",worker_id:ws_worker_id,session_id:SESSION_ID,promise_queue_id:e.data.promise_queue_id,service:e.data.service,params:ret})},false);worker_post_message({worker_id:ws_worker_id,service:"worker_ready"});const worker_garbage_collector=function(SESSION_ID){setInterval(()=>{for(const[dsP,_ds]of Object.entries(SESSION_OBJ[SESSION_ID].DS_GLB)){if(_ds.is_worker&&_ds.stat==="idle"&&Date.now()-_ds.stat_ts>6e4&&_ds.tree_obj.menuType!=="component"&&_ds.tree_obj.menuType!=="globals"){func.datasource.del(SESSION_ID,dsP)}}},1e4)};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/runtime-bundle",
3
- "version": "1.0.1240",
3
+ "version": "1.0.1242",
4
4
  "description": "The Xuda Runtime Bundle refers to a collection of scripts and libraries packaged together to provide the necessary runtime environment for executing plugins or components in the Xuda platform. ",
5
5
  "scripts": {
6
6
  "pub": "npm version patch --force && npm publish --access public"