envilder 0.2.1 โ 0.2.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 +21 -19
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
|
|
1
|
+

|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Envilder is a CLI tool for managing AWS SSM Parameter Store parameters and automatically generating the required `.env` file. This tool simplifies project environment variable management, avoiding manual updates and ensuring consistency across environments.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
# โจ Features
|
|
6
6
|
|
|
7
7
|
- ๐ Fetch parameters securely from AWS SSM Parameter Store.
|
|
8
8
|
- โก Automatically generates a `.env` file with specified parameters.
|
|
9
|
-
- ๐ก๏ธ Handles
|
|
9
|
+
- ๐ก๏ธ Handles encrypted (currently only supported) SSM parameters.
|
|
10
10
|
- ๐ชถ Lightweight and simple to use.
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
# Prerequisites
|
|
13
13
|
Before using `Envilder`, ensure that you have the AWS CLI installed and properly configured on your local machine. This configuration is required for `Envilder` to access and manage parameters in AWS SSM.
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
## AWS CLI Installation & Configuration
|
|
16
16
|
1. Install the AWS CLI by following the instructions [here](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html).
|
|
17
17
|
2. After installation, configure the AWS CLI using the following command:
|
|
18
18
|
|
|
@@ -28,14 +28,14 @@ Before using `Envilder`, ensure that you have the AWS CLI installed and properly
|
|
|
28
28
|
|
|
29
29
|
Make sure that the AWS credentials you're using have the appropriate permissions to access the SSM Parameter Store in your AWS account.
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
# Installation
|
|
32
32
|
You can install `Envilder` globally using yarn. This will allow you to use the `envilder` command from any directory on your system.
|
|
33
33
|
|
|
34
34
|
```bash
|
|
35
35
|
yarn global add envilder
|
|
36
36
|
```
|
|
37
37
|
|
|
38
|
-
|
|
38
|
+
# ๐ฆ Installation
|
|
39
39
|
|
|
40
40
|
You can install **envilder** globally or locally using npm:
|
|
41
41
|
|
|
@@ -43,21 +43,21 @@ You can install **envilder** globally or locally using npm:
|
|
|
43
43
|
npm install -g envilder
|
|
44
44
|
```
|
|
45
45
|
|
|
46
|
-
|
|
46
|
+
# ๐ Usage
|
|
47
47
|
|
|
48
48
|
Envilder requires two arguments:
|
|
49
49
|
|
|
50
50
|
- `--map <path>`: Path to a JSON file mapping environment variable names to SSM parameters.
|
|
51
51
|
- `--envfile <path>`: Path where the generated .env file will be saved.
|
|
52
52
|
|
|
53
|
-
|
|
53
|
+
# ๐ง Example
|
|
54
54
|
|
|
55
55
|
1. Create a mapping file `param_map.json`:
|
|
56
56
|
|
|
57
57
|
```json
|
|
58
58
|
{
|
|
59
|
-
"
|
|
60
|
-
"
|
|
59
|
+
"SECRET_TOKEN": "/path/to/ssm/token",
|
|
60
|
+
"SECRET_KEY": "/path/to/ssm/password"
|
|
61
61
|
}
|
|
62
62
|
```
|
|
63
63
|
|
|
@@ -69,25 +69,27 @@ Envilder requires two arguments:
|
|
|
69
69
|
|
|
70
70
|
3. The `.env` file will be generated in the specified location.
|
|
71
71
|
|
|
72
|
-
|
|
72
|
+
# ๐ Sample `.env` Output
|
|
73
73
|
|
|
74
74
|
```makefile
|
|
75
|
-
|
|
76
|
-
|
|
75
|
+
SECRET_TOKEN=mockedEmail@example.com
|
|
76
|
+
SECRET_KEY=mockedPassword
|
|
77
77
|
```
|
|
78
78
|
|
|
79
|
-
|
|
79
|
+
# ๐งช Running Tests
|
|
80
80
|
|
|
81
|
-
To run the tests with coverage:
|
|
81
|
+
To run the tests with coverage:
|
|
82
82
|
|
|
83
83
|
```bash
|
|
84
84
|
yarn test
|
|
85
85
|
```
|
|
86
86
|
|
|
87
|
-
|
|
87
|
+
Here you can see the current coverage report: https://macalbert.github.io/envilder/
|
|
88
|
+
|
|
89
|
+
# ๐ License
|
|
88
90
|
|
|
89
91
|
This project is licensed under the MIT License - see the [LICENSE](./LICENSE) file for details.
|
|
90
92
|
|
|
91
|
-
|
|
93
|
+
# ๐ Contributing
|
|
92
94
|
|
|
93
95
|
Contributions are welcome! Feel free to submit issues and pull requests.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "envilder",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.3",
|
|
4
4
|
"description": "A CLI tool to generate .env files from AWS SSM parameters",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
"type": "module",
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@aws-sdk/client-ssm": "^3.654.0",
|
|
41
|
-
"@secretlint/core": "^
|
|
42
|
-
"@secretlint/secretlint-rule-preset-recommend": "^
|
|
41
|
+
"@secretlint/core": "^9.2.1",
|
|
42
|
+
"@secretlint/secretlint-rule-preset-recommend": "^9.0.0",
|
|
43
43
|
"@types/node": "^22.5.5",
|
|
44
44
|
"commander": "^12.1.0",
|
|
45
45
|
"dotenv": "^16.4.5",
|
|
@@ -47,12 +47,12 @@
|
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@biomejs/biome": "^1.9.1",
|
|
50
|
-
"@vitest/coverage-v8": "^
|
|
50
|
+
"@vitest/coverage-v8": "^3.1.1",
|
|
51
51
|
"rimraf": "^6.0.1",
|
|
52
|
-
"secretlint": "^
|
|
52
|
+
"secretlint": "^9.0.0",
|
|
53
53
|
"ts-node": "^10.9.2",
|
|
54
54
|
"typescript": "^5.6.2",
|
|
55
|
-
"vitest": "^
|
|
55
|
+
"vitest": "^3.1.1"
|
|
56
56
|
},
|
|
57
57
|
"resolutions": {
|
|
58
58
|
"string-width": "4.2.3",
|