Skip to content

Commit

Permalink
app.mount* -> server.mount*
Browse files Browse the repository at this point in the history
  • Loading branch information
shalithasuranga committed Jan 14, 2025
1 parent 429e4c3 commit 5470eae
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
8 changes: 0 additions & 8 deletions src/api/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,6 @@ export function broadcast(event: string, data?: any): Promise<void> {
return sendMessage('app.broadcast', {event, data});
};

export function mount(mountPath: string, targetPath: string): Promise<void> {
return sendMessage('app.mount', { mountPath, targetPath });
}

export function unmount(mountPath: string): Promise<void> {
return sendMessage('app.unmount', { mountPath });
}

export function readProcessInput(readAll?: boolean): Promise<string> {
return sendMessage('app.readProcessInput', { readAll });
};
Expand Down
13 changes: 13 additions & 0 deletions src/api/server.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { sendMessage } from '../ws/websocket';

export function mount(path: string, target: string): Promise<void> {
return sendMessage('server.mount', { path, target });
}

export function unmount(path: string): Promise<void> {
return sendMessage('server.unmount', { path });
}

export function getMounts(): Promise<void> {
return sendMessage('server.getMounts');
}
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ export * as extensions from './api/extensions';
export * as updater from './api/updater';
export * as clipboard from './api/clipboard';
export * as resources from './api/resources';
export * as server from './api/server';
export * as custom from './api/custom';

export { init } from './api/init';
Expand Down

0 comments on commit 5470eae

Please sign in to comment.