/** * Domain error for `@pawells/nx-graphql` executors. * * Carries a machine-readable `code` (see {@link ExecutorError.Code}) so callers and tests can * distinguish failure modes (path traversal vs. module-not-found vs. invalid export, etc.) * programmatically instead of string-matching `error.message`. * * This package intentionally has zero `@pawells/*` runtime dependencies (see the package * `CLAUDE.md`), so it defines its own lightweight error class here rather than depending on * `@pawells/typescript-common`'s `BaseError`. * * @example * ```typescript * throw new ExecutorError('Path traversal (..) not allowed: ../etc', ExecutorError.Code.PATH_TRAVERSAL); * ``` */ export declare class ExecutorError extends Error { /** * Enumeration of executor error codes for classification and debugging. * * - `PATH_NOT_RELATIVE` — A supplied path was absolute instead of workspace-relative. * - `PATH_TRAVERSAL` — A supplied path contained `..` or resolved outside the workspace root. * - `MODULE_NOT_FOUND` — The resolvers module could not be located on disk. * - `INVALID_EXPORT` — A module's export did not match the expected shape. * - `INVALID_RESOLVER` — A resolver entry was not a class constructor. * - `UNKNOWN_TARGET` — An unsupported codegen target was requested. */ static readonly Code: Readonly<{ readonly PATH_NOT_RELATIVE: "PATH_NOT_RELATIVE"; readonly PATH_TRAVERSAL: "PATH_TRAVERSAL"; readonly MODULE_NOT_FOUND: "MODULE_NOT_FOUND"; readonly INVALID_EXPORT: "INVALID_EXPORT"; readonly INVALID_RESOLVER: "INVALID_RESOLVER"; readonly UNKNOWN_TARGET: "UNKNOWN_TARGET"; }>; /** Machine-readable failure code, one of {@link ExecutorError.Code}'s values. */ readonly code: string; /** * Creates a new ExecutorError instance with a code, message, and optional cause chain. * * @param message - Human-readable description of the error. * @param code - Machine-readable failure code (see {@link ExecutorError.Code}). * @param options - Optional configuration object. * @param options.cause - Original error to chain for root cause analysis. * @example * ```typescript * throw new ExecutorError( * 'Resolvers module not found: src/resolvers', * ExecutorError.Code.MODULE_NOT_FOUND * ); * ``` */ constructor(message: string, code: string, options?: { cause?: Error; }); } //# sourceMappingURL=executor-error.d.ts.map