rari 0.15.16 → 0.16.0

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.
Files changed (85) hide show
  1. package/dist/cli.d.mts +11 -0
  2. package/dist/cli.mjs +39 -39
  3. package/dist/{define-CzFpVAjt.mjs → define-CRafeveU.mjs} +1 -1
  4. package/dist/execute-B1z6YRUF.mjs +1 -0
  5. package/dist/feed-uUGeOZmR.mjs +10 -0
  6. package/dist/font/google.d.mts +1951 -0
  7. package/dist/font/google.mjs +1 -0
  8. package/dist/font/local.d.mts +4 -0
  9. package/dist/font/local.mjs +1 -0
  10. package/dist/font.d.mts +3 -0
  11. package/dist/font.mjs +1 -0
  12. package/dist/form-state-DZJs9bve.mjs +1 -0
  13. package/dist/get-client-component-DU5z65us.mjs +1 -0
  14. package/dist/headers.d.mts +4 -4
  15. package/dist/image.d.mts +6 -6
  16. package/dist/image.mjs +1 -1
  17. package/dist/index.d.mts +1 -2
  18. package/dist/mdx/define.mjs +1 -1
  19. package/dist/mdx/registry.d.mts +2 -3
  20. package/dist/mdx.d.mts +3 -3
  21. package/dist/mdx.mjs +1 -1
  22. package/dist/names-CLmM0CPi.mjs +1 -0
  23. package/dist/og.d.mts +2 -2
  24. package/dist/og.mjs +1 -1
  25. package/dist/path-C74rvUep.mjs +1 -0
  26. package/dist/platform.d.mts +3 -4
  27. package/dist/preload-modules-1i2BJqux.mjs +2 -0
  28. package/dist/prompt-uaCPq0_A-BW0EkzOD.mjs +45 -0
  29. package/dist/proxy/RariRequest.d.mts +2 -3
  30. package/dist/proxy/RariRequest.mjs +1 -1
  31. package/dist/proxy/RariResponse.mjs +1 -1
  32. package/dist/proxy/runtime-executor.d.mts +2 -4
  33. package/dist/proxy/runtime-executor.mjs +7 -1
  34. package/dist/{railway-dlVtU472.mjs → railway-CE3nqaKt.mjs} +1 -1
  35. package/dist/regex-constants-DBMCJbMw.mjs +1 -0
  36. package/dist/{render-Dipra0HL.mjs → render-D0eMtn5L.mjs} +1 -1
  37. package/dist/robots-B1bFAd4J.mjs +9 -0
  38. package/dist/router-D6X8JHst.mjs +1 -0
  39. package/dist/router.d.mts +6 -10
  40. package/dist/router.mjs +1 -1
  41. package/dist/rsc-vite-build-Cpu5suGN.mjs +1 -0
  42. package/dist/runtime/AppRouterProvider.d.mts +10 -7
  43. package/dist/runtime/AppRouterProvider.mjs +1 -1
  44. package/dist/runtime/ClientRouter.d.mts +3 -5
  45. package/dist/runtime/ClientRouter.mjs +7 -1
  46. package/dist/runtime/ErrorBoundaryWrapper.d.mts +2 -3
  47. package/dist/runtime/ErrorBoundaryWrapper.mjs +1 -1
  48. package/dist/runtime/LoadingErrorBoundary.d.mts +2 -3
  49. package/dist/runtime/action-flight-refresh.d.mts +4 -5
  50. package/dist/runtime/action-flight-refresh.mjs +1 -1
  51. package/dist/runtime/action-revalidation-kind.d.mts +6 -7
  52. package/dist/runtime/call-server.d.mts +2 -3
  53. package/dist/runtime/call-server.mjs +1 -1
  54. package/dist/runtime/entry-client.d.mts +3 -5
  55. package/dist/runtime/entry-client.mjs +3 -3
  56. package/dist/runtime/flight-route-cache.d.mts +7 -13
  57. package/dist/runtime/flight-route-cache.mjs +1 -1
  58. package/dist/runtime/flight-router-state.d.mts +7 -8
  59. package/dist/runtime/merge-flight-refresh.d.mts +2 -3
  60. package/dist/runtime/merge-flight-refresh.mjs +1 -1
  61. package/dist/runtime/rsc-client-runtime.d.mts +3 -2
  62. package/dist/runtime/rsc-client-runtime.mjs +1 -1
  63. package/dist/runtime/rsc-references.d.mts +3 -4
  64. package/dist/sitemap-DJY3OiJ0.mjs +13 -0
  65. package/dist/type-guards-BJXKlA6x.mjs +1 -0
  66. package/dist/types-CkZPEEdi.d.mts +43 -0
  67. package/dist/{types-_vPM8QuJ.d.mts → types-Q-x_0kVB.d.mts} +0 -9
  68. package/dist/{types-0350HUwk.d.mts → types-xTbuE-Js.d.mts} +237 -3
  69. package/dist/utils-YdvPzSET-Cbo6Ofmz.mjs +37 -0
  70. package/dist/vite.d.mts +38 -23
  71. package/dist/vite.mjs +836 -71
  72. package/dist/{xml-N8OZmN7u.mjs → xml-EW5iM39h.mjs} +1 -1
  73. package/package.json +42 -32
  74. package/dist/alias-resolver-Cigam7Y7.mjs +0 -1
  75. package/dist/feed-Ixvy9L12.mjs +0 -3
  76. package/dist/get-client-component-CLpyIcLJ.mjs +0 -1
  77. package/dist/names-N6JRDeT1.mjs +0 -1
  78. package/dist/preload-modules-QmSvKk0Q.mjs +0 -2
  79. package/dist/regex-constants-Wm7xRA3u.mjs +0 -1
  80. package/dist/robots-BGCTYwKN.mjs +0 -2
  81. package/dist/router-D84JWQz7.mjs +0 -1
  82. package/dist/sitemap-1n5BIACA.mjs +0 -7
  83. package/dist/type-guards-CTkEL8zw.mjs +0 -1
  84. package/dist/types-DCEyvFz7.d.mts +0 -199
  85. package/dist/utils-BLSRP4f6-8hVIII5T.mjs +0 -37
@@ -1 +1 @@
1
- import{p as e}from"../type-guards-CTkEL8zw.mjs";import{a as t,i as n,n as r,r as i,t as a}from"../rari-global-5vGzhToD.mjs";import{n as o,r as s}from"../get-client-component-CLpyIcLJ.mjs";if(n().isDevelopment=process.env.NODE_ENV!==`production`,i(),a(),r(),typeof window<`u`&&(o(),Reflect.set(globalThis,`__rari_rsc_require__`,s)),typeof window<`u`){let e=t();e.streaming??={bufferedRows:[]}}if(import.meta.hot){function r(){return import.meta.env.RARI_SERVER_URL!=null&&import.meta.env.RARI_SERVER_URL!==``?import.meta.env.RARI_SERVER_URL:typeof window<`u`?window.location.origin:`http://localhost:3000`}function i(e){if(!e)return!1;try{return n().serverComponents?.has(e)===!0}catch{return!1}}let a=!1,o=[],s=new Map;function c(e,t,n){s.set(e,async e=>{n(e)&&await t(e)}),import.meta.hot.on(e,t=>{(async()=>{if(!a){o.push({event:e,data:t});return}try{let n=s.get(e);n&&await n(t)}catch(t){console.error(`[rari] HMR: Error in handler for '${e}':`,t)}})()})}function l(t){return e(t)&&typeof t.filePath==`string`&&t.filePath!==``}function u(t){return e(t)&&Array.isArray(t.serverComponents)}function d(t){return e(t)&&typeof t.path==`string`&&t.path!==``}function f(t){return e(t)}function p(t){return e(t)}function m(t){return e(t)&&typeof t.filePath==`string`&&t.filePath!==``}c(`rari:register-server-component`,e=>{let t=n();t.serverComponents??=new Set,t.serverComponents.add(e.filePath)},l),c(`rari:server-components-registry`,e=>{let t=n();t.serverComponents??=new Set;for(let n of e.serverComponents)t.serverComponents.add(n)},u),c(`vite:beforeFullReload`,e=>{i(e.path)&&window.dispatchEvent(new CustomEvent(`rari:rsc-invalidate`,{detail:{filePath:e.path}}))},d),c(`rari:server-component-updated`,e=>{let t=e.id!=null&&e.id!==``?e.id:e.componentId,n=e.t!=null&&e.t!==0?e.t:e.timestamp;t!=null&&t!==``?window.dispatchEvent(new CustomEvent(`rari:rsc-invalidate`,{detail:{componentId:t,filePath:e.filePath!=null&&e.filePath!==``?e.filePath:e.file,type:`server-component`,timestamp:n}})):e.path!=null&&e.path!==``&&i(e.path)&&window.dispatchEvent(new CustomEvent(`rari:rsc-invalidate`,{detail:{filePath:e.path}}))},f),c(`rari:app-router-updated`,async n=>{if(n.routePath!=null&&n.routePath!==``||n.affectedRoutes!=null&&n.affectedRoutes.length!==0)try{let i=r(),a=await fetch(`${i}/_rari/hmr`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({action:`register`,file_path:n.filePath})});if(!a.ok)throw Error(`Component reload failed: ${a.status}`);let o=await a.json(),s=e(o)&&o.success===!0,c=e(o)&&o.reloaded===!0,l=e(o)&&typeof o.error==`string`?o.error:`Component reload unsuccessful`;if(!s&&!c)throw Error(l);if(await fetch(`${i}/_rari/hmr`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({action:`invalidate`,componentId:n.routePath!=null&&n.routePath!==``?n.routePath:n.filePath,filePath:n.filePath})}),n.metadataChanged&&n.metadata&&(n.metadata.title!=null&&n.metadata.title!==``&&(document.title=n.metadata.title),n.metadata.description!=null&&n.metadata.description!==``)){let e=document.querySelector(`meta[name="description"]`);e||(e=document.createElement(`meta`),e.setAttribute(`name`,`description`),document.head.appendChild(e)),e.setAttribute(`content`,n.metadata.description)}let u=t();n.manifestUpdated&&u?.routeInfoCache&&u.routeInfoCache.clear(),window.dispatchEvent(new CustomEvent(`rari:app-router-rerender`,{detail:{routePath:n.routePath,affectedRoutes:n.affectedRoutes??(n.routePath==null?[]:[n.routePath]),currentPath:window.location.pathname,preserveParams:!0}}))}catch(e){console.error(`[rari] HMR: App router update failed:`,e)}},p),c(`rari:server-action-updated`,e=>{window.dispatchEvent(new CustomEvent(`rari:rsc-invalidate`,{detail:{filePath:e.filePath,type:`server-action`}}))},m),o.length>0?(async()=>{try{let e=[...o];o.length=0;for(let{event:t,data:n}of e){let e=s.get(t);e&&await e(n)}}catch(e){console.error(`[rari] HMR: Error during event replay:`,e)}finally{a=!0}})():a=!0}export{};
1
+ import{v as e}from"../type-guards-BJXKlA6x.mjs";import{a as t,i as n,n as r,r as i,t as a}from"../rari-global-5vGzhToD.mjs";import{n as o,r as s}from"../get-client-component-DU5z65us.mjs";if(n().isDevelopment=process.env.NODE_ENV!==`production`,i(),a(),r(),typeof window<`u`&&(o(),Reflect.set(globalThis,`__rari_rsc_require__`,s)),typeof window<`u`){let e=t();e.streaming??={bufferedRows:[]}}if(import.meta.hot){function t(){return import.meta.env.RARI_SERVER_URL!=null&&import.meta.env.RARI_SERVER_URL!==``?import.meta.env.RARI_SERVER_URL:typeof window<`u`?window.location.origin:`http://localhost:3000`}function r(e){if(!e)return!1;try{return n().serverComponents?.has(e)===!0}catch{return!1}}let i=!1,a=[],o=/* @__PURE__ */ new Map;function s(e,t,n){o.set(e,async e=>{n(e)&&await t(e)}),import.meta.hot.on(e,t=>{(async()=>{if(!i){a.push({event:e,data:t});return}try{let n=o.get(e);n&&await n(t)}catch(t){console.error(`[rari] HMR: Error in handler for '${e}':`,t)}})()})}function c(t){return e(t)&&typeof t.filePath==`string`&&t.filePath!==``}function l(t){return e(t)&&Array.isArray(t.serverComponents)}function u(t){return e(t)&&typeof t.path==`string`&&t.path!==``}function d(t){return e(t)}function f(t){return e(t)}function p(t){return e(t)&&typeof t.filePath==`string`&&t.filePath!==``}s(`rari:register-server-component`,e=>{let t=n();t.serverComponents??=/* @__PURE__ */ new Set,t.serverComponents.add(e.filePath)},c),s(`rari:server-components-registry`,e=>{let t=n();t.serverComponents??=/* @__PURE__ */ new Set;for(let n of e.serverComponents)t.serverComponents.add(n)},l),s(`vite:beforeFullReload`,e=>{r(e.path)&&window.dispatchEvent(new CustomEvent(`rari:rsc-invalidate`,{detail:{filePath:e.path}}))},u),s(`rari:server-component-updated`,e=>{let t=e.id!=null&&e.id!==``?e.id:e.componentId,n=e.t!=null&&e.t!==0?e.t:e.timestamp;t!=null&&t!==``?window.dispatchEvent(new CustomEvent(`rari:rsc-invalidate`,{detail:{componentId:t,filePath:e.filePath!=null&&e.filePath!==``?e.filePath:e.file,type:`server-component`,timestamp:n}})):e.path!=null&&e.path!==``&&r(e.path)&&window.dispatchEvent(new CustomEvent(`rari:rsc-invalidate`,{detail:{filePath:e.path}}))},d),s(`rari:app-router-updated`,async n=>{if(n.routePath!=null&&n.routePath!==``||n.affectedRoutes!=null&&n.affectedRoutes.length!==0)try{let r=t(),i=await fetch(`${r}/_rari/hmr`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({action:`register`,file_path:n.filePath})});if(!i.ok)throw Error(`Component reload failed: ${i.status}`);let a=await i.json(),o=e(a)&&a.success===!0,s=e(a)&&a.reloaded===!0,c=e(a)&&a.content_unchanged===!0,l=e(a)&&typeof a.error==`string`?a.error:`Component reload unsuccessful`;if(!o&&!s)throw Error(l);if(c)return;if(await fetch(`${r}/_rari/hmr`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({action:`invalidate`,componentId:n.routePath!=null&&n.routePath!==``?n.routePath:n.filePath,filePath:n.filePath})}),n.metadataChanged&&n.metadata&&(n.metadata.title!=null&&n.metadata.title!==``&&(document.title=n.metadata.title),n.metadata.description!=null&&n.metadata.description!==``)){let e=document.querySelector(`meta[name="description"]`);e||(e=document.createElement(`meta`),e.setAttribute(`name`,`description`),document.head.appendChild(e)),e.setAttribute(`content`,n.metadata.description)}window.dispatchEvent(new CustomEvent(`rari:app-router-rerender`,{detail:{routePath:n.routePath,affectedRoutes:n.affectedRoutes??(n.routePath==null?[]:[n.routePath]),currentPath:window.location.pathname,preserveParams:!0}}))}catch(e){console.error(`[rari] HMR: App router update failed:`,e)}},f),s(`rari:server-action-updated`,e=>{window.dispatchEvent(new CustomEvent(`rari:rsc-invalidate`,{detail:{filePath:e.filePath,type:`server-action`}}))},p),a.length>0?(async()=>{try{let e=[...a];a.length=0;for(let{event:t,data:n}of e){let e=o.get(t);e&&await e(n)}}catch(e){console.error(`[rari] HMR: Error during event replay:`,e)}finally{i=!0}})():i=!0}export{};
@@ -1,7 +1,6 @@
1
- import "../types-_vPM8QuJ.mjs";
2
1
  import { createClientModuleProxy as createClientModuleProxy$1, registerServerReference } from "react-server-dom-webpack/server";
3
2
  //#region src/runtime/rsc/references.d.ts
4
- declare const createClientModuleProxy: typeof createClientModuleProxy$1;
5
- declare function registerClientReference<T>(clientReference: T, id: string, exportName: string): T;
3
+ export declare const createClientModuleProxy: typeof createClientModuleProxy$1;
4
+ export declare function registerClientReference<T>(clientReference: T, id: string, exportName: string): T;
6
5
  //#endregion
7
- export { createClientModuleProxy, registerClientReference, registerServerReference };
6
+ export { registerServerReference };
@@ -0,0 +1,13 @@
1
+ import{v as e}from"./type-guards-BJXKlA6x.mjs";import{t}from"./xml-EW5iM39h.mjs";import{i as n,n as r,t as i}from"./execute-B1z6YRUF.mjs";import{promises as a}from"node:fs";import o from"node:path";const s=/[^\w-]/g;function c(e){return(typeof e==`string`?new Date(e):e).toISOString()}function l(e){return[` <image:image>`,` <image:loc>${t(e)}</image:loc>`,` </image:image>`].join(`
2
+ `)}function u(e){let n=[` <image:image>`,` <image:loc>${t(e.loc)}</image:loc>`];return e.title!=null&&e.title!==``&&n.push(` <image:title>${t(e.title)}</image:title>`),e.caption!=null&&e.caption!==``&&n.push(` <image:caption>${t(e.caption)}</image:caption>`),e.geoLocation!=null&&e.geoLocation!==``&&n.push(` <image:geo_location>${t(e.geoLocation)}</image:geo_location>`),e.license!=null&&e.license!==``&&n.push(` <image:license>${t(e.license)}</image:license>`),n.push(` </image:image>`),n.join(`
3
+ `)}function d(e){let t=[];for(let n of e)typeof n==`string`?t.push(l(n)):t.push(u(n));return t.join(`
4
+ `)}function f(e){let n=[];if(n.push(` <video:video>`),n.push(` <video:title>${t(e.title)}</video:title>`),n.push(` <video:thumbnail_loc>${t(e.thumbnail_loc)}</video:thumbnail_loc>`),n.push(` <video:description>${t(e.description)}</video:description>`),e.content_loc!=null&&e.content_loc!==``&&n.push(` <video:content_loc>${t(e.content_loc)}</video:content_loc>`),e.player_loc!=null&&e.player_loc!==``&&n.push(` <video:player_loc>${t(e.player_loc)}</video:player_loc>`),e.duration!==void 0&&n.push(` <video:duration>${e.duration}</video:duration>`),e.expiration_date!=null&&e.expiration_date!==``&&n.push(` <video:expiration_date>${t(e.expiration_date)}</video:expiration_date>`),e.rating!==void 0&&n.push(` <video:rating>${e.rating}</video:rating>`),e.view_count!==void 0&&n.push(` <video:view_count>${e.view_count}</video:view_count>`),e.publication_date!=null&&e.publication_date!==``&&n.push(` <video:publication_date>${t(e.publication_date)}</video:publication_date>`),e.family_friendly!==void 0&&n.push(` <video:family_friendly>${e.family_friendly?`yes`:`no`}</video:family_friendly>`),e.requires_subscription!==void 0&&n.push(` <video:requires_subscription>${e.requires_subscription?`yes`:`no`}</video:requires_subscription>`),e.live!==void 0&&n.push(` <video:live>${e.live?`yes`:`no`}</video:live>`),e.restriction&&n.push(` <video:restriction relationship="${t(e.restriction.relationship)}">${t(e.restriction.content)}</video:restriction>`),e.platform&&n.push(` <video:platform relationship="${t(e.platform.relationship)}">${t(e.platform.content)}</video:platform>`),e.uploader){let r=e.uploader.info!=null&&e.uploader.info!==``?` info="${t(e.uploader.info)}"`:``;n.push(` <video:uploader${r}>${t(e.uploader.name)}</video:uploader>`)}if(e.tag)for(let r of e.tag)n.push(` <video:tag>${t(r)}</video:tag>`);return n.push(` </video:video>`),n.join(`
5
+ `)}function p(e){return e.map(e=>f(e)).join(`
6
+ `)}function m(e){let t=e.some(e=>e.images&&e.images.length>0),n=e.some(e=>e.videos&&e.videos.length>0),r=e.some(e=>e.alternates?.languages),i=[`xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"`];return t&&i.push(`xmlns:image="http://www.google.com/schemas/sitemap-image/1.1"`),n&&i.push(`xmlns:video="http://www.google.com/schemas/sitemap-video/1.1"`),r&&i.push(`xmlns:xhtml="http://www.w3.org/1999/xhtml"`),i}function h(e,n){e.push(` <url>`),e.push(` <loc>${t(n.url)}</loc>`),n.lastModified!=null&&e.push(` <lastmod>${c(n.lastModified)}</lastmod>`),n.changeFrequency&&e.push(` <changefreq>${n.changeFrequency}</changefreq>`),n.priority!==void 0&&e.push(` <priority>${n.priority}</priority>`)}function g(e,n){if(n.alternates?.languages)for(let[r,i]of Object.entries(n.alternates.languages))e.push(` <xhtml:link rel="alternate" hreflang="${t(r)}" href="${t(i)}" />`)}function _(e,t){t.images&&t.images.length>0&&e.push(d(t.images)),t.videos&&t.videos.length>0&&e.push(p(t.videos))}function v(e){let t=[`<?xml version="1.0" encoding="UTF-8"?>`,`<urlset ${m(e).join(` `)}>`];for(let n of e)h(t,n),g(t,n),_(t,n),t.push(` </url>`);return t.push(`</urlset>`),t.join(`
7
+ `)}
8
+ /* v8 ignore start - file system operations, better tested in integration/e2e */
9
+ async function y(e,t=[`.ts`,`.tsx`,`.js`,`.jsx`,`.mjs`,`.json`]){let r=await n({appDir:e,staticFileName:`sitemap.xml`,dynamicBaseName:`sitemap`,extensions:t});return r?[r]:[]}function b(e){return typeof e==`function`||Array.isArray(e)}function x(t){return e(t)?b(t.default):!1}async function S(e,t,n={},r){let a=await i({virtualId:`\0virtual:sitemap`,sourcePath:e.path,sourceCode:t,aliases:n,projectRoot:r,kind:`sitemap`,pluginName:`virtual-sitemap`,label:`sitemap`});if(!x(a))throw Error(`Sitemap module must export a default sitemap array or sitemap generator function`);return a}async function C(e,t){let n=await e.generateSitemaps(),r=o.join(t,`sitemap`);await a.mkdir(r,{recursive:!0});let i=/* @__PURE__ */ new Map;for(let{id:t}of n)try{let n=t.replace(s,`_`);(!n||n.length===0)&&(n=`_`);let c=i.get(n);if(c!==void 0)throw Error(`Duplicate sanitized sitemap ID "${n}": original IDs "${c}" and "${t}" collide`);i.set(n,t);let l=typeof e.default==`function`?await e.default({id:t}):e.default;if(!Array.isArray(l))throw Error(`Sitemap default export must resolve to a sitemap entry array`);let u=v(l),d=o.join(r,`${n}.xml`);await a.writeFile(d,u)}catch(e){throw Error(`Failed to generate sitemap for id "${t}"`,{cause:e})}}async function w(e,t){let n=typeof e.default==`function`?await e.default():e.default;if(!Array.isArray(n))throw Error(`Sitemap default export must resolve to a sitemap entry array`);let r=v(n),i=o.join(t,`sitemap.xml`);await a.writeFile(i,r)}
10
+ /* v8 ignore start - file system operations and dynamic imports, better tested in integration/e2e */
11
+ async function T(e){let{appDir:t,extensions:n,outDir:i,aliases:s={}}=e,c=await y(t,n);if(c.length===0)return!1;await a.mkdir(i,{recursive:!0});let l=c[0];if(l.type===`static`){let e=o.join(i,`sitemap.xml`);return await a.copyFile(l.path,e),!0}try{let e=await S(l,await a.readFile(l.path,`utf-8`),s,r(t));return typeof e.generateSitemaps==`function`?await C(e,i):await w(e,i),!0}catch(e){return console.error(`[rari] Failed to build/execute sitemap file:`,e),!1}}
12
+ /* v8 ignore stop */
13
+ export{T as generateSitemapFiles};
@@ -0,0 +1 @@
1
+ function e(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function t(t){return e(t)&&typeof t.then==`function`}function n(e){return typeof e==`object`&&!!e&&`$$typeof`in e}function r(e){return i(e)&&`code`in e}function i(e){return typeof Error.isError==`function`?Error.isError(e):e instanceof Error}function a(e){return i(e)?e:void 0}function o(e){return a(e)??Error(String(e))}function s(e,t=`Unknown error`){return i(e)?e.message:typeof e==`string`?e:t}function c(e){return typeof e==`function`}function l(t){try{let n=JSON.parse(t);return e(n)?n:null}catch{return null}}function u(e){let t=e.packageManager;return typeof t==`string`?t.startsWith(`pnpm`)?`pnpm`:t.startsWith(`yarn`)?`yarn`:t.startsWith(`bun`)?`bun`:t.startsWith(`npm`)?`npm`:null:null}function d(t){let n=e(t.dependencies)?t.dependencies:{},r=e(t.devDependencies)?t.devDependencies:{},i={...n,...r};return typeof i[`vite-plus`]==`string`?`vp`:typeof i.vite==`string`?`vite`:null}function f(e,t){if(!(e instanceof CustomEvent))return;let n=e.detail;if(t(n))return n}function p(e){return r(e)?e.code:void 0}function m(t,n){let r=l(t);if(!r)return null;let i=r[n];return Array.isArray(i)?i.filter(e):null}function h(t){return Array.isArray(t)?t.every(t=>{if(!e(t))return!1;let{find:n,replacement:r}=t;return(typeof n==`string`||n instanceof RegExp)&&typeof r==`string`}):!1}function g(t){return typeof t==`function`||e(t)&&(`$$typeof`in t||`render`in t)}function _(e){return`type`in e}function v(e){return Array.isArray(e)&&typeof e[0]==`string`}function y(t){return e(t)&&t.$$typeof===Symbol.for(`react.client.reference`)}function b(t){return e(t)&&typeof t.$$id==`string`}function x(e){return e.props}function S(e){return Object.entries(e).flatMap(([e,t])=>typeof t==`string`?[{find:e,replacement:t}]:[])}function C(t){return e(t)&&typeof t.route==`string`&&typeof t.navigationId==`number`&&typeof t.timestamp==`number`&&typeof t.key==`string`}function w(e){return Array.isArray(e)&&e.every(e=>typeof e==`string`)}function T(t){return Array.isArray(t)?t.every(t=>e(t)?Object.values(t).every(e=>typeof e==`string`||w(e)):!1):!1}function E(e){console.warn(`[rari] generateStaticParams() in ${e} returned invalid params. Expected Array<Record<string, string | string[]>> (e.g. [{ slug: "post" }]). Static routes for this page will not be generated.`)}export{d as C,u as S,E as T,_,p as a,m as b,h as c,i as d,v as f,n as g,C as h,f as i,y as l,c as m,a as n,x as o,t as p,s as r,b as s,S as t,g as u,e as v,o as w,l as x,T as y};
@@ -0,0 +1,43 @@
1
+ //#region src/font/types.d.ts
2
+ type FontDisplay = 'auto' | 'block' | 'swap' | 'fallback' | 'optional';
3
+ type LocalFontSrc = string | ReadonlyArray<{
4
+ readonly path: string;
5
+ readonly weight?: string | number;
6
+ readonly style?: string;
7
+ }>;
8
+ interface LocalFontOptions {
9
+ readonly src: LocalFontSrc;
10
+ readonly display?: FontDisplay;
11
+ readonly weight?: string | number;
12
+ readonly style?: string;
13
+ readonly variable?: string;
14
+ readonly preload?: boolean;
15
+ readonly fallback?: readonly string[];
16
+ readonly adjustFontFallback?: 'Arial' | 'Times New Roman' | false;
17
+ readonly declarations?: ReadonlyArray<{
18
+ readonly prop: string;
19
+ readonly value: string;
20
+ }>;
21
+ }
22
+ interface GoogleFontOptions {
23
+ readonly weight?: string | number | ReadonlyArray<string | number>;
24
+ readonly style?: string | ReadonlyArray<string>;
25
+ readonly subsets?: readonly string[];
26
+ readonly display?: FontDisplay;
27
+ readonly variable?: string;
28
+ readonly preload?: boolean;
29
+ readonly fallback?: readonly string[];
30
+ readonly adjustFontFallback?: boolean;
31
+ readonly axes?: readonly string[];
32
+ }
33
+ interface Font {
34
+ readonly className: string;
35
+ readonly style: {
36
+ readonly fontFamily: string;
37
+ readonly fontWeight?: number | string;
38
+ readonly fontStyle?: string;
39
+ };
40
+ readonly variable?: string;
41
+ }
42
+ //#endregion
43
+ export { LocalFontSrc as a, LocalFontOptions as i, FontDisplay as n, GoogleFontOptions as r, Font as t };
@@ -49,11 +49,6 @@ interface ComponentInfo {
49
49
  interface GlobalWithRari {
50
50
  '~rari'?: {
51
51
  isDevelopment?: boolean;
52
- navigationId?: number;
53
- AppRouterProvider?: any;
54
- ClientRouter?: any;
55
- getClientComponent?: (id: string) => Promise<any>;
56
- preloadClientComponent?: (id: string) => Promise<void>;
57
52
  streaming?: {
58
53
  enabled?: boolean;
59
54
  complete?: boolean;
@@ -61,10 +56,6 @@ interface GlobalWithRari {
61
56
  streamingBridgeInstalled?: boolean;
62
57
  };
63
58
  serverComponents?: Set<string>;
64
- routeInfoCache?: {
65
- clear: () => void;
66
- invalidate?: (path: string) => void;
67
- };
68
59
  cookies?: () => CookieStore;
69
60
  headers?: () => ReadonlyHeaders;
70
61
  useCacheDynamicDepth?: number;
@@ -1,4 +1,5 @@
1
1
  /// <reference types="vite-plus/client" />
2
+ import { ReactNode } from "react";
2
3
  //#region src/ambient.d.ts
3
4
  declare module 'virtual:react-flight-client' {
4
5
  export interface Thenable<T> extends Promise<T> {
@@ -15,7 +16,7 @@ declare module 'virtual:react-flight-client' {
15
16
  export function createFromFetch<T>(promiseForResponse: Promise<Response>, options?: Readonly<{
16
17
  readonly callServer?: (id: string, args: readonly unknown[]) => Promise<unknown>;
17
18
  readonly temporaryReferences?: Map<string, unknown>;
18
- }>): Promise<T>;
19
+ }>): Thenable<T>;
19
20
  export function createTemporaryReferenceSet(): Map<string, unknown>;
20
21
  export function encodeReply(value: unknown, options?: Readonly<{
21
22
  readonly temporaryReferences?: Map<string, unknown>;
@@ -27,7 +28,6 @@ declare module 'virtual:client-router' {
27
28
  export interface ClientRouterProps {
28
29
  readonly children: React.ReactNode;
29
30
  readonly initialRoute: string;
30
- readonly staleWindowMs?: number;
31
31
  }
32
32
  export function ClientRouter(props: ClientRouterProps): React.ReactNode;
33
33
  }
@@ -106,6 +106,240 @@ declare class ApiResponse extends Response {
106
106
  static noContent(init?: ResponseInit): Response;
107
107
  }
108
108
  //#endregion
109
+ //#region src/router/metadata/app-icons.d.ts
110
+ type AppIconKind = 'favicon' | 'icon' | 'apple-icon';
111
+ interface AppIconEntry {
112
+ readonly path: string;
113
+ readonly filePath: string;
114
+ readonly kind: AppIconKind;
115
+ readonly url: string;
116
+ readonly contentType: string;
117
+ readonly sizes?: string;
118
+ readonly width?: number;
119
+ readonly height?: number;
120
+ }
121
+ //#endregion
122
+ //#region src/router/build/types.d.ts
123
+ type RouteSegmentType = 'static' | 'dynamic' | 'catch-all' | 'optional-catch-all';
124
+ interface RouteSegment {
125
+ type: RouteSegmentType;
126
+ value: string;
127
+ param?: string;
128
+ }
129
+ interface AppRouteEntry {
130
+ path: string;
131
+ filePath: string;
132
+ css?: string[];
133
+ componentId?: string;
134
+ segments: RouteSegment[];
135
+ params: string[];
136
+ isDynamic: boolean;
137
+ metadata?: RouteMetadata;
138
+ staticParams?: Array<Record<string, string | string[]>>;
139
+ }
140
+ interface LayoutEntry {
141
+ path: string;
142
+ filePath: string;
143
+ css?: string[];
144
+ componentId?: string;
145
+ parentPath?: string;
146
+ additionalPaths?: string[];
147
+ }
148
+ interface LoadingEntry {
149
+ path: string;
150
+ filePath: string;
151
+ css?: string[];
152
+ componentId?: string;
153
+ additionalPaths?: string[];
154
+ }
155
+ interface ErrorEntry {
156
+ path: string;
157
+ filePath: string;
158
+ css?: string[];
159
+ componentId?: string;
160
+ additionalPaths?: string[];
161
+ }
162
+ interface NotFoundEntry {
163
+ path: string;
164
+ filePath: string;
165
+ css?: string[];
166
+ componentId?: string;
167
+ additionalPaths?: string[];
168
+ }
169
+ interface OgImageEntry {
170
+ path: string;
171
+ filePath: string;
172
+ width?: number;
173
+ height?: number;
174
+ contentType?: string;
175
+ additionalPaths?: string[];
176
+ }
177
+ interface ApiRouteEntry {
178
+ path: string;
179
+ filePath: string;
180
+ segments: RouteSegment[];
181
+ params: string[];
182
+ isDynamic: boolean;
183
+ methods: string[];
184
+ }
185
+ interface TemplateEntry {
186
+ path: string;
187
+ filePath: string;
188
+ css?: string[];
189
+ componentId?: string;
190
+ parentPath?: string;
191
+ additionalPaths?: string[];
192
+ }
193
+ interface AppRouteManifest {
194
+ routes: AppRouteEntry[];
195
+ layouts: LayoutEntry[];
196
+ loading: LoadingEntry[];
197
+ errors: ErrorEntry[];
198
+ notFound: NotFoundEntry[];
199
+ templates: TemplateEntry[];
200
+ apiRoutes: ApiRouteEntry[];
201
+ ogImages: OgImageEntry[];
202
+ appIcons: AppIconEntry[];
203
+ generated: string;
204
+ }
205
+ interface RouteMetadata {
206
+ title?: string | {
207
+ default?: string;
208
+ template?: string;
209
+ absolute?: string;
210
+ };
211
+ description?: string;
212
+ keywords?: string | string[];
213
+ openGraph?: {
214
+ title?: string;
215
+ description?: string;
216
+ images?: string[] | Array<{
217
+ url: string;
218
+ width?: number;
219
+ height?: number;
220
+ alt?: string;
221
+ }>;
222
+ url?: string;
223
+ siteName?: string;
224
+ locale?: string;
225
+ type?: string;
226
+ };
227
+ twitter?: {
228
+ card?: 'summary' | 'summary_large_image' | 'app' | 'player';
229
+ title?: string;
230
+ description?: string;
231
+ images?: string[] | Array<{
232
+ url: string;
233
+ alt?: string;
234
+ }>;
235
+ site?: string;
236
+ creator?: string;
237
+ };
238
+ robots?: {
239
+ index?: boolean;
240
+ follow?: boolean;
241
+ noarchive?: boolean;
242
+ nosnippet?: boolean;
243
+ noimageindex?: boolean;
244
+ nocache?: boolean;
245
+ } | string;
246
+ icons?: {
247
+ icon?: string | {
248
+ url: string;
249
+ type?: string;
250
+ sizes?: string;
251
+ rel?: string;
252
+ } | Array<{
253
+ url: string;
254
+ type?: string;
255
+ sizes?: string;
256
+ rel?: string;
257
+ }>;
258
+ shortcut?: string;
259
+ apple?: string | {
260
+ url: string;
261
+ sizes?: string;
262
+ type?: string;
263
+ rel?: string;
264
+ } | Array<{
265
+ url: string;
266
+ sizes?: string;
267
+ type?: string;
268
+ rel?: string;
269
+ }>;
270
+ other?: {
271
+ url: string;
272
+ rel?: string;
273
+ type?: string;
274
+ sizes?: string;
275
+ } | Array<{
276
+ url: string;
277
+ rel?: string;
278
+ type?: string;
279
+ sizes?: string;
280
+ }>;
281
+ };
282
+ manifest?: string;
283
+ themeColor?: string | Array<{
284
+ media?: string;
285
+ color: string;
286
+ }>;
287
+ viewport?: string | {
288
+ width?: string | number;
289
+ height?: string | number;
290
+ initialScale?: number;
291
+ minimumScale?: number;
292
+ maximumScale?: number;
293
+ userScalable?: boolean;
294
+ };
295
+ appleWebApp?: {
296
+ capable?: boolean;
297
+ title?: string;
298
+ statusBarStyle?: 'default' | 'black' | 'black-translucent';
299
+ };
300
+ canonical?: string;
301
+ alternates?: {
302
+ canonical?: string;
303
+ languages?: Record<string, string>;
304
+ types?: Record<string, string>;
305
+ };
306
+ }
307
+ type Metadata = RouteMetadata;
308
+ interface RouteParams {
309
+ readonly [key: string]: string | readonly string[];
310
+ }
311
+ interface SearchParams {
312
+ readonly [key: string]: string | readonly string[] | undefined;
313
+ }
314
+ type PageProps<TParams extends RouteParams = RouteParams, TSearchParams extends SearchParams = SearchParams> = Readonly<{
315
+ params: TParams;
316
+ searchParams: TSearchParams;
317
+ }>;
318
+ type LayoutProps<TParams extends RouteParams = RouteParams> = Readonly<{
319
+ children: ReactNode;
320
+ params?: TParams;
321
+ pathname?: string;
322
+ }>;
323
+ interface ErrorProps {
324
+ readonly error: Error;
325
+ readonly reset: () => void;
326
+ }
327
+ interface AppRouteMatch {
328
+ readonly route: AppRouteEntry;
329
+ readonly params: RouteParams;
330
+ readonly searchParams: SearchParams;
331
+ readonly layouts: readonly LayoutEntry[];
332
+ readonly loading?: LoadingEntry;
333
+ readonly error?: ErrorEntry;
334
+ readonly templates: readonly TemplateEntry[];
335
+ readonly pathname: string;
336
+ }
337
+ type GenerateMetadata<TParams extends RouteParams = RouteParams, TSearchParams extends SearchParams = SearchParams> = (props: Readonly<{
338
+ params: TParams;
339
+ searchParams: TSearchParams;
340
+ }>) => RouteMetadata | Promise<RouteMetadata>;
341
+ type GenerateStaticParams<TParams extends RouteParams = RouteParams> = () => TParams[] | Promise<TParams[]>;
342
+ //#endregion
109
343
  //#region src/router/metadata/types.d.ts
110
344
  interface RobotsRule {
111
345
  readonly userAgent?: string | readonly string[];
@@ -204,4 +438,4 @@ interface Feed {
204
438
  readonly items: readonly FeedEntry[];
205
439
  }
206
440
  //#endregion
207
- export { Sitemap as a, SitemapVideo as c, RouteContext as d, RouteHandler as f, RobotsRule as i, ApiResponse as l, FeedEntry as n, SitemapEntry as o, Robots as r, SitemapImage as s, Feed as t, ApiRouteHandlers as u };
441
+ export { RouteSegmentType as C, RouteContext as D, ApiRouteHandlers as E, RouteHandler as O, RouteSegment as S, ApiResponse as T, LayoutProps as _, Sitemap as a, NotFoundEntry as b, SitemapVideo as c, AppRouteMatch as d, ErrorEntry as f, LayoutEntry as g, GenerateStaticParams as h, RobotsRule as i, AppRouteEntry as l, GenerateMetadata as m, FeedEntry as n, SitemapEntry as o, ErrorProps as p, Robots as r, SitemapImage as s, Feed as t, AppRouteManifest as u, LoadingEntry as v, TemplateEntry as w, PageProps as x, Metadata as y };
@@ -0,0 +1,37 @@
1
+ import{existsSync as e,readFileSync as t,writeFileSync as n}from"node:fs";import{join as r}from"node:path";import i from"node:process";import{styleText as a}from"node:util";function o(e){console.warn(`${a(`blue`,`info`)} ${e}`)}function s(e){console.warn(`${a(`green`,`✓`)} ${e}`)}function c(e){console.error(`${a(`red`,`✗`)} ${e}`)}function l(e){console.warn(`${a(`yellow`,`⚠`)} ${e}`)}function u(e,t=`Unknown error`){return Error.isError(e)?e.message:typeof e==`string`?e:t}const d=/\s+(?:&&\s+)?/,f=/^>=?\s*(\d+)/,p=/^>=?\s*(\d+)\.(\d+)\.(\d+)/,m=/^=?\s*(\d+)\.(\d+)\.(\d+)/,h=/^\^\s*(\d+)\.(\d+)\.(\d+)/,g=/^~\s*(\d+)\.(\d+)\.(\d+)/,_=/^(?:>=?|<=?|[=~^])?\s*(\d+)\.(\d+)/,v=/^(\d+)\.(?:x|\*)/i,y=/^(?:>=?|[=~^])\s*(\d+)(?:\s|$)/,b=/^(\d+)$/;function x(e){return typeof e==`object`&&!!e}function S(e){let t=JSON.parse(e);if(!x(t))throw Error(`Invalid package.json`);return t}function C(e,t=`>=24.21.0`){if(e.engines=e.engines??{},e.engines.node){if(!w(e.engines.node,t))return l(`Current engines.node value "${e.engines.node}" may not meet the required minimum of ${t}`),l(`Updating to ${t} for deployment compatibility`),e.engines.node=t,!0}else return e.engines.node=t,!0;return!1}function w(e,t){let n=T(e),r=T(t);return!n||!r?!1:E(n,r)>=0}function T(e){let t=e.trim(),n=e=>e!==null;if(t.includes(`||`)){let e=t.split(`||`).map(e=>e.trim()).map(e=>T(e)).filter(n);return e.length===0?null:e.reduce((e,t)=>E(t,e)<0?t:e)}let r=t.split(d).filter(e=>e!==``&&e!==`&&`);if(r.length>1){let e=r.filter(e=>f.test(e)).map(e=>T(e)).filter(n);return e.length===0?null:e.reduce((e,t)=>E(t,e)>0?t:e)}let i=null;return i=p.exec(t),i||(i=m.exec(t),i)||(i=h.exec(t),i)||(i=g.exec(t),i)?{major:Number.parseInt(i[1],10),minor:Number.parseInt(i[2],10),patch:Number.parseInt(i[3],10)}:(i=_.exec(t),i?{major:Number.parseInt(i[1],10),minor:Number.parseInt(i[2],10),patch:0}:(i=v.exec(t),i||(i=y.exec(t),i)||(i=b.exec(t),i)?{major:Number.parseInt(i[1],10),minor:0,patch:0}:null))}function E(e,t){return e.major===t.major?e.minor===t.minor?e.patch-t.patch:e.minor-t.minor:e.major-t.major}function D(n=i.cwd()){let a=r(n,`node_modules/rari/package.json`);if(!e(a))return c(`rari is not installed. Please run "npm install rari" first.`),i.exit(1),``;try{let e=S(t(a,`utf-8`));return e.version!=null&&e.version!==``?`^${e.version}`:(c(`Could not determine rari version from package.json`),i.exit(1),``)}catch(e){return c(`Failed to read rari package.json: ${u(e)}`),i.exit(1),``}}function O(a,d){let f=r(a,`package.json`);e(f)||(c(`No package.json found. Please run this command from your project root.`),i.exit(1));try{let e=S(t(f,`utf-8`));e.scripts=e.scripts??{};let r=d.startScript??`rari start`;e.scripts.start&&e.scripts.start!==r&&!e.scripts[`start:original`]&&(l(`Existing start script found: "${e.scripts.start}"`),l(`Backing up to start:original and replacing with "${r}"`),e.scripts[`start:original`]=e.scripts.start),e.scripts.start=r,e.scripts[`start:local`]=`rari start`,e.scripts[`deploy:${d.providerName.toLowerCase()}`]=d.deployScript,C(e),(e.dependencies?.rari==null||e.dependencies.rari===``)&&(o(`Adding rari dependency...`),e.dependencies=e.dependencies??{},e.dependencies.rari=d.dependency??D(a)),n(f,`${JSON.stringify(e,null,2)}\n`),s(`Updated package.json for ${d.providerName} deployment`)}catch(e){c(`Failed to update package.json: ${u(e)}`),i.exit(1)}}function k(i,a,o){let c=r(i,`.gitignore`),l=[``,`# ${a}`,`${o}/`,``].join(`
2
+ `);if(e(c)){let e=t(c,`utf-8`),r=e.split(`
3
+ `).map(e=>e.trim());r.includes(`${o}/`)||r.includes(o)||(n(c,e+l),s(`Updated .gitignore with ${a} entries`))}else{let e=`# Dependencies
4
+ node_modules
5
+ .pnpm-store
6
+
7
+ # Build outputs
8
+ dist
9
+
10
+ # Environment variables
11
+ .env
12
+ .env.local
13
+ .env.production
14
+
15
+ # ${a}
16
+ ${o}
17
+
18
+ # Logs
19
+ *.log
20
+ npm-debug.log*
21
+ pnpm-debug.log*
22
+
23
+ # OS files
24
+ .DS_Store
25
+ Thumbs.db
26
+
27
+ # IDE files
28
+ .vscode
29
+ .idea
30
+ *.swp
31
+ *.swo
32
+ *~
33
+
34
+ # Temporary files
35
+ .tmp
36
+ tmp
37
+ `;n(c,e),s(`Created .gitignore with ${a} entries`)}}function A(a,o,d){let f=r(a,o);try{if(e(f)){let i=t(f,`utf-8`),s=`${o}.backup`,c=r(a,s);e(c)&&(s=`${o}.backup.${Date.now()}`,c=r(a,s)),l(`${o} already exists, backing up to ${s}`),n(c,i,{flag:`wx`})}n(f,d),s(`Created ${o} configuration`)}catch(e){c(`Failed to create or backup ${o}: ${u(e)}`),i.exit(1)}}export{o as a,O as i,A as n,s as o,D as r,k as t};
package/dist/vite.d.mts CHANGED
@@ -1,6 +1,5 @@
1
- import { a as Sitemap, c as SitemapVideo, d as RouteContext, f as RouteHandler, i as RobotsRule, l as ApiResponse, o as SitemapEntry, r as Robots, s as SitemapImage, u as ApiRouteHandlers } from "./types-0350HUwk.mjs";
1
+ import { C as RouteSegmentType, D as RouteContext, E as ApiRouteHandlers, O as RouteHandler, S as RouteSegment, T as ApiResponse, _ as LayoutProps, a as Sitemap, b as NotFoundEntry, c as SitemapVideo, d as AppRouteMatch, f as ErrorEntry, g as LayoutEntry, h as GenerateStaticParams, i as RobotsRule, l as AppRouteEntry, m as GenerateMetadata, o as SitemapEntry, p as ErrorProps, r as Robots, s as SitemapImage, u as AppRouteManifest, v as LoadingEntry, w as TemplateEntry, x as PageProps, y as Metadata } from "./types-xTbuE-Js.mjs";
2
2
  import { a as ProxyModule, c as RariURL, i as ProxyMatcher, l as RequestCookies, n as ProxyConfig, o as ProxyResult, r as ProxyFunction, s as RariFetchEvent, t as CookieOptions, u as ResponseCookies } from "./types-DAdRjhuk.mjs";
3
- import { a as ErrorProps, c as LayoutEntry, d as Metadata, f as NotFoundEntry, g as TemplateEntry, h as RouteSegmentType, i as ErrorEntry, l as LayoutProps, m as RouteSegment, n as AppRouteManifest, o as GenerateMetadata, p as PageProps, r as AppRouteMatch, s as GenerateStaticParams, t as AppRouteEntry, u as LoadingEntry } from "./types-DCEyvFz7.mjs";
4
3
  import { UserConfig } from "vite-plus";
5
4
  import { ReactCompilerOptions as ReactCompilerOptions$1 } from "oxc-transform-react";
6
5
  //#region src/vite/analysis/directives.d.ts
@@ -102,6 +101,7 @@ interface ServerBuildOptions {
102
101
  readonly serverConfigPath?: string;
103
102
  readonly minify?: boolean;
104
103
  readonly alias?: Readonly<Record<string, string>>;
104
+ readonly assetsDir?: string;
105
105
  readonly define?: Readonly<Record<string, string>>;
106
106
  readonly csp?: ServerCSPConfig;
107
107
  readonly cacheControl?: ServerCacheControlConfig;
@@ -130,7 +130,7 @@ interface ProxyPluginOptions {
130
130
  readonly extensions?: readonly string[];
131
131
  readonly verbose?: boolean;
132
132
  }
133
- declare function rariProxy(options?: ProxyPluginOptions): RariPlugin;
133
+ export declare function rariProxy(options?: ProxyPluginOptions): RariPlugin;
134
134
  //#endregion
135
135
  //#region src/router/build/props-extractor.d.ts
136
136
  interface ServerSidePropsResult {
@@ -179,19 +179,34 @@ interface MetadataResult {
179
179
  readonly type?: string;
180
180
  readonly sizes?: string;
181
181
  readonly rel?: string;
182
- }> | string | readonly string[];
182
+ }> | {
183
+ readonly url: string;
184
+ readonly type?: string;
185
+ readonly sizes?: string;
186
+ readonly rel?: string;
187
+ } | string | readonly string[];
183
188
  readonly apple?: ReadonlyArray<{
184
189
  readonly url: string;
185
190
  readonly sizes?: string;
186
191
  readonly rel?: string;
187
- }> | string | readonly string[];
192
+ }> | {
193
+ readonly url: string;
194
+ readonly sizes?: string;
195
+ readonly rel?: string;
196
+ } | string | readonly string[];
188
197
  readonly other?: ReadonlyArray<{
189
198
  readonly url: string;
190
199
  readonly rel?: string;
191
200
  readonly type?: string;
192
201
  readonly sizes?: string;
193
202
  readonly color?: string;
194
- }>;
203
+ }> | {
204
+ readonly url: string;
205
+ readonly rel?: string;
206
+ readonly type?: string;
207
+ readonly sizes?: string;
208
+ readonly color?: string;
209
+ };
195
210
  };
196
211
  readonly manifest?: string;
197
212
  readonly themeColor?: string | ReadonlyArray<{
@@ -216,25 +231,25 @@ interface MetadataResult {
216
231
  };
217
232
  }
218
233
  type StaticParamsResult = Array<Record<string, string | readonly string[]>>;
219
- declare function extractServerProps(componentPath: string, params: Readonly<{
234
+ export declare function extractServerProps(componentPath: string, params: Readonly<{
220
235
  readonly [key: string]: string;
221
236
  }>, searchParams: Readonly<{
222
237
  readonly [key: string]: string;
223
238
  }>): Promise<ServerSidePropsResult>;
224
- declare function extractMetadata(componentPath: string, params: Readonly<{
239
+ export declare function extractMetadata(componentPath: string, params: Readonly<{
225
240
  readonly [key: string]: string;
226
241
  }>, searchParams: Readonly<{
227
242
  readonly [key: string]: string;
228
243
  }>): Promise<MetadataResult>;
229
- declare function extractStaticParams(componentPath: string): Promise<StaticParamsResult>;
230
- declare function hasServerSideDataFetching(componentPath: string): Promise<boolean>;
231
- declare function extractServerPropsWithCache(componentPath: string, params: Readonly<{
244
+ export declare function extractStaticParams(componentPath: string): Promise<StaticParamsResult>;
245
+ export declare function hasServerSideDataFetching(componentPath: string): Promise<boolean>;
246
+ export declare function extractServerPropsWithCache(componentPath: string, params: Readonly<{
232
247
  readonly [key: string]: string;
233
248
  }>, searchParams: Readonly<{
234
249
  readonly [key: string]: string;
235
250
  }>, cacheTime?: number): Promise<ServerSidePropsResult>;
236
- declare function clearPropsCache(): void;
237
- declare function clearPropsCacheForComponent(componentPath: string): void;
251
+ export declare function clearPropsCache(): void;
252
+ export declare function clearPropsCacheForComponent(componentPath: string): void;
238
253
  //#endregion
239
254
  //#region src/router/build/routes.d.ts
240
255
  interface AppRouteGeneratorOptions {
@@ -242,7 +257,7 @@ interface AppRouteGeneratorOptions {
242
257
  readonly extensions?: readonly string[];
243
258
  readonly verbose?: boolean;
244
259
  }
245
- declare function generateAppRouteManifest(appDir: string, options?: Readonly<Partial<AppRouteGeneratorOptions>>): Promise<AppRouteManifest>;
260
+ export declare function generateAppRouteManifest(appDir: string, options?: Readonly<Partial<AppRouteGeneratorOptions>>): Promise<AppRouteManifest>;
246
261
  //#endregion
247
262
  //#region src/router/build/vite-plugin.d.ts
248
263
  interface RariRouterPluginOptions {
@@ -250,14 +265,14 @@ interface RariRouterPluginOptions {
250
265
  readonly extensions?: readonly string[];
251
266
  readonly outDir?: string;
252
267
  }
253
- declare function rariRouter(options?: RariRouterPluginOptions): RariPlugin;
268
+ export declare function rariRouter(options?: RariRouterPluginOptions): RariPlugin;
254
269
  //#endregion
255
270
  //#region src/vite/index.d.ts
256
- interface RouterPluginOptions {
271
+ export interface RouterPluginOptions {
257
272
  readonly appDir?: string;
258
273
  readonly extensions?: readonly string[];
259
274
  }
260
- interface RariOptions {
275
+ export interface RariOptions {
261
276
  readonly projectRoot?: string;
262
277
  readonly serverBuild?: ServerBuildOptions;
263
278
  readonly serverHandler?: boolean;
@@ -313,12 +328,12 @@ interface RariOptions {
313
328
  readonly mdx?: MdxPluginOptions;
314
329
  readonly compiler?: boolean | ReactCompilerOptions;
315
330
  }
316
- declare function defineRariOptions(config: RariOptions): RariOptions;
317
- declare function rari(options?: RariOptions): RariPlugin[];
318
- declare function defineRariConfig(config: UserConfig & {
331
+ export declare function defineRariOptions(config: RariOptions): RariOptions;
332
+ export declare function rari(options?: RariOptions): RariPlugin[];
333
+ export declare function defineRariConfig(config: UserConfig & {
319
334
  readonly plugins?: readonly RariPlugin[];
320
335
  }): UserConfig;
321
- type Request = globalThis.Request;
322
- type Response = globalThis.Response;
336
+ export type Request = globalThis.Request;
337
+ export type Response = globalThis.Response;
323
338
  //#endregion
324
- export { ApiResponse, type ApiRouteHandlers, type AppRouteEntry, type AppRouteManifest, type AppRouteMatch, type CookieOptions, type ErrorEntry, type ErrorProps, type GenerateMetadata, type GenerateStaticParams, type LayoutEntry, type LayoutProps, type LoadingEntry, type Metadata, type MetadataResult, type NotFoundEntry, type PageProps, type ProxyConfig, type ProxyFunction, type ProxyMatcher, type ProxyModule, type ProxyPluginOptions, type ProxyResult, type RariCompilerOption, type RariFetchEvent, RariOptions, type RariPlugin, type RariURL, type ReactCompilerOptions, Request, type RequestCookies, Response, type ResponseCookies, type Robots, type RobotsRule, type RouteContext, type RouteHandler, type RouteSegment, type RouteSegmentType, RouterPluginOptions, type ServerActionConfig, type ServerCSPConfig, type ServerCacheConfig, type ServerCacheControlConfig, type ServerCacheLayerConfig, type ServerConfig, type ServerSidePropsResult, type ServerUseCacheConfig, type Sitemap, type SitemapEntry, type SitemapImage, type SitemapVideo, type StaticParamsResult, type TemplateEntry, clearPropsCache, clearPropsCacheForComponent, defineRariConfig, defineRariOptions, extractMetadata, extractServerProps, extractServerPropsWithCache, extractStaticParams, generateAppRouteManifest, hasServerSideDataFetching, rari, rariProxy, rariRouter };
339
+ export { ApiResponse, type ApiRouteHandlers, type AppRouteEntry, type AppRouteManifest, type AppRouteMatch, type CookieOptions, type ErrorEntry, type ErrorProps, type GenerateMetadata, type GenerateStaticParams, type LayoutEntry, type LayoutProps, type LoadingEntry, type Metadata, type MetadataResult, type NotFoundEntry, type PageProps, type ProxyConfig, type ProxyFunction, type ProxyMatcher, type ProxyModule, type ProxyPluginOptions, type ProxyResult, type RariCompilerOption, type RariFetchEvent, type RariPlugin, type RariURL, type ReactCompilerOptions, type RequestCookies, type ResponseCookies, type Robots, type RobotsRule, type RouteContext, type RouteHandler, type RouteSegment, type RouteSegmentType, type ServerActionConfig, type ServerCSPConfig, type ServerCacheConfig, type ServerCacheControlConfig, type ServerCacheLayerConfig, type ServerConfig, type ServerSidePropsResult, type ServerUseCacheConfig, type Sitemap, type SitemapEntry, type SitemapImage, type SitemapVideo, type StaticParamsResult, type TemplateEntry };