MCPcopy
hub / github.com/wasp-lang/wasp / cmd

Function cmd

waspc/data/packages/deploy/src/providers/fly/commands/cmd/cmd.ts:15–37  ·  view source on GitHub ↗
(
  flyctlArgs: string[],
  cmdOptions: CmdCmdOptions,
)

Source from the content-addressed store, hash-verified

13// Runs a command by copying down the project toml files, executing it, and copying it back up (just in case).
14// If the toml file does not exist, some commands will not run with additional args (e.g. -a <appname>).
15export async function cmd(
16 flyctlArgs: string[],
17 cmdOptions: CmdCmdOptions,
18): Promise<void> {
19 if (cmdOptions.org) {
20 flyctlArgs.push("--org", cmdOptions.org);
21 }
22
23 waspSays(
24 `Running ${cmdOptions.context} command: flyctl ${flyctlArgs.join(" ")}`,
25 );
26
27 await ensureWaspProjectIsBuilt(cmdOptions);
28
29 const tomlFilePaths = getTomlFilePaths(cmdOptions);
30 const commonOps = getCommonOps(
31 cmdOptions.context,
32 cmdOptions.waspProjectDir,
33 tomlFilePaths,
34 );
35
36 await runFlyctlCommand(commonOps, flyctlArgs);
37}
38
39async function runFlyctlCommand(
40 commonOps: CommonOps,

Callers

nothing calls this directly

Calls 4

waspSaysFunction · 0.85
getTomlFilePathsFunction · 0.85
getCommonOpsFunction · 0.85
runFlyctlCommandFunction · 0.85

Tested by

no test coverage detected