@awsless/awsless 0.0.439 → 0.0.441

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/bin.js CHANGED
@@ -7566,7 +7566,7 @@ var debug = (...parts) => {
7566
7566
  };
7567
7567
 
7568
7568
  // src/config/app.ts
7569
- import { z as z25 } from "zod";
7569
+ import { z as z24 } from "zod";
7570
7570
 
7571
7571
  // src/feature/alert/schema.ts
7572
7572
  import { paramCase } from "change-case";
@@ -7588,7 +7588,7 @@ var AlertsDefaultSchema = z2.record(
7588
7588
  ).optional().describe("Define the alerts in your app. Alerts are a way to send messages to one or more email addresses.");
7589
7589
 
7590
7590
  // src/feature/auth/schema.ts
7591
- import { z as z9 } from "zod";
7591
+ import { z as z8 } from "zod";
7592
7592
 
7593
7593
  // src/config/schema/resource-id.ts
7594
7594
  import { paramCase as paramCase2 } from "change-case";
@@ -7598,7 +7598,7 @@ var ResourceIdSchema = z3.string().min(3).max(24).regex(/^[a-z0-9\-]+$/i, "Inval
7598
7598
  // src/feature/function/schema.ts
7599
7599
  import { days, minutes as minutes2, seconds, toDays } from "@awsless/duration";
7600
7600
  import { gibibytes, mebibytes } from "@awsless/size";
7601
- import { z as z8 } from "zod";
7601
+ import { z as z7 } from "zod";
7602
7602
 
7603
7603
  // src/config/schema/duration.ts
7604
7604
  import { z as z4 } from "zod";
@@ -7616,11 +7616,9 @@ var durationMax = (max) => {
7616
7616
  };
7617
7617
 
7618
7618
  // src/config/schema/local-directory.ts
7619
- import { stat as stat2 } from "fs/promises";
7620
- import { z as z6 } from "zod";
7621
-
7622
- // src/config/schema/local-file.ts
7623
7619
  import { stat } from "fs/promises";
7620
+
7621
+ // src/config/schema/relative-path.ts
7624
7622
  import { join as join3 } from "path";
7625
7623
  import { z as z5 } from "zod";
7626
7624
  var basePath;
@@ -7631,31 +7629,35 @@ var resolvePath = (path) => {
7631
7629
  if (path.startsWith(".") && basePath) {
7632
7630
  return join3(basePath, path);
7633
7631
  }
7634
- return join3(directories.root, path);
7632
+ return path;
7635
7633
  };
7636
- var LocalFileSchema = z5.string().transform((path) => resolvePath(path)).refine(async (path) => {
7634
+ var RelativePathSchema = z5.string().transform((path) => resolvePath(path));
7635
+
7636
+ // src/config/schema/local-directory.ts
7637
+ var LocalDirectorySchema = RelativePathSchema.refine(async (path) => {
7637
7638
  try {
7638
7639
  const s = await stat(path);
7639
- return s.isFile();
7640
+ return s.isDirectory();
7640
7641
  } catch (error) {
7641
7642
  return false;
7642
7643
  }
7643
- }, `File doesn't exist`);
7644
+ }, `Directory doesn't exist`);
7644
7645
 
7645
- // src/config/schema/local-directory.ts
7646
- var LocalDirectorySchema = z6.string().transform((path) => resolvePath(path)).refine(async (path) => {
7646
+ // src/config/schema/local-file.ts
7647
+ import { stat as stat2 } from "fs/promises";
7648
+ var LocalFileSchema = RelativePathSchema.refine(async (path) => {
7647
7649
  try {
7648
7650
  const s = await stat2(path);
7649
- return s.isDirectory();
7651
+ return s.isFile();
7650
7652
  } catch (error) {
7651
7653
  return false;
7652
7654
  }
7653
- }, `Directory doesn't exist`);
7655
+ }, `File doesn't exist`);
7654
7656
 
7655
7657
  // src/config/schema/size.ts
7656
- import { z as z7 } from "zod";
7658
+ import { z as z6 } from "zod";
7657
7659
  import { parse as parse2 } from "@awsless/size";
7658
- var SizeSchema = z7.string().regex(/^[0-9]+ (B|KB|MB|GB|TB|PB)$/, "Invalid size").transform((v) => parse2(v));
7660
+ var SizeSchema = z6.string().regex(/^[0-9]+ (B|KB|MB|GB|TB|PB)$/, "Invalid size").transform((v) => parse2(v));
7659
7661
  var sizeMin = (min) => {
7660
7662
  return (size) => {
7661
7663
  return size.value >= min.value;
@@ -7678,32 +7680,32 @@ var EphemeralStorageSizeSchema = SizeSchema.refine(
7678
7680
  sizeMin(mebibytes(512)),
7679
7681
  "Minimum ephemeral storage size is 512 MB"
7680
7682
  ).refine(sizeMax(gibibytes(10)), "Minimum ephemeral storage size is 10 GB").describe("The size of the function's /tmp directory. You can specify a size value from 512 MB to 10 GB.");
7681
- var ReservedConcurrentExecutionsSchema = z8.number().int().min(0).describe("The number of simultaneous executions to reserve for the function. You can specify a number from 0.");
7682
- var EnvironmentSchema = z8.record(z8.string(), z8.string()).optional().describe("Environment variable key-value pairs.");
7683
- var ArchitectureSchema = z8.enum(["x86_64", "arm64"]).describe("The instruction set architecture that the function supports.");
7684
- var RetryAttemptsSchema = z8.number().int().min(0).max(2).describe(
7683
+ var ReservedConcurrentExecutionsSchema = z7.number().int().min(0).describe("The number of simultaneous executions to reserve for the function. You can specify a number from 0.");
7684
+ var EnvironmentSchema = z7.record(z7.string(), z7.string()).optional().describe("Environment variable key-value pairs.");
7685
+ var ArchitectureSchema = z7.enum(["x86_64", "arm64"]).describe("The instruction set architecture that the function supports.");
7686
+ var RetryAttemptsSchema = z7.number().int().min(0).max(2).describe(
7685
7687
  "The maximum number of times to retry when the function returns an error. You can specify a number from 0 to 2."
7686
7688
  );
7687
- var NodeRuntimeSchema = z8.enum(["nodejs18.x", "nodejs20.x", "nodejs22.x"]);
7688
- var ContainerRuntimeSchema = z8.literal("container");
7689
+ var NodeRuntimeSchema = z7.enum(["nodejs18.x", "nodejs20.x", "nodejs22.x"]);
7690
+ var ContainerRuntimeSchema = z7.literal("container");
7689
7691
  var RuntimeSchema = NodeRuntimeSchema.or(ContainerRuntimeSchema).describe("The identifier of the function's runtime.");
7690
- var ActionSchema = z8.string();
7691
- var ActionsSchema = z8.union([ActionSchema.transform((v) => [v]), ActionSchema.array()]);
7692
- var ArnSchema = z8.string().startsWith("arn:").transform((v) => v);
7693
- var WildcardSchema = z8.literal("*");
7694
- var ResourceSchema = z8.union([ArnSchema, WildcardSchema]);
7695
- var ResourcesSchema = z8.union([ResourceSchema.transform((v) => [v]), ResourceSchema.array()]);
7696
- var PermissionSchema = z8.object({
7697
- effect: z8.enum(["allow", "deny"]).default("allow"),
7692
+ var ActionSchema = z7.string();
7693
+ var ActionsSchema = z7.union([ActionSchema.transform((v) => [v]), ActionSchema.array()]);
7694
+ var ArnSchema = z7.string().startsWith("arn:").transform((v) => v);
7695
+ var WildcardSchema = z7.literal("*");
7696
+ var ResourceSchema = z7.union([ArnSchema, WildcardSchema]);
7697
+ var ResourcesSchema = z7.union([ResourceSchema.transform((v) => [v]), ResourceSchema.array()]);
7698
+ var PermissionSchema = z7.object({
7699
+ effect: z7.enum(["allow", "deny"]).default("allow"),
7698
7700
  actions: ActionsSchema,
7699
7701
  resources: ResourcesSchema
7700
7702
  });
7701
- var PermissionsSchema = z8.union([PermissionSchema.transform((v) => [v]), PermissionSchema.array()]).describe("Add IAM permissions to your function.");
7702
- var WarmSchema = z8.number().int().min(0).max(10).describe("Specify how many functions you want to warm up each 5 minutes. You can specify a number from 0 to 10.");
7703
- var VPCSchema = z8.boolean().describe("Put the function inside your global VPC.");
7704
- var MinifySchema = z8.boolean().describe("Minify the function code.");
7705
- var HandlerSchema = z8.string().describe("The name of the exported method within your code that Lambda calls to run your function.");
7706
- var DescriptionSchema = z8.string().describe("A description of the function.");
7703
+ var PermissionsSchema = z7.union([PermissionSchema.transform((v) => [v]), PermissionSchema.array()]).describe("Add IAM permissions to your function.");
7704
+ var WarmSchema = z7.number().int().min(0).max(10).describe("Specify how many functions you want to warm up each 5 minutes. You can specify a number from 0 to 10.");
7705
+ var VPCSchema = z7.boolean().describe("Put the function inside your global VPC.");
7706
+ var MinifySchema = z7.boolean().describe("Minify the function code.");
7707
+ var HandlerSchema = z7.string().describe("The name of the exported method within your code that Lambda calls to run your function.");
7708
+ var DescriptionSchema = z7.string().describe("A description of the function.");
7707
7709
  var validLogRetentionDays = [
7708
7710
  ...[1n, 3n, 5n, 7n, 14n, 30n, 60n, 90n, 120n, 150n],
7709
7711
  ...[180n, 365n, 400n, 545n, 731n, 1096n, 1827n, 2192n],
@@ -7718,56 +7720,54 @@ var LogRetentionSchema = DurationSchema.refine(
7718
7720
  },
7719
7721
  `Invalid log retention. Valid days are: ${validLogRetentionDays.map((days7) => `${days7}`).join(", ")}`
7720
7722
  ).describe("The log retention duration.");
7721
- var LogSubscriptionSchema = z8.union([
7723
+ var LogSubscriptionSchema = z7.union([
7722
7724
  LocalFileSchema.transform((file) => ({
7723
7725
  file
7724
7726
  })),
7725
- z8.object({
7727
+ z7.object({
7726
7728
  subscriber: LocalFileSchema,
7727
- filter: z8.string().optional()
7729
+ filter: z7.string().optional()
7728
7730
  })
7729
7731
  ]).describe(
7730
7732
  "Log Subscription allow you to subscribe to a real-time stream of log events and have them delivered to a specific destination"
7731
7733
  );
7732
- var LogSchema = z8.union([
7733
- z8.boolean().transform((enabled) => ({ retention: enabled ? days(7) : days(0) })),
7734
+ var LogSchema = z7.union([
7735
+ z7.boolean().transform((enabled) => ({ retention: enabled ? days(7) : days(0) })),
7734
7736
  LogRetentionSchema.transform((retention) => ({ retention })),
7735
- z8.object({
7737
+ z7.object({
7736
7738
  subscription: LogSubscriptionSchema.optional(),
7737
7739
  retention: LogRetentionSchema.optional(),
7738
- format: z8.enum(["text", "json"]).describe(
7740
+ format: z7.enum(["text", "json"]).describe(
7739
7741
  `The format in which Lambda sends your function's application and system logs to CloudWatch. Select between plain text and structured JSON.`
7740
7742
  ).optional(),
7741
- system: z8.enum(["debug", "info", "warn"]).describe(
7743
+ system: z7.enum(["debug", "info", "warn"]).describe(
7742
7744
  "Set this property to filter the system logs for your function that Lambda sends to CloudWatch. Lambda only sends system logs at the selected level of detail and lower, where DEBUG is the highest level and WARN is the lowest."
7743
7745
  ).optional(),
7744
- level: z8.enum(["trace", "debug", "info", "warn", "error", "fatal"]).describe(
7746
+ level: z7.enum(["trace", "debug", "info", "warn", "error", "fatal"]).describe(
7745
7747
  "Set this property to filter the application logs for your function that Lambda sends to CloudWatch. Lambda only sends application logs at the selected level of detail and lower, where TRACE is the highest level and FATAL is the lowest."
7746
7748
  ).optional()
7747
7749
  })
7748
7750
  ]).describe("Enable logging to a CloudWatch log group. Providing a duration value will set the log retention time.");
7749
- var LayersSchema = z8.string().array().describe(
7751
+ var LayersSchema = z7.string().array().describe(
7750
7752
  // `A list of function layers to add to the function's execution environment..`
7751
7753
  `A list of function layers to add to the function's execution environment. Specify each layer by its ARN, including the version.`
7752
7754
  );
7753
- var FileCodeSchema = z8.object({
7755
+ var FileCodeSchema = z7.object({
7754
7756
  file: LocalFileSchema.describe("The file path of the function code."),
7755
7757
  minify: MinifySchema.optional().default(true),
7756
- external: z8.string().array().optional().describe(`A list of external packages that won't be included in the bundle.`)
7758
+ external: z7.string().array().optional().describe(`A list of external packages that won't be included in the bundle.`)
7757
7759
  });
7758
- var BundleCodeSchema = z8.object({
7760
+ var BundleCodeSchema = z7.object({
7759
7761
  bundle: LocalDirectorySchema.describe("The directory that needs to be bundled.")
7760
7762
  });
7761
- var CodeSchema = z8.union([
7763
+ var CodeSchema = z7.union([
7762
7764
  LocalFileSchema.transform((file) => ({
7763
- file,
7764
- minify: true,
7765
- external: []
7766
- })),
7765
+ file
7766
+ })).pipe(FileCodeSchema),
7767
7767
  FileCodeSchema,
7768
7768
  BundleCodeSchema
7769
7769
  ]).describe("Specify the code of your function.");
7770
- var FnSchema = z8.object({
7770
+ var FnSchema = z7.object({
7771
7771
  code: CodeSchema,
7772
7772
  // node
7773
7773
  handler: HandlerSchema.optional(),
@@ -7790,18 +7790,14 @@ var FnSchema = z8.object({
7790
7790
  environment: EnvironmentSchema.optional(),
7791
7791
  permissions: PermissionsSchema.optional()
7792
7792
  });
7793
- var FunctionSchema = z8.union([
7794
- LocalFileSchema.transform((file) => ({
7795
- code: {
7796
- file,
7797
- minify: true,
7798
- external: []
7799
- }
7800
- })),
7793
+ var FunctionSchema = z7.union([
7794
+ LocalFileSchema.transform((code) => ({
7795
+ code
7796
+ })).pipe(FnSchema),
7801
7797
  FnSchema
7802
7798
  ]);
7803
- var FunctionsSchema = z8.record(ResourceIdSchema, FunctionSchema).optional().describe("Define the functions in your stack.");
7804
- var FunctionDefaultSchema = z8.object({
7799
+ var FunctionsSchema = z7.record(ResourceIdSchema, FunctionSchema).optional().describe("Define the functions in your stack.");
7800
+ var FunctionDefaultSchema = z7.object({
7805
7801
  runtime: RuntimeSchema.default("nodejs20.x"),
7806
7802
  // node
7807
7803
  handler: HandlerSchema.default("index.default"),
@@ -7830,7 +7826,7 @@ var FunctionDefaultSchema = z8.object({
7830
7826
  }).default({});
7831
7827
 
7832
7828
  // src/feature/auth/schema.ts
7833
- var TriggersSchema = z9.object({
7829
+ var TriggersSchema = z8.object({
7834
7830
  beforeToken: FunctionSchema.optional().describe("A pre jwt token generation AWS Lambda trigger."),
7835
7831
  beforeLogin: FunctionSchema.optional().describe("A pre user login AWS Lambda trigger."),
7836
7832
  afterLogin: FunctionSchema.optional().describe("A post user login AWS Lambda trigger."),
@@ -7843,42 +7839,42 @@ var TriggersSchema = z9.object({
7843
7839
  createChallenge: FunctionSchema.optional().describe("Creates an authentication challenge."),
7844
7840
  verifyChallenge: FunctionSchema.optional().describe("Verifies the authentication challenge response.")
7845
7841
  }).describe("Specifies the configuration for AWS Lambda triggers.");
7846
- var AuthSchema = z9.record(
7842
+ var AuthSchema = z8.record(
7847
7843
  ResourceIdSchema,
7848
- z9.object({
7849
- access: z9.boolean().default(false).describe("Give access to every function in this stack to your cognito instance."),
7844
+ z8.object({
7845
+ access: z8.boolean().default(false).describe("Give access to every function in this stack to your cognito instance."),
7850
7846
  triggers: TriggersSchema.optional()
7851
7847
  })
7852
7848
  ).optional().describe("Define the auth triggers in your stack.");
7853
- var AuthDefaultSchema = z9.record(
7849
+ var AuthDefaultSchema = z8.record(
7854
7850
  ResourceIdSchema,
7855
- z9.object({
7856
- allowUserRegistration: z9.boolean().default(true).describe("Specifies whether users can create an user account or if only the administrator can."),
7857
- messaging: z9.object({
7851
+ z8.object({
7852
+ allowUserRegistration: z8.boolean().default(true).describe("Specifies whether users can create an user account or if only the administrator can."),
7853
+ messaging: z8.object({
7858
7854
  fromEmail: EmailSchema.describe("Specifies the sender's email address."),
7859
- fromName: z9.string().optional().describe("Specifies the sender's name."),
7855
+ fromName: z8.string().optional().describe("Specifies the sender's name."),
7860
7856
  replyTo: EmailSchema.optional().describe(
7861
7857
  "The destination to which the receiver of the email should reply."
7862
7858
  )
7863
7859
  }).optional().describe("The email configuration for sending messages."),
7864
7860
  // secret: z.boolean().default(false).describe('Specifies whether you want to generate a client secret.'),
7865
- username: z9.object({
7866
- emailAlias: z9.boolean().default(true).describe("Allow the user email to be used as username."),
7867
- caseSensitive: z9.boolean().default(false).describe(
7861
+ username: z8.object({
7862
+ emailAlias: z8.boolean().default(true).describe("Allow the user email to be used as username."),
7863
+ caseSensitive: z8.boolean().default(false).describe(
7868
7864
  "Specifies whether username case sensitivity will be enabled. When usernames and email addresses are case insensitive, users can sign in as the same user when they enter a different capitalization of their user name."
7869
7865
  )
7870
7866
  }).default({}).describe("The username policy."),
7871
- password: z9.object({
7872
- minLength: z9.number().int().min(6).max(99).default(12).describe("Required users to have at least the minimum password length."),
7873
- uppercase: z9.boolean().default(true).describe("Required users to use at least one uppercase letter in their password."),
7874
- lowercase: z9.boolean().default(true).describe("Required users to use at least one lowercase letter in their password."),
7875
- numbers: z9.boolean().default(true).describe("Required users to use at least one number in their password."),
7876
- symbols: z9.boolean().default(true).describe("Required users to use at least one symbol in their password."),
7867
+ password: z8.object({
7868
+ minLength: z8.number().int().min(6).max(99).default(12).describe("Required users to have at least the minimum password length."),
7869
+ uppercase: z8.boolean().default(true).describe("Required users to use at least one uppercase letter in their password."),
7870
+ lowercase: z8.boolean().default(true).describe("Required users to use at least one lowercase letter in their password."),
7871
+ numbers: z8.boolean().default(true).describe("Required users to use at least one number in their password."),
7872
+ symbols: z8.boolean().default(true).describe("Required users to use at least one symbol in their password."),
7877
7873
  temporaryPasswordValidity: DurationSchema.default("7 days").describe(
7878
7874
  "The duration a temporary password is valid. If the user doesn't sign in during this time, an administrator must reset their password."
7879
7875
  )
7880
7876
  }).default({}).describe("The password policy."),
7881
- validity: z9.object({
7877
+ validity: z8.object({
7882
7878
  idToken: DurationSchema.default("1 hour").describe(
7883
7879
  "The ID token time limit. After this limit expires, your user can't use their ID token."
7884
7880
  ),
@@ -7894,18 +7890,18 @@ var AuthDefaultSchema = z9.record(
7894
7890
  ).default({}).describe("Define the authenticatable users in your app.");
7895
7891
 
7896
7892
  // src/feature/domain/schema.ts
7897
- import { z as z10 } from "zod";
7898
- var DomainNameSchema = z10.string().regex(/[a-z\-\_\.]/g, "Invalid domain name").describe(
7893
+ import { z as z9 } from "zod";
7894
+ var DomainNameSchema = z9.string().regex(/[a-z\-\_\.]/g, "Invalid domain name").describe(
7899
7895
  "Enter a fully qualified domain name, for example, www.example.com. You can optionally include a trailing dot. If you omit the trailing dot, Amazon Route 53 assumes that the domain name that you specify is fully qualified. This means that Route 53 treats www.example.com (without a trailing dot) and www.example.com. (with a trailing dot) as identical."
7900
7896
  );
7901
- var DNSTypeSchema = z10.enum(["A", "AAAA", "CAA", "CNAME", "DS", "MX", "NAPTR", "NS", "PTR", "SOA", "SPF", "SRV", "TXT"]).describe("The DNS record type.");
7897
+ var DNSTypeSchema = z9.enum(["A", "AAAA", "CAA", "CNAME", "DS", "MX", "NAPTR", "NS", "PTR", "SOA", "SPF", "SRV", "TXT"]).describe("The DNS record type.");
7902
7898
  var TTLSchema = DurationSchema.describe("The resource record cache time to live (TTL).");
7903
- var RecordsSchema = z10.string().array().describe("One or more values that correspond with the value that you specified for the Type property.");
7904
- var DomainsDefaultSchema = z10.record(
7899
+ var RecordsSchema = z9.string().array().describe("One or more values that correspond with the value that you specified for the Type property.");
7900
+ var DomainsDefaultSchema = z9.record(
7905
7901
  ResourceIdSchema,
7906
- z10.object({
7902
+ z9.object({
7907
7903
  domain: DomainNameSchema.describe("Define the domain name"),
7908
- dns: z10.object({
7904
+ dns: z9.object({
7909
7905
  name: DomainNameSchema.optional(),
7910
7906
  type: DNSTypeSchema,
7911
7907
  ttl: TTLSchema,
@@ -7915,18 +7911,18 @@ var DomainsDefaultSchema = z10.record(
7915
7911
  ).optional().describe("Define the domains for your application.");
7916
7912
 
7917
7913
  // src/feature/graphql/schema.ts
7918
- import { z as z11 } from "zod";
7914
+ import { z as z10 } from "zod";
7919
7915
  var AuthorizerTtl = DurationSchema.describe(
7920
7916
  `The number of seconds a response should be cached for. The maximum value is one hour (3600 seconds). The Lambda function can override this by returning a ttlOverride key in its response.`
7921
7917
  );
7922
- var GraphQLDefaultSchema = z11.record(
7918
+ var GraphQLDefaultSchema = z10.record(
7923
7919
  ResourceIdSchema,
7924
- z11.object({
7920
+ z10.object({
7925
7921
  domain: ResourceIdSchema.describe("The domain id to link your API with.").optional(),
7926
- subDomain: z11.string().optional(),
7927
- auth: z11.union([
7922
+ subDomain: z10.string().optional(),
7923
+ auth: z10.union([
7928
7924
  ResourceIdSchema,
7929
- z11.object({
7925
+ z10.object({
7930
7926
  authorizer: FunctionSchema,
7931
7927
  ttl: AuthorizerTtl.default("1 hour")
7932
7928
  })
@@ -7938,22 +7934,22 @@ var GraphQLDefaultSchema = z11.record(
7938
7934
  resolver: LocalFileSchema.optional()
7939
7935
  })
7940
7936
  ).describe(`Define the global GraphQL API's.`).optional();
7941
- var GraphQLSchema = z11.record(
7937
+ var GraphQLSchema = z10.record(
7942
7938
  ResourceIdSchema,
7943
- z11.object({
7939
+ z10.object({
7944
7940
  // schema: z.union([LocalFileSchema.transform(v => [v]), z.array(LocalFileSchema).min(1)]).optional(),
7945
7941
  schema: LocalFileSchema.describe("The graphql schema file."),
7946
- resolvers: z11.record(
7942
+ resolvers: z10.record(
7947
7943
  // TypeName
7948
- z11.string(),
7949
- z11.record(
7944
+ z10.string(),
7945
+ z10.record(
7950
7946
  // FieldName
7951
- z11.string(),
7952
- z11.union([
7947
+ z10.string(),
7948
+ z10.union([
7953
7949
  FunctionSchema.transform((consumer) => ({
7954
7950
  consumer
7955
7951
  })),
7956
- z11.object({
7952
+ z10.object({
7957
7953
  consumer: FunctionSchema,
7958
7954
  resolver: LocalFileSchema.optional()
7959
7955
  })
@@ -7964,22 +7960,22 @@ var GraphQLSchema = z11.record(
7964
7960
  ).describe("Define the schema & resolvers in your stack for your global GraphQL API.").optional();
7965
7961
 
7966
7962
  // src/feature/http/schema.ts
7967
- import { z as z12 } from "zod";
7968
- var RouteSchema = z12.string().regex(/^(POST|GET|PUT|DELETE|HEAD|OPTIONS)(\s\/[a-z0-9\+\_\-\/\{\}]*)$/gi, "Invalid route").transform((v) => v);
7969
- var HttpDefaultSchema = z12.record(
7963
+ import { z as z11 } from "zod";
7964
+ var RouteSchema = z11.string().regex(/^(POST|GET|PUT|DELETE|HEAD|OPTIONS)(\s\/[a-z0-9\+\_\-\/\{\}]*)$/gi, "Invalid route").transform((v) => v);
7965
+ var HttpDefaultSchema = z11.record(
7970
7966
  ResourceIdSchema,
7971
- z12.object({
7967
+ z11.object({
7972
7968
  domain: ResourceIdSchema.describe("The domain id to link your API with."),
7973
- subDomain: z12.string().optional()
7969
+ subDomain: z11.string().optional()
7974
7970
  // auth: ResourceIdSchema.optional(),
7975
7971
  })
7976
7972
  ).optional().describe("Define your global HTTP API's.");
7977
- var HttpSchema = z12.record(ResourceIdSchema, z12.record(RouteSchema, FunctionSchema)).optional().describe("Define routes in your stack for your global HTTP API.");
7973
+ var HttpSchema = z11.record(ResourceIdSchema, z11.record(RouteSchema, FunctionSchema)).optional().describe("Define routes in your stack for your global HTTP API.");
7978
7974
 
7979
7975
  // src/feature/instance/schema.ts
7980
- import { z as z13 } from "zod";
7981
- var ImageSchema = z13.string().regex(/^ami\-[0-9a-f]+/).describe("The ID of the AMI.");
7982
- var TypeSchema = z13.enum([
7976
+ import { z as z12 } from "zod";
7977
+ var ImageSchema = z12.string().regex(/^ami\-[0-9a-f]+/).describe("The ID of the AMI.");
7978
+ var TypeSchema = z12.enum([
7983
7979
  "t3.nano",
7984
7980
  "t3.micro",
7985
7981
  "t3.small",
@@ -7997,59 +7993,59 @@ var TypeSchema = z13.enum([
7997
7993
  "g4ad.xlarge",
7998
7994
  "g4dn.xlarge"
7999
7995
  ]).describe(`The instance type.`);
8000
- var CommandSchema = z13.string().describe(`The script you want to execute when the instance starts up.`);
7996
+ var CommandSchema = z12.string().describe(`The script you want to execute when the instance starts up.`);
8001
7997
  var CodeSchema2 = LocalDirectorySchema.describe(`The code directory that will be deployed to your instance.`);
8002
- var ConnectSchema = z13.boolean().describe("Allows you to connect to all instances with an Instance Connect Endpoint.");
8003
- var EnvironmentSchema2 = z13.record(z13.string(), z13.string()).optional().describe("Environment variable key-value pairs.");
8004
- var ActionSchema2 = z13.string();
8005
- var ActionsSchema2 = z13.union([ActionSchema2.transform((v) => [v]), ActionSchema2.array()]);
8006
- var ArnSchema2 = z13.string().startsWith("arn:");
8007
- var WildcardSchema2 = z13.literal("*");
8008
- var ResourceSchema2 = z13.union([ArnSchema2, WildcardSchema2]).transform((v) => v);
8009
- var ResourcesSchema2 = z13.union([ResourceSchema2.transform((v) => [v]), ResourceSchema2.array()]);
8010
- var PermissionSchema2 = z13.object({
8011
- effect: z13.enum(["allow", "deny"]).default("allow"),
7998
+ var ConnectSchema = z12.boolean().describe("Allows you to connect to all instances with an Instance Connect Endpoint.");
7999
+ var EnvironmentSchema2 = z12.record(z12.string(), z12.string()).optional().describe("Environment variable key-value pairs.");
8000
+ var ActionSchema2 = z12.string();
8001
+ var ActionsSchema2 = z12.union([ActionSchema2.transform((v) => [v]), ActionSchema2.array()]);
8002
+ var ArnSchema2 = z12.string().startsWith("arn:");
8003
+ var WildcardSchema2 = z12.literal("*");
8004
+ var ResourceSchema2 = z12.union([ArnSchema2, WildcardSchema2]).transform((v) => v);
8005
+ var ResourcesSchema2 = z12.union([ResourceSchema2.transform((v) => [v]), ResourceSchema2.array()]);
8006
+ var PermissionSchema2 = z12.object({
8007
+ effect: z12.enum(["allow", "deny"]).default("allow"),
8012
8008
  actions: ActionsSchema2,
8013
8009
  resources: ResourcesSchema2
8014
8010
  });
8015
- var PermissionsSchema2 = z13.union([PermissionSchema2.transform((v) => [v]), PermissionSchema2.array()]).describe("Add IAM permissions to your instance.");
8016
- var InstanceDefaultSchema = z13.object({
8011
+ var PermissionsSchema2 = z12.union([PermissionSchema2.transform((v) => [v]), PermissionSchema2.array()]).describe("Add IAM permissions to your instance.");
8012
+ var InstanceDefaultSchema = z12.object({
8017
8013
  connect: ConnectSchema.default(false)
8018
8014
  }).default({}).describe("Define the default settings for all instances in your stacks.");
8019
- var InstancesSchema = z13.record(
8015
+ var InstancesSchema = z12.record(
8020
8016
  ResourceIdSchema,
8021
- z13.object({
8017
+ z12.object({
8022
8018
  image: ImageSchema,
8023
8019
  type: TypeSchema,
8024
8020
  code: CodeSchema2,
8025
- user: z13.string().default("ec2-user"),
8021
+ user: z12.string().default("ec2-user"),
8026
8022
  command: CommandSchema.optional(),
8027
8023
  environment: EnvironmentSchema2.optional(),
8028
8024
  permissions: PermissionsSchema2.optional(),
8029
- waitForTermination: z13.boolean().default(true)
8025
+ waitForTermination: z12.boolean().default(true)
8030
8026
  })
8031
8027
  ).optional().describe("Define the instances in your stack.");
8032
8028
 
8033
8029
  // src/feature/layer/schema.ts
8034
- import { z as z15 } from "zod";
8030
+ import { z as z14 } from "zod";
8035
8031
 
8036
8032
  // src/config/schema/lambda.ts
8037
- import { z as z14 } from "zod";
8038
- var ArchitectureSchema2 = z14.enum(["x86_64", "arm64"]).describe("The instruction set architecture that the function supports.");
8039
- var NodeRuntimeSchema2 = z14.enum(["nodejs18.x", "nodejs20.x", "nodejs22.x"]).describe("The identifier of the function's runtime.");
8033
+ import { z as z13 } from "zod";
8034
+ var ArchitectureSchema2 = z13.enum(["x86_64", "arm64"]).describe("The instruction set architecture that the function supports.");
8035
+ var NodeRuntimeSchema2 = z13.enum(["nodejs18.x", "nodejs20.x", "nodejs22.x"]).describe("The identifier of the function's runtime.");
8040
8036
 
8041
8037
  // src/feature/layer/schema.ts
8042
- var Schema = z15.object({
8038
+ var Schema = z14.object({
8043
8039
  file: LocalFileSchema,
8044
8040
  runtimes: NodeRuntimeSchema2.array().optional(),
8045
8041
  architecture: ArchitectureSchema2.optional(),
8046
- packages: z15.string().array().optional().describe(
8042
+ packages: z14.string().array().optional().describe(
8047
8043
  "Define the package names that are available bundled in the layer. Those packages are not bundled while bundling the lambda."
8048
8044
  )
8049
8045
  });
8050
- var LayerSchema = z15.record(
8051
- z15.string(),
8052
- z15.union([
8046
+ var LayerSchema = z14.record(
8047
+ z14.string(),
8048
+ z14.union([
8053
8049
  LocalFileSchema.transform((file) => ({
8054
8050
  file,
8055
8051
  description: void 0
@@ -8064,28 +8060,28 @@ var OnFailureDefaultSchema = FunctionSchema.optional().describe(
8064
8060
  );
8065
8061
 
8066
8062
  // src/feature/on-log/schema.ts
8067
- import { z as z16 } from "zod";
8068
- var FilterSchema = z16.enum(["trace", "debug", "info", "warn", "error", "fatal"]).array().describe("The log level that will gets delivered to the consumer.");
8069
- var OnLogDefaultSchema = z16.union([
8063
+ import { z as z15 } from "zod";
8064
+ var FilterSchema = z15.enum(["trace", "debug", "info", "warn", "error", "fatal"]).array().describe("The log level that will gets delivered to the consumer.");
8065
+ var OnLogDefaultSchema = z15.union([
8070
8066
  FunctionSchema.transform((consumer) => ({
8071
8067
  consumer,
8072
8068
  filter: ["error", "fatal"]
8073
8069
  })),
8074
- z16.object({
8070
+ z15.object({
8075
8071
  consumer: FunctionSchema,
8076
8072
  filter: FilterSchema
8077
8073
  })
8078
8074
  ]).optional().describe("Define a subscription on all Lambda functions logs.");
8079
8075
 
8080
8076
  // src/feature/pubsub/schema.ts
8081
- import { z as z17 } from "zod";
8077
+ import { z as z16 } from "zod";
8082
8078
  var DomainSchema = ResourceIdSchema.describe("The domain id to link your Pubsub API with.");
8083
- var PubSubDefaultSchema = z17.record(
8079
+ var PubSubDefaultSchema = z16.record(
8084
8080
  ResourceIdSchema,
8085
- z17.object({
8081
+ z16.object({
8086
8082
  auth: FunctionSchema,
8087
8083
  domain: DomainSchema.optional(),
8088
- subDomain: z17.string().optional()
8084
+ subDomain: z16.string().optional()
8089
8085
  // auth: z.union([
8090
8086
  // ResourceIdSchema,
8091
8087
  // z.object({
@@ -8101,11 +8097,11 @@ var PubSubDefaultSchema = z17.record(
8101
8097
  // .optional(),
8102
8098
  })
8103
8099
  ).optional().describe("Define the pubsub subscriber in your stack.");
8104
- var PubSubSchema = z17.record(
8100
+ var PubSubSchema = z16.record(
8105
8101
  ResourceIdSchema,
8106
- z17.object({
8107
- sql: z17.string().describe("The SQL statement used to query the IOT topic."),
8108
- sqlVersion: z17.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."),
8102
+ z16.object({
8103
+ sql: z16.string().describe("The SQL statement used to query the IOT topic."),
8104
+ 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."),
8109
8105
  consumer: FunctionSchema.describe("The consuming lambda function properties.")
8110
8106
  })
8111
8107
  ).optional().describe("Define the pubsub subscriber in your stack.");
@@ -8113,7 +8109,7 @@ var PubSubSchema = z17.record(
8113
8109
  // src/feature/queue/schema.ts
8114
8110
  import { days as days2, hours, minutes as minutes3, seconds as seconds2 } from "@awsless/duration";
8115
8111
  import { kibibytes } from "@awsless/size";
8116
- import { z as z18 } from "zod";
8112
+ import { z as z17 } from "zod";
8117
8113
  var RetentionPeriodSchema = DurationSchema.refine(
8118
8114
  durationMin(minutes3(1)),
8119
8115
  "Minimum retention period is 1 minute"
@@ -8141,10 +8137,10 @@ var ReceiveMessageWaitTimeSchema = DurationSchema.refine(
8141
8137
  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(
8142
8138
  "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."
8143
8139
  );
8144
- var BatchSizeSchema = z18.number().int().min(1, "Minimum batch size is 1").max(1e4, "Maximum batch size is 10000").describe(
8140
+ var BatchSizeSchema = z17.number().int().min(1, "Minimum batch size is 1").max(1e4, "Maximum batch size is 10000").describe(
8145
8141
  "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."
8146
8142
  );
8147
- var MaxConcurrencySchema = z18.number().int().min(2, "Minimum max concurrency is 2").max(1e3, "Maximum max concurrency is 1000").describe(
8143
+ var MaxConcurrencySchema = z17.number().int().min(2, "Minimum max concurrency is 2").max(1e3, "Maximum max concurrency is 1000").describe(
8148
8144
  "Limits the number of concurrent instances that the queue worker can invoke. You can specify an integer from 2 to 1000."
8149
8145
  );
8150
8146
  var MaxBatchingWindow = DurationSchema.refine(
@@ -8153,7 +8149,7 @@ var MaxBatchingWindow = DurationSchema.refine(
8153
8149
  ).describe(
8154
8150
  "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."
8155
8151
  );
8156
- var QueueDefaultSchema = z18.object({
8152
+ var QueueDefaultSchema = z17.object({
8157
8153
  retentionPeriod: RetentionPeriodSchema.default("7 days"),
8158
8154
  visibilityTimeout: VisibilityTimeoutSchema.default("30 seconds"),
8159
8155
  deliveryDelay: DeliveryDelaySchema.default("0 seconds"),
@@ -8163,82 +8159,81 @@ var QueueDefaultSchema = z18.object({
8163
8159
  maxConcurrency: MaxConcurrencySchema.optional(),
8164
8160
  maxBatchingWindow: MaxBatchingWindow.optional()
8165
8161
  }).default({});
8166
- var QueuesSchema = z18.record(
8162
+ var QueueSchema = z17.object({
8163
+ consumer: FunctionSchema.describe("The consuming lambda function properties."),
8164
+ retentionPeriod: RetentionPeriodSchema.optional(),
8165
+ visibilityTimeout: VisibilityTimeoutSchema.optional(),
8166
+ deliveryDelay: DeliveryDelaySchema.optional(),
8167
+ receiveMessageWaitTime: ReceiveMessageWaitTimeSchema.optional(),
8168
+ maxMessageSize: MaxMessageSizeSchema.optional(),
8169
+ batchSize: BatchSizeSchema.optional(),
8170
+ maxConcurrency: MaxConcurrencySchema.optional(),
8171
+ maxBatchingWindow: MaxBatchingWindow.optional()
8172
+ });
8173
+ var QueuesSchema = z17.record(
8167
8174
  ResourceIdSchema,
8168
- z18.union([
8169
- LocalFileSchema.transform((file) => ({
8170
- consumer: {
8171
- file
8172
- }
8173
- })),
8174
- z18.object({
8175
- consumer: FunctionSchema.describe("The consuming lambda function properties."),
8176
- retentionPeriod: RetentionPeriodSchema.optional(),
8177
- visibilityTimeout: VisibilityTimeoutSchema.optional(),
8178
- deliveryDelay: DeliveryDelaySchema.optional(),
8179
- receiveMessageWaitTime: ReceiveMessageWaitTimeSchema.optional(),
8180
- maxMessageSize: MaxMessageSizeSchema.optional(),
8181
- batchSize: BatchSizeSchema.optional(),
8182
- maxConcurrency: MaxConcurrencySchema.optional(),
8183
- maxBatchingWindow: MaxBatchingWindow.optional()
8184
- })
8175
+ z17.union([
8176
+ LocalFileSchema.transform((consumer) => ({
8177
+ consumer
8178
+ })).pipe(QueueSchema),
8179
+ QueueSchema
8185
8180
  ])
8186
8181
  ).optional().describe("Define the queues in your stack.");
8187
8182
 
8188
8183
  // src/feature/rest/schema.ts
8189
- import { z as z20 } from "zod";
8184
+ import { z as z19 } from "zod";
8190
8185
 
8191
8186
  // src/config/schema/route.ts
8192
- import { z as z19 } from "zod";
8193
- var RouteSchema2 = z19.union([
8194
- z19.string().regex(/^(POST|GET|PUT|DELETE|HEAD|OPTIONS)(\s\/[a-z0-9\+\_\-\/\{\}]*)$/gi, "Invalid route"),
8195
- z19.literal("$default")
8187
+ import { z as z18 } from "zod";
8188
+ var RouteSchema2 = z18.union([
8189
+ z18.string().regex(/^(POST|GET|PUT|DELETE|HEAD|OPTIONS)(\s\/[a-z0-9\+\_\-\/\{\}]*)$/gi, "Invalid route"),
8190
+ z18.literal("$default")
8196
8191
  ]);
8197
8192
 
8198
8193
  // src/feature/rest/schema.ts
8199
- var RestDefaultSchema = z20.record(
8194
+ var RestDefaultSchema = z19.record(
8200
8195
  ResourceIdSchema,
8201
- z20.object({
8196
+ z19.object({
8202
8197
  domain: ResourceIdSchema.describe("The domain id to link your API with.").optional(),
8203
- subDomain: z20.string().optional()
8198
+ subDomain: z19.string().optional()
8204
8199
  })
8205
8200
  ).optional().describe("Define your global REST API's.");
8206
- var RestSchema = z20.record(ResourceIdSchema, z20.record(RouteSchema2, FunctionSchema)).optional().describe("Define routes in your stack for your global REST API.");
8201
+ var RestSchema = z19.record(ResourceIdSchema, z19.record(RouteSchema2, FunctionSchema)).optional().describe("Define routes in your stack for your global REST API.");
8207
8202
 
8208
8203
  // src/feature/rpc/schema.ts
8209
- import { z as z21 } from "zod";
8210
- var RpcDefaultSchema = z21.record(
8204
+ import { z as z20 } from "zod";
8205
+ var RpcDefaultSchema = z20.record(
8211
8206
  ResourceIdSchema,
8212
- z21.object({
8207
+ z20.object({
8213
8208
  domain: ResourceIdSchema.describe("The domain id to link your RPC API with.").optional(),
8214
- subDomain: z21.string().optional(),
8209
+ subDomain: z20.string().optional(),
8215
8210
  auth: FunctionSchema.optional(),
8216
8211
  log: LogSchema.optional()
8217
8212
  })
8218
8213
  ).describe(`Define the global RPC API's.`).optional();
8219
- var RpcSchema = z21.record(ResourceIdSchema, z21.record(z21.string(), FunctionSchema).describe("The queries for your global RPC API.")).describe("Define the schema in your stack for your global RPC API.").optional();
8214
+ var RpcSchema = z20.record(ResourceIdSchema, z20.record(z20.string(), FunctionSchema).describe("The queries for your global RPC API.")).describe("Define the schema in your stack for your global RPC API.").optional();
8220
8215
 
8221
8216
  // src/feature/store/schema.ts
8222
- import { z as z22 } from "zod";
8223
- var DeletionProtectionSchema = z22.boolean().describe("Specifies if you want to protect the store from being deleted by awsless.");
8224
- var StoreDefaultSchema = z22.object({
8217
+ import { z as z21 } from "zod";
8218
+ var DeletionProtectionSchema = z21.boolean().describe("Specifies if you want to protect the store from being deleted by awsless.");
8219
+ var StoreDefaultSchema = z21.object({
8225
8220
  deletionProtection: DeletionProtectionSchema.optional()
8226
8221
  }).optional();
8227
- var StoresSchema = z22.union([
8228
- z22.array(ResourceIdSchema).transform((list4) => {
8222
+ var StoresSchema = z21.union([
8223
+ z21.array(ResourceIdSchema).transform((list4) => {
8229
8224
  const stores = {};
8230
8225
  for (const key of list4) {
8231
8226
  stores[key] = {};
8232
8227
  }
8233
8228
  return stores;
8234
8229
  }),
8235
- z22.record(
8230
+ z21.record(
8236
8231
  ResourceIdSchema,
8237
- z22.object({
8232
+ z21.object({
8238
8233
  // cors: CorsSchema,
8239
8234
  deletionProtection: DeletionProtectionSchema.optional(),
8240
- versioning: z22.boolean().default(false).describe("Enable versioning of your store."),
8241
- events: z22.object({
8235
+ versioning: z21.boolean().default(false).describe("Enable versioning of your store."),
8236
+ events: z21.object({
8242
8237
  // create
8243
8238
  "created:*": FunctionSchema.optional().describe(
8244
8239
  "Subscribe to notifications regardless of the API that was used to create an object."
@@ -8271,41 +8266,41 @@ var StoresSchema = z22.union([
8271
8266
  ]).optional().describe("Define the stores in your stack.");
8272
8267
 
8273
8268
  // src/feature/table/schema.ts
8274
- import { z as z23 } from "zod";
8275
- var KeySchema = z23.string().min(1).max(255);
8276
- var DeletionProtectionSchema2 = z23.boolean().describe("Specifies if you want to protect the table from being deleted by awsless.");
8277
- var TableDefaultSchema = z23.object({
8269
+ import { z as z22 } from "zod";
8270
+ var KeySchema = z22.string().min(1).max(255);
8271
+ var DeletionProtectionSchema2 = z22.boolean().describe("Specifies if you want to protect the table from being deleted by awsless.");
8272
+ var TableDefaultSchema = z22.object({
8278
8273
  deletionProtection: DeletionProtectionSchema2.optional()
8279
8274
  }).optional();
8280
- var TablesSchema = z23.record(
8275
+ var TablesSchema = z22.record(
8281
8276
  ResourceIdSchema,
8282
- z23.object({
8277
+ z22.object({
8283
8278
  hash: KeySchema.describe(
8284
8279
  "Specifies the name of the partition / hash key that makes up the primary key for the table."
8285
8280
  ),
8286
8281
  sort: KeySchema.optional().describe(
8287
8282
  "Specifies the name of the range / sort key that makes up the primary key for the table."
8288
8283
  ),
8289
- fields: z23.record(z23.string(), z23.enum(["string", "number", "binary"])).optional().describe(
8284
+ fields: z22.record(z22.string(), z22.enum(["string", "number", "binary"])).optional().describe(
8290
8285
  'A list of attributes that describe the key schema for the table and indexes. If no attribute field is defined we default to "string".'
8291
8286
  ),
8292
- class: z23.enum(["standard", "standard-infrequent-access"]).default("standard").describe("The table class of the table."),
8293
- pointInTimeRecovery: z23.boolean().default(false).describe("Indicates whether point in time recovery is enabled on the table."),
8287
+ class: z22.enum(["standard", "standard-infrequent-access"]).default("standard").describe("The table class of the table."),
8288
+ pointInTimeRecovery: z22.boolean().default(false).describe("Indicates whether point in time recovery is enabled on the table."),
8294
8289
  timeToLiveAttribute: KeySchema.optional().describe(
8295
8290
  "The name of the TTL attribute used to store the expiration time for items in the table. To update this property, you must first disable TTL and then enable TTL with the new attribute name."
8296
8291
  ),
8297
8292
  deletionProtection: DeletionProtectionSchema2.optional(),
8298
- stream: z23.object({
8299
- type: z23.enum(["keys-only", "new-image", "old-image", "new-and-old-images"]).describe(
8293
+ stream: z22.object({
8294
+ type: z22.enum(["keys-only", "new-image", "old-image", "new-and-old-images"]).describe(
8300
8295
  "When an item in the table is modified, stream.type determines what information is written to the stream for this table. Valid values are:\n- keys-only - Only the key attributes of the modified item are written to the stream.\n- new-image - The entire item, as it appears after it was modified, is written to the stream.\n- old-image - The entire item, as it appeared before it was modified, is written to the stream.\n- new-and-old-images - Both the new and the old item images of the item are written to the stream."
8301
8296
  ),
8302
8297
  consumer: FunctionSchema.describe("The consuming lambda function for the stream")
8303
8298
  }).optional().describe(
8304
8299
  "The settings for the DynamoDB table stream, which capture changes to items stored in the table."
8305
8300
  ),
8306
- indexes: z23.record(
8307
- z23.string(),
8308
- z23.object({
8301
+ indexes: z22.record(
8302
+ z22.string(),
8303
+ z22.object({
8309
8304
  /** Specifies the name of the partition / hash key that makes up the primary key for the global secondary index. */
8310
8305
  hash: KeySchema,
8311
8306
  /** Specifies the name of the range / sort key that makes up the primary key for the global secondary index. */
@@ -8315,14 +8310,14 @@ var TablesSchema = z23.record(
8315
8310
  * - keys-only - Only the index and primary keys are projected into the index.
8316
8311
  * @default 'all'
8317
8312
  */
8318
- projection: z23.enum(["all", "keys-only"]).default("all")
8313
+ projection: z22.enum(["all", "keys-only"]).default("all")
8319
8314
  })
8320
8315
  ).optional().describe("Specifies the global secondary indexes to be created on the table.")
8321
8316
  })
8322
8317
  ).optional().describe("Define the tables in your stack.");
8323
8318
 
8324
8319
  // src/config/schema/region.ts
8325
- import { z as z24 } from "zod";
8320
+ import { z as z23 } from "zod";
8326
8321
  var US = ["us-east-2", "us-east-1", "us-west-1", "us-west-2"];
8327
8322
  var AF = ["af-south-1"];
8328
8323
  var AP = [
@@ -8351,21 +8346,21 @@ var EU = [
8351
8346
  var ME = ["me-south-1", "me-central-1"];
8352
8347
  var SA = ["sa-east-1"];
8353
8348
  var regions = [...US, ...AF, ...AP, ...CA, ...EU, ...ME, ...SA];
8354
- var RegionSchema = z24.enum(regions);
8349
+ var RegionSchema = z23.enum(regions);
8355
8350
 
8356
8351
  // src/config/app.ts
8357
- var AppSchema = z25.object({
8358
- $schema: z25.string().optional(),
8352
+ var AppSchema = z24.object({
8353
+ $schema: z24.string().optional(),
8359
8354
  name: ResourceIdSchema.describe("App name."),
8360
8355
  region: RegionSchema.describe("The AWS region to deploy to."),
8361
- profile: z25.string().describe("The AWS profile to deploy to."),
8356
+ profile: z24.string().describe("The AWS profile to deploy to."),
8362
8357
  // stage: z
8363
8358
  // .string()
8364
8359
  // .regex(/^[a-z]+$/)
8365
8360
  // .default('prod')
8366
8361
  // .describe('The deployment stage.'),
8367
8362
  // onFailure: OnFailureSchema,
8368
- defaults: z25.object({
8363
+ defaults: z24.object({
8369
8364
  onFailure: OnFailureDefaultSchema,
8370
8365
  onLog: OnLogDefaultSchema,
8371
8366
  auth: AuthDefaultSchema,
@@ -8387,11 +8382,11 @@ var AppSchema = z25.object({
8387
8382
  });
8388
8383
 
8389
8384
  // src/config/stack.ts
8390
- import { z as z37 } from "zod";
8385
+ import { z as z36 } from "zod";
8391
8386
 
8392
8387
  // src/feature/cache/schema.ts
8393
- import { z as z26 } from "zod";
8394
- var TypeSchema2 = z26.enum([
8388
+ import { z as z25 } from "zod";
8389
+ var TypeSchema2 = z25.enum([
8395
8390
  "t4g.small",
8396
8391
  "t4g.medium",
8397
8392
  "r6g.large",
@@ -8406,29 +8401,29 @@ var TypeSchema2 = z26.enum([
8406
8401
  "r6gd.4xlarge",
8407
8402
  "r6gd.8xlarge"
8408
8403
  ]);
8409
- var PortSchema = z26.number().int().min(1).max(5e4);
8410
- var ShardsSchema = z26.number().int().min(0).max(100);
8411
- var ReplicasPerShardSchema = z26.number().int().min(0).max(5);
8412
- var EngineSchema = z26.enum(["7.0", "6.2"]);
8413
- var CachesSchema = z26.record(
8404
+ var PortSchema = z25.number().int().min(1).max(5e4);
8405
+ var ShardsSchema = z25.number().int().min(0).max(100);
8406
+ var ReplicasPerShardSchema = z25.number().int().min(0).max(5);
8407
+ var EngineSchema = z25.enum(["7.0", "6.2"]);
8408
+ var CachesSchema = z25.record(
8414
8409
  ResourceIdSchema,
8415
- z26.object({
8410
+ z25.object({
8416
8411
  type: TypeSchema2.default("t4g.small"),
8417
8412
  port: PortSchema.default(6379),
8418
8413
  shards: ShardsSchema.default(1),
8419
8414
  replicasPerShard: ReplicasPerShardSchema.default(1),
8420
8415
  engine: EngineSchema.default("7.0"),
8421
- dataTiering: z26.boolean().default(false)
8416
+ dataTiering: z25.boolean().default(false)
8422
8417
  })
8423
8418
  ).optional().describe("Define the caches in your stack. For access to the cache put your functions inside the global VPC.");
8424
8419
 
8425
8420
  // src/feature/command/schema.ts
8426
- import { z as z27 } from "zod";
8427
- var CommandSchema2 = z27.union([
8428
- z27.object({
8421
+ import { z as z26 } from "zod";
8422
+ var CommandSchema2 = z26.union([
8423
+ z26.object({
8429
8424
  file: LocalFileSchema,
8430
- handler: z27.string().default("default").describe("The name of the handler that needs to run"),
8431
- description: z27.string().optional().describe("A description of the command")
8425
+ handler: z26.string().default("default").describe("The name of the handler that needs to run"),
8426
+ description: z26.string().optional().describe("A description of the command")
8432
8427
  // options: z.record(ResourceIdSchema, OptionSchema).optional(),
8433
8428
  // arguments: z.record(ResourceIdSchema, ArgumentSchema).optional(),
8434
8429
  }),
@@ -8438,22 +8433,22 @@ var CommandSchema2 = z27.union([
8438
8433
  description: void 0
8439
8434
  }))
8440
8435
  ]);
8441
- var CommandsSchema = z27.record(ResourceIdSchema, CommandSchema2).optional().describe("Define the custom commands for your stack.");
8436
+ var CommandsSchema = z26.record(ResourceIdSchema, CommandSchema2).optional().describe("Define the custom commands for your stack.");
8442
8437
 
8443
8438
  // src/feature/config/schema.ts
8444
- import { z as z28 } from "zod";
8445
- var ConfigNameSchema = z28.string().regex(/[a-z0-9\-]/g, "Invalid config name");
8446
- var ConfigsSchema = z28.array(ConfigNameSchema).optional().describe("Define the config values for your stack.");
8439
+ import { z as z27 } from "zod";
8440
+ var ConfigNameSchema = z27.string().regex(/[a-z0-9\-]/g, "Invalid config name");
8441
+ var ConfigsSchema = z27.array(ConfigNameSchema).optional().describe("Define the config values for your stack.");
8447
8442
 
8448
8443
  // src/feature/cron/schema/index.ts
8449
- import { z as z30 } from "zod";
8444
+ import { z as z29 } from "zod";
8450
8445
 
8451
8446
  // src/feature/cron/schema/schedule.ts
8452
- import { z as z29 } from "zod";
8447
+ import { z as z28 } from "zod";
8453
8448
  import { awsCronExpressionValidator } from "aws-cron-expression-validator";
8454
- var RateExpressionSchema = z29.custom(
8449
+ var RateExpressionSchema = z28.custom(
8455
8450
  (value) => {
8456
- return z29.string().regex(/^[0-9]+ (seconds?|minutes?|hours?|days?)$/).refine((rate) => {
8451
+ return z28.string().regex(/^[0-9]+ (seconds?|minutes?|hours?|days?)$/).refine((rate) => {
8457
8452
  const [str] = rate.split(" ");
8458
8453
  const number = parseInt(str);
8459
8454
  return number > 0;
@@ -8469,9 +8464,9 @@ var RateExpressionSchema = z29.custom(
8469
8464
  }
8470
8465
  return `rate(${rate})`;
8471
8466
  });
8472
- var CronExpressionSchema = z29.custom(
8467
+ var CronExpressionSchema = z28.custom(
8473
8468
  (value) => {
8474
- return z29.string().safeParse(value).success;
8469
+ return z28.string().safeParse(value).success;
8475
8470
  },
8476
8471
  { message: "Invalid cron expression" }
8477
8472
  ).superRefine((value, ctx) => {
@@ -8480,12 +8475,12 @@ var CronExpressionSchema = z29.custom(
8480
8475
  } catch (error) {
8481
8476
  if (error instanceof Error) {
8482
8477
  ctx.addIssue({
8483
- code: z29.ZodIssueCode.custom,
8478
+ code: z28.ZodIssueCode.custom,
8484
8479
  message: `Invalid cron expression: ${error.message}`
8485
8480
  });
8486
8481
  } else {
8487
8482
  ctx.addIssue({
8488
- code: z29.ZodIssueCode.custom,
8483
+ code: z28.ZodIssueCode.custom,
8489
8484
  message: "Invalid cron expression"
8490
8485
  });
8491
8486
  }
@@ -8496,23 +8491,23 @@ var CronExpressionSchema = z29.custom(
8496
8491
  var ScheduleExpressionSchema = RateExpressionSchema.or(CronExpressionSchema);
8497
8492
 
8498
8493
  // src/feature/cron/schema/index.ts
8499
- var CronsSchema = z30.record(
8494
+ var CronsSchema = z29.record(
8500
8495
  ResourceIdSchema,
8501
- z30.object({
8502
- enabled: z30.boolean().default(true).describe("If the cron is enabled."),
8496
+ z29.object({
8497
+ enabled: z29.boolean().default(true).describe("If the cron is enabled."),
8503
8498
  consumer: FunctionSchema.describe("The consuming lambda function properties."),
8504
8499
  schedule: ScheduleExpressionSchema.describe(
8505
8500
  'The scheduling expression.\n\nexample: "0 20 * * ? *"\nexample: "5 minutes"'
8506
8501
  ),
8507
- payload: z30.unknown().optional().describe("The JSON payload that will be passed to the consumer.")
8502
+ payload: z29.unknown().optional().describe("The JSON payload that will be passed to the consumer.")
8508
8503
  })
8509
8504
  ).optional().describe(`Define the cron jobs in your stack.`);
8510
8505
 
8511
8506
  // src/feature/search/schema.ts
8512
8507
  import { gibibytes as gibibytes2 } from "@awsless/size";
8513
- import { z as z31 } from "zod";
8514
- var VersionSchema = z31.enum(["2.13", "2.11", "2.9", "2.7", "2.5", "2.3", "1.3"]);
8515
- var TypeSchema3 = z31.enum([
8508
+ import { z as z30 } from "zod";
8509
+ var VersionSchema = z30.enum(["2.13", "2.11", "2.9", "2.7", "2.5", "2.3", "1.3"]);
8510
+ var TypeSchema3 = z30.enum([
8516
8511
  "t3.small",
8517
8512
  "t3.medium",
8518
8513
  "m3.medium",
@@ -8587,11 +8582,11 @@ var TypeSchema3 = z31.enum([
8587
8582
  "r6gd.16xlarge"
8588
8583
  ]);
8589
8584
  var StorageSizeSchema = SizeSchema.refine(sizeMin(gibibytes2(10)), "Minimum storage size is 10 GB").refine(sizeMax(gibibytes2(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.");
8590
- var SearchsSchema = z31.record(
8585
+ var SearchsSchema = z30.record(
8591
8586
  ResourceIdSchema,
8592
- z31.object({
8587
+ z30.object({
8593
8588
  type: TypeSchema3.default("t3.small"),
8594
- count: z31.number().int().min(1).default(1),
8589
+ count: z30.number().int().min(1).default(1),
8595
8590
  version: VersionSchema.default("2.13"),
8596
8591
  storage: StorageSizeSchema.default("10 GB")
8597
8592
  // vpc: z.boolean().default(false),
@@ -8599,29 +8594,29 @@ var SearchsSchema = z31.record(
8599
8594
  ).optional().describe("Define the search instances in your stack. Backed by OpenSearch.");
8600
8595
 
8601
8596
  // src/feature/site/schema.ts
8602
- import { z as z32 } from "zod";
8603
- var ErrorResponsePathSchema = z32.string().describe(
8597
+ import { z as z31 } from "zod";
8598
+ var ErrorResponsePathSchema = z31.string().describe(
8604
8599
  "The path to the custom error page that you want to return to the viewer when your origin returns the HTTP status code specified.\n - We recommend that you store custom error pages in an Amazon S3 bucket. 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."
8605
8600
  );
8606
- var StatusCodeSchema = z32.number().int().positive().optional().describe(
8601
+ var StatusCodeSchema = z31.number().int().positive().optional().describe(
8607
8602
  "The HTTP status code that you want CloudFront to return to the viewer along with the custom error page. 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:\n- Some Internet devices (some firewalls and corporate proxies, for example) intercept HTTP 4xx and 5xx and prevent the response from being returned to the viewer. If you substitute 200, the response typically won't be intercepted.\n- If you don't care about distinguishing among different client errors or server errors, you can specify 400 or 500 as the ResponseCode for all 4xx or 5xx errors.\n- You might want to return a 200 status code (OK) and static website so your customers don't know that your website is down."
8608
8603
  );
8609
8604
  var MinTTLSchema = DurationSchema.describe(
8610
8605
  "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."
8611
8606
  );
8612
- var ErrorResponseSchema = z32.union([
8607
+ var ErrorResponseSchema = z31.union([
8613
8608
  ErrorResponsePathSchema,
8614
- z32.object({
8609
+ z31.object({
8615
8610
  path: ErrorResponsePathSchema,
8616
8611
  statusCode: StatusCodeSchema.optional(),
8617
8612
  minTTL: MinTTLSchema.optional()
8618
8613
  })
8619
8614
  ]).optional();
8620
- var SitesSchema = z32.record(
8615
+ var SitesSchema = z31.record(
8621
8616
  ResourceIdSchema,
8622
- z32.object({
8617
+ z31.object({
8623
8618
  domain: ResourceIdSchema.describe("The domain id to link your site with.").optional(),
8624
- subDomain: z32.string().optional(),
8619
+ subDomain: z31.string().optional(),
8625
8620
  // bind: z
8626
8621
  // .object({
8627
8622
  // auth: z.array(ResourceIdSchema),
@@ -8630,11 +8625,11 @@ var SitesSchema = z32.record(
8630
8625
  // // rest: z.array(ResourceIdSchema),
8631
8626
  // })
8632
8627
  // .optional(),
8633
- static: z32.union([LocalDirectorySchema, z32.boolean()]).optional().describe(
8628
+ static: z31.union([LocalDirectorySchema, z31.boolean()]).optional().describe(
8634
8629
  "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."
8635
8630
  ),
8636
8631
  ssr: FunctionSchema.optional().describe("Specifies the ssr file."),
8637
- origin: z32.enum(["ssr-first", "static-first"]).default("static-first").describe("Specifies the origin fallback ordering."),
8632
+ origin: z31.enum(["ssr-first", "static-first"]).default("static-first").describe("Specifies the origin fallback ordering."),
8638
8633
  // bind: z.object({
8639
8634
  // auth:
8640
8635
  // h
@@ -8647,7 +8642,7 @@ var SitesSchema = z32.record(
8647
8642
  // build: z.string().optional(),
8648
8643
  // }),
8649
8644
  // ]),
8650
- errors: z32.object({
8645
+ errors: z31.object({
8651
8646
  400: ErrorResponseSchema.describe("Customize a `400 Bad Request` response."),
8652
8647
  403: ErrorResponseSchema.describe("Customize a `403 Forbidden` response."),
8653
8648
  404: ErrorResponseSchema.describe("Customize a `404 Not Found` response."),
@@ -8660,16 +8655,16 @@ var SitesSchema = z32.record(
8660
8655
  503: ErrorResponseSchema.describe("Customize a `503 Service Unavailable` response."),
8661
8656
  504: ErrorResponseSchema.describe("Customize a `504 Gateway Timeout` response.")
8662
8657
  }).optional().describe("Customize the error responses for specific HTTP status codes."),
8663
- cors: z32.object({
8664
- override: z32.boolean().default(false),
8658
+ cors: z31.object({
8659
+ override: z31.boolean().default(false),
8665
8660
  maxAge: DurationSchema.default("365 days"),
8666
- exposeHeaders: z32.string().array().optional(),
8667
- credentials: z32.boolean().default(false),
8668
- headers: z32.string().array().default(["*"]),
8669
- origins: z32.string().array().default(["*"]),
8670
- methods: z32.enum(["GET", "DELETE", "HEAD", "OPTIONS", "PATCH", "POST", "PUT", "ALL"]).array().default(["ALL"])
8661
+ exposeHeaders: z31.string().array().optional(),
8662
+ credentials: z31.boolean().default(false),
8663
+ headers: z31.string().array().default(["*"]),
8664
+ origins: z31.string().array().default(["*"]),
8665
+ methods: z31.enum(["GET", "DELETE", "HEAD", "OPTIONS", "PATCH", "POST", "PUT", "ALL"]).array().default(["ALL"])
8671
8666
  }).optional().describe("Define the cors headers."),
8672
- security: z32.object({
8667
+ security: z31.object({
8673
8668
  // contentSecurityPolicy: z.object({
8674
8669
  // override: z.boolean().default(false),
8675
8670
  // policy: z.string(),
@@ -8711,10 +8706,10 @@ var SitesSchema = z32.record(
8711
8706
  // reportUri?: string
8712
8707
  // }
8713
8708
  }).optional().describe("Define the security policy."),
8714
- cache: z32.object({
8715
- cookies: z32.string().array().optional().describe("Specifies the cookies that CloudFront includes in the cache key."),
8716
- headers: z32.string().array().optional().describe("Specifies the headers that CloudFront includes in the cache key."),
8717
- queries: z32.string().array().optional().describe("Specifies the query values that CloudFront includes in the cache key.")
8709
+ cache: z31.object({
8710
+ cookies: z31.string().array().optional().describe("Specifies the cookies that CloudFront includes in the cache key."),
8711
+ headers: z31.string().array().optional().describe("Specifies the headers that CloudFront includes in the cache key."),
8712
+ queries: z31.string().array().optional().describe("Specifies the query values that CloudFront includes in the cache key.")
8718
8713
  }).optional().describe(
8719
8714
  "Specifies the cookies, headers, and query values that CloudFront includes in the cache key."
8720
8715
  )
@@ -8722,22 +8717,22 @@ var SitesSchema = z32.record(
8722
8717
  ).optional().describe("Define the sites in your stack.");
8723
8718
 
8724
8719
  // src/feature/stream/schema.ts
8725
- import { z as z33 } from "zod";
8726
- var LatencyModeSchema = z33.enum(["low", "normal"]).describe(
8720
+ import { z as z32 } from "zod";
8721
+ var LatencyModeSchema = z32.enum(["low", "normal"]).describe(
8727
8722
  `Channel latency mode. Valid values:
8728
8723
  - normal: Use "normal" to broadcast and deliver live video up to Full HD.
8729
8724
  - low: Use "low" for near real-time interactions with viewers.`
8730
8725
  );
8731
- var TypeSchema4 = z33.enum(["standard", "basic", "advanced-sd", "advanced-hd"]).describe(`The channel type, which determines the allowable resolution and bitrate.
8726
+ var TypeSchema4 = z32.enum(["standard", "basic", "advanced-sd", "advanced-hd"]).describe(`The channel type, which determines the allowable resolution and bitrate.
8732
8727
  If you exceed the allowable resolution or bitrate, the stream probably will disconnect immediately. Valid values:
8733
8728
  - standard: Video is transcoded: multiple qualities are generated from the original input to automatically give viewers the best experience for their devices and network conditions. Transcoding allows higher playback quality across a range of download speeds. Resolution can be up to 1080p and bitrate can be up to 8.5 Mbps. Audio is transcoded only for renditions 360p and below; above that, audio is passed through.
8734
8729
  - basic: Video is transmuxed: Amazon IVS delivers the original input to viewers. The viewer's video-quality choice is limited to the original input. Resolution can be up to 1080p and bitrate can be up to 1.5 Mbps for 480p and up to 3.5 Mbps for resolutions between 480p and 1080p.
8735
8730
  - advanced-sd: Video is transcoded; multiple qualities are generated from the original input, to automatically give viewers the best experience for their devices and network conditions. Input resolution can be up to 1080p and bitrate can be up to 8.5 Mbps; output is capped at SD quality (480p). You can select an optional transcode preset (see below). Audio for all renditions is transcoded, and an audio-only rendition is available.
8736
8731
  - advanced-hd: Video is transcoded; multiple qualities are generated from the original input, to automatically give viewers the best experience for their devices and network conditions. Input resolution can be up to 1080p and bitrate can be up to 8.5 Mbps; output is capped at HD quality (720p). You can select an optional transcode preset (see below). Audio for all renditions is transcoded, and an audio-only rendition is available.
8737
8732
  `);
8738
- var StreamsSchema = z33.record(
8733
+ var StreamsSchema = z32.record(
8739
8734
  ResourceIdSchema,
8740
- z33.object({
8735
+ z32.object({
8741
8736
  type: TypeSchema4.default("standard"),
8742
8737
  // preset: PresetSchema.optional(),
8743
8738
  latencyMode: LatencyModeSchema.default("low")
@@ -8745,11 +8740,11 @@ var StreamsSchema = z33.record(
8745
8740
  ).optional().describe("Define the streams in your stack.");
8746
8741
 
8747
8742
  // src/feature/task/schema.ts
8748
- import { z as z34 } from "zod";
8749
- var RetryAttemptsSchema2 = z34.number().int().min(0).max(2).describe(
8743
+ import { z as z33 } from "zod";
8744
+ var RetryAttemptsSchema2 = z33.number().int().min(0).max(2).describe(
8750
8745
  "The maximum number of times to retry when the function returns an error. You can specify a number from 0 to 2."
8751
8746
  );
8752
- var TaskSchema = z34.union([
8747
+ var TaskSchema = z33.union([
8753
8748
  LocalFileSchema.transform((file) => ({
8754
8749
  consumer: {
8755
8750
  code: {
@@ -8760,33 +8755,33 @@ var TaskSchema = z34.union([
8760
8755
  },
8761
8756
  retryAttempts: void 0
8762
8757
  })),
8763
- z34.object({
8758
+ z33.object({
8764
8759
  consumer: FunctionSchema,
8765
8760
  retryAttempts: RetryAttemptsSchema2.optional()
8766
8761
  })
8767
8762
  ]);
8768
- var TasksSchema = z34.record(ResourceIdSchema, TaskSchema).optional().describe("Define the tasks in your stack.");
8763
+ var TasksSchema = z33.record(ResourceIdSchema, TaskSchema).optional().describe("Define the tasks in your stack.");
8769
8764
 
8770
8765
  // src/feature/test/schema.ts
8771
- import { z as z35 } from "zod";
8772
- var TestsSchema = z35.union([LocalDirectorySchema.transform((v) => [v]), LocalDirectorySchema.array()]).describe("Define the location of your tests for your stack.").optional();
8766
+ import { z as z34 } from "zod";
8767
+ var TestsSchema = z34.union([LocalDirectorySchema.transform((v) => [v]), LocalDirectorySchema.array()]).describe("Define the location of your tests for your stack.").optional();
8773
8768
 
8774
8769
  // src/feature/topic/schema.ts
8775
8770
  import { paramCase as paramCase3 } from "change-case";
8776
- import { z as z36 } from "zod";
8777
- var TopicNameSchema = z36.string().min(3).max(256).regex(/^[a-z0-9\-]+$/i, "Invalid topic name").transform((value) => paramCase3(value)).describe("Define event topic name.");
8778
- var TopicsSchema = z36.array(TopicNameSchema).refine((topics) => {
8771
+ import { z as z35 } from "zod";
8772
+ var TopicNameSchema = z35.string().min(3).max(256).regex(/^[a-z0-9\-]+$/i, "Invalid topic name").transform((value) => paramCase3(value)).describe("Define event topic name.");
8773
+ var TopicsSchema = z35.array(TopicNameSchema).refine((topics) => {
8779
8774
  return topics.length === new Set(topics).size;
8780
8775
  }, "Must be a list of unique topic names").optional().describe("Define the event topics to publish too in your stack.");
8781
- var SubscribersSchema = z36.record(TopicNameSchema, FunctionSchema).optional().describe("Define the event topics to subscribe too in your stack.");
8776
+ var SubscribersSchema = z35.record(TopicNameSchema, FunctionSchema).optional().describe("Define the event topics to subscribe too in your stack.");
8782
8777
 
8783
8778
  // src/config/stack.ts
8784
8779
  var DependsSchema = ResourceIdSchema.array().optional().describe("Define the stacks that this stack is depended on.");
8785
8780
  var NameSchema = ResourceIdSchema.refine((name) => !["base"].includes(name), {
8786
8781
  message: `Stack name can't be a reserved name.`
8787
8782
  }).describe("Stack name.");
8788
- var StackSchema = z37.object({
8789
- $schema: z37.string().optional(),
8783
+ var StackSchema = z36.object({
8784
+ $schema: z36.string().optional(),
8790
8785
  name: NameSchema,
8791
8786
  depends: DependsSchema,
8792
8787
  commands: CommandsSchema,
@@ -8853,13 +8848,13 @@ var readConfigWithStage = async (file, stage) => {
8853
8848
  };
8854
8849
 
8855
8850
  // src/config/load/validate.ts
8856
- import { z as z38 } from "zod";
8851
+ import { z as z37 } from "zod";
8857
8852
  var validateConfig = async (schema, file, data) => {
8858
8853
  try {
8859
8854
  const result = await schema.parseAsync(data);
8860
8855
  return result;
8861
8856
  } catch (error) {
8862
- if (error instanceof z38.ZodError) {
8857
+ if (error instanceof z37.ZodError) {
8863
8858
  throw new ConfigError(file, error, data);
8864
8859
  }
8865
8860
  throw error;
@@ -12041,11 +12036,12 @@ var httpFeature = defineFeature({
12041
12036
  if (!(id in api)) api[id] = {};
12042
12037
  for (const [route, props] of Object.entries(routes)) {
12043
12038
  const { path, method } = parseRoute(route);
12044
- const file = typeof props === "string" ? props : props.file;
12045
- if (!(method in api[id])) {
12046
- api[id][method] = {};
12039
+ if (props && "file" in props.code) {
12040
+ if (!(method in api[id])) {
12041
+ api[id][method] = {};
12042
+ }
12043
+ api[id][method][path] = props.code.file;
12047
12044
  }
12048
- api[id][method][path] = file;
12049
12045
  }
12050
12046
  }
12051
12047
  }
@@ -12570,7 +12566,7 @@ var queueFeature = defineFeature({
12570
12566
  const resource2 = new TypeObject(2);
12571
12567
  const mock = new TypeObject(2);
12572
12568
  const mockResponse = new TypeObject(2);
12573
- for (const [name, fileOrProps] of Object.entries(stack.queues || {})) {
12569
+ for (const [name, props] of Object.entries(stack.queues || {})) {
12574
12570
  const varName = camelCase5(`${stack.name}-${name}`);
12575
12571
  const queueName = formatLocalResourceName({
12576
12572
  appName: ctx.appConfig.name,
@@ -12578,12 +12574,13 @@ var queueFeature = defineFeature({
12578
12574
  resourceType: "queue",
12579
12575
  resourceName: name
12580
12576
  });
12581
- const file = typeof fileOrProps === "string" ? fileOrProps : typeof fileOrProps.consumer === "string" ? fileOrProps.consumer : fileOrProps.consumer.file;
12582
- const relFile = relative5(directories.types, file);
12583
- gen.addImport(varName, relFile);
12584
- mock.addType(name, `MockBuilder<typeof ${varName}>`);
12585
- resource2.addType(name, `Send<'${queueName}', typeof ${varName}>`);
12586
- mockResponse.addType(name, `MockObject<typeof ${varName}>`);
12577
+ if ("file" in props.consumer.code) {
12578
+ const relFile = relative5(directories.types, props.consumer.code.file);
12579
+ gen.addImport(varName, relFile);
12580
+ mock.addType(name, `MockBuilder<typeof ${varName}>`);
12581
+ resource2.addType(name, `Send<'${queueName}', typeof ${varName}>`);
12582
+ mockResponse.addType(name, `MockObject<typeof ${varName}>`);
12583
+ }
12587
12584
  }
12588
12585
  mocks.addType(stack.name, mock);
12589
12586
  resources.addType(stack.name, resource2);
@@ -12750,7 +12747,7 @@ var createPrebuildLambdaFunction = (group, ctx, ns, id, local2) => {
12750
12747
  }
12751
12748
  const props = {
12752
12749
  architecture: "arm64",
12753
- runtime: "nodejs20.x",
12750
+ runtime: "nodejs22.x",
12754
12751
  ...local2
12755
12752
  };
12756
12753
  const code = new aws16.s3.BucketObject(group, "code", {
@@ -12886,10 +12883,12 @@ var rpcFeature = defineFeature({
12886
12883
  const schema = new TypeObject(2);
12887
12884
  for (const stack of ctx.stackConfigs) {
12888
12885
  for (const [name, props] of Object.entries(stack.rpc?.[id] ?? {})) {
12889
- const relFile = relative6(directories.types, props.file);
12890
- const varName = camelCase6(`${stack.name}-${name}`);
12891
- types2.addImport(varName, relFile);
12892
- schema.addType(name, `Handle<typeof ${varName}>`);
12886
+ if ("file" in props.code) {
12887
+ const relFile = relative6(directories.types, props.code.file);
12888
+ const varName = camelCase6(`${stack.name}-${name}`);
12889
+ types2.addImport(varName, relFile);
12890
+ schema.addType(name, `Handle<typeof ${varName}>`);
12891
+ }
12893
12892
  }
12894
12893
  }
12895
12894
  schemas.addType(id, schema);
@@ -14156,6 +14155,9 @@ var format = (value) => {
14156
14155
  }
14157
14156
  return "";
14158
14157
  };
14158
+ var endType = (value) => {
14159
+ return typeof value !== "object";
14160
+ };
14159
14161
  var logConfigError = (error) => {
14160
14162
  for (const issue of error.error.errors) {
14161
14163
  const message = [color.error(issue.message), color.dim(error.file), "\n{"];
@@ -14165,19 +14167,24 @@ var logConfigError = (error) => {
14165
14167
  const end = ["}"];
14166
14168
  issue.path.forEach((path, i) => {
14167
14169
  const index = i + 1;
14168
- context = context[path];
14170
+ const entry = context[path];
14171
+ if (typeof entry !== "undefined") {
14172
+ context = entry;
14173
+ } else {
14174
+ return;
14175
+ }
14169
14176
  if (typeof path === "string") {
14170
14177
  const key = path + `: `;
14171
- if (index === length) {
14178
+ if (index === length || endType(entry)) {
14172
14179
  const space = " ".repeat(key.length);
14173
- const value = format(context);
14180
+ const value = format(entry);
14174
14181
  const error2 = icon.arrow.top.repeat(value.length);
14175
14182
  message.push(codeLine(key + color.warning(value), index));
14176
14183
  message.push(codeLine(space + color.error(error2), index));
14177
- } else if (Array.isArray(context)) {
14184
+ } else if (Array.isArray(entry)) {
14178
14185
  message.push(codeLine(key + "[", index));
14179
14186
  end.unshift(codeLine("]", index));
14180
- } else if (typeof context === "object") {
14187
+ } else if (typeof entry === "object") {
14181
14188
  if (inStack && index === 3) {
14182
14189
  const name = error.data.stacks[issue.path[1]].name;
14183
14190
  message.push(codeLine("name: " + color.info(`"${name}"`) + ",", index));
@@ -14185,12 +14192,12 @@ var logConfigError = (error) => {
14185
14192
  message.push(codeLine(key + "{", index));
14186
14193
  end.unshift(codeLine("}", index));
14187
14194
  }
14188
- } else if (typeof context === "object") {
14195
+ } else if (typeof entry === "object") {
14189
14196
  message.push(codeLine("{", index));
14190
14197
  end.unshift(codeLine("}", index));
14191
- } else if (typeof context === "string") {
14192
- message.push(codeLine(color.warning(`"${context}"`), index));
14193
- const error2 = icon.arrow.top.repeat(context.length + 2);
14198
+ } else if (typeof entry === "string") {
14199
+ message.push(codeLine(color.warning(`"${entry}"`), index));
14200
+ const error2 = icon.arrow.top.repeat(entry.length + 2);
14194
14201
  message.push(codeLine(color.error(error2), index));
14195
14202
  }
14196
14203
  });