exec.ts — astro Source File
Architecture documentation for exec.ts, a typescript file in the astro codebase. 1 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR cb5e589f_648f_13de_9bb2_bc601536a651["exec.ts"] 015e2115_00b7_8619_a3f3_dc6eceb4c058["tinyexec"] cb5e589f_648f_13de_9bb2_bc601536a651 --> 015e2115_00b7_8619_a3f3_dc6eceb4c058 style cb5e589f_648f_13de_9bb2_bc601536a651 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import { NonZeroExitError, type Options, x } from 'tinyexec';
/**
* Improve tinyexec error logging and set `throwOnError` to `true` by default
* @deprecated use CommandExecutor instead
*/
export function exec(command: string, args?: string[], options?: Partial<Options>) {
return x(command, args, {
throwOnError: true,
...options,
}).then(
(o) => o,
(e) => {
if (e instanceof NonZeroExitError) {
const fullCommand = args?.length
? `${command} ${args.map((a) => (a.includes(' ') ? `"${a}"` : a)).join(' ')}`
: command;
const message = `The command \`${fullCommand}\` exited with code ${e.exitCode}`;
const newError = new Error(message, e.cause ? { cause: e.cause } : undefined);
(newError as any).stderr = e.output?.stderr;
(newError as any).stdout = e.output?.stdout;
throw newError;
}
throw e;
},
);
}
Domain
Subdomains
Functions
Dependencies
- tinyexec
Source
Frequently Asked Questions
What does exec.ts do?
exec.ts is a source file in the astro codebase, written in typescript. It belongs to the CoreAstro domain, RenderingEngine subdomain.
What functions are defined in exec.ts?
exec.ts defines 1 function(s): exec.
What does exec.ts depend on?
exec.ts imports 1 module(s): tinyexec.
Where is exec.ts in the architecture?
exec.ts is located at packages/astro/src/cli/exec.ts (domain: CoreAstro, subdomain: RenderingEngine, directory: packages/astro/src/cli).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free