@x-tech-laboratories/x-app 0.106.0 → 0.106.1

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.
@@ -2,7 +2,7 @@ import { type AutostartOptions } from "../autostart.ts";
2
2
  import { type AppLike, type FocusableWindowLike } from "../electron/app.ts";
3
3
  import type { IpcMainLike } from "../electron/bridge.ts";
4
4
  import type { WindowLike } from "../electron/events.ts";
5
- import { type TrayElectronLike, type TrayRow } from "../electron/tray.ts";
5
+ import { type TrayElectronLike, type TrayLike, type TrayRow } from "../electron/tray.ts";
6
6
  import { type BrowserWindowLike, type BrowserWindowOptionsLike, type NativeThemeLike, type ScreenLike, type ShellLike } from "../electron/window.ts";
7
7
  import { call_daemon, start_daemon } from "../local_daemon.ts";
8
8
  import type { App } from "./define.ts";
@@ -41,9 +41,16 @@ export interface ElectronLike {
41
41
  };
42
42
  };
43
43
  shell: ShellLike;
44
- Tray?: TrayElectronLike<unknown>["Tray"];
44
+ Tray?: new (image: never) => TrayLike;
45
45
  Menu?: TrayElectronLike<unknown>["Menu"];
46
- nativeImage?: TrayElectronLike<unknown>["nativeImage"];
46
+ nativeImage?: {
47
+ createFromPath(path: string): {
48
+ resize(size: {
49
+ width: number;
50
+ height: number;
51
+ }): unknown;
52
+ };
53
+ };
47
54
  }
48
55
  export interface TrayTools {
49
56
  call: (method: string, args?: unknown[]) => Promise<unknown>;
@@ -4,7 +4,7 @@
4
4
  // ── Imports ──────────────────────────────────────────────────────────────────
5
5
  import { unwatchFile, watchFile } from "node:fs";
6
6
  import { hostname } from "node:os";
7
- import { join } from "node:path";
7
+ import { join, resolve } from "node:path";
8
8
  import { launch_command, set_autostart } from "../autostart.js";
9
9
  import { backup_method_names } from "../backups.js";
10
10
  import { certificate_method_names } from "../certificate_protocol.js";
@@ -34,7 +34,7 @@ export function run_desktop(app, electron, options) {
34
34
  const own_profile = env[`${prefix}_USER_DATA`];
35
35
  const is_own_profile = own_profile === undefined;
36
36
  if (!is_own_profile)
37
- electron.app.setPath("userData", join(options.cwd ?? process.cwd(), own_profile));
37
+ electron.app.setPath("userData", resolve(options.cwd ?? process.cwd(), own_profile));
38
38
  const profile = electron.app.getPath("userData");
39
39
  const database_path = join(profile, app.database_file);
40
40
  // Any other profile gets a daemon, socket and log of its own, so a dev or test run never reaches the user's daemon.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@x-tech-laboratories/x-app",
3
- "version": "0.106.0",
3
+ "version": "0.106.1",
4
4
  "description": "Code the X-apps share: agents and their long runs, passwords and sign-in, the Fastify server pieces, durations, and the web page's helpers and widgets",
5
5
  "license": "GPL-3.0-or-later",
6
6
  "repository": {