Compare commits

..

16 Commits

Author SHA1 Message Date
Kyle Carberry
2bc6e1a457 Fix clipboard pasting 2019-04-22 20:20:48 -04:00
Kyle Carberry
e61ea796c6 Bundle grammars (#563) 2019-04-22 12:51:05 -05:00
Kyle Carberry
d073622629 Add --socket flag (#564)
* Add --socket flag

* Add msg for already bound socket
2019-04-22 12:47:27 -05:00
Kyle Carberry
5f40ebb845 Update wording for sshcode 2019-04-19 21:22:00 -04:00
Kyle Carberry
c56e2797cc Add sshcode to the readme 2019-04-19 21:20:31 -04:00
Kyle Carberry
166efcb17e Hide titlebar controls and fix menubar toggle (#550) 2019-04-19 19:54:50 -05:00
Kyle Carberry
206e107a9a Merge branch 'master' of github.com:codercom/code-server 2019-04-19 20:03:54 -04:00
Kyle Carberry
12c8b5d337 Closes #466 2019-04-19 20:03:52 -04:00
Asher
4aa20fd864 Fix require.toUrl on the Node side
- Fixes #542
2019-04-19 13:32:10 -05:00
Illia Poplawski
0cd4e46055 Fix self hosted flags (#523)
* Remove -h flag for help information

* Add tab after removing -h option

* Remove spaces after --user-data-dir option to line up with other menu items
2019-04-18 13:02:29 -05:00
Asher
f51823b51f Fix open dialog
- Fixes #508
2019-04-18 12:08:44 -05:00
Asher
55bfeab208 Deprecate password flag in favor of an environment variable 2019-04-18 11:10:55 -05:00
Asher
309d15cefd Use file/folder open commands for all operating systems
Mac was using its own thing.

- Fixes #535
- Fixes #501
2019-04-18 10:50:23 -05:00
Kyle Carberry
95006a435a Merge branch 'master' of github.com:codercom/code-server 2019-04-17 21:01:25 -04:00
Kyle Carberry
4d576ab4d4 Trigger configuration update when loaded 2019-04-17 21:01:23 -04:00
Asher
d5b03ef60e Remove version from Docker command 2019-04-17 17:38:22 -05:00
10 changed files with 159 additions and 47 deletions

View File

@@ -9,7 +9,7 @@
Try it out:
```bash
docker run -it -p 127.0.0.1:8443:8443 -v "${PWD}:/home/coder/project" codercom/code-server:1.621 --allow-http --no-auth
docker run -it -p 127.0.0.1:8443:8443 -v "${PWD}:/home/coder/project" codercom/code-server --allow-http --no-auth
```
- Code on your Chromebook, tablet, and laptop with a consistent dev environment.
@@ -23,6 +23,10 @@ docker run -it -p 127.0.0.1:8443:8443 -v "${PWD}:/home/coder/project" codercom/c
## Getting Started
### Run over SSH
Use [sshcode](https://github.com/codercom/sshcode) for a simple setup.
### Docker
See docker oneliner mentioned above. Dockerfile is at [/Dockerfile](/Dockerfile).

View File

@@ -43,7 +43,7 @@ Options:
--cert <value>
--cert-key <value>
-e, --extensions-dir <dir> Set the root path for extensions.
-d --user-data-dir <dir> Specifies the directory that user data is kept in, useful when running as root.
-d --user-data-dir <dir> Specifies the directory that user data is kept in, useful when running as root.
--data-dir <value> DEPRECATED: Use '--user-data-dir' instead. Customize where user-data is stored.
-h, --host <value> Customize the hostname. (default: "0.0.0.0")
-o, --open Open in the browser on startup.
@@ -52,7 +52,7 @@ Options:
-H, --allow-http Allow http connections.
-P, --password <value> Specify a password for authentication.
--disable-telemetry Disables ALL telemetry.
-h, --help output usage information
--help output usage information
```
### Data Directory

View File

@@ -25,11 +25,12 @@ commander.version(process.env.VERSION || "development")
.option("--data-dir <value>", "DEPRECATED: Use '--user-data-dir' instead. Customize where user-data is stored.")
.option("-h, --host <value>", "Customize the hostname.", "0.0.0.0")
.option("-o, --open", "Open in the browser on startup.", false)
.option("-p, --port <number>", "Port to bind on.", parseInt(process.env.PORT, 10) || 8443)
.option("-p, --port <number>", "Port to bind on.", parseInt(process.env.PORT!, 10) || 8443)
.option("-N, --no-auth", "Start without requiring authentication.", undefined)
.option("-H, --allow-http", "Allow http connections.", false)
.option("-P, --password <value>", "Specify a password for authentication.")
.option("-P, --password <value>", "DEPRECATED: Use the PASSWORD environment variable instead. Specify a password for authentication.")
.option("--disable-telemetry", "Disables ALL telemetry.", false)
.option("--socket <value>", "Listen on a UNIX socket. Host and port will be ignored when set.")
.option("--install-extension <value>", "Install an extension by its ID.")
.option("--bootstrap-fork <name>", "Used for development. Never set.")
.option("--extra-args <args>", "Used for development. Never set.")
@@ -63,6 +64,7 @@ const bold = (text: string | number): string | number => {
readonly open?: boolean;
readonly cert?: string;
readonly certKey?: string;
readonly socket?: string;
readonly installExtension?: string;
@@ -209,7 +211,11 @@ const bold = (text: string | number): string | number => {
}
});
let password = options.password;
if (options.password) {
logger.warn('"--password" is deprecated. Use the PASSWORD environment variable instead.');
}
let password = options.password || process.env.PASSWORD;
if (!password) {
// Generate a random password with a length of 24.
const buffer = Buffer.alloc(12);
@@ -263,7 +269,11 @@ const bold = (text: string | number): string | number => {
});
logger.info("Starting webserver...", field("host", options.host), field("port", options.port));
app.server.listen(options.port, options.host);
if (options.socket) {
app.server.listen(options.socket);
} else {
app.server.listen(options.port, options.host);
}
let clientId = 1;
app.wss.on("connection", (ws, req) => {
const id = clientId++;
@@ -280,7 +290,11 @@ const bold = (text: string | number): string | number => {
});
app.wss.on("error", (err: NodeJS.ErrnoException) => {
if (err.code === "EADDRINUSE") {
logger.error(`Port ${bold(options.port)} is in use. Please free up port ${options.port} or specify a different port with the -p flag`);
if (options.socket) {
logger.error(`Socket ${bold(options.socket)} is in use. Please specify a different socket.`);
} else {
logger.error(`Port ${bold(options.port)} is in use. Please free up port ${options.port} or specify a different port with the -p flag`);
}
process.exit(1);
}
});

View File

@@ -270,9 +270,12 @@ class Dialog {
return;
}
// If it's a directory, we want to navigate to it. If it's a file, then we
// only want to open it if opening files is supported.
if (element.isDirectory) {
this.path = element.fullPath;
} else if (!(this.options as OpenDialogOptions).properties.openDirectory) {
} else if ((this.options as OpenDialogOptions).properties.openFile) {
this.selectEmitter.emit(element.fullPath);
}
});
@@ -288,16 +291,18 @@ class Dialog {
});
buttonsNode.appendChild(cancelBtn);
const confirmBtn = document.createElement("button");
const openFile = (this.options as OpenDialogOptions).properties.openFile;
confirmBtn.innerText = openFile ? "Open" : "Confirm";
const openDirectory = (this.options as OpenDialogOptions).properties.openDirectory;
confirmBtn.innerText = this.options.buttonLabel || "Confirm";
confirmBtn.addEventListener("click", () => {
if (this._path && !openFile) {
if (this._path && openDirectory) {
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) {
// Disable if we can't open directories, otherwise you can open a directory
// as a file which won't work. This is because our button currently just
// always opens whatever directory is opened and will not open selected
// files. (A single click on a file is used to open it instead.)
if (!openDirectory) {
confirmBtn.disabled = true;
}
buttonsNode.appendChild(confirmBtn);
@@ -407,8 +412,9 @@ class Dialog {
isDirectory: stat.isDirectory(),
lastModified: stat.mtime.toDateString(),
size: stat.size,
// If we are opening a directory, show files as disabled.
isDisabled: !stat.isDirectory() && (this.options as OpenDialogOptions).properties.openDirectory,
// If we can't open files, show them as disabled.
isDisabled: !stat.isDirectory()
&& !(this.options as OpenDialogOptions).properties.openFile,
}));
}
}

View File

@@ -2,6 +2,17 @@ import * as vscodeTextmate from "../../../../lib/vscode/node_modules/vscode-text
const target = vscodeTextmate as typeof vscodeTextmate;
const ctx = (require as any).context("../../../../lib/extensions", true, /.*\.tmLanguage.json$/);
// Maps grammar scope to loaded grammar
const scopeToGrammar = {} as any;
ctx.keys().forEach((key: string) => {
const value = ctx(key);
if (value.scopeName) {
scopeToGrammar[value.scopeName] = value;
}
});
target.Registry = class Registry extends vscodeTextmate.Registry {
public constructor(opts: vscodeTextmate.RegistryOptions) {
super({
@@ -21,6 +32,13 @@ target.Registry = class Registry extends vscodeTextmate.Registry {
}).catch(reason => rej(reason));
});
},
loadGrammar: async (scopeName: string) => {
if (scopeToGrammar[scopeName]) {
return scopeToGrammar[scopeName];
}
return opts.loadGrammar(scopeName);
},
});
}
};

View File

@@ -142,8 +142,8 @@ export class WindowsService implements IWindowsService {
return [await showOpenDialog({
...(options || {}),
properties: {
openDirectory: true,
openFile: true,
openDirectory: options && options.properties && options.properties.includes("openDirectory") || false,
openFile: options && options.properties && options.properties.includes("openFile") || false,
},
})];
}

View File

@@ -53,3 +53,7 @@
width: 56px !important;
margin-right: 4px;
}
.window-controls-container {
display: none !important;
}

View File

@@ -98,6 +98,14 @@ index f68ae90..d6b9ea7 100644
@@ -24 +24 @@ import { disposableTimeout } from 'vs/base/common/async';
-import { isMacintosh } from 'vs/base/common/platform';
+import { isMacintosh } from 'vs/base/browser/browser';
diff --git a/src/vs/base/node/config.ts b/src/vs/base/node/config.ts
index 5ef2193..a232b6c 100644
--- a/src/vs/base/node/config.ts
+++ b/src/vs/base/node/config.ts
@@ -79,0 +80,3 @@ export class ConfigWatcher<T> implements IConfigWatcher<T>, IDisposable {
+ } else {
+ this.cache = config; // update config
+ this._onDidUpdateConfiguration.fire({ config });
diff --git a/src/vs/base/parts/quickopen/browser/quickOpenWidget.ts b/src/vs/base/parts/quickopen/browser/quickOpenWidget.ts
index 74148e4..041205b 100644
--- a/src/vs/base/parts/quickopen/browser/quickOpenWidget.ts
@@ -167,7 +175,7 @@ index 1f8b17a..2a875f9 100644
+ await cli.main(args);
+ return; // Always just do this for now.
diff --git a/src/vs/editor/browser/config/configuration.ts b/src/vs/editor/browser/config/configuration.ts
index f97a692..0206957 100644
index f97a692..8059a67 100644
--- a/src/vs/editor/browser/config/configuration.ts
+++ b/src/vs/editor/browser/config/configuration.ts
@@ -10 +9,0 @@ import { Disposable } from 'vs/base/common/lifecycle';
@@ -179,9 +187,6 @@ index f97a692..0206957 100644
@@ -367 +366 @@ export class Configuration extends CommonEditorConfiguration {
- if (platform.isMacintosh) {
+ if (browser.isMacintosh) {
@@ -378 +377 @@ export class Configuration extends CommonEditorConfiguration {
- emptySelectionClipboard: browser.isWebKit || browser.isFirefox,
+ emptySelectionClipboard: false, // browser.isWebKit || browser.isFirefox,
diff --git a/src/vs/editor/browser/controller/mouseHandler.ts b/src/vs/editor/browser/controller/mouseHandler.ts
index b3b4472..f888d63 100644
--- a/src/vs/editor/browser/controller/mouseHandler.ts
@@ -242,32 +247,57 @@ index c69ea3f..b8d87f7 100644
-const GOLDEN_LINE_HEIGHT_RATIO = platform.isMacintosh ? 1.5 : 1.35;
+const GOLDEN_LINE_HEIGHT_RATIO = browser.isMacintosh ? 1.5 : 1.35;
diff --git a/src/vs/editor/contrib/clipboard/clipboard.ts b/src/vs/editor/contrib/clipboard/clipboard.ts
index 990be3a..8a326c6 100644
index 990be3a..4bec789 100644
--- a/src/vs/editor/contrib/clipboard/clipboard.ts
+++ b/src/vs/editor/contrib/clipboard/clipboard.ts
@@ -29 +29,2 @@ const supportsCopyWithSyntaxHighlighting = (supportsCopy && !browser.isEdgeOrIE)
@@ -18,0 +19 @@ import { KeybindingWeight } from 'vs/platform/keybinding/common/keybindingsRegis
+import { clipboard } from 'electron';
@@ -29 +30,2 @@ const supportsCopyWithSyntaxHighlighting = (supportsCopy && !browser.isEdgeOrIE)
-const supportsPaste = (platform.isNative || (!browser.isChrome && document.queryCommandSupported('paste')));
+// const supportsPaste = (platform.isNative || (!browser.isChrome && document.queryCommandSupported('paste')));
+const supportsPaste = true;
@@ -176,0 +178 @@ class ExecCommandPasteAction extends ExecCommandAction {
@@ -54,0 +57 @@ abstract class ExecCommandAction extends EditorAction {
+ console.log(document.activeElement!.cloneNode(true));
@@ -71 +74 @@ class ExecCommandCutAction extends ExecCommandAction {
- kbOpts = null;
+ // kbOpts = null;
@@ -119 +122 @@ class ExecCommandCopyAction extends ExecCommandAction {
- kbOpts = null;
+ // kbOpts = null;
@@ -174 +177 @@ class ExecCommandPasteAction extends ExecCommandAction {
- kbOpts = null;
+ // kbOpts = null;
@@ -176,0 +180 @@ class ExecCommandPasteAction extends ExecCommandAction {
+ const { workbench } = require('vs/../../../../packages/vscode/src/workbench') as typeof import ('vs/../../../../packages/vscode/src/workbench');
@@ -181 +183 @@ class ExecCommandPasteAction extends ExecCommandAction {
@@ -181 +185 @@ class ExecCommandPasteAction extends ExecCommandAction {
- precondition: EditorContextKeys.writable,
+ precondition: (require('vs/platform/contextkey/common/contextkey') as typeof import('vs/platform/contextkey/common/contextkey')).ContextKeyExpr.and(EditorContextKeys.writable, workbench.clipboardContextKey),
@@ -191 +193,2 @@ class ExecCommandPasteAction extends ExecCommandAction {
@@ -191 +195,2 @@ class ExecCommandPasteAction extends ExecCommandAction {
- order: 3
+ order: 3,
+ when: workbench.clipboardContextKey,
@@ -194,0 +198,14 @@ class ExecCommandPasteAction extends ExecCommandAction {
@@ -194,0 +200,26 @@ class ExecCommandPasteAction extends ExecCommandAction {
+
+ public async run(accessor, editor: ICodeEditor): Promise<void> {
+ if (editor instanceof (require('vs/editor/browser/widget/codeEditorWidget') as typeof import('vs/editor/browser/widget/codeEditorWidget')).CodeEditorWidget) {
+ try {
+ editor.trigger('', (require('vs/editor/common/editorCommon') as typeof import ('vs/editor/common/editorCommon')).Handler.Paste, {
+ text: await (require('vs/../../../../packages/vscode/src/workbench') as typeof import ('vs/../../../../packages/vscode/src/workbench')).workbench.clipboardText,
+ editor.focus();
+ const textInput = document.activeElement! as HTMLTextAreaElement;
+ const dataTransfer = new DataTransfer();
+ const value = await clipboard.readText();
+ dataTransfer.setData("text/plain", value);
+ const pasteEvent = new ClipboardEvent("paste", {
+ clipboardData: dataTransfer,
+ });
+ textInput.dispatchEvent(pasteEvent);
+ } catch (ex) {
+ super.run(accessor, editor);
+ try {
+ editor.trigger('', (require('vs/editor/common/editorCommon') as typeof import ('vs/editor/common/editorCommon')).Handler.Paste, {
+ text: await (require('vs/../../../../packages/vscode/src/workbench') as typeof import ('vs/../../../../packages/vscode/src/workbench')).workbench.clipboardText,
+ });
+ } catch (ex) {
+ super.run(accessor, editor);
+ }
+ }
+ } else {
+ super.run(accessor, editor);
@@ -390,19 +420,35 @@ index 7b6ad89..3190356 100644
- return;
+ return (require('vs/../../../../packages/vscode/src/workbench') as typeof import ('vs/../../../../packages/vscode/src/workbench')).workbench.handleDrop(event, resolveTargetGroup, afterDrop, targetIndex);
diff --git a/src/vs/workbench/browser/layout.ts b/src/vs/workbench/browser/layout.ts
index c25c940..9f11d98 100644
index c25c940..f2004f8 100644
--- a/src/vs/workbench/browser/layout.ts
+++ b/src/vs/workbench/browser/layout.ts
@@ -12 +12 @@ import { Registry } from 'vs/platform/registry/common/platform';
-import { isWindows, isLinux, isMacintosh } from 'vs/base/common/platform';
+import { isWindows, isLinux, isMacintosh, isNative, isWeb } from 'vs/base/common/platform';
+import { isWindows, isLinux, isMacintosh, isNative } from 'vs/base/common/platform';
@@ -210 +210 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi
- if ((isWindows || isLinux) && getTitleBarStyle(this.configurationService, this.environmentService) === 'custom') {
+ if ((isWeb || isWindows || isLinux) && getTitleBarStyle(this.configurationService, this.environmentService) === 'custom') {
@@ -535 +535 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi
+ // if ((isWeb || isWindows || isLinux) && getTitleBarStyle(this.configurationService, this.environmentService) === 'custom') {
@@ -212 +212 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi
- }
+ // }
@@ -219 +219 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi
- if (this.state.fullscreen && (this.state.menuBar.visibility === 'toggle' || this.state.menuBar.visibility === 'default')) {
+ if ((this.state.menuBar.visibility === 'toggle' || this.state.menuBar.visibility === 'default')) {
@@ -531 +531,5 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi
- if (getTitleBarStyle(this.configurationService, this.environmentService) === 'native') {
+ if (this.state.menuBar.visibility === 'hidden') {
+ return false;
+ } else if (this.state.menuBar.visibility === 'toggle') {
+ return this.state.menuBar.toggled;
+ } else if (getTitleBarStyle(this.configurationService, this.environmentService) === 'native') {
@@ -535 +539 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi
- } else if (isMacintosh) {
+ } else if (isNative && isMacintosh) {
@@ -567 +567 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi
@@ -539,2 +542,0 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi
- } else if (this.state.menuBar.visibility === 'toggle' || this.state.menuBar.visibility === 'default') {
- return this.state.menuBar.toggled;
@@ -567 +569 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi
- if (isMacintosh || this.state.menuBar.visibility === 'hidden') {
+ if ((isNative && isMacintosh) || this.state.menuBar.visibility === 'hidden') {
diff --git a/src/vs/workbench/browser/legacyLayout.ts b/src/vs/workbench/browser/legacyLayout.ts
@@ -514,7 +560,7 @@ index a822341..43b882a 100644
- if (!isMacintosh && this.currentTitlebarStyleSetting === 'custom') {
+ if (!(isNative && isMacintosh) && this.currentTitlebarStyleSetting === 'custom') {
diff --git a/src/vs/workbench/browser/parts/titlebar/titlebarPart.ts b/src/vs/workbench/browser/parts/titlebar/titlebarPart.ts
index 028f375..4bfe956 100644
index 028f375..f740471 100644
--- a/src/vs/workbench/browser/parts/titlebar/titlebarPart.ts
+++ b/src/vs/workbench/browser/parts/titlebar/titlebarPart.ts
@@ -11 +11 @@ import { ITitleService, ITitleProperties } from 'vs/workbench/services/title/com
@@ -528,7 +574,10 @@ index 028f375..4bfe956 100644
+ if (!(isNative && isMacintosh)) {
@@ -343 +343 @@ export class TitlebarPart extends Part implements ITitleService {
- if (!isMacintosh) {
+ if (!(isNative && isMacintosh)) {
+ // if (!(isNative && isMacintosh)) {
@@ -346 +346 @@ export class TitlebarPart extends Part implements ITitleService {
- }
+ // }
@@ -549 +549 @@ export class TitlebarPart extends Part implements ITitleService {
- if (!isMacintosh &&
+ if (!(isNative && isMacintosh) &&
@@ -744,11 +793,14 @@ index 1f8088e..f5b0551 100644
- included: platform.isMacintosh
+ included: platform.isNative && platform.isMacintosh
diff --git a/src/vs/workbench/contrib/terminal/browser/terminal.contribution.ts b/src/vs/workbench/contrib/terminal/browser/terminal.contribution.ts
index 24ba122..fca7faf 100644
index 24ba122..3ab8804 100644
--- a/src/vs/workbench/contrib/terminal/browser/terminal.contribution.ts
+++ b/src/vs/workbench/contrib/terminal/browser/terminal.contribution.ts
@@ -12,0 +13 @@ import * as nls from 'vs/nls';
+import * as browser from 'vs/base/browser/browser';
@@ -185 +186 @@ configurationRegistry.registerConfiguration({
- default: 'auto',
+ default: browser.isSafari ? 'dom' : 'auto',
@@ -196 +197 @@ configurationRegistry.registerConfiguration({
- default: platform.isMacintosh ? 'selectWord' : platform.isWindows ? 'copyPaste' : 'default',
+ default: browser.isMacintosh ? 'selectWord' : browser.isWindows ? 'copyPaste' : 'default',
@@ -877,13 +929,19 @@ 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: 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
index 71bc992..97cbb71 100644
index 71bc992..a76dad4 100644
--- a/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';
-import { isWindows, isLinux, isMacintosh } from 'vs/base/common/platform';
+import { isNative, isWeb } from 'vs/base/common/platform';
+import { isMacintosh, isWindows, isLinux } from 'vs/base/browser/browser';
@@ -37 +38 @@ import { LogStorageAction } from 'vs/platform/storage/node/storageService';
- if (isMacintosh) {
+ if (isNative && isMacintosh) {
@@ -225 +226 @@ import { LogStorageAction } from 'vs/platform/storage/node/storageService';
- if (isMacintosh) {
+ if (isNative && isMacintosh) {
@@ -306 +307 @@ import { LogStorageAction } from 'vs/platform/storage/node/storageService';
- when: IsMacContext.toNegated()
+ // when: IsMacContext.toNegated()
@@ -899,8 +957,10 @@ index 71bc992..97cbb71 100644
@@ -633 +634 @@ import { LogStorageAction } from 'vs/platform/storage/node/storageService';
- 'included': isWindows || isLinux
+ 'included': isWeb || isWindows || isLinux
@@ -650 +651 @@ import { LogStorageAction } from 'vs/platform/storage/node/storageService';
@@ -649,2 +650,2 @@ import { LogStorageAction } from 'vs/platform/storage/node/storageService';
- 'enum': ['native', 'custom'],
- 'default': isLinux ? 'native' : 'custom',
+ 'enum': ['custom'],
+ 'default': isNative && isLinux ? 'native' : 'custom',
@@ -659 +660 @@ import { LogStorageAction } from 'vs/platform/storage/node/storageService';
- 'included': isMacintosh && parseFloat(os.release()) >= 16 // Minimum: macOS Sierra (10.12.x = darwin 16.x)

View File

@@ -24,11 +24,14 @@ module.exports = (options = {}) => ({
test: /\.(j|t)s/,
options: {
multiple: [{
// These will be handled by file-loader. We need the location because
// they are parsed as URIs and will throw errors if not fully formed.
// The !! prefix causes it to ignore other loaders (doesn't work).
// These will be handled by file-loader. Must be a fully formed URI.
// The !! prefix causes it to ignore other loaders.
search: "require\\.toUrl\\(",
replace: "location.protocol + '//' + location.host + location.pathname.replace(/\\/$/,'') + '/' + require('!!file-loader?name=[path][name].[ext]!' + ",
replace: `${
options.node
? "'file://'"
: "location.protocol + '//' + location.host + location.pathname.replace(/\\/$/,'')"
} + '/' + require('!!file-loader?name=[path][name].[ext]!' + `,
flags: "g",
}, {
search: "require\\.__\\$__nodeRequire",

View File

@@ -1,7 +1,10 @@
const merge = require("webpack-merge");
module.exports = (options = {}) => merge(
require("./webpack.general.config")(options), {
require("./webpack.general.config")({
...options,
node: true,
}), {
devtool: "none",
mode: "production",
target: "node",