@fjall/generator 0.88.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/ast/astComputeParser.d.ts +4 -0
- package/dist/src/ast/astComputeParser.js +427 -0
- package/dist/src/ast/astInfrastructureParser.d.ts +357 -0
- package/dist/src/ast/astInfrastructureParser.js +1925 -0
- package/dist/src/ast/astSurgicalModification.d.ts +47 -0
- package/dist/src/ast/astSurgicalModification.js +400 -0
- package/dist/src/ast/index.d.ts +2 -0
- package/dist/src/ast/index.js +2 -0
- package/dist/src/aws/regions.d.ts +30 -0
- package/dist/src/aws/regions.js +254 -0
- package/dist/src/generation/common.d.ts +86 -0
- package/dist/src/generation/common.js +187 -0
- package/dist/src/generation/compute.d.ts +6 -0
- package/dist/src/generation/compute.js +547 -0
- package/dist/src/generation/database.d.ts +54 -0
- package/dist/src/generation/database.js +201 -0
- package/dist/src/generation/index.d.ts +12 -0
- package/dist/src/generation/index.js +18 -0
- package/dist/src/generation/infrastructure.d.ts +44 -0
- package/dist/src/generation/infrastructure.js +389 -0
- package/dist/src/generation/storage.d.ts +23 -0
- package/dist/src/generation/storage.js +174 -0
- package/dist/src/generation/storageConnections.d.ts +37 -0
- package/dist/src/generation/storageConnections.js +71 -0
- package/dist/src/index.d.ts +10 -0
- package/dist/src/index.js +19 -0
- package/dist/src/planning/index.d.ts +1 -0
- package/dist/src/planning/index.js +1 -0
- package/dist/src/planning/resourcePlanning.d.ts +58 -0
- package/dist/src/planning/resourcePlanning.js +216 -0
- package/dist/src/presets/index.d.ts +3 -0
- package/dist/src/presets/index.js +3 -0
- package/dist/src/presets/patternTierPresets.d.ts +93 -0
- package/dist/src/presets/patternTierPresets.js +131 -0
- package/dist/src/presets/storagePresets.d.ts +11 -0
- package/dist/src/presets/storagePresets.js +36 -0
- package/dist/src/presets/tierPresets.d.ts +59 -0
- package/dist/src/presets/tierPresets.js +384 -0
- package/dist/src/presets/tierTypes.d.ts +301 -0
- package/dist/src/presets/tierTypes.js +7 -0
- package/dist/src/schemas/constants.d.ts +74 -0
- package/dist/src/schemas/constants.js +208 -0
- package/dist/src/schemas/index.d.ts +3 -0
- package/dist/src/schemas/index.js +3 -0
- package/dist/src/schemas/instanceTypeArchitecture.d.ts +35 -0
- package/dist/src/schemas/instanceTypeArchitecture.js +75 -0
- package/dist/src/schemas/resourceSchemas.d.ts +3534 -0
- package/dist/src/schemas/resourceSchemas.js +2015 -0
- package/dist/src/types/Result.d.ts +19 -0
- package/dist/src/types/Result.js +31 -0
- package/dist/src/util/errorUtils.d.ts +2 -0
- package/dist/src/util/errorUtils.js +15 -0
- package/dist/src/validation/patterns.d.ts +300 -0
- package/dist/src/validation/patterns.js +360 -0
- package/dist/src/version.d.ts +1 -0
- package/dist/src/version.js +1 -0
- package/package.json +32 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export type Result<T, E = Error> = {
|
|
2
|
+
success: true;
|
|
3
|
+
data: T;
|
|
4
|
+
} | {
|
|
5
|
+
success: false;
|
|
6
|
+
error: E;
|
|
7
|
+
};
|
|
8
|
+
export declare function isSuccess<T, E>(result: Result<T, E>): result is {
|
|
9
|
+
success: true;
|
|
10
|
+
data: T;
|
|
11
|
+
};
|
|
12
|
+
export declare function isFailure<T, E>(result: Result<T, E>): result is {
|
|
13
|
+
success: false;
|
|
14
|
+
error: E;
|
|
15
|
+
};
|
|
16
|
+
export declare function success<T>(data: T): Result<T, never>;
|
|
17
|
+
export declare function failure<E>(error: E): Result<never, E>;
|
|
18
|
+
export declare function tryAsync<T>(fn: () => Promise<T>): Promise<Result<T, Error>>;
|
|
19
|
+
export declare function trySync<T>(fn: () => T): Result<T, Error>;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { normaliseError } from "../util/errorUtils.js";
|
|
2
|
+
export function isSuccess(result) {
|
|
3
|
+
return result.success === true;
|
|
4
|
+
}
|
|
5
|
+
export function isFailure(result) {
|
|
6
|
+
return result.success === false;
|
|
7
|
+
}
|
|
8
|
+
export function success(data) {
|
|
9
|
+
return { success: true, data };
|
|
10
|
+
}
|
|
11
|
+
export function failure(error) {
|
|
12
|
+
return { success: false, error };
|
|
13
|
+
}
|
|
14
|
+
export async function tryAsync(fn) {
|
|
15
|
+
try {
|
|
16
|
+
const data = await fn();
|
|
17
|
+
return success(data);
|
|
18
|
+
}
|
|
19
|
+
catch (error) {
|
|
20
|
+
return failure(normaliseError(error));
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
export function trySync(fn) {
|
|
24
|
+
try {
|
|
25
|
+
const data = fn();
|
|
26
|
+
return success(data);
|
|
27
|
+
}
|
|
28
|
+
catch (error) {
|
|
29
|
+
return failure(normaliseError(error));
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export function normaliseError(error) {
|
|
2
|
+
return error instanceof Error ? error : new Error(String(error));
|
|
3
|
+
}
|
|
4
|
+
export function getErrorMessage(error) {
|
|
5
|
+
if (error instanceof Error) {
|
|
6
|
+
return error.message;
|
|
7
|
+
}
|
|
8
|
+
if (typeof error === "string") {
|
|
9
|
+
return error;
|
|
10
|
+
}
|
|
11
|
+
if (error && typeof error === "object" && "message" in error) {
|
|
12
|
+
return String(error.message);
|
|
13
|
+
}
|
|
14
|
+
return "An unknown error occurred";
|
|
15
|
+
}
|
|
@@ -0,0 +1,300 @@
|
|
|
1
|
+
export declare const VALIDATION_PATTERNS: Readonly<{
|
|
2
|
+
readonly IDENTIFIER: RegExp;
|
|
3
|
+
readonly RESOURCE_NAME: RegExp;
|
|
4
|
+
readonly ECS_SERVICE_NAME: RegExp;
|
|
5
|
+
readonly BUCKET_NAME: RegExp;
|
|
6
|
+
readonly DATABASE_NAME: RegExp;
|
|
7
|
+
readonly RESOURCE_TYPE: RegExp;
|
|
8
|
+
readonly SSM_PATH: RegExp;
|
|
9
|
+
readonly SECRET_NAME: RegExp;
|
|
10
|
+
readonly SSM_COMPONENT: RegExp;
|
|
11
|
+
readonly EMAIL: RegExp;
|
|
12
|
+
readonly DOCKER_IMAGE: RegExp;
|
|
13
|
+
readonly DOMAIN: RegExp;
|
|
14
|
+
}>;
|
|
15
|
+
export declare const VALIDATION_MESSAGES: Readonly<{
|
|
16
|
+
readonly IDENTIFIER: "Must start with a letter, contain only letters, numbers, and hyphens";
|
|
17
|
+
readonly IDENTIFIER_MIN_LENGTH: "Must be at least 2 characters";
|
|
18
|
+
readonly IDENTIFIER_NO_TRAILING_HYPHEN: "Must not end with a hyphen";
|
|
19
|
+
readonly IDENTIFIER_NO_CONSECUTIVE_HYPHENS: "Must not contain consecutive hyphens";
|
|
20
|
+
readonly RESOURCE_NAME: "Must start with a letter and contain only letters and numbers (PascalCase recommended)";
|
|
21
|
+
readonly ECS_SERVICE_NAME: "Service name must start with a letter and contain only letters, numbers, and hyphens";
|
|
22
|
+
readonly BUCKET_NAME: "Bucket name must start with a lowercase letter and contain only lowercase letters, numbers, and hyphens";
|
|
23
|
+
readonly DATABASE_NAME: "Database name must start with a letter and contain only letters, numbers, and underscores";
|
|
24
|
+
readonly RESOURCE_TYPE: "Resource type must be in format 'category' or 'category:type'";
|
|
25
|
+
readonly SSM_PATH: "SSM path must start with / and contain valid namespace segments (e.g., /myapp/ApiCluster/service)";
|
|
26
|
+
readonly SECRET_NAME: "Secret name must start with a letter or underscore and contain only letters, numbers, underscores, hyphens, or periods";
|
|
27
|
+
readonly SSM_COMPONENT: "Must start with a letter and contain only letters, numbers, periods, hyphens, or underscores";
|
|
28
|
+
readonly EMAIL: "Please enter a valid email address";
|
|
29
|
+
readonly DOMAIN: "Please enter a valid domain (e.g., cms.example.com)";
|
|
30
|
+
readonly DOCKER_IMAGE: "Invalid Docker image name format";
|
|
31
|
+
readonly REQUIRED: {
|
|
32
|
+
readonly APP_NAME: "Application name is required";
|
|
33
|
+
readonly RESOURCE_NAME: "Resource name is required";
|
|
34
|
+
readonly BUCKET_NAME: "Bucket name is required";
|
|
35
|
+
readonly SERVICE_NAME: "Service name is required";
|
|
36
|
+
readonly NETWORK_NAME: "Network name is required";
|
|
37
|
+
readonly DATABASE_NAME: "Database name is required";
|
|
38
|
+
readonly ORGANISATION_NAME: "Organisation name is required";
|
|
39
|
+
readonly EMAIL: "Email is required";
|
|
40
|
+
readonly NAME: "Name is required";
|
|
41
|
+
readonly USERNAME: "Username is required";
|
|
42
|
+
readonly CONTAINER_NAME: "Container name is required";
|
|
43
|
+
readonly FIRST_NAME: "First name is required";
|
|
44
|
+
readonly LAST_NAME: "Last name is required";
|
|
45
|
+
readonly GROUP: "Group is required";
|
|
46
|
+
readonly PATTERN_NAME: "Pattern name is required";
|
|
47
|
+
readonly ROUTING_PATH: "Routing path is required";
|
|
48
|
+
readonly RESOURCE_TYPE: "Resource type is required";
|
|
49
|
+
readonly VARIANT: "Variant is required";
|
|
50
|
+
readonly SUBTYPE: "Subtype is required";
|
|
51
|
+
readonly DEPLOY_TARGET: "Deploy target is required";
|
|
52
|
+
readonly DESTROY_TARGET: "Destroy target is required";
|
|
53
|
+
};
|
|
54
|
+
readonly MAX_LENGTH: {
|
|
55
|
+
readonly APP_NAME: "Application name must be 50 characters or less";
|
|
56
|
+
readonly RESOURCE_NAME: "Resource name must be 63 characters or less";
|
|
57
|
+
readonly BUCKET_NAME: "Bucket name must be 63 characters or less";
|
|
58
|
+
readonly SERVICE_NAME: "Service name must be 255 characters or less";
|
|
59
|
+
readonly NETWORK_NAME: "Network name must be 50 characters or less";
|
|
60
|
+
readonly DATABASE_NAME: "Database name must be 63 characters or less";
|
|
61
|
+
readonly ORGANISATION_NAME: "Organisation name must be 50 characters or less";
|
|
62
|
+
};
|
|
63
|
+
readonly PORT: {
|
|
64
|
+
readonly INTEGER: "Port must be an integer";
|
|
65
|
+
readonly MIN: "Port must be at least 1";
|
|
66
|
+
readonly MAX: "Port cannot exceed 65535";
|
|
67
|
+
};
|
|
68
|
+
readonly USERNAME: {
|
|
69
|
+
readonly MAX_LENGTH: "Username cannot exceed 63 characters";
|
|
70
|
+
};
|
|
71
|
+
readonly LAMBDA: {
|
|
72
|
+
readonly MEMORY: {
|
|
73
|
+
readonly INTEGER: "Lambda memory must be an integer";
|
|
74
|
+
readonly MIN: "Memory must be at least 128 MB";
|
|
75
|
+
readonly MAX: "Memory cannot exceed 10240 MB";
|
|
76
|
+
readonly MULTIPLE: "Memory must be 128 MB or a multiple of 64 MB";
|
|
77
|
+
};
|
|
78
|
+
readonly TIMEOUT: {
|
|
79
|
+
readonly INTEGER: "Timeout must be an integer";
|
|
80
|
+
readonly MIN: "Timeout must be at least 1 second";
|
|
81
|
+
readonly MAX: "Timeout cannot exceed 900 seconds";
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
readonly PRIORITY: {
|
|
85
|
+
readonly INTEGER: "Priority must be an integer";
|
|
86
|
+
readonly MIN: "Priority must be at least 1";
|
|
87
|
+
readonly MAX: "Priority cannot exceed 50000";
|
|
88
|
+
};
|
|
89
|
+
readonly CAPACITY: {
|
|
90
|
+
readonly MIN: {
|
|
91
|
+
readonly INTEGER: "Minimum capacity must be an integer";
|
|
92
|
+
readonly MIN_0: "Minimum capacity must be at least 0";
|
|
93
|
+
readonly MIN_1: "Minimum capacity must be at least 1";
|
|
94
|
+
readonly MAX: "Minimum capacity cannot exceed 100";
|
|
95
|
+
};
|
|
96
|
+
readonly MAX: {
|
|
97
|
+
readonly INTEGER: "Maximum capacity must be an integer";
|
|
98
|
+
readonly MIN_0: "Maximum capacity must be at least 0";
|
|
99
|
+
readonly MIN_1: "Maximum capacity must be at least 1";
|
|
100
|
+
readonly MAX: "Maximum capacity cannot exceed 100";
|
|
101
|
+
};
|
|
102
|
+
readonly DESIRED: {
|
|
103
|
+
readonly INTEGER: "Desired count must be an integer";
|
|
104
|
+
readonly MIN: "Desired count must be at least 0";
|
|
105
|
+
readonly MAX: "Desired count cannot exceed 100";
|
|
106
|
+
};
|
|
107
|
+
};
|
|
108
|
+
readonly MEMORY_LIMIT: {
|
|
109
|
+
readonly INTEGER: "Memory limit must be an integer";
|
|
110
|
+
readonly MIN_512: "Memory limit must be at least 512 MiB";
|
|
111
|
+
readonly MIN_128: "Memory limit must be at least 128 MiB";
|
|
112
|
+
readonly MAX: "Memory limit cannot exceed 30720 MiB";
|
|
113
|
+
};
|
|
114
|
+
readonly DATABASE: {
|
|
115
|
+
readonly PORT: {
|
|
116
|
+
readonly INTEGER: "Database port must be an integer";
|
|
117
|
+
readonly MIN: "Database port must be at least 1024";
|
|
118
|
+
readonly MAX: "Database port cannot exceed 65535";
|
|
119
|
+
};
|
|
120
|
+
readonly NAME: {
|
|
121
|
+
readonly REQUIRED: "Database name is required";
|
|
122
|
+
readonly MAX_LENGTH: "Database name cannot exceed 64 characters";
|
|
123
|
+
};
|
|
124
|
+
};
|
|
125
|
+
readonly BACKUP_RETENTION: {
|
|
126
|
+
readonly INTEGER: "Backup retention must be an integer";
|
|
127
|
+
readonly MIN: "Backup retention must be at least 1 day";
|
|
128
|
+
readonly MAX: "Backup retention cannot exceed 35 days";
|
|
129
|
+
};
|
|
130
|
+
readonly SQS: {
|
|
131
|
+
readonly VISIBILITY_TIMEOUT: {
|
|
132
|
+
readonly INTEGER: "Visibility timeout must be an integer";
|
|
133
|
+
readonly MIN: "Visibility timeout must be at least 0 seconds";
|
|
134
|
+
readonly MAX: "Visibility timeout cannot exceed 43200 seconds (12 hours)";
|
|
135
|
+
};
|
|
136
|
+
readonly RETENTION_PERIOD: {
|
|
137
|
+
readonly INTEGER: "Retention period must be an integer";
|
|
138
|
+
readonly MIN: "Retention period must be at least 60 seconds";
|
|
139
|
+
readonly MAX: "Retention period cannot exceed 1209600 seconds (14 days)";
|
|
140
|
+
};
|
|
141
|
+
};
|
|
142
|
+
readonly READER: {
|
|
143
|
+
readonly COUNT: {
|
|
144
|
+
readonly INTEGER: "Reader count must be an integer";
|
|
145
|
+
readonly MIN: "Reader count must be at least 0";
|
|
146
|
+
readonly MAX: "Reader count cannot exceed 15";
|
|
147
|
+
};
|
|
148
|
+
};
|
|
149
|
+
readonly IDENTIFIER_SUFFIX: {
|
|
150
|
+
readonly REQUIRED: "Identifier suffix is required when specified";
|
|
151
|
+
readonly MAX_LENGTH: "Identifier suffix cannot exceed 50 characters";
|
|
152
|
+
};
|
|
153
|
+
readonly ROTATION: {
|
|
154
|
+
readonly INTEGER: "Rotation days must be an integer";
|
|
155
|
+
readonly MIN: "Rotation interval must be at least 1 day";
|
|
156
|
+
readonly MAX: "Rotation interval cannot exceed 365 days";
|
|
157
|
+
};
|
|
158
|
+
readonly MAX_CONNECTIONS: {
|
|
159
|
+
readonly INTEGER: "Max connections must be an integer";
|
|
160
|
+
readonly MIN: "Max connections must be at least 1";
|
|
161
|
+
readonly MAX: "Max connections cannot exceed 100";
|
|
162
|
+
};
|
|
163
|
+
readonly MONITORING_INTERVAL: {
|
|
164
|
+
readonly INTEGER: "Monitoring interval must be an integer";
|
|
165
|
+
readonly MIN: "Monitoring interval must be at least 0";
|
|
166
|
+
readonly MAX: "Monitoring interval cannot exceed 60 seconds";
|
|
167
|
+
readonly VALUES: "Monitoring interval must be 0, 1, 5, 10, 15, 30, or 60 seconds";
|
|
168
|
+
};
|
|
169
|
+
readonly RETENTION_DAYS: {
|
|
170
|
+
readonly INTEGER: "Retention days must be an integer";
|
|
171
|
+
readonly MIN: "Retention days must be at least 1";
|
|
172
|
+
readonly MAX: "Retention days cannot exceed 365";
|
|
173
|
+
};
|
|
174
|
+
readonly BATCH_SIZE: {
|
|
175
|
+
readonly INTEGER: "Batch size must be an integer";
|
|
176
|
+
readonly MIN: "Batch size must be at least 1";
|
|
177
|
+
readonly MAX: "Batch size cannot exceed 10000";
|
|
178
|
+
};
|
|
179
|
+
readonly SERVICE: {
|
|
180
|
+
readonly UNIQUE_WITHIN_CLUSTER: "Service names must be unique within a cluster";
|
|
181
|
+
readonly MIN_REQUIRED: "At least one service is required";
|
|
182
|
+
readonly ROUTING_REQUIRED: "Multiple services with ports require routing config (path or host)";
|
|
183
|
+
};
|
|
184
|
+
readonly PROXY_CONFIG: {
|
|
185
|
+
readonly MAX_IDLE_CONNECTIONS: {
|
|
186
|
+
readonly INTEGER: "Max idle connections must be an integer";
|
|
187
|
+
readonly MIN: "Max idle connections must be at least 0";
|
|
188
|
+
readonly MAX: "Max idle connections cannot exceed 100";
|
|
189
|
+
};
|
|
190
|
+
readonly BORROW_TIMEOUT: {
|
|
191
|
+
readonly INTEGER: "Connection borrow timeout must be an integer";
|
|
192
|
+
readonly MIN: "Connection borrow timeout must be at least 1 second";
|
|
193
|
+
readonly MAX: "Connection borrow timeout cannot exceed 3600 seconds";
|
|
194
|
+
};
|
|
195
|
+
};
|
|
196
|
+
readonly MAX_AZS: {
|
|
197
|
+
readonly INTEGER: "Max AZs must be an integer";
|
|
198
|
+
readonly MIN: "Max AZs must be at least 1";
|
|
199
|
+
readonly MAX: "Max AZs cannot exceed 3";
|
|
200
|
+
};
|
|
201
|
+
readonly BATCHING_WINDOW: {
|
|
202
|
+
readonly INTEGER: "Max batching window must be an integer";
|
|
203
|
+
readonly MIN: "Max batching window must be at least 0";
|
|
204
|
+
readonly MAX: "Max batching window cannot exceed 300 seconds";
|
|
205
|
+
};
|
|
206
|
+
readonly HEALTH_CHECK: {
|
|
207
|
+
readonly INTERVAL: {
|
|
208
|
+
readonly INTEGER: "Health check interval must be an integer";
|
|
209
|
+
readonly MIN: "Health check interval must be at least 5 seconds";
|
|
210
|
+
readonly MAX: "Health check interval cannot exceed 300 seconds";
|
|
211
|
+
};
|
|
212
|
+
readonly TIMEOUT: {
|
|
213
|
+
readonly INTEGER: "Health check timeout must be an integer";
|
|
214
|
+
readonly MIN: "Health check timeout must be at least 2 seconds";
|
|
215
|
+
readonly MAX: "Health check timeout cannot exceed 60 seconds";
|
|
216
|
+
};
|
|
217
|
+
readonly RETRIES: {
|
|
218
|
+
readonly INTEGER: "Health check retries must be an integer";
|
|
219
|
+
readonly MIN: "Health check retries must be at least 1";
|
|
220
|
+
readonly MAX: "Health check retries cannot exceed 10";
|
|
221
|
+
};
|
|
222
|
+
readonly START_PERIOD: {
|
|
223
|
+
readonly INTEGER: "Health check start period must be an integer";
|
|
224
|
+
readonly MIN: "Health check start period must be at least 0 seconds";
|
|
225
|
+
readonly MAX: "Health check start period cannot exceed 300 seconds";
|
|
226
|
+
};
|
|
227
|
+
};
|
|
228
|
+
readonly EPHEMERAL_STORAGE: {
|
|
229
|
+
readonly INTEGER: "Ephemeral storage size must be an integer";
|
|
230
|
+
readonly MIN: "Ephemeral storage size must be at least 512 MB";
|
|
231
|
+
readonly MAX: "Ephemeral storage size cannot exceed 10240 MB";
|
|
232
|
+
};
|
|
233
|
+
readonly MAX_MESSAGE_SIZE: {
|
|
234
|
+
readonly INTEGER: "Max message size must be an integer";
|
|
235
|
+
readonly MIN: "Max message size must be at least 1024 bytes";
|
|
236
|
+
readonly MAX: "Max message size cannot exceed 262144 bytes (256 KB)";
|
|
237
|
+
};
|
|
238
|
+
readonly CAPACITY_CONSTRAINT: {
|
|
239
|
+
readonly MIN_LTE_MAX: "minCapacity must be less than or equal to maxCapacity";
|
|
240
|
+
};
|
|
241
|
+
readonly DIRECT_ACCESS: {
|
|
242
|
+
readonly NO_DOMAIN: "directAccess cannot be used with domain (no ALB for HTTPS)";
|
|
243
|
+
readonly NO_LOAD_BALANCER: "directAccess cannot be used with loadBalancer (mutually exclusive)";
|
|
244
|
+
};
|
|
245
|
+
readonly GLOBAL_AURORA: {
|
|
246
|
+
readonly PRIMARY_REGION_REQUIRED: "primaryRegion is required for GlobalAurora databases";
|
|
247
|
+
};
|
|
248
|
+
readonly NAT_GATEWAY: {
|
|
249
|
+
readonly INTEGER: "NAT gateway count must be an integer";
|
|
250
|
+
readonly MIN: "NAT gateway count must be at least 0";
|
|
251
|
+
readonly MAX: "NAT gateway count cannot exceed 3";
|
|
252
|
+
};
|
|
253
|
+
readonly CIDR_MASK: {
|
|
254
|
+
readonly INTEGER: "CIDR mask must be an integer";
|
|
255
|
+
readonly MIN: "CIDR mask must be at least 16";
|
|
256
|
+
readonly MAX: "CIDR mask cannot exceed 28";
|
|
257
|
+
};
|
|
258
|
+
readonly CPU: {
|
|
259
|
+
readonly INTEGER: "CPU must be an integer";
|
|
260
|
+
readonly MIN: "CPU must be at least 256 units";
|
|
261
|
+
readonly MAX: "CPU cannot exceed 4096 units";
|
|
262
|
+
};
|
|
263
|
+
readonly KMS: {
|
|
264
|
+
readonly KEY_REQUIRED: "KMS key ARN is required when using KMS encryption";
|
|
265
|
+
};
|
|
266
|
+
readonly WEBSITE_BUCKET: {
|
|
267
|
+
readonly DOCUMENTS_REQUIRED: "Website index and error documents are required for website buckets";
|
|
268
|
+
};
|
|
269
|
+
readonly READER_INSTANCES: {
|
|
270
|
+
readonly MAX: "Cannot have more than 15 reader instances";
|
|
271
|
+
readonly COUNT_OR_INSTANCES: "Cannot specify both 'count' and 'instances' - use one or the other";
|
|
272
|
+
};
|
|
273
|
+
readonly GENERATOR_CAPACITY: {
|
|
274
|
+
readonly MIN: {
|
|
275
|
+
readonly MIN: "Minimum capacity must be at least 1";
|
|
276
|
+
readonly MAX: "Minimum capacity cannot exceed 1000";
|
|
277
|
+
};
|
|
278
|
+
readonly MAX: {
|
|
279
|
+
readonly MIN: "Maximum capacity must be at least 1";
|
|
280
|
+
readonly MAX: "Maximum capacity cannot exceed 1000";
|
|
281
|
+
};
|
|
282
|
+
};
|
|
283
|
+
readonly INSTANCE_TYPE: "Unknown instance type. Common types include: t4g.micro, t4g.small, m5.large";
|
|
284
|
+
readonly ARCHITECTURE_MISMATCH: "Architecture mismatch between instance type and AMI";
|
|
285
|
+
readonly ALLOCATED_STORAGE: {
|
|
286
|
+
readonly INTEGER: "Allocated storage must be an integer";
|
|
287
|
+
readonly MIN: "Allocated storage must be at least 20 GB";
|
|
288
|
+
readonly MAX: "Allocated storage cannot exceed 65536 GB";
|
|
289
|
+
};
|
|
290
|
+
readonly DLQ: {
|
|
291
|
+
readonly MAX_RECEIVE_COUNT: {
|
|
292
|
+
readonly INTEGER: "Max receive count must be an integer";
|
|
293
|
+
readonly MIN: "Max receive count must be at least 1";
|
|
294
|
+
readonly MAX: "Max receive count cannot exceed 1000";
|
|
295
|
+
};
|
|
296
|
+
};
|
|
297
|
+
readonly REGION: "Invalid AWS region";
|
|
298
|
+
}>;
|
|
299
|
+
export type ValidationPatternKey = keyof typeof VALIDATION_PATTERNS;
|
|
300
|
+
export type ValidationMessageKey = keyof typeof VALIDATION_MESSAGES;
|