MCPcopy Create free account
hub / github.com/freecodexyz/free-code / parsePluginId

Function parsePluginId

src/utils/plugins/pluginInstallationHelpers.ts:264–276  ·  view source on GitHub ↗
(
  pluginId: string,
)

Source from the content-addressed store, hash-verified

262 * @returns Parsed components or null if invalid
263 */
264export function parsePluginId(
265 pluginId: string,
266): { name: string; marketplace: string } | null {
267 const parts = pluginId.split('@')
268 if (parts.length !== 2 || !parts[0] || !parts[1]) {
269 return null
270 }
271
272 return {
273 name: parts[0],
274 marketplace: parts[1],
275 }
276}
277
278/**
279 * Structured result from the install core. Wrappers format messages and

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected