@aws/nx-plugin 0.118.0 → 0.120.0
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/package.json +1 -1
- package/src/infra/app/generator.js +30 -18
- package/src/infra/app/generator.js.map +1 -1
- package/src/mcp-server/tools/create-workspace-command.js +5 -0
- package/src/mcp-server/tools/create-workspace-command.js.map +1 -1
- package/src/mcp-server/tools/general-guidance.js +3 -3
- package/src/mcp-server/tools/general-guidance.js.map +1 -1
- package/src/preset/__snapshots__/generator.spec.ts.snap +5 -1
- package/src/preset/generator.d.ts +1 -1
- package/src/preset/generator.js +30 -3
- package/src/preset/generator.js.map +1 -1
- package/src/preset/git-secrets-files/git-secrets-dir/git-secrets +206 -0
- package/src/preset/git-secrets-files/husky-dir/pre-commit +4 -0
- package/src/preset/schema.d.ts +5 -0
- package/src/preset/schema.json +13 -0
- package/src/py/agent/__snapshots__/generator.spec.ts.snap +2 -2
- package/src/py/agent/generator.js +8 -2
- package/src/py/agent/generator.js.map +1 -1
- package/src/py/agent/schema.json +1 -1
- package/src/py/fast-api/__snapshots__/generator.spec.ts.snap +197 -12
- package/src/py/fast-api/generator.js +9 -0
- package/src/py/fast-api/generator.js.map +1 -1
- package/src/py/fast-api/schema.d.ts +1 -1
- package/src/py/fast-api/schema.json +2 -2
- package/src/py/mcp-server/__snapshots__/generator.spec.ts.snap +2 -2
- package/src/py/mcp-server/generator.js +7 -1
- package/src/py/mcp-server/generator.js.map +1 -1
- package/src/py/mcp-server/schema.json +1 -1
- package/src/smithy/project/generator.js +3 -1
- package/src/smithy/project/generator.js.map +1 -1
- package/src/smithy/ts/api/__snapshots__/generator.spec.ts.snap +195 -11
- package/src/smithy/ts/api/generator.js +18 -0
- package/src/smithy/ts/api/generator.js.map +1 -1
- package/src/smithy/ts/api/schema.d.ts +1 -1
- package/src/smithy/ts/api/schema.json +2 -2
- package/src/trpc/backend/__snapshots__/generator.spec.ts.snap +258 -25
- package/src/trpc/backend/generator.js +19 -0
- package/src/trpc/backend/generator.js.map +1 -1
- package/src/trpc/backend/schema.d.ts +1 -1
- package/src/trpc/backend/schema.json +2 -2
- package/src/trpc/react/__snapshots__/generator.spec.ts.snap +28 -18
- package/src/trpc/react/files/src/components/__apiNameClassName__ClientProvider.tsx.template +9 -6
- package/src/trpc/react/generator.js +2 -6
- package/src/trpc/react/generator.js.map +1 -1
- package/src/ts/agent/__snapshots__/generator.spec.ts.snap +2 -2
- package/src/ts/agent/generator.js +8 -2
- package/src/ts/agent/generator.js.map +1 -1
- package/src/ts/agent/schema.json +1 -1
- package/src/ts/mcp-server/__snapshots__/generator.spec.ts.snap +2 -2
- package/src/ts/mcp-server/generator.js +7 -1
- package/src/ts/mcp-server/generator.js.map +1 -1
- package/src/ts/mcp-server/schema.json +1 -1
- package/src/ts/rdb/__snapshots__/generator.spec.ts.snap +128 -107
- package/src/ts/rdb/files/scripts/docker-pull.ts.template +11 -11
- package/src/ts/rdb/files/scripts/docker-start.ts.template +58 -56
- package/src/ts/rdb/generator.js +5 -6
- package/src/ts/rdb/generator.js.map +1 -1
- package/src/utils/agent-core-constructs/agent-core-constructs.d.ts +4 -0
- package/src/utils/agent-core-constructs/agent-core-constructs.js +3 -1
- package/src/utils/agent-core-constructs/agent-core-constructs.js.map +1 -1
- package/src/utils/agent-core-constructs/files/terraform/core/agent-core/runtime.tf.template +6 -6
- package/src/utils/api-constructs/api-constructs.d.ts +3 -1
- package/src/utils/api-constructs/api-constructs.js.map +1 -1
- package/src/utils/api-constructs/files/cdk/app/apis/http/__apiNameKebabCase__.ts.template +38 -6
- package/src/utils/api-constructs/files/cdk/app/apis/rest/__apiNameKebabCase__.ts.template +39 -3
- package/src/utils/api-constructs/files/cdk/authorizer/http/authorizer.ts.template +34 -0
- package/src/utils/api-constructs/files/cdk/authorizer/rest/authorizer.ts.template +52 -0
- package/src/utils/api-constructs/files/py-authorizer/http/authorizer.py.template +25 -0
- package/src/utils/api-constructs/files/py-authorizer/rest/authorizer.py.template +39 -0
- package/src/utils/api-constructs/files/terraform/app/apis/http/__apiNameKebabCase__/__apiNameKebabCase__.tf.template +112 -5
- package/src/utils/api-constructs/files/terraform/app/apis/rest/__apiNameKebabCase__/__apiNameKebabCase__.tf.template +114 -6
- package/src/utils/config/index.d.ts +6 -0
- package/src/utils/config/index.js.map +1 -1
- package/src/utils/connection/open-api/react.d.ts +1 -1
- package/src/utils/containers.d.ts +29 -0
- package/src/utils/containers.js +47 -0
- package/src/utils/containers.js.map +1 -0
- package/src/utils/rdb-constructs/files/terraform/app/dbs/__nameKebabCase__/__nameKebabCase__.tf.template +4 -4
- package/src/utils/rdb-constructs/rdb-constructs.d.ts +2 -0
- package/src/utils/rdb-constructs/rdb-constructs.js.map +1 -1
- package/src/utils/versions.d.ts +8 -3
- package/src/utils/versions.js +8 -3
- package/src/utils/versions.js.map +1 -1
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
from aws_lambda_powertools import Logger, Tracer
|
|
2
|
+
from aws_lambda_powertools.utilities.parser import event_parser
|
|
3
|
+
from aws_lambda_powertools.utilities.parser.models import (
|
|
4
|
+
ApiGatewayAuthorizerRequest,
|
|
5
|
+
)
|
|
6
|
+
from aws_lambda_powertools.utilities.typing import LambdaContext
|
|
7
|
+
|
|
8
|
+
logger = Logger()
|
|
9
|
+
tracer = Tracer()
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@tracer.capture_lambda_handler
|
|
13
|
+
@logger.inject_lambda_context
|
|
14
|
+
@event_parser(model=ApiGatewayAuthorizerRequest)
|
|
15
|
+
def handler(event: ApiGatewayAuthorizerRequest, context: LambdaContext) -> dict:
|
|
16
|
+
# TODO: Implement your custom authorization logic here.
|
|
17
|
+
# Example: validate a bearer token, check an API key, verify a JWT, etc.
|
|
18
|
+
#
|
|
19
|
+
# token = event.headers.get("authorization") if event.headers else None
|
|
20
|
+
# if is_valid(token):
|
|
21
|
+
# return _generate_policy("user", "Allow", event.methodArn)
|
|
22
|
+
|
|
23
|
+
return _generate_policy("user", "Deny", event.methodArn)
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
def _generate_policy(principal_id: str, effect: str, resource: str) -> dict:
|
|
27
|
+
return {
|
|
28
|
+
"principalId": principal_id,
|
|
29
|
+
"policyDocument": {
|
|
30
|
+
"Version": "2012-10-17",
|
|
31
|
+
"Statement": [
|
|
32
|
+
{
|
|
33
|
+
"Action": "execute-api:Invoke",
|
|
34
|
+
"Effect": effect,
|
|
35
|
+
"Resource": resource,
|
|
36
|
+
}
|
|
37
|
+
],
|
|
38
|
+
},
|
|
39
|
+
}
|
|
@@ -267,6 +267,114 @@ resource "aws_apigatewayv2_authorizer" "cognito_authorizer" {
|
|
|
267
267
|
issuer = "https://cognito-idp.${data.aws_region.current.region}.amazonaws.com/${var.user_pool_id}"
|
|
268
268
|
}
|
|
269
269
|
}
|
|
270
|
+
<%_ } else if (auth === 'Custom') { _%>
|
|
271
|
+
# Custom Lambda Authorizer
|
|
272
|
+
resource "aws_lambda_function" "authorizer_lambda" {
|
|
273
|
+
#checkov:skip=CKV_AWS_117:Lambda function does not need to be in VPC for this use case
|
|
274
|
+
#checkov:skip=CKV_AWS_116:Dead Letter Queue not required for authorizer
|
|
275
|
+
#checkov:skip=CKV_AWS_272:Code signing not required for this use case
|
|
276
|
+
#checkov:skip=CKV_AWS_115:Concurrent execution limit not required for this use case
|
|
277
|
+
#checkov:skip=CKV_AWS_173:Lambda environment variables encrypted by managed key
|
|
278
|
+
s3_bucket = aws_s3_object.authorizer_zip.bucket
|
|
279
|
+
s3_key = aws_s3_object.authorizer_zip.key
|
|
280
|
+
s3_object_version = aws_s3_object.authorizer_zip.version_id
|
|
281
|
+
function_name = "<%- apiNameClassName %>Authorizer-${random_string.suffix.result}"
|
|
282
|
+
role = aws_iam_role.authorizer_execution_role.arn
|
|
283
|
+
<%_ if (['trpc', 'smithy'].includes(backend.type)) { _%>
|
|
284
|
+
handler = "index.handler"
|
|
285
|
+
runtime = "nodejs22.x"
|
|
286
|
+
<%_ } else if (backend.type === 'fastapi') { _%>
|
|
287
|
+
handler = "<%- backend.moduleName %>.authorizer.handler"
|
|
288
|
+
runtime = "python3.14"
|
|
289
|
+
<%_ } _%>
|
|
290
|
+
timeout = 10
|
|
291
|
+
memory_size = 128
|
|
292
|
+
|
|
293
|
+
source_code_hash = data.archive_file.authorizer_zip.output_base64sha256
|
|
294
|
+
|
|
295
|
+
tracing_config {
|
|
296
|
+
mode = "Active"
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
tags = var.tags
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
resource "aws_iam_role" "authorizer_execution_role" {
|
|
303
|
+
name = "<%- apiNameClassName %>Authorizer-role-${random_string.suffix.result}"
|
|
304
|
+
|
|
305
|
+
assume_role_policy = jsonencode({
|
|
306
|
+
Version = "2012-10-17"
|
|
307
|
+
Statement = [
|
|
308
|
+
{
|
|
309
|
+
Action = "sts:AssumeRole"
|
|
310
|
+
Effect = "Allow"
|
|
311
|
+
Principal = {
|
|
312
|
+
Service = "lambda.amazonaws.com"
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
]
|
|
316
|
+
})
|
|
317
|
+
|
|
318
|
+
tags = var.tags
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
resource "aws_iam_role_policy_attachment" "authorizer_basic_execution" {
|
|
322
|
+
policy_arn = "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole"
|
|
323
|
+
role = aws_iam_role.authorizer_execution_role.name
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
resource "aws_iam_role_policy_attachment" "authorizer_xray_execution" {
|
|
327
|
+
policy_arn = "arn:aws:iam::aws:policy/AWSXRayDaemonWriteAccess"
|
|
328
|
+
role = aws_iam_role.authorizer_execution_role.name
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
resource "aws_cloudwatch_log_group" "authorizer_logs" {
|
|
332
|
+
#checkov:skip=CKV_AWS_158:Using default CloudWatch log encryption
|
|
333
|
+
#checkov:skip=CKV_AWS_338:Log retention set to forever
|
|
334
|
+
#checkov:skip=CKV_AWS_66:Log retention set to forever
|
|
335
|
+
name = "/aws/lambda/<%- apiNameClassName %>Authorizer-${random_string.suffix.result}"
|
|
336
|
+
tags = var.tags
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
<%_ if (['trpc', 'smithy'].includes(backend.type)) { _%>
|
|
340
|
+
data "archive_file" "authorizer_zip" {
|
|
341
|
+
type = "zip"
|
|
342
|
+
source_dir = "${path.module}/../../../../../../../<%- backend.authorizerBundleOutputDir %>"
|
|
343
|
+
output_path = "${path.module}/../../../../../../../dist/packages/common/terraform/apis/<%- apiNameKebabCase %>/authorizer.zip"
|
|
344
|
+
}
|
|
345
|
+
<%_ } else if (backend.type === 'fastapi') { _%>
|
|
346
|
+
data "archive_file" "authorizer_zip" {
|
|
347
|
+
type = "zip"
|
|
348
|
+
source_dir = "${path.module}/../../../../../../../<%- backend.bundleOutputDir %>"
|
|
349
|
+
output_path = "${path.module}/../../../../../../../dist/packages/common/terraform/apis/<%- apiNameKebabCase %>/authorizer.zip"
|
|
350
|
+
}
|
|
351
|
+
<%_ } _%>
|
|
352
|
+
|
|
353
|
+
resource "aws_s3_object" "authorizer_zip" {
|
|
354
|
+
bucket = var.asset_bucket_name
|
|
355
|
+
key = "apis/<%- apiNameKebabCase %>/authorizer-${data.archive_file.authorizer_zip.output_sha256}.zip"
|
|
356
|
+
source = data.archive_file.authorizer_zip.output_path
|
|
357
|
+
source_hash = data.archive_file.authorizer_zip.output_base64sha256
|
|
358
|
+
etag = data.archive_file.authorizer_zip.output_md5
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
resource "aws_apigatewayv2_authorizer" "custom_authorizer" {
|
|
362
|
+
api_id = module.http_api.api_id
|
|
363
|
+
authorizer_type = "REQUEST"
|
|
364
|
+
authorizer_uri = aws_lambda_function.authorizer_lambda.invoke_arn
|
|
365
|
+
authorizer_payload_format_version = "2.0"
|
|
366
|
+
authorizer_result_ttl_in_seconds = 0
|
|
367
|
+
enable_simple_responses = true
|
|
368
|
+
name = "<%- apiNameClassName %>Authorizer-${random_string.suffix.result}"
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
resource "aws_lambda_permission" "authorizer_invoke" {
|
|
372
|
+
statement_id = "AllowAPIGatewayInvokeAuthorizer"
|
|
373
|
+
action = "lambda:InvokeFunction"
|
|
374
|
+
function_name = aws_lambda_function.authorizer_lambda.function_name
|
|
375
|
+
principal = "apigateway.amazonaws.com"
|
|
376
|
+
source_arn = "${module.http_api.api_execution_arn}/authorizers/${aws_apigatewayv2_authorizer.custom_authorizer.id}"
|
|
377
|
+
}
|
|
270
378
|
<%_ } _%>
|
|
271
379
|
|
|
272
380
|
# Lambda integration for HTTP API
|
|
@@ -304,13 +412,12 @@ resource "aws_apigatewayv2_route" "proxy_routes" {
|
|
|
304
412
|
<%_ } else if (auth === 'Cognito') { _%>
|
|
305
413
|
authorization_type = "JWT"
|
|
306
414
|
authorizer_id = aws_apigatewayv2_authorizer.cognito_authorizer.id
|
|
307
|
-
<%_ } else if (auth === '
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
authorization_type = "NONE"
|
|
415
|
+
<%_ } else if (auth === 'Custom') { _%>
|
|
416
|
+
authorization_type = "CUSTOM"
|
|
417
|
+
authorizer_id = aws_apigatewayv2_authorizer.custom_authorizer.id
|
|
311
418
|
<%_ } _%>
|
|
312
419
|
|
|
313
|
-
depends_on = [aws_apigatewayv2_integration.lambda_integration<% if (auth === 'Cognito') { %>, aws_apigatewayv2_authorizer.cognito_authorizer<% } %>]
|
|
420
|
+
depends_on = [aws_apigatewayv2_integration.lambda_integration<% if (auth === 'Cognito') { %>, aws_apigatewayv2_authorizer.cognito_authorizer<% } else if (auth === 'Custom') { %>, aws_apigatewayv2_authorizer.custom_authorizer<% } %>]
|
|
314
421
|
}
|
|
315
422
|
|
|
316
423
|
# Add API url to runtime config
|
|
@@ -260,6 +260,112 @@ resource "aws_api_gateway_authorizer" "cognito_authorizer" {
|
|
|
260
260
|
provider_arns = ["arn:aws:cognito-idp:${data.aws_region.current.region}:${data.aws_caller_identity.current.account_id}:userpool/${var.user_pool_id}"]
|
|
261
261
|
identity_source = "method.request.header.Authorization"
|
|
262
262
|
}
|
|
263
|
+
<%_ } else if (auth === 'Custom') { _%>
|
|
264
|
+
# Custom Lambda Authorizer
|
|
265
|
+
resource "aws_lambda_function" "authorizer_lambda" {
|
|
266
|
+
#checkov:skip=CKV_AWS_117:Lambda function does not need to be in VPC for this use case
|
|
267
|
+
#checkov:skip=CKV_AWS_116:Dead Letter Queue not required for authorizer
|
|
268
|
+
#checkov:skip=CKV_AWS_272:Code signing not required for this use case
|
|
269
|
+
#checkov:skip=CKV_AWS_115:Concurrent execution limit not required for this use case
|
|
270
|
+
#checkov:skip=CKV_AWS_173:Lambda environment variables encrypted by managed key
|
|
271
|
+
s3_bucket = aws_s3_object.authorizer_zip.bucket
|
|
272
|
+
s3_key = aws_s3_object.authorizer_zip.key
|
|
273
|
+
s3_object_version = aws_s3_object.authorizer_zip.version_id
|
|
274
|
+
function_name = "<%- apiNameClassName %>Authorizer-${random_string.suffix.result}"
|
|
275
|
+
role = aws_iam_role.authorizer_execution_role.arn
|
|
276
|
+
<%_ if (['trpc', 'smithy'].includes(backend.type)) { _%>
|
|
277
|
+
handler = "index.handler"
|
|
278
|
+
runtime = "nodejs22.x"
|
|
279
|
+
<%_ } else if (backend.type === 'fastapi') { _%>
|
|
280
|
+
handler = "<%- backend.moduleName %>.authorizer.handler"
|
|
281
|
+
runtime = "python3.14"
|
|
282
|
+
<%_ } _%>
|
|
283
|
+
timeout = 10
|
|
284
|
+
memory_size = 128
|
|
285
|
+
|
|
286
|
+
source_code_hash = data.archive_file.authorizer_zip.output_base64sha256
|
|
287
|
+
|
|
288
|
+
tracing_config {
|
|
289
|
+
mode = "Active"
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
tags = var.tags
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
resource "aws_iam_role" "authorizer_execution_role" {
|
|
296
|
+
name = "<%- apiNameClassName %>Authorizer-role-${random_string.suffix.result}"
|
|
297
|
+
|
|
298
|
+
assume_role_policy = jsonencode({
|
|
299
|
+
Version = "2012-10-17"
|
|
300
|
+
Statement = [
|
|
301
|
+
{
|
|
302
|
+
Action = "sts:AssumeRole"
|
|
303
|
+
Effect = "Allow"
|
|
304
|
+
Principal = {
|
|
305
|
+
Service = "lambda.amazonaws.com"
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
]
|
|
309
|
+
})
|
|
310
|
+
|
|
311
|
+
tags = var.tags
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
resource "aws_iam_role_policy_attachment" "authorizer_basic_execution" {
|
|
315
|
+
policy_arn = "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole"
|
|
316
|
+
role = aws_iam_role.authorizer_execution_role.name
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
resource "aws_iam_role_policy_attachment" "authorizer_xray_execution" {
|
|
320
|
+
policy_arn = "arn:aws:iam::aws:policy/AWSXRayDaemonWriteAccess"
|
|
321
|
+
role = aws_iam_role.authorizer_execution_role.name
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
resource "aws_cloudwatch_log_group" "authorizer_logs" {
|
|
325
|
+
#checkov:skip=CKV_AWS_158:Using default CloudWatch log encryption
|
|
326
|
+
#checkov:skip=CKV_AWS_338:Log retention set to forever
|
|
327
|
+
#checkov:skip=CKV_AWS_66:Log retention set to forever
|
|
328
|
+
name = "/aws/lambda/<%- apiNameClassName %>Authorizer-${random_string.suffix.result}"
|
|
329
|
+
tags = var.tags
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
<%_ if (['trpc', 'smithy'].includes(backend.type)) { _%>
|
|
333
|
+
data "archive_file" "authorizer_zip" {
|
|
334
|
+
type = "zip"
|
|
335
|
+
source_dir = "${path.module}/../../../../../../../<%- backend.authorizerBundleOutputDir %>"
|
|
336
|
+
output_path = "${path.module}/../../../../../../../dist/packages/common/terraform/apis/<%- apiNameKebabCase %>/authorizer.zip"
|
|
337
|
+
}
|
|
338
|
+
<%_ } else if (backend.type === 'fastapi') { _%>
|
|
339
|
+
data "archive_file" "authorizer_zip" {
|
|
340
|
+
type = "zip"
|
|
341
|
+
source_dir = "${path.module}/../../../../../../../<%- backend.bundleOutputDir %>"
|
|
342
|
+
output_path = "${path.module}/../../../../../../../dist/packages/common/terraform/apis/<%- apiNameKebabCase %>/authorizer.zip"
|
|
343
|
+
}
|
|
344
|
+
<%_ } _%>
|
|
345
|
+
|
|
346
|
+
resource "aws_s3_object" "authorizer_zip" {
|
|
347
|
+
bucket = var.asset_bucket_name
|
|
348
|
+
key = "apis/<%- apiNameKebabCase %>/authorizer-${data.archive_file.authorizer_zip.output_sha256}.zip"
|
|
349
|
+
source = data.archive_file.authorizer_zip.output_path
|
|
350
|
+
source_hash = data.archive_file.authorizer_zip.output_base64sha256
|
|
351
|
+
etag = data.archive_file.authorizer_zip.output_md5
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
resource "aws_api_gateway_authorizer" "custom_authorizer" {
|
|
355
|
+
name = "<%- apiNameClassName %>Authorizer-${random_string.suffix.result}"
|
|
356
|
+
rest_api_id = module.rest_api.api_id
|
|
357
|
+
type = "TOKEN"
|
|
358
|
+
authorizer_uri = aws_lambda_function.authorizer_lambda.invoke_arn
|
|
359
|
+
identity_source = "method.request.header.Authorization"
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
resource "aws_lambda_permission" "authorizer_invoke" {
|
|
363
|
+
statement_id = "AllowAPIGatewayInvokeAuthorizer"
|
|
364
|
+
action = "lambda:InvokeFunction"
|
|
365
|
+
function_name = aws_lambda_function.authorizer_lambda.function_name
|
|
366
|
+
principal = "apigateway.amazonaws.com"
|
|
367
|
+
source_arn = "${module.rest_api.api_execution_arn}/authorizers/${aws_api_gateway_authorizer.custom_authorizer.id}"
|
|
368
|
+
}
|
|
263
369
|
<%_ } _%>
|
|
264
370
|
|
|
265
371
|
# Create proxy resource (captures all paths)
|
|
@@ -307,17 +413,16 @@ resource "aws_api_gateway_method" "proxy_method" {
|
|
|
307
413
|
<%_ } else if (auth === 'Cognito') { _%>
|
|
308
414
|
authorization = "COGNITO_USER_POOLS"
|
|
309
415
|
authorizer_id = aws_api_gateway_authorizer.cognito_authorizer.id
|
|
310
|
-
<%_ } else if (auth === '
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
authorization = "NONE"
|
|
416
|
+
<%_ } else if (auth === 'Custom') { _%>
|
|
417
|
+
authorization = "CUSTOM"
|
|
418
|
+
authorizer_id = aws_api_gateway_authorizer.custom_authorizer.id
|
|
314
419
|
<%_ } _%>
|
|
315
420
|
|
|
316
421
|
request_parameters = {
|
|
317
422
|
"method.request.path.proxy" = true
|
|
318
423
|
}
|
|
319
424
|
|
|
320
|
-
depends_on = [<% if (auth === 'Cognito') { %>aws_api_gateway_authorizer.cognito_authorizer<% } %>]
|
|
425
|
+
depends_on = [<% if (auth === 'Cognito') { %>aws_api_gateway_authorizer.cognito_authorizer<% } else if (auth === 'Custom') { %>aws_api_gateway_authorizer.custom_authorizer<% } %>]
|
|
321
426
|
}
|
|
322
427
|
|
|
323
428
|
# OPTIONS method for CORS preflight
|
|
@@ -395,6 +500,9 @@ resource "aws_api_gateway_deployment" "api_deployment" {
|
|
|
395
500
|
aws_api_gateway_integration.options_integration,
|
|
396
501
|
aws_api_gateway_method_response.options_response,
|
|
397
502
|
aws_api_gateway_integration_response.options_integration_response,
|
|
503
|
+
<%_ if (auth === 'Custom') { _%>
|
|
504
|
+
aws_api_gateway_authorizer.custom_authorizer,
|
|
505
|
+
<%_ } _%>
|
|
398
506
|
]
|
|
399
507
|
}
|
|
400
508
|
|
|
@@ -443,7 +551,7 @@ resource "aws_api_gateway_rest_api_policy" "api_policy" {
|
|
|
443
551
|
}
|
|
444
552
|
<%_ } else { _%>
|
|
445
553
|
{
|
|
446
|
-
# Allow all callers to invoke the API in the resource policy<% if (auth === 'Cognito') { %>, since auth is handled by Cognito<% } %>
|
|
554
|
+
# Allow all callers to invoke the API in the resource policy<% if (auth === 'Cognito') { %>, since auth is handled by Cognito<% } else if (auth === 'Custom') { %>, since auth is handled by the Lambda Authorizer<% } %>
|
|
447
555
|
Effect = "Allow"
|
|
448
556
|
Principal = "*"
|
|
449
557
|
Action = "execute-api:Invoke"
|
|
@@ -4,8 +4,10 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { LicenseConfig } from '../../license/config-types';
|
|
6
6
|
import { IacConfig } from '../iac';
|
|
7
|
+
import { ContainersConfig } from '../containers';
|
|
7
8
|
export * from '../../license/config-types';
|
|
8
9
|
export { IacConfig, IacProvider } from '../iac';
|
|
10
|
+
export { ContainersConfig, ContainerEngine } from '../containers';
|
|
9
11
|
/**
|
|
10
12
|
* Configuration for the nx plugin
|
|
11
13
|
*/
|
|
@@ -18,6 +20,10 @@ export interface AwsNxPluginConfig {
|
|
|
18
20
|
* Configuration for infrastructure as code
|
|
19
21
|
*/
|
|
20
22
|
iac?: IacConfig;
|
|
23
|
+
/**
|
|
24
|
+
* Configuration for container tooling (build/push/login)
|
|
25
|
+
*/
|
|
26
|
+
containers?: ContainersConfig;
|
|
21
27
|
/**
|
|
22
28
|
* List of tags
|
|
23
29
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/nx-plugin/src/utils/config/index.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/nx-plugin/src/utils/config/index.ts"],"names":[],"mappings":";;;AAQA,qEAA2C"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*/
|
|
5
|
+
import { Tree } from '@nx/devkit';
|
|
6
|
+
export declare const CONTAINER_ENGINES: readonly ["docker", "finch"];
|
|
7
|
+
export type ContainerEngine = (typeof CONTAINER_ENGINES)[number];
|
|
8
|
+
export type ContainerEngineOption = ContainerEngine | 'Inherit';
|
|
9
|
+
/**
|
|
10
|
+
* Configuration for container tooling
|
|
11
|
+
*/
|
|
12
|
+
export interface ContainersConfig {
|
|
13
|
+
/**
|
|
14
|
+
* Container engine used for build/push/login operations
|
|
15
|
+
*/
|
|
16
|
+
engine: ContainerEngine;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Detect which container engine is available on the host. Prefers docker;
|
|
20
|
+
* falls back to finch when only finch is installed; defaults to docker
|
|
21
|
+
* when neither is found.
|
|
22
|
+
*/
|
|
23
|
+
export declare const inferContainerEngine: () => ContainerEngine;
|
|
24
|
+
/**
|
|
25
|
+
* Given a container engine option, resolve the actual engine to use.
|
|
26
|
+
* `Inherit` reads the value from the workspace plugin config, defaulting
|
|
27
|
+
* to docker when nothing has been configured.
|
|
28
|
+
*/
|
|
29
|
+
export declare const resolveContainerEngine: (tree: Tree, option: ContainerEngineOption) => Promise<ContainerEngine>;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.resolveContainerEngine = exports.inferContainerEngine = exports.CONTAINER_ENGINES = void 0;
|
|
4
|
+
const child_process_1 = require("child_process");
|
|
5
|
+
const utils_1 = require("./config/utils");
|
|
6
|
+
exports.CONTAINER_ENGINES = ['docker', 'finch'];
|
|
7
|
+
const isOnPath = (binary) => {
|
|
8
|
+
try {
|
|
9
|
+
const which = process.platform === 'win32' ? 'where' : 'command -v';
|
|
10
|
+
(0, child_process_1.execSync)(`${which} ${binary}`, { stdio: 'ignore' });
|
|
11
|
+
return true;
|
|
12
|
+
}
|
|
13
|
+
catch {
|
|
14
|
+
return false;
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* Detect which container engine is available on the host. Prefers docker;
|
|
19
|
+
* falls back to finch when only finch is installed; defaults to docker
|
|
20
|
+
* when neither is found.
|
|
21
|
+
*/
|
|
22
|
+
const inferContainerEngine = () => {
|
|
23
|
+
if (isOnPath('docker'))
|
|
24
|
+
return 'docker';
|
|
25
|
+
if (isOnPath('finch'))
|
|
26
|
+
return 'finch';
|
|
27
|
+
return 'docker';
|
|
28
|
+
};
|
|
29
|
+
exports.inferContainerEngine = inferContainerEngine;
|
|
30
|
+
/**
|
|
31
|
+
* Given a container engine option, resolve the actual engine to use.
|
|
32
|
+
* `Inherit` reads the value from the workspace plugin config, defaulting
|
|
33
|
+
* to docker when nothing has been configured.
|
|
34
|
+
*/
|
|
35
|
+
const resolveContainerEngine = async (tree, option) => {
|
|
36
|
+
if (option === 'Inherit') {
|
|
37
|
+
const pluginConfig = await (0, utils_1.readAwsNxPluginConfig)(tree);
|
|
38
|
+
const engine = pluginConfig?.containers?.engine ?? 'docker';
|
|
39
|
+
if (!exports.CONTAINER_ENGINES.includes(engine)) {
|
|
40
|
+
throw new Error(`containers.engine in ${utils_1.AWS_NX_PLUGIN_CONFIG_FILE_NAME} must be one of ${exports.CONTAINER_ENGINES.join(', ')}`);
|
|
41
|
+
}
|
|
42
|
+
return engine;
|
|
43
|
+
}
|
|
44
|
+
return option;
|
|
45
|
+
};
|
|
46
|
+
exports.resolveContainerEngine = resolveContainerEngine;
|
|
47
|
+
//# sourceMappingURL=containers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"containers.js","sourceRoot":"","sources":["../../../../../packages/nx-plugin/src/utils/containers.ts"],"names":[],"mappings":";;;AAKA,iDAAyC;AACzC,0CAGwB;AAEX,QAAA,iBAAiB,GAAG,CAAC,QAAQ,EAAE,OAAO,CAAU,CAAC;AAgB9D,MAAM,QAAQ,GAAG,CAAC,MAAc,EAAW,EAAE;IAC3C,IAAI,CAAC;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|
data "external" "docker_digest" {
|
|
276
|
-
program = ["sh", "-c", "echo '{\"digest\":\"'$(
|
|
276
|
+
program = ["sh", "-c", "echo '{\"digest\":\"'$(<%= containerEngine %> inspect ${var.docker_image_tag} --format '{{.Id}}')'\"}' "]
|
|
277
277
|
}
|
|
278
278
|
|
|
279
279
|
resource "null_resource" "docker_publish" {
|
|
@@ -285,9 +285,9 @@ resource "null_resource" "docker_publish" {
|
|
|
285
285
|
|
|
286
286
|
provisioner "local-exec" {
|
|
287
287
|
command = <<-EOT
|
|
288
|
-
aws ecr get-login-password --region ${data.aws_region.current.region} |
|
|
289
|
-
|
|
290
|
-
|
|
288
|
+
aws ecr get-login-password --region ${data.aws_region.current.region} | <%= containerEngine %> login --username AWS --password-stdin ${self.triggers.repository_url}
|
|
289
|
+
<%= containerEngine %> tag ${self.triggers.docker_image_tag} ${self.triggers.repository_url}:latest
|
|
290
|
+
<%= containerEngine %> push ${self.triggers.repository_url}:latest
|
|
291
291
|
EOT
|
|
292
292
|
}
|
|
293
293
|
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { Tree } from '@nx/devkit';
|
|
6
6
|
import { IacProvider } from '../iac';
|
|
7
|
+
import { ContainerEngine } from '../containers';
|
|
7
8
|
export interface AddRdbConstructOptions {
|
|
8
9
|
projectName: string;
|
|
9
10
|
nameClassName: string;
|
|
@@ -15,6 +16,7 @@ export interface AddRdbConstructOptions {
|
|
|
15
16
|
migrationBundleDir: string;
|
|
16
17
|
createDbUserBundleDir: string;
|
|
17
18
|
dockerImageTag: string;
|
|
19
|
+
containerEngine: ContainerEngine;
|
|
18
20
|
}
|
|
19
21
|
export declare const addRdbInfra: (tree: Tree, options: AddRdbConstructOptions & {
|
|
20
22
|
iacProvider: IacProvider;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rdb-constructs.js","sourceRoot":"","sources":["../../../../../../packages/nx-plugin/src/utils/rdb-constructs/rdb-constructs.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACH,uCAOoB;AACpB,gFAIwC;AACxC,gCAAuC;
|
|
1
|
+
{"version":3,"file":"rdb-constructs.js","sourceRoot":"","sources":["../../../../../../packages/nx-plugin/src/utils/rdb-constructs/rdb-constructs.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACH,uCAOoB;AACpB,gFAIwC;AACxC,gCAAuC;AAkBhC,MAAM,WAAW,GAAG,KAAK,EAC9B,IAAU,EACV,OAA8D,EAC9D,EAAE;IACF,IAAI,OAAO,CAAC,WAAW,KAAK,KAAK,EAAE,CAAC;QAClC,MAAM,IAAA,2BAAmB,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAC3C,CAAC;SAAM,IAAI,OAAO,CAAC,WAAW,KAAK,WAAW,EAAE,CAAC;QAC/C,IAAA,8BAAsB,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IACxC,CAAC;SAAM,CAAC;QACN,MAAM,IAAI,KAAK,CAAC,2BAA2B,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC;IACpE,CAAC;IAED,IAAA,mBAAU,EACR,IAAI,EACJ,IAAA,0BAAiB,EACf,0CAAY,EACZ,OAAO,CAAC,WAAW,KAAK,KAAK;QAC3B,CAAC,CAAC,mDAAqB;QACvB,CAAC,CAAC,kDAAoB,EACxB,cAAc,CACf,EACD,CAAC,MAA4B,EAAE,EAAE;QAC/B,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;YACpB,MAAM,CAAC,OAAO,GAAG,EAAE,CAAC;QACtB,CAAC;QACD,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;YAC1B,MAAM,CAAC,OAAO,CAAC,KAAK,GAAG,EAAE,CAAC;QAC5B,CAAC;QACD,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,SAAS,GAAG;YAC/B,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,SAAS,IAAI,EAAE,CAAC;YACzC,G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AC;AACJ,CAAC,CAAC;AAhEW,QAAA,mBAAmB,uBAgE9B;AAEK,MAAM,sBAAsB,GAAG,CACpC,IAAU,EACV,OAA+B,EAC/B,EAAE;IACF,IAAA,sBAAa,EACX,IAAI,EACJ,IAAA,0BAAiB,EAAC,SAAS,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,KAAK,CAAC,EACjE,IAAA,0BAAiB,EAAC,0CAAY,EAAE,kDAAoB,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,EAC3E,EAAE,EACF;QACE,iBAAiB,EAAE,0BAAiB,CAAC,YAAY;KAClD,CACF,CAAC;IAEF,IAAA,sBAAa,EACX,IAAI,EACJ,IAAA,0BAAiB,EAAC,SAAS,EAAE,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,KAAK,CAAC,EAChE,IAAA,0BAAiB,EAAC,0CAAY,EAAE,kDAAoB,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,EAC1E,OAAO,EACP;QACE,iBAAiB,EAAE,0BAAiB,CAAC,YAAY;KAClD,CACF,CAAC;AACJ,CAAC,CAAC;AAvBW,QAAA,sBAAsB,0BAuBjC"}
|
package/src/utils/versions.d.ts
CHANGED
|
@@ -54,8 +54,6 @@ export declare const TS_VERSIONS: {
|
|
|
54
54
|
readonly '@trpc/tanstack-react-query': "11.17.0";
|
|
55
55
|
readonly '@trpc/client': "11.17.0";
|
|
56
56
|
readonly '@trpc/server': "11.17.0";
|
|
57
|
-
readonly dockerode: "5.0.0";
|
|
58
|
-
readonly '@types/dockerode': "4.0.1";
|
|
59
57
|
readonly '@types/node': "25.9.1";
|
|
60
58
|
readonly '@types/aws-lambda': "8.10.161";
|
|
61
59
|
readonly '@types/cors': "2.8.19";
|
|
@@ -93,6 +91,7 @@ export declare const TS_VERSIONS: {
|
|
|
93
91
|
readonly 'eslint-plugin-prettier': "5.5.5";
|
|
94
92
|
readonly express: "5.2.1";
|
|
95
93
|
readonly 'fast-glob': "3.3.3";
|
|
94
|
+
readonly husky: "9.1.7";
|
|
96
95
|
readonly 'fs-extra': "11.3.5";
|
|
97
96
|
readonly '@types/fs-extra': "11.0.4";
|
|
98
97
|
readonly 'jsonc-eslint-parser': "3.1.0";
|
|
@@ -132,7 +131,7 @@ export type ITsDepVersion = keyof typeof TS_VERSIONS;
|
|
|
132
131
|
* Add versions to the given dependencies
|
|
133
132
|
*/
|
|
134
133
|
export declare const withVersions: (deps: ITsDepVersion[]) => {
|
|
135
|
-
[k: string]: "22.7.3" | "3.8.3" | "1.29.0" | "22.1.4" | "3.3.3" | "4.3.0" | "
|
|
134
|
+
[k: string]: "22.7.3" | "3.8.3" | "1.29.0" | "22.1.4" | "3.3.3" | "4.3.0" | "6.0.3" | "8.0.14" | "4.1.7" | "4.4.3" | "0.3.13" | "0.11.0" | "3.1053.0" | "3.972.36" | "1.0.0-alpha.10" | "2.33.0" | "7.6.5" | "10.2.1" | "0.19.0" | "0.1.0" | "0.0.53" | "0.2.0" | "1.57.4" | "7.8.2" | "1.3.0" | "1.170.8" | "1.168.11" | "1.167.10" | "1.162.0" | "1.162.1" | "3.0.183" | "1.0.132" | "3.0.1300" | "1.0.59" | "5.100.14" | "11.17.0" | "25.9.1" | "8.10.161" | "2.8.19" | "8.20.0" | "8.18.1" | "5.0.6" | "4.5.4" | "4.4.4" | "4.7.4" | "4.14.2" | "5.0.5" | "0.39.2" | "6.3.7" | "1.0.20" | "2.1124.1" | "2.257.0" | "3.12.0" | "10.6.0" | "2.8.6" | "5.6.2" | "0.7.1" | "2.1.1" | "14.0.3" | "3.7.5" | "0.28.0" | "1.0.31" | "1.0.5" | "8.59.4" | "7.8.0" | "5.5.5" | "5.2.1" | "9.1.7" | "11.3.5" | "11.0.4" | "3.1.0" | "4.0.0" | "3.5.2" | "2.0.0" | "19.6.6" | "3.5.0" | "8.21.0" | "3.3.1" | "19.2.6" | "6.1.3" | "1.0.2" | "3.36.0" | "0.5.21" | "0.26.1" | "4.22.3" | "1.16.0" | "1.4.3" | "4.8.0" | "1.4.0" | "3.6.0";
|
|
136
135
|
};
|
|
137
136
|
/**
|
|
138
137
|
* Versions for Python dependencies added by generators
|
|
@@ -163,3 +162,9 @@ export type IPyDepVersion = keyof typeof PY_VERSIONS;
|
|
|
163
162
|
* Add versions to the given dependencies
|
|
164
163
|
*/
|
|
165
164
|
export declare const withPyVersions: (deps: IPyDepVersion[]) => string[];
|
|
165
|
+
/**
|
|
166
|
+
* Versions for vendored tools
|
|
167
|
+
*/
|
|
168
|
+
export declare const VENDORED_VERSIONS: {
|
|
169
|
+
readonly 'git-secrets': "1.3.0";
|
|
170
|
+
};
|
package/src/utils/versions.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.withPyVersions = exports.PY_VERSIONS = exports.withVersions = exports.TS_VERSIONS = void 0;
|
|
7
|
+
exports.VENDORED_VERSIONS = exports.withPyVersions = exports.PY_VERSIONS = exports.withVersions = exports.TS_VERSIONS = void 0;
|
|
8
8
|
/**
|
|
9
9
|
* Versons for TypeScript dependencies added by generators
|
|
10
10
|
*/
|
|
@@ -57,8 +57,6 @@ exports.TS_VERSIONS = {
|
|
|
57
57
|
'@trpc/tanstack-react-query': '11.17.0',
|
|
58
58
|
'@trpc/client': '11.17.0',
|
|
59
59
|
'@trpc/server': '11.17.0',
|
|
60
|
-
dockerode: '5.0.0',
|
|
61
|
-
'@types/dockerode': '4.0.1',
|
|
62
60
|
'@types/node': '25.9.1',
|
|
63
61
|
'@types/aws-lambda': '8.10.161',
|
|
64
62
|
'@types/cors': '2.8.19',
|
|
@@ -96,6 +94,7 @@ exports.TS_VERSIONS = {
|
|
|
96
94
|
'eslint-plugin-prettier': '5.5.5',
|
|
97
95
|
express: '5.2.1',
|
|
98
96
|
'fast-glob': '3.3.3',
|
|
97
|
+
husky: '9.1.7',
|
|
99
98
|
'fs-extra': '11.3.5',
|
|
100
99
|
'@types/fs-extra': '11.0.4',
|
|
101
100
|
'jsonc-eslint-parser': '3.1.0',
|
|
@@ -164,4 +163,10 @@ exports.PY_VERSIONS = {
|
|
|
164
163
|
*/
|
|
165
164
|
const withPyVersions = (deps) => deps.map((dep) => `${dep}${exports.PY_VERSIONS[dep]}`);
|
|
166
165
|
exports.withPyVersions = withPyVersions;
|
|
166
|
+
/**
|
|
167
|
+
* Versions for vendored tools
|
|
168
|
+
*/
|
|
169
|
+
exports.VENDORED_VERSIONS = {
|
|
170
|
+
'git-secrets': '1.3.0',
|
|
171
|
+
};
|
|
167
172
|
//# sourceMappingURL=versions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"versions.js","sourceRoot":"","sources":["../../../../../packages/nx-plugin/src/utils/versions.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH;;GAEG;AACU,QAAA,WAAW,GAAG;IACzB,aAAa,EAAE,QAAQ;IACvB,wDAAwD,EAAE,QAAQ;IAClE,0BAA0B,EAAE,UAAU;IACtC,iCAAiC,EAAE,UAAU;IAC7C,oBAAoB,EAAE,UAAU;IAChC,qBAAqB,EAAE,UAAU;IACjC,+BAA+B,EAAE,UAAU;IAC3C,+CAA+C,EAAE,UAAU;IAC3D,iCAAiC,EAAE,UAAU;IAC7C,qBAAqB,EAAE,UAAU;IACjC,+BAA+B,EAAE,gBAAgB;IACjD,yBAAyB,EAAE,gBAAgB;IAC3C,+BAA+B,EAAE,QAAQ;IACzC,gCAAgC,EAAE,QAAQ;IAC1C,mCAAmC,EAAE,QAAQ;IAC7C,+BAA+B,EAAE,QAAQ;IACzC,+BAA+B,EAAE,QAAQ;IACzC,+BAA+B,EAAE,UAAU;IAC3C,aAAa,EAAE,OAAO;IACtB,cAAc,EAAE,QAAQ;IACxB,sBAAsB,EAAE,QAAQ;IAChC,YAAY,EAAE,QAAQ;IACtB,WAAW,EAAE,QAAQ;IACrB,qBAAqB,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