import { Project, typescript } from 'projen'; import { MonorepoOptions } from './monorepo-options'; import { MonorepoRelease } from './monorepo-release'; import { TypeScriptWorkspace } from './typescript-workspace'; /** * A monorepo using yarn workspaces. */ export declare class Monorepo extends typescript.TypeScriptProject { readonly options: MonorepoOptions; static isMonorepo(x: Project): x is Monorepo; /** * The Monorepo Release component */ readonly monorepoRelease?: MonorepoRelease; /** * The URL where the actual code for the package lives. */ readonly repositoryUrl?: string; private postInstallDependencies; constructor(options: MonorepoOptions); get subprojects(): TypeScriptWorkspace[]; synth(): void; /** * Allows a sub project to request installation of dependency at the Monorepo root * They must provide a function that is executed after dependencies have been installed * If this function returns true, the install command is run for a second time after all sub project requests have run. * This is used to resolve dependency versions from `*` to a concrete version constraint. */ requestInstallDependencies(resolver: IDependencyResolver): void; /** * Code that needs to run just before synth, but after all other code */ private finalEscapeHatches; /** * Render the 'nohoist' directive * * Bundled dependencies must be nohoist'ed, otherwise NPM silently won't bundle them. * * Renders an object that should be mixed into the `workspaces` object. */ private renderNoHoist; /** * Hooks into the install dependencies cycle */ postSynthesize(): void; } export interface IDependencyResolver { resolveDepsAndWritePackageJson(): string[]; } /** * Options for CdkLabsMonorepo */ export interface CdkLabsMonorepoOptions extends MonorepoOptions { } /** * Opinionated implementation of yarn.Monorepo * @pjid cdklabs-yarn-monorepo */ export declare class CdkLabsMonorepo extends Monorepo { constructor(options: CdkLabsMonorepoOptions); }