From 194dbbd59d8cbd0095c08d410f9dfac747b61e72 Mon Sep 17 00:00:00 2001 From: aby-jo <173944472+aby-jo@users.noreply.github.com> Date: Tue, 24 Jun 2025 22:58:15 +0530 Subject: [PATCH] Make SQLBeautify synchronous --- src/core/operations/SQLBeautify.mjs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/core/operations/SQLBeautify.mjs b/src/core/operations/SQLBeautify.mjs index ddd78b0c..2171f7fc 100644 --- a/src/core/operations/SQLBeautify.mjs +++ b/src/core/operations/SQLBeautify.mjs @@ -3,7 +3,7 @@ * @copyright Crown Copyright 2016 * @license Apache-2.0 */ - +import { format } from "sql-formatter"; import Operation from "../Operation.mjs"; /** @@ -34,12 +34,10 @@ class SQLBeautify extends Operation { /** * @param {string} input * @param {Object[]} args - * @returns {Promise} + * @returns {string} */ - async run(input, args) { + run(input, args) { const indentStr = args[0]; - // Lazy import of sql-formatter for performance - const {format}= await import("sql-formatter"); // Extract and replace bind variables like :Bind1 with __BIND_0__ const bindRegex = /:\w+/g; const bindMap = {};