oxidejs 0.3.1 → 0.3.3
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/README.md +43 -41
- package/client.d.ts +15 -9
- package/dist/client-DOfB6wxk.mjs +207 -0
- package/dist/context-CmChiQ2W.d.mts +98 -0
- package/dist/context-DUN_VWJF.mjs +108 -0
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +73 -52
- package/dist/plugin-BIb3YnN7.mjs +674 -0
- package/dist/plugin.d.mts +1 -1
- package/dist/plugin.mjs +1 -1
- package/dist/rpc/client.d.mts +16 -7
- package/dist/rpc/client.mjs +1 -1
- package/dist/{rpc-DzUkWWgQ.mjs → rpc-gCOSJXql.mjs} +359 -325
- package/dist/rpc.d.mts +42 -33
- package/dist/rpc.mjs +2 -2
- package/dist/rsbuild.d.mts +1 -1
- package/dist/rsbuild.mjs +1 -1
- package/dist/{types-BM4NAnzy.d.mts → types-BaZeMYcP.d.mts} +22 -8
- package/dist/vite.d.mts +1 -1
- package/dist/vite.mjs +1 -1
- package/dist/worker-dom.d.mts +1 -1
- package/dist/worker-dom.mjs +15 -8
- package/package.json +2 -2
- package/virtual.d.ts +16 -3
- package/dist/client-C-s6XXpS.mjs +0 -148
- package/dist/context-C1UFQ0Zc.d.mts +0 -64
- package/dist/context-zrTZyYpF.mjs +0 -42
- package/dist/plugin-HZKRDuCS.mjs +0 -602
package/dist/rpc/client.d.mts
CHANGED
|
@@ -1,13 +1,22 @@
|
|
|
1
|
-
import { t as OxidejsActionHeaders } from "../types-
|
|
1
|
+
import { t as OxidejsActionHeaders } from "../types-BaZeMYcP.mjs";
|
|
2
2
|
import { Rpc, RpcGroup } from "effect/unstable/rpc";
|
|
3
3
|
//#region src/rpc/client.d.ts
|
|
4
|
-
|
|
5
|
-
url: string;
|
|
6
|
-
transport?: "http" | "ws";
|
|
4
|
+
interface RpcClientOptions {
|
|
7
5
|
headers?: OxidejsActionHeaders;
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
transport?: "http" | "ws";
|
|
7
|
+
url: string;
|
|
8
|
+
}
|
|
9
|
+
interface CallOptions {
|
|
10
|
+
signal?: AbortSignal;
|
|
11
|
+
}
|
|
12
|
+
/** Opaque action argument values (JSON-ish plus call options bags). */
|
|
13
|
+
type ActionCallArg = string | number | boolean | null | ActionCallArg[] | {
|
|
14
|
+
[key: string]: ActionCallArg;
|
|
15
|
+
} | CallOptions | AbortSignal;
|
|
16
|
+
/** Values returned from an action call before nesting. */
|
|
17
|
+
type ActionCallResult = string | number | boolean | null | object | undefined | AsyncGenerator<ActionCallResult>;
|
|
18
|
+
type NestedClient = Record<string, Record<string, (...args: ActionCallArg[]) => Promise<ActionCallResult> | AsyncGenerator<ActionCallResult>>>;
|
|
10
19
|
type ActionGroup = RpcGroup.RpcGroup<Rpc.Any>;
|
|
11
|
-
declare
|
|
20
|
+
declare const createClient: (group: ActionGroup, options: RpcClientOptions) => NestedClient;
|
|
12
21
|
//#endregion
|
|
13
22
|
export { RpcClientOptions, createClient };
|
package/dist/rpc/client.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as createClient } from "../client-
|
|
1
|
+
import { t as createClient } from "../client-DOfB6wxk.mjs";
|
|
2
2
|
export { createClient };
|