/*! * @imqueue/cli providers: registry * * I'm Queue Software Project * Copyright (C) 2026 imqueue.com * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * If you want to use this code in a closed source (commercial) project, you can * purchase a proprietary commercial license. Please contact us at * to get commercial licensing options. */ import type { CiProvider, ContainerRegistryProvider, Provider, ScmProvider, VcsHostProvider } from './types.js'; /** * A small typed registry of providers for a single axis (vcs/ci/registry/scm). * Keeps registration and lookup uniform so new providers plug in without * touching call sites. */ export declare class ProviderRegistry { private readonly axis; private readonly items; constructor(axis: string); /** * Registers a provider (last registration for an id wins). * * @param {T} provider * @return {this} */ register(provider: T): this; /** * Returns a provider by id or throws when it is unknown, listing the * available ids to help the caller. * * @param {string} id * @return {T} */ get(id: string): T; /** * Returns a provider by id, or undefined when it is unknown. * * @param {string} id * @return {T | undefined} */ tryGet(id: string): T | undefined; /** * Checks whether a provider id is registered. * * @param {string} id * @return {boolean} */ has(id: string): boolean; /** * Lists all registered providers in registration order. * * @return {T[]} */ list(): T[]; /** * Lists all registered provider ids in registration order. * * @return {string[]} */ ids(): string[]; } /** the four axis registries; populated by provider modules as they load */ export declare const vcsHosts: ProviderRegistry; export declare const scmTools: ProviderRegistry; export declare const ciProviders: ProviderRegistry; export declare const containerRegistries: ProviderRegistry;