spiceflow 1.0.3 → 1.0.5
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/dist/client/index.d.ts +2 -2
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +20 -23
- package/dist/client/index.js.map +1 -1
- package/dist/client/types.d.ts +4 -6
- package/dist/client/types.d.ts.map +1 -1
- package/dist/client/ws.d.ts +2 -2
- package/dist/client/ws.d.ts.map +1 -1
- package/dist/client/ws.js +1 -1
- package/dist/client/ws.js.map +1 -1
- package/dist/client.test.js +2 -2
- package/dist/client.test.js.map +1 -1
- package/dist/elysia-fork/types.d.ts +3 -3
- package/dist/elysia-fork/types.d.ts.map +1 -1
- package/dist/elysia-fork/types.js +1 -1
- package/dist/elysia-fork/types.js.map +1 -1
- package/dist/openapi.d.ts +4 -4
- package/dist/openapi.d.ts.map +1 -1
- package/dist/openapi.js +4 -2
- package/dist/openapi.js.map +1 -1
- package/dist/spiceflow.d.ts.map +1 -1
- package/dist/spiceflow.js +1 -1
- package/dist/spiceflow.js.map +1 -1
- package/dist/spiceflow.test.js +1 -1
- package/dist/spiceflow.test.js.map +1 -1
- package/dist/stream.test.js +2 -2
- package/dist/stream.test.js.map +1 -1
- package/dist/types.d.ts +1 -0
- package/dist/types.js +1 -1
- package/dist/zod.test.js +2 -2
- package/dist/zod.test.js.map +1 -1
- package/package.json +1 -1
- package/src/client/index.ts +42 -51
- package/src/client/types.ts +6 -6
- package/src/client/ws.ts +3 -3
- package/src/client.test.ts +2 -2
- package/src/elysia-fork/types.ts +3 -3
- package/src/openapi.ts +4 -3
- package/src/spiceflow.test.ts +1 -1
- package/src/spiceflow.ts +19 -16
- package/src/stream.test.ts +2 -2
- package/src/zod.test.ts +2 -2
package/src/client/index.ts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
/* eslint-disable no-extra-semi */
|
|
2
2
|
/* eslint-disable no-case-declarations */
|
|
3
3
|
/* eslint-disable prefer-const */
|
|
4
|
-
import type { Spiceflow } from '../spiceflow'
|
|
4
|
+
import type { Spiceflow } from '../spiceflow.js'
|
|
5
5
|
import { EventSourceParserStream } from 'eventsource-parser/stream'
|
|
6
6
|
|
|
7
|
-
import type { SpiceflowClient } from './types'
|
|
7
|
+
import type { SpiceflowClient } from './types.js'
|
|
8
8
|
|
|
9
9
|
export { SpiceflowClient }
|
|
10
10
|
|
|
11
|
-
import { EdenFetchError } from './errors'
|
|
11
|
+
import { EdenFetchError } from './errors.js'
|
|
12
12
|
// import { EdenWS } from './ws'
|
|
13
|
-
import { parseStringifiedValue } from './utils'
|
|
13
|
+
import { parseStringifiedValue } from './utils.js'
|
|
14
14
|
|
|
15
15
|
const method = [
|
|
16
16
|
'get',
|
|
@@ -21,10 +21,10 @@ const method = [
|
|
|
21
21
|
'options',
|
|
22
22
|
'head',
|
|
23
23
|
'connect',
|
|
24
|
-
'subscribe'
|
|
24
|
+
'subscribe',
|
|
25
25
|
] as const
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
|
|
28
28
|
|
|
29
29
|
const isServer = typeof FileList === 'undefined'
|
|
30
30
|
|
|
@@ -57,7 +57,7 @@ const createNewFile = (v: File) =>
|
|
|
57
57
|
reader.onload = () => {
|
|
58
58
|
const file = new File([reader.result!], v.name, {
|
|
59
59
|
lastModified: v.lastModified,
|
|
60
|
-
type: v.type
|
|
60
|
+
type: v.type,
|
|
61
61
|
})
|
|
62
62
|
resolve(file)
|
|
63
63
|
}
|
|
@@ -69,7 +69,7 @@ const processHeaders = (
|
|
|
69
69
|
h: SpiceflowClient.Config['headers'],
|
|
70
70
|
path: string,
|
|
71
71
|
options: RequestInit = {},
|
|
72
|
-
headers: Record<string, string> = {}
|
|
72
|
+
headers: Record<string, string> = {},
|
|
73
73
|
): Record<string, string> => {
|
|
74
74
|
if (Array.isArray(h)) {
|
|
75
75
|
for (const value of h)
|
|
@@ -91,7 +91,7 @@ const processHeaders = (
|
|
|
91
91
|
|
|
92
92
|
switch (typeof h) {
|
|
93
93
|
case 'function':
|
|
94
|
-
if (h instanceof Headers)
|
|
94
|
+
if (typeof Headers !== 'undefined' && h instanceof Headers)
|
|
95
95
|
return processHeaders(h, path, options, headers)
|
|
96
96
|
|
|
97
97
|
const v = h(path, options)
|
|
@@ -99,7 +99,7 @@ const processHeaders = (
|
|
|
99
99
|
return headers
|
|
100
100
|
|
|
101
101
|
case 'object':
|
|
102
|
-
if (h instanceof Headers) {
|
|
102
|
+
if (typeof Headers !== 'undefined' && h instanceof Headers) {
|
|
103
103
|
h.forEach((value, key) => {
|
|
104
104
|
headers[key.toLowerCase()] = value
|
|
105
105
|
})
|
|
@@ -126,12 +126,12 @@ export class TextDecoderStream extends TransformStream<Uint8Array, string> {
|
|
|
126
126
|
constructor() {
|
|
127
127
|
const decoder = new TextDecoder('utf-8', {
|
|
128
128
|
fatal: true,
|
|
129
|
-
ignoreBOM: true
|
|
129
|
+
ignoreBOM: true,
|
|
130
130
|
})
|
|
131
131
|
super({
|
|
132
132
|
transform(
|
|
133
133
|
chunk: Uint8Array,
|
|
134
|
-
controller: TransformStreamDefaultController<string
|
|
134
|
+
controller: TransformStreamDefaultController<string>,
|
|
135
135
|
) {
|
|
136
136
|
const decoded = decoder.decode(chunk, { stream: true })
|
|
137
137
|
if (decoded.length > 0) {
|
|
@@ -143,13 +143,13 @@ export class TextDecoderStream extends TransformStream<Uint8Array, string> {
|
|
|
143
143
|
if (output.length > 0) {
|
|
144
144
|
controller.enqueue(output)
|
|
145
145
|
}
|
|
146
|
-
}
|
|
146
|
+
},
|
|
147
147
|
})
|
|
148
148
|
}
|
|
149
149
|
}
|
|
150
150
|
|
|
151
151
|
export async function* streamSSEResponse(
|
|
152
|
-
response: Response
|
|
152
|
+
response: Response,
|
|
153
153
|
): AsyncGenerator<SSEEvent> {
|
|
154
154
|
const body = response.body
|
|
155
155
|
if (!body) return
|
|
@@ -183,7 +183,7 @@ const createProxy = (
|
|
|
183
183
|
domain: string,
|
|
184
184
|
config: SpiceflowClient.Config,
|
|
185
185
|
paths: string[] = [],
|
|
186
|
-
instance?: Spiceflow<any, any, any, any, any, any
|
|
186
|
+
instance?: Spiceflow<any, any, any, any, any, any>,
|
|
187
187
|
): any =>
|
|
188
188
|
new Proxy(() => {}, {
|
|
189
189
|
get(_, param: string): any {
|
|
@@ -191,7 +191,7 @@ const createProxy = (
|
|
|
191
191
|
domain,
|
|
192
192
|
config,
|
|
193
193
|
param === 'index' ? paths : [...paths, param],
|
|
194
|
-
instance
|
|
194
|
+
instance,
|
|
195
195
|
)
|
|
196
196
|
},
|
|
197
197
|
apply(_, __, [body, options]) {
|
|
@@ -206,11 +206,10 @@ const createProxy = (
|
|
|
206
206
|
const path = '/' + methodPaths.join('/')
|
|
207
207
|
|
|
208
208
|
let {
|
|
209
|
-
fetcher = fetch,
|
|
209
|
+
fetch: fetcher = fetch,
|
|
210
210
|
headers,
|
|
211
211
|
onRequest,
|
|
212
212
|
onResponse,
|
|
213
|
-
fetch: conf
|
|
214
213
|
} = config
|
|
215
214
|
|
|
216
215
|
const isGetOrHead =
|
|
@@ -231,7 +230,7 @@ const createProxy = (
|
|
|
231
230
|
q +=
|
|
232
231
|
(q ? '&' : '?') +
|
|
233
232
|
`${encodeURIComponent(key)}=${encodeURIComponent(
|
|
234
|
-
value
|
|
233
|
+
value,
|
|
235
234
|
)}`
|
|
236
235
|
}
|
|
237
236
|
|
|
@@ -274,8 +273,8 @@ const createProxy = (
|
|
|
274
273
|
let fetchInit = {
|
|
275
274
|
method: method?.toUpperCase(),
|
|
276
275
|
body,
|
|
277
|
-
...conf,
|
|
278
|
-
headers
|
|
276
|
+
// ...conf,
|
|
277
|
+
headers,
|
|
279
278
|
} satisfies RequestInit
|
|
280
279
|
|
|
281
280
|
fetchInit.headers = {
|
|
@@ -284,8 +283,8 @@ const createProxy = (
|
|
|
284
283
|
// For GET and HEAD, options is moved to body (1st param)
|
|
285
284
|
isGetOrHead ? body?.headers : options?.headers,
|
|
286
285
|
path,
|
|
287
|
-
fetchInit
|
|
288
|
-
)
|
|
286
|
+
fetchInit,
|
|
287
|
+
),
|
|
289
288
|
}
|
|
290
289
|
|
|
291
290
|
const fetchOpts =
|
|
@@ -295,7 +294,7 @@ const createProxy = (
|
|
|
295
294
|
|
|
296
295
|
fetchInit = {
|
|
297
296
|
...fetchInit,
|
|
298
|
-
...fetchOpts
|
|
297
|
+
...fetchOpts,
|
|
299
298
|
}
|
|
300
299
|
|
|
301
300
|
if (isGetOrHead) delete fetchInit.body
|
|
@@ -315,9 +314,9 @@ const createProxy = (
|
|
|
315
314
|
...processHeaders(
|
|
316
315
|
temp.headers,
|
|
317
316
|
path,
|
|
318
|
-
fetchInit
|
|
319
|
-
)
|
|
320
|
-
}
|
|
317
|
+
fetchInit,
|
|
318
|
+
),
|
|
319
|
+
},
|
|
321
320
|
}
|
|
322
321
|
}
|
|
323
322
|
}
|
|
@@ -330,7 +329,7 @@ const createProxy = (
|
|
|
330
329
|
|
|
331
330
|
// FormData is 1 level deep
|
|
332
331
|
for (const [key, field] of Object.entries(
|
|
333
|
-
fetchInit.body
|
|
332
|
+
fetchInit.body,
|
|
334
333
|
)) {
|
|
335
334
|
if (isServer) {
|
|
336
335
|
formData.append(key, field as any)
|
|
@@ -341,7 +340,7 @@ const createProxy = (
|
|
|
341
340
|
if (field instanceof File) {
|
|
342
341
|
formData.append(
|
|
343
342
|
key,
|
|
344
|
-
await createNewFile(field as any)
|
|
343
|
+
await createNewFile(field as any),
|
|
345
344
|
)
|
|
346
345
|
|
|
347
346
|
continue
|
|
@@ -351,7 +350,7 @@ const createProxy = (
|
|
|
351
350
|
for (let i = 0; i < field.length; i++)
|
|
352
351
|
formData.append(
|
|
353
352
|
key as any,
|
|
354
|
-
await createNewFile((field as any)[i])
|
|
353
|
+
await createNewFile((field as any)[i]),
|
|
355
354
|
)
|
|
356
355
|
|
|
357
356
|
continue
|
|
@@ -365,7 +364,7 @@ const createProxy = (
|
|
|
365
364
|
key as any,
|
|
366
365
|
value instanceof File
|
|
367
366
|
? await createNewFile(value)
|
|
368
|
-
: value
|
|
367
|
+
: value,
|
|
369
368
|
)
|
|
370
369
|
}
|
|
371
370
|
|
|
@@ -407,16 +406,16 @@ const createProxy = (
|
|
|
407
406
|
...processHeaders(
|
|
408
407
|
temp.headers,
|
|
409
408
|
path,
|
|
410
|
-
fetchInit
|
|
411
|
-
)
|
|
412
|
-
} as Record<string, string
|
|
409
|
+
fetchInit,
|
|
410
|
+
),
|
|
411
|
+
} as Record<string, string>,
|
|
413
412
|
}
|
|
414
413
|
}
|
|
415
414
|
}
|
|
416
415
|
|
|
417
416
|
const url = domain + path + q
|
|
418
417
|
const response = await (instance?.handle(
|
|
419
|
-
new Request(url, fetchInit)
|
|
418
|
+
new Request(url, fetchInit),
|
|
420
419
|
) ?? fetcher!(url, fetchInit))
|
|
421
420
|
|
|
422
421
|
let data = null as any
|
|
@@ -448,7 +447,7 @@ const createProxy = (
|
|
|
448
447
|
error,
|
|
449
448
|
response,
|
|
450
449
|
status: response.status,
|
|
451
|
-
headers: response.headers
|
|
450
|
+
headers: response.headers,
|
|
452
451
|
}
|
|
453
452
|
}
|
|
454
453
|
|
|
@@ -493,7 +492,7 @@ const createProxy = (
|
|
|
493
492
|
error,
|
|
494
493
|
response,
|
|
495
494
|
status: response.status,
|
|
496
|
-
headers: response.headers
|
|
495
|
+
headers: response.headers,
|
|
497
496
|
}
|
|
498
497
|
})()
|
|
499
498
|
}
|
|
@@ -503,36 +502,28 @@ const createProxy = (
|
|
|
503
502
|
domain,
|
|
504
503
|
config,
|
|
505
504
|
[...paths, Object.values(body)[0] as string],
|
|
506
|
-
instance
|
|
505
|
+
instance,
|
|
507
506
|
)
|
|
508
507
|
|
|
509
508
|
return createProxy(domain, config, paths)
|
|
510
|
-
}
|
|
509
|
+
},
|
|
511
510
|
}) as any
|
|
512
511
|
|
|
513
512
|
export const createSpiceflowClient = <
|
|
514
|
-
const App extends Spiceflow<any, any, any, any, any, any, any, any
|
|
513
|
+
const App extends Spiceflow<any, any, any, any, any, any, any, any>,
|
|
515
514
|
>(
|
|
516
515
|
domain: string | App,
|
|
517
|
-
config: SpiceflowClient.Config = {}
|
|
516
|
+
config: SpiceflowClient.Config = {},
|
|
518
517
|
): SpiceflowClient.Create<App> => {
|
|
519
518
|
if (typeof domain === 'string') {
|
|
520
|
-
if (
|
|
521
|
-
if (!domain.includes('://'))
|
|
522
|
-
domain =
|
|
523
|
-
(locals.find((v) => (domain as string).includes(v))
|
|
524
|
-
? 'http://'
|
|
525
|
-
: 'https://') + domain
|
|
526
|
-
|
|
527
|
-
if (domain.endsWith('/')) domain = domain.slice(0, -1)
|
|
528
|
-
}
|
|
519
|
+
if (domain.endsWith('/')) domain = domain.slice(0, -1)
|
|
529
520
|
|
|
530
521
|
return createProxy(domain, config)
|
|
531
522
|
}
|
|
532
523
|
|
|
533
524
|
if (typeof window !== 'undefined')
|
|
534
525
|
console.warn(
|
|
535
|
-
'Spiceflow instance server found on client side, this is not recommended for security reason. Use generic type instead.'
|
|
526
|
+
'Spiceflow instance server found on client side, this is not recommended for security reason. Use generic type instead.',
|
|
536
527
|
)
|
|
537
528
|
|
|
538
529
|
return createProxy('http://e.ly', config, [], domain)
|
package/src/client/types.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/// <reference lib="dom" />
|
|
2
|
-
import type { Spiceflow } from '../spiceflow'
|
|
2
|
+
import type { Spiceflow } from '../spiceflow.js'
|
|
3
3
|
// import { EdenWS } from './ws'
|
|
4
4
|
// import type { IsNever, Not, Prettify } from '../types'
|
|
5
|
-
import { EdenFetchError } from './errors'
|
|
6
|
-
import { EdenWS } from './ws'
|
|
5
|
+
import { EdenFetchError } from './errors.js'
|
|
6
|
+
import { EdenWS } from './ws.js'
|
|
7
7
|
|
|
8
8
|
export type Prettify<T> = {
|
|
9
9
|
[K in keyof T]: T[K]
|
|
@@ -168,8 +168,8 @@ export namespace SpiceflowClient {
|
|
|
168
168
|
: never
|
|
169
169
|
|
|
170
170
|
export interface Config {
|
|
171
|
-
fetch?: Omit<RequestInit, 'headers' | 'method'>
|
|
172
|
-
|
|
171
|
+
// fetch?: Omit<RequestInit, 'headers' | 'method'>
|
|
172
|
+
fetch?: typeof fetch
|
|
173
173
|
headers?: MaybeArray<
|
|
174
174
|
| RequestInit['headers']
|
|
175
175
|
| ((
|
|
@@ -184,7 +184,7 @@ export namespace SpiceflowClient {
|
|
|
184
184
|
) => MaybePromise<RequestInit | void>
|
|
185
185
|
>
|
|
186
186
|
onResponse?: MaybeArray<(response: Response) => MaybePromise<unknown>>
|
|
187
|
-
keepDomain?: boolean
|
|
187
|
+
// keepDomain?: boolean
|
|
188
188
|
}
|
|
189
189
|
|
|
190
190
|
// type UnwrapAwaited<T extends Record<number, unknown>> = {
|
package/src/client/ws.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { InputSchema } from '../elysia-fork/types'
|
|
2
|
-
import type { SpiceflowClient } from './types'
|
|
3
|
-
import { parseStringifiedValue } from './utils'
|
|
1
|
+
import type { InputSchema } from '../elysia-fork/types.js'
|
|
2
|
+
import type { SpiceflowClient } from './types.js'
|
|
3
|
+
import { parseStringifiedValue } from './utils.js'
|
|
4
4
|
|
|
5
5
|
export class EdenWS<in out Schema extends InputSchema<any> = {}> {
|
|
6
6
|
ws: WebSocket
|
package/src/client.test.ts
CHANGED
package/src/elysia-fork/types.ts
CHANGED
|
@@ -16,15 +16,15 @@ import type { BunFile, Server } from 'bun'
|
|
|
16
16
|
|
|
17
17
|
import type { OpenAPIV3 } from 'openapi-types'
|
|
18
18
|
|
|
19
|
-
import { Spiceflow } from '../spiceflow'
|
|
20
|
-
import type { Context, ErrorContext, PreContext } from './context'
|
|
19
|
+
import { Spiceflow } from '../spiceflow.js'
|
|
20
|
+
import type { Context, ErrorContext, PreContext } from './context.js'
|
|
21
21
|
import {
|
|
22
22
|
ELYSIA_RESPONSE,
|
|
23
23
|
InternalServerError,
|
|
24
24
|
NotFoundError,
|
|
25
25
|
ParseError,
|
|
26
26
|
ValidationError,
|
|
27
|
-
} from './error'
|
|
27
|
+
} from './error.js'
|
|
28
28
|
import { ZodTypeAny, ZodObject } from 'zod'
|
|
29
29
|
|
|
30
30
|
export type MaybeArray<T> = T | T[]
|
package/src/openapi.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/ban-ts-comment */
|
|
2
2
|
import { JSONSchemaType } from 'ajv'
|
|
3
|
-
import { InternalRoute, isZodSchema, Spiceflow } from './spiceflow'
|
|
3
|
+
import { InternalRoute, isZodSchema, Spiceflow } from './spiceflow.js'
|
|
4
4
|
import { ZodType } from 'zod'
|
|
5
5
|
|
|
6
6
|
import type { OpenAPIV3 } from 'openapi-types'
|
|
@@ -8,7 +8,7 @@ import type { OpenAPIV3 } from 'openapi-types'
|
|
|
8
8
|
let excludeMethods = ['OPTIONS']
|
|
9
9
|
/* eslint-disable @typescript-eslint/ban-ts-comment */
|
|
10
10
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
11
|
-
import type { HTTPMethod, LocalHook, TypeSchema } from './elysia-fork/types'
|
|
11
|
+
import type { HTTPMethod, LocalHook, TypeSchema } from './elysia-fork/types.js'
|
|
12
12
|
|
|
13
13
|
import { Kind, type TSchema } from '@sinclair/typebox'
|
|
14
14
|
|
|
@@ -418,7 +418,8 @@ export const openapi = <Path extends string = '/openapi'>({
|
|
|
418
418
|
|
|
419
419
|
function getJsonSchema(schema: TypeSchema): JSONSchemaType<any> {
|
|
420
420
|
if (isZodSchema(schema)) {
|
|
421
|
-
let
|
|
421
|
+
let fn = zodToJsonSchema.default ?? zodToJsonSchema
|
|
422
|
+
let jsonSchema = fn(schema, {})
|
|
422
423
|
return jsonSchema as any
|
|
423
424
|
}
|
|
424
425
|
|
package/src/spiceflow.test.ts
CHANGED
package/src/spiceflow.ts
CHANGED
|
@@ -44,22 +44,25 @@ import { ValidationError } from './elysia-fork/error.js'
|
|
|
44
44
|
import { zodToJsonSchema } from 'zod-to-json-schema'
|
|
45
45
|
import { z, ZodType } from 'zod'
|
|
46
46
|
|
|
47
|
-
const ajv = addFormats
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
47
|
+
const ajv = (addFormats.default || addFormats)(
|
|
48
|
+
new (Ajv.default || Ajv)({ useDefaults: true }),
|
|
49
|
+
[
|
|
50
|
+
'date-time',
|
|
51
|
+
'time',
|
|
52
|
+
'date',
|
|
53
|
+
'email',
|
|
54
|
+
'hostname',
|
|
55
|
+
'ipv4',
|
|
56
|
+
'ipv6',
|
|
57
|
+
'uri',
|
|
58
|
+
'uri-reference',
|
|
59
|
+
'uuid',
|
|
60
|
+
'uri-template',
|
|
61
|
+
'json-pointer',
|
|
62
|
+
'relative-json-pointer',
|
|
63
|
+
'regex',
|
|
64
|
+
],
|
|
65
|
+
)
|
|
63
66
|
|
|
64
67
|
// Should be exported from `hono/router`
|
|
65
68
|
|
package/src/stream.test.ts
CHANGED
|
@@ -2,9 +2,9 @@ import { describe, it, expect } from 'vitest'
|
|
|
2
2
|
|
|
3
3
|
import { createParser } from 'eventsource-parser'
|
|
4
4
|
|
|
5
|
-
import { Spiceflow } from './spiceflow'
|
|
5
|
+
import { Spiceflow } from './spiceflow.js'
|
|
6
6
|
|
|
7
|
-
import { req, sleep } from './utils'
|
|
7
|
+
import { req, sleep } from './utils.js'
|
|
8
8
|
|
|
9
9
|
function textEventStream(items: string[]) {
|
|
10
10
|
return items
|
package/src/zod.test.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { test, describe, expect } from 'vitest'
|
|
2
2
|
import { Type } from '@sinclair/typebox'
|
|
3
|
-
import { Spiceflow } from './spiceflow'
|
|
4
|
-
import { req } from './utils'
|
|
3
|
+
import { Spiceflow } from './spiceflow.js'
|
|
4
|
+
import { req } from './utils.js'
|
|
5
5
|
import { z } from 'zod'
|
|
6
6
|
|
|
7
7
|
test('body is parsed as json', async () => {
|