このジェネレータは、ウェブサイトがAPIを呼び出すなど、プロジェクト同士を接続するために使用されます。ソースプロジェクト(例:APIを呼び出すプロジェクト)とターゲットプロジェクト(例:APIプロジェクト)を選択するだけで、このジェネレータが2つのプロジェクトの統合を処理します。
- インストール Nx Console VSCode Plugin まだインストールしていない場合
- VSCodeでNxコンソールを開く
- クリック
Generate (UI) "Common Nx Commands"セクションで - 検索
@aws/nx-plugin - connection - 必須パラメータを入力
- クリック
Generate
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
| パラメータ | 型 | デフォルト | 説明 |
|---|
| sourceProject 必須 | string | - | ソース プロジェクト |
| targetProject 必須 | string | - | 接続先のターゲット プロジェクト |
| sourceComponent | string | - | 接続元のソース コンポーネント (コンポーネント名、ソース プロジェクト ルートからの相対パス、またはジェネレーター ID)。プロジェクトをソースとして明示的に選択するには '.' を使用します。 |
| targetComponent | string | - | 接続先のターゲット コンポーネント (コンポーネント名、ターゲット プロジェクト ルートからの相対パス、またはジェネレーター ID)。プロジェクトをターゲットとして明示的に選択するには '.' を使用します。 |
| preferInstallDependencies | boolean | true | ジェネレーター実行後に依存関係のインストールを優先するかどうか。複数のジェネレーターをバッチ処理する際にインストールを延期する場合はfalseに設定します(後続のジェネレーターがNxプロジェクトグラフを計算できるよう、必要に応じてインストールは実行されます)。最後に一度だけインストールします。 |
接続ジェネレータは以下の接続をサポートしています:
React to tRPCReactウェブサイトからtRPC APIを呼び出す React to FastAPIReactウェブサイトからPython FastAPIを呼び出す React to Smithy APIReactウェブサイトからSmithy APIを呼び出す React to Python AgentReactウェブサイトからPython Agentを呼び出す React to TypeScript AgentReactウェブサイトからTypeScript Agentを呼び出す React to AG-UI AgentCopilotKit経由でAG-UIプロトコルを公開するAgentをReactウェブサイトから呼び出す Python Agent to MCPPython AgentをMCPサーバーに接続する TypeScript Agent to MCPTypeScript AgentをMCPサーバーに接続する Python Agent to A2A AgentPython Agentをリモート A2A エージェントに接続する TypeScript Agent to A2A AgentTypeScript Agentをリモート A2A エージェントに接続する tRPC API to Relational DatabasetRPC APIをAuroraリレーショナルデータベースに接続する Smithy API to Relational DatabaseSmithy APIをAuroraリレーショナルデータベースに接続する TypeScript Agent to Relational DatabaseTypeScript AgentをAuroraリレーショナルデータベースに接続する TypeScript MCP Server to Relational DatabaseTypeScript MCP ServerをAuroraリレーショナルデータベースに接続する FastAPI to Python Relational DatabaseFastAPIをPython Auroraリレーショナルデータベースに接続する Python Agent to Python Relational DatabasePython AgentをPython Auroraリレーショナルデータベースに接続する Python MCP Server to Python Relational DatabasePython MCP ServerをPython Auroraリレーショナルデータベースに接続する tRPC API to TypeScript DynamoDBtRPC APIをDynamoDBテーブルに接続する Smithy API to TypeScript DynamoDBSmithy APIをDynamoDBテーブルに接続する TypeScript Agent to TypeScript DynamoDBTypeScript AgentをDynamoDBテーブルに接続する MCP Server to TypeScript DynamoDBTypeScript MCP ServerをDynamoDBテーブルに接続する FastAPI to Python DynamoDBFastAPIをDynamoDBテーブルに接続する Python Agent to Python DynamoDBPython AgentをDynamoDBテーブルに接続する Python MCP Server to Python DynamoDBPython MCP ServerをDynamoDBテーブルに接続する AgentCore Gateway to MCP ServerAgentCore GatewayでMCPサーバーを集約する AgentCore Gateway to AgentCore Gateway別のAgentCore Gatewayの背後にAgentCore Gatewayを集約する TypeScript Agent to AgentCore GatewayTypeScript AgentをAgentCore Gatewayに接続する Python Agent to AgentCore GatewayPython AgentをAgentCore Gatewayに接続する