修改问题
This commit is contained in:
parent
7469ded0de
commit
600c8b2e30
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user