@aws/nx-plugin 1.0.0-rc.0 → 1.0.0-rc.10
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 +3399 -4104
- package/README.md +8 -8
- package/executors.json +9 -0
- package/generators.json +44 -5
- package/package.json +16 -12
- package/sdk/license.d.ts +8 -0
- package/sdk/license.js +13 -0
- package/sdk/license.js.map +1 -0
- package/src/connection/agent-runtime-config.d.ts +1 -1
- package/src/connection/agent-runtime-config.js.map +1 -1
- package/src/connection/agent-serve-local.d.ts +2 -2
- package/src/connection/agent-serve-local.js +1 -1
- package/src/connection/agent-serve-local.js.map +1 -1
- package/src/connection/generator.d.ts +5 -5
- package/src/connection/generator.js +58 -39
- package/src/connection/generator.js.map +1 -1
- package/src/connection/serve-local.d.ts +1 -1
- package/src/connection/serve-local.js +1 -1
- package/src/connection/serve-local.js.map +1 -1
- package/src/infra/app/__snapshots__/generator.spec.ts.snap +49 -60
- package/src/infra/app/files/app/src/main.ts.template +2 -2
- package/src/infra/app/generator.d.ts +3 -3
- package/src/infra/app/generator.js +25 -23
- package/src/infra/app/generator.js.map +1 -1
- package/src/infra/app/schema.d.ts +1 -1
- package/src/infra/app/schema.json +1 -1
- package/src/license/__snapshots__/config.spec.ts.snap +23 -0
- package/src/license/config-types.d.ts +18 -1
- package/src/license/config-types.js +4 -0
- package/src/license/config-types.js.map +1 -1
- package/src/license/config.d.ts +65 -7
- package/src/license/config.js +315 -7
- package/src/license/config.js.map +1 -1
- package/src/license/dependency-check/check.d.ts +16 -0
- package/src/license/dependency-check/check.js +111 -0
- package/src/license/dependency-check/check.js.map +1 -0
- package/src/license/dependency-check/collectors/collector.d.ts +21 -0
- package/src/license/dependency-check/collectors/collector.js +76 -0
- package/src/license/dependency-check/collectors/collector.js.map +1 -0
- package/src/license/dependency-check/collectors/npm-collector.d.ts +10 -0
- package/src/license/dependency-check/collectors/npm-collector.js +75 -0
- package/src/license/dependency-check/collectors/npm-collector.js.map +1 -0
- package/src/license/dependency-check/collectors/python-collector.d.ts +23 -0
- package/src/license/dependency-check/collectors/python-collector.js +121 -0
- package/src/license/dependency-check/collectors/python-collector.js.map +1 -0
- package/src/license/dependency-check/evaluator.d.ts +9 -0
- package/src/license/dependency-check/evaluator.js +122 -0
- package/src/license/dependency-check/evaluator.js.map +1 -0
- package/src/license/dependency-check/executor-schema.json +6 -0
- package/src/license/dependency-check/executor.d.ts +9 -0
- package/src/license/dependency-check/executor.js +43 -0
- package/src/license/dependency-check/executor.js.map +1 -0
- package/src/license/dependency-check/pre-approved.d.ts +6 -0
- package/src/license/dependency-check/pre-approved.js +1280 -0
- package/src/license/dependency-check/pre-approved.js.map +1 -0
- package/src/license/dependency-check/types.d.ts +45 -0
- package/src/license/dependency-check/types.js +7 -0
- package/src/license/dependency-check/types.js.map +1 -0
- package/src/license/generator.d.ts +3 -3
- package/src/license/generator.js +113 -14
- package/src/license/generator.js.map +1 -1
- package/src/license/index.d.ts +8 -0
- package/src/license/index.js +13 -0
- package/src/license/index.js.map +1 -0
- package/src/license/known-exceptions.d.ts +7 -0
- package/src/license/known-exceptions.js +33 -0
- package/src/license/known-exceptions.js.map +1 -0
- package/src/license/schema.d.ts +5 -0
- package/src/license/schema.json +6 -0
- package/src/license/sync/generator.d.ts +2 -2
- package/src/license/sync/generator.js +15 -15
- package/src/license/sync/generator.js.map +1 -1
- package/src/license/sync/project-file-sync.d.ts +3 -3
- package/src/license/sync/project-file-sync.js.map +1 -1
- package/src/mcp-server/generator-info.d.ts +5 -1
- package/src/mcp-server/generator-info.js +7 -7
- package/src/mcp-server/generator-info.js.map +1 -1
- package/src/mcp-server/guide-pipeline.d.ts +1 -1
- package/src/mcp-server/guide-pipeline.js +10 -12
- package/src/mcp-server/guide-pipeline.js.map +1 -1
- package/src/mcp-server/mdx-ast.js +4 -0
- package/src/mcp-server/mdx-ast.js.map +1 -1
- package/src/mcp-server/server.js +3 -3
- package/src/mcp-server/server.js.map +1 -1
- package/src/mcp-server/tools/create-workspace-command.d.ts +1 -1
- package/src/mcp-server/tools/create-workspace-command.js +5 -5
- package/src/mcp-server/tools/create-workspace-command.js.map +1 -1
- package/src/mcp-server/tools/general-guidance.d.ts +2 -2
- package/src/mcp-server/tools/general-guidance.js +2 -2
- package/src/mcp-server/tools/general-guidance.js.map +1 -1
- package/src/mcp-server/tools/generator-guide.d.ts +2 -2
- package/src/mcp-server/tools/generator-guide.js +2 -2
- package/src/mcp-server/tools/generator-guide.js.map +1 -1
- package/src/mcp-server/tools/list-generators.d.ts +2 -2
- package/src/mcp-server/tools/list-generators.js +1 -1
- package/src/mcp-server/tools/list-generators.js.map +1 -1
- package/src/open-api/ts-client/__snapshots__/generator.reserved-keywords.spec.ts.snap +1 -1
- package/src/open-api/ts-client/generator.d.ts +3 -3
- package/src/open-api/ts-client/generator.js +2 -2
- package/src/open-api/ts-client/generator.js.map +1 -1
- package/src/open-api/ts-hooks/generator.d.ts +3 -3
- package/src/open-api/ts-hooks/generator.js +2 -2
- package/src/open-api/ts-hooks/generator.js.map +1 -1
- package/src/open-api/ts-hooks/generator.spec.tsx +14 -14
- package/src/open-api/ts-metadata/generator.d.ts +3 -3
- package/src/open-api/ts-metadata/generator.js +1 -1
- package/src/open-api/ts-metadata/generator.js.map +1 -1
- package/src/open-api/utils/codegen-data/languages.d.ts +5 -1
- package/src/open-api/utils/codegen-data/languages.js +4 -4
- package/src/open-api/utils/codegen-data/languages.js.map +1 -1
- package/src/open-api/utils/codegen-data.d.ts +6 -2
- package/src/open-api/utils/codegen-data.js +6 -6
- package/src/open-api/utils/codegen-data.js.map +1 -1
- package/src/open-api/utils/normalise.d.ts +5 -1
- package/src/open-api/utils/normalise.js +5 -5
- package/src/open-api/utils/normalise.js.map +1 -1
- package/src/open-api/utils/parse.d.ts +2 -2
- package/src/open-api/utils/parse.js +4 -0
- package/src/open-api/utils/parse.js.map +1 -1
- package/src/open-api/utils/refs.d.ts +1 -1
- package/src/preset/__snapshots__/generator.spec.ts.snap +128 -14
- package/src/preset/generator.d.ts +4 -4
- package/src/preset/generator.js +24 -19
- package/src/preset/generator.js.map +1 -1
- package/src/preset/schema.d.ts +7 -5
- package/src/preset/schema.json +9 -4
- package/src/py/agent/__snapshots__/generator.spec.ts.snap +10 -9
- package/src/py/agent/a2a-connection/generator.d.ts +3 -3
- package/src/py/agent/a2a-connection/generator.js +8 -7
- package/src/py/agent/a2a-connection/generator.js.map +1 -1
- package/src/py/agent/files/common/agent.py.template +2 -0
- package/src/py/agent/files/deploy/Dockerfile.template +3 -3
- package/src/py/agent/files/http/init.py.template +2 -2
- package/src/py/agent/files/http/main.py.template +0 -1
- package/src/py/agent/generator.d.ts +3 -3
- package/src/py/agent/generator.js +45 -39
- package/src/py/agent/generator.js.map +1 -1
- package/src/py/agent/mcp-connection/__snapshots__/generator.spec.ts.snap +4 -0
- package/src/py/agent/mcp-connection/generator.d.ts +3 -3
- package/src/py/agent/mcp-connection/generator.js +5 -5
- package/src/py/agent/mcp-connection/generator.js.map +1 -1
- package/src/py/agent/react-connection/__snapshots__/generator.spec.ts.snap +3 -3
- package/src/py/agent/react-connection/generator.d.ts +3 -3
- package/src/py/agent/react-connection/generator.js +8 -8
- package/src/py/agent/react-connection/generator.js.map +1 -1
- package/src/py/agent/react-connection/serve-local.d.ts +2 -2
- package/src/py/agent/react-connection/serve-local.js.map +1 -1
- package/src/py/agent/schema.d.ts +8 -8
- package/src/py/agent/schema.json +18 -18
- package/src/py/api/generator.d.ts +3 -3
- package/src/py/api/generator.js +2 -2
- package/src/py/api/generator.js.map +1 -1
- package/src/py/api/schema.d.ts +4 -6
- package/src/py/api/schema.json +15 -15
- package/src/py/fast-api/__snapshots__/generator.spec.ts.snap +6 -6
- package/src/py/fast-api/generator.d.ts +3 -3
- package/src/py/fast-api/generator.js +73 -55
- package/src/py/fast-api/generator.js.map +1 -1
- package/src/py/fast-api/react/generator.d.ts +3 -3
- package/src/py/fast-api/react/generator.js +3 -3
- package/src/py/fast-api/react/generator.js.map +1 -1
- package/src/py/fast-api/react/open-api.d.ts +1 -1
- package/src/py/fast-api/react/open-api.js +5 -2
- package/src/py/fast-api/react/open-api.js.map +1 -1
- package/src/py/fast-api/schema.d.ts +4 -6
- package/src/py/fast-api/schema.json +15 -15
- package/src/py/lambda-function/__snapshots__/generator.spec.ts.snap +2 -2
- package/src/py/lambda-function/files/handler/__lambdaFunctionSnakeCase__.py.template +6 -6
- package/src/py/lambda-function/generator.d.ts +3 -3
- package/src/py/lambda-function/generator.js +34 -31
- package/src/py/lambda-function/generator.js.map +1 -1
- package/src/py/lambda-function/schema.d.ts +7 -4
- package/src/py/lambda-function/schema.json +15 -7
- package/src/py/mcp-server/__snapshots__/generator.spec.ts.snap +5 -5
- package/src/py/mcp-server/generator.d.ts +3 -3
- package/src/py/mcp-server/generator.js +44 -37
- package/src/py/mcp-server/generator.js.map +1 -1
- package/src/py/mcp-server/schema.d.ts +5 -9
- package/src/py/mcp-server/schema.json +15 -15
- package/src/py/project/generator.d.ts +3 -3
- package/src/py/project/generator.js +88 -69
- package/src/py/project/generator.js.map +1 -1
- package/src/py/project/schema.d.ts +1 -1
- package/src/py/project/schema.json +2 -2
- package/src/smithy/project/__snapshots__/generator.spec.ts.snap +18 -16
- package/src/smithy/project/files/build.Dockerfile.template +1 -0
- package/src/smithy/project/generator.d.ts +3 -3
- package/src/smithy/project/generator.js +31 -29
- package/src/smithy/project/generator.js.map +1 -1
- package/src/smithy/react-connection/generator.d.ts +3 -3
- package/src/smithy/react-connection/generator.js +4 -4
- package/src/smithy/react-connection/generator.js.map +1 -1
- package/src/smithy/ts/api/__snapshots__/generator.spec.ts.snap +12 -38
- package/src/smithy/ts/api/generator.d.ts +3 -3
- package/src/smithy/ts/api/generator.js +89 -66
- package/src/smithy/ts/api/generator.js.map +1 -1
- package/src/smithy/ts/api/schema.d.ts +4 -6
- package/src/smithy/ts/api/schema.json +15 -15
- package/src/terraform/project/generator.d.ts +3 -3
- package/src/terraform/project/generator.js +14 -9
- package/src/terraform/project/generator.js.map +1 -1
- package/src/trpc/backend/__snapshots__/generator.spec.ts.snap +6 -6
- package/src/trpc/backend/files/src/client/index.ts.template +5 -5
- package/src/trpc/backend/files/src/handler.ts.template +2 -2
- package/src/trpc/backend/generator.d.ts +3 -3
- package/src/trpc/backend/generator.js +80 -61
- package/src/trpc/backend/generator.js.map +1 -1
- package/src/trpc/backend/schema.d.ts +5 -5
- package/src/trpc/backend/schema.json +15 -15
- package/src/trpc/react/__snapshots__/generator.spec.ts.snap +3 -3
- package/src/trpc/react/files/src/components/__apiNameClassName__ClientProvider.tsx.template +14 -14
- package/src/trpc/react/generator.d.ts +3 -3
- package/src/trpc/react/generator.js +11 -10
- package/src/trpc/react/generator.js.map +1 -1
- package/src/ts/agent/__snapshots__/generator.spec.ts.snap +11 -5
- package/src/ts/agent/a2a-connection/generator.d.ts +3 -3
- package/src/ts/agent/a2a-connection/generator.js +9 -8
- package/src/ts/agent/a2a-connection/generator.js.map +1 -1
- package/src/ts/agent/files/common/agent.ts.template +6 -2
- package/src/ts/agent/files/deploy/Dockerfile.template +1 -1
- package/src/ts/agent/generator.d.ts +3 -3
- package/src/ts/agent/generator.js +40 -35
- package/src/ts/agent/generator.js.map +1 -1
- package/src/ts/agent/mcp-connection/__snapshots__/generator.spec.ts.snap +5 -2
- package/src/ts/agent/mcp-connection/generator.d.ts +3 -3
- package/src/ts/agent/mcp-connection/generator.js +6 -6
- package/src/ts/agent/mcp-connection/generator.js.map +1 -1
- package/src/ts/agent/react-connection/files/src/components/__agentNameClassName__AgentClientProvider.tsx.template +8 -8
- package/src/ts/agent/react-connection/generator.d.ts +3 -3
- package/src/ts/agent/react-connection/generator.js +15 -15
- package/src/ts/agent/react-connection/generator.js.map +1 -1
- package/src/ts/agent/react-connection/serve-local.d.ts +2 -2
- package/src/ts/agent/react-connection/serve-local.js +2 -2
- package/src/ts/agent/schema.d.ts +8 -8
- package/src/ts/agent/schema.json +18 -18
- package/src/ts/api/generator.d.ts +3 -3
- package/src/ts/api/generator.js +10 -8
- package/src/ts/api/generator.js.map +1 -1
- package/src/ts/api/schema.d.ts +5 -4
- package/src/ts/api/schema.json +15 -15
- package/src/ts/astro-docs/__snapshots__/generator.spec.ts.snap +7 -8
- package/src/ts/astro-docs/generator.d.ts +3 -3
- package/src/ts/astro-docs/generator.js +14 -11
- package/src/ts/astro-docs/generator.js.map +1 -1
- package/src/ts/docs/generator.d.ts +3 -3
- package/src/ts/docs/generator.js.map +1 -1
- package/src/ts/dynamodb/__snapshots__/generator.spec.ts.snap +1502 -0
- package/src/ts/dynamodb/agent-connection/__snapshots__/generator.spec.ts.snap +45 -0
- package/src/ts/dynamodb/agent-connection/generator.d.ts +10 -0
- package/src/ts/dynamodb/agent-connection/generator.js +32 -0
- package/src/ts/dynamodb/agent-connection/generator.js.map +1 -0
- package/src/ts/dynamodb/agent-connection/schema.d.ts +14 -0
- package/src/ts/dynamodb/agent-connection/schema.json +22 -0
- package/src/ts/dynamodb/files/scripts/create-local-table.ts.template +161 -0
- package/src/ts/dynamodb/files/scripts/start-container.ts.template +81 -0
- package/src/ts/dynamodb/files/src/client.ts.template +45 -0
- package/src/ts/dynamodb/files/src/constants.ts.template +9 -0
- package/src/ts/dynamodb/files/src/entities/example.ts.template +47 -0
- package/src/ts/dynamodb/files/src/entities/index.ts.template +1 -0
- package/src/ts/dynamodb/files/src/gsi.ts.template +14 -0
- package/src/ts/dynamodb/files/src/index.ts.template +11 -0
- package/src/ts/dynamodb/generator.d.ts +10 -0
- package/src/ts/dynamodb/generator.js +106 -0
- package/src/ts/dynamodb/generator.js.map +1 -0
- package/src/ts/dynamodb/mcp-server-connection/__snapshots__/generator.spec.ts.snap +45 -0
- package/src/ts/dynamodb/mcp-server-connection/generator.d.ts +10 -0
- package/src/ts/dynamodb/mcp-server-connection/generator.js +32 -0
- package/src/ts/dynamodb/mcp-server-connection/generator.js.map +1 -0
- package/src/ts/dynamodb/mcp-server-connection/schema.d.ts +14 -0
- package/src/ts/dynamodb/mcp-server-connection/schema.json +22 -0
- package/src/ts/dynamodb/schema.d.ts +14 -0
- package/src/ts/dynamodb/schema.json +52 -0
- package/src/ts/dynamodb/smithy-connection/__snapshots__/generator.spec.ts.snap +23 -0
- package/src/ts/dynamodb/smithy-connection/generator.d.ts +10 -0
- package/src/ts/dynamodb/smithy-connection/generator.js +30 -0
- package/src/ts/dynamodb/smithy-connection/generator.js.map +1 -0
- package/src/ts/dynamodb/smithy-connection/schema.d.ts +12 -0
- package/src/ts/dynamodb/smithy-connection/schema.json +18 -0
- package/src/ts/dynamodb/trpc-connection/__snapshots__/generator.spec.ts.snap +23 -0
- package/src/ts/dynamodb/trpc-connection/generator.d.ts +10 -0
- package/src/ts/dynamodb/trpc-connection/generator.js +30 -0
- package/src/ts/dynamodb/trpc-connection/generator.js.map +1 -0
- package/src/ts/dynamodb/trpc-connection/schema.d.ts +12 -0
- package/src/ts/dynamodb/trpc-connection/schema.json +18 -0
- package/src/ts/lambda-function/__snapshots__/generator.spec.ts.snap +2 -2
- package/src/ts/lambda-function/files/handler/__lambdaFunctionKebabCase__.ts.template +10 -10
- package/src/ts/lambda-function/generator.d.ts +3 -3
- package/src/ts/lambda-function/generator.js +41 -36
- package/src/ts/lambda-function/generator.js.map +1 -1
- package/src/ts/lambda-function/schema.d.ts +7 -4
- package/src/ts/lambda-function/schema.json +15 -7
- package/src/ts/lib/__snapshots__/generator.spec.ts.snap +32 -65
- package/src/ts/lib/__snapshots__/vitest.spec.ts.snap +24 -0
- package/src/ts/lib/biome.d.ts +7 -0
- package/src/ts/lib/biome.js +58 -0
- package/src/ts/lib/biome.js.map +1 -0
- package/src/ts/lib/generator.d.ts +3 -3
- package/src/ts/lib/generator.js +27 -29
- package/src/ts/lib/generator.js.map +1 -1
- package/src/ts/lib/grit/vitest-pass-with-no-tests.grit +1 -1
- package/src/ts/lib/ts-project-utils.d.ts +12 -2
- package/src/ts/lib/ts-project-utils.js +30 -10
- package/src/ts/lib/ts-project-utils.js.map +1 -1
- package/src/ts/lib/vitest.d.ts +2 -2
- package/src/ts/lib/vitest.js +1 -1
- package/src/ts/lib/vitest.js.map +1 -1
- package/src/ts/mcp-server/__snapshots__/generator.spec.ts.snap +4 -4
- package/src/ts/mcp-server/generator.d.ts +3 -3
- package/src/ts/mcp-server/generator.js +46 -24
- package/src/ts/mcp-server/generator.js.map +1 -1
- package/src/ts/mcp-server/schema.d.ts +5 -9
- package/src/ts/mcp-server/schema.json +15 -15
- package/src/ts/nx-generator/__snapshots__/generator.spec.ts.snap +20 -15
- package/src/ts/nx-generator/files/nx-plugin-for-aws/generator/generator.spec.ts.template +1 -1
- package/src/ts/nx-generator/generator.d.ts +2 -2
- package/src/ts/nx-generator/generator.js +23 -19
- package/src/ts/nx-generator/generator.js.map +1 -1
- package/src/ts/nx-plugin/generator.d.ts +3 -3
- package/src/ts/nx-plugin/generator.js +12 -11
- package/src/ts/nx-plugin/generator.js.map +1 -1
- package/src/ts/nx-plugin/utils.d.ts +1 -1
- package/src/ts/nx-plugin/utils.js +10 -4
- package/src/ts/nx-plugin/utils.js.map +1 -1
- package/src/ts/rdb/__snapshots__/generator.spec.ts.snap +120 -60
- package/src/ts/rdb/agent-connection/generator.d.ts +3 -3
- package/src/ts/rdb/agent-connection/generator.js +4 -4
- package/src/ts/rdb/agent-connection/generator.js.map +1 -1
- package/src/ts/rdb/files/prisma.config.ts.template +1 -1
- package/src/ts/rdb/files/scripts/pull-image.ts.template +15 -0
- package/src/ts/rdb/files/scripts/{docker-start.ts.template → start-container.ts.template} +24 -24
- package/src/ts/rdb/files/scripts/wait-for-db.ts.template +3 -3
- package/src/ts/rdb/files/src/create-db-user-handler.ts.template +2 -2
- package/src/ts/rdb/files/src/migration-handler.ts.template +2 -2
- package/src/ts/rdb/files/src/prisma.ts.template +2 -2
- package/src/ts/rdb/generator.d.ts +3 -3
- package/src/ts/rdb/generator.js +103 -82
- package/src/ts/rdb/generator.js.map +1 -1
- package/src/ts/rdb/mcp-server-connection/generator.d.ts +3 -3
- package/src/ts/rdb/mcp-server-connection/generator.js +4 -4
- package/src/ts/rdb/mcp-server-connection/generator.js.map +1 -1
- package/src/ts/rdb/schema.d.ts +5 -5
- package/src/ts/rdb/schema.json +13 -13
- package/src/ts/rdb/smithy-connection/generator.d.ts +3 -3
- package/src/ts/rdb/smithy-connection/generator.js +4 -4
- package/src/ts/rdb/smithy-connection/generator.js.map +1 -1
- package/src/ts/rdb/trpc-connection/files/src/middleware/__rdbNameKebab__.ts.template +1 -1
- package/src/ts/rdb/trpc-connection/generator.d.ts +3 -3
- package/src/ts/rdb/trpc-connection/generator.js +3 -3
- package/src/ts/rdb/trpc-connection/generator.js.map +1 -1
- package/src/ts/rdb/utils.d.ts +1 -1
- package/src/ts/react-website/agui/files/common/src/hooks/useAgui__agentNameClassName__.tsx.template +9 -9
- package/src/ts/react-website/agui/generator.d.ts +3 -3
- package/src/ts/react-website/agui/generator.js +13 -13
- package/src/ts/react-website/agui/generator.js.map +1 -1
- package/src/ts/react-website/app/__snapshots__/generator.spec.ts.snap +423 -386
- package/src/ts/react-website/app/files/app/cloudscape/src/components/AppLayout/index.tsx.template +5 -5
- package/src/ts/react-website/app/files/app/cloudscape/src/main.tsx.template +1 -1
- package/src/ts/react-website/app/files/app/cloudscape/src/styles.css.template +1 -1
- package/src/ts/react-website/app/files/app/none/src/components/AppLayout/index.tsx.template +5 -5
- package/src/ts/react-website/app/files/app/none/src/main.tsx.template +1 -1
- package/src/ts/react-website/app/files/app/none/src/styles.css.template +2 -2
- package/src/ts/react-website/app/files/app/shadcn/src/components/AppLayout/index.tsx.template +6 -6
- package/src/ts/react-website/app/files/app/shadcn/src/main.tsx.template +1 -1
- package/src/ts/react-website/app/generator.d.ts +6 -6
- package/src/ts/react-website/app/generator.js +124 -114
- package/src/ts/react-website/app/generator.js.map +1 -1
- package/src/ts/react-website/app/schema.d.ts +9 -6
- package/src/ts/react-website/app/schema.json +13 -13
- package/src/ts/react-website/cognito-auth/__snapshots__/generator.spec.ts.snap +1 -7
- package/src/ts/react-website/cognito-auth/__snapshots__/generator.terraform.spec.ts.snap +3 -3
- package/src/ts/react-website/cognito-auth/__snapshots__/generator.ux-provider.spec.ts.snap +3 -23
- package/src/ts/react-website/cognito-auth/generator.d.ts +3 -3
- package/src/ts/react-website/cognito-auth/generator.js +19 -22
- package/src/ts/react-website/cognito-auth/generator.js.map +1 -1
- package/src/ts/react-website/cognito-auth/grit/cloudscape-auth-menu.grit +8 -6
- package/src/ts/react-website/cognito-auth/grit/cognito-auth-wrapper.grit +1 -1
- package/src/ts/react-website/cognito-auth/grit/none-auth-menu.grit +1 -0
- package/src/ts/react-website/cognito-auth/grit/shadcn-auth-menu.grit +3 -1
- package/src/ts/react-website/cognito-auth/grit/shadcn-state-declarations.grit +3 -1
- package/src/ts/react-website/cognito-auth/schema.d.ts +2 -2
- package/src/ts/react-website/cognito-auth/schema.json +4 -4
- package/src/ts/react-website/cognito-auth/utils.d.ts +1 -1
- package/src/ts/react-website/cognito-auth/utils.js +1 -1
- package/src/ts/react-website/cognito-auth/utils.js.map +1 -1
- package/src/ts/react-website/runtime-config/generator.d.ts +3 -3
- package/src/ts/react-website/runtime-config/generator.js +4 -4
- package/src/ts/react-website/runtime-config/generator.js.map +1 -1
- package/src/ts/sync/generator.d.ts +3 -3
- package/src/ts/sync/generator.js +2 -2
- package/src/ts/sync/generator.js.map +1 -1
- package/src/ts/website/app/generator.d.ts +3 -3
- package/src/ts/website/app/generator.js +1 -1
- package/src/ts/website/app/generator.js.map +1 -1
- package/src/ts/website/app/schema.d.ts +8 -6
- package/src/ts/website/app/schema.json +21 -13
- package/src/ts/website/auth/generator.d.ts +3 -3
- package/src/ts/website/auth/generator.js +2 -2
- package/src/ts/website/auth/generator.js.map +1 -1
- package/src/ts/website/auth/schema.d.ts +2 -2
- package/src/ts/website/auth/schema.json +4 -4
- package/src/utils/agent-connection/agent-connection.d.ts +1 -1
- package/src/utils/agent-connection/agent-connection.js +17 -11
- package/src/utils/agent-connection/agent-connection.js.map +1 -1
- package/src/utils/agent-connection/files/core-runtime-config/model-errors.ts.template +36 -0
- package/src/utils/agent-connection/files/py-core-runtime-config/model_errors.py.template +40 -0
- package/src/utils/agent-core-constructs/agent-core-constructs.d.ts +10 -10
- package/src/utils/agent-core-constructs/agent-core-constructs.js +14 -24
- 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 +13 -13
- package/src/utils/agent-core-constructs/files/terraform/app/agent-core/__nameKebabCase__/__nameKebabCase__.tf.template +4 -4
- package/src/utils/agent-core-constructs/files/terraform/core/agent-core/runtime.tf.template +5 -5
- package/src/utils/api-constructs/api-constructs.d.ts +4 -4
- package/src/utils/api-constructs/api-constructs.js +5 -7
- package/src/utils/api-constructs/api-constructs.js.map +1 -1
- package/src/utils/api-constructs/files/cdk/app/apis/http/__apiNameKebabCase__.ts.template +12 -12
- package/src/utils/api-constructs/files/cdk/app/apis/rest/__apiNameKebabCase__.ts.template +12 -12
- package/src/utils/api-constructs/files/terraform/app/apis/http/__apiNameKebabCase__/__apiNameKebabCase__.tf.template +7 -7
- package/src/utils/api-constructs/files/terraform/app/apis/rest/__apiNameKebabCase__/__apiNameKebabCase__.tf.template +10 -10
- package/src/utils/api-constructs/open-api-metadata.d.ts +4 -4
- package/src/utils/api-constructs/open-api-metadata.js +2 -2
- package/src/utils/api-constructs/open-api-metadata.js.map +1 -1
- package/src/utils/ast/website.d.ts +5 -1
- package/src/utils/ast/website.js +3 -3
- package/src/utils/ast/website.js.map +1 -1
- package/src/utils/ast.d.ts +33 -1
- package/src/utils/ast.js +89 -4
- package/src/utils/ast.js.map +1 -1
- package/src/utils/bundle/bundle.d.ts +1 -1
- package/src/utils/bundle/bundle.js +2 -2
- package/src/utils/bundle/bundle.js.map +1 -1
- package/src/utils/commands.d.ts +1 -1
- package/src/utils/commands.js +2 -2
- package/src/utils/commands.js.map +1 -1
- package/src/utils/config/__snapshots__/utils.spec.ts.snap +6 -6
- package/src/utils/config/index.d.ts +5 -5
- package/src/utils/config/utils.d.ts +13 -3
- package/src/utils/config/utils.js +37 -5
- package/src/utils/config/utils.js.map +1 -1
- package/src/utils/connection/open-api/files/components/__apiNameClassName__Provider.tsx.template +7 -7
- package/src/utils/connection/open-api/react.d.ts +2 -2
- package/src/utils/connection/open-api/react.js +7 -7
- package/src/utils/connection/open-api/react.js.map +1 -1
- package/src/utils/containers.d.ts +6 -6
- package/src/utils/containers.js +6 -6
- package/src/utils/containers.js.map +1 -1
- package/src/utils/dynamodb-constructs/dynamodb-constructs.d.ts +18 -0
- package/src/utils/dynamodb-constructs/dynamodb-constructs.js +49 -0
- package/src/utils/dynamodb-constructs/dynamodb-constructs.js.map +1 -0
- package/src/utils/dynamodb-constructs/files/cdk/app/dynamodb/__nameKebabCase__.ts.template +30 -0
- package/src/utils/dynamodb-constructs/files/cdk/core/dynamodb.ts.template +105 -0
- package/src/utils/dynamodb-constructs/files/terraform/app/dynamodb/__nameKebabCase__/__nameKebabCase__.tf.template +65 -0
- package/src/utils/dynamodb-constructs/files/terraform/core/dynamodb/dynamodb.tf.template +155 -0
- package/src/utils/format.d.ts +45 -2
- package/src/utils/format.js +167 -46
- package/src/utils/format.js.map +1 -1
- package/src/utils/fs.d.ts +1 -1
- package/src/utils/fs.js.map +1 -1
- package/src/utils/function-constructs/files/cdk/app/lambda-functions/{__functionNameKebabCase__.ts.template → __nameKebabCase__.ts.template} +1 -1
- package/src/utils/function-constructs/files/terraform/app/lambda-functions/{__functionNameKebabCase__/__functionNameKebabCase__.tf.template → __nameKebabCase__/__nameKebabCase__.tf.template} +7 -7
- package/src/utils/function-constructs/function-constructs.d.ts +5 -5
- package/src/utils/function-constructs/function-constructs.js +6 -8
- package/src/utils/function-constructs/function-constructs.js.map +1 -1
- package/src/utils/generators.d.ts +4 -0
- package/src/utils/generators.js +4 -4
- package/src/utils/generators.js.map +1 -1
- package/src/utils/git.d.ts +1 -1
- package/src/utils/git.js.map +1 -1
- package/src/utils/iac-providers.d.ts +3 -3
- package/src/utils/iac-providers.js +1 -1
- package/src/utils/iac.d.ts +3 -3
- package/src/utils/iac.js +6 -6
- package/src/utils/iac.js.map +1 -1
- package/src/utils/identity-constructs/files/cdk/core/user-identity.ts.template +1 -5
- package/src/utils/identity-constructs/files/terraform/core/user-identity/identity/identity.tf.template +2 -4
- package/src/utils/identity-constructs/identity-constructs.d.ts +3 -3
- package/src/utils/identity-constructs/identity-constructs.js +4 -4
- package/src/utils/identity-constructs/identity-constructs.js.map +1 -1
- package/src/utils/js.d.ts +4 -0
- package/src/utils/js.js +4 -4
- package/src/utils/js.js.map +1 -1
- package/src/utils/mcp.d.ts +25 -0
- package/src/utils/mcp.js +81 -0
- package/src/utils/mcp.js.map +1 -0
- package/src/utils/metrics.d.ts +9 -3
- package/src/utils/metrics.js +58 -28
- package/src/utils/metrics.js.map +1 -1
- package/src/utils/npm-scope.d.ts +1 -1
- package/src/utils/npm-scope.js.map +1 -1
- package/src/utils/nx.d.ts +7 -2
- package/src/utils/nx.js +46 -14
- package/src/utils/nx.js.map +1 -1
- package/src/utils/nxlv-python.d.ts +1 -1
- package/src/utils/paths.d.ts +1 -1
- package/src/utils/pnpm-workspace.d.ts +1 -1
- package/src/utils/pnpm-workspace.js.map +1 -1
- package/src/utils/port.d.ts +30 -3
- package/src/utils/port.js +72 -4
- package/src/utils/port.js.map +1 -1
- package/src/utils/py.d.ts +2 -2
- package/src/utils/py.js +13 -6
- package/src/utils/py.js.map +1 -1
- package/src/utils/rdb-constructs/files/cdk/core/rdb/aurora.ts.template +30 -1
- package/src/utils/rdb-constructs/files/terraform/core/rdb/aurora/aurora.tf.template +18 -9
- package/src/utils/rdb-constructs/rdb-constructs.d.ts +5 -5
- package/src/utils/rdb-constructs/rdb-constructs.js +7 -17
- package/src/utils/rdb-constructs/rdb-constructs.js.map +1 -1
- package/src/utils/shared-constructs.d.ts +3 -3
- package/src/utils/shared-constructs.js +10 -10
- package/src/utils/shared-constructs.js.map +1 -1
- package/src/utils/shared-infra-config.d.ts +1 -1
- package/src/utils/shared-infra-config.js +1 -1
- package/src/utils/shared-infra-config.js.map +1 -1
- package/src/utils/shared-scripts.d.ts +1 -1
- package/src/utils/shared-scripts.js +2 -2
- package/src/utils/shared-scripts.js.map +1 -1
- package/src/utils/shared-shadcn.d.ts +1 -1
- package/src/utils/shared-shadcn.js +1 -13
- package/src/utils/shared-shadcn.js.map +1 -1
- package/src/utils/test.d.ts +5 -1
- package/src/utils/test.js +9 -5
- package/src/utils/test.js.map +1 -1
- package/src/utils/toml.d.ts +1 -1
- package/src/utils/toml.js +4 -0
- package/src/utils/toml.js.map +1 -1
- package/src/utils/versions.d.ts +68 -72
- package/src/utils/versions.js +67 -71
- package/src/utils/versions.js.map +1 -1
- package/src/utils/website-constructs/files/cdk/core/static-website.ts.template +52 -5
- package/src/utils/website-constructs/files/terraform/core/static-website/static-website.tf.template +38 -11
- package/src/utils/website-constructs/website-constructs.d.ts +3 -3
- package/src/utils/website-constructs/website-constructs.js +5 -7
- package/src/utils/website-constructs/website-constructs.js.map +1 -1
- package/src/ts/lib/eslint.d.ts +0 -14
- package/src/ts/lib/eslint.js +0 -90
- package/src/ts/lib/eslint.js.map +0 -1
- package/src/ts/lib/grit/eslint-dependency-checks-warn.grit +0 -1
- /package/src/ts/{rdb/files/scripts/docker-pull.ts.template → dynamodb/files/scripts/pull-image.ts.template} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../packages/nx-plugin/src/ts/lambda-function/generator.ts"],"names":[],"mappings":";;;;AAAA;;;GAGG;AACH,uCASoB;
|
|
1
|
+
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../packages/nx-plugin/src/ts/lambda-function/generator.ts"],"names":[],"mappings":";;;;AAAA;;;GAGG;AACH,uCASoB;AACpB,gFAAyC;AACzC,sDAAsE;A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E;QAC1C,yCAAiC;KAClC,CAAC,CAAC;IAEH,MAAM,IAAA,6BAAoB,EAAC,IAAI,CAAC,CAAC;IAEjC,OAAO,GAAG,EAAE;QACV,IAAA,4BAAmB,EAAC,IAAI,CAAC,CAAC;IAC5B,CAAC,CAAC;AACJ,CAAC,CAAC;AA9IW,QAAA,yBAAyB,6BA8IpC;AAEF,kBAAe,iCAAyB,CAAC"}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import {
|
|
6
|
+
import { IacOption } from '../../utils/iac';
|
|
7
7
|
|
|
8
8
|
export type EventSource =
|
|
9
9
|
| 'Any'
|
|
@@ -49,10 +49,13 @@ export type EventSource =
|
|
|
49
49
|
| 'VpcLatticeSchema'
|
|
50
50
|
| 'VpcLatticeV2Schema';
|
|
51
51
|
|
|
52
|
+
export type LambdaInfraOption = 'lambda' | 'none';
|
|
53
|
+
|
|
52
54
|
export interface TsLambdaFunctionGeneratorSchema {
|
|
53
55
|
readonly project: string;
|
|
54
|
-
readonly
|
|
56
|
+
readonly name: string;
|
|
55
57
|
readonly functionPath?: string;
|
|
56
|
-
readonly
|
|
57
|
-
readonly
|
|
58
|
+
readonly event?: EventSource;
|
|
59
|
+
readonly infra?: LambdaInfraOption;
|
|
60
|
+
readonly iac: IacOption;
|
|
58
61
|
}
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"x-prompt": "Select the project to add the lambda function to",
|
|
12
12
|
"x-dropdown": "projects"
|
|
13
13
|
},
|
|
14
|
-
"
|
|
14
|
+
"name": {
|
|
15
15
|
"type": "string",
|
|
16
16
|
"description": "The name of the function to add",
|
|
17
17
|
"$default": {
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"description": "Optional subdirectory within the project source directory to add the function to",
|
|
27
27
|
"x-prompt": "Enter the path within the project source directory to add the function to (e.g. 'lambda-functions/')"
|
|
28
28
|
},
|
|
29
|
-
"
|
|
29
|
+
"event": {
|
|
30
30
|
"type": "string",
|
|
31
31
|
"description": "Optional event source schema to use for the lambda function",
|
|
32
32
|
"x-priority": "important",
|
|
@@ -77,14 +77,22 @@
|
|
|
77
77
|
"default": "Any",
|
|
78
78
|
"x-prompt": "Enter the event source schema to use for the lambda function"
|
|
79
79
|
},
|
|
80
|
-
"
|
|
80
|
+
"infra": {
|
|
81
|
+
"type": "string",
|
|
82
|
+
"description": "The type of infrastructure to deploy your Lambda function with.",
|
|
83
|
+
"enum": ["lambda", "none"],
|
|
84
|
+
"default": "lambda",
|
|
85
|
+
"x-priority": "important",
|
|
86
|
+
"x-prompt": "What infrastructure would you like to deploy your Lambda function with?"
|
|
87
|
+
},
|
|
88
|
+
"iac": {
|
|
81
89
|
"type": "string",
|
|
82
90
|
"description": "The preferred IaC provider. By default this is inherited from your initial selection.",
|
|
83
|
-
"enum": ["
|
|
91
|
+
"enum": ["inherit", "cdk", "terraform"],
|
|
84
92
|
"x-priority": "important",
|
|
85
|
-
"default": "
|
|
86
|
-
"x-prompt": "Which provider would you like to manage your infrastructure? (default:
|
|
93
|
+
"default": "inherit",
|
|
94
|
+
"x-prompt": "Which provider would you like to manage your infrastructure? (default: inherit)"
|
|
87
95
|
}
|
|
88
96
|
},
|
|
89
|
-
"required": ["project", "
|
|
97
|
+
"required": ["project", "name"]
|
|
90
98
|
}
|
|
@@ -13,17 +13,6 @@ exports[`ts lib generator > should configure named inputs in nx.json 1`] = `
|
|
|
13
13
|
"lint": {
|
|
14
14
|
"cache": true
|
|
15
15
|
},
|
|
16
|
-
"@nx/eslint:lint": {
|
|
17
|
-
"cache": true,
|
|
18
|
-
"inputs": [
|
|
19
|
-
"default",
|
|
20
|
-
"^default",
|
|
21
|
-
"{workspaceRoot}/.eslintrc.json",
|
|
22
|
-
"{workspaceRoot}/.eslintignore",
|
|
23
|
-
"{workspaceRoot}/eslint.config.mjs",
|
|
24
|
-
"{workspaceRoot}/tools/eslint-rules/**/*"
|
|
25
|
-
]
|
|
26
|
-
},
|
|
27
16
|
"@nx/vitest:test": {
|
|
28
17
|
"cache": true,
|
|
29
18
|
"inputs": ["default", "^default"],
|
|
@@ -43,11 +32,7 @@ exports[`ts lib generator > should configure named inputs in nx.json 1`] = `
|
|
|
43
32
|
}
|
|
44
33
|
},
|
|
45
34
|
"namedInputs": {
|
|
46
|
-
"
|
|
47
|
-
"default",
|
|
48
|
-
"{workspaceRoot}/eslint.config.mjs",
|
|
49
|
-
"{projectRoot}/eslint.config.mjs"
|
|
50
|
-
],
|
|
35
|
+
"biome": ["default", "{workspaceRoot}/biome.json"],
|
|
51
36
|
"default": [
|
|
52
37
|
{
|
|
53
38
|
"dependentTasksOutputFiles": "**/*",
|
|
@@ -87,6 +72,9 @@ exports[`ts lib generator > should generate library with custom directory > cust
|
|
|
87
72
|
"sourceRoot": "libs/test-lib/src",
|
|
88
73
|
"projectType": "library",
|
|
89
74
|
"tags": [],
|
|
75
|
+
"metadata": {
|
|
76
|
+
"generator": "ts#project"
|
|
77
|
+
},
|
|
90
78
|
"targets": {
|
|
91
79
|
"build": {
|
|
92
80
|
"dependsOn": ["lint", "compile", "test"]
|
|
@@ -100,15 +88,18 @@ exports[`ts lib generator > should generate library with custom directory > cust
|
|
|
100
88
|
}
|
|
101
89
|
},
|
|
102
90
|
"lint": {
|
|
103
|
-
"executor": "
|
|
91
|
+
"executor": "nx:run-commands",
|
|
104
92
|
"cache": true,
|
|
105
|
-
"inputs": ["
|
|
93
|
+
"inputs": ["biome"],
|
|
94
|
+
"options": {
|
|
95
|
+
"command": "biome lint {projectRoot}"
|
|
96
|
+
},
|
|
106
97
|
"configurations": {
|
|
107
98
|
"fix": {
|
|
108
|
-
"
|
|
99
|
+
"command": "biome check --write {projectRoot}"
|
|
109
100
|
},
|
|
110
101
|
"skip-lint": {
|
|
111
|
-
"
|
|
102
|
+
"command": "node -e \\"\\""
|
|
112
103
|
}
|
|
113
104
|
}
|
|
114
105
|
},
|
|
@@ -119,9 +110,6 @@ exports[`ts lib generator > should generate library with custom directory > cust
|
|
|
119
110
|
"reportsDirectory": "{workspaceRoot}/coverage/{projectRoot}"
|
|
120
111
|
}
|
|
121
112
|
}
|
|
122
|
-
},
|
|
123
|
-
"metadata": {
|
|
124
|
-
"generator": "ts#project"
|
|
125
113
|
}
|
|
126
114
|
}
|
|
127
115
|
"
|
|
@@ -145,34 +133,7 @@ exports[`ts lib generator > should generate library with custom directory > cust
|
|
|
145
133
|
"
|
|
146
134
|
`;
|
|
147
135
|
|
|
148
|
-
exports[`ts lib generator > should generate library with default options > eslint.config.mjs 1`] = `
|
|
149
|
-
"import baseConfig from '../eslint.config.mjs';
|
|
150
|
-
|
|
151
|
-
export default [
|
|
152
|
-
...baseConfig,
|
|
153
|
-
{
|
|
154
|
-
files: ['**/*.json'],
|
|
155
|
-
rules: {
|
|
156
|
-
'@nx/dependency-checks': [
|
|
157
|
-
'warn',
|
|
158
|
-
{
|
|
159
|
-
ignoredFiles: [
|
|
160
|
-
'{projectRoot}/eslint.config.{js,cjs,mjs,ts,cts,mts}',
|
|
161
|
-
'{projectRoot}/vitest.config.{js,ts,mjs,mts}',
|
|
162
|
-
],
|
|
163
|
-
},
|
|
164
|
-
],
|
|
165
|
-
},
|
|
166
|
-
languageOptions: {
|
|
167
|
-
parser: await import('jsonc-eslint-parser'),
|
|
168
|
-
},
|
|
169
|
-
},
|
|
170
|
-
{
|
|
171
|
-
ignores: ['**/out-tsc'],
|
|
172
|
-
},
|
|
173
|
-
];
|
|
174
|
-
"
|
|
175
|
-
`;
|
|
136
|
+
exports[`ts lib generator > should generate library with default options > eslint.config.mjs 1`] = `null`;
|
|
176
137
|
|
|
177
138
|
exports[`ts lib generator > should generate library with default options > index.ts 1`] = `
|
|
178
139
|
"// Export your library code here
|
|
@@ -186,6 +147,9 @@ exports[`ts lib generator > should generate library with default options > proje
|
|
|
186
147
|
"sourceRoot": "test-lib/src",
|
|
187
148
|
"projectType": "library",
|
|
188
149
|
"tags": [],
|
|
150
|
+
"metadata": {
|
|
151
|
+
"generator": "ts#project"
|
|
152
|
+
},
|
|
189
153
|
"targets": {
|
|
190
154
|
"build": {
|
|
191
155
|
"dependsOn": ["lint", "compile", "test"]
|
|
@@ -199,15 +163,18 @@ exports[`ts lib generator > should generate library with default options > proje
|
|
|
199
163
|
}
|
|
200
164
|
},
|
|
201
165
|
"lint": {
|
|
202
|
-
"executor": "
|
|
166
|
+
"executor": "nx:run-commands",
|
|
203
167
|
"cache": true,
|
|
204
|
-
"inputs": ["
|
|
168
|
+
"inputs": ["biome"],
|
|
169
|
+
"options": {
|
|
170
|
+
"command": "biome lint {projectRoot}"
|
|
171
|
+
},
|
|
205
172
|
"configurations": {
|
|
206
173
|
"fix": {
|
|
207
|
-
"
|
|
174
|
+
"command": "biome check --write {projectRoot}"
|
|
208
175
|
},
|
|
209
176
|
"skip-lint": {
|
|
210
|
-
"
|
|
177
|
+
"command": "node -e \\"\\""
|
|
211
178
|
}
|
|
212
179
|
}
|
|
213
180
|
},
|
|
@@ -218,9 +185,6 @@ exports[`ts lib generator > should generate library with default options > proje
|
|
|
218
185
|
"reportsDirectory": "{workspaceRoot}/coverage/{projectRoot}"
|
|
219
186
|
}
|
|
220
187
|
}
|
|
221
|
-
},
|
|
222
|
-
"metadata": {
|
|
223
|
-
"generator": "ts#project"
|
|
224
188
|
}
|
|
225
189
|
}
|
|
226
190
|
"
|
|
@@ -256,6 +220,9 @@ exports[`ts lib generator > should generate library with subdirectory > subdir-p
|
|
|
256
220
|
"sourceRoot": "feature/test-lib/src",
|
|
257
221
|
"projectType": "library",
|
|
258
222
|
"tags": [],
|
|
223
|
+
"metadata": {
|
|
224
|
+
"generator": "ts#project"
|
|
225
|
+
},
|
|
259
226
|
"targets": {
|
|
260
227
|
"build": {
|
|
261
228
|
"dependsOn": ["lint", "compile", "test"]
|
|
@@ -269,15 +236,18 @@ exports[`ts lib generator > should generate library with subdirectory > subdir-p
|
|
|
269
236
|
}
|
|
270
237
|
},
|
|
271
238
|
"lint": {
|
|
272
|
-
"executor": "
|
|
239
|
+
"executor": "nx:run-commands",
|
|
273
240
|
"cache": true,
|
|
274
|
-
"inputs": ["
|
|
241
|
+
"inputs": ["biome"],
|
|
242
|
+
"options": {
|
|
243
|
+
"command": "biome lint {projectRoot}"
|
|
244
|
+
},
|
|
275
245
|
"configurations": {
|
|
276
246
|
"fix": {
|
|
277
|
-
"
|
|
247
|
+
"command": "biome check --write {projectRoot}"
|
|
278
248
|
},
|
|
279
249
|
"skip-lint": {
|
|
280
|
-
"
|
|
250
|
+
"command": "node -e \\"\\""
|
|
281
251
|
}
|
|
282
252
|
}
|
|
283
253
|
},
|
|
@@ -288,9 +258,6 @@ exports[`ts lib generator > should generate library with subdirectory > subdir-p
|
|
|
288
258
|
"reportsDirectory": "{workspaceRoot}/coverage/{projectRoot}"
|
|
289
259
|
}
|
|
290
260
|
}
|
|
291
|
-
},
|
|
292
|
-
"metadata": {
|
|
293
|
-
"generator": "ts#project"
|
|
294
261
|
}
|
|
295
262
|
}
|
|
296
263
|
"
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
|
2
|
+
|
|
3
|
+
exports[`vitest utils > should generate a valid vitest.config.mts without a double comma > vitest.config.mts 1`] = `
|
|
4
|
+
"import { defineConfig } from 'vitest/config';
|
|
5
|
+
|
|
6
|
+
export default defineConfig(() => ({
|
|
7
|
+
root: __dirname,
|
|
8
|
+
cacheDir: '../node_modules/.vite/test',
|
|
9
|
+
test: {
|
|
10
|
+
passWithNoTests: true,
|
|
11
|
+
name: '@proj/test',
|
|
12
|
+
watch: false,
|
|
13
|
+
globals: true,
|
|
14
|
+
environment: 'jsdom',
|
|
15
|
+
include: ['{src,tests}/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'],
|
|
16
|
+
reporters: ['default'],
|
|
17
|
+
coverage: {
|
|
18
|
+
reportsDirectory: './test-output/vitest/coverage',
|
|
19
|
+
provider: 'v8' as const,
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
}));
|
|
23
|
+
"
|
|
24
|
+
`;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*/
|
|
5
|
+
import { type Tree } from '@nx/devkit';
|
|
6
|
+
import type { ConfigureProjectOptions } from './types';
|
|
7
|
+
export declare const configureBiomeLint: (tree: Tree, options: ConfigureProjectOptions) => Promise<void>;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.configureBiomeLint = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
6
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
7
|
+
*/
|
|
8
|
+
const devkit_1 = require("@nx/devkit");
|
|
9
|
+
const nx_1 = require("../../utils/nx");
|
|
10
|
+
const object_1 = require("../../utils/object");
|
|
11
|
+
const configureBiomeLint = async (tree, options) => {
|
|
12
|
+
const projectJson = (0, nx_1.readProjectConfigurationUnqualified)(tree, options.fullyQualifiedName);
|
|
13
|
+
// When there's no root Biome configuration (eg the user removed it), make the
|
|
14
|
+
// lint target a no-op rather than failing on a missing config.
|
|
15
|
+
const lintTarget = tree.exists('biome.json')
|
|
16
|
+
? {
|
|
17
|
+
executor: 'nx:run-commands',
|
|
18
|
+
cache: true,
|
|
19
|
+
inputs: ['biome'],
|
|
20
|
+
options: {
|
|
21
|
+
command: 'biome lint {projectRoot}',
|
|
22
|
+
},
|
|
23
|
+
configurations: {
|
|
24
|
+
fix: {
|
|
25
|
+
command: 'biome check --write {projectRoot}',
|
|
26
|
+
},
|
|
27
|
+
'skip-lint': {
|
|
28
|
+
// Cross-platform no-op (`true` is not available on Windows cmd).
|
|
29
|
+
command: 'node -e ""',
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
}
|
|
33
|
+
: { executor: 'nx:noop' };
|
|
34
|
+
(0, devkit_1.updateProjectConfiguration)(tree, options.fullyQualifiedName, {
|
|
35
|
+
...projectJson,
|
|
36
|
+
// Sort targets so the lint target lands in a deterministic position
|
|
37
|
+
// regardless of whether it already existed (keeps re-runs stable)
|
|
38
|
+
targets: (0, object_1.sortObjectKeys)({
|
|
39
|
+
...projectJson?.targets,
|
|
40
|
+
lint: lintTarget,
|
|
41
|
+
}),
|
|
42
|
+
});
|
|
43
|
+
// Register the `biome` named input so lint targets are cache-invalidated when
|
|
44
|
+
// the root biome.json changes.
|
|
45
|
+
const nxJson = (0, devkit_1.readNxJson)(tree);
|
|
46
|
+
if (!nxJson.namedInputs?.biome ||
|
|
47
|
+
!nxJson.namedInputs.biome.includes('{workspaceRoot}/biome.json')) {
|
|
48
|
+
(0, devkit_1.updateNxJson)(tree, {
|
|
49
|
+
...nxJson,
|
|
50
|
+
namedInputs: {
|
|
51
|
+
...nxJson.namedInputs,
|
|
52
|
+
biome: ['default', '{workspaceRoot}/biome.json'],
|
|
53
|
+
},
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
exports.configureBiomeLint = configureBiomeLint;
|
|
58
|
+
//# sourceMappingURL=biome.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"biome.js","sourceRoot":"","sources":["../../../../../../packages/nx-plugin/src/ts/lib/biome.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACH,uCAKoB;AACpB,uCAAqE;AACrE,+CAAoD;AAG7C,MAAM,kBAAkB,GAAG,KAAK,EACrC,IAAU,EACV,OAAgC,EAChC,EAAE;IACF,MAAM,WAAW,GAAG,IAAA,wCAAmC,EACrD,IAAI,EACJ,OAAO,CAAC,kBAAkB,CAC3B,CAAC;IAEF,8EAA8E;IAC9E,+DAA+D;IAC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4
4
|
*/
|
|
5
|
-
import { GeneratorCallback, Tree } from '@nx/devkit';
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
5
|
+
import { type GeneratorCallback, type Tree } from '@nx/devkit';
|
|
6
|
+
import { type NxGeneratorInfo } from '../../utils/nx';
|
|
7
|
+
import type { TsProjectGeneratorSchema } from './schema';
|
|
8
8
|
export declare const TS_LIB_GENERATOR_INFO: NxGeneratorInfo;
|
|
9
9
|
export interface TsLibDetails {
|
|
10
10
|
/**
|
package/src/ts/lib/generator.js
CHANGED
|
@@ -7,18 +7,14 @@ exports.tsProjectGenerator = exports.getTsLibDetails = exports.TS_LIB_GENERATOR_
|
|
|
7
7
|
*/
|
|
8
8
|
const devkit_1 = require("@nx/devkit");
|
|
9
9
|
const js_1 = require("@nx/js");
|
|
10
|
-
const npm_scope_1 = require("../../utils/npm-scope");
|
|
11
|
-
const ts_project_utils_1 = require("./ts-project-utils");
|
|
12
|
-
const names_1 = require("../../utils/names");
|
|
13
10
|
const format_1 = require("../../utils/format");
|
|
14
|
-
const pkg_manager_1 = require("../../utils/pkg-manager");
|
|
15
|
-
const object_1 = require("../../utils/object");
|
|
16
|
-
const nx_1 = require("../../utils/nx");
|
|
17
11
|
const metrics_1 = require("../../utils/metrics");
|
|
18
|
-
const
|
|
19
|
-
const
|
|
20
|
-
const
|
|
21
|
-
const
|
|
12
|
+
const names_1 = require("../../utils/names");
|
|
13
|
+
const npm_scope_1 = require("../../utils/npm-scope");
|
|
14
|
+
const nx_1 = require("../../utils/nx");
|
|
15
|
+
const object_1 = require("../../utils/object");
|
|
16
|
+
const pkg_manager_1 = require("../../utils/pkg-manager");
|
|
17
|
+
const ts_project_utils_1 = require("./ts-project-utils");
|
|
22
18
|
exports.TS_LIB_GENERATOR_INFO = (0, nx_1.getGeneratorInfo)(__filename);
|
|
23
19
|
/**
|
|
24
20
|
* Returns details about the TS library to be created
|
|
@@ -37,23 +33,27 @@ exports.getTsLibDetails = getTsLibDetails;
|
|
|
37
33
|
*/
|
|
38
34
|
const tsProjectGenerator = async (tree, schema) => {
|
|
39
35
|
const { fullyQualifiedName, dir } = (0, exports.getTsLibDetails)(tree, schema);
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
36
|
+
// Only scaffold the project on first run; on re-run skip creation so user
|
|
37
|
+
// edits are preserved, but continue to (re)apply the configuration below.
|
|
38
|
+
if (!(0, nx_1.projectExists)(tree, fullyQualifiedName)) {
|
|
39
|
+
await (0, js_1.libraryGenerator)(tree, {
|
|
40
|
+
...schema,
|
|
41
|
+
name: fullyQualifiedName,
|
|
42
|
+
directory: dir,
|
|
43
|
+
skipPackageJson: true,
|
|
44
|
+
bundler: 'tsc', // TODO: consider supporting others
|
|
45
|
+
linter: 'none',
|
|
46
|
+
unitTestRunner: 'vitest',
|
|
47
|
+
});
|
|
48
|
+
// Replace with simpler sample source code
|
|
49
|
+
tree.delete((0, devkit_1.joinPathFragments)(dir, 'src'));
|
|
50
|
+
(0, devkit_1.generateFiles)(tree, (0, devkit_1.joinPathFragments)(__dirname, 'files'), (0, devkit_1.joinPathFragments)(dir), {
|
|
51
|
+
fullyQualifiedName,
|
|
52
|
+
pkgMgrCmd: (0, pkg_manager_1.getPackageManagerDisplayCommands)().exec,
|
|
53
|
+
}, {
|
|
54
|
+
overwriteStrategy: devkit_1.OverwriteStrategy.KeepExisting,
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
57
|
await (0, ts_project_utils_1.configureTsProject)(tree, {
|
|
58
58
|
dir,
|
|
59
59
|
fullyQualifiedName,
|
|
@@ -140,8 +140,6 @@ const tsProjectGenerator = async (tree, schema) => {
|
|
|
140
140
|
];
|
|
141
141
|
return nxJson;
|
|
142
142
|
});
|
|
143
|
-
// change error to warn for the @nx/dependency-checks rule
|
|
144
|
-
await (0, ast_1.applyGritQL)(tree, (0, devkit_1.joinPathFragments)(dir, 'eslint.config.mjs'), readGritPattern('eslint-dependency-checks-warn'));
|
|
145
143
|
await (0, metrics_1.addGeneratorMetricsIfApplicable)(tree, [exports.TS_LIB_GENERATOR_INFO]);
|
|
146
144
|
await (0, format_1.formatFilesInSubtree)(tree);
|
|
147
145
|
return () => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../packages/nx-plugin/src/ts/lib/generator.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACH,uCAWoB;
|
|
1
|
+
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../packages/nx-plugin/src/ts/lib/generator.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACH,uCAWoB;AACpB,+BAA0C;AAC1C,+CAA0D;AAC1D,iDAAsE;AACtE,6CAAgD;AAChD,qDAA0D;AAC1D,uCAKwB;AACxB,+CAAoD;AACpD,yDAA2E;AAE3E,yDAAwD;AAE3C,QAAA,qBAAqB,GAChC,IAAA,qBAAgB,EAAC,UAAU,CAAC,CAAC;AAa/B;;GAEG;AACI,MAAM,eAAe,GAAG,CAC7B,IAAU,EACV,MAAgC,EAClB,EAAE;IAChB,MAAM,KAAK,GAAG,IAAA,6BAAiB,EAAC,IAAI,CAAC,CAAC;IACtC,MAAM,cAAc,GAAG,IAAA,mBAAW,EAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAChD,MAAM,kBAAkB,GAAG,GAAG,KAAK,GAAG,cAAc,EAAE,CAAC;IACvD,yDAAyD;IACzD,MAAM,GAAG,GAAG,IAAA,0BAAiB,EAC3B,MAAM,CAAC,SAAS,IAAI,GAAG,EACvB,MAAM,CAAC,YAAY,IAAI,cAAc,CACtC,CAAC;IACF,OAAO,EAAE,GAAG,EAAE,kBAAkB,EAAE,CAAC;AACrC,CAAC,CAAC;AAb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M,CAAC;IAChB,CAAC,CAAC,CAAC;IAEH,MAAM,IAAA,yCAA+B,EAAC,IAAI,EAAE,CAAC,6BAAqB,CAAC,CAAC,CAAC;IAErE,MAAM,IAAA,6BAAoB,EAAC,IAAI,CAAC,CAAC;IAEjC,OAAO,GAAG,EAAE;QACV,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC;YACxB,IAAA,4BAAmB,EAAC,IAAI,CAAC,CAAC;QAC5B,CAAC;IACH,CAAC,CAAC;AACJ,CAAC,CAAC;AAxJW,QAAA,kBAAkB,sBAwJ7B;AACF,kBAAe,0BAAkB,CAAC"}
|
|
@@ -2,9 +2,19 @@
|
|
|
2
2
|
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
3
|
* SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
*/
|
|
5
|
-
import { Tree } from '@nx/devkit';
|
|
6
|
-
import { ConfigureProjectOptions } from './types';
|
|
5
|
+
import { type Tree } from '@nx/devkit';
|
|
6
|
+
import type { ConfigureProjectOptions } from './types';
|
|
7
|
+
interface TsConfigReference {
|
|
8
|
+
path: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Merges new TypeScript project references into existing ones, deduplicating by
|
|
12
|
+
* path and preserving the order of existing references so re-running a
|
|
13
|
+
* generator neither duplicates nor reorders references.
|
|
14
|
+
*/
|
|
15
|
+
export declare const mergeTsReferences: (existing: TsConfigReference[] | undefined, toAdd: TsConfigReference[]) => TsConfigReference[];
|
|
7
16
|
/**
|
|
8
17
|
* Updates typescript projects
|
|
9
18
|
*/
|
|
10
19
|
export declare const configureTsProject: (tree: Tree, options: ConfigureProjectOptions) => Promise<void>;
|
|
20
|
+
export {};
|
|
@@ -1,15 +1,33 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.configureTsProject = void 0;
|
|
3
|
+
exports.configureTsProject = exports.mergeTsReferences = void 0;
|
|
4
4
|
/**
|
|
5
5
|
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
6
6
|
* SPDX-License-Identifier: Apache-2.0
|
|
7
7
|
*/
|
|
8
8
|
const devkit_1 = require("@nx/devkit");
|
|
9
9
|
const path_1 = require("path");
|
|
10
|
+
const config_1 = require("../../license/config");
|
|
10
11
|
const npm_scope_1 = require("../../utils/npm-scope");
|
|
12
|
+
const biome_1 = require("./biome");
|
|
11
13
|
const vitest_1 = require("./vitest");
|
|
12
|
-
|
|
14
|
+
/**
|
|
15
|
+
* Merges new TypeScript project references into existing ones, deduplicating by
|
|
16
|
+
* path and preserving the order of existing references so re-running a
|
|
17
|
+
* generator neither duplicates nor reorders references.
|
|
18
|
+
*/
|
|
19
|
+
const mergeTsReferences = (existing, toAdd) => {
|
|
20
|
+
const references = [...(existing ?? [])];
|
|
21
|
+
const existingPaths = new Set(references.map((ref) => ref.path));
|
|
22
|
+
for (const ref of toAdd) {
|
|
23
|
+
if (!existingPaths.has(ref.path)) {
|
|
24
|
+
references.push(ref);
|
|
25
|
+
existingPaths.add(ref.path);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
return references;
|
|
29
|
+
};
|
|
30
|
+
exports.mergeTsReferences = mergeTsReferences;
|
|
13
31
|
/**
|
|
14
32
|
* Updates typescript projects
|
|
15
33
|
*/
|
|
@@ -60,13 +78,10 @@ const configureTsProject = async (tree, options) => {
|
|
|
60
78
|
if (tree.exists('tsconfig.json')) {
|
|
61
79
|
(0, devkit_1.updateJson)(tree, 'tsconfig.json', (tsConfig) => ({
|
|
62
80
|
...tsConfig,
|
|
63
|
-
references
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
path: `./${options.dir}`,
|
|
68
|
-
},
|
|
69
|
-
],
|
|
81
|
+
// Add project references, deduplicating and preserving existing order
|
|
82
|
+
references: (0, exports.mergeTsReferences)(tsConfig.references, [
|
|
83
|
+
{ path: `./${options.dir}` },
|
|
84
|
+
]),
|
|
70
85
|
}));
|
|
71
86
|
}
|
|
72
87
|
// Update the root package.json
|
|
@@ -78,8 +93,13 @@ const configureTsProject = async (tree, options) => {
|
|
|
78
93
|
if (tree.exists((0, path_1.join)(options.dir, 'package.json'))) {
|
|
79
94
|
tree.delete((0, path_1.join)(options.dir, 'package.json'));
|
|
80
95
|
}
|
|
81
|
-
await (0,
|
|
96
|
+
await (0, biome_1.configureBiomeLint)(tree, options);
|
|
82
97
|
await (0, vitest_1.configureVitest)(tree, options);
|
|
98
|
+
// If license checking is configured, make this project's lint target depend
|
|
99
|
+
// on the root license-check target. No-op if there's no license-check target
|
|
100
|
+
// (i.e. the license generator hasn't run); the license generator wires up
|
|
101
|
+
// existing projects itself, so this works regardless of generator order.
|
|
102
|
+
(0, config_1.addLicenseCheckToLintTarget)(tree, options.fullyQualifiedName);
|
|
83
103
|
};
|
|
84
104
|
exports.configureTsProject = configureTsProject;
|
|
85
105
|
//# sourceMappingURL=ts-project-utils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ts-project-utils.js","sourceRoot":"","sources":["../../../../../../packages/nx-plugin/src/ts/lib/ts-project-utils.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACH,
|
|
1
|
+
{"version":3,"file":"ts-project-utils.js","sourceRoot":"","sources":["../../../../../../packages/nx-plugin/src/ts/lib/ts-project-utils.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACH,uCAAsE;AACtE,+BAAsC;AACtC,iDAAmE;AACnE,qDAAqD;AACrD,mCAA6C;AAE7C,qCAA2C;AAM3C;;;;GAIG;AACI,MAAM,iBAAiB,GAAG,CAC/B,QAAyC,EACzC,KAA0B,EACL,EAAE;IACvB,MAAM,UAAU,GAAG,CAAC,GAAG,CAAC,QAAQ,IAAI,EAAE,CAAC,CAAC,CAAC;IACzC,MAAM,aAAa,GAAG,IAAI,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,G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,sEAAsE;YACtE,UAAU,EAAE,IAAA,yBAAiB,EAAC,QAAQ,CAAC,UAAU,EAAE;gBACjD,EAAE,IAAI,EAAE,KAAK,OAAO,CAAC,GAAG,EAAE,EAAE;aAC7B,CAAC;SACH,CAAC,CAAC,CAAC;IACN,CAAC;IACD,+BAA+B;IAC/B,IAAA,mBAAU,EAAC,IAAI,EAAE,cAAc,EAAE,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;QACjD,GAAG,WAAW;QACd,IAAI,EAAE,QAAQ;KACf,CAAC,CAAC,CAAC;IACJ,mCAAmC;IACnC,IAAI,IAAI,CAAC,MAAM,CAAC,IAAA,WAAI,EAAC,OAAO,CAAC,GAAG,EAAE,cAAc,CAAC,CAAC,EAAE,CAAC;QACnD,IAAI,CAAC,MAAM,CAAC,IAAA,WAAI,EAAC,OAAO,CAAC,GAAG,EAAE,cAAc,CAAC,CAAC,CAAC;IACjD,CAAC;IAED,MAAM,IAAA,0BAAkB,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IACxC,MAAM,IAAA,wBAAe,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAErC,4EAA4E;IAC5E,6EAA6E;IAC7E,0EAA0E;IAC1E,yEAAyE;IACzE,IAAA,oCAA2B,EAAC,IAAI,EAAE,OAAO,CAAC,kBAAkB,CAAC,CAAC;AAChE,CAAC,CAAC;AAlFW,QAAA,kBAAkB,sBAkF7B"}
|
package/src/ts/lib/vitest.d.ts
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
3
|
* SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
*/
|
|
5
|
-
import { Tree } from '@nx/devkit';
|
|
6
|
-
import { ConfigureProjectOptions } from './types';
|
|
5
|
+
import { type Tree } from '@nx/devkit';
|
|
6
|
+
import type { ConfigureProjectOptions } from './types';
|
|
7
7
|
export declare const configureVitest: (tree: Tree, options: ConfigureProjectOptions) => Promise<void>;
|
package/src/ts/lib/vitest.js
CHANGED
|
@@ -6,10 +6,10 @@ exports.configureVitest = void 0;
|
|
|
6
6
|
* SPDX-License-Identifier: Apache-2.0
|
|
7
7
|
*/
|
|
8
8
|
const devkit_1 = require("@nx/devkit");
|
|
9
|
+
const fs_1 = require("fs");
|
|
9
10
|
const path_1 = require("path");
|
|
10
11
|
const ast_1 = require("../../utils/ast");
|
|
11
12
|
const versions_1 = require("../../utils/versions");
|
|
12
|
-
const fs_1 = require("fs");
|
|
13
13
|
const readGritPattern = (name) => (0, fs_1.readFileSync)((0, path_1.join)(__dirname, 'grit', `${name}.grit`), 'utf-8').trim();
|
|
14
14
|
const configureVitest = async (tree, options) => {
|
|
15
15
|
// Find vitest.config.mts or vite.config.mts
|