chore: generate
This commit is contained in:
@@ -69,10 +69,13 @@ const runtime = HttpRouter.middleware()(
|
|||||||
),
|
),
|
||||||
).layer
|
).layer
|
||||||
|
|
||||||
const cors = HttpRouter.middleware(HttpMiddleware.cors({
|
const cors = HttpRouter.middleware(
|
||||||
allowedOrigins: isAllowedCorsOrigin,
|
HttpMiddleware.cors({
|
||||||
maxAge: 86_400,
|
allowedOrigins: isAllowedCorsOrigin,
|
||||||
}), { global: true })
|
maxAge: 86_400,
|
||||||
|
}),
|
||||||
|
{ global: true },
|
||||||
|
)
|
||||||
|
|
||||||
const rootApiRoutes = HttpApiBuilder.layer(RootHttpApi).pipe(Layer.provide([controlHandlers, globalHandlers]))
|
const rootApiRoutes = HttpApiBuilder.layer(RootHttpApi).pipe(Layer.provide([controlHandlers, globalHandlers]))
|
||||||
const instanceApiRoutes = HttpApiBuilder.layer(InstanceHttpApi).pipe(
|
const instanceApiRoutes = HttpApiBuilder.layer(InstanceHttpApi).pipe(
|
||||||
|
|||||||
@@ -214,7 +214,9 @@ describe("HttpApi instance context middleware", () => {
|
|||||||
yield* serveDisposeProbe()
|
yield* serveDisposeProbe()
|
||||||
const disposed = yield* waitDisposedEvent.pipe(Effect.forkScoped)
|
const disposed = yield* waitDisposedEvent.pipe(Effect.forkScoped)
|
||||||
|
|
||||||
const response = yield* HttpClientRequest.post(`/dispose-probe?workspace=${workspace.id}`).pipe(HttpClient.execute)
|
const response = yield* HttpClientRequest.post(`/dispose-probe?workspace=${workspace.id}`).pipe(
|
||||||
|
HttpClient.execute,
|
||||||
|
)
|
||||||
|
|
||||||
expect(response.status).toBe(200)
|
expect(response.status).toBe(200)
|
||||||
expect(yield* response.json).toBe(true)
|
expect(yield* response.json).toBe(true)
|
||||||
|
|||||||
@@ -47,12 +47,7 @@ const passthroughInstanceContext = Layer.succeed(
|
|||||||
const testWorkspaceRouting = Layer.succeed(
|
const testWorkspaceRouting = Layer.succeed(
|
||||||
WorkspaceRoutingMiddleware,
|
WorkspaceRoutingMiddleware,
|
||||||
WorkspaceRoutingMiddleware.of((effect) =>
|
WorkspaceRoutingMiddleware.of((effect) =>
|
||||||
effect.pipe(
|
effect.pipe(Effect.provideService(WorkspaceRouteContext, WorkspaceRouteContext.of({ directory: process.cwd() }))),
|
||||||
Effect.provideService(
|
|
||||||
WorkspaceRouteContext,
|
|
||||||
WorkspaceRouteContext.of({ directory: process.cwd() }),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -235,11 +235,15 @@ describe("session HttpApi", () => {
|
|||||||
const effect = yield* createSession(tmp.path, { title: "effect" })
|
const effect = yield* createSession(tmp.path, { title: "effect" })
|
||||||
const body = JSON.stringify({ time: { archived: -1 } })
|
const body = JSON.stringify({ time: { archived: -1 } })
|
||||||
|
|
||||||
const legacyResponse = yield* requestWithBackend(false, pathFor(SessionPaths.update, { sessionID: legacy.id }), {
|
const legacyResponse = yield* requestWithBackend(
|
||||||
method: "PATCH",
|
false,
|
||||||
headers,
|
pathFor(SessionPaths.update, { sessionID: legacy.id }),
|
||||||
body,
|
{
|
||||||
})
|
method: "PATCH",
|
||||||
|
headers,
|
||||||
|
body,
|
||||||
|
},
|
||||||
|
)
|
||||||
expect(legacyResponse.status).toBe(200)
|
expect(legacyResponse.status).toBe(200)
|
||||||
expect((yield* json<Session.Info>(legacyResponse)).time.archived).toBe(-1)
|
expect((yield* json<Session.Info>(legacyResponse)).time.archived).toBe(-1)
|
||||||
|
|
||||||
|
|||||||
@@ -10341,9 +10341,7 @@
|
|||||||
"maximum": 9007199254740991
|
"maximum": 9007199254740991
|
||||||
},
|
},
|
||||||
"archived": {
|
"archived": {
|
||||||
"type": "integer",
|
"type": "number"
|
||||||
"minimum": 0,
|
|
||||||
"maximum": 9007199254740991
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"required": ["created", "updated"]
|
"required": ["created", "updated"]
|
||||||
@@ -10854,9 +10852,7 @@
|
|||||||
"archived": {
|
"archived": {
|
||||||
"anyOf": [
|
"anyOf": [
|
||||||
{
|
{
|
||||||
"type": "integer",
|
"type": "number"
|
||||||
"minimum": 0,
|
|
||||||
"maximum": 9007199254740991
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "null"
|
"type": "null"
|
||||||
@@ -12773,9 +12769,7 @@
|
|||||||
"maximum": 9007199254740991
|
"maximum": 9007199254740991
|
||||||
},
|
},
|
||||||
"archived": {
|
"archived": {
|
||||||
"type": "integer",
|
"type": "number"
|
||||||
"minimum": 0,
|
|
||||||
"maximum": 9007199254740991
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"required": ["created", "updated"]
|
"required": ["created", "updated"]
|
||||||
|
|||||||
Reference in New Issue
Block a user