import type { ShadowBinOptions, ShadowBinResult } from '../shadow/npm-base.mts'; import type { CResult } from '../types.mts'; import type { SpawnExtra } from '@socketsecurity/registry/lib/spawn'; export type DlxOptions = ShadowBinOptions & { force?: boolean | undefined; agent?: 'npm' | 'pnpm' | 'yarn' | undefined; silent?: boolean | undefined; }; export type DlxPackageSpec = { name: string; version: string; }; /** * Spawns a package using dlx-style execution (npx/pnpm dlx/yarn dlx). * Automatically detects the appropriate package manager if not specified. * Uses force/update flags to ensure the latest version within the range is fetched. */ export declare function spawnDlx(packageSpec: DlxPackageSpec, args: string[] | readonly string[], options?: DlxOptions | undefined, spawnExtra?: SpawnExtra | undefined): Promise; export type CoanaDlxOptions = DlxOptions & { coanaVersion?: string | undefined; }; /** * Helper to spawn coana with dlx. * Automatically uses force and silent when version is not pinned exactly. * Returns a CResult with stdout extraction for backward compatibility. * * If SOCKET_CLI_COANA_LOCAL_PATH environment variable is set, uses the local * Coana CLI at that path instead of downloading from npm. * * If the dlx path fails (e.g. broken `npx` on the host), falls back to * `npm install`-ing @coana-tech/cli into a temp directory and invoking it * directly via `node`. The fallback can be disabled with * SOCKET_CLI_COANA_DISABLE_NPM_FALLBACK or forced as the primary path with * SOCKET_CLI_COANA_FORCE_NPM_INSTALL. */ export declare function spawnCoanaDlx(args: string[] | readonly string[], orgSlug?: string, options?: CoanaDlxOptions | undefined, spawnExtra?: SpawnExtra | undefined): Promise>; /** * Helper to spawn cdxgen with dlx. */ export declare function spawnCdxgenDlx(args: string[] | readonly string[], options?: DlxOptions | undefined, spawnExtra?: SpawnExtra | undefined): Promise; /** * Helper to spawn synp with dlx. */ export declare function spawnSynpDlx(args: string[] | readonly string[], options?: DlxOptions | undefined, spawnExtra?: SpawnExtra | undefined): Promise; //# sourceMappingURL=dlx.d.mts.map