rari 0.17.9 → 0.17.11

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 (62) hide show
  1. package/dist/cli.d.mts +4 -7
  2. package/dist/cli.mjs +49 -40
  3. package/dist/define-BIL9PMLh.mjs +1 -0
  4. package/dist/{define-BafO1-XT.d.mts → define-DCZgXfOp.d.mts} +0 -2
  5. package/dist/fly-BZsz03bn.mjs +59 -0
  6. package/dist/font/google-catalog.d.mts +15 -0
  7. package/dist/font/google.d.mts +1 -3
  8. package/dist/font/local.d.mts +2 -4
  9. package/dist/font.d.mts +1 -1
  10. package/dist/get-client-component-DVAbynLr.mjs +1 -0
  11. package/dist/headers.d.mts +1 -3
  12. package/dist/image/runtime-config.d.mts +1 -3
  13. package/dist/image/static.d.mts +1 -1
  14. package/dist/image.d.mts +1 -5
  15. package/dist/image.mjs +1 -1
  16. package/dist/index.d.mts +2 -4
  17. package/dist/mdx/define.d.mts +1 -1
  18. package/dist/mdx/define.mjs +1 -1
  19. package/dist/mdx/registry.d.mts +1 -3
  20. package/dist/mdx.d.mts +1 -5
  21. package/dist/mdx.mjs +1 -1
  22. package/dist/og.d.mts +0 -2
  23. package/dist/platform.d.mts +1 -3
  24. package/dist/{preload-modules-BDQFWAlZ.mjs → preload-modules-0iyuP4Vs.mjs} +2 -2
  25. package/dist/proxy/RariRequest.d.mts +2 -4
  26. package/dist/proxy/RariResponse.d.mts +1 -1
  27. package/dist/proxy/executor.d.mts +1 -3
  28. package/dist/railway-DUCTAuA9.mjs +10 -0
  29. package/dist/{react-helpers-GTRYJwF2.d.mts → react-helpers-CZtKqfS6.d.mts} +0 -2
  30. package/dist/render-DawwdqvN.mjs +14 -0
  31. package/dist/{router-kf_rLP_F.mjs → router-861SNPMt.mjs} +1 -1
  32. package/dist/router.d.mts +0 -8
  33. package/dist/router.mjs +1 -1
  34. package/dist/runtime/AppRouterProvider.d.mts +1 -5
  35. package/dist/runtime/AppRouterProvider.mjs +1 -1
  36. package/dist/runtime/ClientRouter.d.mts +1 -3
  37. package/dist/runtime/ClientRouter.mjs +3 -3
  38. package/dist/runtime/ErrorBoundaryWrapper.d.mts +0 -2
  39. package/dist/runtime/ErrorBoundaryWrapper.mjs +1 -1
  40. package/dist/runtime/action-flight-refresh.d.mts +0 -2
  41. package/dist/runtime/action-revalidation-kind.d.mts +1 -3
  42. package/dist/runtime/call-server.d.mts +1 -3
  43. package/dist/runtime/entry-client.d.mts +2 -4
  44. package/dist/runtime/entry-client.mjs +3 -3
  45. package/dist/runtime/merge-flight-refresh.d.mts +2 -4
  46. package/dist/runtime/rsc-client-runtime.d.mts +1 -5
  47. package/dist/runtime/rsc-client-runtime.mjs +1 -1
  48. package/dist/runtime/rsc-references.d.mts +0 -2
  49. package/dist/{sitemap-DIL-PFSt.mjs → sitemap-ByPlT2YN.mjs} +1 -1
  50. package/dist/{static-modules-BnpA9S9v.d.mts → static-modules-DmO7M_cF.d.mts} +0 -4
  51. package/dist/{types-DAdRjhuk.d.mts → types-CSDt4P_t.d.mts} +0 -4
  52. package/dist/{types-C8N3Hc8I.d.mts → types-Cw2SI7r7.d.mts} +0 -2
  53. package/dist/{types-yeW6ju9Y.d.mts → types-DNk27dqJ.d.mts} +0 -10
  54. package/dist/{types-CkZPEEdi.d.mts → types-DeWes1rB.d.mts} +0 -2
  55. package/dist/{utils-YdvPzSET-Cbo6Ofmz.mjs → utils-DZWuxUA--BobVI1xy.mjs} +1 -37
  56. package/dist/vite.d.mts +2 -26
  57. package/dist/vite.mjs +77 -75
  58. package/package.json +14 -14
  59. package/dist/define-Dsj1lR4C.mjs +0 -1
  60. package/dist/get-client-component-D2K213pV.mjs +0 -1
  61. package/dist/railway-CE3nqaKt.mjs +0 -67
  62. package/dist/render-D0eMtn5L.mjs +0 -73
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "rari",
3
3
  "type": "module",
4
- "version": "0.17.9",
4
+ "version": "0.17.11",
5
5
  "description": "Runtime Accelerated Rendering Infrastructure (rari)",
6
6
  "author": "Ryan Skinner",
7
7
  "license": "MIT",
@@ -138,8 +138,8 @@
138
138
  },
139
139
  "peerDependencies": {
140
140
  "@mdx-js/mdx": "^3.1.1",
141
- "@rari/use-cache": "^0.17.8",
142
- "oxc-transform-react": "^0.155.0",
141
+ "@rari/use-cache": "^0.17.11",
142
+ "oxc-transform-react": "^0.158.0",
143
143
  "react": "^19.3.1",
144
144
  "react-dom": "^19.3.1"
145
145
  },
@@ -155,30 +155,30 @@
155
155
  }
156
156
  },
157
157
  "dependencies": {
158
- "@capsizecss/metrics": "^4.4.0",
158
+ "@capsizecss/metrics": "^4.5.0",
159
159
  "@capsizecss/unpack": "^4.0.1",
160
160
  "react-server-dom-webpack": "^19.3.1"
161
161
  },
162
162
  "optionalDependencies": {
163
- "rari-darwin-arm64": "0.17.9",
164
- "rari-darwin-x64": "0.17.9",
165
- "rari-linux-arm64": "0.17.9",
166
- "rari-linux-x64": "0.17.9",
167
- "rari-win32-arm64": "0.17.9",
168
- "rari-win32-x64": "0.17.9"
163
+ "rari-darwin-arm64": "0.17.11",
164
+ "rari-darwin-x64": "0.17.11",
165
+ "rari-linux-arm64": "0.17.11",
166
+ "rari-linux-x64": "0.17.11",
167
+ "rari-win32-arm64": "0.17.11",
168
+ "rari-win32-x64": "0.17.11"
169
169
  },
170
170
  "devDependencies": {
171
171
  "@mdx-js/mdx": "^3.1.1",
172
172
  "@rari/deploy": "0.0.0",
173
173
  "@rari/logger": "0.0.0",
174
- "@rari/use-cache": "0.17.9",
175
- "@types/node": "^26.6.5",
174
+ "@rari/use-cache": "0.17.11",
175
+ "@types/node": "^26.6.6",
176
176
  "@types/react": "^19.3.0",
177
177
  "@types/react-dom": "^19.3.0",
178
- "oxc-transform-react": "^0.155.0",
178
+ "oxc-transform-react": "^0.158.0",
179
179
  "typescript": "npm:@typescript/typescript6@^6.0.2",
180
180
  "typescript-7": "npm:typescript@^7.0.2",
181
- "vite-plus": "^1.3.0"
181
+ "vite-plus": "^1.7.0"
182
182
  },
183
183
  "scripts": {
184
184
  "build": "pnpm typecheck && vp pack && node ./scripts/update-google-fonts.ts --types-only",
@@ -1 +0,0 @@
1
- import{g as e}from"./type-guards-BLY2PlGR.mjs";import{s as t}from"./regex-constants-DzXwNGh2.mjs";import{t as n}from"./names-CLmM0CPi.mjs";import{registerClientReference as r}from"./runtime/rsc-references.mjs";import{r as i}from"./rari-global-5vGzhToD.mjs";function a(e,n,a=`default`){let o=`${n}#${a}`;if(typeof globalThis<`u`){let r=i(),s=n.replace(t,``).split(`/`).pop(),c=s!=null&&s!==``?s:a,l={id:a==="default"?c:a,path:n,type:`client`,component:e,registered:!0};r[o]=l,r[c]=l,r[n]=l}function s(){throw Error(`Attempted to call ${a}() from the server but ${a} is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.`)}return r(s,n,a)}function o(e){let t={};for(let[n,{component:r,id:i,exportName:o=`default`}]of Object.entries(e))t[n]=a(r,i,o);return t}function s(t){return e(t)&&typeof t.id==`string`&&`component`in t}function c(e){return Array.isArray(e)?[...e]:Object.entries(e).map(([e,t])=>{if(s(t))return{component:t.component,id:t.id,exportName:t.exportName,name:e,client:t.client??!0};throw Error(`[rari/mdx] Component "${e}" is missing module metadata. Pass components to defineMdxComponents({ ... }) in a file processed by the rari vite plugin.`)})}function l(e){let t=c(e);return e=>{let r={},i={},a=new Set(n(e));for(let e of t)a.has(e.name)&&(e.client===!1?r[e.name]=e.component:i[e.name]={component:e.component,id:e.id,exportName:e.exportName});return{...r,...o(i)}}}export{l as t};
@@ -1 +0,0 @@
1
- import{S as e,g as t,m as n,u as r}from"./type-guards-BLY2PlGR.mjs";import{o as i}from"./path-CTEC1xmy.mjs";import{n as a,r as o,t as s}from"./rari-global-5vGzhToD.mjs";import{createElement as c}from"react";function l(e){return e.startsWith(`./`)?[e,e.slice(2)]:[e,`./${e}`]}function u(e){let t=i(e),n=/* @__PURE__ */ new Set([t]),r=t.indexOf(`/src/`);r!==-1&&n.add(t.slice(r+1));let a=t.indexOf(`/components/`);return a!==-1&&n.add(t.slice(a+1)),[...n]}function d(e,t){if(t!==void 0)return t;let n=e.exportName;if(n!=null&&n!==``)return n}function f(e,t){let n=i(e),r=i(t);return!!(n===r||r.includes(`/`)&&n.endsWith(`/${r}`)||n.includes(`/`)&&r.endsWith(`/${n}`))}function p(e,t,n){for(let r of u(e))for(let e of l(r)){let r=Object.values(n).find(t=>typeof t.path!=`string`||t.path===``?!1:f(t.path,e));if(r)return{info:r,exportName:d(r,t)}}return null}function m(e){return e.loading=!0,e.loadPromise=e.loader().then(t=>(e.component=t,e.registered=!0,e.loading=!1,t)).catch(t=>{throw console.error(`[rari] Failed to load component ${e.id}:`,t),e.loading=!1,e.loadError=t,e.loadPromise=void 0,t}),e.loadPromise}async function h(e,t){return e.component==null?e.loadPromise?(await e.loadPromise,g(e,t)):e.loader?await m(e)==null?null:g(e,t):null:g(e,t)}function g(e,r){let i=e.component;if(i==null)return null;if(n(i))return i;if(!t(i))return null;if(r==null||r===``||r==="default")return i.default??i;if(r in i)return i[r];let a=i.default;return t(a)&&r in a?a[r]:null}function _(e){let t=i(e);return t===e?[t]:[t,e]}function v(e){let t=o(),n=a(),r=s(),c=i(e),l=y(e,t);if(l!=null)return l;let u=c.indexOf(`#`),d=u===-1?c:c.slice(0,u),f=u===-1?void 0:c.slice(u+1);return b(e,f,t)??x(e,d,f,t,n,r)??p(d,f,t)}function y(e,t){for(let n of _(e)){if(!(n in t))continue;let e=t[n],r=n.indexOf(`#`);return{info:e,exportName:d(e,r===-1?void 0:n.slice(r+1))}}return null}function b(e,t,n){for(let r of _(e)){let e=r.indexOf(`#`),i=e===-1?r:r.slice(0,e);if(i in n)return{info:n[i],exportName:d(n[i],t)}}return null}function x(e,t,n,r,a,o){let s=i(e)===e?[t]:[t,e.includes(`#`)?e.slice(0,e.indexOf(`#`)):e];for(let e of s){let t=S(e,n,r,a);if(t!=null)return t;let i=C(e,n,r,o);if(i!=null)return i}return null}function S(e,t,n,r){for(let i of l(e)){if(!(i in r))continue;let e=r[i];if(e!==``&&e in n)return{info:n[e],exportName:d(n[e],t)}}return null}function C(e,t,n,r){if(!(e in r))return null;let i=r[e];return i===``||!(i in n)?null:{info:n[i],exportName:d(n[i],t)}}function w(t){return t.component!=null||t.loader==null?t.loadPromise:t.loadError==null?t.loadPromise?t.loadPromise:m(t):Promise.reject(e(t.loadError))}function T(e,r,i){let a=d(e,i),o=g({...e,component:r},a);if(o==null)return t(r)&&(`default`in r||`__esModule`in r)?r:n(r)?{default:r,[a!=null&&a!==``?a:`default`]:r,__esModule:!0}:r;let s=a!=null&&a!==``?a:`default`;return{...t(r)?r:{},default:o,[s]:o,__esModule:!0}}function E(t,n,i,a){let o=d(t,a),s=o!=null&&o!==``?o:`default`,l=a=>{if(t.loadError!=null)throw e(t.loadError);if(t.component!=null){let e=g(t,o);if(e==null)throw Error(`[rari] Lazy component "${n}" loaded but export "${s}" is missing`);if(!r(e))throw Error(`[rari] Lazy component "${n}" export "${s}" is not a component`);return c(e,a)}throw i};return l.displayName=`Lazy(${t.displayName??t.exportName??n})`,{default:l,[s]:l,__esModule:!0}}function D(e){let t=v(e);if(!t)return import.meta.env.DEV&&console.warn(`[rari] __rari_rsc_require__: component "${e}" not found in registry`),{};let{info:n,exportName:r}=t;if(n.component!=null)return T(n,n.component,r);if(n.loader){if(n.loadError!=null)return E(n,e,Promise.resolve(),r);let t=w(n);if(t)return E(n,e,t,r)}return{}}async function O(e){let t=v(e);return t?h(t.info,t.exportName):null}function k(){if(typeof window>`u`)return;let e=e=>{let t=o(),n=i(e);return e in t?t[e]:n in t?t[n]:Object.values(t).find(t=>t.path===e||t.path===n)};Reflect.set(globalThis,`__rari_get_script_filename__`,t=>{let n=e(t)?.path??i(t),r=i(n);if(r.startsWith(`http://`)||r.startsWith(`https://`))return r;let a=r.indexOf(`/src/`);return a===-1?r.startsWith(`src/`)?`/${r}`:r.startsWith(`/`)?r:`/${r}`:r.slice(a)}),Reflect.set(globalThis,`__rari_chunk_load__`,async t=>{let n=e(t);if(n&&n.component==null&&n.loader!=null){let e=w(n);if(e)return e.then(()=>void 0)}return n?.loadPromise==null?Promise.resolve():n.loadPromise.then(()=>void 0)})}export{k as n,D as r,O as t};
@@ -1,67 +0,0 @@
1
- import{a as e,i as t,n,o as r,r as i,t as a}from"./utils-YdvPzSET-Cbo6Ofmz.mjs";import{existsSync as o,readFileSync as s,writeFileSync as c}from"node:fs";import{join as l}from"node:path";import u from"node:process";import{styleText as d}from"node:util";function f(){let n=u.cwd();e(`Creating Railway deployment configuration...`),t(n,{providerName:`Railway`,deployScript:`echo "Push to GitHub and connect to Railway to deploy"`,startScript:`rari start`,dependency:i()}),p(n),a(n,`Railway`,`.railway`),m(n),h()}function p(e){n(e,`railway.toml`,`[build]
2
- builder = "RAILPACK"
3
-
4
- [deploy]
5
- startCommand = "npm start"
6
- healthcheckPath = "/_rari/health"
7
- healthcheckTimeout = 300
8
- restartPolicyType = "ON_FAILURE"
9
- restartPolicyMaxRetries = 3
10
- `)}function m(e){let t=l(e,`README.md`),n=`
11
- ## 🚂 Deploy to Railway
12
-
13
- This rari application is configured for Railway deployment.
14
-
15
- ### Quick Deploy
16
-
17
- 1. **Push to GitHub**:
18
- \`\`\`bash
19
- git add .
20
- git commit -m "Add Railway deployment"
21
- git push origin main
22
- \`\`\`
23
-
24
- 2. **Deploy to Railway**:
25
- - Go to [railway.app](https://railway.app)
26
- - Create new project → "Deploy from GitHub repo"
27
- - Select your repository
28
- - Click "Deploy Now"
29
-
30
- 3. **Generate Domain**:
31
- - In Railway dashboard → Settings → Networking
32
- - Click "Generate Domain"
33
- - Your app will be live! 🎉
34
-
35
- ### Local Development
36
-
37
- \`\`\`bash
38
- # Development server
39
- npm run start:local
40
-
41
- # Production simulation
42
- npm start
43
- \`\`\`
44
-
45
- ### Environment Variables
46
-
47
- Railway automatically provides:
48
- - \`PORT\` - Server port (Railway assigns this)
49
- - \`NODE_ENV=production\` - Production mode
50
-
51
- Optional variables you can set:
52
- - \`RUST_LOG=debug\` - Rust logging level
53
-
54
- ---
55
- `;if(o(t)){let e=s(t,`utf-8`);e.includes(`Deploy to Railway`)||(c(t,e+n),r(`Updated README.md with Railway deployment instructions`))}else c(t,`# My rari App
56
-
57
- A high-performance React Server Components application powered by rari.
58
- ${n}
59
- ## Getting Started
60
-
61
- \`\`\`bash
62
- npm install
63
- npm start
64
- \`\`\`
65
-
66
- Visit [http://localhost:3000](http://localhost:3000) to see your app.
67
- `),r(`Created README.md with Railway deployment instructions`)}function h(){console.warn(``),r(`Railway deployment setup complete! 🎉`),console.warn(``),e(`Next steps:`),console.warn(` 1. ${d(`cyan`,`git add .`)}`),console.warn(` 2. ${d(`cyan`,`git commit -m "Add Railway deployment"`)}`),console.warn(` 3. ${d(`cyan`,`git push origin main`)}`),console.warn(` 4. Go to ${d(`cyan`,`https://railway.app`)} and deploy from GitHub`),console.warn(``),e(`Your rari app will automatically:`),console.warn(` ✅ Detect Railway environment`),console.warn(` ✅ Bind to 0.0.0.0 (Railway requirement)`),console.warn(` ✅ Use Railway's PORT environment variable`),console.warn(` ✅ Run in production mode`),console.warn(` ✅ Download platform-specific rari binary`),console.warn(``),r(`Ready for deployment! 🚀`)}export{f as createRailwayDeployment};
@@ -1,73 +0,0 @@
1
- import{a as e,i as t,n,o as r,r as i,t as a}from"./utils-YdvPzSET-Cbo6Ofmz.mjs";import{existsSync as o,readFileSync as s,writeFileSync as c}from"node:fs";import{join as l}from"node:path";import u from"node:process";import{styleText as d}from"node:util";function f(){let n=u.cwd();e(`Creating Render deployment configuration...`),t(n,{providerName:`Render`,deployScript:`echo "Push to GitHub and connect to Render to deploy"`,startScript:`rari start`,dependency:i()}),p(n),a(n,`Render`,`.render`),m(n),h()}function p(e){n(e,`render.yaml`,`services:
2
- - type: web
3
- name: rari-app
4
- runtime: node
5
- env: node
6
- plan: free
7
- buildCommand: npm install
8
- startCommand: npm start
9
- healthCheckPath: /_rari/health
10
- envVars:
11
- - key: NODE_ENV
12
- value: production
13
- - key: RUST_LOG
14
- value: info
15
- `)}function m(e){let t=l(e,`README.md`),n=`
16
- ## 🎨 Deploy to Render
17
-
18
- This rari application is configured for Render deployment.
19
-
20
- ### Quick Deploy
21
-
22
- 1. **Push to GitHub**:
23
- \`\`\`bash
24
- git add .
25
- git commit -m "Add Render deployment"
26
- git push origin main
27
- \`\`\`
28
-
29
- 2. **Deploy to Render**:
30
- - Go to [render.com](https://render.com)
31
- - Create new "Web Service"
32
- - Connect your GitHub repository
33
- - Render will auto-detect Node.js and use the configuration from \`render.yaml\`
34
- - Click "Create Web Service"
35
-
36
- 3. **Your app will be live!** 🎉
37
- - Render provides a \`.onrender.com\` URL
38
- - Optional: Add custom domain in Render dashboard
39
-
40
- ### Local Development
41
-
42
- \`\`\`bash
43
- # Development server
44
- npm run start:local
45
-
46
- # Production simulation
47
- npm start
48
- \`\`\`
49
-
50
- ### Environment Variables
51
-
52
- Render automatically provides:
53
- - \`PORT\` - Server port (Render assigns this)
54
- - \`NODE_ENV=production\` - Production mode (from render.yaml)
55
- - \`RUST_LOG=info\` - Rust logging level (from render.yaml)
56
-
57
- Optional variables you can add in Render dashboard:
58
- - \`RUST_LOG=debug\` - Enhanced logging
59
-
60
- ---
61
- `;if(o(t)){let e=s(t,`utf-8`);e.includes(`Deploy to Render`)||(c(t,e+n),r(`Updated README.md with Render deployment instructions`))}else c(t,`# My rari App
62
-
63
- A high-performance React Server Components application powered by rari.
64
- ${n}
65
- ## Getting Started
66
-
67
- \`\`\`bash
68
- npm install
69
- npm start
70
- \`\`\`
71
-
72
- Visit [http://localhost:3000](http://localhost:3000) to see your app.
73
- `),r(`Created README.md with Render deployment instructions`)}function h(){console.warn(``),r(`Render deployment setup complete! 🎉`),console.warn(``),e(`Next steps:`),console.warn(` 1. ${d(`cyan`,`git add .`)}`),console.warn(` 2. ${d(`cyan`,`git commit -m "Add Render deployment"`)}`),console.warn(` 3. ${d(`cyan`,`git push origin main`)}`),console.warn(` 4. Go to ${d(`cyan`,`https://render.com`)} and create a Web Service`),console.warn(``),e(`Your rari app will automatically:`),console.warn(` ✅ Detect Render environment`),console.warn(` ✅ Bind to 0.0.0.0 (Render requirement)`),console.warn(` ✅ Use Render's PORT environment variable`),console.warn(` ✅ Run in production mode`),console.warn(` ✅ Download platform-specific rari binary`),console.warn(``),r(`Ready for deployment! 🚀`)}export{f as createRenderDeployment};