Add telemetry and option to disable (#519)
* Add telemetry and option to disable * Update readme and getting-started guide * Update lockfile * Update getting started guide
This commit is contained in:
@ -9,7 +9,7 @@
|
||||
"build:binary": "ts-node scripts/nbin.ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@coder/nbin": "^1.1.1",
|
||||
"@coder/nbin": "^1.1.2",
|
||||
"commander": "^2.19.0",
|
||||
"express": "^4.16.4",
|
||||
"express-static-gzip": "^1.1.3",
|
||||
|
@ -29,6 +29,7 @@ commander.version(process.env.VERSION || "development")
|
||||
.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("--disable-telemetry", "Disables ALL telemetry.", false)
|
||||
.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.")
|
||||
@ -52,6 +53,7 @@ const bold = (text: string | number): string | number => {
|
||||
readonly allowHttp: boolean;
|
||||
readonly host: string;
|
||||
readonly port: number;
|
||||
readonly disableTelemetry: boolean;
|
||||
|
||||
readonly userDataDir?: string;
|
||||
readonly extensionsDir?: string;
|
||||
@ -68,6 +70,10 @@ const bold = (text: string | number): string | number => {
|
||||
readonly extraArgs?: string;
|
||||
};
|
||||
|
||||
if (options.disableTelemetry) {
|
||||
process.env.DISABLE_TELEMETRY = "true";
|
||||
}
|
||||
|
||||
// Commander has an exception for `--no` prefixes. Here we'll adjust that.
|
||||
// tslint:disable-next-line:no-any
|
||||
const noAuthValue = (commander as any).auth;
|
||||
|
@ -92,6 +92,7 @@ export class SharedProcess {
|
||||
env: {
|
||||
VSCODE_ALLOW_IO: "true",
|
||||
VSCODE_LOGS: process.env.VSCODE_LOGS,
|
||||
DISABLE_TELEMETRY: process.env.DISABLE_TELEMETRY,
|
||||
},
|
||||
}, this.userDataDir);
|
||||
this.activeProcess = activeProcess;
|
||||
|
@ -7,10 +7,10 @@
|
||||
resolved "https://registry.yarnpkg.com/@coder/logger/-/logger-1.0.3.tgz#e0e1ae5496fde5a3c6ef3d748fdfb26a55add8b8"
|
||||
integrity sha512-1o5qDZX2VZUNnzgz5KfAdMnaqaX6FNeTs0dUdg73MRHfQW94tFTIryFC1xTTCuzxGDjVHOHkaUAI4uHA2bheOA==
|
||||
|
||||
"@coder/nbin@^1.1.1":
|
||||
version "1.1.1"
|
||||
resolved "https://registry.yarnpkg.com/@coder/nbin/-/nbin-1.1.1.tgz#0690928fb1306ee2a84120c8ae8ba221c338b190"
|
||||
integrity sha512-SDlW0dNw6N5Ge3XlI6nbQV7G7dvTYqxzhN0douJlD56upaU4C130g0FCrhLPU/H4gT3SdZVfWoWc4AGv2fhZZw==
|
||||
"@coder/nbin@^1.1.2":
|
||||
version "1.1.2"
|
||||
resolved "https://registry.yarnpkg.com/@coder/nbin/-/nbin-1.1.2.tgz#3af9e4368f37532da446c7c291d476bb52de995d"
|
||||
integrity sha512-MkwKpmu1SU9wkBwQ+bZVU2nPzENWUa3Isut9osVq3LG+udovsk+k5c5rjfJ1q8cf4km5snjOSYiulug3n9sdgw==
|
||||
dependencies:
|
||||
"@coder/logger" "^1.0.3"
|
||||
fs-extra "^7.0.1"
|
||||
|
Reference in New Issue
Block a user