envilder 0.1.4 β†’ 0.1.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 CHANGED
@@ -1,15 +1,15 @@
1
- # Envilder
1
+ # 🌱 Envilder
2
2
 
3
3
  **Envilder** is a CLI tool designed to generate `.env` files from AWS SSM parameters. This is useful for managing environment variables securely in your projects without exposing sensitive information in your codebase.
4
4
 
5
- ## Features
5
+ ## ✨ Features
6
6
 
7
- - Fetch parameters securely from AWS SSM Parameter Store.
8
- - Automatically generates a `.env` file with specified parameters.
9
- - Handles both encrypted and unencrypted SSM parameters.
10
- - Lightweight and simple to use.
7
+ - πŸ”’ Fetch parameters securely from AWS SSM Parameter Store.
8
+ - ⚑ Automatically generates a `.env` file with specified parameters.
9
+ - πŸ›‘οΈ Handles both encrypted and unencrypted SSM parameters.
10
+ - πŸͺΆ Lightweight and simple to use.
11
11
 
12
- ## Installation
12
+ ## πŸ“¦ Installation
13
13
 
14
14
  You can install **envilder** globally or locally using npm:
15
15
 
@@ -17,20 +17,14 @@ You can install **envilder** globally or locally using npm:
17
17
  npm install -g envilder
18
18
  ```
19
19
 
20
- Or add it as a dependency in your project:
21
-
22
- ```bash
23
- npm install envilder
24
- ```
25
-
26
- ## Usage
20
+ ## πŸš€ Usage
27
21
 
28
22
  Envilder requires two arguments:
29
23
 
30
24
  - `--map <path>`: Path to a JSON file mapping environment variable names to SSM parameters.
31
25
  - `--envfile <path>`: Path where the generated .env file will be saved.
32
26
 
33
- ## Example
27
+ ## πŸ”§ Example
34
28
 
35
29
  1. Create a mapping file `param_map.json`:
36
30
 
@@ -44,19 +38,19 @@ Envilder requires two arguments:
44
38
  2. Run envilder to generate your `.env` file:
45
39
 
46
40
  ```bash
47
- envilder --map=path/to/param_map.json --envfile=.env
41
+ envilder --map=param_map.json --envfile=.env
48
42
  ```
49
43
 
50
44
  3. The `.env` file will be generated in the specified location.
51
45
 
52
- ## Sample `.env` Output:
46
+ ## πŸ“‚ Sample `.env` Output
53
47
 
54
48
  ```makefile
55
49
  NEXT_PUBLIC_CREDENTIAL_EMAIL=mockedEmail@example.com
56
50
  NEXT_PUBLIC_CREDENTIAL_PASSWORD=mockedPassword
57
51
  ```
58
52
 
59
- ## Running Tests
53
+ ## πŸ§ͺ Running Tests
60
54
 
61
55
  To run the tests with coverage:
62
56
 
@@ -64,12 +58,10 @@ To run the tests with coverage:
64
58
  yarn test
65
59
  ```
66
60
 
67
- ## License
61
+ ## πŸ“ License
68
62
 
69
63
  This project is licensed under the MIT License - see the [LICENSE](./LICENSE) file for details.
70
64
 
71
- ## Contributing
65
+ ## πŸ™Œ Contributing
72
66
 
73
67
  Contributions are welcome! Feel free to submit issues and pull requests.
74
-
75
- Created by [MarΓ§al Albert](https://github.com/macalbert).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "envilder",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "description": "A CLI tool to generate .env files from AWS SSM parameters",
5
5
  "exports": {
6
6
  ".": {
@@ -48,8 +48,6 @@ describe('Envilder CLI', () => {
48
48
  const envFileContent = fs.readFileSync(mockEnvFilePath, 'utf-8');
49
49
  expect(envFileContent).toContain('NEXT_PUBLIC_CREDENTIAL_EMAIL=mockedEmail@example.com');
50
50
  expect(envFileContent).toContain('NEXT_PUBLIC_CREDENTIAL_PASSWORD=mockedPassword');
51
-
52
- // Cleanup
53
51
  fs.unlinkSync(mockEnvFilePath);
54
52
  fs.unlinkSync(mockMapPath);
55
53
  });
@@ -63,10 +61,11 @@ describe('Envilder CLI', () => {
63
61
  };
64
62
  fs.writeFileSync(mockMapPath, JSON.stringify(paramMapContent));
65
63
 
66
- // Act & Assert
67
- await expect(run(mockMapPath, mockEnvFilePath)).rejects.toThrow('ParameterNotFound: /path/to/ssm/unknown-email');
64
+ // Act
65
+ const action = run(mockMapPath, mockEnvFilePath);
68
66
 
69
- // Cleanup
67
+ // Assert
68
+ await expect(action).rejects.toThrow('ParameterNotFound: /path/to/ssm/unknown-email');
70
69
  fs.unlinkSync(mockMapPath);
71
70
  });
72
71
  });