@volar/language-server 1.10.0 → 1.10.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/out/browser/index.d.ts +1 -0
- package/out/browser/index.js +17 -2
- package/out/common/cancellationPipe.d.ts +1 -0
- package/out/common/cancellationPipe.js +24 -1
- package/out/common/configurationHost.d.ts +1 -0
- package/out/common/configurationHost.js +24 -1
- package/out/common/documents.d.ts +3 -0
- package/out/common/documents.js +24 -1
- package/out/common/features/customFeatures.d.ts +1 -0
- package/out/common/features/customFeatures.js +23 -25
- package/out/common/features/languageFeatures.d.ts +2 -1
- package/out/common/features/languageFeatures.js +36 -14
- package/out/common/project.d.ts +5 -2
- package/out/common/project.js +28 -5
- package/out/common/schemaRequestHandlers/http.d.ts +1 -0
- package/out/common/server.d.ts +2 -1
- package/out/common/server.js +35 -19
- package/out/common/utils/inferredCompilerOptions.d.ts +1 -0
- package/out/common/utils/isFileInDir.d.ts +1 -0
- package/out/common/utils/isFileInDir.js +24 -1
- package/out/common/utils/registerFeatures.d.ts +1 -0
- package/out/common/utils/registerFeatures.js +24 -1
- package/out/common/utils/serverConfig.d.ts +1 -0
- package/out/common/utils/uriMap.d.ts +3 -0
- package/out/common/utils/uriMap.js +28 -1
- package/out/common/workspaces.d.ts +1290 -894
- package/out/common/workspaces.js +252 -40
- package/out/index.d.ts +1 -0
- package/out/node/index.d.ts +1 -0
- package/out/node/index.js +18 -3
- package/out/protocol.d.ts +1 -0
- package/out/protocol.js +24 -1
- package/out/types.d.ts +1 -0
- package/package.json +6 -6
- package/out/common/workspace.d.ts +0 -1159
- package/out/common/workspace.js +0 -230
- package/out/node/fs.d.ts +0 -0
- package/out/node/fs.js +0 -1
package/out/common/workspaces.js
CHANGED
|
@@ -1,13 +1,45 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
2
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.sleep = exports.createWorkspaces = void 0;
|
|
4
|
-
const vscode = require("vscode-languageserver");
|
|
26
|
+
exports.sortTsConfigs = exports.sleep = exports.createWorkspaces = exports.rootTsConfigNames = void 0;
|
|
27
|
+
const vscode = __importStar(require("vscode-languageserver"));
|
|
28
|
+
const vscode_uri_1 = require("vscode-uri");
|
|
5
29
|
const types_1 = require("../types");
|
|
6
|
-
const workspace_1 = require("./workspace");
|
|
7
30
|
const isFileInDir_1 = require("./utils/isFileInDir");
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
31
|
+
const path = __importStar(require("typesafe-path/posix"));
|
|
32
|
+
const project_1 = require("./project");
|
|
33
|
+
const inferredCompilerOptions_1 = require("./utils/inferredCompilerOptions");
|
|
34
|
+
const uriMap_1 = require("./utils/uriMap");
|
|
35
|
+
const language_service_1 = require("@volar/language-service");
|
|
36
|
+
exports.rootTsConfigNames = ['tsconfig.json', 'jsconfig.json'];
|
|
37
|
+
function createWorkspaces(context, rootUris) {
|
|
38
|
+
const { fileNameToUri, uriToFileName, fs } = context.server.runtimeEnv;
|
|
39
|
+
const configProjects = (0, uriMap_1.createUriMap)(fileNameToUri);
|
|
40
|
+
const inferredProjects = (0, uriMap_1.createUriMap)(fileNameToUri);
|
|
41
|
+
const rootTsConfigs = new Set();
|
|
42
|
+
const searchedDirs = new Set();
|
|
11
43
|
let semanticTokensReq = 0;
|
|
12
44
|
let documentUpdatedReq = 0;
|
|
13
45
|
context.workspaces.documents.onDidChangeContent(({ textDocument }) => {
|
|
@@ -17,7 +49,20 @@ function createWorkspaces(context) {
|
|
|
17
49
|
context.server.connection.sendDiagnostics({ uri: textDocument.uri, diagnostics: [] });
|
|
18
50
|
});
|
|
19
51
|
context.server.onDidChangeWatchedFiles(({ changes }) => {
|
|
20
|
-
const tsConfigChanges = changes.filter(change =>
|
|
52
|
+
const tsConfigChanges = changes.filter(change => exports.rootTsConfigNames.includes(change.uri.substring(change.uri.lastIndexOf('/') + 1)));
|
|
53
|
+
for (const change of tsConfigChanges) {
|
|
54
|
+
if (change.type === vscode.FileChangeType.Created) {
|
|
55
|
+
rootTsConfigs.add(uriToFileName(change.uri));
|
|
56
|
+
}
|
|
57
|
+
else if ((change.type === vscode.FileChangeType.Changed || change.type === vscode.FileChangeType.Deleted) && configProjects.uriHas(change.uri)) {
|
|
58
|
+
if (change.type === vscode.FileChangeType.Deleted) {
|
|
59
|
+
rootTsConfigs.delete(uriToFileName(change.uri));
|
|
60
|
+
}
|
|
61
|
+
const project = configProjects.uriGet(change.uri);
|
|
62
|
+
configProjects.uriDelete(change.uri);
|
|
63
|
+
project?.then(project => project.dispose());
|
|
64
|
+
}
|
|
65
|
+
}
|
|
21
66
|
if (tsConfigChanges.length) {
|
|
22
67
|
reloadDiagnostics();
|
|
23
68
|
}
|
|
@@ -27,31 +72,34 @@ function createWorkspaces(context) {
|
|
|
27
72
|
});
|
|
28
73
|
context.server.configurationHost?.onDidChangeConfiguration?.(updateDiagnosticsAndSemanticTokens);
|
|
29
74
|
return {
|
|
30
|
-
|
|
75
|
+
configProjects,
|
|
76
|
+
inferredProjects,
|
|
31
77
|
getProject: getProjectAndTsConfig,
|
|
32
|
-
reloadProject,
|
|
78
|
+
reloadProjects: reloadProject,
|
|
33
79
|
add: (rootUri) => {
|
|
34
|
-
if (!
|
|
35
|
-
|
|
36
|
-
...context,
|
|
37
|
-
workspace: {
|
|
38
|
-
rootUri,
|
|
39
|
-
},
|
|
40
|
-
}));
|
|
80
|
+
if (!rootUris.some(uri => uri.toString() === rootUri.toString())) {
|
|
81
|
+
rootUris.push(rootUri);
|
|
41
82
|
}
|
|
42
83
|
},
|
|
43
84
|
remove: (rootUri) => {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
(
|
|
48
|
-
|
|
85
|
+
rootUris = rootUris.filter(uri => uri.toString() !== rootUri.toString());
|
|
86
|
+
for (const uri of configProjects.uriKeys()) {
|
|
87
|
+
const project = configProjects.uriGet(uri);
|
|
88
|
+
project.then(project => {
|
|
89
|
+
if (project.context.project.workspaceUri.toString() === rootUri.toString()) {
|
|
90
|
+
configProjects.uriDelete(uri);
|
|
91
|
+
project.dispose();
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
}
|
|
49
95
|
},
|
|
50
96
|
};
|
|
51
97
|
async function reloadProject() {
|
|
52
|
-
for (const [
|
|
53
|
-
(
|
|
98
|
+
for (const project of [...configProjects.values(), ...inferredProjects.values()]) {
|
|
99
|
+
project.then(project => project.dispose());
|
|
54
100
|
}
|
|
101
|
+
configProjects.clear();
|
|
102
|
+
inferredProjects.clear();
|
|
55
103
|
reloadDiagnostics();
|
|
56
104
|
}
|
|
57
105
|
function reloadDiagnostics() {
|
|
@@ -125,34 +173,198 @@ function createWorkspaces(context) {
|
|
|
125
173
|
context.server.connection.sendDiagnostics({ uri: uri, diagnostics: errors, version });
|
|
126
174
|
}
|
|
127
175
|
async function getProjectAndTsConfig(uri) {
|
|
128
|
-
let rootUris = [...workspaces.keys()]
|
|
129
|
-
.filter(rootUri => (0, isFileInDir_1.isFileInDir)(uriToFileName(uri), uriToFileName(rootUri)))
|
|
130
|
-
.sort((a, b) => (0, workspace_1.sortTsConfigs)(uriToFileName(uri), uriToFileName(a), uriToFileName(b)));
|
|
131
176
|
if (context.workspaces.initOptions.serverMode !== types_1.ServerMode.Syntactic) {
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
const
|
|
135
|
-
|
|
136
|
-
|
|
177
|
+
const tsconfig = await findMatchConfigs(vscode_uri_1.URI.parse(uri));
|
|
178
|
+
if (tsconfig) {
|
|
179
|
+
const project = await getProjectByCreate(tsconfig);
|
|
180
|
+
return {
|
|
181
|
+
tsconfig: tsconfig,
|
|
182
|
+
project,
|
|
183
|
+
};
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
const workspaceUri = getWorkspaceUri(vscode_uri_1.URI.parse(uri));
|
|
187
|
+
if (!inferredProjects.uriHas(workspaceUri.toString())) {
|
|
188
|
+
inferredProjects.uriSet(workspaceUri.toString(), (async () => {
|
|
189
|
+
const inferOptions = await (0, inferredCompilerOptions_1.getInferredCompilerOptions)(context.server.configurationHost);
|
|
190
|
+
return (0, project_1.createProject)({
|
|
191
|
+
...context,
|
|
192
|
+
project: {
|
|
193
|
+
workspaceUri,
|
|
194
|
+
rootUri: workspaceUri,
|
|
195
|
+
tsConfig: inferOptions,
|
|
196
|
+
},
|
|
197
|
+
});
|
|
198
|
+
})());
|
|
199
|
+
}
|
|
200
|
+
const project = await inferredProjects.uriGet(workspaceUri.toString());
|
|
201
|
+
project.tryAddFile(uriToFileName(uri));
|
|
202
|
+
return {
|
|
203
|
+
tsconfig: undefined,
|
|
204
|
+
project,
|
|
205
|
+
};
|
|
206
|
+
}
|
|
207
|
+
function getWorkspaceUri(uri) {
|
|
208
|
+
const fileName = uriToFileName(uri.toString());
|
|
209
|
+
let _rootUris = [...rootUris]
|
|
210
|
+
.filter(rootUri => (0, isFileInDir_1.isFileInDir)(fileName, uriToFileName(rootUri.toString())))
|
|
211
|
+
.sort((a, b) => sortTsConfigs(fileName, uriToFileName(a.toString()), uriToFileName(b.toString())));
|
|
212
|
+
if (!_rootUris.length) {
|
|
213
|
+
_rootUris = [...rootUris];
|
|
214
|
+
}
|
|
215
|
+
if (!_rootUris.length) {
|
|
216
|
+
_rootUris = [uri.with({ path: '/' })];
|
|
217
|
+
}
|
|
218
|
+
return _rootUris[0];
|
|
219
|
+
}
|
|
220
|
+
async function findMatchConfigs(uri) {
|
|
221
|
+
const filePath = uriToFileName(uri.toString());
|
|
222
|
+
let dir = path.dirname(filePath);
|
|
223
|
+
while (true) {
|
|
224
|
+
if (searchedDirs.has(dir)) {
|
|
225
|
+
break;
|
|
226
|
+
}
|
|
227
|
+
searchedDirs.add(dir);
|
|
228
|
+
for (const tsConfigName of exports.rootTsConfigNames) {
|
|
229
|
+
const tsconfigPath = path.join(dir, tsConfigName);
|
|
230
|
+
if ((await fs.stat?.(fileNameToUri(tsconfigPath)))?.type === language_service_1.FileType.File) {
|
|
231
|
+
rootTsConfigs.add(tsconfigPath);
|
|
137
232
|
}
|
|
138
233
|
}
|
|
234
|
+
dir = path.dirname(dir);
|
|
139
235
|
}
|
|
140
|
-
|
|
141
|
-
|
|
236
|
+
await prepareClosestootParsedCommandLine();
|
|
237
|
+
return await findDirectIncludeTsconfig() ?? await findIndirectReferenceTsconfig();
|
|
238
|
+
async function prepareClosestootParsedCommandLine() {
|
|
239
|
+
let matches = [];
|
|
240
|
+
for (const rootTsConfig of rootTsConfigs) {
|
|
241
|
+
if ((0, isFileInDir_1.isFileInDir)(uriToFileName(uri.toString()), path.dirname(rootTsConfig))) {
|
|
242
|
+
matches.push(rootTsConfig);
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
matches = matches.sort((a, b) => sortTsConfigs(uriToFileName(uri.toString()), a, b));
|
|
246
|
+
if (matches.length) {
|
|
247
|
+
await getParsedCommandLine(matches[0]);
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
function findIndirectReferenceTsconfig() {
|
|
251
|
+
return findTsconfig(async (tsconfig) => {
|
|
252
|
+
const project = await configProjects.pathGet(tsconfig);
|
|
253
|
+
return project?.askedFiles.uriHas(uri.toString()) ?? false;
|
|
254
|
+
});
|
|
255
|
+
}
|
|
256
|
+
function findDirectIncludeTsconfig() {
|
|
257
|
+
return findTsconfig(async (tsconfig) => {
|
|
258
|
+
const map = (0, uriMap_1.createUriMap)(fileNameToUri);
|
|
259
|
+
const parsedCommandLine = await getParsedCommandLine(tsconfig);
|
|
260
|
+
for (const fileName of parsedCommandLine?.fileNames ?? []) {
|
|
261
|
+
map.pathSet(fileName, true);
|
|
262
|
+
}
|
|
263
|
+
return map.uriHas(uri.toString());
|
|
264
|
+
});
|
|
265
|
+
}
|
|
266
|
+
async function findTsconfig(match) {
|
|
267
|
+
const checked = new Set();
|
|
268
|
+
for (const rootTsConfig of [...rootTsConfigs].sort((a, b) => sortTsConfigs(uriToFileName(uri.toString()), a, b))) {
|
|
269
|
+
const project = await configProjects.pathGet(rootTsConfig);
|
|
270
|
+
if (project) {
|
|
271
|
+
let chains = await getReferencesChains(project.getParsedCommandLine(), rootTsConfig, []);
|
|
272
|
+
if (context.workspaces.initOptions.reverseConfigFilePriority) {
|
|
273
|
+
chains = chains.reverse();
|
|
274
|
+
}
|
|
275
|
+
for (const chain of chains) {
|
|
276
|
+
for (let i = chain.length - 1; i >= 0; i--) {
|
|
277
|
+
const tsconfig = chain[i];
|
|
278
|
+
if (checked.has(tsconfig))
|
|
279
|
+
continue;
|
|
280
|
+
checked.add(tsconfig);
|
|
281
|
+
if (await match(tsconfig)) {
|
|
282
|
+
return tsconfig;
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
}
|
|
142
288
|
}
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
289
|
+
async function getReferencesChains(parsedCommandLine, tsConfig, before) {
|
|
290
|
+
if (parsedCommandLine.projectReferences?.length) {
|
|
291
|
+
const newChains = [];
|
|
292
|
+
for (const projectReference of parsedCommandLine.projectReferences) {
|
|
293
|
+
let tsConfigPath = projectReference.path.replace(/\\/g, '/');
|
|
294
|
+
// fix https://github.com/johnsoncodehk/volar/issues/712
|
|
295
|
+
if ((await fs.stat?.(fileNameToUri(tsConfigPath)))?.type === language_service_1.FileType.File) {
|
|
296
|
+
const newTsConfigPath = path.join(tsConfigPath, 'tsconfig.json');
|
|
297
|
+
const newJsConfigPath = path.join(tsConfigPath, 'jsconfig.json');
|
|
298
|
+
if ((await fs.stat?.(fileNameToUri(newTsConfigPath)))?.type === language_service_1.FileType.File) {
|
|
299
|
+
tsConfigPath = newTsConfigPath;
|
|
300
|
+
}
|
|
301
|
+
else if ((await fs.stat?.(fileNameToUri(newJsConfigPath)))?.type === language_service_1.FileType.File) {
|
|
302
|
+
tsConfigPath = newJsConfigPath;
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
const beforeIndex = before.indexOf(tsConfigPath); // cycle
|
|
306
|
+
if (beforeIndex >= 0) {
|
|
307
|
+
newChains.push(before.slice(0, Math.max(beforeIndex, 1)));
|
|
308
|
+
}
|
|
309
|
+
else {
|
|
310
|
+
const referenceParsedCommandLine = await getParsedCommandLine(tsConfigPath);
|
|
311
|
+
if (referenceParsedCommandLine) {
|
|
312
|
+
for (const chain of await getReferencesChains(referenceParsedCommandLine, tsConfigPath, [...before, tsConfig])) {
|
|
313
|
+
newChains.push(chain);
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
return newChains;
|
|
319
|
+
}
|
|
320
|
+
else {
|
|
321
|
+
return [[...before, tsConfig]];
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
async function getParsedCommandLine(tsConfig) {
|
|
325
|
+
const project = await getProjectByCreate(tsConfig);
|
|
326
|
+
return project?.getParsedCommandLine();
|
|
150
327
|
}
|
|
151
328
|
}
|
|
329
|
+
function getProjectByCreate(_tsConfig) {
|
|
330
|
+
const tsConfig = _tsConfig.replace(/\\/g, '/');
|
|
331
|
+
let project = configProjects.pathGet(tsConfig);
|
|
332
|
+
if (!project) {
|
|
333
|
+
const rootUri = vscode_uri_1.URI.parse(fileNameToUri(path.dirname(tsConfig)));
|
|
334
|
+
project = (0, project_1.createProject)({
|
|
335
|
+
...context,
|
|
336
|
+
project: {
|
|
337
|
+
workspaceUri: getWorkspaceUri(rootUri),
|
|
338
|
+
rootUri: rootUri,
|
|
339
|
+
tsConfig,
|
|
340
|
+
},
|
|
341
|
+
});
|
|
342
|
+
configProjects.pathSet(tsConfig, project);
|
|
343
|
+
}
|
|
344
|
+
return project;
|
|
345
|
+
}
|
|
152
346
|
}
|
|
153
347
|
exports.createWorkspaces = createWorkspaces;
|
|
154
348
|
function sleep(ms) {
|
|
155
349
|
return new Promise(resolve => setTimeout(resolve, ms));
|
|
156
350
|
}
|
|
157
351
|
exports.sleep = sleep;
|
|
352
|
+
function sortTsConfigs(file, a, b) {
|
|
353
|
+
const inA = (0, isFileInDir_1.isFileInDir)(file, path.dirname(a));
|
|
354
|
+
const inB = (0, isFileInDir_1.isFileInDir)(file, path.dirname(b));
|
|
355
|
+
if (inA !== inB) {
|
|
356
|
+
const aWeight = inA ? 1 : 0;
|
|
357
|
+
const bWeight = inB ? 1 : 0;
|
|
358
|
+
return bWeight - aWeight;
|
|
359
|
+
}
|
|
360
|
+
const aLength = a.split('/').length;
|
|
361
|
+
const bLength = b.split('/').length;
|
|
362
|
+
if (aLength === bLength) {
|
|
363
|
+
const aWeight = path.basename(a) === 'tsconfig.json' ? 1 : 0;
|
|
364
|
+
const bWeight = path.basename(b) === 'tsconfig.json' ? 1 : 0;
|
|
365
|
+
return bWeight - aWeight;
|
|
366
|
+
}
|
|
367
|
+
return bLength - aLength;
|
|
368
|
+
}
|
|
369
|
+
exports.sortTsConfigs = sortTsConfigs;
|
|
158
370
|
//# sourceMappingURL=workspaces.js.map
|
package/out/index.d.ts
CHANGED
package/out/node/index.d.ts
CHANGED
|
@@ -7,3 +7,4 @@ export declare const fileNameToUri: (fileName: string) => string;
|
|
|
7
7
|
export declare function createFs(options: InitializationOptions): FileSystem;
|
|
8
8
|
export declare function createConnection(): vscode._Connection<vscode._, vscode._, vscode._, vscode._, vscode._, vscode._, vscode._, vscode._>;
|
|
9
9
|
export declare function startLanguageServer(connection: vscode.Connection, ...plugins: LanguageServerPlugin[]): void;
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
package/out/node/index.js
CHANGED
|
@@ -10,15 +10,30 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
|
|
|
10
10
|
if (k2 === undefined) k2 = k;
|
|
11
11
|
o[k2] = m[k];
|
|
12
12
|
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
13
25
|
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
26
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
27
|
};
|
|
28
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
29
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
30
|
+
};
|
|
16
31
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
32
|
exports.startLanguageServer = exports.createConnection = exports.createFs = exports.fileNameToUri = exports.uriToFileName = void 0;
|
|
18
|
-
const fs = require("fs");
|
|
19
|
-
const vscode = require("vscode-languageserver/node");
|
|
33
|
+
const fs = __importStar(require("fs"));
|
|
34
|
+
const vscode = __importStar(require("vscode-languageserver/node"));
|
|
20
35
|
const vscode_uri_1 = require("vscode-uri");
|
|
21
|
-
const http_1 = require("../common/schemaRequestHandlers/http");
|
|
36
|
+
const http_1 = __importDefault(require("../common/schemaRequestHandlers/http"));
|
|
22
37
|
const server_1 = require("../common/server");
|
|
23
38
|
const language_service_1 = require("@volar/language-service");
|
|
24
39
|
__exportStar(require("../index"), exports);
|
package/out/protocol.d.ts
CHANGED
package/out/protocol.js
CHANGED
|
@@ -1,7 +1,30 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
2
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
26
|
exports.GetVirtualFileRequest = exports.GetVirtualFilesRequest = exports.ReloadProjectNotification = exports.WriteVirtualFilesNotification = exports.LoadedTSFilesMetaRequest = exports.AutoInsertRequest = exports.GetMatchTsConfigRequest = exports.FindFileReferenceRequest = exports.FsStatRequest = exports.FsReadDirectoryRequest = exports.FsReadFileRequest = void 0;
|
|
4
|
-
const vscode = require("vscode-languageserver-protocol");
|
|
27
|
+
const vscode = __importStar(require("vscode-languageserver-protocol"));
|
|
5
28
|
/**
|
|
6
29
|
* Server request client
|
|
7
30
|
*/
|
package/out/types.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@volar/language-server",
|
|
3
|
-
"version": "1.10.
|
|
3
|
+
"version": "1.10.2",
|
|
4
4
|
"main": "out/index.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"files": [
|
|
@@ -15,9 +15,9 @@
|
|
|
15
15
|
"directory": "packages/language-server"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@volar/language-core": "1.10.
|
|
19
|
-
"@volar/language-service": "1.10.
|
|
20
|
-
"@volar/typescript": "1.10.
|
|
18
|
+
"@volar/language-core": "1.10.2",
|
|
19
|
+
"@volar/language-service": "1.10.2",
|
|
20
|
+
"@volar/typescript": "1.10.2",
|
|
21
21
|
"@vscode/l10n": "^0.0.11",
|
|
22
22
|
"request-light": "^0.7.0",
|
|
23
23
|
"typesafe-path": "^0.2.2",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"vscode-uri": "^3.0.7"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@volar/source-map": "1.10.
|
|
30
|
+
"@volar/source-map": "1.10.2"
|
|
31
31
|
},
|
|
32
|
-
"gitHead": "
|
|
32
|
+
"gitHead": "15d5e9129c034ef839f6b4646e495b5e80890764"
|
|
33
33
|
}
|