/** * Normalises the `--services`/`-s` option into a clean list of service names. * Accepts every shape yargs can produce for the flag - a single comma-separated * string (`-s a,b`), a repeated flag (`-s a -s b`, which yargs collects into an * array), an array of comma-separated strings, or nothing - and always returns * a trimmed, de-duplicated, order-preserving list (or `undefined` when empty). * * Without this, a repeated `-s` silently produced an array that the callers' * `typeof === 'string'` guard rejected, so the command fell back to operating * on ALL discovered services. * * @param {unknown} raw - the raw `argv.services` value * @return {string[] | undefined} */ export declare function parseServices(raw: unknown): string[] | undefined; /** * Checks whether a service directory contains an @imqueue service by scanning * its `src/` tree for a class extending IMQService or IMQClient. This is a * source-level check - it needs neither a build nor a module import, so it * works on freshly-cloned, uninstalled repositories. * * @param {string} serviceDir - path to a candidate service directory * @return {boolean} - true if the directory looks like an @imqueue service */ export declare function isServiceDir(serviceDir: string): boolean; /** * Discovers @imqueue service repositories under the given path. If an explicit * list of service names is provided it is returned as-is (de-duplicated, * order-preserving) without scanning - matching the behaviour of the legacy * bash tools where `-s` bypasses discovery. Otherwise every immediate * sub-directory of `path` whose `src/` tree contains a service class is * returned, sorted by name for deterministic output. * * @param {string} path - directory containing service repositories * @param {string[]} [explicit] - explicit service names (bypasses scanning) * @return {string[]} - service directory names (relative to `path`) */ export declare function discoverServices(path: string, explicit?: string[]): string[];