-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathproject.d.ts
75 lines (75 loc) · 2.17 KB
/
project.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
import { Metafile } from "esbuild";
import type { App } from "./constructs/App.js";
export interface SSTConfig {
config: (globals: GlobalOptions) => Promise<ConfigOptions> | ConfigOptions;
stacks: (app: App) => Promise<void> | void;
}
export interface ConfigOptions {
name: string;
region?: string;
stage?: string;
profile?: string;
role?: string;
ssmPrefix?: string;
outputs?: string;
advanced?: {
disableParameterizedStackNameCheck?: boolean;
disableAppModeCheck?: boolean;
};
bootstrap?: {
useCdkBucket?: boolean;
stackName?: string;
tags?: Record<string, string>;
};
cdk?: {
toolkitStackName?: string;
qualifier?: string;
bootstrapStackVersionSsmParameter?: string;
fileAssetsBucketName?: string;
customPermissionsBoundary?: string;
publicAccessBlockConfiguration?: boolean;
deployRoleArn?: string;
fileAssetPublishingRoleArn?: string;
imageAssetPublishingRoleArn?: string;
imageAssetsRepositoryName?: string;
cloudFormationExecutionRole?: string;
lookupRoleArn?: string;
pathMetadata?: boolean;
};
}
declare const DEFAULTS: {
readonly stage: undefined;
readonly ssmPrefix: undefined;
};
interface Project {
config: ConfigOptions & Required<{
[key in keyof typeof DEFAULTS]: Exclude<ConfigOptions[key], undefined>;
}>;
version: string;
cdkVersion: string;
constructsVersion: string;
paths: {
root: string;
config: string;
out: string;
artifacts: string;
};
metafile: Metafile;
stacks: SSTConfig["stacks"];
}
export declare function useProject(): Project;
interface GlobalOptions {
profile?: string;
role?: string;
stage?: string;
root?: string;
region?: string;
}
export declare function initProject(globals: GlobalOptions): Promise<void>;
declare function sanitizeStageName(stage: string): string;
declare function isValidStageName(stage: string): boolean;
export declare const exportedForTesting: {
sanitizeStageName: typeof sanitizeStageName;
isValidStageName: typeof isValidStageName;
};
export {};