@actions/languageserver 0.3.31 → 0.3.33
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/dist/cli.bundle.cjs +33 -12
- package/package.json +4 -4
package/dist/cli.bundle.cjs
CHANGED
|
@@ -24981,10 +24981,12 @@ function mappingValues(mappingDefinition, definitions, indentation, mode) {
|
|
|
24981
24981
|
const properties = [];
|
|
24982
24982
|
for (const [key, value] of Object.entries(mappingDefinition.properties)) {
|
|
24983
24983
|
let insertText;
|
|
24984
|
-
let description;
|
|
24984
|
+
let description = value.description;
|
|
24985
24985
|
if (value.type) {
|
|
24986
24986
|
const typeDef = definitions[value.type];
|
|
24987
|
-
description
|
|
24987
|
+
if (!description) {
|
|
24988
|
+
description = typeDef?.description;
|
|
24989
|
+
}
|
|
24988
24990
|
if (typeDef) {
|
|
24989
24991
|
switch (typeDef.definitionType) {
|
|
24990
24992
|
case DefinitionType.Sequence:
|
|
@@ -25213,6 +25215,10 @@ async function complete2(textDocument, position, config) {
|
|
|
25213
25215
|
} else {
|
|
25214
25216
|
textEdit = import_vscode_languageserver_types.TextEdit.insert(position, newText);
|
|
25215
25217
|
}
|
|
25218
|
+
let additionalTextEdits;
|
|
25219
|
+
if (value.additionalTextEdits) {
|
|
25220
|
+
additionalTextEdits = value.additionalTextEdits.map((edit) => import_vscode_languageserver_types.TextEdit.replace(edit.range, edit.newText));
|
|
25221
|
+
}
|
|
25216
25222
|
const item = {
|
|
25217
25223
|
label: value.label,
|
|
25218
25224
|
labelDetails: value.labelDetail ? { description: value.labelDetail } : void 0,
|
|
@@ -25223,7 +25229,8 @@ async function complete2(textDocument, position, config) {
|
|
|
25223
25229
|
value: value.description
|
|
25224
25230
|
},
|
|
25225
25231
|
tags: value.deprecated ? [import_vscode_languageserver_types.CompletionItemTag.Deprecated] : void 0,
|
|
25226
|
-
textEdit
|
|
25232
|
+
textEdit,
|
|
25233
|
+
additionalTextEdits
|
|
25227
25234
|
};
|
|
25228
25235
|
return item;
|
|
25229
25236
|
});
|
|
@@ -25324,7 +25331,11 @@ function getEscapeHatchCompletions(token, keyToken, indentation, position, schem
|
|
|
25324
25331
|
if (!keyRange || !keyName) {
|
|
25325
25332
|
return [];
|
|
25326
25333
|
}
|
|
25327
|
-
const
|
|
25334
|
+
const cursorRange = {
|
|
25335
|
+
start: { line: position.line, character: position.character },
|
|
25336
|
+
end: { line: position.line, character: position.character }
|
|
25337
|
+
};
|
|
25338
|
+
const keyToCursorRange = {
|
|
25328
25339
|
start: { line: keyRange.start.line - 1, character: keyRange.start.column - 1 },
|
|
25329
25340
|
end: { line: position.line, character: position.character }
|
|
25330
25341
|
};
|
|
@@ -25332,24 +25343,34 @@ function getEscapeHatchCompletions(token, keyToken, indentation, position, schem
|
|
|
25332
25343
|
results.push({
|
|
25333
25344
|
label: "(switch to list)",
|
|
25334
25345
|
sortText: "zzz_switch_1",
|
|
25335
|
-
filterText: keyName,
|
|
25336
25346
|
textEdit: {
|
|
25337
|
-
range:
|
|
25338
|
-
newText:
|
|
25347
|
+
range: cursorRange,
|
|
25348
|
+
newText: `
|
|
25339
25349
|
${indentation}- `
|
|
25340
|
-
}
|
|
25350
|
+
},
|
|
25351
|
+
additionalTextEdits: [
|
|
25352
|
+
{
|
|
25353
|
+
range: keyToCursorRange,
|
|
25354
|
+
newText: `${keyName}:`
|
|
25355
|
+
}
|
|
25356
|
+
]
|
|
25341
25357
|
});
|
|
25342
25358
|
}
|
|
25343
25359
|
if (buckets.mapping) {
|
|
25344
25360
|
results.push({
|
|
25345
25361
|
label: "(switch to mapping)",
|
|
25346
25362
|
sortText: "zzz_switch_2",
|
|
25347
|
-
filterText: keyName,
|
|
25348
25363
|
textEdit: {
|
|
25349
|
-
range:
|
|
25350
|
-
newText:
|
|
25364
|
+
range: cursorRange,
|
|
25365
|
+
newText: `
|
|
25351
25366
|
${indentation}`
|
|
25352
|
-
}
|
|
25367
|
+
},
|
|
25368
|
+
additionalTextEdits: [
|
|
25369
|
+
{
|
|
25370
|
+
range: keyToCursorRange,
|
|
25371
|
+
newText: `${keyName}:`
|
|
25372
|
+
}
|
|
25373
|
+
]
|
|
25353
25374
|
});
|
|
25354
25375
|
}
|
|
25355
25376
|
return results;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@actions/languageserver",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.33",
|
|
4
4
|
"description": "Language server for GitHub Actions",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -48,8 +48,8 @@
|
|
|
48
48
|
"actions-languageserver": "./bin/actions-languageserver"
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"@actions/languageservice": "^0.3.
|
|
52
|
-
"@actions/workflow-parser": "^0.3.
|
|
51
|
+
"@actions/languageservice": "^0.3.33",
|
|
52
|
+
"@actions/workflow-parser": "^0.3.33",
|
|
53
53
|
"@octokit/rest": "^21.1.1",
|
|
54
54
|
"@octokit/types": "^9.0.0",
|
|
55
55
|
"vscode-languageserver": "^8.0.2",
|
|
@@ -78,5 +78,5 @@
|
|
|
78
78
|
"ts-jest": "^29.0.3",
|
|
79
79
|
"typescript": "^4.8.4"
|
|
80
80
|
},
|
|
81
|
-
"gitHead": "
|
|
81
|
+
"gitHead": "66412288702caaf4e3ec315b5aa97044b913a269"
|
|
82
82
|
}
|