cleanup: drop leftovers from the retired HTTP-serving revision
This commit is contained in:
@@ -2362,7 +2362,6 @@ export function createFixtureApi(options: FixtureOptions = {}): ApiProxy {
|
|||||||
})
|
})
|
||||||
return Promise.resolve({ accepted: true })
|
return Promise.resolve({ accepted: true })
|
||||||
},
|
},
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ export { API_PATH } from './api-path.ts'
|
|||||||
/** Stable Cordis plugin name. */
|
/** Stable Cordis plugin name. */
|
||||||
export const name = 'client-connection'
|
export const name = 'client-connection'
|
||||||
|
|
||||||
/** Services required before mounting the routes. */
|
/** Services required before mounting the route. */
|
||||||
export const inject = ['httpServer', 'apiProxy']
|
export const inject = ['httpServer', 'apiProxy']
|
||||||
|
|
||||||
/** Plugin config: the deployment's non-loopback serving authorities. */
|
/** Plugin config: the deployment's non-loopback serving authorities. */
|
||||||
@@ -96,5 +96,4 @@ export function apply(ctx: Context, config?: ConnectionConfig): void {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
ctx.effect(() => ctx.httpServer.register(route), 'client-connection: /api route')
|
ctx.effect(() => ctx.httpServer.register(route), 'client-connection: /api route')
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -62,5 +62,4 @@ describe('connection client apply', () => {
|
|||||||
}
|
}
|
||||||
expect(seen.some(u => u.includes('/api/'))).toBe(true)
|
expect(seen.some(u => u.includes('/api/'))).toBe(true)
|
||||||
})
|
})
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -30,15 +30,11 @@ function fakeRequest(headers: Record<string, string>, url = `${API_PATH}/session
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** Response recorder compatible with both the fence's short-circuit and the bridge. */
|
/** Response recorder compatible with both the fence's short-circuit and the bridge. */
|
||||||
function fakeResponse(): { response: ServerResponse; state: { status?: number; body?: unknown; headers?: Record<string, string> } } {
|
function fakeResponse(): { response: ServerResponse; state: { status?: number; body?: unknown } } {
|
||||||
const state: { status?: number; body?: unknown; headers?: Record<string, string> } = {}
|
const state: { status?: number; body?: unknown } = {}
|
||||||
const response = Object.assign(new EventEmitter(), {
|
const response = Object.assign(new EventEmitter(), {
|
||||||
writableEnded: false,
|
writableEnded: false,
|
||||||
writeHead(value: number, headers?: Record<string, string>) {
|
writeHead(value: number) { state.status = value; return this },
|
||||||
state.status = value
|
|
||||||
if (headers !== undefined) state.headers = headers
|
|
||||||
return this
|
|
||||||
},
|
|
||||||
write() { return true },
|
write() { return true },
|
||||||
end(this: { writableEnded: boolean }, value?: unknown) {
|
end(this: { writableEnded: boolean }, value?: unknown) {
|
||||||
if (value !== undefined) state.body = value
|
if (value !== undefined) state.body = value
|
||||||
@@ -72,7 +68,8 @@ describe('connection node half', () => {
|
|||||||
|
|
||||||
it('registers the /api prefix route and removes it with the fiber', async () => {
|
it('registers the /api prefix route and removes it with the fiber', async () => {
|
||||||
const { routes, dispose } = await mounted()
|
const { routes, dispose } = await mounted()
|
||||||
expect(routes).toMatchObject([{ kind: 'prefix', path: API_PATH }])
|
expect(routes).toHaveLength(1)
|
||||||
|
expect(routes[0]).toMatchObject({ kind: 'prefix', path: API_PATH })
|
||||||
await dispose()
|
await dispose()
|
||||||
expect(routes).toHaveLength(0)
|
expect(routes).toHaveLength(0)
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -239,7 +239,6 @@ export class WorkspacesService implements IWorkspaces {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Rename a Workspace.
|
* Rename a Workspace.
|
||||||
* @param workspaceId - target workspace.
|
* @param workspaceId - target workspace.
|
||||||
|
|||||||
@@ -98,7 +98,6 @@ export class TestWorkspaces implements IWorkspaces {
|
|||||||
await (this.stubs.get('openPath')?.(path) as Promise<void> | undefined)
|
await (this.stubs.get('openPath')?.(path) as Promise<void> | undefined)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Directory picker (recorded). The default cancels (null); stub to select.
|
* Directory picker (recorded). The default cancels (null); stub to select.
|
||||||
* @returns the picked path, or null.
|
* @returns the picked path, or null.
|
||||||
|
|||||||
@@ -2,8 +2,7 @@
|
|||||||
// from the mutation tools' follow-along locations (see turnDeliverables), never
|
// from the mutation tools' follow-along locations (see turnDeliverables), never
|
||||||
// from the closing prose, so the answer carries its own output whether or not
|
// from the closing prose, so the answer carries its own output whether or not
|
||||||
// the model remembered to name it. Clicking one goes through the same openFile
|
// the model remembered to name it. Clicking one goes through the same openFile
|
||||||
// the tool rows use — in the browser that is a new tab served from the session
|
// the tool rows use — the Host's own opener, on the Host machine.
|
||||||
// workspace, and outside it the Host's own opener.
|
|
||||||
|
|
||||||
import type { ChatViewSlotProps } from '../contract/slots.ts'
|
import type { ChatViewSlotProps } from '../contract/slots.ts'
|
||||||
import css from './Deliverables.module.css'
|
import css from './Deliverables.module.css'
|
||||||
|
|||||||
Reference in New Issue
Block a user