Skip to content

Commit b405497

Browse files
author
Hikari Kibo
authored
Merge branch 'master' into docker-user
2 parents b5e0a66 + 0efae1f commit b405497

32 files changed

+664
-319
lines changed

Dockerfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,4 @@ USER coder
4040
WORKDIR /home/coder
4141

4242
EXPOSE 8443
43-
ENTRYPOINT code-server
44-
CMD ["."]
43+
ENTRYPOINT ["code-server"]

build/tasks.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const libPath = path.join(__dirname, "../lib");
1010
const vscodePath = path.join(libPath, "vscode");
1111
const pkgsPath = path.join(__dirname, "../packages");
1212
const defaultExtensionsPath = path.join(libPath, "VSCode-linux-x64/resources/app/extensions");
13-
const vscodeVersion = "1.32";
13+
const vscodeVersion = "1.32.0";
1414

1515
const buildServerBinary = register("build:server:binary", async (runner) => {
1616
await ensureInstalled();
@@ -220,11 +220,17 @@ const ensureCloned = register("vscode:clone", async (runner) => {
220220
} else {
221221
fse.mkdirpSync(libPath);
222222
runner.cwd = libPath;
223-
const clone = await runner.execute("git", ["clone", "https://github.com/microsoft/vscode", "--branch", `release/${vscodeVersion}`, "--single-branch", "--depth=1"]);
223+
const clone = await runner.execute("git", ["clone", "https://github.com/microsoft/vscode", "--branch", vscodeVersion, "--single-branch", "--depth=1"]);
224224
if (clone.exitCode !== 0) {
225225
throw new Error(`Failed to clone: ${clone.exitCode}`);
226226
}
227227
}
228+
229+
runner.cwd = vscodePath;
230+
const checkout = await runner.execute("git", ["checkout", vscodeVersion]);
231+
if (checkout.exitCode !== 0) {
232+
throw new Error(`Failed to checkout: ${checkout.stderr}`);
233+
}
228234
});
229235

230236
const ensureClean = register("vscode:clean", async (runner) => {

doc/admin/install/aws.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ If you're just starting out, we recommend [installing code-server locally](../..
2828
- In the description of your EC2 instance copy the public DNS (iPv4) address using the copy to clipboard button
2929
- Open a terminal on your computer and use the following command to SSH into your EC2 instance
3030
```
31-
ssh i "path/to/your/keypair.pem" ubuntu@(paste the public DNS here)
31+
ssh -i "path/to/your/keypair.pem" ubuntu@(paste the public DNS here)
3232
```
3333
>example: `ssh -i "/Users/John/Downloads/TestInstance.pem" [email protected]`
3434
- You should see a prompt for your EC2 instance like so<img src="../../assets/aws_ubuntu.png">
@@ -54,4 +54,4 @@ If you're just starting out, we recommend [installing code-server locally](../..
5454
> The `-p 80` flag is necessary in order to make the IDE accessible from the public IP of your instance (also available from the description in the instances page.
5555
5656
---
57-
> NOTE: If you get stuck or need help, [file an issue](https://github.com/codercom/code-server/issues/new?&title=Improve+self-hosted+quickstart+guide), [tweet (@coderhq)](https://twitter.com/coderhq) or [email](mailto:[email protected]?subject=Self-hosted%20quickstart%20guide).
57+
> NOTE: If you get stuck or need help, [file an issue](https://github.com/codercom/code-server/issues/new?&title=Improve+self-hosted+quickstart+guide), [tweet (@coderhq)](https://twitter.com/coderhq) or [email](mailto:[email protected]?subject=Self-hosted%20quickstart%20guide).

doc/security/ssl.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Generate a self-signed certificate 🔒
22

3-
code-server has the ability to secure your connection between client and server using SSL/TSL certificates. By default, the server will start with an unencrypted connection. We recommend Self-signed TLS/SSL certificates for personal of code-server or within an organization.
3+
code-server has the ability to secure your connection between client and server using SSL/TSL certificates. By default, the server will start with an unencrypted connection. We recommend Self-signed TLS/SSL certificates for personal use of code-server or within an organization.
44

55
This guide will show you how to create a self-signed certificate and start code-server using your certificate/key.
66

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@
5151
},
5252
"dependencies": {
5353
"node-loader": "^0.6.0",
54-
"trash": "^4.3.0",
5554
"webpack-merge": "^4.2.1"
5655
}
5756
}

packages/app/browser/src/app.html

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,20 @@
88

99
<body>
1010
<div class="login">
11-
<div class="back">
12-
<- Back </div>
13-
<h4 class="title">code-server</h4>
14-
<h2 class="subtitle">
15-
Enter server password
16-
</h2>
17-
<div class="mdc-text-field">
18-
<input type="password" id="password" class="mdc-text-field__input" required>
19-
<label class="mdc-floating-label" for="password">Password</label>
20-
<div class="mdc-line-ripple"></div>
21-
</div>
22-
<button id="submit" class="mdc-button mdc-button--unelevated">
23-
<span class="mdc-button__label">Enter IDE</span>
24-
</button>
11+
<div class="back"> <- Back </div>
12+
<h4 class="title">code-server</h4>
13+
<h2 class="subtitle">
14+
Enter server password
15+
</h2>
16+
<div class="mdc-text-field">
17+
<input type="password" id="password" class="mdc-text-field__input" required>
18+
<label class="mdc-floating-label" for="password">Password</label>
19+
<div class="mdc-line-ripple"></div>
2520
</div>
21+
<button id="submit" class="mdc-button mdc-button--unelevated">
22+
<span class="mdc-button__label">Enter IDE</span>
23+
</button>
24+
<div id="error-display"></div>
2625
</div>
2726
</body>
2827

packages/app/browser/src/app.scss

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,3 +106,16 @@ body {
106106

107107
// transition: 500ms opacity ease;
108108
}
109+
110+
#error-display {
111+
box-sizing: border-box;
112+
color: #bb2d0f;
113+
font-size: 14px;
114+
font-weight: 400;
115+
letter-spacing: 0.3px;
116+
line-height: 12px;
117+
padding: 8px;
118+
padding-bottom: 0;
119+
padding-top: 20px;
120+
text-align: center;
121+
}

packages/app/browser/src/app.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,14 @@ submit.addEventListener("click", () => {
2828
document.cookie = `password=${password.value}`;
2929
location.reload();
3030
});
31+
32+
/**
33+
* Notify user on load of page if previous password was unsuccessful
34+
*/
35+
const reg = new RegExp(`password=(\\w+);?`);
36+
const matches = document.cookie.match(reg);
37+
const errorDisplay = document.getElementById("error-display") as HTMLDivElement;
38+
39+
if (document.referrer === document.location.href && matches) {
40+
errorDisplay.innerText = "Password is incorrect!";
41+
}

packages/ide-api/api.d.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,19 @@ declare namespace ide {
158158
readonly notificationService: INotificationService;
159159
readonly menuRegistry: IMenuRegistry;
160160
readonly commandRegistry: ICommandRegistry;
161+
162+
onFileCreate(cb: (path: string) => void): void;
163+
onFileMove(cb: (path: string, target: string) => void): void;
164+
onFileDelete(cb: (path: string) => void): void;
165+
onFileSaved(cb: (path: string) => void): void;
166+
onFileCopy(cb: (path: string, target: string) => void): void;
167+
168+
onModelAdded(cb: (path: string, languageId: string) => void): void;
169+
onModelRemoved(cb: (path: string, languageId: string) => void): void;
170+
onModelLanguageChange(cb: (path: string, languageId: string, oldLanguageId: string) => void): void;
171+
172+
onTerminalAdded(cb: () => void): void;
173+
onTerminalRemoved(cb: () => void): void;
161174
};
162175

163176
export enum Severity {

packages/ide-api/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@coder/ide-api",
3-
"version": "1.0.2",
3+
"version": "1.0.3",
44
"typings": "api.d.ts",
55
"author": "Coder",
66
"license": "MIT",

0 commit comments

Comments
 (0)