import { type TransformOptions } from './util'; import { Shape, type Plugin, Plugins, type CommitFunction, type Context, type Project as IProject, type Keys, Database, type Diagnostics, type Transform, type Factory, type Parser, type CoalesceKeys, Compiler, type CompilerOptions, FileSystem, type File, type Logger, type NowConfigOptions, type Package, // Named this way to prevent naming conflict with path arguments ts, type Diagnostic, NowConfig, type Telemetry, type Result } from '@servicenow/sdk-build-core'; import { ProjectFile } from './project-file'; export type TransformResult = { changedFiles: ProjectFile[]; handledPaths: string[]; }; type IInspector = { inspect: (shape: Shape, ...plugins: Plugin[]) => void; }; type ICommitter = { commit: CommitFunction; }; type ITargeter = { getTarget: (shape: Shape, ...plugins: Plugin[]) => Promise>; }; type FullContext = Omit & IInspector & ICommitter; export declare class Project implements IProject { private readonly rootDir; private readonly files; private readonly filesForDeletion; private readonly plugins; private readonly fileSystem; private readonly logger; private readonly compiler; private readonly config; private readonly package; private readonly keys; private readonly diagnostics; private readonly transformService; private readonly factory; private readonly parser; private readonly inspector; private readonly committer; private readonly targeter; private readonly context; private readonly telemetryClient; private readonly transformMode; constructor({ fileSystem, logger, rootDir, sourceFilePaths, compilerOptions, compiler, plugins, config, packageJson, keys, diagnostics, transform, factory, parser, inspector, committer, targeter, telemetryClient, transformMode, }?: { fileSystem?: FileSystem; logger?: Logger; rootDir?: string; sourceFilePaths?: string[]; compilerOptions?: CompilerOptions; compiler?: Compiler; config?: Partial; packageJson?: Package; plugins?: Plugin[] | Plugins; keys?: Keys; diagnostics?: Diagnostics; transform?: Transform; factory?: Factory; parser?: Parser; inspector?: IInspector; committer?: ICommitter; targeter?: ITargeter; telemetryClient?: Telemetry; transformMode?: 'transform' | 'type-generation'; }); private registerClaimsFile; private registerFiles; getContext(): FullContext; getTelemetryClient(): Telemetry; getPlugins(): Plugins; getFileSystem(): FileSystem; getLogger(): Logger; getDiagnosticsService(): Diagnostics; getCompiler(): Compiler; getKeys(): Keys; getConfig(): NowConfig; getPackage(): Package; getTransform(): Transform; getFactory(): Factory; getFiles(): ProjectFile[]; getEntryPoints(): Promise; getFileIfExists(path: string): ProjectFile | undefined; getFile(path: string): ProjectFile; findFile(name: string): ProjectFile | undefined; findFile(predicate: (file: ProjectFile) => boolean): ProjectFile | undefined; reloadFile(path: string, refreshFromFileSystem?: boolean): ProjectFile; reloadDirectory(path: string, refreshFromFileSystem?: boolean): ProjectFile[]; addFile(file: File, options?: { resolveDependencies?: boolean; excludeFromCompiler?: boolean; }): ProjectFile; addFile(path: string, options?: { resolveDependencies?: boolean; excludeFromCompiler?: boolean; }): ProjectFile; private addFiles; private checkDirectoryExists; private addDirectory; removeFile(file: ProjectFile): void; removeFile(path: string): void; transform(input: string | File | Shape | (string | File | Shape)[], { format }?: TransformOptions): Promise; registerExplicitId(table: string, key: string | number, guidOverride?: string): string; registerCoalesceId(table: string, key: CoalesceKeys, guidOverride?: string): string; getOutput(sysIds?: Set, errorOnConflict?: boolean): Promise; private getOutput0; private copyMetadataRecords; getRecords(sysIds?: Set, errorOnConflict?: boolean): Promise; private getAttachmentsForFields; private generateRecordsFromDeletedKeys; getDiagnostics(): Promise; isInDir(dir: string, path: string): boolean; getRootDir(): string; isInRootDir(path: string): boolean; getMetadataDir(): string; isInMetadataDir(path: string): boolean; isInUiHtmlContentDir(path: string): boolean; private getSnDirName; getFluentDir(): string; isInFluentDir(path: string): boolean; getServerDir(): string; isInServerDir(path: string): boolean; isInConditionalDir(path: string): boolean; /** * True when both paths live under conditional directories but belong to different * conditional plugins (if/ or hosted_plugins/). These records deliver to * separate plugins and must be treated as distinct even when they share a sys_id, so the * incoming one is preserved as metadata XML rather than merged into the already-seen record. */ inDifferentConditionalDirs(pathA: string, pathB: string): boolean; isInFluentHostedPluginDir(path: string, pluginId?: string): boolean; resolvePath(...paths: string[]): string; relativePath(...paths: string[]): string; dispose(): void; fix(): Promise; format(): Promise; save(): void; saveOutput(sysIds?: Set, errorOnConflict?: boolean): Promise; deleteFile(path: string): void; handleMetadataCopy(file: ProjectFile, metadataDirRecordPath?: string): ProjectFile; isTypesGenerationMode(): boolean; } export {};