@awsless/awsless 0.0.653 → 0.0.655

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.
@@ -4,7 +4,7 @@ import { join as join2 } from "node:path";
4
4
  import { zodToJsonSchema } from "zod-to-json-schema";
5
5
 
6
6
  // src/config/app.ts
7
- import { z as z24 } from "zod";
7
+ import { z as z25 } from "zod";
8
8
 
9
9
  // src/feature/alert/schema.ts
10
10
  import { kebabCase } from "change-case";
@@ -366,39 +366,50 @@ var LayerSchema = z13.record(
366
366
  ).optional().describe("Define the lambda layers in your stack.");
367
367
 
368
368
  // src/feature/on-failure/schema.ts
369
- var OnFailureDefaultSchema = FunctionSchema.optional().describe(
369
+ import { z as z14 } from "zod";
370
+ var NotifySchema = z14.union([
371
+ //
372
+ EmailSchema.transform((v) => [v]),
373
+ EmailSchema.array()
374
+ ]).describe("Receive an email notification when consuming failure entries goes wrong.");
375
+ var OnFailureDefaultSchema = z14.object({
376
+ consumer: FunctionSchema,
377
+ notify: NotifySchema.optional()
378
+ }).optional().describe(
370
379
  [
371
380
  "Defining a onFailure handler will add a global onFailure handler for the following resources:",
372
- "- CloudWatch Scheduler",
373
- "- Async lambda functions",
374
- "- SQS queues",
375
- "- DynamoDB streams"
381
+ "- Tasks",
382
+ "- Crons",
383
+ "- Queues",
384
+ "- Topics",
385
+ "- Pubsub",
386
+ "- Table streams"
376
387
  ].join("\n")
377
388
  );
378
389
 
379
390
  // src/feature/on-log/schema.ts
380
- import { z as z14 } from "zod";
381
- var FilterSchema = z14.enum(["trace", "debug", "info", "warn", "error", "fatal"]).array().describe("The log level that will gets delivered to the consumer.");
382
- var OnLogDefaultSchema = z14.union([
391
+ import { z as z15 } from "zod";
392
+ var FilterSchema = z15.enum(["trace", "debug", "info", "warn", "error", "fatal"]).array().describe("The log level that will gets delivered to the consumer.");
393
+ var OnLogDefaultSchema = z15.union([
383
394
  FunctionSchema.transform((consumer) => ({
384
395
  consumer,
385
396
  filter: ["error", "fatal"]
386
397
  })),
387
- z14.object({
398
+ z15.object({
388
399
  consumer: FunctionSchema,
389
400
  filter: FilterSchema
390
401
  })
391
402
  ]).optional().describe("Define a subscription on all Lambda functions logs.");
392
403
 
393
404
  // src/feature/pubsub/schema.ts
394
- import { z as z15 } from "zod";
405
+ import { z as z16 } from "zod";
395
406
  var DomainSchema = ResourceIdSchema.describe("The domain id to link your Pubsub API with.");
396
- var PubSubDefaultSchema = z15.record(
407
+ var PubSubDefaultSchema = z16.record(
397
408
  ResourceIdSchema,
398
- z15.object({
409
+ z16.object({
399
410
  auth: FunctionSchema,
400
411
  domain: DomainSchema.optional(),
401
- subDomain: z15.string().optional()
412
+ subDomain: z16.string().optional()
402
413
  // auth: z.union([
403
414
  // ResourceIdSchema,
404
415
  // z.object({
@@ -414,11 +425,11 @@ var PubSubDefaultSchema = z15.record(
414
425
  // .optional(),
415
426
  })
416
427
  ).optional().describe("Define the pubsub subscriber in your stack.");
417
- var PubSubSchema = z15.record(
428
+ var PubSubSchema = z16.record(
418
429
  ResourceIdSchema,
419
- z15.object({
420
- sql: z15.string().describe("The SQL statement used to query the IOT topic."),
421
- sqlVersion: z15.enum(["2015-10-08", "2016-03-23", "beta"]).default("2016-03-23").describe("The version of the SQL rules engine to use when evaluating the rule."),
430
+ z16.object({
431
+ sql: z16.string().describe("The SQL statement used to query the IOT topic."),
432
+ sqlVersion: z16.enum(["2015-10-08", "2016-03-23", "beta"]).default("2016-03-23").describe("The version of the SQL rules engine to use when evaluating the rule."),
422
433
  consumer: FunctionSchema.describe("The consuming lambda function properties.")
423
434
  })
424
435
  ).optional().describe("Define the pubsub subscriber in your stack.");
@@ -426,7 +437,7 @@ var PubSubSchema = z15.record(
426
437
  // src/feature/queue/schema.ts
427
438
  import { days as days2, hours, minutes as minutes2, seconds as seconds2 } from "@awsless/duration";
428
439
  import { kibibytes } from "@awsless/size";
429
- import { z as z16 } from "zod";
440
+ import { z as z17 } from "zod";
430
441
  var RetentionPeriodSchema = DurationSchema.refine(
431
442
  durationMin(minutes2(1)),
432
443
  "Minimum retention period is 1 minute"
@@ -454,10 +465,10 @@ var ReceiveMessageWaitTimeSchema = DurationSchema.refine(
454
465
  var MaxMessageSizeSchema = SizeSchema.refine(sizeMin(kibibytes(1)), "Minimum max message size is 1 KB").refine(sizeMax(kibibytes(256)), "Maximum max message size is 256 KB").describe(
455
466
  "The limit of how many bytes that a message can contain before Amazon SQS rejects it. You can specify an size from 1 KB to 256 KB."
456
467
  );
457
- var BatchSizeSchema = z16.number().int().min(1, "Minimum batch size is 1").max(1e4, "Maximum batch size is 10000").describe(
468
+ var BatchSizeSchema = z17.number().int().min(1, "Minimum batch size is 1").max(1e4, "Maximum batch size is 10000").describe(
458
469
  "The maximum number of records in each batch that Lambda pulls from your queue and sends to your function. Lambda passes all of the records in the batch to the function in a single call, up to the payload limit for synchronous invocation (6 MB). You can specify an integer from 1 to 10000."
459
470
  );
460
- var MaxConcurrencySchema = z16.number().int().min(2, "Minimum max concurrency is 2").max(1e3, "Maximum max concurrency is 1000").describe(
471
+ var MaxConcurrencySchema = z17.number().int().min(2, "Minimum max concurrency is 2").max(1e3, "Maximum max concurrency is 1000").describe(
461
472
  "Limits the number of concurrent instances that the queue worker can invoke. You can specify an integer from 2 to 1000."
462
473
  );
463
474
  var MaxBatchingWindow = DurationSchema.refine(
@@ -466,7 +477,10 @@ var MaxBatchingWindow = DurationSchema.refine(
466
477
  ).describe(
467
478
  "The maximum amount of time, that Lambda spends gathering records before invoking the function. You can specify an duration from 0 seconds to 5 minutes."
468
479
  );
469
- var QueueDefaultSchema = z16.object({
480
+ var RetryAttemptsSchema2 = z17.number().int().min(0).max(999).describe(
481
+ "The maximum number of times to retry when the function returns an error. You can specify a number from 0 to 999."
482
+ );
483
+ var QueueDefaultSchema = z17.object({
470
484
  retentionPeriod: RetentionPeriodSchema.default("7 days"),
471
485
  visibilityTimeout: VisibilityTimeoutSchema.default("30 seconds"),
472
486
  deliveryDelay: DeliveryDelaySchema.default("0 seconds"),
@@ -474,9 +488,10 @@ var QueueDefaultSchema = z16.object({
474
488
  maxMessageSize: MaxMessageSizeSchema.default("256 KB"),
475
489
  batchSize: BatchSizeSchema.default(10),
476
490
  maxConcurrency: MaxConcurrencySchema.optional(),
477
- maxBatchingWindow: MaxBatchingWindow.optional()
491
+ maxBatchingWindow: MaxBatchingWindow.optional(),
492
+ retryAttempts: RetryAttemptsSchema2.default(2)
478
493
  }).default({});
479
- var QueueSchema = z16.object({
494
+ var QueueSchema = z17.object({
480
495
  consumer: FunctionSchema.optional().describe("The consuming lambda function properties."),
481
496
  retentionPeriod: RetentionPeriodSchema.optional(),
482
497
  visibilityTimeout: VisibilityTimeoutSchema.optional(),
@@ -485,11 +500,12 @@ var QueueSchema = z16.object({
485
500
  maxMessageSize: MaxMessageSizeSchema.optional(),
486
501
  batchSize: BatchSizeSchema.optional(),
487
502
  maxConcurrency: MaxConcurrencySchema.optional(),
488
- maxBatchingWindow: MaxBatchingWindow.optional()
503
+ maxBatchingWindow: MaxBatchingWindow.optional(),
504
+ retryAttempts: RetryAttemptsSchema2.optional()
489
505
  });
490
- var QueuesSchema = z16.record(
506
+ var QueuesSchema = z17.record(
491
507
  ResourceIdSchema,
492
- z16.union([
508
+ z17.union([
493
509
  LocalFileSchema.transform((consumer) => ({
494
510
  consumer
495
511
  })).pipe(QueueSchema),
@@ -498,26 +514,26 @@ var QueuesSchema = z16.record(
498
514
  ).optional().describe("Define the queues in your stack.");
499
515
 
500
516
  // src/feature/rest/schema.ts
501
- import { z as z18 } from "zod";
517
+ import { z as z19 } from "zod";
502
518
 
503
519
  // src/config/schema/route.ts
504
- import { z as z17 } from "zod";
505
- var RouteSchema = z17.union([
506
- z17.string().regex(/^(POST|GET|PUT|DELETE|HEAD|OPTIONS|ANY)(\s\/[a-z0-9\+\_\-\/\{\}]*)$/gi, "Invalid route"),
507
- z17.literal("$default")
520
+ import { z as z18 } from "zod";
521
+ var RouteSchema = z18.union([
522
+ z18.string().regex(/^(POST|GET|PUT|DELETE|HEAD|OPTIONS|ANY)(\s\/[a-z0-9\+\_\-\/\{\}]*)$/gi, "Invalid route"),
523
+ z18.literal("$default")
508
524
  ]);
509
525
 
510
526
  // src/feature/rest/schema.ts
511
- var RestDefaultSchema = z18.record(
527
+ var RestDefaultSchema = z19.record(
512
528
  ResourceIdSchema,
513
- z18.object({
529
+ z19.object({
514
530
  domain: ResourceIdSchema.describe("The domain id to link your API with.").optional(),
515
- subDomain: z18.string().optional()
531
+ subDomain: z19.string().optional()
516
532
  })
517
533
  ).optional().describe("Define your global REST API's.");
518
- var RestSchema = z18.record(
534
+ var RestSchema = z19.record(
519
535
  ResourceIdSchema,
520
- z18.record(
536
+ z19.record(
521
537
  RouteSchema.describe(
522
538
  [
523
539
  "The REST API route that is comprised by the http method and http path.",
@@ -531,19 +547,19 @@ var RestSchema = z18.record(
531
547
 
532
548
  // src/feature/rpc/schema.ts
533
549
  import { minutes as minutes4, seconds as seconds3 } from "@awsless/duration";
534
- import { z as z20 } from "zod";
550
+ import { z as z21 } from "zod";
535
551
 
536
552
  // src/feature/router/schema.ts
537
553
  import { days as days3, minutes as minutes3, parse as parse3 } from "@awsless/duration";
538
- import { z as z19 } from "zod";
539
- var ErrorResponsePathSchema = z19.string().describe(
554
+ import { z as z20 } from "zod";
555
+ var ErrorResponsePathSchema = z20.string().describe(
540
556
  [
541
557
  "The path to the custom error page that you want to return to the viewer when your origin returns the HTTP status code specified.",
542
558
  "- We recommend that you store custom error pages in an Amazon S3 bucket.",
543
559
  "If you store custom error pages on an HTTP server and the server starts to return 5xx errors, CloudFront can't get the files that you want to return to viewers because the origin server is unavailable."
544
560
  ].join("\n")
545
561
  );
546
- var StatusCodeSchema = z19.number().int().positive().optional().describe(
562
+ var StatusCodeSchema = z20.number().int().positive().optional().describe(
547
563
  [
548
564
  "The HTTP status code that you want CloudFront to return to the viewer along with the custom error page.",
549
565
  "There are a variety of reasons that you might want CloudFront to return a status code different from the status code that your origin returned to CloudFront, for example:",
@@ -556,26 +572,26 @@ var StatusCodeSchema = z19.number().int().positive().optional().describe(
556
572
  var MinTTLSchema = DurationSchema.describe(
557
573
  "The minimum amount of time, that you want to cache the error response. When this time period has elapsed, CloudFront queries your origin to see whether the problem that caused the error has been resolved and the requested object is now available."
558
574
  );
559
- var ErrorResponseSchema = z19.union([
575
+ var ErrorResponseSchema = z20.union([
560
576
  ErrorResponsePathSchema,
561
- z19.object({
577
+ z20.object({
562
578
  path: ErrorResponsePathSchema,
563
579
  statusCode: StatusCodeSchema.optional(),
564
580
  minTTL: MinTTLSchema.optional()
565
581
  })
566
582
  ]).optional();
567
- var RouteSchema2 = z19.string().regex(/^\//, "Route must start with a slash (/)");
568
- var VisibilitySchema = z19.boolean().default(false).describe("Whether to enable CloudWatch metrics for the WAF rule.");
569
- var WafSettingsSchema = z19.object({
570
- rateLimiter: z19.object({
571
- limit: z19.number().min(10).max(2e9).default(10).describe(
583
+ var RouteSchema2 = z20.string().regex(/^\//, "Route must start with a slash (/)");
584
+ var VisibilitySchema = z20.boolean().default(false).describe("Whether to enable CloudWatch metrics for the WAF rule.");
585
+ var WafSettingsSchema = z20.object({
586
+ rateLimiter: z20.object({
587
+ limit: z20.number().min(10).max(2e9).default(10).describe(
572
588
  "The limit on requests during the specified evaluation window for a single aggregation instance for the rate-based rule."
573
589
  ),
574
- window: z19.union([
575
- z19.literal("1 minute"),
576
- z19.literal("2 minutes"),
577
- z19.literal("5 minutes"),
578
- z19.literal("10 minutes")
590
+ window: z20.union([
591
+ z20.literal("1 minute"),
592
+ z20.literal("2 minutes"),
593
+ z20.literal("5 minutes"),
594
+ z20.literal("10 minutes")
579
595
  ]).default("5 minutes").transform((v) => parse3(v)).describe(
580
596
  "The amount of time, in seconds, that AWS WAF should include in its request counts, looking back from the current time."
581
597
  ),
@@ -583,18 +599,18 @@ var WafSettingsSchema = z19.object({
583
599
  }).optional().describe(
584
600
  "A rate-based rule counts incoming requests and rate limits requests when they are coming at too fast a rate."
585
601
  ),
586
- ddosProtection: z19.object({
587
- sensitivity: z19.object({
588
- challenge: z19.enum(["low", "medium", "high"]).default("low").transform((v) => v.toUpperCase()).describe("The sensitivity level for challenge requests."),
589
- block: z19.enum(["low", "medium", "high"]).default("low").transform((v) => v.toUpperCase()).describe("The sensitivity level for block requests.")
602
+ ddosProtection: z20.object({
603
+ sensitivity: z20.object({
604
+ challenge: z20.enum(["low", "medium", "high"]).default("low").transform((v) => v.toUpperCase()).describe("The sensitivity level for challenge requests."),
605
+ block: z20.enum(["low", "medium", "high"]).default("low").transform((v) => v.toUpperCase()).describe("The sensitivity level for block requests.")
590
606
  }),
591
- exemptUriRegex: z19.string().default("^$"),
607
+ exemptUriRegex: z20.string().default("^$"),
592
608
  visibility: VisibilitySchema
593
609
  }).optional().describe(
594
610
  "Provides protection against DDoS attacks targeting the application layer, also known as Layer 7 attacks. Uses 50 WCU."
595
611
  ),
596
- botProtection: z19.object({
597
- inspectionLevel: z19.enum(["common", "targeted"]).default("common").transform((v) => v.toUpperCase()),
612
+ botProtection: z20.object({
613
+ inspectionLevel: z20.enum(["common", "targeted"]).default("common").transform((v) => v.toUpperCase()),
598
614
  visibility: VisibilitySchema
599
615
  }).optional().describe(
600
616
  "Provides protection against automated bots that can consume excess resources, skew business metrics, cause downtime, or perform malicious activities. Bot Control provides additional visibility through Amazon CloudWatch and generates labels that you can use to control bot traffic to your applications. Uses 50 WCU."
@@ -608,14 +624,14 @@ var WafSettingsSchema = z19.object({
608
624
  }).describe(
609
625
  "WAF settings for the router. Each rule consumes Web ACL capacity units (WCUs). The total WCUs for a web ACL can't exceed 5000. Using over 1500 WCUs affects your costs."
610
626
  );
611
- var RouterDefaultSchema = z19.record(
627
+ var RouterDefaultSchema = z20.record(
612
628
  ResourceIdSchema,
613
- z19.object({
629
+ z20.object({
614
630
  domain: ResourceIdSchema.describe("The domain id to link your Router.").optional(),
615
- subDomain: z19.string().optional(),
631
+ subDomain: z20.string().optional(),
616
632
  waf: WafSettingsSchema.optional(),
617
- geoRestrictions: z19.array(z19.string().length(2).toUpperCase()).default([]).describe("Specifies a blacklist of countries that should be blocked."),
618
- errors: z19.object({
633
+ geoRestrictions: z20.array(z20.string().length(2).toUpperCase()).default([]).describe("Specifies a blacklist of countries that should be blocked."),
634
+ errors: z20.object({
619
635
  400: ErrorResponseSchema.describe("Customize a `400 Bad Request` response."),
620
636
  403: ErrorResponseSchema.describe("Customize a `403 Forbidden` response."),
621
637
  404: ErrorResponseSchema.describe("Customize a `404 Not Found` response."),
@@ -628,19 +644,22 @@ var RouterDefaultSchema = z19.record(
628
644
  503: ErrorResponseSchema.describe("Customize a `503 Service Unavailable` response."),
629
645
  504: ErrorResponseSchema.describe("Customize a `504 Gateway Timeout` response.")
630
646
  }).optional().describe("Customize the error responses for specific HTTP status codes."),
631
- cors: z19.object({
632
- override: z19.boolean().default(false),
647
+ cors: z20.object({
648
+ override: z20.boolean().default(false),
633
649
  maxAge: DurationSchema.default("365 days"),
634
- exposeHeaders: z19.string().array().optional(),
635
- credentials: z19.boolean().default(false),
636
- headers: z19.string().array().default(["*"]),
637
- origins: z19.string().array().default(["*"]),
638
- methods: z19.enum(["GET", "DELETE", "HEAD", "OPTIONS", "PATCH", "POST", "PUT", "ALL"]).array().default(["ALL"])
650
+ exposeHeaders: z20.string().array().optional(),
651
+ credentials: z20.boolean().default(false),
652
+ headers: z20.string().array().default(["*"]),
653
+ origins: z20.string().array().default(["*"]),
654
+ methods: z20.enum(["GET", "DELETE", "HEAD", "OPTIONS", "PATCH", "POST", "PUT", "ALL"]).array().default(["ALL"])
639
655
  }).optional().describe("Specify the cors headers."),
640
- basicAuth: z19.object({
641
- username: z19.string().describe("Basic auth username."),
642
- password: z19.string().describe("Basic auth password.")
643
- }).optional().describe("Enable basic authentication for the site."),
656
+ passwordAuth: z20.object({
657
+ password: z20.string().describe("Password.")
658
+ }).optional().describe("Enable password authentication for the router."),
659
+ basicAuth: z20.object({
660
+ username: z20.string().describe("Basic auth username."),
661
+ password: z20.string().describe("Basic auth password.")
662
+ }).optional().describe("Enable basic authentication for the router."),
644
663
  // security: z
645
664
  // .object({
646
665
  // contentSecurityPolicy: z.object({
@@ -686,10 +705,10 @@ var RouterDefaultSchema = z19.record(
686
705
  // })
687
706
  // .optional()
688
707
  // .describe('Specify the security policy.'),
689
- cache: z19.object({
690
- cookies: z19.string().array().optional().describe("Specifies the cookies that CloudFront includes in the cache key."),
691
- headers: z19.string().array().optional().describe("Specifies the headers that CloudFront includes in the cache key."),
692
- queries: z19.string().array().optional().describe("Specifies the query values that CloudFront includes in the cache key.")
708
+ cache: z20.object({
709
+ cookies: z20.string().array().optional().describe("Specifies the cookies that CloudFront includes in the cache key."),
710
+ headers: z20.string().array().optional().describe("Specifies the headers that CloudFront includes in the cache key."),
711
+ queries: z20.string().array().optional().describe("Specifies the query values that CloudFront includes in the cache key.")
693
712
  }).optional().describe(
694
713
  "Specifies the cookies, headers, and query values that CloudFront includes in the cache key."
695
714
  )
@@ -704,9 +723,9 @@ var TimeoutSchema2 = DurationSchema.refine(durationMin(seconds3(10)), "Minimum t
704
723
  "The timeouts of all inner RPC functions will be capped at 80% of this timeout."
705
724
  ].join(" ")
706
725
  );
707
- var RpcDefaultSchema = z20.record(
726
+ var RpcDefaultSchema = z21.record(
708
727
  ResourceIdSchema,
709
- z20.object({
728
+ z21.object({
710
729
  // domain: ResourceIdSchema.describe('The domain id to link your RPC API with.').optional(),
711
730
  // subDomain: z.string().optional(),
712
731
  //
@@ -717,18 +736,18 @@ var RpcDefaultSchema = z20.record(
717
736
  timeout: TimeoutSchema2.default("1 minutes")
718
737
  })
719
738
  ).describe(`Define the global RPC API's.`).optional();
720
- var RpcSchema = z20.record(
739
+ var RpcSchema = z21.record(
721
740
  ResourceIdSchema,
722
- z20.record(
723
- z20.string(),
724
- z20.union([
741
+ z21.record(
742
+ z21.string(),
743
+ z21.union([
725
744
  FunctionSchema.transform((f) => ({
726
745
  function: f,
727
746
  lock: false
728
747
  })),
729
- z20.object({
748
+ z21.object({
730
749
  function: FunctionSchema.describe("The RPC function to execute."),
731
- lock: z20.boolean().describe(
750
+ lock: z21.boolean().describe(
732
751
  [
733
752
  "Specify if the function should be locked on the `lockKey` returned from the auth function.",
734
753
  "An example would be returning the user ID as `lockKey`."
@@ -742,8 +761,8 @@ var RpcSchema = z20.record(
742
761
  // src/feature/instance/schema.ts
743
762
  import { days as days4, toDays as toDays2 } from "@awsless/duration";
744
763
  import { toMebibytes } from "@awsless/size";
745
- import { z as z21 } from "zod";
746
- var CpuSchema = z21.union([z21.literal(0.25), z21.literal(0.5), z21.literal(1), z21.literal(2), z21.literal(4), z21.literal(8), z21.literal(16)]).transform((v) => `${v} vCPU`).describe(
764
+ import { z as z22 } from "zod";
765
+ var CpuSchema = z22.union([z22.literal(0.25), z22.literal(0.5), z22.literal(1), z22.literal(2), z22.literal(4), z22.literal(8), z22.literal(16)]).transform((v) => `${v} vCPU`).describe(
747
766
  "The number of virtual CPU units (vCPU) used by the instance. Valid values: 0.25, 0.5, 1, 2, 4, 8, 16 vCPU."
748
767
  );
749
768
  var validMemorySize = [
@@ -783,10 +802,10 @@ var MemorySizeSchema2 = SizeSchema.refine(
783
802
  (s) => validMemorySize.includes(toMebibytes(s)),
784
803
  `Invalid memory size. Allowed sizes: ${validMemorySize.join(", ")} MiB`
785
804
  ).describe("The amount of memory (in MiB) used by the instance. Valid memory values depend on the CPU configuration.");
786
- var HealthCheckSchema = z21.object({
787
- path: z21.string().describe("The path that the container runs to determine if it is healthy."),
805
+ var HealthCheckSchema = z22.object({
806
+ path: z22.string().describe("The path that the container runs to determine if it is healthy."),
788
807
  interval: DurationSchema.describe("The time period in seconds between each health check execution."),
789
- retries: z21.number().int().min(1).max(10).describe(
808
+ retries: z22.number().int().min(1).max(10).describe(
790
809
  "The number of times to retry a failed health check before the container is considered unhealthy."
791
810
  ),
792
811
  startPeriod: DurationSchema.describe(
@@ -796,22 +815,22 @@ var HealthCheckSchema = z21.object({
796
815
  "The time period in seconds to wait for a health check to succeed before it is considered a failure."
797
816
  )
798
817
  }).describe("The health check command and associated configuration parameters for the container.");
799
- var EnvironmentSchema2 = z21.record(z21.string(), z21.string()).optional().describe("Environment variable key-value pairs.");
800
- var ArchitectureSchema3 = z21.enum(["x86_64", "arm64"]).describe("The instruction set architecture that the instance supports.");
801
- var ActionSchema2 = z21.string();
802
- var ActionsSchema2 = z21.union([ActionSchema2.transform((v) => [v]), ActionSchema2.array()]);
803
- var ArnSchema2 = z21.string().startsWith("arn:");
804
- var WildcardSchema2 = z21.literal("*");
805
- var ResourceSchema2 = z21.union([ArnSchema2, WildcardSchema2]);
806
- var ResourcesSchema2 = z21.union([ResourceSchema2.transform((v) => [v]), ResourceSchema2.array()]);
807
- var PermissionSchema2 = z21.object({
808
- effect: z21.enum(["allow", "deny"]).default("allow"),
818
+ var EnvironmentSchema2 = z22.record(z22.string(), z22.string()).optional().describe("Environment variable key-value pairs.");
819
+ var ArchitectureSchema3 = z22.enum(["x86_64", "arm64"]).describe("The instruction set architecture that the instance supports.");
820
+ var ActionSchema2 = z22.string();
821
+ var ActionsSchema2 = z22.union([ActionSchema2.transform((v) => [v]), ActionSchema2.array()]);
822
+ var ArnSchema2 = z22.string().startsWith("arn:");
823
+ var WildcardSchema2 = z22.literal("*");
824
+ var ResourceSchema2 = z22.union([ArnSchema2, WildcardSchema2]);
825
+ var ResourcesSchema2 = z22.union([ResourceSchema2.transform((v) => [v]), ResourceSchema2.array()]);
826
+ var PermissionSchema2 = z22.object({
827
+ effect: z22.enum(["allow", "deny"]).default("allow"),
809
828
  actions: ActionsSchema2,
810
829
  resources: ResourcesSchema2
811
830
  });
812
- var PermissionsSchema2 = z21.union([PermissionSchema2.transform((v) => [v]), PermissionSchema2.array()]).describe("Add IAM permissions to your instance.");
813
- var DescriptionSchema2 = z21.string().describe("A description of the instance.");
814
- var ImageSchema = z21.string().optional().describe("The URL of the container image to use.");
831
+ var PermissionsSchema2 = z22.union([PermissionSchema2.transform((v) => [v]), PermissionSchema2.array()]).describe("Add IAM permissions to your instance.");
832
+ var DescriptionSchema2 = z22.string().describe("A description of the instance.");
833
+ var ImageSchema = z22.string().optional().describe("The URL of the container image to use.");
815
834
  var validLogRetentionDays2 = [
816
835
  ...[1, 3, 5, 7, 14, 30, 60, 90, 120, 150],
817
836
  ...[180, 365, 400, 545, 731, 1096, 1827, 2192],
@@ -826,23 +845,23 @@ var LogRetentionSchema2 = DurationSchema.refine(
826
845
  },
827
846
  `Invalid log retention. Valid days are: ${validLogRetentionDays2.map((days5) => `${days5}`).join(", ")}`
828
847
  ).describe("The log retention duration.");
829
- var LogSchema2 = z21.union([
830
- z21.boolean().transform((enabled) => ({ retention: enabled ? days4(7) : days4(0) })),
848
+ var LogSchema2 = z22.union([
849
+ z22.boolean().transform((enabled) => ({ retention: enabled ? days4(7) : days4(0) })),
831
850
  LogRetentionSchema2.transform((retention) => ({ retention })),
832
- z21.object({
851
+ z22.object({
833
852
  retention: LogRetentionSchema2.optional()
834
853
  })
835
854
  ]).describe("Enable logging to a CloudWatch log group. Providing a duration value will set the log retention time.");
836
- var FileCodeSchema2 = z21.object({
855
+ var FileCodeSchema2 = z22.object({
837
856
  file: LocalFileSchema.describe("The file path of the instance code.")
838
857
  });
839
- var CodeSchema2 = z21.union([
858
+ var CodeSchema2 = z22.union([
840
859
  LocalFileSchema.transform((file) => ({
841
860
  file
842
861
  })).pipe(FileCodeSchema2),
843
862
  FileCodeSchema2
844
863
  ]).describe("Specify the code of your instance.");
845
- var ISchema = z21.object({
864
+ var ISchema = z22.object({
846
865
  code: CodeSchema2,
847
866
  description: DescriptionSchema2.optional(),
848
867
  image: ImageSchema.optional(),
@@ -855,14 +874,14 @@ var ISchema = z21.object({
855
874
  healthCheck: HealthCheckSchema.optional()
856
875
  // restartPolicy: RestartPolicySchema.optional(),
857
876
  });
858
- var InstanceSchema = z21.union([
877
+ var InstanceSchema = z22.union([
859
878
  LocalFileSchema.transform((code) => ({
860
879
  code
861
880
  })).pipe(ISchema),
862
881
  ISchema
863
882
  ]);
864
- var InstancesSchema = z21.record(ResourceIdSchema, InstanceSchema).optional().describe("Define the instances in your stack.");
865
- var InstanceDefaultSchema = z21.object({
883
+ var InstancesSchema = z22.record(ResourceIdSchema, InstanceSchema).optional().describe("Define the instances in your stack.");
884
+ var InstanceDefaultSchema = z22.object({
866
885
  image: ImageSchema.optional(),
867
886
  cpu: CpuSchema.default(0.25),
868
887
  memorySize: MemorySizeSchema2.default("512 MB"),
@@ -878,15 +897,15 @@ var InstanceDefaultSchema = z21.object({
878
897
 
879
898
  // src/feature/topic/schema.ts
880
899
  import { kebabCase as kebabCase3 } from "change-case";
881
- import { z as z22 } from "zod";
882
- var TopicNameSchema = z22.string().min(3).max(256).regex(/^[a-z0-9\-]+$/i, "Invalid topic name").transform((value) => kebabCase3(value)).describe("Define event topic name.");
883
- var TopicsDefaultSchema = z22.array(TopicNameSchema).refine((topics) => {
900
+ import { z as z23 } from "zod";
901
+ var TopicNameSchema = z23.string().min(3).max(256).regex(/^[a-z0-9\-]+$/i, "Invalid topic name").transform((value) => kebabCase3(value)).describe("Define event topic name.");
902
+ var TopicsDefaultSchema = z23.array(TopicNameSchema).refine((topics) => {
884
903
  return topics.length === new Set(topics).size;
885
904
  }, "Must be a list of unique topic names").optional().describe("Define the event topics for your app.");
886
- var SubscribersSchema = z22.record(TopicNameSchema, FunctionSchema).optional().describe("Define the event topics to subscribe too in your stack.");
905
+ var SubscribersSchema = z23.record(TopicNameSchema, FunctionSchema).optional().describe("Define the event topics to subscribe too in your stack.");
887
906
 
888
907
  // src/config/schema/region.ts
889
- import { z as z23 } from "zod";
908
+ import { z as z24 } from "zod";
890
909
  var US = ["us-east-2", "us-east-1", "us-west-1", "us-west-2"];
891
910
  var AF = ["af-south-1"];
892
911
  var AP = [
@@ -915,16 +934,16 @@ var EU = [
915
934
  var ME = ["me-south-1", "me-central-1"];
916
935
  var SA = ["sa-east-1"];
917
936
  var regions = [...US, ...AF, ...AP, ...CA, ...EU, ...ME, ...SA];
918
- var RegionSchema = z23.enum(regions);
937
+ var RegionSchema = z24.enum(regions);
919
938
 
920
939
  // src/config/app.ts
921
- var AppSchema = z24.object({
922
- $schema: z24.string().optional(),
940
+ var AppSchema = z25.object({
941
+ $schema: z25.string().optional(),
923
942
  name: ResourceIdSchema.describe("App name."),
924
943
  region: RegionSchema.describe("The AWS region to deploy to."),
925
- profile: z24.string().describe("The AWS profile to deploy to."),
926
- protect: z24.boolean().default(false).describe("Protect your app & stacks from being deleted."),
927
- removal: z24.enum(["remove", "retain"]).default("remove").describe(
944
+ profile: z25.string().describe("The AWS profile to deploy to."),
945
+ protect: z25.boolean().default(false).describe("Protect your app & stacks from being deleted."),
946
+ removal: z25.enum(["remove", "retain"]).default("remove").describe(
928
947
  [
929
948
  "Configure how your resources are handled when they have to be removed.",
930
949
  "",
@@ -938,7 +957,7 @@ var AppSchema = z24.object({
938
957
  // .default('prod')
939
958
  // .describe('The deployment stage.'),
940
959
  // onFailure: OnFailureSchema,
941
- defaults: z24.object({
960
+ defaults: z25.object({
942
961
  onFailure: OnFailureDefaultSchema,
943
962
  onLog: OnLogDefaultSchema,
944
963
  auth: AuthDefaultSchema,
@@ -1215,11 +1234,11 @@ var createStagePatchJsonSchema = (baseSchema, title) => {
1215
1234
  };
1216
1235
 
1217
1236
  // src/config/stack.ts
1218
- import { z as z40 } from "zod";
1237
+ import { z as z41 } from "zod";
1219
1238
 
1220
1239
  // src/feature/cache/schema.ts
1221
1240
  import { gibibytes as gibibytes2 } from "@awsless/size";
1222
- import { z as z25 } from "zod";
1241
+ import { z as z26 } from "zod";
1223
1242
  var StorageSchema = SizeSchema.refine(sizeMin(gibibytes2(1)), "Minimum storage size is 1 GB").refine(
1224
1243
  sizeMax(gibibytes2(5e3)),
1225
1244
  "Maximum storage size is 5000 GB"
@@ -1230,31 +1249,31 @@ var MinimumStorageSchema = StorageSchema.describe(
1230
1249
  var MaximumStorageSchema = StorageSchema.describe(
1231
1250
  "The upper limit for data storage the cache is set to use. You can specify a size value from 1 GB to 5000 GB."
1232
1251
  );
1233
- var EcpuSchema = z25.number().int().min(1e3).max(15e6);
1252
+ var EcpuSchema = z26.number().int().min(1e3).max(15e6);
1234
1253
  var MinimumEcpuSchema = EcpuSchema.describe(
1235
1254
  "The minimum number of ECPUs the cache can consume per second. You can specify a integer from 1,000 to 15,000,000."
1236
1255
  );
1237
1256
  var MaximumEcpuSchema = EcpuSchema.describe(
1238
1257
  "The maximum number of ECPUs the cache can consume per second. You can specify a integer from 1,000 to 15,000,000."
1239
1258
  );
1240
- var CachesSchema = z25.record(
1259
+ var CachesSchema = z26.record(
1241
1260
  ResourceIdSchema,
1242
- z25.object({
1261
+ z26.object({
1243
1262
  minStorage: MinimumStorageSchema.optional(),
1244
1263
  maxStorage: MaximumStorageSchema.optional(),
1245
1264
  minECPU: MinimumEcpuSchema.optional(),
1246
1265
  maxECPU: MaximumEcpuSchema.optional(),
1247
- snapshotRetentionLimit: z25.number().int().positive().default(1)
1266
+ snapshotRetentionLimit: z26.number().int().positive().default(1)
1248
1267
  })
1249
1268
  ).optional().describe("Define the caches in your stack. For access to the cache put your functions inside the global VPC.");
1250
1269
 
1251
1270
  // src/feature/command/schema.ts
1252
- import { z as z26 } from "zod";
1253
- var CommandSchema = z26.union([
1254
- z26.object({
1271
+ import { z as z27 } from "zod";
1272
+ var CommandSchema = z27.union([
1273
+ z27.object({
1255
1274
  file: LocalFileSchema,
1256
- handler: z26.string().default("default").describe("The name of the handler that needs to run"),
1257
- description: z26.string().optional().describe("A description of the command")
1275
+ handler: z27.string().default("default").describe("The name of the handler that needs to run"),
1276
+ description: z27.string().optional().describe("A description of the command")
1258
1277
  // options: z.record(ResourceIdSchema, OptionSchema).optional(),
1259
1278
  // arguments: z.record(ResourceIdSchema, ArgumentSchema).optional(),
1260
1279
  }),
@@ -1264,22 +1283,22 @@ var CommandSchema = z26.union([
1264
1283
  description: void 0
1265
1284
  }))
1266
1285
  ]);
1267
- var CommandsSchema = z26.record(ResourceIdSchema, CommandSchema).optional().describe("Define the custom commands for your stack.");
1286
+ var CommandsSchema = z27.record(ResourceIdSchema, CommandSchema).optional().describe("Define the custom commands for your stack.");
1268
1287
 
1269
1288
  // src/feature/config/schema.ts
1270
- import { z as z27 } from "zod";
1271
- var ConfigNameSchema = z27.string().regex(/[a-z0-9\-]/g, "Invalid config name");
1272
- var ConfigsSchema = z27.array(ConfigNameSchema).optional().describe("Define the config values for your stack.");
1289
+ import { z as z28 } from "zod";
1290
+ var ConfigNameSchema = z28.string().regex(/[a-z0-9\-]/g, "Invalid config name");
1291
+ var ConfigsSchema = z28.array(ConfigNameSchema).optional().describe("Define the config values for your stack.");
1273
1292
 
1274
1293
  // src/feature/cron/schema/index.ts
1275
- import { z as z29 } from "zod";
1294
+ import { z as z30 } from "zod";
1276
1295
 
1277
1296
  // src/feature/cron/schema/schedule.ts
1278
- import { z as z28 } from "zod";
1297
+ import { z as z29 } from "zod";
1279
1298
  import { awsCronExpressionValidator } from "aws-cron-expression-validator";
1280
- var RateExpressionSchema = z28.custom(
1299
+ var RateExpressionSchema = z29.custom(
1281
1300
  (value) => {
1282
- return z28.string().regex(/^[0-9]+ (seconds?|minutes?|hours?|days?)$/).refine((rate) => {
1301
+ return z29.string().regex(/^[0-9]+ (seconds?|minutes?|hours?|days?)$/).refine((rate) => {
1283
1302
  const [str] = rate.split(" ");
1284
1303
  const number = parseInt(str);
1285
1304
  return number > 0;
@@ -1295,9 +1314,9 @@ var RateExpressionSchema = z28.custom(
1295
1314
  }
1296
1315
  return `rate(${rate})`;
1297
1316
  });
1298
- var CronExpressionSchema = z28.custom(
1317
+ var CronExpressionSchema = z29.custom(
1299
1318
  (value) => {
1300
- return z28.string().safeParse(value).success;
1319
+ return z29.string().safeParse(value).success;
1301
1320
  },
1302
1321
  { message: "Invalid cron expression" }
1303
1322
  ).superRefine((value, ctx) => {
@@ -1306,12 +1325,12 @@ var CronExpressionSchema = z28.custom(
1306
1325
  } catch (error) {
1307
1326
  if (error instanceof Error) {
1308
1327
  ctx.addIssue({
1309
- code: z28.ZodIssueCode.custom,
1328
+ code: z29.ZodIssueCode.custom,
1310
1329
  message: `Invalid cron expression: ${error.message}`
1311
1330
  });
1312
1331
  } else {
1313
1332
  ctx.addIssue({
1314
- code: z28.ZodIssueCode.custom,
1333
+ code: z29.ZodIssueCode.custom,
1315
1334
  message: "Invalid cron expression"
1316
1335
  });
1317
1336
  }
@@ -1322,28 +1341,28 @@ var CronExpressionSchema = z28.custom(
1322
1341
  var ScheduleExpressionSchema = RateExpressionSchema.or(CronExpressionSchema);
1323
1342
 
1324
1343
  // src/feature/cron/schema/index.ts
1325
- var CronsSchema = z29.record(
1344
+ var CronsSchema = z30.record(
1326
1345
  ResourceIdSchema,
1327
- z29.object({
1328
- enabled: z29.boolean().default(true).describe("If the cron is enabled."),
1346
+ z30.object({
1347
+ enabled: z30.boolean().default(true).describe("If the cron is enabled."),
1329
1348
  consumer: FunctionSchema.describe("The consuming lambda function properties."),
1330
1349
  schedule: ScheduleExpressionSchema.describe(
1331
1350
  'The scheduling expression.\n\nexample: "0 20 * * ? *"\nexample: "5 minutes"'
1332
1351
  ),
1333
- payload: z29.unknown().optional().describe("The JSON payload that will be passed to the consumer.")
1352
+ payload: z30.unknown().optional().describe("The JSON payload that will be passed to the consumer.")
1334
1353
  })
1335
1354
  ).optional().describe(`Define the cron jobs in your stack.`);
1336
1355
 
1337
1356
  // src/feature/search/schema.ts
1338
1357
  import { gibibytes as gibibytes3 } from "@awsless/size";
1339
- import { z as z30 } from "zod";
1340
- var VersionSchema = z30.union([
1358
+ import { z as z31 } from "zod";
1359
+ var VersionSchema = z31.union([
1341
1360
  //
1342
- z30.enum(["2.13", "2.11", "2.9", "2.7", "2.5", "2.3", "1.3"]),
1343
- z30.string()
1361
+ z31.enum(["2.13", "2.11", "2.9", "2.7", "2.5", "2.3", "1.3"]),
1362
+ z31.string()
1344
1363
  ]).describe("Specify the OpenSearch engine version.");
1345
- var TypeSchema = z30.union([
1346
- z30.enum([
1364
+ var TypeSchema = z31.union([
1365
+ z31.enum([
1347
1366
  "t3.small",
1348
1367
  "t3.medium",
1349
1368
  "m3.medium",
@@ -1417,13 +1436,13 @@ var TypeSchema = z30.union([
1417
1436
  "r6gd.12xlarge",
1418
1437
  "r6gd.16xlarge"
1419
1438
  ]),
1420
- z30.string()
1439
+ z31.string()
1421
1440
  ]).describe("Instance type of data nodes in the cluster.");
1422
- var CountSchema = z30.number().int().min(1).describe("Number of instances in the cluster.");
1441
+ var CountSchema = z31.number().int().min(1).describe("Number of instances in the cluster.");
1423
1442
  var StorageSizeSchema = SizeSchema.refine(sizeMin(gibibytes3(10)), "Minimum storage size is 10 GB").refine(sizeMax(gibibytes3(100)), "Maximum storage size is 100 GB").describe("The size of the function's /tmp directory. You can specify a size value from 512 MB to 10 GiB.");
1424
- var SearchsSchema = z30.record(
1443
+ var SearchsSchema = z31.record(
1425
1444
  ResourceIdSchema,
1426
- z30.object({
1445
+ z31.object({
1427
1446
  type: TypeSchema.default("t3.small"),
1428
1447
  count: CountSchema.default(1),
1429
1448
  version: VersionSchema.default("2.13"),
@@ -1434,12 +1453,12 @@ var SearchsSchema = z30.record(
1434
1453
  ).optional().describe("Define the search instances in your stack. Backed by OpenSearch.");
1435
1454
 
1436
1455
  // src/feature/site/schema.ts
1437
- import { z as z32 } from "zod";
1456
+ import { z as z33 } from "zod";
1438
1457
 
1439
1458
  // src/config/schema/local-entry.ts
1440
1459
  import { stat as stat3 } from "fs/promises";
1441
- import { z as z31 } from "zod";
1442
- var LocalEntrySchema = z31.union([
1460
+ import { z as z32 } from "zod";
1461
+ var LocalEntrySchema = z32.union([
1443
1462
  RelativePathSchema.refine(async (path) => {
1444
1463
  try {
1445
1464
  const s = await stat3(path);
@@ -1448,7 +1467,7 @@ var LocalEntrySchema = z31.union([
1448
1467
  return false;
1449
1468
  }
1450
1469
  }, `File or directory doesn't exist`),
1451
- z31.object({
1470
+ z32.object({
1452
1471
  nocheck: RelativePathSchema.describe(
1453
1472
  "Specifies a local file or directory without checking if the file or directory exists."
1454
1473
  )
@@ -1456,21 +1475,21 @@ var LocalEntrySchema = z31.union([
1456
1475
  ]);
1457
1476
 
1458
1477
  // src/feature/site/schema.ts
1459
- var SitesSchema = z32.record(
1478
+ var SitesSchema = z33.record(
1460
1479
  ResourceIdSchema,
1461
- z32.object({
1480
+ z33.object({
1462
1481
  router: ResourceIdSchema.describe("The router id to link your site with."),
1463
1482
  path: RouteSchema2.describe("The path inside the router to link your site to."),
1464
- build: z32.object({
1465
- command: z32.string().describe(
1483
+ build: z33.object({
1484
+ command: z33.string().describe(
1466
1485
  `Specifies the files and directories to generate the cache key for your custom build command.`
1467
1486
  ),
1468
- cacheKey: z32.union([LocalEntrySchema.transform((v) => [v]), LocalEntrySchema.array()]).describe(
1487
+ cacheKey: z33.union([LocalEntrySchema.transform((v) => [v]), LocalEntrySchema.array()]).describe(
1469
1488
  `Specifies the files and directories to generate the cache key for your custom build command.`
1470
1489
  ),
1471
- configs: z32.string().array().optional().describe("Define the config values for your build command.")
1490
+ configs: z33.string().array().optional().describe("Define the config values for your build command.")
1472
1491
  }).optional().describe(`Specifies the build process for sites that need a build step.`),
1473
- static: z32.union([LocalDirectorySchema, z32.boolean()]).optional().describe(
1492
+ static: z33.union([LocalDirectorySchema, z33.boolean()]).optional().describe(
1474
1493
  "Specifies the path to the static files directory. Additionally you can also pass `true` when you don't have local static files, but still want to make an S3 bucket."
1475
1494
  ),
1476
1495
  ssr: FunctionSchema.optional().describe("Specifies the file that will render the site on the server.")
@@ -1478,21 +1497,21 @@ var SitesSchema = z32.record(
1478
1497
  ).optional().describe("Define the sites in your stack.");
1479
1498
 
1480
1499
  // src/feature/store/schema.ts
1481
- import { z as z33 } from "zod";
1482
- var StoresSchema = z33.union([
1483
- z33.array(ResourceIdSchema).transform((list) => {
1500
+ import { z as z34 } from "zod";
1501
+ var StoresSchema = z34.union([
1502
+ z34.array(ResourceIdSchema).transform((list) => {
1484
1503
  const stores = {};
1485
1504
  for (const key of list) {
1486
1505
  stores[key] = {};
1487
1506
  }
1488
1507
  return stores;
1489
1508
  }),
1490
- z33.record(
1509
+ z34.record(
1491
1510
  ResourceIdSchema,
1492
- z33.object({
1511
+ z34.object({
1493
1512
  static: LocalDirectorySchema.optional().describe("Specifies the path to the static files directory."),
1494
- versioning: z33.boolean().default(false).describe("Enable versioning of your store."),
1495
- events: z33.object({
1513
+ versioning: z34.boolean().default(false).describe("Enable versioning of your store."),
1514
+ events: z34.object({
1496
1515
  // create
1497
1516
  "created:*": FunctionSchema.optional().describe(
1498
1517
  "Subscribe to notifications regardless of the API that was used to create an object."
@@ -1525,30 +1544,30 @@ var StoresSchema = z33.union([
1525
1544
  ]).optional().describe("Define the stores in your stack.");
1526
1545
 
1527
1546
  // src/feature/icon/schema.ts
1528
- import { z as z34 } from "zod";
1547
+ import { z as z35 } from "zod";
1529
1548
  var staticOriginSchema = LocalDirectorySchema.describe(
1530
1549
  "Specifies the path to a local image directory that will be uploaded in S3."
1531
1550
  );
1532
1551
  var functionOriginSchema = FunctionSchema.describe(
1533
1552
  "Specifies the file that will be called when an image isn't found in the (cache) bucket."
1534
1553
  );
1535
- var IconsSchema = z34.record(
1554
+ var IconsSchema = z35.record(
1536
1555
  ResourceIdSchema,
1537
- z34.object({
1556
+ z35.object({
1538
1557
  // domain: ResourceIdSchema.describe('The domain id to link your site with.').optional(),
1539
1558
  // subDomain: z.string().optional(),
1540
1559
  router: ResourceIdSchema.describe("The router id to link your icon proxy."),
1541
1560
  path: RouteSchema2.describe("The path inside the router to link your icon proxy to."),
1542
1561
  log: LogSchema.optional(),
1543
1562
  cacheDuration: DurationSchema.optional().describe("The cache duration of the cached icons."),
1544
- preserveIds: z34.boolean().optional().default(false).describe("Preserve the IDs of the icons."),
1545
- symbols: z34.boolean().optional().default(false).describe(`Convert the SVG's to SVG symbols.`),
1546
- origin: z34.union([
1547
- z34.object({
1563
+ preserveIds: z35.boolean().optional().default(false).describe("Preserve the IDs of the icons."),
1564
+ symbols: z35.boolean().optional().default(false).describe(`Convert the SVG's to SVG symbols.`),
1565
+ origin: z35.union([
1566
+ z35.object({
1548
1567
  static: staticOriginSchema,
1549
1568
  function: functionOriginSchema.optional()
1550
1569
  }),
1551
- z34.object({
1570
+ z35.object({
1552
1571
  static: staticOriginSchema.optional(),
1553
1572
  function: functionOriginSchema
1554
1573
  })
@@ -1575,13 +1594,13 @@ var IconsSchema = z34.record(
1575
1594
  ).optional().describe("Define an svg icon proxy in your stack. Store, optimize, and deliver svg icons at scale.");
1576
1595
 
1577
1596
  // src/feature/image/schema.ts
1578
- import { z as z35 } from "zod";
1579
- var transformationOptionsSchema = z35.object({
1580
- width: z35.number().int().positive().optional(),
1581
- height: z35.number().int().positive().optional(),
1582
- fit: z35.enum(["cover", "contain", "fill", "inside", "outside"]).optional(),
1583
- position: z35.enum(["top", "right top", "right", "right bottom", "bottom", "left bottom", "left", "left top", "center"]).optional(),
1584
- quality: z35.number().int().min(1).max(100).optional()
1597
+ import { z as z36 } from "zod";
1598
+ var transformationOptionsSchema = z36.object({
1599
+ width: z36.number().int().positive().optional(),
1600
+ height: z36.number().int().positive().optional(),
1601
+ fit: z36.enum(["cover", "contain", "fill", "inside", "outside"]).optional(),
1602
+ position: z36.enum(["top", "right top", "right", "right bottom", "bottom", "left bottom", "left", "left top", "center"]).optional(),
1603
+ quality: z36.number().int().min(1).max(100).optional()
1585
1604
  });
1586
1605
  var staticOriginSchema2 = LocalDirectorySchema.describe(
1587
1606
  "Specifies the path to a local image directory that will be uploaded in S3."
@@ -1589,38 +1608,38 @@ var staticOriginSchema2 = LocalDirectorySchema.describe(
1589
1608
  var functionOriginSchema2 = FunctionSchema.describe(
1590
1609
  "Specifies the file that will be called when an image isn't found in the (cache) bucket."
1591
1610
  );
1592
- var ImagesSchema = z35.record(
1611
+ var ImagesSchema = z36.record(
1593
1612
  ResourceIdSchema,
1594
- z35.object({
1613
+ z36.object({
1595
1614
  // domain: ResourceIdSchema.describe('The domain id to link your site with.').optional(),
1596
1615
  // subDomain: z.string().optional(),
1597
1616
  router: ResourceIdSchema.describe("The router id to link your image proxy."),
1598
1617
  path: RouteSchema2.describe("The path inside the router to link your image proxy to."),
1599
1618
  log: LogSchema.optional(),
1600
1619
  cacheDuration: DurationSchema.optional().describe("Cache duration of the cached images."),
1601
- presets: z35.record(z35.string(), transformationOptionsSchema).describe("Named presets for image transformations"),
1602
- extensions: z35.object({
1603
- jpg: z35.object({
1604
- mozjpeg: z35.boolean().optional(),
1605
- progressive: z35.boolean().optional()
1620
+ presets: z36.record(z36.string(), transformationOptionsSchema).describe("Named presets for image transformations"),
1621
+ extensions: z36.object({
1622
+ jpg: z36.object({
1623
+ mozjpeg: z36.boolean().optional(),
1624
+ progressive: z36.boolean().optional()
1606
1625
  }).optional(),
1607
- webp: z35.object({
1608
- effort: z35.number().int().min(1).max(10).default(7).optional(),
1609
- lossless: z35.boolean().optional(),
1610
- nearLossless: z35.boolean().optional()
1626
+ webp: z36.object({
1627
+ effort: z36.number().int().min(1).max(10).default(7).optional(),
1628
+ lossless: z36.boolean().optional(),
1629
+ nearLossless: z36.boolean().optional()
1611
1630
  }).optional(),
1612
- png: z35.object({
1613
- compressionLevel: z35.number().int().min(0).max(9).default(6).optional()
1631
+ png: z36.object({
1632
+ compressionLevel: z36.number().int().min(0).max(9).default(6).optional()
1614
1633
  }).optional()
1615
1634
  }).refine((data) => {
1616
1635
  return Object.keys(data).length > 0;
1617
1636
  }, "At least one extension must be defined.").describe("Specify the allowed extensions."),
1618
- origin: z35.union([
1619
- z35.object({
1637
+ origin: z36.union([
1638
+ z36.object({
1620
1639
  static: staticOriginSchema2,
1621
1640
  function: functionOriginSchema2.optional()
1622
1641
  }),
1623
- z35.object({
1642
+ z36.object({
1624
1643
  static: staticOriginSchema2.optional(),
1625
1644
  function: functionOriginSchema2
1626
1645
  })
@@ -1635,7 +1654,7 @@ var ImagesSchema = z35.record(
1635
1654
  ).optional().describe("Define an image proxy in your stack. Store, transform, optimize, and deliver images at scale.");
1636
1655
 
1637
1656
  // src/feature/metric/schema.ts
1638
- import { z as z36 } from "zod";
1657
+ import { z as z37 } from "zod";
1639
1658
  var ops = {
1640
1659
  ">": "GreaterThanThreshold",
1641
1660
  ">=": "GreaterThanOrEqualToThreshold",
@@ -1649,15 +1668,15 @@ var stats = {
1649
1668
  min: "Minimum",
1650
1669
  max: "Maximum"
1651
1670
  };
1652
- var WhereSchema = z36.union([
1653
- z36.string().regex(/(count|avg|sum|min|max) (>|>=|<|<=) (\d)/, "Invalid where query").transform((where) => {
1671
+ var WhereSchema = z37.union([
1672
+ z37.string().regex(/(count|avg|sum|min|max) (>|>=|<|<=) (\d)/, "Invalid where query").transform((where) => {
1654
1673
  const [stat4, op, value] = where.split(" ");
1655
1674
  return { stat: stat4, op, value: parseFloat(value) };
1656
1675
  }),
1657
- z36.object({
1658
- stat: z36.enum(["count", "avg", "sum", "min", "max"]),
1659
- op: z36.enum([">", ">=", "<", "<="]),
1660
- value: z36.number()
1676
+ z37.object({
1677
+ stat: z37.enum(["count", "avg", "sum", "min", "max"]),
1678
+ op: z37.enum([">", ">=", "<", "<="]),
1679
+ value: z37.number()
1661
1680
  })
1662
1681
  ]).transform((where) => {
1663
1682
  return {
@@ -1666,39 +1685,39 @@ var WhereSchema = z36.union([
1666
1685
  value: where.value
1667
1686
  };
1668
1687
  });
1669
- var AlarmSchema = z36.object({
1670
- description: z36.string().optional(),
1688
+ var AlarmSchema = z37.object({
1689
+ description: z37.string().optional(),
1671
1690
  where: WhereSchema,
1672
1691
  period: DurationSchema,
1673
- minDataPoints: z36.number().int().default(1),
1674
- trigger: z36.union([EmailSchema.transform((v) => [v]), EmailSchema.array(), FunctionSchema])
1692
+ minDataPoints: z37.number().int().default(1),
1693
+ trigger: z37.union([EmailSchema.transform((v) => [v]), EmailSchema.array(), FunctionSchema])
1675
1694
  });
1676
- var MetricsSchema = z36.record(
1695
+ var MetricsSchema = z37.record(
1677
1696
  ResourceIdSchema,
1678
- z36.object({
1679
- type: z36.enum(["number", "size", "duration"]),
1697
+ z37.object({
1698
+ type: z37.enum(["number", "size", "duration"]),
1680
1699
  alarms: AlarmSchema.array().optional()
1681
1700
  })
1682
1701
  ).optional().describe("Define the metrics in your stack.");
1683
1702
 
1684
1703
  // src/feature/table/schema.ts
1685
1704
  import { minutes as minutes5, seconds as seconds4 } from "@awsless/duration";
1686
- import { z as z37 } from "zod";
1687
- var KeySchema = z37.string().min(1).max(255);
1688
- var TablesSchema = z37.record(
1705
+ import { z as z38 } from "zod";
1706
+ var KeySchema = z38.string().min(1).max(255);
1707
+ var TablesSchema = z38.record(
1689
1708
  ResourceIdSchema,
1690
- z37.object({
1709
+ z38.object({
1691
1710
  hash: KeySchema.describe(
1692
1711
  "Specifies the name of the partition / hash key that makes up the primary key for the table."
1693
1712
  ),
1694
1713
  sort: KeySchema.optional().describe(
1695
1714
  "Specifies the name of the range / sort key that makes up the primary key for the table."
1696
1715
  ),
1697
- fields: z37.record(z37.string(), z37.enum(["string", "number", "binary"])).optional().describe(
1716
+ fields: z38.record(z38.string(), z38.enum(["string", "number", "binary"])).optional().describe(
1698
1717
  'A list of attributes that describe the key schema for the table and indexes. If no attribute field is defined we default to "string".'
1699
1718
  ),
1700
- class: z37.enum(["standard", "standard-infrequent-access"]).default("standard").describe("The table class of the table."),
1701
- pointInTimeRecovery: z37.boolean().default(false).describe("Indicates whether point in time recovery is enabled on the table."),
1719
+ class: z38.enum(["standard", "standard-infrequent-access"]).default("standard").describe("The table class of the table."),
1720
+ pointInTimeRecovery: z38.boolean().default(false).describe("Indicates whether point in time recovery is enabled on the table."),
1702
1721
  ttl: KeySchema.optional().describe(
1703
1722
  [
1704
1723
  "The name of the TTL attribute used to store the expiration time for items in the table.",
@@ -1706,8 +1725,8 @@ var TablesSchema = z37.record(
1706
1725
  ].join("\n")
1707
1726
  ),
1708
1727
  // deletionProtection: DeletionProtectionSchema.optional(),
1709
- stream: z37.object({
1710
- type: z37.enum(["keys-only", "new-image", "old-image", "new-and-old-images"]).describe(
1728
+ stream: z38.object({
1729
+ type: z38.enum(["keys-only", "new-image", "old-image", "new-and-old-images"]).describe(
1711
1730
  [
1712
1731
  "When an item in the table is modified, you can determines what information is written to the stream for this table.",
1713
1732
  "Valid values are:",
@@ -1717,7 +1736,7 @@ var TablesSchema = z37.record(
1717
1736
  "- new-and-old-images - Both the new and the old item images of the item are written to the stream."
1718
1737
  ].join("\n")
1719
1738
  ),
1720
- batchSize: z37.number().min(1).max(1e4).default(1).describe(
1739
+ batchSize: z38.number().min(1).max(1e4).default(1).describe(
1721
1740
  [
1722
1741
  "The maximum number of records in each batch that Lambda pulls from your stream and sends to your function.",
1723
1742
  "Lambda passes all of the records in the batch to the function in a single call, up to the payload limit for synchronous invocation (6 MB).",
@@ -1733,29 +1752,26 @@ var TablesSchema = z37.record(
1733
1752
  "You can specify a duration from 1 seconds to 5 minutes."
1734
1753
  ].join("\n")
1735
1754
  ),
1736
- // maxRecordAge: DurationSchema.refine(
1737
- // durationMin(seconds(1)),
1738
- // 'Minimum record age duration is 1 second'
1739
- // )
1740
- // .refine(durationMax(minutes(5)), 'Maximum batch window duration is 5 minutes')
1741
- // .optional()
1742
- // .describe(
1743
- // [
1744
- // 'Discard records after the specified number of retries.',
1745
- // 'The default value is -1, which sets the maximum number of retries to infinite.',
1746
- // 'When maxRetryAttempts is infinite, Lambda retries failed records until the record expires in the event source.',
1747
- // 'You can specify a number from -1 to 10000.',
1748
- // ].join('\n')
1749
- // ),
1750
- retryAttempts: z37.number().min(-1).max(1e4).default(-1).describe(
1755
+ maxRecordAge: DurationSchema.refine(
1756
+ durationMin(seconds4(1)),
1757
+ "Minimum record age duration is 1 second"
1758
+ ).refine(durationMax(minutes5(1)), "Maximum record age duration is 1 minute").default("60 seconds").describe(
1759
+ [
1760
+ "Discard records older than the specified age.",
1761
+ "The maximum valid value for maximum record age is 60s.",
1762
+ "The default value is 60s"
1763
+ ].join("\n")
1764
+ ),
1765
+ retryAttempts: z38.number().min(-1).max(1e4).default(2).describe(
1751
1766
  [
1752
1767
  "Discard records after the specified number of retries.",
1753
- "The default value is -1, which sets the maximum number of retries to infinite.",
1768
+ "-1 will sets the maximum number of retries to infinite.",
1754
1769
  "When maxRetryAttempts is infinite, Lambda retries failed records until the record expires in the event source.",
1755
- "You can specify a number from -1 to 10000."
1770
+ "You can specify a number from -1 to 10000.",
1771
+ "The default value is 2"
1756
1772
  ].join("\n")
1757
1773
  ),
1758
- concurrencyPerShard: z37.number().min(1).max(10).default(1).describe(
1774
+ concurrencyPerShard: z38.number().min(1).max(10).default(1).describe(
1759
1775
  [
1760
1776
  "The number of batches to process concurrently from each shard.",
1761
1777
  "You can specify a number from 1 to 10."
@@ -1765,16 +1781,16 @@ var TablesSchema = z37.record(
1765
1781
  }).optional().describe(
1766
1782
  "The settings for the DynamoDB table stream, which capture changes to items stored in the table."
1767
1783
  ),
1768
- indexes: z37.record(
1769
- z37.string(),
1770
- z37.object({
1771
- hash: z37.union([KeySchema.transform((v) => [v]), KeySchema.array()]).describe(
1784
+ indexes: z38.record(
1785
+ z38.string(),
1786
+ z38.object({
1787
+ hash: z38.union([KeySchema.transform((v) => [v]), KeySchema.array()]).describe(
1772
1788
  "Specifies the name of the partition / hash key that makes up the primary key for the global secondary index."
1773
1789
  ),
1774
- sort: z37.union([KeySchema.transform((v) => [v]), KeySchema.array()]).optional().describe(
1790
+ sort: z38.union([KeySchema.transform((v) => [v]), KeySchema.array()]).optional().describe(
1775
1791
  "Specifies the name of the range / sort key that makes up the primary key for the global secondary index."
1776
1792
  ),
1777
- projection: z37.enum(["all", "keys-only"]).default("all").describe(
1793
+ projection: z38.enum(["all", "keys-only"]).default("all").describe(
1778
1794
  [
1779
1795
  "The set of attributes that are projected into the index:",
1780
1796
  "- all - All of the table attributes are projected into the index.",
@@ -1788,11 +1804,11 @@ var TablesSchema = z37.record(
1788
1804
  ).optional().describe("Define the tables in your stack.");
1789
1805
 
1790
1806
  // src/feature/task/schema.ts
1791
- import { z as z38 } from "zod";
1792
- var RetryAttemptsSchema2 = z38.number().int().min(0).max(2).describe(
1807
+ import { z as z39 } from "zod";
1808
+ var RetryAttemptsSchema3 = z39.number().int().min(0).max(2).describe(
1793
1809
  "The maximum number of times to retry when the function returns an error. You can specify a number from 0 to 2."
1794
1810
  );
1795
- var TaskSchema = z38.union([
1811
+ var TaskSchema = z39.union([
1796
1812
  LocalFileSchema.transform((file) => ({
1797
1813
  consumer: {
1798
1814
  code: {
@@ -1803,20 +1819,20 @@ var TaskSchema = z38.union([
1803
1819
  },
1804
1820
  retryAttempts: void 0
1805
1821
  })),
1806
- z38.object({
1822
+ z39.object({
1807
1823
  consumer: FunctionSchema,
1808
- retryAttempts: RetryAttemptsSchema2.optional()
1824
+ retryAttempts: RetryAttemptsSchema3.optional()
1809
1825
  })
1810
1826
  ]);
1811
- var TasksSchema = z38.record(ResourceIdSchema, TaskSchema).optional().describe("Define the tasks in your stack.");
1827
+ var TasksSchema = z39.record(ResourceIdSchema, TaskSchema).optional().describe("Define the tasks in your stack.");
1812
1828
 
1813
1829
  // src/feature/test/schema.ts
1814
- import { z as z39 } from "zod";
1815
- var TestsSchema = z39.union([
1830
+ import { z as z40 } from "zod";
1831
+ var TestsSchema = z40.union([
1816
1832
  //
1817
1833
  LocalDirectorySchema.transform((v) => [v]),
1818
1834
  LocalDirectorySchema.array(),
1819
- z39.literal(false)
1835
+ z40.literal(false)
1820
1836
  ]).describe("Define the location of your tests for your stack.").optional();
1821
1837
 
1822
1838
  // src/config/stack.ts
@@ -1824,8 +1840,8 @@ var DependsSchema = ResourceIdSchema.array().optional().describe("Define the sta
1824
1840
  var NameSchema = ResourceIdSchema.refine((name) => !["base", "hostedzones"].includes(name), {
1825
1841
  message: `Stack name can't be a reserved name.`
1826
1842
  }).describe("Stack name.");
1827
- var StackSchema = z40.object({
1828
- $schema: z40.string().optional(),
1843
+ var StackSchema = z41.object({
1844
+ $schema: z41.string().optional(),
1829
1845
  name: NameSchema,
1830
1846
  depends: DependsSchema,
1831
1847
  commands: CommandsSchema,