palmier 0.8.3 → 0.8.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/README.md +6 -4
  2. package/dist/commands/pair.js +2 -0
  3. package/dist/commands/serve.js +0 -4
  4. package/dist/platform/index.js +7 -3
  5. package/dist/platform/macos.d.ts +32 -0
  6. package/dist/platform/macos.js +287 -0
  7. package/dist/pwa/assets/index-499vYQvR.js +120 -0
  8. package/dist/pwa/assets/{index-B0F9mtid.css → index-UaZFu6XL.css} +1 -1
  9. package/dist/pwa/assets/{web-Z1623me-.js → web-Bp48ONY3.js} +1 -1
  10. package/dist/pwa/assets/{web-C6lkQj9J.js → web-CyJutAy4.js} +1 -1
  11. package/dist/pwa/index.html +2 -2
  12. package/dist/pwa/service-worker.js +1 -1
  13. package/dist/rpc-handler.js +0 -4
  14. package/dist/transports/http-transport.js +1 -0
  15. package/package.json +1 -1
  16. package/palmier-server/pwa/src/App.css +191 -33
  17. package/palmier-server/pwa/src/App.tsx +2 -0
  18. package/palmier-server/pwa/src/components/CapabilityToggles.tsx +288 -0
  19. package/palmier-server/pwa/src/components/HostMenu.tsx +15 -312
  20. package/palmier-server/pwa/src/components/SessionComposer.tsx +11 -2
  21. package/palmier-server/pwa/src/components/SessionsView.tsx +3 -1
  22. package/palmier-server/pwa/src/components/TaskCard.tsx +1 -1
  23. package/palmier-server/pwa/src/components/TaskForm.tsx +126 -74
  24. package/palmier-server/pwa/src/components/TasksView.tsx +3 -1
  25. package/palmier-server/pwa/src/native/Device.ts +0 -2
  26. package/palmier-server/pwa/src/pages/Dashboard.tsx +2 -0
  27. package/palmier-server/pwa/src/pages/PairHost.tsx +3 -1
  28. package/palmier-server/pwa/src/pages/PairSetup.tsx +70 -0
  29. package/src/commands/pair.ts +2 -0
  30. package/src/commands/serve.ts +0 -3
  31. package/src/platform/index.ts +4 -3
  32. package/src/platform/macos.ts +310 -0
  33. package/src/rpc-handler.ts +0 -5
  34. package/src/transports/http-transport.ts +1 -0
  35. package/test/macos-plist.test.ts +112 -0
  36. package/dist/app-registry.d.ts +0 -10
  37. package/dist/app-registry.js +0 -44
  38. package/dist/pwa/assets/index-SYs3mcdJ.js +0 -120
  39. package/src/app-registry.ts +0 -52
@@ -1,52 +0,0 @@
1
- import * as fs from "fs";
2
- import * as path from "path";
3
- import { CONFIG_DIR } from "./config.js";
4
-
5
- const REGISTRY_FILE = path.join(CONFIG_DIR, "app-registry.json");
6
-
7
- /** Persistent cache of packageName → appName pairs seen via device notifications. */
8
- export interface AppInfo {
9
- packageName: string;
10
- appName: string;
11
- }
12
-
13
- let cache: Record<string, string> | null = null;
14
-
15
- function load(): Record<string, string> {
16
- if (cache) return cache;
17
- try {
18
- if (fs.existsSync(REGISTRY_FILE)) {
19
- cache = JSON.parse(fs.readFileSync(REGISTRY_FILE, "utf-8")) as Record<string, string>;
20
- return cache;
21
- }
22
- } catch {
23
- // Corrupt file — start fresh rather than fail notifications.
24
- }
25
- cache = {};
26
- return cache;
27
- }
28
-
29
- function persist(map: Record<string, string>): void {
30
- fs.mkdirSync(CONFIG_DIR, { recursive: true });
31
- fs.writeFileSync(REGISTRY_FILE, JSON.stringify(map, null, 2), "utf-8");
32
- }
33
-
34
- /** Writes only on change so we track the latest label if an app renames itself. */
35
- export function recordApp(packageName: string, appName: string): void {
36
- if (!packageName || !appName) return;
37
- const map = load();
38
- if (map[packageName] === appName) return;
39
- map[packageName] = appName;
40
- persist(map);
41
- }
42
-
43
- export function listApps(): AppInfo[] {
44
- const map = load();
45
- return Object.entries(map)
46
- .map(([packageName, appName]) => ({ packageName, appName }))
47
- .sort((a, b) => a.appName.localeCompare(b.appName));
48
- }
49
-
50
- export function getAppName(packageName: string): string | undefined {
51
- return load()[packageName];
52
- }