ac-awssecrets 2.3.1 → 2.3.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.
Files changed (3) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/index.js +3 -1
  3. package/package.json +4 -4
package/CHANGELOG.md CHANGED
@@ -1,3 +1,28 @@
1
+ <a name="2.3.3"></a>
2
+
3
+ ## [2.3.3](https://github.com/admiralcloud/ac-awssecrets/compare/v2.3.2..v2.3.3) (2024-09-28 08:08:07)
4
+
5
+
6
+ ### Bug Fix
7
+
8
+ * **App:** Fixed debug mode | MP | [3571c4d7bbfb3e3459c526303939259d8f0d83ae](https://github.com/admiralcloud/ac-awssecrets/commit/3571c4d7bbfb3e3459c526303939259d8f0d83ae)
9
+ Fixed debug mode
10
+ Related issues: [undefined/undefined#master](undefined/browse/master)
11
+ ### Chores
12
+
13
+ * **App:** Updated packages | MP | [8a0a5ff1ebb24d94d706257dd286ff0e8e90af5c](https://github.com/admiralcloud/ac-awssecrets/commit/8a0a5ff1ebb24d94d706257dd286ff0e8e90af5c)
14
+ Updated packages
15
+ Related issues: [undefined/undefined#master](undefined/browse/master)
16
+ <a name="2.3.2"></a>
17
+
18
+ ## [2.3.2](https://github.com/admiralcloud/ac-awssecrets/compare/v2.3.1..v2.3.2) (2024-08-17 11:07:03)
19
+
20
+
21
+ ### Bug Fix
22
+
23
+ * **App:** Add option to throw error | MP | [ad5cac4088a0f6c921843662d600e6afdb5231c0](https://github.com/admiralcloud/ac-awssecrets/commit/ad5cac4088a0f6c921843662d600e6afdb5231c0)
24
+ Errors from AWS are caught and logged. With the new throwError option you can throw the error.
25
+ Related issues: [undefined/undefined#master](undefined/browse/master)
1
26
  <a name="2.3.1"></a>
2
27
 
3
28
  ## [2.3.1](https://github.com/admiralcloud/ac-awssecrets/compare/v2.3.0..v2.3.1) (2024-08-17 10:57:27)
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,11 +120,13 @@ 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) {
127
128
  if (environment === 'test' && secretParameter?.ignoreInTestMode) continue
129
+ if (debug) secretParameter.debug = true
128
130
  await getSecretParameter(secretParameter)
129
131
  }
130
132
  }
package/package.json CHANGED
@@ -3,13 +3,13 @@
3
3
  "author": "Mark Poepping (https://www.admiralcloud.com)",
4
4
  "license": "MIT",
5
5
  "repository": "admiralcloud/ac-awssecrets",
6
- "version": "2.3.1",
6
+ "version": "2.3.3",
7
7
  "dependencies": {
8
- "@aws-sdk/client-secrets-manager": "^3.632.0",
9
- "@aws-sdk/client-ssm": "^3.632.0"
8
+ "@aws-sdk/client-secrets-manager": "^3.658.1",
9
+ "@aws-sdk/client-ssm": "^3.658.1"
10
10
  },
11
11
  "devDependencies": {
12
- "ac-semantic-release": "^0.4.2",
12
+ "ac-semantic-release": "^0.4.3",
13
13
  "c8": "^10.1.2",
14
14
  "chai": "^4.x",
15
15
  "eslint": "9.x",