(
context: VercelContext | undefined,
args: string[],
input?: string,
options: { includeFailureOutput?: boolean } = {}
)
| 119 | const message = missingCommandMessage(command, args); |
| 120 | if (message) throw new MissingCommandError(message); |
| 121 | } |
| 122 | if ( |
| 123 | result.status !== 0 && |
| 124 | command === 'pnpm' && |
| 125 | args[0] === 'exec' && |
| 126 | args[1] === 'vercel' && |
| 127 | PNPM_MISSING_WORKSPACE_VERCEL.test(`${result.stderr}${result.stdout}`) |
| 128 | ) { |
| 129 | throw new MissingCommandError(missingWorkspaceVercelMessage()); |
| 130 | } |
| 131 | if (result.status !== 0) { |
| 132 | const operation = `${command} ${args.slice(0, 3).join(' ')}`; |
| 133 | if (command === 'op' || options.includeFailureOutput) { |
| 134 | const output = [result.stderr, result.stdout, result.error?.message] |
| 135 | .filter(Boolean) |
| 136 | .join('\n') |
| 137 | .trim(); |
| 138 | throw new Error(`${operation} failed${output ? `:\n${output}` : '.'}`); |
| 139 | } |
| 140 | throw new Error(`${operation} failed; provider output was redacted.`); |
| 141 | } |
| 142 | return result.stdout; |
| 143 | } |
| 144 | |
| 145 | function vercel( |
| 146 | context: VercelContext | undefined, |
| 147 | args: string[], |
| 148 | input?: string, |
| 149 | options: { includeFailureOutput?: boolean } = {} |
| 150 | ): string { |
| 151 | return run( |
| 152 | 'pnpm', |
| 153 | [ |
| 154 | 'exec', |
| 155 | 'vercel', |
no test coverage detected