@awsless/awsless 0.0.463 → 0.0.465

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
@@ -634,7 +634,7 @@ var LogRetentionSchema = DurationSchema.refine(
634
634
  (duration) => {
635
635
  return validLogRetentionDays.includes(toDays(duration));
636
636
  },
637
- `Invalid log retention. Valid days are: ${validLogRetentionDays.map((days7) => `${days7}`).join(", ")}`
637
+ `Invalid log retention. Valid days are: ${validLogRetentionDays.map((days6) => `${days6}`).join(", ")}`
638
638
  ).describe("The log retention duration.");
639
639
  var LogSchema = z9.union([
640
640
  z9.boolean().transform((enabled) => ({ retention: enabled ? days(7) : days(0) })),
@@ -1409,16 +1409,20 @@ var TablesSchema = z28.record(
1409
1409
  indexes: z28.record(
1410
1410
  z28.string(),
1411
1411
  z28.object({
1412
- /** Specifies the name of the partition / hash key that makes up the primary key for the global secondary index. */
1413
- hash: KeySchema,
1414
- /** Specifies the name of the range / sort key that makes up the primary key for the global secondary index. */
1415
- sort: KeySchema.optional(),
1416
- /** The set of attributes that are projected into the index:
1417
- * - all - All of the table attributes are projected into the index.
1418
- * - keys-only - Only the index and primary keys are projected into the index.
1419
- * @default 'all'
1420
- */
1421
- projection: z28.enum(["all", "keys-only"]).default("all")
1412
+ hash: KeySchema.describe(
1413
+ "Specifies the name of the partition / hash key that makes up the primary key for the global secondary index."
1414
+ ),
1415
+ sort: KeySchema.optional().describe(
1416
+ "Specifies the name of the range / sort key that makes up the primary key for the global secondary index."
1417
+ ),
1418
+ projection: z28.enum(["all", "keys-only"]).default("all").describe(
1419
+ [
1420
+ "The set of attributes that are projected into the index:",
1421
+ "- all - All of the table attributes are projected into the index.",
1422
+ "- keys-only - Only the index and primary keys are projected into the index.",
1423
+ '@default "all"'
1424
+ ].join("\n")
1425
+ )
1422
1426
  })
1423
1427
  ).optional().describe("Specifies the global secondary indexes to be created on the table.")
1424
1428
  })
@@ -2720,8 +2724,8 @@ var createLambdaFunction = (group, ctx, ns, id, local) => {
2720
2724
  loggingConfig: {
2721
2725
  logGroup: `/aws/lambda/${name}`,
2722
2726
  logFormat: logFormats[props.log.format],
2723
- applicationLogLevel: props.log.level?.toUpperCase(),
2724
- systemLogLevel: props.log.system?.toUpperCase()
2727
+ applicationLogLevel: props.log.format === "json" ? props.log.level?.toUpperCase() : void 0,
2728
+ systemLogLevel: props.log.format === "json" ? props.log.system?.toUpperCase() : void 0
2725
2729
  }
2726
2730
  },
2727
2731
  {
@@ -3287,7 +3291,8 @@ var pubsubFeature = defineFeature({
3287
3291
  name,
3288
3292
  authorizerFunctionArn: lambda.arn,
3289
3293
  status: "ACTIVE",
3290
- signingDisabled: true
3294
+ signingDisabled: true,
3295
+ enableCachingForHttp: false
3291
3296
  });
3292
3297
  new $9.aws.lambda.Permission(group, "permission", {
3293
3298
  functionName: lambda.functionName,
@@ -3593,7 +3598,7 @@ import { dirname as dirname6, join as join10, relative as relative5 } from "path
3593
3598
  import { fileURLToPath } from "node:url";
3594
3599
 
3595
3600
  // src/feature/function/prebuild.ts
3596
- import { days as days4, seconds as seconds4, toDays as toDays4, toSeconds as toSeconds4 } from "@awsless/duration";
3601
+ import { days as days3, seconds as seconds4, toDays as toDays4, toSeconds as toSeconds4 } from "@awsless/duration";
3597
3602
  import { $ as $12, Future as Future2, resolveInputs as resolveInputs2 } from "@awsless/formation";
3598
3603
  import { mebibytes as mebibytes2, toMebibytes as toMebibytes2 } from "@awsless/size";
3599
3604
  import { pascalCase as pascalCase2 } from "change-case";
@@ -3716,7 +3721,7 @@ var createPrebuildLambdaFunction = (group, ctx, ns, id, props) => {
3716
3721
  if (props.log?.retention && props.log?.retention?.value > 0n) {
3717
3722
  const logGroup = new $12.aws.cloudwatch.LogGroup(group, "log", {
3718
3723
  name: lambda.functionName.pipe((name2) => `/aws/lambda/${name2}`),
3719
- retentionInDays: toDays4(props.log.retention ?? days4(7))
3724
+ retentionInDays: toDays4(props.log.retention ?? days3(7))
3720
3725
  });
3721
3726
  addPermission(
3722
3727
  {
@@ -3767,7 +3772,7 @@ var createPrebuildLambdaFunction = (group, ctx, ns, id, props) => {
3767
3772
  };
3768
3773
 
3769
3774
  // src/feature/rpc/index.ts
3770
- import { days as days5, seconds as seconds5, toSeconds as toSeconds5 } from "@awsless/duration";
3775
+ import { days as days4, seconds as seconds5, toSeconds as toSeconds5 } from "@awsless/duration";
3771
3776
  var __dirname = dirname6(fileURLToPath(import.meta.url));
3772
3777
  var rpcFeature = defineFeature({
3773
3778
  name: "rpc",
@@ -3891,8 +3896,8 @@ var rpcFeature = defineFeature({
3891
3896
  const cache = new $13.aws.cloudfront.CachePolicy(group, "cache", {
3892
3897
  name,
3893
3898
  minTtl: toSeconds5(seconds5(1)),
3894
- maxTtl: toSeconds5(days5(365)),
3895
- defaultTtl: toSeconds5(days5(1))
3899
+ maxTtl: toSeconds5(days4(365)),
3900
+ defaultTtl: toSeconds5(days4(1))
3896
3901
  });
3897
3902
  const originRequest = new $13.aws.cloudfront.OriginRequestPolicy(group, "request", {
3898
3903
  name,
@@ -4102,7 +4107,7 @@ var searchFeature = defineFeature({
4102
4107
  });
4103
4108
 
4104
4109
  // src/feature/site/index.ts
4105
- import { days as days6, seconds as seconds6, toSeconds as toSeconds6 } from "@awsless/duration";
4110
+ import { days as days5, seconds as seconds6, toSeconds as toSeconds6 } from "@awsless/duration";
4106
4111
  import { $ as $15, Group as Group15 } from "@awsless/formation";
4107
4112
  import { glob as glob2 } from "glob";
4108
4113
  import { join as join11 } from "path";
@@ -4278,8 +4283,8 @@ var siteFeature = defineFeature({
4278
4283
  const cache = new $15.aws.cloudfront.CachePolicy(group, "cache", {
4279
4284
  name,
4280
4285
  minTtl: toSeconds6(seconds6(1)),
4281
- maxTtl: toSeconds6(days6(365)),
4282
- defaultTtl: toSeconds6(days6(1)),
4286
+ maxTtl: toSeconds6(days5(365)),
4287
+ defaultTtl: toSeconds6(days5(1)),
4283
4288
  parametersInCacheKeyAndForwardedToOrigin: {
4284
4289
  cookiesConfig: {
4285
4290
  cookieBehavior: props.cache?.cookies ? "whitelist" : "none",
@@ -4320,7 +4325,7 @@ var siteFeature = defineFeature({
4320
4325
  name,
4321
4326
  corsConfig: {
4322
4327
  originOverride: props.cors?.override ?? false,
4323
- accessControlMaxAgeSec: toSeconds6(props.cors?.maxAge ?? days6(365)),
4328
+ accessControlMaxAgeSec: toSeconds6(props.cors?.maxAge ?? days5(365)),
4324
4329
  accessControlAllowHeaders: { items: props.cors?.headers ?? ["*"] },
4325
4330
  accessControlAllowMethods: { items: props.cors?.methods ?? ["ALL"] },
4326
4331
  accessControlAllowOrigins: { items: props.cors?.origins ?? ["*"] },
@@ -4345,7 +4350,7 @@ var siteFeature = defineFeature({
4345
4350
  strictTransportSecurity: {
4346
4351
  override: false,
4347
4352
  preload: true,
4348
- accessControlMaxAgeSec: toSeconds6(days6(365)),
4353
+ accessControlMaxAgeSec: toSeconds6(days5(365)),
4349
4354
  includeSubdomains: true
4350
4355
  },
4351
4356
  xssProtection: {
@@ -996,16 +996,20 @@ var TablesSchema = z28.record(
996
996
  indexes: z28.record(
997
997
  z28.string(),
998
998
  z28.object({
999
- /** Specifies the name of the partition / hash key that makes up the primary key for the global secondary index. */
1000
- hash: KeySchema,
1001
- /** Specifies the name of the range / sort key that makes up the primary key for the global secondary index. */
1002
- sort: KeySchema.optional(),
1003
- /** The set of attributes that are projected into the index:
1004
- * - all - All of the table attributes are projected into the index.
1005
- * - keys-only - Only the index and primary keys are projected into the index.
1006
- * @default 'all'
1007
- */
1008
- projection: z28.enum(["all", "keys-only"]).default("all")
999
+ hash: KeySchema.describe(
1000
+ "Specifies the name of the partition / hash key that makes up the primary key for the global secondary index."
1001
+ ),
1002
+ sort: KeySchema.optional().describe(
1003
+ "Specifies the name of the range / sort key that makes up the primary key for the global secondary index."
1004
+ ),
1005
+ projection: z28.enum(["all", "keys-only"]).default("all").describe(
1006
+ [
1007
+ "The set of attributes that are projected into the index:",
1008
+ "- all - All of the table attributes are projected into the index.",
1009
+ "- keys-only - Only the index and primary keys are projected into the index.",
1010
+ '@default "all"'
1011
+ ].join("\n")
1012
+ )
1009
1013
  })
1010
1014
  ).optional().describe("Specifies the global secondary indexes to be created on the table.")
1011
1015
  })
@@ -1 +1 @@
1
- 10e2b69d2315f12a13babfd6ae9dd7aaf76b3b24
1
+ 1b67cb66296cd56b7cc9cbddf3e7859cc9d3fad9
Binary file
package/dist/server.js CHANGED
@@ -343,6 +343,11 @@ var Cache = /* @__PURE__ */ createProxy((stack) => {
343
343
  port,
344
344
  db: 0,
345
345
  cluster: true,
346
+ tls: {
347
+ checkServerIdentity: () => {
348
+ return void 0;
349
+ }
350
+ },
346
351
  ...options
347
352
  },
348
353
  callback