ac-awssecrets 2.5.0 → 2.5.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.
Files changed (3) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/index.js +18 -8
  3. package/package.json +4 -4
package/CHANGELOG.md CHANGED
@@ -1,3 +1,31 @@
1
+
2
+ ## [2.5.2](https://github.com/admiralcloud/ac-awssecrets/compare/v2.5.1..v2.5.2) (2025-05-20 05:42:15)
3
+
4
+
5
+ ### Bug Fix
6
+
7
+ * **App:** Do not create duplicate entries when merging arrays | MP | [2f5d6d49d543af077f9c0b31061ec0681ee9ae9c](https://github.com/admiralcloud/ac-awssecrets/commit/2f5d6d49d543af077f9c0b31061ec0681ee9ae9c)
8
+ Do not create duplicate entries when merging arrays
9
+ Related issues:
10
+ ### Chores
11
+
12
+ * **App:** Updated packages | MP | [ccc52156ac8ca7f72a1b008465ff142b1d628e01](https://github.com/admiralcloud/ac-awssecrets/commit/ccc52156ac8ca7f72a1b008465ff142b1d628e01)
13
+ Updated packages
14
+ Related issues:
15
+
16
+ ## [2.5.1](https://github.com/admiralcloud/ac-awssecrets/compare/v2.5.0..v2.5.1) (2025-05-13 08:10:25)
17
+
18
+
19
+ ### Bug Fix
20
+
21
+ * **App:** Fixed deep merge with arrays | MP | [715c67bc5ef1c2520069d07953c6f05fd08ab37a](https://github.com/admiralcloud/ac-awssecrets/commit/715c67bc5ef1c2520069d07953c6f05fd08ab37a)
22
+ Fixed deep merge with arrays
23
+ Related issues:
24
+ ### Chores
25
+
26
+ * **App:** Updated packages | MP | [843ab11b885697b471c74d546b40d885cc9f2844](https://github.com/admiralcloud/ac-awssecrets/commit/843ab11b885697b471c74d546b40d885cc9f2844)
27
+ Updated packages
28
+ Related issues:
1
29
 
2
30
  # [2.5.0](https://github.com/admiralcloud/ac-awssecrets/compare/v2.4.4..v2.5.0) (2025-05-06 18:01:30)
3
31
 
package/index.js CHANGED
@@ -32,16 +32,26 @@ const awsSecrets = () => {
32
32
  }
33
33
 
34
34
  const deepMerge = (target, source) => {
35
- const result = { ...target }
36
- for (const key in source) {
37
- if (typeof source[key] === 'object' && !Array.isArray(source[key]) && typeof result[key] === 'object' && !Array.isArray(result[key])) {
38
- result[key] = deepMerge(result[key], source[key])
39
- }
40
- else {
41
- result[key] = source[key]
35
+ // Wenn beide Arrays sind, entferne Duplikate mit Set
36
+ if (Array.isArray(target) && Array.isArray(source)) {
37
+ return [...new Set([...target, ...source])]
38
+ }
39
+
40
+ // Wenn beide Objekte sind (und nicht null)
41
+ if (typeof source === 'object' && source !== null && typeof target === 'object' && target !== null) {
42
+ const result = { ...target }
43
+ for (const key in source) {
44
+ if (key in result) {
45
+ result[key] = deepMerge(result[key], source[key])
46
+ }
47
+ else {
48
+ result[key] = source[key]
49
+ }
42
50
  }
51
+ return result
43
52
  }
44
- return result
53
+
54
+ return source
45
55
  }
46
56
 
47
57
  const setValue = (config, { path, value, array = false, property, merge = false }) => {
package/package.json CHANGED
@@ -3,17 +3,17 @@
3
3
  "author": "Mark Poepping (https://www.admiralcloud.com)",
4
4
  "license": "MIT",
5
5
  "repository": "admiralcloud/ac-awssecrets",
6
- "version": "2.5.0",
6
+ "version": "2.5.2",
7
7
  "dependencies": {
8
- "@aws-sdk/client-secrets-manager": "^3.803.0",
9
- "@aws-sdk/client-ssm": "^3.803.0"
8
+ "@aws-sdk/client-secrets-manager": "^3.812.0",
9
+ "@aws-sdk/client-ssm": "^3.812.0"
10
10
  },
11
11
  "devDependencies": {
12
12
  "ac-semantic-release": "^0.4.6",
13
13
  "c8": "^10.1.3",
14
14
  "chai": "^4.x",
15
15
  "eslint": "9.x",
16
- "mocha": "^11.2.2"
16
+ "mocha": "^11.4.0"
17
17
  },
18
18
  "scripts": {
19
19
  "test": "NODE_ENV=test mocha --reporter spec --bail",