@telefonica/opensource-scaffold
Version:
Scaffolding for open source projects. A CLI tool to create open source repositories with standard tools and resources
56 lines (55 loc) • 1.73 kB
TypeScript
import type { SupportedLicense } from "./License.types.js";
import type { LogLevel } from "./Logger.types.js";
/**
* Validates a repository URL
* @param repoUrl The repository URL
* @returns True if the URL is valid, an error message otherwise
*/
export declare function validateRepositoryUrl(repoUrl: string): boolean | string;
/**
* Validates an email
* @param str The email
* @returns True if the email is valid or empty, an error message otherwise
*/
export declare function validateEmail(str: string): boolean | string;
/**
* Check scaffold resources
* @param options Options from commander
*/
export declare function check(options: {
/** Log level */
log?: LogLevel;
/** When true, an error will be thrown instead of exiting process. Useful for testing purposes */
exitOverride: boolean;
}): Promise<void>;
/**
* Create scaffold resources
* @param options Options from commander
*/
export declare function create(options: {
/** License type */
license?: SupportedLicense;
/** Log level */
log?: LogLevel;
/** Project name */
name?: string;
/** Project description */
description?: string;
/** Project copyright holder */
copyright?: string;
/** Repository URL */
repo?: string;
/** Community email */
email?: string;
/** Overwrite existing files */
overwrite?: boolean;
/** Enable prompts or not */
prompts: boolean;
/** When true, an error will be thrown instead of exiting process. Useful for testing purposes */
exitOverride: boolean;
}): Promise<void>;
/**
* Run the CLI
* @param exitOverride Enable exit override, for testing purposes
*/
export declare function run(exitOverride?: boolean): Promise<void>;