Registry / devops / flink-sql-language-server

flink-sql-language-server

JSON →
library0.7.1jsnpmunverified

A browser-based LSP language server for Apache Flink SQL, built with Antlr4ts. Provides code completions, diagnostics, rename, references, folding, hover, formatting, and code actions for Flink SQL files. Version 0.7.1 supports Flink 1.20. Released on npm, ships TypeScript types. Differentiates from generic SQL LSPs by offering Flink-specific SQL dialect support and custom commands for extracting SQL structure and registering schemas for auto-completion.

devopssearch
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

The constant is not exported from the main entry point; must import from the explicit path '/out-tsc/constants'.

import { EXTRACT_SQL_STRUCTURE } from 'flink-sql-language-server/out-tsc/constants';

The package is ESM-only; use ES import syntax. Default export is the Server class.

import { Server } from 'flink-sql-language-server';

IDiagnostic is a TypeScript interface; use 'import type' to avoid runtime issues.

import type { IDiagnostic } from 'flink-sql-language-server';

Starts the Flink SQL Language Server and demonstrates integration with VS Code's LanguageClient.

import { Server } from 'flink-sql-language-server'; const server = new Server({ flinkVersion: '1.20', // ... other options }); // Listen for messages (e.g., via stdin/stdout for LSP) server.listen(); // Or use with vscode-languageclient: import { LanguageClient } from 'vscode-languageclient/node'; const client = new LanguageClient( 'flink-sql', 'Flink SQL Language Server', { run: { module: require.resolve('flink-sql-language-server'), transport: TransportKind.ipc } }, { documentSelector: [{ scheme: 'file', language: 'flinksql' }] } ); client.start();
Debug
Known footguns
gotchaThe constant EXTRACT_SQL_STRUCTURE must be imported from a deep path in the package.
breakingIn version 0.7.0, the server constructor signature changed: options object now requires 'flinkVersion' string.
deprecatedThe 'registerSchemas' command with string arguments was replaced with an object argument in v0.6.0.
gotchaThe language server expects a language ID of 'flinksql' for document selectors.
deprecatedThe 'FlinkSQL' class (capital letters) has been renamed to 'Server' since v0.5.0.
Upgrade
Version history

Breaking-change detection hasn't run for this library yet.

Audit
Security & dependencies

CVE tracking and dependency tree are planned for a later release.

Agent activity
18 hits · last 30 days
gptbot
3
bytedance
3
bingbot
1
ahrefsbot
1
Resources