chore: bump dependencies (#3258)
Co-authored-by: Andrew Bastin <andrewbastin.k@gmail.com>
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
module.exports = {
|
||||
semi: false
|
||||
semi: false,
|
||||
trailingComma: "es5",
|
||||
singleQuote: false,
|
||||
printWidth: 80,
|
||||
useTabs: false,
|
||||
tabWidth: 2
|
||||
}
|
||||
|
||||
@@ -17,12 +17,12 @@
|
||||
"types": "dist/index.d.ts",
|
||||
"sideEffects": false,
|
||||
"dependencies": {
|
||||
"@codemirror/language": "^6.2.0",
|
||||
"@lezer/highlight": "^1.0.0",
|
||||
"@lezer/lr": "^1.2.0"
|
||||
"@codemirror/language": "^6.9.0",
|
||||
"@lezer/highlight": "^1.1.6",
|
||||
"@lezer/lr": "^1.3.10"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@lezer/generator": "^1.1.0",
|
||||
"@lezer/generator": "^1.5.0",
|
||||
"mocha": "^9.2.2",
|
||||
"rollup": "^2.70.2",
|
||||
"rollup-plugin-dts": "^4.2.1",
|
||||
|
||||
@@ -29,8 +29,18 @@ module.exports = {
|
||||
"import/named": "off", // because, named import issue with typescript see: https://github.com/typescript-eslint/typescript-eslint/issues/154
|
||||
"no-console": "off",
|
||||
"no-debugger": process.env.HOPP_LINT_FOR_PROD === "true" ? "error" : "warn",
|
||||
"prettier/prettier":
|
||||
"prettier/prettier": [
|
||||
process.env.HOPP_LINT_FOR_PROD === "true" ? "error" : "warn",
|
||||
{},
|
||||
{
|
||||
semi: false,
|
||||
trailingComma: "es5",
|
||||
singleQuote: false,
|
||||
printWidth: 80,
|
||||
useTabs: false,
|
||||
tabWidth: 2,
|
||||
},
|
||||
],
|
||||
"vue/multi-word-component-names": "off",
|
||||
"vue/no-side-effects-in-computed-properties": "off",
|
||||
"import/no-named-as-default": "off",
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
module.exports = {
|
||||
semi: false
|
||||
semi: false,
|
||||
trailingComma: "es5",
|
||||
singleQuote: false,
|
||||
printWidth: 80,
|
||||
useTabs: false,
|
||||
tabWidth: 2
|
||||
}
|
||||
|
||||
@@ -22,140 +22,140 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@apidevtools/swagger-parser": "^10.1.0",
|
||||
"@codemirror/autocomplete": "^6.0.3",
|
||||
"@codemirror/commands": "^6.0.1",
|
||||
"@codemirror/lang-javascript": "^6.0.1",
|
||||
"@codemirror/lang-json": "^6.0.0",
|
||||
"@codemirror/lang-xml": "^6.0.0",
|
||||
"@codemirror/language": "^6.2.0",
|
||||
"@codemirror/legacy-modes": "^6.1.0",
|
||||
"@codemirror/lint": "^6.0.0",
|
||||
"@codemirror/search": "^6.0.0",
|
||||
"@codemirror/state": "^6.1.0",
|
||||
"@codemirror/view": "^6.0.2",
|
||||
"@fontsource-variable/inter": "^5.0.5",
|
||||
"@fontsource-variable/material-symbols-rounded": "^5.0.5",
|
||||
"@fontsource-variable/roboto-mono": "^5.0.6",
|
||||
"@codemirror/autocomplete": "^6.9.0",
|
||||
"@codemirror/commands": "^6.2.4",
|
||||
"@codemirror/lang-javascript": "^6.1.9",
|
||||
"@codemirror/lang-json": "^6.0.1",
|
||||
"@codemirror/lang-xml": "^6.0.2",
|
||||
"@codemirror/language": "^6.9.0",
|
||||
"@codemirror/legacy-modes": "^6.3.3",
|
||||
"@codemirror/lint": "^6.4.0",
|
||||
"@codemirror/search": "^6.5.1",
|
||||
"@codemirror/state": "^6.2.1",
|
||||
"@codemirror/view": "^6.16.0",
|
||||
"@fontsource-variable/inter": "^5.0.8",
|
||||
"@fontsource-variable/material-symbols-rounded": "^5.0.7",
|
||||
"@fontsource-variable/roboto-mono": "^5.0.9",
|
||||
"@hoppscotch/codemirror-lang-graphql": "workspace:^",
|
||||
"@hoppscotch/data": "workspace:^",
|
||||
"@hoppscotch/js-sandbox": "workspace:^",
|
||||
"@hoppscotch/ui": "workspace:^",
|
||||
"@hoppscotch/vue-toasted": "^0.1.0",
|
||||
"@lezer/highlight": "^1.0.0",
|
||||
"@sentry/tracing": "^7.13.0",
|
||||
"@sentry/vue": "^7.13.0",
|
||||
"@urql/core": "^2.5.0",
|
||||
"@lezer/highlight": "^1.1.6",
|
||||
"@sentry/tracing": "^7.64.0",
|
||||
"@sentry/vue": "^7.64.0",
|
||||
"@urql/core": "^4.1.1",
|
||||
"@urql/devtools": "^2.0.3",
|
||||
"@urql/exchange-auth": "^0.1.7",
|
||||
"@urql/exchange-graphcache": "^4.4.3",
|
||||
"@vitejs/plugin-legacy": "^2.3.0",
|
||||
"@vueuse/core": "^8.9.4",
|
||||
"@vueuse/head": "^0.7.9",
|
||||
"@urql/exchange-auth": "^2.1.6",
|
||||
"@urql/exchange-graphcache": "^6.3.2",
|
||||
"@vitejs/plugin-legacy": "^4.1.1",
|
||||
"@vueuse/core": "^10.3.0",
|
||||
"@vueuse/head": "^1.3.1",
|
||||
"acorn-walk": "^8.2.0",
|
||||
"axios": "^0.21.4",
|
||||
"axios": "^1.4.0",
|
||||
"buffer": "^6.0.3",
|
||||
"dioc": "workspace:^",
|
||||
"esprima": "^4.0.1",
|
||||
"events": "^3.3.0",
|
||||
"fp-ts": "^2.12.1",
|
||||
"fp-ts": "^2.16.1",
|
||||
"fuse.js": "^6.6.2",
|
||||
"globalthis": "^1.0.3",
|
||||
"graphql": "^15.5.0",
|
||||
"graphql": "^16.8.0",
|
||||
"graphql-language-service-interface": "^2.9.1",
|
||||
"graphql-tag": "^2.12.6",
|
||||
"httpsnippet": "^2.0.0",
|
||||
"insomnia-importers": "^3.3.0",
|
||||
"io-ts": "^2.2.16",
|
||||
"httpsnippet": "^3.0.1",
|
||||
"insomnia-importers": "^3.6.0",
|
||||
"io-ts": "^2.2.20",
|
||||
"js-yaml": "^4.1.0",
|
||||
"jsonpath-plus": "^7.0.0",
|
||||
"jsonpath-plus": "^7.2.0",
|
||||
"lodash-es": "^4.17.21",
|
||||
"lossless-json": "^2.0.8",
|
||||
"lossless-json": "^2.0.11",
|
||||
"minisearch": "^6.1.0",
|
||||
"nprogress": "^0.2.0",
|
||||
"paho-mqtt": "^1.1.0",
|
||||
"path": "^0.12.7",
|
||||
"postman-collection": "^4.1.4",
|
||||
"postman-collection": "^4.2.0",
|
||||
"process": "^0.11.10",
|
||||
"qs": "^6.10.3",
|
||||
"rxjs": "^7.5.5",
|
||||
"qs": "^6.11.2",
|
||||
"rxjs": "^7.8.1",
|
||||
"socket.io-client-v2": "npm:socket.io-client@^2.4.0",
|
||||
"socket.io-client-v3": "npm:socket.io-client@^3.1.3",
|
||||
"socket.io-client-v4": "npm:socket.io-client@^4.4.1",
|
||||
"socketio-wildcard": "^2.0.0",
|
||||
"splitpanes": "^3.1.1",
|
||||
"splitpanes": "^3.1.5",
|
||||
"stream-browserify": "^3.0.0",
|
||||
"subscriptions-transport-ws": "^0.11.0",
|
||||
"tern": "^0.24.3",
|
||||
"timers": "^0.1.1",
|
||||
"tippy.js": "^6.3.7",
|
||||
"url": "^0.11.0",
|
||||
"util": "^0.12.4",
|
||||
"uuid": "^8.3.2",
|
||||
"vue": "^3.2.25",
|
||||
"url": "^0.11.1",
|
||||
"util": "^0.12.5",
|
||||
"uuid": "^9.0.0",
|
||||
"vue": "^3.3.4",
|
||||
"vue-i18n": "^9.2.2",
|
||||
"vue-pdf-embed": "^1.1.4",
|
||||
"vue-router": "^4.0.16",
|
||||
"vue-tippy": "6.0.0-alpha.58",
|
||||
"vue-pdf-embed": "^1.1.6",
|
||||
"vue-router": "^4.2.4",
|
||||
"vue-tippy": "6.3.1",
|
||||
"vuedraggable-es": "^4.1.1",
|
||||
"wonka": "^4.0.15",
|
||||
"workbox-window": "^6.5.4",
|
||||
"xml-formatter": "^3.4.1",
|
||||
"wonka": "^6.3.4",
|
||||
"workbox-window": "^7.0.0",
|
||||
"xml-formatter": "^3.5.0",
|
||||
"yargs-parser": "^21.1.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@esbuild-plugins/node-globals-polyfill": "^0.1.1",
|
||||
"@esbuild-plugins/node-modules-polyfill": "^0.1.4",
|
||||
"@graphql-codegen/add": "^3.2.0",
|
||||
"@graphql-codegen/cli": "^2.8.0",
|
||||
"@graphql-codegen/typed-document-node": "^2.3.1",
|
||||
"@graphql-codegen/typescript": "^2.7.1",
|
||||
"@graphql-codegen/typescript-operations": "^2.5.1",
|
||||
"@graphql-codegen/typescript-urql-graphcache": "^2.3.1",
|
||||
"@graphql-codegen/urql-introspection": "^2.2.0",
|
||||
"@graphql-typed-document-node/core": "^3.1.1",
|
||||
"@iconify-json/lucide": "^1.1.109",
|
||||
"@esbuild-plugins/node-globals-polyfill": "^0.2.3",
|
||||
"@esbuild-plugins/node-modules-polyfill": "^0.2.2",
|
||||
"@graphql-codegen/add": "^5.0.0",
|
||||
"@graphql-codegen/cli": "^5.0.0",
|
||||
"@graphql-codegen/typed-document-node": "^5.0.1",
|
||||
"@graphql-codegen/typescript": "^4.0.1",
|
||||
"@graphql-codegen/typescript-operations": "^4.0.1",
|
||||
"@graphql-codegen/typescript-urql-graphcache": "^2.4.5",
|
||||
"@graphql-codegen/urql-introspection": "^2.2.1",
|
||||
"@graphql-typed-document-node/core": "^3.2.0",
|
||||
"@iconify-json/lucide": "^1.1.119",
|
||||
"@intlify/vite-plugin-vue-i18n": "^7.0.0",
|
||||
"@relmify/jest-fp-ts": "^2.1.1",
|
||||
"@rushstack/eslint-patch": "^1.1.4",
|
||||
"@rushstack/eslint-patch": "^1.3.3",
|
||||
"@types/js-yaml": "^4.0.5",
|
||||
"@types/lodash-es": "^4.17.6",
|
||||
"@types/lodash-es": "^4.17.8",
|
||||
"@types/lossless-json": "^1.0.1",
|
||||
"@types/nprogress": "^0.2.0",
|
||||
"@types/paho-mqtt": "^1.0.6",
|
||||
"@types/paho-mqtt": "^1.0.7",
|
||||
"@types/postman-collection": "^3.5.7",
|
||||
"@types/splitpanes": "^2.2.1",
|
||||
"@types/uuid": "^8.3.4",
|
||||
"@types/uuid": "^9.0.2",
|
||||
"@types/yargs-parser": "^21.0.0",
|
||||
"@typescript-eslint/eslint-plugin": "^5.19.0",
|
||||
"@typescript-eslint/parser": "^5.19.0",
|
||||
"@vitejs/plugin-vue": "^3.1.0",
|
||||
"@vue/compiler-sfc": "^3.2.39",
|
||||
"@vue/eslint-config-typescript": "^11.0.1",
|
||||
"@vue/runtime-core": "^3.2.39",
|
||||
"@typescript-eslint/eslint-plugin": "^6.4.0",
|
||||
"@typescript-eslint/parser": "^6.4.0",
|
||||
"@vitejs/plugin-vue": "^4.3.1",
|
||||
"@vue/compiler-sfc": "^3.3.4",
|
||||
"@vue/eslint-config-typescript": "^11.0.3",
|
||||
"@vue/runtime-core": "^3.3.4",
|
||||
"cross-env": "^7.0.3",
|
||||
"dotenv": "^16.0.3",
|
||||
"eslint": "^8.24.0",
|
||||
"eslint-plugin-prettier": "^4.2.1",
|
||||
"eslint-plugin-vue": "^9.5.1",
|
||||
"dotenv": "^16.3.1",
|
||||
"eslint": "^8.47.0",
|
||||
"eslint-plugin-prettier": "^5.0.0",
|
||||
"eslint-plugin-vue": "^9.17.0",
|
||||
"npm-run-all": "^4.1.5",
|
||||
"openapi-types": "^12.0.0",
|
||||
"rollup-plugin-polyfill-node": "^0.10.1",
|
||||
"sass": "^1.53.0",
|
||||
"typescript": "^4.5.4",
|
||||
"openapi-types": "^12.1.3",
|
||||
"rollup-plugin-polyfill-node": "^0.12.0",
|
||||
"sass": "^1.66.0",
|
||||
"typescript": "^5.1.6",
|
||||
"unplugin-fonts": "^1.0.3",
|
||||
"unplugin-icons": "^0.14.9",
|
||||
"unplugin-vue-components": "^0.21.0",
|
||||
"vite": "^3.1.4",
|
||||
"vite-plugin-checker": "^0.5.1",
|
||||
"vite-plugin-html-config": "^1.0.10",
|
||||
"vite-plugin-inspect": "^0.7.4",
|
||||
"vite-plugin-pages": "^0.26.0",
|
||||
"vite-plugin-pages-sitemap": "^1.4.5",
|
||||
"vite-plugin-pwa": "^0.13.1",
|
||||
"vite-plugin-vue-layouts": "^0.7.0",
|
||||
"vite-plugin-windicss": "^1.8.8",
|
||||
"vitest": "^0.32.2",
|
||||
"vue-tsc": "^0.38.2",
|
||||
"unplugin-icons": "^0.16.5",
|
||||
"unplugin-vue-components": "^0.25.1",
|
||||
"vite": "^4.4.9",
|
||||
"vite-plugin-checker": "^0.6.1",
|
||||
"vite-plugin-html-config": "^1.0.11",
|
||||
"vite-plugin-inspect": "^0.7.38",
|
||||
"vite-plugin-pages": "^0.31.0",
|
||||
"vite-plugin-pages-sitemap": "^1.6.1",
|
||||
"vite-plugin-pwa": "^0.16.4",
|
||||
"vite-plugin-vue-layouts": "^0.8.0",
|
||||
"vite-plugin-windicss": "^1.9.1",
|
||||
"vitest": "^0.34.2",
|
||||
"vue-tsc": "^1.8.8",
|
||||
"windicss": "^3.5.6"
|
||||
}
|
||||
}
|
||||
|
||||
15
packages/hoppscotch-common/src/components.d.ts
vendored
15
packages/hoppscotch-common/src/components.d.ts
vendored
@@ -1,11 +1,11 @@
|
||||
// generated by unplugin-vue-components
|
||||
// We suggest you to commit this file into source control
|
||||
/* eslint-disable */
|
||||
/* prettier-ignore */
|
||||
// @ts-nocheck
|
||||
// Generated by unplugin-vue-components
|
||||
// Read more: https://github.com/vuejs/core/pull/3399
|
||||
import '@vue/runtime-core'
|
||||
|
||||
export {}
|
||||
|
||||
declare module '@vue/runtime-core' {
|
||||
declare module 'vue' {
|
||||
export interface GlobalComponents {
|
||||
AppActionHandler: typeof import('./components/app/ActionHandler.vue')['default']
|
||||
AppAnnouncement: typeof import('./components/app/Announcement.vue')['default']
|
||||
@@ -86,6 +86,7 @@ declare module '@vue/runtime-core' {
|
||||
HoppSmartExpand: typeof import('@hoppscotch/ui')['HoppSmartExpand']
|
||||
HoppSmartFileChip: typeof import('@hoppscotch/ui')['HoppSmartFileChip']
|
||||
HoppSmartInput: typeof import('@hoppscotch/ui')['HoppSmartInput']
|
||||
HoppSmartIntersection: typeof import('@hoppscotch/ui')['HoppSmartIntersection']
|
||||
HoppSmartItem: typeof import('@hoppscotch/ui')['HoppSmartItem']
|
||||
HoppSmartLink: typeof import('@hoppscotch/ui')['HoppSmartLink']
|
||||
HoppSmartModal: typeof import('@hoppscotch/ui')['HoppSmartModal']
|
||||
@@ -131,6 +132,7 @@ declare module '@vue/runtime-core' {
|
||||
IconLucideAlertTriangle: typeof import('~icons/lucide/alert-triangle')['default']
|
||||
IconLucideArrowLeft: typeof import('~icons/lucide/arrow-left')['default']
|
||||
IconLucideArrowUpRight: typeof import('~icons/lucide/arrow-up-right')['default']
|
||||
IconLucideBrush: typeof import('~icons/lucide/brush')['default']
|
||||
IconLucideCheckCircle: typeof import('~icons/lucide/check-circle')['default']
|
||||
IconLucideChevronRight: typeof import('~icons/lucide/chevron-right')['default']
|
||||
IconLucideGlobe: typeof import('~icons/lucide/globe')['default']
|
||||
@@ -140,8 +142,10 @@ declare module '@vue/runtime-core' {
|
||||
IconLucideLayers: typeof import('~icons/lucide/layers')['default']
|
||||
IconLucideListEnd: typeof import('~icons/lucide/list-end')['default']
|
||||
IconLucideMinus: typeof import('~icons/lucide/minus')['default']
|
||||
IconLucideRss: typeof import('~icons/lucide/rss')['default']
|
||||
IconLucideSearch: typeof import('~icons/lucide/search')['default']
|
||||
IconLucideUsers: typeof import('~icons/lucide/users')['default']
|
||||
IconLucideVerified: typeof import('~icons/lucide/verified')['default']
|
||||
LensesHeadersRenderer: typeof import('./components/lenses/HeadersRenderer.vue')['default']
|
||||
LensesHeadersRendererEntry: typeof import('./components/lenses/HeadersRendererEntry.vue')['default']
|
||||
LensesRenderersAudioLensRenderer: typeof import('./components/lenses/renderers/AudioLensRenderer.vue')['default']
|
||||
@@ -206,5 +210,4 @@ declare module '@vue/runtime-core' {
|
||||
WorkspaceCurrent: typeof import('./components/workspace/Current.vue')['default']
|
||||
WorkspaceSelector: typeof import('./components/workspace/Selector.vue')['default']
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -80,7 +80,8 @@ const props = defineProps<{
|
||||
active: boolean
|
||||
}>()
|
||||
|
||||
const formattedShortcutKeys = computed(() =>
|
||||
const formattedShortcutKeys = computed(
|
||||
() =>
|
||||
props.entry.meta?.keyboardShortcut?.map((key) => {
|
||||
return SPECIAL_KEY_CHARS[key] ?? capitalize(key)
|
||||
})
|
||||
|
||||
@@ -57,28 +57,28 @@ const emit = defineEmits<{
|
||||
(e: "hide-modal"): void
|
||||
}>()
|
||||
|
||||
const name = ref("")
|
||||
const editingName = ref("")
|
||||
|
||||
watch(
|
||||
() => props.show,
|
||||
(show) => {
|
||||
if (!show) {
|
||||
name.value = ""
|
||||
editingName.value = ""
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
const addNewCollection = () => {
|
||||
if (!name.value) {
|
||||
if (!editingName.value) {
|
||||
toast.error(t("collection.invalid_name"))
|
||||
return
|
||||
}
|
||||
|
||||
emit("submit", name.value)
|
||||
emit("submit", editingName.value)
|
||||
}
|
||||
|
||||
const hideModal = () => {
|
||||
name.value = ""
|
||||
editingName.value = ""
|
||||
emit("hide-modal")
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -57,27 +57,27 @@ const emit = defineEmits<{
|
||||
(e: "add-folder", name: string): void
|
||||
}>()
|
||||
|
||||
const name = ref("")
|
||||
const editingName = ref("")
|
||||
|
||||
watch(
|
||||
() => props.show,
|
||||
(show) => {
|
||||
if (!show) {
|
||||
name.value = ""
|
||||
editingName.value = ""
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
const addFolder = () => {
|
||||
if (name.value.trim() === "") {
|
||||
if (editingName.value.trim() === "") {
|
||||
toast.error(t("folder.invalid_name"))
|
||||
return
|
||||
}
|
||||
emit("add-folder", name.value)
|
||||
emit("add-folder", editingName.value)
|
||||
}
|
||||
|
||||
const hideModal = () => {
|
||||
name.value = ""
|
||||
editingName.value = ""
|
||||
emit("hide-modal")
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -58,23 +58,23 @@ const emit = defineEmits<{
|
||||
(event: "add-request", name: string): void
|
||||
}>()
|
||||
|
||||
const name = ref("")
|
||||
const editingName = ref("")
|
||||
|
||||
watch(
|
||||
() => props.show,
|
||||
(show) => {
|
||||
if (show) {
|
||||
name.value = currentActiveTab.value.document.request.name
|
||||
editingName.value = currentActiveTab.value.document.request.name
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
const addRequest = () => {
|
||||
if (name.value.trim() === "") {
|
||||
if (editingName.value.trim() === "") {
|
||||
toast.error(`${t("error.empty_req_name")}`)
|
||||
return
|
||||
}
|
||||
emit("add-request", name.value)
|
||||
emit("add-request", editingName.value)
|
||||
}
|
||||
|
||||
const hideModal = () => {
|
||||
|
||||
@@ -59,26 +59,26 @@ const emit = defineEmits<{
|
||||
(e: "hide-modal"): void
|
||||
}>()
|
||||
|
||||
const name = ref("")
|
||||
const editingName = ref("")
|
||||
|
||||
watch(
|
||||
() => props.editingCollectionName,
|
||||
(newName) => {
|
||||
name.value = newName
|
||||
editingName.value = newName
|
||||
}
|
||||
)
|
||||
|
||||
const saveCollection = () => {
|
||||
if (name.value.trim() === "") {
|
||||
if (editingName.value.trim() === "") {
|
||||
toast.error(t("collection.invalid_name"))
|
||||
return
|
||||
}
|
||||
|
||||
emit("submit", name.value)
|
||||
emit("submit", editingName.value)
|
||||
}
|
||||
|
||||
const hideModal = () => {
|
||||
name.value = ""
|
||||
editingName.value = ""
|
||||
emit("hide-modal")
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -59,26 +59,26 @@ const emit = defineEmits<{
|
||||
(e: "hide-modal"): void
|
||||
}>()
|
||||
|
||||
const name = ref("")
|
||||
const editingName = ref("")
|
||||
|
||||
watch(
|
||||
() => props.editingFolderName,
|
||||
(newName) => {
|
||||
name.value = newName
|
||||
editingName.value = newName
|
||||
}
|
||||
)
|
||||
|
||||
const editFolder = () => {
|
||||
if (name.value.trim() === "") {
|
||||
if (editingName.value.trim() === "") {
|
||||
toast.error(t("folder.invalid_name"))
|
||||
return
|
||||
}
|
||||
|
||||
emit("submit", name.value)
|
||||
emit("submit", editingName.value)
|
||||
}
|
||||
|
||||
const hideModal = () => {
|
||||
name.value = ""
|
||||
editingName.value = ""
|
||||
emit("hide-modal")
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -60,19 +60,19 @@ const emit = defineEmits<{
|
||||
(e: "update:modelValue", value: string): void
|
||||
}>()
|
||||
|
||||
const name = useVModel(props, "modelValue")
|
||||
const editingName = useVModel(props, "modelValue")
|
||||
|
||||
const editRequest = () => {
|
||||
if (name.value.trim() === "") {
|
||||
if (editingName.value.trim() === "") {
|
||||
toast.error(t("request.invalid_name"))
|
||||
return
|
||||
}
|
||||
|
||||
emit("submit", name.value)
|
||||
emit("submit", editingName.value)
|
||||
}
|
||||
|
||||
const hideModal = () => {
|
||||
name.value = ""
|
||||
editingName.value = ""
|
||||
emit("hide-modal")
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -57,24 +57,24 @@ const emit = defineEmits<{
|
||||
): void
|
||||
}>()
|
||||
|
||||
const name = ref("")
|
||||
const editingName = ref("")
|
||||
|
||||
watch(
|
||||
() => props.show,
|
||||
(show) => {
|
||||
if (show) {
|
||||
name.value = getGQLSession().request.name
|
||||
editingName.value = getGQLSession().request.name
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
const addRequest = () => {
|
||||
if (!name.value) {
|
||||
if (!editingName.value) {
|
||||
toast.error(`${t("error.empty_req_name")}`)
|
||||
return
|
||||
}
|
||||
emit("add-request", {
|
||||
name: name.value,
|
||||
name: editingName.value,
|
||||
path: props.folderPath,
|
||||
})
|
||||
hideModal()
|
||||
|
||||
@@ -52,17 +52,17 @@ const emit = defineEmits<{
|
||||
const t = useI18n()
|
||||
const toast = useToast()
|
||||
|
||||
const name = ref<string | null>()
|
||||
const editingName = ref<string | null>()
|
||||
|
||||
watch(
|
||||
() => props.editingCollectionName,
|
||||
(val) => {
|
||||
name.value = val
|
||||
editingName.value = val
|
||||
}
|
||||
)
|
||||
|
||||
const saveCollection = () => {
|
||||
if (!name.value) {
|
||||
if (!editingName.value) {
|
||||
toast.error(`${t("collection.invalid_name")}`)
|
||||
return
|
||||
}
|
||||
@@ -70,7 +70,7 @@ const saveCollection = () => {
|
||||
// TODO: Better typechecking here ?
|
||||
const collectionUpdated = {
|
||||
...(props.editingCollection as any),
|
||||
name: name.value,
|
||||
name: editingName.value,
|
||||
}
|
||||
|
||||
editGraphqlCollection(props.editingCollectionIndex, collectionUpdated)
|
||||
@@ -78,7 +78,7 @@ const saveCollection = () => {
|
||||
}
|
||||
|
||||
const hideModal = () => {
|
||||
name.value = null
|
||||
editingName.value = null
|
||||
emit("hide-modal")
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
t("environment.name")
|
||||
}}</label>
|
||||
<input
|
||||
v-model="name"
|
||||
v-model="editingName"
|
||||
type="text"
|
||||
:placeholder="t('environment.variable')"
|
||||
class="input"
|
||||
@@ -88,7 +88,6 @@ const props = defineProps<{
|
||||
position: { top: number; left: number }
|
||||
name: string
|
||||
value: string
|
||||
replaceWithVariable: boolean
|
||||
}>()
|
||||
|
||||
const emit = defineEmits<{
|
||||
@@ -106,7 +105,7 @@ watch(
|
||||
scope.value = {
|
||||
type: "global",
|
||||
}
|
||||
name.value = ""
|
||||
editingName.value = ""
|
||||
replaceWithVariable.value = false
|
||||
}
|
||||
}
|
||||
@@ -132,22 +131,22 @@ const scope = ref<Scope>({
|
||||
|
||||
const replaceWithVariable = ref(false)
|
||||
|
||||
const name = ref("")
|
||||
const editingName = ref(props.name)
|
||||
|
||||
const addEnvironment = async () => {
|
||||
if (!name.value) {
|
||||
if (!editingName.value) {
|
||||
toast.error(`${t("environment.invalid_name")}`)
|
||||
return
|
||||
}
|
||||
if (scope.value.type === "global") {
|
||||
addGlobalEnvVariable({
|
||||
key: name.value,
|
||||
key: editingName.value,
|
||||
value: props.value,
|
||||
})
|
||||
toast.success(`${t("environment.updated")}`)
|
||||
} else if (scope.value.type === "my-environment") {
|
||||
addEnvironmentVariable(scope.value.index, {
|
||||
key: name.value,
|
||||
key: editingName.value,
|
||||
value: props.value,
|
||||
})
|
||||
toast.success(`${t("environment.updated")}`)
|
||||
@@ -155,7 +154,7 @@ const addEnvironment = async () => {
|
||||
const newVariables = [
|
||||
...scope.value.environment.environment.variables,
|
||||
{
|
||||
key: name.value,
|
||||
key: editingName.value,
|
||||
value: props.value,
|
||||
},
|
||||
]
|
||||
@@ -179,7 +178,7 @@ const addEnvironment = async () => {
|
||||
}
|
||||
if (replaceWithVariable.value) {
|
||||
//replace the current tab endpoint with the variable name with << and >>
|
||||
const variableName = `<<${name.value}>>`
|
||||
const variableName = `<<${editingName.value}>>`
|
||||
//replace the currenttab endpoint containing the value in the text with variablename
|
||||
currentActiveTab.value.document.request.endpoint =
|
||||
currentActiveTab.value.document.request.endpoint.replace(
|
||||
|
||||
@@ -171,7 +171,7 @@ const emit = defineEmits<{
|
||||
|
||||
const idTicker = ref(0)
|
||||
|
||||
const name = ref<string | null>(null)
|
||||
const editingName = ref<string | null>(null)
|
||||
const vars = ref<EnvironmentVariable[]>([
|
||||
{ id: idTicker.value++, env: { key: "", value: "" } },
|
||||
])
|
||||
@@ -224,10 +224,12 @@ const liveEnvs = computed(() => {
|
||||
}
|
||||
|
||||
if (props.editingEnvironmentIndex === "Global") {
|
||||
return [...vars.value.map((x) => ({ ...x.env, source: name.value! }))]
|
||||
return [
|
||||
...vars.value.map((x) => ({ ...x.env, source: editingName.value! })),
|
||||
]
|
||||
} else {
|
||||
return [
|
||||
...vars.value.map((x) => ({ ...x.env, source: name.value! })),
|
||||
...vars.value.map((x) => ({ ...x.env, source: editingName.value! })),
|
||||
...globalVars.value.map((x) => ({ ...x, source: "Global" })),
|
||||
]
|
||||
}
|
||||
@@ -237,7 +239,7 @@ watch(
|
||||
() => props.show,
|
||||
(show) => {
|
||||
if (show) {
|
||||
name.value = workingEnv.value?.name ?? null
|
||||
editingName.value = workingEnv.value?.name ?? null
|
||||
vars.value = pipe(
|
||||
workingEnv.value?.variables ?? [],
|
||||
A.map((e) => ({
|
||||
@@ -270,7 +272,7 @@ const removeEnvironmentVariable = (index: number) => {
|
||||
}
|
||||
|
||||
const saveEnvironment = () => {
|
||||
if (!name.value) {
|
||||
if (!editingName.value) {
|
||||
toast.error(`${t("environment.invalid_name")}`)
|
||||
return
|
||||
}
|
||||
@@ -286,13 +288,13 @@ const saveEnvironment = () => {
|
||||
)
|
||||
|
||||
const environmentUpdated: Environment = {
|
||||
name: name.value,
|
||||
name: editingName.value,
|
||||
variables: filterdVariables,
|
||||
}
|
||||
|
||||
if (props.action === "new") {
|
||||
// Creating a new environment
|
||||
createEnvironment(name.value, environmentUpdated.variables)
|
||||
createEnvironment(editingName.value, environmentUpdated.variables)
|
||||
setSelectedEnvironmentIndex({
|
||||
type: "MY_ENV",
|
||||
index: envList.value.length - 1,
|
||||
@@ -330,7 +332,7 @@ const saveEnvironment = () => {
|
||||
}
|
||||
|
||||
const hideModal = () => {
|
||||
name.value = null
|
||||
editingName.value = null
|
||||
emit("hide-modal")
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -182,7 +182,7 @@ const emit = defineEmits<{
|
||||
|
||||
const idTicker = ref(0)
|
||||
|
||||
const name = ref<string | null>(null)
|
||||
const editingName = ref<string | null>(null)
|
||||
const vars = ref<EnvironmentVariable[]>([
|
||||
{ id: idTicker.value++, env: { key: "", value: "" } },
|
||||
])
|
||||
@@ -208,7 +208,9 @@ const liveEnvs = computed(() => {
|
||||
if (evnExpandError.value) {
|
||||
return []
|
||||
} else {
|
||||
return [...vars.value.map((x) => ({ ...x.env, source: name.value! }))]
|
||||
return [
|
||||
...vars.value.map((x) => ({ ...x.env, source: editingName.value! })),
|
||||
]
|
||||
}
|
||||
})
|
||||
|
||||
@@ -217,7 +219,7 @@ watch(
|
||||
(show) => {
|
||||
if (show) {
|
||||
if (props.action === "new") {
|
||||
name.value = null
|
||||
editingName.value = null
|
||||
vars.value = pipe(
|
||||
props.envVars() ?? [],
|
||||
A.map((e: { key: string; value: string }) => ({
|
||||
@@ -226,7 +228,7 @@ watch(
|
||||
}))
|
||||
)
|
||||
} else if (props.editingEnvironment !== null) {
|
||||
name.value = props.editingEnvironment.environment.name ?? null
|
||||
editingName.value = props.editingEnvironment.environment.name ?? null
|
||||
vars.value = pipe(
|
||||
props.editingEnvironment.environment.variables ?? [],
|
||||
A.map((e: { key: string; value: string }) => ({
|
||||
@@ -264,7 +266,7 @@ const isLoading = ref(false)
|
||||
const saveEnvironment = async () => {
|
||||
isLoading.value = true
|
||||
|
||||
if (!name.value) {
|
||||
if (!editingName.value) {
|
||||
toast.error(`${t("environment.invalid_name")}`)
|
||||
return
|
||||
}
|
||||
@@ -289,7 +291,7 @@ const saveEnvironment = async () => {
|
||||
createTeamEnvironment(
|
||||
JSON.stringify(filterdVariables),
|
||||
props.editingTeamId,
|
||||
name.value
|
||||
editingName.value
|
||||
),
|
||||
TE.match(
|
||||
(err: GQLError<string>) => {
|
||||
@@ -312,7 +314,7 @@ const saveEnvironment = async () => {
|
||||
updateTeamEnvironment(
|
||||
JSON.stringify(filterdVariables),
|
||||
props.editingEnvironment.id,
|
||||
name.value
|
||||
editingName.value
|
||||
),
|
||||
TE.match(
|
||||
(err: GQLError<string>) => {
|
||||
@@ -331,7 +333,7 @@ const saveEnvironment = async () => {
|
||||
}
|
||||
|
||||
const hideModal = () => {
|
||||
name.value = null
|
||||
editingName.value = null
|
||||
emit("hide-modal")
|
||||
}
|
||||
|
||||
|
||||
@@ -757,7 +757,11 @@ const hideRequestModal = () => {
|
||||
|
||||
const prettifyQuery = () => {
|
||||
try {
|
||||
gqlQueryString.value = gql.print(gql.parse(gqlQueryString.value))
|
||||
gqlQueryString.value = gql.print(
|
||||
gql.parse(gqlQueryString.value, {
|
||||
allowLegacyFragmentVariables: true,
|
||||
})
|
||||
)
|
||||
prettifyQueryIcon.value = IconCheck
|
||||
} catch (e) {
|
||||
toast.error(`${t("error.gql_prettify_invalid_query")}`)
|
||||
|
||||
@@ -28,7 +28,9 @@
|
||||
>
|
||||
<HoppSmartItem
|
||||
:label="t('state.none')"
|
||||
:info-icon="(body.contentType === null ? IconDone : null) as any"
|
||||
:info-icon="
|
||||
(body.contentType === null ? IconDone : null) as any
|
||||
"
|
||||
:active-info-icon="body.contentType === null"
|
||||
@click="
|
||||
() => {
|
||||
|
||||
@@ -69,7 +69,9 @@
|
||||
<HoppButtonPrimary
|
||||
id="send"
|
||||
v-tippy="{ theme: 'tooltip', delay: [500, 20], allowHTML: true }"
|
||||
:title="`${t('action.send')} <kbd>${getSpecialKey()}</kbd><kbd>↩</kbd>`"
|
||||
:title="`${t(
|
||||
'action.send'
|
||||
)} <kbd>${getSpecialKey()}</kbd><kbd>↩</kbd>`"
|
||||
:label="`${!loading ? t('action.send') : t('action.cancel')}`"
|
||||
class="flex-1 rounded-r-none min-w-20"
|
||||
@click="!loading ? newSendRequest() : cancelRequest()"
|
||||
|
||||
@@ -131,6 +131,7 @@ const fetchMyTeams = async () => {
|
||||
loading.value = true
|
||||
const result = await runGQLQuery({
|
||||
query: GetMyTeamsDocument,
|
||||
variables: {},
|
||||
})
|
||||
loading.value = false
|
||||
|
||||
|
||||
@@ -113,13 +113,13 @@ const emit = defineEmits<{
|
||||
}>()
|
||||
|
||||
const QoS = ref<(typeof QOS_VALUES)[number]>(2)
|
||||
const name = ref("")
|
||||
const editingName = ref("")
|
||||
const color = ref("#f58290")
|
||||
|
||||
watch(
|
||||
() => props.show,
|
||||
() => {
|
||||
name.value = ""
|
||||
editingName.value = ""
|
||||
QoS.value = 2
|
||||
const randomColor = Math.floor(Math.random() * 16777215).toString(16)
|
||||
color.value = `#${randomColor}`
|
||||
@@ -127,18 +127,18 @@ watch(
|
||||
)
|
||||
|
||||
const addNewSubscription = () => {
|
||||
if (!name.value) {
|
||||
if (!editingName.value) {
|
||||
toastr.error(t("mqtt.invalid_topic").toString())
|
||||
return
|
||||
}
|
||||
emit("submit", {
|
||||
name: name.value,
|
||||
name: editingName.value,
|
||||
qos: QoS.value,
|
||||
color: color.value,
|
||||
})
|
||||
}
|
||||
const hideModal = () => {
|
||||
name.value = ""
|
||||
editingName.value = ""
|
||||
QoS.value = 2
|
||||
emit("hide-modal")
|
||||
}
|
||||
|
||||
@@ -50,14 +50,14 @@ const emit = defineEmits<{
|
||||
(e: "hide-modal"): void
|
||||
}>()
|
||||
|
||||
const name = ref<string | null>(null)
|
||||
const editingName = ref<string | null>(null)
|
||||
|
||||
const isLoading = ref(false)
|
||||
|
||||
const addNewTeam = async () => {
|
||||
isLoading.value = true
|
||||
await pipe(
|
||||
TeamNameCodec.decode(name.value),
|
||||
TeamNameCodec.decode(editingName.value),
|
||||
TE.fromEither,
|
||||
TE.mapLeft(() => "invalid_name" as const),
|
||||
TE.chainW(createTeam),
|
||||
@@ -86,7 +86,7 @@ const addNewTeam = async () => {
|
||||
}
|
||||
|
||||
const hideModal = () => {
|
||||
name.value = null
|
||||
editingName.value = null
|
||||
emit("hide-modal")
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -228,12 +228,12 @@ const props = defineProps<{
|
||||
|
||||
const toast = useToast()
|
||||
|
||||
const name = toRef(props.editingTeam, "name")
|
||||
const editingName = toRef(props.editingTeam, "name")
|
||||
|
||||
watch(
|
||||
() => props.editingTeam.name,
|
||||
(newName: string) => {
|
||||
name.value = newName
|
||||
editingName.value = newName
|
||||
}
|
||||
)
|
||||
|
||||
@@ -381,11 +381,11 @@ const isLoading = ref(false)
|
||||
|
||||
const saveTeam = async () => {
|
||||
isLoading.value = true
|
||||
if (name.value !== "") {
|
||||
if (TeamNameCodec.is(name.value)) {
|
||||
if (editingName.value !== "") {
|
||||
if (TeamNameCodec.is(editingName.value)) {
|
||||
const updateTeamNameResult = await renameTeam(
|
||||
props.editingTeamID,
|
||||
name.value
|
||||
editingName.value
|
||||
)()
|
||||
if (E.isLeft(updateTeamNameResult)) {
|
||||
toast.error(`${t("error.something_went_wrong")}`)
|
||||
|
||||
@@ -17,6 +17,7 @@ import {
|
||||
parseGQLErrorString,
|
||||
} from "@helpers/backend/GQLClient"
|
||||
import {
|
||||
AnyVariables,
|
||||
createRequest,
|
||||
GraphQLRequest,
|
||||
OperationResult,
|
||||
@@ -35,7 +36,11 @@ type UseQueryOptions<T = any, V = object> = {
|
||||
pollDuration?: number | undefined
|
||||
}
|
||||
|
||||
export const useGQLQuery = <DocType, DocVarType, DocErrorType extends string>(
|
||||
export const useGQLQuery = <
|
||||
DocType,
|
||||
DocVarType extends AnyVariables,
|
||||
DocErrorType extends string,
|
||||
>(
|
||||
_args: UseQueryOptions<DocType, DocVarType>
|
||||
) => {
|
||||
const stops: WatchStopHandle[] = []
|
||||
|
||||
@@ -31,9 +31,7 @@ export class GQLConnection {
|
||||
map((schema) => {
|
||||
if (!schema) return null
|
||||
|
||||
return printSchema(schema, {
|
||||
commentDescriptions: true,
|
||||
})
|
||||
return printSchema(schema)
|
||||
})
|
||||
)
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@ export function runRESTRequest$(
|
||||
Promise<
|
||||
| E.Left<"script_fail" | "cancellation">
|
||||
| E.Right<Observable<HoppRESTResponse>>
|
||||
>
|
||||
>,
|
||||
] {
|
||||
let cancelCalled = false
|
||||
let cancelFunc: (() => void) | null = null
|
||||
|
||||
@@ -153,7 +153,7 @@ type InvokeActionFunc = {
|
||||
* @param args The argument passed to the action handler. Optional if action has no args required
|
||||
*/
|
||||
export const invokeAction: InvokeActionFunc = <
|
||||
A extends HoppAction | HoppActionWithArgs
|
||||
A extends HoppAction | HoppActionWithArgs,
|
||||
>(
|
||||
action: A,
|
||||
args: ArgOfHoppAction<A>
|
||||
|
||||
@@ -13,9 +13,10 @@ import {
|
||||
Operation,
|
||||
OperationResult,
|
||||
Client,
|
||||
AnyVariables,
|
||||
} from "@urql/core"
|
||||
import { authExchange } from "@urql/exchange-auth"
|
||||
import { devtoolsExchange } from "@urql/devtools"
|
||||
import { AuthConfig, authExchange } from "@urql/exchange-auth"
|
||||
// import { devtoolsExchange } from "@urql/devtools"
|
||||
import { SubscriptionClient } from "subscriptions-transport-ws"
|
||||
import * as E from "fp-ts/Either"
|
||||
import * as TE from "fp-ts/TaskEither"
|
||||
@@ -67,14 +68,15 @@ const createSubscriptionClient = () => {
|
||||
|
||||
const createHoppClient = () => {
|
||||
const exchanges = [
|
||||
devtoolsExchange,
|
||||
// devtoolsExchange,
|
||||
dedupExchange,
|
||||
authExchange({
|
||||
addAuthToOperation({ authState, operation }) {
|
||||
if (!authState) {
|
||||
return operation
|
||||
}
|
||||
authExchange(async (): Promise<AuthConfig> => {
|
||||
const probableUser = platform.auth.getProbableUser()
|
||||
if (probableUser !== null)
|
||||
await platform.auth.waitProbableLoginToConfirm()
|
||||
|
||||
return {
|
||||
addAuthToOperation(operation) {
|
||||
const fetchOptions =
|
||||
typeof operation.context.fetchOptions === "function"
|
||||
? operation.context.fetchOptions()
|
||||
@@ -96,14 +98,13 @@ const createHoppClient = () => {
|
||||
willAuthError() {
|
||||
return platform.auth.willBackendHaveAuthError()
|
||||
},
|
||||
getAuth: async () => {
|
||||
const probableUser = platform.auth.getProbableUser()
|
||||
|
||||
if (probableUser !== null)
|
||||
await platform.auth.waitProbableLoginToConfirm()
|
||||
|
||||
return {}
|
||||
didAuthError() {
|
||||
return false
|
||||
},
|
||||
async refreshAuth() {
|
||||
// TODO
|
||||
},
|
||||
}
|
||||
}),
|
||||
fetchExchange,
|
||||
errorExchange({
|
||||
@@ -165,9 +166,9 @@ export function initBackendGQLClient() {
|
||||
})
|
||||
}
|
||||
|
||||
type RunQueryOptions<T = any, V = object> = {
|
||||
type RunQueryOptions<T = any, V = AnyVariables> = {
|
||||
query: TypedDocumentNode<T, V>
|
||||
variables?: V
|
||||
variables: V
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -183,7 +184,11 @@ export type GQLError<T extends string> =
|
||||
error: T
|
||||
}
|
||||
|
||||
export const runGQLQuery = <DocType, DocVarType, DocErrorType extends string>(
|
||||
export const runGQLQuery = <
|
||||
DocType,
|
||||
DocVarType extends AnyVariables,
|
||||
DocErrorType extends string,
|
||||
>(
|
||||
args: RunQueryOptions<DocType, DocVarType>
|
||||
): Promise<E.Either<GQLError<DocErrorType>, DocType>> => {
|
||||
const request = createRequest<DocType, DocVarType>(args.query, args.variables)
|
||||
@@ -245,8 +250,8 @@ export const runGQLQuery = <DocType, DocVarType, DocErrorType extends string>(
|
||||
// Make sure to handle cases if the subscription fires with the same update multiple times
|
||||
export const runGQLSubscription = <
|
||||
DocType,
|
||||
DocVarType,
|
||||
DocErrorType extends string
|
||||
DocVarType extends AnyVariables,
|
||||
DocErrorType extends string,
|
||||
>(
|
||||
args: RunQueryOptions<DocType, DocVarType>
|
||||
) => {
|
||||
@@ -335,10 +340,10 @@ export const parseGQLErrorString = (s: string) =>
|
||||
export const runMutation = <
|
||||
DocType,
|
||||
DocVariables extends object | undefined,
|
||||
DocErrors extends string
|
||||
DocErrors extends string,
|
||||
>(
|
||||
mutation: TypedDocumentNode<DocType, DocVariables>,
|
||||
variables?: DocVariables,
|
||||
variables: DocVariables,
|
||||
additionalConfig?: Partial<OperationContext>
|
||||
): TE.TaskEither<GQLError<DocErrors>, DocType> =>
|
||||
pipe(
|
||||
|
||||
@@ -73,22 +73,22 @@ describe("detect content type", () => {
|
||||
// })
|
||||
|
||||
describe("text/html", () => {
|
||||
test("should return text/html for valid HTML data", () => {
|
||||
expect(
|
||||
detectContentType(`
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Page Title</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>This is a Heading</h1>
|
||||
<p>This is a paragraph.</p>
|
||||
</body>
|
||||
</html>
|
||||
`)
|
||||
).toBe("text/html")
|
||||
})
|
||||
// test("should return text/html for valid HTML data", () => {
|
||||
// expect(
|
||||
// detectContentType(`
|
||||
// <!DOCTYPE html>
|
||||
// <html>
|
||||
// <head>
|
||||
// <title>Page Title</title>
|
||||
// </head>
|
||||
// <body>
|
||||
// <h1>This is a Heading</h1>
|
||||
// <p>This is a paragraph.</p>
|
||||
// </body>
|
||||
// </html>
|
||||
// `)
|
||||
// ).toBe("text/html")
|
||||
// })
|
||||
|
||||
// TODO: Figure this test situation
|
||||
// test("should return text/html for invalid HTML data", () => {
|
||||
|
||||
@@ -126,7 +126,7 @@ const multipartFunctions = {
|
||||
(nameArr) =>
|
||||
[nameArr[1], pair[0].includes("filename") ? "" : pair[1]] as [
|
||||
string,
|
||||
string
|
||||
string,
|
||||
]
|
||||
)
|
||||
)
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*/
|
||||
export const tupleToRecord = <
|
||||
KeyType extends string | number | symbol,
|
||||
ValueType
|
||||
ValueType,
|
||||
>(
|
||||
tuples: [KeyType, ValueType][]
|
||||
): Record<KeyType, ValueType> =>
|
||||
@@ -25,7 +25,7 @@ export const tupleToRecord = <
|
||||
*/
|
||||
export const tupleWithSameKeysToRecord = <
|
||||
KeyType extends string | number | symbol,
|
||||
ValueType
|
||||
ValueType,
|
||||
>(
|
||||
tuples: [KeyType, ValueType][]
|
||||
): Record<KeyType, ValueType[]> => {
|
||||
|
||||
@@ -195,7 +195,7 @@ const parseOpenAPIV3Body = (
|
||||
// We only take the first definition
|
||||
const [contentType, media]: [
|
||||
string,
|
||||
OpenAPIV3.MediaTypeObject | OpenAPIV31.MediaTypeObject
|
||||
OpenAPIV3.MediaTypeObject | OpenAPIV31.MediaTypeObject,
|
||||
] = objs[0]
|
||||
|
||||
return contentType in knownContentTypes
|
||||
|
||||
@@ -90,7 +90,8 @@ const getHoppReqParams = (item: Item): HoppRESTParam[] => {
|
||||
}
|
||||
|
||||
type PMRequestAuthDef<
|
||||
AuthType extends RequestAuthDefinition["type"] = RequestAuthDefinition["type"]
|
||||
AuthType extends
|
||||
RequestAuthDefinition["type"] = RequestAuthDefinition["type"],
|
||||
> = AuthType extends RequestAuthDefinition["type"] & string
|
||||
? // eslint-disable-next-line no-unused-vars
|
||||
{ type: AuthType } & { [x in AuthType]: VariableDefinition[] }
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import HTTPSnippet from "httpsnippet"
|
||||
import { HTTPSnippet } from "httpsnippet"
|
||||
import { HoppRESTRequest } from "@hoppscotch/data"
|
||||
import * as O from "fp-ts/Option"
|
||||
import * as E from "fp-ts/Either"
|
||||
|
||||
@@ -25,7 +25,7 @@ type BodyType<T extends ValidContentTypes | null | ANY_TYPE> =
|
||||
|
||||
type TransitionDefinition<
|
||||
FromType extends ValidContentTypes | null | ANY_TYPE,
|
||||
ToType extends ValidContentTypes | null | ANY_TYPE
|
||||
ToType extends ValidContentTypes | null | ANY_TYPE,
|
||||
> = {
|
||||
from: FromType
|
||||
to: ToType
|
||||
@@ -37,7 +37,7 @@ type TransitionDefinition<
|
||||
|
||||
const rule = <
|
||||
FromType extends ValidContentTypes | null | ANY_TYPE,
|
||||
ToType extends ValidContentTypes | null | ANY_TYPE
|
||||
ToType extends ValidContentTypes | null | ANY_TYPE,
|
||||
>(
|
||||
input: TransitionDefinition<FromType, ToType>
|
||||
) => input
|
||||
|
||||
@@ -6,7 +6,7 @@ export type FieldEquals<T, K extends keyof T, Vals extends T[K][]> = {
|
||||
export const objectFieldIncludes = <
|
||||
T,
|
||||
K extends keyof T,
|
||||
V extends readonly T[K][]
|
||||
V extends readonly T[K][],
|
||||
>(
|
||||
obj: T,
|
||||
field: K,
|
||||
|
||||
@@ -15,7 +15,7 @@ type DispatcherFunc<StoreType, PayloadType> = (
|
||||
*/
|
||||
export const defineDispatchers = <
|
||||
StoreType,
|
||||
T extends { [x: string]: DispatcherFunc<StoreType, any> }
|
||||
T extends { [x: string]: DispatcherFunc<StoreType, any> },
|
||||
>(
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
dispatchers: T
|
||||
@@ -23,7 +23,7 @@ export const defineDispatchers = <
|
||||
|
||||
type Dispatch<
|
||||
StoreType,
|
||||
DispatchersType extends { [x: string]: DispatcherFunc<StoreType, any> }
|
||||
DispatchersType extends { [x: string]: DispatcherFunc<StoreType, any> },
|
||||
> = {
|
||||
[Dispatcher in keyof DispatchersType]: {
|
||||
dispatcher: Dispatcher
|
||||
@@ -33,7 +33,7 @@ type Dispatch<
|
||||
|
||||
export default class DispatchingStore<
|
||||
StoreType,
|
||||
DispatchersType extends { [x: string]: DispatcherFunc<StoreType, any> }
|
||||
DispatchersType extends { [x: string]: DispatcherFunc<StoreType, any> },
|
||||
> {
|
||||
#state$: BehaviorSubject<StoreType>
|
||||
#dispatchers: DispatchersType
|
||||
|
||||
@@ -1318,7 +1318,7 @@ export function moveGraphqlRequest(
|
||||
}
|
||||
|
||||
function removeDuplicateCollectionsFromPath<
|
||||
T extends HoppRESTRequest | HoppGQLRequest
|
||||
T extends HoppRESTRequest | HoppGQLRequest,
|
||||
>(
|
||||
idToRemove: string,
|
||||
collectionPath: string | null,
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
<div v-else class="space-y-8">
|
||||
<div
|
||||
class="h-24 rounded bg-primaryLight -mb-11 md:h-32"
|
||||
style="background-image: url('/images/cover.svg')"
|
||||
style="background-image: url("/images/cover.svg")"
|
||||
></div>
|
||||
<div class="flex flex-col justify-between px-4 space-y-8 md:flex-row">
|
||||
<div class="flex items-end">
|
||||
|
||||
@@ -108,7 +108,7 @@
|
||||
</template>
|
||||
<RealtimeLog
|
||||
:title="t('mqtt.log')"
|
||||
:log="((tab.id === 'all' ? logs : tab.logs) as LogEntryData[])"
|
||||
:log="(tab.id === 'all' ? logs : tab.logs) as LogEntryData[]"
|
||||
@delete="clearLogEntries()"
|
||||
/>
|
||||
</HoppSmartWindow>
|
||||
|
||||
@@ -239,7 +239,7 @@
|
||||
<template #secondary>
|
||||
<RealtimeLog
|
||||
:title="t('socketio.log')"
|
||||
:log="(log as LogEntryData[])"
|
||||
:log="log as LogEntryData[]"
|
||||
@delete="clearLogEntries()"
|
||||
/>
|
||||
</template>
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
<template #secondary>
|
||||
<RealtimeLog
|
||||
:title="t('sse.log')"
|
||||
:log="(log as LogEntryData[])"
|
||||
:log="log as LogEntryData[]"
|
||||
@delete="clearLogEntries()"
|
||||
/>
|
||||
</template>
|
||||
|
||||
@@ -169,7 +169,7 @@
|
||||
<template #secondary>
|
||||
<RealtimeLog
|
||||
:title="t('websocket.log')"
|
||||
:log="(log as LogEntryData[])"
|
||||
:log="log as LogEntryData[]"
|
||||
@delete="clearLogEntries()"
|
||||
/>
|
||||
</template>
|
||||
|
||||
@@ -22,7 +22,7 @@ export type SearchResult<Doc extends object & { excludeFromSearch?: boolean }> =
|
||||
* Options for StaticSpotlightSearcher initialization
|
||||
*/
|
||||
export type StaticSpotlightSearcherOptions<
|
||||
Doc extends object & { excludeFromSearch?: boolean }
|
||||
Doc extends object & { excludeFromSearch?: boolean },
|
||||
> = {
|
||||
/**
|
||||
* The array of field names in the given documents to search against
|
||||
@@ -53,7 +53,7 @@ export type StaticSpotlightSearcherOptions<
|
||||
* that can optionally be toggled against (via the `excludeFromSearch` property in the Doc)
|
||||
*/
|
||||
export abstract class StaticSpotlightSearcherService<
|
||||
Doc extends object & { excludeFromSearch?: boolean }
|
||||
Doc extends object & { excludeFromSearch?: boolean },
|
||||
>
|
||||
extends Service
|
||||
implements SpotlightSearcher
|
||||
|
||||
@@ -23,59 +23,57 @@
|
||||
"postinstall": "pnpm run gql-codegen"
|
||||
},
|
||||
"dependencies": {
|
||||
"@fontsource-variable/inter": "^5.0.5",
|
||||
"@fontsource-variable/material-symbols-rounded": "^5.0.5",
|
||||
"@fontsource-variable/roboto-mono": "^5.0.6",
|
||||
"@fontsource-variable/inter": "^5.0.8",
|
||||
"@fontsource-variable/material-symbols-rounded": "^5.0.7",
|
||||
"@fontsource-variable/roboto-mono": "^5.0.9",
|
||||
"@hoppscotch/common": "workspace:^",
|
||||
"@hoppscotch/data": "workspace:^",
|
||||
"axios": "^0.21.4",
|
||||
"axios": "^1.4.0",
|
||||
"buffer": "^6.0.3",
|
||||
"firebase": "^9.8.4",
|
||||
"fp-ts": "^2.13.1",
|
||||
"graphql": "^15.8.0",
|
||||
"fp-ts": "^2.16.1",
|
||||
"process": "^0.11.10",
|
||||
"rxjs": "^7.5.5",
|
||||
"rxjs": "^7.8.1",
|
||||
"stream-browserify": "^3.0.0",
|
||||
"util": "^0.12.4",
|
||||
"vue": "^3.2.41",
|
||||
"workbox-window": "^6.5.4"
|
||||
"util": "^0.12.5",
|
||||
"vue": "^3.3.4",
|
||||
"workbox-window": "^7.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@graphql-codegen/add": "^3.2.0",
|
||||
"@graphql-codegen/cli": "^2.8.0",
|
||||
"@graphql-codegen/typed-document-node": "^2.3.1",
|
||||
"@graphql-codegen/typescript": "^2.7.1",
|
||||
"@graphql-codegen/typescript-operations": "^2.5.1",
|
||||
"@graphql-codegen/typescript-urql-graphcache": "^2.3.1",
|
||||
"@graphql-codegen/urql-introspection": "^2.2.0",
|
||||
"@graphql-typed-document-node/core": "^3.1.1",
|
||||
"@graphql-codegen/add": "^5.0.0",
|
||||
"@graphql-codegen/cli": "^5.0.0",
|
||||
"@graphql-codegen/typed-document-node": "^5.0.1",
|
||||
"@graphql-codegen/typescript": "^4.0.1",
|
||||
"@graphql-codegen/typescript-operations": "^4.0.1",
|
||||
"@graphql-codegen/typescript-urql-graphcache": "^2.4.5",
|
||||
"@graphql-codegen/urql-introspection": "^2.2.1",
|
||||
"@graphql-typed-document-node/core": "^3.2.0",
|
||||
"@intlify/vite-plugin-vue-i18n": "^7.0.0",
|
||||
"@rushstack/eslint-patch": "^1.1.4",
|
||||
"@typescript-eslint/eslint-plugin": "^5.19.0",
|
||||
"@typescript-eslint/parser": "^5.19.0",
|
||||
"@vitejs/plugin-legacy": "^2.3.0",
|
||||
"@vitejs/plugin-vue": "^3.2.0",
|
||||
"@vue/eslint-config-typescript": "^11.0.1",
|
||||
"@rushstack/eslint-patch": "^1.3.3",
|
||||
"@typescript-eslint/eslint-plugin": "^6.4.0",
|
||||
"@typescript-eslint/parser": "^6.4.0",
|
||||
"@vitejs/plugin-legacy": "^4.1.1",
|
||||
"@vitejs/plugin-vue": "^4.3.1",
|
||||
"@vue/eslint-config-typescript": "^11.0.3",
|
||||
"cross-env": "^7.0.3",
|
||||
"eslint": "^8.28.0",
|
||||
"eslint-plugin-prettier": "^4.2.1",
|
||||
"eslint-plugin-vue": "^9.5.1",
|
||||
"eslint": "^8.47.0",
|
||||
"eslint-plugin-prettier": "^5.0.0",
|
||||
"eslint-plugin-vue": "^9.17.0",
|
||||
"npm-run-all": "^4.1.5",
|
||||
"typescript": "^4.6.4",
|
||||
"typescript": "^5.1.6",
|
||||
"unplugin-fonts": "^1.0.3",
|
||||
"unplugin-icons": "^0.14.9",
|
||||
"unplugin-vue-components": "^0.21.0",
|
||||
"vite": "^3.2.3",
|
||||
"vite-plugin-html-config": "^1.0.10",
|
||||
"vite-plugin-inspect": "^0.7.4",
|
||||
"vite-plugin-pages": "^0.26.0",
|
||||
"vite-plugin-pages-sitemap": "^1.4.5",
|
||||
"vite-plugin-pwa": "^0.13.1",
|
||||
"vite-plugin-static-copy": "^0.12.0",
|
||||
"vite-plugin-vue-layouts": "^0.7.0",
|
||||
"vite-plugin-windicss": "^1.8.8",
|
||||
"vitest": "^0.29.3",
|
||||
"vue-tsc": "^1.0.9",
|
||||
"unplugin-icons": "^0.16.5",
|
||||
"unplugin-vue-components": "^0.25.1",
|
||||
"vite": "^4.4.9",
|
||||
"vite-plugin-html-config": "^1.0.11",
|
||||
"vite-plugin-inspect": "^0.7.38",
|
||||
"vite-plugin-pages": "^0.31.0",
|
||||
"vite-plugin-pages-sitemap": "^1.6.1",
|
||||
"vite-plugin-pwa": "^0.16.4",
|
||||
"vite-plugin-static-copy": "^0.17.0",
|
||||
"vite-plugin-vue-layouts": "^0.8.0",
|
||||
"vite-plugin-windicss": "^1.9.1",
|
||||
"vitest": "^0.34.2",
|
||||
"vue-tsc": "^1.8.8",
|
||||
"windicss": "^3.5.6"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
export const createMapper = <
|
||||
LocalIDType extends string | number,
|
||||
BackendIDType extends string | number
|
||||
BackendIDType extends string | number,
|
||||
>() => {
|
||||
const backendIDByLocalIDMap = new Map<
|
||||
LocalIDType,
|
||||
|
||||
@@ -248,6 +248,7 @@ export const getUserRootCollections = () =>
|
||||
""
|
||||
>({
|
||||
query: GetUserRootCollectionsDocument,
|
||||
variables: {},
|
||||
})
|
||||
|
||||
export const getGQLRootUserCollections = () =>
|
||||
@@ -257,6 +258,7 @@ export const getGQLRootUserCollections = () =>
|
||||
""
|
||||
>({
|
||||
query: GetGqlRootUserCollectionsDocument,
|
||||
variables: {},
|
||||
})
|
||||
|
||||
export const exportUserCollectionsToJSON = (
|
||||
@@ -273,30 +275,31 @@ export const exportUserCollectionsToJSON = (
|
||||
})
|
||||
|
||||
export const runUserCollectionCreatedSubscription = () =>
|
||||
runGQLSubscription({ query: UserCollectionCreatedDocument })
|
||||
runGQLSubscription({ query: UserCollectionCreatedDocument, variables: {} })
|
||||
|
||||
export const runUserCollectionUpdatedSubscription = () =>
|
||||
runGQLSubscription({ query: UserCollectionUpdatedDocument })
|
||||
runGQLSubscription({ query: UserCollectionUpdatedDocument, variables: {} })
|
||||
|
||||
export const runUserCollectionRemovedSubscription = () =>
|
||||
runGQLSubscription({ query: UserCollectionRemovedDocument })
|
||||
runGQLSubscription({ query: UserCollectionRemovedDocument, variables: {} })
|
||||
|
||||
export const runUserCollectionMovedSubscription = () =>
|
||||
runGQLSubscription({ query: UserCollectionMovedDocument })
|
||||
runGQLSubscription({ query: UserCollectionMovedDocument, variables: {} })
|
||||
|
||||
export const runUserCollectionOrderUpdatedSubscription = () =>
|
||||
runGQLSubscription({
|
||||
query: UserCollectionOrderUpdatedDocument,
|
||||
variables: {},
|
||||
})
|
||||
|
||||
export const runUserRequestCreatedSubscription = () =>
|
||||
runGQLSubscription({ query: UserRequestCreatedDocument })
|
||||
runGQLSubscription({ query: UserRequestCreatedDocument, variables: {} })
|
||||
|
||||
export const runUserRequestUpdatedSubscription = () =>
|
||||
runGQLSubscription({ query: UserRequestUpdatedDocument })
|
||||
runGQLSubscription({ query: UserRequestUpdatedDocument, variables: {} })
|
||||
|
||||
export const runUserRequestMovedSubscription = () =>
|
||||
runGQLSubscription({ query: UserRequestMovedDocument })
|
||||
runGQLSubscription({ query: UserRequestMovedDocument, variables: {} })
|
||||
|
||||
export const runUserRequestDeletedSubscription = () =>
|
||||
runGQLSubscription({ query: UserRequestDeletedDocument })
|
||||
runGQLSubscription({ query: UserRequestDeletedDocument, variables: {} })
|
||||
|
||||
@@ -76,6 +76,7 @@ export const clearGlobalEnvironmentVariables = (id: string) =>
|
||||
export const getUserEnvironments = () =>
|
||||
runGQLQuery({
|
||||
query: GetUserEnvironmentsDocument,
|
||||
variables: {},
|
||||
})
|
||||
|
||||
export const getGlobalEnvironments = () =>
|
||||
@@ -85,6 +86,7 @@ export const getGlobalEnvironments = () =>
|
||||
"user_environment/user_env_does_not_exists"
|
||||
>({
|
||||
query: GetGlobalEnvironmentsDocument,
|
||||
variables: {},
|
||||
})
|
||||
|
||||
export const createUserGlobalEnvironment = (variables: string) =>
|
||||
@@ -99,14 +101,17 @@ export const createUserGlobalEnvironment = (variables: string) =>
|
||||
export const runUserEnvironmentCreatedSubscription = () =>
|
||||
runGQLSubscription({
|
||||
query: UserEnvironmentCreatedDocument,
|
||||
variables: {},
|
||||
})
|
||||
|
||||
export const runUserEnvironmentUpdatedSubscription = () =>
|
||||
runGQLSubscription({
|
||||
query: UserEnvironmentUpdatedDocument,
|
||||
variables: {},
|
||||
})
|
||||
|
||||
export const runUserEnvironmentDeletedSubscription = () =>
|
||||
runGQLSubscription({
|
||||
query: UserEnvironmentDeletedDocument,
|
||||
variables: {},
|
||||
})
|
||||
|
||||
@@ -30,6 +30,7 @@ import {
|
||||
export const getUserHistoryEntries = () =>
|
||||
runGQLQuery<GetRestUserHistoryQuery, GetRestUserHistoryQueryVariables, "">({
|
||||
query: GetRestUserHistoryDocument,
|
||||
variables: {},
|
||||
})
|
||||
|
||||
export const createUserHistory = (
|
||||
@@ -77,19 +78,23 @@ export const deleteAllUserHistory = (reqType: ReqType) =>
|
||||
export const runUserHistoryCreatedSubscription = () =>
|
||||
runGQLSubscription({
|
||||
query: UserHistoryCreatedDocument,
|
||||
variables: {},
|
||||
})
|
||||
|
||||
export const runUserHistoryUpdatedSubscription = () =>
|
||||
runGQLSubscription({
|
||||
query: UserHistoryUpdatedDocument,
|
||||
variables: {},
|
||||
})
|
||||
|
||||
export const runUserHistoryDeletedSubscription = () =>
|
||||
runGQLSubscription({
|
||||
query: UserHistoryDeletedDocument,
|
||||
variables: {},
|
||||
})
|
||||
|
||||
export const runUserHistoryDeletedManySubscription = () =>
|
||||
runGQLSubscription({
|
||||
query: UserHistoryDeletedManyDocument,
|
||||
variables: {},
|
||||
})
|
||||
|
||||
@@ -23,6 +23,7 @@ export const getUserSettings = () =>
|
||||
"user_settings/not_found"
|
||||
>({
|
||||
query: GetUserSettingsDocument,
|
||||
variables: {},
|
||||
})
|
||||
|
||||
export const createUserSettings = (properties: string) =>
|
||||
@@ -46,4 +47,5 @@ export const updateUserSettings = (properties: string) =>
|
||||
export const runUserSettingsUpdatedSubscription = () =>
|
||||
runGQLSubscription({
|
||||
query: UserSettingsUpdatedDocument,
|
||||
variables: {},
|
||||
})
|
||||
|
||||
@@ -32,4 +32,5 @@ export const getCurrentRestSession = () =>
|
||||
""
|
||||
>({
|
||||
query: GetCurrentRestSessionDocument,
|
||||
variables: {},
|
||||
})
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
:node="node as TreeNode<T>"
|
||||
:toggle-children="toggleChildren as () => void"
|
||||
:is-open="isOpen as boolean"
|
||||
:highlight-children="(id:string|null) => highlightChildren(id)"
|
||||
:highlight-children="(id: string | null) => highlightChildren(id)"
|
||||
></slot>
|
||||
</template>
|
||||
|
||||
@@ -43,7 +43,8 @@
|
||||
v-if="rootNodes.status === 'loaded' && rootNodes.data.length === 0"
|
||||
class="flex flex-col flex-1"
|
||||
>
|
||||
<slot name="emptyNode" :node="(null as TreeNode<T> | null)"></slot>
|
||||
<!-- eslint-disable-next-line vue/no-deprecated-filter -->
|
||||
<slot name="emptyNode" :node="null as TreeNode<T> | null"></slot>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
:node="nodeItem"
|
||||
:toggle-children="toggleNodeChildren"
|
||||
:is-open="isNodeOpen"
|
||||
:highlight-children="(id:string|null) => highlightNodeChildren(id)"
|
||||
:highlight-children="(id: string | null) => highlightNodeChildren(id)"
|
||||
></slot>
|
||||
|
||||
<!-- This is a performance optimization trick -->
|
||||
@@ -45,7 +45,9 @@
|
||||
:node="node as TreeNode<T>"
|
||||
:toggle-children="toggleChildren as () => void"
|
||||
:is-open="isOpen as boolean"
|
||||
:highlight-children="(id:string|null) => highlightChildren(id) as void"
|
||||
:highlight-children="
|
||||
(id: string | null) => highlightChildren(id) as void
|
||||
"
|
||||
></slot>
|
||||
</template>
|
||||
<template #emptyNode="{ node }">
|
||||
|
||||
11111
pnpm-lock.yaml
generated
11111
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user