@xuda.io/xuda-worker-bundle-min 1.3.488 → 1.3.490

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 -2
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -416,7 +416,7 @@ func.common.db = async function (
416
416
  // (await func.db.pouch.get_replication_stat(SESSION_ID)) &&
417
417
  // (_session.engine_mode === "live_preview" ||
418
418
  // APP_OBJ[_session.APP_ID].app_available_offline)
419
- if (await func.db.pouch.get_replication_stat(SESSION_ID)) {
419
+ if (await func?.db?.pouch?.get_replication_stat(SESSION_ID)) {
420
420
  const db = await func.utils.connect_pouchdb(SESSION_ID);
421
421
  switch (serviceP) {
422
422
  case "dbs_read": {
@@ -1057,7 +1057,11 @@ func.common.perform_rpi_request = async function (
1057
1057
  });
1058
1058
  };
1059
1059
 
1060
- if (RUNTIME_SERVER_WEBSOCKET && RUNTIME_SERVER_WEBSOCKET_CONNECTED) {
1060
+ if (
1061
+ RUNTIME_SERVER_WEBSOCKET &&
1062
+ RUNTIME_SERVER_WEBSOCKET_CONNECTED &&
1063
+ SESSION_OBJ?.[SESSION_ID]?.rpi_http_methods?.includes(serviceP)
1064
+ ) {
1061
1065
  return await ws();
1062
1066
  } else {
1063
1067
  return await http();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/xuda-worker-bundle-min",
3
- "version": "1.3.488",
3
+ "version": "1.3.490",
4
4
  "description": "xuda framework min",
5
5
  "main": "index.js",
6
6
  "scripts": {