@adobe/spacecat-shared-utils 1.77.0 → 1.78.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 +14 -0
- package/package.json +1 -1
- package/src/log-wrapper.js +8 -1
- package/src/schemas.js +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# [@adobe/spacecat-shared-utils-v1.78.0](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-utils-v1.77.1...@adobe/spacecat-shared-utils-v1.78.0) (2025-11-21)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* add aliasMode to llmoConfig schema LLMO-1095 ([#1151](https://github.com/adobe/spacecat-shared/issues/1151)) ([04a1075](https://github.com/adobe/spacecat-shared/commit/04a10753ce4806dea49015dde022747613db535a))
|
|
7
|
+
|
|
8
|
+
# [@adobe/spacecat-shared-utils-v1.77.1](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-utils-v1.77.0...@adobe/spacecat-shared-utils-v1.77.1) (2025-11-20)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* **utils:** correct logWrapper format string handling ([#1156](https://github.com/adobe/spacecat-shared/issues/1156)) ([dabe38c](https://github.com/adobe/spacecat-shared/commit/dabe38c258b2a221c6733165657e856d978e5636))
|
|
14
|
+
|
|
1
15
|
# [@adobe/spacecat-shared-utils-v1.77.0](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-utils-v1.76.0...@adobe/spacecat-shared-utils-v1.77.0) (2025-11-20)
|
|
2
16
|
|
|
3
17
|
|
package/package.json
CHANGED
package/src/log-wrapper.js
CHANGED
|
@@ -59,7 +59,14 @@ export function logWrapper(fn) {
|
|
|
59
59
|
// Enhance context.log directly to include markers in all log statements
|
|
60
60
|
context.log = logLevels.reduce((accumulator, level) => {
|
|
61
61
|
if (typeof log[level] === 'function') {
|
|
62
|
-
accumulator[level] = (...args) =>
|
|
62
|
+
accumulator[level] = (...args) => {
|
|
63
|
+
// If first argument is a string (format string), prepend the marker to it
|
|
64
|
+
if (args.length > 0 && typeof args[0] === 'string') {
|
|
65
|
+
const enhancedArgs = [`${markerString} ${args[0]}`, ...args.slice(1)];
|
|
66
|
+
return log[level](...enhancedArgs);
|
|
67
|
+
}
|
|
68
|
+
return log[level](...args);
|
|
69
|
+
};
|
|
63
70
|
}
|
|
64
71
|
return accumulator;
|
|
65
72
|
}, {});
|
package/src/schemas.js
CHANGED
|
@@ -96,6 +96,7 @@ export const llmoConfig = z.object({
|
|
|
96
96
|
aliases: z.array(nonEmptyString),
|
|
97
97
|
category: z.uuid().optional(),
|
|
98
98
|
region: z.union([region, z.array(region)]).optional(),
|
|
99
|
+
aliasMode: z.union([z.literal('extend'), z.literal('replace')]).optional(),
|
|
99
100
|
}),
|
|
100
101
|
),
|
|
101
102
|
}),
|