@awsless/awsless 0.0.421 → 0.0.423

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.
@@ -34,6 +34,7 @@ var durationMax = (max) => {
34
34
 
35
35
  // src/config/schema/local-file.ts
36
36
  import { stat } from "fs/promises";
37
+ import { join as join2 } from "path";
37
38
  import { z as z3 } from "zod";
38
39
 
39
40
  // src/util/path.ts
@@ -68,7 +69,6 @@ var directories = {
68
69
  };
69
70
 
70
71
  // src/config/schema/local-file.ts
71
- import { join as join2 } from "path";
72
72
  var basePath;
73
73
  var resolvePath = (path) => {
74
74
  if (path.startsWith(".") && basePath) {
@@ -180,8 +180,9 @@ var LogSchema = z5.union([
180
180
  ).optional()
181
181
  })
182
182
  ]).describe("Enable logging to a CloudWatch log group. Providing a duration value will set the log retention time.");
183
- var LayersSchema = ArnSchema.array().describe(
184
- `A list of function layers to add to the function's execution environment. Specify each layer by its ARN, including the version.`
183
+ var LayersSchema = ResourceIdSchema.array().describe(
184
+ `A list of function layers to add to the function's execution environment.`
185
+ // `A list of function layers to add to the function's execution environment. Specify each layer by its ARN, including the version.`
185
186
  );
186
187
  var BuildSchema = z5.object({
187
188
  minify: MinifySchema.default(true),
@@ -1105,7 +1106,7 @@ var StackSchema = z30.object({
1105
1106
  });
1106
1107
 
1107
1108
  // src/config/app.ts
1108
- import { z as z35 } from "zod";
1109
+ import { z as z37 } from "zod";
1109
1110
 
1110
1111
  // src/feature/alert/schema.ts
1111
1112
  import { paramCase as paramCase3 } from "change-case";
@@ -1141,27 +1142,51 @@ var DomainsDefaultSchema = z32.record(
1141
1142
  })
1142
1143
  ).optional().describe("Define the domains for your application.");
1143
1144
 
1145
+ // src/feature/layer/schema.ts
1146
+ import { z as z34 } from "zod";
1147
+
1148
+ // src/config/schema/lambda.ts
1149
+ import { z as z33 } from "zod";
1150
+ var ArchitectureSchema2 = z33.enum(["x86_64", "arm64"]).describe("The instruction set architecture that the function supports.");
1151
+ var NodeRuntimeSchema2 = z33.enum(["nodejs18.x", "nodejs20.x", "nodejs22.x"]).describe("The identifier of the function's runtime.");
1152
+
1153
+ // src/feature/layer/schema.ts
1154
+ var LayerSchema = z34.record(
1155
+ ResourceIdSchema,
1156
+ z34.union([
1157
+ LocalFileSchema.transform((file) => ({
1158
+ file
1159
+ })),
1160
+ z34.object({
1161
+ file: LocalFileSchema,
1162
+ description: z34.string().optional().describe("A description of the lambda layer."),
1163
+ runtimes: NodeRuntimeSchema2.array().optional(),
1164
+ architectures: ArchitectureSchema2.array().optional()
1165
+ })
1166
+ ])
1167
+ ).optional().describe("Define the lambda layers in your stack.");
1168
+
1144
1169
  // src/feature/on-failure/schema.ts
1145
1170
  var OnFailureDefaultSchema = FunctionSchema.optional().describe(
1146
1171
  "Defining a onFailure handler will add a global onFailure handler for the following resources:\n- Async lambda functions\n- SQS queues\n- DynamoDB streams"
1147
1172
  );
1148
1173
 
1149
1174
  // src/feature/on-log/schema.ts
1150
- import { z as z33 } from "zod";
1151
- var FilterSchema = z33.enum(["trace", "debug", "info", "warn", "error", "fatal"]).array().describe("The log level that will gets delivered to the consumer.");
1152
- var OnLogDefaultSchema = z33.union([
1175
+ import { z as z35 } from "zod";
1176
+ var FilterSchema = z35.enum(["trace", "debug", "info", "warn", "error", "fatal"]).array().describe("The log level that will gets delivered to the consumer.");
1177
+ var OnLogDefaultSchema = z35.union([
1153
1178
  FunctionSchema.transform((consumer) => ({
1154
1179
  consumer,
1155
1180
  filter: ["error", "fatal"]
1156
1181
  })),
1157
- z33.object({
1182
+ z35.object({
1158
1183
  consumer: FunctionSchema,
1159
1184
  filter: FilterSchema
1160
1185
  })
1161
1186
  ]).optional().describe("Define a subscription on all Lambda functions logs.");
1162
1187
 
1163
1188
  // src/config/schema/region.ts
1164
- import { z as z34 } from "zod";
1189
+ import { z as z36 } from "zod";
1165
1190
  var US = ["us-east-2", "us-east-1", "us-west-1", "us-west-2"];
1166
1191
  var AF = ["af-south-1"];
1167
1192
  var AP = [
@@ -1190,21 +1215,21 @@ var EU = [
1190
1215
  var ME = ["me-south-1", "me-central-1"];
1191
1216
  var SA = ["sa-east-1"];
1192
1217
  var regions = [...US, ...AF, ...AP, ...CA, ...EU, ...ME, ...SA];
1193
- var RegionSchema = z34.enum(regions);
1218
+ var RegionSchema = z36.enum(regions);
1194
1219
 
1195
1220
  // src/config/app.ts
1196
- var AppSchema = z35.object({
1197
- $schema: z35.string().optional(),
1221
+ var AppSchema = z37.object({
1222
+ $schema: z37.string().optional(),
1198
1223
  name: ResourceIdSchema.describe("App name."),
1199
1224
  region: RegionSchema.describe("The AWS region to deploy to."),
1200
- profile: z35.string().describe("The AWS profile to deploy to."),
1225
+ profile: z37.string().describe("The AWS profile to deploy to."),
1201
1226
  // stage: z
1202
1227
  // .string()
1203
1228
  // .regex(/^[a-z]+$/)
1204
1229
  // .default('prod')
1205
1230
  // .describe('The deployment stage.'),
1206
1231
  // onFailure: OnFailureSchema,
1207
- defaults: z35.object({
1232
+ defaults: z37.object({
1208
1233
  onFailure: OnFailureDefaultSchema,
1209
1234
  onLog: OnLogDefaultSchema,
1210
1235
  auth: AuthDefaultSchema,
@@ -1219,7 +1244,8 @@ var AppSchema = z35.object({
1219
1244
  pubsub: PubSubDefaultSchema,
1220
1245
  table: TableDefaultSchema,
1221
1246
  store: StoreDefaultSchema,
1222
- alerts: AlertsDefaultSchema
1247
+ alerts: AlertsDefaultSchema,
1248
+ layers: LayerSchema
1223
1249
  // dataRetention: z.boolean().describe('Configure how your resources are handled on delete.').default(false),
1224
1250
  }).default({}).describe("Default properties")
1225
1251
  });
@@ -1 +1 @@
1
- 26e903678b395660048b1f1250325821b1418163
1
+ e393218daa5f351d3d47da4da9eb3cca14c998c3
Binary file