vinext 0.0.18 → 0.0.20

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 (68) hide show
  1. package/README.md +138 -10
  2. package/dist/check.d.ts.map +1 -1
  3. package/dist/check.js +2 -1
  4. package/dist/check.js.map +1 -1
  5. package/dist/cli.js +4 -4
  6. package/dist/cli.js.map +1 -1
  7. package/dist/config/next-config.d.ts +6 -0
  8. package/dist/config/next-config.d.ts.map +1 -1
  9. package/dist/config/next-config.js.map +1 -1
  10. package/dist/deploy.d.ts.map +1 -1
  11. package/dist/deploy.js +15 -1
  12. package/dist/deploy.js.map +1 -1
  13. package/dist/index.d.ts.map +1 -1
  14. package/dist/index.js +109 -6
  15. package/dist/index.js.map +1 -1
  16. package/dist/init.d.ts +9 -1
  17. package/dist/init.d.ts.map +1 -1
  18. package/dist/init.js +31 -2
  19. package/dist/init.js.map +1 -1
  20. package/dist/server/app-dev-server.d.ts.map +1 -1
  21. package/dist/server/app-dev-server.js +34 -10
  22. package/dist/server/app-dev-server.js.map +1 -1
  23. package/dist/server/dev-server.d.ts.map +1 -1
  24. package/dist/server/dev-server.js +31 -5
  25. package/dist/server/dev-server.js.map +1 -1
  26. package/dist/server/image-optimization.d.ts +17 -3
  27. package/dist/server/image-optimization.d.ts.map +1 -1
  28. package/dist/server/image-optimization.js +31 -13
  29. package/dist/server/image-optimization.js.map +1 -1
  30. package/dist/server/prod-server.d.ts.map +1 -1
  31. package/dist/server/prod-server.js +25 -8
  32. package/dist/server/prod-server.js.map +1 -1
  33. package/dist/shims/compat-router.d.ts +12 -0
  34. package/dist/shims/compat-router.d.ts.map +1 -0
  35. package/dist/shims/compat-router.js +23 -0
  36. package/dist/shims/compat-router.js.map +1 -0
  37. package/dist/shims/font-google.generated.d.ts.map +1 -1
  38. package/dist/shims/font-google.generated.js +1923 -1923
  39. package/dist/shims/font-google.generated.js.map +1 -1
  40. package/dist/shims/image.d.ts.map +1 -1
  41. package/dist/shims/image.js +16 -3
  42. package/dist/shims/image.js.map +1 -1
  43. package/dist/shims/link.d.ts.map +1 -1
  44. package/dist/shims/link.js +15 -13
  45. package/dist/shims/link.js.map +1 -1
  46. package/dist/shims/metadata.d.ts.map +1 -1
  47. package/dist/shims/metadata.js +15 -4
  48. package/dist/shims/metadata.js.map +1 -1
  49. package/dist/shims/navigation.d.ts +1 -0
  50. package/dist/shims/navigation.d.ts.map +1 -1
  51. package/dist/shims/navigation.js +16 -0
  52. package/dist/shims/navigation.js.map +1 -1
  53. package/dist/shims/router.d.ts +18 -0
  54. package/dist/shims/router.d.ts.map +1 -1
  55. package/dist/shims/router.js +63 -30
  56. package/dist/shims/router.js.map +1 -1
  57. package/dist/shims/script.d.ts.map +1 -1
  58. package/dist/shims/script.js +18 -18
  59. package/dist/shims/script.js.map +1 -1
  60. package/dist/shims/server.d.ts +11 -2
  61. package/dist/shims/server.d.ts.map +1 -1
  62. package/dist/shims/server.js +11 -2
  63. package/dist/shims/server.js.map +1 -1
  64. package/dist/utils/project.d.ts +12 -6
  65. package/dist/utils/project.d.ts.map +1 -1
  66. package/dist/utils/project.js +56 -21
  67. package/dist/utils/project.js.map +1 -1
  68. package/package.json +1 -1
package/README.md CHANGED
@@ -72,7 +72,7 @@ Options: `-p / --port <port>`, `-H / --hostname <host>`, `--turbopack` (accepted
72
72
 
73
73
  Run `npm create next-app@latest` to create a new Next.js project, and then follow these instructions to migrate it to vinext.
74
74
 
75
- In the future, we will havre a proper `npm create vinext` new project workflow.
75
+ In the future, we will have a proper `npm create vinext` new project workflow.
76
76
 
77
77
  ### Migrating an existing Next.js project
78
78
 
@@ -106,7 +106,7 @@ Vite has become the default build tool for modern web frameworks — fast HMR, a
106
106
 
107
107
  vinext is an experiment: can we reimplement the Next.js API surface on Vite, so that existing Next.js applications can run on a completely different toolchain? The answer, so far, is mostly yes — about 94% of the API surface works.
108
108
 
109
- The current deployment target is Cloudflare Workers zero cold starts, global by default, integrated platform (KV, R2, D1, AI). The `vinext deploy` command handles the full build-and-deploy pipeline. Expanding to other deployment targets is something we'd like to explore.
109
+ vinext works everywhere. It natively supports Cloudflare Workers (with `vinext deploy`, bindings, KV caching), and can be deployed to Vercel, Netlify, AWS, Deno Deploy, and more via the [Nitro](https://v3.nitro.build/) Vite plugin. Native support for additional platforms is [planned](https://github.com/cloudflare/vinext/issues/80).
110
110
 
111
111
  **Alternatives worth knowing about:**
112
112
  - **[OpenNext](https://opennext.js.org/)** — adapts `next build` output for AWS, Cloudflare, and other platforms. OpenNext has been around much longer than vinext, is more mature, and covers more of the Next.js API surface because it builds on top of Next.js's own output rather than reimplementing it. If you want the safer, more proven option, start there.
@@ -114,7 +114,7 @@ The current deployment target is Cloudflare Workers — zero cold starts, global
114
114
 
115
115
  ### Design principles
116
116
 
117
- - **Start with Cloudflare, expand later.** Workers is the current deployment target. Every feature is built and tested for Workers. We're interested in supporting other platforms and welcome contributions.
117
+ - **Deploy anywhere.** Natively supports Cloudflare Workers, with other platforms available via Nitro. Native adapters for more platforms are [planned](https://github.com/cloudflare/vinext/issues/80).
118
118
  - **Pragmatic compatibility, not bug-for-bug parity.** Targets 95%+ of real-world Next.js apps. Edge cases that depend on undocumented Vercel behavior are intentionally not supported.
119
119
  - **Latest Next.js only.** Targets Next.js 16.x. No support for deprecated APIs from older versions.
120
120
  - **Incremental adoption.** Drop in the plugin, fix what breaks, deploy.
@@ -122,7 +122,7 @@ The current deployment target is Cloudflare Workers — zero cold starts, global
122
122
  ## FAQ
123
123
 
124
124
  **What is this?**
125
- vinext is a Vite plugin that reimplements the public Next.js API — routing, server rendering, `next/*` module imports, the CLI — so you can run Next.js applications on Vite instead of the Next.js compiler toolchain. Cloudflare Workers is the current deployment target.
125
+ vinext is a Vite plugin that reimplements the public Next.js API — routing, server rendering, `next/*` module imports, the CLI — so you can run Next.js applications on Vite instead of the Next.js compiler toolchain. It can be deployed anywhere: Cloudflare Workers is the first natively supported target, with other platforms available via Nitro. Native adapters for more platforms are [planned](https://github.com/cloudflare/vinext/issues/80).
126
126
 
127
127
  **Is this a fork of Next.js?**
128
128
  No. vinext is an alternative implementation of the Next.js API surface built on Vite. It does import some Next.js types and utilities, but the core is written from scratch. The goal is not to create a competing framework or add features beyond what Next.js offers — it's an experiment in how far AI-driven development and Vite's toolchain can go in replicating an existing, well-defined API surface.
@@ -152,14 +152,18 @@ Both. File-system routing, SSR, client hydration, and deployment to Cloudflare W
152
152
  Next.js 16.x. No support for deprecated APIs from older versions.
153
153
 
154
154
  **Can I deploy to AWS/Netlify/other platforms?**
155
- Currently only Cloudflare Workers is supported and tested. We're interested in exploring other deployment targets in the future and welcome contributions in that direction.
155
+ Yes. Add the [Nitro](https://v3.nitro.build/) Vite plugin alongside vinext, and you can deploy to Vercel, Netlify, AWS Amplify, Deno Deploy, Azure, and [many more](https://v3.nitro.build/deploy). See [Other platforms (via Nitro)](#other-platforms-via-nitro) for setup. For Cloudflare Workers, the native integration (`vinext deploy`) gives you the smoothest experience. Native adapters for more platforms are [planned](https://github.com/cloudflare/vinext/issues/80).
156
156
 
157
157
  **What happens when Next.js releases a new feature?**
158
158
  We track the public Next.js API surface and add support for new stable features. Experimental or unstable Next.js features are lower priority. The plan is to add commit-level tracking of the Next.js repo so we can stay current as new versions are released.
159
159
 
160
- ## Deploying to Cloudflare Workers
160
+ ## Deployment
161
161
 
162
- `vinext deploy` is the simplest path. It auto-generates the necessary configuration files (`vite.config.ts`, `wrangler.jsonc`, `worker/index.ts`) if they don't exist, builds the application, and deploys to Workers.
162
+ ### Cloudflare Workers
163
+
164
+ vinext has native integration with Cloudflare Workers through `@cloudflare/vite-plugin`, including bindings access via `cloudflare:workers`, KV caching, image optimization, and the `vinext deploy` one-command workflow.
165
+
166
+ `vinext deploy` auto-generates the necessary configuration files (`vite.config.ts`, `wrangler.jsonc`, `worker/index.ts`) if they don't exist, builds the application, and deploys to Workers.
163
167
 
164
168
  ```bash
165
169
  vinext deploy
@@ -175,9 +179,40 @@ The deploy command also auto-detects and fixes common migration issues:
175
179
  - Renames CJS config files (postcss.config.js, etc.) to `.cjs` when needed
176
180
  - Detects native Node.js modules (sharp, resvg, satori, lightningcss, @napi-rs/canvas) and auto-stubs them for Workers. If you encounter others that need stubbing, PRs are welcome.
177
181
 
178
- Both App Router and Pages Router work on Workers with full client-side hydration — interactive components, client-side navigation, and React state all work.
182
+ Both App Router and Pages Router work on Workers with full client-side hydration.
183
+
184
+ #### Cloudflare Bindings (D1, R2, KV, AI, etc.)
185
+
186
+ Use `import { env } from "cloudflare:workers"` to access bindings in any server component, route handler, or server action. No custom worker entry or special configuration required.
187
+
188
+ ```tsx
189
+ import { env } from "cloudflare:workers";
190
+
191
+ export default async function Page() {
192
+ const result = await env.DB.prepare("SELECT * FROM posts").all();
193
+ return <div>{JSON.stringify(result)}</div>;
194
+ }
195
+ ```
196
+
197
+ This works because `@cloudflare/vite-plugin` runs the RSC environment in workerd, where `cloudflare:workers` is a native module. In production builds, the import is externalized so workerd resolves it at runtime. All binding types are supported: D1, R2, KV, Durable Objects, AI, Queues, Vectorize, Browser Rendering, etc.
198
+
199
+ Define your bindings in `wrangler.jsonc` as usual:
179
200
 
180
- ### Traffic-aware Pre-Rendering (experimental)
201
+ ```jsonc
202
+ {
203
+ "name": "my-app",
204
+ "compatibility_date": "2026-02-12",
205
+ "compatibility_flags": ["nodejs_compat"],
206
+ "d1_databases": [{ "binding": "DB", "database_name": "my-db", "database_id": "..." }],
207
+ "kv_namespaces": [{ "binding": "CACHE", "id": "..." }]
208
+ }
209
+ ```
210
+
211
+ For TypeScript types, generate them with `wrangler types` and the `env` import will be fully typed.
212
+
213
+ > **Note:** You do not need `getPlatformProxy()`, a custom worker entry with `fetch(request, env)`, or any other workaround. `cloudflare:workers` is the recommended way to access bindings in vinext.
214
+
215
+ #### Traffic-aware Pre-Rendering (experimental)
181
216
 
182
217
  TPR queries Cloudflare zone analytics at deploy time to find which pages actually get traffic, pre-renders only those, and uploads them to KV cache. The result is SSG-level latency for popular pages without pre-rendering your entire site.
183
218
 
@@ -199,7 +234,7 @@ import { setCacheHandler } from "next/cache";
199
234
  setCacheHandler(new KVCacheHandler(env.MY_KV_NAMESPACE));
200
235
  ```
201
236
 
202
- ### Custom Vite configuration
237
+ #### Custom Vite configuration
203
238
 
204
239
  If you need to customize the Vite config, create a `vite.config.ts`. vinext will merge its config with yours. This is required for Cloudflare Workers deployment with the App Router (RSC needs explicit plugin configuration):
205
240
 
@@ -228,6 +263,98 @@ export default defineConfig({
228
263
 
229
264
  See the [examples](#live-examples) for complete working configurations.
230
265
 
266
+ ### Other platforms (via Nitro)
267
+
268
+ For deploying to platforms other than Cloudflare, vinext works with [Nitro](https://v3.nitro.build/) as a Vite plugin. Add `nitro` alongside `vinext` in your Vite config and deploy to any [Nitro-supported platform](https://v3.nitro.build/deploy).
269
+
270
+ ```ts
271
+ import { defineConfig } from "vite";
272
+ import vinext from "vinext";
273
+ import { nitro } from "nitro/vite";
274
+
275
+ export default defineConfig({
276
+ plugins: [vinext(), nitro()],
277
+ });
278
+ ```
279
+
280
+ ```bash
281
+ npm install nitro
282
+ ```
283
+
284
+ Nitro auto-detects the deployment platform in most CI/CD environments (Vercel, Netlify, AWS Amplify, Azure, and others), so you typically don't need to set a preset. For local builds, set the `NITRO_PRESET` environment variable:
285
+
286
+ ```bash
287
+ NITRO_PRESET=vercel npx vite build
288
+ NITRO_PRESET=netlify npx vite build
289
+ NITRO_PRESET=deno_deploy npx vite build
290
+ ```
291
+
292
+ > **Deploying to Cloudflare?** You can use Nitro, but the native integration (`vinext deploy` / `@cloudflare/vite-plugin`) is recommended. It provides the best developer experience with `cloudflare:workers` bindings, KV caching, image optimization, and one-command deploys.
293
+
294
+ <details>
295
+ <summary>Vercel</summary>
296
+
297
+ Nitro auto-detects Vercel in CI. For local builds:
298
+
299
+ ```bash
300
+ NITRO_PRESET=vercel npx vite build
301
+ ```
302
+
303
+ Deploy with the [Vercel CLI](https://vercel.com/docs/cli) or connect your Git repo in the Vercel dashboard. Set the build command to `vite build` and the output directory to `.output`.
304
+
305
+ </details>
306
+
307
+ <details>
308
+ <summary>Netlify</summary>
309
+
310
+ Nitro auto-detects Netlify in CI. For local builds:
311
+
312
+ ```bash
313
+ NITRO_PRESET=netlify npx vite build
314
+ ```
315
+
316
+ Deploy with the [Netlify CLI](https://docs.netlify.com/cli/get-started/) or connect your Git repo. Set the build command to `vite build`.
317
+
318
+ </details>
319
+
320
+ <details>
321
+ <summary>AWS (Amplify)</summary>
322
+
323
+ Nitro auto-detects AWS Amplify in CI. For local builds:
324
+
325
+ ```bash
326
+ NITRO_PRESET=aws_amplify npx vite build
327
+ ```
328
+
329
+ Connect your Git repo in the AWS Amplify console. Set the build command to `vite build`.
330
+
331
+ </details>
332
+
333
+ <details>
334
+ <summary>Deno Deploy</summary>
335
+
336
+ ```bash
337
+ NITRO_PRESET=deno_deploy npx vite build
338
+ cd .output
339
+ deployctl deploy --project=my-project server/index.ts
340
+ ```
341
+
342
+ </details>
343
+
344
+ <details>
345
+ <summary>Node.js server</summary>
346
+
347
+ ```bash
348
+ NITRO_PRESET=node npx vite build
349
+ node .output/server/index.mjs
350
+ ```
351
+
352
+ This produces a standalone Node.js server. Suitable for Docker, VMs, or any environment that can run Node.
353
+
354
+ </details>
355
+
356
+ See the [Nitro deployment docs](https://v3.nitro.build/deploy) for the full list of supported platforms and provider-specific configuration.
357
+
231
358
  ## Live examples
232
359
 
233
360
  These are deployed to Cloudflare Workers and updated on every push to `main`:
@@ -241,6 +368,7 @@ These are deployed to Cloudflare Workers and updated on every push to `main`:
241
368
  | Pages Router (minimal) | Minimal Pages Router on Workers | [pages-router-cloudflare.vinext.workers.dev](https://pages-router-cloudflare.vinext.workers.dev) |
242
369
  | RealWorld API | REST API routes example | [realworld-api-rest.vinext.workers.dev](https://realworld-api-rest.vinext.workers.dev) |
243
370
  | Benchmarks Dashboard | Build performance tracking over time (D1-backed) | [benchmarks.vinext.workers.dev](https://benchmarks.vinext.workers.dev) |
371
+ | App Router + Nitro | App Router deployed via Nitro (multi-platform) | [examples/app-router-nitro](examples/app-router-nitro) |
244
372
 
245
373
  ## API coverage
246
374
 
@@ -1 +1 @@
1
- {"version":3,"file":"check.d.ts","sourceRoot":"","sources":["../src/check.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAOH,KAAK,MAAM,GAAG,WAAW,GAAG,SAAS,GAAG,aAAa,CAAC;AAEtD,UAAU,SAAS;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;CAClB;AAED,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,SAAS,EAAE,CAAC;IACrB,MAAM,EAAE,SAAS,EAAE,CAAC;IACpB,SAAS,EAAE,SAAS,EAAE,CAAC;IACvB,WAAW,EAAE,SAAS,EAAE,CAAC;IACzB,OAAO,EAAE;QACP,SAAS,EAAE,MAAM,CAAC;QAClB,OAAO,EAAE,MAAM,CAAC;QAChB,WAAW,EAAE,MAAM,CAAC;QACpB,KAAK,EAAE,MAAM,CAAC;QACd,KAAK,EAAE,MAAM,CAAC;KACf,CAAC;CACH;AAoGD;;GAEG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,EAAE,CAyDrD;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,EAAE,CA4DvD;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,EAAE,CAyBxD;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,EAAE,CAkI1D;AAED;;GAEG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,CAqBlD;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,WAAW,EAAE,IAAI,CAAC,EAA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,OAAO,CAAA;CAAE,GAAG,MAAM,CAgG7F"}
package/dist/check.js CHANGED
@@ -4,6 +4,7 @@
4
4
  * Scans an existing Next.js app and produces a compatibility report
5
5
  * showing what will work, what needs changes, and an overall score.
6
6
  */
7
+ import { detectPackageManager } from "./utils/project.js";
7
8
  import fs from "node:fs";
8
9
  import path from "node:path";
9
10
  // ── Import support map ─────────────────────────────────────────────────────
@@ -475,7 +476,7 @@ export function formatReport(result, opts) {
475
476
  lines.push("");
476
477
  lines.push(" Or manually:");
477
478
  lines.push(` 1. Add \x1b[36m"type": "module"\x1b[0m to package.json`);
478
- lines.push(` 2. Install: \x1b[36mnpm install -D vinext vite @vitejs/plugin-rsc\x1b[0m`);
479
+ lines.push(` 2. Install: \x1b[36m${detectPackageManager(process.cwd())} vinext vite @vitejs/plugin-rsc\x1b[0m`);
479
480
  lines.push(` 3. Create vite.config.ts (see docs)`);
480
481
  lines.push(` 4. Run: \x1b[36mnpx vite dev\x1b[0m`);
481
482
  }
package/dist/check.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"check.js","sourceRoot":"","sources":["../src/check.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AA2B7B,8EAA8E;AAE9E,MAAM,cAAc,GAAwD;IAC1E,MAAM,EAAE,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,8CAA8C,EAAE;IACvF,WAAW,EAAE,EAAE,MAAM,EAAE,WAAW,EAAE;IACpC,YAAY,EAAE,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,+CAA+C,EAAE;IAC9F,aAAa,EAAE,EAAE,MAAM,EAAE,WAAW,EAAE;IACtC,iBAAiB,EAAE,EAAE,MAAM,EAAE,WAAW,EAAE;IAC1C,cAAc,EAAE,EAAE,MAAM,EAAE,WAAW,EAAE;IACvC,aAAa,EAAE,EAAE,MAAM,EAAE,WAAW,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uDAAuD,CAAC,CAAC;QACpE,MAAM,QAAQ,GAAG,CAAC,GAAG,MAAM,CAAC,OAAO,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,MAAM,CAAC,SAAS,EAAE,GAAG,MAAM,CAAC,WAAW,CAAC,CAAC;QACnG,KAAK,MAAM,IAAI,IAAI,QAAQ,EAAE,CAAC;YAC5B,IAAI,IAAI,CAAC,MAAM,KAAK,SAAS,EAAE,CAAC;gBAC9B,KAAK,CAAC,IAAI,CAAC,yBAAyB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;YAC5F,CAAC;QACH,CAAC;IACH,CAAC;IAED,iFAAiF;IACjF,IAAI,CAAC,IAAI,EAAE,cAAc,EAAE,CAAC;QAC1B,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACf,KAAK,CAAC,IAAI,CAAC,yCAAyC,CAAC,CAAC;QACtD,KAAK,CAAC,IAAI,CAAC,yEAAyE,CAAC,CAAC;QACtF,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACf,KAAK,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;QAC7B,KAAK,CAAC,IAAI,CAAC,4DAA4D,CAAC,CAAC;QACzE,KAAK,CAAC,IAAI,CAAC,8EAA8E,CAAC,CAAC;QAC3F,KAAK,CAAC,IAAI,CAAC,yCAAyC,CAAC,CAAC;QACtD,KAAK,CAAC,IAAI,CAAC,yCAAyC,CAAC,CAAC;IACxD,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACf,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC","sourcesContent":["/**\n * vinext check — compatibility scanner for Next.js apps\n *\n * Scans an existing Next.js app and produces a compatibility report\n * showing what will work, what needs changes, and an overall score.\n */\n\nimport fs from \"node:fs\";\nimport path from \"node:path\";\n\n// ── Support status definitions ─────────────────────────────────────────────\n\ntype Status = \"supported\" | \"partial\" | \"unsupported\";\n\ninterface CheckItem {\n name: string;\n status: Status;\n detail?: string;\n files?: string[];\n}\n\nexport interface CheckResult {\n imports: CheckItem[];\n config: CheckItem[];\n libraries: CheckItem[];\n conventions: CheckItem[];\n summary: {\n supported: number;\n partial: number;\n unsupported: number;\n total: number;\n score: number;\n };\n}\n\n// ── Import support map ─────────────────────────────────────────────────────\n\nconst IMPORT_SUPPORT: Record<string, { status: Status; detail?: string }> = {\n \"next\": { status: \"supported\", detail: \"type-only exports (Metadata, NextPage, etc.)\" },\n \"next/link\": { status: \"supported\" },\n \"next/image\": { status: \"supported\", detail: \"uses @unpic/react (no local optimization yet)\" },\n \"next/router\": { status: \"supported\" },\n \"next/navigation\": { status: \"supported\" },\n \"next/headers\": { status: \"supported\" },\n \"next/server\": { status: \"supported\", detail: \"NextRequest/NextResponse shimmed\" },\n \"next/cache\": { status: \"supported\", detail: \"revalidateTag, revalidatePath, unstable_cache, cacheLife, cacheTag\" },\n \"next/dynamic\": { status: \"supported\" },\n \"next/head\": { status: \"supported\" },\n \"next/script\": { status: \"supported\" },\n \"next/font/google\": { status: \"partial\", detail: \"fonts loaded from CDN, not self-hosted at build time\" },\n \"next/font/local\": { status: \"partial\", detail: \"font.className works but font.variable mode broken (CSS variable not set) — fonts fall back to system sans-serif\" },\n \"next/og\": { status: \"supported\", detail: \"ImageResponse via @vercel/og\" },\n \"next/config\": { status: \"supported\" },\n \"next/amp\": { status: \"unsupported\", detail: \"AMP is not supported\" },\n \"next/document\": { status: \"supported\", detail: \"custom _document.tsx\" },\n \"next/app\": { status: \"supported\", detail: \"custom _app.tsx\" },\n \"next/error\": { status: \"supported\" },\n \"next/third-parties/google\": { status: \"unsupported\", detail: \"third-party script optimization not implemented\" },\n \"server-only\": { status: \"supported\" },\n \"client-only\": { status: \"supported\" },\n};\n\n// ── Config support map ─────────────────────────────────────────────────────\n\nconst CONFIG_SUPPORT: Record<string, { status: Status; detail?: string }> = {\n basePath: { status: \"supported\" },\n trailingSlash: { status: \"supported\" },\n redirects: { status: \"supported\" },\n rewrites: { status: \"supported\" },\n headers: { status: \"supported\" },\n i18n: { status: \"supported\", detail: \"path-prefix routing (domains not yet supported)\" },\n env: { status: \"supported\" },\n images: { status: \"partial\", detail: \"remotePatterns validated, no local optimization\" },\n output: { status: \"supported\", detail: \"'export' and 'standalone' modes\" },\n transpilePackages: { status: \"supported\", detail: \"Vite handles this natively\" },\n webpack: { status: \"unsupported\", detail: \"Vite replaces webpack — custom webpack configs need migration\" },\n \"experimental.ppr\": { status: \"unsupported\", detail: \"partial prerendering not yet implemented\" },\n \"experimental.typedRoutes\": { status: \"unsupported\", detail: \"typed routes not implemented\" },\n \"experimental.serverActions\": { status: \"supported\", detail: \"server actions via 'use server' directive\" },\n \"i18n.domains\": { status: \"unsupported\", detail: \"domain-based i18n routing not implemented\" },\n reactStrictMode: { status: \"supported\", detail: \"always enabled\" },\n poweredByHeader: { status: \"supported\", detail: \"not sent (matching Next.js default when disabled)\" },\n};\n\n// ── Library support map ────────────────────────────────────────────────────\n\nconst LIBRARY_SUPPORT: Record<string, { status: Status; detail?: string }> = {\n \"next-themes\": { status: \"supported\" },\n nuqs: { status: \"supported\" },\n \"next-view-transitions\": { status: \"supported\" },\n \"@vercel/analytics\": { status: \"supported\", detail: \"analytics script injected client-side\" },\n \"next-intl\": { status: \"partial\", detail: \"works with middleware-based setup, some server component features may differ\" },\n \"@clerk/nextjs\": { status: \"unsupported\", detail: \"deep Next.js middleware integration not compatible\" },\n \"@auth/nextjs\": { status: \"unsupported\", detail: \"relies on Next.js internal auth handlers; consider migrating to better-auth\" },\n \"next-auth\": { status: \"unsupported\", detail: \"relies on Next.js API route internals; consider migrating to better-auth (see https://authjs.dev/getting-started/migrate-to-better-auth)\" },\n \"better-auth\": { status: \"supported\", detail: \"uses only public next/* APIs (headers, cookies, NextRequest/NextResponse)\" },\n \"@sentry/nextjs\": { status: \"partial\", detail: \"client-side works, server integration needs manual setup\" },\n \"@t3-oss/env-nextjs\": { status: \"supported\" },\n \"tailwindcss\": { status: \"supported\" },\n \"styled-components\": { status: \"partial\", detail: \"needs useServerInsertedHTML (not yet implemented)\" },\n \"@emotion/react\": { status: \"partial\", detail: \"needs useServerInsertedHTML (not yet implemented)\" },\n \"lucide-react\": { status: \"supported\" },\n \"framer-motion\": { status: \"supported\" },\n \"@radix-ui/react-dialog\": { status: \"supported\" },\n \"shadcn-ui\": { status: \"supported\" },\n zod: { status: \"supported\" },\n \"react-hook-form\": { status: \"supported\" },\n prisma: { status: \"supported\", detail: \"works on Cloudflare Workers with Prisma Accelerate\" },\n drizzle: { status: \"supported\", detail: \"works with D1 on Cloudflare Workers\" },\n};\n\n// ── Scanning functions ─────────────────────────────────────────────────────\n\n/**\n * Recursively find all source files in a directory.\n */\nfunction findSourceFiles(dir: string, extensions = [\".ts\", \".tsx\", \".js\", \".jsx\", \".mjs\"]): string[] {\n const results: string[] = [];\n if (!fs.existsSync(dir)) return results;\n\n const entries = fs.readdirSync(dir, { withFileTypes: true });\n for (const entry of entries) {\n const fullPath = path.join(dir, entry.name);\n if (entry.isDirectory()) {\n if (entry.name === \"node_modules\" || entry.name === \".next\" || entry.name === \"dist\" || entry.name === \".git\") continue;\n results.push(...findSourceFiles(fullPath, extensions));\n } else if (extensions.some(ext => entry.name.endsWith(ext))) {\n results.push(fullPath);\n }\n }\n return results;\n}\n\n/**\n * Scan source files for `import ... from 'next/...'` statements.\n */\nexport function scanImports(root: string): CheckItem[] {\n const files = findSourceFiles(root);\n const importUsage = new Map<string, string[]>();\n\n const importRegex = /(?:import\\s+(?:[\\w{},\\s*]+\\s+from\\s+)?|require\\s*\\()['\"]([^'\"]+)['\"]\\)?/g;\n // Skip `import type` and `import { type ... }` — they're erased at compile time\n const typeOnlyImportRegex = /import\\s+type\\s+/;\n\n for (const file of files) {\n const content = fs.readFileSync(file, \"utf-8\");\n let match;\n while ((match = importRegex.exec(content)) !== null) {\n const mod = match[1];\n // Skip type-only imports (no runtime effect)\n const lineStart = content.lastIndexOf(\"\\n\", match.index) + 1;\n const line = content.slice(lineStart, match.index + match[0].length);\n if (typeOnlyImportRegex.test(line)) continue;\n // Only track next/* imports and server-only/client-only\n if (mod.startsWith(\"next/\") || mod === \"next\" || mod === \"server-only\" || mod === \"client-only\") {\n // Normalize: next/font/google -> next/font/google\n const normalized = mod === \"next\" ? \"next\" : mod;\n if (!importUsage.has(normalized)) importUsage.set(normalized, []);\n const relFile = path.relative(root, file);\n if (!importUsage.get(normalized)!.includes(relFile)) {\n importUsage.get(normalized)!.push(relFile);\n }\n }\n }\n }\n\n const items: CheckItem[] = [];\n for (const [mod, usedFiles] of importUsage) {\n const support = IMPORT_SUPPORT[mod];\n if (support) {\n items.push({\n name: mod,\n status: support.status,\n detail: support.detail,\n files: usedFiles,\n });\n } else {\n items.push({\n name: mod,\n status: \"unsupported\",\n detail: \"not recognized by vinext\",\n files: usedFiles,\n });\n }\n }\n\n // Sort: unsupported first, then partial, then supported\n items.sort((a, b) => {\n const order: Record<Status, number> = { unsupported: 0, partial: 1, supported: 2 };\n return order[a.status] - order[b.status];\n });\n\n return items;\n}\n\n/**\n * Analyze next.config.js/mjs/ts for supported and unsupported options.\n */\nexport function analyzeConfig(root: string): CheckItem[] {\n const configFiles = [\"next.config.ts\", \"next.config.mjs\", \"next.config.js\", \"next.config.cjs\"];\n let configPath: string | null = null;\n for (const f of configFiles) {\n const p = path.join(root, f);\n if (fs.existsSync(p)) { configPath = p; break; }\n }\n\n if (!configPath) {\n return [{ name: \"next.config\", status: \"supported\", detail: \"no config file found (defaults are fine)\" }];\n }\n\n const content = fs.readFileSync(configPath, \"utf-8\");\n const items: CheckItem[] = [];\n\n // Check for known config options by searching for property names in the config file\n const configOptions = [\n \"basePath\", \"trailingSlash\", \"redirects\", \"rewrites\", \"headers\",\n \"i18n\", \"env\", \"images\", \"output\", \"transpilePackages\", \"webpack\",\n \"reactStrictMode\", \"poweredByHeader\",\n ];\n\n for (const opt of configOptions) {\n // Simple heuristic: check if the option name appears as a property in the config\n const regex = new RegExp(`\\\\b${opt}\\\\b`);\n if (regex.test(content)) {\n const support = CONFIG_SUPPORT[opt];\n if (support) {\n items.push({ name: opt, status: support.status, detail: support.detail });\n } else {\n items.push({ name: opt, status: \"unsupported\", detail: \"not recognized\" });\n }\n }\n }\n\n // Check for experimental options\n if (/experimental\\s*[:=]\\s*\\{/.test(content)) {\n if (/\\bppr\\b/.test(content)) {\n items.push({ name: \"experimental.ppr\", ...CONFIG_SUPPORT[\"experimental.ppr\"]! });\n }\n if (/\\btypedRoutes\\b/.test(content)) {\n items.push({ name: \"experimental.typedRoutes\", ...CONFIG_SUPPORT[\"experimental.typedRoutes\"]! });\n }\n if (/\\bserverActions\\b/.test(content)) {\n items.push({ name: \"experimental.serverActions\", ...CONFIG_SUPPORT[\"experimental.serverActions\"]! });\n }\n }\n\n // Check for i18n.domains\n if (/domains\\s*:/.test(content) && /i18n/.test(content)) {\n items.push({ name: \"i18n.domains\", ...CONFIG_SUPPORT[\"i18n.domains\"]! });\n }\n\n // Sort: unsupported first\n items.sort((a, b) => {\n const order: Record<Status, number> = { unsupported: 0, partial: 1, supported: 2 };\n return order[a.status] - order[b.status];\n });\n\n return items;\n}\n\n/**\n * Check package.json dependencies for known libraries.\n */\nexport function checkLibraries(root: string): CheckItem[] {\n const pkgPath = path.join(root, \"package.json\");\n if (!fs.existsSync(pkgPath)) return [];\n\n const pkg = JSON.parse(fs.readFileSync(pkgPath, \"utf-8\"));\n const allDeps = { ...pkg.dependencies, ...pkg.devDependencies };\n const items: CheckItem[] = [];\n\n for (const [lib, support] of Object.entries(LIBRARY_SUPPORT)) {\n if (allDeps[lib]) {\n items.push({\n name: lib,\n status: support.status,\n detail: support.detail,\n });\n }\n }\n\n // Sort: unsupported first\n items.sort((a, b) => {\n const order: Record<Status, number> = { unsupported: 0, partial: 1, supported: 2 };\n return order[a.status] - order[b.status];\n });\n\n return items;\n}\n\n/**\n * Check file conventions (pages, app directory, middleware, etc.)\n */\nexport function checkConventions(root: string): CheckItem[] {\n const items: CheckItem[] = [];\n\n // Check for pages/ and app/ at root level, then fall back to src/\n const pagesDir = fs.existsSync(path.join(root, \"pages\"))\n ? path.join(root, \"pages\")\n : fs.existsSync(path.join(root, \"src\", \"pages\"))\n ? path.join(root, \"src\", \"pages\")\n : null;\n const appDirPath = fs.existsSync(path.join(root, \"app\"))\n ? path.join(root, \"app\")\n : fs.existsSync(path.join(root, \"src\", \"app\"))\n ? path.join(root, \"src\", \"app\")\n : null;\n\n const hasPages = pagesDir !== null;\n const hasApp = appDirPath !== null;\n const hasProxy = fs.existsSync(path.join(root, \"proxy.ts\")) || fs.existsSync(path.join(root, \"proxy.js\"));\n const hasMiddleware = fs.existsSync(path.join(root, \"middleware.ts\")) || fs.existsSync(path.join(root, \"middleware.js\"));\n\n if (hasPages) {\n const isSrc = pagesDir!.includes(path.join(\"src\", \"pages\"));\n items.push({ name: isSrc ? \"Pages Router (src/pages/)\" : \"Pages Router (pages/)\", status: \"supported\" });\n\n // Count pages\n const pageFiles = findSourceFiles(pagesDir!);\n const pages = pageFiles.filter(f => !f.includes(\"/api/\") && !f.includes(\"_app\") && !f.includes(\"_document\") && !f.includes(\"_error\"));\n const apiRoutes = pageFiles.filter(f => f.includes(\"/api/\"));\n items.push({ name: `${pages.length} page(s)`, status: \"supported\" });\n if (apiRoutes.length) {\n items.push({ name: `${apiRoutes.length} API route(s)`, status: \"supported\" });\n }\n\n // Check for _app, _document\n if (pageFiles.some(f => f.includes(\"_app\"))) {\n items.push({ name: \"Custom _app\", status: \"supported\" });\n }\n if (pageFiles.some(f => f.includes(\"_document\"))) {\n items.push({ name: \"Custom _document\", status: \"supported\" });\n }\n }\n\n if (hasApp) {\n const isSrc = appDirPath!.includes(path.join(\"src\", \"app\"));\n items.push({ name: isSrc ? \"App Router (src/app/)\" : \"App Router (app/)\", status: \"supported\" });\n\n const appFiles = findSourceFiles(appDirPath!);\n const pages = appFiles.filter(f => f.endsWith(\"page.tsx\") || f.endsWith(\"page.jsx\") || f.endsWith(\"page.ts\") || f.endsWith(\"page.js\"));\n const layouts = appFiles.filter(f => f.endsWith(\"layout.tsx\") || f.endsWith(\"layout.jsx\") || f.endsWith(\"layout.ts\") || f.endsWith(\"layout.js\"));\n const routes = appFiles.filter(f => f.endsWith(\"route.tsx\") || f.endsWith(\"route.ts\") || f.endsWith(\"route.js\"));\n const loadings = appFiles.filter(f => f.endsWith(\"loading.tsx\") || f.endsWith(\"loading.jsx\"));\n const errors = appFiles.filter(f => f.endsWith(\"error.tsx\") || f.endsWith(\"error.jsx\"));\n const notFounds = appFiles.filter(f => f.endsWith(\"not-found.tsx\") || f.endsWith(\"not-found.jsx\"));\n\n items.push({ name: `${pages.length} page(s)`, status: \"supported\" });\n if (layouts.length) items.push({ name: `${layouts.length} layout(s)`, status: \"supported\" });\n if (routes.length) items.push({ name: `${routes.length} route handler(s)`, status: \"supported\" });\n if (loadings.length) items.push({ name: `${loadings.length} loading boundary(ies)`, status: \"supported\" });\n if (errors.length) items.push({ name: `${errors.length} error boundary(ies)`, status: \"supported\" });\n if (notFounds.length) items.push({ name: `${notFounds.length} not-found page(s)`, status: \"supported\" });\n }\n\n if (hasProxy) {\n items.push({ name: \"proxy.ts (Next.js 16)\", status: \"supported\" });\n } else if (hasMiddleware) {\n items.push({ name: \"middleware.ts (deprecated in Next.js 16)\", status: \"supported\" });\n }\n\n if (!hasPages && !hasApp) {\n items.push({ name: \"No pages/ or app/ directory found\", status: \"unsupported\", detail: \"vinext requires a pages/ or app/ directory\" });\n }\n\n // Check for \"type\": \"module\" in package.json\n const pkgPath = path.join(root, \"package.json\");\n if (fs.existsSync(pkgPath)) {\n const pkg = JSON.parse(fs.readFileSync(pkgPath, \"utf-8\"));\n if (pkg.type !== \"module\") {\n items.push({\n name: 'Missing \"type\": \"module\" in package.json',\n status: \"unsupported\",\n detail: \"required for Vite — vinext init will add it automatically\",\n });\n }\n }\n\n // Scan for ViewTransition import from react\n const allSourceFiles = findSourceFiles(root);\n const viewTransitionRegex = /import\\s+\\{[^}]*\\bViewTransition\\b[^}]*\\}\\s+from\\s+['\"]react['\"]/;\n const viewTransitionFiles: string[] = [];\n for (const file of allSourceFiles) {\n const content = fs.readFileSync(file, \"utf-8\");\n if (viewTransitionRegex.test(content)) {\n viewTransitionFiles.push(path.relative(root, file));\n }\n }\n if (viewTransitionFiles.length > 0) {\n items.push({\n name: \"ViewTransition (React canary API)\",\n status: \"partial\",\n detail: \"vinext auto-shims with a passthrough fallback, view transitions won't animate\",\n files: viewTransitionFiles,\n });\n }\n\n // Check PostCSS config for string-form plugins\n const postcssConfigs = [\"postcss.config.mjs\", \"postcss.config.js\", \"postcss.config.cjs\"];\n for (const configFile of postcssConfigs) {\n const configPath = path.join(root, configFile);\n if (fs.existsSync(configPath)) {\n const content = fs.readFileSync(configPath, \"utf-8\");\n // Detect string-form plugins: plugins: [\"...\"] or plugins: ['...']\n const stringPluginRegex = /plugins\\s*:\\s*\\[[\\s\\S]*?(['\"][^'\"]+['\"])[\\s\\S]*?\\]/;\n const match = stringPluginRegex.exec(content);\n if (match) {\n // Check it's not require() or import() form — just bare string literals in the array\n const pluginsBlock = match[0];\n // If plugins array contains string literals not wrapped in require()\n if (/plugins\\s*:\\s*\\[[\\s\\n]*['\"]/.test(pluginsBlock)) {\n items.push({\n name: `PostCSS string-form plugins (${configFile})`,\n status: \"partial\",\n detail: \"string-form PostCSS plugins need resolution — vinext handles this automatically\",\n });\n }\n }\n break; // Only check the first config file found\n }\n }\n\n return items;\n}\n\n/**\n * Run the full compatibility check.\n */\nexport function runCheck(root: string): CheckResult {\n const imports = scanImports(root);\n const config = analyzeConfig(root);\n const libraries = checkLibraries(root);\n const conventions = checkConventions(root);\n\n const allItems = [...imports, ...config, ...libraries, ...conventions];\n const supported = allItems.filter(i => i.status === \"supported\").length;\n const partial = allItems.filter(i => i.status === \"partial\").length;\n const unsupported = allItems.filter(i => i.status === \"unsupported\").length;\n const total = allItems.length;\n // Score: supported = 1, partial = 0.5, unsupported = 0\n const score = total > 0 ? Math.round(((supported + partial * 0.5) / total) * 100) : 100;\n\n return {\n imports,\n config,\n libraries,\n conventions,\n summary: { supported, partial, unsupported, total, score },\n };\n}\n\n/**\n * Format the check result as a colored terminal report.\n */\nexport function formatReport(result: CheckResult, opts?: { calledFromInit?: boolean }): string {\n const lines: string[] = [];\n const statusIcon = (s: Status) => s === \"supported\" ? \"\\x1b[32m✓\\x1b[0m\" : s === \"partial\" ? \"\\x1b[33m~\\x1b[0m\" : \"\\x1b[31m✗\\x1b[0m\";\n\n lines.push(\"\");\n lines.push(\" \\x1b[1mvinext compatibility report\\x1b[0m\");\n lines.push(\" \" + \"=\".repeat(40));\n lines.push(\"\");\n\n // Imports\n if (result.imports.length > 0) {\n const importSupported = result.imports.filter(i => i.status === \"supported\").length;\n lines.push(` \\x1b[1mImports\\x1b[0m: ${importSupported}/${result.imports.length} fully supported`);\n for (const item of result.imports) {\n const suffix = item.detail ? ` \\x1b[90m— ${item.detail}\\x1b[0m` : \"\";\n const fileCount = item.files ? ` \\x1b[90m(${item.files.length} file${item.files.length === 1 ? \"\" : \"s\"})\\x1b[0m` : \"\";\n lines.push(` ${statusIcon(item.status)} ${item.name}${fileCount}${suffix}`);\n }\n lines.push(\"\");\n }\n\n // Config\n if (result.config.length > 0) {\n const configSupported = result.config.filter(i => i.status === \"supported\").length;\n lines.push(` \\x1b[1mConfig\\x1b[0m: ${configSupported}/${result.config.length} options supported`);\n for (const item of result.config) {\n const suffix = item.detail ? ` \\x1b[90m— ${item.detail}\\x1b[0m` : \"\";\n lines.push(` ${statusIcon(item.status)} ${item.name}${suffix}`);\n }\n lines.push(\"\");\n }\n\n // Libraries\n if (result.libraries.length > 0) {\n const libSupported = result.libraries.filter(i => i.status === \"supported\").length;\n lines.push(` \\x1b[1mLibraries\\x1b[0m: ${libSupported}/${result.libraries.length} compatible`);\n for (const item of result.libraries) {\n const suffix = item.detail ? ` \\x1b[90m— ${item.detail}\\x1b[0m` : \"\";\n lines.push(` ${statusIcon(item.status)} ${item.name}${suffix}`);\n }\n lines.push(\"\");\n }\n\n // Conventions\n if (result.conventions.length > 0) {\n lines.push(` \\x1b[1mProject structure\\x1b[0m:`);\n for (const item of result.conventions) {\n const suffix = item.detail ? ` \\x1b[90m— ${item.detail}\\x1b[0m` : \"\";\n lines.push(` ${statusIcon(item.status)} ${item.name}${suffix}`);\n }\n lines.push(\"\");\n }\n\n // Summary\n const { score, supported, partial, unsupported } = result.summary;\n const scoreColor = score >= 90 ? \"\\x1b[32m\" : score >= 70 ? \"\\x1b[33m\" : \"\\x1b[31m\";\n lines.push(\" \" + \"-\".repeat(40));\n lines.push(` \\x1b[1mOverall\\x1b[0m: ${scoreColor}${score}% compatible\\x1b[0m (${supported} supported, ${partial} partial, ${unsupported} issues)`);\n\n if (unsupported > 0) {\n lines.push(\"\");\n lines.push(\" \\x1b[1mIssues to address:\\x1b[0m\");\n const allItems = [...result.imports, ...result.config, ...result.libraries, ...result.conventions];\n for (const item of allItems) {\n if (item.status === \"unsupported\") {\n lines.push(` \\x1b[31m✗\\x1b[0m ${item.name}${item.detail ? ` — ${item.detail}` : \"\"}`);\n }\n }\n }\n\n if (result.summary.partial > 0) {\n lines.push(\"\");\n lines.push(\" \\x1b[1mPartial support (may need attention):\\x1b[0m\");\n const allItems = [...result.imports, ...result.config, ...result.libraries, ...result.conventions];\n for (const item of allItems) {\n if (item.status === \"partial\") {\n lines.push(` \\x1b[33m~\\x1b[0m ${item.name}${item.detail ? ` — ${item.detail}` : \"\"}`);\n }\n }\n }\n\n // Actionable next steps (skip when called from init — it prints its own summary)\n if (!opts?.calledFromInit) {\n lines.push(\"\");\n lines.push(\" \\x1b[1mRecommended next steps:\\x1b[0m\");\n lines.push(` Run \\x1b[36mvinext init\\x1b[0m to set up your project automatically`);\n lines.push(\"\");\n lines.push(\" Or manually:\");\n lines.push(` 1. Add \\x1b[36m\"type\": \"module\"\\x1b[0m to package.json`);\n lines.push(` 2. Install: \\x1b[36mnpm install -D vinext vite @vitejs/plugin-rsc\\x1b[0m`);\n lines.push(` 3. Create vite.config.ts (see docs)`);\n lines.push(` 4. Run: \\x1b[36mnpx vite dev\\x1b[0m`);\n }\n\n lines.push(\"\");\n return lines.join(\"\\n\");\n}\n"]}
1
+ {"version":3,"file":"check.js","sourceRoot":"","sources":["../src/check.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AA2B7B,8EAA8E;AAE9E,MAAM,cAAc,GAAwD;IAC1E,MAAM,EAAE,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,8CAA8C,EAAE;IACvF,WAAW,EAAE,EAAE,MAAM,EAAE,WAAW,EAAE;IACpC,YAAY,EAAE,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,+CAA+C,EAAE;IAC9F,aAAa,EAAE,EAAE,MAAM,EAAE,WAAW,EAAE;IACtC,iBAAiB,EAAE,EAAE,MAAM,EAAE,WAAW,EAAE;IAC1C,cAAc,EAAE,EAAE,MAAM,EAAE,WAAW,EAAE;IACvC,aAAa,EAAE,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,kCAAkC,EAAE;IAClF,YAAY,EAAE,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,oEAAoE,EAAE;IACnH,cAAc,EAAE,EAAE,MAAM,EAAE,WAAW,EAAE;IACvC,WAAW,EAAE,EAAE,MAAM,EAAE,WAAW,EAAE;IACpC,aAAa,EAAE,EAAE,MAAM,EAAE,WAAW,EAAE;IACtC,kBAAkB,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,sDAAsD,EAAE;IACzG,iBAAi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,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;YAC5F,CAAC;QACH,CAAC;IACH,CAAC;IAED,iFAAiF;IACjF,IAAI,CAAC,IAAI,EAAE,cAAc,EAAE,CAAC;QAC1B,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACf,KAAK,CAAC,IAAI,CAAC,yCAAyC,CAAC,CAAC;QACtD,KAAK,CAAC,IAAI,CAAC,yEAAyE,CAAC,CAAC;QACtF,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACf,KAAK,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;QAC7B,KAAK,CAAC,IAAI,CAAC,4DAA4D,CAAC,CAAC;QACzE,KAAK,CAAC,IAAI,CAAC,2BAA2B,oBAAoB,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,wCAAwC,CAAC,CAAC;QACnH,KAAK,CAAC,IAAI,CAAC,yCAAyC,CAAC,CAAC;QACtD,KAAK,CAAC,IAAI,CAAC,yCAAyC,CAAC,CAAC;IACxD,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACf,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC","sourcesContent":["/**\n * vinext check — compatibility scanner for Next.js apps\n *\n * Scans an existing Next.js app and produces a compatibility report\n * showing what will work, what needs changes, and an overall score.\n */\n\nimport { detectPackageManager } from \"./utils/project.js\";\nimport fs from \"node:fs\";\nimport path from \"node:path\";\n\n// ── Support status definitions ─────────────────────────────────────────────\n\ntype Status = \"supported\" | \"partial\" | \"unsupported\";\n\ninterface CheckItem {\n name: string;\n status: Status;\n detail?: string;\n files?: string[];\n}\n\nexport interface CheckResult {\n imports: CheckItem[];\n config: CheckItem[];\n libraries: CheckItem[];\n conventions: CheckItem[];\n summary: {\n supported: number;\n partial: number;\n unsupported: number;\n total: number;\n score: number;\n };\n}\n\n// ── Import support map ─────────────────────────────────────────────────────\n\nconst IMPORT_SUPPORT: Record<string, { status: Status; detail?: string }> = {\n \"next\": { status: \"supported\", detail: \"type-only exports (Metadata, NextPage, etc.)\" },\n \"next/link\": { status: \"supported\" },\n \"next/image\": { status: \"supported\", detail: \"uses @unpic/react (no local optimization yet)\" },\n \"next/router\": { status: \"supported\" },\n \"next/navigation\": { status: \"supported\" },\n \"next/headers\": { status: \"supported\" },\n \"next/server\": { status: \"supported\", detail: \"NextRequest/NextResponse shimmed\" },\n \"next/cache\": { status: \"supported\", detail: \"revalidateTag, revalidatePath, unstable_cache, cacheLife, cacheTag\" },\n \"next/dynamic\": { status: \"supported\" },\n \"next/head\": { status: \"supported\" },\n \"next/script\": { status: \"supported\" },\n \"next/font/google\": { status: \"partial\", detail: \"fonts loaded from CDN, not self-hosted at build time\" },\n \"next/font/local\": { status: \"partial\", detail: \"font.className works but font.variable mode broken (CSS variable not set) — fonts fall back to system sans-serif\" },\n \"next/og\": { status: \"supported\", detail: \"ImageResponse via @vercel/og\" },\n \"next/config\": { status: \"supported\" },\n \"next/amp\": { status: \"unsupported\", detail: \"AMP is not supported\" },\n \"next/document\": { status: \"supported\", detail: \"custom _document.tsx\" },\n \"next/app\": { status: \"supported\", detail: \"custom _app.tsx\" },\n \"next/error\": { status: \"supported\" },\n \"next/third-parties/google\": { status: \"unsupported\", detail: \"third-party script optimization not implemented\" },\n \"server-only\": { status: \"supported\" },\n \"client-only\": { status: \"supported\" },\n};\n\n// ── Config support map ─────────────────────────────────────────────────────\n\nconst CONFIG_SUPPORT: Record<string, { status: Status; detail?: string }> = {\n basePath: { status: \"supported\" },\n trailingSlash: { status: \"supported\" },\n redirects: { status: \"supported\" },\n rewrites: { status: \"supported\" },\n headers: { status: \"supported\" },\n i18n: { status: \"supported\", detail: \"path-prefix routing (domains not yet supported)\" },\n env: { status: \"supported\" },\n images: { status: \"partial\", detail: \"remotePatterns validated, no local optimization\" },\n output: { status: \"supported\", detail: \"'export' and 'standalone' modes\" },\n transpilePackages: { status: \"supported\", detail: \"Vite handles this natively\" },\n webpack: { status: \"unsupported\", detail: \"Vite replaces webpack — custom webpack configs need migration\" },\n \"experimental.ppr\": { status: \"unsupported\", detail: \"partial prerendering not yet implemented\" },\n \"experimental.typedRoutes\": { status: \"unsupported\", detail: \"typed routes not implemented\" },\n \"experimental.serverActions\": { status: \"supported\", detail: \"server actions via 'use server' directive\" },\n \"i18n.domains\": { status: \"unsupported\", detail: \"domain-based i18n routing not implemented\" },\n reactStrictMode: { status: \"supported\", detail: \"always enabled\" },\n poweredByHeader: { status: \"supported\", detail: \"not sent (matching Next.js default when disabled)\" },\n};\n\n// ── Library support map ────────────────────────────────────────────────────\n\nconst LIBRARY_SUPPORT: Record<string, { status: Status; detail?: string }> = {\n \"next-themes\": { status: \"supported\" },\n nuqs: { status: \"supported\" },\n \"next-view-transitions\": { status: \"supported\" },\n \"@vercel/analytics\": { status: \"supported\", detail: \"analytics script injected client-side\" },\n \"next-intl\": { status: \"partial\", detail: \"works with middleware-based setup, some server component features may differ\" },\n \"@clerk/nextjs\": { status: \"unsupported\", detail: \"deep Next.js middleware integration not compatible\" },\n \"@auth/nextjs\": { status: \"unsupported\", detail: \"relies on Next.js internal auth handlers; consider migrating to better-auth\" },\n \"next-auth\": { status: \"unsupported\", detail: \"relies on Next.js API route internals; consider migrating to better-auth (see https://authjs.dev/getting-started/migrate-to-better-auth)\" },\n \"better-auth\": { status: \"supported\", detail: \"uses only public next/* APIs (headers, cookies, NextRequest/NextResponse)\" },\n \"@sentry/nextjs\": { status: \"partial\", detail: \"client-side works, server integration needs manual setup\" },\n \"@t3-oss/env-nextjs\": { status: \"supported\" },\n \"tailwindcss\": { status: \"supported\" },\n \"styled-components\": { status: \"partial\", detail: \"needs useServerInsertedHTML (not yet implemented)\" },\n \"@emotion/react\": { status: \"partial\", detail: \"needs useServerInsertedHTML (not yet implemented)\" },\n \"lucide-react\": { status: \"supported\" },\n \"framer-motion\": { status: \"supported\" },\n \"@radix-ui/react-dialog\": { status: \"supported\" },\n \"shadcn-ui\": { status: \"supported\" },\n zod: { status: \"supported\" },\n \"react-hook-form\": { status: \"supported\" },\n prisma: { status: \"supported\", detail: \"works on Cloudflare Workers with Prisma Accelerate\" },\n drizzle: { status: \"supported\", detail: \"works with D1 on Cloudflare Workers\" },\n};\n\n// ── Scanning functions ─────────────────────────────────────────────────────\n\n/**\n * Recursively find all source files in a directory.\n */\nfunction findSourceFiles(dir: string, extensions = [\".ts\", \".tsx\", \".js\", \".jsx\", \".mjs\"]): string[] {\n const results: string[] = [];\n if (!fs.existsSync(dir)) return results;\n\n const entries = fs.readdirSync(dir, { withFileTypes: true });\n for (const entry of entries) {\n const fullPath = path.join(dir, entry.name);\n if (entry.isDirectory()) {\n if (entry.name === \"node_modules\" || entry.name === \".next\" || entry.name === \"dist\" || entry.name === \".git\") continue;\n results.push(...findSourceFiles(fullPath, extensions));\n } else if (extensions.some(ext => entry.name.endsWith(ext))) {\n results.push(fullPath);\n }\n }\n return results;\n}\n\n/**\n * Scan source files for `import ... from 'next/...'` statements.\n */\nexport function scanImports(root: string): CheckItem[] {\n const files = findSourceFiles(root);\n const importUsage = new Map<string, string[]>();\n\n const importRegex = /(?:import\\s+(?:[\\w{},\\s*]+\\s+from\\s+)?|require\\s*\\()['\"]([^'\"]+)['\"]\\)?/g;\n // Skip `import type` and `import { type ... }` — they're erased at compile time\n const typeOnlyImportRegex = /import\\s+type\\s+/;\n\n for (const file of files) {\n const content = fs.readFileSync(file, \"utf-8\");\n let match;\n while ((match = importRegex.exec(content)) !== null) {\n const mod = match[1];\n // Skip type-only imports (no runtime effect)\n const lineStart = content.lastIndexOf(\"\\n\", match.index) + 1;\n const line = content.slice(lineStart, match.index + match[0].length);\n if (typeOnlyImportRegex.test(line)) continue;\n // Only track next/* imports and server-only/client-only\n if (mod.startsWith(\"next/\") || mod === \"next\" || mod === \"server-only\" || mod === \"client-only\") {\n // Normalize: next/font/google -> next/font/google\n const normalized = mod === \"next\" ? \"next\" : mod;\n if (!importUsage.has(normalized)) importUsage.set(normalized, []);\n const relFile = path.relative(root, file);\n if (!importUsage.get(normalized)!.includes(relFile)) {\n importUsage.get(normalized)!.push(relFile);\n }\n }\n }\n }\n\n const items: CheckItem[] = [];\n for (const [mod, usedFiles] of importUsage) {\n const support = IMPORT_SUPPORT[mod];\n if (support) {\n items.push({\n name: mod,\n status: support.status,\n detail: support.detail,\n files: usedFiles,\n });\n } else {\n items.push({\n name: mod,\n status: \"unsupported\",\n detail: \"not recognized by vinext\",\n files: usedFiles,\n });\n }\n }\n\n // Sort: unsupported first, then partial, then supported\n items.sort((a, b) => {\n const order: Record<Status, number> = { unsupported: 0, partial: 1, supported: 2 };\n return order[a.status] - order[b.status];\n });\n\n return items;\n}\n\n/**\n * Analyze next.config.js/mjs/ts for supported and unsupported options.\n */\nexport function analyzeConfig(root: string): CheckItem[] {\n const configFiles = [\"next.config.ts\", \"next.config.mjs\", \"next.config.js\", \"next.config.cjs\"];\n let configPath: string | null = null;\n for (const f of configFiles) {\n const p = path.join(root, f);\n if (fs.existsSync(p)) { configPath = p; break; }\n }\n\n if (!configPath) {\n return [{ name: \"next.config\", status: \"supported\", detail: \"no config file found (defaults are fine)\" }];\n }\n\n const content = fs.readFileSync(configPath, \"utf-8\");\n const items: CheckItem[] = [];\n\n // Check for known config options by searching for property names in the config file\n const configOptions = [\n \"basePath\", \"trailingSlash\", \"redirects\", \"rewrites\", \"headers\",\n \"i18n\", \"env\", \"images\", \"output\", \"transpilePackages\", \"webpack\",\n \"reactStrictMode\", \"poweredByHeader\",\n ];\n\n for (const opt of configOptions) {\n // Simple heuristic: check if the option name appears as a property in the config\n const regex = new RegExp(`\\\\b${opt}\\\\b`);\n if (regex.test(content)) {\n const support = CONFIG_SUPPORT[opt];\n if (support) {\n items.push({ name: opt, status: support.status, detail: support.detail });\n } else {\n items.push({ name: opt, status: \"unsupported\", detail: \"not recognized\" });\n }\n }\n }\n\n // Check for experimental options\n if (/experimental\\s*[:=]\\s*\\{/.test(content)) {\n if (/\\bppr\\b/.test(content)) {\n items.push({ name: \"experimental.ppr\", ...CONFIG_SUPPORT[\"experimental.ppr\"]! });\n }\n if (/\\btypedRoutes\\b/.test(content)) {\n items.push({ name: \"experimental.typedRoutes\", ...CONFIG_SUPPORT[\"experimental.typedRoutes\"]! });\n }\n if (/\\bserverActions\\b/.test(content)) {\n items.push({ name: \"experimental.serverActions\", ...CONFIG_SUPPORT[\"experimental.serverActions\"]! });\n }\n }\n\n // Check for i18n.domains\n if (/domains\\s*:/.test(content) && /i18n/.test(content)) {\n items.push({ name: \"i18n.domains\", ...CONFIG_SUPPORT[\"i18n.domains\"]! });\n }\n\n // Sort: unsupported first\n items.sort((a, b) => {\n const order: Record<Status, number> = { unsupported: 0, partial: 1, supported: 2 };\n return order[a.status] - order[b.status];\n });\n\n return items;\n}\n\n/**\n * Check package.json dependencies for known libraries.\n */\nexport function checkLibraries(root: string): CheckItem[] {\n const pkgPath = path.join(root, \"package.json\");\n if (!fs.existsSync(pkgPath)) return [];\n\n const pkg = JSON.parse(fs.readFileSync(pkgPath, \"utf-8\"));\n const allDeps = { ...pkg.dependencies, ...pkg.devDependencies };\n const items: CheckItem[] = [];\n\n for (const [lib, support] of Object.entries(LIBRARY_SUPPORT)) {\n if (allDeps[lib]) {\n items.push({\n name: lib,\n status: support.status,\n detail: support.detail,\n });\n }\n }\n\n // Sort: unsupported first\n items.sort((a, b) => {\n const order: Record<Status, number> = { unsupported: 0, partial: 1, supported: 2 };\n return order[a.status] - order[b.status];\n });\n\n return items;\n}\n\n/**\n * Check file conventions (pages, app directory, middleware, etc.)\n */\nexport function checkConventions(root: string): CheckItem[] {\n const items: CheckItem[] = [];\n\n // Check for pages/ and app/ at root level, then fall back to src/\n const pagesDir = fs.existsSync(path.join(root, \"pages\"))\n ? path.join(root, \"pages\")\n : fs.existsSync(path.join(root, \"src\", \"pages\"))\n ? path.join(root, \"src\", \"pages\")\n : null;\n const appDirPath = fs.existsSync(path.join(root, \"app\"))\n ? path.join(root, \"app\")\n : fs.existsSync(path.join(root, \"src\", \"app\"))\n ? path.join(root, \"src\", \"app\")\n : null;\n\n const hasPages = pagesDir !== null;\n const hasApp = appDirPath !== null;\n const hasProxy = fs.existsSync(path.join(root, \"proxy.ts\")) || fs.existsSync(path.join(root, \"proxy.js\"));\n const hasMiddleware = fs.existsSync(path.join(root, \"middleware.ts\")) || fs.existsSync(path.join(root, \"middleware.js\"));\n\n if (hasPages) {\n const isSrc = pagesDir!.includes(path.join(\"src\", \"pages\"));\n items.push({ name: isSrc ? \"Pages Router (src/pages/)\" : \"Pages Router (pages/)\", status: \"supported\" });\n\n // Count pages\n const pageFiles = findSourceFiles(pagesDir!);\n const pages = pageFiles.filter(f => !f.includes(\"/api/\") && !f.includes(\"_app\") && !f.includes(\"_document\") && !f.includes(\"_error\"));\n const apiRoutes = pageFiles.filter(f => f.includes(\"/api/\"));\n items.push({ name: `${pages.length} page(s)`, status: \"supported\" });\n if (apiRoutes.length) {\n items.push({ name: `${apiRoutes.length} API route(s)`, status: \"supported\" });\n }\n\n // Check for _app, _document\n if (pageFiles.some(f => f.includes(\"_app\"))) {\n items.push({ name: \"Custom _app\", status: \"supported\" });\n }\n if (pageFiles.some(f => f.includes(\"_document\"))) {\n items.push({ name: \"Custom _document\", status: \"supported\" });\n }\n }\n\n if (hasApp) {\n const isSrc = appDirPath!.includes(path.join(\"src\", \"app\"));\n items.push({ name: isSrc ? \"App Router (src/app/)\" : \"App Router (app/)\", status: \"supported\" });\n\n const appFiles = findSourceFiles(appDirPath!);\n const pages = appFiles.filter(f => f.endsWith(\"page.tsx\") || f.endsWith(\"page.jsx\") || f.endsWith(\"page.ts\") || f.endsWith(\"page.js\"));\n const layouts = appFiles.filter(f => f.endsWith(\"layout.tsx\") || f.endsWith(\"layout.jsx\") || f.endsWith(\"layout.ts\") || f.endsWith(\"layout.js\"));\n const routes = appFiles.filter(f => f.endsWith(\"route.tsx\") || f.endsWith(\"route.ts\") || f.endsWith(\"route.js\"));\n const loadings = appFiles.filter(f => f.endsWith(\"loading.tsx\") || f.endsWith(\"loading.jsx\"));\n const errors = appFiles.filter(f => f.endsWith(\"error.tsx\") || f.endsWith(\"error.jsx\"));\n const notFounds = appFiles.filter(f => f.endsWith(\"not-found.tsx\") || f.endsWith(\"not-found.jsx\"));\n\n items.push({ name: `${pages.length} page(s)`, status: \"supported\" });\n if (layouts.length) items.push({ name: `${layouts.length} layout(s)`, status: \"supported\" });\n if (routes.length) items.push({ name: `${routes.length} route handler(s)`, status: \"supported\" });\n if (loadings.length) items.push({ name: `${loadings.length} loading boundary(ies)`, status: \"supported\" });\n if (errors.length) items.push({ name: `${errors.length} error boundary(ies)`, status: \"supported\" });\n if (notFounds.length) items.push({ name: `${notFounds.length} not-found page(s)`, status: \"supported\" });\n }\n\n if (hasProxy) {\n items.push({ name: \"proxy.ts (Next.js 16)\", status: \"supported\" });\n } else if (hasMiddleware) {\n items.push({ name: \"middleware.ts (deprecated in Next.js 16)\", status: \"supported\" });\n }\n\n if (!hasPages && !hasApp) {\n items.push({ name: \"No pages/ or app/ directory found\", status: \"unsupported\", detail: \"vinext requires a pages/ or app/ directory\" });\n }\n\n // Check for \"type\": \"module\" in package.json\n const pkgPath = path.join(root, \"package.json\");\n if (fs.existsSync(pkgPath)) {\n const pkg = JSON.parse(fs.readFileSync(pkgPath, \"utf-8\"));\n if (pkg.type !== \"module\") {\n items.push({\n name: 'Missing \"type\": \"module\" in package.json',\n status: \"unsupported\",\n detail: \"required for Vite — vinext init will add it automatically\",\n });\n }\n }\n\n // Scan for ViewTransition import from react\n const allSourceFiles = findSourceFiles(root);\n const viewTransitionRegex = /import\\s+\\{[^}]*\\bViewTransition\\b[^}]*\\}\\s+from\\s+['\"]react['\"]/;\n const viewTransitionFiles: string[] = [];\n for (const file of allSourceFiles) {\n const content = fs.readFileSync(file, \"utf-8\");\n if (viewTransitionRegex.test(content)) {\n viewTransitionFiles.push(path.relative(root, file));\n }\n }\n if (viewTransitionFiles.length > 0) {\n items.push({\n name: \"ViewTransition (React canary API)\",\n status: \"partial\",\n detail: \"vinext auto-shims with a passthrough fallback, view transitions won't animate\",\n files: viewTransitionFiles,\n });\n }\n\n // Check PostCSS config for string-form plugins\n const postcssConfigs = [\"postcss.config.mjs\", \"postcss.config.js\", \"postcss.config.cjs\"];\n for (const configFile of postcssConfigs) {\n const configPath = path.join(root, configFile);\n if (fs.existsSync(configPath)) {\n const content = fs.readFileSync(configPath, \"utf-8\");\n // Detect string-form plugins: plugins: [\"...\"] or plugins: ['...']\n const stringPluginRegex = /plugins\\s*:\\s*\\[[\\s\\S]*?(['\"][^'\"]+['\"])[\\s\\S]*?\\]/;\n const match = stringPluginRegex.exec(content);\n if (match) {\n // Check it's not require() or import() form — just bare string literals in the array\n const pluginsBlock = match[0];\n // If plugins array contains string literals not wrapped in require()\n if (/plugins\\s*:\\s*\\[[\\s\\n]*['\"]/.test(pluginsBlock)) {\n items.push({\n name: `PostCSS string-form plugins (${configFile})`,\n status: \"partial\",\n detail: \"string-form PostCSS plugins need resolution — vinext handles this automatically\",\n });\n }\n }\n break; // Only check the first config file found\n }\n }\n\n return items;\n}\n\n/**\n * Run the full compatibility check.\n */\nexport function runCheck(root: string): CheckResult {\n const imports = scanImports(root);\n const config = analyzeConfig(root);\n const libraries = checkLibraries(root);\n const conventions = checkConventions(root);\n\n const allItems = [...imports, ...config, ...libraries, ...conventions];\n const supported = allItems.filter(i => i.status === \"supported\").length;\n const partial = allItems.filter(i => i.status === \"partial\").length;\n const unsupported = allItems.filter(i => i.status === \"unsupported\").length;\n const total = allItems.length;\n // Score: supported = 1, partial = 0.5, unsupported = 0\n const score = total > 0 ? Math.round(((supported + partial * 0.5) / total) * 100) : 100;\n\n return {\n imports,\n config,\n libraries,\n conventions,\n summary: { supported, partial, unsupported, total, score },\n };\n}\n\n/**\n * Format the check result as a colored terminal report.\n */\nexport function formatReport(result: CheckResult, opts?: { calledFromInit?: boolean }): string {\n const lines: string[] = [];\n const statusIcon = (s: Status) => s === \"supported\" ? \"\\x1b[32m✓\\x1b[0m\" : s === \"partial\" ? \"\\x1b[33m~\\x1b[0m\" : \"\\x1b[31m✗\\x1b[0m\";\n\n lines.push(\"\");\n lines.push(\" \\x1b[1mvinext compatibility report\\x1b[0m\");\n lines.push(\" \" + \"=\".repeat(40));\n lines.push(\"\");\n\n // Imports\n if (result.imports.length > 0) {\n const importSupported = result.imports.filter(i => i.status === \"supported\").length;\n lines.push(` \\x1b[1mImports\\x1b[0m: ${importSupported}/${result.imports.length} fully supported`);\n for (const item of result.imports) {\n const suffix = item.detail ? ` \\x1b[90m— ${item.detail}\\x1b[0m` : \"\";\n const fileCount = item.files ? ` \\x1b[90m(${item.files.length} file${item.files.length === 1 ? \"\" : \"s\"})\\x1b[0m` : \"\";\n lines.push(` ${statusIcon(item.status)} ${item.name}${fileCount}${suffix}`);\n }\n lines.push(\"\");\n }\n\n // Config\n if (result.config.length > 0) {\n const configSupported = result.config.filter(i => i.status === \"supported\").length;\n lines.push(` \\x1b[1mConfig\\x1b[0m: ${configSupported}/${result.config.length} options supported`);\n for (const item of result.config) {\n const suffix = item.detail ? ` \\x1b[90m— ${item.detail}\\x1b[0m` : \"\";\n lines.push(` ${statusIcon(item.status)} ${item.name}${suffix}`);\n }\n lines.push(\"\");\n }\n\n // Libraries\n if (result.libraries.length > 0) {\n const libSupported = result.libraries.filter(i => i.status === \"supported\").length;\n lines.push(` \\x1b[1mLibraries\\x1b[0m: ${libSupported}/${result.libraries.length} compatible`);\n for (const item of result.libraries) {\n const suffix = item.detail ? ` \\x1b[90m— ${item.detail}\\x1b[0m` : \"\";\n lines.push(` ${statusIcon(item.status)} ${item.name}${suffix}`);\n }\n lines.push(\"\");\n }\n\n // Conventions\n if (result.conventions.length > 0) {\n lines.push(` \\x1b[1mProject structure\\x1b[0m:`);\n for (const item of result.conventions) {\n const suffix = item.detail ? ` \\x1b[90m— ${item.detail}\\x1b[0m` : \"\";\n lines.push(` ${statusIcon(item.status)} ${item.name}${suffix}`);\n }\n lines.push(\"\");\n }\n\n // Summary\n const { score, supported, partial, unsupported } = result.summary;\n const scoreColor = score >= 90 ? \"\\x1b[32m\" : score >= 70 ? \"\\x1b[33m\" : \"\\x1b[31m\";\n lines.push(\" \" + \"-\".repeat(40));\n lines.push(` \\x1b[1mOverall\\x1b[0m: ${scoreColor}${score}% compatible\\x1b[0m (${supported} supported, ${partial} partial, ${unsupported} issues)`);\n\n if (unsupported > 0) {\n lines.push(\"\");\n lines.push(\" \\x1b[1mIssues to address:\\x1b[0m\");\n const allItems = [...result.imports, ...result.config, ...result.libraries, ...result.conventions];\n for (const item of allItems) {\n if (item.status === \"unsupported\") {\n lines.push(` \\x1b[31m✗\\x1b[0m ${item.name}${item.detail ? ` — ${item.detail}` : \"\"}`);\n }\n }\n }\n\n if (result.summary.partial > 0) {\n lines.push(\"\");\n lines.push(\" \\x1b[1mPartial support (may need attention):\\x1b[0m\");\n const allItems = [...result.imports, ...result.config, ...result.libraries, ...result.conventions];\n for (const item of allItems) {\n if (item.status === \"partial\") {\n lines.push(` \\x1b[33m~\\x1b[0m ${item.name}${item.detail ? ` — ${item.detail}` : \"\"}`);\n }\n }\n }\n\n // Actionable next steps (skip when called from init — it prints its own summary)\n if (!opts?.calledFromInit) {\n lines.push(\"\");\n lines.push(\" \\x1b[1mRecommended next steps:\\x1b[0m\");\n lines.push(` Run \\x1b[36mvinext init\\x1b[0m to set up your project automatically`);\n lines.push(\"\");\n lines.push(\" Or manually:\");\n lines.push(` 1. Add \\x1b[36m\"type\": \"module\"\\x1b[0m to package.json`);\n lines.push(` 2. Install: \\x1b[36m${detectPackageManager(process.cwd())} vinext vite @vitejs/plugin-rsc\\x1b[0m`);\n lines.push(` 3. Create vite.config.ts (see docs)`);\n lines.push(` 4. Run: \\x1b[36mnpx vite dev\\x1b[0m`);\n }\n\n lines.push(\"\");\n return lines.join(\"\\n\");\n}\n"]}
package/dist/cli.js CHANGED
@@ -17,11 +17,11 @@ import fs from "node:fs";
17
17
  import { pathToFileURL } from "node:url";
18
18
  import { createRequire } from "node:module";
19
19
  import { execFileSync } from "node:child_process";
20
+ import { detectPackageManager } from "./utils/project.js";
20
21
  import { deploy as runDeploy, parseDeployArgs } from "./deploy.js";
21
22
  import { runCheck, formatReport } from "./check.js";
22
23
  import { init as runInit, getReactUpgradeDeps } from "./init.js";
23
24
  import { loadDotenv } from "./config/dotenv.js";
24
- import { detectPackageManager as _detectPackageManager } from "./utils/project.js";
25
25
  let _viteModule = null;
26
26
  /**
27
27
  * Dynamically load Vite from the project root. Falls back to the bundled
@@ -172,7 +172,7 @@ async function buildApp() {
172
172
  if (isApp) {
173
173
  const reactUpgrade = getReactUpgradeDeps(process.cwd());
174
174
  if (reactUpgrade.length > 0) {
175
- const installCmd = _detectPackageManager(process.cwd()).replace(/ -D$/, "");
175
+ const installCmd = detectPackageManager(process.cwd()).replace(/ -D$/, "");
176
176
  const [pm, ...pmArgs] = installCmd.split(" ");
177
177
  console.log(" Upgrading React for RSC compatibility...");
178
178
  execFileSync(pm, [...pmArgs, ...reactUpgrade], { cwd: process.cwd(), stdio: "inherit" });
@@ -265,9 +265,9 @@ async function lint() {
265
265
  }
266
266
  else {
267
267
  console.log(" No linter found. Install eslint or oxlint:\n\n" +
268
- " npm install -D eslint eslint-config-next\n" +
268
+ " " + detectPackageManager(process.cwd()) + " eslint eslint-config-next\n" +
269
269
  " # or\n" +
270
- " npm install -D oxlint\n");
270
+ " " + detectPackageManager(process.cwd()) + " oxlint\n");
271
271
  process.exit(1);
272
272
  }
273
273
  console.log("\n Lint passed.\n");