@awsless/awsless 0.0.145 → 0.0.147
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/app.json +1 -1
- package/dist/bin.js +132 -82
- package/dist/features/cognito-client-secret/bundle.zip +0 -0
- package/dist/features/delete-bucket/bundle.zip +0 -0
- package/dist/features/delete-hosted-zone/bundle.zip +0 -0
- package/dist/features/global-exports/bundle.zip +0 -0
- package/dist/features/invalidate-cache/bundle.zip +0 -0
- package/dist/features/upload-bucket-asset/bundle.zip +0 -0
- package/dist/index.d.ts +2077 -290
- package/dist/json.js +26 -4
- package/dist/stack.json +1 -1
- package/package.json +2 -2
package/dist/json.js
CHANGED
|
@@ -218,9 +218,6 @@ var PermissionSchema = z5.object({
|
|
|
218
218
|
resources: z5.string().array()
|
|
219
219
|
});
|
|
220
220
|
var PermissionsSchema = z5.union([PermissionSchema, PermissionSchema.array()]).describe("Add IAM permissions to your function.");
|
|
221
|
-
var LogSchema = z5.union([z5.boolean(), DurationSchema.refine(durationMin(Duration.days(1)), "Minimum log retention is 1 day")]).describe(
|
|
222
|
-
"Enable logging to a CloudWatch log group. Providing a duration value will set the log retention time."
|
|
223
|
-
);
|
|
224
221
|
var WarmSchema = z5.number().int().min(0).max(10).describe(
|
|
225
222
|
"Specify how many functions you want to warm up each 5 minutes. You can specify a number from 0 to 10."
|
|
226
223
|
);
|
|
@@ -228,6 +225,25 @@ var VPCSchema = z5.boolean().describe("Put the function inside your global VPC."
|
|
|
228
225
|
var MinifySchema = z5.boolean().describe("Minify the function code.");
|
|
229
226
|
var HandlerSchema = z5.string().describe("The name of the exported method within your code that Lambda calls to run your function.");
|
|
230
227
|
var FileSchema = LocalFileSchema.describe("The file path of the function code.");
|
|
228
|
+
var LogRetentionSchema = DurationSchema.refine(durationMin(Duration.days(1)), "Minimum log retention is 1 day");
|
|
229
|
+
var LogSchema = z5.union([
|
|
230
|
+
z5.boolean(),
|
|
231
|
+
LogRetentionSchema,
|
|
232
|
+
z5.object({
|
|
233
|
+
retention: LogRetentionSchema.describe("The log retention duration."),
|
|
234
|
+
format: z5.enum(["text", "json"]).describe(
|
|
235
|
+
`The format in which Lambda sends your function's application and system logs to CloudWatch. Select between plain text and structured JSON.`
|
|
236
|
+
).optional(),
|
|
237
|
+
system: z5.enum(["debug", "info", "warn"]).describe(
|
|
238
|
+
"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."
|
|
239
|
+
).optional(),
|
|
240
|
+
level: z5.enum(["trace", "debug", "info", "warn", "error", "fatal"]).describe(
|
|
241
|
+
"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."
|
|
242
|
+
).optional()
|
|
243
|
+
})
|
|
244
|
+
]).describe(
|
|
245
|
+
"Enable logging to a CloudWatch log group. Providing a duration value will set the log retention time."
|
|
246
|
+
);
|
|
231
247
|
var FunctionSchema = z5.union([
|
|
232
248
|
LocalFileSchema,
|
|
233
249
|
z5.object({
|
|
@@ -254,7 +270,12 @@ var FunctionDefaultSchema = z5.object({
|
|
|
254
270
|
minify: MinifySchema.default(true),
|
|
255
271
|
warm: WarmSchema.default(0),
|
|
256
272
|
vpc: VPCSchema.default(false),
|
|
257
|
-
log: LogSchema.default(
|
|
273
|
+
log: LogSchema.default({
|
|
274
|
+
retention: "7 days",
|
|
275
|
+
level: "error",
|
|
276
|
+
system: "warn",
|
|
277
|
+
format: "json"
|
|
278
|
+
}),
|
|
258
279
|
timeout: TimeoutSchema.default("10 seconds"),
|
|
259
280
|
runtime: RuntimeSchema.default("nodejs20.x"),
|
|
260
281
|
memorySize: MemorySizeSchema.default("128 MB"),
|
|
@@ -317,6 +338,7 @@ var ScheduleExpressionSchema = RateExpressionSchema.or(CronExpressionSchema);
|
|
|
317
338
|
var CronsSchema = z7.record(
|
|
318
339
|
ResourceIdSchema,
|
|
319
340
|
z7.object({
|
|
341
|
+
enabled: z7.boolean().default(true).describe("If the cron is enabled."),
|
|
320
342
|
consumer: FunctionSchema.describe("The consuming lambda function properties."),
|
|
321
343
|
schedule: ScheduleExpressionSchema.describe(
|
|
322
344
|
'The scheduling expression.\n\nexample: "0 20 * * ? *"\nexample: "5 minutes"'
|