@objectstack/nextjs 3.2.9 → 3.3.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.
- package/.turbo/turbo-build.log +4 -4
- package/CHANGELOG.md +12 -0
- package/package.json +5 -5
- package/src/metadata-api.test.ts +27 -18
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @objectstack/nextjs@3.
|
|
2
|
+
> @objectstack/nextjs@3.3.1 build /home/runner/work/spec/spec/packages/adapters/nextjs
|
|
3
3
|
> tsup --config ../../../tsup.config.ts
|
|
4
4
|
|
|
5
5
|
[34mCLI[39m Building entry: src/index.ts
|
|
@@ -12,11 +12,11 @@
|
|
|
12
12
|
[34mCJS[39m Build start
|
|
13
13
|
[32mESM[39m [1mdist/index.mjs [22m[32m7.52 KB[39m
|
|
14
14
|
[32mESM[39m [1mdist/index.mjs.map [22m[32m16.55 KB[39m
|
|
15
|
-
[32mESM[39m ⚡️ Build success in
|
|
15
|
+
[32mESM[39m ⚡️ Build success in 98ms
|
|
16
16
|
[32mCJS[39m [1mdist/index.js [22m[32m8.76 KB[39m
|
|
17
17
|
[32mCJS[39m [1mdist/index.js.map [22m[32m16.60 KB[39m
|
|
18
|
-
[32mCJS[39m ⚡️ Build success in
|
|
18
|
+
[32mCJS[39m ⚡️ Build success in 101ms
|
|
19
19
|
[34mDTS[39m Build start
|
|
20
|
-
[32mDTS[39m ⚡️ Build success in
|
|
20
|
+
[32mDTS[39m ⚡️ Build success in 13817ms
|
|
21
21
|
[32mDTS[39m [1mdist/index.d.mts [22m[32m2.63 KB[39m
|
|
22
22
|
[32mDTS[39m [1mdist/index.d.ts [22m[32m2.63 KB[39m
|
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@objectstack/nextjs",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.3.1",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"peerDependencies": {
|
|
8
|
-
"next": "^16.1
|
|
8
|
+
"next": "^16.2.1",
|
|
9
9
|
"react": "^19.2.4",
|
|
10
10
|
"react-dom": "^19.2.4",
|
|
11
|
-
"@objectstack/runtime": "^3.
|
|
11
|
+
"@objectstack/runtime": "^3.3.1"
|
|
12
12
|
},
|
|
13
13
|
"devDependencies": {
|
|
14
|
-
"next": "^16.1
|
|
14
|
+
"next": "^16.2.1",
|
|
15
15
|
"react": "^19.2.4",
|
|
16
16
|
"react-dom": "^19.2.4",
|
|
17
17
|
"typescript": "^5.0.0",
|
|
18
18
|
"vitest": "^4.1.0",
|
|
19
|
-
"@objectstack/runtime": "3.
|
|
19
|
+
"@objectstack/runtime": "3.3.1"
|
|
20
20
|
},
|
|
21
21
|
"scripts": {
|
|
22
22
|
"build": "tsup --config ../../../tsup.config.ts",
|
package/src/metadata-api.test.ts
CHANGED
|
@@ -127,10 +127,11 @@ describe('Next.js Metadata API Integration Tests', () => {
|
|
|
127
127
|
expect(res.status).toBe(200);
|
|
128
128
|
expect(res.body.data).toHaveLength(2);
|
|
129
129
|
expect(mockDispatcher.dispatch).toHaveBeenCalledWith(
|
|
130
|
-
'objects',
|
|
131
|
-
expect.objectContaining({ request: expect.anything() }),
|
|
132
130
|
'GET',
|
|
131
|
+
'/meta/objects',
|
|
133
132
|
undefined,
|
|
133
|
+
{},
|
|
134
|
+
expect.objectContaining({ request: expect.anything() }),
|
|
134
135
|
);
|
|
135
136
|
});
|
|
136
137
|
});
|
|
@@ -153,10 +154,11 @@ describe('Next.js Metadata API Integration Tests', () => {
|
|
|
153
154
|
expect(res.status).toBe(200);
|
|
154
155
|
expect(res.body.data.name).toBe('account');
|
|
155
156
|
expect(mockDispatcher.dispatch).toHaveBeenCalledWith(
|
|
156
|
-
'objects/account',
|
|
157
|
-
expect.objectContaining({ request: expect.anything() }),
|
|
158
157
|
'GET',
|
|
158
|
+
'/meta/objects/account',
|
|
159
159
|
undefined,
|
|
160
|
+
{},
|
|
161
|
+
expect.objectContaining({ request: expect.anything() }),
|
|
160
162
|
);
|
|
161
163
|
});
|
|
162
164
|
});
|
|
@@ -178,10 +180,11 @@ describe('Next.js Metadata API Integration Tests', () => {
|
|
|
178
180
|
const res = await handler(req, { params: { objectstack: ['meta', 'objects'] } });
|
|
179
181
|
expect(res.status).toBe(201);
|
|
180
182
|
expect(mockDispatcher.dispatch).toHaveBeenCalledWith(
|
|
181
|
-
'objects',
|
|
182
|
-
expect.objectContaining({ request: expect.anything() }),
|
|
183
183
|
'POST',
|
|
184
|
+
'/meta/objects',
|
|
184
185
|
body,
|
|
186
|
+
{},
|
|
187
|
+
expect.objectContaining({ request: expect.anything() }),
|
|
185
188
|
);
|
|
186
189
|
});
|
|
187
190
|
});
|
|
@@ -199,10 +202,11 @@ describe('Next.js Metadata API Integration Tests', () => {
|
|
|
199
202
|
const res = await handler(req, { params: { objectstack: ['meta', 'objects', 'account'] } });
|
|
200
203
|
expect(res.status).toBe(200);
|
|
201
204
|
expect(mockDispatcher.dispatch).toHaveBeenCalledWith(
|
|
202
|
-
'objects/account',
|
|
203
|
-
expect.objectContaining({ request: expect.anything() }),
|
|
204
205
|
'PUT',
|
|
206
|
+
'/meta/objects/account',
|
|
205
207
|
body,
|
|
208
|
+
{},
|
|
209
|
+
expect.objectContaining({ request: expect.anything() }),
|
|
206
210
|
);
|
|
207
211
|
});
|
|
208
212
|
});
|
|
@@ -229,10 +233,11 @@ describe('Next.js Metadata API Integration Tests', () => {
|
|
|
229
233
|
const req = makeReq('http://localhost/api/meta/views');
|
|
230
234
|
await handler(req, { params: { objectstack: ['meta', 'views'] } });
|
|
231
235
|
expect(mockDispatcher.dispatch).toHaveBeenCalledWith(
|
|
232
|
-
'views',
|
|
233
|
-
expect.objectContaining({ request: expect.anything() }),
|
|
234
236
|
'GET',
|
|
237
|
+
'/meta/views',
|
|
235
238
|
undefined,
|
|
239
|
+
{},
|
|
240
|
+
expect.objectContaining({ request: expect.anything() }),
|
|
236
241
|
);
|
|
237
242
|
});
|
|
238
243
|
|
|
@@ -240,10 +245,11 @@ describe('Next.js Metadata API Integration Tests', () => {
|
|
|
240
245
|
const req = makeReq('http://localhost/api/meta/flows');
|
|
241
246
|
await handler(req, { params: { objectstack: ['meta', 'flows'] } });
|
|
242
247
|
expect(mockDispatcher.dispatch).toHaveBeenCalledWith(
|
|
243
|
-
'flows',
|
|
244
|
-
expect.objectContaining({ request: expect.anything() }),
|
|
245
248
|
'GET',
|
|
249
|
+
'/meta/flows',
|
|
246
250
|
undefined,
|
|
251
|
+
{},
|
|
252
|
+
expect.objectContaining({ request: expect.anything() }),
|
|
247
253
|
);
|
|
248
254
|
});
|
|
249
255
|
|
|
@@ -251,10 +257,11 @@ describe('Next.js Metadata API Integration Tests', () => {
|
|
|
251
257
|
const req = makeReq('http://localhost/api/meta/agents');
|
|
252
258
|
await handler(req, { params: { objectstack: ['meta', 'agents'] } });
|
|
253
259
|
expect(mockDispatcher.dispatch).toHaveBeenCalledWith(
|
|
254
|
-
'agents',
|
|
255
|
-
expect.objectContaining({ request: expect.anything() }),
|
|
256
260
|
'GET',
|
|
261
|
+
'/meta/agents',
|
|
257
262
|
undefined,
|
|
263
|
+
{},
|
|
264
|
+
expect.objectContaining({ request: expect.anything() }),
|
|
258
265
|
);
|
|
259
266
|
});
|
|
260
267
|
});
|
|
@@ -684,10 +691,11 @@ describe('Next.js Metadata API Integration Tests', () => {
|
|
|
684
691
|
const req = makeReq('http://localhost/api/meta/objects/account/fields/name');
|
|
685
692
|
await handler(req, { params: { objectstack: ['meta', 'objects', 'account', 'fields', 'name'] } });
|
|
686
693
|
expect(mockDispatcher.dispatch).toHaveBeenCalledWith(
|
|
687
|
-
'objects/account/fields/name',
|
|
688
|
-
expect.any(Object),
|
|
689
694
|
'GET',
|
|
695
|
+
'/meta/objects/account/fields/name',
|
|
690
696
|
undefined,
|
|
697
|
+
{},
|
|
698
|
+
expect.objectContaining({ request: expect.anything() }),
|
|
691
699
|
);
|
|
692
700
|
});
|
|
693
701
|
|
|
@@ -696,10 +704,11 @@ describe('Next.js Metadata API Integration Tests', () => {
|
|
|
696
704
|
// With just ['meta'], subPath becomes empty after slice(1)
|
|
697
705
|
await handler(req, { params: { objectstack: ['meta'] } });
|
|
698
706
|
expect(mockDispatcher.dispatch).toHaveBeenCalledWith(
|
|
699
|
-
'',
|
|
700
|
-
expect.any(Object),
|
|
701
707
|
'GET',
|
|
708
|
+
'/meta',
|
|
702
709
|
undefined,
|
|
710
|
+
{},
|
|
711
|
+
expect.objectContaining({ request: expect.anything() }),
|
|
703
712
|
);
|
|
704
713
|
});
|
|
705
714
|
});
|