Compare commits

..

5 Commits

Author SHA1 Message Date
Andrew Bastin
23afc201a1 chore: bump version to release/2023.8.4 2023-11-14 21:26:16 +05:30
Andrew Bastin
b1982d74a6 fix: make schema more lenient while parsing public data structures 2023-11-14 21:24:25 +05:30
Andrew Bastin
e93a37c711 fix: add i18n entries for oauth errors 2023-11-14 17:44:37 +05:30
Nivedin
8d7509cdea fix: interceptor error from extension issue (#3548) 2023-11-14 17:17:23 +05:30
Akash K
e24d0ce605 fix: oauth 2.0 authentication type is breaking (#3531) 2023-11-14 00:12:04 +05:30
25 changed files with 560 additions and 197 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "hoppscotch-backend",
"version": "2023.8.3-1",
"version": "2023.8.4-1",
"description": "",
"author": "",
"private": true,

View File

@@ -139,7 +139,21 @@
"password": "Password",
"token": "Token",
"type": "Authorization Type",
"username": "Username"
"username": "Username",
"oauth": {
"token_generation_oidc_discovery_failed": "Failure on token generation: OpenID Connect Discovery Failed",
"something_went_wrong_on_token_generation": "Something went wrong on token generation",
"redirect_auth_server_returned_error": "Auth Server returned an error state",
"redirect_no_auth_code": "No Authorization Code present in the redirect",
"redirect_invalid_state": "Invalid State value present in the redirect",
"redirect_no_token_endpoint": "No Token Endpoint Defined",
"redirect_no_client_id": "No Client ID defined",
"redirect_no_client_secret": "No Client Secret Defined",
"redirect_no_code_verifier": "No Code Verifier Defined",
"redirect_auth_token_request_failed": "Request to get the auth token failed",
"redirect_auth_token_request_invalid_response": "Invalid Response from the Token Endpoint when requesting for an auth token",
"something_went_wrong_on_oauth_redirect": "Something went wrong during OAuth Redirect"
}
},
"collection": {
"created": "Collection created",
@@ -257,6 +271,7 @@
"error": {
"browser_support_sse": "This browser doesn't seems to have Server Sent Events support.",
"check_console_details": "Check console log for details.",
"check_how_to_add_origin": "Check how you can add an origin",
"curl_invalid_format": "cURL is not formatted properly",
"danger_zone": "Danger zone",
"delete_account": "Your account is currently an owner in these teams:",
@@ -277,6 +292,7 @@
"no_environments_to_export": "No environments to export. Please create an environment to get started.",
"no_results_found": "No matches found",
"page_not_found": "This page could not be found",
"please_install_extension": "Please install the extension and add origin to the extension.",
"proxy_error": "Proxy error",
"script_fail": "Could not execute pre-request script",
"something_went_wrong": "Something went wrong",

View File

@@ -1,7 +1,7 @@
{
"name": "@hoppscotch/common",
"private": true,
"version": "2023.8.3-1",
"version": "2023.8.4-1",
"scripts": {
"dev": "pnpm exec npm-run-all -p -l dev:*",
"test": "vitest --run",
@@ -102,7 +102,7 @@
"workbox-window": "^7.0.0",
"xml-formatter": "^3.5.0",
"yargs-parser": "^21.1.1",
"zod": "^3.22.2"
"zod": "^3.22.4"
},
"devDependencies": {
"@esbuild-plugins/node-globals-polyfill": "^0.2.3",

View File

@@ -1,11 +1,11 @@
// generated by unplugin-vue-components
// We suggest you to commit this file into source control
/* eslint-disable */
/* prettier-ignore */
// @ts-nocheck
// Generated by unplugin-vue-components
// Read more: https://github.com/vuejs/core/pull/3399
import '@vue/runtime-core'
export {}
declare module '@vue/runtime-core' {
declare module 'vue' {
export interface GlobalComponents {
AppActionHandler: typeof import('./components/app/ActionHandler.vue')['default']
AppAnnouncement: typeof import('./components/app/Announcement.vue')['default']
@@ -154,6 +154,7 @@ declare module '@vue/runtime-core' {
IconLucideMinus: typeof import('~icons/lucide/minus')['default']
IconLucideSearch: typeof import('~icons/lucide/search')['default']
IconLucideUsers: typeof import('~icons/lucide/users')['default']
InterceptorsErrorPlaceholder: typeof import('./components/interceptors/ErrorPlaceholder.vue')['default']
InterceptorsExtensionSubtitle: typeof import('./components/interceptors/ExtensionSubtitle.vue')['default']
LensesHeadersRenderer: typeof import('./components/lenses/HeadersRenderer.vue')['default']
LensesHeadersRendererEntry: typeof import('./components/lenses/HeadersRendererEntry.vue')['default']
@@ -218,5 +219,4 @@ declare module '@vue/runtime-core' {
WorkspaceCurrent: typeof import('./components/workspace/Current.vue')['default']
WorkspaceSelector: typeof import('./components/workspace/Selector.vue')['default']
}
}

View File

@@ -58,8 +58,8 @@
v-for="(field, index) in filteredQueryFields"
:key="`field-${index}`"
:gql-field="field"
@jump-to-type="handleJumpToType"
class="p-4"
@jump-to-type="handleJumpToType"
/>
</HoppSmartTab>
<HoppSmartTab
@@ -72,8 +72,8 @@
v-for="(field, index) in filteredMutationFields"
:key="`field-${index}`"
:gql-field="field"
@jump-to-type="handleJumpToType"
class="p-4"
@jump-to-type="handleJumpToType"
/>
</HoppSmartTab>
<HoppSmartTab
@@ -86,8 +86,8 @@
v-for="(field, index) in filteredSubscriptionFields"
:key="`field-${index}`"
:gql-field="field"
@jump-to-type="handleJumpToType"
class="p-4"
@jump-to-type="handleJumpToType"
/>
</HoppSmartTab>
<HoppSmartTab

View File

@@ -43,6 +43,7 @@ import { useI18n } from "@composables/i18n"
import { useToast } from "@composables/toast"
import { tokenRequest } from "~/helpers/oauth"
import { getCombinedEnvVariables } from "~/helpers/preRequest"
import * as E from "fp-ts/Either"
const t = useI18n()
const toast = useToast()
@@ -77,6 +78,15 @@ const clientSecret = pluckRef(auth, "clientSecret" as any)
const scope = pluckRef(auth, "scope")
function translateTokenRequestError(error: string) {
switch (error) {
case "OIDC_DISCOVERY_FAILED":
return t("authorization.oauth.token_generation_oidc_discovery_failed")
default:
return t("authorization.oauth.something_went_wrong_on_token_generation")
}
}
const handleAccessTokenRequest = async () => {
if (
oidcDiscoveryURL.value === "" &&
@@ -98,7 +108,11 @@ const handleAccessTokenRequest = async () => {
clientSecret: parseTemplateString(clientSecret.value, envVars),
scope: parseTemplateString(scope.value, envVars),
}
await tokenRequest(tokenReqParams)
const res = await tokenRequest(tokenReqParams)
if (res && E.isLeft(res)) {
toast.error(translateTokenRequestError(res.left))
}
} catch (e) {
toast.error(`${e}`)
}

View File

@@ -350,7 +350,6 @@ const newSendRequest = async () => {
const streamResult = await streamPromise
requestCancelFunc.value = cancel
if (E.isRight(streamResult)) {
subscribeToStream(
streamResult.right,
@@ -365,6 +364,20 @@ const newSendRequest = async () => {
loading.value = false
},
() => {
// TODO: Change this any to a proper type
const result = (streamResult.right as any).value
if (
result.type === "network_fail" &&
result.error?.error === "NO_PW_EXT_HOOK"
) {
const errorResponse: HoppRESTResponse = {
type: "extension_error",
error: result.error.humanMessage.heading,
component: result.error.component,
req: result.req,
}
updateRESTResponse(errorResponse)
}
loading.value = false
}
)

View File

@@ -11,6 +11,12 @@
<HoppSmartSpinner class="my-4" />
<span class="text-secondaryLight">{{ t("state.loading") }}</span>
</div>
<component
:is="response.component"
v-if="response.type === 'extension_error'"
class="flex-1"
/>
<HoppSmartPlaceholder
v-if="response.type === 'network_fail'"
:src="`/images/states/${colorMode.value}/youre_lost.svg`"

View File

@@ -0,0 +1,98 @@
<template>
<HoppSmartPlaceholder
:src="`/images/states/${colorMode.value}/youre_lost.svg`"
:alt="`${t('error.network_fail')}`"
:heading="t('error.network_fail')"
large
>
<div class="my-1 text-secondaryLight flex flex-col items-center">
<span>
{{ t("error.please_install_extension") }}
</span>
<span>
{{ t("error.check_how_to_add_origin") }}
<HoppSmartLink
blank
to="https://docs.hoppscotch.io/documentation/features/interceptor#browser-extension"
class="text-accent hover:text-accentDark"
>
here
</HoppSmartLink>
</span>
</div>
<div class="flex flex-col py-4 space-y-2">
<span>
<HoppSmartItem
to="https://chrome.google.com/webstore/detail/hoppscotch-browser-extens/amknoiejhlmhancpahfcfcfhllgkpbld"
blank
:icon="IconChrome"
label="Chrome"
:info-icon="hasChromeExtInstalled ? IconCheckCircle : null"
:active-info-icon="hasChromeExtInstalled"
outline
/>
</span>
<span>
<HoppSmartItem
to="https://addons.mozilla.org/en-US/firefox/addon/hoppscotch"
blank
:icon="IconFirefox"
label="Firefox"
:info-icon="hasFirefoxExtInstalled ? IconCheckCircle : null"
:active-info-icon="hasFirefoxExtInstalled"
outline
/>
</span>
</div>
<div class="py-4 space-y-4">
<div class="flex items-center">
<HoppSmartToggle
:on="extensionEnabled"
@change="extensionEnabled = !extensionEnabled"
>
{{ t("settings.extensions_use_toggle") }}
</HoppSmartToggle>
</div>
</div>
</HoppSmartPlaceholder>
</template>
<script setup lang="ts">
import IconChrome from "~icons/brands/chrome"
import IconFirefox from "~icons/brands/firefox"
import IconCheckCircle from "~icons/lucide/check-circle"
import { useI18n } from "@composables/i18n"
import { ExtensionInterceptorService } from "~/platform/std/interceptors/extension"
import { useService } from "dioc/vue"
import { computed } from "vue"
import { InterceptorService } from "~/services/interceptor.service"
import { platform } from "~/platform"
import { useColorMode } from "~/composables/theming"
const colorMode = useColorMode()
const t = useI18n()
const interceptorService = useService(InterceptorService)
const extensionService = useService(ExtensionInterceptorService)
const hasChromeExtInstalled = extensionService.chromeExtensionInstalled
const hasFirefoxExtInstalled = extensionService.firefoxExtensionInstalled
const extensionEnabled = computed({
get() {
return (
interceptorService.currentInterceptorID.value ===
extensionService.interceptorID
)
},
set(active) {
if (active) {
interceptorService.currentInterceptorID.value =
extensionService.interceptorID
} else {
interceptorService.currentInterceptorID.value =
platform.interceptors.default
}
},
})
</script>

View File

@@ -152,12 +152,14 @@ export function useStreamSubscriber(): {
error?: (e: any) => void,
complete?: () => void
) => {
const sub = stream.subscribe({
let sub: Subscription | null = null
sub = stream.subscribe({
next,
error,
complete: () => {
if (complete) complete()
subs.splice(subs.indexOf(sub), 1)
if (sub) subs.splice(subs.indexOf(sub), 1)
},
})

View File

@@ -4,7 +4,10 @@ import {
removeLocalConfig,
} from "~/newstore/localpersistence"
const redirectUri = `${window.location.origin}/`
import * as E from "fp-ts/Either"
import { z } from "zod"
const redirectUri = `${window.location.origin}/oauth`
// GENERAL HELPER FUNCTIONS
@@ -16,7 +19,7 @@ const redirectUri = `${window.location.origin}/`
* @returns {Object}
*/
const sendPostRequest = async (url, params) => {
const sendPostRequest = async (url: string, params: Record<string, string>) => {
const body = Object.keys(params)
.map((key) => `${key}=${params[key]}`)
.join("&")
@@ -30,9 +33,9 @@ const sendPostRequest = async (url, params) => {
try {
const response = await fetch(url, options)
const data = await response.json()
return data
return E.right(data)
} catch (e) {
console.error(e)
return E.left("AUTH_TOKEN_REQUEST_FAILED")
}
}
@@ -43,7 +46,7 @@ const sendPostRequest = async (url, params) => {
* @returns {Object}
*/
const parseQueryString = (searchQuery) => {
const parseQueryString = (searchQuery: string): Record<string, string> => {
if (searchQuery === "") {
return {}
}
@@ -61,7 +64,7 @@ const parseQueryString = (searchQuery) => {
* @returns {Object}
*/
const getTokenConfiguration = async (endpoint) => {
const getTokenConfiguration = async (endpoint: string) => {
const options = {
method: "GET",
headers: {
@@ -71,9 +74,9 @@ const getTokenConfiguration = async (endpoint) => {
try {
const response = await fetch(endpoint, options)
const config = await response.json()
return config
return E.right(config)
} catch (e) {
console.error(e)
return E.left("OIDC_DISCOVERY_FAILED")
}
}
@@ -97,7 +100,7 @@ const generateRandomString = () => {
* @returns {Promise<ArrayBuffer>}
*/
const sha256 = (plain) => {
const sha256 = (plain: string) => {
const encoder = new TextEncoder()
const data = encoder.encode(plain)
return window.crypto.subtle.digest("SHA-256", data)
@@ -111,15 +114,18 @@ const sha256 = (plain) => {
*/
const base64urlencode = (
str // Converts the ArrayBuffer to string using Uint8 array to convert to what btoa accepts.
) =>
str: ArrayBuffer // Converts the ArrayBuffer to string using Uint8 array to convert to what btoa accepts.
) => {
const hashArray = Array.from(new Uint8Array(str))
// btoa accepts chars only within ascii 0-255 and base64 encodes them.
// Then convert the base64 encoded to base64url encoded
// (replace + with -, replace / with _, trim trailing =)
btoa(String.fromCharCode.apply(null, new Uint8Array(str)))
return btoa(String.fromCharCode.apply(null, hashArray))
.replace(/\+/g, "-")
.replace(/\//g, "_")
.replace(/=+$/, "")
}
/**
* Return the base64-urlencoded sha256 hash for the PKCE challenge
@@ -128,13 +134,23 @@ const base64urlencode = (
* @returns {String}
*/
const pkceChallengeFromVerifier = async (v) => {
const pkceChallengeFromVerifier = async (v: string) => {
const hashed = await sha256(v)
return base64urlencode(hashed)
}
// OAUTH REQUEST
type TokenRequestParams = {
oidcDiscoveryUrl: string
grantType: string
authUrl: string
accessTokenUrl: string
clientId: string
clientSecret: string
scope: string
}
/**
* Initiates PKCE Auth Code flow when requested
*
@@ -150,16 +166,28 @@ const tokenRequest = async ({
clientId,
clientSecret,
scope,
}) => {
}: TokenRequestParams) => {
// Check oauth configuration
if (oidcDiscoveryUrl !== "") {
// eslint-disable-next-line camelcase
const { authorization_endpoint, token_endpoint } =
await getTokenConfiguration(oidcDiscoveryUrl)
// eslint-disable-next-line camelcase
authUrl = authorization_endpoint
// eslint-disable-next-line camelcase
accessTokenUrl = token_endpoint
const res = await getTokenConfiguration(oidcDiscoveryUrl)
const OIDCConfigurationSchema = z.object({
authorization_endpoint: z.string(),
token_endpoint: z.string(),
})
if (E.isLeft(res)) {
return E.left("OIDC_DISCOVERY_FAILED" as const)
}
const parsedOIDCConfiguration = OIDCConfigurationSchema.safeParse(res.right)
if (!parsedOIDCConfiguration.success) {
return E.left("OIDC_DISCOVERY_FAILED" as const)
}
authUrl = parsedOIDCConfiguration.data.authorization_endpoint
accessTokenUrl = parsedOIDCConfiguration.data.token_endpoint
}
// Store oauth information
setLocalConfig("tokenEndpoint", accessTokenUrl)
@@ -190,7 +218,7 @@ const tokenRequest = async ({
)}&code_challenge_method=S256`
// Redirect to the authorization server
window.location = buildUrl()
window.location.assign(buildUrl())
}
// OAUTH REDIRECT HANDLING
@@ -202,44 +230,84 @@ const tokenRequest = async ({
* @returns {Promise<any | void>}
*/
const oauthRedirect = () => {
let tokenResponse = ""
const q = parseQueryString(window.location.search.substring(1))
const handleOAuthRedirect = async () => {
const queryParams = parseQueryString(window.location.search.substring(1))
// Check if the server returned an error string
if (q.error) {
alert(`Error returned from authorization server: ${q.error}`)
if (queryParams.error) {
return E.left("AUTH_SERVER_RETURNED_ERROR" as const)
}
if (!queryParams.code) {
return E.left("NO_AUTH_CODE" as const)
}
// If the server returned an authorization code, attempt to exchange it for an access token
if (q.code) {
// Verify state matches what we set at the beginning
if (getLocalConfig("pkce_state") !== q.state) {
alert("Invalid state")
Promise.reject(tokenResponse)
} else {
try {
// Exchange the authorization code for an access token
tokenResponse = sendPostRequest(getLocalConfig("tokenEndpoint"), {
grant_type: "authorization_code",
code: q.code,
client_id: getLocalConfig("client_id"),
client_secret: getLocalConfig("client_secret"),
redirect_uri: redirectUri,
code_verifier: getLocalConfig("pkce_codeVerifier"),
})
} catch (e) {
console.error(e)
return Promise.reject(tokenResponse)
}
}
// Clean these up since we don't need them anymore
removeLocalConfig("pkce_state")
removeLocalConfig("pkce_codeVerifier")
removeLocalConfig("tokenEndpoint")
removeLocalConfig("client_id")
removeLocalConfig("client_secret")
return tokenResponse
// Verify state matches what we set at the beginning
if (getLocalConfig("pkce_state") !== queryParams.state) {
return E.left("INVALID_STATE" as const)
}
return Promise.reject(tokenResponse)
const tokenEndpoint = getLocalConfig("tokenEndpoint")
const clientID = getLocalConfig("client_id")
const clientSecret = getLocalConfig("client_secret")
const codeVerifier = getLocalConfig("pkce_codeVerifier")
if (!tokenEndpoint) {
return E.left("NO_TOKEN_ENDPOINT" as const)
}
if (!clientID) {
return E.left("NO_CLIENT_ID" as const)
}
if (!clientSecret) {
return E.left("NO_CLIENT_SECRET" as const)
}
if (!codeVerifier) {
return E.left("NO_CODE_VERIFIER" as const)
}
// Exchange the authorization code for an access token
const tokenResponse: E.Either<string, any> = await sendPostRequest(
tokenEndpoint,
{
grant_type: "authorization_code",
code: queryParams.code,
client_id: clientID,
client_secret: clientSecret,
redirect_uri: redirectUri,
code_verifier: codeVerifier,
}
)
// Clean these up since we don't need them anymore
clearPKCEState()
if (E.isLeft(tokenResponse)) {
return E.left("AUTH_TOKEN_REQUEST_FAILED" as const)
}
const withAccessTokenSchema = z.object({
access_token: z.string(),
})
const parsedTokenResponse = withAccessTokenSchema.safeParse(
tokenResponse.right
)
return parsedTokenResponse.success
? E.right(parsedTokenResponse.data)
: E.left("AUTH_TOKEN_REQUEST_INVALID_RESPONSE" as const)
}
export { tokenRequest, oauthRedirect }
const clearPKCEState = () => {
removeLocalConfig("pkce_state")
removeLocalConfig("pkce_codeVerifier")
removeLocalConfig("tokenEndpoint")
removeLocalConfig("client_id")
removeLocalConfig("client_secret")
}
export { tokenRequest, handleOAuthRedirect }

View File

@@ -1,4 +1,5 @@
import { HoppRESTRequest } from "@hoppscotch/data"
import { Component } from "vue"
export type HoppRESTResponseHeader = { key: string; value: string }
@@ -39,3 +40,9 @@ export type HoppRESTResponse =
req: HoppRESTRequest
}
| {
type: "extension_error"
error: string
component: Component
req: HoppRESTRequest
}

View File

@@ -94,7 +94,7 @@
</template>
<script lang="ts" setup>
import { ref, onMounted, onBeforeUnmount, onBeforeMount } from "vue"
import { ref, onMounted, onBeforeUnmount } from "vue"
import { safelyExtractRESTRequest } from "@hoppscotch/data"
import { translateExtURLParams } from "~/helpers/RESTExtURLParams"
import { useRoute } from "vue-router"
@@ -114,7 +114,6 @@ import {
} from "rxjs"
import { useToast } from "~/composables/toast"
import { watchDebounced } from "@vueuse/core"
import { oauthRedirect } from "~/helpers/oauth"
import { useReadonlyStream } from "~/composables/stream"
import {
changeCurrentSyncStatus,
@@ -414,28 +413,6 @@ function setupTabStateSync() {
})
}
function oAuthURL() {
onBeforeMount(async () => {
try {
const tokenInfo = await oauthRedirect()
if (
typeof tokenInfo === "object" &&
tokenInfo.hasOwnProperty("access_token")
) {
if (
tabs.currentActiveTab.value.document.request.auth.authType ===
"oauth-2"
) {
tabs.currentActiveTab.value.document.request.auth.token =
tokenInfo.access_token
}
}
// eslint-disable-next-line no-empty
} catch (_) {}
})
}
defineActionHandler("contextmenu.open", ({ position, text }) => {
if (text) {
contextMenu.value = {
@@ -454,7 +431,6 @@ defineActionHandler("contextmenu.open", ({ position, text }) => {
setupTabStateSync()
bindRequestToURLParams()
oAuthURL()
defineActionHandler("rest.request.open", ({ doc }) => {
tabs.createNewTab(doc)

View File

@@ -0,0 +1,81 @@
<template>
<div class="flex justify-center items-center">
<HoppSmartSpinner />
</div>
</template>
<script setup lang="ts">
import { handleOAuthRedirect } from "~/helpers/oauth"
import { useToast } from "~/composables/toast"
import { useI18n } from "~/composables/i18n"
import * as E from "fp-ts/Either"
import { useService } from "dioc/vue"
import { RESTTabService } from "~/services/tab/rest"
import { onMounted } from "vue"
import { useRouter } from "vue-router"
const t = useI18n()
const router = useRouter()
const toast = useToast()
const tabs = useService(RESTTabService)
function translateOAuthRedirectError(error: string) {
switch (error) {
case "AUTH_SERVER_RETURNED_ERROR":
return t("authorization.oauth.redirect_auth_server_returned_error")
case "NO_AUTH_CODE":
return t("authorization.oauth.redirect_no_auth_code")
case "INVALID_STATE":
return t("authorization.oauth.redirect_invalid_state")
case "NO_TOKEN_ENDPOINT":
return t("authorization.oauth.redirect_no_token_endpoint")
case "NO_CLIENT_ID":
return t("authorization.oauth.redirect_no_client_id")
case "NO_CLIENT_SECRET":
return t("authorization.oauth.redirect_no_client_secret")
case "NO_CODE_VERIFIER":
return t("authorization.oauth.redirect_no_code_verifier")
case "AUTH_TOKEN_REQUEST_FAILED":
return t("authorization.oauth.redirect_auth_token_request_failed")
case "AUTH_TOKEN_REQUEST_INVALID_RESPONSE":
return t(
"authorization.oauth.redirect_auth_token_request_invalid_response"
)
default:
return t("authorization.oauth.something_went_wrong_on_oauth_redirect")
}
}
onMounted(async () => {
const tokenInfo = await handleOAuthRedirect()
if (E.isLeft(tokenInfo)) {
toast.error(translateOAuthRedirectError(tokenInfo.left))
router.push("/")
return
}
if (
tabs.currentActiveTab.value.document.request.auth.authType === "oauth-2"
) {
tabs.currentActiveTab.value.document.request.auth.token =
tokenInfo.right.access_token
router.push("/")
return
}
})
</script>

View File

@@ -12,6 +12,7 @@ import { computed, readonly, ref } from "vue"
import { browserIsChrome, browserIsFirefox } from "~/helpers/utils/userAgent"
import SettingsExtension from "~/components/settings/Extension.vue"
import InterceptorsExtensionSubtitle from "~/components/interceptors/ExtensionSubtitle.vue"
import InterceptorsErrorPlaceholder from "~/components/interceptors/ErrorPlaceholder.vue"
export const defineSubscribableObject = <T extends object>(obj: T) => {
const proxyObject = {
@@ -217,6 +218,7 @@ export class ExtensionInterceptorService
description: () => "Heading not found",
},
error: "NO_PW_EXT_HOOK",
component: InterceptorsErrorPlaceholder,
})
}

View File

@@ -29,6 +29,7 @@ export type InterceptorError =
description: (t: ReturnType<typeof getI18n>) => string
}
error?: unknown
component?: Component
}
/**

View File

@@ -43,7 +43,7 @@
"io-ts": "^2.2.20",
"lodash": "^4.17.21",
"parser-ts": "^0.7.0",
"verzod": "^0.1.1",
"verzod": "^0.2.2",
"zod": "^3.22.4"
}
}

View File

@@ -2,9 +2,9 @@ import { z } from "zod"
import { defineVersion } from "verzod"
export const GQLHeader = z.object({
key: z.string(),
value: z.string(),
active: z.boolean()
key: z.string().catch(""),
value: z.string().catch(""),
active: z.boolean().catch(true)
})
export type GQLHeader = z.infer<typeof GQLHeader>
@@ -13,7 +13,7 @@ export const V1_SCHEMA = z.object({
v: z.literal(1),
name: z.string(),
url: z.string(),
headers: z.array(GQLHeader),
headers: z.array(GQLHeader).catch([]),
query: z.string(),
variables: z.string(),
})

View File

@@ -11,8 +11,8 @@ export type HoppGQLAuthNone = z.infer<typeof HoppGQLAuthNone>
export const HoppGQLAuthBasic = z.object({
authType: z.literal("basic"),
username: z.string(),
password: z.string()
username: z.string().catch(""),
password: z.string().catch("")
})
export type HoppGQLAuthBasic = z.infer<typeof HoppGQLAuthBasic>
@@ -20,7 +20,7 @@ export type HoppGQLAuthBasic = z.infer<typeof HoppGQLAuthBasic>
export const HoppGQLAuthBearer = z.object({
authType: z.literal("bearer"),
token: z.string()
token: z.string().catch("")
})
export type HoppGQLAuthBearer = z.infer<typeof HoppGQLAuthBearer>
@@ -28,12 +28,12 @@ export type HoppGQLAuthBearer = z.infer<typeof HoppGQLAuthBearer>
export const HoppGQLAuthOAuth2 = z.object({
authType: z.literal("oauth-2"),
token: z.string(),
oidcDiscoveryURL: z.string(),
authURL: z.string(),
accessTokenURL: z.string(),
clientID: z.string(),
scope: z.string()
token: z.string().catch(""),
oidcDiscoveryURL: z.string().catch(""),
authURL: z.string().catch(""),
accessTokenURL: z.string().catch(""),
clientID: z.string().catch(""),
scope: z.string().catch("")
})
export type HoppGQLAuthOAuth2 = z.infer<typeof HoppGQLAuthOAuth2>
@@ -41,9 +41,9 @@ export type HoppGQLAuthOAuth2 = z.infer<typeof HoppGQLAuthOAuth2>
export const HoppGQLAuthAPIKey = z.object({
authType: z.literal("api-key"),
key: z.string(),
value: z.string(),
addTo: z.string()
key: z.string().catch(""),
value: z.string().catch(""),
addTo: z.string().catch("Headers")
})
export type HoppGQLAuthAPIKey = z.infer<typeof HoppGQLAuthAPIKey>
@@ -68,7 +68,7 @@ const V2_SCHEMA = z.object({
name: z.string(),
url: z.string(),
headers: z.array(GQLHeader),
headers: z.array(GQLHeader).catch([]),
query: z.string(),
variables: z.string(),

View File

@@ -52,6 +52,7 @@ export const HoppRESTRequest = createVersionedEntity({
export type HoppRESTRequest = InferredEntity<typeof HoppRESTRequest>
// TODO: Handle the issue with the preRequestScript and testScript type check failures on pre-commit
const HoppRESTRequestEq = Eq.struct<HoppRESTRequest>({
id: undefinedEq(S.Eq),
v: S.Eq,
@@ -59,11 +60,11 @@ const HoppRESTRequestEq = Eq.struct<HoppRESTRequest>({
body: lodashIsEqualEq,
endpoint: S.Eq,
headers: mapThenEq(
(arr) => arr.filter((h) => h.key !== "" && h.value !== ""),
(arr) => arr.filter((h: any) => h.key !== "" && h.value !== ""),
lodashIsEqualEq
),
params: mapThenEq(
(arr) => arr.filter((p) => p.key !== "" && p.value !== ""),
(arr) => arr.filter((p: any) => p.key !== "" && p.value !== ""),
lodashIsEqualEq
),
method: S.Eq,

View File

@@ -10,7 +10,7 @@ export const FormDataKeyValue = z.object({
z.union([
z.object({
isFile: z.literal(true),
value: z.array(z.instanceof(Blob))
value: z.array(z.instanceof(Blob).nullable())
}),
z.object({
isFile: z.literal(false),
@@ -31,11 +31,11 @@ export type HoppRESTReqBodyFormData = z.infer<typeof HoppRESTReqBodyFormData>
export const HoppRESTReqBody = z.union([
z.object({
contentType: z.literal(null),
body: z.literal(null)
body: z.literal(null).catch(null)
}),
z.object({
contentType: z.literal("multipart/form-data"),
body: FormDataKeyValue
body: z.array(FormDataKeyValue).catch([])
}),
z.object({
contentType: z.union([
@@ -48,7 +48,7 @@ export const HoppRESTReqBody = z.union([
z.literal("text/html"),
z.literal("text/plain"),
]),
body: z.string()
body: z.string().catch("")
})
])
@@ -62,36 +62,36 @@ export type HoppRESTAuthNone = z.infer<typeof HoppRESTAuthNone>
export const HoppRESTAuthBasic = z.object({
authType: z.literal("basic"),
username: z.string(),
password: z.string(),
username: z.string().catch(""),
password: z.string().catch(""),
})
export type HoppRESTAuthBasic = z.infer<typeof HoppRESTAuthBasic>
export const HoppRESTAuthBearer = z.object({
authType: z.literal("bearer"),
token: z.string(),
token: z.string().catch(""),
})
export type HoppRESTAuthBearer = z.infer<typeof HoppRESTAuthBearer>
export const HoppRESTAuthOAuth2 = z.object({
authType: z.literal("oauth-2"),
token: z.string(),
oidcDiscoveryURL: z.string(),
authURL: z.string(),
accessTokenURL: z.string(),
clientID: z.string(),
scope: z.string(),
token: z.string().catch(""),
oidcDiscoveryURL: z.string().catch(""),
authURL: z.string().catch(""),
accessTokenURL: z.string().catch(""),
clientID: z.string().catch(""),
scope: z.string().catch(""),
})
export type HoppRESTAuthOAuth2 = z.infer<typeof HoppRESTAuthOAuth2>
export const HoppRESTAuthAPIKey = z.object({
authType: z.literal("api-key"),
key: z.string(),
value: z.string(),
addTo: z.string(),
key: z.string().catch(""),
value: z.string().catch(""),
addTo: z.string().catch("Headers"),
})
export type HoppRESTAuthAPIKey = z.infer<typeof HoppRESTAuthAPIKey>
@@ -112,9 +112,9 @@ export type HoppRESTAuth = z.infer<typeof HoppRESTAuth>
export const HoppRESTParams = z.array(
z.object({
key: z.string(),
value: z.string(),
active: z.boolean()
key: z.string().catch(""),
value: z.string().catch(""),
active: z.boolean().catch(true)
})
)
@@ -122,9 +122,9 @@ export type HoppRESTParams = z.infer<typeof HoppRESTParams>
export const HoppRESTHeaders = z.array(
z.object({
key: z.string(),
value: z.string(),
active: z.boolean()
key: z.string().catch(""),
value: z.string().catch(""),
active: z.boolean().catch(true)
})
)
@@ -139,8 +139,8 @@ const V1_SCHEMA = z.object({
endpoint: z.string(),
params: HoppRESTParams,
headers: HoppRESTHeaders,
preRequestScript: z.string(),
testScript: z.string(),
preRequestScript: z.string().catch(""),
testScript: z.string().catch(""),
auth: HoppRESTAuth,

View File

@@ -1,7 +1,7 @@
{
"name": "@hoppscotch/selfhost-desktop",
"private": true,
"version": "2023.8.3-1",
"version": "2023.8.4-1",
"type": "module",
"scripts": {
"dev:vite": "vite",

View File

@@ -1,7 +1,7 @@
{
"name": "@hoppscotch/selfhost-web",
"private": true,
"version": "2023.8.3-1",
"version": "2023.8.4-1",
"type": "module",
"scripts": {
"dev:vite": "vite",

View File

@@ -1,7 +1,7 @@
{
"name": "hoppscotch-sh-admin",
"private": true,
"version": "2023.8.3-1",
"version": "2023.8.4-1",
"type": "module",
"scripts": {
"dev": "pnpm exec npm-run-all -p -l dev:*",

180
pnpm-lock.yaml generated
View File

@@ -611,8 +611,8 @@ importers:
specifier: ^21.1.1
version: 21.1.1
zod:
specifier: ^3.22.2
version: 3.22.2
specifier: ^3.22.4
version: 3.22.4
devDependencies:
'@esbuild-plugins/node-globals-polyfill':
specifier: ^0.2.3
@@ -798,8 +798,8 @@ importers:
specifier: ^0.7.0
version: 0.7.0(fp-ts@2.16.1)
verzod:
specifier: ^0.1.1
version: 0.1.1
specifier: ^0.2.2
version: 0.2.2(zod@3.22.4)
zod:
specifier: ^3.22.4
version: 3.22.4
@@ -830,7 +830,7 @@ importers:
version: 0.15.0
tsup:
specifier: ^5.12.5
version: 5.12.9(@swc/core@1.2.213)(typescript@4.7.4)
version: 5.12.9(typescript@4.9.5)
devDependencies:
'@digitak/esrun':
specifier: ^3.1.2
@@ -849,10 +849,10 @@ importers:
version: 17.0.45
'@typescript-eslint/eslint-plugin':
specifier: ^5.19.0
version: 5.30.6(@typescript-eslint/parser@5.30.6)(eslint@8.19.0)(typescript@4.7.4)
version: 5.30.6(@typescript-eslint/parser@5.30.6)(eslint@8.19.0)(typescript@4.9.5)
'@typescript-eslint/parser':
specifier: ^5.19.0
version: 5.30.6(eslint@8.19.0)(typescript@4.7.4)
version: 5.30.6(eslint@8.19.0)(typescript@4.9.5)
eslint:
specifier: ^8.13.0
version: 8.19.0
@@ -873,10 +873,10 @@ importers:
version: 2.8.4
ts-jest:
specifier: ^27.1.4
version: 27.1.5(@babel/core@7.23.2)(@types/jest@27.5.2)(esbuild@0.14.48)(jest@27.5.1)(typescript@4.7.4)
version: 27.1.5(@babel/core@7.23.2)(@types/jest@27.5.2)(esbuild@0.14.48)(jest@27.5.1)(typescript@4.9.5)
typescript:
specifier: ^4.6.3
version: 4.7.4
version: 4.9.5
packages/hoppscotch-selfhost-desktop:
dependencies:
@@ -5531,9 +5531,9 @@ packages:
'@parcel/watcher':
optional: true
dependencies:
'@babel/generator': 7.22.10
'@babel/template': 7.22.5
'@babel/types': 7.22.10
'@babel/generator': 7.23.0
'@babel/template': 7.22.15
'@babel/types': 7.23.0
'@graphql-codegen/core': 4.0.0(graphql@16.8.0)
'@graphql-codegen/plugin-helpers': 5.0.1(graphql@16.8.0)
'@graphql-tools/apollo-engine-loader': 8.0.0(graphql@16.8.0)
@@ -5545,7 +5545,7 @@ packages:
'@graphql-tools/load': 8.0.0(graphql@16.8.0)
'@graphql-tools/prisma-loader': 8.0.1(@types/node@17.0.27)(graphql@16.8.0)
'@graphql-tools/url-loader': 8.0.0(@types/node@17.0.27)(graphql@16.8.0)
'@graphql-tools/utils': 10.0.5(graphql@16.8.0)
'@graphql-tools/utils': 10.0.6(graphql@16.8.0)
'@whatwg-node/fetch': 0.8.8
chalk: 4.1.2
cosmiconfig: 8.2.0
@@ -7390,7 +7390,7 @@ packages:
graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0
dependencies:
'@graphql-tools/url-loader': 8.0.0(@types/node@17.0.27)(graphql@16.8.0)
'@graphql-tools/utils': 10.0.5(graphql@16.8.0)
'@graphql-tools/utils': 10.0.6(graphql@16.8.0)
'@types/js-yaml': 4.0.5
'@types/json-stable-stringify': 1.0.34
'@whatwg-node/fetch': 0.9.9
@@ -7672,10 +7672,10 @@ packages:
'@types/ws': 8.5.5
'@whatwg-node/fetch': 0.8.8
graphql: 16.6.0
isomorphic-ws: 5.0.0(ws@8.13.0)
isomorphic-ws: 5.0.0(ws@8.14.2)
tslib: 2.6.2
value-or-promise: 1.0.12
ws: 8.13.0
ws: 8.14.2
transitivePeerDependencies:
- '@types/node'
- bufferutil
@@ -9923,6 +9923,7 @@ packages:
cpu: [arm]
os: [android]
requiresBuild: true
dev: true
optional: true
/@swc/core-android-arm64@1.2.213:
@@ -9931,6 +9932,7 @@ packages:
cpu: [arm64]
os: [android]
requiresBuild: true
dev: true
optional: true
/@swc/core-darwin-arm64@1.2.213:
@@ -9939,6 +9941,7 @@ packages:
cpu: [arm64]
os: [darwin]
requiresBuild: true
dev: true
optional: true
/@swc/core-darwin-x64@1.2.213:
@@ -9947,6 +9950,7 @@ packages:
cpu: [x64]
os: [darwin]
requiresBuild: true
dev: true
optional: true
/@swc/core-freebsd-x64@1.2.213:
@@ -9955,6 +9959,7 @@ packages:
cpu: [x64]
os: [freebsd]
requiresBuild: true
dev: true
optional: true
/@swc/core-linux-arm-gnueabihf@1.2.213:
@@ -9963,6 +9968,7 @@ packages:
cpu: [arm]
os: [linux]
requiresBuild: true
dev: true
optional: true
/@swc/core-linux-arm64-gnu@1.2.213:
@@ -9971,6 +9977,7 @@ packages:
cpu: [arm64]
os: [linux]
requiresBuild: true
dev: true
optional: true
/@swc/core-linux-arm64-musl@1.2.213:
@@ -9979,6 +9986,7 @@ packages:
cpu: [arm64]
os: [linux]
requiresBuild: true
dev: true
optional: true
/@swc/core-linux-x64-gnu@1.2.213:
@@ -9987,6 +9995,7 @@ packages:
cpu: [x64]
os: [linux]
requiresBuild: true
dev: true
optional: true
/@swc/core-linux-x64-musl@1.2.213:
@@ -9995,6 +10004,7 @@ packages:
cpu: [x64]
os: [linux]
requiresBuild: true
dev: true
optional: true
/@swc/core-win32-arm64-msvc@1.2.213:
@@ -10003,6 +10013,7 @@ packages:
cpu: [arm64]
os: [win32]
requiresBuild: true
dev: true
optional: true
/@swc/core-win32-ia32-msvc@1.2.213:
@@ -10011,6 +10022,7 @@ packages:
cpu: [ia32]
os: [win32]
requiresBuild: true
dev: true
optional: true
/@swc/core-win32-x64-msvc@1.2.213:
@@ -10019,6 +10031,7 @@ packages:
cpu: [x64]
os: [win32]
requiresBuild: true
dev: true
optional: true
/@swc/core@1.2.213:
@@ -10039,6 +10052,7 @@ packages:
'@swc/core-win32-arm64-msvc': 1.2.213
'@swc/core-win32-ia32-msvc': 1.2.213
'@swc/core-win32-x64-msvc': 1.2.213
dev: true
/@tauri-apps/api@1.5.1:
resolution: {integrity: sha512-6unsZDOdlXTmauU3NhWhn+Cx0rODV+rvNvTdvolE5Kls5ybA6cqndQENDt1+FS0tF7ozCP66jwWoH6a5h90BrA==}
@@ -10736,7 +10750,7 @@ packages:
'@types/yargs-parser': 21.0.0
dev: true
/@typescript-eslint/eslint-plugin@5.30.6(@typescript-eslint/parser@5.30.6)(eslint@8.19.0)(typescript@4.7.4):
/@typescript-eslint/eslint-plugin@5.30.6(@typescript-eslint/parser@5.30.6)(eslint@8.19.0)(typescript@4.9.5):
resolution: {integrity: sha512-J4zYMIhgrx4MgnZrSDD7sEnQp7FmhKNOaqaOpaoQ/SfdMfRB/0yvK74hTnvH+VQxndZynqs5/Hn4t+2/j9bADg==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies:
@@ -10747,18 +10761,18 @@ packages:
typescript:
optional: true
dependencies:
'@typescript-eslint/parser': 5.30.6(eslint@8.19.0)(typescript@4.7.4)
'@typescript-eslint/parser': 5.30.6(eslint@8.19.0)(typescript@4.9.5)
'@typescript-eslint/scope-manager': 5.30.6
'@typescript-eslint/type-utils': 5.30.6(eslint@8.19.0)(typescript@4.7.4)
'@typescript-eslint/utils': 5.30.6(eslint@8.19.0)(typescript@4.7.4)
'@typescript-eslint/type-utils': 5.30.6(eslint@8.19.0)(typescript@4.9.5)
'@typescript-eslint/utils': 5.30.6(eslint@8.19.0)(typescript@4.9.5)
debug: 4.3.4(supports-color@9.2.2)
eslint: 8.19.0
functional-red-black-tree: 1.0.1
ignore: 5.2.0
regexpp: 3.2.0
semver: 7.3.7
tsutils: 3.21.0(typescript@4.7.4)
typescript: 4.7.4
tsutils: 3.21.0(typescript@4.9.5)
typescript: 4.9.5
transitivePeerDependencies:
- supports-color
dev: true
@@ -10903,7 +10917,7 @@ packages:
- supports-color
dev: true
/@typescript-eslint/parser@5.30.6(eslint@8.19.0)(typescript@4.7.4):
/@typescript-eslint/parser@5.30.6(eslint@8.19.0)(typescript@4.9.5):
resolution: {integrity: sha512-gfF9lZjT0p2ZSdxO70Xbw8w9sPPJGfAdjK7WikEjB3fcUI/yr9maUVEdqigBjKincUYNKOmf7QBMiTf719kbrA==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies:
@@ -10915,10 +10929,10 @@ packages:
dependencies:
'@typescript-eslint/scope-manager': 5.30.6
'@typescript-eslint/types': 5.30.6
'@typescript-eslint/typescript-estree': 5.30.6(typescript@4.7.4)
'@typescript-eslint/typescript-estree': 5.30.6(typescript@4.9.5)
debug: 4.3.4(supports-color@9.2.2)
eslint: 8.19.0
typescript: 4.7.4
typescript: 4.9.5
transitivePeerDependencies:
- supports-color
dev: true
@@ -11056,7 +11070,7 @@ packages:
'@typescript-eslint/visitor-keys': 6.4.0
dev: true
/@typescript-eslint/type-utils@5.30.6(eslint@8.19.0)(typescript@4.7.4):
/@typescript-eslint/type-utils@5.30.6(eslint@8.19.0)(typescript@4.9.5):
resolution: {integrity: sha512-GFVVzs2j0QPpM+NTDMXtNmJKlF842lkZKDSanIxf+ArJsGeZUIaeT4jGg+gAgHt7AcQSFwW7htzF/rbAh2jaVA==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies:
@@ -11066,11 +11080,11 @@ packages:
typescript:
optional: true
dependencies:
'@typescript-eslint/utils': 5.30.6(eslint@8.19.0)(typescript@4.7.4)
'@typescript-eslint/utils': 5.30.6(eslint@8.19.0)(typescript@4.9.5)
debug: 4.3.4(supports-color@9.2.2)
eslint: 8.19.0
tsutils: 3.21.0(typescript@4.7.4)
typescript: 4.7.4
tsutils: 3.21.0(typescript@4.9.5)
typescript: 4.9.5
transitivePeerDependencies:
- supports-color
dev: true
@@ -11195,7 +11209,7 @@ packages:
engines: {node: ^16.0.0 || >=18.0.0}
dev: true
/@typescript-eslint/typescript-estree@5.30.6(typescript@4.7.4):
/@typescript-eslint/typescript-estree@5.30.6(typescript@4.9.5):
resolution: {integrity: sha512-Z7TgPoeYUm06smfEfYF0RBkpF8csMyVnqQbLYiGgmUSTaSXTP57bt8f0UFXstbGxKIreTwQCujtaH0LY9w9B+A==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies:
@@ -11210,8 +11224,8 @@ packages:
globby: 11.1.0
is-glob: 4.0.3
semver: 7.5.4
tsutils: 3.21.0(typescript@4.7.4)
typescript: 4.7.4
tsutils: 3.21.0(typescript@4.9.5)
typescript: 4.9.5
transitivePeerDependencies:
- supports-color
dev: true
@@ -11321,7 +11335,7 @@ packages:
- supports-color
dev: true
/@typescript-eslint/utils@5.30.6(eslint@8.19.0)(typescript@4.7.4):
/@typescript-eslint/utils@5.30.6(eslint@8.19.0)(typescript@4.9.5):
resolution: {integrity: sha512-xFBLc/esUbLOJLk9jKv0E9gD/OH966M40aY9jJ8GiqpSkP2xOV908cokJqqhVd85WoIvHVHYXxSFE4cCSDzVvA==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies:
@@ -11330,7 +11344,7 @@ packages:
'@types/json-schema': 7.0.9
'@typescript-eslint/scope-manager': 5.30.6
'@typescript-eslint/types': 5.30.6
'@typescript-eslint/typescript-estree': 5.30.6(typescript@4.7.4)
'@typescript-eslint/typescript-estree': 5.30.6(typescript@4.9.5)
eslint: 8.19.0
eslint-scope: 5.1.1
eslint-utils: 3.0.0(eslint@8.19.0)
@@ -19783,7 +19797,7 @@ packages:
resolution: {integrity: sha512-9xZPKVYp9DxnM3sd1yAsh/d59iIaswDkai8oTxbursfKYbg/ibjX0IzFt35+VZ8iEW453TVTXztnRvYUQlAfUQ==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
dependencies:
acorn: 8.10.0
acorn: 8.11.2
eslint-visitor-keys: 3.4.3
espree: 9.6.1
semver: 7.5.4
@@ -20989,7 +21003,7 @@ packages:
/mlly@1.4.2:
resolution: {integrity: sha512-i/Ykufi2t1EZ6NaPLdfnZk2AX8cs0d+mTzVKuPfqPKPatxLApaBoxJQ9x1/uckXtrS/U5oisPMDkNs0yQTaBRg==}
dependencies:
acorn: 8.10.0
acorn: 8.11.2
pathe: 1.1.1
pkg-types: 1.0.3
ufo: 1.3.1
@@ -23744,7 +23758,7 @@ packages:
graphql: 16.8.1
iterall: 1.3.0
symbol-observable: 1.2.0
ws: 7.4.6
ws: 7.5.9
transitivePeerDependencies:
- bufferutil
- utf-8-validate
@@ -24275,6 +24289,42 @@ packages:
yargs-parser: 20.2.9
dev: true
/ts-jest@27.1.5(@babel/core@7.23.2)(@types/jest@27.5.2)(esbuild@0.14.48)(jest@27.5.1)(typescript@4.9.5):
resolution: {integrity: sha512-Xv6jBQPoBEvBq/5i2TeSG9tt/nqkbpcurrEG1b+2yfBrcJelOZF9Ml6dmyMh7bcW9JyFbRYpR5rxROSlBLTZHA==}
engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0}
hasBin: true
peerDependencies:
'@babel/core': '>=7.0.0-beta.0 <8'
'@types/jest': ^27.0.0
babel-jest: '>=27.0.0 <28'
esbuild: '*'
jest: ^27.0.0
typescript: '>=3.8 <5.0'
peerDependenciesMeta:
'@babel/core':
optional: true
'@types/jest':
optional: true
babel-jest:
optional: true
esbuild:
optional: true
dependencies:
'@babel/core': 7.23.2
'@types/jest': 27.5.2
bs-logger: 0.2.6
esbuild: 0.14.48
fast-json-stable-stringify: 2.1.0
jest: 27.5.1
jest-util: 27.5.1
json5: 2.2.1
lodash.memoize: 4.1.2
make-error: 1.3.6
semver: 7.3.7
typescript: 4.9.5
yargs-parser: 20.2.9
dev: true
/ts-jest@29.0.5(@babel/core@7.23.2)(jest@29.4.1)(typescript@4.9.3):
resolution: {integrity: sha512-PL3UciSgIpQ7f6XjVOmbi96vmDHUqAyqDr8YxzopDqX3kfgYtX1cuNeBjP+L9sFXi6nzsGGA6R3fP3DDDJyrxA==}
engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0}
@@ -24380,7 +24430,7 @@ packages:
'@tsconfig/node14': 1.0.3
'@tsconfig/node16': 1.0.3
'@types/node': 18.18.8
acorn: 8.10.0
acorn: 8.11.2
acorn-walk: 8.2.0
arg: 4.1.3
create-require: 1.1.1
@@ -24558,17 +24608,43 @@ packages:
transitivePeerDependencies:
- supports-color
- ts-node
/tsutils@3.21.0(typescript@4.7.4):
resolution: {integrity: sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==}
engines: {node: '>= 6'}
peerDependencies:
typescript: '>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta'
dependencies:
tslib: 1.14.1
typescript: 4.7.4
dev: true
/tsup@5.12.9(typescript@4.9.5):
resolution: {integrity: sha512-dUpuouWZYe40lLufo64qEhDpIDsWhRbr2expv5dHEMjwqeKJS2aXA/FPqs1dxO4T6mBojo7rvo3jP9NNzaKyDg==}
hasBin: true
peerDependencies:
'@swc/core': ^1
postcss: ^8.4.12
typescript: ^4.1.0
peerDependenciesMeta:
'@swc/core':
optional: true
postcss:
optional: true
typescript:
optional: true
dependencies:
bundle-require: 3.0.4(esbuild@0.14.48)
cac: 6.7.12
chokidar: 3.5.3
debug: 4.3.4(supports-color@9.2.2)
esbuild: 0.14.48
execa: 5.1.1
globby: 11.1.0
joycon: 3.1.1
postcss-load-config: 3.1.4
resolve-from: 5.0.0
rollup: 2.79.1
source-map: 0.8.0-beta.0
sucrase: 3.23.0
tree-kill: 1.2.2
typescript: 4.9.5
transitivePeerDependencies:
- supports-color
- ts-node
dev: false
/tsutils@3.21.0(typescript@4.9.3):
resolution: {integrity: sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==}
engines: {node: '>= 6'}
@@ -24704,6 +24780,7 @@ packages:
resolution: {integrity: sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==}
engines: {node: '>=4.2.0'}
hasBin: true
dev: true
/typescript@4.9.3:
resolution: {integrity: sha512-CIfGzTelbKNEnLpLdGFgdyKhG23CKdKgQPOBc+OUNrkJ2vr+KSzsSV5kq5iWhEQbok+quxgGzrAtGWCyU7tHnA==}
@@ -24720,7 +24797,6 @@ packages:
resolution: {integrity: sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==}
engines: {node: '>=4.2.0'}
hasBin: true
dev: true
/typescript@5.0.4:
resolution: {integrity: sha512-cW9T5W9xY37cc+jfEnaUvX91foxtHkza3Nw3wkoF4sSlKn0MONdkdEndig/qPBWXNkmplh3NzayQzCiHM4/hqw==}
@@ -25503,9 +25579,11 @@ packages:
resolution: {integrity: sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==}
engines: {node: '>= 0.8'}
/verzod@0.1.1:
resolution: {integrity: sha512-T0o2GHjSdERgt3FCrhGB+ctXdPhRjj/gL/mFjkb1HsYQQQr6pF10oPY1jVHI0RMsG6L2+6VKe4zDN0gAarZmzg==}
/verzod@0.2.2(zod@3.22.4):
resolution: {integrity: sha512-TnM0O2SUcXuY63qQ+W+W4/5bDaIhyV9ZDWwL0ztDOawX7q7ar+jHNdYKUR43rf8ku23p2ROgrfoKABjl2IiiZQ==}
engines: {node: '>=16'}
peerDependencies:
zod: ^3.22.0
dependencies:
zod: 3.22.4
dev: false
@@ -27760,7 +27838,6 @@ packages:
optional: true
utf-8-validate:
optional: true
dev: true
/ws@8.12.1:
resolution: {integrity: sha512-1qo+M9Ba+xNhPB+YTWUlK6M17brTut5EXbcBaMRN5pH5dFrXz7lzz1ChFSUq3bOUl8yEvSenhHmYUNJxFzdJew==}
@@ -28069,6 +28146,7 @@ packages:
/zod@3.22.2:
resolution: {integrity: sha512-wvWkphh5WQsJbVk1tbx1l1Ly4yg+XecD+Mq280uBGt9wa5BKSWf4Mhp6GmrkPixhMxmabYY7RbzlwVP32pbGCg==}
dev: true
/zod@3.22.4:
resolution: {integrity: sha512-iC+8Io04lddc+mVqQ9AZ7OQ2MrUKGN+oIQyq1vemgt46jwCwLfhq7/pwnBnNXXXZb8VTVLKwp9EDkx+ryxIWmg==}