( marketplaceName: string, installLocation: string, )
| 98 | * Save a marketplace JSON to the zip cache from its install location. |
| 99 | */ |
| 100 | export async function saveMarketplaceJsonToZipCache( |
| 101 | marketplaceName: string, |
| 102 | installLocation: string, |
| 103 | ): Promise<void> { |
| 104 | const zipCachePath = getPluginZipCachePath() |
| 105 | if (!zipCachePath) { |
| 106 | return |
| 107 | } |
| 108 | const content = await readMarketplaceJsonContent(installLocation) |
| 109 | if (content !== null) { |
| 110 | const relPath = getMarketplaceJsonRelativePath(marketplaceName) |
| 111 | await atomicWriteToZipCache(join(zipCachePath, relPath), content) |
| 112 | } |
| 113 | } |
| 114 | |
| 115 | /** |
| 116 | * Read marketplace.json content from a cloned marketplace directory or file. |
no test coverage detected