Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| f3f11d8658 | |||
| 5359433879 | |||
| a8bfe74256 | |||
| e2c5f1f74a |
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@actions/expressions",
|
||||
"version": "0.3.37",
|
||||
"version": "0.3.39",
|
||||
"license": "MIT",
|
||||
"type": "module",
|
||||
"source": "./src/index.ts",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@actions/languageserver",
|
||||
"version": "0.3.37",
|
||||
"version": "0.3.39",
|
||||
"description": "Language server for GitHub Actions",
|
||||
"license": "MIT",
|
||||
"type": "module",
|
||||
@@ -48,8 +48,8 @@
|
||||
"actions-languageserver": "./bin/actions-languageserver"
|
||||
},
|
||||
"dependencies": {
|
||||
"@actions/languageservice": "^0.3.37",
|
||||
"@actions/workflow-parser": "^0.3.37",
|
||||
"@actions/languageservice": "^0.3.39",
|
||||
"@actions/workflow-parser": "^0.3.39",
|
||||
"@octokit/rest": "^21.1.1",
|
||||
"@octokit/types": "^9.0.0",
|
||||
"vscode-languageserver": "^8.0.2",
|
||||
|
||||
@@ -154,7 +154,8 @@ export function initConnection(connection: Connection) {
|
||||
getDocument(documents, textDocument),
|
||||
client,
|
||||
repos.find(repo => textDocument.uri.startsWith(repo.workspaceUri)),
|
||||
cache
|
||||
cache,
|
||||
featureFlags
|
||||
)
|
||||
);
|
||||
});
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import {complete} from "@actions/languageservice/complete";
|
||||
import type {FeatureFlags} from "@actions/expressions";
|
||||
import {Octokit} from "@octokit/rest";
|
||||
import {CompletionItem, Connection, Position} from "vscode-languageserver";
|
||||
import {TextDocument} from "vscode-languageserver-textdocument";
|
||||
@@ -15,11 +16,13 @@ export async function onCompletion(
|
||||
document: TextDocument,
|
||||
client: Octokit | undefined,
|
||||
repoContext: RepositoryContext | undefined,
|
||||
cache: TTLCache
|
||||
cache: TTLCache,
|
||||
featureFlags?: FeatureFlags
|
||||
): Promise<CompletionItem[]> {
|
||||
return await complete(document, position, {
|
||||
valueProviderConfig: repoContext && valueProviders(client, repoContext, cache),
|
||||
contextProviderConfig: repoContext && contextProviders(client, repoContext, cache),
|
||||
featureFlags,
|
||||
fileProvider: getFileProvider(client, cache, repoContext?.workspaceUri, async path => {
|
||||
return await connection.sendRequest(Requests.ReadFile, {path});
|
||||
})
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@actions/languageservice",
|
||||
"version": "0.3.37",
|
||||
"version": "0.3.39",
|
||||
"description": "Language service for GitHub Actions",
|
||||
"license": "MIT",
|
||||
"type": "module",
|
||||
@@ -47,8 +47,8 @@
|
||||
"watch": "tsc --build tsconfig.build.json --watch"
|
||||
},
|
||||
"dependencies": {
|
||||
"@actions/expressions": "^0.3.37",
|
||||
"@actions/workflow-parser": "^0.3.37",
|
||||
"@actions/expressions": "^0.3.39",
|
||||
"@actions/workflow-parser": "^0.3.39",
|
||||
"vscode-languageserver-textdocument": "^1.0.7",
|
||||
"vscode-languageserver-types": "^3.17.2",
|
||||
"vscode-uri": "^3.0.8",
|
||||
|
||||
@@ -91,7 +91,6 @@ main: index.js
|
||||
# console.log('Hello World');
|
||||
`;
|
||||
|
||||
/* eslint-disable no-useless-escape -- \$ is required to escape $ in VS Code snippets */
|
||||
const ACTION_SNIPPET_COMPOSITE_FULL = `name: '\${1:Action Name}'
|
||||
description: '\${2:What this action does}'
|
||||
|
||||
@@ -116,9 +115,9 @@ runs:
|
||||
env:
|
||||
INPUT_NAME: \\\${{ inputs.name }}
|
||||
run: |
|
||||
GREETING="Hello \$INPUT_NAME"
|
||||
echo "\$GREETING"
|
||||
echo "greeting=\$GREETING" >> \$GITHUB_OUTPUT
|
||||
GREETING="Hello \\$INPUT_NAME"
|
||||
echo "\\$GREETING"
|
||||
echo "greeting=\\$GREETING" >> \\$GITHUB_OUTPUT
|
||||
`;
|
||||
|
||||
const ACTION_SNIPPET_COMPOSITE_RUNS = `inputs:
|
||||
@@ -142,9 +141,9 @@ runs:
|
||||
env:
|
||||
INPUT_NAME: \\\${{ inputs.name }}
|
||||
run: |
|
||||
GREETING="Hello \$INPUT_NAME"
|
||||
echo "\$GREETING"
|
||||
echo "greeting=\$GREETING" >> \$GITHUB_OUTPUT
|
||||
GREETING="Hello \\$INPUT_NAME"
|
||||
echo "\\$GREETING"
|
||||
echo "greeting=\\$GREETING" >> \\$GITHUB_OUTPUT
|
||||
`;
|
||||
|
||||
const ACTION_SNIPPET_COMPOSITE_USING = `# For more on composite actions, see:
|
||||
@@ -180,9 +179,9 @@ runs:
|
||||
args:
|
||||
- -c
|
||||
- |
|
||||
GREETING="Hello \$INPUT_NAME"
|
||||
echo "\$GREETING"
|
||||
echo "greeting=\$GREETING" >> \$GITHUB_OUTPUT
|
||||
GREETING="Hello \\$INPUT_NAME"
|
||||
echo "\\$GREETING"
|
||||
echo "greeting=\\$GREETING" >> \\$GITHUB_OUTPUT
|
||||
`;
|
||||
|
||||
const ACTION_SNIPPET_DOCKER_RUNS = `inputs:
|
||||
@@ -207,11 +206,10 @@ runs:
|
||||
args:
|
||||
- -c
|
||||
- |
|
||||
GREETING="Hello \$INPUT_NAME"
|
||||
echo "\$GREETING"
|
||||
echo "greeting=\$GREETING" >> \$GITHUB_OUTPUT
|
||||
GREETING="Hello \\$INPUT_NAME"
|
||||
echo "\\$GREETING"
|
||||
echo "greeting=\\$GREETING" >> \\$GITHUB_OUTPUT
|
||||
`;
|
||||
/* eslint-enable no-useless-escape */
|
||||
|
||||
const ACTION_SNIPPET_DOCKER_USING = `# For more on Docker actions, see:
|
||||
# https://docs.github.com/en/actions/sharing-automations/creating-actions/creating-a-docker-container-action
|
||||
|
||||
+1
-1
@@ -6,5 +6,5 @@
|
||||
"languageservice",
|
||||
"languageserver"
|
||||
],
|
||||
"version": "0.3.37"
|
||||
"version": "0.3.39"
|
||||
}
|
||||
Generated
+9
-9
@@ -136,7 +136,7 @@
|
||||
},
|
||||
"expressions": {
|
||||
"name": "@actions/expressions",
|
||||
"version": "0.3.37",
|
||||
"version": "0.3.39",
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"@types/jest": "^29.0.3",
|
||||
@@ -396,11 +396,11 @@
|
||||
},
|
||||
"languageserver": {
|
||||
"name": "@actions/languageserver",
|
||||
"version": "0.3.37",
|
||||
"version": "0.3.39",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@actions/languageservice": "^0.3.37",
|
||||
"@actions/workflow-parser": "^0.3.37",
|
||||
"@actions/languageservice": "^0.3.39",
|
||||
"@actions/workflow-parser": "^0.3.39",
|
||||
"@octokit/rest": "^21.1.1",
|
||||
"@octokit/types": "^9.0.0",
|
||||
"vscode-languageserver": "^8.0.2",
|
||||
@@ -940,11 +940,11 @@
|
||||
},
|
||||
"languageservice": {
|
||||
"name": "@actions/languageservice",
|
||||
"version": "0.3.37",
|
||||
"version": "0.3.39",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@actions/expressions": "^0.3.37",
|
||||
"@actions/workflow-parser": "^0.3.37",
|
||||
"@actions/expressions": "^0.3.39",
|
||||
"@actions/workflow-parser": "^0.3.39",
|
||||
"vscode-languageserver-textdocument": "^1.0.7",
|
||||
"vscode-languageserver-types": "^3.17.2",
|
||||
"vscode-uri": "^3.0.8",
|
||||
@@ -13345,10 +13345,10 @@
|
||||
},
|
||||
"workflow-parser": {
|
||||
"name": "@actions/workflow-parser",
|
||||
"version": "0.3.37",
|
||||
"version": "0.3.39",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@actions/expressions": "^0.3.37",
|
||||
"@actions/expressions": "^0.3.39",
|
||||
"cronstrue": "^2.21.0",
|
||||
"yaml": "^2.0.0-8"
|
||||
},
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@actions/workflow-parser",
|
||||
"version": "0.3.37",
|
||||
"version": "0.3.39",
|
||||
"license": "MIT",
|
||||
"type": "module",
|
||||
"source": "./src/index.ts",
|
||||
@@ -48,7 +48,7 @@
|
||||
"watch": "tsc --build tsconfig.build.json --watch"
|
||||
},
|
||||
"dependencies": {
|
||||
"@actions/expressions": "^0.3.37",
|
||||
"@actions/expressions": "^0.3.39",
|
||||
"cronstrue": "^2.21.0",
|
||||
"yaml": "^2.0.0-8"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user