envilder 0.5.3 → 0.5.5
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 +126 -181
- package/lib/Cli.d.ts.map +1 -1
- package/lib/Cli.js +9 -34
- package/lib/Cli.js.map +1 -1
- package/lib/cli/application/EnvilderHandler.d.ts +2 -1
- package/lib/cli/application/EnvilderHandler.d.ts.map +1 -1
- package/lib/cli/application/EnvilderHandler.js +37 -28
- package/lib/cli/application/EnvilderHandler.js.map +1 -1
- package/lib/cli/{domain → application/builders}/EnvilderBuilder.d.ts +3 -3
- package/lib/cli/application/builders/EnvilderBuilder.d.ts.map +1 -0
- package/lib/cli/{domain → application/builders}/EnvilderBuilder.js +3 -3
- package/lib/cli/application/builders/EnvilderBuilder.js.map +1 -0
- package/lib/cli/domain/ports/IEnvFileManager.d.ts +3 -3
- package/lib/cli/domain/ports/IEnvFileManager.d.ts.map +1 -1
- package/lib/cli/infrastructure/{AwsSsmStoreSecrets.d.ts → AwsSsmSecretProvider.d.ts} +1 -1
- package/lib/cli/infrastructure/AwsSsmSecretProvider.d.ts.map +1 -0
- package/lib/cli/infrastructure/{AwsSsmStoreSecrets.js → AwsSsmSecretProvider.js} +1 -1
- package/lib/cli/infrastructure/AwsSsmSecretProvider.js.map +1 -0
- package/lib/cli/infrastructure/EnvFileManager.d.ts +4 -3
- package/lib/cli/infrastructure/EnvFileManager.d.ts.map +1 -1
- package/lib/cli/infrastructure/EnvFileManager.js +44 -29
- package/lib/cli/infrastructure/EnvFileManager.js.map +1 -1
- package/lib/cli/infrastructure/PackageJsonFinder.d.ts +5 -0
- package/lib/cli/infrastructure/PackageJsonFinder.d.ts.map +1 -0
- package/lib/cli/infrastructure/PackageJsonFinder.js +38 -0
- package/lib/cli/infrastructure/PackageJsonFinder.js.map +1 -0
- package/package.json +6 -5
- package/lib/cli/domain/EnvilderBuilder.d.ts.map +0 -1
- package/lib/cli/domain/EnvilderBuilder.js.map +0 -1
- package/lib/cli/infrastructure/AwsSsmStoreSecrets.d.ts.map +0 -1
- package/lib/cli/infrastructure/AwsSsmStoreSecrets.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
# Envilder
|
|
2
|
+
|
|
3
|
+
<p align="center">
|
|
3
4
|
<img src="https://github.com/user-attachments/assets/96bf1efa-7d21-440a-a414-3a20e7f9a1f1" alt="Envilder">
|
|
4
|
-
</
|
|
5
|
+
</p>
|
|
5
6
|
|
|
6
|
-
<
|
|
7
|
+
<p align="center">
|
|
8
|
+
<b>✨ A CLI that securely centralizes your environment variables from AWS SSM as a single source of truth ✨</b>
|
|
9
|
+
</p>
|
|
7
10
|
|
|
8
11
|
<p align="center">
|
|
9
12
|
<a href="https://www.npmjs.com/package/envilder">
|
|
@@ -17,141 +20,121 @@
|
|
|
17
20
|
</a>
|
|
18
21
|
</p>
|
|
19
22
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
-
|
|
25
|
-
-
|
|
26
|
-
|
|
27
|
-
-
|
|
28
|
-
-
|
|
29
|
-
|
|
30
|
-
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## Table of contents
|
|
26
|
+
|
|
27
|
+
- [Envilder](#envilder)
|
|
28
|
+
- [Table of contents](#table-of-contents)
|
|
29
|
+
- [Features](#features)
|
|
30
|
+
- [Feature status](#feature-status)
|
|
31
|
+
- [Quick start 🚀](#quick-start-)
|
|
32
|
+
- [How it works 🛠️](#how-it-works-️)
|
|
33
|
+
- [Installation 💾](#installation-)
|
|
34
|
+
- [Usage](#usage)
|
|
35
|
+
- [Example](#example)
|
|
36
|
+
- [Working with multiple AWS profiles](#working-with-multiple-aws-profiles)
|
|
37
|
+
- [Sample output 📄](#sample-output-)
|
|
38
|
+
- [Roadmap 🗺️](#roadmap-️)
|
|
39
|
+
- [Contributing 🤝](#contributing-)
|
|
40
|
+
- [License 📄](#license-)
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## Features
|
|
45
|
+
|
|
46
|
+
- **🔒 Strict access control** — AWS IAM policies control who accesses which secrets (dev vs prod)
|
|
47
|
+
- **📊 Full audit trail** — All parameter access is logged in CloudTrail for compliance
|
|
48
|
+
- **🧩 Single source of truth** — No more copying .env files from Notion or emails
|
|
49
|
+
- **🔁 Idempotent operations** — Only variables in your mapping file are overwritten; others are preserved
|
|
50
|
+
- **🧱 No extra infrastructure** — Uses AWS SSM's reliability, no new services needed
|
|
51
|
+
|
|
52
|
+
### Feature status
|
|
53
|
+
|
|
54
|
+
| Feature | Status | Notes |
|
|
55
|
+
|--------------------------------|---------------|-------|
|
|
56
|
+
| Mapping-based secret resolution| ✅ Implemented | |
|
|
57
|
+
| .env file generation | ✅ Implemented | |
|
|
58
|
+
| AWS profile support | ✅ Implemented | |
|
|
59
|
+
| Auto-discovery mode (`--auto`) | ❌ Not implemented | Planned |
|
|
60
|
+
| Check/sync mode (`--check`) | ❌ Not implemented | Planned |
|
|
61
|
+
| Import/push mode (`--import`) | ❌ Not implemented | Planned |
|
|
62
|
+
| Webhook/Slack notification | ❌ Not implemented | Planned |
|
|
63
|
+
| Hierarchical mapping | ❌ Not implemented | Only flat JSON mapping supported |
|
|
64
|
+
| Plugin system | ❌ Not implemented | Only AWS SSM supported |
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
## Quick start 🚀
|
|
31
69
|
|
|
32
70
|
```bash
|
|
33
|
-
# Install globally
|
|
34
71
|
npm install -g envilder
|
|
35
72
|
|
|
36
|
-
# Create a simple mapping file
|
|
37
73
|
echo '{"DB_PASSWORD": "/my-app/db/password"}' > param-map.json
|
|
38
74
|
|
|
39
|
-
# Generate your .env file
|
|
40
75
|
envilder --map=param-map.json --envfile=.env
|
|
41
76
|
```
|
|
42
77
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
<table>
|
|
46
|
-
<tr>
|
|
47
|
-
<th>❌ Without Envilder</th>
|
|
48
|
-
<th>✅ With Envilder</th>
|
|
49
|
-
</tr>
|
|
50
|
-
<tr>
|
|
51
|
-
<td>
|
|
52
|
-
|
|
53
|
-
```plaintext
|
|
54
|
-
- Secrets committed to repos
|
|
55
|
-
- Manual .env file updates
|
|
56
|
-
- Inconsistent environments
|
|
57
|
-
- Password sharing via chat/email
|
|
58
|
-
- CI/CD secrets management pain
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
</td>
|
|
62
|
-
<td>
|
|
63
|
-
|
|
64
|
-
```plaintext
|
|
65
|
-
- Secrets stored securely in AWS SSM
|
|
66
|
-
- Automated .env file generation
|
|
67
|
-
- Consistent environments
|
|
68
|
-
- No need to share raw credentials
|
|
69
|
-
- Simple CI/CD integration
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
</td>
|
|
73
|
-
</tr>
|
|
74
|
-
</table>
|
|
75
|
-
|
|
76
|
-
## 💡 Why Envilder?
|
|
78
|
+
---
|
|
77
79
|
|
|
78
|
-
|
|
79
|
-
- 🤖 **Automate everything** - One command to generate your `.env` files across all environments
|
|
80
|
-
- 🔄 **Always in sync** - Keep your local, dev, and production environments consistent
|
|
81
|
-
- 🏎️ **Fast to set up** - Configure once, then generate `.env` files with a single command
|
|
82
|
-
- 🪶 **Simple but powerful** - Easy interface with support for encrypted parameters and multiple AWS profiles
|
|
83
|
-
|
|
84
|
-
## 🎯 Perfect for teams
|
|
85
|
-
|
|
86
|
-
Envilder is the tool you need if you:
|
|
87
|
-
|
|
88
|
-
- 👥 **Work in a development team** - Ensure everyone has the same environment without sharing raw secrets
|
|
89
|
-
- 🔑 **Deal with API keys & tokens** - Securely store and retrieve sensitive credentials
|
|
90
|
-
- ⚙️ **Run CI/CD pipelines** - Automatically generate environment files during deployments
|
|
91
|
-
- ☁️ **Use AWS already** - Leverage your existing AWS infrastructure more effectively
|
|
92
|
-
- 🌐 **Manage multiple environments** - Switch easily between dev, staging, and production
|
|
93
|
-
|
|
94
|
-
## 🔍 How it works (simple!)
|
|
80
|
+
## How it works 🛠️
|
|
95
81
|
|
|
96
82
|
```mermaid
|
|
83
|
+
|
|
97
84
|
graph LR
|
|
98
85
|
A[Mapping File] --> B[Envilder]
|
|
99
86
|
C[AWS Credentials] --> B
|
|
100
87
|
B --> D[.env File]
|
|
101
88
|
E[SSM Parameters] --> B
|
|
102
|
-
```
|
|
103
|
-
|
|
104
|
-
1. 📖 **Define your mapping** - Simple JSON mapping env vars to SSM paths
|
|
105
|
-
2. 🚀 **Run Envilder** - One command with your mapping file
|
|
106
|
-
3. 🔄 **Auto-fetch from AWS** - Retrieves values using your AWS credentials
|
|
107
|
-
4. 💾 **Get your .env file** - Ready to use in your project
|
|
108
89
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
You'll need:
|
|
112
|
-
|
|
113
|
-
- ✅ **AWS CLI** - Installed and configured with proper permissions to access SSM Parameter Store
|
|
114
|
-
- ✅ **Node.js** - Version 20.0.0 or higher (as specified in `package.json`)
|
|
115
|
-
|
|
116
|
-
### AWS CLI setup
|
|
117
|
-
|
|
118
|
-
1. Install the AWS CLI by following the [official instructions](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html).
|
|
119
|
-
2. After installation, configure the AWS CLI:
|
|
90
|
+
```
|
|
120
91
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
92
|
+
1. **Define your mapping** — Simple JSON mapping env vars to SSM paths
|
|
93
|
+
2. **Run Envilder** — One command with your mapping file
|
|
94
|
+
3. **Auto-fetch from AWS** — Retrieves values using your AWS credentials
|
|
95
|
+
4. **Get your .env file** — Ready to use in your project
|
|
124
96
|
|
|
125
|
-
|
|
126
|
-
- AWS Access Key ID
|
|
127
|
-
- AWS Secret Access Key
|
|
128
|
-
- Default region name (e.g., `us-east-1`)
|
|
129
|
-
- Default output format (e.g., `json`)
|
|
97
|
+
---
|
|
130
98
|
|
|
131
|
-
|
|
99
|
+
## Installation 💾
|
|
132
100
|
|
|
133
|
-
|
|
101
|
+
**Requires:** Node.js >= 20.0.0, AWS CLI configured with SSM access
|
|
134
102
|
|
|
135
103
|
```bash
|
|
136
|
-
# Using npm
|
|
137
104
|
npm install -g envilder
|
|
138
105
|
```
|
|
139
106
|
|
|
140
|
-
|
|
107
|
+
---
|
|
108
|
+
|
|
109
|
+
## Usage
|
|
141
110
|
|
|
142
111
|
```bash
|
|
143
112
|
envilder --map=<mapping-file> --envfile=<output-file> [--profile=<aws-profile>]
|
|
144
113
|
```
|
|
145
114
|
|
|
146
|
-
| Option
|
|
147
|
-
|
|
148
|
-
| `--map`
|
|
149
|
-
| `--envfile` | Path to output .env file (required)
|
|
150
|
-
| `--profile` | AWS CLI profile to use (optional)
|
|
115
|
+
| Option | Description |
|
|
116
|
+
|-------------|---------------------------------------------|
|
|
117
|
+
| `--map` | Path to JSON mapping file (required) |
|
|
118
|
+
| `--envfile` | Path to output .env file (required) |
|
|
119
|
+
| `--profile` | AWS CLI profile to use (optional) |
|
|
151
120
|
|
|
152
|
-
|
|
121
|
+
### Example
|
|
153
122
|
|
|
154
|
-
1. Create a
|
|
123
|
+
1. **Create a parameter in AWS SSM Parameter Store using AWS CLI:**
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
aws ssm put-parameter --name "/path/to/ssm/token" --value "my-secret-token-value" --type "SecureString"
|
|
127
|
+
aws ssm put-parameter --name "/path/to/ssm/password" --value "my-secret-password-value" --type "SecureString"
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
You can also create the parameter in a specific profile (for example, `dev-account`):
|
|
131
|
+
|
|
132
|
+
```bash
|
|
133
|
+
aws ssm put-parameter --name "/path/to/ssm/token" --value "my-secret-token-value" --type "SecureString" --profile dev-account
|
|
134
|
+
aws ssm put-parameter --name "/path/to/ssm/password" --value "my-secret-password-value" --type "SecureString" --profile dev-account
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
2. Create a mapping file `param-map.json`:
|
|
155
138
|
|
|
156
139
|
```json
|
|
157
140
|
{
|
|
@@ -160,117 +143,79 @@ envilder --map=<mapping-file> --envfile=<output-file> [--profile=<aws-profile>]
|
|
|
160
143
|
}
|
|
161
144
|
```
|
|
162
145
|
|
|
163
|
-
|
|
146
|
+
3. Generate your `.env` file:
|
|
164
147
|
|
|
165
148
|
```bash
|
|
166
149
|
envilder --map=param-map.json --envfile=.env
|
|
167
150
|
```
|
|
168
151
|
|
|
169
|
-
|
|
152
|
+
4. Use a specific AWS profile:
|
|
170
153
|
|
|
171
154
|
```bash
|
|
172
155
|
envilder --map=param-map.json --envfile=.env --profile=dev-account
|
|
173
156
|
```
|
|
174
157
|
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
For multiple AWS accounts or environments, configure different profiles in your AWS credentials file:
|
|
178
|
-
|
|
179
|
-
1. Edit your AWS credentials file (typically located at `~/.aws/credentials` on Linux/Mac
|
|
180
|
-
or `%USERPROFILE%\.aws\credentials` on Windows):
|
|
181
|
-
|
|
182
|
-
```ini
|
|
183
|
-
[default]
|
|
184
|
-
aws_access_key_id=YOUR_DEFAULT_ACCESS_KEY
|
|
185
|
-
aws_secret_access_key=YOUR_DEFAULT_SECRET_KEY
|
|
186
|
-
|
|
187
|
-
[dev-account]
|
|
188
|
-
aws_access_key_id=YOUR_DEV_ACCESS_KEY
|
|
189
|
-
aws_secret_access_key=YOUR_DEV_SECRET_KEY
|
|
190
|
-
|
|
191
|
-
[prod-account]
|
|
192
|
-
aws_access_key_id=YOUR_PROD_ACCESS_KEY
|
|
193
|
-
aws_secret_access_key=YOUR_PROD_SECRET_KEY
|
|
194
|
-
```
|
|
195
|
-
|
|
196
|
-
2. Specify which profile to use:
|
|
158
|
+
---
|
|
197
159
|
|
|
198
|
-
|
|
199
|
-
# Development environment
|
|
200
|
-
envilder --map=param-map.json --envfile=.env.development --profile=dev-account
|
|
160
|
+
## Working with multiple AWS profiles
|
|
201
161
|
|
|
202
|
-
|
|
203
|
-
envilder --map=param-map.json --envfile=.env.production --profile=prod-account
|
|
204
|
-
```
|
|
162
|
+
Configure different profiles in your AWS credentials file (usually at `~/.aws/credentials` or `%USERPROFILE%\.aws\credentials`):
|
|
205
163
|
|
|
206
|
-
|
|
164
|
+
```ini
|
|
165
|
+
[default]
|
|
166
|
+
aws_access_key_id=YOUR_DEFAULT_ACCESS_KEY
|
|
167
|
+
aws_secret_access_key=YOUR_DEFAULT_SECRET_KEY
|
|
207
168
|
|
|
208
|
-
|
|
169
|
+
[dev-account]
|
|
170
|
+
aws_access_key_id=YOUR_DEV_ACCESS_KEY
|
|
171
|
+
aws_secret_access_key=YOUR_DEV_SECRET_KEY
|
|
209
172
|
|
|
210
|
-
|
|
173
|
+
[prod-account]
|
|
174
|
+
aws_access_key_id=YOUR_PROD_ACCESS_KEY
|
|
175
|
+
aws_secret_access_key=YOUR_PROD_SECRET_KEY
|
|
176
|
+
```
|
|
211
177
|
|
|
212
|
-
|
|
213
|
-
/project/dev/DB_PASSWORD
|
|
214
|
-
/project/stage/DB_PASSWORD
|
|
215
|
-
/project/prod/DB_PASSWORD
|
|
216
|
-
```
|
|
178
|
+
Specify which profile to use:
|
|
217
179
|
|
|
218
|
-
|
|
180
|
+
```bash
|
|
181
|
+
# Development
|
|
219
182
|
|
|
220
|
-
|
|
221
|
-
{
|
|
222
|
-
"DB_PASSWORD": "/project/${ENV}/DB_PASSWORD"
|
|
223
|
-
}
|
|
224
|
-
```
|
|
183
|
+
envilder --map=param-map.json --envfile=.env.development --profile=dev-account
|
|
225
184
|
|
|
226
|
-
|
|
185
|
+
# Production
|
|
227
186
|
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
$env:ENV = "dev"
|
|
231
|
-
envilder --map=env-map.json --envfile=.env.dev
|
|
187
|
+
envilder --map=param-map.json --envfile=.env.production --profile=prod-account
|
|
188
|
+
```
|
|
232
189
|
|
|
233
|
-
|
|
234
|
-
$env:ENV = "stage"
|
|
235
|
-
envilder --map=env-map.json --envfile=.env.stage
|
|
236
|
-
|
|
237
|
-
# Production
|
|
238
|
-
$env:ENV = "prod"
|
|
239
|
-
envilder --map=env-map.json --envfile=.env.prod --profile=prod-account
|
|
240
|
-
```
|
|
190
|
+
---
|
|
241
191
|
|
|
242
|
-
|
|
192
|
+
## Sample output 📄
|
|
243
193
|
|
|
244
|
-
|
|
194
|
+
Example `.env` file generated:
|
|
245
195
|
|
|
246
196
|
```ini
|
|
247
197
|
SECRET_TOKEN=mockedEmail@example.com
|
|
248
198
|
SECRET_KEY=mockedPassword
|
|
249
199
|
```
|
|
250
200
|
|
|
251
|
-
|
|
201
|
+
---
|
|
252
202
|
|
|
253
|
-
|
|
203
|
+
## Roadmap 🗺️
|
|
254
204
|
|
|
255
|
-
|
|
256
|
-
- **🔄 Always fresh credentials** - Update a secret in SSM and everyone gets it automatically on next run
|
|
257
|
-
- **🛡️ Access control built-in** - Developers only see dev secrets, CI/CD systems see what they need
|
|
258
|
-
- **🧠 Zero mental overhead** - No need to remember which variables are needed - the mapping defines everything
|
|
259
|
-
- **🚫 No more sharing secrets** - Stop pasting credentials in Slack, email, or Notion documents
|
|
260
|
-
- **📋 Compliance ready** - All accesses are logged in AWS CloudTrail for auditing
|
|
205
|
+
See [ROADMAP.md](./ROADMAP.md) for planned features and ideas.
|
|
261
206
|
|
|
262
|
-
|
|
207
|
+
---
|
|
263
208
|
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
209
|
+
## Contributing 🤝
|
|
210
|
+
|
|
211
|
+
Contributions are welcome! Please see the [contributing guidelines](https://github.com/macalbert/envilder/blob/main/.github/pull_request_template.md).
|
|
267
212
|
|
|
268
|
-
|
|
213
|
+
Feel free to open issues or pull requests.
|
|
269
214
|
|
|
270
|
-
|
|
215
|
+
---
|
|
271
216
|
|
|
272
|
-
|
|
217
|
+
## License 📄
|
|
273
218
|
|
|
274
|
-
|
|
219
|
+
MIT © [Marçal Albert](https://github.com/macalbert).
|
|
275
220
|
|
|
276
|
-
|
|
221
|
+
See [LICENSE](./LICENSE) for details.
|
package/lib/Cli.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Cli.d.ts","sourceRoot":"","sources":["../src/Cli.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"Cli.d.ts","sourceRoot":"","sources":["../src/Cli.ts"],"names":[],"mappings":";AAOA;;;;;;GAMG;AACH,wBAAsB,IAAI,kBA4BzB"}
|
package/lib/Cli.js
CHANGED
|
@@ -8,41 +8,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
|
-
import { existsSync, readFileSync } from 'node:fs';
|
|
12
11
|
import { dirname, join } from 'node:path';
|
|
13
12
|
import { fileURLToPath } from 'node:url';
|
|
14
13
|
import { Command } from 'commander';
|
|
15
|
-
import { EnvilderBuilder } from './cli/
|
|
16
|
-
|
|
17
|
-
const __dirname = dirname(__filename);
|
|
18
|
-
/**
|
|
19
|
-
* Find the package.json file by traversing up directories
|
|
20
|
-
* @param startDir The directory to start searching from
|
|
21
|
-
* @param maxDepth Maximum number of parent directories to check
|
|
22
|
-
* @returns Path to package.json if found, or null if not found
|
|
23
|
-
*/
|
|
24
|
-
function findPackageJson(startDir, maxDepth = 5) {
|
|
25
|
-
let currentDir = startDir;
|
|
26
|
-
let depth = 0;
|
|
27
|
-
while (depth < maxDepth) {
|
|
28
|
-
const packagePath = join(currentDir, 'package.json');
|
|
29
|
-
if (existsSync(packagePath)) {
|
|
30
|
-
return packagePath;
|
|
31
|
-
}
|
|
32
|
-
// Go up one directory
|
|
33
|
-
const parentDir = dirname(currentDir);
|
|
34
|
-
if (parentDir === currentDir) {
|
|
35
|
-
// We've reached the root
|
|
36
|
-
break;
|
|
37
|
-
}
|
|
38
|
-
currentDir = parentDir;
|
|
39
|
-
depth++;
|
|
40
|
-
}
|
|
41
|
-
return null;
|
|
42
|
-
}
|
|
43
|
-
// Get package.json path by searching up from current file
|
|
44
|
-
const packageJsonPath = findPackageJson(__dirname) || join(__dirname, '..', '..', 'package.json');
|
|
45
|
-
const packageJson = JSON.parse(readFileSync(packageJsonPath, 'utf8'));
|
|
14
|
+
import { EnvilderBuilder } from './cli/application/builders/EnvilderBuilder.js';
|
|
15
|
+
import { PackageJsonFinder } from './cli/infrastructure/PackageJsonFinder.js';
|
|
46
16
|
/**
|
|
47
17
|
* Parses CLI arguments and runs the environment file generator.
|
|
48
18
|
*
|
|
@@ -53,10 +23,11 @@ const packageJson = JSON.parse(readFileSync(packageJsonPath, 'utf8'));
|
|
|
53
23
|
export function main() {
|
|
54
24
|
return __awaiter(this, void 0, void 0, function* () {
|
|
55
25
|
const program = new Command();
|
|
26
|
+
const version = yield getVersion();
|
|
56
27
|
program
|
|
57
28
|
.name('envilder')
|
|
58
29
|
.description('A CLI tool to generate .env files from AWS SSM parameters')
|
|
59
|
-
.version(
|
|
30
|
+
.version(version)
|
|
60
31
|
.requiredOption('--map <path>', 'Path to the JSON file with environment variable mapping')
|
|
61
32
|
.requiredOption('--envfile <path>', 'Path to the .env file to be generated')
|
|
62
33
|
.option('--profile <name>', 'AWS CLI profile to use');
|
|
@@ -72,7 +43,11 @@ export function main() {
|
|
|
72
43
|
yield envilder.run(options.map, options.envfile);
|
|
73
44
|
});
|
|
74
45
|
}
|
|
75
|
-
|
|
46
|
+
function getVersion() {
|
|
47
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
48
|
+
const __dirname = dirname(__filename);
|
|
49
|
+
return new PackageJsonFinder().readPackageJsonVersion(join(__dirname, '../package.json'));
|
|
50
|
+
}
|
|
76
51
|
main().catch((error) => {
|
|
77
52
|
console.error('🚨 Uh-oh! Looks like Mario fell into the wrong pipe! 🍄💥');
|
|
78
53
|
console.error(error);
|
package/lib/Cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Cli.js","sourceRoot":"","sources":["../src/Cli.ts"],"names":[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OAAO,CAAC,OAAO,CAAC,CAAC;IACnD,CAAC;CAAA;AAED,SAAS,UAAU;IACjB,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAClD,MAAM,SAAS,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;IAEtC,OAAO,IAAI,iBAAiB,EAAE,CAAC,sBAAsB,CACnD,IAAI,CAAC,SAAS,EAAE,iBAAiB,CAAC,CACnC,CAAC;AACJ,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;IACrB,OAAO,CAAC,KAAK,CAAC,2DAA2D,CAAC,CAAC;IAC3E,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC,CAAC,CAAC"}
|
|
@@ -13,6 +13,7 @@ export declare class Envilder {
|
|
|
13
13
|
* @param envFilePath - Path to the local environment file to read and update.
|
|
14
14
|
*/
|
|
15
15
|
run(mapPath: string, envFilePath: string): Promise<void>;
|
|
16
|
-
private
|
|
16
|
+
private envild;
|
|
17
|
+
private processSecret;
|
|
17
18
|
}
|
|
18
19
|
//# sourceMappingURL=EnvilderHandler.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EnvilderHandler.d.ts","sourceRoot":"","sources":["../../../src/cli/application/EnvilderHandler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AACvE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAEvE,qBAAa,QAAQ;IACnB,OAAO,CAAC,QAAQ,CAAkB;IAClC,OAAO,CAAC,cAAc,CAAkB;gBAE5B,QAAQ,EAAE,eAAe,EAAE,cAAc,EAAE,eAAe;IAKtE;;;;;;;OAOG;IACG,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM;
|
|
1
|
+
{"version":3,"file":"EnvilderHandler.d.ts","sourceRoot":"","sources":["../../../src/cli/application/EnvilderHandler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AACvE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAEvE,qBAAa,QAAQ;IACnB,OAAO,CAAC,QAAQ,CAAkB;IAClC,OAAO,CAAC,cAAc,CAAkB;gBAE5B,QAAQ,EAAE,eAAe,EAAE,cAAc,EAAE,eAAe;IAKtE;;;;;;;OAOG;IACG,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM;YAmBhC,MAAM;YAuBN,aAAa;CAqB5B"}
|
|
@@ -22,41 +22,50 @@ export class Envilder {
|
|
|
22
22
|
*/
|
|
23
23
|
run(mapPath, envFilePath) {
|
|
24
24
|
return __awaiter(this, void 0, void 0, function* () {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
25
|
+
try {
|
|
26
|
+
const requestVariables = yield this.envFileManager.loadMapFile(mapPath);
|
|
27
|
+
const currentVariables = yield this.envFileManager.loadEnvFile(envFilePath);
|
|
28
|
+
const envilded = yield this.envild(requestVariables, currentVariables);
|
|
29
|
+
yield this.envFileManager.saveEnvFile(envFilePath, envilded);
|
|
30
|
+
console.log(`Environment File generated at '${envFilePath}'`);
|
|
31
|
+
}
|
|
32
|
+
catch (error) {
|
|
33
|
+
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
34
|
+
console.error(`Failed to generate environment file: ${errorMessage}`);
|
|
35
|
+
throw error;
|
|
36
|
+
}
|
|
30
37
|
});
|
|
31
38
|
}
|
|
32
|
-
|
|
39
|
+
envild(paramMap, existingEnvVariables) {
|
|
33
40
|
return __awaiter(this, void 0, void 0, function* () {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
if (!value) {
|
|
40
|
-
console.error(`Warning: No value found for: '${secretName}'`);
|
|
41
|
-
continue;
|
|
42
|
-
}
|
|
43
|
-
existingEnvVariables[envVar] = value;
|
|
44
|
-
console.log(`${envVar}=${value.length > 10 ? '*'.repeat(value.length - 3) + value.slice(-3) : '*'.repeat(value.length)}`);
|
|
45
|
-
}
|
|
46
|
-
catch (error) {
|
|
47
|
-
console.error(`Error fetching parameter: '${secretName}'`);
|
|
48
|
-
errors.push(`ParameterNotFound: ${secretName}`);
|
|
49
|
-
}
|
|
41
|
+
const errors = [];
|
|
42
|
+
for (const [envVar, secretName] of Object.entries(paramMap)) {
|
|
43
|
+
const error = yield this.processSecret(envVar, secretName, existingEnvVariables);
|
|
44
|
+
if (error) {
|
|
45
|
+
errors.push(error);
|
|
50
46
|
}
|
|
51
|
-
|
|
52
|
-
|
|
47
|
+
}
|
|
48
|
+
if (errors.length > 0) {
|
|
49
|
+
throw new Error(`Some parameters could not be fetched:\n${errors.join('\n')}`);
|
|
50
|
+
}
|
|
51
|
+
return existingEnvVariables;
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
processSecret(envVar, secretName, existingEnvVariables) {
|
|
55
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
56
|
+
try {
|
|
57
|
+
const value = yield this.keyVault.getSecret(secretName);
|
|
58
|
+
if (!value) {
|
|
59
|
+
console.error(`Warning: No value found for: '${secretName}'`);
|
|
60
|
+
return null;
|
|
53
61
|
}
|
|
54
|
-
|
|
62
|
+
existingEnvVariables[envVar] = value;
|
|
63
|
+
console.log(`${envVar}=${value.length > 10 ? '*'.repeat(value.length - 3) + value.slice(-3) : '*'.repeat(value.length)}`);
|
|
64
|
+
return null;
|
|
55
65
|
}
|
|
56
66
|
catch (error) {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
throw error;
|
|
67
|
+
console.error(`Error fetching parameter: '${secretName}'`);
|
|
68
|
+
return `ParameterNotFound: ${secretName}`;
|
|
60
69
|
}
|
|
61
70
|
});
|
|
62
71
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EnvilderHandler.js","sourceRoot":"","sources":["../../../src/cli/application/EnvilderHandler.ts"],"names":[],"mappings":";;;;;;;;;AAGA,MAAM,OAAO,QAAQ;IAInB,YAAY,QAAyB,EAAE,cAA+B;QACpE,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;IACvC,CAAC;IAED;;;;;;;OAOG;IACG,GAAG,CAAC,OAAe,EAAE,WAAmB;;YAC5C,MAAM,
|
|
1
|
+
{"version":3,"file":"EnvilderHandler.js","sourceRoot":"","sources":["../../../src/cli/application/EnvilderHandler.ts"],"names":[],"mappings":";;;;;;;;;AAGA,MAAM,OAAO,QAAQ;IAInB,YAAY,QAAyB,EAAE,cAA+B;QACpE,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;IACvC,CAAC;IAED;;;;;;;OAOG;IACG,GAAG,CAAC,OAAe,EAAE,WAAmB;;YAC5C,IAAI,CAAC;gBACH,MAAM,gBAAgB,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;gBACxE,MAAM,gBAAgB,GACpB,MAAM,IAAI,CAAC,cAAc,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;gBAErD,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,gBAAgB,EAAE,gBAAgB,CAAC,CAAC;gBAEvE,MAAM,IAAI,CAAC,cAAc,CAAC,WAAW,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;gBAE7D,OAAO,CAAC,GAAG,CAAC,kCAAkC,WAAW,GAAG,CAAC,CAAC;YAChE,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,MAAM,YAAY,GAChB,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,C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G,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,CAC7G,CAAC;gBACF,OAAO,IAAI,CAAC;YACd,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,OAAO,CAAC,KAAK,CAAC,8BAA8B,UAAU,GAAG,CAAC,CAAC;gBAC3D,OAAO,sBAAsB,UAAU,EAAE,CAAC;YAC5C,CAAC;QACH,CAAC;KAAA;CACF"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import type {
|
|
3
|
-
import
|
|
1
|
+
import type { IEnvFileManager } from '../../domain/ports/IEnvFileManager.js';
|
|
2
|
+
import type { ISecretProvider } from '../../domain/ports/ISecretProvider.js';
|
|
3
|
+
import { Envilder } from '../EnvilderHandler.js';
|
|
4
4
|
export declare class EnvilderBuilder {
|
|
5
5
|
private provider?;
|
|
6
6
|
private fileManager?;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EnvilderBuilder.d.ts","sourceRoot":"","sources":["../../../../src/cli/application/builders/EnvilderBuilder.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AAC7E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AAG7E,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEjD,qBAAa,eAAe;IAC1B,OAAO,CAAC,QAAQ,CAAC,CAAkB;IACnC,OAAO,CAAC,WAAW,CAAC,CAAkB;IAEtC,MAAM,CAAC,KAAK,IAAI,eAAe;IAI/B,sBAAsB,IAAI,IAAI;IAK9B,kBAAkB,CAAC,WAAW,EAAE,eAAe,GAAG,IAAI;IAKtD,YAAY,CAAC,QAAQ,EAAE,eAAe,GAAG,IAAI;IAK7C,eAAe,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI;IAWvC,MAAM,IAAI,QAAQ;CAWnB"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { SSM } from '@aws-sdk/client-ssm';
|
|
2
2
|
import { fromIni } from '@aws-sdk/credential-providers';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
3
|
+
import { AwsSsmSecretProvider } from '../../infrastructure/AwsSsmSecretProvider.js';
|
|
4
|
+
import { EnvFileManager } from '../../infrastructure/EnvFileManager.js';
|
|
5
|
+
import { Envilder } from '../EnvilderHandler.js';
|
|
6
6
|
export class EnvilderBuilder {
|
|
7
7
|
static build() {
|
|
8
8
|
return new EnvilderBuilder();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EnvilderBuilder.js","sourceRoot":"","sources":["../../../../src/cli/application/builders/EnvilderBuilder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,qBAAqB,CAAC;AAE1C,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AAGxD,OAAO,EAAE,oBAAoB,EAAE,MAAM,8CAA8C,CAAC;AACpF,OAAO,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AACxE,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEjD,MAAM,OAAO,eAAe;IAI1B,MAAM,CAAC,KAAK;QACV,OAAO,IAAI,eAAe,EAAE,CAAC;IAC/B,CAAC;IAED,sBAAsB;QACpB,IAAI,CAAC,WAAW,GAAG,IAAI,cAAc,EAAE,CAAC;QACxC,OAAO,IAAI,CAAC;IACd,CAAC;IAED,kBAAkB,CAAC,WAA4B;QAC7C,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B,OAAO,IAAI,CAAC;IACd,CAAC;IAED,YAAY,CAAC,QAAyB;QACpC,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,eAAe,CAAC,OAAgB;QAC9B,MAAM,GAAG,GACP,OAAO,IAAI,IAAI;YACb,CAAC,CAAC,IAAI,GAAG,EAAE;YACX,CAAC,CAAC,IAAI,GAAG,CAAC;gBACN,WAAW,EAAE,OAAO,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC;aACxB,CAAC,CAAC;QAC5B,IAAI,CAAC,QAAQ,GAAG,IAAI,oBAAoB,CAAC,GAAG,CAAC,CAAC;QAC9C,OAAO,IAAI,CAAC;IACd,CAAC;IAED,MAAM;QACJ,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;YACnB,MAAM,IAAI,KAAK,CAAC,mCAAmC,CAAC,CAAC;QACvD,CAAC;QAED,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC;YACtB,MAAM,IAAI,KAAK,CAAC,oCAAoC,CAAC,CAAC;QACxD,CAAC;QAED,OAAO,IAAI,QAAQ,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;IACvD,CAAC;CACF"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export interface IEnvFileManager {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
loadMapFile(mapPath: string): Promise<Record<string, string>>;
|
|
3
|
+
loadEnvFile(envFilePath: string): Promise<Record<string, string>>;
|
|
4
|
+
saveEnvFile(envFilePath: string, envVariables: Record<string, string>): Promise<void>;
|
|
5
5
|
}
|
|
6
6
|
//# sourceMappingURL=IEnvFileManager.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IEnvFileManager.d.ts","sourceRoot":"","sources":["../../../../src/cli/domain/ports/IEnvFileManager.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,eAAe;IAC9B,
|
|
1
|
+
{"version":3,"file":"IEnvFileManager.d.ts","sourceRoot":"","sources":["../../../../src/cli/domain/ports/IEnvFileManager.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,eAAe;IAC9B,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IAC9D,WAAW,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IAClE,WAAW,CACT,WAAW,EAAE,MAAM,EACnB,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GACnC,OAAO,CAAC,IAAI,CAAC,CAAC;CAClB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AwsSsmSecretProvider.d.ts","sourceRoot":"","sources":["../../../src/cli/infrastructure/AwsSsmSecretProvider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,KAAK,GAAG,EAAE,MAAM,qBAAqB,CAAC;AACpE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAEvE,qBAAa,oBAAqB,YAAW,eAAe;IAC1D,OAAO,CAAC,GAAG,CAAM;gBAEL,GAAG,EAAE,GAAG;IAId,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;CAQ3D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AwsSsmSecretProvider.js","sourceRoot":"","sources":["../../../src/cli/infrastructure/AwsSsmSecretProvider.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,mBAAmB,EAAY,MAAM,qBAAqB,CAAC;AAGpE,MAAM,OAAO,oBAAoB;IAG/B,YAAY,GAAQ;QAClB,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;IACjB,CAAC;IAEK,SAAS,CAAC,IAAY;;YAC1B,MAAM,OAAO,GAAG,IAAI,mBAAmB,CAAC;gBACtC,IAAI,EAAE,IAAI;gBACV,cAAc,EAAE,IAAI;aACrB,CAAC,CAAC;YACH,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YACnD,OAAO,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,KAAK,CAAC;QAC1B,CAAC;KAAA;CACF"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { IEnvFileManager } from '../domain/ports/IEnvFileManager';
|
|
2
2
|
export declare class EnvFileManager implements IEnvFileManager {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
loadMapFile(mapPath: string): Promise<Record<string, string>>;
|
|
4
|
+
loadEnvFile(envFilePath: string): Promise<Record<string, string>>;
|
|
5
|
+
saveEnvFile(envFilePath: string, envVariables: Record<string, string>): Promise<void>;
|
|
6
|
+
private escapeEnvValue;
|
|
6
7
|
}
|
|
7
8
|
//# sourceMappingURL=EnvFileManager.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EnvFileManager.d.ts","sourceRoot":"","sources":["../../../src/cli/infrastructure/EnvFileManager.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAEvE,qBAAa,cAAe,YAAW,eAAe;
|
|
1
|
+
{"version":3,"file":"EnvFileManager.d.ts","sourceRoot":"","sources":["../../../src/cli/infrastructure/EnvFileManager.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAEvE,qBAAa,cAAe,YAAW,eAAe;IAC9C,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAU7D,WAAW,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAajE,WAAW,CACf,WAAW,EAAE,MAAM,EACnB,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GACnC,OAAO,CAAC,IAAI,CAAC;IAOhB,OAAO,CAAC,cAAc;CAGvB"}
|
|
@@ -1,37 +1,52 @@
|
|
|
1
|
-
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
import * as fs from 'node:fs/promises';
|
|
2
11
|
import * as dotenv from 'dotenv';
|
|
3
12
|
export class EnvFileManager {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
+
loadMapFile(mapPath) {
|
|
14
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
15
|
+
const content = yield fs.readFile(mapPath, 'utf-8');
|
|
16
|
+
try {
|
|
17
|
+
return JSON.parse(content);
|
|
18
|
+
}
|
|
19
|
+
catch (err) {
|
|
20
|
+
console.error(`Error parsing JSON from ${mapPath}`);
|
|
21
|
+
throw new Error(`Invalid JSON in parameter map file: ${mapPath}`);
|
|
22
|
+
}
|
|
23
|
+
});
|
|
13
24
|
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
25
|
+
loadEnvFile(envFilePath) {
|
|
26
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
27
|
+
const envVariables = {};
|
|
28
|
+
try {
|
|
29
|
+
yield fs.access(envFilePath);
|
|
30
|
+
}
|
|
31
|
+
catch (_a) {
|
|
32
|
+
return envVariables;
|
|
33
|
+
}
|
|
34
|
+
const existingEnvContent = yield fs.readFile(envFilePath, 'utf-8');
|
|
35
|
+
const parsedEnv = dotenv.parse(existingEnvContent);
|
|
36
|
+
Object.assign(envVariables, parsedEnv);
|
|
17
37
|
return envVariables;
|
|
18
|
-
}
|
|
19
|
-
const existingEnvContent = fs.readFileSync(envFilePath, 'utf-8');
|
|
20
|
-
const parsedEnv = dotenv.parse(existingEnvContent);
|
|
21
|
-
Object.assign(envVariables, parsedEnv);
|
|
22
|
-
return envVariables;
|
|
38
|
+
});
|
|
23
39
|
}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
.
|
|
27
|
-
|
|
28
|
-
.
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
fs.writeFileSync(envFilePath, envContent);
|
|
40
|
+
saveEnvFile(envFilePath, envVariables) {
|
|
41
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
42
|
+
const envContent = Object.entries(envVariables)
|
|
43
|
+
.map(([key, value]) => `${key}=${this.escapeEnvValue(value)}`)
|
|
44
|
+
.join('\n');
|
|
45
|
+
yield fs.writeFile(envFilePath, envContent);
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
escapeEnvValue(value) {
|
|
49
|
+
return value.replace(/(\r\n|\n|\r)/g, '\\n');
|
|
35
50
|
}
|
|
36
51
|
}
|
|
37
52
|
//# sourceMappingURL=EnvFileManager.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EnvFileManager.js","sourceRoot":"","sources":["../../../src/cli/infrastructure/EnvFileManager.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"EnvFileManager.js","sourceRoot":"","sources":["../../../src/cli/infrastructure/EnvFileManager.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACvC,OAAO,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,CAAC,CAAC;QAC9C,CAAC;KAAA;IAEO,cAAc,CAAC,KAAa;QAClC,OAAO,KAAK,CAAC,OAAO,CAAC,eAAe,EAAE,KAAK,CAAC,CAAC;IAC/C,CAAC;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PackageJsonFinder.d.ts","sourceRoot":"","sources":["../../../src/cli/infrastructure/PackageJsonFinder.ts"],"names":[],"mappings":"AAEA,qBAAa,iBAAiB;IACtB,sBAAsB,CAAC,eAAe,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAsBtE,OAAO,CAAC,aAAa;CAMtB"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
import { promises as fs } from 'node:fs';
|
|
11
|
+
export class PackageJsonFinder {
|
|
12
|
+
readPackageJsonVersion(packageJsonPath) {
|
|
13
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
14
|
+
try {
|
|
15
|
+
yield fs.access(packageJsonPath);
|
|
16
|
+
const content = yield fs.readFile(packageJsonPath, 'utf8');
|
|
17
|
+
const pkg = JSON.parse(content);
|
|
18
|
+
if (typeof pkg.version !== 'string') {
|
|
19
|
+
throw new Error('Version field not found in package.json');
|
|
20
|
+
}
|
|
21
|
+
return pkg.version;
|
|
22
|
+
}
|
|
23
|
+
catch (err) {
|
|
24
|
+
if (this.isEnoentError(err)) {
|
|
25
|
+
throw new Error('package.json not found');
|
|
26
|
+
}
|
|
27
|
+
throw new Error(`Failed to read or parse package.json: ${err instanceof Error ? err.message : String(err)}`);
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
isEnoentError(err) {
|
|
32
|
+
if (!(err instanceof Error)) {
|
|
33
|
+
return false;
|
|
34
|
+
}
|
|
35
|
+
return 'code' in err && err.code === 'ENOENT';
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=PackageJsonFinder.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PackageJsonFinder.js","sourceRoot":"","sources":["../../../src/cli/infrastructure/PackageJsonFinder.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,MAAM,SAAS,CAAC;AAEzC,MAAM,OAAO,iBAAiB;IACtB,sBAAsB,CAAC,eAAuB;;YAClD,IAAI,CAAC;gBACH,MAAM,EAAE,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC;gBACjC,MAAM,OAAO,GAAG,MAAM,EAAE,CAAC,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC,CAAC;gBAC3D,MAAM,GAAG,GAA0B,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;gBAEvD,IAAI,OAAO,GAAG,CAAC,OAAO,KAAK,QAAQ,EAAE,CAAC;oBACpC,MAAM,IAAI,KAAK,CAAC,yCAAyC,CAAC,CAAC;gBAC7D,CAAC;gBAED,OAAO,GAAG,CAAC,OAAO,CAAC;YACrB,CAAC;YAAC,OAAO,GAAG,EAAE,CAAC;gBACb,IAAI,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,EAAE,CAAC;oBAC5B,MAAM,IAAI,KAAK,CAAC,wBAAwB,CAAC,CAAC;gBAC5C,CAAC;gBAED,MAAM,IAAI,KAAK,CACb,yCAAyC,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAC5F,CAAC;YACJ,CAAC;QACH,CAAC;KAAA;IAEO,aAAa,CAAC,GAAY;QAChC,IAAI,CAAC,CAAC,GAAG,YAAY,KAAK,CAAC,EAAE,CAAC;YAC5B,OAAO,KAAK,CAAC;QACf,CAAC;QACD,OAAO,MAAM,IAAI,GAAG,IAAK,GAAyB,CAAC,IAAI,KAAK,QAAQ,CAAC;IACvE,CAAC;CACF"}
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "envilder",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.5",
|
|
4
4
|
"description": "A CLI that securely centralizes your environment variables from AWS SSM as a single source of truth",
|
|
5
5
|
"main": "./lib/Cli.js",
|
|
6
6
|
"bin": {
|
|
7
7
|
"envilder": "lib/Cli.js"
|
|
8
8
|
},
|
|
9
9
|
"scripts": {
|
|
10
|
-
"clean": "
|
|
10
|
+
"clean": "npm cache clean --force && npx rimraf lib && npx rimraf coverage && npx rimraf node_modules",
|
|
11
11
|
"build": "tsc",
|
|
12
12
|
"local:install": "npm run build && node --loader ts-node/esm scripts/pack-and-install.ts",
|
|
13
13
|
"local:test-run": "npm run build && node lib/cli/cli.js --map=tests/cli/sample/param-map.json --envfile=tests/cli/sample/autogenerated.env",
|
|
@@ -15,7 +15,8 @@
|
|
|
15
15
|
"format:write": "biome format --write",
|
|
16
16
|
"lint": "secretlint \"**/*\" && biome check --write && tsc --noEmit",
|
|
17
17
|
"lint:fix": "biome lint --fix",
|
|
18
|
-
"test": "vitest run --reporter
|
|
18
|
+
"test": "vitest run --reporter=verbose --coverage",
|
|
19
|
+
"test:ci": "vitest run --reporter=verbose --reporter=junit --coverage --outputFile=coverage/junit/test-results.xml",
|
|
19
20
|
"npm-publish": "npm run lint && npm run build && npm run test && npm pack --dry-run && npm publish",
|
|
20
21
|
"npm-release-patch": "npm version patch",
|
|
21
22
|
"npm-release-minor": "npm version minor",
|
|
@@ -69,9 +70,9 @@
|
|
|
69
70
|
"@biomejs/biome": "^1.9.1",
|
|
70
71
|
"@secretlint/secretlint-rule-preset-recommend": "^9.3.2",
|
|
71
72
|
"@testcontainers/localstack": "^11.0.1",
|
|
73
|
+
"@types/glob": "^8.1.0",
|
|
72
74
|
"@vitest/coverage-v8": "^3.1.1",
|
|
73
|
-
"
|
|
74
|
-
"rimraf": "^6.0.1",
|
|
75
|
+
"glob": "^11.0.2",
|
|
75
76
|
"secretlint": "^9.3.2",
|
|
76
77
|
"testcontainers": "^11.0.1",
|
|
77
78
|
"ts-node": "^10.9.2",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"EnvilderBuilder.d.ts","sourceRoot":"","sources":["../../../src/cli/domain/EnvilderBuilder.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,EAAE,MAAM,mCAAmC,CAAC;AAG7D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAElE,qBAAa,eAAe;IAC1B,OAAO,CAAC,QAAQ,CAAC,CAAkB;IACnC,OAAO,CAAC,WAAW,CAAC,CAAkB;IAEtC,MAAM,CAAC,KAAK,IAAI,eAAe;IAI/B,sBAAsB,IAAI,IAAI;IAK9B,kBAAkB,CAAC,WAAW,EAAE,eAAe,GAAG,IAAI;IAKtD,YAAY,CAAC,QAAQ,EAAE,eAAe,GAAG,IAAI;IAK7C,eAAe,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI;IAYvC,MAAM,IAAI,QAAQ;CAWnB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"EnvilderBuilder.js","sourceRoot":"","sources":["../../../src/cli/domain/EnvilderBuilder.ts"],"names":[],"mappings":"AAAA,OAAO,E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,QAAQ,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;IACvD,CAAC;CACF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AwsSsmStoreSecrets.d.ts","sourceRoot":"","sources":["../../../src/cli/infrastructure/AwsSsmStoreSecrets.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,KAAK,GAAG,EAAE,MAAM,qBAAqB,CAAC;AACpE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAEvE,qBAAa,oBAAqB,YAAW,eAAe;IAC1D,OAAO,CAAC,GAAG,CAAM;gBAEL,GAAG,EAAE,GAAG;IAId,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;CAQ3D"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AwsSsmStoreSecrets.js","sourceRoot":"","sources":["../../../src/cli/infrastructure/AwsSsmStoreSecrets.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,mBAAmB,EAAY,MAAM,qBAAqB,CAAC;AAGpE,MAAM,OAAO,oBAAoB;IAG/B,YAAY,GAAQ;QAClB,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;IACjB,CAAC;IAEK,SAAS,CAAC,IAAY;;YAC1B,MAAM,OAAO,GAAG,IAAI,mBAAmB,CAAC;gBACtC,IAAI,EAAE,IAAI;gBACV,cAAc,EAAE,IAAI;aACrB,CAAC,CAAC;YACH,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YACnD,OAAO,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,KAAK,CAAC;QAC1B,CAAC;KAAA;CACF"}
|