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

Function compareConnectionGroups

packages/plugins/toolkits/src/page.tsx:238–246  ·  view source on GitHub ↗
(a: ToolkitConnectionGroup, b: ToolkitConnectionGroup)

Source from the content-addressed store, hash-verified

236const connectionPatternForTool = (tool: ToolRow): string => `${policyPrefixForTool(tool)}.*`;
237
238const compareConnectionGroups = (a: ToolkitConnectionGroup, b: ToolkitConnectionGroup): number => {
239 const ownerRank = (owner: Owner) => (owner === "org" ? 0 : 1);
240 return (
241 ownerRank(a.owner) - ownerRank(b.owner) ||
242 a.integration.localeCompare(b.integration) ||
243 a.connection.localeCompare(b.connection) ||
244 a.id.localeCompare(b.id)
245 );
246};
247
248const patternSubsumes = (candidate: string, covered: string): boolean => {
249 if (candidate === covered) return true;

Callers

nothing calls this directly

Calls 1

ownerRankFunction · 0.70

Tested by

no test coverage detected