@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.
@@ -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
- const mockFastify = {
597
- addRpcRoute: (url, options) => rpcOptionsMap.set(url, options),
598
- addRenderRoute: (url, options) => renderOptionsMap.set(url, options),
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bobtail.software/b-ssr",
3
- "version": "1.0.9",
3
+ "version": "1.0.10",
4
4
  "description": "Fastify + Vite SSR Plugin wrapper with RPC",
5
5
  "author": "Victor Moreno <info@bobtail.software> (https://bobtail.software)",
6
6
  "license": "GPL-3.0",