feat(ext/sw): GitHost.writeFileCreateOnly() refuses to overwrite
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -11,6 +11,11 @@ export interface GitHost {
|
||||
/// Create or update a file in the repo with a commit message.
|
||||
writeFile(path: string, content: Uint8Array, message: string): Promise<void>;
|
||||
|
||||
/// Like writeFile, but throws if the file already exists. Used by setup
|
||||
/// wizard to refuse to clobber existing vault state. Implementation must
|
||||
/// pre-check existence and only POST/PUT-create — never include a sha.
|
||||
writeFileCreateOnly(path: string, content: Uint8Array, message: string): Promise<void>;
|
||||
|
||||
/// Delete a file from the repo with a commit message.
|
||||
deleteFile(path: string, message: string): Promise<void>;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user