/// import { Blueprint, Strategy } from '@amazon-codecatalyst/blueprints.blueprint'; import { Component } from 'projen'; export declare const sourceRepositoryRootDirectory = "src"; export interface SourceRepositoryDefinition { title: string; } export interface BasicFile { path: string; content: any; } export declare class SourceRepository extends Component { protected readonly blueprint_: Blueprint; protected readonly sourceRepository: SourceRepositoryDefinition; static BUNDLE_PATH: string; readonly relativePath: string; readonly path: string; readonly title: string; readonly blueprint: Blueprint; private readonly files; readonly synthesisSteps: (() => void)[]; constructor(blueprint_: Blueprint, sourceRepository: SourceRepositoryDefinition); copyStaticFiles(options?: { /** * From a location inside static assets. This is a directory path prefixed by the location of the static-assets folder. * @example 'java/src' - copies all files inside the 'java/src' directory inside static assets * @default undefined - defaults to copying everything from inside static-assets/ */ from?: string; /** * To a location inside the repository. This is a directory path. * @example 'src' - copies all files to the 'src' directory inside the repository * @default undefined - defaults to copying everything to the root of the repository */ to?: string; /** * Use Mustache subsitution across non-binary assets. * @example { 'my_variable': 'subbed value1', 'another_variable': 'subbed value2' } * @param subsitution * @returns */ substitute?: { [key: string]: string | object; }; /** * Allows iteration across all copied files. This is run after substitutions and final path resolution and prior to initializing the file object. * @param file * @returns file */ map?: (file: BasicFile) => BasicFile; }): void; getResynthStrategies(_options?: {}): Strategy[]; setResynthStrategies(strategies: Strategy[], _options?: {}): void; /** * Internally used to reason about which files exist in this repository. * If you're adding files without using the constructs, such as using fs.writeFile * directly, you'll need to make sure you track those files too. Used for resynthesis * @param location * @param content */ _trackFile(location: string, content: Buffer): void; getFiles(): { [filePath: string]: Buffer; }; /** * Wrapper around new File(...) * @param location * @param content */ addFile(location: string, content: Buffer): void; removeFile(location: string): void; synthesize(): void; addSynthesisStep(postSynthFunction: () => void): void; private writeSynthesis; }