fix(FN-4486): complete Step 1 — drop closed desktop stubs and unblock node-pty typing

Fusion-Task-Id: FN-4486
Fusion-Task-Lineage: 7d3b40b2-883f-450c-96ec-796f8af4fa45
This commit is contained in:
Fusion
2026-05-14 09:36:49 -07:00
committed by gsxdsm
parent 98ee23b278
commit 88d705c620
5 changed files with 17 additions and 22 deletions

View File

@@ -1,20 +0,0 @@
declare module "@fusion/core" {
export class TaskStore {
constructor(rootDir: string);
init(): Promise<void>;
watch(): Promise<void>;
close(): void;
}
}
declare module "@fusion/dashboard" {
import type { Server } from "node:http";
export function createServer(store: {
init(): Promise<void>;
watch(): Promise<void>;
close(): void;
}): {
listen(port?: number): Server;
};
}

View File

@@ -40,7 +40,7 @@ async function createStoreDefault(rootDir: string): Promise<TaskStoreLike> {
async function createDashboardServerDefault(store: TaskStoreLike): Promise<Server> {
const { createServer } = await import("@fusion/dashboard");
return createServer(store).listen(0);
return createServer(store as never).listen(0);
}
function parsePort(raw: string | undefined): number | undefined {

View File

@@ -47,7 +47,7 @@ export class DesktopLocalServerManager {
const store = new TaskStore(this.rootDir) as TaskStoreLike;
await store.init();
await store.watch();
const app = createServer(store);
const app = createServer(store as never);
const server = app.listen(0);
await Promise.race([

View File

@@ -0,0 +1,3 @@
declare module "@homebridge/node-pty-prebuilt-multiarch" {
export * from "node-pty";
}

12
packages/desktop/src/node-pty.d.ts vendored Normal file
View File

@@ -0,0 +1,12 @@
declare module "node-pty" {
export interface IPty {
[key: string]: any;
}
export interface IPtyForkOptions {
[key: string]: any;
}
export interface IWindowsPtyForkOptions extends IPtyForkOptions {
[key: string]: any;
}
export function spawn(...args: any[]): IPty;
}