From eb8487fc826cf776e6979f7f69884aaea6194ee3 Mon Sep 17 00:00:00 2001 From: Shreyas Date: Wed, 27 Aug 2025 09:52:49 +0530 Subject: [PATCH] fix(desktop): rebase with appload mirror and hash (#5351) The rebases and updates desktop's `@hoppscotch/plugin-appload` dependency from branch-based ref to specific commit hash to resolve Docker build failures. Branch-based GitHub dependencies require `git` in the build environment. Our Dockerfile stages didn't install `git`, which caused `pnpm install` to fail with `spawn git ENOENT`. Using a commit hash allows `pnpm` to fetch the tarball directly without requiring `git`. --- packages/hoppscotch-desktop/package.json | 2 +- .../tauri-plugin-appload/package.json | 6 ++-- .../permissions/autogenerated/reference.md | 1 + .../permissions/schemas/schema.json | 10 +++--- .../src/vendor/builder.rs | 34 ------------------- .../tauri-plugin-relay/package.json | 6 ++-- .../tauri-plugin-relay/pnpm-lock.yaml | 18 +++++----- .../hoppscotch-desktop/src-tauri/Cargo.lock | 2 +- .../hoppscotch-desktop/src-tauri/Cargo.toml | 2 +- pnpm-lock.yaml | 14 ++++---- 10 files changed, 32 insertions(+), 63 deletions(-) delete mode 100644 packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/vendor/builder.rs diff --git a/packages/hoppscotch-desktop/package.json b/packages/hoppscotch-desktop/package.json index 32e649cd..afe6fd67 100644 --- a/packages/hoppscotch-desktop/package.json +++ b/packages/hoppscotch-desktop/package.json @@ -24,7 +24,7 @@ "@fontsource-variable/roboto-mono": "5.2.6", "@hoppscotch/common": "workspace:^", "@hoppscotch/kernel": "workspace:^", - "@hoppscotch/plugin-appload": "github:CuriousCorrelation/tauri-plugin-appload#feat-desktop-appload-top-level-config", + "@hoppscotch/plugin-appload": "github:CuriousCorrelation/tauri-plugin-appload#e05861959938b57479a1a81fa796735ebbd08c7c", "@hoppscotch/ui": "0.2.5", "@tauri-apps/api": "2.1.1", "@tauri-apps/plugin-fs": "2.0.2", diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/package.json b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/package.json index e93616bd..f4ed9a99 100644 --- a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/package.json +++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/package.json @@ -26,8 +26,8 @@ }, "devDependencies": { "@rollup/plugin-typescript": "^11.1.6", - "rollup": "^4.48.1", - "tslib": "^2.6.2", - "typescript": "5.9.2" + "rollup": "^4.9.6", + "typescript": "5.9.2", + "tslib": "^2.6.2" } } diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/permissions/autogenerated/reference.md b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/permissions/autogenerated/reference.md index 0608d50a..a62dce5c 100644 --- a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/permissions/autogenerated/reference.md +++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/permissions/autogenerated/reference.md @@ -7,6 +7,7 @@ Default permissions for AppLoad plugin - `allow-load` - `allow-download` - `allow-clear` +- `allow-close` - `allow-remove` ## Permission Table diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/permissions/schemas/schema.json b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/permissions/schemas/schema.json index 97ddce3b..4381a8e4 100644 --- a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/permissions/schemas/schema.json +++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/permissions/schemas/schema.json @@ -309,12 +309,14 @@ { "description": "Enables the close command without any pre-configured scope.", "type": "string", - "const": "allow-close" + "const": "allow-close", + "markdownDescription": "Enables the close command without any pre-configured scope." }, { "description": "Denies the close command without any pre-configured scope.", "type": "string", - "const": "deny-close" + "const": "deny-close", + "markdownDescription": "Denies the close command without any pre-configured scope." }, { "description": "Enables the download command without any pre-configured scope.", @@ -365,10 +367,10 @@ "markdownDescription": "Denies the remove command without any pre-configured scope." }, { - "description": "Default permissions for AppLoad plugin\n#### This default permission set includes:\n\n- `allow-load`\n- `allow-download`\n- `allow-clear`\n- `allow-remove`", + "description": "Default permissions for AppLoad plugin\n#### This default permission set includes:\n\n- `allow-load`\n- `allow-download`\n- `allow-clear`\n- `allow-close`\n- `allow-remove`", "type": "string", "const": "default", - "markdownDescription": "Default permissions for AppLoad plugin\n#### This default permission set includes:\n\n- `allow-load`\n- `allow-download`\n- `allow-clear`\n- `allow-remove`" + "markdownDescription": "Default permissions for AppLoad plugin\n#### This default permission set includes:\n\n- `allow-load`\n- `allow-download`\n- `allow-clear`\n- `allow-close`\n- `allow-remove`" } ] } diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/vendor/builder.rs b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/vendor/builder.rs deleted file mode 100644 index 54c614b6..00000000 --- a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/src/vendor/builder.rs +++ /dev/null @@ -1,34 +0,0 @@ -use crate::Manifest; - -use super::{Result, VendorConfig, VendorError}; - -#[derive(Default)] -pub struct VendorConfigBuilder { - bundle: Option<(Vec, Vec)>, -} - -impl VendorConfigBuilder { - pub fn new() -> Self { - Self { bundle: None } - } - - pub fn bundle(mut self, bundle_bytes: Vec, manifest_bytes: &[u8]) -> Self { - self.bundle = Some((bundle_bytes, manifest_bytes.to_vec())); - self - } - - pub fn build(self) -> Result { - let bundle = self - .bundle - .map(|(bundle_bytes, manifest_bytes)| -> Result<_> { - let manifest: Manifest = serde_json::from_slice(&manifest_bytes).map_err(|e| { - VendorError::InvalidData(format!("Invalid manifest JSON: {}", e)) - })?; - - Ok((bundle_bytes, manifest)) - }) - .transpose()?; - - Ok(VendorConfig { bundle }) - } -} diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-relay/package.json b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-relay/package.json index d2311af2..f52ec200 100644 --- a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-relay/package.json +++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-relay/package.json @@ -26,8 +26,8 @@ }, "devDependencies": { "@rollup/plugin-typescript": "^11.1.6", - "rollup": "^4.48.1", - "tslib": "^2.6.2", - "typescript": "5.9.2" + "rollup": "^4.9.6", + "typescript": "5.9.2", + "tslib": "^2.6.2" } } diff --git a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-relay/pnpm-lock.yaml b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-relay/pnpm-lock.yaml index 9cd73503..a33fd01b 100644 --- a/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-relay/pnpm-lock.yaml +++ b/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-relay/pnpm-lock.yaml @@ -9,12 +9,12 @@ importers: .: dependencies: '@tauri-apps/api': - specifier: ^2.0.0 + specifier: 2.1.1 version: 2.1.1 devDependencies: '@rollup/plugin-typescript': specifier: ^11.1.6 - version: 11.1.6(rollup@4.27.4)(tslib@2.8.1)(typescript@5.8.3) + version: 11.1.6(rollup@4.27.4)(tslib@2.8.1)(typescript@5.9.2) rollup: specifier: ^4.9.6 version: 4.27.4 @@ -22,8 +22,8 @@ importers: specifier: ^2.6.2 version: 2.8.1 typescript: - specifier: ^5.8.3 - version: 5.8.3 + specifier: 5.9.2 + version: 5.9.2 packages: @@ -187,18 +187,18 @@ packages: tslib@2.8.1: resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==} - typescript@5.8.3: - resolution: {integrity: sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==} + typescript@5.9.2: + resolution: {integrity: sha512-CWBzXQrc/qOkhidw1OzBTQuYRbfyxDXJMVJ1XNwUHGROVmuaeiEm3OslpZ1RV96d7SKKjZKrSJu3+t/xlw3R9A==} engines: {node: '>=14.17'} hasBin: true snapshots: - '@rollup/plugin-typescript@11.1.6(rollup@4.27.4)(tslib@2.8.1)(typescript@5.8.3)': + '@rollup/plugin-typescript@11.1.6(rollup@4.27.4)(tslib@2.8.1)(typescript@5.9.2)': dependencies: '@rollup/pluginutils': 5.1.3(rollup@4.27.4) resolve: 1.22.8 - typescript: 5.8.3 + typescript: 5.9.2 optionalDependencies: rollup: 4.27.4 tslib: 2.8.1 @@ -322,4 +322,4 @@ snapshots: tslib@2.8.1: {} - typescript@5.8.3: {} + typescript@5.9.2: {} diff --git a/packages/hoppscotch-desktop/src-tauri/Cargo.lock b/packages/hoppscotch-desktop/src-tauri/Cargo.lock index a4da81b0..04504de5 100644 --- a/packages/hoppscotch-desktop/src-tauri/Cargo.lock +++ b/packages/hoppscotch-desktop/src-tauri/Cargo.lock @@ -5448,7 +5448,7 @@ dependencies = [ [[package]] name = "tauri-plugin-appload" version = "0.1.0" -source = "git+https://github.com/CuriousCorrelation/tauri-plugin-appload?branch=feat-desktop-appload-top-level-config#3d03f6c7b1726ecf179af2124e77a9742d600637" +source = "git+https://github.com/CuriousCorrelation/tauri-plugin-appload?rev=e05861959938b57479a1a81fa796735ebbd08c7c#e05861959938b57479a1a81fa796735ebbd08c7c" dependencies = [ "base64 0.22.1", "blake3", diff --git a/packages/hoppscotch-desktop/src-tauri/Cargo.toml b/packages/hoppscotch-desktop/src-tauri/Cargo.toml index 63904fcf..de7a2ec8 100644 --- a/packages/hoppscotch-desktop/src-tauri/Cargo.toml +++ b/packages/hoppscotch-desktop/src-tauri/Cargo.toml @@ -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", branch = "feat-desktop-appload-top-level-config" } +tauri-plugin-appload = { git = "https://github.com/CuriousCorrelation/tauri-plugin-appload", rev = "e05861959938b57479a1a81fa796735ebbd08c7c" } 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"] } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 574701f3..eb6b6bf9 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -980,8 +980,8 @@ importers: specifier: workspace:^ version: link:../hoppscotch-kernel '@hoppscotch/plugin-appload': - specifier: github:CuriousCorrelation/tauri-plugin-appload#feat-desktop-appload-top-level-config - version: '@CuriousCorrelation/plugin-appload@https://codeload.github.com/CuriousCorrelation/tauri-plugin-appload/tar.gz/3d03f6c7b1726ecf179af2124e77a9742d600637' + specifier: github:CuriousCorrelation/tauri-plugin-appload#e05861959938b57479a1a81fa796735ebbd08c7c + version: '@CuriousCorrelation/plugin-appload@https://codeload.github.com/CuriousCorrelation/tauri-plugin-appload/tar.gz/e05861959938b57479a1a81fa796735ebbd08c7c' '@hoppscotch/ui': specifier: 0.2.5 version: 0.2.5(eslint@8.57.0)(terser@5.39.2)(typescript@5.9.2)(vite@6.3.5(@types/node@24.3.0)(jiti@2.5.1)(sass@1.91.0)(terser@5.39.2)(yaml@2.8.1))(vue@3.5.20(typescript@5.9.2)) @@ -1093,7 +1093,7 @@ importers: specifier: ^11.1.6 version: 11.1.6(rollup@4.48.1)(tslib@2.8.0)(typescript@5.9.2) rollup: - specifier: ^4.48.1 + specifier: ^4.9.6 version: 4.48.1 tslib: specifier: ^2.6.2 @@ -1134,7 +1134,7 @@ importers: specifier: ^11.1.6 version: 11.1.6(rollup@4.48.1)(tslib@2.8.0)(typescript@5.9.2) rollup: - specifier: ^4.48.1 + specifier: ^4.9.6 version: 4.48.1 tslib: specifier: ^2.6.2 @@ -1848,8 +1848,8 @@ packages: graphql: optional: true - '@CuriousCorrelation/plugin-appload@https://codeload.github.com/CuriousCorrelation/tauri-plugin-appload/tar.gz/3d03f6c7b1726ecf179af2124e77a9742d600637': - resolution: {tarball: https://codeload.github.com/CuriousCorrelation/tauri-plugin-appload/tar.gz/3d03f6c7b1726ecf179af2124e77a9742d600637} + '@CuriousCorrelation/plugin-appload@https://codeload.github.com/CuriousCorrelation/tauri-plugin-appload/tar.gz/e05861959938b57479a1a81fa796735ebbd08c7c': + resolution: {tarball: https://codeload.github.com/CuriousCorrelation/tauri-plugin-appload/tar.gz/e05861959938b57479a1a81fa796735ebbd08c7c} version: 0.1.0 '@CuriousCorrelation/plugin-appload@https://codeload.github.com/CuriousCorrelation/tauri-plugin-appload/tar.gz/e8dbe06eabf947e5efaf07d2e573238ceb11a7b1': @@ -15537,7 +15537,7 @@ snapshots: optionalDependencies: graphql: 16.11.0 - '@CuriousCorrelation/plugin-appload@https://codeload.github.com/CuriousCorrelation/tauri-plugin-appload/tar.gz/3d03f6c7b1726ecf179af2124e77a9742d600637': + '@CuriousCorrelation/plugin-appload@https://codeload.github.com/CuriousCorrelation/tauri-plugin-appload/tar.gz/e05861959938b57479a1a81fa796735ebbd08c7c': dependencies: '@tauri-apps/api': 2.1.1