import { Construct , ConstructNode } from '@aws-cdk/core' ; import * as fs from 'fs' ; import * as path from 'path' ; export interface AppOptions { default readonly outdir ? : string ; } /**
 * Represents a Terrastack application.
 */ export class App extends Construct { /**
     * The output directory into which manifests will be synthesized.
     */ public readonly outdir : string ; param options constructor ( options = { } ) { super ( undefined as any , '' ) ; this . outdir = options . outdir ?? 'dist' ; } /**
     * Synthesizes all manifests to the output directory
     */ public synth ( ) { ConstructNode . synth ( this . node , { outdir : this . outdir } ) ; rm ( path . join ( this . outdir , 'manifest.json' ) ) ; rm ( path . join ( this . outdir , 'cdk.out' ) ) ; } } function rm ( filePath ) { if ( fs . existsSync ( filePath ) ) { fs . unlinkSync ( filePath ) ; } }