@aws/nx-plugin 1.0.0-rc.7 → 1.0.0-rc.71
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 +7044 -6135
- package/README.md +9 -7
- package/generators.json +152 -10
- package/migrations.json +161 -0
- package/package.json +41 -22
- package/src/agentcore-gateway/__snapshots__/generator.spec.ts.snap +295 -0
- package/src/agentcore-gateway/agent-connection/generator.d.ts +19 -0
- package/src/agentcore-gateway/agent-connection/generator.js +95 -0
- package/src/agentcore-gateway/agent-connection/generator.js.map +1 -0
- package/src/agentcore-gateway/agent-connection/schema.d.js +6 -0
- package/src/agentcore-gateway/agent-connection/schema.d.js.map +1 -0
- package/src/agentcore-gateway/agent-connection/schema.d.ts +13 -0
- package/src/agentcore-gateway/agent-connection/schema.json +31 -0
- package/src/agentcore-gateway/attach-upstream.d.ts +49 -0
- package/src/agentcore-gateway/attach-upstream.js +59 -0
- package/src/agentcore-gateway/attach-upstream.js.map +1 -0
- package/src/agentcore-gateway/files/cedar/policies/README.md +61 -0
- package/src/agentcore-gateway/files/cedar/policies/permit-all.cedar +26 -0
- package/src/agentcore-gateway/files/project/http/local-dev.ts.template +77 -0
- package/src/agentcore-gateway/files/project/mcp/local-dev.ts.template +134 -0
- package/src/agentcore-gateway/gateway-connection/generator.d.ts +21 -0
- package/src/agentcore-gateway/gateway-connection/generator.js +103 -0
- package/src/agentcore-gateway/gateway-connection/generator.js.map +1 -0
- 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 +13 -0
- package/src/agentcore-gateway/gateway-connection/schema.json +31 -0
- package/src/agentcore-gateway/generator.d.ts +89 -0
- package/src/agentcore-gateway/generator.js +212 -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 +61 -0
- package/src/agentcore-gateway/mcp-connection/generator.js.map +1 -0
- 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 +13 -0
- package/src/agentcore-gateway/mcp-connection/schema.json +31 -0
- package/src/agentcore-gateway/react-connection/__snapshots__/generator.spec.ts.snap +68 -0
- package/src/agentcore-gateway/react-connection/generator.d.ts +19 -0
- package/src/agentcore-gateway/react-connection/generator.js +119 -0
- package/src/agentcore-gateway/react-connection/generator.js.map +1 -0
- package/src/agentcore-gateway/react-connection/schema.d.js +6 -0
- package/src/agentcore-gateway/react-connection/schema.d.js.map +1 -0
- package/src/agentcore-gateway/react-connection/schema.d.ts +13 -0
- package/src/agentcore-gateway/react-connection/schema.json +31 -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 +17 -0
- package/src/agentcore-gateway/schema.json +72 -0
- package/src/agentcore-harness/__snapshots__/generator.spec.ts.snap +238 -0
- package/src/agentcore-harness/files/project/README.md.template +83 -0
- package/src/agentcore-harness/files/project/scripts/chat.ts.template +99 -0
- package/src/agentcore-harness/files/project/src/PROMPT.md.template +16 -0
- package/src/agentcore-harness/generator.d.ts +62 -0
- package/src/agentcore-harness/generator.js +158 -0
- package/src/agentcore-harness/generator.js.map +1 -0
- package/src/agentcore-harness/schema.d.js +8 -0
- package/src/agentcore-harness/schema.d.js.map +1 -0
- package/src/agentcore-harness/schema.d.ts +17 -0
- package/src/agentcore-harness/schema.json +53 -0
- package/src/connection/agent-local-dev.d.ts +49 -0
- package/src/connection/agent-local-dev.js +84 -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/gateway-runtime-config.d.ts +19 -0
- package/src/connection/gateway-runtime-config.js +47 -0
- package/src/connection/gateway-runtime-config.js.map +1 -0
- package/src/connection/generator.d.ts +3 -10
- package/src/connection/generator.js +172 -194
- 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/scaffold-catalog.d.ts +267 -0
- package/src/connection/scaffold-catalog.js +347 -0
- package/src/connection/scaffold-catalog.js.map +1 -0
- package/src/connection/schema-resolver.d.ts +5 -0
- package/src/connection/schema-resolver.js +27 -0
- package/src/connection/schema-resolver.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/connection/supported-connections.d.ts +116 -0
- package/src/connection/supported-connections.js +163 -0
- package/src/connection/supported-connections.js.map +1 -0
- package/src/index.js +2 -5
- package/src/index.js.map +1 -1
- package/src/infra/app/__snapshots__/generator.spec.ts.snap +119 -72
- package/src/infra/app/files/app/README.md.template +8 -4
- package/src/infra/app/files/app/src/main.ts.template +5 -1
- package/src/infra/app/files/app/src/stages/application-stage.ts.template +1 -1
- package/src/infra/app/generator.d.ts +43 -0
- package/src/infra/app/generator.js +195 -127
- 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/init/generator.d.ts +31 -0
- package/src/init/generator.js +46 -0
- package/src/init/generator.js.map +1 -0
- package/src/init/schema.d.js +6 -0
- package/src/init/schema.d.js.map +1 -0
- package/src/init/schema.d.ts +16 -0
- package/src/init/schema.json +35 -0
- package/src/internal/test-matrix/generator.d.ts +29 -0
- package/src/internal/test-matrix/generator.js +698 -0
- package/src/internal/test-matrix/generator.js.map +1 -0
- package/src/internal/test-matrix/schema.d.js +6 -0
- package/src/internal/test-matrix/schema.d.js.map +1 -0
- package/src/internal/test-matrix/schema.d.ts +12 -0
- package/src/internal/test-matrix/schema.json +21 -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 +65 -68
- 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.d.ts +1 -1
- package/src/license/known-exceptions.js +19 -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/dev-server.d.ts +1 -0
- package/src/mcp-server/dev-server.js +18 -0
- package/src/mcp-server/dev-server.js.map +1 -0
- package/src/mcp-server/generator-info.js +149 -165
- package/src/mcp-server/generator-info.js.map +1 -1
- package/src/mcp-server/guide-pipeline.js +199 -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.d.ts +9 -3
- package/src/mcp-server/schema-registry.js +41 -38
- package/src/mcp-server/schema-registry.js.map +1 -1
- package/src/mcp-server/schema.d.ts +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 +24 -24
- package/src/mcp-server/server.js.map +1 -1
- package/src/mcp-server/tools/add-to-existing-project.d.ts +12 -0
- package/src/mcp-server/tools/add-to-existing-project.js +36 -0
- package/src/mcp-server/tools/add-to-existing-project.js.map +1 -0
- 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.d.ts +1 -1
- package/src/mcp-server/tools/general-guidance.js +55 -32
- 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/mcp-server/tools/upgrade-workspace.d.ts +11 -0
- package/src/mcp-server/tools/upgrade-workspace.js +32 -0
- package/src/mcp-server/tools/upgrade-workspace.js.map +1 -0
- package/src/migrations/latest/py-agent-a2a-httpx-client-per-call/metadata.json +3 -0
- package/src/migrations/latest/py-agent-a2a-httpx-client-per-call/migration.d.ts +6 -0
- package/src/migrations/latest/py-agent-a2a-httpx-client-per-call/migration.js +329 -0
- package/src/migrations/latest/py-agent-a2a-httpx-client-per-call/migration.js.map +1 -0
- package/src/migrations/latest/py-agent-a2a-lifespan-construction/metadata.json +3 -0
- package/src/migrations/latest/py-agent-a2a-lifespan-construction/migration.d.ts +6 -0
- package/src/migrations/latest/py-agent-a2a-lifespan-construction/migration.js +234 -0
- package/src/migrations/latest/py-agent-a2a-lifespan-construction/migration.js.map +1 -0
- package/src/migrations/latest/smithy-server-package-rename/metadata.json +3 -0
- package/src/migrations/latest/smithy-server-package-rename/migration.d.ts +6 -0
- package/src/migrations/latest/smithy-server-package-rename/migration.js +123 -0
- package/src/migrations/latest/smithy-server-package-rename/migration.js.map +1 -0
- package/src/migrations/latest/translate-script-whole-file-writes/files/build-system-prompt.ts.fixture +23 -0
- package/src/migrations/latest/translate-script-whole-file-writes/files/build-user-prompt.ts.fixture +96 -0
- package/src/migrations/latest/translate-script-whole-file-writes/files/config-path.ts.fixture +1 -0
- package/src/migrations/latest/translate-script-whole-file-writes/files/file-to-translate.ts.fixture +10 -0
- package/src/migrations/latest/translate-script-whole-file-writes/files/get-files-to-translate.ts.fixture +96 -0
- package/src/migrations/latest/translate-script-whole-file-writes/files/header.ts.fixture +15 -0
- package/src/migrations/latest/translate-script-whole-file-writes/files/log.ts.fixture +18 -0
- package/src/migrations/latest/translate-script-whole-file-writes/files/main-call.ts.fixture +6 -0
- package/src/migrations/latest/translate-script-whole-file-writes/files/main.ts.fixture +79 -0
- package/src/migrations/latest/translate-script-whole-file-writes/files/project-root.ts.fixture +1 -0
- package/src/migrations/latest/translate-script-whole-file-writes/files/run-with-concurrency.ts.fixture +57 -0
- package/src/migrations/latest/translate-script-whole-file-writes/files/scripts-dir.ts.fixture +1 -0
- package/src/migrations/latest/translate-script-whole-file-writes/files/translate-file-for-language.ts.fixture +61 -0
- package/src/migrations/latest/translate-script-whole-file-writes/grit/already-migrated.grit +1 -0
- package/src/migrations/latest/translate-script-whole-file-writes/grit/build-system-prompt.grit +6 -0
- package/src/migrations/latest/translate-script-whole-file-writes/grit/build-user-prompt.grit +6 -0
- package/src/migrations/latest/translate-script-whole-file-writes/grit/config-path.grit +1 -0
- package/src/migrations/latest/translate-script-whole-file-writes/grit/file-to-translate.grit +11 -0
- package/src/migrations/latest/translate-script-whole-file-writes/grit/get-files-to-translate.grit +7 -0
- package/src/migrations/latest/translate-script-whole-file-writes/grit/log.grit +3 -0
- package/src/migrations/latest/translate-script-whole-file-writes/grit/main-call.grit +1 -0
- package/src/migrations/latest/translate-script-whole-file-writes/grit/main.grit +8 -0
- package/src/migrations/latest/translate-script-whole-file-writes/grit/project-root.grit +1 -0
- package/src/migrations/latest/translate-script-whole-file-writes/grit/run-with-concurrency.grit +6 -0
- package/src/migrations/latest/translate-script-whole-file-writes/grit/translate-file-for-language.grit +6 -0
- package/src/migrations/latest/translate-script-whole-file-writes/metadata.json +3 -0
- package/src/migrations/latest/translate-script-whole-file-writes/migration.d.ts +2 -0
- package/src/migrations/latest/translate-script-whole-file-writes/migration.js +103 -0
- package/src/migrations/latest/translate-script-whole-file-writes/migration.js.map +1 -0
- package/src/migrations/latest/translate-script-whole-file-writes/test-fixtures/released-script-first.ts.fixture +430 -0
- package/src/migrations/latest/translate-script-whole-file-writes/test-fixtures/released-script.ts.fixture +431 -0
- package/src/migrations/v1.0.0-rc.50/0001-modernize-function-props-cast/metadata.json +3 -0
- package/src/migrations/v1.0.0-rc.50/0001-modernize-function-props-cast/migration.d.ts +6 -0
- package/src/migrations/v1.0.0-rc.50/0001-modernize-function-props-cast/migration.js +65 -0
- package/src/migrations/v1.0.0-rc.50/0001-modernize-function-props-cast/migration.js.map +1 -0
- package/src/migrations/v1.0.0-rc.50/0002-restrict-cors-to-custom-domains/metadata.json +3 -0
- package/src/migrations/v1.0.0-rc.50/0002-restrict-cors-to-custom-domains/migration.d.ts +6 -0
- package/src/migrations/v1.0.0-rc.50/0002-restrict-cors-to-custom-domains/migration.js +108 -0
- package/src/migrations/v1.0.0-rc.50/0002-restrict-cors-to-custom-domains/migration.js.map +1 -0
- package/src/migrations/v1.0.0-rc.50/0003-terraform-bootstrap-adopt-existing-bucket/metadata.json +3 -0
- package/src/migrations/v1.0.0-rc.50/0003-terraform-bootstrap-adopt-existing-bucket/migration.d.ts +6 -0
- package/src/migrations/v1.0.0-rc.50/0003-terraform-bootstrap-adopt-existing-bucket/migration.js +128 -0
- package/src/migrations/v1.0.0-rc.50/0003-terraform-bootstrap-adopt-existing-bucket/migration.js.map +1 -0
- package/src/migrations/v1.0.0-rc.52/0001-user-identity-waf-allow-localhost-callback/metadata.json +3 -0
- package/src/migrations/v1.0.0-rc.52/0001-user-identity-waf-allow-localhost-callback/migration.d.ts +6 -0
- package/src/migrations/v1.0.0-rc.52/0001-user-identity-waf-allow-localhost-callback/migration.js +215 -0
- package/src/migrations/v1.0.0-rc.52/0001-user-identity-waf-allow-localhost-callback/migration.js.map +1 -0
- package/src/migrations/v1.0.0-rc.54/0001-order-access-log-delivery-after-bucket-policy/metadata.json +3 -0
- package/src/migrations/v1.0.0-rc.54/0001-order-access-log-delivery-after-bucket-policy/migration.d.ts +6 -0
- package/src/migrations/v1.0.0-rc.54/0001-order-access-log-delivery-after-bucket-policy/migration.js +93 -0
- package/src/migrations/v1.0.0-rc.54/0001-order-access-log-delivery-after-bucket-policy/migration.js.map +1 -0
- package/src/migrations/v1.0.0-rc.55/0001-backfill-generator-metadata/metadata.json +3 -0
- package/src/migrations/v1.0.0-rc.55/0001-backfill-generator-metadata/migration.d.ts +96 -0
- package/src/migrations/v1.0.0-rc.55/0001-backfill-generator-metadata/migration.js +670 -0
- package/src/migrations/v1.0.0-rc.55/0001-backfill-generator-metadata/migration.js.map +1 -0
- package/src/migrations/v1.0.0-rc.56/0001-dynamodb-local-remove-optimize-flag/metadata.json +3 -0
- package/src/migrations/v1.0.0-rc.56/0001-dynamodb-local-remove-optimize-flag/migration.d.ts +6 -0
- package/src/migrations/v1.0.0-rc.56/0001-dynamodb-local-remove-optimize-flag/migration.js +89 -0
- package/src/migrations/v1.0.0-rc.56/0001-dynamodb-local-remove-optimize-flag/migration.js.map +1 -0
- package/src/migrations/v1.0.0-rc.57/0001-ts-agent-session-management-support/metadata.json +3 -0
- package/src/migrations/v1.0.0-rc.57/0001-ts-agent-session-management-support/migration.d.ts +6 -0
- package/src/migrations/v1.0.0-rc.57/0001-ts-agent-session-management-support/migration.js +449 -0
- package/src/migrations/v1.0.0-rc.57/0001-ts-agent-session-management-support/migration.js.map +1 -0
- package/src/migrations/v1.0.0-rc.58/0001-smithy-ssdk-bundle-pins/metadata.json +3 -0
- package/src/migrations/v1.0.0-rc.58/0001-smithy-ssdk-bundle-pins/migration.d.ts +6 -0
- package/src/migrations/v1.0.0-rc.58/0001-smithy-ssdk-bundle-pins/migration.js +78 -0
- package/src/migrations/v1.0.0-rc.58/0001-smithy-ssdk-bundle-pins/migration.js.map +1 -0
- package/src/{smithy/project/files/build.Dockerfile.template → migrations/v1.0.0-rc.58/0001-smithy-ssdk-bundle-pins/rc57-service.Dockerfile.fixture} +1 -4
- package/src/migrations/v1.0.0-rc.59/0001-gateway-agent-targets/__snapshots__/migration.spec.ts.snap +223 -0
- package/src/migrations/v1.0.0-rc.59/0001-gateway-agent-targets/metadata.json +3 -0
- package/src/migrations/v1.0.0-rc.59/0001-gateway-agent-targets/migration.d.ts +6 -0
- package/src/migrations/v1.0.0-rc.59/0001-gateway-agent-targets/migration.js +217 -0
- package/src/migrations/v1.0.0-rc.59/0001-gateway-agent-targets/migration.js.map +1 -0
- package/src/migrations/v1.0.0-rc.60/0001-gateway-cognito-passthrough/__snapshots__/migration.spec.ts.snap +149 -0
- package/src/migrations/v1.0.0-rc.60/0001-gateway-cognito-passthrough/metadata.json +3 -0
- package/src/migrations/v1.0.0-rc.60/0001-gateway-cognito-passthrough/migration.d.ts +6 -0
- package/src/migrations/v1.0.0-rc.60/0001-gateway-cognito-passthrough/migration.js +195 -0
- package/src/migrations/v1.0.0-rc.60/0001-gateway-cognito-passthrough/migration.js.map +1 -0
- package/src/migrations/v1.0.0-rc.60/0002-waf-log-group-removal/__snapshots__/migration.spec.ts.snap +57 -0
- package/src/migrations/v1.0.0-rc.60/0002-waf-log-group-removal/metadata.json +3 -0
- package/src/migrations/v1.0.0-rc.60/0002-waf-log-group-removal/migration.d.ts +6 -0
- package/src/migrations/v1.0.0-rc.60/0002-waf-log-group-removal/migration.js +77 -0
- package/src/migrations/v1.0.0-rc.60/0002-waf-log-group-removal/migration.js.map +1 -0
- package/src/migrations/v1.0.0-rc.60/0003-strip-pip-from-python-images/__snapshots__/migration.spec.ts.snap +48 -0
- package/src/migrations/v1.0.0-rc.60/0003-strip-pip-from-python-images/metadata.json +3 -0
- package/src/migrations/v1.0.0-rc.60/0003-strip-pip-from-python-images/migration.d.ts +6 -0
- package/src/migrations/v1.0.0-rc.60/0003-strip-pip-from-python-images/migration.js +91 -0
- package/src/migrations/v1.0.0-rc.60/0003-strip-pip-from-python-images/migration.js.map +1 -0
- package/src/migrations/v1.0.0-rc.61/0001-py-agent-lifespan-construction/metadata.json +3 -0
- package/src/migrations/v1.0.0-rc.61/0001-py-agent-lifespan-construction/migration.d.ts +6 -0
- package/src/migrations/v1.0.0-rc.61/0001-py-agent-lifespan-construction/migration.js +412 -0
- package/src/migrations/v1.0.0-rc.61/0001-py-agent-lifespan-construction/migration.js.map +1 -0
- package/src/migrations/v1.0.0-rc.62/0001-rename-load-runtime-config-target/metadata.json +3 -0
- package/src/migrations/v1.0.0-rc.62/0001-rename-load-runtime-config-target/migration.d.ts +6 -0
- package/src/migrations/v1.0.0-rc.62/0001-rename-load-runtime-config-target/migration.js +33 -0
- package/src/migrations/v1.0.0-rc.62/0001-rename-load-runtime-config-target/migration.js.map +1 -0
- package/src/migrations/v1.0.0-rc.63/0001-add-deploy-sandbox-target/metadata.json +3 -0
- package/src/migrations/v1.0.0-rc.63/0001-add-deploy-sandbox-target/migration.d.ts +6 -0
- package/src/migrations/v1.0.0-rc.63/0001-add-deploy-sandbox-target/migration.js +83 -0
- package/src/migrations/v1.0.0-rc.63/0001-add-deploy-sandbox-target/migration.js.map +1 -0
- package/src/migrations/v1.0.0-rc.64/0001-smithy-build-without-docker/legacy-service.Dockerfile.fixture +95 -0
- package/src/migrations/v1.0.0-rc.64/0001-smithy-build-without-docker/metadata.json +3 -0
- package/src/migrations/v1.0.0-rc.64/0001-smithy-build-without-docker/migration.d.ts +6 -0
- package/src/migrations/v1.0.0-rc.64/0001-smithy-build-without-docker/migration.js +154 -0
- package/src/migrations/v1.0.0-rc.64/0001-smithy-build-without-docker/migration.js.map +1 -0
- package/src/migrations/v1.0.0-rc.65/0001-vite-config-import-meta-dirname/metadata.json +3 -0
- package/src/migrations/v1.0.0-rc.65/0001-vite-config-import-meta-dirname/migration.d.ts +6 -0
- package/src/migrations/v1.0.0-rc.65/0001-vite-config-import-meta-dirname/migration.js +71 -0
- package/src/migrations/v1.0.0-rc.65/0001-vite-config-import-meta-dirname/migration.js.map +1 -0
- package/src/migrations/v1.0.0-rc.65/0002-rolldown-code-splitting/metadata.json +3 -0
- package/src/migrations/v1.0.0-rc.65/0002-rolldown-code-splitting/migration.d.ts +6 -0
- package/src/migrations/v1.0.0-rc.65/0002-rolldown-code-splitting/migration.js +57 -0
- package/src/migrations/v1.0.0-rc.65/0002-rolldown-code-splitting/migration.js.map +1 -0
- package/src/open-api/ts-client/__snapshots__/generator.additional-properties.spec.ts.snap +147 -33
- package/src/open-api/ts-client/__snapshots__/generator.arrays.spec.ts.snap +308 -75
- package/src/open-api/ts-client/__snapshots__/generator.complex-types.spec.ts.snap +298 -74
- package/src/open-api/ts-client/__snapshots__/generator.composite-types.spec.ts.snap +748 -103
- package/src/open-api/ts-client/__snapshots__/generator.content-type.spec.ts.snap +230 -37
- package/src/open-api/ts-client/__snapshots__/generator.duplicate-types.spec.ts.snap +249 -52
- package/src/open-api/ts-client/__snapshots__/generator.edge-cases.spec.ts.snap +5535 -0
- package/src/open-api/ts-client/__snapshots__/generator.fast-api-gaps.spec.ts.snap +736 -0
- package/src/open-api/ts-client/__snapshots__/generator.fast-api.spec.ts.snap +305 -71
- package/src/open-api/ts-client/__snapshots__/generator.multipart.spec.ts.snap +298 -0
- package/src/open-api/ts-client/__snapshots__/generator.primitive-types.spec.ts.snap +353 -82
- package/src/open-api/ts-client/__snapshots__/generator.request.spec.ts.snap +176 -55
- package/src/open-api/ts-client/__snapshots__/generator.reserved-keywords.spec.ts.snap +100 -24
- package/src/open-api/ts-client/__snapshots__/generator.response.spec.ts.snap +147 -33
- package/src/open-api/ts-client/__snapshots__/generator.spec-compliance.spec.ts.snap +1883 -0
- package/src/open-api/ts-client/__snapshots__/generator.streaming.spec.ts.snap +392 -88
- package/src/open-api/ts-client/__snapshots__/generator.tags.spec.ts.snap +200 -48
- package/src/open-api/ts-client/files/client.gen.ts.template +358 -24
- package/src/open-api/ts-client/files/types.gen.ts.template +6 -4
- package/src/open-api/ts-client/generator.js +41 -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/files/options-proxy.gen.ts.template +7 -2
- package/src/open-api/ts-hooks/generator.js +17 -21
- package/src/open-api/ts-hooks/generator.js.map +1 -1
- package/src/open-api/ts-hooks/generator.spec.tsx +70 -0
- 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.d.ts +0 -6
- package/src/open-api/utils/codegen-data/languages.js +59 -66
- package/src/open-api/utils/codegen-data/languages.js.map +1 -1
- package/src/open-api/utils/codegen-data/types.d.ts +255 -10
- package/src/open-api/utils/codegen-data/types.js +54 -30
- package/src/open-api/utils/codegen-data/types.js.map +1 -1
- package/src/open-api/utils/codegen-data.d.ts +2 -2
- package/src/open-api/utils/codegen-data.js +494 -674
- package/src/open-api/utils/codegen-data.js.map +1 -1
- package/src/open-api/utils/normalise.js +437 -246
- 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/parser.d.ts +55 -0
- package/src/open-api/utils/parser.js +787 -0
- package/src/open-api/utils/parser.js.map +1 -0
- 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.d.ts +18 -0
- 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 +101 -20
- package/src/preset/generator.d.ts +14 -1
- package/src/preset/generator.js +76 -151
- 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 +4 -1
- package/src/preset/schema.json +16 -5
- package/src/py/agent/__snapshots__/generator.constructs.spec.ts.snap +326 -0
- package/src/py/agent/__snapshots__/generator.frameworks.spec.ts.snap +738 -0
- package/src/py/agent/__snapshots__/{generator.spec.ts.snap → generator.protocols.spec.ts.snap} +191 -315
- package/src/py/agent/a2a-connection/__snapshots__/generator.spec.ts.snap +231 -0
- package/src/py/agent/a2a-connection/files/agent-connection/app/__targetAgentSnakeCase___client_strands.py.template +29 -0
- package/src/py/agent/a2a-connection/files/langchain/agent-connection/app/__targetAgentSnakeCase___client_langchain.py.template +29 -0
- package/src/py/agent/a2a-connection/generator.d.ts +24 -0
- package/src/py/agent/a2a-connection/generator.js +145 -88
- 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/files/deploy/Dockerfile.template +8 -1
- package/src/py/agent/files/langchain/a2a/main.py.template +94 -0
- package/src/py/agent/files/langchain/ag-ui/main.py.template +87 -0
- package/src/py/agent/files/langchain/common/agent.py.template +30 -0
- package/src/py/agent/files/{http → langchain/http}/init.py.template +17 -25
- package/src/py/agent/files/langchain/http/main.py.template +81 -0
- package/src/py/agent/files/{a2a → strands/a2a}/main.py.template +33 -15
- package/src/py/agent/files/strands/ag-ui/main.py.template +89 -0
- package/src/py/agent/files/{common → strands/common}/agent.py.template +2 -0
- package/src/py/agent/files/strands/http/init.py.template +97 -0
- package/src/py/agent/files/{http → strands/http}/main.py.template +4 -13
- package/src/py/agent/gateway-connection/__snapshots__/generator.spec.ts.snap +184 -0
- package/src/py/agent/gateway-connection/files/agent-connection/app/__gatewaySnakeCase___client_strands.py.template +35 -0
- package/src/py/agent/gateway-connection/files/langchain/agent-connection/app/__gatewaySnakeCase___client_langchain.py.template +34 -0
- package/src/py/agent/gateway-connection/generator.d.ts +33 -0
- package/src/py/agent/gateway-connection/generator.js +153 -0
- package/src/py/agent/gateway-connection/generator.js.map +1 -0
- 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 +13 -0
- package/src/py/agent/gateway-connection/schema.json +31 -0
- package/src/py/agent/generator.d.ts +154 -1
- package/src/py/agent/generator.js +396 -197
- package/src/py/agent/generator.js.map +1 -1
- package/src/py/agent/mcp-connection/__snapshots__/generator.spec.ts.snap +154 -89
- package/src/py/agent/mcp-connection/files/agent-connection/app/__mcpServerSnakeCase___client_strands.py.template +31 -0
- package/src/py/agent/mcp-connection/files/langchain/agent-connection/app/__mcpServerSnakeCase___client_langchain.py.template +31 -0
- package/src/py/agent/mcp-connection/generator.d.ts +23 -0
- package/src/py/agent/mcp-connection/generator.js +103 -130
- 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 +17 -19
- package/src/py/agent/react-connection/generator.d.ts +150 -1
- package/src/py/agent/react-connection/generator.js +105 -65
- 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 +5 -1
- package/src/py/agent/schema.json +15 -1
- 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 +1520 -0
- package/src/py/dynamodb/agent-connection/__snapshots__/generator.spec.ts.snap +63 -0
- package/src/py/dynamodb/agent-connection/generator.d.ts +10 -0
- package/src/py/dynamodb/agent-connection/generator.js +45 -0
- package/src/py/dynamodb/agent-connection/generator.js.map +1 -0
- 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 +15 -0
- package/src/py/dynamodb/agent-connection/schema.json +27 -0
- package/src/py/dynamodb/fast-api-connection/__snapshots__/generator.spec.ts.snap +32 -0
- package/src/py/dynamodb/fast-api-connection/generator.d.ts +10 -0
- package/src/py/dynamodb/fast-api-connection/generator.js +39 -0
- package/src/py/dynamodb/fast-api-connection/generator.js.map +1 -0
- 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 +13 -0
- package/src/py/dynamodb/fast-api-connection/schema.json +23 -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 +39 -0
- package/src/py/dynamodb/generator.js +130 -0
- package/src/py/dynamodb/generator.js.map +1 -0
- package/src/py/dynamodb/mcp-server-connection/__snapshots__/generator.spec.ts.snap +63 -0
- package/src/py/dynamodb/mcp-server-connection/generator.d.ts +10 -0
- package/src/py/dynamodb/mcp-server-connection/generator.js +45 -0
- package/src/py/dynamodb/mcp-server-connection/generator.js.map +1 -0
- 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 +15 -0
- package/src/py/dynamodb/mcp-server-connection/schema.json +27 -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 +16 -0
- package/src/py/dynamodb/schema.json +76 -0
- package/src/py/fast-api/__snapshots__/generator.spec.ts.snap +240 -4693
- package/src/py/fast-api/__snapshots__/generator.terraform.spec.ts.snap +5409 -0
- 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 +72 -0
- package/src/py/fast-api/generator.js +134 -95
- package/src/py/fast-api/generator.js.map +1 -1
- package/src/py/fast-api/react/__snapshots__/generator.spec.ts.snap +4 -3
- package/src/py/fast-api/react/generator.d.ts +16 -1
- package/src/py/fast-api/react/generator.js +38 -26
- package/src/py/fast-api/react/generator.js.map +1 -1
- package/src/py/fast-api/react/open-api.js +31 -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 +6 -0
- package/src/py/lambda-function/__snapshots__/generator.spec.ts.snap +4 -4
- package/src/py/lambda-function/generator.d.ts +21 -0
- package/src/py/lambda-function/generator.js +82 -62
- 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 +221 -21
- package/src/py/mcp-server/files/deploy/Dockerfile.template +8 -1
- package/src/py/mcp-server/generator.d.ts +68 -0
- package/src/py/mcp-server/generator.js +204 -131
- 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 +6 -0
- package/src/py/project/generator.d.ts +27 -1
- package/src/py/project/generator.js +248 -130
- 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/py/rdb/__snapshots__/generator.spec.ts.snap +2070 -0
- package/src/py/rdb/agent-connection/__snapshots__/generator.spec.ts.snap +123 -0
- package/src/py/rdb/agent-connection/generator.d.ts +10 -0
- package/src/py/rdb/agent-connection/generator.js +52 -0
- package/src/py/rdb/agent-connection/generator.js.map +1 -0
- package/src/py/rdb/agent-connection/schema.d.js +8 -0
- package/src/py/rdb/agent-connection/schema.d.js.map +1 -0
- package/src/py/rdb/agent-connection/schema.d.ts +15 -0
- package/src/py/rdb/agent-connection/schema.json +27 -0
- package/src/py/rdb/fast-api-connection/__snapshots__/generator.spec.ts.snap +51 -0
- package/src/py/rdb/fast-api-connection/files/__apiModuleName__/dependencies/__rdbNameSnake__.py.template +14 -0
- package/src/py/rdb/fast-api-connection/generator.d.ts +10 -0
- package/src/py/rdb/fast-api-connection/generator.js +56 -0
- package/src/py/rdb/fast-api-connection/generator.js.map +1 -0
- package/src/py/rdb/fast-api-connection/schema.d.js +8 -0
- package/src/py/rdb/fast-api-connection/schema.d.js.map +1 -0
- package/src/py/rdb/fast-api-connection/schema.d.ts +13 -0
- package/src/py/rdb/fast-api-connection/schema.json +23 -0
- package/src/py/rdb/files/Dockerfile.create-db-user.template +14 -0
- package/src/py/rdb/files/Dockerfile.migration.template +14 -0
- package/src/py/rdb/files/__name__/__init__.py.template +3 -0
- package/src/py/rdb/files/__name__/connection.py.template +55 -0
- package/src/py/rdb/files/__name__/create_db_user_handler.py.template +97 -0
- package/src/py/rdb/files/__name__/migration_handler.py.template +36 -0
- package/src/py/rdb/files/__name__/models/__init__.py.template +3 -0
- package/src/py/rdb/files/__name__/models/example.py.template +8 -0
- package/src/py/rdb/files/__name__/utils.py.template +104 -0
- package/src/py/rdb/files/alembic.ini.template +38 -0
- package/src/py/rdb/files/config.json.template +14 -0
- package/src/py/rdb/files/migrations/env.py.template +80 -0
- package/src/py/rdb/files/migrations/script.py.mako.template +28 -0
- package/src/py/rdb/generator.d.ts +103 -0
- package/src/py/rdb/generator.js +328 -0
- package/src/py/rdb/generator.js.map +1 -0
- package/src/py/rdb/mcp-server-connection/__snapshots__/generator.spec.ts.snap +119 -0
- package/src/py/rdb/mcp-server-connection/generator.d.ts +10 -0
- package/src/py/rdb/mcp-server-connection/generator.js +52 -0
- package/src/py/rdb/mcp-server-connection/generator.js.map +1 -0
- package/src/py/rdb/mcp-server-connection/schema.d.js +8 -0
- package/src/py/rdb/mcp-server-connection/schema.d.js.map +1 -0
- package/src/py/rdb/mcp-server-connection/schema.d.ts +15 -0
- package/src/py/rdb/mcp-server-connection/schema.json +27 -0
- package/src/py/rdb/schema.d.js +6 -0
- package/src/py/rdb/schema.d.js.map +1 -0
- package/src/py/rdb/schema.d.ts +16 -0
- package/src/py/rdb/schema.json +78 -0
- package/src/py/rdb/utils.d.ts +6 -0
- package/src/py/rdb/utils.js +16 -0
- package/src/py/rdb/utils.js.map +1 -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/src/sdk/license.d.ts +8 -0
- 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 +18 -0
- package/src/sdk/py.js +12 -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 +39 -0
- package/src/sdk/ts.js +41 -0
- package/src/sdk/ts.js.map +1 -0
- package/{sdk/utils/format.d.ts → src/sdk/utils/ast.d.ts} +1 -1
- package/src/sdk/utils/ast.js +6 -0
- package/src/sdk/utils/ast.js.map +1 -0
- package/{sdk/utils/ast.d.ts → src/sdk/utils/format.d.ts} +1 -2
- 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 +245 -242
- package/src/smithy/project/files/{smithy-build.json.template → service/smithy-build.json.template} +5 -5
- package/src/smithy/project/files/{src → service/src}/operations/echo.smithy.template +1 -0
- package/src/smithy/project/files/shapes/smithy-build.json.template +7 -0
- package/src/smithy/project/files/shapes/src/main.smithy.template +11 -0
- package/src/smithy/project/files/ssdk-bundle/ssdk.rolldown.config.mjs.template +52 -0
- package/src/smithy/project/generator.d.ts +90 -0
- package/src/smithy/project/generator.js +223 -56
- 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 +2 -0
- package/src/smithy/project/schema.json +28 -1
- package/src/smithy/react-connection/__snapshots__/generator.spec.ts.snap +1 -1
- package/src/smithy/react-connection/generator.d.ts +15 -0
- package/src/smithy/react-connection/generator.js +54 -48
- 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 +871 -109
- package/src/smithy/ts/api/files/handler.ts.template +3 -3
- package/src/smithy/ts/api/files/local-server.ts.template +3 -3
- package/src/smithy/ts/api/files/operations/echo.ts.template +2 -2
- package/src/smithy/ts/api/files/service.ts.template +3 -3
- package/src/smithy/ts/api/generator.d.ts +88 -0
- package/src/smithy/ts/api/generator.js +187 -114
- 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 +6 -0
- package/src/terraform/project/files/application/scripts/bootstrap.ts.template +40 -1
- package/src/terraform/project/files/application/src/main.tf.template +6 -1
- package/src/terraform/project/files/application/src/providers.tf.template +1 -1
- package/src/terraform/project/generator.d.ts +50 -0
- package/src/terraform/project/generator.js +212 -111
- 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 +1182 -184
- package/src/trpc/backend/files/src/client/index.ts.template +1 -1
- package/src/trpc/backend/files/src/handler.ts.template +1 -1
- package/src/trpc/backend/files/src/index.ts.template +5 -5
- package/src/trpc/backend/files/src/init.ts.template +1 -1
- package/src/trpc/backend/files/src/local-server.ts.template +1 -1
- package/src/trpc/backend/files/src/middleware/index.ts.template +7 -7
- package/src/trpc/backend/files/src/procedures/echo.ts.template +3 -3
- package/src/trpc/backend/files/src/router.ts.template +2 -2
- package/src/trpc/backend/files/src/schema/echo.ts.template +2 -2
- package/src/trpc/backend/files/src/schema/index.ts.template +1 -1
- package/src/trpc/backend/generator.d.ts +90 -1
- package/src/trpc/backend/generator.js +177 -100
- 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 +6 -0
- package/src/trpc/react/__snapshots__/generator.spec.ts.snap +4 -4
- package/src/trpc/react/files/src/components/__apiNameClassName__ClientProvider.tsx.template +3 -3
- package/src/trpc/react/generator.d.ts +38 -1
- package/src/trpc/react/generator.js +105 -63
- 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 +1452 -25
- package/src/ts/agent/a2a-connection/__snapshots__/generator.spec.ts.snap +258 -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 +46 -0
- package/src/ts/agent/a2a-connection/generator.js +110 -63
- 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/files/a2a/index.ts.template +1 -1
- package/src/ts/agent/files/ag-ui/index.ts.template +36 -11
- package/src/ts/agent/files/common/agent.ts.template +15 -2
- package/src/ts/agent/files/common/session.ts.template +43 -0
- package/src/ts/agent/files/deploy/Dockerfile.template +13 -2
- package/src/ts/agent/files/http/client.ts.template +2 -2
- package/src/ts/agent/files/http/index.ts.template +2 -2
- package/src/ts/agent/files/http/router.ts.template +5 -5
- package/src/ts/agent/gateway-connection/__snapshots__/generator.spec.ts.snap +222 -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 +47 -0
- package/src/ts/agent/gateway-connection/generator.js +144 -0
- package/src/ts/agent/gateway-connection/generator.js.map +1 -0
- 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 +13 -0
- package/src/ts/agent/gateway-connection/schema.json +31 -0
- package/src/ts/agent/generator.d.ts +205 -0
- package/src/ts/agent/generator.js +339 -156
- package/src/ts/agent/generator.js.map +1 -1
- package/src/ts/agent/mcp-connection/__snapshots__/generator.spec.ts.snap +194 -113
- package/src/ts/agent/mcp-connection/files/agent-connection/app/__mcpServerKebabCase__-client-strands.ts.template +23 -0
- package/src/ts/agent/mcp-connection/generator.d.ts +37 -0
- package/src/ts/agent/mcp-connection/generator.js +88 -65
- 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/__snapshots__/generator.spec.ts.snap +8 -4
- package/src/ts/agent/react-connection/files/src/components/__agentNameClassName__AgentClientProvider.tsx.template +2 -1
- package/src/ts/agent/react-connection/generator.d.ts +202 -1
- package/src/ts/agent/react-connection/generator.js +158 -99
- 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 +4 -0
- package/src/ts/agent/schema.json +14 -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 +28 -14
- package/src/ts/astro-docs/files/base/src/content/docs/en/index.mdx.template +2 -2
- package/src/ts/astro-docs/files/base/src/content.config.ts.template +4 -4
- package/src/ts/astro-docs/files/translation/scripts/translate.ts.template +272 -150
- package/src/ts/astro-docs/generator.d.ts +38 -0
- package/src/ts/astro-docs/generator.js +126 -61
- 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/dcr-proxy/__snapshots__/generator.spec.ts.snap +982 -0
- package/src/ts/dcr-proxy/generator.d.ts +34 -0
- package/src/ts/dcr-proxy/generator.js +115 -0
- package/src/ts/dcr-proxy/generator.js.map +1 -0
- package/src/ts/dcr-proxy/schema.d.js +6 -0
- package/src/ts/dcr-proxy/schema.d.js.map +1 -0
- package/src/ts/dcr-proxy/schema.d.ts +13 -0
- package/src/ts/dcr-proxy/schema.json +44 -0
- 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 +400 -518
- package/src/ts/dynamodb/agent-connection/__snapshots__/generator.spec.ts.snap +23 -5
- package/src/ts/dynamodb/agent-connection/generator.js +27 -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 +24 -0
- package/src/ts/dynamodb/files/src/client.ts.template +30 -11
- package/src/ts/dynamodb/files/src/entities/example.ts.template +1 -1
- package/src/ts/dynamodb/files/src/entities/index.ts.template +1 -1
- package/src/ts/dynamodb/files/src/index.ts.template +2 -11
- package/src/ts/dynamodb/generator.d.ts +41 -0
- package/src/ts/dynamodb/generator.js +106 -64
- package/src/ts/dynamodb/generator.js.map +1 -1
- package/src/ts/dynamodb/mcp-server-connection/__snapshots__/generator.spec.ts.snap +23 -5
- package/src/ts/dynamodb/mcp-server-connection/generator.js +27 -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 +2 -0
- package/src/ts/dynamodb/schema.json +26 -2
- package/src/ts/dynamodb/smithy-connection/__snapshots__/generator.spec.ts.snap +12 -3
- package/src/ts/dynamodb/smithy-connection/generator.js +22 -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 +12 -3
- package/src/ts/dynamodb/trpc-connection/generator.js +22 -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 +8 -6
- package/src/ts/lambda-function/files/handler/__lambdaFunctionKebabCase__.ts.template +2 -1
- package/src/ts/lambda-function/generator.d.ts +38 -0
- package/src/ts/lambda-function/generator.js +98 -65
- 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 +83 -45
- package/src/ts/lib/__snapshots__/vitest.spec.ts.snap +1 -1
- package/src/ts/lib/biome.js +71 -35
- package/src/ts/lib/biome.js.map +1 -1
- package/src/ts/lib/generator.d.ts +7 -0
- package/src/ts/lib/generator.js +115 -103
- 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/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.d.ts +13 -1
- package/src/ts/lib/ts-project-utils.js +96 -71
- package/src/ts/lib/ts-project-utils.js.map +1 -1
- package/src/ts/lib/types.d.ts +6 -0
- package/src/ts/lib/types.js +5 -2
- package/src/ts/lib/types.js.map +1 -1
- package/src/ts/lib/vitest.d.ts +10 -1
- package/src/ts/lib/vitest.js +54 -26
- package/src/ts/lib/vitest.js.map +1 -1
- package/src/ts/mcp-server/__snapshots__/generator.spec.ts.snap +221 -44
- package/src/ts/mcp-server/files/Dockerfile.template +13 -2
- package/src/ts/mcp-server/generator.d.ts +110 -0
- package/src/ts/mcp-server/generator.js +231 -148
- 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 +6 -0
- package/src/ts/nx-generator/__snapshots__/generator.spec.ts.snap +28 -13
- 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.spec.ts.template +1 -1
- 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.d.ts +3 -0
- package/src/ts/nx-generator/generator.js +124 -73
- 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-migration/files/migration.spec.ts.template +26 -0
- package/src/ts/nx-migration/files/migration.ts.template +65 -0
- package/src/ts/nx-migration/files/prompt.md.template +46 -0
- package/src/ts/nx-migration/generator.d.ts +27 -0
- package/src/ts/nx-migration/generator.js +147 -0
- package/src/ts/nx-migration/generator.js.map +1 -0
- package/src/ts/nx-migration/schema.d.js +6 -0
- package/src/ts/nx-migration/schema.d.js.map +1 -0
- package/src/ts/nx-migration/schema.d.ts +13 -0
- package/src/ts/nx-migration/schema.json +63 -0
- package/src/ts/nx-plugin/__snapshots__/generator.spec.ts.snap +36 -25
- package/src/ts/nx-plugin/files/mcp-server/resources/GENERAL_GUIDANCE.md.template +5 -6
- 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 +4 -4
- package/src/ts/nx-plugin/generator.d.ts +3 -0
- package/src/ts/nx-plugin/generator.js +67 -50
- 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.d.ts +27 -2
- package/src/ts/nx-plugin/utils.js +66 -51
- package/src/ts/nx-plugin/utils.js.map +1 -1
- package/src/ts/rdb/__snapshots__/generator.spec.ts.snap +553 -644
- package/src/ts/rdb/agent-connection/__snapshots__/generator.spec.ts.snap +16 -6
- package/src/ts/rdb/agent-connection/generator.js +44 -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/Dockerfile.template +19 -1
- package/src/ts/rdb/files/config.json.template +14 -0
- package/src/ts/rdb/files/prisma.config.ts.template +6 -5
- package/src/ts/rdb/files/src/create-db-user-handler.ts.template +9 -11
- package/src/ts/rdb/files/src/index.ts.template +1 -2
- package/src/ts/rdb/files/src/migration-handler.ts.template +5 -30
- package/src/ts/rdb/files/src/prisma.ts.template +33 -25
- package/src/ts/rdb/files/src/utils.ts.template +3 -0
- package/src/ts/rdb/generator.d.ts +117 -4
- package/src/ts/rdb/generator.js +257 -138
- package/src/ts/rdb/generator.js.map +1 -1
- package/src/ts/rdb/mcp-server-connection/__snapshots__/generator.spec.ts.snap +16 -6
- package/src/ts/rdb/mcp-server-connection/generator.js +42 -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 +7 -1
- package/src/ts/rdb/smithy-connection/__snapshots__/generator.spec.ts.snap +18 -9
- package/src/ts/rdb/smithy-connection/generator.js +48 -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 +12 -3
- package/src/ts/rdb/trpc-connection/generator.js +37 -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/files/common/src/hooks/useAgui__agentNameClassName__.tsx.template +17 -16
- package/src/ts/react-website/agui/generator.d.ts +97 -0
- package/src/ts/react-website/agui/generator.js +114 -67
- package/src/ts/react-website/agui/generator.js.map +1 -1
- package/src/ts/react-website/app/__snapshots__/generator.spec.ts.snap +1391 -644
- package/src/ts/react-website/app/files/app/common/README.md.template +1 -1
- package/src/ts/react-website/app/generator.d.ts +142 -2
- package/src/ts/react-website/app/generator.js +333 -209
- 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 +12 -6
- package/src/ts/react-website/cognito-auth/__snapshots__/generator.spec.ts.snap +161 -26
- package/src/ts/react-website/cognito-auth/__snapshots__/generator.terraform.spec.ts.snap +48 -12
- package/src/ts/react-website/cognito-auth/__snapshots__/generator.ux-provider.spec.ts.snap +0 -20
- 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 +25 -1
- package/src/ts/react-website/cognito-auth/generator.js +79 -64
- package/src/ts/react-website/cognito-auth/generator.js.map +1 -1
- package/src/ts/react-website/cognito-auth/grit/cloudscape-auth-menu.grit +3 -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/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 +137 -60
- 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/__snapshots__/shared-constructs.spec.ts.snap +21 -0
- package/src/utils/add-dependencies.d.ts +38 -0
- package/src/utils/add-dependencies.js +83 -0
- package/src/utils/add-dependencies.js.map +1 -0
- package/src/utils/agent-chat/agent-chat.d.ts +31 -0
- package/src/utils/agent-chat/agent-chat.js +31 -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 +139 -26
- package/src/utils/agent-connection/agent-connection.js +500 -103
- 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 +33 -33
- 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 +47 -0
- package/src/utils/agent-connection/files/core-strands/base/tool-errors-strands.ts.template +29 -0
- package/src/utils/agent-connection/files/{core-runtime-config/with-session-id.ts.template → core-strands/base/with-session-id-strands.ts.template} +1 -1
- 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-langchain/a2a/agentcore_a2a_client_langchain.py.template +105 -0
- package/src/utils/agent-connection/files/py-core-langchain/gateway/agentcore_gateway_mcp_client_langchain.py.template +57 -0
- package/src/utils/agent-connection/files/py-core-langchain/mcp/agentcore_mcp_client_langchain.py.template +64 -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 +6 -18
- package/src/utils/agent-connection/files/py-core-runtime-config/session_context.py.template +2 -2
- 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 +111 -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-runtime-config/with_session_id.py.template → py-core-strands/base/with_session_id_strands.py.template} +2 -2
- 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 +79 -0
- package/src/utils/agent-core-constructs/agent-core-constructs.js +212 -38
- 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 +170 -6
- package/src/utils/agent-core-constructs/files/cdk/app/agentcore-gateway/__nameKebabCase__/__nameKebabCase__.ts.template +87 -0
- package/src/utils/agent-core-constructs/files/cdk/app/agentcore-harness/__nameKebabCase__/__nameKebabCase__.ts.template +366 -0
- package/src/utils/agent-core-constructs/files/cdk/core/agentcore-gateway/agentcore-gateway.ts.template +624 -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/agent-core/__nameKebabCase__/__nameKebabCase__.tf.template +212 -1
- package/src/utils/agent-core-constructs/files/terraform/app/agentcore-gateway/__nameKebabCase__/__nameKebabCase__.tf.template +521 -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/app/agentcore-harness/__nameKebabCase__/__nameKebabCase__.tf.template +282 -0
- package/src/utils/agent-core-constructs/files/terraform/core/agent-core/runtime.tf.template +159 -13
- 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 +30 -2
- package/src/utils/api-constructs/api-constructs.js +82 -32
- package/src/utils/api-constructs/api-constructs.js.map +1 -1
- package/src/utils/api-constructs/files/cdk/app/apis/http/__apiNameKebabCase__.ts.template +20 -15
- package/src/utils/api-constructs/files/cdk/app/apis/rest/__apiNameKebabCase__.ts.template +24 -16
- package/src/utils/api-constructs/files/cdk/core/api/http/http-api.ts.template +26 -9
- package/src/utils/api-constructs/files/cdk/core/api/rest/api-gateway-account/index.js.template +70 -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 +56 -17
- package/src/utils/api-constructs/files/cdk/core/api/trpc/trpc-utils.ts.template +1 -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/http/__apiNameKebabCase__/__apiNameKebabCase__.tf.template +101 -12
- package/src/utils/api-constructs/files/terraform/app/apis/rest/__apiNameKebabCase__/__apiNameKebabCase__.tf.template +194 -8
- 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 +18 -20
- package/src/utils/ast/website.js.map +1 -1
- package/src/utils/ast.d.ts +9 -0
- package/src/utils/ast.js +125 -86
- package/src/utils/ast.js.map +1 -1
- package/src/utils/base-tsconfig.d.ts +30 -0
- package/src/utils/base-tsconfig.js +32 -0
- package/src/utils/base-tsconfig.js.map +1 -0
- package/src/utils/bundle/bundle.d.ts +6 -1
- package/src/utils/bundle/bundle.js +58 -48
- package/src/utils/bundle/bundle.js.map +1 -1
- package/src/utils/commands.d.ts +14 -3
- package/src/utils/commands.js +83 -28
- package/src/utils/commands.js.map +1 -1
- package/src/utils/config/index.d.ts +18 -2
- package/src/utils/config/index.js +5 -4
- package/src/utils/config/index.js.map +1 -1
- package/src/utils/config/utils.d.ts +8 -2
- package/src/utils/config/utils.js +56 -59
- package/src/utils/config/utils.js.map +1 -1
- package/src/utils/connection/open-api/files/components/__apiNameClassName__Provider.tsx.template +16 -3
- package/src/utils/connection/open-api/react.d.ts +31 -5
- package/src/utils/connection/open-api/react.js +106 -76
- 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/dcr-proxy-constructs/dcr-proxy-constructs.d.ts +38 -0
- package/src/utils/dcr-proxy-constructs/dcr-proxy-constructs.js +93 -0
- package/src/utils/dcr-proxy-constructs/dcr-proxy-constructs.js.map +1 -0
- package/src/utils/dcr-proxy-constructs/files/cdk/app/dcr-proxies/__nameKebabCase__/__nameKebabCase__.ts.template +227 -0
- package/src/utils/dcr-proxy-constructs/files/project/src/handlers/authorization-server-metadata.ts.template +39 -0
- package/src/utils/dcr-proxy-constructs/files/project/src/handlers/authorize.ts.template +26 -0
- package/src/utils/dcr-proxy-constructs/files/project/src/handlers/mcp-proxy.ts.template +89 -0
- package/src/utils/dcr-proxy-constructs/files/project/src/handlers/protected-resource-metadata.ts.template +13 -0
- package/src/utils/dcr-proxy-constructs/files/project/src/handlers/register.ts.template +70 -0
- package/src/utils/dcr-proxy-constructs/files/project/src/handlers/token.ts.template +75 -0
- package/src/utils/dcr-proxy-constructs/files/terraform/app/dcr-proxies/__nameKebabCase__/__nameKebabCase__.tf.template +410 -0
- package/src/utils/declared-dependencies.d.ts +140 -0
- package/src/utils/declared-dependencies.js +64 -0
- package/src/utils/declared-dependencies.js.map +1 -0
- package/src/utils/dependencies.d.ts +18 -0
- package/src/utils/dependencies.js +206 -0
- package/src/utils/dependencies.js.map +1 -0
- package/src/utils/docker.d.ts +89 -0
- package/src/utils/docker.js +125 -0
- package/src/utils/docker.js.map +1 -0
- package/src/utils/dynamodb-constructs/dynamodb-constructs.d.ts +1 -1
- package/src/utils/dynamodb-constructs/dynamodb-constructs.js +39 -41
- package/src/utils/dynamodb-constructs/dynamodb-constructs.js.map +1 -1
- package/src/utils/dynamodb-constructs/files/cdk/app/dynamodb/__nameKebabCase__.ts.template +18 -5
- package/src/utils/dynamodb-constructs/files/cdk/core/dynamodb.ts.template +1 -1
- package/src/utils/dynamodb-constructs/files/terraform/app/dynamodb/__nameKebabCase__/__nameKebabCase__.tf.template +24 -17
- package/src/utils/dynamodb-constructs/files/terraform/core/dynamodb/dynamodb.tf.template +1 -1
- package/src/utils/files/common/constructs/src/core/cloudfront.ts.template +14 -0
- package/src/utils/files/common/constructs/src/core/index.ts.template +5 -4
- package/src/utils/files/common/constructs/src/index.ts.template +2 -2
- package/src/utils/files/common/infra-config/src/index.ts.template +3 -3
- package/src/utils/files/common/infra-config/src/resolve-stage.ts.template +2 -2
- package/src/utils/files/common/infra-config/src/stages.config.ts.template +1 -1
- package/src/{ts/dynamodb/files/scripts → utils/files/common/scripts/src/dynamodb}/create-local-table.ts.template +65 -31
- 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 +103 -0
- package/src/utils/files/common/scripts/src/infra/infra-deploy.ts.template +2 -0
- package/src/utils/files/common/scripts/src/infra/infra-destroy.ts.template +2 -0
- package/src/utils/files/common/scripts/src/{stage-credentials → infra/stage-credentials}/cdk-command.ts.template +6 -3
- package/src/utils/files/common/scripts/src/{stage-credentials → infra/stage-credentials}/run.ts.template +3 -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/shared/pull-image.ts.template +16 -0
- package/src/utils/files/common/scripts/src/rdb/shared/start-container.ts.template +115 -0
- package/src/utils/files/common/shadcn/readme/README.md.template +3 -3
- package/src/utils/files/common/shadcn/src/index.ts.template +2 -2
- package/src/utils/files/shadcn/components.json.template +1 -1
- package/src/utils/files/terraform/src/core/asset-bucket/asset-bucket.tf.template +63 -72
- 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 +12 -6
- 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 +9 -4
- package/src/utils/files/website/hooks/sigv4/useSigV4.tsx.template +1 -1
- package/src/utils/format.d.ts +39 -4
- package/src/utils/format.js +318 -198
- package/src/utils/format.js.map +1 -1
- package/src/utils/fs.d.ts +24 -5
- package/src/utils/fs.js +40 -15
- package/src/utils/fs.js.map +1 -1
- package/src/utils/function-constructs/files/cdk/app/lambda-functions/__nameKebabCase__.ts.template +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 +22 -25
- 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 +153 -24
- package/src/utils/identity-constructs/files/terraform/core/user-identity/add-callback-url/add-callback-url.tf.template +28 -9
- package/src/utils/identity-constructs/files/terraform/core/user-identity/identity/identity.tf.template +129 -12
- package/src/utils/identity-constructs/files/terraform/core/user-identity/main.tf.template +7 -0
- package/src/utils/identity-constructs/identity-constructs.d.ts +10 -0
- package/src/utils/identity-constructs/identity-constructs.js +52 -31
- package/src/utils/identity-constructs/identity-constructs.js.map +1 -1
- package/src/utils/init.d.ts +72 -0
- package/src/utils/init.js +300 -0
- package/src/utils/init.js.map +1 -0
- package/src/utils/install.d.ts +32 -0
- package/src/utils/install.js +58 -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.d.ts +9 -0
- package/src/utils/mcp.js +42 -41
- package/src/utils/mcp.js.map +1 -1
- package/src/utils/metrics.d.ts +7 -1
- package/src/utils/metrics.js +61 -46
- package/src/utils/metrics.js.map +1 -1
- package/src/utils/migration-manifest.d.ts +58 -0
- package/src/utils/migration-manifest.js +76 -0
- package/src/utils/migration-manifest.js.map +1 -0
- package/src/utils/migration-versions.d.ts +145 -0
- package/src/utils/migration-versions.js +250 -0
- package/src/utils/migration-versions.js.map +1 -0
- package/src/utils/mock-project-graph.js +8 -12
- package/src/utils/mock-project-graph.js.map +1 -1
- package/src/utils/module-format.d.ts +25 -0
- package/src/utils/module-format.js +45 -0
- package/src/utils/module-format.js.map +1 -0
- package/src/utils/names.d.ts +22 -0
- package/src/utils/names.js +44 -48
- package/src/utils/names.js.map +1 -1
- package/src/utils/npm-scope.d.ts +0 -4
- package/src/utils/npm-scope.js +7 -20
- package/src/utils/npm-scope.js.map +1 -1
- package/src/utils/nx.d.ts +74 -3
- package/src/utils/nx.js +196 -75
- 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.d.ts +1 -12
- package/src/utils/pnpm-workspace.js +16 -43
- package/src/utils/pnpm-workspace.js.map +1 -1
- package/src/utils/port.d.ts +28 -6
- package/src/utils/port.js +67 -28
- package/src/utils/port.js.map +1 -1
- package/src/utils/project-package-json.d.ts +39 -0
- package/src/utils/project-package-json.js +119 -0
- package/src/utils/project-package-json.js.map +1 -0
- package/src/utils/py.d.ts +17 -3
- package/src/utils/py.js +73 -48
- package/src/utils/py.js.map +1 -1
- package/src/utils/rdb-constructs/files/cdk/app/dbs/__nameKebabCase__.ts.template +72 -18
- package/src/utils/rdb-constructs/files/cdk/core/rdb/aurora.ts.template +112 -88
- package/src/utils/rdb-constructs/files/terraform/app/dbs/__nameKebabCase__/__nameKebabCase__.tf.template +127 -53
- package/src/utils/rdb-constructs/files/terraform/core/rdb/aurora/aurora.tf.template +60 -53
- package/src/utils/rdb-constructs/rdb-constructs.d.ts +12 -1
- package/src/utils/rdb-constructs/rdb-constructs.js +38 -41
- package/src/utils/rdb-constructs/rdb-constructs.js.map +1 -1
- package/src/utils/ruff.d.ts +59 -0
- package/src/utils/ruff.js +140 -0
- package/src/utils/ruff.js.map +1 -0
- package/src/utils/shared-constructs-constants.d.ts +46 -4
- package/src/utils/shared-constructs-constants.js +50 -15
- package/src/utils/shared-constructs-constants.js.map +1 -1
- package/src/utils/shared-constructs.d.ts +4 -1
- package/src/utils/shared-constructs.js +62 -67
- package/src/utils/shared-constructs.js.map +1 -1
- package/src/utils/shared-dynamodb-scripts.d.ts +18 -0
- package/src/utils/shared-dynamodb-scripts.js +35 -0
- package/src/utils/shared-dynamodb-scripts.js.map +1 -0
- package/src/utils/shared-infra-config.js +31 -30
- package/src/utils/shared-infra-config.js.map +1 -1
- package/src/utils/shared-infra-scripts.d.ts +26 -0
- package/src/utils/shared-infra-scripts.js +58 -0
- package/src/utils/shared-infra-scripts.js.map +1 -0
- package/src/utils/shared-rdb-scripts.d.ts +27 -0
- package/src/utils/shared-rdb-scripts.js +59 -0
- package/src/utils/shared-rdb-scripts.js.map +1 -0
- package/src/utils/shared-scripts.d.ts +1 -4
- package/src/utils/shared-scripts.js +12 -38
- package/src/utils/shared-scripts.js.map +1 -1
- package/src/utils/shared-shadcn.d.ts +26 -1
- package/src/utils/shared-shadcn.js +93 -67
- package/src/utils/shared-shadcn.js.map +1 -1
- package/src/utils/smithy.d.ts +59 -0
- package/src/utils/smithy.js +73 -0
- package/src/utils/smithy.js.map +1 -0
- package/src/utils/test-git.d.ts +39 -0
- package/src/utils/test-git.js +117 -0
- package/src/utils/test-git.js.map +1 -0
- package/src/utils/test.d.ts +10 -0
- package/src/utils/test.js +44 -25
- package/src/utils/test.js.map +1 -1
- package/src/utils/toml.d.ts +5 -0
- package/src/utils/toml.js +17 -15
- package/src/utils/toml.js.map +1 -1
- package/src/utils/version-upgrade-migration/migration.d.ts +14 -0
- package/src/utils/version-upgrade-migration/migration.js +16 -0
- package/src/utils/version-upgrade-migration/migration.js.map +1 -0
- package/src/utils/version-upgrade-migration/nx-package-updates.d.ts +45 -0
- package/src/utils/version-upgrade-migration/nx-package-updates.js +50 -0
- package/src/utils/version-upgrade-migration/nx-package-updates.js.map +1 -0
- package/src/utils/version-upgrade-migration/owned-dependencies.d.ts +76 -0
- package/src/utils/version-upgrade-migration/owned-dependencies.js +146 -0
- package/src/utils/version-upgrade-migration/owned-dependencies.js.map +1 -0
- package/src/utils/version-upgrade-migration/register.d.ts +29 -0
- package/src/utils/version-upgrade-migration/register.js +42 -0
- package/src/utils/version-upgrade-migration/register.js.map +1 -0
- package/src/utils/version-upgrade-migration/sync-embedded-versions.d.ts +26 -0
- package/src/utils/version-upgrade-migration/sync-embedded-versions.js +352 -0
- package/src/utils/version-upgrade-migration/sync-embedded-versions.js.map +1 -0
- package/src/utils/version-upgrade-migration/sync-metrics-version.d.ts +13 -0
- package/src/utils/version-upgrade-migration/sync-metrics-version.js +33 -0
- package/src/utils/version-upgrade-migration/sync-metrics-version.js.map +1 -0
- package/src/utils/version-upgrade-migration/sync-vended-versions.d.ts +10 -0
- package/src/utils/version-upgrade-migration/sync-vended-versions.js +518 -0
- package/src/utils/version-upgrade-migration/sync-vended-versions.js.map +1 -0
- package/src/utils/version-upgrade-migration/vended-upgrade.d.ts +14 -0
- package/src/utils/version-upgrade-migration/vended-upgrade.js +40 -0
- package/src/utils/version-upgrade-migration/vended-upgrade.js.map +1 -0
- package/src/utils/versions.d.ts +240 -108
- package/src/utils/versions.js +265 -121
- package/src/utils/versions.js.map +1 -1
- package/src/utils/website-constructs/files/cdk/app/static-websites/__websiteNameKebabCase__.ts.template +2 -2
- package/src/utils/website-constructs/files/cdk/core/static-website.ts.template +207 -41
- 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 +145 -93
- package/src/utils/website-constructs/website-constructs.d.ts +11 -0
- package/src/utils/website-constructs/website-constructs.js +49 -30
- package/src/utils/website-constructs/website-constructs.js.map +1 -1
- package/bin/aws-nx-mcp.d.ts +0 -2
- package/bin/aws-nx-mcp.js +0 -17
- package/bin/aws-nx-mcp.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.d.ts +0 -8
- package/sdk/license.js +0 -13
- 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 -29
- package/sdk/ts.js +0 -47
- 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.d.ts +0 -33
- 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/a2a-connection/files/agent-connection/app/__targetAgentSnakeCase___client.py.template +0 -22
- package/src/py/agent/files/ag-ui/main.py.template +0 -37
- package/src/py/agent/mcp-connection/files/agent-connection/app/__mcpServerSnakeCase___client.py.template +0 -22
- package/src/py/agent/react-connection/serve-local.js +0 -30
- package/src/py/agent/react-connection/serve-local.js.map +0 -1
- 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/react-connection/serve-local.js +0 -19
- package/src/ts/agent/react-connection/serve-local.js.map +0 -1
- package/src/ts/agent/scripts/http/chat.ts.template +0 -35
- package/src/ts/dynamodb/files/scripts/pull-image.ts.template +0 -15
- package/src/ts/dynamodb/files/scripts/start-container.ts.template +0 -81
- package/src/ts/dynamodb/files/src/constants.ts.template +0 -9
- package/src/ts/dynamodb/files/src/gsi.ts.template +0 -14
- package/src/ts/rdb/files/scripts/pull-image.ts.template +0 -15
- package/src/ts/rdb/files/scripts/start-container.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/files/common/scripts/src/infra-deploy.ts.template +0 -2
- package/src/utils/files/common/scripts/src/infra-destroy.ts.template +0 -2
- package/src/utils/files/terraform/scripts/reset-runtime-config.ts.template +0 -25
- /package/src/py/agent/files/{common → strands/common}/__init__.py.template +0 -0
- /package/src/smithy/project/files/{src → service/src}/main.smithy.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/{stage-credentials → infra/stage-credentials}/credentials.ts.template +0 -0
- /package/src/utils/files/common/scripts/src/{stage-credentials → infra/stage-credentials}/stage-parser.ts.template +0 -0
|
@@ -1,25 +1,21 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SYNC_GENERATOR_NAME = void 0;
|
|
4
|
-
exports.licenseSyncGenerator = licenseSyncGenerator;
|
|
5
|
-
const tslib_1 = require("tslib");
|
|
6
1
|
/**
|
|
7
2
|
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
8
3
|
* SPDX-License-Identifier: Apache-2.0
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
4
|
+
*/ import { getProjects, globAsync, joinPathFragments } from "@nx/devkit";
|
|
5
|
+
import fastGlob from "fast-glob";
|
|
6
|
+
import { minimatch } from "minimatch";
|
|
7
|
+
import { basename } from "path";
|
|
8
|
+
import PackageJson from "../../../package.json" with {
|
|
9
|
+
type: 'json'
|
|
10
|
+
};
|
|
11
|
+
import { AWS_NX_PLUGIN_CONFIG_FILE_NAME } from "../../utils/config/utils.js";
|
|
12
|
+
import { getGitIncludedFiles, isWithinGitRepo } from "../../utils/git.js";
|
|
13
|
+
import { getGeneratorInfo } from "../../utils/nx.js";
|
|
14
|
+
import { LANGUAGE_COMMENT_SYNTAX, readLicenseConfig } from "../config.js";
|
|
15
|
+
import { PROJECT_FILES_TO_SYNC, syncProjectFile } from "./project-file-sync.js";
|
|
16
|
+
export const SYNC_GENERATOR_NAME = `${PackageJson.name}:${getGeneratorInfo(import.meta.filename).id}`;
|
|
17
|
+
export async function licenseSyncGenerator(tree) {
|
|
18
|
+
const source = (await readLicenseConfig(tree))?.source;
|
|
23
19
|
if (!source) {
|
|
24
20
|
// Nothing to do when source licensing (headers + LICENSE files) isn't configured
|
|
25
21
|
return {};
|
|
@@ -30,9 +26,9 @@ async function licenseSyncGenerator(tree) {
|
|
|
30
26
|
const candidateProjectFiles = await getCandidateProjectFilesForHeader(tree, source.header);
|
|
31
27
|
const headerContentLines = loadHeaderContentLines(tree, source.header);
|
|
32
28
|
// Add headers to project files which match the include pattern
|
|
33
|
-
for (const [includePattern, format] of Object.entries(source.header.format))
|
|
34
|
-
const files =
|
|
35
|
-
files.forEach((file)
|
|
29
|
+
for (const [includePattern, format] of Object.entries(source.header.format)){
|
|
30
|
+
const files = minimatch.match(candidateProjectFiles, includePattern);
|
|
31
|
+
files.forEach((file)=>{
|
|
36
32
|
const didAdd = addHeader(tree, file, headerContentLines, source.header, format);
|
|
37
33
|
if (didAdd) {
|
|
38
34
|
licenseHeadersUpdated.push(file);
|
|
@@ -42,29 +38,31 @@ async function licenseSyncGenerator(tree) {
|
|
|
42
38
|
}
|
|
43
39
|
const projectFilesUpdated = [];
|
|
44
40
|
// Helper to check whether a file should be included in the sync based on file exclude configuration
|
|
45
|
-
const isFileIncludedInSync = (path)
|
|
41
|
+
const isFileIncludedInSync = (path)=>!(source.files?.exclude ?? []).some((excludePattern)=>minimatch(path, excludePattern));
|
|
46
42
|
// Sync files in the root, and all projects
|
|
47
43
|
const projectRoots = [
|
|
48
44
|
'.',
|
|
49
|
-
...[
|
|
45
|
+
...[
|
|
46
|
+
...getProjects(tree).values()
|
|
47
|
+
].map((p)=>p.root)
|
|
50
48
|
];
|
|
51
49
|
// Sync subproject license files and project files
|
|
52
|
-
for (const projectRoot of projectRoots)
|
|
50
|
+
for (const projectRoot of projectRoots){
|
|
53
51
|
// Check that this project should have files synced - allows users to specify a project path
|
|
54
52
|
// to exclude from all file syncs
|
|
55
53
|
if (isFileIncludedInSync(projectRoot)) {
|
|
56
|
-
|
|
57
|
-
const projectFilePath =
|
|
54
|
+
PROJECT_FILES_TO_SYNC.forEach((projectFile)=>{
|
|
55
|
+
const projectFilePath = joinPathFragments(projectRoot, projectFile);
|
|
58
56
|
// Check that the specific project file should be synced - allows users to be more granular to
|
|
59
57
|
// decide to eg omit LICENSE file sync but keep package.json sync
|
|
60
58
|
if (isFileIncludedInSync(projectFilePath)) {
|
|
61
59
|
const prevContent = tree.read(projectFilePath, 'utf-8');
|
|
62
|
-
|
|
60
|
+
syncProjectFile(tree, projectRoot, projectFile, source);
|
|
63
61
|
const newContent = tree.read(projectFilePath, 'utf-8');
|
|
64
62
|
if (prevContent !== newContent) {
|
|
65
63
|
projectFilesUpdated.push({
|
|
66
64
|
path: projectFilePath,
|
|
67
|
-
name: projectFile
|
|
65
|
+
name: projectFile
|
|
68
66
|
});
|
|
69
67
|
}
|
|
70
68
|
}
|
|
@@ -74,113 +72,102 @@ async function licenseSyncGenerator(tree) {
|
|
|
74
72
|
return {
|
|
75
73
|
outOfSyncMessage: buildOutOfSyncMessage({
|
|
76
74
|
licenseHeadersUpdated,
|
|
77
|
-
projectFilesUpdated
|
|
78
|
-
})
|
|
75
|
+
projectFilesUpdated
|
|
76
|
+
})
|
|
79
77
|
};
|
|
80
78
|
}
|
|
81
79
|
/**
|
|
82
80
|
* Build the message to display when the sync generator would make changes to the tree
|
|
83
|
-
*/
|
|
84
|
-
const buildOutOfSyncMessage = (updates) => {
|
|
81
|
+
*/ const buildOutOfSyncMessage = (updates)=>{
|
|
85
82
|
let outOfSyncMessage = '';
|
|
86
|
-
const pathsByName = updates.projectFilesUpdated.reduce((prev, { name, path })
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
83
|
+
const pathsByName = updates.projectFilesUpdated.reduce((prev, { name, path })=>({
|
|
84
|
+
...prev,
|
|
85
|
+
[name]: [
|
|
86
|
+
...prev[name] ?? [],
|
|
87
|
+
path
|
|
88
|
+
]
|
|
89
|
+
}), {});
|
|
90
|
+
Object.entries(pathsByName).forEach(([name, files])=>{
|
|
91
|
+
outOfSyncMessage += `Project ${name} files are out of sync:\n${files.map((p)=>`- ${p}`).join('\n')}\n\n`;
|
|
92
92
|
});
|
|
93
93
|
if (updates.licenseHeadersUpdated.length > 0) {
|
|
94
|
-
outOfSyncMessage += `License headers are out of sync in the following source files:\n${updates.licenseHeadersUpdated.map((p)
|
|
94
|
+
outOfSyncMessage += `License headers are out of sync in the following source files:\n${updates.licenseHeadersUpdated.map((p)=>`- ${p}`).join('\n')}\n\n`;
|
|
95
95
|
}
|
|
96
96
|
return outOfSyncMessage.trim();
|
|
97
97
|
};
|
|
98
98
|
/**
|
|
99
99
|
* Load the license header content lines
|
|
100
|
-
*/
|
|
101
|
-
const loadHeaderContentLines = (tree, config) => {
|
|
100
|
+
*/ const loadHeaderContentLines = (tree, config)=>{
|
|
102
101
|
// Load the license header content
|
|
103
102
|
let headerContentLines = [];
|
|
104
103
|
if ('lines' in config.content) {
|
|
105
104
|
headerContentLines = config.content.lines;
|
|
106
|
-
}
|
|
107
|
-
else {
|
|
105
|
+
} else {
|
|
108
106
|
if (!tree.exists(config.content.filePath)) {
|
|
109
107
|
throw new Error(`Could not find license header content file ${config.content.filePath}`);
|
|
110
108
|
}
|
|
111
|
-
headerContentLines = tree
|
|
112
|
-
.read(config.content.filePath, 'utf-8')
|
|
113
|
-
.split('\n');
|
|
109
|
+
headerContentLines = tree.read(config.content.filePath, 'utf-8').split('\n');
|
|
114
110
|
}
|
|
115
111
|
return headerContentLines;
|
|
116
112
|
};
|
|
117
113
|
/**
|
|
118
114
|
* Returns all files in the given tree - both in-memory only and in the filesystem under the tree root
|
|
119
|
-
*/
|
|
120
|
-
const getAllFilesInTree = async (tree) => {
|
|
115
|
+
*/ const getAllFilesInTree = async (tree)=>{
|
|
121
116
|
return [
|
|
122
117
|
...new Set([
|
|
123
118
|
// Get all files in memory in the tree
|
|
124
|
-
...
|
|
119
|
+
...await globAsync(tree, [
|
|
120
|
+
'*',
|
|
121
|
+
'**/*'
|
|
122
|
+
]),
|
|
125
123
|
// Find all files on the filesystem that may not be in memory in the tree
|
|
126
|
-
...
|
|
127
|
-
|
|
128
|
-
|
|
124
|
+
...await fastGlob([
|
|
125
|
+
'*',
|
|
126
|
+
'**/*'
|
|
127
|
+
], {
|
|
128
|
+
cwd: tree.root,
|
|
129
|
+
dot: true
|
|
130
|
+
})
|
|
131
|
+
])
|
|
132
|
+
].filter((f)=>tree.exists(f));
|
|
129
133
|
};
|
|
130
134
|
/**
|
|
131
135
|
* Returns the list of project files
|
|
132
|
-
*/
|
|
133
|
-
const getCandidateProjectFilesForHeader = async (tree, config) => {
|
|
136
|
+
*/ const getCandidateProjectFilesForHeader = async (tree, config)=>{
|
|
134
137
|
// Prefer, if possible, to treat all non gitignored files as our candidate set such that we honour users .gitignore files
|
|
135
138
|
// If we're not in a git repo, fall back to everything and rely on the user configuring exclusions below
|
|
136
|
-
const projectFiles = (
|
|
137
|
-
? (0, git_1.getGitIncludedFiles)(tree)
|
|
138
|
-
: await getAllFilesInTree(tree);
|
|
139
|
+
const projectFiles = isWithinGitRepo(tree) ? getGitIncludedFiles(tree) : await getAllFilesInTree(tree);
|
|
139
140
|
// Remove any files that were excluded in the config
|
|
140
|
-
const ignoredProjectFiles = new Set((config.exclude ?? []).flatMap((pattern)
|
|
141
|
-
return projectFiles.filter((file)
|
|
141
|
+
const ignoredProjectFiles = new Set((config.exclude ?? []).flatMap((pattern)=>minimatch.match(projectFiles, pattern)));
|
|
142
|
+
return projectFiles.filter((file)=>!ignoredProjectFiles.has(file));
|
|
142
143
|
};
|
|
143
144
|
/**
|
|
144
145
|
* Renders a header with the given format
|
|
145
|
-
*/
|
|
146
|
-
|
|
147
|
-
return `${format.blockStart ? `${format.blockStart}\n` : ''}${contentLines.map((line) => `${format.lineStart ?? ''}${line}${format.lineEnd ?? ''}`).join('\n')}${format.blockEnd ? `\n${format.blockEnd}` : ''}`;
|
|
146
|
+
*/ const renderHeader = (contentLines, format)=>{
|
|
147
|
+
return `${format.blockStart ? `${format.blockStart}\n` : ''}${contentLines.map((line)=>`${format.lineStart ?? ''}${line}${format.lineEnd ?? ''}`).join('\n')}${format.blockEnd ? `\n${format.blockEnd}` : ''}`;
|
|
148
148
|
};
|
|
149
149
|
/**
|
|
150
150
|
* Validates header format to ensure it produces a valid comment
|
|
151
|
-
*/
|
|
152
|
-
const
|
|
153
|
-
const
|
|
154
|
-
syntax.block &&
|
|
155
|
-
format.blockStart.startsWith(syntax.block.start);
|
|
156
|
-
const blockEndClosesBlockComment = format.blockEnd &&
|
|
157
|
-
syntax.block &&
|
|
158
|
-
format.blockEnd.endsWith(syntax.block.end);
|
|
151
|
+
*/ const validateFormat = (fileExtension, syntax, format, contentLines)=>{
|
|
152
|
+
const blockStartOpensBlockComment = format.blockStart && syntax.block && format.blockStart.startsWith(syntax.block.start);
|
|
153
|
+
const blockEndClosesBlockComment = format.blockEnd && syntax.block && format.blockEnd.endsWith(syntax.block.end);
|
|
159
154
|
// Block start must start with the block start or line comment
|
|
160
|
-
const validBlockStart = !format.blockStart ||
|
|
161
|
-
blockStartOpensBlockComment ||
|
|
162
|
-
(syntax.line && format.blockStart.startsWith(syntax.line));
|
|
155
|
+
const validBlockStart = !format.blockStart || blockStartOpensBlockComment || syntax.line && format.blockStart.startsWith(syntax.line);
|
|
163
156
|
// Block end must end with the block end, or begin with the line comment
|
|
164
|
-
const validBlockEnd = !format.blockEnd ||
|
|
165
|
-
blockEndClosesBlockComment ||
|
|
166
|
-
(syntax.line && format.blockEnd.startsWith(syntax.line));
|
|
157
|
+
const validBlockEnd = !format.blockEnd || blockEndClosesBlockComment || syntax.line && format.blockEnd.startsWith(syntax.line);
|
|
167
158
|
// Lines must start with the line comment syntax, unless within a block comment
|
|
168
|
-
const validLineStart = !format.lineStart ||
|
|
169
|
-
(syntax.line && format.lineStart.startsWith(syntax.line)) ||
|
|
170
|
-
(blockStartOpensBlockComment && blockEndClosesBlockComment);
|
|
159
|
+
const validLineStart = !format.lineStart || syntax.line && format.lineStart.startsWith(syntax.line) || blockStartOpensBlockComment && blockEndClosesBlockComment;
|
|
171
160
|
if (!validLineStart || !validBlockStart || !validBlockEnd) {
|
|
172
161
|
throw new Error(`Provided format for ${fileExtension} file would generate invalid comment syntax. Configured syntax for ${fileExtension} is ${JSON.stringify(syntax, null, 2)}.`);
|
|
173
162
|
}
|
|
174
163
|
if (blockStartOpensBlockComment && !blockEndClosesBlockComment) {
|
|
175
164
|
throw new Error(`Provided format for ${fileExtension} file opens a block comment with "${syntax.block.start}" in blockStart but does not close it with "${syntax.block.end}" in blockEnd`);
|
|
176
165
|
}
|
|
177
|
-
if (blockStartOpensBlockComment &&
|
|
178
|
-
contentLines.some((line) => line.includes(syntax.block.end))) {
|
|
166
|
+
if (blockStartOpensBlockComment && contentLines.some((line)=>line.includes(syntax.block.end))) {
|
|
179
167
|
throw new Error(`Provided license content would close a block comment early and cause a syntax error! Please remove "${syntax.block.end}" from your license text.`);
|
|
180
168
|
}
|
|
181
169
|
if (blockStartOpensBlockComment && blockEndClosesBlockComment) {
|
|
182
|
-
if (format.blockEnd.lastIndexOf(syntax.block.end) !==
|
|
183
|
-
format.blockEnd.indexOf(syntax.block.end)) {
|
|
170
|
+
if (format.blockEnd.lastIndexOf(syntax.block.end) !== format.blockEnd.indexOf(syntax.block.end)) {
|
|
184
171
|
throw new Error(`Provided format for ${fileExtension} file may cause syntax errors due to closing a block comment multiple times with "${syntax.block.end}" in blockEnd`);
|
|
185
172
|
}
|
|
186
173
|
if (format.blockStart.includes(syntax.block.end)) {
|
|
@@ -191,27 +178,23 @@ const validateFormat = (fileExtension, syntax, format, contentLines) => {
|
|
|
191
178
|
/**
|
|
192
179
|
* Parse the hashbang, header and body from a file.
|
|
193
180
|
* The header is the first block comment, or consecutive series of line comments found in the file, after the hashbang
|
|
194
|
-
*/
|
|
195
|
-
const parseFile = (content, syntax) => {
|
|
181
|
+
*/ const parseFile = (content, syntax)=>{
|
|
196
182
|
const lines = content.split('\n');
|
|
197
183
|
let i = 0;
|
|
198
184
|
// Hashbangs must always go first, so extract this if it exists
|
|
199
185
|
const hashbangLines = [];
|
|
200
|
-
for
|
|
186
|
+
for(; i < lines.length; i++){
|
|
201
187
|
if (hashbangLines.length === 0) {
|
|
202
188
|
if (lines[i].startsWith('#!')) {
|
|
203
189
|
hashbangLines.push(lines[i]);
|
|
204
|
-
}
|
|
205
|
-
else {
|
|
190
|
+
} else {
|
|
206
191
|
break;
|
|
207
192
|
}
|
|
208
|
-
}
|
|
209
|
-
else {
|
|
193
|
+
} else {
|
|
210
194
|
if (lines[i].trim().length === 0) {
|
|
211
195
|
// Preserve any empty lines following the hashbang
|
|
212
196
|
hashbangLines.push(lines[i]);
|
|
213
|
-
}
|
|
214
|
-
else {
|
|
197
|
+
} else {
|
|
215
198
|
break;
|
|
216
199
|
}
|
|
217
200
|
}
|
|
@@ -221,34 +204,25 @@ const parseFile = (content, syntax) => {
|
|
|
221
204
|
const headerLines = [];
|
|
222
205
|
let withinBlockComment = false;
|
|
223
206
|
let withinLineCommentSeries = false;
|
|
224
|
-
for
|
|
207
|
+
for(; i < lines.length; i++){
|
|
225
208
|
const trimmedLine = lines[i].trim();
|
|
226
|
-
if (syntax.block &&
|
|
227
|
-
trimmedLine.endsWith(syntax.block.end) &&
|
|
228
|
-
!withinLineCommentSeries &&
|
|
229
|
-
(withinBlockComment || trimmedLine.startsWith(syntax.block.start))) {
|
|
209
|
+
if (syntax.block && trimmedLine.endsWith(syntax.block.end) && !withinLineCommentSeries && (withinBlockComment || trimmedLine.startsWith(syntax.block.start))) {
|
|
230
210
|
// Comment ends with the block end, so we've completed the header and therefore break out of the loop
|
|
231
211
|
headerLines.push(lines[i]);
|
|
232
212
|
i++; // Increment here to ensure we point to the next line for the body
|
|
233
213
|
break;
|
|
234
|
-
}
|
|
235
|
-
else if (syntax.block &&
|
|
236
|
-
trimmedLine.startsWith(syntax.block.start) &&
|
|
237
|
-
!withinLineCommentSeries) {
|
|
214
|
+
} else if (syntax.block && trimmedLine.startsWith(syntax.block.start) && !withinLineCommentSeries) {
|
|
238
215
|
// Line begins a comment block (without also ending it on the same line), so start consuming the block
|
|
239
216
|
withinBlockComment = true;
|
|
240
217
|
headerLines.push(lines[i]);
|
|
241
|
-
}
|
|
242
|
-
else if (withinBlockComment) {
|
|
218
|
+
} else if (withinBlockComment) {
|
|
243
219
|
// We haven't yet closed the block comment, so consume this line
|
|
244
220
|
headerLines.push(lines[i]);
|
|
245
|
-
}
|
|
246
|
-
else if (syntax.line && trimmedLine.startsWith(syntax.line)) {
|
|
221
|
+
} else if (syntax.line && trimmedLine.startsWith(syntax.line)) {
|
|
247
222
|
// Line starts with the line comment syntax, so consume it
|
|
248
223
|
withinLineCommentSeries = true;
|
|
249
224
|
headerLines.push(lines[i]);
|
|
250
|
-
}
|
|
251
|
-
else {
|
|
225
|
+
} else {
|
|
252
226
|
break;
|
|
253
227
|
}
|
|
254
228
|
}
|
|
@@ -257,21 +231,19 @@ const parseFile = (content, syntax) => {
|
|
|
257
231
|
return {
|
|
258
232
|
hashbang: hashbangLines.join('\n'),
|
|
259
233
|
header: headerLines.join('\n'),
|
|
260
|
-
body: bodyLines.join('\n')
|
|
234
|
+
body: bodyLines.join('\n')
|
|
261
235
|
};
|
|
262
236
|
};
|
|
263
237
|
/**
|
|
264
238
|
* Add a header to the given file according to the header content and license config
|
|
265
239
|
* Returns true if the header was added/updated, and false otherwise.
|
|
266
|
-
*/
|
|
267
|
-
const
|
|
268
|
-
const fileName = (0, path_1.basename)(file);
|
|
240
|
+
*/ const addHeader = (tree, file, contentLines, config, format)=>{
|
|
241
|
+
const fileName = basename(file);
|
|
269
242
|
const fileNameParts = fileName.split('.');
|
|
270
243
|
const fileExtension = fileNameParts[fileNameParts.length - 1];
|
|
271
|
-
const syntax = (config.commentSyntax ?? {})[fileExtension] ??
|
|
272
|
-
config_1.LANGUAGE_COMMENT_SYNTAX[fileExtension];
|
|
244
|
+
const syntax = (config.commentSyntax ?? {})[fileExtension] ?? LANGUAGE_COMMENT_SYNTAX[fileExtension];
|
|
273
245
|
if (!syntax) {
|
|
274
|
-
throw new Error(`Unknown file extension ${fileExtension}. Please configure commentSyntax in ${
|
|
246
|
+
throw new Error(`Unknown file extension ${fileExtension}. Please configure commentSyntax in ${AWS_NX_PLUGIN_CONFIG_FILE_NAME}, eg:
|
|
275
247
|
|
|
276
248
|
export default {
|
|
277
249
|
license: {
|
|
@@ -293,14 +265,16 @@ export default {
|
|
|
293
265
|
const existingContent = tree.read(file, 'utf-8');
|
|
294
266
|
const { hashbang, body } = parseFile(existingContent, syntax);
|
|
295
267
|
const newContent = [
|
|
296
|
-
...
|
|
268
|
+
...hashbang ? [
|
|
269
|
+
hashbang
|
|
270
|
+
] : [],
|
|
297
271
|
renderHeader(contentLines, format),
|
|
298
|
-
body
|
|
272
|
+
body
|
|
299
273
|
].join('\n');
|
|
300
274
|
// Sanity check that we wouldn't edit the hashbang or body, only the header
|
|
301
275
|
const { hashbang: newHashbang, body: newBody } = parseFile(newContent, syntax);
|
|
302
276
|
if (hashbang !== newHashbang || body !== newBody) {
|
|
303
|
-
throw new Error(`The license header content, or format for ${fileExtension} files would produce a header that cannot be safely replaced in ${file}. Please revise license content and format in ${
|
|
277
|
+
throw new Error(`The license header content, or format for ${fileExtension} files would produce a header that cannot be safely replaced in ${file}. Please revise license content and format in ${AWS_NX_PLUGIN_CONFIG_FILE_NAME}`);
|
|
304
278
|
}
|
|
305
279
|
if (newContent !== existingContent) {
|
|
306
280
|
tree.write(file, newContent);
|
|
@@ -308,5 +282,6 @@ export default {
|
|
|
308
282
|
}
|
|
309
283
|
return false;
|
|
310
284
|
};
|
|
311
|
-
|
|
285
|
+
export default licenseSyncGenerator;
|
|
286
|
+
|
|
312
287
|
//# sourceMappingURL=generator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../packages/nx-plugin/src/license/sync/generator.ts"],"names":[],"mappings":";;;AAqCA,oDAyFC;;AA9HD;;;GAGG;AACH,uCAKoB;AACpB,yCAA6C;AAC7C,yCAAsC;AAEtC,+BAAgC;AAChC,iFAAgD;AAChD,oDAA0E;AAC1E,yCAAuE;AACvE,uCAAkD;AAClD,sCAAuE;AAMvE,2DAI6B;AAEhB,QAAA,mBAAmB,GAAG,GAAG,sBAAW,CAAC,IAAI,IAAI,IAAA,qBAAgB,EAAC,UAAU,CAAC,CAAC,EAAE,EAAE,CAAC;AAOrF,KAAK,UAAU,oBAAoB,CACxC,IAAU;IAEV,MAAM,MAAM,GAAG,CAAC,MAAM,IAAA,0BAAiB,EAAC,IAAI,CAAC,CAAC,EAAE,MAAM,CAAC;IAEvD,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,iFAAiF;QACjF,OAAO,EAAE,CAAC;IACZ,CAAC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G,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QAC/B,YAAY,CAAC,YAAY,EAAE,MAAM,CAAC;QAClC,IAAI;KACL,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAEb,2EAA2E;IAC3E,MAAM,EAAE,QAAQ,EAAE,WAAW,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,SAAS,CACxD,UAAU,EACV,MAAM,CACP,CAAC;IACF,IAAI,QAAQ,KAAK,WAAW,IAAI,IAAI,KAAK,OAAO,EAAE,CAAC;QACjD,MAAM,IAAI,KAAK,CACb,6CAA6C,aAAa,mEAAmE,IAAI,iDAAiD,sCAA8B,EAAE,CACnN,CAAC;IACJ,CAAC;IAED,IAAI,UAAU,KAAK,eAAe,EAAE,CAAC;QACnC,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;QAC7B,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC,CAAC;AAEF,kBAAe,oBAAoB,CAAC"}
|
|
1
|
+
{"version":3,"sources":["../../../../../../packages/nx-plugin/src/license/sync/generator.ts"],"sourcesContent":["/**\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\nimport {\n getProjects,\n globAsync,\n joinPathFragments,\n type Tree,\n} from '@nx/devkit';\nimport fastGlob from 'fast-glob';\nimport { minimatch } from 'minimatch';\nimport type { SyncGeneratorResult } from 'nx/src/utils/sync-generators';\nimport { basename } from 'path';\nimport PackageJson from '../../../package.json' with { type: 'json' };\nimport { AWS_NX_PLUGIN_CONFIG_FILE_NAME } from '../../utils/config/utils';\nimport { getGitIncludedFiles, isWithinGitRepo } from '../../utils/git';\nimport { getGeneratorInfo } from '../../utils/nx';\nimport { LANGUAGE_COMMENT_SYNTAX, readLicenseConfig } from '../config';\nimport type {\n CommentSyntax,\n LicenseHeaderConfig,\n LicenseHeaderFormat,\n} from '../config-types';\nimport {\n PROJECT_FILES_TO_SYNC,\n type ProjectFileToSync,\n syncProjectFile,\n} from './project-file-sync';\n\nexport const SYNC_GENERATOR_NAME = `${PackageJson.name}:${getGeneratorInfo(import.meta.filename).id}`;\n\ninterface ProjectFile {\n name: ProjectFileToSync;\n path: string;\n}\n\nexport async function licenseSyncGenerator(\n tree: Tree,\n): Promise<SyncGeneratorResult> {\n const source = (await readLicenseConfig(tree))?.source;\n\n if (!source) {\n // Nothing to do when source licensing (headers + LICENSE files) isn't configured\n return {};\n }\n\n const licenseHeadersUpdated: string[] = [];\n\n if (source.header) {\n // Get all candidate project files for header\n const candidateProjectFiles = await getCandidateProjectFilesForHeader(\n tree,\n source.header,\n );\n\n const headerContentLines = loadHeaderContentLines(tree, source.header);\n\n // Add headers to project files which match the include pattern\n for (const [includePattern, format] of Object.entries(\n source.header.format,\n )) {\n const files = minimatch.match(candidateProjectFiles, includePattern);\n\n files.forEach((file) => {\n const didAdd = addHeader(\n tree,\n file,\n headerContentLines,\n source.header,\n format,\n );\n if (didAdd) {\n licenseHeadersUpdated.push(file);\n }\n });\n }\n }\n\n const projectFilesUpdated: ProjectFile[] = [];\n\n // Helper to check whether a file should be included in the sync based on file exclude configuration\n const isFileIncludedInSync = (path: string): boolean =>\n !(source.files?.exclude ?? []).some((excludePattern) =>\n minimatch(path, excludePattern),\n );\n\n // Sync files in the root, and all projects\n const projectRoots = [\n '.',\n ...[...getProjects(tree).values()].map((p) => p.root),\n ];\n\n // Sync subproject license files and project files\n for (const projectRoot of projectRoots) {\n // Check that this project should have files synced - allows users to specify a project path\n // to exclude from all file syncs\n if (isFileIncludedInSync(projectRoot)) {\n PROJECT_FILES_TO_SYNC.forEach((projectFile) => {\n const projectFilePath = joinPathFragments(projectRoot, projectFile);\n // Check that the specific project file should be synced - allows users to be more granular to\n // decide to eg omit LICENSE file sync but keep package.json sync\n if (isFileIncludedInSync(projectFilePath)) {\n const prevContent = tree.read(projectFilePath, 'utf-8');\n\n syncProjectFile(tree, projectRoot, projectFile, source);\n\n const newContent = tree.read(projectFilePath, 'utf-8');\n\n if (prevContent !== newContent) {\n projectFilesUpdated.push({\n path: projectFilePath,\n name: projectFile,\n });\n }\n }\n });\n }\n }\n\n return {\n outOfSyncMessage: buildOutOfSyncMessage({\n licenseHeadersUpdated,\n projectFilesUpdated,\n }),\n };\n}\n\n/**\n * Build the message to display when the sync generator would make changes to the tree\n */\nconst buildOutOfSyncMessage = (updates: {\n projectFilesUpdated: ProjectFile[];\n licenseHeadersUpdated: string[];\n}): string => {\n let outOfSyncMessage = '';\n\n const pathsByName: { [key: string]: string[] } =\n updates.projectFilesUpdated.reduce(\n (prev, { name, path }) => ({\n ...prev,\n [name]: [...(prev[name] ?? []), path],\n }),\n {},\n );\n Object.entries(pathsByName).forEach(([name, files]) => {\n outOfSyncMessage += `Project ${name} files are out of sync:\\n${files.map((p) => `- ${p}`).join('\\n')}\\n\\n`;\n });\n\n if (updates.licenseHeadersUpdated.length > 0) {\n outOfSyncMessage += `License headers are out of sync in the following source files:\\n${updates.licenseHeadersUpdated.map((p) => `- ${p}`).join('\\n')}\\n\\n`;\n }\n\n return outOfSyncMessage.trim();\n};\n\n/**\n * Load the license header content lines\n */\nconst loadHeaderContentLines = (\n tree: Tree,\n config: LicenseHeaderConfig,\n): string[] => {\n // Load the license header content\n let headerContentLines = [];\n if ('lines' in config.content) {\n headerContentLines = config.content.lines;\n } else {\n if (!tree.exists(config.content.filePath)) {\n throw new Error(\n `Could not find license header content file ${config.content.filePath}`,\n );\n }\n headerContentLines = tree\n .read(config.content.filePath, 'utf-8')\n .split('\\n');\n }\n return headerContentLines;\n};\n\n/**\n * Returns all files in the given tree - both in-memory only and in the filesystem under the tree root\n */\nconst getAllFilesInTree = async (tree: Tree): Promise<string[]> => {\n return [\n ...new Set([\n // Get all files in memory in the tree\n ...(await globAsync(tree, ['*', '**/*'])),\n // Find all files on the filesystem that may not be in memory in the tree\n ...(await fastGlob(['*', '**/*'], { cwd: tree.root, dot: true })),\n ]),\n ].filter((f) => tree.exists(f));\n};\n\n/**\n * Returns the list of project files\n */\nconst getCandidateProjectFilesForHeader = async (\n tree: Tree,\n config: LicenseHeaderConfig,\n): Promise<string[]> => {\n // Prefer, if possible, to treat all non gitignored files as our candidate set such that we honour users .gitignore files\n // If we're not in a git repo, fall back to everything and rely on the user configuring exclusions below\n const projectFiles = isWithinGitRepo(tree)\n ? getGitIncludedFiles(tree)\n : await getAllFilesInTree(tree);\n\n // Remove any files that were excluded in the config\n const ignoredProjectFiles = new Set(\n (config.exclude ?? []).flatMap((pattern) =>\n minimatch.match(projectFiles, pattern),\n ),\n );\n return projectFiles.filter((file) => !ignoredProjectFiles.has(file));\n};\n\n/**\n * Renders a header with the given format\n */\nconst renderHeader = (\n contentLines: string[],\n format: LicenseHeaderFormat,\n): string => {\n return `${format.blockStart ? `${format.blockStart}\\n` : ''}${contentLines.map((line) => `${format.lineStart ?? ''}${line}${format.lineEnd ?? ''}`).join('\\n')}${format.blockEnd ? `\\n${format.blockEnd}` : ''}`;\n};\n\n/**\n * Validates header format to ensure it produces a valid comment\n */\nconst validateFormat = (\n fileExtension: string,\n syntax: CommentSyntax,\n format: LicenseHeaderFormat,\n contentLines: string[],\n): void => {\n const blockStartOpensBlockComment =\n format.blockStart &&\n syntax.block &&\n format.blockStart.startsWith(syntax.block.start);\n const blockEndClosesBlockComment =\n format.blockEnd &&\n syntax.block &&\n format.blockEnd.endsWith(syntax.block.end);\n\n // Block start must start with the block start or line comment\n const validBlockStart =\n !format.blockStart ||\n blockStartOpensBlockComment ||\n (syntax.line && format.blockStart.startsWith(syntax.line));\n // Block end must end with the block end, or begin with the line comment\n const validBlockEnd =\n !format.blockEnd ||\n blockEndClosesBlockComment ||\n (syntax.line && format.blockEnd.startsWith(syntax.line));\n\n // Lines must start with the line comment syntax, unless within a block comment\n const validLineStart =\n !format.lineStart ||\n (syntax.line && format.lineStart.startsWith(syntax.line)) ||\n (blockStartOpensBlockComment && blockEndClosesBlockComment);\n\n if (!validLineStart || !validBlockStart || !validBlockEnd) {\n throw new Error(\n `Provided format for ${fileExtension} file would generate invalid comment syntax. Configured syntax for ${fileExtension} is ${JSON.stringify(syntax, null, 2)}.`,\n );\n }\n\n if (blockStartOpensBlockComment && !blockEndClosesBlockComment) {\n throw new Error(\n `Provided format for ${fileExtension} file opens a block comment with \"${syntax.block.start}\" in blockStart but does not close it with \"${syntax.block.end}\" in blockEnd`,\n );\n }\n\n if (\n blockStartOpensBlockComment &&\n contentLines.some((line) => line.includes(syntax.block.end))\n ) {\n throw new Error(\n `Provided license content would close a block comment early and cause a syntax error! Please remove \"${syntax.block.end}\" from your license text.`,\n );\n }\n\n if (blockStartOpensBlockComment && blockEndClosesBlockComment) {\n if (\n format.blockEnd.lastIndexOf(syntax.block.end) !==\n format.blockEnd.indexOf(syntax.block.end)\n ) {\n throw new Error(\n `Provided format for ${fileExtension} file may cause syntax errors due to closing a block comment multiple times with \"${syntax.block.end}\" in blockEnd`,\n );\n }\n if (format.blockStart.includes(syntax.block.end)) {\n throw new Error(\n `Provided format for ${fileExtension} file may cause syntax errors since it closes the block comment with \"${syntax.block.end}\" in blockStart`,\n );\n }\n }\n};\n\n/**\n * Parse the hashbang, header and body from a file.\n * The header is the first block comment, or consecutive series of line comments found in the file, after the hashbang\n */\nconst parseFile = (\n content: string,\n syntax: CommentSyntax,\n): { hashbang: string; header: string; body: string } => {\n const lines = content.split('\\n');\n let i = 0;\n\n // Hashbangs must always go first, so extract this if it exists\n const hashbangLines = [];\n for (; i < lines.length; i++) {\n if (hashbangLines.length === 0) {\n if (lines[i].startsWith('#!')) {\n hashbangLines.push(lines[i]);\n } else {\n break;\n }\n } else {\n if (lines[i].trim().length === 0) {\n // Preserve any empty lines following the hashbang\n hashbangLines.push(lines[i]);\n } else {\n break;\n }\n }\n }\n\n // After the hashbang, consume the next comment which follows.\n // This could either be all lines of a block comment, or all consecutive line comments until a non line-comment is seen\n const headerLines = [];\n let withinBlockComment = false;\n let withinLineCommentSeries = false;\n for (; i < lines.length; i++) {\n const trimmedLine = lines[i].trim();\n if (\n syntax.block &&\n trimmedLine.endsWith(syntax.block.end) &&\n !withinLineCommentSeries &&\n (withinBlockComment || trimmedLine.startsWith(syntax.block.start))\n ) {\n // Comment ends with the block end, so we've completed the header and therefore break out of the loop\n headerLines.push(lines[i]);\n i++; // Increment here to ensure we point to the next line for the body\n break;\n } else if (\n syntax.block &&\n trimmedLine.startsWith(syntax.block.start) &&\n !withinLineCommentSeries\n ) {\n // Line begins a comment block (without also ending it on the same line), so start consuming the block\n withinBlockComment = true;\n headerLines.push(lines[i]);\n } else if (withinBlockComment) {\n // We haven't yet closed the block comment, so consume this line\n headerLines.push(lines[i]);\n } else if (syntax.line && trimmedLine.startsWith(syntax.line)) {\n // Line starts with the line comment syntax, so consume it\n withinLineCommentSeries = true;\n headerLines.push(lines[i]);\n } else {\n break;\n }\n }\n\n // Body of the file is the rest\n const bodyLines = lines.slice(i);\n\n return {\n hashbang: hashbangLines.join('\\n'),\n header: headerLines.join('\\n'),\n body: bodyLines.join('\\n'),\n };\n};\n\n/**\n * Add a header to the given file according to the header content and license config\n * Returns true if the header was added/updated, and false otherwise.\n */\nconst addHeader = (\n tree: Tree,\n file: string,\n contentLines: string[],\n config: LicenseHeaderConfig,\n format: LicenseHeaderFormat,\n): boolean => {\n const fileName = basename(file);\n const fileNameParts = fileName.split('.');\n const fileExtension = fileNameParts[fileNameParts.length - 1];\n\n const syntax =\n (config.commentSyntax ?? {})[fileExtension] ??\n LANGUAGE_COMMENT_SYNTAX[fileExtension];\n if (!syntax) {\n throw new Error(`Unknown file extension ${fileExtension}. Please configure commentSyntax in ${AWS_NX_PLUGIN_CONFIG_FILE_NAME}, eg:\n\nexport default {\n license: {\n header: {\n ...\n commentSyntax: {\n ${fileExtension}: {\n line: \"//\",\n block: { start: \"/*\", end: \"*/\" }\n }\n }\n }\n }\n} satisfies AwsNxPluginConfig;\n`);\n }\n\n // Check that we would render a valid comment\n validateFormat(fileExtension, syntax, format, contentLines);\n\n const existingContent = tree.read(file, 'utf-8');\n\n const { hashbang, body } = parseFile(existingContent, syntax);\n\n const newContent = [\n ...(hashbang ? [hashbang] : []),\n renderHeader(contentLines, format),\n body,\n ].join('\\n');\n\n // Sanity check that we wouldn't edit the hashbang or body, only the header\n const { hashbang: newHashbang, body: newBody } = parseFile(\n newContent,\n syntax,\n );\n if (hashbang !== newHashbang || body !== newBody) {\n throw new Error(\n `The license header content, or format for ${fileExtension} files would produce a header that cannot be safely replaced in ${file}. Please revise license content and format in ${AWS_NX_PLUGIN_CONFIG_FILE_NAME}`,\n );\n }\n\n if (newContent !== existingContent) {\n tree.write(file, newContent);\n return true;\n }\n\n return false;\n};\n\nexport default licenseSyncGenerator;\n"],"names":["getProjects","globAsync","joinPathFragments","fastGlob","minimatch","basename","PackageJson","type","AWS_NX_PLUGIN_CONFIG_FILE_NAME","getGitIncludedFiles","isWithinGitRepo","getGeneratorInfo","LANGUAGE_COMMENT_SYNTAX","readLicenseConfig","PROJECT_FILES_TO_SYNC","syncProjectFile","SYNC_GENERATOR_NAME","name","filename","id","licenseSyncGenerator","tree","source","licenseHeadersUpdated","header","candidateProjectFiles","getCandidateProjectFilesForHeader","headerContentLines","loadHeaderContentLines","includePattern","format","Object","entries","files","match","forEach","file","didAdd","addHeader","push","projectFilesUpdated","isFileIncludedInSync","path","exclude","some","excludePattern","projectRoots","values","map","p","root","projectRoot","projectFile","projectFilePath","prevContent","read","newContent","outOfSyncMessage","buildOutOfSyncMessage","updates","pathsByName","reduce","prev","join","length","trim","config","content","lines","exists","filePath","Error","split","getAllFilesInTree","Set","cwd","dot","filter","f","projectFiles","ignoredProjectFiles","flatMap","pattern","has","renderHeader","contentLines","blockStart","line","lineStart","lineEnd","blockEnd","validateFormat","fileExtension","syntax","blockStartOpensBlockComment","block","startsWith","start","blockEndClosesBlockComment","endsWith","end","validBlockStart","validBlockEnd","validLineStart","JSON","stringify","includes","lastIndexOf","indexOf","parseFile","i","hashbangLines","headerLines","withinBlockComment","withinLineCommentSeries","trimmedLine","bodyLines","slice","hashbang","body","fileName","fileNameParts","commentSyntax","existingContent","newHashbang","newBody","write"],"mappings":"AAAA;;;CAGC,GACD,SACEA,WAAW,EACXC,SAAS,EACTC,iBAAiB,QAEZ,aAAa;AACpB,OAAOC,cAAc,YAAY;AACjC,SAASC,SAAS,QAAQ,YAAY;AAEtC,SAASC,QAAQ,QAAQ,OAAO;AAChC,OAAOC,iBAAiB,6BAA6B;IAAEC,MAAM;AAAO,EAAE;AACtE,SAASC,8BAA8B,QAAQ,8BAA2B;AAC1E,SAASC,mBAAmB,EAAEC,eAAe,QAAQ,qBAAkB;AACvE,SAASC,gBAAgB,QAAQ,oBAAiB;AAClD,SAASC,uBAAuB,EAAEC,iBAAiB,QAAQ,eAAY;AAMvE,SACEC,qBAAqB,EAErBC,eAAe,QACV,yBAAsB;AAE7B,OAAO,MAAMC,sBAAsB,GAAGV,YAAYW,IAAI,CAAC,CAAC,EAAEN,iBAAiB,YAAYO,QAAQ,EAAEC,EAAE,EAAE,CAAC;AAOtG,OAAO,eAAeC,qBACpBC,IAAU;IAEV,MAAMC,SAAU,CAAA,MAAMT,kBAAkBQ,KAAI,GAAIC;IAEhD,IAAI,CAACA,QAAQ;QACX,iFAAiF;QACjF,OAAO,CAAC;IACV;IAEA,MAAMC,wBAAkC,EAAE;IAE1C,IAAID,OAAOE,MAAM,EAAE;QACjB,6CAA6C;QAC7C,MAAMC,wBAAwB,MAAMC,kCAClCL,MACAC,OAAOE,MAAM;QAGf,MAAMG,qBAAqBC,uBAAuBP,MAAMC,OAAOE,MAAM;QAErE,+DAA+D;QAC/D,KAAK,MAAM,CAACK,gBAAgBC,OAAO,IAAIC,OAAOC,OAAO,CACnDV,OAAOE,MAAM,CAACM,MAAM,EACnB;YACD,MAAMG,QAAQ7B,UAAU8B,KAAK,CAACT,uBAAuBI;YAErDI,MAAME,OAAO,CAAC,CAACC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;;;;QAOzH,EAAEoF,cAAc;;;;;;;;AAQxB,CAAC;IACC;IAEA,6CAA6C;IAC7CD,eAAeC,eAAeC,QAAQ/D,QAAQuD;IAE9C,MAAMsC,kBAAkBtG,KAAKkC,IAAI,CAACnB,MAAM;IAExC,MAAM,EAAEkF,QAAQ,EAAEC,IAAI,EAAE,GAAGV,UAAUc,iBAAiB9B;IAEtD,MAAMrC,aAAa;WACb8D,WAAW;YAACA;SAAS,GAAG,EAAE;QAC9BlC,aAAaC,cAAcvD;QAC3ByF;KACD,CAACxD,IAAI,CAAC;IAEP,2EAA2E;IAC3E,MAAM,EAAEuD,UAAUM,WAAW,EAAEL,MAAMM,OAAO,EAAE,GAAGhB,UAC/CrD,YACAqC;IAEF,IAAIyB,aAAaM,eAAeL,SAASM,SAAS;QAChD,MAAM,IAAItD,MACR,CAAC,0CAA0C,EAAEqB,cAAc,gEAAgE,EAAExD,KAAK,8CAA8C,EAAE5B,gCAAgC;IAEtN;IAEA,IAAIgD,eAAemE,iBAAiB;QAClCtG,KAAKyG,KAAK,CAAC1F,MAAMoB;QACjB,OAAO;IACT;IAEA,OAAO;AACT;AAEA,eAAepC,qBAAqB"}
|
|
@@ -1,59 +1,52 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.syncProjectFile = exports.PROJECT_FILES_TO_SYNC = void 0;
|
|
4
1
|
/**
|
|
5
2
|
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
6
3
|
* SPDX-License-Identifier: Apache-2.0
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
const toml_1 = require("../../utils/toml");
|
|
4
|
+
*/ import { generateFiles, joinPathFragments, updateJson } from "@nx/devkit";
|
|
5
|
+
import { updateToml } from "../../utils/toml.js";
|
|
10
6
|
/**
|
|
11
7
|
* Different project files with licensing information to be synchronised
|
|
12
|
-
*/
|
|
13
|
-
exports.PROJECT_FILES_TO_SYNC = [
|
|
8
|
+
*/ export const PROJECT_FILES_TO_SYNC = [
|
|
14
9
|
'LICENSE',
|
|
15
10
|
'package.json',
|
|
16
|
-
'pyproject.toml'
|
|
11
|
+
'pyproject.toml'
|
|
17
12
|
];
|
|
18
13
|
/**
|
|
19
14
|
* Methods to sync each type of project file
|
|
20
|
-
*/
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
(0, devkit_1.generateFiles)(tree, (0, devkit_1.joinPathFragments)(__dirname, 'files', 'licenses', config.spdx), projectRoot, {
|
|
15
|
+
*/ const SYNC_STRATEGIES = {
|
|
16
|
+
LICENSE: (tree, projectRoot, config)=>{
|
|
17
|
+
generateFiles(tree, joinPathFragments(import.meta.dirname, 'files', 'licenses', config.spdx), projectRoot, {
|
|
24
18
|
copyrightHolder: config.copyrightHolder,
|
|
25
|
-
year: config.copyrightYear
|
|
19
|
+
year: config.copyrightYear
|
|
26
20
|
}, {});
|
|
27
21
|
},
|
|
28
|
-
'package.json': (tree, projectRoot, config)
|
|
29
|
-
const packageJsonPath =
|
|
22
|
+
'package.json': (tree, projectRoot, config)=>{
|
|
23
|
+
const packageJsonPath = joinPathFragments(projectRoot, 'package.json');
|
|
30
24
|
if (tree.exists(packageJsonPath)) {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
25
|
+
updateJson(tree, packageJsonPath, (prev)=>({
|
|
26
|
+
...prev,
|
|
27
|
+
license: config.spdx
|
|
28
|
+
}));
|
|
35
29
|
}
|
|
36
30
|
},
|
|
37
|
-
'pyproject.toml': (tree, projectRoot, config)
|
|
38
|
-
const pyProjectPath =
|
|
31
|
+
'pyproject.toml': (tree, projectRoot, config)=>{
|
|
32
|
+
const pyProjectPath = joinPathFragments(projectRoot, 'pyproject.toml');
|
|
39
33
|
if (tree.exists(pyProjectPath)) {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
: {}
|
|
48
|
-
|
|
34
|
+
updateToml(tree, pyProjectPath, (prev)=>({
|
|
35
|
+
...prev,
|
|
36
|
+
license: config.spdx,
|
|
37
|
+
...tree.exists(joinPathFragments(projectRoot, 'LICENSE')) ? {
|
|
38
|
+
'license-files': [
|
|
39
|
+
'LICENSE'
|
|
40
|
+
]
|
|
41
|
+
} : {}
|
|
42
|
+
}));
|
|
49
43
|
}
|
|
50
|
-
}
|
|
44
|
+
}
|
|
51
45
|
};
|
|
52
46
|
/**
|
|
53
47
|
* Synchronise a particular project file
|
|
54
|
-
*/
|
|
55
|
-
const syncProjectFile = (tree, projectRoot, projectFile, config) => {
|
|
48
|
+
*/ export const syncProjectFile = (tree, projectRoot, projectFile, config)=>{
|
|
56
49
|
return SYNC_STRATEGIES[projectFile](tree, projectRoot, config);
|
|
57
50
|
};
|
|
58
|
-
|
|
51
|
+
|
|
59
52
|
//# sourceMappingURL=project-file-sync.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":["../../../../../../packages/nx-plugin/src/license/sync/project-file-sync.ts"],"sourcesContent":["/**\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\nimport {\n generateFiles,\n joinPathFragments,\n type Tree,\n updateJson,\n} from '@nx/devkit';\nimport { updateToml } from '../../utils/toml';\nimport type { LicenseSourceConfig } from '../config-types';\n\n/**\n * Different project files with licensing information to be synchronised\n */\nexport const PROJECT_FILES_TO_SYNC = [\n 'LICENSE',\n 'package.json',\n 'pyproject.toml',\n] as const;\n\nexport type ProjectFileToSync = (typeof PROJECT_FILES_TO_SYNC)[number];\n\n/**\n * Methods to sync each type of project file\n */\nconst SYNC_STRATEGIES: Record<\n ProjectFileToSync,\n (tree: Tree, projectRoot: string, config: LicenseSourceConfig) => void\n> = {\n LICENSE: (tree, projectRoot, config) => {\n generateFiles(\n tree,\n joinPathFragments(import.meta.dirname, 'files', 'licenses', config.spdx),\n projectRoot,\n {\n copyrightHolder: config.copyrightHolder,\n year: config.copyrightYear,\n },\n {},\n );\n },\n 'package.json': (tree, projectRoot, config) => {\n const packageJsonPath = joinPathFragments(projectRoot, 'package.json');\n if (tree.exists(packageJsonPath)) {\n updateJson(tree, packageJsonPath, (prev) => ({\n ...prev,\n license: config.spdx,\n }));\n }\n },\n 'pyproject.toml': (tree, projectRoot, config) => {\n const pyProjectPath = joinPathFragments(projectRoot, 'pyproject.toml');\n if (tree.exists(pyProjectPath)) {\n updateToml(tree, pyProjectPath, (prev) => ({\n ...prev,\n license: config.spdx,\n ...(tree.exists(joinPathFragments(projectRoot, 'LICENSE'))\n ? {\n 'license-files': ['LICENSE'],\n }\n : {}),\n }));\n }\n },\n};\n\n/**\n * Synchronise a particular project file\n */\nexport const syncProjectFile = (\n tree: Tree,\n projectRoot: string,\n projectFile: (typeof PROJECT_FILES_TO_SYNC)[number],\n config: LicenseSourceConfig,\n) => {\n return SYNC_STRATEGIES[projectFile](tree, projectRoot, config);\n};\n"],"names":["generateFiles","joinPathFragments","updateJson","updateToml","PROJECT_FILES_TO_SYNC","SYNC_STRATEGIES","LICENSE","tree","projectRoot","config","dirname","spdx","copyrightHolder","year","copyrightYear","packageJsonPath","exists","prev","license","pyProjectPath","syncProjectFile","projectFile"],"mappings":"AAAA;;;CAGC,GACD,SACEA,aAAa,EACbC,iBAAiB,EAEjBC,UAAU,QACL,aAAa;AACpB,SAASC,UAAU,QAAQ,sBAAmB;AAG9C;;CAEC,GACD,OAAO,MAAMC,wBAAwB;IACnC;IACA;IACA;CACD,CAAU;AAIX;;CAEC,GACD,MAAMC,kBAGF;IACFC,SAAS,CAACC,MAAMC,aAAaC;QAC3BT,cACEO,MACAN,kBAAkB,YAAYS,OAAO,EAAE,SAAS,YAAYD,OAAOE,IAAI,GACvEH,aACA;YACEI,iBAAiBH,OAAOG,eAAe;YACvCC,MAAMJ,OAAOK,aAAa;QAC5B,GACA,CAAC;IAEL;IACA,gBAAgB,CAACP,MAAMC,aAAaC;QAClC,MAAMM,kBAAkBd,kBAAkBO,aAAa;QACvD,IAAID,KAAKS,MAAM,CAACD,kBAAkB;YAChCb,WAAWK,MAAMQ,iBAAiB,CAACE,OAAU,CAAA;oBAC3C,GAAGA,IAAI;oBACPC,SAAST,OAAOE,IAAI;gBACtB,CAAA;QACF;IACF;IACA,kBAAkB,CAACJ,MAAMC,aAAaC;QACpC,MAAMU,gBAAgBlB,kBAAkBO,aAAa;QACrD,IAAID,KAAKS,MAAM,CAACG,gBAAgB;YAC9BhB,WAAWI,MAAMY,eAAe,CAACF,OAAU,CAAA;oBACzC,GAAGA,IAAI;oBACPC,SAAST,OAAOE,IAAI;oBACpB,GAAIJ,KAAKS,MAAM,CAACf,kBAAkBO,aAAa,cAC3C;wBACE,iBAAiB;4BAAC;yBAAU;oBAC9B,IACA,CAAC,CAAC;gBACR,CAAA;QACF;IACF;AACF;AAEA;;CAEC,GACD,OAAO,MAAMY,kBAAkB,CAC7Bb,MACAC,aACAa,aACAZ;IAEA,OAAOJ,eAAe,CAACgB,YAAY,CAACd,MAAMC,aAAaC;AACzD,EAAE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*/ import { startMcpServer } from "./index.js";
|
|
5
|
+
/**
|
|
6
|
+
* Entry point for the `mcp-inspect` target, which runs the server from source
|
|
7
|
+
* with live reload. The published server is `@aws/nx-plugin-mcp`, whose bundled
|
|
8
|
+
* entry point resolves `generators.json` relative to itself and so only works
|
|
9
|
+
* once built.
|
|
10
|
+
*/ void (async ()=>{
|
|
11
|
+
try {
|
|
12
|
+
await startMcpServer();
|
|
13
|
+
} catch (e) {
|
|
14
|
+
console.error(e);
|
|
15
|
+
}
|
|
16
|
+
})();
|
|
17
|
+
|
|
18
|
+
//# sourceMappingURL=dev-server.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../packages/nx-plugin/src/mcp-server/dev-server.ts"],"sourcesContent":["/**\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\nimport { startMcpServer } from '.';\n\n/**\n * Entry point for the `mcp-inspect` target, which runs the server from source\n * with live reload. The published server is `@aws/nx-plugin-mcp`, whose bundled\n * entry point resolves `generators.json` relative to itself and so only works\n * once built.\n */\nvoid (async () => {\n try {\n await startMcpServer();\n } catch (e) {\n console.error(e);\n }\n})();\n"],"names":["startMcpServer","e","console","error"],"mappings":"AAAA;;;CAGC,GACD,SAASA,cAAc,QAAQ,aAAI;AAEnC;;;;;CAKC,GACD,KAAK,AAAC,CAAA;IACJ,IAAI;QACF,MAAMA;IACR,EAAE,OAAOC,GAAG;QACVC,QAAQC,KAAK,CAACF;IAChB;AACF,CAAA"}
|