Archived
1
0

Remove block padding (blank lines)

Also made a rule for it.
This commit is contained in:
Asher
2019-02-05 18:08:48 -06:00
parent dc08df5540
commit e770920be0
43 changed files with 108 additions and 189 deletions

View File

@ -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, {

View File

@ -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

View File

@ -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);
}
}
}
}

View File

@ -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

View File

@ -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;