rwsdk 1.0.0-beta.53 → 1.0.0-beta.54
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.
|
@@ -26,16 +26,12 @@ export declare const fetchTransport: Transport;
|
|
|
26
26
|
*
|
|
27
27
|
* @example
|
|
28
28
|
* // Basic usage
|
|
29
|
-
* import { initClient } from "rwsdk/client";
|
|
30
|
-
*
|
|
31
|
-
* initClient();
|
|
32
|
-
*
|
|
33
|
-
* @example
|
|
34
|
-
* // With client-side navigation
|
|
35
29
|
* import { initClient, initClientNavigation } from "rwsdk/client";
|
|
36
30
|
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
31
|
+
* // RedwoodSDK uses RSC RPC to emulate client side navigation.
|
|
32
|
+
* // https://docs.rwsdk.com/guides/frontend/client-side-nav/
|
|
33
|
+
* const { handleResponse, onHydrated } = initClientNavigation();
|
|
34
|
+
* initClient({ handleResponse, onHydrated });
|
|
39
35
|
*
|
|
40
36
|
* @example
|
|
41
37
|
* // With error handling
|
|
@@ -141,16 +141,12 @@ export const fetchTransport = (transportContext) => {
|
|
|
141
141
|
*
|
|
142
142
|
* @example
|
|
143
143
|
* // Basic usage
|
|
144
|
-
* import { initClient } from "rwsdk/client";
|
|
145
|
-
*
|
|
146
|
-
* initClient();
|
|
147
|
-
*
|
|
148
|
-
* @example
|
|
149
|
-
* // With client-side navigation
|
|
150
144
|
* import { initClient, initClientNavigation } from "rwsdk/client";
|
|
151
145
|
*
|
|
152
|
-
*
|
|
153
|
-
*
|
|
146
|
+
* // RedwoodSDK uses RSC RPC to emulate client side navigation.
|
|
147
|
+
* // https://docs.rwsdk.com/guides/frontend/client-side-nav/
|
|
148
|
+
* const { handleResponse, onHydrated } = initClientNavigation();
|
|
149
|
+
* initClient({ handleResponse, onHydrated });
|
|
154
150
|
*
|
|
155
151
|
* @example
|
|
156
152
|
* // With error handling
|
|
@@ -202,7 +198,7 @@ export const initClient = async ({ transport = fetchTransport, hydrateRootOption
|
|
|
202
198
|
};
|
|
203
199
|
const rootEl = document.getElementById("hydrate-root");
|
|
204
200
|
if (!rootEl) {
|
|
205
|
-
throw new Error('RedwoodSDK: No element with id "hydrate-root" found in the document. This element is required for hydration. Ensure your Document component contains a
|
|
201
|
+
throw new Error('RedwoodSDK: No element with id "hydrate-root" found in the document. This element is required for hydration. Ensure your Document component contains a {children}.');
|
|
206
202
|
}
|
|
207
203
|
let rscPayload;
|
|
208
204
|
// context(justinvdm, 18 Jun 2025): We inject the RSC payload
|
package/dist/runtime/worker.js
CHANGED
|
@@ -210,7 +210,7 @@ export const defineApp = (routes) => {
|
|
|
210
210
|
},
|
|
211
211
|
};
|
|
212
212
|
};
|
|
213
|
-
export const DefaultDocument = ({ children, }) => (_jsxs("html", { lang: "en", children: [_jsxs("head", { children: [_jsx("meta", { charSet: "utf-8" }), _jsx("meta", { name: "viewport", content: "width=device-width, initial-scale=1" })] }), _jsx("body", { children:
|
|
213
|
+
export const DefaultDocument = ({ children, }) => (_jsxs("html", { lang: "en", children: [_jsxs("head", { children: [_jsx("meta", { charSet: "utf-8" }), _jsx("meta", { name: "viewport", content: "width=device-width, initial-scale=1" })] }), _jsx("body", { children: children })] }));
|
|
214
214
|
const isClientReference = (Component) => {
|
|
215
215
|
return Object.prototype.hasOwnProperty.call(Component, "$$isClientReference");
|
|
216
216
|
};
|
|
@@ -290,6 +290,7 @@ export const runDirectivesScan = async ({ rootConfig, environments, clientFiles,
|
|
|
290
290
|
entryPoints: Array.from(combinedEntries),
|
|
291
291
|
bundle: true,
|
|
292
292
|
write: false,
|
|
293
|
+
splitting: true,
|
|
293
294
|
outdir: path.join(INTERMEDIATES_OUTPUT_DIR, "directive-scan"),
|
|
294
295
|
platform: "node",
|
|
295
296
|
format: "esm",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rwsdk",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.54",
|
|
4
4
|
"description": "Build fast, server-driven webapps on Cloudflare with SSR, RSC, and realtime",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -154,13 +154,13 @@
|
|
|
154
154
|
"license": "MIT",
|
|
155
155
|
"dependencies": {
|
|
156
156
|
"@ast-grep/napi": "~0.39.0",
|
|
157
|
-
"@cloudflare/workers-types": "~4.
|
|
157
|
+
"@cloudflare/workers-types": "~4.20260218.0",
|
|
158
158
|
"@mdx-js/mdx": "~3.1.1",
|
|
159
159
|
"@puppeteer/browsers": "~2.10.0",
|
|
160
160
|
"@types/decompress": "~4.2.7",
|
|
161
161
|
"@types/fs-extra": "~11.0.4",
|
|
162
162
|
"@types/glob": "^8.1.0",
|
|
163
|
-
"@types/react": "~19.2.
|
|
163
|
+
"@types/react": "~19.2.14",
|
|
164
164
|
"@types/react-dom": "~19.2.3",
|
|
165
165
|
"@types/react-is": "~19.0.0",
|
|
166
166
|
"@vitejs/plugin-react": "~5.0.0",
|
|
@@ -193,17 +193,17 @@
|
|
|
193
193
|
"vite-tsconfig-paths": "~5.1.4"
|
|
194
194
|
},
|
|
195
195
|
"peerDependencies": {
|
|
196
|
-
"@cloudflare/vite-plugin": "^1.
|
|
196
|
+
"@cloudflare/vite-plugin": "^1.25.1",
|
|
197
197
|
"capnweb": "~0.2.0",
|
|
198
198
|
"react": ">=19.2.0-0 <19.3.0 || >=19.3.0-0 <20.0.0",
|
|
199
199
|
"react-dom": ">=19.2.0-0 <19.3.0 || >=19.3.0-0 <20.0.0",
|
|
200
200
|
"react-server-dom-webpack": ">=19.2.0-0 <19.3.0 || >=19.3.0-0 <20.0.0",
|
|
201
201
|
"vite": "^6.2.6 || 7.x",
|
|
202
|
-
"wrangler": "^4.
|
|
202
|
+
"wrangler": "^4.66.0"
|
|
203
203
|
},
|
|
204
204
|
"packageManager": "pnpm@10.28.2",
|
|
205
205
|
"devDependencies": {
|
|
206
|
-
"@cloudflare/vite-plugin": "1.
|
|
206
|
+
"@cloudflare/vite-plugin": "1.25.1",
|
|
207
207
|
"capnweb": "~0.2.0",
|
|
208
208
|
"@types/debug": "~4.1.12",
|
|
209
209
|
"@types/js-beautify": "~1.14.3",
|