修改问题

This commit is contained in:
lenmotion 2026-04-24 10:58:11 +08:00
parent 7469ded0de
commit 600c8b2e30

View File

@ -437,12 +437,6 @@ function normalizeMockFilePath(filePath: string): string {
if (path.isAbsolute(relative)) { if (path.isAbsolute(relative)) {
throw new Error("filePath must be a relative path"); throw new Error("filePath must be a relative path");
} }
const innerPath = relative.replace(/^mock\//, "");
if (!/^[A-Za-z0-9/.]+$/.test(innerPath)) {
throw new Error(
"filePath only allows English letters, numbers, '/', and '.'",
);
}
return relative; return relative;
} }