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

Function addSourceIdForOwner

packages/core/sdk/src/migration-spec.ts:1309–1314  ·  view source on GitHub ↗
(owner: OwnerKeys | null, sourceId: string)

Source from the content-addressed store, hash-verified

1307 const slugMap = new Map<string, string>();
1308 const sourceIdsByTenant = new Map<string, Set<string>>();
1309 const addSourceIdForOwner = (owner: OwnerKeys | null, sourceId: string): void => {
1310 if (!owner) return;
1311 const set = sourceIdsByTenant.get(owner.tenant) ?? new Set<string>();
1312 set.add(sourceId);
1313 sourceIdsByTenant.set(owner.tenant, set);
1314 };
1315 for (const id of input.toolSourceIds) slugMap.set(id, id);
1316 for (const source of input.sources) {
1317 slugMap.set(source.id, source.id);

Callers 1

planMigrationFunction · 0.85

Calls 2

setMethod · 0.80
getMethod · 0.65

Tested by

no test coverage detected