@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
|
@@ -40,6 +40,7 @@ export default defineConfig(() => ({
|
|
|
40
40
|
},
|
|
41
41
|
},
|
|
42
42
|
test: {
|
|
43
|
+
passWithNoTests: true,
|
|
43
44
|
name: '@proj/test-app',
|
|
44
45
|
watch: false,
|
|
45
46
|
globals: true,
|
|
@@ -50,7 +51,6 @@ export default defineConfig(() => ({
|
|
|
50
51
|
reportsDirectory: './test-output/vitest/coverage',
|
|
51
52
|
provider: 'v8' as const,
|
|
52
53
|
},
|
|
53
|
-
passWithNoTests: true,
|
|
54
54
|
},
|
|
55
55
|
resolve: { tsconfigPaths: true },
|
|
56
56
|
define: { global: {} },
|
|
@@ -96,6 +96,7 @@ export default defineConfig(() => ({
|
|
|
96
96
|
},
|
|
97
97
|
},
|
|
98
98
|
test: {
|
|
99
|
+
passWithNoTests: true,
|
|
99
100
|
name: '@proj/test-app',
|
|
100
101
|
watch: false,
|
|
101
102
|
globals: true,
|
|
@@ -106,7 +107,6 @@ export default defineConfig(() => ({
|
|
|
106
107
|
reportsDirectory: './test-output/vitest/coverage',
|
|
107
108
|
provider: 'v8' as const,
|
|
108
109
|
},
|
|
109
|
-
passWithNoTests: true,
|
|
110
110
|
},
|
|
111
111
|
resolve: { tsconfigPaths: true },
|
|
112
112
|
define: { global: {} },
|
|
@@ -125,7 +125,7 @@ exports[`react-website generator > TailwindCSS integration > should not include
|
|
|
125
125
|
"
|
|
126
126
|
`;
|
|
127
127
|
|
|
128
|
-
exports[`react-website generator > TailwindCSS integration > terraform
|
|
128
|
+
exports[`react-website generator > TailwindCSS integration > terraform iac > should generate terraform files for static website and snapshot them > terraform-static-website-files 1`] = `
|
|
129
129
|
{
|
|
130
130
|
"static-website.tf": "terraform {
|
|
131
131
|
required_providers {
|
|
@@ -512,13 +512,38 @@ resource "aws_cloudfront_origin_access_control" "website_oac" {
|
|
|
512
512
|
signing_protocol = "sigv4"
|
|
513
513
|
}
|
|
514
514
|
|
|
515
|
+
# Security headers applied to all responses. A Content-Security-Policy is
|
|
516
|
+
# intentionally omitted as it is application specific - add one for your app.
|
|
517
|
+
resource "aws_cloudfront_response_headers_policy" "website" {
|
|
518
|
+
name = "\${aws_s3_bucket.website.bucket}-security-headers"
|
|
519
|
+
|
|
520
|
+
security_headers_config {
|
|
521
|
+
strict_transport_security {
|
|
522
|
+
access_control_max_age_sec = 63072000
|
|
523
|
+
include_subdomains = true
|
|
524
|
+
preload = true
|
|
525
|
+
override = true
|
|
526
|
+
}
|
|
527
|
+
content_type_options {
|
|
528
|
+
override = true
|
|
529
|
+
}
|
|
530
|
+
frame_options {
|
|
531
|
+
frame_option = "DENY"
|
|
532
|
+
override = true
|
|
533
|
+
}
|
|
534
|
+
referrer_policy {
|
|
535
|
+
referrer_policy = "strict-origin-when-cross-origin"
|
|
536
|
+
override = true
|
|
537
|
+
}
|
|
538
|
+
}
|
|
539
|
+
}
|
|
540
|
+
|
|
515
541
|
# CloudFront Distribution
|
|
516
542
|
resource "aws_cloudfront_distribution" "website" {
|
|
517
543
|
#checkov:skip=CKV_AWS_174:Using CloudFront default certificate which does not support TLS v1.2
|
|
518
544
|
#checkov:skip=CKV_AWS_310:Origin failover not required for single S3 origin static website
|
|
519
545
|
#checkov:skip=CKV_AWS_374:Geo restrictions not required for global web application
|
|
520
546
|
#checkov:skip=CKV2_AWS_42:Custom SSL certificate not required for development - using CloudFront default
|
|
521
|
-
#checkov:skip=CKV2_AWS_32:Response headers policy not required for basic static website
|
|
522
547
|
#checkov:skip=CKV2_AWS_47:WAF includes AWSManagedRulesKnownBadInputsRuleSet which provides Log4j protection
|
|
523
548
|
origin {
|
|
524
549
|
domain_name = aws_s3_bucket.website.bucket_regional_domain_name
|
|
@@ -548,11 +573,12 @@ resource "aws_cloudfront_distribution" "website" {
|
|
|
548
573
|
}
|
|
549
574
|
}
|
|
550
575
|
|
|
551
|
-
viewer_protocol_policy
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
576
|
+
viewer_protocol_policy = "redirect-to-https"
|
|
577
|
+
response_headers_policy_id = aws_cloudfront_response_headers_policy.website.id
|
|
578
|
+
min_ttl = 0
|
|
579
|
+
default_ttl = 3600
|
|
580
|
+
max_ttl = 86400
|
|
581
|
+
compress = true
|
|
556
582
|
}
|
|
557
583
|
|
|
558
584
|
# Custom error responses for SPA routing
|
|
@@ -755,11 +781,12 @@ sync_to_s3('\${var.website_file_path}', '\${aws_s3_bucket.website.bucket}')
|
|
|
755
781
|
|
|
756
782
|
# Upload runtime config file
|
|
757
783
|
resource "aws_s3_object" "runtime_config" {
|
|
758
|
-
bucket
|
|
759
|
-
key
|
|
760
|
-
content
|
|
761
|
-
content_type
|
|
762
|
-
|
|
784
|
+
bucket = aws_s3_bucket.website.id
|
|
785
|
+
key = "runtime-config.json"
|
|
786
|
+
content = module.runtime_config_reader.config_json
|
|
787
|
+
content_type = "application/json"
|
|
788
|
+
cache_control = "no-cache"
|
|
789
|
+
etag = md5(module.runtime_config_reader.config_json)
|
|
763
790
|
|
|
764
791
|
depends_on = [null_resource.upload_website_files]
|
|
765
792
|
}
|
|
@@ -905,61 +932,60 @@ vitest.config.*.timestamp*
|
|
|
905
932
|
runtime-config.json"
|
|
906
933
|
`;
|
|
907
934
|
|
|
908
|
-
exports[`react-website generator > Tanstack router integration > should generate website with no router correctly > .prettierrc 1`] = `
|
|
909
|
-
"{ "singleQuote": true }
|
|
910
|
-
"
|
|
911
|
-
`;
|
|
935
|
+
exports[`react-website generator > Tanstack router integration > should generate website with no router correctly > .prettierrc 1`] = `"{"singleQuote":true}"`;
|
|
912
936
|
|
|
913
|
-
exports[`react-website generator > Tanstack router integration > should generate website with no router correctly >
|
|
914
|
-
"
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
{
|
|
923
|
-
ignores: [
|
|
924
|
-
'**/dist',
|
|
925
|
-
'**/out-tsc',
|
|
926
|
-
'**/vite.config.*.timestamp*',
|
|
927
|
-
'**/vitest.config.*.timestamp*',
|
|
928
|
-
],
|
|
937
|
+
exports[`react-website generator > Tanstack router integration > should generate website with no router correctly > biome.json 1`] = `
|
|
938
|
+
"{
|
|
939
|
+
"$schema": "https://biomejs.dev/schemas/2.4.16/schema.json",
|
|
940
|
+
"root": true,
|
|
941
|
+
"formatter": {
|
|
942
|
+
"enabled": true,
|
|
943
|
+
"indentStyle": "space",
|
|
944
|
+
"indentWidth": 2,
|
|
945
|
+
"lineWidth": 80
|
|
929
946
|
},
|
|
930
|
-
{
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
{
|
|
940
|
-
sourceTag: '*',
|
|
941
|
-
onlyDependOnLibsWithTags: ['*'],
|
|
942
|
-
},
|
|
943
|
-
],
|
|
944
|
-
},
|
|
945
|
-
],
|
|
947
|
+
"javascript": {
|
|
948
|
+
"formatter": {
|
|
949
|
+
"quoteStyle": "single",
|
|
950
|
+
"trailingCommas": "all"
|
|
951
|
+
}
|
|
952
|
+
},
|
|
953
|
+
"css": {
|
|
954
|
+
"formatter": {
|
|
955
|
+
"quoteStyle": "single"
|
|
946
956
|
},
|
|
957
|
+
"linter": {
|
|
958
|
+
"enabled": false
|
|
959
|
+
}
|
|
947
960
|
},
|
|
948
|
-
{
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
'**/*.cjs',
|
|
957
|
-
'**/*.mjs',
|
|
958
|
-
],
|
|
959
|
-
// Override or add rules here
|
|
960
|
-
rules: {},
|
|
961
|
+
"linter": {
|
|
962
|
+
"enabled": true,
|
|
963
|
+
"rules": {
|
|
964
|
+
"recommended": false,
|
|
965
|
+
"correctness": {
|
|
966
|
+
"noUndeclaredDependencies": "warn"
|
|
967
|
+
}
|
|
968
|
+
}
|
|
961
969
|
},
|
|
962
|
-
|
|
970
|
+
"assist": {
|
|
971
|
+
"actions": {
|
|
972
|
+
"source": {
|
|
973
|
+
"organizeImports": "on"
|
|
974
|
+
}
|
|
975
|
+
}
|
|
976
|
+
},
|
|
977
|
+
"files": {
|
|
978
|
+
"includes": [
|
|
979
|
+
"**",
|
|
980
|
+
"!**/dist",
|
|
981
|
+
"!**/out-tsc",
|
|
982
|
+
"!**/node_modules",
|
|
983
|
+
"!**/.nx",
|
|
984
|
+
"!**/.venv",
|
|
985
|
+
"!**/*.css"
|
|
986
|
+
]
|
|
987
|
+
}
|
|
988
|
+
}
|
|
963
989
|
"
|
|
964
990
|
`;
|
|
965
991
|
|
|
@@ -977,17 +1003,6 @@ exports[`react-website generator > Tanstack router integration > should generate
|
|
|
977
1003
|
"lint": {
|
|
978
1004
|
"cache": true
|
|
979
1005
|
},
|
|
980
|
-
"@nx/eslint:lint": {
|
|
981
|
-
"cache": true,
|
|
982
|
-
"inputs": [
|
|
983
|
-
"default",
|
|
984
|
-
"^default",
|
|
985
|
-
"{workspaceRoot}/.eslintrc.json",
|
|
986
|
-
"{workspaceRoot}/.eslintignore",
|
|
987
|
-
"{workspaceRoot}/eslint.config.mjs",
|
|
988
|
-
"{workspaceRoot}/tools/eslint-rules/**/*"
|
|
989
|
-
]
|
|
990
|
-
},
|
|
991
1006
|
"@nx/vite:build": {
|
|
992
1007
|
"cache": true,
|
|
993
1008
|
"dependsOn": ["^build"],
|
|
@@ -1016,7 +1031,7 @@ exports[`react-website generator > Tanstack router integration > should generate
|
|
|
1016
1031
|
"application": {
|
|
1017
1032
|
"babel": true,
|
|
1018
1033
|
"style": "css",
|
|
1019
|
-
"linter": "
|
|
1034
|
+
"linter": "none",
|
|
1020
1035
|
"bundler": "vite"
|
|
1021
1036
|
},
|
|
1022
1037
|
"component": {
|
|
@@ -1024,16 +1039,12 @@ exports[`react-website generator > Tanstack router integration > should generate
|
|
|
1024
1039
|
},
|
|
1025
1040
|
"library": {
|
|
1026
1041
|
"style": "css",
|
|
1027
|
-
"linter": "
|
|
1042
|
+
"linter": "none"
|
|
1028
1043
|
}
|
|
1029
1044
|
}
|
|
1030
1045
|
},
|
|
1031
1046
|
"namedInputs": {
|
|
1032
|
-
"
|
|
1033
|
-
"default",
|
|
1034
|
-
"{workspaceRoot}/eslint.config.mjs",
|
|
1035
|
-
"{projectRoot}/eslint.config.mjs"
|
|
1036
|
-
],
|
|
1047
|
+
"biome": ["default", "{workspaceRoot}/biome.json"],
|
|
1037
1048
|
"default": [
|
|
1038
1049
|
{
|
|
1039
1050
|
"dependentTasksOutputFiles": "**/*",
|
|
@@ -1065,52 +1076,38 @@ exports[`react-website generator > Tanstack router integration > should generate
|
|
|
1065
1076
|
"{
|
|
1066
1077
|
"name": "@proj/source",
|
|
1067
1078
|
"dependencies": {
|
|
1068
|
-
"@cloudscape-design/board-components": "3.0.
|
|
1069
|
-
"@cloudscape-design/components": "3.0.
|
|
1079
|
+
"@cloudscape-design/board-components": "3.0.189",
|
|
1080
|
+
"@cloudscape-design/components": "3.0.1308",
|
|
1070
1081
|
"@cloudscape-design/global-styles": "1.0.59",
|
|
1071
|
-
"aws-cdk-lib": "2.
|
|
1082
|
+
"aws-cdk-lib": "2.258.0",
|
|
1072
1083
|
"constructs": "10.6.0",
|
|
1073
|
-
"react": "19.2.
|
|
1074
|
-
"react-dom": "19.2.
|
|
1075
|
-
"tailwindcss": "4.
|
|
1084
|
+
"react": "19.2.7",
|
|
1085
|
+
"react-dom": "19.2.7",
|
|
1086
|
+
"tailwindcss": "4.2.2"
|
|
1076
1087
|
},
|
|
1077
1088
|
"devDependencies": {
|
|
1078
|
-
"@
|
|
1079
|
-
"@nx/
|
|
1080
|
-
"@nx/
|
|
1081
|
-
"@nx/
|
|
1082
|
-
"@nx/
|
|
1083
|
-
"@nx/vite": "22.7.3",
|
|
1084
|
-
"@nx/vitest": "22.7.3",
|
|
1085
|
-
"@nx/web": "22.7.3",
|
|
1089
|
+
"@nx/js": "22.7.5",
|
|
1090
|
+
"@nx/react": "22.7.5",
|
|
1091
|
+
"@nx/vite": "22.7.5",
|
|
1092
|
+
"@nx/vitest": "22.7.5",
|
|
1093
|
+
"@nx/web": "22.7.5",
|
|
1086
1094
|
"@swc-node/register": "~1.11.1",
|
|
1087
|
-
"@swc/cli": "~0.8.0",
|
|
1088
1095
|
"@swc/core": "~1.15.5",
|
|
1089
1096
|
"@swc/helpers": "~0.5.18",
|
|
1090
|
-
"@tailwindcss/vite": "4.
|
|
1097
|
+
"@tailwindcss/vite": "4.2.2",
|
|
1091
1098
|
"@testing-library/dom": "10.4.0",
|
|
1092
1099
|
"@testing-library/react": "16.3.0",
|
|
1093
|
-
"@types/node": "25.9.
|
|
1100
|
+
"@types/node": "25.9.2",
|
|
1094
1101
|
"@types/react": "^19.0.0",
|
|
1095
1102
|
"@types/react-dom": "^19.0.0",
|
|
1096
1103
|
"@vitejs/plugin-react": "^6.0.0",
|
|
1097
|
-
"@vitest/coverage-v8": "4.1.
|
|
1098
|
-
"@vitest/ui": "4.1.
|
|
1099
|
-
"eslint": "^9.8.0",
|
|
1100
|
-
"eslint-config-prettier": "^10.0.0",
|
|
1101
|
-
"eslint-plugin-import": "2.31.0",
|
|
1102
|
-
"eslint-plugin-jsx-a11y": "6.10.1",
|
|
1103
|
-
"eslint-plugin-prettier": "5.5.5",
|
|
1104
|
-
"eslint-plugin-react": "7.35.0",
|
|
1105
|
-
"eslint-plugin-react-hooks": "5.0.0",
|
|
1104
|
+
"@vitest/coverage-v8": "4.1.8",
|
|
1105
|
+
"@vitest/ui": "4.1.8",
|
|
1106
1106
|
"jiti": "2.4.2",
|
|
1107
1107
|
"jsdom": "~22.1.0",
|
|
1108
|
-
"jsonc-eslint-parser": "3.1.0",
|
|
1109
|
-
"prettier": "3.8.3",
|
|
1110
1108
|
"typescript": "~5.9.2",
|
|
1111
|
-
"
|
|
1112
|
-
"
|
|
1113
|
-
"vitest": "4.1.7"
|
|
1109
|
+
"vite": "8.0.16",
|
|
1110
|
+
"vitest": "4.1.8"
|
|
1114
1111
|
},
|
|
1115
1112
|
"type": "module",
|
|
1116
1113
|
"scripts": {
|
|
@@ -1153,35 +1150,7 @@ You can also automatiaclly fix some lint errors by running the following command
|
|
|
1153
1150
|
|
|
1154
1151
|
- [common-constructs reference docs](TODO)
|
|
1155
1152
|
- [Learn more about NX](https://nx.dev/getting-started/intro)
|
|
1156
|
-
"
|
|
1157
|
-
`;
|
|
1158
1153
|
|
|
1159
|
-
exports[`react-website generator > Tanstack router integration > should generate website with no router correctly > packages/common/constructs/eslint.config.mjs 1`] = `
|
|
1160
|
-
"import baseConfig from '../../../eslint.config.mjs';
|
|
1161
|
-
|
|
1162
|
-
export default [
|
|
1163
|
-
...baseConfig,
|
|
1164
|
-
{
|
|
1165
|
-
files: ['**/*.json'],
|
|
1166
|
-
rules: {
|
|
1167
|
-
'@nx/dependency-checks': [
|
|
1168
|
-
'warn',
|
|
1169
|
-
{
|
|
1170
|
-
ignoredFiles: [
|
|
1171
|
-
'{projectRoot}/eslint.config.{js,cjs,mjs,ts,cts,mts}',
|
|
1172
|
-
'{projectRoot}/vitest.config.{js,ts,mjs,mts}',
|
|
1173
|
-
],
|
|
1174
|
-
},
|
|
1175
|
-
],
|
|
1176
|
-
},
|
|
1177
|
-
languageOptions: {
|
|
1178
|
-
parser: await import('jsonc-eslint-parser'),
|
|
1179
|
-
},
|
|
1180
|
-
},
|
|
1181
|
-
{
|
|
1182
|
-
ignores: ['**/out-tsc'],
|
|
1183
|
-
},
|
|
1184
|
-
];
|
|
1185
1154
|
"
|
|
1186
1155
|
`;
|
|
1187
1156
|
|
|
@@ -1192,6 +1161,9 @@ exports[`react-website generator > Tanstack router integration > should generate
|
|
|
1192
1161
|
"sourceRoot": "packages/common/constructs/src",
|
|
1193
1162
|
"projectType": "library",
|
|
1194
1163
|
"tags": [],
|
|
1164
|
+
"metadata": {
|
|
1165
|
+
"generator": "ts#project"
|
|
1166
|
+
},
|
|
1195
1167
|
"targets": {
|
|
1196
1168
|
"build": {
|
|
1197
1169
|
"dependsOn": ["lint", "compile", "test", "@proj/test-app:build"]
|
|
@@ -1205,15 +1177,18 @@ exports[`react-website generator > Tanstack router integration > should generate
|
|
|
1205
1177
|
}
|
|
1206
1178
|
},
|
|
1207
1179
|
"lint": {
|
|
1208
|
-
"executor": "
|
|
1180
|
+
"executor": "nx:run-commands",
|
|
1209
1181
|
"cache": true,
|
|
1210
|
-
"inputs": ["
|
|
1182
|
+
"inputs": ["biome"],
|
|
1183
|
+
"options": {
|
|
1184
|
+
"command": "biome lint {projectRoot}"
|
|
1185
|
+
},
|
|
1211
1186
|
"configurations": {
|
|
1212
1187
|
"fix": {
|
|
1213
|
-
"
|
|
1188
|
+
"command": "biome check --write {projectRoot}"
|
|
1214
1189
|
},
|
|
1215
1190
|
"skip-lint": {
|
|
1216
|
-
"
|
|
1191
|
+
"command": "node -e \\"\\""
|
|
1217
1192
|
}
|
|
1218
1193
|
}
|
|
1219
1194
|
},
|
|
@@ -1224,9 +1199,6 @@ exports[`react-website generator > Tanstack router integration > should generate
|
|
|
1224
1199
|
"reportsDirectory": "{workspaceRoot}/coverage/{projectRoot}"
|
|
1225
1200
|
}
|
|
1226
1201
|
}
|
|
1227
|
-
},
|
|
1228
|
-
"metadata": {
|
|
1229
|
-
"generator": "ts#project"
|
|
1230
1202
|
}
|
|
1231
1203
|
}
|
|
1232
1204
|
"
|
|
@@ -1536,11 +1508,18 @@ exports[`react-website generator > Tanstack router integration > should generate
|
|
|
1536
1508
|
"import {
|
|
1537
1509
|
CfnOutput,
|
|
1538
1510
|
CfnResource,
|
|
1511
|
+
Duration,
|
|
1539
1512
|
Lazy,
|
|
1540
1513
|
RemovalPolicy,
|
|
1541
1514
|
Stack,
|
|
1542
1515
|
} from 'aws-cdk-lib';
|
|
1543
|
-
import {
|
|
1516
|
+
import {
|
|
1517
|
+
Distribution,
|
|
1518
|
+
HeadersFrameOption,
|
|
1519
|
+
HeadersReferrerPolicy,
|
|
1520
|
+
ResponseHeadersPolicy,
|
|
1521
|
+
ViewerProtocolPolicy,
|
|
1522
|
+
} from 'aws-cdk-lib/aws-cloudfront';
|
|
1544
1523
|
import { S3BucketOrigin } from 'aws-cdk-lib/aws-cloudfront-origins';
|
|
1545
1524
|
import {
|
|
1546
1525
|
BlockPublicAccess,
|
|
@@ -1549,7 +1528,11 @@ import {
|
|
|
1549
1528
|
IBucket,
|
|
1550
1529
|
ObjectOwnership,
|
|
1551
1530
|
} from 'aws-cdk-lib/aws-s3';
|
|
1552
|
-
import {
|
|
1531
|
+
import {
|
|
1532
|
+
BucketDeployment,
|
|
1533
|
+
CacheControl,
|
|
1534
|
+
Source,
|
|
1535
|
+
} from 'aws-cdk-lib/aws-s3-deployment';
|
|
1553
1536
|
import { Construct } from 'constructs';
|
|
1554
1537
|
import { RuntimeConfig } from './runtime-config.js';
|
|
1555
1538
|
import { Key } from 'aws-cdk-lib/aws-kms';
|
|
@@ -1649,6 +1632,33 @@ export class StaticWebsite extends Construct {
|
|
|
1649
1632
|
'Distribution log bucket does not need versioning enabled',
|
|
1650
1633
|
);
|
|
1651
1634
|
|
|
1635
|
+
// Security headers applied to all responses. A Content-Security-Policy is
|
|
1636
|
+
// intentionally omitted as it is application specific - add one for your app.
|
|
1637
|
+
const responseHeadersPolicy = new ResponseHeadersPolicy(
|
|
1638
|
+
this,
|
|
1639
|
+
'ResponseHeadersPolicy',
|
|
1640
|
+
{
|
|
1641
|
+
securityHeadersBehavior: {
|
|
1642
|
+
strictTransportSecurity: {
|
|
1643
|
+
accessControlMaxAge: Duration.days(730),
|
|
1644
|
+
includeSubdomains: true,
|
|
1645
|
+
preload: true,
|
|
1646
|
+
override: true,
|
|
1647
|
+
},
|
|
1648
|
+
contentTypeOptions: { override: true },
|
|
1649
|
+
frameOptions: {
|
|
1650
|
+
frameOption: HeadersFrameOption.DENY,
|
|
1651
|
+
override: true,
|
|
1652
|
+
},
|
|
1653
|
+
referrerPolicy: {
|
|
1654
|
+
referrerPolicy:
|
|
1655
|
+
HeadersReferrerPolicy.STRICT_ORIGIN_WHEN_CROSS_ORIGIN,
|
|
1656
|
+
override: true,
|
|
1657
|
+
},
|
|
1658
|
+
},
|
|
1659
|
+
},
|
|
1660
|
+
);
|
|
1661
|
+
|
|
1652
1662
|
const defaultRootObject = 'index.html';
|
|
1653
1663
|
this.cloudFrontDistribution = new Distribution(
|
|
1654
1664
|
this,
|
|
@@ -1660,6 +1670,7 @@ export class StaticWebsite extends Construct {
|
|
|
1660
1670
|
defaultBehavior: {
|
|
1661
1671
|
origin: S3BucketOrigin.withOriginAccessControl(this.websiteBucket),
|
|
1662
1672
|
viewerProtocolPolicy: ViewerProtocolPolicy.REDIRECT_TO_HTTPS,
|
|
1673
|
+
responseHeadersPolicy,
|
|
1663
1674
|
},
|
|
1664
1675
|
defaultRootObject,
|
|
1665
1676
|
errorResponses: [
|
|
@@ -1684,8 +1695,17 @@ export class StaticWebsite extends Construct {
|
|
|
1684
1695
|
|
|
1685
1696
|
// Deploy Website
|
|
1686
1697
|
this.bucketDeployment = new BucketDeployment(this, 'WebsiteDeployment', {
|
|
1698
|
+
sources: [Source.asset(websiteFilePath)],
|
|
1699
|
+
destinationBucket: this.websiteBucket,
|
|
1700
|
+
// Files in the distribution's edge caches will be invalidated after files are uploaded to the destination bucket.
|
|
1701
|
+
distribution: this.cloudFrontDistribution,
|
|
1702
|
+
memoryLimit: 1024,
|
|
1703
|
+
});
|
|
1704
|
+
|
|
1705
|
+
// Deploy runtime-config.json separately so it is never cached - clients
|
|
1706
|
+
// must always fetch the latest configuration.
|
|
1707
|
+
new BucketDeployment(this, 'RuntimeConfigDeployment', {
|
|
1687
1708
|
sources: [
|
|
1688
|
-
Source.asset(websiteFilePath),
|
|
1689
1709
|
Source.data(
|
|
1690
1710
|
DEFAULT_RUNTIME_CONFIG_FILENAME,
|
|
1691
1711
|
Lazy.string({
|
|
@@ -1697,8 +1717,9 @@ export class StaticWebsite extends Construct {
|
|
|
1697
1717
|
),
|
|
1698
1718
|
],
|
|
1699
1719
|
destinationBucket: this.websiteBucket,
|
|
1700
|
-
// Files in the distribution's edge caches will be invalidated after files are uploaded to the destination bucket.
|
|
1701
1720
|
distribution: this.cloudFrontDistribution,
|
|
1721
|
+
cacheControl: [CacheControl.noCache()],
|
|
1722
|
+
prune: false,
|
|
1702
1723
|
memoryLimit: 1024,
|
|
1703
1724
|
});
|
|
1704
1725
|
|
|
@@ -1909,6 +1930,7 @@ export default defineConfig(() => ({
|
|
|
1909
1930
|
root: __dirname,
|
|
1910
1931
|
cacheDir: '../../../node_modules/.vite/packages/common/constructs',
|
|
1911
1932
|
test: {
|
|
1933
|
+
passWithNoTests: true,
|
|
1912
1934
|
name: '@proj/common-constructs',
|
|
1913
1935
|
watch: false,
|
|
1914
1936
|
globals: true,
|
|
@@ -1919,7 +1941,6 @@ export default defineConfig(() => ({
|
|
|
1919
1941
|
reportsDirectory: './test-output/vitest/coverage',
|
|
1920
1942
|
provider: 'v8' as const,
|
|
1921
1943
|
},
|
|
1922
|
-
passWithNoTests: true,
|
|
1923
1944
|
},
|
|
1924
1945
|
}));
|
|
1925
1946
|
"
|
|
@@ -1927,15 +1948,14 @@ export default defineConfig(() => ({
|
|
|
1927
1948
|
|
|
1928
1949
|
exports[`react-website generator > Tanstack router integration > should generate website with no router correctly > pnpm-workspace.yaml 1`] = `
|
|
1929
1950
|
"packages:
|
|
1930
|
-
-
|
|
1931
|
-
-
|
|
1932
|
-
-
|
|
1951
|
+
- "packages/*"
|
|
1952
|
+
- "test-app"
|
|
1953
|
+
- "packages/common/*"
|
|
1933
1954
|
"
|
|
1934
1955
|
`;
|
|
1935
1956
|
|
|
1936
1957
|
exports[`react-website generator > Tanstack router integration > should generate website with no router correctly > test-app/README.md 1`] = `
|
|
1937
1958
|
"# @proj/test-app
|
|
1938
|
-
|
|
1939
1959
|
This library was generated with [@aws/nx-plugin](https://github.com/awslabs/nx-plugin-for-aws/).
|
|
1940
1960
|
|
|
1941
1961
|
## Building
|
|
@@ -1984,24 +2004,8 @@ In order to integrate with cognito or trpc backends, you need to have a \`runtim
|
|
|
1984
2004
|
"
|
|
1985
2005
|
`;
|
|
1986
2006
|
|
|
1987
|
-
exports[`react-website generator > Tanstack router integration > should generate website with no router correctly > test-app/eslint.config.mjs 1`] = `
|
|
1988
|
-
"import nx from '@nx/eslint-plugin';
|
|
1989
|
-
import baseConfig from '../eslint.config.mjs';
|
|
1990
|
-
|
|
1991
|
-
export default [
|
|
1992
|
-
...nx.configs['flat/react'],
|
|
1993
|
-
...baseConfig,
|
|
1994
|
-
{
|
|
1995
|
-
files: ['**/*.ts', '**/*.tsx', '**/*.js', '**/*.jsx'],
|
|
1996
|
-
// Override or add rules here
|
|
1997
|
-
rules: {},
|
|
1998
|
-
},
|
|
1999
|
-
];
|
|
2000
|
-
"
|
|
2001
|
-
`;
|
|
2002
|
-
|
|
2003
2007
|
exports[`react-website generator > Tanstack router integration > should generate website with no router correctly > test-app/index.html 1`] = `
|
|
2004
|
-
"<!
|
|
2008
|
+
"<!DOCTYPE html>
|
|
2005
2009
|
<html lang="en">
|
|
2006
2010
|
<head>
|
|
2007
2011
|
<meta charset="utf-8" />
|
|
@@ -2029,8 +2033,9 @@ exports[`react-website generator > Tanstack router integration > should generate
|
|
|
2029
2033
|
"tags": [],
|
|
2030
2034
|
"metadata": {
|
|
2031
2035
|
"generator": "ts#react-website",
|
|
2032
|
-
"
|
|
2033
|
-
"framework": "react"
|
|
2036
|
+
"ux": "cloudscape",
|
|
2037
|
+
"framework": "react",
|
|
2038
|
+
"infra": "cloudfront-s3"
|
|
2034
2039
|
},
|
|
2035
2040
|
"targets": {
|
|
2036
2041
|
"build": {
|
|
@@ -2065,15 +2070,18 @@ exports[`react-website generator > Tanstack router integration > should generate
|
|
|
2065
2070
|
}
|
|
2066
2071
|
},
|
|
2067
2072
|
"lint": {
|
|
2068
|
-
"executor": "
|
|
2073
|
+
"executor": "nx:run-commands",
|
|
2069
2074
|
"cache": true,
|
|
2070
|
-
"inputs": ["
|
|
2075
|
+
"inputs": ["biome"],
|
|
2076
|
+
"options": {
|
|
2077
|
+
"command": "biome lint {projectRoot}"
|
|
2078
|
+
},
|
|
2071
2079
|
"configurations": {
|
|
2072
2080
|
"fix": {
|
|
2073
|
-
"
|
|
2081
|
+
"command": "biome check --write {projectRoot}"
|
|
2074
2082
|
},
|
|
2075
2083
|
"skip-lint": {
|
|
2076
|
-
"
|
|
2084
|
+
"command": "node -e \\"\\""
|
|
2077
2085
|
}
|
|
2078
2086
|
}
|
|
2079
2087
|
},
|
|
@@ -2466,6 +2474,7 @@ export default defineConfig(() => ({
|
|
|
2466
2474
|
},
|
|
2467
2475
|
},
|
|
2468
2476
|
test: {
|
|
2477
|
+
passWithNoTests: true,
|
|
2469
2478
|
name: '@proj/test-app',
|
|
2470
2479
|
watch: false,
|
|
2471
2480
|
globals: true,
|
|
@@ -2476,7 +2485,6 @@ export default defineConfig(() => ({
|
|
|
2476
2485
|
reportsDirectory: './test-output/vitest/coverage',
|
|
2477
2486
|
provider: 'v8' as const,
|
|
2478
2487
|
},
|
|
2479
|
-
passWithNoTests: true,
|
|
2480
2488
|
},
|
|
2481
2489
|
resolve: { tsconfigPaths: true },
|
|
2482
2490
|
define: { global: {} },
|
|
@@ -2527,61 +2535,60 @@ vitest.config.*.timestamp*
|
|
|
2527
2535
|
runtime-config.json"
|
|
2528
2536
|
`;
|
|
2529
2537
|
|
|
2530
|
-
exports[`react-website generator > Tanstack router integration > should generate website with router correctly > .prettierrc 1`] = `
|
|
2531
|
-
"{ "singleQuote": true }
|
|
2532
|
-
"
|
|
2533
|
-
`;
|
|
2538
|
+
exports[`react-website generator > Tanstack router integration > should generate website with router correctly > .prettierrc 1`] = `"{"singleQuote":true}"`;
|
|
2534
2539
|
|
|
2535
|
-
exports[`react-website generator > Tanstack router integration > should generate website with router correctly >
|
|
2536
|
-
"
|
|
2537
|
-
|
|
2538
|
-
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
2544
|
-
{
|
|
2545
|
-
ignores: [
|
|
2546
|
-
'**/dist',
|
|
2547
|
-
'**/out-tsc',
|
|
2548
|
-
'**/vite.config.*.timestamp*',
|
|
2549
|
-
'**/vitest.config.*.timestamp*',
|
|
2550
|
-
],
|
|
2540
|
+
exports[`react-website generator > Tanstack router integration > should generate website with router correctly > biome.json 1`] = `
|
|
2541
|
+
"{
|
|
2542
|
+
"$schema": "https://biomejs.dev/schemas/2.4.16/schema.json",
|
|
2543
|
+
"root": true,
|
|
2544
|
+
"formatter": {
|
|
2545
|
+
"enabled": true,
|
|
2546
|
+
"indentStyle": "space",
|
|
2547
|
+
"indentWidth": 2,
|
|
2548
|
+
"lineWidth": 80
|
|
2551
2549
|
},
|
|
2552
|
-
{
|
|
2553
|
-
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
{
|
|
2562
|
-
sourceTag: '*',
|
|
2563
|
-
onlyDependOnLibsWithTags: ['*'],
|
|
2564
|
-
},
|
|
2565
|
-
],
|
|
2566
|
-
},
|
|
2567
|
-
],
|
|
2550
|
+
"javascript": {
|
|
2551
|
+
"formatter": {
|
|
2552
|
+
"quoteStyle": "single",
|
|
2553
|
+
"trailingCommas": "all"
|
|
2554
|
+
}
|
|
2555
|
+
},
|
|
2556
|
+
"css": {
|
|
2557
|
+
"formatter": {
|
|
2558
|
+
"quoteStyle": "single"
|
|
2568
2559
|
},
|
|
2560
|
+
"linter": {
|
|
2561
|
+
"enabled": false
|
|
2562
|
+
}
|
|
2569
2563
|
},
|
|
2570
|
-
{
|
|
2571
|
-
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
|
|
2577
|
-
|
|
2578
|
-
'**/*.cjs',
|
|
2579
|
-
'**/*.mjs',
|
|
2580
|
-
],
|
|
2581
|
-
// Override or add rules here
|
|
2582
|
-
rules: {},
|
|
2564
|
+
"linter": {
|
|
2565
|
+
"enabled": true,
|
|
2566
|
+
"rules": {
|
|
2567
|
+
"recommended": false,
|
|
2568
|
+
"correctness": {
|
|
2569
|
+
"noUndeclaredDependencies": "warn"
|
|
2570
|
+
}
|
|
2571
|
+
}
|
|
2583
2572
|
},
|
|
2584
|
-
|
|
2573
|
+
"assist": {
|
|
2574
|
+
"actions": {
|
|
2575
|
+
"source": {
|
|
2576
|
+
"organizeImports": "on"
|
|
2577
|
+
}
|
|
2578
|
+
}
|
|
2579
|
+
},
|
|
2580
|
+
"files": {
|
|
2581
|
+
"includes": [
|
|
2582
|
+
"**",
|
|
2583
|
+
"!**/dist",
|
|
2584
|
+
"!**/out-tsc",
|
|
2585
|
+
"!**/node_modules",
|
|
2586
|
+
"!**/.nx",
|
|
2587
|
+
"!**/.venv",
|
|
2588
|
+
"!**/*.css"
|
|
2589
|
+
]
|
|
2590
|
+
}
|
|
2591
|
+
}
|
|
2585
2592
|
"
|
|
2586
2593
|
`;
|
|
2587
2594
|
|
|
@@ -2599,17 +2606,6 @@ exports[`react-website generator > Tanstack router integration > should generate
|
|
|
2599
2606
|
"lint": {
|
|
2600
2607
|
"cache": true
|
|
2601
2608
|
},
|
|
2602
|
-
"@nx/eslint:lint": {
|
|
2603
|
-
"cache": true,
|
|
2604
|
-
"inputs": [
|
|
2605
|
-
"default",
|
|
2606
|
-
"^default",
|
|
2607
|
-
"{workspaceRoot}/.eslintrc.json",
|
|
2608
|
-
"{workspaceRoot}/.eslintignore",
|
|
2609
|
-
"{workspaceRoot}/eslint.config.mjs",
|
|
2610
|
-
"{workspaceRoot}/tools/eslint-rules/**/*"
|
|
2611
|
-
]
|
|
2612
|
-
},
|
|
2613
2609
|
"@nx/vite:build": {
|
|
2614
2610
|
"cache": true,
|
|
2615
2611
|
"dependsOn": ["^build"],
|
|
@@ -2638,7 +2634,7 @@ exports[`react-website generator > Tanstack router integration > should generate
|
|
|
2638
2634
|
"application": {
|
|
2639
2635
|
"babel": true,
|
|
2640
2636
|
"style": "css",
|
|
2641
|
-
"linter": "
|
|
2637
|
+
"linter": "none",
|
|
2642
2638
|
"bundler": "vite"
|
|
2643
2639
|
},
|
|
2644
2640
|
"component": {
|
|
@@ -2646,16 +2642,12 @@ exports[`react-website generator > Tanstack router integration > should generate
|
|
|
2646
2642
|
},
|
|
2647
2643
|
"library": {
|
|
2648
2644
|
"style": "css",
|
|
2649
|
-
"linter": "
|
|
2645
|
+
"linter": "none"
|
|
2650
2646
|
}
|
|
2651
2647
|
}
|
|
2652
2648
|
},
|
|
2653
2649
|
"namedInputs": {
|
|
2654
|
-
"
|
|
2655
|
-
"default",
|
|
2656
|
-
"{workspaceRoot}/eslint.config.mjs",
|
|
2657
|
-
"{projectRoot}/eslint.config.mjs"
|
|
2658
|
-
],
|
|
2650
|
+
"biome": ["default", "{workspaceRoot}/biome.json"],
|
|
2659
2651
|
"default": [
|
|
2660
2652
|
{
|
|
2661
2653
|
"dependentTasksOutputFiles": "**/*",
|
|
@@ -2687,57 +2679,43 @@ exports[`react-website generator > Tanstack router integration > should generate
|
|
|
2687
2679
|
"{
|
|
2688
2680
|
"name": "@proj/source",
|
|
2689
2681
|
"dependencies": {
|
|
2690
|
-
"@cloudscape-design/board-components": "3.0.
|
|
2691
|
-
"@cloudscape-design/components": "3.0.
|
|
2682
|
+
"@cloudscape-design/board-components": "3.0.189",
|
|
2683
|
+
"@cloudscape-design/components": "3.0.1308",
|
|
2692
2684
|
"@cloudscape-design/global-styles": "1.0.59",
|
|
2693
|
-
"@tanstack/react-router": "1.170.
|
|
2694
|
-
"aws-cdk-lib": "2.
|
|
2685
|
+
"@tanstack/react-router": "1.170.15",
|
|
2686
|
+
"aws-cdk-lib": "2.258.0",
|
|
2695
2687
|
"constructs": "10.6.0",
|
|
2696
|
-
"react": "19.2.
|
|
2697
|
-
"react-dom": "19.2.
|
|
2698
|
-
"tailwindcss": "4.
|
|
2688
|
+
"react": "19.2.7",
|
|
2689
|
+
"react-dom": "19.2.7",
|
|
2690
|
+
"tailwindcss": "4.2.2"
|
|
2699
2691
|
},
|
|
2700
2692
|
"devDependencies": {
|
|
2701
|
-
"@
|
|
2702
|
-
"@nx/
|
|
2703
|
-
"@nx/
|
|
2704
|
-
"@nx/
|
|
2705
|
-
"@nx/
|
|
2706
|
-
"@nx/vite": "22.7.3",
|
|
2707
|
-
"@nx/vitest": "22.7.3",
|
|
2708
|
-
"@nx/web": "22.7.3",
|
|
2693
|
+
"@nx/js": "22.7.5",
|
|
2694
|
+
"@nx/react": "22.7.5",
|
|
2695
|
+
"@nx/vite": "22.7.5",
|
|
2696
|
+
"@nx/vitest": "22.7.5",
|
|
2697
|
+
"@nx/web": "22.7.5",
|
|
2709
2698
|
"@swc-node/register": "~1.11.1",
|
|
2710
|
-
"@swc/cli": "~0.8.0",
|
|
2711
2699
|
"@swc/core": "~1.15.5",
|
|
2712
2700
|
"@swc/helpers": "~0.5.18",
|
|
2713
|
-
"@tailwindcss/vite": "4.
|
|
2714
|
-
"@tanstack/router-generator": "1.167.
|
|
2715
|
-
"@tanstack/router-plugin": "1.168.
|
|
2716
|
-
"@tanstack/router-utils": "1.162.
|
|
2701
|
+
"@tailwindcss/vite": "4.2.2",
|
|
2702
|
+
"@tanstack/router-generator": "1.167.17",
|
|
2703
|
+
"@tanstack/router-plugin": "1.168.18",
|
|
2704
|
+
"@tanstack/router-utils": "1.162.2",
|
|
2717
2705
|
"@tanstack/virtual-file-routes": "1.162.0",
|
|
2718
2706
|
"@testing-library/dom": "10.4.0",
|
|
2719
2707
|
"@testing-library/react": "16.3.0",
|
|
2720
|
-
"@types/node": "25.9.
|
|
2708
|
+
"@types/node": "25.9.2",
|
|
2721
2709
|
"@types/react": "^19.0.0",
|
|
2722
2710
|
"@types/react-dom": "^19.0.0",
|
|
2723
2711
|
"@vitejs/plugin-react": "^6.0.0",
|
|
2724
|
-
"@vitest/coverage-v8": "4.1.
|
|
2725
|
-
"@vitest/ui": "4.1.
|
|
2726
|
-
"eslint": "^9.8.0",
|
|
2727
|
-
"eslint-config-prettier": "^10.0.0",
|
|
2728
|
-
"eslint-plugin-import": "2.31.0",
|
|
2729
|
-
"eslint-plugin-jsx-a11y": "6.10.1",
|
|
2730
|
-
"eslint-plugin-prettier": "5.5.5",
|
|
2731
|
-
"eslint-plugin-react": "7.35.0",
|
|
2732
|
-
"eslint-plugin-react-hooks": "5.0.0",
|
|
2712
|
+
"@vitest/coverage-v8": "4.1.8",
|
|
2713
|
+
"@vitest/ui": "4.1.8",
|
|
2733
2714
|
"jiti": "2.4.2",
|
|
2734
2715
|
"jsdom": "~22.1.0",
|
|
2735
|
-
"jsonc-eslint-parser": "3.1.0",
|
|
2736
|
-
"prettier": "3.8.3",
|
|
2737
2716
|
"typescript": "~5.9.2",
|
|
2738
|
-
"
|
|
2739
|
-
"
|
|
2740
|
-
"vitest": "4.1.7"
|
|
2717
|
+
"vite": "8.0.16",
|
|
2718
|
+
"vitest": "4.1.8"
|
|
2741
2719
|
},
|
|
2742
2720
|
"type": "module",
|
|
2743
2721
|
"scripts": {
|
|
@@ -2780,35 +2758,7 @@ You can also automatiaclly fix some lint errors by running the following command
|
|
|
2780
2758
|
|
|
2781
2759
|
- [common-constructs reference docs](TODO)
|
|
2782
2760
|
- [Learn more about NX](https://nx.dev/getting-started/intro)
|
|
2783
|
-
"
|
|
2784
|
-
`;
|
|
2785
|
-
|
|
2786
|
-
exports[`react-website generator > Tanstack router integration > should generate website with router correctly > packages/common/constructs/eslint.config.mjs 1`] = `
|
|
2787
|
-
"import baseConfig from '../../../eslint.config.mjs';
|
|
2788
2761
|
|
|
2789
|
-
export default [
|
|
2790
|
-
...baseConfig,
|
|
2791
|
-
{
|
|
2792
|
-
files: ['**/*.json'],
|
|
2793
|
-
rules: {
|
|
2794
|
-
'@nx/dependency-checks': [
|
|
2795
|
-
'warn',
|
|
2796
|
-
{
|
|
2797
|
-
ignoredFiles: [
|
|
2798
|
-
'{projectRoot}/eslint.config.{js,cjs,mjs,ts,cts,mts}',
|
|
2799
|
-
'{projectRoot}/vitest.config.{js,ts,mjs,mts}',
|
|
2800
|
-
],
|
|
2801
|
-
},
|
|
2802
|
-
],
|
|
2803
|
-
},
|
|
2804
|
-
languageOptions: {
|
|
2805
|
-
parser: await import('jsonc-eslint-parser'),
|
|
2806
|
-
},
|
|
2807
|
-
},
|
|
2808
|
-
{
|
|
2809
|
-
ignores: ['**/out-tsc'],
|
|
2810
|
-
},
|
|
2811
|
-
];
|
|
2812
2762
|
"
|
|
2813
2763
|
`;
|
|
2814
2764
|
|
|
@@ -2819,6 +2769,9 @@ exports[`react-website generator > Tanstack router integration > should generate
|
|
|
2819
2769
|
"sourceRoot": "packages/common/constructs/src",
|
|
2820
2770
|
"projectType": "library",
|
|
2821
2771
|
"tags": [],
|
|
2772
|
+
"metadata": {
|
|
2773
|
+
"generator": "ts#project"
|
|
2774
|
+
},
|
|
2822
2775
|
"targets": {
|
|
2823
2776
|
"build": {
|
|
2824
2777
|
"dependsOn": ["lint", "compile", "test", "@proj/test-app:build"]
|
|
@@ -2832,15 +2785,18 @@ exports[`react-website generator > Tanstack router integration > should generate
|
|
|
2832
2785
|
}
|
|
2833
2786
|
},
|
|
2834
2787
|
"lint": {
|
|
2835
|
-
"executor": "
|
|
2788
|
+
"executor": "nx:run-commands",
|
|
2836
2789
|
"cache": true,
|
|
2837
|
-
"inputs": ["
|
|
2790
|
+
"inputs": ["biome"],
|
|
2791
|
+
"options": {
|
|
2792
|
+
"command": "biome lint {projectRoot}"
|
|
2793
|
+
},
|
|
2838
2794
|
"configurations": {
|
|
2839
2795
|
"fix": {
|
|
2840
|
-
"
|
|
2796
|
+
"command": "biome check --write {projectRoot}"
|
|
2841
2797
|
},
|
|
2842
2798
|
"skip-lint": {
|
|
2843
|
-
"
|
|
2799
|
+
"command": "node -e \\"\\""
|
|
2844
2800
|
}
|
|
2845
2801
|
}
|
|
2846
2802
|
},
|
|
@@ -2851,9 +2807,6 @@ exports[`react-website generator > Tanstack router integration > should generate
|
|
|
2851
2807
|
"reportsDirectory": "{workspaceRoot}/coverage/{projectRoot}"
|
|
2852
2808
|
}
|
|
2853
2809
|
}
|
|
2854
|
-
},
|
|
2855
|
-
"metadata": {
|
|
2856
|
-
"generator": "ts#project"
|
|
2857
2810
|
}
|
|
2858
2811
|
}
|
|
2859
2812
|
"
|
|
@@ -3163,11 +3116,18 @@ exports[`react-website generator > Tanstack router integration > should generate
|
|
|
3163
3116
|
"import {
|
|
3164
3117
|
CfnOutput,
|
|
3165
3118
|
CfnResource,
|
|
3119
|
+
Duration,
|
|
3166
3120
|
Lazy,
|
|
3167
3121
|
RemovalPolicy,
|
|
3168
3122
|
Stack,
|
|
3169
3123
|
} from 'aws-cdk-lib';
|
|
3170
|
-
import {
|
|
3124
|
+
import {
|
|
3125
|
+
Distribution,
|
|
3126
|
+
HeadersFrameOption,
|
|
3127
|
+
HeadersReferrerPolicy,
|
|
3128
|
+
ResponseHeadersPolicy,
|
|
3129
|
+
ViewerProtocolPolicy,
|
|
3130
|
+
} from 'aws-cdk-lib/aws-cloudfront';
|
|
3171
3131
|
import { S3BucketOrigin } from 'aws-cdk-lib/aws-cloudfront-origins';
|
|
3172
3132
|
import {
|
|
3173
3133
|
BlockPublicAccess,
|
|
@@ -3176,7 +3136,11 @@ import {
|
|
|
3176
3136
|
IBucket,
|
|
3177
3137
|
ObjectOwnership,
|
|
3178
3138
|
} from 'aws-cdk-lib/aws-s3';
|
|
3179
|
-
import {
|
|
3139
|
+
import {
|
|
3140
|
+
BucketDeployment,
|
|
3141
|
+
CacheControl,
|
|
3142
|
+
Source,
|
|
3143
|
+
} from 'aws-cdk-lib/aws-s3-deployment';
|
|
3180
3144
|
import { Construct } from 'constructs';
|
|
3181
3145
|
import { RuntimeConfig } from './runtime-config.js';
|
|
3182
3146
|
import { Key } from 'aws-cdk-lib/aws-kms';
|
|
@@ -3276,6 +3240,33 @@ export class StaticWebsite extends Construct {
|
|
|
3276
3240
|
'Distribution log bucket does not need versioning enabled',
|
|
3277
3241
|
);
|
|
3278
3242
|
|
|
3243
|
+
// Security headers applied to all responses. A Content-Security-Policy is
|
|
3244
|
+
// intentionally omitted as it is application specific - add one for your app.
|
|
3245
|
+
const responseHeadersPolicy = new ResponseHeadersPolicy(
|
|
3246
|
+
this,
|
|
3247
|
+
'ResponseHeadersPolicy',
|
|
3248
|
+
{
|
|
3249
|
+
securityHeadersBehavior: {
|
|
3250
|
+
strictTransportSecurity: {
|
|
3251
|
+
accessControlMaxAge: Duration.days(730),
|
|
3252
|
+
includeSubdomains: true,
|
|
3253
|
+
preload: true,
|
|
3254
|
+
override: true,
|
|
3255
|
+
},
|
|
3256
|
+
contentTypeOptions: { override: true },
|
|
3257
|
+
frameOptions: {
|
|
3258
|
+
frameOption: HeadersFrameOption.DENY,
|
|
3259
|
+
override: true,
|
|
3260
|
+
},
|
|
3261
|
+
referrerPolicy: {
|
|
3262
|
+
referrerPolicy:
|
|
3263
|
+
HeadersReferrerPolicy.STRICT_ORIGIN_WHEN_CROSS_ORIGIN,
|
|
3264
|
+
override: true,
|
|
3265
|
+
},
|
|
3266
|
+
},
|
|
3267
|
+
},
|
|
3268
|
+
);
|
|
3269
|
+
|
|
3279
3270
|
const defaultRootObject = 'index.html';
|
|
3280
3271
|
this.cloudFrontDistribution = new Distribution(
|
|
3281
3272
|
this,
|
|
@@ -3287,6 +3278,7 @@ export class StaticWebsite extends Construct {
|
|
|
3287
3278
|
defaultBehavior: {
|
|
3288
3279
|
origin: S3BucketOrigin.withOriginAccessControl(this.websiteBucket),
|
|
3289
3280
|
viewerProtocolPolicy: ViewerProtocolPolicy.REDIRECT_TO_HTTPS,
|
|
3281
|
+
responseHeadersPolicy,
|
|
3290
3282
|
},
|
|
3291
3283
|
defaultRootObject,
|
|
3292
3284
|
errorResponses: [
|
|
@@ -3311,8 +3303,17 @@ export class StaticWebsite extends Construct {
|
|
|
3311
3303
|
|
|
3312
3304
|
// Deploy Website
|
|
3313
3305
|
this.bucketDeployment = new BucketDeployment(this, 'WebsiteDeployment', {
|
|
3306
|
+
sources: [Source.asset(websiteFilePath)],
|
|
3307
|
+
destinationBucket: this.websiteBucket,
|
|
3308
|
+
// Files in the distribution's edge caches will be invalidated after files are uploaded to the destination bucket.
|
|
3309
|
+
distribution: this.cloudFrontDistribution,
|
|
3310
|
+
memoryLimit: 1024,
|
|
3311
|
+
});
|
|
3312
|
+
|
|
3313
|
+
// Deploy runtime-config.json separately so it is never cached - clients
|
|
3314
|
+
// must always fetch the latest configuration.
|
|
3315
|
+
new BucketDeployment(this, 'RuntimeConfigDeployment', {
|
|
3314
3316
|
sources: [
|
|
3315
|
-
Source.asset(websiteFilePath),
|
|
3316
3317
|
Source.data(
|
|
3317
3318
|
DEFAULT_RUNTIME_CONFIG_FILENAME,
|
|
3318
3319
|
Lazy.string({
|
|
@@ -3324,8 +3325,9 @@ export class StaticWebsite extends Construct {
|
|
|
3324
3325
|
),
|
|
3325
3326
|
],
|
|
3326
3327
|
destinationBucket: this.websiteBucket,
|
|
3327
|
-
// Files in the distribution's edge caches will be invalidated after files are uploaded to the destination bucket.
|
|
3328
3328
|
distribution: this.cloudFrontDistribution,
|
|
3329
|
+
cacheControl: [CacheControl.noCache()],
|
|
3330
|
+
prune: false,
|
|
3329
3331
|
memoryLimit: 1024,
|
|
3330
3332
|
});
|
|
3331
3333
|
|
|
@@ -3536,6 +3538,7 @@ export default defineConfig(() => ({
|
|
|
3536
3538
|
root: __dirname,
|
|
3537
3539
|
cacheDir: '../../../node_modules/.vite/packages/common/constructs',
|
|
3538
3540
|
test: {
|
|
3541
|
+
passWithNoTests: true,
|
|
3539
3542
|
name: '@proj/common-constructs',
|
|
3540
3543
|
watch: false,
|
|
3541
3544
|
globals: true,
|
|
@@ -3546,7 +3549,6 @@ export default defineConfig(() => ({
|
|
|
3546
3549
|
reportsDirectory: './test-output/vitest/coverage',
|
|
3547
3550
|
provider: 'v8' as const,
|
|
3548
3551
|
},
|
|
3549
|
-
passWithNoTests: true,
|
|
3550
3552
|
},
|
|
3551
3553
|
}));
|
|
3552
3554
|
"
|
|
@@ -3554,15 +3556,14 @@ export default defineConfig(() => ({
|
|
|
3554
3556
|
|
|
3555
3557
|
exports[`react-website generator > Tanstack router integration > should generate website with router correctly > pnpm-workspace.yaml 1`] = `
|
|
3556
3558
|
"packages:
|
|
3557
|
-
-
|
|
3558
|
-
-
|
|
3559
|
-
-
|
|
3559
|
+
- "packages/*"
|
|
3560
|
+
- "test-app"
|
|
3561
|
+
- "packages/common/*"
|
|
3560
3562
|
"
|
|
3561
3563
|
`;
|
|
3562
3564
|
|
|
3563
3565
|
exports[`react-website generator > Tanstack router integration > should generate website with router correctly > test-app/README.md 1`] = `
|
|
3564
3566
|
"# @proj/test-app
|
|
3565
|
-
|
|
3566
3567
|
This library was generated with [@aws/nx-plugin](https://github.com/awslabs/nx-plugin-for-aws/).
|
|
3567
3568
|
|
|
3568
3569
|
## Building
|
|
@@ -3611,24 +3612,8 @@ In order to integrate with cognito or trpc backends, you need to have a \`runtim
|
|
|
3611
3612
|
"
|
|
3612
3613
|
`;
|
|
3613
3614
|
|
|
3614
|
-
exports[`react-website generator > Tanstack router integration > should generate website with router correctly > test-app/eslint.config.mjs 1`] = `
|
|
3615
|
-
"import nx from '@nx/eslint-plugin';
|
|
3616
|
-
import baseConfig from '../eslint.config.mjs';
|
|
3617
|
-
|
|
3618
|
-
export default [
|
|
3619
|
-
...nx.configs['flat/react'],
|
|
3620
|
-
...baseConfig,
|
|
3621
|
-
{
|
|
3622
|
-
files: ['**/*.ts', '**/*.tsx', '**/*.js', '**/*.jsx'],
|
|
3623
|
-
// Override or add rules here
|
|
3624
|
-
rules: {},
|
|
3625
|
-
},
|
|
3626
|
-
];
|
|
3627
|
-
"
|
|
3628
|
-
`;
|
|
3629
|
-
|
|
3630
3615
|
exports[`react-website generator > Tanstack router integration > should generate website with router correctly > test-app/index.html 1`] = `
|
|
3631
|
-
"<!
|
|
3616
|
+
"<!DOCTYPE html>
|
|
3632
3617
|
<html lang="en">
|
|
3633
3618
|
<head>
|
|
3634
3619
|
<meta charset="utf-8" />
|
|
@@ -3656,8 +3641,9 @@ exports[`react-website generator > Tanstack router integration > should generate
|
|
|
3656
3641
|
"tags": [],
|
|
3657
3642
|
"metadata": {
|
|
3658
3643
|
"generator": "ts#react-website",
|
|
3659
|
-
"
|
|
3660
|
-
"framework": "react"
|
|
3644
|
+
"ux": "cloudscape",
|
|
3645
|
+
"framework": "react",
|
|
3646
|
+
"infra": "cloudfront-s3"
|
|
3661
3647
|
},
|
|
3662
3648
|
"targets": {
|
|
3663
3649
|
"build": {
|
|
@@ -3692,15 +3678,18 @@ exports[`react-website generator > Tanstack router integration > should generate
|
|
|
3692
3678
|
}
|
|
3693
3679
|
},
|
|
3694
3680
|
"lint": {
|
|
3695
|
-
"executor": "
|
|
3681
|
+
"executor": "nx:run-commands",
|
|
3696
3682
|
"cache": true,
|
|
3697
|
-
"inputs": ["
|
|
3683
|
+
"inputs": ["biome"],
|
|
3684
|
+
"options": {
|
|
3685
|
+
"command": "biome lint {projectRoot}"
|
|
3686
|
+
},
|
|
3698
3687
|
"configurations": {
|
|
3699
3688
|
"fix": {
|
|
3700
|
-
"
|
|
3689
|
+
"command": "biome check --write {projectRoot}"
|
|
3701
3690
|
},
|
|
3702
3691
|
"skip-lint": {
|
|
3703
|
-
"
|
|
3692
|
+
"command": "node -e \\"\\""
|
|
3704
3693
|
}
|
|
3705
3694
|
}
|
|
3706
3695
|
},
|
|
@@ -4286,6 +4275,7 @@ export default defineConfig(() => ({
|
|
|
4286
4275
|
},
|
|
4287
4276
|
},
|
|
4288
4277
|
test: {
|
|
4278
|
+
passWithNoTests: true,
|
|
4289
4279
|
name: '@proj/test-app',
|
|
4290
4280
|
watch: false,
|
|
4291
4281
|
globals: true,
|
|
@@ -4296,7 +4286,6 @@ export default defineConfig(() => ({
|
|
|
4296
4286
|
reportsDirectory: './test-output/vitest/coverage',
|
|
4297
4287
|
provider: 'v8' as const,
|
|
4298
4288
|
},
|
|
4299
|
-
passWithNoTests: true,
|
|
4300
4289
|
},
|
|
4301
4290
|
resolve: { tsconfigPaths: true },
|
|
4302
4291
|
define: { global: {} },
|
|
@@ -4399,6 +4388,7 @@ export default defineConfig(() => ({
|
|
|
4399
4388
|
},
|
|
4400
4389
|
},
|
|
4401
4390
|
test: {
|
|
4391
|
+
passWithNoTests: true,
|
|
4402
4392
|
name: '@proj/test-app',
|
|
4403
4393
|
watch: false,
|
|
4404
4394
|
globals: true,
|
|
@@ -4409,7 +4399,6 @@ export default defineConfig(() => ({
|
|
|
4409
4399
|
reportsDirectory: './test-output/vitest/coverage',
|
|
4410
4400
|
provider: 'v8' as const,
|
|
4411
4401
|
},
|
|
4412
|
-
passWithNoTests: true,
|
|
4413
4402
|
},
|
|
4414
4403
|
resolve: { tsconfigPaths: true },
|
|
4415
4404
|
define: { global: {} },
|
|
@@ -4665,11 +4654,18 @@ exports[`react-website generator > should generate shared constructs > common/co
|
|
|
4665
4654
|
"import {
|
|
4666
4655
|
CfnOutput,
|
|
4667
4656
|
CfnResource,
|
|
4657
|
+
Duration,
|
|
4668
4658
|
Lazy,
|
|
4669
4659
|
RemovalPolicy,
|
|
4670
4660
|
Stack,
|
|
4671
4661
|
} from 'aws-cdk-lib';
|
|
4672
|
-
import {
|
|
4662
|
+
import {
|
|
4663
|
+
Distribution,
|
|
4664
|
+
HeadersFrameOption,
|
|
4665
|
+
HeadersReferrerPolicy,
|
|
4666
|
+
ResponseHeadersPolicy,
|
|
4667
|
+
ViewerProtocolPolicy,
|
|
4668
|
+
} from 'aws-cdk-lib/aws-cloudfront';
|
|
4673
4669
|
import { S3BucketOrigin } from 'aws-cdk-lib/aws-cloudfront-origins';
|
|
4674
4670
|
import {
|
|
4675
4671
|
BlockPublicAccess,
|
|
@@ -4678,7 +4674,11 @@ import {
|
|
|
4678
4674
|
IBucket,
|
|
4679
4675
|
ObjectOwnership,
|
|
4680
4676
|
} from 'aws-cdk-lib/aws-s3';
|
|
4681
|
-
import {
|
|
4677
|
+
import {
|
|
4678
|
+
BucketDeployment,
|
|
4679
|
+
CacheControl,
|
|
4680
|
+
Source,
|
|
4681
|
+
} from 'aws-cdk-lib/aws-s3-deployment';
|
|
4682
4682
|
import { Construct } from 'constructs';
|
|
4683
4683
|
import { RuntimeConfig } from './runtime-config.js';
|
|
4684
4684
|
import { Key } from 'aws-cdk-lib/aws-kms';
|
|
@@ -4778,6 +4778,33 @@ export class StaticWebsite extends Construct {
|
|
|
4778
4778
|
'Distribution log bucket does not need versioning enabled',
|
|
4779
4779
|
);
|
|
4780
4780
|
|
|
4781
|
+
// Security headers applied to all responses. A Content-Security-Policy is
|
|
4782
|
+
// intentionally omitted as it is application specific - add one for your app.
|
|
4783
|
+
const responseHeadersPolicy = new ResponseHeadersPolicy(
|
|
4784
|
+
this,
|
|
4785
|
+
'ResponseHeadersPolicy',
|
|
4786
|
+
{
|
|
4787
|
+
securityHeadersBehavior: {
|
|
4788
|
+
strictTransportSecurity: {
|
|
4789
|
+
accessControlMaxAge: Duration.days(730),
|
|
4790
|
+
includeSubdomains: true,
|
|
4791
|
+
preload: true,
|
|
4792
|
+
override: true,
|
|
4793
|
+
},
|
|
4794
|
+
contentTypeOptions: { override: true },
|
|
4795
|
+
frameOptions: {
|
|
4796
|
+
frameOption: HeadersFrameOption.DENY,
|
|
4797
|
+
override: true,
|
|
4798
|
+
},
|
|
4799
|
+
referrerPolicy: {
|
|
4800
|
+
referrerPolicy:
|
|
4801
|
+
HeadersReferrerPolicy.STRICT_ORIGIN_WHEN_CROSS_ORIGIN,
|
|
4802
|
+
override: true,
|
|
4803
|
+
},
|
|
4804
|
+
},
|
|
4805
|
+
},
|
|
4806
|
+
);
|
|
4807
|
+
|
|
4781
4808
|
const defaultRootObject = 'index.html';
|
|
4782
4809
|
this.cloudFrontDistribution = new Distribution(
|
|
4783
4810
|
this,
|
|
@@ -4789,6 +4816,7 @@ export class StaticWebsite extends Construct {
|
|
|
4789
4816
|
defaultBehavior: {
|
|
4790
4817
|
origin: S3BucketOrigin.withOriginAccessControl(this.websiteBucket),
|
|
4791
4818
|
viewerProtocolPolicy: ViewerProtocolPolicy.REDIRECT_TO_HTTPS,
|
|
4819
|
+
responseHeadersPolicy,
|
|
4792
4820
|
},
|
|
4793
4821
|
defaultRootObject,
|
|
4794
4822
|
errorResponses: [
|
|
@@ -4813,8 +4841,17 @@ export class StaticWebsite extends Construct {
|
|
|
4813
4841
|
|
|
4814
4842
|
// Deploy Website
|
|
4815
4843
|
this.bucketDeployment = new BucketDeployment(this, 'WebsiteDeployment', {
|
|
4844
|
+
sources: [Source.asset(websiteFilePath)],
|
|
4845
|
+
destinationBucket: this.websiteBucket,
|
|
4846
|
+
// Files in the distribution's edge caches will be invalidated after files are uploaded to the destination bucket.
|
|
4847
|
+
distribution: this.cloudFrontDistribution,
|
|
4848
|
+
memoryLimit: 1024,
|
|
4849
|
+
});
|
|
4850
|
+
|
|
4851
|
+
// Deploy runtime-config.json separately so it is never cached - clients
|
|
4852
|
+
// must always fetch the latest configuration.
|
|
4853
|
+
new BucketDeployment(this, 'RuntimeConfigDeployment', {
|
|
4816
4854
|
sources: [
|
|
4817
|
-
Source.asset(websiteFilePath),
|
|
4818
4855
|
Source.data(
|
|
4819
4856
|
DEFAULT_RUNTIME_CONFIG_FILENAME,
|
|
4820
4857
|
Lazy.string({
|
|
@@ -4826,8 +4863,9 @@ export class StaticWebsite extends Construct {
|
|
|
4826
4863
|
),
|
|
4827
4864
|
],
|
|
4828
4865
|
destinationBucket: this.websiteBucket,
|
|
4829
|
-
// Files in the distribution's edge caches will be invalidated after files are uploaded to the destination bucket.
|
|
4830
4866
|
distribution: this.cloudFrontDistribution,
|
|
4867
|
+
cacheControl: [CacheControl.noCache()],
|
|
4868
|
+
prune: false,
|
|
4831
4869
|
memoryLimit: 1024,
|
|
4832
4870
|
});
|
|
4833
4871
|
|
|
@@ -4973,19 +5011,19 @@ root &&
|
|
|
4973
5011
|
|
|
4974
5012
|
exports[`react-website generator > should handle npm scope prefix correctly > scoped-dependencies 1`] = `
|
|
4975
5013
|
{
|
|
4976
|
-
"@cloudscape-design/board-components": "3.0.
|
|
4977
|
-
"@cloudscape-design/components": "3.0.
|
|
5014
|
+
"@cloudscape-design/board-components": "3.0.189",
|
|
5015
|
+
"@cloudscape-design/components": "3.0.1308",
|
|
4978
5016
|
"@cloudscape-design/global-styles": "1.0.59",
|
|
4979
|
-
"@tanstack/react-router": "1.170.
|
|
4980
|
-
"aws-cdk-lib": "2.
|
|
5017
|
+
"@tanstack/react-router": "1.170.15",
|
|
5018
|
+
"aws-cdk-lib": "2.258.0",
|
|
4981
5019
|
"constructs": "10.6.0",
|
|
4982
|
-
"react": "19.2.
|
|
4983
|
-
"react-dom": "19.2.
|
|
4984
|
-
"tailwindcss": "4.
|
|
5020
|
+
"react": "19.2.7",
|
|
5021
|
+
"react-dom": "19.2.7",
|
|
5022
|
+
"tailwindcss": "4.2.2",
|
|
4985
5023
|
}
|
|
4986
5024
|
`;
|
|
4987
5025
|
|
|
4988
|
-
exports[`react-website generator
|
|
5026
|
+
exports[`react-website generator ux tests > Cloudscape > should update package.json with required dependencies > test-app/src/components/AppLayout/index.tsx 1`] = `
|
|
4989
5027
|
"import * as React from 'react';
|
|
4990
5028
|
import { createContext, useCallback, useEffect, useState } from 'react';
|
|
4991
5029
|
import Config from '../../config';
|
|
@@ -5142,21 +5180,21 @@ export default AppLayout;
|
|
|
5142
5180
|
"
|
|
5143
5181
|
`;
|
|
5144
5182
|
|
|
5145
|
-
exports[`react-website generator
|
|
5183
|
+
exports[`react-website generator ux tests > Cloudscape > should update package.json with required dependencies > test-app/src/components/alert.tsx 1`] = `
|
|
5146
5184
|
"import { Alert as CloudscapeAlert } from '@cloudscape-design/components';
|
|
5147
5185
|
|
|
5148
5186
|
export const Alert = CloudscapeAlert;
|
|
5149
5187
|
"
|
|
5150
5188
|
`;
|
|
5151
5189
|
|
|
5152
|
-
exports[`react-website generator
|
|
5190
|
+
exports[`react-website generator ux tests > Cloudscape > should update package.json with required dependencies > test-app/src/components/spinner.tsx 1`] = `
|
|
5153
5191
|
"import { Spinner as CloudscapeSpinner } from '@cloudscape-design/components';
|
|
5154
5192
|
|
|
5155
5193
|
export const Spinner = CloudscapeSpinner;
|
|
5156
5194
|
"
|
|
5157
5195
|
`;
|
|
5158
5196
|
|
|
5159
|
-
exports[`react-website generator
|
|
5197
|
+
exports[`react-website generator ux tests > Cloudscape > should update package.json with required dependencies > test-app/src/config.ts 1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LjU0LDAsMCwwLDQwLjIzLTUxLjIsNDc3Ljg0LDQ3Ny44NCwwLDAsMCw2NS0xMC4wNXExLjQ3LDUuOTQsMi42LDExLjY0aDBDMzgzLjgxLDM3Ny41OCwzODQuNSwzOTkuNTYsMzgxLjMyLDQxNi43NVptMTcuNC0xMDIuNjRoMGMtMi42Mi44Ny01LjMyLDEuNzEtOC4wNiwyLjUzYTQ4My4yNiw0ODMuMjYsMCwwLDAtMjQuMzEtNjAuOTQsNDgxLjUyLDQ4MS41MiwwLDAsMCwyMy4zNi02MC4wNmM0LjkxLDEuNDMsOS42OCwyLjkzLDE0LjI3LDQuNTIsNDQuNDIsMTUuMzIsNzEuNTIsMzgsNzEuNTIsNTUuNDNDNDc1LjUsMjc0LjE5LDQ0Ni4yMywyOTguMzMsMzk4LjcyLDMxNC4xMVoiLz4KDTxwYXRoIGQ9Ik0yNTYsMjk4LjU1YTQzLDQzLDAsMSwwLTQyLjg2LTQzQTQyLjkxLDQyLjkxLDAsMCwwLDI1NiwyOTguNTVaIi8+Cg08L2c+Cg08L3N2Zz4=',
|
|
@@ -5164,7 +5202,7 @@ exports[`react-website generator uxProvider tests > Cloudscape > should update p
|
|
|
5164
5202
|
"
|
|
5165
5203
|
`;
|
|
5166
5204
|
|
|
5167
|
-
exports[`react-website generator
|
|
5205
|
+
exports[`react-website generator ux tests > Cloudscape > should update package.json with required dependencies > test-app/src/hooks/useAppLayout.tsx 1`] = `
|
|
5168
5206
|
"import { useContext } from 'react';
|
|
5169
5207
|
import { AppLayoutContext } from '../components/AppLayout';
|
|
5170
5208
|
|
|
@@ -5173,7 +5211,7 @@ export const useAppLayout = (): AppLayoutContext =>
|
|
|
5173
5211
|
"
|
|
5174
5212
|
`;
|
|
5175
5213
|
|
|
5176
|
-
exports[`react-website generator
|
|
5214
|
+
exports[`react-website generator ux tests > Cloudscape > should update package.json with required dependencies > test-app/src/main.tsx 1`] = `
|
|
5177
5215
|
"import React from 'react';
|
|
5178
5216
|
import { createRoot } from 'react-dom/client';
|
|
5179
5217
|
import { I18nProvider } from '@cloudscape-design/components/i18n';
|
|
@@ -5213,7 +5251,7 @@ root &&
|
|
|
5213
5251
|
"
|
|
5214
5252
|
`;
|
|
5215
5253
|
|
|
5216
|
-
exports[`react-website generator
|
|
5254
|
+
exports[`react-website generator ux tests > Cloudscape > should update package.json with required dependencies > test-app/src/routeTree.gen.ts 1`] = `
|
|
5217
5255
|
"/* eslint-disable */
|
|
5218
5256
|
|
|
5219
5257
|
// @ts-nocheck
|
|
@@ -5276,7 +5314,7 @@ export const routeTree = rootRouteImport
|
|
|
5276
5314
|
"
|
|
5277
5315
|
`;
|
|
5278
5316
|
|
|
5279
|
-
exports[`react-website generator
|
|
5317
|
+
exports[`react-website generator ux tests > Cloudscape > should update package.json with required dependencies > test-app/src/routes/__root.tsx 1`] = `
|
|
5280
5318
|
"import { createRootRouteWithContext } from '@tanstack/react-router';
|
|
5281
5319
|
import AppLayout from '../components/AppLayout';
|
|
5282
5320
|
import { RouterProviderContext } from '../main';
|
|
@@ -5292,7 +5330,7 @@ export const Route = createRootRouteWithContext<RouterProviderContext>()({
|
|
|
5292
5330
|
"
|
|
5293
5331
|
`;
|
|
5294
5332
|
|
|
5295
|
-
exports[`react-website generator
|
|
5333
|
+
exports[`react-website generator ux tests > Cloudscape > should update package.json with required dependencies > test-app/src/routes/index.tsx 1`] = `
|
|
5296
5334
|
"import {
|
|
5297
5335
|
ContentLayout,
|
|
5298
5336
|
Header,
|
|
@@ -5317,13 +5355,13 @@ function RouteComponent() {
|
|
|
5317
5355
|
"
|
|
5318
5356
|
`;
|
|
5319
5357
|
|
|
5320
|
-
exports[`react-website generator
|
|
5358
|
+
exports[`react-website generator ux tests > Cloudscape > should update package.json with required dependencies > test-app/src/styles.css 1`] = `
|
|
5321
5359
|
"@import 'tailwindcss';
|
|
5322
5360
|
/* You can add global styles to this file, and also import other style files */
|
|
5323
5361
|
"
|
|
5324
5362
|
`;
|
|
5325
5363
|
|
|
5326
|
-
exports[`react-website generator
|
|
5364
|
+
exports[`react-website generator ux tests > Shadcn > should update package.json with required dependencies > test-app/src/components/AppLayout/index.tsx 1`] = `
|
|
5327
5365
|
"import * as React from 'react';
|
|
5328
5366
|
import {
|
|
5329
5367
|
SidebarInset,
|
|
@@ -5446,7 +5484,7 @@ export default AppLayout;
|
|
|
5446
5484
|
"
|
|
5447
5485
|
`;
|
|
5448
5486
|
|
|
5449
|
-
exports[`react-website generator
|
|
5487
|
+
exports[`react-website generator ux tests > Shadcn > should update package.json with required dependencies > test-app/src/components/alert.tsx 1`] = `
|
|
5450
5488
|
"import React from 'react';
|
|
5451
5489
|
import {
|
|
5452
5490
|
Alert as ShadcnAlert,
|
|
@@ -5480,7 +5518,7 @@ export const Alert: React.FC<AlertProps> = ({
|
|
|
5480
5518
|
"
|
|
5481
5519
|
`;
|
|
5482
5520
|
|
|
5483
|
-
exports[`react-website generator
|
|
5521
|
+
exports[`react-website generator ux tests > Shadcn > should update package.json with required dependencies > test-app/src/components/app-sidebar.tsx 1`] = `
|
|
5484
5522
|
"import { Home } from 'lucide-react';
|
|
5485
5523
|
|
|
5486
5524
|
import {
|
|
@@ -5533,14 +5571,14 @@ export function AppSidebar() {
|
|
|
5533
5571
|
"
|
|
5534
5572
|
`;
|
|
5535
5573
|
|
|
5536
|
-
exports[`react-website generator
|
|
5574
|
+
exports[`react-website generator ux tests > Shadcn > should update package.json with required dependencies > test-app/src/components/spinner.tsx 1`] = `
|
|
5537
5575
|
"import { Spinner as ShadcnSpinner } from ':proj/common-shadcn/components/ui/spinner';
|
|
5538
5576
|
|
|
5539
5577
|
export const Spinner = ShadcnSpinner;
|
|
5540
5578
|
"
|
|
5541
5579
|
`;
|
|
5542
5580
|
|
|
5543
|
-
exports[`react-website generator
|
|
5581
|
+
exports[`react-website generator ux tests > Shadcn > should update package.json with required dependencies > test-app/src/config.ts 1`] = `
|
|
5544
5582
|
"export default {
|
|
5545
5583
|
applicationName: 'test-app',
|
|
5546
5584
|
log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S0xMC4wNXExLjQ3LDUuOTQsMi42LDExLjY0aDBDMzgzLjgxLDM3Ny41OCwzODQuNSwzOTkuNTYsMzgxLjMyLDQxNi43NVptMTcuNC0xMDIuNjRoMGMtMi42Mi44Ny01LjMyLDEuNzEtOC4wNiwyLjUzYTQ4My4yNiw0ODMuMjYsMCwwLDAtMjQuMzEtNjAuOTQsNDgxLjUyLDQ4MS41MiwwLDAsMCwyMy4zNi02MC4wNmM0LjkxLDEuNDMsOS42OCwyLjkzLDE0LjI3LDQuNTIsNDQuNDIsMTUuMzIsNzEuNTIsMzgsNzEuNTIsNTUuNDNDNDc1LjUsMjc0LjE5LDQ0Ni4yMywyOTguMzMsMzk4LjcyLDMxNC4xMVoiLz4KDTxwYXRoIGQ9Ik0yNTYsMjk4LjU1YTQzLDQzLDAsMSwwLTQyLjg2LTQzQTQyLjkxLDQyLjkxLDAsMCwwLDI1NiwyOTguNTVaIi8+Cg08L2c+Cg08L3N2Zz4=',
|
|
@@ -5548,7 +5586,7 @@ exports[`react-website generator uxProvider tests > Shadcn > should update packa
|
|
|
5548
5586
|
"
|
|
5549
5587
|
`;
|
|
5550
5588
|
|
|
5551
|
-
exports[`react-website generator
|
|
5589
|
+
exports[`react-website generator ux tests > Shadcn > should update package.json with required dependencies > test-app/src/main.tsx 1`] = `
|
|
5552
5590
|
"import React from 'react';
|
|
5553
5591
|
import { createRoot } from 'react-dom/client';
|
|
5554
5592
|
import { RouterProvider, createRouter } from '@tanstack/react-router';
|
|
@@ -5584,7 +5622,7 @@ root &&
|
|
|
5584
5622
|
"
|
|
5585
5623
|
`;
|
|
5586
5624
|
|
|
5587
|
-
exports[`react-website generator
|
|
5625
|
+
exports[`react-website generator ux tests > Shadcn > should update package.json with required dependencies > test-app/src/routeTree.gen.ts 1`] = `
|
|
5588
5626
|
"/* eslint-disable */
|
|
5589
5627
|
|
|
5590
5628
|
// @ts-nocheck
|
|
@@ -5647,7 +5685,7 @@ export const routeTree = rootRouteImport
|
|
|
5647
5685
|
"
|
|
5648
5686
|
`;
|
|
5649
5687
|
|
|
5650
|
-
exports[`react-website generator
|
|
5688
|
+
exports[`react-website generator ux tests > Shadcn > should update package.json with required dependencies > test-app/src/routes/__root.tsx 1`] = `
|
|
5651
5689
|
"import { createRootRouteWithContext } from '@tanstack/react-router';
|
|
5652
5690
|
import AppLayout from '../components/AppLayout';
|
|
5653
5691
|
import { RouterProviderContext } from '../main';
|
|
@@ -5663,7 +5701,7 @@ export const Route = createRootRouteWithContext<RouterProviderContext>()({
|
|
|
5663
5701
|
"
|
|
5664
5702
|
`;
|
|
5665
5703
|
|
|
5666
|
-
exports[`react-website generator
|
|
5704
|
+
exports[`react-website generator ux tests > Shadcn > should update package.json with required dependencies > test-app/src/routes/index.tsx 1`] = `
|
|
5667
5705
|
"import { createFileRoute } from '@tanstack/react-router';
|
|
5668
5706
|
|
|
5669
5707
|
export const Route = createFileRoute('/')({
|
|
@@ -5683,8 +5721,7 @@ function RouteComponent() {
|
|
|
5683
5721
|
"
|
|
5684
5722
|
`;
|
|
5685
5723
|
|
|
5686
|
-
exports[`react-website generator
|
|
5724
|
+
exports[`react-website generator ux tests > Shadcn > should update package.json with required dependencies > test-app/src/styles.css 1`] = `
|
|
5687
5725
|
"@import '../../packages/common/shadcn/src/styles/globals.css';
|
|
5688
|
-
@source './**/*.{ts,tsx}';
|
|
5689
|
-
"
|
|
5726
|
+
@source './**/*.{ts,tsx}';"
|
|
5690
5727
|
`;
|