prostgles-server 4.2.86 → 4.2.87

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "prostgles-server",
3
- "version": "4.2.86",
3
+ "version": "4.2.87",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -1023,17 +1023,17 @@ export const isomorphicQueries = async (db: DBOFullyTyped | DBHandlerClient, log
1023
1023
  await tryRunP("subscribe to escaped table name", async (resolve, reject) => {
1024
1024
  const filter = { [`"text_col0"`]: "0" }
1025
1025
  let runs = 0;
1026
- setTimeout(() => {
1027
- /** Used for debugging. Might not be necessary anymore */
1026
+ setTimeout(async () => {
1027
+ /** Used for debugging */
1028
1028
  if(runs < 2){
1029
- const appName = db.sql?.(`
1029
+ const appName = await db.sql?.(`
1030
1030
  SELECT application_name
1031
1031
  FROM pg_catalog.pg_stat_activity
1032
1032
  WHERE pid = pg_backend_pid()
1033
1033
  `, [], { returnType: "rows" });
1034
- const apps = db.sql?.(`SELECT * FROM prostgles.apps`, [], { returnType: "rows" });
1035
- const app_triggers = db.sql?.(`SELECT * FROM prostgles.app_triggers`, [], { returnType: "rows" });
1036
- log(JSON.stringify({appName, apps, app_triggers}));
1034
+ const apps = await db.sql?.(`SELECT * FROM prostgles.apps`, [], { returnType: "value" });
1035
+ const app_triggers = await db.sql?.(`SELECT * FROM prostgles.app_triggers`, [], { returnType: "rows" });
1036
+ log(JSON.stringify({ appName, apps, app_triggers }));
1037
1037
  }
1038
1038
  }, 2000);
1039
1039
  const sub = await db[`"""quoted0"""`].subscribe!(filter, { }, async items => {
@@ -1046,10 +1046,14 @@ export const isomorphicQueries = async (db: DBOFullyTyped | DBHandlerClient, log
1046
1046
  if(runs < 2){
1047
1047
  return;
1048
1048
  }
1049
- await testToEnsureTriggersAreDisabled(sub, `"""quoted0"""`);
1050
- resolve(true);
1049
+ try {
1050
+ await testToEnsureTriggersAreDisabled(sub, `"""quoted0"""`)
1051
+ resolve(true);
1052
+ } catch(e){
1053
+ reject(e);
1054
+ }
1051
1055
  }
1052
- });
1056
+ }).catch(reject);
1053
1057
  });
1054
1058
  });
1055
1059
 
@@ -21,7 +21,7 @@
21
21
  },
22
22
  "../..": {
23
23
  "name": "prostgles-server",
24
- "version": "4.2.85",
24
+ "version": "4.2.86",
25
25
  "license": "MIT",
26
26
  "dependencies": {
27
27
  "bluebird": "^3.7.2",