prostgles-server 4.2.81 → 4.2.83
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
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"license": "ISC",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@types/node": "^20.9.2",
|
|
13
|
-
"prostgles-client": "^4.0.
|
|
13
|
+
"prostgles-client": "^4.0.133",
|
|
14
14
|
"prostgles-types": "^4.0.51",
|
|
15
15
|
"socket.io-client": "^4.7.5"
|
|
16
16
|
},
|
|
@@ -330,9 +330,9 @@
|
|
|
330
330
|
}
|
|
331
331
|
},
|
|
332
332
|
"node_modules/prostgles-client": {
|
|
333
|
-
"version": "4.0.
|
|
334
|
-
"resolved": "https://registry.npmjs.org/prostgles-client/-/prostgles-client-4.0.
|
|
335
|
-
"integrity": "sha512-
|
|
333
|
+
"version": "4.0.133",
|
|
334
|
+
"resolved": "https://registry.npmjs.org/prostgles-client/-/prostgles-client-4.0.133.tgz",
|
|
335
|
+
"integrity": "sha512-AAQ+wZnIwu+15EZGRvkmvdM+VbXpkrwfCKtELgu4PJu3oC24ZpWaezq0nT8u1whqCBgyIWDgsVwuVKGqCGLsOg==",
|
|
336
336
|
"dependencies": {
|
|
337
337
|
"prostgles-types": "^4.0.87"
|
|
338
338
|
},
|
|
@@ -1023,13 +1023,26 @@ 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 */
|
|
1028
|
+
if(runs < 2){
|
|
1029
|
+
const appName = db.sql?.(`
|
|
1030
|
+
SELECT application_name
|
|
1031
|
+
FROM pg_catalog.pg_stat_activity
|
|
1032
|
+
WHERE pid = pg_backend_pid()
|
|
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}));
|
|
1037
|
+
}
|
|
1038
|
+
}, 2000);
|
|
1026
1039
|
const sub = await db[`"""quoted0"""`].subscribe!(filter, { }, async items => {
|
|
1027
1040
|
const item = items[0];
|
|
1028
1041
|
if(item && item[`"text_col0"`] === "0"){
|
|
1029
|
-
|
|
1042
|
+
runs++;
|
|
1043
|
+
if(runs === 1){
|
|
1030
1044
|
db[`"""quoted0"""`].update!(filter, filter);
|
|
1031
1045
|
}
|
|
1032
|
-
runs++;
|
|
1033
1046
|
if(runs < 2){
|
|
1034
1047
|
return;
|
|
1035
1048
|
}
|