From aa089bf23ba3d1ef89b815bf8c8c0f8c554cdba0 Mon Sep 17 00:00:00 2001 From: cjihrig Date: Thu, 15 Nov 2018 15:47:44 -0500 Subject: [PATCH 1/3] cli: add missing env vars to --help This adds NODE_TLS_REJECT_UNAUTHORIZED, SSL_CERT_DIR, SSL_CERT_FILE, and UV_THREADPOOL_SIZE to the --help menu. PR-URL: https://github.com/nodejs/node/pull/24383 Reviewed-By: Anna Henningsen Reviewed-By: Sam Roberts Reviewed-By: Richard Lau Reviewed-By: Ouyang Yadong Reviewed-By: Weijia Wang Reviewed-By: Franziska Hinkelmann Reviewed-By: Vse Mozhet Byt Reviewed-By: Michael Dawson --- lib/internal/print_help.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/internal/print_help.js b/lib/internal/print_help.js index d9ab3c1ad84e90..9081a09e4fb027 100644 --- a/lib/internal/print_help.js +++ b/lib/internal/print_help.js @@ -29,9 +29,17 @@ const envVars = new Map([ 'of stderr' }], ['NODE_REPL_HISTORY', { helpText: 'path to the persistent REPL ' + 'history file' }], + ['NODE_TLS_REJECT_UNAUTHORIZED', { helpText: 'set to 0 to disable TLS ' + + 'certificate validation' }], ['NODE_V8_COVERAGE', { helpText: 'directory to output v8 coverage JSON ' + 'to' }], - ['OPENSSL_CONF', { helpText: 'load OpenSSL configuration from file' }] + ['OPENSSL_CONF', { helpText: 'load OpenSSL configuration from file' }], + ['SSL_CERT_DIR', { helpText: 'sets OpenSSL\'s directory of trusted ' + + 'certificates when used in conjunction with --use-openssl-ca' }], + ['SSL_CERT_FILE', { helpText: 'sets OpenSSL\'s trusted certificate file ' + + 'when used in conjunction with --use-openssl-ca' }], + ['UV_THREADPOOL_SIZE', { helpText: 'sets the number of threads used in ' + + 'libuv\'s threadpool' }] ].concat(hasIntl ? [ ['NODE_ICU_DATA', { helpText: 'data path for ICU (Intl object) data' + hasSmallICU ? '' : ' (will extend linked-in data)' }] From 79a49f14563d9a07853ae53f5482c75c572dae7a Mon Sep 17 00:00:00 2001 From: cjihrig Date: Thu, 15 Nov 2018 16:33:23 -0500 Subject: [PATCH 2/3] doc: add missing env variables to man page This commit adds the missing environment variables NODE_DEBUG_NATIVE, NODE_PRESERVE_SYMLINKS, NODE_TLS_REJECT_UNAUTHORIZED, NODE_V8_COVERAGE, and UV_THREADPOOL_SIZE to the man page. PR-URL: https://github.com/nodejs/node/pull/24383 Reviewed-By: Anna Henningsen Reviewed-By: Sam Roberts Reviewed-By: Richard Lau Reviewed-By: Ouyang Yadong Reviewed-By: Weijia Wang Reviewed-By: Franziska Hinkelmann Reviewed-By: Vse Mozhet Byt Reviewed-By: Michael Dawson --- doc/node.1 | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/doc/node.1 b/doc/node.1 index d3c66d08cf3448..96fcd3a9f4d506 100644 --- a/doc/node.1 +++ b/doc/node.1 @@ -283,6 +283,9 @@ Print node's version. .It Ev NODE_DEBUG Ar modules... Comma-separated list of core modules that should print debug information. . +.It Ev NODE_DEBUG_NATIVE Ar modules... +Comma-separated list of C++ core modules that should print debug information. +. .It Ev NODE_DISABLE_COLORS When set to .Ar 1 , @@ -331,6 +334,11 @@ When set to .Ar 1 , emit pending deprecation warnings. . +.It Ev NODE_PRESERVE_SYMLINKS +When set to +.Ar 1 , +the module loader preserves symbolic links when resolving and caching modules. +. .It Ev NODE_REDIRECT_WARNINGS Ar file Write process warnings to the given .Ar file @@ -347,6 +355,15 @@ The default path is which is overridden by this variable. Setting the value to an empty string ("" or " ") will disable persistent REPL history. . +.It Ev NODE_TLS_REJECT_UNAUTHORIZED +When set to +.Ar 0 , +TLS certificate validation is disabled. +. +.It Ev NODE_V8_COVERAGE Ar dir +When set, Node.js writes JavaScript code coverage information to +.Ar dir . +. .It Ev OPENSSL_CONF Ar file Load an OpenSSL configuration file on startup. Among other uses, this can be used to enable FIPS-compliant crypto if Node.js is built with @@ -365,8 +382,12 @@ is enabled, this overrides and sets OpenSSL's directory containing trusted certi If .Fl -use-openssl-ca is enabled, this overrides and sets OpenSSL's file containing trusted certificates. -.El . +.It Ev UV_THREADPOOL_SIZE Ar size +Sets the number of threads used in libuv's threadpool to +.Ar size . +. +.El .\"===================================================================== .Sh BUGS Bugs are tracked in GitHub Issues: From 399bb3c95af821350774c18f469ab700387f38e1 Mon Sep 17 00:00:00 2001 From: cjihrig Date: Thu, 15 Nov 2018 16:40:06 -0500 Subject: [PATCH 3/3] doc: add NODE_DEBUG_NATIVE to API docs This commit adds the missing environment variable NODE_DEBUG_NATIVE to the CLI API docs. PR-URL: https://github.com/nodejs/node/pull/24383 Reviewed-By: Anna Henningsen Reviewed-By: Sam Roberts Reviewed-By: Richard Lau Reviewed-By: Ouyang Yadong Reviewed-By: Weijia Wang Reviewed-By: Franziska Hinkelmann Reviewed-By: Vse Mozhet Byt Reviewed-By: Michael Dawson --- doc/api/cli.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/doc/api/cli.md b/doc/api/cli.md index 2a3debd1b9661e..3dd9951b4a13a5 100644 --- a/doc/api/cli.md +++ b/doc/api/cli.md @@ -539,6 +539,10 @@ added: v0.1.32 `','`-separated list of core modules that should print debug information. +### `NODE_DEBUG_NATIVE=module[,…]` + +`','`-separated list of core C++ modules that should print debug information. + ### `NODE_DISABLE_COLORS=1`