prostgles-client 4.0.136 → 4.0.137
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/lib/prostgles.ts +1 -1
- package/lib/typeTests.ts +3 -2
- package/package.json +4 -4
package/lib/prostgles.ts
CHANGED
|
@@ -642,7 +642,7 @@ export function prostgles<DBSchema>(initOpts: InitOptions<DBSchema>, syncedTable
|
|
|
642
642
|
}
|
|
643
643
|
|
|
644
644
|
/* Schema = published schema */
|
|
645
|
-
socket.on(CHANNELS.SCHEMA, async ({ joinTables = [], ...clientSchema}: ClientSchema) => {
|
|
645
|
+
socket.on(CHANNELS.SCHEMA, async ({ joinTables = [], ...clientSchema }: ClientSchema) => {
|
|
646
646
|
const { schema, methods, tableSchema, auth, rawSQL, err } = clientSchema;
|
|
647
647
|
/** Only destroy existing syncs if schema changed */
|
|
648
648
|
const schemaDidNotChange = schemaAge?.clientSchema && isEqual(schemaAge.clientSchema, clientSchema)
|
package/lib/typeTests.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { type DBHandlerClient, useProstglesClient } from "./prostgles";
|
|
|
3
3
|
|
|
4
4
|
(async () => {
|
|
5
5
|
// const schema: DBSchema = {
|
|
6
|
-
|
|
6
|
+
type GeneratedSchema = {
|
|
7
7
|
table1: {
|
|
8
8
|
columns: {
|
|
9
9
|
col1: string,
|
|
@@ -20,7 +20,8 @@ import { type DBHandlerClient, useProstglesClient } from "./prostgles";
|
|
|
20
20
|
if(client.isLoading || "error" in client) return;
|
|
21
21
|
const t1 = client.dbo.table1.useFind({ }, { orderBy: { col1: 1 } });
|
|
22
22
|
const dbo: DBHandlerClient<GeneratedSchema> = 1 as any;
|
|
23
|
-
|
|
23
|
+
|
|
24
|
+
|
|
24
25
|
const client2 = useProstglesClient();
|
|
25
26
|
if(client2.isLoading || "error" in client2) return;
|
|
26
27
|
client2.dbo.dwada?.find?.();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "prostgles-client",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.137",
|
|
4
4
|
"description": "Reactive client for Postgres",
|
|
5
5
|
"main": "dist/prostgles-full.js",
|
|
6
6
|
"types": "dist/prostgles-full.d.ts",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"pushpublish": "npm version patch --git-tag-version false && git push && npm publish"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"prostgles-types": "^4.0.
|
|
31
|
+
"prostgles-types": "^4.0.88"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@types/node": "^14.14.14",
|
|
@@ -40,8 +40,8 @@
|
|
|
40
40
|
"ts-loader": "^9.5.1",
|
|
41
41
|
"tsconfig-paths-webpack-plugin": "^4.0.0",
|
|
42
42
|
"typescript": "^5.3.3",
|
|
43
|
-
"webpack": "^5.
|
|
44
|
-
"webpack-cli": "^
|
|
43
|
+
"webpack": "^5.94.0",
|
|
44
|
+
"webpack-cli": "^5.1.4"
|
|
45
45
|
},
|
|
46
46
|
"peerDependencies": {
|
|
47
47
|
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
|