UNPKG

forest-cli

Version:

The Lumberjacks' toolbelt is the Forest CLI which makes easy to manage your back office application directly from the terminal.

22 lines 1.06 kB
/** * Pure, IO-free matchers used to turn a `--env` / `--team` flag (accepting either * an id or a name) or an environment secret into a concrete candidate. The * candidate lists are injected, so these are exercised in tests with plain arrays * and reused by {@link resolveCommandScope} on top of the existing * EnvironmentManager / TeamManager. Selection of a default (prompting the user) is * deliberately NOT done here — it belongs to the IO layer. */ export declare class ScopeError extends Error { constructor(message: string); } export type Candidate = { id: number | string; name: string; secretKey?: string; type?: string; }; /** Resolve a candidate from a flag given as an id or a (case-insensitive) name. */ export declare function findByFlag(kind: string, flag: string, candidates: Candidate[]): Candidate; /** Resolve the candidate designated by an environment secret. */ export declare function findBySecret(kind: string, secret: string, candidates: Candidate[]): Candidate; //# sourceMappingURL=scope-resolver.d.ts.map