@@ -56,6 +56,7 @@ type ENV = Remap<
5656 SOCKET_SECURITY_API_PROXY : string
5757 SOCKET_SECURITY_API_TOKEN : string
5858 SOCKET_SECURITY_GITHUB_PAT : string
59+ TERM : string
5960 XDG_DATA_HOME : string
6061 } >
6162>
@@ -128,6 +129,7 @@ type Constants = Remap<
128129 readonly SOCKET_SECURITY_API_PROXY : 'SOCKET_SECURITY_API_PROXY'
129130 readonly SOCKET_SECURITY_API_TOKEN : 'SOCKET_SECURITY_API_TOKEN'
130131 readonly SOCKET_SECURITY_GITHUB_PAT : 'SOCKET_SECURITY_GITHUB_PAT'
132+ readonly TERM : 'TERM'
131133 readonly VLT : 'vlt'
132134 readonly WITH_SENTRY : 'with-sentry'
133135 readonly XDG_DATA_HOME : 'XDG_DATA_HOME'
@@ -136,6 +138,11 @@ type Constants = Remap<
136138 readonly YARN_CLASSIC : 'yarn/classic'
137139 readonly YARN_LOCK : 'yarn.lock'
138140 readonly bashRcPath : string
141+ readonly blessedOptions : {
142+ smartCSR : boolean
143+ term : string
144+ useBCE : boolean
145+ }
139146 readonly distCliPath : string
140147 readonly distInstrumentWithSentryPath : string
141148 readonly distPath : string
@@ -209,6 +216,7 @@ const SOCKET_SECURITY_API_BASE_URL = 'SOCKET_SECURITY_API_BASE_URL'
209216const SOCKET_SECURITY_API_PROXY = 'SOCKET_SECURITY_API_PROXY'
210217const SOCKET_SECURITY_API_TOKEN = 'SOCKET_SECURITY_API_TOKEN'
211218const SOCKET_SECURITY_GITHUB_PAT = 'SOCKET_SECURITY_GITHUB_PAT'
219+ const TERM = 'TERM'
212220const VLT = 'vlt'
213221const WITH_SENTRY = 'with-sentry'
214222const XDG_DATA_HOME = 'XDG_DATA_HOME'
@@ -287,6 +295,8 @@ const LAZY_ENV = () => {
287295 // access token with read/write permissions set for "Contents" and "Pull Request".
288296 // https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens
289297 SOCKET_SECURITY_GITHUB_PAT : envAsString ( env [ 'SOCKET_SECURITY_GITHUB_PAT' ] ) ,
298+ // Specifies the type of terminal or terminal emulator being used by the process.
299+ TERM : envAsString ( env [ 'TERM' ] ) ,
290300 // The location of the base directory on Linux and MacOS used to store
291301 // user-specific data files, defaulting to $HOME/.local/share if not set or empty.
292302 XDG_DATA_HOME : envAsString ( env [ 'XDG_DATA_HOME' ] )
@@ -297,6 +307,14 @@ const lazyBashRcPath = () =>
297307 // Lazily access constants.homePath.
298308 path . join ( constants . homePath , '.bashrc' )
299309
310+ const lazyBlessedOptions = ( ) =>
311+ Object . freeze ( {
312+ smartCSR : true ,
313+ // Lazily access constants.WIN32.
314+ term : constants . WIN32 ? 'windows-ansi' : 'xterm' ,
315+ useBCE : true
316+ } )
317+
300318const lazyDistCliPath = ( ) =>
301319 // Lazily access constants.distPath.
302320 path . join ( constants . distPath , 'cli.js' )
@@ -451,6 +469,7 @@ const constants = createConstantsObject(
451469 SOCKET_SECURITY_API_PROXY ,
452470 SOCKET_SECURITY_API_TOKEN ,
453471 SOCKET_SECURITY_GITHUB_PAT ,
472+ TERM ,
454473 VLT ,
455474 WITH_SENTRY ,
456475 XDG_DATA_HOME ,
@@ -459,6 +478,7 @@ const constants = createConstantsObject(
459478 YARN_CLASSIC ,
460479 YARN_LOCK ,
461480 bashRcPath : undefined ,
481+ blessedOptions : undefined ,
462482 distCliPath : undefined ,
463483 distInstrumentWithSentryPath : undefined ,
464484 distPath : undefined ,
@@ -479,6 +499,7 @@ const constants = createConstantsObject(
479499 DIST_TYPE : LAZY_DIST_TYPE ,
480500 ENV : LAZY_ENV ,
481501 bashRcPath : lazyBashRcPath ,
502+ blessedOptions : lazyBlessedOptions ,
482503 distCliPath : lazyDistCliPath ,
483504 distInstrumentWithSentryPath : lazyDistInstrumentWithSentryPath ,
484505 distPath : lazyDistPath ,
0 commit comments