Skip to content

Commit ece8408

Browse files
committed
Move login page to browser directory
Fixes it not being included in the optimized build as well as making it more consistent.
1 parent 76f6ff4 commit ece8408

File tree

4 files changed

+4
-3
lines changed

4 files changed

+4
-3
lines changed

scripts/build.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ class Builder {
261261
fs.remove(path.join(finalServerPath, "node_modules")).then(() => {
262262
return fs.copy(path.join(serverPath, "node_modules"), path.join(finalServerPath, "node_modules"));
263263
}),
264-
fs.copy(path.join(serverPath, "src/browser/workbench-build.html"), path.join(finalServerPath, "src/browser/workbench.html")),
264+
fs.copy(path.join(finalServerPath, "src/browser/workbench-build.html"), path.join(finalServerPath, "src/browser/workbench.html")),
265265
]);
266266
}),
267267
]);

scripts/optimize.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ const vscodeResources = [
2424
"out-build/vs/server/src/node/uriTransformer.js",
2525
"!out-build/vs/server/doc/**",
2626
"out-build/vs/code/browser/workbench/**",
27+
"out-build/vs/server/src/browser/*.html",
2728
"out-build/vs/server/src/media/*",
2829
"out-build/vs/workbench/services/extensions/worker/extensionHostWorkerMain.js",
2930
"out-build/bootstrap.js",
File renamed without changes.

src/node/server.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ export abstract class Server {
375375
}
376376

377377
private async getLogin(error: string = "", payload?: LoginPayload): Promise<Response> {
378-
const filePath = path.join(this.serverRoot, "login/index.html");
378+
const filePath = path.join(this.serverRoot, "browser/login.html");
379379
const content = (await util.promisify(fs.readFile)(filePath, "utf8"))
380380
.replace("{{ERROR}}", error)
381381
.replace("display:none", error ? "display:block" : "display:none")
@@ -536,7 +536,7 @@ export class MainServer extends Server {
536536
}
537537

538538
private async getRoot(request: http.IncomingMessage, parsedUrl: url.UrlWithParsedQuery): Promise<Response> {
539-
const filePath = path.join(this.rootPath, "out/vs/server/src/browser/workbench.html");
539+
const filePath = path.join(this.serverRoot, "browser/workbench.html");
540540
let [content, startPath] = await Promise.all([
541541
util.promisify(fs.readFile)(filePath, "utf8"),
542542
this.getFirstValidPath([

0 commit comments

Comments
 (0)