chore(native): bump and align dependencies (#5331)
- This standardises package versions between desktop, agent, appload, relay all the native components to resolve version inconsistencies and prepare for unified bumps in the future. - Account for recent minor dependency bumps as a follow-up to #5329 Co-authored-by: jamesgeorge007 <25279263+jamesgeorge007@users.noreply.github.com>
This commit is contained in:
parent
42089fbb55
commit
a0fbb7b076
23 changed files with 992 additions and 2040 deletions
|
|
@ -36,7 +36,7 @@
|
|||
"pnpm": {
|
||||
"overrides": {
|
||||
"cross-spawn": "7.0.6",
|
||||
"vue": "3.5.18",
|
||||
"vue": "3.5.19",
|
||||
"@nestjs-modules/mailer>mjml": "5.0.0-alpha.4",
|
||||
"subscriptions-transport-ws>ws": "7.5.10",
|
||||
"braces": "3.0.3",
|
||||
|
|
|
|||
|
|
@ -10,28 +10,28 @@
|
|||
"tauri": "tauri"
|
||||
},
|
||||
"dependencies": {
|
||||
"@hoppscotch/ui": "^0.2.1",
|
||||
"@tauri-apps/api": "^2.0.2",
|
||||
"@hoppscotch/ui": "0.2.5",
|
||||
"@tauri-apps/api": "2.1.1",
|
||||
"@tauri-apps/plugin-shell": "^2.0.0",
|
||||
"@vueuse/core": "^11.1.0",
|
||||
"axios": "1.8.2",
|
||||
"fp-ts": "^2.16.9",
|
||||
"@vueuse/core": "13.7.0",
|
||||
"axios": "1.11.0",
|
||||
"fp-ts": "2.16.11",
|
||||
"lodash-es": "4.17.21",
|
||||
"vue": "3.3.9"
|
||||
"vue": "3.5.19"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@iconify-json/lucide": "^1.2.8",
|
||||
"@iconify-json/lucide": "1.2.63",
|
||||
"@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",
|
||||
"postcss": "^8.4.47",
|
||||
"tailwindcss": "^3.4.13",
|
||||
"typescript": "5.8.3",
|
||||
"unplugin-icons": "^0.19.3",
|
||||
"unplugin-vue-components": "28.4.1",
|
||||
"vite": "^5.4.8",
|
||||
"@types/node": "24.3.0",
|
||||
"@vitejs/plugin-vue": "5.1.4",
|
||||
"autoprefixer": "10.4.21",
|
||||
"postcss": "8.5.6",
|
||||
"tailwindcss": "3.4.16",
|
||||
"typescript": "5.9.2",
|
||||
"unplugin-icons": "22.2.0",
|
||||
"unplugin-vue-components": "29.0.0",
|
||||
"vite": "6.3.5",
|
||||
"vue-tsc": "2.2.0"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,11 +40,11 @@
|
|||
"@hoppscotch/httpsnippet": "3.0.9",
|
||||
"@hoppscotch/js-sandbox": "workspace:^",
|
||||
"@hoppscotch/kernel": "workspace:^",
|
||||
"@hoppscotch/plugin-appload": "github:CuriousCorrelation/tauri-plugin-appload#1b52e49d881926135838cf6cfebdc1643a9bec31",
|
||||
"@hoppscotch/plugin-appload": "github:CuriousCorrelation/tauri-plugin-appload#e8dbe06eabf947e5efaf07d2e573238ceb11a7b1",
|
||||
"@hoppscotch/ui": "0.2.5",
|
||||
"@hoppscotch/vue-toasted": "0.1.0",
|
||||
"@lezer/highlight": "1.2.1",
|
||||
"@noble/curves": "1.9.6",
|
||||
"@noble/curves": "1.9.7",
|
||||
"@scure/base": "1.2.6",
|
||||
"@shopify/lang-jsonc": "1.0.1",
|
||||
"@tauri-apps/api": "2.1.1",
|
||||
|
|
@ -106,7 +106,7 @@
|
|||
"util": "0.12.5",
|
||||
"uuid": "11.1.0",
|
||||
"verzod": "0.4.0",
|
||||
"vue": "3.5.18",
|
||||
"vue": "3.5.19",
|
||||
"vue-i18n": "11.1.11",
|
||||
"vue-json-pretty": "2.5.0",
|
||||
"vue-pdf-embed": "2.1.3",
|
||||
|
|
@ -147,9 +147,9 @@
|
|||
"@typescript-eslint/eslint-plugin": "8.40.0",
|
||||
"@typescript-eslint/parser": "8.40.0",
|
||||
"@vitejs/plugin-vue": "5.1.4",
|
||||
"@vue/compiler-sfc": "3.5.18",
|
||||
"@vue/compiler-sfc": "3.5.19",
|
||||
"@vue/eslint-config-typescript": "13.0.0",
|
||||
"@vue/runtime-core": "3.5.18",
|
||||
"@vue/runtime-core": "3.5.19",
|
||||
"autoprefixer": "10.4.21",
|
||||
"cross-env": "10.0.0",
|
||||
"dotenv": "17.2.1",
|
||||
|
|
@ -176,7 +176,7 @@
|
|||
"vite-plugin-html-config": "2.0.2",
|
||||
"vite-plugin-pages": "0.33.1",
|
||||
"vite-plugin-pages-sitemap": "1.7.1",
|
||||
"vite-plugin-pwa": "1.0.2",
|
||||
"vite-plugin-pwa": "1.0.3",
|
||||
"vite-plugin-vue-layouts": "0.11.0",
|
||||
"vitest": "3.2.4",
|
||||
"vue-tsc": "1.8.8"
|
||||
|
|
|
|||
|
|
@ -19,46 +19,46 @@
|
|||
"build:portable": "pnpm tauri build -- --no-default-features --features portable"
|
||||
},
|
||||
"dependencies": {
|
||||
"@fontsource-variable/inter": "5.1.0",
|
||||
"@fontsource-variable/material-symbols-rounded": "5.1.3",
|
||||
"@fontsource-variable/roboto-mono": "5.1.0",
|
||||
"@fontsource-variable/inter": "5.2.6",
|
||||
"@fontsource-variable/material-symbols-rounded": "5.2.19",
|
||||
"@fontsource-variable/roboto-mono": "5.2.6",
|
||||
"@hoppscotch/common": "workspace:^",
|
||||
"@hoppscotch/kernel": "workspace:^",
|
||||
"@hoppscotch/plugin-appload": "github:CuriousCorrelation/tauri-plugin-appload#1b52e49d881926135838cf6cfebdc1643a9bec31",
|
||||
"@hoppscotch/ui": "0.2.1",
|
||||
"@hoppscotch/plugin-appload": "github:CuriousCorrelation/tauri-plugin-appload#e8dbe06eabf947e5efaf07d2e573238ceb11a7b1",
|
||||
"@hoppscotch/ui": "0.2.5",
|
||||
"@tauri-apps/api": "2.1.1",
|
||||
"@tauri-apps/plugin-fs": "2.0.2",
|
||||
"@tauri-apps/plugin-process": "2.2.0",
|
||||
"@tauri-apps/plugin-shell": "2.0.1",
|
||||
"@tauri-apps/plugin-store": "2.2.0",
|
||||
"@tauri-apps/plugin-updater": "2.5.1",
|
||||
"@vueuse/core": "11.1.0",
|
||||
"fp-ts": "2.16.9",
|
||||
"rxjs": "7.8.1",
|
||||
"vue": "^3.3.4",
|
||||
"vue-router": "4.4.5",
|
||||
"vue-tippy": "6.5.0",
|
||||
"zod": "3.23.8"
|
||||
"@vueuse/core": "13.7.0",
|
||||
"fp-ts": "2.16.11",
|
||||
"rxjs": "7.8.2",
|
||||
"vue": "3.5.19",
|
||||
"vue-router": "4.5.1",
|
||||
"vue-tippy": "6.7.1",
|
||||
"zod": "3.25.32"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@iconify-json/lucide": "1.2.10",
|
||||
"@rushstack/eslint-patch": "1.10.4",
|
||||
"@iconify-json/lucide": "1.2.63",
|
||||
"@rushstack/eslint-patch": "1.12.0",
|
||||
"@tauri-apps/cli": "^2",
|
||||
"@typescript-eslint/eslint-plugin": "8.9.0",
|
||||
"@typescript-eslint/parser": "8.9.0",
|
||||
"@vitejs/plugin-vue": "^5.0.5",
|
||||
"@typescript-eslint/eslint-plugin": "8.40.0",
|
||||
"@typescript-eslint/parser": "8.40.0",
|
||||
"@vitejs/plugin-vue": "5.1.4",
|
||||
"@vue/eslint-config-typescript": "13.0.0",
|
||||
"autoprefixer": "10.4.20",
|
||||
"autoprefixer": "10.4.21",
|
||||
"eslint": "8.57.0",
|
||||
"eslint-plugin-prettier": "5.2.1",
|
||||
"eslint-plugin-vue": "9.29.0",
|
||||
"postcss": "8.4.49",
|
||||
"sass": "1.80.3",
|
||||
"tailwindcss": "3.4.14",
|
||||
"typescript": "^5.8.3",
|
||||
"unplugin-icons": "0.19.3",
|
||||
"unplugin-vue-components": "0.27.4",
|
||||
"vite": "^5.3.1",
|
||||
"eslint-plugin-prettier": "5.5.4",
|
||||
"eslint-plugin-vue": "10.4.0",
|
||||
"postcss": "8.5.6",
|
||||
"sass": "1.90.0",
|
||||
"tailwindcss": "3.4.16",
|
||||
"typescript": "5.9.2",
|
||||
"unplugin-icons": "22.2.0",
|
||||
"unplugin-vue-components": "29.0.0",
|
||||
"vite": "6.3.5",
|
||||
"vue-tsc": "2.2.0"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
"tauri": "tauri"
|
||||
},
|
||||
"dependencies": {
|
||||
"@tauri-apps/api": "^2.0.0-alpha.11",
|
||||
"@tauri-apps/api": "^2.1.1",
|
||||
"tauri-plugin-appload-api": "file:../../"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
|
|
|||
|
|
@ -22,12 +22,12 @@
|
|||
"pretest": "pnpm build"
|
||||
},
|
||||
"dependencies": {
|
||||
"@tauri-apps/api": "^2.0.0"
|
||||
"@tauri-apps/api": "2.1.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@rollup/plugin-typescript": "^11.1.6",
|
||||
"rollup": "^4.9.6",
|
||||
"typescript": "^5.8.3",
|
||||
"typescript": "5.9.2",
|
||||
"tslib": "^2.6.2"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,12 +22,12 @@
|
|||
"pretest": "pnpm build"
|
||||
},
|
||||
"dependencies": {
|
||||
"@tauri-apps/api": "^2.0.0"
|
||||
"@tauri-apps/api": "2.1.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@rollup/plugin-typescript": "^11.1.6",
|
||||
"rollup": "^4.9.6",
|
||||
"typescript": "^5.8.3",
|
||||
"typescript": "5.9.2",
|
||||
"tslib": "^2.6.2"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
4
packages/hoppscotch-desktop/src-tauri/Cargo.lock
generated
4
packages/hoppscotch-desktop/src-tauri/Cargo.lock
generated
|
|
@ -5341,7 +5341,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "tauri-plugin-appload"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/CuriousCorrelation/tauri-plugin-appload?rev=1b52e49d881926135838cf6cfebdc1643a9bec31#1b52e49d881926135838cf6cfebdc1643a9bec31"
|
||||
source = "git+https://github.com/CuriousCorrelation/tauri-plugin-appload?rev=e8dbe06eabf947e5efaf07d2e573238ceb11a7b1#e8dbe06eabf947e5efaf07d2e573238ceb11a7b1"
|
||||
dependencies = [
|
||||
"base64 0.22.1",
|
||||
"blake3",
|
||||
|
|
@ -5495,7 +5495,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "tauri-plugin-relay"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/CuriousCorrelation/tauri-plugin-relay?rev=4ed4fcafeb93856591e8a36522f6ec6e340e4dc5#4ed4fcafeb93856591e8a36522f6ec6e340e4dc5"
|
||||
source = "git+https://github.com/CuriousCorrelation/tauri-plugin-relay?rev=ff18f776ddeb53dbbdeaf97e1fabc30bdc57c158#ff18f776ddeb53dbbdeaf97e1fabc30bdc57c158"
|
||||
dependencies = [
|
||||
"relay",
|
||||
"serde",
|
||||
|
|
|
|||
|
|
@ -29,8 +29,8 @@ tauri-plugin-store = "2.2.0"
|
|||
tauri-plugin-dialog = "2.2.0"
|
||||
tauri-plugin-fs = "2.2.0"
|
||||
tauri-plugin-deep-link = "2.2.0"
|
||||
tauri-plugin-appload = { git = "https://github.com/CuriousCorrelation/tauri-plugin-appload", rev = "1b52e49d881926135838cf6cfebdc1643a9bec31" }
|
||||
tauri-plugin-relay = { git = "https://github.com/CuriousCorrelation/tauri-plugin-relay", rev = "4ed4fcafeb93856591e8a36522f6ec6e340e4dc5" }
|
||||
tauri-plugin-appload = { git = "https://github.com/CuriousCorrelation/tauri-plugin-appload", rev = "e8dbe06eabf947e5efaf07d2e573238ceb11a7b1" }
|
||||
tauri-plugin-relay = { git = "https://github.com/CuriousCorrelation/tauri-plugin-relay", rev = "ff18f776ddeb53dbbdeaf97e1fabc30bdc57c158" }
|
||||
axum = "0.8.1"
|
||||
tower-http = { version = "0.6.2", features = ["cors"] }
|
||||
random-port = "0.1.1"
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
</div>
|
||||
</main>
|
||||
</div>
|
||||
<Toaster position="bottom-right" richColors />
|
||||
<Toaster position="bottom-right" rich-colors />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
// @ts-nocheck
|
||||
// Generated by unplugin-vue-components
|
||||
// Read more: https://github.com/vuejs/core/pull/3399
|
||||
// biome-ignore lint: disable
|
||||
export {}
|
||||
|
||||
/* prettier-ignore */
|
||||
|
|
|
|||
|
|
@ -10,14 +10,16 @@
|
|||
<div
|
||||
:class="[
|
||||
open ? '' : '-translate-x-full ease-in',
|
||||
expanded ? 'w-56' : 'w-16'
|
||||
expanded ? 'w-56' : 'w-16',
|
||||
]"
|
||||
class="fixed md:static md:translate-x-0 md:inset-0 inset-y-0 left-0 z-30 transition duration-300 flex overflow-y-auto bg-primary border-r border-divider"
|
||||
>
|
||||
<div class="w-full">
|
||||
<div class="flex items-center px-4 my-4">
|
||||
<img src="/logo.svg" alt="Hoppscotch" class="h-7 w-7" />
|
||||
<span v-if="expanded" class="ml-4 font-semibold text-accentContrast">HOPPSCOTCH</span>
|
||||
<span v-if="expanded" class="ml-4 font-semibold text-accentContrast"
|
||||
>HOPPSCOTCH</span
|
||||
>
|
||||
</div>
|
||||
|
||||
<nav class="my-5">
|
||||
|
|
|
|||
|
|
@ -2,13 +2,13 @@ import { createApp } from "vue"
|
|||
import App from "./App.vue"
|
||||
import router from "./router"
|
||||
|
||||
import '@hoppscotch/ui/style.css'
|
||||
import './assets/scss/styles.scss'
|
||||
import './assets/scss/tailwind.scss'
|
||||
import '@fontsource-variable/inter'
|
||||
import '@fontsource-variable/material-symbols-rounded'
|
||||
import '@fontsource-variable/roboto-mono'
|
||||
import "@hoppscotch/ui/style.css"
|
||||
import "./assets/scss/styles.scss"
|
||||
import "./assets/scss/tailwind.scss"
|
||||
import "@fontsource-variable/inter"
|
||||
import "@fontsource-variable/material-symbols-rounded"
|
||||
import "@fontsource-variable/roboto-mono"
|
||||
|
||||
const app = createApp(App)
|
||||
app.use(router)
|
||||
app.mount('#app')
|
||||
app.mount("#app")
|
||||
|
|
|
|||
|
|
@ -1,15 +1,15 @@
|
|||
import { createRouter, createWebHistory } from 'vue-router'
|
||||
import Home from './views/Home.vue'
|
||||
import { createRouter, createWebHistory } from "vue-router"
|
||||
import Home from "./views/Home.vue"
|
||||
|
||||
const router = createRouter({
|
||||
history: createWebHistory(),
|
||||
routes: [
|
||||
{
|
||||
path: '/',
|
||||
name: 'home',
|
||||
component: Home
|
||||
}
|
||||
]
|
||||
path: "/",
|
||||
name: "home",
|
||||
component: Home,
|
||||
},
|
||||
],
|
||||
})
|
||||
|
||||
export default router
|
||||
|
|
|
|||
|
|
@ -17,18 +17,18 @@ export enum UpdateStatus {
|
|||
DOWNLOADING = "downloading",
|
||||
INSTALLING = "installing",
|
||||
READY_TO_RESTART = "ready_to_restart",
|
||||
ERROR = "error"
|
||||
ERROR = "error",
|
||||
}
|
||||
|
||||
export enum CheckResult {
|
||||
AVAILABLE,
|
||||
NOT_AVAILABLE,
|
||||
TIMEOUT,
|
||||
ERROR
|
||||
ERROR,
|
||||
}
|
||||
|
||||
export interface UpdateState {
|
||||
status: UpdateStatus;
|
||||
version?: string;
|
||||
message?: string;
|
||||
status: UpdateStatus
|
||||
version?: string
|
||||
message?: string
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,28 +1,30 @@
|
|||
import { check, type DownloadEvent } from "@tauri-apps/plugin-updater";
|
||||
import { relaunch } from "@tauri-apps/plugin-process";
|
||||
import { type LazyStore } from "@tauri-apps/plugin-store";
|
||||
import { UpdateStatus, CheckResult, UpdateState } from "~/types";
|
||||
import { check, type DownloadEvent } from "@tauri-apps/plugin-updater"
|
||||
import { relaunch } from "@tauri-apps/plugin-process"
|
||||
import { type LazyStore } from "@tauri-apps/plugin-store"
|
||||
import { UpdateStatus, CheckResult, UpdateState } from "~/types"
|
||||
|
||||
export class UpdaterService {
|
||||
private currentProgress: { downloaded: number; total?: number } = { downloaded: 0 };
|
||||
private currentProgress: { downloaded: number; total?: number } = {
|
||||
downloaded: 0,
|
||||
}
|
||||
|
||||
constructor(private store: LazyStore) {}
|
||||
|
||||
async initialize(): Promise<void> {
|
||||
await this.saveUpdateState({
|
||||
status: UpdateStatus.IDLE
|
||||
});
|
||||
status: UpdateStatus.IDLE,
|
||||
})
|
||||
}
|
||||
|
||||
getCurrentProgress(): { downloaded: number; total?: number } {
|
||||
return this.currentProgress;
|
||||
return this.currentProgress
|
||||
}
|
||||
|
||||
async checkForUpdates(timeout = 5000): Promise<CheckResult> {
|
||||
try {
|
||||
await this.saveUpdateState({
|
||||
status: UpdateStatus.CHECKING
|
||||
});
|
||||
status: UpdateStatus.CHECKING,
|
||||
})
|
||||
|
||||
// This creats a timeout promise that is slightly longer than `check`'s internal timeout,
|
||||
// this is just to make sure we don't keep checking for updates indefinitely.
|
||||
|
|
@ -31,132 +33,133 @@ export class UpdaterService {
|
|||
const timeoutPromise = new Promise<null>((resolve) => {
|
||||
// Longer local timeout to make sure it only triggers
|
||||
// if there's an issue with `check`'s built-in timeout.
|
||||
const bufferTimeout = timeout + 1000;
|
||||
const bufferTimeout = timeout + 1000
|
||||
setTimeout(() => {
|
||||
console.log("Update check exceeded buffer timeout, likely hanging in check function");
|
||||
resolve(null);
|
||||
}, bufferTimeout);
|
||||
});
|
||||
console.log(
|
||||
"Update check exceeded buffer timeout, likely hanging in check function"
|
||||
)
|
||||
resolve(null)
|
||||
}, bufferTimeout)
|
||||
})
|
||||
|
||||
const updateResult = await Promise.race([
|
||||
check({ timeout }),
|
||||
timeoutPromise
|
||||
]);
|
||||
timeoutPromise,
|
||||
])
|
||||
|
||||
// If we got a timeout (null), we treat it as no update available
|
||||
// NOTE: We could maybe show more info but for now this works fine
|
||||
if (!updateResult) {
|
||||
console.log("Update check timed out or no update available");
|
||||
console.log("Update check timed out or no update available")
|
||||
await this.saveUpdateState({
|
||||
status: UpdateStatus.NOT_AVAILABLE
|
||||
});
|
||||
return CheckResult.TIMEOUT;
|
||||
status: UpdateStatus.NOT_AVAILABLE,
|
||||
})
|
||||
return CheckResult.TIMEOUT
|
||||
}
|
||||
|
||||
const hasUpdates = updateResult.available;
|
||||
const hasUpdates = updateResult.available
|
||||
|
||||
await this.saveUpdateState(
|
||||
hasUpdates
|
||||
? {
|
||||
status: UpdateStatus.AVAILABLE,
|
||||
version: updateResult.version,
|
||||
message: updateResult.body
|
||||
message: updateResult.body,
|
||||
}
|
||||
: {
|
||||
status: UpdateStatus.NOT_AVAILABLE
|
||||
status: UpdateStatus.NOT_AVAILABLE,
|
||||
}
|
||||
);
|
||||
)
|
||||
|
||||
console.log("Update check result:", {
|
||||
available: updateResult.available,
|
||||
currentVersion: updateResult.currentVersion,
|
||||
version: updateResult.version
|
||||
});
|
||||
version: updateResult.version,
|
||||
})
|
||||
|
||||
return hasUpdates ? CheckResult.AVAILABLE : CheckResult.NOT_AVAILABLE;
|
||||
return hasUpdates ? CheckResult.AVAILABLE : CheckResult.NOT_AVAILABLE
|
||||
} catch (error) {
|
||||
console.error("Error checking for updates:", error);
|
||||
console.error("Error checking for updates:", error)
|
||||
await this.saveUpdateState({
|
||||
status: UpdateStatus.ERROR,
|
||||
message: String(error)
|
||||
});
|
||||
return CheckResult.ERROR;
|
||||
message: String(error),
|
||||
})
|
||||
return CheckResult.ERROR
|
||||
}
|
||||
}
|
||||
|
||||
async downloadAndInstall(): Promise<void> {
|
||||
try {
|
||||
const updateResult = await check();
|
||||
const updateResult = await check()
|
||||
|
||||
if (!updateResult) {
|
||||
throw new Error("No update available to install");
|
||||
throw new Error("No update available to install")
|
||||
}
|
||||
|
||||
let totalBytes: number | undefined;
|
||||
let downloadedBytes = 0;
|
||||
let totalBytes: number | undefined
|
||||
let downloadedBytes = 0
|
||||
|
||||
await this.saveUpdateState({
|
||||
status: UpdateStatus.DOWNLOADING,
|
||||
});
|
||||
})
|
||||
|
||||
await updateResult.downloadAndInstall(
|
||||
(event: DownloadEvent) => {
|
||||
await updateResult.downloadAndInstall((event: DownloadEvent) => {
|
||||
try {
|
||||
if (event.event === 'Started') {
|
||||
totalBytes = event.data.contentLength;
|
||||
downloadedBytes = 0;
|
||||
console.log(`Download started, total size: ${totalBytes} bytes`);
|
||||
} else if (event.event === 'Progress') {
|
||||
downloadedBytes += event.data.chunkLength;
|
||||
console.log(`Download progress: ${downloadedBytes}/${totalBytes} bytes`);
|
||||
if (event.event === "Started") {
|
||||
totalBytes = event.data.contentLength
|
||||
downloadedBytes = 0
|
||||
console.log(`Download started, total size: ${totalBytes} bytes`)
|
||||
} else if (event.event === "Progress") {
|
||||
downloadedBytes += event.data.chunkLength
|
||||
console.log(
|
||||
`Download progress: ${downloadedBytes}/${totalBytes} bytes`
|
||||
)
|
||||
|
||||
this.currentProgress = {
|
||||
downloaded: downloadedBytes,
|
||||
total: totalBytes
|
||||
};
|
||||
} else if (event.event === 'Finished') {
|
||||
console.log("Download finished, starting installation");
|
||||
total: totalBytes,
|
||||
}
|
||||
} else if (event.event === "Finished") {
|
||||
console.log("Download finished, starting installation")
|
||||
this.saveUpdateState({
|
||||
status: UpdateStatus.INSTALLING
|
||||
});
|
||||
status: UpdateStatus.INSTALLING,
|
||||
})
|
||||
}
|
||||
} catch (error) {
|
||||
console.warn('Progress tracking error:', error);
|
||||
console.warn("Progress tracking error:", error)
|
||||
}
|
||||
}
|
||||
);
|
||||
})
|
||||
|
||||
// If we reach here, it means the app hasn't restarted automatically
|
||||
// Mark as ready to restart
|
||||
await this.saveUpdateState({
|
||||
status: UpdateStatus.READY_TO_RESTART
|
||||
});
|
||||
|
||||
status: UpdateStatus.READY_TO_RESTART,
|
||||
})
|
||||
} catch (error) {
|
||||
console.error("Error installing updates:", error);
|
||||
console.error("Error installing updates:", error)
|
||||
await this.saveUpdateState({
|
||||
status: UpdateStatus.ERROR,
|
||||
message: String(error)
|
||||
});
|
||||
throw error;
|
||||
message: String(error),
|
||||
})
|
||||
throw error
|
||||
}
|
||||
}
|
||||
|
||||
async restartApp(): Promise<void> {
|
||||
try {
|
||||
await relaunch();
|
||||
await relaunch()
|
||||
} catch (error) {
|
||||
console.error("Failed to restart app:", error);
|
||||
throw error;
|
||||
console.error("Failed to restart app:", error)
|
||||
throw error
|
||||
}
|
||||
}
|
||||
|
||||
private async saveUpdateState(state: UpdateState): Promise<void> {
|
||||
try {
|
||||
await this.store.set("updateState", state);
|
||||
await this.store.save();
|
||||
await this.store.set("updateState", state)
|
||||
await this.store.save()
|
||||
} catch (error) {
|
||||
console.error("Failed to save update state:", error);
|
||||
console.error("Failed to save update state:", error)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { Config } from 'tailwindcss';
|
||||
import preset from '@hoppscotch/ui/ui-preset';
|
||||
import { Config } from "tailwindcss"
|
||||
import preset from "@hoppscotch/ui/ui-preset"
|
||||
|
||||
export default {
|
||||
content: ['src/**/*.{vue,html}'],
|
||||
content: ["src/**/*.{vue,html}"],
|
||||
presets: [preset],
|
||||
} satisfies Config;
|
||||
} satisfies Config
|
||||
|
|
|
|||
|
|
@ -47,18 +47,18 @@ export default defineConfig(async () => ({
|
|||
},
|
||||
|
||||
optimizeDeps: {
|
||||
include: ['@hoppscotch/kernel']
|
||||
include: ["@hoppscotch/kernel"],
|
||||
},
|
||||
|
||||
build: {
|
||||
rollupOptions: {
|
||||
output: {
|
||||
manualChunks: {
|
||||
kernel: ['@hoppscotch/kernel'],
|
||||
ui: ['@hoppscotch/ui'],
|
||||
}
|
||||
}
|
||||
}
|
||||
kernel: ["@hoppscotch/kernel"],
|
||||
ui: ["@hoppscotch/ui"],
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
// Vite options tailored for Tauri development and only applied in `tauri dev` or `tauri build`
|
||||
|
|
|
|||
|
|
@ -35,9 +35,9 @@
|
|||
},
|
||||
"homepage": "https://github.com/hoppscotch/hoppscotch#readme",
|
||||
"devDependencies": {
|
||||
"@types/node": "22.9.3",
|
||||
"typescript": "5.8.3",
|
||||
"vite": "5.4.11"
|
||||
"@types/node": "24.3.0",
|
||||
"typescript": "5.9.2",
|
||||
"vite": "6.3.5"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@tauri-apps/api": "2.1.1"
|
||||
|
|
@ -48,15 +48,15 @@
|
|||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"axios": "1.8.2",
|
||||
"fp-ts": "2.16.9",
|
||||
"axios": "1.11.0",
|
||||
"fp-ts": "2.16.11",
|
||||
"aws4fetch": "1.0.20",
|
||||
"zod": "3.22.4",
|
||||
"zod": "3.25.32",
|
||||
"superjson": "2.2.2",
|
||||
"@tauri-apps/plugin-shell": "2.0.1",
|
||||
"@tauri-apps/plugin-dialog": "2.0.1",
|
||||
"@tauri-apps/plugin-fs": "2.0.2",
|
||||
"@tauri-apps/plugin-store": "2.2.0",
|
||||
"@hoppscotch/plugin-relay": "github:CuriousCorrelation/tauri-plugin-relay#4ed4fcafeb93856591e8a36522f6ec6e340e4dc5"
|
||||
"@hoppscotch/plugin-relay": "github:CuriousCorrelation/tauri-plugin-relay#ff18f776ddeb53dbbdeaf97e1fabc30bdc57c158"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,7 +8,14 @@ export const implementation: VersionedAPI<IoV1> = {
|
|||
version: { major: 1, minor: 0, patch: 0 },
|
||||
api: {
|
||||
async saveFileWithDialog(opts: SaveFileWithDialogOptions) {
|
||||
const file = new Blob([opts.data], { type: opts.contentType })
|
||||
// TODO: Revisit this because perhaps a better approach is
|
||||
// ```ts
|
||||
// const data: BlobPart = typeof opts.data === 'string'
|
||||
// ? opts.data
|
||||
// : new Uint8Array(opts.data);
|
||||
// const file = new Blob([data], { type: opts.contentType })
|
||||
// ```
|
||||
const file = new Blob([opts.data as BlobPart], { type: opts.contentType })
|
||||
const a = document.createElement("a")
|
||||
const url = URL.createObjectURL(file)
|
||||
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@
|
|||
"stream-browserify": "3.0.0",
|
||||
"util": "0.12.5",
|
||||
"verzod": "0.4.0",
|
||||
"vue": "3.5.18",
|
||||
"vue": "3.5.19",
|
||||
"workbox-window": "7.3.0",
|
||||
"zod": "3.25.32"
|
||||
},
|
||||
|
|
@ -86,8 +86,8 @@
|
|||
"vite-plugin-inspect": "11.3.2",
|
||||
"vite-plugin-pages": "0.33.1",
|
||||
"vite-plugin-pages-sitemap": "1.7.1",
|
||||
"vite-plugin-pwa": "1.0.2",
|
||||
"vite-plugin-static-copy": "3.1.1",
|
||||
"vite-plugin-pwa": "1.0.3",
|
||||
"vite-plugin-static-copy": "3.1.2",
|
||||
"vite-plugin-vue-layouts": "0.11.0",
|
||||
"vue-tsc": "2.1.6"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@
|
|||
"ts-node-dev": "2.0.0",
|
||||
"unplugin-icons": "22.2.0",
|
||||
"unplugin-vue-components": "29.0.0",
|
||||
"vue": "3.5.18",
|
||||
"vue": "3.5.19",
|
||||
"vue-i18n": "11.1.11",
|
||||
"vue-router": "4.5.1",
|
||||
"vue-tippy": "6.7.1"
|
||||
|
|
@ -58,7 +58,7 @@
|
|||
"@import-meta-env/unplugin": "0.6.2",
|
||||
"@types/lodash-es": "4.17.12",
|
||||
"@vitejs/plugin-vue": "5.1.4",
|
||||
"@vue/compiler-sfc": "3.5.18",
|
||||
"@vue/compiler-sfc": "3.5.19",
|
||||
"autoprefixer": "10.4.21",
|
||||
"dotenv": "17.2.1",
|
||||
"graphql-tag": "2.12.6",
|
||||
|
|
|
|||
2653
pnpm-lock.yaml
2653
pnpm-lock.yaml
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue