Skip to main content
Glama
nrwl

Nx MCP Server

Official
by nrwl
parse-target-string.ts786 B
import type { ProjectGraph, Target } from 'nx/src/devkit-exports'; import { join } from 'path'; import { importWorkspaceDependency, workspaceDependencyPath, } from '../workspace-dependencies'; export async function parseTargetString( targetString: string, projectGraph: ProjectGraph, workspacePath: string, ): Promise<Target> { const devkitPath = await workspaceDependencyPath(workspacePath, '@nx/devkit'); if (!devkitPath) { throw 'local @nx/devkit dependency not found'; } const importPath = join(devkitPath, 'src/executors/parse-target-string'); const { parseTargetString } = await importWorkspaceDependency< typeof import('@nx/devkit/src/executors/parse-target-string') >(importPath); return parseTargetString(targetString, projectGraph); }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/nrwl/nx-console'

If you have feedback or need assistance with the MCP directory API, please join our Discord server