/*! * @imqueue/cli library: config-schema * * 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 { IMQCLIConfig } from './config.js'; export declare const DEFAULT_TEMPLATES_REF = "master"; export interface VcsConfig { provider?: string; namespace?: string; private?: boolean; /** * Git transport used for the commit/push at create time: `https` (default, * authenticated with the access token) or `ssh` (uses the user's ssh * keys/agent, no token injection). */ protocol?: 'ssh' | 'https'; auth?: { token?: string; }; } export interface CiConfig { provider?: string; auth?: { token?: string; }; } export interface RegistryConfig { provider?: string; namespace?: string; region?: string; project?: string; accountId?: string; auth?: { user?: string; password?: string; }; } /** * The structured (v4) view of the CLI configuration. Every field is derived * either from the new structured keys or, when absent, from the legacy keys, * so an old config produces an equivalent structured view. */ export interface StructuredConfig { vcs: VcsConfig; ci: CiConfig; registry: RegistryConfig; templatesRef?: string; packages: string[]; } /** * Builds the structured (v4) view of a possibly-legacy config. New structured * keys always win; anything missing is derived from legacy keys so that an * old config behaves identically to before. * * @param {IMQCLIConfig} cfg - raw config as loaded from disk * @return {StructuredConfig} */ export declare function deriveStructured(cfg: IMQCLIConfig): StructuredConfig; /** * Writes the structured config into a raw config object and keeps the mapped * legacy keys in sync, so a config written by v4 still works if the CLI is * later downgraded to v3. Mutates and returns the given raw config. * * @param {IMQCLIConfig} cfg - raw config to update (mutated) * @param {StructuredConfig} structured - structured values to persist * @return {IMQCLIConfig} */ export declare function applyStructured(cfg: IMQCLIConfig, structured: StructuredConfig): IMQCLIConfig;