@@ -8,19 +8,14 @@ const version = packageJson.version
88
99// Array of tips to display randomly
1010const TIPS = [
11- '🔐 encrypt with Dotenvx: https://dotenvx.com' ,
12- '🔐 prevent committing .env to code: https://dotenvx.com/precommit' ,
13- '🔐 prevent building .env in docker: https://dotenvx.com/prebuild' ,
14- '🤖 agentic secret storage: https://dotenvx.com/as2' ,
15- '⚡️ secrets for agents: https://dotenvx.com/as2' ,
16- '🛡️ auth for agents: https://vestauth.com' ,
17- '🛠️ run anywhere with `dotenvx run -- yourcommand`' ,
18- '⚙️ specify custom .env file path with { path: \'/custom/path/.env\' }' ,
19- '⚙️ enable debug logging with { debug: true }' ,
20- '⚙️ override existing env vars with { override: true }' ,
21- '⚙️ suppress all logs with { quiet: true }' ,
22- '⚙️ write to custom object with { processEnv: myObject }' ,
23- '⚙️ load multiple .env files with { path: [\'.env.local\', \'.env\'] }'
11+ '◈ encrypted .env [www.dotenvx.com]' ,
12+ '◈ secrets for agents [www.dotenvx.com]' ,
13+ '⌁ auth for agents [www.vestauth.com]' ,
14+ '⌘ custom filepath { path: \'/custom/path/.env\' }' ,
15+ '⌘ enable debugging { debug: true }' ,
16+ '⌘ override existing { override: true }' ,
17+ '⌘ suppress logs { quiet: true }' ,
18+ '⌘ multiple files { path: [\'.env.local\', \'.env\'] }'
2419]
2520
2621// Get a random tip from the tips array
@@ -128,15 +123,15 @@ function _parseVault (options) {
128123}
129124
130125function _warn ( message ) {
131- console . error ( `[dotenv@ ${ version } ][WARN] ${ message } ` )
126+ console . error ( `⚠ ${ message } · dotenv@ ${ version } ` )
132127}
133128
134129function _debug ( message ) {
135- console . log ( `[dotenv@ ${ version } ][DEBUG] ${ message } ` )
130+ console . log ( `┆ ${ message } · dotenv@ ${ version } ` )
136131}
137132
138133function _log ( message ) {
139- console . log ( `[dotenv@ ${ version } ] ${ message } ` )
134+ console . log ( `◇ ${ message } · dotenv@ ${ version } ` )
140135}
141136
142137function _dotenvKey ( options ) {
@@ -230,7 +225,7 @@ function _configVault (options) {
230225 const quiet = parseBoolean ( process . env . DOTENV_CONFIG_QUIET || ( options && options . quiet ) )
231226
232227 if ( debug || ! quiet ) {
233- _log ( 'Loading env from encrypted .env.vault' )
228+ _log ( 'loading env from encrypted .env.vault' )
234229 }
235230
236231 const parsed = DotenvModule . _parseVault ( options )
@@ -259,7 +254,7 @@ function configDotenv (options) {
259254 encoding = options . encoding
260255 } else {
261256 if ( debug ) {
262- _debug ( 'No encoding is specified. UTF-8 is used by default' )
257+ _debug ( 'no encoding is specified ( UTF-8 is used by default) ' )
263258 }
264259 }
265260
@@ -287,7 +282,7 @@ function configDotenv (options) {
287282 DotenvModule . populate ( parsedAll , parsed , options )
288283 } catch ( e ) {
289284 if ( debug ) {
290- _debug ( `Failed to load ${ path } ${ e . message } ` )
285+ _debug ( `failed to load ${ path } ${ e . message } ` )
291286 }
292287 lastError = e
293288 }
@@ -308,13 +303,13 @@ function configDotenv (options) {
308303 shortPaths . push ( relative )
309304 } catch ( e ) {
310305 if ( debug ) {
311- _debug ( `Failed to load ${ filePath } ${ e . message } ` )
306+ _debug ( `failed to load ${ filePath } ${ e . message } ` )
312307 }
313308 lastError = e
314309 }
315310 }
316311
317- _log ( `injecting env (${ keysCount } ) from ${ shortPaths . join ( ',' ) } ${ dim ( `-- tip: ${ _getRandomTip ( ) } ` ) } ` )
312+ _log ( `injecting env (${ keysCount } ) from ${ shortPaths . join ( ',' ) } ${ dim ( `// tip: ${ _getRandomTip ( ) } ` ) } ` )
318313 }
319314
320315 if ( lastError ) {
@@ -335,7 +330,7 @@ function config (options) {
335330
336331 // dotenvKey exists but .env.vault file does not exist
337332 if ( ! vaultPath ) {
338- _warn ( `You set DOTENV_KEY but you are missing a .env.vault file at ${ vaultPath } . Did you forget to build it? ` )
333+ _warn ( `you set DOTENV_KEY but you are missing a .env.vault file at ${ vaultPath } ` )
339334
340335 return DotenvModule . configDotenv ( options )
341336 }
0 commit comments