@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
|
@@ -29,6 +29,20 @@ export declare const DEPLOYMENT_TYPE: Readonly<{
|
|
|
29
29
|
export declare const COMPUTE_ARCHITECTURES: readonly ["ARM_64", "X86_64"];
|
|
30
30
|
export type ComputeArchitecture = (typeof COMPUTE_ARCHITECTURES)[number];
|
|
31
31
|
export declare const DEFAULT_COMPUTE_ARCHITECTURE: ComputeArchitecture;
|
|
32
|
+
export declare const FUNCTION_URL_AUTH_TYPES: readonly ["NONE", "AWS_IAM"];
|
|
33
|
+
export type FunctionUrlAuthType = (typeof FUNCTION_URL_AUTH_TYPES)[number];
|
|
34
|
+
export declare const LOAD_BALANCER_TYPES: readonly ["public", "internal"];
|
|
35
|
+
export type LoadBalancerType = (typeof LOAD_BALANCER_TYPES)[number];
|
|
36
|
+
export declare const SCALING_TYPES: readonly ["CPU", "MEMORY"];
|
|
37
|
+
export type ScalingType = (typeof SCALING_TYPES)[number];
|
|
38
|
+
export declare const AMI_HARDWARE_TYPES: readonly ["ARM", "STANDARD"];
|
|
39
|
+
export type AmiHardwareType = (typeof AMI_HARDWARE_TYPES)[number];
|
|
40
|
+
export declare const PATTERN_DATABASE_TYPES: readonly ["Instance", "Aurora"];
|
|
41
|
+
export type PatternDatabaseType = (typeof PATTERN_DATABASE_TYPES)[number];
|
|
42
|
+
export declare const DATABASE_ENGINES: readonly ["postgresql", "mysql"];
|
|
43
|
+
export type DatabaseEngine = (typeof DATABASE_ENGINES)[number];
|
|
44
|
+
export declare const GOVERNANCE_PRESETS: readonly ["foundation", "compliance", "hardened"];
|
|
45
|
+
export type GovernancePreset = (typeof GOVERNANCE_PRESETS)[number];
|
|
32
46
|
export { ECS_CAPACITY_PROVIDERS, type EcsCapacityProvider, } from "./sharedTypes.js";
|
|
33
47
|
import type { EcsCapacityProvider } from "./sharedTypes.js";
|
|
34
48
|
export declare const DEFAULT_CAPACITY_PROVIDER: EcsCapacityProvider;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const t=Object.freeze({RESOURCE_SUFFIXES:Object.freeze({storage:"Storage",database:"Database",cluster:"Cluster",function:"Function",instance:"Instance",compute:"Compute"})});import{DATABASE_TYPES as q}from"./sharedTypes.js";const g=["ecs","lambda","ec2"],x=Object.freeze({ECS:"ecs",LAMBDA:"lambda",EC2:"ec2"}),o=["code","container"],l=Object.freeze({CODE:"code",CONTAINER:"container"}),E=["ARM_64","X86_64"],c="ARM_64",A=["NONE","AWS_IAM"],T=["public","internal"],_=["CPU","MEMORY"],n=["ARM","STANDARD"],s=["Instance","Aurora"],S=["postgresql","mysql"],p=["foundation","compliance","hardened"];import{ECS_CAPACITY_PROVIDERS as y}from"./sharedTypes.js";const P="FARGATE",a=["payload","nextjs"],O=new Set(a);import{APP_TYPES as Z,CUSTOM_TIER as h}from"./sharedTypes.js";const R=["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"],C=[0,1,5,10,15,30,60];function m(e,r){return e.includes(r)}const I=1,M=65535,N=35255,D=128,L=10240,U=1,Y=900,i=1,d=1e3,u=100,F=100,f=1,B=!0,b=3e3,G="t4g.micro",H=30,X=["GET","POST","PUT","DELETE","HEAD","OPTIONS","PATCH"],V=["standard","assets","upload","website"],j=["AES256","KMS"];import{BACKUP_VAULT_TIERS as v}from"./sharedTypes.js";export{n as AMI_HARDWARE_TYPES,Z as APP_TYPES,v as BACKUP_VAULT_TIERS,E as COMPUTE_ARCHITECTURES,x as COMPUTE_TYPE,g as COMPUTE_TYPES,h as CUSTOM_TIER,S as DATABASE_ENGINES,q as DATABASE_TYPES,t as DEFAULTS,P as DEFAULT_CAPACITY_PROVIDER,c as DEFAULT_COMPUTE_ARCHITECTURE,b as DEFAULT_CONTAINER_PORT,N as DEFAULT_DATABASE_PORT,G as DEFAULT_EC2_INSTANCE_TYPE,H as DEFAULT_SECRET_ROTATION_DAYS,f as DEFAULT_WARM_POOL_MIN_SIZE,B as DEFAULT_WARM_POOL_REUSE_ON_SCALE_IN,l as DEPLOYMENT_TYPE,o as DEPLOYMENT_TYPES,R as EC2_INSTANCE_TYPES,y as ECS_CAPACITY_PROVIDERS,A as FUNCTION_URL_AUTH_TYPES,p as GOVERNANCE_PRESETS,X as HTTP_METHODS,T as LOAD_BALANCER_TYPES,d as MAX_ECS_CAPACITY,L as MAX_LAMBDA_MEMORY,Y as MAX_LAMBDA_TIMEOUT,M as MAX_PORT,u as MAX_SCALING_CAPACITY,F as MAX_WARM_POOL_SIZE,i as MIN_ECS_CAPACITY,D as MIN_LAMBDA_MEMORY,U as MIN_LAMBDA_TIMEOUT,I as MIN_PORT,s as PATTERN_DATABASE_TYPES,O as PATTERN_TYPES,a as PATTERN_TYPE_VALUES,j as S3_ENCRYPTION_TYPES,_ as SCALING_TYPES,V as STORAGE_PRESET_TYPES,C as VALID_MONITORING_INTERVALS,m as constIncludes};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
+
export type { DatabaseType } from "./constants.js";
|
|
2
3
|
/** Reusable backup retention validation. Range: 1-35 days. */
|
|
3
4
|
export declare const BackupRetentionSchema: z.ZodNumber;
|
|
4
5
|
/** Reusable monitoring interval validation. Must be one of: 0, 1, 5, 10, 15, 30, 60. */
|
|
@@ -9,6 +10,7 @@ export declare const DatabaseTypeSchema: z.ZodEnum<{
|
|
|
9
10
|
Aurora: "Aurora";
|
|
10
11
|
Instance: "Instance";
|
|
11
12
|
GlobalAurora: "GlobalAurora";
|
|
13
|
+
ClickHouse: "ClickHouse";
|
|
12
14
|
}>;
|
|
13
15
|
export declare const ProxyConfigSchema: z.ZodObject<{
|
|
14
16
|
maxConnections: z.ZodOptional<z.ZodNumber>;
|
|
@@ -116,6 +118,7 @@ export declare const DatabaseResourcePlanSchema: z.ZodObject<{
|
|
|
116
118
|
Aurora: "Aurora";
|
|
117
119
|
Instance: "Instance";
|
|
118
120
|
GlobalAurora: "GlobalAurora";
|
|
121
|
+
ClickHouse: "ClickHouse";
|
|
119
122
|
}>;
|
|
120
123
|
databaseName: z.ZodString;
|
|
121
124
|
instanceType: z.ZodOptional<z.ZodString>;
|
|
@@ -204,6 +207,7 @@ export declare const DatabaseResourcePlanSchema: z.ZodObject<{
|
|
|
204
207
|
* - Instance: instanceType, multiAz, readReplica
|
|
205
208
|
* - Aurora: writer, readers, backupRetention
|
|
206
209
|
* - GlobalAurora: primaryRegion (required!), secondaryRegions, enableGlobalWriteForwarding
|
|
210
|
+
* - ClickHouse: instanceType, coldTier, optimiseSchedule, backupSchedule, backupRetentionDays
|
|
207
211
|
*/
|
|
208
212
|
export declare const DatabaseGeneratorSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
209
213
|
appName: z.ZodString;
|
|
@@ -386,6 +390,23 @@ export declare const DatabaseGeneratorSchema: z.ZodDiscriminatedUnion<[z.ZodObje
|
|
|
386
390
|
monitoringInterval: z.ZodOptional<z.ZodNumber>;
|
|
387
391
|
snapshotIdentifier: z.ZodOptional<z.ZodString>;
|
|
388
392
|
snapshotUsername: z.ZodOptional<z.ZodString>;
|
|
393
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
394
|
+
appName: z.ZodString;
|
|
395
|
+
nameProvidedByFlag: z.ZodOptional<z.ZodBoolean>;
|
|
396
|
+
databaseName: z.ZodString;
|
|
397
|
+
resourceName: z.ZodOptional<z.ZodString>;
|
|
398
|
+
connectionConfig: z.ZodOptional<z.ZodObject<{
|
|
399
|
+
connectToCompute: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
400
|
+
connectToServices: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
401
|
+
}, z.core.$strict>>;
|
|
402
|
+
databaseType: z.ZodLiteral<"ClickHouse">;
|
|
403
|
+
instanceType: z.ZodOptional<z.ZodString>;
|
|
404
|
+
coldTier: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
405
|
+
mode: z.ZodLiteral<"s3">;
|
|
406
|
+
}, z.core.$strict>, z.ZodLiteral<false>]>>;
|
|
407
|
+
optimiseSchedule: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<false>]>>;
|
|
408
|
+
backupSchedule: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<false>]>>;
|
|
409
|
+
backupRetentionDays: z.ZodOptional<z.ZodNumber>;
|
|
389
410
|
}, z.core.$strict>], "databaseType">;
|
|
390
411
|
export declare const DatabaseGeneratorSchemaFromUI: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
391
412
|
appName: z.ZodString;
|
|
@@ -568,6 +589,23 @@ export declare const DatabaseGeneratorSchemaFromUI: z.ZodDiscriminatedUnion<[z.Z
|
|
|
568
589
|
monitoringInterval: z.ZodOptional<z.ZodNumber>;
|
|
569
590
|
snapshotIdentifier: z.ZodOptional<z.ZodString>;
|
|
570
591
|
snapshotUsername: z.ZodOptional<z.ZodString>;
|
|
592
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
593
|
+
appName: z.ZodString;
|
|
594
|
+
nameProvidedByFlag: z.ZodOptional<z.ZodBoolean>;
|
|
595
|
+
databaseName: z.ZodString;
|
|
596
|
+
connectionConfig: z.ZodOptional<z.ZodObject<{
|
|
597
|
+
connectToCompute: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
598
|
+
connectToServices: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
599
|
+
}, z.core.$strict>>;
|
|
600
|
+
resourceName: z.ZodString;
|
|
601
|
+
databaseType: z.ZodLiteral<"ClickHouse">;
|
|
602
|
+
instanceType: z.ZodOptional<z.ZodString>;
|
|
603
|
+
coldTier: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
604
|
+
mode: z.ZodLiteral<"s3">;
|
|
605
|
+
}, z.core.$strict>, z.ZodLiteral<false>]>>;
|
|
606
|
+
optimiseSchedule: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<false>]>>;
|
|
607
|
+
backupSchedule: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<false>]>>;
|
|
608
|
+
backupRetentionDays: z.ZodOptional<z.ZodNumber>;
|
|
571
609
|
}, z.core.$strict>], "databaseType">;
|
|
572
610
|
/**
|
|
573
611
|
* Schema for adding RDS Proxy to an existing database.
|
|
@@ -630,6 +668,39 @@ export declare const DynamoDBResourcePlanSchema: z.ZodObject<{
|
|
|
630
668
|
sourceText: z.ZodString;
|
|
631
669
|
}, z.core.$strict>>>;
|
|
632
670
|
}, z.core.$strict>;
|
|
671
|
+
/**
|
|
672
|
+
* ClickHouse analytics database resource plan schema.
|
|
673
|
+
*
|
|
674
|
+
* Parallel to `DatabaseResourcePlanSchema` rather than extending it — RDS
|
|
675
|
+
* fields (multiAz, proxy, readReplica, readers, writer) do not apply to
|
|
676
|
+
* ClickHouse per the 2026-05-05 ClickHouse Database Factory promotion design
|
|
677
|
+
* (D24). The top-level `type` discriminator is `"ClickHouse"` per D2.
|
|
678
|
+
*
|
|
679
|
+
* The R2 cold tier from the original construct was dropped per D12; only the
|
|
680
|
+
* S3 cold tier (`{ mode: "s3" }`) is valid. Use `coldTier: false` to disable
|
|
681
|
+
* cold-tier storage entirely.
|
|
682
|
+
*
|
|
683
|
+
* Sidecar schedule props (`optimiseSchedule`, `backupSchedule`) are accepted
|
|
684
|
+
* as raw cron strings here and validated at the EventBridge `Schedule`
|
|
685
|
+
* boundary post-cutover per D19 + D20.
|
|
686
|
+
*/
|
|
687
|
+
export declare const ClickHouseResourcePlanSchema: z.ZodObject<{
|
|
688
|
+
name: z.ZodString;
|
|
689
|
+
type: z.ZodLiteral<"ClickHouse">;
|
|
690
|
+
databaseName: z.ZodString;
|
|
691
|
+
instanceType: z.ZodOptional<z.ZodString>;
|
|
692
|
+
coldTier: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
693
|
+
mode: z.ZodLiteral<"s3">;
|
|
694
|
+
}, z.core.$strict>, z.ZodLiteral<false>]>>;
|
|
695
|
+
optimiseSchedule: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<false>]>>;
|
|
696
|
+
backupSchedule: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<false>]>>;
|
|
697
|
+
backupRetentionDays: z.ZodOptional<z.ZodNumber>;
|
|
698
|
+
variableName: z.ZodOptional<z.ZodString>;
|
|
699
|
+
extraProperties: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
700
|
+
key: z.ZodString;
|
|
701
|
+
sourceText: z.ZodString;
|
|
702
|
+
}, z.core.$strict>>>;
|
|
703
|
+
}, z.core.$strict>;
|
|
633
704
|
export type ProxyConfig = z.infer<typeof ProxyConfigSchema>;
|
|
634
705
|
export type ReadReplicaConfig = z.infer<typeof ReadReplicaConfigSchema>;
|
|
635
706
|
export type CredentialsConfig = z.infer<typeof CredentialsConfigSchema>;
|
|
@@ -639,5 +710,14 @@ export type AuroraWriterConfig = z.infer<typeof AuroraWriterConfigSchema>;
|
|
|
639
710
|
export type AuroraReadersConfig = z.infer<typeof AuroraReadersConfigSchema>;
|
|
640
711
|
export type DatabaseResourcePlan = z.infer<typeof DatabaseResourcePlanSchema>;
|
|
641
712
|
export type DynamoDBResourcePlan = z.infer<typeof DynamoDBResourcePlanSchema>;
|
|
713
|
+
export type ClickHouseResourcePlan = z.infer<typeof ClickHouseResourcePlanSchema>;
|
|
642
714
|
export type DatabaseGeneratorOptions = z.infer<typeof DatabaseGeneratorSchema>;
|
|
643
715
|
export type AddProxyGeneratorOptions = z.infer<typeof AddProxyGeneratorSchema>;
|
|
716
|
+
export type BackupRetention = z.infer<typeof BackupRetentionSchema>;
|
|
717
|
+
export type MonitoringInterval = z.infer<typeof MonitoringIntervalSchema>;
|
|
718
|
+
export type DatabasePort = z.infer<typeof DatabasePortSchema>;
|
|
719
|
+
export type SecretRotationConfig = z.infer<typeof SecretRotationConfigSchema>;
|
|
720
|
+
export type AuroraReaderConfig = z.infer<typeof AuroraReaderConfigSchema>;
|
|
721
|
+
export type AwsManagedKey = z.infer<typeof AwsManagedKeySchema>;
|
|
722
|
+
export type CustomerManagedKeyMarker = z.infer<typeof CustomerManagedKeyMarkerSchema>;
|
|
723
|
+
export type EncryptionKeySpec = z.infer<typeof EncryptionKeySpecSchema>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{z as
|
|
1
|
+
import{z as e}from"zod";import{VALIDATION_PATTERNS as I,VALIDATION_MESSAGES as o}from"../validation/patterns.js";import{DATABASE_TYPES as A,VALID_MONITORING_INTERVALS as M,DATABASE_ENGINES as y,constIncludes as h}from"./constants.js";import{optionalOrDisabled as i,ResourceNameSchema as t,AppNameSchema as c,DatabaseNameSchema as f,ExtraPropertySchema as l}from"./baseSchemas.js";import{RdsAlarmConfigSchema as G}from"./alarmSchemas.js";const a=e.number().int(o.BACKUP_RETENTION.INTEGER).min(1,o.BACKUP_RETENTION.MIN).max(35,o.BACKUP_RETENTION.MAX),p=e.number().int(o.MONITORING_INTERVAL.INTEGER).refine(n=>h(M,n),{message:o.MONITORING_INTERVAL.VALUES}),b=e.number().int(o.DATABASE.PORT.INTEGER).min(1024,o.DATABASE.PORT.MIN).max(65535,o.DATABASE.PORT.MAX),F=e.enum(A).describe(`Database type must be one of: ${A.join(", ")}`),U=e.object({maxConnections:e.number().int(o.MAX_CONNECTIONS.INTEGER).min(1,o.MAX_CONNECTIONS.MIN).max(100,o.MAX_CONNECTIONS.MAX).optional(),maxIdleConnections:e.number().int(o.PROXY_CONFIG.MAX_IDLE_CONNECTIONS.INTEGER).min(0,o.PROXY_CONFIG.MAX_IDLE_CONNECTIONS.MIN).max(100,o.PROXY_CONFIG.MAX_IDLE_CONNECTIONS.MAX).optional(),connectionBorrowTimeout:e.number().int(o.PROXY_CONFIG.BORROW_TIMEOUT.INTEGER).min(1,o.PROXY_CONFIG.BORROW_TIMEOUT.MIN).max(3600,o.PROXY_CONFIG.BORROW_TIMEOUT.MAX).optional(),requireTLS:e.boolean().optional()}).strict().describe("RDS Proxy configuration"),X=e.object({instanceType:e.string().optional(),availabilityZone:e.string().optional()}).strict().describe("Read replica configuration"),B=e.object({automaticallyAfterDays:e.number().int(o.ROTATION.INTEGER).min(1,o.ROTATION.MIN).max(365,o.ROTATION.MAX).optional()}).strict().describe("Secret rotation configuration"),T=e.object({username:e.string().min(1,o.REQUIRED.USERNAME).max(63,o.USERNAME.MAX_LENGTH).optional(),secretRotation:B.optional()}).strict().describe("Database credentials configuration"),R=i(U),d=i(X),P=e.object({scaleWithWriter:e.boolean().optional(),enableDatabaseInsights:e.boolean().optional(),identifierSuffix:e.string().min(1,o.IDENTIFIER_SUFFIX.REQUIRED).max(50,o.IDENTIFIER_SUFFIX.MAX_LENGTH).optional(),availabilityZone:e.string().optional()}).strict().describe("Configuration for a single Aurora reader instance"),m=e.object({enableDatabaseInsights:e.boolean().optional(),identifierSuffix:e.string().min(1,o.IDENTIFIER_SUFFIX.REQUIRED).max(50,o.IDENTIFIER_SUFFIX.MAX_LENGTH).optional(),availabilityZone:e.string().optional()}).strict().describe("Configuration for Aurora writer instance"),j=e.object({count:e.number().int(o.READER.COUNT.INTEGER).min(0,o.READER.COUNT.MIN).max(15,o.READER.COUNT.MAX).optional(),instances:e.array(P).max(15,o.READER_INSTANCES.MAX).optional(),defaultEnableDatabaseInsights:e.boolean().optional()}).strict().refine(n=>!(n.count!==void 0&&n.instances!==void 0),{message:o.READER_INSTANCES.COUNT_OR_INSTANCES,path:["count"]}).describe("Aurora readers configuration"),E=i(j),L=e.object({awsManaged:e.literal(!0)}).strict(),k=e.object({useCMK:e.literal(!0)}).strict(),S=e.union([L,k]),v=e.object({mode:e.enum(["standard","advanced"]).optional(),encryptionKey:S.optional()}).strict().describe("Database Insights configuration"),g=i(v),u=e.object({storageKey:S.optional()}).strict().describe("Encryption configuration (DESTRUCTIVE to change storageKey)"),ne=e.object({name:t,type:F,databaseName:e.string().min(1,o.REQUIRED.DATABASE_NAME),instanceType:e.string().optional(),allocatedStorage:e.number().optional(),multiAz:e.boolean().optional(),publiclyAccessible:e.boolean().optional(),databaseInsights:g.optional(),port:b.optional(),deletionProtection:e.boolean().optional(),proxy:R.optional(),credentials:T.optional(),readReplica:d.optional(),encryption:u.optional(),writer:m.optional(),readers:E.optional(),backupRetention:a.optional(),preferredMaintenanceWindow:e.string().optional(),monitoringInterval:p.optional(),primaryRegion:e.string().optional(),secondaryRegions:e.array(e.string()).optional(),globalClusterIdentifier:e.string().optional(),enableGlobalWriteForwarding:e.boolean().optional(),snapshotIdentifier:e.string().optional(),snapshotUsername:e.string().optional(),databaseEngine:e.enum(y).optional(),engineExpression:e.string().optional(),variableName:e.string().optional(),extraProperties:e.array(l).optional(),alarms:G.optional()}).strict(),r=e.object({appName:c,nameProvidedByFlag:e.boolean().optional(),databaseName:e.string().min(1,o.REQUIRED.DATABASE_NAME).max(63,o.MAX_LENGTH.DATABASE_NAME).regex(I.DATABASE_NAME,o.DATABASE_NAME),resourceName:t.optional(),connectionConfig:e.object({connectToCompute:e.array(e.string()).optional(),connectToServices:e.array(e.string()).optional()}).strict().optional(),databaseInsights:g.optional(),port:b.optional(),proxy:R.optional(),credentials:T.optional(),encryption:u.optional(),deletionProtection:e.boolean().optional()}).strict(),O={databaseType:e.literal("Instance"),instanceType:e.string().optional(),multiAz:e.boolean().optional(),readReplica:d.optional(),publiclyAccessible:e.boolean().optional(),backupRetention:a.optional(),allocatedStorage:e.number().optional(),snapshotIdentifier:e.string().optional(),snapshotUsername:e.string().optional()},C={databaseType:e.literal("Aurora"),writer:m.optional(),readers:E.optional(),backupRetention:a.optional(),preferredMaintenanceWindow:e.string().optional(),monitoringInterval:p.optional(),snapshotIdentifier:e.string().optional(),snapshotUsername:e.string().optional()},D={databaseType:e.literal("GlobalAurora"),primaryRegion:e.string().min(1,o.GLOBAL_AURORA.PRIMARY_REGION_REQUIRED),secondaryRegions:e.array(e.string()).optional(),globalClusterIdentifier:e.string().optional(),enableGlobalWriteForwarding:e.boolean().optional(),writer:m.optional(),readers:E.optional(),backupRetention:a.optional(),preferredMaintenanceWindow:e.string().optional(),monitoringInterval:p.optional(),snapshotIdentifier:e.string().optional(),snapshotUsername:e.string().optional()},_=e.object({appName:c,nameProvidedByFlag:e.boolean().optional(),databaseName:e.string().min(1,o.REQUIRED.DATABASE_NAME).max(63,o.MAX_LENGTH.DATABASE_NAME).regex(I.DATABASE_NAME,o.DATABASE_NAME),resourceName:t.optional(),connectionConfig:e.object({connectToCompute:e.array(e.string()).optional(),connectToServices:e.array(e.string()).optional()}).strict().optional()}).strict(),x={databaseType:e.literal("ClickHouse"),instanceType:e.string().optional(),coldTier:e.union([e.object({mode:e.literal("s3")}).strict(),e.literal(!1)]).optional(),optimiseSchedule:e.union([e.string(),e.literal(!1)]).optional(),backupSchedule:e.union([e.string(),e.literal(!1)]).optional(),backupRetentionDays:a.optional()},Y=r.extend(O).strict(),K=r.extend(C).strict(),W=r.extend(D).strict(),w=_.extend(x).strict(),ie=e.discriminatedUnion("databaseType",[Y,K,W,w]),N=r.extend({resourceName:t}).strict(),H=N.extend(O).strict(),Q=N.extend(C).strict(),V=N.extend(D).strict(),z=_.extend({resourceName:t}).strict(),Z=z.extend(x).strict(),re=e.discriminatedUnion("databaseType",[H,Q,V,Z]),se=e.object({appName:c,databaseName:e.string().min(1,o.REQUIRED.DATABASE_NAME),maxConnections:e.number().int(o.MAX_CONNECTIONS.INTEGER).min(1,o.MAX_CONNECTIONS.MIN).max(100,o.MAX_CONNECTIONS.MAX).optional(),maxIdleConnections:e.number().int(o.PROXY_CONFIG.MAX_IDLE_CONNECTIONS.INTEGER).min(0,o.PROXY_CONFIG.MAX_IDLE_CONNECTIONS.MIN).max(100,o.PROXY_CONFIG.MAX_IDLE_CONNECTIONS.MAX).optional(),connectionBorrowTimeout:e.number().int(o.PROXY_CONFIG.BORROW_TIMEOUT.INTEGER).min(1,o.PROXY_CONFIG.BORROW_TIMEOUT.MIN).max(3600,o.PROXY_CONFIG.BORROW_TIMEOUT.MAX).optional(),requireTLS:e.boolean().optional(),nameProvidedByFlag:e.boolean().optional()}).strict(),q=["S","N","B"],s=e.object({name:e.string(),type:e.enum(q)}).strict(),ce=e.object({name:t,partitionKey:s,sortKey:s.optional(),globalSecondaryIndexes:e.array(e.object({indexName:e.string(),partitionKey:s,sortKey:s.optional()}).strict()).optional(),ttlAttribute:e.string().optional(),stream:e.boolean().optional(),variableName:e.string().optional(),extraProperties:e.array(l).optional()}).strict(),$=e.object({mode:e.literal("s3")}).strict(),le=e.object({name:t,type:e.literal("ClickHouse"),databaseName:f,instanceType:e.string().optional(),coldTier:e.union([$,e.literal(!1)]).optional(),optimiseSchedule:e.union([e.string(),e.literal(!1)]).optional(),backupSchedule:e.union([e.string(),e.literal(!1)]).optional(),backupRetentionDays:a.optional(),variableName:e.string().optional(),extraProperties:e.array(l).optional()}).strict();export{se as AddProxyGeneratorSchema,P as AuroraReaderConfigSchema,E as AuroraReadersConfigOrFalseSchema,j as AuroraReadersConfigSchema,m as AuroraWriterConfigSchema,L as AwsManagedKeySchema,a as BackupRetentionSchema,le as ClickHouseResourcePlanSchema,T as CredentialsConfigSchema,k as CustomerManagedKeyMarkerSchema,ie as DatabaseGeneratorSchema,re as DatabaseGeneratorSchemaFromUI,g as DatabaseInsightsConfigOrFalseSchema,v as DatabaseInsightsConfigSchema,b as DatabasePortSchema,ne as DatabaseResourcePlanSchema,F as DatabaseTypeSchema,ce as DynamoDBResourcePlanSchema,u as EncryptionConfigSchema,S as EncryptionKeySpecSchema,p as MonitoringIntervalSchema,R as ProxyConfigOrFalseSchema,U as ProxyConfigSchema,d as ReadReplicaConfigOrFalseSchema,X as ReadReplicaConfigSchema,B as SecretRotationConfigSchema};
|
|
@@ -7,8 +7,8 @@ export declare const NatConfigOrFalseSchema: z.ZodUnion<[z.ZodLiteral<false>, z.
|
|
|
7
7
|
}, z.core.$strict>]>;
|
|
8
8
|
export declare const FlowLogConfigSchema: z.ZodObject<{
|
|
9
9
|
destination: z.ZodOptional<z.ZodEnum<{
|
|
10
|
-
cloudwatch: "cloudwatch";
|
|
11
10
|
s3: "s3";
|
|
11
|
+
cloudwatch: "cloudwatch";
|
|
12
12
|
}>>;
|
|
13
13
|
retentionDays: z.ZodOptional<z.ZodNumber>;
|
|
14
14
|
trafficType: z.ZodOptional<z.ZodEnum<{
|
|
@@ -19,8 +19,8 @@ export declare const FlowLogConfigSchema: z.ZodObject<{
|
|
|
19
19
|
}, z.core.$strict>;
|
|
20
20
|
export declare const FlowLogConfigOrFalseSchema: z.ZodUnion<[z.ZodLiteral<false>, z.ZodObject<{
|
|
21
21
|
destination: z.ZodOptional<z.ZodEnum<{
|
|
22
|
-
cloudwatch: "cloudwatch";
|
|
23
22
|
s3: "s3";
|
|
23
|
+
cloudwatch: "cloudwatch";
|
|
24
24
|
}>>;
|
|
25
25
|
retentionDays: z.ZodOptional<z.ZodNumber>;
|
|
26
26
|
trafficType: z.ZodOptional<z.ZodEnum<{
|
|
@@ -88,8 +88,8 @@ export declare const NetworkResourcePlanSchema: z.ZodObject<{
|
|
|
88
88
|
}, z.core.$strict>]>>;
|
|
89
89
|
flowLogs: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<false>, z.ZodObject<{
|
|
90
90
|
destination: z.ZodOptional<z.ZodEnum<{
|
|
91
|
-
cloudwatch: "cloudwatch";
|
|
92
91
|
s3: "s3";
|
|
92
|
+
cloudwatch: "cloudwatch";
|
|
93
93
|
}>>;
|
|
94
94
|
retentionDays: z.ZodOptional<z.ZodNumber>;
|
|
95
95
|
trafficType: z.ZodOptional<z.ZodEnum<{
|
|
@@ -114,6 +114,14 @@ export declare const NetworkResourcePlanSchema: z.ZodObject<{
|
|
|
114
114
|
}, z.core.$strict>]>>;
|
|
115
115
|
cidrMask: z.ZodOptional<z.ZodNumber>;
|
|
116
116
|
}, z.core.$strict>;
|
|
117
|
+
/**
|
|
118
|
+
* Network name schema for additional VPCs.
|
|
119
|
+
* Starts with a letter, alphanumerics only. The name is passed verbatim to
|
|
120
|
+
* `NetworkFactory.build()` and used as the basis for a camelCase local
|
|
121
|
+
* variable via `toVariableName()` at codegen time — both PascalCase and
|
|
122
|
+
* camelCase inputs are accepted.
|
|
123
|
+
*/
|
|
124
|
+
export declare const NetworkNameSchema: z.ZodString;
|
|
117
125
|
/**
|
|
118
126
|
* Additional network resource plan schema for app.addNetwork() VPCs.
|
|
119
127
|
* Extends NetworkResourcePlanSchema with a required name field.
|
|
@@ -125,8 +133,8 @@ export declare const AdditionalNetworkResourcePlanSchema: z.ZodObject<{
|
|
|
125
133
|
}, z.core.$strict>]>>;
|
|
126
134
|
flowLogs: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<false>, z.ZodObject<{
|
|
127
135
|
destination: z.ZodOptional<z.ZodEnum<{
|
|
128
|
-
cloudwatch: "cloudwatch";
|
|
129
136
|
s3: "s3";
|
|
137
|
+
cloudwatch: "cloudwatch";
|
|
130
138
|
}>>;
|
|
131
139
|
retentionDays: z.ZodOptional<z.ZodNumber>;
|
|
132
140
|
trafficType: z.ZodOptional<z.ZodEnum<{
|
|
@@ -164,8 +172,8 @@ export declare const NetworkConfigSchema: z.ZodUnion<[z.ZodLiteral<false>, z.Zod
|
|
|
164
172
|
}, z.core.$strict>]>>;
|
|
165
173
|
flowLogs: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<false>, z.ZodObject<{
|
|
166
174
|
destination: z.ZodOptional<z.ZodEnum<{
|
|
167
|
-
cloudwatch: "cloudwatch";
|
|
168
175
|
s3: "s3";
|
|
176
|
+
cloudwatch: "cloudwatch";
|
|
169
177
|
}>>;
|
|
170
178
|
retentionDays: z.ZodOptional<z.ZodNumber>;
|
|
171
179
|
trafficType: z.ZodOptional<z.ZodEnum<{
|
|
@@ -190,11 +198,6 @@ export declare const NetworkConfigSchema: z.ZodUnion<[z.ZodLiteral<false>, z.Zod
|
|
|
190
198
|
}, z.core.$strict>]>>;
|
|
191
199
|
cidrMask: z.ZodOptional<z.ZodNumber>;
|
|
192
200
|
}, z.core.$strict>]>;
|
|
193
|
-
/**
|
|
194
|
-
* Network name schema for additional VPCs.
|
|
195
|
-
* Must be PascalCase as it's used as a CDK construct ID.
|
|
196
|
-
*/
|
|
197
|
-
export declare const NetworkNameSchema: z.ZodString;
|
|
198
201
|
/**
|
|
199
202
|
* Network generator schema for configuring network infrastructure.
|
|
200
203
|
*
|
|
@@ -211,8 +214,8 @@ export declare const NetworkGeneratorSchema: z.ZodObject<{
|
|
|
211
214
|
}, z.core.$strict>]>>;
|
|
212
215
|
flowLogs: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<false>, z.ZodObject<{
|
|
213
216
|
destination: z.ZodOptional<z.ZodEnum<{
|
|
214
|
-
cloudwatch: "cloudwatch";
|
|
215
217
|
s3: "s3";
|
|
218
|
+
cloudwatch: "cloudwatch";
|
|
216
219
|
}>>;
|
|
217
220
|
retentionDays: z.ZodOptional<z.ZodNumber>;
|
|
218
221
|
trafficType: z.ZodOptional<z.ZodEnum<{
|
|
@@ -236,11 +239,123 @@ export declare const NetworkGeneratorSchema: z.ZodObject<{
|
|
|
236
239
|
}, z.core.$strict>]>>;
|
|
237
240
|
}, z.core.$strict>]>>;
|
|
238
241
|
}, z.core.$strict>;
|
|
242
|
+
/**
|
|
243
|
+
* CIDR pattern shared by the `exposedResources` schema and the runtime
|
|
244
|
+
* accepter handler. Validates octet range (0–255) and prefix (0–32).
|
|
245
|
+
*/
|
|
246
|
+
export declare const CIDR_REGEX: RegExp;
|
|
247
|
+
/** Reusable CIDR string schema (regex-validated). */
|
|
248
|
+
export declare const CidrStringSchema: z.ZodString;
|
|
249
|
+
/**
|
|
250
|
+
* Database variant of the accepter `exposedResources` array. The codemod
|
|
251
|
+
* serialiser stamps `kind: "database"` so the generated TS round-trips
|
|
252
|
+
* through this discriminated union; the runtime accepter handler ignores
|
|
253
|
+
* `kind` entirely (it re-derives the branch via `isRelationalDatabase()` /
|
|
254
|
+
* `isEcsCompute()` on the live construct).
|
|
255
|
+
*/
|
|
256
|
+
export declare const DatabaseExposedResourceSchema: z.ZodObject<{
|
|
257
|
+
kind: z.ZodLiteral<"database">;
|
|
258
|
+
resource: z.ZodString;
|
|
259
|
+
name: z.ZodString;
|
|
260
|
+
allowedFromCidrs: z.ZodArray<z.ZodString>;
|
|
261
|
+
access: z.ZodOptional<z.ZodEnum<{
|
|
262
|
+
read: "read";
|
|
263
|
+
write: "write";
|
|
264
|
+
readWrite: "readWrite";
|
|
265
|
+
}>>;
|
|
266
|
+
}, z.core.$strict>;
|
|
267
|
+
export declare const EcsServiceExposedResourceSchema: z.ZodObject<{
|
|
268
|
+
kind: z.ZodLiteral<"ecsService">;
|
|
269
|
+
resource: z.ZodString;
|
|
270
|
+
serviceName: z.ZodString;
|
|
271
|
+
name: z.ZodString;
|
|
272
|
+
allowedFromCidrs: z.ZodArray<z.ZodString>;
|
|
273
|
+
port: z.ZodOptional<z.ZodNumber>;
|
|
274
|
+
}, z.core.$strict>;
|
|
275
|
+
export declare const ExposedResourceSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
276
|
+
kind: z.ZodLiteral<"database">;
|
|
277
|
+
resource: z.ZodString;
|
|
278
|
+
name: z.ZodString;
|
|
279
|
+
allowedFromCidrs: z.ZodArray<z.ZodString>;
|
|
280
|
+
access: z.ZodOptional<z.ZodEnum<{
|
|
281
|
+
read: "read";
|
|
282
|
+
write: "write";
|
|
283
|
+
readWrite: "readWrite";
|
|
284
|
+
}>>;
|
|
285
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
286
|
+
kind: z.ZodLiteral<"ecsService">;
|
|
287
|
+
resource: z.ZodString;
|
|
288
|
+
serviceName: z.ZodString;
|
|
289
|
+
name: z.ZodString;
|
|
290
|
+
allowedFromCidrs: z.ZodArray<z.ZodString>;
|
|
291
|
+
port: z.ZodOptional<z.ZodNumber>;
|
|
292
|
+
}, z.core.$strict>], "kind">;
|
|
293
|
+
/**
|
|
294
|
+
* VPC peering resource plan — the requester side.
|
|
295
|
+
*
|
|
296
|
+
* Targets a peer app by name. The peer app's VPC id, CIDR, peering role ARN,
|
|
297
|
+
* and route-table ids are resolved from SSM at synth time when omitted here.
|
|
298
|
+
* Callers may override any of those values explicitly for imported VPCs or
|
|
299
|
+
* cross-organisation peering.
|
|
300
|
+
*/
|
|
301
|
+
export declare const VpcPeerResourcePlanSchema: z.ZodObject<{
|
|
302
|
+
name: z.ZodString;
|
|
303
|
+
peerAppName: z.ZodString;
|
|
304
|
+
peerAccountId: z.ZodString;
|
|
305
|
+
peerRegion: z.ZodOptional<z.ZodString>;
|
|
306
|
+
peerVpcId: z.ZodOptional<z.ZodString>;
|
|
307
|
+
peerVpcCidr: z.ZodOptional<z.ZodString>;
|
|
308
|
+
peerRoleArn: z.ZodOptional<z.ZodString>;
|
|
309
|
+
peerRouteTableIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
310
|
+
localVpcName: z.ZodOptional<z.ZodString>;
|
|
311
|
+
enableDnsResolution: z.ZodOptional<z.ZodBoolean>;
|
|
312
|
+
}, z.core.$strict>;
|
|
313
|
+
/**
|
|
314
|
+
* VPC peering accepter resource plan — the responding side.
|
|
315
|
+
*
|
|
316
|
+
* Provisions the cross-account IAM role plus SSM parameters the requester
|
|
317
|
+
* reads to build the peering connection and its return routes. The
|
|
318
|
+
* `exposedResources` prop drives the Phase 2 cross-app resource handler:
|
|
319
|
+
* the codemod-emitted shape is a discriminated union keyed on `kind`; the
|
|
320
|
+
* runtime accepter factory consumes a richer in-process shape carrying the
|
|
321
|
+
* live construct reference (see `patterns/aws/vpcPeerAccepter.ts`).
|
|
322
|
+
*/
|
|
323
|
+
export declare const VpcPeerAccepterResourcePlanSchema: z.ZodObject<{
|
|
324
|
+
name: z.ZodString;
|
|
325
|
+
requesterAccountIds: z.ZodArray<z.ZodString>;
|
|
326
|
+
localVpcName: z.ZodOptional<z.ZodString>;
|
|
327
|
+
publishToSsm: z.ZodOptional<z.ZodBoolean>;
|
|
328
|
+
exposedResources: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
329
|
+
kind: z.ZodLiteral<"database">;
|
|
330
|
+
resource: z.ZodString;
|
|
331
|
+
name: z.ZodString;
|
|
332
|
+
allowedFromCidrs: z.ZodArray<z.ZodString>;
|
|
333
|
+
access: z.ZodOptional<z.ZodEnum<{
|
|
334
|
+
read: "read";
|
|
335
|
+
write: "write";
|
|
336
|
+
readWrite: "readWrite";
|
|
337
|
+
}>>;
|
|
338
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
339
|
+
kind: z.ZodLiteral<"ecsService">;
|
|
340
|
+
resource: z.ZodString;
|
|
341
|
+
serviceName: z.ZodString;
|
|
342
|
+
name: z.ZodString;
|
|
343
|
+
allowedFromCidrs: z.ZodArray<z.ZodString>;
|
|
344
|
+
port: z.ZodOptional<z.ZodNumber>;
|
|
345
|
+
}, z.core.$strict>], "kind">>>;
|
|
346
|
+
}, z.core.$strict>;
|
|
239
347
|
export type NatConfig = z.infer<typeof NatConfigSchema>;
|
|
240
348
|
export type FlowLogConfig = z.infer<typeof FlowLogConfigSchema>;
|
|
241
349
|
export type GatewayEndpointsConfig = z.infer<typeof GatewayEndpointsConfigSchema>;
|
|
242
350
|
export type InterfaceEndpointsConfig = z.infer<typeof InterfaceEndpointsConfigSchema>;
|
|
243
351
|
export type VpcEndpointsConfig = z.infer<typeof VpcEndpointsConfigSchema>;
|
|
352
|
+
export type NetworkName = z.infer<typeof NetworkNameSchema>;
|
|
353
|
+
export type CidrString = z.infer<typeof CidrStringSchema>;
|
|
244
354
|
export type NetworkResourcePlan = z.infer<typeof NetworkResourcePlanSchema>;
|
|
245
355
|
export type AdditionalNetworkResourcePlan = z.infer<typeof AdditionalNetworkResourcePlanSchema>;
|
|
246
356
|
export type NetworkGeneratorOptions = z.infer<typeof NetworkGeneratorSchema>;
|
|
357
|
+
export type VpcPeerResourcePlan = z.infer<typeof VpcPeerResourcePlanSchema>;
|
|
358
|
+
export type VpcPeerAccepterResourcePlan = z.infer<typeof VpcPeerAccepterResourcePlanSchema>;
|
|
359
|
+
export type DatabaseExposedResource = z.infer<typeof DatabaseExposedResourceSchema>;
|
|
360
|
+
export type EcsServiceExposedResource = z.infer<typeof EcsServiceExposedResourceSchema>;
|
|
361
|
+
export type ExposedResourcePlan = z.infer<typeof ExposedResourceSchema>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{z as o}from"zod";import{VALIDATION_PATTERNS as
|
|
1
|
+
import{z as o}from"zod";import{VALIDATION_PATTERNS as t,VALIDATION_MESSAGES as e}from"../validation/patterns.js";import{optionalOrDisabled as n,AppNameSchema as l,ResourceNameSchema as a,PortSchema as m}from"./baseSchemas.js";const R=o.object({count:o.number().int(e.NAT_GATEWAY.INTEGER).min(0,e.NAT_GATEWAY.MIN).max(3,e.NAT_GATEWAY.MAX).optional()}).strict().describe("NAT gateway configuration"),i=n(R),A=o.object({destination:o.enum(["cloudwatch","s3"]).optional(),retentionDays:o.number().int(e.RETENTION_DAYS.INTEGER).min(1,e.RETENTION_DAYS.MIN).max(365,e.RETENTION_DAYS.MAX).optional(),trafficType:o.enum(["ALL","ACCEPT","REJECT"]).optional()}).strict().describe("VPC flow log configuration"),c=n(A),N=o.object({s3:o.boolean().optional(),dynamodb:o.boolean().optional()}).strict().describe("Gateway VPC endpoints (FREE)"),S=n(N),C=o.object({ecr:o.boolean().optional(),secretsManager:o.boolean().optional(),kms:o.boolean().optional(),cloudwatchLogs:o.boolean().optional(),ssm:o.boolean().optional(),sts:o.boolean().optional()}).strict().describe("Interface VPC endpoints (cost per hour)"),_=n(C),I=o.object({gateway:S.optional(),interface:_.optional()}).strict().describe("VPC endpoints configuration"),s=n(I),p=o.object({maxAzs:o.number().int(e.MAX_AZS.INTEGER).min(1,e.MAX_AZS.MIN).max(3,e.MAX_AZS.MAX).optional(),natGateways:i.optional(),flowLogs:c.optional(),vpcEndpoints:s.optional(),cidrMask:o.number().int(e.CIDR_MASK.INTEGER).min(16,e.CIDR_MASK.MIN).max(28,e.CIDR_MASK.MAX).optional()}).strict(),E=o.string().min(1,e.REQUIRED.NETWORK_NAME).max(50,e.MAX_LENGTH.NETWORK_NAME).regex(t.RESOURCE_NAME,e.RESOURCE_NAME),D=p.extend({name:E}).strict(),h=n(p),O=o.object({appName:l,networkName:E.optional(),maxAzs:o.number().int(e.MAX_AZS.INTEGER).min(1,e.MAX_AZS.MIN).max(3,e.MAX_AZS.MAX).optional(),natGateways:i.optional(),flowLogs:c.optional(),vpcEndpoints:s.optional()}).strict(),d=t.CIDR,r=o.string().regex(d,e.CIDR),g=o.object({kind:o.literal("database"),resource:o.string().min(1,e.REQUIRED.RESOURCE_REFERENCE),name:a,allowedFromCidrs:o.array(r),access:o.enum(["read","write","readWrite"]).optional()}).strict(),x=o.object({kind:o.literal("ecsService"),resource:o.string().min(1,e.REQUIRED.RESOURCE_REFERENCE),serviceName:o.string().min(1,e.REQUIRED.SERVICE_NAME),name:a,allowedFromCidrs:o.array(r),port:m.optional()}).strict(),T=o.discriminatedUnion("kind",[g,x]),f=o.object({name:a,peerAppName:o.string().min(1,e.REQUIRED.APP_NAME),peerAccountId:o.string().regex(t.AWS_ACCOUNT_ID,e.AWS_ACCOUNT_ID),peerRegion:o.string().min(1,e.VPC_PEER.REGION_REQUIRED).optional(),peerVpcId:o.string().regex(t.VPC_ID,e.VPC_ID).optional(),peerVpcCidr:r.optional(),peerRoleArn:o.string().regex(t.ROLE_ARN,e.ROLE_ARN).optional(),peerRouteTableIds:o.array(o.string().min(1,e.VPC_PEER.ROUTE_TABLE_ID_REQUIRED)).optional(),localVpcName:o.string().min(1,e.REQUIRED.NETWORK_NAME).optional(),enableDnsResolution:o.boolean().optional()}).strict(),w=o.object({name:a,requesterAccountIds:o.array(o.string().regex(t.AWS_ACCOUNT_ID,e.AWS_ACCOUNT_ID)).min(1,e.VPC_PEER.MIN_REQUESTER_ACCOUNTS),localVpcName:o.string().min(1,e.REQUIRED.NETWORK_NAME).optional(),publishToSsm:o.boolean().optional(),exposedResources:o.array(T).optional()}).strict();export{D as AdditionalNetworkResourcePlanSchema,d as CIDR_REGEX,r as CidrStringSchema,g as DatabaseExposedResourceSchema,x as EcsServiceExposedResourceSchema,T as ExposedResourceSchema,c as FlowLogConfigOrFalseSchema,A as FlowLogConfigSchema,S as GatewayEndpointsConfigOrFalseSchema,N as GatewayEndpointsConfigSchema,_ as InterfaceEndpointsConfigOrFalseSchema,C as InterfaceEndpointsConfigSchema,i as NatConfigOrFalseSchema,R as NatConfigSchema,h as NetworkConfigSchema,O as NetworkGeneratorSchema,E as NetworkNameSchema,p as NetworkResourcePlanSchema,s as VpcEndpointsConfigOrFalseSchema,I as VpcEndpointsConfigSchema,w as VpcPeerAccepterResourcePlanSchema,f as VpcPeerResourcePlanSchema};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{z as o}from"zod";import{VALIDATION_MESSAGES as t}from"../validation/patterns.js";import{BackupRetentionSchema as a,MonitoringIntervalSchema as
|
|
1
|
+
import{z as o}from"zod";import{VALIDATION_MESSAGES as t,VALIDATION_PATTERNS as S}from"../validation/patterns.js";import{BackupRetentionSchema as a,MonitoringIntervalSchema as A,DatabasePortSchema as T,ProxyConfigOrFalseSchema as I,ReadReplicaConfigOrFalseSchema as g,AuroraWriterConfigSchema as M,AuroraReadersConfigOrFalseSchema as d,DatabaseInsightsConfigOrFalseSchema as b,CredentialsConfigSchema as R,EncryptionConfigSchema as N}from"./databaseSchemas.js";import{LambdaMemorySchema as i}from"./computeSchemas.js";import{PATTERN_DATABASE_TYPES as r,DATABASE_ENGINES as u}from"./constants.js";const e=o.object({memorySize:i.optional(),timeout:o.number().int(t.LAMBDA.TIMEOUT.INTEGER).min(1,t.LAMBDA.TIMEOUT.MIN).max(900,t.LAMBDA.TIMEOUT.MAX).optional(),ephemeralStorageSize:o.number().int(t.EPHEMERAL_STORAGE.INTEGER).min(512,t.EPHEMERAL_STORAGE.MIN).max(10240,t.EPHEMERAL_STORAGE.MAX).optional()}).strict(),l=o.object({type:o.enum(r).optional(),databaseName:o.string().optional(),databaseEngine:o.enum(u).optional(),deletionProtection:o.boolean().optional(),backupRetention:a.optional(),port:T.optional(),publiclyAccessible:o.boolean().optional(),allowedIpCidr:o.string().optional(),instanceType:o.string().optional(),allocatedStorage:o.number().int(t.ALLOCATED_STORAGE.INTEGER).min(20,t.ALLOCATED_STORAGE.MIN).max(65536,t.ALLOCATED_STORAGE.MAX).optional(),multiAz:o.boolean().optional(),readReplica:g.optional(),writer:M.optional(),readers:d.optional(),allowVpcAccess:o.boolean().optional(),monitoringInterval:A.optional(),preferredMaintenanceWindow:o.string().optional(),databaseInsights:b.optional(),proxy:I.optional(),credentials:R.optional(),encryption:N.optional(),snapshotIdentifier:o.string().optional(),snapshotUsername:o.string().optional()}).strict(),p=o.object({server:e.optional(),imageOptimisation:e.optional(),revalidation:e.optional()}).strict(),n=o.object({versioned:o.boolean().optional()}).strict(),m=o.object({assets:n.optional(),cache:n.optional(),media:n.optional()}).strict(),C=o.object({visibilityTimeout:o.number().int(t.SQS.VISIBILITY_TIMEOUT.INTEGER).min(0,t.SQS.VISIBILITY_TIMEOUT.MIN).max(43200,t.SQS.VISIBILITY_TIMEOUT.MAX).optional(),messageRetentionPeriod:o.number().int(t.SQS.RETENTION_PERIOD.INTEGER).min(60,t.SQS.RETENTION_PERIOD.MIN).max(1209600,t.SQS.RETENTION_PERIOD.MAX).optional(),maxMessageSize:o.number().int(t.MAX_MESSAGE_SIZE.INTEGER).min(1024,t.MAX_MESSAGE_SIZE.MIN).max(262144,t.MAX_MESSAGE_SIZE.MAX).optional(),deadLetterQueue:o.union([o.literal(!1),o.object({enabled:o.boolean().optional(),maxReceiveCount:o.number().int(t.DLQ.MAX_RECEIVE_COUNT.INTEGER).min(1,t.DLQ.MAX_RECEIVE_COUNT.MIN).max(1e3,t.DLQ.MAX_RECEIVE_COUNT.MAX).optional()}).strict()]).optional()}).strict(),s=o.object({revalidationQueue:C.optional()}).strict(),c=o.object({domainNames:o.array(o.string()).optional(),certificateArn:o.string().optional()}).strict(),E=o.record(o.string().regex(S.ENV_VAR_NAME,t.ENV_VAR_NAME),o.string()).optional(),_=o.object({type:o.literal("payload"),name:o.string().min(1,t.REQUIRED.PATTERN_NAME),domain:o.string().optional(),database:l.optional(),compute:p.optional(),storage:m.optional(),messaging:s.optional(),cdn:c.optional(),environment:E}).strict(),h=o.object({type:o.literal("nextjs"),name:o.string().min(1,t.REQUIRED.PATTERN_NAME),domain:o.string().optional(),database:l.optional(),compute:p.optional(),storage:m.optional(),messaging:s.optional(),cdn:c.optional(),environment:E}).strict(),y=o.discriminatedUnion("type",[_,h]),D=o.enum(["lightweight","standard","resilient","custom"]),G=o.object({type:o.enum(r),instanceType:o.string().optional(),backupRetention:a.optional(),deletionProtection:o.boolean().optional(),encryption:o.union([o.object({useCMK:o.literal(!0)}).strict(),o.literal(!1)]).optional()}).strict(),U=o.object({memorySize:i.optional(),timeout:o.number().int(t.LAMBDA.TIMEOUT.INTEGER).min(1,t.LAMBDA.TIMEOUT.MIN).max(900,t.LAMBDA.TIMEOUT.MAX).optional()}).strict();export{U as CustomPatternComputeSchema,G as CustomPatternDatabaseSchema,h as NextJSPatternConfigSchema,y as PatternConfigSchema,e as PatternLambdaConfigSchema,C as PatternQueueConfigSchema,n as PatternStorageBucketConfigSchema,D as PatternTierSchema,c as PayloadCdnConfigSchema,p as PayloadComputeConfigSchema,l as PayloadDatabaseConfigSchema,s as PayloadMessagingConfigSchema,_ as PayloadPatternConfigSchema,m as PayloadStorageConfigSchema};
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* and presets/tierPresets.ts. Both modules re-export these symbols for backwards
|
|
6
6
|
* compatibility — consumers can import from either without changes.
|
|
7
7
|
*/
|
|
8
|
-
export declare const DATABASE_TYPES: readonly ["Aurora", "Instance", "GlobalAurora"];
|
|
8
|
+
export declare const DATABASE_TYPES: readonly ["Aurora", "Instance", "GlobalAurora", "ClickHouse"];
|
|
9
9
|
export type DatabaseType = (typeof DATABASE_TYPES)[number];
|
|
10
10
|
export declare const ECS_CAPACITY_PROVIDERS: readonly ["FARGATE", "FARGATE_SPOT", "EC2"];
|
|
11
11
|
export type EcsCapacityProvider = (typeof ECS_CAPACITY_PROVIDERS)[number];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const r=["Aurora","Instance","GlobalAurora"],o=["FARGATE","FARGATE_SPOT","EC2"],n=["standard","resilient","enterprise"],t=["tinkerer","lightweight","standard","resilient","enterprise"],e="custom",
|
|
1
|
+
const r=["Aurora","Instance","GlobalAurora","ClickHouse"],o=["FARGATE","FARGATE_SPOT","EC2"],n=["standard","resilient","enterprise"],t=["tinkerer","lightweight","standard","resilient","enterprise"],e="custom",s=[...t,e];export{s as APP_TYPES,n as BACKUP_VAULT_TIERS,e as CUSTOM_TIER,r as DATABASE_TYPES,o as ECS_CAPACITY_PROVIDERS,t as TIER_NAMES};
|