@fjall/generator 0.94.1 → 0.96.0

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