chore: introduce curl parser tests and minor changes (#2145)

Co-authored-by: Liyas Thomas <liyascthomas@gmail.com>
Co-authored-by: Andrew Bastin <andrewbastin.k@gmail.com>
This commit is contained in:
kyteinsky
2022-03-14 18:09:32 +00:00
committed by GitHub
parent ab23fc4e0f
commit dcdd0379d4
6 changed files with 862 additions and 46 deletions

View File

@@ -5,6 +5,7 @@ import {
HoppRESTAuth,
} from "@hoppscotch/data"
import { flow } from "fp-ts/function"
import cloneDeep from "lodash/cloneDeep"
import { parseCurlCommand, requestToHoppRequest } from "./curlparser"
export type CurlParserRequest = {
@@ -25,5 +26,6 @@ export type CurlParserRequest = {
export const parseCurlToHoppRESTReq = flow(
parseCurlCommand,
requestToHoppRequest
requestToHoppRequest,
cloneDeep
)