|
8 | 8 | import { log } from "@/services/log"; |
9 | 9 | import type { Runtime } from "@/runtime/Runtime"; |
10 | 10 | import type { TerminalSession, TerminalCreateParams, TerminalResizeParams } from "@/types/terminal"; |
11 | | -import type { IPty } from "node-pty"; |
| 11 | +import type { IPty } from "@homebridge/node-pty-prebuilt-multiarch"; |
12 | 12 | import { SSHRuntime, type SSHRuntimeConfig } from "@/runtime/SSHRuntime"; |
13 | 13 | import { LocalRuntime } from "@/runtime/LocalRuntime"; |
14 | 14 | import { access } from "fs/promises"; |
@@ -98,10 +98,10 @@ export class PTYService { |
98 | 98 | if (runtime instanceof LocalRuntime) { |
99 | 99 | // Local: Use node-pty (dynamically import to avoid crash if not available) |
100 | 100 | // eslint-disable-next-line @typescript-eslint/consistent-type-imports |
101 | | - let pty: typeof import("node-pty"); |
| 101 | + let pty: typeof import("@homebridge/node-pty-prebuilt-multiarch"); |
102 | 102 | try { |
103 | 103 | // eslint-disable-next-line @typescript-eslint/no-require-imports, @typescript-eslint/no-unsafe-assignment |
104 | | - pty = require("node-pty"); |
| 104 | + pty = require("@homebridge/node-pty-prebuilt-multiarch"); |
105 | 105 | } catch (err) { |
106 | 106 | log.error("node-pty not available - local terminals will not work:", err); |
107 | 107 | throw new Error( |
@@ -206,10 +206,10 @@ export class PTYService { |
206 | 206 |
|
207 | 207 | // Load node-pty dynamically |
208 | 208 | // eslint-disable-next-line @typescript-eslint/consistent-type-imports |
209 | | - let pty: typeof import("node-pty"); |
| 209 | + let pty: typeof import("@homebridge/node-pty-prebuilt-multiarch"); |
210 | 210 | try { |
211 | 211 | // eslint-disable-next-line @typescript-eslint/no-require-imports, @typescript-eslint/no-unsafe-assignment |
212 | | - pty = require("node-pty"); |
| 212 | + pty = require("@homebridge/node-pty-prebuilt-multiarch"); |
213 | 213 | } catch (err) { |
214 | 214 | log.error("node-pty not available - SSH terminals will not work:", err); |
215 | 215 | throw new Error( |
|
0 commit comments