@aws/nx-plugin 1.0.0-rc.2 → 1.0.0-rc.21
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/LICENSE-THIRD-PARTY +3552 -4179
- package/README.md +8 -8
- package/executors.json +9 -0
- package/generators.json +100 -1
- package/package.json +16 -12
- package/sdk/agentcore-gateway.d.ts +6 -0
- package/sdk/agentcore-gateway.js +11 -0
- package/sdk/agentcore-gateway.js.map +1 -0
- package/sdk/license.d.ts +8 -0
- package/sdk/license.js +14 -0
- package/sdk/license.js.map +1 -0
- package/sdk/py.d.ts +6 -6
- package/sdk/py.js +7 -7
- package/sdk/py.js.map +1 -1
- package/sdk/ts.d.ts +18 -14
- package/sdk/ts.js +38 -32
- package/sdk/ts.js.map +1 -1
- package/src/agentcore-gateway/attach-upstream.d.ts +33 -0
- package/src/agentcore-gateway/attach-upstream.js +41 -0
- package/src/agentcore-gateway/attach-upstream.js.map +1 -0
- package/src/agentcore-gateway/files/cedar/policies/README.md +52 -0
- package/src/agentcore-gateway/files/cedar/policies/permit-all.cedar +11 -0
- package/src/agentcore-gateway/files/project/serve-local.ts.template +134 -0
- package/src/agentcore-gateway/gateway-connection/generator.d.ts +21 -0
- package/src/agentcore-gateway/gateway-connection/generator.js +102 -0
- package/src/agentcore-gateway/gateway-connection/generator.js.map +1 -0
- package/src/agentcore-gateway/gateway-connection/schema.d.ts +12 -0
- package/src/agentcore-gateway/gateway-connection/schema.json +26 -0
- package/src/agentcore-gateway/generator.d.ts +25 -0
- package/src/agentcore-gateway/generator.js +129 -0
- package/src/agentcore-gateway/generator.js.map +1 -0
- package/src/agentcore-gateway/mcp-connection/generator.d.ts +19 -0
- package/src/agentcore-gateway/mcp-connection/generator.js +63 -0
- package/src/agentcore-gateway/mcp-connection/generator.js.map +1 -0
- package/src/agentcore-gateway/mcp-connection/schema.d.ts +12 -0
- package/src/agentcore-gateway/mcp-connection/schema.json +26 -0
- package/src/agentcore-gateway/schema.d.ts +16 -0
- package/src/agentcore-gateway/schema.json +65 -0
- package/src/connection/agent-runtime-config.d.ts +1 -1
- package/src/connection/agent-runtime-config.js.map +1 -1
- package/src/connection/agent-serve-local.d.ts +2 -2
- package/src/connection/agent-serve-local.js +1 -1
- package/src/connection/agent-serve-local.js.map +1 -1
- package/src/connection/generator.d.ts +5 -5
- package/src/connection/generator.js +93 -37
- package/src/connection/generator.js.map +1 -1
- package/src/connection/serve-local.d.ts +1 -1
- package/src/connection/serve-local.js +1 -1
- package/src/connection/serve-local.js.map +1 -1
- package/src/infra/app/__snapshots__/generator.spec.ts.snap +47 -58
- package/src/infra/app/generator.d.ts +3 -3
- package/src/infra/app/generator.js +19 -17
- package/src/infra/app/generator.js.map +1 -1
- package/src/license/__snapshots__/config.spec.ts.snap +23 -0
- package/src/license/config-types.d.ts +18 -1
- package/src/license/config-types.js +4 -0
- package/src/license/config-types.js.map +1 -1
- package/src/license/config.d.ts +65 -7
- package/src/license/config.js +315 -7
- package/src/license/config.js.map +1 -1
- package/src/license/dependency-check/check.d.ts +16 -0
- package/src/license/dependency-check/check.js +111 -0
- package/src/license/dependency-check/check.js.map +1 -0
- package/src/license/dependency-check/collectors/collector.d.ts +21 -0
- package/src/license/dependency-check/collectors/collector.js +76 -0
- package/src/license/dependency-check/collectors/collector.js.map +1 -0
- package/src/license/dependency-check/collectors/npm-collector.d.ts +10 -0
- package/src/license/dependency-check/collectors/npm-collector.js +75 -0
- package/src/license/dependency-check/collectors/npm-collector.js.map +1 -0
- package/src/license/dependency-check/collectors/python-collector.d.ts +23 -0
- package/src/license/dependency-check/collectors/python-collector.js +121 -0
- package/src/license/dependency-check/collectors/python-collector.js.map +1 -0
- package/src/license/dependency-check/evaluator.d.ts +9 -0
- package/src/license/dependency-check/evaluator.js +122 -0
- package/src/license/dependency-check/evaluator.js.map +1 -0
- package/src/license/dependency-check/executor-schema.json +6 -0
- package/src/license/dependency-check/executor.d.ts +9 -0
- package/src/license/dependency-check/executor.js +43 -0
- package/src/license/dependency-check/executor.js.map +1 -0
- package/src/license/dependency-check/pre-approved.d.ts +6 -0
- package/src/license/dependency-check/pre-approved.js +1280 -0
- package/src/license/dependency-check/pre-approved.js.map +1 -0
- package/src/license/dependency-check/types.d.ts +45 -0
- package/src/license/dependency-check/types.js +7 -0
- package/src/license/dependency-check/types.js.map +1 -0
- package/src/license/generator.d.ts +3 -3
- package/src/license/generator.js +102 -14
- package/src/license/generator.js.map +1 -1
- package/src/license/index.d.ts +8 -0
- package/src/license/index.js +13 -0
- package/src/license/index.js.map +1 -0
- package/src/license/known-exceptions.d.ts +6 -0
- package/src/license/known-exceptions.js +26 -0
- package/src/license/known-exceptions.js.map +1 -0
- package/src/license/schema.d.ts +5 -0
- package/src/license/schema.json +6 -0
- package/src/license/sync/generator.d.ts +2 -2
- package/src/license/sync/generator.js +15 -15
- package/src/license/sync/generator.js.map +1 -1
- package/src/license/sync/project-file-sync.d.ts +3 -3
- package/src/license/sync/project-file-sync.js.map +1 -1
- package/src/mcp-server/generator-info.d.ts +5 -1
- package/src/mcp-server/generator-info.js +7 -7
- package/src/mcp-server/generator-info.js.map +1 -1
- package/src/mcp-server/guide-pipeline.d.ts +1 -1
- package/src/mcp-server/guide-pipeline.js +2 -2
- package/src/mcp-server/guide-pipeline.js.map +1 -1
- package/src/mcp-server/mdx-ast.js +4 -0
- package/src/mcp-server/mdx-ast.js.map +1 -1
- package/src/mcp-server/schema-registry.d.ts +9 -3
- package/src/mcp-server/schema-registry.js +22 -6
- package/src/mcp-server/schema-registry.js.map +1 -1
- package/src/mcp-server/server.js +3 -3
- package/src/mcp-server/server.js.map +1 -1
- package/src/mcp-server/tools/create-workspace-command.d.ts +1 -1
- package/src/mcp-server/tools/create-workspace-command.js +4 -4
- package/src/mcp-server/tools/create-workspace-command.js.map +1 -1
- package/src/mcp-server/tools/general-guidance.d.ts +2 -2
- package/src/mcp-server/tools/general-guidance.js +2 -2
- package/src/mcp-server/tools/general-guidance.js.map +1 -1
- package/src/mcp-server/tools/generator-guide.d.ts +2 -2
- package/src/mcp-server/tools/generator-guide.js.map +1 -1
- package/src/mcp-server/tools/list-generators.d.ts +2 -2
- package/src/mcp-server/tools/list-generators.js +1 -1
- package/src/mcp-server/tools/list-generators.js.map +1 -1
- package/src/open-api/ts-client/__snapshots__/generator.reserved-keywords.spec.ts.snap +1 -1
- package/src/open-api/ts-client/generator.d.ts +3 -3
- package/src/open-api/ts-client/generator.js +2 -2
- package/src/open-api/ts-client/generator.js.map +1 -1
- package/src/open-api/ts-hooks/generator.d.ts +3 -3
- package/src/open-api/ts-hooks/generator.js +2 -2
- package/src/open-api/ts-hooks/generator.js.map +1 -1
- package/src/open-api/ts-hooks/generator.spec.tsx +14 -14
- package/src/open-api/ts-metadata/generator.d.ts +3 -3
- package/src/open-api/ts-metadata/generator.js +1 -1
- package/src/open-api/ts-metadata/generator.js.map +1 -1
- package/src/open-api/utils/codegen-data/languages.d.ts +5 -1
- package/src/open-api/utils/codegen-data/languages.js +4 -4
- package/src/open-api/utils/codegen-data/languages.js.map +1 -1
- package/src/open-api/utils/codegen-data.d.ts +6 -2
- package/src/open-api/utils/codegen-data.js +6 -6
- package/src/open-api/utils/codegen-data.js.map +1 -1
- package/src/open-api/utils/normalise.d.ts +5 -1
- package/src/open-api/utils/normalise.js +5 -5
- package/src/open-api/utils/normalise.js.map +1 -1
- package/src/open-api/utils/parse.d.ts +2 -2
- package/src/open-api/utils/parse.js +4 -0
- package/src/open-api/utils/parse.js.map +1 -1
- package/src/open-api/utils/refs.d.ts +1 -1
- package/src/preset/__snapshots__/generator.spec.ts.snap +131 -13
- package/src/preset/generator.d.ts +4 -4
- package/src/preset/generator.js +21 -14
- package/src/preset/generator.js.map +1 -1
- package/src/preset/schema.d.ts +3 -1
- package/src/preset/schema.json +5 -0
- package/src/py/agent/__snapshots__/generator.spec.ts.snap +659 -21
- package/src/py/agent/a2a-connection/__snapshots__/generator.spec.ts.snap +201 -0
- package/src/py/agent/a2a-connection/files/agent-connection/app/__targetAgentSnakeCase___client_strands.py.template +30 -0
- package/src/py/agent/a2a-connection/generator.d.ts +3 -3
- package/src/py/agent/a2a-connection/generator.js +11 -10
- package/src/py/agent/a2a-connection/generator.js.map +1 -1
- package/src/py/agent/files/common/agent.py.template +2 -0
- package/src/py/agent/files/http/init.py.template +7 -25
- package/src/py/agent/files/http/main.py.template +2 -3
- package/src/py/agent/gateway-connection/__snapshots__/generator.spec.ts.snap +197 -0
- package/src/py/agent/gateway-connection/files/agent-connection/app/__gatewaySnakeCase___client_strands.py.template +35 -0
- package/src/py/agent/gateway-connection/generator.d.ts +10 -0
- package/src/py/agent/gateway-connection/generator.js +106 -0
- package/src/py/agent/gateway-connection/generator.js.map +1 -0
- package/src/py/agent/gateway-connection/schema.d.ts +12 -0
- package/src/py/agent/gateway-connection/schema.json +26 -0
- package/src/py/agent/generator.d.ts +3 -3
- package/src/py/agent/generator.js +47 -38
- package/src/py/agent/generator.js.map +1 -1
- package/src/py/agent/mcp-connection/__snapshots__/generator.spec.ts.snap +167 -81
- package/src/py/agent/mcp-connection/files/agent-connection/app/__mcpServerSnakeCase___client_strands.py.template +30 -0
- package/src/py/agent/mcp-connection/generator.d.ts +3 -3
- package/src/py/agent/mcp-connection/generator.js +11 -81
- package/src/py/agent/mcp-connection/generator.js.map +1 -1
- package/src/py/agent/react-connection/__snapshots__/generator.spec.ts.snap +8 -17
- package/src/py/agent/react-connection/generator.d.ts +3 -3
- package/src/py/agent/react-connection/generator.js +4 -4
- package/src/py/agent/react-connection/generator.js.map +1 -1
- package/src/py/agent/react-connection/serve-local.d.ts +2 -2
- package/src/py/agent/react-connection/serve-local.js.map +1 -1
- package/src/py/api/generator.d.ts +3 -3
- package/src/py/api/generator.js.map +1 -1
- package/src/py/dynamodb/__snapshots__/generator.spec.ts.snap +1486 -0
- package/src/py/dynamodb/agent-connection/__snapshots__/generator.spec.ts.snap +45 -0
- package/src/py/dynamodb/agent-connection/generator.d.ts +10 -0
- package/src/py/dynamodb/agent-connection/generator.js +39 -0
- package/src/py/dynamodb/agent-connection/generator.js.map +1 -0
- package/src/py/dynamodb/agent-connection/schema.d.ts +14 -0
- package/src/py/dynamodb/agent-connection/schema.json +22 -0
- package/src/py/dynamodb/fast-api-connection/__snapshots__/generator.spec.ts.snap +23 -0
- package/src/py/dynamodb/fast-api-connection/generator.d.ts +10 -0
- package/src/py/dynamodb/fast-api-connection/generator.js +37 -0
- package/src/py/dynamodb/fast-api-connection/generator.js.map +1 -0
- package/src/py/dynamodb/fast-api-connection/schema.d.ts +12 -0
- package/src/py/dynamodb/fast-api-connection/schema.json +18 -0
- package/src/py/dynamodb/files/__name__/__init__.py.template +6 -0
- package/src/py/dynamodb/files/__name__/client.py.template +39 -0
- package/src/py/dynamodb/files/__name__/entities/__init__.py.template +4 -0
- package/src/py/dynamodb/files/__name__/entities/base.py.template +63 -0
- package/src/py/dynamodb/files/__name__/entities/example.py.template +64 -0
- package/src/py/dynamodb/files/config.json.template +24 -0
- package/src/py/dynamodb/generator.d.ts +10 -0
- package/src/py/dynamodb/generator.js +106 -0
- package/src/py/dynamodb/generator.js.map +1 -0
- package/src/py/dynamodb/mcp-server-connection/__snapshots__/generator.spec.ts.snap +45 -0
- package/src/py/dynamodb/mcp-server-connection/generator.d.ts +10 -0
- package/src/py/dynamodb/mcp-server-connection/generator.js +39 -0
- package/src/py/dynamodb/mcp-server-connection/generator.js.map +1 -0
- package/src/py/dynamodb/mcp-server-connection/schema.d.ts +14 -0
- package/src/py/dynamodb/mcp-server-connection/schema.json +22 -0
- package/src/py/dynamodb/schema.d.ts +15 -0
- package/src/py/dynamodb/schema.json +70 -0
- package/src/py/fast-api/__snapshots__/generator.spec.ts.snap +167 -39
- package/src/py/fast-api/files/app/__name__/init.py.template +5 -22
- package/src/py/fast-api/files/app/__name__/main.py.template +4 -1
- package/src/py/fast-api/generator.d.ts +3 -3
- package/src/py/fast-api/generator.js +23 -17
- package/src/py/fast-api/generator.js.map +1 -1
- package/src/py/fast-api/react/__snapshots__/generator.spec.ts.snap +1 -1
- package/src/py/fast-api/react/generator.d.ts +3 -3
- package/src/py/fast-api/react/generator.js +2 -2
- package/src/py/fast-api/react/generator.js.map +1 -1
- package/src/py/fast-api/react/open-api.d.ts +1 -1
- package/src/py/fast-api/react/open-api.js +5 -2
- package/src/py/fast-api/react/open-api.js.map +1 -1
- package/src/py/lambda-function/generator.d.ts +3 -3
- package/src/py/lambda-function/generator.js +11 -11
- package/src/py/lambda-function/generator.js.map +1 -1
- package/src/py/mcp-server/__snapshots__/generator.spec.ts.snap +83 -13
- package/src/py/mcp-server/generator.d.ts +3 -3
- package/src/py/mcp-server/generator.js +33 -26
- package/src/py/mcp-server/generator.js.map +1 -1
- package/src/py/project/generator.d.ts +3 -3
- package/src/py/project/generator.js +96 -70
- package/src/py/project/generator.js.map +1 -1
- package/src/smithy/project/__snapshots__/generator.spec.ts.snap +19 -16
- package/src/smithy/project/files/build.Dockerfile.template +1 -0
- package/src/smithy/project/files/src/operations/echo.smithy.template +1 -0
- package/src/smithy/project/generator.d.ts +3 -3
- package/src/smithy/project/generator.js +30 -28
- package/src/smithy/project/generator.js.map +1 -1
- package/src/smithy/react-connection/__snapshots__/generator.spec.ts.snap +1 -1
- package/src/smithy/react-connection/generator.d.ts +3 -3
- package/src/smithy/react-connection/generator.js +3 -3
- package/src/smithy/react-connection/generator.js.map +1 -1
- package/src/smithy/ts/api/__snapshots__/generator.spec.ts.snap +14 -34
- package/src/smithy/ts/api/generator.d.ts +3 -3
- package/src/smithy/ts/api/generator.js +18 -12
- package/src/smithy/ts/api/generator.js.map +1 -1
- package/src/terraform/project/files/application/src/main.tf.template +6 -1
- package/src/terraform/project/generator.d.ts +3 -3
- package/src/terraform/project/generator.js +13 -8
- package/src/terraform/project/generator.js.map +1 -1
- package/src/trpc/backend/__snapshots__/generator.spec.ts.snap +163 -18
- package/src/trpc/backend/files/src/procedures/echo.ts.template +1 -1
- package/src/trpc/backend/files/src/schema/echo.ts.template +2 -2
- package/src/trpc/backend/generator.d.ts +3 -3
- package/src/trpc/backend/generator.js +11 -10
- package/src/trpc/backend/generator.js.map +1 -1
- package/src/trpc/backend/schema.d.ts +2 -2
- package/src/trpc/react/__snapshots__/generator.spec.ts.snap +3 -3
- package/src/trpc/react/files/src/components/__apiNameClassName__ClientProvider.tsx.template +3 -3
- package/src/trpc/react/generator.d.ts +3 -3
- package/src/trpc/react/generator.js +5 -5
- package/src/trpc/react/generator.js.map +1 -1
- package/src/ts/agent/__snapshots__/generator.spec.ts.snap +652 -14
- package/src/ts/agent/a2a-connection/__snapshots__/generator.spec.ts.snap +256 -0
- package/src/ts/agent/a2a-connection/files/agent-connection/app/__targetAgentKebabCase__-client-strands.ts.template +23 -0
- package/src/ts/agent/a2a-connection/generator.d.ts +3 -3
- package/src/ts/agent/a2a-connection/generator.js +8 -8
- package/src/ts/agent/a2a-connection/generator.js.map +1 -1
- package/src/ts/agent/files/common/agent.ts.template +6 -2
- package/src/ts/agent/files/http/router.ts.template +1 -1
- package/src/ts/agent/gateway-connection/__snapshots__/generator.spec.ts.snap +220 -0
- package/src/ts/agent/gateway-connection/files/agent-connection/app/__gatewayKebabCase__-client-strands.ts.template +30 -0
- package/src/ts/agent/gateway-connection/generator.d.ts +10 -0
- package/src/ts/agent/gateway-connection/generator.js +106 -0
- package/src/ts/agent/gateway-connection/generator.js.map +1 -0
- package/src/ts/agent/gateway-connection/schema.d.ts +12 -0
- package/src/ts/agent/gateway-connection/schema.json +26 -0
- package/src/ts/agent/generator.d.ts +3 -3
- package/src/ts/agent/generator.js +44 -32
- package/src/ts/agent/generator.js.map +1 -1
- package/src/ts/agent/mcp-connection/__snapshots__/generator.spec.ts.snap +191 -110
- package/src/ts/agent/mcp-connection/files/agent-connection/app/__mcpServerKebabCase__-client-strands.ts.template +22 -0
- package/src/ts/agent/mcp-connection/generator.d.ts +3 -3
- package/src/ts/agent/mcp-connection/generator.js +9 -21
- package/src/ts/agent/mcp-connection/generator.js.map +1 -1
- package/src/ts/agent/react-connection/generator.d.ts +3 -3
- package/src/ts/agent/react-connection/generator.js +9 -9
- package/src/ts/agent/react-connection/generator.js.map +1 -1
- package/src/ts/agent/react-connection/serve-local.d.ts +2 -2
- package/src/ts/api/generator.d.ts +3 -3
- package/src/ts/api/generator.js +4 -4
- package/src/ts/api/generator.js.map +1 -1
- package/src/ts/api/schema.d.ts +2 -1
- package/src/ts/astro-docs/__snapshots__/generator.spec.ts.snap +7 -8
- package/src/ts/astro-docs/generator.d.ts +3 -3
- package/src/ts/astro-docs/generator.js +14 -11
- package/src/ts/astro-docs/generator.js.map +1 -1
- package/src/ts/docs/generator.d.ts +3 -3
- package/src/ts/docs/generator.js.map +1 -1
- package/src/ts/dynamodb/__snapshots__/generator.spec.ts.snap +1352 -0
- package/src/ts/dynamodb/agent-connection/__snapshots__/generator.spec.ts.snap +45 -0
- package/src/ts/dynamodb/agent-connection/generator.d.ts +10 -0
- package/src/ts/dynamodb/agent-connection/generator.js +32 -0
- package/src/ts/dynamodb/agent-connection/generator.js.map +1 -0
- package/src/ts/dynamodb/agent-connection/schema.d.ts +14 -0
- package/src/ts/dynamodb/agent-connection/schema.json +22 -0
- package/src/ts/dynamodb/files/config.json.template +24 -0
- package/src/ts/dynamodb/files/src/client.ts.template +61 -0
- package/src/ts/dynamodb/files/src/entities/example.ts.template +47 -0
- package/src/ts/dynamodb/files/src/entities/index.ts.template +1 -0
- package/src/ts/dynamodb/files/src/index.ts.template +2 -0
- package/src/ts/dynamodb/generator.d.ts +10 -0
- package/src/ts/dynamodb/generator.js +111 -0
- package/src/ts/dynamodb/generator.js.map +1 -0
- package/src/ts/dynamodb/mcp-server-connection/__snapshots__/generator.spec.ts.snap +45 -0
- package/src/ts/dynamodb/mcp-server-connection/generator.d.ts +10 -0
- package/src/ts/dynamodb/mcp-server-connection/generator.js +32 -0
- package/src/ts/dynamodb/mcp-server-connection/generator.js.map +1 -0
- package/src/ts/dynamodb/mcp-server-connection/schema.d.ts +14 -0
- package/src/ts/dynamodb/mcp-server-connection/schema.json +22 -0
- package/src/ts/dynamodb/schema.d.ts +15 -0
- package/src/ts/dynamodb/schema.json +70 -0
- package/src/ts/dynamodb/smithy-connection/__snapshots__/generator.spec.ts.snap +23 -0
- package/src/ts/dynamodb/smithy-connection/generator.d.ts +10 -0
- package/src/ts/dynamodb/smithy-connection/generator.js +30 -0
- package/src/ts/dynamodb/smithy-connection/generator.js.map +1 -0
- package/src/ts/dynamodb/smithy-connection/schema.d.ts +12 -0
- package/src/ts/dynamodb/smithy-connection/schema.json +18 -0
- package/src/ts/dynamodb/trpc-connection/__snapshots__/generator.spec.ts.snap +23 -0
- package/src/ts/dynamodb/trpc-connection/generator.d.ts +10 -0
- package/src/ts/dynamodb/trpc-connection/generator.js +30 -0
- package/src/ts/dynamodb/trpc-connection/generator.js.map +1 -0
- package/src/ts/dynamodb/trpc-connection/schema.d.ts +12 -0
- package/src/ts/dynamodb/trpc-connection/schema.json +18 -0
- package/src/ts/lambda-function/generator.d.ts +3 -3
- package/src/ts/lambda-function/generator.js +8 -8
- package/src/ts/lambda-function/generator.js.map +1 -1
- package/src/ts/lib/__snapshots__/generator.spec.ts.snap +32 -65
- package/src/ts/lib/__snapshots__/vitest.spec.ts.snap +24 -0
- package/src/ts/lib/biome.d.ts +7 -0
- package/src/ts/lib/biome.js +58 -0
- package/src/ts/lib/biome.js.map +1 -0
- package/src/ts/lib/generator.d.ts +3 -3
- package/src/ts/lib/generator.js +27 -29
- package/src/ts/lib/generator.js.map +1 -1
- package/src/ts/lib/grit/vitest-pass-with-no-tests.grit +1 -4
- package/src/ts/lib/ts-project-utils.d.ts +12 -2
- package/src/ts/lib/ts-project-utils.js +30 -10
- package/src/ts/lib/ts-project-utils.js.map +1 -1
- package/src/ts/lib/vitest.d.ts +2 -2
- package/src/ts/lib/vitest.js +1 -1
- package/src/ts/lib/vitest.js.map +1 -1
- package/src/ts/mcp-server/__snapshots__/generator.spec.ts.snap +82 -12
- package/src/ts/mcp-server/generator.d.ts +3 -3
- package/src/ts/mcp-server/generator.js +34 -12
- package/src/ts/mcp-server/generator.js.map +1 -1
- package/src/ts/nx-generator/__snapshots__/generator.spec.ts.snap +19 -14
- package/src/ts/nx-generator/generator.d.ts +2 -2
- package/src/ts/nx-generator/generator.js +52 -19
- package/src/ts/nx-generator/generator.js.map +1 -1
- package/src/ts/nx-plugin/generator.d.ts +3 -3
- package/src/ts/nx-plugin/generator.js +10 -9
- package/src/ts/nx-plugin/generator.js.map +1 -1
- package/src/ts/nx-plugin/utils.d.ts +1 -1
- package/src/ts/nx-plugin/utils.js +10 -4
- package/src/ts/nx-plugin/utils.js.map +1 -1
- package/src/ts/rdb/__snapshots__/generator.spec.ts.snap +252 -388
- package/src/ts/rdb/agent-connection/generator.d.ts +3 -3
- package/src/ts/rdb/agent-connection/generator.js +4 -4
- package/src/ts/rdb/agent-connection/generator.js.map +1 -1
- package/src/ts/rdb/files/config.json.template +14 -0
- package/src/ts/rdb/files/prisma.config.ts.template +5 -4
- package/src/ts/rdb/files/src/index.ts.template +0 -1
- package/src/ts/rdb/files/src/prisma.ts.template +26 -21
- package/src/ts/rdb/generator.d.ts +3 -7
- package/src/ts/rdb/generator.js +52 -41
- package/src/ts/rdb/generator.js.map +1 -1
- package/src/ts/rdb/mcp-server-connection/generator.d.ts +3 -3
- package/src/ts/rdb/mcp-server-connection/generator.js +4 -4
- package/src/ts/rdb/mcp-server-connection/generator.js.map +1 -1
- package/src/ts/rdb/smithy-connection/generator.d.ts +3 -3
- package/src/ts/rdb/smithy-connection/generator.js +4 -4
- package/src/ts/rdb/smithy-connection/generator.js.map +1 -1
- package/src/ts/rdb/trpc-connection/generator.d.ts +3 -3
- package/src/ts/rdb/trpc-connection/generator.js +3 -3
- package/src/ts/rdb/trpc-connection/generator.js.map +1 -1
- package/src/ts/rdb/utils.d.ts +1 -1
- package/src/ts/react-website/agui/files/common/src/hooks/useAgui__agentNameClassName__.tsx.template +1 -16
- package/src/ts/react-website/agui/generator.d.ts +1 -1
- package/src/ts/react-website/agui/generator.js +4 -5
- package/src/ts/react-website/agui/generator.js.map +1 -1
- package/src/ts/react-website/app/__snapshots__/generator.spec.ts.snap +530 -367
- package/src/ts/react-website/app/generator.d.ts +3 -3
- package/src/ts/react-website/app/generator.js +21 -17
- package/src/ts/react-website/app/generator.js.map +1 -1
- package/src/ts/react-website/cognito-auth/__snapshots__/generator.spec.ts.snap +1 -7
- package/src/ts/react-website/cognito-auth/__snapshots__/generator.terraform.spec.ts.snap +9 -3
- package/src/ts/react-website/cognito-auth/__snapshots__/generator.ux-provider.spec.ts.snap +0 -20
- package/src/ts/react-website/cognito-auth/generator.d.ts +3 -3
- package/src/ts/react-website/cognito-auth/generator.js +10 -13
- package/src/ts/react-website/cognito-auth/generator.js.map +1 -1
- package/src/ts/react-website/cognito-auth/grit/cloudscape-auth-menu.grit +8 -6
- package/src/ts/react-website/cognito-auth/grit/cognito-auth-wrapper.grit +1 -1
- package/src/ts/react-website/cognito-auth/grit/none-auth-menu.grit +1 -0
- package/src/ts/react-website/cognito-auth/grit/shadcn-auth-menu.grit +3 -1
- package/src/ts/react-website/cognito-auth/grit/shadcn-state-declarations.grit +3 -1
- package/src/ts/react-website/cognito-auth/utils.d.ts +1 -1
- package/src/ts/react-website/cognito-auth/utils.js +1 -1
- package/src/ts/react-website/cognito-auth/utils.js.map +1 -1
- package/src/ts/react-website/runtime-config/generator.d.ts +3 -3
- package/src/ts/react-website/runtime-config/generator.js +4 -4
- package/src/ts/react-website/runtime-config/generator.js.map +1 -1
- package/src/ts/sync/generator.d.ts +3 -3
- package/src/ts/sync/generator.js +2 -2
- package/src/ts/sync/generator.js.map +1 -1
- package/src/ts/website/app/generator.d.ts +3 -3
- package/src/ts/website/app/generator.js +1 -1
- package/src/ts/website/app/generator.js.map +1 -1
- package/src/ts/website/auth/generator.d.ts +3 -3
- package/src/ts/website/auth/generator.js +1 -1
- package/src/ts/website/auth/generator.js.map +1 -1
- package/src/utils/agent-chat/agent-chat.d.ts +31 -0
- package/src/utils/agent-chat/agent-chat.js +30 -0
- package/src/utils/agent-chat/agent-chat.js.map +1 -0
- package/src/utils/agent-chat/files/a2a/chat.ts.template +33 -0
- package/src/utils/agent-chat/files/ag-ui/chat.ts.template +17 -0
- package/src/utils/agent-chat/files/common/agentcore.ts.template +81 -0
- package/src/utils/agent-chat/files/http-py/chat.ts.template +43 -0
- package/src/utils/agent-chat/files/http-ts/chat.ts.template +54 -0
- package/src/utils/agent-connection/agent-connection.d.ts +67 -24
- package/src/utils/agent-connection/agent-connection.js +236 -44
- package/src/utils/agent-connection/agent-connection.js.map +1 -1
- package/src/utils/agent-connection/files/core-a2a/agentcore-a2a-client-config.ts.template +93 -0
- package/src/utils/agent-connection/files/core-auth/agentcore-endpoints.ts.template +37 -0
- package/src/utils/agent-connection/files/core-auth/agentcore-fetch.ts.template +54 -0
- package/src/utils/agent-connection/files/core-gateway/agentcore-gateway-mcp-transport.ts.template +41 -0
- package/src/utils/agent-connection/files/core-mcp/agentcore-mcp-transport.ts.template +70 -0
- package/src/utils/agent-connection/files/core-runtime-config/runtime-config.ts.template +22 -32
- package/src/utils/agent-connection/files/core-shared/agentcore-transport.ts.template +39 -0
- package/src/utils/agent-connection/files/core-strands/a2a/agentcore-a2a-client-strands.ts.template +61 -0
- package/src/utils/agent-connection/files/core-strands/base/model-errors-strands.ts.template +36 -0
- package/src/utils/agent-connection/files/core-strands/gateway/agentcore-gateway-mcp-client-strands.ts.template +26 -0
- package/src/utils/agent-connection/files/core-strands/mcp/agentcore-mcp-client-strands.ts.template +27 -0
- package/src/utils/agent-connection/files/py-core-a2a/agentcore_a2a_client_config.py.template +43 -0
- package/src/utils/agent-connection/files/py-core-auth/agentcore_endpoints.py.template +47 -0
- package/src/utils/agent-connection/files/py-core-auth/auth/session.py.template +51 -0
- package/src/utils/agent-connection/files/py-core-gateway/agentcore_gateway_mcp_transport.py.template +28 -0
- package/src/utils/agent-connection/files/py-core-mcp/agentcore_mcp_transport.py.template +34 -0
- package/src/utils/agent-connection/files/py-core-runtime-config/runtime_config.py.template +5 -18
- package/src/utils/agent-connection/files/py-core-shared/agentcore_transport.py.template +40 -0
- package/src/utils/agent-connection/files/py-core-strands/a2a/agentcore_a2a_client_strands.py.template +66 -0
- package/src/utils/agent-connection/files/py-core-strands/base/model_errors_strands.py.template +40 -0
- package/src/utils/agent-connection/files/py-core-strands/gateway/agentcore_gateway_mcp_client_strands.py.template +22 -0
- package/src/utils/agent-connection/files/py-core-strands/mcp/agentcore_mcp_client_strands.py.template +30 -0
- package/src/utils/agent-core-constructs/agent-core-constructs.d.ts +11 -3
- package/src/utils/agent-core-constructs/agent-core-constructs.js +57 -12
- package/src/utils/agent-core-constructs/agent-core-constructs.js.map +1 -1
- package/src/utils/agent-core-constructs/files/cdk/app/agent-core/__nameKebabCase__/__nameKebabCase__.ts.template +4 -0
- package/src/utils/agent-core-constructs/files/cdk/app/agentcore-gateway/__nameKebabCase__/__nameKebabCase__.ts.template +40 -0
- package/src/utils/agent-core-constructs/files/cdk/core/agentcore-gateway/agentcore-gateway.ts.template +375 -0
- package/src/utils/agent-core-constructs/files/cdk/core/agentcore-gateway/readiness-probe/index.js.template +55 -0
- package/src/utils/agent-core-constructs/files/terraform/app/agentcore-gateway/__nameKebabCase__/__nameKebabCase__.tf.template +335 -0
- package/src/utils/agent-core-constructs/files/terraform/app/agentcore-gateway/__nameKebabCase__/render-cedar.cjs.template +13 -0
- package/src/utils/agent-core-constructs/files/terraform/core/agent-core/runtime.tf.template +77 -9
- package/src/utils/agent-core-constructs/files/terraform/core/agentcore-gateway/gateway.tf.template +14 -0
- package/src/utils/api-constructs/api-constructs.d.ts +2 -2
- package/src/utils/api-constructs/api-constructs.js +1 -1
- package/src/utils/api-constructs/api-constructs.js.map +1 -1
- package/src/utils/api-constructs/files/cdk/app/apis/rest/__apiNameKebabCase__.ts.template +3 -0
- package/src/utils/api-constructs/files/cdk/core/api/http/http-api.ts.template +9 -0
- package/src/utils/api-constructs/files/cdk/core/api/rest/rest-api.ts.template +23 -1
- package/src/utils/api-constructs/files/cdk/core/api/utils/utils.ts.template +61 -7
- package/src/utils/api-constructs/files/terraform/app/apis/rest/__apiNameKebabCase__/__apiNameKebabCase__.tf.template +3 -0
- package/src/utils/api-constructs/open-api-metadata.d.ts +2 -2
- package/src/utils/api-constructs/open-api-metadata.js.map +1 -1
- package/src/utils/ast/website.d.ts +5 -1
- package/src/utils/ast/website.js +3 -3
- package/src/utils/ast/website.js.map +1 -1
- package/src/utils/ast.d.ts +33 -1
- package/src/utils/ast.js +89 -4
- package/src/utils/ast.js.map +1 -1
- package/src/utils/bundle/bundle.d.ts +1 -1
- package/src/utils/bundle/bundle.js +2 -2
- package/src/utils/bundle/bundle.js.map +1 -1
- package/src/utils/config/index.d.ts +5 -5
- package/src/utils/config/utils.d.ts +13 -3
- package/src/utils/config/utils.js +37 -5
- package/src/utils/config/utils.js.map +1 -1
- package/src/utils/connection/open-api/files/components/__apiNameClassName__Provider.tsx.template +1 -1
- package/src/utils/connection/open-api/react.d.ts +1 -1
- package/src/utils/connection/open-api/react.js +4 -4
- package/src/utils/connection/open-api/react.js.map +1 -1
- package/src/utils/containers.d.ts +1 -1
- package/src/utils/dynamodb-constructs/dynamodb-constructs.d.ts +18 -0
- package/src/utils/dynamodb-constructs/dynamodb-constructs.js +49 -0
- package/src/utils/dynamodb-constructs/dynamodb-constructs.js.map +1 -0
- package/src/utils/dynamodb-constructs/files/cdk/app/dynamodb/__nameKebabCase__.ts.template +43 -0
- package/src/utils/dynamodb-constructs/files/cdk/core/dynamodb.ts.template +105 -0
- package/src/utils/dynamodb-constructs/files/terraform/app/dynamodb/__nameKebabCase__/__nameKebabCase__.tf.template +62 -0
- package/src/utils/dynamodb-constructs/files/terraform/core/dynamodb/dynamodb.tf.template +155 -0
- package/src/utils/files/common/scripts/src/dynamodb/create-local-table.ts.template +195 -0
- package/src/utils/files/common/scripts/src/dynamodb/pull-image.ts.template +13 -0
- package/src/utils/files/common/scripts/src/dynamodb/start-container.ts.template +91 -0
- package/src/utils/files/common/scripts/src/rdb/pull-image.ts.template +16 -0
- package/src/utils/files/common/scripts/src/rdb/start-container.ts.template +102 -0
- package/src/utils/files/common/scripts/src/rdb/wait-for-db.ts.template +59 -0
- package/src/utils/files/terraform/src/core/runtime-config/appconfig-deployment/appconfig-deployment.tf.template +9 -3
- package/src/utils/files/terraform/src/core/runtime-config/read/read.tf.template +7 -2
- package/src/utils/format.d.ts +45 -2
- package/src/utils/format.js +167 -46
- package/src/utils/format.js.map +1 -1
- package/src/utils/fs.d.ts +1 -1
- package/src/utils/fs.js.map +1 -1
- package/src/utils/function-constructs/function-constructs.d.ts +2 -2
- package/src/utils/function-constructs/function-constructs.js +1 -1
- package/src/utils/function-constructs/function-constructs.js.map +1 -1
- package/src/utils/generators.d.ts +4 -0
- package/src/utils/generators.js +4 -4
- package/src/utils/generators.js.map +1 -1
- package/src/utils/git.d.ts +1 -1
- package/src/utils/git.js.map +1 -1
- package/src/utils/iac.d.ts +1 -1
- package/src/utils/iac.js.map +1 -1
- package/src/utils/identity-constructs/files/cdk/core/user-identity.ts.template +1 -5
- package/src/utils/identity-constructs/files/terraform/core/user-identity/add-callback-url/add-callback-url.tf.template +9 -3
- package/src/utils/identity-constructs/files/terraform/core/user-identity/identity/identity.tf.template +2 -4
- package/src/utils/identity-constructs/identity-constructs.d.ts +2 -2
- package/src/utils/identity-constructs/identity-constructs.js +1 -1
- package/src/utils/identity-constructs/identity-constructs.js.map +1 -1
- package/src/utils/js.d.ts +4 -0
- package/src/utils/js.js +4 -4
- package/src/utils/js.js.map +1 -1
- package/src/utils/mcp.d.ts +25 -0
- package/src/utils/mcp.js +81 -0
- package/src/utils/mcp.js.map +1 -0
- package/src/utils/metrics.d.ts +9 -3
- package/src/utils/metrics.js +58 -28
- package/src/utils/metrics.js.map +1 -1
- package/src/utils/npm-scope.d.ts +1 -1
- package/src/utils/npm-scope.js.map +1 -1
- package/src/utils/nx.d.ts +7 -2
- package/src/utils/nx.js +46 -14
- package/src/utils/nx.js.map +1 -1
- package/src/utils/nxlv-python.d.ts +1 -1
- package/src/utils/paths.d.ts +1 -1
- package/src/utils/pnpm-workspace.d.ts +1 -1
- package/src/utils/pnpm-workspace.js.map +1 -1
- package/src/utils/port.d.ts +31 -3
- package/src/utils/port.js +74 -4
- package/src/utils/port.js.map +1 -1
- package/src/utils/py.d.ts +2 -2
- package/src/utils/py.js +13 -6
- package/src/utils/py.js.map +1 -1
- package/src/utils/rdb-constructs/files/cdk/app/dbs/__nameKebabCase__.ts.template +12 -2
- package/src/utils/rdb-constructs/files/cdk/core/rdb/aurora.ts.template +30 -1
- package/src/utils/rdb-constructs/files/terraform/app/dbs/__nameKebabCase__/__nameKebabCase__.tf.template +38 -16
- package/src/utils/rdb-constructs/files/terraform/core/rdb/aurora/aurora.tf.template +28 -13
- package/src/utils/rdb-constructs/rdb-constructs.d.ts +5 -4
- package/src/utils/rdb-constructs/rdb-constructs.js +3 -11
- package/src/utils/rdb-constructs/rdb-constructs.js.map +1 -1
- package/src/utils/shared-constructs-constants.d.ts +1 -0
- package/src/utils/shared-constructs-constants.js +2 -1
- package/src/utils/shared-constructs-constants.js.map +1 -1
- package/src/utils/shared-constructs.d.ts +2 -2
- package/src/utils/shared-constructs.js +7 -7
- package/src/utils/shared-constructs.js.map +1 -1
- package/src/utils/shared-dynamodb-scripts.d.ts +11 -0
- package/src/utils/shared-dynamodb-scripts.js +23 -0
- package/src/utils/shared-dynamodb-scripts.js.map +1 -0
- package/src/utils/shared-infra-config.d.ts +1 -1
- package/src/utils/shared-infra-config.js +1 -1
- package/src/utils/shared-infra-config.js.map +1 -1
- package/src/utils/shared-infra-scripts.d.ts +11 -0
- package/src/utils/shared-infra-scripts.js +35 -0
- package/src/utils/shared-infra-scripts.js.map +1 -0
- package/src/utils/shared-rdb-scripts.d.ts +11 -0
- package/src/utils/shared-rdb-scripts.js +20 -0
- package/src/utils/shared-rdb-scripts.js.map +1 -0
- package/src/utils/shared-scripts.d.ts +2 -5
- package/src/utils/shared-scripts.js +2 -23
- package/src/utils/shared-scripts.js.map +1 -1
- package/src/utils/shared-shadcn.d.ts +1 -1
- package/src/utils/shared-shadcn.js +1 -13
- package/src/utils/shared-shadcn.js.map +1 -1
- package/src/utils/test.d.ts +5 -1
- package/src/utils/test.js +9 -5
- package/src/utils/test.js.map +1 -1
- package/src/utils/toml.d.ts +1 -1
- package/src/utils/toml.js +4 -0
- package/src/utils/toml.js.map +1 -1
- package/src/utils/versions.d.ts +82 -83
- package/src/utils/versions.js +81 -82
- package/src/utils/versions.js.map +1 -1
- package/src/utils/website-constructs/files/cdk/core/static-website.ts.template +72 -5
- package/src/utils/website-constructs/files/terraform/core/static-website/static-website.tf.template +63 -15
- package/src/utils/website-constructs/website-constructs.d.ts +2 -2
- package/src/utils/website-constructs/website-constructs.js +1 -1
- package/src/utils/website-constructs/website-constructs.js.map +1 -1
- package/src/py/agent/a2a-connection/files/agent-connection/app/__targetAgentSnakeCase___client.py.template +0 -22
- package/src/py/agent/mcp-connection/files/agent-connection/app/__mcpServerSnakeCase___client.py.template +0 -22
- package/src/py/agent/scripts/http/chat.ts.template +0 -38
- package/src/ts/agent/a2a-connection/files/agent-connection/app/__targetAgentKebabCase__-client.ts.template +0 -19
- package/src/ts/agent/mcp-connection/files/agent-connection/app/__mcpServerKebabCase__-client.ts.template +0 -19
- package/src/ts/agent/scripts/http/chat.ts.template +0 -35
- package/src/ts/lib/eslint.d.ts +0 -14
- package/src/ts/lib/eslint.js +0 -90
- package/src/ts/lib/eslint.js.map +0 -1
- package/src/ts/lib/grit/eslint-dependency-checks-warn.grit +0 -1
- package/src/ts/rdb/files/scripts/docker-pull.ts.template +0 -15
- package/src/ts/rdb/files/scripts/docker-start.ts.template +0 -84
- package/src/ts/rdb/files/scripts/wait-for-db.ts.template +0 -55
- package/src/ts/rdb/files/src/constants.ts.template +0 -8
- package/src/utils/agent-connection/files/core-a2a/agentcore-a2a-client.ts.template +0 -123
- package/src/utils/agent-connection/files/core-mcp/agentcore-mcp-client.ts.template +0 -128
- package/src/utils/agent-connection/files/py-core-a2a/agentcore_a2a_client.py.template +0 -120
- package/src/utils/agent-connection/files/py-core-mcp/agentcore_mcp_client.py.template +0 -89
- /package/src/utils/agent-connection/files/{core-runtime-config/with-session-id.ts.template → core-strands/base/with-session-id-strands.ts.template} +0 -0
- /package/src/utils/agent-connection/files/{py-core-runtime-config/with_session_id.py.template → py-core-strands/base/with_session_id_strands.py.template} +0 -0
- /package/src/utils/files/common/scripts/src/{index.ts.template → infra/index.ts.template} +0 -0
- /package/src/utils/files/common/scripts/src/{infra-deploy.ts.template → infra/infra-deploy.ts.template} +0 -0
- /package/src/utils/files/common/scripts/src/{infra-destroy.ts.template → infra/infra-destroy.ts.template} +0 -0
- /package/src/utils/files/common/scripts/src/{stage-credentials → infra/stage-credentials}/cdk-command.ts.template +0 -0
- /package/src/utils/files/common/scripts/src/{stage-credentials → infra/stage-credentials}/credentials.ts.template +0 -0
- /package/src/utils/files/common/scripts/src/{stage-credentials → infra/stage-credentials}/run.ts.template +0 -0
- /package/src/utils/files/common/scripts/src/{stage-credentials → infra/stage-credentials}/stage-parser.ts.template +0 -0
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
3
|
* SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
*/
|
|
5
|
-
import { Tree } from '@nx/devkit';
|
|
6
|
-
import { Iac } from '../iac';
|
|
5
|
+
import { type Tree } from '@nx/devkit';
|
|
6
|
+
import type { Iac } from '../iac';
|
|
7
7
|
export interface AddLambdaFunctionConstructOptions {
|
|
8
8
|
functionProjectName: string;
|
|
9
9
|
nameClassName: string;
|
|
@@ -6,9 +6,9 @@ exports.addLambdaFunctionInfra = void 0;
|
|
|
6
6
|
* SPDX-License-Identifier: Apache-2.0
|
|
7
7
|
*/
|
|
8
8
|
const devkit_1 = require("@nx/devkit");
|
|
9
|
-
const shared_constructs_constants_1 = require("../shared-constructs-constants");
|
|
10
9
|
const ast_1 = require("../ast");
|
|
11
10
|
const nx_1 = require("../nx");
|
|
11
|
+
const shared_constructs_constants_1 = require("../shared-constructs-constants");
|
|
12
12
|
/**
|
|
13
13
|
* Add infrastructure for a lambda function
|
|
14
14
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"function-constructs.js","sourceRoot":"","sources":["../../../../../../packages/nx-plugin/src/utils/function-constructs/function-constructs.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACH,uCAOoB;AACpB,
|
|
1
|
+
{"version":3,"file":"function-constructs.js","sourceRoot":"","sources":["../../../../../../packages/nx-plugin/src/utils/function-constructs/function-constructs.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACH,uCAOoB;AACpB,gCAAuC;AAEvC,8BAA0D;AAC1D,gFAIwC;AAWxC;;GAEG;AACI,MAAM,sBAAsB,GAAG,KAAK,EACzC,IAAU,EACV,OAEC,EACD,EAAE;IACF,IAAI,OAAO,CAAC,GAAG,KAAK,KAAK,EAAE,CAAC;QAC1B,MAAM,8BAA8B,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IACtD,CAAC;SAAM,IAAI,OAAO,CAAC,GAAG,KAAK,WAAW,EAAE,CAAC;QACvC,iCAAiC,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IACnD,CAAC;SAAM,CAAC;QACN,MAAM,IAAI,KAAK,CAAC,mBAAmB,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC;IACpD,CAAC;IAED,IAAA,mBAAU,EACR,IAAI,EACJ,IAAA,0BAAiB,EACf,0CAAY,EACZ,OAAO,CAAC,GAAG,KAAK,KAAK,CAAC,CAAC,CAAC,mDAAqB,CAAC,CAAC,CAAC,kDAAoB,EACpE,cAAc,CACf,EACD,CAAC,MAA4B,EAAE,EAAE;QAC/B,IAAA,sCAAiC,EAC/B,MAAM,EACN,OAAO,EACP,GAAG,OAAO,CAAC,mBAAmB,QAA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AkB,CACnB,EACD;QACE,GAAG,OAAO;QACV,OAAO,EAAE,OAAO,CAAC,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,YAAY;KACpE,EACD;QACE,iBAAiB,EAAE,0BAAiB,CAAC,YAAY;KAClD,CACF,CAAC;AACJ,CAAC,CAAC"}
|
package/src/utils/generators.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.buildGeneratorInfoList = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
2
|
/**
|
|
6
3
|
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
7
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
8
5
|
*/
|
|
9
|
-
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.buildGeneratorInfoList = void 0;
|
|
8
|
+
const tslib_1 = require("tslib");
|
|
10
9
|
const path = tslib_1.__importStar(require("path"));
|
|
10
|
+
const generators_json_1 = tslib_1.__importDefault(require("../../generators.json"));
|
|
11
11
|
/**
|
|
12
12
|
* Build the list of generator info, resolving schema/factory paths relative to the given base directory.
|
|
13
13
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generators.js","sourceRoot":"","sources":["../../../../../packages/nx-plugin/src/utils/generators.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"generators.js","sourceRoot":"","sources":["../../../../../packages/nx-plugin/src/utils/generators.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;AAEH,mDAA6B;AAC7B,oFAAmD;AAiBnD;;GAEG;AACI,MAAM,sBAAsB,GAAG,CAAC,OAAe,EAAmB,EAAE,CACzE,MAAM,CAAC,OAAO,CAAE,yBAAsC,CAAC,UAAU,CAAC,CAAC,GAAG,CACpE,CAAC,CAAC,EAAE,EAAE,IAAI,CAAgB,EAAE,EAAE,CAAC,CAAC;IAC9B,EAAE;IACF,MAAM,EAAE,IAAI,CAAC,MAAM;IACnB,mBAAmB,EAAE,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC;IACxD,kBAAkB,EAAE,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC;IACtD,WAAW,EAAE,IAAI,CAAC,WAAW;IAC7B,GAAG,CAAC,QAAQ,IAAI,IAAI,IAAI,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;IACnE,GAAG,CAAC,YAAY,IAAI,IAAI,IAAI,IAAI,CAAC,UAAU;QACzC,CAAC,CAAC,EAAE,UAAU,EAAE,IAAI,CAAC,UAAU,EAAE;QACjC,CAAC,CAAC,EAAE,CAAC;CACR,CAAC,CACH,CAAC;AAbS,QAAA,sBAAsB,0BAa/B"}
|
package/src/utils/git.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
3
|
* SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
*/
|
|
5
|
-
import { Tree } from '@nx/devkit';
|
|
5
|
+
import { type Tree } from '@nx/devkit';
|
|
6
6
|
/**
|
|
7
7
|
* Returns all files from the tree root that are not gitignored (both tracked and untracked)
|
|
8
8
|
*/
|
package/src/utils/git.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"git.js","sourceRoot":"","sources":["../../../../../packages/nx-plugin/src/utils/git.ts"],"names":[],"mappings":";;;;AAAA;;;GAGG;AACH,
|
|
1
|
+
{"version":3,"file":"git.js","sourceRoot":"","sources":["../../../../../packages/nx-plugin/src/utils/git.ts"],"names":[],"mappings":";;;;AAAA;;;GAGG;AACH,uCAA0D;AAC1D,iDAAyC;AACzC,0EAAmC;AA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AAG,EAAE,YAAY,CAAC,CAAC;IAC3D,MAAM,gBAAgB,GAAG,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,OAAO,CAAC,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;IAC9E,MAAM,WAAW,GAAG,QAAQ,CAAC,gBAAgB,CAAC,CAAC;IAC/C,IAAI,CAAC,KAAK,CAAC,aAAa,EAAE,IAAA,uBAAM,EAAC,WAAW,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;AACtE,CAAC,CAAC;AATW,QAAA,eAAe,mBAS1B"}
|
package/src/utils/iac.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
3
|
* SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
*/
|
|
5
|
-
import { Tree } from '@nx/devkit';
|
|
5
|
+
import type { Tree } from '@nx/devkit';
|
|
6
6
|
export { IAC_PROVIDERS, type Iac, type IacOption } from './iac-providers';
|
|
7
7
|
import { IAC_PROVIDERS } from './iac-providers';
|
|
8
8
|
/**
|
package/src/utils/iac.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"iac.js","sourceRoot":"","sources":["../../../../../packages/nx-plugin/src/utils/iac.ts"],"names":[],"mappings":";;;AAKA,0CAGwB;AAExB,iDAA0E;AAAjE,8GAAA,aAAa,OAAA;
|
|
1
|
+
{"version":3,"file":"iac.js","sourceRoot":"","sources":["../../../../../packages/nx-plugin/src/utils/iac.ts"],"names":[],"mappings":";;;AAKA,0CAGwB;AAExB,iDAA0E;AAAjE,8GAAA,aAAa,OAAA;AAEtB,mDAAgD;AAYhD;;GAEG;AACI,MAAM,UAAU,GAAG,KAAK,EAC7B,IAAU,EACV,SAA0C,EACD,EAAE;IAC3C,IAAI,SAAS,KAAK,SAAS,EAAE,CAAC;QAC5B,MAAM,YAAY,GAAG,MAAM,IAAA,6BAAqB,EAAC,IAAI,CAAC,CAAC;QAEvD,IAAI,CAAC,YAAY,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC;YACjC,MAAM,IAAI,KAAK,CACb,6DAA6D,sCAA8B,EAAE,CAC9F,CAAC;QACJ,CAAC;QACD,IAAI,CAAC,6BAAa,CAAC,QAAQ,CAAC,YAAY,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC;YACvD,MAAM,IAAI,KAAK,CACb,mBAAmB,sCAA8B,mBAAmB,6BAAa,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAC/F,CAAC;QACJ,CAAC;QAED,OAAO,YAAY,CAAC,GAAG,CAAC,QAAQ,CAAC;IACnC,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC;AArBW,QAAA,UAAU,cAqBrB"}
|
|
@@ -128,11 +128,7 @@ export class UserIdentity extends Construct {
|
|
|
128
128
|
private createUserPoolClient = (userPool: UserPool) => {
|
|
129
129
|
const lazilyComputedCallbackUrls = Lazy.list({
|
|
130
130
|
produce: () =>
|
|
131
|
-
[
|
|
132
|
-
'http://localhost:4200',
|
|
133
|
-
'http://localhost:4300',
|
|
134
|
-
`https://${Stack.of(this).region}.console.aws.amazon.com`,
|
|
135
|
-
].concat(
|
|
131
|
+
['http://localhost:4200', 'http://localhost:4300'].concat(
|
|
136
132
|
this.findCloudFrontDistributions().map(
|
|
137
133
|
(d) => `https://${d.domainName}`
|
|
138
134
|
)
|
|
@@ -61,12 +61,13 @@ resource "null_resource" "add_callback_url" {
|
|
|
61
61
|
command = <<-EOT
|
|
62
62
|
uv run --with boto3 python -c "
|
|
63
63
|
import boto3
|
|
64
|
+
import os
|
|
64
65
|
import sys
|
|
65
66
|
|
|
66
67
|
# Configuration
|
|
67
|
-
user_pool_id =
|
|
68
|
-
client_id =
|
|
69
|
-
new_callback_url =
|
|
68
|
+
user_pool_id = os.environ['USER_POOL_ID']
|
|
69
|
+
client_id = os.environ['CLIENT_ID']
|
|
70
|
+
new_callback_url = os.environ['NEW_CALLBACK_URL']
|
|
70
71
|
|
|
71
72
|
# Initialize Cognito client
|
|
72
73
|
cognito = boto3.client('cognito-idp')
|
|
@@ -118,6 +119,11 @@ except Exception as e:
|
|
|
118
119
|
sys.exit(1)
|
|
119
120
|
"
|
|
120
121
|
EOT
|
|
122
|
+
environment = {
|
|
123
|
+
USER_POOL_ID = local.user_pool_id
|
|
124
|
+
CLIENT_ID = local.user_pool_client_id
|
|
125
|
+
NEW_CALLBACK_URL = var.callback_url
|
|
126
|
+
}
|
|
121
127
|
}
|
|
122
128
|
|
|
123
129
|
depends_on = [terraform_data.validate_cognito_props]
|
|
@@ -249,14 +249,12 @@ resource "aws_cognito_user_pool_client" "web_client" {
|
|
|
249
249
|
# OAuth-dependent URLs - set after OAuth configuration
|
|
250
250
|
callback_urls = concat([
|
|
251
251
|
"http://localhost:4200",
|
|
252
|
-
"http://localhost:4300"
|
|
253
|
-
"https://${data.aws_region.current.region}.console.aws.amazon.com"
|
|
252
|
+
"http://localhost:4300"
|
|
254
253
|
], var.callback_urls)
|
|
255
254
|
|
|
256
255
|
logout_urls = concat([
|
|
257
256
|
"http://localhost:4200",
|
|
258
|
-
"http://localhost:4300"
|
|
259
|
-
"https://${data.aws_region.current.region}.console.aws.amazon.com"
|
|
257
|
+
"http://localhost:4300"
|
|
260
258
|
], var.logout_urls)
|
|
261
259
|
|
|
262
260
|
# Security settings
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
3
|
* SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
*/
|
|
5
|
-
import { Tree } from '@nx/devkit';
|
|
6
|
-
import { Iac } from '../iac';
|
|
5
|
+
import { type Tree } from '@nx/devkit';
|
|
6
|
+
import type { Iac } from '../iac';
|
|
7
7
|
export interface AddIdentityInfraOptions {
|
|
8
8
|
cognitoDomain: string;
|
|
9
9
|
allowSignup: boolean;
|
|
@@ -6,8 +6,8 @@ exports.addIdentityInfra = void 0;
|
|
|
6
6
|
* SPDX-License-Identifier: Apache-2.0
|
|
7
7
|
*/
|
|
8
8
|
const devkit_1 = require("@nx/devkit");
|
|
9
|
-
const shared_constructs_constants_1 = require("../shared-constructs-constants");
|
|
10
9
|
const ast_1 = require("../ast");
|
|
10
|
+
const shared_constructs_constants_1 = require("../shared-constructs-constants");
|
|
11
11
|
/**
|
|
12
12
|
* Add infrastructure for a static website
|
|
13
13
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"identity-constructs.js","sourceRoot":"","sources":["../../../../../../packages/nx-plugin/src/utils/identity-constructs/identity-constructs.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACH,uCAKoB;AACpB,
|
|
1
|
+
{"version":3,"file":"identity-constructs.js","sourceRoot":"","sources":["../../../../../../packages/nx-plugin/src/utils/identity-constructs/identity-constructs.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACH,uCAKoB;AACpB,gCAAuC;AAEvC,gFAIwC;AAOxC;;GAEG;AACI,MAAM,gBAAgB,GAAG,KAAK,EACnC,IAAU,EACV,OAA+C,EAC/C,EAAE;IACF,IAAI,OAAO,CAAC,GAAG,KAAK,KAAK,EAAE,CAAC;QAC1B,MAAM,wBAAwB,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAChD,CAAC;SAAM,IAAI,OAAO,CAAC,GAAG,KAAK,WAAW,EAAE,CAAC;QACvC,2BAA2B,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAC7C,CAAC;SAAM,CAAC;QACN,MAAM,IAAI,KAAK,CAAC,mBAAmB,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC;IACpD,CAAC;AACH,CAAC,CAAC;AAXW,QAAA,gBAAgB,oBAW3B;AAEF,MAAM,wBAAwB,GAAG,KAAK,EACpC,IAAU,EACV,OAAgC,EAChC,EAAE;IACF,IAAA,sB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|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.importTypeScriptModule = exports.importJavaScriptModule = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
2
|
/**
|
|
6
3
|
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
7
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
8
5
|
*/
|
|
9
|
-
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.importTypeScriptModule = exports.importJavaScriptModule = void 0;
|
|
8
|
+
const tslib_1 = require("tslib");
|
|
10
9
|
const config_utils_1 = require("@nx/devkit/src/utils/config-utils");
|
|
10
|
+
const typescript_1 = tslib_1.__importDefault(require("typescript"));
|
|
11
11
|
/**
|
|
12
12
|
* Imports a javascript module from a string of js code
|
|
13
13
|
*/
|
package/src/utils/js.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"js.js","sourceRoot":"","sources":["../../../../../packages/nx-plugin/src/utils/js.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"js.js","sourceRoot":"","sources":["../../../../../packages/nx-plugin/src/utils/js.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;AAEH,oEAAkE;AAClE,oEAA4B;AAE5B;;GAEG;AACI,MAAM,sBAAsB,GAAG,KAAK,EAAK,MAAc,EAAc,EAAE;IAC5E,mHAAmH;IACnH,mEAAmE;IACnE,MAAM,MAAM,GAAG,MAAM,IAAA,4BAAa,EAChC,wBAAwB,kBAAkB,CAAC,MAAM,CAAC,EAAE,CACrD,CAAC;IAEF,oEAAoE;IACpE,OAAO,CAAC,MAAM,CAAC,OAAO,IAAI,MAAM,CAAM,CAAC;AACzC,CAAC,CAAC;AATW,QAAA,sBAAsB,0BASjC;AAEF;;GAEG;AACI,MAAM,sBAAsB,GAAG,KAAK,EAAK,MAAc,EAAc,EAAE;IAC5E,iDAAiD;IACjD,MAAM,MAAM,GAAG,oBAAE,CAAC,eAAe,CAAC,MAAM,EAAE;QACxC,eAAe,EAAE,EAAE,MAAM,EAAE,oBAAE,CAAC,UAAU,CAAC,MAAM,EAAE;KAClD,CAAC,CAAC,UAAU,CAAC;IACd,OAAO,MAAM,IAAA,8BAAsB,EAAI,MAAM,CAAC,CAAC;AACjD,CAAC,CAAC;AANW,QAAA,sBAAsB,0BAMjC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*/
|
|
5
|
+
import { type Tree } from '@nx/devkit';
|
|
6
|
+
/**
|
|
7
|
+
* Name of the Nx Plugin for AWS MCP server, used as the key in each agent's config.
|
|
8
|
+
*/
|
|
9
|
+
export declare const NX_PLUGIN_MCP_SERVER_NAME = "nx-plugin-for-aws";
|
|
10
|
+
/**
|
|
11
|
+
* Command used to launch the Nx Plugin for AWS MCP server.
|
|
12
|
+
*/
|
|
13
|
+
export declare const NX_PLUGIN_MCP_SERVER_COMMAND = "npx";
|
|
14
|
+
/**
|
|
15
|
+
* Arguments used to launch the Nx Plugin for AWS MCP server.
|
|
16
|
+
*/
|
|
17
|
+
export declare const NX_PLUGIN_MCP_SERVER_ARGS: string[];
|
|
18
|
+
/**
|
|
19
|
+
* Configure the Nx Plugin for AWS MCP server across the project-level config locations
|
|
20
|
+
* used by common coding agents, so agents working in the workspace can use it to scaffold
|
|
21
|
+
* AWS projects with the Nx Plugin for AWS.
|
|
22
|
+
*
|
|
23
|
+
* Existing servers and unrelated config in each file are preserved.
|
|
24
|
+
*/
|
|
25
|
+
export declare const configureMcpServers: (tree: Tree) => void;
|
package/src/utils/mcp.js
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.configureMcpServers = exports.NX_PLUGIN_MCP_SERVER_ARGS = exports.NX_PLUGIN_MCP_SERVER_COMMAND = exports.NX_PLUGIN_MCP_SERVER_NAME = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
6
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
7
|
+
*/
|
|
8
|
+
const devkit_1 = require("@nx/devkit");
|
|
9
|
+
const toml_1 = require("./toml");
|
|
10
|
+
/**
|
|
11
|
+
* Name of the Nx Plugin for AWS MCP server, used as the key in each agent's config.
|
|
12
|
+
*/
|
|
13
|
+
exports.NX_PLUGIN_MCP_SERVER_NAME = 'nx-plugin-for-aws';
|
|
14
|
+
/**
|
|
15
|
+
* Command used to launch the Nx Plugin for AWS MCP server.
|
|
16
|
+
*/
|
|
17
|
+
exports.NX_PLUGIN_MCP_SERVER_COMMAND = 'npx';
|
|
18
|
+
/**
|
|
19
|
+
* Arguments used to launch the Nx Plugin for AWS MCP server.
|
|
20
|
+
*/
|
|
21
|
+
exports.NX_PLUGIN_MCP_SERVER_ARGS = ['-y', '@aws/nx-plugin-mcp@next'];
|
|
22
|
+
/**
|
|
23
|
+
* A single stdio MCP server entry, shared by agents that use the `mcpServers` config shape.
|
|
24
|
+
*/
|
|
25
|
+
const stdioServerEntry = () => ({
|
|
26
|
+
command: exports.NX_PLUGIN_MCP_SERVER_COMMAND,
|
|
27
|
+
args: exports.NX_PLUGIN_MCP_SERVER_ARGS,
|
|
28
|
+
});
|
|
29
|
+
/**
|
|
30
|
+
* Merge the Nx Plugin for AWS MCP server into a JSON config file under the given key,
|
|
31
|
+
* preserving any other servers already configured. Creates the file if it does not exist.
|
|
32
|
+
*/
|
|
33
|
+
const mergeJsonMcpConfig = (tree, filePath, key, entry) => {
|
|
34
|
+
const config = tree.exists(filePath) ? (0, devkit_1.readJson)(tree, filePath) : {};
|
|
35
|
+
config[key] = {
|
|
36
|
+
...config[key],
|
|
37
|
+
[exports.NX_PLUGIN_MCP_SERVER_NAME]: entry,
|
|
38
|
+
};
|
|
39
|
+
(0, devkit_1.writeJson)(tree, filePath, config);
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* Configure the Nx Plugin for AWS MCP server across the project-level config locations
|
|
43
|
+
* used by common coding agents, so agents working in the workspace can use it to scaffold
|
|
44
|
+
* AWS projects with the Nx Plugin for AWS.
|
|
45
|
+
*
|
|
46
|
+
* Existing servers and unrelated config in each file are preserved.
|
|
47
|
+
*/
|
|
48
|
+
const configureMcpServers = (tree) => {
|
|
49
|
+
// Agents using the `mcpServers` config shape (Claude Code, Cursor, Kiro, Gemini CLI)
|
|
50
|
+
const mcpServersFiles = [
|
|
51
|
+
'.mcp.json', // Claude Code
|
|
52
|
+
'.cursor/mcp.json', // Cursor
|
|
53
|
+
'.kiro/settings/mcp.json', // Kiro
|
|
54
|
+
'.gemini/settings.json', // Gemini CLI
|
|
55
|
+
];
|
|
56
|
+
for (const filePath of mcpServersFiles) {
|
|
57
|
+
mergeJsonMcpConfig(tree, filePath, 'mcpServers', stdioServerEntry());
|
|
58
|
+
}
|
|
59
|
+
// GitHub Copilot uses the `servers` key with an explicit `type`
|
|
60
|
+
mergeJsonMcpConfig(tree, '.vscode/mcp.json', 'servers', {
|
|
61
|
+
type: 'stdio',
|
|
62
|
+
...stdioServerEntry(),
|
|
63
|
+
});
|
|
64
|
+
// OpenAI Codex CLI uses TOML under the `mcp_servers` table
|
|
65
|
+
const codexConfig = '.codex/config.toml';
|
|
66
|
+
if (!tree.exists(codexConfig)) {
|
|
67
|
+
tree.write(codexConfig, '');
|
|
68
|
+
}
|
|
69
|
+
(0, toml_1.updateToml)(tree, codexConfig, (prev) => ({
|
|
70
|
+
...prev,
|
|
71
|
+
mcp_servers: {
|
|
72
|
+
...prev.mcp_servers,
|
|
73
|
+
[exports.NX_PLUGIN_MCP_SERVER_NAME]: {
|
|
74
|
+
command: exports.NX_PLUGIN_MCP_SERVER_COMMAND,
|
|
75
|
+
args: exports.NX_PLUGIN_MCP_SERVER_ARGS,
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
}));
|
|
79
|
+
};
|
|
80
|
+
exports.configureMcpServers = configureMcpServers;
|
|
81
|
+
//# sourceMappingURL=mcp.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mcp.js","sourceRoot":"","sources":["../../../../../packages/nx-plugin/src/utils/mcp.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACH,uCAA4D;AAC5D,iCAAoC;AAEpC;;GAEG;AACU,QAAA,yBAAyB,GAAG,mBAAmB,CAAC;AAE7D;;GAEG;AACU,QAAA,4BAA4B,GAAG,KAAK,CAAC;AAElD;;GAEG;AACU,QAAA,yBAAyB,GAAG,CAAC,IAAI,EAAE,yBAAyB,CAAC,CAAC;AAE3E;;GAEG;AACH,MAAM,gBAAgB,GAAG,GAAG,EAAE,CAAC,CAAC;IAC9B,OAAO,EAAE,oCAA4B;IACrC,IAAI,EAAE,iCAAyB;CAChC,CAAC,CAAC;AAEH;;;GAGG;AACH,MAAM,kBAAkB,GAAG,CACzB,IAAU,EACV,QAAgB,EAChB,GAA6B,EAC7B,KAA8B,EAC9B,EAAE;IACF,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,IAAA,iBAAQ,EAAC,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IACrE,MAAM,CAAC,GAAG,CAAC,GAAG;QACZ,GAAG,MAAM,CAAC,GAAG,CAAC;QACd,CAAC,iCAAyB,CAAC,EAAE,KAAK;KACnC,CAAC;IACF,IAAA,kBAAS,EAAC,IAAI,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;AACpC,CAAC,CAAC;AAEF;;;;;;GAMG;AACI,MAAM,mBAAmB,GAAG,CAAC,IAAU,EAAE,EAAE;IAChD,qFAAqF;IACrF,MAAM,eAAe,GAAG;QACtB,WAAW,EAAE,cAAc;QAC3B,kBAAkB,EAAE,SAAS;QAC7B,yBAAyB,EAAE,OAAO;QAClC,uBAAuB,EAAE,aAAa;KACvC,CAAC;IACF,KAAK,MAAM,QAAQ,IAAI,eAAe,EAAE,CAAC;QACvC,kBAAkB,CAAC,IAAI,EAAE,QAAQ,EAAE,YAAY,EAAE,gBAAgB,EAAE,CAAC,CAAC;IACvE,CAAC;IAED,gEAAgE;IAChE,kBAAkB,CAAC,IAAI,EAAE,kBAAkB,EAAE,SAAS,EAAE;QACtD,IAAI,EAAE,OAAO;QACb,GAAG,gBAAgB,EAAE;KACtB,CAAC,CAAC;IAEH,2DAA2D;IAC3D,MAAM,WAAW,GAAG,oBAAoB,CAAC;IACzC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,EAAE,CAAC;QAC9B,IAAI,CAAC,KAAK,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;IAC9B,CAAC;IACD,IAAA,iBAAU,EAAC,IAAI,EAAE,WAAW,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;QACvC,GAAG,IAAI;QACP,WAAW,EAAE;YACX,GAAI,IAAI,CAAC,WAAsB;YAC/B,CAAC,iCAAyB,CAAC,EAAE;gBAC3B,OAAO,EAAE,oCAA4B;gBACrC,IAAI,EAAE,iCAAyB;aAChC;SACF;KACF,CAAC,CAAC,CAAC;AACN,CAAC,CAAC;AAjCW,QAAA,mBAAmB,uBAiC9B"}
|
package/src/utils/metrics.d.ts
CHANGED
|
@@ -2,13 +2,19 @@
|
|
|
2
2
|
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
3
|
* SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
*/
|
|
5
|
-
import { Tree } from '@nx/devkit';
|
|
6
|
-
import { NxGeneratorInfo } from './nx';
|
|
5
|
+
import { type Tree } from '@nx/devkit';
|
|
6
|
+
import { type NxGeneratorInfo } from './nx';
|
|
7
7
|
export declare const METRIC_ID = "uksb-4wk0bqpg5s";
|
|
8
8
|
export declare const METRICS_ASPECT_FILE_PATH: string;
|
|
9
9
|
export declare const TERRAFORM_METRICS_FILE_PATH: string;
|
|
10
10
|
/**
|
|
11
11
|
* Instruments metrics by updating the MetricsAspect in common/constructs/src/core/app.ts if the file exists,
|
|
12
|
-
* or updating the Terraform metrics CloudFormation stack if it exists
|
|
12
|
+
* and/or updating the Terraform metrics CloudFormation stack if it exists.
|
|
13
|
+
*
|
|
14
|
+
* Both files are converged to the same tag set (the union of tags already
|
|
15
|
+
* present in either file plus the incoming generators). This keeps the tag set
|
|
16
|
+
* deterministic regardless of the order in which metrics files are created
|
|
17
|
+
* across a multi-generator run, so re-running the same set of generators does
|
|
18
|
+
* not grow the tags.
|
|
13
19
|
*/
|
|
14
20
|
export declare const addGeneratorMetricsIfApplicable: (tree: Tree, generatorInfo: NxGeneratorInfo[]) => Promise<void>;
|
package/src/utils/metrics.js
CHANGED
|
@@ -18,48 +18,78 @@ exports.METRICS_ASPECT_FILE_PATH = (0, devkit_1.joinPathFragments)(shared_constr
|
|
|
18
18
|
exports.TERRAFORM_METRICS_FILE_PATH = (0, devkit_1.joinPathFragments)(shared_constructs_constants_1.PACKAGES_DIR, shared_constructs_constants_1.SHARED_TERRAFORM_DIR, 'src', 'metrics', 'metrics.tf');
|
|
19
19
|
// GritQL `within` clause to scope matches to the MetricsAspect class body
|
|
20
20
|
const WITHIN_METRICS_ASPECT = '$old <: within `class MetricsAspect implements $_ { $_ }`';
|
|
21
|
+
// Strip the surrounding quotes from a captured string literal (eg 'g1' or "g1")
|
|
22
|
+
const unquote = (literal) => literal.slice(1, -1);
|
|
23
|
+
// Extracts the existing metric tags from the CDK MetricsAspect tags array
|
|
24
|
+
const readCdkMetricTags = async (tree) => (await (0, ast_1.captureAllGritQL)(tree, exports.METRICS_ASPECT_FILE_PATH, `\`$tag\` where { $tag <: string(), $tag <: within \`const tags: string[] = $_\` }`)).map(unquote);
|
|
25
|
+
// Extracts the existing metric tags from the Terraform metric_tags array
|
|
26
|
+
const readTerraformMetricTags = async (tree) => (await (0, ast_1.captureAllGritQL)(tree, exports.TERRAFORM_METRICS_FILE_PATH, '`"$tag"` where { $tag <: within `metric_tags = $_` }')).map(unquote);
|
|
21
27
|
/**
|
|
22
28
|
* Instruments metrics by updating the MetricsAspect in common/constructs/src/core/app.ts if the file exists,
|
|
23
|
-
* or updating the Terraform metrics CloudFormation stack if it exists
|
|
29
|
+
* and/or updating the Terraform metrics CloudFormation stack if it exists.
|
|
30
|
+
*
|
|
31
|
+
* Both files are converged to the same tag set (the union of tags already
|
|
32
|
+
* present in either file plus the incoming generators). This keeps the tag set
|
|
33
|
+
* deterministic regardless of the order in which metrics files are created
|
|
34
|
+
* across a multi-generator run, so re-running the same set of generators does
|
|
35
|
+
* not grow the tags.
|
|
24
36
|
*/
|
|
25
37
|
const addGeneratorMetricsIfApplicable = async (tree, generatorInfo) => {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
` where { ${WITHIN_METRICS_ASPECT} }`);
|
|
31
|
-
// Update the version
|
|
32
|
-
await (0, ast_1.applyGritQL)(tree, exports.METRICS_ASPECT_FILE_PATH, `\`const version = $old\` => \`const version = '${(0, nx_1.getPackageVersion)()}'\`` +
|
|
33
|
-
` where { ${WITHIN_METRICS_ASPECT} }`);
|
|
34
|
-
// Add each generator as a tag
|
|
35
|
-
for (const info of generatorInfo) {
|
|
36
|
-
await (0, ast_1.applyGritQL)(tree, exports.METRICS_ASPECT_FILE_PATH, `\`const tags: string[] = $old\`` +
|
|
37
|
-
` where { ${WITHIN_METRICS_ASPECT},` +
|
|
38
|
-
` if ($old <: \`[]\`) { $old => \`['${info.metric}']\` }` +
|
|
39
|
-
` else { $old <: \`[$items]\` where { $items += \`, '${info.metric}'\` } },` +
|
|
40
|
-
` $old <: not contains \`'${info.metric}'\` }`);
|
|
41
|
-
}
|
|
42
|
-
await (0, format_1.formatFilesInSubtree)(tree, exports.METRICS_ASPECT_FILE_PATH);
|
|
38
|
+
const cdkExists = tree.exists(exports.METRICS_ASPECT_FILE_PATH);
|
|
39
|
+
const terraformExists = tree.exists(exports.TERRAFORM_METRICS_FILE_PATH);
|
|
40
|
+
if (!cdkExists && !terraformExists) {
|
|
41
|
+
return;
|
|
43
42
|
}
|
|
44
|
-
//
|
|
45
|
-
|
|
46
|
-
|
|
43
|
+
// Converge both files to the union of all known tags so the set is stable
|
|
44
|
+
// regardless of when each metrics file was created.
|
|
45
|
+
const tags = [
|
|
46
|
+
...new Set([
|
|
47
|
+
...(await readCdkMetricTags(tree)),
|
|
48
|
+
...(await readTerraformMetricTags(tree)),
|
|
49
|
+
...generatorInfo.map((info) => info.metric),
|
|
50
|
+
]),
|
|
51
|
+
];
|
|
52
|
+
if (cdkExists) {
|
|
53
|
+
await updateCdkMetrics(tree, tags);
|
|
54
|
+
}
|
|
55
|
+
if (terraformExists) {
|
|
56
|
+
await updateTerraformMetrics(tree, tags);
|
|
47
57
|
}
|
|
48
58
|
};
|
|
49
59
|
exports.addGeneratorMetricsIfApplicable = addGeneratorMetricsIfApplicable;
|
|
50
60
|
/**
|
|
51
|
-
* Updates the
|
|
61
|
+
* Updates the CDK MetricsAspect with the metric id, version and tags
|
|
62
|
+
*/
|
|
63
|
+
const updateCdkMetrics = async (tree, tags) => {
|
|
64
|
+
// Update the id
|
|
65
|
+
await (0, ast_1.applyGritQL)(tree, exports.METRICS_ASPECT_FILE_PATH, `\`const id = $old\` => \`const id = '${exports.METRIC_ID}'\`` +
|
|
66
|
+
` where { ${WITHIN_METRICS_ASPECT} }`);
|
|
67
|
+
// Update the version
|
|
68
|
+
await (0, ast_1.applyGritQL)(tree, exports.METRICS_ASPECT_FILE_PATH, `\`const version = $old\` => \`const version = '${(0, nx_1.getPackageVersion)()}'\`` +
|
|
69
|
+
` where { ${WITHIN_METRICS_ASPECT} }`);
|
|
70
|
+
// Add each tag, leaving existing tags in place to keep re-runs stable
|
|
71
|
+
for (const tag of tags) {
|
|
72
|
+
await (0, ast_1.applyGritQL)(tree, exports.METRICS_ASPECT_FILE_PATH, `\`const tags: string[] = $old\`` +
|
|
73
|
+
` where { ${WITHIN_METRICS_ASPECT},` +
|
|
74
|
+
` if ($old <: \`[]\`) { $old => \`['${tag}']\` }` +
|
|
75
|
+
` else { $old <: \`[$items]\` where { $items += \`, '${tag}'\` } },` +
|
|
76
|
+
` $old <: not contains \`'${tag}'\` }`);
|
|
77
|
+
}
|
|
78
|
+
await (0, format_1.formatFilesInSubtree)(tree, exports.METRICS_ASPECT_FILE_PATH);
|
|
79
|
+
};
|
|
80
|
+
/**
|
|
81
|
+
* Updates the Terraform metrics CloudFormation stack with the metric id, version and tags
|
|
52
82
|
*/
|
|
53
|
-
const updateTerraformMetrics = async (tree,
|
|
83
|
+
const updateTerraformMetrics = async (tree, tags) => {
|
|
54
84
|
// Update metric_id
|
|
55
85
|
await (0, ast_1.applyGritQL)(tree, exports.TERRAFORM_METRICS_FILE_PATH, `\`metric_id = $old\` => \`metric_id = "${exports.METRIC_ID}"\``);
|
|
56
86
|
// Update metric_version
|
|
57
87
|
await (0, ast_1.applyGritQL)(tree, exports.TERRAFORM_METRICS_FILE_PATH, `\`metric_version = $old\` => \`metric_version = "${(0, nx_1.getPackageVersion)()}"\``);
|
|
58
|
-
//
|
|
59
|
-
for (const
|
|
60
|
-
await (0, ast_1.applyGritQL)(tree, exports.TERRAFORM_METRICS_FILE_PATH, `or { \`metric_tags = []\` => \`metric_tags = ["${
|
|
61
|
-
` \`metric_tags = [$items]\` where { $items += \`, "${
|
|
62
|
-
` where { $items <: not contains \`"${
|
|
88
|
+
// Add each tag, leaving existing tags in place to keep re-runs stable
|
|
89
|
+
for (const tag of tags) {
|
|
90
|
+
await (0, ast_1.applyGritQL)(tree, exports.TERRAFORM_METRICS_FILE_PATH, `or { \`metric_tags = []\` => \`metric_tags = ["${tag}"]\`,` +
|
|
91
|
+
` \`metric_tags = [$items]\` where { $items += \`, "${tag}"\` }` +
|
|
92
|
+
` where { $items <: not contains \`"${tag}"\` } }`);
|
|
63
93
|
}
|
|
64
94
|
};
|
|
65
95
|
//# sourceMappingURL=metrics.js.map
|
package/src/utils/metrics.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"metrics.js","sourceRoot":"","sources":["../../../../../packages/nx-plugin/src/utils/metrics.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACH,
|
|
1
|
+
{"version":3,"file":"metrics.js","sourceRoot":"","sources":["../../../../../packages/nx-plugin/src/utils/metrics.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACH,uCAA0D;AAC1D,+BAAsD;AACtD,qCAAgD;AAChD,6BAA+D;AAC/D,+EAIuC;AAEvC,iDAAiD;AACpC,QAAA,SAAS,GAAG,iBAAiB,CAAC;AAE3C,kDAAkD;AACrC,QAAA,wBAAwB,GAAG,IAAA,0BAAiB,EACvD,0CAAY,EACZ,mDAAqB,EACrB,KAAK,EACL,MAAM,EACN,QAAQ,CACT,CAAC;AAEF,qEAAqE;AACxD,QAAA,2BAA2B,GAAG,IAAA,0BAAiB,EAC1D,0CAAY,EACZ,kDAAoB,EACpB,KAAK,EACL,SAAS,EACT,YAAY,CACb,CAAC;AAEF,0EAA0E;AAC1E,MAAM,qBAAqB,GACzB,2DAA2D,CAAC;AAE9D,gFAAgF;AAChF,MAAM,OAAO,GAAG,CAAC,OAAe,EAAU,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;AAElE,0EAA0E;AAC1E,MAAM,iBAAiB,GAAG,KAAK,EAAE,IAAU,EAAqB,EAAE,CAChE,CACE,MAAM,IAAA,sBAAgB,EACpB,IAAI,EACJ,gCAAwB,EACxB,mFAAmF,CACpF,CACF,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;AAEjB,yEAAyE;AACzE,MAAM,uBAAuB,GAAG,KAAK,EAAE,IAAU,EAAqB,EAAE,CACtE,CACE,MAAM,IAAA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EACxB,kDAAkD,IAAA,sBAAiB,GAAE,KAAK;QACxE,YAAY,qBAAqB,IAAI,CACxC,CAAC;IAEF,sEAAsE;IACtE,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;QACvB,MAAM,IAAA,iBAAW,EACf,IAAI,EACJ,gCAAwB,EACxB,iCAAiC;YAC/B,YAAY,qBAAqB,GAAG;YACpC,sCAAsC,GAAG,QAAQ;YACjD,uDAAuD,GAAG,UAAU;YACpE,4BAA4B,GAAG,OAAO,CACzC,CAAC;IACJ,CAAC;IAED,MAAM,IAAA,6BAAoB,EAAC,IAAI,EAAE,gCAAwB,CAAC,CAAC;AAC7D,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,sBAAsB,GAAG,KAAK,EAAE,IAAU,EAAE,IAAc,EAAE,EAAE;IAClE,mBAAmB;IACnB,MAAM,IAAA,iBAAW,EACf,IAAI,EACJ,mCAA2B,EAC3B,0CAA0C,iBAAS,KAAK,CACzD,CAAC;IAEF,wBAAwB;IACxB,MAAM,IAAA,iBAAW,EACf,IAAI,EACJ,mCAA2B,EAC3B,oDAAoD,IAAA,sBAAiB,GAAE,KAAK,CAC7E,CAAC;IAEF,sEAAsE;IACtE,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;QACvB,MAAM,IAAA,iBAAW,EACf,IAAI,EACJ,mCAA2B,EAC3B,kDAAkD,GAAG,OAAO;YAC1D,sDAAsD,GAAG,OAAO;YAChE,sCAAsC,GAAG,SAAS,CACrD,CAAC;IACJ,CAAC;AACH,CAAC,CAAC"}
|
package/src/utils/npm-scope.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
3
|
* SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
*/
|
|
5
|
-
import { Tree } from '@nx/devkit';
|
|
5
|
+
import { type Tree } from '@nx/devkit';
|
|
6
6
|
export declare function getNpmScope(tree: Tree): string | undefined;
|
|
7
7
|
export declare function getNpmScopePrefix(tree: Tree): string | undefined;
|
|
8
8
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"npm-scope.js","sourceRoot":"","sources":["../../../../../packages/nx-plugin/src/utils/npm-scope.ts"],"names":[],"mappings":";;AAKA,kCAOC;AACD,8CAGC;AAID,oCAIC;AAxBD;;;GAGG;AACH,
|
|
1
|
+
{"version":3,"file":"npm-scope.js","sourceRoot":"","sources":["../../../../../packages/nx-plugin/src/utils/npm-scope.ts"],"names":[],"mappings":";;AAKA,kCAOC;AACD,8CAGC;AAID,oCAIC;AAxBD;;;GAGG;AACH,uCAAiD;AACjD,SAAgB,WAAW,CAAC,IAAU;IACpC,MAAM,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC;QAC1C,CAAC,CAAC,IAAA,iBAAQ,EAEL,IAAI,EAAE,cAAc,CAAC;QAC1B,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IACnB,OAAO,IAAI,EAAE,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC;AAC9E,CAAC;AACD,SAAgB,iBAAiB,CAAC,IAAU;IAC1C,MAAM,QAAQ,GAAG,WAAW,CAAC,IAAI,CAAC,CAAC;IACnC,OAAO,IAAI,QAAQ,GAAG,CAAC;AACzB,CAAC;AACD;;GAEG;AACH,SAAgB,YAAY,CAAC,qBAA6B;IACxD,OAAO,qBAAqB,CAAC,UAAU,CAAC,GAAG,CAAC;QAC1C,CAAC,CAAC,IAAI,qBAAqB,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE;QACtC,CAAC,CAAC,qBAAqB,CAAC;AAC5B,CAAC"}
|
package/src/utils/nx.d.ts
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
3
|
* SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
*/
|
|
5
|
-
import { ProjectConfiguration, Tree } from '@nx/devkit';
|
|
6
|
-
export type {
|
|
5
|
+
import { type ProjectConfiguration, type Tree } from '@nx/devkit';
|
|
6
|
+
export type { GeneratorInfo, NxGeneratorInfo } from './generators';
|
|
7
7
|
export { buildGeneratorInfoList } from './generators';
|
|
8
8
|
import { type GeneratorInfo } from './generators';
|
|
9
9
|
/**
|
|
@@ -20,6 +20,11 @@ export declare const getPackageVersion: () => string;
|
|
|
20
20
|
* Read a project configuration where the project name may not be fully qualified (ie may omit the scope prefix)
|
|
21
21
|
*/
|
|
22
22
|
export declare const readProjectConfigurationUnqualified: (tree: Tree, projectName: string) => ProjectConfiguration;
|
|
23
|
+
/**
|
|
24
|
+
* Returns whether a project with the given name already exists in the workspace.
|
|
25
|
+
* The project name may be unqualified (ie may omit the scope prefix).
|
|
26
|
+
*/
|
|
27
|
+
export declare const projectExists: (tree: Tree, projectName: string) => boolean;
|
|
23
28
|
/**
|
|
24
29
|
* Add metadata about the generator that generated the project to the project.json
|
|
25
30
|
*/
|