@dotenvx/dotenvx 0.10.1 → 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 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
- coming soon
336
+ # Install dotenvx
337
+ RUN curl -fsS https://dotenvx.sh/ | sh
335
338
  ```
336
339
 
337
- </details>
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
- <sub><a href="https://github.com/dotenvx/heroku-buildpack-dotenvx">buildpack docs</a></sub>
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
  &nbsp;
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
+ &nbsp;
446
+
424
447
  ## Guides
425
448
 
426
449
  * [dotenvx/docs](https://dotenvx.com/docs)
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.10.1",
2
+ "version": "0.10.3",
3
3
  "name": "@dotenvx/dotenvx",
4
4
  "description": "a better dotenv–from the creator of `dotenv`",
5
5
  "author": "@motdotla",
@@ -69,7 +69,17 @@ function precommit () {
69
69
  }
70
70
 
71
71
  function installPrecommitHook () {
72
- const hookScript = '#!/bin/sh\ndotenvx precommit\n'
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 {
@@ -90,9 +90,10 @@ async function run () {
90
90
  switch (e.code) {
91
91
  // missing .env
92
92
  case 'ENOENT':
93
- logger.warnv(`missing .env file (${filepath})`)
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