Skip to content

Commit 0131be0

Browse files
authored
add editorWebUrl to tunnelApplicationConfig (microsoft#166872)
* add editorWebUrl to tunnelApplicationConfig * bump distro & compile 'build'
1 parent 857debc commit 0131be0

File tree

7 files changed

+13
-18
lines changed

7 files changed

+13
-18
lines changed

build/azure-pipelines/cli/prepare.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/azure-pipelines/cli/prepare.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ const setLauncherEnvironmentVars = () => {
5050
['VSCODE_CLI_NAME_LONG', product.nameLong],
5151
['VSCODE_CLI_QUALITYLESS_PRODUCT_NAME', product.nameLong.replace(/ - [a-z]+$/i, '')],
5252
['VSCODE_CLI_APPLICATION_NAME', product.applicationName],
53-
['VSCODE_CLI_EDITOR_WEB_URL', product.editorWebUrl],
53+
['VSCODE_CLI_EDITOR_WEB_URL', product.tunnelApplicationConfig?.editorWebUrl],
5454
['VSCODE_CLI_COMMIT', commit],
5555
[
5656
'VSCODE_CLI_WIN32_APP_IDS',

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "code-oss-dev",
33
"version": "1.74.0",
4-
"distro": "22b60ce5f0f5a4db5d17091721f4d84891aec3b8",
4+
"distro": "9a729adfa65f93dfd4fa871a118a494adb07e1b8",
55
"author": {
66
"name": "Microsoft Corporation"
77
},
@@ -237,4 +237,4 @@
237237
"elliptic": "^6.5.3",
238238
"nwmatcher": "^1.4.4"
239239
}
240-
}
240+
}

product.json

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,6 @@
1212
"serverApplicationName": "code-server-oss",
1313
"serverDataFolderName": ".vscode-server-oss",
1414
"tunnelApplicationName": "code-tunnel-oss",
15-
"tunnelApplicationConfig": {
16-
"authenticationProviders": {
17-
"github": {
18-
"scopes": [
19-
"user:email",
20-
"read:org"
21-
]
22-
}
23-
}
24-
},
2515
"win32DirName": "Microsoft Code OSS",
2616
"win32NameVersion": "Microsoft Code OSS",
2717
"win32RegValueName": "CodeOSS",

src/vs/base/common/product.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,10 @@ export interface IProductConfiguration {
133133
readonly serverDataFolderName?: string;
134134

135135
readonly tunnelApplicationName?: string;
136-
readonly tunnelApplicationConfig?: { authenticationProviders: IStringDictionary<{ scopes: string[] }> };
136+
readonly tunnelApplicationConfig?: {
137+
authenticationProviders: IStringDictionary<{ scopes: string[] }>;
138+
editorWebUrl: string;
139+
};
137140

138141
readonly npsSurveyUrl?: string;
139142
readonly cesSurveyUrl?: string;

src/vs/code/node/cli.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@ export async function main(argv: string[]): Promise<any> {
5757
return new Promise((resolve, reject) => {
5858
let tunnelProcess;
5959
if (process.env['VSCODE_DEV']) {
60-
tunnelProcess = spawn('cargo', ['run', '--', 'tunnel', ...argv.slice(5)], { cwd: join(getAppRoot(), 'cli') });
60+
const env = { ...process.env, VSCODE_CLI_EDITOR_WEB_URL: product.tunnelApplicationConfig?.editorWebUrl };
61+
tunnelProcess = spawn('cargo', ['run', '--', 'tunnel', ...argv.slice(5)], { cwd: join(getAppRoot(), 'cli'), env });
6162
} else {
6263
const appPath = process.platform === 'darwin'
6364
// ./Contents/MacOS/Electron => ./Contents/Resources/app/bin/code-tunnel-insiders

src/vs/platform/remoteTunnel/electron-browser/remoteTunnelService.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,8 @@ export class RemoteTunnelService extends Disposable implements IRemoteTunnelServ
222222
if (process.env['VSCODE_DEV']) {
223223
onOutput('Compiling tunnel CLI from sources and run', false);
224224
onOutput(`${logLabel} Spawning: cargo run -- tunnel ${commandArgs.join(' ')}`, false);
225-
tunnelProcess = spawn('cargo', ['run', '--', 'tunnel', ...commandArgs], { cwd: join(this.environmentService.appRoot, 'cli') });
225+
const env = { ...process.env, VSCODE_CLI_EDITOR_WEB_URL: this.productService.tunnelApplicationConfig?.editorWebUrl };
226+
tunnelProcess = spawn('cargo', ['run', '--', 'tunnel', ...commandArgs], { cwd: join(this.environmentService.appRoot, 'cli'), env });
226227
} else {
227228
onOutput('Running tunnel CLI', false);
228229
const tunnelCommand = this.getTunnelCommandLocation();

0 commit comments

Comments
 (0)