generated from mearns/node-template
-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.d.ts
83 lines (75 loc) · 2.3 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
import * as justRunIt from "just-run-it";
declare module "sirocco" {
/**
* A javascript file used as a sirocco config should export
* a value of this type: either the config object directly,
* or a function that returns (synchronously or asynchronously)
* the config object.
*/
export type ConfigExport =
| Config
| (() => ConfigExport | Promise<ConfigExport>);
/**
* This is the main sirocco config object. Your config file should fit this.
*/
export interface Config {
options?: ConfigOptions;
defaultStacks?: string[];
global?: ConfigLayer;
deployTypes?: {
[deployType: string]: DeployType;
};
envs?: {
[envName: string]: ConfigLayer;
};
}
export interface ConfigOptions {
branchDeployType?: string[];
validate?: boolean;
dump?: boolean;
}
export interface ConfigLayer {
params?: Params;
deployBucket?: Resolvable;
deployBucketPrefix?: Resolvable;
role?: Resolvable;
envNameParamName?: Resolvable;
cfnStackName?: Resolvable;
inputTemplate?: Resolvable;
outputTemplate?: Resolvable;
capabilities?: string[];
authenticationCommand?:
| string
| string[]
| ((
stack: string,
env: string,
options: {
role: string;
dryRun: boolean;
execute: justRunIt.JustRunIt;
}
) => Promise<any>);
stackTags?:
| ((
stack: string,
env: string,
resolvedParams: { [paramName: string]: string }
) => { [tagName: string]: string })
| { [resolvableTagName: string]: Resolvable };
}
export interface DeployType extends ConfigLayer {
validEnvs: EnvNameValidator;
}
export type Resolvable =
| string
| ((stack: string, env: string, params: Params) => string);
export interface Params {
[paramName: string]: Resolvable;
}
export type EnvNameValidator =
| ((envName: string) => boolean)
| string
| RegExp
| EnvNameValidator[];
}