@awsless/awsless 0.0.645 → 0.0.646

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
@@ -1053,7 +1053,7 @@ var DomainsDefaultSchema = z10.record(
1053
1053
  ).optional().describe("Define the domains for your application.");
1054
1054
 
1055
1055
  // src/feature/function/schema.ts
1056
- import { days, minutes as minutes2, seconds, toDays } from "@awsless/duration";
1056
+ import { days, minutes, seconds, toDays } from "@awsless/duration";
1057
1057
  import { gibibytes, mebibytes } from "@awsless/size";
1058
1058
  import { z as z15 } from "zod";
1059
1059
 
@@ -1129,7 +1129,7 @@ var sizeMax = (max) => {
1129
1129
  var MemorySizeSchema = SizeSchema.refine(sizeMin(mebibytes(128)), "Minimum memory size is 128 MB").refine(sizeMax(gibibytes(10)), "Maximum memory size is 10 GB").describe(
1130
1130
  "The amount of memory available to the function at runtime. Increasing the function memory also increases its CPU allocation. The value can be any multiple of 1 MB. You can specify a size value from 128 MB to 10 GB."
1131
1131
  );
1132
- var TimeoutSchema = DurationSchema.refine(durationMin(seconds(10)), "Minimum timeout duration is 10 seconds").refine(durationMax(minutes2(15)), "Maximum timeout duration is 15 minutes").describe(
1132
+ var TimeoutSchema = DurationSchema.refine(durationMin(seconds(10)), "Minimum timeout duration is 10 seconds").refine(durationMax(minutes(15)), "Maximum timeout duration is 15 minutes").describe(
1133
1133
  "The amount of time that Lambda allows a function to run before stopping it. You can specify a size value from 1 second to 15 minutes."
1134
1134
  );
1135
1135
  var EphemeralStorageSizeSchema = SizeSchema.refine(
@@ -1362,11 +1362,11 @@ var PubSubSchema = z19.record(
1362
1362
  ).optional().describe("Define the pubsub subscriber in your stack.");
1363
1363
 
1364
1364
  // src/feature/queue/schema.ts
1365
- import { days as days2, hours, minutes as minutes3, seconds as seconds2 } from "@awsless/duration";
1365
+ import { days as days2, hours, minutes as minutes2, seconds as seconds2 } from "@awsless/duration";
1366
1366
  import { kibibytes } from "@awsless/size";
1367
1367
  import { z as z20 } from "zod";
1368
1368
  var RetentionPeriodSchema = DurationSchema.refine(
1369
- durationMin(minutes3(1)),
1369
+ durationMin(minutes2(1)),
1370
1370
  "Minimum retention period is 1 minute"
1371
1371
  ).refine(durationMax(days2(14)), "Maximum retention period is 14 days").describe(
1372
1372
  "The number of seconds that Amazon SQS retains a message. You can specify a duration from 1 minute to 14 days."
@@ -1378,7 +1378,7 @@ var VisibilityTimeoutSchema = DurationSchema.refine(
1378
1378
  "The length of time during which a message will be unavailable after a message is delivered from the queue. This blocks other components from receiving the same message and gives the initial component time to process and delete the message from the queue. You can specify a duration from 0 to 12 hours."
1379
1379
  );
1380
1380
  var DeliveryDelaySchema = DurationSchema.refine(
1381
- durationMax(minutes3(15)),
1381
+ durationMax(minutes2(15)),
1382
1382
  "Maximum delivery delay is 15 minutes"
1383
1383
  ).describe(
1384
1384
  "The time in seconds for which the delivery of all messages in the queue is delayed. You can specify a duration from 0 to 15 minutes."
@@ -1399,7 +1399,7 @@ var MaxConcurrencySchema = z20.number().int().min(2, "Minimum max concurrency is
1399
1399
  "Limits the number of concurrent instances that the queue worker can invoke. You can specify an integer from 2 to 1000."
1400
1400
  );
1401
1401
  var MaxBatchingWindow = DurationSchema.refine(
1402
- durationMax(minutes3(5)),
1402
+ durationMax(minutes2(5)),
1403
1403
  "Maximum max batching window is 5 minutes"
1404
1404
  ).describe(
1405
1405
  "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."
@@ -1469,11 +1469,11 @@ var RestSchema = z22.record(
1469
1469
  ).optional().describe("Define routes in your stack for your global REST API.");
1470
1470
 
1471
1471
  // src/feature/rpc/schema.ts
1472
- import { minutes as minutes5, seconds as seconds3 } from "@awsless/duration";
1472
+ import { minutes as minutes4, seconds as seconds3 } from "@awsless/duration";
1473
1473
  import { z as z24 } from "zod";
1474
1474
 
1475
1475
  // src/feature/router/schema.ts
1476
- import { days as days3, minutes as minutes4, parse as parse3 } from "@awsless/duration";
1476
+ import { days as days3, minutes as minutes3, parse as parse3 } from "@awsless/duration";
1477
1477
  import { z as z23 } from "zod";
1478
1478
  var ErrorResponsePathSchema = z23.string().describe(
1479
1479
  [
@@ -1538,10 +1538,10 @@ var WafSettingsSchema = z23.object({
1538
1538
  }).optional().describe(
1539
1539
  "Provides protection against automated bots that can consume excess resources, skew business metrics, cause downtime, or perform malicious activities. Bot Control provides additional visibility through Amazon CloudWatch and generates labels that you can use to control bot traffic to your applications. Uses 50 WCU."
1540
1540
  ),
1541
- captchaImmunityTime: DurationSchema.refine(durationMin(minutes4(1)), "Minimum timeout duration is 1 minute").refine(durationMax(days3(3)), "Maximum timeout duration is 3 days").default("5 minutes").describe(
1541
+ captchaImmunityTime: DurationSchema.refine(durationMin(minutes3(1)), "Minimum timeout duration is 1 minute").refine(durationMax(days3(3)), "Maximum timeout duration is 3 days").default("5 minutes").describe(
1542
1542
  "The amount of time that a CAPTCHA timestamp is considered valid by AWS WAF. The default setting is 5 minutes."
1543
1543
  ),
1544
- challengeImmunityTime: DurationSchema.refine(durationMin(minutes4(1)), "Minimum timeout duration is 1 minute").refine(durationMax(days3(3)), "Maximum timeout duration is 3 days").default("5 minutes").describe(
1544
+ challengeImmunityTime: DurationSchema.refine(durationMin(minutes3(1)), "Minimum timeout duration is 1 minute").refine(durationMax(days3(3)), "Maximum timeout duration is 3 days").default("5 minutes").describe(
1545
1545
  "The amount of time that a challenge timestamp is considered valid by AWS WAF. The default setting is 5 minutes."
1546
1546
  )
1547
1547
  }).describe(
@@ -1636,7 +1636,7 @@ var RouterDefaultSchema = z23.record(
1636
1636
  ).optional().describe(`Define the global Router. Backed by AWS CloudFront.`);
1637
1637
 
1638
1638
  // src/feature/rpc/schema.ts
1639
- var TimeoutSchema2 = DurationSchema.refine(durationMin(seconds3(10)), "Minimum timeout duration is 10 seconds").refine(durationMax(minutes5(5)), "Maximum timeout duration is 5 minutes").describe(
1639
+ var TimeoutSchema2 = DurationSchema.refine(durationMin(seconds3(10)), "Minimum timeout duration is 10 seconds").refine(durationMax(minutes4(5)), "Maximum timeout duration is 5 minutes").describe(
1640
1640
  [
1641
1641
  "The amount of time that the RPC lambda is allowed run before stopping it.",
1642
1642
  "You can specify a timeout from 10 second to 5 minutes.",
@@ -2368,7 +2368,7 @@ var MetricsSchema = z40.record(
2368
2368
  ).optional().describe("Define the metrics in your stack.");
2369
2369
 
2370
2370
  // src/feature/table/schema.ts
2371
- import { minutes as minutes6, seconds as seconds4 } from "@awsless/duration";
2371
+ import { minutes as minutes5, seconds as seconds4 } from "@awsless/duration";
2372
2372
  import { z as z41 } from "zod";
2373
2373
  var KeySchema = z41.string().min(1).max(255);
2374
2374
  var TablesSchema = z41.record(
@@ -2413,7 +2413,7 @@ var TablesSchema = z41.record(
2413
2413
  batchWindow: DurationSchema.refine(
2414
2414
  durationMin(seconds4(1)),
2415
2415
  "Minimum batch window duration is 1 second"
2416
- ).refine(durationMax(minutes6(5)), "Maximum batch window duration is 5 minutes").optional().describe(
2416
+ ).refine(durationMax(minutes5(5)), "Maximum batch window duration is 5 minutes").optional().describe(
2417
2417
  [
2418
2418
  "The maximum amount of time that is spend gathering records before invoking the function.",
2419
2419
  "You can specify a duration from 1 seconds to 5 minutes."
@@ -4101,7 +4101,7 @@ var cronFeature = defineFeature({
4101
4101
  });
4102
4102
 
4103
4103
  // src/feature/domain/index.ts
4104
- import { minutes as minutes7, toSeconds as toSeconds2 } from "@awsless/duration";
4104
+ import { minutes as minutes6, toSeconds as toSeconds2 } from "@awsless/duration";
4105
4105
  import { Group as Group5 } from "@terraforge/core";
4106
4106
  import { aws as aws6 } from "@terraforge/aws";
4107
4107
  var domainFeature = defineFeature({
@@ -4143,7 +4143,7 @@ var domainFeature = defineFeature({
4143
4143
  zoneId: zone.id,
4144
4144
  name: option(certificate, 0).pipe((r) => r.resourceRecordName),
4145
4145
  type: option(certificate, 0).pipe((r) => r.resourceRecordType),
4146
- ttl: toSeconds2(minutes7(5)),
4146
+ ttl: toSeconds2(minutes6(5)),
4147
4147
  records: [option(certificate, 0).pipe((r) => r.resourceRecordValue)],
4148
4148
  allowOverwrite: true
4149
4149
  });
@@ -4151,7 +4151,7 @@ var domainFeature = defineFeature({
4151
4151
  zoneId: zone.id,
4152
4152
  name: option(certificate, 1).pipe((r) => r.resourceRecordName),
4153
4153
  type: option(certificate, 1).pipe((r) => r.resourceRecordType),
4154
- ttl: toSeconds2(minutes7(5)),
4154
+ ttl: toSeconds2(minutes6(5)),
4155
4155
  records: [option(certificate, 1).pipe((r) => r.resourceRecordValue)],
4156
4156
  allowOverwrite: true
4157
4157
  });
@@ -4186,7 +4186,7 @@ var domainFeature = defineFeature({
4186
4186
  zoneId: zone.id,
4187
4187
  name: option(globalCertificate, 0).pipe((r) => r.resourceRecordName),
4188
4188
  type: option(globalCertificate, 0).pipe((r) => r.resourceRecordType),
4189
- ttl: toSeconds2(minutes7(5)),
4189
+ ttl: toSeconds2(minutes6(5)),
4190
4190
  records: [option(globalCertificate, 0).pipe((r) => r.resourceRecordValue)],
4191
4191
  allowOverwrite: true
4192
4192
  });
@@ -4194,7 +4194,7 @@ var domainFeature = defineFeature({
4194
4194
  zoneId: zone.id,
4195
4195
  name: option(globalCertificate, 1).pipe((r) => r.resourceRecordName),
4196
4196
  type: option(globalCertificate, 1).pipe((r) => r.resourceRecordType),
4197
- ttl: toSeconds2(minutes7(5)),
4197
+ ttl: toSeconds2(minutes6(5)),
4198
4198
  records: [option(globalCertificate, 1).pipe((r) => r.resourceRecordValue)],
4199
4199
  allowOverwrite: true
4200
4200
  });
@@ -4220,7 +4220,7 @@ var domainFeature = defineFeature({
4220
4220
  zoneId: zone.id,
4221
4221
  name: `_amazonses.${props.domain}`,
4222
4222
  type: "TXT",
4223
- ttl: toSeconds2(minutes7(5)),
4223
+ ttl: toSeconds2(minutes6(5)),
4224
4224
  records: [identity.verificationToken]
4225
4225
  });
4226
4226
  const dkim = new aws6.ses.DomainDkim(group2, "dkim", {
@@ -4231,7 +4231,7 @@ var domainFeature = defineFeature({
4231
4231
  zoneId: zone.id,
4232
4232
  type: "CNAME",
4233
4233
  name: dkim.dkimTokens.pipe((t) => `${t.at(i)}._domainkey`),
4234
- ttl: toSeconds2(minutes7(5)),
4234
+ ttl: toSeconds2(minutes6(5)),
4235
4235
  records: [dkim.dkimTokens.pipe((t) => `${t.at(i)}.dkim.amazonses.com`)]
4236
4236
  });
4237
4237
  }
@@ -4244,21 +4244,21 @@ var domainFeature = defineFeature({
4244
4244
  zoneId: zone.id,
4245
4245
  name: mailFrom.mailFromDomain,
4246
4246
  type: "MX",
4247
- ttl: toSeconds2(minutes7(5)),
4247
+ ttl: toSeconds2(minutes6(5)),
4248
4248
  records: [`10 feedback-smtp.${ctx.appConfig.region}.amazonses.com`]
4249
4249
  });
4250
4250
  new aws6.route53.Record(group2, `SPF`, {
4251
4251
  zoneId: zone.id,
4252
4252
  name: mailFrom.mailFromDomain,
4253
4253
  type: "TXT",
4254
- ttl: toSeconds2(minutes7(5)),
4254
+ ttl: toSeconds2(minutes6(5)),
4255
4255
  records: ["v=spf1 include:amazonses.com -all"]
4256
4256
  });
4257
4257
  new aws6.route53.Record(group2, `DMARC`, {
4258
4258
  zoneId: zone.id,
4259
4259
  name: `_dmarc.${props.domain}`,
4260
4260
  type: "TXT",
4261
- ttl: toSeconds2(minutes7(5)),
4261
+ ttl: toSeconds2(minutes6(5)),
4262
4262
  records: ["v=DMARC1; p=none;"]
4263
4263
  });
4264
4264
  const verification = new aws6.ses.DomainIdentityVerification(
@@ -4533,6 +4533,7 @@ var formatFullDomainName = (config2, id, subDomain) => {
4533
4533
  };
4534
4534
 
4535
4535
  // src/feature/pubsub/index.ts
4536
+ import { minutes as minutes7, toSeconds as toSeconds4 } from "@awsless/duration";
4536
4537
  var pubsubFeature = defineFeature({
4537
4538
  name: "pubsub",
4538
4539
  onApp(ctx) {
@@ -4583,7 +4584,7 @@ var pubsubFeature = defineFeature({
4583
4584
  zoneId: ctx.shared.entry("domain", `zone-id`, props.domain),
4584
4585
  name: domainName,
4585
4586
  type: "CNAME",
4586
- ttl: minutes(5),
4587
+ ttl: toSeconds4(minutes7(5)),
4587
4588
  records: [endpoint.endpointAddress]
4588
4589
  });
4589
4590
  ctx.bind(`PUBSUB_${constantCase5(id)}_ENDPOINT`, domainName);
@@ -4625,7 +4626,7 @@ import { aws as aws11 } from "@terraforge/aws";
4625
4626
  import { camelCase as camelCase5, constantCase as constantCase6 } from "change-case";
4626
4627
  import deepmerge3 from "deepmerge";
4627
4628
  import { relative as relative5 } from "path";
4628
- import { seconds as seconds5, toSeconds as toSeconds4 } from "@awsless/duration";
4629
+ import { seconds as seconds5, toSeconds as toSeconds5 } from "@awsless/duration";
4629
4630
  import { toBytes } from "@awsless/size";
4630
4631
  var typeGenCode4 = `
4631
4632
  import { SendMessageOptions, SendMessageBatchOptions, BatchItem } from '@awsless/sqs'
@@ -4698,10 +4699,10 @@ var queueFeature = defineFeature({
4698
4699
  const onFailure = getGlobalOnFailure(ctx);
4699
4700
  const queue2 = new aws11.sqs.Queue(group, "queue", {
4700
4701
  name,
4701
- delaySeconds: toSeconds4(props.deliveryDelay),
4702
- visibilityTimeoutSeconds: toSeconds4(props.visibilityTimeout),
4703
- receiveWaitTimeSeconds: toSeconds4(props.receiveMessageWaitTime ?? seconds5(0)),
4704
- messageRetentionSeconds: toSeconds4(props.retentionPeriod),
4702
+ delaySeconds: toSeconds5(props.deliveryDelay),
4703
+ visibilityTimeoutSeconds: toSeconds5(props.visibilityTimeout),
4704
+ receiveWaitTimeSeconds: toSeconds5(props.receiveMessageWaitTime ?? seconds5(0)),
4705
+ messageRetentionSeconds: toSeconds5(props.retentionPeriod),
4705
4706
  maxMessageSize: toBytes(props.maxMessageSize),
4706
4707
  redrivePolicy: onFailure.pipe(
4707
4708
  (arn) => JSON.stringify({
@@ -4720,7 +4721,7 @@ var queueFeature = defineFeature({
4720
4721
  functionName: lambdaConsumer.lambda.functionName,
4721
4722
  eventSourceArn: queue2.arn,
4722
4723
  batchSize: props.batchSize,
4723
- maximumBatchingWindowInSeconds: props.maxBatchingWindow && toSeconds4(props.maxBatchingWindow),
4724
+ maximumBatchingWindowInSeconds: props.maxBatchingWindow && toSeconds5(props.maxBatchingWindow),
4724
4725
  scalingConfig: {
4725
4726
  maximumConcurrency: props.maxConcurrency
4726
4727
  }
@@ -4874,7 +4875,7 @@ import { dirname as dirname5, join as join10, relative as relative6 } from "path
4874
4875
  import { fileURLToPath } from "node:url";
4875
4876
 
4876
4877
  // src/feature/function/prebuild.ts
4877
- import { days as days6, seconds as seconds6, toDays as toDays5, toSeconds as toSeconds5 } from "@awsless/duration";
4878
+ import { days as days6, seconds as seconds6, toDays as toDays5, toSeconds as toSeconds6 } from "@awsless/duration";
4878
4879
  import { mebibytes as mebibytes2, toMebibytes as toMebibytes3 } from "@awsless/size";
4879
4880
  import { aws as aws13 } from "@terraforge/aws";
4880
4881
  import { Output as Output4, findInputDeps as findInputDeps2, resolveInputs as resolveInputs2 } from "@terraforge/core";
@@ -4971,7 +4972,7 @@ var createPrebuildLambdaFunction = (group, ctx, ns, id, props) => {
4971
4972
  // runtime: props.runtime === 'container' ? undefined : props.runtime,
4972
4973
  runtime: props.runtime,
4973
4974
  handler: props.handler,
4974
- timeout: toSeconds5(props.timeout ?? seconds6(10)),
4975
+ timeout: toSeconds6(props.timeout ?? seconds6(10)),
4975
4976
  memorySize: toMebibytes3(props.memorySize ?? mebibytes2(128)),
4976
4977
  architectures: [props.architecture ?? "arm64"],
4977
4978
  layers: props.layers?.map((id2) => ctx.shared.entry("layer", "arn", id2)),
@@ -5061,7 +5062,7 @@ var createPrebuildLambdaFunction = (group, ctx, ns, id, props) => {
5061
5062
  };
5062
5063
 
5063
5064
  // src/feature/rpc/index.ts
5064
- import { toSeconds as toSeconds6 } from "@awsless/duration";
5065
+ import { toSeconds as toSeconds7 } from "@awsless/duration";
5065
5066
  var __dirname = dirname5(fileURLToPath(import.meta.url));
5066
5067
  var rpcFeature = defineFeature({
5067
5068
  name: "rpc",
@@ -5106,8 +5107,8 @@ var rpcFeature = defineFeature({
5106
5107
  } else {
5107
5108
  list3.add(name);
5108
5109
  }
5109
- const timeout = toSeconds6(props.function.timeout ?? ctx.appConfig.defaults.function.timeout);
5110
- const maxTimeout = toSeconds6(ctx.appConfig.defaults.rpc[id].timeout) * 0.8;
5110
+ const timeout = toSeconds7(props.function.timeout ?? ctx.appConfig.defaults.function.timeout);
5111
+ const maxTimeout = toSeconds7(ctx.appConfig.defaults.rpc[id].timeout) * 0.8;
5111
5112
  if (timeout > maxTimeout) {
5112
5113
  throw new FileError(
5113
5114
  stack.file,
@@ -5131,7 +5132,7 @@ var rpcFeature = defineFeature({
5131
5132
  warm: 3,
5132
5133
  log: props.log
5133
5134
  });
5134
- result.setEnvironment("TIMEOUT", toSeconds6(props.timeout).toString());
5135
+ result.setEnvironment("TIMEOUT", toSeconds7(props.timeout).toString());
5135
5136
  const schemaTable = new aws14.dynamodb.Table(group, "schema", {
5136
5137
  name: formatGlobalResourceName({
5137
5138
  appName: ctx.app.name,
@@ -5807,7 +5808,7 @@ var storeFeature = defineFeature({
5807
5808
  import { Group as Group17 } from "@terraforge/core";
5808
5809
  import { aws as aws18 } from "@terraforge/aws";
5809
5810
  import { constantCase as constantCase11 } from "change-case";
5810
- import { toSeconds as toSeconds7 } from "@awsless/duration";
5811
+ import { toSeconds as toSeconds8 } from "@awsless/duration";
5811
5812
  var tableFeature = defineFeature({
5812
5813
  name: "table",
5813
5814
  async onTypeGen(ctx) {
@@ -5939,7 +5940,7 @@ var tableFeature = defineFeature({
5939
5940
  // maximumRecordAgeInSeconds: props.stream.
5940
5941
  // bisectBatchOnFunctionError: true,
5941
5942
  batchSize: props.stream.batchSize,
5942
- maximumBatchingWindowInSeconds: props.stream.batchWindow ? toSeconds7(props.stream.batchWindow) : void 0,
5943
+ maximumBatchingWindowInSeconds: props.stream.batchWindow ? toSeconds8(props.stream.batchWindow) : void 0,
5943
5944
  maximumRetryAttempts: props.stream.retryAttempts,
5944
5945
  parallelizationFactor: props.stream.concurrencyPerShard,
5945
5946
  functionResponseTypes: ["ReportBatchItemFailures"],
@@ -6841,7 +6842,7 @@ import { Group as Group26 } from "@terraforge/core";
6841
6842
  import { aws as aws27 } from "@terraforge/aws";
6842
6843
 
6843
6844
  // src/feature/instance/util.ts
6844
- import { toDays as toDays8, toSeconds as toSeconds8 } from "@awsless/duration";
6845
+ import { toDays as toDays8, toSeconds as toSeconds9 } from "@awsless/duration";
6845
6846
  import { toMebibytes as toMebibytes4 } from "@awsless/size";
6846
6847
  import { generateFileHash as generateFileHash2 } from "@awsless/ts-file-cache";
6847
6848
  import { aws as aws26 } from "@terraforge/aws";
@@ -7101,10 +7102,10 @@ var createFargateTask = (parentGroup, ctx, ns, id, local) => {
7101
7102
  "CMD-SHELL",
7102
7103
  `curl -f http://${join16("localhost", props.healthCheck.path)} || exit 1`
7103
7104
  ],
7104
- interval: toSeconds8(props.healthCheck.interval),
7105
+ interval: toSeconds9(props.healthCheck.interval),
7105
7106
  retries: props.healthCheck.retries,
7106
- startPeriod: toSeconds8(props.healthCheck.startPeriod),
7107
- timeout: toSeconds8(props.healthCheck.timeout)
7107
+ startPeriod: toSeconds9(props.healthCheck.startPeriod),
7108
+ timeout: toSeconds9(props.healthCheck.timeout)
7108
7109
  } : void 0
7109
7110
  }
7110
7111
  ])
@@ -7248,7 +7249,7 @@ var instanceFeature = defineFeature({
7248
7249
  import { Group as Group27 } from "@terraforge/core";
7249
7250
  import { aws as aws28 } from "@terraforge/aws";
7250
7251
  import { kebabCase as kebabCase8, constantCase as constantCase13 } from "change-case";
7251
- import { toSeconds as toSeconds9 } from "@awsless/duration";
7252
+ import { toSeconds as toSeconds10 } from "@awsless/duration";
7252
7253
  var typeGenCode10 = `
7253
7254
  import { type PutDataProps, putData, batchPutData } from '@awsless/cloudwatch'
7254
7255
  import { type Duration } from '@awsless/duration'
@@ -7356,7 +7357,7 @@ var metricFeature = defineFeature({
7356
7357
  alarmDescription: alarmProps.description,
7357
7358
  statistic: alarmProps.where.stat,
7358
7359
  threshold: alarmProps.where.value,
7359
- period: toSeconds9(alarmProps.period),
7360
+ period: toSeconds10(alarmProps.period),
7360
7361
  evaluationPeriods: alarmProps.minDataPoints,
7361
7362
  comparisonOperator: alarmProps.where.op,
7362
7363
  alarmActions: [alarmAction]
@@ -7375,7 +7376,7 @@ var metricFeature = defineFeature({
7375
7376
  });
7376
7377
 
7377
7378
  // src/feature/router/index.ts
7378
- import { days as days7, seconds as seconds9, toSeconds as toSeconds10, years } from "@awsless/duration";
7379
+ import { days as days7, seconds as seconds9, toSeconds as toSeconds11, years } from "@awsless/duration";
7379
7380
  import { Future, Group as Group28 } from "@terraforge/core";
7380
7381
  import { aws as aws29 } from "@terraforge/aws";
7381
7382
  import { camelCase as camelCase8, constantCase as constantCase14 } from "change-case";
@@ -7625,9 +7626,9 @@ var routerFeature = defineFeature({
7625
7626
  });
7626
7627
  const cache = new aws29.cloudfront.CachePolicy(group, "cache", {
7627
7628
  name,
7628
- minTtl: toSeconds10(seconds9(0)),
7629
- maxTtl: toSeconds10(days7(365)),
7630
- defaultTtl: toSeconds10(days7(0)),
7629
+ minTtl: toSeconds11(seconds9(0)),
7630
+ maxTtl: toSeconds11(days7(365)),
7631
+ defaultTtl: toSeconds11(days7(0)),
7631
7632
  parametersInCacheKeyAndForwardedToOrigin: {
7632
7633
  enableAcceptEncodingBrotli: true,
7633
7634
  enableAcceptEncodingGzip: true,
@@ -7677,7 +7678,7 @@ var routerFeature = defineFeature({
7677
7678
  name,
7678
7679
  corsConfig: {
7679
7680
  originOverride: props.cors?.override ?? true,
7680
- accessControlMaxAgeSec: toSeconds10(props.cors?.maxAge ?? years(1)),
7681
+ accessControlMaxAgeSec: toSeconds11(props.cors?.maxAge ?? years(1)),
7681
7682
  accessControlAllowHeaders: { items: props.cors?.headers ?? ["*"] },
7682
7683
  accessControlAllowMethods: { items: props.cors?.methods ?? ["ALL"] },
7683
7684
  accessControlAllowOrigins: { items: props.cors?.origins ?? ["*"] },
@@ -7702,7 +7703,7 @@ var routerFeature = defineFeature({
7702
7703
  strictTransportSecurity: {
7703
7704
  override: true,
7704
7705
  preload: true,
7705
- accessControlMaxAgeSec: toSeconds10(years(1)),
7706
+ accessControlMaxAgeSec: toSeconds11(years(1)),
7706
7707
  includeSubdomains: true
7707
7708
  },
7708
7709
  xssProtection: {
@@ -7733,7 +7734,7 @@ var routerFeature = defineFeature({
7733
7734
  rateBasedStatement: {
7734
7735
  limit: wafSettingsConfig.rateLimiter.limit,
7735
7736
  aggregateKeyType: "IP",
7736
- evaluationWindowSec: toSeconds10(wafSettingsConfig.rateLimiter.window)
7737
+ evaluationWindowSec: toSeconds11(wafSettingsConfig.rateLimiter.window)
7737
7738
  }
7738
7739
  },
7739
7740
  action: {
@@ -7823,12 +7824,12 @@ var routerFeature = defineFeature({
7823
7824
  rule: wafRules,
7824
7825
  captchaConfig: {
7825
7826
  immunityTimeProperty: {
7826
- immunityTime: toSeconds10(wafSettingsConfig.captchaImmunityTime)
7827
+ immunityTime: toSeconds11(wafSettingsConfig.captchaImmunityTime)
7827
7828
  }
7828
7829
  },
7829
7830
  challengeConfig: {
7830
7831
  immunityTimeProperty: {
7831
- immunityTime: toSeconds10(wafSettingsConfig.challengeImmunityTime)
7832
+ immunityTime: toSeconds11(wafSettingsConfig.challengeImmunityTime)
7832
7833
  }
7833
7834
  },
7834
7835
  visibilityConfig: {
@@ -7884,7 +7885,7 @@ var routerFeature = defineFeature({
7884
7885
  }
7885
7886
  return {
7886
7887
  errorCode: Number(errorCode),
7887
- errorCachingMinTtl: item.minTTL ? toSeconds10(item.minTTL) : void 0,
7888
+ errorCachingMinTtl: item.minTTL ? toSeconds11(item.minTTL) : void 0,
7888
7889
  responseCode: item.statusCode?.toString() ?? errorCode,
7889
7890
  responsePagePath: item.path
7890
7891
  };
Binary file
Binary file
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@awsless/awsless",
3
- "version": "0.0.645",
3
+ "version": "0.0.646",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -35,21 +35,21 @@
35
35
  "peerDependencies": {
36
36
  "@awsless/big-float": "^0.1.5",
37
37
  "@awsless/cloudwatch": "^0.0.1",
38
- "@awsless/clui": "^0.0.8",
39
- "@awsless/duration": "^0.0.4",
40
38
  "@awsless/dynamodb": "^0.3.18",
41
39
  "@awsless/json": "^0.0.11",
42
- "@awsless/mqtt": "^0.0.2",
40
+ "@awsless/duration": "^0.0.4",
43
41
  "@awsless/lambda": "^0.0.37",
42
+ "@awsless/clui": "^0.0.8",
43
+ "@awsless/mqtt": "^0.0.2",
44
44
  "@awsless/redis": "^0.0.14",
45
- "@awsless/open-search": "^0.0.21",
46
- "@awsless/validate": "^0.1.5",
47
45
  "@awsless/s3": "^0.0.21",
48
46
  "@awsless/ssm": "^0.0.7",
49
- "@awsless/weak-cache": "^0.0.1",
50
- "@awsless/iot": "^0.0.3",
51
47
  "@awsless/sqs": "^0.0.16",
52
- "@awsless/sns": "^0.0.10"
48
+ "@awsless/open-search": "^0.0.21",
49
+ "@awsless/validate": "^0.1.5",
50
+ "@awsless/weak-cache": "^0.0.1",
51
+ "@awsless/sns": "^0.0.10",
52
+ "@awsless/iot": "^0.0.3"
53
53
  },
54
54
  "dependencies": {
55
55
  "@aws-sdk/client-cloudformation": "^3.369.0",
@@ -114,13 +114,13 @@
114
114
  "zod": "^3.24.2",
115
115
  "zod-to-json-schema": "^3.24.3",
116
116
  "@awsless/big-float": "^0.1.5",
117
- "@awsless/duration": "^0.0.4",
118
- "@awsless/json": "^0.0.11",
117
+ "@awsless/cloudwatch": "^0.0.1",
118
+ "@awsless/clui": "^0.0.8",
119
119
  "@awsless/scheduler": "^0.0.4",
120
+ "@awsless/duration": "^0.0.4",
120
121
  "@awsless/size": "^0.0.2",
121
122
  "@awsless/validate": "^0.1.5",
122
- "@awsless/cloudwatch": "^0.0.1",
123
- "@awsless/clui": "^0.0.8",
123
+ "@awsless/json": "^0.0.11",
124
124
  "@awsless/ts-file-cache": "^0.0.12"
125
125
  },
126
126
  "devDependencies": {