diff --git a/lib/Logging.ts b/lib/Logging.ts index f7f89ef8..8bb805ed 100644 --- a/lib/Logging.ts +++ b/lib/Logging.ts @@ -1,4 +1,4 @@ -import { AnyObject } from "prostgles-types"; +import { AnyObject, ClientSchema } from "prostgles-types"; import { LocalParams } from "./DboBuilder/DboBuilder"; import { TableHandler } from "./DboBuilder/TableHandler/TableHandler"; @@ -93,7 +93,7 @@ export namespace EventTypes { | { command: "login"; } ); - export type Debug = DebugInfo & { + export type Debug = DebugInfo & ({ type: "debug"; command: | "initFileTable" @@ -112,7 +112,11 @@ export namespace EventTypes { | "DboBuilder.getTablesForSchemaPostgresSQL" | "PubSubManager.create" data?: AnyObject; - } + } | { + type: "debug"; + command: "pushSocketSchema"; + data: { socketId: string, clientSchema: ClientSchema; } + }) } export type EventInfo = diff --git a/lib/Prostgles.ts b/lib/Prostgles.ts index 9569f907..e4f5ab3a 100644 --- a/lib/Prostgles.ts +++ b/lib/Prostgles.ts @@ -466,6 +466,7 @@ export class Prostgles { }); }); } + await this.dboBuilder.prostgles.opts.onLog?.({ type: "debug", command: "pushSocketSchema", duration: -1, data: { socketId: socket.id, clientSchema } }); socket.emit(CHANNELS.SCHEMA, clientSchema); } catch (err) { diff --git a/package-lock.json b/package-lock.json index 4892b052..09e66145 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "prostgles-server", - "version": "4.2.177", + "version": "4.2.178", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "prostgles-server", - "version": "4.2.177", + "version": "4.2.178", "license": "MIT", "dependencies": { "@aws-sdk/client-ses": "^3.699.0", diff --git a/package.json b/package.json index 3991e2e6..ebcd936a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "prostgles-server", - "version": "4.2.177", + "version": "4.2.178", "description": "", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/tests/client/package-lock.json b/tests/client/package-lock.json index cdadfbaf..f5b4b8c5 100644 --- a/tests/client/package-lock.json +++ b/tests/client/package-lock.json @@ -10,7 +10,7 @@ "license": "ISC", "dependencies": { "@types/node": "^20.9.2", - "prostgles-client": "^4.0.167", + "prostgles-client": "^4.0.170", "prostgles-types": "^4.0.51", "socket.io-client": "^4.7.5" }, @@ -327,9 +327,9 @@ } }, "node_modules/prostgles-client": { - "version": "4.0.167", - "resolved": "https://registry.npmjs.org/prostgles-client/-/prostgles-client-4.0.167.tgz", - "integrity": "sha512-iDbDxDxaEo+QgaBMe4JaCFY7GL0vTxMt9qQBD2lseebQEHG3grJtn2DCywPwTbI1hNmg4XVTCnXkLzhB0oS3Rw==", + "version": "4.0.170", + "resolved": "https://registry.npmjs.org/prostgles-client/-/prostgles-client-4.0.170.tgz", + "integrity": "sha512-E9/sS07guDqskjsbAX2wOvm6N7Hx2Fbw6LtOtHSNaF2eiDMNUblkhxFs/Lz5lkO69qzcMIIhwI0Ko0iXXyVkKA==", "license": "MIT", "dependencies": { "prostgles-types": "^4.0.112" diff --git a/tests/client/package.json b/tests/client/package.json index 5f7be5a0..a4e90e87 100644 --- a/tests/client/package.json +++ b/tests/client/package.json @@ -13,7 +13,7 @@ "license": "ISC", "dependencies": { "@types/node": "^20.9.2", - "prostgles-client": "^4.0.167", + "prostgles-client": "^4.0.170", "prostgles-types": "^4.0.51", "socket.io-client": "^4.7.5" }, diff --git a/tests/server/package-lock.json b/tests/server/package-lock.json index 6202c345..7c0a74be 100644 --- a/tests/server/package-lock.json +++ b/tests/server/package-lock.json @@ -21,7 +21,7 @@ }, "../..": { "name": "prostgles-server", - "version": "4.2.177", + "version": "4.2.178", "license": "MIT", "dependencies": { "@aws-sdk/client-ses": "^3.699.0",