@aws/nx-plugin-mcp 0.121.0 → 1.0.0-rc.0
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/bin/aws-nx-mcp.js +51 -6
- package/docs/guides/astro-docs.mdx +5 -3
- package/docs/guides/connection/react-agui.mdx +2 -2
- package/docs/guides/connection/react-fastapi.mdx +1 -1
- package/docs/guides/connection/react-py-agent.mdx +2 -2
- package/docs/guides/connection/react-smithy.mdx +1 -1
- package/docs/guides/connection/react-trpc.mdx +1 -1
- package/docs/guides/connection/react-ts-agent.mdx +2 -2
- package/docs/guides/docs.mdx +21 -0
- package/docs/guides/fastapi.mdx +3 -1
- package/docs/guides/py-api.mdx +22 -0
- package/docs/guides/react-website-auth.mdx +3 -3
- package/docs/guides/react-website.mdx +6 -3
- package/docs/guides/trpc.mdx +3 -1
- package/docs/guides/ts-api.mdx +28 -0
- package/docs/guides/ts-smithy-api.mdx +3 -1
- package/docs/guides/website.mdx +21 -0
- package/docs/snippets/agent/bedrock-deployment.mdx +1 -1
- package/docs/snippets/api/cors-configuration-cdk-note.mdx +1 -1
- package/docs/snippets/api/cors-configuration-terraform-note.mdx +1 -1
- package/docs/snippets/mcp/bedrock-deployment.mdx +1 -1
- package/generators.json +47 -6
- package/package.json +1 -1
- package/src/py/api/schema.json +100 -0
- package/src/ts/api/schema.json +105 -0
- package/src/ts/docs/schema.json +70 -0
- package/src/ts/website/app/schema.json +97 -0
- package/src/ts/website/auth/schema.json +46 -0
package/bin/aws-nx-mcp.js
CHANGED
|
@@ -19072,12 +19072,20 @@ var generators$1 = {
|
|
|
19072
19072
|
"metric": "g20",
|
|
19073
19073
|
"hidden": true
|
|
19074
19074
|
},
|
|
19075
|
+
"py#api": {
|
|
19076
|
+
"factory": "./src/py/api/generator",
|
|
19077
|
+
"schema": "./src/py/api/schema.json",
|
|
19078
|
+
"description": "Create a Python API",
|
|
19079
|
+
"metric": "g45",
|
|
19080
|
+
"guidePages": ["py-api", "fastapi"]
|
|
19081
|
+
},
|
|
19075
19082
|
"py#fast-api": {
|
|
19076
19083
|
"factory": "./src/py/fast-api/generator",
|
|
19077
19084
|
"schema": "./src/py/fast-api/schema.json",
|
|
19078
19085
|
"description": "Generates a FastAPI Python project",
|
|
19079
19086
|
"metric": "g3",
|
|
19080
|
-
"guidePages": ["fastapi"]
|
|
19087
|
+
"guidePages": ["fastapi"],
|
|
19088
|
+
"hidden": true
|
|
19081
19089
|
},
|
|
19082
19090
|
"py#fast-api#react-connection": {
|
|
19083
19091
|
"factory": "./src/py/fast-api/react/generator",
|
|
@@ -19147,12 +19155,20 @@ var generators$1 = {
|
|
|
19147
19155
|
"metric": "g23",
|
|
19148
19156
|
"guidePages": ["terraform-project"]
|
|
19149
19157
|
},
|
|
19158
|
+
"ts#docs": {
|
|
19159
|
+
"factory": "./src/ts/docs/generator",
|
|
19160
|
+
"schema": "./src/ts/docs/schema.json",
|
|
19161
|
+
"description": "Generates a documentation site",
|
|
19162
|
+
"metric": "g43",
|
|
19163
|
+
"guidePages": ["docs", "astro-docs"]
|
|
19164
|
+
},
|
|
19150
19165
|
"ts#astro-docs": {
|
|
19151
19166
|
"factory": "./src/ts/astro-docs/generator",
|
|
19152
19167
|
"schema": "./src/ts/astro-docs/schema.json",
|
|
19153
19168
|
"description": "Generates an Astro + Starlight documentation site with localisation, snippets, blog, and optional automated documentation translation",
|
|
19154
19169
|
"metric": "g37",
|
|
19155
|
-
"guidePages": ["astro-docs"]
|
|
19170
|
+
"guidePages": ["astro-docs"],
|
|
19171
|
+
"hidden": true
|
|
19156
19172
|
},
|
|
19157
19173
|
"ts#infra": {
|
|
19158
19174
|
"factory": "./src/infra/app/generator",
|
|
@@ -19193,19 +19209,35 @@ var generators$1 = {
|
|
|
19193
19209
|
"metric": "g1",
|
|
19194
19210
|
"guidePages": ["typescript-project"]
|
|
19195
19211
|
},
|
|
19212
|
+
"ts#website": {
|
|
19213
|
+
"factory": "./src/ts/website/app/generator",
|
|
19214
|
+
"schema": "./src/ts/website/app/schema.json",
|
|
19215
|
+
"description": "Generates a website application",
|
|
19216
|
+
"metric": "g43",
|
|
19217
|
+
"guidePages": ["website", "react-website"]
|
|
19218
|
+
},
|
|
19219
|
+
"ts#website#auth": {
|
|
19220
|
+
"factory": "./src/ts/website/auth/generator",
|
|
19221
|
+
"schema": "./src/ts/website/auth/schema.json",
|
|
19222
|
+
"description": "Adds auth to an existing website",
|
|
19223
|
+
"metric": "g44",
|
|
19224
|
+
"guidePages": ["react-website-auth"]
|
|
19225
|
+
},
|
|
19196
19226
|
"ts#react-website": {
|
|
19197
19227
|
"factory": "./src/ts/react-website/app/generator",
|
|
19198
19228
|
"schema": "./src/ts/react-website/app/schema.json",
|
|
19199
19229
|
"description": "Generates a React static website",
|
|
19200
19230
|
"metric": "g5",
|
|
19201
|
-
"guidePages": ["react-website"]
|
|
19231
|
+
"guidePages": ["react-website"],
|
|
19232
|
+
"hidden": true
|
|
19202
19233
|
},
|
|
19203
19234
|
"ts#react-website#auth": {
|
|
19204
19235
|
"factory": "./src/ts/react-website/cognito-auth/generator",
|
|
19205
19236
|
"schema": "./src/ts/react-website/cognito-auth/schema.json",
|
|
19206
19237
|
"description": "Adds auth to an existing React website",
|
|
19207
19238
|
"metric": "g6",
|
|
19208
|
-
"guidePages": ["react-website-auth"]
|
|
19239
|
+
"guidePages": ["react-website-auth"],
|
|
19240
|
+
"hidden": true
|
|
19209
19241
|
},
|
|
19210
19242
|
"ts#react-website#runtime-config": {
|
|
19211
19243
|
"factory": "./src/ts/react-website/runtime-config/generator",
|
|
@@ -19218,7 +19250,8 @@ var generators$1 = {
|
|
|
19218
19250
|
"factory": "./src/smithy/ts/api/generator",
|
|
19219
19251
|
"schema": "./src/smithy/ts/api/schema.json",
|
|
19220
19252
|
"description": "Create an API using Smithy and the Smithy TypeScript Server SDK",
|
|
19221
|
-
"metric": "g26"
|
|
19253
|
+
"metric": "g26",
|
|
19254
|
+
"hidden": true
|
|
19222
19255
|
},
|
|
19223
19256
|
"ts#agent": {
|
|
19224
19257
|
"factory": "./src/ts/agent/generator",
|
|
@@ -19261,12 +19294,24 @@ var generators$1 = {
|
|
|
19261
19294
|
"metric": "g29",
|
|
19262
19295
|
"hidden": true
|
|
19263
19296
|
},
|
|
19297
|
+
"ts#api": {
|
|
19298
|
+
"factory": "./src/ts/api/generator",
|
|
19299
|
+
"schema": "./src/ts/api/schema.json",
|
|
19300
|
+
"description": "Create a TypeScript API",
|
|
19301
|
+
"metric": "g46",
|
|
19302
|
+
"guidePages": [
|
|
19303
|
+
"ts-api",
|
|
19304
|
+
"trpc",
|
|
19305
|
+
"ts-smithy-api"
|
|
19306
|
+
]
|
|
19307
|
+
},
|
|
19264
19308
|
"ts#trpc-api": {
|
|
19265
19309
|
"factory": "./src/trpc/backend/generator",
|
|
19266
19310
|
"schema": "./src/trpc/backend/schema.json",
|
|
19267
19311
|
"description": "creates a trpc backend",
|
|
19268
19312
|
"metric": "g9",
|
|
19269
|
-
"guidePages": ["trpc"]
|
|
19313
|
+
"guidePages": ["trpc"],
|
|
19314
|
+
"hidden": true
|
|
19270
19315
|
},
|
|
19271
19316
|
"ts#trpc-api#react-connection": {
|
|
19272
19317
|
"factory": "./src/trpc/react/generator",
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Astro Docs
|
|
3
3
|
description: Reference documentation for an Astro + Starlight documentation site
|
|
4
|
-
|
|
4
|
+
when:
|
|
5
|
+
framework:
|
|
6
|
+
- astro
|
|
5
7
|
---
|
|
6
8
|
import { FileTree } from '@astrojs/starlight/components';
|
|
7
9
|
import RunGenerator from '@components/run-generator.astro';
|
|
@@ -23,11 +25,11 @@ By default it also scaffolds an automated translation pipeline powered by a
|
|
|
23
25
|
|
|
24
26
|
You can generate a new Astro docs site in two ways:
|
|
25
27
|
|
|
26
|
-
<RunGenerator generator="ts#
|
|
28
|
+
<RunGenerator generator="ts#docs" />
|
|
27
29
|
|
|
28
30
|
### Options
|
|
29
31
|
|
|
30
|
-
<GeneratorParameters generator="ts#
|
|
32
|
+
<GeneratorParameters generator="ts#docs" />
|
|
31
33
|
|
|
32
34
|
## Generator Output
|
|
33
35
|
|
|
@@ -21,9 +21,9 @@ Nx Plugin for AWS provides a generator to connect a React website to an Agent th
|
|
|
21
21
|
|
|
22
22
|
Before using this generator, ensure you have:
|
|
23
23
|
|
|
24
|
-
1. A React website (generated using the <Link path="guides/react-website">`ts#
|
|
24
|
+
1. A React website (generated using the <Link path="guides/react-website">`ts#website` generator</Link>)
|
|
25
25
|
2. A TypeScript or Python Agent with `protocol=AG-UI` (generated using the <Link path="guides/ts-agent">`ts#agent`</Link> or <Link path="guides/py-agent">`py#agent`</Link> generator)
|
|
26
|
-
3. For deployed agents, Cognito Auth added via the <Link path="/guides/react-website-auth">`ts#
|
|
26
|
+
3. For deployed agents, Cognito Auth added via the <Link path="/guides/react-website-auth">`ts#website#auth` generator</Link>
|
|
27
27
|
|
|
28
28
|
## Usage
|
|
29
29
|
|
|
@@ -22,7 +22,7 @@ Before using this generator, ensure your React application has:
|
|
|
22
22
|
|
|
23
23
|
1. A `main.tsx` file that renders your application
|
|
24
24
|
2. A working FastAPI backend (generated using the FastAPI generator)
|
|
25
|
-
3. Cognito Auth added via the <Link path="/guides/react-website-auth">`ts#
|
|
25
|
+
3. Cognito Auth added via the <Link path="/guides/react-website-auth">`ts#website#auth` generator</Link> if connecting an API which uses Cognito or IAM auth
|
|
26
26
|
|
|
27
27
|
<details>
|
|
28
28
|
<summary>Example of required `main.tsx` structure</summary>
|
|
@@ -23,9 +23,9 @@ If your Python Agent was generated with `protocol=AG-UI`, the connection generat
|
|
|
23
23
|
|
|
24
24
|
Before using this generator, ensure you have:
|
|
25
25
|
|
|
26
|
-
1. A React website (generated using the <Link path="guides/react-website">`ts#
|
|
26
|
+
1. A React website (generated using the <Link path="guides/react-website">`ts#website` generator</Link>)
|
|
27
27
|
2. A Python Agent with `protocol=HTTP` (generated using the <Link path="guides/py-agent">`py#agent` generator</Link>)
|
|
28
|
-
3. Cognito Auth added via the <Link path="/guides/react-website-auth">`ts#
|
|
28
|
+
3. Cognito Auth added via the <Link path="/guides/react-website-auth">`ts#website#auth` generator</Link>
|
|
29
29
|
|
|
30
30
|
## Usage
|
|
31
31
|
|
|
@@ -22,7 +22,7 @@ Before using this generator, ensure your React application has:
|
|
|
22
22
|
|
|
23
23
|
1. A `main.tsx` file that renders your application
|
|
24
24
|
2. A working Smithy TypeScript API backend (generated using the <Link path="/guides/ts-smithy-api">`ts#smithy-api` generator</Link>)
|
|
25
|
-
3. Cognito Auth added via the <Link path="/guides/react-website-auth">`ts#
|
|
25
|
+
3. Cognito Auth added via the <Link path="/guides/react-website-auth">`ts#website#auth` generator</Link> if connecting an API which uses Cognito or IAM auth
|
|
26
26
|
|
|
27
27
|
<details>
|
|
28
28
|
<summary>Example of required `main.tsx` structure</summary>
|
|
@@ -19,7 +19,7 @@ Before using this generator, ensure your React application has:
|
|
|
19
19
|
1. A `main.tsx` file that renders your application
|
|
20
20
|
2. An `<App/>` JSX element where the tRPC provider will be automatically injected
|
|
21
21
|
3. A working tRPC API (generated using the tRPC API generator)
|
|
22
|
-
4. Cognito Auth added via the <Link path="/guides/react-website-auth">`ts#
|
|
22
|
+
4. Cognito Auth added via the <Link path="/guides/react-website-auth">`ts#website#auth` generator</Link> if connecting an API which uses Cognito or IAM auth
|
|
23
23
|
|
|
24
24
|
<details>
|
|
25
25
|
<summary>Example of required `main.tsx` structure</summary>
|
|
@@ -18,9 +18,9 @@ Nx Plugin for AWS provides a generator to quickly integrate your <Link path="gui
|
|
|
18
18
|
|
|
19
19
|
Before using this generator, ensure you have:
|
|
20
20
|
|
|
21
|
-
1. A React website (generated using the <Link path="guides/react-website">`ts#
|
|
21
|
+
1. A React website (generated using the <Link path="guides/react-website">`ts#website` generator</Link>)
|
|
22
22
|
2. A TypeScript Agent (generated using the <Link path="guides/ts-agent">`ts#agent` generator</Link>)
|
|
23
|
-
3. Cognito Auth added via the <Link path="/guides/react-website-auth">`ts#
|
|
23
|
+
3. Cognito Auth added via the <Link path="/guides/react-website-auth">`ts#website#auth` generator</Link>
|
|
24
24
|
|
|
25
25
|
## Usage
|
|
26
26
|
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Documentation Site
|
|
3
|
+
description: Reference documentation for the ts#docs generator
|
|
4
|
+
generator: ts#docs
|
|
5
|
+
---
|
|
6
|
+
import Astro from '@astrojs/react';
|
|
7
|
+
import { CardGrid } from '@astrojs/starlight/components';
|
|
8
|
+
import FrameworkCard from '@components/framework-card.astro';
|
|
9
|
+
|
|
10
|
+
This generator creates a documentation site for your project. Use the `framework` option to select which documentation framework to use.
|
|
11
|
+
|
|
12
|
+
## Frameworks
|
|
13
|
+
|
|
14
|
+
<CardGrid>
|
|
15
|
+
<FrameworkCard
|
|
16
|
+
title="Astro + Starlight"
|
|
17
|
+
description="Documentation site powered by Astro and the Starlight docs theme with localisation, snippets, blog, and automated translation."
|
|
18
|
+
href={`/nx-plugin-for-aws/${Astro.currentLocale || 'en'}/guides/astro-docs`}
|
|
19
|
+
logo="astro"
|
|
20
|
+
/>
|
|
21
|
+
</CardGrid>
|
package/docs/guides/fastapi.mdx
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
title: FastAPI
|
|
3
3
|
description: Reference documentation for FastAPI
|
|
4
4
|
generator: py#fast-api
|
|
5
|
+
when:
|
|
6
|
+
framework: [fastapi]
|
|
5
7
|
---
|
|
6
8
|
|
|
7
9
|
import { FileTree, Tabs, TabItem } from '@astrojs/starlight/components';
|
|
@@ -273,7 +275,7 @@ export class ExampleStack extends Stack {
|
|
|
273
275
|
}
|
|
274
276
|
```
|
|
275
277
|
|
|
276
|
-
The `UserIdentity` construct can be generated using the <Link path="/guides/react-website-auth">`ts#
|
|
278
|
+
The `UserIdentity` construct can be generated using the <Link path="/guides/react-website-auth">`ts#website#auth` generator</Link>
|
|
277
279
|
:::
|
|
278
280
|
</OptionFilter>
|
|
279
281
|
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Python API
|
|
3
|
+
description: Reference documentation for the Python API generator
|
|
4
|
+
generator: py#api
|
|
5
|
+
---
|
|
6
|
+
import Astro from '@astrojs/react';
|
|
7
|
+
import { CardGrid } from '@astrojs/starlight/components';
|
|
8
|
+
import GeneratorParameters from '@components/generator-parameters.astro';
|
|
9
|
+
import FrameworkCard from '@components/framework-card.astro';
|
|
10
|
+
|
|
11
|
+
The Python API generator creates a new API project with your choice of framework. It currently supports [FastAPI](https://fastapi.tiangolo.com/) for building modern, high-performance Python APIs.
|
|
12
|
+
|
|
13
|
+
## Frameworks
|
|
14
|
+
|
|
15
|
+
<CardGrid>
|
|
16
|
+
<FrameworkCard
|
|
17
|
+
title="FastAPI"
|
|
18
|
+
description="A modern Python web framework for building APIs with automatic OpenAPI documentation, request validation, and async support."
|
|
19
|
+
href={`/nx-plugin-for-aws/${Astro.currentLocale || 'en'}/guides/fastapi`}
|
|
20
|
+
logo="fastapi"
|
|
21
|
+
/>
|
|
22
|
+
</CardGrid>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: React Website Authentication
|
|
3
3
|
description: Reference documentation for React Website Authentication
|
|
4
|
-
generator: ts#
|
|
4
|
+
generator: ts#website#auth
|
|
5
5
|
---
|
|
6
6
|
import { FileTree } from '@astrojs/starlight/components';
|
|
7
7
|
import Link from '@components/link.astro';
|
|
@@ -21,11 +21,11 @@ This generator configures the CDK or Terraform infrastructure to create a Cognit
|
|
|
21
21
|
|
|
22
22
|
You can add authentication to your React website in two ways:
|
|
23
23
|
|
|
24
|
-
<RunGenerator generator="ts#
|
|
24
|
+
<RunGenerator generator="ts#website#auth" />
|
|
25
25
|
|
|
26
26
|
### Options
|
|
27
27
|
|
|
28
|
-
<GeneratorParameters generator="ts#
|
|
28
|
+
<GeneratorParameters generator="ts#website#auth" />
|
|
29
29
|
|
|
30
30
|
## Generator Output
|
|
31
31
|
|
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
title: React Website
|
|
3
3
|
description: Reference documentation for a React Website
|
|
4
4
|
generator: ts#react-website
|
|
5
|
+
when:
|
|
6
|
+
framework:
|
|
7
|
+
- react
|
|
5
8
|
---
|
|
6
9
|
import { FileTree, Steps } from '@astrojs/starlight/components';
|
|
7
10
|
import Link from '@components/link.astro';
|
|
@@ -27,11 +30,11 @@ The default `uxProvider` is [Cloudscape](http://cloudscape.design/). You can als
|
|
|
27
30
|
|
|
28
31
|
You can generate a new React Website in two ways:
|
|
29
32
|
|
|
30
|
-
<RunGenerator generator="ts#
|
|
33
|
+
<RunGenerator generator="ts#website" />
|
|
31
34
|
|
|
32
35
|
### Options
|
|
33
36
|
|
|
34
|
-
<GeneratorParameters generator="ts#
|
|
37
|
+
<GeneratorParameters generator="ts#website" />
|
|
35
38
|
|
|
36
39
|
## Generator Output
|
|
37
40
|
|
|
@@ -321,7 +324,7 @@ This makes the first React website you generate the default `dev` target for the
|
|
|
321
324
|
:::
|
|
322
325
|
|
|
323
326
|
:::warning[Mock Authentication]
|
|
324
|
-
When run in this mode and no `runtime-config.json` is present, if you have configured Cognito Authentication (via the <Link path="/guides/react-website-auth">`ts#
|
|
327
|
+
When run in this mode and no `runtime-config.json` is present, if you have configured Cognito Authentication (via the <Link path="/guides/react-website-auth">`ts#website#auth` generator</Link>), login will be skipped and requests to your local servers will not include authentication headers.
|
|
325
328
|
|
|
326
329
|
To enable login and authentication for `serve-local`, deploy your infrastructure and load runtime config.
|
|
327
330
|
:::
|
package/docs/guides/trpc.mdx
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
title: tRPC
|
|
3
3
|
description: Reference documentation for tRPC
|
|
4
4
|
generator: ts#trpc-api
|
|
5
|
+
when:
|
|
6
|
+
framework: [trpc]
|
|
5
7
|
---
|
|
6
8
|
import { FileTree, Tabs, TabItem } from '@astrojs/starlight/components';
|
|
7
9
|
import Link from '@components/link.astro';
|
|
@@ -587,7 +589,7 @@ export class ExampleStack extends Stack {
|
|
|
587
589
|
}
|
|
588
590
|
```
|
|
589
591
|
|
|
590
|
-
The `UserIdentity` construct can be generated using the <Link path="/guides/react-website-auth">`ts#
|
|
592
|
+
The `UserIdentity` construct can be generated using the <Link path="/guides/react-website-auth">`ts#website#auth` generator</Link>.
|
|
591
593
|
</OptionFilter>
|
|
592
594
|
|
|
593
595
|
This sets up your API infrastructure, including an AWS API Gateway REST or HTTP API, AWS Lambda functions for business logic, and authentication based on your chosen `auth` method.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: TypeScript API
|
|
3
|
+
description: Reference documentation for the TypeScript API generator
|
|
4
|
+
generator: ts#api
|
|
5
|
+
---
|
|
6
|
+
import Astro from '@astrojs/react';
|
|
7
|
+
import { CardGrid } from '@astrojs/starlight/components';
|
|
8
|
+
import GeneratorParameters from '@components/generator-parameters.astro';
|
|
9
|
+
import FrameworkCard from '@components/framework-card.astro';
|
|
10
|
+
|
|
11
|
+
The TypeScript API generator creates a new API project with your choice of framework. It supports [tRPC](https://trpc.io/) for end-to-end type-safe APIs and [Smithy](https://smithy.io/) for model-driven API development.
|
|
12
|
+
|
|
13
|
+
## Frameworks
|
|
14
|
+
|
|
15
|
+
<CardGrid>
|
|
16
|
+
<FrameworkCard
|
|
17
|
+
title="tRPC"
|
|
18
|
+
description="End-to-end type-safe APIs with TypeScript. Ideal when your frontend and backend share a TypeScript codebase."
|
|
19
|
+
href={`/nx-plugin-for-aws/${Astro.currentLocale || 'en'}/guides/trpc`}
|
|
20
|
+
logo="trpc"
|
|
21
|
+
/>
|
|
22
|
+
<FrameworkCard
|
|
23
|
+
title="Smithy"
|
|
24
|
+
description="Model-driven API development using an interface definition language. Ideal for APIs consumed by multiple languages."
|
|
25
|
+
href={`/nx-plugin-for-aws/${Astro.currentLocale || 'en'}/guides/ts-smithy-api`}
|
|
26
|
+
logo="smithy"
|
|
27
|
+
/>
|
|
28
|
+
</CardGrid>
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
title: Smithy TypeScript API
|
|
3
3
|
description: Reference documentation for Smithy TypeScript API
|
|
4
4
|
generator: ts#smithy-api
|
|
5
|
+
when:
|
|
6
|
+
framework: [smithy]
|
|
5
7
|
---
|
|
6
8
|
|
|
7
9
|
import { FileTree } from '@astrojs/starlight/components';
|
|
@@ -479,7 +481,7 @@ export class ExampleStack extends Stack {
|
|
|
479
481
|
}
|
|
480
482
|
```
|
|
481
483
|
|
|
482
|
-
The `UserIdentity` construct can be generated using the <Link path="/guides/react-website-auth">`ts#
|
|
484
|
+
The `UserIdentity` construct can be generated using the <Link path="/guides/react-website-auth">`ts#website#auth` generator</Link>
|
|
483
485
|
:::
|
|
484
486
|
</OptionFilter>
|
|
485
487
|
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Website
|
|
3
|
+
description: Reference documentation for the ts#website generator
|
|
4
|
+
generator: ts#website
|
|
5
|
+
---
|
|
6
|
+
import Astro from '@astrojs/react';
|
|
7
|
+
import { CardGrid } from '@astrojs/starlight/components';
|
|
8
|
+
import FrameworkCard from '@components/framework-card.astro';
|
|
9
|
+
|
|
10
|
+
This generator creates a website for your project. Use the `framework` option to select which frontend framework to use.
|
|
11
|
+
|
|
12
|
+
## Frameworks
|
|
13
|
+
|
|
14
|
+
<CardGrid>
|
|
15
|
+
<FrameworkCard
|
|
16
|
+
title="React"
|
|
17
|
+
description="React website with Vite, TanStack Router, and AWS CDK or Terraform infrastructure for static hosting on S3 + CloudFront."
|
|
18
|
+
href={`/nx-plugin-for-aws/${Astro.currentLocale || 'en'}/guides/react-website`}
|
|
19
|
+
logo="react"
|
|
20
|
+
/>
|
|
21
|
+
</CardGrid>
|
|
@@ -144,7 +144,7 @@ export class ExampleStack extends Stack {
|
|
|
144
144
|
}
|
|
145
145
|
```
|
|
146
146
|
|
|
147
|
-
The `UserIdentity` construct can be generated using the <Link path="/guides/react-website-auth">`ts#
|
|
147
|
+
The `UserIdentity` construct can be generated using the <Link path="/guides/react-website-auth">`ts#website#auth` generator</Link>, or you can create your own CDK `UserPool` and `UserPoolClient`.
|
|
148
148
|
</Fragment>
|
|
149
149
|
<Fragment slot="terraform">
|
|
150
150
|
The generated module accepts `user_pool_id` and `user_pool_client_ids` variables for Cognito authentication:
|
|
@@ -21,5 +21,5 @@ export class ExampleStack extends Stack {
|
|
|
21
21
|
}
|
|
22
22
|
```
|
|
23
23
|
|
|
24
|
-
The `MyWebsite` construct can be generated using the <Link path="/guides/react-website">`ts#
|
|
24
|
+
The `MyWebsite` construct can be generated using the <Link path="/guides/react-website">`ts#website` generator</Link>
|
|
25
25
|
:::
|
|
@@ -24,5 +24,5 @@ module "my_api" {
|
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
```
|
|
27
|
-
The `MyWebsite` construct can be generated using the <Link path="/guides/react-website">`ts#
|
|
27
|
+
The `MyWebsite` construct can be generated using the <Link path="/guides/react-website">`ts#website` generator</Link>
|
|
28
28
|
:::
|
|
@@ -139,7 +139,7 @@ export class ExampleStack extends Stack {
|
|
|
139
139
|
}
|
|
140
140
|
```
|
|
141
141
|
|
|
142
|
-
The `UserIdentity` construct can be generated using the <Link path="/guides/react-website-auth">`ts#
|
|
142
|
+
The `UserIdentity` construct can be generated using the <Link path="/guides/react-website-auth">`ts#website#auth` generator</Link>, or you can create your own CDK `UserPool` and `UserPoolClient`.
|
|
143
143
|
</Fragment>
|
|
144
144
|
<Fragment slot="terraform">
|
|
145
145
|
The generated module accepts `user_pool_id` and `user_pool_client_ids` variables for Cognito authentication:
|
package/generators.json
CHANGED
|
@@ -67,12 +67,20 @@
|
|
|
67
67
|
"metric": "g20",
|
|
68
68
|
"hidden": true
|
|
69
69
|
},
|
|
70
|
+
"py#api": {
|
|
71
|
+
"factory": "./src/py/api/generator",
|
|
72
|
+
"schema": "./src/py/api/schema.json",
|
|
73
|
+
"description": "Create a Python API",
|
|
74
|
+
"metric": "g45",
|
|
75
|
+
"guidePages": ["py-api", "fastapi"]
|
|
76
|
+
},
|
|
70
77
|
"py#fast-api": {
|
|
71
78
|
"factory": "./src/py/fast-api/generator",
|
|
72
79
|
"schema": "./src/py/fast-api/schema.json",
|
|
73
80
|
"description": "Generates a FastAPI Python project",
|
|
74
81
|
"metric": "g3",
|
|
75
|
-
"guidePages": ["fastapi"]
|
|
82
|
+
"guidePages": ["fastapi"],
|
|
83
|
+
"hidden": true
|
|
76
84
|
},
|
|
77
85
|
"py#fast-api#react-connection": {
|
|
78
86
|
"factory": "./src/py/fast-api/react/generator",
|
|
@@ -142,12 +150,20 @@
|
|
|
142
150
|
"metric": "g23",
|
|
143
151
|
"guidePages": ["terraform-project"]
|
|
144
152
|
},
|
|
153
|
+
"ts#docs": {
|
|
154
|
+
"factory": "./src/ts/docs/generator",
|
|
155
|
+
"schema": "./src/ts/docs/schema.json",
|
|
156
|
+
"description": "Generates a documentation site",
|
|
157
|
+
"metric": "g43",
|
|
158
|
+
"guidePages": ["docs", "astro-docs"]
|
|
159
|
+
},
|
|
145
160
|
"ts#astro-docs": {
|
|
146
161
|
"factory": "./src/ts/astro-docs/generator",
|
|
147
162
|
"schema": "./src/ts/astro-docs/schema.json",
|
|
148
163
|
"description": "Generates an Astro + Starlight documentation site with localisation, snippets, blog, and optional automated documentation translation",
|
|
149
164
|
"metric": "g37",
|
|
150
|
-
"guidePages": ["astro-docs"]
|
|
165
|
+
"guidePages": ["astro-docs"],
|
|
166
|
+
"hidden": true
|
|
151
167
|
},
|
|
152
168
|
"ts#infra": {
|
|
153
169
|
"factory": "./src/infra/app/generator",
|
|
@@ -188,19 +204,35 @@
|
|
|
188
204
|
"metric": "g1",
|
|
189
205
|
"guidePages": ["typescript-project"]
|
|
190
206
|
},
|
|
207
|
+
"ts#website": {
|
|
208
|
+
"factory": "./src/ts/website/app/generator",
|
|
209
|
+
"schema": "./src/ts/website/app/schema.json",
|
|
210
|
+
"description": "Generates a website application",
|
|
211
|
+
"metric": "g43",
|
|
212
|
+
"guidePages": ["website", "react-website"]
|
|
213
|
+
},
|
|
214
|
+
"ts#website#auth": {
|
|
215
|
+
"factory": "./src/ts/website/auth/generator",
|
|
216
|
+
"schema": "./src/ts/website/auth/schema.json",
|
|
217
|
+
"description": "Adds auth to an existing website",
|
|
218
|
+
"metric": "g44",
|
|
219
|
+
"guidePages": ["react-website-auth"]
|
|
220
|
+
},
|
|
191
221
|
"ts#react-website": {
|
|
192
222
|
"factory": "./src/ts/react-website/app/generator",
|
|
193
223
|
"schema": "./src/ts/react-website/app/schema.json",
|
|
194
224
|
"description": "Generates a React static website",
|
|
195
225
|
"metric": "g5",
|
|
196
|
-
"guidePages": ["react-website"]
|
|
226
|
+
"guidePages": ["react-website"],
|
|
227
|
+
"hidden": true
|
|
197
228
|
},
|
|
198
229
|
"ts#react-website#auth": {
|
|
199
230
|
"factory": "./src/ts/react-website/cognito-auth/generator",
|
|
200
231
|
"schema": "./src/ts/react-website/cognito-auth/schema.json",
|
|
201
232
|
"description": "Adds auth to an existing React website",
|
|
202
233
|
"metric": "g6",
|
|
203
|
-
"guidePages": ["react-website-auth"]
|
|
234
|
+
"guidePages": ["react-website-auth"],
|
|
235
|
+
"hidden": true
|
|
204
236
|
},
|
|
205
237
|
"ts#react-website#runtime-config": {
|
|
206
238
|
"factory": "./src/ts/react-website/runtime-config/generator",
|
|
@@ -213,7 +245,8 @@
|
|
|
213
245
|
"factory": "./src/smithy/ts/api/generator",
|
|
214
246
|
"schema": "./src/smithy/ts/api/schema.json",
|
|
215
247
|
"description": "Create an API using Smithy and the Smithy TypeScript Server SDK",
|
|
216
|
-
"metric": "g26"
|
|
248
|
+
"metric": "g26",
|
|
249
|
+
"hidden": true
|
|
217
250
|
},
|
|
218
251
|
"ts#agent": {
|
|
219
252
|
"factory": "./src/ts/agent/generator",
|
|
@@ -256,12 +289,20 @@
|
|
|
256
289
|
"metric": "g29",
|
|
257
290
|
"hidden": true
|
|
258
291
|
},
|
|
292
|
+
"ts#api": {
|
|
293
|
+
"factory": "./src/ts/api/generator",
|
|
294
|
+
"schema": "./src/ts/api/schema.json",
|
|
295
|
+
"description": "Create a TypeScript API",
|
|
296
|
+
"metric": "g46",
|
|
297
|
+
"guidePages": ["ts-api", "trpc", "ts-smithy-api"]
|
|
298
|
+
},
|
|
259
299
|
"ts#trpc-api": {
|
|
260
300
|
"factory": "./src/trpc/backend/generator",
|
|
261
301
|
"schema": "./src/trpc/backend/schema.json",
|
|
262
302
|
"description": "creates a trpc backend",
|
|
263
303
|
"metric": "g9",
|
|
264
|
-
"guidePages": ["trpc"]
|
|
304
|
+
"guidePages": ["trpc"],
|
|
305
|
+
"hidden": true
|
|
265
306
|
},
|
|
266
307
|
"ts#trpc-api#react-connection": {
|
|
267
308
|
"factory": "./src/trpc/react/generator",
|
package/package.json
CHANGED
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/schema",
|
|
3
|
+
"$id": "py#api",
|
|
4
|
+
"title": "py#api",
|
|
5
|
+
"description": "Create a Python API",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"name": {
|
|
9
|
+
"type": "string",
|
|
10
|
+
"description": "Name of the API project to generate",
|
|
11
|
+
"x-priority": "important",
|
|
12
|
+
"$default": {
|
|
13
|
+
"$source": "argv",
|
|
14
|
+
"index": 0
|
|
15
|
+
},
|
|
16
|
+
"x-prompt": "What name would you like your API to have? i.e: MyApi"
|
|
17
|
+
},
|
|
18
|
+
"framework": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"description": "The API framework to use.",
|
|
21
|
+
"default": "fastapi",
|
|
22
|
+
"enum": ["fastapi"],
|
|
23
|
+
"x-prompt": {
|
|
24
|
+
"message": "Which API framework would you like to use?",
|
|
25
|
+
"type": "list",
|
|
26
|
+
"items": [
|
|
27
|
+
{
|
|
28
|
+
"value": "fastapi",
|
|
29
|
+
"label": "FastAPI (modern Python web framework)"
|
|
30
|
+
}
|
|
31
|
+
],
|
|
32
|
+
"default": "fastapi"
|
|
33
|
+
},
|
|
34
|
+
"x-priority": "important"
|
|
35
|
+
},
|
|
36
|
+
"computeType": {
|
|
37
|
+
"type": "string",
|
|
38
|
+
"description": "The type of compute to use to deploy this API. Choose between ServerlessApiGatewayRestApi (default) or ServerlessApiGatewayHttpApi.",
|
|
39
|
+
"default": "ServerlessApiGatewayRestApi",
|
|
40
|
+
"enum": ["ServerlessApiGatewayRestApi", "ServerlessApiGatewayHttpApi"],
|
|
41
|
+
"x-prompt": "What compute type would you like to deploy your API with?",
|
|
42
|
+
"x-priority": "important"
|
|
43
|
+
},
|
|
44
|
+
"integrationPattern": {
|
|
45
|
+
"type": "string",
|
|
46
|
+
"description": "How API Gateway integrations are generated for the API. Choose between isolated (default) and shared.",
|
|
47
|
+
"default": "isolated",
|
|
48
|
+
"enum": ["isolated", "shared"],
|
|
49
|
+
"x-priority": "important",
|
|
50
|
+
"x-prompt": {
|
|
51
|
+
"message": "How would you like to map integrations to your API operations?",
|
|
52
|
+
"type": "list",
|
|
53
|
+
"items": [
|
|
54
|
+
{
|
|
55
|
+
"value": "isolated",
|
|
56
|
+
"label": "isolated (one integration per operation)"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"value": "shared",
|
|
60
|
+
"label": "shared (single default integration with optional overrides)"
|
|
61
|
+
}
|
|
62
|
+
],
|
|
63
|
+
"default": "isolated"
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
"auth": {
|
|
67
|
+
"type": "string",
|
|
68
|
+
"description": "The method used to authenticate with your API. Choose between IAM (default), Cognito or Custom.",
|
|
69
|
+
"default": "IAM",
|
|
70
|
+
"enum": ["IAM", "Cognito", "Custom"],
|
|
71
|
+
"x-prompt": "How would you like users to authenticate with your API?",
|
|
72
|
+
"x-priority": "important"
|
|
73
|
+
},
|
|
74
|
+
"directory": {
|
|
75
|
+
"type": "string",
|
|
76
|
+
"description": "The directory to store the application in.",
|
|
77
|
+
"default": "packages",
|
|
78
|
+
"x-prompt": "Which directory do you want to create the project in?",
|
|
79
|
+
"x-priority": "important"
|
|
80
|
+
},
|
|
81
|
+
"subDirectory": {
|
|
82
|
+
"type": "string",
|
|
83
|
+
"description": "The sub directory the project is placed in. By default this is the project name.",
|
|
84
|
+
"x-prompt": "Which sub directory do you want to create the project in? (By default this is the project name)"
|
|
85
|
+
},
|
|
86
|
+
"iacProvider": {
|
|
87
|
+
"type": "string",
|
|
88
|
+
"description": "The preferred IaC provider. By default this is inherited from your initial selection.",
|
|
89
|
+
"enum": ["Inherit", "CDK", "Terraform"],
|
|
90
|
+
"x-priority": "important",
|
|
91
|
+
"default": "Inherit",
|
|
92
|
+
"x-prompt": "Which provider would you like to manage your infrastructure? (default: Inherit)"
|
|
93
|
+
},
|
|
94
|
+
"moduleName": {
|
|
95
|
+
"type": "string",
|
|
96
|
+
"description": "Python module name"
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
"required": ["name"]
|
|
100
|
+
}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/schema",
|
|
3
|
+
"$id": "ts#api",
|
|
4
|
+
"title": "ts#api",
|
|
5
|
+
"description": "Create a TypeScript API",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"name": {
|
|
9
|
+
"type": "string",
|
|
10
|
+
"description": "The name of the API (required). Used to generate class names and file paths.",
|
|
11
|
+
"$default": {
|
|
12
|
+
"$source": "argv",
|
|
13
|
+
"index": 0
|
|
14
|
+
},
|
|
15
|
+
"x-prompt": "What name would you like your API to have? i.e: MyApi"
|
|
16
|
+
},
|
|
17
|
+
"framework": {
|
|
18
|
+
"type": "string",
|
|
19
|
+
"description": "The API framework to use.",
|
|
20
|
+
"default": "trpc",
|
|
21
|
+
"enum": ["trpc", "smithy"],
|
|
22
|
+
"x-prompt": {
|
|
23
|
+
"message": "Which API framework would you like to use?",
|
|
24
|
+
"type": "list",
|
|
25
|
+
"items": [
|
|
26
|
+
{
|
|
27
|
+
"value": "trpc",
|
|
28
|
+
"label": "tRPC (end-to-end type-safe APIs with TypeScript)"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"value": "smithy",
|
|
32
|
+
"label": "Smithy (model-driven API development)"
|
|
33
|
+
}
|
|
34
|
+
],
|
|
35
|
+
"default": "trpc"
|
|
36
|
+
},
|
|
37
|
+
"x-priority": "important"
|
|
38
|
+
},
|
|
39
|
+
"namespace": {
|
|
40
|
+
"type": "string",
|
|
41
|
+
"description": "The namespace for the Smithy API (only applicable for the smithy framework). Defaults to your monorepo scope",
|
|
42
|
+
"x-prompt": "What namespace would you like your API to have? i.e: com.example"
|
|
43
|
+
},
|
|
44
|
+
"computeType": {
|
|
45
|
+
"type": "string",
|
|
46
|
+
"description": "The type of compute to use to deploy this API.",
|
|
47
|
+
"default": "ServerlessApiGatewayRestApi",
|
|
48
|
+
"enum": ["ServerlessApiGatewayRestApi", "ServerlessApiGatewayHttpApi"],
|
|
49
|
+
"x-prompt": "What compute type would you like to deploy your API with?",
|
|
50
|
+
"x-priority": "important"
|
|
51
|
+
},
|
|
52
|
+
"integrationPattern": {
|
|
53
|
+
"type": "string",
|
|
54
|
+
"description": "How API Gateway integrations are generated for the API. Choose between isolated (default) and shared.",
|
|
55
|
+
"default": "isolated",
|
|
56
|
+
"enum": ["isolated", "shared"],
|
|
57
|
+
"x-priority": "important",
|
|
58
|
+
"x-prompt": {
|
|
59
|
+
"message": "How would you like to map integrations to your API operations?",
|
|
60
|
+
"type": "list",
|
|
61
|
+
"items": [
|
|
62
|
+
{
|
|
63
|
+
"value": "isolated",
|
|
64
|
+
"label": "isolated (one integration per operation)"
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"value": "shared",
|
|
68
|
+
"label": "shared (single default integration with optional overrides)"
|
|
69
|
+
}
|
|
70
|
+
],
|
|
71
|
+
"default": "isolated"
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
"auth": {
|
|
75
|
+
"type": "string",
|
|
76
|
+
"description": "The method used to authenticate with your API. Choose between IAM (default), Cognito or Custom.",
|
|
77
|
+
"default": "IAM",
|
|
78
|
+
"enum": ["IAM", "Cognito", "Custom"],
|
|
79
|
+
"x-prompt": "How would you like users to authenticate with your API?",
|
|
80
|
+
"x-priority": "important"
|
|
81
|
+
},
|
|
82
|
+
"directory": {
|
|
83
|
+
"description": "The directory to store the application in.",
|
|
84
|
+
"type": "string",
|
|
85
|
+
"alias": "dir",
|
|
86
|
+
"x-priority": "important",
|
|
87
|
+
"default": "packages",
|
|
88
|
+
"x-prompt": "What directory would you like to store your application in?"
|
|
89
|
+
},
|
|
90
|
+
"subDirectory": {
|
|
91
|
+
"type": "string",
|
|
92
|
+
"description": "The sub directory the project is placed in. By default this is the project name.",
|
|
93
|
+
"x-prompt": "Which sub directory do you want to create the project in? (By default this is the project name)"
|
|
94
|
+
},
|
|
95
|
+
"iacProvider": {
|
|
96
|
+
"type": "string",
|
|
97
|
+
"description": "The preferred IaC provider. By default this is inherited from your initial selection.",
|
|
98
|
+
"enum": ["Inherit", "CDK", "Terraform"],
|
|
99
|
+
"x-priority": "important",
|
|
100
|
+
"default": "Inherit",
|
|
101
|
+
"x-prompt": "Which provider would you like to manage your infrastructure? (default: Inherit)"
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
"required": ["name"]
|
|
105
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/schema",
|
|
3
|
+
"cli": "nx",
|
|
4
|
+
"$id": "ts#docs",
|
|
5
|
+
"title": "Create a documentation site",
|
|
6
|
+
"description": "Generates a documentation site. Use the `framework` option to select the underlying docs framework.",
|
|
7
|
+
"examples": [
|
|
8
|
+
{
|
|
9
|
+
"command": "nx g ts#docs",
|
|
10
|
+
"description": "Generate a docs site using Astro (default framework)"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"command": "nx g ts#docs --framework=astro --noTranslation",
|
|
14
|
+
"description": "Generate an Astro docs site without the automated translation pipeline"
|
|
15
|
+
}
|
|
16
|
+
],
|
|
17
|
+
"type": "object",
|
|
18
|
+
"properties": {
|
|
19
|
+
"name": {
|
|
20
|
+
"description": "The name of the docs project.",
|
|
21
|
+
"type": "string",
|
|
22
|
+
"default": "docs",
|
|
23
|
+
"$default": {
|
|
24
|
+
"$source": "argv",
|
|
25
|
+
"index": 0
|
|
26
|
+
},
|
|
27
|
+
"x-prompt": "What name would you like to use for the docs project?",
|
|
28
|
+
"pattern": "^[a-zA-Z][^:]*$"
|
|
29
|
+
},
|
|
30
|
+
"directory": {
|
|
31
|
+
"description": "The parent directory the docs project is placed in.",
|
|
32
|
+
"type": "string",
|
|
33
|
+
"alias": "dir",
|
|
34
|
+
"x-priority": "important",
|
|
35
|
+
"default": ".",
|
|
36
|
+
"x-prompt": "Which parent directory would you like to place the docs project in?"
|
|
37
|
+
},
|
|
38
|
+
"subDirectory": {
|
|
39
|
+
"type": "string",
|
|
40
|
+
"description": "The sub directory the docs project is placed in. Defaults to the kebab-case project name.",
|
|
41
|
+
"x-prompt": "Which sub directory should the docs project be created in? (default: kebab-case of the name)"
|
|
42
|
+
},
|
|
43
|
+
"framework": {
|
|
44
|
+
"description": "The documentation framework to use.",
|
|
45
|
+
"type": "string",
|
|
46
|
+
"enum": ["astro"],
|
|
47
|
+
"default": "astro",
|
|
48
|
+
"x-priority": "important",
|
|
49
|
+
"x-prompt": "Which documentation framework would you like to use?"
|
|
50
|
+
},
|
|
51
|
+
"noTranslation": {
|
|
52
|
+
"description": "Opt out of the automated documentation translation pipeline (Strands Agent on Amazon Bedrock + a `translate` project target).",
|
|
53
|
+
"type": "boolean",
|
|
54
|
+
"default": false,
|
|
55
|
+
"x-prompt": "Would you like to opt out of automated documentation translation?"
|
|
56
|
+
},
|
|
57
|
+
"noBlog": {
|
|
58
|
+
"description": "Opt out of the `starlight-blog` plugin and the sample blog post.",
|
|
59
|
+
"type": "boolean",
|
|
60
|
+
"default": false,
|
|
61
|
+
"x-prompt": "Would you like to opt out of the blog?"
|
|
62
|
+
},
|
|
63
|
+
"skipInstall": {
|
|
64
|
+
"description": "Skip installing dependencies after the generator runs.",
|
|
65
|
+
"type": "boolean",
|
|
66
|
+
"default": false
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
"required": ["name"]
|
|
70
|
+
}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/schema",
|
|
3
|
+
"cli": "nx",
|
|
4
|
+
"$id": "Website",
|
|
5
|
+
"title": "Create a Website",
|
|
6
|
+
"description": "Create a website application for Nx.",
|
|
7
|
+
"examples": [
|
|
8
|
+
{
|
|
9
|
+
"command": "nx g app myapp --directory=myorg",
|
|
10
|
+
"description": "Generate `apps/myorg/myapp` and `apps/myorg/myapp-e2e`"
|
|
11
|
+
}
|
|
12
|
+
],
|
|
13
|
+
"type": "object",
|
|
14
|
+
"properties": {
|
|
15
|
+
"name": {
|
|
16
|
+
"description": "The name of the application.",
|
|
17
|
+
"type": "string",
|
|
18
|
+
"$default": {
|
|
19
|
+
"$source": "argv",
|
|
20
|
+
"index": 0
|
|
21
|
+
},
|
|
22
|
+
"x-prompt": "What name would you like to use for the application?",
|
|
23
|
+
"pattern": "^[a-zA-Z][^:]*$"
|
|
24
|
+
},
|
|
25
|
+
"framework": {
|
|
26
|
+
"type": "string",
|
|
27
|
+
"description": "The frontend framework to use.",
|
|
28
|
+
"enum": ["react"],
|
|
29
|
+
"default": "react",
|
|
30
|
+
"x-priority": "important",
|
|
31
|
+
"x-prompt": "Which frontend framework would you like to use?"
|
|
32
|
+
},
|
|
33
|
+
"directory": {
|
|
34
|
+
"description": "The directory of the new application.",
|
|
35
|
+
"type": "string",
|
|
36
|
+
"alias": "dir",
|
|
37
|
+
"x-priority": "important",
|
|
38
|
+
"default": "packages",
|
|
39
|
+
"x-prompt": "What directory would you like to store your application in?"
|
|
40
|
+
},
|
|
41
|
+
"subDirectory": {
|
|
42
|
+
"type": "string",
|
|
43
|
+
"description": "The sub directory the project is placed in. By default this is the project name.",
|
|
44
|
+
"x-prompt": "Which sub directory do you want to create the project in? (By default this is the project name)"
|
|
45
|
+
},
|
|
46
|
+
"uxProvider": {
|
|
47
|
+
"type": "string",
|
|
48
|
+
"description": "The preferred UX provider.",
|
|
49
|
+
"enum": ["None", "Cloudscape", "Shadcn"],
|
|
50
|
+
"x-priority": "important",
|
|
51
|
+
"default": "Cloudscape",
|
|
52
|
+
"x-prompt": {
|
|
53
|
+
"message": "Which UX provider should we scaffold for this app?",
|
|
54
|
+
"type": "list",
|
|
55
|
+
"items": [
|
|
56
|
+
{
|
|
57
|
+
"value": "None",
|
|
58
|
+
"label": "None (plain React/Vite without a UI kit)"
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"value": "Cloudscape",
|
|
62
|
+
"label": "Cloudscape (AWS-first components with ready-made layouts)"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"value": "Shadcn",
|
|
66
|
+
"label": "Shadcn (shared UI library under packages/common/shadcn)"
|
|
67
|
+
}
|
|
68
|
+
],
|
|
69
|
+
"default": "Cloudscape"
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
"enableTailwind": {
|
|
73
|
+
"description": "Enable TailwindCSS for utility-first styling.",
|
|
74
|
+
"type": "boolean",
|
|
75
|
+
"default": true,
|
|
76
|
+
"x-priority": "important",
|
|
77
|
+
"x-prompt": "Would you like to enable TailwindCSS for additional styling capabilities?"
|
|
78
|
+
},
|
|
79
|
+
"enableTanstackRouter": {
|
|
80
|
+
"description": "Enable Tanstack router for type-safe routing.",
|
|
81
|
+
"type": "boolean",
|
|
82
|
+
"default": true,
|
|
83
|
+
"x-priority": "important",
|
|
84
|
+
"x-prompt": "Would you like to enable Tanstack Router for type-safe routing?"
|
|
85
|
+
},
|
|
86
|
+
"iacProvider": {
|
|
87
|
+
"type": "string",
|
|
88
|
+
"description": "The preferred IaC provider. By default this is inherited from your initial selection.",
|
|
89
|
+
"enum": ["Inherit", "CDK", "Terraform"],
|
|
90
|
+
"x-priority": "important",
|
|
91
|
+
"default": "Inherit",
|
|
92
|
+
"x-prompt": "Which provider would you like to manage your infrastructure? (default: Inherit)"
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
"required": ["name"],
|
|
96
|
+
"examplesFile": "../../../docs/application-examples.md"
|
|
97
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/schema",
|
|
3
|
+
"cli": "nx",
|
|
4
|
+
"$id": "Website Auth",
|
|
5
|
+
"title": "Website Auth",
|
|
6
|
+
"description": "Adds auth to an existing website.",
|
|
7
|
+
"examples": [
|
|
8
|
+
{
|
|
9
|
+
"command": "nx g @aws/nx-plugin:ts#website#auth --project=my-website",
|
|
10
|
+
"description": "Add Cognito auth to an existing website"
|
|
11
|
+
}
|
|
12
|
+
],
|
|
13
|
+
"type": "object",
|
|
14
|
+
"properties": {
|
|
15
|
+
"project": {
|
|
16
|
+
"description": "The root directory of the website.",
|
|
17
|
+
"type": "string",
|
|
18
|
+
"alias": "dir",
|
|
19
|
+
"x-priority": "important",
|
|
20
|
+
"x-prompt": "the root directory for your website.",
|
|
21
|
+
"x-dropdown": "projects"
|
|
22
|
+
},
|
|
23
|
+
"cognitoDomain": {
|
|
24
|
+
"description": "The cognito domain prefix to use. If omitted, a value is derived from the npm scope and website project name.",
|
|
25
|
+
"type": "string",
|
|
26
|
+
"x-priority": "important",
|
|
27
|
+
"x-prompt": "the cognito domain prefix to use i.e: https://{{cognitoDomain}}-123456789.auth.ap-southeast-2.amazoncognito.com (leave blank to derive from scope and project name)"
|
|
28
|
+
},
|
|
29
|
+
"allowSignup": {
|
|
30
|
+
"description": "Whether to allow self-signup",
|
|
31
|
+
"type": "boolean",
|
|
32
|
+
"default": false,
|
|
33
|
+
"x-prompt": "Enable self signup?",
|
|
34
|
+
"x-priority": "important"
|
|
35
|
+
},
|
|
36
|
+
"iacProvider": {
|
|
37
|
+
"type": "string",
|
|
38
|
+
"description": "The preferred IaC provider. By default this is inherited from your initial selection.",
|
|
39
|
+
"enum": ["Inherit", "CDK", "Terraform"],
|
|
40
|
+
"x-priority": "important",
|
|
41
|
+
"default": "Inherit",
|
|
42
|
+
"x-prompt": "Which provider would you like to manage your infrastructure? (default: Inherit)"
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
"required": ["project"]
|
|
46
|
+
}
|