next-zero-rpc 0.1.5 → 0.1.6

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 (2) hide show
  1. package/README.md +25 -3
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  Type-safe fetch for Next.js — zero runtime, zero config, zero dependencies.
4
4
 
5
+ [![Open in CodeSandbox](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/p/sandbox/github/caocchinh/next-zero-rpc/tree/main/examples/minimal)
6
+
5
7
  ```bash
6
8
  npx next-zero-rpc init
7
9
  ```
@@ -507,6 +509,24 @@ Since you own all the source files, you can customize anything:
507
509
  - **Change the output path** — Update `REGISTRY_FILE` in `update-api-registry.mjs`
508
510
  - **Override the generator** — The `withApiRegistry` plugin and `updateApiRegistry()` function are fully yours to modify
509
511
 
512
+ ## Examples
513
+
514
+ ### Try it online
515
+
516
+ [![Open in CodeSandbox](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/p/sandbox/github/caocchinh/next-zero-rpc/tree/main/examples/minimal)
517
+
518
+ Opens [`examples/minimal`](https://github.com/caocchinh/next-zero-rpc/tree/main/examples/minimal) — a self-contained Next.js app with a working `apiFetch` client and two example API routes.
519
+
520
+ ### Run locally
521
+
522
+ ```bash
523
+ # Clone just the example folder (no git history)
524
+ npx degit caocchinh/next-zero-rpc/examples/minimal my-app
525
+ cd my-app
526
+ npm install
527
+ npm run dev
528
+ ```
529
+
510
530
  ## CLI Usage
511
531
 
512
532
  ```bash
@@ -518,9 +538,11 @@ npx next-zero-rpc --help # Show help
518
538
 
519
539
  ## Requirements
520
540
 
521
- - Next.js (App Router)
522
- - TypeScript
523
- - Node.js 18
541
+ | Requirement | Minimum Version | Reason |
542
+ | ----------- | --------------- | ------ |
543
+ | Next.js | **14.0** | App Router (stable since 14.0) |
544
+ | TypeScript | **4.9** | `satisfies` keyword used in `responses.ts` |
545
+ | Node.js | **18** | Native `fetch` API required by `apiFetch` |
524
546
 
525
547
  ## License
526
548
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "next-zero-rpc",
3
- "version": "0.1.5",
3
+ "version": "0.1.6",
4
4
  "description": "Type-safe fetch for Next.js — zero runtime, zero config, zero dependencies.",
5
5
  "keywords": [
6
6
  "nextjs",