@tsed/cli
Version:
CLI to bootstrap your Ts.ED project
41 lines (40 loc) • 2.34 kB
TypeScript
import { CliDockerComposeYaml, CliFs, ProjectPackageJson } from "@tsed/cli-core";
import { type KindToNodeMappings, ObjectLiteralExpression, type OptionalKind, Project, type ProjectOptions, type SourceFile, type SourceFileCreateOptions, type SourceFileStructure, SyntaxKind, type WriterFunction } from "ts-morph";
export declare class ProjectClient extends Project {
readonly pkg: ProjectPackageJson;
readonly fs: CliFs;
readonly dockerCompose: CliDockerComposeYaml;
rootDir: string;
constructor({ rootDir, ...options }: ProjectOptions & {
rootDir: string;
});
get srcDir(): string;
get serverSourceFile(): SourceFile | undefined;
get configSourceFile(): SourceFile | undefined;
get indexSourceFile(): SourceFile | undefined;
get binSourceFile(): SourceFile | undefined;
get serverName(): string;
getSource(path: string): SourceFile | undefined;
createSource(path: string, sourceFileText?: string | OptionalKind<SourceFileStructure> | WriterFunction, options?: SourceFileCreateOptions): Promise<SourceFile | undefined>;
findClassDecorator(sourceFile: SourceFile, name: string): import("ts-morph").Decorator | undefined;
addMountPath(path: string, specifier: string): void;
addNamespaceImport(sourceFile: SourceFile, moduleSpecifier: string, name: string): import("ts-morph").Identifier | undefined;
findConfiguration(kind: "server" | "config" | "bin"): ObjectLiteralExpression | undefined;
getPropertyAssignment<TKind extends SyntaxKind>(input: ObjectLiteralExpression, { name, initializer, kind }: {
name: string;
initializer: string | WriterFunction;
kind: TKind;
}): KindToNodeMappings[TKind];
getPropertyAssignment<TKind extends SyntaxKind>(input: ObjectLiteralExpression, { name, initializer, kind }: {
name: string;
initializer?: string | WriterFunction;
kind: TKind;
}): KindToNodeMappings[TKind] | undefined;
addConfigSource(name: string, { content, moduleSpecifier }: {
content?: string;
moduleSpecifier: string;
}): void;
protected findConfigurationDecorationOptions(): ObjectLiteralExpression | undefined;
protected findConfigConfiguration(): ObjectLiteralExpression | undefined;
protected findBinConfiguration(): ObjectLiteralExpression | undefined;
}