UNPKG

@storm-software/workspace-tools

Version:

Tools for managing a Storm workspace, including various Nx generators and executors for common development tasks.

120 lines (107 loc) 2.44 kB
import { ExecutorContext } from '@nx/devkit'; import { CargoMetadata, Package, Dependency } from '@storm-software/config-tools/utilities/toml'; import { StdioOptions, ChildProcess } from 'node:child_process'; // Generated by @storm-software/untyped // Do not edit this file directly interface CargoBaseExecutorSchema { /** * Output Path * * The output path for the build * * @default "dist/{projectRoot}" * * @format path */ outputPath?: string, /** * Cargo.toml Path * * The path to the Cargo.toml file * * @default "{projectRoot}/Cargo.toml" * * @format path */ package?: string, /** * Toolchain * * The type of toolchain to use for the build * * @default "stable" * * @enum stable,beta,nightly */ toolchain?: string, /** * Target * * The target to build * */ target?: string, /** * All Targets * * Build all targets * */ allTargets?: boolean, /** * Profile * * The profile to build * */ profile?: string, /** * Release * * Build in release mode * */ release?: boolean, /** * Features * * The features to build * * * @oneOf [object Object],[object Object] */ features?: string, /** * All Features * * Build all features * */ allFeatures?: boolean, } interface CargoRun { success: boolean; output: string; } interface RunCargoOptions { stdio: StdioOptions; env: NodeJS.ProcessEnv | undefined; } declare const INVALID_CARGO_ARGS: string[]; declare let childProcess: ChildProcess | null; declare const buildCargoCommand: (baseCommand: string, options: CargoBaseExecutorSchema, context: ExecutorContext) => string[]; declare function cargoCommand(workspaceRoot: string, ...args: string[]): Promise<{ success: boolean; }>; declare function cargoRunCommand(...args: string[]): Promise<{ success: boolean; }>; declare function cargoCommandSync(args?: string, options?: Partial<RunCargoOptions>): CargoRun; declare function cargoMetadata(): CargoMetadata | null; declare function isExternal(packageOrDep: Package | Dependency, workspaceRoot: string): any; declare function runProcess(workspaceRoot: string, processCmd: string, ...args: string[]): { success: boolean; } | PromiseLike<{ success: boolean; }>; export { INVALID_CARGO_ARGS, buildCargoCommand, cargoCommand, cargoCommandSync, cargoMetadata, cargoRunCommand, childProcess, isExternal, runProcess };