MCPcopy Index your code
hub / github.com/cargo-lambda/cargo-lambda-cdk / isValidGitUrl

Function isValidGitUrl

src/cargo.ts:91–97  ·  view source on GitHub ↗
(url: string)

Source from the content-addressed store, hash-verified

89}
90
91function 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
99export function getManifest(manifestPath: string): Manifest {
100 const data = readFileSync(manifestPath);

Callers 1

getManifestPathFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected