Archived
1
0

Disable automatic updates

This commit is contained in:
Anmol Sethi 2020-05-10 02:23:41 -04:00
parent 00d164b67f
commit 4f67f4e096
No known key found for this signature in database
GPG Key ID: 8CEF1878FF10ADEB
2 changed files with 2 additions and 4 deletions

View File

@ -25,7 +25,6 @@ export interface Args extends VsArgs {
readonly auth?: AuthType readonly auth?: AuthType
readonly cert?: OptionalString readonly cert?: OptionalString
readonly "cert-key"?: string readonly "cert-key"?: string
readonly "disable-updates"?: boolean
readonly "disable-telemetry"?: boolean readonly "disable-telemetry"?: boolean
readonly help?: boolean readonly help?: boolean
readonly host?: string readonly host?: string
@ -90,7 +89,6 @@ const options: Options<Required<Args>> = {
description: "Path to certificate. Generated if no path is provided.", description: "Path to certificate. Generated if no path is provided.",
}, },
"cert-key": { type: "string", path: true, description: "Path to certificate key when using non-generated cert." }, "cert-key": { type: "string", path: true, description: "Path to certificate key when using non-generated cert." },
"disable-updates": { type: "boolean", description: "Disable automatic updates." },
"disable-telemetry": { type: "boolean", description: "Disable telemetry." }, "disable-telemetry": { type: "boolean", description: "Disable telemetry." },
help: { type: "boolean", short: "h", description: "Show this output." }, help: { type: "boolean", short: "h", description: "Show this output." },
json: { type: "boolean" }, json: { type: "boolean" },

View File

@ -74,7 +74,7 @@ const main = async (args: Args): Promise<void> => {
const httpServer = new HttpServer(options) const httpServer = new HttpServer(options)
const vscode = httpServer.registerHttpProvider("/", VscodeHttpProvider, args) const vscode = httpServer.registerHttpProvider("/", VscodeHttpProvider, args)
const api = httpServer.registerHttpProvider("/api", ApiHttpProvider, httpServer, vscode, args["user-data-dir"]) const api = httpServer.registerHttpProvider("/api", ApiHttpProvider, httpServer, vscode, args["user-data-dir"])
const update = httpServer.registerHttpProvider("/update", UpdateHttpProvider, !args["disable-updates"]) const update = httpServer.registerHttpProvider("/update", UpdateHttpProvider, true)
httpServer.registerHttpProvider("/proxy", ProxyHttpProvider) httpServer.registerHttpProvider("/proxy", ProxyHttpProvider)
httpServer.registerHttpProvider("/login", LoginHttpProvider) httpServer.registerHttpProvider("/login", LoginHttpProvider)
httpServer.registerHttpProvider("/static", StaticHttpProvider) httpServer.registerHttpProvider("/static", StaticHttpProvider)
@ -114,7 +114,7 @@ const main = async (args: Args): Promise<void> => {
httpServer.proxyDomains.forEach((domain) => logger.info(` - *.${domain}`)) httpServer.proxyDomains.forEach((domain) => logger.info(` - *.${domain}`))
} }
logger.info(`Automatic updates are ${update.enabled ? "enabled" : "disabled"}`) // logger.info(`Automatic updates are ${update.enabled ? "enabled" : "disabled"}`)
if (serverAddress && !options.socket && args.open) { if (serverAddress && !options.socket && args.open) {
// The web socket doesn't seem to work if browsing with 0.0.0.0. // The web socket doesn't seem to work if browsing with 0.0.0.0.