(cwd: string = process.cwd())
| 70 | } |
| 71 | |
| 72 | export function listStackNames(cwd: string = process.cwd()): string[] { |
| 73 | const dir = join(cwd, STATE_DIR_NAME); |
| 74 | if (!existsSync(dir)) return []; |
| 75 | return readdirSync(dir) |
| 76 | .filter((f) => f.startsWith(STATE_FILE_PREFIX) && f.endsWith(".json")) |
| 77 | .map((f) => f.slice(STATE_FILE_PREFIX.length, -".json".length)); |
| 78 | } |
| 79 | |
| 80 | /** |
| 81 | * Read stack outputs or print a helpful error and exit. Shared between |
no outgoing calls
no test coverage detected