Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add support for Digest authorization #4339

Merged
merged 21 commits into from
Oct 29, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
chore: lint fix
  • Loading branch information
nivedin authored and jamesgeorge007 committed Oct 29, 2024
commit ee9723173c19a507147a3ce00d992065c119d960
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,11 @@ const props = defineProps<{
active: boolean
}>()

const formattedShortcutKeys = computed(() =>
props.entry.meta?.keyboardShortcut?.map(
(key) => SPECIAL_KEY_CHARS[key] ?? capitalize(key)
)
const formattedShortcutKeys = computed(
() =>
props.entry.meta?.keyboardShortcut?.map(
(key) => SPECIAL_KEY_CHARS[key] ?? capitalize(key)
)
)

const emit = defineEmits<{
Expand Down
4 changes: 2 additions & 2 deletions packages/hoppscotch-common/src/composables/codemirror.ts
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ export function useCodemirror(
language.of(
getEditorLanguage(
options.extendedEditorConfig.useLang
? ((options.extendedEditorConfig.mode as any) ?? "")
? (options.extendedEditorConfig.mode as any) ?? ""
: "",
options.linter ?? undefined,
options.completer ?? undefined
Expand Down Expand Up @@ -486,7 +486,7 @@ export function useCodemirror(
effects: language.reconfigure(
getEditorLanguage(
options.extendedEditorConfig.useLang
? ((options.extendedEditorConfig.mode as any) ?? "")
? (options.extendedEditorConfig.mode as any) ?? ""
: "",
options.linter ?? undefined,
options.completer ?? undefined
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@ import { replaceInsomniaTemplating } from "./insomniaEnv"

// TODO: Insomnia allows custom prefixes for Bearer token auth, Hoppscotch doesn't. We just ignore the prefix for now

type UnwrapPromise<T extends Promise<any>> =
T extends Promise<infer Y> ? Y : never
type UnwrapPromise<T extends Promise<any>> = T extends Promise<infer Y>
? Y
: never

type InsomniaDoc = UnwrapPromise<ReturnType<typeof convert>>
type InsomniaResource = ImportRequest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ export const getComputedAuthHeaders = async (
false,
showKeyIfSecret
)
: (request.auth.value ?? ""),
: request.auth.value ?? "",
description: "",
})
}
Expand Down
5 changes: 2 additions & 3 deletions packages/hoppscotch-js-sandbox/src/shared-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,8 @@ const setEnv = (
selectedEnv.value = envValue
}
} else if (indexInGlobal >= 0) {
if ("value" in global[indexInGlobal]) {
;(global[indexInGlobal] as { value: string }).value = envValue
}
if ("value" in global[indexInGlobal])
(global[indexInGlobal] as { value: string }).value = envValue
} else {
selected.push({
key: envName,
Expand Down