@dotenvx/dotenvx 0.10.2 → 0.10.3
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 +26 -3
- package/package.json +1 -1
- package/src/cli/actions/precommit.js +11 -1
- package/src/cli/actions/run.js +1 -0
package/README.md
CHANGED
|
@@ -330,12 +330,23 @@ More examples
|
|
|
330
330
|
|
|
331
331
|
* <details><summary>Docker</summary><br>
|
|
332
332
|
|
|
333
|
+
> Add the `dotenvx` binary to your Dockerfile
|
|
334
|
+
|
|
333
335
|
```sh
|
|
334
|
-
|
|
336
|
+
# Install dotenvx
|
|
337
|
+
RUN curl -fsS https://dotenvx.sh/ | sh
|
|
335
338
|
```
|
|
336
339
|
|
|
337
|
-
|
|
340
|
+
> Use it in your Dockerfile CMD
|
|
341
|
+
|
|
342
|
+
```sh
|
|
343
|
+
# Prepend dotenvx run
|
|
344
|
+
CMD ["dotenvx", "run", "--", "node", "index.js"]
|
|
345
|
+
```
|
|
346
|
+
|
|
347
|
+
see [docker guide](https://dotenvx.com/docs/platforms/docker)
|
|
338
348
|
|
|
349
|
+
</details>
|
|
339
350
|
|
|
340
351
|
* <details><summary>Fly.io</summary><br>
|
|
341
352
|
|
|
@@ -359,7 +370,7 @@ More examples
|
|
|
359
370
|
web: dotenvx run -- node index.js
|
|
360
371
|
```
|
|
361
372
|
|
|
362
|
-
|
|
373
|
+
see [heroku guide](https://dotenvx.com/docs/platforms/heroku)
|
|
363
374
|
|
|
364
375
|
</details>
|
|
365
376
|
|
|
@@ -421,6 +432,18 @@ More examples
|
|
|
421
432
|
|
|
422
433
|
|
|
423
434
|
|
|
435
|
+
## Hub
|
|
436
|
+
|
|
437
|
+
> Integrate tightly with [GitHub](https://github.com) 🐙
|
|
438
|
+
```sh
|
|
439
|
+
$ dotenvx hub login
|
|
440
|
+
$ dotenvx hub push
|
|
441
|
+
```
|
|
442
|
+
|
|
443
|
+
more details coming soon.
|
|
444
|
+
|
|
445
|
+
|
|
446
|
+
|
|
424
447
|
## Guides
|
|
425
448
|
|
|
426
449
|
* [dotenvx/docs](https://dotenvx.com/docs)
|
package/package.json
CHANGED
|
@@ -69,7 +69,17 @@ function precommit () {
|
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
function installPrecommitHook () {
|
|
72
|
-
const hookScript =
|
|
72
|
+
const hookScript = `#!/bin/sh
|
|
73
|
+
|
|
74
|
+
if ! command -v dotenvx &> /dev/null
|
|
75
|
+
then
|
|
76
|
+
echo "[dotenvx][precommit] 'dotenvx' command not found"
|
|
77
|
+
echo "[dotenvx][precommit] ? install it with [brew install dotenvx/brew/dotenvx]"
|
|
78
|
+
echo "[dotenvx][precommit] ? other install options [https://dotenvx.com/docs/install]"
|
|
79
|
+
exit 1
|
|
80
|
+
fi
|
|
81
|
+
|
|
82
|
+
dotenvx precommit`
|
|
73
83
|
const hookPath = path.join('.git', 'hooks', 'pre-commit')
|
|
74
84
|
|
|
75
85
|
try {
|
package/src/cli/actions/run.js
CHANGED
|
@@ -93,6 +93,7 @@ async function run () {
|
|
|
93
93
|
logger.warnv(`missing ${envFilepath} file (${filepath})`)
|
|
94
94
|
logger.help(`? in development: add one with [echo "HELLO=World" > .env] and re-run [dotenvx run -- ${commandArgs.join(' ')}]`)
|
|
95
95
|
logger.help('? for production: set [DOTENV_KEY] on your server and re-deploy')
|
|
96
|
+
logger.help('? for ci: set [DOTENV_KEY] on your ci and re-build')
|
|
96
97
|
break
|
|
97
98
|
|
|
98
99
|
// unhandled error
|