@dotenvx/dotenvx 1.40.0 → 1.40.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/CHANGELOG.md +7 -1
- package/LICENSE +9 -1
- package/README.md +53 -0
- package/package.json +1 -1
- package/src/cli/actions/ext/scan.js +7 -3
package/CHANGELOG.md
CHANGED
|
@@ -2,7 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
-
[Unreleased](https://github.com/dotenvx/dotenvx/compare/v1.40.
|
|
5
|
+
[Unreleased](https://github.com/dotenvx/dotenvx/compare/v1.40.1...main)
|
|
6
|
+
|
|
7
|
+
## [1.40.1](https://github.com/dotenvx/dotenvx/compare/v1.40.0...v1.40.1)
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
|
|
11
|
+
* Patch `ext scan` command ([#570](https://github.com/dotenvx/dotenvx/pull/570))
|
|
6
12
|
|
|
7
13
|
## [1.40.0](https://github.com/dotenvx/dotenvx/compare/v1.39.1...v1.40.0)
|
|
8
14
|
|
package/LICENSE
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
BSD 3-Clause License
|
|
2
2
|
|
|
3
|
-
Copyright (c) 2024,
|
|
3
|
+
Copyright (c) 2024, Dotenvx LLC
|
|
4
4
|
|
|
5
5
|
Redistribution and use in source and binary forms, with or without
|
|
6
6
|
modification, are permitted provided that the following conditions are met:
|
|
@@ -26,3 +26,11 @@ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
|
26
26
|
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
27
27
|
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
28
28
|
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
Dotenvx is an Open Source project licensed under the BSD 3-Clause above.
|
|
33
|
+
|
|
34
|
+
Dotenvx Pro is source-available with a commercial-friendly license. You can find
|
|
35
|
+
the full commercial license in `COMMERCIAL-LICENSE.txt`. See https://dotenvx.com
|
|
36
|
+
for features and purchasing options.
|
package/README.md
CHANGED
|
@@ -796,6 +796,59 @@ Advanced CLI commands.
|
|
|
796
796
|
Hello World
|
|
797
797
|
```
|
|
798
798
|
|
|
799
|
+
</details>
|
|
800
|
+
* <details><summary>`run` - Multiline</summary><br>
|
|
801
|
+
|
|
802
|
+
Dotenvx supports multiline values. This is particularly useful in conjunction with Docker - which [does not support multiline values](https://stackoverflow.com/questions/50299617/set-multiline-environment-variable-with-dockerfile/79578348#79578348).
|
|
803
|
+
|
|
804
|
+
```ini
|
|
805
|
+
# .env
|
|
806
|
+
MULTILINE_PEM="-----BEGIN PUBLIC KEY-----
|
|
807
|
+
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAnNl1tL3QjKp3DZWM0T3u
|
|
808
|
+
LgGJQwu9WqyzHKZ6WIA5T+7zPjO1L8l3S8k8YzBrfH4mqWOD1GBI8Yjq2L1ac3Y/
|
|
809
|
+
bTdfHN8CmQr2iDJC0C6zY8YV93oZB3x0zC/LPbRYpF8f6OqX1lZj5vo2zJZy4fI/
|
|
810
|
+
kKcI5jHYc8VJq+KCuRZrvn+3V+KuL9tF9v8ZgjF2PZbU+LsCy5Yqg1M8f5Jp5f6V
|
|
811
|
+
u4QuUoobAgMBAAE=
|
|
812
|
+
-----END PUBLIC KEY-----"
|
|
813
|
+
```
|
|
814
|
+
|
|
815
|
+
```js
|
|
816
|
+
// index.js
|
|
817
|
+
console.log('MULTILINE_PEM', process.env.MULTILINE_PEM)
|
|
818
|
+
```
|
|
819
|
+
|
|
820
|
+
```sh
|
|
821
|
+
$ dotenvx run -- node index.js
|
|
822
|
+
MULTILINE_PEM -----BEGIN PUBLIC KEY-----
|
|
823
|
+
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAnNl1tL3QjKp3DZWM0T3u
|
|
824
|
+
LgGJQwu9WqyzHKZ6WIA5T+7zPjO1L8l3S8k8YzBrfH4mqWOD1GBI8Yjq2L1ac3Y/
|
|
825
|
+
bTdfHN8CmQr2iDJC0C6zY8YV93oZB3x0zC/LPbRYpF8f6OqX1lZj5vo2zJZy4fI/
|
|
826
|
+
kKcI5jHYc8VJq+KCuRZrvn+3V+KuL9tF9v8ZgjF2PZbU+LsCy5Yqg1M8f5Jp5f6V
|
|
827
|
+
u4QuUoobAgMBAAE=
|
|
828
|
+
-----END PUBLIC KEY-----
|
|
829
|
+
```
|
|
830
|
+
|
|
831
|
+
</details>
|
|
832
|
+
* <details><summary>`run` - Contextual Help</summary><br>
|
|
833
|
+
|
|
834
|
+
Unlike other dotenv libraries, dotenvx attempts to unblock you with contextual help.
|
|
835
|
+
|
|
836
|
+
For example, when missing a custom .env file:
|
|
837
|
+
|
|
838
|
+
```sh
|
|
839
|
+
$ dotenvx run -f .env.missing -- echo $HELLO
|
|
840
|
+
[MISSING_ENV_FILE] missing .env.missing file (/Users/scottmotte/Code/dotenvx/playground/apr-16/.env.missing)
|
|
841
|
+
[MISSING_ENV_FILE] https://github.com/dotenvx/dotenvx/issues/484 and re-run [dotenvx run -- echo]
|
|
842
|
+
```
|
|
843
|
+
|
|
844
|
+
or when missing a KEY:
|
|
845
|
+
|
|
846
|
+
```sh
|
|
847
|
+
$ echo "HELLO=World" > .env
|
|
848
|
+
$ dotenvx get GOODBYE
|
|
849
|
+
[MISSING_KEY] missing GOODBYE key
|
|
850
|
+
```
|
|
851
|
+
|
|
799
852
|
</details>
|
|
800
853
|
* <details><summary>`run` - multiple `-f` flags</summary><br>
|
|
801
854
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
const childProcess = require('child_process')
|
|
2
2
|
|
|
3
3
|
const { logger } = require('./../../../shared/logger')
|
|
4
|
+
const chomp = require('./../../../lib/helpers/chomp')
|
|
4
5
|
|
|
5
6
|
function scan () {
|
|
6
7
|
const options = this.opts()
|
|
@@ -17,11 +18,14 @@ function scan () {
|
|
|
17
18
|
return
|
|
18
19
|
}
|
|
19
20
|
|
|
21
|
+
let output = ''
|
|
20
22
|
try {
|
|
21
|
-
|
|
22
|
-
logger.blank(output)
|
|
23
|
+
output = childProcess.execSync('gitleaks detect --no-banner --verbose 2>&1').toString() // gitleaks sends exit code 1 but puts data on stdout for failures, so we catch later and resurface the stdout
|
|
24
|
+
logger.blank(chomp(output))
|
|
23
25
|
} catch (error) {
|
|
24
|
-
|
|
26
|
+
if (error.stdout) {
|
|
27
|
+
console.error(chomp(error.stdout.toString()))
|
|
28
|
+
}
|
|
25
29
|
|
|
26
30
|
process.exit(1)
|
|
27
31
|
}
|