MCPcopy Create free account
hub / github.com/SmartThingsCommunity/smartthings-cli / getKnownHubs

Function getKnownHubs

src/lib/command/util/hub-drivers.ts:68–77  ·  view source on GitHub ↗
(
		knownHubsPath: string,
)

Source from the content-addressed store, hash-verified

66}
67
68export const getKnownHubs = async (
69 knownHubsPath: string,
70): Promise<Partial<Record<string, KnownHub>>> => {
71 try {
72 return JSON.parse(await fs.readFile(knownHubsPath, 'utf-8'))
73 } catch (error) {
74 if (error.code !== 'ENOENT') { throw error }
75 }
76 return {}
77}
78
79export const checkServerIdentity = async (
80 command: SmartThingsCommand,

Callers 2

checkServerIdentityFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected