* Checks if a compose file exists in the specified directory. * @async * @static * @param {string} stacksDir - The directory of the stack. * @param {string} filename - The name of the directory to check for the compose file. * @returns {Promise } A promise that resol
(stacksDir : string, filename : string)
| 251 | * @returns {Promise<boolean>} A promise that resolves to a boolean indicating whether any compose file exists. |
| 252 | */ |
| 253 | static async composeFileExists(stacksDir : string, filename : string) : Promise<boolean> { |
| 254 | let filenamePath = path.join(stacksDir, filename); |
| 255 | // Check if any compose file exists |
| 256 | for (const filename of acceptedComposeFileNames) { |
| 257 | let composeFile = path.join(filenamePath, filename); |
| 258 | if (await fileExists(composeFile)) { |
| 259 | return true; |
| 260 | } |
| 261 | } |
| 262 | return false; |
| 263 | } |
| 264 | |
| 265 | static async getStackList(server : DockgeServer, useCacheForManaged = false) : Promise<Map<string, Stack>> { |
| 266 | let stacksDir = server.stacksDir; |
no test coverage detected