Format and lint
This commit is contained in:
@ -68,7 +68,7 @@ export class ApiHttpProvider extends HttpProvider {
|
||||
route: Route,
|
||||
request: http.IncomingMessage,
|
||||
socket: net.Socket,
|
||||
head: Buffer
|
||||
head: Buffer,
|
||||
): Promise<true | undefined> {
|
||||
if (!this.authenticated(request)) {
|
||||
throw new Error("not authenticated")
|
||||
@ -120,7 +120,7 @@ export class ApiHttpProvider extends HttpProvider {
|
||||
route: Route,
|
||||
request: http.IncomingMessage,
|
||||
socket: net.Socket,
|
||||
head: Buffer
|
||||
head: Buffer,
|
||||
): Promise<true> {
|
||||
const sessionId = route.requestPath.replace(/^\//, "")
|
||||
logger.debug("connecting session", field("sessionId", sessionId))
|
||||
@ -149,8 +149,8 @@ export class ApiHttpProvider extends HttpProvider {
|
||||
Buffer.from(
|
||||
JSON.stringify({
|
||||
protocol: "TODO",
|
||||
})
|
||||
)
|
||||
}),
|
||||
),
|
||||
)
|
||||
|
||||
return true
|
||||
|
@ -63,7 +63,7 @@ export class MainHttpProvider extends HttpProvider {
|
||||
base: this.base(route),
|
||||
logLevel: logger.level,
|
||||
},
|
||||
(app && app.name) || ""
|
||||
(app && app.name) || "",
|
||||
)
|
||||
}
|
||||
|
||||
@ -80,11 +80,11 @@ export class MainHttpProvider extends HttpProvider {
|
||||
.replace(/{{APP_LIST:RUNNING}}/g, this.getAppRows(recent.running))
|
||||
.replace(
|
||||
/{{APP_LIST:EDITORS}}/g,
|
||||
this.getAppRows(apps.filter((app) => app.categories && app.categories.includes("Editor")))
|
||||
this.getAppRows(apps.filter((app) => app.categories && app.categories.includes("Editor"))),
|
||||
)
|
||||
.replace(
|
||||
/{{APP_LIST:OTHER}}/g,
|
||||
this.getAppRows(apps.filter((app) => !app.categories || !app.categories.includes("Editor")))
|
||||
this.getAppRows(apps.filter((app) => !app.categories || !app.categories.includes("Editor"))),
|
||||
)
|
||||
return response
|
||||
}
|
||||
|
@ -109,7 +109,7 @@ export class LoginHttpProvider extends HttpProvider {
|
||||
remoteAddress: request.connection.remoteAddress,
|
||||
userAgent: request.headers["user-agent"],
|
||||
timestamp: Math.floor(new Date().getTime() / 1000),
|
||||
})
|
||||
}),
|
||||
)
|
||||
|
||||
throw new Error("Incorrect password")
|
||||
|
@ -102,7 +102,7 @@ export class VscodeHttpProvider extends HttpProvider {
|
||||
"Upgrade: websocket",
|
||||
"Connection: Upgrade",
|
||||
`Sec-WebSocket-Accept: ${reply}`,
|
||||
].join("\r\n") + "\r\n\r\n"
|
||||
].join("\r\n") + "\r\n\r\n",
|
||||
)
|
||||
|
||||
const vscode = await this._vscode
|
||||
@ -146,7 +146,7 @@ export class VscodeHttpProvider extends HttpProvider {
|
||||
const response = await this.getUtf8Resource(this.vsRootPath, route.requestPath)
|
||||
response.content = response.content.replace(
|
||||
/{{COMMIT}}/g,
|
||||
this.workbenchOptions ? this.workbenchOptions.commit : ""
|
||||
this.workbenchOptions ? this.workbenchOptions.commit : "",
|
||||
)
|
||||
response.cache = true
|
||||
return response
|
||||
@ -186,7 +186,7 @@ export class VscodeHttpProvider extends HttpProvider {
|
||||
settings.lastVisited,
|
||||
this.args._ && this.args._.length > 0 ? { url: this.args._[0] } : undefined,
|
||||
],
|
||||
remoteAuthority
|
||||
remoteAuthority,
|
||||
)
|
||||
const [response, options] = await Promise.all([
|
||||
await this.getUtf8Resource(this.rootPath, "src/browser/pages/vscode.html"),
|
||||
@ -229,7 +229,7 @@ export class VscodeHttpProvider extends HttpProvider {
|
||||
*/
|
||||
private async getFirstValidPath(
|
||||
startPaths: Array<{ url?: string | string[]; workspace?: boolean } | undefined>,
|
||||
remoteAuthority: string
|
||||
remoteAuthority: string,
|
||||
): Promise<StartPath | undefined> {
|
||||
for (let i = 0; i < startPaths.length; ++i) {
|
||||
const startPath = startPaths[i]
|
||||
|
Reference in New Issue
Block a user