Open-Source API Development Ecosystem • https://hoppscotch.io • Offline, On-Prem & Cloud • Web, Desktop & CLI • Open-Source Alternative to Postman, Insomnia
TypeScript apiapi-clientapi-restapi-testingdeveloper-toolsgraphqlhttphttp-clientpwarestrest-apispatestingtesting-toolstoolsvuevuejswebsocket
refactor: separate out data structures into hoppscotch-data
Andrew Bastin38755bf3e3c9
diff --git a/packages/hoppscotch-app/components/collections/SaveRequest.vue b/packages/hoppscotch-app/components/collections/SaveRequest.vueindex 5094f71ae..1575bd4b3 100644--- a/packages/hoppscotch-app/components/collections/SaveRequest.vue+++ b/packages/hoppscotch-app/components/collections/SaveRequest.vue@@ -59,7 +59,7 @@<script setup lang="ts">import { reactive, ref, watch } from "@nuxtjs/composition-api"-import { isHoppRESTRequest } from "~/helpers/types/HoppRESTRequest"+import { HoppGQLRequest, isHoppRESTRequest } from "@hoppscotch/data"import {editGraphqlRequest,editRESTRequest,@@ -74,7 +74,6 @@ import {} from "~/newstore/RESTSession"import * as teamUtils from "~/helpers/teams/utils"import { apolloClient } from "~/helpers/apollo"-import { HoppGQLRequest } from "~/helpers/types/HoppGQLRequest"import { useI18n, useToast } from "~/helpers/utils/composables"const t = useI18n()diff --git a/packages/hoppscotch-app/components/collections/graphql/Add.vue b/packages/hoppscotch-app/components/collections/graphql/Add.vueindex 712750c4b..4fbfcc3e6 100644--- a/packages/hoppscotch-app/components/collections/graphql/Add.vue+++ b/packages/hoppscotch-app/components/collections/graphql/Add.vue@@ -34,7 +34,7 @@<script lang="ts">import { defineComponent } from "@nuxtjs/composition-api"-import { HoppGQLRequest } from "~/helpers/types/HoppGQLRequest"+import { HoppGQLRequest } from "@hoppscotch/data"import { addGraphqlCollection, makeCollection } from "~/newstore/collections"export default defineComponent({diff --git a/packages/hoppscotch-app/components/collections/graphql/EditRequest.vue b/packages/hoppscotch-app/components/collections/graphql/EditRequest.vueindex 1fe5c6582..18eea553f 100644--- a/packages/hoppscotch-app/components/collections/graphql/EditRequest.vue+++ b/packages/hoppscotch-app/components/collections/graphql/EditRequest.vue@@ -38,7 +38,7 @@<script lang="ts">import { defineComponent, PropType } from "@nuxtjs/composition-api"-import { HoppGQLRequest } from "~/helpers/types/HoppGQLRequest"+import { HoppGQLRequest } from "@hoppscotch/data"import { editGraphqlRequest } from "~/newstore/collections"export default defineComponent({diff --git a/packages/hoppscotch-app/components/collections/graphql/Request.vue b/packages/hoppscotch-app/components/collections/graphql/Request.vueindex 595773866..e2aa3b55f 100644--- a/packages/hoppscotch-app/components/collections/graphql/Request.vue+++ b/packages/hoppscotch-app/components/collections/graphql/Request.vue@@ -102,7 +102,7 @@<script lang="ts">import { defineComponent, PropType } from "@nuxtjs/composition-api"-import { HoppGQLRequest, makeGQLRequest } from "~/helpers/types/HoppGQLRequest"+import { HoppGQLRequest, makeGQLRequest } from "@hoppscotch/data"import { removeGraphqlRequest } from "~/newstore/collections"import { setGQLSession } from "~/newstore/GQLSession"diff --git a/packages/hoppscotch-app/components/collections/my/Request.vue b/packages/hoppscotch-app/components/collections/my/Request.vueindex b4ba0a453..2a024d2f5 100644--- a/packages/hoppscotch-app/components/collections/my/Request.vue+++ b/packages/hoppscotch-app/components/collections/my/Request.vue@@ -116,7 +116,7 @@<script>import { defineComponent } from "@nuxtjs/composition-api"-import { translateToNewRequest } from "~/helpers/types/HoppRESTRequest"+import { translateToNewRequest } from "@hoppscotch/data"import { useReadonlyStream } from "~/helpers/utils/composables"import {restSaveContext$,diff --git a/packages/hoppscotch-app/components/collections/teams/Request.vue b/packages/hoppscotch-app/components/collections/teams/Request.vueindex 4505e89c7..0e032c715 100644--- a/packages/hoppscotch-app/components/collections/teams/Request.vue+++ b/packages/hoppscotch-app/components/collections/teams/Request.vue@@ -93,7 +93,7 @@<script lang="ts">import { defineComponent } from "@nuxtjs/composition-api"-import { translateToNewRequest } from "~/helpers/types/HoppRESTRequest"+import { translateToNewRequest } from "@hoppscotch/data"import { useReadonlyStream } from "~/helpers/utils/composables"import {restSaveContext$,diff --git a/packages/hoppscotch-app/components/graphql/RequestOptions.vue b/packages/hoppscotch-app/components/graphql/RequestOptions.vueindex e28251ef1..de3ca5a9e 100644--- a/packages/hoppscotch-app/components/graphql/RequestOptions.vue+++ b/packages/hoppscotch-app/components/graphql/RequestOptions.vue@@ -235,6 +235,7 @@import { onMounted, ref, watch } from "@nuxtjs/composition-api"import clone from "lodash/clone"import * as gql from "graphql"+import { GQLHeader, makeGQLRequest } from "@hoppscotch/data"import { copyToClipboard } from "~/helpers/utils/clipboard"import {useNuxt,@@ -262,7 +263,6 @@ import { GQLConnection } from "~/helpers/GQLConnection"import { makeGQLHistoryEntry, addGraphqlHistoryEntry } from "~/newstore/history"import { logHoppRequestRunToAnalytics } from "~/helpers/fb/analytics"import { getCurrentStrategyID } from "~/helpers/network"-import { GQLHeader, makeGQLRequest } from "~/helpers/types/HoppGQLRequest"import { useCodemirror } from "~/helpers/editor/codemirror"import jsonLinter from "~/helpers/editor/linting/json"import { createGQLQueryLinter } from "~/helpers/editor/linting/gqlQuery"diff --git a/packages/hoppscotch-app/components/graphql/Sidebar.vue b/packages/hoppscotch-app/components/graphql/Sidebar.vueindex 2f3bcc61b..5b635dafd 100644--- a/packages/hoppscotch-app/components/graphql/Sidebar.vue+++ b/packages/hoppscotch-app/components/graphql/Sidebar.vue@@ -200,9 +200,9 @@import { computed, nextTick, reactive, ref } from "@nuxtjs/composition-api"import { GraphQLField, GraphQLType } from "graphql"import { map } from "rxjs/operators"+import { GQLHeader } from "@hoppscotch/data"import { useCodemirror } from "~/helpers/editor/codemirror"import { GQLConnection } from "~/helpers/GQLConnection"-import { GQLHeader } from "~/helpers/types/HoppGQLRequest"import { copyToClipboard } from "~/helpers/utils/clipboard"import {useReadonlyStream,diff --git a/packages/hoppscotch-app/components/history/graphql/Card.vue b/packages/hoppscotch-app/components/history/graphql/Card.vueindex 234ec41dd..9fb9a5f59 100644--- a/packages/hoppscotch-app/components/history/graphql/Card.vue+++ b/packages/hoppscotch-app/components/history/graphql/Card.vue@@ -56,7 +56,7 @@ import {PropType,ref,} from "@nuxtjs/composition-api"-import { makeGQLRequest } from "~/helpers/types/HoppGQLRequest"+import { makeGQLRequest } from "@hoppscotch/data"import { setGQLSession } from "~/newstore/GQLSession"import { GQLHistoryEntry } from "~/newstore/history"diff --git a/packages/hoppscotch-app/components/http/Authorization.vue b/packages/hoppscotch-app/components/http/Authorization.vueindex e5772c851..132a3c2a3 100644--- a/packages/hoppscotch-app/components/http/Authorization.vue+++ b/packages/hoppscotch-app/components/http/Authorization.vue@@ -202,7 +202,7 @@ import {HoppRESTAuthBasic,HoppRESTAuthBearer,HoppRESTAuthOAuth2,-} from "~/helpers/types/HoppRESTAuth"+} from "@hoppscotch/data"import { pluckRef, useStream } from "~/helpers/utils/composables"import { restAuth$, setRESTAuth } from "~/newstore/RESTSession"import { useSetting } from "~/newstore/settings"diff --git a/packages/hoppscotch-app/components/http/BodyParameters.vue b/packages/hoppscotch-app/components/http/BodyParameters.vueindex 1297e2211..16ea38e49 100644--- a/packages/hoppscotch-app/components/http/BodyParameters.vue+++ b/packages/hoppscotch-app/components/http/BodyParameters.vue@@ -165,7 +165,7 @@<script lang="ts">import { defineComponent, onMounted, Ref, watch } from "@nuxtjs/composition-api"-import { FormDataKeyValue } from "~/helpers/types/HoppRESTRequest"+import { FormDataKeyValue } from "@hoppscotch/data"import { pluckRef } from "~/helpers/utils/composables"import {addFormDataEntry,diff --git a/packages/hoppscotch-app/components/http/Headers.vue b/packages/hoppscotch-app/components/http/Headers.vueindex d29b6f742..ae77c61cb 100644--- a/packages/hoppscotch-app/components/http/Headers.vue+++ b/packages/hoppscotch-app/components/http/Headers.vue@@ -150,6 +150,7 @@<script setup lang="ts">import { onBeforeUpdate, ref, watch } from "@nuxtjs/composition-api"+import { HoppRESTHeader } from "@hoppscotch/data"import { useCodemirror } from "~/helpers/editor/codemirror"import {addRESTHeader,@@ -165,7 +166,6 @@ import {useI18n,useToast,} from "~/helpers/utils/composables"-import { HoppRESTHeader } from "~/helpers/types/HoppRESTRequest"const t = useI18n()diff --git a/packages/hoppscotch-app/components/http/ImportCurl.vue b/packages/hoppscotch-app/components/http/ImportCurl.vueindex 146ccd792..3c7efe792 100644--- a/packages/hoppscotch-app/components/http/ImportCurl.vue+++ b/packages/hoppscotch-app/components/http/ImportCurl.vue@@ -22,13 +22,13 @@<script setup lang="ts">import { ref } from "@nuxtjs/composition-api"-import parseCurlCommand from "~/helpers/curlparser"-import { useCodemirror } from "~/helpers/editor/codemirror"import {HoppRESTHeader,HoppRESTParam,makeRESTRequest,-} from "~/helpers/types/HoppRESTRequest"+} from "@hoppscotch/data"+import parseCurlCommand from "~/helpers/curlparser"+import { useCodemirror } from "~/helpers/editor/codemirror"import { setRESTRequest } from "~/newstore/RESTSession"import { useI18n, useToast } from "~/helpers/utils/composables"diff --git a/packages/hoppscotch-app/components/http/OAuth2Authorization.vue b/packages/hoppscotch-app/components/http/OAuth2Authorization.vueindex 7fae5deb9..565beaba0 100644--- a/packages/hoppscotch-app/components/http/OAuth2Authorization.vue+++ b/packages/hoppscotch-app/components/http/OAuth2Authorization.vue@@ -57,13 +57,13 @@<script lang="ts">import { Ref } from "@nuxtjs/composition-api"+import { HoppRESTAuthOAuth2 } from "@hoppscotch/data"import {pluckRef,useI18n,useStream,useToast,} from "~/helpers/utils/composables"-import { HoppRESTAuthOAuth2 } from "~/helpers/types/HoppRESTAuth"import { restAuth$, setRESTAuth } from "~/newstore/RESTSession"import { tokenRequest } from "~/helpers/oauth"diff --git a/packages/hoppscotch-app/components/http/Parameters.vue b/packages/hoppscotch-app/components/http/Parameters.vueindex f054efcf4..ede5854da 100644--- a/packages/hoppscotch-app/components/http/Parameters.vue+++ b/packages/hoppscotch-app/components/http/Parameters.vue@@ -143,8 +143,8 @@<script setup lang="ts">import { ref, watch, onBeforeUpdate } from "@nuxtjs/composition-api"+import { HoppRESTParam } from "@hoppscotch/data"import { useCodemirror } from "~/helpers/editor/codemirror"-import { HoppRESTParam } from "~/helpers/types/HoppRESTRequest"import {useReadonlyStream,useI18n,diff --git a/packages/hoppscotch-app/components/lenses/HeadersRenderer.vue b/packages/hoppscotch-app/components/lenses/HeadersRenderer.vueindex 9d795e2ae..f14fcd375 100644--- a/packages/hoppscotch-app/components/lenses/HeadersRenderer.vue+++ b/packages/hoppscotch-app/components/lenses/HeadersRenderer.vue@@ -42,7 +42,7 @@<script setup lang="ts">import { ref } from "@nuxtjs/composition-api"-import { HoppRESTHeader } from "~/helpers/types/HoppRESTRequest"+import { HoppRESTHeader } from "@hoppscotch/data"import { copyToClipboard } from "~/helpers/utils/clipboard"import { useI18n, useToast } from "~/helpers/utils/composables"diff --git a/packages/hoppscotch-app/helpers/GQLConnection.ts b/packages/hoppscotch-app/helpers/GQLConnection.tsindex 2982819fa..bbb2e8c62 100644--- a/packages/hoppscotch-app/helpers/GQLConnection.ts+++ b/packages/hoppscotch-app/helpers/GQLConnection.ts@@ -10,8 +10,8 @@ import {GraphQLInterfaceType,} from "graphql"import { distinctUntilChanged, map } from "rxjs/operators"+import { GQLHeader } from "@hoppscotch/data"import { sendNetworkRequest } from "./network"-import { GQLHeader } from "./types/HoppGQLRequest"const GQL_SCHEMA_POLL_INTERVAL = 7000diff --git a/packages/hoppscotch-app/helpers/RESTExtURLParams.ts b/packages/hoppscotch-app/helpers/RESTExtURLParams.tsindex 9b75a6690..a19cd1a66 100644--- a/packages/hoppscotch-app/helpers/RESTExtURLParams.ts+++ b/packages/hoppscotch-app/helpers/RESTExtURLParams.ts@@ -1,5 +1,5 @@import clone from "lodash/clone"-import { FormDataKeyValue, HoppRESTRequest } from "./types/HoppRESTRequest"+import { FormDataKeyValue, HoppRESTRequest } from "@hoppscotch/data"import { isJSONContentType } from "./utils/contenttypes"import { defaultRESTRequest } from "~/newstore/RESTSession"diff --git a/packages/hoppscotch-app/helpers/RequestRunner.ts b/packages/hoppscotch-app/helpers/RequestRunner.tsindex 0aa11181d..7b6870235 100644--- a/packages/hoppscotch-app/helpers/RequestRunner.ts+++ b/packages/hoppscotch-app/helpers/RequestRunner.ts@@ -5,6 +5,7 @@ import { pipe } from "fp-ts/function"import * as O from "fp-ts/Option"import { runTestScript, TestDescriptor } from "@hoppscotch/js-sandbox"import { isRight } from "fp-ts/Either"+import { isJSONContentType } from "@hoppscotch/data"import {getCombinedEnvVariables,getFinalEnvsFromPreRequest,@@ -13,7 +14,6 @@ import { getEffectiveRESTRequest } from "./utils/EffectiveURL"import { HoppRESTResponse } from "./types/HoppRESTResponse"import { createRESTNetworkRequestStream } from "./network"import { HoppTestData, HoppTestResult } from "./types/HoppTestResult"-import { isJSONContentType } from "./utils/contenttypes"import { getRESTRequest, setRESTTestResults } from "~/newstore/RESTSession"const getTestableBody = (res: HoppRESTResponse & { type: "success" }) => {diff --git a/packages/hoppscotch-app/helpers/backend/mutations/Shortcode.ts b/packages/hoppscotch-app/helpers/backend/mutations/Shortcode.tsindex 4d76ef79e..5ae84bc7c 100644--- a/packages/hoppscotch-app/helpers/backend/mutations/Shortcode.ts+++ b/packages/hoppscotch-app/helpers/backend/mutations/Shortcode.ts@@ -1,10 +1,10 @@+import { HoppRESTRequest } from "@hoppscotch/data"import { runMutation } from "../GQLClient"import {CreateShortcodeDocument,CreateShortcodeMutation,CreateShortcodeMutationVariables,} from "../graphql"-import { HoppRESTRequest } from "~/helpers/types/HoppRESTRequest"export const createShortcode = (request: HoppRESTRequest) =>runMutation<CreateShortcodeMutation, CreateShortcodeMutationVariables, "">(diff --git a/packages/hoppscotch-app/helpers/codegen/codegen.ts b/packages/hoppscotch-app/helpers/codegen/codegen.tsindex 6f9ce1e7c..71219ba75 100644--- a/packages/hoppscotch-app/helpers/codegen/codegen.ts+++ b/packages/hoppscotch-app/helpers/codegen/codegen.ts@@ -2,7 +2,7 @@ import {FormDataKeyValue,HoppRESTHeader,HoppRESTParam,-} from "../types/HoppRESTRequest"+} from "@hoppscotch/data"import { EffectiveHoppRESTRequest } from "../utils/EffectiveURL"import { CLibcurlCodegen } from "./generators/c-libcurl"import { CsRestsharpCodegen } from "./generators/cs-restsharp"diff --git a/packages/hoppscotch-app/helpers/fb/history.ts b/packages/hoppscotch-app/helpers/fb/history.tsindex d7b1207b3..201d30d8f 100644--- a/packages/hoppscotch-app/helpers/fb/history.ts+++ b/packages/hoppscotch-app/helpers/fb/history.ts@@ -11,7 +11,7 @@ import {query,updateDoc,} from "firebase/firestore"-import { FormDataKeyValue } from "../types/HoppRESTRequest"+import { FormDataKeyValue } from "@hoppscotch/data"import { currentUser$ } from "./auth"import { settingsStore } from "~/newstore/settings"import {diff --git a/packages/hoppscotch-app/helpers/fb/request.ts b/packages/hoppscotch-app/helpers/fb/request.tsindex ae00a90ea..60b899bcf 100644--- a/packages/hoppscotch-app/helpers/fb/request.ts+++ b/packages/hoppscotch-app/helpers/fb/request.ts@@ -9,10 +9,7 @@ import {} from "rxjs"import { doc, getDoc, getFirestore, setDoc } from "firebase/firestore"import cloneDeep from "lodash/cloneDeep"-import {- HoppRESTRequest,- translateToNewRequest,-} from "../types/HoppRESTRequest"+import { HoppRESTRequest, translateToNewRequest } from "@hoppscotch/data"import { currentUser$, HoppUser } from "./auth"import { restRequest$ } from "~/newstore/RESTSession"diff --git a/packages/hoppscotch-app/helpers/teams/TeamCollectionAdapter.ts b/packages/hoppscotch-app/helpers/teams/TeamCollectionAdapter.tsindex ce80629de..76e964211 100644--- a/packages/hoppscotch-app/helpers/teams/TeamCollectionAdapter.ts+++ b/packages/hoppscotch-app/helpers/teams/TeamCollectionAdapter.ts@@ -2,7 +2,7 @@ import { BehaviorSubject } from "rxjs"import { gql } from "graphql-tag"import pull from "lodash/pull"import remove from "lodash/remove"-import { translateToNewRequest } from "../types/HoppRESTRequest"+import { translateToNewRequest } from "@hoppscotch/data"import { TeamCollection } from "./TeamCollection"import { TeamRequest } from "./TeamRequest"import {diff --git a/packages/hoppscotch-app/helpers/teams/TeamRequest.ts b/packages/hoppscotch-app/helpers/teams/TeamRequest.tsindex 24e235cff..ccc78cea2 100644--- a/packages/hoppscotch-app/helpers/teams/TeamRequest.ts+++ b/packages/hoppscotch-app/helpers/teams/TeamRequest.ts@@ -1,4 +1,4 @@-import { HoppRESTRequest } from "../types/HoppRESTRequest"+import { HoppRESTRequest } from "@hoppscotch/data"/*** Defines how a Teams request is represented in TeamCollectionAdapterdiff --git a/packages/hoppscotch-app/helpers/types/HoppRESTResponse.ts b/packages/hoppscotch-app/helpers/types/HoppRESTResponse.tsindex e568f647e..811c325aa 100644--- a/packages/hoppscotch-app/helpers/types/HoppRESTResponse.ts+++ b/packages/hoppscotch-app/helpers/types/HoppRESTResponse.ts@@ -1,4 +1,4 @@-import { HoppRESTRequest } from "./HoppRESTRequest"+import { HoppRESTRequest } from "@hoppscotch/data"export type HoppRESTResponse =| { type: "loading"; req: HoppRESTRequest }diff --git a/packages/hoppscotch-app/helpers/utils/EffectiveURL.ts b/packages/hoppscotch-app/helpers/utils/EffectiveURL.tsindex 9190bd188..443caf3e9 100644--- a/packages/hoppscotch-app/helpers/utils/EffectiveURL.ts+++ b/packages/hoppscotch-app/helpers/utils/EffectiveURL.ts@@ -1,6 +1,6 @@import { combineLatest, Observable } from "rxjs"import { map } from "rxjs/operators"-import { FormDataKeyValue, HoppRESTRequest } from "../types/HoppRESTRequest"+import { FormDataKeyValue, HoppRESTRequest } from "@hoppscotch/data"import { parseTemplateString, parseBodyEnvVariables } from "../templating"import { Environment, getGlobalVariables } from "~/newstore/environments"diff --git a/packages/hoppscotch-app/helpers/utils/contenttypes.ts b/packages/hoppscotch-app/helpers/utils/contenttypes.tsindex e47476774..77656888b 100644--- a/packages/hoppscotch-app/helpers/utils/contenttypes.ts+++ b/packages/hoppscotch-app/helpers/utils/contenttypes.ts@@ -1,4 +1,8 @@-export const knownContentTypes = {+import { ValidContentTypes } from "@hoppscotch/data"++export type Content = "json" | "xml" | "multipart" | "html" | "plain"++export const knownContentTypes: Record<ValidContentTypes, Content> = {"application/json": "json","application/ld+json": "json","application/hal+json": "json",@@ -10,8 +14,6 @@ export const knownContentTypes = {"text/plain": "plain",}-export type ValidContentTypes = keyof typeof knownContentTypes-export function isJSONContentType(contentType: string) {return /\bjson\b/i.test(contentType)}diff --git a/packages/hoppscotch-app/newstore/GQLSession.ts b/packages/hoppscotch-app/newstore/GQLSession.tsindex 85babca1e..4c70559a5 100644--- a/packages/hoppscotch-app/newstore/GQLSession.ts+++ b/packages/hoppscotch-app/newstore/GQLSession.ts@@ -1,11 +1,7 @@import { distinctUntilChanged, pluck } from "rxjs/operators"+import { GQLHeader, HoppGQLRequest, makeGQLRequest } from "@hoppscotch/data"import DispatchingStore, { defineDispatchers } from "./DispatchingStore"import { useStream } from "~/helpers/utils/composables"-import {- GQLHeader,- HoppGQLRequest,- makeGQLRequest,-} from "~/helpers/types/HoppGQLRequest"type GQLSession = {request: HoppGQLRequestdiff --git a/packages/hoppscotch-app/newstore/RESTSession.ts b/packages/hoppscotch-app/newstore/RESTSession.tsindex c4c5a71f2..53aa87cb7 100644--- a/packages/hoppscotch-app/newstore/RESTSession.ts+++ b/packages/hoppscotch-app/newstore/RESTSession.ts@@ -1,6 +1,5 @@import { pluck, distinctUntilChanged, map, filter } from "rxjs/operators"import { Ref } from "@nuxtjs/composition-api"-import DispatchingStore, { defineDispatchers } from "./DispatchingStore"import {FormDataKeyValue,HoppRESTHeader,@@ -8,12 +7,13 @@ import {HoppRESTReqBody,HoppRESTRequest,RESTReqSchemaVersion,-} from "~/helpers/types/HoppRESTRequest"+ HoppRESTAuth,+ ValidContentTypes,+} from "@hoppscotch/data"+import DispatchingStore, { defineDispatchers } from "./DispatchingStore"import { HoppRESTResponse } from "~/helpers/types/HoppRESTResponse"import { useStream } from "~/helpers/utils/composables"import { HoppTestResult } from "~/helpers/types/HoppTestResult"-import { HoppRESTAuth } from "~/helpers/types/HoppRESTAuth"-import { ValidContentTypes } from "~/helpers/utils/contenttypes"import { HoppRequestSaveContext } from "~/helpers/types/HoppRequestSaveContext"type RESTSession = {diff --git a/packages/hoppscotch-app/newstore/collections.ts b/packages/hoppscotch-app/newstore/collections.tsindex 2a9ca8c56..12c1d9b37 100644--- a/packages/hoppscotch-app/newstore/collections.ts+++ b/packages/hoppscotch-app/newstore/collections.ts@@ -1,14 +1,12 @@import { pluck } from "rxjs/operators"-import DispatchingStore, { defineDispatchers } from "./DispatchingStore"-import { getRESTSaveContext, setRESTSaveContext } from "./RESTSession"-import {- HoppRESTRequest,- translateToNewRequest,-} from "~/helpers/types/HoppRESTRequest"import {HoppGQLRequest,translateToGQLRequest,-} from "~/helpers/types/HoppGQLRequest"+ HoppRESTRequest,+ translateToNewRequest,+} from "@hoppscotch/data"+import DispatchingStore, { defineDispatchers } from "./DispatchingStore"+import { getRESTSaveContext, setRESTSaveContext } from "./RESTSession"export interface Collection<T extends HoppRESTRequest | HoppGQLRequest> {v: numberdiff --git a/packages/hoppscotch-app/newstore/history.ts b/packages/hoppscotch-app/newstore/history.tsindex 1b8fbd902..9d09edfff 100644--- a/packages/hoppscotch-app/newstore/history.ts+++ b/packages/hoppscotch-app/newstore/history.ts@@ -1,15 +1,13 @@import eq from "lodash/eq"import { pluck } from "rxjs/operators"-import DispatchingStore, { defineDispatchers } from "./DispatchingStore"-import { completedRESTResponse$ } from "./RESTSession"import {HoppRESTRequest,translateToNewRequest,-} from "~/helpers/types/HoppRESTRequest"-import {HoppGQLRequest,translateToGQLRequest,-} from "~/helpers/types/HoppGQLRequest"+} from "@hoppscotch/data"+import DispatchingStore, { defineDispatchers } from "./DispatchingStore"+import { completedRESTResponse$ } from "./RESTSession"export type RESTHistoryEntry = {v: numberdiff --git a/packages/hoppscotch-app/newstore/localpersistence.ts b/packages/hoppscotch-app/newstore/localpersistence.tsindex 58436bc79..84a8de038 100644--- a/packages/hoppscotch-app/newstore/localpersistence.ts+++ b/packages/hoppscotch-app/newstore/localpersistence.ts@@ -5,6 +5,7 @@ import assign from "lodash/assign"import isEmpty from "lodash/isEmpty"import * as O from "fp-ts/Option"import { pipe } from "fp-ts/function"+import { translateToNewRequest } from "@hoppscotch/data"import {settingsStore,bulkApplySettings,@@ -44,7 +45,6 @@ import { WSRequest$, setWSRequest } from "./WebSocketSession"import { SIORequest$, setSIORequest } from "./SocketIOSession"import { SSERequest$, setSSERequest } from "./SSESession"import { MQTTRequest$, setMQTTRequest } from "./MQTTSession"-import { translateToNewRequest } from "~/helpers/types/HoppRESTRequest"function checkAndMigrateOldSettings() {const vuexData = JSON.parse(window.localStorage.getItem("vuex") || "{}")diff --git a/packages/hoppscotch-app/package.json b/packages/hoppscotch-app/package.jsonindex 8fcf503ee..31bbd67a0 100644--- a/packages/hoppscotch-app/package.json+++ b/packages/hoppscotch-app/package.json@@ -53,6 +53,7 @@"@codemirror/text": "^0.19.5","@codemirror/view": "^0.19.21","@hoppscotch/codemirror-lang-graphql": "workspace:^0.1.0",+ "@hoppscotch/data": "workspace:^0.1.0","@hoppscotch/js-sandbox": "workspace:^1.0.0","@nuxtjs/axios": "^5.13.6","@nuxtjs/composition-api": "^0.30.0",diff --git a/packages/hoppscotch-app/pages/index.vue b/packages/hoppscotch-app/pages/index.vueindex bdd975b9c..3fd07e6fd 100644--- a/packages/hoppscotch-app/pages/index.vue+++ b/packages/hoppscotch-app/pages/index.vue@@ -120,6 +120,7 @@ import "splitpanes/dist/splitpanes.css"import { map } from "rxjs/operators"import { Subscription } from "rxjs"import isEqual from "lodash/isEqual"+import { HoppRESTRequest, HoppRESTAuthOAuth2 } from "@hoppscotch/data"import { useSetting } from "~/newstore/settings"import {restActiveParamsCount$,@@ -137,9 +138,7 @@ import {} from "~/helpers/utils/composables"import { loadRequestFromSync, startRequestSync } from "~/helpers/fb/request"import { onLoggedIn } from "~/helpers/fb/auth"-import { HoppRESTRequest } from "~/helpers/types/HoppRESTRequest"import { oauthRedirect } from "~/helpers/oauth"-import { HoppRESTAuthOAuth2 } from "~/helpers/types/HoppRESTAuth"import useWindowSize from "~/helpers/utils/useWindowSize"function bindRequestToURLParams() {diff --git a/packages/hoppscotch-app/pages/r/_id.vue b/packages/hoppscotch-app/pages/r/_id.vueindex 7713fc252..016e6651f 100644--- a/packages/hoppscotch-app/pages/r/_id.vue+++ b/packages/hoppscotch-app/pages/r/_id.vue@@ -63,13 +63,13 @@ import {watch,} from "@nuxtjs/composition-api"import * as E from "fp-ts/Either"+import { makeRESTRequest } from "@hoppscotch/data"import { useGQLQuery } from "~/helpers/backend/GQLClient"import {ResolveShortcodeDocument,ResolveShortcodeQuery,ResolveShortcodeQueryVariables,} from "~/helpers/backend/graphql"-import { makeRESTRequest } from "~/helpers/types/HoppRESTRequest"import { setRESTRequest } from "~/newstore/RESTSession"export default defineComponent({diff --git a/packages/hoppscotch-data/package-lock.json b/packages/hoppscotch-data/package-lock.jsonnew file mode 100644index 000000000..ae4f86748--- /dev/null+++ b/packages/hoppscotch-data/package-lock.json@@ -0,0 +1,356 @@+{+ "name": "@hoppscotch/data",+ "version": "0.1.0",+ "lockfileVersion": 2,+ "requires": true,+ "packages": {+ "": {+ "name": "@hoppscotch/data",+ "version": "0.1.0",+ "license": "MIT",+ "dependencies": {+ "fp-ts": "^2.11.5",+ "io-ts": "^2.2.16"+ },+ "devDependencies": {+ "esbuild": "^0.13.15",+ "rollup": "^2.60.0",+ "rollup-plugin-dts": "^4.0.1",+ "rollup-plugin-esbuild": "^4.7.2"+ }+ },+ "../../node_modules/.pnpm/[email protected]/node_modules/esbuild": {+ "version": "0.13.15",+ "dev": true,+ "hasInstallScript": true,+ "license": "MIT",+ "bin": {+ "esbuild": "bin/esbuild"+ },+ "optionalDependencies": {+ "esbuild-android-arm64": "0.13.15",+ "esbuild-darwin-64": "0.13.15",+ "esbuild-darwin-arm64": "0.13.15",+ "esbuild-freebsd-64": "0.13.15",+ "esbuild-freebsd-arm64": "0.13.15",+ "esbuild-linux-32": "0.13.15",+ "esbuild-linux-64": "0.13.15",+ "esbuild-linux-arm": "0.13.15",+ "esbuild-linux-arm64": "0.13.15",+ "esbuild-linux-mips64le": "0.13.15",+ "esbuild-linux-ppc64le": "0.13.15",+ "esbuild-netbsd-64": "0.13.15",+ "esbuild-openbsd-64": "0.13.15",+ "esbuild-sunos-64": "0.13.15",+ "esbuild-windows-32": "0.13.15",+ "esbuild-windows-64": "0.13.15",+ "esbuild-windows-arm64": "0.13.15"+ }+ },+ "../../node_modules/.pnpm/[email protected][email protected]/node_modules/rollup-plugin-dts": {+ "version": "4.0.1",+ "dev": true,+ "license": "LGPL-3.0",+ "dependencies": {+ "magic-string": "^0.25.7"+ },+ "devDependencies": {+ "@types/babel__code-frame": "^7.0.3",+ "@types/d3-drag": "^3.0.1",+ "@types/estree": "0.0.50",+ "@types/fs-extra": "^9.0.12",+ "@types/node": "^16.7.5",+ "@types/react": "^17.0.20",+ "c8": "^7.8.0",+ "fs-extra": "^10.0.0",+ "rimraf": "^3.0.2",+ "rollup": "2.56.3",+ "typescript": "4.4.2"+ },+ "engines": {+ "node": ">=v12.22.6"+ },+ "funding": {+ "url": "https://github.com/sponsors/Swatinem"+ },+ "optionalDependencies": {+ "@babel/code-frame": "^7.14.5"+ },+ "peerDependencies": {+ "rollup": "^2.56.3",+ "typescript": "^4.4.2"+ }+ },+ "../../node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/rollup-plugin-esbuild": {+ "version": "4.7.2",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@rollup/pluginutils": "^4.1.1",+ "joycon": "^3.0.1",+ "jsonc-parser": "^3.0.0"+ },+ "devDependencies": {+ "@types/jest": "^27.0.2",+ "@types/node": "14.14.37",+ "esbuild": "^0.13.13",+ "jest": "^27.3.1",+ "prettier": "^2.4.1",+ "rollup": "^2.59.0",+ "ts-jest": "^27.0.7",+ "tsup": "^5.7.2",+ "typescript": "^4.4.4"+ },+ "engines": {+ "node": ">=12"+ },+ "peerDependencies": {+ "esbuild": ">=0.10.1",+ "rollup": "^1.20.0 || ^2.0.0"+ }+ },+ "../../node_modules/.pnpm/[email protected]/node_modules/rollup": {+ "version": "2.60.0",+ "dev": true,+ "license": "MIT",+ "bin": {+ "rollup": "dist/bin/rollup"+ },+ "devDependencies": {+ "@rollup/plugin-alias": "^3.1.5",+ "@rollup/plugin-buble": "^0.21.3",+ "@rollup/plugin-commonjs": "^20.0.0",+ "@rollup/plugin-json": "^4.1.0",+ "@rollup/plugin-node-resolve": "^13.0.5",+ "@rollup/plugin-replace": "^3.0.0",+ "@rollup/plugin-typescript": "^8.2.5",+ "@rollup/pluginutils": "^4.1.1",+ "@types/node": "^10.17.60",+ "@types/require-relative": "^0.8.0",+ "@types/signal-exit": "^3.0.1",+ "@types/yargs-parser": "^20.2.1",+ "@typescript-eslint/eslint-plugin": "^4.32.0",+ "@typescript-eslint/parser": "^4.32.0",+ "acorn": "^8.5.0",+ "acorn-jsx": "^5.3.2",+ "acorn-walk": "^8.2.0",+ "buble": "^0.20.0",+ "chokidar": "^3.5.2",+ "colorette": "^1.4.0",+ "core-js": "^3.18.0",+ "date-time": "^4.0.0",+ "es5-shim": "^4.6.2",+ "es6-shim": "^0.35.6",+ "eslint": "^7.32.0",+ "eslint-config-prettier": "^8.3.0",+ "eslint-plugin-import": "^2.24.2",+ "eslint-plugin-prettier": "^3.4.1",+ "execa": "^5.1.1",+ "fixturify": "^2.1.1",+ "hash.js": "^1.1.7",+ "husky": "^6.0.0",+ "is-reference": "^3.0.0",+ "lint-staged": "^10.5.4",+ "locate-character": "^2.0.5",+ "magic-string": "^0.25.7",+ "mocha": "^8.4.0",+ "nyc": "^15.1.0",+ "pinst": "^2.1.6",+ "prettier": "^2.4.1",+ "pretty-bytes": "^5.6.0",+ "pretty-ms": "^7.0.1",+ "require-relative": "^0.8.7",+ "requirejs": "^2.3.6",+ "rollup": "^2.57.0",+ "rollup-plugin-license": "^2.5.0",+ "rollup-plugin-string": "^3.0.0",+ "rollup-plugin-terser": "^7.0.2",+ "rollup-plugin-thatworks": "^1.0.4",+ "sander": "^0.6.0",+ "shx": "^0.3.3",+ "signal-exit": "^3.0.5",+ "source-map": "^0.7.3",+ "source-map-support": "^0.5.20",+ "sourcemap-codec": "^1.4.8",+ "systemjs": "^6.10.3",+ "terser": "^5.9.0",+ "tslib": "^2.3.1",+ "typescript": "^4.4.3",+ "weak-napi": "^2.0.2",+ "yargs-parser": "^20.2.9"+ },+ "engines": {+ "node": ">=10.0.0"+ },+ "optionalDependencies": {+ "fsevents": "~2.3.2"+ }+ },+ "node_modules/esbuild": {+ "resolved": "../../node_modules/.pnpm/[email protected]/node_modules/esbuild",+ "link": true+ },+ "node_modules/fp-ts": {+ "version": "2.11.5",+ "resolved": "https://registry.npmjs.org/fp-ts/-/fp-ts-2.11.5.tgz",+ "integrity": "sha512-OqlwJq1BdpB83BZXTqI+dNcA6uYk6qk4u9Cgnt64Y+XS7dwdbp/mobx8S2KXf2AXH+scNmA/UVK3SEFHR3vHZA=="+ },+ "node_modules/io-ts": {+ "version": "2.2.16",+ "resolved": "https://registry.npmjs.org/io-ts/-/io-ts-2.2.16.tgz",+ "integrity": "sha512-y5TTSa6VP6le0hhmIyN0dqEXkrZeJLeC5KApJq6VLci3UEKF80lZ+KuoUs02RhBxNWlrqSNxzfI7otLX1Euv8Q==",+ "peerDependencies": {+ "fp-ts": "^2.5.0"+ }+ },+ "node_modules/rollup": {+ "resolved": "../../node_modules/.pnpm/[email protected]/node_modules/rollup",+ "link": true+ },+ "node_modules/rollup-plugin-dts": {+ "resolved": "../../node_modules/.pnpm/[email protected][email protected]/node_modules/rollup-plugin-dts",+ "link": true+ },+ "node_modules/rollup-plugin-esbuild": {+ "resolved": "../../node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/rollup-plugin-esbuild",+ "link": true+ }+ },+ "dependencies": {+ "esbuild": {+ "version": "file:../../node_modules/.pnpm/[email protected]/node_modules/esbuild",+ "requires": {+ "esbuild-android-arm64": "0.13.15",+ "esbuild-darwin-64": "0.13.15",+ "esbuild-darwin-arm64": "0.13.15",+ "esbuild-freebsd-64": "0.13.15",+ "esbuild-freebsd-arm64": "0.13.15",+ "esbuild-linux-32": "0.13.15",+ "esbuild-linux-64": "0.13.15",+ "esbuild-linux-arm": "0.13.15",+ "esbuild-linux-arm64": "0.13.15",+ "esbuild-linux-mips64le": "0.13.15",+ "esbuild-linux-ppc64le": "0.13.15",+ "esbuild-netbsd-64": "0.13.15",+ "esbuild-openbsd-64": "0.13.15",+ "esbuild-sunos-64": "0.13.15",+ "esbuild-windows-32": "0.13.15",+ "esbuild-windows-64": "0.13.15",+ "esbuild-windows-arm64": "0.13.15"+ }+ },+ "fp-ts": {+ "version": "2.11.5",+ "resolved": "https://registry.npmjs.org/fp-ts/-/fp-ts-2.11.5.tgz",+ "integrity": "sha512-OqlwJq1BdpB83BZXTqI+dNcA6uYk6qk4u9Cgnt64Y+XS7dwdbp/mobx8S2KXf2AXH+scNmA/UVK3SEFHR3vHZA=="+ },+ "io-ts": {+ "version": "2.2.16",+ "resolved": "https://registry.npmjs.org/io-ts/-/io-ts-2.2.16.tgz",+ "integrity": "sha512-y5TTSa6VP6le0hhmIyN0dqEXkrZeJLeC5KApJq6VLci3UEKF80lZ+KuoUs02RhBxNWlrqSNxzfI7otLX1Euv8Q==",+ "requires": {}+ },+ "rollup": {+ "version": "file:../../node_modules/.pnpm/[email protected]/node_modules/rollup",+ "requires": {+ "@rollup/plugin-alias": "^3.1.5",+ "@rollup/plugin-buble": "^0.21.3",+ "@rollup/plugin-commonjs": "^20.0.0",+ "@rollup/plugin-json": "^4.1.0",+ "@rollup/plugin-node-resolve": "^13.0.5",+ "@rollup/plugin-replace": "^3.0.0",+ "@rollup/plugin-typescript": "^8.2.5",+ "@rollup/pluginutils": "^4.1.1",+ "@types/node": "^10.17.60",+ "@types/require-relative": "^0.8.0",+ "@types/signal-exit": "^3.0.1",+ "@types/yargs-parser": "^20.2.1",+ "@typescript-eslint/eslint-plugin": "^4.32.0",+ "@typescript-eslint/parser": "^4.32.0",+ "acorn": "^8.5.0",+ "acorn-jsx": "^5.3.2",+ "acorn-walk": "^8.2.0",+ "buble": "^0.20.0",+ "chokidar": "^3.5.2",+ "colorette": "^1.4.0",+ "core-js": "^3.18.0",+ "date-time": "^4.0.0",+ "es5-shim": "^4.6.2",+ "es6-shim": "^0.35.6",+ "eslint": "^7.32.0",+ "eslint-config-prettier": "^8.3.0",+ "eslint-plugin-import": "^2.24.2",+ "eslint-plugin-prettier": "^3.4.1",+ "execa": "^5.1.1",+ "fixturify": "^2.1.1",+ "fsevents": "~2.3.2",+ "hash.js": "^1.1.7",+ "husky": "^6.0.0",+ "is-reference": "^3.0.0",+ "lint-staged": "^10.5.4",+ "locate-character": "^2.0.5",+ "magic-string": "^0.25.7",+ "mocha": "^8.4.0",+ "nyc": "^15.1.0",+ "pinst": "^2.1.6",+ "prettier": "^2.4.1",+ "pretty-bytes": "^5.6.0",+ "pretty-ms": "^7.0.1",+ "require-relative": "^0.8.7",+ "requirejs": "^2.3.6",+ "rollup": "^2.57.0",+ "rollup-plugin-license": "^2.5.0",+ "rollup-plugin-string": "^3.0.0",+ "rollup-plugin-terser": "^7.0.2",+ "rollup-plugin-thatworks": "^1.0.4",+ "sander": "^0.6.0",+ "shx": "^0.3.3",+ "signal-exit": "^3.0.5",+ "source-map": "^0.7.3",+ "source-map-support": "^0.5.20",+ "sourcemap-codec": "^1.4.8",+ "systemjs": "^6.10.3",+ "terser": "^5.9.0",+ "tslib": "^2.3.1",+ "typescript": "^4.4.3",+ "weak-napi": "^2.0.2",+ "yargs-parser": "^20.2.9"+ }+ },+ "rollup-plugin-dts": {+ "version": "file:../../node_modules/.pnpm/[email protected][email protected]/node_modules/rollup-plugin-dts",+ "requires": {+ "@babel/code-frame": "^7.14.5",+ "@types/babel__code-frame": "^7.0.3",+ "@types/d3-drag": "^3.0.1",+ "@types/estree": "0.0.50",+ "@types/fs-extra": "^9.0.12",+ "@types/node": "^16.7.5",+ "@types/react": "^17.0.20",+ "c8": "^7.8.0",+ "fs-extra": "^10.0.0",+ "magic-string": "^0.25.7",+ "rimraf": "^3.0.2",+ "rollup": "2.56.3",+ "typescript": "4.4.2"+ }+ },+ "rollup-plugin-esbuild": {+ "version": "file:../../node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/rollup-plugin-esbuild",+ "requires": {+ "@rollup/pluginutils": "^4.1.1",+ "@types/jest": "^27.0.2",+ "@types/node": "14.14.37",+ "esbuild": "^0.13.13",+ "jest": "^27.3.1",+ "joycon": "^3.0.1",+ "jsonc-parser": "^3.0.0",+ "prettier": "^2.4.1",+ "rollup": "^2.59.0",+ "ts-jest": "^27.0.7",+ "tsup": "^5.7.2",+ "typescript": "^4.4.4"+ }+ }+ }+}diff --git a/packages/hoppscotch-data/package.json b/packages/hoppscotch-data/package.jsonnew file mode 100644index 000000000..028601a0f--- /dev/null+++ b/packages/hoppscotch-data/package.json@@ -0,0 +1,32 @@+{+ "name": "@hoppscotch/data",+ "version": "0.1.0",+ "description": "Data Types, Validations and Migrations for Hoppscotch Public Data Structures",+ "main": "dist/index.js",+ "module": "true",+ "files": [+ "dist"+ ],+ "scripts": {+ "build": "tsup src --dts",+ "prepare": "tsup src --dts"+ },+ "exports": {+ ".": "./dist/index.js",+ "./graphql": "./dist/graphql/index.js",+ "./rest": "./dist/rest/index.js"+ },+ "repository": {+ "type": "git",+ "url": "git+https://github.com/hoppscotch/hoppscotch.git"+ },+ "author": "The Hoppscotch Team <[email protected]>",+ "license": "MIT",+ "bugs": {+ "url": "https://github.com/hoppscotch/hoppscotch/issues"+ },+ "homepage": "https://github.com/hoppscotch/hoppscotch#readme",+ "devDependencies": {+ "tsup": "^5.9.0"+ }+}diff --git a/packages/hoppscotch-data/rollup.config.js b/packages/hoppscotch-data/rollup.config.jsnew file mode 100644index 000000000..b9f5b1422--- /dev/null+++ b/packages/hoppscotch-data/rollup.config.js@@ -0,0 +1,36 @@+import dts from 'rollup-plugin-dts'+import esbuild from 'rollup-plugin-esbuild'+import multi from '@rollup/plugin-multi-entry'++const name = require('./package.json').main.replace(/\.js$/, '')++const bundle = config => ({+ ...config,+ input: 'src/**/*.ts',+ external: id => !/^[./]/.test(id),+})++export default [+ bundle({+ plugins: [multi(), esbuild()],+ output: [+ {+ file: `${name}.js`,+ format: 'cjs',+ sourcemap: true,+ },+ {+ file: `${name}.mjs`,+ format: 'es',+ sourcemap: true,+ },+ ],+ }),+ bundle({+ plugins: [dts()],+ output: {+ file: `${name}.d.ts`,+ format: 'es',+ },+ }),+]diff --git a/packages/hoppscotch-app/helpers/types/HoppGQLRequest.ts b/packages/hoppscotch-data/src/graphql/index.tssimilarity index 99%rename from packages/hoppscotch-app/helpers/types/HoppGQLRequest.tsrename to packages/hoppscotch-data/src/graphql/index.tsindex d67f73740..d029034d8 100644--- a/packages/hoppscotch-app/helpers/types/HoppGQLRequest.ts+++ b/packages/hoppscotch-data/src/graphql/index.ts@@ -38,4 +38,4 @@ export function makeGQLRequest(x: Omit<HoppGQLRequest, "v">) {v: 1,...x,}-}+}\ No newline at end of filediff --git a/packages/hoppscotch-data/src/index.ts b/packages/hoppscotch-data/src/index.tsnew file mode 100644index 000000000..c04248957--- /dev/null+++ b/packages/hoppscotch-data/src/index.ts@@ -0,0 +1,2 @@+export * from "./rest"+export * from "./graphql"\ No newline at end of filediff --git a/packages/hoppscotch-app/helpers/types/HoppRESTAuth.ts b/packages/hoppscotch-data/src/rest/HoppRESTAuth.tssimilarity index 99%rename from packages/hoppscotch-app/helpers/types/HoppRESTAuth.tsrename to packages/hoppscotch-data/src/rest/HoppRESTAuth.tsindex 8cbcd92ac..b8befef7b 100644--- a/packages/hoppscotch-app/helpers/types/HoppRESTAuth.ts+++ b/packages/hoppscotch-data/src/rest/HoppRESTAuth.ts@@ -31,4 +31,4 @@ export type HoppRESTAuth = { authActive: boolean } & (| HoppRESTAuthBasic| HoppRESTAuthBearer| HoppRESTAuthOAuth2-)+)\ No newline at end of filediff --git a/packages/hoppscotch-data/src/rest/content-types.ts b/packages/hoppscotch-data/src/rest/content-types.tsnew file mode 100644index 000000000..1950d673f--- /dev/null+++ b/packages/hoppscotch-data/src/rest/content-types.ts@@ -0,0 +1,13 @@+export const knownContentTypes = {+ "application/json": "json",+ "application/ld+json": "json",+ "application/hal+json": "json",+ "application/vnd.api+json": "json",+ "application/xml": "xml",+ "application/x-www-form-urlencoded": "multipart",+ "multipart/form-data": "multipart",+ "text/html": "html",+ "text/plain": "plain",+}++export type ValidContentTypes = keyof typeof knownContentTypes\ No newline at end of filediff --git a/packages/hoppscotch-app/helpers/types/HoppRESTRequest.ts b/packages/hoppscotch-data/src/rest/index.tssimilarity index 96%rename from packages/hoppscotch-app/helpers/types/HoppRESTRequest.tsrename to packages/hoppscotch-data/src/rest/index.tsindex d7cabac16..9ebb42b49 100644--- a/packages/hoppscotch-app/helpers/types/HoppRESTRequest.ts+++ b/packages/hoppscotch-data/src/rest/index.ts@@ -1,6 +1,9 @@-import { ValidContentTypes } from "../utils/contenttypes"+import { ValidContentTypes } from "./content-types"import { HoppRESTAuth } from "./HoppRESTAuth"+export * from "./content-types"+export * from "./HoppRESTAuth"+export const RESTReqSchemaVersion = "1"export type HoppRESTParam = {diff --git a/packages/hoppscotch-data/tsconfig.json b/packages/hoppscotch-data/tsconfig.jsonnew file mode 100644index 000000000..9e5ddf62d--- /dev/null+++ b/packages/hoppscotch-data/tsconfig.json@@ -0,0 +1,12 @@+{+ "compilerOptions": {+ "target": "es2017",+ "module": "esnext",+ "lib": ["esnext"],+ "moduleResolution": "node",+ "esModuleInterop": true,+ "strict": true,+ "strictNullChecks": true,+ "resolveJsonModule": true+ }+}\ No newline at end of filediff --git a/packages/hoppscotch-data/tsup.config.ts b/packages/hoppscotch-data/tsup.config.tsnew file mode 100644index 000000000..0a65a40d7--- /dev/null+++ b/packages/hoppscotch-data/tsup.config.ts@@ -0,0 +1,18 @@+import { Options } from 'tsup'++const options: Options = {+ format: [+ 'cjs',+ // loading Babel in ESM is tricky, since Babel itself it CJS only+ // we decided to drop ESM support until Babel supports native ESM+ // 'esm',+ ],+ clean: true,+ splitting: true,+ dts: true,+ entryPoints: [+ 'src/**/*.ts',+ ],+}++export default options\ No newline at end of filediff --git a/pnpm-lock.yaml b/pnpm-lock.yamlindex 6b8170220..1bdcfb27d 100644--- a/pnpm-lock.yaml+++ b/pnpm-lock.yaml@@ -70,6 +70,7 @@ importers:'@graphql-codegen/urql-introspection': ^2.1.0'@graphql-typed-document-node/core': ^3.1.1'@hoppscotch/codemirror-lang-graphql': workspace:^0.1.0+ '@hoppscotch/data': workspace:^0.1.0'@hoppscotch/js-sandbox': workspace:^1.0.0'@nuxt/types': ^2.15.8'@nuxt/typescript-build': ^2.1.0@@ -181,6 +182,7 @@ importers:'@codemirror/text': 0.19.5'@codemirror/view': 0.19.21'@hoppscotch/codemirror-lang-graphql': link:../codemirror-lang-graphql+ '@hoppscotch/data': link:../hoppscotch-data'@hoppscotch/js-sandbox': link:../hoppscotch-js-sandbox'@nuxtjs/axios': 5.13.6'@nuxtjs/composition-api': [email protected]@@ -283,6 +285,12 @@ importers:vue-jest: [email protected]worker-loader: 3.0.8+ packages/hoppscotch-data:+ specifiers:+ tsup: ^5.9.0+ devDependencies:+ tsup: 5.9.0+packages/hoppscotch-js-sandbox:specifiers:'@digitak/esrun': ^2.0.1@@ -2854,7 +2862,7 @@ packages:'@types/json-stable-stringify': 1.0.33'@types/jsonwebtoken': 8.5.6chalk: 4.1.2- debug: 4.3.2+ debug: 4.3.3dotenv: 10.0.0graphql: 15.7.2graphql-request: [email protected]@@ -3483,11 +3491,11 @@ packages:ufo: 0.7.9dev: false- /@nuxt/kit-edge/3.0.0-27296423.f3082ca:- resolution: {integrity: sha512-gR0tIjo528V6OmHB0dNGkucUg+X6Gv1OO2vgz+D3uc+JqiPGCytK8gSPCnylqnb0yORRFC8NmXrJaHGuGcNgFw==}+ /@nuxt/kit-edge/3.0.0-27303148.ac98373:+ resolution: {integrity: sha512-eESI4BbtuMrdtcRq8mZXBUpJOQFNOQ5TxJvbcl6fGC/3MDxSCsssEd3vWAt2bFcvmStyDWZ9hs/H1lo9Qh52fw==}engines: {node: ^14.16.0 || ^16.11.0 || ^17.0.0}dependencies:- '@nuxt/schema': /@nuxt/schema-edge/3.0.0-27296423.f3082ca+ '@nuxt/schema': /@nuxt/schema-edge/3.0.0-27303148.ac98373consola: 2.15.3defu: 5.0.0dotenv: 10.0.0@@ -3508,7 +3516,7 @@ packages:/@nuxt/kit/0.8.1-edge:resolution: {integrity: sha512-7kU+mYxRy3w9UohFK/rfrPkKXM9A4LWsTqpFN3MH7mxohy98SFBkf87B6nqE6ulXmztInK+MptS0Lr+VQa0E6w==}dependencies:- '@nuxt/kit-edge': 3.0.0-27296423.f3082ca+ '@nuxt/kit-edge': 3.0.0-27303148.ac98373dev: true/@nuxt/loading-screen/2.0.4:@@ -3531,8 +3539,8 @@ packages:node-fetch: 2.6.6dev: false- /@nuxt/schema-edge/3.0.0-27296423.f3082ca:- resolution: {integrity: sha512-AYMtVCYjHxS1Xk9wRRTafasvJmRiuuMjf8oV+lnfWsC8QjTXwTk0BjPcUF8Ro0Jn3btuW9ykPqRosy85ixfCRg==}+ /@nuxt/schema-edge/3.0.0-27303148.ac98373:+ resolution: {integrity: sha512-XT1nqGsISrmDfshGCh/PsfPG917iYRw/4tnt+fMBAaY+dREONf83OWLrNIS5xQRtVdMsQgMj+Yq2J2QTaq2BAA==}engines: {node: ^14.16.0 || ^16.11.0 || ^17.0.0}dependencies:create-require: 1.1.1@@ -5342,6 +5350,10 @@ packages:engines: {node: '>=6'}dev: true+ /any-promise/1.3.0:+ resolution: {integrity: sha1-q8av7tzqUugJzcA3au0845Y10X8=}+ dev: true+/anymatch/2.0.0:resolution: {integrity: sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==}dependencies:@@ -6658,7 +6670,6 @@ packages:/commander/4.1.1:resolution: {integrity: sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==}engines: {node: '>= 6'}- dev: false/commander/7.2.0:resolution: {integrity: sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==}@@ -7940,12 +7951,172 @@ packages:is-date-object: 1.0.5is-symbol: 1.0.4+ /esbuild-android-arm64/0.13.15:+ resolution: {integrity: sha512-m602nft/XXeO8YQPUDVoHfjyRVPdPgjyyXOxZ44MK/agewFFkPa8tUo6lAzSWh5Ui5PB4KR9UIFTSBKh/RrCmg==}+ cpu: [arm64]+ os: [android]+ requiresBuild: true+ dev: true+ optional: true++ /esbuild-darwin-64/0.13.15:+ resolution: {integrity: sha512-ihOQRGs2yyp7t5bArCwnvn2Atr6X4axqPpEdCFPVp7iUj4cVSdisgvEKdNR7yH3JDjW6aQDw40iQFoTqejqxvQ==}+ cpu: [x64]+ os: [darwin]+ requiresBuild: true+ dev: true+ optional: true++ /esbuild-darwin-arm64/0.13.15:+ resolution: {integrity: sha512-i1FZssTVxUqNlJ6cBTj5YQj4imWy3m49RZRnHhLpefFIh0To05ow9DTrXROTE1urGTQCloFUXTX8QfGJy1P8dQ==}+ cpu: [arm64]+ os: [darwin]+ requiresBuild: true+ dev: true+ optional: true++ /esbuild-freebsd-64/0.13.15:+ resolution: {integrity: sha512-G3dLBXUI6lC6Z09/x+WtXBXbOYQZ0E8TDBqvn7aMaOCzryJs8LyVXKY4CPnHFXZAbSwkCbqiPuSQ1+HhrNk7EA==}+ cpu: [x64]+ os: [freebsd]+ requiresBuild: true+ dev: true+ optional: true++ /esbuild-freebsd-arm64/0.13.15:+ resolution: {integrity: sha512-KJx0fzEDf1uhNOZQStV4ujg30WlnwqUASaGSFPhznLM/bbheu9HhqZ6mJJZM32lkyfGJikw0jg7v3S0oAvtvQQ==}+ cpu: [arm64]+ os: [freebsd]+ requiresBuild: true+ dev: true+ optional: true++ /esbuild-linux-32/0.13.15:+ resolution: {integrity: sha512-ZvTBPk0YWCLMCXiFmD5EUtB30zIPvC5Itxz0mdTu/xZBbbHJftQgLWY49wEPSn2T/TxahYCRDWun5smRa0Tu+g==}+ cpu: [ia32]+ os: [linux]+ requiresBuild: true+ dev: true+ optional: true++ /esbuild-linux-64/0.13.15:+ resolution: {integrity: sha512-eCKzkNSLywNeQTRBxJRQ0jxRCl2YWdMB3+PkWFo2BBQYC5mISLIVIjThNtn6HUNqua1pnvgP5xX0nHbZbPj5oA==}+ cpu: [x64]+ os: [linux]+ requiresBuild: true+ dev: true+ optional: true++ /esbuild-linux-arm/0.13.15:+ resolution: {integrity: sha512-wUHttDi/ol0tD8ZgUMDH8Ef7IbDX+/UsWJOXaAyTdkT7Yy9ZBqPg8bgB/Dn3CZ9SBpNieozrPRHm0BGww7W/jA==}+ cpu: [arm]+ os: [linux]+ requiresBuild: true+ dev: true+ optional: true++ /esbuild-linux-arm64/0.13.15:+ resolution: {integrity: sha512-bYpuUlN6qYU9slzr/ltyLTR9YTBS7qUDymO8SV7kjeNext61OdmqFAzuVZom+OLW1HPHseBfJ/JfdSlx8oTUoA==}+ cpu: [arm64]+ os: [linux]+ requiresBuild: true+ dev: true+ optional: true++ /esbuild-linux-mips64le/0.13.15:+ resolution: {integrity: sha512-KlVjIG828uFPyJkO/8gKwy9RbXhCEUeFsCGOJBepUlpa7G8/SeZgncUEz/tOOUJTcWMTmFMtdd3GElGyAtbSWg==}+ cpu: [mips64el]+ os: [linux]+ requiresBuild: true+ dev: true+ optional: true++ /esbuild-linux-ppc64le/0.13.15:+ resolution: {integrity: sha512-h6gYF+OsaqEuBjeesTBtUPw0bmiDu7eAeuc2OEH9S6mV9/jPhPdhOWzdeshb0BskRZxPhxPOjqZ+/OqLcxQwEQ==}+ cpu: [ppc64]+ os: [linux]+ requiresBuild: true+ dev: true+ optional: true++ /esbuild-netbsd-64/0.13.15:+ resolution: {integrity: sha512-3+yE9emwoevLMyvu+iR3rsa+Xwhie7ZEHMGDQ6dkqP/ndFzRHkobHUKTe+NCApSqG5ce2z4rFu+NX/UHnxlh3w==}+ cpu: [x64]+ os: [netbsd]+ requiresBuild: true+ dev: true+ optional: true++ /esbuild-openbsd-64/0.13.15:+ resolution: {integrity: sha512-wTfvtwYJYAFL1fSs8yHIdf5GEE4NkbtbXtjLWjM3Cw8mmQKqsg8kTiqJ9NJQe5NX/5Qlo7Xd9r1yKMMkHllp5g==}+ cpu: [x64]+ os: [openbsd]+ requiresBuild: true+ dev: true+ optional: true++ /esbuild-sunos-64/0.13.15:+ resolution: {integrity: sha512-lbivT9Bx3t1iWWrSnGyBP9ODriEvWDRiweAs69vI+miJoeKwHWOComSRukttbuzjZ8r1q0mQJ8Z7yUsDJ3hKdw==}+ cpu: [x64]+ os: [sunos]+ requiresBuild: true+ dev: true+ optional: true++ /esbuild-windows-32/0.13.15:+ resolution: {integrity: sha512-fDMEf2g3SsJ599MBr50cY5ve5lP1wyVwTe6aLJsM01KtxyKkB4UT+fc5MXQFn3RLrAIAZOG+tHC+yXObpSn7Nw==}+ cpu: [ia32]+ os: [win32]+ requiresBuild: true+ dev: true+ optional: true++ /esbuild-windows-64/0.13.15:+ resolution: {integrity: sha512-9aMsPRGDWCd3bGjUIKG/ZOJPKsiztlxl/Q3C1XDswO6eNX/Jtwu4M+jb6YDH9hRSUflQWX0XKAfWzgy5Wk54JQ==}+ cpu: [x64]+ os: [win32]+ requiresBuild: true+ dev: true+ optional: true++ /esbuild-windows-arm64/0.13.15:+ resolution: {integrity: sha512-zzvyCVVpbwQQATaf3IG8mu1IwGEiDxKkYUdA4FpoCHi1KtPa13jeScYDjlW0Qh+ebWzpKfR2ZwvqAQkSWNcKjA==}+ cpu: [arm64]+ os: [win32]+ requiresBuild: true+ dev: true+ optional: true+/esbuild/0.12.29:resolution: {integrity: sha512-w/XuoBCSwepyiZtIRsKsetiLDUVGPVw1E/R3VTFSecIy8UR7Cq3SOtwKHJMFoVqqVG36aGkzh4e8BvpO1Fdc7g==}hasBin: truerequiresBuild: truedev: true+ /esbuild/0.13.15:+ resolution: {integrity: sha512-raCxt02HBKv8RJxE8vkTSCXGIyKHdEdGfUmiYb8wnabnaEmHzyW7DCHb5tEN0xU8ryqg5xw54mcwnYkC4x3AIw==}+ hasBin: true+ requiresBuild: true+ optionalDependencies:+ esbuild-android-arm64: 0.13.15+ esbuild-darwin-64: 0.13.15+ esbuild-darwin-arm64: 0.13.15+ esbuild-freebsd-64: 0.13.15+ esbuild-freebsd-arm64: 0.13.15+ esbuild-linux-32: 0.13.15+ esbuild-linux-64: 0.13.15+ esbuild-linux-arm: 0.13.15+ esbuild-linux-arm64: 0.13.15+ esbuild-linux-mips64le: 0.13.15+ esbuild-linux-ppc64le: 0.13.15+ esbuild-netbsd-64: 0.13.15+ esbuild-openbsd-64: 0.13.15+ esbuild-sunos-64: 0.13.15+ esbuild-windows-32: 0.13.15+ esbuild-windows-64: 0.13.15+ esbuild-windows-arm64: 0.13.15+ dev: true+/escalade/3.1.1:resolution: {integrity: sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==}engines: {node: '>=6'}@@ -9100,6 +9271,17 @@ packages:is-glob: 4.0.3dev: true+ /glob/7.1.6:+ resolution: {integrity: sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==}+ dependencies:+ fs.realpath: 1.0.0+ inflight: 1.0.6+ inherits: 2.0.4+ minimatch: 3.0.4+ once: 1.4.0+ path-is-absolute: 1.0.1+ dev: true+/glob/7.1.7:resolution: {integrity: sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==}dependencies:@@ -9675,7 +9857,7 @@ packages:dependencies:'@tootallnate/once': 2.0.0agent-base: 6.0.2- debug: 4.3.2+ debug: 4.3.3transitivePeerDependencies:- supports-colordev: true@@ -9805,6 +9987,13 @@ packages:import-from: 2.1.0dev: false+ /import-cwd/3.0.0:+ resolution: {integrity: sha512-4pnzH16plW+hgvRECbDWpQl3cqtvSofHWh44met7ESfZ8UZOWWddm8hEyDTqREJ9RbYHY8gi8DqmaelApoOGMg==}+ engines: {node: '>=8'}+ dependencies:+ import-from: 3.0.0+ dev: true+/import-fresh/2.0.0:resolution: {integrity: sha1-2BNVwVYS04bGH53dOSLUMEgipUY=}engines: {node: '>=4'}@@ -9828,6 +10017,13 @@ packages:resolve-from: 3.0.0dev: false+ /import-from/3.0.0:+ resolution: {integrity: sha512-CiuXOFFSzkU5x/CR0+z7T91Iht4CXgfCxVOFRhh2Zyhg5wOpWvvDLQUsWl+gcN+QscYBjez8hDCt85O7RLDttQ==}+ engines: {node: '>=8'}+ dependencies:+ resolve-from: 5.0.0+ dev: true+/import-from/4.0.0:resolution: {integrity: sha512-P9J71vT5nLlDeV8FHs5nNxaLbrpfAV5cF5srvbZfpwpcJoM/xZR3hiv+q+SAnuSmuGbXMWud063iIMx/V/EWZQ==}engines: {node: '>=12.2'}@@ -10951,6 +11147,11 @@ packages:resolution: {integrity: sha512-TdcJywkQtcwLxogc4rSMAi479G2eDPzfW0fLySks7TPhgZZ4s/tM6stnzayIh3gS/db3zExWJyUx4cNWrwAmoQ==}hasBin: true+ /joycon/3.0.1:+ resolution: {integrity: sha512-SJcJNBg32dGgxhPtM0wQqxqV0ax9k/9TaUskGDSJkSFSQOEWWvQ3zzWdGQRIUry2j1zA5+ReH13t0Mf3StuVZA==}+ engines: {node: '>=10'}+ dev: true+/js-base64/2.6.4:resolution: {integrity: sha512-pZe//GGmwJndub7ZghVHz7vjb2LgC1m8B07Au3eYqeqv9emhESByMXxaEgkUkEqJe87oBbSniGYoQNIBklc7IQ==}dev: true@@ -11273,7 +11474,6 @@ packages:/lilconfig/2.0.4:resolution: {integrity: sha512-bfTIN7lEsiooCocSISTWXkiWJkRqtL9wYtYy+8EK3Y41qh3mpwPU0ycTOgjdY9ErwXCc8QyrQp82bdL0Xkm9yA==}engines: {node: '>=10'}- dev: false/lines-and-columns/1.2.4:resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==}@@ -12075,6 +12275,14 @@ packages:/mute-stream/0.0.8:resolution: {integrity: sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==}+ /mz/2.7.0:+ resolution: {integrity: sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==}+ dependencies:+ any-promise: 1.3.0+ object-assign: 4.1.1+ thenify-all: 1.6.0+ dev: true+/nan/2.15.0:resolution: {integrity: sha512-8ZtvEnA2c5aYCZYd1cvgdnU6cqwixRoYg70xPLWUws5ORTa/lnw+u4amixRS/Ac5U5mQVgp9pnlSUnbNWFaWZQ==}requiresBuild: true@@ -13188,6 +13396,20 @@ packages:import-cwd: 2.1.0dev: false+ /postcss-load-config/3.1.0:+ resolution: {integrity: sha512-ipM8Ds01ZUophjDTQYSVP70slFSYg3T0/zyfII5vzhN6V57YSxMgG5syXuwi5VtS8wSf3iL30v0uBdoIVx4Q0g==}+ engines: {node: '>= 10'}+ peerDependencies:+ ts-node: '>=9.0.0'+ peerDependenciesMeta:+ ts-node:+ optional: true+ dependencies:+ import-cwd: 3.0.0+ lilconfig: 2.0.4+ yaml: 1.10.2+ dev: true+/postcss-loader/3.0.0:resolution: {integrity: sha512-cLWoDEY5OwHcAjDnkyRQzAXfs2jrKjXpO/HQFcc5b5u/r7aa471wdmChmwfnv7x2u840iat/wi0lQ5nbRgSkUA==}engines: {node: '>= 6'}@@ -15512,6 +15734,19 @@ packages:- bufferutil- utf-8-validate+ /sucrase/3.20.3:+ resolution: {integrity: sha512-azqwq0/Bs6RzLAdb4dXxsCgMtAaD2hzmUr4UhSfsxO46JFPAwMnnb441B/qsudZiS6Ylea3JXZe3Q497lsgXzQ==}+ engines: {node: '>=8'}+ hasBin: true+ dependencies:+ commander: 4.1.1+ glob: 7.1.6+ lines-and-columns: 1.2.4+ mz: 2.7.0+ pirates: 4.0.1+ ts-interface-checker: 0.1.13+ dev: true+/supports-color/2.0.0:resolution: {integrity: sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=}engines: {node: '>=0.8.0'}@@ -15778,6 +16013,19 @@ packages:/text-table/0.2.0:resolution: {integrity: sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=}+ /thenify-all/1.6.0:+ resolution: {integrity: sha1-GhkY1ALY/D+Y+/I02wvMjMEOlyY=}+ engines: {node: '>=0.8'}+ dependencies:+ thenify: 3.3.1+ dev: true++ /thenify/3.3.1:+ resolution: {integrity: sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==}+ dependencies:+ any-promise: 1.3.0+ dev: true+/thread-loader/[email protected]:resolution: {integrity: sha512-ByaL2TPb+m6yArpqQUZvP+5S1mZtXsEP7nWKKlAUTm7fCml8kB5s1uI3+eHRP2bk5mVYfRSBI7FFf+tWEyLZwA==}engines: {node: '>= 10.13.0'}@@ -15946,6 +16194,11 @@ packages:resolution: {integrity: sha1-y99WD9e5r2MlAv7UD5GMFX6pcTc=}dev: true+ /tree-kill/1.2.2:+ resolution: {integrity: sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==}+ hasBin: true+ dev: true+/trim-newlines/3.0.1:resolution: {integrity: sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw==}engines: {node: '>=8'}@@ -15961,6 +16214,10 @@ packages:typescript: 4.5.2dev: true+ /ts-interface-checker/0.1.13:+ resolution: {integrity: sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==}+ dev: true+/ts-invariant/0.9.3:resolution: {integrity: sha512-HinBlTbFslQI0OHP07JLsSXPibSegec6r9ai5xxq/qHYCsIQbzpymLpDhAUsnXcSrDEcd0L62L8vsOEdzM0qlA==}engines: {node: '>=8'}@@ -16106,6 +16363,33 @@ packages:/tslib/2.3.1:resolution: {integrity: sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==}+ /tsup/5.9.0:+ resolution: {integrity: sha512-GAu+q/x2e/PM0owEEtNIYIfK0U8FZkaredZP+zX4pLoc3t8UEnK9MDCIhhbWjZXvXi+VKD13rQ0+loIFRrHpkQ==}+ hasBin: true+ peerDependencies:+ typescript: ^4.2.3+ peerDependenciesMeta:+ typescript:+ optional: true+ dependencies:+ cac: 6.7.11+ chalk: 4.1.2+ chokidar: 3.5.2+ debug: 4.3.2+ esbuild: 0.13.15+ execa: 5.1.1+ globby: 11.0.4+ joycon: 3.0.1+ postcss-load-config: 3.1.0+ resolve-from: 5.0.0+ rollup: 2.60.1+ sucrase: 3.20.3+ tree-kill: 1.2.2+ transitivePeerDependencies:+ - supports-color+ - ts-node+ dev: true+/tsutils/[email protected]:resolution: {integrity: sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==}engines: {node: '>= 6'}