refactor(core): move server routes around to clarify workspacing (#23031)

This commit is contained in:
James Long
2026-04-17 02:06:20 -04:00
committed by GitHub
parent e7f8f7fa3b
commit 7605acff65
32 changed files with 1196 additions and 1209 deletions

View File

@@ -2,13 +2,13 @@ import { LocalContext } from "../util"
import type { WorkspaceID } from "../control-plane/schema"
export interface WorkspaceContext {
workspaceID: WorkspaceID
workspaceID: WorkspaceID | undefined
}
const context = LocalContext.create<WorkspaceContext>("instance")
export const WorkspaceContext = {
async provide<R>(input: { workspaceID: WorkspaceID; fn: () => R }): Promise<R> {
async provide<R>(input: { workspaceID?: WorkspaceID; fn: () => R }): Promise<R> {
return context.provide({ workspaceID: input.workspaceID }, () => input.fn())
},