Compare commits
18 Commits
1.691-vsc1
...
1.790-vsc1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dfabc070b9 | ||
|
|
da420cdda9 | ||
|
|
c6a46e4753 | ||
|
|
742dd6f597 | ||
|
|
6c3ff1d6f0 | ||
|
|
db57aa229f | ||
|
|
f7342ede69 | ||
|
|
b781ccde9c | ||
|
|
8f62b2bff2 | ||
|
|
7047be859c | ||
|
|
2785e2219a | ||
|
|
4b217fba00 | ||
|
|
3fae68bbab | ||
|
|
a2f20aa25c | ||
|
|
94b8b9a5cf | ||
|
|
bbd8b27fc7 | ||
|
|
6361635b55 | ||
|
|
d2da4cfc43 |
3
.gitignore
vendored
3
.gitignore
vendored
@@ -4,4 +4,5 @@ dist
|
|||||||
out
|
out
|
||||||
.DS_Store
|
.DS_Store
|
||||||
release
|
release
|
||||||
.cache
|
.vscode
|
||||||
|
.cache
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ language: node_js
|
|||||||
node_js:
|
node_js:
|
||||||
- 8.15.0
|
- 8.15.0
|
||||||
env:
|
env:
|
||||||
- VSCODE_VERSION="1.33.0" MAJOR_VERSION="1" VERSION="$MAJOR_VERSION.$TRAVIS_BUILD_NUMBER-vsc$VSCODE_VERSION"
|
- VSCODE_VERSION="1.33.1" MAJOR_VERSION="1" VERSION="$MAJOR_VERSION.$TRAVIS_BUILD_NUMBER-vsc$VSCODE_VERSION"
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- os: linux
|
- os: linux
|
||||||
|
|||||||
13
Dockerfile
13
Dockerfile
@@ -24,7 +24,10 @@ RUN apt-get update && apt-get install -y \
|
|||||||
git \
|
git \
|
||||||
locales \
|
locales \
|
||||||
sudo \
|
sudo \
|
||||||
dumb-init
|
dumb-init \
|
||||||
|
vim \
|
||||||
|
curl \
|
||||||
|
wget
|
||||||
|
|
||||||
RUN locale-gen en_US.UTF-8
|
RUN locale-gen en_US.UTF-8
|
||||||
# We unfortunately cannot use update-locale because docker will not use the env variables
|
# We unfortunately cannot use update-locale because docker will not use the env variables
|
||||||
@@ -36,9 +39,15 @@ RUN adduser --gecos '' --disabled-password coder && \
|
|||||||
|
|
||||||
USER coder
|
USER coder
|
||||||
# We create first instead of just using WORKDIR as when WORKDIR creates, the user is root.
|
# We create first instead of just using WORKDIR as when WORKDIR creates, the user is root.
|
||||||
RUN mkdir -p /home/coder/project
|
RUN mkdir -p /home/coder/project && \
|
||||||
|
chmod g+rw /home/coder/project;
|
||||||
|
|
||||||
WORKDIR /home/coder/project
|
WORKDIR /home/coder/project
|
||||||
|
|
||||||
|
# This assures we have a volume mounted even if the user forgot to do bind mount.
|
||||||
|
# XXX: Workaround for GH-459 and for OpenShift compatibility.
|
||||||
|
VOLUME [ "/home/coder/project" ]
|
||||||
|
|
||||||
COPY --from=0 /src/packages/server/cli-linux-x64 /usr/local/bin/code-server
|
COPY --from=0 /src/packages/server/cli-linux-x64 /usr/local/bin/code-server
|
||||||
EXPOSE 8443
|
EXPOSE 8443
|
||||||
|
|
||||||
|
|||||||
@@ -23,10 +23,6 @@ docker run -it -p 127.0.0.1:8443:8443 -v "${PWD}:/home/coder/project" codercom/c
|
|||||||
|
|
||||||
## Getting Started
|
## Getting Started
|
||||||
|
|
||||||
### Hosted
|
|
||||||
|
|
||||||
[Try `code-server` now](https://coder.com/signup) for free at coder.com.
|
|
||||||
|
|
||||||
### Docker
|
### Docker
|
||||||
|
|
||||||
See docker oneliner mentioned above. Dockerfile is at [/Dockerfile](/Dockerfile).
|
See docker oneliner mentioned above. Dockerfile is at [/Dockerfile](/Dockerfile).
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ const libPath = path.join(__dirname, "../lib");
|
|||||||
const vscodePath = path.join(libPath, "vscode");
|
const vscodePath = path.join(libPath, "vscode");
|
||||||
const defaultExtensionsPath = path.join(libPath, "extensions");
|
const defaultExtensionsPath = path.join(libPath, "extensions");
|
||||||
const pkgsPath = path.join(__dirname, "../packages");
|
const pkgsPath = path.join(__dirname, "../packages");
|
||||||
const vscodeVersion = process.env.VSCODE_VERSION || "1.33.0";
|
const vscodeVersion = process.env.VSCODE_VERSION || "1.33.1";
|
||||||
const vsSourceUrl = `https://codesrv-ci.cdr.sh/vstar-${vscodeVersion}.tar.gz`;
|
const vsSourceUrl = `https://codesrv-ci.cdr.sh/vstar-${vscodeVersion}.tar.gz`;
|
||||||
|
|
||||||
const buildServerBinary = register("build:server:binary", async (runner) => {
|
const buildServerBinary = register("build:server:binary", async (runner) => {
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ If you're just starting out, we recommend [installing code-server locally](../..
|
|||||||
> To ensure the connection between you and your server is encrypted view our guide on [securing your setup](../../security/ssl.md)
|
> To ensure the connection between you and your server is encrypted view our guide on [securing your setup](../../security/ssl.md)
|
||||||
- Finally start the code-server
|
- Finally start the code-server
|
||||||
```
|
```
|
||||||
sudo ./code-server-linux -p 80
|
sudo ./code-server -p 80
|
||||||
```
|
```
|
||||||
> For instructions on how to keep the server running after you end your SSH session please checkout [how to use systemd](https://www.linode.com/docs/quick-answers/linux/start-service-at-boot/) to start linux based services if they are killed
|
> For instructions on how to keep the server running after you end your SSH session please checkout [how to use systemd](https://www.linode.com/docs/quick-answers/linux/start-service-at-boot/) to start linux based services if they are killed
|
||||||
- When you visit the public IP for your Digital Ocean instance, you will be greeted with this page. Code-server is using a self-signed SSL certificate for easy setup. To proceed to the IDE, click **"Advanced"**<img src ="../../assets/chrome_warning.png">
|
- When you visit the public IP for your Digital Ocean instance, you will be greeted with this page. Code-server is using a self-signed SSL certificate for easy setup. To proceed to the IDE, click **"Advanced"**<img src ="../../assets/chrome_warning.png">
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ OPTIONS
|
|||||||
> Example: `code-server -h 127.0.0.1`
|
> Example: `code-server -h 127.0.0.1`
|
||||||
|
|
||||||
### Open
|
### Open
|
||||||
You can have the server automatically open the VS Code in your browser on startup by using the `code server -o` or `code-server --open` flags
|
You can have the server automatically open the VS Code in your browser on startup by using the `code-server -o` or `code-server --open` flags
|
||||||
|
|
||||||
### Port
|
### Port
|
||||||
By default, code-server will use `8443` as its port. This can be changed by using `code-server -p` or `code-server --port=` followed by the port you want to use.
|
By default, code-server will use `8443` as its port. This can be changed by using `code-server -p` or `code-server --port=` followed by the port you want to use.
|
||||||
|
|||||||
@@ -7,22 +7,24 @@
|
|||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<div class="login">
|
<form id="login-form">
|
||||||
<div class="back"> <- Back </div>
|
<div class="login">
|
||||||
<h4 class="title">code-server</h4>
|
<div class="back">
|
||||||
<h2 class="subtitle">
|
<- Back </div> <h4 class="title">code-server</h4>
|
||||||
Enter server password
|
<h2 class="subtitle">
|
||||||
</h2>
|
Enter server password
|
||||||
<div class="mdc-text-field">
|
</h2>
|
||||||
<input type="password" id="password" class="mdc-text-field__input" required>
|
<div class="mdc-text-field">
|
||||||
<label class="mdc-floating-label" for="password">Password</label>
|
<input type="password" id="password" class="mdc-text-field__input" required>
|
||||||
<div class="mdc-line-ripple"></div>
|
<label class="mdc-floating-label" for="password">Password</label>
|
||||||
</div>
|
<div class="mdc-line-ripple"></div>
|
||||||
<button id="submit" class="mdc-button mdc-button--unelevated">
|
</div>
|
||||||
<span class="mdc-button__label">Enter IDE</span>
|
<button id="submit" class="mdc-button mdc-button--unelevated">
|
||||||
</button>
|
<span class="mdc-button__label">Enter IDE</span>
|
||||||
<div id="error-display"></div>
|
</button>
|
||||||
</div>
|
<div id="error-display"></div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
@@ -20,11 +20,14 @@ window.addEventListener("message", (event) => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
const password = document.getElementById("password") as HTMLInputElement;
|
const password = document.getElementById("password") as HTMLInputElement;
|
||||||
const submit = document.getElementById("submit") as HTMLButtonElement;
|
const form = document.getElementById("login-form") as HTMLFormElement;
|
||||||
if (!submit) {
|
|
||||||
throw new Error("No submit button found");
|
if (!form) {
|
||||||
|
throw new Error("No password form found");
|
||||||
}
|
}
|
||||||
submit.addEventListener("click", () => {
|
|
||||||
|
form.addEventListener("submit", (e) => {
|
||||||
|
e.preventDefault();
|
||||||
document.cookie = `password=${password.value}`;
|
document.cookie = `password=${password.value}`;
|
||||||
location.reload();
|
location.reload();
|
||||||
});
|
});
|
||||||
@@ -38,4 +41,4 @@ const errorDisplay = document.getElementById("error-display") as HTMLDivElement;
|
|||||||
|
|
||||||
if (document.referrer === document.location.href && matches) {
|
if (document.referrer === document.location.href && matches) {
|
||||||
errorDisplay.innerText = "Password is incorrect!";
|
errorDisplay.innerText = "Password is incorrect!";
|
||||||
}
|
}
|
||||||
|
|||||||
5
packages/ide-api/api.d.ts
vendored
5
packages/ide-api/api.d.ts
vendored
@@ -136,12 +136,17 @@ interface ICommandRegistry {
|
|||||||
registerCommand(command: ICommand): IDisposable;
|
registerCommand(command: ICommand): IDisposable;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
interface IStorageService {
|
||||||
|
save(): Promise<void>;
|
||||||
|
}
|
||||||
|
|
||||||
declare namespace ide {
|
declare namespace ide {
|
||||||
export const client: {};
|
export const client: {};
|
||||||
|
|
||||||
export const workbench: {
|
export const workbench: {
|
||||||
readonly statusbarService: IStatusbarService;
|
readonly statusbarService: IStatusbarService;
|
||||||
readonly notificationService: INotificationService;
|
readonly notificationService: INotificationService;
|
||||||
|
readonly storageService: IStorageService;
|
||||||
readonly menuRegistry: IMenuRegistry;
|
readonly menuRegistry: IMenuRegistry;
|
||||||
readonly commandRegistry: ICommandRegistry;
|
readonly commandRegistry: ICommandRegistry;
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@coder/ide-api",
|
"name": "@coder/ide-api",
|
||||||
"version": "1.0.3",
|
"version": "1.0.4",
|
||||||
"typings": "api.d.ts",
|
"typings": "api.d.ts",
|
||||||
"author": "Coder",
|
"author": "Coder",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
|||||||
@@ -45,7 +45,8 @@ const newCreateElement = <K extends keyof HTMLElementTagNameMap>(tagName: K): HT
|
|||||||
},
|
},
|
||||||
set: (value: string): void => {
|
set: (value: string): void => {
|
||||||
if (value) {
|
if (value) {
|
||||||
value = value.replace(/file:\/\//g, "/resource");
|
const resourceBaseUrl = location.pathname.replace(/\/$/, "") + "/resource";
|
||||||
|
value = value.replace(/file:\/\//g, resourceBaseUrl);
|
||||||
}
|
}
|
||||||
oldSrc!.set!.call(img, value);
|
oldSrc!.set!.call(img, value);
|
||||||
},
|
},
|
||||||
@@ -66,7 +67,8 @@ const newCreateElement = <K extends keyof HTMLElementTagNameMap>(tagName: K): HT
|
|||||||
},
|
},
|
||||||
set: (value: string): void => {
|
set: (value: string): void => {
|
||||||
if (value) {
|
if (value) {
|
||||||
value = value.replace(/file:\/\//g, "/resource");
|
const resourceBaseUrl = location.pathname.replace(/\/$/, "") + "/resource";
|
||||||
|
value = value.replace(/file:\/\//g, resourceBaseUrl);
|
||||||
}
|
}
|
||||||
oldInnerHtml!.set!.call(style, value);
|
oldInnerHtml!.set!.call(style, value);
|
||||||
},
|
},
|
||||||
@@ -80,7 +82,8 @@ const newCreateElement = <K extends keyof HTMLElementTagNameMap>(tagName: K): HT
|
|||||||
if (sheet && !overridden) {
|
if (sheet && !overridden) {
|
||||||
const oldInsertRule = sheet.insertRule;
|
const oldInsertRule = sheet.insertRule;
|
||||||
sheet.insertRule = (rule: string, index?: number): void => {
|
sheet.insertRule = (rule: string, index?: number): void => {
|
||||||
rule = rule.replace(/file:\/\//g, "/resource");
|
const resourceBaseUrl = location.pathname.replace(/\/$/, "") + "/resource";
|
||||||
|
rule = rule.replace(/file:\/\//g, resourceBaseUrl);
|
||||||
oldInsertRule.call(sheet, rule, index);
|
oldInsertRule.call(sheet, rule, index);
|
||||||
};
|
};
|
||||||
overridden = true;
|
overridden = true;
|
||||||
@@ -145,8 +148,9 @@ const newCreateElement = <K extends keyof HTMLElementTagNameMap>(tagName: K): HT
|
|||||||
(view as any).send = (channel: string, ...args: any[]): void => { // tslint:disable-line no-any
|
(view as any).send = (channel: string, ...args: any[]): void => { // tslint:disable-line no-any
|
||||||
if (args[0] && typeof args[0] === "object" && args[0].contents) {
|
if (args[0] && typeof args[0] === "object" && args[0].contents) {
|
||||||
// TODO
|
// TODO
|
||||||
args[0].contents = (args[0].contents as string).replace(/"(file:\/\/[^"]*)"/g, (m1) => `"/resource${m1}"`);
|
const resourceBaseUrl = location.pathname.replace(/\/$/, "") + "/resource";
|
||||||
args[0].contents = (args[0].contents as string).replace(/"vscode-resource:([^"]*)"/g, (m, m1) => `"/resource${m1}"`);
|
args[0].contents = (args[0].contents as string).replace(/"(file:\/\/[^"]*)"/g, (m1) => `"${resourceBaseUrl}${m1}"`);
|
||||||
|
args[0].contents = (args[0].contents as string).replace(/"vscode-resource:([^"]*)"/g, (m, m1) => `"${resourceBaseUrl}${m1}"`);
|
||||||
args[0].contents = (args[0].contents as string).replace(/style-src vscode-core-resource:/g, "style-src 'self'");
|
args[0].contents = (args[0].contents as string).replace(/style-src vscode-core-resource:/g, "style-src 'self'");
|
||||||
}
|
}
|
||||||
if (view.contentWindow) {
|
if (view.contentWindow) {
|
||||||
@@ -182,6 +186,10 @@ class Clipboard {
|
|||||||
public writeText(value: string): Promise<void> {
|
public writeText(value: string): Promise<void> {
|
||||||
return clipboard.writeText(value);
|
return clipboard.writeText(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public readText(): Promise<string> {
|
||||||
|
return clipboard.readText();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class Shell {
|
class Shell {
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ export class Retry {
|
|||||||
|
|
||||||
// Times are in seconds.
|
// Times are in seconds.
|
||||||
private readonly retryMinDelay = 1;
|
private readonly retryMinDelay = 1;
|
||||||
private readonly retryMaxDelay = 10;
|
private readonly retryMaxDelay = 3;
|
||||||
private readonly maxImmediateRetries = 5;
|
private readonly maxImmediateRetries = 5;
|
||||||
private readonly retryExponent = 1.5;
|
private readonly retryExponent = 1.5;
|
||||||
private blocked: string | boolean | undefined;
|
private blocked: string | boolean | undefined;
|
||||||
|
|||||||
@@ -200,7 +200,13 @@ const bold = (text: string | number): string | number => {
|
|||||||
const webpackConfig = require(path.resolve(__dirname, "..", "..", "web", "webpack.config.js"));
|
const webpackConfig = require(path.resolve(__dirname, "..", "..", "web", "webpack.config.js"));
|
||||||
const compiler = require("webpack")(webpackConfig);
|
const compiler = require("webpack")(webpackConfig);
|
||||||
app.use(require("webpack-dev-middleware")(compiler, {
|
app.use(require("webpack-dev-middleware")(compiler, {
|
||||||
logger,
|
logger: {
|
||||||
|
trace: (m: string): void => logger.trace("webpack", field("message", m)),
|
||||||
|
debug: (m: string): void => logger.debug("webpack", field("message", m)),
|
||||||
|
info: (m: string): void => logger.info("webpack", field("message", m)),
|
||||||
|
warn: (m: string): void => logger.warn("webpack", field("message", m)),
|
||||||
|
error: (m: string): void => logger.error("webpack", field("message", m)),
|
||||||
|
},
|
||||||
publicPath: webpackConfig.output.publicPath,
|
publicPath: webpackConfig.output.publicPath,
|
||||||
stats: webpackConfig.stats,
|
stats: webpackConfig.stats,
|
||||||
}));
|
}));
|
||||||
|
|||||||
@@ -79,7 +79,11 @@ export const createPortScanner = (scanInterval: number = 5000): PortScanner => {
|
|||||||
logger.trace("scanning ports");
|
logger.trace("scanning ports");
|
||||||
scan((error) => {
|
scan((error) => {
|
||||||
if (error) {
|
if (error) {
|
||||||
logger.error(`Port scanning will not be available: ${error.message}.`);
|
if ((error as NodeJS.ErrnoException).code === "ENOENT") {
|
||||||
|
logger.warn("Port scanning will not be available because netstat is not installed");
|
||||||
|
} else {
|
||||||
|
logger.warn(`Port scanning will not be available: ${error.message}`);
|
||||||
|
}
|
||||||
disposed = true;
|
disposed = true;
|
||||||
} else if (!disposed) {
|
} else if (!disposed) {
|
||||||
lastTimeout = setTimeout(doInterval, scanInterval);
|
lastTimeout = setTimeout(doInterval, scanInterval);
|
||||||
|
|||||||
@@ -271,7 +271,7 @@ export const createApp = async (options: CreateAppOptions): Promise<{
|
|||||||
const body = data.join("");
|
const body = data.join("");
|
||||||
await mkdirp(path.dirname(fullPath));
|
await mkdirp(path.dirname(fullPath));
|
||||||
fs.writeFileSync(fullPath, body);
|
fs.writeFileSync(fullPath, body);
|
||||||
logger.debug("Wrote resource", field("path", fullPath), field("content-length", body.length));
|
logger.info("Wrote resource", field("path", fullPath), field("content-length", body.length));
|
||||||
res.status(200);
|
res.status(200);
|
||||||
res.end();
|
res.end();
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
--primary: #2A2E37;
|
--primary: #2A2E37;
|
||||||
--border: black;
|
--border: black;
|
||||||
--faded: #a0a1a5;
|
--faded: #a0a1a5;
|
||||||
|
--disabled: #888;
|
||||||
--header-background: #161616;
|
--header-background: #161616;
|
||||||
--header-foreground: white;
|
--header-foreground: white;
|
||||||
--list-active-selection-background: rgb(0, 120, 160);
|
--list-active-selection-background: rgb(0, 120, 160);
|
||||||
@@ -101,6 +102,12 @@
|
|||||||
background-color: var(--list-active-selection-background);
|
background-color: var(--list-active-selection-background);
|
||||||
color: var(--list-active-selection-foreground);
|
color: var(--list-active-selection-foreground);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&.disabled, &.disabled:hover {
|
||||||
|
background-color: var(--primary);
|
||||||
|
color: var(--disabled);
|
||||||
|
cursor: initial;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -134,6 +141,11 @@
|
|||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
button[disabled], button[disabled]:hover {
|
||||||
|
color: var(--disabled);
|
||||||
|
cursor: initial;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -16,6 +16,9 @@ import { IThemeService } from "vs/platform/theme/common/themeService";
|
|||||||
import { workbench } from "./workbench";
|
import { workbench } from "./workbench";
|
||||||
import "./dialog.scss";
|
import "./dialog.scss";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Describes the type of dialog to show.
|
||||||
|
*/
|
||||||
export enum DialogType {
|
export enum DialogType {
|
||||||
NewFolder,
|
NewFolder,
|
||||||
Save,
|
Save,
|
||||||
@@ -68,8 +71,12 @@ interface DialogEntry {
|
|||||||
readonly isDirectory: boolean;
|
readonly isDirectory: boolean;
|
||||||
readonly size: number;
|
readonly size: number;
|
||||||
readonly lastModified: string;
|
readonly lastModified: string;
|
||||||
|
readonly isDisabled?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Open and save dialogs.
|
||||||
|
*/
|
||||||
class Dialog {
|
class Dialog {
|
||||||
private _path: string | undefined;
|
private _path: string | undefined;
|
||||||
|
|
||||||
@@ -265,8 +272,7 @@ class Dialog {
|
|||||||
}
|
}
|
||||||
if (element.isDirectory) {
|
if (element.isDirectory) {
|
||||||
this.path = element.fullPath;
|
this.path = element.fullPath;
|
||||||
} else {
|
} else if (!(this.options as OpenDialogOptions).properties.openDirectory) {
|
||||||
// Open
|
|
||||||
this.selectEmitter.emit(element.fullPath);
|
this.selectEmitter.emit(element.fullPath);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -282,12 +288,18 @@ class Dialog {
|
|||||||
});
|
});
|
||||||
buttonsNode.appendChild(cancelBtn);
|
buttonsNode.appendChild(cancelBtn);
|
||||||
const confirmBtn = document.createElement("button");
|
const confirmBtn = document.createElement("button");
|
||||||
confirmBtn.innerText = "Confirm";
|
const openFile = (this.options as OpenDialogOptions).properties.openFile;
|
||||||
|
confirmBtn.innerText = openFile ? "Open" : "Confirm";
|
||||||
confirmBtn.addEventListener("click", () => {
|
confirmBtn.addEventListener("click", () => {
|
||||||
if (this._path) {
|
if (this._path && !openFile) {
|
||||||
this.selectEmitter.emit(this._path);
|
this.selectEmitter.emit(this._path);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
// Since a single click opens a file, the only time this button can be
|
||||||
|
// used is on a directory, which is invalid for opening files.
|
||||||
|
if (openFile) {
|
||||||
|
confirmBtn.disabled = true;
|
||||||
|
}
|
||||||
buttonsNode.appendChild(confirmBtn);
|
buttonsNode.appendChild(confirmBtn);
|
||||||
this.root.appendChild(buttonsNode);
|
this.root.appendChild(buttonsNode);
|
||||||
this.entryList.layout();
|
this.entryList.layout();
|
||||||
@@ -303,6 +315,9 @@ class Dialog {
|
|||||||
return this.errorEmitter.event;
|
return this.errorEmitter.event;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove the dialog.
|
||||||
|
*/
|
||||||
public dispose(): void {
|
public dispose(): void {
|
||||||
this.selectEmitter.dispose();
|
this.selectEmitter.dispose();
|
||||||
this.errorEmitter.dispose();
|
this.errorEmitter.dispose();
|
||||||
@@ -310,6 +325,9 @@ class Dialog {
|
|||||||
this.background.remove();
|
this.background.remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Build and insert the path shown at the top of the dialog.
|
||||||
|
*/
|
||||||
private buildPath(): void {
|
private buildPath(): void {
|
||||||
while (this.pathNode.lastChild) {
|
while (this.pathNode.lastChild) {
|
||||||
this.pathNode.removeChild(this.pathNode.lastChild);
|
this.pathNode.removeChild(this.pathNode.lastChild);
|
||||||
@@ -376,6 +394,9 @@ class Dialog {
|
|||||||
return (<any>this.entryList).typeFilterController.filter._pattern;
|
return (<any>this.entryList).typeFilterController.filter._pattern;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* List the files and return dialog entries.
|
||||||
|
*/
|
||||||
private async list(directory: string): Promise<ReadonlyArray<DialogEntry>> {
|
private async list(directory: string): Promise<ReadonlyArray<DialogEntry>> {
|
||||||
const paths = (await util.promisify(fs.readdir)(directory)).sort();
|
const paths = (await util.promisify(fs.readdir)(directory)).sort();
|
||||||
const stats = await Promise.all(paths.map(p => util.promisify(fs.stat)(path.join(directory, p))));
|
const stats = await Promise.all(paths.map(p => util.promisify(fs.stat)(path.join(directory, p))));
|
||||||
@@ -386,6 +407,8 @@ class Dialog {
|
|||||||
isDirectory: stat.isDirectory(),
|
isDirectory: stat.isDirectory(),
|
||||||
lastModified: stat.mtime.toDateString(),
|
lastModified: stat.mtime.toDateString(),
|
||||||
size: stat.size,
|
size: stat.size,
|
||||||
|
// If we are opening a directory, show files as disabled.
|
||||||
|
isDisabled: !stat.isDirectory() && (this.options as OpenDialogOptions).properties.openDirectory,
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -397,11 +420,17 @@ interface DialogEntryData {
|
|||||||
label: HighlightedLabel;
|
label: HighlightedLabel;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rendering for the different parts of a dialog entry.
|
||||||
|
*/
|
||||||
class DialogEntryRenderer implements ITreeRenderer<DialogEntry, string, DialogEntryData> {
|
class DialogEntryRenderer implements ITreeRenderer<DialogEntry, string, DialogEntryData> {
|
||||||
public get templateId(): string {
|
public get templateId(): string {
|
||||||
return "dialog-entry";
|
return "dialog-entry";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Append and return containers for each part of the dialog entry.
|
||||||
|
*/
|
||||||
public renderTemplate(container: HTMLElement): DialogEntryData {
|
public renderTemplate(container: HTMLElement): DialogEntryData {
|
||||||
addClass(container, "dialog-entry");
|
addClass(container, "dialog-entry");
|
||||||
addClass(container, "dialog-grid");
|
addClass(container, "dialog-grid");
|
||||||
@@ -422,6 +451,9 @@ class DialogEntryRenderer implements ITreeRenderer<DialogEntry, string, DialogEn
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Render a dialog entry.
|
||||||
|
*/
|
||||||
public renderElement(node: ITreeNode<DialogEntry, string>, _index: number, templateData: DialogEntryData): void {
|
public renderElement(node: ITreeNode<DialogEntry, string>, _index: number, templateData: DialogEntryData): void {
|
||||||
templateData.icon.className = "dialog-entry-icon monaco-icon-label";
|
templateData.icon.className = "dialog-entry-icon monaco-icon-label";
|
||||||
const classes = getIconClasses(
|
const classes = getIconClasses(
|
||||||
@@ -444,8 +476,19 @@ class DialogEntryRenderer implements ITreeRenderer<DialogEntry, string, DialogEn
|
|||||||
}] : []);
|
}] : []);
|
||||||
templateData.size.innerText = node.element.size.toString();
|
templateData.size.innerText = node.element.size.toString();
|
||||||
templateData.lastModified.innerText = node.element.lastModified;
|
templateData.lastModified.innerText = node.element.lastModified;
|
||||||
|
|
||||||
|
// We know this exists because we created the template.
|
||||||
|
const entryContainer = templateData.label.element.parentElement!.parentElement!.parentElement!;
|
||||||
|
if (node.element.isDisabled) {
|
||||||
|
entryContainer.classList.add("disabled");
|
||||||
|
} else {
|
||||||
|
entryContainer.classList.remove("disabled");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Does nothing (not implemented).
|
||||||
|
*/
|
||||||
public disposeTemplate(_templateData: DialogEntryData): void {
|
public disposeTemplate(_templateData: DialogEntryData): void {
|
||||||
// throw new Error("Method not implemented.");
|
// throw new Error("Method not implemented.");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,6 +11,8 @@ import { IStorageService, WillSaveStateReason } from "vs/platform/storage/common
|
|||||||
import * as paths from "./paths";
|
import * as paths from "./paths";
|
||||||
import { workbench } from "../workbench";
|
import { workbench } from "../workbench";
|
||||||
|
|
||||||
|
// tslint:disable completed-docs
|
||||||
|
|
||||||
class StorageDatabase implements workspaceStorage.IStorageDatabase {
|
class StorageDatabase implements workspaceStorage.IStorageDatabase {
|
||||||
public readonly onDidChangeItemsExternal = Event.None;
|
public readonly onDidChangeItemsExternal = Event.None;
|
||||||
private readonly items = new Map<string, string>();
|
private readonly items = new Map<string, string>();
|
||||||
@@ -26,7 +28,8 @@ class StorageDatabase implements workspaceStorage.IStorageDatabase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.triggerFlush(WillSaveStateReason.SHUTDOWN);
|
this.triggerFlush(WillSaveStateReason.SHUTDOWN);
|
||||||
navigator.sendBeacon(`/resource${this.path}`, this.content);
|
const resourceBaseUrl = location.pathname.replace(/\/$/, "") + "/resource";
|
||||||
|
navigator.sendBeacon(`${resourceBaseUrl}/${this.path}`, this.content);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,15 +1,27 @@
|
|||||||
import * as electron from "electron";
|
import * as electron from "electron";
|
||||||
import { Emitter } from "@coder/events";
|
import { Emitter } from "@coder/events";
|
||||||
import { IWindowsService, INativeOpenDialogOptions, MessageBoxOptions, SaveDialogOptions, OpenDialogOptions, IMessageBoxResult, IDevToolsOptions, IEnterWorkspaceResult, CrashReporterStartOptions, INewWindowOptions, IOpenFileRequest, IAddFoldersRequest } from "vs/platform/windows/common/windows";
|
import { logger } from "@coder/logger";
|
||||||
|
import { IWindowsService, INativeOpenDialogOptions, MessageBoxOptions, SaveDialogOptions, OpenDialogOptions, IMessageBoxResult, IDevToolsOptions, IEnterWorkspaceResult, CrashReporterStartOptions, INewWindowOptions, IOpenFileRequest, IAddFoldersRequest, IURIToOpen, IOpenSettings } from "vs/platform/windows/common/windows";
|
||||||
import { ParsedArgs } from "vs/platform/environment/common/environment";
|
import { ParsedArgs } from "vs/platform/environment/common/environment";
|
||||||
import { IWorkspaceIdentifier, IWorkspaceFolderCreationData, ISingleFolderWorkspaceIdentifier } from "vs/platform/workspaces/common/workspaces";
|
import { IWorkspaceIdentifier, IWorkspaceFolderCreationData, ISingleFolderWorkspaceIdentifier } from "vs/platform/workspaces/common/workspaces";
|
||||||
import { URI } from "vs/base/common/uri";
|
import { URI } from "vs/base/common/uri";
|
||||||
import { IRecentlyOpened } from "vs/platform/history/common/history";
|
import { IRecentlyOpened, IRecent } from "vs/platform/history/common/history";
|
||||||
import { ISerializableCommandAction } from "vs/platform/actions/common/actions";
|
import { ISerializableCommandAction } from "vs/platform/actions/common/actions";
|
||||||
import { client } from "../client";
|
import { client } from "../client";
|
||||||
import { showOpenDialog } from "../dialog";
|
import { showOpenDialog } from "../dialog";
|
||||||
import { workbench } from "../workbench";
|
import { workbench } from "../workbench";
|
||||||
|
|
||||||
|
// tslint:disable completed-docs
|
||||||
|
|
||||||
|
// VS Code overrides window.open to call openExternal, but we then call
|
||||||
|
// window.open which results in an infinite loop. Store the function but also
|
||||||
|
// make it unable to be set (doesn't work otherwise).
|
||||||
|
const windowOpen = window.open;
|
||||||
|
Object.defineProperty(window, "open", {
|
||||||
|
set: (): void => { /* Not allowed. */ },
|
||||||
|
get: (): Function => windowOpen,
|
||||||
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Instead of going to the shared process, we'll directly run these methods on
|
* Instead of going to the shared process, we'll directly run these methods on
|
||||||
* the client. This setup means we can only control the current window.
|
* the client. This setup means we can only control the current window.
|
||||||
@@ -35,9 +47,9 @@ export class WindowsService implements IWindowsService {
|
|||||||
private readonly window = new electron.BrowserWindow();
|
private readonly window = new electron.BrowserWindow();
|
||||||
|
|
||||||
// Dialogs
|
// Dialogs
|
||||||
public async pickFileFolderAndOpen(_options: INativeOpenDialogOptions): Promise<void> {
|
public async pickFileFolderAndOpen(options: INativeOpenDialogOptions): Promise<void> {
|
||||||
showOpenDialog({
|
showOpenDialog({
|
||||||
...(_options.dialogOptions || {}),
|
...(options.dialogOptions || {}),
|
||||||
properties: {
|
properties: {
|
||||||
openFile: true,
|
openFile: true,
|
||||||
openDirectory: true,
|
openDirectory: true,
|
||||||
@@ -50,13 +62,13 @@ export class WindowsService implements IWindowsService {
|
|||||||
}],
|
}],
|
||||||
} as IOpenFileRequest);
|
} as IOpenFileRequest);
|
||||||
}).catch((ex) => {
|
}).catch((ex) => {
|
||||||
//
|
logger.error(ex.message);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public async pickFileAndOpen(_options: INativeOpenDialogOptions): Promise<void> {
|
public async pickFileAndOpen(options: INativeOpenDialogOptions): Promise<void> {
|
||||||
showOpenDialog({
|
showOpenDialog({
|
||||||
...(_options.dialogOptions || {}),
|
...(options.dialogOptions || {}),
|
||||||
properties: {
|
properties: {
|
||||||
openFile: true,
|
openFile: true,
|
||||||
},
|
},
|
||||||
@@ -68,26 +80,32 @@ export class WindowsService implements IWindowsService {
|
|||||||
}],
|
}],
|
||||||
} as IOpenFileRequest);
|
} as IOpenFileRequest);
|
||||||
}).catch((ex) => {
|
}).catch((ex) => {
|
||||||
//
|
logger.error(ex.message);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public async pickFolderAndOpen(_options: INativeOpenDialogOptions): Promise<void> {
|
public async pickFolderAndOpen(options: INativeOpenDialogOptions): Promise<void> {
|
||||||
|
if (!options.dialogOptions) {
|
||||||
|
options.dialogOptions = {};
|
||||||
|
}
|
||||||
|
if (!options.dialogOptions.title) {
|
||||||
|
options.dialogOptions.title = "Open Folder";
|
||||||
|
}
|
||||||
showOpenDialog({
|
showOpenDialog({
|
||||||
...(_options.dialogOptions || {}),
|
...(options.dialogOptions || {}),
|
||||||
properties: {
|
properties: {
|
||||||
openDirectory: true,
|
openDirectory: true,
|
||||||
},
|
},
|
||||||
}).then((path) => {
|
}).then((path) => {
|
||||||
workbench.workspace = URI.file(path);
|
workbench.workspace = URI.file(path);
|
||||||
}).catch((ex) => {
|
}).catch((ex) => {
|
||||||
//
|
logger.error(ex.message);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public async pickWorkspaceAndOpen(_options: INativeOpenDialogOptions): Promise<void> {
|
public async pickWorkspaceAndOpen(options: INativeOpenDialogOptions): Promise<void> {
|
||||||
showOpenDialog({
|
showOpenDialog({
|
||||||
...(_options.dialogOptions || {}),
|
...(options.dialogOptions || {}),
|
||||||
properties: {
|
properties: {
|
||||||
openDirectory: true,
|
openDirectory: true,
|
||||||
},
|
},
|
||||||
@@ -97,7 +115,7 @@ export class WindowsService implements IWindowsService {
|
|||||||
foldersToAdd: [URI.file(path)],
|
foldersToAdd: [URI.file(path)],
|
||||||
} as IAddFoldersRequest);
|
} as IAddFoldersRequest);
|
||||||
}).catch((ex) => {
|
}).catch((ex) => {
|
||||||
//
|
logger.error(ex.message);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -120,16 +138,14 @@ export class WindowsService implements IWindowsService {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public showOpenDialog(windowId: number, options: OpenDialogOptions): Promise<string[]> {
|
public async showOpenDialog(_windowId: number, options: OpenDialogOptions): Promise<string[]> {
|
||||||
return showOpenDialog({
|
return [await showOpenDialog({
|
||||||
...(options || {}),
|
...(options || {}),
|
||||||
properties: {
|
properties: {
|
||||||
openDirectory: true,
|
openDirectory: true,
|
||||||
openFile: true,
|
openFile: true,
|
||||||
},
|
},
|
||||||
}).then((path) => {
|
})];
|
||||||
return [path];
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public reloadWindow(windowId: number, _args?: ParsedArgs): Promise<void> {
|
public reloadWindow(windowId: number, _args?: ParsedArgs): Promise<void> {
|
||||||
@@ -148,14 +164,14 @@ export class WindowsService implements IWindowsService {
|
|||||||
throw new Error("not implemented");
|
throw new Error("not implemented");
|
||||||
}
|
}
|
||||||
|
|
||||||
public enterWorkspace(_windowId: number, _path: URI): Promise<IEnterWorkspaceResult> {
|
public enterWorkspace(_windowId: number, uri: URI): Promise<IEnterWorkspaceResult> {
|
||||||
if (_path.path.endsWith(".json")) {
|
if (uri.path.endsWith(".json")) {
|
||||||
workbench.workspace = {
|
workbench.workspace = {
|
||||||
id: "Untitled",
|
id: "Untitled",
|
||||||
configPath: _path.path,
|
configPath: uri,
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
workbench.workspace = _path;
|
workbench.workspace = uri;
|
||||||
}
|
}
|
||||||
|
|
||||||
return undefined!;
|
return undefined!;
|
||||||
@@ -179,7 +195,7 @@ export class WindowsService implements IWindowsService {
|
|||||||
return Promise.resolve(this.getWindowById(windowId).setRepresentedFilename(fileName));
|
return Promise.resolve(this.getWindowById(windowId).setRepresentedFilename(fileName));
|
||||||
}
|
}
|
||||||
|
|
||||||
public addRecentlyOpened(_files: URI[]): Promise<void> {
|
public addRecentlyOpened(_files: IRecent[]): Promise<void> {
|
||||||
throw new Error("not implemented");
|
throw new Error("not implemented");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -283,7 +299,7 @@ export class WindowsService implements IWindowsService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Global methods
|
// Global methods
|
||||||
public openWindow(_windowId: number, _paths: URI[], _options?: { forceNewWindow?: boolean, forceReuseWindow?: boolean, forceOpenWorkspaceAsFile?: boolean, args?: ParsedArgs }): Promise<void> {
|
public openWindow(_windowId: number, _uris: IURIToOpen[], _options?: IOpenSettings): Promise<void> {
|
||||||
throw new Error("not implemented");
|
throw new Error("not implemented");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -307,8 +323,8 @@ export class WindowsService implements IWindowsService {
|
|||||||
throw new Error("not implemented");
|
throw new Error("not implemented");
|
||||||
}
|
}
|
||||||
|
|
||||||
public async showItemInFolder(_path: string): Promise<void> {
|
public async showItemInFolder(uri: URI): Promise<void> {
|
||||||
workbench.workspace = URI.file(_path);
|
workbench.workspace = uri;
|
||||||
}
|
}
|
||||||
|
|
||||||
public getActiveWindowId(): Promise<number | undefined> {
|
public getActiveWindowId(): Promise<number | undefined> {
|
||||||
|
|||||||
@@ -29,8 +29,6 @@ import { LogLevel } from "vs/platform/log/common/log";
|
|||||||
import { RawContextKey, IContextKeyService } from "vs/platform/contextkey/common/contextkey";
|
import { RawContextKey, IContextKeyService } from "vs/platform/contextkey/common/contextkey";
|
||||||
import { ServiceCollection } from "vs/platform/instantiation/common/serviceCollection";
|
import { ServiceCollection } from "vs/platform/instantiation/common/serviceCollection";
|
||||||
import { URI } from "vs/base/common/uri";
|
import { URI } from "vs/base/common/uri";
|
||||||
import { BackupMainService } from "vs/platform/backup/electron-main/backupMainService";
|
|
||||||
import { IInstantiationService } from "vs/platform/instantiation/common/instantiation";
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initializes VS Code and provides a way to call into general client
|
* Initializes VS Code and provides a way to call into general client
|
||||||
@@ -131,14 +129,6 @@ export class Workbench {
|
|||||||
public set serviceCollection(collection: ServiceCollection) {
|
public set serviceCollection(collection: ServiceCollection) {
|
||||||
this._serviceCollection = collection;
|
this._serviceCollection = collection;
|
||||||
|
|
||||||
// TODO: If possible it might be better to start the app from vs/code/electron-main/app.
|
|
||||||
// For now, manually initialize services from there as needed.
|
|
||||||
const inst = this._serviceCollection.get(IInstantiationService) as IInstantiationService;
|
|
||||||
const backupMainService = inst.createInstance(BackupMainService) as BackupMainService;
|
|
||||||
backupMainService.initialize().catch((error) => {
|
|
||||||
logger.error(error.message);
|
|
||||||
});
|
|
||||||
|
|
||||||
const contextKeys = this.serviceCollection.get(IContextKeyService) as IContextKeyService;
|
const contextKeys = this.serviceCollection.get(IContextKeyService) as IContextKeyService;
|
||||||
const bounded = this.clipboardContextKey.bindTo(contextKeys);
|
const bounded = this.clipboardContextKey.bindTo(contextKeys);
|
||||||
client.clipboard.onPermissionChange((enabled) => {
|
client.clipboard.onPermissionChange((enabled) => {
|
||||||
|
|||||||
@@ -138,10 +138,16 @@ index e0ff793..885de12 100644
|
|||||||
- const cmdOrCtrlKey = platform.isMacintosh ? e.metaKey : e.ctrlKey;
|
- const cmdOrCtrlKey = platform.isMacintosh ? e.metaKey : e.ctrlKey;
|
||||||
+ const cmdOrCtrlKey = browser.isMacintosh ? e.metaKey : e.ctrlKey;
|
+ const cmdOrCtrlKey = browser.isMacintosh ? e.metaKey : e.ctrlKey;
|
||||||
diff --git a/src/vs/code/electron-browser/sharedProcess/sharedProcessMain.ts b/src/vs/code/electron-browser/sharedProcess/sharedProcessMain.ts
|
diff --git a/src/vs/code/electron-browser/sharedProcess/sharedProcessMain.ts b/src/vs/code/electron-browser/sharedProcess/sharedProcessMain.ts
|
||||||
index 6fd8249..796aed7 100644
|
index 6fd8249..039d31a 100644
|
||||||
--- a/src/vs/code/electron-browser/sharedProcess/sharedProcessMain.ts
|
--- a/src/vs/code/electron-browser/sharedProcess/sharedProcessMain.ts
|
||||||
+++ b/src/vs/code/electron-browser/sharedProcess/sharedProcessMain.ts
|
+++ b/src/vs/code/electron-browser/sharedProcess/sharedProcessMain.ts
|
||||||
@@ -223,0 +224,2 @@ async function handshake(configuration: ISharedProcessConfiguration): Promise<vo
|
@@ -50,0 +51 @@ import { ServiceIdentifier } from 'vs/platform/instantiation/common/instantiatio
|
||||||
|
+import { BackupMainService } from 'vs/platform/backup/electron-main/backupMainService';
|
||||||
|
@@ -120,0 +122,3 @@ function main(server: Server, initData: ISharedProcessInitData, configuration: I
|
||||||
|
+ const backupMainService = instantiationService.createInstance(BackupMainService) as BackupMainService;
|
||||||
|
+ backupMainService.initialize().catch(console.error);
|
||||||
|
+
|
||||||
|
@@ -223,0 +228,2 @@ async function handshake(configuration: ISharedProcessConfiguration): Promise<vo
|
||||||
+
|
+
|
||||||
+startup({ machineId: "1" });
|
+startup({ machineId: "1" });
|
||||||
diff --git a/src/vs/editor/browser/config/configuration.ts b/src/vs/editor/browser/config/configuration.ts
|
diff --git a/src/vs/editor/browser/config/configuration.ts b/src/vs/editor/browser/config/configuration.ts
|
||||||
@@ -349,6 +355,17 @@ index 25e74c8..0bed89e 100644
|
|||||||
@@ -769 +769 @@ function loadCommonJSModule<T>(logService: ILogService, modulePath: string, acti
|
@@ -769 +769 @@ function loadCommonJSModule<T>(logService: ILogService, modulePath: string, acti
|
||||||
- r = require.__$__nodeRequire<T>(modulePath);
|
- r = require.__$__nodeRequire<T>(modulePath);
|
||||||
+ r = (global as any).nativeNodeRequire(modulePath);
|
+ r = (global as any).nativeNodeRequire(modulePath);
|
||||||
|
diff --git a/src/vs/workbench/api/node/extHostTypeConverters.ts b/src/vs/workbench/api/node/extHostTypeConverters.ts
|
||||||
|
index 84406b8..cffd952 100644
|
||||||
|
--- a/src/vs/workbench/api/node/extHostTypeConverters.ts
|
||||||
|
+++ b/src/vs/workbench/api/node/extHostTypeConverters.ts
|
||||||
|
@@ -26 +25,0 @@ import { ExtHostDocumentsAndEditors } from 'vs/workbench/api/node/extHostDocumen
|
||||||
|
-import { isString, isNumber } from 'vs/base/common/types';
|
||||||
|
@@ -31 +29,0 @@ import { LogLevel as _MainLogLevel } from 'vs/platform/log/common/log';
|
||||||
|
-import { coalesce } from 'vs/base/common/arrays';
|
||||||
|
@@ -117,0 +116,2 @@ export namespace Diagnostic {
|
||||||
|
+ const { isString, isNumber } = require('vs/base/common/types');
|
||||||
|
+ const { coalesce } = require('vs/base/common/arrays');
|
||||||
diff --git a/src/vs/workbench/browser/dnd.ts b/src/vs/workbench/browser/dnd.ts
|
diff --git a/src/vs/workbench/browser/dnd.ts b/src/vs/workbench/browser/dnd.ts
|
||||||
index 7b6ad89..3190356 100644
|
index 7b6ad89..3190356 100644
|
||||||
--- a/src/vs/workbench/browser/dnd.ts
|
--- a/src/vs/workbench/browser/dnd.ts
|
||||||
@@ -844,7 +861,7 @@ index 48ef482..dc47f81 100644
|
|||||||
- placeHolder: isMacintosh ? nls.localize('openRecentPlaceHolderMac', "Select to open (hold Cmd-key to open in new window)") : nls.localize('openRecentPlaceHolder', "Select to open (hold Ctrl-key to open in new window)"),
|
- placeHolder: isMacintosh ? nls.localize('openRecentPlaceHolderMac', "Select to open (hold Cmd-key to open in new window)") : nls.localize('openRecentPlaceHolder', "Select to open (hold Ctrl-key to open in new window)"),
|
||||||
+ placeHolder: browser.isMacintosh ? nls.localize('openRecentPlaceHolderMac', "Select to open (hold Cmd-key to open in new window)") : nls.localize('openRecentPlaceHolder', "Select to open (hold Ctrl-key to open in new window)"),
|
+ placeHolder: browser.isMacintosh ? nls.localize('openRecentPlaceHolderMac', "Select to open (hold Cmd-key to open in new window)") : nls.localize('openRecentPlaceHolder', "Select to open (hold Ctrl-key to open in new window)"),
|
||||||
diff --git a/src/vs/workbench/electron-browser/main.contribution.ts b/src/vs/workbench/electron-browser/main.contribution.ts
|
diff --git a/src/vs/workbench/electron-browser/main.contribution.ts b/src/vs/workbench/electron-browser/main.contribution.ts
|
||||||
index 71bc992..59a1a20 100644
|
index 71bc992..97cbb71 100644
|
||||||
--- a/src/vs/workbench/electron-browser/main.contribution.ts
|
--- a/src/vs/workbench/electron-browser/main.contribution.ts
|
||||||
+++ b/src/vs/workbench/electron-browser/main.contribution.ts
|
+++ b/src/vs/workbench/electron-browser/main.contribution.ts
|
||||||
@@ -13 +13,2 @@ import { KeyMod, KeyChord, KeyCode } from 'vs/base/common/keyCodes';
|
@@ -13 +13,2 @@ import { KeyMod, KeyChord, KeyCode } from 'vs/base/common/keyCodes';
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ set -euxo pipefail
|
|||||||
# Builds a tarfile containing vscode sourcefiles neccessary for CI.
|
# Builds a tarfile containing vscode sourcefiles neccessary for CI.
|
||||||
# Done outside the CI and uploaded to object storage to reduce CI time.
|
# Done outside the CI and uploaded to object storage to reduce CI time.
|
||||||
|
|
||||||
branch=1.33.0
|
branch=1.33.1
|
||||||
dir=/tmp/vstar
|
dir=/tmp/vstar
|
||||||
outfile=/tmp/vstar-$branch.tar.gz
|
outfile=/tmp/vstar-$branch.tar.gz
|
||||||
rm -rf $dir
|
rm -rf $dir
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ module.exports = (options = {}) => ({
|
|||||||
// they are parsed as URIs and will throw errors if not fully formed.
|
// they are parsed as URIs and will throw errors if not fully formed.
|
||||||
// The !! prefix causes it to ignore other loaders (doesn't work).
|
// The !! prefix causes it to ignore other loaders (doesn't work).
|
||||||
search: "require\\.toUrl\\(",
|
search: "require\\.toUrl\\(",
|
||||||
replace: "location.protocol + '//' + location.host + '/' + require('!!file-loader?name=[path][name].[ext]!' + ",
|
replace: "location.protocol + '//' + location.host + location.pathname.replace(/\\/$/,'') + '/' + require('!!file-loader?name=[path][name].[ext]!' + ",
|
||||||
flags: "g",
|
flags: "g",
|
||||||
}, {
|
}, {
|
||||||
search: "require\\.__\\$__nodeRequire",
|
search: "require\\.__\\$__nodeRequire",
|
||||||
|
|||||||
Reference in New Issue
Block a user