Remove block padding (blank lines)
Also made a rule for it.
This commit is contained in:
@ -8,11 +8,10 @@ import * as WebSocket from "ws";
|
||||
import { createApp } from "./server";
|
||||
import { requireModule } from "./vscode/bootstrapFork";
|
||||
import { SharedProcess, SharedProcessState } from "./vscode/sharedProcess";
|
||||
import { setup as setupNativeModules } from './modules';
|
||||
import { fillFs } from './fill';
|
||||
import { setup as setupNativeModules } from "./modules";
|
||||
import { fillFs } from "./fill";
|
||||
|
||||
export class Entry extends Command {
|
||||
|
||||
public static description = "Start your own self-hosted browser-accessible VS Code";
|
||||
public static flags = {
|
||||
cert: flags.string(),
|
||||
@ -167,7 +166,6 @@ export class Entry extends Command {
|
||||
logger.info(`http://localhost:${flags.port}/`);
|
||||
logger.info(" ");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Entry.run(undefined, {
|
||||
|
@ -3,7 +3,7 @@ import * as util from "util";
|
||||
|
||||
const oldAccess = fs.access;
|
||||
const existsWithinBinary = (path: fs.PathLike): Promise<boolean> => {
|
||||
return new Promise<boolean>((resolve) => {
|
||||
return new Promise<boolean>((resolve): void => {
|
||||
if (typeof path === "number") {
|
||||
if (path < 0) {
|
||||
return resolve(true);
|
||||
@ -18,7 +18,7 @@ const existsWithinBinary = (path: fs.PathLike): Promise<boolean> => {
|
||||
});
|
||||
};
|
||||
|
||||
export const fillFs = () => {
|
||||
export const fillFs = (): void => {
|
||||
/**
|
||||
* Refer to https://github.com/nexe/nexe/blob/master/src/fs/patch.ts
|
||||
* For impls
|
||||
|
@ -7,7 +7,6 @@ export interface IpcMessage {
|
||||
}
|
||||
|
||||
export class StdioIpcHandler extends EventEmitter {
|
||||
|
||||
private isListening: boolean = false;
|
||||
|
||||
public constructor(
|
||||
@ -66,5 +65,4 @@ export class StdioIpcHandler extends EventEmitter {
|
||||
process.stdin.on("data", onData);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { logger } from "@coder/logger";
|
||||
import { ReadWriteConnection } from "@coder/protocol";
|
||||
import { Server, ServerOptions } from "@coder/protocol/src/node/server";
|
||||
import { NewSessionMessage } from '@coder/protocol/src/proto';
|
||||
import { NewSessionMessage } from "@coder/protocol/src/proto";
|
||||
import { ChildProcess } from "child_process";
|
||||
import * as express from "express";
|
||||
//@ts-ignore
|
||||
|
@ -6,7 +6,7 @@ import { forkModule } from "./bootstrapFork";
|
||||
import { StdioIpcHandler } from "../ipc";
|
||||
import { ParsedArgs } from "vs/platform/environment/common/environment";
|
||||
import { LogLevel } from "vs/platform/log/common/log";
|
||||
import { Emitter, Event } from '@coder/events/src';
|
||||
import { Emitter, Event } from "@coder/events/src";
|
||||
|
||||
export enum SharedProcessState {
|
||||
Stopped,
|
||||
@ -22,7 +22,6 @@ export type SharedProcessEvent = {
|
||||
};
|
||||
|
||||
export class SharedProcess {
|
||||
|
||||
public readonly socketPath: string = path.join(os.tmpdir(), `.vscode-remote${Math.random().toString()}`);
|
||||
private _state: SharedProcessState = SharedProcessState.Stopped;
|
||||
private activeProcess: ChildProcess | undefined;
|
||||
|
Reference in New Issue
Block a user