@webgal/language-service 0.0.2-alpha.4 → 0.0.2-alpha.6
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.en.md +15 -0
- package/README.md +15 -0
- package/build/{client-handlers-CrU8stw6.mjs → client-handlers-B6JBICcy.mjs} +36 -1
- package/build/{client-handlers-DVUjG46C.cjs → client-handlers-BOZETgwF.cjs} +36 -1
- package/build/index-Bbu_H5AG.d.mts +46 -0
- package/build/index.cjs +1 -1
- package/build/index.d.cts +35 -1
- package/build/index.d.mts +14 -2
- package/build/index.mjs +1 -1
- package/build/monaco/index.cjs +34 -1
- package/build/monaco/index.d.cts +34 -1
- package/build/monaco/index.d.mts +35 -2
- package/build/monaco/index.mjs +34 -1
- package/build/node.d.cts +1 -1
- package/build/node.d.mts +1 -1
- package/build/providerState-Dip2XHx4.cjs +3133 -0
- package/build/providerState-_ZvKXErw.mjs +3127 -0
- package/build/syntaxes.cjs +1 -1
- package/build/syntaxes.mjs +1 -1
- package/build/themes.cjs +1 -1
- package/build/themes.mjs +1 -1
- package/build/types-B7zc-Eke.d.mts +166 -0
- package/build/types-DwRo8Zlp.d.cts +166 -0
- package/build/utils/index.cjs +4 -0
- package/build/utils/index.d.cts +15 -0
- package/build/utils/index.d.mts +15 -0
- package/build/utils/index.mjs +3 -0
- package/package.json +22 -10
- package/build/index-75hRTxvB.d.mts +0 -24
- package/build/types-BPQnQEAd.d.cts +0 -111
- package/build/types-FltMUZDB.d.mts +0 -111
- /package/build/{language-configuration-CXgHqltm.mjs → language-configuration-BpugOv-W.mjs} +0 -0
- /package/build/{language-configuration-Dogb_mCE.cjs → language-configuration-DsFXNyL0.cjs} +0 -0
- /package/build/{white-DKaUkz8d.cjs → white-C5tT5Wl0.cjs} +0 -0
- /package/build/{white-DO2qVBHF.mjs → white-kL9BQca_.mjs} +0 -0
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
import { FileSystem } from "@volar/language-service";
|
|
2
|
-
import { URI } from "vscode-uri";
|
|
3
|
-
|
|
4
|
-
//#region src/vfs/types.d.ts
|
|
5
|
-
type DirectoryEntry = {
|
|
6
|
-
name: string;
|
|
7
|
-
isDirectory: boolean;
|
|
8
|
-
};
|
|
9
|
-
type VirtualFileEntry = {
|
|
10
|
-
type: "file";
|
|
11
|
-
content: string;
|
|
12
|
-
};
|
|
13
|
-
type VirtualDirectoryEntry = {
|
|
14
|
-
type: "dir";
|
|
15
|
-
children: Record<string, VirtualEntry>;
|
|
16
|
-
};
|
|
17
|
-
type VirtualEntry = VirtualFileEntry | VirtualDirectoryEntry;
|
|
18
|
-
type MaybePromise<T> = T | Promise<T>;
|
|
19
|
-
type VirtualFileSystemChange = {
|
|
20
|
-
type: "writeFile";
|
|
21
|
-
path: string;
|
|
22
|
-
content: string;
|
|
23
|
-
} | {
|
|
24
|
-
type: "deletePath";
|
|
25
|
-
path: string;
|
|
26
|
-
} | {
|
|
27
|
-
type: "mkdir";
|
|
28
|
-
path: string;
|
|
29
|
-
} | {
|
|
30
|
-
type: "rename";
|
|
31
|
-
from: string;
|
|
32
|
-
to: string;
|
|
33
|
-
} | {
|
|
34
|
-
type: "setTree";
|
|
35
|
-
tree: VirtualEntry;
|
|
36
|
-
};
|
|
37
|
-
type VirtualFileSystemChangeListener = (changes: VirtualFileSystemChange[]) => void;
|
|
38
|
-
type VirtualFileSystem = {
|
|
39
|
-
root: string;
|
|
40
|
-
currentDirectory: () => string | null;
|
|
41
|
-
join: (...parts: string[]) => string;
|
|
42
|
-
stat: (path: string) => Promise<{
|
|
43
|
-
isFile: boolean;
|
|
44
|
-
isDirectory: boolean;
|
|
45
|
-
} | null>;
|
|
46
|
-
readDirectory: (path: string) => Promise<DirectoryEntry[] | null>;
|
|
47
|
-
readFile: (path: string) => Promise<string | null>;
|
|
48
|
-
findFile: (startPath: string, targetName: string) => Promise<string | null>;
|
|
49
|
-
getResourceDirectory: (urls: string[]) => Promise<DirectoryEntry[] | null>;
|
|
50
|
-
getAllTextWithScene: () => Promise<Record<string, {
|
|
51
|
-
path: string;
|
|
52
|
-
name: string;
|
|
53
|
-
text: string;
|
|
54
|
-
fullPath: string;
|
|
55
|
-
}> | null>;
|
|
56
|
-
getTree: () => VirtualEntry;
|
|
57
|
-
setTree: (tree: VirtualEntry) => void;
|
|
58
|
-
writeFile: (path: string, content: string) => Promise<void>;
|
|
59
|
-
deletePath: (path: string) => Promise<void>;
|
|
60
|
-
mkdir: (path: string) => Promise<void>;
|
|
61
|
-
rename: (from: string, to: string) => Promise<void>;
|
|
62
|
-
applyChanges: (changes: VirtualFileSystemChange[]) => Promise<void>;
|
|
63
|
-
onDidChange: (listener: VirtualFileSystemChangeListener) => () => void;
|
|
64
|
-
};
|
|
65
|
-
type WebgalClientHandlers = {
|
|
66
|
-
"workspace/documentLink/refresh": () => MaybePromise<unknown>;
|
|
67
|
-
"client/showTip": (message: string) => MaybePromise<unknown>;
|
|
68
|
-
"client/currentDirectory": () => MaybePromise<string | null>;
|
|
69
|
-
"client/FJoin": (args: string | string[]) => MaybePromise<string | null>;
|
|
70
|
-
"client/FStat": (path: string) => MaybePromise<unknown>;
|
|
71
|
-
"client/findFile": (args: [string, string]) => MaybePromise<string | null>;
|
|
72
|
-
"client/goPropertyDoc": (pathSegments: string[]) => MaybePromise<unknown>;
|
|
73
|
-
"client/readDirectory": (uriString: string) => MaybePromise<unknown>;
|
|
74
|
-
"client/getAllTextWithScene": () => MaybePromise<unknown>;
|
|
75
|
-
"client/getResourceDirectory": (urls: string[]) => MaybePromise<unknown>;
|
|
76
|
-
"client/vfs/getTree": () => MaybePromise<VirtualEntry>;
|
|
77
|
-
"client/vfs/setTree": (tree: VirtualEntry) => MaybePromise<unknown>;
|
|
78
|
-
"client/vfs/readFile": (path: string) => MaybePromise<string | null>;
|
|
79
|
-
"client/vfs/writeFile": (args: {
|
|
80
|
-
path: string;
|
|
81
|
-
content: string;
|
|
82
|
-
}) => MaybePromise<unknown>;
|
|
83
|
-
"client/vfs/deletePath": (path: string) => MaybePromise<unknown>;
|
|
84
|
-
"client/vfs/mkdir": (path: string) => MaybePromise<unknown>;
|
|
85
|
-
"client/vfs/rename": (args: {
|
|
86
|
-
from: string;
|
|
87
|
-
to: string;
|
|
88
|
-
}) => MaybePromise<unknown>;
|
|
89
|
-
"client/vfs/applyChanges": (changes: VirtualFileSystemChange[]) => MaybePromise<unknown>;
|
|
90
|
-
};
|
|
91
|
-
type LanguageClientLike = {
|
|
92
|
-
onRequest: (method: string, handler: (...args: any[]) => unknown) => void;
|
|
93
|
-
};
|
|
94
|
-
type CreateWebgalClientHandlersOptions = {
|
|
95
|
-
vfs: VirtualFileSystem;
|
|
96
|
-
showTip?: (message: string) => unknown;
|
|
97
|
-
goPropertyDoc?: (pathSegments: string[]) => unknown;
|
|
98
|
-
overrides?: Partial<WebgalClientHandlers>;
|
|
99
|
-
};
|
|
100
|
-
interface VolarWritableFileSystem extends FileSystem {
|
|
101
|
-
writeFile(uri: URI, content: string): Promise<void>;
|
|
102
|
-
mkdir(uri: URI): Promise<void>;
|
|
103
|
-
delete(uri: URI): Promise<void>;
|
|
104
|
-
rename(oldUri: URI, newUri: URI): Promise<void>;
|
|
105
|
-
getTree(): VirtualEntry;
|
|
106
|
-
setTree(tree: VirtualEntry): void;
|
|
107
|
-
onDidChange(listener: VirtualFileSystemChangeListener): () => void;
|
|
108
|
-
root: string;
|
|
109
|
-
}
|
|
110
|
-
//#endregion
|
|
111
|
-
export { VirtualDirectoryEntry as a, VirtualFileSystem as c, VolarWritableFileSystem as d, WebgalClientHandlers as f, MaybePromise as i, VirtualFileSystemChange as l, DirectoryEntry as n, VirtualEntry as o, LanguageClientLike as r, VirtualFileEntry as s, CreateWebgalClientHandlersOptions as t, VirtualFileSystemChangeListener as u };
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|