npm.io
1.10.2 • Published 4d ago

sfmc-language-lsp

Licence
MIT
Version
1.10.2
Deps
3
Size
751 kB
Vulns
0
Weekly
1.6K

sfmc-language-lsp

Protocol-agnostic, browser-compatible language service for Salesforce Marketing Cloud — AMPscript, SSJS, and GTL. It provides validation, completions, hover, signature help, and code actions, with full Marketing Cloud Next (MCN) platform support.

Data comes from the ampscript-data and ssjs-data packages. Consumers include the SFMC Language Service VS Code extension (bundled) and the mcp-server-sfmc MCP server (runtime dependency).

Marketing Cloud Next (MCN) support

When targetPlatform is set to 'next' in SfmcSettings, the language service:

  • Flags AMPscript functions not supported on MCN as errors
  • Flags all SSJS as unsupported (SSJS is not available on MCN)
  • Surfaces MCN API version and behavioral-difference notes in hover documentation

MCN helper functions re-exported from ampscript-data:

import { isMcnSupported, getMcnApiVersion, getMcnNotes, extractAmpscriptFunctionCalls } from 'sfmc-language-lsp';

Install

npm install sfmc-language-lsp

Build

From this package directory:

npm ci
npm run build
npm test

License

MIT — see LICENSE.

Keywords