( stackName: string = DEFAULT_STACK_NAME, cwd: string = process.cwd(), )
| 49 | } |
| 50 | |
| 51 | export function readStackOutputs( |
| 52 | stackName: string = DEFAULT_STACK_NAME, |
| 53 | cwd: string = process.cwd(), |
| 54 | ): StackOutputs | null { |
| 55 | const path = stateFilePath(stackName, cwd); |
| 56 | if (!existsSync(path)) return null; |
| 57 | try { |
| 58 | return JSON.parse(readFileSync(path, "utf-8")) as StackOutputs; |
| 59 | } catch { |
| 60 | return null; |
| 61 | } |
| 62 | } |
| 63 | |
| 64 | export function deleteStackOutputs( |
| 65 | stackName: string = DEFAULT_STACK_NAME, |
no test coverage detected