@objectstack/nextjs 3.3.1 → 4.0.1

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.
@@ -1,5 +1,5 @@
1
1
 
2
- > @objectstack/nextjs@3.3.1 build /home/runner/work/spec/spec/packages/adapters/nextjs
2
+ > @objectstack/nextjs@4.0.1 build /home/runner/work/spec/spec/packages/adapters/nextjs
3
3
  > tsup --config ../../../tsup.config.ts
4
4
 
5
5
  CLI Building entry: src/index.ts
@@ -10,13 +10,13 @@
10
10
  CLI Cleaning output folder
11
11
  ESM Build start
12
12
  CJS Build start
13
- ESM dist/index.mjs 7.52 KB
14
- ESM dist/index.mjs.map 16.55 KB
15
- ESM ⚡️ Build success in 98ms
16
13
  CJS dist/index.js 8.76 KB
17
14
  CJS dist/index.js.map 16.60 KB
18
- CJS ⚡️ Build success in 101ms
15
+ CJS ⚡️ Build success in 89ms
16
+ ESM dist/index.mjs 7.52 KB
17
+ ESM dist/index.mjs.map 16.55 KB
18
+ ESM ⚡️ Build success in 89ms
19
19
  DTS Build start
20
- DTS ⚡️ Build success in 13817ms
20
+ DTS ⚡️ Build success in 15525ms
21
21
  DTS dist/index.d.mts 2.63 KB
22
22
  DTS dist/index.d.ts 2.63 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,34 @@
1
1
  # @objectstack/nextjs
2
2
 
3
+ ## 4.0.0
4
+
5
+ ### Patch Changes
6
+
7
+ - f08ffc3: Fix discovery API endpoint routing and protocol consistency.
8
+
9
+ **Discovery route standardization:**
10
+
11
+ - All adapters (Express, Fastify, Hono, NestJS, Next.js, Nuxt, SvelteKit) now mount the discovery endpoint at `{prefix}/discovery` instead of `{prefix}` root.
12
+ - `.well-known/objectstack` redirects now point to `{prefix}/discovery`.
13
+ - Client `connect()` fallback URL changed from `/api/v1` to `/api/v1/discovery`.
14
+ - Runtime dispatcher handles both `/discovery` (standard) and `/` (legacy) for backward compatibility.
15
+
16
+ **Schema & route alignment:**
17
+
18
+ - Added `storage` (service: `file-storage`) and `feed` (service: `data`) routes to `DEFAULT_DISPATCHER_ROUTES`.
19
+ - Added `feed` and `discovery` fields to `ApiRoutesSchema`.
20
+ - Unified `GetDiscoveryResponseSchema` with `DiscoverySchema` as single source of truth.
21
+ - Client `getRoute('feed')` fallback updated from `/api/v1/data` to `/api/v1/feed`.
22
+
23
+ **Type safety:**
24
+
25
+ - Extracted `ApiRouteType` from `ApiRoutes` keys for type-safe client route resolution.
26
+ - Removed `as any` type casting in client route access.
27
+
28
+ - Updated dependencies [f08ffc3]
29
+ - Updated dependencies [e0b0a78]
30
+ - @objectstack/runtime@4.0.0
31
+
3
32
  ## 3.3.1
4
33
 
5
34
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@objectstack/nextjs",
3
- "version": "3.3.1",
3
+ "version": "4.0.1",
4
4
  "license": "Apache-2.0",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -8,15 +8,15 @@
8
8
  "next": "^16.2.1",
9
9
  "react": "^19.2.4",
10
10
  "react-dom": "^19.2.4",
11
- "@objectstack/runtime": "^3.3.1"
11
+ "@objectstack/runtime": "^4.0.1"
12
12
  },
13
13
  "devDependencies": {
14
14
  "next": "^16.2.1",
15
15
  "react": "^19.2.4",
16
16
  "react-dom": "^19.2.4",
17
- "typescript": "^5.0.0",
18
- "vitest": "^4.1.0",
19
- "@objectstack/runtime": "3.3.1"
17
+ "typescript": "^6.0.2",
18
+ "vitest": "^4.1.2",
19
+ "@objectstack/runtime": "4.0.1"
20
20
  },
21
21
  "scripts": {
22
22
  "build": "tsup --config ../../../tsup.config.ts",
package/tsconfig.json CHANGED
@@ -6,8 +6,21 @@
6
6
  "module": "NodeNext",
7
7
  "moduleResolution": "NodeNext",
8
8
  "esModuleInterop": true,
9
- "skipLibCheck": true
9
+ "skipLibCheck": true,
10
+ "lib": [
11
+ "ES2020",
12
+ "DOM",
13
+ "DOM.Iterable"
14
+ ],
15
+ "types": [
16
+ "node"
17
+ ]
10
18
  },
11
- "include": ["src/**/*"],
12
- "exclude": ["node_modules", "dist"]
19
+ "include": [
20
+ "src/**/*"
21
+ ],
22
+ "exclude": [
23
+ "node_modules",
24
+ "dist"
25
+ ]
13
26
  }