このジェネレーターは、ウェブサイトがAPIを呼び出すなど、プロジェクト同士を接続するために使用されます。ソースプロジェクト(例:APIを呼び出すプロジェクト)とターゲットプロジェクト(例:APIプロジェクト)を選択するだけで、このジェネレーターが両者の統合を処理します。
pnpm nx g @aws/nx-plugin:connection
yarn nx g @aws/nx-plugin:connection
npx nx g @aws/nx-plugin:connection
bunx nx g @aws/nx-plugin:connection
変更されるファイルを確認するためにドライランを実行することもできます
pnpm nx g @aws/nx-plugin:connection --dry-run
yarn nx g @aws/nx-plugin:connection --dry-run
npx nx g @aws/nx-plugin:connection --dry-run
bunx nx g @aws/nx-plugin:connection --dry-run
- インストール Nx Console VSCode Plugin まだインストールしていない場合
- VSCodeでNxコンソールを開く
- クリック
Generate (UI) "Common Nx Commands"セクションで - 検索
@aws/nx-plugin - connection - 必須パラメータを入力
- クリック
Generate
| パラメータ | 型 | デフォルト | 説明 |
|---|
| sourceProject 必須 | string | - | ソース プロジェクト |
| targetProject 必須 | string | - | 接続先のターゲット プロジェクト |
| sourceComponent | string | - | 接続元のソース コンポーネント (コンポーネント名、ソース プロジェクト ルートからの相対パス、またはジェネレーター ID)。プロジェクトをソースとして明示的に選択するには '.' を使用します。 |
| targetComponent | string | - | 接続先のターゲット コンポーネント (コンポーネント名、ターゲット プロジェクト ルートからの相対パス、またはジェネレーター ID)。プロジェクトをターゲットとして明示的に選択するには '.' を使用します。 |
| preferInstallDependencies | boolean | true | ジェネレーター実行後に依存関係のインストールを優先するかどうか。複数のジェネレーターをバッチ処理する際にインストールを延期する場合はfalseに設定します(後続のジェネレーターがNxプロジェクトグラフを計算できるよう、必要に応じてインストールは実行されます)。最後に一度だけインストールします。 |
Connectionジェネレーターは以下の接続をサポートしています:
React to tRPCCall a tRPC API from a React website React to FastAPICall a Python FastAPI from a React website React to Smithy APICall a Smithy API from a React website React to Python AgentCall a Python Agent from a React website React to TypeScript AgentCall a TypeScript Agent from a React website React to AG-UI AgentCall an Agent exposing the AG-UI protocol from a React website via CopilotKit Python Agent to MCPConnect a Python Agent to an MCP server TypeScript Agent to MCPConnect a TypeScript Agent to an MCP server Python Agent to A2A AgentConnect a Python Agent to a remote A2A agent TypeScript Agent to A2A AgentConnect a TypeScript Agent to a remote A2A agent tRPC API to Relational DatabaseConnect a tRPC API to an Aurora relational database Smithy API to Relational DatabaseConnect a Smithy API to an Aurora relational database TypeScript Agent to Relational DatabaseConnect a TypeScript Agent to an Aurora relational database TypeScript MCP Server to Relational DatabaseConnect a TypeScript MCP Server to an Aurora relational database FastAPI to Python Relational DatabaseConnect a FastAPI to a Python Aurora relational database Python Agent to Python Relational DatabaseConnect a Python Agent to a Python Aurora relational database Python MCP Server to Python Relational DatabaseConnect a Python MCP Server to a Python Aurora relational database tRPC API to TypeScript DynamoDBConnect a tRPC API to a DynamoDB table Smithy API to TypeScript DynamoDBConnect a Smithy API to a DynamoDB table TypeScript Agent to TypeScript DynamoDBConnect a TypeScript Agent to a DynamoDB table MCP Server to TypeScript DynamoDBConnect a TypeScript MCP Server to a DynamoDB table FastAPI to Python DynamoDBConnect a FastAPI to a DynamoDB table Python Agent to Python DynamoDBConnect a Python Agent to a DynamoDB table Python MCP Server to Python DynamoDBConnect a Python MCP Server to a DynamoDB table AgentCore Gateway to MCP ServerAggregate an MCP server behind an AgentCore Gateway AgentCore Gateway to AgentCore GatewayAggregate an AgentCore Gateway behind another AgentCore Gateway TypeScript Agent to AgentCore GatewayConnect a TypeScript Agent to an AgentCore Gateway Python Agent to AgentCore GatewayConnect a Python Agent to an AgentCore Gateway AgentCore Gateway to AgentFront an agent with an AgentCore Gateway as a runtime target React Website to AgentCore GatewayConnect a React website to agents through an AgentCore Gateway