Rename methods
This commit is contained in:
@@ -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
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user