create-zephyr-apps
Version:
A CLI tool to create web applications using Zephyr.
54 lines • 2.01 kB
TypeScript
import { type ProjectType } from './templates.js';
export declare const PackageManagers: readonly ["pnpm", "npm", "yarn", "bun"];
export type PackageManager = (typeof PackageManagers)[number];
export interface CliOptions {
directory?: string;
template?: string;
projectType?: ProjectType;
packageManager?: PackageManager;
initializeGit?: boolean;
install: boolean;
build: boolean;
json: boolean;
yes: boolean;
templateRevision?: string;
listTemplates: boolean;
help: boolean;
version: boolean;
}
export interface ResolvedCliOptions {
directory: string;
template?: string;
projectType: ProjectType;
packageManager?: PackageManager;
initializeGit: boolean;
install: boolean;
build: boolean;
json: boolean;
templateRevision: string;
}
export interface PromptAdapter {
directory(): Promise<string | undefined>;
projectType(): Promise<ProjectType | undefined>;
template(): Promise<string | undefined>;
initializeGit(): Promise<boolean | undefined>;
}
export interface ResolveCliOptionsContext {
interactive: boolean;
prompts?: PromptAdapter;
}
export interface TerminalContext {
inputIsTTY: boolean | undefined;
outputIsTTY: boolean | undefined;
}
export declare class OperationCancelled extends Error {
constructor();
}
export declare const NON_INTERACTIVE_EXAMPLE_ARGS: readonly ["./apps/example", "--template", "react-rsbuild", "--package-manager", "pnpm", "--no-git", "--install", "--build", "--json"];
export declare const NON_INTERACTIVE_EXAMPLE: string;
export declare const HELP_TEXT: string;
export declare function parseCliArgs(args: string[]): CliOptions;
export declare function shouldUseInteractiveMode(options: CliOptions, terminal: TerminalContext): boolean;
export declare function resolveCliOptions(options: CliOptions, context: ResolveCliOptionsContext): Promise<ResolvedCliOptions>;
export declare function listTemplatesJson(): string;
//# sourceMappingURL=cli.d.ts.map