refactor: rename paths

This commit is contained in:
wancat committed 2024-03-07 00:50:42 +08:00
1 parent e5f5590a67
commit b5e20766a3
12 files changed
+52 -52

No files matched your search

@@ -0,0 +1,18 @@
import { Matcher } from './Matcher.js'
import { Command } from '../types.js'
export class ErrorMatcher implements Matcher {
private matcher?: RegExp
constructor(errorPattern?: string) {
if (errorPattern) {
this.matcher = new RegExp(errorPattern)
}
}
match(command: Command): boolean {
if (!this.matcher) {
return !command.error
}
return this.matcher.test(command.error || '')
}
}