@adobe/spacecat-shared-tokowaka-client 1.7.6 → 1.7.7

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,10 @@
1
+ # [@adobe/spacecat-shared-tokowaka-client-v1.7.7](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-tokowaka-client-v1.7.6...@adobe/spacecat-shared-tokowaka-client-v1.7.7) (2026-02-12)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * export forwarded host compute method ([#1338](https://github.com/adobe/spacecat-shared/issues/1338)) ([91e5f5f](https://github.com/adobe/spacecat-shared/commit/91e5f5fb2b5a7d592886caea940a6313fe1c1c8c))
7
+
1
8
  # [@adobe/spacecat-shared-tokowaka-client-v1.7.6](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-tokowaka-client-v1.7.5...@adobe/spacecat-shared-tokowaka-client-v1.7.6) (2026-02-09)
2
9
 
3
10
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/spacecat-shared-tokowaka-client",
3
- "version": "1.7.6",
3
+ "version": "1.7.7",
4
4
  "description": "Tokowaka Client for SpaceCat - Edge optimization config management",
5
5
  "type": "module",
6
6
  "engines": {
package/src/index.d.ts CHANGED
@@ -147,6 +147,14 @@ export class FastlyKVClient {
147
147
  }): Promise<FastlyKVEntry[]>;
148
148
  }
149
149
 
150
+ /**
151
+ * Compute the forwarded host for edge optimize (bare domain → www; subdomains unchanged).
152
+ * @param url - Full base URL (e.g. https://example.com)
153
+ * @param logger - Optional logger with debug and error methods
154
+ * @returns Host to use (e.g. www.example.com)
155
+ */
156
+ export function calculateForwardedHost(url: string, logger?: { debug?: (msg: string) => void; error?: (msg: string) => void }): string;
157
+
150
158
  /**
151
159
  * Base class for opportunity mappers
152
160
  * Extend this class to create custom mappers for new opportunity types
package/src/index.js CHANGED
@@ -28,6 +28,7 @@ import { getEffectiveBaseURL } from './utils/site-utils.js';
28
28
  import { fetchHtmlWithWarmup, calculateForwardedHost } from './utils/custom-html-utils.js';
29
29
 
30
30
  export { FastlyKVClient } from './fastly-kv-client.js';
31
+ export { calculateForwardedHost } from './utils/custom-html-utils.js';
31
32
 
32
33
  const HTTP_BAD_REQUEST = 400;
33
34
  const HTTP_INTERNAL_SERVER_ERROR = 500;