@bobtail.software/b-ssr 1.0.9 → 1.0.10
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/dist/vite-rpc-plugin.js +8 -4
- package/package.json +1 -1
package/dist/vite-rpc-plugin.js
CHANGED
|
@@ -593,10 +593,14 @@ node_modules`),!r)return;let i=(0,Isr.default)({allowRelativePaths:!0}).add(r);r
|
|
|
593
593
|
renderOptionsMap = new Map();
|
|
594
594
|
const serverModulePath = '${h.replace(/\\/g,"/")}';
|
|
595
595
|
const routeModule = await import(/* @vite-ignore */ serverModulePath);
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
596
|
+
const mockFastify = new Proxy({}, {
|
|
597
|
+
get: (target, prop) => {
|
|
598
|
+
if (prop === 'addRpcRoute') return (url, options) => rpcOptionsMap.set(url, options);
|
|
599
|
+
if (prop === 'addRenderRoute') return (url, options) => renderOptionsMap.set(url, options);
|
|
600
|
+
// "Agujero negro": devuelve una funci\xF3n muda para cualquier otro m\xE9todo
|
|
601
|
+
return () => {};
|
|
602
|
+
}
|
|
603
|
+
});
|
|
600
604
|
if (routeModule.default) await routeModule.default(mockFastify);
|
|
601
605
|
}
|
|
602
606
|
${l.map(f=>{let v=[];f.requiresArgs&&v.push("args"),v.push("ssrContext");let D=f.type==="rpc"?`
|
package/package.json
CHANGED