MCPcopy Create free account
hub / github.com/heygen-com/hyperframes / requireStack

Function requireStack

packages/cli/src/commands/lambda/state.ts:85–99  ·  view source on GitHub ↗
(stackName: string, cwd: string = process.cwd())

Source from the content-addressed store, hash-verified

83 * hint is consistent.
84 */
85export function requireStack(stackName: string, cwd: string = process.cwd()): StackOutputs {
86 const stack = readStackOutputs(stackName, cwd);
87 if (!stack) {
88 const known = listStackNames(cwd);
89 let hint = `Run \`hyperframes lambda deploy${stackName === DEFAULT_STACK_NAME ? "" : ` --stack-name=${stackName}`}\` first.`;
90 if (known.length) {
91 hint += ` Known stacks here: ${known.join(", ")}.`;
92 }
93 console.error(
94 `[hyperframes lambda] no stack state for "${stackName}" at ${stateFilePath(stackName, cwd)}. ${hint}`,
95 );
96 process.exit(1);
97 }
98 return stack;
99}

Callers 5

runRenderBatchFunction · 0.85
runRenderFunction · 0.85
runDestroyFunction · 0.85
runSitesCreateFunction · 0.85
runProgressFunction · 0.85

Calls 4

readStackOutputsFunction · 0.85
listStackNamesFunction · 0.85
stateFilePathFunction · 0.85
errorMethod · 0.80

Tested by

no test coverage detected