@fjall/generator 0.89.4 → 0.89.6
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/LICENSE +50 -21
- package/README.md +28 -0
- package/dist/.minified +1 -0
- package/dist/src/ast/astCdnParser.d.ts +5 -0
- package/dist/src/ast/astCdnParser.js +1 -114
- package/dist/src/ast/astCommonParser.d.ts +6 -17
- package/dist/src/ast/astCommonParser.js +1 -351
- package/dist/src/ast/astComputeConnectionParser.d.ts +18 -0
- package/dist/src/ast/astComputeConnectionParser.js +1 -0
- package/dist/src/ast/astComputeParser.d.ts +6 -0
- package/dist/src/ast/astComputeParser.js +1 -473
- package/dist/src/ast/astComputeParserHelpers.d.ts +21 -0
- package/dist/src/ast/astComputeParserHelpers.js +1 -0
- package/dist/src/ast/astDatabaseParser.d.ts +9 -24
- package/dist/src/ast/astDatabaseParser.js +1 -275
- package/dist/src/ast/astDomainParser.d.ts +139 -0
- package/dist/src/ast/astDomainParser.js +1 -0
- package/dist/src/ast/astDynamoDBParser.d.ts +35 -0
- package/dist/src/ast/astDynamoDBParser.js +1 -0
- package/dist/src/ast/astExpressionEvaluator.d.ts +23 -0
- package/dist/src/ast/astExpressionEvaluator.js +1 -0
- package/dist/src/ast/astInfrastructureParser.d.ts +12 -49
- package/dist/src/ast/astInfrastructureParser.js +1 -552
- package/dist/src/ast/astMessagingParser.d.ts +5 -0
- package/dist/src/ast/astMessagingParser.js +1 -78
- package/dist/src/ast/astNetworkParser.d.ts +6 -0
- package/dist/src/ast/astNetworkParser.js +1 -219
- package/dist/src/ast/astPatternParser.d.ts +6 -0
- package/dist/src/ast/astPatternParser.js +1 -155
- package/dist/src/ast/astPlanConverter.d.ts +11 -0
- package/dist/src/ast/astPlanConverter.js +2 -0
- package/dist/src/ast/astStatementClassifier.d.ts +24 -0
- package/dist/src/ast/astStatementClassifier.js +1 -0
- package/dist/src/ast/astStatementQueries.d.ts +21 -0
- package/dist/src/ast/astStatementQueries.js +3 -0
- package/dist/src/ast/astStorageParser.d.ts +5 -0
- package/dist/src/ast/astStorageParser.js +1 -164
- package/dist/src/ast/astSurgicalModification.js +19 -400
- package/dist/src/ast/astTestHelpers.d.ts +635 -0
- package/dist/src/ast/astTestHelpers.js +1 -0
- package/dist/src/ast/index.d.ts +1 -0
- package/dist/src/ast/index.js +1 -6
- package/dist/src/aws/regions.js +1 -254
- package/dist/src/codemod/_internal.d.ts +12 -0
- package/dist/src/codemod/_internal.js +1 -0
- package/dist/src/codemod/edits/addResource/bodyIndex.d.ts +34 -0
- package/dist/src/codemod/edits/addResource/bodyIndex.js +1 -0
- package/dist/src/codemod/edits/addResource/propertyBuilder.d.ts +7 -0
- package/dist/src/codemod/edits/addResource/propertyBuilder.js +1 -0
- package/dist/src/codemod/edits/addResource.d.ts +9 -0
- package/dist/src/codemod/edits/addResource.js +1 -0
- package/dist/src/codemod/edits/ensureImports.d.ts +26 -0
- package/dist/src/codemod/edits/ensureImports.js +1 -0
- package/dist/src/codemod/edits/findInsertionPosition.d.ts +39 -0
- package/dist/src/codemod/edits/findInsertionPosition.js +1 -0
- package/dist/src/codemod/edits/index.d.ts +6 -0
- package/dist/src/codemod/edits/index.js +1 -0
- package/dist/src/codemod/edits/modifyResource/literalConversion.d.ts +37 -0
- package/dist/src/codemod/edits/modifyResource/literalConversion.js +1 -0
- package/dist/src/codemod/edits/modifyResource.d.ts +9 -0
- package/dist/src/codemod/edits/modifyResource.js +1 -0
- package/dist/src/codemod/edits/removeResource/commentHeuristic.d.ts +31 -0
- package/dist/src/codemod/edits/removeResource/commentHeuristic.js +1 -0
- package/dist/src/codemod/edits/removeResource/importPruning.d.ts +8 -0
- package/dist/src/codemod/edits/removeResource/importPruning.js +1 -0
- package/dist/src/codemod/edits/removeResource.d.ts +10 -0
- package/dist/src/codemod/edits/removeResource.js +1 -0
- package/dist/src/codemod/edits/schemaFragments.d.ts +9 -0
- package/dist/src/codemod/edits/schemaFragments.js +1 -0
- package/dist/src/codemod/fileRewriter/builders.d.ts +57 -0
- package/dist/src/codemod/fileRewriter/builders.js +1 -0
- package/dist/src/codemod/fileRewriter/index.d.ts +4 -0
- package/dist/src/codemod/fileRewriter/index.js +1 -0
- package/dist/src/codemod/fileRewriter/locateByRange.d.ts +65 -0
- package/dist/src/codemod/fileRewriter/locateByRange.js +1 -0
- package/dist/src/codemod/fileRewriter/parse.d.ts +18 -0
- package/dist/src/codemod/fileRewriter/parse.js +2 -0
- package/dist/src/codemod/fileRewriter/print.d.ts +46 -0
- package/dist/src/codemod/fileRewriter/print.js +4 -0
- package/dist/src/codemod/historyPaths.d.ts +2 -0
- package/dist/src/codemod/historyPaths.js +1 -0
- package/dist/src/codemod/index.d.ts +7 -0
- package/dist/src/codemod/index.js +1 -0
- package/dist/src/codemod/listResources.d.ts +4 -0
- package/dist/src/codemod/listResources.js +1 -0
- package/dist/src/codemod/semanticIndex/findReferences.d.ts +15 -0
- package/dist/src/codemod/semanticIndex/findReferences.js +2 -0
- package/dist/src/codemod/semanticIndex/index.d.ts +4 -0
- package/dist/src/codemod/semanticIndex/index.js +1 -0
- package/dist/src/codemod/semanticIndex/listImports.d.ts +24 -0
- package/dist/src/codemod/semanticIndex/listImports.js +1 -0
- package/dist/src/codemod/semanticIndex/locateByShape.d.ts +28 -0
- package/dist/src/codemod/semanticIndex/locateByShape.js +1 -0
- package/dist/src/codemod/semanticIndex/projectCache.d.ts +14 -0
- package/dist/src/codemod/semanticIndex/projectCache.js +1 -0
- package/dist/src/codemod/types.d.ts +172 -0
- package/dist/src/codemod/types.js +1 -0
- package/dist/src/dns/bindParser.js +2 -224
- package/dist/src/dns/bindWriter.js +3 -52
- package/dist/src/dns/domainFileGenerator.d.ts +20 -0
- package/dist/src/dns/domainFileGenerator.js +207 -0
- package/dist/src/dns/domainRecords.d.ts +164 -0
- package/dist/src/dns/domainRecords.js +1 -0
- package/dist/src/dns/index.d.ts +2 -1
- package/dist/src/dns/index.js +1 -4
- package/dist/src/dns/types.js +1 -52
- package/dist/src/generation/common.js +6 -161
- package/dist/src/generation/compute.js +82 -590
- package/dist/src/generation/database.js +12 -198
- package/dist/src/generation/generatePatternCode.d.ts +58 -0
- package/dist/src/generation/generatePatternCode.js +33 -0
- package/dist/src/generation/index.js +1 -20
- package/dist/src/generation/infrastructure.d.ts +1 -5
- package/dist/src/generation/infrastructure.js +35 -377
- package/dist/src/generation/messagingConnections.js +1 -73
- package/dist/src/generation/storage.d.ts +0 -15
- package/dist/src/generation/storage.js +35 -168
- package/dist/src/generation/storageConnections.js +1 -75
- package/dist/src/planning/generateResourceChange.d.ts +21 -0
- package/dist/src/planning/generateResourceChange.js +1 -0
- package/dist/src/planning/index.d.ts +3 -0
- package/dist/src/planning/index.js +1 -1
- package/dist/src/planning/resourceAddition.d.ts +154 -0
- package/dist/src/planning/resourceAddition.js +1 -0
- package/dist/src/planning/resourceConnections.d.ts +19 -0
- package/dist/src/planning/resourceConnections.js +1 -0
- package/dist/src/planning/resourcePlanning.js +1 -214
- package/dist/src/presets/index.js +1 -3
- package/dist/src/presets/patternTierPresets.js +1 -131
- package/dist/src/presets/storagePresets.js +1 -36
- package/dist/src/presets/tierPresets.d.ts +5 -8
- package/dist/src/presets/tierPresets.js +1 -384
- package/dist/src/presets/tierTypes.d.ts +1 -1
- package/dist/src/presets/tierTypes.js +0 -7
- package/dist/src/schemas/alarmSchemas.d.ts +19 -0
- package/dist/src/schemas/alarmSchemas.js +1 -0
- package/dist/src/schemas/applicationSchemas.d.ts +22 -6
- package/dist/src/schemas/applicationSchemas.js +1 -80
- package/dist/src/schemas/baseSchemas.d.ts +8 -3
- package/dist/src/schemas/baseSchemas.js +2 -248
- package/dist/src/schemas/cdnSchemas.js +1 -62
- package/dist/src/schemas/computeSchemas.d.ts +25 -3
- package/dist/src/schemas/computeSchemas.js +1 -727
- package/dist/src/schemas/constants.d.ts +5 -7
- package/dist/src/schemas/constants.js +1 -218
- package/dist/src/schemas/databaseSchemas.d.ts +6 -1
- package/dist/src/schemas/databaseSchemas.js +1 -366
- package/dist/src/schemas/index.js +1 -3
- package/dist/src/schemas/instanceTypeArchitecture.js +1 -75
- package/dist/src/schemas/messagingSchemas.js +1 -29
- package/dist/src/schemas/networkSchemas.js +1 -125
- package/dist/src/schemas/patternSchemas.d.ts +1 -1
- package/dist/src/schemas/patternSchemas.js +1 -294
- package/dist/src/schemas/resourceSchemas.d.ts +1 -0
- package/dist/src/schemas/resourceSchemas.js +1 -28
- package/dist/src/schemas/sharedTypes.d.ts +18 -0
- package/dist/src/schemas/sharedTypes.js +1 -0
- package/dist/src/schemas/storageSchemas.d.ts +1 -0
- package/dist/src/schemas/storageSchemas.js +1 -119
- package/dist/src/types/Result.js +1 -31
- package/dist/src/util/errorUtils.js +1 -1
- package/dist/src/validation/patterns.d.ts +9 -0
- package/dist/src/validation/patterns.js +1 -369
- package/dist/src/version.d.ts +1 -1
- package/dist/src/version.js +1 -1
- package/package.json +29 -9
- package/dist/src/dns/infrastructureWriter.d.ts +0 -2
- package/dist/src/dns/infrastructureWriter.js +0 -58
|
@@ -85,12 +85,12 @@ export declare const SecretsImportRecordSchema: z.ZodRecord<z.ZodString, z.ZodOb
|
|
|
85
85
|
*/
|
|
86
86
|
export declare const MetadataRecordSchema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
87
87
|
export declare const AppTypeSchema: z.ZodEnum<{
|
|
88
|
-
custom: "custom";
|
|
89
88
|
standard: "standard";
|
|
90
89
|
resilient: "resilient";
|
|
91
90
|
enterprise: "enterprise";
|
|
92
91
|
tinkerer: "tinkerer";
|
|
93
92
|
lightweight: "lightweight";
|
|
93
|
+
custom: "custom";
|
|
94
94
|
}>;
|
|
95
95
|
export declare const PatternSchema: z.ZodEnum<{
|
|
96
96
|
payload: "payload";
|
|
@@ -113,10 +113,10 @@ export declare const CustomCodePositionSchema: z.ZodEnum<{
|
|
|
113
113
|
*/
|
|
114
114
|
export declare const StatementTypeSchema: z.ZodEnum<{
|
|
115
115
|
custom: "custom";
|
|
116
|
-
pattern: "pattern";
|
|
117
116
|
storage: "storage";
|
|
118
117
|
database: "database";
|
|
119
118
|
compute: "compute";
|
|
119
|
+
pattern: "pattern";
|
|
120
120
|
import: "import";
|
|
121
121
|
"app-init": "app-init";
|
|
122
122
|
tags: "tags";
|
|
@@ -142,10 +142,10 @@ export declare const CustomCodeBlockSchema: z.ZodObject<{
|
|
|
142
142
|
afterManagedResource: z.ZodOptional<z.ZodObject<{
|
|
143
143
|
type: z.ZodEnum<{
|
|
144
144
|
custom: "custom";
|
|
145
|
-
pattern: "pattern";
|
|
146
145
|
storage: "storage";
|
|
147
146
|
database: "database";
|
|
148
147
|
compute: "compute";
|
|
148
|
+
pattern: "pattern";
|
|
149
149
|
import: "import";
|
|
150
150
|
"app-init": "app-init";
|
|
151
151
|
tags: "tags";
|
|
@@ -191,6 +191,11 @@ export declare const OrganisationGeneratorSchema: z.ZodObject<{
|
|
|
191
191
|
accountName: z.ZodOptional<z.ZodString>;
|
|
192
192
|
primaryRegion: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
193
193
|
secondaryRegions: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
194
|
+
security: z.ZodOptional<z.ZodEnum<{
|
|
195
|
+
foundation: "foundation";
|
|
196
|
+
compliance: "compliance";
|
|
197
|
+
hardened: "hardened";
|
|
198
|
+
}>>;
|
|
194
199
|
force: z.ZodOptional<z.ZodBoolean>;
|
|
195
200
|
}, z.core.$strict>;
|
|
196
201
|
export declare function getZodErrorMessage(error: z.ZodError<unknown>): string;
|
|
@@ -1,248 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import { APP_TYPES, PATTERN_TYPE_VALUES, MIN_PORT, MAX_PORT, BACKUP_VAULT_TIERS, } from "./constants.js";
|
|
4
|
-
import { regions } from "../aws/regions.js";
|
|
5
|
-
// ─── Shared utility ──────────────────────────────────────────────────────────
|
|
6
|
-
export const optionalOrDisabled = (schema) => z.union([z.literal(false), schema]);
|
|
7
|
-
/** Reusable capacity validation: ensures minCapacity <= maxCapacity. */
|
|
8
|
-
export const CAPACITY_REFINEMENT = {
|
|
9
|
-
check: (data) => {
|
|
10
|
-
if (data.minCapacity !== undefined && data.maxCapacity !== undefined) {
|
|
11
|
-
return data.minCapacity <= data.maxCapacity;
|
|
12
|
-
}
|
|
13
|
-
return true;
|
|
14
|
-
},
|
|
15
|
-
params: {
|
|
16
|
-
message: VALIDATION_MESSAGES.CAPACITY_CONSTRAINT.MIN_LTE_MAX,
|
|
17
|
-
path: ["maxCapacity"],
|
|
18
|
-
},
|
|
19
|
-
};
|
|
20
|
-
/** Reusable memory limit schema. EC2 allows 128 MiB min; ECS/containers require 512 MiB min. */
|
|
21
|
-
export const memoryLimitMiBSchema = (min) => z
|
|
22
|
-
.number()
|
|
23
|
-
.int(VALIDATION_MESSAGES.MEMORY_LIMIT.INTEGER)
|
|
24
|
-
.min(min, min === 128
|
|
25
|
-
? VALIDATION_MESSAGES.MEMORY_LIMIT.MIN_128
|
|
26
|
-
: VALIDATION_MESSAGES.MEMORY_LIMIT.MIN_512)
|
|
27
|
-
.max(30720, VALIDATION_MESSAGES.MEMORY_LIMIT.MAX);
|
|
28
|
-
// ─── Name / identifier schemas ───────────────────────────────────────────────
|
|
29
|
-
export const ResourceNameSchema = z
|
|
30
|
-
.string()
|
|
31
|
-
.min(1, VALIDATION_MESSAGES.REQUIRED.RESOURCE_NAME)
|
|
32
|
-
.max(63, VALIDATION_MESSAGES.MAX_LENGTH.RESOURCE_NAME)
|
|
33
|
-
.regex(VALIDATION_PATTERNS.RESOURCE_NAME, VALIDATION_MESSAGES.RESOURCE_NAME);
|
|
34
|
-
export const BucketNameSchema = z
|
|
35
|
-
.string()
|
|
36
|
-
.min(1, VALIDATION_MESSAGES.REQUIRED.BUCKET_NAME)
|
|
37
|
-
.max(63, VALIDATION_MESSAGES.MAX_LENGTH.BUCKET_NAME)
|
|
38
|
-
.regex(VALIDATION_PATTERNS.BUCKET_NAME, VALIDATION_MESSAGES.BUCKET_NAME);
|
|
39
|
-
export const DatabaseNameSchema = z
|
|
40
|
-
.string()
|
|
41
|
-
.min(1, VALIDATION_MESSAGES.REQUIRED.DATABASE_NAME)
|
|
42
|
-
.max(63, VALIDATION_MESSAGES.MAX_LENGTH.DATABASE_NAME)
|
|
43
|
-
.regex(VALIDATION_PATTERNS.DATABASE_NAME, VALIDATION_MESSAGES.DATABASE_NAME);
|
|
44
|
-
export const AppNameSchema = z
|
|
45
|
-
.string()
|
|
46
|
-
.min(2, VALIDATION_MESSAGES.IDENTIFIER_MIN_LENGTH)
|
|
47
|
-
.max(50, VALIDATION_MESSAGES.MAX_LENGTH.APP_NAME)
|
|
48
|
-
.regex(VALIDATION_PATTERNS.IDENTIFIER, VALIDATION_MESSAGES.IDENTIFIER)
|
|
49
|
-
.refine((val) => !val.endsWith("-"), {
|
|
50
|
-
message: VALIDATION_MESSAGES.IDENTIFIER_NO_TRAILING_HYPHEN,
|
|
51
|
-
})
|
|
52
|
-
.refine((val) => !val.includes("--"), {
|
|
53
|
-
message: VALIDATION_MESSAGES.IDENTIFIER_NO_CONSECUTIVE_HYPHENS,
|
|
54
|
-
});
|
|
55
|
-
export const PortSchema = z
|
|
56
|
-
.number()
|
|
57
|
-
.int(VALIDATION_MESSAGES.PORT.INTEGER)
|
|
58
|
-
.min(MIN_PORT, VALIDATION_MESSAGES.PORT.MIN)
|
|
59
|
-
.max(MAX_PORT, VALIDATION_MESSAGES.PORT.MAX);
|
|
60
|
-
// ─── Special / environment value schemas ─────────────────────────────────────
|
|
61
|
-
/**
|
|
62
|
-
* Extra property preserved verbatim during round-trip.
|
|
63
|
-
* Captures properties inside managed factory calls that the parser
|
|
64
|
-
* does not specifically handle (e.g. CDK PolicyStatement[], custom configs).
|
|
65
|
-
*/
|
|
66
|
-
export const ExtraPropertySchema = z
|
|
67
|
-
.object({
|
|
68
|
-
key: z.string(),
|
|
69
|
-
sourceText: z.string(),
|
|
70
|
-
})
|
|
71
|
-
.strict();
|
|
72
|
-
export const IdentifierValueSchema = z
|
|
73
|
-
.object({ __identifier: z.string() })
|
|
74
|
-
.strict();
|
|
75
|
-
export const ExpressionValueSchema = z
|
|
76
|
-
.object({ __expression: z.string() })
|
|
77
|
-
.strict();
|
|
78
|
-
export const CallValueSchema = z.object({ __call: z.string() }).strict();
|
|
79
|
-
export const SpecialValueSchema = z.union([
|
|
80
|
-
IdentifierValueSchema,
|
|
81
|
-
ExpressionValueSchema,
|
|
82
|
-
CallValueSchema,
|
|
83
|
-
]);
|
|
84
|
-
/**
|
|
85
|
-
* Schema for environment variable values.
|
|
86
|
-
* Supports literal values and special code generation values.
|
|
87
|
-
*/
|
|
88
|
-
export const EnvironmentValueSchema = z.union([
|
|
89
|
-
z.string(),
|
|
90
|
-
z.number(),
|
|
91
|
-
z.boolean(),
|
|
92
|
-
SpecialValueSchema,
|
|
93
|
-
]);
|
|
94
|
-
export const EnvironmentRecordSchema = z.record(z.string(), EnvironmentValueSchema);
|
|
95
|
-
/**
|
|
96
|
-
* Schema for importing secrets from AWS Secrets Manager.
|
|
97
|
-
* Matches the SecretImport type in infrastructure.
|
|
98
|
-
*/
|
|
99
|
-
export const SecretImportSchema = z
|
|
100
|
-
.object({
|
|
101
|
-
/** Secret construct ID */
|
|
102
|
-
id: z.string(),
|
|
103
|
-
/** Secret name in Secrets Manager */
|
|
104
|
-
name: z.string(),
|
|
105
|
-
/** Optional field to extract from the secret */
|
|
106
|
-
field: z.string().optional(),
|
|
107
|
-
})
|
|
108
|
-
.strict();
|
|
109
|
-
/**
|
|
110
|
-
* Record of secret imports keyed by environment variable name.
|
|
111
|
-
*/
|
|
112
|
-
export const SecretsImportRecordSchema = z.record(z.string(), SecretImportSchema);
|
|
113
|
-
/**
|
|
114
|
-
* Schema for metadata values.
|
|
115
|
-
* Supports simple types and complex AWS SDK types (VpcConfigResponse, Date, etc.)
|
|
116
|
-
* Uses z.unknown() for flexibility with AWS resource properties whilst avoiding z.any().
|
|
117
|
-
*/
|
|
118
|
-
export const MetadataRecordSchema = z.record(z.string(), z.unknown());
|
|
119
|
-
// ─── Application-level schemas ───────────────────────────────────────────────
|
|
120
|
-
export const AppTypeSchema = z
|
|
121
|
-
.enum(APP_TYPES)
|
|
122
|
-
.describe(`Application type must be one of: ${APP_TYPES.join(", ")}`);
|
|
123
|
-
export const PatternSchema = z
|
|
124
|
-
.enum(PATTERN_TYPE_VALUES)
|
|
125
|
-
.describe(`OpenNext deployment pattern: ${PATTERN_TYPE_VALUES.join(", ")}`);
|
|
126
|
-
// ─── Custom code preservation schemas ────────────────────────────────────────
|
|
127
|
-
/**
|
|
128
|
-
* Custom code block position type.
|
|
129
|
-
* Defines where a custom code block appears relative to managed code.
|
|
130
|
-
*/
|
|
131
|
-
export const CustomCodePositionSchema = z.enum([
|
|
132
|
-
"before-imports",
|
|
133
|
-
"after-imports",
|
|
134
|
-
"after-app-init",
|
|
135
|
-
"after-tags",
|
|
136
|
-
"after-resource",
|
|
137
|
-
"end-of-file",
|
|
138
|
-
]);
|
|
139
|
-
/**
|
|
140
|
-
* Statement type for managed resources.
|
|
141
|
-
*/
|
|
142
|
-
export const StatementTypeSchema = z.enum([
|
|
143
|
-
"import",
|
|
144
|
-
"app-init",
|
|
145
|
-
"tags",
|
|
146
|
-
"database",
|
|
147
|
-
"compute",
|
|
148
|
-
"storage",
|
|
149
|
-
"network",
|
|
150
|
-
"messaging",
|
|
151
|
-
"cdn",
|
|
152
|
-
"pattern",
|
|
153
|
-
"custom",
|
|
154
|
-
]);
|
|
155
|
-
/**
|
|
156
|
-
* Custom code block schema.
|
|
157
|
-
* Represents user-written code that should be preserved during regeneration.
|
|
158
|
-
* Used by the hybrid parse-preserve-generate approach.
|
|
159
|
-
*/
|
|
160
|
-
export const CustomCodeBlockSchema = z
|
|
161
|
-
.object({
|
|
162
|
-
/** The exact source text to preserve (including leading comments) */
|
|
163
|
-
sourceText: z.string(),
|
|
164
|
-
/** Position relative to managed resources */
|
|
165
|
-
position: CustomCodePositionSchema,
|
|
166
|
-
/** For "after-resource" position, the managed resource type and name */
|
|
167
|
-
afterManagedResource: z
|
|
168
|
-
.object({
|
|
169
|
-
type: StatementTypeSchema,
|
|
170
|
-
name: z.string().optional(),
|
|
171
|
-
})
|
|
172
|
-
.strict()
|
|
173
|
-
.optional(),
|
|
174
|
-
/** Original line number in source (for debugging) */
|
|
175
|
-
originalLine: z.number().int().optional(),
|
|
176
|
-
/** Leading comments associated with this block */
|
|
177
|
-
leadingComments: z.array(z.string()).optional(),
|
|
178
|
-
/** Orphaned marker - set when the resource this block was after is deleted */
|
|
179
|
-
orphaned: z.boolean().optional(),
|
|
180
|
-
/** Orphaned warning comment to add */
|
|
181
|
-
orphanedComment: z.string().optional(),
|
|
182
|
-
})
|
|
183
|
-
.strict();
|
|
184
|
-
// ─── Backup / tunnel configuration ──────────────────────────────────────────
|
|
185
|
-
/**
|
|
186
|
-
* Backup configuration schema.
|
|
187
|
-
* Controls automatic AWS Backup enrolment via tier presets.
|
|
188
|
-
* - Object with tier: Tags all resources with `fjall:disasterRecovery:tier`
|
|
189
|
-
* - false: Explicitly disabled (no backup tag applied)
|
|
190
|
-
*/
|
|
191
|
-
export const BackupConfigSchema = z.union([
|
|
192
|
-
z
|
|
193
|
-
.object({
|
|
194
|
-
tier: z.enum(BACKUP_VAULT_TIERS),
|
|
195
|
-
})
|
|
196
|
-
.strict(),
|
|
197
|
-
z.literal(false),
|
|
198
|
-
]);
|
|
199
|
-
/**
|
|
200
|
-
* Tunnel configuration schema.
|
|
201
|
-
* Controls bastion host creation for secure SSM database access.
|
|
202
|
-
* - Object with optional instanceType: Create bastion with custom config
|
|
203
|
-
* - false: Explicitly disabled (no bastion)
|
|
204
|
-
*/
|
|
205
|
-
export const TunnelConfigSchema = z.union([
|
|
206
|
-
z
|
|
207
|
-
.object({
|
|
208
|
-
instanceType: z.string().optional(),
|
|
209
|
-
})
|
|
210
|
-
.strict(),
|
|
211
|
-
z.literal(false),
|
|
212
|
-
]);
|
|
213
|
-
// ─── Organisation / region schemas ──────────────────────────────────────────
|
|
214
|
-
export const OrganisationNameSchema = z
|
|
215
|
-
.string()
|
|
216
|
-
.min(2, VALIDATION_MESSAGES.IDENTIFIER_MIN_LENGTH)
|
|
217
|
-
.max(50, VALIDATION_MESSAGES.MAX_LENGTH.ORGANISATION_NAME)
|
|
218
|
-
.regex(VALIDATION_PATTERNS.IDENTIFIER, VALIDATION_MESSAGES.IDENTIFIER)
|
|
219
|
-
.refine((val) => !val.endsWith("-"), {
|
|
220
|
-
message: VALIDATION_MESSAGES.IDENTIFIER_NO_TRAILING_HYPHEN,
|
|
221
|
-
})
|
|
222
|
-
.refine((val) => !val.includes("--"), {
|
|
223
|
-
message: VALIDATION_MESSAGES.IDENTIFIER_NO_CONSECUTIVE_HYPHENS,
|
|
224
|
-
});
|
|
225
|
-
export const EmailSchema = z.string().email(VALIDATION_MESSAGES.EMAIL);
|
|
226
|
-
export const RegionSchema = z
|
|
227
|
-
.string()
|
|
228
|
-
.refine((region) => regions.includes(region), {
|
|
229
|
-
message: VALIDATION_MESSAGES.REGION,
|
|
230
|
-
});
|
|
231
|
-
export const OrganisationGeneratorSchema = z
|
|
232
|
-
.object({
|
|
233
|
-
name: OrganisationNameSchema,
|
|
234
|
-
email: EmailSchema,
|
|
235
|
-
accountName: z.string().optional(),
|
|
236
|
-
primaryRegion: RegionSchema.optional().default("us-east-1"),
|
|
237
|
-
secondaryRegions: z.array(RegionSchema).optional(),
|
|
238
|
-
force: z.boolean().optional(),
|
|
239
|
-
})
|
|
240
|
-
.strict();
|
|
241
|
-
// ─── Utility function ────────────────────────────────────────────────────────
|
|
242
|
-
export function getZodErrorMessage(error) {
|
|
243
|
-
const messages = error.issues.map((issue) => {
|
|
244
|
-
const path = issue.path.length > 0 ? `${issue.path.join(".")}: ` : "";
|
|
245
|
-
return `${path}${issue.message}`;
|
|
246
|
-
});
|
|
247
|
-
return messages.join("\n");
|
|
248
|
-
}
|
|
1
|
+
import{z as e}from"zod";import{VALIDATION_PATTERNS as o,VALIDATION_MESSAGES as t}from"../validation/patterns.js";import{APP_TYPES as a,PATTERN_TYPE_VALUES as i,MIN_PORT as c,MAX_PORT as m,BACKUP_VAULT_TIERS as E}from"./constants.js";import{regions as p}from"../aws/regions.js";const O=n=>e.union([e.literal(!1),n]),b={check:n=>n.minCapacity!==void 0&&n.maxCapacity!==void 0?n.minCapacity<=n.maxCapacity:!0,params:{message:t.CAPACITY_CONSTRAINT.MIN_LTE_MAX,path:["maxCapacity"]}},P=n=>e.number().int(t.MEMORY_LIMIT.INTEGER).min(n,n===128?t.MEMORY_LIMIT.MIN_128:t.MEMORY_LIMIT.MIN_512).max(30720,t.MEMORY_LIMIT.MAX),D=e.string().min(1,t.REQUIRED.RESOURCE_NAME).max(63,t.MAX_LENGTH.RESOURCE_NAME).regex(o.RESOURCE_NAME,t.RESOURCE_NAME),L=e.string().min(1,t.REQUIRED.BUCKET_NAME).max(63,t.MAX_LENGTH.BUCKET_NAME).regex(o.BUCKET_NAME,t.BUCKET_NAME),y=e.string().min(1,t.REQUIRED.DATABASE_NAME).max(63,t.MAX_LENGTH.DATABASE_NAME).regex(o.DATABASE_NAME,t.DATABASE_NAME),U=e.string().min(2,t.IDENTIFIER_MIN_LENGTH).max(50,t.MAX_LENGTH.APP_NAME).regex(o.IDENTIFIER,t.IDENTIFIER).refine(n=>!n.endsWith("-"),{message:t.IDENTIFIER_NO_TRAILING_HYPHEN}).refine(n=>!n.includes("--"),{message:t.IDENTIFIER_NO_CONSECUTIVE_HYPHENS}),G=e.number().int(t.PORT.INTEGER).min(c,t.PORT.MIN).max(m,t.PORT.MAX),H=e.object({key:e.string(),sourceText:e.string()}).strict(),I=e.object({__identifier:e.string()}).strict(),N=e.object({__expression:e.string()}).strict(),T=e.object({__call:e.string()}).strict(),A=e.union([I,N,T]),_=e.union([e.string(),e.number(),e.boolean(),A]),j=e.record(e.string(),_),g=e.object({id:e.string(),name:e.string(),field:e.string().optional()}).strict(),B=e.record(e.string(),g),Y=e.record(e.string(),e.unknown()),F=e.enum(a).describe(`Application type must be one of: ${a.join(", ")}`),V=e.enum(i).describe(`OpenNext deployment pattern: ${i.join(", ")}`),l=e.enum(["before-imports","after-imports","after-app-init","after-tags","after-resource","end-of-file"]),R=e.enum(["import","app-init","tags","database","compute","storage","network","messaging","cdn","pattern","custom"]),X=e.object({sourceText:e.string(),position:l,afterManagedResource:e.object({type:R,name:e.string().optional()}).strict().optional(),originalLine:e.number().int().optional(),leadingComments:e.array(e.string()).optional(),orphaned:e.boolean().optional(),orphanedComment:e.string().optional()}).strict(),k=e.union([e.object({tier:e.enum(E)}).strict(),e.literal(!1)]),K=e.union([e.object({instanceType:e.string().optional()}).strict(),e.literal(!1)]),S=e.string().min(2,t.IDENTIFIER_MIN_LENGTH).max(50,t.MAX_LENGTH.ORGANISATION_NAME).regex(o.IDENTIFIER,t.IDENTIFIER).refine(n=>!n.endsWith("-"),{message:t.IDENTIFIER_NO_TRAILING_HYPHEN}).refine(n=>!n.includes("--"),{message:t.IDENTIFIER_NO_CONSECUTIVE_HYPHENS}),x=e.string().email(t.EMAIL),s=e.string().refine(n=>p.includes(n),{message:t.REGION}),$=e.object({name:S,email:x,accountName:e.string().optional(),primaryRegion:s.optional().default("us-east-1"),secondaryRegions:e.array(s).optional(),security:e.enum(["foundation","compliance","hardened"]).optional(),force:e.boolean().optional()}).strict();function Q(n){return n.issues.map(r=>`${r.path.length>0?`${r.path.join(".")}: `:""}${r.message}`).join(`
|
|
2
|
+
`)}export{U as AppNameSchema,F as AppTypeSchema,k as BackupConfigSchema,L as BucketNameSchema,b as CAPACITY_REFINEMENT,T as CallValueSchema,X as CustomCodeBlockSchema,l as CustomCodePositionSchema,y as DatabaseNameSchema,x as EmailSchema,j as EnvironmentRecordSchema,_ as EnvironmentValueSchema,N as ExpressionValueSchema,H as ExtraPropertySchema,I as IdentifierValueSchema,Y as MetadataRecordSchema,$ as OrganisationGeneratorSchema,S as OrganisationNameSchema,V as PatternSchema,G as PortSchema,s as RegionSchema,D as ResourceNameSchema,g as SecretImportSchema,B as SecretsImportRecordSchema,A as SpecialValueSchema,R as StatementTypeSchema,K as TunnelConfigSchema,Q as getZodErrorMessage,P as memoryLimitMiBSchema,O as optionalOrDisabled};
|
|
@@ -1,62 +1 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ResourceNameSchema, ExtraPropertySchema } from "./baseSchemas.js";
|
|
3
|
-
// ─── Access gate ─────────────────────────────────────────────────────────────
|
|
4
|
-
/**
|
|
5
|
-
* Access gate configuration for CDN distributions.
|
|
6
|
-
* Extensible discriminated union — currently supports basic-auth,
|
|
7
|
-
* future types (cognito, oidc, ip-allowlist) can be added.
|
|
8
|
-
*/
|
|
9
|
-
export const AccessGateSchema = z
|
|
10
|
-
.object({
|
|
11
|
-
type: z.literal("basic-auth"),
|
|
12
|
-
username: z.string().min(1),
|
|
13
|
-
password: z.string().min(1),
|
|
14
|
-
})
|
|
15
|
-
.strict();
|
|
16
|
-
// ─── CDN resource plan ───────────────────────────────────────────────────────
|
|
17
|
-
/**
|
|
18
|
-
* CDN resource plan schema (for OpenNext patterns)
|
|
19
|
-
*/
|
|
20
|
-
export const CDNResourcePlanSchema = z
|
|
21
|
-
.object({
|
|
22
|
-
name: ResourceNameSchema,
|
|
23
|
-
defaultOriginRef: z.string(),
|
|
24
|
-
behaviours: z
|
|
25
|
-
.array(z
|
|
26
|
-
.object({
|
|
27
|
-
pathPattern: z.string(),
|
|
28
|
-
originRef: z.string(),
|
|
29
|
-
cachePolicy: z
|
|
30
|
-
.enum(["CACHING_OPTIMIZED", "CACHING_DISABLED"])
|
|
31
|
-
.optional(),
|
|
32
|
-
})
|
|
33
|
-
.strict())
|
|
34
|
-
.optional(),
|
|
35
|
-
customDomain: z.string().optional(),
|
|
36
|
-
certificateArn: z.string().optional(),
|
|
37
|
-
accessGate: z.union([z.literal(false), AccessGateSchema]).optional(),
|
|
38
|
-
extraProperties: z.array(ExtraPropertySchema).optional(),
|
|
39
|
-
})
|
|
40
|
-
.strict();
|
|
41
|
-
export const CdnGeneratorSchema = z
|
|
42
|
-
.object({
|
|
43
|
-
appName: z.string(),
|
|
44
|
-
name: ResourceNameSchema.optional(),
|
|
45
|
-
defaultOriginRef: z.string(),
|
|
46
|
-
behaviours: z
|
|
47
|
-
.array(z
|
|
48
|
-
.object({
|
|
49
|
-
pathPattern: z.string(),
|
|
50
|
-
originRef: z.string(),
|
|
51
|
-
cachePolicy: z
|
|
52
|
-
.enum(["CACHING_OPTIMIZED", "CACHING_DISABLED"])
|
|
53
|
-
.optional(),
|
|
54
|
-
})
|
|
55
|
-
.strict())
|
|
56
|
-
.optional(),
|
|
57
|
-
customDomain: z.string().optional(),
|
|
58
|
-
certificateArn: z.string().optional(),
|
|
59
|
-
accessGate: z.union([z.literal(false), AccessGateSchema]).optional(),
|
|
60
|
-
nameProvidedByFlag: z.boolean().optional(),
|
|
61
|
-
})
|
|
62
|
-
.strict();
|
|
1
|
+
import{z as t}from"zod";import{ResourceNameSchema as a,ExtraPropertySchema as o}from"./baseSchemas.js";const e=t.object({type:t.literal("basic-auth"),username:t.string().min(1),password:t.string().min(1)}).strict(),n=t.object({name:a,defaultOriginRef:t.string(),behaviours:t.array(t.object({pathPattern:t.string(),originRef:t.string(),cachePolicy:t.enum(["CACHING_OPTIMIZED","CACHING_DISABLED"]).optional()}).strict()).optional(),customDomain:t.string().optional(),certificateArn:t.string().optional(),accessGate:t.union([t.literal(!1),e]).optional(),extraProperties:t.array(o).optional()}).strict(),s=t.object({appName:t.string(),name:a.optional(),defaultOriginRef:t.string(),behaviours:t.array(t.object({pathPattern:t.string(),originRef:t.string(),cachePolicy:t.enum(["CACHING_OPTIMIZED","CACHING_DISABLED"]).optional()}).strict()).optional(),customDomain:t.string().optional(),certificateArn:t.string().optional(),accessGate:t.union([t.literal(!1),e]).optional(),nameProvidedByFlag:t.boolean().optional()}).strict();export{e as AccessGateSchema,n as CDNResourcePlanSchema,s as CdnGeneratorSchema};
|
|
@@ -32,8 +32,8 @@ export declare const EcsCapacityProviderSchema: z.ZodEnum<{
|
|
|
32
32
|
export declare const InstanceTypeSchema: z.ZodString & z.ZodType<"t3.nano" | "t3.micro" | "t3.small" | "t3.medium" | "t3.large" | "t3.xlarge" | "t3.2xlarge" | "t3a.nano" | "t3a.micro" | "t3a.small" | "t3a.medium" | "t3a.large" | "t3a.xlarge" | "t3a.2xlarge" | "t4g.nano" | "t4g.micro" | "t4g.small" | "t4g.medium" | "t4g.large" | "t4g.xlarge" | "t4g.2xlarge" | "c5.large" | "c5.xlarge" | "c5.2xlarge" | "c5.4xlarge" | "c5.9xlarge" | "c5.12xlarge" | "c5.18xlarge" | "c5.24xlarge" | "c5a.large" | "c5a.xlarge" | "c5a.2xlarge" | "c5a.4xlarge" | "c5a.8xlarge" | "c5a.12xlarge" | "c5a.16xlarge" | "c5a.24xlarge" | "c6g.medium" | "c6g.large" | "c6g.xlarge" | "c6g.2xlarge" | "c6g.4xlarge" | "c6g.8xlarge" | "c6g.12xlarge" | "c6g.16xlarge" | "r5.large" | "r5.xlarge" | "r5.2xlarge" | "r5.4xlarge" | "r5.8xlarge" | "r5.12xlarge" | "r5.16xlarge" | "r5.24xlarge" | "r5a.large" | "r5a.xlarge" | "r5a.2xlarge" | "r5a.4xlarge" | "r5a.8xlarge" | "r5a.12xlarge" | "r5a.16xlarge" | "r5a.24xlarge" | "r6g.medium" | "r6g.large" | "r6g.xlarge" | "r6g.2xlarge" | "r6g.4xlarge" | "r6g.8xlarge" | "r6g.12xlarge" | "r6g.16xlarge" | "i3.large" | "i3.xlarge" | "i3.2xlarge" | "i3.4xlarge" | "i3.8xlarge" | "i3.16xlarge" | "p3.2xlarge" | "p3.8xlarge" | "p3.16xlarge" | "g4dn.xlarge" | "g4dn.2xlarge" | "g4dn.4xlarge" | "g4dn.8xlarge" | "g4dn.12xlarge" | "g4dn.16xlarge" | "m5.large" | "m5.xlarge" | "m5.2xlarge" | "m5.4xlarge" | "m5.8xlarge" | "m5.12xlarge" | "m5.16xlarge" | "m5.24xlarge" | "m5a.large" | "m5a.xlarge" | "m5a.2xlarge" | "m5a.4xlarge" | "m5a.8xlarge" | "m5a.12xlarge" | "m5a.16xlarge" | "m5a.24xlarge", string, z.core.$ZodTypeInternals<"t3.nano" | "t3.micro" | "t3.small" | "t3.medium" | "t3.large" | "t3.xlarge" | "t3.2xlarge" | "t3a.nano" | "t3a.micro" | "t3a.small" | "t3a.medium" | "t3a.large" | "t3a.xlarge" | "t3a.2xlarge" | "t4g.nano" | "t4g.micro" | "t4g.small" | "t4g.medium" | "t4g.large" | "t4g.xlarge" | "t4g.2xlarge" | "c5.large" | "c5.xlarge" | "c5.2xlarge" | "c5.4xlarge" | "c5.9xlarge" | "c5.12xlarge" | "c5.18xlarge" | "c5.24xlarge" | "c5a.large" | "c5a.xlarge" | "c5a.2xlarge" | "c5a.4xlarge" | "c5a.8xlarge" | "c5a.12xlarge" | "c5a.16xlarge" | "c5a.24xlarge" | "c6g.medium" | "c6g.large" | "c6g.xlarge" | "c6g.2xlarge" | "c6g.4xlarge" | "c6g.8xlarge" | "c6g.12xlarge" | "c6g.16xlarge" | "r5.large" | "r5.xlarge" | "r5.2xlarge" | "r5.4xlarge" | "r5.8xlarge" | "r5.12xlarge" | "r5.16xlarge" | "r5.24xlarge" | "r5a.large" | "r5a.xlarge" | "r5a.2xlarge" | "r5a.4xlarge" | "r5a.8xlarge" | "r5a.12xlarge" | "r5a.16xlarge" | "r5a.24xlarge" | "r6g.medium" | "r6g.large" | "r6g.xlarge" | "r6g.2xlarge" | "r6g.4xlarge" | "r6g.8xlarge" | "r6g.12xlarge" | "r6g.16xlarge" | "i3.large" | "i3.xlarge" | "i3.2xlarge" | "i3.4xlarge" | "i3.8xlarge" | "i3.16xlarge" | "p3.2xlarge" | "p3.8xlarge" | "p3.16xlarge" | "g4dn.xlarge" | "g4dn.2xlarge" | "g4dn.4xlarge" | "g4dn.8xlarge" | "g4dn.12xlarge" | "g4dn.16xlarge" | "m5.large" | "m5.xlarge" | "m5.2xlarge" | "m5.4xlarge" | "m5.8xlarge" | "m5.12xlarge" | "m5.16xlarge" | "m5.24xlarge" | "m5a.large" | "m5a.xlarge" | "m5a.2xlarge" | "m5a.4xlarge" | "m5a.8xlarge" | "m5a.12xlarge" | "m5a.16xlarge" | "m5a.24xlarge", string>>;
|
|
33
33
|
export declare const LambdaEventSourceSchema: z.ZodObject<{
|
|
34
34
|
sourceType: z.ZodEnum<{
|
|
35
|
-
sqs: "sqs";
|
|
36
35
|
dynamodb: "dynamodb";
|
|
36
|
+
sqs: "sqs";
|
|
37
37
|
eventbridge: "eventbridge";
|
|
38
38
|
}>;
|
|
39
39
|
sourceRef: z.ZodString;
|
|
@@ -210,6 +210,12 @@ export declare const EcsServiceConfigSchema: z.ZodObject<{
|
|
|
210
210
|
key: z.ZodString;
|
|
211
211
|
sourceText: z.ZodString;
|
|
212
212
|
}, z.core.$strict>>>;
|
|
213
|
+
alarms: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<false>, z.ZodObject<{
|
|
214
|
+
cpuThreshold: z.ZodOptional<z.ZodNumber>;
|
|
215
|
+
memoryThreshold: z.ZodOptional<z.ZodNumber>;
|
|
216
|
+
runningTasksMinimum: z.ZodOptional<z.ZodNumber>;
|
|
217
|
+
http5xxThreshold: z.ZodOptional<z.ZodNumber>;
|
|
218
|
+
}, z.core.$strict>]>>;
|
|
213
219
|
}, z.core.$strict>;
|
|
214
220
|
/**
|
|
215
221
|
* Compute resource plan schema.
|
|
@@ -318,6 +324,12 @@ export declare const ComputeResourcePlanSchema: z.ZodObject<{
|
|
|
318
324
|
key: z.ZodString;
|
|
319
325
|
sourceText: z.ZodString;
|
|
320
326
|
}, z.core.$strict>>>;
|
|
327
|
+
alarms: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<false>, z.ZodObject<{
|
|
328
|
+
cpuThreshold: z.ZodOptional<z.ZodNumber>;
|
|
329
|
+
memoryThreshold: z.ZodOptional<z.ZodNumber>;
|
|
330
|
+
runningTasksMinimum: z.ZodOptional<z.ZodNumber>;
|
|
331
|
+
http5xxThreshold: z.ZodOptional<z.ZodNumber>;
|
|
332
|
+
}, z.core.$strict>]>>;
|
|
321
333
|
}, z.core.$strict>>>;
|
|
322
334
|
dockerfilePath: z.ZodOptional<z.ZodString>;
|
|
323
335
|
deployment: z.ZodOptional<z.ZodEnum<{
|
|
@@ -345,8 +357,8 @@ export declare const ComputeResourcePlanSchema: z.ZodObject<{
|
|
|
345
357
|
}, z.core.$strict>]>]>>>;
|
|
346
358
|
eventSources: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
347
359
|
sourceType: z.ZodEnum<{
|
|
348
|
-
sqs: "sqs";
|
|
349
360
|
dynamodb: "dynamodb";
|
|
361
|
+
sqs: "sqs";
|
|
350
362
|
eventbridge: "eventbridge";
|
|
351
363
|
}>;
|
|
352
364
|
sourceRef: z.ZodString;
|
|
@@ -374,6 +386,10 @@ export declare const ComputeResourcePlanSchema: z.ZodObject<{
|
|
|
374
386
|
functionName: z.ZodOptional<z.ZodString>;
|
|
375
387
|
ssmSecrets: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
376
388
|
ssmSecretsPath: z.ZodOptional<z.ZodString>;
|
|
389
|
+
alarms: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<false>, z.ZodObject<{
|
|
390
|
+
errorRateThreshold: z.ZodOptional<z.ZodNumber>;
|
|
391
|
+
durationThresholdPercent: z.ZodOptional<z.ZodNumber>;
|
|
392
|
+
}, z.core.$strict>]>>;
|
|
377
393
|
instanceType: z.ZodOptional<z.ZodString & z.ZodType<"t3.nano" | "t3.micro" | "t3.small" | "t3.medium" | "t3.large" | "t3.xlarge" | "t3.2xlarge" | "t3a.nano" | "t3a.micro" | "t3a.small" | "t3a.medium" | "t3a.large" | "t3a.xlarge" | "t3a.2xlarge" | "t4g.nano" | "t4g.micro" | "t4g.small" | "t4g.medium" | "t4g.large" | "t4g.xlarge" | "t4g.2xlarge" | "c5.large" | "c5.xlarge" | "c5.2xlarge" | "c5.4xlarge" | "c5.9xlarge" | "c5.12xlarge" | "c5.18xlarge" | "c5.24xlarge" | "c5a.large" | "c5a.xlarge" | "c5a.2xlarge" | "c5a.4xlarge" | "c5a.8xlarge" | "c5a.12xlarge" | "c5a.16xlarge" | "c5a.24xlarge" | "c6g.medium" | "c6g.large" | "c6g.xlarge" | "c6g.2xlarge" | "c6g.4xlarge" | "c6g.8xlarge" | "c6g.12xlarge" | "c6g.16xlarge" | "r5.large" | "r5.xlarge" | "r5.2xlarge" | "r5.4xlarge" | "r5.8xlarge" | "r5.12xlarge" | "r5.16xlarge" | "r5.24xlarge" | "r5a.large" | "r5a.xlarge" | "r5a.2xlarge" | "r5a.4xlarge" | "r5a.8xlarge" | "r5a.12xlarge" | "r5a.16xlarge" | "r5a.24xlarge" | "r6g.medium" | "r6g.large" | "r6g.xlarge" | "r6g.2xlarge" | "r6g.4xlarge" | "r6g.8xlarge" | "r6g.12xlarge" | "r6g.16xlarge" | "i3.large" | "i3.xlarge" | "i3.2xlarge" | "i3.4xlarge" | "i3.8xlarge" | "i3.16xlarge" | "p3.2xlarge" | "p3.8xlarge" | "p3.16xlarge" | "g4dn.xlarge" | "g4dn.2xlarge" | "g4dn.4xlarge" | "g4dn.8xlarge" | "g4dn.12xlarge" | "g4dn.16xlarge" | "m5.large" | "m5.xlarge" | "m5.2xlarge" | "m5.4xlarge" | "m5.8xlarge" | "m5.12xlarge" | "m5.16xlarge" | "m5.24xlarge" | "m5a.large" | "m5a.xlarge" | "m5a.2xlarge" | "m5a.4xlarge" | "m5a.8xlarge" | "m5a.12xlarge" | "m5a.16xlarge" | "m5a.24xlarge", string, z.core.$ZodTypeInternals<"t3.nano" | "t3.micro" | "t3.small" | "t3.medium" | "t3.large" | "t3.xlarge" | "t3.2xlarge" | "t3a.nano" | "t3a.micro" | "t3a.small" | "t3a.medium" | "t3a.large" | "t3a.xlarge" | "t3a.2xlarge" | "t4g.nano" | "t4g.micro" | "t4g.small" | "t4g.medium" | "t4g.large" | "t4g.xlarge" | "t4g.2xlarge" | "c5.large" | "c5.xlarge" | "c5.2xlarge" | "c5.4xlarge" | "c5.9xlarge" | "c5.12xlarge" | "c5.18xlarge" | "c5.24xlarge" | "c5a.large" | "c5a.xlarge" | "c5a.2xlarge" | "c5a.4xlarge" | "c5a.8xlarge" | "c5a.12xlarge" | "c5a.16xlarge" | "c5a.24xlarge" | "c6g.medium" | "c6g.large" | "c6g.xlarge" | "c6g.2xlarge" | "c6g.4xlarge" | "c6g.8xlarge" | "c6g.12xlarge" | "c6g.16xlarge" | "r5.large" | "r5.xlarge" | "r5.2xlarge" | "r5.4xlarge" | "r5.8xlarge" | "r5.12xlarge" | "r5.16xlarge" | "r5.24xlarge" | "r5a.large" | "r5a.xlarge" | "r5a.2xlarge" | "r5a.4xlarge" | "r5a.8xlarge" | "r5a.12xlarge" | "r5a.16xlarge" | "r5a.24xlarge" | "r6g.medium" | "r6g.large" | "r6g.xlarge" | "r6g.2xlarge" | "r6g.4xlarge" | "r6g.8xlarge" | "r6g.12xlarge" | "r6g.16xlarge" | "i3.large" | "i3.xlarge" | "i3.2xlarge" | "i3.4xlarge" | "i3.8xlarge" | "i3.16xlarge" | "p3.2xlarge" | "p3.8xlarge" | "p3.16xlarge" | "g4dn.xlarge" | "g4dn.2xlarge" | "g4dn.4xlarge" | "g4dn.8xlarge" | "g4dn.12xlarge" | "g4dn.16xlarge" | "m5.large" | "m5.xlarge" | "m5.2xlarge" | "m5.4xlarge" | "m5.8xlarge" | "m5.12xlarge" | "m5.16xlarge" | "m5.24xlarge" | "m5a.large" | "m5a.xlarge" | "m5a.2xlarge" | "m5a.4xlarge" | "m5a.8xlarge" | "m5a.12xlarge" | "m5a.16xlarge" | "m5a.24xlarge", string>>>;
|
|
378
394
|
enableSSH: z.ZodOptional<z.ZodBoolean>;
|
|
379
395
|
keyName: z.ZodOptional<z.ZodString>;
|
|
@@ -617,6 +633,12 @@ export declare const ComputeGeneratorSchema: z.ZodDiscriminatedUnion<[z.ZodObjec
|
|
|
617
633
|
key: z.ZodString;
|
|
618
634
|
sourceText: z.ZodString;
|
|
619
635
|
}, z.core.$strict>>>;
|
|
636
|
+
alarms: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<false>, z.ZodObject<{
|
|
637
|
+
cpuThreshold: z.ZodOptional<z.ZodNumber>;
|
|
638
|
+
memoryThreshold: z.ZodOptional<z.ZodNumber>;
|
|
639
|
+
runningTasksMinimum: z.ZodOptional<z.ZodNumber>;
|
|
640
|
+
http5xxThreshold: z.ZodOptional<z.ZodNumber>;
|
|
641
|
+
}, z.core.$strict>]>>;
|
|
620
642
|
}, z.core.$strict>>;
|
|
621
643
|
dockerfilePath: z.ZodOptional<z.ZodString>;
|
|
622
644
|
}, z.core.$strict>, z.ZodObject<{
|
|
@@ -654,8 +676,8 @@ export declare const ComputeGeneratorSchema: z.ZodDiscriminatedUnion<[z.ZodObjec
|
|
|
654
676
|
}, z.core.$strict>, z.ZodLiteral<false>]>>;
|
|
655
677
|
eventSources: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
656
678
|
sourceType: z.ZodEnum<{
|
|
657
|
-
sqs: "sqs";
|
|
658
679
|
dynamodb: "dynamodb";
|
|
680
|
+
sqs: "sqs";
|
|
659
681
|
eventbridge: "eventbridge";
|
|
660
682
|
}>;
|
|
661
683
|
sourceRef: z.ZodString;
|