@xuda.io/xuda-worker-bundle-min 1.3.937 → 1.3.938

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 +28 -20
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -7226,29 +7226,37 @@ func.utils.get_plugin_resource = function (
7226
7226
  };
7227
7227
 
7228
7228
  return new Promise(async (resolve, reject) => {
7229
- const db = await func.utils.connect_pouchdb(SESSION_ID);
7229
+ // const db = await func.utils.connect_pouchdb(SESSION_ID);
7230
+
7231
+ // try {
7232
+ // if (_session.worker_type === "Dev") throw "bypass cache";
7233
+
7234
+ // let ret = await db.get(`cache_plugin_${plugin_name}_${plugin_resource}`);
7235
+ // return resolve(ret.data);
7236
+ // } catch (err) {
7237
+ // try {
7238
+ // const plugin_resource_res = await import(
7239
+ // `${get_path(plugin_resource)}`
7240
+ // );
7241
+ // resolve(plugin_resource_res);
7242
+
7243
+ // // var doc = {
7244
+ // // _id: `cache_plugin_${plugin_name}_${plugin_resource}`,
7245
+ // // data: JSON.stringify(plugin_resource_res),
7246
+ // // docType: "cache_plugin",
7247
+ // // };
7248
+ // // db.put(doc);
7249
+ // } catch (err) {
7250
+ // console.error(err);
7251
+ // }
7252
+ // }
7230
7253
 
7231
7254
  try {
7232
- if (_session.worker_type === "Dev") throw "bypass cache";
7233
-
7234
- let ret = await db.get(`cache_plugin_${plugin_name}_${plugin_resource}`);
7235
- return resolve(ret.data);
7255
+ const plugin_resource_res = await import(`${get_path(plugin_resource)}`);
7256
+ resolve(plugin_resource_res);
7236
7257
  } catch (err) {
7237
- try {
7238
- const plugin_resource_res = await import(
7239
- `${get_path(plugin_resource)}`
7240
- );
7241
- resolve(plugin_resource_res);
7242
-
7243
- // var doc = {
7244
- // _id: `cache_plugin_${plugin_name}_${plugin_resource}`,
7245
- // data: JSON.stringify(plugin_resource_res),
7246
- // docType: "cache_plugin",
7247
- // };
7248
- // db.put(doc);
7249
- } catch (err) {
7250
- console.error(err);
7251
- }
7258
+ console.error(err);
7259
+ reject();
7252
7260
  }
7253
7261
  });
7254
7262
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/xuda-worker-bundle-min",
3
- "version": "1.3.937",
3
+ "version": "1.3.938",
4
4
  "description": "xuda framework min",
5
5
  "main": "index.js",
6
6
  "scripts": {