@awsless/awsless 0.0.656 → 0.0.658
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 +14 -11
- package/dist/build-json-schema.js +13 -10
- package/dist/prebuild/icon/bundle.zip +0 -0
- package/dist/prebuild/image/bundle.zip +0 -0
- package/dist/prebuild/on-failure/bundle.zip +0 -0
- package/dist/prebuild/rpc/bundle.zip +0 -0
- package/dist/server.d.ts +5 -3
- package/dist/server.js +12 -5
- package/dist/stack.json +1 -1
- package/dist/stack.stage.json +1 -1
- package/package.json +9 -9
package/dist/bin.js
CHANGED
|
@@ -2467,16 +2467,19 @@ var TablesSchema = z43.record(
|
|
|
2467
2467
|
"You can specify a duration from 1 seconds to 5 minutes."
|
|
2468
2468
|
].join("\n")
|
|
2469
2469
|
),
|
|
2470
|
-
maxRecordAge: DurationSchema.refine(
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
|
|
2470
|
+
// maxRecordAge: DurationSchema.refine(
|
|
2471
|
+
// durationMin(seconds(1)),
|
|
2472
|
+
// 'Minimum record age duration is 1 second'
|
|
2473
|
+
// )
|
|
2474
|
+
// .refine(durationMax(minutes(1)), 'Maximum record age duration is 1 minute')
|
|
2475
|
+
// .default('60 seconds')
|
|
2476
|
+
// .describe(
|
|
2477
|
+
// [
|
|
2478
|
+
// 'Discard records older than the specified age.',
|
|
2479
|
+
// 'The maximum valid value for maximum record age is 60s.',
|
|
2480
|
+
// 'The default value is 60s',
|
|
2481
|
+
// ].join('\n')
|
|
2482
|
+
// ),
|
|
2480
2483
|
retryAttempts: z43.number().min(-1).max(1e4).default(2).describe(
|
|
2481
2484
|
[
|
|
2482
2485
|
"Discard records after the specified number of retries.",
|
|
@@ -6164,7 +6167,7 @@ var tableFeature = defineFeature({
|
|
|
6164
6167
|
functionName: result.lambda.functionName,
|
|
6165
6168
|
eventSourceArn: table.streamArn,
|
|
6166
6169
|
// tumblingWindowInSeconds
|
|
6167
|
-
maximumRecordAgeInSeconds:
|
|
6170
|
+
// maximumRecordAgeInSeconds: toSeconds(props.stream.maxRecordAge),
|
|
6168
6171
|
// bisectBatchOnFunctionError: true,
|
|
6169
6172
|
batchSize: props.stream.batchSize,
|
|
6170
6173
|
maximumBatchingWindowInSeconds: props.stream.batchWindow ? toSeconds8(props.stream.batchWindow) : void 0,
|
|
@@ -1782,16 +1782,19 @@ var TablesSchema = z39.record(
|
|
|
1782
1782
|
"You can specify a duration from 1 seconds to 5 minutes."
|
|
1783
1783
|
].join("\n")
|
|
1784
1784
|
),
|
|
1785
|
-
maxRecordAge: DurationSchema.refine(
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1785
|
+
// maxRecordAge: DurationSchema.refine(
|
|
1786
|
+
// durationMin(seconds(1)),
|
|
1787
|
+
// 'Minimum record age duration is 1 second'
|
|
1788
|
+
// )
|
|
1789
|
+
// .refine(durationMax(minutes(1)), 'Maximum record age duration is 1 minute')
|
|
1790
|
+
// .default('60 seconds')
|
|
1791
|
+
// .describe(
|
|
1792
|
+
// [
|
|
1793
|
+
// 'Discard records older than the specified age.',
|
|
1794
|
+
// 'The maximum valid value for maximum record age is 60s.',
|
|
1795
|
+
// 'The default value is 60s',
|
|
1796
|
+
// ].join('\n')
|
|
1797
|
+
// ),
|
|
1795
1798
|
retryAttempts: z39.number().min(-1).max(1e4).default(2).describe(
|
|
1796
1799
|
[
|
|
1797
1800
|
"Discard records after the specified number of retries.",
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/dist/server.d.ts
CHANGED
|
@@ -98,8 +98,10 @@ interface MetricResources {
|
|
|
98
98
|
}
|
|
99
99
|
declare const Metric: MetricResources;
|
|
100
100
|
|
|
101
|
-
declare const
|
|
102
|
-
declare const
|
|
101
|
+
declare const onFailureBucketName: string;
|
|
102
|
+
declare const onFailureQueueName: string;
|
|
103
|
+
declare const onFailureBucketArn: string;
|
|
104
|
+
declare const onFailureQueueArn: string;
|
|
103
105
|
|
|
104
106
|
declare const getPubSubTopic: <N extends string>(name: N) => `app/pubsub/${N}`;
|
|
105
107
|
|
|
@@ -176,4 +178,4 @@ declare const Topic: TopicResources;
|
|
|
176
178
|
declare const APP: "app";
|
|
177
179
|
declare const STACK: "stack";
|
|
178
180
|
|
|
179
|
-
export { APP, Alert, type AlertMock, type AlertMockResponse, type AlertResources, Auth, type AuthResources, Cache, type CacheResources, type CommandContext, type CommandHandler, Config, type ConfigResources, Cron, type CronResources, Fn, Function, type FunctionMock, type FunctionMockResponse, type FunctionResources, Metric, type MetricResources, PubSub, type PublishOptions, Queue, type QueueMock, type QueueMockResponse, type QueueResources, type RpcAuthorizerResponse, STACK, Search, type SearchResources, Store, type StoreResources, Table, type TableResources, Task, type TaskMock, type TaskMockResponse, type TaskResources, Topic, type TopicMock, type TopicMockResponse, type TopicResources, getAlertName, getAuthProps, getCacheProps, getConfigName, getConfigValue, getCronName, getFunctionName, getMetricName, getMetricNamespace, getPubSubTopic, getQueueName, getQueueUrl, getSearchName, getSearchProps, getSiteBucketName, getStoreName, getTableName, getTaskName, getTopicName, mockAlert, mockCache, mockFunction, mockMetric, mockPubSub, mockQueue, mockTask, mockTopic,
|
|
181
|
+
export { APP, Alert, type AlertMock, type AlertMockResponse, type AlertResources, Auth, type AuthResources, Cache, type CacheResources, type CommandContext, type CommandHandler, Config, type ConfigResources, Cron, type CronResources, Fn, Function, type FunctionMock, type FunctionMockResponse, type FunctionResources, Metric, type MetricResources, PubSub, type PublishOptions, Queue, type QueueMock, type QueueMockResponse, type QueueResources, type RpcAuthorizerResponse, STACK, Search, type SearchResources, Store, type StoreResources, Table, type TableResources, Task, type TaskMock, type TaskMockResponse, type TaskResources, Topic, type TopicMock, type TopicMockResponse, type TopicResources, getAlertName, getAuthProps, getCacheProps, getConfigName, getConfigValue, getCronName, getFunctionName, getMetricName, getMetricNamespace, getPubSubTopic, getQueueName, getQueueUrl, getSearchName, getSearchProps, getSiteBucketName, getStoreName, getTableName, getTaskName, getTopicName, mockAlert, mockCache, mockFunction, mockMetric, mockPubSub, mockQueue, mockTask, mockTopic, onFailureBucketArn, onFailureBucketName, onFailureQueueArn, onFailureQueueName, pubsubAuthorizerHandle, pubsubAuthorizerResponse, setConfigValue };
|
package/dist/server.js
CHANGED
|
@@ -256,12 +256,17 @@ import { invoke as invoke2 } from "@awsless/lambda";
|
|
|
256
256
|
import { schedule } from "@awsless/scheduler";
|
|
257
257
|
|
|
258
258
|
// src/lib/server/on-failure.ts
|
|
259
|
-
var
|
|
259
|
+
var onFailureBucketName = build({
|
|
260
260
|
resourceType: "on-failure",
|
|
261
261
|
resourceName: "failure",
|
|
262
262
|
postfix: APP_ID
|
|
263
263
|
});
|
|
264
|
-
var
|
|
264
|
+
var onFailureQueueName = build({
|
|
265
|
+
resourceType: "on-failure",
|
|
266
|
+
resourceName: "failure"
|
|
267
|
+
});
|
|
268
|
+
var onFailureBucketArn = `arn:aws:s3:::${onFailureBucketName}`;
|
|
269
|
+
var onFailureQueueArn = `arn:aws:sqs:${REGION}:${ACCOUNT_ID}:${onFailureQueueName}`;
|
|
265
270
|
|
|
266
271
|
// src/lib/server/task.ts
|
|
267
272
|
var getTaskName = bindLocalResourceName("task");
|
|
@@ -278,7 +283,7 @@ var Task = /* @__PURE__ */ createProxy((stackName) => {
|
|
|
278
283
|
schedule: options.schedule,
|
|
279
284
|
group: resourceTaskName("group"),
|
|
280
285
|
roleArn: `arn:aws:iam::${process.env.AWS_ACCOUNT_ID}:role/${resourceTaskName("schedule")}`,
|
|
281
|
-
deadLetterArn:
|
|
286
|
+
deadLetterArn: onFailureQueueArn
|
|
282
287
|
});
|
|
283
288
|
} else {
|
|
284
289
|
await invoke2({
|
|
@@ -746,8 +751,10 @@ export {
|
|
|
746
751
|
mockQueue,
|
|
747
752
|
mockTask,
|
|
748
753
|
mockTopic,
|
|
749
|
-
|
|
750
|
-
|
|
754
|
+
onFailureBucketArn,
|
|
755
|
+
onFailureBucketName,
|
|
756
|
+
onFailureQueueArn,
|
|
757
|
+
onFailureQueueName,
|
|
751
758
|
pubsubAuthorizerHandle,
|
|
752
759
|
pubsubAuthorizerResponse,
|
|
753
760
|
setConfigValue
|