@xuda.io/xuda-worker-bundle-min 1.3.962 → 1.3.964

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 (2) hide show
  1. package/index.js +6 -7
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -6022,7 +6022,12 @@ func.utils.load_js_on_demand = async function (js_src, type) {
6022
6022
 
6023
6023
  func.utils.load_css_on_demand = function (css_href) {
6024
6024
  function isCssLoaded(src) {
6025
- return document.querySelector('link[href="' + src + '"]') ? true : false;
6025
+ try {
6026
+ return document.querySelector('link[href="' + src + '"]') ? true : false;
6027
+ } catch (err) {
6028
+ console.warn(`load css ${css_href} failed`);
6029
+ return true;
6030
+ }
6026
6031
  }
6027
6032
 
6028
6033
  if (isCssLoaded(css_href)) {
@@ -9805,9 +9810,6 @@ func.expression.secure_eval = async function (
9805
9810
  let vm = new VM.NodeVM({
9806
9811
  require: {
9807
9812
  external: true,
9808
- // import: ["axios", "form-data"],
9809
- // import: ["fs", "dir"],
9810
- // root: dir,
9811
9813
  },
9812
9814
  sandbox: {
9813
9815
  func,
@@ -9854,10 +9856,7 @@ func.expression.secure_eval = async function (
9854
9856
  ret = await vm.run(val);
9855
9857
  }
9856
9858
  return ret;
9857
- // return vm.run(val);
9858
9859
  } catch (err) {
9859
- // console.warn("Failed to execute VM script:", val, err);
9860
- // return val;
9861
9860
  throw "";
9862
9861
  }
9863
9862
  } catch (err) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/xuda-worker-bundle-min",
3
- "version": "1.3.962",
3
+ "version": "1.3.964",
4
4
  "description": "xuda framework min",
5
5
  "main": "index.js",
6
6
  "scripts": {