forked from mapbox/cfn-config
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.ts
38 lines (33 loc) · 1.03 KB
/
index.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
import Actions from './lib/actions.js';
import { Commands } from './lib/commands.js';
import Lookup from './lib/lookup.js';
import Prompt from './lib/prompt.js';
import TemplateReader from './lib/template.js';
import type {
CommandOptions
} from './lib/commands.js'
import type {
AwsCredentialIdentity,
Provider,
} from '@aws-sdk/types';
export interface CFNConfigClient {
region: string;
credentials: AwsCredentialIdentity | Provider<AwsCredentialIdentity>;
}
export default class CFNConfig {
actions: Actions;
commands: Commands;
lookup: Lookup;
prompt: Prompt;
template: TemplateReader;
client: CFNConfigClient;
constructor(client: CFNConfigClient, options: CommandOptions = {}) {
this.client = client;
if (!options) options = {};
this.actions = new Actions(this.client);
this.commands = new Commands(this.client, options);
this.lookup = new Lookup(this.client);
this.prompt = Prompt;
this.template = new TemplateReader(this.client);
}
}