MCPcopy Create free account
hub / github.com/decaporg/decap-cms / deleteFiles

Method deleteFiles

packages/decap-cms-backend-turbo-github/src/API.ts:213–231  ·  view source on GitHub ↗
(paths: string[], message: string)

Source from the content-addressed store, hash-verified

211 }
212
213 async deleteFiles(paths: string[], message: string): Promise<DeleteFilesResult> {
214 if (!this.turboFetch) {
215 return super.deleteFiles(paths, message);
216 }
217
218 try {
219 await this.turboCommit({
220 branch: this.branch,
221 message,
222 deletions: paths.map(path => path.replace(/^\/+/, '')),
223 });
224 return undefined;
225 } catch (error) {
226 if (this.shouldFallBack(error)) {
227 return super.deleteFiles(paths, message);
228 }
229 throw error;
230 }
231 }
232}

Callers 1

API.spec.tsFile · 0.45

Calls 4

turboCommitMethod · 0.95
shouldFallBackMethod · 0.95
mapMethod · 0.80
replaceMethod · 0.80

Tested by

no test coverage detected