(error: unknown, status: number)
| 241 | } |
| 242 | |
| 243 | function errorJSON(error: unknown, status: number): Response { |
| 244 | const message = error instanceof Error ? error.message : String(error); |
| 245 | const code = (error as { code?: string }).code; |
| 246 | return new Response(JSON.stringify({ error: message, code }), { |
| 247 | status, |
| 248 | headers: { "content-type": "application/json" }, |
| 249 | }); |
| 250 | } |
| 251 | |
| 252 | function shellQuote(arg: string): string { |
| 253 | if (/^[A-Za-z0-9_\-+=:,./@%]+$/.test(arg)) return arg; |
no outgoing calls
no test coverage detected