create-nx-workspace
Version:
26 lines • 1.18 kB
TypeScript
/**
* Error codes for CNW errors.
* These are used for telemetry and error tracking.
*/
export type CnwErrorCode = 'DIRECTORY_EXISTS' | 'INVALID_WORKSPACE_NAME' | 'INVALID_FOLDER_NAME' | 'INVALID_BRANCH_NAME' | 'INVALID_PACKAGE_MANAGER' | 'INVALID_PRESET' | 'INVALID_WORKSPACE_TYPE' | 'INVALID_APP_NAME' | 'PRESET_FAILED' | 'SANDBOX_FAILED' | 'TEMPLATE_CLONE_FAILED' | 'CI_WORKFLOW_FAILED' | 'WORKSPACE_CREATION_FAILED' | 'ANGULAR_PREFIX_INVALID' | 'UNKNOWN';
/**
* Custom error class for CNW errors.
* Used for structured error reporting and telemetry.
*/
export declare class CnwError extends Error {
readonly code: CnwErrorCode;
readonly logFile?: string;
readonly exitCode?: number;
constructor(code: CnwErrorCode, message: string, logFile?: string, exitCode?: number);
}
/**
* @deprecated Use CnwError instead
*/
export declare class CreateNxWorkspaceError extends Error {
logMessage: string;
code: number | null | undefined;
logFile: string;
constructor(logMessage: string, code: number | null | undefined, logFile: string);
}
export declare function mapErrorToBodyLines(error: Error): string[];
//# sourceMappingURL=error-utils.d.ts.map