Skip to content

Commit

Permalink
add debug info
Browse files Browse the repository at this point in the history
  • Loading branch information
prostgles committed Dec 6, 2024
1 parent a8af0e5 commit 59389f0
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 12 deletions.
10 changes: 7 additions & 3 deletions lib/Logging.ts
Original file line number Diff line number Diff line change
@@ -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";

Expand Down Expand Up @@ -93,7 +93,7 @@ export namespace EventTypes {
| { command: "login"; }
);

export type Debug = DebugInfo & {
export type Debug = DebugInfo & ({
type: "debug";
command:
| "initFileTable"
Expand All @@ -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 =
Expand Down
1 change: 1 addition & 0 deletions lib/Prostgles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
8 changes: 4 additions & 4 deletions tests/client/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tests/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
2 changes: 1 addition & 1 deletion tests/server/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 59389f0

Please sign in to comment.