Open-Source API Development Ecosystem • https://hoppscotch.io • Offline, On-Prem & Cloud • Web, Desktop & CLI • Open-Source Alternative to Postman, Insomnia
TypeScript apiapi-clientapi-restapi-testingdeveloper-toolsgraphqlhttphttp-clientpwarestrest-apispatestingtesting-toolstoolsvuevuejswebsocket
fix(agent): typescript build warnings (#4800)
Shreyas8bfa8c98f5d6
diff --git a/packages/hoppscotch-agent/package.json b/packages/hoppscotch-agent/package.jsonindex 429849d5c..7bd657f53 100644--- a/packages/hoppscotch-agent/package.json+++ b/packages/hoppscotch-agent/package.json@@ -22,6 +22,7 @@"devDependencies": {"@iconify-json/lucide": "^1.2.8","@tauri-apps/cli": "^2.0.3",+ "@types/lodash-es": "4.17.12","@types/node": "^22.7.5","@vitejs/plugin-vue": "^5.1.4","autoprefixer": "^10.4.20",@@ -29,8 +30,8 @@"tailwindcss": "^3.4.13","typescript": "^5.6.3","unplugin-icons": "^0.19.3",+ "unplugin-vue-components": "28.4.1","vite": "^5.4.8",- "@types/lodash-es": "4.17.12","vue-tsc": "^2.1.6"}}diff --git a/packages/hoppscotch-agent/src/App.vue b/packages/hoppscotch-agent/src/App.vueindex 640a291d8..e558e7f86 100644--- a/packages/hoppscotch-agent/src/App.vue+++ b/packages/hoppscotch-agent/src/App.vue@@ -23,8 +23,8 @@<template v-else><div class="flex-grow overflow-auto">- <HoppSmartTable :headings="TABLE_HEADINGS" :list="state().registrations">- <template #registered_at="{ item }">{{ formatDate(item.registered_at) }}</template>+ <HoppSmartTable :headings="tableHeadings" :list="state().registrations">+ <template #registered_at="{ item }">{{ formatDate(String(item.registered_at)) }}</template></HoppSmartTable></div></template>@@ -50,7 +50,9 @@ import {HoppButtonSecondary,HoppSmartTable,} from "@hoppscotch/ui"+// @ts-ignoreimport IconCopy from "~icons/lucide/copy"+// @ts-ignoreimport IconCheck from "~icons/lucide/check"import { useClipboard, refAutoReset } from "@vueuse/core"import { getCurrentWindow } from "@tauri-apps/api/window"@@ -72,10 +74,15 @@ interface AppState {registrations: Registration[]}-const TABLE_HEADINGS = [+interface CellHeading {+ key: string+ label: string+}++const tableHeadings: CellHeading[] = [{ key: "auth_key_hash", label: "ID" },{ key: "registered_at", label: "Registered At" },-] as const+]const { copy } = useClipboard()const copyIcon = refAutoReset(markRaw(IconCopy), 3000)@@ -127,7 +134,7 @@ const copyOtp = () => {const updateRegistrations = async () => {await pipe(listRegistrations,- TE.map((registrations: Registration) => {+ TE.map((registrations: Registration[]) => {appState.value = { ...state(), registrations }}))()diff --git a/packages/hoppscotch-agent/vite.config.ts b/packages/hoppscotch-agent/vite.config.tsindex 9a9a1549b..bcba96100 100644--- a/packages/hoppscotch-agent/vite.config.ts+++ b/packages/hoppscotch-agent/vite.config.ts@@ -4,6 +4,8 @@ import tailwindcss from 'tailwindcss';import autoprefixer from 'autoprefixer';import path from 'path';import Icons from "unplugin-icons/vite";+import IconsResolver from 'unplugin-icons/resolver';+import Components from 'unplugin-vue-components/vite';const host = process.env.TAURI_DEV_HOST;@@ -11,7 +13,14 @@ const host = process.env.TAURI_DEV_HOST;export default defineConfig(async () => ({plugins: [vue(),- Icons({})+ Icons({ compiler: 'vue3' }),+ Components({+ resolvers: [+ IconsResolver({+ prefix: '' // optional, default is 'i'+ })+ ]+ })],css: {postcss: {diff --git a/pnpm-lock.yaml b/pnpm-lock.yamlindex a7ec73e19..34f97ada9 100644--- a/pnpm-lock.yaml+++ b/pnpm-lock.yaml@@ -137,6 +137,9 @@ importers:unplugin-icons:specifier: ^0.19.3+ unplugin-vue-components:+ specifier: 28.4.1vite:specifier: ^5.4.8@@ -6210,6 +6213,11 @@ packages:engines: {node: '>=0.4.0'}hasBin: true+ resolution: {integrity: sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==}+ engines: {node: '>=0.4.0'}+ hasBin: true+resolution: {integrity: sha512-QbJ0NTQ/I9DI3uSJA4cbexiwQeRAfjPScqIbSjUDd9TOrcg6pTkdgziesOqxBMBzit8vFCTwrP27t13vFOORRA==}@@ -7195,6 +7203,15 @@ packages:supports-color:optional: true+ resolution: {integrity: sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==}+ engines: {node: '>=6.0'}+ peerDependencies:+ supports-color: '*'+ peerDependenciesMeta:+ supports-color:+ optional: true+resolution: {integrity: sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==}engines: {node: '>=0.10.0'}@@ -8025,6 +8042,14 @@ packages:picomatch:optional: true+ resolution: {integrity: sha512-PMXmW2y1hDDfTSRc9gaXIuCCRpuoz3Kaz8cUelp3smouvfT632ozg2vrT6lJsHKKOF59YLbOGfAWGUcKEfRMQw==}+ peerDependencies:+ picomatch: ^3 || ^4+ peerDependenciesMeta:+ picomatch:+ optional: true+resolution: {integrity: sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==}engines: {node: '>=8'}@@ -9359,6 +9384,10 @@ packages:resolution: {integrity: sha512-ok6z3qlYyCDS4ZEU27HaU6x/xZa9Whf8jD4ptH5UZTQYZVYeb9bnZ3ojVhiJNLiXK1Hfc0GNbLXcmZ5plLDDBg==}engines: {node: '>=14'}+ resolution: {integrity: sha512-xbZBuX6gYIWrlLmZG43aAVer4ocntYO09vPy9lxd6Ns8DnR4U7N+IIeDkubinqFOHHzoMlPxTxwo0jhE7oYjAw==}+ engines: {node: '>=14'}+resolution: {integrity: sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==}engines: {node: '>=8'}@@ -9516,6 +9545,9 @@ packages:resolution: {integrity: sha512-+Wri9p0QHMy+545hKww7YAu5NyzF8iomPL/RQazugQ9+Ez4Ic3mERMd8ZTX5rfK944j+560ZJi8iAwgak1Ac7A==}+ resolution: {integrity: sha512-sNPKHvyjVf7gyjwS4xGTaW/mCnF8wnjtifKBEhxfZ7E/S8tQ0rssrwGNn6q8JH/ohItJfSQp9mBtQYuTlH5QnA==}+resolution: {integrity: sha512-ISQTe55T2ao7XtlAStud6qwYPZjE4GK1S/BeVPus4jrq6JuOnQ00YKQC581RWhR122W7msZV263KzVeLoqidyQ==}engines: {node: '>=12'}@@ -9812,6 +9844,9 @@ packages:resolution: {integrity: sha512-tN3dvVHYVz4DhSXinXIk7u9syPYaJvio118uomkovAtWBT+RdbP6Lfh/5Lvo519YMmwBafwlh20IPTXIStscpA==}+ resolution: {integrity: sha512-qmdSIPC4bDJXgZTCR7XosJiNKySV7O215tsPtDN9iEO/7q/76b/ijtgRu/+epFXSJhijtTCCGp3DWS549P3xKw==}+resolution: {integrity: sha512-L6XC3EdwT6YrIk0yXpavvLkn8h+EU+Y5UcCHKECyMbdUIxyMuZj4bX4U9e1nvnvUUvQVsV2VHQr5zLdcUkhW/g==}engines: {node: '>= 12.0.0'}@@ -10295,6 +10330,9 @@ packages:resolution: {integrity: sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==}+ resolution: {integrity: sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==}+resolution: {integrity: sha512-vE7JKRyES09KiunauX7nd2Q9/L7lhok4smP9RZTDeD4MVs72Dp2qNFVz39Nz5a0FVEW0BJR6C0DYrq6unoziZA==}engines: {node: '>= 14.16'}@@ -10371,6 +10409,9 @@ packages:resolution: {integrity: sha512-sQoqa8alT3nHjGuTjuKgOnvjo4cljkufdtLMnO2LBP/wRwuDlo1tkaEdMxCRhyGRPacv/ztlZgDPm2b7FAmEvw==}+ resolution: {integrity: sha512-/Jm5M4RvtBFVkKWRu2BLUTNP8/M2a+UwuAX+ae4770q1qVGtfjG+WTCupoZixokjmHiry8uI+dlY8KXYV5HVVQ==}+resolution: {integrity: sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==}engines: {node: '>=4'}@@ -10834,6 +10875,9 @@ packages:resolution: {integrity: sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==}engines: {node: '>=0.6'}+ resolution: {integrity: sha512-4+saucphJMazjt7iOM27mbFCk+D9dd/zmgMDCzRZ8MEoBfYp7lAvoN38et/phRQF6wOPMy/OROBGgoWeSKyluA==}+resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==}@@ -11685,6 +11729,10 @@ packages:resolution: {integrity: sha512-tVGE0mVJPGb0chKhqmsoosjsS+qUnJVGJpZgsHYQcGoPlG3B51R3PouqTgEGH2Dc9jjFyOqOpix6ZHNMXp1FZg==}+ resolution: {integrity: sha512-qkf4trmKSIiMTs/E63cxH+ojC2unam7rJ0WrauAzpT3ECNTxGRMlaXxVbfxMUC/w0LaYk6jQ4y/nGR9uBO3tww==}+ engines: {node: '>=12.0.0'}+resolution: {integrity: sha512-8or1+BGEdk1Zkkw2ii16qSS7uVrQJPre5A9o/XkWPATkk23FZh/15BKFxPnlTy6vkljZxLqYCzzBMj30ZrSvjw==}engines: {node: '>=12.0.0'}@@ -12115,6 +12163,10 @@ packages:vue-template-es2015-compiler:optional: true+ resolution: {integrity: sha512-8U/MtpkPkkk3Atewj1+RcKIjb5WBimZ/WSLhhR3w6SsIj8XJuKTacSP8g+2JhfSGw0Cb125Y+2zA/IzJZDVbhA==}+ engines: {node: '>=18.12.0'}+resolution: {integrity: sha512-U7uOMNmRJ2eAv9CNjP8QRvxs6nAe3FVQUEIUphC1FGguBp3BWSLgGAcSHaX2nQy0gFoDY2mLF2M52W/t/eDaKg==}engines: {node: '>=14'}@@ -12138,6 +12190,19 @@ packages:'@nuxt/kit':optional: true+ resolution: {integrity: sha512-niGSc0vJD9ueAnsqcfAldmtpkppZ09B6p2G1dL7X5S8KPdgbk1P+txPwaaDCe7N+eZh2VG1aAypLXkuJs3OSUg==}+ engines: {node: '>=14'}+ peerDependencies:+ '@babel/parser': ^7.15.8+ '@nuxt/kit': ^3.2.2+ vue: 3.5.12+ peerDependenciesMeta:+ '@babel/parser':+ optional: true+ '@nuxt/kit':+ optional: true+resolution: {integrity: sha512-m7thX4jP8l5sETpLdUASoDOGOcHaOVtgNyrYlToyQUvILUtEzEnngRBrHnAX3IKqooJVmXpoa/CwQ/QqzvGaHQ==}peerDependencies:@@ -12171,6 +12236,10 @@ packages:webpack-sources:optional: true+ resolution: {integrity: sha512-m1ekpSwuOT5hxkJeZGRxO7gXbXT3gF26NjQ7GdVHoLoF8/nopLcd/QfPigpCy7i51oFHiRJg/CyHhj4vs2+KGw==}+ engines: {node: '>=18.12.0'}+resolution: {integrity: sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw==}engines: {node: '>=8'}@@ -18909,6 +18978,8 @@ snapshots:+ [email protected]: {}+@@ -20104,6 +20175,10 @@ snapshots:dependencies:ms: 2.1.3+ dependencies:+ ms: 2.1.3+@@ -21294,6 +21369,10 @@ snapshots:optionalDependencies:picomatch: 4.0.2+ optionalDependencies:+ picomatch: 4.0.2+dependencies:escape-string-regexp: 1.0.5@@ -23049,6 +23128,12 @@ snapshots:mlly: 1.7.0pkg-types: 1.1.0+ dependencies:+ mlly: 1.7.4+ pkg-types: 1.3.1+ quansync: 0.2.8+dependencies:p-locate: 4.1.0@@ -23179,6 +23264,10 @@ snapshots:dependencies:'@jridgewell/sourcemap-codec': 1.5.0+ dependencies:+ '@jridgewell/sourcemap-codec': 1.5.0+dependencies:'@jridgewell/sourcemap-codec': 1.5.0@@ -23885,6 +23974,13 @@ snapshots:pkg-types: 1.2.1ufo: 1.5.4+ dependencies:+ acorn: 8.14.0+ pathe: 2.0.3+ pkg-types: 1.3.1+ ufo: 1.5.4+dependencies:'@ungap/promise-all-settled': 1.1.2@@ -24373,6 +24469,8 @@ snapshots:+ [email protected]: {}+@@ -24434,6 +24532,12 @@ snapshots:mlly: 1.7.2pathe: 1.1.2+ dependencies:+ confbox: 0.1.8+ mlly: 1.7.4+ pathe: 2.0.3+@@ -24971,6 +25075,8 @@ snapshots:dependencies:side-channel: 1.0.6+ [email protected]: {}+@@ -26125,6 +26231,11 @@ snapshots:+ dependencies:+ fdir: 6.4.3([email protected])+ picomatch: 4.0.2+dependencies:fdir: 6.4.2([email protected])@@ -26645,6 +26756,11 @@ snapshots:- supports-color- webpack-sources+ dependencies:+ pathe: 2.0.3+ picomatch: 4.0.2+[email protected](@babel/[email protected])([email protected])([email protected])([email protected](@types/[email protected])([email protected])([email protected]))([email protected]([email protected]))([email protected](@swc/[email protected])([email protected])):dependencies:'@antfu/utils': 0.5.2@@ -26727,6 +26843,22 @@ snapshots:- supports-color- webpack-sources+ dependencies:+ chokidar: 3.6.0+ debug: 4.4.0+ local-pkg: 1.1.0+ magic-string: 0.30.17+ mlly: 1.7.4+ tinyglobby: 0.2.12+ unplugin: 2.2.0+ unplugin-utils: 0.2.4+ vue: 3.5.12([email protected])+ optionalDependencies:+ '@babel/parser': 7.25.7+ transitivePeerDependencies:+ - supports-color+[email protected]([email protected])([email protected])([email protected](@types/[email protected])([email protected])([email protected]))([email protected](@swc/[email protected])([email protected])):dependencies:acorn: 8.12.1@@ -26760,6 +26892,11 @@ snapshots:optionalDependencies:webpack-sources: 3.2.3+ dependencies:+ acorn: 8.14.0+ webpack-virtual-modules: 0.6.2+