@nadle/language-server 0.0.2

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/lib/index.d.ts ADDED
@@ -0,0 +1,39 @@
1
+ import { Range } from 'vscode-languageserver';
2
+
3
+ interface DependencyRef {
4
+ readonly name: string;
5
+ readonly range: Range;
6
+ readonly isWorkspaceQualified: boolean;
7
+ }
8
+ interface TaskConfigInfo {
9
+ readonly hasInputs: boolean;
10
+ readonly configRange: Range;
11
+ readonly hasOutputs: boolean;
12
+ readonly group: string | null;
13
+ readonly dependsOn: DependencyRef[];
14
+ readonly description: string | null;
15
+ }
16
+ interface TaskRegistration {
17
+ readonly nameRange: Range;
18
+ readonly name: string | null;
19
+ readonly registrationRange: Range;
20
+ readonly taskObjectName: string | null;
21
+ readonly form: "function" | "no-op" | "typed";
22
+ readonly configuration: TaskConfigInfo | null;
23
+ }
24
+ interface DocumentAnalysis {
25
+ readonly uri: string;
26
+ readonly version: number;
27
+ readonly registrations: TaskRegistration[];
28
+ readonly taskNames: Map<string, TaskRegistration[]>;
29
+ }
30
+ declare function analyzeDocument(content: string, fileName: string): DocumentAnalysis;
31
+
32
+ declare class DocumentStore {
33
+ private readonly cache;
34
+ getAnalysis(uri: string): DocumentAnalysis | undefined;
35
+ updateDocument(uri: string, version: number, content: string, fileName: string): DocumentAnalysis;
36
+ removeDocument(uri: string): void;
37
+ }
38
+
39
+ export { type DependencyRef, type DocumentAnalysis, DocumentStore, type TaskConfigInfo, type TaskRegistration, analyzeDocument };
package/lib/index.js ADDED
@@ -0,0 +1,9 @@
1
+ import { createRequire } from 'module'; import { fileURLToPath } from 'url'; import { dirname } from 'path'; const require = createRequire(import.meta.url); const __filename = fileURLToPath(import.meta.url); const __dirname = dirname(__filename);
2
+ import {
3
+ DocumentStore,
4
+ analyzeDocument
5
+ } from "./chunk-KPQ3WXPR.js";
6
+ export {
7
+ DocumentStore,
8
+ analyzeDocument
9
+ };