UNPKG

1.49 kBTypeScriptView Raw
1/**
2 * BuildSpec for CodeBuild projects
3 */
4export declare abstract class BuildSpec {
5 static fromObject(value: {
6 [key: string]: any;
7 }): BuildSpec;
8 /**
9 * Create a buildspec from an object that will be rendered as YAML in the resulting CloudFormation template.
10 *
11 * @param value the object containing the buildspec that will be rendered as YAML
12 */
13 static fromObjectToYaml(value: {
14 [key: string]: any;
15 }): BuildSpec;
16 /**
17 * Use a file from the source as buildspec
18 *
19 * Use this if you want to use a file different from 'buildspec.yml'`
20 */
21 static fromSourceFilename(filename: string): BuildSpec;
22 /**
23 * Whether the buildspec is directly available or deferred until build-time
24 */
25 abstract readonly isImmediate: boolean;
26 protected constructor();
27 /**
28 * Render the represented BuildSpec
29 */
30 abstract toBuildSpec(): string;
31}
32/**
33 * Merge two buildspecs into a new BuildSpec by doing a deep merge
34 *
35 * We decided to disallow merging of artifact specs, which is
36 * actually impossible since we can't merge two buildspecs with a
37 * single primary output into a buildspec with multiple outputs.
38 * In case of multiple outputs they must have identifiers but we won't have that information.
39 *
40 * In case of test reports we replace the whole object with the RHS (instead of recursively merging)
41*/
42export declare function mergeBuildSpecs(lhs: BuildSpec, rhs: BuildSpec): BuildSpec;