(url: string)
| 89 | } |
| 90 | |
| 91 | function isValidGitUrl(url: string): boolean { |
| 92 | const httpsRegex = /^https:\/\/[\w.-]+(:\d+)?\/[\w.-]+\/[\w.-]+(\.git)?$/; |
| 93 | const sshRegex = /^ssh:\/\/[\w.-]+@[\w.-]+(:\d+)?\/[\w.-]+\/[\w.-]+(\.git)?$/; |
| 94 | const gitSshRegex = /^git@[\w.-]+:[\w.-]+\/[\w.-]+(\.git)?$/; |
| 95 | |
| 96 | return httpsRegex.test(url) || sshRegex.test(url) || gitSshRegex.test(url); |
| 97 | } |
| 98 | |
| 99 | export function getManifest(manifestPath: string): Manifest { |
| 100 | const data = readFileSync(manifestPath); |