@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
|
@@ -35,53 +35,53 @@
|
|
|
35
35
|
"description": "The sub directory the project is placed in. By default this is the project name.",
|
|
36
36
|
"x-prompt": "Which sub directory do you want to create the project in? (By default this is the project name)"
|
|
37
37
|
},
|
|
38
|
-
"
|
|
38
|
+
"ux": {
|
|
39
39
|
"type": "string",
|
|
40
40
|
"description": "The preferred UX provider.",
|
|
41
|
-
"enum": ["
|
|
41
|
+
"enum": ["none", "cloudscape", "shadcn"],
|
|
42
42
|
"x-priority": "important",
|
|
43
|
-
"default": "
|
|
43
|
+
"default": "cloudscape",
|
|
44
44
|
"x-prompt": {
|
|
45
45
|
"message": "Which UX provider should we scaffold for this app?",
|
|
46
46
|
"type": "list",
|
|
47
47
|
"items": [
|
|
48
48
|
{
|
|
49
|
-
"value": "
|
|
49
|
+
"value": "none",
|
|
50
50
|
"label": "None (plain React/Vite without a UI kit)"
|
|
51
51
|
},
|
|
52
52
|
{
|
|
53
|
-
"value": "
|
|
53
|
+
"value": "cloudscape",
|
|
54
54
|
"label": "Cloudscape (AWS-first components with ready-made layouts)"
|
|
55
55
|
},
|
|
56
56
|
{
|
|
57
|
-
"value": "
|
|
57
|
+
"value": "shadcn",
|
|
58
58
|
"label": "Shadcn (shared UI library under packages/common/shadcn)"
|
|
59
59
|
}
|
|
60
60
|
],
|
|
61
|
-
"default": "
|
|
61
|
+
"default": "cloudscape"
|
|
62
62
|
}
|
|
63
63
|
},
|
|
64
|
-
"
|
|
64
|
+
"tailwind": {
|
|
65
65
|
"description": "Enable TailwindCSS for utility-first styling.",
|
|
66
66
|
"type": "boolean",
|
|
67
67
|
"default": true,
|
|
68
68
|
"x-priority": "important",
|
|
69
69
|
"x-prompt": "Would you like to enable TailwindCSS for additional styling capabilities?"
|
|
70
70
|
},
|
|
71
|
-
"
|
|
71
|
+
"tanstackRouter": {
|
|
72
72
|
"description": "Enable Tanstack router for type-safe routing.",
|
|
73
73
|
"type": "boolean",
|
|
74
74
|
"default": true,
|
|
75
75
|
"x-priority": "important",
|
|
76
76
|
"x-prompt": "Would you like to enable Tanstack Router for type-safe routing?"
|
|
77
77
|
},
|
|
78
|
-
"
|
|
78
|
+
"iac": {
|
|
79
79
|
"type": "string",
|
|
80
80
|
"description": "The preferred IaC provider. By default this is inherited from your initial selection.",
|
|
81
|
-
"enum": ["
|
|
81
|
+
"enum": ["inherit", "cdk", "terraform"],
|
|
82
82
|
"x-priority": "important",
|
|
83
|
-
"default": "
|
|
84
|
-
"x-prompt": "Which provider would you like to manage your infrastructure? (default:
|
|
83
|
+
"default": "inherit",
|
|
84
|
+
"x-prompt": "Which provider would you like to manage your infrastructure? (default: inherit)"
|
|
85
85
|
}
|
|
86
86
|
},
|
|
87
87
|
"required": ["name"],
|
|
@@ -216,11 +216,7 @@ export class UserIdentity extends Construct {
|
|
|
216
216
|
private createUserPoolClient = (userPool: UserPool) => {
|
|
217
217
|
const lazilyComputedCallbackUrls = Lazy.list({
|
|
218
218
|
produce: () =>
|
|
219
|
-
[
|
|
220
|
-
'http://localhost:4200',
|
|
221
|
-
'http://localhost:4300',
|
|
222
|
-
\`https://\${Stack.of(this).region}.console.aws.amazon.com\`,
|
|
223
|
-
].concat(
|
|
219
|
+
['http://localhost:4200', 'http://localhost:4300'].concat(
|
|
224
220
|
this.findCloudFrontDistributions().map(
|
|
225
221
|
(d) => \`https://\${d.domainName}\`,
|
|
226
222
|
),
|
|
@@ -281,8 +277,6 @@ export class UserIdentity extends Construct {
|
|
|
281
277
|
"
|
|
282
278
|
`;
|
|
283
279
|
|
|
284
|
-
exports[`cognito-auth generator > should not be able to run the generator multiple times 1`] = `[Error: This generator has already been run on test-project.]`;
|
|
285
|
-
|
|
286
280
|
exports[`cognito-auth generator > should update main.tsx when RuntimeConfigProvider exists > main-tsx-with-runtime-config 1`] = `
|
|
287
281
|
"import CognitoAuth from './components/CognitoAuth';
|
|
288
282
|
import { RuntimeConfigProvider } from './components/RuntimeConfig';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
|
2
2
|
|
|
3
|
-
exports[`cognito-auth generator terraform
|
|
3
|
+
exports[`cognito-auth generator terraform iac > should generate terraform files for cognito auth and snapshot them > terraform-cognito-auth-files 1`] = `
|
|
4
4
|
{
|
|
5
5
|
"add-callback-url.tf": "terraform {
|
|
6
6
|
required_providers {
|
|
@@ -179,7 +179,7 @@ output "user_pool_domain" {
|
|
|
179
179
|
}
|
|
180
180
|
`;
|
|
181
181
|
|
|
182
|
-
exports[`cognito-auth generator terraform
|
|
182
|
+
exports[`cognito-auth generator terraform iac > should place add-callback-url module directly after cloudfront distribution resource > complex-static-website-with-callback-url 1`] = `
|
|
183
183
|
"
|
|
184
184
|
# Some initial resources
|
|
185
185
|
resource "aws_s3_bucket" "website" {
|
|
@@ -249,7 +249,7 @@ output "website_bucket_name" {
|
|
|
249
249
|
"
|
|
250
250
|
`;
|
|
251
251
|
|
|
252
|
-
exports[`cognito-auth generator terraform
|
|
252
|
+
exports[`cognito-auth generator terraform iac > should update static-website.tf with add-callback-url module > static-website-with-callback-url 1`] = `
|
|
253
253
|
"
|
|
254
254
|
module "static_website" {
|
|
255
255
|
source = "../../../core/static-website"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
|
|
2
2
|
|
|
3
|
-
exports[`cognito-auth generator
|
|
3
|
+
exports[`cognito-auth generator ux tests > Cloudscape > should update AppLayout > app-layout-with-auth 1`] = `
|
|
4
4
|
"import { useAuth } from 'react-oidc-context';
|
|
5
5
|
import * as React from 'react';
|
|
6
6
|
import { createContext, useCallback, useEffect, useState } from 'react';
|
|
@@ -177,7 +177,7 @@ export default AppLayout;
|
|
|
177
177
|
"
|
|
178
178
|
`;
|
|
179
179
|
|
|
180
|
-
exports[`cognito-auth generator
|
|
180
|
+
exports[`cognito-auth generator ux tests > None > should update AppLayout > app-layout-with-auth 1`] = `
|
|
181
181
|
"import { useAuth } from 'react-oidc-context';
|
|
182
182
|
import * as React from 'react';
|
|
183
183
|
|
|
@@ -286,26 +286,6 @@ const AppLayout: React.FC<React.PropsWithChildren> = ({ children }) => {
|
|
|
286
286
|
Sign out
|
|
287
287
|
</button>
|
|
288
288
|
</div>
|
|
289
|
-
<div className="user-greeting">
|
|
290
|
-
<span>Hi, {\`\${user?.profile?.['cognito:username']}\`}</span>
|
|
291
|
-
<button
|
|
292
|
-
type="button"
|
|
293
|
-
className="signout-link"
|
|
294
|
-
onClick={() => {
|
|
295
|
-
removeUser();
|
|
296
|
-
signoutRedirect({
|
|
297
|
-
post_logout_redirect_uri: window.location.origin,
|
|
298
|
-
extraQueryParams: {
|
|
299
|
-
redirect_uri: window.location.origin,
|
|
300
|
-
response_type: 'code',
|
|
301
|
-
},
|
|
302
|
-
});
|
|
303
|
-
clearStaleState();
|
|
304
|
-
}}
|
|
305
|
-
>
|
|
306
|
-
Sign out
|
|
307
|
-
</button>
|
|
308
|
-
</div>
|
|
309
289
|
</div>
|
|
310
290
|
</header>
|
|
311
291
|
<main className="app-main">
|
|
@@ -332,7 +312,7 @@ export default AppLayout;
|
|
|
332
312
|
"
|
|
333
313
|
`;
|
|
334
314
|
|
|
335
|
-
exports[`cognito-auth generator
|
|
315
|
+
exports[`cognito-auth generator ux tests > Shadcn > should update AppLayout > app-layout-with-auth 1`] = `
|
|
336
316
|
"import { useEffect, useRef, useState } from 'react';
|
|
337
317
|
import { useAuth } from 'react-oidc-context';
|
|
338
318
|
import * as React from 'react';
|
|
@@ -2,9 +2,9 @@
|
|
|
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 {
|
|
7
|
-
import {
|
|
5
|
+
import { type Tree } from '@nx/devkit';
|
|
6
|
+
import { type NxGeneratorInfo } from '../../../utils/nx';
|
|
7
|
+
import type { TsReactWebsiteAuthGeneratorSchema } from './schema';
|
|
8
8
|
export declare const COGNITO_AUTH_GENERATOR_INFO: NxGeneratorInfo;
|
|
9
9
|
export declare function tsReactWebsiteAuthGenerator(tree: Tree, options: TsReactWebsiteAuthGeneratorSchema): Promise<() => void>;
|
|
10
10
|
export default tsReactWebsiteAuthGenerator;
|
|
@@ -7,41 +7,38 @@ exports.tsReactWebsiteAuthGenerator = tsReactWebsiteAuthGenerator;
|
|
|
7
7
|
* SPDX-License-Identifier: Apache-2.0
|
|
8
8
|
*/
|
|
9
9
|
const devkit_1 = require("@nx/devkit");
|
|
10
|
-
const shared_constructs_1 = require("../../../utils/shared-constructs");
|
|
11
|
-
const generator_1 = require("../runtime-config/generator");
|
|
12
|
-
const versions_1 = require("../../../utils/versions");
|
|
13
|
-
const ast_1 = require("../../../utils/ast");
|
|
14
10
|
const fs_1 = require("fs");
|
|
15
11
|
const path_1 = require("path");
|
|
16
|
-
const
|
|
17
|
-
const nx_1 = require("../../../utils/nx");
|
|
18
|
-
const metrics_1 = require("../../../utils/metrics");
|
|
12
|
+
const ast_1 = require("../../../utils/ast");
|
|
19
13
|
const website_1 = require("../../../utils/ast/website");
|
|
20
|
-
const
|
|
14
|
+
const format_1 = require("../../../utils/format");
|
|
21
15
|
const iac_1 = require("../../../utils/iac");
|
|
22
|
-
const
|
|
23
|
-
const
|
|
16
|
+
const identity_constructs_1 = require("../../../utils/identity-constructs/identity-constructs");
|
|
17
|
+
const metrics_1 = require("../../../utils/metrics");
|
|
24
18
|
const npm_scope_1 = require("../../../utils/npm-scope");
|
|
19
|
+
const nx_1 = require("../../../utils/nx");
|
|
20
|
+
const paths_1 = require("../../../utils/paths");
|
|
21
|
+
const shared_constructs_1 = require("../../../utils/shared-constructs");
|
|
22
|
+
const versions_1 = require("../../../utils/versions");
|
|
23
|
+
const generator_1 = require("../runtime-config/generator");
|
|
24
|
+
const utils_1 = require("./utils");
|
|
25
25
|
const readGritPattern = (name) => (0, fs_1.readFileSync)((0, path_1.join)(__dirname, 'grit', `${name}.grit`), 'utf-8').trim();
|
|
26
26
|
exports.COGNITO_AUTH_GENERATOR_INFO = (0, nx_1.getGeneratorInfo)(__filename);
|
|
27
27
|
async function tsReactWebsiteAuthGenerator(tree, options) {
|
|
28
28
|
const projectConfig = (0, nx_1.readProjectConfigurationUnqualified)(tree, options.project);
|
|
29
29
|
const srcRoot = projectConfig.sourceRoot;
|
|
30
|
-
if (tree.exists((0, devkit_1.joinPathFragments)(srcRoot, 'components/CognitoAuth/index.tsx'))) {
|
|
31
|
-
throw new Error(`This generator has already been run on ${options.project}.`);
|
|
32
|
-
}
|
|
33
30
|
const cognitoDomain = options.cognitoDomain && options.cognitoDomain.length > 0
|
|
34
31
|
? options.cognitoDomain
|
|
35
32
|
: (0, utils_1.deriveCognitoDomainPrefix)((0, npm_scope_1.getNpmScope)(tree), projectConfig.name);
|
|
36
33
|
await (0, generator_1.runtimeConfigGenerator)(tree, {
|
|
37
34
|
project: options.project,
|
|
38
35
|
});
|
|
39
|
-
const
|
|
36
|
+
const iac = await (0, iac_1.resolveIac)(tree, options.iac);
|
|
40
37
|
await (0, shared_constructs_1.sharedConstructsGenerator)(tree, {
|
|
41
|
-
|
|
38
|
+
iac,
|
|
42
39
|
});
|
|
43
40
|
await (0, identity_constructs_1.addIdentityInfra)(tree, {
|
|
44
|
-
|
|
41
|
+
iac,
|
|
45
42
|
allowSignup: options.allowSignup,
|
|
46
43
|
cognitoDomain,
|
|
47
44
|
});
|
|
@@ -57,7 +54,7 @@ async function tsReactWebsiteAuthGenerator(tree, options) {
|
|
|
57
54
|
contextProp: 'auth',
|
|
58
55
|
});
|
|
59
56
|
const projectConfiguration = (0, nx_1.readProjectConfigurationUnqualified)(tree, options.project);
|
|
60
|
-
const
|
|
57
|
+
const ux = (projectConfiguration.metadata?.ux ?? 'cloudscape').toLowerCase();
|
|
61
58
|
await (0, ast_1.applyGritQL)(tree, mainTsxPath, readGritPattern('cognito-auth-wrapper'));
|
|
62
59
|
// Update App Layout
|
|
63
60
|
const appLayoutTsxPath = (0, devkit_1.joinPathFragments)(srcRoot, 'components', 'AppLayout', 'index.tsx');
|
|
@@ -66,18 +63,18 @@ async function tsReactWebsiteAuthGenerator(tree, options) {
|
|
|
66
63
|
await (0, ast_1.applyGritQL)(tree, appLayoutTsxPath, readGritPattern('app-layout-use-auth'));
|
|
67
64
|
// TODO: update utils if they exist by appending to the array
|
|
68
65
|
// Add a top-level navigation menu that shows the signed-in user's profile and actions
|
|
69
|
-
switch (
|
|
70
|
-
case '
|
|
66
|
+
switch (ux) {
|
|
67
|
+
case 'cloudscape':
|
|
71
68
|
await (0, utils_1.addCloudscapeAuthMenu)(tree, appLayoutTsxPath);
|
|
72
69
|
break;
|
|
73
|
-
case '
|
|
70
|
+
case 'shadcn':
|
|
74
71
|
await (0, utils_1.addShadcnAuthMenu)(tree, appLayoutTsxPath);
|
|
75
72
|
break;
|
|
76
|
-
case '
|
|
73
|
+
case 'none':
|
|
77
74
|
await (0, utils_1.addNoneAuthMenu)(tree, appLayoutTsxPath);
|
|
78
75
|
break;
|
|
79
76
|
default:
|
|
80
|
-
throw new Error(`Top-level navigation menu to show the signed-in user for
|
|
77
|
+
throw new Error(`Top-level navigation menu to show the signed-in user for ux "${ux}" is not implemented.`);
|
|
81
78
|
}
|
|
82
79
|
}
|
|
83
80
|
else {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../../packages/nx-plugin/src/ts/react-website/cognito-auth/generator.ts"],"names":[],"mappings":";;;AAiDA,
|
|
1
|
+
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../../packages/nx-plugin/src/ts/react-website/cognito-auth/generator.ts"],"names":[],"mappings":";;;AAiDA,kEAmIC;AApLD;;;GAGG;AACH,uCAOoB;AACpB,2BAAkC;AAClC,+BAA4B;AAC5B,4CAI4B;AAC5B,wDAAkF;AAClF,kDAA6D;AAC7D,4CAAgD;AAChD,gGAA0F;AAC1F,oDAAyE;AACzE,wDAAuD;AACvD,0CAK2B;AAC3B,gDAA6D;AAC7D,wEAA6E;AAC7E,sDAAuD;AACvD,2DAAqE;AAErE,mCAKiB;AAEjB,MAAM,eAAe,GAAG,CAAC,IAAY,EAAU,EAAE,CAC/C,IAAA,iBAAY,EAAC,IAAA,WAAI,EAAC,SAAS,EAAE,MAAM,EAAE,GAAG,IAAI,OAAO,CAAC,EAAE,OAAO,CAAC,CAAC,IAAI,EAAE,CAAC;AAE3D,QAAA,2B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C;gBAC9C,MAAM;YACR;gBACE,MAAM,IAAI,KAAK,CACb,gEAAgE,EAAE,uBAAuB,CAC1F,CAAC;QACN,CAAC;IACH,CAAC;SAAM,CAAC;QACN,OAAO,CAAC,IAAI,CACV,sBAAsB,gBAAgB,wBAAwB,CAC/D,CAAC;IACJ,CAAC;IACD,wBAAwB;IAExB,IAAA,kCAA6B,EAC3B,IAAI,EACJ,OAAO,CAAC,OAAO,EACf,mCAA2B,EAC3B,IAAA,6BAAqB,EACnB,aAAa,EACb,IAAA,0BAAiB,EAAC,OAAO,EAAE,YAAY,EAAE,aAAa,CAAC,CACxD,CACF,CAAC;IAEF,MAAM,IAAA,yCAA+B,EAAC,IAAI,EAAE,CAAC,mCAA2B,CAAC,CAAC,CAAC;IAE3E,MAAM,IAAA,6BAAoB,EAAC,IAAI,CAAC,CAAC;IACjC,OAAO,GAAG,EAAE;QACV,IAAA,4BAAmB,EAAC,IAAI,CAAC,CAAC;IAC5B,CAAC,CAAC;AACJ,CAAC;AACD,kBAAe,2BAA2B,CAAC"}
|
|
@@ -1,19 +1,21 @@
|
|
|
1
1
|
`<TopNavigation $attrs />` => raw`<TopNavigation $attrs utilities={[{
|
|
2
|
-
type:
|
|
2
|
+
type: 'menu-dropdown',
|
|
3
3
|
text: \`\${user?.profile?.['cognito:username']}\`,
|
|
4
|
-
iconName:
|
|
4
|
+
iconName: 'user-profile-active',
|
|
5
5
|
onItemClick: (e) => {
|
|
6
|
-
if (e.detail.id ===
|
|
6
|
+
if (e.detail.id === 'signout') {
|
|
7
7
|
removeUser();
|
|
8
8
|
signoutRedirect({
|
|
9
9
|
post_logout_redirect_uri: window.location.origin,
|
|
10
10
|
extraQueryParams: {
|
|
11
11
|
redirect_uri: window.location.origin,
|
|
12
|
-
response_type:
|
|
12
|
+
response_type: 'code',
|
|
13
13
|
},
|
|
14
14
|
});
|
|
15
15
|
clearStaleState();
|
|
16
16
|
}
|
|
17
17
|
},
|
|
18
|
-
items: [{ id:
|
|
19
|
-
}]} />`
|
|
18
|
+
items: [{ id: 'signout', text: 'Sign out' }],
|
|
19
|
+
}]} />` where {
|
|
20
|
+
$attrs <: not contains `iconName: 'user-profile-active'`
|
|
21
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
`<header className="app-header">$hbody</header>` => `<header className="app-header">$hbody</header>` where {
|
|
2
|
+
$hbody <: not contains `<button type="button" className="signout-link" $_>$_</button>`,
|
|
2
3
|
$hbody <: contains `<div className="app-header-inner">$inner</div>` => raw`<div className="app-header-inner">$inner
|
|
3
4
|
<div className="user-greeting">
|
|
4
5
|
<span>Hi, {\`\${user?.profile?.['cognito:username']}\`}</span>
|
|
@@ -3,11 +3,11 @@
|
|
|
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 interface TsReactWebsiteAuthGeneratorSchema {
|
|
9
9
|
project: string;
|
|
10
10
|
allowSignup: boolean;
|
|
11
11
|
cognitoDomain?: string;
|
|
12
|
-
|
|
12
|
+
iac: IacOption;
|
|
13
13
|
}
|
|
@@ -37,13 +37,13 @@
|
|
|
37
37
|
"x-prompt": "Enable self signup?",
|
|
38
38
|
"x-priority": "important"
|
|
39
39
|
},
|
|
40
|
-
"
|
|
40
|
+
"iac": {
|
|
41
41
|
"type": "string",
|
|
42
42
|
"description": "The preferred IaC provider. By default this is inherited from your initial selection.",
|
|
43
|
-
"enum": ["
|
|
43
|
+
"enum": ["inherit", "cdk", "terraform"],
|
|
44
44
|
"x-priority": "important",
|
|
45
|
-
"default": "
|
|
46
|
-
"x-prompt": "Which provider would you like to manage your infrastructure? (default:
|
|
45
|
+
"default": "inherit",
|
|
46
|
+
"x-prompt": "Which provider would you like to manage your infrastructure? (default: inherit)"
|
|
47
47
|
}
|
|
48
48
|
},
|
|
49
49
|
"required": ["project"]
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
3
|
* SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
*/
|
|
5
|
-
import { Tree } from '@nx/devkit';
|
|
5
|
+
import type { Tree } from '@nx/devkit';
|
|
6
6
|
export declare const deriveCognitoDomainPrefix: (npmScope: string | undefined, projectName: string) => string;
|
|
7
7
|
export declare function addNoneAuthMenu(tree: Tree, appLayoutTsxPath: string): Promise<void>;
|
|
8
8
|
export declare function addCloudscapeAuthMenu(tree: Tree, appLayoutTsxPath: string): Promise<void>;
|
|
@@ -4,9 +4,9 @@ exports.deriveCognitoDomainPrefix = void 0;
|
|
|
4
4
|
exports.addNoneAuthMenu = addNoneAuthMenu;
|
|
5
5
|
exports.addCloudscapeAuthMenu = addCloudscapeAuthMenu;
|
|
6
6
|
exports.addShadcnAuthMenu = addShadcnAuthMenu;
|
|
7
|
-
const ast_1 = require("../../../utils/ast");
|
|
8
7
|
const fs_1 = require("fs");
|
|
9
8
|
const path_1 = require("path");
|
|
9
|
+
const ast_1 = require("../../../utils/ast");
|
|
10
10
|
const names_1 = require("../../../utils/names");
|
|
11
11
|
const readGritPattern = (name) => (0, fs_1.readFileSync)((0, path_1.join)(__dirname, 'grit', `${name}.grit`), 'utf-8').trim();
|
|
12
12
|
// Leaves room for the IaC suffix (Terraform: `-<12-digit account>-<8-char hex>` = 22 chars) inside Cognito's 63-char limit.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../../../../packages/nx-plugin/src/ts/react-website/cognito-auth/utils.ts"],"names":[],"mappings":";;;AA+CA,0CAEC;AAGD,sDASC;AAED,8CA0BC;AApFD,
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../../../../packages/nx-plugin/src/ts/react-website/cognito-auth/utils.ts"],"names":[],"mappings":";;;AA+CA,0CAEC;AAGD,sDASC;AAED,8CA0BC;AApFD,2BAAkC;AAClC,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CAA+C,CACzJ,CAAC;IACJ,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC;AAzBW,QAAA,yBAAyB,6BAyBpC;AAEF,4GAA4G;AACrG,KAAK,UAAU,eAAe,CAAC,IAAU,EAAE,gBAAwB;IACxE,MAAM,IAAA,iBAAW,EAAC,IAAI,EAAE,gBAAgB,EAAE,eAAe,CAAC,gBAAgB,CAAC,CAAC,CAAC;AAC/E,CAAC;AAED,sFAAsF;AAC/E,KAAK,UAAU,qBAAqB,CACzC,IAAU,EACV,gBAAwB;IAExB,MAAM,IAAA,iBAAW,EACf,IAAI,EACJ,gBAAgB,EAChB,eAAe,CAAC,sBAAsB,CAAC,CACxC,CAAC;AACJ,CAAC;AAEM,KAAK,UAAU,iBAAiB,CAAC,IAAU,EAAE,gBAAwB;IAC1E,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,EAAE,CAAC;QACnC,MAAM,IAAI,KAAK,CAAC,iCAAiC,gBAAgB,EAAE,CAAC,CAAC;IACvE,CAAC;IAED,6DAA6D;IAC7D,MAAM,IAAA,iBAAW,EACf,IAAI,EACJ,gBAAgB,EAChB,eAAe,CAAC,2BAA2B,CAAC,CAC7C,CAAC;IAEF,qDAAqD;IACrD,MAAM,IAAA,2BAAqB,EACzB,IAAI,EACJ,gBAAgB,EAChB,CAAC,WAAW,EAAE,QAAQ,EAAE,UAAU,CAAC,EACnC,OAAO,CACR,CAAC;IAEF,6CAA6C;IAC7C,MAAM,IAAA,iBAAW,EACf,IAAI,EACJ,gBAAgB,EAChB,eAAe,CAAC,kBAAkB,CAAC,CACpC,CAAC;AACJ,CAAC"}
|
|
@@ -2,9 +2,9 @@
|
|
|
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 {
|
|
7
|
-
import {
|
|
5
|
+
import { type Tree } from '@nx/devkit';
|
|
6
|
+
import { type NxGeneratorInfo } from '../../../utils/nx';
|
|
7
|
+
import type { RuntimeConfigGeneratorSchema } from './schema';
|
|
8
8
|
export declare const RUNTIME_CONFIG_GENERATOR_INFO: NxGeneratorInfo;
|
|
9
9
|
export declare function runtimeConfigGenerator(tree: Tree, options: RuntimeConfigGeneratorSchema): Promise<void>;
|
|
10
10
|
export default runtimeConfigGenerator;
|
|
@@ -7,13 +7,13 @@ exports.runtimeConfigGenerator = runtimeConfigGenerator;
|
|
|
7
7
|
* SPDX-License-Identifier: Apache-2.0
|
|
8
8
|
*/
|
|
9
9
|
const devkit_1 = require("@nx/devkit");
|
|
10
|
-
const npm_scope_1 = require("../../../utils/npm-scope");
|
|
11
|
-
const format_1 = require("../../../utils/format");
|
|
12
10
|
const ast_1 = require("../../../utils/ast");
|
|
13
|
-
const
|
|
11
|
+
const website_1 = require("../../../utils/ast/website");
|
|
12
|
+
const format_1 = require("../../../utils/format");
|
|
14
13
|
const metrics_1 = require("../../../utils/metrics");
|
|
14
|
+
const npm_scope_1 = require("../../../utils/npm-scope");
|
|
15
|
+
const nx_1 = require("../../../utils/nx");
|
|
15
16
|
const paths_1 = require("../../../utils/paths");
|
|
16
|
-
const website_1 = require("../../../utils/ast/website");
|
|
17
17
|
exports.RUNTIME_CONFIG_GENERATOR_INFO = (0, nx_1.getGeneratorInfo)(__filename);
|
|
18
18
|
async function runtimeConfigGenerator(tree, options) {
|
|
19
19
|
const projectConfig = (0, nx_1.readProjectConfigurationUnqualified)(tree, options.project);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../../packages/nx-plugin/src/ts/react-website/runtime-config/generator.ts"],"names":[],"mappings":";;;AA2BA,wDAsFC;AAjHD;;;GAGG;AACH,uCAKoB;
|
|
1
|
+
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../../packages/nx-plugin/src/ts/react-website/runtime-config/generator.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IAAA,iBAAW,EACtC,IAAI,EACJ,WAAW,EACX,qDAAqD,CACtD,CAAC;IACF,IAAI,CAAC,cAAc,EAAE,CAAC;QACpB,MAAM,IAAA,qBAAe,EACnB,IAAI,EACJ,WAAW,EACX,uBAAuB,EACvB,4BAA4B,CAC7B,CAAC;QAEF,MAAM,OAAO,GAAG,MAAM,IAAA,iBAAW,EAC/B,IAAI,EACJ,WAAW,EACX,uEAAuE,CACxE,CAAC;QAEF,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,MAAM,IAAI,KAAK,CAAC,8CAA8C,CAAC,CAAC;QAClE,CAAC;IACH,CAAC;IAED,MAAM,IAAA,8CAAoC,EAAC,IAAI,EAAE,WAAW,EAAE;QAC5D,IAAI,EAAE,kBAAkB;QACxB,MAAM,EAAE,0BAA0B;QAClC,WAAW,EAAE,eAAe;KAC7B,CAAC,CAAC;IAEH,IAAA,kCAA6B,EAC3B,IAAI,EACJ,OAAO,CAAC,OAAO,EACf,qCAA6B,EAC7B,IAAA,6BAAqB,EACnB,aAAa,EACb,IAAA,0BAAiB,EAAC,OAAO,EAAE,YAAY,EAAE,eAAe,CAAC,CAC1D,CACF,CAAC;IAEF,MAAM,IAAA,yCAA+B,EAAC,IAAI,EAAE,CAAC,qCAA6B,CAAC,CAAC,CAAC;IAE7E,MAAM,IAAA,6BAAoB,EAAC,IAAI,CAAC,CAAC;AACnC,CAAC;AACD,kBAAe,sBAAsB,CAAC"}
|
|
@@ -2,9 +2,9 @@
|
|
|
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 {
|
|
7
|
-
import {
|
|
5
|
+
import { type Tree } from '@nx/devkit';
|
|
6
|
+
import type { SyncGeneratorResult } from 'nx/src/utils/sync-generators';
|
|
7
|
+
import { type NxGeneratorInfo } from '../../utils/nx';
|
|
8
8
|
export declare const TS_SYNC_GENERATOR_INFO: NxGeneratorInfo;
|
|
9
9
|
export declare const SYNC_GENERATOR_NAME: string;
|
|
10
10
|
export declare const tsSyncGeneratorGenerator: (tree: Tree) => Promise<SyncGeneratorResult>;
|
package/src/ts/sync/generator.js
CHANGED
|
@@ -8,9 +8,9 @@ exports.tsSyncGeneratorGenerator = exports.SYNC_GENERATOR_NAME = exports.TS_SYNC
|
|
|
8
8
|
const tslib_1 = require("tslib");
|
|
9
9
|
const devkit_1 = require("@nx/devkit");
|
|
10
10
|
const path_1 = require("path");
|
|
11
|
-
const nx_1 = require("../../utils/nx");
|
|
12
|
-
const format_1 = require("../../utils/format");
|
|
13
11
|
const package_json_1 = tslib_1.__importDefault(require("../../../package.json"));
|
|
12
|
+
const format_1 = require("../../utils/format");
|
|
13
|
+
const nx_1 = require("../../utils/nx");
|
|
14
14
|
exports.TS_SYNC_GENERATOR_INFO = (0, nx_1.getGeneratorInfo)(__filename);
|
|
15
15
|
exports.SYNC_GENERATOR_NAME = `${package_json_1.default.name}:${exports.TS_SYNC_GENERATOR_INFO.id}`;
|
|
16
16
|
const tsSyncGeneratorGenerator = async (tree) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../packages/nx-plugin/src/ts/sync/generator.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;AAEH,uCAMoB;
|
|
1
|
+
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../packages/nx-plugin/src/ts/sync/generator.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;AAEH,uCAMoB;AAEpB,+BAAgC;AAChC,iFAAgD;AAChD,+CAA0D;AAC1D,uCAAwE;AAE3D,QAAA,sBAAsB,GACjC,IAAA,qBAAgB,EAAC,UAAU,CAAC,CAAC;AAElB,QAAA,mBAAmB,GAAG,GAAG,sBAAW,CAAC,IAAI,IAAI,8BAAsB,CAAC,EAAE,EAAE,CAAC;AAE/E,MAAM,wBAA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AAC,eAAe;gBACvB,KAAK,EAAE,cAAc;aACtB;SACF,CAAC,CAAC,CAAC;IACN,CAAC;IAED,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC;AAC9B,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,qBAAqB,GAAG,CAC5B,eAA6C,EACrC,EAAE,CACV,2GAA2G,MAAM,CAAC,OAAO,CACvH,eAAe,CAChB;KACE,GAAG,CACF,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,EAAE,CACpB,GAAG,MAAM,MAAM,OAAO;KACnB,KAAK,EAAE;KACP,IAAI,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;KAC5D,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,KAAK,KAAK,KAAK,IAAI,GAAG,CAAC;KAChD,IAAI,CAAC,IAAI,CAAC,EAAE,CAClB;KACA,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC"}
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
3
|
* SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
*/
|
|
5
|
-
import { GeneratorCallback, Tree } from '@nx/devkit';
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
5
|
+
import type { GeneratorCallback, Tree } from '@nx/devkit';
|
|
6
|
+
import { type NxGeneratorInfo } from '../../../utils/nx';
|
|
7
|
+
import type { TsWebsiteGeneratorSchema } from './schema';
|
|
8
8
|
export declare const TS_WEBSITE_GENERATOR_INFO: NxGeneratorInfo;
|
|
9
9
|
export declare const tsWebsiteGenerator: (tree: Tree, schema: TsWebsiteGeneratorSchema) => Promise<GeneratorCallback>;
|
|
10
10
|
export default tsWebsiteGenerator;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.tsWebsiteGenerator = exports.TS_WEBSITE_GENERATOR_INFO = void 0;
|
|
4
|
-
const generator_1 = require("../../react-website/app/generator");
|
|
5
4
|
const nx_1 = require("../../../utils/nx");
|
|
5
|
+
const generator_1 = require("../../react-website/app/generator");
|
|
6
6
|
exports.TS_WEBSITE_GENERATOR_INFO = (0, nx_1.getGeneratorInfo)(__filename);
|
|
7
7
|
const tsWebsiteGenerator = async (tree, schema) => {
|
|
8
8
|
const { framework: _framework, ...rest } = schema;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../../packages/nx-plugin/src/ts/website/app/generator.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../../packages/nx-plugin/src/ts/website/app/generator.ts"],"names":[],"mappings":";;;AAKA,0CAA2E;AAC3E,iEAA4E;AAG/D,QAAA,yBAAyB,GACpC,IAAA,qBAAgB,EAAC,UAAU,CAAC,CAAC;AAExB,MAAM,kBAAkB,GAAG,KAAK,EACrC,IAAU,EACV,MAAgC,EACJ,EAAE;IAC9B,MAAM,EAAE,SAAS,EAAE,UAAU,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;IAClD,OAAO,IAAA,mCAAuB,EAAC,IAAI,EAAE,IAAI,CAAC,CAAC;AAC7C,CAAC,CAAC;AANW,QAAA,kBAAkB,sBAM7B;AAEF,kBAAe,0BAAkB,CAAC"}
|
|
@@ -2,10 +2,11 @@
|
|
|
2
2
|
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
3
|
* SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
*/
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { IacOption } from '../../../utils/iac';
|
|
6
|
+
import { UxOption } from '../../react-website/app/generator';
|
|
7
7
|
|
|
8
8
|
export type WebsiteFramework = 'react';
|
|
9
|
+
export type WebsiteInfraOption = 'cloudfront-s3' | 'none';
|
|
9
10
|
|
|
10
11
|
export interface TsWebsiteGeneratorSchema {
|
|
11
12
|
name: string;
|
|
@@ -13,8 +14,9 @@ export interface TsWebsiteGeneratorSchema {
|
|
|
13
14
|
directory?: string;
|
|
14
15
|
subDirectory?: string;
|
|
15
16
|
skipInstall?: boolean;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
tanstackRouter?: boolean;
|
|
18
|
+
tailwind?: boolean;
|
|
19
|
+
ux?: UxOption;
|
|
20
|
+
infra?: WebsiteInfraOption;
|
|
21
|
+
iac: IacOption;
|
|
20
22
|
}
|