chore: update android scripts and add dev runner with IPC restart support

This commit is contained in:
Mohamed Boudra
2025-11-28 11:39:31 +01:00
parent 2c84447ec2
commit 1b019c4688
5 changed files with 81 additions and 6 deletions
@@ -6,6 +6,10 @@ import { useQuery, useQueryClient } from "@tanstack/react-query";
const REGISTRY_STORAGE_KEY = "@paseo:daemon-registry";
const LEGACY_SETTINGS_KEY = "@paseo:settings";
const FALLBACK_DAEMON_URL = "ws://localhost:6767/ws";
const DEFAULT_DAEMONS: Array<{ label: string; wsUrl: string; restUrl?: string | null }> = [
{ label: "dev", wsUrl: "ws://dev:6767/ws" },
{ label: "macbook", wsUrl: "ws://mohameds-macbook-pro:6767/ws" },
];
const DAEMON_REGISTRY_QUERY_KEY = ["daemon-registry"];
export type DaemonProfile = {
@@ -221,7 +225,9 @@ async function loadDaemonRegistryFromStorage(): Promise<DaemonProfile[]> {
return envDefaults;
}
const fallback = [createProfile("Local Host", FALLBACK_DAEMON_URL)];
const fallback = DEFAULT_DAEMONS.length > 0
? DEFAULT_DAEMONS.map((entry) => createProfile(entry.label, entry.wsUrl))
: [createProfile("Local Host", FALLBACK_DAEMON_URL)];
await AsyncStorage.setItem(REGISTRY_STORAGE_KEY, JSON.stringify(fallback));
return fallback;
} catch (error) {