@aws/nx-plugin 0.17.0 → 0.18.2
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/README.md +128 -37
- package/generators.json +30 -9
- package/package.json +1 -1
- package/src/cloudscape-website/app/__snapshots__/generator.spec.ts.snap +2 -0
- package/src/cloudscape-website/app/files/common/constructs/src/core/static-website.ts.template +1 -0
- package/src/cloudscape-website/app/generator.d.ts +2 -0
- package/src/cloudscape-website/app/generator.js +19 -10
- package/src/cloudscape-website/app/generator.js.map +1 -1
- package/src/cloudscape-website/cognito-auth/__snapshots__/generator.spec.ts.snap +2 -0
- package/src/cloudscape-website/cognito-auth/generator.d.ts +2 -0
- package/src/cloudscape-website/cognito-auth/generator.js +10 -4
- package/src/cloudscape-website/cognito-auth/generator.js.map +1 -1
- package/src/cloudscape-website/runtime-config/__snapshots__/generator.spec.ts.snap +2 -1
- package/src/cloudscape-website/runtime-config/generator.d.ts +2 -0
- package/src/cloudscape-website/runtime-config/generator.js +5 -0
- package/src/cloudscape-website/runtime-config/generator.js.map +1 -1
- package/src/infra/app/__snapshots__/generator.spec.ts.snap +15 -20
- package/src/infra/app/files/app/src/main.ts.template +2 -3
- package/src/infra/app/generator.d.ts +2 -0
- package/src/infra/app/generator.js +12 -5
- package/src/infra/app/generator.js.map +1 -1
- package/src/license/generator.d.ts +2 -0
- package/src/license/generator.js +5 -0
- package/src/license/generator.js.map +1 -1
- package/src/license/sync/generator.d.ts +1 -1
- package/src/license/sync/generator.js +3 -1
- package/src/license/sync/generator.js.map +1 -1
- package/src/py/fast-api/generator.d.ts +2 -0
- package/src/py/fast-api/generator.js +12 -7
- package/src/py/fast-api/generator.js.map +1 -1
- package/src/py/fast-api/react/generator.d.ts +2 -0
- package/src/py/fast-api/react/generator.js +8 -4
- package/src/py/fast-api/react/generator.js.map +1 -1
- package/src/py/lambda-function/__snapshots__/generator.spec.ts.snap +66 -0
- package/src/py/lambda-function/files/common/constructs/src/app/lambda-functions/__constructFunctionKebabCase__.ts.template +24 -0
- package/src/py/lambda-function/files/handler/__lambdaFunctionSnakeCase__.py.template +34 -0
- package/src/py/lambda-function/files/tests/test___lambdaFunctionSnakeCase__.py.template +2 -0
- package/src/py/lambda-function/generator.d.ts +27 -0
- package/src/py/lambda-function/generator.js +143 -0
- package/src/py/lambda-function/generator.js.map +1 -0
- package/src/py/lambda-function/schema.d.ts +53 -0
- package/src/py/lambda-function/schema.json +83 -0
- package/src/py/project/generator.d.ts +2 -0
- package/src/py/project/generator.js +8 -3
- package/src/py/project/generator.js.map +1 -1
- package/src/trpc/backend/generator.d.ts +2 -0
- package/src/trpc/backend/generator.js +12 -6
- package/src/trpc/backend/generator.js.map +1 -1
- package/src/trpc/react/generator.d.ts +2 -0
- package/src/trpc/react/generator.js +5 -0
- package/src/trpc/react/generator.js.map +1 -1
- package/src/ts/lib/generator.d.ts +2 -0
- package/src/ts/lib/generator.js +6 -2
- package/src/ts/lib/generator.js.map +1 -1
- package/src/utils/__snapshots__/shared-constructs.spec.ts.snap +90 -0
- package/src/utils/files/common/constructs/src/core/app.ts.template +24 -0
- package/src/utils/files/common/constructs/src/core/index.ts.template +1 -0
- package/src/utils/http-api.js +5 -5
- package/src/utils/http-api.js.map +1 -1
- package/src/utils/metrics.d.ts +13 -0
- package/src/utils/metrics.js +49 -0
- package/src/utils/metrics.js.map +1 -0
- package/src/utils/names.d.ts +1 -0
- package/src/utils/names.js +4 -1
- package/src/utils/names.js.map +1 -1
- package/src/utils/nx.d.ts +8 -6
- package/src/utils/nx.js +27 -8
- package/src/utils/nx.js.map +1 -1
- package/src/utils/object.d.ts +9 -0
- package/src/utils/object.js +15 -0
- package/src/utils/object.js.map +1 -0
- package/src/utils/shared-constructs-constants.d.ts +9 -0
- package/src/utils/shared-constructs-constants.js +13 -0
- package/src/utils/shared-constructs-constants.js.map +1 -0
- package/src/utils/shared-constructs.d.ts +0 -5
- package/src/utils/shared-constructs.js +19 -24
- package/src/utils/shared-constructs.js.map +1 -1
- package/src/utils/versions.d.ts +2 -2
- package/src/utils/versions.js +1 -1
- package/src/utils/versions.js.map +1 -1
package/README.md
CHANGED
|
@@ -1,63 +1,154 @@
|
|
|
1
|
-
|
|
1
|
+
<div align="center">
|
|
2
|
+
<h1>NX plugin for AWS - @aws/nx-plugin</h1>
|
|
3
|
+
<h3>Quickly bootstrap and build AWS projects easily</h3>
|
|
4
|
+
<a href="https://opensource.org/licenses/Apache-2.0">
|
|
5
|
+
<img
|
|
6
|
+
src="https://img.shields.io/badge/License-Apache%202.0-yellowgreen.svg"
|
|
7
|
+
alt="Apache 2.0 License"
|
|
8
|
+
/>
|
|
9
|
+
</a>
|
|
10
|
+
<a href="https://codecov.io/gh/awslabs/nx-plugin-for-aws">
|
|
11
|
+
<img src="https://codecov.io/gh/awslabs/nx-plugin-for-aws/graph/badge.svg?token=X27pgFfxuQ" />
|
|
12
|
+
</a>
|
|
13
|
+
<a href="https://gitpod.io/new/?workspaceClass=g1-large#https://github.com/awslabs/nx-plugin-for-aws">
|
|
14
|
+
<img
|
|
15
|
+
src="https://img.shields.io/badge/Gitpod-ready--to--code-blue?logo=gitpod"
|
|
16
|
+
alt="Gitpod ready-to-code"
|
|
17
|
+
/>
|
|
18
|
+
</a>
|
|
19
|
+
<a href="https://github.com/awslabs/nx-plugin-for-aws/actions/workflows/ci.yml">
|
|
20
|
+
<img
|
|
21
|
+
src="https://github.com/awslabs/nx-plugin-for-aws/actions/workflows/ci.yml/badge.svg"
|
|
22
|
+
alt="Release badge"
|
|
23
|
+
/>
|
|
24
|
+
</a>
|
|
25
|
+
<a href="https://github.com/awslabs/nx-plugin-for-aws/commits/main">
|
|
26
|
+
<img
|
|
27
|
+
src="https://img.shields.io/github/commit-activity/w/awslabs/nx-plugin-for-aws"
|
|
28
|
+
alt="Commit activity"
|
|
29
|
+
/>
|
|
30
|
+
</a>
|
|
31
|
+
<br />
|
|
32
|
+
<br />
|
|
33
|
+
<figure>
|
|
34
|
+
<img src="docs/src/content/docs/assets/website-generator.gif" alt="Demo" />
|
|
35
|
+
</figure>
|
|
36
|
+
👉 See full documentation on <a href="https://awslabs.github.io/nx-plugin-for-aws">https://awslabs.github.io/nx-plugin-for-aws</a> 👈
|
|
37
|
+
</div>
|
|
38
|
+
|
|
39
|
+
## Intro
|
|
40
|
+
|
|
41
|
+
[@aws/nx-plugin](https://github.com/awslabs/nx-plugin-for-aws) is a collection of generators to help you build cloud-native applications with AWS.
|
|
42
|
+
|
|
43
|
+
## Key Features
|
|
44
|
+
|
|
45
|
+
- **Declarative**: Generate code that follows best practices for AWS cloud development.
|
|
46
|
+
- **Component-Based**: Add components to your project as needed, from React websites to serverless APIs using either the CLI or UI.
|
|
47
|
+
- **Learn Once, Use Anywhere**: Consistent patterns across different AWS services and application types.
|
|
48
|
+
- **Open for modification**: All code generated is your code and can be edited as you see fit.
|
|
49
|
+
- **Type safety**: Type-safety is employed to support IDE completions and reduce the number of runtime errors encountered.
|
|
50
|
+
- **Minimal dependencies**: Getting up and running is simple and only requires langugage level global dependencies.
|
|
2
51
|
|
|
3
|
-
|
|
52
|
+
## Available Generators
|
|
4
53
|
|
|
5
|
-
|
|
54
|
+
- `ts#project` - Generate a new TypeScript library.
|
|
55
|
+
- `ts#infra` - Generate a Typescript AWS CDK infrastructure project for your application.
|
|
56
|
+
- `ts#cloudscape-website` - Generate a new Cloudscape/React/Vite based web application.
|
|
57
|
+
- `ts#cloudscape-website#auth` - Add AWS Cognito authentication to your Cloudscape website.
|
|
58
|
+
- `ts#trpc-api` - Generate a tRPC backend service with Amazon API Gateway/AWS Lambda integration and [AWS Powertools](https://github.com/aws-powertools/powertools-lambda-typescript) pre-configured.
|
|
59
|
+
- `py#project` - Generate a uv based Python project.
|
|
60
|
+
- `py#fast-api` - Generate a FastAPI backend service with [AWS Powertools](https://github.com/aws-powertools/powertools-lambda-python) pre-configured.
|
|
61
|
+
- `py#lambda-function` - Add a lambda function to an existing python project with optional type-safe event sources.
|
|
62
|
+
- `api-connection` - Connect frontend applications to backend APIs.
|
|
63
|
+
- `license` - Automatically manage LICENSE files and source code headers in your workspace.
|
|
6
64
|
|
|
7
|
-
|
|
65
|
+
## Getting started
|
|
8
66
|
|
|
9
|
-
|
|
10
|
-
2. Creates new files from templates
|
|
11
|
-
3. Updates existing files when needed
|
|
12
|
-
4. Follows project conventions automatically
|
|
67
|
+
@aws/nx-plugin has been designed for gradual adoption from the start, and **you can use as little or as much of it as you need**.
|
|
13
68
|
|
|
14
|
-
|
|
69
|
+
1. Create a new NX workspace
|
|
15
70
|
|
|
16
|
-
|
|
71
|
+
```bash
|
|
72
|
+
npx create-nx-workspace@~20.6.3 demo --pm=pnpm --preset=ts --ci=skip --formatter=prettier
|
|
73
|
+
cd demo
|
|
74
|
+
```
|
|
17
75
|
|
|
18
|
-
|
|
76
|
+
2. Install the `@aws/nx-plugin`
|
|
19
77
|
|
|
20
|
-
|
|
78
|
+
```bash
|
|
79
|
+
pnpm add -Dw @aws/nx-plugin
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
3. Add components:
|
|
21
83
|
|
|
22
84
|
```bash
|
|
23
|
-
|
|
85
|
+
# Generate a tRPC API backend
|
|
86
|
+
pnpm nx g @aws/nx-plugin:ts#trpc-api
|
|
87
|
+
|
|
88
|
+
# Generate a Cloudscape website
|
|
89
|
+
pnpm nx g @aws/nx-plugin:ts#cloudscape-website
|
|
90
|
+
|
|
91
|
+
# Connect the frontend to the backend
|
|
92
|
+
pnpm nx g @aws/nx-plugin:api-connection
|
|
93
|
+
|
|
94
|
+
# Add authentication to your website
|
|
95
|
+
pnpm nx g @aws/nx-plugin:ts#cloudscape-website#auth
|
|
96
|
+
|
|
97
|
+
# Generate AWS CDK infrastructure
|
|
98
|
+
pnpm nx g @aws/nx-plugin:ts#infra
|
|
24
99
|
```
|
|
25
100
|
|
|
26
|
-
###
|
|
101
|
+
### Additional resources
|
|
27
102
|
|
|
28
|
-
|
|
103
|
+
- Use [Quick Start](https://awslabs.github.io/nx-plugin-for-aws/get_started/quick-start/) to get a taste of @aws/nx-plugin.
|
|
104
|
+
- [Build a Dungeon Adventure Game](https://awslabs.github.io/nx-plugin-for-aws/get_started/tutorials/dungeon-game/overview/) to get an in-depth guided tutorial on how to use the @aws/nx-plugin.
|
|
105
|
+
- [Add @aws/nx-plugin to your existing project](https://awslabs.github.io/nx-plugin-for-aws/get_started/tutorials/existing-project/)
|
|
29
106
|
|
|
30
|
-
|
|
31
|
-
- JetBrains IDEs: [Nx Console for JetBrains](https://plugins.jetbrains.com/plugin/21060-nx-console)
|
|
107
|
+
## Documentation Translation
|
|
32
108
|
|
|
33
|
-
The
|
|
34
|
-
- Interactive generator configuration
|
|
35
|
-
- Command autocompletion
|
|
36
|
-
- Visual project graph
|
|
37
|
-
- Integrated task runner
|
|
109
|
+
The project supports automatic translation of documentation using AWS Bedrock's Deepseek & Haiku 3.5 models. Documentation is translated from English to multiple languages (currently Japanese, with support for French, Spanish, German, Chinese, and Korean).
|
|
38
110
|
|
|
39
|
-
|
|
111
|
+
> **_NOTE:_** It is important that only files in english (en folder) are modified directly as the translated files are generating using english as a base.
|
|
40
112
|
|
|
41
|
-
|
|
113
|
+
### Running Translations Locally
|
|
42
114
|
|
|
43
|
-
|
|
115
|
+
> **_NOTE:_** Ensure you have your aws cli configured to an AWS account with DeepSeek/Haiku 3.5 Bedrock model access before continuing.
|
|
116
|
+
|
|
117
|
+
To translate documentation locally:
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
# Translate only changed files
|
|
121
|
+
pnpm tsx ./scripts/translate.ts
|
|
122
|
+
|
|
123
|
+
# Translate all files
|
|
124
|
+
pnpm tsx ./scripts/translate.ts --all
|
|
125
|
+
|
|
126
|
+
# Translate to specific languages
|
|
127
|
+
pnpm tsx ./scripts/translate.ts --languages jp,fr,es
|
|
128
|
+
|
|
129
|
+
# Show what would be translated without actually translating
|
|
130
|
+
pnpm tsx ./scripts/translate.ts --dry-run
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
### GitHub Workflow
|
|
134
|
+
|
|
135
|
+
A GitHub workflow automatically translates documentation when changes are made to English documentation files in pull requests. The workflow:
|
|
44
136
|
|
|
45
|
-
|
|
137
|
+
1. Detects changes to English documentation files
|
|
138
|
+
2. Translates the changed files using DeepSeek and Haiku 3.5 on AWS Bedrock
|
|
139
|
+
3. Commits the translations back to the source branch
|
|
140
|
+
4. Updates the PR with files translated
|
|
46
141
|
|
|
47
|
-
|
|
48
|
-
- [Cognito Authentication](src/cloudscape-website/cognito-auth/README.md) - Add AWS Cognito authentication to your Cloudscape website
|
|
49
|
-
- [Runtime Configuration](src/cloudscape-website/runtime-config/README.md) - Add runtime configuration capabilities to your Cloudscape website
|
|
142
|
+
## Contributing
|
|
50
143
|
|
|
51
|
-
|
|
144
|
+
The main purpose of this repository is to continue evolving @aws/nx-plugin, making it faster and easier to use. Development happens in the open on GitHub, and we are grateful to the community for contributing bugfixes and improvements.
|
|
52
145
|
|
|
53
|
-
|
|
146
|
+
Read our [Contributing Guide](/CONTRIBUTING.md) to learn about our development process, how to propose bugfixes and improvements, and how to build and test your changes to @aws/nx-plugin.
|
|
54
147
|
|
|
55
|
-
|
|
148
|
+
## Code of Conduct
|
|
56
149
|
|
|
57
|
-
|
|
58
|
-
- [tRPC React](src/trpc/react/README.md) - Add tRPC client integration to your React application
|
|
150
|
+
This project has adopted a Code of Conduct that we expect project participants to adhere to. Please read the [Code of Conduct](/CODE_OF_CONDUCT.md) so that you can understand what actions will and will not be tolerated.
|
|
59
151
|
|
|
60
|
-
|
|
152
|
+
## License
|
|
61
153
|
|
|
62
|
-
- [
|
|
63
|
-
- [CJS to ESM](src/ts/cjs-to-esm/README.md) - Convert CommonJS modules to ECMAScript modules
|
|
154
|
+
@aws/nx-plugin is [Apache 2.0 licensed](/LICENSE).
|
package/generators.json
CHANGED
|
@@ -6,83 +6,104 @@
|
|
|
6
6
|
"ts#project": {
|
|
7
7
|
"factory": "./src/ts/lib/generator",
|
|
8
8
|
"schema": "./src/ts/lib/schema.json",
|
|
9
|
-
"description": "Generates a TypeScript project"
|
|
9
|
+
"description": "Generates a TypeScript project",
|
|
10
|
+
"metric": "g1"
|
|
10
11
|
},
|
|
11
12
|
"py#project": {
|
|
12
13
|
"factory": "./src/py/project/generator",
|
|
13
14
|
"schema": "./src/py/project/schema.json",
|
|
14
|
-
"description": "Generates a Python project"
|
|
15
|
+
"description": "Generates a Python project",
|
|
16
|
+
"metric": "g2"
|
|
15
17
|
},
|
|
16
18
|
"py#fast-api": {
|
|
17
19
|
"factory": "./src/py/fast-api/generator",
|
|
18
20
|
"schema": "./src/py/fast-api/schema.json",
|
|
19
|
-
"description": "Generates a FastAPI Python project"
|
|
21
|
+
"description": "Generates a FastAPI Python project",
|
|
22
|
+
"metric": "g3"
|
|
20
23
|
},
|
|
21
24
|
"py#fast-api#react-connection": {
|
|
22
25
|
"factory": "./src/py/fast-api/react/generator",
|
|
23
26
|
"schema": "./src/py/fast-api/react/schema.json",
|
|
24
27
|
"description": "Integrates a FastAPI with a React website",
|
|
28
|
+
"metric": "g4",
|
|
25
29
|
"hidden": true
|
|
26
30
|
},
|
|
27
31
|
"ts#cloudscape-website": {
|
|
28
32
|
"factory": "./src/cloudscape-website/app/generator",
|
|
29
33
|
"schema": "./src/cloudscape-website/app/schema.json",
|
|
30
|
-
"description": "Generates a React static website based on Cloudscape"
|
|
34
|
+
"description": "Generates a React static website based on Cloudscape",
|
|
35
|
+
"metric": "g5"
|
|
31
36
|
},
|
|
32
37
|
"ts#cloudscape-website#auth": {
|
|
33
38
|
"factory": "./src/cloudscape-website/cognito-auth/generator",
|
|
34
39
|
"schema": "./src/cloudscape-website/cognito-auth/schema.json",
|
|
35
|
-
"description": "Adds auth to an existing cloudscape website"
|
|
40
|
+
"description": "Adds auth to an existing cloudscape website",
|
|
41
|
+
"metric": "g6"
|
|
36
42
|
},
|
|
37
43
|
"ts#cloudscape-website#runtime-config": {
|
|
38
44
|
"factory": "./src/cloudscape-website/runtime-config/generator",
|
|
39
45
|
"schema": "./src/cloudscape-website/runtime-config/schema.json",
|
|
40
46
|
"description": "Adds runtime config to an existing cloudscape website",
|
|
47
|
+
"metric": "g7",
|
|
41
48
|
"hidden": true
|
|
42
49
|
},
|
|
43
50
|
"ts#infra": {
|
|
44
51
|
"factory": "./src/infra/app/generator",
|
|
45
52
|
"schema": "./src/infra/app/schema.json",
|
|
46
|
-
"description": "Generates a cdk application"
|
|
53
|
+
"description": "Generates a cdk application",
|
|
54
|
+
"metric": "g8"
|
|
47
55
|
},
|
|
48
56
|
"ts#trpc-api": {
|
|
49
57
|
"factory": "./src/trpc/backend/generator",
|
|
50
58
|
"schema": "./src/trpc/backend/schema.json",
|
|
51
|
-
"description": "creates a trpc backend"
|
|
59
|
+
"description": "creates a trpc backend",
|
|
60
|
+
"metric": "g9"
|
|
52
61
|
},
|
|
53
62
|
"ts#trpc-api#react-connection": {
|
|
54
63
|
"factory": "./src/trpc/react/generator",
|
|
55
64
|
"schema": "./src/trpc/react/schema.json",
|
|
56
65
|
"description": "provides React integration to a React website",
|
|
66
|
+
"metric": "g10",
|
|
57
67
|
"hidden": true
|
|
58
68
|
},
|
|
59
69
|
"api-connection": {
|
|
60
70
|
"factory": "./src/api-connection/generator",
|
|
61
71
|
"schema": "./src/api-connection/schema.json",
|
|
62
|
-
"description": "Integrates a source project with a target API project"
|
|
72
|
+
"description": "Integrates a source project with a target API project",
|
|
73
|
+
"metric": "g11"
|
|
63
74
|
},
|
|
64
75
|
"open-api#ts-client": {
|
|
65
76
|
"factory": "./src/open-api/ts-client/generator",
|
|
66
77
|
"schema": "./src/open-api/ts-client/schema.json",
|
|
67
78
|
"description": "Generate a typescript client from an OpenAPI specification",
|
|
79
|
+
"metric": "g12",
|
|
68
80
|
"hidden": true
|
|
69
81
|
},
|
|
70
82
|
"open-api#ts-hooks": {
|
|
71
83
|
"factory": "./src/open-api/ts-hooks/generator",
|
|
72
84
|
"schema": "./src/open-api/ts-hooks/schema.json",
|
|
73
85
|
"description": "Generate typescript hooks from an OpenAPI specification",
|
|
86
|
+
"metric": "g13",
|
|
74
87
|
"hidden": true
|
|
75
88
|
},
|
|
76
89
|
"license": {
|
|
77
90
|
"factory": "./src/license/generator",
|
|
78
91
|
"schema": "./src/license/schema.json",
|
|
79
|
-
"description": "Add LICENSE files and configure source code licence headers"
|
|
92
|
+
"description": "Add LICENSE files and configure source code licence headers",
|
|
93
|
+
"metric": "g14"
|
|
80
94
|
},
|
|
81
95
|
"license#sync": {
|
|
82
96
|
"factory": "./src/license/sync/generator",
|
|
83
97
|
"schema": "./src/license/sync/schema.json",
|
|
84
98
|
"description": "Sync generator for writing licence headers and subproject LICENSE files",
|
|
99
|
+
"metric": "g15",
|
|
85
100
|
"hidden": true
|
|
101
|
+
},
|
|
102
|
+
"py#lambda-function": {
|
|
103
|
+
"factory": "./src/py/lambda-function/generator",
|
|
104
|
+
"schema": "./src/py/lambda-function/schema.json",
|
|
105
|
+
"description": "Adds a lambda function to a python project",
|
|
106
|
+
"metric": "g16"
|
|
86
107
|
}
|
|
87
108
|
}
|
|
88
109
|
}
|
package/package.json
CHANGED
|
@@ -289,6 +289,7 @@ exports[`cloudscape-website generator > should generate shared constructs > comm
|
|
|
289
289
|
|
|
290
290
|
exports[`cloudscape-website generator > should generate shared constructs > common/constructs-core-index.ts 1`] = `
|
|
291
291
|
"export * from './static-website.js';
|
|
292
|
+
export * from './app.js';
|
|
292
293
|
export * from './runtime-config.js';
|
|
293
294
|
"
|
|
294
295
|
`;
|
|
@@ -423,6 +424,7 @@ export class StaticWebsite extends Construct {
|
|
|
423
424
|
destinationBucket: this.websiteBucket,
|
|
424
425
|
// Files in the distribution's edge caches will be invalidated after files are uploaded to the destination bucket.
|
|
425
426
|
distribution: this.cloudFrontDistribution,
|
|
427
|
+
memoryLimit: 1024,
|
|
426
428
|
});
|
|
427
429
|
new CfnOutput(this, 'DistributionDomainName', {
|
|
428
430
|
value: this.cloudFrontDistribution.domainName,
|
package/src/cloudscape-website/app/files/common/constructs/src/core/static-website.ts.template
CHANGED
|
@@ -127,6 +127,7 @@ export class StaticWebsite extends Construct {
|
|
|
127
127
|
destinationBucket: this.websiteBucket,
|
|
128
128
|
// Files in the distribution's edge caches will be invalidated after files are uploaded to the destination bucket.
|
|
129
129
|
distribution: this.cloudFrontDistribution,
|
|
130
|
+
memoryLimit: 1024,
|
|
130
131
|
});
|
|
131
132
|
new CfnOutput(this, 'DistributionDomainName', {
|
|
132
133
|
value: this.cloudFrontDistribution.domainName,
|
|
@@ -4,5 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { Tree } from '@nx/devkit';
|
|
6
6
|
import { AppGeneratorSchema } from './schema';
|
|
7
|
+
import { NxGeneratorInfo } from '../../utils/nx';
|
|
8
|
+
export declare const CLOUDSCAPE_WEBSITE_APP_GENERATOR_INFO: NxGeneratorInfo;
|
|
7
9
|
export declare function appGenerator(tree: Tree, schema: AppGeneratorSchema): Promise<() => void>;
|
|
8
10
|
export default appGenerator;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CLOUDSCAPE_WEBSITE_APP_GENERATOR_INFO = void 0;
|
|
3
4
|
exports.appGenerator = appGenerator;
|
|
4
5
|
const tslib_1 = require("tslib");
|
|
5
6
|
/**
|
|
@@ -10,6 +11,7 @@ const devkit_1 = require("@nx/devkit");
|
|
|
10
11
|
const typescript_1 = require("typescript");
|
|
11
12
|
const react_1 = require("@nx/react");
|
|
12
13
|
const shared_constructs_1 = require("../../utils/shared-constructs");
|
|
14
|
+
const shared_constructs_constants_1 = require("../../utils/shared-constructs-constants");
|
|
13
15
|
const npm_scope_1 = require("../../utils/npm-scope");
|
|
14
16
|
const ts_project_utils_1 = require("../../ts/lib/ts-project-utils");
|
|
15
17
|
const versions_1 = require("../../utils/versions");
|
|
@@ -18,7 +20,11 @@ const names_1 = require("../../utils/names");
|
|
|
18
20
|
const ast_1 = require("../../utils/ast");
|
|
19
21
|
const format_1 = require("../../utils/format");
|
|
20
22
|
const path_1 = require("path");
|
|
23
|
+
const lodash_kebabcase_1 = tslib_1.__importDefault(require("lodash.kebabcase"));
|
|
24
|
+
const object_1 = require("../../utils/object");
|
|
21
25
|
const nx_1 = require("../../utils/nx");
|
|
26
|
+
const metrics_1 = require("../../utils/metrics");
|
|
27
|
+
exports.CLOUDSCAPE_WEBSITE_APP_GENERATOR_INFO = (0, nx_1.getGeneratorInfo)(__filename);
|
|
22
28
|
function appGenerator(tree, schema) {
|
|
23
29
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
24
30
|
var _a, _b;
|
|
@@ -40,7 +46,7 @@ function appGenerator(tree, schema) {
|
|
|
40
46
|
description: `Load runtime config from your deployed stack for dev purposes. You must set the AWS_REGION and CDK_APP_DIR env variables whilst calling i.e: AWS_REGION=ap-southeast-2 CDK_APP_DIR=./dist/packages/infra/cdk.out pnpm exec nx run ${fullyQualifiedName}:load:runtime-config`,
|
|
41
47
|
},
|
|
42
48
|
options: {
|
|
43
|
-
command: `curl https://\`aws cloudformation describe-stacks --query "Stacks[?StackName=='infra-sandbox'][].Outputs[?contains(OutputKey, 'DistributionDomainName')].OutputValue" --output text\`/runtime-config.json > './${websiteContentPath}/public/runtime-config.json'`,
|
|
49
|
+
command: `curl https://\`aws cloudformation describe-stacks --query "Stacks[?StackName=='${(0, lodash_kebabcase_1.default)(npmScopePrefix)}-infra-sandbox'][].Outputs[?contains(OutputKey, 'DistributionDomainName')].OutputValue" --output text\`/runtime-config.json > './${websiteContentPath}/public/runtime-config.json'`,
|
|
44
50
|
},
|
|
45
51
|
};
|
|
46
52
|
const buildTarget = targets['build'];
|
|
@@ -65,33 +71,33 @@ function appGenerator(tree, schema) {
|
|
|
65
71
|
outputPath: (0, devkit_1.joinPathFragments)('dist', websiteContentPath),
|
|
66
72
|
},
|
|
67
73
|
};
|
|
68
|
-
projectConfiguration.targets = (0,
|
|
74
|
+
projectConfiguration.targets = (0, object_1.sortObjectKeys)(targets);
|
|
69
75
|
(0, devkit_1.updateProjectConfiguration)(tree, fullyQualifiedName, projectConfiguration);
|
|
70
76
|
(0, ts_project_utils_1.configureTsProject)(tree, {
|
|
71
77
|
dir: websiteContentPath,
|
|
72
78
|
fullyQualifiedName,
|
|
73
79
|
});
|
|
74
80
|
yield (0, shared_constructs_1.sharedConstructsGenerator)(tree);
|
|
75
|
-
if (!tree.exists((0, devkit_1.joinPathFragments)(
|
|
81
|
+
if (!tree.exists((0, devkit_1.joinPathFragments)(shared_constructs_constants_1.PACKAGES_DIR, shared_constructs_constants_1.SHARED_CONSTRUCTS_DIR, 'src', 'app', 'static-websites', `${websiteNameKebabCase}.ts`))) {
|
|
76
82
|
const npmScopePrefix = (0, npm_scope_1.getNpmScopePrefix)(tree);
|
|
77
|
-
(0, devkit_1.generateFiles)(tree, (0, devkit_1.joinPathFragments)(__dirname, 'files',
|
|
83
|
+
(0, devkit_1.generateFiles)(tree, (0, devkit_1.joinPathFragments)(__dirname, 'files', shared_constructs_constants_1.SHARED_CONSTRUCTS_DIR, 'src', 'app'), (0, devkit_1.joinPathFragments)(shared_constructs_constants_1.PACKAGES_DIR, shared_constructs_constants_1.SHARED_CONSTRUCTS_DIR, 'src', 'app'), Object.assign(Object.assign({}, schema), { npmScopePrefix, scopeAlias: (0, npm_scope_1.toScopeAlias)(npmScopePrefix), websiteContentPath: (0, devkit_1.joinPathFragments)('dist', websiteContentPath), websiteNameKebabCase,
|
|
78
84
|
websiteNameClassName }), {
|
|
79
85
|
overwriteStrategy: devkit_1.OverwriteStrategy.KeepExisting,
|
|
80
86
|
});
|
|
81
|
-
const shouldGenerateCoreStaticWebsiteConstruct = !tree.exists((0, devkit_1.joinPathFragments)(
|
|
87
|
+
const shouldGenerateCoreStaticWebsiteConstruct = !tree.exists((0, devkit_1.joinPathFragments)(shared_constructs_constants_1.PACKAGES_DIR, shared_constructs_constants_1.SHARED_CONSTRUCTS_DIR, 'src', 'core', 'static-website.ts'));
|
|
82
88
|
if (shouldGenerateCoreStaticWebsiteConstruct) {
|
|
83
|
-
(0, devkit_1.generateFiles)(tree, (0, devkit_1.joinPathFragments)(__dirname, 'files',
|
|
89
|
+
(0, devkit_1.generateFiles)(tree, (0, devkit_1.joinPathFragments)(__dirname, 'files', shared_constructs_constants_1.SHARED_CONSTRUCTS_DIR, 'src', 'core'), (0, devkit_1.joinPathFragments)(shared_constructs_constants_1.PACKAGES_DIR, shared_constructs_constants_1.SHARED_CONSTRUCTS_DIR, 'src', 'core'), Object.assign(Object.assign({}, schema), { npmScopePrefix, scopeAlias: (0, npm_scope_1.toScopeAlias)(npmScopePrefix), websiteContentPath: (0, devkit_1.joinPathFragments)('dist', websiteContentPath), websiteNameKebabCase,
|
|
84
90
|
websiteNameClassName }), {
|
|
85
91
|
overwriteStrategy: devkit_1.OverwriteStrategy.KeepExisting,
|
|
86
92
|
});
|
|
87
93
|
}
|
|
88
|
-
(0, ast_1.addStarExport)(tree, (0, devkit_1.joinPathFragments)(
|
|
89
|
-
(0, ast_1.addStarExport)(tree, (0, devkit_1.joinPathFragments)(
|
|
94
|
+
(0, ast_1.addStarExport)(tree, (0, devkit_1.joinPathFragments)(shared_constructs_constants_1.PACKAGES_DIR, shared_constructs_constants_1.SHARED_CONSTRUCTS_DIR, 'src', 'app', 'index.ts'), './static-websites/index.js');
|
|
95
|
+
(0, ast_1.addStarExport)(tree, (0, devkit_1.joinPathFragments)(shared_constructs_constants_1.PACKAGES_DIR, shared_constructs_constants_1.SHARED_CONSTRUCTS_DIR, 'src', 'app', 'static-websites', 'index.ts'), `./${websiteNameKebabCase}.js`);
|
|
90
96
|
if (shouldGenerateCoreStaticWebsiteConstruct) {
|
|
91
|
-
(0, ast_1.addStarExport)(tree, (0, devkit_1.joinPathFragments)(
|
|
97
|
+
(0, ast_1.addStarExport)(tree, (0, devkit_1.joinPathFragments)(shared_constructs_constants_1.PACKAGES_DIR, shared_constructs_constants_1.SHARED_CONSTRUCTS_DIR, 'src', 'core', 'index.ts'), './static-website.js');
|
|
92
98
|
}
|
|
93
99
|
}
|
|
94
|
-
(0, devkit_1.updateJson)(tree, (0, devkit_1.joinPathFragments)(
|
|
100
|
+
(0, devkit_1.updateJson)(tree, (0, devkit_1.joinPathFragments)(shared_constructs_constants_1.PACKAGES_DIR, shared_constructs_constants_1.SHARED_CONSTRUCTS_DIR, 'project.json'), (config) => {
|
|
95
101
|
var _a;
|
|
96
102
|
if (!config.targets) {
|
|
97
103
|
config.targets = {};
|
|
@@ -175,6 +181,9 @@ function appGenerator(tree, schema) {
|
|
|
175
181
|
'@cloudscape-design/global-styles',
|
|
176
182
|
'@tanstack/react-router',
|
|
177
183
|
]), (0, versions_1.withVersions)(['@tanstack/router-plugin', 'vite-tsconfig-paths']));
|
|
184
|
+
yield (0, metrics_1.addGeneratorMetricsIfApplicable)(tree, [
|
|
185
|
+
exports.CLOUDSCAPE_WEBSITE_APP_GENERATOR_INFO,
|
|
186
|
+
]);
|
|
178
187
|
yield (0, format_1.formatFilesInSubtree)(tree);
|
|
179
188
|
return () => {
|
|
180
189
|
if (!schema.skipInstall) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../packages/nx-plugin/src/cloudscape-website/app/generator.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../packages/nx-plugin/src/cloudscape-website/app/generator.ts"],"names":[],"mappings":";;;AAoDA,oCA4YC;;AAhcD;;;GAGG;AACH,uCAaoB;AACpB,2CAKoB;AAEpB,qCAAiD;AACjD,qEAA0E;AAC1E,yFAGiD;AACjD,qDAAwE;AACxE,oEAAmE;AACnE,mDAAoD;AACpD,6CAA0D;AAC1D,6CAA6D;AAC7D,yCAKyB;AACzB,+CAA0D;AAC1D,+BAAgC;AAChC,gFAAyC;AACzC,+CAAoD;AACpD,uCAAmE;AACnE,iDAAsE;AAEzD,QA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AC,eAAe,KAC3B,MAAM,EAAE,OAAO,EACf,eAAe,EAAE,IAAA,0BAAiB,EAAC,OAAO,EAAE,0BAA0B,CAAC,EACvE,GAAG,EAAE,CAAC,KAAK,CAAC,OAEd,CACH,CAAC;QACF,IAAA,qCAA4B,EAC1B,IAAI,EACJ,IAAA,uBAAY,EAAC;YACX,+BAA+B;YAC/B,qCAAqC;YACrC,kCAAkC;YAClC,wBAAwB;SACzB,CAAC,EACF,IAAA,uBAAY,EAAC,CAAC,yBAAyB,EAAE,qBAAqB,CAAC,CAAC,CACjE,CAAC;QAEF,MAAM,IAAA,yCAA+B,EAAC,IAAI,EAAE;YAC1C,6CAAqC;SACtC,CAAC,CAAC;QAEH,MAAM,IAAA,6BAAoB,EAAC,IAAI,CAAC,CAAC;QACjC,OAAO,GAAG,EAAE;YACV,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC;gBACxB,IAAA,4BAAmB,EAAC,IAAI,CAAC,CAAC;YAC5B,CAAC;QACH,CAAC,CAAC;IACJ,CAAC;CAAA;AACD,kBAAe,YAAY,CAAC"}
|
|
@@ -67,6 +67,7 @@ export default CognitoAuth;
|
|
|
67
67
|
|
|
68
68
|
exports[`cognito-auth generator > should generate files > identity-index 1`] = `
|
|
69
69
|
"export * from './user-identity.js';
|
|
70
|
+
export * from './app.js';
|
|
70
71
|
export * from './runtime-config.js';
|
|
71
72
|
"
|
|
72
73
|
`;
|
|
@@ -445,6 +446,7 @@ export function App() {
|
|
|
445
446
|
|
|
446
447
|
exports[`cognito-auth generator > should update shared constructs index.ts > common/constructs-index 1`] = `
|
|
447
448
|
"export * from './user-identity.js';
|
|
449
|
+
export * from './app.js';
|
|
448
450
|
export * from './runtime-config.js';
|
|
449
451
|
"
|
|
450
452
|
`;
|
|
@@ -4,5 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { Tree } from '@nx/devkit';
|
|
6
6
|
import { CognitoAuthGeneratorSchema as CognitoAuthGeneratorSchema } from './schema';
|
|
7
|
+
import { NxGeneratorInfo } from '../../utils/nx';
|
|
8
|
+
export declare const COGNITO_AUTH_GENERATOR_INFO: NxGeneratorInfo;
|
|
7
9
|
export declare function cognitoAuthGenerator(tree: Tree, options: CognitoAuthGeneratorSchema): Promise<() => void>;
|
|
8
10
|
export default cognitoAuthGenerator;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.COGNITO_AUTH_GENERATOR_INFO = void 0;
|
|
3
4
|
exports.cognitoAuthGenerator = cognitoAuthGenerator;
|
|
4
5
|
const tslib_1 = require("tslib");
|
|
5
6
|
/**
|
|
@@ -8,11 +9,15 @@ const tslib_1 = require("tslib");
|
|
|
8
9
|
*/
|
|
9
10
|
const devkit_1 = require("@nx/devkit");
|
|
10
11
|
const shared_constructs_1 = require("../../utils/shared-constructs");
|
|
12
|
+
const shared_constructs_constants_1 = require("../../utils/shared-constructs-constants");
|
|
11
13
|
const generator_1 = require("../runtime-config/generator");
|
|
12
14
|
const typescript_1 = require("typescript");
|
|
13
15
|
const versions_1 = require("../../utils/versions");
|
|
14
16
|
const ast_1 = require("../../utils/ast");
|
|
15
17
|
const format_1 = require("../../utils/format");
|
|
18
|
+
const nx_1 = require("../../utils/nx");
|
|
19
|
+
const metrics_1 = require("../../utils/metrics");
|
|
20
|
+
exports.COGNITO_AUTH_GENERATOR_INFO = (0, nx_1.getGeneratorInfo)(__filename);
|
|
16
21
|
function cognitoAuthGenerator(tree, options) {
|
|
17
22
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
18
23
|
const srcRoot = (0, devkit_1.readProjectConfiguration)(tree, options.project).sourceRoot;
|
|
@@ -24,7 +29,7 @@ function cognitoAuthGenerator(tree, options) {
|
|
|
24
29
|
});
|
|
25
30
|
yield (0, shared_constructs_1.sharedConstructsGenerator)(tree);
|
|
26
31
|
// Add ICognitoProps interface and update IRuntimeConfig
|
|
27
|
-
const runtimeConfigPath = (0, devkit_1.joinPathFragments)(
|
|
32
|
+
const runtimeConfigPath = (0, devkit_1.joinPathFragments)(shared_constructs_constants_1.PACKAGES_DIR, shared_constructs_constants_1.TYPE_DEFINITIONS_DIR, 'src', 'runtime-config.ts');
|
|
28
33
|
// Check if ICognitoProps interface exists
|
|
29
34
|
const existingCognitoProps = (0, ast_1.query)(tree, runtimeConfigPath, 'InterfaceDeclaration[name.text="ICognitoProps"]');
|
|
30
35
|
// Check if cognitoProps property exists in IRuntimeConfig
|
|
@@ -48,12 +53,12 @@ function cognitoAuthGenerator(tree, options) {
|
|
|
48
53
|
]);
|
|
49
54
|
});
|
|
50
55
|
}
|
|
51
|
-
const identityPath = (0, devkit_1.joinPathFragments)(
|
|
56
|
+
const identityPath = (0, devkit_1.joinPathFragments)(shared_constructs_constants_1.PACKAGES_DIR, shared_constructs_constants_1.SHARED_CONSTRUCTS_DIR, 'src', 'core', 'user-identity.ts');
|
|
52
57
|
(0, devkit_1.generateFiles)(tree, (0, devkit_1.joinPathFragments)(__dirname, 'files', 'app'), srcRoot, options, {
|
|
53
58
|
overwriteStrategy: devkit_1.OverwriteStrategy.KeepExisting,
|
|
54
59
|
});
|
|
55
60
|
if (!tree.exists(identityPath)) {
|
|
56
|
-
(0, devkit_1.generateFiles)(tree, (0, devkit_1.joinPathFragments)(__dirname, 'files',
|
|
61
|
+
(0, devkit_1.generateFiles)(tree, (0, devkit_1.joinPathFragments)(__dirname, 'files', shared_constructs_constants_1.SHARED_CONSTRUCTS_DIR), (0, devkit_1.joinPathFragments)(shared_constructs_constants_1.PACKAGES_DIR, shared_constructs_constants_1.SHARED_CONSTRUCTS_DIR), {
|
|
57
62
|
allowSignup: options.allowSignup,
|
|
58
63
|
cognitoDomain: options.cognitoDomain,
|
|
59
64
|
}, {
|
|
@@ -64,7 +69,7 @@ function cognitoAuthGenerator(tree, options) {
|
|
|
64
69
|
'react-oidc-context',
|
|
65
70
|
'@aws-cdk/aws-cognito-identitypool-alpha',
|
|
66
71
|
]), {});
|
|
67
|
-
(0, ast_1.addStarExport)(tree, (0, devkit_1.joinPathFragments)(
|
|
72
|
+
(0, ast_1.addStarExport)(tree, (0, devkit_1.joinPathFragments)(shared_constructs_constants_1.PACKAGES_DIR, shared_constructs_constants_1.SHARED_CONSTRUCTS_DIR, 'src', 'core', 'index.ts'), './user-identity.js');
|
|
68
73
|
}
|
|
69
74
|
const mainTsxPath = (0, devkit_1.joinPathFragments)(srcRoot, 'main.tsx');
|
|
70
75
|
(0, ast_1.addSingleImport)(tree, mainTsxPath, 'CognitoAuth', './components/CognitoAuth');
|
|
@@ -142,6 +147,7 @@ function cognitoAuthGenerator(tree, options) {
|
|
|
142
147
|
console.info(`Skipping update to ${appLayoutTsxPath} as it does not exist.`);
|
|
143
148
|
}
|
|
144
149
|
// End update App Layout
|
|
150
|
+
yield (0, metrics_1.addGeneratorMetricsIfApplicable)(tree, [exports.COGNITO_AUTH_GENERATOR_INFO]);
|
|
145
151
|
yield (0, format_1.formatFilesInSubtree)(tree);
|
|
146
152
|
return () => {
|
|
147
153
|
(0, devkit_1.installPackagesTask)(tree);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../packages/nx-plugin/src/cloudscape-website/cognito-auth/generator.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../packages/nx-plugin/src/cloudscape-website/cognito-auth/generator.ts"],"names":[],"mappings":";;;AAmDA,oDAucC;;AA1fD;;;GAGG;AACH,uCAQoB;AACpB,qEAA0E;AAC1E,yFAIiD;AAEjD,2DAAqE;AACrE,2CAWoB;AACpB,mDAAoD;AACpD,yCASyB;AACzB,+CAA0D;AAC1D,uCAAmE;AACnE,iDAAsE;AAEzD,QAAA,2BAA2B,GACtC,IAAA,qBAAgB,EAAC,UAAU,CAAC,CAAC;AAE/B,SAAsB,oBAAoB,CACxC,IAAU,EACV,OAAmC;;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