fix(desktop): align appload types and resolve shell import alias (#6369)

Co-authored-by: James George <25279263+jamesgeorge007@users.noreply.github.com>
This commit is contained in:
Shreyas
2026-05-26 12:14:39 +05:30
committed by GitHub
parent 3836d70e71
commit e51e54183e
12 changed files with 45 additions and 27 deletions
+1 -1
View File
@@ -40,7 +40,7 @@
"@hoppscotch/httpsnippet": "3.0.9",
"@hoppscotch/js-sandbox": "workspace:^",
"@hoppscotch/kernel": "workspace:^",
"@hoppscotch/plugin-appload": "github:CuriousCorrelation/tauri-plugin-appload#1d13dd1cfe6dde56398ea71dfec9e7bbb4376dbf",
"@hoppscotch/plugin-appload": "github:CuriousCorrelation/tauri-plugin-appload#9d4528be4f385bccbe46859631d31aa2ee1ec0b6",
"@hoppscotch/ui": "0.2.5",
"@hoppscotch/vue-toasted": "0.1.0",
"@lezer/highlight": "1.2.1",
+7
View File
@@ -242,9 +242,12 @@ declare module 'vue' {
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']
IconLucideCheck: typeof import('~icons/lucide/check')['default']
IconLucideCheckCircle: typeof import('~icons/lucide/check-circle')['default']
IconLucideChevronDown: typeof import('~icons/lucide/chevron-down')['default']
IconLucideChevronRight: typeof import('~icons/lucide/chevron-right')['default']
IconLucideCircleCheck: typeof import('~icons/lucide/circle-check')['default']
IconLucideFileQuestion: typeof import('~icons/lucide/file-question')['default']
IconLucideFileText: typeof import('~icons/lucide/file-text')['default']
IconLucideFileX: typeof import('~icons/lucide/file-x')['default']
@@ -258,10 +261,14 @@ declare module 'vue' {
IconLucideListEnd: typeof import('~icons/lucide/list-end')['default']
IconLucideLoader2: typeof import('~icons/lucide/loader2')['default']
IconLucideMinus: typeof import('~icons/lucide/minus')['default']
IconLucidePlusCircle: typeof import('~icons/lucide/plus-circle')['default']
IconLucideRefreshCw: typeof import('~icons/lucide/refresh-cw')['default']
IconLucideRss: typeof import('~icons/lucide/rss')['default']
IconLucideSearch: typeof import('~icons/lucide/search')['default']
IconLucideTerminal: typeof import('~icons/lucide/terminal')['default']
IconLucideTriangleAlert: typeof import('~icons/lucide/triangle-alert')['default']
IconLucideUsers: typeof import('~icons/lucide/users')['default']
IconLucideVerified: typeof import('~icons/lucide/verified')['default']
IconLucideX: typeof import('~icons/lucide/x')['default']
ImportExportBase: typeof import('./components/importExport/Base.vue')['default']
ImportExportImportExportList: typeof import('./components/importExport/ImportExportList.vue')['default']
@@ -10,11 +10,11 @@ import { invoke } from "@tauri-apps/api/core"
// writes to a different file and the shell would never see them.
//
// Relative imports rather than the `~/` alias because this module is
// consumed by both the selfhost-web entry (where `~` resolves to
// common's src) and the desktop shell entry (where `~` resolves to the
// shell's own src). The package-name alias `@hoppscotch/common/...`
// would work under Vite dev but fails under Rollup build, which treats
// the rewritten `@hoppscotch/common/src/...` as an unresolved package
// consumed by both the web entry (where `~` resolves to common's src)
// and the desktop shell entry (where `~` resolves to the shell's own
// src). The package-name alias `@hoppscotch/common/...` would work
// under Vite dev but fails under Rollup build, which treats the
// rewritten `@hoppscotch/common/src/...` as an unresolved package
// specifier. Relative paths resolve identically under TS, both Vite
// configs, and the production build.
import { UnifiedStore as Store } from "../kernel/store"
@@ -1,9 +1,9 @@
import { watch, type WatchStopHandle } from "vue"
import { getCurrentWebviewWindow } from "@tauri-apps/api/webviewWindow"
// Relative imports rather than the `~/` alias because this module is
// consumed by both the selfhost-web entry (where `~` resolves to
// common's src) and the desktop shell entry (where `~` resolves to the
// shell's own src). The package-name alias `@hoppscotch/common/...`
// consumed by both the web entry (where `~` resolves to common's src)
// and the desktop shell entry (where `~` resolves to the shell's own
// src). The package-name alias `@hoppscotch/common/...`
// would work under Vite dev (which honors pnpm symlinks via esbuild)
// but fails under Rollup build, which treats the rewritten
// `@hoppscotch/common/src/...` as an unresolved package specifier.
@@ -19,9 +19,8 @@ const LOG_TAG = "useDesktopZoomEffect"
* and keeps it in sync with the setting.
*
* Each desktop entry point calls this once during startup. The launcher
* window (`hoppscotch-desktop/src/main.ts`) and the bundled selfhost-web
* window (`hoppscotch-selfhost-web/src/main.ts`) each get their own
* invocation, and each watcher addresses its own window through
* window and the bundled web window each get their own invocation, and
* each watcher addresses its own window through
* `getCurrentWebviewWindow()`, which is the only window the webview can
* see. The settings store is the shared source of truth between the two
* windows, so a write in one reaches the other through the unified store
@@ -1,4 +1,9 @@
import type { DesktopSettings } from "~/platform/desktop-settings"
// Relative import rather than the `~/` alias because this module is
// consumed transitively by both the web entry (where `~` resolves to
// common's src) and the desktop shell entry (where `~` resolves to the
// shell's own src). See `composables/desktop-settings.ts` for the full
// rationale.
import type { DesktopSettings } from "../platform/desktop-settings"
/**
* Web-safe holder for the keyboard layout strategy.
+1 -1
View File
@@ -27,7 +27,7 @@
"@fontsource-variable/roboto-mono": "5.2.8",
"@hoppscotch/common": "workspace:^",
"@hoppscotch/kernel": "workspace:^",
"@hoppscotch/plugin-appload": "github:CuriousCorrelation/tauri-plugin-appload#1d13dd1cfe6dde56398ea71dfec9e7bbb4376dbf",
"@hoppscotch/plugin-appload": "github:CuriousCorrelation/tauri-plugin-appload#9d4528be4f385bccbe46859631d31aa2ee1ec0b6",
"@hoppscotch/ui": "0.2.5",
"@tauri-apps/api": "2.1.1",
"@tauri-apps/plugin-fs": "2.0.2",
@@ -12,6 +12,13 @@ export interface WindowOptions {
width?: number;
height?: number;
resizable?: boolean;
/**
* Initial WebView zoom factor applied between window creation and first
* paint. When omitted, the WebView opens at its native default of 1.0.
* Pass a persisted user preference here to avoid the 100% flash that a
* post-mount setZoom from the bundle would produce.
*/
zoomLevel?: number;
}
export interface LoadOptions {
bundleName: string;
@@ -1 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../guest-js/index.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,eAAe;IAC9B,SAAS,EAAE,MAAM,CAAA;CA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B,CAAC,CAElF;AAED,wBAAsB,IAAI,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,YAAY,CAAC,CAEtE;AAED,wBAAsB,KAAK,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,aAAa,CAAC,CAEzE;AAED,wBAAsB,MAAM,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,cAAc,CAAC,CAE5E;AAED,wBAAsB,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAE3C"}
+1 -1
View File
@@ -5566,7 +5566,7 @@ dependencies = [
[[package]]
name = "tauri-plugin-appload"
version = "0.1.0"
source = "git+https://github.com/CuriousCorrelation/tauri-plugin-appload?rev=1d13dd1cfe6dde56398ea71dfec9e7bbb4376dbf#1d13dd1cfe6dde56398ea71dfec9e7bbb4376dbf"
source = "git+https://github.com/CuriousCorrelation/tauri-plugin-appload?rev=9d4528be4f385bccbe46859631d31aa2ee1ec0b6#9d4528be4f385bccbe46859631d31aa2ee1ec0b6"
dependencies = [
"base64 0.22.1",
"blake3",
@@ -29,7 +29,7 @@ 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 = "1d13dd1cfe6dde56398ea71dfec9e7bbb4376dbf" }
tauri-plugin-appload = { git = "https://github.com/CuriousCorrelation/tauri-plugin-appload", rev = "9d4528be4f385bccbe46859631d31aa2ee1ec0b6" }
tauri-plugin-relay = { git = "https://github.com/CuriousCorrelation/tauri-plugin-relay", rev = "42f449e1c5657679fecf0374b0ce5047ad03c069" }
axum = "0.8.1"
tower-http = { version = "0.6.2", features = ["cors"] }
@@ -29,7 +29,7 @@
"@hoppscotch/common": "workspace:^",
"@hoppscotch/data": "workspace:^",
"@hoppscotch/kernel": "workspace:^",
"@hoppscotch/plugin-appload": "github:CuriousCorrelation/tauri-plugin-appload#1d13dd1cfe6dde56398ea71dfec9e7bbb4376dbf",
"@hoppscotch/plugin-appload": "github:CuriousCorrelation/tauri-plugin-appload#9d4528be4f385bccbe46859631d31aa2ee1ec0b6",
"@hoppscotch/ui": "0.2.5",
"@import-meta-env/unplugin": "0.6.3",
"@tauri-apps/api": "2.1.1",
+9 -9
View File
@@ -557,8 +557,8 @@ importers:
specifier: workspace:^
version: link:../hoppscotch-kernel
'@hoppscotch/plugin-appload':
specifier: github:CuriousCorrelation/tauri-plugin-appload#1d13dd1cfe6dde56398ea71dfec9e7bbb4376dbf
version: '@CuriousCorrelation/plugin-appload@https://codeload.github.com/CuriousCorrelation/tauri-plugin-appload/tar.gz/1d13dd1cfe6dde56398ea71dfec9e7bbb4376dbf'
specifier: github:CuriousCorrelation/tauri-plugin-appload#9d4528be4f385bccbe46859631d31aa2ee1ec0b6
version: '@CuriousCorrelation/plugin-appload@https://codeload.github.com/CuriousCorrelation/tauri-plugin-appload/tar.gz/9d4528be4f385bccbe46859631d31aa2ee1ec0b6'
'@hoppscotch/ui':
specifier: 0.2.5
version: 0.2.5(eslint@9.39.2(jiti@2.6.1))(terser@5.46.1)(typescript@5.9.3)(vite@7.3.2(@types/node@24.10.1)(jiti@2.6.1)(sass@1.99.0)(terser@5.46.1)(yaml@2.8.3))(vue@3.5.34(typescript@5.9.3))
@@ -1054,8 +1054,8 @@ importers:
specifier: workspace:^
version: link:../hoppscotch-kernel
'@hoppscotch/plugin-appload':
specifier: github:CuriousCorrelation/tauri-plugin-appload#1d13dd1cfe6dde56398ea71dfec9e7bbb4376dbf
version: '@CuriousCorrelation/plugin-appload@https://codeload.github.com/CuriousCorrelation/tauri-plugin-appload/tar.gz/1d13dd1cfe6dde56398ea71dfec9e7bbb4376dbf'
specifier: github:CuriousCorrelation/tauri-plugin-appload#9d4528be4f385bccbe46859631d31aa2ee1ec0b6
version: '@CuriousCorrelation/plugin-appload@https://codeload.github.com/CuriousCorrelation/tauri-plugin-appload/tar.gz/9d4528be4f385bccbe46859631d31aa2ee1ec0b6'
'@hoppscotch/ui':
specifier: 0.2.5
version: 0.2.5(eslint@9.39.2(jiti@2.6.1))(terser@5.46.1)(typescript@5.9.3)(vite@7.3.2(@types/node@25.9.0)(jiti@2.6.1)(sass@1.99.0)(terser@5.46.1)(yaml@2.8.3))(vue@3.5.34(typescript@5.9.3))
@@ -1396,8 +1396,8 @@ importers:
specifier: workspace:^
version: link:../hoppscotch-kernel
'@hoppscotch/plugin-appload':
specifier: github:CuriousCorrelation/tauri-plugin-appload#1d13dd1cfe6dde56398ea71dfec9e7bbb4376dbf
version: '@CuriousCorrelation/plugin-appload@https://codeload.github.com/CuriousCorrelation/tauri-plugin-appload/tar.gz/1d13dd1cfe6dde56398ea71dfec9e7bbb4376dbf'
specifier: github:CuriousCorrelation/tauri-plugin-appload#9d4528be4f385bccbe46859631d31aa2ee1ec0b6
version: '@CuriousCorrelation/plugin-appload@https://codeload.github.com/CuriousCorrelation/tauri-plugin-appload/tar.gz/9d4528be4f385bccbe46859631d31aa2ee1ec0b6'
'@hoppscotch/ui':
specifier: 0.2.5
version: 0.2.5(eslint@9.39.2(jiti@2.6.1))(terser@5.46.1)(typescript@5.9.3)(vite@7.3.2(@types/node@25.9.0)(jiti@2.6.1)(sass@1.99.0)(terser@5.46.1)(yaml@2.8.3))(vue@3.5.34(typescript@5.9.3))
@@ -1771,8 +1771,8 @@ packages:
graphql:
optional: true
'@CuriousCorrelation/plugin-appload@https://codeload.github.com/CuriousCorrelation/tauri-plugin-appload/tar.gz/1d13dd1cfe6dde56398ea71dfec9e7bbb4376dbf':
resolution: {gitHosted: true, tarball: https://codeload.github.com/CuriousCorrelation/tauri-plugin-appload/tar.gz/1d13dd1cfe6dde56398ea71dfec9e7bbb4376dbf}
'@CuriousCorrelation/plugin-appload@https://codeload.github.com/CuriousCorrelation/tauri-plugin-appload/tar.gz/9d4528be4f385bccbe46859631d31aa2ee1ec0b6':
resolution: {gitHosted: true, tarball: https://codeload.github.com/CuriousCorrelation/tauri-plugin-appload/tar.gz/9d4528be4f385bccbe46859631d31aa2ee1ec0b6}
version: 0.1.0
'@CuriousCorrelation/plugin-relay@https://codeload.github.com/CuriousCorrelation/tauri-plugin-relay/tar.gz/42f449e1c5657679fecf0374b0ce5047ad03c069':
@@ -13428,7 +13428,7 @@ snapshots:
optionalDependencies:
graphql: 16.14.0
'@CuriousCorrelation/plugin-appload@https://codeload.github.com/CuriousCorrelation/tauri-plugin-appload/tar.gz/1d13dd1cfe6dde56398ea71dfec9e7bbb4376dbf':
'@CuriousCorrelation/plugin-appload@https://codeload.github.com/CuriousCorrelation/tauri-plugin-appload/tar.gz/9d4528be4f385bccbe46859631d31aa2ee1ec0b6':
dependencies:
'@tauri-apps/api': 2.9.1