@adobe/spacecat-shared-utils 1.96.3 → 1.98.0

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,15 @@
1
+ ## [@adobe/spacecat-shared-utils-v1.98.0](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-utils-v1.97.0...@adobe/spacecat-shared-utils-v1.98.0) (2026-02-27)
2
+
3
+ ### Features
4
+
5
+ * LLMO-3231 byocdn-fastly default auth method is iam role ([#1384](https://github.com/adobe/spacecat-shared/issues/1384)) ([446dd15](https://github.com/adobe/spacecat-shared/commit/446dd1540040c48181ef9a50093fced93fe92034))
6
+
7
+ ## [@adobe/spacecat-shared-utils-v1.97.0](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-utils-v1.96.3...@adobe/spacecat-shared-utils-v1.97.0) (2026-02-27)
8
+
9
+ ### Features
10
+
11
+ * add dataset info for cloudflare ([#1383](https://github.com/adobe/spacecat-shared/issues/1383)) ([5ee3bbf](https://github.com/adobe/spacecat-shared/commit/5ee3bbf22188300e9e34f96cf786a0db993484ac))
12
+
1
13
  ## [@adobe/spacecat-shared-utils-v1.96.3](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-utils-v1.96.2...@adobe/spacecat-shared-utils-v1.96.3) (2026-02-25)
2
14
 
3
15
  ### Bug Fixes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/spacecat-shared-utils",
3
- "version": "1.96.3",
3
+ "version": "1.98.0",
4
4
  "description": "Shared modules of the Spacecat Services - utils",
5
5
  "type": "module",
6
6
  "exports": {
@@ -62,24 +62,31 @@ const FASTLY_LOG_FORMAT = `{
62
62
  "time_to_first_byte": "%{time.to_first_byte}V"
63
63
  }`;
64
64
  const CDN_TRANSFORMATIONS = {
65
- 'byocdn-fastly': (payload) => ({
66
- 'Bucket Name': payload.bucketName,
67
- Domain: `s3.${payload.region}.amazonaws.com`,
68
- Path: `${payload.allowedPaths?.[0] || ''}%Y/%m/%d/%H/`,
69
- 'Timestamp Format': '%Y-%m-%dT%H:%M:%S.000',
70
- Placement: 'Format Version Default',
71
- 'Log format': FASTLY_LOG_FORMAT,
72
- 'Access method': 'User credentials',
73
- ...transformCredentialFields(payload),
74
- Period: 300,
75
- 'Log line format': 'Blank',
76
- Compression: 'Gzip',
77
- 'Redundancy level': 'Standard',
78
- ACL: 'None',
79
- 'Server side encryption': 'None',
80
- 'Maximum bytes': 0,
81
- HelpUrl: 'https://www.fastly.com/documentation/guides/integrations/logging-endpoints/log-streaming-amazon-s3/',
82
- }),
65
+ 'byocdn-fastly': (payload) => {
66
+ const authMethodLabel = payload.authMethod === 'iam_role' ? 'IAM Role' : 'User credentials';
67
+ const authFields = payload.authMethod === 'iam_role'
68
+ ? { 'Role ARN': payload.roleArn }
69
+ : transformCredentialFields(payload);
70
+
71
+ return {
72
+ 'Bucket Name': payload.bucketName,
73
+ Domain: `s3.${payload.region}.amazonaws.com`,
74
+ Path: `${payload.allowedPaths?.[0] || ''}%Y/%m/%d/%H/`,
75
+ 'Timestamp Format': '%Y-%m-%dT%H:%M:%S.000',
76
+ Placement: 'Format Version Default',
77
+ 'Log format': FASTLY_LOG_FORMAT,
78
+ 'Access method': authMethodLabel,
79
+ ...authFields,
80
+ Period: 300,
81
+ 'Log line format': 'Blank',
82
+ Compression: 'Gzip',
83
+ 'Redundancy level': 'Standard',
84
+ ACL: 'None',
85
+ 'Server side encryption': 'None',
86
+ 'Maximum bytes': 0,
87
+ HelpUrl: 'https://www.fastly.com/documentation/guides/integrations/logging-endpoints/log-streaming-amazon-s3/',
88
+ };
89
+ },
83
90
  'byocdn-akamai': (payload) => ({
84
91
  'Bucket Name': payload.bucketName,
85
92
  Region: payload.region,
@@ -105,6 +112,7 @@ const CDN_TRANSFORMATIONS = {
105
112
  HelpUrl: 'https://techdocs.akamai.com/datastream2/docs/stream-amazon-s3',
106
113
  }),
107
114
  'byocdn-cloudflare': (payload) => ({
115
+ Dataset: 'HTTP Requests (zone-scoped)',
108
116
  'Bucket Name': payload.bucketName,
109
117
  Region: payload.region,
110
118
  Path: `${payload.allowedPaths?.[0] || ''}`,
@@ -237,7 +245,22 @@ const prettifyLogForwardingConfig = (payload) => {
237
245
  throw new Error('allowedPaths is required in payload');
238
246
  }
239
247
 
240
- if (payload.logSource === 'byocdn-fastly' || payload.logSource === 'byocdn-akamai' || payload.logSource === 'byocdn-other') {
248
+ if (payload.logSource === 'byocdn-fastly') {
249
+ if (payload.authMethod === 'user_credentials') {
250
+ if (!payload.accessKey && !payload.currentAccessKey) {
251
+ throw new Error('accessKey or currentAccessKey is required in payload');
252
+ }
253
+ if (!payload.secretKey && !payload.currentSecretKey) {
254
+ throw new Error('secretKey or currentSecretKey is required in payload');
255
+ }
256
+ } else if (payload.authMethod === 'iam_role') {
257
+ if (!payload.roleArn) {
258
+ throw new Error('roleArn is required in payload when authMethod is iam_role');
259
+ }
260
+ }
261
+ }
262
+
263
+ if (payload.logSource === 'byocdn-akamai' || payload.logSource === 'byocdn-other') {
241
264
  if (!payload.accessKey && !payload.currentAccessKey) {
242
265
  throw new Error('accessKey or currentAccessKey is required in payload');
243
266
  }