MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / list

Function list

packages/plugins/toolkits/src/server.ts:233–247  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

231 const storage = ctx.storage;
232
233 const list = () =>
234 storage.toolkits
235 .query({ orderBy: [{ field: "name" }] })
236 .pipe(
237 Effect.map((entries) =>
238 entries
239 .map(toolkitToResponse)
240 .sort(
241 (a, b) =>
242 (a.owner === b.owner ? 0 : a.owner === "org" ? -1 : 1) ||
243 a.name.localeCompare(b.name) ||
244 a.slug.localeCompare(b.slug),
245 ),
246 ),
247 );
248
249 const getEntry = (toolkitId: string) => storage.toolkits.get({ key: toolkitId });
250

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected