void-fate 1.0.0 → 1.0.2
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 +3 -3
- package/lib/react.mjs +2 -1
- package/package.json +6 -13
package/README.md
CHANGED
|
@@ -32,7 +32,7 @@ export default defineConfig({
|
|
|
32
32
|
|
|
33
33
|
## Server
|
|
34
34
|
|
|
35
|
-
Create a
|
|
35
|
+
Create a fate live publish facade and pass its `live` instance to the fate
|
|
36
36
|
server. Define the Void stream separately so `defineLiveStream` is called once
|
|
37
37
|
from a single server-only module.
|
|
38
38
|
|
|
@@ -88,8 +88,8 @@ The default paths are `/fate` for RPC and `/fate-live` for live updates.
|
|
|
88
88
|
|
|
89
89
|
## React
|
|
90
90
|
|
|
91
|
-
Use `VoidFateClient` in your app layout. The
|
|
92
|
-
|
|
91
|
+
Use `VoidFateClient` in your app layout. The `react-fate` Vite plugin wires the
|
|
92
|
+
fate client APIs for the Void transport.
|
|
93
93
|
|
|
94
94
|
```tsx
|
|
95
95
|
import type { ReactNode } from 'react';
|
package/lib/react.mjs
CHANGED
|
@@ -3,9 +3,10 @@ import { FateClient } from "react-fate";
|
|
|
3
3
|
import { createFateClient } from "react-fate/client";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
//#region src/react.tsx
|
|
6
|
+
const createVoidFateClient = createFateClient;
|
|
6
7
|
function VoidFateClient({ children, fetch, headers, livePath, liveRetryMs, liveUrl, onLiveError, origin, rpcPath, url, userId }) {
|
|
7
8
|
return /* @__PURE__ */ jsx(FateClient, {
|
|
8
|
-
client: useMemo(() =>
|
|
9
|
+
client: useMemo(() => createVoidFateClient({
|
|
9
10
|
fetch,
|
|
10
11
|
headers,
|
|
11
12
|
livePath,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "void-fate",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "Void adapter for fate.",
|
|
5
5
|
"homepage": "https://github.com/nkzw-tech/fate",
|
|
6
6
|
"license": "MIT",
|
|
@@ -37,27 +37,20 @@
|
|
|
37
37
|
}
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@nkzw/fate": "^1.0.
|
|
41
|
-
"react-fate": "^1.0.
|
|
40
|
+
"@nkzw/fate": "^1.0.2",
|
|
41
|
+
"react-fate": "^1.0.2"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@types/react": "^19.2.14",
|
|
45
45
|
"react": "^19.2.6",
|
|
46
|
-
"
|
|
46
|
+
"vite": "npm:@voidzero-dev/vite-plus-core@0.1.21",
|
|
47
|
+
"void": "^0.7.6"
|
|
47
48
|
},
|
|
48
49
|
"peerDependencies": {
|
|
49
50
|
"@nkzw/fate": "^1.0.0-rc.0",
|
|
50
51
|
"react": "^19.2.0",
|
|
51
52
|
"react-fate": "^1.0.0-rc.0",
|
|
52
|
-
"void": "^0.7.
|
|
53
|
-
},
|
|
54
|
-
"peerDependenciesMeta": {
|
|
55
|
-
"react": {
|
|
56
|
-
"optional": true
|
|
57
|
-
},
|
|
58
|
-
"react-fate": {
|
|
59
|
-
"optional": true
|
|
60
|
-
}
|
|
53
|
+
"void": "^0.7.6"
|
|
61
54
|
},
|
|
62
55
|
"scripts": {
|
|
63
56
|
"build": "vp pack -d lib --target=node24 src/index.ts src/react.tsx src/server.ts"
|