UNPKG

1.49 kBTypeScriptView Raw
1import * as cxapi from '@aws-cdk/cx-api';
2import { CloudAssembly } from './cloud-assembly';
3import { Configuration } from '../../cli/user-configuration';
4import { SdkProvider } from '../aws-auth';
5/**
6 * @returns output directory
7 */
8export type Synthesizer = (aws: SdkProvider, config: Configuration) => Promise<cxapi.CloudAssembly>;
9export interface CloudExecutableProps {
10 /**
11 * Application configuration (settings and context)
12 */
13 configuration: Configuration;
14 /**
15 * AWS object (used by synthesizer and contextprovider)
16 */
17 sdkProvider: SdkProvider;
18 /**
19 * Callback invoked to synthesize the actual stacks
20 */
21 synthesizer: Synthesizer;
22}
23/**
24 * Represent the Cloud Executable and the synthesis we can do on it
25 */
26export declare class CloudExecutable {
27 private readonly props;
28 private _cloudAssembly?;
29 constructor(props: CloudExecutableProps);
30 /**
31 * Return whether there is an app command from the configuration
32 */
33 get hasApp(): boolean;
34 /**
35 * Synthesize a set of stacks.
36 *
37 * @param cacheCloudAssembly whether to cache the Cloud Assembly after it has been first synthesized.
38 * This is 'true' by default, and only set to 'false' for 'cdk watch',
39 * which needs to re-synthesize the Assembly each time it detects a change to the project files
40 */
41 synthesize(cacheCloudAssembly?: boolean): Promise<CloudAssembly>;
42 private doSynthesize;
43 private get canLookup();
44}