@fjall/generator 0.95.0 → 0.99.1
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/.minified +1 -1
- package/dist/src/ast/astClickHouseParser.d.ts +25 -0
- package/dist/src/ast/astClickHouseParser.js +1 -0
- package/dist/src/ast/astCodeInjection.d.ts +9 -0
- package/dist/src/ast/astCodeInjection.js +8 -0
- package/dist/src/ast/astComputeParser.js +1 -1
- package/dist/src/ast/astComputeParserHelpers.js +1 -1
- package/dist/src/ast/astDatabaseParser.d.ts +5 -2
- package/dist/src/ast/astDatabaseParser.js +1 -1
- package/dist/src/ast/astInfrastructureParser.d.ts +7 -1
- package/dist/src/ast/astInfrastructureParser.js +1 -1
- package/dist/src/ast/astPlanConverter.js +2 -2
- package/dist/src/ast/astScheduleParser.d.ts +18 -0
- package/dist/src/ast/astScheduleParser.js +1 -0
- package/dist/src/ast/astStatementClassifier.d.ts +2 -2
- package/dist/src/ast/astStatementClassifier.js +1 -1
- package/dist/src/ast/astStatementQueries.d.ts +4 -4
- package/dist/src/ast/astStatementQueries.js +3 -3
- package/dist/src/ast/astSurgicalModification.d.ts +14 -12
- package/dist/src/ast/astSurgicalModification.js +6 -13
- package/dist/src/ast/astTestHelpers.d.ts +41 -7
- package/dist/src/ast/index.d.ts +3 -2
- package/dist/src/ast/index.js +1 -1
- package/dist/src/codemod/_internal.d.ts +6 -1
- package/dist/src/codemod/_internal.js +1 -1
- package/dist/src/codemod/drift/detect.d.ts +11 -0
- package/dist/src/codemod/drift/detect.js +1 -0
- package/dist/src/codemod/drift/index.d.ts +4 -0
- package/dist/src/codemod/drift/index.js +1 -0
- package/dist/src/codemod/drift/merge.d.ts +19 -0
- package/dist/src/codemod/drift/merge.js +1 -0
- package/dist/src/codemod/drift/snapshot.d.ts +4 -0
- package/dist/src/codemod/drift/snapshot.js +1 -0
- package/dist/src/codemod/drift/types.d.ts +60 -0
- package/dist/src/codemod/drift/types.js +1 -0
- package/dist/src/codemod/edits/addResource/propertyBuilder.d.ts +1 -1
- package/dist/src/codemod/edits/addResource/propertyBuilder.js +1 -1
- package/dist/src/codemod/edits/addResource.d.ts +8 -3
- package/dist/src/codemod/edits/addResource.js +1 -1
- package/dist/src/codemod/edits/controlFlowPolicy.d.ts +19 -0
- package/dist/src/codemod/edits/controlFlowPolicy.js +1 -0
- package/dist/src/codemod/edits/crossPlanConnection.d.ts +20 -0
- package/dist/src/codemod/edits/crossPlanConnection.js +1 -0
- package/dist/src/codemod/edits/driftPolicy.d.ts +7 -0
- package/dist/src/codemod/edits/driftPolicy.js +1 -0
- package/dist/src/codemod/edits/findInsertionPosition.js +1 -1
- package/dist/src/codemod/edits/index.d.ts +3 -0
- package/dist/src/codemod/edits/index.js +1 -1
- package/dist/src/codemod/edits/modifyResource.d.ts +9 -3
- package/dist/src/codemod/edits/modifyResource.js +1 -1
- package/dist/src/codemod/edits/removeResource.d.ts +2 -2
- package/dist/src/codemod/edits/removeResource.js +1 -1
- package/dist/src/codemod/edits/vpcPeer.d.ts +24 -0
- package/dist/src/codemod/edits/vpcPeer.js +1 -0
- package/dist/src/codemod/edits/vpcPeerAccepter.d.ts +20 -0
- package/dist/src/codemod/edits/vpcPeerAccepter.js +1 -0
- package/dist/src/codemod/index.d.ts +16 -4
- package/dist/src/codemod/index.js +1 -1
- package/dist/src/codemod/llmFallback/apply.d.ts +10 -0
- package/dist/src/codemod/llmFallback/apply.js +1 -0
- package/dist/src/codemod/llmFallback/claudeTier.d.ts +6 -0
- package/dist/src/codemod/llmFallback/claudeTier.js +1 -0
- package/dist/src/codemod/llmFallback/egressGate.d.ts +5 -0
- package/dist/src/codemod/llmFallback/egressGate.js +1 -0
- package/dist/src/codemod/llmFallback/egressGate.types.d.ts +9 -0
- package/dist/src/codemod/llmFallback/egressGate.types.js +0 -0
- package/dist/src/codemod/llmFallback/index.d.ts +6 -0
- package/dist/src/codemod/llmFallback/index.js +1 -0
- package/dist/src/codemod/llmFallback/morphTier.d.ts +2 -0
- package/dist/src/codemod/llmFallback/morphTier.js +3 -0
- package/dist/src/codemod/llmFallback/prompt.d.ts +12 -0
- package/dist/src/codemod/llmFallback/prompt.js +36 -0
- package/dist/src/codemod/llmFallback/runFallback.d.ts +13 -0
- package/dist/src/codemod/llmFallback/runFallback.js +1 -0
- package/dist/src/codemod/llmFallback/shouldTryFallback.d.ts +13 -0
- package/dist/src/codemod/llmFallback/shouldTryFallback.js +1 -0
- package/dist/src/codemod/llmFallback/signals.d.ts +4 -0
- package/dist/src/codemod/llmFallback/signals.js +1 -0
- package/dist/src/codemod/llmFallback/telemetryEvents.d.ts +141 -0
- package/dist/src/codemod/llmFallback/telemetryEvents.js +1 -0
- package/dist/src/codemod/llmFallback/tierRunner.d.ts +7 -0
- package/dist/src/codemod/llmFallback/tierRunner.js +1 -0
- package/dist/src/codemod/llmFallback/types.d.ts +104 -0
- package/dist/src/codemod/llmFallback/types.js +1 -0
- package/dist/src/codemod/registry.d.ts +4 -1
- package/dist/src/codemod/registry.js +1 -1
- package/dist/src/codemod/semanticIndex/classifyControlFlow.d.ts +2 -0
- package/dist/src/codemod/semanticIndex/classifyControlFlow.js +1 -0
- package/dist/src/codemod/semanticIndex/findReferences.js +2 -2
- package/dist/src/codemod/telemetry/errorKinds.d.ts +2 -0
- package/dist/src/codemod/telemetry/errorKinds.js +1 -0
- package/dist/src/codemod/types.d.ts +110 -1
- package/dist/src/codemod/types.js +1 -1
- package/dist/src/codemod/validationGate/gates/classify.d.ts +2 -0
- package/dist/src/codemod/validationGate/gates/classify.js +1 -0
- package/dist/src/codemod/validationGate/gates/drift.d.ts +2 -0
- package/dist/src/codemod/validationGate/gates/drift.js +1 -0
- package/dist/src/codemod/validationGate/gates/locate.d.ts +7 -0
- package/dist/src/codemod/validationGate/gates/locate.js +1 -0
- package/dist/src/codemod/validationGate/gates/parse.d.ts +2 -0
- package/dist/src/codemod/validationGate/gates/parse.js +1 -0
- package/dist/src/codemod/validationGate/gates/schema.d.ts +2 -0
- package/dist/src/codemod/validationGate/gates/schema.js +1 -0
- package/dist/src/codemod/validationGate/index.d.ts +6 -0
- package/dist/src/codemod/validationGate/index.js +1 -0
- package/dist/src/codemod/validationGate/types.d.ts +35 -0
- package/dist/src/codemod/validationGate/types.js +1 -0
- package/dist/src/detection/index.d.ts +148 -0
- package/dist/src/detection/index.js +1 -0
- package/dist/src/generation/common.d.ts +22 -0
- package/dist/src/generation/common.js +5 -4
- package/dist/src/generation/compute/ec2.d.ts +2 -0
- package/dist/src/generation/compute/ec2.js +4 -0
- package/dist/src/generation/compute/ecs.d.ts +2 -0
- package/dist/src/generation/compute/ecs.js +42 -0
- package/dist/src/generation/compute/lambda.d.ts +3 -0
- package/dist/src/generation/compute/lambda.js +26 -0
- package/dist/src/generation/compute/shared.d.ts +22 -0
- package/dist/src/generation/compute/shared.js +4 -0
- package/dist/src/generation/compute.d.ts +4 -5
- package/dist/src/generation/compute.js +6 -86
- package/dist/src/generation/database.d.ts +11 -0
- package/dist/src/generation/database.js +23 -12
- package/dist/src/generation/index.d.ts +1 -1
- package/dist/src/generation/index.js +1 -1
- package/dist/src/generation/infrastructure.js +5 -5
- package/dist/src/generation/storage.js +30 -30
- package/dist/src/index.d.ts +1 -1
- package/dist/src/index.js +1 -1
- package/dist/src/planning/index.d.ts +2 -1
- package/dist/src/planning/index.js +1 -1
- package/dist/src/planning/openNextPlanning.d.ts +38 -0
- package/dist/src/planning/openNextPlanning.js +1 -0
- package/dist/src/planning/resourceAddition.d.ts +5 -1
- package/dist/src/planning/resourceAddition.js +1 -1
- package/dist/src/planning/resourcePlanning.d.ts +0 -46
- package/dist/src/planning/resourcePlanning.js +1 -1
- package/dist/src/presets/clickhouseTierPreset.d.ts +35 -0
- package/dist/src/presets/clickhouseTierPreset.js +0 -0
- package/dist/src/presets/tierPresets.d.ts +5 -12
- package/dist/src/presets/tierPresets.js +1 -1
- package/dist/src/presets/tierTypes.d.ts +9 -19
- package/dist/src/schemas/applicationSchemas.d.ts +67 -8
- package/dist/src/schemas/applicationSchemas.js +1 -1
- package/dist/src/schemas/baseSchemas.d.ts +24 -5
- package/dist/src/schemas/baseSchemas.js +2 -2
- package/dist/src/schemas/computeSchemas.d.ts +108 -14
- package/dist/src/schemas/computeSchemas.js +1 -1
- package/dist/src/schemas/constants.d.ts +14 -0
- package/dist/src/schemas/constants.js +1 -1
- package/dist/src/schemas/databaseSchemas.d.ts +80 -0
- package/dist/src/schemas/databaseSchemas.js +1 -1
- package/dist/src/schemas/networkSchemas.d.ts +126 -11
- package/dist/src/schemas/networkSchemas.js +1 -1
- package/dist/src/schemas/patternSchemas.js +1 -1
- package/dist/src/schemas/sharedTypes.d.ts +1 -1
- package/dist/src/schemas/sharedTypes.js +1 -1
- package/dist/src/validation/patterns.d.ts +2 -318
- package/dist/src/validation/patterns.js +1 -1
- package/dist/src/validation/validationMessages.d.ts +315 -0
- package/dist/src/validation/validationMessages.js +1 -0
- package/dist/src/validation/validationPatterns.d.ts +34 -0
- package/dist/src/validation/validationPatterns.js +1 -0
- package/dist/src/version.d.ts +1 -1
- package/dist/src/version.js +1 -1
- package/package.json +19 -13
|
@@ -1,318 +1,2 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
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
|
-
readonly WARM_POOL_REQUIRED: "minCapacity 0 requires a warmPool — without it, new tasks wait 60-90s for a cold instance launch";
|
|
108
|
-
readonly WARM_POOL: {
|
|
109
|
-
readonly MIN_SIZE: {
|
|
110
|
-
readonly INTEGER: "Warm pool minSize must be an integer";
|
|
111
|
-
readonly MIN: "Warm pool minSize must be at least 0";
|
|
112
|
-
readonly MAX: "Warm pool minSize cannot exceed 100";
|
|
113
|
-
};
|
|
114
|
-
readonly MIN_SIZE_EXCEEDS_MAX_CAPACITY: "warmPool.minSize cannot exceed maxCapacity — the warm pool cannot hold more instances than the ASG allows";
|
|
115
|
-
};
|
|
116
|
-
};
|
|
117
|
-
readonly MEMORY_LIMIT: {
|
|
118
|
-
readonly INTEGER: "Memory limit must be an integer";
|
|
119
|
-
readonly MIN_512: "Memory limit must be at least 512 MiB";
|
|
120
|
-
readonly MIN_128: "Memory limit must be at least 128 MiB";
|
|
121
|
-
readonly MAX: "Memory limit cannot exceed 30720 MiB";
|
|
122
|
-
};
|
|
123
|
-
readonly DATABASE: {
|
|
124
|
-
readonly PORT: {
|
|
125
|
-
readonly INTEGER: "Database port must be an integer";
|
|
126
|
-
readonly MIN: "Database port must be at least 1024";
|
|
127
|
-
readonly MAX: "Database port cannot exceed 65535";
|
|
128
|
-
};
|
|
129
|
-
readonly NAME: {
|
|
130
|
-
readonly REQUIRED: "Database name is required";
|
|
131
|
-
readonly MAX_LENGTH: "Database name cannot exceed 64 characters";
|
|
132
|
-
};
|
|
133
|
-
};
|
|
134
|
-
readonly BACKUP_RETENTION: {
|
|
135
|
-
readonly INTEGER: "Backup retention must be an integer";
|
|
136
|
-
readonly MIN: "Backup retention must be at least 1 day";
|
|
137
|
-
readonly MAX: "Backup retention cannot exceed 35 days";
|
|
138
|
-
};
|
|
139
|
-
readonly SQS: {
|
|
140
|
-
readonly VISIBILITY_TIMEOUT: {
|
|
141
|
-
readonly INTEGER: "Visibility timeout must be an integer";
|
|
142
|
-
readonly MIN: "Visibility timeout must be at least 0 seconds";
|
|
143
|
-
readonly MAX: "Visibility timeout cannot exceed 43200 seconds (12 hours)";
|
|
144
|
-
};
|
|
145
|
-
readonly RETENTION_PERIOD: {
|
|
146
|
-
readonly INTEGER: "Retention period must be an integer";
|
|
147
|
-
readonly MIN: "Retention period must be at least 60 seconds";
|
|
148
|
-
readonly MAX: "Retention period cannot exceed 1209600 seconds (14 days)";
|
|
149
|
-
};
|
|
150
|
-
};
|
|
151
|
-
readonly READER: {
|
|
152
|
-
readonly COUNT: {
|
|
153
|
-
readonly INTEGER: "Reader count must be an integer";
|
|
154
|
-
readonly MIN: "Reader count must be at least 0";
|
|
155
|
-
readonly MAX: "Reader count cannot exceed 15";
|
|
156
|
-
};
|
|
157
|
-
};
|
|
158
|
-
readonly IDENTIFIER_SUFFIX: {
|
|
159
|
-
readonly REQUIRED: "Identifier suffix is required when specified";
|
|
160
|
-
readonly MAX_LENGTH: "Identifier suffix cannot exceed 50 characters";
|
|
161
|
-
};
|
|
162
|
-
readonly ROTATION: {
|
|
163
|
-
readonly INTEGER: "Rotation days must be an integer";
|
|
164
|
-
readonly MIN: "Rotation interval must be at least 1 day";
|
|
165
|
-
readonly MAX: "Rotation interval cannot exceed 365 days";
|
|
166
|
-
};
|
|
167
|
-
readonly MAX_CONNECTIONS: {
|
|
168
|
-
readonly INTEGER: "Max connections must be an integer";
|
|
169
|
-
readonly MIN: "Max connections must be at least 1";
|
|
170
|
-
readonly MAX: "Max connections cannot exceed 100";
|
|
171
|
-
};
|
|
172
|
-
readonly MONITORING_INTERVAL: {
|
|
173
|
-
readonly INTEGER: "Monitoring interval must be an integer";
|
|
174
|
-
readonly MIN: "Monitoring interval must be at least 0";
|
|
175
|
-
readonly MAX: "Monitoring interval cannot exceed 60 seconds";
|
|
176
|
-
readonly VALUES: "Monitoring interval must be 0, 1, 5, 10, 15, 30, or 60 seconds";
|
|
177
|
-
};
|
|
178
|
-
readonly RETENTION_DAYS: {
|
|
179
|
-
readonly INTEGER: "Retention days must be an integer";
|
|
180
|
-
readonly MIN: "Retention days must be at least 1";
|
|
181
|
-
readonly MAX: "Retention days cannot exceed 365";
|
|
182
|
-
};
|
|
183
|
-
readonly BATCH_SIZE: {
|
|
184
|
-
readonly INTEGER: "Batch size must be an integer";
|
|
185
|
-
readonly MIN: "Batch size must be at least 1";
|
|
186
|
-
readonly MAX: "Batch size cannot exceed 10000";
|
|
187
|
-
};
|
|
188
|
-
readonly SERVICE: {
|
|
189
|
-
readonly UNIQUE_WITHIN_CLUSTER: "Service names must be unique within a cluster";
|
|
190
|
-
readonly MIN_REQUIRED: "At least one service is required";
|
|
191
|
-
readonly ROUTING_REQUIRED: "Multiple services with ports require routing config (path or host)";
|
|
192
|
-
};
|
|
193
|
-
readonly PROXY_CONFIG: {
|
|
194
|
-
readonly MAX_IDLE_CONNECTIONS: {
|
|
195
|
-
readonly INTEGER: "Max idle connections must be an integer";
|
|
196
|
-
readonly MIN: "Max idle connections must be at least 0";
|
|
197
|
-
readonly MAX: "Max idle connections cannot exceed 100";
|
|
198
|
-
};
|
|
199
|
-
readonly BORROW_TIMEOUT: {
|
|
200
|
-
readonly INTEGER: "Connection borrow timeout must be an integer";
|
|
201
|
-
readonly MIN: "Connection borrow timeout must be at least 1 second";
|
|
202
|
-
readonly MAX: "Connection borrow timeout cannot exceed 3600 seconds";
|
|
203
|
-
};
|
|
204
|
-
};
|
|
205
|
-
readonly MAX_AZS: {
|
|
206
|
-
readonly INTEGER: "Max AZs must be an integer";
|
|
207
|
-
readonly MIN: "Max AZs must be at least 1";
|
|
208
|
-
readonly MAX: "Max AZs cannot exceed 3";
|
|
209
|
-
};
|
|
210
|
-
readonly BATCHING_WINDOW: {
|
|
211
|
-
readonly INTEGER: "Max batching window must be an integer";
|
|
212
|
-
readonly MIN: "Max batching window must be at least 0";
|
|
213
|
-
readonly MAX: "Max batching window cannot exceed 300 seconds";
|
|
214
|
-
};
|
|
215
|
-
readonly HEALTH_CHECK: {
|
|
216
|
-
readonly INTERVAL: {
|
|
217
|
-
readonly INTEGER: "Health check interval must be an integer";
|
|
218
|
-
readonly MIN: "Health check interval must be at least 5 seconds";
|
|
219
|
-
readonly MAX: "Health check interval cannot exceed 300 seconds";
|
|
220
|
-
};
|
|
221
|
-
readonly TIMEOUT: {
|
|
222
|
-
readonly INTEGER: "Health check timeout must be an integer";
|
|
223
|
-
readonly MIN: "Health check timeout must be at least 2 seconds";
|
|
224
|
-
readonly MAX: "Health check timeout cannot exceed 60 seconds";
|
|
225
|
-
};
|
|
226
|
-
readonly RETRIES: {
|
|
227
|
-
readonly INTEGER: "Health check retries must be an integer";
|
|
228
|
-
readonly MIN: "Health check retries must be at least 1";
|
|
229
|
-
readonly MAX: "Health check retries cannot exceed 10";
|
|
230
|
-
};
|
|
231
|
-
readonly START_PERIOD: {
|
|
232
|
-
readonly INTEGER: "Health check start period must be an integer";
|
|
233
|
-
readonly MIN: "Health check start period must be at least 0 seconds";
|
|
234
|
-
readonly MAX: "Health check start period cannot exceed 300 seconds";
|
|
235
|
-
};
|
|
236
|
-
};
|
|
237
|
-
readonly EPHEMERAL_STORAGE: {
|
|
238
|
-
readonly INTEGER: "Ephemeral storage size must be an integer";
|
|
239
|
-
readonly MIN: "Ephemeral storage size must be at least 512 MB";
|
|
240
|
-
readonly MAX: "Ephemeral storage size cannot exceed 10240 MB";
|
|
241
|
-
};
|
|
242
|
-
readonly MAX_MESSAGE_SIZE: {
|
|
243
|
-
readonly INTEGER: "Max message size must be an integer";
|
|
244
|
-
readonly MIN: "Max message size must be at least 1024 bytes";
|
|
245
|
-
readonly MAX: "Max message size cannot exceed 262144 bytes (256 KB)";
|
|
246
|
-
};
|
|
247
|
-
readonly CAPACITY_CONSTRAINT: {
|
|
248
|
-
readonly MIN_LTE_MAX: "minCapacity must be less than or equal to maxCapacity";
|
|
249
|
-
};
|
|
250
|
-
readonly DIRECT_ACCESS: {
|
|
251
|
-
readonly NO_DOMAIN: "directAccess cannot be used with domain (no ALB for HTTPS)";
|
|
252
|
-
readonly NO_LOAD_BALANCER: "directAccess cannot be used with loadBalancer (mutually exclusive)";
|
|
253
|
-
};
|
|
254
|
-
readonly GLOBAL_AURORA: {
|
|
255
|
-
readonly PRIMARY_REGION_REQUIRED: "primaryRegion is required for GlobalAurora databases";
|
|
256
|
-
};
|
|
257
|
-
readonly NAT_GATEWAY: {
|
|
258
|
-
readonly INTEGER: "NAT gateway count must be an integer";
|
|
259
|
-
readonly MIN: "NAT gateway count must be at least 0";
|
|
260
|
-
readonly MAX: "NAT gateway count cannot exceed 3";
|
|
261
|
-
};
|
|
262
|
-
readonly CIDR_MASK: {
|
|
263
|
-
readonly INTEGER: "CIDR mask must be an integer";
|
|
264
|
-
readonly MIN: "CIDR mask must be at least 16";
|
|
265
|
-
readonly MAX: "CIDR mask cannot exceed 28";
|
|
266
|
-
};
|
|
267
|
-
readonly CPU: {
|
|
268
|
-
readonly INTEGER: "CPU must be an integer";
|
|
269
|
-
readonly MIN: "CPU must be at least 256 units";
|
|
270
|
-
readonly MAX: "CPU cannot exceed 4096 units";
|
|
271
|
-
};
|
|
272
|
-
readonly KMS: {
|
|
273
|
-
readonly KEY_REQUIRED: "KMS key ARN is required when using KMS encryption";
|
|
274
|
-
};
|
|
275
|
-
readonly WEBSITE_BUCKET: {
|
|
276
|
-
readonly DOCUMENTS_REQUIRED: "Website index and error documents are required for website buckets";
|
|
277
|
-
};
|
|
278
|
-
readonly READER_INSTANCES: {
|
|
279
|
-
readonly MAX: "Cannot have more than 15 reader instances";
|
|
280
|
-
readonly COUNT_OR_INSTANCES: "Cannot specify both 'count' and 'instances' - use one or the other";
|
|
281
|
-
};
|
|
282
|
-
readonly GENERATOR_CAPACITY: {
|
|
283
|
-
readonly MIN: {
|
|
284
|
-
readonly MIN: "Minimum capacity must be at least 1";
|
|
285
|
-
readonly MAX: "Minimum capacity cannot exceed 1000";
|
|
286
|
-
};
|
|
287
|
-
readonly MAX: {
|
|
288
|
-
readonly MIN: "Maximum capacity must be at least 1";
|
|
289
|
-
readonly MAX: "Maximum capacity cannot exceed 1000";
|
|
290
|
-
};
|
|
291
|
-
};
|
|
292
|
-
readonly INSTANCE_TYPE: "Unknown instance type. Common types include: t4g.micro, t4g.small, m5.large";
|
|
293
|
-
readonly ARCHITECTURE_MISMATCH: "Architecture mismatch between instance type and AMI";
|
|
294
|
-
readonly ALLOCATED_STORAGE: {
|
|
295
|
-
readonly INTEGER: "Allocated storage must be an integer";
|
|
296
|
-
readonly MIN: "Allocated storage must be at least 20 GB";
|
|
297
|
-
readonly MAX: "Allocated storage cannot exceed 65536 GB";
|
|
298
|
-
};
|
|
299
|
-
readonly DLQ: {
|
|
300
|
-
readonly MAX_RECEIVE_COUNT: {
|
|
301
|
-
readonly INTEGER: "Max receive count must be an integer";
|
|
302
|
-
readonly MIN: "Max receive count must be at least 1";
|
|
303
|
-
readonly MAX: "Max receive count cannot exceed 1000";
|
|
304
|
-
};
|
|
305
|
-
};
|
|
306
|
-
readonly ALARM: {
|
|
307
|
-
readonly PERCENTAGE: {
|
|
308
|
-
readonly MIN: "Threshold must be at least 1%";
|
|
309
|
-
readonly MAX: "Threshold must be at most 100%";
|
|
310
|
-
};
|
|
311
|
-
readonly FREE_STORAGE_GIB: {
|
|
312
|
-
readonly MIN: "Free storage threshold must be at least 1 GiB";
|
|
313
|
-
};
|
|
314
|
-
};
|
|
315
|
-
readonly REGION: "Invalid AWS region";
|
|
316
|
-
}>;
|
|
317
|
-
export type ValidationPatternKey = keyof typeof VALIDATION_PATTERNS;
|
|
318
|
-
export type ValidationMessageKey = keyof typeof VALIDATION_MESSAGES;
|
|
1
|
+
export { VALIDATION_PATTERNS, parseRateExpression, type ValidationPatternKey, } from "./validationPatterns.js";
|
|
2
|
+
export { VALIDATION_MESSAGES, type ValidationMessageKey, } from "./validationMessages.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=Object.freeze({IDENTIFIER:/^[a-zA-Z][a-zA-Z0-9-]*$/,RESOURCE_NAME:/^[a-zA-Z][a-zA-Z0-9]*$/,ECS_SERVICE_NAME:/^[a-zA-Z][a-zA-Z0-9-]*$/,BUCKET_NAME:/^[a-z][a-z0-9-]*[a-z0-9]$|^[a-z][a-z0-9]*$/,DATABASE_NAME:/^[a-zA-Z][a-zA-Z0-9_]*$/,RESOURCE_TYPE:/^[a-z]+(:[a-z]+)?$/,SSM_PATH:/^\/[a-zA-Z][a-zA-Z0-9-]*(\/[a-zA-Z][a-zA-Z0-9-]*)*$/,SECRET_NAME:/^[a-zA-Z_][a-zA-Z0-9._-]*$/,SSM_COMPONENT:/^[a-zA-Z][a-zA-Z0-9._-]*$/,EMAIL:/^[^\s@]+@[^\s@]+\.[^\s@]+$/,DOCKER_IMAGE:/^[a-z0-9][a-z0-9._-]*[a-z0-9](:[a-z0-9._-]+)?$/,DOMAIN:/^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)+$/i}),t=Object.freeze({IDENTIFIER:"Must start with a letter, contain only letters, numbers, and hyphens",IDENTIFIER_MIN_LENGTH:"Must be at least 2 characters",IDENTIFIER_NO_TRAILING_HYPHEN:"Must not end with a hyphen",IDENTIFIER_NO_CONSECUTIVE_HYPHENS:"Must not contain consecutive hyphens",RESOURCE_NAME:"Must start with a letter and contain only letters and numbers (PascalCase recommended)",ECS_SERVICE_NAME:"Service name must start with a letter and contain only letters, numbers, and hyphens",BUCKET_NAME:"Bucket name must start with a lowercase letter and contain only lowercase letters, numbers, and hyphens",DATABASE_NAME:"Database name must start with a letter and contain only letters, numbers, and underscores",RESOURCE_TYPE:"Resource type must be in format 'category' or 'category:type'",SSM_PATH:"SSM path must start with / and contain valid namespace segments (e.g., /myapp/ApiCluster/service)",SECRET_NAME:"Secret name must start with a letter or underscore and contain only letters, numbers, underscores, hyphens, or periods",SSM_COMPONENT:"Must start with a letter and contain only letters, numbers, periods, hyphens, or underscores",EMAIL:"Please enter a valid email address",DOMAIN:"Please enter a valid domain (e.g., cms.example.com)",DOCKER_IMAGE:"Invalid Docker image name format",REQUIRED:{APP_NAME:"Application name is required",RESOURCE_NAME:"Resource name is required",BUCKET_NAME:"Bucket name is required",SERVICE_NAME:"Service name is required",NETWORK_NAME:"Network name is required",DATABASE_NAME:"Database name is required",ORGANISATION_NAME:"Organisation name is required",EMAIL:"Email is required",NAME:"Name is required",USERNAME:"Username is required",CONTAINER_NAME:"Container name is required",FIRST_NAME:"First name is required",LAST_NAME:"Last name is required",GROUP:"Group is required",PATTERN_NAME:"Pattern name is required",ROUTING_PATH:"Routing path is required",RESOURCE_TYPE:"Resource type is required",VARIANT:"Variant is required",SUBTYPE:"Subtype is required",DEPLOY_TARGET:"Deploy target is required",DESTROY_TARGET:"Destroy target is required"},MAX_LENGTH:{APP_NAME:"Application name must be 50 characters or less",RESOURCE_NAME:"Resource name must be 63 characters or less",BUCKET_NAME:"Bucket name must be 63 characters or less",SERVICE_NAME:"Service name must be 255 characters or less",NETWORK_NAME:"Network name must be 50 characters or less",DATABASE_NAME:"Database name must be 63 characters or less",ORGANISATION_NAME:"Organisation name must be 50 characters or less"},PORT:{INTEGER:"Port must be an integer",MIN:"Port must be at least 1",MAX:"Port cannot exceed 65535"},USERNAME:{MAX_LENGTH:"Username cannot exceed 63 characters"},LAMBDA:{MEMORY:{INTEGER:"Lambda memory must be an integer",MIN:"Memory must be at least 128 MB",MAX:"Memory cannot exceed 10240 MB",MULTIPLE:"Memory must be 128 MB or a multiple of 64 MB"},TIMEOUT:{INTEGER:"Timeout must be an integer",MIN:"Timeout must be at least 1 second",MAX:"Timeout cannot exceed 900 seconds"}},PRIORITY:{INTEGER:"Priority must be an integer",MIN:"Priority must be at least 1",MAX:"Priority cannot exceed 50000"},CAPACITY:{MIN:{INTEGER:"Minimum capacity must be an integer",MIN_0:"Minimum capacity must be at least 0",MIN_1:"Minimum capacity must be at least 1",MAX:"Minimum capacity cannot exceed 100"},MAX:{INTEGER:"Maximum capacity must be an integer",MIN_0:"Maximum capacity must be at least 0",MIN_1:"Maximum capacity must be at least 1",MAX:"Maximum capacity cannot exceed 100"},DESIRED:{INTEGER:"Desired count must be an integer",MIN:"Desired count must be at least 0",MAX:"Desired count cannot exceed 100"},WARM_POOL_REQUIRED:"minCapacity 0 requires a warmPool \u2014 without it, new tasks wait 60-90s for a cold instance launch",WARM_POOL:{MIN_SIZE:{INTEGER:"Warm pool minSize must be an integer",MIN:"Warm pool minSize must be at least 0",MAX:"Warm pool minSize cannot exceed 100"},MIN_SIZE_EXCEEDS_MAX_CAPACITY:"warmPool.minSize cannot exceed maxCapacity \u2014 the warm pool cannot hold more instances than the ASG allows"}},MEMORY_LIMIT:{INTEGER:"Memory limit must be an integer",MIN_512:"Memory limit must be at least 512 MiB",MIN_128:"Memory limit must be at least 128 MiB",MAX:"Memory limit cannot exceed 30720 MiB"},DATABASE:{PORT:{INTEGER:"Database port must be an integer",MIN:"Database port must be at least 1024",MAX:"Database port cannot exceed 65535"},NAME:{REQUIRED:"Database name is required",MAX_LENGTH:"Database name cannot exceed 64 characters"}},BACKUP_RETENTION:{INTEGER:"Backup retention must be an integer",MIN:"Backup retention must be at least 1 day",MAX:"Backup retention cannot exceed 35 days"},SQS:{VISIBILITY_TIMEOUT:{INTEGER:"Visibility timeout must be an integer",MIN:"Visibility timeout must be at least 0 seconds",MAX:"Visibility timeout cannot exceed 43200 seconds (12 hours)"},RETENTION_PERIOD:{INTEGER:"Retention period must be an integer",MIN:"Retention period must be at least 60 seconds",MAX:"Retention period cannot exceed 1209600 seconds (14 days)"}},READER:{COUNT:{INTEGER:"Reader count must be an integer",MIN:"Reader count must be at least 0",MAX:"Reader count cannot exceed 15"}},IDENTIFIER_SUFFIX:{REQUIRED:"Identifier suffix is required when specified",MAX_LENGTH:"Identifier suffix cannot exceed 50 characters"},ROTATION:{INTEGER:"Rotation days must be an integer",MIN:"Rotation interval must be at least 1 day",MAX:"Rotation interval cannot exceed 365 days"},MAX_CONNECTIONS:{INTEGER:"Max connections must be an integer",MIN:"Max connections must be at least 1",MAX:"Max connections cannot exceed 100"},MONITORING_INTERVAL:{INTEGER:"Monitoring interval must be an integer",MIN:"Monitoring interval must be at least 0",MAX:"Monitoring interval cannot exceed 60 seconds",VALUES:"Monitoring interval must be 0, 1, 5, 10, 15, 30, or 60 seconds"},RETENTION_DAYS:{INTEGER:"Retention days must be an integer",MIN:"Retention days must be at least 1",MAX:"Retention days cannot exceed 365"},BATCH_SIZE:{INTEGER:"Batch size must be an integer",MIN:"Batch size must be at least 1",MAX:"Batch size cannot exceed 10000"},SERVICE:{UNIQUE_WITHIN_CLUSTER:"Service names must be unique within a cluster",MIN_REQUIRED:"At least one service is required",ROUTING_REQUIRED:"Multiple services with ports require routing config (path or host)"},PROXY_CONFIG:{MAX_IDLE_CONNECTIONS:{INTEGER:"Max idle connections must be an integer",MIN:"Max idle connections must be at least 0",MAX:"Max idle connections cannot exceed 100"},BORROW_TIMEOUT:{INTEGER:"Connection borrow timeout must be an integer",MIN:"Connection borrow timeout must be at least 1 second",MAX:"Connection borrow timeout cannot exceed 3600 seconds"}},MAX_AZS:{INTEGER:"Max AZs must be an integer",MIN:"Max AZs must be at least 1",MAX:"Max AZs cannot exceed 3"},BATCHING_WINDOW:{INTEGER:"Max batching window must be an integer",MIN:"Max batching window must be at least 0",MAX:"Max batching window cannot exceed 300 seconds"},HEALTH_CHECK:{INTERVAL:{INTEGER:"Health check interval must be an integer",MIN:"Health check interval must be at least 5 seconds",MAX:"Health check interval cannot exceed 300 seconds"},TIMEOUT:{INTEGER:"Health check timeout must be an integer",MIN:"Health check timeout must be at least 2 seconds",MAX:"Health check timeout cannot exceed 60 seconds"},RETRIES:{INTEGER:"Health check retries must be an integer",MIN:"Health check retries must be at least 1",MAX:"Health check retries cannot exceed 10"},START_PERIOD:{INTEGER:"Health check start period must be an integer",MIN:"Health check start period must be at least 0 seconds",MAX:"Health check start period cannot exceed 300 seconds"}},EPHEMERAL_STORAGE:{INTEGER:"Ephemeral storage size must be an integer",MIN:"Ephemeral storage size must be at least 512 MB",MAX:"Ephemeral storage size cannot exceed 10240 MB"},MAX_MESSAGE_SIZE:{INTEGER:"Max message size must be an integer",MIN:"Max message size must be at least 1024 bytes",MAX:"Max message size cannot exceed 262144 bytes (256 KB)"},CAPACITY_CONSTRAINT:{MIN_LTE_MAX:"minCapacity must be less than or equal to maxCapacity"},DIRECT_ACCESS:{NO_DOMAIN:"directAccess cannot be used with domain (no ALB for HTTPS)",NO_LOAD_BALANCER:"directAccess cannot be used with loadBalancer (mutually exclusive)"},GLOBAL_AURORA:{PRIMARY_REGION_REQUIRED:"primaryRegion is required for GlobalAurora databases"},NAT_GATEWAY:{INTEGER:"NAT gateway count must be an integer",MIN:"NAT gateway count must be at least 0",MAX:"NAT gateway count cannot exceed 3"},CIDR_MASK:{INTEGER:"CIDR mask must be an integer",MIN:"CIDR mask must be at least 16",MAX:"CIDR mask cannot exceed 28"},CPU:{INTEGER:"CPU must be an integer",MIN:"CPU must be at least 256 units",MAX:"CPU cannot exceed 4096 units"},KMS:{KEY_REQUIRED:"KMS key ARN is required when using KMS encryption"},WEBSITE_BUCKET:{DOCUMENTS_REQUIRED:"Website index and error documents are required for website buckets"},READER_INSTANCES:{MAX:"Cannot have more than 15 reader instances",COUNT_OR_INSTANCES:"Cannot specify both 'count' and 'instances' - use one or the other"},GENERATOR_CAPACITY:{MIN:{MIN:"Minimum capacity must be at least 1",MAX:"Minimum capacity cannot exceed 1000"},MAX:{MIN:"Maximum capacity must be at least 1",MAX:"Maximum capacity cannot exceed 1000"}},INSTANCE_TYPE:"Unknown instance type. Common types include: t4g.micro, t4g.small, m5.large",ARCHITECTURE_MISMATCH:"Architecture mismatch between instance type and AMI",ALLOCATED_STORAGE:{INTEGER:"Allocated storage must be an integer",MIN:"Allocated storage must be at least 20 GB",MAX:"Allocated storage cannot exceed 65536 GB"},DLQ:{MAX_RECEIVE_COUNT:{INTEGER:"Max receive count must be an integer",MIN:"Max receive count must be at least 1",MAX:"Max receive count cannot exceed 1000"}},ALARM:{PERCENTAGE:{MIN:"Threshold must be at least 1%",MAX:"Threshold must be at most 100%"},FREE_STORAGE_GIB:{MIN:"Free storage threshold must be at least 1 GiB"}},REGION:"Invalid AWS region"});export{t as VALIDATION_MESSAGES,e as VALIDATION_PATTERNS};
|
|
1
|
+
import{VALIDATION_PATTERNS as e,parseRateExpression as o}from"./validationPatterns.js";import{VALIDATION_MESSAGES as E}from"./validationMessages.js";export{E as VALIDATION_MESSAGES,e as VALIDATION_PATTERNS,o as parseRateExpression};
|
|
@@ -0,0 +1,315 @@
|
|
|
1
|
+
export declare const VALIDATION_MESSAGES: Readonly<{
|
|
2
|
+
readonly IDENTIFIER: "Must start with a letter, contain only letters, numbers, and hyphens";
|
|
3
|
+
readonly IDENTIFIER_MIN_LENGTH: "Must be at least 2 characters";
|
|
4
|
+
readonly IDENTIFIER_NO_TRAILING_HYPHEN: "Must not end with a hyphen";
|
|
5
|
+
readonly IDENTIFIER_NO_CONSECUTIVE_HYPHENS: "Must not contain consecutive hyphens";
|
|
6
|
+
readonly RESOURCE_NAME: "Must start with a letter and contain only letters and numbers (PascalCase recommended)";
|
|
7
|
+
readonly ECS_SERVICE_NAME: "Service name must start with a letter and contain only letters, numbers, and hyphens";
|
|
8
|
+
readonly BUCKET_NAME: "Bucket name must start with a lowercase letter and contain only lowercase letters, numbers, and hyphens";
|
|
9
|
+
readonly DATABASE_NAME: "Database name must start with a letter and contain only letters, numbers, and underscores";
|
|
10
|
+
readonly RESOURCE_TYPE: "Resource type must be in format 'category' or 'category:type'";
|
|
11
|
+
readonly SSM_PATH: "SSM path must start with / and contain valid namespace segments (e.g., /myapp/ApiCluster/service)";
|
|
12
|
+
readonly SECRET_NAME: "Secret name must start with a letter or underscore and contain only letters, numbers, underscores, hyphens, or periods";
|
|
13
|
+
readonly SSM_COMPONENT: "Must start with a letter and contain only letters, numbers, periods, hyphens, or underscores";
|
|
14
|
+
readonly EMAIL: "Please enter a valid email address";
|
|
15
|
+
readonly DOMAIN: "Please enter a valid domain (e.g., cms.example.com)";
|
|
16
|
+
readonly DOCKER_IMAGE: "Invalid Docker image name format";
|
|
17
|
+
readonly REQUIRED: {
|
|
18
|
+
readonly APP_NAME: "Application name is required";
|
|
19
|
+
readonly RESOURCE_NAME: "Resource name is required";
|
|
20
|
+
readonly BUCKET_NAME: "Bucket name is required";
|
|
21
|
+
readonly SERVICE_NAME: "Service name is required";
|
|
22
|
+
readonly NETWORK_NAME: "Network name is required";
|
|
23
|
+
readonly DATABASE_NAME: "Database name is required";
|
|
24
|
+
readonly ORGANISATION_NAME: "Organisation name is required";
|
|
25
|
+
readonly EMAIL: "Email is required";
|
|
26
|
+
readonly NAME: "Name is required";
|
|
27
|
+
readonly USERNAME: "Username is required";
|
|
28
|
+
readonly CONTAINER_NAME: "Container name is required";
|
|
29
|
+
readonly FIRST_NAME: "First name is required";
|
|
30
|
+
readonly LAST_NAME: "Last name is required";
|
|
31
|
+
readonly GROUP: "Group is required";
|
|
32
|
+
readonly PATTERN_NAME: "Pattern name is required";
|
|
33
|
+
readonly ROUTING_PATH: "Routing path is required";
|
|
34
|
+
readonly RESOURCE_REFERENCE: "Resource reference is required";
|
|
35
|
+
readonly RESOURCE_TYPE: "Resource type is required";
|
|
36
|
+
readonly VARIANT: "Variant is required";
|
|
37
|
+
readonly SUBTYPE: "Subtype is required";
|
|
38
|
+
readonly DEPLOY_TARGET: "Deploy target is required";
|
|
39
|
+
readonly DESTROY_TARGET: "Destroy target is required";
|
|
40
|
+
};
|
|
41
|
+
readonly MAX_LENGTH: {
|
|
42
|
+
readonly APP_NAME: "Application name must be 50 characters or less";
|
|
43
|
+
readonly RESOURCE_NAME: "Resource name must be 63 characters or less";
|
|
44
|
+
readonly BUCKET_NAME: "Bucket name must be 63 characters or less";
|
|
45
|
+
readonly SERVICE_NAME: "Service name must be 255 characters or less";
|
|
46
|
+
readonly NETWORK_NAME: "Network name must be 50 characters or less";
|
|
47
|
+
readonly DATABASE_NAME: "Database name must be 63 characters or less";
|
|
48
|
+
readonly ORGANISATION_NAME: "Organisation name must be 50 characters or less";
|
|
49
|
+
};
|
|
50
|
+
readonly PORT: {
|
|
51
|
+
readonly INTEGER: "Port must be an integer";
|
|
52
|
+
readonly MIN: "Port must be at least 1";
|
|
53
|
+
readonly MAX: "Port cannot exceed 65535";
|
|
54
|
+
};
|
|
55
|
+
readonly USERNAME: {
|
|
56
|
+
readonly MAX_LENGTH: "Username cannot exceed 63 characters";
|
|
57
|
+
};
|
|
58
|
+
readonly LAMBDA: {
|
|
59
|
+
readonly MEMORY: {
|
|
60
|
+
readonly INTEGER: "Lambda memory must be an integer";
|
|
61
|
+
readonly MIN: "Memory must be at least 128 MB";
|
|
62
|
+
readonly MAX: "Memory cannot exceed 10240 MB";
|
|
63
|
+
readonly MULTIPLE: "Memory must be 128 MB or a multiple of 64 MB";
|
|
64
|
+
};
|
|
65
|
+
readonly TIMEOUT: {
|
|
66
|
+
readonly INTEGER: "Timeout must be an integer";
|
|
67
|
+
readonly MIN: "Timeout must be at least 1 second";
|
|
68
|
+
readonly MAX: "Timeout cannot exceed 900 seconds";
|
|
69
|
+
};
|
|
70
|
+
readonly RUNTIME: "Lambda runtime must contain only letters, digits, dots, underscores, or dashes (e.g. 'NODEJS_20_X' or 'nodejs20.x')";
|
|
71
|
+
};
|
|
72
|
+
readonly ENV_VAR_NAME: "Environment variable names must start with a letter or underscore and contain only letters, digits, and underscores";
|
|
73
|
+
readonly PRIORITY: {
|
|
74
|
+
readonly INTEGER: "Priority must be an integer";
|
|
75
|
+
readonly MIN: "Priority must be at least 1";
|
|
76
|
+
readonly MAX: "Priority cannot exceed 50000";
|
|
77
|
+
};
|
|
78
|
+
readonly CAPACITY: {
|
|
79
|
+
readonly MIN: {
|
|
80
|
+
readonly INTEGER: "Minimum capacity must be an integer";
|
|
81
|
+
readonly MIN_0: "Minimum capacity must be at least 0";
|
|
82
|
+
readonly MIN_1: "Minimum capacity must be at least 1";
|
|
83
|
+
readonly MAX: "Minimum capacity cannot exceed 100";
|
|
84
|
+
};
|
|
85
|
+
readonly MAX: {
|
|
86
|
+
readonly INTEGER: "Maximum capacity must be an integer";
|
|
87
|
+
readonly MIN_0: "Maximum capacity must be at least 0";
|
|
88
|
+
readonly MIN_1: "Maximum capacity must be at least 1";
|
|
89
|
+
readonly MAX: "Maximum capacity cannot exceed 100";
|
|
90
|
+
};
|
|
91
|
+
readonly DESIRED: {
|
|
92
|
+
readonly INTEGER: "Desired count must be an integer";
|
|
93
|
+
readonly MIN: "Desired count must be at least 0";
|
|
94
|
+
readonly MAX: "Desired count cannot exceed 100";
|
|
95
|
+
};
|
|
96
|
+
readonly WARM_POOL_REQUIRED: "minCapacity 0 requires a warmPool — without it, new tasks wait 60-90s for a cold instance launch";
|
|
97
|
+
readonly WARM_POOL: {
|
|
98
|
+
readonly MIN_SIZE: {
|
|
99
|
+
readonly INTEGER: "Warm pool minSize must be an integer";
|
|
100
|
+
readonly MIN: "Warm pool minSize must be at least 0";
|
|
101
|
+
readonly MAX: "Warm pool minSize cannot exceed 100";
|
|
102
|
+
};
|
|
103
|
+
readonly MIN_SIZE_EXCEEDS_MAX_CAPACITY: "warmPool.minSize cannot exceed maxCapacity — the warm pool cannot hold more instances than the ASG allows";
|
|
104
|
+
};
|
|
105
|
+
};
|
|
106
|
+
readonly MEMORY_LIMIT: {
|
|
107
|
+
readonly INTEGER: "Memory limit must be an integer";
|
|
108
|
+
readonly MIN_512: "Memory limit must be at least 512 MiB";
|
|
109
|
+
readonly MIN_128: "Memory limit must be at least 128 MiB";
|
|
110
|
+
readonly MAX: "Memory limit cannot exceed 30720 MiB";
|
|
111
|
+
};
|
|
112
|
+
readonly DATABASE: {
|
|
113
|
+
readonly PORT: {
|
|
114
|
+
readonly INTEGER: "Database port must be an integer";
|
|
115
|
+
readonly MIN: "Database port must be at least 1024";
|
|
116
|
+
readonly MAX: "Database port cannot exceed 65535";
|
|
117
|
+
};
|
|
118
|
+
readonly NAME: {
|
|
119
|
+
readonly REQUIRED: "Database name is required";
|
|
120
|
+
readonly MAX_LENGTH: "Database name must be 63 characters or less";
|
|
121
|
+
};
|
|
122
|
+
};
|
|
123
|
+
readonly BACKUP_RETENTION: {
|
|
124
|
+
readonly INTEGER: "Backup retention must be an integer";
|
|
125
|
+
readonly MIN: "Backup retention must be at least 1 day";
|
|
126
|
+
readonly MAX: "Backup retention cannot exceed 35 days";
|
|
127
|
+
};
|
|
128
|
+
readonly SQS: {
|
|
129
|
+
readonly VISIBILITY_TIMEOUT: {
|
|
130
|
+
readonly INTEGER: "Visibility timeout must be an integer";
|
|
131
|
+
readonly MIN: "Visibility timeout must be at least 0 seconds";
|
|
132
|
+
readonly MAX: "Visibility timeout cannot exceed 43200 seconds (12 hours)";
|
|
133
|
+
};
|
|
134
|
+
readonly RETENTION_PERIOD: {
|
|
135
|
+
readonly INTEGER: "Retention period must be an integer";
|
|
136
|
+
readonly MIN: "Retention period must be at least 60 seconds";
|
|
137
|
+
readonly MAX: "Retention period cannot exceed 1209600 seconds (14 days)";
|
|
138
|
+
};
|
|
139
|
+
};
|
|
140
|
+
readonly READER: {
|
|
141
|
+
readonly COUNT: {
|
|
142
|
+
readonly INTEGER: "Reader count must be an integer";
|
|
143
|
+
readonly MIN: "Reader count must be at least 0";
|
|
144
|
+
readonly MAX: "Reader count cannot exceed 15";
|
|
145
|
+
};
|
|
146
|
+
};
|
|
147
|
+
readonly IDENTIFIER_SUFFIX: {
|
|
148
|
+
readonly REQUIRED: "Identifier suffix is required when specified";
|
|
149
|
+
readonly MAX_LENGTH: "Identifier suffix cannot exceed 50 characters";
|
|
150
|
+
};
|
|
151
|
+
readonly ROTATION: {
|
|
152
|
+
readonly INTEGER: "Rotation days must be an integer";
|
|
153
|
+
readonly MIN: "Rotation interval must be at least 1 day";
|
|
154
|
+
readonly MAX: "Rotation interval cannot exceed 365 days";
|
|
155
|
+
};
|
|
156
|
+
readonly MAX_CONNECTIONS: {
|
|
157
|
+
readonly INTEGER: "Max connections must be an integer";
|
|
158
|
+
readonly MIN: "Max connections must be at least 1";
|
|
159
|
+
readonly MAX: "Max connections cannot exceed 100";
|
|
160
|
+
};
|
|
161
|
+
readonly MONITORING_INTERVAL: {
|
|
162
|
+
readonly INTEGER: "Monitoring interval must be an integer";
|
|
163
|
+
readonly MIN: "Monitoring interval must be at least 0";
|
|
164
|
+
readonly MAX: "Monitoring interval cannot exceed 60 seconds";
|
|
165
|
+
readonly VALUES: "Monitoring interval must be 0, 1, 5, 10, 15, 30, or 60 seconds";
|
|
166
|
+
};
|
|
167
|
+
readonly RETENTION_DAYS: {
|
|
168
|
+
readonly INTEGER: "Retention days must be an integer";
|
|
169
|
+
readonly MIN: "Retention days must be at least 1";
|
|
170
|
+
readonly MAX: "Retention days cannot exceed 365";
|
|
171
|
+
};
|
|
172
|
+
readonly BATCH_SIZE: {
|
|
173
|
+
readonly INTEGER: "Batch size must be an integer";
|
|
174
|
+
readonly MIN: "Batch size must be at least 1";
|
|
175
|
+
readonly MAX: "Batch size cannot exceed 10000";
|
|
176
|
+
};
|
|
177
|
+
readonly SERVICE: {
|
|
178
|
+
readonly UNIQUE_WITHIN_CLUSTER: "Service names must be unique within a cluster";
|
|
179
|
+
readonly MIN_REQUIRED: "At least one service is required";
|
|
180
|
+
readonly ROUTING_REQUIRED: "Multiple services with ports require routing config (path or host)";
|
|
181
|
+
};
|
|
182
|
+
readonly PROXY_CONFIG: {
|
|
183
|
+
readonly MAX_IDLE_CONNECTIONS: {
|
|
184
|
+
readonly INTEGER: "Max idle connections must be an integer";
|
|
185
|
+
readonly MIN: "Max idle connections must be at least 0";
|
|
186
|
+
readonly MAX: "Max idle connections cannot exceed 100";
|
|
187
|
+
};
|
|
188
|
+
readonly BORROW_TIMEOUT: {
|
|
189
|
+
readonly INTEGER: "Connection borrow timeout must be an integer";
|
|
190
|
+
readonly MIN: "Connection borrow timeout must be at least 1 second";
|
|
191
|
+
readonly MAX: "Connection borrow timeout cannot exceed 3600 seconds";
|
|
192
|
+
};
|
|
193
|
+
};
|
|
194
|
+
readonly MAX_AZS: {
|
|
195
|
+
readonly INTEGER: "Max AZs must be an integer";
|
|
196
|
+
readonly MIN: "Max AZs must be at least 1";
|
|
197
|
+
readonly MAX: "Max AZs cannot exceed 3";
|
|
198
|
+
};
|
|
199
|
+
readonly BATCHING_WINDOW: {
|
|
200
|
+
readonly INTEGER: "Max batching window must be an integer";
|
|
201
|
+
readonly MIN: "Max batching window must be at least 0";
|
|
202
|
+
readonly MAX: "Max batching window cannot exceed 300 seconds";
|
|
203
|
+
};
|
|
204
|
+
readonly HEALTH_CHECK: {
|
|
205
|
+
readonly INTERVAL: {
|
|
206
|
+
readonly INTEGER: "Health check interval must be an integer";
|
|
207
|
+
readonly MIN: "Health check interval must be at least 5 seconds";
|
|
208
|
+
readonly MAX: "Health check interval cannot exceed 300 seconds";
|
|
209
|
+
};
|
|
210
|
+
readonly TIMEOUT: {
|
|
211
|
+
readonly INTEGER: "Health check timeout must be an integer";
|
|
212
|
+
readonly MIN: "Health check timeout must be at least 2 seconds";
|
|
213
|
+
readonly MAX: "Health check timeout cannot exceed 60 seconds";
|
|
214
|
+
};
|
|
215
|
+
readonly RETRIES: {
|
|
216
|
+
readonly INTEGER: "Health check retries must be an integer";
|
|
217
|
+
readonly MIN: "Health check retries must be at least 1";
|
|
218
|
+
readonly MAX: "Health check retries cannot exceed 10";
|
|
219
|
+
};
|
|
220
|
+
readonly START_PERIOD: {
|
|
221
|
+
readonly INTEGER: "Health check start period must be an integer";
|
|
222
|
+
readonly MIN: "Health check start period must be at least 0 seconds";
|
|
223
|
+
readonly MAX: "Health check start period cannot exceed 300 seconds";
|
|
224
|
+
};
|
|
225
|
+
};
|
|
226
|
+
readonly EPHEMERAL_STORAGE: {
|
|
227
|
+
readonly INTEGER: "Ephemeral storage size must be an integer";
|
|
228
|
+
readonly MIN: "Ephemeral storage size must be at least 512 MB";
|
|
229
|
+
readonly MAX: "Ephemeral storage size cannot exceed 10240 MB";
|
|
230
|
+
};
|
|
231
|
+
readonly MAX_MESSAGE_SIZE: {
|
|
232
|
+
readonly INTEGER: "Max message size must be an integer";
|
|
233
|
+
readonly MIN: "Max message size must be at least 1024 bytes";
|
|
234
|
+
readonly MAX: "Max message size cannot exceed 262144 bytes (256 KB)";
|
|
235
|
+
};
|
|
236
|
+
readonly CAPACITY_CONSTRAINT: {
|
|
237
|
+
readonly MIN_LTE_MAX: "minCapacity must be less than or equal to maxCapacity";
|
|
238
|
+
};
|
|
239
|
+
readonly DIRECT_ACCESS: {
|
|
240
|
+
readonly NO_DOMAIN: "directAccess cannot be used with domain (no ALB for HTTPS)";
|
|
241
|
+
readonly NO_LOAD_BALANCER: "directAccess cannot be used with loadBalancer (mutually exclusive)";
|
|
242
|
+
};
|
|
243
|
+
readonly GLOBAL_AURORA: {
|
|
244
|
+
readonly PRIMARY_REGION_REQUIRED: "primaryRegion is required for GlobalAurora databases";
|
|
245
|
+
};
|
|
246
|
+
readonly NAT_GATEWAY: {
|
|
247
|
+
readonly INTEGER: "NAT gateway count must be an integer";
|
|
248
|
+
readonly MIN: "NAT gateway count must be at least 0";
|
|
249
|
+
readonly MAX: "NAT gateway count cannot exceed 3";
|
|
250
|
+
};
|
|
251
|
+
readonly CIDR_MASK: {
|
|
252
|
+
readonly INTEGER: "CIDR mask must be an integer";
|
|
253
|
+
readonly MIN: "CIDR mask must be at least 16";
|
|
254
|
+
readonly MAX: "CIDR mask cannot exceed 28";
|
|
255
|
+
};
|
|
256
|
+
readonly CPU: {
|
|
257
|
+
readonly INTEGER: "CPU must be an integer";
|
|
258
|
+
readonly MIN: "CPU must be at least 256 units";
|
|
259
|
+
readonly MAX: "CPU cannot exceed 4096 units";
|
|
260
|
+
};
|
|
261
|
+
readonly KMS: {
|
|
262
|
+
readonly KEY_REQUIRED: "KMS key ARN is required when using KMS encryption";
|
|
263
|
+
};
|
|
264
|
+
readonly READER_INSTANCES: {
|
|
265
|
+
readonly MAX: "Cannot have more than 15 reader instances";
|
|
266
|
+
readonly COUNT_OR_INSTANCES: "Cannot specify both 'count' and 'instances' - use one or the other";
|
|
267
|
+
};
|
|
268
|
+
readonly GENERATOR_CAPACITY: {
|
|
269
|
+
readonly MIN: {
|
|
270
|
+
readonly MIN: "Minimum capacity must be at least 1";
|
|
271
|
+
readonly MAX: "Minimum capacity cannot exceed 1000";
|
|
272
|
+
};
|
|
273
|
+
readonly MAX: {
|
|
274
|
+
readonly MIN: "Maximum capacity must be at least 1";
|
|
275
|
+
readonly MAX: "Maximum capacity cannot exceed 1000";
|
|
276
|
+
};
|
|
277
|
+
};
|
|
278
|
+
readonly INSTANCE_TYPE: "Unknown instance type. Common types include: t4g.micro, t4g.small, m5.large";
|
|
279
|
+
readonly ARCHITECTURE_MISMATCH: "Architecture mismatch between instance type and AMI";
|
|
280
|
+
readonly ALLOCATED_STORAGE: {
|
|
281
|
+
readonly INTEGER: "Allocated storage must be an integer";
|
|
282
|
+
readonly MIN: "Allocated storage must be at least 20 GB";
|
|
283
|
+
readonly MAX: "Allocated storage cannot exceed 65536 GB";
|
|
284
|
+
};
|
|
285
|
+
readonly DLQ: {
|
|
286
|
+
readonly MAX_RECEIVE_COUNT: {
|
|
287
|
+
readonly INTEGER: "Max receive count must be an integer";
|
|
288
|
+
readonly MIN: "Max receive count must be at least 1";
|
|
289
|
+
readonly MAX: "Max receive count cannot exceed 1000";
|
|
290
|
+
};
|
|
291
|
+
};
|
|
292
|
+
readonly ALARM: {
|
|
293
|
+
readonly PERCENTAGE: {
|
|
294
|
+
readonly MIN: "Threshold must be at least 1%";
|
|
295
|
+
readonly MAX: "Threshold must be at most 100%";
|
|
296
|
+
};
|
|
297
|
+
readonly FREE_STORAGE_GIB: {
|
|
298
|
+
readonly MIN: "Free storage threshold must be at least 1 GiB";
|
|
299
|
+
};
|
|
300
|
+
};
|
|
301
|
+
readonly REGION: "Invalid AWS region";
|
|
302
|
+
readonly PASCAL_CASE: "Resource name must start with an uppercase letter and contain only alphanumerics (PascalCase).";
|
|
303
|
+
readonly IMAGE_DOCKER_MUTEX: "image and docker are mutually exclusive";
|
|
304
|
+
readonly AWS_ACCOUNT_ID: "AWS account id must be exactly 12 digits (no hyphens)";
|
|
305
|
+
readonly VPC_ID: "VPC id must look like vpc-abc12345";
|
|
306
|
+
readonly ROLE_ARN: "Role ARN must have the form arn:aws:iam::<account-id>:role/<name>";
|
|
307
|
+
readonly CIDR: "CIDR must be in dotted-quad/prefix-length form (e.g. 10.0.0.0/16)";
|
|
308
|
+
readonly VPC_PEER: {
|
|
309
|
+
readonly MIN_REQUESTER_ACCOUNTS: "At least one requester account id is required";
|
|
310
|
+
readonly REGION_REQUIRED: "Peer region is required when specified";
|
|
311
|
+
readonly ROUTE_TABLE_ID_REQUIRED: "Route table id must not be empty";
|
|
312
|
+
};
|
|
313
|
+
readonly SCHEDULE_EXPRESSION: "Schedule expression must be 'rate(N minute|minutes|hour|hours|day|days)' with N>=1, or 'cron(<6-field AWS expression>)'";
|
|
314
|
+
}>;
|
|
315
|
+
export type ValidationMessageKey = keyof typeof VALIDATION_MESSAGES;
|