MCPcopy Create free account
hub / github.com/Noumena-Network/code / saveMarketplaceJsonToZipCache

Function saveMarketplaceJsonToZipCache

src/utils/plugins/zipCacheAdapters.ts:100–113  ·  view source on GitHub ↗
(
  marketplaceName: string,
  installLocation: string,
)

Source from the content-addressed store, hash-verified

98 * Save a marketplace JSON to the zip cache from its install location.
99 */
100export 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.

Callers 1

Calls 4

getPluginZipCachePathFunction · 0.85
atomicWriteToZipCacheFunction · 0.85

Tested by

no test coverage detected