ci: remove stronghold plugin from e2e tests (#3638)

* ci: remove stronghold plugin from e2e tests

* revert unrelated change
This commit is contained in:
Tony
2026-09-24 21:55:25 +08:00
committed by GitHub
parent 1cae06a55b
commit 1e166e93c8
15 changed files with 3 additions and 392 deletions
-1
View File
@@ -32,7 +32,6 @@
"@tauri-apps/plugin-shell": "workspace:*",
"@tauri-apps/plugin-sql": "workspace:*",
"@tauri-apps/plugin-store": "workspace:*",
"@tauri-apps/plugin-stronghold": "workspace:*",
"@tauri-apps/plugin-updater": "workspace:*",
"@tauri-apps/plugin-upload": "workspace:*",
"@tauri-apps/plugin-websocket": "workspace:*",
-1
View File
@@ -43,7 +43,6 @@ tauri-plugin-deep-link = { path = "../../../plugins/deep-link", version = "2.4.1
tauri-plugin-sql = { path = "../../../plugins/sql", version = "2.4.1", features = [
"sqlite",
] }
tauri-plugin-stronghold = { path = "../../../plugins/stronghold", version = "2.3.2" }
tauri-plugin-websocket = { path = "../../../plugins/websocket", version = "2.4.3" }
# WebDriver automation bridge, used by the plugins e2e suite (packages/api-e2e).
@@ -139,10 +139,6 @@
"deep-link:allow-is-registered",
"sql:default",
"sql:allow-execute",
"stronghold:default",
"stronghold:allow-destroy",
"stronghold:allow-remove-secret",
"stronghold:allow-remove-store-record",
"websocket:default"
]
}
+1 -9
View File
@@ -9,7 +9,7 @@ mod tray;
use serde::Serialize;
use tauri::{
webview::{PageLoadEvent, WebviewWindowBuilder},
App, AppHandle, Emitter, Listener, Manager, RunEvent, WebviewUrl,
App, AppHandle, Emitter, Listener, RunEvent, WebviewUrl,
};
#[derive(Clone, Serialize)]
@@ -71,14 +71,6 @@ pub fn run() {
.build(),
)
.setup(move |app| {
// the argon2 salt lives next to the snapshots the frontend creates
let local_data_dir = app.path().app_local_data_dir()?;
std::fs::create_dir_all(&local_data_dir)?;
app.handle().plugin(
tauri_plugin_stronghold::Builder::with_argon2(&local_data_dir.join("salt.txt"))
.build(),
)?;
#[cfg(desktop)]
{
// registered before the tray, whose events it tracks
-6
View File
@@ -37,7 +37,6 @@
import DeepLink from './views/DeepLink.svelte'
import Positioner from './views/Positioner.svelte'
import Sql from './views/Sql.svelte'
import Stronghold from './views/Stronghold.svelte'
import WebSocket from './views/WebSocket.svelte'
import TitleBar from './lib/TitleBar.svelte'
@@ -147,11 +146,6 @@
component: Sql,
icon: 'i-ph-database'
},
{
label: 'Stronghold',
component: Stronghold,
icon: 'i-ph-lock-key'
},
{
label: 'Deep link',
component: DeepLink,
-71
View File
@@ -1,71 +0,0 @@
<script>
import { Stronghold } from '@tauri-apps/plugin-stronghold'
import { appLocalDataDir, join } from '@tauri-apps/api/path'
export let onMessage
const clientName = 'api-example'
const storeKey = 'secret'
let password = 'password'
let stronghold
let store
let record = ''
async function load() {
try {
const path = await join(await appLocalDataDir(), 'api.stronghold')
stronghold = await Stronghold.load(path, password)
let client
try {
client = await stronghold.loadClient(clientName)
} catch {
client = await stronghold.createClient(clientName)
}
store = client.getStore()
const value = await store.get(storeKey)
record = value ? new TextDecoder().decode(value) : ''
onMessage('Stronghold loaded')
} catch (error) {
stronghold = null
onMessage(error)
}
}
async function save() {
try {
await store.insert(storeKey, Array.from(new TextEncoder().encode(record)))
await stronghold.save()
onMessage('Record saved')
} catch (error) {
onMessage(error)
}
}
async function unload() {
await stronghold.unload().catch(onMessage)
stronghold = null
store = null
record = ''
}
</script>
<div class="flex flex-col gap-2">
{#if stronghold}
<div class="flex flex-row gap-2">
<input class="input grow" placeholder="Secret" bind:value={record} />
<button class="btn" on:click={save}>Save</button>
<button class="btn" on:click={unload}>Lock</button>
</div>
{:else}
<form class="flex flex-row gap-2" on:submit|preventDefault={load}>
<input
class="input grow"
type="password"
placeholder="Password"
bind:value={password}
/>
<button class="btn" type="submit">Unlock</button>
</form>
{/if}
</div>