Skip to main content
Glama
nrwl

Nx MCP Server

Official
by nrwl
create-builders-and-executors-schema.ts1.65 kB
import { CollectionInfo } from '@nx-console/shared-schema'; import { platform } from 'os'; import { JSONSchema } from 'vscode-json-languageservice'; type BuildersSchema = JSONSchema; type ExecutorsSchema = JSONSchema; /** * Builds the schema for builders and executors. * * @param collections * @returns [BuildersSchema[], ExecutorsSchema[]] */ export function createBuildersAndExecutorsSchema( collections: CollectionInfo[] ): [BuildersSchema[], ExecutorsSchema[]] { return collections.reduce<[BuildersSchema[], ExecutorsSchema[]]>( (acc, collection) => { const schemaRef = platform() === 'win32' ? collection.schemaPath : `file://${collection.schemaPath}`; acc[0].push({ if: { properties: { builder: { const: collection.name } }, required: ['builder'], }, then: { properties: { options: { $ref: schemaRef, }, configurations: { additionalProperties: { $ref: schemaRef, required: [], }, }, }, }, }); acc[1].push({ if: { properties: { executor: { const: collection.name } }, required: ['executor'], }, then: { properties: { options: { $ref: schemaRef, }, configurations: { additionalProperties: { $ref: schemaRef, required: [], }, }, }, }, }); return acc; }, [[], []] ); }

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