chore: generate
This commit is contained in:
@@ -96,10 +96,7 @@ function createHttpApi(corsOptions?: CorsOptions) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function createHono(
|
function createHono(opts: CorsOptions, selection: ServerBackend.Selection = ServerBackend.force(select(), "hono")) {
|
||||||
opts: CorsOptions,
|
|
||||||
selection: ServerBackend.Selection = ServerBackend.force(select(), "hono"),
|
|
||||||
) {
|
|
||||||
const backendAttributes = ServerBackend.attributes(selection)
|
const backendAttributes = ServerBackend.attributes(selection)
|
||||||
const app = new Hono()
|
const app = new Hono()
|
||||||
.onError(ErrorMiddleware)
|
.onError(ErrorMiddleware)
|
||||||
|
|||||||
@@ -66,9 +66,7 @@ describe("HttpApi CORS", () => {
|
|||||||
it.live("uses custom CORS origins passed to the server", () =>
|
it.live("uses custom CORS origins passed to the server", () =>
|
||||||
Effect.gen(function* () {
|
Effect.gen(function* () {
|
||||||
const listener = yield* Effect.acquireRelease(
|
const listener = yield* Effect.acquireRelease(
|
||||||
Effect.promise(() =>
|
Effect.promise(() => Server.listen({ hostname: "127.0.0.1", port: 0, cors: ["https://custom.example"] })),
|
||||||
Server.listen({ hostname: "127.0.0.1", port: 0, cors: ["https://custom.example"] }),
|
|
||||||
),
|
|
||||||
(listener) => Effect.promise(() => listener.stop(true)),
|
(listener) => Effect.promise(() => listener.stop(true)),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user