@volar/language-server 1.1.0-alpha.0 → 1.1.0-alpha.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.
|
@@ -170,8 +170,8 @@ function createWebFileSystemHost() {
|
|
|
170
170
|
function statAsync(connection, fsPath, dir) {
|
|
171
171
|
return __awaiter(this, void 0, void 0, function* () {
|
|
172
172
|
const uri = shared.fileNameToUri(fsPath);
|
|
173
|
-
if (uri.startsWith('https://
|
|
174
|
-
const text = yield
|
|
173
|
+
if (uri.startsWith('https://unpkg.com/')) { // stat request always response file type for jsdelivr
|
|
174
|
+
const text = yield readWebFile(connection, uri);
|
|
175
175
|
if (text !== undefined) {
|
|
176
176
|
const name = path.basename(fsPath);
|
|
177
177
|
dir.fileTypes.set(name, vscode_html_languageservice_1.FileType.File);
|
|
@@ -198,8 +198,8 @@ function createWebFileSystemHost() {
|
|
|
198
198
|
function readFileAsync(connection, fsPath, dir) {
|
|
199
199
|
return __awaiter(this, void 0, void 0, function* () {
|
|
200
200
|
const uri = shared.fileNameToUri(fsPath);
|
|
201
|
-
if (uri.startsWith('https://
|
|
202
|
-
const text = yield
|
|
201
|
+
if (uri.startsWith('https://unpkg.com/')) {
|
|
202
|
+
const text = yield readWebFile(connection, uri);
|
|
203
203
|
if (text !== undefined) {
|
|
204
204
|
const name = path.basename(fsPath);
|
|
205
205
|
dir.fileTexts.set(name, text);
|
|
@@ -222,17 +222,12 @@ function createWebFileSystemHost() {
|
|
|
222
222
|
}
|
|
223
223
|
});
|
|
224
224
|
}
|
|
225
|
-
function
|
|
225
|
+
function readWebFile(connection, uri) {
|
|
226
226
|
var _a;
|
|
227
227
|
return __awaiter(this, void 0, void 0, function* () {
|
|
228
228
|
// ignore .js because it's no help for intellisense
|
|
229
229
|
if (uri.endsWith('.d.ts') || uri.endsWith('.json')) {
|
|
230
|
-
|
|
231
|
-
if (text !== undefined
|
|
232
|
-
// ignore https://cdn.jsdelivr.net/npm/@vue/runtime-dom
|
|
233
|
-
&& text.indexOf('Minified by jsDelivr') === -1) {
|
|
234
|
-
return text;
|
|
235
|
-
}
|
|
230
|
+
return (_a = yield connection.sendRequest(protocol_1.FsReadFileRequest.type, uri)) !== null && _a !== void 0 ? _a : undefined;
|
|
236
231
|
}
|
|
237
232
|
});
|
|
238
233
|
}
|
|
@@ -263,7 +258,7 @@ function createWebFileSystemHost() {
|
|
|
263
258
|
while (pendings.length) {
|
|
264
259
|
const current = pendings.shift();
|
|
265
260
|
progress === null || progress === void 0 ? void 0 : progress.report(i / pendings.length, vscode_uri_1.URI.parse(shared.fileNameToUri(current[1])).fsPath);
|
|
266
|
-
yield current;
|
|
261
|
+
yield current[2];
|
|
267
262
|
i++;
|
|
268
263
|
}
|
|
269
264
|
progress === null || progress === void 0 ? void 0 : progress.done();
|
package/out/common/project.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ export interface ProjectContext {
|
|
|
14
14
|
}
|
|
15
15
|
export type Project = ReturnType<typeof createProject>;
|
|
16
16
|
export declare function createProject(context: ProjectContext): Promise<{
|
|
17
|
-
tsConfig:
|
|
17
|
+
tsConfig: path.PosixPath | ts.CompilerOptions;
|
|
18
18
|
scripts: {
|
|
19
19
|
clear: () => void;
|
|
20
20
|
values: () => IterableIterator<{
|
|
@@ -12,7 +12,7 @@ export declare function createWorkspace(context: WorkspaceContext): Promise<{
|
|
|
12
12
|
projects: {
|
|
13
13
|
clear: () => void;
|
|
14
14
|
values: () => IterableIterator<Promise<{
|
|
15
|
-
tsConfig:
|
|
15
|
+
tsConfig: path.PosixPath | ts.CompilerOptions;
|
|
16
16
|
scripts: {
|
|
17
17
|
clear: () => void;
|
|
18
18
|
values: () => IterableIterator<{
|
|
@@ -162,7 +162,7 @@ export declare function createWorkspace(context: WorkspaceContext): Promise<{
|
|
|
162
162
|
}>>;
|
|
163
163
|
uriDelete: (_uri: string) => boolean;
|
|
164
164
|
uriGet: (_uri: string) => Promise<{
|
|
165
|
-
tsConfig:
|
|
165
|
+
tsConfig: path.PosixPath | ts.CompilerOptions;
|
|
166
166
|
scripts: {
|
|
167
167
|
clear: () => void;
|
|
168
168
|
values: () => IterableIterator<{
|
|
@@ -312,7 +312,7 @@ export declare function createWorkspace(context: WorkspaceContext): Promise<{
|
|
|
312
312
|
}> | undefined;
|
|
313
313
|
uriHas: (_uri: string) => boolean;
|
|
314
314
|
uriSet: (_uri: string, item: Promise<{
|
|
315
|
-
tsConfig:
|
|
315
|
+
tsConfig: path.PosixPath | ts.CompilerOptions;
|
|
316
316
|
scripts: {
|
|
317
317
|
clear: () => void;
|
|
318
318
|
values: () => IterableIterator<{
|
|
@@ -462,7 +462,7 @@ export declare function createWorkspace(context: WorkspaceContext): Promise<{
|
|
|
462
462
|
}>) => void;
|
|
463
463
|
pathDelete: (path: string) => boolean;
|
|
464
464
|
pathGet: (path: string) => Promise<{
|
|
465
|
-
tsConfig:
|
|
465
|
+
tsConfig: path.PosixPath | ts.CompilerOptions;
|
|
466
466
|
scripts: {
|
|
467
467
|
clear: () => void;
|
|
468
468
|
values: () => IterableIterator<{
|
|
@@ -611,7 +611,7 @@ export declare function createWorkspace(context: WorkspaceContext): Promise<{
|
|
|
611
611
|
dispose: () => void;
|
|
612
612
|
}> | undefined;
|
|
613
613
|
pathHas: (path: string) => Promise<{
|
|
614
|
-
tsConfig:
|
|
614
|
+
tsConfig: path.PosixPath | ts.CompilerOptions;
|
|
615
615
|
scripts: {
|
|
616
616
|
clear: () => void;
|
|
617
617
|
values: () => IterableIterator<{
|
|
@@ -760,7 +760,7 @@ export declare function createWorkspace(context: WorkspaceContext): Promise<{
|
|
|
760
760
|
dispose: () => void;
|
|
761
761
|
}> | undefined;
|
|
762
762
|
pathSet: (path: string, item: Promise<{
|
|
763
|
-
tsConfig:
|
|
763
|
+
tsConfig: path.PosixPath | ts.CompilerOptions;
|
|
764
764
|
scripts: {
|
|
765
765
|
clear: () => void;
|
|
766
766
|
values: () => IterableIterator<{
|
|
@@ -913,7 +913,7 @@ export declare function createWorkspace(context: WorkspaceContext): Promise<{
|
|
|
913
913
|
getProjectAndTsConfig: (uri: string) => Promise<{
|
|
914
914
|
tsconfig: string;
|
|
915
915
|
project: {
|
|
916
|
-
tsConfig:
|
|
916
|
+
tsConfig: path.PosixPath | ts.CompilerOptions;
|
|
917
917
|
scripts: {
|
|
918
918
|
clear: () => void;
|
|
919
919
|
values: () => IterableIterator<{
|
|
@@ -1063,7 +1063,7 @@ export declare function createWorkspace(context: WorkspaceContext): Promise<{
|
|
|
1063
1063
|
} | undefined;
|
|
1064
1064
|
} | undefined>;
|
|
1065
1065
|
getInferredProject: () => Promise<{
|
|
1066
|
-
tsConfig:
|
|
1066
|
+
tsConfig: path.PosixPath | ts.CompilerOptions;
|
|
1067
1067
|
scripts: {
|
|
1068
1068
|
clear: () => void;
|
|
1069
1069
|
values: () => IterableIterator<{
|
|
@@ -1212,7 +1212,7 @@ export declare function createWorkspace(context: WorkspaceContext): Promise<{
|
|
|
1212
1212
|
dispose: () => void;
|
|
1213
1213
|
}>;
|
|
1214
1214
|
getInferredProjectDontCreate: () => Promise<{
|
|
1215
|
-
tsConfig:
|
|
1215
|
+
tsConfig: path.PosixPath | ts.CompilerOptions;
|
|
1216
1216
|
scripts: {
|
|
1217
1217
|
clear: () => void;
|
|
1218
1218
|
values: () => IterableIterator<{
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="typesafe-path" />
|
|
1
2
|
import { ConfigurationHost } from '@volar/language-service';
|
|
2
3
|
import type * as ts from 'typescript/lib/tsserverlibrary';
|
|
3
4
|
import * as vscode from 'vscode-languageserver';
|
|
@@ -25,7 +26,7 @@ export declare function createWorkspaces(context: WorkspacesContext): {
|
|
|
25
26
|
projects: {
|
|
26
27
|
clear: () => void;
|
|
27
28
|
values: () => IterableIterator<Promise<{
|
|
28
|
-
tsConfig:
|
|
29
|
+
tsConfig: import("typesafe-path").PosixPath | ts.CompilerOptions;
|
|
29
30
|
scripts: {
|
|
30
31
|
clear: () => void;
|
|
31
32
|
values: () => IterableIterator<{
|
|
@@ -175,7 +176,7 @@ export declare function createWorkspaces(context: WorkspacesContext): {
|
|
|
175
176
|
}>>;
|
|
176
177
|
uriDelete: (_uri: string) => boolean;
|
|
177
178
|
uriGet: (_uri: string) => Promise<{
|
|
178
|
-
tsConfig:
|
|
179
|
+
tsConfig: import("typesafe-path").PosixPath | ts.CompilerOptions;
|
|
179
180
|
scripts: {
|
|
180
181
|
clear: () => void;
|
|
181
182
|
values: () => IterableIterator<{
|
|
@@ -325,7 +326,7 @@ export declare function createWorkspaces(context: WorkspacesContext): {
|
|
|
325
326
|
}> | undefined;
|
|
326
327
|
uriHas: (_uri: string) => boolean;
|
|
327
328
|
uriSet: (_uri: string, item: Promise<{
|
|
328
|
-
tsConfig:
|
|
329
|
+
tsConfig: import("typesafe-path").PosixPath | ts.CompilerOptions;
|
|
329
330
|
scripts: {
|
|
330
331
|
clear: () => void;
|
|
331
332
|
values: () => IterableIterator<{
|
|
@@ -475,7 +476,7 @@ export declare function createWorkspaces(context: WorkspacesContext): {
|
|
|
475
476
|
}>) => void;
|
|
476
477
|
pathDelete: (path: string) => boolean;
|
|
477
478
|
pathGet: (path: string) => Promise<{
|
|
478
|
-
tsConfig:
|
|
479
|
+
tsConfig: import("typesafe-path").PosixPath | ts.CompilerOptions;
|
|
479
480
|
scripts: {
|
|
480
481
|
clear: () => void;
|
|
481
482
|
values: () => IterableIterator<{
|
|
@@ -624,7 +625,7 @@ export declare function createWorkspaces(context: WorkspacesContext): {
|
|
|
624
625
|
dispose: () => void;
|
|
625
626
|
}> | undefined;
|
|
626
627
|
pathHas: (path: string) => Promise<{
|
|
627
|
-
tsConfig:
|
|
628
|
+
tsConfig: import("typesafe-path").PosixPath | ts.CompilerOptions;
|
|
628
629
|
scripts: {
|
|
629
630
|
clear: () => void;
|
|
630
631
|
values: () => IterableIterator<{
|
|
@@ -773,7 +774,7 @@ export declare function createWorkspaces(context: WorkspacesContext): {
|
|
|
773
774
|
dispose: () => void;
|
|
774
775
|
}> | undefined;
|
|
775
776
|
pathSet: (path: string, item: Promise<{
|
|
776
|
-
tsConfig:
|
|
777
|
+
tsConfig: import("typesafe-path").PosixPath | ts.CompilerOptions;
|
|
777
778
|
scripts: {
|
|
778
779
|
clear: () => void;
|
|
779
780
|
values: () => IterableIterator<{
|
|
@@ -926,7 +927,7 @@ export declare function createWorkspaces(context: WorkspacesContext): {
|
|
|
926
927
|
getProjectAndTsConfig: (uri: string) => Promise<{
|
|
927
928
|
tsconfig: string;
|
|
928
929
|
project: {
|
|
929
|
-
tsConfig:
|
|
930
|
+
tsConfig: import("typesafe-path").PosixPath | ts.CompilerOptions;
|
|
930
931
|
scripts: {
|
|
931
932
|
clear: () => void;
|
|
932
933
|
values: () => IterableIterator<{
|
|
@@ -1076,7 +1077,7 @@ export declare function createWorkspaces(context: WorkspacesContext): {
|
|
|
1076
1077
|
} | undefined;
|
|
1077
1078
|
} | undefined>;
|
|
1078
1079
|
getInferredProject: () => Promise<{
|
|
1079
|
-
tsConfig:
|
|
1080
|
+
tsConfig: import("typesafe-path").PosixPath | ts.CompilerOptions;
|
|
1080
1081
|
scripts: {
|
|
1081
1082
|
clear: () => void;
|
|
1082
1083
|
values: () => IterableIterator<{
|
|
@@ -1225,7 +1226,7 @@ export declare function createWorkspaces(context: WorkspacesContext): {
|
|
|
1225
1226
|
dispose: () => void;
|
|
1226
1227
|
}>;
|
|
1227
1228
|
getInferredProjectDontCreate: () => Promise<{
|
|
1228
|
-
tsConfig:
|
|
1229
|
+
tsConfig: import("typesafe-path").PosixPath | ts.CompilerOptions;
|
|
1229
1230
|
scripts: {
|
|
1230
1231
|
clear: () => void;
|
|
1231
1232
|
values: () => IterableIterator<{
|
|
@@ -1379,7 +1380,7 @@ export declare function createWorkspaces(context: WorkspacesContext): {
|
|
|
1379
1380
|
getProject: (uri: string) => Promise<{
|
|
1380
1381
|
tsconfig: string;
|
|
1381
1382
|
project: {
|
|
1382
|
-
tsConfig:
|
|
1383
|
+
tsConfig: import("typesafe-path").PosixPath | ts.CompilerOptions;
|
|
1383
1384
|
scripts: {
|
|
1384
1385
|
clear: () => void;
|
|
1385
1386
|
values: () => IterableIterator<{
|
|
@@ -1530,7 +1531,7 @@ export declare function createWorkspaces(context: WorkspacesContext): {
|
|
|
1530
1531
|
} | {
|
|
1531
1532
|
tsconfig: undefined;
|
|
1532
1533
|
project: {
|
|
1533
|
-
tsConfig:
|
|
1534
|
+
tsConfig: import("typesafe-path").PosixPath | ts.CompilerOptions;
|
|
1534
1535
|
scripts: {
|
|
1535
1536
|
clear: () => void;
|
|
1536
1537
|
values: () => IterableIterator<{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@volar/language-server",
|
|
3
|
-
"version": "1.1.0-alpha.
|
|
3
|
+
"version": "1.1.0-alpha.2",
|
|
4
4
|
"main": "out/index.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"files": [
|
|
@@ -13,13 +13,13 @@
|
|
|
13
13
|
],
|
|
14
14
|
"repository": {
|
|
15
15
|
"type": "git",
|
|
16
|
-
"url": "https://github.com/volarjs/
|
|
16
|
+
"url": "https://github.com/volarjs/volar.js.git",
|
|
17
17
|
"directory": "packages/language-server"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@volar/language-core": "1.1.0-alpha.
|
|
21
|
-
"@volar/language-service": "1.1.0-alpha.
|
|
22
|
-
"@volar/shared": "1.1.0-alpha.
|
|
20
|
+
"@volar/language-core": "1.1.0-alpha.2",
|
|
21
|
+
"@volar/language-service": "1.1.0-alpha.2",
|
|
22
|
+
"@volar/shared": "1.1.0-alpha.2",
|
|
23
23
|
"@vscode/l10n": "^0.0.10",
|
|
24
24
|
"request-light": "^0.6.0",
|
|
25
25
|
"typesafe-path": "^0.2.2",
|
|
@@ -29,5 +29,5 @@
|
|
|
29
29
|
"vscode-languageserver-textdocument": "^1.0.8",
|
|
30
30
|
"vscode-uri": "^3.0.7"
|
|
31
31
|
},
|
|
32
|
-
"gitHead": "
|
|
32
|
+
"gitHead": "2a5ff13854187a26c1b5e36c5eab8b94cbd08375"
|
|
33
33
|
}
|