@soda-gql/lsp 0.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,73 @@
1
+ # @soda-gql/lsp
2
+
3
+ GraphQL Language Server Protocol (LSP) implementation for soda-gql. Provides real-time diagnostics, completions, hover information, and other IDE features for soda-gql tagged template queries.
4
+
5
+ ## Features
6
+
7
+ - **Diagnostics** — Real-time validation of GraphQL field selections against your schema
8
+ - **Completion** — Field name suggestions based on parent type and schema
9
+ - **Hover** — Type information for fields, arguments, and variables
10
+ - **Go to Definition** — Navigate to fragment definitions and schema type locations
11
+ - **Find References** — Locate all usages of a fragment across the workspace
12
+ - **Rename** — Rename fragment definitions and all their spread references
13
+ - **Document Formatting** — Format GraphQL content within tagged templates
14
+ - **Document Symbols** — Outline view of queries, mutations, and fragments in a file
15
+ - **Code Actions** — Extract selections into fragments
16
+ - **Multi-schema** — Supports multiple GraphQL schemas in a single project
17
+ - **Monorepo multi-config** — Discovers and loads multiple `soda-gql.config.ts` files across workspace folders
18
+
19
+ ## Installation
20
+
21
+ ```bash
22
+ bun add @soda-gql/lsp
23
+ ```
24
+
25
+ ## Usage
26
+
27
+ ### Standalone CLI
28
+
29
+ Run the LSP server directly via the bundled binary:
30
+
31
+ ```bash
32
+ npx soda-gql-lsp --stdio
33
+ ```
34
+
35
+ ### Programmatic API
36
+
37
+ ```typescript
38
+ import { createLspServer } from "@soda-gql/lsp";
39
+
40
+ const server = createLspServer();
41
+ server.start();
42
+ ```
43
+
44
+ Pass a custom connection for testing or embedding:
45
+
46
+ ```typescript
47
+ import { createConnection, ProposedFeatures } from "vscode-languageserver/node";
48
+ import { createLspServer } from "@soda-gql/lsp";
49
+
50
+ const connection = createConnection(ProposedFeatures.all);
51
+ const server = createLspServer({ connection });
52
+ server.start();
53
+ ```
54
+
55
+ ## Supported Editors
56
+
57
+ - **VS Code / Cursor** — Via the [soda-gql VS Code extension](../vscode-extension)
58
+ - **Any LSP-compatible editor** — Neovim, Emacs, Sublime Text, etc. using the standalone CLI
59
+
60
+ ## Related Packages
61
+
62
+ - [@soda-gql/core](../core) — Core GraphQL query generation
63
+ - [soda-gql-vscode-extension](../vscode-extension) — VS Code extension with syntax highlighting and LSP integration
64
+ - [@soda-gql/builder](../builder) — Build-time transformation pipeline
65
+
66
+ ## Guides
67
+
68
+ - [LSP-Integrated Development Workflow](../../docs/guides/lsp-workflow.md) — How to use the LSP for daily development
69
+ - [Tagged Template Syntax Guide](../../docs/guides/tagged-template-syntax.md) — Syntax reference for tagged templates
70
+
71
+ ## License
72
+
73
+ MIT
package/dist/bin.cjs ADDED
@@ -0,0 +1,13 @@
1
+ #!/usr/bin/env node
2
+ const require_server = require('./server-0Mbk3BXO.cjs');
3
+
4
+ //#region packages/lsp/src/bin.ts
5
+ /**
6
+ * CLI entry point for the soda-gql LSP server.
7
+ * Used by VS Code extension to launch the server.
8
+ */
9
+ const server = require_server.createLspServer();
10
+ server.start();
11
+
12
+ //#endregion
13
+ //# sourceMappingURL=bin.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bin.cjs","names":["createLspServer"],"sources":["../src/bin.ts"],"sourcesContent":["#!/usr/bin/env node\n/**\n * CLI entry point for the soda-gql LSP server.\n * Used by VS Code extension to launch the server.\n */\n\nimport { createLspServer } from \"./server.js\";\n\nconst server = createLspServer();\nserver.start();\n"],"mappings":";;;;;;;;AAQA,MAAM,SAASA,gCAAiB;AAChC,OAAO,OAAO"}
package/dist/bin.d.cts ADDED
@@ -0,0 +1 @@
1
+ export { };
package/dist/bin.d.mts ADDED
@@ -0,0 +1 @@
1
+ export { };
package/dist/bin.mjs ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env node
2
+ import { t as createLspServer } from "./server-BgXl3W41.mjs";
3
+
4
+ //#region packages/lsp/src/bin.ts
5
+ /**
6
+ * CLI entry point for the soda-gql LSP server.
7
+ * Used by VS Code extension to launch the server.
8
+ */
9
+ const server = createLspServer();
10
+ server.start();
11
+
12
+ //#endregion
13
+ export { };
14
+ //# sourceMappingURL=bin.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bin.mjs","names":[],"sources":["../src/bin.ts"],"sourcesContent":["#!/usr/bin/env node\n/**\n * CLI entry point for the soda-gql LSP server.\n * Used by VS Code extension to launch the server.\n */\n\nimport { createLspServer } from \"./server.js\";\n\nconst server = createLspServer();\nserver.start();\n"],"mappings":";;;;;;;;AAQA,MAAM,SAAS,iBAAiB;AAChC,OAAO,OAAO"}
package/dist/index.cjs ADDED
@@ -0,0 +1,8 @@
1
+ const require_server = require('./server-0Mbk3BXO.cjs');
2
+
3
+ exports.createDocumentManager = require_server.createDocumentManager;
4
+ exports.createLspServer = require_server.createLspServer;
5
+ exports.createPositionMapper = require_server.createPositionMapper;
6
+ exports.createSchemaResolver = require_server.createSchemaResolver;
7
+ exports.lspErrors = require_server.lspErrors;
8
+ exports.preprocessFragmentArgs = require_server.preprocessFragmentArgs;
@@ -0,0 +1,254 @@
1
+ import * as _swc_core0 from "@swc/core";
2
+ import { GraphqlSystemIdentifyHelper } from "@soda-gql/builder";
3
+ import * as graphql0 from "graphql";
4
+ import { DocumentNode, FragmentDefinitionNode } from "graphql";
5
+ import { Result } from "neverthrow";
6
+ import { ResolvedSodaGqlConfig } from "@soda-gql/config";
7
+ import { Connection } from "vscode-languageserver/node";
8
+
9
+ //#region packages/lsp/src/types.d.ts
10
+ /** Operation kind extracted from tagged template tag name. */
11
+ type OperationKind = "query" | "mutation" | "subscription" | "fragment";
12
+ /** A single tagged template extracted from a TypeScript file. */
13
+ type ExtractedTemplate = {
14
+ /** Byte offset range of GraphQL content within TS source (excludes backticks). */
15
+ readonly contentRange: {
16
+ readonly start: number;
17
+ readonly end: number;
18
+ };
19
+ /** Resolved schema name from gql.{schemaName}. */
20
+ readonly schemaName: string;
21
+ /** Operation kind from tag name. */
22
+ readonly kind: OperationKind;
23
+ /** Raw GraphQL content between backticks. */
24
+ readonly content: string;
25
+ /** Element name from curried tag call (e.g., "GetUser" from query("GetUser")). */
26
+ readonly elementName?: string;
27
+ /** Type name from curried fragment call (e.g., "User" from fragment("UserFields", "User")). */
28
+ readonly typeName?: string;
29
+ };
30
+ /** Per-document state maintained by the document manager. */
31
+ type DocumentState = {
32
+ readonly uri: string;
33
+ readonly version: number;
34
+ readonly source: string;
35
+ readonly templates: readonly ExtractedTemplate[];
36
+ /** Set when @swc/core could not be loaded; template extraction is skipped. */
37
+ readonly swcUnavailable?: true;
38
+ };
39
+ /** A fragment definition indexed from a workspace document. */
40
+ type IndexedFragment = {
41
+ readonly uri: string;
42
+ readonly schemaName: string;
43
+ readonly fragmentName: string;
44
+ readonly definition: FragmentDefinitionNode;
45
+ /** Reconstructed full GraphQL source (with definition header for curried syntax). */
46
+ readonly content: string;
47
+ readonly contentRange: {
48
+ readonly start: number;
49
+ readonly end: number;
50
+ };
51
+ readonly tsSource: string;
52
+ /** Number of bytes prepended by reconstruction. */
53
+ readonly headerLen: number;
54
+ };
55
+ /** A located fragment spread reference within a template. */
56
+ type FragmentSpreadLocation = {
57
+ readonly uri: string;
58
+ readonly tsSource: string;
59
+ readonly template: ExtractedTemplate;
60
+ /** Offset of the fragment name (after "...") within GraphQL content. */
61
+ readonly nameOffset: number;
62
+ readonly nameLength: number;
63
+ };
64
+ //#endregion
65
+ //#region packages/lsp/src/document-manager.d.ts
66
+ type DocumentManager = {
67
+ readonly update: (uri: string, version: number, source: string) => DocumentState;
68
+ readonly get: (uri: string) => DocumentState | undefined;
69
+ readonly remove: (uri: string) => void;
70
+ readonly findTemplateAtOffset: (uri: string, offset: number) => ExtractedTemplate | undefined;
71
+ /** Get fragments from other documents for a given schema, excluding the specified URI. */
72
+ readonly getExternalFragments: (uri: string, schemaName: string) => readonly IndexedFragment[];
73
+ /** Get ALL indexed fragments (including self) for a given schema. */
74
+ readonly getAllFragments: (schemaName: string) => readonly IndexedFragment[];
75
+ /** Find all fragment spread locations across all documents for a given fragment name and schema. */
76
+ readonly findFragmentSpreadLocations: (fragmentName: string, schemaName: string) => readonly FragmentSpreadLocation[];
77
+ };
78
+ type SwcLoaderOptions = {
79
+ /** Override parseSync for testing. Pass null to simulate SWC unavailable. */
80
+ readonly parseSync?: typeof _swc_core0.parseSync | null;
81
+ /** Config file path used as the base for createRequire resolution of @swc/core. */
82
+ readonly resolveFrom?: string;
83
+ };
84
+ /**
85
+ * Index fragment definitions from extracted templates.
86
+ * Parses each fragment template to extract FragmentDefinitionNode for cross-file resolution.
87
+ */
88
+ /**
89
+ * Reconstruct full GraphQL source from an extracted template.
90
+ * Prepends the definition header from curried tag call arguments.
91
+ */
92
+ declare const reconstructGraphql: (template: ExtractedTemplate) => string;
93
+ /** Create a document manager that tracks open documents and extracts templates. */
94
+ declare const createDocumentManager: (helper: GraphqlSystemIdentifyHelper, swcOptions?: SwcLoaderOptions) => DocumentManager;
95
+ //#endregion
96
+ //#region packages/lsp/src/errors.d.ts
97
+ /** Error code taxonomy for LSP operations. */
98
+ type LspErrorCode = "CONFIG_LOAD_FAILED" | "SCHEMA_LOAD_FAILED" | "SCHEMA_BUILD_FAILED" | "SCHEMA_NOT_CONFIGURED" | "PARSE_FAILED" | "INTERNAL_INVARIANT" | "SWC_RESOLUTION_FAILED";
99
+ type ConfigLoadFailed = {
100
+ readonly code: "CONFIG_LOAD_FAILED";
101
+ readonly message: string;
102
+ readonly cause?: unknown;
103
+ };
104
+ type SchemaLoadFailed = {
105
+ readonly code: "SCHEMA_LOAD_FAILED";
106
+ readonly message: string;
107
+ readonly schemaName: string;
108
+ readonly cause?: unknown;
109
+ };
110
+ type SchemaBuildFailed = {
111
+ readonly code: "SCHEMA_BUILD_FAILED";
112
+ readonly message: string;
113
+ readonly schemaName: string;
114
+ readonly cause?: unknown;
115
+ };
116
+ type SchemaNotConfigured = {
117
+ readonly code: "SCHEMA_NOT_CONFIGURED";
118
+ readonly message: string;
119
+ readonly schemaName: string;
120
+ };
121
+ type ParseFailed = {
122
+ readonly code: "PARSE_FAILED";
123
+ readonly message: string;
124
+ readonly uri: string;
125
+ readonly cause?: unknown;
126
+ };
127
+ type InternalInvariant = {
128
+ readonly code: "INTERNAL_INVARIANT";
129
+ readonly message: string;
130
+ readonly context?: string;
131
+ readonly cause?: unknown;
132
+ };
133
+ type SwcResolutionFailed = {
134
+ readonly code: "SWC_RESOLUTION_FAILED";
135
+ readonly message: string;
136
+ };
137
+ /** Structured error type for all LSP operations. */
138
+ type LspError = ConfigLoadFailed | SchemaLoadFailed | SchemaBuildFailed | SchemaNotConfigured | ParseFailed | InternalInvariant | SwcResolutionFailed;
139
+ /** Helper type for LSP operation results. */
140
+ type LspResult<T> = Result<T, LspError>;
141
+ /** Error constructor helpers for concise error creation. */
142
+ declare const lspErrors: {
143
+ readonly configLoadFailed: (message: string, cause?: unknown) => ConfigLoadFailed;
144
+ readonly schemaLoadFailed: (schemaName: string, message?: string, cause?: unknown) => SchemaLoadFailed;
145
+ readonly schemaBuildFailed: (schemaName: string, message?: string, cause?: unknown) => SchemaBuildFailed;
146
+ readonly schemaNotConfigured: (schemaName: string) => SchemaNotConfigured;
147
+ readonly parseFailed: (uri: string, message?: string, cause?: unknown) => ParseFailed;
148
+ readonly internalInvariant: (message: string, context?: string, cause?: unknown) => InternalInvariant;
149
+ readonly swcResolutionFailed: (message?: string) => SwcResolutionFailed;
150
+ };
151
+ //#endregion
152
+ //#region packages/lsp/src/fragment-args-preprocessor.d.ts
153
+ /**
154
+ * Preprocessor for Fragment Arguments RFC syntax.
155
+ *
156
+ * Strips fragment argument declarations and spread arguments by replacing
157
+ * them with equal-length whitespace to preserve line/column alignment.
158
+ *
159
+ * @module
160
+ */
161
+ /** Result of fragment arguments preprocessing. */
162
+ type PreprocessResult = {
163
+ /** Content with Fragment Arguments syntax replaced by whitespace. */
164
+ readonly preprocessed: string;
165
+ /** Whether any preprocessing was applied. */
166
+ readonly modified: boolean;
167
+ };
168
+ /**
169
+ * Preprocess Fragment Arguments RFC syntax by replacing argument lists with spaces.
170
+ *
171
+ * Transforms:
172
+ * - `fragment UserProfile($showEmail: Boolean = false) on User` → `fragment UserProfile on User`
173
+ * - `...UserProfile(showEmail: true)` → `...UserProfile `
174
+ */
175
+ declare const preprocessFragmentArgs: (content: string) => PreprocessResult;
176
+ //#endregion
177
+ //#region packages/lsp/src/position-mapping.d.ts
178
+ /**
179
+ * Bidirectional position mapping between TypeScript file and GraphQL content.
180
+ * @module
181
+ */
182
+ /** 0-indexed line and character position. */
183
+ type Position = {
184
+ readonly line: number;
185
+ readonly character: number;
186
+ };
187
+ type PositionMapper = {
188
+ /** Map TS file position to GraphQL content position. Returns null if outside template. */
189
+ readonly tsToGraphql: (tsPosition: Position) => Position | null;
190
+ /** Map GraphQL content position back to TS file position. */
191
+ readonly graphqlToTs: (gqlPosition: Position) => Position;
192
+ };
193
+ type PositionMapperInput = {
194
+ readonly tsSource: string;
195
+ /** Byte offset of the first character of GraphQL content (after opening backtick). */
196
+ readonly contentStartOffset: number;
197
+ readonly graphqlContent: string;
198
+ };
199
+ /** Compute byte offsets for the start of each line in the source text. */
200
+ declare const computeLineOffsets: (source: string) => readonly number[];
201
+ /** Convert a Position to a byte offset within the source text. */
202
+ declare const positionToOffset: (lineOffsets: readonly number[], position: Position) => number;
203
+ /** Convert a byte offset to a Position within the source text. */
204
+ declare const offsetToPosition: (lineOffsets: readonly number[], offset: number) => Position;
205
+ /** Convert a Position to an IPosition compatible with graphql-language-service. */
206
+ declare const toIPosition: (pos: Position) => {
207
+ line: number;
208
+ character: number;
209
+ setLine: (l: number) => void;
210
+ setCharacter: (c: number) => void;
211
+ lessThanOrEqualTo: (other: Position) => boolean;
212
+ };
213
+ /** Create a bidirectional position mapper between TS file and GraphQL content. */
214
+ declare const createPositionMapper: (input: PositionMapperInput) => PositionMapper;
215
+ //#endregion
216
+ //#region packages/lsp/src/schema-resolver.d.ts
217
+ /** Per-file schema source info for go-to-definition. */
218
+ type SchemaFileInfo = {
219
+ readonly filePath: string;
220
+ readonly content: string;
221
+ };
222
+ /** Cached schema entry. */
223
+ type SchemaEntry = {
224
+ readonly name: string;
225
+ readonly schema: graphql0.GraphQLSchema;
226
+ readonly documentNode: DocumentNode;
227
+ readonly hash: string;
228
+ readonly files: readonly SchemaFileInfo[];
229
+ };
230
+ type SchemaResolver = {
231
+ readonly getSchema: (schemaName: string) => SchemaEntry | undefined;
232
+ readonly getSchemaNames: () => readonly string[];
233
+ readonly reloadSchema: (schemaName: string) => Result<SchemaEntry, LspError>;
234
+ readonly reloadAll: () => Result<void, LspError[]>;
235
+ };
236
+ /** Create a schema resolver from config. Loads all schemas eagerly. */
237
+ declare const createSchemaResolver: (config: ResolvedSodaGqlConfig) => Result<SchemaResolver, LspError>;
238
+ //#endregion
239
+ //#region packages/lsp/src/server.d.ts
240
+ type LspServerOptions = {
241
+ readonly connection?: Connection;
242
+ };
243
+ declare const createLspServer: (options?: LspServerOptions) => {
244
+ start: () => void;
245
+ };
246
+ /** One-time SWC unavailable notification state. */
247
+ type SwcNotificationState = {
248
+ shown: boolean;
249
+ };
250
+ /** Check if SWC is unavailable and show a one-time error notification. */
251
+ declare const checkSwcUnavailable: (swcUnavailable: boolean | undefined, state: SwcNotificationState, showError: (message: string) => void) => void;
252
+ //#endregion
253
+ export { type DocumentManager, type DocumentState, type ExtractedTemplate, type FragmentSpreadLocation, type IndexedFragment, type LspError, type LspErrorCode, type LspResult, type LspServerOptions, type OperationKind, type PositionMapper, type SchemaEntry, type SchemaResolver, createDocumentManager, createLspServer, createPositionMapper, createSchemaResolver, lspErrors, preprocessFragmentArgs };
254
+ //# sourceMappingURL=index.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.cts","names":[],"sources":["../src/types.ts","../src/document-manager.ts","../src/errors.ts","../src/fragment-args-preprocessor.ts","../src/position-mapping.ts","../src/schema-resolver.ts","../src/server.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;KAQY,aAAA;;KAGA,iBAAA;EAHA;EAGA,S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e,GAAA,SAAA;EAEkC,SAAA,cAAA,EAAA,GAAA,GAAA,SAAA,MAAA,EAAA;EAAsB,SAAA,YAAA,EAAA,CAAA,UAAA,EAAA,MAAA,EAAA,GIDpE,MJCoE,CID7D,WJC6D,EIDhD,QJCgD,CAAA;EAGhH,SAAA,SAAA,EAAgB,GAAA,GIHO,MJGP,CAAA,IAAA,EIHoB,QJKS,EAAA,CAAA;AAoSlD,CAAA;AAoDA;AAA8C,cItTjC,oBJsTiC,EAAA,CAAA,MAAA,EItTD,qBJsTC,EAAA,GItTuB,MJsTvB,CItT8B,cJsT9B,EItT8C,QJsT9C,CAAA;;;KK9VlC,gBAAA;wBACY;;cAGX,4BAA6B;EN5B9B,KAAA,EAAA,GAAA,GAAA,IAAa;AAGzB,CAAA;AAgBA;AAUY,KMmcA,oBAAA,GN/bW;EAUX,KAAA,EAAA,OAAA;;;cMwbC,kEAEJ"}
@@ -0,0 +1,254 @@
1
+ import * as graphql0 from "graphql";
2
+ import { DocumentNode, FragmentDefinitionNode } from "graphql";
3
+ import { Result } from "neverthrow";
4
+ import { ResolvedSodaGqlConfig } from "@soda-gql/config";
5
+ import { Connection } from "vscode-languageserver/node";
6
+ import { GraphqlSystemIdentifyHelper } from "@soda-gql/builder";
7
+ import * as _swc_core0 from "@swc/core";
8
+
9
+ //#region packages/lsp/src/types.d.ts
10
+ /** Operation kind extracted from tagged template tag name. */
11
+ type OperationKind = "query" | "mutation" | "subscription" | "fragment";
12
+ /** A single tagged template extracted from a TypeScript file. */
13
+ type ExtractedTemplate = {
14
+ /** Byte offset range of GraphQL content within TS source (excludes backticks). */
15
+ readonly contentRange: {
16
+ readonly start: number;
17
+ readonly end: number;
18
+ };
19
+ /** Resolved schema name from gql.{schemaName}. */
20
+ readonly schemaName: string;
21
+ /** Operation kind from tag name. */
22
+ readonly kind: OperationKind;
23
+ /** Raw GraphQL content between backticks. */
24
+ readonly content: string;
25
+ /** Element name from curried tag call (e.g., "GetUser" from query("GetUser")). */
26
+ readonly elementName?: string;
27
+ /** Type name from curried fragment call (e.g., "User" from fragment("UserFields", "User")). */
28
+ readonly typeName?: string;
29
+ };
30
+ /** Per-document state maintained by the document manager. */
31
+ type DocumentState = {
32
+ readonly uri: string;
33
+ readonly version: number;
34
+ readonly source: string;
35
+ readonly templates: readonly ExtractedTemplate[];
36
+ /** Set when @swc/core could not be loaded; template extraction is skipped. */
37
+ readonly swcUnavailable?: true;
38
+ };
39
+ /** A fragment definition indexed from a workspace document. */
40
+ type IndexedFragment = {
41
+ readonly uri: string;
42
+ readonly schemaName: string;
43
+ readonly fragmentName: string;
44
+ readonly definition: FragmentDefinitionNode;
45
+ /** Reconstructed full GraphQL source (with definition header for curried syntax). */
46
+ readonly content: string;
47
+ readonly contentRange: {
48
+ readonly start: number;
49
+ readonly end: number;
50
+ };
51
+ readonly tsSource: string;
52
+ /** Number of bytes prepended by reconstruction. */
53
+ readonly headerLen: number;
54
+ };
55
+ /** A located fragment spread reference within a template. */
56
+ type FragmentSpreadLocation = {
57
+ readonly uri: string;
58
+ readonly tsSource: string;
59
+ readonly template: ExtractedTemplate;
60
+ /** Offset of the fragment name (after "...") within GraphQL content. */
61
+ readonly nameOffset: number;
62
+ readonly nameLength: number;
63
+ };
64
+ //#endregion
65
+ //#region packages/lsp/src/document-manager.d.ts
66
+ type DocumentManager = {
67
+ readonly update: (uri: string, version: number, source: string) => DocumentState;
68
+ readonly get: (uri: string) => DocumentState | undefined;
69
+ readonly remove: (uri: string) => void;
70
+ readonly findTemplateAtOffset: (uri: string, offset: number) => ExtractedTemplate | undefined;
71
+ /** Get fragments from other documents for a given schema, excluding the specified URI. */
72
+ readonly getExternalFragments: (uri: string, schemaName: string) => readonly IndexedFragment[];
73
+ /** Get ALL indexed fragments (including self) for a given schema. */
74
+ readonly getAllFragments: (schemaName: string) => readonly IndexedFragment[];
75
+ /** Find all fragment spread locations across all documents for a given fragment name and schema. */
76
+ readonly findFragmentSpreadLocations: (fragmentName: string, schemaName: string) => readonly FragmentSpreadLocation[];
77
+ };
78
+ type SwcLoaderOptions = {
79
+ /** Override parseSync for testing. Pass null to simulate SWC unavailable. */
80
+ readonly parseSync?: typeof _swc_core0.parseSync | null;
81
+ /** Config file path used as the base for createRequire resolution of @swc/core. */
82
+ readonly resolveFrom?: string;
83
+ };
84
+ /**
85
+ * Index fragment definitions from extracted templates.
86
+ * Parses each fragment template to extract FragmentDefinitionNode for cross-file resolution.
87
+ */
88
+ /**
89
+ * Reconstruct full GraphQL source from an extracted template.
90
+ * Prepends the definition header from curried tag call arguments.
91
+ */
92
+ declare const reconstructGraphql: (template: ExtractedTemplate) => string;
93
+ /** Create a document manager that tracks open documents and extracts templates. */
94
+ declare const createDocumentManager: (helper: GraphqlSystemIdentifyHelper, swcOptions?: SwcLoaderOptions) => DocumentManager;
95
+ //#endregion
96
+ //#region packages/lsp/src/errors.d.ts
97
+ /** Error code taxonomy for LSP operations. */
98
+ type LspErrorCode = "CONFIG_LOAD_FAILED" | "SCHEMA_LOAD_FAILED" | "SCHEMA_BUILD_FAILED" | "SCHEMA_NOT_CONFIGURED" | "PARSE_FAILED" | "INTERNAL_INVARIANT" | "SWC_RESOLUTION_FAILED";
99
+ type ConfigLoadFailed = {
100
+ readonly code: "CONFIG_LOAD_FAILED";
101
+ readonly message: string;
102
+ readonly cause?: unknown;
103
+ };
104
+ type SchemaLoadFailed = {
105
+ readonly code: "SCHEMA_LOAD_FAILED";
106
+ readonly message: string;
107
+ readonly schemaName: string;
108
+ readonly cause?: unknown;
109
+ };
110
+ type SchemaBuildFailed = {
111
+ readonly code: "SCHEMA_BUILD_FAILED";
112
+ readonly message: string;
113
+ readonly schemaName: string;
114
+ readonly cause?: unknown;
115
+ };
116
+ type SchemaNotConfigured = {
117
+ readonly code: "SCHEMA_NOT_CONFIGURED";
118
+ readonly message: string;
119
+ readonly schemaName: string;
120
+ };
121
+ type ParseFailed = {
122
+ readonly code: "PARSE_FAILED";
123
+ readonly message: string;
124
+ readonly uri: string;
125
+ readonly cause?: unknown;
126
+ };
127
+ type InternalInvariant = {
128
+ readonly code: "INTERNAL_INVARIANT";
129
+ readonly message: string;
130
+ readonly context?: string;
131
+ readonly cause?: unknown;
132
+ };
133
+ type SwcResolutionFailed = {
134
+ readonly code: "SWC_RESOLUTION_FAILED";
135
+ readonly message: string;
136
+ };
137
+ /** Structured error type for all LSP operations. */
138
+ type LspError = ConfigLoadFailed | SchemaLoadFailed | SchemaBuildFailed | SchemaNotConfigured | ParseFailed | InternalInvariant | SwcResolutionFailed;
139
+ /** Helper type for LSP operation results. */
140
+ type LspResult<T> = Result<T, LspError>;
141
+ /** Error constructor helpers for concise error creation. */
142
+ declare const lspErrors: {
143
+ readonly configLoadFailed: (message: string, cause?: unknown) => ConfigLoadFailed;
144
+ readonly schemaLoadFailed: (schemaName: string, message?: string, cause?: unknown) => SchemaLoadFailed;
145
+ readonly schemaBuildFailed: (schemaName: string, message?: string, cause?: unknown) => SchemaBuildFailed;
146
+ readonly schemaNotConfigured: (schemaName: string) => SchemaNotConfigured;
147
+ readonly parseFailed: (uri: string, message?: string, cause?: unknown) => ParseFailed;
148
+ readonly internalInvariant: (message: string, context?: string, cause?: unknown) => InternalInvariant;
149
+ readonly swcResolutionFailed: (message?: string) => SwcResolutionFailed;
150
+ };
151
+ //#endregion
152
+ //#region packages/lsp/src/fragment-args-preprocessor.d.ts
153
+ /**
154
+ * Preprocessor for Fragment Arguments RFC syntax.
155
+ *
156
+ * Strips fragment argument declarations and spread arguments by replacing
157
+ * them with equal-length whitespace to preserve line/column alignment.
158
+ *
159
+ * @module
160
+ */
161
+ /** Result of fragment arguments preprocessing. */
162
+ type PreprocessResult = {
163
+ /** Content with Fragment Arguments syntax replaced by whitespace. */
164
+ readonly preprocessed: string;
165
+ /** Whether any preprocessing was applied. */
166
+ readonly modified: boolean;
167
+ };
168
+ /**
169
+ * Preprocess Fragment Arguments RFC syntax by replacing argument lists with spaces.
170
+ *
171
+ * Transforms:
172
+ * - `fragment UserProfile($showEmail: Boolean = false) on User` → `fragment UserProfile on User`
173
+ * - `...UserProfile(showEmail: true)` → `...UserProfile `
174
+ */
175
+ declare const preprocessFragmentArgs: (content: string) => PreprocessResult;
176
+ //#endregion
177
+ //#region packages/lsp/src/position-mapping.d.ts
178
+ /**
179
+ * Bidirectional position mapping between TypeScript file and GraphQL content.
180
+ * @module
181
+ */
182
+ /** 0-indexed line and character position. */
183
+ type Position = {
184
+ readonly line: number;
185
+ readonly character: number;
186
+ };
187
+ type PositionMapper = {
188
+ /** Map TS file position to GraphQL content position. Returns null if outside template. */
189
+ readonly tsToGraphql: (tsPosition: Position) => Position | null;
190
+ /** Map GraphQL content position back to TS file position. */
191
+ readonly graphqlToTs: (gqlPosition: Position) => Position;
192
+ };
193
+ type PositionMapperInput = {
194
+ readonly tsSource: string;
195
+ /** Byte offset of the first character of GraphQL content (after opening backtick). */
196
+ readonly contentStartOffset: number;
197
+ readonly graphqlContent: string;
198
+ };
199
+ /** Compute byte offsets for the start of each line in the source text. */
200
+ declare const computeLineOffsets: (source: string) => readonly number[];
201
+ /** Convert a Position to a byte offset within the source text. */
202
+ declare const positionToOffset: (lineOffsets: readonly number[], position: Position) => number;
203
+ /** Convert a byte offset to a Position within the source text. */
204
+ declare const offsetToPosition: (lineOffsets: readonly number[], offset: number) => Position;
205
+ /** Convert a Position to an IPosition compatible with graphql-language-service. */
206
+ declare const toIPosition: (pos: Position) => {
207
+ line: number;
208
+ character: number;
209
+ setLine: (l: number) => void;
210
+ setCharacter: (c: number) => void;
211
+ lessThanOrEqualTo: (other: Position) => boolean;
212
+ };
213
+ /** Create a bidirectional position mapper between TS file and GraphQL content. */
214
+ declare const createPositionMapper: (input: PositionMapperInput) => PositionMapper;
215
+ //#endregion
216
+ //#region packages/lsp/src/schema-resolver.d.ts
217
+ /** Per-file schema source info for go-to-definition. */
218
+ type SchemaFileInfo = {
219
+ readonly filePath: string;
220
+ readonly content: string;
221
+ };
222
+ /** Cached schema entry. */
223
+ type SchemaEntry = {
224
+ readonly name: string;
225
+ readonly schema: graphql0.GraphQLSchema;
226
+ readonly documentNode: DocumentNode;
227
+ readonly hash: string;
228
+ readonly files: readonly SchemaFileInfo[];
229
+ };
230
+ type SchemaResolver = {
231
+ readonly getSchema: (schemaName: string) => SchemaEntry | undefined;
232
+ readonly getSchemaNames: () => readonly string[];
233
+ readonly reloadSchema: (schemaName: string) => Result<SchemaEntry, LspError>;
234
+ readonly reloadAll: () => Result<void, LspError[]>;
235
+ };
236
+ /** Create a schema resolver from config. Loads all schemas eagerly. */
237
+ declare const createSchemaResolver: (config: ResolvedSodaGqlConfig) => Result<SchemaResolver, LspError>;
238
+ //#endregion
239
+ //#region packages/lsp/src/server.d.ts
240
+ type LspServerOptions = {
241
+ readonly connection?: Connection;
242
+ };
243
+ declare const createLspServer: (options?: LspServerOptions) => {
244
+ start: () => void;
245
+ };
246
+ /** One-time SWC unavailable notification state. */
247
+ type SwcNotificationState = {
248
+ shown: boolean;
249
+ };
250
+ /** Check if SWC is unavailable and show a one-time error notification. */
251
+ declare const checkSwcUnavailable: (swcUnavailable: boolean | undefined, state: SwcNotificationState, showError: (message: string) => void) => void;
252
+ //#endregion
253
+ export { type DocumentManager, type DocumentState, type ExtractedTemplate, type FragmentSpreadLocation, type IndexedFragment, type LspError, type LspErrorCode, type LspResult, type LspServerOptions, type OperationKind, type PositionMapper, type SchemaEntry, type SchemaResolver, createDocumentManager, createLspServer, createPositionMapper, createSchemaResolver, lspErrors, preprocessFragmentArgs };
254
+ //# sourceMappingURL=index.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.mts","names":[],"sources":["../src/types.ts","../src/document-manager.ts","../src/errors.ts","../src/fragment-args-preprocessor.ts","../src/position-mapping.ts","../src/schema-resolver.ts","../src/server.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;KAQY,aAAA;;KAGA,iBAAA;EAHA;EAGA,SAAA,YAAiB,EAAA;IAgBjB,SAAA,KAAa,EAAA,MAAA;IAUb,SAAA,G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,EAAA;EAAsB,SAAA,YAAA,EAAA,CAAA,UAAA,EAAA,MAAA,EAAA,GIDpE,MJCoE,CID7D,WJC6D,EIDhD,QJCgD,CAAA;EAGhH,SAAA,SAAA,EAAgB,GAAA,GIHO,MJGP,CAAA,IAAA,EIHoB,QJKS,EAAA,CAAA;AAoSlD,CAAA;AAoDA;AAA8C,cItTjC,oBJsTiC,EAAA,CAAA,MAAA,EItTD,qBJsTC,EAAA,GItTuB,MJsTvB,CItT8B,cJsT9B,EItT8C,QJsT9C,CAAA;;;KK9VlC,gBAAA;wBACY;;cAGX,4BAA6B;EN5B9B,KAAA,EAAA,GAAA,GAAA,IAAa;AAGzB,CAAA;AAgBA;AAUY,KMmcA,oBAAA,GN/bW;EAUX,KAAA,EAAA,OAAA;;;cMwbC,kEAEJ"}
package/dist/index.mjs ADDED
@@ -0,0 +1,3 @@
1
+ import { a as createDocumentManager, i as lspErrors, n as createSchemaResolver, o as preprocessFragmentArgs, r as createPositionMapper, t as createLspServer } from "./server-BgXl3W41.mjs";
2
+
3
+ export { createDocumentManager, createLspServer, createPositionMapper, createSchemaResolver, lspErrors, preprocessFragmentArgs };