From adec265f523570cbdb678d42ceb7d44b47ca5a23 Mon Sep 17 00:00:00 2001 From: DKalinov Date: Fri, 3 Apr 2026 14:49:06 +0300 Subject: [PATCH 1/2] feat(ng-schematics): add MCP server integration for AI assistant support --- README.md | 58 ++++++------------- packages/ng-schematics/README.md | 19 +++++- packages/ng-schematics/package.json | 3 + packages/ng-schematics/src/builders.json | 9 +++ .../ng-schematics/src/builders/mcp/index.ts | 41 +++++++++++++ .../src/builders/mcp/schema.json | 15 +++++ .../ng-schematics/src/cli-config/index.ts | 26 ++++++++- packages/ng-schematics/src/collection.json | 6 ++ packages/ng-schematics/src/mcp/index.ts | 46 +++++++++++++++ packages/ng-schematics/src/mcp/schema.json | 17 ++++++ packages/ng-schematics/src/mcp/schema.ts | 4 ++ packages/ng-schematics/src/ng-new/index.ts | 3 +- yarn.lock | 30 ++++++++++ 13 files changed, 231 insertions(+), 46 deletions(-) create mode 100644 packages/ng-schematics/src/builders.json create mode 100644 packages/ng-schematics/src/builders/mcp/index.ts create mode 100644 packages/ng-schematics/src/builders/mcp/schema.json create mode 100644 packages/ng-schematics/src/mcp/index.ts create mode 100644 packages/ng-schematics/src/mcp/schema.json create mode 100644 packages/ng-schematics/src/mcp/schema.ts diff --git a/README.md b/README.md index 13a3508ce..1c2d44174 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ [![npm version](https://badge.fury.io/js/igniteui-cli.svg)](https://badge.fury.io/js/igniteui-cli) [![Discord](https://img.shields.io/discord/836634487483269200?logo=discord&logoColor=ffffff)](https://discord.gg/39MjrTRqds) -Quickly create projects including [Ignite UI for Angular](https://www.infragistics.com/products/ignite-ui-angular) and [Ignite UI for jQuery](https://www.infragistics.com/products/ignite-ui) components for a variety of frameworks. +Quickly create projects including [Ignite UI for Angular](https://www.infragistics.com/products/ignite-ui-angular), [Ignite UI for React](https://www.infragistics.com/products/ignite-ui-react), [Ignite UI for Web Components](https://www.infragistics.com/products/ignite-ui-web-components) and [Ignite UI for jQuery](https://www.infragistics.com/products/ignite-ui) components. ## Overview ### Features: @@ -19,9 +19,10 @@ Quickly create projects including [Ignite UI for Angular](https://www.infragisti - Step by step guide ### Supported frameworks - * jQuery * Angular * React + * Web Components + * jQuery ### Prerequisites The repository houses multiple packages and orchestrates building and publishing them with [lerna](https://github.com/lerna/lerna) and [yarn workspaces](https://yarnpkg.com/lang/en/docs/workspaces/). @@ -95,7 +96,7 @@ ig new --framework= --type= --theme= ``` This will create the project and will install the needed dependencies. -Parameters besides name are optional. Framework default to "jquery", project type defaults to the first available in the framework and theme to the first available for the project. For more information visit [ig new](https://github.com/IgniteUI/igniteui-cli/wiki/New) Wiki page. +Parameters besides name are optional. Framework defaults to "jquery", project type defaults to the first available in the framework and theme to the first available for the project. For more information visit [ig new](https://github.com/IgniteUI/igniteui-cli/wiki/New) Wiki page. #### Generate Ignite UI for Angular project @@ -180,7 +181,7 @@ The MCP server exposes the following tools to AI assistants: | `search_docs` | Full-text search across Ignite UI documentation | | `get_api_reference` | Retrieve the full API reference for a component or class | | `search_api` | Search API entries by keyword or partial component name | -| `generate_ignite_app` | Return a setup guide for a new Ignite UI project | +| `get_project_setup_guide` | Return a setup guide for a new Ignite UI project | ### Testing with MCP Inspector @@ -190,7 +191,7 @@ npx @modelcontextprotocol/inspector ig mcp ``` ## Schematics -You can also add `Ignite UI for Angular` components to your projects by using the `igniteui/angular-schematics` package. It included schematic definitions for most of the logic present in the [`igniteui-cli`](/packages/cli). These can be called in any existing Angular project or even when creating one. You can learn more about the schematics package on from its [readme](/package/ng-schematics). +You can also add `Ignite UI for Angular` components to your projects by using the `@igniteui/angular-schematics` package. It includes schematic definitions for most of the logic present in the [`igniteui-cli`](/packages/cli), as well as an Architect Builder for starting the MCP server via `ng run :mcp`. These can be called in any existing Angular project or even when creating one. You can learn more about the schematics package from its [readme](/packages/ng-schematics). ## Contribution @@ -199,20 +200,12 @@ See the [Contribution guide](https://github.com/IgniteUI/igniteui-cli/blob/maste ### Run locally 1. Clone the repository 2. Install dependencies with `yarn install` -3. Build the MCP server and bundle it into the CLI: - ```bash - cd packages/igniteui-mcp/igniteui-doc-mcp - npm install - npm run build - cd ../../.. - npm run build:mcp-bundle - ``` -4. Build the monorepo packages: `npm run build` -5. Open in Visual Studio Code +3. Build the monorepo packages (includes MCP server): `npm run build` +4. Open in Visual Studio Code - There is a predefined launch.config file for VS Code in the root folder, so you can use VS Code View/Debug window and choose one of the predefined actions. These include launching the step by step guide, create new project for a particular framework or add components. + There is a predefined `.vscode/launch.json` file for VS Code, so you can use VS Code View/Debug window and choose one of the predefined actions. These include launching the step by step guide, create new project for a particular framework or add components. -6. Hit Start Debugging/F5 +5. Hit Start Debugging/F5 #### MCP Server development @@ -238,55 +231,38 @@ npm run build:docs:all # Build both > **Note:** Web Components requires a one-time library build (`npm run build:publish` in the submodule) before TypeDoc can run. The build script handles this automatically. -**Bundle MCP into CLI** (from the repo root): -```bash -npm run build:mcp-bundle # Copies dist/ and docs/ into packages/cli/mcp/ -``` - -This copies the compiled MCP server, SQLite documentation database, and API reference docs into the CLI package. The `packages/cli/mcp/` directory is a build artifact (gitignored) and must be regenerated before publishing. - **Test the MCP server locally:** ```bash -npm run build:mcp-bundle npm run build node packages/cli/lib/cli.js mcp # Start via CLI -# or directly: -node packages/cli/mcp/dist/index.js # Start the bundled server ``` -#### Building CLI package with bundled MCP server +#### Building CLI package with MCP server -The CLI package includes the MCP server as a bundled build artifact (not an npm dependency). To produce a complete CLI package with full MCP functionality, follow these steps: +The CLI package depends on `@igniteui/mcp-server` as an npm dependency. To produce a complete CLI package with full MCP functionality, follow these steps: ```bash # 1. Install monorepo dependencies yarn install -# 2. Build the MCP server +# 2. Build API reference docs (optional but recommended for full functionality) cd packages/igniteui-mcp/igniteui-doc-mcp -npm install -npm run build # Compile TypeScript + copy SQLite DB - -# 3. Build API reference docs (optional but recommended for full functionality) npm run build:docs:all # Init submodules + generate Angular + WC API docs via TypeDoc -# 4. Bundle MCP into CLI (from repo root) +# 3. Build all packages for publishing (from repo root) cd ../../.. -npm run build:mcp-bundle # Copy dist/ + docs/ → packages/cli/mcp/ - -# 5. Build all packages for publishing npm run build-pack ``` -After step 5, `npm pack` from the repo root or `packages/cli/` will produce a tarball with the MCP server, documentation database, and API reference docs all included. +After step 3, `npm pack` from the repo root or `packages/cli/` will produce a tarball with the MCP server, documentation database, and API reference docs all included. -> **Skipping API docs:** If you skip step 3, the MCP server will still work for `list_components`, `get_doc`, `search_docs`, and `generate_ignite_app` tools using the bundled SQLite database. Only the `get_api_reference` and `search_api` tools require API docs. +> **Skipping API docs:** If you skip step 2, the MCP server will still work for `list_components`, `get_doc`, `search_docs`, and `get_project_setup_guide` tools using the bundled SQLite database. Only the `get_api_reference` and `search_api` tools require API docs. ## Data Collection The Ignite UI CLI tool uses Google Analytics to anonymously report feature usage statistics and basic crash reports. This data is used to help improve the Ignite UI CLI tools over time. You can opt out of analytics before any data is sent by using -```bach +```bash ig config set disableAnalytics true -g ``` diff --git a/packages/ng-schematics/README.md b/packages/ng-schematics/README.md index 77ce5227d..bc226e22f 100644 --- a/packages/ng-schematics/README.md +++ b/packages/ng-schematics/README.md @@ -43,4 +43,21 @@ ng g @igniteui/angular-schematics:component [templateId] [componentName] ``` You can find all of the template definitions in the [official documentation](https://www.infragistics.com/products/ignite-ui-angular/angular/components/general/cli/component-templates.html) - \ No newline at end of file + +## MCP Server + +The package includes an Architect Builder that starts the [Ignite UI MCP server](../igniteui-mcp/igniteui-doc-mcp) for AI assistant integration. The `mcp` target is automatically registered in `angular.json` when you create a new project or run `ng add`. + +```bash +ng run :mcp +``` + +Options: + +- `--remote ` — Use a remote backend instead of the local SQLite database +- `--debug` — Enable debug logging to `mcp-server.log` + +```bash +ng run my-app:mcp --remote https://your-backend-url.com +ng run my-app:mcp --debug +``` \ No newline at end of file diff --git a/packages/ng-schematics/package.json b/packages/ng-schematics/package.json index e30c798d4..3aeb139f5 100644 --- a/packages/ng-schematics/package.json +++ b/packages/ng-schematics/package.json @@ -17,11 +17,14 @@ "author": "", "license": "MIT", "schematics": "./src/collection.json", + "builders": "./src/builders.json", "dependencies": { + "@angular-devkit/architect": "^0.2100.0", "@angular-devkit/core": "^21.0.0", "@angular-devkit/schematics": "^21.0.0", "@igniteui/angular-templates": "~21.1.1500-rc.0", "@igniteui/cli-core": "~15.0.0-rc.0", + "@igniteui/mcp-server": "~15.0.0-rc.0", "@schematics/angular": "^21.0.0", "minimatch": "^10.0.1", "rxjs": "~7.8.1" diff --git a/packages/ng-schematics/src/builders.json b/packages/ng-schematics/src/builders.json new file mode 100644 index 000000000..5a387fd46 --- /dev/null +++ b/packages/ng-schematics/src/builders.json @@ -0,0 +1,9 @@ +{ + "builders": { + "mcp": { + "implementation": "./builders/mcp/index", + "schema": "./builders/mcp/schema.json", + "description": "Starts the Ignite UI MCP server for AI assistant integration" + } + } +} diff --git a/packages/ng-schematics/src/builders/mcp/index.ts b/packages/ng-schematics/src/builders/mcp/index.ts new file mode 100644 index 000000000..ac9874443 --- /dev/null +++ b/packages/ng-schematics/src/builders/mcp/index.ts @@ -0,0 +1,41 @@ +import * as fs from "fs"; +import * as path from "path"; +import { createBuilder, BuilderContext, BuilderOutput } from "@angular-devkit/architect"; +import { Util } from "@igniteui/cli-core"; +import { McpOptions } from "../../mcp/schema"; + +export default createBuilder((options: McpOptions, context: BuilderContext): BuilderOutput => { + let mcpEntry: string; + try { + const mcpPkgJson = require.resolve("@igniteui/mcp-server/package.json"); + mcpEntry = path.resolve(path.dirname(mcpPkgJson), "dist", "index.js"); + } catch { + context.logger.error( + "MCP server package not found. Install it first:\n" + + " yarn install\n" + ); + return { success: false }; + } + + if (!fs.existsSync(mcpEntry)) { + context.logger.error( + "MCP server not built. Build it first:\n" + + " npm run build:mcp\n" + ); + return { success: false }; + } + + const args: string[] = []; + if (options.remote) { + args.push("--remote", options.remote); + } + if (options.debug) { + args.push("--debug"); + } + + Util.execSync( + `node "${mcpEntry}" ${args.join(" ")}`, + { stdio: "inherit", killSignal: "SIGINT" } + ); + return { success: true }; +}); diff --git a/packages/ng-schematics/src/builders/mcp/schema.json b/packages/ng-schematics/src/builders/mcp/schema.json new file mode 100644 index 000000000..b37d65e38 --- /dev/null +++ b/packages/ng-schematics/src/builders/mcp/schema.json @@ -0,0 +1,15 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema", + "type": "object", + "properties": { + "remote": { + "type": "string", + "description": "Backend URL for remote mode (uses HTTP instead of local SQLite)" + }, + "debug": { + "type": "boolean", + "description": "Enable debug logging to mcp-server.log", + "default": false + } + } +} diff --git a/packages/ng-schematics/src/cli-config/index.ts b/packages/ng-schematics/src/cli-config/index.ts index 01296af62..ebd05aa7c 100644 --- a/packages/ng-schematics/src/cli-config/index.ts +++ b/packages/ng-schematics/src/cli-config/index.ts @@ -1,7 +1,7 @@ import * as ts from "typescript"; -import { DependencyNotFoundException } from "@angular-devkit/core"; +import { DependencyNotFoundException, workspaces } from "@angular-devkit/core"; import { chain, FileDoesNotExistException, Rule, SchematicContext, Tree } from "@angular-devkit/schematics"; -import { addClassToBody, FormatSettings, NPM_ANGULAR, resolvePackage, TypeScriptAstTransformer, TypeScriptUtils } from "@igniteui/cli-core"; +import { addClassToBody, createWorkspaceHost, FormatSettings, NPM_ANGULAR, resolvePackage, TypeScriptAstTransformer, TypeScriptUtils } from "@igniteui/cli-core"; import { AngularTypeScriptFileUpdate } from "@igniteui/angular-templates"; import { createCliConfig } from "../utils/cli-config"; import { setVirtual } from "../utils/NgFileSystem"; @@ -157,6 +157,25 @@ export function addAIConfig(): Rule { }; } +export function addMcpBuilderTarget(): Rule { + return async (tree: Tree) => { + const host = createWorkspaceHost(tree); + const { workspace } = await workspaces.readWorkspace("/", host); + + const project = workspace.extensions.defaultProject ? + workspace.projects.get(workspace.extensions.defaultProject as string) : + workspace.projects.values().next().value as workspaces.ProjectDefinition; + + if (project && !project.targets.has("mcp")) { + project.targets.set("mcp", { + builder: "@igniteui/angular-schematics:mcp", + options: {} + }); + await workspaces.writeWorkspace(workspace, host); + } + }; +} + export default function (): Rule { return (tree: Tree) => { setVirtual(tree); @@ -166,7 +185,8 @@ export default function (): Rule { importBrowserAnimations(), createCliConfig(), displayVersionMismatch(), - addAIConfig() + addAIConfig(), + addMcpBuilderTarget() ]); }; } diff --git a/packages/ng-schematics/src/collection.json b/packages/ng-schematics/src/collection.json index ac4f616c9..10acb8187 100644 --- a/packages/ng-schematics/src/collection.json +++ b/packages/ng-schematics/src/collection.json @@ -37,6 +37,12 @@ "description": "Upgrades to the licensed Ignite UI for Angular packages", "factory": "./upgrade-packages/index", "schema": "./upgrade-packages/schema.json" + }, + "mcp": { + "description": "Starts the Ignite UI MCP server for AI assistant integration", + "factory": "./mcp/index", + "schema": "./mcp/schema.json", + "hidden": true } } } diff --git a/packages/ng-schematics/src/mcp/index.ts b/packages/ng-schematics/src/mcp/index.ts new file mode 100644 index 000000000..69ba872b8 --- /dev/null +++ b/packages/ng-schematics/src/mcp/index.ts @@ -0,0 +1,46 @@ +import * as fs from "fs"; +import * as path from "path"; +import { Rule, SchematicContext, Tree } from "@angular-devkit/schematics"; +import { Util } from "@igniteui/cli-core"; +import { defer } from "rxjs"; +import { McpOptions } from "./schema"; + +export default function(options: McpOptions): Rule { + return (_tree: Tree, _context: SchematicContext) => { + return defer(async () => { + let mcpEntry: string; + try { + const mcpPkgJson = require.resolve("@igniteui/mcp-server/package.json"); + mcpEntry = path.resolve(path.dirname(mcpPkgJson), "dist", "index.js"); + } catch { + _context.logger.error( + "MCP server package not found. Install it first:\n" + + " yarn install\n" + ); + return _tree; + } + + if (!fs.existsSync(mcpEntry)) { + _context.logger.error( + "MCP server not built. Build it first:\n" + + " npm run build:mcp\n" + ); + return _tree; + } + + const args: string[] = []; + if (options.remote) { + args.push("--remote", options.remote); + } + if (options.debug) { + args.push("--debug"); + } + + Util.execSync( + `node "${mcpEntry}" ${args.join(" ")}`, + { stdio: "inherit", killSignal: "SIGINT" } + ); + return _tree; + }); + }; +} diff --git a/packages/ng-schematics/src/mcp/schema.json b/packages/ng-schematics/src/mcp/schema.json new file mode 100644 index 000000000..6f6e79c92 --- /dev/null +++ b/packages/ng-schematics/src/mcp/schema.json @@ -0,0 +1,17 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema", + "type": "object", + "properties": { + "remote": { + "type": "string", + "description": "Backend URL for remote mode (uses HTTP instead of local SQLite)", + "alias": "r" + }, + "debug": { + "type": "boolean", + "description": "Enable debug logging to mcp-server.log", + "default": false, + "alias": "d" + } + } +} diff --git a/packages/ng-schematics/src/mcp/schema.ts b/packages/ng-schematics/src/mcp/schema.ts new file mode 100644 index 000000000..b024d7d64 --- /dev/null +++ b/packages/ng-schematics/src/mcp/schema.ts @@ -0,0 +1,4 @@ +export interface McpOptions { + remote?: string; + debug?: boolean; +} diff --git a/packages/ng-schematics/src/ng-new/index.ts b/packages/ng-schematics/src/ng-new/index.ts index bb4deb766..e35db5a41 100644 --- a/packages/ng-schematics/src/ng-new/index.ts +++ b/packages/ng-schematics/src/ng-new/index.ts @@ -17,7 +17,7 @@ import { defer, Observable } from "rxjs"; import { NewProjectOptions } from "../app-projects/schema"; import { SchematicsPromptSession } from "../prompt/SchematicsPromptSession"; import { SchematicsTemplateManager } from "../SchematicsTemplateManager"; -import { addAIConfig } from "../cli-config/index"; +import { addAIConfig, addMcpBuilderTarget } from "../cli-config/index"; import { setVirtual } from "../utils/NgFileSystem"; import { OptionsSchema } from "./schema"; @@ -152,6 +152,7 @@ export function newProject(options: OptionsSchema): Rule { } }, addAIConfig(), + addMcpBuilderTarget(), (_tree: Tree, _context: IgxSchematicContext) => { return move(options.name!); } diff --git a/yarn.lock b/yarn.lock index 5239b44bd..7e4f05dec 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,6 +2,26 @@ # yarn lockfile v1 +"@angular-devkit/architect@^0.2100.0": + version "0.2100.6" + resolved "https://registry.yarnpkg.com/@angular-devkit/architect/-/architect-0.2100.6.tgz#b5bc7d9e96565e86c355ada827405a91c09cfccd" + integrity sha512-RsCXULyyNNElRHDObVeEBhEOaLK8QaKu+DaYVhfkOOKvVeDoEI0i+0JomzPhGDjazXPPYG8BPOTgSOvhlEeWSA== + dependencies: + "@angular-devkit/core" "21.0.6" + rxjs "7.8.2" + +"@angular-devkit/core@21.0.6": + version "21.0.6" + resolved "https://registry.yarnpkg.com/@angular-devkit/core/-/core-21.0.6.tgz#0b02dc6e891916715ab1348c8f755d150870db24" + integrity sha512-quhQrvfbs1zzDev2T3PdyXDsTrthi9QjwegqR4HyDZKvYCWzmXLw9KjScqEWWUSKVLhG7GULrmb+tDsxRFG9lg== + dependencies: + ajv "8.17.1" + ajv-formats "3.0.1" + jsonc-parser "3.3.1" + picomatch "4.0.3" + rxjs "7.8.2" + source-map "0.7.6" + "@angular-devkit/core@21.2.3", "@angular-devkit/core@^21.0.0": version "21.2.3" resolved "https://registry.npmjs.org/@angular-devkit/core/-/core-21.2.3.tgz" @@ -2023,6 +2043,16 @@ ajv-formats@3.0.1, ajv-formats@^3.0.1: dependencies: ajv "^8.0.0" +ajv@8.17.1: + version "8.17.1" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.17.1.tgz#37d9a5c776af6bc92d7f4f9510eba4c0a60d11a6" + integrity sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g== + dependencies: + fast-deep-equal "^3.1.3" + fast-uri "^3.0.1" + json-schema-traverse "^1.0.0" + require-from-string "^2.0.2" + ajv@8.18.0, ajv@^8.0.0, ajv@^8.17.1: version "8.18.0" resolved "https://registry.npmjs.org/ajv/-/ajv-8.18.0.tgz" From 89ae4e323fa10ea161cbc8715575dfe56daa5e7f Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 3 Apr 2026 14:17:32 +0000 Subject: [PATCH 2/2] fix(ng-schematics): replace Util.execSync with spawnSync to prevent command injection and align architect version Agent-Logs-Url: https://github.com/IgniteUI/igniteui-cli/sessions/87f53d3f-a82a-4e09-a71a-1c1f7a2a6dc9 Co-authored-by: dkalinovInfra <130121354+dkalinovInfra@users.noreply.github.com> --- packages/ng-schematics/package.json | 2 +- .../ng-schematics/src/builders/mcp/index.ts | 7 +-- packages/ng-schematics/src/mcp/index.ts | 7 +-- yarn.lock | 45 +++++++++---------- 4 files changed, 25 insertions(+), 36 deletions(-) diff --git a/packages/ng-schematics/package.json b/packages/ng-schematics/package.json index 3aeb139f5..a8d9b41ef 100644 --- a/packages/ng-schematics/package.json +++ b/packages/ng-schematics/package.json @@ -19,7 +19,7 @@ "schematics": "./src/collection.json", "builders": "./src/builders.json", "dependencies": { - "@angular-devkit/architect": "^0.2100.0", + "@angular-devkit/architect": "^0.2102.0", "@angular-devkit/core": "^21.0.0", "@angular-devkit/schematics": "^21.0.0", "@igniteui/angular-templates": "~21.1.1500-rc.0", diff --git a/packages/ng-schematics/src/builders/mcp/index.ts b/packages/ng-schematics/src/builders/mcp/index.ts index ac9874443..0d7f8a427 100644 --- a/packages/ng-schematics/src/builders/mcp/index.ts +++ b/packages/ng-schematics/src/builders/mcp/index.ts @@ -1,7 +1,7 @@ import * as fs from "fs"; import * as path from "path"; +import { spawnSync } from "child_process"; import { createBuilder, BuilderContext, BuilderOutput } from "@angular-devkit/architect"; -import { Util } from "@igniteui/cli-core"; import { McpOptions } from "../../mcp/schema"; export default createBuilder((options: McpOptions, context: BuilderContext): BuilderOutput => { @@ -33,9 +33,6 @@ export default createBuilder((options: McpOptions, context: BuilderC args.push("--debug"); } - Util.execSync( - `node "${mcpEntry}" ${args.join(" ")}`, - { stdio: "inherit", killSignal: "SIGINT" } - ); + spawnSync(process.execPath, [mcpEntry, ...args], { stdio: "inherit" }); return { success: true }; }); diff --git a/packages/ng-schematics/src/mcp/index.ts b/packages/ng-schematics/src/mcp/index.ts index 69ba872b8..378c5056d 100644 --- a/packages/ng-schematics/src/mcp/index.ts +++ b/packages/ng-schematics/src/mcp/index.ts @@ -1,7 +1,7 @@ import * as fs from "fs"; import * as path from "path"; +import { spawnSync } from "child_process"; import { Rule, SchematicContext, Tree } from "@angular-devkit/schematics"; -import { Util } from "@igniteui/cli-core"; import { defer } from "rxjs"; import { McpOptions } from "./schema"; @@ -36,10 +36,7 @@ export default function(options: McpOptions): Rule { args.push("--debug"); } - Util.execSync( - `node "${mcpEntry}" ${args.join(" ")}`, - { stdio: "inherit", killSignal: "SIGINT" } - ); + spawnSync(process.execPath, [mcpEntry, ...args], { stdio: "inherit" }); return _tree; }); }; diff --git a/yarn.lock b/yarn.lock index 7e4f05dec..796dca606 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,35 +2,35 @@ # yarn lockfile v1 -"@angular-devkit/architect@^0.2100.0": - version "0.2100.6" - resolved "https://registry.yarnpkg.com/@angular-devkit/architect/-/architect-0.2100.6.tgz#b5bc7d9e96565e86c355ada827405a91c09cfccd" - integrity sha512-RsCXULyyNNElRHDObVeEBhEOaLK8QaKu+DaYVhfkOOKvVeDoEI0i+0JomzPhGDjazXPPYG8BPOTgSOvhlEeWSA== +"@angular-devkit/architect@^0.2102.0": + version "0.2102.6" + resolved "https://registry.yarnpkg.com/@angular-devkit/architect/-/architect-0.2102.6.tgz#65eae4f7a9e422ade7c5e9d9e5d9b811aecf12d5" + integrity sha512-h4qybKypR7OuwcTHPQI1zRm7abXgmPiV49vI2UeMtVVY/GKzru9gMexcYmWabzEyBY8w6VSfWjV2X+eit2EhDQ== dependencies: - "@angular-devkit/core" "21.0.6" + "@angular-devkit/core" "21.2.6" rxjs "7.8.2" -"@angular-devkit/core@21.0.6": - version "21.0.6" - resolved "https://registry.yarnpkg.com/@angular-devkit/core/-/core-21.0.6.tgz#0b02dc6e891916715ab1348c8f755d150870db24" - integrity sha512-quhQrvfbs1zzDev2T3PdyXDsTrthi9QjwegqR4HyDZKvYCWzmXLw9KjScqEWWUSKVLhG7GULrmb+tDsxRFG9lg== +"@angular-devkit/core@21.2.3", "@angular-devkit/core@^21.0.0": + version "21.2.3" + resolved "https://registry.npmjs.org/@angular-devkit/core/-/core-21.2.3.tgz" + integrity sha512-i++JVHOijyFckjdYqKbSXUpKnvmO2a0Utt/wQVwiLAT0O9H1hR/2NGPzubB4hnLMNSyVWY8diminaF23mZ0xjA== dependencies: - ajv "8.17.1" + ajv "8.18.0" ajv-formats "3.0.1" jsonc-parser "3.3.1" picomatch "4.0.3" rxjs "7.8.2" source-map "0.7.6" -"@angular-devkit/core@21.2.3", "@angular-devkit/core@^21.0.0": - version "21.2.3" - resolved "https://registry.npmjs.org/@angular-devkit/core/-/core-21.2.3.tgz" - integrity sha512-i++JVHOijyFckjdYqKbSXUpKnvmO2a0Utt/wQVwiLAT0O9H1hR/2NGPzubB4hnLMNSyVWY8diminaF23mZ0xjA== +"@angular-devkit/core@21.2.6": + version "21.2.6" + resolved "https://registry.yarnpkg.com/@angular-devkit/core/-/core-21.2.6.tgz#96b864e5e1b7e718c0c20f45a9847fde8d1dcda2" + integrity sha512-u5gPTAY7MC02uACQE39xxiFcm1hslF+ih/f2borMWnhER0JNTpHjLiLRXFkq7or7+VVHU30zfhK4XNAuO4WTIg== dependencies: ajv "8.18.0" ajv-formats "3.0.1" jsonc-parser "3.3.1" - picomatch "4.0.3" + picomatch "4.0.4" rxjs "7.8.2" source-map "0.7.6" @@ -2043,16 +2043,6 @@ ajv-formats@3.0.1, ajv-formats@^3.0.1: dependencies: ajv "^8.0.0" -ajv@8.17.1: - version "8.17.1" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.17.1.tgz#37d9a5c776af6bc92d7f4f9510eba4c0a60d11a6" - integrity sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g== - dependencies: - fast-deep-equal "^3.1.3" - fast-uri "^3.0.1" - json-schema-traverse "^1.0.0" - require-from-string "^2.0.2" - ajv@8.18.0, ajv@^8.0.0, ajv@^8.17.1: version "8.18.0" resolved "https://registry.npmjs.org/ajv/-/ajv-8.18.0.tgz" @@ -6902,6 +6892,11 @@ picomatch@4.0.3, picomatch@^4.0.2, picomatch@^4.0.3: resolved "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz" integrity sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q== +picomatch@4.0.4: + version "4.0.4" + resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-4.0.4.tgz#fd6f5e00a143086e074dffe4c924b8fb293b0589" + integrity sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A== + picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.3.1: version "2.3.1" resolved "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz"