(fileHost: FileHost, shellServer?: ShellServer)
| 148 | } |
| 149 | |
| 150 | export function createDocuments(fileHost: FileHost, shellServer?: ShellServer): Documents { |
| 151 | const documents: Record<string, Documents> = { |
| 152 | file: fileDocuments, |
| 153 | [CLIHostDocuments.scheme]: new CLIHostDocuments(fileHost), |
| 154 | }; |
| 155 | if (shellServer) { |
| 156 | documents[RemoteDocuments.scheme] = new RemoteDocuments(shellServer); |
| 157 | } |
| 158 | return new AllDocuments(documents); |
| 159 | } |
| 160 | |
| 161 | export interface ShellServer { |
| 162 | exec(cmd: string, options?: { logOutput?: boolean; stdin?: Buffer }): Promise<{ stdout: string; stderr: string }>; |
no outgoing calls
no test coverage detected