/// import * as fs from 'fs'; import { Project } from 'projen'; import { Context } from './context/context'; import { DurableStorage } from './durable-storage/durable-storage'; import { ContextFile } from './resynthesis/context-file'; import { StrategyLocations } from './resynthesis/merge-strategies/deserialize-strategies'; import { Strategy } from './resynthesis/merge-strategies/models'; export interface ParentOptions { outdir: string; parent?: Project; } export interface Options extends ParentOptions { } export declare class Blueprint extends Project { readonly context: Context; protected strategies: StrategyLocations | undefined; /** * Used for preserving information between synthesis requests */ durableState: DurableStorage; /** * Set information used on the pull request generated by resynthesis */ resynthPullRequest: { title: string; description: string; originBranch: string; targetBranch?: string; }; constructor(options: Options); setResynthStrategies(bundlepath: string, strategies: Strategy[]): void; setInstantiation(configurableOptions: { description?: string; /** * Force overrides the options that are recorded the the inital super() call. */ options?: T; }): void; getResynthStrategies(bundlepath: string): Strategy[]; resynth(ancestorBundle: string, existingBundle: string, proposedBundle: string): void; write(file: ContextFile, options?: { mode?: fs.Mode; }): void; writeNonSourceFile(filepath: string, bundle: string): void; throwSynthesisError(error: BlueprintSynthesisError): void; synth(): void; private writeOptionsToBundle; } export declare enum BlueprintSynthesisErrorTypes { /** * Throw for generic synthesis error not defined in BlueprintSynthesisErrorTypes */ BlueprintSynthesisError = "BlueprintSynthesisError", /** * Throw when there is a conflict with a resource in synth * Ex: Folder with name X already exists, a workspace already exists for repository X */ ConflictError = "BlueprintSynthesisConflictError", /** * Throw when unable to find resource in synth * Ex: Git repository not found when cloning, unable to find image imported from the web */ NotFoundError = "BlueprintSynthesisNotFoundError", /** * Throw when resource fails validation in synth * Ex: Filename fails regex validation, X required if Y is not given */ ValidationError = "BlueprintSynthesisValidationError" } export declare class BlueprintSynthesisError extends Error { constructor(options: { message: string; type: BlueprintSynthesisErrorTypes; }); }