chore(computer-use-mcp): remove all hardcoded file path
This commit is contained in:
@@ -3,9 +3,8 @@ import type { RouteTargetExpression } from '@proj-airi/server-shared/types'
|
||||
import type { AuthenticatedPeer } from '../../types'
|
||||
|
||||
function globToRegExp(glob: string) {
|
||||
// eslint-disable-next-line e18e/prefer-static-regex
|
||||
const escaped = glob.replace(/[.+^${}()|[\]\\]/g, '\\$&')
|
||||
// eslint-disable-next-line e18e/prefer-static-regex
|
||||
|
||||
const pattern = `^${escaped.replace(/\*/g, '.*')}$`
|
||||
return new RegExp(pattern)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user