@bygghammar/cms-platform 0.61.0 → 0.61.1

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,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.61.1
4
+
5
+ - `site/host-indexing-response` takes the configured origin from the site instead
6
+ of importing a non-existent default, so the module type-checks standalone.
7
+
3
8
  ## 0.61.0
4
9
 
5
10
  - New `site/host-indexing` and `site/host-indexing-response`: the hostname-based
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bygghammar/cms-platform",
3
- "version": "0.61.0",
3
+ "version": "0.61.1",
4
4
  "description": "Shared CMS platform: blocks, block types, i18n core, UI primitives and design-token contract used by every Bygghammar/Voyara site.",
5
5
  "type": "module",
6
6
  "sideEffects": [
@@ -7,7 +7,6 @@
7
7
  * the test file and nothing else.
8
8
  */
9
9
  import { NOINDEX_VALUE, robotsDirectiveForHost } from "./host-indexing";
10
- import { configuredPublicOrigin } from "./public-origin";
11
10
 
12
11
  export { NOINDEX_VALUE };
13
12
 
@@ -33,15 +32,15 @@ function requestHostname(request: Request): string | null {
33
32
  * rebuilt with the same body, status and statusText, so streaming, redirects and
34
33
  * error pages are unaffected — only the header set changes.
35
34
  *
36
- * `configuredOrigin` defaults to this deployment's own configuration; it is a
37
- * parameter so tests can state a deployment's configuration directly instead of
38
- * describing one.
35
+ * `configuredOrigin` is the deployment's own configuration, passed in by the
36
+ * site: the platform never guesses it, so a test can state a deployment's
37
+ * configuration directly instead of describing one.
39
38
  */
40
39
  export function applyHostIndexingPolicy(
41
40
  liveHostname: string,
42
41
  request: Request,
43
42
  response: Response,
44
- configuredOrigin: string | null | undefined = configuredPublicOrigin(),
43
+ configuredOrigin: string | null | undefined,
45
44
  ): Response {
46
45
  // A 5xx is the server saying it failed. Whatever it returned is not this
47
46
  // site's content, on any deployment — including the live one, where the
@@ -75,9 +74,6 @@ export function applyHostIndexingPolicy(
75
74
 
76
75
  /** The response helper bound to one site's live hostname. */
77
76
  export function createHostIndexingResponsePolicy(liveHostname: string) {
78
- return (
79
- request: Request,
80
- response: Response,
81
- configuredOrigin: string | null | undefined = configuredPublicOrigin(),
82
- ) => applyHostIndexingPolicy(liveHostname, request, response, configuredOrigin);
77
+ return (request: Request, response: Response, configuredOrigin: string | null | undefined) =>
78
+ applyHostIndexingPolicy(liveHostname, request, response, configuredOrigin);
83
79
  }