cli: rename ChannelServer to IpcServer

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2023-02-05 16:12:53 +01:00
parent 81c06d5a4a
commit 1e6f5fcfed
3 changed files with 5 additions and 5 deletions
@@ -36,7 +36,7 @@ interface Request {
const requestType = '@backstage/cli/channel/request';
const responseType = '@backstage/cli/channel/response';
export class ChannelServer {
export class IpcServer {
#generation = 1;
#methods = new Map<string, MethodHandler<any, any>>();
@@ -14,7 +14,7 @@
* limitations under the License.
*/
import { ChannelServer } from './ChannelServer';
import { IpcServer } from './IpcServer';
interface StorageItem {
generation: number;
@@ -40,7 +40,7 @@ interface LoadResponse {
}
export class ServerDataStore {
static bind(server: ChannelServer): void {
static bind(server: IpcServer): void {
const store = new Map<string, StorageItem>();
server.registerMethod<SaveRequest, SaveResponse>(
@@ -19,7 +19,7 @@ import type { ChildProcess } from 'child_process';
import { fileURLToPath } from 'url';
import { isAbsolute as isAbsolutePath } from 'path';
import { FSWatcher, watch } from 'chokidar';
import { ChannelServer } from './ChannelServer';
import { IpcServer } from './IpcServer';
import { ServerDataStore } from './ServerDataStore';
import debounce from 'lodash/debounce';
import spawn from 'cross-spawn';
@@ -34,7 +34,7 @@ export async function startBackendExperimental(options: BackendServeOptions) {
}
// Set up the parent IPC server and bind the available services
const server = new ChannelServer();
const server = new IpcServer();
ServerDataStore.bind(server);
let exiting = false;