Skip to content

Commit

Permalink
Merge pull request #1856 from rsteube/environment-node
Browse files Browse the repository at this point in the history
environment: added node
  • Loading branch information
rsteube authored Sep 20, 2023
2 parents cca5ad9 + 12fda31 commit b0a0303
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions pkg/actions/env/node.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
package env

import (
"github.com/rsteube/carapace"
"github.com/rsteube/carapace/pkg/style"
)

func init() {
_bool := carapace.ActionValuesDescribed("0", "disabled", "1", "enabled").StyleF(style.ForKeyword)
knownVariables["node"] = variables{
Condition: checkPath("node"),
Names: map[string]string{
"NODE_DEBUG": "Comma-separated list of core modules that should print debug information",
"NODE_DEBUG_NATIVE": "Comma-separated list of C++ core modules that should print debug information",
"NODE_DISABLE_COLORS": "When set to 1, colors will not be used in the REPL",
"NODE_EXTRA_CA_CERTS": "When set, the well-known “root” CAs will be extended with the extra certificates in file",
"NODE_ICU_DATA": "Data path for ICU (Intl object) data",
"NODE_NO_WARNINGS": "When set to 1, process warnings are silenced",
"NODE_OPTIONS": "A space-separated list of command-line options",
"NODE_PATH": "A colon-separated list of directories prefixed to the module search path",
"NODE_PENDING_DEPRECATION": "When set to 1, emit pending deprecation warnings",
"NODE_PRESERVE_SYMLINKS": "When set to 1, the module loader preserves symbolic links when resolving and caching modules",
"NODE_REDIRECT_WARNINGS": "Write process warnings to the given file instead of printing to stderr",
"NODE_REPL_HISTORY": "Path to the file used to store persistent REPL history",
"NODE_REPL_EXTERNAL_MODULE": "Path to a Node.js module which will be loaded in place of the built-in REPL",
"NODE_SKIP_PLATFORM_CHECK": "When set to 1, the check for a supported platform is skipped during Node.js startup",
"NODE_TLS_REJECT_UNAUTHORIZED": "When set to 0, TLS certificate validation is disabled",
"NODE_V8_COVERAGE": "When set, Node.js writes JavaScript code coverage information to dir",
"OPENSSL_CONF": "Load an OpenSSL configuration file on startup",
"SSL_CERT_DIR": "If --use-openssl-ca is enabled, this overrides and sets OpenSSL's directory containing trusted certificates",
"SSL_CERT_FILE": "If --use-openssl-ca is enabled, this overrides and sets OpenSSL's file containing trusted certificates",
"TZ": "Specify the timezone configuration",
"UV_THREADPOOL_SIZE": "Sets the number of threads used in libuv's threadpool to size",
},
Completion: map[string]carapace.Action{
// TODO more completions
"NODE_DISABLE_COLORS": _bool,
"NODE_NO_WARNINGS": _bool,
"NODE_PATH": carapace.ActionDirectories().List(":"),
"NODE_PENDING_DEPRECATION": _bool,
"NODE_SKIP_PLATFORM_CHECK": _bool,
"NODE_TLS_REJECT_UNAUTHORIZED": _bool,
"SSL_CERT_DIR": carapace.ActionDirectories(),
},
}

}

0 comments on commit b0a0303

Please sign in to comment.