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/helpers/utils/date.ts | packages/hoppscotch-common/src/helpers/utils/date.ts | export function shortDateTime(
date: string | number | Date,
includeTime: boolean = true
) {
return new Date(date).toLocaleString("en-US", {
year: "numeric",
month: "short",
day: "numeric",
...(includeTime
? {
hour: "numeric",
minute: "numeric",
second: "numeric... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/helpers/__tests__/experimental-sandbox-integration.spec.ts | packages/hoppscotch-common/src/helpers/__tests__/experimental-sandbox-integration.spec.ts | import { HoppRESTRequest, getDefaultRESTRequest } from "@hoppscotch/data"
import { describe, expect, test } from "vitest"
import { applyScriptRequestUpdates } from "../experimental-sandbox-integration"
const DEFAULT_REQUEST = getDefaultRESTRequest()
describe("Experimental Sandbox Integration", () => {
describe("app... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | true |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/helpers/__tests__/hopp-fetch.spec.ts | packages/hoppscotch-common/src/helpers/__tests__/hopp-fetch.spec.ts | import { describe, expect, it, vi, beforeEach } from "vitest"
import { createHoppFetchHook } from "../hopp-fetch"
import type { KernelInterceptorService } from "~/services/kernel-interceptor.service"
import * as E from "fp-ts/Either"
// Mock KernelInterceptorService
const mockKernelInterceptor: KernelInterceptorServic... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/helpers/__tests__/dragDropValidation.spec.ts | packages/hoppscotch-common/src/helpers/__tests__/dragDropValidation.spec.ts | import { describe, test, expect } from "vitest"
import { isDragDropAllowed, DragDropEvent } from "../dragDropValidation"
describe("isDragDropAllowed", () => {
describe("Valid drag operations", () => {
test("allows dropping at the beginning of a list", () => {
const dragEvent: DragDropEvent = {
drag... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/helpers/backend/GQLClient.ts | packages/hoppscotch-common/src/helpers/backend/GQLClient.ts | import { ref } from "vue"
import {
createClient,
TypedDocumentNode,
OperationContext,
fetchExchange,
makeOperation,
createRequest,
subscriptionExchange,
errorExchange,
CombinedError,
Operation,
OperationResult,
Client,
AnyVariables,
} from "@urql/core"
import { AuthConfig, authExchange } from ... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/helpers/backend/QueryErrors.ts | packages/hoppscotch-common/src/helpers/backend/QueryErrors.ts | export type UserQueryError = "user/not_found"
export type MyTeamsQueryError = "ea/not_invite_or_admin"
| typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/helpers/backend/helpers.ts | packages/hoppscotch-common/src/helpers/backend/helpers.ts | import {
CollectionVariable,
HoppCollection,
HoppCollectionVariable,
HoppRESTAuth,
HoppRESTHeaders,
HoppRESTRequest,
makeCollection,
translateToNewRequest,
} from "@hoppscotch/data"
import * as A from "fp-ts/Array"
import * as E from "fp-ts/Either"
import * as TE from "fp-ts/TaskEither"
import { flow, p... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/helpers/backend/mutations/TeamEnvironment.ts | packages/hoppscotch-common/src/helpers/backend/mutations/TeamEnvironment.ts | import { runMutation } from "../GQLClient"
import {
CreateDuplicateEnvironmentDocument,
CreateDuplicateEnvironmentMutation,
CreateDuplicateEnvironmentMutationVariables,
CreateTeamEnvironmentDocument,
CreateTeamEnvironmentMutation,
CreateTeamEnvironmentMutationVariables,
DeleteTeamEnvironmentDocument,
De... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/helpers/backend/mutations/Profile.ts | packages/hoppscotch-common/src/helpers/backend/mutations/Profile.ts | import { runMutation } from "../GQLClient"
import {
DeleteUserDocument,
DeleteUserMutation,
DeleteUserMutationVariables,
} from "../graphql"
type DeleteUserErrors = "user/not_found"
export const deleteUser = () =>
runMutation<
DeleteUserMutation,
DeleteUserMutationVariables,
DeleteUserErrors
>(D... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/helpers/backend/mutations/Shortcode.ts | packages/hoppscotch-common/src/helpers/backend/mutations/Shortcode.ts | import { HoppRESTRequest } from "@hoppscotch/data"
import { platform } from "~/platform"
import { runMutation } from "../GQLClient"
import {
DeleteShortcodeDocument,
DeleteShortcodeMutation,
DeleteShortcodeMutationVariables,
UpdateEmbedPropertiesDocument,
UpdateEmbedPropertiesMutation,
UpdateEmbedProperties... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/helpers/backend/mutations/MockServer.ts | packages/hoppscotch-common/src/helpers/backend/mutations/MockServer.ts | import * as TE from "fp-ts/TaskEither"
import { client } from "../GQLClient"
import { GQLError } from "../GQLClient"
import { getI18n } from "~/modules/i18n"
import {
CreateMockServerDocument,
UpdateMockServerDocument,
DeleteMockServerDocument,
GetTeamMockServersDocument,
WorkspaceType,
} from "../graphql"
/... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/helpers/backend/mutations/Team.ts | packages/hoppscotch-common/src/helpers/backend/mutations/Team.ts | import { pipe } from "fp-ts/function"
import * as TE from "fp-ts/TaskEither"
import { runMutation } from "../GQLClient"
import { TeamName } from "../types/TeamName"
import {
DeleteTeamDocument,
DeleteTeamMutation,
DeleteTeamMutationVariables,
LeaveTeamDocument,
LeaveTeamMutation,
LeaveTeamMutationVariables,... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/helpers/backend/mutations/PublishedDocs.ts | packages/hoppscotch-common/src/helpers/backend/mutations/PublishedDocs.ts | import { runMutation } from "../GQLClient"
import {
CreatePublishedDocDocument,
CreatePublishedDocMutation,
CreatePublishedDocMutationVariables,
UpdatePublishedDocDocument,
UpdatePublishedDocMutation,
UpdatePublishedDocMutationVariables,
DeletePublishedDocDocument,
DeletePublishedDocMutation,
DeletePu... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/helpers/backend/mutations/TeamRequest.ts | packages/hoppscotch-common/src/helpers/backend/mutations/TeamRequest.ts | import { runMutation } from "../GQLClient"
import {
CreateRequestInCollectionDocument,
CreateRequestInCollectionMutation,
CreateRequestInCollectionMutationVariables,
DeleteRequestDocument,
DeleteRequestMutation,
DeleteRequestMutationVariables,
MoveRestTeamRequestDocument,
MoveRestTeamRequestMutation,
... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/helpers/backend/mutations/TeamInvitation.ts | packages/hoppscotch-common/src/helpers/backend/mutations/TeamInvitation.ts | import { pipe } from "fp-ts/function"
import * as TE from "fp-ts/TaskEither"
import { platform } from "~/platform"
import { runMutation } from "../GQLClient"
import {
RevokeTeamInvitationDocument,
RevokeTeamInvitationMutation,
RevokeTeamInvitationMutationVariables,
TeamAccessRole,
} from "../graphql"
import { E... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/helpers/backend/mutations/TeamCollection.ts | packages/hoppscotch-common/src/helpers/backend/mutations/TeamCollection.ts | import { runMutation } from "../GQLClient"
import {
CreateChildCollectionDocument,
CreateChildCollectionMutation,
CreateChildCollectionMutationVariables,
CreateNewRootCollectionDocument,
CreateNewRootCollectionMutation,
CreateNewRootCollectionMutationVariables,
DeleteCollectionDocument,
DeleteCollection... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/helpers/backend/types/Email.ts | packages/hoppscotch-common/src/helpers/backend/types/Email.ts | import * as t from "io-ts"
const emailRegex =
/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/
interface EmailBrand {
readonly Email: unique symbol
}
export const EmailCodec = t.brand(
t.string,
(x): x is 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/backend/types/TeamName.ts | packages/hoppscotch-common/src/helpers/backend/types/TeamName.ts | import * as t from "io-ts"
interface TeamNameBrand {
readonly TeamName: unique symbol
}
export const TeamNameCodec = t.brand(
t.string,
(x): x is t.Branded<string, TeamNameBrand> => x.trim() !== "",
"TeamName"
)
export type TeamName = t.TypeOf<typeof TeamNameCodec>
| typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/helpers/backend/queries/MockServerLogs.ts | packages/hoppscotch-common/src/helpers/backend/queries/MockServerLogs.ts | import * as TE from "fp-ts/TaskEither"
import { client } from "../GQLClient"
import {
GetMockServerLogsDocument,
GetMockServerLogsQuery,
GetMockServerLogsQueryVariables,
DeleteMockServerLogDocument,
DeleteMockServerLogMutation,
DeleteMockServerLogMutationVariables,
} from "../graphql"
export const getMockS... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/helpers/backend/queries/MockServer.ts | packages/hoppscotch-common/src/helpers/backend/queries/MockServer.ts | import * as TE from "fp-ts/TaskEither"
import * as E from "fp-ts/Either"
import { runGQLQuery } from "../GQLClient"
import {
GetMyMockServersDocument,
GetTeamMockServersDocument,
GetMockServerDocument,
type GetMyMockServersQuery,
type GetTeamMockServersQuery,
type GetMockServerQuery,
} from "../graphql"
ty... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/helpers/backend/queries/PublishedDocs.ts | packages/hoppscotch-common/src/helpers/backend/queries/PublishedDocs.ts | import * as TE from "fp-ts/TaskEither"
import * as E from "fp-ts/Either"
import { runGQLQuery } from "../GQLClient"
import {
UserPublishedDocsListDocument,
TeamPublishedDocsListDocument,
type UserPublishedDocsListQuery,
type TeamPublishedDocsListQuery,
PublishedDocDocument,
PublishedDocs,
} from "../graphql... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/helpers/runner/adapter.ts | packages/hoppscotch-common/src/helpers/runner/adapter.ts | import { HoppCollection } from "@hoppscotch/data"
import { ChildrenResult, SmartTreeAdapter } from "@hoppscotch/ui/helpers"
import { computed, Ref } from "vue"
import { TestRunnerRequest } from "~/services/test-runner/test-runner.service"
export type Collection = {
type: "collections"
isLastItem: boolean
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/runner/temp_envs.ts | packages/hoppscotch-common/src/helpers/runner/temp_envs.ts | import { ref } from "vue"
import { GlobalEnvironmentVariable } from "@hoppscotch/data"
export const temporaryVariables = ref<GlobalEnvironmentVariable[]>([])
export function getTemporaryVariables() {
return temporaryVariables.value
}
export function setTemporaryVariables(variables: GlobalEnvironmentVariable[]) {
... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/helpers/runner/collection-tree.ts | packages/hoppscotch-common/src/helpers/runner/collection-tree.ts | import { ComposerTranslation } from "vue-i18n"
import { GQLError } from "../backend/GQLClient"
export const getErrorMessage = (
err: GQLError<string>,
t: ComposerTranslation
) => {
console.error(err)
if (err.type === "network_error") {
return t("error.network_error")
}
switch (err.error) {
case "te... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/helpers/types/HoppRequestSaveContext.ts | packages/hoppscotch-common/src/helpers/types/HoppRequestSaveContext.ts | import { HoppRESTRequest } from "@hoppscotch/data"
/**
* We use the save context to figure out
* how a loaded request is to be saved.
* These will be set when the request is loaded
* into the request session
*/
export type HoppRequestSaveContext =
| {
/**
* The origin source of the request
*... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/helpers/types/HoppPicked.ts | packages/hoppscotch-common/src/helpers/types/HoppPicked.ts | /**
* Picked is used to differentiate
* the select item in the save request dialog
* The save request dialog can be used
* to save a request, folder, or a collection
* separately for 'my' and 'teams' for REST.
* also for graphQL collections
*/
export type Picked =
| {
pickedType: "my-request"
folde... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/helpers/types/HoppRESTResponse.ts | packages/hoppscotch-common/src/helpers/types/HoppRESTResponse.ts | import { HoppRESTRequest } from "@hoppscotch/data"
import { Component } from "vue"
import { KernelInterceptorError } from "~/services/kernel-interceptor.service"
export type HoppRESTResponseHeader = { key: string; value: string }
export type HoppRESTSuccessResponse = {
type: "success"
headers: HoppRESTResponseHea... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/helpers/types/HoppRealtimeLog.ts | packages/hoppscotch-common/src/helpers/types/HoppRealtimeLog.ts | export type HoppRealtimeLogLine = {
prefix?: string
payload: string
source: string
color?: string
ts: number | undefined
}
export type HoppRealtimeLog = HoppRealtimeLogLine[]
| typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/helpers/types/HoppInheritedProperties.ts | packages/hoppscotch-common/src/helpers/types/HoppInheritedProperties.ts | import {
GQLHeader,
HoppGQLAuth,
HoppRESTHeader,
HoppRESTAuth,
HoppCollectionVariable,
} from "@hoppscotch/data"
export type HoppInheritedProperty = {
auth: {
parentID: string
parentName: string
inheritedAuth: HoppRESTAuth | HoppGQLAuth
}
headers: {
parentID: string
parentName: stri... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/helpers/types/HoppTestResult.ts | packages/hoppscotch-common/src/helpers/types/HoppTestResult.ts | import { Environment } from "@hoppscotch/data"
import { SandboxTestResult } from "@hoppscotch/js-sandbox"
export type HoppTestExpectResult = {
status: "fail" | "pass" | "error"
message: string
}
export type HoppTestData = {
description: string
expectResults: HoppTestExpectResult[]
tests: HoppTestData[]
}
e... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/helpers/shortcode/ShortcodeListAdapter.ts | packages/hoppscotch-common/src/helpers/shortcode/ShortcodeListAdapter.ts | import * as E from "fp-ts/Either"
import { BehaviorSubject, Subscription } from "rxjs"
import { Subscription as WSubscription } from "wonka"
import { GQLError, runAuthOnlyGQLSubscription } from "../backend/GQLClient"
import {
GetUserShortcodesQuery,
ShortcodeCreatedDocument,
ShortcodeDeletedDocument,
ShortcodeU... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/helpers/shortcode/Shortcode.ts | packages/hoppscotch-common/src/helpers/shortcode/Shortcode.ts | /**
* Defines how a Shortcode is represented in the ShortcodeListAdapter
*/
export interface Shortcode {
id: string
request: string
properties?: string | null
createdOn: Date
}
| typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/helpers/rest/default.ts | packages/hoppscotch-common/src/helpers/rest/default.ts | import { HoppRESTRequest, RESTReqSchemaVersion } from "@hoppscotch/data"
export const getDefaultRESTRequest = (): HoppRESTRequest => ({
v: RESTReqSchemaVersion,
endpoint: "https://echo.hoppscotch.io",
name: "Untitled",
params: [],
headers: [],
method: "GET",
auth: {
authType: "inherit",
authActiv... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/helpers/rest/document.ts | packages/hoppscotch-common/src/helpers/rest/document.ts | import {
HoppCollection,
HoppRESTRequest,
HoppRESTRequestResponse,
} from "@hoppscotch/data"
import { RESTOptionTabs } from "~/components/http/RequestOptions.vue"
import { HoppInheritedProperty } from "../types/HoppInheritedProperties"
import { HoppRESTResponse } from "../types/HoppRESTResponse"
import { HoppTest... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/helpers/rest/labelColoring.ts | packages/hoppscotch-common/src/helpers/rest/labelColoring.ts | import { pipe } from "fp-ts/function"
import * as O from "fp-ts/Option"
import * as RR from "fp-ts/ReadonlyRecord"
export const REQUEST_METHOD_LABEL_COLORS = {
get: "var(--method-get-color)",
post: "var(--method-post-color)",
put: "var(--method-put-color)",
patch: "var(--method-patch-color)",
delete: "var(--... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/helpers/realtime/SSEConnection.ts | packages/hoppscotch-common/src/helpers/realtime/SSEConnection.ts | import { BehaviorSubject, Subject } from "rxjs"
import { platform } from "~/platform"
export type SSEEvent = { time: number } & (
| { type: "STARTING" }
| { type: "STARTED" }
| { type: "MESSAGE_RECEIVED"; message: string }
| { type: "STOPPED"; manual: boolean }
| { type: "ERROR"; error: Event | null }
)
exp... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/helpers/realtime/MQTTConnection.ts | packages/hoppscotch-common/src/helpers/realtime/MQTTConnection.ts | import Paho, { ConnectionOptions } from "paho-mqtt"
import { BehaviorSubject, Subject } from "rxjs"
import { platform } from "~/platform"
export type MQTTConnectionConfig = {
username?: string
password?: string
keepAlive?: string
cleanSession?: boolean
lwTopic?: string
lwMessage: string
lwQos: 2 | 1 | 0
... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/helpers/realtime/WSConnection.ts | packages/hoppscotch-common/src/helpers/realtime/WSConnection.ts | import { BehaviorSubject, Subject } from "rxjs"
import { platform } from "~/platform"
export type WSErrorMessage = SyntaxError | Event
export type WSEvent = { time: number } & (
| { type: "CONNECTING" }
| { type: "CONNECTED" }
| { type: "MESSAGE_SENT"; message: string }
| { type: "MESSAGE_RECEIVED"; message: ... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/helpers/realtime/SIOClients.ts | packages/hoppscotch-common/src/helpers/realtime/SIOClients.ts | import wildcard from "socketio-wildcard"
import ClientV2 from "socket.io-client-v2"
import { io as ClientV4, Socket as SocketV4 } from "socket.io-client-v4"
import { io as ClientV3, Socket as SocketV3 } from "socket.io-client-v3"
type Options = {
path: string
auth?: {
token: string | undefined
}
}
type Poss... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/helpers/realtime/SIOConnection.ts | packages/hoppscotch-common/src/helpers/realtime/SIOConnection.ts | import { BehaviorSubject, Subject } from "rxjs"
import { SIOClientV2, SIOClientV3, SIOClientV4, SIOClient } from "./SIOClients"
import { SIOClientVersion } from "~/newstore/SocketIOSession"
import { platform } from "~/platform"
export const SOCKET_CLIENTS = {
v2: SIOClientV2,
v3: SIOClientV3,
v4: SIOClientV4,
} ... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/helpers/import-export/export/gist.ts | packages/hoppscotch-common/src/helpers/import-export/export/gist.ts | import * as E from "fp-ts/Either"
import { createGist } from "~/helpers/gist"
export const gistExporter = async (
JSONFileContents: string,
accessToken: string,
fileName = "hoppscotch-collections.json"
) => {
if (!accessToken) {
return E.left("Invalid User")
}
const res = await createGist(JSONFileCont... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/helpers/import-export/export/environments.ts | packages/hoppscotch-common/src/helpers/import-export/export/environments.ts | import { Environment } from "@hoppscotch/data"
export const environmentsExporter = (myEnvironments: Environment[]) => {
return JSON.stringify(myEnvironments, null, 2)
}
| typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/helpers/import-export/export/testResults.ts | packages/hoppscotch-common/src/helpers/import-export/export/testResults.ts | import { HoppTestResult } from "~/helpers/types/HoppTestResult"
import { platform } from "~/platform"
import * as E from "fp-ts/Either"
export const exportTestResults = async (testResults: HoppTestResult) => {
const contentsJSON = JSON.stringify(testResults, null, 2)
const file = new Blob([contentsJSON], { type: "... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/helpers/import-export/export/teamCollections.ts | packages/hoppscotch-common/src/helpers/import-export/export/teamCollections.ts | import { getTeamCollectionJSON } from "~/helpers/backend/helpers"
export const teamCollectionsExporter = (teamID: string) => {
return getTeamCollectionJSON(teamID)
}
| typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/helpers/import-export/export/myCollections.ts | packages/hoppscotch-common/src/helpers/import-export/export/myCollections.ts | import { HoppCollection } from "@hoppscotch/data"
import { stripRefIdReplacer } from "."
export const myCollectionsExporter = (myCollections: HoppCollection[]) => {
return JSON.stringify(myCollections, stripRefIdReplacer, 2)
}
| typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/helpers/import-export/export/environment.ts | packages/hoppscotch-common/src/helpers/import-export/export/environment.ts | import { Environment } from "@hoppscotch/data"
import * as E from "fp-ts/Either"
import { cloneDeep } from "lodash-es"
import { TeamEnvironment } from "~/helpers/teams/TeamEnvironment"
import { initializeDownloadFile } from "."
const getEnvironmentJSON = (
environmentObj: TeamEnvironment | Environment,
environmen... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/helpers/import-export/export/index.ts | packages/hoppscotch-common/src/helpers/import-export/export/index.ts | import * as E from "fp-ts/Either"
import { platform } from "~/platform"
/**
* Create a downloadable file from a collection/environment and prompts the user to download it.
* @param contentsJSON - JSON string of the collection
* @param name - Name of the collection set as the file name
* @returns {Promise<E.Right<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/import-export/export/gqlCollections.ts | packages/hoppscotch-common/src/helpers/import-export/export/gqlCollections.ts | import { HoppCollection } from "@hoppscotch/data"
import { stripRefIdReplacer } from "."
export const gqlCollectionsExporter = (gqlCollections: HoppCollection[]) => {
return JSON.stringify(gqlCollections, stripRefIdReplacer, 2)
}
| typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/helpers/import-export/import/postmanEnv.ts | packages/hoppscotch-common/src/helpers/import-export/import/postmanEnv.ts | import { Environment, EnvironmentSchemaVersion } from "@hoppscotch/data"
import * as O from "fp-ts/Option"
import * as TE from "fp-ts/TaskEither"
import { z } from "zod"
import { safeParseJSON } from "~/helpers/functional/json"
import { IMPORTER_INVALID_FILE_FORMAT } from "."
import { uniqueID } from "~/helpers/utils/... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/helpers/import-export/import/postman.ts | packages/hoppscotch-common/src/helpers/import-export/import/postman.ts | import {
FormDataKeyValue,
HoppCollection,
HoppRESTAuth,
HoppRESTHeader,
HoppRESTParam,
HoppRESTReqBody,
HoppRESTRequest,
HoppRESTRequestVariable,
knownContentTypes,
makeCollection,
makeRESTRequest,
ValidContentTypes,
HoppRESTRequestResponses,
makeHoppRESTResponseOriginalRequest,
HoppColle... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/helpers/import-export/import/importers.ts | packages/hoppscotch-common/src/helpers/import-export/import/importers.ts | export { hoppRESTImporter } from "./hopp"
export { hoppOpenAPIImporter } from "./openapi"
export { hoppPostmanImporter } from "./postman"
export { hoppInsomniaImporter } from "./insomnia/insomniaColl"
export { toTeamsImporter } from "./myCollections"
export { harImporter } from "./har"
| typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/helpers/import-export/import/myCollections.ts | packages/hoppscotch-common/src/helpers/import-export/import/myCollections.ts | import { importJSONToTeam } from "~/helpers/backend/mutations/TeamCollection"
export function toTeamsImporter(content: string, teamID: string) {
return importJSONToTeam(content, teamID)
}
| typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/helpers/import-export/import/hoppGql.ts | packages/hoppscotch-common/src/helpers/import-export/import/hoppGql.ts | import { HoppCollection } from "@hoppscotch/data"
import * as E from "fp-ts/Either"
// TODO: add zod validation
export const hoppGqlCollectionsImporter = (
contents: string[]
): E.Either<"INVALID_JSON", HoppCollection[]> => {
return E.tryCatch(
() => contents.flatMap((content) => JSON.parse(content)),
() =... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/helpers/import-export/import/hoppEnv.ts | packages/hoppscotch-common/src/helpers/import-export/import/hoppEnv.ts | import * as O from "fp-ts/Option"
import * as TE from "fp-ts/TaskEither"
import { entityReference } from "verzod"
import { safeParseJSON } from "~/helpers/functional/json"
import { IMPORTER_INVALID_FILE_FORMAT } from "."
import { Environment } from "@hoppscotch/data"
import { z } from "zod"
export const hoppEnvImpor... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/helpers/import-export/import/hopp.ts | packages/hoppscotch-common/src/helpers/import-export/import/hopp.ts | import {
HoppCollection,
HoppRESTRequest,
getDefaultGQLRequest,
getDefaultRESTRequest,
translateToNewRESTCollection,
HoppGQLRequest,
translateToNewGQLCollection,
} from "@hoppscotch/data"
import * as A from "fp-ts/Array"
import * as O from "fp-ts/Option"
import * as RA from "fp-ts/ReadonlyArray"
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/import-export/import/har.ts | packages/hoppscotch-common/src/helpers/import-export/import/har.ts | import {
HoppCollection,
HoppRESTHeader,
HoppRESTParam,
ValidContentTypesList,
ValidContentTypes,
HoppRESTReqBody,
HoppRESTReqBodyFormData,
HoppRESTRequest,
getDefaultRESTRequest,
makeCollection,
} from "@hoppscotch/data"
import * as E from "fp-ts/Either"
import { z } from "zod"
export const harImp... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/helpers/import-export/import/index.ts | packages/hoppscotch-common/src/helpers/import-export/import/index.ts | import * as TE from "fp-ts/TaskEither"
import type { Component } from "vue"
import { StepsOutputList } from "../steps"
import {
HoppCollection,
makeCollection,
translateToNewRESTCollection,
} from "@hoppscotch/data"
/**
* A common error state to be used when the file formats are not expected
*/
export const IM... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/helpers/import-export/import/insomnia/insomniaColl.ts | packages/hoppscotch-common/src/helpers/import-export/import/insomnia/insomniaColl.ts | import {
HoppCollection,
HoppCollectionVariable,
HoppRESTAuth,
HoppRESTHeader,
HoppRESTParam,
HoppRESTReqBody,
HoppRESTRequest,
HoppRESTRequestVariable,
knownContentTypes,
makeCollection,
makeRESTRequest,
} from "@hoppscotch/data"
import * as A from "fp-ts/Array"
import * as TE from "fp-ts/TaskEi... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/helpers/import-export/import/insomnia/insomniaEnv.ts | packages/hoppscotch-common/src/helpers/import-export/import/insomnia/insomniaEnv.ts | import * as TE from "fp-ts/TaskEither"
import * as O from "fp-ts/Option"
import { IMPORTER_INVALID_FILE_FORMAT } from ".."
import { z } from "zod"
import {
EnvironmentSchemaVersion,
NonSecretEnvironment,
} from "@hoppscotch/data"
import { safeParseJSONOrYAML } from "~/helpers/functional/yaml"
import { uniqueID } ... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/helpers/import-export/import/insomnia/types.ts | packages/hoppscotch-common/src/helpers/import-export/import/insomnia/types.ts | import { ImportRequest, convert } from "insomnia-importers"
import { Header, Parameter } from "insomnia-importers/dist/src/entities"
type UnwrapPromise<T extends Promise<any>> =
T extends Promise<infer Y> ? Y : never
export type InsomniaDoc = UnwrapPromise<ReturnType<typeof convert>>
export type InsomniaResource = ... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/helpers/import-export/import/workers/openapi-import-worker.ts | packages/hoppscotch-common/src/helpers/import-export/import/workers/openapi-import-worker.ts | import { Buffer } from "buffer"
import process from "process"
// Set up global shims for the swagger-parser library
self.Buffer = Buffer
self.global = self
self.process = process
import SwaggerParser from "@apidevtools/swagger-parser"
import * as E from "fp-ts/Either"
const validateDocs = async (docs: any) => {
tr... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/helpers/import-export/import/import-sources/UrlSource.ts | packages/hoppscotch-common/src/helpers/import-export/import/import-sources/UrlSource.ts | import UrlImport from "~/components/importExport/ImportExportSteps/UrlImport.vue"
import { defineStep } from "~/composables/step-components"
import { v4 as uuidv4 } from "uuid"
import { Ref } from "vue"
export function UrlSource(metadata: {
caption: string
onImportFromURL: (content: string) => any | Promise<any>
... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/helpers/import-export/import/import-sources/FileSource.ts | packages/hoppscotch-common/src/helpers/import-export/import/import-sources/FileSource.ts | import FileImportVue from "~/components/importExport/ImportExportSteps/FileImport.vue"
import { defineStep } from "~/composables/step-components"
import { v4 as uuidv4 } from "uuid"
import type { Ref } from "vue"
export function FileSource(metadata: {
acceptedFileTypes: string
caption: string
onImportFromFile: ... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/helpers/import-export/import/import-sources/GistSource.ts | packages/hoppscotch-common/src/helpers/import-export/import/import-sources/GistSource.ts | import UrlImport from "~/components/importExport/ImportExportSteps/UrlImport.vue"
import { defineStep } from "~/composables/step-components"
import * as E from "fp-ts/Either"
import * as O from "fp-ts/Option"
import { z } from "zod"
import { v4 as uuidv4 } from "uuid"
import { Ref } from "vue"
import { getService } f... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/helpers/import-export/import/openapi/index.ts | packages/hoppscotch-common/src/helpers/import-export/import/openapi/index.ts | import {
OpenAPI,
OpenAPIV2,
OpenAPIV3,
OpenAPIV3_1 as OpenAPIV31,
} from "openapi-types"
import SwaggerParser from "@apidevtools/swagger-parser"
import yaml from "js-yaml"
import {
FormDataKeyValue,
HoppRESTAuth,
HoppRESTHeader,
HoppRESTParam,
HoppRESTReqBody,
knownContentTypes,
makeRESTRequest,
... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | true |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/helpers/import-export/import/openapi/example-generators/v3.ts | packages/hoppscotch-common/src/helpers/import-export/import/openapi/example-generators/v3.ts | import { OpenAPIV3 } from "openapi-types"
import { pipe } from "fp-ts/function"
import * as O from "fp-ts/Option"
type SchemaType =
| OpenAPIV3.ArraySchemaObjectType
| OpenAPIV3.NonArraySchemaObjectType
type PrimitiveSchemaType = Exclude<SchemaType, "array" | "object">
type PrimitiveRequestBodyExample = 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/import-export/import/openapi/example-generators/v31.ts | packages/hoppscotch-common/src/helpers/import-export/import/openapi/example-generators/v31.ts | import { OpenAPIV3_1 as OpenAPIV31 } from "openapi-types"
import { pipe } from "fp-ts/function"
import * as O from "fp-ts/Option"
import * as A from "fp-ts/Array"
type MixedArraySchemaType = (
| OpenAPIV31.ArraySchemaObjectType
| OpenAPIV31.NonArraySchemaObjectType
)[]
type SchemaType =
| OpenAPIV31.ArraySchema... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/helpers/import-export/import/openapi/example-generators/v2.ts | packages/hoppscotch-common/src/helpers/import-export/import/openapi/example-generators/v2.ts | import { OpenAPIV2 } from "openapi-types"
import * as O from "fp-ts/Option"
import { pipe, flow } from "fp-ts/function"
import * as A from "fp-ts/Array"
import { prettyPrintJSON } from "~/helpers/functional/json"
type PrimitiveSchemaType = "string" | "integer" | "number" | "boolean"
type SchemaType = "array" | "objec... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/helpers/error-messages/index.ts | packages/hoppscotch-common/src/helpers/error-messages/index.ts | import { GQLError } from "../backend/GQLClient"
export const getEnvActionErrorMessage = (err: GQLError<string>) => {
if (err.type === "network_error") {
return "error.network_error"
}
switch (err.error) {
case "team_environment/not_found":
return "team_environment.not_found"
case "team_environ... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/helpers/functional/primtive.ts | packages/hoppscotch-common/src/helpers/functional/primtive.ts | export type JSPrimitive =
| "undefined"
| "object"
| "boolean"
| "number"
| "bigint"
| "string"
| "symbol"
| "function"
export type TypeFromPrimitive<P extends JSPrimitive | undefined> =
P extends "undefined"
? undefined
: P extends "object"
? object | null // typeof null === "object"
... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/helpers/functional/domain-settings.ts | packages/hoppscotch-common/src/helpers/functional/domain-settings.ts | import { pipe } from "fp-ts/function"
import * as O from "fp-ts/Option"
import * as E from "fp-ts/Either"
import { StoreFile, RelayRequest } from "@hoppscotch/kernel"
export type InputDomainSetting = {
version: "v1"
security?: {
certificates?: {
client?:
| {
kind: "pem"
ce... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/helpers/functional/filter-active.ts | packages/hoppscotch-common/src/helpers/functional/filter-active.ts | import { HoppRESTRequestVariables } from "@hoppscotch/data"
import { pipe } from "fp-ts/function"
import * as A from "fp-ts/Array"
export const filterActiveToRecord = (
variables: HoppRESTRequestVariables
): Record<string, string> =>
pipe(
variables,
A.filter((variable) => variable.active),
A.map((vari... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/helpers/functional/files.ts | packages/hoppscotch-common/src/helpers/functional/files.ts | import * as TO from "fp-ts/TaskOption"
export const readFileAsText = (file: File) =>
TO.tryCatch(
() =>
new Promise<string>((resolve, reject) => {
const reader = new FileReader()
reader.onload = () => {
resolve(reader.result as string)
}
reader.onerror = () => {
... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/helpers/functional/debug.ts | packages/hoppscotch-common/src/helpers/functional/debug.ts | /**
* Logs the current value and returns the same value
* @param x The value to log
* @returns The parameter `x` passed to this
*/
export const trace = <T>(x: T) => {
console.log(x)
return x
}
/**
* Logs the annotated current value and returns the same value
* @param name The name of the log
* @curried_para... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/helpers/functional/json.ts | packages/hoppscotch-common/src/helpers/functional/json.ts | import * as O from "fp-ts/Option"
import * as E from "fp-ts/Either"
import { pipe, flow } from "fp-ts/function"
import { MediaType, RelayResponseBody } from "@hoppscotch/kernel"
import { decodeToString } from "~/helpers/functional/parse"
import { safeParseJSONOrYAML } from "./yaml"
type SafeParseJSON = {
(str: str... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/helpers/functional/formData.ts | packages/hoppscotch-common/src/helpers/functional/formData.ts | type FormDataEntry = {
key: string
contentType?: string
value: string | Blob
}
export const toFormData = (values: FormDataEntry[]) => {
const formData = new FormData()
values.forEach(({ key, value, contentType }) => {
if (contentType) {
formData.append(
key,
new Blob([value], {
... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/helpers/functional/yaml.ts | packages/hoppscotch-common/src/helpers/functional/yaml.ts | import yaml from "js-yaml"
import * as O from "fp-ts/Option"
import { safeParseJSON } from "./json"
import { pipe } from "fp-ts/function"
export const safeParseYAML = (str: string) => O.tryCatch(() => yaml.load(str))
export const safeParseJSONOrYAML = (str: string) =>
pipe(
str,
safeParseJSON,
O.match(
... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/helpers/functional/parse.ts | packages/hoppscotch-common/src/helpers/functional/parse.ts | import * as E from "fp-ts/Either"
export const decodeToString = (content: Uint8Array): E.Either<Error, string> =>
E.tryCatch(
() => new TextDecoder("utf-8").decode(content).replace(/\x00/g, ""),
E.toError
)
| typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/helpers/functional/array.ts | packages/hoppscotch-common/src/helpers/functional/array.ts | import { clone } from "lodash-es"
/**
* Sorts the array based on the sort func.
* NOTE: Creates a new array, if you don't need ref
* to original array, use `arrayUnsafeSort` for better perf
* @param sortFunc Sort function to sort against
*/
export const arraySort =
<T>(sortFunc: (a: T, b: T) => number) =>
(arr... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/helpers/functional/option.ts | packages/hoppscotch-common/src/helpers/functional/option.ts | import * as O from "fp-ts/Option"
import * as A from "fp-ts/Array"
import { pipe } from "fp-ts/function"
/**
* Tries to match one of the given predicates.
* If a predicate is matched, the associated value is returned in a Some.
* Else if none of the predicates is matched, None is returned.
* @param choice An array... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/helpers/functional/taskEither.ts | packages/hoppscotch-common/src/helpers/functional/taskEither.ts | import * as TE from "fp-ts/TaskEither"
/**
* A utility type which gives you the type of the left value of a TaskEither
*/
export type TELeftType<T extends TE.TaskEither<any, any>> =
T extends TE.TaskEither<
infer U,
// eslint-disable-next-line
infer _
>
? U
: never
| typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/helpers/functional/record.ts | packages/hoppscotch-common/src/helpers/functional/record.ts | /**
* Converts an array of key-value tuples (for e.g ["key", "value"]), into a record.
* (for eg. output -> { "key": "value" })
* NOTE: This function will discard duplicate key occurrences and only keep the last occurrence. If you do not want that behaviour,
* use `tupleWithSamesKeysToRecord`.
* @param tuples 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/functional/object.ts | packages/hoppscotch-common/src/helpers/functional/object.ts | import { pipe } from "fp-ts/function"
import { isEqual, cloneDeep } from "lodash-es"
import { JSPrimitive, TypeFromPrimitive } from "./primtive"
export const objRemoveKey =
<T, K extends keyof T>(key: K) =>
(obj: T): Omit<T, K> =>
pipe(cloneDeep(obj), (e) => {
delete e[key]
return e
})
export ... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/helpers/functional/process-request.ts | packages/hoppscotch-common/src/helpers/functional/process-request.ts | import type { RelayRequest } from "@hoppscotch/kernel"
import * as E from "fp-ts/Either"
import { pipe } from "fp-ts/function"
import * as O from "fp-ts/Option"
import { cloneDeep } from "lodash-es"
import superjson from "superjson"
import { useSetting } from "~/composables/settings"
const isEncoded = (value: 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/functional/error.ts | packages/hoppscotch-common/src/helpers/functional/error.ts | export const throwError = (message: string): never => {
throw new Error(message)
}
| typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/kernel/store.ts | packages/hoppscotch-common/src/kernel/store.ts | import type {
StorageOptions,
StoreError,
StoreEvents,
StoreEventEmitter,
} from "@hoppscotch/kernel"
import * as E from "fp-ts/Either"
import { getModule } from "."
import { getKernelMode } from "@hoppscotch/kernel"
const STORE_PATH = `${window.location.host}.hoppscotch.store`
// These are only defined funct... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/kernel/io.ts | packages/hoppscotch-common/src/kernel/io.ts | import type {
SaveFileWithDialogOptions,
OpenExternalLinkOptions,
SaveFileResponse,
OpenExternalLinkResponse,
EventCallback,
UnlistenFn,
} from "@hoppscotch/kernel"
import { getModule } from "."
export const Io = (() => {
const module = () => getModule("io")
return {
saveFileWithDialog: (
op... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/kernel/index.ts | packages/hoppscotch-common/src/kernel/index.ts | import { KernelAPI } from "@hoppscotch/kernel"
export { Io } from "./io"
export { Relay } from "./relay"
export { Store } from "./store"
export const getModule = <K extends keyof KernelAPI>(
name: K
): NonNullable<KernelAPI[K]> => {
const kernel = window.__KERNEL__
if (!kernel?.[name]) throw new Error(`Kernel $... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/kernel/relay.ts | packages/hoppscotch-common/src/kernel/relay.ts | import type {
RelayRequest,
RelayRequestEvents,
RelayError,
RelayResponse,
RelayEventEmitter,
} from "@hoppscotch/kernel"
import * as E from "fp-ts/Either"
import { getModule } from "."
export const Relay = (() => {
const module = () => getModule("relay")
return {
capabilities: () => module().capabi... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/composables/lens-actions.ts | packages/hoppscotch-common/src/composables/lens-actions.ts | import { HoppRESTResponse } from "@helpers/types/HoppRESTResponse"
import { copyToClipboard } from "@helpers/utils/clipboard"
import { refAutoReset } from "@vueuse/core"
import { computed, ComputedRef, ref, Ref, watch } from "vue"
import jsonToLanguage from "~/helpers/utils/json-to-language"
import { platform } from "... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/composables/documentationVisibility.ts | packages/hoppscotch-common/src/composables/documentationVisibility.ts | import { computed } from "vue"
import { useSetting } from "~/composables/settings"
/**
* Composable to determine documentation visibility based on experimental flags
*/
export function useDocumentationVisibility() {
const ENABLE_EXPERIMENTAL_DOCUMENTATION = useSetting(
"ENABLE_EXPERIMENTAL_DOCUMENTATION"
)
... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/composables/theming.ts | packages/hoppscotch-common/src/composables/theming.ts | import { inject } from "vue"
import { HoppColorMode } from "~/modules/theming"
export const useColorMode = () => inject("colorMode") as HoppColorMode
| typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/composables/picker.ts | packages/hoppscotch-common/src/composables/picker.ts | import { ref, reactive, computed } from "vue"
import { useFileDialog } from "@vueuse/core"
export interface CertFiles {
pem_cert: File | null
pem_key: File | null
pfx: File | null
ca: File[]
}
export interface CertPickerOptions {
onPEMCertChange?: (file: File | null) => void
onPEMKeyChange?: (file: File |... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/composables/codemirror.ts | packages/hoppscotch-common/src/composables/codemirror.ts | import {
keymap,
EditorView,
ViewPlugin,
ViewUpdate,
placeholder,
tooltips,
} from "@codemirror/view"
import {
Extension,
EditorState,
Compartment,
EditorSelection,
Prec,
} from "@codemirror/state"
import {
Language,
LanguageSupport,
StreamLanguage,
syntaxHighlighting,
} from "@codemirror/... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/composables/poll.ts | packages/hoppscotch-common/src/composables/poll.ts | import { onBeforeUnmount, Ref, shallowRef } from "vue"
export function usePolled<T>(
pollDurationMS: number,
pollFunc: (stopPolling: () => void) => T
): Ref<T> {
let polling = true
let handle: ReturnType<typeof setInterval> | undefined
const stopPolling = () => {
if (handle) {
clearInterval(handle... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/composables/mockServer.ts | packages/hoppscotch-common/src/composables/mockServer.ts | import { computed } from "vue"
import { useReadonlyStream } from "~/composables/stream"
import { mockServers$ } from "~/newstore/mockServers"
import type { MockServer } from "~/newstore/mockServers"
/**
* Composable to get mock server status for collections
*/
export function useMockServerStatus() {
const mockServ... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/composables/whats-new.ts | packages/hoppscotch-common/src/composables/whats-new.ts | import { toast as sonner } from "@hoppscotch/ui"
import { markRaw } from "vue"
import WhatsNewDialog from "~/components/app/WhatsNewDialog.vue"
import { getService } from "~/modules/dioc"
import { PersistenceService } from "~/services/persistence"
import { version as hoppscotchCommonPkgVersion } from "./../../package.j... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/composables/useScrollerRef.ts | packages/hoppscotch-common/src/composables/useScrollerRef.ts | import { ref, onMounted, onBeforeUnmount } from "vue"
import { useService } from "dioc/vue"
import { ScrollService } from "~/services/scroll.service"
/**
* A composable used to automatically restore and save scroll position
* inside a scrollable element (e.g., .cm-scroller) within a container.
*
* @param label - L... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/composables/mockServerVisibility.ts | packages/hoppscotch-common/src/composables/mockServerVisibility.ts | import { computed } from "vue"
import { useSetting } from "~/composables/settings"
/**
* Composable to determine mock server visibility based on experimental flags
*/
export function useMockServerVisibility() {
const ENABLE_EXPERIMENTAL_MOCK_SERVERS = useSetting(
"ENABLE_EXPERIMENTAL_MOCK_SERVERS"
)
/**
... | typescript | MIT | 67dff5fe0f99312690c1cb0059388aee804b30e0 | 2026-01-04T15:25:31.920196Z | false |
hoppscotch/hoppscotch | https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/composables/stream.ts | packages/hoppscotch-common/src/composables/stream.ts | import { clone, cloneDeep } from "lodash-es"
import { Observable, Subscription } from "rxjs"
import { customRef, onBeforeUnmount, readonly, Ref } from "vue"
type CloneMode = "noclone" | "shallow" | "deep"
/**
* Returns a readonly (no writes) ref for an RxJS Observable
* @param stream$ The RxJS Observable to listen ... | 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.