terrac
Version:
A minimal private module registry for Terraform and OpenTofu
28 lines (27 loc) • 903 B
TypeScript
import { IBackend, IModuleListItem } from './shared';
import { IModuleMeta } from '../types/module';
import * as Joi from 'joi';
export declare const configSchemaLocal: Joi.ObjectSchema<any>;
export interface IBackendConfigLocal {
/**
* Backend type
*/
type: 'local';
/**
* Path
*/
path: string;
}
export declare class BackendLocal implements IBackend {
config: IBackendConfigLocal;
constructor(config: IBackendConfigLocal);
upload(name: string, version: string, packagePath: string): Promise<void>;
getSourceUrl(name: string, version?: string): Promise<string>;
list(name?: string): Promise<IModuleListItem[]>;
exists(name: string, version?: string): Promise<boolean>;
getMeta(name: string): Promise<IModuleMeta>;
saveMeta(meta: IModuleMeta): Promise<void>;
private getMetaPath;
private getPackagePath;
private listDir;
}