ac-awssecrets 2.3.0 → 2.3.2
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 +25 -0
- package/index.js +3 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,28 @@
|
|
|
1
|
+
<a name="2.3.2"></a>
|
|
2
|
+
|
|
3
|
+
## [2.3.2](https://github.com/admiralcloud/ac-awssecrets/compare/v2.3.1..v2.3.2) (2024-08-17 11:07:03)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fix
|
|
7
|
+
|
|
8
|
+
* **App:** Add option to throw error | MP | [ad5cac4088a0f6c921843662d600e6afdb5231c0](https://github.com/admiralcloud/ac-awssecrets/commit/ad5cac4088a0f6c921843662d600e6afdb5231c0)
|
|
9
|
+
Errors from AWS are caught and logged. With the new throwError option you can throw the error.
|
|
10
|
+
Related issues: [undefined/undefined#master](undefined/browse/master)
|
|
11
|
+
<a name="2.3.1"></a>
|
|
12
|
+
|
|
13
|
+
## [2.3.1](https://github.com/admiralcloud/ac-awssecrets/compare/v2.3.0..v2.3.1) (2024-08-17 10:57:27)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### Bug Fix
|
|
17
|
+
|
|
18
|
+
* **App:** Add ignoreInTestmode for secret params | MP | [0065e17890c41d01a2ce47a302ce9f2a818cbce3](https://github.com/admiralcloud/ac-awssecrets/commit/0065e17890c41d01a2ce47a302ce9f2a818cbce3)
|
|
19
|
+
If ignoreInTestmode is true in testmode, the secret parameter is not fetched.
|
|
20
|
+
Related issues: [undefined/undefined#master](undefined/browse/master)
|
|
21
|
+
### Chores
|
|
22
|
+
|
|
23
|
+
* **App:** Updated packages | MP | [53c458370aba20b633b7ebe33ab3e026bc95a133](https://github.com/admiralcloud/ac-awssecrets/commit/53c458370aba20b633b7ebe33ab3e026bc95a133)
|
|
24
|
+
Updated packages
|
|
25
|
+
Related issues: [undefined/undefined#master](undefined/browse/master)
|
|
1
26
|
<a name="2.3.0"></a>
|
|
2
27
|
|
|
3
28
|
# [2.3.0](https://github.com/admiralcloud/ac-awssecrets/compare/v2.2.1..v2.3.0) (2024-08-12 10:04:48)
|
package/index.js
CHANGED
|
@@ -79,7 +79,7 @@ const awsSecrets = () => {
|
|
|
79
79
|
|
|
80
80
|
|
|
81
81
|
|
|
82
|
-
const loadSecretParameters = async({ secretParameters = [], config = {}, testMode = 0, debug = false, region = 'eu-central-1' } = {}) => {
|
|
82
|
+
const loadSecretParameters = async({ secretParameters = [], config = {}, testMode = 0, debug = false, throwError = false, region = 'eu-central-1' } = {}) => {
|
|
83
83
|
const environment = config?.environment || process.env.NODE_ENV || 'development'
|
|
84
84
|
|
|
85
85
|
const awsConfig = {
|
|
@@ -120,10 +120,12 @@ const awsSecrets = () => {
|
|
|
120
120
|
}
|
|
121
121
|
catch (e) {
|
|
122
122
|
console.error('%s | %s | %s', functionName, parameterName, e?.message)
|
|
123
|
+
if (throwError) throw e
|
|
123
124
|
}
|
|
124
125
|
}
|
|
125
126
|
|
|
126
127
|
for (const secretParameter of secretParameters) {
|
|
128
|
+
if (environment === 'test' && secretParameter?.ignoreInTestMode) continue
|
|
127
129
|
await getSecretParameter(secretParameter)
|
|
128
130
|
}
|
|
129
131
|
}
|
package/package.json
CHANGED
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
"author": "Mark Poepping (https://www.admiralcloud.com)",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": "admiralcloud/ac-awssecrets",
|
|
6
|
-
"version": "2.3.
|
|
6
|
+
"version": "2.3.2",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@aws-sdk/client-secrets-manager": "^3.
|
|
9
|
-
"@aws-sdk/client-ssm": "^3.
|
|
8
|
+
"@aws-sdk/client-secrets-manager": "^3.632.0",
|
|
9
|
+
"@aws-sdk/client-ssm": "^3.632.0"
|
|
10
10
|
},
|
|
11
11
|
"devDependencies": {
|
|
12
12
|
"ac-semantic-release": "^0.4.2",
|