/*! * Copyright (C) Microsoft Corporation. All rights reserved. */ import type { ILogger } from '../../services/index.js'; import type { Vfs } from '../../Types/Vfs.types.js'; /** * Compatibility layer for V1 and V2 codegen projects. */ export interface ICodegenProject { /** Create a file at the given path with the given content. */ createFile(identifier: FileIdentifier, filePath: string, content: string): Promise; /** Commit any uncommmited files to the filesystem */ commit(): Promise; /** Join path segments using the underlying path convention. */ join(...paths: string[]): string; /** Returns true if a directory exists at the given path. */ directoryExists(path: string): Promise; /** Returns true if a file exists at the given path. */ fileExists(path: string): Promise; /** Returns the names of all source files directly inside the given directory. */ getSourceFilesInDirectory(path: string): Promise; } /** * The types of files that can be generated by codegen. Each project can have up to one of each. */ export type FileIdentifier = 'model' | 'service' | 'commonModel' | 'index'; /** * Compatibility layer for V1 and V2 codegen projects. The purpose of this class is * purely to preserve existing V1 codegen logic as closeley as possible. */ export declare class CodegenV1Project implements ICodegenProject { private vfs; private logger; constructor(vfs: Vfs, logger: ILogger); createFile(_identifier: FileIdentifier, filePath: string, content: string): Promise; commit(): Promise; join(...paths: string[]): string; directoryExists(path: string): Promise; fileExists(path: string): Promise; getSourceFilesInDirectory(path: string): Promise; } //# sourceMappingURL=project.d.ts.map