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

Function findYAMLFilename

src/lib/file-util.ts:33–45  ·  view source on GitHub ↗
(baseName: string)

Source from the content-addressed store, hash-verified

31 await realpath(path)
32
33export const findYAMLFilename = async (baseName: string): Promise<string | false> => {
34 let retVal = `${baseName}.yaml`
35 if (await isFile(retVal)) {
36 return retVal
37 }
38
39 retVal = `${baseName}.yml`
40 if (await isFile(retVal)) {
41 return retVal
42 }
43
44 return false
45}
46
47export const requireDir = async (dirName: string): Promise<string> => {
48 if (await isDir(dirName)) {

Callers 3

processConfigFileFunction · 0.85
processOptionalYAMLFileFunction · 0.85
file-util.test.tsFile · 0.85

Calls 1

isFileFunction · 0.85

Tested by

no test coverage detected