(src: UvLockPackageSource | undefined)
| 53 | } |
| 54 | |
| 55 | function mapSource(src: UvLockPackageSource | undefined): { |
| 56 | source?: string; |
| 57 | sourceUrl?: string; |
| 58 | } { |
| 59 | if (!src) return {}; |
| 60 | if (src.virtual) return {}; |
| 61 | if (src.registry) { |
| 62 | try { |
| 63 | const url = new URL(src.registry); |
| 64 | return { source: 'registry', sourceUrl: url.origin }; |
| 65 | } catch { |
| 66 | return { source: 'registry', sourceUrl: src.registry }; |
| 67 | } |
| 68 | } |
| 69 | if (src.git) return { source: 'git', sourceUrl: src.git }; |
| 70 | if (src.url) return { source: 'url', sourceUrl: src.url }; |
| 71 | if (src.editable) return { source: 'editable', sourceUrl: src.editable }; |
| 72 | if (src.path) return { source: 'path', sourceUrl: src.path }; |
| 73 | return {}; |
| 74 | } |
| 75 | |
| 76 | /** |
| 77 | * Generate and write the project manifest to `.vercel/python/package-manifest.json`. |
no outgoing calls
no test coverage detected