prostgles-client 4.0.123 → 4.0.125
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type DBSchema, type DBSchemaTable, type MethodHandler } from "prostgles-types";
|
|
1
|
+
import { type DBSchema, type DBSchemaTable, type MethodHandler, type AnyObject } from "prostgles-types";
|
|
2
2
|
import type { ManagerOptions, SocketOptions } from "socket.io-client";
|
|
3
3
|
import { type Auth, type DBHandlerClient, type InitOptions } from "./prostgles";
|
|
4
4
|
type OnReadyParams<DBSchema> = {
|
|
@@ -22,7 +22,7 @@ type ProstglesClientState<PGC> = {
|
|
|
22
22
|
error?: undefined;
|
|
23
23
|
} & PGC | {
|
|
24
24
|
isLoading: false;
|
|
25
|
-
error:
|
|
25
|
+
error: AnyObject | string;
|
|
26
26
|
};
|
|
27
27
|
export declare const useProstglesClient: <DBSchema_1>({ skip, socketOptions, ...initOpts }?: HookInitOpts) => ProstglesClientState<OnReadyParams<DBSchema_1>>;
|
|
28
28
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useProstglesClient.d.ts","sourceRoot":"","sources":["../lib/useProstglesClient.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,KAAK,QAAQ,EACb,KAAK,aAAa,EAClB,KAAK,aAAa,
|
|
1
|
+
{"version":3,"file":"useProstglesClient.d.ts","sourceRoot":"","sources":["../lib/useProstglesClient.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,KAAK,QAAQ,EACb,KAAK,aAAa,EAClB,KAAK,aAAa,EAElB,KAAK,SAAS,EACf,MAAM,iBAAiB,CAAC;AAEzB,OAAO,KAAK,EAAE,cAAc,EAAU,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAE9E,OAAO,EAAa,KAAK,IAAI,EAAE,KAAK,eAAe,EAAE,KAAK,WAAW,EAAE,MAAM,aAAa,CAAC;AAG3F,KAAK,aAAa,CAAC,QAAQ,IAAI;IAC7B,GAAG,EAAE,eAAe,CAAC,QAAQ,CAAC,CAAC;IAC/B,OAAO,EAAE,aAAa,GAAG,SAAS,CAAC;IACnC,WAAW,EAAE,aAAa,EAAE,GAAG,SAAS,CAAC;IACzC,IAAI,EAAE,IAAI,GAAG,SAAS,CAAC;IACvB,WAAW,EAAE,OAAO,CAAC;CACtB,CAAA;AACD,KAAK,YAAY,GAAG,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAC,GAAG;IACtE,aAAa,CAAC,EAAE,OAAO,CAAC,cAAc,GAAG,aAAa,CAAC,GAAG;QAAE,GAAG,CAAC,EAAE,MAAM,CAAC;KAAE,CAAC;IAC5E,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB,CAAC;AACF,KAAK,oBAAoB,CAAC,GAAG,IAC3B;IAAE,SAAS,EAAE,IAAI,CAAC;IAAC,KAAK,CAAC,EAAE,SAAS,CAAC;CAAE,GACvC;IAAE,SAAS,EAAE,KAAK,CAAC;IAAC,KAAK,CAAC,EAAE,SAAS,CAAC;CAAE,GAAG,GAAG,GAC9C;IAAE,SAAS,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,SAAS,GAAG,MAAM,CAAC;CAAE,CAAC;AAEnD,eAAO,MAAM,kBAAkB,sDAAoD,YAAY,oDA4C9F,CAAA"}
|
|
@@ -8,7 +8,8 @@ import {
|
|
|
8
8
|
type DBSchema,
|
|
9
9
|
type DBSchemaTable,
|
|
10
10
|
type MethodHandler,
|
|
11
|
-
omitKeys
|
|
11
|
+
omitKeys,
|
|
12
|
+
type AnyObject
|
|
12
13
|
} from "prostgles-types";
|
|
13
14
|
|
|
14
15
|
import type { ManagerOptions, Socket, SocketOptions } from "socket.io-client";
|
|
@@ -30,7 +31,7 @@ type HookInitOpts = Omit<InitOptions<DBSchema>, "onReady" | "socket"> & {
|
|
|
30
31
|
type ProstglesClientState<PGC> =
|
|
31
32
|
| { isLoading: true; error?: undefined; }
|
|
32
33
|
| { isLoading: false; error?: undefined; } & PGC
|
|
33
|
-
| { isLoading: false; error:
|
|
34
|
+
| { isLoading: false; error: AnyObject | string; };
|
|
34
35
|
|
|
35
36
|
export const useProstglesClient = <DBSchema>({ skip, socketOptions, ...initOpts }: HookInitOpts = {}): ProstglesClientState<OnReadyParams<DBSchema>> => {
|
|
36
37
|
const { useRef, useState } = getReact(true);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "prostgles-client",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.125",
|
|
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.85"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@types/node": "^14.14.14",
|
package/tests/package-lock.json
CHANGED
|
@@ -17,10 +17,10 @@
|
|
|
17
17
|
},
|
|
18
18
|
"..": {
|
|
19
19
|
"name": "prostgles-client",
|
|
20
|
-
"version": "4.0.
|
|
20
|
+
"version": "4.0.124",
|
|
21
21
|
"license": "MIT",
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"prostgles-types": "^4.0.
|
|
23
|
+
"prostgles-types": "^4.0.85"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"@types/node": "^14.14.14",
|