(
serverPath: ServerPath,
directory?: string,
input?: {
password?: string
username?: string
headers?: Record<string, string>
workspaceID?: string
onRequest?: (request: Request) => void
},
)
| 58 | type TestScope = Scope.Scope | TestServices |
| 59 | |
| 60 | function client( |
| 61 | serverPath: ServerPath, |
| 62 | directory?: string, |
| 63 | input?: { |
| 64 | password?: string |
| 65 | username?: string |
| 66 | headers?: Record<string, string> |
| 67 | workspaceID?: string |
| 68 | onRequest?: (request: Request) => void |
| 69 | }, |
| 70 | ) { |
| 71 | return serverFetch(serverPath, input).pipe( |
| 72 | Effect.map((fetch) => |
| 73 | createOpencodeClient({ |
| 74 | baseUrl: "http://localhost", |
| 75 | directory, |
| 76 | experimental_workspaceID: input?.workspaceID, |
| 77 | headers: input?.headers, |
| 78 | fetch, |
| 79 | }), |
| 80 | ), |
| 81 | ) |
| 82 | } |
| 83 | |
| 84 | function serverFetch( |
| 85 | serverPath: ServerPath, |
no test coverage detected