@awsless/awsless 0.0.513 → 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.");
|
|
@@ -6170,6 +6178,12 @@ var imageFeature = defineFeature({
|
|
|
6170
6178
|
aliases: domainName ? [domainName] : void 0,
|
|
6171
6179
|
priceClass: "PriceClass_All",
|
|
6172
6180
|
httpVersion: "http2and3",
|
|
6181
|
+
restrictions: {
|
|
6182
|
+
geoRestriction: {
|
|
6183
|
+
restrictionType: "none",
|
|
6184
|
+
locations: []
|
|
6185
|
+
}
|
|
6186
|
+
},
|
|
6173
6187
|
viewerCertificate: certificateArn ? {
|
|
6174
6188
|
sslSupportMethod: "sni-only",
|
|
6175
6189
|
minimumProtocolVersion: "TLSv1.2_2021",
|
|
@@ -6312,17 +6326,13 @@ var iconFeature = defineFeature({
|
|
|
6312
6326
|
resourceType: "icon",
|
|
6313
6327
|
resourceName: shortId(`cache-${id}-${ctx.appId}`)
|
|
6314
6328
|
}),
|
|
6315
|
-
tags: {
|
|
6316
|
-
cache: "true"
|
|
6317
|
-
},
|
|
6318
6329
|
forceDestroy: true
|
|
6319
6330
|
});
|
|
6320
6331
|
const serverLambda = createPrebuildLambdaFunction(group, ctx, "icon", id, {
|
|
6321
6332
|
bundleFile: join13(__dirname3, "/prebuild/icon/bundle.zip"),
|
|
6322
6333
|
bundleHash: join13(__dirname3, "/prebuild/icon/HASH"),
|
|
6323
|
-
memorySize: mebibytes5(
|
|
6324
|
-
timeout: seconds10(
|
|
6325
|
-
architecture: "x86_64",
|
|
6334
|
+
memorySize: mebibytes5(512),
|
|
6335
|
+
timeout: seconds10(10),
|
|
6326
6336
|
handler: "index.default",
|
|
6327
6337
|
runtime: "nodejs22.x",
|
|
6328
6338
|
log: props.log
|
|
@@ -6413,12 +6423,30 @@ var iconFeature = defineFeature({
|
|
|
6413
6423
|
name,
|
|
6414
6424
|
defaultTtl: toSeconds9(days7(365))
|
|
6415
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
|
+
});
|
|
6416
6438
|
const distribution = new $23.aws.cloudfront.Distribution(group, "distribution", {
|
|
6417
6439
|
comment: name,
|
|
6418
6440
|
enabled: true,
|
|
6419
6441
|
aliases: domainName ? [domainName] : void 0,
|
|
6420
6442
|
priceClass: "PriceClass_All",
|
|
6421
6443
|
httpVersion: "http2and3",
|
|
6444
|
+
restrictions: {
|
|
6445
|
+
geoRestriction: {
|
|
6446
|
+
restrictionType: "none",
|
|
6447
|
+
locations: []
|
|
6448
|
+
}
|
|
6449
|
+
},
|
|
6422
6450
|
viewerCertificate: certificateArn ? {
|
|
6423
6451
|
sslSupportMethod: "sni-only",
|
|
6424
6452
|
minimumProtocolVersion: "TLSv1.2_2021",
|
|
@@ -6463,7 +6491,8 @@ var iconFeature = defineFeature({
|
|
|
6463
6491
|
cachePolicyId: cache.id,
|
|
6464
6492
|
viewerProtocolPolicy: "redirect-to-https",
|
|
6465
6493
|
allowedMethods: ["GET", "HEAD"],
|
|
6466
|
-
cachedMethods: ["GET", "HEAD"]
|
|
6494
|
+
cachedMethods: ["GET", "HEAD"],
|
|
6495
|
+
responseHeadersPolicyId: responseHeaders.id
|
|
6467
6496
|
}
|
|
6468
6497
|
});
|
|
6469
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
|