@codingame/monaco-vscode-css-language-features-default-extension 1.83.16 → 1.85.0-next.1
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/cssClientMain.js +366 -379
- package/cssClientMain.js.map +1 -1
- package/cssServerMain.js +1132 -3124
- package/cssServerMain.js.map +1 -1
- package/index.js +1 -1
- package/package.json +2 -2
package/cssClientMain.js
CHANGED
|
@@ -1911,46 +1911,51 @@ class ReadableStreamMessageReader extends AbstractMessageReader {
|
|
|
1911
1911
|
return result;
|
|
1912
1912
|
}
|
|
1913
1913
|
onData(data) {
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1914
|
+
try {
|
|
1915
|
+
this.buffer.append(data);
|
|
1916
|
+
while (true) {
|
|
1917
|
+
if (this.nextMessageLength === -1) {
|
|
1918
|
+
const headers = this.buffer.tryReadHeaders(true);
|
|
1919
|
+
if (!headers) {
|
|
1920
|
+
return;
|
|
1921
|
+
}
|
|
1922
|
+
const contentLength = headers.get('content-length');
|
|
1923
|
+
if (!contentLength) {
|
|
1924
|
+
this.fireError(new Error(`Header must provide a Content-Length property.\n${JSON.stringify(Object.fromEntries(headers))}`));
|
|
1925
|
+
return;
|
|
1926
|
+
}
|
|
1927
|
+
const length = parseInt(contentLength);
|
|
1928
|
+
if (isNaN(length)) {
|
|
1929
|
+
this.fireError(new Error(`Content-Length value must be a number. Got ${contentLength}`));
|
|
1930
|
+
return;
|
|
1931
|
+
}
|
|
1932
|
+
this.nextMessageLength = length;
|
|
1925
1933
|
}
|
|
1926
|
-
const
|
|
1927
|
-
if (
|
|
1928
|
-
|
|
1934
|
+
const body = this.buffer.tryReadBody(this.nextMessageLength);
|
|
1935
|
+
if (body === undefined) {
|
|
1936
|
+
/** We haven't received the full message yet. */
|
|
1937
|
+
this.setPartialMessageTimer();
|
|
1929
1938
|
return;
|
|
1930
1939
|
}
|
|
1931
|
-
this.
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1940
|
+
this.clearPartialMessageTimer();
|
|
1941
|
+
this.nextMessageLength = -1;
|
|
1942
|
+
// Make sure that we convert one received message after the
|
|
1943
|
+
// other. Otherwise it could happen that a decoding of a second
|
|
1944
|
+
// smaller message finished before the decoding of a first larger
|
|
1945
|
+
// message and then we would deliver the second message first.
|
|
1946
|
+
this.readSemaphore.lock(async () => {
|
|
1947
|
+
const bytes = this.options.contentDecoder !== undefined
|
|
1948
|
+
? await this.options.contentDecoder.decode(body)
|
|
1949
|
+
: body;
|
|
1950
|
+
const message = await this.options.contentTypeDecoder.decode(bytes, this.options);
|
|
1951
|
+
this.callback(message);
|
|
1952
|
+
}).catch((error) => {
|
|
1953
|
+
this.fireError(error);
|
|
1954
|
+
});
|
|
1938
1955
|
}
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
// other. Otherwise it could happen that a decoding of a second
|
|
1943
|
-
// smaller message finished before the decoding of a first larger
|
|
1944
|
-
// message and then we would deliver the second message first.
|
|
1945
|
-
this.readSemaphore.lock(async () => {
|
|
1946
|
-
const bytes = this.options.contentDecoder !== undefined
|
|
1947
|
-
? await this.options.contentDecoder.decode(body)
|
|
1948
|
-
: body;
|
|
1949
|
-
const message = await this.options.contentTypeDecoder.decode(bytes, this.options);
|
|
1950
|
-
this.callback(message);
|
|
1951
|
-
}).catch((error) => {
|
|
1952
|
-
this.fireError(error);
|
|
1953
|
-
});
|
|
1956
|
+
}
|
|
1957
|
+
catch (error) {
|
|
1958
|
+
this.fireError(error);
|
|
1954
1959
|
}
|
|
1955
1960
|
}
|
|
1956
1961
|
clearPartialMessageTimer() {
|
|
@@ -2264,7 +2269,7 @@ class AbstractMessageBuffer {
|
|
|
2264
2269
|
const header = headers[i];
|
|
2265
2270
|
const index = header.indexOf(':');
|
|
2266
2271
|
if (index === -1) {
|
|
2267
|
-
throw new Error(
|
|
2272
|
+
throw new Error(`Message header must separate key and value using ':'\n${header}`);
|
|
2268
2273
|
}
|
|
2269
2274
|
const key = header.substr(0, index);
|
|
2270
2275
|
const value = header.substr(index + 1).trim();
|
|
@@ -3637,7 +3642,7 @@ var LSPErrorCodes;
|
|
|
3637
3642
|
|
|
3638
3643
|
/***/ }),
|
|
3639
3644
|
/* 24 */
|
|
3640
|
-
/***/ ((
|
|
3645
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
3641
3646
|
|
|
3642
3647
|
"use strict";
|
|
3643
3648
|
__webpack_require__.r(__webpack_exports__);
|
|
@@ -3779,14 +3784,14 @@ var Position;
|
|
|
3779
3784
|
if (character === Number.MAX_VALUE) {
|
|
3780
3785
|
character = uinteger.MAX_VALUE;
|
|
3781
3786
|
}
|
|
3782
|
-
return { line
|
|
3787
|
+
return { line, character };
|
|
3783
3788
|
}
|
|
3784
3789
|
Position.create = create;
|
|
3785
3790
|
/**
|
|
3786
3791
|
* Checks whether the given literal conforms to the {@link Position} interface.
|
|
3787
3792
|
*/
|
|
3788
3793
|
function is(value) {
|
|
3789
|
-
|
|
3794
|
+
let candidate = value;
|
|
3790
3795
|
return Is.objectLiteral(candidate) && Is.uinteger(candidate.line) && Is.uinteger(candidate.character);
|
|
3791
3796
|
}
|
|
3792
3797
|
Position.is = is;
|
|
@@ -3805,7 +3810,7 @@ var Range;
|
|
|
3805
3810
|
return { start: one, end: two };
|
|
3806
3811
|
}
|
|
3807
3812
|
else {
|
|
3808
|
-
throw new Error(
|
|
3813
|
+
throw new Error(`Range#create called with invalid arguments[${one}, ${two}, ${three}, ${four}]`);
|
|
3809
3814
|
}
|
|
3810
3815
|
}
|
|
3811
3816
|
Range.create = create;
|
|
@@ -3813,7 +3818,7 @@ var Range;
|
|
|
3813
3818
|
* Checks whether the given literal conforms to the {@link Range} interface.
|
|
3814
3819
|
*/
|
|
3815
3820
|
function is(value) {
|
|
3816
|
-
|
|
3821
|
+
let candidate = value;
|
|
3817
3822
|
return Is.objectLiteral(candidate) && Position.is(candidate.start) && Position.is(candidate.end);
|
|
3818
3823
|
}
|
|
3819
3824
|
Range.is = is;
|
|
@@ -3830,14 +3835,14 @@ var Location;
|
|
|
3830
3835
|
* @param range The location's range.
|
|
3831
3836
|
*/
|
|
3832
3837
|
function create(uri, range) {
|
|
3833
|
-
return { uri
|
|
3838
|
+
return { uri, range };
|
|
3834
3839
|
}
|
|
3835
3840
|
Location.create = create;
|
|
3836
3841
|
/**
|
|
3837
3842
|
* Checks whether the given literal conforms to the {@link Location} interface.
|
|
3838
3843
|
*/
|
|
3839
3844
|
function is(value) {
|
|
3840
|
-
|
|
3845
|
+
let candidate = value;
|
|
3841
3846
|
return Is.objectLiteral(candidate) && Range.is(candidate.range) && (Is.string(candidate.uri) || Is.undefined(candidate.uri));
|
|
3842
3847
|
}
|
|
3843
3848
|
Location.is = is;
|
|
@@ -3856,14 +3861,14 @@ var LocationLink;
|
|
|
3856
3861
|
* @param originSelectionRange The span of the symbol being defined in the originating source file.
|
|
3857
3862
|
*/
|
|
3858
3863
|
function create(targetUri, targetRange, targetSelectionRange, originSelectionRange) {
|
|
3859
|
-
return { targetUri
|
|
3864
|
+
return { targetUri, targetRange, targetSelectionRange, originSelectionRange };
|
|
3860
3865
|
}
|
|
3861
3866
|
LocationLink.create = create;
|
|
3862
3867
|
/**
|
|
3863
3868
|
* Checks whether the given literal conforms to the {@link LocationLink} interface.
|
|
3864
3869
|
*/
|
|
3865
3870
|
function is(value) {
|
|
3866
|
-
|
|
3871
|
+
let candidate = value;
|
|
3867
3872
|
return Is.objectLiteral(candidate) && Range.is(candidate.targetRange) && Is.string(candidate.targetUri)
|
|
3868
3873
|
&& Range.is(candidate.targetSelectionRange)
|
|
3869
3874
|
&& (Range.is(candidate.originSelectionRange) || Is.undefined(candidate.originSelectionRange));
|
|
@@ -3881,10 +3886,10 @@ var Color;
|
|
|
3881
3886
|
*/
|
|
3882
3887
|
function create(red, green, blue, alpha) {
|
|
3883
3888
|
return {
|
|
3884
|
-
red
|
|
3885
|
-
green
|
|
3886
|
-
blue
|
|
3887
|
-
alpha
|
|
3889
|
+
red,
|
|
3890
|
+
green,
|
|
3891
|
+
blue,
|
|
3892
|
+
alpha,
|
|
3888
3893
|
};
|
|
3889
3894
|
}
|
|
3890
3895
|
Color.create = create;
|
|
@@ -3892,7 +3897,7 @@ var Color;
|
|
|
3892
3897
|
* Checks whether the given literal conforms to the {@link Color} interface.
|
|
3893
3898
|
*/
|
|
3894
3899
|
function is(value) {
|
|
3895
|
-
|
|
3900
|
+
const candidate = value;
|
|
3896
3901
|
return Is.objectLiteral(candidate) && Is.numberRange(candidate.red, 0, 1)
|
|
3897
3902
|
&& Is.numberRange(candidate.green, 0, 1)
|
|
3898
3903
|
&& Is.numberRange(candidate.blue, 0, 1)
|
|
@@ -3911,8 +3916,8 @@ var ColorInformation;
|
|
|
3911
3916
|
*/
|
|
3912
3917
|
function create(range, color) {
|
|
3913
3918
|
return {
|
|
3914
|
-
range
|
|
3915
|
-
color
|
|
3919
|
+
range,
|
|
3920
|
+
color,
|
|
3916
3921
|
};
|
|
3917
3922
|
}
|
|
3918
3923
|
ColorInformation.create = create;
|
|
@@ -3920,7 +3925,7 @@ var ColorInformation;
|
|
|
3920
3925
|
* Checks whether the given literal conforms to the {@link ColorInformation} interface.
|
|
3921
3926
|
*/
|
|
3922
3927
|
function is(value) {
|
|
3923
|
-
|
|
3928
|
+
const candidate = value;
|
|
3924
3929
|
return Is.objectLiteral(candidate) && Range.is(candidate.range) && Color.is(candidate.color);
|
|
3925
3930
|
}
|
|
3926
3931
|
ColorInformation.is = is;
|
|
@@ -3936,9 +3941,9 @@ var ColorPresentation;
|
|
|
3936
3941
|
*/
|
|
3937
3942
|
function create(label, textEdit, additionalTextEdits) {
|
|
3938
3943
|
return {
|
|
3939
|
-
label
|
|
3940
|
-
textEdit
|
|
3941
|
-
additionalTextEdits
|
|
3944
|
+
label,
|
|
3945
|
+
textEdit,
|
|
3946
|
+
additionalTextEdits,
|
|
3942
3947
|
};
|
|
3943
3948
|
}
|
|
3944
3949
|
ColorPresentation.create = create;
|
|
@@ -3946,7 +3951,7 @@ var ColorPresentation;
|
|
|
3946
3951
|
* Checks whether the given literal conforms to the {@link ColorInformation} interface.
|
|
3947
3952
|
*/
|
|
3948
3953
|
function is(value) {
|
|
3949
|
-
|
|
3954
|
+
const candidate = value;
|
|
3950
3955
|
return Is.objectLiteral(candidate) && Is.string(candidate.label)
|
|
3951
3956
|
&& (Is.undefined(candidate.textEdit) || TextEdit.is(candidate))
|
|
3952
3957
|
&& (Is.undefined(candidate.additionalTextEdits) || Is.typedArray(candidate.additionalTextEdits, TextEdit.is));
|
|
@@ -3981,9 +3986,9 @@ var FoldingRange;
|
|
|
3981
3986
|
* Creates a new FoldingRange literal.
|
|
3982
3987
|
*/
|
|
3983
3988
|
function create(startLine, endLine, startCharacter, endCharacter, kind, collapsedText) {
|
|
3984
|
-
|
|
3985
|
-
startLine
|
|
3986
|
-
endLine
|
|
3989
|
+
const result = {
|
|
3990
|
+
startLine,
|
|
3991
|
+
endLine
|
|
3987
3992
|
};
|
|
3988
3993
|
if (Is.defined(startCharacter)) {
|
|
3989
3994
|
result.startCharacter = startCharacter;
|
|
@@ -4004,7 +4009,7 @@ var FoldingRange;
|
|
|
4004
4009
|
* Checks whether the given literal conforms to the {@link FoldingRange} interface.
|
|
4005
4010
|
*/
|
|
4006
4011
|
function is(value) {
|
|
4007
|
-
|
|
4012
|
+
const candidate = value;
|
|
4008
4013
|
return Is.objectLiteral(candidate) && Is.uinteger(candidate.startLine) && Is.uinteger(candidate.startLine)
|
|
4009
4014
|
&& (Is.undefined(candidate.startCharacter) || Is.uinteger(candidate.startCharacter))
|
|
4010
4015
|
&& (Is.undefined(candidate.endCharacter) || Is.uinteger(candidate.endCharacter))
|
|
@@ -4023,8 +4028,8 @@ var DiagnosticRelatedInformation;
|
|
|
4023
4028
|
*/
|
|
4024
4029
|
function create(location, message) {
|
|
4025
4030
|
return {
|
|
4026
|
-
location
|
|
4027
|
-
message
|
|
4031
|
+
location,
|
|
4032
|
+
message
|
|
4028
4033
|
};
|
|
4029
4034
|
}
|
|
4030
4035
|
DiagnosticRelatedInformation.create = create;
|
|
@@ -4032,7 +4037,7 @@ var DiagnosticRelatedInformation;
|
|
|
4032
4037
|
* Checks whether the given literal conforms to the {@link DiagnosticRelatedInformation} interface.
|
|
4033
4038
|
*/
|
|
4034
4039
|
function is(value) {
|
|
4035
|
-
|
|
4040
|
+
let candidate = value;
|
|
4036
4041
|
return Is.defined(candidate) && Location.is(candidate.location) && Is.string(candidate.message);
|
|
4037
4042
|
}
|
|
4038
4043
|
DiagnosticRelatedInformation.is = is;
|
|
@@ -4088,7 +4093,7 @@ var DiagnosticTag;
|
|
|
4088
4093
|
var CodeDescription;
|
|
4089
4094
|
(function (CodeDescription) {
|
|
4090
4095
|
function is(value) {
|
|
4091
|
-
|
|
4096
|
+
const candidate = value;
|
|
4092
4097
|
return Is.objectLiteral(candidate) && Is.string(candidate.href);
|
|
4093
4098
|
}
|
|
4094
4099
|
CodeDescription.is = is;
|
|
@@ -4103,7 +4108,7 @@ var Diagnostic;
|
|
|
4103
4108
|
* Creates a new Diagnostic literal.
|
|
4104
4109
|
*/
|
|
4105
4110
|
function create(range, message, severity, code, source, relatedInformation) {
|
|
4106
|
-
|
|
4111
|
+
let result = { range, message };
|
|
4107
4112
|
if (Is.defined(severity)) {
|
|
4108
4113
|
result.severity = severity;
|
|
4109
4114
|
}
|
|
@@ -4124,7 +4129,7 @@ var Diagnostic;
|
|
|
4124
4129
|
*/
|
|
4125
4130
|
function is(value) {
|
|
4126
4131
|
var _a;
|
|
4127
|
-
|
|
4132
|
+
let candidate = value;
|
|
4128
4133
|
return Is.defined(candidate)
|
|
4129
4134
|
&& Range.is(candidate.range)
|
|
4130
4135
|
&& Is.string(candidate.message)
|
|
@@ -4145,12 +4150,8 @@ var Command;
|
|
|
4145
4150
|
/**
|
|
4146
4151
|
* Creates a new Command literal.
|
|
4147
4152
|
*/
|
|
4148
|
-
function create(title, command) {
|
|
4149
|
-
|
|
4150
|
-
for (var _i = 2; _i < arguments.length; _i++) {
|
|
4151
|
-
args[_i - 2] = arguments[_i];
|
|
4152
|
-
}
|
|
4153
|
-
var result = { title: title, command: command };
|
|
4153
|
+
function create(title, command, ...args) {
|
|
4154
|
+
let result = { title, command };
|
|
4154
4155
|
if (Is.defined(args) && args.length > 0) {
|
|
4155
4156
|
result.arguments = args;
|
|
4156
4157
|
}
|
|
@@ -4161,7 +4162,7 @@ var Command;
|
|
|
4161
4162
|
* Checks whether the given literal conforms to the {@link Command} interface.
|
|
4162
4163
|
*/
|
|
4163
4164
|
function is(value) {
|
|
4164
|
-
|
|
4165
|
+
let candidate = value;
|
|
4165
4166
|
return Is.defined(candidate) && Is.string(candidate.title) && Is.string(candidate.command);
|
|
4166
4167
|
}
|
|
4167
4168
|
Command.is = is;
|
|
@@ -4178,7 +4179,7 @@ var TextEdit;
|
|
|
4178
4179
|
* @param newText The new text.
|
|
4179
4180
|
*/
|
|
4180
4181
|
function replace(range, newText) {
|
|
4181
|
-
return { range
|
|
4182
|
+
return { range, newText };
|
|
4182
4183
|
}
|
|
4183
4184
|
TextEdit.replace = replace;
|
|
4184
4185
|
/**
|
|
@@ -4187,7 +4188,7 @@ var TextEdit;
|
|
|
4187
4188
|
* @param newText The text to be inserted.
|
|
4188
4189
|
*/
|
|
4189
4190
|
function insert(position, newText) {
|
|
4190
|
-
return { range: { start: position, end: position }, newText
|
|
4191
|
+
return { range: { start: position, end: position }, newText };
|
|
4191
4192
|
}
|
|
4192
4193
|
TextEdit.insert = insert;
|
|
4193
4194
|
/**
|
|
@@ -4195,11 +4196,11 @@ var TextEdit;
|
|
|
4195
4196
|
* @param range The range of text to be deleted.
|
|
4196
4197
|
*/
|
|
4197
4198
|
function del(range) {
|
|
4198
|
-
return { range
|
|
4199
|
+
return { range, newText: '' };
|
|
4199
4200
|
}
|
|
4200
4201
|
TextEdit.del = del;
|
|
4201
4202
|
function is(value) {
|
|
4202
|
-
|
|
4203
|
+
const candidate = value;
|
|
4203
4204
|
return Is.objectLiteral(candidate)
|
|
4204
4205
|
&& Is.string(candidate.newText)
|
|
4205
4206
|
&& Range.is(candidate.range);
|
|
@@ -4209,7 +4210,7 @@ var TextEdit;
|
|
|
4209
4210
|
var ChangeAnnotation;
|
|
4210
4211
|
(function (ChangeAnnotation) {
|
|
4211
4212
|
function create(label, needsConfirmation, description) {
|
|
4212
|
-
|
|
4213
|
+
const result = { label };
|
|
4213
4214
|
if (needsConfirmation !== undefined) {
|
|
4214
4215
|
result.needsConfirmation = needsConfirmation;
|
|
4215
4216
|
}
|
|
@@ -4220,7 +4221,7 @@ var ChangeAnnotation;
|
|
|
4220
4221
|
}
|
|
4221
4222
|
ChangeAnnotation.create = create;
|
|
4222
4223
|
function is(value) {
|
|
4223
|
-
|
|
4224
|
+
const candidate = value;
|
|
4224
4225
|
return Is.objectLiteral(candidate) && Is.string(candidate.label) &&
|
|
4225
4226
|
(Is.boolean(candidate.needsConfirmation) || candidate.needsConfirmation === undefined) &&
|
|
4226
4227
|
(Is.string(candidate.description) || candidate.description === undefined);
|
|
@@ -4230,7 +4231,7 @@ var ChangeAnnotation;
|
|
|
4230
4231
|
var ChangeAnnotationIdentifier;
|
|
4231
4232
|
(function (ChangeAnnotationIdentifier) {
|
|
4232
4233
|
function is(value) {
|
|
4233
|
-
|
|
4234
|
+
const candidate = value;
|
|
4234
4235
|
return Is.string(candidate);
|
|
4235
4236
|
}
|
|
4236
4237
|
ChangeAnnotationIdentifier.is = is;
|
|
@@ -4245,7 +4246,7 @@ var AnnotatedTextEdit;
|
|
|
4245
4246
|
* @param annotation The annotation.
|
|
4246
4247
|
*/
|
|
4247
4248
|
function replace(range, newText, annotation) {
|
|
4248
|
-
return { range
|
|
4249
|
+
return { range, newText, annotationId: annotation };
|
|
4249
4250
|
}
|
|
4250
4251
|
AnnotatedTextEdit.replace = replace;
|
|
4251
4252
|
/**
|
|
@@ -4256,7 +4257,7 @@ var AnnotatedTextEdit;
|
|
|
4256
4257
|
* @param annotation The annotation.
|
|
4257
4258
|
*/
|
|
4258
4259
|
function insert(position, newText, annotation) {
|
|
4259
|
-
return { range: { start: position, end: position }, newText
|
|
4260
|
+
return { range: { start: position, end: position }, newText, annotationId: annotation };
|
|
4260
4261
|
}
|
|
4261
4262
|
AnnotatedTextEdit.insert = insert;
|
|
4262
4263
|
/**
|
|
@@ -4266,11 +4267,11 @@ var AnnotatedTextEdit;
|
|
|
4266
4267
|
* @param annotation The annotation.
|
|
4267
4268
|
*/
|
|
4268
4269
|
function del(range, annotation) {
|
|
4269
|
-
return { range
|
|
4270
|
+
return { range, newText: '', annotationId: annotation };
|
|
4270
4271
|
}
|
|
4271
4272
|
AnnotatedTextEdit.del = del;
|
|
4272
4273
|
function is(value) {
|
|
4273
|
-
|
|
4274
|
+
const candidate = value;
|
|
4274
4275
|
return TextEdit.is(candidate) && (ChangeAnnotation.is(candidate.annotationId) || ChangeAnnotationIdentifier.is(candidate.annotationId));
|
|
4275
4276
|
}
|
|
4276
4277
|
AnnotatedTextEdit.is = is;
|
|
@@ -4285,11 +4286,11 @@ var TextDocumentEdit;
|
|
|
4285
4286
|
* Creates a new `TextDocumentEdit`
|
|
4286
4287
|
*/
|
|
4287
4288
|
function create(textDocument, edits) {
|
|
4288
|
-
return { textDocument
|
|
4289
|
+
return { textDocument, edits };
|
|
4289
4290
|
}
|
|
4290
4291
|
TextDocumentEdit.create = create;
|
|
4291
4292
|
function is(value) {
|
|
4292
|
-
|
|
4293
|
+
let candidate = value;
|
|
4293
4294
|
return Is.defined(candidate)
|
|
4294
4295
|
&& OptionalVersionedTextDocumentIdentifier.is(candidate.textDocument)
|
|
4295
4296
|
&& Array.isArray(candidate.edits);
|
|
@@ -4299,9 +4300,9 @@ var TextDocumentEdit;
|
|
|
4299
4300
|
var CreateFile;
|
|
4300
4301
|
(function (CreateFile) {
|
|
4301
4302
|
function create(uri, options, annotation) {
|
|
4302
|
-
|
|
4303
|
+
let result = {
|
|
4303
4304
|
kind: 'create',
|
|
4304
|
-
uri
|
|
4305
|
+
uri
|
|
4305
4306
|
};
|
|
4306
4307
|
if (options !== undefined && (options.overwrite !== undefined || options.ignoreIfExists !== undefined)) {
|
|
4307
4308
|
result.options = options;
|
|
@@ -4313,7 +4314,7 @@ var CreateFile;
|
|
|
4313
4314
|
}
|
|
4314
4315
|
CreateFile.create = create;
|
|
4315
4316
|
function is(value) {
|
|
4316
|
-
|
|
4317
|
+
let candidate = value;
|
|
4317
4318
|
return candidate && candidate.kind === 'create' && Is.string(candidate.uri) && (candidate.options === undefined ||
|
|
4318
4319
|
((candidate.options.overwrite === undefined || Is.boolean(candidate.options.overwrite)) && (candidate.options.ignoreIfExists === undefined || Is.boolean(candidate.options.ignoreIfExists)))) && (candidate.annotationId === undefined || ChangeAnnotationIdentifier.is(candidate.annotationId));
|
|
4319
4320
|
}
|
|
@@ -4322,10 +4323,10 @@ var CreateFile;
|
|
|
4322
4323
|
var RenameFile;
|
|
4323
4324
|
(function (RenameFile) {
|
|
4324
4325
|
function create(oldUri, newUri, options, annotation) {
|
|
4325
|
-
|
|
4326
|
+
let result = {
|
|
4326
4327
|
kind: 'rename',
|
|
4327
|
-
oldUri
|
|
4328
|
-
newUri
|
|
4328
|
+
oldUri,
|
|
4329
|
+
newUri
|
|
4329
4330
|
};
|
|
4330
4331
|
if (options !== undefined && (options.overwrite !== undefined || options.ignoreIfExists !== undefined)) {
|
|
4331
4332
|
result.options = options;
|
|
@@ -4337,7 +4338,7 @@ var RenameFile;
|
|
|
4337
4338
|
}
|
|
4338
4339
|
RenameFile.create = create;
|
|
4339
4340
|
function is(value) {
|
|
4340
|
-
|
|
4341
|
+
let candidate = value;
|
|
4341
4342
|
return candidate && candidate.kind === 'rename' && Is.string(candidate.oldUri) && Is.string(candidate.newUri) && (candidate.options === undefined ||
|
|
4342
4343
|
((candidate.options.overwrite === undefined || Is.boolean(candidate.options.overwrite)) && (candidate.options.ignoreIfExists === undefined || Is.boolean(candidate.options.ignoreIfExists)))) && (candidate.annotationId === undefined || ChangeAnnotationIdentifier.is(candidate.annotationId));
|
|
4343
4344
|
}
|
|
@@ -4346,9 +4347,9 @@ var RenameFile;
|
|
|
4346
4347
|
var DeleteFile;
|
|
4347
4348
|
(function (DeleteFile) {
|
|
4348
4349
|
function create(uri, options, annotation) {
|
|
4349
|
-
|
|
4350
|
+
let result = {
|
|
4350
4351
|
kind: 'delete',
|
|
4351
|
-
uri
|
|
4352
|
+
uri
|
|
4352
4353
|
};
|
|
4353
4354
|
if (options !== undefined && (options.recursive !== undefined || options.ignoreIfNotExists !== undefined)) {
|
|
4354
4355
|
result.options = options;
|
|
@@ -4360,7 +4361,7 @@ var DeleteFile;
|
|
|
4360
4361
|
}
|
|
4361
4362
|
DeleteFile.create = create;
|
|
4362
4363
|
function is(value) {
|
|
4363
|
-
|
|
4364
|
+
let candidate = value;
|
|
4364
4365
|
return candidate && candidate.kind === 'delete' && Is.string(candidate.uri) && (candidate.options === undefined ||
|
|
4365
4366
|
((candidate.options.recursive === undefined || Is.boolean(candidate.options.recursive)) && (candidate.options.ignoreIfNotExists === undefined || Is.boolean(candidate.options.ignoreIfNotExists)))) && (candidate.annotationId === undefined || ChangeAnnotationIdentifier.is(candidate.annotationId));
|
|
4366
4367
|
}
|
|
@@ -4369,10 +4370,10 @@ var DeleteFile;
|
|
|
4369
4370
|
var WorkspaceEdit;
|
|
4370
4371
|
(function (WorkspaceEdit) {
|
|
4371
4372
|
function is(value) {
|
|
4372
|
-
|
|
4373
|
+
let candidate = value;
|
|
4373
4374
|
return candidate &&
|
|
4374
4375
|
(candidate.changes !== undefined || candidate.documentChanges !== undefined) &&
|
|
4375
|
-
(candidate.documentChanges === undefined || candidate.documentChanges.every(
|
|
4376
|
+
(candidate.documentChanges === undefined || candidate.documentChanges.every((change) => {
|
|
4376
4377
|
if (Is.string(change.kind)) {
|
|
4377
4378
|
return CreateFile.is(change) || RenameFile.is(change) || DeleteFile.is(change);
|
|
4378
4379
|
}
|
|
@@ -4383,14 +4384,14 @@ var WorkspaceEdit;
|
|
|
4383
4384
|
}
|
|
4384
4385
|
WorkspaceEdit.is = is;
|
|
4385
4386
|
})(WorkspaceEdit || (WorkspaceEdit = {}));
|
|
4386
|
-
|
|
4387
|
-
|
|
4387
|
+
class TextEditChangeImpl {
|
|
4388
|
+
constructor(edits, changeAnnotations) {
|
|
4388
4389
|
this.edits = edits;
|
|
4389
4390
|
this.changeAnnotations = changeAnnotations;
|
|
4390
4391
|
}
|
|
4391
|
-
|
|
4392
|
-
|
|
4393
|
-
|
|
4392
|
+
insert(position, newText, annotation) {
|
|
4393
|
+
let edit;
|
|
4394
|
+
let id;
|
|
4394
4395
|
if (annotation === undefined) {
|
|
4395
4396
|
edit = TextEdit.insert(position, newText);
|
|
4396
4397
|
}
|
|
@@ -4407,10 +4408,10 @@ var TextEditChangeImpl = /** @class */ (function () {
|
|
|
4407
4408
|
if (id !== undefined) {
|
|
4408
4409
|
return id;
|
|
4409
4410
|
}
|
|
4410
|
-
}
|
|
4411
|
-
|
|
4412
|
-
|
|
4413
|
-
|
|
4411
|
+
}
|
|
4412
|
+
replace(range, newText, annotation) {
|
|
4413
|
+
let edit;
|
|
4414
|
+
let id;
|
|
4414
4415
|
if (annotation === undefined) {
|
|
4415
4416
|
edit = TextEdit.replace(range, newText);
|
|
4416
4417
|
}
|
|
@@ -4427,10 +4428,10 @@ var TextEditChangeImpl = /** @class */ (function () {
|
|
|
4427
4428
|
if (id !== undefined) {
|
|
4428
4429
|
return id;
|
|
4429
4430
|
}
|
|
4430
|
-
}
|
|
4431
|
-
|
|
4432
|
-
|
|
4433
|
-
|
|
4431
|
+
}
|
|
4432
|
+
delete(range, annotation) {
|
|
4433
|
+
let edit;
|
|
4434
|
+
let id;
|
|
4434
4435
|
if (annotation === undefined) {
|
|
4435
4436
|
edit = TextEdit.del(range);
|
|
4436
4437
|
}
|
|
@@ -4447,44 +4448,39 @@ var TextEditChangeImpl = /** @class */ (function () {
|
|
|
4447
4448
|
if (id !== undefined) {
|
|
4448
4449
|
return id;
|
|
4449
4450
|
}
|
|
4450
|
-
}
|
|
4451
|
-
|
|
4451
|
+
}
|
|
4452
|
+
add(edit) {
|
|
4452
4453
|
this.edits.push(edit);
|
|
4453
|
-
}
|
|
4454
|
-
|
|
4454
|
+
}
|
|
4455
|
+
all() {
|
|
4455
4456
|
return this.edits;
|
|
4456
|
-
}
|
|
4457
|
-
|
|
4457
|
+
}
|
|
4458
|
+
clear() {
|
|
4458
4459
|
this.edits.splice(0, this.edits.length);
|
|
4459
|
-
}
|
|
4460
|
-
|
|
4460
|
+
}
|
|
4461
|
+
assertChangeAnnotations(value) {
|
|
4461
4462
|
if (value === undefined) {
|
|
4462
|
-
throw new Error(
|
|
4463
|
+
throw new Error(`Text edit change is not configured to manage change annotations.`);
|
|
4463
4464
|
}
|
|
4464
|
-
}
|
|
4465
|
-
|
|
4466
|
-
}());
|
|
4465
|
+
}
|
|
4466
|
+
}
|
|
4467
4467
|
/**
|
|
4468
4468
|
* A helper class
|
|
4469
4469
|
*/
|
|
4470
|
-
|
|
4471
|
-
|
|
4470
|
+
class ChangeAnnotations {
|
|
4471
|
+
constructor(annotations) {
|
|
4472
4472
|
this._annotations = annotations === undefined ? Object.create(null) : annotations;
|
|
4473
4473
|
this._counter = 0;
|
|
4474
4474
|
this._size = 0;
|
|
4475
4475
|
}
|
|
4476
|
-
|
|
4476
|
+
all() {
|
|
4477
4477
|
return this._annotations;
|
|
4478
|
-
}
|
|
4479
|
-
|
|
4480
|
-
|
|
4481
|
-
|
|
4482
|
-
|
|
4483
|
-
|
|
4484
|
-
configurable: true
|
|
4485
|
-
});
|
|
4486
|
-
ChangeAnnotations.prototype.manage = function (idOrAnnotation, annotation) {
|
|
4487
|
-
var id;
|
|
4478
|
+
}
|
|
4479
|
+
get size() {
|
|
4480
|
+
return this._size;
|
|
4481
|
+
}
|
|
4482
|
+
manage(idOrAnnotation, annotation) {
|
|
4483
|
+
let id;
|
|
4488
4484
|
if (ChangeAnnotationIdentifier.is(idOrAnnotation)) {
|
|
4489
4485
|
id = idOrAnnotation;
|
|
4490
4486
|
}
|
|
@@ -4493,44 +4489,42 @@ var ChangeAnnotations = /** @class */ (function () {
|
|
|
4493
4489
|
annotation = idOrAnnotation;
|
|
4494
4490
|
}
|
|
4495
4491
|
if (this._annotations[id] !== undefined) {
|
|
4496
|
-
throw new Error(
|
|
4492
|
+
throw new Error(`Id ${id} is already in use.`);
|
|
4497
4493
|
}
|
|
4498
4494
|
if (annotation === undefined) {
|
|
4499
|
-
throw new Error(
|
|
4495
|
+
throw new Error(`No annotation provided for id ${id}`);
|
|
4500
4496
|
}
|
|
4501
4497
|
this._annotations[id] = annotation;
|
|
4502
4498
|
this._size++;
|
|
4503
4499
|
return id;
|
|
4504
|
-
}
|
|
4505
|
-
|
|
4500
|
+
}
|
|
4501
|
+
nextId() {
|
|
4506
4502
|
this._counter++;
|
|
4507
4503
|
return this._counter.toString();
|
|
4508
|
-
}
|
|
4509
|
-
|
|
4510
|
-
}());
|
|
4504
|
+
}
|
|
4505
|
+
}
|
|
4511
4506
|
/**
|
|
4512
4507
|
* A workspace change helps constructing changes to a workspace.
|
|
4513
4508
|
*/
|
|
4514
|
-
|
|
4515
|
-
|
|
4516
|
-
var _this = this;
|
|
4509
|
+
class WorkspaceChange {
|
|
4510
|
+
constructor(workspaceEdit) {
|
|
4517
4511
|
this._textEditChanges = Object.create(null);
|
|
4518
4512
|
if (workspaceEdit !== undefined) {
|
|
4519
4513
|
this._workspaceEdit = workspaceEdit;
|
|
4520
4514
|
if (workspaceEdit.documentChanges) {
|
|
4521
4515
|
this._changeAnnotations = new ChangeAnnotations(workspaceEdit.changeAnnotations);
|
|
4522
4516
|
workspaceEdit.changeAnnotations = this._changeAnnotations.all();
|
|
4523
|
-
workspaceEdit.documentChanges.forEach(
|
|
4517
|
+
workspaceEdit.documentChanges.forEach((change) => {
|
|
4524
4518
|
if (TextDocumentEdit.is(change)) {
|
|
4525
|
-
|
|
4526
|
-
|
|
4519
|
+
const textEditChange = new TextEditChangeImpl(change.edits, this._changeAnnotations);
|
|
4520
|
+
this._textEditChanges[change.textDocument.uri] = textEditChange;
|
|
4527
4521
|
}
|
|
4528
4522
|
});
|
|
4529
4523
|
}
|
|
4530
4524
|
else if (workspaceEdit.changes) {
|
|
4531
|
-
Object.keys(workspaceEdit.changes).forEach(
|
|
4532
|
-
|
|
4533
|
-
|
|
4525
|
+
Object.keys(workspaceEdit.changes).forEach((key) => {
|
|
4526
|
+
const textEditChange = new TextEditChangeImpl(workspaceEdit.changes[key]);
|
|
4527
|
+
this._textEditChanges[key] = textEditChange;
|
|
4534
4528
|
});
|
|
4535
4529
|
}
|
|
4536
4530
|
}
|
|
@@ -4538,39 +4532,35 @@ var WorkspaceChange = /** @class */ (function () {
|
|
|
4538
4532
|
this._workspaceEdit = {};
|
|
4539
4533
|
}
|
|
4540
4534
|
}
|
|
4541
|
-
|
|
4542
|
-
|
|
4543
|
-
|
|
4544
|
-
|
|
4545
|
-
|
|
4546
|
-
|
|
4547
|
-
|
|
4548
|
-
if (this._changeAnnotations
|
|
4549
|
-
|
|
4550
|
-
this._workspaceEdit.changeAnnotations = undefined;
|
|
4551
|
-
}
|
|
4552
|
-
else {
|
|
4553
|
-
this._workspaceEdit.changeAnnotations = this._changeAnnotations.all();
|
|
4554
|
-
}
|
|
4535
|
+
/**
|
|
4536
|
+
* Returns the underlying {@link WorkspaceEdit} literal
|
|
4537
|
+
* use to be returned from a workspace edit operation like rename.
|
|
4538
|
+
*/
|
|
4539
|
+
get edit() {
|
|
4540
|
+
this.initDocumentChanges();
|
|
4541
|
+
if (this._changeAnnotations !== undefined) {
|
|
4542
|
+
if (this._changeAnnotations.size === 0) {
|
|
4543
|
+
this._workspaceEdit.changeAnnotations = undefined;
|
|
4555
4544
|
}
|
|
4556
|
-
|
|
4557
|
-
|
|
4558
|
-
|
|
4559
|
-
|
|
4560
|
-
|
|
4561
|
-
|
|
4545
|
+
else {
|
|
4546
|
+
this._workspaceEdit.changeAnnotations = this._changeAnnotations.all();
|
|
4547
|
+
}
|
|
4548
|
+
}
|
|
4549
|
+
return this._workspaceEdit;
|
|
4550
|
+
}
|
|
4551
|
+
getTextEditChange(key) {
|
|
4562
4552
|
if (OptionalVersionedTextDocumentIdentifier.is(key)) {
|
|
4563
4553
|
this.initDocumentChanges();
|
|
4564
4554
|
if (this._workspaceEdit.documentChanges === undefined) {
|
|
4565
4555
|
throw new Error('Workspace edit is not configured for document changes.');
|
|
4566
4556
|
}
|
|
4567
|
-
|
|
4568
|
-
|
|
4557
|
+
const textDocument = { uri: key.uri, version: key.version };
|
|
4558
|
+
let result = this._textEditChanges[textDocument.uri];
|
|
4569
4559
|
if (!result) {
|
|
4570
|
-
|
|
4571
|
-
|
|
4572
|
-
textDocument
|
|
4573
|
-
edits
|
|
4560
|
+
const edits = [];
|
|
4561
|
+
const textDocumentEdit = {
|
|
4562
|
+
textDocument,
|
|
4563
|
+
edits
|
|
4574
4564
|
};
|
|
4575
4565
|
this._workspaceEdit.documentChanges.push(textDocumentEdit);
|
|
4576
4566
|
result = new TextEditChangeImpl(edits, this._changeAnnotations);
|
|
@@ -4583,42 +4573,42 @@ var WorkspaceChange = /** @class */ (function () {
|
|
|
4583
4573
|
if (this._workspaceEdit.changes === undefined) {
|
|
4584
4574
|
throw new Error('Workspace edit is not configured for normal text edit changes.');
|
|
4585
4575
|
}
|
|
4586
|
-
|
|
4576
|
+
let result = this._textEditChanges[key];
|
|
4587
4577
|
if (!result) {
|
|
4588
|
-
|
|
4578
|
+
let edits = [];
|
|
4589
4579
|
this._workspaceEdit.changes[key] = edits;
|
|
4590
4580
|
result = new TextEditChangeImpl(edits);
|
|
4591
4581
|
this._textEditChanges[key] = result;
|
|
4592
4582
|
}
|
|
4593
4583
|
return result;
|
|
4594
4584
|
}
|
|
4595
|
-
}
|
|
4596
|
-
|
|
4585
|
+
}
|
|
4586
|
+
initDocumentChanges() {
|
|
4597
4587
|
if (this._workspaceEdit.documentChanges === undefined && this._workspaceEdit.changes === undefined) {
|
|
4598
4588
|
this._changeAnnotations = new ChangeAnnotations();
|
|
4599
4589
|
this._workspaceEdit.documentChanges = [];
|
|
4600
4590
|
this._workspaceEdit.changeAnnotations = this._changeAnnotations.all();
|
|
4601
4591
|
}
|
|
4602
|
-
}
|
|
4603
|
-
|
|
4592
|
+
}
|
|
4593
|
+
initChanges() {
|
|
4604
4594
|
if (this._workspaceEdit.documentChanges === undefined && this._workspaceEdit.changes === undefined) {
|
|
4605
4595
|
this._workspaceEdit.changes = Object.create(null);
|
|
4606
4596
|
}
|
|
4607
|
-
}
|
|
4608
|
-
|
|
4597
|
+
}
|
|
4598
|
+
createFile(uri, optionsOrAnnotation, options) {
|
|
4609
4599
|
this.initDocumentChanges();
|
|
4610
4600
|
if (this._workspaceEdit.documentChanges === undefined) {
|
|
4611
4601
|
throw new Error('Workspace edit is not configured for document changes.');
|
|
4612
4602
|
}
|
|
4613
|
-
|
|
4603
|
+
let annotation;
|
|
4614
4604
|
if (ChangeAnnotation.is(optionsOrAnnotation) || ChangeAnnotationIdentifier.is(optionsOrAnnotation)) {
|
|
4615
4605
|
annotation = optionsOrAnnotation;
|
|
4616
4606
|
}
|
|
4617
4607
|
else {
|
|
4618
4608
|
options = optionsOrAnnotation;
|
|
4619
4609
|
}
|
|
4620
|
-
|
|
4621
|
-
|
|
4610
|
+
let operation;
|
|
4611
|
+
let id;
|
|
4622
4612
|
if (annotation === undefined) {
|
|
4623
4613
|
operation = CreateFile.create(uri, options);
|
|
4624
4614
|
}
|
|
@@ -4630,21 +4620,21 @@ var WorkspaceChange = /** @class */ (function () {
|
|
|
4630
4620
|
if (id !== undefined) {
|
|
4631
4621
|
return id;
|
|
4632
4622
|
}
|
|
4633
|
-
}
|
|
4634
|
-
|
|
4623
|
+
}
|
|
4624
|
+
renameFile(oldUri, newUri, optionsOrAnnotation, options) {
|
|
4635
4625
|
this.initDocumentChanges();
|
|
4636
4626
|
if (this._workspaceEdit.documentChanges === undefined) {
|
|
4637
4627
|
throw new Error('Workspace edit is not configured for document changes.');
|
|
4638
4628
|
}
|
|
4639
|
-
|
|
4629
|
+
let annotation;
|
|
4640
4630
|
if (ChangeAnnotation.is(optionsOrAnnotation) || ChangeAnnotationIdentifier.is(optionsOrAnnotation)) {
|
|
4641
4631
|
annotation = optionsOrAnnotation;
|
|
4642
4632
|
}
|
|
4643
4633
|
else {
|
|
4644
4634
|
options = optionsOrAnnotation;
|
|
4645
4635
|
}
|
|
4646
|
-
|
|
4647
|
-
|
|
4636
|
+
let operation;
|
|
4637
|
+
let id;
|
|
4648
4638
|
if (annotation === undefined) {
|
|
4649
4639
|
operation = RenameFile.create(oldUri, newUri, options);
|
|
4650
4640
|
}
|
|
@@ -4656,21 +4646,21 @@ var WorkspaceChange = /** @class */ (function () {
|
|
|
4656
4646
|
if (id !== undefined) {
|
|
4657
4647
|
return id;
|
|
4658
4648
|
}
|
|
4659
|
-
}
|
|
4660
|
-
|
|
4649
|
+
}
|
|
4650
|
+
deleteFile(uri, optionsOrAnnotation, options) {
|
|
4661
4651
|
this.initDocumentChanges();
|
|
4662
4652
|
if (this._workspaceEdit.documentChanges === undefined) {
|
|
4663
4653
|
throw new Error('Workspace edit is not configured for document changes.');
|
|
4664
4654
|
}
|
|
4665
|
-
|
|
4655
|
+
let annotation;
|
|
4666
4656
|
if (ChangeAnnotation.is(optionsOrAnnotation) || ChangeAnnotationIdentifier.is(optionsOrAnnotation)) {
|
|
4667
4657
|
annotation = optionsOrAnnotation;
|
|
4668
4658
|
}
|
|
4669
4659
|
else {
|
|
4670
4660
|
options = optionsOrAnnotation;
|
|
4671
4661
|
}
|
|
4672
|
-
|
|
4673
|
-
|
|
4662
|
+
let operation;
|
|
4663
|
+
let id;
|
|
4674
4664
|
if (annotation === undefined) {
|
|
4675
4665
|
operation = DeleteFile.create(uri, options);
|
|
4676
4666
|
}
|
|
@@ -4682,10 +4672,8 @@ var WorkspaceChange = /** @class */ (function () {
|
|
|
4682
4672
|
if (id !== undefined) {
|
|
4683
4673
|
return id;
|
|
4684
4674
|
}
|
|
4685
|
-
}
|
|
4686
|
-
|
|
4687
|
-
}());
|
|
4688
|
-
|
|
4675
|
+
}
|
|
4676
|
+
}
|
|
4689
4677
|
/**
|
|
4690
4678
|
* The TextDocumentIdentifier namespace provides helper functions to work with
|
|
4691
4679
|
* {@link TextDocumentIdentifier} literals.
|
|
@@ -4697,14 +4685,14 @@ var TextDocumentIdentifier;
|
|
|
4697
4685
|
* @param uri The document's uri.
|
|
4698
4686
|
*/
|
|
4699
4687
|
function create(uri) {
|
|
4700
|
-
return { uri
|
|
4688
|
+
return { uri };
|
|
4701
4689
|
}
|
|
4702
4690
|
TextDocumentIdentifier.create = create;
|
|
4703
4691
|
/**
|
|
4704
4692
|
* Checks whether the given literal conforms to the {@link TextDocumentIdentifier} interface.
|
|
4705
4693
|
*/
|
|
4706
4694
|
function is(value) {
|
|
4707
|
-
|
|
4695
|
+
let candidate = value;
|
|
4708
4696
|
return Is.defined(candidate) && Is.string(candidate.uri);
|
|
4709
4697
|
}
|
|
4710
4698
|
TextDocumentIdentifier.is = is;
|
|
@@ -4721,14 +4709,14 @@ var VersionedTextDocumentIdentifier;
|
|
|
4721
4709
|
* @param version The document's version.
|
|
4722
4710
|
*/
|
|
4723
4711
|
function create(uri, version) {
|
|
4724
|
-
return { uri
|
|
4712
|
+
return { uri, version };
|
|
4725
4713
|
}
|
|
4726
4714
|
VersionedTextDocumentIdentifier.create = create;
|
|
4727
4715
|
/**
|
|
4728
4716
|
* Checks whether the given literal conforms to the {@link VersionedTextDocumentIdentifier} interface.
|
|
4729
4717
|
*/
|
|
4730
4718
|
function is(value) {
|
|
4731
|
-
|
|
4719
|
+
let candidate = value;
|
|
4732
4720
|
return Is.defined(candidate) && Is.string(candidate.uri) && Is.integer(candidate.version);
|
|
4733
4721
|
}
|
|
4734
4722
|
VersionedTextDocumentIdentifier.is = is;
|
|
@@ -4745,14 +4733,14 @@ var OptionalVersionedTextDocumentIdentifier;
|
|
|
4745
4733
|
* @param version The document's version.
|
|
4746
4734
|
*/
|
|
4747
4735
|
function create(uri, version) {
|
|
4748
|
-
return { uri
|
|
4736
|
+
return { uri, version };
|
|
4749
4737
|
}
|
|
4750
4738
|
OptionalVersionedTextDocumentIdentifier.create = create;
|
|
4751
4739
|
/**
|
|
4752
4740
|
* Checks whether the given literal conforms to the {@link OptionalVersionedTextDocumentIdentifier} interface.
|
|
4753
4741
|
*/
|
|
4754
4742
|
function is(value) {
|
|
4755
|
-
|
|
4743
|
+
let candidate = value;
|
|
4756
4744
|
return Is.defined(candidate) && Is.string(candidate.uri) && (candidate.version === null || Is.integer(candidate.version));
|
|
4757
4745
|
}
|
|
4758
4746
|
OptionalVersionedTextDocumentIdentifier.is = is;
|
|
@@ -4771,14 +4759,14 @@ var TextDocumentItem;
|
|
|
4771
4759
|
* @param text The document's text.
|
|
4772
4760
|
*/
|
|
4773
4761
|
function create(uri, languageId, version, text) {
|
|
4774
|
-
return { uri
|
|
4762
|
+
return { uri, languageId, version, text };
|
|
4775
4763
|
}
|
|
4776
4764
|
TextDocumentItem.create = create;
|
|
4777
4765
|
/**
|
|
4778
4766
|
* Checks whether the given literal conforms to the {@link TextDocumentItem} interface.
|
|
4779
4767
|
*/
|
|
4780
4768
|
function is(value) {
|
|
4781
|
-
|
|
4769
|
+
let candidate = value;
|
|
4782
4770
|
return Is.defined(candidate) && Is.string(candidate.uri) && Is.string(candidate.languageId) && Is.integer(candidate.version) && Is.string(candidate.text);
|
|
4783
4771
|
}
|
|
4784
4772
|
TextDocumentItem.is = is;
|
|
@@ -4804,7 +4792,7 @@ var MarkupKind;
|
|
|
4804
4792
|
* Checks whether the given value is a value of the {@link MarkupKind} type.
|
|
4805
4793
|
*/
|
|
4806
4794
|
function is(value) {
|
|
4807
|
-
|
|
4795
|
+
const candidate = value;
|
|
4808
4796
|
return candidate === MarkupKind.PlainText || candidate === MarkupKind.Markdown;
|
|
4809
4797
|
}
|
|
4810
4798
|
MarkupKind.is = is;
|
|
@@ -4815,7 +4803,7 @@ var MarkupContent;
|
|
|
4815
4803
|
* Checks whether the given value conforms to the {@link MarkupContent} interface.
|
|
4816
4804
|
*/
|
|
4817
4805
|
function is(value) {
|
|
4818
|
-
|
|
4806
|
+
const candidate = value;
|
|
4819
4807
|
return Is.objectLiteral(value) && MarkupKind.is(candidate.kind) && Is.string(candidate.value);
|
|
4820
4808
|
}
|
|
4821
4809
|
MarkupContent.is = is;
|
|
@@ -4897,14 +4885,14 @@ var InsertReplaceEdit;
|
|
|
4897
4885
|
* Creates a new insert / replace edit
|
|
4898
4886
|
*/
|
|
4899
4887
|
function create(newText, insert, replace) {
|
|
4900
|
-
return { newText
|
|
4888
|
+
return { newText, insert, replace };
|
|
4901
4889
|
}
|
|
4902
4890
|
InsertReplaceEdit.create = create;
|
|
4903
4891
|
/**
|
|
4904
4892
|
* Checks whether the given literal conforms to the {@link InsertReplaceEdit} interface.
|
|
4905
4893
|
*/
|
|
4906
4894
|
function is(value) {
|
|
4907
|
-
|
|
4895
|
+
const candidate = value;
|
|
4908
4896
|
return candidate && Is.string(candidate.newText) && Range.is(candidate.insert) && Range.is(candidate.replace);
|
|
4909
4897
|
}
|
|
4910
4898
|
InsertReplaceEdit.is = is;
|
|
@@ -4939,7 +4927,7 @@ var InsertTextMode;
|
|
|
4939
4927
|
var CompletionItemLabelDetails;
|
|
4940
4928
|
(function (CompletionItemLabelDetails) {
|
|
4941
4929
|
function is(value) {
|
|
4942
|
-
|
|
4930
|
+
const candidate = value;
|
|
4943
4931
|
return candidate && (Is.string(candidate.detail) || candidate.detail === undefined) &&
|
|
4944
4932
|
(Is.string(candidate.description) || candidate.description === undefined);
|
|
4945
4933
|
}
|
|
@@ -4956,7 +4944,7 @@ var CompletionItem;
|
|
|
4956
4944
|
* @param label The completion item's label
|
|
4957
4945
|
*/
|
|
4958
4946
|
function create(label) {
|
|
4959
|
-
return { label
|
|
4947
|
+
return { label };
|
|
4960
4948
|
}
|
|
4961
4949
|
CompletionItem.create = create;
|
|
4962
4950
|
})(CompletionItem || (CompletionItem = {}));
|
|
@@ -4992,7 +4980,7 @@ var MarkedString;
|
|
|
4992
4980
|
* Checks whether the given value conforms to the {@link MarkedString} type.
|
|
4993
4981
|
*/
|
|
4994
4982
|
function is(value) {
|
|
4995
|
-
|
|
4983
|
+
const candidate = value;
|
|
4996
4984
|
return Is.string(candidate) || (Is.objectLiteral(candidate) && Is.string(candidate.language) && Is.string(candidate.value));
|
|
4997
4985
|
}
|
|
4998
4986
|
MarkedString.is = is;
|
|
@@ -5003,7 +4991,7 @@ var Hover;
|
|
|
5003
4991
|
* Checks whether the given value conforms to the {@link Hover} interface.
|
|
5004
4992
|
*/
|
|
5005
4993
|
function is(value) {
|
|
5006
|
-
|
|
4994
|
+
let candidate = value;
|
|
5007
4995
|
return !!candidate && Is.objectLiteral(candidate) && (MarkupContent.is(candidate.contents) ||
|
|
5008
4996
|
MarkedString.is(candidate.contents) ||
|
|
5009
4997
|
Is.typedArray(candidate.contents, MarkedString.is)) && (value.range === undefined || Range.is(value.range));
|
|
@@ -5023,7 +5011,7 @@ var ParameterInformation;
|
|
|
5023
5011
|
* @param documentation A doc string.
|
|
5024
5012
|
*/
|
|
5025
5013
|
function create(label, documentation) {
|
|
5026
|
-
return documentation ? { label
|
|
5014
|
+
return documentation ? { label, documentation } : { label };
|
|
5027
5015
|
}
|
|
5028
5016
|
ParameterInformation.create = create;
|
|
5029
5017
|
})(ParameterInformation || (ParameterInformation = {}));
|
|
@@ -5033,12 +5021,8 @@ var ParameterInformation;
|
|
|
5033
5021
|
*/
|
|
5034
5022
|
var SignatureInformation;
|
|
5035
5023
|
(function (SignatureInformation) {
|
|
5036
|
-
function create(label, documentation) {
|
|
5037
|
-
|
|
5038
|
-
for (var _i = 2; _i < arguments.length; _i++) {
|
|
5039
|
-
parameters[_i - 2] = arguments[_i];
|
|
5040
|
-
}
|
|
5041
|
-
var result = { label: label };
|
|
5024
|
+
function create(label, documentation, ...parameters) {
|
|
5025
|
+
let result = { label };
|
|
5042
5026
|
if (Is.defined(documentation)) {
|
|
5043
5027
|
result.documentation = documentation;
|
|
5044
5028
|
}
|
|
@@ -5082,7 +5066,7 @@ var DocumentHighlight;
|
|
|
5082
5066
|
* @param kind The highlight kind
|
|
5083
5067
|
*/
|
|
5084
5068
|
function create(range, kind) {
|
|
5085
|
-
|
|
5069
|
+
let result = { range };
|
|
5086
5070
|
if (Is.number(kind)) {
|
|
5087
5071
|
result.kind = kind;
|
|
5088
5072
|
}
|
|
@@ -5146,10 +5130,10 @@ var SymbolInformation;
|
|
|
5146
5130
|
* @param containerName The name of the symbol containing the symbol.
|
|
5147
5131
|
*/
|
|
5148
5132
|
function create(name, kind, range, uri, containerName) {
|
|
5149
|
-
|
|
5150
|
-
name
|
|
5151
|
-
kind
|
|
5152
|
-
location: { uri
|
|
5133
|
+
let result = {
|
|
5134
|
+
name,
|
|
5135
|
+
kind,
|
|
5136
|
+
location: { uri, range }
|
|
5153
5137
|
};
|
|
5154
5138
|
if (containerName) {
|
|
5155
5139
|
result.containerName = containerName;
|
|
@@ -5171,8 +5155,8 @@ var WorkspaceSymbol;
|
|
|
5171
5155
|
*/
|
|
5172
5156
|
function create(name, kind, uri, range) {
|
|
5173
5157
|
return range !== undefined
|
|
5174
|
-
? { name
|
|
5175
|
-
: { name
|
|
5158
|
+
? { name, kind, location: { uri, range } }
|
|
5159
|
+
: { name, kind, location: { uri } };
|
|
5176
5160
|
}
|
|
5177
5161
|
WorkspaceSymbol.create = create;
|
|
5178
5162
|
})(WorkspaceSymbol || (WorkspaceSymbol = {}));
|
|
@@ -5189,12 +5173,12 @@ var DocumentSymbol;
|
|
|
5189
5173
|
* @param children Children of the symbol.
|
|
5190
5174
|
*/
|
|
5191
5175
|
function create(name, detail, kind, range, selectionRange, children) {
|
|
5192
|
-
|
|
5193
|
-
name
|
|
5194
|
-
detail
|
|
5195
|
-
kind
|
|
5196
|
-
range
|
|
5197
|
-
selectionRange
|
|
5176
|
+
let result = {
|
|
5177
|
+
name,
|
|
5178
|
+
detail,
|
|
5179
|
+
kind,
|
|
5180
|
+
range,
|
|
5181
|
+
selectionRange
|
|
5198
5182
|
};
|
|
5199
5183
|
if (children !== undefined) {
|
|
5200
5184
|
result.children = children;
|
|
@@ -5206,7 +5190,7 @@ var DocumentSymbol;
|
|
|
5206
5190
|
* Checks whether the given literal conforms to the {@link DocumentSymbol} interface.
|
|
5207
5191
|
*/
|
|
5208
5192
|
function is(value) {
|
|
5209
|
-
|
|
5193
|
+
let candidate = value;
|
|
5210
5194
|
return candidate &&
|
|
5211
5195
|
Is.string(candidate.name) && Is.number(candidate.kind) &&
|
|
5212
5196
|
Range.is(candidate.range) && Range.is(candidate.selectionRange) &&
|
|
@@ -5319,7 +5303,7 @@ var CodeActionContext;
|
|
|
5319
5303
|
* Creates a new CodeActionContext literal.
|
|
5320
5304
|
*/
|
|
5321
5305
|
function create(diagnostics, only, triggerKind) {
|
|
5322
|
-
|
|
5306
|
+
let result = { diagnostics };
|
|
5323
5307
|
if (only !== undefined && only !== null) {
|
|
5324
5308
|
result.only = only;
|
|
5325
5309
|
}
|
|
@@ -5333,7 +5317,7 @@ var CodeActionContext;
|
|
|
5333
5317
|
* Checks whether the given literal conforms to the {@link CodeActionContext} interface.
|
|
5334
5318
|
*/
|
|
5335
5319
|
function is(value) {
|
|
5336
|
-
|
|
5320
|
+
let candidate = value;
|
|
5337
5321
|
return Is.defined(candidate) && Is.typedArray(candidate.diagnostics, Diagnostic.is)
|
|
5338
5322
|
&& (candidate.only === undefined || Is.typedArray(candidate.only, Is.string))
|
|
5339
5323
|
&& (candidate.triggerKind === undefined || candidate.triggerKind === CodeActionTriggerKind.Invoked || candidate.triggerKind === CodeActionTriggerKind.Automatic);
|
|
@@ -5343,8 +5327,8 @@ var CodeActionContext;
|
|
|
5343
5327
|
var CodeAction;
|
|
5344
5328
|
(function (CodeAction) {
|
|
5345
5329
|
function create(title, kindOrCommandOrEdit, kind) {
|
|
5346
|
-
|
|
5347
|
-
|
|
5330
|
+
let result = { title };
|
|
5331
|
+
let checkKind = true;
|
|
5348
5332
|
if (typeof kindOrCommandOrEdit === 'string') {
|
|
5349
5333
|
checkKind = false;
|
|
5350
5334
|
result.kind = kindOrCommandOrEdit;
|
|
@@ -5362,7 +5346,7 @@ var CodeAction;
|
|
|
5362
5346
|
}
|
|
5363
5347
|
CodeAction.create = create;
|
|
5364
5348
|
function is(value) {
|
|
5365
|
-
|
|
5349
|
+
let candidate = value;
|
|
5366
5350
|
return candidate && Is.string(candidate.title) &&
|
|
5367
5351
|
(candidate.diagnostics === undefined || Is.typedArray(candidate.diagnostics, Diagnostic.is)) &&
|
|
5368
5352
|
(candidate.kind === undefined || Is.string(candidate.kind)) &&
|
|
@@ -5383,7 +5367,7 @@ var CodeLens;
|
|
|
5383
5367
|
* Creates a new CodeLens literal.
|
|
5384
5368
|
*/
|
|
5385
5369
|
function create(range, data) {
|
|
5386
|
-
|
|
5370
|
+
let result = { range };
|
|
5387
5371
|
if (Is.defined(data)) {
|
|
5388
5372
|
result.data = data;
|
|
5389
5373
|
}
|
|
@@ -5394,7 +5378,7 @@ var CodeLens;
|
|
|
5394
5378
|
* Checks whether the given literal conforms to the {@link CodeLens} interface.
|
|
5395
5379
|
*/
|
|
5396
5380
|
function is(value) {
|
|
5397
|
-
|
|
5381
|
+
let candidate = value;
|
|
5398
5382
|
return Is.defined(candidate) && Range.is(candidate.range) && (Is.undefined(candidate.command) || Command.is(candidate.command));
|
|
5399
5383
|
}
|
|
5400
5384
|
CodeLens.is = is;
|
|
@@ -5409,14 +5393,14 @@ var FormattingOptions;
|
|
|
5409
5393
|
* Creates a new FormattingOptions literal.
|
|
5410
5394
|
*/
|
|
5411
5395
|
function create(tabSize, insertSpaces) {
|
|
5412
|
-
return { tabSize
|
|
5396
|
+
return { tabSize, insertSpaces };
|
|
5413
5397
|
}
|
|
5414
5398
|
FormattingOptions.create = create;
|
|
5415
5399
|
/**
|
|
5416
5400
|
* Checks whether the given literal conforms to the {@link FormattingOptions} interface.
|
|
5417
5401
|
*/
|
|
5418
5402
|
function is(value) {
|
|
5419
|
-
|
|
5403
|
+
let candidate = value;
|
|
5420
5404
|
return Is.defined(candidate) && Is.uinteger(candidate.tabSize) && Is.boolean(candidate.insertSpaces);
|
|
5421
5405
|
}
|
|
5422
5406
|
FormattingOptions.is = is;
|
|
@@ -5431,14 +5415,14 @@ var DocumentLink;
|
|
|
5431
5415
|
* Creates a new DocumentLink literal.
|
|
5432
5416
|
*/
|
|
5433
5417
|
function create(range, target, data) {
|
|
5434
|
-
return { range
|
|
5418
|
+
return { range, target, data };
|
|
5435
5419
|
}
|
|
5436
5420
|
DocumentLink.create = create;
|
|
5437
5421
|
/**
|
|
5438
5422
|
* Checks whether the given literal conforms to the {@link DocumentLink} interface.
|
|
5439
5423
|
*/
|
|
5440
5424
|
function is(value) {
|
|
5441
|
-
|
|
5425
|
+
let candidate = value;
|
|
5442
5426
|
return Is.defined(candidate) && Range.is(candidate.range) && (Is.undefined(candidate.target) || Is.string(candidate.target));
|
|
5443
5427
|
}
|
|
5444
5428
|
DocumentLink.is = is;
|
|
@@ -5455,11 +5439,11 @@ var SelectionRange;
|
|
|
5455
5439
|
* @param parent an optional parent.
|
|
5456
5440
|
*/
|
|
5457
5441
|
function create(range, parent) {
|
|
5458
|
-
return { range
|
|
5442
|
+
return { range, parent };
|
|
5459
5443
|
}
|
|
5460
5444
|
SelectionRange.create = create;
|
|
5461
5445
|
function is(value) {
|
|
5462
|
-
|
|
5446
|
+
let candidate = value;
|
|
5463
5447
|
return Is.objectLiteral(candidate) && Range.is(candidate.range) && (candidate.parent === undefined || SelectionRange.is(candidate.parent));
|
|
5464
5448
|
}
|
|
5465
5449
|
SelectionRange.is = is;
|
|
@@ -5530,7 +5514,7 @@ var SemanticTokenModifiers;
|
|
|
5530
5514
|
var SemanticTokens;
|
|
5531
5515
|
(function (SemanticTokens) {
|
|
5532
5516
|
function is(value) {
|
|
5533
|
-
|
|
5517
|
+
const candidate = value;
|
|
5534
5518
|
return Is.objectLiteral(candidate) && (candidate.resultId === undefined || typeof candidate.resultId === 'string') &&
|
|
5535
5519
|
Array.isArray(candidate.data) && (candidate.data.length === 0 || typeof candidate.data[0] === 'number');
|
|
5536
5520
|
}
|
|
@@ -5547,11 +5531,11 @@ var InlineValueText;
|
|
|
5547
5531
|
* Creates a new InlineValueText literal.
|
|
5548
5532
|
*/
|
|
5549
5533
|
function create(range, text) {
|
|
5550
|
-
return { range
|
|
5534
|
+
return { range, text };
|
|
5551
5535
|
}
|
|
5552
5536
|
InlineValueText.create = create;
|
|
5553
5537
|
function is(value) {
|
|
5554
|
-
|
|
5538
|
+
const candidate = value;
|
|
5555
5539
|
return candidate !== undefined && candidate !== null && Range.is(candidate.range) && Is.string(candidate.text);
|
|
5556
5540
|
}
|
|
5557
5541
|
InlineValueText.is = is;
|
|
@@ -5567,11 +5551,11 @@ var InlineValueVariableLookup;
|
|
|
5567
5551
|
* Creates a new InlineValueText literal.
|
|
5568
5552
|
*/
|
|
5569
5553
|
function create(range, variableName, caseSensitiveLookup) {
|
|
5570
|
-
return { range
|
|
5554
|
+
return { range, variableName, caseSensitiveLookup };
|
|
5571
5555
|
}
|
|
5572
5556
|
InlineValueVariableLookup.create = create;
|
|
5573
5557
|
function is(value) {
|
|
5574
|
-
|
|
5558
|
+
const candidate = value;
|
|
5575
5559
|
return candidate !== undefined && candidate !== null && Range.is(candidate.range) && Is.boolean(candidate.caseSensitiveLookup)
|
|
5576
5560
|
&& (Is.string(candidate.variableName) || candidate.variableName === undefined);
|
|
5577
5561
|
}
|
|
@@ -5588,11 +5572,11 @@ var InlineValueEvaluatableExpression;
|
|
|
5588
5572
|
* Creates a new InlineValueEvaluatableExpression literal.
|
|
5589
5573
|
*/
|
|
5590
5574
|
function create(range, expression) {
|
|
5591
|
-
return { range
|
|
5575
|
+
return { range, expression };
|
|
5592
5576
|
}
|
|
5593
5577
|
InlineValueEvaluatableExpression.create = create;
|
|
5594
5578
|
function is(value) {
|
|
5595
|
-
|
|
5579
|
+
const candidate = value;
|
|
5596
5580
|
return candidate !== undefined && candidate !== null && Range.is(candidate.range)
|
|
5597
5581
|
&& (Is.string(candidate.expression) || candidate.expression === undefined);
|
|
5598
5582
|
}
|
|
@@ -5610,14 +5594,14 @@ var InlineValueContext;
|
|
|
5610
5594
|
* Creates a new InlineValueContext literal.
|
|
5611
5595
|
*/
|
|
5612
5596
|
function create(frameId, stoppedLocation) {
|
|
5613
|
-
return { frameId
|
|
5597
|
+
return { frameId, stoppedLocation };
|
|
5614
5598
|
}
|
|
5615
5599
|
InlineValueContext.create = create;
|
|
5616
5600
|
/**
|
|
5617
5601
|
* Checks whether the given literal conforms to the {@link InlineValueContext} interface.
|
|
5618
5602
|
*/
|
|
5619
5603
|
function is(value) {
|
|
5620
|
-
|
|
5604
|
+
const candidate = value;
|
|
5621
5605
|
return Is.defined(candidate) && Range.is(value.stoppedLocation);
|
|
5622
5606
|
}
|
|
5623
5607
|
InlineValueContext.is = is;
|
|
@@ -5645,11 +5629,11 @@ var InlayHintKind;
|
|
|
5645
5629
|
var InlayHintLabelPart;
|
|
5646
5630
|
(function (InlayHintLabelPart) {
|
|
5647
5631
|
function create(value) {
|
|
5648
|
-
return { value
|
|
5632
|
+
return { value };
|
|
5649
5633
|
}
|
|
5650
5634
|
InlayHintLabelPart.create = create;
|
|
5651
5635
|
function is(value) {
|
|
5652
|
-
|
|
5636
|
+
const candidate = value;
|
|
5653
5637
|
return Is.objectLiteral(candidate)
|
|
5654
5638
|
&& (candidate.tooltip === undefined || Is.string(candidate.tooltip) || MarkupContent.is(candidate.tooltip))
|
|
5655
5639
|
&& (candidate.location === undefined || Location.is(candidate.location))
|
|
@@ -5660,7 +5644,7 @@ var InlayHintLabelPart;
|
|
|
5660
5644
|
var InlayHint;
|
|
5661
5645
|
(function (InlayHint) {
|
|
5662
5646
|
function create(position, label, kind) {
|
|
5663
|
-
|
|
5647
|
+
const result = { position, label };
|
|
5664
5648
|
if (kind !== undefined) {
|
|
5665
5649
|
result.kind = kind;
|
|
5666
5650
|
}
|
|
@@ -5668,7 +5652,7 @@ var InlayHint;
|
|
|
5668
5652
|
}
|
|
5669
5653
|
InlayHint.create = create;
|
|
5670
5654
|
function is(value) {
|
|
5671
|
-
|
|
5655
|
+
const candidate = value;
|
|
5672
5656
|
return Is.objectLiteral(candidate) && Position.is(candidate.position)
|
|
5673
5657
|
&& (Is.string(candidate.label) || Is.typedArray(candidate.label, InlayHintLabelPart.is))
|
|
5674
5658
|
&& (candidate.kind === undefined || InlayHintKind.is(candidate.kind))
|
|
@@ -5682,21 +5666,21 @@ var InlayHint;
|
|
|
5682
5666
|
var StringValue;
|
|
5683
5667
|
(function (StringValue) {
|
|
5684
5668
|
function createSnippet(value) {
|
|
5685
|
-
return { kind: 'snippet', value
|
|
5669
|
+
return { kind: 'snippet', value };
|
|
5686
5670
|
}
|
|
5687
5671
|
StringValue.createSnippet = createSnippet;
|
|
5688
5672
|
})(StringValue || (StringValue = {}));
|
|
5689
5673
|
var InlineCompletionItem;
|
|
5690
5674
|
(function (InlineCompletionItem) {
|
|
5691
5675
|
function create(insertText, filterText, range, command) {
|
|
5692
|
-
return { insertText
|
|
5676
|
+
return { insertText, filterText, range, command };
|
|
5693
5677
|
}
|
|
5694
5678
|
InlineCompletionItem.create = create;
|
|
5695
5679
|
})(InlineCompletionItem || (InlineCompletionItem = {}));
|
|
5696
5680
|
var InlineCompletionList;
|
|
5697
5681
|
(function (InlineCompletionList) {
|
|
5698
5682
|
function create(items) {
|
|
5699
|
-
return { items
|
|
5683
|
+
return { items };
|
|
5700
5684
|
}
|
|
5701
5685
|
InlineCompletionList.create = create;
|
|
5702
5686
|
})(InlineCompletionList || (InlineCompletionList = {}));
|
|
@@ -5720,26 +5704,26 @@ var InlineCompletionTriggerKind;
|
|
|
5720
5704
|
var SelectedCompletionInfo;
|
|
5721
5705
|
(function (SelectedCompletionInfo) {
|
|
5722
5706
|
function create(range, text) {
|
|
5723
|
-
return { range
|
|
5707
|
+
return { range, text };
|
|
5724
5708
|
}
|
|
5725
5709
|
SelectedCompletionInfo.create = create;
|
|
5726
5710
|
})(SelectedCompletionInfo || (SelectedCompletionInfo = {}));
|
|
5727
5711
|
var InlineCompletionContext;
|
|
5728
5712
|
(function (InlineCompletionContext) {
|
|
5729
5713
|
function create(triggerKind, selectedCompletionInfo) {
|
|
5730
|
-
return { triggerKind
|
|
5714
|
+
return { triggerKind, selectedCompletionInfo };
|
|
5731
5715
|
}
|
|
5732
5716
|
InlineCompletionContext.create = create;
|
|
5733
5717
|
})(InlineCompletionContext || (InlineCompletionContext = {}));
|
|
5734
5718
|
var WorkspaceFolder;
|
|
5735
5719
|
(function (WorkspaceFolder) {
|
|
5736
5720
|
function is(value) {
|
|
5737
|
-
|
|
5721
|
+
const candidate = value;
|
|
5738
5722
|
return Is.objectLiteral(candidate) && URI.is(candidate.uri) && Is.string(candidate.name);
|
|
5739
5723
|
}
|
|
5740
5724
|
WorkspaceFolder.is = is;
|
|
5741
5725
|
})(WorkspaceFolder || (WorkspaceFolder = {}));
|
|
5742
|
-
|
|
5726
|
+
const EOL = ['\n', '\r\n', '\r'];
|
|
5743
5727
|
/**
|
|
5744
5728
|
* @deprecated Use the text document from the new vscode-languageserver-textdocument package.
|
|
5745
5729
|
*/
|
|
@@ -5760,25 +5744,25 @@ var TextDocument;
|
|
|
5760
5744
|
* Checks whether the given literal conforms to the {@link ITextDocument} interface.
|
|
5761
5745
|
*/
|
|
5762
5746
|
function is(value) {
|
|
5763
|
-
|
|
5747
|
+
let candidate = value;
|
|
5764
5748
|
return Is.defined(candidate) && Is.string(candidate.uri) && (Is.undefined(candidate.languageId) || Is.string(candidate.languageId)) && Is.uinteger(candidate.lineCount)
|
|
5765
5749
|
&& Is.func(candidate.getText) && Is.func(candidate.positionAt) && Is.func(candidate.offsetAt) ? true : false;
|
|
5766
5750
|
}
|
|
5767
5751
|
TextDocument.is = is;
|
|
5768
5752
|
function applyEdits(document, edits) {
|
|
5769
|
-
|
|
5770
|
-
|
|
5771
|
-
|
|
5753
|
+
let text = document.getText();
|
|
5754
|
+
let sortedEdits = mergeSort(edits, (a, b) => {
|
|
5755
|
+
let diff = a.range.start.line - b.range.start.line;
|
|
5772
5756
|
if (diff === 0) {
|
|
5773
5757
|
return a.range.start.character - b.range.start.character;
|
|
5774
5758
|
}
|
|
5775
5759
|
return diff;
|
|
5776
5760
|
});
|
|
5777
|
-
|
|
5778
|
-
for (
|
|
5779
|
-
|
|
5780
|
-
|
|
5781
|
-
|
|
5761
|
+
let lastModifiedOffset = text.length;
|
|
5762
|
+
for (let i = sortedEdits.length - 1; i >= 0; i--) {
|
|
5763
|
+
let e = sortedEdits[i];
|
|
5764
|
+
let startOffset = document.offsetAt(e.range.start);
|
|
5765
|
+
let endOffset = document.offsetAt(e.range.end);
|
|
5782
5766
|
if (endOffset <= lastModifiedOffset) {
|
|
5783
5767
|
text = text.substring(0, startOffset) + e.newText + text.substring(endOffset, text.length);
|
|
5784
5768
|
}
|
|
@@ -5795,16 +5779,16 @@ var TextDocument;
|
|
|
5795
5779
|
// sorted
|
|
5796
5780
|
return data;
|
|
5797
5781
|
}
|
|
5798
|
-
|
|
5799
|
-
|
|
5800
|
-
|
|
5782
|
+
const p = (data.length / 2) | 0;
|
|
5783
|
+
const left = data.slice(0, p);
|
|
5784
|
+
const right = data.slice(p);
|
|
5801
5785
|
mergeSort(left, compare);
|
|
5802
5786
|
mergeSort(right, compare);
|
|
5803
|
-
|
|
5804
|
-
|
|
5805
|
-
|
|
5787
|
+
let leftIdx = 0;
|
|
5788
|
+
let rightIdx = 0;
|
|
5789
|
+
let i = 0;
|
|
5806
5790
|
while (leftIdx < left.length && rightIdx < right.length) {
|
|
5807
|
-
|
|
5791
|
+
let ret = compare(left[leftIdx], right[rightIdx]);
|
|
5808
5792
|
if (ret <= 0) {
|
|
5809
5793
|
// smaller_equal -> take left to preserve order
|
|
5810
5794
|
data[i++] = left[leftIdx++];
|
|
@@ -5826,59 +5810,47 @@ var TextDocument;
|
|
|
5826
5810
|
/**
|
|
5827
5811
|
* @deprecated Use the text document from the new vscode-languageserver-textdocument package.
|
|
5828
5812
|
*/
|
|
5829
|
-
|
|
5830
|
-
|
|
5813
|
+
class FullTextDocument {
|
|
5814
|
+
constructor(uri, languageId, version, content) {
|
|
5831
5815
|
this._uri = uri;
|
|
5832
5816
|
this._languageId = languageId;
|
|
5833
5817
|
this._version = version;
|
|
5834
5818
|
this._content = content;
|
|
5835
5819
|
this._lineOffsets = undefined;
|
|
5836
5820
|
}
|
|
5837
|
-
|
|
5838
|
-
|
|
5839
|
-
|
|
5840
|
-
|
|
5841
|
-
|
|
5842
|
-
|
|
5843
|
-
|
|
5844
|
-
|
|
5845
|
-
|
|
5846
|
-
|
|
5847
|
-
},
|
|
5848
|
-
enumerable: false,
|
|
5849
|
-
configurable: true
|
|
5850
|
-
});
|
|
5851
|
-
Object.defineProperty(FullTextDocument.prototype, "version", {
|
|
5852
|
-
get: function () {
|
|
5853
|
-
return this._version;
|
|
5854
|
-
},
|
|
5855
|
-
enumerable: false,
|
|
5856
|
-
configurable: true
|
|
5857
|
-
});
|
|
5858
|
-
FullTextDocument.prototype.getText = function (range) {
|
|
5821
|
+
get uri() {
|
|
5822
|
+
return this._uri;
|
|
5823
|
+
}
|
|
5824
|
+
get languageId() {
|
|
5825
|
+
return this._languageId;
|
|
5826
|
+
}
|
|
5827
|
+
get version() {
|
|
5828
|
+
return this._version;
|
|
5829
|
+
}
|
|
5830
|
+
getText(range) {
|
|
5859
5831
|
if (range) {
|
|
5860
|
-
|
|
5861
|
-
|
|
5832
|
+
let start = this.offsetAt(range.start);
|
|
5833
|
+
let end = this.offsetAt(range.end);
|
|
5862
5834
|
return this._content.substring(start, end);
|
|
5863
5835
|
}
|
|
5864
5836
|
return this._content;
|
|
5865
|
-
}
|
|
5866
|
-
|
|
5837
|
+
}
|
|
5838
|
+
update(event, version) {
|
|
5867
5839
|
this._content = event.text;
|
|
5868
5840
|
this._version = version;
|
|
5869
5841
|
this._lineOffsets = undefined;
|
|
5870
|
-
}
|
|
5871
|
-
|
|
5842
|
+
}
|
|
5843
|
+
getLineOffsets() {
|
|
5872
5844
|
if (this._lineOffsets === undefined) {
|
|
5873
|
-
|
|
5874
|
-
|
|
5875
|
-
|
|
5876
|
-
for (
|
|
5845
|
+
let lineOffsets = [];
|
|
5846
|
+
let text = this._content;
|
|
5847
|
+
let isLineStart = true;
|
|
5848
|
+
for (let i = 0; i < text.length; i++) {
|
|
5877
5849
|
if (isLineStart) {
|
|
5878
5850
|
lineOffsets.push(i);
|
|
5879
5851
|
isLineStart = false;
|
|
5880
5852
|
}
|
|
5881
|
-
|
|
5853
|
+
let ch = text.charAt(i);
|
|
5882
5854
|
isLineStart = (ch === '\r' || ch === '\n');
|
|
5883
5855
|
if (ch === '\r' && i + 1 < text.length && text.charAt(i + 1) === '\n') {
|
|
5884
5856
|
i++;
|
|
@@ -5890,16 +5862,16 @@ var FullTextDocument = /** @class */ (function () {
|
|
|
5890
5862
|
this._lineOffsets = lineOffsets;
|
|
5891
5863
|
}
|
|
5892
5864
|
return this._lineOffsets;
|
|
5893
|
-
}
|
|
5894
|
-
|
|
5865
|
+
}
|
|
5866
|
+
positionAt(offset) {
|
|
5895
5867
|
offset = Math.max(Math.min(offset, this._content.length), 0);
|
|
5896
|
-
|
|
5897
|
-
|
|
5868
|
+
let lineOffsets = this.getLineOffsets();
|
|
5869
|
+
let low = 0, high = lineOffsets.length;
|
|
5898
5870
|
if (high === 0) {
|
|
5899
5871
|
return Position.create(0, offset);
|
|
5900
5872
|
}
|
|
5901
5873
|
while (low < high) {
|
|
5902
|
-
|
|
5874
|
+
let mid = Math.floor((low + high) / 2);
|
|
5903
5875
|
if (lineOffsets[mid] > offset) {
|
|
5904
5876
|
high = mid;
|
|
5905
5877
|
}
|
|
@@ -5909,33 +5881,28 @@ var FullTextDocument = /** @class */ (function () {
|
|
|
5909
5881
|
}
|
|
5910
5882
|
// low is the least x for which the line offset is larger than the current offset
|
|
5911
5883
|
// or array.length if no line offset is larger than the current offset
|
|
5912
|
-
|
|
5884
|
+
let line = low - 1;
|
|
5913
5885
|
return Position.create(line, offset - lineOffsets[line]);
|
|
5914
|
-
}
|
|
5915
|
-
|
|
5916
|
-
|
|
5886
|
+
}
|
|
5887
|
+
offsetAt(position) {
|
|
5888
|
+
let lineOffsets = this.getLineOffsets();
|
|
5917
5889
|
if (position.line >= lineOffsets.length) {
|
|
5918
5890
|
return this._content.length;
|
|
5919
5891
|
}
|
|
5920
5892
|
else if (position.line < 0) {
|
|
5921
5893
|
return 0;
|
|
5922
5894
|
}
|
|
5923
|
-
|
|
5924
|
-
|
|
5895
|
+
let lineOffset = lineOffsets[position.line];
|
|
5896
|
+
let nextLineOffset = (position.line + 1 < lineOffsets.length) ? lineOffsets[position.line + 1] : this._content.length;
|
|
5925
5897
|
return Math.max(Math.min(lineOffset + position.character, nextLineOffset), lineOffset);
|
|
5926
|
-
}
|
|
5927
|
-
|
|
5928
|
-
|
|
5929
|
-
|
|
5930
|
-
|
|
5931
|
-
enumerable: false,
|
|
5932
|
-
configurable: true
|
|
5933
|
-
});
|
|
5934
|
-
return FullTextDocument;
|
|
5935
|
-
}());
|
|
5898
|
+
}
|
|
5899
|
+
get lineCount() {
|
|
5900
|
+
return this.getLineOffsets().length;
|
|
5901
|
+
}
|
|
5902
|
+
}
|
|
5936
5903
|
var Is;
|
|
5937
5904
|
(function (Is) {
|
|
5938
|
-
|
|
5905
|
+
const toString = Object.prototype.toString;
|
|
5939
5906
|
function defined(value) {
|
|
5940
5907
|
return typeof value !== 'undefined';
|
|
5941
5908
|
}
|
|
@@ -6049,8 +6016,8 @@ exports.ProtocolNotificationType = ProtocolNotificationType;
|
|
|
6049
6016
|
* ------------------------------------------------------------------------------------------ */
|
|
6050
6017
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
6051
6018
|
exports.WorkspaceSymbolRequest = exports.CodeActionResolveRequest = exports.CodeActionRequest = exports.DocumentSymbolRequest = exports.DocumentHighlightRequest = exports.ReferencesRequest = exports.DefinitionRequest = exports.SignatureHelpRequest = exports.SignatureHelpTriggerKind = exports.HoverRequest = exports.CompletionResolveRequest = exports.CompletionRequest = exports.CompletionTriggerKind = exports.PublishDiagnosticsNotification = exports.WatchKind = exports.RelativePattern = exports.FileChangeType = exports.DidChangeWatchedFilesNotification = exports.WillSaveTextDocumentWaitUntilRequest = exports.WillSaveTextDocumentNotification = exports.TextDocumentSaveReason = exports.DidSaveTextDocumentNotification = exports.DidCloseTextDocumentNotification = exports.DidChangeTextDocumentNotification = exports.TextDocumentContentChangeEvent = exports.DidOpenTextDocumentNotification = exports.TextDocumentSyncKind = exports.TelemetryEventNotification = exports.LogMessageNotification = exports.ShowMessageRequest = exports.ShowMessageNotification = exports.MessageType = exports.DidChangeConfigurationNotification = exports.ExitNotification = exports.ShutdownRequest = exports.InitializedNotification = exports.InitializeErrorCodes = exports.InitializeRequest = exports.WorkDoneProgressOptions = exports.TextDocumentRegistrationOptions = exports.StaticRegistrationOptions = exports.PositionEncodingKind = exports.FailureHandlingKind = exports.ResourceOperationKind = exports.UnregistrationRequest = exports.RegistrationRequest = exports.DocumentSelector = exports.NotebookCellTextDocumentFilter = exports.NotebookDocumentFilter = exports.TextDocumentFilter = void 0;
|
|
6052
|
-
exports.
|
|
6053
|
-
exports.InlineCompletionRequest = exports.DidCloseNotebookDocumentNotification = exports.DidSaveNotebookDocumentNotification = exports.DidChangeNotebookDocumentNotification = exports.NotebookCellArrayChange = exports.DidOpenNotebookDocumentNotification = exports.NotebookDocumentSyncRegistrationType = exports.NotebookDocument = exports.NotebookCell = exports.ExecutionSummary = exports.NotebookCellKind = exports.DiagnosticRefreshRequest = exports.WorkspaceDiagnosticRequest = exports.DocumentDiagnosticRequest = exports.DocumentDiagnosticReportKind = exports.DiagnosticServerCancellationData = exports.InlayHintRefreshRequest = exports.InlayHintResolveRequest = exports.InlayHintRequest = exports.InlineValueRefreshRequest = exports.InlineValueRequest = exports.TypeHierarchySupertypesRequest = exports.TypeHierarchySubtypesRequest = void 0;
|
|
6019
|
+
exports.MonikerRequest = exports.MonikerKind = exports.UniquenessLevel = exports.WillDeleteFilesRequest = exports.DidDeleteFilesNotification = exports.WillRenameFilesRequest = exports.DidRenameFilesNotification = exports.WillCreateFilesRequest = exports.DidCreateFilesNotification = exports.FileOperationPatternKind = exports.LinkedEditingRangeRequest = exports.ShowDocumentRequest = exports.SemanticTokensRegistrationType = exports.SemanticTokensRefreshRequest = exports.SemanticTokensRangeRequest = exports.SemanticTokensDeltaRequest = exports.SemanticTokensRequest = exports.TokenFormat = exports.CallHierarchyPrepareRequest = exports.CallHierarchyOutgoingCallsRequest = exports.CallHierarchyIncomingCallsRequest = exports.WorkDoneProgressCancelNotification = exports.WorkDoneProgressCreateRequest = exports.WorkDoneProgress = exports.SelectionRangeRequest = exports.DeclarationRequest = exports.FoldingRangeRefreshRequest = exports.FoldingRangeRequest = exports.ColorPresentationRequest = exports.DocumentColorRequest = exports.ConfigurationRequest = exports.DidChangeWorkspaceFoldersNotification = exports.WorkspaceFoldersRequest = exports.TypeDefinitionRequest = exports.ImplementationRequest = exports.ApplyWorkspaceEditRequest = exports.ExecuteCommandRequest = exports.PrepareRenameRequest = exports.RenameRequest = exports.PrepareSupportDefaultBehavior = exports.DocumentOnTypeFormattingRequest = exports.DocumentRangesFormattingRequest = exports.DocumentRangeFormattingRequest = exports.DocumentFormattingRequest = exports.DocumentLinkResolveRequest = exports.DocumentLinkRequest = exports.CodeLensRefreshRequest = exports.CodeLensResolveRequest = exports.CodeLensRequest = exports.WorkspaceSymbolResolveRequest = void 0;
|
|
6020
|
+
exports.InlineCompletionRequest = exports.DidCloseNotebookDocumentNotification = exports.DidSaveNotebookDocumentNotification = exports.DidChangeNotebookDocumentNotification = exports.NotebookCellArrayChange = exports.DidOpenNotebookDocumentNotification = exports.NotebookDocumentSyncRegistrationType = exports.NotebookDocument = exports.NotebookCell = exports.ExecutionSummary = exports.NotebookCellKind = exports.DiagnosticRefreshRequest = exports.WorkspaceDiagnosticRequest = exports.DocumentDiagnosticRequest = exports.DocumentDiagnosticReportKind = exports.DiagnosticServerCancellationData = exports.InlayHintRefreshRequest = exports.InlayHintResolveRequest = exports.InlayHintRequest = exports.InlineValueRefreshRequest = exports.InlineValueRequest = exports.TypeHierarchySupertypesRequest = exports.TypeHierarchySubtypesRequest = exports.TypeHierarchyPrepareRequest = void 0;
|
|
6054
6021
|
const messages_1 = __webpack_require__(25);
|
|
6055
6022
|
const vscode_languageserver_types_1 = __webpack_require__(24);
|
|
6056
6023
|
const Is = __webpack_require__(27);
|
|
@@ -6068,6 +6035,7 @@ Object.defineProperty(exports, "DocumentColorRequest", ({ enumerable: true, get:
|
|
|
6068
6035
|
Object.defineProperty(exports, "ColorPresentationRequest", ({ enumerable: true, get: function () { return protocol_colorProvider_1.ColorPresentationRequest; } }));
|
|
6069
6036
|
const protocol_foldingRange_1 = __webpack_require__(33);
|
|
6070
6037
|
Object.defineProperty(exports, "FoldingRangeRequest", ({ enumerable: true, get: function () { return protocol_foldingRange_1.FoldingRangeRequest; } }));
|
|
6038
|
+
Object.defineProperty(exports, "FoldingRangeRefreshRequest", ({ enumerable: true, get: function () { return protocol_foldingRange_1.FoldingRangeRefreshRequest; } }));
|
|
6071
6039
|
const protocol_declaration_1 = __webpack_require__(34);
|
|
6072
6040
|
Object.defineProperty(exports, "DeclarationRequest", ({ enumerable: true, get: function () { return protocol_declaration_1.DeclarationRequest; } }));
|
|
6073
6041
|
const protocol_selectionRange_1 = __webpack_require__(35);
|
|
@@ -6419,6 +6387,12 @@ var MessageType;
|
|
|
6419
6387
|
* A log message.
|
|
6420
6388
|
*/
|
|
6421
6389
|
MessageType.Log = 4;
|
|
6390
|
+
/**
|
|
6391
|
+
* A debug message.
|
|
6392
|
+
*
|
|
6393
|
+
* @since 3.18.0
|
|
6394
|
+
*/
|
|
6395
|
+
MessageType.Debug = 5;
|
|
6422
6396
|
})(MessageType || (exports.MessageType = MessageType = {}));
|
|
6423
6397
|
/**
|
|
6424
6398
|
* The show message notification is sent from a server to a client to ask
|
|
@@ -7204,7 +7178,7 @@ var ColorPresentationRequest;
|
|
|
7204
7178
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
7205
7179
|
*--------------------------------------------------------------------------------------------*/
|
|
7206
7180
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
7207
|
-
exports.FoldingRangeRequest = void 0;
|
|
7181
|
+
exports.FoldingRangeRefreshRequest = exports.FoldingRangeRequest = void 0;
|
|
7208
7182
|
const messages_1 = __webpack_require__(25);
|
|
7209
7183
|
/**
|
|
7210
7184
|
* A request to provide folding ranges in a document. The request's
|
|
@@ -7218,6 +7192,16 @@ var FoldingRangeRequest;
|
|
|
7218
7192
|
FoldingRangeRequest.messageDirection = messages_1.MessageDirection.clientToServer;
|
|
7219
7193
|
FoldingRangeRequest.type = new messages_1.ProtocolRequestType(FoldingRangeRequest.method);
|
|
7220
7194
|
})(FoldingRangeRequest || (exports.FoldingRangeRequest = FoldingRangeRequest = {}));
|
|
7195
|
+
/**
|
|
7196
|
+
* @since 3.18.0
|
|
7197
|
+
* @proposed
|
|
7198
|
+
*/
|
|
7199
|
+
var FoldingRangeRefreshRequest;
|
|
7200
|
+
(function (FoldingRangeRefreshRequest) {
|
|
7201
|
+
FoldingRangeRefreshRequest.method = `workspace/foldingRange/refresh`;
|
|
7202
|
+
FoldingRangeRefreshRequest.messageDirection = messages_1.MessageDirection.serverToClient;
|
|
7203
|
+
FoldingRangeRefreshRequest.type = new messages_1.ProtocolRequestType0(FoldingRangeRefreshRequest.method);
|
|
7204
|
+
})(FoldingRangeRefreshRequest || (exports.FoldingRangeRefreshRequest = FoldingRangeRefreshRequest = {}));
|
|
7221
7205
|
|
|
7222
7206
|
|
|
7223
7207
|
/***/ }),
|
|
@@ -10705,6 +10689,7 @@ const inlineCompletion_1 = __webpack_require__(105);
|
|
|
10705
10689
|
*/
|
|
10706
10690
|
var RevealOutputChannelOn;
|
|
10707
10691
|
(function (RevealOutputChannelOn) {
|
|
10692
|
+
RevealOutputChannelOn[RevealOutputChannelOn["Debug"] = 0] = "Debug";
|
|
10708
10693
|
RevealOutputChannelOn[RevealOutputChannelOn["Info"] = 1] = "Info";
|
|
10709
10694
|
RevealOutputChannelOn[RevealOutputChannelOn["Warn"] = 2] = "Warn";
|
|
10710
10695
|
RevealOutputChannelOn[RevealOutputChannelOn["Error"] = 3] = "Error";
|
|
@@ -11226,31 +11211,25 @@ class BaseLanguageClient {
|
|
|
11226
11211
|
}
|
|
11227
11212
|
return data.toString();
|
|
11228
11213
|
}
|
|
11214
|
+
debug(message, data, showNotification = true) {
|
|
11215
|
+
this.logOutputMessage(vscode_languageserver_protocol_1.MessageType.Debug, RevealOutputChannelOn.Debug, 'Debug', message, data, showNotification);
|
|
11216
|
+
}
|
|
11229
11217
|
info(message, data, showNotification = true) {
|
|
11230
|
-
this.
|
|
11231
|
-
if (data !== null && data !== undefined) {
|
|
11232
|
-
this.outputChannel.appendLine(this.data2String(data));
|
|
11233
|
-
}
|
|
11234
|
-
if (showNotification && this._clientOptions.revealOutputChannelOn <= RevealOutputChannelOn.Info) {
|
|
11235
|
-
this.showNotificationMessage(vscode_languageserver_protocol_1.MessageType.Info, message);
|
|
11236
|
-
}
|
|
11218
|
+
this.logOutputMessage(vscode_languageserver_protocol_1.MessageType.Info, RevealOutputChannelOn.Info, 'Info', message, data, showNotification);
|
|
11237
11219
|
}
|
|
11238
11220
|
warn(message, data, showNotification = true) {
|
|
11239
|
-
this.
|
|
11240
|
-
if (data !== null && data !== undefined) {
|
|
11241
|
-
this.outputChannel.appendLine(this.data2String(data));
|
|
11242
|
-
}
|
|
11243
|
-
if (showNotification && this._clientOptions.revealOutputChannelOn <= RevealOutputChannelOn.Warn) {
|
|
11244
|
-
this.showNotificationMessage(vscode_languageserver_protocol_1.MessageType.Warning, message);
|
|
11245
|
-
}
|
|
11221
|
+
this.logOutputMessage(vscode_languageserver_protocol_1.MessageType.Warning, RevealOutputChannelOn.Warn, 'Warn', message, data, showNotification);
|
|
11246
11222
|
}
|
|
11247
11223
|
error(message, data, showNotification = true) {
|
|
11248
|
-
this.
|
|
11224
|
+
this.logOutputMessage(vscode_languageserver_protocol_1.MessageType.Error, RevealOutputChannelOn.Error, 'Error', message, data, showNotification);
|
|
11225
|
+
}
|
|
11226
|
+
logOutputMessage(type, reveal, name, message, data, showNotification) {
|
|
11227
|
+
this.outputChannel.appendLine(`[${name.padEnd(5)} - ${(new Date().toLocaleTimeString())}] ${message}`);
|
|
11249
11228
|
if (data !== null && data !== undefined) {
|
|
11250
11229
|
this.outputChannel.appendLine(this.data2String(data));
|
|
11251
11230
|
}
|
|
11252
|
-
if (showNotification === 'force' || (showNotification && this._clientOptions.revealOutputChannelOn <=
|
|
11253
|
-
this.showNotificationMessage(
|
|
11231
|
+
if (showNotification === 'force' || (showNotification && this._clientOptions.revealOutputChannelOn <= reveal)) {
|
|
11232
|
+
this.showNotificationMessage(type, message);
|
|
11254
11233
|
}
|
|
11255
11234
|
}
|
|
11256
11235
|
showNotificationMessage(type, message) {
|
|
@@ -11346,6 +11325,9 @@ class BaseLanguageClient {
|
|
|
11346
11325
|
case vscode_languageserver_protocol_1.MessageType.Info:
|
|
11347
11326
|
this.info(message.message, undefined, false);
|
|
11348
11327
|
break;
|
|
11328
|
+
case vscode_languageserver_protocol_1.MessageType.Debug:
|
|
11329
|
+
this.debug(message.message, undefined, false);
|
|
11330
|
+
break;
|
|
11349
11331
|
default:
|
|
11350
11332
|
this.outputChannel.appendLine(message.message);
|
|
11351
11333
|
}
|
|
@@ -11845,11 +11827,15 @@ class BaseLanguageClient {
|
|
|
11845
11827
|
async handleConnectionError(error, message, count) {
|
|
11846
11828
|
const handlerResult = await this._clientOptions.errorHandler.error(error, message, count);
|
|
11847
11829
|
if (handlerResult.action === ErrorAction.Shutdown) {
|
|
11848
|
-
this.error(handlerResult.message ?? `Client ${this._name}: connection to server is erroring.
|
|
11830
|
+
this.error(handlerResult.message ?? `Client ${this._name}: connection to server is erroring.\n${error.message}\nShutting down server.`, undefined, handlerResult.handled === true ? false : 'force');
|
|
11849
11831
|
this.stop().catch((error) => {
|
|
11850
11832
|
this.error(`Stopping server failed`, error, false);
|
|
11851
11833
|
});
|
|
11852
11834
|
}
|
|
11835
|
+
else {
|
|
11836
|
+
this.error(handlerResult.message ??
|
|
11837
|
+
`Client ${this._name}: connection to server is erroring.\n${error.message}`, undefined, handlerResult.handled === true ? false : 'force');
|
|
11838
|
+
}
|
|
11853
11839
|
}
|
|
11854
11840
|
hookConfigurationChanged(connection) {
|
|
11855
11841
|
this._listeners.push(vscode_1.workspace.onDidChangeConfiguration(() => {
|
|
@@ -17199,7 +17185,6 @@ exports.CodeLensFeature = CodeLensFeature;
|
|
|
17199
17185
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
17200
17186
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
17201
17187
|
* ------------------------------------------------------------------------------------------ */
|
|
17202
|
-
/// <reference path="../../typings/vscode.proposed.formatMultipleRanges.d.ts" />
|
|
17203
17188
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
17204
17189
|
exports.DocumentOnTypeFormattingFeature = exports.DocumentRangeFormattingFeature = exports.DocumentFormattingFeature = void 0;
|
|
17205
17190
|
const vscode_1 = __webpack_require__(1);
|
|
@@ -18143,8 +18128,14 @@ class FoldingRangeFeature extends features_1.TextDocumentLanguageFeature {
|
|
|
18143
18128
|
capability.lineFoldingOnly = true;
|
|
18144
18129
|
capability.foldingRangeKind = { valueSet: [vscode_languageserver_protocol_1.FoldingRangeKind.Comment, vscode_languageserver_protocol_1.FoldingRangeKind.Imports, vscode_languageserver_protocol_1.FoldingRangeKind.Region] };
|
|
18145
18130
|
capability.foldingRange = { collapsedText: false };
|
|
18131
|
+
(0, features_1.ensure)((0, features_1.ensure)(capabilities, 'workspace'), 'foldingRange').refreshSupport = true;
|
|
18146
18132
|
}
|
|
18147
18133
|
initialize(capabilities, documentSelector) {
|
|
18134
|
+
this._client.onRequest(vscode_languageserver_protocol_1.FoldingRangeRefreshRequest.type, async () => {
|
|
18135
|
+
for (const provider of this.getAllProviders()) {
|
|
18136
|
+
provider.onDidChangeFoldingRange.fire();
|
|
18137
|
+
}
|
|
18138
|
+
});
|
|
18148
18139
|
let [id, options] = this.getRegistration(documentSelector, capabilities.foldingRangeProvider);
|
|
18149
18140
|
if (!id || !options) {
|
|
18150
18141
|
return;
|
|
@@ -18153,7 +18144,9 @@ class FoldingRangeFeature extends features_1.TextDocumentLanguageFeature {
|
|
|
18153
18144
|
}
|
|
18154
18145
|
registerLanguageProvider(options) {
|
|
18155
18146
|
const selector = options.documentSelector;
|
|
18147
|
+
const eventEmitter = new vscode_1.EventEmitter();
|
|
18156
18148
|
const provider = {
|
|
18149
|
+
onDidChangeFoldingRanges: eventEmitter.event,
|
|
18157
18150
|
provideFoldingRanges: (document, context, token) => {
|
|
18158
18151
|
const client = this._client;
|
|
18159
18152
|
const provideFoldingRanges = (document, _, token) => {
|
|
@@ -18175,7 +18168,7 @@ class FoldingRangeFeature extends features_1.TextDocumentLanguageFeature {
|
|
|
18175
18168
|
: provideFoldingRanges(document, context, token);
|
|
18176
18169
|
}
|
|
18177
18170
|
};
|
|
18178
|
-
return [vscode_1.languages.registerFoldingRangeProvider(this._client.protocol2CodeConverter.asDocumentSelector(selector), provider), provider];
|
|
18171
|
+
return [vscode_1.languages.registerFoldingRangeProvider(this._client.protocol2CodeConverter.asDocumentSelector(selector), provider), { provider: provider, onDidChangeFoldingRange: eventEmitter }];
|
|
18179
18172
|
}
|
|
18180
18173
|
}
|
|
18181
18174
|
exports.FoldingRangeFeature = FoldingRangeFeature;
|
|
@@ -19483,15 +19476,9 @@ function getCustomDataPathsFromAllExtensions() {
|
|
|
19483
19476
|
|
|
19484
19477
|
/***/ }),
|
|
19485
19478
|
/* 108 */
|
|
19486
|
-
/***/ ((
|
|
19479
|
+
/***/ (function(module) {
|
|
19487
19480
|
|
|
19488
|
-
"use strict";
|
|
19489
|
-
__webpack_require__.r(__webpack_exports__);
|
|
19490
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
19491
|
-
/* harmony export */ "URI": () => (/* binding */ URI),
|
|
19492
|
-
/* harmony export */ "Utils": () => (/* binding */ Utils)
|
|
19493
|
-
/* harmony export */ });
|
|
19494
|
-
var LIB;(()=>{"use strict";var t={470:t=>{function e(t){if("string"!=typeof t)throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}function r(t,e){for(var r,n="",o=0,i=-1,a=0,h=0;h<=t.length;++h){if(h<t.length)r=t.charCodeAt(h);else{if(47===r)break;r=47}if(47===r){if(i===h-1||1===a);else if(i!==h-1&&2===a){if(n.length<2||2!==o||46!==n.charCodeAt(n.length-1)||46!==n.charCodeAt(n.length-2))if(n.length>2){var s=n.lastIndexOf("/");if(s!==n.length-1){-1===s?(n="",o=0):o=(n=n.slice(0,s)).length-1-n.lastIndexOf("/"),i=h,a=0;continue}}else if(2===n.length||1===n.length){n="",o=0,i=h,a=0;continue}e&&(n.length>0?n+="/..":n="..",o=2)}else n.length>0?n+="/"+t.slice(i+1,h):n=t.slice(i+1,h),o=h-i-1;i=h,a=0}else 46===r&&-1!==a?++a:a=-1}return n}var n={resolve:function(){for(var t,n="",o=!1,i=arguments.length-1;i>=-1&&!o;i--){var a;i>=0?a=arguments[i]:(void 0===t&&(t=process.cwd()),a=t),e(a),0!==a.length&&(n=a+"/"+n,o=47===a.charCodeAt(0))}return n=r(n,!o),o?n.length>0?"/"+n:"/":n.length>0?n:"."},normalize:function(t){if(e(t),0===t.length)return".";var n=47===t.charCodeAt(0),o=47===t.charCodeAt(t.length-1);return 0!==(t=r(t,!n)).length||n||(t="."),t.length>0&&o&&(t+="/"),n?"/"+t:t},isAbsolute:function(t){return e(t),t.length>0&&47===t.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var t,r=0;r<arguments.length;++r){var o=arguments[r];e(o),o.length>0&&(void 0===t?t=o:t+="/"+o)}return void 0===t?".":n.normalize(t)},relative:function(t,r){if(e(t),e(r),t===r)return"";if((t=n.resolve(t))===(r=n.resolve(r)))return"";for(var o=1;o<t.length&&47===t.charCodeAt(o);++o);for(var i=t.length,a=i-o,h=1;h<r.length&&47===r.charCodeAt(h);++h);for(var s=r.length-h,c=a<s?a:s,f=-1,u=0;u<=c;++u){if(u===c){if(s>c){if(47===r.charCodeAt(h+u))return r.slice(h+u+1);if(0===u)return r.slice(h+u)}else a>c&&(47===t.charCodeAt(o+u)?f=u:0===u&&(f=0));break}var l=t.charCodeAt(o+u);if(l!==r.charCodeAt(h+u))break;47===l&&(f=u)}var p="";for(u=o+f+1;u<=i;++u)u!==i&&47!==t.charCodeAt(u)||(0===p.length?p+="..":p+="/..");return p.length>0?p+r.slice(h+f):(h+=f,47===r.charCodeAt(h)&&++h,r.slice(h))},_makeLong:function(t){return t},dirname:function(t){if(e(t),0===t.length)return".";for(var r=t.charCodeAt(0),n=47===r,o=-1,i=!0,a=t.length-1;a>=1;--a)if(47===(r=t.charCodeAt(a))){if(!i){o=a;break}}else i=!1;return-1===o?n?"/":".":n&&1===o?"//":t.slice(0,o)},basename:function(t,r){if(void 0!==r&&"string"!=typeof r)throw new TypeError('"ext" argument must be a string');e(t);var n,o=0,i=-1,a=!0;if(void 0!==r&&r.length>0&&r.length<=t.length){if(r.length===t.length&&r===t)return"";var h=r.length-1,s=-1;for(n=t.length-1;n>=0;--n){var c=t.charCodeAt(n);if(47===c){if(!a){o=n+1;break}}else-1===s&&(a=!1,s=n+1),h>=0&&(c===r.charCodeAt(h)?-1==--h&&(i=n):(h=-1,i=s))}return o===i?i=s:-1===i&&(i=t.length),t.slice(o,i)}for(n=t.length-1;n>=0;--n)if(47===t.charCodeAt(n)){if(!a){o=n+1;break}}else-1===i&&(a=!1,i=n+1);return-1===i?"":t.slice(o,i)},extname:function(t){e(t);for(var r=-1,n=0,o=-1,i=!0,a=0,h=t.length-1;h>=0;--h){var s=t.charCodeAt(h);if(47!==s)-1===o&&(i=!1,o=h+1),46===s?-1===r?r=h:1!==a&&(a=1):-1!==r&&(a=-1);else if(!i){n=h+1;break}}return-1===r||-1===o||0===a||1===a&&r===o-1&&r===n+1?"":t.slice(r,o)},format:function(t){if(null===t||"object"!=typeof t)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof t);return function(t,e){var r=e.dir||e.root,n=e.base||(e.name||"")+(e.ext||"");return r?r===e.root?r+n:r+"/"+n:n}(0,t)},parse:function(t){e(t);var r={root:"",dir:"",base:"",ext:"",name:""};if(0===t.length)return r;var n,o=t.charCodeAt(0),i=47===o;i?(r.root="/",n=1):n=0;for(var a=-1,h=0,s=-1,c=!0,f=t.length-1,u=0;f>=n;--f)if(47!==(o=t.charCodeAt(f)))-1===s&&(c=!1,s=f+1),46===o?-1===a?a=f:1!==u&&(u=1):-1!==a&&(u=-1);else if(!c){h=f+1;break}return-1===a||-1===s||0===u||1===u&&a===s-1&&a===h+1?-1!==s&&(r.base=r.name=0===h&&i?t.slice(1,s):t.slice(h,s)):(0===h&&i?(r.name=t.slice(1,a),r.base=t.slice(1,s)):(r.name=t.slice(h,a),r.base=t.slice(h,s)),r.ext=t.slice(a,s)),h>0?r.dir=t.slice(0,h-1):i&&(r.dir="/"),r},sep:"/",delimiter:":",win32:null,posix:null};n.posix=n,t.exports=n}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={exports:{}};return t[n](i,i.exports,r),i.exports}r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};(()=>{var t;if(r.r(n),r.d(n,{URI:()=>g,Utils:()=>O}),"object"==typeof process)t="win32"==="web";else if("object"==typeof navigator){var e=navigator.userAgent;t=e.indexOf("Windows")>=0}var o,i,a=(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),h=/^\w[\w\d+.-]*$/,s=/^\//,c=/^\/\//;function f(t,e){if(!t.scheme&&e)throw new Error('[UriError]: Scheme is missing: {scheme: "", authority: "'.concat(t.authority,'", path: "').concat(t.path,'", query: "').concat(t.query,'", fragment: "').concat(t.fragment,'"}'));if(t.scheme&&!h.test(t.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(t.path)if(t.authority){if(!s.test(t.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(c.test(t.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}var u="",l="/",p=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,g=function(){function e(t,e,r,n,o,i){void 0===i&&(i=!1),"object"==typeof t?(this.scheme=t.scheme||u,this.authority=t.authority||u,this.path=t.path||u,this.query=t.query||u,this.fragment=t.fragment||u):(this.scheme=function(t,e){return t||e?t:"file"}(t,i),this.authority=e||u,this.path=function(t,e){switch(t){case"https":case"http":case"file":e?e[0]!==l&&(e=l+e):e=l}return e}(this.scheme,r||u),this.query=n||u,this.fragment=o||u,f(this,i))}return e.isUri=function(t){return t instanceof e||!!t&&"string"==typeof t.authority&&"string"==typeof t.fragment&&"string"==typeof t.path&&"string"==typeof t.query&&"string"==typeof t.scheme&&"string"==typeof t.fsPath&&"function"==typeof t.with&&"function"==typeof t.toString},Object.defineProperty(e.prototype,"fsPath",{get:function(){return C(this,!1)},enumerable:!1,configurable:!0}),e.prototype.with=function(t){if(!t)return this;var e=t.scheme,r=t.authority,n=t.path,o=t.query,i=t.fragment;return void 0===e?e=this.scheme:null===e&&(e=u),void 0===r?r=this.authority:null===r&&(r=u),void 0===n?n=this.path:null===n&&(n=u),void 0===o?o=this.query:null===o&&(o=u),void 0===i?i=this.fragment:null===i&&(i=u),e===this.scheme&&r===this.authority&&n===this.path&&o===this.query&&i===this.fragment?this:new v(e,r,n,o,i)},e.parse=function(t,e){void 0===e&&(e=!1);var r=p.exec(t);return r?new v(r[2]||u,_(r[4]||u),_(r[5]||u),_(r[7]||u),_(r[9]||u),e):new v(u,u,u,u,u)},e.file=function(e){var r=u;if(t&&(e=e.replace(/\\/g,l)),e[0]===l&&e[1]===l){var n=e.indexOf(l,2);-1===n?(r=e.substring(2),e=l):(r=e.substring(2,n),e=e.substring(n)||l)}return new v("file",r,e,u,u)},e.from=function(t){var e=new v(t.scheme,t.authority,t.path,t.query,t.fragment);return f(e,!0),e},e.prototype.toString=function(t){return void 0===t&&(t=!1),A(this,t)},e.prototype.toJSON=function(){return this},e.revive=function(t){if(t){if(t instanceof e)return t;var r=new v(t);return r._formatted=t.external,r._fsPath=t._sep===d?t.fsPath:null,r}return t},e}(),d=t?1:void 0,v=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._formatted=null,e._fsPath=null,e}return a(e,t),Object.defineProperty(e.prototype,"fsPath",{get:function(){return this._fsPath||(this._fsPath=C(this,!1)),this._fsPath},enumerable:!1,configurable:!0}),e.prototype.toString=function(t){return void 0===t&&(t=!1),t?A(this,!0):(this._formatted||(this._formatted=A(this,!1)),this._formatted)},e.prototype.toJSON=function(){var t={$mid:1};return this._fsPath&&(t.fsPath=this._fsPath,t._sep=d),this._formatted&&(t.external=this._formatted),this.path&&(t.path=this.path),this.scheme&&(t.scheme=this.scheme),this.authority&&(t.authority=this.authority),this.query&&(t.query=this.query),this.fragment&&(t.fragment=this.fragment),t},e}(g),y=((i={})[58]="%3A",i[47]="%2F",i[63]="%3F",i[35]="%23",i[91]="%5B",i[93]="%5D",i[64]="%40",i[33]="%21",i[36]="%24",i[38]="%26",i[39]="%27",i[40]="%28",i[41]="%29",i[42]="%2A",i[43]="%2B",i[44]="%2C",i[59]="%3B",i[61]="%3D",i[32]="%20",i);function m(t,e,r){for(var n=void 0,o=-1,i=0;i<t.length;i++){var a=t.charCodeAt(i);if(a>=97&&a<=122||a>=65&&a<=90||a>=48&&a<=57||45===a||46===a||95===a||126===a||e&&47===a||r&&91===a||r&&93===a||r&&58===a)-1!==o&&(n+=encodeURIComponent(t.substring(o,i)),o=-1),void 0!==n&&(n+=t.charAt(i));else{void 0===n&&(n=t.substr(0,i));var h=y[a];void 0!==h?(-1!==o&&(n+=encodeURIComponent(t.substring(o,i)),o=-1),n+=h):-1===o&&(o=i)}}return-1!==o&&(n+=encodeURIComponent(t.substring(o))),void 0!==n?n:t}function b(t){for(var e=void 0,r=0;r<t.length;r++){var n=t.charCodeAt(r);35===n||63===n?(void 0===e&&(e=t.substr(0,r)),e+=y[n]):void 0!==e&&(e+=t[r])}return void 0!==e?e:t}function C(e,r){var n;return n=e.authority&&e.path.length>1&&"file"===e.scheme?"//".concat(e.authority).concat(e.path):47===e.path.charCodeAt(0)&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&58===e.path.charCodeAt(2)?r?e.path.substr(1):e.path[1].toLowerCase()+e.path.substr(2):e.path,t&&(n=n.replace(/\//g,"\\")),n}function A(t,e){var r=e?b:m,n="",o=t.scheme,i=t.authority,a=t.path,h=t.query,s=t.fragment;if(o&&(n+=o,n+=":"),(i||"file"===o)&&(n+=l,n+=l),i){var c=i.indexOf("@");if(-1!==c){var f=i.substr(0,c);i=i.substr(c+1),-1===(c=f.lastIndexOf(":"))?n+=r(f,!1,!1):(n+=r(f.substr(0,c),!1,!1),n+=":",n+=r(f.substr(c+1),!1,!0)),n+="@"}-1===(c=(i=i.toLowerCase()).lastIndexOf(":"))?n+=r(i,!1,!0):(n+=r(i.substr(0,c),!1,!0),n+=i.substr(c))}if(a){if(a.length>=3&&47===a.charCodeAt(0)&&58===a.charCodeAt(2))(u=a.charCodeAt(1))>=65&&u<=90&&(a="/".concat(String.fromCharCode(u+32),":").concat(a.substr(3)));else if(a.length>=2&&58===a.charCodeAt(1)){var u;(u=a.charCodeAt(0))>=65&&u<=90&&(a="".concat(String.fromCharCode(u+32),":").concat(a.substr(2)))}n+=r(a,!0,!1)}return h&&(n+="?",n+=r(h,!1,!1)),s&&(n+="#",n+=e?s:m(s,!1,!1)),n}function w(t){try{return decodeURIComponent(t)}catch(e){return t.length>3?t.substr(0,3)+w(t.substr(3)):t}}var x=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function _(t){return t.match(x)?t.replace(x,(function(t){return w(t)})):t}var O,P=r(470),j=function(t,e,r){if(r||2===arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))},I=P.posix||P,U="/";!function(t){t.joinPath=function(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];return t.with({path:I.join.apply(I,j([t.path],e,!1))})},t.resolvePath=function(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];var n=t.path,o=!1;n[0]!==U&&(n=U+n,o=!0);var i=I.resolve.apply(I,j([n],e,!1));return o&&i[0]===U&&!t.authority&&(i=i.substring(1)),t.with({path:i})},t.dirname=function(t){if(0===t.path.length||t.path===U)return t;var e=I.dirname(t.path);return 1===e.length&&46===e.charCodeAt(0)&&(e=""),t.with({path:e})},t.basename=function(t){return I.basename(t.path)},t.extname=function(t){return I.extname(t.path)}}(O||(O={}))})(),LIB=n})();const{URI,Utils}=LIB;
|
|
19481
|
+
!function(t,e){if(true)module.exports=e();else { var n, r; }}(this,(()=>(()=>{"use strict";var t={470:t=>{function e(t){if("string"!=typeof t)throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}function r(t,e){for(var r,n="",i=0,o=-1,s=0,a=0;a<=t.length;++a){if(a<t.length)r=t.charCodeAt(a);else{if(47===r)break;r=47}if(47===r){if(o===a-1||1===s);else if(o!==a-1&&2===s){if(n.length<2||2!==i||46!==n.charCodeAt(n.length-1)||46!==n.charCodeAt(n.length-2))if(n.length>2){var h=n.lastIndexOf("/");if(h!==n.length-1){-1===h?(n="",i=0):i=(n=n.slice(0,h)).length-1-n.lastIndexOf("/"),o=a,s=0;continue}}else if(2===n.length||1===n.length){n="",i=0,o=a,s=0;continue}e&&(n.length>0?n+="/..":n="..",i=2)}else n.length>0?n+="/"+t.slice(o+1,a):n=t.slice(o+1,a),i=a-o-1;o=a,s=0}else 46===r&&-1!==s?++s:s=-1}return n}var n={resolve:function(){for(var t,n="",i=!1,o=arguments.length-1;o>=-1&&!i;o--){var s;o>=0?s=arguments[o]:(void 0===t&&(t=process.cwd()),s=t),e(s),0!==s.length&&(n=s+"/"+n,i=47===s.charCodeAt(0))}return n=r(n,!i),i?n.length>0?"/"+n:"/":n.length>0?n:"."},normalize:function(t){if(e(t),0===t.length)return".";var n=47===t.charCodeAt(0),i=47===t.charCodeAt(t.length-1);return 0!==(t=r(t,!n)).length||n||(t="."),t.length>0&&i&&(t+="/"),n?"/"+t:t},isAbsolute:function(t){return e(t),t.length>0&&47===t.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var t,r=0;r<arguments.length;++r){var i=arguments[r];e(i),i.length>0&&(void 0===t?t=i:t+="/"+i)}return void 0===t?".":n.normalize(t)},relative:function(t,r){if(e(t),e(r),t===r)return"";if((t=n.resolve(t))===(r=n.resolve(r)))return"";for(var i=1;i<t.length&&47===t.charCodeAt(i);++i);for(var o=t.length,s=o-i,a=1;a<r.length&&47===r.charCodeAt(a);++a);for(var h=r.length-a,c=s<h?s:h,f=-1,u=0;u<=c;++u){if(u===c){if(h>c){if(47===r.charCodeAt(a+u))return r.slice(a+u+1);if(0===u)return r.slice(a+u)}else s>c&&(47===t.charCodeAt(i+u)?f=u:0===u&&(f=0));break}var l=t.charCodeAt(i+u);if(l!==r.charCodeAt(a+u))break;47===l&&(f=u)}var d="";for(u=i+f+1;u<=o;++u)u!==o&&47!==t.charCodeAt(u)||(0===d.length?d+="..":d+="/..");return d.length>0?d+r.slice(a+f):(a+=f,47===r.charCodeAt(a)&&++a,r.slice(a))},_makeLong:function(t){return t},dirname:function(t){if(e(t),0===t.length)return".";for(var r=t.charCodeAt(0),n=47===r,i=-1,o=!0,s=t.length-1;s>=1;--s)if(47===(r=t.charCodeAt(s))){if(!o){i=s;break}}else o=!1;return-1===i?n?"/":".":n&&1===i?"//":t.slice(0,i)},basename:function(t,r){if(void 0!==r&&"string"!=typeof r)throw new TypeError('"ext" argument must be a string');e(t);var n,i=0,o=-1,s=!0;if(void 0!==r&&r.length>0&&r.length<=t.length){if(r.length===t.length&&r===t)return"";var a=r.length-1,h=-1;for(n=t.length-1;n>=0;--n){var c=t.charCodeAt(n);if(47===c){if(!s){i=n+1;break}}else-1===h&&(s=!1,h=n+1),a>=0&&(c===r.charCodeAt(a)?-1==--a&&(o=n):(a=-1,o=h))}return i===o?o=h:-1===o&&(o=t.length),t.slice(i,o)}for(n=t.length-1;n>=0;--n)if(47===t.charCodeAt(n)){if(!s){i=n+1;break}}else-1===o&&(s=!1,o=n+1);return-1===o?"":t.slice(i,o)},extname:function(t){e(t);for(var r=-1,n=0,i=-1,o=!0,s=0,a=t.length-1;a>=0;--a){var h=t.charCodeAt(a);if(47!==h)-1===i&&(o=!1,i=a+1),46===h?-1===r?r=a:1!==s&&(s=1):-1!==r&&(s=-1);else if(!o){n=a+1;break}}return-1===r||-1===i||0===s||1===s&&r===i-1&&r===n+1?"":t.slice(r,i)},format:function(t){if(null===t||"object"!=typeof t)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof t);return function(t,e){var r=e.dir||e.root,n=e.base||(e.name||"")+(e.ext||"");return r?r===e.root?r+n:r+"/"+n:n}(0,t)},parse:function(t){e(t);var r={root:"",dir:"",base:"",ext:"",name:""};if(0===t.length)return r;var n,i=t.charCodeAt(0),o=47===i;o?(r.root="/",n=1):n=0;for(var s=-1,a=0,h=-1,c=!0,f=t.length-1,u=0;f>=n;--f)if(47!==(i=t.charCodeAt(f)))-1===h&&(c=!1,h=f+1),46===i?-1===s?s=f:1!==u&&(u=1):-1!==s&&(u=-1);else if(!c){a=f+1;break}return-1===s||-1===h||0===u||1===u&&s===h-1&&s===a+1?-1!==h&&(r.base=r.name=0===a&&o?t.slice(1,h):t.slice(a,h)):(0===a&&o?(r.name=t.slice(1,s),r.base=t.slice(1,h)):(r.name=t.slice(a,s),r.base=t.slice(a,h)),r.ext=t.slice(s,h)),a>0?r.dir=t.slice(0,a-1):o&&(r.dir="/"),r},sep:"/",delimiter:":",win32:null,posix:null};n.posix=n,t.exports=n},674:(t,e)=>{if(Object.defineProperty(e,"__esModule",{value:!0}),e.isWindows=void 0,"object"==typeof process)e.isWindows="win32"==="web";else if("object"==typeof navigator){let t=navigator.userAgent;e.isWindows=t.indexOf("Windows")>=0}},796:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.uriToFsPath=e.URI=void 0;const n=r(674),i=/^\w[\w\d+.-]*$/,o=/^\//,s=/^\/\//;function a(t,e){if(!t.scheme&&e)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${t.authority}", path: "${t.path}", query: "${t.query}", fragment: "${t.fragment}"}`);if(t.scheme&&!i.test(t.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(t.path)if(t.authority){if(!o.test(t.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(s.test(t.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}const h="",c="/",f=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class u{static isUri(t){return t instanceof u||!!t&&"string"==typeof t.authority&&"string"==typeof t.fragment&&"string"==typeof t.path&&"string"==typeof t.query&&"string"==typeof t.scheme&&"string"==typeof t.fsPath&&"function"==typeof t.with&&"function"==typeof t.toString}scheme;authority;path;query;fragment;constructor(t,e,r,n,i,o=!1){"object"==typeof t?(this.scheme=t.scheme||h,this.authority=t.authority||h,this.path=t.path||h,this.query=t.query||h,this.fragment=t.fragment||h):(this.scheme=function(t,e){return t||e?t:"file"}(t,o),this.authority=e||h,this.path=function(t,e){switch(t){case"https":case"http":case"file":e?e[0]!==c&&(e=c+e):e=c}return e}(this.scheme,r||h),this.query=n||h,this.fragment=i||h,a(this,o))}get fsPath(){return v(this,!1)}with(t){if(!t)return this;let{scheme:e,authority:r,path:n,query:i,fragment:o}=t;return void 0===e?e=this.scheme:null===e&&(e=h),void 0===r?r=this.authority:null===r&&(r=h),void 0===n?n=this.path:null===n&&(n=h),void 0===i?i=this.query:null===i&&(i=h),void 0===o?o=this.fragment:null===o&&(o=h),e===this.scheme&&r===this.authority&&n===this.path&&i===this.query&&o===this.fragment?this:new d(e,r,n,i,o)}static parse(t,e=!1){const r=f.exec(t);return r?new d(r[2]||h,w(r[4]||h),w(r[5]||h),w(r[7]||h),w(r[9]||h),e):new d(h,h,h,h,h)}static file(t){let e=h;if(n.isWindows&&(t=t.replace(/\\/g,c)),t[0]===c&&t[1]===c){const r=t.indexOf(c,2);-1===r?(e=t.substring(2),t=c):(e=t.substring(2,r),t=t.substring(r)||c)}return new d("file",e,t,h,h)}static from(t){const e=new d(t.scheme,t.authority,t.path,t.query,t.fragment);return a(e,!0),e}toString(t=!1){return y(this,t)}toJSON(){return this}static revive(t){if(t){if(t instanceof u)return t;{const e=new d(t);return e._formatted=t.external,e._fsPath=t._sep===l?t.fsPath:null,e}}return t}}e.URI=u;const l=n.isWindows?1:void 0;class d extends u{_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=v(this,!1)),this._fsPath}toString(t=!1){return t?y(this,!0):(this._formatted||(this._formatted=y(this,!1)),this._formatted)}toJSON(){const t={$mid:1};return this._fsPath&&(t.fsPath=this._fsPath,t._sep=l),this._formatted&&(t.external=this._formatted),this.path&&(t.path=this.path),this.scheme&&(t.scheme=this.scheme),this.authority&&(t.authority=this.authority),this.query&&(t.query=this.query),this.fragment&&(t.fragment=this.fragment),t}}const p={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function g(t,e,r){let n,i=-1;for(let o=0;o<t.length;o++){const s=t.charCodeAt(o);if(s>=97&&s<=122||s>=65&&s<=90||s>=48&&s<=57||45===s||46===s||95===s||126===s||e&&47===s||r&&91===s||r&&93===s||r&&58===s)-1!==i&&(n+=encodeURIComponent(t.substring(i,o)),i=-1),void 0!==n&&(n+=t.charAt(o));else{void 0===n&&(n=t.substr(0,o));const e=p[s];void 0!==e?(-1!==i&&(n+=encodeURIComponent(t.substring(i,o)),i=-1),n+=e):-1===i&&(i=o)}}return-1!==i&&(n+=encodeURIComponent(t.substring(i))),void 0!==n?n:t}function m(t){let e;for(let r=0;r<t.length;r++){const n=t.charCodeAt(r);35===n||63===n?(void 0===e&&(e=t.substr(0,r)),e+=p[n]):void 0!==e&&(e+=t[r])}return void 0!==e?e:t}function v(t,e){let r;return r=t.authority&&t.path.length>1&&"file"===t.scheme?`//${t.authority}${t.path}`:47===t.path.charCodeAt(0)&&(t.path.charCodeAt(1)>=65&&t.path.charCodeAt(1)<=90||t.path.charCodeAt(1)>=97&&t.path.charCodeAt(1)<=122)&&58===t.path.charCodeAt(2)?e?t.path.substr(1):t.path[1].toLowerCase()+t.path.substr(2):t.path,n.isWindows&&(r=r.replace(/\//g,"\\")),r}function y(t,e){const r=e?m:g;let n="",{scheme:i,authority:o,path:s,query:a,fragment:h}=t;if(i&&(n+=i,n+=":"),(o||"file"===i)&&(n+=c,n+=c),o){let t=o.indexOf("@");if(-1!==t){const e=o.substr(0,t);o=o.substr(t+1),t=e.lastIndexOf(":"),-1===t?n+=r(e,!1,!1):(n+=r(e.substr(0,t),!1,!1),n+=":",n+=r(e.substr(t+1),!1,!0)),n+="@"}o=o.toLowerCase(),t=o.lastIndexOf(":"),-1===t?n+=r(o,!1,!0):(n+=r(o.substr(0,t),!1,!0),n+=o.substr(t))}if(s){if(s.length>=3&&47===s.charCodeAt(0)&&58===s.charCodeAt(2)){const t=s.charCodeAt(1);t>=65&&t<=90&&(s=`/${String.fromCharCode(t+32)}:${s.substr(3)}`)}else if(s.length>=2&&58===s.charCodeAt(1)){const t=s.charCodeAt(0);t>=65&&t<=90&&(s=`${String.fromCharCode(t+32)}:${s.substr(2)}`)}n+=r(s,!0,!1)}return a&&(n+="?",n+=r(a,!1,!1)),h&&(n+="#",n+=e?h:g(h,!1,!1)),n}function b(t){try{return decodeURIComponent(t)}catch{return t.length>3?t.substr(0,3)+b(t.substr(3)):t}}e.uriToFsPath=v;const C=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function w(t){return t.match(C)?t.replace(C,(t=>b(t))):t}},679:function(t,e,r){var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&n(e,t,r);return i(e,t),e};Object.defineProperty(e,"__esModule",{value:!0}),e.Utils=void 0;const s=o(r(470)),a=s.posix||s,h="/";var c;!function(t){t.joinPath=function(t,...e){return t.with({path:a.join(t.path,...e)})},t.resolvePath=function(t,...e){let r=t.path,n=!1;r[0]!==h&&(r=h+r,n=!0);let i=a.resolve(r,...e);return n&&i[0]===h&&!t.authority&&(i=i.substring(1)),t.with({path:i})},t.dirname=function(t){if(0===t.path.length||t.path===h)return t;let e=a.dirname(t.path);return 1===e.length&&46===e.charCodeAt(0)&&(e=""),t.with({path:e})},t.basename=function(t){return a.basename(t.path)},t.extname=function(t){return a.extname(t.path)}}(c||(e.Utils=c={}))}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var o=e[n]={exports:{}};return t[n].call(o.exports,o,o.exports,r),o.exports}var n={};return(()=>{var t=n;Object.defineProperty(t,"__esModule",{value:!0}),t.Utils=t.URI=void 0;const e=r(796);Object.defineProperty(t,"URI",{enumerable:!0,get:function(){return e.URI}});const i=r(679);Object.defineProperty(t,"Utils",{enumerable:!0,get:function(){return i.Utils}})})(),n})()));
|
|
19495
19482
|
//# sourceMappingURL=index.js.map
|
|
19496
19483
|
|
|
19497
19484
|
/***/ }),
|