repo stringlengths 7 64 | file_url stringlengths 81 338 | file_path stringlengths 5 257 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 15:25:31 2026-01-05 01:50:38 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/services/spotlight/searchers/general.searcher.ts | packages/hoppscotch-common/src/services/spotlight/searchers/general.searcher.ts | import { Component, markRaw, reactive } from "vue"
import { invokeAction } from "~/helpers/actions"
import { getI18n } from "~/modules/i18n"
import { SpotlightSearcherResult, SpotlightService } from ".."
import {
SearchResult,
StaticSpotlightSearcherService,
} from "./base/static.searcher"
import IconLinkedIn from... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/services/spotlight/searchers/workspace.searcher.ts | packages/hoppscotch-common/src/services/spotlight/searchers/workspace.searcher.ts | import {
Component,
Ref,
computed,
effectScope,
markRaw,
reactive,
ref,
watch,
} from "vue"
import { invokeAction } from "~/helpers/actions"
import { getI18n } from "~/modules/i18n"
import {
SpotlightSearcher,
SpotlightSearcherResult,
SpotlightSearcherSessionState,
SpotlightService,
} from ".."
... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/services/spotlight/searchers/tab.searcher.ts | packages/hoppscotch-common/src/services/spotlight/searchers/tab.searcher.ts | import { Component, computed, markRaw, reactive } from "vue"
import { getI18n } from "~/modules/i18n"
import { SpotlightSearcherResult, SpotlightService } from ".."
import {
SearchResult,
StaticSpotlightSearcherService,
} from "./base/static.searcher"
import { useRoute } from "vue-router"
import IconCopy from "~ic... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/services/spotlight/searchers/request.searcher.ts | packages/hoppscotch-common/src/services/spotlight/searchers/request.searcher.ts | import { Component, computed, markRaw, reactive } from "vue"
import { invokeAction, isActionBound } from "~/helpers/actions"
import { getI18n } from "~/modules/i18n"
import { SpotlightSearcherResult, SpotlightService } from ".."
import {
SearchResult,
StaticSpotlightSearcherService,
} from "./base/static.searcher"
... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/services/spotlight/searchers/history.searcher.ts | packages/hoppscotch-common/src/services/spotlight/searchers/history.searcher.ts | import { Service } from "dioc"
import {
SpotlightSearcher,
SpotlightSearcherResult,
SpotlightSearcherSessionState,
SpotlightService,
} from "../"
import { Ref, computed, effectScope, markRaw, ref, watch } from "vue"
import { getI18n } from "~/modules/i18n"
import MiniSearch from "minisearch"
import { graphqlHis... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/services/spotlight/searchers/environment.searcher.ts | packages/hoppscotch-common/src/services/spotlight/searchers/environment.searcher.ts | import {
Component,
Ref,
computed,
effectScope,
markRaw,
reactive,
ref,
watch,
} from "vue"
import { activeActions$, invokeAction } from "~/helpers/actions"
import { getI18n } from "~/modules/i18n"
import {
SpotlightSearcher,
SpotlightSearcherResult,
SpotlightSearcherSessionState,
SpotlightServi... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/services/spotlight/searchers/miscellaneous.searcher.ts | packages/hoppscotch-common/src/services/spotlight/searchers/miscellaneous.searcher.ts | import { Component, markRaw, reactive } from "vue"
import { invokeAction } from "~/helpers/actions"
import { getI18n } from "~/modules/i18n"
import { SpotlightSearcherResult, SpotlightService } from ".."
import {
SearchResult,
StaticSpotlightSearcherService,
} from "./base/static.searcher"
import IconShare from "~... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/services/spotlight/searchers/user.searcher.ts | packages/hoppscotch-common/src/services/spotlight/searchers/user.searcher.ts | import { SpotlightSearcherResult, SpotlightService } from ".."
import {
SearchResult,
StaticSpotlightSearcherService,
} from "./base/static.searcher"
import { getI18n } from "~/modules/i18n"
import { Component, computed, markRaw, reactive } from "vue"
import { useStreamStatic } from "~/composables/stream"
import Ic... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/services/spotlight/searchers/response.searcher.ts | packages/hoppscotch-common/src/services/spotlight/searchers/response.searcher.ts | import { Component, computed, markRaw, reactive } from "vue"
import { invokeAction, isActionBound } from "~/helpers/actions"
import { getI18n } from "~/modules/i18n"
import { SpotlightSearcherResult, SpotlightService } from ".."
import {
SearchResult,
StaticSpotlightSearcherService,
} from "./base/static.searcher"
... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/services/spotlight/searchers/teamRequest.searcher.ts | packages/hoppscotch-common/src/services/spotlight/searchers/teamRequest.searcher.ts | import { Service } from "dioc"
import {
SpotlightResultTextType,
SpotlightSearcher,
SpotlightSearcherResult,
SpotlightSearcherSessionState,
SpotlightService,
} from ".."
import { getI18n } from "~/modules/i18n"
import { Ref, computed, effectScope, markRaw, ref, watch } from "vue"
import { TeamSearchService } ... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/services/spotlight/searchers/base/static.searcher.ts | packages/hoppscotch-common/src/services/spotlight/searchers/base/static.searcher.ts | import { Container, Service } from "dioc"
import {
type SpotlightSearcher,
type SpotlightSearcherResult,
type SpotlightSearcherSessionState,
} from "../.."
import MiniSearch from "minisearch"
import { Ref, computed, effectScope, ref, watch, toValue } from "vue"
/**
* Defines a search result and additional metad... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/services/spotlight/searchers/base/__tests__/static.searcher.spec.ts | packages/hoppscotch-common/src/services/spotlight/searchers/base/__tests__/static.searcher.spec.ts | import { describe, it, expect, vi } from "vitest"
import {
SearchResult,
StaticSpotlightSearcherService,
} from "../static.searcher"
import { nextTick, reactive, ref } from "vue"
import { SpotlightSearcherResult } from "../../.."
import { TestContainer } from "dioc/testing"
import { Container } from "dioc"
async f... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/services/spotlight/searchers/__tests__/user.searcher.spec.ts | packages/hoppscotch-common/src/services/spotlight/searchers/__tests__/user.searcher.spec.ts | import { beforeEach, describe, it, expect, vi } from "vitest"
import { TestContainer } from "dioc/testing"
import { UserSpotlightSearcherService } from "../user.searcher"
import { nextTick, ref } from "vue"
import { SpotlightService } from "../.."
async function flushPromises() {
return await new Promise((r) => setT... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/services/spotlight/searchers/__tests__/history.searcher.spec.ts | packages/hoppscotch-common/src/services/spotlight/searchers/__tests__/history.searcher.spec.ts | import { TestContainer } from "dioc/testing"
import { beforeEach, describe, expect, it, vi } from "vitest"
import { HistorySpotlightSearcherService } from "../history.searcher"
import { nextTick, ref } from "vue"
import { SpotlightService } from "../.."
import { GQLHistoryEntry, RESTHistoryEntry } from "~/newstore/hist... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/services/spotlight/__tests__/index.spec.ts | packages/hoppscotch-common/src/services/spotlight/__tests__/index.spec.ts | import { TestContainer } from "dioc/testing"
import { beforeAll, beforeEach, describe, expect, it, vi } from "vitest"
import { Ref, computed, nextTick, ref, watch } from "vue"
import { setPlatformDef } from "~/platform"
import { HoppSpotlightSessionEventData } from "~/platform/analytics"
import {
SpotlightSearcher,
... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/services/__tests__/banner.service.spec.ts | packages/hoppscotch-common/src/services/__tests__/banner.service.spec.ts | import { describe, expect, it } from "vitest"
import { TestContainer } from "dioc/testing"
import { getI18n } from "~/modules/i18n"
import {
BannerService,
BANNER_PRIORITY_LOW,
BANNER_PRIORITY_HIGH,
BannerContent,
} from "../banner.service"
describe("BannerService", () => {
const container = new TestContaine... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/services/__tests__/secret-environment.service.spec.ts | packages/hoppscotch-common/src/services/__tests__/secret-environment.service.spec.ts | import { describe, expect, it, beforeEach } from "vitest"
import { TestContainer } from "dioc/testing"
import { SecretEnvironmentService } from "../secret-environment.service"
describe("SecretEnvironmentService", () => {
let container: TestContainer
let service: SecretEnvironmentService
beforeEach(() => {
c... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/services/__tests__/current-environment-value.service.spec.ts | packages/hoppscotch-common/src/services/__tests__/current-environment-value.service.spec.ts | import { describe, it, expect, beforeEach } from "vitest"
import { TestContainer } from "dioc/testing"
import {
CurrentValueService,
Variable,
} from "../current-environment-value.service"
describe("CurrentValueService", () => {
let container: TestContainer
let service: CurrentValueService
beforeEach(() => ... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/services/__tests__/interceptor.service.spec.ts | packages/hoppscotch-common/src/services/__tests__/interceptor.service.spec.ts | import { describe, expect, it, vi } from "vitest"
import { Interceptor, InterceptorService } from "../interceptor.service"
import { TestContainer } from "dioc/testing"
describe("InterceptorService", () => {
it("initaly there are no interceptors defined", () => {
const container = new TestContainer()
const s... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/services/__tests__/scroll.service.spec.ts | packages/hoppscotch-common/src/services/__tests__/scroll.service.spec.ts | import { describe, it, expect, beforeEach } from "vitest"
import { TestContainer } from "dioc/testing"
import { ScrollService } from "../scroll.service"
describe("ScrollService", () => {
let service: ScrollService
beforeEach(() => {
const container = new TestContainer()
service = container.bind(ScrollServ... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/services/__tests__/documentation.service.spec.ts | packages/hoppscotch-common/src/services/__tests__/documentation.service.spec.ts | import { describe, it, expect, beforeEach, vi } from "vitest"
import * as E from "fp-ts/Either"
import { TestContainer } from "dioc/testing"
import {
HoppCollection,
HoppRESTRequest,
makeCollection,
makeRESTRequest,
} from "@hoppscotch/data"
import {
DocumentationService,
CollectionDocumentationItem,
Requ... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/services/__tests__/kernel-interceptor.service.spec.ts | packages/hoppscotch-common/src/services/__tests__/kernel-interceptor.service.spec.ts | import { describe, expect, it, vi } from "vitest"
import {
KernelInterceptor,
KernelInterceptorService,
} from "../kernel-interceptor.service"
import { TestContainer } from "dioc/testing"
import { RelayRequest } from "@hoppscotch/kernel"
describe("KernelInterceptorService", () => {
it("initially has no intercept... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/services/__tests__/workspace.service.spec.ts | packages/hoppscotch-common/src/services/__tests__/workspace.service.spec.ts | import { describe, expect, vi, it, beforeEach, afterEach } from "vitest"
import { TestContainer } from "dioc/testing"
import { WorkspaceService } from "../workspace.service"
import { setPlatformDef } from "~/platform"
import { BehaviorSubject } from "rxjs"
import { effectScope, nextTick } from "vue"
const listAdapterM... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/services/__tests__/history-ui-provider.service.spec.ts | packages/hoppscotch-common/src/services/__tests__/history-ui-provider.service.spec.ts | import { TestContainer } from "dioc/testing"
import { describe, expect, it } from "vitest"
import { getI18n } from "~/modules/i18n"
import { HistoryUIProviderService } from "../history-ui-provider.service"
describe("HistoryUIProviderService", () => {
const container = new TestContainer()
const historyUI = containe... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/services/__tests__/current-sort.service.spec.ts | packages/hoppscotch-common/src/services/__tests__/current-sort.service.spec.ts | import { describe, it, expect, beforeEach } from "vitest"
import { TestContainer } from "dioc/testing"
import {
CurrentSortOption,
CurrentSortValuesService,
} from "../current-sort.service"
describe("CurrentSortValuesService", () => {
let container: TestContainer
let service: CurrentSortValuesService
before... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/services/oauth/utils.ts | packages/hoppscotch-common/src/services/oauth/utils.ts | import * as E from "fp-ts/Either"
import { z } from "zod"
import { getService } from "~/modules/dioc"
import { KernelInterceptorService } from "~/services/kernel-interceptor.service"
import { content } from "@hoppscotch/kernel"
import { decodeResponseAsJSON } from "./oauth.service"
import { OAuth2AdvancedParam } from "... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/services/oauth/oauth.service.ts | packages/hoppscotch-common/src/services/oauth/oauth.service.ts | import { pipe } from "fp-ts/function"
import * as O from "fp-ts/Option"
import * as E from "fp-ts/Either"
import { Service } from "dioc"
import { PersistenceService } from "../persistence"
import { ZodType, z } from "zod"
import authCode, { AuthCodeOauthFlowParams } from "./flows/authCode"
import implicit, { ImplicitOa... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/services/oauth/flows/authCode.ts | packages/hoppscotch-common/src/services/oauth/flows/authCode.ts | import { PersistenceService } from "~/services/persistence"
import {
OauthAuthService,
PersistedOAuthConfig,
createFlowConfig,
decodeResponseAsJSON,
generateRandomString,
} from "../oauth.service"
import { z } from "zod"
import { getService } from "~/modules/dioc"
import * as E from "fp-ts/Either"
import { Ke... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/services/oauth/flows/implicit.ts | packages/hoppscotch-common/src/services/oauth/flows/implicit.ts | import { PersistenceService } from "~/services/persistence"
import {
OauthAuthService,
PersistedOAuthConfig,
createFlowConfig,
generateRandomString,
} from "../oauth.service"
import { z } from "zod"
import { getService } from "~/modules/dioc"
import * as E from "fp-ts/Either"
import {
ImplicitOauthFlowParams ... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/services/oauth/flows/password.ts | packages/hoppscotch-common/src/services/oauth/flows/password.ts | import * as E from "fp-ts/Either"
import * as O from "fp-ts/Option"
import {
OauthAuthService,
createFlowConfig,
decodeResponseAsJSON,
} from "../oauth.service"
import { z } from "zod"
import { getService } from "~/modules/dioc"
import { KernelInterceptorService } from "~/services/kernel-interceptor.service"
impo... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/services/oauth/flows/clientCredentials.ts | packages/hoppscotch-common/src/services/oauth/flows/clientCredentials.ts | import {
OauthAuthService,
createFlowConfig,
decodeResponseAsJSON,
} from "../oauth.service"
import { z } from "zod"
import { getService } from "~/modules/dioc"
import * as E from "fp-ts/Either"
import * as O from "fp-ts/Option"
import { useToast } from "~/composables/toast"
import { KernelInterceptorService } fr... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/services/persistence/index.ts | packages/hoppscotch-common/src/services/persistence/index.ts | /* eslint-disable no-restricted-globals, no-restricted-syntax */
import * as E from "fp-ts/Either"
import { z } from "zod"
import { Service } from "dioc"
import { StorageLike, watchDebounced } from "@vueuse/core"
import { assign, clone, isEmpty, cloneDeep } from "lodash-es"
import {
GlobalEnvironmentVariable,
tr... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | true |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/services/persistence/validation-schemas/index.ts | packages/hoppscotch-common/src/services/persistence/validation-schemas/index.ts | import {
Environment,
GQLHeader,
HoppGQLAuth,
HoppGQLRequest,
HoppRESTAuth,
HoppRESTRequest,
HoppRESTHeaders,
HoppRESTRequestResponse,
HoppCollection,
GlobalEnvironment,
CollectionVariable,
} from "@hoppscotch/data"
import { entityReference } from "verzod"
import { z } from "zod"
import { HoppAcce... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/services/persistence/__tests__/index.spec.ts | packages/hoppscotch-common/src/services/persistence/__tests__/index.spec.ts | /* eslint-disable no-restricted-globals, no-restricted-syntax */
import * as E from "fp-ts/Either"
import {
translateToNewGQLCollection,
translateToNewRESTCollection,
} from "@hoppscotch/data"
import { watchDebounced } from "@vueuse/core"
import { TestContainer } from "dioc/testing"
import { cloneDeep } from "lod... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | true |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/services/persistence/__tests__/__mocks__/index.ts | packages/hoppscotch-common/src/services/persistence/__tests__/__mocks__/index.ts | import {
Environment,
GlobalEnvironment,
HoppCollection,
RESTReqSchemaVersion,
} from "@hoppscotch/data"
import { HoppGQLDocument } from "~/helpers/graphql/document"
import { HoppRequestDocument } from "~/helpers/rest/document"
import { GQLHistoryEntry, RESTHistoryEntry } from "~/newstore/history"
import { Set... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/services/inspection/index.ts | packages/hoppscotch-common/src/services/inspection/index.ts | import {
HoppRESTRequest,
HoppRESTResponseOriginalRequest,
} from "@hoppscotch/data"
import { refDebounced } from "@vueuse/core"
import { Service } from "dioc"
import { Component, Ref, ref, watch, computed, markRaw, reactive } from "vue"
import { HoppRESTResponse } from "~/helpers/types/HoppRESTResponse"
import { R... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/services/inspection/inspectors/environment.inspector.ts | packages/hoppscotch-common/src/services/inspection/inspectors/environment.inspector.ts | import { getI18n } from "~/modules/i18n"
import {
InspectionService,
Inspector,
InspectorLocation,
InspectorResult,
} from ".."
import { Service } from "dioc"
import { Ref, markRaw, computed } from "vue"
import IconPlusCircle from "~icons/lucide/plus-circle"
import {
HoppRESTRequest,
HoppRESTResponseOrigina... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/services/inspection/inspectors/request.inspector.ts | packages/hoppscotch-common/src/services/inspection/inspectors/request.inspector.ts | import { Service } from "dioc"
import { InspectionService, Inspector, InspectorResult } from ".."
import { computed, markRaw, Ref } from "vue"
import {
HoppRESTRequest,
HoppRESTResponseOriginalRequest,
} from "@hoppscotch/data"
import IconAlertTriangle from "~icons/lucide/alert-triangle"
import { getI18n } from "~/... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/services/inspection/inspectors/scripting-interceptor.inspector.ts | packages/hoppscotch-common/src/services/inspection/inspectors/scripting-interceptor.inspector.ts | import { Service } from "dioc"
import {
InspectionService,
Inspector,
InspectorResult,
} from "~/services/inspection"
import { computed, markRaw, Ref } from "vue"
import {
HoppRESTRequest,
HoppRESTResponseOriginalRequest,
} from "@hoppscotch/data"
import { HoppRESTResponse } from "~/helpers/types/HoppRESTResp... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/services/inspection/inspectors/response.inspector.ts | packages/hoppscotch-common/src/services/inspection/inspectors/response.inspector.ts | import { Service } from "dioc"
import { InspectionService, Inspector, InspectorResult } from ".."
import { getI18n } from "~/modules/i18n"
import {
HoppRESTRequest,
HoppRESTResponseOriginalRequest,
} from "@hoppscotch/data"
import IconAlertTriangle from "~icons/lucide/alert-triangle"
import { HoppRESTResponse } fro... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/services/inspection/inspectors/__tests__/scripting-interceptor.inspector.spec.ts | packages/hoppscotch-common/src/services/inspection/inspectors/__tests__/scripting-interceptor.inspector.spec.ts | import { TestContainer } from "dioc/testing"
import { describe, expect, it, vi, beforeEach, afterEach } from "vitest"
import { ScriptingInterceptorInspectorService } from "../scripting-interceptor.inspector"
import { InspectionService } from "../../index"
import { getDefaultRESTRequest } from "~/helpers/rest/default"
i... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/services/inspection/inspectors/__tests__/request.inspector.spec.ts | packages/hoppscotch-common/src/services/inspection/inspectors/__tests__/request.inspector.spec.ts | import { TestContainer } from "dioc/testing"
import { describe, expect, it, vi } from "vitest"
import { RequestInspectorService } from "../request.inspector"
import { InspectionService } from "../../index"
import { getDefaultRESTRequest } from "~/helpers/rest/default"
import { ref } from "vue"
import { KernelIntercepto... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/services/inspection/inspectors/__tests__/environment.inspector.spec.ts | packages/hoppscotch-common/src/services/inspection/inspectors/__tests__/environment.inspector.spec.ts | import { TestContainer } from "dioc/testing"
import { describe, expect, it, vi } from "vitest"
import { EnvironmentInspectorService } from "../environment.inspector"
import { InspectionService } from "../../index"
import { getDefaultRESTRequest } from "~/helpers/rest/default"
import { ref } from "vue"
import { CurrentV... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/services/inspection/inspectors/__tests__/response.inspector.spec.ts | packages/hoppscotch-common/src/services/inspection/inspectors/__tests__/response.inspector.spec.ts | import { TestContainer } from "dioc/testing"
import { describe, expect, it, beforeEach, afterEach, vi } from "vitest"
import { ResponseInspectorService } from "../response.inspector"
import { InspectionService } from "../../index"
import { getDefaultRESTRequest } from "~/helpers/rest/default"
import { ref } from "vue"
... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/services/inspection/__tests__/index.spec.ts | packages/hoppscotch-common/src/services/inspection/__tests__/index.spec.ts | import { describe, it, expect, vi } from "vitest"
import { Inspector, InspectionService, InspectorResult } from "../"
import { TestContainer } from "dioc/testing"
import { ref } from "vue"
import { RESTTabService } from "~/services/tab/rest"
vi.mock("~/modules/i18n", () => ({
__esModule: true,
getI18n: () => (x: s... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/services/context-menu/index.ts | packages/hoppscotch-common/src/services/context-menu/index.ts | import { Service } from "dioc"
import { Component } from "vue"
/**
* Defines how to render the text in a Context Menu Search Result
*/
export type ContextMenuTextType<T extends object | Component = never> =
| {
type: "text"
text: string
}
| {
type: "custom"
/**
* The component ... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/services/context-menu/__tests__/index.spec.ts | packages/hoppscotch-common/src/services/context-menu/__tests__/index.spec.ts | import { describe, it, expect, vi } from "vitest"
import { ContextMenu, ContextMenuResult, ContextMenuService } from "../"
import { TestContainer } from "dioc/testing"
const contextMenuResult: ContextMenuResult[] = [
{
id: "result1",
text: { type: "text", text: "Sample Text" },
icon: {},
// eslint-di... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/services/context-menu/menu/url.menu.ts | packages/hoppscotch-common/src/services/context-menu/menu/url.menu.ts | import { Service } from "dioc"
import { markRaw, ref } from "vue"
import { getDefaultRESTRequest } from "~/helpers/rest/default"
import { getI18n } from "~/modules/i18n"
import { RESTTabService } from "~/services/tab/rest"
import IconCopyPlus from "~icons/lucide/copy-plus"
import {
ContextMenu,
ContextMenuResult,
... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/services/context-menu/menu/parameter.menu.ts | packages/hoppscotch-common/src/services/context-menu/menu/parameter.menu.ts | import { Service } from "dioc"
import {
ContextMenu,
ContextMenuResult,
ContextMenuService,
ContextMenuState,
} from "../"
import { markRaw, ref } from "vue"
import IconArrowDownRight from "~icons/lucide/arrow-down-right"
import { getI18n } from "~/modules/i18n"
import { RESTTabService } from "~/services/tab/re... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/services/context-menu/menu/environment.menu.ts | packages/hoppscotch-common/src/services/context-menu/menu/environment.menu.ts | import { Service } from "dioc"
import {
ContextMenu,
ContextMenuResult,
ContextMenuService,
ContextMenuState,
} from "../"
import { markRaw, ref } from "vue"
import { invokeAction } from "~/helpers/actions"
import IconPlusCircle from "~icons/lucide/plus-circle"
import { getI18n } from "~/modules/i18n"
/**
* T... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/services/context-menu/menu/__tests__/url.menu.spec.ts | packages/hoppscotch-common/src/services/context-menu/menu/__tests__/url.menu.spec.ts | import { TestContainer } from "dioc/testing"
import { describe, expect, it, vi } from "vitest"
import { RESTTabService } from "~/services/tab/rest"
import { ContextMenuService } from "../.."
import { URLMenuService } from "../url.menu"
import { getDefaultRESTRequest } from "~/helpers/rest/default"
vi.mock("~/modules/i... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/services/context-menu/menu/__tests__/parameter.menu.spec.ts | packages/hoppscotch-common/src/services/context-menu/menu/__tests__/parameter.menu.spec.ts | import { TestContainer } from "dioc/testing"
import { describe, expect, it, vi } from "vitest"
import { ContextMenuService } from "../.."
import { ParameterMenuService } from "../parameter.menu"
//regex containing both url and parameter
const urlAndParameterRegex = new RegExp("[^&?]*?=[^&?]*")
vi.mock("~/modules/i18n... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/services/context-menu/menu/__tests__/environment.menu.spec.ts | packages/hoppscotch-common/src/services/context-menu/menu/__tests__/environment.menu.spec.ts | import { TestContainer } from "dioc/testing"
import { describe, expect, it, vi } from "vitest"
import { EnvironmentMenuService } from "../environment.menu"
import { ContextMenuService } from "../.."
vi.mock("~/modules/i18n", () => ({
__esModule: true,
getI18n: () => (x: string) => x,
}))
const actionsMock = vi.ho... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/services/tab/graphql.ts | packages/hoppscotch-common/src/services/tab/graphql.ts | import { isEqual } from "lodash-es"
import { getDefaultGQLRequest } from "~/helpers/graphql/default"
import { HoppGQLDocument, HoppGQLSaveContext } from "~/helpers/graphql/document"
import { TabService } from "./tab"
import { computed } from "vue"
import { Container } from "dioc"
import { getService } from "~/modules/d... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/services/tab/index.ts | packages/hoppscotch-common/src/services/tab/index.ts | import { ComputedRef, WritableComputedRef } from "vue"
/**
* Represents a tab in HoppScotch.
* @template Doc The type of the document associated with the tab.
*/
export type HoppTab<Doc> = {
/** The unique identifier of the tab. */
id: string
/** The document associated with the tab. */
document: Doc
}
exp... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/services/tab/tab.ts | packages/hoppscotch-common/src/services/tab/tab.ts | import { refWithControl } from "@vueuse/core"
import { Service } from "dioc"
import { v4 as uuidV4 } from "uuid"
import {
ComputedRef,
computed,
nextTick,
reactive,
ref,
shallowReadonly,
watch,
} from "vue"
import {
HoppTab,
PersistableTabState,
TabService as TabServiceInterface,
} from "."
export ... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/services/tab/rest.ts | packages/hoppscotch-common/src/services/tab/rest.ts | import { Container } from "dioc"
import { computed } from "vue"
import { getDefaultRESTRequest } from "~/helpers/rest/default"
import { HoppRESTSaveContext, HoppTabDocument } from "~/helpers/rest/document"
import { getService } from "~/modules/dioc"
import { PersistenceService, STORE_KEYS } from "../persistence"
import... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/services/tab/__tests__/tab.service.spec.ts | packages/hoppscotch-common/src/services/tab/__tests__/tab.service.spec.ts | import { describe, expect, it } from "vitest"
import { TestContainer } from "dioc/testing"
import { TabService } from "../tab"
import { reactive } from "vue"
class MockTabService extends TabService<{ request: string }> {
public static readonly ID = "MOCK_TAB_SERVICE"
override onServiceInit() {
this.tabMap = r... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/services/test-runner/test-runner.service.ts | packages/hoppscotch-common/src/services/test-runner/test-runner.service.ts | import {
HoppCollection,
HoppCollectionVariable,
HoppRESTHeaders,
HoppRESTRequest,
} from "@hoppscotch/data"
import { Service } from "dioc"
import * as E from "fp-ts/Either"
import { cloneDeep } from "lodash-es"
import { nextTick, Ref } from "vue"
import {
captureInitialEnvironmentState,
runTestRunnerReques... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/helpers/keybindings.ts | packages/hoppscotch-common/src/helpers/keybindings.ts | import { onBeforeUnmount, onMounted } from "vue"
import { HoppActionWithOptionalArgs, invokeAction } from "./actions"
import { isAppleDevice } from "./platformutils"
import {
isCodeMirrorEditor,
isDOMElement,
isInShortcutsFlyout,
isMonacoEditor,
isTypableElement,
} from "./utils/dom"
import { getKernelMode } ... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/helpers/environment-regex.ts | packages/hoppscotch-common/src/helpers/environment-regex.ts | // Regex to match environment variables in the format `<<variable_name>>`/`<<variable.name>>` etc.
// This is used to identify if the request contains environment variables that need to be handled specially.
const ENV_VAR_NAME_PATTERN = "[a-zA-Z0-9_.-]+"
const HOPP_ENVIRONMENT_REGEX = new RegExp(`(<<${ENV_VAR_NAME_PAT... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/helpers/gist.ts | packages/hoppscotch-common/src/helpers/gist.ts | import axios from "axios"
import * as TE from "fp-ts/TaskEither"
export const createGist = (
content: string,
filename: string,
accessToken: string
) => {
return TE.tryCatch(
async () =>
axios.post(
"https://api.github.com/gists",
{
files: {
[filename]: {
... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/helpers/handleTokenValidation.ts | packages/hoppscotch-common/src/helpers/handleTokenValidation.ts | import { useToast } from "@composables/toast"
import { isValidUser } from "~/helpers/isValidUser"
/**
* High-level authentication validation handler with automatic error notifications.
*
* This wrapper around `isValidUser()` provides automatic toast error messages for invalid tokens.
* Use this when you want stand... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/helpers/actions.ts | packages/hoppscotch-common/src/helpers/actions.ts | /* An `action` is a unique verb that is associated with certain thing that can be done on Hoppscotch.
* For example, sending a request.
*/
import { Ref, onBeforeUnmount, onMounted, reactive, watch, computed } from "vue"
import { BehaviorSubject } from "rxjs"
import { HoppRequestDocument } from "./rest/document"
impo... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/helpers/headers.ts | packages/hoppscotch-common/src/helpers/headers.ts | export const commonHeaders = [
"WWW-Authenticate",
"Authorization",
"Proxy-Authenticate",
"Proxy-Authorization",
"Age",
"Cache-Control",
"Clear-Site-Data",
"Expires",
"Pragma",
"Warning",
"Accept-CH",
"Accept-CH-Lifetime",
"Early-Data",
"Content-DPR",
"DPR",
"Device-Memory",
"Save-Data... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/helpers/jsoncParse.ts | packages/hoppscotch-common/src/helpers/jsoncParse.ts | /**
* Copyright (c) 2019 GraphQL Contributors
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
/**
* T... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/helpers/findStatusGroup.ts | packages/hoppscotch-common/src/helpers/findStatusGroup.ts | export default function (responseStatus: number) {
if (responseStatus >= 100 && responseStatus < 200)
return {
name: "informational",
className: "info-response",
}
if (responseStatus >= 200 && responseStatus < 300)
return {
name: "successful",
className: "success-response",
... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/helpers/isValidUser.ts | packages/hoppscotch-common/src/helpers/isValidUser.ts | import { platform } from "~/platform"
export type ValidUserResponse = {
valid: boolean
error: string
}
export const SESSION_EXPIRED = "Session expired. Please log in again."
/**
* Attempts to refresh the authentication token
* @returns Promise resolving to a ValidUserResponse with the result
*/
const attemptT... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/helpers/testSnippets.ts | packages/hoppscotch-common/src/helpers/testSnippets.ts | export default [
{
name: "Environment: Set an environment variable",
script: `\n\n// Set an environment variable
pw.env.set("variable", "value");`,
},
{
name: "Response: Status code is 200",
script: `\n\n// Check status code is 200
pw.test("Status code is 200", ()=> {
pw.expect(pw.response.sta... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/helpers/RequestRunner.ts | packages/hoppscotch-common/src/helpers/RequestRunner.ts | import {
Cookie,
Environment,
HoppCollectionVariable,
HoppRESTHeader,
HoppRESTHeaders,
HoppRESTRequest,
HoppRESTRequestVariable,
} from "@hoppscotch/data"
import {
SandboxPreRequestResult,
SandboxTestResult,
TestDescriptor,
TestResult,
} from "@hoppscotch/js-sandbox"
import * as A from "fp-ts/Arra... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/helpers/proxyUrl.ts | packages/hoppscotch-common/src/helpers/proxyUrl.ts | import { platform } from "~/platform"
import * as E from "fp-ts/Either"
// Default proxy URL
export const DEFAULT_HOPP_PROXY_URL = "https://proxy.hoppscotch.io/"
// Get default proxy URL from platform or return default
export const getDefaultProxyUrl = async () => {
const proxyAppUrl = platform?.infra?.getProxyAppU... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/helpers/fixBrokenRequestVersion.ts | packages/hoppscotch-common/src/helpers/fixBrokenRequestVersion.ts | import {
getDefaultRESTRequest,
safelyExtractRESTRequest,
} from "@hoppscotch/data"
import { z } from "zod"
import { REST_TAB_STATE_SCHEMA } from "~/services/persistence/validation-schemas"
type HoppRESTab = z.infer<typeof REST_TAB_STATE_SCHEMA>
/**
* Fixes broken request versions in the given REST tab documents... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/helpers/dragDropValidation.ts | packages/hoppscotch-common/src/helpers/dragDropValidation.ts | export type DragDropEvent = {
draggedContext?: {
futureIndex?: number
}
}
/**
* Validates if a drag-and-drop operation should be allowed.
*
* Prevents items from being dropped at the last position, which is reserved
* for the "add new item" empty entry in lists like headers and parameters.
*
* @param dra... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/helpers/jsonParse.ts | packages/hoppscotch-common/src/helpers/jsonParse.ts | /**
* Copyright (c) 2019 GraphQL Contributors
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
/**
* T... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/helpers/fixBrokenEnvironmentVersion.ts | packages/hoppscotch-common/src/helpers/fixBrokenEnvironmentVersion.ts | import {
Environment,
translateToNewEnvironmentVariables,
} from "@hoppscotch/data"
/**
* Fixes broken environment versions in the given environments.
* This function ensures that all environment variables are translated
* to the new format, which is necessary for compatibility with the latest
* version of the... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/helpers/dev.ts | packages/hoppscotch-common/src/helpers/dev.ts | /**
* A constant specifying whether the app is running in the development server
*/
export const APP_IS_IN_DEV_MODE = import.meta.env.DEV
| typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/helpers/scripting.ts | packages/hoppscotch-common/src/helpers/scripting.ts | /**
* Module prefix added by Monaco editor for TypeScript module mode.
* Enables IntelliSense and isolates variables across editor instances.
*/
export const MODULE_PREFIX = "export {};\n" as const
/**
* Strips `export {};\n` prefix from scripts before legacy sandbox execution
* (non-module context) or when expor... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/helpers/migrations.ts | packages/hoppscotch-common/src/helpers/migrations.ts | import { settingsStore, applySetting } from "~/newstore/settings"
/*
* This file contains all the migrations we have to perform overtime in various (persisted)
* state/store entries
*/
export function performMigrations(): void {
// Migrate old default proxy URL to the new proxy URL (if not set / overridden)
if... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/helpers/preRequestScriptSnippets.ts | packages/hoppscotch-common/src/helpers/preRequestScriptSnippets.ts | export default [
{
name: "Environment: Set an environment variable",
script: `\n\n// Set an environment variable
pw.env.set("variable", "value");`,
},
{
name: "Environment: Set timestamp variable",
script: `\n\n// Set timestamp variable
const currentTime = Date.now();
pw.env.set("timestamp", curre... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/helpers/newOutline.ts | packages/hoppscotch-common/src/helpers/newOutline.ts | import {
JSONArrayValue,
JSONObjectMember,
JSONObjectValue,
JSONValue,
} from "./jsonParse"
type RootEntry =
| {
kind: "RootObject"
astValue: JSONObjectValue
}
| {
kind: "RootArray"
astValue: JSONArrayValue
}
type ObjectMemberEntry = {
kind: "ObjectMember"
name: string
... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/helpers/platformutils.ts | packages/hoppscotch-common/src/helpers/platformutils.ts | export function isAppleDevice() {
return /(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)
}
export function getPlatformSpecialKey() {
return isAppleDevice() ? "⌘" : "Ctrl"
}
export function getPlatformAlternateKey() {
return isAppleDevice() ? "⌥" : "Alt"
}
| typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/helpers/oauth2Params.ts | packages/hoppscotch-common/src/helpers/oauth2Params.ts | export const commonOAuth2AuthParams = [
"audience",
"scope",
"state",
"nonce",
"prompt",
"max_age",
"ui_locales",
"id_token_hint",
"login_hint",
"acr_values",
"response_mode",
"display",
"claims",
"request",
"request_uri",
]
export const commonOAuth2TokenParams = [
"grant_type",
"code... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/helpers/experimental-sandbox-integration.ts | packages/hoppscotch-common/src/helpers/experimental-sandbox-integration.ts | import { HoppRESTRequest } from "@hoppscotch/data"
/**
* Applies pre-request script modifications to the original request.
*
* For legacy sandbox: Returns original request unchanged (`updatedRequest` is `undefined`).
* For experimental sandbox: Merges script changes while preserving file uploads
* lost during JSO... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/helpers/RESTExtURLParams.ts | packages/hoppscotch-common/src/helpers/RESTExtURLParams.ts | import { FormDataKeyValue, HoppRESTRequest } from "@hoppscotch/data"
import { getDefaultRESTRequest } from "./rest/default"
import { isJSONContentType } from "./utils/contenttypes"
/**
* Handles translations for all the hopp.io REST Shareable URL params
*/
export function translateExtURLParams(
urlParams: Record<s... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/helpers/hopp-fetch.ts | packages/hoppscotch-common/src/helpers/hopp-fetch.ts | import * as E from "fp-ts/Either"
import type { HoppFetchHook, FetchCallMeta } from "@hoppscotch/js-sandbox"
import type { KernelInterceptorService } from "~/services/kernel-interceptor.service"
import type { RelayRequest } from "@hoppscotch/kernel"
/**
* Creates a hopp.fetch() hook implementation for the web app.
*... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/helpers/editorutils.ts | packages/hoppscotch-common/src/helpers/editorutils.ts | const mimeToMode = {
"text/plain": "text/plain",
"text/xml": "application/xml",
"text/html": "htmlmixed",
"application/xml": "application/xml",
"application/hal+json": "application/ld+json",
"application/vnd.api+json": "application/ld+json",
"application/json": "application/ld+json",
}
export function ge... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/helpers/oauth.ts | packages/hoppscotch-common/src/helpers/oauth.ts | import * as E from "fp-ts/Either"
import { z } from "zod"
import { getService } from "~/modules/dioc"
import { PersistenceService } from "~/services/persistence"
import { KernelInterceptorService } from "~/services/kernel-interceptor.service"
import { content } from "@hoppscotch/kernel"
const kernelInterceptor = getS... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/helpers/shortcuts.ts | packages/hoppscotch-common/src/helpers/shortcuts.ts | import { getPlatformAlternateKey, getPlatformSpecialKey } from "./platformutils"
import { getKernelMode } from "@hoppscotch/kernel"
export type ShortcutDef = {
label: string
keys: string[]
section: string
}
export function getShortcuts(t: (x: string) => string): ShortcutDef[] {
const kernelMode = getKernelMod... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/helpers/typeutils.ts | packages/hoppscotch-common/src/helpers/typeutils.ts | export type FieldEquals<T, K extends keyof T, Vals extends T[K][]> = {
// eslint-disable-next-line
[_x in K]: Vals[number]
}
export const objectFieldIncludes = <
T,
K extends keyof T,
V extends readonly T[K][],
>(
obj: T,
field: K,
values: V
// eslint-disable-next-line
): obj is T & { [_x in K]: V[nu... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/helpers/network.ts | packages/hoppscotch-common/src/helpers/network.ts | import * as TE from "fp-ts/TaskEither"
import { BehaviorSubject, Observable } from "rxjs"
import { cloneDeep } from "lodash-es"
import { HoppRESTResponse } from "./types/HoppRESTResponse"
import { EffectiveHoppRESTRequest } from "./utils/EffectiveURL"
import { getService } from "~/modules/dioc"
import { KernelIntercept... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/helpers/lenses/lenses.ts | packages/hoppscotch-common/src/helpers/lenses/lenses.ts | import { HoppRESTResponse } from "../types/HoppRESTResponse"
import jsonLens, { isValidJSONResponse } from "./jsonLens"
import rawLens from "./rawLens"
import imageLens from "./imageLens"
import htmlLens from "./htmlLens"
import xmlLens from "./xmlLens"
import pdfLens from "./pdfLens"
import audioLens from "./audioLens... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/helpers/lenses/imageLens.ts | packages/hoppscotch-common/src/helpers/lenses/imageLens.ts | import { defineAsyncComponent } from "vue"
import { Lens } from "./lenses"
const imageLens: Lens = {
lensName: "response.image",
isSupportedContentType: (contentType) =>
/\bimage\/(?:gif|jpeg|png|webp|bmp|svg\+xml|x-icon|vnd\.microsoft\.icon)\b/i.test(
contentType
),
renderer: "imageres",
rendere... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/helpers/lenses/xmlLens.ts | packages/hoppscotch-common/src/helpers/lenses/xmlLens.ts | import { defineAsyncComponent } from "vue"
import { Lens } from "./lenses"
const xmlLens: Lens = {
lensName: "response.xml",
isSupportedContentType: (contentType) => /\bxml\b/i.test(contentType),
renderer: "xmlres",
rendererImport: defineAsyncComponent(
() => import("~/components/lenses/renderers/XMLLensRe... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/helpers/lenses/htmlLens.ts | packages/hoppscotch-common/src/helpers/lenses/htmlLens.ts | import { defineAsyncComponent } from "vue"
import { Lens } from "./lenses"
const htmlLens: Lens = {
lensName: "response.html",
isSupportedContentType: (contentType) =>
/\btext\/html|application\/xhtml\+xml\b/i.test(contentType),
renderer: "htmlres",
rendererImport: defineAsyncComponent(
() => import("~... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/helpers/lenses/videoLens.ts | packages/hoppscotch-common/src/helpers/lenses/videoLens.ts | import { defineAsyncComponent } from "vue"
import { Lens } from "./lenses"
const videoLens: Lens = {
lensName: "response.video",
isSupportedContentType: (contentType) =>
/\bvideo\/(?:webm|x-m4v|quicktime|x-ms-wmv|x-flv|mpeg|x-msvideo|x-ms-asf|mp4|)\b/i.test(
contentType
),
renderer: "videores",
r... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/helpers/lenses/rawLens.ts | packages/hoppscotch-common/src/helpers/lenses/rawLens.ts | import { defineAsyncComponent } from "vue"
import { Lens } from "./lenses"
const rawLens: Lens = {
lensName: "response.raw",
isSupportedContentType: () => true,
renderer: "raw",
rendererImport: defineAsyncComponent(
() => import("~/components/lenses/renderers/RawLensRenderer.vue")
),
}
export default ra... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/helpers/lenses/jsonLens.ts | packages/hoppscotch-common/src/helpers/lenses/jsonLens.ts | import { defineAsyncComponent } from "vue"
import { Lens } from "./lenses"
import { isJSONContentType } from "../utils/contenttypes"
/**
* Checks if response body contents can be parsed as valid JSON
*/
export function isValidJSONResponse(contents: string | ArrayBuffer): boolean {
if (!contents) {
return false... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/helpers/lenses/audioLens.ts | packages/hoppscotch-common/src/helpers/lenses/audioLens.ts | import { defineAsyncComponent } from "vue"
import { Lens } from "./lenses"
const audioLens: Lens = {
lensName: "response.audio",
isSupportedContentType: (contentType) =>
/\baudio\/(?:wav|mpeg|mp4|aac|aacp|ogg|webm|x-caf|flac|mp3|)\b/i.test(
contentType
),
renderer: "audiores",
rendererImport: def... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/helpers/lenses/pdfLens.ts | packages/hoppscotch-common/src/helpers/lenses/pdfLens.ts | import { defineAsyncComponent } from "vue"
import { Lens } from "./lenses"
const pdfLens: Lens = {
lensName: "response.pdf",
isSupportedContentType: (contentType) =>
/\bapplication\/pdf\b/i.test(contentType),
renderer: "pdfres",
rendererImport: defineAsyncComponent(
() => import("~/components/lenses/re... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/helpers/auth/digest.ts | packages/hoppscotch-common/src/helpers/auth/digest.ts | import * as E from "fp-ts/Either"
import { md5 } from "js-md5"
import { getService } from "~/modules/dioc"
import { getI18n } from "~/modules/i18n"
import { KernelInterceptorService } from "~/services/kernel-interceptor.service"
export interface DigestAuthParams {
username: string
password: string
realm: string... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.