@awsless/awsless 0.0.515 → 0.0.516
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
|
@@ -1688,7 +1688,15 @@ var IconsSchema = z34.record(
|
|
|
1688
1688
|
})
|
|
1689
1689
|
]).describe(
|
|
1690
1690
|
"Image transformation will be applied from a base image. Base images orginates from a local directory that will be uploaded to S3 or from a lambda function."
|
|
1691
|
-
)
|
|
1691
|
+
),
|
|
1692
|
+
cors: z34.object({
|
|
1693
|
+
override: z34.boolean().default(false),
|
|
1694
|
+
maxAge: DurationSchema.default("365 days"),
|
|
1695
|
+
exposeHeaders: z34.string().array().optional(),
|
|
1696
|
+
credentials: z34.boolean().default(false),
|
|
1697
|
+
headers: z34.string().array().default(["*"]),
|
|
1698
|
+
origins: z34.string().array().default(["*"])
|
|
1699
|
+
}).optional().describe("Specify the cors headers.")
|
|
1692
1700
|
// version: z.number().int().min(1).optional().describe('Version of the icon configuration.'),
|
|
1693
1701
|
})
|
|
1694
1702
|
).optional().describe("Define an icon proxy in your stack. Store, optimize, and deliver icons at scale.");
|
|
@@ -6323,9 +6331,8 @@ var iconFeature = defineFeature({
|
|
|
6323
6331
|
const serverLambda = createPrebuildLambdaFunction(group, ctx, "icon", id, {
|
|
6324
6332
|
bundleFile: join13(__dirname3, "/prebuild/icon/bundle.zip"),
|
|
6325
6333
|
bundleHash: join13(__dirname3, "/prebuild/icon/HASH"),
|
|
6326
|
-
memorySize: mebibytes5(
|
|
6327
|
-
timeout: seconds10(
|
|
6328
|
-
architecture: "x86_64",
|
|
6334
|
+
memorySize: mebibytes5(512),
|
|
6335
|
+
timeout: seconds10(10),
|
|
6329
6336
|
handler: "index.default",
|
|
6330
6337
|
runtime: "nodejs22.x",
|
|
6331
6338
|
log: props.log
|
|
@@ -6416,6 +6423,18 @@ var iconFeature = defineFeature({
|
|
|
6416
6423
|
name,
|
|
6417
6424
|
defaultTtl: toSeconds9(days7(365))
|
|
6418
6425
|
});
|
|
6426
|
+
const responseHeaders = new $23.aws.cloudfront.ResponseHeadersPolicy(group, "response", {
|
|
6427
|
+
name,
|
|
6428
|
+
corsConfig: {
|
|
6429
|
+
originOverride: props.cors?.override ?? false,
|
|
6430
|
+
accessControlMaxAgeSec: toSeconds9(props.cors?.maxAge ?? days7(365)),
|
|
6431
|
+
accessControlAllowHeaders: { items: props.cors?.headers ?? ["*"] },
|
|
6432
|
+
accessControlAllowMethods: { items: ["GET", "HEAD"] },
|
|
6433
|
+
accessControlAllowOrigins: { items: props.cors?.origins ?? ["*"] },
|
|
6434
|
+
accessControlExposeHeaders: { items: props.cors?.exposeHeaders ?? ["*"] },
|
|
6435
|
+
accessControlAllowCredentials: props.cors?.credentials ?? false
|
|
6436
|
+
}
|
|
6437
|
+
});
|
|
6419
6438
|
const distribution = new $23.aws.cloudfront.Distribution(group, "distribution", {
|
|
6420
6439
|
comment: name,
|
|
6421
6440
|
enabled: true,
|
|
@@ -6472,7 +6491,8 @@ var iconFeature = defineFeature({
|
|
|
6472
6491
|
cachePolicyId: cache.id,
|
|
6473
6492
|
viewerProtocolPolicy: "redirect-to-https",
|
|
6474
6493
|
allowedMethods: ["GET", "HEAD"],
|
|
6475
|
-
cachedMethods: ["GET", "HEAD"]
|
|
6494
|
+
cachedMethods: ["GET", "HEAD"],
|
|
6495
|
+
responseHeadersPolicyId: responseHeaders.id
|
|
6476
6496
|
}
|
|
6477
6497
|
});
|
|
6478
6498
|
new $23.aws.s3.BucketPolicy(
|
|
@@ -1090,7 +1090,15 @@ var IconsSchema = z31.record(
|
|
|
1090
1090
|
})
|
|
1091
1091
|
]).describe(
|
|
1092
1092
|
"Image transformation will be applied from a base image. Base images orginates from a local directory that will be uploaded to S3 or from a lambda function."
|
|
1093
|
-
)
|
|
1093
|
+
),
|
|
1094
|
+
cors: z31.object({
|
|
1095
|
+
override: z31.boolean().default(false),
|
|
1096
|
+
maxAge: DurationSchema.default("365 days"),
|
|
1097
|
+
exposeHeaders: z31.string().array().optional(),
|
|
1098
|
+
credentials: z31.boolean().default(false),
|
|
1099
|
+
headers: z31.string().array().default(["*"]),
|
|
1100
|
+
origins: z31.string().array().default(["*"])
|
|
1101
|
+
}).optional().describe("Specify the cors headers.")
|
|
1094
1102
|
// version: z.number().int().min(1).optional().describe('Version of the icon configuration.'),
|
|
1095
1103
|
})
|
|
1096
1104
|
).optional().describe("Define an icon proxy in your stack. Store, optimize, and deliver icons at scale.");
|
|
Binary file
|
|
Binary file
|
|
Binary file
|