Skip to content

Open-Source API Development Ecosystem • https://hoppscotch.io • Offline, On-Prem & Cloud • Web, Desktop & CLI • Open-Source Alternative to Postman, Insomnia

feat: revamped spotlight (#3171)

Andrew Bastin5230d2d3b844
diff --git a/packages/hoppscotch-common/locales/en.json b/packages/hoppscotch-common/locales/en.json
index fd80af3b7..6a84716dc 100644
--- a/packages/hoppscotch-common/locales/en.json
+++ b/packages/hoppscotch-common/locales/en.json
@@ -4,6 +4,7 @@
"cancel": "Cancel",
"choose_file": "Choose a file",
"clear": "Clear",
+ "clear_history": "Clear All History",
"clear_all": "Clear all",
"close": "Close",
"connect": "Connect",
@@ -583,6 +584,11 @@
"log": "Log",
"url": "URL"
},
+ "spotlight": {
+ "section": {
+ "user": "User"
+ }
+ },
"sse": {
"event_type": "Event type",
"log": "Log",
diff --git a/packages/hoppscotch-common/package.json b/packages/hoppscotch-common/package.json
index ab6d40811..5986de983 100644
--- a/packages/hoppscotch-common/package.json
+++ b/packages/hoppscotch-common/package.json
@@ -46,7 +46,7 @@
"@urql/exchange-auth": "^0.1.7",
"@urql/exchange-graphcache": "^4.4.3",
"@vitejs/plugin-legacy": "^2.3.0",
- "@vueuse/core": "^8.7.5",
+ "@vueuse/core": "^8.9.4",
"@vueuse/head": "^0.7.9",
"acorn-walk": "^8.2.0",
"axios": "^0.21.4",
@@ -67,6 +67,7 @@
"jsonpath-plus": "^7.0.0",
"lodash-es": "^4.17.21",
"lossless-json": "^2.0.8",
+ "minisearch": "^6.1.0",
"nprogress": "^0.2.0",
"paho-mqtt": "^1.1.0",
"path": "^0.12.7",
diff --git a/packages/hoppscotch-common/src/components.d.ts b/packages/hoppscotch-common/src/components.d.ts
index 21264cc9e..f9eef9d75 100644
--- a/packages/hoppscotch-common/src/components.d.ts
+++ b/packages/hoppscotch-common/src/components.d.ts
@@ -11,20 +11,21 @@ declare module '@vue/runtime-core' {
AppAnnouncement: typeof import('./components/app/Announcement.vue')['default']
AppDeveloperOptions: typeof import('./components/app/DeveloperOptions.vue')['default']
AppFooter: typeof import('./components/app/Footer.vue')['default']
- AppFuse: typeof import('./components/app/Fuse.vue')['default']
AppGitHubStarButton: typeof import('./components/app/GitHubStarButton.vue')['default']
AppHeader: typeof import('./components/app/Header.vue')['default']
AppInterceptor: typeof import('./components/app/Interceptor.vue')['default']
AppLogo: typeof import('./components/app/Logo.vue')['default']
AppOptions: typeof import('./components/app/Options.vue')['default']
AppPaneLayout: typeof import('./components/app/PaneLayout.vue')['default']
- AppPowerSearch: typeof import('./components/app/PowerSearch.vue')['default']
- AppPowerSearchEntry: typeof import('./components/app/PowerSearchEntry.vue')['default']
AppShare: typeof import('./components/app/Share.vue')['default']
AppShortcuts: typeof import('./components/app/Shortcuts.vue')['default']
AppShortcutsEntry: typeof import('./components/app/ShortcutsEntry.vue')['default']
AppShortcutsPrompt: typeof import('./components/app/ShortcutsPrompt.vue')['default']
AppSidenav: typeof import('./components/app/Sidenav.vue')['default']
+ AppSpotlight: typeof import('./components/app/spotlight/index.vue')['default']
+ AppSpotlightEntry: typeof import('./components/app/spotlight/Entry.vue')['default']
+ AppSpotlightEntryGQLHistory: typeof import('./components/app/spotlight/entry/GQLHistory.vue')['default']
+ AppSpotlightEntryRESTHistory: typeof import('./components/app/spotlight/entry/RESTHistory.vue')['default']
AppSupport: typeof import('./components/app/Support.vue')['default']
ButtonPrimary: typeof import('./../../hoppscotch-ui/src/components/button/Primary.vue')['default']
ButtonSecondary: typeof import('./../../hoppscotch-ui/src/components/button/Secondary.vue')['default']
diff --git a/packages/hoppscotch-common/src/components/app/Footer.vue b/packages/hoppscotch-common/src/components/app/Footer.vue
index f82912b61..040289322 100644
--- a/packages/hoppscotch-common/src/components/app/Footer.vue
+++ b/packages/hoppscotch-common/src/components/app/Footer.vue
@@ -152,7 +152,7 @@
v-tippy="{ theme: 'tooltip', allowHTML: true }"
:title="`${t(
'app.shortcuts'
- )} <kbd>${getSpecialKey()}</kbd><kbd>K</kbd>`"
+ )} <kbd>${getSpecialKey()}</kbd><kbd>/</kbd>`"
:icon="IconZap"
@click="invokeAction('flyouts.keybinds.toggle')"
/>
diff --git a/packages/hoppscotch-common/src/components/app/Fuse.vue b/packages/hoppscotch-common/src/components/app/Fuse.vue
deleted file mode 100644
index c6740137e..000000000
--- a/packages/hoppscotch-common/src/components/app/Fuse.vue
+++ /dev/null
@@ -1,69 +0,0 @@
-<template>
- <div key="outputHash" class="flex flex-col flex-1 overflow-auto">
- <div class="flex flex-col">
- <AppPowerSearchEntry
- v-for="(shortcut, shortcutIndex) in searchResults"
- :key="`shortcut-${shortcutIndex}`"
- :active="shortcutIndex === selectedEntry"
- :shortcut="shortcut.item"
- @action="emit('action', shortcut.item.action)"
- @mouseover="selectedEntry = shortcutIndex"
- />
- </div>
- <HoppSmartPlaceholder
- v-if="searchResults.length === 0"
- :text="`${t('state.nothing_found')} ‟${search}”`"
- >
- <template #icon>
- <icon-lucide-search class="pb-2 opacity-75 svg-icons" />
- </template>
- </HoppSmartPlaceholder>
- </div>
-</template>
-
-<script setup lang="ts">
-import { computed, onUnmounted, onMounted } from "vue"
-import Fuse from "fuse.js"
-import { useArrowKeysNavigation } from "~/helpers/powerSearchNavigation"
-import { HoppAction } from "~/helpers/actions"
-import { useI18n } from "@composables/i18n"
-
-const t = useI18n()
-
-const props = defineProps<{
- input: Record<string, any>[]
- search: string
-}>()
-
-const emit = defineEmits<{
- (e: "action", action: HoppAction): void
-}>()
-
-const options = {
- keys: ["keys", "label", "action", "tags"],
-}
-
-const fuse = new Fuse(props.input, options)
-
-const searchResults = computed(() => fuse.search(props.search))
-
-const searchResultsItems = computed(() =>
- searchResults.value.map((searchResult) => searchResult.item)
-)
-
-const emitSearchAction = (action: HoppAction) => emit("action", action)
-
-const { bindArrowKeysListeners, unbindArrowKeysListeners, selectedEntry } =
- useArrowKeysNavigation(searchResultsItems, {
- onEnter: emitSearchAction,
- stopPropagation: true,
- })
-
-onMounted(() => {
- bindArrowKeysListeners()
-})
-
-onUnmounted(() => {
- unbindArrowKeysListeners()
-})
-</script>
diff --git a/packages/hoppscotch-common/src/components/app/Header.vue b/packages/hoppscotch-common/src/components/app/Header.vue
index ceb683d3f..116b511ad 100644
--- a/packages/hoppscotch-common/src/components/app/Header.vue
+++ b/packages/hoppscotch-common/src/components/app/Header.vue
@@ -20,7 +20,9 @@
<div class="inline-flex items-center space-x-2">
<HoppButtonSecondary
v-tippy="{ theme: 'tooltip', allowHTML: true }"
- :title="`${t('app.search')} <kbd>/</kbd>`"
+ :title="`${t(
+ 'app.search'
+ )} <kbd>${getPlatformSpecialKey()}</kbd> <kbd>K</kbd>`"
:icon="IconSearch"
class="rounded hover:bg-primaryDark focus-visible:bg-primaryDark"
@click="invokeAction('modals.search.toggle')"
@@ -242,11 +244,12 @@ import { pwaDefferedPrompt, installPWA } from "@modules/pwa"
import { platform } from "~/platform"
import { useI18n } from "@composables/i18n"
import { useReadonlyStream } from "@composables/stream"
-import { invokeAction } from "@helpers/actions"
+import { defineActionHandler, invokeAction } from "@helpers/actions"
import { workspaceStatus$, updateWorkspaceTeamName } from "~/newstore/workspace"
import TeamListAdapter from "~/helpers/teams/TeamListAdapter"
import { onLoggedIn } from "~/composables/auth"
import { GetMyTeamsQuery } from "~/helpers/backend/graphql"
+import { getPlatformSpecialKey } from "~/helpers/platformutils"
const t = useI18n()
@@ -374,4 +377,12 @@ const profile = ref<any | null>(null)
const settings = ref<any | null>(null)
const logout = ref<any | null>(null)
const accountActions = ref<any | null>(null)
+
+defineActionHandler(
+ "user.login",
+ () => {
+ invokeAction("modals.login.toggle")
+ },
+ computed(() => !currentUser.value)
+)
</script>
diff --git a/packages/hoppscotch-common/src/components/app/PowerSearch.vue b/packages/hoppscotch-common/src/components/app/PowerSearch.vue
deleted file mode 100644
index 88645191b..000000000
--- a/packages/hoppscotch-common/src/components/app/PowerSearch.vue
+++ /dev/null
@@ -1,122 +0,0 @@
-<template>
- <HoppSmartModal
- v-if="show"
- styles="sm:max-w-lg"
- full-width
- @close="emit('hide-modal')"
- >
- <template #body>
- <div class="flex flex-col border-b transition border-dividerLight">
- <input
- id="command"
- v-model="search"
- v-focus
- type="text"
- autocomplete="off"
- name="command"
- :placeholder="`${t('app.type_a_command_search')}`"
- class="flex flex-shrink-0 p-6 text-base bg-transparent text-secondaryDark"
- />
- <div
- class="flex flex-shrink-0 text-tiny text-secondaryLight px-4 pb-4 justify-between whitespace-nowrap overflow-auto <sm:hidden"
- >
- <div class="flex items-center">
- <kbd class="shortcut-key">↑</kbd>
- <kbd class="shortcut-key">↓</kbd>
- <span class="ml-2 truncate">
- {{ t("action.to_navigate") }}
- </span>
- <kbd class="shortcut-key">↩</kbd>
- <span class="ml-2 truncate">
- {{ t("action.to_select") }}
- </span>
- </div>
- <div class="flex items-center">
- <kbd class="shortcut-key">ESC</kbd>
- <span class="ml-2 truncate">
- {{ t("action.to_close") }}
- </span>
- </div>
- </div>
- </div>
- <AppFuse
- v-if="search && show"
- :input="fuse"
- :search="search"
- @action="runAction"
- />
- <div
- v-else
- class="flex flex-col flex-1 overflow-auto space-y-4 divide-y divide-dividerLight"
- >
- <div
- v-for="(map, mapIndex) in mappings"
- :key="`map-${mapIndex}`"
- class="flex flex-col"
- >
- <h5 class="px-6 py-2 my-2 text-secondaryLight">
- {{ t(map.section) }}
- </h5>
- <AppPowerSearchEntry
- v-for="(shortcut, shortcutIndex) in map.shortcuts"
- :key="`map-${mapIndex}-shortcut-${shortcutIndex}`"
- :shortcut="shortcut"
- :active="shortcutsItems.indexOf(shortcut) === selectedEntry"
- @action="runAction"
- @mouseover="selectedEntry = shortcutsItems.indexOf(shortcut)"
- />
- </div>
- </div>
- </template>
- </HoppSmartModal>
-</template>
-
-<script setup lang="ts">
-import { ref, computed, watch } from "vue"
-import { HoppAction, invokeAction } from "~/helpers/actions"
-import { spotlight as mappings, fuse } from "@helpers/shortcuts"
-import { useArrowKeysNavigation } from "~/helpers/powerSearchNavigation"
-import { useI18n } from "@composables/i18n"
-
-const t = useI18n()
-
-const props = defineProps<{
- show: boolean
-}>()
-
-const emit = defineEmits<{
- (e: "hide-modal"): void
-}>()
-
-const search = ref("")
-
-const hideModal = () => {
- search.value = ""
- emit("hide-modal")
-}
-
-const runAction = (command: HoppAction) => {
- invokeAction(command)
- hideModal()
-}
-
-const shortcutsItems = computed(() =>
- mappings.reduce(
- (shortcuts, section) => [...shortcuts, ...section.shortcuts],
- []
- )
-)
-
-const { bindArrowKeysListeners, unbindArrowKeysListeners, selectedEntry } =
- useArrowKeysNavigation(shortcutsItems, {
- onEnter: runAction,
- })
-
-watch(
- () => props.show,
- (show) => {
- if (show) bindArrowKeysListeners()
- else unbindArrowKeysListeners()
- }
-)
-</script>
diff --git a/packages/hoppscotch-common/src/components/app/PowerSearchEntry.vue b/packages/hoppscotch-common/src/components/app/PowerSearchEntry.vue
deleted file mode 100644
index 631e06cfb..000000000
--- a/packages/hoppscotch-common/src/components/app/PowerSearchEntry.vue
+++ /dev/null
@@ -1,68 +0,0 @@
-<template>
- <button
- class="flex items-center flex-1 px-6 py-3 font-medium transition cursor-pointer search-entry focus:outline-none"
- :class="{ active: active }"
- tabindex="-1"
- @click="emit('action', shortcut.action)"
- @keydown.enter="emit('action', shortcut.action)"
- >
- <component
- :is="shortcut.icon"
- class="mr-4 transition opacity-50 svg-icons"
- :class="{ 'opacity-100 text-secondaryDark': active }"
- />
- <span
- class="flex flex-1 mr-4 transition"
- :class="{ 'text-secondaryDark': active }"
- >
- {{ t(shortcut.label) }}
- </span>
- <kbd
- v-for="(key, keyIndex) in shortcut.keys"
- :key="`key-${String(keyIndex)}`"
- class="shortcut-key"
- >
- {{ key }}
- </kbd>
- </button>
-</template>
-
-<script setup lang="ts">
-import type { Component } from "vue"
-import { useI18n } from "@composables/i18n"
-
-const t = useI18n()
-
-defineProps<{
- shortcut: {
- label: string
- keys: string[]
- action: string
- icon: object | Component
- }
- active: boolean
-}>()
-
-const emit = defineEmits<{
- (e: "action", action: string): void
-}>()
-</script>
-
-<style lang="scss" scoped>
-.search-entry {
- @apply relative;
- @apply after:absolute;
- @apply after:top-0;
- @apply after:left-0;
- @apply after:bottom-0;
- @apply after:bg-transparent;
- @apply after:z-2;
- @apply after:w-0.5;
- @apply after:content-DEFAULT;
-
- &.active {
- @apply bg-primaryLight;
- @apply after:bg-accentLight;
- }
-}
-</style>
diff --git a/packages/hoppscotch-common/src/components/app/Shortcuts.vue b/packages/hoppscotch-common/src/components/app/Shortcuts.vue
index 155765e46..dc5d0e608 100644
--- a/packages/hoppscotch-common/src/components/app/Shortcuts.vue
+++ b/packages/hoppscotch-common/src/components/app/Shortcuts.vue
@@ -14,42 +14,14 @@
/>
</div>
</div>
- <div v-if="filterText" class="flex flex-col divide-y divide-dividerLight">
- <details
- v-for="(map, mapIndex) in searchResults"
- :key="`map-${mapIndex}`"
- class="flex flex-col"
- open
- >
- <summary
- class="flex items-center flex-1 min-w-0 px-6 py-4 font-semibold transition cursor-pointer focus:outline-none text-secondaryLight hover:text-secondaryDark"
- >
- <icon-lucide-chevron-right class="mr-2 indicator" />
- <span
- class="font-semibold truncate capitalize-first text-secondaryDark"
- >
- {{ t(map.item.section) }}
- </span>
- </summary>
- <div class="flex flex-col px-6 pb-4 space-y-2">
- <AppShortcutsEntry
- v-for="(shortcut, index) in map.item.shortcuts"
- :key="`shortcut-${index}`"
- :shortcut="shortcut"
- />
- </div>
- </details>
- <HoppSmartPlaceholder
- v-if="searchResults.length === 0"
- :text="`${t('state.nothing_found')} ‟${filterText}”`"
- >
+ <div class="flex flex-col divide-y divide-dividerLight">
+ <HoppSmartPlaceholder v-if="isEmpty(shortcutsResults)">
<icon-lucide-search class="pb-2 opacity-75 svg-icons" />
</HoppSmartPlaceholder>
- </div>
- <div v-else class="flex flex-col divide-y divide-dividerLight">
<details
- v-for="(map, mapIndex) in mappings"
- :key="`map-${mapIndex}`"
+ v-for="(sectionResults, sectionTitle) in shortcutsResults"
+ v-else
+ :key="`section-${sectionTitle}`"
class="flex flex-col"
open
>
@@ -60,13 +32,13 @@
<span
class="font-semibold truncate capitalize-first text-secondaryDark"
>
- {{ t(map.section) }}
+ {{ sectionTitle }}
</span>
</summary>
<div class="flex flex-col px-6 pb-4 space-y-2">
<AppShortcutsEntry
- v-for="(shortcut, shortcutIndex) in map.shortcuts"
- :key="`map-${mapIndex}-shortcut-${shortcutIndex}`"
+ v-for="(shortcut, index) in sectionResults"
+ :key="`shortcut-${index}`"
:shortcut="shortcut"
/>
</div>
@@ -77,10 +49,11 @@
</template>
<script setup lang="ts">
-import { computed, ref } from "vue"
-import Fuse from "fuse.js"
-import mappings from "~/helpers/shortcuts"
+import { computed, onBeforeMount, ref } from "vue"
+import { ShortcutDef, getShortcuts } from "~/helpers/shortcuts"
+import MiniSearch from "minisearch"
import { useI18n } from "@composables/i18n"
+import { groupBy, isEmpty } from "lodash-es"
const t = useI18n()
@@ -88,15 +61,33 @@ defineProps<{
show: boolean
}>()
-const options = {
- keys: ["shortcuts.label"],
-}
+const minisearch = new MiniSearch({
+ fields: ["label", "keys", "section"],
+ idField: "label",
+ storeFields: ["label", "keys", "section"],
+ searchOptions: {
+ fuzzy: true,
+ prefix: true,
+ },
+})
+
+const shortcuts = getShortcuts(t)
-const fuse = new Fuse(mappings, options)
+onBeforeMount(() => {
+ minisearch.addAllAsync(shortcuts)
+})
const filterText = ref("")
-const searchResults = computed(() => fuse.search(filterText.value))
+const shortcutsResults = computed(() => {
+ // If there are no search text, return all the shortcuts
+ const results =
+ filterText.value.length > 0
+ ? minisearch.search(filterText.value)
+ : shortcuts
+
+ return groupBy(results, "section") as Record<string, ShortcutDef[]>
+})
const emit = defineEmits<{
(e: "close"): void
diff --git a/packages/hoppscotch-common/src/components/app/ShortcutsEntry.vue b/packages/hoppscotch-common/src/components/app/ShortcutsEntry.vue
index 2dee8d034..3d61218ed 100644
--- a/packages/hoppscotch-common/src/components/app/ShortcutsEntry.vue
+++ b/packages/hoppscotch-common/src/components/app/ShortcutsEntry.vue
@@ -1,7 +1,7 @@
<template>
<div class="flex items-center py-1">
<span class="flex flex-1 mr-4">
- {{ t(shortcut.label) }}
+ {{ shortcut.label }}
</span>
<kbd
v-for="(key, index) in shortcut.keys"
@@ -14,14 +14,9 @@
</template>
<script setup lang="ts">
-import { useI18n } from "@composables/i18n"
-
-const t = useI18n()
+import { ShortcutDef } from "~/helpers/shortcuts"
defineProps<{
- shortcut: {
- label: string
- keys: string[]
- }
+ shortcut: ShortcutDef
}>()
</script>
diff --git a/packages/hoppscotch-common/src/components/app/spotlight/Entry.vue b/packages/hoppscotch-common/src/components/app/spotlight/Entry.vue
new file mode 100644
index 000000000..1d0593ba9
--- /dev/null
+++ b/packages/hoppscotch-common/src/components/app/spotlight/Entry.vue
@@ -0,0 +1,122 @@
+<template>
+ <button
+ ref="el"
+ class="flex items-center flex-1 px-6 py-4 font-medium space-x-4 transition cursor-pointer relative search-entry focus:outline-none"
+ :class="{ 'active bg-primaryLight text-secondaryDark': active }"
+ tabindex="-1"
+ @click="emit('action')"
+ @keydown.enter="emit('action')"
+ >
+ <component
+ :is="entry.icon"
+ class="opacity-50 svg-icons"
+ :class="{ 'opacity-100': active }"
+ />
+ <span
+ v-if="entry.text.type === 'text' && typeof entry.text.text === 'string'"
+ class="block truncate"
+ >
+ {{ entry.text.text }}
+ </span>
+ <span
+ v-else-if="entry.text.type === 'text' && Array.isArray(entry.text.text)"
+ class="flex items-center flex-1"
+ >
+ <span
+ v-for="(labelPart, labelPartIndex) in entry.text.text"
+ :key="`label-${labelPart}-${labelPartIndex}`"
+ class="flex items-center space-x-2"
+ >
+ {{ labelPart }}
+ <icon-lucide-chevron-right
+ v-if="labelPartIndex < entry.text.text.length - 1"
+ class="block truncate"
+ />
+ </span>
+ </span>
+ <span
+ v-else-if="entry.text.type === 'custom'"
+ class="block truncate w-full"
+ >
+ <component
+ :is="entry.text.component"
+ v-bind="entry.text.componentProps"
+ />
+ </span>
+ <span v-if="formattedShortcutKeys" class="block truncate">
+ <kbd
+ v-for="(key, keyIndex) in formattedShortcutKeys"
+ :key="`key-${String(keyIndex)}`"
+ class="shortcut-key"
+ >
+ {{ key }}
+ </kbd>
+ </span>
+ </button>
+</template>
+
+<script lang="ts">
+import { getPlatformSpecialKey } from "~/helpers/platformutils"
+import { SpotlightSearcherResult } from "~/services/spotlight"
+
+const SPECIAL_KEY_CHARS: Record<string, string> = {
+ ctrl: getPlatformSpecialKey(),
+ alt: getPlatformAlternateKey(),
+ up: "↑",
+ down: "↓",
+ enter: "↩",
+}
+</script>
+
+<script setup lang="ts">
+import { computed, watch, ref } from "vue"
+import { capitalize } from "lodash-es"
+import { getPlatformAlternateKey } from "~/helpers/platformutils"
+
+const el = ref<HTMLElement>()
+
+const props = defineProps<{
+ entry: SpotlightSearcherResult
+ active: boolean
+}>()
+
+const formattedShortcutKeys = computed(() =>
+ props.entry.meta?.keyboardShortcut?.map((key) => {
+ return SPECIAL_KEY_CHARS[key] ?? capitalize(key)
+ })
+)
+
+const emit = defineEmits<{
+ (e: "action"): void
+}>()
+
+watch(
+ () => props.active,
+ (active) => {
+ if (active) {
+ el.value?.scrollIntoView({
+ behavior: "smooth",
+ block: "nearest",
+ inline: "nearest",
+ })
+ }
+ }
+)
+</script>
+
+<style lang="scss" scoped>
+.search-entry {
+ @apply after:absolute;
+ @apply after:top-0;
+ @apply after:left-0;
+ @apply after:bottom-0;
+ @apply after:bg-transparent;
+ @apply after:z-2;
+ @apply after:w-0.5;
+ @apply after:content-DEFAULT;
+
+ &.active {
+ @apply after:bg-accentLight;
+ }
+}
+</style>
diff --git a/packages/hoppscotch-common/src/components/app/spotlight/entry/GQLHistory.vue b/packages/hoppscotch-common/src/components/app/spotlight/entry/GQLHistory.vue
new file mode 100644
index 000000000..b1a845dbb
--- /dev/null
+++ b/packages/hoppscotch-common/src/components/app/spotlight/entry/GQLHistory.vue
@@ -0,0 +1,30 @@
+<template>
+ <span class="flex flex-1 items-center space-x-2">
+ <span class="block truncate">
+ {{ dateTimeText }}
+ </span>
+ <icon-lucide-chevron-right class="flex flex-shrink-0" />
+ <span class="block truncate">
+ {{ historyEntry.request.url }}
+ </span>
+ <span
+ class="font-semibold truncate text-tiny flex flex-shrink-0 border border-dividerDark rounded-md px-1"
+ >
+ {{ historyEntry.request.query.split("\n")[0] }}
+ </span>
+ </span>
+</template>
+
+<script setup lang="ts">
+import { computed } from "vue"
+import { shortDateTime } from "~/helpers/utils/date"
+import { GQLHistoryEntry } from "~/newstore/history"
+
+const props = defineProps<{
+ historyEntry: GQLHistoryEntry
+}>()
+
+const dateTimeText = computed(() =>
+ shortDateTime(props.historyEntry.updatedOn!)
+)
+</script>
diff --git a/packages/hoppscotch-common/src/components/app/spotlight/entry/RESTHistory.vue b/packages/hoppscotch-common/src/components/app/spotlight/entry/RESTHistory.vue
new file mode 100644
index 000000000..da1d8d21e
--- /dev/null
+++ b/packages/hoppscotch-common/src/components/app/spotlight/entry/RESTHistory.vue
@@ -0,0 +1,43 @@
+<template>
+ <span class="flex flex-1 items-center space-x-2">
+ <span class="block truncate">
+ {{ dateTimeText }}
+ </span>
+ <icon-lucide-chevron-right class="flex flex-shrink-0" />
+ <span
+ class="font-semibold truncate text-tiny flex flex-shrink-0 border border-dividerDark rounded-md px-1"
+ :class="entryStatus.className"
+ >
+ {{ historyEntry.request.method }}
+ </span>
+ <span class="block truncate">
+ {{ historyEntry.request.endpoint }}
+ </span>
+ </span>
+</template>
+
+<script setup lang="ts">
+import { computed } from "vue"
+import findStatusGroup from "~/helpers/findStatusGroup"
+import { shortDateTime } from "~/helpers/utils/date"
+import { RESTHistoryEntry } from "~/newstore/history"
+
+const props = defineProps<{
+ historyEntry: RESTHistoryEntry
+}>()
+
+const dateTimeText = computed(() =>
+ shortDateTime(props.historyEntry.updatedOn!)
+)
+
+const entryStatus = computed(() => {
+ const foundStatusGroup = findStatusGroup(
+ props.historyEntry.responseMeta.statusCode
+ )
+ return (
+ foundStatusGroup || {
+ className: "",
+ }
+ )
+})
+</script>
diff --git a/packages/hoppscotch-common/src/components/app/spotlight/index.vue b/packages/hoppscotch-common/src/components/app/spotlight/index.vue
new file mode 100644
index 000000000..cebd053f7
--- /dev/null
+++ b/packages/hoppscotch-common/src/components/app/spotlight/index.vue
@@ -0,0 +1,238 @@
+<template>
+ <HoppSmartModal
+ v-if="show"
+ styles="sm:max-w-lg"
+ full-width
+ @close="emit('hide-modal')"
+ >
+ <template #body>
+ <div class="flex flex-col border-b transition border-divider">
+ <div class="flex items-center">
+ <input
+ id="command"
+ v-model="search"
+ v-focus
+ type="text"
+ autocomplete="off"
+ name="command"
+ :placeholder="`${t('app.type_a_command_search')}`"
+ class="flex flex-1 text-base bg-transparent text-secondaryDark px-6 py-5"
+ />
+ <HoppSmartSpinner v-if="searchSession?.loading" class="mr-6" />
+ </div>
+ </div>
+ <div
+ v-if="searchSession && search.length > 0"
+ class="flex flex-col flex-1 overflow-y-auto border-b border-divider divide-y divide-dividerLight"
+ >
+ <div
+ v-for="([sectionID, sectionResult], sectionIndex) in scoredResults"
+ :key="`section-${sectionID}`"
+ class="flex flex-col"
+ >
+ <h5
+ class="px-6 py-2 bg-primaryContrast z-10 text-secondaryLight sticky top-0"
+ >
+ {{ sectionResult.title }}
+ </h5>
+ <AppSpotlightEntry
+ v-for="(result, entryIndex) in sectionResult.results"
+ :key="`result-${result.id}`"
+ :entry="result"
+ :active="isEqual(selectedEntry, [sectionIndex, entryIndex])"
+ @mouseover="selectedEntry = [sectionIndex, entryIndex]"
+ @action="runAction(sectionID, result)"
+ />
+ </div>
+ <HoppSmartPlaceholder
+ v-if="search.length > 0 && scoredResults.length === 0"
+ :text="`${t('state.nothing_found')} ‟${search}”`"
+ >
+ <template #icon>
+ <icon-lucide-search class="pb-2 opacity-75 svg-icons" />
+ </template>
+ <HoppButtonSecondary
+ :label="t('action.clear')"
+ outline
+ @click="search = ''"
+ />
+ </HoppSmartPlaceholder>
+ </div>
+ <div
+ class="flex flex-shrink-0 text-tiny text-secondaryLight p-4 justify-between whitespace-nowrap overflow-auto <sm:hidden"
+ >
+ <div class="flex items-center">
+ <kbd class="shortcut-key">↑</kbd>
+ <kbd class="shortcut-key">↓</kbd>
+ <span class="mx-2 truncate">
+ {{ t("action.to_navigate") }}
+ </span>
+ <kbd class="shortcut-key">↩</kbd>
+ <span class="ml-2 truncate">
+ {{ t("action.to_select") }}
+ </span>
+ </div>
+ <div class="flex items-center">
+ <kbd class="shortcut-key">ESC</kbd>
+ <span class="ml-2 truncate">
+ {{ t("action.to_close") }}
+ </span>
+ </div>
+ </div>
+ </template>
+ </HoppSmartModal>
+</template>
+
+<script setup lang="ts">
+import { ref, computed, watch } from "vue"
+import { useService } from "dioc/vue"
+import { useI18n } from "@composables/i18n"
+import {
+ SpotlightService,
+ SpotlightSearchState,
+ SpotlightSearcherResult,
+} from "~/services/spotlight"
+import { isEqual } from "lodash-es"
+import { HistorySpotlightSearcherService } from "~/services/spotlight/searchers/history.searcher"
+import { UserSpotlightSearcherService } from "~/services/spotlight/searchers/user.searcher"
+
+const t = useI18n()
+
+const props = defineProps<{
+ show: boolean
+}>()
+
+const emit = defineEmits<{
+ (e: "hide-modal"): void
+}>()
+
+const spotlightService = useService(SpotlightService)
+
+useService(HistorySpotlightSearcherService)
+useService(UserSpotlightSearcherService)
+
+const search = ref("")
+
+const searchSession = ref<SpotlightSearchState>()
+const stopSearchSession = ref<() => void>()
+
+const scoredResults = computed(() =>
+ Object.entries(searchSession.value?.results ?? {}).sort(
+ ([, sectionA], [, sectionB]) => sectionB.avgScore - sectionA.avgScore
+ )
+)
+
+const { selectedEntry } = newUseArrowKeysForNavigation()
+
+watch(
+ () => props.show,
+ (show) => {
+ search.value = ""
+
+ if (show) {
+ const [session, onSessionEnd] =
+ spotlightService.createSearchSession(search)
+
+ searchSession.value = session.value
+ stopSearchSession.value = onSessionEnd
+ } else {
+ stopSearchSession.value?.()
+ stopSearchSession.value = undefined
+ searchSession.value = undefined
+ }
+ }
+)
+
+function runAction(searcherID: string, result: SpotlightSearcherResult) {
+ spotlightService.selectSearchResult(searcherID, result)
+ emit("hide-modal")
+}
+
+function newUseArrowKeysForNavigation() {
+ const selectedEntry = ref<[number, number]>([0, 0]) // [sectionIndex, entryIndex]
+
+ watch(search, () => {
+ selectedEntry.value = [0, 0]
+ })
+
+ const onArrowDown = () => {
+ // If no entries, do nothing
+ if (scoredResults.value.length === 0) return
+
+ const [sectionIndex, entryIndex] = selectedEntry.value
+
+ const [, section] = scoredResults.value[sectionIndex]
+
+ if (entryIndex < section.results.length - 1) {
+ selectedEntry.value = [sectionIndex, entryIndex + 1]
+ } else if (sectionIndex < scoredResults.value.length - 1) {
+ selectedEntry.value = [sectionIndex + 1, 0]
+ } else {
+ selectedEntry.value = [0, 0]
+ }
+ }
+
+ const onArrowUp = () => {
+ // If no entries, do nothing
+ if (scoredResults.value.length === 0) return
+
+ const [sectionIndex, entryIndex] = selectedEntry.value
+
+ if (entryIndex > 0) {
+ selectedEntry.value = [sectionIndex, entryIndex - 1]
+ } else if (sectionIndex > 0) {
+ const [, section] = scoredResults.value[sectionIndex - 1]
+ selectedEntry.value = [sectionIndex - 1, section.results.length - 1]
+ } else {
+ selectedEntry.value = [
+ scoredResults.value.length - 1,
+ scoredResults.value[scoredResults.value.length - 1][1].results.length -
+ 1,
+ ]
+ }
+ }
+
+ const onEnter = () => {
+ // If no entries, do nothing
+ if (scoredResults.value.length === 0) return
+
+ const [sectionIndex, entryIndex] = selectedEntry.value
+ const [sectionID, section] = scoredResults.value[sectionIndex]
+ const result = section.results[entryIndex]
+
+ runAction(sectionID, result)
+ }
+
+ function handleKeyPress(e: KeyboardEvent) {
+ if (e.key === "ArrowUp") {
+ e.preventDefault()
+ e.stopPropagation()
+
+ onArrowUp()
+ } else if (e.key === "ArrowDown") {
+ e.preventDefault()
+ e.stopPropagation()
+
+ onArrowDown()
+ } else if (e.key === "Enter") {
+ e.preventDefault()
+ e.stopPropagation()
+
+ onEnter()
+ }
+ }
+
+ watch(
+ () => props.show,
+ (show) => {
+ if (show) {
+ window.addEventListener("keydown", handleKeyPress)
+ } else {
+ window.removeEventListener("keydown", handleKeyPress)
+ }
+ }
+ )
+
+ return { selectedEntry }
+}
+</script>
diff --git a/packages/hoppscotch-common/src/components/firebase/Logout.vue b/packages/hoppscotch-common/src/components/firebase/Logout.vue
index 8da86d6ad..58c5e2779 100644
--- a/packages/hoppscotch-common/src/components/firebase/Logout.vue
+++ b/packages/hoppscotch-common/src/components/firebase/Logout.vue
@@ -1,12 +1,12 @@
<template>
- <div class="flex" @click="OpenLogoutModal()">
+ <div class="flex" @click="openLogoutModal()">
<HoppSmartItem
ref="logoutItem"
:icon="IconLogOut"
:label="`${t('auth.logout')}`"
:outline="outline"
:shortcut="shortcut"
- @click="OpenLogoutModal()"
+ @click="openLogoutModal()"
/>
<HoppSmartConfirmModal
:show="confirmLogout"
@@ -23,6 +23,7 @@ import IconLogOut from "~icons/lucide/log-out"
import { useToast } from "@composables/toast"
import { useI18n } from "@composables/i18n"
import { platform } from "~/platform"
+import { defineActionHandler } from "~/helpers/actions"
defineProps({
outline: {
@@ -55,8 +56,12 @@ const logout = async () => {
}
}
-const OpenLogoutModal = () => {
+const openLogoutModal = () => {
emit("confirm-logout")
confirmLogout.value = true
}
+
+defineActionHandler("user.logout", () => {
+ openLogoutModal()
+})
</script>
diff --git a/packages/hoppscotch-common/src/components/history/index.vue b/packages/hoppscotch-common/src/components/history/index.vue
index f29d4d3ef..91c12b968 100644
--- a/packages/hoppscotch-common/src/components/history/index.vue
+++ b/packages/hoppscotch-common/src/components/history/index.vue
@@ -176,6 +176,7 @@ import {
import HistoryRestCard from "./rest/Card.vue"
import HistoryGraphqlCard from "./graphql/Card.vue"
import { createNewTab } from "~/helpers/rest/tab"
+import { defineActionHandler } from "~/helpers/actions"
type HistoryEntry = GQLHistoryEntry | RESTHistoryEntry
@@ -329,4 +330,8 @@ const toggleStar = (entry: HistoryEntry) => {
toggleRESTHistoryEntryStar(entry as RESTHistoryEntry)
else toggleGraphqlHistoryEntryStar(entry as GQLHistoryEntry)
}
+
+defineActionHandler("history.clear", () => {
+ confirmRemove.value = true
+})
</script>
diff --git a/packages/hoppscotch-common/src/helpers/actions.ts b/packages/hoppscotch-common/src/helpers/actions.ts
index f18c5d4da..8d0d2e348 100644
--- a/packages/hoppscotch-common/src/helpers/actions.ts
+++ b/packages/hoppscotch-common/src/helpers/actions.ts
@@ -2,8 +2,10 @@
* For example, sending a request.
*/
-import { onBeforeUnmount, onMounted } from "vue"
+import { Ref, onBeforeUnmount, onMounted, watch } from "vue"
import { BehaviorSubject } from "rxjs"
+import { HoppRESTDocument } from "./rest/document"
+import { HoppGQLRequest } from "@hoppscotch/data"
export type HoppAction =
| "request.send-cancel" // Send/Cancel a Hoppscotch Request
@@ -22,8 +24,6 @@ export type HoppAction =
| "modals.search.toggle" // Shows the search modal
| "modals.support.toggle" // Shows the support modal
| "modals.share.toggle" // Shows the share modal
- | "modals.my.environment.edit" // Edit current personal environment
- | "modals.team.environment.edit" // Edit current team environment
| "navigation.jump.rest" // Jump to REST page
| "navigation.jump.graphql" // Jump to GraphQL page
| "navigation.jump.realtime" // Jump to realtime page
@@ -38,6 +38,9 @@ export type HoppAction =
| "response.file.download" // Download response as file
| "response.copy" // Copy response to clipboard
| "modals.login.toggle" // Login to Hoppscotch
+ | "history.clear" // Clear REST History
+ | "user.login" // Login to Hoppscotch
+ | "user.logout" // Log out of Hoppscotch
/**
* Defines the arguments, if present for a given type that is required to be passed on
@@ -50,7 +53,7 @@ export type HoppAction =
* NOTE: We can't enforce type checks to make sure the key is Action, you
* will know if you got something wrong if there is a type error in this file
*/
-type HoppActionArgs = {
+type HoppActionArgsMap = {
"modals.my.environment.edit": {
envName: string
variableName: string
@@ -59,12 +62,18 @@ type HoppActionArgs = {
envName: string
variableName: string
}
+ "rest.request.open": {
+ doc: HoppRESTDocument
+ }
+ "gql.request.open": {
+ request: HoppGQLRequest
+ }
}
/**
* HoppActions which require arguments for their invocation
*/
-type HoppActionWithArgs = keyof HoppActionArgs
+export type HoppActionWithArgs = keyof HoppActionArgsMap
/**
* HoppActions which do not require arguments for their invocation
@@ -74,27 +83,27 @@ export type HoppActionWithNoArgs = Exclude<HoppAction, HoppActionWithArgs>
/**
* Resolves the argument type for a given HoppAction
*/
-type ArgOfHoppAction<A extends HoppAction> = A extends HoppActionWithArgs
- ? HoppActionArgs[A]
- : undefined
+type ArgOfHoppAction<A extends HoppAction | HoppActionWithArgs> =
+ A extends HoppActionWithArgs ? HoppActionArgsMap[A] : undefined
/**
* Resolves the action function for a given HoppAction, used by action handler function defs
*/
-type ActionFunc<A extends HoppAction> = A extends HoppActionWithArgs
- ? (arg: ArgOfHoppAction<A>) => void
- : () => void
+type ActionFunc<A extends HoppAction | HoppActionWithArgs> =
+ A extends HoppActionWithArgs ? (arg: ArgOfHoppAction<A>) => void : () => void
type BoundActionList = {
// eslint-disable-next-line no-unused-vars
- [A in HoppAction]?: Array<ActionFunc<A>>
+ [A in HoppAction | HoppActionWithArgs]?: Array<ActionFunc<A>>
}
const boundActions: BoundActionList = {}
-export const activeActions$ = new BehaviorSubject<HoppAction[]>([])
+export const activeActions$ = new BehaviorSubject<
+ (HoppAction | HoppActionWithArgs)[]
+>([])
-export function bindAction<A extends HoppAction>(
+export function bindAction<A extends HoppAction | HoppActionWithArgs>(
action: A,
handler: ActionFunc<A>
) {
@@ -110,7 +119,7 @@ export function bindAction<A extends HoppAction>(
type InvokeActionFunc = {
(action: HoppActionWithNoArgs, args?: undefined): void
- <A extends HoppActionWithArgs>(action: A, args: ArgOfHoppAction<A>): void
+ <A extends HoppActionWithArgs>(action: A, args: HoppActionArgsMap[A]): void
}
/**
@@ -119,14 +128,16 @@ type InvokeActionFunc = {
* @param action The action to fire
* @param args The argument passed to the action handler. Optional if action has no args required
*/
-export const invokeAction: InvokeActionFunc = <A extends HoppAction>(
+export const invokeAction: InvokeActionFunc = <
+ A extends HoppAction | HoppActionWithArgs
+>(
action: A,
args: ArgOfHoppAction<A>
) => {
- boundActions[action]?.forEach((handler) => handler(args!))
+ boundActions[action]?.forEach((handler) => handler(args! as any))
}
-export function unbindAction<A extends HoppAction>(
+export function unbindAction<A extends HoppAction | HoppActionWithArgs>(
action: A,
handler: ActionFunc<A>
) {
@@ -142,15 +153,57 @@ export function unbindAction<A extends HoppAction>(
activeActions$.next(Object.keys(boundActions) as HoppAction[])
}
-export function defineActionHandler<A extends HoppAction>(
+/**
+ * A composable function that defines a component can handle a given
+ * HoppAction. The handler will be bound when the component is mounted
+ * and unbound when the component is unmounted.
+ * @param action The action to be bound
+ * @param handler The function to be called when the action is invoked
+ * @param isActive A ref that indicates whether the action is active
+ */
+export function defineActionHandler<A extends HoppAction | HoppActionWithArgs>(
action: A,
- handler: ActionFunc<A>
+ handler: ActionFunc<A>,
+ isActive: Ref<boolean> | undefined = undefined
) {
+ let mounted = false
+ let bound = false
+
onMounted(() => {
- bindAction(action, handler)
+ mounted = true
+
+ // Only bind if isActive is undefined or true
+ if (isActive === undefined || isActive.value === true) {
+ bound = true
+ bindAction(action, handler)
+ }
})
onBeforeUnmount(() => {
+ mounted = false
+ bound = false
+
unbindAction(action, handler)
})
+
+ if (isActive) {
+ watch(
+ isActive,
+ (active) => {
+ if (mounted) {
+ if (active) {
+ if (!bound) {
+ bound = true
+ bindAction(action, handler)
+ }
+ } else if (bound) {
+ bound = false
+
+ unbindAction(action, handler)
+ }
+ }
+ },
+ { immediate: true }
+ )
+ }
}
diff --git a/packages/hoppscotch-common/src/helpers/keybindings.ts b/packages/hoppscotch-common/src/helpers/keybindings.ts
index f2f62f128..d672386f4 100644
--- a/packages/hoppscotch-common/src/helpers/keybindings.ts
+++ b/packages/hoppscotch-common/src/helpers/keybindings.ts
@@ -48,8 +48,8 @@ export const bindings: {
"alt-p": "request.method.post",
"alt-u": "request.method.put",
"alt-x": "request.method.delete",
- "ctrl-k": "flyouts.keybinds.toggle",
- "/": "modals.search.toggle",
+ "ctrl-k": "modals.search.toggle",
+ "ctrl-/": "flyouts.keybinds.toggle",
"?": "modals.support.toggle",
"ctrl-m": "modals.share.toggle",
"alt-r": "navigation.jump.rest",
diff --git a/packages/hoppscotch-common/src/helpers/powerSearchNavigation.ts b/packages/hoppscotch-common/src/helpers/powerSearchNavigation.ts
deleted file mode 100644
index 683b3a579..000000000
--- a/packages/hoppscotch-common/src/helpers/powerSearchNavigation.ts
+++ /dev/null
@@ -1,55 +0,0 @@
-import { ref } from "vue"
-
-const NAVIGATION_KEYS = ["ArrowDown", "ArrowUp", "Enter"]
-
-export function useArrowKeysNavigation(searchItems: any, options: any = {}) {
- function handleArrowKeysNavigation(
- event: any,
- itemIndex: any,
- preventPropagation: boolean
- ) {
- if (!NAVIGATION_KEYS.includes(event.key)) return
-
- if (preventPropagation) event.stopImmediatePropagation()
-
- const itemsLength = searchItems.value.length
- const lastItemIndex = itemsLength - 1
- const itemIndexValue = itemIndex.value
- const action = searchItems.value[itemIndexValue]?.action
-
- if (action && event.key === "Enter" && options.onEnter) {
- options.onEnter(action)
- return
- }
-
- if (itemsLength && event.key === "ArrowDown") {
- itemIndex.value = itemIndexValue < lastItemIndex ? itemIndexValue + 1 : 0
- } else if (itemIndexValue === 0) itemIndex.value = lastItemIndex
- else if (itemsLength && event.key === "ArrowUp")
- itemIndex.value = itemIndexValue - 1
- }
-
- const preventPropagation = options && options.stopPropagation
-
- const selectedEntry = ref(0)
-
- const onKeyUp = (event: any) => {
- handleArrowKeysNavigation(event, selectedEntry, preventPropagation)
- }
-
- function bindArrowKeysListeners() {
- window.addEventListener("keydown", onKeyUp, { capture: preventPropagation })
- }
-
- function unbindArrowKeysListeners() {
- window.removeEventListener("keydown", onKeyUp, {
- capture: preventPropagation,
- })
- }
-
- return {
- bindArrowKeysListeners,
- unbindArrowKeysListeners,
- selectedEntry,
- }
-}
diff --git a/packages/hoppscotch-common/src/helpers/shortcuts.ts b/packages/hoppscotch-common/src/helpers/shortcuts.ts
index 67c31d2b7..73af38270 100644
--- a/packages/hoppscotch-common/src/helpers/shortcuts.ts
+++ b/packages/hoppscotch-common/src/helpers/shortcuts.ts
@@ -1,315 +1,146 @@
-import IconLifeBuoy from "~icons/lucide/life-buoy"
-import IconZap from "~icons/lucide/zap"
-import IconArrowRight from "~icons/lucide/arrow-right"
-import IconGift from "~icons/lucide/gift"
-import IconMonitor from "~icons/lucide/monitor"
-import IconSun from "~icons/lucide/sun"
-import IconCloud from "~icons/lucide/cloud"
-import IconMoon from "~icons/lucide/moon"
import { getPlatformAlternateKey, getPlatformSpecialKey } from "./platformutils"
-export default [
- {
- section: "shortcut.general.title",
- shortcuts: [
- {
- keys: ["?"],
- label: "shortcut.general.help_menu",
- },
- {
- keys: ["/"],
- label: "shortcut.general.command_menu",
- },
- {
- keys: [getPlatformSpecialKey(), "K"],
- label: "shortcut.general.show_all",
- },
- {
- keys: ["ESC"],
- label: "shortcut.general.close_current_menu",
- },
- ],
- },
- {
- section: "shortcut.request.title",
- shortcuts: [
- {
- keys: [getPlatformSpecialKey(), "↩"],
- label: "shortcut.request.send_request",
- },
- {
- keys: [getPlatformSpecialKey(), "S"],
- label: "shortcut.request.save_to_collections",
- },
- {
- keys: [getPlatformSpecialKey(), "U"],
- label: "shortcut.request.copy_request_link",
- },
- {
- keys: [getPlatformSpecialKey(), "I"],
- label: "shortcut.request.reset_request",
- },
- {
- keys: [getPlatformAlternateKey(), "↑"],
- label: "shortcut.request.next_method",
- },
- {
- keys: [getPlatformAlternateKey(), "↓"],
- label: "shortcut.request.previous_method",
- },
- {
- keys: [getPlatformAlternateKey(), "G"],
- label: "shortcut.request.get_method",
- },
- {
- keys: [getPlatformAlternateKey(), "H"],
- label: "shortcut.request.head_method",
- },
- {
- keys: [getPlatformAlternateKey(), "P"],
- label: "shortcut.request.post_method",
- },
- {
- keys: [getPlatformAlternateKey(), "U"],
- label: "shortcut.request.put_method",
- },
- {
- keys: [getPlatformAlternateKey(), "X"],
- label: "shortcut.request.delete_method",
- },
- ],
- },
- {
- section: "shortcut.response.title",
- shortcuts: [
- {
- keys: [getPlatformSpecialKey(), "J"],
- label: "shortcut.response.download",
- },
- {
- keys: [getPlatformSpecialKey(), "."],
- label: "shortcut.response.copy",
- },
- ],
- },
- {
- section: "shortcut.navigation.title",
- shortcuts: [
- {
- keys: [getPlatformSpecialKey(), "←"],
- label: "shortcut.navigation.back",
- },
- {
- keys: [getPlatformSpecialKey(), "→"],
- label: "shortcut.navigation.forward",
- },
- {
- keys: [getPlatformAlternateKey(), "R"],
- label: "shortcut.navigation.rest",
- },
- {
- keys: [getPlatformAlternateKey(), "Q"],
- label: "shortcut.navigation.graphql",
- },
- {
- keys: [getPlatformAlternateKey(), "W"],
- label: "shortcut.navigation.realtime",
- },
- {
- keys: [getPlatformAlternateKey(), "S"],
- label: "shortcut.navigation.settings",
- },
- {
- keys: [getPlatformAlternateKey(), "M"],
- label: "shortcut.navigation.profile",
- },
- ],
- },
- {
- section: "shortcut.miscellaneous.title",
- shortcuts: [
- {
- keys: [getPlatformSpecialKey(), "M"],
- label: "shortcut.miscellaneous.invite",
- },
- ],
- },
-]
+export type ShortcutDef = {
+ label: string
+ keys: string[]
+ section: string
+}
-export const spotlight = [
- {
- section: "app.spotlight",
- shortcuts: [
- {
- keys: ["?"],
- label: "shortcut.general.help_menu",
- action: "modals.support.toggle",
- icon: IconLifeBuoy,
- },
- {
- keys: [getPlatformSpecialKey(), "K"],
- label: "shortcut.general.show_all",
- action: "flyouts.keybinds.toggle",
- icon: IconZap,
- },
- ],
- },
- {
- section: "shortcut.navigation.title",
- shortcuts: [
- {
- keys: [getPlatformAlternateKey(), "R"],
- label: "shortcut.navigation.rest",
- action: "navigation.jump.rest",
- icon: IconArrowRight,
- },
- {
- keys: [getPlatformAlternateKey(), "Q"],
- label: "shortcut.navigation.graphql",
- action: "navigation.jump.graphql",
- icon: IconArrowRight,
- },
- {
- keys: [getPlatformAlternateKey(), "W"],
- label: "shortcut.navigation.realtime",
- action: "navigation.jump.realtime",
- icon: IconArrowRight,
- },
- {
- keys: [getPlatformAlternateKey(), "S"],
- label: "shortcut.navigation.settings",
- action: "navigation.jump.settings",
- icon: IconArrowRight,
- },
- {
- keys: [getPlatformAlternateKey(), "M"],
- label: "shortcut.navigation.profile",
- action: "navigation.jump.profile",
- icon: IconArrowRight,
- },
- ],
- },
- {
- section: "shortcut.miscellaneous.title",
- shortcuts: [
- {
- keys: [getPlatformSpecialKey(), "M"],
- label: "shortcut.miscellaneous.invite",
- action: "modals.share.toggle",
- icon: IconGift,
- },
- ],
- },
-]
+export function getShortcuts(t: (x: string) => string): ShortcutDef[] {
+ // General
+ return [
+ {
+ label: t("shortcut.general.help_menu"),
+ keys: ["?"],
+ section: t("shortcut.general.title"),
+ },
+ {
+ label: t("shortcut.general.command_menu"),
+ keys: ["/"],
+ section: t("shortcut.general.title"),
+ },
+ {
+ label: t("shortcut.general.show_all"),
+ keys: [getPlatformSpecialKey(), "K"],
+ section: t("shortcut.general.title"),
+ },
+ {
+ label: t("shortcut.general.close_current_menu"),
+ keys: ["ESC"],
+ section: t("shortcut.general.title"),
+ },
-export const fuse = [
- {
- keys: ["?"],
- label: "shortcut.general.help_menu",
- action: "modals.support.toggle",
- icon: IconLifeBuoy,
- tags: [
- "help",
- "support",
- "menu",
- "discord",
- "twitter",
- "documentation",
- "troubleshooting",
- "chat",
- "community",
- "feedback",
- "report",
- "bug",
- "issue",
- "ticket",
- ],
- },
- {
- keys: [getPlatformSpecialKey(), "K"],
- label: "shortcut.general.show_all",
- action: "flyouts.keybinds.toggle",
- icon: IconZap,
- tags: ["keyboard", "shortcuts"],
- },
- {
- keys: [getPlatformAlternateKey(), "R"],
- label: "shortcut.navigation.rest",
- action: "navigation.jump.rest",
- icon: IconArrowRight,
- tags: ["rest", "jump", "page", "navigation", "go"],
- },
- {
- keys: [getPlatformAlternateKey(), "Q"],
- label: "shortcut.navigation.graphql",
- action: "navigation.jump.graphql",
- icon: IconArrowRight,
- tags: ["graphql", "jump", "page", "navigation", "go"],
- },
- {
- keys: [getPlatformAlternateKey(), "W"],
- label: "shortcut.navigation.realtime",
- action: "navigation.jump.realtime",
- icon: IconArrowRight,
- tags: [
- "realtime",
- "jump",
- "page",
- "navigation",
- "websocket",
- "socket",
- "mqtt",
- "sse",
- "go",
- ],
- },
- {
- keys: [getPlatformAlternateKey(), "S"],
- label: "shortcut.navigation.settings",
- action: "navigation.jump.settings",
- icon: IconArrowRight,
- tags: ["settings", "jump", "page", "navigation", "account", "theme", "go"],
- },
- {
- keys: [getPlatformAlternateKey(), "M"],
- label: "shortcut.navigation.profile",
- action: "navigation.jump.profile",
- icon: IconArrowRight,
- tags: ["profile", "jump", "page", "navigation", "account", "theme", "go"],
- },
- {
- keys: [getPlatformSpecialKey(), "M"],
- label: "shortcut.miscellaneous.invite",
- action: "modals.share.toggle",
- icon: IconGift,
- tags: ["invite", "share", "app", "friends", "people", "social"],
- },
- {
- keys: [getPlatformAlternateKey(), "0"],
- label: "shortcut.theme.system",
- action: "settings.theme.system",
- icon: IconMonitor,
- tags: ["theme", "system"],
- },
- {
- keys: [getPlatformAlternateKey(), "1"],
- label: "shortcut.theme.light",
- action: "settings.theme.light",
- icon: IconSun,
- tags: ["theme", "light"],
- },
- {
- keys: [getPlatformAlternateKey(), "2"],
- label: "shortcut.theme.dark",
- action: "settings.theme.dark",
- icon: IconCloud,
- tags: ["theme", "dark"],
- },
- {
- keys: [getPlatformAlternateKey(), "3"],
- label: "shortcut.theme.black",
- action: "settings.theme.black",
- icon: IconMoon,
- tags: ["theme", "black"],
- },
-]
+ // Request
+ {
+ label: t("shortcut.request.send_request"),
+ keys: [getPlatformSpecialKey(), "↩"],
+ section: t("shortcut.request.title"),
+ },
+ {
+ keys: [getPlatformSpecialKey(), "S"],
+ label: t("shortcut.request.save_to_collections"),
+ section: t("shortcut.request.title"),
+ },
+ {
+ keys: [getPlatformSpecialKey(), "U"],
+ label: t("shortcut.request.copy_request_link"),
+ section: t("shortcut.request.title"),
+ },
+ {
+ keys: [getPlatformSpecialKey(), "I"],
+ label: t("shortcut.request.reset_request"),
+ section: t("shortcut.request.title"),
+ },
+ {
+ keys: [getPlatformAlternateKey(), "↑"],
+ label: t("shortcut.request.next_method"),
+ section: t("shortcut.request.title"),
+ },
+ {
+ keys: [getPlatformAlternateKey(), "↓"],
+ label: t("shortcut.request.previous_method"),
+ section: t("shortcut.request.title"),
+ },
+ {
+ keys: [getPlatformAlternateKey(), "G"],
+ label: t("shortcut.request.get_method"),
+ section: t("shortcut.request.title"),
+ },
+ {
+ keys: [getPlatformAlternateKey(), "H"],
+ label: t("shortcut.request.head_method"),
+ section: t("shortcut.request.title"),
+ },
+ {
+ keys: [getPlatformAlternateKey(), "P"],
+ label: t("shortcut.request.post_method"),
+ section: t("shortcut.request.title"),
+ },
+ {
+ keys: [getPlatformAlternateKey(), "U"],
+ label: t("shortcut.request.put_method"),
+ section: t("shortcut.request.title"),
+ },
+ {
+ keys: [getPlatformAlternateKey(), "X"],
+ label: t("shortcut.request.delete_method"),
+ section: t("shortcut.request.title"),
+ },
+
+ // Response
+ {
+ keys: [getPlatformSpecialKey(), "J"],
+ label: t("shortcut.response.download"),
+ section: t("shortcut.response.title"),
+ },
+ {
+ keys: [getPlatformSpecialKey(), "."],
+ label: t("shortcut.response.copy"),
+ section: t("shortcut.response.title"),
+ },
+
+ // Navigation
+ {
+ keys: [getPlatformSpecialKey(), "←"],
+ label: t("shortcut.navigation.back"),
+ section: t("shortcut.navigation.title"),
+ },
+ {
+ keys: [getPlatformSpecialKey(), "→"],
+ label: t("shortcut.navigation.forward"),
+ section: t("shortcut.navigation.title"),
+ },
+ {
+ keys: [getPlatformAlternateKey(), "R"],
+ label: t("shortcut.navigation.rest"),
+ section: t("shortcut.navigation.title"),
+ },
+ {
+ keys: [getPlatformAlternateKey(), "Q"],
+ label: t("shortcut.navigation.graphql"),
+ section: t("shortcut.navigation.title"),
+ },
+ {
+ keys: [getPlatformAlternateKey(), "W"],
+ label: t("shortcut.navigation.realtime"),
+ section: t("shortcut.navigation.title"),
+ },
+ {
+ keys: [getPlatformAlternateKey(), "S"],
+ label: t("shortcut.navigation.settings"),
+ section: t("shortcut.navigation.title"),
+ },
+ {
+ keys: [getPlatformAlternateKey(), "M"],
+ label: t("shortcut.navigation.profile"),
+ section: t("shortcut.navigation.title"),
+ },
+
+ // Miscellaneous
+ {
+ keys: [getPlatformSpecialKey(), "M"],
+ label: t("shortcut.miscellaneous.invite"),
+ section: t("shortcut.miscellaneous.title"),
+ },
+ ]
+}
diff --git a/packages/hoppscotch-common/src/layouts/default.vue b/packages/hoppscotch-common/src/layouts/default.vue
index 7be727a63..4e307bec0 100644
--- a/packages/hoppscotch-common/src/layouts/default.vue
+++ b/packages/hoppscotch-common/src/layouts/default.vue
@@ -50,7 +50,7 @@
</Pane>
</Splitpanes>
<AppActionHandler />
- <AppPowerSearch :show="showSearch" @hide-modal="showSearch = false" />
+ <AppSpotlight :show="showSearch" @hide-modal="showSearch = false" />
<AppSupport
v-if="mdAndLarger"
:show="showSupport"
diff --git a/packages/hoppscotch-common/src/modules/dioc.ts b/packages/hoppscotch-common/src/modules/dioc.ts
index bdbb89619..c33822496 100644
--- a/packages/hoppscotch-common/src/modules/dioc.ts
+++ b/packages/hoppscotch-common/src/modules/dioc.ts
@@ -1,13 +1,38 @@
import { HoppModule } from "."
-import { Container } from "dioc"
+import { Container, Service } from "dioc"
import { diocPlugin } from "dioc/vue"
+import { DebugService } from "~/services/debug.service"
+
+const serviceContainer = new Container()
+
+if (import.meta.env.DEV) {
+ serviceContainer.bind(DebugService)
+}
+
+/**
+ * Gets a service from the app service container. You can use this function
+ * to get a service if you have no access to the container or if you are not
+ * in a component (if you are, you can use `useService`) or if you are not in a
+ * service.
+ * @param service The class of the service to get
+ * @returns The service instance
+ *
+ * @deprecated This is a temporary escape hatch for legacy code to access
+ * services. Please use `useService` if within components or try to convert your
+ * legacy subsystem into a service if possible.
+ */
+export function getService<T extends typeof Service<any> & { ID: string }>(
+ service: T
+): InstanceType<T> {
+ return serviceContainer.bind(service)
+}
export default <HoppModule>{
onVueAppInit(app) {
// TODO: look into this
// @ts-expect-error Something weird with Vue versions
app.use(diocPlugin, {
- container: new Container(),
+ container: serviceContainer,
})
},
}
diff --git a/packages/hoppscotch-common/src/modules/i18n.ts b/packages/hoppscotch-common/src/modules/i18n.ts
index 9366b0be6..b5d171e88 100644
--- a/packages/hoppscotch-common/src/modules/i18n.ts
+++ b/packages/hoppscotch-common/src/modules/i18n.ts
@@ -115,6 +115,14 @@ export const changeAppLanguage = async (locale: string) => {
setLocalConfig("locale", locale)
}
+/**
+ * Returns the i18n instance
+ */
+export function getI18n() {
+ // @ts-expect-error Something weird with the i18n errors
+ return i18nInstance!.global.t
+}
+
export default <HoppModule>{
onVueAppInit(app) {
const i18n = createI18n(<I18nOptions>{
diff --git a/packages/hoppscotch-common/src/pages/graphql.vue b/packages/hoppscotch-common/src/pages/graphql.vue
index a42798781..9c3a076b2 100644
--- a/packages/hoppscotch-common/src/pages/graphql.vue
+++ b/packages/hoppscotch-common/src/pages/graphql.vue
@@ -17,7 +17,10 @@
import { usePageHead } from "@composables/head"
import { useI18n } from "@composables/i18n"
import { GQLConnection } from "@helpers/GQLConnection"
+import { cloneDeep } from "lodash-es"
import { computed, onBeforeUnmount } from "vue"
+import { defineActionHandler } from "~/helpers/actions"
+import { getGQLSession, setGQLSession } from "~/newstore/GQLSession"
const t = useI18n()
@@ -32,4 +35,14 @@ onBeforeUnmount(() => {
gqlConn.disconnect()
}
})
+
+defineActionHandler("gql.request.open", ({ request }) => {
+ const session = getGQLSession()
+
+ setGQLSession({
+ request: cloneDeep(request),
+ schema: session.schema,
+ response: session.response,
+ })
+})
</script>
diff --git a/packages/hoppscotch-common/src/pages/index.vue b/packages/hoppscotch-common/src/pages/index.vue
index f1b7e7d4c..af4897acd 100644
--- a/packages/hoppscotch-common/src/pages/index.vue
+++ b/packages/hoppscotch-common/src/pages/index.vue
@@ -108,7 +108,7 @@ import {
updateTabOrdering,
} from "~/helpers/rest/tab"
import { getDefaultRESTRequest } from "~/helpers/rest/default"
-import { invokeAction } from "~/helpers/actions"
+import { defineActionHandler, invokeAction } from "~/helpers/actions"
import { onLoggedIn } from "~/composables/auth"
import { platform } from "~/platform"
import {
@@ -368,4 +368,8 @@ function oAuthURL() {
setupTabStateSync()
bindRequestToURLParams()
oAuthURL()
+
+defineActionHandler("rest.request.open", ({ doc }) => {
+ createNewTab(doc)
+})
</script>
diff --git a/packages/hoppscotch-common/src/services/debug.service.ts b/packages/hoppscotch-common/src/services/debug.service.ts
new file mode 100644
index 000000000..5d80797cf
--- /dev/null
+++ b/packages/hoppscotch-common/src/services/debug.service.ts
@@ -0,0 +1,64 @@
+import { Service } from "dioc"
+
+/**
+ * This service provice debug utilities for the application and is
+ * supposed to be used only in development.
+ *
+ * This service logs events from the container and also events
+ * from all the services that are bound to the container.
+ *
+ * This service injects couple of utilities into the global scope:
+ * - `_getService(id: string): Service | undefined` - Returns the service instance with the given ID or undefined.
+ * - `_getBoundServiceIDs(): string[]` - Returns the IDs of all the bound services.
+ */
+export class DebugService extends Service {
+ public static readonly ID = "DEBUG_SERVICE"
+
+ constructor() {
+ super()
+
+ console.log("DebugService is initialized...")
+
+ const container = this.getContainer()
+
+ // Log container events
+ container.getEventStream().subscribe((event) => {
+ if (event.type === "SERVICE_BIND") {
+ console.log(
+ "[CONTAINER] Service Bind:",
+ event.bounderID ?? "<CONTAINER>",
+ "->",
+ event.boundeeID
+ )
+ } else if (event.type === "SERVICE_INIT") {
+ console.log("[CONTAINER] Service Init:", event.serviceID)
+
+ // Subscribe to event stream of the newly initialized service
+ const service = container.getBoundServiceWithID(event.serviceID)
+
+ service?.getEventStream().subscribe((ev: any) => {
+ console.log(`[${event.serviceID}] Event:`, ev)
+ })
+ }
+ })
+
+ // Subscribe to event stream of all already bound services (if any)
+ for (const [id, service] of container.getBoundServices()) {
+ service.getEventStream().subscribe((event: any) => {
+ console.log(`[${id}]`, event)
+ })
+ }
+
+ // Inject debug utilities into the global scope
+ ;(window as any)._getService = this.getService.bind(this)
+ ;(window as any)._getBoundServiceIDs = this.getBoundServiceIDs.bind(this)
+ }
+
+ private getBoundServiceIDs() {
+ return Array.from(this.getContainer().getBoundServices()).map(([id]) => id)
+ }
+
+ private getService(id: string) {
+ return this.getContainer().getBoundServiceWithID(id)
+ }
+}
diff --git a/packages/hoppscotch-common/src/services/spotlight/__tests__/index.spec.ts b/packages/hoppscotch-common/src/services/spotlight/__tests__/index.spec.ts
new file mode 100644
index 000000000..b2d951894
--- /dev/null
+++ b/packages/hoppscotch-common/src/services/spotlight/__tests__/index.spec.ts
@@ -0,0 +1,550 @@
+import { describe, it, expect, vi, beforeEach } from "vitest"
+import {
+ SpotlightSearcher,
+ SpotlightSearcherSessionState,
+ SpotlightSearcherResult,
+ SpotlightService,
+} from "../"
+import { Ref, computed, nextTick, ref, watch } from "vue"
+import { TestContainer } from "dioc/testing"
+
+const echoSearcher: SpotlightSearcher = {
+ searcherID: "echo-searcher",
+ searcherSectionTitle: "Echo Searcher",
+ createSearchSession: (query: Readonly<Ref<string>>) => {
+ // A basic searcher that returns the query string as the sole result
+ const loading = ref(false)
+ const results = ref<SpotlightSearcherResult[]>([])
+
+ watch(
+ query,
+ (query) => {
+ loading.value = true
+
+ results.value = [
+ {
+ id: "searcher-a-result",
+ text: {
+ type: "text",
+ text: query,
+ },
+ icon: {},
+ score: 1,
+ },
+ ]
+
+ loading.value = false
+ },
+ { immediate: true }
+ )
+
+ const onSessionEnd = () => {
+ /* noop */
+ }
+
+ return [
+ computed<SpotlightSearcherSessionState>(() => ({
+ loading: loading.value,
+ results: results.value,
+ })),
+ onSessionEnd,
+ ]
+ },
+
+ onResultSelect: () => {
+ /* noop */
+ },
+}
+
+const emptySearcher: SpotlightSearcher = {
+ searcherID: "empty-searcher",
+ searcherSectionTitle: "Empty Searcher",
+ createSearchSession: () => {
+ const loading = ref(false)
+
+ return [
+ computed<SpotlightSearcherSessionState>(() => ({
+ loading: loading.value,
+ results: [],
+ })),
+ () => {
+ /* noop */
+ },
+ ]
+ },
+ onResultSelect: () => {
+ /* noop */
+ },
+}
+
+describe("SpotlightService", () => {
+ describe("registerSearcher", () => {
+ it("registers a searcher with a given ID", () => {
+ const container = new TestContainer()
+
+ const spotlight = container.bind(SpotlightService)
+ spotlight.registerSearcher(echoSearcher)
+
+ const [id, searcher] = spotlight.getAllSearchers().next().value
+
+ expect(id).toEqual("echo-searcher")
+ expect(searcher).toBe(echoSearcher)
+ })
+
+ it("if 2 searchers are registered with the same ID, the last one overwrites the first one", () => {
+ const echoSearcherFake: SpotlightSearcher = {
+ searcherID: "echo-searcher",
+ searcherSectionTitle: "Echo Searcher",
+ createSearchSession: () => {
+ throw new Error("not implemented")
+ },
+ onResultSelect: () => {
+ throw new Error("not implemented")
+ },
+ }
+
+ const container = new TestContainer()
+
+ const spotlight = container.bind(SpotlightService)
+ spotlight.registerSearcher(echoSearcher)
+ spotlight.registerSearcher(echoSearcherFake)
+
+ const [id, searcher] = spotlight.getAllSearchers().next().value
+
+ expect(id).toEqual("echo-searcher")
+ expect(searcher).toBe(echoSearcherFake)
+ })
+ })
+
+ describe("createSearchSession", () => {
+ it("when the source query changes, the searchers are notified", async () => {
+ const container = new TestContainer()
+
+ const notifiedFn = vi.fn()
+
+ const sampleSearcher: SpotlightSearcher = {
+ searcherID: "searcher",
+ searcherSectionTitle: "Searcher",
+ createSearchSession: (query) => {
+ const stop = watch(query, notifiedFn, { immediate: true })
+
+ return [
+ ref<SpotlightSearcherSessionState>({
+ loading: false,
+ results: [],
+ }),
+ () => {
+ stop()
+ },
+ ]
+ },
+ onResultSelect: () => {
+ /* noop */
+ },
+ }
+
+ const spotlight = container.bind(SpotlightService)
+ spotlight.registerSearcher(sampleSearcher)
+
+ const query = ref("test")
+
+ const [, dispose] = spotlight.createSearchSession(query)
+
+ query.value = "test2"
+ await nextTick()
+
+ expect(notifiedFn).toHaveBeenCalledTimes(2)
+
+ dispose()
+ })
+
+ it("when a searcher returns results, they are added to the results", async () => {
+ const container = new TestContainer()
+
+ const spotlight = container.bind(SpotlightService)
+ spotlight.registerSearcher(echoSearcher)
+
+ const query = ref("test")
+ const [session, dispose] = spotlight.createSearchSession(query)
+ await nextTick()
+
+ expect(session.value.results).toHaveProperty("echo-searcher")
+ expect(session.value.results["echo-searcher"]).toEqual({
+ title: "Echo Searcher",
+ avgScore: 1,
+ results: [
+ {
+ id: "searcher-a-result",
+ text: {
+ type: "text",
+ text: "test",
+ },
+ icon: {},
+ score: 1,
+ },
+ ],
+ })
+
+ dispose()
+ })
+
+ it("when a searcher does not return any results, they are not added to the results", () => {
+ const container = new TestContainer()
+
+ const spotlight = container.bind(SpotlightService)
+ spotlight.registerSearcher(emptySearcher)
+
+ const query = ref("test")
+ const [session, dispose] = spotlight.createSearchSession(query)
+
+ expect(session.value.results).not.toHaveProperty("empty-searcher")
+ expect(session.value.results).toEqual({})
+
+ dispose()
+ })
+
+ it("when any of the searchers report they are loading, the search session says it is loading", () => {
+ const container = new TestContainer()
+
+ const loadingSearcher: SpotlightSearcher = {
+ searcherID: "loading-searcher",
+ searcherSectionTitle: "Loading Searcher",
+ createSearchSession: () => {
+ const loading = ref(true)
+ const results = ref<SpotlightSearcherResult[]>([])
+
+ return [
+ computed<SpotlightSearcherSessionState>(() => ({
+ loading: loading.value,
+ results: results.value,
+ })),
+ () => {
+ /* noop */
+ },
+ ]
+ },
+ onResultSelect: () => {
+ /* noop */
+ },
+ }
+
+ const spotlight = container.bind(SpotlightService)
+ spotlight.registerSearcher(loadingSearcher)
+ spotlight.registerSearcher(echoSearcher)
+
+ const query = ref("test")
+ const [session, dispose] = spotlight.createSearchSession(query)
+
+ expect(session.value.loading).toBe(true)
+
+ dispose()
+ })
+
+ it("when all of the searchers report they are not loading, the search session says it is not loading", () => {
+ const container = new TestContainer()
+
+ const spotlight = container.bind(SpotlightService)
+ spotlight.registerSearcher(echoSearcher)
+ spotlight.registerSearcher(emptySearcher)
+
+ const query = ref("test")
+ const [session, dispose] = spotlight.createSearchSession(query)
+
+ expect(session.value.loading).toBe(false)
+
+ dispose()
+ })
+
+ it("when a searcher changes its loading state after a while, the search session state updates", async () => {
+ const container = new TestContainer()
+
+ const loading = ref(true)
+
+ const loadingSearcher: SpotlightSearcher = {
+ searcherID: "loading-searcher",
+ searcherSectionTitle: "Loading Searcher",
+ createSearchSession: () => {
+ return [
+ computed<SpotlightSearcherSessionState>(() => ({
+ loading: loading.value,
+ results: [],
+ })),
+ () => {
+ /* noop */
+ },
+ ]
+ },
+ onResultSelect: () => {
+ /* noop */
+ },
+ }
+
+ const spotlight = container.bind(SpotlightService)
+ spotlight.registerSearcher(loadingSearcher)
+
+ const query = ref("test")
+ const [session, dispose] = spotlight.createSearchSession(query)
+
+ expect(session.value.loading).toBe(true)
+
+ loading.value = false
+
+ await nextTick()
+
+ expect(session.value.loading).toBe(false)
+
+ dispose()
+ })
+
+ it("when the searcher updates its results, the search session state updates", async () => {
+ const container = new TestContainer()
+
+ const spotlight = container.bind(SpotlightService)
+ spotlight.registerSearcher(echoSearcher)
+
+ const query = ref("test")
+ const [session, dispose] = spotlight.createSearchSession(query)
+
+ expect(session.value.results).toHaveProperty("echo-searcher")
+ expect(session.value.results["echo-searcher"]).toEqual({
+ title: "Echo Searcher",
+ avgScore: 1,
+ results: [
+ {
+ id: "searcher-a-result",
+ text: {
+ type: "text",
+ text: "test",
+ },
+ icon: {},
+ score: 1,
+ },
+ ],
+ })
+
+ query.value = "test2"
+ await nextTick()
+
+ expect(session.value.results).toHaveProperty("echo-searcher")
+ expect(session.value.results["echo-searcher"]).toEqual({
+ title: "Echo Searcher",
+ avgScore: 1,
+ results: [
+ {
+ id: "searcher-a-result",
+ text: {
+ type: "text",
+ text: "test2",
+ },
+ icon: {},
+ score: 1,
+ },
+ ],
+ })
+
+ dispose()
+ })
+
+ it("when the returned dispose function is called, the searchers are notified", () => {
+ const container = new TestContainer()
+
+ const disposeFn = vi.fn()
+
+ const testSearcher: SpotlightSearcher = {
+ searcherID: "test-searcher",
+ searcherSectionTitle: "Test Searcher",
+ createSearchSession: () => {
+ return [
+ computed<SpotlightSearcherSessionState>(() => ({
+ loading: false,
+ results: [],
+ })),
+ disposeFn,
+ ]
+ },
+ onResultSelect: () => {
+ /* noop */
+ },
+ }
+
+ const spotlight = container.bind(SpotlightService)
+ spotlight.registerSearcher(testSearcher)
+
+ const query = ref("test")
+ const [, dispose] = spotlight.createSearchSession(query)
+
+ dispose()
+
+ expect(disposeFn).toHaveBeenCalledOnce()
+ })
+
+ it("when the search session is disposed, changes to the query are not notified to the searchers", async () => {
+ const container = new TestContainer()
+
+ const notifiedFn = vi.fn()
+
+ const testSearcher: SpotlightSearcher = {
+ searcherID: "test-searcher",
+ searcherSectionTitle: "Test Searcher",
+ createSearchSession: (query) => {
+ watch(query, notifiedFn, { immediate: true })
+
+ return [
+ computed<SpotlightSearcherSessionState>(() => ({
+ loading: false,
+ results: [],
+ })),
+ () => {
+ /* noop */
+ },
+ ]
+ },
+ onResultSelect: () => {
+ /* noop */
+ },
+ }
+
+ const spotlight = container.bind(SpotlightService)
+ spotlight.registerSearcher(testSearcher)
+
+ const query = ref("test")
+ const [, dispose] = spotlight.createSearchSession(query)
+
+ query.value = "test2"
+ await nextTick()
+
+ expect(notifiedFn).toHaveBeenCalledTimes(2)
+
+ dispose()
+
+ query.value = "test3"
+ await nextTick()
+
+ expect(notifiedFn).toHaveBeenCalledTimes(3)
+ })
+
+ describe("selectSearchResult", () => {
+ const onResultSelectFn = vi.fn()
+
+ const testSearcher: SpotlightSearcher = {
+ searcherID: "test-searcher",
+ searcherSectionTitle: "Test Searcher",
+ createSearchSession: () => {
+ return [
+ computed<SpotlightSearcherSessionState>(() => ({
+ loading: false,
+ results: [],
+ })),
+ () => {
+ /* noop */
+ },
+ ]
+ },
+ onResultSelect: onResultSelectFn,
+ }
+
+ beforeEach(() => {
+ onResultSelectFn.mockReset()
+ })
+
+ it("does nothing if the searcherID is invalid", () => {
+ const container = new TestContainer()
+
+ const spotlight = container.bind(SpotlightService)
+ spotlight.registerSearcher(testSearcher)
+
+ spotlight.selectSearchResult("invalid-searcher-id", {
+ id: "test-result",
+ text: {
+ type: "text",
+ text: "test",
+ },
+ icon: {},
+ score: 1,
+ })
+
+ expect(onResultSelectFn).not.toHaveBeenCalled()
+ })
+
+ it("calls the correspondig searcher's onResultSelect method", () => {
+ const container = new TestContainer()
+
+ const spotlight = container.bind(SpotlightService)
+ spotlight.registerSearcher(testSearcher)
+
+ spotlight.selectSearchResult("test-searcher", {
+ id: "test-result",
+ text: {
+ type: "text",
+ text: "test",
+ },
+ icon: {},
+ score: 1,
+ })
+
+ expect(onResultSelectFn).toHaveBeenCalledOnce()
+ })
+
+ it("passes the correct information to the searcher's onResultSelect method", () => {
+ const container = new TestContainer()
+
+ const spotlight = container.bind(SpotlightService)
+ spotlight.registerSearcher(testSearcher)
+
+ spotlight.selectSearchResult("test-searcher", {
+ id: "test-result",
+ text: {
+ type: "text",
+ text: "test",
+ },
+ icon: {},
+ score: 1,
+ })
+
+ expect(onResultSelectFn).toHaveBeenCalledWith({
+ id: "test-result",
+ text: {
+ type: "text",
+ text: "test",
+ },
+ icon: {},
+ score: 1,
+ })
+ })
+ })
+ })
+
+ describe("getAllSearchers", () => {
+ it("when no searchers are registered, it returns an empty array", () => {
+ const container = new TestContainer()
+
+ const spotlight = container.bind(SpotlightService)
+
+ expect(Array.from(spotlight.getAllSearchers())).toEqual([])
+ })
+
+ it("when a searcher is registered, it returns an array with a tuple of the searcher id and then then searcher", () => {
+ const container = new TestContainer()
+
+ const spotlight = container.bind(SpotlightService)
+ spotlight.registerSearcher(echoSearcher)
+
+ expect(Array.from(spotlight.getAllSearchers())).toEqual([
+ ["echo-searcher", echoSearcher],
+ ])
+ })
+
+ it("returns all registered searchers", () => {
+ const container = new TestContainer()
+
+ const spotlight = container.bind(SpotlightService)
+ spotlight.registerSearcher(echoSearcher)
+ spotlight.registerSearcher(emptySearcher)
+
+ expect(Array.from(spotlight.getAllSearchers())).toEqual([
+ ["echo-searcher", echoSearcher],
+ ["empty-searcher", emptySearcher],
+ ])
+ })
+ })
+})
diff --git a/packages/hoppscotch-common/src/services/spotlight/index.ts b/packages/hoppscotch-common/src/services/spotlight/index.ts
new file mode 100644
index 000000000..44d6f7242
--- /dev/null
+++ b/packages/hoppscotch-common/src/services/spotlight/index.ts
@@ -0,0 +1,216 @@
+import { Service } from "dioc"
+import { watch, type Ref, ref, reactive, effectScope, Component } from "vue"
+
+/**
+ * Defines how to render the entry text in a Spotlight Search Result
+ */
+export type SpotlightResultTextType<T extends object | Component = never> =
+ | {
+ type: "text"
+ /**
+ * The text to render. Passing an array of strings will render each string separated by a chevron
+ */
+ text: string[] | string
+ }
+ | {
+ type: "custom"
+ /**
+ * The component to render in place of the text
+ */
+ component: T
+
+ /**
+ * The props to pass to the component
+ */
+ componentProps: T extends Component<infer Props> ? Props : never
+ }
+
+/**
+ * Defines info about a spotlight light so the UI can render it
+ */
+export type SpotlightSearcherResult = {
+ /**
+ * The unique ID of the result
+ */
+ id: string
+
+ /**
+ * The text to render in the result
+ */
+ text: SpotlightResultTextType<any>
+
+ /**
+ * The icon to render as the signifier of the result
+ */
+ icon: object | Component
+
+ /**
+ * The score of the result, the UI should sort the results by this
+ */
+ score: number
+
+ /**
+ * Additional metadata about the result
+ */
+ meta?: {
+ /**
+ * The keyboard shortcut to trigger the result
+ */
+ keyboardShortcut?: string[]
+ }
+}
+
+/**
+ * Defines the state of a searcher during a spotlight search session
+ */
+export type SpotlightSearcherSessionState = {
+ /**
+ * Whether the searcher is currently loading results
+ */
+ loading: boolean
+
+ /**
+ * The results presented by the corresponding searcher in a session
+ */
+ results: SpotlightSearcherResult[]
+}
+
+export interface SpotlightSearcher {
+ searcherID: string
+ searcherSectionTitle: string
+
+ createSearchSession(
+ query: Readonly<Ref<string>>
+ ): [Ref<SpotlightSearcherSessionState>, () => void]
+
+ onResultSelect(result: SpotlightSearcherResult): void
+}
+
+/**
+ * Defines the state of a searcher during a search session that
+ * is exposed to through the spotlight service
+ */
+export type SpotlightSearchSearcherState = {
+ title: string
+ avgScore: number
+ results: SpotlightSearcherResult[]
+}
+
+/**
+ * Defines the state of a spotlight search session
+ */
+export type SpotlightSearchState = {
+ /**
+ * Whether any of the searchers are currently loading results
+ */
+ loading: boolean
+
+ /**
+ * The results presented by the corresponding searcher in a session
+ */
+ results: Record<string, SpotlightSearchSearcherState>
+}
+
+export class SpotlightService extends Service {
+ public static readonly ID = "SPOTLIGHT_SERVICE"
+
+ private searchers: Map<string, SpotlightSearcher> = new Map()
+
+ /**
+ * Registers a searcher with the spotlight service
+ * @param searcher The searcher instance to register
+ */
+ public registerSearcher(searcher: SpotlightSearcher) {
+ this.searchers.set(searcher.searcherID, searcher)
+ }
+
+ /**
+ * Gets an iterator over all registered searchers and their IDs
+ */
+ public getAllSearchers(): IterableIterator<[string, SpotlightSearcher]> {
+ return this.searchers.entries()
+ }
+
+ /**
+ * Creates a new search session
+ * @param query A ref to the query to search for, updating this ref will notify the searchers about the change
+ * @returns A ref to the state of the search session and a function to end the session
+ */
+ public createSearchSession(
+ query: Ref<string>
+ ): [Ref<SpotlightSearchState>, () => void] {
+ const searchSessions = Array.from(this.searchers.values()).map(
+ (x) => [x, ...x.createSearchSession(query)] as const
+ )
+
+ const loadingSearchers = reactive(new Set())
+ const onSessionEndList: Array<() => void> = []
+
+ const resultObj = ref<SpotlightSearchState>({
+ loading: false,
+ results: {},
+ })
+
+ const scopeHandle = effectScope()
+
+ scopeHandle.run(() => {
+ for (const [searcher, state, onSessionEnd] of searchSessions) {
+ watch(
+ state,
+ (newState) => {
+ if (newState.loading) {
+ loadingSearchers.add(searcher.searcherID)
+ } else {
+ loadingSearchers.delete(searcher.searcherID)
+ }
+
+ if (newState.results.length === 0) {
+ delete resultObj.value.results[searcher.searcherID]
+ } else {
+ resultObj.value.results[searcher.searcherID] = {
+ title: searcher.searcherSectionTitle,
+ avgScore:
+ newState.results.reduce((acc, x) => acc + x.score, 0) /
+ newState.results.length,
+ results: newState.results,
+ }
+ }
+ },
+ { immediate: true }
+ )
+
+ onSessionEndList.push(onSessionEnd)
+ }
+
+ watch(
+ loadingSearchers,
+ (set) => {
+ resultObj.value.loading = set.size > 0
+ },
+ { immediate: true }
+ )
+ })
+
+ const onSearchEnd = () => {
+ scopeHandle.stop()
+
+ for (const onEnd of onSessionEndList) {
+ onEnd()
+ }
+ }
+
+ return [resultObj, onSearchEnd]
+ }
+
+ /**
+ * Selects a search result. To be called when the user selects a result
+ * @param searcherID The ID of the searcher that the result belongs to
+ * @param result The resuklt to look at
+ */
+ public selectSearchResult(
+ searcherID: string,
+ result: SpotlightSearcherResult
+ ) {
+ this.searchers.get(searcherID)?.onResultSelect(result)
+ }
+}
diff --git a/packages/hoppscotch-common/src/services/spotlight/searchers/__tests__/history.searcher.spec.ts b/packages/hoppscotch-common/src/services/spotlight/searchers/__tests__/history.searcher.spec.ts
new file mode 100644
index 000000000..3a5f307dc
--- /dev/null
+++ b/packages/hoppscotch-common/src/services/spotlight/searchers/__tests__/history.searcher.spec.ts
@@ -0,0 +1,444 @@
+import { TestContainer } from "dioc/testing"
+import { beforeEach, describe, expect, it, vi } from "vitest"
+import { HistorySpotlightSearcherService } from "../history.searcher"
+import { nextTick, ref } from "vue"
+import { SpotlightService } from "../.."
+import { GQLHistoryEntry, RESTHistoryEntry } from "~/newstore/history"
+import { getDefaultRESTRequest } from "~/helpers/rest/default"
+import { HoppAction, HoppActionWithArgs } from "~/helpers/actions"
+import { defaultGQLSession } from "~/newstore/GQLSession"
+
+async function flushPromises() {
+ return await new Promise((r) => setTimeout(r))
+}
+
+const tabMock = vi.hoisted(() => ({
+ createNewTab: vi.fn(),
+}))
+
+vi.mock("~/helpers/rest/tab", () => ({
+ __esModule: true,
+ createNewTab: tabMock.createNewTab,
+}))
+
+vi.mock("~/modules/i18n", () => ({
+ __esModule: true,
+ getI18n: () => (x: string) => x,
+}))
+
+const actionsMock = vi.hoisted(() => ({
+ value: [] as (HoppAction | HoppActionWithArgs)[],
+ invokeAction: vi.fn(),
+}))
+
+vi.mock("~/helpers/actions", async () => {
+ const { BehaviorSubject }: any = await vi.importActual("rxjs")
+
+ return {
+ __esModule: true,
+ activeActions$: new BehaviorSubject(actionsMock.value),
+ invokeAction: actionsMock.invokeAction,
+ }
+})
+
+const historyMock = vi.hoisted(() => ({
+ restEntries: [] as RESTHistoryEntry[],
+ gqlEntries: [] as GQLHistoryEntry[],
+}))
+
+vi.mock("~/newstore/history", () => ({
+ __esModule: true,
+ restHistoryStore: {
+ value: {
+ state: historyMock.restEntries,
+ },
+ },
+ graphqlHistoryStore: {
+ value: {
+ state: historyMock.gqlEntries,
+ },
+ },
+}))
+
+describe("HistorySpotlightSearcherService", () => {
+ beforeEach(() => {
+ let x = actionsMock.value.pop()
+ while (x) {
+ x = actionsMock.value.pop()
+ }
+
+ let y = historyMock.restEntries.pop()
+ while (y) {
+ y = historyMock.restEntries.pop()
+ }
+
+ actionsMock.invokeAction.mockReset()
+ tabMock.createNewTab.mockReset()
+ })
+
+ it("registers with the spotlight service upon initialization", async () => {
+ const container = new TestContainer()
+
+ const registerSearcherFn = vi.fn()
+
+ container.bindMock(SpotlightService, {
+ registerSearcher: registerSearcherFn,
+ })
+
+ const history = container.bind(HistorySpotlightSearcherService)
+ await flushPromises()
+
+ expect(registerSearcherFn).toHaveBeenCalledOnce()
+ expect(registerSearcherFn).toHaveBeenCalledWith(history)
+ })
+
+ it("returns a clear history result if the action is available", async () => {
+ const container = new TestContainer()
+
+ actionsMock.value.push("history.clear")
+ const history = container.bind(HistorySpotlightSearcherService)
+ await flushPromises()
+
+ const query = ref("his")
+ const [result] = history.createSearchSession(query)
+ await nextTick()
+
+ expect(result.value.results).toContainEqual(
+ expect.objectContaining({
+ id: "clear-history",
+ })
+ )
+ })
+
+ it("doesn't return a clear history result if the action is not available", async () => {
+ const container = new TestContainer()
+
+ const history = container.bind(HistorySpotlightSearcherService)
+ await flushPromises()
+
+ const query = ref("his")
+ const [result] = history.createSearchSession(query)
+ await nextTick()
+
+ expect(result.value.results).not.toContainEqual(
+ expect.objectContaining({
+ id: "clear-history",
+ })
+ )
+ })
+
+ it("selecting a clear history entry invokes the clear history action", async () => {
+ const container = new TestContainer()
+
+ actionsMock.value.push("history.clear")
+ const history = container.bind(HistorySpotlightSearcherService)
+ await flushPromises()
+
+ const query = ref("his")
+ const [result] = history.createSearchSession(query)
+ await nextTick()
+
+ history.onResultSelect(result.value.results[0])
+
+ expect(actionsMock.invokeAction).toHaveBeenCalledOnce()
+ expect(actionsMock.invokeAction).toHaveBeenCalledWith("history.clear")
+ })
+
+ it("returns all the valid rest history entries for the search term", async () => {
+ actionsMock.value.push("rest.request.open")
+
+ historyMock.restEntries.push({
+ request: {
+ ...getDefaultRESTRequest(),
+ endpoint: "bla.com",
+ },
+ responseMeta: {
+ duration: null,
+ statusCode: null,
+ },
+ star: false,
+ v: 1,
+ updatedOn: new Date(),
+ })
+
+ const container = new TestContainer()
+
+ const history = container.bind(HistorySpotlightSearcherService)
+ await flushPromises()
+
+ const query = ref("bla")
+ const [result] = history.createSearchSession(query)
+ await nextTick()
+
+ expect(result.value.results).toContainEqual(
+ expect.objectContaining({
+ id: "rest-0",
+ text: {
+ type: "custom",
+ component: expect.anything(),
+ componentProps: expect.objectContaining({
+ historyEntry: historyMock.restEntries[0],
+ }),
+ },
+ })
+ )
+ })
+
+ it("selecting a rest history entry invokes action to open the rest request", async () => {
+ actionsMock.value.push("rest.request.open")
+
+ const historyEntry: RESTHistoryEntry = {
+ request: {
+ ...getDefaultRESTRequest(),
+ endpoint: "bla.com",
+ },
+ responseMeta: {
+ duration: null,
+ statusCode: null,
+ },
+ star: false,
+ v: 1,
+ updatedOn: new Date(),
+ }
+
+ historyMock.restEntries.push(historyEntry)
+
+ const container = new TestContainer()
+
+ const history = container.bind(HistorySpotlightSearcherService)
+ await flushPromises()
+
+ const query = ref("bla")
+ const [result] = history.createSearchSession(query)
+ await nextTick()
+
+ const doc = result.value.results[0]
+
+ history.onResultSelect(doc)
+
+ expect(actionsMock.invokeAction).toHaveBeenCalledOnce()
+ expect(actionsMock.invokeAction).toHaveBeenCalledWith("rest.request.open", {
+ doc: {
+ request: historyEntry.request,
+ isDirty: false,
+ },
+ })
+ })
+
+ it("returns all the valid graphql history entries for the search term", async () => {
+ actionsMock.value.push("gql.request.open")
+
+ historyMock.gqlEntries.push({
+ request: {
+ ...defaultGQLSession.request,
+ url: "bla.com",
+ },
+ response: "{}",
+ star: false,
+ v: 1,
+ updatedOn: new Date(),
+ })
+
+ const container = new TestContainer()
+
+ const history = container.bind(HistorySpotlightSearcherService)
+ await flushPromises()
+
+ const query = ref("bla")
+ const [result] = history.createSearchSession(query)
+ await nextTick()
+
+ expect(result.value.results).toContainEqual(
+ expect.objectContaining({
+ id: "gql-0",
+ text: {
+ type: "custom",
+ component: expect.anything(),
+ componentProps: expect.objectContaining({
+ historyEntry: historyMock.gqlEntries[0],
+ }),
+ },
+ })
+ )
+ })
+
+ it("selecting a graphql history entry invokes action to open the graphql request", async () => {
+ actionsMock.value.push("gql.request.open")
+
+ const historyEntry: GQLHistoryEntry = {
+ request: {
+ ...defaultGQLSession.request,
+ url: "bla.com",
+ },
+ response: "{}",
+ star: false,
+ v: 1,
+ updatedOn: new Date(),
+ }
+
+ historyMock.gqlEntries.push(historyEntry)
+
+ const container = new TestContainer()
+
+ const history = container.bind(HistorySpotlightSearcherService)
+ await flushPromises()
+
+ const query = ref("bla")
+ const [result] = history.createSearchSession(query)
+ await nextTick()
+
+ const doc = result.value.results[0]
+
+ history.onResultSelect(doc)
+
+ expect(actionsMock.invokeAction).toHaveBeenCalledOnce()
+ expect(actionsMock.invokeAction).toHaveBeenCalledWith("gql.request.open", {
+ request: historyEntry.request,
+ })
+ })
+
+ it("rest history entries are not shown when the rest open action is not registered", async () => {
+ actionsMock.value.push("gql.request.open")
+
+ historyMock.gqlEntries.push({
+ request: {
+ ...defaultGQLSession.request,
+ url: "bla.com",
+ },
+ response: "{}",
+ star: false,
+ v: 1,
+ updatedOn: new Date(),
+ })
+
+ historyMock.restEntries.push({
+ request: {
+ ...getDefaultRESTRequest(),
+ endpoint: "bla.com",
+ },
+ responseMeta: {
+ duration: null,
+ statusCode: null,
+ },
+ star: false,
+ v: 1,
+ updatedOn: new Date(),
+ })
+
+ const container = new TestContainer()
+
+ const history = container.bind(HistorySpotlightSearcherService)
+ await flushPromises()
+
+ const query = ref("bla")
+ const [result] = history.createSearchSession(query)
+ await nextTick()
+
+ expect(result.value.results).toContainEqual(
+ expect.objectContaining({
+ id: expect.stringMatching(/^gql/),
+ })
+ )
+ expect(result.value.results).not.toContainEqual(
+ expect.objectContaining({
+ id: expect.stringMatching(/^rest/),
+ })
+ )
+ })
+
+ it("gql history entries are not shown when the gql open action is not registered", async () => {
+ actionsMock.value.push("rest.request.open")
+
+ historyMock.gqlEntries.push({
+ request: {
+ ...defaultGQLSession.request,
+ url: "bla.com",
+ },
+ response: "{}",
+ star: false,
+ v: 1,
+ updatedOn: new Date(),
+ })
+
+ historyMock.restEntries.push({
+ request: {
+ ...getDefaultRESTRequest(),
+ endpoint: "bla.com",
+ },
+ responseMeta: {
+ duration: null,
+ statusCode: null,
+ },
+ star: false,
+ v: 1,
+ updatedOn: new Date(),
+ })
+
+ const container = new TestContainer()
+
+ const history = container.bind(HistorySpotlightSearcherService)
+ await flushPromises()
+
+ const query = ref("bla")
+ const [result] = history.createSearchSession(query)
+ await nextTick()
+
+ expect(result.value.results).toContainEqual(
+ expect.objectContaining({
+ id: expect.stringMatching(/^rest/),
+ })
+ )
+ expect(result.value.results).not.toContainEqual(
+ expect.objectContaining({
+ id: expect.stringMatching(/^gql/),
+ })
+ )
+ })
+
+ it("none of the history entries are show when neither of the open actions are registered", async () => {
+ historyMock.gqlEntries.push({
+ request: {
+ ...defaultGQLSession.request,
+ url: "bla.com",
+ },
+ response: "{}",
+ star: false,
+ v: 1,
+ updatedOn: new Date(),
+ })
+
+ historyMock.restEntries.push({
+ request: {
+ ...getDefaultRESTRequest(),
+ endpoint: "bla.com",
+ },
+ responseMeta: {
+ duration: null,
+ statusCode: null,
+ },
+ star: false,
+ v: 1,
+ updatedOn: new Date(),
+ })
+
+ const container = new TestContainer()
+
+ const history = container.bind(HistorySpotlightSearcherService)
+ await flushPromises()
+
+ const query = ref("bla")
+ const [result] = history.createSearchSession(query)
+ await nextTick()
+
+ expect(result.value.results).not.toContainEqual(
+ expect.objectContaining({
+ id: expect.stringMatching(/^rest/),
+ })
+ )
+ expect(result.value.results).not.toContainEqual(
+ expect.objectContaining({
+ id: expect.stringMatching(/^gql/),
+ })
+ )
+ })
+})
diff --git a/packages/hoppscotch-common/src/services/spotlight/searchers/__tests__/user.searcher.spec.ts b/packages/hoppscotch-common/src/services/spotlight/searchers/__tests__/user.searcher.spec.ts
new file mode 100644
index 000000000..ec6775343
--- /dev/null
+++ b/packages/hoppscotch-common/src/services/spotlight/searchers/__tests__/user.searcher.spec.ts
@@ -0,0 +1,192 @@
+import { beforeEach, describe, it, expect, vi } from "vitest"
+import { TestContainer } from "dioc/testing"
+import { UserSpotlightSearcherService } from "../user.searcher"
+import { nextTick, ref } from "vue"
+import { SpotlightService } from "../.."
+
+async function flushPromises() {
+ return await new Promise((r) => setTimeout(r))
+}
+
+vi.mock("~/modules/i18n", () => ({
+ __esModule: true,
+ getI18n: () => (x: string) => x,
+}))
+
+const actionsMock = vi.hoisted(() => ({
+ value: ["user.login"],
+ invokeAction: vi.fn(),
+}))
+
+vi.mock("~/helpers/actions", async () => {
+ const { BehaviorSubject }: any = await vi.importActual("rxjs")
+
+ return {
+ __esModule: true,
+ activeActions$: new BehaviorSubject(actionsMock.value),
+ invokeAction: actionsMock.invokeAction,
+ }
+})
+
+describe("UserSearcher", () => {
+ beforeEach(() => {
+ let x = actionsMock.value.pop()
+ while (x) {
+ x = actionsMock.value.pop()
+ }
+
+ actionsMock.invokeAction.mockReset()
+ })
+
+ it("registers with the spotlight service upon initialization", async () => {
+ const container = new TestContainer()
+
+ const registerSearcherFn = vi.fn()
+
+ container.bindMock(SpotlightService, {
+ registerSearcher: registerSearcherFn,
+ })
+
+ const user = container.bind(UserSpotlightSearcherService)
+ await flushPromises()
+
+ expect(registerSearcherFn).toHaveBeenCalledOnce()
+ expect(registerSearcherFn).toHaveBeenCalledWith(user)
+ })
+
+ it("if login action is available, the search result should have the login result", async () => {
+ const container = new TestContainer()
+
+ actionsMock.value.push("user.login")
+ const user = container.bind(UserSpotlightSearcherService)
+ await flushPromises()
+
+ const query = ref("log")
+ const result = user.createSearchSession(query)[0]
+ await nextTick()
+
+ expect(result.value.results).toContainEqual(
+ expect.objectContaining({
+ id: "login",
+ })
+ )
+ })
+
+ it("if login action is not available, the search result should not have the login result", async () => {
+ const container = new TestContainer()
+
+ const user = container.bind(UserSpotlightSearcherService)
+ await flushPromises()
+
+ const query = ref("log")
+ const result = user.createSearchSession(query)[0]
+ await nextTick()
+
+ expect(result.value.results).not.toContainEqual(
+ expect.objectContaining({
+ id: "login",
+ })
+ )
+ })
+
+ it("if logout action is available, the search result should have the logout result", async () => {
+ const container = new TestContainer()
+
+ actionsMock.value.push("user.logout")
+ const user = container.bind(UserSpotlightSearcherService)
+ await flushPromises()
+
+ const query = ref("log")
+ const result = user.createSearchSession(query)[0]
+ await nextTick()
+
+ expect(result.value.results).toContainEqual(
+ expect.objectContaining({
+ id: "logout",
+ })
+ )
+ })
+
+ it("if logout action is not available, the search result should not have the logout result", async () => {
+ const container = new TestContainer()
+
+ const user = container.bind(UserSpotlightSearcherService)
+ await flushPromises()
+
+ const query = ref("log")
+ const result = user.createSearchSession(query)[0]
+ await nextTick()
+
+ expect(result.value.results).not.toContainEqual(
+ expect.objectContaining({
+ id: "logout",
+ })
+ )
+ })
+
+ it("if login action and logout action are available, the search result should have both results", async () => {
+ const container = new TestContainer()
+
+ actionsMock.value.push("user.login", "user.logout")
+ const user = container.bind(UserSpotlightSearcherService)
+ await flushPromises()
+
+ const query = ref("log")
+ const result = user.createSearchSession(query)[0]
+ await nextTick()
+
+ expect(result.value.results).toContainEqual(
+ expect.objectContaining({
+ id: "logout",
+ })
+ )
+
+ expect(result.value.results).toContainEqual(
+ expect.objectContaining({
+ id: "login",
+ })
+ )
+ })
+
+ it("selecting the login event should invoke the login action", () => {
+ const container = new TestContainer()
+
+ actionsMock.value.push("user.login")
+ const user = container.bind(UserSpotlightSearcherService)
+ const query = ref("log")
+
+ user.createSearchSession(query)[0]
+
+ user.onDocSelected("login")
+
+ expect(actionsMock.invokeAction).toHaveBeenCalledOnce()
+ expect(actionsMock.invokeAction).toHaveBeenCalledWith("user.login")
+ })
+
+ it("selecting the logout event should invoke the logout action", () => {
+ const container = new TestContainer()
+
+ actionsMock.value.push("user.logout")
+ const user = container.bind(UserSpotlightSearcherService)
+ const query = ref("log")
+
+ user.createSearchSession(query)[0]
+
+ user.onDocSelected("logout")
+ expect(actionsMock.invokeAction).toHaveBeenCalledOnce()
+ expect(actionsMock.invokeAction).toHaveBeenCalledWith("user.logout")
+ })
+
+ it("selecting an invalid event should not invoke any action", () => {
+ const container = new TestContainer()
+
+ actionsMock.value.push("user.logout")
+ const user = container.bind(UserSpotlightSearcherService)
+ const query = ref("log")
+
+ user.createSearchSession(query)[0]
+
+ user.onDocSelected("bla")
+ expect(actionsMock.invokeAction).not.toHaveBeenCalled()
+ })
+})
diff --git a/packages/hoppscotch-common/src/services/spotlight/searchers/base/__tests__/static.searcher.spec.ts b/packages/hoppscotch-common/src/services/spotlight/searchers/base/__tests__/static.searcher.spec.ts
new file mode 100644
index 000000000..69a0c9943
--- /dev/null
+++ b/packages/hoppscotch-common/src/services/spotlight/searchers/base/__tests__/static.searcher.spec.ts
@@ -0,0 +1,403 @@
+import { describe, it, expect, vi } from "vitest"
+import {
+ SearchResult,
+ StaticSpotlightSearcherService,
+} from "../static.searcher"
+import { nextTick, reactive, ref } from "vue"
+import { SpotlightSearcherResult } from "../../.."
+import { TestContainer } from "dioc/testing"
+
+async function flushPromises() {
+ return await new Promise((r) => setTimeout(r))
+}
+
+describe("StaticSpotlightSearcherService", () => {
+ it("returns docs that have excludeFromSearch set to false", async () => {
+ class TestSearcherService extends StaticSpotlightSearcherService<
+ Record<string, any>
+ > {
+ public static readonly ID = "TEST_SEARCHER_SERVICE"
+
+ public readonly searcherID = "test"
+ public searcherSectionTitle = "test"
+
+ private documents: Record<string, any> = reactive({
+ login: {
+ text: "Login",
+ excludeFromSearch: false,
+ },
+ logout: {
+ text: "Logout",
+ excludeFromSearch: false,
+ },
+ })
+
+ constructor() {
+ super({
+ searchFields: ["text"],
+ fieldWeights: {},
+ })
+
+ this.setDocuments(this.documents)
+ }
+
+ protected getSearcherResultForSearchResult(
+ result: SearchResult<Record<string, any>>
+ ): SpotlightSearcherResult {
+ return {
+ id: result.id,
+ icon: {},
+ text: { type: "text", text: result.doc.text },
+ score: result.score,
+ }
+ }
+
+ public onDocSelected(): void {
+ // noop
+ }
+ }
+
+ const container = new TestContainer()
+
+ const service = container.bind(TestSearcherService)
+ await flushPromises()
+
+ const query = ref("log")
+
+ const [results] = service.createSearchSession(query)
+ await nextTick()
+
+ expect(results.value.results).toContainEqual(
+ expect.objectContaining({
+ id: "login",
+ })
+ )
+ })
+
+ it("doesn't return docs that have excludeFromSearch set to true", async () => {
+ class TestSearcherServiceB extends StaticSpotlightSearcherService<
+ Record<string, any>
+ > {
+ public static readonly ID = "TEST_SEARCHER_SERVICE_B"
+
+ public readonly searcherID = "test"
+ public searcherSectionTitle = "test"
+
+ private documents: Record<string, any> = reactive({
+ login: {
+ text: "Login",
+ excludeFromSearch: true,
+ },
+ logout: {
+ text: "Logout",
+ excludeFromSearch: false,
+ },
+ })
+
+ constructor() {
+ super({
+ searchFields: ["text"],
+ fieldWeights: {},
+ })
+
+ this.setDocuments(this.documents)
+ }
+
+ protected getSearcherResultForSearchResult(
+ result: SearchResult<Record<string, any>>
+ ): SpotlightSearcherResult {
+ return {
+ id: result.id,
+ icon: {},
+ text: { type: "text", text: result.doc.text },
+ score: result.score,
+ }
+ }
+
+ public onDocSelected(): void {
+ // noop
+ }
+ }
+
+ const container = new TestContainer()
+
+ const service = container.bind(TestSearcherServiceB)
+ await flushPromises()
+
+ const query = ref("log")
+ const [results] = service.createSearchSession(query)
+ await nextTick()
+
+ expect(results.value.results).not.toContainEqual(
+ expect.objectContaining({
+ id: "login",
+ })
+ )
+
+ expect(results.value.results).toContainEqual(
+ expect.objectContaining({
+ id: "logout",
+ })
+ )
+ })
+
+ it("returns docs that have excludeFromSearch set to undefined", async () => {
+ class TestSearcherServiceC extends StaticSpotlightSearcherService<
+ Record<string, any>
+ > {
+ public static readonly ID = "TEST_SEARCHER_SERVICE_C"
+
+ public readonly searcherID = "test"
+ public searcherSectionTitle = "test"
+
+ private documents: Record<string, any> = reactive({
+ login: {
+ text: "Login",
+ },
+ logout: {
+ text: "Logout",
+ },
+ })
+
+ constructor() {
+ super({
+ searchFields: ["text"],
+ fieldWeights: {},
+ })
+
+ this.setDocuments(this.documents)
+ }
+
+ protected getSearcherResultForSearchResult(
+ result: SearchResult<Record<string, any>>
+ ): SpotlightSearcherResult {
+ return {
+ id: result.id,
+ icon: {},
+ text: { type: "text", text: result.doc.text },
+ score: result.score,
+ }
+ }
+
+ public onDocSelected(): void {
+ // noop
+ }
+ }
+
+ const container = new TestContainer()
+
+ const service = container.bind(TestSearcherServiceC)
+ await flushPromises()
+
+ const query = ref("log")
+ const [results] = service.createSearchSession(query)
+ await nextTick()
+
+ expect(results.value.results).toContainEqual(
+ expect.objectContaining({
+ id: "login",
+ })
+ )
+
+ expect(results.value.results).toContainEqual(
+ expect.objectContaining({
+ id: "logout",
+ })
+ )
+ })
+
+ it("onDocSelected is called with a valid doc id and doc when onResultSelect is called", async () => {
+ class TestSearcherServiceD extends StaticSpotlightSearcherService<
+ Record<string, any>
+ > {
+ public static readonly ID = "TEST_SEARCHER_SERVICE_D"
+
+ public readonly searcherID = "test"
+ public searcherSectionTitle = "test"
+
+ public documents: Record<string, any> = reactive({
+ login: {
+ text: "Login",
+ },
+ logout: {
+ text: "Logout",
+ },
+ })
+
+ constructor() {
+ super({
+ searchFields: ["text"],
+ fieldWeights: {},
+ })
+
+ this.setDocuments(this.documents)
+ }
+
+ protected getSearcherResultForSearchResult(
+ result: SearchResult<Record<string, any>>
+ ): SpotlightSearcherResult {
+ return {
+ id: result.id,
+ icon: {},
+ text: { type: "text", text: result.doc.text },
+ score: result.score,
+ }
+ }
+
+ public onDocSelected = vi.fn()
+ }
+
+ const container = new TestContainer()
+
+ const service = container.bind(TestSearcherServiceD)
+ await flushPromises()
+
+ const query = ref("log")
+ const [results] = service.createSearchSession(query)
+ await nextTick()
+
+ const doc = results.value.results[0]
+
+ service.onResultSelect(doc)
+
+ expect(service.onDocSelected).toHaveBeenCalledOnce()
+ expect(service.onDocSelected).toHaveBeenCalledWith(
+ doc.id,
+ service.documents["login"]
+ )
+ })
+
+ it("returns search results from entries as specified by getSearcherResultForSearchResult", async () => {
+ class TestSearcherServiceE extends StaticSpotlightSearcherService<
+ Record<string, any>
+ > {
+ public static readonly ID = "TEST_SEARCHER_SERVICE_E"
+
+ public readonly searcherID = "test"
+ public searcherSectionTitle = "test"
+
+ public documents: Record<string, any> = reactive({
+ login: {
+ text: "Login",
+ },
+ logout: {
+ text: "Logout",
+ },
+ })
+
+ constructor() {
+ super({
+ searchFields: ["text"],
+ fieldWeights: {},
+ })
+
+ this.setDocuments(this.documents)
+ }
+
+ protected getSearcherResultForSearchResult(
+ result: SearchResult<Record<string, any>>
+ ): SpotlightSearcherResult {
+ return {
+ id: result.id,
+ icon: {},
+ text: { type: "text", text: result.doc.text.toUpperCase() },
+ score: result.score,
+ }
+ }
+
+ public onDocSelected(): void {
+ // noop
+ }
+ }
+
+ const container = new TestContainer()
+
+ const service = container.bind(TestSearcherServiceE)
+ await flushPromises()
+
+ const query = ref("log")
+ const [results] = service.createSearchSession(query)
+ await nextTick()
+
+ expect(results.value.results).toContainEqual(
+ expect.objectContaining({
+ id: "login",
+ text: { type: "text", text: "LOGIN" },
+ })
+ )
+
+ expect(results.value.results).toContainEqual(
+ expect.objectContaining({
+ id: "logout",
+ text: { type: "text", text: "LOGOUT" },
+ })
+ )
+ })
+
+ it("indexes the documents by the 'searchFields' property and obeys multiple index fields", async () => {
+ class TestSearcherServiceF extends StaticSpotlightSearcherService<
+ Record<string, any>
+ > {
+ public static readonly ID = "TEST_SEARCHER_SERVICE_F"
+
+ public readonly searcherID = "test"
+ public searcherSectionTitle = "test"
+
+ public documents: Record<string, any> = reactive({
+ login: {
+ text: "Login",
+ alternate: ["sign in"],
+ },
+ logout: {
+ text: "Logout",
+ alternate: ["sign out"],
+ },
+ })
+
+ constructor() {
+ super({
+ searchFields: ["text", "alternate"],
+ fieldWeights: {},
+ })
+
+ this.setDocuments(this.documents)
+ }
+
+ protected getSearcherResultForSearchResult(
+ result: SearchResult<Record<string, any>>
+ ): SpotlightSearcherResult {
+ return {
+ id: result.id,
+ icon: {},
+ text: { type: "text", text: result.doc.text },
+ score: result.score,
+ }
+ }
+
+ public onDocSelected(): void {
+ // noop
+ }
+ }
+
+ const container = new TestContainer()
+
+ const service = container.bind(TestSearcherServiceF)
+ await flushPromises()
+
+ const query = ref("sign")
+ const [results] = service.createSearchSession(query)
+ await nextTick()
+
+ expect(results.value.results).toContainEqual(
+ expect.objectContaining({
+ id: "login",
+ })
+ )
+
+ expect(results.value.results).toContainEqual(
+ expect.objectContaining({
+ id: "logout",
+ })
+ )
+ })
+})
diff --git a/packages/hoppscotch-common/src/services/spotlight/searchers/base/static.searcher.ts b/packages/hoppscotch-common/src/services/spotlight/searchers/base/static.searcher.ts
new file mode 100644
index 000000000..73c11537d
--- /dev/null
+++ b/packages/hoppscotch-common/src/services/spotlight/searchers/base/static.searcher.ts
@@ -0,0 +1,175 @@
+import { Service } from "dioc"
+import {
+ type SpotlightSearcher,
+ type SpotlightSearcherResult,
+ type SpotlightSearcherSessionState,
+} from "../.."
+import MiniSearch from "minisearch"
+import { Ref, computed, effectScope, ref, watch } from "vue"
+import { resolveUnref } from "@vueuse/core"
+
+/**
+ * Defines a search result and additional metadata returned by a StaticSpotlightSearcher
+ */
+export type SearchResult<Doc extends object & { excludeFromSearch?: boolean }> =
+ {
+ id: string
+ score: number
+ doc: Doc
+ }
+
+/**
+ * Options for StaticSpotlightSearcher initialization
+ */
+export type StaticSpotlightSearcherOptions<
+ Doc extends object & { excludeFromSearch?: boolean }
+> = {
+ /**
+ * The array of field names in the given documents to search against
+ */
+ searchFields: Array<keyof Doc>
+
+ /**
+ * The weights to apply to each field in the search, this allows for certain
+ * fields to have more priority than others in the search and update the score
+ */
+ fieldWeights?: Partial<Record<keyof Doc, number>>
+
+ /**
+ * How much the score should be boosted if the search matched fuzzily.
+ * Increasing this value generally makes the search ignore typos, but reduces performance
+ */
+ fuzzyWeight?: number
+
+ /**
+ * How much the score should be boosted if the search matched by prefix.
+ * For e.g, when searching for "hop", "hoppscotch" would match by prefix.
+ */
+ prefixWeight?: number
+}
+
+/**
+ * A base class for SpotlightSearcherServices that have a static set of documents
+ * that can optionally be toggled against (via the `excludeFromSearch` property in the Doc)
+ */
+export abstract class StaticSpotlightSearcherService<
+ Doc extends object & { excludeFromSearch?: boolean }
+ >
+ extends Service
+ implements SpotlightSearcher
+{
+ public abstract readonly searcherID: string
+ public abstract readonly searcherSectionTitle: string
+
+ private minisearch: MiniSearch
+
+ private loading = ref(false)
+
+ private _documents: Record<string, Doc> = {}
+
+ constructor(private opts: StaticSpotlightSearcherOptions<Doc>) {
+ super()
+
+ this.minisearch = new MiniSearch({
+ fields: opts.searchFields as string[],
+ })
+ }
+
+ /**
+ * Sets the documents to search against.
+ * NOTE: We generally expect this function to only be called once and we expect
+ * the documents to not change generally. You can pass a reactive object, if you want to toggle
+ * states if you want to.
+ * @param docs The documents to search against, this is an object, with the key being the document ID
+ */
+ protected setDocuments(docs: Record<string, Doc>) {
+ this._documents = docs
+
+ this.addDocsToSearchIndex()
+ }
+
+ private async addDocsToSearchIndex() {
+ this.loading.value = true
+
+ this.minisearch.removeAll()
+ this.minisearch.vacuum()
+
+ await this.minisearch.addAllAsync(
+ Object.entries(this._documents).map(([id, doc]) => ({
+ id,
+ ...doc,
+ }))
+ )
+
+ this.loading.value = false
+ }
+
+ /**
+ * Specifies how to convert a document into the Spotlight entry format
+ * @param result The search result to convert
+ */
+ protected abstract getSearcherResultForSearchResult(
+ result: SearchResult<Doc>
+ ): SpotlightSearcherResult
+
+ public createSearchSession(
+ query: Readonly<Ref<string>>
+ ): [Ref<SpotlightSearcherSessionState>, () => void] {
+ const results = ref<SpotlightSearcherResult[]>([])
+
+ const resultObj = computed<SpotlightSearcherSessionState>(() => ({
+ loading: this.loading.value,
+ results: results.value,
+ }))
+
+ const scopeHandle = effectScope()
+
+ scopeHandle.run(() => {
+ watch(
+ [query, () => this._documents],
+ ([query, docs]) => {
+ const searchResults = this.minisearch.search(query, {
+ prefix: true,
+ boost: (this.opts.fieldWeights as any) ?? {},
+ weights: {
+ fuzzy: this.opts.fuzzyWeight ?? 0.2,
+ prefix: this.opts.prefixWeight ?? 0.6,
+ },
+ })
+
+ results.value = searchResults
+ .filter(
+ (result) =>
+ this._documents[result.id].excludeFromSearch === undefined ||
+ this._documents[result.id].excludeFromSearch === false
+ )
+ .map((result) => {
+ return this.getSearcherResultForSearchResult({
+ id: result.id,
+ score: result.score,
+ doc: docs[result.id],
+ })
+ })
+ },
+ { immediate: true }
+ )
+ })
+
+ const onSessionEnd = () => {
+ scopeHandle.stop()
+ }
+
+ return [resultObj, onSessionEnd]
+ }
+
+ /**
+ * Called when a document is selected from the search results
+ * @param id The ID of the document selected
+ * @param doc The document information of the document selected
+ */
+ public abstract onDocSelected(id: string, doc: Doc): void
+
+ public onResultSelect(result: SpotlightSearcherResult): void {
+ this.onDocSelected(result.id, resolveUnref(this._documents)[result.id])
+ }
+}
diff --git a/packages/hoppscotch-common/src/services/spotlight/searchers/history.searcher.ts b/packages/hoppscotch-common/src/services/spotlight/searchers/history.searcher.ts
new file mode 100644
index 000000000..75c96e8ef
--- /dev/null
+++ b/packages/hoppscotch-common/src/services/spotlight/searchers/history.searcher.ts
@@ -0,0 +1,255 @@
+import { Service } from "dioc"
+import {
+ SpotlightSearcher,
+ SpotlightSearcherResult,
+ SpotlightSearcherSessionState,
+ SpotlightService,
+} from "../"
+import { Ref, computed, effectScope, markRaw, ref, watch } from "vue"
+import { getI18n } from "~/modules/i18n"
+import MiniSearch from "minisearch"
+import { graphqlHistoryStore, restHistoryStore } from "~/newstore/history"
+import { useTimeAgo } from "@vueuse/core"
+import IconHistory from "~icons/lucide/history"
+import IconTrash2 from "~icons/lucide/trash-2"
+import SpotlightRESTHistoryEntry from "~/components/app/spotlight/entry/RESTHistory.vue"
+import SpotlightGQLHistoryEntry from "~/components/app/spotlight/entry/GQLHistory.vue"
+import { capitalize } from "lodash-es"
+import { shortDateTime } from "~/helpers/utils/date"
+import { useStreamStatic } from "~/composables/stream"
+import { activeActions$, invokeAction } from "~/helpers/actions"
+import { map } from "rxjs/operators"
+import { HoppRESTDocument } from "~/helpers/rest/document"
+
+/**
+ * This searcher is responsible for searching through the history.
+ * It also provides actions to clear the history.
+ *
+ * NOTE: Initializing this service registers it as a searcher with the Spotlight Service.
+ */
+export class HistorySpotlightSearcherService
+ extends Service
+ implements SpotlightSearcher
+{
+ public static readonly ID = "HISTORY_SPOTLIGHT_SEARCHER_SERVICE"
+
+ private t = getI18n()
+
+ public searcherID = "history"
+ public searcherSectionTitle = this.t("tab.history")
+
+ private readonly spotlight = this.bind(SpotlightService)
+
+ private clearHistoryActionEnabled = useStreamStatic(
+ activeActions$.pipe(map((actions) => actions.includes("history.clear"))),
+ activeActions$.value.includes("history.clear"),
+ () => {
+ /* noop */
+ }
+ )[0]
+
+ private restHistoryEntryOpenable = useStreamStatic(
+ activeActions$.pipe(
+ map((actions) => actions.includes("rest.request.open"))
+ ),
+ activeActions$.value.includes("rest.request.open"),
+ () => {
+ /* noop */
+ }
+ )[0]
+
+ private gqlHistoryEntryOpenable = useStreamStatic(
+ activeActions$.pipe(map((actions) => actions.includes("gql.request.open"))),
+ activeActions$.value.includes("gql.request.open"),
+ () => {
+ /* noop */
+ }
+ )[0]
+
+ constructor() {
+ super()
+
+ this.spotlight.registerSearcher(this)
+ }
+
+ createSearchSession(
+ query: Readonly<Ref<string>>
+ ): [Ref<SpotlightSearcherSessionState>, () => void] {
+ const loading = ref(false)
+ const results = ref<SpotlightSearcherResult[]>([])
+
+ const minisearch = new MiniSearch({
+ fields: ["url", "title", "reltime", "date"],
+ storeFields: ["url"],
+ })
+
+ const stopWatchHandle = watch(
+ this.clearHistoryActionEnabled,
+ (enabled) => {
+ if (enabled) {
+ if (minisearch.has("clear-history")) return
+
+ minisearch.add({
+ id: "clear-history",
+ title: this.t("action.clear_history"),
+ })
+ } else {
+ if (!minisearch.has("clear-history")) return
+
+ minisearch.discard("clear-history")
+ }
+ },
+ { immediate: true }
+ )
+
+ if (this.restHistoryEntryOpenable.value) {
+ minisearch.addAll(
+ restHistoryStore.value.state
+ .filter((x) => !!x.updatedOn)
+ .map((entry, index) => {
+ const relTimeString = capitalize(
+ useTimeAgo(entry.updatedOn!, {
+ updateInterval: 0,
+ }).value
+ )
+
+ return {
+ id: `rest-${index}`,
+ url: entry.request.endpoint,
+ reltime: relTimeString,
+ date: shortDateTime(entry.updatedOn!),
+ }
+ })
+ )
+ }
+
+ if (this.gqlHistoryEntryOpenable.value) {
+ minisearch.addAll(
+ graphqlHistoryStore.value.state
+ .filter((x) => !!x.updatedOn)
+ .map((entry, index) => {
+ const relTimeString = capitalize(
+ useTimeAgo(entry.updatedOn!, {
+ updateInterval: 0,
+ }).value
+ )
+
+ return {
+ id: `gql-${index}`,
+ url: entry.request.url,
+ reltime: relTimeString,
+ date: shortDateTime(entry.updatedOn!),
+ }
+ })
+ )
+ }
+
+ const scopeHandle = effectScope()
+
+ scopeHandle.run(() => {
+ watch(
+ [query, this.clearHistoryActionEnabled],
+ ([query]) => {
+ results.value = minisearch
+ .search(query, {
+ prefix: true,
+ fuzzy: true,
+ boost: {
+ reltime: 2,
+ },
+ weights: {
+ fuzzy: 0.2,
+ prefix: 0.8,
+ },
+ })
+ .map((x) => {
+ if (x.id === "clear-history") {
+ return {
+ id: "clear-history",
+ icon: markRaw(IconTrash2),
+ score: x.score,
+ text: {
+ type: "text",
+ text: this.t("action.clear_history"),
+ },
+ }
+ }
+ if (x.id.startsWith("rest-")) {
+ const entry =
+ restHistoryStore.value.state[parseInt(x.id.split("-")[1])]
+
+ return {
+ id: x.id,
+ icon: markRaw(IconHistory),
+ score: x.score,
+ text: {
+ type: "custom",
+ component: markRaw(SpotlightRESTHistoryEntry),
+ componentProps: {
+ historyEntry: entry,
+ },
+ },
+ }
+ } else {
+ // Assume gql
+ const entry =
+ graphqlHistoryStore.value.state[parseInt(x.id.split("-")[1])]
+
+ return {
+ id: x.id,
+ icon: markRaw(IconHistory),
+ score: x.score,
+ text: {
+ type: "custom",
+ component: markRaw(SpotlightGQLHistoryEntry),
+ componentProps: {
+ historyEntry: entry,
+ },
+ },
+ }
+ }
+ })
+ },
+ { immediate: true }
+ )
+ })
+
+ const onSessionEnd = () => {
+ scopeHandle.stop()
+ stopWatchHandle()
+ minisearch.removeAll()
+ }
+
+ const resultObj = computed<SpotlightSearcherSessionState>(() => ({
+ loading: loading.value,
+ results: results.value,
+ }))
+
+ return [resultObj, onSessionEnd]
+ }
+
+ onResultSelect(result: SpotlightSearcherResult): void {
+ if (result.id === "clear-history") {
+ invokeAction("history.clear")
+ } else if (result.id.startsWith("rest")) {
+ const req =
+ restHistoryStore.value.state[parseInt(result.id.split("-")[1])].request
+
+ invokeAction("rest.request.open", {
+ doc: <HoppRESTDocument>{
+ request: req,
+ isDirty: false,
+ },
+ })
+ } else {
+ // Assume gql
+ const req =
+ graphqlHistoryStore.value.state[parseInt(result.id.split("-")[1])]
+ .request
+
+ invokeAction("gql.request.open", {
+ request: req,
+ })
+ }
+ }
+}
diff --git a/packages/hoppscotch-common/src/services/spotlight/searchers/user.searcher.ts b/packages/hoppscotch-common/src/services/spotlight/searchers/user.searcher.ts
new file mode 100644
index 000000000..cc92bdb4c
--- /dev/null
+++ b/packages/hoppscotch-common/src/services/spotlight/searchers/user.searcher.ts
@@ -0,0 +1,96 @@
+import { SpotlightSearcherResult, SpotlightService } from ".."
+import {
+ SearchResult,
+ StaticSpotlightSearcherService,
+} from "./base/static.searcher"
+import { getI18n } from "~/modules/i18n"
+import { Component, computed, markRaw, reactive } from "vue"
+import { useStreamStatic } from "~/composables/stream"
+import IconLogin from "~icons/lucide/log-in"
+import IconLogOut from "~icons/lucide/log-out"
+import { activeActions$, invokeAction } from "~/helpers/actions"
+
+type Doc = {
+ text: string
+ excludeFromSearch?: boolean
+ alternates: string[]
+ icon: object | Component
+}
+
+/**
+ * This searcher is responsible for providing user related actions on the spotlight results.
+ *
+ * NOTE: Initializing this service registers it as a searcher with the Spotlight Service.
+ */
+export class UserSpotlightSearcherService extends StaticSpotlightSearcherService<Doc> {
+ public static readonly ID = "USER_SPOTLIGHT_SEARCHER_SERVICE"
+
+ private t = getI18n()
+
+ public readonly searcherID = "user"
+ public searcherSectionTitle = this.t("spotlight.section.user")
+
+ private readonly spotlight = this.bind(SpotlightService)
+
+ private activeActions = useStreamStatic(activeActions$, [], () => {
+ /* noop */
+ })[0]
+
+ private hasLoginAction = computed(() =>
+ this.activeActions.value.includes("user.login")
+ )
+
+ private hasLogoutAction = computed(() =>
+ this.activeActions.value.includes("user.logout")
+ )
+
+ private documents: Record<string, Doc> = reactive({
+ login: {
+ text: this.t("auth.login"),
+ excludeFromSearch: computed(() => !this.hasLoginAction.value),
+ alternates: ["sign in", "log in"],
+ icon: markRaw(IconLogin),
+ },
+ logout: {
+ text: this.t("auth.logout"),
+ excludeFromSearch: computed(() => !this.hasLogoutAction.value),
+ alternates: ["sign out", "log out"],
+ icon: markRaw(IconLogOut),
+ },
+ })
+
+ constructor() {
+ super({
+ searchFields: ["text", "alternates"],
+ fieldWeights: {
+ text: 2,
+ alternates: 1,
+ },
+ })
+
+ this.setDocuments(this.documents)
+ this.spotlight.registerSearcher(this)
+ }
+
+ protected getSearcherResultForSearchResult(
+ result: SearchResult<Doc>
+ ): SpotlightSearcherResult {
+ return {
+ id: result.id,
+ icon: result.doc.icon,
+ text: { type: "text", text: result.doc.text },
+ score: result.score,
+ }
+ }
+
+ public onDocSelected(id: string): void {
+ switch (id) {
+ case "login":
+ invokeAction("user.login")
+ break
+ case "logout":
+ invokeAction("user.logout")
+ break
+ }
+ }
+}
diff --git a/packages/hoppscotch-common/vitest.config.ts b/packages/hoppscotch-common/vitest.config.ts
index 46c407882..95fa896b7 100644
--- a/packages/hoppscotch-common/vitest.config.ts
+++ b/packages/hoppscotch-common/vitest.config.ts
@@ -1,5 +1,8 @@
import { defineConfig } from "vitest/config"
import * as path from "path"
+import Icons from "unplugin-icons/vite"
+import { FileSystemIconLoader } from "unplugin-icons/loaders"
+import Vue from "@vitejs/plugin-vue"
export default defineConfig({
test: {
@@ -9,6 +12,23 @@ export default defineConfig({
resolve: {
alias: {
"~": path.resolve(__dirname, "../hoppscotch-common/src"),
+ "@composables": path.resolve(
+ __dirname,
+ "../hoppscotch-common/src/composables"
+ ),
},
},
+ plugins: [
+ Vue(),
+ Icons({
+ compiler: "vue3",
+ customCollections: {
+ hopp: FileSystemIconLoader("../hoppscotch-common/assets/icons"),
+ auth: FileSystemIconLoader("../hoppscotch-common/assets/icons/auth"),
+ brands: FileSystemIconLoader(
+ "../hoppscotch-common/assets/icons/brands"
+ ),
+ },
+ }) as any,
+ ],
})
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index d7c70278a..68d239dde 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -447,8 +447,8 @@ importers:
specifier: ^2.3.0
'@vueuse/core':
- specifier: ^8.7.5
- version: 8.7.5([email protected])
+ specifier: ^8.9.4
+ version: 8.9.4([email protected])
'@vueuse/head':
specifier: ^0.7.9
version: 0.7.9([email protected])
@@ -509,6 +509,9 @@ importers:
lossless-json:
specifier: ^2.0.8
version: 2.0.8
+ minisearch:
+ specifier: ^6.1.0
+ version: 6.1.0
nprogress:
specifier: ^0.2.0
version: 0.2.0
@@ -605,10 +608,10 @@ importers:
devDependencies:
'@esbuild-plugins/node-globals-polyfill':
specifier: ^0.1.1
- version: 0.1.1([email protected])
+ version: 0.1.1([email protected])
'@esbuild-plugins/node-modules-polyfill':
specifier: ^0.1.4
- version: 0.1.4([email protected])
+ version: 0.1.4([email protected])
'@graphql-codegen/add':
specifier: ^3.2.0
version: 3.2.0([email protected])
@@ -722,10 +725,10 @@ importers:
version: 4.7.4
unplugin-icons:
specifier: ^0.14.9
unplugin-vue-components:
specifier: ^0.21.0
vite:
specifier: ^3.1.4
@@ -962,10 +965,10 @@ importers:
version: 4.9.3
unplugin-icons:
specifier: ^0.14.9
unplugin-vue-components:
specifier: ^0.21.0
vite:
specifier: ^3.2.3
@@ -1064,13 +1067,13 @@ importers:
version: 6.3.7
ts-node-dev:
specifier: ^2.0.0
- version: 2.0.0(@types/[email protected])([email protected])
+ version: 2.0.0(@types/[email protected])([email protected])
unplugin-icons:
specifier: ^0.14.9
unplugin-vue-components:
specifier: ^0.21.0
vue:
specifier: ^3.2.6
version: 3.2.45
@@ -1086,7 +1089,7 @@ importers:
devDependencies:
'@graphql-codegen/cli':
specifier: 3.0.0
'@graphql-codegen/client-preset':
specifier: ^2.0.0
version: 2.1.0([email protected])
@@ -1128,7 +1131,7 @@ importers:
version: 1.58.0
ts-node:
specifier: ^10.9.1
- version: 10.9.1(@types/[email protected])([email protected])
+ version: 10.9.1(@types/[email protected])([email protected])
typescript:
specifier: ^4.9.3
version: 4.9.3
@@ -1228,10 +1231,10 @@ importers:
devDependencies:
'@esbuild-plugins/node-globals-polyfill':
specifier: ^0.1.1
- version: 0.1.1([email protected])
+ version: 0.1.1([email protected])
'@esbuild-plugins/node-modules-polyfill':
specifier: ^0.1.4
- version: 0.1.4([email protected])
+ version: 0.1.4([email protected])
'@histoire/plugin-vue':
specifier: ^0.12.4
@@ -1300,7 +1303,7 @@ importers:
version: 0.15.3(@vue/[email protected])
unplugin-vue-components:
specifier: ^0.21.0
vite:
specifier: ^3.2.3
@@ -1650,10 +1653,10 @@ packages:
dependencies:
'@babel/core': 7.18.6
'@babel/generator': 7.18.7
- '@babel/parser': 7.21.2
+ '@babel/parser': 7.22.5
'@babel/runtime': 7.18.6
'@babel/traverse': 7.18.6
- '@babel/types': 7.18.7
+ '@babel/types': 7.21.2
babel-preset-fbjs: 3.4.0(@babel/[email protected])
chalk: 4.1.2
fb-watchman: 2.0.1
@@ -1679,10 +1682,10 @@ packages:
dependencies:
'@babel/core': 7.18.6
'@babel/generator': 7.18.7
- '@babel/parser': 7.21.2
+ '@babel/parser': 7.22.5
'@babel/runtime': 7.18.6
'@babel/traverse': 7.18.6
- '@babel/types': 7.18.7
+ '@babel/types': 7.21.2
babel-preset-fbjs: 3.4.0(@babel/[email protected])
chalk: 4.1.2
fb-watchman: 2.0.1
@@ -1730,10 +1733,10 @@ packages:
'@babel/helper-compilation-targets': 7.18.6(@babel/[email protected])
'@babel/helper-module-transforms': 7.18.6
'@babel/helpers': 7.18.6
- '@babel/parser': 7.18.6
+ '@babel/parser': 7.22.5
'@babel/template': 7.18.6
'@babel/traverse': 7.18.6
- '@babel/types': 7.18.7
+ '@babel/types': 7.21.2
convert-source-map: 1.8.0
debug: 4.3.4([email protected])
gensync: 1.0.0-beta.2
@@ -1747,7 +1750,7 @@ packages:
resolution: {integrity: sha512-shck+7VLlY72a2w9c3zYWuE1pwOKEiQHV7GTUbSnhyl5eu3i04t30tBY82ZRWrDfo3gkakCFtevExnxbkf2a3A==}
engines: {node: '>=6.9.0'}
dependencies:
- '@babel/types': 7.18.7
+ '@babel/types': 7.21.2
'@jridgewell/gen-mapping': 0.3.2
jsesc: 2.5.2
dev: true
@@ -1854,14 +1857,14 @@ packages:
engines: {node: '>=6.9.0'}
dependencies:
'@babel/template': 7.18.6
- '@babel/types': 7.18.7
+ '@babel/types': 7.21.2
dev: true
resolution: {integrity: sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q==}
engines: {node: '>=6.9.0'}
dependencies:
- '@babel/types': 7.18.7
+ '@babel/types': 7.21.2
dev: true
@@ -1886,10 +1889,10 @@ packages:
'@babel/helper-module-imports': 7.18.6
'@babel/helper-simple-access': 7.18.6
'@babel/helper-split-export-declaration': 7.18.6
- '@babel/helper-validator-identifier': 7.18.6
+ '@babel/helper-validator-identifier': 7.19.1
'@babel/template': 7.18.6
'@babel/traverse': 7.18.6
- '@babel/types': 7.18.7
+ '@babel/types': 7.21.2
transitivePeerDependencies:
- supports-color
dev: true
@@ -1957,17 +1960,13 @@ packages:
resolution: {integrity: sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA==}
engines: {node: '>=6.9.0'}
dependencies:
- '@babel/types': 7.18.7
+ '@babel/types': 7.21.2
dev: true
resolution: {integrity: sha512-nHtDoQcuqFmwYNYPz3Rah5ph2p8PFeFCsZk9A/48dPc/rGocJ5J3hAAZ7pb76VWX3fZKu+uEr/FhH5jLx7umrw==}
engines: {node: '>=6.9.0'}
- resolution: {integrity: sha512-MmetCkz9ej86nJQV+sFCxoGGrUbU3q02kgLciwkrt9QqEB7cP39oKEY0PakknEO0Gu20SskMRi+AYZ3b1TpN9g==}
- engines: {node: '>=6.9.0'}
-
resolution: {integrity: sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w==}
engines: {node: '>=6.9.0'}
@@ -1995,7 +1994,7 @@ packages:
dependencies:
'@babel/template': 7.18.6
'@babel/traverse': 7.18.6
- '@babel/types': 7.18.7
+ '@babel/types': 7.21.2
transitivePeerDependencies:
- supports-color
dev: true
@@ -2004,7 +2003,7 @@ packages:
resolution: {integrity: sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==}
engines: {node: '>=6.9.0'}
dependencies:
- '@babel/helper-validator-identifier': 7.18.6
+ '@babel/helper-validator-identifier': 7.19.1
chalk: 2.4.2
js-tokens: 4.0.0
@@ -2023,8 +2022,8 @@ packages:
'@babel/types': 7.20.7
dev: true
- resolution: {integrity: sha512-URpaIJQwEkEC2T9Kn+Ai6Xe/02iNaVCuT/PtoRz3GPVJVDpPd7mLo+VddTbhCRU9TXqW5mSrQfXZyi8kDKOVpQ==}
+ resolution: {integrity: sha512-DFZMC9LJUG9PLOclRC32G63UXwzqS2koQC8dkx+PLdmt1xSePYpbT/NbsrJy8Q/muXz7o/h/d4A7Fuyixm559Q==}
engines: {node: '>=6.0.0'}
hasBin: true
dependencies:
@@ -2724,7 +2723,7 @@ packages:
'@babel/helper-module-imports': 7.18.6
'@babel/helper-plugin-utils': 7.18.6
'@babel/plugin-syntax-jsx': 7.18.6(@babel/[email protected])
- '@babel/types': 7.18.7
+ '@babel/types': 7.21.2
dev: true
@@ -2934,8 +2933,8 @@ packages:
engines: {node: '>=6.9.0'}
dependencies:
'@babel/code-frame': 7.18.6
- '@babel/parser': 7.21.2
- '@babel/types': 7.18.7
+ '@babel/parser': 7.22.5
+ '@babel/types': 7.21.2
dev: true
@@ -2957,8 +2956,8 @@ packages:
'@babel/helper-function-name': 7.18.6
'@babel/helper-hoist-variables': 7.18.6
'@babel/helper-split-export-declaration': 7.18.6
- '@babel/parser': 7.21.2
- '@babel/types': 7.18.7
+ '@babel/parser': 7.22.5
+ '@babel/types': 7.21.2
debug: 4.3.4([email protected])
globals: 11.12.0
transitivePeerDependencies:
@@ -2969,7 +2968,7 @@ packages:
resolution: {integrity: sha512-QG3yxTcTIBoAcQmkCs+wAPYZhu7Dk9rXKacINfNbdJDNERTbLQbHGyVG8q/YGMPeCJRIhSY0+fTc5+xuh6WPSQ==}
engines: {node: '>=6.9.0'}
dependencies:
- '@babel/helper-validator-identifier': 7.18.6
+ '@babel/helper-validator-identifier': 7.19.1
to-fast-properties: 2.0.0
@@ -3216,10 +3215,10 @@ packages:
'@commitlint/execute-rule': 16.2.1
'@commitlint/resolve-extends': 16.2.1
'@commitlint/types': 16.2.1
- '@types/node': 17.0.45
+ '@types/node': 18.16.17
chalk: 4.1.2
cosmiconfig: 7.0.1
- cosmiconfig-typescript-loader: 2.0.2(@types/[email protected])([email protected])([email protected])
+ cosmiconfig-typescript-loader: 2.0.2(@types/[email protected])([email protected])([email protected])
lodash: 4.17.21
resolve-from: 5.0.0
typescript: 4.9.4
@@ -3359,20 +3358,20 @@ packages:
- typescript
dev: true
resolution: {integrity: sha512-MR0oAA+mlnJWrt1RQVQ+4VYuRJW/P2YmRTv1AsplObyvuBMnPHiizUF95HHYiSsMGLhyGtWufaq2XQg6+iurBg==}
peerDependencies:
esbuild: '*'
dependencies:
- esbuild: 0.16.17
+ esbuild: 0.17.19
dev: true
resolution: {integrity: sha512-uZbcXi0zbmKC/050p3gJnne5Qdzw8vkXIv+c2BW0Lsc1ji1SkrxbKPUy5Efr0blbTu1SL8w4eyfpnSdPg3G0Qg==}
peerDependencies:
esbuild: '*'
dependencies:
- esbuild: 0.16.17
+ esbuild: 0.17.19
escape-string-regexp: 4.0.0
rollup-plugin-node-polyfills: 0.2.1
dev: true
@@ -3383,6 +3382,15 @@ packages:
cpu: [arm64]
os: [android]
requiresBuild: true
+ dev: true
+ optional: true
+
+ /@esbuild/[email protected]:
+ resolution: {integrity: sha512-KBMWvEZooR7+kzY0BtbTQn0OAYY7CsiydT63pVEaPtVYF0hXbUaOyZog37DKxK7NF3XacBJOpYT4adIJh+avxA==}
+ engines: {node: '>=12'}
+ cpu: [arm64]
+ os: [android]
+ requiresBuild: true
optional: true
/@esbuild/[email protected]:
@@ -3399,6 +3407,15 @@ packages:
cpu: [arm]
os: [android]
requiresBuild: true
+ dev: true
+ optional: true
+
+ /@esbuild/[email protected]:
+ resolution: {integrity: sha512-rIKddzqhmav7MSmoFCmDIb6e2W57geRsM94gV2l38fzhXMwq7hZoClug9USI2pFRGL06f4IOPHHpFNOkWieR8A==}
+ engines: {node: '>=12'}
+ cpu: [arm]
+ os: [android]
+ requiresBuild: true
optional: true
/@esbuild/[email protected]:
@@ -3407,6 +3424,15 @@ packages:
cpu: [x64]
os: [android]
requiresBuild: true
+ dev: true
+ optional: true
+
+ /@esbuild/[email protected]:
+ resolution: {integrity: sha512-uUTTc4xGNDT7YSArp/zbtmbhO0uEEK9/ETW29Wk1thYUJBz3IVnvgEiEwEa9IeLyvnpKrWK64Utw2bgUmDveww==}
+ engines: {node: '>=12'}
+ cpu: [x64]
+ os: [android]
+ requiresBuild: true
optional: true
/@esbuild/[email protected]:
@@ -3415,6 +3441,15 @@ packages:
cpu: [arm64]
os: [darwin]
requiresBuild: true
+ dev: true
+ optional: true
+
+ /@esbuild/[email protected]:
+ resolution: {integrity: sha512-80wEoCfF/hFKM6WE1FyBHc9SfUblloAWx6FJkFWTWiCoht9Mc0ARGEM47e67W9rI09YoUxJL68WHfDRYEAvOhg==}
+ engines: {node: '>=12'}
+ cpu: [arm64]
+ os: [darwin]
+ requiresBuild: true
optional: true
/@esbuild/[email protected]:
@@ -3423,6 +3458,15 @@ packages:
cpu: [x64]
os: [darwin]
requiresBuild: true
+ dev: true
+ optional: true
+
+ /@esbuild/[email protected]:
+ resolution: {integrity: sha512-IJM4JJsLhRYr9xdtLytPLSH9k/oxR3boaUIYiHkAawtwNOXKE8KoU8tMvryogdcT8AU+Bflmh81Xn6Q0vTZbQw==}
+ engines: {node: '>=12'}
+ cpu: [x64]
+ os: [darwin]
+ requiresBuild: true
optional: true
/@esbuild/[email protected]:
@@ -3431,6 +3475,15 @@ packages:
cpu: [arm64]
os: [freebsd]
requiresBuild: true
+ dev: true
+ optional: true
+
+ /@esbuild/[email protected]:
+ resolution: {integrity: sha512-pBwbc7DufluUeGdjSU5Si+P3SoMF5DQ/F/UmTSb8HXO80ZEAJmrykPyzo1IfNbAoaqw48YRpv8shwd1NoI0jcQ==}
+ engines: {node: '>=12'}
+ cpu: [arm64]
+ os: [freebsd]
+ requiresBuild: true
optional: true
/@esbuild/[email protected]:
@@ -3439,6 +3492,15 @@ packages:
cpu: [x64]
os: [freebsd]
requiresBuild: true
+ dev: true
+ optional: true
+
+ /@esbuild/[email protected]:
+ resolution: {integrity: sha512-4lu+n8Wk0XlajEhbEffdy2xy53dpR06SlzvhGByyg36qJw6Kpfk7cp45DR/62aPH9mtJRmIyrXAS5UWBrJT6TQ==}
+ engines: {node: '>=12'}
+ cpu: [x64]
+ os: [freebsd]
+ requiresBuild: true
optional: true
/@esbuild/[email protected]:
@@ -3447,6 +3509,15 @@ packages:
cpu: [arm64]
os: [linux]
requiresBuild: true
+ dev: true
+ optional: true
+
+ /@esbuild/[email protected]:
+ resolution: {integrity: sha512-ct1Tg3WGwd3P+oZYqic+YZF4snNl2bsnMKRkb3ozHmnM0dGWuxcPTTntAF6bOP0Sp4x0PjSF+4uHQ1xvxfRKqg==}
+ engines: {node: '>=12'}
+ cpu: [arm64]
+ os: [linux]
+ requiresBuild: true
optional: true
/@esbuild/[email protected]:
@@ -3455,6 +3526,15 @@ packages:
cpu: [arm]
os: [linux]
requiresBuild: true
+ dev: true
+ optional: true
+
+ /@esbuild/[email protected]:
+ resolution: {integrity: sha512-cdmT3KxjlOQ/gZ2cjfrQOtmhG4HJs6hhvm3mWSRDPtZ/lP5oe8FWceS10JaSJC13GBd4eH/haHnqf7hhGNLerA==}
+ engines: {node: '>=12'}
+ cpu: [arm]
+ os: [linux]
+ requiresBuild: true
optional: true
/@esbuild/[email protected]:
@@ -3463,6 +3543,15 @@ packages:
cpu: [ia32]
os: [linux]
requiresBuild: true
+ dev: true
+ optional: true
+
+ /@esbuild/[email protected]:
+ resolution: {integrity: sha512-w4IRhSy1VbsNxHRQpeGCHEmibqdTUx61Vc38APcsRbuVgK0OPEnQ0YD39Brymn96mOx48Y2laBQGqgZ0j9w6SQ==}
+ engines: {node: '>=12'}
+ cpu: [ia32]
+ os: [linux]
+ requiresBuild: true
optional: true
/@esbuild/[email protected]:
@@ -3487,6 +3576,15 @@ packages:
cpu: [loong64]
os: [linux]
requiresBuild: true
+ dev: true
+ optional: true
+
+ /@esbuild/[email protected]:
+ resolution: {integrity: sha512-2iAngUbBPMq439a+z//gE+9WBldoMp1s5GWsUSgqHLzLJ9WoZLZhpwWuym0u0u/4XmZ3gpHmzV84PonE+9IIdQ==}
+ engines: {node: '>=12'}
+ cpu: [loong64]
+ os: [linux]
+ requiresBuild: true
optional: true
/@esbuild/[email protected]:
@@ -3495,6 +3593,15 @@ packages:
cpu: [mips64el]
os: [linux]
requiresBuild: true
+ dev: true
+ optional: true
+
+ /@esbuild/[email protected]:
+ resolution: {integrity: sha512-LKJltc4LVdMKHsrFe4MGNPp0hqDFA1Wpt3jE1gEyM3nKUvOiO//9PheZZHfYRfYl6AwdTH4aTcXSqBerX0ml4A==}
+ engines: {node: '>=12'}
+ cpu: [mips64el]
+ os: [linux]
+ requiresBuild: true
optional: true
/@esbuild/[email protected]:
@@ -3503,6 +3610,15 @@ packages:
cpu: [ppc64]
os: [linux]
requiresBuild: true
+ dev: true
+ optional: true
+
+ /@esbuild/[email protected]:
+ resolution: {integrity: sha512-/c/DGybs95WXNS8y3Ti/ytqETiW7EU44MEKuCAcpPto3YjQbyK3IQVKfF6nbghD7EcLUGl0NbiL5Rt5DMhn5tg==}
+ engines: {node: '>=12'}
+ cpu: [ppc64]
+ os: [linux]
+ requiresBuild: true
optional: true
/@esbuild/[email protected]:
@@ -3511,6 +3627,15 @@ packages:
cpu: [riscv64]
os: [linux]
requiresBuild: true
+ dev: true
+ optional: true
+
+ /@esbuild/[email protected]:
+ resolution: {integrity: sha512-FC3nUAWhvFoutlhAkgHf8f5HwFWUL6bYdvLc/TTuxKlvLi3+pPzdZiFKSWz/PF30TB1K19SuCxDTI5KcqASJqA==}
+ engines: {node: '>=12'}
+ cpu: [riscv64]
+ os: [linux]
+ requiresBuild: true
optional: true
/@esbuild/[email protected]:
@@ -3519,6 +3644,15 @@ packages:
cpu: [s390x]
os: [linux]
requiresBuild: true
+ dev: true
+ optional: true
+
+ /@esbuild/[email protected]:
+ resolution: {integrity: sha512-IbFsFbxMWLuKEbH+7sTkKzL6NJmG2vRyy6K7JJo55w+8xDk7RElYn6xvXtDW8HCfoKBFK69f3pgBJSUSQPr+4Q==}
+ engines: {node: '>=12'}
+ cpu: [s390x]
+ os: [linux]
+ requiresBuild: true
optional: true
/@esbuild/[email protected]:
@@ -3527,6 +3661,15 @@ packages:
cpu: [x64]
os: [linux]
requiresBuild: true
+ dev: true
+ optional: true
+
+ /@esbuild/[email protected]:
+ resolution: {integrity: sha512-68ngA9lg2H6zkZcyp22tsVt38mlhWde8l3eJLWkyLrp4HwMUr3c1s/M2t7+kHIhvMjglIBrFpncX1SzMckomGw==}
+ engines: {node: '>=12'}
+ cpu: [x64]
+ os: [linux]
+ requiresBuild: true
optional: true
/@esbuild/[email protected]:
@@ -3535,6 +3678,15 @@ packages:
cpu: [x64]
os: [netbsd]
requiresBuild: true
+ dev: true
+ optional: true
+
+ /@esbuild/[email protected]:
+ resolution: {integrity: sha512-CwFq42rXCR8TYIjIfpXCbRX0rp1jo6cPIUPSaWwzbVI4aOfX96OXY8M6KNmtPcg7QjYeDmN+DD0Wp3LaBOLf4Q==}
+ engines: {node: '>=12'}
+ cpu: [x64]
+ os: [netbsd]
+ requiresBuild: true
optional: true
/@esbuild/[email protected]:
@@ -3543,6 +3695,15 @@ packages:
cpu: [x64]
os: [openbsd]
requiresBuild: true
+ dev: true
+ optional: true
+
+ /@esbuild/[email protected]:
+ resolution: {integrity: sha512-cnq5brJYrSZ2CF6c35eCmviIN3k3RczmHz8eYaVlNasVqsNY+JKohZU5MKmaOI+KkllCdzOKKdPs762VCPC20g==}
+ engines: {node: '>=12'}
+ cpu: [x64]
+ os: [openbsd]
+ requiresBuild: true
optional: true
/@esbuild/[email protected]:
@@ -3551,6 +3712,15 @@ packages:
cpu: [x64]
os: [sunos]
requiresBuild: true
+ dev: true
+ optional: true
+
+ /@esbuild/[email protected]:
+ resolution: {integrity: sha512-vCRT7yP3zX+bKWFeP/zdS6SqdWB8OIpaRq/mbXQxTGHnIxspRtigpkUcDMlSCOejlHowLqII7K2JKevwyRP2rg==}
+ engines: {node: '>=12'}
+ cpu: [x64]
+ os: [sunos]
+ requiresBuild: true
optional: true
/@esbuild/[email protected]:
@@ -3559,6 +3729,15 @@ packages:
cpu: [arm64]
os: [win32]
requiresBuild: true
+ dev: true
+ optional: true
+
+ /@esbuild/[email protected]:
+ resolution: {integrity: sha512-yYx+8jwowUstVdorcMdNlzklLYhPxjniHWFKgRqH7IFlUEa0Umu3KuYplf1HUZZ422e3NU9F4LGb+4O0Kdcaag==}
+ engines: {node: '>=12'}
+ cpu: [arm64]
+ os: [win32]
+ requiresBuild: true
optional: true
/@esbuild/[email protected]:
@@ -3567,6 +3746,15 @@ packages:
cpu: [ia32]
os: [win32]
requiresBuild: true
+ dev: true
+ optional: true
+
+ /@esbuild/[email protected]:
+ resolution: {integrity: sha512-eggDKanJszUtCdlVs0RB+h35wNlb5v4TWEkq4vZcmVt5u/HiDZrTXe2bWFQUez3RgNHwx/x4sk5++4NSSicKkw==}
+ engines: {node: '>=12'}
+ cpu: [ia32]
+ os: [win32]
+ requiresBuild: true
optional: true
/@esbuild/[email protected]:
@@ -3575,6 +3763,15 @@ packages:
cpu: [x64]
os: [win32]
requiresBuild: true
+ dev: true
+ optional: true
+
+ /@esbuild/[email protected]:
+ resolution: {integrity: sha512-lAhycmKnVOuRYNtRtatQR1LPQf2oYCkRGkSFnseDAKPl8lu5SOsK/e1sXe5a0Pc5kHIHe6P2I/ilntNv2xf3cA==}
+ engines: {node: '>=12'}
+ cpu: [x64]
+ os: [win32]
+ requiresBuild: true
optional: true
@@ -3583,7 +3780,7 @@ packages:
dependencies:
ajv: 6.12.6
debug: 4.3.4([email protected])
- espree: 9.4.0
+ espree: 9.5.2
globals: 13.16.0
ignore: 5.2.0
import-fresh: 3.3.0
@@ -4196,7 +4393,7 @@ packages:
- utf-8-validate
dev: true
resolution: {integrity: sha512-16nuFabHCfPQ/d+v52OvR1ueL8eiJvS/nRuvuEV8d9T1fkborHKRw4lhyKVebu9izFBs6G0CvVCLhgVzQwHSLw==}
hasBin: true
peerDependencies:
@@ -4207,25 +4404,25 @@ packages:
'@babel/types': 7.20.7
'@graphql-codegen/core': 3.1.0([email protected])
'@graphql-codegen/plugin-helpers': 4.0.0([email protected])
- '@graphql-tools/apollo-engine-loader': 7.3.26(@types/[email protected])([email protected])
+ '@graphql-tools/apollo-engine-loader': 7.3.26(@types/[email protected])([email protected])
'@graphql-tools/code-file-loader': 7.3.21(@babel/[email protected])([email protected])
'@graphql-tools/git-loader': 7.2.20(@babel/[email protected])([email protected])
- '@graphql-tools/github-loader': 7.3.27(@babel/[email protected])(@types/[email protected])([email protected])
+ '@graphql-tools/github-loader': 7.3.27(@babel/[email protected])(@types/[email protected])([email protected])
'@graphql-tools/graphql-file-loader': 7.5.16([email protected])
'@graphql-tools/json-file-loader': 7.4.17([email protected])
'@graphql-tools/load': 7.8.12([email protected])
- '@graphql-tools/prisma-loader': 7.2.64(@types/[email protected])([email protected])
- '@graphql-tools/url-loader': 7.17.13(@types/[email protected])([email protected])
+ '@graphql-tools/prisma-loader': 7.2.64(@types/[email protected])([email protected])
+ '@graphql-tools/url-loader': 7.17.13(@types/[email protected])([email protected])
'@graphql-tools/utils': 9.1.1([email protected])
- '@whatwg-node/fetch': 0.6.9(@types/[email protected])
+ '@whatwg-node/fetch': 0.6.9(@types/[email protected])
chalk: 4.1.2
chokidar: 3.5.3
cosmiconfig: 7.0.1
- cosmiconfig-typescript-loader: 4.3.0(@types/[email protected])([email protected])([email protected])([email protected])
+ cosmiconfig-typescript-loader: 4.3.0(@types/[email protected])([email protected])([email protected])([email protected])
debounce: 1.2.1
detect-indent: 6.1.0
graphql: 16.6.0
- graphql-config: 4.4.1(@types/[email protected])([email protected])([email protected])
+ graphql-config: 4.4.1(@types/[email protected])([email protected])([email protected])
inquirer: 8.2.4
is-glob: 4.0.3
json-to-pretty-yaml: 1.2.2
@@ -4234,7 +4431,7 @@ packages:
shell-quote: 1.7.3
string-env-interpolation: 1.0.1
ts-log: 2.2.4
- ts-node: 10.9.1(@types/[email protected])([email protected])
+ ts-node: 10.9.1(@types/[email protected])([email protected])
tslib: 2.4.1
yaml: 1.10.2
yargs: 17.5.1
@@ -4721,14 +4918,14 @@ packages:
- encoding
dev: true
resolution: {integrity: sha512-h1vfhdJFjnCYn9b5EY1Z91JTF0KB3hHVJNQIsiUV2mpQXZdeOXQoaWeYEKaiI5R6kwBw5PP9B0fv3jfUIG8LyQ==}
peerDependencies:
graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0
dependencies:
'@ardatan/sync-fetch': 0.0.1
'@graphql-tools/utils': 9.2.1([email protected])
- '@whatwg-node/fetch': 0.8.1(@types/[email protected])
+ '@whatwg-node/fetch': 0.8.1(@types/[email protected])
graphql: 16.6.0
tslib: 2.5.0
transitivePeerDependencies:
@@ -4846,18 +5043,18 @@ packages:
- utf-8-validate
dev: true
resolution: {integrity: sha512-tNzMt5qc1ptlHKfpSv9wVBVKCZ7gks6Yb/JcYJluxZIT4qRV+TtOFjpptfBU63usgrGVOVcGjzWc/mt7KhmmpQ==}
peerDependencies:
graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0
dependencies:
'@graphql-tools/utils': 9.2.1([email protected])
'@repeaterjs/repeater': 3.0.4
- '@whatwg-node/fetch': 0.8.1(@types/[email protected])
+ '@whatwg-node/fetch': 0.8.1(@types/[email protected])
dset: 3.1.2
extract-files: 11.0.0
graphql: 16.6.0
- meros: 1.2.1(@types/[email protected])
+ meros: 1.2.1(@types/[email protected])
tslib: 2.5.0
value-or-promise: 1.0.12
transitivePeerDependencies:
@@ -4942,7 +5139,7 @@ packages:
- supports-color
dev: true
resolution: {integrity: sha512-fFFC35qenyhjb8pfcYXKknAt0CXP5CkQYtLfJXgTXSgBjIsfAVMrqxQ/Y0ejeM19XNF/C3VWJ7rE308yOX6ywA==}
peerDependencies:
graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0
@@ -4950,7 +5147,7 @@ packages:
'@ardatan/sync-fetch': 0.0.1
'@graphql-tools/graphql-tag-pluck': 7.5.0(@babel/[email protected])([email protected])
'@graphql-tools/utils': 9.2.1([email protected])
- '@whatwg-node/fetch': 0.8.1(@types/[email protected])
+ '@whatwg-node/fetch': 0.8.1(@types/[email protected])
graphql: 16.6.0
tslib: 2.5.0
transitivePeerDependencies:
@@ -4990,9 +5187,9 @@ packages:
peerDependencies:
graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0
dependencies:
- '@babel/parser': 7.18.6
+ '@babel/parser': 7.22.5
'@babel/traverse': 7.18.6
- '@babel/types': 7.18.7
+ '@babel/types': 7.21.2
'@graphql-tools/utils': 8.8.0([email protected])
graphql: 15.8.0
tslib: 2.5.0
@@ -5005,7 +5202,7 @@ packages:
peerDependencies:
graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0
dependencies:
- '@babel/parser': 7.20.15
+ '@babel/parser': 7.22.5
'@babel/plugin-syntax-import-assertions': 7.20.0(@babel/[email protected])
'@babel/traverse': 7.18.6
'@babel/types': 7.21.2
@@ -5187,12 +5384,12 @@ packages:
- utf-8-validate
dev: true
resolution: {integrity: sha512-W8GfzfBKiBSIEgw+/nJk6zUlF6k/jterlNoFhM27mBsbeMtWxKnm1+gEU6KA0N1PNEdq2RIa2W4AfVfVBl2GgQ==}
peerDependencies:
graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0
dependencies:
- '@graphql-tools/url-loader': 7.17.13(@types/[email protected])([email protected])
+ '@graphql-tools/url-loader': 7.17.13(@types/[email protected])([email protected])
'@graphql-tools/utils': 9.2.1([email protected])
'@types/js-yaml': 4.0.5
'@types/json-stable-stringify': 1.0.34
@@ -5310,19 +5507,19 @@ packages:
extract-files: 11.0.0
graphql: 15.8.0
graphql-ws: 5.9.1([email protected])
- isomorphic-ws: 5.0.0([email protected])
+ isomorphic-ws: 5.0.0([email protected])
meros: 1.2.0(@types/[email protected])
sync-fetch: 0.4.1
tslib: 2.5.0
value-or-promise: 1.0.11
- ws: 8.12.1
+ ws: 8.13.0
transitivePeerDependencies:
- '@types/node'
- bufferutil
- encoding
- utf-8-validate
resolution: {integrity: sha512-FEmbvw68kxeZLn4VYGAl+NuBPk09ZnxymjW07A6mCtiDayFgYfHdWeRzXn/iM5PzsEuCD73R1sExtNQ/ISiajg==}
peerDependencies:
graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0
@@ -5330,17 +5527,17 @@ packages:
'@ardatan/sync-fetch': 0.0.1
'@graphql-tools/delegate': 9.0.28([email protected])
'@graphql-tools/executor-graphql-ws': 0.0.11([email protected])
- '@graphql-tools/executor-http': 0.1.9(@types/[email protected])([email protected])
+ '@graphql-tools/executor-http': 0.1.9(@types/[email protected])([email protected])
'@graphql-tools/executor-legacy-ws': 0.0.9([email protected])
'@graphql-tools/utils': 9.2.1([email protected])
'@graphql-tools/wrap': 9.3.7([email protected])
'@types/ws': 8.5.3
- '@whatwg-node/fetch': 0.8.1(@types/[email protected])
+ '@whatwg-node/fetch': 0.8.1(@types/[email protected])
graphql: 16.6.0
- isomorphic-ws: 5.0.0([email protected])
+ isomorphic-ws: 5.0.0([email protected])
tslib: 2.5.0
value-or-promise: 1.0.11
- ws: 8.12.1
+ ws: 8.13.0
transitivePeerDependencies:
- '@types/node'
- bufferutil
@@ -5454,7 +5651,7 @@ packages:
engines: {node: ^8.13.0 || >=10.10.0}
dependencies:
'@grpc/proto-loader': 0.6.13
- '@types/node': 18.11.10
+ '@types/node': 18.16.17
dev: false
@@ -5639,16 +5836,16 @@ packages:
vue-i18n:
optional: true
dependencies:
- '@intlify/message-compiler': 9.3.0-beta.19
- '@intlify/shared': 9.3.0-beta.19
+ '@intlify/message-compiler': 9.3.0-beta.24
+ '@intlify/shared': 9.3.0-beta.24
jsonc-eslint-parser: 1.4.1
source-map: 0.6.1
vue-i18n: 9.2.2([email protected])
yaml-eslint-parser: 0.3.2
dev: true
- /@intlify/[email protected]:
- resolution: {integrity: sha512-c8nTDgsTrBqVk3LPoF/YEarqeqcW0XAY5Y0UmFl5VKWKRNQh47jzvHRDmeRWhos5bUw1zIdiTixrs99FMJ9j5g==}
+ /@intlify/[email protected]:
+ resolution: {integrity: sha512-+/RBsYWbiZcs97RyVb4mrsSrLmIMaI6evj30jI9f1psjXx+syRbf0ab63I5SIz290EOm6TE80fTst/Xjel+D9w==}
engines: {node: '>= 14.16'}
peerDependencies:
petite-vue-i18n: '*'
@@ -5659,8 +5856,8 @@ packages:
vue-i18n:
optional: true
dependencies:
- '@intlify/message-compiler': 9.3.0-beta.17
- '@intlify/shared': 9.3.0-beta.17
+ '@intlify/message-compiler': 9.3.0-beta.20
+ '@intlify/shared': 9.3.0-beta.20
acorn: 8.8.2
escodegen: 2.0.0
estree-walker: 2.0.2
@@ -5693,33 +5890,33 @@ packages:
'@intlify/shared': 9.2.2
source-map: 0.6.1
- /@intlify/[email protected]:
- resolution: {integrity: sha512-i7hvVIRk1Ax2uKa9xLRJCT57to08OhFMhFXXjWN07rmx5pWQYQ23MfX1xgggv9drnWTNhqEiD+u4EJeHoS5+Ww==}
- engines: {node: '>= 14'}
+ /@intlify/[email protected]:
+ resolution: {integrity: sha512-hwqQXyTnDzAVZ300SU31jO0+3OJbpOdfVU6iBkrmNpS7t2HRnVACo0EwcEXzJa++4EVDreqz5OeqJbt+PeSGGA==}
+ engines: {node: '>= 16'}
dependencies:
- '@intlify/shared': 9.3.0-beta.17
- source-map: 0.6.1
+ '@intlify/shared': 9.3.0-beta.20
+ source-map-js: 1.0.2
dev: true
- /@intlify/[email protected]:
- resolution: {integrity: sha512-5RBn5tMOsWh5FqM65IfEJvfpRS8R0lHEUVNDa2rNc9Y7oGEI7swezlbFqU9Kc5FyHy5Kx2jHtdgFIipDwnIYFQ==}
+ /@intlify/[email protected]:
+ resolution: {integrity: sha512-prhHATkgp0mpPqoVgiAtLmUc1JMvs8fMH6w53AVEBn+VF87dLhzanfmWY5FoZWORG51ag54gBDBOoM/VFv3m3A==}
engines: {node: '>= 16'}
dependencies:
- '@intlify/shared': 9.3.0-beta.19
- source-map: 0.6.1
+ '@intlify/shared': 9.3.0-beta.24
+ source-map-js: 1.0.2
dev: true
/@intlify/[email protected]:
resolution: {integrity: sha512-wRwTpsslgZS5HNyM7uDQYZtxnbI12aGiBZURX3BTR9RFIKKRWpllTsgzHWvj3HKm3Y2Sh5LPC1r0PDCKEhVn9Q==}
engines: {node: '>= 14'}
- /@intlify/[email protected]:
- resolution: {integrity: sha512-mscf7RQsUTOil35jTij4KGW1RC9SWQjYScwLxP53Ns6g24iEd5HN7ksbt9O6FvTmlQuX77u+MXpBdfJsGqizLQ==}
- engines: {node: '>= 14'}
+ /@intlify/[email protected]:
+ resolution: {integrity: sha512-RucSPqh8O9FFxlYUysQTerSw0b9HIRpyoN1Zjogpm0qLiHK+lBNSa5sh1nCJ4wSsNcjphzgpLQCyR60GZlRV8g==}
+ engines: {node: '>= 16'}
dev: true
- /@intlify/[email protected]:
- resolution: {integrity: sha512-+lhQggrLvlQ/O5OmIYAc9gadcYXMoaDi0Doef+X/f6TLZFr9PTMjOpBWmpwNNHi026e54jckntUn6GzqDtIN4w==}
+ /@intlify/[email protected]:
+ resolution: {integrity: sha512-AKxJ8s7eKIQWkNaf4wyyoLRwf4puCuQgjSChlDJm5JBEt6T8HGgnYTJLRXu6LD/JACn3Qwu6hM/XRX1c9yvjmQ==}
engines: {node: '>= 16'}
dev: true
@@ -5738,8 +5935,8 @@ packages:
vue-i18n:
optional: true
dependencies:
- '@intlify/bundle-utils': 6.0.0
- '@intlify/shared': 9.3.0-beta.19
+ '@intlify/bundle-utils': 7.0.0
+ '@intlify/shared': 9.3.0-beta.24
'@rollup/pluginutils': 4.2.1
debug: 4.3.4([email protected])
fast-glob: 3.2.11
@@ -5766,7 +5963,7 @@ packages:
optional: true
dependencies:
'@intlify/bundle-utils': 3.4.0([email protected])
- '@intlify/shared': 9.3.0-beta.19
+ '@intlify/shared': 9.3.0-beta.24
'@rollup/pluginutils': 4.2.1
debug: 4.3.4([email protected])
fast-glob: 3.2.12
@@ -5794,7 +5991,7 @@ packages:
optional: true
dependencies:
'@intlify/bundle-utils': 3.4.0([email protected])
- '@intlify/shared': 9.3.0-beta.17
+ '@intlify/shared': 9.3.0-beta.24
'@rollup/pluginutils': 4.2.1
debug: 4.3.4([email protected])
fast-glob: 3.2.12
@@ -5838,7 +6035,7 @@ packages:
engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0}
dependencies:
'@jest/types': 27.5.1
- '@types/node': 18.11.10
+ '@types/node': 18.16.17
chalk: 4.1.2
jest-message-util: 27.5.1
jest-util: 27.5.1
@@ -5850,7 +6047,7 @@ packages:
engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0}
dependencies:
'@jest/types': 29.5.0
- '@types/node': 18.11.10
+ '@types/node': 18.16.17
chalk: 4.1.2
jest-message-util: 29.5.0
jest-util: 29.5.0
@@ -5871,7 +6068,7 @@ packages:
'@jest/test-result': 27.5.1
'@jest/transform': 27.5.1
'@jest/types': 27.5.1
- '@types/node': 17.0.45
+ '@types/node': 18.16.17
ansi-escapes: 4.3.2
chalk: 4.1.2
emittery: 0.8.1
@@ -5916,14 +6113,14 @@ packages:
'@jest/test-result': 29.4.1
'@jest/transform': 29.4.1
'@jest/types': 29.4.1
- '@types/node': 18.11.10
+ '@types/node': 18.16.17
ansi-escapes: 4.3.2
chalk: 4.1.2
ci-info: 3.3.2
exit: 0.1.2
graceful-fs: 4.2.10
jest-changed-files: 29.4.0
- jest-config: 29.4.1(@types/[email protected])([email protected])
+ jest-config: 29.4.1(@types/[email protected])([email protected])
jest-haste-map: 29.4.1
jest-message-util: 29.4.1
jest-regex-util: 29.2.0
@@ -5950,7 +6147,7 @@ packages:
dependencies:
'@jest/fake-timers': 27.5.1
'@jest/types': 27.5.1
- '@types/node': 18.11.10
+ '@types/node': 18.16.17
jest-mock: 27.5.1
dev: true
@@ -5960,7 +6157,7 @@ packages:
dependencies:
'@jest/fake-timers': 29.4.1
'@jest/types': 29.5.0
- '@types/node': 18.11.10
+ '@types/node': 18.16.17
jest-mock: 29.4.1
dev: true
@@ -6001,7 +6198,7 @@ packages:
dependencies:
'@jest/types': 27.5.1
'@sinonjs/fake-timers': 8.1.0
- '@types/node': 18.11.10
+ '@types/node': 18.16.17
jest-message-util: 27.5.1
jest-mock: 27.5.1
jest-util: 27.5.1
@@ -6013,7 +6210,7 @@ packages:
dependencies:
'@jest/types': 29.5.0
'@sinonjs/fake-timers': 10.0.2
- '@types/node': 18.11.10
+ '@types/node': 18.16.17
jest-message-util: 29.5.0
jest-mock: 29.4.1
jest-util: 29.5.0
@@ -6054,7 +6251,7 @@ packages:
'@jest/test-result': 27.5.1
'@jest/transform': 27.5.1
'@jest/types': 27.5.1
- '@types/node': 18.11.10
+ '@types/node': 18.16.17
chalk: 4.1.2
collect-v8-coverage: 1.0.1
exit: 0.1.2
@@ -6093,7 +6290,7 @@ packages:
'@jest/transform': 29.4.1
'@jest/types': 29.5.0
'@jridgewell/trace-mapping': 0.3.17
- '@types/node': 18.11.10
+ '@types/node': 18.16.17
chalk: 4.1.2
collect-v8-coverage: 1.0.1
exit: 0.1.2
@@ -6255,7 +6452,7 @@ packages:
dependencies:
'@types/istanbul-lib-coverage': 2.0.4
'@types/istanbul-reports': 3.0.1
- '@types/node': 18.11.10
+ '@types/node': 18.16.17
'@types/yargs': 16.0.4
chalk: 4.1.2
dev: true
@@ -6267,7 +6464,7 @@ packages:
'@jest/schemas': 28.0.2
'@types/istanbul-lib-coverage': 2.0.4
'@types/istanbul-reports': 3.0.1
- '@types/node': 18.11.10
+ '@types/node': 18.16.17
'@types/yargs': 17.0.10
chalk: 4.1.2
dev: true
@@ -6279,7 +6476,7 @@ packages:
'@jest/schemas': 29.4.0
'@types/istanbul-lib-coverage': 2.0.4
'@types/istanbul-reports': 3.0.1
- '@types/node': 18.11.10
+ '@types/node': 18.16.17
'@types/yargs': 17.0.10
chalk: 4.1.2
dev: true
@@ -6291,7 +6488,7 @@ packages:
'@jest/schemas': 29.4.3
'@types/istanbul-lib-coverage': 2.0.4
'@types/istanbul-reports': 3.0.1
- '@types/node': 18.11.10
+ '@types/node': 18.16.17
'@types/yargs': 17.0.10
chalk: 4.1.2
dev: true
@@ -6557,7 +6754,7 @@ packages:
tsconfig-paths: 4.1.0
tsconfig-paths-webpack-plugin: 4.0.0
typescript: 4.8.4
- webpack: 5.74.0([email protected])
+ webpack: 5.74.0([email protected])
webpack-node-externals: 3.0.0
transitivePeerDependencies:
- '@swc/core'
@@ -7343,7 +7540,7 @@ packages:
resolution: {integrity: sha512-jOdnI/3qTpHABjM5cx1Hc0sKsPoYCp+DP/GJRGtDlPd7fiV9oXGGIcjW/ZOxLIvjGz8MA+uMZI9metHlgqbgwQ==}
dependencies:
- '@types/node': 18.11.10
+ '@types/node': 18.16.17
dev: false
@@ -7372,8 +7569,8 @@ packages:
resolution: {integrity: sha512-WEOTgRsbYkvA/KCsDwVEGkd7WAr1e3g31VHQ8zy5gul/V1qKullU/BU5I68X5v7V3GnB9eotmom4v5a5gjxorw==}
dependencies:
- '@babel/parser': 7.21.2
- '@babel/types': 7.18.7
+ '@babel/parser': 7.22.5
+ '@babel/types': 7.21.2
'@types/babel__generator': 7.6.4
'@types/babel__template': 7.4.1
'@types/babel__traverse': 7.17.1
@@ -7388,14 +7585,14 @@ packages:
resolution: {integrity: sha512-azBFKemX6kMg5Io+/rdGT0dkGreboUVR0Cdm3fz9QJWpaQGJRQXl7C+6hOTCZcMll7KFyEQpgbYI2lHdsS4U7g==}
dependencies:
- '@babel/parser': 7.21.2
+ '@babel/parser': 7.22.5
'@babel/types': 7.21.2
dev: true
resolution: {integrity: sha512-kVzjari1s2YVi77D3w1yuvohV2idweYXMCDzqBiVNN63TcDWrIlTVOYpqVrvbbyOE/IyzBoTKF0fdnLPEORFxA==}
dependencies:
- '@babel/types': 7.18.7
+ '@babel/types': 7.21.2
dev: true
@@ -7408,7 +7605,7 @@ packages:
resolution: {integrity: sha512-ALYone6pm6QmwZoAgeyNksccT9Q4AWZQ6PvfwR37GT6r6FWUPguq6sUmNGSMV2Wr761oQoBxwGGa6DR5o1DC9g==}
dependencies:
'@types/connect': 3.4.35
- '@types/node': 18.11.10
+ '@types/node': 18.16.17
resolution: {integrity: sha512-frBecisrNGz+F4T6bcc+NLeolfiojh5FxW2klu669+8BARtyQv2C/GkNW6FUodVe4BroGMP/wER/YDGc7rEllw==}
@@ -7445,7 +7642,7 @@ packages:
resolution: {integrity: sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ==}
dependencies:
- '@types/node': 18.11.10
+ '@types/node': 18.16.17
resolution: {integrity: sha512-CqSKwFwefj4PzZ5n/iwad/bow2hTCh0FlNAeWLtQM3JA/NX/iYagIpWG2cf1bQKQ2c9gU2log5VUCrn7LDOs0w==}
@@ -7509,7 +7706,7 @@ packages:
resolution: {integrity: sha512-DxMhY+NAsTwMMFHBTtJFNp5qiHKJ7TeqOo23zVEM9alT1Ml27Q3xcTH0xwxn7Q0BbMcVEJOs/7aQtUWupUQN3Q==}
dependencies:
- '@types/node': 18.11.10
+ '@types/node': 18.16.17
'@types/qs': 6.9.7
'@types/range-parser': 1.2.4
@@ -7537,13 +7734,13 @@ packages:
resolution: {integrity: sha512-nEnwB++1u5lVDM2UI4c1+5R+FYaKfaAzS4OococimjVm3nQw3TuzH5UNsocrcTBbhnerblyHj4A49qXbIiZdpA==}
dependencies:
- '@types/node': 18.11.10
+ '@types/node': 18.16.17
dev: true
resolution: {integrity: sha512-anKkLmZZ+xm4p8JWBf4hElkM4XR+EZeA2M9BAkkTldmcyDY4mbdIJnRghDJH3Ov5ooY7/UAoENtmdMSkaAd7Cw==}
dependencies:
- '@types/node': 18.11.10
+ '@types/node': 18.16.17
dev: true
@@ -7590,12 +7787,12 @@ packages:
resolution: {integrity: sha512-272FMnFGzAVMGtu9tkr29hRL6bZj4Zs1KZNeHLnKqAvp06tAIcarTMwOh8/8bz4FmKRcMxZhZNeUAQsNLoiPhg==}
dependencies:
- '@types/node': 18.11.10
+ '@types/node': 18.16.17
resolution: {integrity: sha512-c5ltxazpWabia/4UzhIoaDcIza4KViOQhdbjRlfcIGVnsE3c3brkz9Z+F/EeJIECOQP7W7US2hNE930cWWkPiw==}
dependencies:
- '@types/node': 18.11.10
+ '@types/node': 18.16.17
dev: true
@@ -7660,6 +7857,9 @@ packages:
resolution: {integrity: sha512-juG3RWMBOqcOuXC643OAdSA525V44cVgGV6dUDuiFtss+8Fk5x1hI93Rsld43VeJVIeqlP9I7Fn9/qaVqoEAuQ==}
+ resolution: {integrity: sha512-QAkjjRA1N7gPJeAP4WLXZtYv6+eMXFNviqktCDt4GLcmCugMr5BcRHfkOjCQzvCsnMp+L79a54zBkbw356xv9Q==}
+
resolution: {integrity: sha512-f5qCBGAn/f0qtRcd4SEn88c8Fp3Swct1731X4ryPKqS61/A3LmmzN8zaEz7hneJvpjFbUUgY7lru/B/7ODTazg==}
dependencies:
@@ -7677,7 +7877,7 @@ packages:
resolution: {integrity: sha512-a1iY62/a3yhZ7qH7cNUsxoI3U/0Fe9+RnuFrpTKr+0WVOzbKlSLojShCKe20aOD1Sppv+i8Zlq0pLDuTJnwS4A==}
dependencies:
- '@types/node': 18.11.10
+ '@types/node': 18.16.17
dev: true
@@ -7767,7 +7967,7 @@ packages:
resolution: {integrity: sha512-yy7HuzQhj0dhGpD8RLXSZWEkLsV9ibvxvi6EiJ3bkqLAO1RGo0WbkWQiwpRlSFymTJRz0d3k5LM3kkx8ArDbLw==}
dependencies:
- '@types/node': 18.11.10
+ '@types/node': 18.16.17
dev: true
@@ -7782,7 +7982,7 @@ packages:
resolution: {integrity: sha512-z5xyF6uh8CbjAu9760KDKsH2FcDxZ2tFCsA4HIMWE6IkiYMXfVoa+4f9KX+FN0ZLsaMw1WNG2ETLA6N+/YA+cg==}
dependencies:
'@types/mime': 3.0.1
- '@types/node': 18.11.10
+ '@types/node': 18.16.17
resolution: {integrity: sha512-H5BgO6UdJRzz5ddRzuGvLBiPSPEuuHXb5ET+7avLLrEx1uc7f5Ut5oLMDQsfvGtHBBAFczt1QNYuDf27wHbvDQ==}
@@ -7806,7 +8006,7 @@ packages:
resolution: {integrity: sha512-tLfnlJf6A5mB6ddqF159GqcDizfzbMUB1/DeT59/wBNqzRTNNKsaw79A/1TZ84X+f/EwWH8FeuSkjlCLyqS/zQ==}
dependencies:
'@types/cookiejar': 2.1.2
- '@types/node': 18.11.10
+ '@types/node': 18.16.17
dev: true
@@ -7837,7 +8037,7 @@ packages:
resolution: {integrity: sha512-6YOoWjruKj1uLf3INHH7D3qTXwFfEsg1kf3c0uDdSBJwfa/llkwIjrAGV7j7mVgGNbzTQ3HiHKKDXl6bJPD97w==}
dependencies:
- '@types/node': 18.11.10
+ '@types/node': 18.16.17
resolution: {integrity: sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA==}
@@ -8291,7 +8491,7 @@ packages:
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
dependencies:
'@typescript-eslint/types': 5.30.6
- eslint-visitor-keys: 3.3.0
+ eslint-visitor-keys: 3.4.1
dev: true
/@typescript-eslint/[email protected]:
@@ -8299,7 +8499,7 @@ packages:
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
dependencies:
'@typescript-eslint/types': 5.45.0
- eslint-visitor-keys: 3.3.0
+ eslint-visitor-keys: 3.4.1
dev: true
@@ -8578,9 +8778,9 @@ packages:
dependencies:
'@volar/code-gen': 0.38.2
'@volar/source-map': 0.38.2
- '@vue/compiler-core': 3.2.45
- '@vue/compiler-dom': 3.2.45
- '@vue/shared': 3.2.45
+ '@vue/compiler-core': 3.3.4
+ '@vue/compiler-dom': 3.3.4
+ '@vue/shared': 3.3.4
dev: true
@@ -8626,7 +8826,7 @@ packages:
resolution: {integrity: sha512-81KhEjo7YAOh0vQJoSmAD68wLfYqJvoiD4ulyedzF+OEk/bk6/hx3fTNVfuzugIIaTrOx4PGx6pAiBRe5e9Zmg==}
dependencies:
- '@babel/parser': 7.21.2
+ '@babel/parser': 7.22.5
'@vue/shared': 3.2.37
estree-walker: 2.0.2
source-map: 0.6.1
@@ -8647,6 +8847,15 @@ packages:
estree-walker: 2.0.2
source-map: 0.6.1
+ resolution: {integrity: sha512-cquyDNvZ6jTbf/+x+AgM2Arrp6G4Dzbb0R64jiG804HRMfRiFXWI6kqUVqZ6ZR0bQhIoQjB4+2bhNtVwndW15g==}
+ dependencies:
+ '@babel/parser': 7.22.5
+ '@vue/shared': 3.3.4
+ estree-walker: 2.0.2
+ source-map-js: 1.0.2
+ dev: true
+
resolution: {integrity: sha512-yxJLH167fucHKxaqXpYk7x8z7mMEnXOw3G2q62FTkmsvNxu4FQSu5+3UMb+L7fjKa26DEzhrmCxAgFLLIzVfqQ==}
dependencies:
@@ -8665,10 +8874,17 @@ packages:
'@vue/compiler-core': 3.2.45
'@vue/shared': 3.2.45
+ resolution: {integrity: sha512-wyM+OjOVpuUukIq6p5+nwHYtj9cFroz9cwkfmP9O1nzH68BenTTv0u7/ndggT8cIQlnBeOo6sUT/gvHcIkLA5w==}
+ dependencies:
+ '@vue/compiler-core': 3.3.4
+ '@vue/shared': 3.3.4
+ dev: true
+
resolution: {integrity: sha512-YQRE2uYhlvyFgHmKAqySCdLm7O37XZc+yG9dujwD3h8em+rD1qGOthxc0H3XcijOy50gj/pYHgBO6C3MjV+oug==}
dependencies:
- '@babel/parser': 7.21.2
+ '@babel/parser': 7.22.5
postcss: 8.4.21
source-map: 0.6.1
dev: true
@@ -8781,7 +8997,7 @@ packages:
resolution: {integrity: sha512-IWopkKEb+8qpu/1eMKVeXrK0NLw9HicGviJzhJDEyfxTR9e1WtpnnbYkJWurX6WwoFP0sz10xQg8yL8lgskAZg==}
dependencies:
- '@babel/parser': 7.21.2
+ '@babel/parser': 7.22.5
'@vue/compiler-core': 3.2.37
'@vue/shared': 3.2.37
estree-walker: 2.0.2
@@ -8881,7 +9097,11 @@ packages:
resolution: {integrity: sha512-Ewzq5Yhimg7pSztDV+RH1UDKBzmtqieXQlpTVm2AwraoRL/Rks96mvd8Vgi7Lj+h+TH8dv7mXD3FRZR3TUvbSg==}
+ resolution: {integrity: sha512-7OjdcV8vQ74eiz1TZLzZP4JwqM5fA94K6yntPS5Z25r9HDuGNzaGdgvwKYq6S+MxwF0TFRwe50fIR/MYnakdkQ==}
+ dev: true
+
resolution: {integrity: sha512-tqgzeZGoZcXzoit4kOGLWJibDMLp0vdm6ZO41SSUQhkhtrPhAg6dbIEPiahhUu6sZAmSYvVrZgEr5aKD51nrLA==}
peerDependencies:
'@vue/composition-api': ^1.1.0
@@ -8894,13 +9114,13 @@ packages:
dependencies:
'@types/web-bluetooth': 0.0.14
'@vueuse/metadata': 8.7.5
- '@vueuse/shared': 8.7.5([email protected])
- vue: 3.2.37
- vue-demi: 0.13.1([email protected])
+ '@vueuse/shared': 8.7.5([email protected])
+ vue: 3.2.45
+ vue-demi: 0.13.1([email protected])
dev: false
-
- resolution: {integrity: sha512-tqgzeZGoZcXzoit4kOGLWJibDMLp0vdm6ZO41SSUQhkhtrPhAg6dbIEPiahhUu6sZAmSYvVrZgEr5aKD51nrLA==}
+
+ resolution: {integrity: sha512-B/Mdj9TK1peFyWaPof+Zf/mP9XuGAngaJZBwPaXBvU3aCTZlx3ltlrFFFyMV4iGBwsjSCeUCgZrtkEj9dS2Y3Q==}
peerDependencies:
'@vue/composition-api': ^1.1.0
vue: ^2.6.0 || ^3.2.0
@@ -8911,10 +9131,10 @@ packages:
optional: true
dependencies:
'@types/web-bluetooth': 0.0.14
- '@vueuse/metadata': 8.7.5
- '@vueuse/shared': 8.7.5([email protected])
- vue: 3.2.45
- vue-demi: 0.13.1([email protected])
+ '@vueuse/metadata': 8.9.4
+ '@vueuse/shared': 8.9.4([email protected])
+ vue: 3.2.37
+ vue-demi: 0.13.1([email protected])
dev: false
@@ -8949,11 +9169,15 @@ packages:
resolution: {integrity: sha512-emJZKRQSaEnVqmlu39NpNp8iaW+bPC2kWykWoWOZMSlO/0QVEmO/rt8A5VhOEJTKLX3vwTevqbiRy9WJRwVOQg==}
dev: false
+ /@vueuse/[email protected]:
+ resolution: {integrity: sha512-IwSfzH80bnJMzqhaapqJl9JRIiyQU0zsRGEgnxN6jhq7992cPUJIRfV+JHRIZXjYqbwt07E1gTEp0R0zPJ1aqw==}
+ dev: false
+
resolution: {integrity: sha512-9oJ9MM9lFLlmvxXUqsR1wLt1uF7EVbP5iYaHJYqk+G2PbMjY6EXvZeTjbdO89HgoF5cI6z49o2zT/jD9SVoNpQ==}
dev: false
resolution: {integrity: sha512-THXPvMBFmg6Gf6AwRn/EdTh2mhqwjGsB2Yfp374LNQSQVKRHtnJ0I42bsZTn7nuEliBxqUrGQm/lN6qUHmhJLw==}
peerDependencies:
'@vue/composition-api': ^1.1.0
@@ -8964,12 +9188,12 @@ packages:
vue:
optional: true
dependencies:
- vue: 3.2.37
- vue-demi: 0.13.1([email protected])
+ vue: 3.2.45
+ vue-demi: 0.13.1([email protected])
dev: false
- resolution: {integrity: sha512-THXPvMBFmg6Gf6AwRn/EdTh2mhqwjGsB2Yfp374LNQSQVKRHtnJ0I42bsZTn7nuEliBxqUrGQm/lN6qUHmhJLw==}
+ resolution: {integrity: sha512-wt+T30c4K6dGRMVqPddexEVLa28YwxW5OFIPmzUHICjphfAuBFTTdDoyqREZNDOFJZ44ARH1WWQNCUK8koJ+Ag==}
peerDependencies:
'@vue/composition-api': ^1.1.0
vue: ^2.6.0 || ^3.2.0
@@ -8979,8 +9203,8 @@ packages:
vue:
optional: true
dependencies:
- vue: 3.2.45
- vue-demi: 0.13.1([email protected])
+ vue: 3.2.37
+ vue-demi: 0.13.1([email protected])
dev: false
@@ -9092,11 +9316,11 @@ packages:
resolution: {integrity: sha512-WKj/lI4QjnLuPrim0cfO7i+HsDSXHxNv1y0CrJhdntuO3hxWZmnXCwNDnwOvry11OjRin6cgWNF+j/9Pn8TN4w==}
dev: true
- /@whatwg-node/[email protected](@types/[email protected]):
+ /@whatwg-node/[email protected](@types/[email protected]):
resolution: {integrity: sha512-JfrBCJdMu9n9OARc0e/hPHcD98/8Nz1CKSdGYDg6VbObDkV/Ys30xe5i/wPOatYbxuvatj1kfWeHf7iNX3i17w==}
dependencies:
'@peculiar/webcrypto': 1.4.1
- '@whatwg-node/node-fetch': 0.0.5(@types/[email protected])
+ '@whatwg-node/node-fetch': 0.0.5(@types/[email protected])
busboy: 1.6.0
urlpattern-polyfill: 6.0.2
web-streams-polyfill: 3.2.1
@@ -9104,11 +9328,11 @@ packages:
- '@types/node'
dev: true
- /@whatwg-node/[email protected](@types/[email protected]):
+ /@whatwg-node/[email protected](@types/[email protected]):
resolution: {integrity: sha512-Fkd1qQHK2tAWxKlC85h9L86Lgbq3BzxMnHSnTsnzNZMMzn6Xi+HlN8/LJ90LxorhSqD54td+Q864LgwUaYDj1Q==}
dependencies:
'@peculiar/webcrypto': 1.4.1
- '@whatwg-node/node-fetch': 0.3.0(@types/[email protected])
+ '@whatwg-node/node-fetch': 0.3.0(@types/[email protected])
busboy: 1.6.0
urlpattern-polyfill: 6.0.2
web-streams-polyfill: 3.2.1
@@ -9116,23 +9340,23 @@ packages:
- '@types/node'
dev: true
- /@whatwg-node/[email protected](@types/[email protected]):
+ /@whatwg-node/[email protected](@types/[email protected]):
resolution: {integrity: sha512-hbccmaSZaItdsRuBKBEEhLoO+5oXJPxiyd0kG2xXd0Dh3Rt+vZn4pADHxuSiSHLd9CM+S2z4+IxlEGbWUgiz9g==}
peerDependencies:
'@types/node': ^18.0.6
dependencies:
- '@types/node': 18.11.10
+ '@types/node': 18.16.17
'@whatwg-node/events': 0.0.2
busboy: 1.6.0
tslib: 2.5.0
dev: true
- /@whatwg-node/[email protected](@types/[email protected]):
+ /@whatwg-node/[email protected](@types/[email protected]):
resolution: {integrity: sha512-mPM8WnuHiI/3kFxDeE0SQQXAElbz4onqmm64fEGCwYEcBes2UsvIDI8HwQIqaXCH42A9ajJUPv4WsYoN/9oG6w==}
peerDependencies:
'@types/node': ^18.0.6
dependencies:
- '@types/node': 18.11.10
+ '@types/node': 18.16.17
'@whatwg-node/events': 0.0.2
busboy: 1.6.0
fast-querystring: 1.1.1
@@ -9285,7 +9509,7 @@ packages:
hasBin: true
- resolution: {integrity: sha512-QbJ0NTQ/I9DI3uSJA4cbexiwQeRAfjPScqIbSjUDd9TOrcg6pTkdgziesOqxBMBzit8vFCTwrP27t13vFOORRA==}
+ resolution: {integrity: sha1-/ts5T58OAqqXaOcCvaI7UF+ufh8=}
dev: false
@@ -9897,7 +10121,7 @@ packages:
resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==}
- resolution: {integrity: sha512-a1eIFi4R9ySrbiMuyTGx5e92uRH5tQY6kArNcFaKBUleIoLjdjBg7Zxm3Mqm3Kmkf27HLR/1fnxX9q8GQ7Iavg==}
+ resolution: {integrity: sha1-mBjHngWbE1X5fgQooBfIOOkLqBI=}
engines: {node: '>= 0.6.0'}
dev: false
@@ -10548,14 +10772,14 @@ packages:
dev: true
- resolution: {integrity: sha512-WZveuKPeKAG9qY+FkYDeADzdHyTYdIboXS59ixDeRJL5ZhxpqUnxSOwop4FQjMsiYm3/Or8cegVbpAHNA7pHxw==}
+ resolution: {integrity: sha1-AMYIq33Nk4l8AAllGx06jh5zu9E=}
dev: false
resolution: {integrity: sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==}
- resolution: {integrity: sha512-w+LhYREhatpVqTESyGFg3NlP6Iu0kEKUHETY9GoZP/pQyW4mHFZuFWRUCIqVPZ36ueVLtoOEZaAqbCF2RDndaA==}
+ resolution: {integrity: sha1-ZF/ErfWLcrZJ1crmUTVhnbJv8UM=}
dev: false
@@ -10619,7 +10843,7 @@ packages:
resolution: {integrity: sha512-vCrqcSIq4//Gx74TXXCGnHpulY1dskqLTFGDmhrGxzeXL8lF8kvXv6mpNWlJj1uD4DW23D4ljAqbY4RRaaUZIw==}
dependencies:
- '@babel/parser': 7.21.2
+ '@babel/parser': 7.22.5
'@babel/types': 7.21.2
@@ -10742,7 +10966,7 @@ packages:
dependencies:
'@iarna/toml': 2.2.5
resolution: {integrity: sha512-KmE+bMjWMXJbkWCeY4FJX/npHuZPNr9XF9q9CIQ/bpFwi1qHfCmSiKarrCcRa0LO4fWjk93pVoeRtJAkTGcYNw==}
engines: {node: '>=12', npm: '>=6'}
peerDependencies:
@@ -10750,16 +10974,16 @@ packages:
cosmiconfig: '>=7'
typescript: '>=3'
dependencies:
- '@types/node': 17.0.45
+ '@types/node': 18.16.17
cosmiconfig: 7.0.1
- ts-node: 10.8.2(@types/[email protected])([email protected])
+ ts-node: 10.8.2(@types/[email protected])([email protected])
typescript: 4.9.4
transitivePeerDependencies:
- '@swc/core'
- '@swc/wasm'
dev: true
resolution: {integrity: sha512-NTxV1MFfZDLPiBMjxbHRwSh5LaLcPMwNdCutmnHJCKoVnlvldPWlllonKwrsRJ5pYZBIBGRWWU2tfvzxgeSW5Q==}
engines: {node: '>=12', npm: '>=6'}
peerDependencies:
@@ -10768,9 +10992,9 @@ packages:
ts-node: '>=10'
typescript: '>=3'
dependencies:
- '@types/node': 18.11.10
+ '@types/node': 18.16.17
cosmiconfig: 7.0.1
- ts-node: 10.9.1(@types/[email protected])([email protected])
+ ts-node: 10.9.1(@types/[email protected])([email protected])
typescript: 4.9.3
dev: true
@@ -11064,10 +11288,6 @@ packages:
engines: {node: '>=10'}
dev: true
- resolution: {integrity: sha512-V0pfhfr8suzyPGOx3nmq4aHqabehUZn6Ch9kyFpV79TGDTWFmHqUqXdabR7QHqxzrYolF4+tVmJhUG4OURg5dQ==}
- dev: true
-
resolution: {integrity: sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA==}
dev: true
@@ -12173,6 +12393,36 @@ packages:
'@esbuild/win32-arm64': 0.16.17
'@esbuild/win32-ia32': 0.16.17
'@esbuild/win32-x64': 0.16.17
+ dev: true
+
+ resolution: {integrity: sha512-XQ0jAPFkK/u3LcVRcvVHQcTIqD6E2H1fvZMA5dQPSOWb3suUbWbfbRf94pjc0bNzRYLfIrDRQXr7X+LHIm5oHw==}
+ engines: {node: '>=12'}
+ hasBin: true
+ requiresBuild: true
+ optionalDependencies:
+ '@esbuild/android-arm': 0.17.19
+ '@esbuild/android-arm64': 0.17.19
+ '@esbuild/android-x64': 0.17.19
+ '@esbuild/darwin-arm64': 0.17.19
+ '@esbuild/darwin-x64': 0.17.19
+ '@esbuild/freebsd-arm64': 0.17.19
+ '@esbuild/freebsd-x64': 0.17.19
+ '@esbuild/linux-arm': 0.17.19
+ '@esbuild/linux-arm64': 0.17.19
+ '@esbuild/linux-ia32': 0.17.19
+ '@esbuild/linux-loong64': 0.17.19
+ '@esbuild/linux-mips64el': 0.17.19
+ '@esbuild/linux-ppc64': 0.17.19
+ '@esbuild/linux-riscv64': 0.17.19
+ '@esbuild/linux-s390x': 0.17.19
+ '@esbuild/linux-x64': 0.17.19
+ '@esbuild/netbsd-x64': 0.17.19
+ '@esbuild/openbsd-x64': 0.17.19
+ '@esbuild/sunos-x64': 0.17.19
+ '@esbuild/win32-arm64': 0.17.19
+ '@esbuild/win32-ia32': 0.17.19
+ '@esbuild/win32-x64': 0.17.19
resolution: {integrity: sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==}
@@ -12327,6 +12577,14 @@ packages:
esrecurse: 4.3.0
estraverse: 5.3.0
+ resolution: {integrity: sha512-DYj5deGlHBfMt15J7rdtyKNq/Nqlv5KfU4iodrQ019XESsRnwXH9KAE0y3cwtUHDo2ob7CypAnCqefh6vioWRw==}
+ engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
+ dependencies:
+ esrecurse: 4.3.0
+ estraverse: 5.3.0
+ dev: true
+
resolution: {integrity: sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==}
engines: {node: '>=6'}
@@ -12376,6 +12634,11 @@ packages:
resolution: {integrity: sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
+ resolution: {integrity: sha512-pZnmmLwYzf+kWaM/Qgrvpen51upAktaaiI01nsJD/Yr3lMOdNtq0cxkrrg16w64VtisN6okbs7Q8AfGqj4c9fA==}
+ engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
+ dev: true
+
resolution: {integrity: sha512-SXOPj3x9VKvPe81TjjUJCYlV4oJjQw68Uek+AM0X4p+33dj2HY5bpTZOgnQHcG2eAm1mtCU9uNMnJi7exU/kYw==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
@@ -12535,7 +12798,7 @@ packages:
dependencies:
acorn: 8.8.2
acorn-jsx: 5.3.2([email protected])
- eslint-visitor-keys: 3.3.0
+ eslint-visitor-keys: 3.4.1
dev: true
@@ -12546,6 +12809,15 @@ packages:
acorn-jsx: 5.3.2([email protected])
eslint-visitor-keys: 3.3.0
+ resolution: {integrity: sha512-7OASN1Wma5fum5SrNhFMAMJxOUAbhyfQ8dQ//PJaJbNw0URTPWqIghHWt1MmAANKhHZIYOHruW4Kw4ruUWOdGw==}
+ engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
+ dependencies:
+ acorn: 8.8.2
+ acorn-jsx: 5.3.2([email protected])
+ eslint-visitor-keys: 3.4.1
+ dev: true
+
resolution: {integrity: sha512-sBQUnvJwpeE9QnPrxh7dpI/dp67erYG4WXEAreAMoelPRpMR7NWb4YtwRPn9b+H1uLQKl/qS8WYmyaljTpjIsw==}
engines: {node: '>=4'}
@@ -12564,6 +12836,13 @@ packages:
dependencies:
estraverse: 5.3.0
+ resolution: {integrity: sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==}
+ engines: {node: '>=0.10'}
+ dependencies:
+ estraverse: 5.3.0
+ dev: true
+
resolution: {integrity: sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==}
engines: {node: '>=4.0'}
@@ -13081,7 +13360,7 @@ packages:
semver: 7.3.8
tapable: 2.2.1
typescript: 4.8.4
- webpack: 5.74.0([email protected])
+ webpack: 5.74.0([email protected])
dev: true
@@ -13501,7 +13780,7 @@ packages:
- utf-8-validate
dev: true
resolution: {integrity: sha512-B8wlvfBHZ5WnI4IiuQZRqql6s+CKz7S+xpUeTb28Z8nRBi8tH9ChEBgT5FnTyE05PUhHlrS2jK9ICJ4YBl9OtQ==}
engines: {node: '>= 10.0.0'}
peerDependencies:
@@ -13518,10 +13797,10 @@ packages:
'@graphql-tools/json-file-loader': 7.4.17([email protected])
'@graphql-tools/load': 7.8.12([email protected])
'@graphql-tools/merge': 8.3.18([email protected])
- '@graphql-tools/url-loader': 7.17.13(@types/[email protected])([email protected])
+ '@graphql-tools/url-loader': 7.17.13(@types/[email protected])([email protected])
'@graphql-tools/utils': 9.2.1([email protected])
cosmiconfig: 8.0.0
- cosmiconfig-typescript-loader: 4.3.0(@types/[email protected])([email protected])([email protected])([email protected])
+ cosmiconfig-typescript-loader: 4.3.0(@types/[email protected])([email protected])([email protected])([email protected])
graphql: 16.6.0
minimatch: 4.2.1
string-env-interpolation: 1.0.1
@@ -13776,7 +14055,7 @@ packages:
dev: false
- resolution: {integrity: sha512-g5VNKdkFuUuVCP9gYfDJHjK2nqdQJ7aDLTnycnc2+RvsOQbuLdF5pm7vuE5J76SEBIQjs4kQY/BWq74JUmjbXA==}
+ resolution: {integrity: sha1-XkdHk/fqmEPRu5nCPu9J/xJv/zk=}
dev: false
@@ -14169,7 +14448,7 @@ packages:
engines: {node: '>=8'}
- resolution: {integrity: sha512-i0G7hLJ1z0DE8dsqJa2rycj9dBmNKgXBvotXtZYXakU9oivfB9Uj2ZBC27qqef2U58/ZLwalxa1X/RDCdkHtVg==}
+ resolution: {integrity: sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10=}
dev: false
@@ -14637,6 +14916,14 @@ packages:
ws: '*'
dependencies:
ws: 8.12.1
+ dev: true
+
+ resolution: {integrity: sha512-muId7Zzn9ywDsyXgTIafTry2sV3nySZeUDe6YedVd1Hvuuep5AsIlqK+XefWpYTyJG5e503F2xIuT2lcU6rCSw==}
+ peerDependencies:
+ ws: '*'
+ dependencies:
+ ws: 8.13.0
resolution: {integrity: sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw==}
@@ -14648,7 +14935,7 @@ packages:
engines: {node: '>=8'}
dependencies:
'@babel/core': 7.18.6
- '@babel/parser': 7.18.6
+ '@babel/parser': 7.22.5
'@istanbuljs/schema': 0.1.3
istanbul-lib-coverage: 3.2.0
semver: 6.3.0
@@ -14726,7 +15013,7 @@ packages:
'@jest/environment': 27.5.1
'@jest/test-result': 27.5.1
'@jest/types': 27.5.1
- '@types/node': 18.11.10
+ '@types/node': 18.16.17
chalk: 4.1.2
co: 4.6.0
dedent: 0.7.0
@@ -14754,7 +15041,7 @@ packages:
'@jest/expect': 29.4.1
'@jest/test-result': 29.4.1
'@jest/types': 29.5.0
- '@types/node': 18.11.10
+ '@types/node': 18.16.17
chalk: 4.1.2
co: 4.6.0
dedent: 0.7.0
@@ -14911,6 +15198,46 @@ packages:
- supports-color
dev: true
+ resolution: {integrity: sha512-g7p3q4NuXiM4hrS4XFATTkd+2z0Ml2RhFmFPM8c3WyKwVDNszbl4E7cV7WIx1YZeqqCtqbtTtZhGZWJlJqngzg==}
+ engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0}
+ peerDependencies:
+ '@types/node': '*'
+ ts-node: '>=9.0.0'
+ peerDependenciesMeta:
+ '@types/node':
+ optional: true
+ ts-node:
+ optional: true
+ dependencies:
+ '@babel/core': 7.18.6
+ '@jest/test-sequencer': 29.4.1
+ '@jest/types': 29.5.0
+ '@types/node': 18.16.17
+ babel-jest: 29.4.1(@babel/[email protected])
+ chalk: 4.1.2
+ ci-info: 3.3.2
+ deepmerge: 4.2.2
+ glob: 7.2.0
+ graceful-fs: 4.2.10
+ jest-circus: 29.4.1
+ jest-environment-node: 29.4.1
+ jest-get-type: 29.4.3
+ jest-regex-util: 29.2.0
+ jest-resolve: 29.4.1
+ jest-runner: 29.4.1
+ jest-util: 29.5.0
+ jest-validate: 29.4.1
+ micromatch: 4.0.5
+ parse-json: 5.2.0
+ pretty-format: 29.5.0
+ slash: 3.0.0
+ strip-json-comments: 3.1.1
+ ts-node: 10.9.1(@types/[email protected])([email protected])
+ transitivePeerDependencies:
+ - supports-color
+ dev: true
+
resolution: {integrity: sha512-m0NvkX55LDt9T4mctTEgnZk3fmEg3NRYutvMPWM/0iPnkFj2wIeF45O1718cMSOFO1vINkqmxqD8vE37uTEbqw==}
engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0}
@@ -14984,7 +15311,7 @@ packages:
'@jest/environment': 27.5.1
'@jest/fake-timers': 27.5.1
'@jest/types': 27.5.1
- '@types/node': 18.11.10
+ '@types/node': 18.16.17
jest-mock: 27.5.1
jest-util: 27.5.1
jsdom: 16.7.0
@@ -15002,7 +15329,7 @@ packages:
'@jest/environment': 27.5.1
'@jest/fake-timers': 27.5.1
'@jest/types': 27.5.1
- '@types/node': 18.11.10
+ '@types/node': 18.16.17
jest-mock: 27.5.1
jest-util: 27.5.1
dev: true
@@ -15014,7 +15341,7 @@ packages:
'@jest/environment': 29.4.1
'@jest/fake-timers': 29.4.1
'@jest/types': 29.5.0
- '@types/node': 18.11.10
+ '@types/node': 18.16.17
jest-mock: 29.4.1
jest-util: 29.5.0
dev: true
@@ -15045,7 +15372,7 @@ packages:
dependencies:
'@jest/types': 27.5.1
'@types/graceful-fs': 4.1.5
- '@types/node': 18.11.10
+ '@types/node': 18.16.17
anymatch: 3.1.2
fb-watchman: 2.0.1
graceful-fs: 4.2.10
@@ -15065,7 +15392,7 @@ packages:
dependencies:
'@jest/types': 29.5.0
'@types/graceful-fs': 4.1.5
- '@types/node': 18.11.10
+ '@types/node': 18.16.17
anymatch: 3.1.2
fb-watchman: 2.0.1
graceful-fs: 4.2.10
@@ -15086,7 +15413,7 @@ packages:
'@jest/source-map': 27.5.1
'@jest/test-result': 27.5.1
'@jest/types': 27.5.1
- '@types/node': 18.11.10
+ '@types/node': 18.16.17
chalk: 4.1.2
co: 4.6.0
expect: 27.5.1
@@ -15250,7 +15577,7 @@ packages:
engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0}
dependencies:
'@jest/types': 27.5.1
- '@types/node': 18.11.10
+ '@types/node': 18.16.17
dev: true
@@ -15258,7 +15585,7 @@ packages:
engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0}
dependencies:
'@jest/types': 29.5.0
- '@types/node': 18.11.10
+ '@types/node': 18.16.17
jest-util: 29.5.0
dev: true
@@ -15357,7 +15684,7 @@ packages:
'@jest/test-result': 27.5.1
'@jest/transform': 27.5.1
'@jest/types': 27.5.1
- '@types/node': 18.11.10
+ '@types/node': 18.16.17
chalk: 4.1.2
emittery: 0.8.1
graceful-fs: 4.2.10
@@ -15389,7 +15716,7 @@ packages:
'@jest/test-result': 29.4.1
'@jest/transform': 29.4.1
'@jest/types': 29.5.0
- '@types/node': 18.11.10
+ '@types/node': 18.16.17
chalk: 4.1.2
emittery: 0.13.1
graceful-fs: 4.2.10
@@ -15450,7 +15777,7 @@ packages:
'@jest/test-result': 29.4.1
'@jest/transform': 29.4.1
'@jest/types': 29.5.0
- '@types/node': 18.11.10
+ '@types/node': 18.16.17
chalk: 4.1.2
cjs-module-lexer: 1.2.2
collect-v8-coverage: 1.0.1
@@ -15474,7 +15801,7 @@ packages:
resolution: {integrity: sha512-jZCyo6iIxO1aqUxpuBlwTDMkzOAJS4a3eYz3YzgxxVQFwLeSA7Jfq5cbqCY+JLvTDrWirgusI/0KwxKMgrdf7w==}
engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0}
dependencies:
- '@types/node': 18.11.10
+ '@types/node': 18.16.17
graceful-fs: 4.2.10
dev: true
@@ -15486,7 +15813,7 @@ packages:
'@babel/generator': 7.18.7
'@babel/plugin-syntax-typescript': 7.18.6(@babel/[email protected])
'@babel/traverse': 7.18.6
- '@babel/types': 7.18.7
+ '@babel/types': 7.21.2
'@jest/transform': 27.5.1
'@jest/types': 27.5.1
'@types/babel__traverse': 7.17.1
@@ -15545,7 +15872,7 @@ packages:
engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0}
dependencies:
'@jest/types': 27.5.1
- '@types/node': 17.0.45
+ '@types/node': 18.16.17
chalk: 4.1.2
ci-info: 3.3.2
graceful-fs: 4.2.10
@@ -15557,7 +15884,7 @@ packages:
engines: {node: ^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0}
dependencies:
'@jest/types': 28.1.1
- '@types/node': 18.11.10
+ '@types/node': 18.16.17
chalk: 4.1.2
ci-info: 3.3.2
graceful-fs: 4.2.10
@@ -15569,7 +15896,7 @@ packages:
engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0}
dependencies:
'@jest/types': 29.4.1
- '@types/node': 18.11.10
+ '@types/node': 18.16.17
chalk: 4.1.2
ci-info: 3.3.2
graceful-fs: 4.2.10
@@ -15581,7 +15908,7 @@ packages:
engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0}
dependencies:
'@jest/types': 29.5.0
- '@types/node': 18.11.10
+ '@types/node': 18.16.17
chalk: 4.1.2
ci-info: 3.3.2
graceful-fs: 4.2.10
@@ -15593,7 +15920,7 @@ packages:
engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0}
dependencies:
'@jest/types': 29.5.0
- '@types/node': 18.11.10
+ '@types/node': 18.16.17
chalk: 4.1.2
ci-info: 3.3.2
graceful-fs: 4.2.10
@@ -15630,7 +15957,7 @@ packages:
dependencies:
'@jest/test-result': 27.5.1
'@jest/types': 27.5.1
- '@types/node': 18.11.10
+ '@types/node': 18.16.17
ansi-escapes: 4.3.2
chalk: 4.1.2
jest-util: 27.5.1
@@ -15643,7 +15970,7 @@ packages:
dependencies:
'@jest/test-result': 29.4.1
'@jest/types': 29.5.0
- '@types/node': 18.11.10
+ '@types/node': 18.16.17
ansi-escapes: 4.3.2
chalk: 4.1.2
emittery: 0.13.1
@@ -15655,7 +15982,7 @@ packages:
resolution: {integrity: sha512-KWYVV1c4i+jbMpaBC+U++4Va0cp8OisU185o73T1vo99hqi7w8tSJfUXYswwqqrjzwxa6KpRK54WhPvwf5w6PQ==}
engines: {node: '>= 10.13.0'}
dependencies:
- '@types/node': 18.11.10
+ '@types/node': 18.16.17
merge-stream: 2.0.0
supports-color: 7.2.0
dev: true
@@ -15664,7 +15991,7 @@ packages:
resolution: {integrity: sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==}
engines: {node: '>= 10.13.0'}
dependencies:
- '@types/node': 18.11.10
+ '@types/node': 18.16.17
merge-stream: 2.0.0
supports-color: 8.1.1
@@ -15672,7 +15999,7 @@ packages:
resolution: {integrity: sha512-O9doU/S1EBe+yp/mstQ0VpPwpv0Clgn68TkNwGxL6/usX/KUW9Arnn4ag8C3jc6qHcXznhsT5Na1liYzAsuAbQ==}
engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0}
dependencies:
- '@types/node': 18.11.10
+ '@types/node': 18.16.17
jest-util: 29.5.0
merge-stream: 2.0.0
supports-color: 8.1.1
@@ -15785,7 +16112,7 @@ packages:
cssom: 0.4.4
cssstyle: 2.3.0
data-urls: 2.0.0
- decimal.js: 10.3.1
+ decimal.js: 10.4.3
domexception: 2.0.1
escodegen: 2.0.0
form-data: 3.0.1
@@ -15793,11 +16120,11 @@ packages:
http-proxy-agent: 4.0.1
https-proxy-agent: 5.0.1
is-potential-custom-element-name: 1.0.1
- nwsapi: 2.2.1
+ nwsapi: 2.2.5
parse5: 6.0.1
saxes: 5.0.1
symbol-tree: 3.2.4
- tough-cookie: 4.0.0
+ tough-cookie: 4.1.2
w3c-hr-time: 1.0.2
w3c-xmlserializer: 2.0.0
webidl-conversions: 6.1.0
@@ -15845,7 +16172,7 @@ packages:
whatwg-encoding: 2.0.0
whatwg-mimetype: 3.0.0
whatwg-url: 11.0.0
- ws: 8.12.1
+ ws: 8.13.0
xml-name-validator: 4.0.0
transitivePeerDependencies:
- bufferutil
@@ -16619,7 +16946,7 @@ packages:
dependencies:
'@types/node': 17.0.45
resolution: {integrity: sha512-R2f/jxYqCAGI19KhAvaxSOxALBMkaXWH2a7rOyqQw+ZmizX5bKkEYWLzdhC+U82ZVVPVp6MCXe3EkVligh+12g==}
engines: {node: '>=13'}
peerDependencies:
@@ -16628,7 +16955,7 @@ packages:
'@types/node':
optional: true
dependencies:
- '@types/node': 18.11.10
+ '@types/node': 18.16.17
dev: true
@@ -16718,6 +17045,10 @@ packages:
dependencies:
yallist: 4.0.0
+ resolution: {integrity: sha512-PNxA/X8pWk+TiqPbsoIYH0GQ5Di7m6326/lwU/S4mlo4wGQddIcf/V//1f9TB0V4j59b57b+HZxt8h3iMROGvg==}
+ dev: false
+
resolution: {integrity: sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==}
engines: {node: '>= 8'}
@@ -17206,6 +17537,12 @@ packages:
engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1}
hasBin: true
+ resolution: {integrity: sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==}
+ engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1}
+ hasBin: true
+ dev: true
+
resolution: {integrity: sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==}
dev: true
@@ -17366,14 +17703,14 @@ packages:
resolution: {integrity: sha512-2vPPEi+Z7WqML2jZYddDIfy5Dqb0r2fze2zTxNNknZaFpVHU3mFB3R+DWeJWGVx0ecvttSGlJTI+WG+8Z4cDWw==}
- resolution: {integrity: sha512-JYOWTeFoS0Z93587vRJgASD5Ut11fYl5NyihP3KrYBvMe1FRRs6RN7m20SA/16GM4P6hTnZjT+UmDOt38UeXNg==}
- dev: true
-
resolution: {integrity: sha512-90yv+6538zuvUMnN+zCr8LuV6bPFdq50304114vJYJ8RDyK8D5O9Phpbd6SZWgI7PwzmmfN1upeOJlvybDSgCw==}
dev: true
+ resolution: {integrity: sha512-6xpotnECFy/og7tKSBVmUNft7J3jyXAka4XvG6AUhFWRz+Q/Ljus7znJAA3bxColfQLdS+XsjoodtJfCgeTEFQ==}
+ dev: true
+
resolution: {integrity: sha512-a5ERWK1kh38ExDEfoO6qUHJb32rd7aYmPHuyCu3Fta/cnICvYmgd2uhuKXvPD+PXB+gCEYYEaQdIRAjCOwAKNA==}
dev: false
@@ -17995,6 +18332,15 @@ packages:
picocolors: 1.0.0
source-map-js: 1.0.2
+ resolution: {integrity: sha512-M0RzbcI0sO/XJNucsGjvWU9ERWxb/ytp1w6dKtxTKgixdtQDq4rmx/g8W1hnaheq9jgwL/oyEdH5Bc4WwJKMqg==}
+ engines: {node: ^10 || ^12 || >=14}
+ dependencies:
+ nanoid: 3.3.6
+ picocolors: 1.0.0
+ source-map-js: 1.0.2
+ dev: true
+
resolution: {integrity: sha512-3b/ZUrCIXRG3Eh3P6usiBYSZbCHTwMsJJ1l2RID/rdv/EC8YyhVS5PKGKdpYrRB69F/fETD9lOAuhvCwj0h71w==}
engines: {node: '>=10'}
@@ -18166,7 +18512,7 @@ packages:
'@protobufjs/pool': 1.1.0
'@protobufjs/utf8': 1.1.0
'@types/long': 4.0.2
- '@types/node': 18.11.10
+ '@types/node': 18.16.17
long: 4.0.0
dev: false
@@ -18937,7 +19283,7 @@ packages:
dependencies:
jszip: 3.10.0
tmp: 0.2.1
- ws: 8.12.1
+ ws: 8.13.0
transitivePeerDependencies:
- bufferutil
- utf-8-validate
@@ -19789,7 +20135,7 @@ packages:
resolve-from: 2.0.0
dev: false
resolution: {integrity: sha512-kfLFk+PoLUQIbLmB1+PZDMRSZS99Mp+/MHqDNmMA6tOItzRt+Npe3E+fsMs5mfcM0wCtrrdU387UnV+vnSffXQ==}
engines: {node: '>= 10.13.0'}
peerDependencies:
@@ -19806,12 +20152,12 @@ packages:
optional: true
dependencies:
'@jridgewell/trace-mapping': 0.3.14
- esbuild: 0.16.17
+ esbuild: 0.17.19
jest-worker: 27.5.1
schema-utils: 3.1.1
serialize-javascript: 6.0.0
terser: 5.14.1
- webpack: 5.74.0([email protected])
+ webpack: 5.74.0([email protected])
resolution: {integrity: sha512-+ahUAE+iheqBTDxXhTisdA8hgvbEG1hHOQ9xmNjeUJSoi6DU/gMrKNcfZjHkyY6Alnuyc+ikYJaxxfHkT3+WuQ==}
@@ -19946,7 +20292,7 @@ packages:
dev: true
- resolution: {integrity: sha512-LhVdShQD/4Mk4zXNroIQZJC+Ap3zgLcDuwEdcmLv9CCO73NWockQDwyUnW/m8VX/EElfL6FcYx7EeutN4HJA6A==}
+ resolution: {integrity: sha1-F+bBH3PdTz10zaek/zI46a2b+JA=}
dev: false
@@ -19976,15 +20322,6 @@ packages:
engines: {node: '>=6'}
dev: true
- resolution: {integrity: sha512-tHdtEpQCMrc1YLrMaqXXcj6AxhYi/xgit6mZu1+EDWUn+qhUf8wMQoFIy9NXuq23zAwtcB0t/MjACGR18pcRbg==}
- engines: {node: '>=6'}
- dependencies:
- psl: 1.9.0
- punycode: 2.1.1
- universalify: 0.1.2
- dev: true
-
resolution: {integrity: sha512-G9fqXWoYFZgTc2z8Q5zaHy/vJMjm+WV0AkAeHxVCQiEB1b+dGvWzFW6QV07cY5jQ5gRkeid2qIkzkxUnmoQZUQ==}
engines: {node: '>=6'}
@@ -20129,7 +20466,7 @@ packages:
micromatch: 4.0.5
semver: 7.3.8
typescript: 4.9.3
- webpack: 5.74.0([email protected])
+ webpack: 5.74.0([email protected])
dev: true
@@ -20143,7 +20480,7 @@ packages:
code-block-writer: 11.0.3
dev: true
resolution: {integrity: sha512-ywMrhCfH6M75yftYvrvNarLEY+SUXtUvU8/0Z6llrHQVBx12GiFk5sStF8UdfE/yfzk9IAq7O5EEbTQsxlBI8w==}
engines: {node: '>=0.8.0'}
hasBin: true
@@ -20162,7 +20499,7 @@ packages:
rimraf: 2.7.1
source-map-support: 0.5.21
tree-kill: 1.2.2
- ts-node: 10.9.1(@types/[email protected])([email protected])
+ ts-node: 10.9.1(@types/[email protected])([email protected])
tsconfig: 7.0.0
typescript: 4.9.3
transitivePeerDependencies:
@@ -20171,7 +20508,7 @@ packages:
- '@types/node'
dev: false
resolution: {integrity: sha512-LYdGnoGddf1D6v8REPtIH+5iq/gTDuZqv2/UJUU7tKjuEU8xVZorBM+buCGNjj+pGEud+sOoM4CX3/YzINpENA==}
hasBin: true
peerDependencies:
@@ -20190,7 +20527,7 @@ packages:
'@tsconfig/node12': 1.0.11
'@tsconfig/node14': 1.0.3
'@tsconfig/node16': 1.0.3
- '@types/node': 17.0.45
+ '@types/node': 18.16.17
acorn: 8.8.2
acorn-walk: 8.2.0
arg: 4.1.3
@@ -20231,6 +20568,37 @@ packages:
typescript: 4.9.3
v8-compile-cache-lib: 3.0.1
yn: 3.1.1
+ dev: true
+
+ resolution: {integrity: sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==}
+ hasBin: true
+ peerDependencies:
+ '@swc/core': '>=1.2.50'
+ '@swc/wasm': '>=1.2.50'
+ '@types/node': '*'
+ typescript: '>=2.7'
+ peerDependenciesMeta:
+ '@swc/core':
+ optional: true
+ '@swc/wasm':
+ optional: true
+ dependencies:
+ '@cspotcode/source-map-support': 0.8.1
+ '@tsconfig/node10': 1.0.9
+ '@tsconfig/node12': 1.0.11
+ '@tsconfig/node14': 1.0.3
+ '@tsconfig/node16': 1.0.3
+ '@types/node': 18.16.17
+ acorn: 8.8.2
+ acorn-walk: 8.2.0
+ arg: 4.1.3
+ create-require: 1.1.1
+ diff: 4.0.2
+ make-error: 1.3.6
+ typescript: 4.9.3
+ v8-compile-cache-lib: 3.0.1
+ yn: 3.1.1
resolution: {integrity: sha512-hPlt7ZACERQGf03M253ytLY3dHbGNGrAq9qIHWUY9XHYl1z7wYngSr3OQ5xmui8o2AaxsONxIzjafLUiWBo1Fg==}
@@ -20564,7 +20932,7 @@ packages:
resolution: {integrity: sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==}
engines: {node: '>= 0.8'}
resolution: {integrity: sha512-vPyVfNREH88dP6gszdaoGkAEFPpiScXj1A8eWN905jQgT53A3tsiPEiqJjCHOUVcsUaREt2JSudzumFOsCA78A==}
peerDependencies:
'@svgr/core': '>=5.5.0'
@@ -20588,7 +20956,7 @@ packages:
debug: 4.3.4([email protected])
kolorist: 1.5.1
local-pkg: 0.4.2
transitivePeerDependencies:
- esbuild
- rollup
@@ -20625,7 +20993,7 @@ packages:
- supports-color
dev: true
resolution: {integrity: sha512-U7uOMNmRJ2eAv9CNjP8QRvxs6nAe3FVQUEIUphC1FGguBp3BWSLgGAcSHaX2nQy0gFoDY2mLF2M52W/t/eDaKg==}
engines: {node: '>=14'}
peerDependencies:
@@ -20644,7 +21012,7 @@ packages:
magic-string: 0.26.7
minimatch: 5.1.0
resolve: 1.22.1
vue: 3.2.45
transitivePeerDependencies:
- esbuild
@@ -20653,7 +21021,7 @@ packages:
- vite
- webpack
resolution: {integrity: sha512-Z6hNDXDNh9aimMkPU1mEjtk+2ova8gh0y7rJeJdGH1vWZOHwF2lLQiQ/R97rv9ymmzEQXsR2fyMet72T8jy6ew==}
peerDependencies:
esbuild: '>=0.13'
@@ -20672,14 +21040,14 @@ packages:
dependencies:
acorn: 8.8.2
chokidar: 3.5.3
- esbuild: 0.16.17
+ esbuild: 0.17.19
rollup: 2.79.1
- webpack: 5.74.0([email protected])
+ webpack: 5.74.0([email protected])
webpack-sources: 3.2.3
webpack-virtual-modules: 0.4.4
resolution: {integrity: sha512-luraheyfxwtvkvHpsOvMNv7IjLdORTWKZp0gWYNHGLi2ImON3iIZOj464qEyyEwLA/EMt12fC415HW9zRpOfTg==}
peerDependencies:
esbuild: '>=0.13'
@@ -20698,7 +21066,7 @@ packages:
dependencies:
acorn: 8.8.2
chokidar: 3.5.3
- esbuild: 0.16.17
+ esbuild: 0.17.19
rollup: 2.79.1
webpack-sources: 3.2.3
@@ -20873,7 +21241,7 @@ packages:
pathe: 0.2.0
source-map: 0.6.1
source-map-support: 0.5.21
transitivePeerDependencies:
- '@types/node'
- less
@@ -20894,7 +21262,7 @@ packages:
mlly: 1.2.0
pathe: 1.1.0
picocolors: 1.0.0
transitivePeerDependencies:
- '@types/node'
- less
@@ -20905,7 +21273,7 @@ packages:
- terser
dev: true
resolution: {integrity: sha512-dTQ1DCLwl2aEseov7cfQ+kDMNJpM1ebpyMMMwWzBvLbis8Nla/6c9WQcqpPssTwS6Rp/+U6KwlIj8Eapw4bLdA==}
engines: {node: '>=v14.18.0'}
hasBin: true
@@ -20915,7 +21283,7 @@ packages:
mlly: 1.2.0
pathe: 1.1.0
picocolors: 1.0.0
transitivePeerDependencies:
- '@types/node'
- less
@@ -21336,8 +21704,8 @@ packages:
optionalDependencies:
fsevents: 2.3.2
- resolution: {integrity: sha512-Z2X6SRAffOUYTa+sLy3NQ7nlHFU100xwanq1WDwqaiFiCe+25zdxP1TfCS5ojPV2oDDcXudHIoPnI1Z/66B7Yw==}
+ resolution: {integrity: sha512-xevPU7M8FU0i/80DMR+YhgrzR5KS2ORy1B4xcX/cXLsvnUWvfHuqMmVU6N0YiJ4JWGRJJsLCgjEzKjG9/GKoSw==}
engines: {node: ^14.18.0 || >=16.0.0}
hasBin: true
peerDependencies:
@@ -21361,19 +21729,52 @@ packages:
terser:
optional: true
dependencies:
- '@types/node': 18.11.10
- esbuild: 0.15.15
+ '@types/node': 17.0.45
+ esbuild: 0.16.17
postcss: 8.4.21
resolve: 1.22.1
- rollup: 2.79.1
+ rollup: 3.24.0
+ optionalDependencies:
+ fsevents: 2.3.2
+ dev: true
+
+ resolution: {integrity: sha512-qsTNZjO9NoJNW7KnOrgYwczm0WctJ8m/yqYAMAK9Lxt4SoySUfS5S8ia9K7JHpa3KEeMfyF8LoJ3c5NeBJy6pg==}
+ engines: {node: ^14.18.0 || >=16.0.0}
+ hasBin: true
+ peerDependencies:
+ '@types/node': '>= 14'
+ less: '*'
+ sass: '*'
+ stylus: '*'
+ sugarss: '*'
+ terser: ^5.4.0
+ peerDependenciesMeta:
+ '@types/node':
+ optional: true
+ less:
+ optional: true
+ sass:
+ optional: true
+ stylus:
+ optional: true
+ sugarss:
+ optional: true
+ terser:
+ optional: true
+ dependencies:
+ '@types/node': 17.0.45
+ esbuild: 0.17.19
+ postcss: 8.4.24
+ rollup: 3.24.0
sass: 1.53.0
terser: 5.14.1
optionalDependencies:
fsevents: 2.3.2
dev: true
- resolution: {integrity: sha512-xevPU7M8FU0i/80DMR+YhgrzR5KS2ORy1B4xcX/cXLsvnUWvfHuqMmVU6N0YiJ4JWGRJJsLCgjEzKjG9/GKoSw==}
+ resolution: {integrity: sha512-qsTNZjO9NoJNW7KnOrgYwczm0WctJ8m/yqYAMAK9Lxt4SoySUfS5S8ia9K7JHpa3KEeMfyF8LoJ3c5NeBJy6pg==}
engines: {node: ^14.18.0 || >=16.0.0}
hasBin: true
peerDependencies:
@@ -21397,11 +21798,12 @@ packages:
terser:
optional: true
dependencies:
- '@types/node': 17.0.45
- esbuild: 0.16.17
- postcss: 8.4.21
- resolve: 1.22.1
+ '@types/node': 18.16.17
+ esbuild: 0.17.19
+ postcss: 8.4.24
rollup: 3.24.0
+ sass: 1.53.0
+ terser: 5.14.1
optionalDependencies:
fsevents: 2.3.2
dev: true
@@ -21503,7 +21905,7 @@ packages:
dependencies:
'@types/chai': 4.3.5
'@types/chai-subset': 1.3.3
- '@types/node': 18.11.10
+ '@types/node': 18.16.17
'@vitest/expect': 0.32.2
'@vitest/runner': 0.32.2
'@vitest/snapshot': 0.32.2
@@ -21523,8 +21925,8 @@ packages:
strip-literal: 1.0.1
tinybench: 2.5.0
tinypool: 0.5.0
why-is-node-running: 2.2.2
transitivePeerDependencies:
- less
@@ -21737,10 +22139,10 @@ packages:
dependencies:
debug: 4.3.4([email protected])
eslint: 8.24.0
- eslint-scope: 7.1.1
- eslint-visitor-keys: 3.3.0
- espree: 9.4.0
- esquery: 1.4.0
+ eslint-scope: 7.2.0
+ eslint-visitor-keys: 3.4.1
+ espree: 9.5.2
+ esquery: 1.5.0
lodash: 4.17.21
semver: 7.3.8
transitivePeerDependencies:
@@ -21755,10 +22157,10 @@ packages:
dependencies:
debug: 4.3.4([email protected])
eslint: 8.29.0
- eslint-scope: 7.1.1
- eslint-visitor-keys: 3.3.0
- espree: 9.4.0
- esquery: 1.4.0
+ eslint-scope: 7.2.0
+ eslint-visitor-keys: 3.4.1
+ espree: 9.5.2
+ esquery: 1.5.0
lodash: 4.17.21
semver: 7.3.8
transitivePeerDependencies:
@@ -21812,7 +22214,7 @@ packages:
hash-sum: 2.0.0
loader-utils: 2.0.4
vue: 3.2.45
- webpack: 5.74.0([email protected])
+ webpack: 5.74.0([email protected])
dev: true
@@ -22059,7 +22461,7 @@ packages:
resolution: {integrity: sha512-kyDivFZ7ZM0BVOUteVbDFhlRt7Ah/CSPwJdi8hBpkK7QLumUqdLtVfm/PX/hkcnrvr0i77fO5+TjZ94Pe+C9iw==}
dev: true
resolution: {integrity: sha512-A2InDwnhhGN4LYctJj6M1JEaGL7Luj6LOmyBHjcI8529cm5p6VXiTIW2sn6ffvEAKmveLzvu4jrihwXtPojlAA==}
engines: {node: '>=10.13.0'}
hasBin: true
@@ -22090,7 +22492,7 @@ packages:
neo-async: 2.6.2
schema-utils: 3.1.1
tapable: 2.2.1
- terser-webpack-plugin: 5.3.6([email protected])([email protected])
+ terser-webpack-plugin: 5.3.6([email protected])([email protected])
watchpack: 2.4.0
webpack-sources: 3.2.3
transitivePeerDependencies:
@@ -22254,7 +22656,7 @@ packages:
resolution: {integrity: sha512-RNGKj82nUPg3g5ygxkQl0R937xLyho1J24ItRCBTr/m1YnZkzJy1hUiHUJrc/VlsDQzsCnInEGSg3bci0Lmd4w==}
engines: {node: '>= 10.0.0'}
dependencies:
- '@babel/parser': 7.21.2
+ '@babel/parser': 7.22.5
'@babel/types': 7.21.2
assert-never: 1.2.1
babel-walk: 3.0.0-canary-5
@@ -22494,6 +22896,19 @@ packages:
optional: true
utf-8-validate:
optional: true
+ dev: true
+
+ resolution: {integrity: sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA==}
+ engines: {node: '>=10.0.0'}
+ peerDependencies:
+ bufferutil: ^4.0.1
+ utf-8-validate: '>=5.0.2'
+ peerDependenciesMeta:
+ bufferutil:
+ optional: true
+ utf-8-validate:
+ optional: true
resolution: {integrity: sha512-wBuoj1BDpC6ZQ1B7DWQBYVLphPWkm8i9Y0/3YdHjHKHiohOJ1ws+3OccDWtH+PoC9DZD5WOTrJvNbWvjS6JWaA==}
@@ -22700,7 +23115,7 @@ packages:
dev: false
- resolution: {integrity: sha512-8HFIh676uyGYP6wP13R/j6OJ/1HwJ46snpvzE7aHAN3Ryqh2yX6Xox2B4CUmTwwOIzlG3Bs7ocsP5dZH/R1Qbg==}
+ resolution: {integrity: sha1-AI4G2AlDIMNy28L47XagymyKxBk=}
dev: false