@dotenvx/dotenvx 0.6.0 → 0.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -24
- package/package.json +1 -1
- package/src/shared/logger.js +1 -5
package/README.md
CHANGED
|
@@ -302,50 +302,41 @@ brew install dotenvx/brew/dotenvx
|
|
|
302
302
|
|
|
303
303
|
### Other Ways to Install
|
|
304
304
|
|
|
305
|
-
1.
|
|
305
|
+
#### 1. global npm
|
|
306
|
+
|
|
307
|
+
After `brew`, installing globally using [`npm`](https://www.npmjs.com/package/@dotenvx/dotenvx) is easiest:
|
|
306
308
|
|
|
307
309
|
```sh
|
|
308
310
|
npm install @dotenvx/dotenvx --global
|
|
309
311
|
```
|
|
310
312
|
|
|
311
|
-
2.
|
|
312
|
-
|
|
313
|
-
```sh
|
|
314
|
-
npx @dotenvx/dotenvx help
|
|
315
|
-
```
|
|
313
|
+
#### 2. local npm
|
|
316
314
|
|
|
317
|
-
|
|
315
|
+
Or install in your `package.json`:
|
|
318
316
|
|
|
319
317
|
```sh
|
|
320
318
|
npm i @dotenvx/dotenvx --save
|
|
321
319
|
```
|
|
322
320
|
```json
|
|
323
|
-
|
|
324
|
-
"
|
|
321
|
+
{
|
|
322
|
+
"scripts": {
|
|
323
|
+
"start": "./node_modules/.bin/dotenvx run -- node index.js"
|
|
324
|
+
},
|
|
325
|
+
"dependencies": {
|
|
326
|
+
"@dotenvx/dotenvx": "^0.6.0"
|
|
327
|
+
}
|
|
325
328
|
}
|
|
326
329
|
```
|
|
327
330
|
|
|
328
|
-
3.
|
|
331
|
+
#### 3. standalone binary
|
|
329
332
|
|
|
330
|
-
|
|
331
|
-
curl -fsS https://dotenvx.sh/ | sh
|
|
332
|
-
```
|
|
333
|
+
Or download it directly as a standalone binary:
|
|
333
334
|
|
|
334
335
|
```sh
|
|
335
|
-
# download it to
|
|
336
|
+
# download it to `/user/local/bin/dotenvx`
|
|
336
337
|
curl -fsS https://dotenvx.sh/ | sh
|
|
337
338
|
|
|
338
339
|
# check it works
|
|
339
|
-
./dotenvx help
|
|
340
|
-
|
|
341
|
-
# move it to `/usr/local/bin/dotenvx`
|
|
342
|
-
sudo install -m 755 dotenvx /usr/local/bin
|
|
343
|
-
|
|
344
|
-
# check it still works
|
|
345
|
-
/usr/local/bin/dotenvx help
|
|
346
|
-
|
|
347
|
-
# check it is in your path
|
|
348
|
-
which dotenv
|
|
349
340
|
dotenvx help
|
|
350
341
|
```
|
|
351
342
|
|
package/package.json
CHANGED
package/src/shared/logger.js
CHANGED
|
@@ -7,14 +7,10 @@ const transports = winston.transports
|
|
|
7
7
|
|
|
8
8
|
const packageJson = require('./packageJson')
|
|
9
9
|
|
|
10
|
-
function pad (word) {
|
|
11
|
-
return word.padEnd(9, ' ')
|
|
12
|
-
}
|
|
13
|
-
|
|
14
10
|
const dotenvxFormat = printf(({ level, message, label, timestamp }) => {
|
|
15
11
|
const formattedMessage = typeof message === 'object' ? JSON.stringify(message) : message
|
|
16
12
|
|
|
17
|
-
return `[dotenvx@${packageJson.version}]
|
|
13
|
+
return `[dotenvx@${packageJson.version}][${level.toUpperCase()}] ${formattedMessage}`
|
|
18
14
|
})
|
|
19
15
|
|
|
20
16
|
const logger = createLogger({
|