diff --git a/languageserver/src/connection.ts b/languageserver/src/connection.ts index 777f9bd..c682442 100644 --- a/languageserver/src/connection.ts +++ b/languageserver/src/connection.ts @@ -1,6 +1,6 @@ -import {documentLinks, hover, validate, ValidationConfig} from "@github/actions-languageservice"; -import {registerLogger, setLogLevel} from "@github/actions-languageservice/log"; -import {clearCache, clearCacheEntry} from "@github/actions-languageservice/utils/workflow-cache"; +import {documentLinks, hover, validate, ValidationConfig} from "@actions/languageservice"; +import {registerLogger, setLogLevel} from "@actions/languageservice/log"; +import {clearCache, clearCacheEntry} from "@actions/languageservice/utils/workflow-cache"; import {Octokit} from "@octokit/rest"; import { CompletionItem, diff --git a/languageserver/src/context-providers.ts b/languageserver/src/context-providers.ts index d9e880c..243baf7 100644 --- a/languageserver/src/context-providers.ts +++ b/languageserver/src/context-providers.ts @@ -1,7 +1,7 @@ -import {DescriptionDictionary} from "@github/actions-expressions"; -import {ContextProviderConfig} from "@github/actions-languageservice"; -import {Mode} from "@github/actions-languageservice/context-providers/default"; -import {WorkflowContext} from "@github/actions-languageservice/context/workflow-context"; +import {DescriptionDictionary} from "@actions/expressions"; +import {ContextProviderConfig} from "@actions/languageservice"; +import {Mode} from "@actions/languageservice/context-providers/default"; +import {WorkflowContext} from "@actions/languageservice/context/workflow-context"; import {Octokit} from "@octokit/rest"; import {getSecrets} from "./context-providers/secrets"; import {getStepsContext} from "./context-providers/steps"; diff --git a/languageserver/src/context-providers/action-outputs.ts b/languageserver/src/context-providers/action-outputs.ts index de5e919..ba6e2e0 100644 --- a/languageserver/src/context-providers/action-outputs.ts +++ b/languageserver/src/context-providers/action-outputs.ts @@ -1,4 +1,4 @@ -import {ActionReference, ActionOutputs} from "@github/actions-languageservice/action"; +import {ActionOutputs, ActionReference} from "@actions/languageservice/action"; import {Octokit} from "@octokit/rest"; import {fetchActionMetadata} from "../utils/action-metadata"; import {TTLCache} from "../utils/cache"; diff --git a/languageserver/src/context-providers/secrets.ts b/languageserver/src/context-providers/secrets.ts index 7c4efb3..6ee5d5b 100644 --- a/languageserver/src/context-providers/secrets.ts +++ b/languageserver/src/context-providers/secrets.ts @@ -1,9 +1,9 @@ -import {data, DescriptionDictionary} from "@github/actions-expressions"; -import {StringData} from "@github/actions-expressions/data/string"; -import {Mode} from "@github/actions-languageservice/context-providers/default"; -import {WorkflowContext} from "@github/actions-languageservice/context/workflow-context"; -import {warn} from "@github/actions-languageservice/log"; -import {isMapping, isString} from "@github/actions-workflow-parser"; +import {data, DescriptionDictionary} from "@actions/expressions"; +import {StringData} from "@actions/expressions/data/string"; +import {Mode} from "@actions/languageservice/context-providers/default"; +import {WorkflowContext} from "@actions/languageservice/context/workflow-context"; +import {warn} from "@actions/languageservice/log"; +import {isMapping, isString} from "@actions/workflow-parser"; import {Octokit} from "@octokit/rest"; import {RepositoryContext} from "../initializationOptions"; diff --git a/languageserver/src/context-providers/steps.test.ts b/languageserver/src/context-providers/steps.test.ts index 019a612..8fda4a8 100644 --- a/languageserver/src/context-providers/steps.test.ts +++ b/languageserver/src/context-providers/steps.test.ts @@ -1,5 +1,5 @@ -import {data, DescriptionDictionary} from "@github/actions-expressions"; -import {getStepsContext as getDefaultStepsContext} from "@github/actions-languageservice/context-providers/steps"; +import {data, DescriptionDictionary} from "@actions/expressions"; +import {getStepsContext as getDefaultStepsContext} from "@actions/languageservice/context-providers/steps"; import {Octokit} from "@octokit/rest"; import fetchMock from "fetch-mock"; diff --git a/languageserver/src/context-providers/steps.ts b/languageserver/src/context-providers/steps.ts index c89aea3..5aa8731 100644 --- a/languageserver/src/context-providers/steps.ts +++ b/languageserver/src/context-providers/steps.ts @@ -1,7 +1,7 @@ -import {data, DescriptionDictionary, isDescriptionDictionary} from "@github/actions-expressions"; -import {parseActionReference} from "@github/actions-languageservice/action"; -import {WorkflowContext} from "@github/actions-languageservice/context/workflow-context"; -import {isActionStep} from "@github/actions-workflow-parser/model/type-guards"; +import {data, DescriptionDictionary, isDescriptionDictionary} from "@actions/expressions"; +import {parseActionReference} from "@actions/languageservice/action"; +import {WorkflowContext} from "@actions/languageservice/context/workflow-context"; +import {isActionStep} from "@actions/workflow-parser/model/type-guards"; import {Octokit} from "@octokit/rest"; import {TTLCache} from "../utils/cache"; import {getActionOutputs} from "./action-outputs"; diff --git a/languageserver/src/context-providers/variables.ts b/languageserver/src/context-providers/variables.ts index 46516e2..92e5d4c 100644 --- a/languageserver/src/context-providers/variables.ts +++ b/languageserver/src/context-providers/variables.ts @@ -1,9 +1,9 @@ -import {data, DescriptionDictionary} from "@github/actions-expressions"; -import {Pair} from "@github/actions-expressions/data/expressiondata"; -import {StringData} from "@github/actions-expressions/data/index"; -import {WorkflowContext} from "@github/actions-languageservice/context/workflow-context"; -import {warn} from "@github/actions-languageservice/log"; -import {isMapping, isString} from "@github/actions-workflow-parser"; +import {data, DescriptionDictionary} from "@actions/expressions"; +import {Pair} from "@actions/expressions/data/expressiondata"; +import {StringData} from "@actions/expressions/data/index"; +import {WorkflowContext} from "@actions/languageservice/context/workflow-context"; +import {warn} from "@actions/languageservice/log"; +import {isMapping, isString} from "@actions/workflow-parser"; import {Octokit} from "@octokit/rest"; import {RepositoryContext} from "../initializationOptions"; diff --git a/languageserver/src/description-provider.ts b/languageserver/src/description-provider.ts index 3a8403a..9364b5d 100644 --- a/languageserver/src/description-provider.ts +++ b/languageserver/src/description-provider.ts @@ -1,8 +1,8 @@ -import {DescriptionProvider} from "@github/actions-languageservice/hover"; +import {DescriptionProvider} from "@actions/languageservice/hover"; import {Octokit} from "@octokit/rest"; +import {getActionDescription} from "./description-providers/action-description"; import {getActionInputDescription} from "./description-providers/action-input"; import {TTLCache} from "./utils/cache"; -import {getActionDescription} from "./description-providers/action-description"; export function descriptionProvider(client: Octokit | undefined, cache: TTLCache): DescriptionProvider { const getDescription: DescriptionProvider["getDescription"] = async (context, token, path) => { diff --git a/languageserver/src/description-providers/action-description.ts b/languageserver/src/description-providers/action-description.ts index cd0866b..97dd17f 100644 --- a/languageserver/src/description-providers/action-description.ts +++ b/languageserver/src/description-providers/action-description.ts @@ -1,6 +1,6 @@ -import {actionUrl, parseActionReference} from "@github/actions-languageservice/action"; -import {isActionStep} from "@github/actions-workflow-parser/model/type-guards"; -import {Step} from "@github/actions-workflow-parser/model/workflow-template"; +import {actionUrl, parseActionReference} from "@actions/languageservice/action"; +import {isActionStep} from "@actions/workflow-parser/model/type-guards"; +import {Step} from "@actions/workflow-parser/model/workflow-template"; import {Octokit} from "@octokit/rest"; import {fetchActionMetadata} from "../utils/action-metadata"; import {TTLCache} from "../utils/cache"; diff --git a/languageserver/src/description-providers/action-input.test.ts b/languageserver/src/description-providers/action-input.test.ts index bedea85..fb75cc2 100644 --- a/languageserver/src/description-providers/action-input.test.ts +++ b/languageserver/src/description-providers/action-input.test.ts @@ -1,11 +1,11 @@ -import {StringToken} from "@github/actions-workflow-parser/templates/tokens/string-token"; +import {StringToken} from "@actions/workflow-parser/templates/tokens/string-token"; import {Octokit} from "@octokit/rest"; import fetchMock from "fetch-mock"; +import {actionsCheckoutMetadata} from "../test-utils/action-metadata"; import {createWorkflowContext} from "../test-utils/workflow-context"; import {TTLCache} from "../utils/cache"; import {getActionInputDescription} from "./action-input"; -import {actionsCheckoutMetadata} from "../test-utils/action-metadata"; const workflow = ` name: Hello World diff --git a/languageserver/src/description-providers/action-input.ts b/languageserver/src/description-providers/action-input.ts index a6b1385..3da1924 100644 --- a/languageserver/src/description-providers/action-input.ts +++ b/languageserver/src/description-providers/action-input.ts @@ -1,8 +1,8 @@ -import {parseActionReference} from "@github/actions-languageservice/action"; -import {isString} from "@github/actions-workflow-parser"; -import {isActionStep} from "@github/actions-workflow-parser/model/type-guards"; -import {Step} from "@github/actions-workflow-parser/model/workflow-template"; -import {TemplateToken} from "@github/actions-workflow-parser/templates/tokens/template-token"; +import {parseActionReference} from "@actions/languageservice/action"; +import {isString} from "@actions/workflow-parser"; +import {isActionStep} from "@actions/workflow-parser/model/type-guards"; +import {Step} from "@actions/workflow-parser/model/workflow-template"; +import {TemplateToken} from "@actions/workflow-parser/templates/tokens/template-token"; import {Octokit} from "@octokit/rest"; import {fetchActionMetadata} from "../utils/action-metadata"; import {TTLCache} from "../utils/cache"; diff --git a/languageserver/src/file-provider.ts b/languageserver/src/file-provider.ts index 398dd3c..cc0ceec 100644 --- a/languageserver/src/file-provider.ts +++ b/languageserver/src/file-provider.ts @@ -1,6 +1,6 @@ -import {File} from "@github/actions-workflow-parser/workflows/file"; -import {FileProvider} from "@github/actions-workflow-parser/workflows/file-provider"; -import {fileIdentifier} from "@github/actions-workflow-parser/workflows/file-reference"; +import {File} from "@actions/workflow-parser/workflows/file"; +import {FileProvider} from "@actions/workflow-parser/workflows/file-provider"; +import {fileIdentifier} from "@actions/workflow-parser/workflows/file-reference"; import {Octokit} from "@octokit/rest"; import path from "path"; import {TTLCache} from "./utils/cache"; diff --git a/languageserver/src/index.test.ts b/languageserver/src/index.test.ts index 8f3c889..7ea5b70 100644 --- a/languageserver/src/index.test.ts +++ b/languageserver/src/index.test.ts @@ -1,4 +1,4 @@ -import {validate} from "@github/actions-languageservice"; +import {validate} from "@actions/languageservice"; import {TextDocument} from "vscode-languageserver-textdocument"; describe("simple test", () => { diff --git a/languageserver/src/initializationOptions.ts b/languageserver/src/initializationOptions.ts index 0052dda..abc1547 100644 --- a/languageserver/src/initializationOptions.ts +++ b/languageserver/src/initializationOptions.ts @@ -1,5 +1,5 @@ -import {LogLevel} from "@github/actions-languageservice/log"; -export {LogLevel} from "@github/actions-languageservice/log"; +import {LogLevel} from "@actions/languageservice/log"; +export {LogLevel} from "@actions/languageservice/log"; export interface InitializationOptions { /** diff --git a/languageserver/src/on-completion.ts b/languageserver/src/on-completion.ts index 2634afa..9b1a1f0 100644 --- a/languageserver/src/on-completion.ts +++ b/languageserver/src/on-completion.ts @@ -1,4 +1,4 @@ -import {complete} from "@github/actions-languageservice/complete"; +import {complete} from "@actions/languageservice/complete"; import {Octokit} from "@octokit/rest"; import {CompletionItem, Connection, Position} from "vscode-languageserver"; import {TextDocument} from "vscode-languageserver-textdocument"; diff --git a/languageserver/src/test-utils/workflow-context.ts b/languageserver/src/test-utils/workflow-context.ts index 4138bb5..8eb1f2d 100644 --- a/languageserver/src/test-utils/workflow-context.ts +++ b/languageserver/src/test-utils/workflow-context.ts @@ -1,6 +1,6 @@ -import {WorkflowContext} from "@github/actions-languageservice/context/workflow-context"; -import {convertWorkflowTemplate, NoOperationTraceWriter, parseWorkflow} from "@github/actions-workflow-parser"; -import {isJob} from "@github/actions-workflow-parser/model/type-guards"; +import {WorkflowContext} from "@actions/languageservice/context/workflow-context"; +import {convertWorkflowTemplate, NoOperationTraceWriter, parseWorkflow} from "@actions/workflow-parser"; +import {isJob} from "@actions/workflow-parser/model/type-guards"; export async function createWorkflowContext( workflow: string, diff --git a/languageserver/src/utils/action-metadata.ts b/languageserver/src/utils/action-metadata.ts index be6cd4d..ee100f6 100644 --- a/languageserver/src/utils/action-metadata.ts +++ b/languageserver/src/utils/action-metadata.ts @@ -1,5 +1,5 @@ -import {ActionReference, ActionMetadata, actionIdentifier} from "@github/actions-languageservice/action"; -import {error} from "@github/actions-languageservice/log"; +import {actionIdentifier, ActionMetadata, ActionReference} from "@actions/languageservice/action"; +import {error} from "@actions/languageservice/log"; import {Octokit, RestEndpointMethodTypes} from "@octokit/rest"; import {parse} from "yaml"; import {TTLCache} from "./cache"; diff --git a/languageserver/src/utils/repo-permission.ts b/languageserver/src/utils/repo-permission.ts index 29ab78f..d236b78 100644 --- a/languageserver/src/utils/repo-permission.ts +++ b/languageserver/src/utils/repo-permission.ts @@ -1,9 +1,9 @@ -import {error} from "@github/actions-languageservice/log"; +import {error} from "@actions/languageservice/log"; import {Octokit} from "@octokit/rest"; import {RepositoryContext} from "../initializationOptions"; import {TTLCache} from "./cache"; -import {getUsername} from "./username"; import {errorStatus} from "./error"; +import {getUsername} from "./username"; export type RepoPermission = "admin" | "write" | "read" | "none"; diff --git a/languageserver/src/utils/timer.ts b/languageserver/src/utils/timer.ts index f9dc71e..78d37dc 100644 --- a/languageserver/src/utils/timer.ts +++ b/languageserver/src/utils/timer.ts @@ -1,4 +1,4 @@ -import {log} from "@github/actions-languageservice/log"; +import {log} from "@actions/languageservice/log"; export async function timeOperation(name: string, f: () => T): Promise { const start = Date.now(); diff --git a/languageserver/src/value-providers.ts b/languageserver/src/value-providers.ts index ca6a26d..5b8d9f9 100644 --- a/languageserver/src/value-providers.ts +++ b/languageserver/src/value-providers.ts @@ -1,6 +1,6 @@ -import {ValueProviderConfig} from "@github/actions-languageservice"; -import {WorkflowContext} from "@github/actions-languageservice/context/workflow-context"; -import {ValueProviderKind} from "@github/actions-languageservice/value-providers/config"; +import {ValueProviderConfig} from "@actions/languageservice"; +import {WorkflowContext} from "@actions/languageservice/context/workflow-context"; +import {ValueProviderKind} from "@actions/languageservice/value-providers/config"; import {Octokit} from "@octokit/rest"; import {RepositoryContext} from "./initializationOptions"; import {TTLCache} from "./utils/cache"; diff --git a/languageserver/src/value-providers/action-inputs.ts b/languageserver/src/value-providers/action-inputs.ts index 11af797..765f41d 100644 --- a/languageserver/src/value-providers/action-inputs.ts +++ b/languageserver/src/value-providers/action-inputs.ts @@ -1,7 +1,7 @@ -import {ActionInputs, ActionReference, parseActionReference} from "@github/actions-languageservice/action"; -import {WorkflowContext} from "@github/actions-languageservice/context/workflow-context"; -import {Value} from "@github/actions-languageservice/value-providers/config"; -import {isActionStep} from "@github/actions-workflow-parser/model/type-guards"; +import {ActionInputs, ActionReference, parseActionReference} from "@actions/languageservice/action"; +import {WorkflowContext} from "@actions/languageservice/context/workflow-context"; +import {Value} from "@actions/languageservice/value-providers/config"; +import {isActionStep} from "@actions/workflow-parser/model/type-guards"; import {Octokit} from "@octokit/rest"; import {fetchActionMetadata} from "../utils/action-metadata"; import {TTLCache} from "../utils/cache"; diff --git a/languageserver/src/value-providers/job-environment.ts b/languageserver/src/value-providers/job-environment.ts index 0bf0bbc..ac8881b 100644 --- a/languageserver/src/value-providers/job-environment.ts +++ b/languageserver/src/value-providers/job-environment.ts @@ -1,4 +1,4 @@ -import {Value} from "@github/actions-languageservice/value-providers/config"; +import {Value} from "@actions/languageservice/value-providers/config"; import {Octokit} from "@octokit/rest"; import {TTLCache} from "../utils/cache"; diff --git a/languageserver/src/value-providers/runs-on.ts b/languageserver/src/value-providers/runs-on.ts index 7f9969e..be5b901 100644 --- a/languageserver/src/value-providers/runs-on.ts +++ b/languageserver/src/value-providers/runs-on.ts @@ -1,6 +1,6 @@ -import {log} from "@github/actions-languageservice/log"; -import {Value} from "@github/actions-languageservice/value-providers/config"; -import {DEFAULT_RUNNER_LABELS} from "@github/actions-languageservice/value-providers/default"; +import {log} from "@actions/languageservice/log"; +import {Value} from "@actions/languageservice/value-providers/config"; +import {DEFAULT_RUNNER_LABELS} from "@actions/languageservice/value-providers/default"; import {Octokit} from "@octokit/rest"; import {TTLCache} from "../utils/cache"; import {errorMessage} from "../utils/error"; diff --git a/languageservice/src/complete.expressions.test.ts b/languageservice/src/complete.expressions.test.ts index f76ce45..b420394 100644 --- a/languageservice/src/complete.expressions.test.ts +++ b/languageservice/src/complete.expressions.test.ts @@ -1,5 +1,5 @@ /* eslint-disable @typescript-eslint/no-non-null-assertion */ -import {data, DescriptionDictionary} from "@github/actions-expressions"; +import {data, DescriptionDictionary} from "@actions/expressions"; import {CompletionItem, CompletionItemKind} from "vscode-languageserver-types"; import {complete, getExpressionInput} from "./complete"; import {ContextProviderConfig} from "./context-providers/config"; diff --git a/languageservice/src/complete.ts b/languageservice/src/complete.ts index 8dd28cb..0bcda95 100644 --- a/languageservice/src/complete.ts +++ b/languageservice/src/complete.ts @@ -1,13 +1,13 @@ -import {complete as completeExpression, DescriptionDictionary} from "@github/actions-expressions"; -import {CompletionItem as ExpressionCompletionItem} from "@github/actions-expressions/completion"; -import {isBasicExpression, isSequence, isString} from "@github/actions-workflow-parser"; -import {ErrorPolicy} from "@github/actions-workflow-parser/model/convert"; -import {OPEN_EXPRESSION} from "@github/actions-workflow-parser/templates/template-constants"; -import {TemplateToken} from "@github/actions-workflow-parser/templates/tokens/index"; -import {MappingToken} from "@github/actions-workflow-parser/templates/tokens/mapping-token"; -import {TokenType} from "@github/actions-workflow-parser/templates/tokens/types"; -import {File} from "@github/actions-workflow-parser/workflows/file"; -import {FileProvider} from "@github/actions-workflow-parser/workflows/file-provider"; +import {complete as completeExpression, DescriptionDictionary} from "@actions/expressions"; +import {CompletionItem as ExpressionCompletionItem} from "@actions/expressions/completion"; +import {isBasicExpression, isSequence, isString} from "@actions/workflow-parser"; +import {ErrorPolicy} from "@actions/workflow-parser/model/convert"; +import {OPEN_EXPRESSION} from "@actions/workflow-parser/templates/template-constants"; +import {TemplateToken} from "@actions/workflow-parser/templates/tokens/index"; +import {MappingToken} from "@actions/workflow-parser/templates/tokens/mapping-token"; +import {TokenType} from "@actions/workflow-parser/templates/tokens/types"; +import {File} from "@actions/workflow-parser/workflows/file"; +import {FileProvider} from "@actions/workflow-parser/workflows/file-provider"; import {Position, TextDocument} from "vscode-languageserver-textdocument"; import {CompletionItem, CompletionItemKind, CompletionItemTag, Range, TextEdit} from "vscode-languageserver-types"; import {ContextProviderConfig} from "./context-providers/config"; @@ -21,10 +21,10 @@ import {guessIndentation} from "./utils/indentation-guesser"; import {mapRange} from "./utils/range"; import {getRelCharOffset} from "./utils/rel-char-pos"; import {isPlaceholder, transform} from "./utils/transform"; +import {fetchOrConvertWorkflowTemplate, fetchOrParseWorkflow} from "./utils/workflow-cache"; import {Value, ValueProviderConfig} from "./value-providers/config"; import {defaultValueProviders} from "./value-providers/default"; import {definitionValues} from "./value-providers/definition"; -import {fetchOrParseWorkflow, fetchOrConvertWorkflowTemplate} from "./utils/workflow-cache"; export function getExpressionInput(input: string, pos: number): string { // Find start marker around the cursor position diff --git a/languageservice/src/context-providers/config.ts b/languageservice/src/context-providers/config.ts index cf35973..5633af7 100644 --- a/languageservice/src/context-providers/config.ts +++ b/languageservice/src/context-providers/config.ts @@ -1,4 +1,4 @@ -import {DescriptionDictionary} from "@github/actions-expressions"; +import {DescriptionDictionary} from "@actions/expressions"; import {WorkflowContext} from "../context/workflow-context"; import {Mode} from "./default"; diff --git a/languageservice/src/context-providers/default.ts b/languageservice/src/context-providers/default.ts index 4322940..7c2ddf3 100644 --- a/languageservice/src/context-providers/default.ts +++ b/languageservice/src/context-providers/default.ts @@ -1,5 +1,5 @@ -import {data, DescriptionDictionary} from "@github/actions-expressions"; -import {Kind} from "@github/actions-expressions/data/expressiondata"; +import {data, DescriptionDictionary} from "@actions/expressions"; +import {Kind} from "@actions/expressions/data/expressiondata"; import {WorkflowContext} from "../context/workflow-context"; import {ContextProviderConfig} from "./config"; import {getDescription, RootContext} from "./descriptions"; diff --git a/languageservice/src/context-providers/env.ts b/languageservice/src/context-providers/env.ts index 5aa22cb..89bae00 100644 --- a/languageservice/src/context-providers/env.ts +++ b/languageservice/src/context-providers/env.ts @@ -1,6 +1,6 @@ -import {data, DescriptionDictionary} from "@github/actions-expressions"; -import {isScalar, isString} from "@github/actions-workflow-parser"; -import {MappingToken} from "@github/actions-workflow-parser/templates/tokens/mapping-token"; +import {data, DescriptionDictionary} from "@actions/expressions"; +import {isScalar, isString} from "@actions/workflow-parser"; +import {MappingToken} from "@actions/workflow-parser/templates/tokens/mapping-token"; import {WorkflowContext} from "../context/workflow-context"; export function getEnvContext(workflowContext: WorkflowContext): DescriptionDictionary { diff --git a/languageservice/src/context-providers/events/eventPayloads.ts b/languageservice/src/context-providers/events/eventPayloads.ts index e0228ea..869067b 100644 --- a/languageservice/src/context-providers/events/eventPayloads.ts +++ b/languageservice/src/context-providers/events/eventPayloads.ts @@ -1,4 +1,4 @@ -import {data, DescriptionDictionary} from "@github/actions-expressions"; +import {data, DescriptionDictionary} from "@actions/expressions"; import webhookObjects from "./objects.json"; import webhooks from "./webhooks.json"; diff --git a/languageservice/src/context-providers/github.test.ts b/languageservice/src/context-providers/github.test.ts index 1d30e10..dd5acf7 100644 --- a/languageservice/src/context-providers/github.test.ts +++ b/languageservice/src/context-providers/github.test.ts @@ -1,4 +1,4 @@ -import {DescriptionDictionary, isDescriptionDictionary} from "@github/actions-expressions/."; +import {DescriptionDictionary, isDescriptionDictionary} from "@actions/expressions/."; import {testGetWorkflowContext} from "../test-utils/test-workflow-context"; import {Mode} from "./default"; import {getGithubContext} from "./github"; diff --git a/languageservice/src/context-providers/github.ts b/languageservice/src/context-providers/github.ts index 05f29d1..a510e2d 100644 --- a/languageservice/src/context-providers/github.ts +++ b/languageservice/src/context-providers/github.ts @@ -1,6 +1,6 @@ -import {data, DescriptionDictionary, isDescriptionDictionary} from "@github/actions-expressions"; -import {ExpressionData} from "@github/actions-expressions/data/expressiondata"; -import {TypesFilterConfig} from "@github/actions-workflow-parser/model/workflow-template"; +import {data, DescriptionDictionary, isDescriptionDictionary} from "@actions/expressions"; +import {ExpressionData} from "@actions/expressions/data/expressiondata"; +import {TypesFilterConfig} from "@actions/workflow-parser/model/workflow-template"; import {WorkflowContext} from "../context/workflow-context"; import {Mode} from "./default"; import {getDescription} from "./descriptions"; diff --git a/languageservice/src/context-providers/inputs.ts b/languageservice/src/context-providers/inputs.ts index 696ca3a..1a71a7d 100644 --- a/languageservice/src/context-providers/inputs.ts +++ b/languageservice/src/context-providers/inputs.ts @@ -1,5 +1,5 @@ -import {data, DescriptionDictionary} from "@github/actions-expressions"; -import {InputConfig} from "@github/actions-workflow-parser/model/workflow-template"; +import {data, DescriptionDictionary} from "@actions/expressions"; +import {InputConfig} from "@actions/workflow-parser/model/workflow-template"; import {WorkflowContext} from "../context/workflow-context"; export function getInputsContext(workflowContext: WorkflowContext): DescriptionDictionary { diff --git a/languageservice/src/context-providers/job.ts b/languageservice/src/context-providers/job.ts index 6c37ab6..b67338a 100644 --- a/languageservice/src/context-providers/job.ts +++ b/languageservice/src/context-providers/job.ts @@ -1,6 +1,6 @@ -import {data, DescriptionDictionary} from "@github/actions-expressions"; -import {isMapping, isSequence} from "@github/actions-workflow-parser"; -import {MappingToken} from "@github/actions-workflow-parser/templates/tokens/mapping-token"; +import {data, DescriptionDictionary} from "@actions/expressions"; +import {isMapping, isSequence} from "@actions/workflow-parser"; +import {MappingToken} from "@actions/workflow-parser/templates/tokens/mapping-token"; import {WorkflowContext} from "../context/workflow-context"; export function getJobContext(workflowContext: WorkflowContext): DescriptionDictionary { diff --git a/languageservice/src/context-providers/jobs.ts b/languageservice/src/context-providers/jobs.ts index 4e8c925..d8ad956 100644 --- a/languageservice/src/context-providers/jobs.ts +++ b/languageservice/src/context-providers/jobs.ts @@ -1,6 +1,6 @@ -import {data, DescriptionDictionary} from "@github/actions-expressions"; -import {StringData} from "@github/actions-expressions/data/string"; -import {MappingToken} from "@github/actions-workflow-parser/templates/tokens/mapping-token"; +import {data, DescriptionDictionary} from "@actions/expressions"; +import {StringData} from "@actions/expressions/data/string"; +import {MappingToken} from "@actions/workflow-parser/templates/tokens/mapping-token"; import {WorkflowContext} from "../context/workflow-context"; import {getDescription} from "./descriptions"; diff --git a/languageservice/src/context-providers/matrix.test.ts b/languageservice/src/context-providers/matrix.test.ts index 6d90bcd..7c5507d 100644 --- a/languageservice/src/context-providers/matrix.test.ts +++ b/languageservice/src/context-providers/matrix.test.ts @@ -1,11 +1,11 @@ /* eslint-disable @typescript-eslint/no-non-null-assertion */ -import {data, DescriptionDictionary} from "@github/actions-expressions"; -import {Job} from "@github/actions-workflow-parser/model/workflow-template"; -import {BasicExpressionToken} from "@github/actions-workflow-parser/templates/tokens/basic-expression-token"; -import {MappingToken} from "@github/actions-workflow-parser/templates/tokens/mapping-token"; -import {SequenceToken} from "@github/actions-workflow-parser/templates/tokens/sequence-token"; -import {StringToken} from "@github/actions-workflow-parser/templates/tokens/string-token"; -import {TemplateToken} from "@github/actions-workflow-parser/templates/tokens/template-token"; +import {data, DescriptionDictionary} from "@actions/expressions"; +import {Job} from "@actions/workflow-parser/model/workflow-template"; +import {BasicExpressionToken} from "@actions/workflow-parser/templates/tokens/basic-expression-token"; +import {MappingToken} from "@actions/workflow-parser/templates/tokens/mapping-token"; +import {SequenceToken} from "@actions/workflow-parser/templates/tokens/sequence-token"; +import {StringToken} from "@actions/workflow-parser/templates/tokens/string-token"; +import {TemplateToken} from "@actions/workflow-parser/templates/tokens/template-token"; import {WorkflowContext} from "../context/workflow-context"; import {Mode} from "./default"; import {getMatrixContext} from "./matrix"; diff --git a/languageservice/src/context-providers/matrix.ts b/languageservice/src/context-providers/matrix.ts index 6163c31..41c78cf 100644 --- a/languageservice/src/context-providers/matrix.ts +++ b/languageservice/src/context-providers/matrix.ts @@ -1,8 +1,8 @@ -import {data, DescriptionDictionary} from "@github/actions-expressions"; -import {isBasicExpression, isMapping, isSequence, isString} from "@github/actions-workflow-parser"; -import {KeyValuePair} from "@github/actions-workflow-parser/templates/tokens/key-value-pair"; -import {MappingToken} from "@github/actions-workflow-parser/templates/tokens/mapping-token"; -import {SequenceToken} from "@github/actions-workflow-parser/templates/tokens/sequence-token"; +import {data, DescriptionDictionary} from "@actions/expressions"; +import {isBasicExpression, isMapping, isSequence, isString} from "@actions/workflow-parser"; +import {KeyValuePair} from "@actions/workflow-parser/templates/tokens/key-value-pair"; +import {MappingToken} from "@actions/workflow-parser/templates/tokens/mapping-token"; +import {SequenceToken} from "@actions/workflow-parser/templates/tokens/sequence-token"; import {WorkflowContext} from "../context/workflow-context"; import {ContextValue, Mode} from "./default"; diff --git a/languageservice/src/context-providers/needs.test.ts b/languageservice/src/context-providers/needs.test.ts index a50fc30..88baecf 100644 --- a/languageservice/src/context-providers/needs.test.ts +++ b/languageservice/src/context-providers/needs.test.ts @@ -1,5 +1,5 @@ -import {DescriptionDictionary} from "@github/actions-expressions"; -import {StringData} from "@github/actions-expressions/data/string"; +import {DescriptionDictionary} from "@actions/expressions"; +import {StringData} from "@actions/expressions/data/string"; import {WorkflowContext} from "../context/workflow-context"; import {testGetWorkflowContext} from "../test-utils/test-workflow-context"; import {getNeedsContext} from "./needs"; diff --git a/languageservice/src/context-providers/needs.ts b/languageservice/src/context-providers/needs.ts index d1baa25..9502663 100644 --- a/languageservice/src/context-providers/needs.ts +++ b/languageservice/src/context-providers/needs.ts @@ -1,8 +1,8 @@ -import {data, DescriptionDictionary} from "@github/actions-expressions"; -import {isMapping, isScalar, isString} from "@github/actions-workflow-parser"; -import {isJob} from "@github/actions-workflow-parser/model/type-guards"; -import {WorkflowJob} from "@github/actions-workflow-parser/model/workflow-template"; -import {TemplateToken} from "@github/actions-workflow-parser/templates/tokens/template-token"; +import {data, DescriptionDictionary} from "@actions/expressions"; +import {isMapping, isScalar, isString} from "@actions/workflow-parser"; +import {isJob} from "@actions/workflow-parser/model/type-guards"; +import {WorkflowJob} from "@actions/workflow-parser/model/workflow-template"; +import {TemplateToken} from "@actions/workflow-parser/templates/tokens/template-token"; import {WorkflowContext} from "../context/workflow-context"; export function getNeedsContext(workflowContext: WorkflowContext): DescriptionDictionary { diff --git a/languageservice/src/context-providers/secrets.ts b/languageservice/src/context-providers/secrets.ts index 7f935b6..b0eae11 100644 --- a/languageservice/src/context-providers/secrets.ts +++ b/languageservice/src/context-providers/secrets.ts @@ -1,5 +1,5 @@ -import {data, DescriptionDictionary} from "@github/actions-expressions"; -import {StringData} from "@github/actions-expressions/data/string"; +import {data, DescriptionDictionary} from "@actions/expressions"; +import {StringData} from "@actions/expressions/data/string"; import {WorkflowContext} from "../context/workflow-context"; import {Mode} from "./default"; import {getDescription} from "./descriptions"; diff --git a/languageservice/src/context-providers/steps.ts b/languageservice/src/context-providers/steps.ts index b07b18e..7f3c657 100644 --- a/languageservice/src/context-providers/steps.ts +++ b/languageservice/src/context-providers/steps.ts @@ -1,5 +1,5 @@ -import {data, DescriptionDictionary} from "@github/actions-expressions"; -import {Step} from "@github/actions-workflow-parser/model/workflow-template"; +import {data, DescriptionDictionary} from "@actions/expressions"; +import {Step} from "@actions/workflow-parser/model/workflow-template"; import {WorkflowContext} from "../context/workflow-context"; import {getDescription} from "./descriptions"; diff --git a/languageservice/src/context-providers/strategy.ts b/languageservice/src/context-providers/strategy.ts index d60b4a2..aa59936 100644 --- a/languageservice/src/context-providers/strategy.ts +++ b/languageservice/src/context-providers/strategy.ts @@ -1,5 +1,5 @@ -import {data, DescriptionDictionary} from "@github/actions-expressions"; -import {isMapping, isScalar, isString} from "@github/actions-workflow-parser"; +import {data, DescriptionDictionary} from "@actions/expressions"; +import {isMapping, isScalar, isString} from "@actions/workflow-parser"; import {WorkflowContext} from "../context/workflow-context"; import {scalarToData} from "../utils/scalar-to-data"; diff --git a/languageservice/src/context/workflow-context.test.ts b/languageservice/src/context/workflow-context.test.ts index 6e99cdd..ad7234f 100644 --- a/languageservice/src/context/workflow-context.test.ts +++ b/languageservice/src/context/workflow-context.test.ts @@ -1,4 +1,4 @@ -import {ActionStep, RunStep} from "@github/actions-workflow-parser/model/workflow-template"; +import {ActionStep, RunStep} from "@actions/workflow-parser/model/workflow-template"; import {testGetWorkflowContext} from "../test-utils/test-workflow-context"; describe("getWorkflowContext", () => { diff --git a/languageservice/src/context/workflow-context.ts b/languageservice/src/context/workflow-context.ts index c4c20af..8a48a47 100644 --- a/languageservice/src/context/workflow-context.ts +++ b/languageservice/src/context/workflow-context.ts @@ -1,10 +1,10 @@ -import {isMapping, isSequence, WorkflowTemplate} from "@github/actions-workflow-parser"; -import {isJob, isReusableWorkflowJob} from "@github/actions-workflow-parser/model/type-guards"; -import {Step, Job, ReusableWorkflowJob} from "@github/actions-workflow-parser/model/workflow-template"; -import {MappingToken} from "@github/actions-workflow-parser/templates/tokens/mapping-token"; -import {SequenceToken} from "@github/actions-workflow-parser/templates/tokens/sequence-token"; -import {StringToken} from "@github/actions-workflow-parser/templates/tokens/string-token"; -import {TemplateToken} from "@github/actions-workflow-parser/templates/tokens/template-token"; +import {isMapping, isSequence, WorkflowTemplate} from "@actions/workflow-parser"; +import {isJob, isReusableWorkflowJob} from "@actions/workflow-parser/model/type-guards"; +import {Job, ReusableWorkflowJob, Step} from "@actions/workflow-parser/model/workflow-template"; +import {MappingToken} from "@actions/workflow-parser/templates/tokens/mapping-token"; +import {SequenceToken} from "@actions/workflow-parser/templates/tokens/sequence-token"; +import {StringToken} from "@actions/workflow-parser/templates/tokens/string-token"; +import {TemplateToken} from "@actions/workflow-parser/templates/tokens/template-token"; export interface WorkflowContext { uri: string; diff --git a/languageservice/src/description-providers/reusable-job-inputs.ts b/languageservice/src/description-providers/reusable-job-inputs.ts index 96ac651..914e6fd 100644 --- a/languageservice/src/description-providers/reusable-job-inputs.ts +++ b/languageservice/src/description-providers/reusable-job-inputs.ts @@ -1,5 +1,5 @@ -import {isMapping, isString} from "@github/actions-workflow-parser"; -import {DESCRIPTION} from "@github/actions-workflow-parser/templates/template-constants"; +import {isMapping, isString} from "@actions/workflow-parser"; +import {DESCRIPTION} from "@actions/workflow-parser/templates/template-constants"; import {WorkflowContext} from "../context/workflow-context"; import {TokenResult} from "../utils/find-token"; diff --git a/languageservice/src/document-links.ts b/languageservice/src/document-links.ts index 5c335e0..ba995c6 100644 --- a/languageservice/src/document-links.ts +++ b/languageservice/src/document-links.ts @@ -1,7 +1,7 @@ -import {ErrorPolicy} from "@github/actions-workflow-parser/model/convert"; -import {isJob, isReusableWorkflowJob} from "@github/actions-workflow-parser/model/type-guards"; -import {File} from "@github/actions-workflow-parser/workflows/file"; -import {parseFileReference} from "@github/actions-workflow-parser/workflows/file-reference"; +import {ErrorPolicy} from "@actions/workflow-parser/model/convert"; +import {isJob, isReusableWorkflowJob} from "@actions/workflow-parser/model/type-guards"; +import {File} from "@actions/workflow-parser/workflows/file"; +import {parseFileReference} from "@actions/workflow-parser/workflows/file-reference"; import {TextDocument} from "vscode-languageserver-textdocument"; import {DocumentLink} from "vscode-languageserver-types"; import vscodeURI from "vscode-uri/lib/umd"; // work around issues with the vscode-uri package diff --git a/languageservice/src/expression-hover/expression-pos.test.ts b/languageservice/src/expression-hover/expression-pos.test.ts index 1b9f175..9bcc6b7 100644 --- a/languageservice/src/expression-hover/expression-pos.test.ts +++ b/languageservice/src/expression-hover/expression-pos.test.ts @@ -1,5 +1,5 @@ -import {parseWorkflow} from "@github/actions-workflow-parser"; -import {File} from "@github/actions-workflow-parser/workflows/file"; +import {parseWorkflow} from "@actions/workflow-parser"; +import {File} from "@actions/workflow-parser/workflows/file"; import {nullTrace} from "../nulltrace"; import {getPositionFromCursor} from "../test-utils/cursor-position"; import {findToken} from "../utils/find-token"; diff --git a/languageservice/src/expression-hover/expression-pos.ts b/languageservice/src/expression-hover/expression-pos.ts index 2cb7c91..2cde489 100644 --- a/languageservice/src/expression-hover/expression-pos.ts +++ b/languageservice/src/expression-hover/expression-pos.ts @@ -1,6 +1,6 @@ -import {Pos} from "@github/actions-expressions/lexer"; -import {TemplateToken} from "@github/actions-workflow-parser/templates/tokens/template-token"; -import {isBasicExpression} from "@github/actions-workflow-parser/templates/tokens/type-guards"; +import {Pos} from "@actions/expressions/lexer"; +import {TemplateToken} from "@actions/workflow-parser/templates/tokens/template-token"; +import {isBasicExpression} from "@actions/workflow-parser/templates/tokens/type-guards"; import {Position, Range as LSPRange} from "vscode-languageserver-textdocument"; import {mapRange} from "../utils/range"; import {posWithinRange} from "./pos-range"; diff --git a/languageservice/src/expression-hover/pos-range.ts b/languageservice/src/expression-hover/pos-range.ts index c40728d..3e9d106 100644 --- a/languageservice/src/expression-hover/pos-range.ts +++ b/languageservice/src/expression-hover/pos-range.ts @@ -1,4 +1,4 @@ -import {Pos, Range} from "@github/actions-expressions/lexer"; +import {Pos, Range} from "@actions/expressions/lexer"; export function posWithinRange(pos: Pos, range: Range): boolean { return ( diff --git a/languageservice/src/expression-hover/visitor.test.ts b/languageservice/src/expression-hover/visitor.test.ts index d22d948..1c8a090 100644 --- a/languageservice/src/expression-hover/visitor.test.ts +++ b/languageservice/src/expression-hover/visitor.test.ts @@ -1,7 +1,7 @@ -import {data, DescriptionDictionary, Lexer, Parser} from "@github/actions-expressions"; -import {convertWorkflowTemplate, parseWorkflow} from "@github/actions-workflow-parser"; -import {ErrorPolicy} from "@github/actions-workflow-parser/model/convert"; -import {File} from "@github/actions-workflow-parser/workflows/file"; +import {data, DescriptionDictionary, Lexer, Parser} from "@actions/expressions"; +import {convertWorkflowTemplate, parseWorkflow} from "@actions/workflow-parser"; +import {ErrorPolicy} from "@actions/workflow-parser/model/convert"; +import {File} from "@actions/workflow-parser/workflows/file"; import {ContextProviderConfig} from "../context-providers/config"; import {getContext, Mode} from "../context-providers/default"; import {getWorkflowContext} from "../context/workflow-context"; diff --git a/languageservice/src/expression-hover/visitor.ts b/languageservice/src/expression-hover/visitor.ts index 888a91c..a2459ca 100644 --- a/languageservice/src/expression-hover/visitor.ts +++ b/languageservice/src/expression-hover/visitor.ts @@ -1,9 +1,4 @@ -import { - DescriptionDictionary, - Evaluator, - isDescriptionDictionary, - wellKnownFunctions -} from "@github/actions-expressions"; +import {DescriptionDictionary, Evaluator, isDescriptionDictionary, wellKnownFunctions} from "@actions/expressions"; import { Binary, ContextAccess, @@ -15,9 +10,9 @@ import { Literal, Logical, Unary -} from "@github/actions-expressions/ast"; -import {FunctionDefinition} from "@github/actions-expressions/funcs/info"; -import {Pos, Range} from "@github/actions-expressions/lexer"; +} from "@actions/expressions/ast"; +import {FunctionDefinition} from "@actions/expressions/funcs/info"; +import {Pos, Range} from "@actions/expressions/lexer"; import {posWithinRange} from "./pos-range"; export type HoverResult = diff --git a/languageservice/src/expression-validation/error-dictionary.ts b/languageservice/src/expression-validation/error-dictionary.ts index e8f1111..d19a4d0 100644 --- a/languageservice/src/expression-validation/error-dictionary.ts +++ b/languageservice/src/expression-validation/error-dictionary.ts @@ -1,6 +1,6 @@ -import {data, isDescriptionDictionary} from "@github/actions-expressions"; -import {isDictionary} from "@github/actions-expressions/data/dictionary"; -import {ExpressionData, Pair} from "@github/actions-expressions/data/expressiondata"; +import {data, isDescriptionDictionary} from "@actions/expressions"; +import {isDictionary} from "@actions/expressions/data/dictionary"; +import {ExpressionData, Pair} from "@actions/expressions/data/expressiondata"; export class AccessError extends Error { constructor(message: string, public readonly keyName: string) { diff --git a/languageservice/src/expression-validation/functions.ts b/languageservice/src/expression-validation/functions.ts index 939cfa6..4b06f27 100644 --- a/languageservice/src/expression-validation/functions.ts +++ b/languageservice/src/expression-validation/functions.ts @@ -1,4 +1,4 @@ -import {data, wellKnownFunctions} from "@github/actions-expressions"; +import {data, wellKnownFunctions} from "@actions/expressions"; // Custom implementations for standard actions-expression functions used during validation and auto-completion. // For example, for fromJson we'll most likely not have a valid input. In order to not throw, we'll always diff --git a/languageservice/src/hover.expressions.test.ts b/languageservice/src/hover.expressions.test.ts index 2dfee56..e99c4c0 100644 --- a/languageservice/src/hover.expressions.test.ts +++ b/languageservice/src/hover.expressions.test.ts @@ -1,5 +1,5 @@ -import {data, DescriptionDictionary} from "@github/actions-expressions"; -import {format} from "@github/actions-expressions/funcs/format"; +import {data, DescriptionDictionary} from "@actions/expressions"; +import {format} from "@actions/expressions/funcs/format"; import {Hover} from "vscode-languageserver-types"; import {ContextProviderConfig} from "./context-providers/config"; import {hover} from "./hover"; diff --git a/languageservice/src/hover.test.ts b/languageservice/src/hover.test.ts index 9d48303..0ac2047 100644 --- a/languageservice/src/hover.test.ts +++ b/languageservice/src/hover.test.ts @@ -1,4 +1,4 @@ -import {isString} from "@github/actions-workflow-parser"; +import {isString} from "@actions/workflow-parser"; import {DescriptionProvider, hover, HoverConfig} from "./hover"; import {getPositionFromCursor} from "./test-utils/cursor-position"; import {testFileProvider} from "./test-utils/test-file-provider"; diff --git a/languageservice/src/hover.ts b/languageservice/src/hover.ts index 138a7d4..4ab8ed6 100644 --- a/languageservice/src/hover.ts +++ b/languageservice/src/hover.ts @@ -1,14 +1,14 @@ -import {data, DescriptionDictionary, Parser} from "@github/actions-expressions"; -import {FunctionDefinition, FunctionInfo} from "@github/actions-expressions/funcs/info"; -import {Lexer} from "@github/actions-expressions/lexer"; -import {ErrorPolicy} from "@github/actions-workflow-parser/model/convert"; -import {getCronDescription} from "@github/actions-workflow-parser/model/converter/cron"; -import {splitAllowedContext} from "@github/actions-workflow-parser/templates/allowed-context"; -import {StringToken} from "@github/actions-workflow-parser/templates/tokens/string-token"; -import {TemplateToken} from "@github/actions-workflow-parser/templates/tokens/template-token"; -import {isBasicExpression, isString} from "@github/actions-workflow-parser/templates/tokens/type-guards"; -import {File} from "@github/actions-workflow-parser/workflows/file"; -import {FileProvider} from "@github/actions-workflow-parser/workflows/file-provider"; +import {data, DescriptionDictionary, Parser} from "@actions/expressions"; +import {FunctionDefinition, FunctionInfo} from "@actions/expressions/funcs/info"; +import {Lexer} from "@actions/expressions/lexer"; +import {ErrorPolicy} from "@actions/workflow-parser/model/convert"; +import {getCronDescription} from "@actions/workflow-parser/model/converter/cron"; +import {splitAllowedContext} from "@actions/workflow-parser/templates/allowed-context"; +import {StringToken} from "@actions/workflow-parser/templates/tokens/string-token"; +import {TemplateToken} from "@actions/workflow-parser/templates/tokens/template-token"; +import {isBasicExpression, isString} from "@actions/workflow-parser/templates/tokens/type-guards"; +import {File} from "@actions/workflow-parser/workflows/file"; +import {FileProvider} from "@actions/workflow-parser/workflows/file-provider"; import {Position, TextDocument} from "vscode-languageserver-textdocument"; import {Hover} from "vscode-languageserver-types"; import {ContextProviderConfig} from "./context-providers/config"; @@ -16,17 +16,16 @@ import {getContext, Mode} from "./context-providers/default"; import {getFunctionDescription} from "./context-providers/descriptions"; import {getWorkflowContext, WorkflowContext} from "./context/workflow-context"; import { - isReusableWorkflowJobInput, - getReusableWorkflowInputDescription + getReusableWorkflowInputDescription, + isReusableWorkflowJobInput } from "./description-providers/reusable-job-inputs"; import {ExpressionPos, mapToExpressionPos} from "./expression-hover/expression-pos"; import {HoverVisitor} from "./expression-hover/visitor"; -import {validatorFunctions} from "./expression-validation/functions"; import {info} from "./log"; import {isPotentiallyExpression} from "./utils/expression-detection"; import {findToken, TokenResult} from "./utils/find-token"; import {mapRange} from "./utils/range"; -import {fetchOrParseWorkflow, fetchOrConvertWorkflowTemplate} from "./utils/workflow-cache"; +import {fetchOrConvertWorkflowTemplate, fetchOrParseWorkflow} from "./utils/workflow-cache"; export type HoverConfig = { descriptionProvider?: DescriptionProvider; diff --git a/languageservice/src/nulltrace.ts b/languageservice/src/nulltrace.ts index 8955a1a..5b207bc 100644 --- a/languageservice/src/nulltrace.ts +++ b/languageservice/src/nulltrace.ts @@ -1,3 +1,3 @@ -import {NoOperationTraceWriter} from "@github/actions-workflow-parser/templates/trace-writer"; +import {NoOperationTraceWriter} from "@actions/workflow-parser/templates/trace-writer"; export const nullTrace = new NoOperationTraceWriter(); diff --git a/languageservice/src/test-utils/test-file-provider.ts b/languageservice/src/test-utils/test-file-provider.ts index e6a465b..966d9f7 100644 --- a/languageservice/src/test-utils/test-file-provider.ts +++ b/languageservice/src/test-utils/test-file-provider.ts @@ -1,5 +1,5 @@ -import {FileProvider} from "@github/actions-workflow-parser/workflows/file-provider"; -import {fileIdentifier} from "@github/actions-workflow-parser/workflows/file-reference"; +import {FileProvider} from "@actions/workflow-parser/workflows/file-provider"; +import {fileIdentifier} from "@actions/workflow-parser/workflows/file-reference"; export const testFileProvider: FileProvider = { // eslint-disable-next-line @typescript-eslint/require-await diff --git a/languageservice/src/test-utils/test-workflow-context.ts b/languageservice/src/test-utils/test-workflow-context.ts index 86624d1..5d00725 100644 --- a/languageservice/src/test-utils/test-workflow-context.ts +++ b/languageservice/src/test-utils/test-workflow-context.ts @@ -1,4 +1,4 @@ -import {convertWorkflowTemplate, parseWorkflow, WorkflowTemplate} from "@github/actions-workflow-parser"; +import {convertWorkflowTemplate, parseWorkflow, WorkflowTemplate} from "@actions/workflow-parser"; import {getWorkflowContext, WorkflowContext} from "../context/workflow-context"; import {nullTrace} from "../nulltrace"; import {findToken} from "../utils/find-token"; diff --git a/languageservice/src/utils/expression-detection.ts b/languageservice/src/utils/expression-detection.ts index 4406c78..9b66ce4 100644 --- a/languageservice/src/utils/expression-detection.ts +++ b/languageservice/src/utils/expression-detection.ts @@ -1,8 +1,8 @@ -import {isString} from "@github/actions-workflow-parser"; -import {DefinitionType} from "@github/actions-workflow-parser/templates/schema/definition-type"; -import {StringDefinition} from "@github/actions-workflow-parser/templates/schema/string-definition"; -import {OPEN_EXPRESSION} from "@github/actions-workflow-parser/templates/template-constants"; -import {TemplateToken} from "@github/actions-workflow-parser/templates/tokens/index"; +import {isString} from "@actions/workflow-parser"; +import {DefinitionType} from "@actions/workflow-parser/templates/schema/definition-type"; +import {StringDefinition} from "@actions/workflow-parser/templates/schema/string-definition"; +import {OPEN_EXPRESSION} from "@actions/workflow-parser/templates/template-constants"; +import {TemplateToken} from "@actions/workflow-parser/templates/tokens/index"; export function isPotentiallyExpression(token: TemplateToken): boolean { const isAlwaysExpression = diff --git a/languageservice/src/utils/find-token.test.ts b/languageservice/src/utils/find-token.test.ts index 4771c00..ff792b1 100644 --- a/languageservice/src/utils/find-token.test.ts +++ b/languageservice/src/utils/find-token.test.ts @@ -1,6 +1,6 @@ -import {isScalar, parseWorkflow} from "@github/actions-workflow-parser"; -import {TemplateToken} from "@github/actions-workflow-parser/templates/tokens/template-token"; -import {TokenType} from "@github/actions-workflow-parser/templates/tokens/types"; +import {isScalar, parseWorkflow} from "@actions/workflow-parser"; +import {TemplateToken} from "@actions/workflow-parser/templates/tokens/template-token"; +import {TokenType} from "@actions/workflow-parser/templates/tokens/types"; import {nullTrace} from "../nulltrace"; import {getPositionFromCursor} from "../test-utils/cursor-position"; import {findToken} from "./find-token"; diff --git a/languageservice/src/utils/find-token.ts b/languageservice/src/utils/find-token.ts index 3ce33ea..974d8a5 100644 --- a/languageservice/src/utils/find-token.ts +++ b/languageservice/src/utils/find-token.ts @@ -1,8 +1,8 @@ -import {isString} from "@github/actions-workflow-parser"; -import {TemplateToken} from "@github/actions-workflow-parser/templates/tokens/index"; -import {MappingToken} from "@github/actions-workflow-parser/templates/tokens/mapping-token"; -import {SequenceToken} from "@github/actions-workflow-parser/templates/tokens/sequence-token"; -import {TokenType} from "@github/actions-workflow-parser/templates/tokens/types"; +import {isString} from "@actions/workflow-parser"; +import {TemplateToken} from "@actions/workflow-parser/templates/tokens/index"; +import {MappingToken} from "@actions/workflow-parser/templates/tokens/mapping-token"; +import {SequenceToken} from "@actions/workflow-parser/templates/tokens/sequence-token"; +import {TokenType} from "@actions/workflow-parser/templates/tokens/types"; import {Position} from "vscode-languageserver-textdocument"; export function findInnerToken(pos: Position, root?: TemplateToken) { diff --git a/languageservice/src/utils/range.ts b/languageservice/src/utils/range.ts index bba22cc..9f4a203 100644 --- a/languageservice/src/utils/range.ts +++ b/languageservice/src/utils/range.ts @@ -1,4 +1,4 @@ -import {Position as TokenPosition, TokenRange} from "@github/actions-workflow-parser/templates/tokens/token-range"; +import {Position as TokenPosition, TokenRange} from "@actions/workflow-parser/templates/tokens/token-range"; import {Position, Range} from "vscode-languageserver-types"; export function mapRange(range: TokenRange | undefined): Range { diff --git a/languageservice/src/utils/rel-char-pos.ts b/languageservice/src/utils/rel-char-pos.ts index 3ffa100..03537cf 100644 --- a/languageservice/src/utils/rel-char-pos.ts +++ b/languageservice/src/utils/rel-char-pos.ts @@ -1,4 +1,4 @@ -import {TokenRange} from "@github/actions-workflow-parser/templates/tokens/token-range"; +import {TokenRange} from "@actions/workflow-parser/templates/tokens/token-range"; import {Position} from "vscode-languageserver-textdocument"; import {mapRange} from "./range"; diff --git a/languageservice/src/utils/scalar-to-data.ts b/languageservice/src/utils/scalar-to-data.ts index 7de29bc..5338284 100644 --- a/languageservice/src/utils/scalar-to-data.ts +++ b/languageservice/src/utils/scalar-to-data.ts @@ -1,7 +1,7 @@ -import {data} from "@github/actions-expressions"; -import {isBoolean, isNumber, isString} from "@github/actions-workflow-parser"; -import {ScalarToken} from "@github/actions-workflow-parser/templates/tokens/scalar-token"; -import {TokenType} from "@github/actions-workflow-parser/templates/tokens/types"; +import {data} from "@actions/expressions"; +import {isBoolean, isNumber, isString} from "@actions/workflow-parser"; +import {ScalarToken} from "@actions/workflow-parser/templates/tokens/scalar-token"; +import {TokenType} from "@actions/workflow-parser/templates/tokens/types"; export function scalarToData(scalar: ScalarToken): data.ExpressionData { if (isNumber(scalar)) { diff --git a/languageservice/src/utils/transform.ts b/languageservice/src/utils/transform.ts index d3e2a78..c1a3a19 100644 --- a/languageservice/src/utils/transform.ts +++ b/languageservice/src/utils/transform.ts @@ -1,6 +1,6 @@ -import {isString} from "@github/actions-workflow-parser"; -import {StringToken} from "@github/actions-workflow-parser/templates/tokens/string-token"; -import {TemplateToken} from "@github/actions-workflow-parser/templates/tokens/template-token"; +import {isString} from "@actions/workflow-parser"; +import {StringToken} from "@actions/workflow-parser/templates/tokens/string-token"; +import {TemplateToken} from "@actions/workflow-parser/templates/tokens/template-token"; import {Position, TextDocument} from "vscode-languageserver-textdocument"; import {Range} from "vscode-languageserver-types"; diff --git a/languageservice/src/utils/workflow-cache.ts b/languageservice/src/utils/workflow-cache.ts index 5ac8833..d69ed51 100644 --- a/languageservice/src/utils/workflow-cache.ts +++ b/languageservice/src/utils/workflow-cache.ts @@ -1,16 +1,11 @@ -import { - convertWorkflowTemplate, - parseWorkflow, - ParseWorkflowResult, - WorkflowTemplate -} from "@github/actions-workflow-parser"; -import {File} from "@github/actions-workflow-parser/workflows/file"; -import {WorkflowTemplateConverterOptions} from "@github/actions-workflow-parser/model/convert"; -import {TemplateContext} from "@github/actions-workflow-parser/templates/template-context"; -import {TemplateToken} from "@github/actions-workflow-parser/templates/tokens/template-token"; +import {convertWorkflowTemplate, parseWorkflow, ParseWorkflowResult, WorkflowTemplate} from "@actions/workflow-parser"; +import {WorkflowTemplateConverterOptions} from "@actions/workflow-parser/model/convert"; +import {TemplateContext} from "@actions/workflow-parser/templates/template-context"; +import {TemplateToken} from "@actions/workflow-parser/templates/tokens/template-token"; +import {File} from "@actions/workflow-parser/workflows/file"; -import {nullTrace} from "../nulltrace"; import {CompletionConfig} from "../complete"; +import {nullTrace} from "../nulltrace"; const parsedWorkflowCache = new Map(); const workflowTemplateCache = new Map(); diff --git a/languageservice/src/validate-action.ts b/languageservice/src/validate-action.ts index 7e499e4..04533e7 100644 --- a/languageservice/src/validate-action.ts +++ b/languageservice/src/validate-action.ts @@ -1,8 +1,8 @@ -import {isMapping} from "@github/actions-workflow-parser"; -import {isActionStep} from "@github/actions-workflow-parser/model/type-guards"; -import {Step} from "@github/actions-workflow-parser/model/workflow-template"; -import {ScalarToken} from "@github/actions-workflow-parser/templates/tokens/scalar-token"; -import {TemplateToken} from "@github/actions-workflow-parser/templates/tokens/template-token"; +import {isMapping} from "@actions/workflow-parser"; +import {isActionStep} from "@actions/workflow-parser/model/type-guards"; +import {Step} from "@actions/workflow-parser/model/workflow-template"; +import {ScalarToken} from "@actions/workflow-parser/templates/tokens/scalar-token"; +import {TemplateToken} from "@actions/workflow-parser/templates/tokens/template-token"; import {Diagnostic, DiagnosticSeverity} from "vscode-languageserver-types"; import {parseActionReference} from "./action"; import {mapRange} from "./utils/range"; diff --git a/languageservice/src/validate.expressions.test.ts b/languageservice/src/validate.expressions.test.ts index 95a1c6d..2704d75 100644 --- a/languageservice/src/validate.expressions.test.ts +++ b/languageservice/src/validate.expressions.test.ts @@ -1,11 +1,11 @@ -import {DescriptionDictionary} from "@github/actions-expressions/."; +import {DescriptionDictionary} from "@actions/expressions/."; import {DiagnosticSeverity} from "vscode-languageserver-types"; import {ContextProviderConfig} from "./context-providers/config"; import {registerLogger} from "./log"; import {createDocument} from "./test-utils/document"; import {TestLogger} from "./test-utils/logger"; -import {validate, ValidationConfig} from "./validate"; import {clearCache} from "./utils/workflow-cache"; +import {validate, ValidationConfig} from "./validate"; registerLogger(new TestLogger()); @@ -582,7 +582,7 @@ jobs: it("reference strategy in reusable workflow", async () => { const input = ` on: push - + jobs: test: strategy: @@ -602,7 +602,7 @@ jobs: it("reference matrix in reusable workflow", async () => { const input = ` on: push - + jobs: test: strategy: diff --git a/languageservice/src/validate.ts b/languageservice/src/validate.ts index 13c0de7..0b6aa4b 100644 --- a/languageservice/src/validate.ts +++ b/languageservice/src/validate.ts @@ -1,13 +1,14 @@ -import {Evaluator, ExpressionEvaluationError, Lexer, Parser} from "@github/actions-expressions"; -import {Expr} from "@github/actions-expressions/ast"; -import {isBasicExpression, isString, ParseWorkflowResult, WorkflowTemplate} from "@github/actions-workflow-parser"; -import {ErrorPolicy} from "@github/actions-workflow-parser/model/convert"; -import {splitAllowedContext} from "@github/actions-workflow-parser/templates/allowed-context"; -import {BasicExpressionToken} from "@github/actions-workflow-parser/templates/tokens/basic-expression-token"; -import {StringToken} from "@github/actions-workflow-parser/templates/tokens/string-token"; -import {TemplateToken} from "@github/actions-workflow-parser/templates/tokens/template-token"; -import {File} from "@github/actions-workflow-parser/workflows/file"; -import {FileProvider} from "@github/actions-workflow-parser/workflows/file-provider"; +import {Evaluator, ExpressionEvaluationError, Lexer, Parser} from "@actions/expressions"; +import {Expr} from "@actions/expressions/ast"; +import {isBasicExpression, isString, ParseWorkflowResult, WorkflowTemplate} from "@actions/workflow-parser"; +import {ErrorPolicy} from "@actions/workflow-parser/model/convert"; +import {splitAllowedContext} from "@actions/workflow-parser/templates/allowed-context"; +import {BasicExpressionToken} from "@actions/workflow-parser/templates/tokens/basic-expression-token"; +import {StringToken} from "@actions/workflow-parser/templates/tokens/string-token"; +import {TemplateToken} from "@actions/workflow-parser/templates/tokens/template-token"; +import {TokenRange} from "@actions/workflow-parser/templates/tokens/token-range"; +import {File} from "@actions/workflow-parser/workflows/file"; +import {FileProvider} from "@actions/workflow-parser/workflows/file-provider"; import {TextDocument} from "vscode-languageserver-textdocument"; import {Diagnostic, DiagnosticSeverity, URI} from "vscode-languageserver-types"; import {ActionMetadata, ActionReference} from "./action"; @@ -19,11 +20,10 @@ import {validatorFunctions} from "./expression-validation/functions"; import {error} from "./log"; import {findToken} from "./utils/find-token"; import {mapRange} from "./utils/range"; +import {fetchOrConvertWorkflowTemplate, fetchOrParseWorkflow} from "./utils/workflow-cache"; import {validateAction} from "./validate-action"; import {ValueProviderConfig, ValueProviderKind} from "./value-providers/config"; import {defaultValueProviders} from "./value-providers/default"; -import {fetchOrParseWorkflow, fetchOrConvertWorkflowTemplate} from "./utils/workflow-cache"; -import {TokenRange} from "@github/actions-workflow-parser/templates/tokens/token-range"; export type ValidationConfig = { valueProviderConfig?: ValueProviderConfig; diff --git a/languageservice/src/value-providers/definition.ts b/languageservice/src/value-providers/definition.ts index 16ca421..eb78d6e 100644 --- a/languageservice/src/value-providers/definition.ts +++ b/languageservice/src/value-providers/definition.ts @@ -1,11 +1,11 @@ -import {BooleanDefinition} from "@github/actions-workflow-parser/templates/schema/boolean-definition"; -import {Definition} from "@github/actions-workflow-parser/templates/schema/definition"; -import {DefinitionType} from "@github/actions-workflow-parser/templates/schema/definition-type"; -import {MappingDefinition} from "@github/actions-workflow-parser/templates/schema/mapping-definition"; -import {OneOfDefinition} from "@github/actions-workflow-parser/templates/schema/one-of-definition"; -import {SequenceDefinition} from "@github/actions-workflow-parser/templates/schema/sequence-definition"; -import {StringDefinition} from "@github/actions-workflow-parser/templates/schema/string-definition"; -import {getWorkflowSchema} from "@github/actions-workflow-parser/workflows/workflow-schema"; +import {BooleanDefinition} from "@actions/workflow-parser/templates/schema/boolean-definition"; +import {Definition} from "@actions/workflow-parser/templates/schema/definition"; +import {DefinitionType} from "@actions/workflow-parser/templates/schema/definition-type"; +import {MappingDefinition} from "@actions/workflow-parser/templates/schema/mapping-definition"; +import {OneOfDefinition} from "@actions/workflow-parser/templates/schema/one-of-definition"; +import {SequenceDefinition} from "@actions/workflow-parser/templates/schema/sequence-definition"; +import {StringDefinition} from "@actions/workflow-parser/templates/schema/string-definition"; +import {getWorkflowSchema} from "@actions/workflow-parser/workflows/workflow-schema"; import {Value} from "./config"; import {stringsToValues} from "./strings-to-values"; diff --git a/languageservice/src/value-providers/reusable-job-inputs.ts b/languageservice/src/value-providers/reusable-job-inputs.ts index 0512fd2..e5b1fba 100644 --- a/languageservice/src/value-providers/reusable-job-inputs.ts +++ b/languageservice/src/value-providers/reusable-job-inputs.ts @@ -1,5 +1,5 @@ -import {TemplateToken} from "@github/actions-workflow-parser/templates/tokens/template-token"; -import {isMapping, isString} from "@github/actions-workflow-parser/templates/tokens/type-guards"; +import {TemplateToken} from "@actions/workflow-parser/templates/tokens/template-token"; +import {isMapping, isString} from "@actions/workflow-parser/templates/tokens/type-guards"; import {WorkflowContext} from "../context/workflow-context"; import {Value} from "./config"; diff --git a/languageservice/src/value-providers/reusable-job-secrets.ts b/languageservice/src/value-providers/reusable-job-secrets.ts index 9eeb45f..64083a3 100644 --- a/languageservice/src/value-providers/reusable-job-secrets.ts +++ b/languageservice/src/value-providers/reusable-job-secrets.ts @@ -1,5 +1,5 @@ -import {TemplateToken} from "@github/actions-workflow-parser/templates/tokens/template-token"; -import {isMapping, isString} from "@github/actions-workflow-parser/templates/tokens/type-guards"; +import {TemplateToken} from "@actions/workflow-parser/templates/tokens/template-token"; +import {isMapping, isString} from "@actions/workflow-parser/templates/tokens/type-guards"; import {WorkflowContext} from "../context/workflow-context"; import {Value} from "./config"; diff --git a/package-lock.json b/package-lock.json index a906f7e..6f10137 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,7 +17,7 @@ } }, "actions-expressions": { - "name": "@github/actions-expressions", + "name": "@actions/expressions", "version": "0.1.152", "extraneous": true, "license": "MIT", @@ -34,13 +34,13 @@ } }, "actions-languageserver": { - "name": "@github/actions-languageserver", + "name": "@actions/languageserver", "version": "0.1.152", "extraneous": true, "license": "MIT", "dependencies": { - "@github/actions-languageservice": "^0.1.152", - "@github/actions-workflow-parser": "^0.1.152", + "@actions/languageservice": "^0.1.152", + "@actions/workflow-parser": "^0.1.152", "@octokit/rest": "^19.0.7", "vscode-languageserver": "^8.0.2", "vscode-languageserver-textdocument": "^1.0.7", @@ -60,13 +60,13 @@ } }, "actions-languageservice": { - "name": "@github/actions-languageservice", + "name": "@actions/languageservice", "version": "0.1.152", "extraneous": true, "license": "MIT", "dependencies": { - "@github/actions-expressions": "^0.1.152", - "@github/actions-workflow-parser": "^0.1.152", + "@actions/expressions": "^0.1.152", + "@actions/workflow-parser": "^0.1.152", "vscode-languageserver-textdocument": "^1.0.7", "vscode-languageserver-types": "^3.17.2", "yaml": "^2.1.1" @@ -86,12 +86,12 @@ } }, "actions-workflow-parser": { - "name": "@github/actions-workflow-parser", + "name": "@actions/workflow-parser", "version": "0.1.152", "extraneous": true, "license": "MIT", "dependencies": { - "@github/actions-expressions": "^0.1.152", + "@actions/expressions": "^0.1.152", "cronstrue": "^2.21.0", "yaml": "^2.0.0-8" }, diff --git a/workflow-parser/src/templates/allowed-context.ts b/workflow-parser/src/templates/allowed-context.ts index 16b8878..3473f29 100644 --- a/workflow-parser/src/templates/allowed-context.ts +++ b/workflow-parser/src/templates/allowed-context.ts @@ -1,4 +1,4 @@ -import {FunctionInfo} from "@github/actions-expressions/funcs/info"; +import {FunctionInfo} from "@actions/expressions/funcs/info"; import {MAX_CONSTANT} from "./template-constants"; export function splitAllowedContext(allowedContext: string[]): { diff --git a/workflow-parser/src/templates/template-context.ts b/workflow-parser/src/templates/template-context.ts index 2e1db12..a1a8f9d 100644 --- a/workflow-parser/src/templates/template-context.ts +++ b/workflow-parser/src/templates/template-context.ts @@ -1,4 +1,4 @@ -import {FunctionInfo} from "@github/actions-expressions/funcs/info"; +import {FunctionInfo} from "@actions/expressions/funcs/info"; import {TemplateSchema} from "./schema/template-schema"; import {TemplateValidationError} from "./template-validation-error"; diff --git a/workflow-parser/src/templates/tokens/expression-token.ts b/workflow-parser/src/templates/tokens/expression-token.ts index 70072aa..db97e66 100644 --- a/workflow-parser/src/templates/tokens/expression-token.ts +++ b/workflow-parser/src/templates/tokens/expression-token.ts @@ -1,4 +1,4 @@ -import {Lexer, Parser} from "@github/actions-expressions"; +import {Lexer, Parser} from "@actions/expressions"; import {splitAllowedContext} from "../allowed-context"; import {DefinitionInfo} from "../schema/definition-info"; import {ScalarToken} from "./scalar-token";