( origin: string, lockfile: LockfileManifest, )
| 133 | } |
| 134 | |
| 135 | export function convertLockfileToSkypackImportMap( |
| 136 | origin: string, |
| 137 | lockfile: LockfileManifest, |
| 138 | ): ImportMap { |
| 139 | const result = {imports: {}}; |
| 140 | for (const [key, val] of Object.entries(lockfile.lock)) { |
| 141 | result.imports[key.replace(/\#.*/, '')] = origin + '/' + val; |
| 142 | result.imports[key.replace(/\#.*/, '') + '/'] = origin + '/' + val + '/'; |
| 143 | } |
| 144 | return result; |
| 145 | } |
| 146 | |
| 147 | export function convertSkypackImportMapToLockfile( |
| 148 | dependencies: Record<string, string>, |
no outgoing calls
no test coverage detected