Skip to content

Open-Source API Development Ecosystem • https://hoppscotch.io • Offline, On-Prem & Cloud • Web, Desktop & CLI • Open-Source Alternative to Postman, Insomnia

chore: formatting updates

James Georgebb1c9a9fe9b2
diff --git a/packages/hoppscotch-common/src/components/http/InheritedScriptsModal.vue b/packages/hoppscotch-common/src/components/http/InheritedScriptsModal.vue
index b7f4d33f0..3e3b8c281 100644
--- a/packages/hoppscotch-common/src/components/http/InheritedScriptsModal.vue
+++ b/packages/hoppscotch-common/src/components/http/InheritedScriptsModal.vue
@@ -46,10 +46,7 @@
class="!absolute right-2 top-2 z-10"
@click="copyScriptContent(displayedScript)"
/>
- <div
- ref="scriptEditor"
- class="flex-1 overflow-auto"
- ></div>
+ <div ref="scriptEditor" class="flex-1 overflow-auto"></div>
</div>
</div>
</template>
diff --git a/packages/hoppscotch-common/src/helpers/RequestRunner.ts b/packages/hoppscotch-common/src/helpers/RequestRunner.ts
index 2252b421d..299d2f832 100644
--- a/packages/hoppscotch-common/src/helpers/RequestRunner.ts
+++ b/packages/hoppscotch-common/src/helpers/RequestRunner.ts
@@ -27,10 +27,7 @@ import { map } from "fp-ts/Either"
import { runPreRequestScript, runTestScript } from "@hoppscotch/js-sandbox/web"
import { useSetting } from "~/composables/settings"
import { getService } from "~/modules/dioc"
-import {
- combineScriptsWithIIFE,
- hasActualScript,
-} from "~/helpers/scripting"
+import { combineScriptsWithIIFE, hasActualScript } from "~/helpers/scripting"
import { createHoppFetchHook } from "~/helpers/hopp-fetch"
import { KernelInterceptorService } from "~/services/kernel-interceptor.service"
import {
diff --git a/packages/hoppscotch-js-sandbox/src/cage-modules/scripting-modules.ts b/packages/hoppscotch-js-sandbox/src/cage-modules/scripting-modules.ts
index 9be183f44..342b497b2 100644
--- a/packages/hoppscotch-js-sandbox/src/cage-modules/scripting-modules.ts
+++ b/packages/hoppscotch-js-sandbox/src/cage-modules/scripting-modules.ts
@@ -481,24 +481,20 @@ const createScriptingModule = (
// calls cross the QuickJS boundary before the script returns, so the
// host sees the error without relying on faraday-cage's loop behaviour.
;(inputsObj as Record<string, unknown>).setScriptExecutionError =
- defineSandboxFn(
- ctx,
- "setScriptExecutionError",
- (error: unknown) => {
- if (!captureHook || captureHook.scriptExecutionError) return
- const err = (error ?? {}) as {
- name?: unknown
- message?: unknown
- stack?: unknown
- }
- captureHook.scriptExecutionError = {
- name: typeof err.name === "string" ? err.name : "",
- message:
- typeof err.message === "string" ? err.message : String(error),
- stack: typeof err.stack === "string" ? err.stack : "",
- }
+ defineSandboxFn(ctx, "setScriptExecutionError", (error: unknown) => {
+ if (!captureHook || captureHook.scriptExecutionError) return
+ const err = (error ?? {}) as {
+ name?: unknown
+ message?: unknown
+ stack?: unknown
}
- )
+ captureHook.scriptExecutionError = {
+ name: typeof err.name === "string" ? err.name : "",
+ message:
+ typeof err.message === "string" ? err.message : String(error),
+ stack: typeof err.stack === "string" ? err.stack : "",
+ }
+ })
const sandboxInputsObj = defineSandboxObject(ctx, inputsObj)