@bascik/language-server 0.1.0-rc.3 → 0.1.0-rc.5

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.
Files changed (61) hide show
  1. package/dist/analyzer.d.ts +21 -5
  2. package/dist/analyzer.d.ts.map +1 -1
  3. package/dist/analyzer.js +649 -360
  4. package/dist/analyzer.js.map +1 -1
  5. package/dist/api-rules.d.ts +2 -0
  6. package/dist/api-rules.d.ts.map +1 -1
  7. package/dist/api-rules.js +17 -2
  8. package/dist/api-rules.js.map +1 -1
  9. package/dist/bin.js +5 -8
  10. package/dist/bin.js.map +1 -1
  11. package/dist/check.d.ts +50 -0
  12. package/dist/check.d.ts.map +1 -0
  13. package/dist/check.js +173 -0
  14. package/dist/check.js.map +1 -0
  15. package/dist/cli.d.ts +1 -0
  16. package/dist/cli.d.ts.map +1 -1
  17. package/dist/cli.js +36 -129
  18. package/dist/cli.js.map +1 -1
  19. package/dist/compatibility-rules.json +11 -2
  20. package/dist/component-metadata.d.ts +1 -1
  21. package/dist/component-metadata.d.ts.map +1 -1
  22. package/dist/component-metadata.js +31 -25
  23. package/dist/component-metadata.js.map +1 -1
  24. package/dist/config.d.ts.map +1 -1
  25. package/dist/config.js +10 -5
  26. package/dist/config.js.map +1 -1
  27. package/dist/directive-rules.d.ts +31 -0
  28. package/dist/directive-rules.d.ts.map +1 -0
  29. package/dist/directive-rules.js +74 -0
  30. package/dist/directive-rules.js.map +1 -0
  31. package/dist/ignore-comments.d.ts.map +1 -1
  32. package/dist/ignore-comments.js +13 -9
  33. package/dist/ignore-comments.js.map +1 -1
  34. package/dist/index.d.ts +13 -11
  35. package/dist/index.d.ts.map +1 -1
  36. package/dist/index.js +13 -11
  37. package/dist/index.js.map +1 -1
  38. package/dist/module-specifiers.d.ts.map +1 -1
  39. package/dist/module-specifiers.js +77 -40
  40. package/dist/module-specifiers.js.map +1 -1
  41. package/dist/project.d.ts +13 -1
  42. package/dist/project.d.ts.map +1 -1
  43. package/dist/project.js +52 -30
  44. package/dist/project.js.map +1 -1
  45. package/dist/rules.d.ts +29 -3
  46. package/dist/rules.d.ts.map +1 -1
  47. package/dist/rules.js +139 -1
  48. package/dist/rules.js.map +1 -1
  49. package/dist/server-script-rules.d.ts +2 -2
  50. package/dist/server-script-rules.d.ts.map +1 -1
  51. package/dist/server-script-rules.js +96 -80
  52. package/dist/server-script-rules.js.map +1 -1
  53. package/dist/server.d.ts +39 -2
  54. package/dist/server.d.ts.map +1 -1
  55. package/dist/server.js +245 -26
  56. package/dist/server.js.map +1 -1
  57. package/dist/start.d.ts +7 -0
  58. package/dist/start.d.ts.map +1 -0
  59. package/dist/start.js +12 -0
  60. package/dist/start.js.map +1 -0
  61. package/package.json +5 -1
package/dist/server.js CHANGED
@@ -1,12 +1,18 @@
1
- import { fileURLToPath } from 'node:url';
2
- import * as path from 'node:path';
3
- import * as fs from 'node:fs';
4
- import { TextDocuments, TextDocumentSyncKind, } from 'vscode-languageserver';
5
- import { TextDocument } from 'vscode-languageserver-textdocument';
6
- import { buildSnapshot, isPathInside, } from './project.js';
7
- import { createDiagnostics, createCompletions, createHover, createDefinition, } from './analyzer.js';
1
+ import { fileURLToPath } from "node:url";
2
+ import * as path from "node:path";
3
+ import * as fs from "node:fs";
4
+ import * as fsPromises from "node:fs/promises";
5
+ import { pathToFileURL } from "node:url";
6
+ import { DidChangeWatchedFilesNotification, FileChangeType, TextDocuments, TextDocumentSyncKind, } from "vscode-languageserver";
7
+ import { TextDocument } from "vscode-languageserver-textdocument";
8
+ import { buildSnapshot, CONFIG_FILE_CANDIDATES, isConfigFile, isExcludedProjectPath, isInsideComponentRoots, isPathInside, } from "./project.js";
9
+ import { createDiagnostics, createCompletions, createHover, createDefinition, createCodeActions, } from "./analyzer.js";
10
+ /** Files whose changes can alter a diagnostic: project config, and the HTML that defines or uses components. */
11
+ const WATCHED_FILE_PATTERNS = ["**/bascik.config.{ts,js,mjs}", "**/*.html"];
12
+ /** Quiet period before open documents are checked again after a change elsewhere in the project. */
13
+ const REVALIDATION_DELAY_MS = 50;
8
14
  export function uriToFsPath(uri) {
9
- if (uri.startsWith('file://')) {
15
+ if (uri.startsWith("file://")) {
10
16
  try {
11
17
  return fileURLToPath(uri);
12
18
  }
@@ -22,6 +28,11 @@ export class BascikLanguageServer {
22
28
  workspaceFolders = [];
23
29
  projectSnapshots = new Map();
24
30
  pendingSnapshots = new Map();
31
+ revalidationTimers = new Map();
32
+ clientWatchesFiles = false;
33
+ clientWatchesFolders = false;
34
+ clientSendsFolderChanges = false;
35
+ watcherRegistration;
25
36
  constructor(connection) {
26
37
  this.connection = connection;
27
38
  this.documents.listen(this.connection);
@@ -38,23 +49,58 @@ export class BascikLanguageServer {
38
49
  else if (params.rootPath) {
39
50
  this.workspaceFolders = [params.rootPath];
40
51
  }
52
+ this.clientWatchesFiles =
53
+ params.capabilities.workspace?.didChangeWatchedFiles
54
+ ?.dynamicRegistration === true;
55
+ this.clientWatchesFolders =
56
+ params.capabilities.workspace?.didChangeWatchedFiles
57
+ ?.relativePatternSupport === true;
58
+ this.clientSendsFolderChanges =
59
+ params.capabilities.workspace?.workspaceFolders === true;
41
60
  return {
42
61
  capabilities: {
62
+ workspace: {
63
+ workspaceFolders: { supported: true, changeNotifications: true },
64
+ },
43
65
  textDocumentSync: TextDocumentSyncKind.Incremental,
44
66
  completionProvider: {
45
- triggerCharacters: ['<', ' ', '"', "'", '-'],
67
+ triggerCharacters: ["<", " ", '"', "'", "-"],
46
68
  resolveProvider: false,
47
69
  },
48
70
  hoverProvider: true,
49
71
  definitionProvider: true,
72
+ codeActionProvider: true,
50
73
  },
51
74
  };
52
75
  });
76
+ // Ask the editor to report changes to project config and HTML files. A component edited on disk, or a new
77
+ // config file, changes what the open documents should say, and the server cannot see either on its own.
78
+ this.connection.onInitialized(() => {
79
+ void this.registerFileWatchers();
80
+ // The connection throws if this is asked of a client that cannot send these changes, so it waits for the
81
+ // client's answer to `initialize`.
82
+ if (this.clientSendsFolderChanges) {
83
+ this.connection.workspace.onDidChangeWorkspaceFolders((event) => {
84
+ this.changeWorkspaceFolders(event.removed.map((folder) => uriToFsPath(folder.uri)), event.added.map((folder) => uriToFsPath(folder.uri)));
85
+ });
86
+ }
87
+ });
53
88
  this.documents.onDidChangeContent((change) => {
54
89
  void this.validateDocument(change.document);
90
+ // Open HTML buffers feed prop usage into other documents' diagnostics.
91
+ if (change.document.languageId === "html") {
92
+ this.scheduleRevalidation(change.document, true);
93
+ }
55
94
  });
56
95
  this.documents.onDidClose((event) => {
57
- this.connection.sendDiagnostics({ uri: event.document.uri, diagnostics: [] });
96
+ this.connection.sendDiagnostics({
97
+ uri: event.document.uri,
98
+ diagnostics: [],
99
+ });
100
+ // Closing an open HTML buffer changes which usages supply component props.
101
+ if (event.document.languageId === "html") {
102
+ this.scheduleRevalidation(event.document, true);
103
+ }
58
104
  });
59
105
  this.connection.onCompletion(async (params) => {
60
106
  const document = this.documents.get(params.textDocument.uri);
@@ -86,31 +132,153 @@ export class BascikLanguageServer {
86
132
  return undefined;
87
133
  return createDefinition(document, params.position, snapshot, fsPath);
88
134
  });
89
- this.connection.onDidChangeWatchedFiles(() => {
90
- this.invalidateSnapshots();
91
- for (const doc of this.documents.all()) {
92
- void this.validateDocument(doc);
93
- }
135
+ this.connection.onCodeAction(async (params) => {
136
+ const document = this.documents.get(params.textDocument.uri);
137
+ if (!document)
138
+ return undefined;
139
+ const fsPath = uriToFsPath(document.uri);
140
+ const snapshot = await this.getSnapshotForFile(fsPath);
141
+ return createCodeActions(document, params.range, params.context.diagnostics, snapshot, fsPath);
94
142
  });
143
+ this.connection.onDidChangeWatchedFiles((params) => {
144
+ void this.handleWatchedFileChanges(params.changes.map((change) => ({
145
+ fsPath: uriToFsPath(change.uri),
146
+ type: change.type,
147
+ })));
148
+ });
149
+ }
150
+ /**
151
+ * Follows the editor adding or removing workspace folders. A removed folder's projects are forgotten and its
152
+ * open documents stop having diagnostics; a re-added folder starts again from disk.
153
+ */
154
+ changeWorkspaceFolders(removed, added) {
155
+ const removedRoots = removed.map((root) => path.resolve(root));
156
+ this.workspaceFolders = [
157
+ ...this.workspaceFolders.filter((root) => !removedRoots.includes(path.resolve(root))),
158
+ ...added,
159
+ ];
160
+ for (const projectRoot of [
161
+ ...this.projectSnapshots.keys(),
162
+ ...this.pendingSnapshots.keys(),
163
+ ]) {
164
+ if (removedRoots.some((root) => isPathInside(projectRoot, root))) {
165
+ this.invalidateProject(projectRoot);
166
+ }
167
+ }
168
+ void this.registerFileWatchers();
169
+ this.scheduleRevalidation(undefined, false);
95
170
  }
171
+ /**
172
+ * Asks the editor to report changes to config and HTML files, replacing any earlier request. Each workspace
173
+ * folder is watched with a pattern relative to it when the editor supports that, because an editor watches a
174
+ * folder named that way directly and promptly. A bare `**` pattern is matched against whatever events the
175
+ * editor happens to see, which can arrive seconds late.
176
+ */
177
+ async registerFileWatchers() {
178
+ if (!this.clientWatchesFiles)
179
+ return;
180
+ this.watcherRegistration?.dispose();
181
+ this.watcherRegistration = undefined;
182
+ const watchers = this.clientWatchesFolders
183
+ ? this.workspaceFolders.flatMap((folder) => WATCHED_FILE_PATTERNS.map((pattern) => ({
184
+ globPattern: { baseUri: pathToFileURL(folder).toString(), pattern },
185
+ })))
186
+ : WATCHED_FILE_PATTERNS.map((globPattern) => ({ globPattern }));
187
+ if (watchers.length === 0)
188
+ return;
189
+ this.watcherRegistration = await this.connection.client.register(DidChangeWatchedFilesNotification.type, { watchers });
190
+ }
191
+ /** Forgets every project snapshot, so the next request rebuilds them from disk. */
96
192
  invalidateSnapshots() {
97
193
  this.projectSnapshots.clear();
98
194
  this.pendingSnapshots.clear();
99
195
  }
196
+ invalidateProject(projectRoot) {
197
+ this.projectSnapshots.delete(projectRoot);
198
+ this.pendingSnapshots.delete(projectRoot);
199
+ }
200
+ /**
201
+ * Applies file changes the editor reported. A changed config or component file rebuilds that project's
202
+ * snapshot. A changed page or other HTML file only updates the stored usage text, so saving a page does not
203
+ * re-read the whole project. Open documents are then checked again, since either can change a diagnostic.
204
+ */
205
+ async handleWatchedFileChanges(changes) {
206
+ let everything = false;
207
+ const affectedRoots = new Set();
208
+ for (const { fsPath, type } of changes) {
209
+ const workspaceRoot = this.workspaceFolders.find((root) => isPathInside(fsPath, root));
210
+ if (workspaceRoot && isExcludedProjectPath(fsPath, workspaceRoot))
211
+ continue;
212
+ if (isConfigFile(fsPath)) {
213
+ // A config file appearing or disappearing also changes which project the files below it belong to.
214
+ this.invalidateProject(path.dirname(path.resolve(fsPath)));
215
+ everything = true;
216
+ continue;
217
+ }
218
+ if (!fsPath.toLowerCase().endsWith(".html"))
219
+ continue;
220
+ const projectRoot = this.findProjectRoot(fsPath);
221
+ if (!projectRoot)
222
+ continue;
223
+ affectedRoots.add(projectRoot);
224
+ const snapshot = this.projectSnapshots.get(projectRoot);
225
+ if (!snapshot) {
226
+ // Not built yet, or still building from files that may already be stale.
227
+ this.invalidateProject(projectRoot);
228
+ continue;
229
+ }
230
+ const normalized = fsPath.replace(/\\/g, "/");
231
+ if (isInsideComponentRoots(normalized, snapshot.componentRoots)) {
232
+ this.invalidateProject(projectRoot);
233
+ continue;
234
+ }
235
+ if (!isPathInside(fsPath, path.join(projectRoot, "src")))
236
+ continue;
237
+ let html;
238
+ if (type !== FileChangeType.Deleted) {
239
+ try {
240
+ html = await fsPromises.readFile(fsPath, "utf8");
241
+ }
242
+ catch {
243
+ html = undefined;
244
+ }
245
+ }
246
+ // A newer change rebuilt the snapshot while the file was being read: that rebuild already has it.
247
+ if (this.projectSnapshots.get(projectRoot) !== snapshot)
248
+ continue;
249
+ if (html === undefined)
250
+ snapshot.htmlUsageByFile.delete(fsPath);
251
+ else
252
+ snapshot.htmlUsageByFile.set(fsPath, html);
253
+ }
254
+ if (everything) {
255
+ this.scheduleRevalidation(undefined, false);
256
+ }
257
+ else {
258
+ for (const projectRoot of affectedRoots) {
259
+ this.scheduleRevalidation(projectRoot, false);
260
+ }
261
+ }
262
+ }
100
263
  async getSnapshotForFile(fsPath) {
101
264
  const projectRoot = this.findProjectRoot(fsPath);
102
265
  if (!projectRoot)
103
266
  return undefined;
104
- let snapshot = this.projectSnapshots.get(projectRoot);
267
+ const snapshot = this.projectSnapshots.get(projectRoot);
105
268
  if (snapshot)
106
269
  return snapshot;
107
270
  let pending = this.pendingSnapshots.get(projectRoot);
108
271
  if (!pending) {
109
- pending = buildSnapshot(projectRoot).then((snap) => {
110
- this.projectSnapshots.set(projectRoot, snap);
111
- this.pendingSnapshots.delete(projectRoot);
272
+ const building = buildSnapshot(projectRoot).then((snap) => {
273
+ // Dropped from the pending list means a change invalidated this build while it ran. Hand the result
274
+ // to this caller only: it may already be out of date, and the next caller builds a fresh one.
275
+ if (this.pendingSnapshots.get(projectRoot) === building) {
276
+ this.projectSnapshots.set(projectRoot, snap);
277
+ this.pendingSnapshots.delete(projectRoot);
278
+ }
112
279
  return snap;
113
280
  });
281
+ pending = building;
114
282
  this.pendingSnapshots.set(projectRoot, pending);
115
283
  }
116
284
  return pending;
@@ -119,12 +287,9 @@ export class BascikLanguageServer {
119
287
  let current = path.dirname(path.resolve(fsPath));
120
288
  const roots = this.workspaceFolders.map((r) => path.resolve(r));
121
289
  while (roots.some((r) => isPathInside(current, r))) {
122
- const candidates = [
123
- 'bascik.config.ts',
124
- 'bascik.config.js',
125
- 'bascik.config.mjs',
126
- ];
127
- if (candidates.some((c) => fs.existsSync(path.join(current, c)))) {
290
+ const workspaceRoot = roots.find((r) => isPathInside(current, r));
291
+ if (!isExcludedProjectPath(current, workspaceRoot) &&
292
+ CONFIG_FILE_CANDIDATES.some((c) => fs.existsSync(path.join(current, c)))) {
128
293
  return current;
129
294
  }
130
295
  const parent = path.dirname(current);
@@ -136,8 +301,24 @@ export class BascikLanguageServer {
136
301
  return roots.find((r) => isPathInside(fsPath, r));
137
302
  }
138
303
  async validateDocument(document) {
304
+ // Only files on disk have a project. Other schemes (git, output, untitled) must not get diagnostics.
305
+ if (!document.uri.startsWith("file:"))
306
+ return;
307
+ const version = document.version;
139
308
  const fsPath = uriToFsPath(document.uri);
309
+ // A file outside every workspace folder belongs to no project, so there is nothing to check it against.
310
+ if (!this.workspaceFolders.some((root) => isPathInside(fsPath, root))) {
311
+ this.connection.sendDiagnostics({
312
+ uri: document.uri,
313
+ version,
314
+ diagnostics: [],
315
+ });
316
+ return;
317
+ }
140
318
  const snapshot = await this.getSnapshotForFile(fsPath);
319
+ // The document was edited or closed while the project was read; a newer check follows or the file is gone.
320
+ if (this.documents.get(document.uri)?.version !== version)
321
+ return;
141
322
  const openDocs = this.documents.all().map((d) => ({
142
323
  fsPath: uriToFsPath(d.uri),
143
324
  text: d.getText(),
@@ -145,12 +326,50 @@ export class BascikLanguageServer {
145
326
  const diagnostics = createDiagnostics(document, fsPath, snapshot, openDocs);
146
327
  this.connection.sendDiagnostics({
147
328
  uri: document.uri,
148
- version: document.version,
329
+ version,
149
330
  diagnostics,
150
331
  });
151
332
  }
333
+ /**
334
+ * Checks open documents again shortly, so a burst of changes costs one pass. With a document or a project
335
+ * root, only that project is checked; without one, every open document is. `htmlOnly` limits the pass to
336
+ * HTML documents.
337
+ */
338
+ scheduleRevalidation(scope, htmlOnly) {
339
+ const projectRoot = typeof scope === "string"
340
+ ? scope
341
+ : scope
342
+ ? this.findProjectRoot(uriToFsPath(scope.uri))
343
+ : undefined;
344
+ const key = projectRoot ?? "*";
345
+ const previous = this.revalidationTimers.get(key);
346
+ if (previous)
347
+ clearTimeout(previous.timer);
348
+ const onlyHtml = previous ? previous.htmlOnly && htmlOnly : htmlOnly;
349
+ const timer = setTimeout(() => {
350
+ this.revalidationTimers.delete(key);
351
+ for (const document of this.documents.all()) {
352
+ if (onlyHtml && document.languageId !== "html")
353
+ continue;
354
+ if (projectRoot &&
355
+ this.findProjectRoot(uriToFsPath(document.uri)) !== projectRoot) {
356
+ continue;
357
+ }
358
+ void this.validateDocument(document);
359
+ }
360
+ }, REVALIDATION_DELAY_MS);
361
+ this.revalidationTimers.set(key, { timer, htmlOnly: onlyHtml });
362
+ }
152
363
  listen() {
153
364
  this.connection.listen();
154
365
  }
366
+ /** Cancels pending checks. For tests and shutdown. */
367
+ dispose() {
368
+ for (const { timer } of this.revalidationTimers.values())
369
+ clearTimeout(timer);
370
+ this.revalidationTimers.clear();
371
+ this.watcherRegistration?.dispose();
372
+ this.watcherRegistration = undefined;
373
+ }
155
374
  }
156
375
  //# sourceMappingURL=server.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,EAIL,aAAa,EACb,oBAAoB,GACrB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAClE,OAAO,EACL,aAAa,EAEb,YAAY,GACb,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,iBAAiB,EACjB,iBAAiB,EACjB,WAAW,EACX,gBAAgB,GACjB,MAAM,eAAe,CAAC;AAEvB,MAAM,UAAU,WAAW,CAAC,GAAW;IACrC,IAAI,GAAG,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE,CAAC;QAC9B,IAAI,CAAC;YACH,OAAO,aAAa,CAAC,GAAG,CAAC,CAAC;QAC5B,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QACtB,CAAC;IACH,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC;AAED,MAAM,OAAO,oBAAoB;IAMF,UAAU;IALtB,SAAS,GAAG,IAAI,aAAa,CAAC,YAAY,CAAC,CAAC;IACrD,gBAAgB,GAAa,EAAE,CAAC;IACvB,gBAAgB,GAAG,IAAI,GAAG,EAA2B,CAAC;IAC/D,gBAAgB,GAAG,IAAI,GAAG,EAA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,IAAI,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,EAAE,CAAC;gBAC5C,IAAI,QAAQ,IAAI,QAAQ,CAAC,UAAU,KAAK,MAAM;oBAAE,SAAS;gBACzD,IACE,WAAW;oBACX,IAAI,CAAC,eAAe,CAAC,WAAW,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,KAAK,WAAW,EAC/D,CAAC;oBACD,SAAS;gBACX,CAAC;gBACD,KAAK,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAC;YACvC,CAAC;QACH,CAAC,EAAE,qBAAqB,CAAC,CAAC;QAC1B,IAAI,CAAC,kBAAkB,CAAC,GAAG,CAAC,GAAG,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC,CAAC;IAClE,CAAC;IAEM,MAAM;QACX,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,CAAC;IAC3B,CAAC;IAED,sDAAsD;IAC/C,OAAO;QACZ,KAAK,MAAM,EAAE,KAAK,EAAE,IAAI,IAAI,CAAC,kBAAkB,CAAC,MAAM,EAAE;YACtD,YAAY,CAAC,KAAK,CAAC,CAAC;QACtB,IAAI,CAAC,kBAAkB,CAAC,KAAK,EAAE,CAAC;QAChC,IAAI,CAAC,mBAAmB,EAAE,OAAO,EAAE,CAAC;QACpC,IAAI,CAAC,mBAAmB,GAAG,SAAS,CAAC;IACvC,CAAC;CACF"}
@@ -0,0 +1,7 @@
1
+ import { BascikLanguageServer } from "./server.js";
2
+ /**
3
+ * Starts the language server on the process's own transport (`--stdio`, `--node-ipc`, or `--socket=<port>`,
4
+ * as the editor passes them). The `bascik-language-server` command and the VS Code extension both start here.
5
+ */
6
+ export declare function startLanguageServer(): BascikLanguageServer;
7
+ //# sourceMappingURL=start.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"start.d.ts","sourceRoot":"","sources":["../src/start.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAEnD;;;GAGG;AACH,wBAAgB,mBAAmB,IAAI,oBAAoB,CAM1D"}
package/dist/start.js ADDED
@@ -0,0 +1,12 @@
1
+ import { createConnection, ProposedFeatures } from "vscode-languageserver/node";
2
+ import { BascikLanguageServer } from "./server.js";
3
+ /**
4
+ * Starts the language server on the process's own transport (`--stdio`, `--node-ipc`, or `--socket=<port>`,
5
+ * as the editor passes them). The `bascik-language-server` command and the VS Code extension both start here.
6
+ */
7
+ export function startLanguageServer() {
8
+ const server = new BascikLanguageServer(createConnection(ProposedFeatures.all));
9
+ server.listen();
10
+ return server;
11
+ }
12
+ //# sourceMappingURL=start.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"start.js","sourceRoot":"","sources":["../src/start.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAChF,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAEnD;;;GAGG;AACH,MAAM,UAAU,mBAAmB;IACjC,MAAM,MAAM,GAAG,IAAI,oBAAoB,CACrC,gBAAgB,CAAC,gBAAgB,CAAC,GAAG,CAAC,CACvC,CAAC;IACF,MAAM,CAAC,MAAM,EAAE,CAAC;IAChB,OAAO,MAAM,CAAC;AAChB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bascik/language-server",
3
- "version": "0.1.0-rc.3",
3
+ "version": "0.1.0-rc.5",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/bascikdev/bascik.git",
@@ -26,6 +26,10 @@
26
26
  "./server": {
27
27
  "types": "./dist/server.d.ts",
28
28
  "default": "./dist/server.js"
29
+ },
30
+ "./check": {
31
+ "types": "./dist/check.d.ts",
32
+ "default": "./dist/check.js"
29
33
  }
30
34
  },
31
35
  "files": [