@adobe/spacecat-shared-utils 1.30.2 → 1.30.4

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 CHANGED
@@ -1,3 +1,17 @@
1
+ # [@adobe/spacecat-shared-utils-v1.30.4](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-utils-v1.30.3...@adobe/spacecat-shared-utils-v1.30.4) (2025-02-12)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * log level adjustments ([#597](https://github.com/adobe/spacecat-shared/issues/597)) ([22cc302](https://github.com/adobe/spacecat-shared/commit/22cc302bd1d9d52f6f172748ef8be66dceff599b))
7
+
8
+ # [@adobe/spacecat-shared-utils-v1.30.3](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-utils-v1.30.2...@adobe/spacecat-shared-utils-v1.30.3) (2025-02-11)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * **shared-utils:** remove legacy rum domain key retrieval ([#594](https://github.com/adobe/spacecat-shared/issues/594)) ([1a093c4](https://github.com/adobe/spacecat-shared/commit/1a093c4226a966098dfa2207f5652ffac13e38b5))
14
+
1
15
  # [@adobe/spacecat-shared-utils-v1.30.2](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-utils-v1.30.1...@adobe/spacecat-shared-utils-v1.30.2) (2025-02-08)
2
16
 
3
17
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/spacecat-shared-utils",
3
- "version": "1.30.2",
3
+ "version": "1.30.4",
4
4
  "description": "Shared modules of the Spacecat Services - utils",
5
5
  "type": "module",
6
6
  "engines": {
@@ -46,7 +46,6 @@
46
46
  "dependencies": {
47
47
  "@adobe/fetch": "4.1.11",
48
48
  "@aws-sdk/client-s3": "3.744.0",
49
- "@aws-sdk/client-secrets-manager": "3.744.0",
50
49
  "@aws-sdk/client-sqs": "3.744.0",
51
50
  "@json2csv/plainjs": "7.0.6",
52
51
  "aws-xray-sdk": "3.10.3",
package/src/helpers.js CHANGED
@@ -11,7 +11,6 @@
11
11
  */
12
12
 
13
13
  import { Parser } from '@json2csv/plainjs';
14
- import { GetSecretValueCommand, SecretsManagerClient } from '@aws-sdk/client-secrets-manager';
15
14
  import { promises as fs } from 'fs';
16
15
  import { isString } from './functions.js';
17
16
 
@@ -55,30 +54,6 @@ export function resolveCustomerSecretsName(baseURL, ctx) {
55
54
  return resolveSecretsName({}, ctx, `${basePath}/${customer}`);
56
55
  }
57
56
 
58
- /**
59
- * Retrieves the RUM domain key for the specified base URL from the customer secrets.
60
- *
61
- * @param {string} baseURL - The base URL for which the RUM domain key is to be retrieved.
62
- * @param {UniversalContext} context - Helix Universal Context. See https://github.com/adobe/helix-universal/blob/main/src/adapter.d.ts#L120
63
- * @returns {Promise<string>} - A promise that resolves to the RUM domain key.
64
- * @throws {Error} Throws an error if no domain key is found for the specified base URL.
65
- */
66
- export async function getRUMDomainKey(baseURL, context) {
67
- const customerSecretName = resolveCustomerSecretsName(baseURL, context);
68
- const { runtime } = context;
69
-
70
- try {
71
- const client = new SecretsManagerClient({ region: runtime.region });
72
- const command = new GetSecretValueCommand({
73
- SecretId: customerSecretName,
74
- });
75
- const response = await client.send(command);
76
- return JSON.parse(response.SecretString)?.RUM_DOMAIN_KEY;
77
- } catch (error) {
78
- throw new Error(`Error retrieving the domain key for ${baseURL}. Error: ${error.message}`);
79
- }
80
- }
81
-
82
57
  /**
83
58
  * Generates a CSV file from the provided JSON data.
84
59
  *
package/src/index.js CHANGED
@@ -34,7 +34,6 @@ export {
34
34
  export {
35
35
  resolveSecretsName,
36
36
  resolveCustomerSecretsName,
37
- getRUMDomainKey,
38
37
  generateCSVFile,
39
38
  replacePlaceholders,
40
39
  getPrompt,
package/src/sqs.js CHANGED
@@ -117,7 +117,7 @@ export function sqsEventAdapter(fn) {
117
117
 
118
118
  try {
119
119
  message = JSON.parse(record.body);
120
- log.info(`Received message with id: ${record.messageId}`);
120
+ log.debug(`Received message with id: ${record.messageId}`);
121
121
  } catch (e) {
122
122
  log.warn('Function was not invoked properly, message body is not a valid JSON', e);
123
123
  return badRequest('Event does not contain a valid message body');