MCPcopy Create free account
hub / github.com/Zoo-Code-Org/Zoo-Code / deleteRule

Function deleteRule

src/services/rules/rules.ts:110–117  ·  view source on GitHub ↗
(cwd: string, input: DeleteRuleInput)

Source from the content-addressed store, hash-verified

108}
109
110export async function deleteRule(cwd: string, input: DeleteRuleInput): Promise<void> {
111 const filePath = await resolveRuleFile(cwd, input)
112 if (!filePath) {
113 throw new Error("Rule file not found")
114 }
115
116 await fs.rm(filePath, { force: true })
117}
118
119export async function resolveRuleFile(cwd: string, input: RuleLookupInput): Promise<string | undefined> {
120 const directoryPath = getTargetRuleDirectory(cwd, input)

Callers 2

handleDeleteRuleFunction · 0.90
rules.spec.tsFile · 0.85

Calls 1

resolveRuleFileFunction · 0.85

Tested by

no test coverage detected