Rename methods

This commit is contained in:
Jacob Wallraff
2023-03-03 12:39:40 -08:00
parent ffcd06c8c5
commit 5a199d4c52
5 changed files with 18 additions and 34 deletions
+3 -3
View File
@@ -26,7 +26,7 @@ import {mapRange} from "./utils/range";
import {validateAction} from "./validate-action";
import {ValueProviderConfig, ValueProviderKind} from "./value-providers/config";
import {defaultValueProviders} from "./value-providers/default";
import { getParsedWorkflow, getWorkflowTemplate } from "./utils/workflow-cache";
import {fetchOrParseWorkflow, fetchOrConvertWorkflowTemplate} from "./utils/workflow-cache";
export type ValidationConfig = {
valueProviderConfig?: ValueProviderConfig;
@@ -50,14 +50,14 @@ export async function validate(textDocument: TextDocument, config?: ValidationCo
const diagnostics: Diagnostic[] = [];
try {
const parsedWorkflow = getParsedWorkflow(file, textDocument.uri);
const parsedWorkflow = fetchOrParseWorkflow(file, textDocument.uri);
if (!parsedWorkflow) {
return [];
}
if (parsedWorkflow.value) {
// Errors will be updated in the context. Attempt to do the conversion anyway in order to give the user more information
const template = await getWorkflowTemplate(file, parsedWorkflow, textDocument.uri, config, {
const template = await fetchOrConvertWorkflowTemplate(file, parsedWorkflow, textDocument.uri, config, {
fetchReusableWorkflowDepth: config?.fileProvider ? 1 : 0,
errorPolicy: ErrorPolicy.TryConversion
});