intelligent-system-design-language 0.3.34 → 0.4.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/.claude/feedback-sweep.json +2 -2
- package/out/cli/cli-util.js +9 -3
- package/out/cli/cli-util.js.map +1 -1
- package/out/cli/components/derived-data-generator.js +45 -7
- package/out/cli/components/derived-data-generator.js.map +1 -1
- package/out/cli/components/dev-module-generator.js +399 -0
- package/out/cli/components/dev-module-generator.js.map +1 -0
- package/out/cli/components/method-generator.js +68 -7
- package/out/cli/components/method-generator.js.map +1 -1
- package/out/cli/components/utils.js +1 -1
- package/out/cli/components/utils.js.map +1 -1
- package/out/cli/components/vue/base-components/vue-string-choices.js +11 -4
- package/out/cli/components/vue/base-components/vue-string-choices.js.map +1 -1
- package/out/cli/generator.js +46 -42
- package/out/cli/generator.js.map +1 -1
- package/out/extension/main.cjs +713 -560
- package/out/extension/main.cjs.map +4 -4
- package/out/extension/main.js +2 -2
- package/out/extension/main.js.map +1 -1
- package/out/extension/package.json +1 -1
- package/out/language/generated/ast.js +13 -4
- package/out/language/generated/ast.js.map +1 -1
- package/out/language/generated/grammar.js +106 -32
- package/out/language/generated/grammar.js.map +1 -1
- package/out/language/intelligent-system-design-language-module.js +3 -1
- package/out/language/intelligent-system-design-language-module.js.map +1 -1
- package/out/language/intelligent-system-design-language-validator.js +20 -7
- package/out/language/intelligent-system-design-language-validator.js.map +1 -1
- package/out/language/isdl-completion-provider.js +32 -0
- package/out/language/isdl-completion-provider.js.map +1 -0
- package/out/language/isdl-docs.js +106 -0
- package/out/language/isdl-docs.js.map +1 -0
- package/out/language/isdl-hover-provider.js +4 -54
- package/out/language/isdl-hover-provider.js.map +1 -1
- package/out/language/isdl-parser-error-message-provider.js +6 -1
- package/out/language/isdl-parser-error-message-provider.js.map +1 -1
- package/out/language/main.cjs +636 -483
- package/out/language/main.cjs.map +4 -4
- package/out/package.json +1 -1
- package/package.json +1 -1
package/out/extension/main.cjs
CHANGED
|
@@ -400,7 +400,7 @@ var require_messages = __commonJS({
|
|
|
400
400
|
var require_linkedMap = __commonJS({
|
|
401
401
|
"node_modules/vscode-jsonrpc/lib/common/linkedMap.js"(exports2) {
|
|
402
402
|
"use strict";
|
|
403
|
-
var
|
|
403
|
+
var _a2;
|
|
404
404
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
405
405
|
exports2.LRUCache = exports2.LinkedMap = exports2.Touch = void 0;
|
|
406
406
|
var Touch;
|
|
@@ -413,7 +413,7 @@ var require_linkedMap = __commonJS({
|
|
|
413
413
|
})(Touch || (exports2.Touch = Touch = {}));
|
|
414
414
|
var LinkedMap = class {
|
|
415
415
|
constructor() {
|
|
416
|
-
this[
|
|
416
|
+
this[_a2] = "LinkedMap";
|
|
417
417
|
this._map = /* @__PURE__ */ new Map();
|
|
418
418
|
this._head = void 0;
|
|
419
419
|
this._tail = void 0;
|
|
@@ -434,12 +434,12 @@ var require_linkedMap = __commonJS({
|
|
|
434
434
|
return this._size;
|
|
435
435
|
}
|
|
436
436
|
get first() {
|
|
437
|
-
var
|
|
438
|
-
return (
|
|
437
|
+
var _a3;
|
|
438
|
+
return (_a3 = this._head) == null ? void 0 : _a3.value;
|
|
439
439
|
}
|
|
440
440
|
get last() {
|
|
441
|
-
var
|
|
442
|
-
return (
|
|
441
|
+
var _a3;
|
|
442
|
+
return (_a3 = this._tail) == null ? void 0 : _a3.value;
|
|
443
443
|
}
|
|
444
444
|
has(key) {
|
|
445
445
|
return this._map.has(key);
|
|
@@ -589,7 +589,7 @@ var require_linkedMap = __commonJS({
|
|
|
589
589
|
};
|
|
590
590
|
return iterator;
|
|
591
591
|
}
|
|
592
|
-
[(
|
|
592
|
+
[(_a2 = Symbol.toStringTag, Symbol.iterator)]() {
|
|
593
593
|
return this.entries();
|
|
594
594
|
}
|
|
595
595
|
trimOld(newSize) {
|
|
@@ -1233,7 +1233,7 @@ var require_messageReader = __commonJS({
|
|
|
1233
1233
|
var ResolvedMessageReaderOptions;
|
|
1234
1234
|
(function(ResolvedMessageReaderOptions2) {
|
|
1235
1235
|
function fromOptions(options) {
|
|
1236
|
-
var
|
|
1236
|
+
var _a2;
|
|
1237
1237
|
let charset;
|
|
1238
1238
|
let result;
|
|
1239
1239
|
let contentDecoder;
|
|
@@ -1243,7 +1243,7 @@ var require_messageReader = __commonJS({
|
|
|
1243
1243
|
if (options === void 0 || typeof options === "string") {
|
|
1244
1244
|
charset = options != null ? options : "utf-8";
|
|
1245
1245
|
} else {
|
|
1246
|
-
charset = (
|
|
1246
|
+
charset = (_a2 = options.charset) != null ? _a2 : "utf-8";
|
|
1247
1247
|
if (options.contentDecoder !== void 0) {
|
|
1248
1248
|
contentDecoder = options.contentDecoder;
|
|
1249
1249
|
contentDecoders.set(contentDecoder.name, contentDecoder);
|
|
@@ -1418,11 +1418,11 @@ var require_messageWriter = __commonJS({
|
|
|
1418
1418
|
var ResolvedMessageWriterOptions;
|
|
1419
1419
|
(function(ResolvedMessageWriterOptions2) {
|
|
1420
1420
|
function fromOptions(options) {
|
|
1421
|
-
var
|
|
1421
|
+
var _a2, _b2;
|
|
1422
1422
|
if (options === void 0 || typeof options === "string") {
|
|
1423
1423
|
return { charset: options != null ? options : "utf-8", contentTypeEncoder: (0, ral_1.default)().applicationJson.encoder };
|
|
1424
1424
|
} else {
|
|
1425
|
-
return { charset: (
|
|
1425
|
+
return { charset: (_a2 = options.charset) != null ? _a2 : "utf-8", contentEncoder: options.contentEncoder, contentTypeEncoder: (_b2 = options.contentTypeEncoder) != null ? _b2 : (0, ral_1.default)().applicationJson.encoder };
|
|
1426
1426
|
}
|
|
1427
1427
|
}
|
|
1428
1428
|
ResolvedMessageWriterOptions2.fromOptions = fromOptions;
|
|
@@ -2002,7 +2002,7 @@ var require_connection = __commonJS({
|
|
|
2002
2002
|
}
|
|
2003
2003
|
};
|
|
2004
2004
|
function handleRequest(requestMessage) {
|
|
2005
|
-
var
|
|
2005
|
+
var _a2;
|
|
2006
2006
|
if (isDisposed()) {
|
|
2007
2007
|
return;
|
|
2008
2008
|
}
|
|
@@ -2050,7 +2050,7 @@ var require_connection = __commonJS({
|
|
|
2050
2050
|
}
|
|
2051
2051
|
const startTime = Date.now();
|
|
2052
2052
|
if (requestHandler || starRequestHandler) {
|
|
2053
|
-
const tokenKey = (
|
|
2053
|
+
const tokenKey = (_a2 = requestMessage.id) != null ? _a2 : String(Date.now());
|
|
2054
2054
|
const cancellationSource = IdCancellationReceiverStrategy.is(cancellationStrategy.receiver) ? cancellationStrategy.receiver.createCancellationTokenSource(tokenKey) : cancellationStrategy.receiver.createCancellationTokenSource(requestMessage);
|
|
2055
2055
|
if (requestMessage.id !== null && knownCanceledRequests.has(requestMessage.id)) {
|
|
2056
2056
|
cancellationSource.cancel();
|
|
@@ -3631,9 +3631,9 @@ var require_main2 = __commonJS({
|
|
|
3631
3631
|
}
|
|
3632
3632
|
Diagnostic3.create = create;
|
|
3633
3633
|
function is(value) {
|
|
3634
|
-
var
|
|
3634
|
+
var _a2;
|
|
3635
3635
|
var candidate = value;
|
|
3636
|
-
return Is2.defined(candidate) && Range3.is(candidate.range) && Is2.string(candidate.message) && (Is2.number(candidate.severity) || Is2.undefined(candidate.severity)) && (Is2.integer(candidate.code) || Is2.string(candidate.code) || Is2.undefined(candidate.code)) && (Is2.undefined(candidate.codeDescription) || Is2.string((
|
|
3636
|
+
return Is2.defined(candidate) && Range3.is(candidate.range) && Is2.string(candidate.message) && (Is2.number(candidate.severity) || Is2.undefined(candidate.severity)) && (Is2.integer(candidate.code) || Is2.string(candidate.code) || Is2.undefined(candidate.code)) && (Is2.undefined(candidate.codeDescription) || Is2.string((_a2 = candidate.codeDescription) === null || _a2 === void 0 ? void 0 : _a2.href)) && (Is2.string(candidate.source) || Is2.undefined(candidate.source)) && (Is2.undefined(candidate.relatedInformation) || Is2.typedArray(candidate.relatedInformation, DiagnosticRelatedInformation2.is));
|
|
3637
3637
|
}
|
|
3638
3638
|
Diagnostic3.is = is;
|
|
3639
3639
|
})(Diagnostic2 || (exports3.Diagnostic = Diagnostic2 = {}));
|
|
@@ -4154,52 +4154,52 @@ var require_main2 = __commonJS({
|
|
|
4154
4154
|
}
|
|
4155
4155
|
TextDocumentItem3.is = is;
|
|
4156
4156
|
})(TextDocumentItem2 || (exports3.TextDocumentItem = TextDocumentItem2 = {}));
|
|
4157
|
-
var
|
|
4158
|
-
(function(
|
|
4159
|
-
|
|
4160
|
-
|
|
4157
|
+
var MarkupKind3;
|
|
4158
|
+
(function(MarkupKind4) {
|
|
4159
|
+
MarkupKind4.PlainText = "plaintext";
|
|
4160
|
+
MarkupKind4.Markdown = "markdown";
|
|
4161
4161
|
function is(value) {
|
|
4162
4162
|
var candidate = value;
|
|
4163
|
-
return candidate ===
|
|
4163
|
+
return candidate === MarkupKind4.PlainText || candidate === MarkupKind4.Markdown;
|
|
4164
4164
|
}
|
|
4165
|
-
|
|
4166
|
-
})(
|
|
4165
|
+
MarkupKind4.is = is;
|
|
4166
|
+
})(MarkupKind3 || (exports3.MarkupKind = MarkupKind3 = {}));
|
|
4167
4167
|
var MarkupContent2;
|
|
4168
4168
|
(function(MarkupContent3) {
|
|
4169
4169
|
function is(value) {
|
|
4170
4170
|
var candidate = value;
|
|
4171
|
-
return Is2.objectLiteral(value) &&
|
|
4171
|
+
return Is2.objectLiteral(value) && MarkupKind3.is(candidate.kind) && Is2.string(candidate.value);
|
|
4172
4172
|
}
|
|
4173
4173
|
MarkupContent3.is = is;
|
|
4174
4174
|
})(MarkupContent2 || (exports3.MarkupContent = MarkupContent2 = {}));
|
|
4175
|
-
var
|
|
4176
|
-
(function(
|
|
4177
|
-
|
|
4178
|
-
|
|
4179
|
-
|
|
4180
|
-
|
|
4181
|
-
|
|
4182
|
-
|
|
4183
|
-
|
|
4184
|
-
|
|
4185
|
-
|
|
4186
|
-
|
|
4187
|
-
|
|
4188
|
-
|
|
4189
|
-
|
|
4190
|
-
|
|
4191
|
-
|
|
4192
|
-
|
|
4193
|
-
|
|
4194
|
-
|
|
4195
|
-
|
|
4196
|
-
|
|
4197
|
-
|
|
4198
|
-
|
|
4199
|
-
|
|
4200
|
-
|
|
4201
|
-
|
|
4202
|
-
})(
|
|
4175
|
+
var CompletionItemKind5;
|
|
4176
|
+
(function(CompletionItemKind6) {
|
|
4177
|
+
CompletionItemKind6.Text = 1;
|
|
4178
|
+
CompletionItemKind6.Method = 2;
|
|
4179
|
+
CompletionItemKind6.Function = 3;
|
|
4180
|
+
CompletionItemKind6.Constructor = 4;
|
|
4181
|
+
CompletionItemKind6.Field = 5;
|
|
4182
|
+
CompletionItemKind6.Variable = 6;
|
|
4183
|
+
CompletionItemKind6.Class = 7;
|
|
4184
|
+
CompletionItemKind6.Interface = 8;
|
|
4185
|
+
CompletionItemKind6.Module = 9;
|
|
4186
|
+
CompletionItemKind6.Property = 10;
|
|
4187
|
+
CompletionItemKind6.Unit = 11;
|
|
4188
|
+
CompletionItemKind6.Value = 12;
|
|
4189
|
+
CompletionItemKind6.Enum = 13;
|
|
4190
|
+
CompletionItemKind6.Keyword = 14;
|
|
4191
|
+
CompletionItemKind6.Snippet = 15;
|
|
4192
|
+
CompletionItemKind6.Color = 16;
|
|
4193
|
+
CompletionItemKind6.File = 17;
|
|
4194
|
+
CompletionItemKind6.Reference = 18;
|
|
4195
|
+
CompletionItemKind6.Folder = 19;
|
|
4196
|
+
CompletionItemKind6.EnumMember = 20;
|
|
4197
|
+
CompletionItemKind6.Constant = 21;
|
|
4198
|
+
CompletionItemKind6.Struct = 22;
|
|
4199
|
+
CompletionItemKind6.Event = 23;
|
|
4200
|
+
CompletionItemKind6.Operator = 24;
|
|
4201
|
+
CompletionItemKind6.TypeParameter = 25;
|
|
4202
|
+
})(CompletionItemKind5 || (exports3.CompletionItemKind = CompletionItemKind5 = {}));
|
|
4203
4203
|
var InsertTextFormat2;
|
|
4204
4204
|
(function(InsertTextFormat3) {
|
|
4205
4205
|
InsertTextFormat3.PlainText = 1;
|
|
@@ -7740,7 +7740,7 @@ var require_protocolConverter = __commonJS({
|
|
|
7740
7740
|
return _uriConverter(value);
|
|
7741
7741
|
}
|
|
7742
7742
|
function asDocumentSelector(selector) {
|
|
7743
|
-
var
|
|
7743
|
+
var _a2;
|
|
7744
7744
|
const result = [];
|
|
7745
7745
|
for (const filter2 of selector) {
|
|
7746
7746
|
if (typeof filter2 === "string") {
|
|
@@ -7749,7 +7749,7 @@ var require_protocolConverter = __commonJS({
|
|
|
7749
7749
|
if (typeof filter2.notebook === "string") {
|
|
7750
7750
|
result.push({ notebookType: filter2.notebook, language: filter2.language });
|
|
7751
7751
|
} else {
|
|
7752
|
-
const notebookType = (
|
|
7752
|
+
const notebookType = (_a2 = filter2.notebook.notebookType) != null ? _a2 : "*";
|
|
7753
7753
|
result.push({ notebookType, scheme: filter2.notebook.scheme, pattern: filter2.notebook.pattern, language: filter2.language });
|
|
7754
7754
|
}
|
|
7755
7755
|
} else if (vscode_languageserver_protocol_1.TextDocumentFilter.is(filter2)) {
|
|
@@ -7933,15 +7933,15 @@ var require_protocolConverter = __commonJS({
|
|
|
7933
7933
|
const list = value;
|
|
7934
7934
|
const { defaultRange, commitCharacters } = getCompletionItemDefaults(list, allCommitCharacters);
|
|
7935
7935
|
const converted = await async.map(list.items, (item) => {
|
|
7936
|
-
var
|
|
7937
|
-
return asCompletionItem(item, commitCharacters, defaultRange, (
|
|
7936
|
+
var _a2, _b2, _c2;
|
|
7937
|
+
return asCompletionItem(item, commitCharacters, defaultRange, (_a2 = list.itemDefaults) == null ? void 0 : _a2.insertTextMode, (_b2 = list.itemDefaults) == null ? void 0 : _b2.insertTextFormat, (_c2 = list.itemDefaults) == null ? void 0 : _c2.data);
|
|
7938
7938
|
}, token);
|
|
7939
7939
|
return new code.CompletionList(converted, list.isIncomplete);
|
|
7940
7940
|
}
|
|
7941
7941
|
function getCompletionItemDefaults(list, allCommitCharacters) {
|
|
7942
|
-
var
|
|
7943
|
-
const rangeDefaults = (
|
|
7944
|
-
const commitCharacters = (
|
|
7942
|
+
var _a2, _b2, _c2;
|
|
7943
|
+
const rangeDefaults = (_a2 = list.itemDefaults) == null ? void 0 : _a2.editRange;
|
|
7944
|
+
const commitCharacters = (_c2 = (_b2 = list.itemDefaults) == null ? void 0 : _b2.commitCharacters) != null ? _c2 : allCommitCharacters;
|
|
7945
7945
|
return ls.Range.is(rangeDefaults) ? { defaultRange: asRange(rangeDefaults), commitCharacters } : rangeDefaults !== void 0 ? { defaultRange: { inserting: asRange(rangeDefaults.insert), replacing: asRange(rangeDefaults.replace) }, commitCharacters } : { defaultRange: void 0, commitCharacters };
|
|
7946
7946
|
}
|
|
7947
7947
|
function asCompletionItemKind(value) {
|
|
@@ -7971,7 +7971,7 @@ var require_protocolConverter = __commonJS({
|
|
|
7971
7971
|
return result;
|
|
7972
7972
|
}
|
|
7973
7973
|
function asCompletionItem(item, defaultCommitCharacters, defaultRange, defaultInsertTextMode, defaultInsertTextFormat, defaultData) {
|
|
7974
|
-
var
|
|
7974
|
+
var _a2, _b2;
|
|
7975
7975
|
const tags = asCompletionItemTags(item.tags);
|
|
7976
7976
|
const label = asCompletionItemLabel(item);
|
|
7977
7977
|
const result = new protocolCompletionItem_1.default(label);
|
|
@@ -8020,14 +8020,14 @@ var require_protocolConverter = __commonJS({
|
|
|
8020
8020
|
if (item.preselect === true || item.preselect === false) {
|
|
8021
8021
|
result.preselect = item.preselect;
|
|
8022
8022
|
}
|
|
8023
|
-
const data = (
|
|
8023
|
+
const data = (_a2 = item.data) != null ? _a2 : defaultData;
|
|
8024
8024
|
if (data !== void 0) {
|
|
8025
8025
|
result.data = data;
|
|
8026
8026
|
}
|
|
8027
8027
|
if (tags.length > 0) {
|
|
8028
8028
|
result.tags = tags;
|
|
8029
8029
|
}
|
|
8030
|
-
const insertTextMode = (
|
|
8030
|
+
const insertTextMode = (_b2 = item.insertTextMode) != null ? _b2 : defaultInsertTextMode;
|
|
8031
8031
|
if (insertTextMode !== void 0) {
|
|
8032
8032
|
result.insertTextMode = insertTextMode;
|
|
8033
8033
|
if (insertTextMode === ls.InsertTextMode.asIs) {
|
|
@@ -8048,10 +8048,10 @@ var require_protocolConverter = __commonJS({
|
|
|
8048
8048
|
}
|
|
8049
8049
|
}
|
|
8050
8050
|
function asCompletionInsertText(item, defaultRange, defaultInsertTextFormat) {
|
|
8051
|
-
var
|
|
8052
|
-
const insertTextFormat = (
|
|
8051
|
+
var _a2, _b2;
|
|
8052
|
+
const insertTextFormat = (_a2 = item.insertTextFormat) != null ? _a2 : defaultInsertTextFormat;
|
|
8053
8053
|
if (item.textEdit !== void 0 || defaultRange !== void 0) {
|
|
8054
|
-
const [range, newText] = item.textEdit !== void 0 ? getCompletionRangeAndText(item.textEdit) : [defaultRange, (
|
|
8054
|
+
const [range, newText] = item.textEdit !== void 0 ? getCompletionRangeAndText(item.textEdit) : [defaultRange, (_b2 = item.textEditText) != null ? _b2 : item.label];
|
|
8055
8055
|
if (insertTextFormat === ls.InsertTextFormat.Snippet) {
|
|
8056
8056
|
return { text: new code.SnippetString(newText), range, fromEdit: true };
|
|
8057
8057
|
} else {
|
|
@@ -8258,10 +8258,10 @@ var require_protocolConverter = __commonJS({
|
|
|
8258
8258
|
return result.length === 0 ? void 0 : result;
|
|
8259
8259
|
}
|
|
8260
8260
|
function asSymbolInformation(item) {
|
|
8261
|
-
var
|
|
8261
|
+
var _a2, _b2;
|
|
8262
8262
|
const data = item.data;
|
|
8263
8263
|
const location = item.location;
|
|
8264
|
-
const result = location.range === void 0 || data !== void 0 ? new protocolWorkspaceSymbol_1.default(item.name, asSymbolKind(item.kind), (
|
|
8264
|
+
const result = location.range === void 0 || data !== void 0 ? new protocolWorkspaceSymbol_1.default(item.name, asSymbolKind(item.kind), (_a2 = item.containerName) != null ? _a2 : "", location.range === void 0 ? _uriConverter(location.uri) : new code.Location(_uriConverter(item.location.uri), asRange(location.range)), data) : new code.SymbolInformation(item.name, asSymbolKind(item.kind), (_b2 = item.containerName) != null ? _b2 : "", new code.Location(_uriConverter(item.location.uri), asRange(location.range)));
|
|
8265
8265
|
fillTags(result, item);
|
|
8266
8266
|
return result;
|
|
8267
8267
|
}
|
|
@@ -9168,12 +9168,12 @@ var require_features = __commonJS({
|
|
|
9168
9168
|
this._registrations.clear();
|
|
9169
9169
|
}
|
|
9170
9170
|
getRegistration(documentSelector, capability) {
|
|
9171
|
-
var
|
|
9171
|
+
var _a2;
|
|
9172
9172
|
if (!capability) {
|
|
9173
9173
|
return [void 0, void 0];
|
|
9174
9174
|
} else if (vscode_languageserver_protocol_1.TextDocumentRegistrationOptions.is(capability)) {
|
|
9175
9175
|
const id = vscode_languageserver_protocol_1.StaticRegistrationOptions.hasId(capability) ? capability.id : UUID.generateUuid();
|
|
9176
|
-
const selector = (
|
|
9176
|
+
const selector = (_a2 = capability.documentSelector) != null ? _a2 : documentSelector;
|
|
9177
9177
|
if (selector) {
|
|
9178
9178
|
return [id, Object.assign({}, capability, { documentSelector: selector })];
|
|
9179
9179
|
}
|
|
@@ -10132,8 +10132,8 @@ var require_diagnostic = __commonJS({
|
|
|
10132
10132
|
this.disposable.dispose();
|
|
10133
10133
|
}
|
|
10134
10134
|
isActive(document) {
|
|
10135
|
-
var
|
|
10136
|
-
return document instanceof vscode_1.Uri ? ((
|
|
10135
|
+
var _a2, _b2;
|
|
10136
|
+
return document instanceof vscode_1.Uri ? ((_a2 = vscode_1.window.activeTextEditor) == null ? void 0 : _a2.document.uri) === document : ((_b2 = vscode_1.window.activeTextEditor) == null ? void 0 : _b2.document) === document;
|
|
10137
10137
|
}
|
|
10138
10138
|
isVisible(document) {
|
|
10139
10139
|
const uri = document instanceof vscode_1.Uri ? document : document.uri;
|
|
@@ -10215,10 +10215,10 @@ var require_diagnostic = __commonJS({
|
|
|
10215
10215
|
return states.has(key);
|
|
10216
10216
|
}
|
|
10217
10217
|
getResultId(kind, document) {
|
|
10218
|
-
var
|
|
10218
|
+
var _a2;
|
|
10219
10219
|
const key = DocumentOrUri.asKey(document);
|
|
10220
10220
|
const states = kind === PullState.document ? this.documentPullStates : this.workspacePullStates;
|
|
10221
|
-
return (
|
|
10221
|
+
return (_a2 = states.get(key)) == null ? void 0 : _a2.resultId;
|
|
10222
10222
|
}
|
|
10223
10223
|
getAllResultIds() {
|
|
10224
10224
|
const result = [];
|
|
@@ -10267,7 +10267,7 @@ var require_diagnostic = __commonJS({
|
|
|
10267
10267
|
});
|
|
10268
10268
|
}
|
|
10269
10269
|
async pullAsync(document, version) {
|
|
10270
|
-
var
|
|
10270
|
+
var _a2;
|
|
10271
10271
|
if (this.isDisposed) {
|
|
10272
10272
|
return;
|
|
10273
10273
|
}
|
|
@@ -10283,7 +10283,7 @@ var require_diagnostic = __commonJS({
|
|
|
10283
10283
|
let report;
|
|
10284
10284
|
let afterState;
|
|
10285
10285
|
try {
|
|
10286
|
-
report = (
|
|
10286
|
+
report = (_a2 = await this.provider.provideDiagnostics(document, documentState.resultId, tokenSource.token)) != null ? _a2 : { kind: vsdiag.DocumentDiagnosticReportKind.full, items: [] };
|
|
10287
10287
|
} catch (error) {
|
|
10288
10288
|
if (error instanceof features_1.LSPCancellationError && vscode_languageserver_protocol_1.DiagnosticServerCancellationData.is(error.data) && error.data.retriggerRequest === false) {
|
|
10289
10289
|
afterState = { state: RequestStateKind.outDated, document };
|
|
@@ -10386,7 +10386,7 @@ var require_diagnostic = __commonJS({
|
|
|
10386
10386
|
};
|
|
10387
10387
|
});
|
|
10388
10388
|
await this.provider.provideWorkspaceDiagnostics(previousResultIds, this.workspaceCancellation.token, (chunk) => {
|
|
10389
|
-
var
|
|
10389
|
+
var _a2;
|
|
10390
10390
|
if (!chunk || this.isDisposed) {
|
|
10391
10391
|
return;
|
|
10392
10392
|
}
|
|
@@ -10396,7 +10396,7 @@ var require_diagnostic = __commonJS({
|
|
|
10396
10396
|
this.diagnostics.set(item.uri, item.items);
|
|
10397
10397
|
}
|
|
10398
10398
|
}
|
|
10399
|
-
this.documentStates.update(PullState.workspace, item.uri, (
|
|
10399
|
+
this.documentStates.update(PullState.workspace, item.uri, (_a2 = item.version) != null ? _a2 : void 0, item.resultId);
|
|
10400
10400
|
}
|
|
10401
10401
|
});
|
|
10402
10402
|
}
|
|
@@ -10509,10 +10509,10 @@ var require_diagnostic = __commonJS({
|
|
|
10509
10509
|
return result;
|
|
10510
10510
|
}
|
|
10511
10511
|
dispose() {
|
|
10512
|
-
var
|
|
10512
|
+
var _a2, _b2;
|
|
10513
10513
|
this.isDisposed = true;
|
|
10514
|
-
(
|
|
10515
|
-
(
|
|
10514
|
+
(_a2 = this.workspaceCancellation) == null ? void 0 : _a2.cancel();
|
|
10515
|
+
(_b2 = this.workspaceTimeout) == null ? void 0 : _b2.dispose();
|
|
10516
10516
|
for (const [key, request] of this.openRequests) {
|
|
10517
10517
|
if (request.state === RequestStateKind.active) {
|
|
10518
10518
|
request.tokenSource.cancel();
|
|
@@ -10575,8 +10575,8 @@ var require_diagnostic = __commonJS({
|
|
|
10575
10575
|
this.documents.clear();
|
|
10576
10576
|
}
|
|
10577
10577
|
stop() {
|
|
10578
|
-
var
|
|
10579
|
-
(
|
|
10578
|
+
var _a2;
|
|
10579
|
+
(_a2 = this.intervalHandle) == null ? void 0 : _a2.dispose();
|
|
10580
10580
|
this.intervalHandle = void 0;
|
|
10581
10581
|
this.endDocument = void 0;
|
|
10582
10582
|
}
|
|
@@ -10586,8 +10586,8 @@ var require_diagnostic = __commonJS({
|
|
|
10586
10586
|
};
|
|
10587
10587
|
var DiagnosticFeatureProviderImpl = class {
|
|
10588
10588
|
constructor(client2, tabs, options) {
|
|
10589
|
-
var
|
|
10590
|
-
const diagnosticPullOptions = (
|
|
10589
|
+
var _a2, _b2;
|
|
10590
|
+
const diagnosticPullOptions = (_a2 = client2.clientOptions.diagnosticPullOptions) != null ? _a2 : { onChange: true, onSave: false };
|
|
10591
10591
|
const documentSelector = client2.protocol2CodeConverter.asDocumentSelector(options.documentSelector);
|
|
10592
10592
|
const disposables = [];
|
|
10593
10593
|
const matchResource = (resource) => {
|
|
@@ -10624,8 +10624,8 @@ var require_diagnostic = __commonJS({
|
|
|
10624
10624
|
return document instanceof vscode_1.Uri ? matchResource(document) : vscode_1.languages.match(documentSelector, document) > 0 && tabs.isVisible(document);
|
|
10625
10625
|
};
|
|
10626
10626
|
const isActiveDocument = (document) => {
|
|
10627
|
-
var
|
|
10628
|
-
return document instanceof vscode_1.Uri ? ((
|
|
10627
|
+
var _a3;
|
|
10628
|
+
return document instanceof vscode_1.Uri ? ((_a3 = this.activeTextDocument) == null ? void 0 : _a3.uri.toString()) === document.toString() : this.activeTextDocument === document;
|
|
10629
10629
|
};
|
|
10630
10630
|
this.diagnosticRequestor = new DiagnosticRequestor(client2, tabs, options);
|
|
10631
10631
|
this.backgroundScheduler = new BackgroundScheduler(this.diagnosticRequestor);
|
|
@@ -10635,7 +10635,7 @@ var require_diagnostic = __commonJS({
|
|
|
10635
10635
|
}
|
|
10636
10636
|
this.backgroundScheduler.add(document);
|
|
10637
10637
|
};
|
|
10638
|
-
this.activeTextDocument = (
|
|
10638
|
+
this.activeTextDocument = (_b2 = vscode_1.window.activeTextEditor) == null ? void 0 : _b2.document;
|
|
10639
10639
|
vscode_1.window.onDidChangeActiveTextEditor((editor) => {
|
|
10640
10640
|
const oldActive = this.activeTextDocument;
|
|
10641
10641
|
this.activeTextDocument = editor == null ? void 0 : editor.document;
|
|
@@ -11069,12 +11069,12 @@ var require_notebook = __commonJS({
|
|
|
11069
11069
|
var $NotebookDocumentSyncOptions;
|
|
11070
11070
|
(function($NotebookDocumentSyncOptions2) {
|
|
11071
11071
|
function asDocumentSelector(options) {
|
|
11072
|
-
var
|
|
11072
|
+
var _a2, _b2, _c2, _d;
|
|
11073
11073
|
const selector = options.notebookSelector;
|
|
11074
11074
|
const result = [];
|
|
11075
11075
|
for (const element of selector) {
|
|
11076
|
-
const notebookType = (
|
|
11077
|
-
const scheme = typeof element.notebook === "string" ? void 0 : (
|
|
11076
|
+
const notebookType = (_b2 = typeof element.notebook === "string" ? element.notebook : (_a2 = element.notebook) == null ? void 0 : _a2.notebookType) != null ? _b2 : "*";
|
|
11077
|
+
const scheme = typeof element.notebook === "string" ? void 0 : (_c2 = element.notebook) == null ? void 0 : _c2.scheme;
|
|
11078
11078
|
const pattern = typeof element.notebook === "string" ? void 0 : (_d = element.notebook) == null ? void 0 : _d.pattern;
|
|
11079
11079
|
if (element.cells !== void 0) {
|
|
11080
11080
|
for (const cell of element.cells) {
|
|
@@ -11284,7 +11284,7 @@ var require_notebook = __commonJS({
|
|
|
11284
11284
|
return this.doSendOpen(notebookDocument, cells);
|
|
11285
11285
|
}
|
|
11286
11286
|
async doSendOpen(notebookDocument, cells) {
|
|
11287
|
-
var
|
|
11287
|
+
var _a2;
|
|
11288
11288
|
const send = async (notebookDocument2, cells2) => {
|
|
11289
11289
|
const nb = Converter.c2p.asNotebookDocument(notebookDocument2, cells2, this.client.code2ProtocolConverter);
|
|
11290
11290
|
const cellDocuments = cells2.map((cell) => this.client.code2ProtocolConverter.asTextDocumentItem(cell.document));
|
|
@@ -11298,7 +11298,7 @@ var require_notebook = __commonJS({
|
|
|
11298
11298
|
throw error;
|
|
11299
11299
|
}
|
|
11300
11300
|
};
|
|
11301
|
-
const middleware = (
|
|
11301
|
+
const middleware = (_a2 = this.client.middleware) == null ? void 0 : _a2.notebooks;
|
|
11302
11302
|
this.notebookSyncInfo.set(notebookDocument.uri.toString(), SyncInfo.create(cells));
|
|
11303
11303
|
return (middleware == null ? void 0 : middleware.didOpen) !== void 0 ? middleware.didOpen(notebookDocument, cells, send) : send(notebookDocument, cells);
|
|
11304
11304
|
}
|
|
@@ -11306,7 +11306,7 @@ var require_notebook = __commonJS({
|
|
|
11306
11306
|
return this.doSendChange(event, void 0);
|
|
11307
11307
|
}
|
|
11308
11308
|
async doSendChange(event, cells = this.getMatchingCells(event.notebook)) {
|
|
11309
|
-
var
|
|
11309
|
+
var _a2, _b2;
|
|
11310
11310
|
const send = async (event2) => {
|
|
11311
11311
|
try {
|
|
11312
11312
|
await this.client.sendNotification(proto2.DidChangeNotebookDocumentNotification.type, {
|
|
@@ -11318,8 +11318,8 @@ var require_notebook = __commonJS({
|
|
|
11318
11318
|
throw error;
|
|
11319
11319
|
}
|
|
11320
11320
|
};
|
|
11321
|
-
const middleware = (
|
|
11322
|
-
if (((
|
|
11321
|
+
const middleware = (_a2 = this.client.middleware) == null ? void 0 : _a2.notebooks;
|
|
11322
|
+
if (((_b2 = event.cells) == null ? void 0 : _b2.structure) !== void 0) {
|
|
11323
11323
|
this.notebookSyncInfo.set(event.notebook.uri.toString(), SyncInfo.create(cells != null ? cells : []));
|
|
11324
11324
|
}
|
|
11325
11325
|
return (middleware == null ? void 0 : middleware.didChange) !== void 0 ? middleware == null ? void 0 : middleware.didChange(event, send) : send(event);
|
|
@@ -11328,7 +11328,7 @@ var require_notebook = __commonJS({
|
|
|
11328
11328
|
return this.doSendSave(notebookDocument);
|
|
11329
11329
|
}
|
|
11330
11330
|
async doSendSave(notebookDocument) {
|
|
11331
|
-
var
|
|
11331
|
+
var _a2;
|
|
11332
11332
|
const send = async (notebookDocument2) => {
|
|
11333
11333
|
try {
|
|
11334
11334
|
await this.client.sendNotification(proto2.DidSaveNotebookDocumentNotification.type, {
|
|
@@ -11339,15 +11339,15 @@ var require_notebook = __commonJS({
|
|
|
11339
11339
|
throw error;
|
|
11340
11340
|
}
|
|
11341
11341
|
};
|
|
11342
|
-
const middleware = (
|
|
11342
|
+
const middleware = (_a2 = this.client.middleware) == null ? void 0 : _a2.notebooks;
|
|
11343
11343
|
return (middleware == null ? void 0 : middleware.didSave) !== void 0 ? middleware.didSave(notebookDocument, send) : send(notebookDocument);
|
|
11344
11344
|
}
|
|
11345
11345
|
async sendDidCloseNotebookDocument(notebookDocument) {
|
|
11346
|
-
var
|
|
11347
|
-
return this.doSendClose(notebookDocument, (
|
|
11346
|
+
var _a2;
|
|
11347
|
+
return this.doSendClose(notebookDocument, (_a2 = this.getMatchingCells(notebookDocument)) != null ? _a2 : []);
|
|
11348
11348
|
}
|
|
11349
11349
|
async doSendClose(notebookDocument, cells) {
|
|
11350
|
-
var
|
|
11350
|
+
var _a2;
|
|
11351
11351
|
const send = async (notebookDocument2, cells2) => {
|
|
11352
11352
|
try {
|
|
11353
11353
|
await this.client.sendNotification(proto2.DidCloseNotebookDocumentNotification.type, {
|
|
@@ -11359,12 +11359,12 @@ var require_notebook = __commonJS({
|
|
|
11359
11359
|
throw error;
|
|
11360
11360
|
}
|
|
11361
11361
|
};
|
|
11362
|
-
const middleware = (
|
|
11362
|
+
const middleware = (_a2 = this.client.middleware) == null ? void 0 : _a2.notebooks;
|
|
11363
11363
|
this.notebookSyncInfo.delete(notebookDocument.uri.toString());
|
|
11364
11364
|
return (middleware == null ? void 0 : middleware.didClose) !== void 0 ? middleware.didClose(notebookDocument, cells, send) : send(notebookDocument, cells);
|
|
11365
11365
|
}
|
|
11366
11366
|
asNotebookDocumentChangeEvent(notebook, event, syncInfo, matchingCells) {
|
|
11367
|
-
var
|
|
11367
|
+
var _a2, _b2;
|
|
11368
11368
|
if (event !== void 0 && event.notebook !== notebook) {
|
|
11369
11369
|
throw new Error("Notebook must be identical");
|
|
11370
11370
|
}
|
|
@@ -11384,7 +11384,7 @@ var require_notebook = __commonJS({
|
|
|
11384
11384
|
}
|
|
11385
11385
|
}
|
|
11386
11386
|
if (data.length > 0) {
|
|
11387
|
-
result.cells = (
|
|
11387
|
+
result.cells = (_a2 = result.cells) != null ? _a2 : {};
|
|
11388
11388
|
result.cells.data = data;
|
|
11389
11389
|
}
|
|
11390
11390
|
}
|
|
@@ -11403,7 +11403,7 @@ var require_notebook = __commonJS({
|
|
|
11403
11403
|
addedCells.delete(key);
|
|
11404
11404
|
}
|
|
11405
11405
|
}
|
|
11406
|
-
result.cells = (
|
|
11406
|
+
result.cells = (_b2 = result.cells) != null ? _b2 : {};
|
|
11407
11407
|
const didOpen = [];
|
|
11408
11408
|
const didClose = [];
|
|
11409
11409
|
if (addedCells.size > 0 || removedCells.size > 0) {
|
|
@@ -11440,12 +11440,12 @@ var require_notebook = __commonJS({
|
|
|
11440
11440
|
return cells !== void 0 && cells[0] === cell;
|
|
11441
11441
|
}
|
|
11442
11442
|
filterCells(notebookDocument, cells, cellSelector) {
|
|
11443
|
-
var
|
|
11443
|
+
var _a2;
|
|
11444
11444
|
const filtered = cellSelector !== void 0 ? cells.filter((cell) => {
|
|
11445
11445
|
const cellLanguage = cell.document.languageId;
|
|
11446
11446
|
return cellSelector.some((filter2) => filter2.language === "*" || cellLanguage === filter2.language);
|
|
11447
11447
|
}) : cells;
|
|
11448
|
-
return typeof ((
|
|
11448
|
+
return typeof ((_a2 = this.client.clientOptions.notebookDocumentOptions) == null ? void 0 : _a2.filterCells) === "function" ? this.client.clientOptions.notebookDocumentOptions.filterCells(notebookDocument, filtered) : filtered;
|
|
11449
11449
|
}
|
|
11450
11450
|
};
|
|
11451
11451
|
var NotebookDocumentSyncFeature = class _NotebookDocumentSyncFeature {
|
|
@@ -11525,12 +11525,12 @@ var require_notebook = __commonJS({
|
|
|
11525
11525
|
this.dedicatedChannel = this.client.protocol2CodeConverter.asDocumentSelector($NotebookDocumentSyncOptions.asDocumentSelector(options));
|
|
11526
11526
|
}
|
|
11527
11527
|
initialize(capabilities) {
|
|
11528
|
-
var
|
|
11528
|
+
var _a2;
|
|
11529
11529
|
const options = capabilities.notebookDocumentSync;
|
|
11530
11530
|
if (options === void 0) {
|
|
11531
11531
|
return;
|
|
11532
11532
|
}
|
|
11533
|
-
const id = (
|
|
11533
|
+
const id = (_a2 = options.id) != null ? _a2 : UUID.generateUuid();
|
|
11534
11534
|
this.register({ id, registerOptions: options });
|
|
11535
11535
|
}
|
|
11536
11536
|
register(data) {
|
|
@@ -11686,9 +11686,9 @@ var require_configuration = __commonJS({
|
|
|
11686
11686
|
(0, features_1.ensure)((0, features_1.ensure)(capabilities, "workspace"), "didChangeConfiguration").dynamicRegistration = true;
|
|
11687
11687
|
}
|
|
11688
11688
|
initialize() {
|
|
11689
|
-
var
|
|
11689
|
+
var _a2;
|
|
11690
11690
|
this.isCleared = false;
|
|
11691
|
-
let section = (
|
|
11691
|
+
let section = (_a2 = this._client.clientOptions.synchronize) == null ? void 0 : _a2.configurationSection;
|
|
11692
11692
|
if (section !== void 0) {
|
|
11693
11693
|
this.register({
|
|
11694
11694
|
id: UUID.generateUuid(),
|
|
@@ -11722,7 +11722,7 @@ var require_configuration = __commonJS({
|
|
|
11722
11722
|
this.isCleared = true;
|
|
11723
11723
|
}
|
|
11724
11724
|
onDidChangeConfiguration(configurationSection, event) {
|
|
11725
|
-
var
|
|
11725
|
+
var _a2;
|
|
11726
11726
|
if (this.isCleared) {
|
|
11727
11727
|
return;
|
|
11728
11728
|
}
|
|
@@ -11745,7 +11745,7 @@ var require_configuration = __commonJS({
|
|
|
11745
11745
|
return this._client.sendNotification(vscode_languageserver_protocol_1.DidChangeConfigurationNotification.type, { settings: this.extractSettingsInformation(sections2) });
|
|
11746
11746
|
}
|
|
11747
11747
|
};
|
|
11748
|
-
let middleware = (
|
|
11748
|
+
let middleware = (_a2 = this._client.middleware.workspace) == null ? void 0 : _a2.didChangeConfiguration;
|
|
11749
11749
|
(middleware ? middleware(sections, didChangeConfiguration) : didChangeConfiguration(sections)).catch((error) => {
|
|
11750
11750
|
this._client.error(`Sending notification ${vscode_languageserver_protocol_1.DidChangeConfigurationNotification.type.method} failed`, error);
|
|
11751
11751
|
});
|
|
@@ -12259,9 +12259,9 @@ var require_completion = __commonJS({
|
|
|
12259
12259
|
});
|
|
12260
12260
|
}
|
|
12261
12261
|
registerLanguageProvider(options, id) {
|
|
12262
|
-
var
|
|
12263
|
-
this.labelDetailsSupport.set(id, !!((
|
|
12264
|
-
const triggerCharacters = (
|
|
12262
|
+
var _a2, _b2;
|
|
12263
|
+
this.labelDetailsSupport.set(id, !!((_a2 = options.completionItem) == null ? void 0 : _a2.labelDetailsSupport));
|
|
12264
|
+
const triggerCharacters = (_b2 = options.triggerCharacters) != null ? _b2 : [];
|
|
12265
12265
|
const defaultCommitCharacters = options.allCommitCharacters;
|
|
12266
12266
|
const selector = options.documentSelector;
|
|
12267
12267
|
const provider = {
|
|
@@ -14298,8 +14298,8 @@ var require_fileOperations = __commonJS({
|
|
|
14298
14298
|
assign2(value, this._clientCapability, true);
|
|
14299
14299
|
}
|
|
14300
14300
|
initialize(capabilities) {
|
|
14301
|
-
var
|
|
14302
|
-
const options = (
|
|
14301
|
+
var _a2;
|
|
14302
|
+
const options = (_a2 = capabilities.workspace) == null ? void 0 : _a2.fileOperations;
|
|
14303
14303
|
const capability = options !== void 0 ? access(options, this._serverCapability) : void 0;
|
|
14304
14304
|
if ((capability == null ? void 0 : capability.filters) !== void 0) {
|
|
14305
14305
|
try {
|
|
@@ -15039,7 +15039,7 @@ var require_client = __commonJS({
|
|
|
15039
15039
|
})(MessageTransports || (exports2.MessageTransports = MessageTransports = {}));
|
|
15040
15040
|
var BaseLanguageClient = class _BaseLanguageClient {
|
|
15041
15041
|
constructor(id, name, clientOptions) {
|
|
15042
|
-
var
|
|
15042
|
+
var _a2, _b2, _c2, _d, _e, _f, _g, _h, _i, _j;
|
|
15043
15043
|
this._traceFormat = vscode_languageserver_protocol_1.TraceFormat.Text;
|
|
15044
15044
|
this._diagnosticQueue = /* @__PURE__ */ new Map();
|
|
15045
15045
|
this._diagnosticQueueState = { state: "idle" };
|
|
@@ -15055,10 +15055,10 @@ var require_client = __commonJS({
|
|
|
15055
15055
|
markdown.supportHtml = clientOptions.markdown.supportHtml === true;
|
|
15056
15056
|
}
|
|
15057
15057
|
this._clientOptions = {
|
|
15058
|
-
documentSelector: (
|
|
15059
|
-
synchronize: (
|
|
15058
|
+
documentSelector: (_a2 = clientOptions.documentSelector) != null ? _a2 : [],
|
|
15059
|
+
synchronize: (_b2 = clientOptions.synchronize) != null ? _b2 : {},
|
|
15060
15060
|
diagnosticCollectionName: clientOptions.diagnosticCollectionName,
|
|
15061
|
-
outputChannelName: (
|
|
15061
|
+
outputChannelName: (_c2 = clientOptions.outputChannelName) != null ? _c2 : this._name,
|
|
15062
15062
|
revealOutputChannelOn: (_d = clientOptions.revealOutputChannelOn) != null ? _d : RevealOutputChannelOn.Error,
|
|
15063
15063
|
stdioEncoding: (_e = clientOptions.stdioEncoding) != null ? _e : "utf8",
|
|
15064
15064
|
initializationOptions: clientOptions.initializationOptions,
|
|
@@ -15129,8 +15129,8 @@ var require_client = __commonJS({
|
|
|
15129
15129
|
return this._name;
|
|
15130
15130
|
}
|
|
15131
15131
|
get middleware() {
|
|
15132
|
-
var
|
|
15133
|
-
return (
|
|
15132
|
+
var _a2;
|
|
15133
|
+
return (_a2 = this._clientOptions.middleware) != null ? _a2 : /* @__PURE__ */ Object.create(null);
|
|
15134
15134
|
}
|
|
15135
15135
|
get clientOptions() {
|
|
15136
15136
|
return this._clientOptions;
|
|
@@ -15190,7 +15190,7 @@ var require_client = __commonJS({
|
|
|
15190
15190
|
return this._initializeResult;
|
|
15191
15191
|
}
|
|
15192
15192
|
async sendRequest(type, ...params) {
|
|
15193
|
-
var
|
|
15193
|
+
var _a2;
|
|
15194
15194
|
if (this.$state === ClientState.StartFailed || this.$state === ClientState.Stopping || this.$state === ClientState.Stopped) {
|
|
15195
15195
|
return Promise.reject(new vscode_languageserver_protocol_1.ResponseError(vscode_languageserver_protocol_1.ErrorCodes.ConnectionInactive, `Client is not running`));
|
|
15196
15196
|
}
|
|
@@ -15198,7 +15198,7 @@ var require_client = __commonJS({
|
|
|
15198
15198
|
if (this._didChangeTextDocumentFeature.syncKind === vscode_languageserver_protocol_1.TextDocumentSyncKind.Full) {
|
|
15199
15199
|
await this.sendPendingFullTextDocumentChanges(connection);
|
|
15200
15200
|
}
|
|
15201
|
-
const _sendRequest = (
|
|
15201
|
+
const _sendRequest = (_a2 = this._clientOptions.middleware) == null ? void 0 : _a2.sendRequest;
|
|
15202
15202
|
if (_sendRequest !== void 0) {
|
|
15203
15203
|
let param = void 0;
|
|
15204
15204
|
let token = void 0;
|
|
@@ -15263,7 +15263,7 @@ var require_client = __commonJS({
|
|
|
15263
15263
|
};
|
|
15264
15264
|
}
|
|
15265
15265
|
async sendNotification(type, params) {
|
|
15266
|
-
var
|
|
15266
|
+
var _a2;
|
|
15267
15267
|
if (this.$state === ClientState.StartFailed || this.$state === ClientState.Stopping || this.$state === ClientState.Stopped) {
|
|
15268
15268
|
return Promise.reject(new vscode_languageserver_protocol_1.ResponseError(vscode_languageserver_protocol_1.ErrorCodes.ConnectionInactive, `Client is not running`));
|
|
15269
15269
|
}
|
|
@@ -15280,7 +15280,7 @@ var require_client = __commonJS({
|
|
|
15280
15280
|
if (openNotification !== void 0) {
|
|
15281
15281
|
this._pendingOpenNotifications.delete(openNotification);
|
|
15282
15282
|
}
|
|
15283
|
-
const _sendNotification = (
|
|
15283
|
+
const _sendNotification = (_a2 = this._clientOptions.middleware) == null ? void 0 : _a2.sendNotification;
|
|
15284
15284
|
return _sendNotification ? _sendNotification(type, connection.sendNotification.bind(connection), params) : connection.sendNotification(type, params);
|
|
15285
15285
|
}
|
|
15286
15286
|
onNotification(type, handler) {
|
|
@@ -15332,11 +15332,11 @@ var require_client = __commonJS({
|
|
|
15332
15332
|
}
|
|
15333
15333
|
}
|
|
15334
15334
|
onProgress(type, token, handler) {
|
|
15335
|
-
var
|
|
15335
|
+
var _a2;
|
|
15336
15336
|
this._progressHandlers.set(token, { type, handler });
|
|
15337
15337
|
const connection = this.activeConnection();
|
|
15338
15338
|
let disposable;
|
|
15339
|
-
const handleWorkDoneProgress = (
|
|
15339
|
+
const handleWorkDoneProgress = (_a2 = this._clientOptions.middleware) == null ? void 0 : _a2.handleWorkDoneProgress;
|
|
15340
15340
|
const realHandler = vscode_languageserver_protocol_1.WorkDoneProgress.is(type) && handleWorkDoneProgress !== void 0 ? (params) => {
|
|
15341
15341
|
handleWorkDoneProgress(token, params, () => handler(params));
|
|
15342
15342
|
} : handler;
|
|
@@ -15550,7 +15550,7 @@ var require_client = __commonJS({
|
|
|
15550
15550
|
this._telemetryEmitter.fire(data);
|
|
15551
15551
|
});
|
|
15552
15552
|
connection.onRequest(vscode_languageserver_protocol_1.ShowDocumentRequest.type, async (params) => {
|
|
15553
|
-
var
|
|
15553
|
+
var _a2;
|
|
15554
15554
|
const showDocument = async (params2) => {
|
|
15555
15555
|
const uri = this.protocol2CodeConverter.asUri(params2.uri);
|
|
15556
15556
|
try {
|
|
@@ -15574,7 +15574,7 @@ var require_client = __commonJS({
|
|
|
15574
15574
|
return { success: false };
|
|
15575
15575
|
}
|
|
15576
15576
|
};
|
|
15577
|
-
const middleware = (
|
|
15577
|
+
const middleware = (_a2 = this._clientOptions.middleware.window) == null ? void 0 : _a2.showDocument;
|
|
15578
15578
|
if (middleware !== void 0) {
|
|
15579
15579
|
return middleware(params, showDocument);
|
|
15580
15580
|
} else {
|
|
@@ -15809,7 +15809,7 @@ var require_client = __commonJS({
|
|
|
15809
15809
|
}
|
|
15810
15810
|
}
|
|
15811
15811
|
notifyFileEvent(event) {
|
|
15812
|
-
var
|
|
15812
|
+
var _a2;
|
|
15813
15813
|
const client2 = this;
|
|
15814
15814
|
async function didChangeWatchedFile(event2) {
|
|
15815
15815
|
client2._fileEvents.push(event2);
|
|
@@ -15818,7 +15818,7 @@ var require_client = __commonJS({
|
|
|
15818
15818
|
client2._fileEvents = [];
|
|
15819
15819
|
});
|
|
15820
15820
|
}
|
|
15821
|
-
const workSpaceMiddleware = (
|
|
15821
|
+
const workSpaceMiddleware = (_a2 = this.clientOptions.middleware) == null ? void 0 : _a2.workspace;
|
|
15822
15822
|
((workSpaceMiddleware == null ? void 0 : workSpaceMiddleware.didChangeWatchedFile) ? workSpaceMiddleware.didChangeWatchedFile(event, didChangeWatchedFile) : didChangeWatchedFile(event)).catch((error) => {
|
|
15823
15823
|
client2.error(`Notify file events failed.`, error);
|
|
15824
15824
|
});
|
|
@@ -15926,7 +15926,7 @@ var require_client = __commonJS({
|
|
|
15926
15926
|
return this._connection;
|
|
15927
15927
|
}
|
|
15928
15928
|
async handleConnectionClosed() {
|
|
15929
|
-
var
|
|
15929
|
+
var _a2, _b2;
|
|
15930
15930
|
if (this.$state === ClientState.Stopped) {
|
|
15931
15931
|
return;
|
|
15932
15932
|
}
|
|
@@ -15945,7 +15945,7 @@ var require_client = __commonJS({
|
|
|
15945
15945
|
}
|
|
15946
15946
|
this._connection = void 0;
|
|
15947
15947
|
if (handlerResult.action === CloseAction.DoNotRestart) {
|
|
15948
|
-
this.error((
|
|
15948
|
+
this.error((_a2 = handlerResult.message) != null ? _a2 : "Connection to server got closed. Server will not be restarted.", void 0, handlerResult.handled === true ? false : "force");
|
|
15949
15949
|
this.cleanUp("stop");
|
|
15950
15950
|
if (this.$state === ClientState.Starting) {
|
|
15951
15951
|
this.$state = ClientState.StartFailed;
|
|
@@ -15955,7 +15955,7 @@ var require_client = __commonJS({
|
|
|
15955
15955
|
this._onStop = Promise.resolve();
|
|
15956
15956
|
this._onStart = void 0;
|
|
15957
15957
|
} else if (handlerResult.action === CloseAction.Restart) {
|
|
15958
|
-
this.info((
|
|
15958
|
+
this.info((_b2 = handlerResult.message) != null ? _b2 : "Connection to server got closed. Server will restart.", !handlerResult.handled);
|
|
15959
15959
|
this.cleanUp("restart");
|
|
15960
15960
|
this.$state = ClientState.Initial;
|
|
15961
15961
|
this._onStop = Promise.resolve();
|
|
@@ -15964,17 +15964,17 @@ var require_client = __commonJS({
|
|
|
15964
15964
|
}
|
|
15965
15965
|
}
|
|
15966
15966
|
async handleConnectionError(error, message, count) {
|
|
15967
|
-
var
|
|
15967
|
+
var _a2, _b2;
|
|
15968
15968
|
const handlerResult = await this._clientOptions.errorHandler.error(error, message, count);
|
|
15969
15969
|
if (handlerResult.action === ErrorAction.Shutdown) {
|
|
15970
|
-
this.error((
|
|
15970
|
+
this.error((_a2 = handlerResult.message) != null ? _a2 : `Client ${this._name}: connection to server is erroring.
|
|
15971
15971
|
${error.message}
|
|
15972
15972
|
Shutting down server.`, void 0, handlerResult.handled === true ? false : "force");
|
|
15973
15973
|
this.stop().catch((error2) => {
|
|
15974
15974
|
this.error(`Stopping server failed`, error2, false);
|
|
15975
15975
|
});
|
|
15976
15976
|
} else {
|
|
15977
|
-
this.error((
|
|
15977
|
+
this.error((_b2 = handlerResult.message) != null ? _b2 : `Client ${this._name}: connection to server is erroring.
|
|
15978
15978
|
${error.message}`, void 0, handlerResult.handled === true ? false : "force");
|
|
15979
15979
|
}
|
|
15980
15980
|
}
|
|
@@ -16162,8 +16162,8 @@ ${error.message}`, void 0, handlerResult.handled === true ? false : "force");
|
|
|
16162
16162
|
}
|
|
16163
16163
|
}
|
|
16164
16164
|
async handleRegistrationRequest(params) {
|
|
16165
|
-
var
|
|
16166
|
-
const middleware = (
|
|
16165
|
+
var _a2;
|
|
16166
|
+
const middleware = (_a2 = this.clientOptions.middleware) == null ? void 0 : _a2.handleRegisterCapability;
|
|
16167
16167
|
if (middleware) {
|
|
16168
16168
|
return middleware(params, (nextParams) => this.doRegisterCapability(nextParams));
|
|
16169
16169
|
} else {
|
|
@@ -16171,7 +16171,7 @@ ${error.message}`, void 0, handlerResult.handled === true ? false : "force");
|
|
|
16171
16171
|
}
|
|
16172
16172
|
}
|
|
16173
16173
|
async doRegisterCapability(params) {
|
|
16174
|
-
var
|
|
16174
|
+
var _a2, _b2;
|
|
16175
16175
|
if (!this.isRunning()) {
|
|
16176
16176
|
for (const registration of params.registrations) {
|
|
16177
16177
|
this._ignoredRegistrations.add(registration.id);
|
|
@@ -16183,8 +16183,8 @@ ${error.message}`, void 0, handlerResult.handled === true ? false : "force");
|
|
|
16183
16183
|
if (feature === void 0) {
|
|
16184
16184
|
return Promise.reject(new Error(`No feature implementation for ${registration.method} found. Registration failed.`));
|
|
16185
16185
|
}
|
|
16186
|
-
const options = (
|
|
16187
|
-
options.documentSelector = (
|
|
16186
|
+
const options = (_a2 = registration.registerOptions) != null ? _a2 : {};
|
|
16187
|
+
options.documentSelector = (_b2 = options.documentSelector) != null ? _b2 : this._clientOptions.documentSelector;
|
|
16188
16188
|
const data = {
|
|
16189
16189
|
id: registration.id,
|
|
16190
16190
|
registerOptions: options
|
|
@@ -16197,8 +16197,8 @@ ${error.message}`, void 0, handlerResult.handled === true ? false : "force");
|
|
|
16197
16197
|
}
|
|
16198
16198
|
}
|
|
16199
16199
|
async handleUnregistrationRequest(params) {
|
|
16200
|
-
var
|
|
16201
|
-
const middleware = (
|
|
16200
|
+
var _a2;
|
|
16201
|
+
const middleware = (_a2 = this.clientOptions.middleware) == null ? void 0 : _a2.handleUnregisterCapability;
|
|
16202
16202
|
if (middleware) {
|
|
16203
16203
|
return middleware(params, (nextParams) => this.doUnregisterCapability(nextParams));
|
|
16204
16204
|
} else {
|
|
@@ -17754,13 +17754,13 @@ var require_main4 = __commonJS({
|
|
|
17754
17754
|
json = server;
|
|
17755
17755
|
}
|
|
17756
17756
|
return this._getServerWorkingDir(json.options).then((serverWorkingDir) => {
|
|
17757
|
-
var
|
|
17757
|
+
var _a2;
|
|
17758
17758
|
if (NodeModule.is(json) && json.module) {
|
|
17759
17759
|
let node = json;
|
|
17760
17760
|
let transport = node.transport || TransportKind2.stdio;
|
|
17761
17761
|
if (node.runtime) {
|
|
17762
17762
|
const args = [];
|
|
17763
|
-
const options = (
|
|
17763
|
+
const options = (_a2 = node.options) != null ? _a2 : /* @__PURE__ */ Object.create(null);
|
|
17764
17764
|
if (options.execArgv) {
|
|
17765
17765
|
options.execArgv.forEach((element) => args.push(element));
|
|
17766
17766
|
}
|
|
@@ -17828,8 +17828,8 @@ var require_main4 = __commonJS({
|
|
|
17828
17828
|
} else {
|
|
17829
17829
|
let pipeName = void 0;
|
|
17830
17830
|
return new Promise((resolve4, reject2) => {
|
|
17831
|
-
var
|
|
17832
|
-
const args = (
|
|
17831
|
+
var _a3, _b2;
|
|
17832
|
+
const args = (_a3 = node.args && node.args.slice()) != null ? _a3 : [];
|
|
17833
17833
|
if (transport === TransportKind2.ipc) {
|
|
17834
17834
|
args.push("--node-ipc");
|
|
17835
17835
|
} else if (transport === TransportKind2.stdio) {
|
|
@@ -17841,7 +17841,7 @@ var require_main4 = __commonJS({
|
|
|
17841
17841
|
args.push(`--socket=${transport.port}`);
|
|
17842
17842
|
}
|
|
17843
17843
|
args.push(`--clientProcessId=${process.pid.toString()}`);
|
|
17844
|
-
const options = (
|
|
17844
|
+
const options = (_b2 = node.options) != null ? _b2 : /* @__PURE__ */ Object.create(null);
|
|
17845
17845
|
options.env = getEnvironment(options.env, true);
|
|
17846
17846
|
options.execArgv = options.execArgv || [];
|
|
17847
17847
|
options.cwd = serverWorkingDir;
|
|
@@ -22761,12 +22761,12 @@ var require_dist_node11 = __commonJS({
|
|
|
22761
22761
|
* const API = Octokit.plugin(plugin1, plugin2, plugin3, ...)
|
|
22762
22762
|
*/
|
|
22763
22763
|
static plugin(...newPlugins) {
|
|
22764
|
-
var
|
|
22764
|
+
var _a2;
|
|
22765
22765
|
const currentPlugins = this.plugins;
|
|
22766
|
-
const NewOctokit = (
|
|
22767
|
-
},
|
|
22766
|
+
const NewOctokit = (_a2 = class extends this {
|
|
22767
|
+
}, _a2.plugins = currentPlugins.concat(
|
|
22768
22768
|
newPlugins.filter((plugin) => !currentPlugins.includes(plugin))
|
|
22769
|
-
),
|
|
22769
|
+
), _a2);
|
|
22770
22770
|
return NewOctokit;
|
|
22771
22771
|
}
|
|
22772
22772
|
constructor(options = {}) {
|
|
@@ -22821,7 +22821,7 @@ var require_dist_node11 = __commonJS({
|
|
|
22821
22821
|
this.auth = auth;
|
|
22822
22822
|
}
|
|
22823
22823
|
} else {
|
|
22824
|
-
const
|
|
22824
|
+
const _a2 = options, { authStrategy } = _a2, otherOptions = __objRest(_a2, ["authStrategy"]);
|
|
22825
22825
|
const auth = authStrategy(
|
|
22826
22826
|
Object.assign(
|
|
22827
22827
|
{
|
|
@@ -25525,9 +25525,9 @@ var require_progress2 = __commonJS({
|
|
|
25525
25525
|
this._progressSupported = false;
|
|
25526
25526
|
}
|
|
25527
25527
|
initialize(capabilities) {
|
|
25528
|
-
var
|
|
25528
|
+
var _a2;
|
|
25529
25529
|
super.initialize(capabilities);
|
|
25530
|
-
if (((
|
|
25530
|
+
if (((_a2 = capabilities == null ? void 0 : capabilities.window) == null ? void 0 : _a2.workDoneProgress) === true) {
|
|
25531
25531
|
this._progressSupported = true;
|
|
25532
25532
|
this.connection.onNotification(vscode_languageserver_protocol_1.WorkDoneProgressCancelNotification.type, (params) => {
|
|
25533
25533
|
let progress = WorkDoneProgressReporterImpl.Instances.get(params.token);
|
|
@@ -25644,9 +25644,9 @@ var require_workspaceFolder2 = __commonJS({
|
|
|
25644
25644
|
}
|
|
25645
25645
|
}
|
|
25646
25646
|
fillServerCapabilities(capabilities) {
|
|
25647
|
-
var
|
|
25647
|
+
var _a2, _b2;
|
|
25648
25648
|
super.fillServerCapabilities(capabilities);
|
|
25649
|
-
const changeNotifications = (
|
|
25649
|
+
const changeNotifications = (_b2 = (_a2 = capabilities.workspace) == null ? void 0 : _a2.workspaceFolders) == null ? void 0 : _b2.changeNotifications;
|
|
25650
25650
|
this._notificationIsAutoRegistered = changeNotifications === true || typeof changeNotifications === "string";
|
|
25651
25651
|
}
|
|
25652
25652
|
getWorkspaceFolders() {
|
|
@@ -27809,9 +27809,9 @@ var require_main5 = __commonJS({
|
|
|
27809
27809
|
}
|
|
27810
27810
|
};
|
|
27811
27811
|
console.count = function count(label = "default") {
|
|
27812
|
-
var
|
|
27812
|
+
var _a2;
|
|
27813
27813
|
const message = String(label);
|
|
27814
|
-
let counter = (
|
|
27814
|
+
let counter = (_a2 = counters.get(message)) != null ? _a2 : 0;
|
|
27815
27815
|
counter += 1;
|
|
27816
27816
|
counters.set(message, counter);
|
|
27817
27817
|
logger.log(`${message}: ${message}`);
|
|
@@ -30053,11 +30053,11 @@ function streamAst(root2, options) {
|
|
|
30053
30053
|
return new TreeStreamImpl(root2, (node) => streamContents(node, options), { includeRoot: true });
|
|
30054
30054
|
}
|
|
30055
30055
|
function isAstNodeInRange(astNode, range) {
|
|
30056
|
-
var
|
|
30056
|
+
var _a2;
|
|
30057
30057
|
if (!range) {
|
|
30058
30058
|
return true;
|
|
30059
30059
|
}
|
|
30060
|
-
const nodeRange = (
|
|
30060
|
+
const nodeRange = (_a2 = astNode.$cstNode) === null || _a2 === void 0 ? void 0 : _a2.range;
|
|
30061
30061
|
if (!nodeRange) {
|
|
30062
30062
|
return false;
|
|
30063
30063
|
}
|
|
@@ -31080,7 +31080,7 @@ function getTerminalParts(regexp) {
|
|
|
31080
31080
|
});
|
|
31081
31081
|
}
|
|
31082
31082
|
return parts;
|
|
31083
|
-
} catch (
|
|
31083
|
+
} catch (_a2) {
|
|
31084
31084
|
return [];
|
|
31085
31085
|
}
|
|
31086
31086
|
}
|
|
@@ -31093,7 +31093,7 @@ function isMultilineComment(regexp) {
|
|
|
31093
31093
|
visitor.reset(regexp);
|
|
31094
31094
|
visitor.visit(regexpParser.pattern(regexp));
|
|
31095
31095
|
return visitor.multiline;
|
|
31096
|
-
} catch (
|
|
31096
|
+
} catch (_a2) {
|
|
31097
31097
|
return false;
|
|
31098
31098
|
}
|
|
31099
31099
|
}
|
|
@@ -31370,9 +31370,9 @@ function findNodesForKeywordInternal(node, keyword, element) {
|
|
|
31370
31370
|
return keywordNodes;
|
|
31371
31371
|
}
|
|
31372
31372
|
function findAssignment(cstNode) {
|
|
31373
|
-
var
|
|
31373
|
+
var _a2;
|
|
31374
31374
|
const astNode = cstNode.astNode;
|
|
31375
|
-
while (astNode === ((
|
|
31375
|
+
while (astNode === ((_a2 = cstNode.container) === null || _a2 === void 0 ? void 0 : _a2.astNode)) {
|
|
31376
31376
|
const assignment = getContainerOfType(cstNode.grammarSource, isAssignment);
|
|
31377
31377
|
if (assignment) {
|
|
31378
31378
|
return assignment;
|
|
@@ -31395,7 +31395,7 @@ function findNameAssignment(type) {
|
|
|
31395
31395
|
return findNameAssignmentInternal(type, startNode, /* @__PURE__ */ new Map());
|
|
31396
31396
|
}
|
|
31397
31397
|
function findNameAssignmentInternal(type, startNode, cache) {
|
|
31398
|
-
var
|
|
31398
|
+
var _a2;
|
|
31399
31399
|
function go(node, refType) {
|
|
31400
31400
|
let childAssignment = void 0;
|
|
31401
31401
|
const parentAssignment = getContainerOfType(node, isAssignment);
|
|
@@ -31415,7 +31415,7 @@ function findNameAssignmentInternal(type, startNode, cache) {
|
|
|
31415
31415
|
return node;
|
|
31416
31416
|
} else if (isRuleCall(node) && isParserRule(node.rule.ref)) {
|
|
31417
31417
|
return go(node, node.rule.ref);
|
|
31418
|
-
} else if (isSimpleType(node) && ((
|
|
31418
|
+
} else if (isSimpleType(node) && ((_a2 = node.typeRef) === null || _a2 === void 0 ? void 0 : _a2.ref)) {
|
|
31419
31419
|
return go(node, node.typeRef.ref);
|
|
31420
31420
|
}
|
|
31421
31421
|
}
|
|
@@ -31530,9 +31530,9 @@ function getExplicitRuleType(rule) {
|
|
|
31530
31530
|
return void 0;
|
|
31531
31531
|
}
|
|
31532
31532
|
function getTypeName(type) {
|
|
31533
|
-
var
|
|
31533
|
+
var _a2;
|
|
31534
31534
|
if (isParserRule(type)) {
|
|
31535
|
-
return isDataTypeRule(type) ? type.name : (
|
|
31535
|
+
return isDataTypeRule(type) ? type.name : (_a2 = getExplicitRuleType(type)) !== null && _a2 !== void 0 ? _a2 : type.name;
|
|
31536
31536
|
} else if (isInterface(type) || isType(type) || isReturnType(type)) {
|
|
31537
31537
|
return type.name;
|
|
31538
31538
|
} else if (isAction(type)) {
|
|
@@ -31546,20 +31546,20 @@ function getTypeName(type) {
|
|
|
31546
31546
|
throw new Error("Cannot get name of Unknown Type");
|
|
31547
31547
|
}
|
|
31548
31548
|
function getActionType(action) {
|
|
31549
|
-
var
|
|
31549
|
+
var _a2;
|
|
31550
31550
|
if (action.inferredType) {
|
|
31551
31551
|
return action.inferredType.name;
|
|
31552
|
-
} else if ((
|
|
31552
|
+
} else if ((_a2 = action.type) === null || _a2 === void 0 ? void 0 : _a2.ref) {
|
|
31553
31553
|
return getTypeName(action.type.ref);
|
|
31554
31554
|
}
|
|
31555
31555
|
return void 0;
|
|
31556
31556
|
}
|
|
31557
31557
|
function getRuleType(rule) {
|
|
31558
|
-
var
|
|
31558
|
+
var _a2, _b2, _c2;
|
|
31559
31559
|
if (isTerminalRule(rule)) {
|
|
31560
|
-
return (
|
|
31560
|
+
return (_b2 = (_a2 = rule.type) === null || _a2 === void 0 ? void 0 : _a2.name) !== null && _b2 !== void 0 ? _b2 : "string";
|
|
31561
31561
|
} else {
|
|
31562
|
-
return isDataTypeRule(rule) ? rule.name : (
|
|
31562
|
+
return isDataTypeRule(rule) ? rule.name : (_c2 = getExplicitRuleType(rule)) !== null && _c2 !== void 0 ? _c2 : rule.name;
|
|
31563
31563
|
}
|
|
31564
31564
|
}
|
|
31565
31565
|
function terminalRegex(terminalRule) {
|
|
@@ -31658,9 +31658,9 @@ function keywordToRegex(keyword) {
|
|
|
31658
31658
|
return escapeRegExp(keyword.value);
|
|
31659
31659
|
}
|
|
31660
31660
|
function withCardinality(regex, options) {
|
|
31661
|
-
var
|
|
31661
|
+
var _a2;
|
|
31662
31662
|
if (options.wrap !== false || options.lookahead) {
|
|
31663
|
-
regex = `(${(
|
|
31663
|
+
regex = `(${(_a2 = options.lookahead) !== null && _a2 !== void 0 ? _a2 : ""}${regex})`;
|
|
31664
31664
|
}
|
|
31665
31665
|
if (options.cardinality) {
|
|
31666
31666
|
return `${regex}${options.cardinality}`;
|
|
@@ -38274,8 +38274,8 @@ var BITS_START_FOR_ALT_IDX = 32 - BITS_FOR_ALT_IDX;
|
|
|
38274
38274
|
// node_modules/chevrotain/lib/src/parse/grammar/llk_lookahead.js
|
|
38275
38275
|
var LLkLookaheadStrategy = class {
|
|
38276
38276
|
constructor(options) {
|
|
38277
|
-
var
|
|
38278
|
-
this.maxLookahead = (
|
|
38277
|
+
var _a2;
|
|
38278
|
+
this.maxLookahead = (_a2 = options === null || options === void 0 ? void 0 : options.maxLookahead) !== null && _a2 !== void 0 ? _a2 : DEFAULT_PARSER_CONFIG.maxLookahead;
|
|
38279
38279
|
}
|
|
38280
38280
|
validate(options) {
|
|
38281
38281
|
const leftRecursionErrors = this.validateNoLeftRecursion(options.rules);
|
|
@@ -40022,8 +40022,8 @@ var Parser = class _Parser {
|
|
|
40022
40022
|
});
|
|
40023
40023
|
}
|
|
40024
40024
|
this.TRACE_INIT("ComputeLookaheadFunctions", () => {
|
|
40025
|
-
var
|
|
40026
|
-
(
|
|
40025
|
+
var _a2, _b2;
|
|
40026
|
+
(_b2 = (_a2 = this.lookaheadStrategy).initialize) === null || _b2 === void 0 ? void 0 : _b2.call(_a2, {
|
|
40027
40027
|
rules: values_default(this.gastProductionsCache)
|
|
40028
40028
|
});
|
|
40029
40029
|
this.preComputeLookaheadFunctions(values_default(this.gastProductionsCache));
|
|
@@ -40522,9 +40522,9 @@ var PredicateSet = class {
|
|
|
40522
40522
|
var EMPTY_PREDICATES = new PredicateSet();
|
|
40523
40523
|
var LLStarLookaheadStrategy = class extends LLkLookaheadStrategy {
|
|
40524
40524
|
constructor(options) {
|
|
40525
|
-
var
|
|
40525
|
+
var _a2;
|
|
40526
40526
|
super();
|
|
40527
|
-
this.logging = (
|
|
40527
|
+
this.logging = (_a2 = options === null || options === void 0 ? void 0 : options.logging) !== null && _a2 !== void 0 ? _a2 : (message) => console.log(message);
|
|
40528
40528
|
}
|
|
40529
40529
|
initialize(options) {
|
|
40530
40530
|
this.atn = createATN(options.rules);
|
|
@@ -40563,11 +40563,11 @@ var LLStarLookaheadStrategy = class extends LLkLookaheadStrategy {
|
|
|
40563
40563
|
}, {});
|
|
40564
40564
|
if (hasPredicates) {
|
|
40565
40565
|
return function(orAlts) {
|
|
40566
|
-
var
|
|
40566
|
+
var _a2;
|
|
40567
40567
|
const nextToken = this.LA(1);
|
|
40568
40568
|
const prediction = choiceToAlt[nextToken.tokenTypeIdx];
|
|
40569
40569
|
if (orAlts !== void 0 && prediction !== void 0) {
|
|
40570
|
-
const gate = (
|
|
40570
|
+
const gate = (_a2 = orAlts[prediction]) === null || _a2 === void 0 ? void 0 : _a2.GATE;
|
|
40571
40571
|
if (gate !== void 0 && gate.call(this) === false) {
|
|
40572
40572
|
return void 0;
|
|
40573
40573
|
}
|
|
@@ -41222,9 +41222,9 @@ var Diagnostic;
|
|
|
41222
41222
|
}
|
|
41223
41223
|
Diagnostic2.create = create;
|
|
41224
41224
|
function is(value) {
|
|
41225
|
-
var
|
|
41225
|
+
var _a2;
|
|
41226
41226
|
let candidate = value;
|
|
41227
|
-
return Is.defined(candidate) && Range2.is(candidate.range) && Is.string(candidate.message) && (Is.number(candidate.severity) || Is.undefined(candidate.severity)) && (Is.integer(candidate.code) || Is.string(candidate.code) || Is.undefined(candidate.code)) && (Is.undefined(candidate.codeDescription) || Is.string((
|
|
41227
|
+
return Is.defined(candidate) && Range2.is(candidate.range) && Is.string(candidate.message) && (Is.number(candidate.severity) || Is.undefined(candidate.severity)) && (Is.integer(candidate.code) || Is.string(candidate.code) || Is.undefined(candidate.code)) && (Is.undefined(candidate.codeDescription) || Is.string((_a2 = candidate.codeDescription) === null || _a2 === void 0 ? void 0 : _a2.href)) && (Is.string(candidate.source) || Is.undefined(candidate.source)) && (Is.undefined(candidate.relatedInformation) || Is.typedArray(candidate.relatedInformation, DiagnosticRelatedInformation.is));
|
|
41228
41228
|
}
|
|
41229
41229
|
Diagnostic2.is = is;
|
|
41230
41230
|
})(Diagnostic || (Diagnostic = {}));
|
|
@@ -41453,14 +41453,14 @@ var TextDocumentItem;
|
|
|
41453
41453
|
TextDocumentItem2.is = is;
|
|
41454
41454
|
})(TextDocumentItem || (TextDocumentItem = {}));
|
|
41455
41455
|
var MarkupKind;
|
|
41456
|
-
(function(
|
|
41457
|
-
|
|
41458
|
-
|
|
41456
|
+
(function(MarkupKind3) {
|
|
41457
|
+
MarkupKind3.PlainText = "plaintext";
|
|
41458
|
+
MarkupKind3.Markdown = "markdown";
|
|
41459
41459
|
function is(value) {
|
|
41460
41460
|
const candidate = value;
|
|
41461
|
-
return candidate ===
|
|
41461
|
+
return candidate === MarkupKind3.PlainText || candidate === MarkupKind3.Markdown;
|
|
41462
41462
|
}
|
|
41463
|
-
|
|
41463
|
+
MarkupKind3.is = is;
|
|
41464
41464
|
})(MarkupKind || (MarkupKind = {}));
|
|
41465
41465
|
var MarkupContent;
|
|
41466
41466
|
(function(MarkupContent2) {
|
|
@@ -41471,32 +41471,32 @@ var MarkupContent;
|
|
|
41471
41471
|
MarkupContent2.is = is;
|
|
41472
41472
|
})(MarkupContent || (MarkupContent = {}));
|
|
41473
41473
|
var CompletionItemKind;
|
|
41474
|
-
(function(
|
|
41475
|
-
|
|
41476
|
-
|
|
41477
|
-
|
|
41478
|
-
|
|
41479
|
-
|
|
41480
|
-
|
|
41481
|
-
|
|
41482
|
-
|
|
41483
|
-
|
|
41484
|
-
|
|
41485
|
-
|
|
41486
|
-
|
|
41487
|
-
|
|
41488
|
-
|
|
41489
|
-
|
|
41490
|
-
|
|
41491
|
-
|
|
41492
|
-
|
|
41493
|
-
|
|
41494
|
-
|
|
41495
|
-
|
|
41496
|
-
|
|
41497
|
-
|
|
41498
|
-
|
|
41499
|
-
|
|
41474
|
+
(function(CompletionItemKind5) {
|
|
41475
|
+
CompletionItemKind5.Text = 1;
|
|
41476
|
+
CompletionItemKind5.Method = 2;
|
|
41477
|
+
CompletionItemKind5.Function = 3;
|
|
41478
|
+
CompletionItemKind5.Constructor = 4;
|
|
41479
|
+
CompletionItemKind5.Field = 5;
|
|
41480
|
+
CompletionItemKind5.Variable = 6;
|
|
41481
|
+
CompletionItemKind5.Class = 7;
|
|
41482
|
+
CompletionItemKind5.Interface = 8;
|
|
41483
|
+
CompletionItemKind5.Module = 9;
|
|
41484
|
+
CompletionItemKind5.Property = 10;
|
|
41485
|
+
CompletionItemKind5.Unit = 11;
|
|
41486
|
+
CompletionItemKind5.Value = 12;
|
|
41487
|
+
CompletionItemKind5.Enum = 13;
|
|
41488
|
+
CompletionItemKind5.Keyword = 14;
|
|
41489
|
+
CompletionItemKind5.Snippet = 15;
|
|
41490
|
+
CompletionItemKind5.Color = 16;
|
|
41491
|
+
CompletionItemKind5.File = 17;
|
|
41492
|
+
CompletionItemKind5.Reference = 18;
|
|
41493
|
+
CompletionItemKind5.Folder = 19;
|
|
41494
|
+
CompletionItemKind5.EnumMember = 20;
|
|
41495
|
+
CompletionItemKind5.Constant = 21;
|
|
41496
|
+
CompletionItemKind5.Struct = 22;
|
|
41497
|
+
CompletionItemKind5.Event = 23;
|
|
41498
|
+
CompletionItemKind5.Operator = 24;
|
|
41499
|
+
CompletionItemKind5.TypeParameter = 25;
|
|
41500
41500
|
})(CompletionItemKind || (CompletionItemKind = {}));
|
|
41501
41501
|
var InsertTextFormat;
|
|
41502
41502
|
(function(InsertTextFormat2) {
|
|
@@ -42260,8 +42260,8 @@ var AbstractCstNode = class {
|
|
|
42260
42260
|
return false;
|
|
42261
42261
|
}
|
|
42262
42262
|
get astNode() {
|
|
42263
|
-
var
|
|
42264
|
-
const node = typeof ((
|
|
42263
|
+
var _a2, _b2;
|
|
42264
|
+
const node = typeof ((_a2 = this._astNode) === null || _a2 === void 0 ? void 0 : _a2.$type) === "string" ? this._astNode : (_b2 = this.container) === null || _b2 === void 0 ? void 0 : _b2.astNode;
|
|
42265
42265
|
if (!node) {
|
|
42266
42266
|
throw new Error("This node has no associated AST element");
|
|
42267
42267
|
}
|
|
@@ -42316,15 +42316,15 @@ var CompositeCstNodeImpl = class extends AbstractCstNode {
|
|
|
42316
42316
|
return this.content;
|
|
42317
42317
|
}
|
|
42318
42318
|
get offset() {
|
|
42319
|
-
var
|
|
42320
|
-
return (
|
|
42319
|
+
var _a2, _b2;
|
|
42320
|
+
return (_b2 = (_a2 = this.firstNonHiddenNode) === null || _a2 === void 0 ? void 0 : _a2.offset) !== null && _b2 !== void 0 ? _b2 : 0;
|
|
42321
42321
|
}
|
|
42322
42322
|
get length() {
|
|
42323
42323
|
return this.end - this.offset;
|
|
42324
42324
|
}
|
|
42325
42325
|
get end() {
|
|
42326
|
-
var
|
|
42327
|
-
return (
|
|
42326
|
+
var _a2, _b2;
|
|
42327
|
+
return (_b2 = (_a2 = this.lastNonHiddenNode) === null || _a2 === void 0 ? void 0 : _a2.end) !== null && _b2 !== void 0 ? _b2 : 0;
|
|
42328
42328
|
}
|
|
42329
42329
|
get range() {
|
|
42330
42330
|
const firstNode = this.firstNonHiddenNode;
|
|
@@ -43225,7 +43225,7 @@ var DefaultValueConverter = class {
|
|
|
43225
43225
|
}
|
|
43226
43226
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
43227
43227
|
runConverter(rule, input, cstNode) {
|
|
43228
|
-
var
|
|
43228
|
+
var _a2;
|
|
43229
43229
|
switch (rule.name.toUpperCase()) {
|
|
43230
43230
|
case "INT":
|
|
43231
43231
|
return ValueConverter.convertInt(input);
|
|
@@ -43234,7 +43234,7 @@ var DefaultValueConverter = class {
|
|
|
43234
43234
|
case "ID":
|
|
43235
43235
|
return ValueConverter.convertID(input);
|
|
43236
43236
|
}
|
|
43237
|
-
switch ((
|
|
43237
|
+
switch ((_a2 = getRuleType(rule)) === null || _a2 === void 0 ? void 0 : _a2.toLowerCase()) {
|
|
43238
43238
|
case "number":
|
|
43239
43239
|
return ValueConverter.convertNumber(input);
|
|
43240
43240
|
case "boolean":
|
|
@@ -44087,9 +44087,9 @@ var DefaultLangiumDocumentFactory = class {
|
|
|
44087
44087
|
return document;
|
|
44088
44088
|
}
|
|
44089
44089
|
async update(document, cancellationToken) {
|
|
44090
|
-
var
|
|
44091
|
-
const oldText = (
|
|
44092
|
-
const textDocument = (
|
|
44090
|
+
var _a2, _b2;
|
|
44091
|
+
const oldText = (_a2 = document.parseResult.value.$cstNode) === null || _a2 === void 0 ? void 0 : _a2.root.fullText;
|
|
44092
|
+
const textDocument = (_b2 = this.textDocuments) === null || _b2 === void 0 ? void 0 : _b2.get(document.uri.toString());
|
|
44093
44093
|
const text = textDocument ? textDocument.getText() : await this.fileSystemProvider.readFile(document.uri);
|
|
44094
44094
|
if (textDocument) {
|
|
44095
44095
|
Object.defineProperty(document, "textDocument", {
|
|
@@ -44241,7 +44241,7 @@ var DefaultLinker = class {
|
|
|
44241
44241
|
$refNode: refNode,
|
|
44242
44242
|
$refText: refText,
|
|
44243
44243
|
get ref() {
|
|
44244
|
-
var
|
|
44244
|
+
var _a2;
|
|
44245
44245
|
if (isAstNode(this._ref)) {
|
|
44246
44246
|
return this._ref;
|
|
44247
44247
|
} else if (isAstNodeDescription(this._nodeDescription)) {
|
|
@@ -44252,7 +44252,7 @@ var DefaultLinker = class {
|
|
|
44252
44252
|
if (refData.error && getDocument(node).state < DocumentState.ComputedScopes) {
|
|
44253
44253
|
return void 0;
|
|
44254
44254
|
}
|
|
44255
|
-
this._ref = (
|
|
44255
|
+
this._ref = (_a2 = refData.node) !== null && _a2 !== void 0 ? _a2 : refData.error;
|
|
44256
44256
|
this._nodeDescription = refData.descr;
|
|
44257
44257
|
}
|
|
44258
44258
|
return isAstNode(this._ref) ? this._ref : void 0;
|
|
@@ -44453,8 +44453,8 @@ var MultiMap = class {
|
|
|
44453
44453
|
* value and `delete` to remove a value from the multimap.
|
|
44454
44454
|
*/
|
|
44455
44455
|
get(key) {
|
|
44456
|
-
var
|
|
44457
|
-
return (
|
|
44456
|
+
var _a2;
|
|
44457
|
+
return (_a2 = this.map.get(key)) !== null && _a2 !== void 0 ? _a2 : [];
|
|
44458
44458
|
}
|
|
44459
44459
|
/**
|
|
44460
44460
|
* Operates differently depending on whether a `value` is given:
|
|
@@ -44638,10 +44638,10 @@ var DefaultScopeComputation = class {
|
|
|
44638
44638
|
// node_modules/langium/lib/references/scope.js
|
|
44639
44639
|
var StreamScope = class {
|
|
44640
44640
|
constructor(elements, outerScope, options) {
|
|
44641
|
-
var
|
|
44641
|
+
var _a2;
|
|
44642
44642
|
this.elements = elements;
|
|
44643
44643
|
this.outerScope = outerScope;
|
|
44644
|
-
this.caseInsensitive = (
|
|
44644
|
+
this.caseInsensitive = (_a2 = options === null || options === void 0 ? void 0 : options.caseInsensitive) !== null && _a2 !== void 0 ? _a2 : false;
|
|
44645
44645
|
}
|
|
44646
44646
|
getAllElements() {
|
|
44647
44647
|
if (this.outerScope) {
|
|
@@ -44663,9 +44663,9 @@ var StreamScope = class {
|
|
|
44663
44663
|
};
|
|
44664
44664
|
var MapScope = class {
|
|
44665
44665
|
constructor(elements, outerScope, options) {
|
|
44666
|
-
var
|
|
44666
|
+
var _a2;
|
|
44667
44667
|
this.elements = /* @__PURE__ */ new Map();
|
|
44668
|
-
this.caseInsensitive = (
|
|
44668
|
+
this.caseInsensitive = (_a2 = options === null || options === void 0 ? void 0 : options.caseInsensitive) !== null && _a2 !== void 0 ? _a2 : false;
|
|
44669
44669
|
for (const element of elements) {
|
|
44670
44670
|
const name = this.caseInsensitive ? element.name.toLowerCase() : element.name;
|
|
44671
44671
|
this.elements.set(name, element);
|
|
@@ -44914,7 +44914,7 @@ var DefaultJsonSerializer = class {
|
|
|
44914
44914
|
return root2;
|
|
44915
44915
|
}
|
|
44916
44916
|
replacer(key, value, { refText, sourceText, textRegions, comments, uriConverter }) {
|
|
44917
|
-
var
|
|
44917
|
+
var _a2, _b2, _c2, _d;
|
|
44918
44918
|
if (this.ignoreProperties.has(key)) {
|
|
44919
44919
|
return void 0;
|
|
44920
44920
|
} else if (isReference(value)) {
|
|
@@ -44937,7 +44937,7 @@ var DefaultJsonSerializer = class {
|
|
|
44937
44937
|
};
|
|
44938
44938
|
} else {
|
|
44939
44939
|
return {
|
|
44940
|
-
$error: (
|
|
44940
|
+
$error: (_b2 = (_a2 = value.error) === null || _a2 === void 0 ? void 0 : _a2.message) !== null && _b2 !== void 0 ? _b2 : "Could not resolve reference",
|
|
44941
44941
|
$refText
|
|
44942
44942
|
};
|
|
44943
44943
|
}
|
|
@@ -44946,7 +44946,7 @@ var DefaultJsonSerializer = class {
|
|
|
44946
44946
|
if (textRegions) {
|
|
44947
44947
|
astNode = this.addAstNodeRegionWithAssignmentsTo(Object.assign({}, value));
|
|
44948
44948
|
if ((!key || value.$document) && (astNode === null || astNode === void 0 ? void 0 : astNode.$textRegion)) {
|
|
44949
|
-
astNode.$textRegion.documentURI = (
|
|
44949
|
+
astNode.$textRegion.documentURI = (_c2 = this.currentDocument) === null || _c2 === void 0 ? void 0 : _c2.uri.toString();
|
|
44950
44950
|
}
|
|
44951
44951
|
}
|
|
44952
44952
|
if (sourceText && !key) {
|
|
@@ -45216,22 +45216,22 @@ var DefaultDocumentValidator = class {
|
|
|
45216
45216
|
if (!options.categories || options.categories.includes("built-in")) {
|
|
45217
45217
|
this.processLexingErrors(parseResult, diagnostics, options);
|
|
45218
45218
|
if (options.stopAfterLexingErrors && diagnostics.some((d) => {
|
|
45219
|
-
var
|
|
45220
|
-
return ((
|
|
45219
|
+
var _a2;
|
|
45220
|
+
return ((_a2 = d.data) === null || _a2 === void 0 ? void 0 : _a2.code) === DocumentValidator.LexingError;
|
|
45221
45221
|
})) {
|
|
45222
45222
|
return diagnostics;
|
|
45223
45223
|
}
|
|
45224
45224
|
this.processParsingErrors(parseResult, diagnostics, options);
|
|
45225
45225
|
if (options.stopAfterParsingErrors && diagnostics.some((d) => {
|
|
45226
|
-
var
|
|
45227
|
-
return ((
|
|
45226
|
+
var _a2;
|
|
45227
|
+
return ((_a2 = d.data) === null || _a2 === void 0 ? void 0 : _a2.code) === DocumentValidator.ParsingError;
|
|
45228
45228
|
})) {
|
|
45229
45229
|
return diagnostics;
|
|
45230
45230
|
}
|
|
45231
45231
|
this.processLinkingErrors(document, diagnostics, options);
|
|
45232
45232
|
if (options.stopAfterLinkingErrors && diagnostics.some((d) => {
|
|
45233
|
-
var
|
|
45234
|
-
return ((
|
|
45233
|
+
var _a2;
|
|
45234
|
+
return ((_a2 = d.data) === null || _a2 === void 0 ? void 0 : _a2.code) === DocumentValidator.LinkingError;
|
|
45235
45235
|
})) {
|
|
45236
45236
|
return diagnostics;
|
|
45237
45237
|
}
|
|
@@ -45401,8 +45401,8 @@ var DefaultAstNodeDescriptionProvider = class {
|
|
|
45401
45401
|
}
|
|
45402
45402
|
let nameNodeSegment;
|
|
45403
45403
|
const nameSegmentGetter = () => {
|
|
45404
|
-
var
|
|
45405
|
-
return nameNodeSegment !== null && nameNodeSegment !== void 0 ? nameNodeSegment : nameNodeSegment = toDocumentSegment((
|
|
45404
|
+
var _a2;
|
|
45405
|
+
return nameNodeSegment !== null && nameNodeSegment !== void 0 ? nameNodeSegment : nameNodeSegment = toDocumentSegment((_a2 = this.nameProvider.getNameNode(node)) !== null && _a2 !== void 0 ? _a2 : node.$cstNode);
|
|
45406
45406
|
};
|
|
45407
45407
|
return {
|
|
45408
45408
|
node,
|
|
@@ -45507,8 +45507,8 @@ var DefaultConfigurationProvider = class {
|
|
|
45507
45507
|
return this._ready.promise;
|
|
45508
45508
|
}
|
|
45509
45509
|
initialize(params) {
|
|
45510
|
-
var
|
|
45511
|
-
this.workspaceConfig = (
|
|
45510
|
+
var _a2, _b2;
|
|
45511
|
+
this.workspaceConfig = (_b2 = (_a2 = params.capabilities.workspace) === null || _a2 === void 0 ? void 0 : _a2.configuration) !== null && _b2 !== void 0 ? _b2 : false;
|
|
45512
45512
|
}
|
|
45513
45513
|
async initialized(params) {
|
|
45514
45514
|
if (this.workspaceConfig) {
|
|
@@ -45598,7 +45598,7 @@ var DefaultDocumentBuilder = class {
|
|
|
45598
45598
|
this.serviceRegistry = services.ServiceRegistry;
|
|
45599
45599
|
}
|
|
45600
45600
|
async build(documents, options = {}, cancelToken = cancellation_exports.CancellationToken.None) {
|
|
45601
|
-
var
|
|
45601
|
+
var _a2, _b2;
|
|
45602
45602
|
for (const document of documents) {
|
|
45603
45603
|
const key = document.uri.toString();
|
|
45604
45604
|
if (document.state === DocumentState.Validated) {
|
|
@@ -45608,9 +45608,9 @@ var DefaultDocumentBuilder = class {
|
|
|
45608
45608
|
this.buildState.delete(key);
|
|
45609
45609
|
} else if (typeof options.validation === "object") {
|
|
45610
45610
|
const buildState = this.buildState.get(key);
|
|
45611
|
-
const previousCategories = (
|
|
45611
|
+
const previousCategories = (_a2 = buildState === null || buildState === void 0 ? void 0 : buildState.result) === null || _a2 === void 0 ? void 0 : _a2.validationChecks;
|
|
45612
45612
|
if (previousCategories) {
|
|
45613
|
-
const newCategories = (
|
|
45613
|
+
const newCategories = (_b2 = options.validation.categories) !== null && _b2 !== void 0 ? _b2 : ValidationCategory.all;
|
|
45614
45614
|
const categories = newCategories.filter((c) => !previousCategories.includes(c));
|
|
45615
45615
|
if (categories.length > 0) {
|
|
45616
45616
|
this.buildState.set(key, {
|
|
@@ -45658,8 +45658,8 @@ var DefaultDocumentBuilder = class {
|
|
|
45658
45658
|
await this.emitUpdate(changed, deleted);
|
|
45659
45659
|
await interruptAndCheck(cancelToken);
|
|
45660
45660
|
const rebuildDocuments = this.langiumDocuments.all.filter((doc) => {
|
|
45661
|
-
var
|
|
45662
|
-
return doc.state < DocumentState.Linked || !((
|
|
45661
|
+
var _a2;
|
|
45662
|
+
return doc.state < DocumentState.Linked || !((_a2 = this.buildState.get(doc.uri.toString())) === null || _a2 === void 0 ? void 0 : _a2.completed);
|
|
45663
45663
|
}).toArray();
|
|
45664
45664
|
await this.buildDocuments(rebuildDocuments, this.updateBuildOptions, cancelToken);
|
|
45665
45665
|
}
|
|
@@ -45799,7 +45799,7 @@ var DefaultDocumentBuilder = class {
|
|
|
45799
45799
|
* If the document already contains diagnostics, the new ones are added to the list.
|
|
45800
45800
|
*/
|
|
45801
45801
|
async validate(document, cancelToken) {
|
|
45802
|
-
var
|
|
45802
|
+
var _a2, _b2;
|
|
45803
45803
|
const validator = this.serviceRegistry.getServices(document.uri).validation.DocumentValidator;
|
|
45804
45804
|
const validationSetting = this.getBuildOptions(document).validation;
|
|
45805
45805
|
const options = typeof validationSetting === "object" ? validationSetting : void 0;
|
|
@@ -45811,8 +45811,8 @@ var DefaultDocumentBuilder = class {
|
|
|
45811
45811
|
}
|
|
45812
45812
|
const state = this.buildState.get(document.uri.toString());
|
|
45813
45813
|
if (state) {
|
|
45814
|
-
(
|
|
45815
|
-
const newCategories = (
|
|
45814
|
+
(_a2 = state.result) !== null && _a2 !== void 0 ? _a2 : state.result = {};
|
|
45815
|
+
const newCategories = (_b2 = options === null || options === void 0 ? void 0 : options.categories) !== null && _b2 !== void 0 ? _b2 : ValidationCategory.all;
|
|
45816
45816
|
if (state.result.validationChecks) {
|
|
45817
45817
|
state.result.validationChecks.push(...newCategories);
|
|
45818
45818
|
} else {
|
|
@@ -45821,8 +45821,8 @@ var DefaultDocumentBuilder = class {
|
|
|
45821
45821
|
}
|
|
45822
45822
|
}
|
|
45823
45823
|
getBuildOptions(document) {
|
|
45824
|
-
var
|
|
45825
|
-
return (
|
|
45824
|
+
var _a2, _b2;
|
|
45825
|
+
return (_b2 = (_a2 = this.buildState.get(document.uri.toString())) === null || _a2 === void 0 ? void 0 : _a2.options) !== null && _b2 !== void 0 ? _b2 : {};
|
|
45826
45826
|
}
|
|
45827
45827
|
};
|
|
45828
45828
|
|
|
@@ -45856,13 +45856,13 @@ var DefaultIndexManager = class {
|
|
|
45856
45856
|
return documentUris.map((uri) => this.getFileDescriptions(uri, nodeType)).flat();
|
|
45857
45857
|
}
|
|
45858
45858
|
getFileDescriptions(uri, nodeType) {
|
|
45859
|
-
var
|
|
45859
|
+
var _a2;
|
|
45860
45860
|
if (!nodeType) {
|
|
45861
|
-
return (
|
|
45861
|
+
return (_a2 = this.symbolIndex.get(uri)) !== null && _a2 !== void 0 ? _a2 : [];
|
|
45862
45862
|
}
|
|
45863
45863
|
const descriptions = this.symbolByTypeIndex.get(uri, nodeType, () => {
|
|
45864
|
-
var
|
|
45865
|
-
const allFileDescriptions = (
|
|
45864
|
+
var _a3;
|
|
45865
|
+
const allFileDescriptions = (_a3 = this.symbolIndex.get(uri)) !== null && _a3 !== void 0 ? _a3 : [];
|
|
45866
45866
|
return allFileDescriptions.filter((e) => this.astReflection.isSubtype(e.type, nodeType));
|
|
45867
45867
|
});
|
|
45868
45868
|
return descriptions;
|
|
@@ -45909,13 +45909,13 @@ var DefaultWorkspaceManager = class {
|
|
|
45909
45909
|
return this._ready.promise;
|
|
45910
45910
|
}
|
|
45911
45911
|
initialize(params) {
|
|
45912
|
-
var
|
|
45913
|
-
this.folders = (
|
|
45912
|
+
var _a2;
|
|
45913
|
+
this.folders = (_a2 = params.workspaceFolders) !== null && _a2 !== void 0 ? _a2 : void 0;
|
|
45914
45914
|
}
|
|
45915
45915
|
initialized(_params) {
|
|
45916
45916
|
return this.mutex.write((token) => {
|
|
45917
|
-
var
|
|
45918
|
-
return this.initializeWorkspace((
|
|
45917
|
+
var _a2;
|
|
45918
|
+
return this.initializeWorkspace((_a2 = this.folders) !== null && _a2 !== void 0 ? _a2 : [], token);
|
|
45919
45919
|
});
|
|
45920
45920
|
}
|
|
45921
45921
|
async initializeWorkspace(folders, cancelToken = cancellation_exports.CancellationToken.None) {
|
|
@@ -46008,12 +46008,12 @@ var DefaultLexer = class {
|
|
|
46008
46008
|
return this.tokenTypes;
|
|
46009
46009
|
}
|
|
46010
46010
|
tokenize(text) {
|
|
46011
|
-
var
|
|
46011
|
+
var _a2;
|
|
46012
46012
|
const chevrotainResult = this.chevrotainLexer.tokenize(text);
|
|
46013
46013
|
return {
|
|
46014
46014
|
tokens: chevrotainResult.tokens,
|
|
46015
46015
|
errors: chevrotainResult.errors,
|
|
46016
|
-
hidden: (
|
|
46016
|
+
hidden: (_a2 = chevrotainResult.groups.hidden) !== null && _a2 !== void 0 ? _a2 : []
|
|
46017
46017
|
};
|
|
46018
46018
|
}
|
|
46019
46019
|
toTokenTypeDictionary(buildTokens) {
|
|
@@ -46087,7 +46087,7 @@ function getLines(node) {
|
|
|
46087
46087
|
var tagRegex = /\s*(@([\p{L}][\p{L}\p{N}]*)?)/uy;
|
|
46088
46088
|
var inlineTagRegex = /\{(@[\p{L}][\p{L}\p{N}]*)(\s*)([^\r\n}]+)?\}/gu;
|
|
46089
46089
|
function tokenize(context) {
|
|
46090
|
-
var
|
|
46090
|
+
var _a2, _b2, _c2;
|
|
46091
46091
|
const tokens = [];
|
|
46092
46092
|
let currentLine = context.position.line;
|
|
46093
46093
|
let currentCharacter = context.position.character;
|
|
@@ -46097,18 +46097,18 @@ function tokenize(context) {
|
|
|
46097
46097
|
let line = context.lines[i];
|
|
46098
46098
|
let index = 0;
|
|
46099
46099
|
if (first2 && context.options.start) {
|
|
46100
|
-
const match = (
|
|
46100
|
+
const match = (_a2 = context.options.start) === null || _a2 === void 0 ? void 0 : _a2.exec(line);
|
|
46101
46101
|
if (match) {
|
|
46102
46102
|
index = match.index + match[0].length;
|
|
46103
46103
|
}
|
|
46104
46104
|
} else {
|
|
46105
|
-
const match = (
|
|
46105
|
+
const match = (_b2 = context.options.line) === null || _b2 === void 0 ? void 0 : _b2.exec(line);
|
|
46106
46106
|
if (match) {
|
|
46107
46107
|
index = match.index + match[0].length;
|
|
46108
46108
|
}
|
|
46109
46109
|
}
|
|
46110
46110
|
if (last2) {
|
|
46111
|
-
const match = (
|
|
46111
|
+
const match = (_c2 = context.options.end) === null || _c2 === void 0 ? void 0 : _c2.exec(line);
|
|
46112
46112
|
if (match) {
|
|
46113
46113
|
line = line.substring(0, match.index);
|
|
46114
46114
|
}
|
|
@@ -46230,7 +46230,7 @@ function lastCharacter(line) {
|
|
|
46230
46230
|
return void 0;
|
|
46231
46231
|
}
|
|
46232
46232
|
function parseJSDocComment(context) {
|
|
46233
|
-
var
|
|
46233
|
+
var _a2, _b2, _c2, _d;
|
|
46234
46234
|
const startPosition = Position.create(context.position.line, context.position.character);
|
|
46235
46235
|
if (context.tokens.length === 0) {
|
|
46236
46236
|
return new JSDocCommentImpl([], Range2.create(startPosition, startPosition));
|
|
@@ -46242,8 +46242,8 @@ function parseJSDocComment(context) {
|
|
|
46242
46242
|
elements.push(element);
|
|
46243
46243
|
}
|
|
46244
46244
|
}
|
|
46245
|
-
const start = (
|
|
46246
|
-
const end = (_d = (
|
|
46245
|
+
const start = (_b2 = (_a2 = elements[0]) === null || _a2 === void 0 ? void 0 : _a2.range.start) !== null && _b2 !== void 0 ? _b2 : startPosition;
|
|
46246
|
+
const end = (_d = (_c2 = elements[elements.length - 1]) === null || _c2 === void 0 ? void 0 : _c2.range.end) !== null && _d !== void 0 ? _d : startPosition;
|
|
46247
46247
|
return new JSDocCommentImpl(elements, Range2.create(start, end));
|
|
46248
46248
|
}
|
|
46249
46249
|
function parseJSDocElement(context, last2) {
|
|
@@ -46398,8 +46398,8 @@ ${content}`;
|
|
|
46398
46398
|
}
|
|
46399
46399
|
}
|
|
46400
46400
|
toMarkdown(options) {
|
|
46401
|
-
var
|
|
46402
|
-
return (
|
|
46401
|
+
var _a2, _b2;
|
|
46402
|
+
return (_b2 = (_a2 = options === null || options === void 0 ? void 0 : options.renderTag) === null || _a2 === void 0 ? void 0 : _a2.call(options, this)) !== null && _b2 !== void 0 ? _b2 : this.toMarkdownDefault(options);
|
|
46403
46403
|
}
|
|
46404
46404
|
toMarkdownDefault(options) {
|
|
46405
46405
|
const content = this.content.toMarkdown(options);
|
|
@@ -46432,7 +46432,7 @@ ${content}`;
|
|
|
46432
46432
|
}
|
|
46433
46433
|
};
|
|
46434
46434
|
function renderInlineTag(tag, content, options) {
|
|
46435
|
-
var
|
|
46435
|
+
var _a2, _b2;
|
|
46436
46436
|
if (tag === "linkplain" || tag === "linkcode" || tag === "link") {
|
|
46437
46437
|
const index = content.indexOf(" ");
|
|
46438
46438
|
let display = content;
|
|
@@ -46444,7 +46444,7 @@ function renderInlineTag(tag, content, options) {
|
|
|
46444
46444
|
if (tag === "linkcode" || tag === "link" && options.link === "code") {
|
|
46445
46445
|
display = `\`${display}\``;
|
|
46446
46446
|
}
|
|
46447
|
-
const renderedLink = (
|
|
46447
|
+
const renderedLink = (_b2 = (_a2 = options.renderLink) === null || _a2 === void 0 ? void 0 : _a2.call(options, content, display)) !== null && _b2 !== void 0 ? _b2 : renderLinkDefault(content, display);
|
|
46448
46448
|
return renderedLink;
|
|
46449
46449
|
}
|
|
46450
46450
|
return void 0;
|
|
@@ -46453,7 +46453,7 @@ function renderLinkDefault(content, display) {
|
|
|
46453
46453
|
try {
|
|
46454
46454
|
URI2.parse(content, true);
|
|
46455
46455
|
return `[${display}](${content})`;
|
|
46456
|
-
} catch (
|
|
46456
|
+
} catch (_a2) {
|
|
46457
46457
|
return content;
|
|
46458
46458
|
}
|
|
46459
46459
|
}
|
|
@@ -46529,8 +46529,8 @@ var JSDocDocumentationProvider = class {
|
|
|
46529
46529
|
return void 0;
|
|
46530
46530
|
}
|
|
46531
46531
|
documentationLinkRenderer(node, name, display) {
|
|
46532
|
-
var
|
|
46533
|
-
const description = (
|
|
46532
|
+
var _a2;
|
|
46533
|
+
const description = (_a2 = this.findNameInPrecomputedScopes(node, name)) !== null && _a2 !== void 0 ? _a2 : this.findNameInGlobalScope(node, name);
|
|
46534
46534
|
if (description && description.nameSegment) {
|
|
46535
46535
|
const line = description.nameSegment.range.start.line + 1;
|
|
46536
46536
|
const character = description.nameSegment.range.start.character + 1;
|
|
@@ -46572,11 +46572,11 @@ var DefaultCommentProvider = class {
|
|
|
46572
46572
|
this.grammarConfig = () => services.parser.GrammarConfig;
|
|
46573
46573
|
}
|
|
46574
46574
|
getComment(node) {
|
|
46575
|
-
var
|
|
46575
|
+
var _a2;
|
|
46576
46576
|
if (isAstNodeWithComment(node)) {
|
|
46577
46577
|
return node.$comment;
|
|
46578
46578
|
}
|
|
46579
|
-
return (
|
|
46579
|
+
return (_a2 = findCommentNode(node.$cstNode, this.grammarConfig().multilineCommentRules)) === null || _a2 === void 0 ? void 0 : _a2.text;
|
|
46580
46580
|
}
|
|
46581
46581
|
};
|
|
46582
46582
|
|
|
@@ -47211,10 +47211,10 @@ function createMinimalGrammarServices() {
|
|
|
47211
47211
|
return grammar;
|
|
47212
47212
|
}
|
|
47213
47213
|
function loadGrammarFromJson(json) {
|
|
47214
|
-
var
|
|
47214
|
+
var _a2;
|
|
47215
47215
|
const services = createMinimalGrammarServices();
|
|
47216
47216
|
const astNode = services.serializer.JsonSerializer.deserialize(json);
|
|
47217
|
-
services.shared.workspace.LangiumDocumentFactory.fromModel(astNode, URI2.parse(`memory://${(
|
|
47217
|
+
services.shared.workspace.LangiumDocumentFactory.fromModel(astNode, URI2.parse(`memory://${(_a2 = astNode.name) !== null && _a2 !== void 0 ? _a2 : "grammar"}.langium`));
|
|
47218
47218
|
return astNode;
|
|
47219
47219
|
}
|
|
47220
47220
|
|
|
@@ -47302,7 +47302,7 @@ function findFirstFeatures(next) {
|
|
|
47302
47302
|
return findFirstFeaturesInternal({ next, cardinalities: /* @__PURE__ */ new Map(), visited: /* @__PURE__ */ new Set(), plus: /* @__PURE__ */ new Set() });
|
|
47303
47303
|
}
|
|
47304
47304
|
function findFirstFeaturesInternal(options) {
|
|
47305
|
-
var
|
|
47305
|
+
var _a2, _b2, _c2;
|
|
47306
47306
|
const { next, cardinalities, visited, plus: plus2 } = options;
|
|
47307
47307
|
if (next === void 0) {
|
|
47308
47308
|
return [];
|
|
@@ -47332,7 +47332,7 @@ function findFirstFeaturesInternal(options) {
|
|
|
47332
47332
|
const assignmentNext = {
|
|
47333
47333
|
feature: feature.terminal,
|
|
47334
47334
|
type,
|
|
47335
|
-
property: (
|
|
47335
|
+
property: (_a2 = next.property) !== null && _a2 !== void 0 ? _a2 : feature.feature
|
|
47336
47336
|
};
|
|
47337
47337
|
return findFirstFeaturesInternal({ next: assignmentNext, cardinalities, visited, plus: plus2 }).map((e) => modifyCardinality(e, feature.cardinality, cardinalities));
|
|
47338
47338
|
} else if (isAction(feature)) {
|
|
@@ -47340,7 +47340,7 @@ function findFirstFeaturesInternal(options) {
|
|
|
47340
47340
|
next: {
|
|
47341
47341
|
feature,
|
|
47342
47342
|
type: getTypeName(feature),
|
|
47343
|
-
property: (
|
|
47343
|
+
property: (_b2 = next.property) !== null && _b2 !== void 0 ? _b2 : feature.feature
|
|
47344
47344
|
},
|
|
47345
47345
|
cardinalities,
|
|
47346
47346
|
visited,
|
|
@@ -47350,7 +47350,7 @@ function findFirstFeaturesInternal(options) {
|
|
|
47350
47350
|
const rule = feature.rule.ref;
|
|
47351
47351
|
const ruleCallNext = {
|
|
47352
47352
|
feature: rule.definition,
|
|
47353
|
-
type: rule.fragment || rule.dataType ? void 0 : (
|
|
47353
|
+
type: rule.fragment || rule.dataType ? void 0 : (_c2 = getExplicitRuleType(rule)) !== null && _c2 !== void 0 ? _c2 : rule.name,
|
|
47354
47354
|
property: next.property
|
|
47355
47355
|
};
|
|
47356
47356
|
return findFirstFeaturesInternal({ next: ruleCallNext, cardinalities, visited, plus: plus2 }).map((e) => modifyCardinality(e, feature.cardinality, cardinalities));
|
|
@@ -47363,7 +47363,7 @@ function modifyCardinality(next, cardinality, cardinalities) {
|
|
|
47363
47363
|
return next;
|
|
47364
47364
|
}
|
|
47365
47365
|
function findNextFeaturesInGroup(next, index, cardinalities, visited, plus2) {
|
|
47366
|
-
var
|
|
47366
|
+
var _a2;
|
|
47367
47367
|
const features = [];
|
|
47368
47368
|
let firstFeature;
|
|
47369
47369
|
while (index < next.feature.elements.length) {
|
|
@@ -47378,7 +47378,7 @@ function findNextFeaturesInGroup(next, index, cardinalities, visited, plus2) {
|
|
|
47378
47378
|
visited,
|
|
47379
47379
|
plus: plus2
|
|
47380
47380
|
}));
|
|
47381
|
-
if (!isOptionalCardinality((
|
|
47381
|
+
if (!isOptionalCardinality((_a2 = firstFeature.feature.cardinality) !== null && _a2 !== void 0 ? _a2 : cardinalities.get(firstFeature.feature), firstFeature.feature)) {
|
|
47382
47382
|
break;
|
|
47383
47383
|
}
|
|
47384
47384
|
}
|
|
@@ -47456,12 +47456,12 @@ function ruleMatches(rule, token) {
|
|
|
47456
47456
|
// node_modules/langium/lib/lsp/completion/completion-provider.js
|
|
47457
47457
|
function mergeCompletionProviderOptions(options) {
|
|
47458
47458
|
const triggerCharacters = Array.from(new Set(options.flatMap((option2) => {
|
|
47459
|
-
var
|
|
47460
|
-
return (
|
|
47459
|
+
var _a2;
|
|
47460
|
+
return (_a2 = option2 === null || option2 === void 0 ? void 0 : option2.triggerCharacters) !== null && _a2 !== void 0 ? _a2 : [];
|
|
47461
47461
|
})));
|
|
47462
47462
|
const allCommitCharacters = Array.from(new Set(options.flatMap((option2) => {
|
|
47463
|
-
var
|
|
47464
|
-
return (
|
|
47463
|
+
var _a2;
|
|
47464
|
+
return (_a2 = option2 === null || option2 === void 0 ? void 0 : option2.allCommitCharacters) !== null && _a2 !== void 0 ? _a2 : [];
|
|
47465
47465
|
})));
|
|
47466
47466
|
return {
|
|
47467
47467
|
triggerCharacters: triggerCharacters.length > 0 ? triggerCharacters : void 0,
|
|
@@ -47540,7 +47540,7 @@ var DefaultCompletionProvider = class {
|
|
|
47540
47540
|
return features;
|
|
47541
47541
|
}
|
|
47542
47542
|
*buildContexts(document, position) {
|
|
47543
|
-
var
|
|
47543
|
+
var _a2, _b2;
|
|
47544
47544
|
const cst = document.parseResult.value.$cstNode;
|
|
47545
47545
|
if (!cst) {
|
|
47546
47546
|
return;
|
|
@@ -47557,7 +47557,7 @@ var DefaultCompletionProvider = class {
|
|
|
47557
47557
|
const dataTypeRuleOffsets = this.findDataTypeRuleStart(cst, offset);
|
|
47558
47558
|
if (dataTypeRuleOffsets) {
|
|
47559
47559
|
const [ruleStart, ruleEnd] = dataTypeRuleOffsets;
|
|
47560
|
-
const parentNode = (
|
|
47560
|
+
const parentNode = (_a2 = findLeafNodeBeforeOffset(cst, ruleStart)) === null || _a2 === void 0 ? void 0 : _a2.astNode;
|
|
47561
47561
|
yield Object.assign(Object.assign({}, partialContext), { node: parentNode, tokenOffset: ruleStart, tokenEndOffset: ruleEnd, features: this.findFeaturesAt(textDocument, ruleStart) });
|
|
47562
47562
|
}
|
|
47563
47563
|
const { nextTokenStart, nextTokenEnd, previousTokenStart, previousTokenEnd } = this.backtrackToAnyToken(text, offset);
|
|
@@ -47565,7 +47565,7 @@ var DefaultCompletionProvider = class {
|
|
|
47565
47565
|
if (offset <= nextTokenStart && previousTokenStart !== void 0) {
|
|
47566
47566
|
astNodeOffset = previousTokenStart;
|
|
47567
47567
|
}
|
|
47568
|
-
const astNode = (
|
|
47568
|
+
const astNode = (_b2 = findLeafNodeBeforeOffset(cst, astNodeOffset)) === null || _b2 === void 0 ? void 0 : _b2.astNode;
|
|
47569
47569
|
let performNextCompletion = true;
|
|
47570
47570
|
if (previousTokenStart !== void 0 && previousTokenEnd !== void 0 && previousTokenEnd === offset) {
|
|
47571
47571
|
yield Object.assign(Object.assign({}, partialContext), { node: astNode, tokenOffset: previousTokenStart, tokenEndOffset: previousTokenEnd, features: this.findFeaturesAt(textDocument, previousTokenStart) });
|
|
@@ -47588,13 +47588,13 @@ var DefaultCompletionProvider = class {
|
|
|
47588
47588
|
return new RegExp("\\P{L}$", "u").test(text);
|
|
47589
47589
|
}
|
|
47590
47590
|
findDataTypeRuleStart(cst, offset) {
|
|
47591
|
-
var
|
|
47591
|
+
var _a2, _b2;
|
|
47592
47592
|
let containerNode = findDeclarationNodeAtOffset(cst, offset, this.grammarConfig.nameRegexp);
|
|
47593
|
-
let isDataTypeNode2 = Boolean((
|
|
47593
|
+
let isDataTypeNode2 = Boolean((_a2 = getContainerOfType(containerNode === null || containerNode === void 0 ? void 0 : containerNode.grammarSource, isParserRule)) === null || _a2 === void 0 ? void 0 : _a2.dataType);
|
|
47594
47594
|
if (isDataTypeNode2) {
|
|
47595
47595
|
while (isDataTypeNode2) {
|
|
47596
47596
|
containerNode = containerNode === null || containerNode === void 0 ? void 0 : containerNode.container;
|
|
47597
|
-
isDataTypeNode2 = Boolean((
|
|
47597
|
+
isDataTypeNode2 = Boolean((_b2 = getContainerOfType(containerNode === null || containerNode === void 0 ? void 0 : containerNode.grammarSource, isParserRule)) === null || _b2 === void 0 ? void 0 : _b2.dataType);
|
|
47598
47598
|
}
|
|
47599
47599
|
if (containerNode) {
|
|
47600
47600
|
return [containerNode.offset, containerNode.end];
|
|
@@ -47729,7 +47729,7 @@ var DefaultCompletionProvider = class {
|
|
|
47729
47729
|
return new RegExp("\\p{L}", "u").test(keyword.value);
|
|
47730
47730
|
}
|
|
47731
47731
|
fillCompletionItem(context, item) {
|
|
47732
|
-
var
|
|
47732
|
+
var _a2, _b2;
|
|
47733
47733
|
let label;
|
|
47734
47734
|
if (typeof item.label === "string") {
|
|
47735
47735
|
label = item.label;
|
|
@@ -47745,14 +47745,14 @@ var DefaultCompletionProvider = class {
|
|
|
47745
47745
|
return void 0;
|
|
47746
47746
|
}
|
|
47747
47747
|
let insertText;
|
|
47748
|
-
if (typeof ((
|
|
47748
|
+
if (typeof ((_a2 = item.textEdit) === null || _a2 === void 0 ? void 0 : _a2.newText) === "string") {
|
|
47749
47749
|
insertText = item.textEdit.newText;
|
|
47750
47750
|
} else if (typeof item.insertText === "string") {
|
|
47751
47751
|
insertText = item.insertText;
|
|
47752
47752
|
} else {
|
|
47753
47753
|
insertText = label;
|
|
47754
47754
|
}
|
|
47755
|
-
const textEdit = (
|
|
47755
|
+
const textEdit = (_b2 = item.textEdit) !== null && _b2 !== void 0 ? _b2 : this.buildCompletionTextEdit(context, label, insertText);
|
|
47756
47756
|
if (!textEdit) {
|
|
47757
47757
|
return void 0;
|
|
47758
47758
|
}
|
|
@@ -47820,10 +47820,10 @@ var DefaultDefinitionProvider = class {
|
|
|
47820
47820
|
return void 0;
|
|
47821
47821
|
}
|
|
47822
47822
|
collectLocationLinks(sourceCstNode, _params) {
|
|
47823
|
-
var
|
|
47823
|
+
var _a2;
|
|
47824
47824
|
const goToLink = this.findLink(sourceCstNode);
|
|
47825
47825
|
if (goToLink) {
|
|
47826
|
-
return [import_vscode_languageserver3.LocationLink.create(goToLink.targetDocument.textDocument.uri, ((
|
|
47826
|
+
return [import_vscode_languageserver3.LocationLink.create(goToLink.targetDocument.textDocument.uri, ((_a2 = goToLink.target.astNode.$cstNode) !== null && _a2 !== void 0 ? _a2 : goToLink.target).range, goToLink.target.range, goToLink.source.range)];
|
|
47827
47827
|
}
|
|
47828
47828
|
return void 0;
|
|
47829
47829
|
}
|
|
@@ -47923,8 +47923,8 @@ var DefaultDocumentUpdateHandler = class {
|
|
|
47923
47923
|
this.workspaceLock = services.workspace.WorkspaceLock;
|
|
47924
47924
|
let canRegisterFileWatcher = false;
|
|
47925
47925
|
services.lsp.LanguageServer.onInitialize((params) => {
|
|
47926
|
-
var
|
|
47927
|
-
canRegisterFileWatcher = Boolean((
|
|
47926
|
+
var _a2, _b2;
|
|
47927
|
+
canRegisterFileWatcher = Boolean((_b2 = (_a2 = params.capabilities.workspace) === null || _a2 === void 0 ? void 0 : _a2.didChangeWatchedFiles) === null || _b2 === void 0 ? void 0 : _b2.dynamicRegistration);
|
|
47928
47928
|
});
|
|
47929
47929
|
services.lsp.LanguageServer.onInitialized((_params) => {
|
|
47930
47930
|
if (canRegisterFileWatcher) {
|
|
@@ -47974,8 +47974,8 @@ var DefaultFoldingRangeProvider = class {
|
|
|
47974
47974
|
return foldings;
|
|
47975
47975
|
}
|
|
47976
47976
|
collectFolding(document, acceptor) {
|
|
47977
|
-
var
|
|
47978
|
-
const root2 = (
|
|
47977
|
+
var _a2;
|
|
47978
|
+
const root2 = (_a2 = document.parseResult) === null || _a2 === void 0 ? void 0 : _a2.value;
|
|
47979
47979
|
if (root2) {
|
|
47980
47980
|
if (this.shouldProcessContent(root2)) {
|
|
47981
47981
|
const treeIterator = streamAllContents(root2).iterator();
|
|
@@ -48117,8 +48117,8 @@ var AstNodeHoverProvider = class {
|
|
|
48117
48117
|
this.grammarConfig = services.parser.GrammarConfig;
|
|
48118
48118
|
}
|
|
48119
48119
|
getHoverContent(document, params) {
|
|
48120
|
-
var
|
|
48121
|
-
const rootNode = (
|
|
48120
|
+
var _a2, _b2;
|
|
48121
|
+
const rootNode = (_b2 = (_a2 = document.parseResult) === null || _a2 === void 0 ? void 0 : _a2.value) === null || _b2 === void 0 ? void 0 : _b2.$cstNode;
|
|
48122
48122
|
if (rootNode) {
|
|
48123
48123
|
const offset = document.textDocument.offsetAt(params.position);
|
|
48124
48124
|
const cstNode = findDeclarationNodeAtOffset(rootNode, offset, this.grammarConfig.nameRegexp);
|
|
@@ -48289,97 +48289,97 @@ var DefaultLanguageServer = class {
|
|
|
48289
48289
|
return allServices.some((services) => callback(services) !== void 0);
|
|
48290
48290
|
}
|
|
48291
48291
|
buildInitializeResult(_params) {
|
|
48292
|
-
var
|
|
48293
|
-
const fileOperationOptions = (
|
|
48292
|
+
var _a2, _b2, _c2, _d;
|
|
48293
|
+
const fileOperationOptions = (_a2 = this.services.lsp.FileOperationHandler) === null || _a2 === void 0 ? void 0 : _a2.fileOperationOptions;
|
|
48294
48294
|
const allServices = this.services.ServiceRegistry.all;
|
|
48295
48295
|
const hasFormattingService = this.hasService((e) => {
|
|
48296
|
-
var
|
|
48297
|
-
return (
|
|
48296
|
+
var _a3;
|
|
48297
|
+
return (_a3 = e.lsp) === null || _a3 === void 0 ? void 0 : _a3.Formatter;
|
|
48298
48298
|
});
|
|
48299
48299
|
const formattingOnTypeOptions = allServices.map((e) => {
|
|
48300
|
-
var
|
|
48301
|
-
return (
|
|
48300
|
+
var _a3, _b3;
|
|
48301
|
+
return (_b3 = (_a3 = e.lsp) === null || _a3 === void 0 ? void 0 : _a3.Formatter) === null || _b3 === void 0 ? void 0 : _b3.formatOnTypeOptions;
|
|
48302
48302
|
}).find((e) => Boolean(e));
|
|
48303
48303
|
const hasCodeActionProvider = this.hasService((e) => {
|
|
48304
|
-
var
|
|
48305
|
-
return (
|
|
48304
|
+
var _a3;
|
|
48305
|
+
return (_a3 = e.lsp) === null || _a3 === void 0 ? void 0 : _a3.CodeActionProvider;
|
|
48306
48306
|
});
|
|
48307
48307
|
const hasSemanticTokensProvider = this.hasService((e) => {
|
|
48308
|
-
var
|
|
48309
|
-
return (
|
|
48308
|
+
var _a3;
|
|
48309
|
+
return (_a3 = e.lsp) === null || _a3 === void 0 ? void 0 : _a3.SemanticTokenProvider;
|
|
48310
48310
|
});
|
|
48311
|
-
const commandNames = (
|
|
48311
|
+
const commandNames = (_c2 = (_b2 = this.services.lsp) === null || _b2 === void 0 ? void 0 : _b2.ExecuteCommandHandler) === null || _c2 === void 0 ? void 0 : _c2.commands;
|
|
48312
48312
|
const hasDocumentLinkProvider = this.hasService((e) => {
|
|
48313
|
-
var
|
|
48314
|
-
return (
|
|
48313
|
+
var _a3;
|
|
48314
|
+
return (_a3 = e.lsp) === null || _a3 === void 0 ? void 0 : _a3.DocumentLinkProvider;
|
|
48315
48315
|
});
|
|
48316
48316
|
const signatureHelpOptions = mergeSignatureHelpOptions(allServices.map((e) => {
|
|
48317
|
-
var
|
|
48318
|
-
return (
|
|
48317
|
+
var _a3, _b3;
|
|
48318
|
+
return (_b3 = (_a3 = e.lsp) === null || _a3 === void 0 ? void 0 : _a3.SignatureHelp) === null || _b3 === void 0 ? void 0 : _b3.signatureHelpOptions;
|
|
48319
48319
|
}));
|
|
48320
48320
|
const hasGoToTypeProvider = this.hasService((e) => {
|
|
48321
|
-
var
|
|
48322
|
-
return (
|
|
48321
|
+
var _a3;
|
|
48322
|
+
return (_a3 = e.lsp) === null || _a3 === void 0 ? void 0 : _a3.TypeProvider;
|
|
48323
48323
|
});
|
|
48324
48324
|
const hasGoToImplementationProvider = this.hasService((e) => {
|
|
48325
|
-
var
|
|
48326
|
-
return (
|
|
48325
|
+
var _a3;
|
|
48326
|
+
return (_a3 = e.lsp) === null || _a3 === void 0 ? void 0 : _a3.ImplementationProvider;
|
|
48327
48327
|
});
|
|
48328
48328
|
const hasCompletionProvider = this.hasService((e) => {
|
|
48329
|
-
var
|
|
48330
|
-
return (
|
|
48329
|
+
var _a3;
|
|
48330
|
+
return (_a3 = e.lsp) === null || _a3 === void 0 ? void 0 : _a3.CompletionProvider;
|
|
48331
48331
|
});
|
|
48332
48332
|
const completionOptions = mergeCompletionProviderOptions(allServices.map((e) => {
|
|
48333
|
-
var
|
|
48334
|
-
return (
|
|
48333
|
+
var _a3, _b3;
|
|
48334
|
+
return (_b3 = (_a3 = e.lsp) === null || _a3 === void 0 ? void 0 : _a3.CompletionProvider) === null || _b3 === void 0 ? void 0 : _b3.completionOptions;
|
|
48335
48335
|
}));
|
|
48336
48336
|
const hasReferencesProvider = this.hasService((e) => {
|
|
48337
|
-
var
|
|
48338
|
-
return (
|
|
48337
|
+
var _a3;
|
|
48338
|
+
return (_a3 = e.lsp) === null || _a3 === void 0 ? void 0 : _a3.ReferencesProvider;
|
|
48339
48339
|
});
|
|
48340
48340
|
const hasDocumentSymbolProvider = this.hasService((e) => {
|
|
48341
|
-
var
|
|
48342
|
-
return (
|
|
48341
|
+
var _a3;
|
|
48342
|
+
return (_a3 = e.lsp) === null || _a3 === void 0 ? void 0 : _a3.DocumentSymbolProvider;
|
|
48343
48343
|
});
|
|
48344
48344
|
const hasDefinitionProvider = this.hasService((e) => {
|
|
48345
|
-
var
|
|
48346
|
-
return (
|
|
48345
|
+
var _a3;
|
|
48346
|
+
return (_a3 = e.lsp) === null || _a3 === void 0 ? void 0 : _a3.DefinitionProvider;
|
|
48347
48347
|
});
|
|
48348
48348
|
const hasDocumentHighlightProvider = this.hasService((e) => {
|
|
48349
|
-
var
|
|
48350
|
-
return (
|
|
48349
|
+
var _a3;
|
|
48350
|
+
return (_a3 = e.lsp) === null || _a3 === void 0 ? void 0 : _a3.DocumentHighlightProvider;
|
|
48351
48351
|
});
|
|
48352
48352
|
const hasFoldingRangeProvider = this.hasService((e) => {
|
|
48353
|
-
var
|
|
48354
|
-
return (
|
|
48353
|
+
var _a3;
|
|
48354
|
+
return (_a3 = e.lsp) === null || _a3 === void 0 ? void 0 : _a3.FoldingRangeProvider;
|
|
48355
48355
|
});
|
|
48356
48356
|
const hasHoverProvider = this.hasService((e) => {
|
|
48357
|
-
var
|
|
48358
|
-
return (
|
|
48357
|
+
var _a3;
|
|
48358
|
+
return (_a3 = e.lsp) === null || _a3 === void 0 ? void 0 : _a3.HoverProvider;
|
|
48359
48359
|
});
|
|
48360
48360
|
const hasRenameProvider = this.hasService((e) => {
|
|
48361
|
-
var
|
|
48362
|
-
return (
|
|
48361
|
+
var _a3;
|
|
48362
|
+
return (_a3 = e.lsp) === null || _a3 === void 0 ? void 0 : _a3.RenameProvider;
|
|
48363
48363
|
});
|
|
48364
48364
|
const hasCallHierarchyProvider = this.hasService((e) => {
|
|
48365
|
-
var
|
|
48366
|
-
return (
|
|
48365
|
+
var _a3;
|
|
48366
|
+
return (_a3 = e.lsp) === null || _a3 === void 0 ? void 0 : _a3.CallHierarchyProvider;
|
|
48367
48367
|
});
|
|
48368
48368
|
const hasTypeHierarchyProvider = this.hasService((e) => {
|
|
48369
|
-
var
|
|
48370
|
-
return (
|
|
48369
|
+
var _a3;
|
|
48370
|
+
return (_a3 = e.lsp) === null || _a3 === void 0 ? void 0 : _a3.TypeHierarchyProvider;
|
|
48371
48371
|
});
|
|
48372
48372
|
const hasCodeLensProvider = this.hasService((e) => {
|
|
48373
|
-
var
|
|
48374
|
-
return (
|
|
48373
|
+
var _a3;
|
|
48374
|
+
return (_a3 = e.lsp) === null || _a3 === void 0 ? void 0 : _a3.CodeLensProvider;
|
|
48375
48375
|
});
|
|
48376
48376
|
const hasDeclarationProvider = this.hasService((e) => {
|
|
48377
|
-
var
|
|
48378
|
-
return (
|
|
48377
|
+
var _a3;
|
|
48378
|
+
return (_a3 = e.lsp) === null || _a3 === void 0 ? void 0 : _a3.DeclarationProvider;
|
|
48379
48379
|
});
|
|
48380
48380
|
const hasInlayHintProvider = this.hasService((e) => {
|
|
48381
|
-
var
|
|
48382
|
-
return (
|
|
48381
|
+
var _a3;
|
|
48382
|
+
return (_a3 = e.lsp) === null || _a3 === void 0 ? void 0 : _a3.InlayHintProvider;
|
|
48383
48383
|
});
|
|
48384
48384
|
const workspaceSymbolProvider = (_d = this.services.lsp) === null || _d === void 0 ? void 0 : _d.WorkspaceSymbolProvider;
|
|
48385
48385
|
const result = {
|
|
@@ -48660,11 +48660,11 @@ var AbstractFormatter = class {
|
|
|
48660
48660
|
const pr = document.parseResult;
|
|
48661
48661
|
if (pr.lexerErrors.length || pr.parserErrors.length) {
|
|
48662
48662
|
const earliestErrLine = Math.min(...pr.lexerErrors.map((e) => {
|
|
48663
|
-
var
|
|
48664
|
-
return (
|
|
48663
|
+
var _a2;
|
|
48664
|
+
return (_a2 = e.line) !== null && _a2 !== void 0 ? _a2 : Number.MAX_VALUE;
|
|
48665
48665
|
}), ...pr.parserErrors.map((e) => {
|
|
48666
|
-
var
|
|
48667
|
-
return (
|
|
48666
|
+
var _a2;
|
|
48667
|
+
return (_a2 = e.token.startLine) !== null && _a2 !== void 0 ? _a2 : Number.MAX_VALUE;
|
|
48668
48668
|
}));
|
|
48669
48669
|
return earliestErrLine > range.end.line;
|
|
48670
48670
|
} else {
|
|
@@ -48698,11 +48698,11 @@ var AbstractFormatter = class {
|
|
|
48698
48698
|
doDocumentFormat(document, options, range) {
|
|
48699
48699
|
const map2 = /* @__PURE__ */ new Map();
|
|
48700
48700
|
const collector = (node, mode, formatting) => {
|
|
48701
|
-
var
|
|
48701
|
+
var _a2, _b2;
|
|
48702
48702
|
const key = this.nodeModeToKey(node, mode);
|
|
48703
48703
|
const existing = map2.get(key);
|
|
48704
|
-
const priority = (
|
|
48705
|
-
const existingPriority = (
|
|
48704
|
+
const priority = (_a2 = formatting.options.priority) !== null && _a2 !== void 0 ? _a2 : 0;
|
|
48705
|
+
const existingPriority = (_b2 = existing === null || existing === void 0 ? void 0 : existing.options.priority) !== null && _b2 !== void 0 ? _b2 : 0;
|
|
48706
48706
|
if (!existing || existingPriority <= priority) {
|
|
48707
48707
|
map2.set(key, formatting);
|
|
48708
48708
|
}
|
|
@@ -48818,7 +48818,7 @@ var AbstractFormatter = class {
|
|
|
48818
48818
|
return edits;
|
|
48819
48819
|
}
|
|
48820
48820
|
createHiddenTextEdits(previous, hidden, formatting, context) {
|
|
48821
|
-
var
|
|
48821
|
+
var _a2;
|
|
48822
48822
|
const startLine = hidden.range.start.line;
|
|
48823
48823
|
if (previous && previous.range.end.line === startLine) {
|
|
48824
48824
|
return [];
|
|
@@ -48832,7 +48832,7 @@ var AbstractFormatter = class {
|
|
|
48832
48832
|
end: hidden.range.start
|
|
48833
48833
|
};
|
|
48834
48834
|
const hiddenStartText = context.document.getText(startRange);
|
|
48835
|
-
const move = this.findFittingMove(startRange, (
|
|
48835
|
+
const move = this.findFittingMove(startRange, (_a2 = formatting === null || formatting === void 0 ? void 0 : formatting.moves) !== null && _a2 !== void 0 ? _a2 : [], context);
|
|
48836
48836
|
const hiddenStartChar = this.getExistingIndentationCharacterCount(hiddenStartText, context);
|
|
48837
48837
|
const expectedStartChar = this.getIndentationCharacterCount(context, move);
|
|
48838
48838
|
const characterIncrease = expectedStartChar - hiddenStartChar;
|
|
@@ -48898,12 +48898,12 @@ var AbstractFormatter = class {
|
|
|
48898
48898
|
return (context.options.insertSpaces ? context.options.tabSize : 1) * indentation;
|
|
48899
48899
|
}
|
|
48900
48900
|
createTextEdit(a2, b, formatting, context) {
|
|
48901
|
-
var
|
|
48901
|
+
var _a2;
|
|
48902
48902
|
if (b.hidden) {
|
|
48903
48903
|
return this.createHiddenTextEdits(a2, b, formatting, context);
|
|
48904
48904
|
}
|
|
48905
48905
|
const betweenRange = {
|
|
48906
|
-
start: (
|
|
48906
|
+
start: (_a2 = a2 === null || a2 === void 0 ? void 0 : a2.range.end) !== null && _a2 !== void 0 ? _a2 : {
|
|
48907
48907
|
character: 0,
|
|
48908
48908
|
line: 0
|
|
48909
48909
|
},
|
|
@@ -49175,10 +49175,10 @@ var Formatting;
|
|
|
49175
49175
|
}
|
|
49176
49176
|
Formatting2.noIndent = noIndent;
|
|
49177
49177
|
function compareMoves(a2, b) {
|
|
49178
|
-
var
|
|
49179
|
-
const aLines = (
|
|
49180
|
-
const bLines = (
|
|
49181
|
-
const aTabs = (
|
|
49178
|
+
var _a2, _b2, _c2, _d, _e, _f;
|
|
49179
|
+
const aLines = (_a2 = a2.lines) !== null && _a2 !== void 0 ? _a2 : 0;
|
|
49180
|
+
const bLines = (_b2 = b.lines) !== null && _b2 !== void 0 ? _b2 : 0;
|
|
49181
|
+
const aTabs = (_c2 = a2.tabs) !== null && _c2 !== void 0 ? _c2 : 0;
|
|
49182
49182
|
const bTabs = (_d = b.tabs) !== null && _d !== void 0 ? _d : 0;
|
|
49183
49183
|
const aSpaces = (_e = a2.characters) !== null && _e !== void 0 ? _e : 0;
|
|
49184
49184
|
const bSpaces = (_f = b.characters) !== null && _f !== void 0 ? _f : 0;
|
|
@@ -51358,6 +51358,7 @@ var IntelligentSystemDesignLanguageAstReflection = class extends AbstractAstRefl
|
|
|
51358
51358
|
name: "ParentExpressionAssignment",
|
|
51359
51359
|
properties: [
|
|
51360
51360
|
{ name: "exp" },
|
|
51361
|
+
{ name: "nameAccess" },
|
|
51361
51362
|
{ name: "property" },
|
|
51362
51363
|
{ name: "propertyLookup" },
|
|
51363
51364
|
{ name: "subProperties" }
|
|
@@ -51377,6 +51378,7 @@ var IntelligentSystemDesignLanguageAstReflection = class extends AbstractAstRefl
|
|
|
51377
51378
|
return {
|
|
51378
51379
|
name: "ParentIncrementDecrementAssignment",
|
|
51379
51380
|
properties: [
|
|
51381
|
+
{ name: "nameAccess" },
|
|
51380
51382
|
{ name: "property" },
|
|
51381
51383
|
{ name: "propertyLookup" },
|
|
51382
51384
|
{ name: "subProperties" },
|
|
@@ -51417,6 +51419,7 @@ var IntelligentSystemDesignLanguageAstReflection = class extends AbstractAstRefl
|
|
|
51417
51419
|
name: "ParentQuickModifyAssignment",
|
|
51418
51420
|
properties: [
|
|
51419
51421
|
{ name: "exp" },
|
|
51422
|
+
{ name: "nameAccess" },
|
|
51420
51423
|
{ name: "property" },
|
|
51421
51424
|
{ name: "propertyLookup" },
|
|
51422
51425
|
{ name: "subProperties" },
|
|
@@ -51950,8 +51953,9 @@ var IntelligentSystemDesignLanguageAstReflection = class extends AbstractAstRefl
|
|
|
51950
51953
|
name: "TargetExpressionAssignment",
|
|
51951
51954
|
properties: [
|
|
51952
51955
|
{ name: "exp" },
|
|
51956
|
+
{ name: "nameAccess" },
|
|
51953
51957
|
{ name: "property" },
|
|
51954
|
-
{ name: "subProperties"
|
|
51958
|
+
{ name: "subProperties" }
|
|
51955
51959
|
]
|
|
51956
51960
|
};
|
|
51957
51961
|
}
|
|
@@ -51959,8 +51963,9 @@ var IntelligentSystemDesignLanguageAstReflection = class extends AbstractAstRefl
|
|
|
51959
51963
|
return {
|
|
51960
51964
|
name: "TargetIncrementDecrementAssignment",
|
|
51961
51965
|
properties: [
|
|
51966
|
+
{ name: "nameAccess" },
|
|
51962
51967
|
{ name: "property" },
|
|
51963
|
-
{ name: "subProperties"
|
|
51968
|
+
{ name: "subProperties" },
|
|
51964
51969
|
{ name: "term" }
|
|
51965
51970
|
]
|
|
51966
51971
|
};
|
|
@@ -51978,8 +51983,9 @@ var IntelligentSystemDesignLanguageAstReflection = class extends AbstractAstRefl
|
|
|
51978
51983
|
name: "TargetQuickModifyAssignment",
|
|
51979
51984
|
properties: [
|
|
51980
51985
|
{ name: "exp" },
|
|
51986
|
+
{ name: "nameAccess" },
|
|
51981
51987
|
{ name: "property" },
|
|
51982
|
-
{ name: "subProperties"
|
|
51988
|
+
{ name: "subProperties" },
|
|
51983
51989
|
{ name: "term" }
|
|
51984
51990
|
]
|
|
51985
51991
|
};
|
|
@@ -52235,6 +52241,7 @@ var IntelligentSystemDesignLanguageAstReflection = class extends AbstractAstRefl
|
|
|
52235
52241
|
return {
|
|
52236
52242
|
name: "UpdateParent",
|
|
52237
52243
|
properties: [
|
|
52244
|
+
{ name: "nameAccess" },
|
|
52238
52245
|
{ name: "property" },
|
|
52239
52246
|
{ name: "propertyLookup" },
|
|
52240
52247
|
{ name: "subProperties" }
|
|
@@ -52377,6 +52384,7 @@ var IntelligentSystemDesignLanguageAstReflection = class extends AbstractAstRefl
|
|
|
52377
52384
|
return {
|
|
52378
52385
|
name: "ParentAccess",
|
|
52379
52386
|
properties: [
|
|
52387
|
+
{ name: "nameAccess" },
|
|
52380
52388
|
{ name: "property" },
|
|
52381
52389
|
{ name: "propertyLookup" },
|
|
52382
52390
|
{ name: "subProperties" },
|
|
@@ -52388,8 +52396,9 @@ var IntelligentSystemDesignLanguageAstReflection = class extends AbstractAstRefl
|
|
|
52388
52396
|
return {
|
|
52389
52397
|
name: "TargetAccess",
|
|
52390
52398
|
properties: [
|
|
52399
|
+
{ name: "nameAccess" },
|
|
52391
52400
|
{ name: "property" },
|
|
52392
|
-
{ name: "subProperties"
|
|
52401
|
+
{ name: "subProperties" },
|
|
52393
52402
|
{ name: "type" }
|
|
52394
52403
|
]
|
|
52395
52404
|
};
|
|
@@ -64427,6 +64436,10 @@ var IntelligentSystemDesignLanguageGrammar = () => loadedIntelligentSystemDesign
|
|
|
64427
64436
|
"$type": "Keyword",
|
|
64428
64437
|
"value": "Name"
|
|
64429
64438
|
},
|
|
64439
|
+
{
|
|
64440
|
+
"$type": "Keyword",
|
|
64441
|
+
"value": "name"
|
|
64442
|
+
},
|
|
64430
64443
|
{
|
|
64431
64444
|
"$type": "Keyword",
|
|
64432
64445
|
"value": "number"
|
|
@@ -64694,6 +64707,10 @@ var IntelligentSystemDesignLanguageGrammar = () => loadedIntelligentSystemDesign
|
|
|
64694
64707
|
"$type": "Keyword",
|
|
64695
64708
|
"value": "Name"
|
|
64696
64709
|
},
|
|
64710
|
+
{
|
|
64711
|
+
"$type": "Keyword",
|
|
64712
|
+
"value": "name"
|
|
64713
|
+
},
|
|
64697
64714
|
{
|
|
64698
64715
|
"$type": "Keyword",
|
|
64699
64716
|
"value": "number"
|
|
@@ -64746,23 +64763,46 @@ var IntelligentSystemDesignLanguageGrammar = () => loadedIntelligentSystemDesign
|
|
|
64746
64763
|
"value": "."
|
|
64747
64764
|
},
|
|
64748
64765
|
{
|
|
64749
|
-
"$type": "
|
|
64750
|
-
"
|
|
64751
|
-
|
|
64752
|
-
|
|
64753
|
-
|
|
64754
|
-
|
|
64755
|
-
"
|
|
64756
|
-
|
|
64757
|
-
|
|
64758
|
-
|
|
64759
|
-
|
|
64760
|
-
|
|
64761
|
-
|
|
64762
|
-
|
|
64766
|
+
"$type": "Alternatives",
|
|
64767
|
+
"elements": [
|
|
64768
|
+
{
|
|
64769
|
+
"$type": "Assignment",
|
|
64770
|
+
"feature": "nameAccess",
|
|
64771
|
+
"operator": "=",
|
|
64772
|
+
"terminal": {
|
|
64773
|
+
"$type": "Alternatives",
|
|
64774
|
+
"elements": [
|
|
64775
|
+
{
|
|
64776
|
+
"$type": "Keyword",
|
|
64777
|
+
"value": "Name"
|
|
64778
|
+
},
|
|
64779
|
+
{
|
|
64780
|
+
"$type": "Keyword",
|
|
64781
|
+
"value": "name"
|
|
64782
|
+
}
|
|
64783
|
+
]
|
|
64784
|
+
}
|
|
64763
64785
|
},
|
|
64764
|
-
|
|
64765
|
-
|
|
64786
|
+
{
|
|
64787
|
+
"$type": "Assignment",
|
|
64788
|
+
"feature": "property",
|
|
64789
|
+
"operator": "=",
|
|
64790
|
+
"terminal": {
|
|
64791
|
+
"$type": "CrossReference",
|
|
64792
|
+
"type": {
|
|
64793
|
+
"$ref": "#/rules@65"
|
|
64794
|
+
},
|
|
64795
|
+
"terminal": {
|
|
64796
|
+
"$type": "RuleCall",
|
|
64797
|
+
"rule": {
|
|
64798
|
+
"$ref": "#/rules@322"
|
|
64799
|
+
},
|
|
64800
|
+
"arguments": []
|
|
64801
|
+
},
|
|
64802
|
+
"deprecatedSyntax": false
|
|
64803
|
+
}
|
|
64804
|
+
}
|
|
64805
|
+
]
|
|
64766
64806
|
}
|
|
64767
64807
|
]
|
|
64768
64808
|
},
|
|
@@ -64822,6 +64862,10 @@ var IntelligentSystemDesignLanguageGrammar = () => loadedIntelligentSystemDesign
|
|
|
64822
64862
|
"$type": "Keyword",
|
|
64823
64863
|
"value": "Name"
|
|
64824
64864
|
},
|
|
64865
|
+
{
|
|
64866
|
+
"$type": "Keyword",
|
|
64867
|
+
"value": "name"
|
|
64868
|
+
},
|
|
64825
64869
|
{
|
|
64826
64870
|
"$type": "Keyword",
|
|
64827
64871
|
"value": "number"
|
|
@@ -65061,23 +65105,46 @@ var IntelligentSystemDesignLanguageGrammar = () => loadedIntelligentSystemDesign
|
|
|
65061
65105
|
"value": "."
|
|
65062
65106
|
},
|
|
65063
65107
|
{
|
|
65064
|
-
"$type": "
|
|
65065
|
-
"
|
|
65066
|
-
|
|
65067
|
-
|
|
65068
|
-
|
|
65069
|
-
|
|
65070
|
-
"
|
|
65071
|
-
|
|
65072
|
-
|
|
65073
|
-
|
|
65074
|
-
|
|
65075
|
-
|
|
65076
|
-
|
|
65077
|
-
|
|
65108
|
+
"$type": "Alternatives",
|
|
65109
|
+
"elements": [
|
|
65110
|
+
{
|
|
65111
|
+
"$type": "Assignment",
|
|
65112
|
+
"feature": "nameAccess",
|
|
65113
|
+
"operator": "=",
|
|
65114
|
+
"terminal": {
|
|
65115
|
+
"$type": "Alternatives",
|
|
65116
|
+
"elements": [
|
|
65117
|
+
{
|
|
65118
|
+
"$type": "Keyword",
|
|
65119
|
+
"value": "Name"
|
|
65120
|
+
},
|
|
65121
|
+
{
|
|
65122
|
+
"$type": "Keyword",
|
|
65123
|
+
"value": "name"
|
|
65124
|
+
}
|
|
65125
|
+
]
|
|
65126
|
+
}
|
|
65078
65127
|
},
|
|
65079
|
-
|
|
65080
|
-
|
|
65128
|
+
{
|
|
65129
|
+
"$type": "Assignment",
|
|
65130
|
+
"feature": "property",
|
|
65131
|
+
"operator": "=",
|
|
65132
|
+
"terminal": {
|
|
65133
|
+
"$type": "CrossReference",
|
|
65134
|
+
"type": {
|
|
65135
|
+
"$ref": "#/rules@65"
|
|
65136
|
+
},
|
|
65137
|
+
"terminal": {
|
|
65138
|
+
"$type": "RuleCall",
|
|
65139
|
+
"rule": {
|
|
65140
|
+
"$ref": "#/rules@322"
|
|
65141
|
+
},
|
|
65142
|
+
"arguments": []
|
|
65143
|
+
},
|
|
65144
|
+
"deprecatedSyntax": false
|
|
65145
|
+
}
|
|
65146
|
+
}
|
|
65147
|
+
]
|
|
65081
65148
|
}
|
|
65082
65149
|
]
|
|
65083
65150
|
},
|
|
@@ -65099,6 +65166,10 @@ var IntelligentSystemDesignLanguageGrammar = () => loadedIntelligentSystemDesign
|
|
|
65099
65166
|
"$type": "Keyword",
|
|
65100
65167
|
"value": "Name"
|
|
65101
65168
|
},
|
|
65169
|
+
{
|
|
65170
|
+
"$type": "Keyword",
|
|
65171
|
+
"value": "name"
|
|
65172
|
+
},
|
|
65102
65173
|
{
|
|
65103
65174
|
"$type": "Keyword",
|
|
65104
65175
|
"value": "number"
|
|
@@ -65358,6 +65429,10 @@ var IntelligentSystemDesignLanguageGrammar = () => loadedIntelligentSystemDesign
|
|
|
65358
65429
|
"$type": "Keyword",
|
|
65359
65430
|
"value": "Name"
|
|
65360
65431
|
},
|
|
65432
|
+
{
|
|
65433
|
+
"$type": "Keyword",
|
|
65434
|
+
"value": "name"
|
|
65435
|
+
},
|
|
65361
65436
|
{
|
|
65362
65437
|
"$type": "Keyword",
|
|
65363
65438
|
"value": "dice"
|
|
@@ -65715,6 +65790,10 @@ var IntelligentSystemDesignLanguageGrammar = () => loadedIntelligentSystemDesign
|
|
|
65715
65790
|
"$type": "Keyword",
|
|
65716
65791
|
"value": "Name"
|
|
65717
65792
|
},
|
|
65793
|
+
{
|
|
65794
|
+
"$type": "Keyword",
|
|
65795
|
+
"value": "name"
|
|
65796
|
+
},
|
|
65718
65797
|
{
|
|
65719
65798
|
"$type": "RuleCall",
|
|
65720
65799
|
"rule": {
|
|
@@ -69821,6 +69900,10 @@ var IntelligentSystemDesignLanguageGrammar = () => loadedIntelligentSystemDesign
|
|
|
69821
69900
|
"$type": "Keyword",
|
|
69822
69901
|
"value": "Name"
|
|
69823
69902
|
},
|
|
69903
|
+
{
|
|
69904
|
+
"$type": "Keyword",
|
|
69905
|
+
"value": "name"
|
|
69906
|
+
},
|
|
69824
69907
|
{
|
|
69825
69908
|
"$type": "Keyword",
|
|
69826
69909
|
"value": "Description"
|
|
@@ -70303,6 +70386,92 @@ var IntelligentSystemDesignLanguageGeneratedModule = {
|
|
|
70303
70386
|
parser: {}
|
|
70304
70387
|
};
|
|
70305
70388
|
|
|
70389
|
+
// src/language/isdl-docs.ts
|
|
70390
|
+
var WIKI_BASE = "https://github.com/cswendrowski/intelligent-system-design-language/wiki/";
|
|
70391
|
+
function wikiUrl(wiki) {
|
|
70392
|
+
return WIKI_BASE + wiki;
|
|
70393
|
+
}
|
|
70394
|
+
var DOCS = [
|
|
70395
|
+
// ── Simple fields ────────────────────────────────────────────────────────
|
|
70396
|
+
{ summary: "**string** \u2014 A plain text input field.", wiki: "Fields#string", detail: "Field", types: ["StringExp"], keywords: ["string"] },
|
|
70397
|
+
{ summary: "**number** \u2014 A numeric input field. Supports `min`, `max`, `initial`, and a calculated `value`.", wiki: "Fields#number", detail: "Field", types: ["NumberExp"], keywords: ["number"] },
|
|
70398
|
+
{ summary: "**boolean** \u2014 A true/false checkbox.", wiki: "Fields#boolean", detail: "Field", types: ["BooleanExp"], keywords: ["boolean"] },
|
|
70399
|
+
{ summary: "**html** \u2014 A rich text editor field (supports HTML markup).", wiki: "Fields#html", detail: "Field", types: ["HtmlExp"], keywords: ["html"] },
|
|
70400
|
+
{ summary: "**choice\\<string\\>** \u2014 A single-select dropdown from a fixed list of string options.", wiki: "Fields#choice-string", detail: "Field", types: ["StringChoiceField"], keywords: ["choice"] },
|
|
70401
|
+
{ summary: "**choice\\<damageType\\>** \u2014 A dropdown for selecting a damage type defined in your keywords.", wiki: "Fields#choice-damagetype-wip", detail: "Field", types: ["DamageTypeChoiceField"] },
|
|
70402
|
+
{ summary: "**choices\\<string\\>** \u2014 A multi-select field. Accepts up to `max` selections from a fixed list.", wiki: "Fields#choices-string-multi-select", detail: "Field", types: ["StringChoicesField"], keywords: ["choices"] },
|
|
70403
|
+
// ── Common building blocks ───────────────────────────────────────────────
|
|
70404
|
+
{ summary: "**resource** \u2014 A current/max bar (HP, Mana, etc.). Tag with `health` or `wounds` to mark as the primary pool. Supports `style`, `segments`, `min`, and `max`.", wiki: "Fields#resource", detail: "Field", types: ["ResourceExp"], keywords: ["resource"] },
|
|
70405
|
+
{ summary: "**tracker** \u2014 A visual progress tracker. Styles: `bar`, `dial`, `icons`, `slashes`, `segmented`, `clock`, `plain`.", wiki: "Fields#tracker", detail: "Field", types: ["TrackerExp"], keywords: ["tracker"] },
|
|
70406
|
+
{ summary: "**attribute** \u2014 A stat with an optional derived `mod`. Make it clickable with `roll:` (posts a standard roll card) or `function:` (calls a no-arg function on this document for full control over the result). Styles: `plain`, `box`.", wiki: "Fields#attribute", detail: "Field", types: ["AttributeExp"], keywords: ["attribute"] },
|
|
70407
|
+
{ summary: "**money** \u2014 A currency field. Use `format` (`compact`/`full`/`auto`) and optional denominations block for multi-currency systems.", wiki: "Fields#money", detail: "Field", types: ["MoneyField"], keywords: ["money"] },
|
|
70408
|
+
{ summary: "**measuredTemplate** \u2014 A Foundry VTT measured template reference (AoE shapes like circles, cones, rays).", wiki: "Fields#measured-template", detail: "Field", types: ["MeasuredTemplateField"], keywords: ["measuredTemplate"] },
|
|
70409
|
+
{ summary: "**bonuses** \u2014 Displays aggregated active-effect damage bonuses by type.", wiki: "Fields#bonuses", detail: "Field", types: ["DamageBonusesField"], keywords: ["bonuses"] },
|
|
70410
|
+
{ summary: "**resistances** \u2014 Displays aggregated active-effect damage resistances by type.", wiki: "Fields#resistances", detail: "Field", types: ["DamageResistancesField"], keywords: ["resistances"] },
|
|
70411
|
+
{ summary: "**pinned** \u2014 Shows items the player has pinned for quick access.", wiki: "Fields#pinned-field", detail: "Field", types: ["PinnedField"], keywords: ["pinned"] },
|
|
70412
|
+
// ── Date / time fields ───────────────────────────────────────────────────
|
|
70413
|
+
{ summary: "**date** \u2014 A date picker field.", wiki: "Fields#date-time-and-datetime", detail: "Field", types: ["DateExp"], keywords: ["date"] },
|
|
70414
|
+
{ summary: "**time** \u2014 A time picker field.", wiki: "Fields#date-time-and-datetime", detail: "Field", types: ["TimeExp"], keywords: ["time"] },
|
|
70415
|
+
{ summary: "**datetime** \u2014 A combined date and time picker field.", wiki: "Fields#date-time-and-datetime", detail: "Field", types: ["DateTimeExp"], keywords: ["datetime"] },
|
|
70416
|
+
// ── Dice fields ──────────────────────────────────────────────────────────
|
|
70417
|
+
{ summary: "**die** \u2014 A single die type selector (d4, d6, d8, d10, d12, d20, d100).", wiki: "Fields#die-field", detail: "Field", types: ["DieField"], keywords: ["die"] },
|
|
70418
|
+
{ summary: "**dice** \u2014 A dice pool selector (NdX). Tracks both count and die size.", wiki: "Fields#dice-field", detail: "Field", types: ["DiceField"], keywords: ["dice"] },
|
|
70419
|
+
// ── Document links / embeds ──────────────────────────────────────────────
|
|
70420
|
+
{ summary: "**DocumentType name** \u2014 A reference to a single linked item of the specified type.", wiki: "Fields#single-item", detail: "Field", types: ["SingleDocumentExp"] },
|
|
70421
|
+
{ summary: "**choice\\<DocumentType\\>** \u2014 A dropdown linking to one item of the specified type.", wiki: "Fields#document-choice", detail: "Field", types: ["DocumentChoiceExp"] },
|
|
70422
|
+
{ summary: "**choices\\<ItemType\\>** \u2014 A multi-select field linking to multiple items of the specified type.", wiki: "Fields#document-choices", detail: "Field", types: ["DocumentChoicesExp"] },
|
|
70423
|
+
{ summary: "**inventory\\<ItemType\\>** \u2014 A grid-based inventory. Supports slots, rows, columns, quantity tracking, money integration, and weight/value sums.", wiki: "Fields#inventory-field", detail: "Field", types: ["InventoryField"], keywords: ["inventory"] },
|
|
70424
|
+
{ summary: "**table\\<ItemType\\>** \u2014 An embedded table listing linked items. Use `fields` to choose columns and `where` to filter.", wiki: "Fields#table-field", detail: "Field", types: ["TableField"], keywords: ["table"] },
|
|
70425
|
+
{ summary: "**macro** \u2014 A Foundry VTT macro reference. Execute it in code with `self.Name.execute()`.", wiki: "Fields#macro-field", detail: "Field", types: ["MacroField"], keywords: ["macro"] },
|
|
70426
|
+
{ summary: "**paperdoll** \u2014 An image-based equipment slot layout. Drop items onto defined hotspots.", wiki: "Fields#paper-doll", detail: "Field", types: ["PaperDollExp"], keywords: ["paperdoll"] },
|
|
70427
|
+
// ── Reference fields ─────────────────────────────────────────────────────
|
|
70428
|
+
{ summary: "**self\\<type\\>** \u2014 A mirror of another field on this same document. Changes reflect in real time.", wiki: "Fields#self-property-reference", detail: "Field", types: ["SelfPropertyRefExp"], keywords: ["self"] },
|
|
70429
|
+
{ summary: "**parent\\<type\\>** \u2014 A mirror of a field on the owning parent document (e.g. an item reading from its actor).", wiki: "Fields#parent-property-reference", detail: "Field", types: ["ParentPropertyRefExp"], keywords: ["parent"] },
|
|
70430
|
+
// ── WIP fields ───────────────────────────────────────────────────────────
|
|
70431
|
+
{ summary: "**damageTrack** \u26A0\uFE0F *WIP* \u2014 A damage track with typed boxes (bashing, lethal, aggravated, etc.). May change in a future version.", wiki: "Fields#damage-track", detail: "Field", types: ["DamageTrackExp"], keywords: ["damageTrack"] },
|
|
70432
|
+
// ── Documents & configuration ────────────────────────────────────────────
|
|
70433
|
+
{ summary: "**actor** \u2014 Defines an actor document type (characters, NPCs, vehicles). Generates a full character sheet.", wiki: "Document", detail: "Document", types: ["Actor"], keywords: ["actor"] },
|
|
70434
|
+
{ summary: "**item** \u2014 Defines an item document type (weapons, spells, skills). Generates an item sheet.", wiki: "Document", detail: "Document", types: ["Item"], keywords: ["item"] },
|
|
70435
|
+
{ summary: "**config** \u2014 System-wide configuration: name, id, author, description, and keyword definitions.", wiki: "Config", detail: "Configuration", types: ["Config"], keywords: ["config"] },
|
|
70436
|
+
{ summary: "**keywords** \u2014 Defines named keywords that appear as tags in chat cards and rich text. Each keyword can have a `summary`, `color`, and `icon`.", wiki: "Keywords-and-Journals#keywords-system", detail: "Configuration", types: ["Keywords"], keywords: ["keywords"] },
|
|
70437
|
+
// ── Layout / structure ───────────────────────────────────────────────────
|
|
70438
|
+
{ summary: "**section** \u2014 Groups related fields under a named heading on the sheet.", wiki: "Document#section", detail: "Structure", types: ["Section"], keywords: ["section"] },
|
|
70439
|
+
{ summary: "**page** \u2014 Adds a separate tab to the document sheet. Supports `icon` and `background`.", wiki: "Document#page", detail: "Structure", types: ["Page"], keywords: ["page"] },
|
|
70440
|
+
{ summary: "**row** \u2014 Arranges child fields horizontally side by side.", wiki: "Document#row", detail: "Structure", types: ["Row"], keywords: ["row"] },
|
|
70441
|
+
{ summary: "**column** \u2014 Stacks child fields vertically within a row.", wiki: "Document#column", detail: "Structure", types: ["Column"], keywords: ["column"] },
|
|
70442
|
+
// ── Executables & logic ──────────────────────────────────────────────────
|
|
70443
|
+
{ summary: "**action** \u2014 A clickable button on the sheet that runs code. Supports `visibility`, `icon`, and `color` params.", wiki: "Basic-Logic#simple-actions", detail: "Logic", types: ["Action"], keywords: ["action"] },
|
|
70444
|
+
{ summary: "**on** \u2014 Reacts to a Foundry VTT event (`combatStart`, `roundStart`, `turnStart`, `appliedDamage`, etc.).", wiki: "Interactivity#event-handling-hook-handlers", detail: "Logic", types: ["HookHandler"], keywords: ["on"] },
|
|
70445
|
+
{ summary: "**function** \u2014 A reusable named function with typed parameters and an optional `returns` type.", wiki: "Advanced-Logic#functions", detail: "Logic", types: ["FunctionDefinition"], keywords: ["function"] },
|
|
70446
|
+
// ── Keyword-only logic enrichers (no dedicated AST hover, surfaced in completion) ──
|
|
70447
|
+
{ summary: "**status** \u2014 Defines a status effect (condition) that can appear on the token, optionally gated by a `when:` condition and shown with an icon.", wiki: "Keywords-and-Journals#status-effects", detail: "Keyword", keywords: ["status"] },
|
|
70448
|
+
{ summary: "**health** \u2014 Tags a `resource` as the primary health pool: enables damage application and automatic green \u2192 yellow \u2192 red coloring.", wiki: "Fields#resource", detail: "Field tag", keywords: ["health"] },
|
|
70449
|
+
{ summary: "**prompt** \u2014 Pauses an action to ask the player for input (numbers, choices, booleans) through a dialog.", wiki: "Interactivity#interactive-prompts", detail: "Logic", keywords: ["prompt"] },
|
|
70450
|
+
{ summary: "**roll()** \u2014 Rolls a dice expression and returns a result you can inspect: `.total`, `.crit`, `.fumble`, `.successes`, plus dice-pool queries.", wiki: "Basic-Logic#dice-rolling", detail: "Logic", keywords: ["roll"] },
|
|
70451
|
+
{ summary: "**chat** \u2014 Posts a chat card. Put fields, text, and buttons inside the block to compose the message.", wiki: "Basic-Logic#chat-cards", detail: "Logic", keywords: ["chat"] },
|
|
70452
|
+
{ summary: "**fleeting** \u2014 A temporary variable that exists only for the current action or calculation.", wiki: "Basic-Logic#fleeting-variables", detail: "Logic", keywords: ["fleeting"] }
|
|
70453
|
+
];
|
|
70454
|
+
var TYPE_DOCS = {};
|
|
70455
|
+
var KEYWORD_DOCS = {};
|
|
70456
|
+
var _a, _b, _c;
|
|
70457
|
+
for (const def of DOCS) {
|
|
70458
|
+
const resolved = { summary: def.summary, wiki: def.wiki, detail: (_a = def.detail) != null ? _a : "ISDL" };
|
|
70459
|
+
for (const t of (_b = def.types) != null ? _b : [])
|
|
70460
|
+
TYPE_DOCS[t] = resolved;
|
|
70461
|
+
for (const k of (_c = def.keywords) != null ? _c : []) {
|
|
70462
|
+
if (!(k in KEYWORD_DOCS))
|
|
70463
|
+
KEYWORD_DOCS[k] = resolved;
|
|
70464
|
+
}
|
|
70465
|
+
}
|
|
70466
|
+
function docMarkdown(entry) {
|
|
70467
|
+
return `${entry.summary}
|
|
70468
|
+
|
|
70469
|
+
\u{1F4D6} [Open the docs \u2192](${wikiUrl(entry.wiki)})`;
|
|
70470
|
+
}
|
|
70471
|
+
function wikiDiagnostic(wiki) {
|
|
70472
|
+
return { code: "isdl-docs", codeDescription: { href: wikiUrl(wiki) } };
|
|
70473
|
+
}
|
|
70474
|
+
|
|
70306
70475
|
// src/cli/components/utils.ts
|
|
70307
70476
|
function getAllSettings(entry) {
|
|
70308
70477
|
const result = [];
|
|
@@ -70361,7 +70530,7 @@ var IMPURE_NODE_GUARDS = [
|
|
|
70361
70530
|
isParentFunctionCall
|
|
70362
70531
|
];
|
|
70363
70532
|
function functionIsDerivedSafe(func, visited = /* @__PURE__ */ new Set()) {
|
|
70364
|
-
var
|
|
70533
|
+
var _a2;
|
|
70365
70534
|
if (visited.has(func))
|
|
70366
70535
|
return true;
|
|
70367
70536
|
visited.add(func);
|
|
@@ -70369,7 +70538,7 @@ function functionIsDerivedSafe(func, visited = /* @__PURE__ */ new Set()) {
|
|
|
70369
70538
|
if (IMPURE_NODE_GUARDS.some((guard) => guard(node)))
|
|
70370
70539
|
return false;
|
|
70371
70540
|
if (isFunctionCall(node)) {
|
|
70372
|
-
const callee = (
|
|
70541
|
+
const callee = (_a2 = node.method) == null ? void 0 : _a2.ref;
|
|
70373
70542
|
if (callee && !functionIsDerivedSafe(callee, visited))
|
|
70374
70543
|
return false;
|
|
70375
70544
|
}
|
|
@@ -70451,7 +70620,7 @@ var IntelligentSystemDesignLanguageValidator = class {
|
|
|
70451
70620
|
// are allowed. Persistent widgets (attribute/resource/tracker/money), display/aggregate fields,
|
|
70452
70621
|
// embedded collections (tables/inventories), layouts, etc. are rejected with a clear message.
|
|
70453
70622
|
validatePrompt(prompt, accept) {
|
|
70454
|
-
var
|
|
70623
|
+
var _a2;
|
|
70455
70624
|
const allowed = /* @__PURE__ */ new Set([
|
|
70456
70625
|
"StringExp",
|
|
70457
70626
|
"NumberExp",
|
|
@@ -70475,7 +70644,7 @@ var IntelligentSystemDesignLanguageValidator = class {
|
|
|
70475
70644
|
]);
|
|
70476
70645
|
for (const field of prompt.body) {
|
|
70477
70646
|
if (!allowed.has(field.$type)) {
|
|
70478
|
-
const label = (
|
|
70647
|
+
const label = (_a2 = field.name) != null ? _a2 : field.$type;
|
|
70479
70648
|
accept(
|
|
70480
70649
|
"error",
|
|
70481
70650
|
`'${label}' can't be used in a prompt. Prompts only accept input fields: string, number, boolean, choice/choices (string, damageType, or document), parent/self references, die, dice, and date/time/datetime.`,
|
|
@@ -70487,10 +70656,10 @@ var IntelligentSystemDesignLanguageValidator = class {
|
|
|
70487
70656
|
// Global `config { theme { } }`: reject FIELD-ONLY sizing tokens (`width`/`height`),
|
|
70488
70657
|
// which only constrain an individual field's wrapper and have no system-wide meaning.
|
|
70489
70658
|
validateGlobalTheme(theme, accept) {
|
|
70490
|
-
var
|
|
70659
|
+
var _a2;
|
|
70491
70660
|
for (const param of theme.params) {
|
|
70492
70661
|
if (FIELD_ONLY_THEME_TYPES.has(param.$type)) {
|
|
70493
|
-
const label = (
|
|
70662
|
+
const label = (_a2 = THEME_TOKEN_LABEL[param.$type]) != null ? _a2 : param.$type;
|
|
70494
70663
|
accept(
|
|
70495
70664
|
"error",
|
|
70496
70665
|
`'${label}' sizes an individual field, so it only works in a field's 'theme: { }' override \u2014 not the global 'config' theme.`,
|
|
@@ -70507,13 +70676,13 @@ var IntelligentSystemDesignLanguageValidator = class {
|
|
|
70507
70676
|
// The grammar shares one `ThemeFieldParam` node across all three, so we dispatch on the
|
|
70508
70677
|
// container type and report exactly which tokens that container accepts.
|
|
70509
70678
|
validatePerFieldThemeParam(block2, accept) {
|
|
70510
|
-
var
|
|
70679
|
+
var _a2, _b2, _c2;
|
|
70511
70680
|
const container = block2.$container;
|
|
70512
70681
|
if (isRow(container) || isColumn(container)) {
|
|
70513
70682
|
const where = isRow(container) ? "row" : "column";
|
|
70514
70683
|
for (const param of block2.params) {
|
|
70515
70684
|
if (!ROW_COLUMN_THEME_TYPES.has(param.$type)) {
|
|
70516
|
-
const label = (
|
|
70685
|
+
const label = (_a2 = THEME_TOKEN_LABEL[param.$type]) != null ? _a2 : param.$type;
|
|
70517
70686
|
accept(
|
|
70518
70687
|
"error",
|
|
70519
70688
|
`'${label}' can't theme a ${where} \u2014 a ${where} accepts sizing ('width' / 'height') and 'border'.`,
|
|
@@ -70526,7 +70695,7 @@ var IntelligentSystemDesignLanguageValidator = class {
|
|
|
70526
70695
|
if (isSection(container)) {
|
|
70527
70696
|
for (const param of block2.params) {
|
|
70528
70697
|
if (!SECTION_THEME_TYPES.has(param.$type)) {
|
|
70529
|
-
const label = (
|
|
70698
|
+
const label = (_b2 = THEME_TOKEN_LABEL[param.$type]) != null ? _b2 : param.$type;
|
|
70530
70699
|
accept(
|
|
70531
70700
|
"error",
|
|
70532
70701
|
`'${label}' can't theme a section \u2014 a section accepts sizing ('width' / 'height'), 'border', 'background', and 'text'.`,
|
|
@@ -70538,7 +70707,7 @@ var IntelligentSystemDesignLanguageValidator = class {
|
|
|
70538
70707
|
}
|
|
70539
70708
|
for (const param of block2.params) {
|
|
70540
70709
|
if (CONFIG_ONLY_THEME_TYPES.has(param.$type)) {
|
|
70541
|
-
const label = (
|
|
70710
|
+
const label = (_c2 = THEME_TOKEN_LABEL[param.$type]) != null ? _c2 : param.$type;
|
|
70542
70711
|
accept(
|
|
70543
70712
|
"error",
|
|
70544
70713
|
`'${label}' is a whole-sheet token with no per-field effect \u2014 set it in 'config { theme { } }', not in a field's 'theme: { }'.`,
|
|
@@ -70637,7 +70806,7 @@ var IntelligentSystemDesignLanguageValidator = class {
|
|
|
70637
70806
|
validatePromptInputAccess(access, accept) {
|
|
70638
70807
|
const prompt = ast_utils_exports.getContainerOfType(access, isPrompt);
|
|
70639
70808
|
if (!prompt) {
|
|
70640
|
-
accept("error", "'input.' can only be used inside a prompt.", { node: access });
|
|
70809
|
+
accept("error", "'input.' can only be used inside a prompt.", __spreadValues({ node: access }, wikiDiagnostic("Interactivity#interactive-prompts")));
|
|
70641
70810
|
return;
|
|
70642
70811
|
}
|
|
70643
70812
|
const visualizer = ast_utils_exports.getContainerOfType(access, isRollVisualizerField);
|
|
@@ -70649,11 +70818,11 @@ var IntelligentSystemDesignLanguageValidator = class {
|
|
|
70649
70818
|
// parse as a Ref/FleetingAccess against a roll variable. Validate the accessor name and that
|
|
70650
70819
|
// detection accessors have their matching roll parameter. (count/contains are RollResultAccess.)
|
|
70651
70820
|
validateRollAccessorRef(ref, accept) {
|
|
70652
|
-
var
|
|
70821
|
+
var _a2;
|
|
70653
70822
|
const target = ref.val.ref;
|
|
70654
70823
|
if (!isVariableExpression(target) || !isRoll(target.value))
|
|
70655
70824
|
return;
|
|
70656
|
-
this.checkRollAccessor(target.value, target.name, (
|
|
70825
|
+
this.checkRollAccessor(target.value, target.name, (_a2 = ref.subProperties) == null ? void 0 : _a2[0], ref, accept);
|
|
70657
70826
|
}
|
|
70658
70827
|
validateRollAccessorFleeting(access, accept) {
|
|
70659
70828
|
const target = access.variable.ref;
|
|
@@ -70665,7 +70834,7 @@ var IntelligentSystemDesignLanguageValidator = class {
|
|
|
70665
70834
|
if (!accessor)
|
|
70666
70835
|
return;
|
|
70667
70836
|
if (accessor.toLowerCase() === "successes" && !roll.params.some(isSuccessParam)) {
|
|
70668
|
-
accept("error", `'.successes' requires a 'success:' parameter on roll '${name}'.`, { node });
|
|
70837
|
+
accept("error", `'.successes' requires a 'success:' parameter on roll '${name}'.`, __spreadValues({ node }, wikiDiagnostic("Basic-Logic#roll-properties")));
|
|
70669
70838
|
}
|
|
70670
70839
|
}
|
|
70671
70840
|
// Method-style roll accessors: r.count(...) / r.contains(...). Only valid on roll variables.
|
|
@@ -70714,7 +70883,7 @@ var IntelligentSystemDesignLanguageValidator = class {
|
|
|
70714
70883
|
if (property2.name) {
|
|
70715
70884
|
const firstChar = property2.name.substring(0, 1);
|
|
70716
70885
|
if (firstChar.toUpperCase() !== firstChar) {
|
|
70717
|
-
accept("warning", "Property names should start with a capital.", { node: property2, property: "name" });
|
|
70886
|
+
accept("warning", "Property names should start with a capital.", __spreadValues({ node: property2, property: "name" }, wikiDiagnostic("Document#naming-conventions")));
|
|
70718
70887
|
}
|
|
70719
70888
|
}
|
|
70720
70889
|
}
|
|
@@ -70768,7 +70937,7 @@ var IntelligentSystemDesignLanguageValidator = class {
|
|
|
70768
70937
|
validateStringChoiceField(field, accept) {
|
|
70769
70938
|
const choices = field.params.find(isStringParamChoices);
|
|
70770
70939
|
if (!choices || !choices.choices || choices.choices.length === 0) {
|
|
70771
|
-
accept("error", "String choice fields must have at least one choice defined.", { node: field, property: "params" });
|
|
70940
|
+
accept("error", "String choice fields must have at least one choice defined.", __spreadValues({ node: field, property: "params" }, wikiDiagnostic("Fields#choice-string")));
|
|
70772
70941
|
return;
|
|
70773
70942
|
}
|
|
70774
70943
|
for (const choice of choices.choices) {
|
|
@@ -70785,16 +70954,16 @@ var IntelligentSystemDesignLanguageValidator = class {
|
|
|
70785
70954
|
}
|
|
70786
70955
|
}
|
|
70787
70956
|
validateTableField(field, accept) {
|
|
70788
|
-
var
|
|
70957
|
+
var _a2;
|
|
70789
70958
|
if (field.documents.length > 1) {
|
|
70790
70959
|
const fieldsParam = field.params.find(isTableFieldsParam);
|
|
70791
70960
|
if (!fieldsParam) {
|
|
70792
|
-
accept("error", "Multi-type tables require an explicit `fields:` parameter listing the shared columns", { node: field });
|
|
70961
|
+
accept("error", "Multi-type tables require an explicit `fields:` parameter listing the shared columns", __spreadValues({ node: field }, wikiDiagnostic("Fields#table-field")));
|
|
70793
70962
|
return;
|
|
70794
70963
|
}
|
|
70795
70964
|
const allPropertyNames = /* @__PURE__ */ new Set();
|
|
70796
70965
|
for (const docRef of field.documents) {
|
|
70797
|
-
if ((
|
|
70966
|
+
if ((_a2 = docRef.ref) == null ? void 0 : _a2.body) {
|
|
70798
70967
|
getAllOfType(docRef.ref.body, isProperty, false).forEach((p) => allPropertyNames.add(p.name.toLowerCase()));
|
|
70799
70968
|
}
|
|
70800
70969
|
}
|
|
@@ -70809,8 +70978,8 @@ var IntelligentSystemDesignLanguageValidator = class {
|
|
|
70809
70978
|
seen.add(lower);
|
|
70810
70979
|
if (!allPropertyNames.has(lower)) {
|
|
70811
70980
|
const typeNames = field.documents.map((d) => {
|
|
70812
|
-
var
|
|
70813
|
-
return (
|
|
70981
|
+
var _a3, _b2;
|
|
70982
|
+
return (_b2 = (_a3 = d.ref) == null ? void 0 : _a3.name) != null ? _b2 : "?";
|
|
70814
70983
|
}).join(" | ");
|
|
70815
70984
|
accept("error", `Field '${name}' does not exist on any of the referenced types (${typeNames})`, { node: fieldsParam, property: "fields", index: i });
|
|
70816
70985
|
}
|
|
@@ -70818,12 +70987,12 @@ var IntelligentSystemDesignLanguageValidator = class {
|
|
|
70818
70987
|
}
|
|
70819
70988
|
}
|
|
70820
70989
|
validateInventoryField(field, accept) {
|
|
70821
|
-
var
|
|
70822
|
-
if (((
|
|
70990
|
+
var _a2, _b2, _c2;
|
|
70991
|
+
if (((_a2 = field.documents[0]) == null ? void 0 : _a2.ref) && isActor(field.documents[0].ref)) {
|
|
70823
70992
|
accept(
|
|
70824
70993
|
"error",
|
|
70825
70994
|
"Inventory fields can only reference item documents, not actors.",
|
|
70826
|
-
{ node: field, property: "documents" }
|
|
70995
|
+
__spreadValues({ node: field, property: "documents" }, wikiDiagnostic("Fields#inventory-field"))
|
|
70827
70996
|
);
|
|
70828
70997
|
}
|
|
70829
70998
|
if (field.documents.length > 1) {
|
|
@@ -70864,12 +71033,12 @@ var IntelligentSystemDesignLanguageValidator = class {
|
|
|
70864
71033
|
}
|
|
70865
71034
|
}
|
|
70866
71035
|
if (quantityParam && quantityParam.field.ref) {
|
|
70867
|
-
const itemDocument = (
|
|
71036
|
+
const itemDocument = (_b2 = field.documents[0]) == null ? void 0 : _b2.ref;
|
|
70868
71037
|
if (itemDocument && isItem(itemDocument)) {
|
|
70869
71038
|
const itemProperties = getAllOfType(itemDocument.body, isProperty, false);
|
|
70870
71039
|
const quantityField = itemProperties.find((p) => {
|
|
70871
|
-
var
|
|
70872
|
-
return p.name === ((
|
|
71040
|
+
var _a3;
|
|
71041
|
+
return p.name === ((_a3 = quantityParam.field.ref) == null ? void 0 : _a3.name);
|
|
70873
71042
|
});
|
|
70874
71043
|
if (!quantityField) {
|
|
70875
71044
|
accept(
|
|
@@ -70894,15 +71063,15 @@ var IntelligentSystemDesignLanguageValidator = class {
|
|
|
70894
71063
|
);
|
|
70895
71064
|
}
|
|
70896
71065
|
if (sumParam) {
|
|
70897
|
-
const itemDocument = (
|
|
71066
|
+
const itemDocument = (_c2 = field.documents[0]) == null ? void 0 : _c2.ref;
|
|
70898
71067
|
if (itemDocument && isItem(itemDocument)) {
|
|
70899
71068
|
const itemProperties = getAllOfType(itemDocument.body, isProperty, false);
|
|
70900
71069
|
const properties = sumParam.properties.property ? [sumParam.properties.property] : sumParam.properties.properties || [];
|
|
70901
71070
|
for (const prop of properties) {
|
|
70902
71071
|
if (prop.ref) {
|
|
70903
71072
|
const sumField = itemProperties.find((p) => {
|
|
70904
|
-
var
|
|
70905
|
-
return p.name === ((
|
|
71073
|
+
var _a3;
|
|
71074
|
+
return p.name === ((_a3 = prop.ref) == null ? void 0 : _a3.name);
|
|
70906
71075
|
});
|
|
70907
71076
|
if (!sumField) {
|
|
70908
71077
|
accept(
|
|
@@ -70955,8 +71124,8 @@ var IntelligentSystemDesignLanguageValidator = class {
|
|
|
70955
71124
|
// no rolls, chat, updates, or prompts — or it would inject `await` into a sync context and break
|
|
70956
71125
|
// the whole document. Catch it at authoring time with a clear message instead of a dead sheet.
|
|
70957
71126
|
validateDerivedFunctionCall(node, accept) {
|
|
70958
|
-
var
|
|
70959
|
-
const fn = (
|
|
71127
|
+
var _a2;
|
|
71128
|
+
const fn = (_a2 = node.method) == null ? void 0 : _a2.ref;
|
|
70960
71129
|
if (!fn)
|
|
70961
71130
|
return;
|
|
70962
71131
|
const inDerivedContext = ast_utils_exports.getContainerOfType(node, isNumberParamValue) || ast_utils_exports.getContainerOfType(node, isNumberParamMin) || ast_utils_exports.getContainerOfType(node, isNumberParamMax) || ast_utils_exports.getContainerOfType(node, isNumberParamInitial) || ast_utils_exports.getContainerOfType(node, isStringParamValue) || ast_utils_exports.getContainerOfType(node, isAttributeParamMod);
|
|
@@ -71002,11 +71171,17 @@ var IntelligentSystemDesignLanguageValidator = class {
|
|
|
71002
71171
|
* error. Detect the missing guard and surface a clear, actionable message instead.
|
|
71003
71172
|
*/
|
|
71004
71173
|
validateParentAccess(node, accept) {
|
|
71005
|
-
var
|
|
71174
|
+
var _a2, _b2;
|
|
71175
|
+
if (node.nameAccess) {
|
|
71176
|
+
if (isParentAccess(node))
|
|
71177
|
+
return;
|
|
71178
|
+
accept("error", `'parent.Name' is read-only \u2014 you cannot assign to a document's built-in name.`, { node, property: "nameAccess" });
|
|
71179
|
+
return;
|
|
71180
|
+
}
|
|
71006
71181
|
const guard = ast_utils_exports.getContainerOfType(node, (n) => isIfStatement(n) && isParentTypeCheckExpression(n.expression));
|
|
71007
71182
|
if (guard)
|
|
71008
71183
|
return;
|
|
71009
|
-
const propName = (
|
|
71184
|
+
const propName = (_b2 = (_a2 = node.property) == null ? void 0 : _a2.$refText) != null ? _b2 : "<property>";
|
|
71010
71185
|
accept(
|
|
71011
71186
|
"error",
|
|
71012
71187
|
`'parent' access must be wrapped in an 'if (parent is SomeActor)' check. An Item can be owned by any Actor type, so ISDL needs to know which Actor's fields you mean before it can resolve 'parent.${propName}'.
|
|
@@ -71024,11 +71199,17 @@ Example:
|
|
|
71024
71199
|
* message when the guard is missing.
|
|
71025
71200
|
*/
|
|
71026
71201
|
validateTargetAccess(node, accept) {
|
|
71027
|
-
var
|
|
71202
|
+
var _a2, _b2;
|
|
71203
|
+
if (node.nameAccess) {
|
|
71204
|
+
if (isTargetAccess(node))
|
|
71205
|
+
return;
|
|
71206
|
+
accept("error", `'target.Name' is read-only \u2014 you cannot assign to a document's built-in name.`, { node, property: "nameAccess" });
|
|
71207
|
+
return;
|
|
71208
|
+
}
|
|
71028
71209
|
const guard = ast_utils_exports.getContainerOfType(node, (n) => isIfStatement(n) && isTargetTypeCheckExpression(n.expression));
|
|
71029
71210
|
if (guard)
|
|
71030
71211
|
return;
|
|
71031
|
-
const propName = (
|
|
71212
|
+
const propName = (_b2 = (_a2 = node.property) == null ? void 0 : _a2.$refText) != null ? _b2 : "<property>";
|
|
71032
71213
|
accept(
|
|
71033
71214
|
"error",
|
|
71034
71215
|
`'target' access must be wrapped in an 'if (target is SomeActor)' check. The targeted token can be any Actor type, so ISDL needs to know which Actor's fields you mean before it can resolve 'target.${propName}'.
|
|
@@ -71074,22 +71255,22 @@ Example:
|
|
|
71074
71255
|
}
|
|
71075
71256
|
}
|
|
71076
71257
|
isStringExpression(expr) {
|
|
71077
|
-
var
|
|
71258
|
+
var _a2;
|
|
71078
71259
|
if (isLiteral(expr) && typeof expr.val === "string") {
|
|
71079
71260
|
return true;
|
|
71080
71261
|
}
|
|
71081
|
-
if (isAccess(expr) && ((
|
|
71262
|
+
if (isAccess(expr) && ((_a2 = expr.property) == null ? void 0 : _a2.ref)) {
|
|
71082
71263
|
const referencedProperty = expr.property.ref;
|
|
71083
71264
|
return isStringExp(referencedProperty) || isStringChoiceField(referencedProperty);
|
|
71084
71265
|
}
|
|
71085
71266
|
return false;
|
|
71086
71267
|
}
|
|
71087
71268
|
isNumericExpression(expr) {
|
|
71088
|
-
var
|
|
71269
|
+
var _a2;
|
|
71089
71270
|
if (isLiteral(expr) && typeof expr.val === "number") {
|
|
71090
71271
|
return true;
|
|
71091
71272
|
}
|
|
71092
|
-
if (isAccess(expr) && ((
|
|
71273
|
+
if (isAccess(expr) && ((_a2 = expr.property) == null ? void 0 : _a2.ref)) {
|
|
71093
71274
|
const referencedProperty = expr.property.ref;
|
|
71094
71275
|
return isNumberExp(referencedProperty) || isResourceExp(referencedProperty) || isAttributeExp(referencedProperty) || isTrackerExp(referencedProperty);
|
|
71095
71276
|
}
|
|
@@ -71225,10 +71406,10 @@ Example:
|
|
|
71225
71406
|
extractMethodBlockDependencies(methodBlock) {
|
|
71226
71407
|
const dependencies = /* @__PURE__ */ new Set();
|
|
71227
71408
|
function traverseExpression(node) {
|
|
71228
|
-
var
|
|
71409
|
+
var _a2;
|
|
71229
71410
|
if (!node)
|
|
71230
71411
|
return;
|
|
71231
|
-
if (isAccess(node) && ((
|
|
71412
|
+
if (isAccess(node) && ((_a2 = node.property) == null ? void 0 : _a2.ref)) {
|
|
71232
71413
|
dependencies.add(node.property.ref.name.toLowerCase());
|
|
71233
71414
|
}
|
|
71234
71415
|
if (isAccess(node)) {
|
|
@@ -71307,7 +71488,7 @@ var IsdlScopeProvider = class extends DefaultScopeProvider {
|
|
|
71307
71488
|
this.astNodeDescriptionProvider = services.workspace.AstNodeDescriptionProvider;
|
|
71308
71489
|
}
|
|
71309
71490
|
getScope(context) {
|
|
71310
|
-
var
|
|
71491
|
+
var _a2;
|
|
71311
71492
|
if (isAccess(context.container) || isAssignment2(context.container) || isParentAccess(context.container) || isParentPropertyRefChoice(context.container) || isParentAssignment(context.container) || isTargetAccess(context.container) || isTargetAssignment(context.container)) {
|
|
71312
71493
|
return this.getPropertyAccessScope(context);
|
|
71313
71494
|
}
|
|
@@ -71339,7 +71520,7 @@ var IsdlScopeProvider = class extends DefaultScopeProvider {
|
|
|
71339
71520
|
}
|
|
71340
71521
|
if (isTableImageActionParam(context.container)) {
|
|
71341
71522
|
const tableField = ast_utils_exports.getContainerOfType(context.container, isTableField);
|
|
71342
|
-
if (!tableField || !((
|
|
71523
|
+
if (!tableField || !((_a2 = tableField.documents[0]) == null ? void 0 : _a2.ref))
|
|
71343
71524
|
return new MapScope([]);
|
|
71344
71525
|
const actions = getAllOfType(tableField.documents[0].ref.body, isAction2, false);
|
|
71345
71526
|
return new MapScope(actions.map((a2) => this.astNodeDescriptionProvider.createDescription(a2, a2.name)));
|
|
@@ -71433,9 +71614,9 @@ var IsdlScopeProvider = class extends DefaultScopeProvider {
|
|
|
71433
71614
|
return new MapScope(additionalDescriptions);
|
|
71434
71615
|
}
|
|
71435
71616
|
getInventoryPropertyScope(context) {
|
|
71436
|
-
var
|
|
71617
|
+
var _a2;
|
|
71437
71618
|
const inventoryField = ast_utils_exports.getContainerOfType(context.container, isInventoryField);
|
|
71438
|
-
if (!inventoryField || !((
|
|
71619
|
+
if (!inventoryField || !((_a2 = inventoryField.documents[0]) == null ? void 0 : _a2.ref)) {
|
|
71439
71620
|
return new MapScope([]);
|
|
71440
71621
|
}
|
|
71441
71622
|
const descriptions = this.getScopesForDocument(inventoryField.documents[0].ref);
|
|
@@ -71529,62 +71710,10 @@ var IsdlFormatter = class extends AbstractFormatter {
|
|
|
71529
71710
|
};
|
|
71530
71711
|
|
|
71531
71712
|
// src/language/isdl-hover-provider.ts
|
|
71532
|
-
var FIELD_DOCS = {
|
|
71533
|
-
// Basic fields
|
|
71534
|
-
StringExp: "**string** \u2014 A plain text input field.",
|
|
71535
|
-
NumberExp: "**number** \u2014 A numeric input field. Supports `min`, `max`, `initial`, and a calculated `value`.",
|
|
71536
|
-
BooleanExp: "**boolean** \u2014 A true/false checkbox.",
|
|
71537
|
-
HtmlExp: "**html** \u2014 A rich text editor field (supports HTML markup).",
|
|
71538
|
-
StringChoiceField: "**choice\\<string\\>** \u2014 A single-select dropdown from a fixed list of string options.",
|
|
71539
|
-
DamageTypeChoiceField: "**choice\\<damageType\\>** \u2014 A dropdown for selecting a damage type defined in your keywords.",
|
|
71540
|
-
StringChoicesField: "**choices\\<string\\>** \u2014 A multi-select field. Accepts up to `max` selections from a fixed list.",
|
|
71541
|
-
// Complex fields
|
|
71542
|
-
ResourceExp: "**resource** \u2014 A current/max bar (HP, Mana, etc.). Tag with `health` or `wounds` to mark as the primary pool. Supports `style`, `segments`, `min`, and `max`.",
|
|
71543
|
-
TrackerExp: "**tracker** \u2014 A visual progress tracker. Styles: `bar`, `dial`, `icons`, `slashes`, `segmented`, `clock`, `plain`.",
|
|
71544
|
-
AttributeExp: "**attribute** \u2014 A stat with an optional derived `mod`. Make it clickable with `roll:` (posts a standard roll card) or `function:` (calls a no-arg function on this document for full control over the result). Styles: `plain`, `box`.",
|
|
71545
|
-
MeasuredTemplateField: "**measuredTemplate** \u2014 A Foundry VTT measured template reference (AoE shapes like circles, cones, rays).",
|
|
71546
|
-
DamageBonusesField: "**bonuses** \u2014 Displays aggregated active-effect damage bonuses by type.",
|
|
71547
|
-
DamageResistancesField: "**resistances** \u2014 Displays aggregated active-effect damage resistances by type.",
|
|
71548
|
-
MoneyField: "**money** \u2014 A currency field. Use `format` (`compact`/`full`/`auto`) and optional denominations block for multi-currency systems.",
|
|
71549
|
-
PinnedField: "**pinned** \u2014 Shows items the player has pinned for quick access.",
|
|
71550
|
-
DocumentChoicesExp: "**choices\\<ItemType\\>** \u2014 A multi-select field linking to multiple items of the specified type.",
|
|
71551
|
-
// WIP fields
|
|
71552
|
-
DamageTrackExp: "**damageTrack** \u26A0\uFE0F *WIP* \u2014 A damage track with typed boxes (bashing, lethal, aggravated, etc.). May change in a future version.",
|
|
71553
|
-
// Date/Time fields
|
|
71554
|
-
DateExp: "**date** \u2014 A date picker field.",
|
|
71555
|
-
TimeExp: "**time** \u2014 A time picker field.",
|
|
71556
|
-
DateTimeExp: "**datetime** \u2014 A combined date and time picker field.",
|
|
71557
|
-
// Dice fields
|
|
71558
|
-
DieField: "**die** \u2014 A single die type selector (d4, d6, d8, d10, d12, d20, d100).",
|
|
71559
|
-
DiceField: "**dice** \u2014 A dice pool selector (NdX). Tracks both count and die size.",
|
|
71560
|
-
// Document fields
|
|
71561
|
-
SingleDocumentExp: "**DocumentType name** \u2014 A reference to a single linked item of the specified type.",
|
|
71562
|
-
DocumentChoiceExp: "**choice\\<DocumentType\\>** \u2014 A dropdown linking to one item of the specified type.",
|
|
71563
|
-
InventoryField: "**inventory\\<ItemType\\>** \u2014 A grid-based inventory. Supports slots, rows, columns, quantity tracking, money integration, and weight/value sums.",
|
|
71564
|
-
MacroField: "**macro** \u2014 A Foundry VTT macro reference. Execute it in code with `self.Name.execute()`.",
|
|
71565
|
-
TableField: "**table\\<ItemType\\>** \u2014 An embedded table listing linked items. Use `fields` to choose columns and `where` to filter.",
|
|
71566
|
-
PaperDollExp: "**paperdoll** \u2014 An image-based equipment slot layout. Drop items onto defined hotspots.",
|
|
71567
|
-
// Reference fields
|
|
71568
|
-
SelfPropertyRefExp: "**self\\<type\\>** \u2014 A mirror of another field on this same document. Changes reflect in real time.",
|
|
71569
|
-
ParentPropertyRefExp: "**parent\\<type\\>** \u2014 A mirror of a field on the owning parent document (e.g. an item reading from its actor).",
|
|
71570
|
-
// Layout / structure
|
|
71571
|
-
Actor: "**actor** \u2014 Defines an actor document type (characters, NPCs, vehicles). Generates a full character sheet.",
|
|
71572
|
-
Item: "**item** \u2014 Defines an item document type (weapons, spells, skills). Generates an item sheet.",
|
|
71573
|
-
Config: "**config** \u2014 System-wide configuration: name, id, author, description, and keyword definitions.",
|
|
71574
|
-
Keywords: "**keywords** \u2014 Defines named keywords that appear as tags in chat cards and rich text. Each keyword can have a `summary`, `color`, and `icon`.",
|
|
71575
|
-
Section: "**section** \u2014 Groups related fields under a named heading on the sheet.",
|
|
71576
|
-
Page: "**page** \u2014 Adds a separate tab to the document sheet. Supports `icon` and `background`.",
|
|
71577
|
-
Row: "**row** \u2014 Arranges child fields horizontally side by side.",
|
|
71578
|
-
Column: "**column** \u2014 Stacks child fields vertically within a row.",
|
|
71579
|
-
// Executables
|
|
71580
|
-
Action: "**action** \u2014 A clickable button on the sheet that runs code. Supports `visibility`, `icon`, and `color` params.",
|
|
71581
|
-
HookHandler: "**on** \u2014 Reacts to a Foundry VTT event (`combatStart`, `roundStart`, `turnStart`, `appliedDamage`, etc.).",
|
|
71582
|
-
FunctionDefinition: "**function** \u2014 A reusable named function with typed parameters and an optional `returns` type."
|
|
71583
|
-
};
|
|
71584
71713
|
var IsdlHoverProvider = class {
|
|
71585
71714
|
getHoverContent(document, params) {
|
|
71586
|
-
var
|
|
71587
|
-
const rootCst = (
|
|
71715
|
+
var _a2, _b2;
|
|
71716
|
+
const rootCst = (_b2 = (_a2 = document.parseResult) == null ? void 0 : _a2.value) == null ? void 0 : _b2.$cstNode;
|
|
71588
71717
|
if (!rootCst)
|
|
71589
71718
|
return void 0;
|
|
71590
71719
|
const offset = document.textDocument.offsetAt(params.position);
|
|
@@ -71593,9 +71722,9 @@ var IsdlHoverProvider = class {
|
|
|
71593
71722
|
return void 0;
|
|
71594
71723
|
let node = leaf.astNode;
|
|
71595
71724
|
while (node) {
|
|
71596
|
-
const doc =
|
|
71725
|
+
const doc = TYPE_DOCS[node.$type];
|
|
71597
71726
|
if (doc) {
|
|
71598
|
-
return { contents: { kind: "markdown", value: doc } };
|
|
71727
|
+
return { contents: { kind: "markdown", value: docMarkdown(doc) } };
|
|
71599
71728
|
}
|
|
71600
71729
|
node = node.$container;
|
|
71601
71730
|
}
|
|
@@ -71603,6 +71732,26 @@ var IsdlHoverProvider = class {
|
|
|
71603
71732
|
}
|
|
71604
71733
|
};
|
|
71605
71734
|
|
|
71735
|
+
// src/language/isdl-completion-provider.ts
|
|
71736
|
+
var import_vscode_languageserver13 = __toESM(require_main5(), 1);
|
|
71737
|
+
var IsdlCompletionProvider = class extends DefaultCompletionProvider {
|
|
71738
|
+
completionForKeyword(context, keyword, acceptor) {
|
|
71739
|
+
var _a2;
|
|
71740
|
+
if (!this.filterKeyword(context, keyword)) {
|
|
71741
|
+
return;
|
|
71742
|
+
}
|
|
71743
|
+
const doc = KEYWORD_DOCS[keyword.value];
|
|
71744
|
+
acceptor(context, {
|
|
71745
|
+
label: keyword.value,
|
|
71746
|
+
kind: import_vscode_languageserver13.CompletionItemKind.Keyword,
|
|
71747
|
+
detail: (_a2 = doc == null ? void 0 : doc.detail) != null ? _a2 : "Keyword",
|
|
71748
|
+
documentation: doc ? { kind: import_vscode_languageserver13.MarkupKind.Markdown, value: docMarkdown(doc) } : void 0,
|
|
71749
|
+
// Documented keywords sort just above bare ones so the things we can explain surface first.
|
|
71750
|
+
sortText: doc ? "0" : "1"
|
|
71751
|
+
});
|
|
71752
|
+
}
|
|
71753
|
+
};
|
|
71754
|
+
|
|
71606
71755
|
// src/language/isdl-parser-error-message-provider.ts
|
|
71607
71756
|
var IsdlParserErrorMessageProvider = class extends LangiumParserErrorMessageProvider {
|
|
71608
71757
|
buildMismatchTokenMessage(options) {
|
|
@@ -71615,12 +71764,15 @@ var IsdlParserErrorMessageProvider = class extends LangiumParserErrorMessageProv
|
|
|
71615
71764
|
return friendly != null ? friendly : super.buildNoViableAltMessage(options);
|
|
71616
71765
|
}
|
|
71617
71766
|
friendlyMessage(expected, actual, previous, _rawRuleName) {
|
|
71618
|
-
var
|
|
71619
|
-
if ((expected == null ? void 0 : expected.name) === "{" && ((
|
|
71620
|
-
const combined = `${(
|
|
71621
|
-
const suggestion = ((
|
|
71767
|
+
var _a2, _b2, _c2, _d, _e;
|
|
71768
|
+
if ((expected == null ? void 0 : expected.name) === "{" && ((_a2 = actual == null ? void 0 : actual.tokenType) == null ? void 0 : _a2.name) === "ID") {
|
|
71769
|
+
const combined = `${(_b2 = previous == null ? void 0 : previous.image) != null ? _b2 : ""}${actual.image}`;
|
|
71770
|
+
const suggestion = ((_c2 = previous == null ? void 0 : previous.tokenType) == null ? void 0 : _c2.name) === "ID" && (previous == null ? void 0 : previous.image) ? `, e.g. \`${combined}\`` : "";
|
|
71622
71771
|
return `Expected '{' to open the body, but found \`${actual.image}\`. This usually means a name has a space in it \u2014 names must be a single word (letters, numbers, and underscores only)${suggestion}.`;
|
|
71623
71772
|
}
|
|
71773
|
+
if (((_d = previous == null ? void 0 : previous.tokenType) == null ? void 0 : _d.name) === "STRING" && ((_e = actual == null ? void 0 : actual.tokenType) == null ? void 0 : _e.name) === "STRING") {
|
|
71774
|
+
return `Missing comma between items \u2014 expected ',' before ${actual.image}.`;
|
|
71775
|
+
}
|
|
71624
71776
|
return void 0;
|
|
71625
71777
|
}
|
|
71626
71778
|
};
|
|
@@ -71630,8 +71782,8 @@ var IsdlDocumentValidator = class extends DefaultDocumentValidator {
|
|
|
71630
71782
|
async validateDocument(document, options = {}, cancelToken) {
|
|
71631
71783
|
const diagnostics = await super.validateDocument(document, options, cancelToken);
|
|
71632
71784
|
const syntaxErrors = diagnostics.filter((d) => {
|
|
71633
|
-
var
|
|
71634
|
-
const code = (
|
|
71785
|
+
var _a2;
|
|
71786
|
+
const code = (_a2 = d.data) == null ? void 0 : _a2.code;
|
|
71635
71787
|
return code === DocumentValidator.ParsingError || code === DocumentValidator.LexingError;
|
|
71636
71788
|
});
|
|
71637
71789
|
if (syntaxErrors.length === 0) {
|
|
@@ -71655,7 +71807,8 @@ var IntelligentSystemDesignLanguageModule = {
|
|
|
71655
71807
|
},
|
|
71656
71808
|
lsp: {
|
|
71657
71809
|
Formatter: (_services) => new IsdlFormatter(),
|
|
71658
|
-
HoverProvider: (_services) => new IsdlHoverProvider()
|
|
71810
|
+
HoverProvider: (_services) => new IsdlHoverProvider(),
|
|
71811
|
+
CompletionProvider: (services) => new IsdlCompletionProvider(services)
|
|
71659
71812
|
}
|
|
71660
71813
|
};
|
|
71661
71814
|
function createIntelligentSystemDesignLanguageServices(context) {
|
|
@@ -71698,7 +71851,7 @@ var NodeFileSystem = {
|
|
|
71698
71851
|
|
|
71699
71852
|
// src/extension/github/githubManager.ts
|
|
71700
71853
|
async function extractDocumentSafe(fileName, services) {
|
|
71701
|
-
var
|
|
71854
|
+
var _a2;
|
|
71702
71855
|
const extensions = services.LanguageMetaData.fileExtensions;
|
|
71703
71856
|
if (!extensions.includes(path.extname(fileName))) {
|
|
71704
71857
|
console.error(`Invalid file extension. Expected one of: ${extensions}`);
|
|
@@ -71711,7 +71864,7 @@ async function extractDocumentSafe(fileName, services) {
|
|
|
71711
71864
|
try {
|
|
71712
71865
|
const document = await services.shared.workspace.LangiumDocuments.getOrCreateDocument(URI2.file(path.resolve(fileName)));
|
|
71713
71866
|
await services.shared.workspace.DocumentBuilder.build([document], { validation: true });
|
|
71714
|
-
const validationErrors = ((
|
|
71867
|
+
const validationErrors = ((_a2 = document.diagnostics) != null ? _a2 : []).filter((e) => e.severity === 1);
|
|
71715
71868
|
if (validationErrors.length > 0) {
|
|
71716
71869
|
console.error("Validation errors found:");
|
|
71717
71870
|
for (const validationError of validationErrors) {
|
|
@@ -72416,7 +72569,7 @@ var GitHubManager = class {
|
|
|
72416
72569
|
* Collect system files for publishing
|
|
72417
72570
|
*/
|
|
72418
72571
|
async collectSystemFilesForPublish(isdlFilePath) {
|
|
72419
|
-
var
|
|
72572
|
+
var _a2;
|
|
72420
72573
|
try {
|
|
72421
72574
|
const config = vscode4.workspace.getConfiguration("isdl");
|
|
72422
72575
|
const lastSelectedFolder = config.get("lastSelectedFolder");
|
|
@@ -72430,7 +72583,7 @@ var GitHubManager = class {
|
|
|
72430
72583
|
vscode4.window.showErrorMessage("Failed to parse the selected ISDL file.");
|
|
72431
72584
|
return [];
|
|
72432
72585
|
}
|
|
72433
|
-
const id = (
|
|
72586
|
+
const id = (_a2 = model.config.body.find((x) => isConfigExpression(x) && x.type === "id")) == null ? void 0 : _a2.value;
|
|
72434
72587
|
if (!id) {
|
|
72435
72588
|
vscode4.window.showErrorMessage("Could not find system ID in the selected ISDL file.");
|
|
72436
72589
|
return [];
|
|
@@ -72537,7 +72690,7 @@ var GitHubManager = class {
|
|
|
72537
72690
|
* Create a GitHub release for the system
|
|
72538
72691
|
*/
|
|
72539
72692
|
async createRelease(systemInfo, systemFiles, progress) {
|
|
72540
|
-
var
|
|
72693
|
+
var _a2;
|
|
72541
72694
|
if (!await this.initializeOctokit() || !this.currentRepository)
|
|
72542
72695
|
return void 0;
|
|
72543
72696
|
try {
|
|
@@ -72606,7 +72759,7 @@ var GitHubManager = class {
|
|
|
72606
72759
|
console.error("\u274C Error details:", {
|
|
72607
72760
|
status: error.status,
|
|
72608
72761
|
message: error.message,
|
|
72609
|
-
response: (
|
|
72762
|
+
response: (_a2 = error.response) == null ? void 0 : _a2.data
|
|
72610
72763
|
});
|
|
72611
72764
|
if (error.status === 422 && error.message.includes("tag_name already exists")) {
|
|
72612
72765
|
vscode4.window.showWarningMessage(
|
|
@@ -72747,14 +72900,14 @@ var GitHubManager = class {
|
|
|
72747
72900
|
* Generate release notes for the system with ISDL change analysis
|
|
72748
72901
|
*/
|
|
72749
72902
|
async generateReleaseNotes(systemInfo, changes = [], tagName) {
|
|
72750
|
-
var
|
|
72903
|
+
var _a2, _b2;
|
|
72751
72904
|
const currentDate = (/* @__PURE__ */ new Date()).toISOString().split("T")[0];
|
|
72752
72905
|
const systemName = (systemInfo == null ? void 0 : systemInfo.title) || (systemInfo == null ? void 0 : systemInfo.id) || "ISDL System";
|
|
72753
72906
|
const changelogSection = this.generateChangelogSection(changes);
|
|
72754
72907
|
return `## ${systemName} Release
|
|
72755
72908
|
|
|
72756
72909
|
\u{1F4C5} **Release Date:** ${currentDate}
|
|
72757
|
-
\u{1F3B2} **Foundry VTT Compatibility:** v${((
|
|
72910
|
+
\u{1F3B2} **Foundry VTT Compatibility:** v${((_a2 = systemInfo == null ? void 0 : systemInfo.compatibility) == null ? void 0 : _a2.minimum) || "12"} - v${((_b2 = systemInfo == null ? void 0 : systemInfo.compatibility) == null ? void 0 : _b2.verified) || "13"}
|
|
72758
72911
|
|
|
72759
72912
|
### \u{1F4E6} Installation
|
|
72760
72913
|
|
|
@@ -72847,18 +73000,18 @@ For installation instructions, usage guides, and troubleshooting:
|
|
|
72847
73000
|
* Extension-safe AST node extraction that doesn't call process.exit()
|
|
72848
73001
|
*/
|
|
72849
73002
|
async extractAstNodeSafe(fileName, services) {
|
|
72850
|
-
var
|
|
73003
|
+
var _a2;
|
|
72851
73004
|
const document = await extractDocumentSafe(fileName, services);
|
|
72852
73005
|
if (!document) {
|
|
72853
73006
|
return null;
|
|
72854
73007
|
}
|
|
72855
|
-
return ((
|
|
73008
|
+
return ((_a2 = document.parseResult) == null ? void 0 : _a2.value) || null;
|
|
72856
73009
|
}
|
|
72857
73010
|
/**
|
|
72858
73011
|
* Ensure GitHub workflow file exists in the repository and update it if content differs
|
|
72859
73012
|
*/
|
|
72860
73013
|
async ensureWorkflowFile(repository) {
|
|
72861
|
-
var
|
|
73014
|
+
var _a2;
|
|
72862
73015
|
if (!await this.initializeOctokit())
|
|
72863
73016
|
return false;
|
|
72864
73017
|
try {
|
|
@@ -72932,7 +73085,7 @@ For installation instructions, usage guides, and troubleshooting:
|
|
|
72932
73085
|
console.error("\u274C Error details:", {
|
|
72933
73086
|
status: error.status,
|
|
72934
73087
|
message: error.message,
|
|
72935
|
-
response: (
|
|
73088
|
+
response: (_a2 = error.response) == null ? void 0 : _a2.data
|
|
72936
73089
|
});
|
|
72937
73090
|
vscode4.window.showWarningMessage(
|
|
72938
73091
|
`Could not create/update GitHub workflow file: ${error.message}. The system files were published but automated releases may not work.`,
|
|
@@ -73068,14 +73221,14 @@ For installation instructions, usage guides, and troubleshooting:
|
|
|
73068
73221
|
* Parse ISDL content into AST
|
|
73069
73222
|
*/
|
|
73070
73223
|
async parseIsdlContent(name, content, services) {
|
|
73071
|
-
var
|
|
73224
|
+
var _a2;
|
|
73072
73225
|
try {
|
|
73073
73226
|
const tempDocument = services.shared.workspace.LangiumDocuments.createDocument(
|
|
73074
73227
|
URI2.file(`/${name}-temp.isdl`),
|
|
73075
73228
|
content
|
|
73076
73229
|
);
|
|
73077
73230
|
await services.shared.workspace.DocumentBuilder.build([tempDocument], { validation: false });
|
|
73078
|
-
return ((
|
|
73231
|
+
return ((_a2 = tempDocument.parseResult) == null ? void 0 : _a2.value) || null;
|
|
73079
73232
|
} catch (error) {
|
|
73080
73233
|
console.error("Failed to parse ISDL content:", error);
|
|
73081
73234
|
return null;
|
|
@@ -73186,7 +73339,7 @@ For installation instructions, usage guides, and troubleshooting:
|
|
|
73186
73339
|
* Compare field lists to find changes
|
|
73187
73340
|
*/
|
|
73188
73341
|
compareIsdlFields(previousFields, currentFields) {
|
|
73189
|
-
var
|
|
73342
|
+
var _a2, _b2;
|
|
73190
73343
|
const changes = [];
|
|
73191
73344
|
const previousMap = new Map(previousFields.map((f) => [`${f.location}.${f.name}`, f]));
|
|
73192
73345
|
const currentMap = new Map(currentFields.map((f) => [`${f.location}.${f.name}`, f]));
|
|
@@ -73197,7 +73350,7 @@ For installation instructions, usage guides, and troubleshooting:
|
|
|
73197
73350
|
category: field.category,
|
|
73198
73351
|
description: `Removed ${field.category} '${field.name}' from ${field.location}`,
|
|
73199
73352
|
name: field.name,
|
|
73200
|
-
details: `Type: ${field.name}${((
|
|
73353
|
+
details: `Type: ${field.name}${((_a2 = field.modifiers) == null ? void 0 : _a2.length) ? `, Modifiers: ${field.modifiers.join(", ")}` : ""}`
|
|
73201
73354
|
});
|
|
73202
73355
|
}
|
|
73203
73356
|
}
|
|
@@ -73208,7 +73361,7 @@ For installation instructions, usage guides, and troubleshooting:
|
|
|
73208
73361
|
category: field.category,
|
|
73209
73362
|
description: `Added ${field.category} '${field.name}' to ${field.location}`,
|
|
73210
73363
|
name: field.name,
|
|
73211
|
-
details: `Type: ${field.name}${((
|
|
73364
|
+
details: `Type: ${field.name}${((_b2 = field.modifiers) == null ? void 0 : _b2.length) ? `, Modifiers: ${field.modifiers.join(", ")}` : ""}`
|
|
73212
73365
|
});
|
|
73213
73366
|
}
|
|
73214
73367
|
}
|
|
@@ -73231,11 +73384,11 @@ For installation instructions, usage guides, and troubleshooting:
|
|
|
73231
73384
|
* Compare ISDL config sections
|
|
73232
73385
|
*/
|
|
73233
73386
|
compareIsdlConfig(previousAst, currentAst) {
|
|
73234
|
-
var
|
|
73387
|
+
var _a2, _b2;
|
|
73235
73388
|
const changes = [];
|
|
73236
73389
|
try {
|
|
73237
|
-
const previousConfig = ((
|
|
73238
|
-
const currentConfig = ((
|
|
73390
|
+
const previousConfig = ((_a2 = previousAst.config) == null ? void 0 : _a2.body) || [];
|
|
73391
|
+
const currentConfig = ((_b2 = currentAst.config) == null ? void 0 : _b2.body) || [];
|
|
73239
73392
|
const previousConfigMap = new Map(previousConfig.map((c) => [c.type, c.value]));
|
|
73240
73393
|
const currentConfigMap = new Map(currentConfig.map((c) => [c.type, c.value]));
|
|
73241
73394
|
for (const [key, value] of currentConfigMap) {
|
|
@@ -73264,13 +73417,13 @@ For installation instructions, usage guides, and troubleshooting:
|
|
|
73264
73417
|
* Get details about what changed in a field
|
|
73265
73418
|
*/
|
|
73266
73419
|
getFieldChangeDetails(oldField, newField) {
|
|
73267
|
-
var
|
|
73420
|
+
var _a2, _b2;
|
|
73268
73421
|
const details = [];
|
|
73269
73422
|
if (oldField.type !== newField.type) {
|
|
73270
73423
|
details.push(`Type changed from ${oldField.name} to ${newField.name}`);
|
|
73271
73424
|
}
|
|
73272
73425
|
if (JSON.stringify(oldField.modifiers) !== JSON.stringify(newField.modifiers)) {
|
|
73273
|
-
details.push(`Modifiers changed from [${(
|
|
73426
|
+
details.push(`Modifiers changed from [${(_a2 = oldField.modifiers) == null ? void 0 : _a2.join(", ")}] to [${(_b2 = newField.modifiers) == null ? void 0 : _b2.join(", ")}]`);
|
|
73274
73427
|
}
|
|
73275
73428
|
if (JSON.stringify(oldField.parameters) !== JSON.stringify(newField.parameters)) {
|
|
73276
73429
|
details.push(`Parameters changed`);
|
|
@@ -74136,7 +74289,7 @@ var source_default = chalk;
|
|
|
74136
74289
|
var path2 = __toESM(require("path"), 1);
|
|
74137
74290
|
var fs3 = __toESM(require("fs"), 1);
|
|
74138
74291
|
async function extractDocument(fileName, services) {
|
|
74139
|
-
var
|
|
74292
|
+
var _a2;
|
|
74140
74293
|
const extensions = services.LanguageMetaData.fileExtensions;
|
|
74141
74294
|
if (!extensions.includes(path2.extname(fileName))) {
|
|
74142
74295
|
console.error(source_default.yellow(`Please choose a file with one of these extensions: ${extensions}.`));
|
|
@@ -74154,7 +74307,7 @@ async function extractDocument(fileName, services) {
|
|
|
74154
74307
|
));
|
|
74155
74308
|
process.exit(1);
|
|
74156
74309
|
}
|
|
74157
|
-
const validationErrors = ((
|
|
74310
|
+
const validationErrors = ((_a2 = document.diagnostics) != null ? _a2 : []).filter((e) => e.severity === 1);
|
|
74158
74311
|
if (validationErrors.length > 0) {
|
|
74159
74312
|
console.error(source_default.red("There are validation errors:"));
|
|
74160
74313
|
for (const validationError of validationErrors) {
|
|
@@ -74173,8 +74326,8 @@ Hint: every ISDL system must begin with a 'config { ... }' block. If the file lo
|
|
|
74173
74326
|
return document;
|
|
74174
74327
|
}
|
|
74175
74328
|
async function extractAstNode(fileName, services) {
|
|
74176
|
-
var
|
|
74177
|
-
return (
|
|
74329
|
+
var _a2;
|
|
74330
|
+
return (_a2 = (await extractDocument(fileName, services)).parseResult) == null ? void 0 : _a2.value;
|
|
74178
74331
|
}
|
|
74179
74332
|
|
|
74180
74333
|
// src/extension/github/githubQuickActions.ts
|
|
@@ -74263,8 +74416,8 @@ var GitHubQuickActions = class {
|
|
|
74263
74416
|
* Quick repository creation with enhanced validation and options
|
|
74264
74417
|
*/
|
|
74265
74418
|
async createRepository() {
|
|
74266
|
-
var
|
|
74267
|
-
const workspaceFolder = (
|
|
74419
|
+
var _a2;
|
|
74420
|
+
const workspaceFolder = (_a2 = vscode6.workspace.workspaceFolders) == null ? void 0 : _a2[0];
|
|
74268
74421
|
const defaultName = workspaceFolder ? workspaceFolder.name.toLowerCase().replace(/[^a-z0-9-]/g, "-") : "";
|
|
74269
74422
|
const name = await vscode6.window.showInputBox({
|
|
74270
74423
|
title: "Create GitHub Repository - Step 1 of 4",
|
|
@@ -75030,12 +75183,12 @@ var GitHubGistManager = class {
|
|
|
75030
75183
|
* Delete a gist
|
|
75031
75184
|
*/
|
|
75032
75185
|
async deleteGist(gistId) {
|
|
75033
|
-
var
|
|
75186
|
+
var _a2;
|
|
75034
75187
|
if (!await this.initializeOctokit())
|
|
75035
75188
|
return false;
|
|
75036
75189
|
try {
|
|
75037
75190
|
await this.octokit.gists.delete({ gist_id: gistId });
|
|
75038
|
-
if (((
|
|
75191
|
+
if (((_a2 = this.currentGist) == null ? void 0 : _a2.id) === gistId) {
|
|
75039
75192
|
this.disconnectGist();
|
|
75040
75193
|
}
|
|
75041
75194
|
return true;
|
|
@@ -75247,7 +75400,7 @@ var GitHubGistActions = class {
|
|
|
75247
75400
|
* Download ISDL file from the selected gist
|
|
75248
75401
|
*/
|
|
75249
75402
|
async downloadFromGist() {
|
|
75250
|
-
var
|
|
75403
|
+
var _a2, _b2;
|
|
75251
75404
|
const currentGist = this.gistManager.getCurrentGist();
|
|
75252
75405
|
if (!currentGist) {
|
|
75253
75406
|
vscode8.window.showWarningMessage("No gist connected. Please select a gist first.");
|
|
@@ -75267,7 +75420,7 @@ var GitHubGistActions = class {
|
|
|
75267
75420
|
return;
|
|
75268
75421
|
const saveLocation = await vscode8.window.showSaveDialog({
|
|
75269
75422
|
defaultUri: vscode8.Uri.file(path5.join(
|
|
75270
|
-
((
|
|
75423
|
+
((_b2 = (_a2 = vscode8.workspace.workspaceFolders) == null ? void 0 : _a2[0]) == null ? void 0 : _b2.uri.fsPath) || "",
|
|
75271
75424
|
fileData.filename
|
|
75272
75425
|
)),
|
|
75273
75426
|
filters: {
|
|
@@ -75410,15 +75563,15 @@ ${outputPath}` : "System generated successfully!";
|
|
|
75410
75563
|
}));
|
|
75411
75564
|
}
|
|
75412
75565
|
context.subscriptions.push(vscode9.commands.registerCommand("isdl.generate", async () => {
|
|
75413
|
-
var
|
|
75566
|
+
var _a2, _b2;
|
|
75414
75567
|
const files = await vscode9.workspace.findFiles("**/*.isdl");
|
|
75415
75568
|
if (!files || files.length === 0) {
|
|
75416
75569
|
vscode9.window.showErrorMessage("No .isdl files found in the workspace.");
|
|
75417
75570
|
return;
|
|
75418
75571
|
}
|
|
75419
75572
|
const lastSelectedFile = context.globalState.get("lastSelectedFile");
|
|
75420
|
-
const activeFile = (
|
|
75421
|
-
const preferredFile = (
|
|
75573
|
+
const activeFile = (_a2 = vscode9.window.activeTextEditor) == null ? void 0 : _a2.document.uri.fsPath;
|
|
75574
|
+
const preferredFile = (_b2 = (activeFile == null ? void 0 : activeFile.endsWith(".isdl")) ? activeFile : void 0) != null ? _b2 : lastSelectedFile;
|
|
75422
75575
|
const fileItems = files.map((file) => ({
|
|
75423
75576
|
label: path6.basename(file.fsPath),
|
|
75424
75577
|
description: file.fsPath,
|
|
@@ -75438,8 +75591,8 @@ ${outputPath}` : "System generated successfully!";
|
|
|
75438
75591
|
canSelectFiles: false,
|
|
75439
75592
|
canSelectFolders: true,
|
|
75440
75593
|
canSelectMany: false,
|
|
75441
|
-
openLabel: "Select Foundry Data
|
|
75442
|
-
title: "Select your Foundry VTT Data/
|
|
75594
|
+
openLabel: "Select Foundry Data Folder",
|
|
75595
|
+
title: "Select your Foundry VTT Data folder (or the systems/ subfolder)",
|
|
75443
75596
|
defaultUri: lastSelectedFolder ? vscode9.Uri.file(lastSelectedFolder) : void 0
|
|
75444
75597
|
});
|
|
75445
75598
|
if (!destinationFolderUri || destinationFolderUri.length === 0) {
|