MCPcopy Create free account
hub / github.com/devcontainers/cli / applyEdits

Function applyEdits

src/spec-configuration/editableFiles.ts:38–47  ·  view source on GitHub ↗
(uri: URI, edits: Edit[], content: string)

Source from the content-addressed store, hash-verified

36 },
37
38 async applyEdits(uri: URI, edits: Edit[], content: string) {
39 switch (uri.scheme) {
40 case 'file':
41 const result = jsonc.applyEdits(content, edits);
42 await writeLocalFile(uri.fsPath, result);
43 break;
44 default:
45 throw new Error(`Unsupported scheme: ${uri.toString()}`);
46 }
47 }
48};
49
50export class CLIHostDocuments implements Documents {

Callers

nothing calls this directly

Calls 1

applyEditsMethod · 0.65

Tested by

no test coverage detected