@byline/host-tanstack-start 6.7.0 → 6.7.2
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/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"private": false,
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MPL-2.0",
|
|
6
|
-
"version": "6.7.
|
|
6
|
+
"version": "6.7.2",
|
|
7
7
|
"engines": {
|
|
8
8
|
"node": ">=20.9.0"
|
|
9
9
|
},
|
|
@@ -119,21 +119,21 @@
|
|
|
119
119
|
}
|
|
120
120
|
},
|
|
121
121
|
"dependencies": {
|
|
122
|
+
"@byline/admin": "6.7.2",
|
|
123
|
+
"@byline/ai": "6.7.2",
|
|
124
|
+
"@byline/analytics": "6.7.2",
|
|
125
|
+
"@byline/analytics-agent": "6.7.2",
|
|
126
|
+
"@byline/auth": "6.7.2",
|
|
127
|
+
"@byline/client": "6.7.2",
|
|
128
|
+
"@byline/core": "6.7.2",
|
|
129
|
+
"@byline/i18n": "6.7.2",
|
|
130
|
+
"@byline/ui": "6.7.2",
|
|
122
131
|
"@dnd-kit/core": "^6.3.1",
|
|
123
132
|
"@dnd-kit/sortable": "^10.0.0",
|
|
124
133
|
"clsx": "^2.1.1",
|
|
125
134
|
"react-json-view-lite": "^2.5.0",
|
|
126
135
|
"react-swipeable": "^7.0.2",
|
|
127
|
-
"zod": "^4.6.
|
|
128
|
-
"@byline/admin": "6.7.0",
|
|
129
|
-
"@byline/analytics-agent": "6.7.0",
|
|
130
|
-
"@byline/auth": "6.7.0",
|
|
131
|
-
"@byline/analytics": "6.7.0",
|
|
132
|
-
"@byline/ai": "6.7.0",
|
|
133
|
-
"@byline/core": "6.7.0",
|
|
134
|
-
"@byline/i18n": "6.7.0",
|
|
135
|
-
"@byline/ui": "6.7.0",
|
|
136
|
-
"@byline/client": "6.7.0"
|
|
136
|
+
"zod": "^4.6.7"
|
|
137
137
|
},
|
|
138
138
|
"peerDependencies": {
|
|
139
139
|
"@tanstack/react-router": "^1.167.0",
|
|
@@ -143,23 +143,23 @@
|
|
|
143
143
|
"vite": "^8.0.0"
|
|
144
144
|
},
|
|
145
145
|
"devDependencies": {
|
|
146
|
-
"@biomejs/biome": "2.5.
|
|
147
|
-
"@rsbuild/plugin-react": "^2.1.
|
|
148
|
-
"@rslib/core": "^1.0.
|
|
149
|
-
"@tanstack/react-router": "^1.170.
|
|
150
|
-
"@tanstack/react-start": "^1.
|
|
151
|
-
"@types/node": "^26.6.
|
|
146
|
+
"@biomejs/biome": "2.5.15",
|
|
147
|
+
"@rsbuild/plugin-react": "^2.1.1",
|
|
148
|
+
"@rslib/core": "^1.0.3",
|
|
149
|
+
"@tanstack/react-router": "^1.170.44",
|
|
150
|
+
"@tanstack/react-start": "^1.169.2",
|
|
151
|
+
"@types/node": "^26.6.5",
|
|
152
152
|
"@types/react": "19.3.0",
|
|
153
153
|
"@types/react-dom": "19.3.0",
|
|
154
|
-
"@vitejs/plugin-react": "^6.1.
|
|
155
|
-
"jsdom": "^30.1.
|
|
154
|
+
"@vitejs/plugin-react": "^6.1.2",
|
|
155
|
+
"jsdom": "^30.1.3",
|
|
156
156
|
"npm-run-all": "^4.1.5",
|
|
157
|
-
"react": "^19.3.
|
|
158
|
-
"react-dom": "^19.3.
|
|
157
|
+
"react": "^19.3.1",
|
|
158
|
+
"react-dom": "^19.3.1",
|
|
159
159
|
"typescript": "^7.0.2",
|
|
160
160
|
"typescript-plugin-css-modules": "^5.2.0",
|
|
161
|
-
"vite": "^8.3.
|
|
162
|
-
"vitest": "^5.0.
|
|
161
|
+
"vite": "^8.3.4",
|
|
162
|
+
"vitest": "^5.0.4"
|
|
163
163
|
},
|
|
164
164
|
"publishConfig": {
|
|
165
165
|
"access": "public",
|
|
@@ -27,12 +27,19 @@ const startRequire = createRequire(require.resolve('@tanstack/react-start/packag
|
|
|
27
27
|
const serverPackage = startRequire.resolve('@tanstack/start-server-core/package.json')
|
|
28
28
|
const esm = join(dirname(serverPackage), 'src')
|
|
29
29
|
const serverRequire = createRequire(serverPackage)
|
|
30
|
-
|
|
30
|
+
// Start finalizes a completed serialization in its request pipeline: the handler
|
|
31
|
+
// returns a deferred value whose createResponse(event) builds the Response.
|
|
32
|
+
type DeferredResponse = { createResponse(event: { request: Request; requestUrl: URL }): Response }
|
|
33
|
+
let handler: (input: {
|
|
34
|
+
request: Request
|
|
35
|
+
context: object
|
|
36
|
+
serverFnId: string
|
|
37
|
+
}) => Promise<Response | DeferredResponse>
|
|
31
38
|
let seroval: {
|
|
32
39
|
toJSONAsync(value: unknown): Promise<unknown>
|
|
33
40
|
fromCrossJSON(value: unknown, options: object): unknown
|
|
34
41
|
}
|
|
35
|
-
let runWithStartContext: (context: object, fn: () => Promise<
|
|
42
|
+
let runWithStartContext: <T>(context: object, fn: () => Promise<T>) => Promise<T>
|
|
36
43
|
let action: (input: { data: unknown }) => Promise<unknown>
|
|
37
44
|
|
|
38
45
|
beforeAll(async () => {
|
|
@@ -66,7 +73,7 @@ async function roundTrip(data: unknown, operation: (data: unknown) => Promise<un
|
|
|
66
73
|
headers: { 'content-type': 'application/json', 'x-tsr-serverFn': 'true' },
|
|
67
74
|
body: JSON.stringify(await seroval.toJSONAsync({ data })),
|
|
68
75
|
})
|
|
69
|
-
const
|
|
76
|
+
const result = await runWithStartContext(
|
|
70
77
|
{
|
|
71
78
|
request,
|
|
72
79
|
startOptions: {},
|
|
@@ -79,6 +86,10 @@ async function roundTrip(data: unknown, operation: (data: unknown) => Promise<un
|
|
|
79
86
|
},
|
|
80
87
|
() => handler({ request, context: {}, serverFnId: 'document-mutation' })
|
|
81
88
|
)
|
|
89
|
+
const response =
|
|
90
|
+
result instanceof Response
|
|
91
|
+
? result
|
|
92
|
+
: result.createResponse({ request, requestUrl: new URL(request.url) })
|
|
82
93
|
const wire = await response.text()
|
|
83
94
|
const decoded = seroval.fromCrossJSON(JSON.parse(wire), {})
|
|
84
95
|
if (typeof decoded !== 'object' || decoded === null) throw new Error('Expected wire envelope')
|