MCPcopy Index your code
hub / github.com/chartbrew/chartbrew / getSourceForConnection

Function getSourceForConnection

server/sources/index.js:67–77  ·  view source on GitHub ↗
(connection)

Source from the content-addressed store, hash-verified

65}
66
67function getSourceForConnection(connection) {
68 const sourceId = connection?.subType || connection?.type;
69 const source = sources.find((item) => item.id === sourceId)
70 || sources.find((item) => item.type === connection?.type && !item.subType);
71
72 if (!source) {
73 throw new Error(`Unsupported connection source: ${sourceId}`);
74 }
75
76 return source;
77}
78
79function findSourceForConnection(connection) {
80 const sourceId = connection?.subType || connection?.type;

Callers 3

testQuery.jsFile · 0.50
ConnectionRoute.jsFile · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected