@awsless/cli 0.0.27 → 0.0.29
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/app.stage.json +1 -1
- package/dist/bin.js +26 -12
- package/dist/build-json-schema.js +9 -4
- package/dist/prebuild/icon/bundle.zip +0 -0
- package/dist/prebuild/image/bundle.zip +0 -0
- package/dist/prebuild/on-error-log/bundle.zip +0 -0
- package/dist/prebuild/on-failure/bundle.zip +0 -0
- package/dist/prebuild/rpc/bundle.zip +0 -0
- package/dist/stack.json +1 -1
- package/dist/stack.stage.json +1 -1
- package/package.json +11 -11
package/dist/bin.js
CHANGED
|
@@ -1414,12 +1414,16 @@ var ReceiveMessageWaitTimeSchema = DurationSchema.refine(
|
|
|
1414
1414
|
).refine(durationMax(seconds2(20)), "Maximum receive message wait time is 20 seconds").describe("Long-polling wait time. You can specify a duration from 1 to 20 seconds.");
|
|
1415
1415
|
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("Message size limit. You can specify a size from 1 KB to 256 KB.");
|
|
1416
1416
|
var BatchSizeSchema = z21.number().int().min(1, "Minimum batch size is 1").max(10, "FIFO queues support a maximum batch size of 10").describe("The maximum number of records per batch. FIFO queues are capped at 10.");
|
|
1417
|
+
var RetryAttemptsSchema3 = z21.number().int().min(0).max(999).describe(
|
|
1418
|
+
"The maximum number of times to retry when the function returns an error. You can specify a number from 0 to 999."
|
|
1419
|
+
);
|
|
1417
1420
|
var QueueDefaultSchema = z21.object({
|
|
1418
1421
|
retentionPeriod: RetentionPeriodSchema.default("7 days"),
|
|
1419
1422
|
visibilityTimeout: VisibilityTimeoutSchema.default("2 minutes"),
|
|
1420
1423
|
receiveMessageWaitTime: ReceiveMessageWaitTimeSchema.optional(),
|
|
1421
1424
|
maxMessageSize: MaxMessageSizeSchema.default("256 KB"),
|
|
1422
|
-
batchSize: BatchSizeSchema.default(10)
|
|
1425
|
+
batchSize: BatchSizeSchema.default(10),
|
|
1426
|
+
retryAttempts: RetryAttemptsSchema3.default(2)
|
|
1423
1427
|
}).default({});
|
|
1424
1428
|
var QueueSchema = z21.object({
|
|
1425
1429
|
consumer: FunctionSchema.optional().describe("The consuming lambda function properties."),
|
|
@@ -1427,7 +1431,8 @@ var QueueSchema = z21.object({
|
|
|
1427
1431
|
visibilityTimeout: VisibilityTimeoutSchema.optional(),
|
|
1428
1432
|
receiveMessageWaitTime: ReceiveMessageWaitTimeSchema.optional(),
|
|
1429
1433
|
maxMessageSize: MaxMessageSizeSchema.optional(),
|
|
1430
|
-
batchSize: BatchSizeSchema.optional()
|
|
1434
|
+
batchSize: BatchSizeSchema.optional(),
|
|
1435
|
+
retryAttempts: RetryAttemptsSchema3.optional()
|
|
1431
1436
|
});
|
|
1432
1437
|
var QueuesSchema = z21.record(
|
|
1433
1438
|
ResourceIdSchema,
|
|
@@ -2148,7 +2153,7 @@ var CronExpressionSchema = z34.custom(
|
|
|
2148
2153
|
var ScheduleExpressionSchema = RateExpressionSchema.or(CronExpressionSchema);
|
|
2149
2154
|
|
|
2150
2155
|
// src/feature/cron/schema/index.ts
|
|
2151
|
-
var
|
|
2156
|
+
var RetryAttemptsSchema4 = z35.number().int().min(0).max(2).describe(
|
|
2152
2157
|
"The maximum number of times to retry when the function returns an error. You can specify a number from 0 to 2."
|
|
2153
2158
|
);
|
|
2154
2159
|
var CronsSchema = z35.record(
|
|
@@ -2160,7 +2165,7 @@ var CronsSchema = z35.record(
|
|
|
2160
2165
|
'The scheduling expression.\n\nexample: "0 20 * * ? *"\nexample: "5 minutes"'
|
|
2161
2166
|
),
|
|
2162
2167
|
payload: z35.unknown().optional().describe("The JSON payload that will be passed to the consumer."),
|
|
2163
|
-
retryAttempts:
|
|
2168
|
+
retryAttempts: RetryAttemptsSchema4.default(2)
|
|
2164
2169
|
})
|
|
2165
2170
|
).optional().describe(`Define the cron jobs in your stack.`);
|
|
2166
2171
|
|
|
@@ -5231,6 +5236,7 @@ var queueFeature = defineFeature({
|
|
|
5231
5236
|
resourceType: "queue",
|
|
5232
5237
|
resourceName: id
|
|
5233
5238
|
});
|
|
5239
|
+
const onFailure = ctx.shared.get("on-failure", "queue-arn");
|
|
5234
5240
|
const queue2 = new aws12.sqs.Queue(group, "queue", {
|
|
5235
5241
|
name: `${baseName}.fifo`,
|
|
5236
5242
|
visibilityTimeoutSeconds: toSeconds6(props.visibilityTimeout),
|
|
@@ -5239,7 +5245,13 @@ var queueFeature = defineFeature({
|
|
|
5239
5245
|
maxMessageSize: toBytes(props.maxMessageSize),
|
|
5240
5246
|
fifoQueue: true,
|
|
5241
5247
|
deduplicationScope: "messageGroup",
|
|
5242
|
-
fifoThroughputLimit: "perMessageGroupId"
|
|
5248
|
+
fifoThroughputLimit: "perMessageGroupId",
|
|
5249
|
+
redrivePolicy: onFailure.pipe(
|
|
5250
|
+
(arn) => JSON.stringify({
|
|
5251
|
+
deadLetterTargetArn: arn,
|
|
5252
|
+
maxReceiveCount: props.retryAttempts + 1
|
|
5253
|
+
})
|
|
5254
|
+
)
|
|
5243
5255
|
});
|
|
5244
5256
|
if (local.consumer) {
|
|
5245
5257
|
const lambdaConsumer = createLambdaFunction(group, ctx, `queue`, id, local.consumer);
|
|
@@ -5257,11 +5269,7 @@ var queueFeature = defineFeature({
|
|
|
5257
5269
|
}
|
|
5258
5270
|
);
|
|
5259
5271
|
lambdaConsumer.addPermission({
|
|
5260
|
-
actions: [
|
|
5261
|
-
"sqs:ReceiveMessage",
|
|
5262
|
-
"sqs:DeleteMessage",
|
|
5263
|
-
"sqs:GetQueueAttributes"
|
|
5264
|
-
],
|
|
5272
|
+
actions: ["sqs:ReceiveMessage", "sqs:DeleteMessage", "sqs:GetQueueAttributes"],
|
|
5265
5273
|
resources: [queue2.arn]
|
|
5266
5274
|
});
|
|
5267
5275
|
}
|
|
@@ -11801,7 +11809,10 @@ var clearCache = (program2) => {
|
|
|
11801
11809
|
}
|
|
11802
11810
|
await createInvalidationForDistributionTenants(cloudFrontClient, {
|
|
11803
11811
|
distributionId,
|
|
11804
|
-
paths: [
|
|
11812
|
+
paths: [
|
|
11813
|
+
// shared.entry('image', 'path', name!)
|
|
11814
|
+
"/*"
|
|
11815
|
+
]
|
|
11805
11816
|
});
|
|
11806
11817
|
}
|
|
11807
11818
|
});
|
|
@@ -11925,7 +11936,10 @@ var clearCache2 = (program2) => {
|
|
|
11925
11936
|
}
|
|
11926
11937
|
await createInvalidationForDistributionTenants(cloudFrontClient, {
|
|
11927
11938
|
distributionId,
|
|
11928
|
-
paths: [
|
|
11939
|
+
paths: [
|
|
11940
|
+
// shared.entry('icon', 'path', name!)
|
|
11941
|
+
"/*"
|
|
11942
|
+
]
|
|
11929
11943
|
});
|
|
11930
11944
|
}
|
|
11931
11945
|
});
|
|
@@ -468,12 +468,16 @@ var ReceiveMessageWaitTimeSchema = DurationSchema.refine(
|
|
|
468
468
|
).refine(durationMax(seconds2(20)), "Maximum receive message wait time is 20 seconds").describe("Long-polling wait time. You can specify a duration from 1 to 20 seconds.");
|
|
469
469
|
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("Message size limit. You can specify a size from 1 KB to 256 KB.");
|
|
470
470
|
var BatchSizeSchema = z17.number().int().min(1, "Minimum batch size is 1").max(10, "FIFO queues support a maximum batch size of 10").describe("The maximum number of records per batch. FIFO queues are capped at 10.");
|
|
471
|
+
var RetryAttemptsSchema3 = z17.number().int().min(0).max(999).describe(
|
|
472
|
+
"The maximum number of times to retry when the function returns an error. You can specify a number from 0 to 999."
|
|
473
|
+
);
|
|
471
474
|
var QueueDefaultSchema = z17.object({
|
|
472
475
|
retentionPeriod: RetentionPeriodSchema.default("7 days"),
|
|
473
476
|
visibilityTimeout: VisibilityTimeoutSchema.default("2 minutes"),
|
|
474
477
|
receiveMessageWaitTime: ReceiveMessageWaitTimeSchema.optional(),
|
|
475
478
|
maxMessageSize: MaxMessageSizeSchema.default("256 KB"),
|
|
476
|
-
batchSize: BatchSizeSchema.default(10)
|
|
479
|
+
batchSize: BatchSizeSchema.default(10),
|
|
480
|
+
retryAttempts: RetryAttemptsSchema3.default(2)
|
|
477
481
|
}).default({});
|
|
478
482
|
var QueueSchema = z17.object({
|
|
479
483
|
consumer: FunctionSchema.optional().describe("The consuming lambda function properties."),
|
|
@@ -481,7 +485,8 @@ var QueueSchema = z17.object({
|
|
|
481
485
|
visibilityTimeout: VisibilityTimeoutSchema.optional(),
|
|
482
486
|
receiveMessageWaitTime: ReceiveMessageWaitTimeSchema.optional(),
|
|
483
487
|
maxMessageSize: MaxMessageSizeSchema.optional(),
|
|
484
|
-
batchSize: BatchSizeSchema.optional()
|
|
488
|
+
batchSize: BatchSizeSchema.optional(),
|
|
489
|
+
retryAttempts: RetryAttemptsSchema3.optional()
|
|
485
490
|
});
|
|
486
491
|
var QueuesSchema = z17.record(
|
|
487
492
|
ResourceIdSchema,
|
|
@@ -1202,7 +1207,7 @@ var CronExpressionSchema = z30.custom(
|
|
|
1202
1207
|
var ScheduleExpressionSchema = RateExpressionSchema.or(CronExpressionSchema);
|
|
1203
1208
|
|
|
1204
1209
|
// src/feature/cron/schema/index.ts
|
|
1205
|
-
var
|
|
1210
|
+
var RetryAttemptsSchema4 = z31.number().int().min(0).max(2).describe(
|
|
1206
1211
|
"The maximum number of times to retry when the function returns an error. You can specify a number from 0 to 2."
|
|
1207
1212
|
);
|
|
1208
1213
|
var CronsSchema = z31.record(
|
|
@@ -1214,7 +1219,7 @@ var CronsSchema = z31.record(
|
|
|
1214
1219
|
'The scheduling expression.\n\nexample: "0 20 * * ? *"\nexample: "5 minutes"'
|
|
1215
1220
|
),
|
|
1216
1221
|
payload: z31.unknown().optional().describe("The JSON payload that will be passed to the consumer."),
|
|
1217
|
-
retryAttempts:
|
|
1222
|
+
retryAttempts: RetryAttemptsSchema4.default(2)
|
|
1218
1223
|
})
|
|
1219
1224
|
).optional().describe(`Define the cron jobs in your stack.`);
|
|
1220
1225
|
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|