crenvo 1.0.2 → 1.0.4
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 +3 -3
- package/lib/utils/code.js +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -14,16 +14,16 @@ Inspired by Laravel's `php artisan key:generate`, **crenvo** brings secure envir
|
|
|
14
14
|
|
|
15
15
|
## 2. CLI Commands
|
|
16
16
|
|
|
17
|
-
### `npx
|
|
17
|
+
### `npx crenvo code:generate --envFile <path>`
|
|
18
18
|
Run this command to create an `ENC_CODE` in your env file.
|
|
19
19
|
* **--envFile / -e**: Specify file path (Default: `.env` in project root).
|
|
20
20
|
|
|
21
|
-
### `npx
|
|
21
|
+
### `npx crenvo encrypt <input> --envFile <path> --writeAs <field>`
|
|
22
22
|
Encrypt a string value using the code in the env file.
|
|
23
23
|
* **--envFile / -e**: Specify file path.
|
|
24
24
|
* **--writeAs / -w**: Write the result into the env file under the given variable name.
|
|
25
25
|
|
|
26
|
-
### `npx
|
|
26
|
+
### `npx crenvo decrypt <input> --envFile <path>`
|
|
27
27
|
Decrypt a string value using the code in the env file.
|
|
28
28
|
* **--envFile / -e**: Specify file path.
|
|
29
29
|
|
package/lib/utils/code.js
CHANGED
|
@@ -14,7 +14,7 @@ const ivLen = 16
|
|
|
14
14
|
* @returns {Promise<void>}
|
|
15
15
|
*/
|
|
16
16
|
const checkEnvFile = async (envFile) => {
|
|
17
|
-
if (!envFile) throw new Error(`File ${
|
|
17
|
+
if (!envFile) throw new Error(`File ${envFile} not specified`)
|
|
18
18
|
|
|
19
19
|
const path = join(process.cwd(), envFile)
|
|
20
20
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "crenvo",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"description": "A Laravel-inspired, zero-dependency CLI and Library for env file encryption",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"env",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
}
|
|
31
31
|
},
|
|
32
32
|
"bin": {
|
|
33
|
-
"
|
|
33
|
+
"crenvo": "./bin/cli.js"
|
|
34
34
|
},
|
|
35
35
|
"scripts": {
|
|
36
36
|
"test": "echo \"Error: no test specified\" && exit 1"
|