Archived
1
0

Add base path to update endpoint from VS Code

This will make it work regardless of what the current URL happens to be.

Also move the telemetry setting into the options since we might as well
make use of it seeing as how we have to parse it for the base path
anyway.
This commit is contained in:
Asher
2020-03-13 16:44:56 -05:00
parent a00fa85d77
commit 6cb228037b
4 changed files with 75 additions and 25 deletions

View File

@ -8,6 +8,7 @@ import * as path from "path"
import * as url from "url"
import {
CodeServerMessage,
Options,
StartPath,
VscodeMessage,
VscodeOptions,
@ -205,8 +206,11 @@ export class VscodeHttpProvider extends HttpProvider {
.replace(`"{{PRODUCT_CONFIGURATION}}"`, `'${JSON.stringify(options.productConfiguration)}'`)
.replace(`"{{WORKBENCH_WEB_CONFIGURATION}}"`, `'${JSON.stringify(options.workbenchWebConfiguration)}'`)
.replace(`"{{NLS_CONFIGURATION}}"`, `'${JSON.stringify(options.nlsConfiguration)}'`)
.replace("{{DISABLE_TELEMETRY}}", this.args["disable-telemetry"] ? "true" : "false")
return this.replaceTemplates(route, response)
return this.replaceTemplates<Options>(route, response, {
base: this.base(route),
commit: this.options.commit,
disableTelemetry: !!this.args["disable-telemetry"],
})
}
/**