import type { ConfigureErrorHandlingEpilogue, ConfigureExecutionContext, ConfigureExecutionEpilogue } from '@-xun/cli'; import type { StandardCommonCliArguments, StandardExecutionContext } from '@-xun/cli/extensions'; import type { ProjectMetadata } from '@-xun/project'; export { $executionContext } from '@-xun/cli'; export type GlobalExecutionContext = StandardExecutionContext & { /** * A collection of useful information about the current project. Never * includes unnamed workspace packages. */ projectMetadata: ProjectMetadata | undefined; /** * Whether symbiote is being run from within the current project or from * elsewhere in the filesystem. */ isUsingLocalInstallation: boolean; }; /** * Determines which project files are considered within a command's purview. * Files outside of a command's purview will be treated by symbiote as if they * do not exist where possible. * * This enum is essentially {@link ThisPackageGlobalScope} + * {@link UnlimitedGlobalScope}. */ export declare enum DefaultGlobalScope { /** * Limit the command to _all_ relevant files contained within the current * package (as determined by the current working directory), excluding the * files of any other (named) workspace packages. Hence, this scope is only * meaningful in a monorepo context. * * This is the default scope for most commands. */ ThisPackage = "this-package", /** * Do not limit or exclude any files by default when running the command. * * This is useful, for instance, when attempting to manually lint an entire * monorepo at once; e.g. `npx symbiote lint --scope=unlimited`. */ Unlimited = "unlimited", } /** * This enum represents a subset of {@link DefaultGlobalScope}, and is useful for type * checking commands that only operate in the "this-package" scope. * * @see {@link DefaultGlobalScope} */ export declare enum ThisPackageGlobalScope { /** * @see {@link DefaultGlobalScope.ThisPackage} */ ThisPackage = "this-package", } /** * This enum represents a subset of {@link DefaultGlobalScope}, and is useful for type * checking commands that only operate in the "unlimited" scope. * * @see {@link DefaultGlobalScope} */ export declare enum UnlimitedGlobalScope { /** * @see {@link DefaultGlobalScope.Unlimited} */ Unlimited = "unlimited", } /** * These properties will be available in the `argv` object of any command that * uses {@link withGlobalBuilder} to construct its `builder`. * * This type is manually synchronized with {@link globalCliArguments}, but the * keys may differ slightly (e.g. hyphens may be elided in favor of camelCase). * * @see {@link StandardCommonCliArguments} */ export type GlobalCliArguments = StandardCommonCliArguments & { scope: Scope; env: string[]; }; /** * This {@link BfeBuilderObject} instance describes the CLI arguments available * in the `argv` object of any command that uses {@link withGlobalBuilder} to * construct its `builder`. * * This object is manually synchronized with {@link GlobalCliArguments}, but the * keys may differ slightly (e.g. hyphens may be elided in favor of camelCase). * * When providing a custom {@link BfeBuilderObject} instance to * {@link withGlobalBuilder}, any key specified in that instance that is also a * key in this object (`globalCliArguments`) will have its value merged with the * value in this object _instead_ of fully overwriting it. This means you can * pass minimal configuration values for the keys that are also in * `globalCliArguments` and those values will be merged over the corresponding * default configuration value in `globalCliArguments`. * * @see {@link StandardCommonCliArguments} */ export declare const globalCliArguments: { env: { string: true; array: true; default: never[]; description: string; }; scope: { string: true; choices: DefaultGlobalScope[]; default: DefaultGlobalScope; description: string; }; }; export declare const configureExecutionContext: ConfigureExecutionContext; export declare const configureErrorHandlingEpilogue: ConfigureErrorHandlingEpilogue; export declare const configureExecutionEpilogue: ConfigureExecutionEpilogue;