@adobe/spacecat-shared-utils 1.38.0 → 1.38.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 CHANGED
@@ -1,3 +1,17 @@
1
+ # [@adobe/spacecat-shared-utils-v1.38.2](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-utils-v1.38.1...@adobe/spacecat-shared-utils-v1.38.2) (2025-05-17)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **deps:** update external fixes ([#743](https://github.com/adobe/spacecat-shared/issues/743)) ([afee6a7](https://github.com/adobe/spacecat-shared/commit/afee6a75d7cb6fb52d5fd18dbc5d74f2e73206f2))
7
+
8
+ # [@adobe/spacecat-shared-utils-v1.38.1](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-utils-v1.38.0...@adobe/spacecat-shared-utils-v1.38.1) (2025-05-15)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * local development friendly aws clients and sqs wrapper ([#739](https://github.com/adobe/spacecat-shared/issues/739)) ([fada9c6](https://github.com/adobe/spacecat-shared/commit/fada9c6fc0508ba6acf46a4416593427b67306dd))
14
+
1
15
  # [@adobe/spacecat-shared-utils-v1.38.0](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-utils-v1.37.4...@adobe/spacecat-shared-utils-v1.38.0) (2025-05-14)
2
16
 
3
17
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/spacecat-shared-utils",
3
- "version": "1.38.0",
3
+ "version": "1.38.2",
4
4
  "description": "Shared modules of the Spacecat Services - utils",
5
5
  "type": "module",
6
6
  "engines": {
@@ -46,9 +46,9 @@
46
46
  },
47
47
  "dependencies": {
48
48
  "@adobe/fetch": "4.2.1",
49
- "@aws-sdk/client-s3": "3.806.0",
50
- "@aws-sdk/client-secrets-manager": "3.806.0",
51
- "@aws-sdk/client-sqs": "3.806.0",
49
+ "@aws-sdk/client-s3": "3.812.0",
50
+ "@aws-sdk/client-secrets-manager": "3.812.0",
51
+ "@aws-sdk/client-sqs": "3.812.0",
52
52
  "@json2csv/plainjs": "7.0.6",
53
53
  "aws-xray-sdk": "3.10.3",
54
54
  "uuid": "11.1.0"
package/src/sqs.js CHANGED
@@ -15,6 +15,7 @@ import { SendMessageCommand, SQSClient } from '@aws-sdk/client-sqs';
15
15
  import { instrumentAWSClient } from './xray.js';
16
16
 
17
17
  import { hasText, isNonEmptyArray } from './functions.js';
18
+ import { isAWSLambda } from './runtimes.js';
18
19
 
19
20
  function badRequest(message) {
20
21
  return new Response('', {
@@ -103,6 +104,12 @@ export function sqsEventAdapter(fn) {
103
104
  const { log } = context;
104
105
  let message;
105
106
 
107
+ // if not in aws lambda, invoke the function with json body as message
108
+ if (!isAWSLambda()) {
109
+ message = await req.json();
110
+ return fn(message, context);
111
+ }
112
+
106
113
  // currently not processing batch messages
107
114
  const records = context.invocation?.event?.Records;
108
115