()
| 59 | } |
| 60 | |
| 61 | export const getPlatform = () => { |
| 62 | const platform = import.meta.env.PLATFORM |
| 63 | |
| 64 | if (platform === 'darwin') { |
| 65 | return 'mac' |
| 66 | } |
| 67 | |
| 68 | if (platform === 'win32') { |
| 69 | return 'windows' |
| 70 | } |
| 71 | |
| 72 | return 'linux' |
| 73 | } |
| 74 | |
| 75 | export const isPathSafe = (basePath: string, filePath: string): boolean => { |
| 76 | return path.resolve(basePath, filePath).startsWith(path.resolve(basePath)) |
no outgoing calls
no test coverage detected