mirror of
https://github.com/anomalyco/opencode.git
synced 2026-05-08 01:52:33 +00:00
chore: generate
This commit is contained in:
parent
dddfcbf0d8
commit
29b1060c67
5 changed files with 23 additions and 25 deletions
|
|
@ -69,10 +69,13 @@ const runtime = HttpRouter.middleware()(
|
|||
),
|
||||
).layer
|
||||
|
||||
const cors = HttpRouter.middleware(HttpMiddleware.cors({
|
||||
allowedOrigins: isAllowedCorsOrigin,
|
||||
maxAge: 86_400,
|
||||
}), { global: true })
|
||||
const cors = HttpRouter.middleware(
|
||||
HttpMiddleware.cors({
|
||||
allowedOrigins: isAllowedCorsOrigin,
|
||||
maxAge: 86_400,
|
||||
}),
|
||||
{ global: true },
|
||||
)
|
||||
|
||||
const rootApiRoutes = HttpApiBuilder.layer(RootHttpApi).pipe(Layer.provide([controlHandlers, globalHandlers]))
|
||||
const instanceApiRoutes = HttpApiBuilder.layer(InstanceHttpApi).pipe(
|
||||
|
|
|
|||
|
|
@ -214,7 +214,9 @@ describe("HttpApi instance context middleware", () => {
|
|||
yield* serveDisposeProbe()
|
||||
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(yield* response.json).toBe(true)
|
||||
|
|
|
|||
|
|
@ -47,12 +47,7 @@ const passthroughInstanceContext = Layer.succeed(
|
|||
const testWorkspaceRouting = Layer.succeed(
|
||||
WorkspaceRoutingMiddleware,
|
||||
WorkspaceRoutingMiddleware.of((effect) =>
|
||||
effect.pipe(
|
||||
Effect.provideService(
|
||||
WorkspaceRouteContext,
|
||||
WorkspaceRouteContext.of({ directory: process.cwd() }),
|
||||
),
|
||||
),
|
||||
effect.pipe(Effect.provideService(WorkspaceRouteContext, WorkspaceRouteContext.of({ directory: process.cwd() }))),
|
||||
),
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -235,11 +235,15 @@ describe("session HttpApi", () => {
|
|||
const effect = yield* createSession(tmp.path, { title: "effect" })
|
||||
const body = JSON.stringify({ time: { archived: -1 } })
|
||||
|
||||
const legacyResponse = yield* requestWithBackend(false, pathFor(SessionPaths.update, { sessionID: legacy.id }), {
|
||||
method: "PATCH",
|
||||
headers,
|
||||
body,
|
||||
})
|
||||
const legacyResponse = yield* requestWithBackend(
|
||||
false,
|
||||
pathFor(SessionPaths.update, { sessionID: legacy.id }),
|
||||
{
|
||||
method: "PATCH",
|
||||
headers,
|
||||
body,
|
||||
},
|
||||
)
|
||||
expect(legacyResponse.status).toBe(200)
|
||||
expect((yield* json<Session.Info>(legacyResponse)).time.archived).toBe(-1)
|
||||
|
||||
|
|
|
|||
|
|
@ -10341,9 +10341,7 @@
|
|||
"maximum": 9007199254740991
|
||||
},
|
||||
"archived": {
|
||||
"type": "integer",
|
||||
"minimum": 0,
|
||||
"maximum": 9007199254740991
|
||||
"type": "number"
|
||||
}
|
||||
},
|
||||
"required": ["created", "updated"]
|
||||
|
|
@ -10854,9 +10852,7 @@
|
|||
"archived": {
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "integer",
|
||||
"minimum": 0,
|
||||
"maximum": 9007199254740991
|
||||
"type": "number"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
|
|
@ -12773,9 +12769,7 @@
|
|||
"maximum": 9007199254740991
|
||||
},
|
||||
"archived": {
|
||||
"type": "integer",
|
||||
"minimum": 0,
|
||||
"maximum": 9007199254740991
|
||||
"type": "number"
|
||||
}
|
||||
},
|
||||
"required": ["created", "updated"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue