@aws/nx-plugin 1.0.0-rc.23 → 1.0.0-rc.25
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 +3643 -1208
- package/package.json +30 -15
- package/src/agentcore-gateway/attach-upstream.d.ts +7 -7
- package/src/agentcore-gateway/attach-upstream.js +19 -22
- package/src/agentcore-gateway/attach-upstream.js.map +1 -1
- package/src/agentcore-gateway/gateway-connection/generator.d.ts +4 -4
- package/src/agentcore-gateway/gateway-connection/generator.js +45 -46
- package/src/agentcore-gateway/gateway-connection/generator.js.map +1 -1
- package/src/agentcore-gateway/gateway-connection/schema.d.js +6 -0
- package/src/agentcore-gateway/gateway-connection/schema.d.js.map +1 -0
- package/src/agentcore-gateway/gateway-connection/schema.d.ts +1 -0
- package/src/agentcore-gateway/gateway-connection/schema.json +5 -0
- package/src/agentcore-gateway/generator.js +93 -73
- package/src/agentcore-gateway/generator.js.map +1 -1
- package/src/agentcore-gateway/mcp-connection/generator.d.ts +3 -3
- package/src/agentcore-gateway/mcp-connection/generator.js +27 -31
- package/src/agentcore-gateway/mcp-connection/generator.js.map +1 -1
- package/src/agentcore-gateway/mcp-connection/schema.d.js +6 -0
- package/src/agentcore-gateway/mcp-connection/schema.d.js.map +1 -0
- package/src/agentcore-gateway/mcp-connection/schema.d.ts +1 -0
- package/src/agentcore-gateway/mcp-connection/schema.json +5 -0
- package/src/agentcore-gateway/schema.d.js +6 -0
- package/src/agentcore-gateway/schema.d.js.map +1 -0
- package/src/agentcore-gateway/schema.d.ts +1 -0
- package/src/agentcore-gateway/schema.json +5 -0
- package/src/bin/aws-nx-mcp.js +14 -0
- package/src/bin/aws-nx-mcp.js.map +1 -0
- package/src/connection/{agent-serve-local.d.ts → agent-local-dev.d.ts} +5 -5
- package/src/connection/agent-local-dev.js +42 -0
- package/src/connection/agent-local-dev.js.map +1 -0
- package/src/connection/agent-runtime-config.js +9 -14
- package/src/connection/agent-runtime-config.js.map +1 -1
- package/src/connection/generator.d.ts +1 -0
- package/src/connection/generator.js +265 -206
- package/src/connection/generator.js.map +1 -1
- package/src/connection/{serve-local.d.ts → local-dev.d.ts} +3 -3
- package/src/connection/local-dev.js +37 -0
- package/src/connection/local-dev.js.map +1 -0
- package/src/connection/schema.d.js +6 -0
- package/src/connection/schema.d.js.map +1 -0
- package/src/connection/schema.d.ts +1 -0
- package/src/connection/schema.json +5 -0
- package/src/index.js +2 -5
- package/src/index.js.map +1 -1
- package/src/infra/app/__snapshots__/generator.spec.ts.snap +33 -47
- package/src/infra/app/generator.js +140 -124
- package/src/infra/app/generator.js.map +1 -1
- package/src/infra/app/schema.d.js +6 -0
- package/src/infra/app/schema.d.js.map +1 -0
- package/src/infra/app/schema.d.ts +1 -1
- package/src/infra/app/schema.json +5 -0
- package/src/license/config-types.js +5 -3
- package/src/license/config-types.js.map +1 -1
- package/src/license/config.d.ts +1 -1
- package/src/license/config.js +267 -242
- package/src/license/config.js.map +1 -1
- package/src/license/dependency-check/check.js +51 -46
- package/src/license/dependency-check/check.js.map +1 -1
- package/src/license/dependency-check/collectors/collector.js +41 -71
- package/src/license/dependency-check/collectors/collector.js.map +1 -1
- package/src/license/dependency-check/collectors/npm-collector.js +34 -41
- package/src/license/dependency-check/collectors/npm-collector.js.map +1 -1
- package/src/license/dependency-check/collectors/python-collector.js +55 -62
- package/src/license/dependency-check/collectors/python-collector.js.map +1 -1
- package/src/license/dependency-check/evaluator.js +40 -68
- package/src/license/dependency-check/evaluator.js.map +1 -1
- package/src/license/dependency-check/executor.js +30 -22
- package/src/license/dependency-check/executor.js.map +1 -1
- package/src/license/dependency-check/pre-approved.js +949 -336
- package/src/license/dependency-check/pre-approved.js.map +1 -1
- package/src/license/dependency-check/types.js +2 -3
- package/src/license/dependency-check/types.js.map +1 -1
- package/src/license/generator.js +55 -60
- package/src/license/generator.js.map +1 -1
- package/src/license/index.js +3 -9
- package/src/license/index.js.map +1 -1
- package/src/license/known-exceptions.js +14 -13
- package/src/license/known-exceptions.js.map +1 -1
- package/src/license/schema.d.js +6 -0
- package/src/license/schema.d.js.map +1 -0
- package/src/license/schema.d.ts +2 -0
- package/src/license/schema.json +5 -0
- package/src/license/sync/generator.js +94 -119
- package/src/license/sync/generator.js.map +1 -1
- package/src/license/sync/project-file-sync.js +28 -35
- package/src/license/sync/project-file-sync.js.map +1 -1
- package/src/mcp-server/generator-info.js +130 -160
- package/src/mcp-server/generator-info.js.map +1 -1
- package/src/mcp-server/guide-pipeline.js +184 -206
- package/src/mcp-server/guide-pipeline.js.map +1 -1
- package/src/mcp-server/guide-render.js +10 -25
- package/src/mcp-server/guide-render.js.map +1 -1
- package/src/mcp-server/index.js +6 -10
- package/src/mcp-server/index.js.map +1 -1
- package/src/mcp-server/mdx-ast.js +39 -57
- package/src/mcp-server/mdx-ast.js.map +1 -1
- package/src/mcp-server/option-filter.js +33 -47
- package/src/mcp-server/option-filter.js.map +1 -1
- package/src/mcp-server/schema-registry.js +27 -40
- package/src/mcp-server/schema-registry.js.map +1 -1
- package/src/mcp-server/schema.js +9 -7
- package/src/mcp-server/schema.js.map +1 -1
- package/src/mcp-server/server.js +20 -24
- package/src/mcp-server/server.js.map +1 -1
- package/src/mcp-server/tools/create-workspace-command.js +23 -24
- package/src/mcp-server/tools/create-workspace-command.js.map +1 -1
- package/src/mcp-server/tools/general-guidance.js +45 -25
- package/src/mcp-server/tools/general-guidance.js.map +1 -1
- package/src/mcp-server/tools/generator-guide.js +29 -37
- package/src/mcp-server/tools/generator-guide.js.map +1 -1
- package/src/mcp-server/tools/list-generators.js +19 -25
- package/src/mcp-server/tools/list-generators.js.map +1 -1
- package/src/open-api/ts-client/generator.js +16 -26
- package/src/open-api/ts-client/generator.js.map +1 -1
- package/src/open-api/ts-client/schema.d.js +6 -0
- package/src/open-api/ts-client/schema.d.js.map +1 -0
- package/src/open-api/ts-hooks/generator.js +13 -21
- package/src/open-api/ts-hooks/generator.js.map +1 -1
- package/src/open-api/ts-hooks/schema.d.js +6 -0
- package/src/open-api/ts-hooks/schema.d.js.map +1 -0
- package/src/open-api/ts-metadata/generator.js +12 -20
- package/src/open-api/ts-metadata/generator.js.map +1 -1
- package/src/open-api/ts-metadata/schema.d.js +6 -0
- package/src/open-api/ts-metadata/schema.d.js.map +1 -0
- package/src/open-api/utils/codegen-data/languages.js +42 -60
- package/src/open-api/utils/codegen-data/languages.js.map +1 -1
- package/src/open-api/utils/codegen-data/types.js +31 -30
- package/src/open-api/utils/codegen-data/types.js.map +1 -1
- package/src/open-api/utils/codegen-data.js +253 -269
- package/src/open-api/utils/codegen-data.js.map +1 -1
- package/src/open-api/utils/normalise.js +242 -241
- package/src/open-api/utils/normalise.js.map +1 -1
- package/src/open-api/utils/parse.js +8 -14
- package/src/open-api/utils/parse.js.map +1 -1
- package/src/open-api/utils/refs.js +12 -22
- package/src/open-api/utils/refs.js.map +1 -1
- package/src/open-api/utils/types.js +5 -2
- package/src/open-api/utils/types.js.map +1 -1
- package/src/preset/__snapshots__/generator.spec.ts.snap +32 -7
- package/src/preset/generator.d.ts +1 -1
- package/src/preset/generator.js +134 -113
- package/src/preset/generator.js.map +1 -1
- package/src/preset/schema.d.js +6 -0
- package/src/preset/schema.d.js.map +1 -0
- package/src/preset/schema.d.ts +1 -1
- package/src/preset/schema.json +5 -5
- package/src/py/agent/__snapshots__/generator.constructs.spec.ts.snap +304 -0
- package/src/py/agent/__snapshots__/{generator.spec.ts.snap → generator.frameworks.spec.ts.snap} +16 -853
- package/src/py/agent/__snapshots__/generator.protocols.spec.ts.snap +535 -0
- package/src/py/agent/a2a-connection/__snapshots__/generator.spec.ts.snap +1 -2
- package/src/py/agent/a2a-connection/files/agent-connection/app/__targetAgentSnakeCase___client_strands.py.template +1 -1
- package/src/py/agent/a2a-connection/files/langchain/agent-connection/app/__targetAgentSnakeCase___client_langchain.py.template +1 -1
- package/src/py/agent/a2a-connection/generator.js +74 -75
- package/src/py/agent/a2a-connection/generator.js.map +1 -1
- package/src/py/agent/a2a-connection/schema.d.js +8 -0
- package/src/py/agent/a2a-connection/schema.d.js.map +1 -0
- package/src/py/agent/a2a-connection/schema.d.ts +1 -0
- package/src/py/agent/a2a-connection/schema.json +5 -0
- package/src/py/agent/gateway-connection/__snapshots__/generator.spec.ts.snap +6 -8
- package/src/py/agent/gateway-connection/files/agent-connection/app/__gatewaySnakeCase___client_strands.py.template +3 -3
- package/src/py/agent/gateway-connection/files/langchain/agent-connection/app/__gatewaySnakeCase___client_langchain.py.template +3 -3
- package/src/py/agent/gateway-connection/generator.js +65 -58
- package/src/py/agent/gateway-connection/generator.js.map +1 -1
- package/src/py/agent/gateway-connection/schema.d.js +6 -0
- package/src/py/agent/gateway-connection/schema.d.js.map +1 -0
- package/src/py/agent/gateway-connection/schema.d.ts +1 -0
- package/src/py/agent/gateway-connection/schema.json +5 -0
- package/src/py/agent/generator.js +230 -194
- package/src/py/agent/generator.js.map +1 -1
- package/src/py/agent/mcp-connection/__snapshots__/generator.spec.ts.snap +5 -12
- package/src/py/agent/mcp-connection/files/agent-connection/app/__mcpServerSnakeCase___client_strands.py.template +1 -1
- package/src/py/agent/mcp-connection/files/langchain/agent-connection/app/__mcpServerSnakeCase___client_langchain.py.template +1 -1
- package/src/py/agent/mcp-connection/generator.js +57 -52
- package/src/py/agent/mcp-connection/generator.js.map +1 -1
- package/src/py/agent/mcp-connection/schema.d.js +8 -0
- package/src/py/agent/mcp-connection/schema.d.js.map +1 -0
- package/src/py/agent/mcp-connection/schema.d.ts +1 -0
- package/src/py/agent/mcp-connection/schema.json +5 -0
- package/src/py/agent/react-connection/__snapshots__/generator.spec.ts.snap +3 -2
- package/src/py/agent/react-connection/generator.d.ts +1 -1
- package/src/py/agent/react-connection/generator.js +55 -59
- package/src/py/agent/react-connection/generator.js.map +1 -1
- package/src/py/agent/react-connection/{serve-local.d.ts → local-dev.d.ts} +4 -4
- package/src/py/agent/react-connection/local-dev.js +36 -0
- package/src/py/agent/react-connection/local-dev.js.map +1 -0
- package/src/py/agent/react-connection/schema.d.js +8 -0
- package/src/py/agent/react-connection/schema.d.js.map +1 -0
- package/src/py/agent/react-connection/schema.d.ts +1 -0
- package/src/py/agent/react-connection/schema.json +5 -0
- package/src/py/agent/schema.d.js +6 -0
- package/src/py/agent/schema.d.js.map +1 -0
- package/src/py/agent/schema.d.ts +1 -0
- package/src/py/agent/schema.json +5 -0
- package/src/py/api/generator.js +12 -11
- package/src/py/api/generator.js.map +1 -1
- package/src/py/api/schema.d.js +6 -0
- package/src/py/api/schema.d.js.map +1 -0
- package/src/py/api/schema.d.ts +1 -0
- package/src/py/api/schema.json +5 -0
- package/src/py/dynamodb/__snapshots__/generator.spec.ts.snap +68 -28
- package/src/py/dynamodb/agent-connection/__snapshots__/generator.spec.ts.snap +5 -5
- package/src/py/dynamodb/agent-connection/generator.js +30 -30
- package/src/py/dynamodb/agent-connection/generator.js.map +1 -1
- package/src/py/dynamodb/agent-connection/schema.d.js +8 -0
- package/src/py/dynamodb/agent-connection/schema.d.js.map +1 -0
- package/src/py/dynamodb/agent-connection/schema.d.ts +1 -0
- package/src/py/dynamodb/agent-connection/schema.json +5 -0
- package/src/py/dynamodb/fast-api-connection/__snapshots__/generator.spec.ts.snap +3 -3
- package/src/py/dynamodb/fast-api-connection/generator.js +29 -29
- package/src/py/dynamodb/fast-api-connection/generator.js.map +1 -1
- package/src/py/dynamodb/fast-api-connection/schema.d.js +8 -0
- package/src/py/dynamodb/fast-api-connection/schema.d.js.map +1 -0
- package/src/py/dynamodb/fast-api-connection/schema.d.ts +1 -0
- package/src/py/dynamodb/fast-api-connection/schema.json +5 -0
- package/src/py/dynamodb/files/__name__/client.py.template +5 -5
- package/src/py/dynamodb/files/__name__/entities/base.py.template +2 -2
- package/src/py/dynamodb/files/config.json.template +1 -1
- package/src/py/dynamodb/generator.js +66 -62
- package/src/py/dynamodb/generator.js.map +1 -1
- package/src/py/dynamodb/mcp-server-connection/__snapshots__/generator.spec.ts.snap +5 -5
- package/src/py/dynamodb/mcp-server-connection/generator.js +30 -30
- package/src/py/dynamodb/mcp-server-connection/generator.js.map +1 -1
- package/src/py/dynamodb/mcp-server-connection/schema.d.js +8 -0
- package/src/py/dynamodb/mcp-server-connection/schema.d.js.map +1 -0
- package/src/py/dynamodb/mcp-server-connection/schema.d.ts +1 -0
- package/src/py/dynamodb/mcp-server-connection/schema.json +5 -0
- package/src/py/dynamodb/schema.d.js +6 -0
- package/src/py/dynamodb/schema.d.js.map +1 -0
- package/src/py/dynamodb/schema.d.ts +1 -0
- package/src/py/dynamodb/schema.json +5 -0
- package/src/py/fast-api/__snapshots__/generator.spec.ts.snap +45 -4632
- package/src/py/fast-api/__snapshots__/generator.terraform.spec.ts.snap +4833 -0
- package/src/py/fast-api/generator.js +82 -85
- package/src/py/fast-api/generator.js.map +1 -1
- package/src/py/fast-api/react/__snapshots__/generator.spec.ts.snap +3 -2
- package/src/py/fast-api/react/generator.d.ts +2 -2
- package/src/py/fast-api/react/generator.js +25 -25
- package/src/py/fast-api/react/generator.js.map +1 -1
- package/src/py/fast-api/react/open-api.js +28 -29
- package/src/py/fast-api/react/open-api.js.map +1 -1
- package/src/py/fast-api/react/schema.d.js +6 -0
- package/src/py/fast-api/react/schema.d.js.map +1 -0
- package/src/py/fast-api/react/schema.d.ts +1 -0
- package/src/py/fast-api/react/schema.json +5 -0
- package/src/py/fast-api/schema.d.js +6 -0
- package/src/py/fast-api/schema.d.js.map +1 -0
- package/src/py/fast-api/schema.d.ts +1 -0
- package/src/py/fast-api/schema.json +5 -0
- package/src/py/lambda-function/__snapshots__/generator.spec.ts.snap +4 -4
- package/src/py/lambda-function/generator.js +60 -59
- package/src/py/lambda-function/generator.js.map +1 -1
- package/src/py/lambda-function/schema.d.js +6 -0
- package/src/py/lambda-function/schema.d.js.map +1 -0
- package/src/py/lambda-function/schema.d.ts +1 -0
- package/src/py/lambda-function/schema.json +5 -0
- package/src/py/mcp-server/__snapshots__/generator.spec.ts.snap +8 -8
- package/src/py/mcp-server/generator.js +152 -132
- package/src/py/mcp-server/generator.js.map +1 -1
- package/src/py/mcp-server/schema.d.js +6 -0
- package/src/py/mcp-server/schema.d.js.map +1 -0
- package/src/py/mcp-server/schema.d.ts +1 -0
- package/src/py/mcp-server/schema.json +5 -0
- package/src/py/project/generator.js +132 -90
- package/src/py/project/generator.js.map +1 -1
- package/src/py/project/schema.d.js +6 -0
- package/src/py/project/schema.d.js.map +1 -0
- package/src/py/project/schema.d.ts +1 -0
- package/src/py/project/schema.json +5 -0
- package/src/sdk/agentcore-gateway.d.ts +6 -0
- package/src/sdk/agentcore-gateway.js +7 -0
- package/src/sdk/agentcore-gateway.js.map +1 -0
- package/src/sdk/connection.d.ts +6 -0
- package/src/sdk/connection.js +6 -0
- package/src/sdk/connection.js.map +1 -0
- package/{sdk → src/sdk}/license.d.ts +4 -4
- package/src/sdk/license.js +7 -0
- package/src/sdk/license.js.map +1 -0
- package/src/sdk/open-api.d.ts +10 -0
- package/src/sdk/open-api.js +8 -0
- package/src/sdk/open-api.js.map +1 -0
- package/src/sdk/py.d.ts +14 -0
- package/src/sdk/py.js +10 -0
- package/src/sdk/py.js.map +1 -0
- package/src/sdk/terraform.d.ts +6 -0
- package/src/sdk/terraform.js +7 -0
- package/src/sdk/terraform.js.map +1 -0
- package/src/sdk/ts.d.ts +33 -0
- package/src/sdk/ts.js +35 -0
- package/src/sdk/ts.js.map +1 -0
- package/{sdk → src/sdk}/utils/ast.d.ts +1 -2
- package/src/sdk/utils/ast.js +6 -0
- package/src/sdk/utils/ast.js.map +1 -0
- package/{sdk → src/sdk}/utils/format.d.ts +1 -1
- package/src/sdk/utils/format.js +6 -0
- package/src/sdk/utils/format.js.map +1 -0
- package/{sdk → src/sdk}/utils/test.d.ts +1 -1
- package/src/sdk/utils/test.js +6 -0
- package/src/sdk/utils/test.js.map +1 -0
- package/src/smithy/project/__snapshots__/generator.spec.ts.snap +2 -8
- package/src/smithy/project/files/build.Dockerfile.template +1 -4
- package/src/smithy/project/generator.js +48 -43
- package/src/smithy/project/generator.js.map +1 -1
- package/src/smithy/project/schema.d.js +6 -0
- package/src/smithy/project/schema.d.js.map +1 -0
- package/src/smithy/project/schema.d.ts +1 -0
- package/src/smithy/project/schema.json +5 -0
- package/src/smithy/react-connection/generator.js +39 -47
- package/src/smithy/react-connection/generator.js.map +1 -1
- package/src/smithy/react-connection/schema.d.js +6 -0
- package/src/smithy/react-connection/schema.d.js.map +1 -0
- package/src/smithy/react-connection/schema.d.ts +1 -0
- package/src/smithy/react-connection/schema.json +5 -0
- package/src/smithy/ts/api/__snapshots__/generator.spec.ts.snap +395 -72
- package/src/smithy/ts/api/generator.js +125 -110
- package/src/smithy/ts/api/generator.js.map +1 -1
- package/src/smithy/ts/api/schema.d.js +6 -0
- package/src/smithy/ts/api/schema.d.js.map +1 -0
- package/src/smithy/ts/api/schema.d.ts +1 -0
- package/src/smithy/ts/api/schema.json +5 -0
- package/src/terraform/project/files/application/src/providers.tf.template +1 -1
- package/src/terraform/project/generator.js +151 -104
- package/src/terraform/project/generator.js.map +1 -1
- package/src/terraform/project/schema.d.js +9 -0
- package/src/terraform/project/schema.d.js.map +1 -0
- package/src/terraform/project/schema.d.ts +1 -0
- package/src/terraform/project/schema.json +5 -0
- package/src/trpc/backend/__snapshots__/generator.spec.ts.snap +336 -92
- package/src/trpc/backend/generator.d.ts +1 -1
- package/src/trpc/backend/generator.js +97 -86
- package/src/trpc/backend/generator.js.map +1 -1
- package/src/trpc/backend/schema.d.js +6 -0
- package/src/trpc/backend/schema.d.js.map +1 -0
- package/src/trpc/backend/schema.d.ts +1 -0
- package/src/trpc/backend/schema.json +5 -0
- package/src/trpc/react/__snapshots__/generator.spec.ts.snap +1 -1
- package/src/trpc/react/generator.d.ts +1 -1
- package/src/trpc/react/generator.js +63 -58
- package/src/trpc/react/generator.js.map +1 -1
- package/src/trpc/react/schema.d.js +6 -0
- package/src/trpc/react/schema.d.js.map +1 -0
- package/src/trpc/react/schema.d.ts +1 -0
- package/src/trpc/react/schema.json +5 -0
- package/src/ts/agent/__snapshots__/generator.spec.ts.snap +11 -11
- package/src/ts/agent/a2a-connection/__snapshots__/generator.spec.ts.snap +1 -1
- package/src/ts/agent/a2a-connection/files/agent-connection/app/__targetAgentKebabCase__-client-strands.ts.template +1 -1
- package/src/ts/agent/a2a-connection/generator.js +62 -55
- package/src/ts/agent/a2a-connection/generator.js.map +1 -1
- package/src/ts/agent/a2a-connection/schema.d.js +8 -0
- package/src/ts/agent/a2a-connection/schema.d.js.map +1 -0
- package/src/ts/agent/a2a-connection/schema.d.ts +1 -0
- package/src/ts/agent/a2a-connection/schema.json +5 -0
- package/src/ts/agent/gateway-connection/__snapshots__/generator.spec.ts.snap +5 -5
- package/src/ts/agent/gateway-connection/files/agent-connection/app/__gatewayKebabCase__-client-strands.ts.template +3 -3
- package/src/ts/agent/gateway-connection/generator.js +61 -53
- package/src/ts/agent/gateway-connection/generator.js.map +1 -1
- package/src/ts/agent/gateway-connection/schema.d.js +6 -0
- package/src/ts/agent/gateway-connection/schema.d.js.map +1 -0
- package/src/ts/agent/gateway-connection/schema.d.ts +1 -0
- package/src/ts/agent/gateway-connection/schema.json +5 -0
- package/src/ts/agent/generator.js +169 -137
- package/src/ts/agent/generator.js.map +1 -1
- package/src/ts/agent/mcp-connection/__snapshots__/generator.spec.ts.snap +1 -1
- package/src/ts/agent/mcp-connection/files/agent-connection/app/__mcpServerKebabCase__-client-strands.ts.template +1 -1
- package/src/ts/agent/mcp-connection/generator.js +52 -47
- package/src/ts/agent/mcp-connection/generator.js.map +1 -1
- package/src/ts/agent/mcp-connection/schema.d.js +8 -0
- package/src/ts/agent/mcp-connection/schema.d.js.map +1 -0
- package/src/ts/agent/mcp-connection/schema.d.ts +1 -0
- package/src/ts/agent/mcp-connection/schema.json +5 -0
- package/src/ts/agent/react-connection/generator.d.ts +1 -1
- package/src/ts/agent/react-connection/generator.js +86 -80
- package/src/ts/agent/react-connection/generator.js.map +1 -1
- package/src/ts/agent/react-connection/{serve-local.d.ts → local-dev.d.ts} +2 -2
- package/src/ts/agent/react-connection/local-dev.js +17 -0
- package/src/ts/agent/react-connection/local-dev.js.map +1 -0
- package/src/ts/agent/react-connection/schema.d.js +8 -0
- package/src/ts/agent/react-connection/schema.d.js.map +1 -0
- package/src/ts/agent/react-connection/schema.d.ts +1 -0
- package/src/ts/agent/react-connection/schema.json +5 -0
- package/src/ts/agent/schema.d.js +6 -0
- package/src/ts/agent/schema.d.js.map +1 -0
- package/src/ts/agent/schema.d.ts +1 -0
- package/src/ts/agent/schema.json +5 -0
- package/src/ts/api/generator.js +16 -16
- package/src/ts/api/generator.js.map +1 -1
- package/src/ts/api/schema.d.js +6 -0
- package/src/ts/api/schema.d.js.map +1 -0
- package/src/ts/api/schema.d.ts +1 -0
- package/src/ts/api/schema.json +5 -0
- package/src/ts/astro-docs/__snapshots__/generator.spec.ts.snap +8 -8
- package/src/ts/astro-docs/generator.js +63 -51
- package/src/ts/astro-docs/generator.js.map +1 -1
- package/src/ts/astro-docs/schema.d.js +6 -0
- package/src/ts/astro-docs/schema.d.js.map +1 -0
- package/src/ts/astro-docs/schema.d.ts +2 -2
- package/src/ts/astro-docs/schema.json +3 -3
- package/src/ts/docs/generator.js +10 -10
- package/src/ts/docs/generator.js.map +1 -1
- package/src/ts/docs/schema.d.js +6 -0
- package/src/ts/docs/schema.d.js.map +1 -0
- package/src/ts/docs/schema.d.ts +1 -4
- package/src/ts/docs/schema.json +3 -3
- package/src/ts/dynamodb/__snapshots__/generator.spec.ts.snap +68 -30
- package/src/ts/dynamodb/agent-connection/__snapshots__/generator.spec.ts.snap +5 -5
- package/src/ts/dynamodb/agent-connection/generator.js +21 -23
- package/src/ts/dynamodb/agent-connection/generator.js.map +1 -1
- package/src/ts/dynamodb/agent-connection/schema.d.js +8 -0
- package/src/ts/dynamodb/agent-connection/schema.d.js.map +1 -0
- package/src/ts/dynamodb/agent-connection/schema.d.ts +1 -0
- package/src/ts/dynamodb/agent-connection/schema.json +5 -0
- package/src/ts/dynamodb/files/config.json.template +1 -1
- package/src/ts/dynamodb/files/src/client.ts.template +7 -7
- package/src/ts/dynamodb/generator.js +68 -63
- package/src/ts/dynamodb/generator.js.map +1 -1
- package/src/ts/dynamodb/mcp-server-connection/__snapshots__/generator.spec.ts.snap +5 -5
- package/src/ts/dynamodb/mcp-server-connection/generator.js +21 -23
- package/src/ts/dynamodb/mcp-server-connection/generator.js.map +1 -1
- package/src/ts/dynamodb/mcp-server-connection/schema.d.js +8 -0
- package/src/ts/dynamodb/mcp-server-connection/schema.d.js.map +1 -0
- package/src/ts/dynamodb/mcp-server-connection/schema.d.ts +1 -0
- package/src/ts/dynamodb/mcp-server-connection/schema.json +5 -0
- package/src/ts/dynamodb/schema.d.js +6 -0
- package/src/ts/dynamodb/schema.d.js.map +1 -0
- package/src/ts/dynamodb/schema.d.ts +1 -0
- package/src/ts/dynamodb/schema.json +5 -0
- package/src/ts/dynamodb/smithy-connection/__snapshots__/generator.spec.ts.snap +3 -3
- package/src/ts/dynamodb/smithy-connection/generator.js +20 -22
- package/src/ts/dynamodb/smithy-connection/generator.js.map +1 -1
- package/src/ts/dynamodb/smithy-connection/schema.d.js +8 -0
- package/src/ts/dynamodb/smithy-connection/schema.d.js.map +1 -0
- package/src/ts/dynamodb/smithy-connection/schema.d.ts +1 -0
- package/src/ts/dynamodb/smithy-connection/schema.json +5 -0
- package/src/ts/dynamodb/trpc-connection/__snapshots__/generator.spec.ts.snap +3 -3
- package/src/ts/dynamodb/trpc-connection/generator.js +20 -22
- package/src/ts/dynamodb/trpc-connection/generator.js.map +1 -1
- package/src/ts/dynamodb/trpc-connection/schema.d.js +8 -0
- package/src/ts/dynamodb/trpc-connection/schema.d.js.map +1 -0
- package/src/ts/dynamodb/trpc-connection/schema.d.ts +1 -0
- package/src/ts/dynamodb/trpc-connection/schema.json +5 -0
- package/src/ts/lambda-function/__snapshots__/generator.spec.ts.snap +4 -4
- package/src/ts/lambda-function/generator.js +59 -56
- package/src/ts/lambda-function/generator.js.map +1 -1
- package/src/ts/lambda-function/io.js +83 -52
- package/src/ts/lambda-function/io.js.map +1 -1
- package/src/ts/lambda-function/schema.d.js +6 -0
- package/src/ts/lambda-function/schema.d.js.map +1 -0
- package/src/ts/lambda-function/schema.d.ts +1 -0
- package/src/ts/lambda-function/schema.json +5 -0
- package/src/ts/lib/__snapshots__/generator.spec.ts.snap +23 -36
- package/src/ts/lib/biome.js +37 -37
- package/src/ts/lib/biome.js.map +1 -1
- package/src/ts/lib/generator.js +82 -80
- package/src/ts/lib/generator.js.map +1 -1
- package/src/ts/lib/schema.d.js +6 -0
- package/src/ts/lib/schema.d.js.map +1 -0
- package/src/ts/lib/schema.d.ts +1 -1
- package/src/ts/lib/schema.json +5 -0
- package/src/ts/lib/ts-project-utils.js +65 -70
- package/src/ts/lib/ts-project-utils.js.map +1 -1
- package/src/ts/lib/types.js +5 -2
- package/src/ts/lib/types.js.map +1 -1
- package/src/ts/lib/vitest.js +29 -26
- package/src/ts/lib/vitest.js.map +1 -1
- package/src/ts/mcp-server/__snapshots__/generator.spec.ts.snap +5 -5
- package/src/ts/mcp-server/generator.js +161 -139
- package/src/ts/mcp-server/generator.js.map +1 -1
- package/src/ts/mcp-server/schema.d.js +6 -0
- package/src/ts/mcp-server/schema.d.js.map +1 -0
- package/src/ts/mcp-server/schema.d.ts +1 -0
- package/src/ts/mcp-server/schema.json +5 -0
- package/src/ts/nx-generator/__snapshots__/generator.spec.ts.snap +27 -12
- package/src/ts/nx-generator/files/common/schema.d.ts.template +1 -0
- package/src/ts/nx-generator/files/common/schema.json.template +5 -0
- package/src/ts/nx-generator/files/local/generator.ts.template +3 -3
- package/src/ts/nx-generator/files/nx-plugin-for-aws/generator/generator.ts.template +6 -7
- package/src/ts/nx-generator/generator.js +88 -84
- package/src/ts/nx-generator/generator.js.map +1 -1
- package/src/ts/nx-generator/schema.d.js +6 -0
- package/src/ts/nx-generator/schema.d.js.map +1 -0
- package/src/ts/nx-generator/schema.d.ts +1 -0
- package/src/ts/nx-generator/schema.json +5 -0
- package/src/ts/nx-plugin/__snapshots__/generator.spec.ts.snap +30 -18
- package/src/ts/nx-plugin/files/mcp-server/server.ts.template +5 -5
- package/src/ts/nx-plugin/files/mcp-server/tools/create-workspace-command.ts.template +2 -2
- package/src/ts/nx-plugin/files/mcp-server/tools/general-guidance.ts.template +1 -1
- package/src/ts/nx-plugin/files/mcp-server/tools/generator-guide.ts.template +2 -2
- package/src/ts/nx-plugin/files/mcp-server/tools/list-generators.ts.template +2 -2
- package/src/ts/nx-plugin/files/mcp-server/utils.ts.template +3 -3
- package/src/ts/nx-plugin/generator.js +57 -49
- package/src/ts/nx-plugin/generator.js.map +1 -1
- package/src/ts/nx-plugin/schema.d.js +9 -0
- package/src/ts/nx-plugin/schema.d.js.map +1 -0
- package/src/ts/nx-plugin/schema.json +5 -0
- package/src/ts/nx-plugin/utils.js +32 -44
- package/src/ts/nx-plugin/utils.js.map +1 -1
- package/src/ts/rdb/__snapshots__/generator.spec.ts.snap +30 -30
- package/src/ts/rdb/agent-connection/__snapshots__/generator.spec.ts.snap +6 -6
- package/src/ts/rdb/agent-connection/generator.js +38 -39
- package/src/ts/rdb/agent-connection/generator.js.map +1 -1
- package/src/ts/rdb/agent-connection/schema.d.js +8 -0
- package/src/ts/rdb/agent-connection/schema.d.js.map +1 -0
- package/src/ts/rdb/agent-connection/schema.d.ts +1 -0
- package/src/ts/rdb/agent-connection/schema.json +5 -0
- package/src/ts/rdb/files/config.json.template +1 -1
- package/src/ts/rdb/files/prisma.config.ts.template +2 -2
- package/src/ts/rdb/files/src/prisma.ts.template +7 -7
- package/src/ts/rdb/files/src/utils.ts.template +1 -0
- package/src/ts/rdb/generator.js +134 -117
- package/src/ts/rdb/generator.js.map +1 -1
- package/src/ts/rdb/mcp-server-connection/__snapshots__/generator.spec.ts.snap +6 -6
- package/src/ts/rdb/mcp-server-connection/generator.js +36 -37
- package/src/ts/rdb/mcp-server-connection/generator.js.map +1 -1
- package/src/ts/rdb/mcp-server-connection/schema.d.js +8 -0
- package/src/ts/rdb/mcp-server-connection/schema.d.js.map +1 -0
- package/src/ts/rdb/mcp-server-connection/schema.d.ts +1 -0
- package/src/ts/rdb/mcp-server-connection/schema.json +5 -0
- package/src/ts/rdb/schema.d.js +6 -0
- package/src/ts/rdb/schema.d.js.map +1 -0
- package/src/ts/rdb/schema.d.ts +1 -0
- package/src/ts/rdb/schema.json +5 -0
- package/src/ts/rdb/smithy-connection/__snapshots__/generator.spec.ts.snap +3 -3
- package/src/ts/rdb/smithy-connection/generator.js +46 -43
- package/src/ts/rdb/smithy-connection/generator.js.map +1 -1
- package/src/ts/rdb/smithy-connection/schema.d.js +8 -0
- package/src/ts/rdb/smithy-connection/schema.d.js.map +1 -0
- package/src/ts/rdb/smithy-connection/schema.d.ts +1 -0
- package/src/ts/rdb/smithy-connection/schema.json +5 -0
- package/src/ts/rdb/trpc-connection/__snapshots__/generator.spec.ts.snap +3 -3
- package/src/ts/rdb/trpc-connection/generator.js +36 -31
- package/src/ts/rdb/trpc-connection/generator.js.map +1 -1
- package/src/ts/rdb/trpc-connection/schema.d.js +8 -0
- package/src/ts/rdb/trpc-connection/schema.d.js.map +1 -0
- package/src/ts/rdb/trpc-connection/schema.d.ts +1 -0
- package/src/ts/rdb/trpc-connection/schema.json +5 -0
- package/src/ts/rdb/utils.js +9 -11
- package/src/ts/rdb/utils.js.map +1 -1
- package/src/ts/react-website/agui/generator.js +69 -61
- package/src/ts/react-website/agui/generator.js.map +1 -1
- package/src/ts/react-website/app/__snapshots__/generator.spec.ts.snap +178 -284
- package/src/ts/react-website/app/generator.d.ts +1 -1
- package/src/ts/react-website/app/generator.js +212 -191
- package/src/ts/react-website/app/generator.js.map +1 -1
- package/src/ts/react-website/app/schema.d.js +6 -0
- package/src/ts/react-website/app/schema.d.js.map +1 -0
- package/src/ts/react-website/app/schema.d.ts +1 -1
- package/src/ts/react-website/app/schema.json +11 -6
- package/src/ts/react-website/cognito-auth/__snapshots__/generator.spec.ts.snap +118 -4
- package/src/ts/react-website/cognito-auth/__snapshots__/generator.terraform.spec.ts.snap +10 -3
- package/src/ts/react-website/cognito-auth/files/app/components/CognitoAuth/index.tsx.template +2 -2
- package/src/ts/react-website/cognito-auth/generator.d.ts +1 -1
- package/src/ts/react-website/cognito-auth/generator.js +64 -60
- package/src/ts/react-website/cognito-auth/generator.js.map +1 -1
- package/src/ts/react-website/cognito-auth/schema.d.js +6 -0
- package/src/ts/react-website/cognito-auth/schema.d.js.map +1 -0
- package/src/ts/react-website/cognito-auth/schema.d.ts +1 -0
- package/src/ts/react-website/cognito-auth/schema.json +5 -0
- package/src/ts/react-website/cognito-auth/utils.js +34 -32
- package/src/ts/react-website/cognito-auth/utils.js.map +1 -1
- package/src/ts/react-website/runtime-config/__snapshots__/generator.spec.ts.snap +2 -2
- package/src/ts/react-website/runtime-config/files/app/components/RuntimeConfig/index.tsx.template +2 -2
- package/src/ts/react-website/runtime-config/generator.js +29 -31
- package/src/ts/react-website/runtime-config/generator.js.map +1 -1
- package/src/ts/react-website/runtime-config/schema.d.js +6 -0
- package/src/ts/react-website/runtime-config/schema.d.js.map +1 -0
- package/src/ts/react-website/runtime-config/schema.d.ts +1 -0
- package/src/ts/react-website/runtime-config/schema.json +5 -0
- package/src/ts/sync/generator.js +60 -59
- package/src/ts/sync/generator.js.map +1 -1
- package/src/ts/website/app/generator.js +10 -10
- package/src/ts/website/app/generator.js.map +1 -1
- package/src/ts/website/app/schema.d.js +6 -0
- package/src/ts/website/app/schema.d.js.map +1 -0
- package/src/ts/website/app/schema.d.ts +1 -1
- package/src/ts/website/app/schema.json +11 -6
- package/src/ts/website/auth/generator.d.ts +1 -1
- package/src/ts/website/auth/generator.js +11 -10
- package/src/ts/website/auth/generator.js.map +1 -1
- package/src/ts/website/auth/schema.d.js +6 -0
- package/src/ts/website/auth/schema.d.js.map +1 -0
- package/src/ts/website/auth/schema.d.ts +1 -0
- package/src/ts/website/auth/schema.json +5 -0
- package/src/utils/agent-chat/agent-chat.d.ts +1 -1
- package/src/utils/agent-chat/agent-chat.js +11 -12
- package/src/utils/agent-chat/agent-chat.js.map +1 -1
- package/src/utils/agent-chat/files/a2a/chat.ts.template +1 -1
- package/src/utils/agent-chat/files/ag-ui/chat.ts.template +1 -1
- package/src/utils/agent-chat/files/http-py/chat.ts.template +1 -1
- package/src/utils/agent-chat/files/http-ts/chat.ts.template +1 -1
- package/src/utils/agent-connection/agent-connection.js +129 -146
- package/src/utils/agent-connection/agent-connection.js.map +1 -1
- package/src/utils/agent-connection/files/core-gateway/agentcore-gateway-mcp-transport.ts.template +1 -1
- package/src/utils/agent-connection/files/core-strands/gateway/agentcore-gateway-mcp-client-strands.ts.template +1 -1
- package/src/utils/agent-connection/files/py-core-gateway/agentcore_gateway_mcp_transport.py.template +1 -1
- package/src/utils/agent-connection/files/py-core-langchain/gateway/agentcore_gateway_mcp_client_langchain.py.template +1 -1
- package/src/utils/agent-connection/files/py-core-strands/gateway/agentcore_gateway_mcp_client_strands.py.template +1 -1
- package/src/utils/agent-core-constructs/agent-core-constructs.js +53 -50
- package/src/utils/agent-core-constructs/agent-core-constructs.js.map +1 -1
- package/src/utils/agent-core-constructs/files/terraform/app/agentcore-gateway/__nameKebabCase__/__nameKebabCase__.tf.template +4 -4
- package/src/utils/agent-core-constructs/files/terraform/core/agent-core/runtime.tf.template +4 -4
- package/src/utils/agent-core-constructs/files/terraform/core/agentcore-gateway/gateway.tf.template +2 -2
- package/src/utils/api-constructs/api-constructs.js +30 -31
- package/src/utils/api-constructs/api-constructs.js.map +1 -1
- package/src/utils/api-constructs/files/cdk/core/api/http/http-api.ts.template +14 -6
- package/src/utils/api-constructs/files/cdk/core/api/rest/api-gateway-account/index.js.template +58 -0
- package/src/utils/api-constructs/files/cdk/core/api/rest/api-gateway-account.ts.template +82 -0
- package/src/utils/api-constructs/files/cdk/core/api/rest/rest-api.ts.template +28 -14
- package/src/utils/api-constructs/files/terraform/app/apis/http/__apiNameKebabCase__/__apiNameKebabCase__.tf.template +1 -8
- package/src/utils/api-constructs/files/terraform/app/apis/rest/__apiNameKebabCase__/__apiNameKebabCase__.tf.template +91 -4
- package/src/utils/api-constructs/files/terraform/core/api/http/http-api/http-api.tf.template +1 -1
- package/src/utils/api-constructs/files/terraform/core/api/rest/api-gateway-account/api-gateway-account.tf.template +83 -0
- package/src/utils/api-constructs/files/terraform/core/api/rest/rest-api/rest-api.tf.template +5 -11
- package/src/utils/api-constructs/open-api-metadata.js +22 -22
- package/src/utils/api-constructs/open-api-metadata.js.map +1 -1
- package/src/utils/ast/website.js +17 -19
- package/src/utils/ast/website.js.map +1 -1
- package/src/utils/ast.js +72 -97
- package/src/utils/ast.js.map +1 -1
- package/src/utils/bundle/bundle.js +50 -47
- package/src/utils/bundle/bundle.js.map +1 -1
- package/src/utils/commands.js +47 -26
- package/src/utils/commands.js.map +1 -1
- package/src/utils/config/index.d.ts +2 -2
- package/src/utils/config/index.js +5 -4
- package/src/utils/config/index.js.map +1 -1
- package/src/utils/config/utils.js +48 -58
- package/src/utils/config/utils.js.map +1 -1
- package/src/utils/connection/open-api/react.d.ts +5 -5
- package/src/utils/connection/open-api/react.js +81 -77
- package/src/utils/connection/open-api/react.js.map +1 -1
- package/src/utils/containers.js +22 -23
- package/src/utils/containers.js.map +1 -1
- package/src/utils/dynamodb-constructs/dynamodb-constructs.js +32 -33
- package/src/utils/dynamodb-constructs/dynamodb-constructs.js.map +1 -1
- package/src/utils/dynamodb-constructs/files/terraform/app/dynamodb/__nameKebabCase__/__nameKebabCase__.tf.template +12 -2
- package/src/utils/dynamodb-constructs/files/terraform/core/dynamodb/dynamodb.tf.template +1 -1
- package/src/utils/files/common/scripts/src/dynamodb/create-local-table.ts.template +2 -2
- package/src/utils/files/common/scripts/src/dynamodb/pull-image.ts.template +1 -1
- package/src/utils/files/common/scripts/src/dynamodb/start-container.ts.template +17 -2
- package/src/utils/files/common/scripts/src/infra/stage-credentials/cdk-command.ts.template +11 -3
- package/src/utils/files/common/scripts/src/rdb/mysql/wait-for-mysql-db.ts.template +32 -0
- package/src/utils/files/common/scripts/src/rdb/postgres/wait-for-postgres-db.ts.template +32 -0
- package/src/utils/files/common/scripts/src/rdb/{pull-image.ts.template → shared/pull-image.ts.template} +1 -1
- package/src/utils/files/common/scripts/src/rdb/{start-container.ts.template → shared/start-container.ts.template} +16 -1
- package/src/utils/files/terraform/src/core/asset-bucket/asset-bucket.tf.template +2 -2
- package/src/utils/files/terraform/src/core/runtime-config/appconfig/appconfig.tf.template +1 -1
- package/src/utils/files/terraform/src/core/runtime-config/appconfig-deployment/appconfig-deployment.tf.template +3 -3
- package/src/utils/files/terraform/src/core/runtime-config/entry/entry.tf.template +1 -1
- package/src/utils/files/terraform/src/core/runtime-config/read/read.tf.template +2 -2
- package/src/utils/files/website/hooks/sigv4/useSigV4.tsx.template +1 -1
- package/src/utils/format.js +153 -99
- package/src/utils/format.js.map +1 -1
- package/src/utils/fs.js +14 -13
- package/src/utils/fs.js.map +1 -1
- package/src/utils/function-constructs/files/terraform/app/lambda-functions/__nameKebabCase__/__nameKebabCase__.tf.template +2 -2
- package/src/utils/function-constructs/function-constructs.js +21 -26
- package/src/utils/function-constructs/function-constructs.js.map +1 -1
- package/src/utils/generators.js +18 -20
- package/src/utils/generators.js.map +1 -1
- package/src/utils/git.js +19 -34
- package/src/utils/git.js.map +1 -1
- package/src/utils/iac-providers.js +5 -5
- package/src/utils/iac-providers.js.map +1 -1
- package/src/utils/iac.js +12 -14
- package/src/utils/iac.js.map +1 -1
- package/src/utils/identity-constructs/files/cdk/core/user-identity.ts.template +112 -2
- package/src/utils/identity-constructs/files/terraform/core/user-identity/add-callback-url/add-callback-url.tf.template +2 -2
- package/src/utils/identity-constructs/files/terraform/core/user-identity/identity/identity.tf.template +104 -2
- package/src/utils/identity-constructs/files/terraform/core/user-identity/main.tf.template +7 -0
- package/src/utils/identity-constructs/identity-constructs.js +24 -28
- package/src/utils/identity-constructs/identity-constructs.js.map +1 -1
- package/src/utils/install.d.ts +32 -0
- package/src/utils/install.js +56 -0
- package/src/utils/install.js.map +1 -0
- package/src/utils/js.js +27 -20
- package/src/utils/js.js.map +1 -1
- package/src/utils/mcp.js +34 -41
- package/src/utils/mcp.js.map +1 -1
- package/src/utils/metrics.js +30 -45
- package/src/utils/metrics.js.map +1 -1
- package/src/utils/mock-project-graph.js +8 -12
- package/src/utils/mock-project-graph.js.map +1 -1
- package/src/utils/names.js +25 -51
- package/src/utils/names.js.map +1 -1
- package/src/utils/npm-scope.js +9 -17
- package/src/utils/npm-scope.js.map +1 -1
- package/src/utils/nx.d.ts +18 -2
- package/src/utils/nx.js +111 -74
- package/src/utils/nx.js.map +1 -1
- package/src/utils/nxlv-python.js +27 -15
- package/src/utils/nxlv-python.js.map +1 -1
- package/src/utils/object.js +5 -11
- package/src/utils/object.js.map +1 -1
- package/src/utils/paths.js +11 -15
- package/src/utils/paths.js.map +1 -1
- package/src/utils/pkg-manager.js +4 -9
- package/src/utils/pkg-manager.js.map +1 -1
- package/src/utils/pnpm-workspace.js +22 -22
- package/src/utils/pnpm-workspace.js.map +1 -1
- package/src/utils/port.js +26 -36
- package/src/utils/port.js.map +1 -1
- package/src/utils/py.js +43 -52
- package/src/utils/py.js.map +1 -1
- package/src/utils/rdb-constructs/files/terraform/app/dbs/__nameKebabCase__/__nameKebabCase__.tf.template +4 -4
- package/src/utils/rdb-constructs/files/terraform/core/rdb/aurora/aurora.tf.template +3 -3
- package/src/utils/rdb-constructs/rdb-constructs.js +31 -33
- package/src/utils/rdb-constructs/rdb-constructs.js.map +1 -1
- package/src/utils/shared-constructs-constants.js +16 -16
- package/src/utils/shared-constructs-constants.js.map +1 -1
- package/src/utils/shared-constructs.js +57 -54
- package/src/utils/shared-constructs.js.map +1 -1
- package/src/utils/shared-dynamodb-scripts.js +16 -14
- package/src/utils/shared-dynamodb-scripts.js.map +1 -1
- package/src/utils/shared-infra-config.js +30 -31
- package/src/utils/shared-infra-config.js.map +1 -1
- package/src/utils/shared-infra-scripts.js +30 -25
- package/src/utils/shared-infra-scripts.js.map +1 -1
- package/src/utils/shared-rdb-scripts.d.ts +8 -3
- package/src/utils/shared-rdb-scripts.js +21 -13
- package/src/utils/shared-rdb-scripts.js.map +1 -1
- package/src/utils/shared-scripts.js +12 -17
- package/src/utils/shared-scripts.js.map +1 -1
- package/src/utils/shared-shadcn.js +64 -60
- package/src/utils/shared-shadcn.js.map +1 -1
- package/src/utils/test.d.ts +8 -0
- package/src/utils/test.js +33 -25
- package/src/utils/test.js.map +1 -1
- package/src/utils/toml.js +7 -15
- package/src/utils/toml.js.map +1 -1
- package/src/utils/versions.d.ts +93 -66
- package/src/utils/versions.js +102 -85
- package/src/utils/versions.js.map +1 -1
- package/src/utils/website-constructs/files/terraform/app/static-websites/__websiteNameKebabCase__/__websiteNameKebabCase__.tf.template +1 -1
- package/src/utils/website-constructs/files/terraform/core/static-website/static-website.tf.template +4 -4
- package/src/utils/website-constructs/website-constructs.js +31 -30
- package/src/utils/website-constructs/website-constructs.js.map +1 -1
- package/bin/aws-nx-mcp.js +0 -17
- package/bin/aws-nx-mcp.js.map +0 -1
- package/sdk/agentcore-gateway.d.ts +0 -6
- package/sdk/agentcore-gateway.js +0 -11
- package/sdk/agentcore-gateway.js.map +0 -1
- package/sdk/connection.d.ts +0 -6
- package/sdk/connection.js +0 -10
- package/sdk/connection.js.map +0 -1
- package/sdk/license.js +0 -14
- package/sdk/license.js.map +0 -1
- package/sdk/open-api.d.ts +0 -10
- package/sdk/open-api.js +0 -15
- package/sdk/open-api.js.map +0 -1
- package/sdk/py.d.ts +0 -14
- package/sdk/py.js +0 -18
- package/sdk/py.js.map +0 -1
- package/sdk/terraform.d.ts +0 -6
- package/sdk/terraform.js +0 -11
- package/sdk/terraform.js.map +0 -1
- package/sdk/ts.d.ts +0 -33
- package/sdk/ts.js +0 -53
- package/sdk/ts.js.map +0 -1
- package/sdk/utils/ast.js +0 -12
- package/sdk/utils/ast.js.map +0 -1
- package/sdk/utils/format.js +0 -10
- package/sdk/utils/format.js.map +0 -1
- package/sdk/utils/test.js +0 -10
- package/sdk/utils/test.js.map +0 -1
- package/src/connection/agent-serve-local.js +0 -48
- package/src/connection/agent-serve-local.js.map +0 -1
- package/src/connection/serve-local.js +0 -41
- package/src/connection/serve-local.js.map +0 -1
- package/src/py/agent/react-connection/serve-local.js +0 -38
- package/src/py/agent/react-connection/serve-local.js.map +0 -1
- package/src/ts/agent/react-connection/serve-local.js +0 -19
- package/src/ts/agent/react-connection/serve-local.js.map +0 -1
- package/src/utils/files/common/scripts/src/rdb/wait-for-db.ts.template +0 -59
- /package/src/agentcore-gateway/files/project/{serve-local.ts.template → local-dev.ts.template} +0 -0
- /package/{bin → src/bin}/aws-nx-mcp.d.ts +0 -0
|
@@ -1,51 +1,45 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.determineProjectType = exports.resolveConnection = exports.findComponentInMetadata = exports.connectionGenerator = exports.PROJECT_COMPONENT_SENTINEL = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
1
|
/**
|
|
6
2
|
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
7
3
|
* SPDX-License-Identifier: Apache-2.0
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
const toml_1 = require("../utils/toml");
|
|
4
|
+
*/ import { joinPathFragments } from "@nx/devkit";
|
|
5
|
+
import agentcoreGatewayGatewayConnectionGenerator from "../agentcore-gateway/gateway-connection/generator.js";
|
|
6
|
+
import { AGENTCORE_GATEWAY_GENERATOR_INFO } from "../agentcore-gateway/generator.js";
|
|
7
|
+
import agentcoreGatewayMcpConnectionGenerator from "../agentcore-gateway/mcp-connection/generator.js";
|
|
8
|
+
import pyAgentA2aConnectionGenerator from "../py/agent/a2a-connection/generator.js";
|
|
9
|
+
import pyAgentGatewayConnectionGenerator from "../py/agent/gateway-connection/generator.js";
|
|
10
|
+
import pyAgentMcpConnectionGenerator from "../py/agent/mcp-connection/generator.js";
|
|
11
|
+
import pyAgentReactConnectionGenerator from "../py/agent/react-connection/generator.js";
|
|
12
|
+
import pyDynamoDBAgentConnectionGenerator from "../py/dynamodb/agent-connection/generator.js";
|
|
13
|
+
import pyDynamoDBFastApiConnectionGenerator from "../py/dynamodb/fast-api-connection/generator.js";
|
|
14
|
+
import { PY_DYNAMODB_GENERATOR_INFO } from "../py/dynamodb/generator.js";
|
|
15
|
+
import pyDynamoDBMcpServerConnectionGenerator from "../py/dynamodb/mcp-server-connection/generator.js";
|
|
16
|
+
import fastApiReactGenerator from "../py/fast-api/react/generator.js";
|
|
17
|
+
import { SMITHY_PROJECT_GENERATOR_INFO } from "../smithy/project/generator.js";
|
|
18
|
+
import smithyReactConnectionGenerator from "../smithy/react-connection/generator.js";
|
|
19
|
+
import { TS_SMITHY_API_GENERATOR_INFO } from "../smithy/ts/api/generator.js";
|
|
20
|
+
import trpcReactGenerator from "../trpc/react/generator.js";
|
|
21
|
+
import tsAgentA2aConnectionGenerator from "../ts/agent/a2a-connection/generator.js";
|
|
22
|
+
import tsAgentGatewayConnectionGenerator from "../ts/agent/gateway-connection/generator.js";
|
|
23
|
+
import tsAgentMcpConnectionGenerator from "../ts/agent/mcp-connection/generator.js";
|
|
24
|
+
import tsAgentReactConnectionGenerator from "../ts/agent/react-connection/generator.js";
|
|
25
|
+
import tsDynamoDBAgentConnectionGenerator from "../ts/dynamodb/agent-connection/generator.js";
|
|
26
|
+
import { TS_DYNAMODB_GENERATOR_INFO } from "../ts/dynamodb/generator.js";
|
|
27
|
+
import tsDynamoDBMcpServerConnectionGenerator from "../ts/dynamodb/mcp-server-connection/generator.js";
|
|
28
|
+
import tsDynamoDBSmithyConnectionGenerator from "../ts/dynamodb/smithy-connection/generator.js";
|
|
29
|
+
import tsDynamoDBTrpcConnectionGenerator from "../ts/dynamodb/trpc-connection/generator.js";
|
|
30
|
+
import tsRdbAgentConnectionGenerator from "../ts/rdb/agent-connection/generator.js";
|
|
31
|
+
import { TS_RDB_GENERATOR_INFO } from "../ts/rdb/generator.js";
|
|
32
|
+
import tsRdbMcpServerConnectionGenerator from "../ts/rdb/mcp-server-connection/generator.js";
|
|
33
|
+
import tsRdbSmithyConnectionGenerator from "../ts/rdb/smithy-connection/generator.js";
|
|
34
|
+
import tsRdbTrpcConnectionGenerator from "../ts/rdb/trpc-connection/generator.js";
|
|
35
|
+
import { hasExportDeclaration } from "../utils/ast.js";
|
|
36
|
+
import { readProjectConfigurationUnqualified } from "../utils/nx.js";
|
|
37
|
+
import { readToml } from "../utils/toml.js";
|
|
43
38
|
/**
|
|
44
39
|
* List of supported source and target project types for connections.
|
|
45
40
|
* These can be project-level types (determined by introspection) or
|
|
46
41
|
* component generator ids (from component metadata).
|
|
47
|
-
*/
|
|
48
|
-
const SUPPORTED_PROJECT_TYPES = [
|
|
42
|
+
*/ const SUPPORTED_PROJECT_TYPES = [
|
|
49
43
|
'ts#trpc-api',
|
|
50
44
|
'py#fast-api',
|
|
51
45
|
'react',
|
|
@@ -53,167 +47,245 @@ const SUPPORTED_PROJECT_TYPES = [
|
|
|
53
47
|
'ts#rdb',
|
|
54
48
|
'ts#dynamodb',
|
|
55
49
|
'py#dynamodb',
|
|
56
|
-
'agentcore-gateway'
|
|
50
|
+
'agentcore-gateway'
|
|
57
51
|
];
|
|
58
52
|
/**
|
|
59
53
|
* Sentinel value for sourceComponent/targetComponent that means
|
|
60
54
|
* "use the project-level connection, not a component".
|
|
61
|
-
*/
|
|
62
|
-
exports.PROJECT_COMPONENT_SENTINEL = '.';
|
|
55
|
+
*/ export const PROJECT_COMPONENT_SENTINEL = '.';
|
|
63
56
|
/**
|
|
64
57
|
* Enumerates the supported project connections.
|
|
65
58
|
* Source and target can be project-level types or component generator ids.
|
|
66
|
-
*/
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
{
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
{
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
{
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
{
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
{
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
{
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
{
|
|
96
|
-
|
|
59
|
+
*/ const SUPPORTED_CONNECTIONS = [
|
|
60
|
+
{
|
|
61
|
+
source: 'ts#trpc-api',
|
|
62
|
+
target: 'ts#rdb'
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
source: 'ts#trpc-api',
|
|
66
|
+
target: 'ts#dynamodb'
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
source: 'ts#agent',
|
|
70
|
+
target: 'ts#rdb'
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
source: 'smithy',
|
|
74
|
+
target: 'ts#rdb'
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
source: 'smithy',
|
|
78
|
+
target: 'ts#dynamodb'
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
source: 'ts#mcp-server',
|
|
82
|
+
target: 'ts#rdb'
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
source: 'ts#mcp-server',
|
|
86
|
+
target: 'ts#dynamodb'
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
source: 'react',
|
|
90
|
+
target: 'ts#trpc-api'
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
source: 'react',
|
|
94
|
+
target: 'py#fast-api'
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
source: 'react',
|
|
98
|
+
target: 'smithy'
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
source: 'react',
|
|
102
|
+
target: 'ts#agent'
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
source: 'react',
|
|
106
|
+
target: 'py#agent'
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
source: 'ts#agent',
|
|
110
|
+
target: 'ts#mcp-server'
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
source: 'ts#agent',
|
|
114
|
+
target: 'py#mcp-server'
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
source: 'ts#agent',
|
|
118
|
+
target: 'ts#dynamodb'
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
source: 'py#agent',
|
|
122
|
+
target: 'ts#mcp-server'
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
source: 'py#agent',
|
|
126
|
+
target: 'py#mcp-server'
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
source: 'ts#agent',
|
|
130
|
+
target: 'ts#agent'
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
source: 'ts#agent',
|
|
134
|
+
target: 'py#agent'
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
source: 'py#agent',
|
|
138
|
+
target: 'ts#agent'
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
source: 'py#agent',
|
|
142
|
+
target: 'py#agent'
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
source: 'ts#agent',
|
|
146
|
+
target: 'agentcore-gateway'
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
source: 'py#agent',
|
|
150
|
+
target: 'agentcore-gateway'
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
source: 'agentcore-gateway',
|
|
154
|
+
target: 'ts#mcp-server'
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
source: 'agentcore-gateway',
|
|
158
|
+
target: 'py#mcp-server'
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
source: 'agentcore-gateway',
|
|
162
|
+
target: 'agentcore-gateway'
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
source: 'py#fast-api',
|
|
166
|
+
target: 'py#dynamodb'
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
source: 'py#agent',
|
|
170
|
+
target: 'py#dynamodb'
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
source: 'py#mcp-server',
|
|
174
|
+
target: 'py#dynamodb'
|
|
175
|
+
}
|
|
97
176
|
];
|
|
98
177
|
const CONNECTION_GENERATORS = {
|
|
99
|
-
'ts#trpc-api -> ts#rdb': (tree, options)
|
|
100
|
-
'ts#agent -> ts#rdb': (tree, options)
|
|
101
|
-
'smithy -> ts#rdb': (tree, options)
|
|
102
|
-
'ts#mcp-server -> ts#rdb': (tree, options)
|
|
103
|
-
'ts#trpc-api -> ts#dynamodb': (tree, options)
|
|
104
|
-
'ts#agent -> ts#dynamodb': (tree, options)
|
|
105
|
-
'smithy -> ts#dynamodb': (tree, options)
|
|
106
|
-
'ts#mcp-server -> ts#dynamodb': (tree, options)
|
|
107
|
-
'react -> ts#trpc-api': (tree, options)
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
'
|
|
123
|
-
'
|
|
124
|
-
'
|
|
125
|
-
'ts#agent ->
|
|
126
|
-
'
|
|
127
|
-
'py#agent ->
|
|
128
|
-
'
|
|
129
|
-
'ts#agent ->
|
|
130
|
-
'py#agent ->
|
|
131
|
-
'
|
|
132
|
-
'
|
|
133
|
-
'
|
|
134
|
-
'
|
|
135
|
-
'
|
|
136
|
-
'
|
|
178
|
+
'ts#trpc-api -> ts#rdb': (tree, options)=>tsRdbTrpcConnectionGenerator(tree, options),
|
|
179
|
+
'ts#agent -> ts#rdb': (tree, options)=>tsRdbAgentConnectionGenerator(tree, options),
|
|
180
|
+
'smithy -> ts#rdb': (tree, options)=>tsRdbSmithyConnectionGenerator(tree, options),
|
|
181
|
+
'ts#mcp-server -> ts#rdb': (tree, options)=>tsRdbMcpServerConnectionGenerator(tree, options),
|
|
182
|
+
'ts#trpc-api -> ts#dynamodb': (tree, options)=>tsDynamoDBTrpcConnectionGenerator(tree, options),
|
|
183
|
+
'ts#agent -> ts#dynamodb': (tree, options)=>tsDynamoDBAgentConnectionGenerator(tree, options),
|
|
184
|
+
'smithy -> ts#dynamodb': (tree, options)=>tsDynamoDBSmithyConnectionGenerator(tree, options),
|
|
185
|
+
'ts#mcp-server -> ts#dynamodb': (tree, options)=>tsDynamoDBMcpServerConnectionGenerator(tree, options),
|
|
186
|
+
'react -> ts#trpc-api': (tree, options)=>trpcReactGenerator(tree, {
|
|
187
|
+
frontendProjectName: options.sourceProject,
|
|
188
|
+
backendProjectName: options.targetProject,
|
|
189
|
+
preferInstallDependencies: options.preferInstallDependencies
|
|
190
|
+
}),
|
|
191
|
+
'react -> py#fast-api': (tree, options)=>fastApiReactGenerator(tree, {
|
|
192
|
+
frontendProjectName: options.sourceProject,
|
|
193
|
+
fastApiProjectName: options.targetProject,
|
|
194
|
+
preferInstallDependencies: options.preferInstallDependencies
|
|
195
|
+
}),
|
|
196
|
+
'react -> smithy': (tree, options)=>smithyReactConnectionGenerator(tree, {
|
|
197
|
+
frontendProjectName: options.sourceProject,
|
|
198
|
+
smithyModelOrBackendProjectName: options.targetProject,
|
|
199
|
+
preferInstallDependencies: options.preferInstallDependencies
|
|
200
|
+
}),
|
|
201
|
+
'react -> ts#agent': (tree, options)=>tsAgentReactConnectionGenerator(tree, options),
|
|
202
|
+
'react -> py#agent': (tree, options)=>pyAgentReactConnectionGenerator(tree, options),
|
|
203
|
+
'ts#agent -> ts#mcp-server': (tree, options)=>tsAgentMcpConnectionGenerator(tree, options),
|
|
204
|
+
'ts#agent -> py#mcp-server': (tree, options)=>tsAgentMcpConnectionGenerator(tree, options),
|
|
205
|
+
'py#agent -> ts#mcp-server': (tree, options)=>pyAgentMcpConnectionGenerator(tree, options),
|
|
206
|
+
'py#agent -> py#mcp-server': (tree, options)=>pyAgentMcpConnectionGenerator(tree, options),
|
|
207
|
+
'ts#agent -> ts#agent': (tree, options)=>tsAgentA2aConnectionGenerator(tree, options),
|
|
208
|
+
'ts#agent -> py#agent': (tree, options)=>tsAgentA2aConnectionGenerator(tree, options),
|
|
209
|
+
'py#agent -> ts#agent': (tree, options)=>pyAgentA2aConnectionGenerator(tree, options),
|
|
210
|
+
'py#agent -> py#agent': (tree, options)=>pyAgentA2aConnectionGenerator(tree, options),
|
|
211
|
+
'ts#agent -> agentcore-gateway': (tree, options)=>tsAgentGatewayConnectionGenerator(tree, options),
|
|
212
|
+
'py#agent -> agentcore-gateway': (tree, options)=>pyAgentGatewayConnectionGenerator(tree, options),
|
|
213
|
+
'agentcore-gateway -> ts#mcp-server': (tree, options)=>agentcoreGatewayMcpConnectionGenerator(tree, options),
|
|
214
|
+
'agentcore-gateway -> py#mcp-server': (tree, options)=>agentcoreGatewayMcpConnectionGenerator(tree, options),
|
|
215
|
+
'agentcore-gateway -> agentcore-gateway': (tree, options)=>agentcoreGatewayGatewayConnectionGenerator(tree, options),
|
|
216
|
+
'py#fast-api -> py#dynamodb': (tree, options)=>pyDynamoDBFastApiConnectionGenerator(tree, options),
|
|
217
|
+
'py#agent -> py#dynamodb': (tree, options)=>pyDynamoDBAgentConnectionGenerator(tree, options),
|
|
218
|
+
'py#mcp-server -> py#dynamodb': (tree, options)=>pyDynamoDBMcpServerConnectionGenerator(tree, options)
|
|
137
219
|
};
|
|
138
220
|
/**
|
|
139
221
|
* Generator for a connection between two projects
|
|
140
|
-
*/
|
|
141
|
-
const
|
|
142
|
-
const resolved = await (0, exports.resolveConnection)(tree, options);
|
|
222
|
+
*/ export const connectionGenerator = async (tree, options)=>{
|
|
223
|
+
const resolved = await resolveConnection(tree, options);
|
|
143
224
|
const connectionKey = `${resolved.connection.source} -> ${resolved.connection.target}`;
|
|
144
225
|
return await CONNECTION_GENERATORS[connectionKey](tree, {
|
|
145
226
|
sourceProject: options.sourceProject,
|
|
146
227
|
targetProject: options.targetProject,
|
|
147
228
|
sourceComponent: resolved.sourceComponent,
|
|
148
229
|
targetComponent: resolved.targetComponent,
|
|
230
|
+
preferInstallDependencies: options.preferInstallDependencies
|
|
149
231
|
});
|
|
150
232
|
};
|
|
151
|
-
exports.connectionGenerator = connectionGenerator;
|
|
152
233
|
/**
|
|
153
234
|
* Find a component in project metadata matching the given reference.
|
|
154
235
|
* Checks by name first, then by path, then by generator.
|
|
155
|
-
*/
|
|
156
|
-
const findComponentInMetadata = (projectConfiguration, componentRef) => {
|
|
236
|
+
*/ export const findComponentInMetadata = (projectConfiguration, componentRef)=>{
|
|
157
237
|
const components = projectConfiguration.metadata?.components ?? [];
|
|
158
|
-
return
|
|
159
|
-
components.find((c) => c.path === componentRef) ??
|
|
160
|
-
components.find((c) => c.generator === componentRef));
|
|
238
|
+
return components.find((c)=>c.name === componentRef) ?? components.find((c)=>c.path === componentRef) ?? components.find((c)=>c.generator === componentRef);
|
|
161
239
|
};
|
|
162
|
-
exports.findComponentInMetadata = findComponentInMetadata;
|
|
163
240
|
/**
|
|
164
241
|
* Gather all connection candidates for a project configuration. This includes:
|
|
165
242
|
* - The project-level type (if it's a supported type)
|
|
166
243
|
* - Each component's generator id as a candidate type
|
|
167
|
-
*/
|
|
168
|
-
const gatherCandidates = async (tree, projectConfig) => {
|
|
244
|
+
*/ const gatherCandidates = async (tree, projectConfig)=>{
|
|
169
245
|
const type = await determineProjectTypeFromConfig(tree, projectConfig);
|
|
170
246
|
const components = projectConfig.metadata?.components ?? [];
|
|
171
247
|
return [
|
|
172
|
-
...
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
248
|
+
...type ? [
|
|
249
|
+
{
|
|
250
|
+
type: type
|
|
251
|
+
}
|
|
252
|
+
] : [],
|
|
253
|
+
...components.map((component)=>({
|
|
254
|
+
type: component.generator,
|
|
255
|
+
component
|
|
256
|
+
}))
|
|
177
257
|
];
|
|
178
258
|
};
|
|
179
259
|
/**
|
|
180
260
|
* Validate that a specified component exists in the project metadata.
|
|
181
261
|
* Skips validation for undefined refs and the project sentinel '.'.
|
|
182
|
-
*/
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
return;
|
|
186
|
-
const found = (0, exports.findComponentInMetadata)(projectConfig, componentRef);
|
|
262
|
+
*/ const validateComponent = (componentRef, projectConfig, side)=>{
|
|
263
|
+
if (!componentRef || componentRef === PROJECT_COMPONENT_SENTINEL) return;
|
|
264
|
+
const found = findComponentInMetadata(projectConfig, componentRef);
|
|
187
265
|
if (!found) {
|
|
188
266
|
const components = projectConfig.metadata?.components ?? [];
|
|
189
|
-
throw new Error(`Component '${componentRef}' not found in ${side} project ${projectConfig.name}. ` +
|
|
190
|
-
`Available components: ${components.length > 0 ? components.map((c) => c.name ?? c.generator).join(', ') : 'none'}`);
|
|
267
|
+
throw new Error(`Component '${componentRef}' not found in ${side} project ${projectConfig.name}. ` + `Available components: ${components.length > 0 ? components.map((c)=>c.name ?? c.generator).join(', ') : 'none'}`);
|
|
191
268
|
}
|
|
192
269
|
};
|
|
193
270
|
/**
|
|
194
271
|
* Narrow candidates based on the user's specified component reference.
|
|
195
|
-
*/
|
|
196
|
-
|
|
197
|
-
if (
|
|
198
|
-
return candidates;
|
|
199
|
-
if (componentRef === exports.PROJECT_COMPONENT_SENTINEL) {
|
|
200
|
-
return candidates.filter((c) => !c.component);
|
|
272
|
+
*/ const filterConnectionCandidatesForComponentReference = (componentRef, projectConfig, candidates, supportedConnections, side)=>{
|
|
273
|
+
if (!componentRef) return candidates;
|
|
274
|
+
if (componentRef === PROJECT_COMPONENT_SENTINEL) {
|
|
275
|
+
return candidates.filter((c)=>!c.component);
|
|
201
276
|
}
|
|
202
|
-
const component =
|
|
203
|
-
if (!component)
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
if (!isConnectionParticipant)
|
|
207
|
-
return candidates;
|
|
277
|
+
const component = findComponentInMetadata(projectConfig, componentRef);
|
|
278
|
+
if (!component) return candidates;
|
|
279
|
+
const isConnectionParticipant = supportedConnections.some((c)=>c[side] === component.generator);
|
|
280
|
+
if (!isConnectionParticipant) return candidates;
|
|
208
281
|
// Filter to the specific matched component, not all components with the same generator
|
|
209
|
-
return candidates.filter((c)
|
|
282
|
+
return candidates.filter((c)=>c.component === component);
|
|
210
283
|
};
|
|
211
284
|
/**
|
|
212
285
|
* Resolve the connection to use, considering source/target projects and components.
|
|
213
|
-
*/
|
|
214
|
-
const
|
|
215
|
-
const
|
|
216
|
-
const targetConfig = (0, nx_1.readProjectConfigurationUnqualified)(tree, options.targetProject);
|
|
286
|
+
*/ export const resolveConnection = async (tree, options, supportedConnections = SUPPORTED_CONNECTIONS)=>{
|
|
287
|
+
const sourceConfig = readProjectConfigurationUnqualified(tree, options.sourceProject);
|
|
288
|
+
const targetConfig = readProjectConfigurationUnqualified(tree, options.targetProject);
|
|
217
289
|
// Validate explicitly specified components exist
|
|
218
290
|
validateComponent(options.sourceComponent, sourceConfig, 'source');
|
|
219
291
|
validateComponent(options.targetComponent, targetConfig, 'target');
|
|
@@ -222,60 +294,52 @@ const resolveConnection = async (tree, options, supportedConnections = SUPPORTED
|
|
|
222
294
|
const targetCandidates = filterConnectionCandidatesForComponentReference(options.targetComponent, targetConfig, await gatherCandidates(tree, targetConfig), supportedConnections, 'target');
|
|
223
295
|
// Cross-product candidates and find supported connections
|
|
224
296
|
const matches = [];
|
|
225
|
-
for (const source of sourceCandidates)
|
|
226
|
-
for (const target of targetCandidates)
|
|
227
|
-
const match = supportedConnections.find((c)
|
|
297
|
+
for (const source of sourceCandidates){
|
|
298
|
+
for (const target of targetCandidates){
|
|
299
|
+
const match = supportedConnections.find((c)=>c.source === source.type && c.target === target.type);
|
|
228
300
|
if (match) {
|
|
229
301
|
matches.push({
|
|
230
302
|
connection: match,
|
|
231
303
|
sourceComponent: source.component,
|
|
232
|
-
targetComponent: target.component
|
|
304
|
+
targetComponent: target.component
|
|
233
305
|
});
|
|
234
306
|
}
|
|
235
307
|
}
|
|
236
308
|
}
|
|
237
309
|
if (matches.length === 0) {
|
|
238
|
-
const sourceTypes = [
|
|
239
|
-
|
|
310
|
+
const sourceTypes = [
|
|
311
|
+
...new Set(sourceCandidates.map((c)=>c.type))
|
|
312
|
+
];
|
|
313
|
+
const targetTypes = [
|
|
314
|
+
...new Set(targetCandidates.map((c)=>c.type))
|
|
315
|
+
];
|
|
240
316
|
throw new Error(`This generator does not support a connection from ${options.sourceProject}${sourceTypes.length > 0 ? ` (${sourceTypes.join(', ')})` : ''} to ${options.targetProject}${targetTypes.length > 0 ? ` (${targetTypes.join(', ')})` : ''}`);
|
|
241
317
|
}
|
|
242
318
|
if (matches.length > 1) {
|
|
243
|
-
const connectionDescriptions = matches
|
|
244
|
-
.map((m) => {
|
|
319
|
+
const connectionDescriptions = matches.map((m)=>{
|
|
245
320
|
const sourceName = m.sourceComponent?.name;
|
|
246
321
|
const targetName = m.targetComponent?.name;
|
|
247
|
-
const sourceLabel = sourceName
|
|
248
|
-
|
|
249
|
-
: m.connection.source;
|
|
250
|
-
const targetLabel = targetName
|
|
251
|
-
? `${targetName} (${m.connection.target})`
|
|
252
|
-
: m.connection.target;
|
|
322
|
+
const sourceLabel = sourceName ? `${sourceName} (${m.connection.source})` : m.connection.source;
|
|
323
|
+
const targetLabel = targetName ? `${targetName} (${m.connection.target})` : m.connection.target;
|
|
253
324
|
return `${sourceLabel} -> ${targetLabel}`;
|
|
254
|
-
})
|
|
255
|
-
|
|
256
|
-
throw new Error(`Ambiguous connection from ${options.sourceProject} to ${options.targetProject}. ` +
|
|
257
|
-
`Multiple supported connections found: ${connectionDescriptions}. ` +
|
|
258
|
-
`Please specify sourceComponent and/or targetComponent to disambiguate.`);
|
|
325
|
+
}).join(', ');
|
|
326
|
+
throw new Error(`Ambiguous connection from ${options.sourceProject} to ${options.targetProject}. ` + `Multiple supported connections found: ${connectionDescriptions}. ` + `Please specify sourceComponent and/or targetComponent to disambiguate.`);
|
|
259
327
|
}
|
|
260
328
|
return {
|
|
261
329
|
connection: matches[0].connection,
|
|
262
330
|
sourceComponent: matches[0].sourceComponent,
|
|
263
|
-
targetComponent: matches[0].targetComponent
|
|
331
|
+
targetComponent: matches[0].targetComponent
|
|
264
332
|
};
|
|
265
333
|
};
|
|
266
|
-
exports.resolveConnection = resolveConnection;
|
|
267
334
|
/**
|
|
268
335
|
* Determine whether the given project is of a known project type
|
|
269
|
-
*/
|
|
270
|
-
const
|
|
271
|
-
const projectConfiguration = (0, nx_1.readProjectConfigurationUnqualified)(tree, projectName);
|
|
336
|
+
*/ export const determineProjectType = async (tree, projectName)=>{
|
|
337
|
+
const projectConfiguration = readProjectConfigurationUnqualified(tree, projectName);
|
|
272
338
|
return await determineProjectTypeFromConfig(tree, projectConfiguration);
|
|
273
339
|
};
|
|
274
|
-
exports.determineProjectType = determineProjectType;
|
|
275
340
|
/**
|
|
276
341
|
* Determine whether the given project configuration is of a known project type
|
|
277
|
-
*/
|
|
278
|
-
const determineProjectTypeFromConfig = async (tree, projectConfiguration) => {
|
|
342
|
+
*/ const determineProjectTypeFromConfig = async (tree, projectConfiguration)=>{
|
|
279
343
|
// NB: if adding new checks, ensure these go from most to least specific
|
|
280
344
|
// eg. react website is more specific than typescript project
|
|
281
345
|
if (await isTrpcApi(tree, projectConfiguration)) {
|
|
@@ -304,65 +368,60 @@ const determineProjectTypeFromConfig = async (tree, projectConfiguration) => {
|
|
|
304
368
|
}
|
|
305
369
|
return undefined;
|
|
306
370
|
};
|
|
307
|
-
const sourceRoot = (projectConfiguration)
|
|
308
|
-
|
|
309
|
-
const isTrpcApi = async (tree, projectConfiguration) => {
|
|
371
|
+
const sourceRoot = (projectConfiguration)=>projectConfiguration.sourceRoot ?? joinPathFragments(projectConfiguration.root, 'src');
|
|
372
|
+
const isTrpcApi = async (tree, projectConfiguration)=>{
|
|
310
373
|
// If the project.json says it's a trpc api, there's no need for introspection
|
|
311
374
|
if (projectConfiguration.metadata?.apiType === 'trpc') {
|
|
312
375
|
return true;
|
|
313
376
|
}
|
|
314
377
|
// Find the src/index.ts
|
|
315
|
-
const indexTs = tree.read(
|
|
378
|
+
const indexTs = tree.read(joinPathFragments(sourceRoot(projectConfiguration), 'index.ts'), 'utf-8');
|
|
316
379
|
if (indexTs === null) {
|
|
317
380
|
return false;
|
|
318
381
|
}
|
|
319
382
|
// If the index file exports an AppRouter, it's a trpc api
|
|
320
|
-
if (await
|
|
383
|
+
if (await hasExportDeclaration(tree, indexTs, 'AppRouter')) {
|
|
321
384
|
return true;
|
|
322
385
|
}
|
|
323
386
|
// If there's a src/router.ts or src/lambdas/router.ts which exports an AppRouter, it's a trpc api
|
|
324
|
-
const trpcRouter = tree.read((
|
|
325
|
-
tree.read((0, devkit_1.joinPathFragments)(sourceRoot(projectConfiguration), 'lambdas', 'router.ts'), 'utf-8');
|
|
387
|
+
const trpcRouter = tree.read(joinPathFragments(sourceRoot(projectConfiguration), 'router.ts'), 'utf-8') ?? tree.read(joinPathFragments(sourceRoot(projectConfiguration), 'lambdas', 'router.ts'), 'utf-8');
|
|
326
388
|
if (trpcRouter === null) {
|
|
327
389
|
return false;
|
|
328
390
|
}
|
|
329
|
-
if (await
|
|
391
|
+
if (await hasExportDeclaration(tree, trpcRouter, 'AppRouter')) {
|
|
330
392
|
return true;
|
|
331
393
|
}
|
|
332
394
|
return false;
|
|
333
395
|
};
|
|
334
|
-
const isReact = (tree, projectConfiguration)
|
|
396
|
+
const isReact = (tree, projectConfiguration)=>{
|
|
335
397
|
// if there's a main.tsx, it's a react app
|
|
336
|
-
return tree.exists(
|
|
398
|
+
return tree.exists(joinPathFragments(sourceRoot(projectConfiguration), 'main.tsx'));
|
|
337
399
|
};
|
|
338
|
-
const isFastApi = (tree, projectConfiguration)
|
|
400
|
+
const isFastApi = (tree, projectConfiguration)=>{
|
|
339
401
|
// If the project.json says it's a fast api, there's no need for introspection
|
|
340
402
|
if (projectConfiguration.metadata?.apiType === 'fast-api') {
|
|
341
403
|
return true;
|
|
342
404
|
}
|
|
343
|
-
const pyProjectPath =
|
|
405
|
+
const pyProjectPath = joinPathFragments(projectConfiguration.root, 'pyproject.toml');
|
|
344
406
|
if (tree.exists(pyProjectPath)) {
|
|
345
|
-
const pyProject =
|
|
407
|
+
const pyProject = readToml(tree, pyProjectPath);
|
|
346
408
|
if ((pyProject?.project?.dependencies ?? []).includes('fastapi')) {
|
|
347
409
|
return true;
|
|
348
410
|
}
|
|
349
411
|
}
|
|
350
412
|
return false;
|
|
351
413
|
};
|
|
352
|
-
const isSmithyApi = (_tree, projectConfiguration)
|
|
414
|
+
const isSmithyApi = (_tree, projectConfiguration)=>{
|
|
353
415
|
// Support selecting either the smithy model or backend project
|
|
354
416
|
return [
|
|
355
|
-
|
|
356
|
-
|
|
417
|
+
SMITHY_PROJECT_GENERATOR_INFO.id,
|
|
418
|
+
TS_SMITHY_API_GENERATOR_INFO.id
|
|
357
419
|
].includes((projectConfiguration.metadata ?? {}).generator);
|
|
358
420
|
};
|
|
359
|
-
const isRdb = (projectConfiguration)
|
|
360
|
-
|
|
361
|
-
const
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
const isAgentCoreGateway = (projectConfiguration) => (projectConfiguration.metadata ?? {}).generator ===
|
|
366
|
-
generator_2.AGENTCORE_GATEWAY_GENERATOR_INFO.id;
|
|
367
|
-
exports.default = exports.connectionGenerator;
|
|
421
|
+
const isRdb = (projectConfiguration)=>(projectConfiguration.metadata ?? {}).generator === TS_RDB_GENERATOR_INFO.id;
|
|
422
|
+
const isTsDynamoDB = (projectConfiguration)=>(projectConfiguration.metadata ?? {}).generator === TS_DYNAMODB_GENERATOR_INFO.id;
|
|
423
|
+
const isPyDynamoDB = (projectConfiguration)=>(projectConfiguration.metadata ?? {}).generator === PY_DYNAMODB_GENERATOR_INFO.id;
|
|
424
|
+
const isAgentCoreGateway = (projectConfiguration)=>(projectConfiguration.metadata ?? {}).generator === AGENTCORE_GATEWAY_GENERATOR_INFO.id;
|
|
425
|
+
export default connectionGenerator;
|
|
426
|
+
|
|
368
427
|
//# sourceMappingURL=generator.js.map
|