@augment-vir/node
Version:
A collection of augments, helpers types, functions, and classes only for Node.js (backend) JavaScript environments.
27 lines (26 loc) • 993 B
TypeScript
/** This file cannot be tested because it calls `process.exit`. */
/**
* A map of file extensions to their known runners for {@link runCliScript}.
*
* @category Node : Terminal : Util
* @category Package : @augment-vir/node
* @package [`@augment-vir/node`](https://www.npmjs.com/package/@augment-vir/node)
*/
export declare const ExtensionToRunner: Record<string, string | {
npx: string;
}>;
/**
* Runs a script path as if it had been run directly, as much as possible.
*
* @category Node : Terminal : Util
* @category Package : @augment-vir/node
* @package [`@augment-vir/node`](https://www.npmjs.com/package/@augment-vir/node)
*/
export declare function runCliScript(scriptPath: string,
/** This should just be `__filename` (for CJS) or `import.meta.filename` (for ESM). */
cliScriptFilePath: string,
/**
* This should be the bin name of the package that is calling this function. Set to `undefined`
* if there isn't one.
*/
binName: string | undefined): Promise<void>;