From a8e279db288733c0f6b84323b804edd71460ebd1 Mon Sep 17 00:00:00 2001 From: Andrew Bastin Date: Thu, 24 Aug 2023 15:03:50 +0530 Subject: [PATCH] fix: codegen breaking --- .../hoppscotch-common/src/helpers/new-codegen/index.ts | 7 +++++-- packages/hoppscotch-selfhost-web/vite.config.ts | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/hoppscotch-common/src/helpers/new-codegen/index.ts b/packages/hoppscotch-common/src/helpers/new-codegen/index.ts index cd65a96f3..e77556031 100644 --- a/packages/hoppscotch-common/src/helpers/new-codegen/index.ts +++ b/packages/hoppscotch-common/src/helpers/new-codegen/index.ts @@ -1,4 +1,4 @@ -import { HTTPSnippet } from "httpsnippet" +import * as HTTPSnippet from "httpsnippet" import { HoppRESTRequest } from "@hoppscotch/data" import * as O from "fp-ts/Option" import * as E from "fp-ts/Either" @@ -208,7 +208,10 @@ export const generateCode = ( }).convert(codegenInfo.lang, codegenInfo.mode, { indent: " ", }), - (e) => e + (e) => { + console.error(e) + return e + } ), // Only allow string output to pass through, else none diff --git a/packages/hoppscotch-selfhost-web/vite.config.ts b/packages/hoppscotch-selfhost-web/vite.config.ts index d17d7a6d3..604d22f82 100644 --- a/packages/hoppscotch-selfhost-web/vite.config.ts +++ b/packages/hoppscotch-selfhost-web/vite.config.ts @@ -67,6 +67,7 @@ export default defineConfig({ "@lib": path.resolve(__dirname, "./src/lib"), stream: "stream-browserify", util: "util", + querystring: "qs", }, dedupe: ["vue"], },