(modeSlug: string)
| 355 | } |
| 356 | |
| 357 | function validateModeSlug(modeSlug: string): string { |
| 358 | if (!/^[a-zA-Z0-9_-]+$/.test(modeSlug)) { |
| 359 | throw new Error("Invalid mode slug") |
| 360 | } |
| 361 | |
| 362 | return modeSlug |
| 363 | } |
| 364 | |
| 365 | function assertPathInsideDirectory(filePath: string, directoryPath: string): void { |
| 366 | if (!isPathInsideDirectory(path.resolve(filePath), path.resolve(directoryPath))) { |
no outgoing calls
no test coverage detected