@bygghammar/cms-platform 0.50.0 → 0.50.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,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.50.1
4
+
5
+ - `runtime/server-entry`: the injection adapter is typed against `InjectionBundle`, matching the shared `injections-core` helpers exactly.
6
+
3
7
  ## 0.50.0
4
8
 
5
9
  - New `runtime/server-entry`: `createServerEntry({ injections })` is the shared production fetch handler — framework entry, h3-swallowed-500 normalisation, backoffice code injection and edge caching/compression headers. A site's `src/server.ts` drops to one call.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bygghammar/cms-platform",
3
- "version": "0.50.0",
3
+ "version": "0.50.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": [
@@ -14,21 +14,15 @@ import "./error-capture";
14
14
  import { consumeLastCapturedError } from "./error-capture";
15
15
  import { renderErrorPage } from "./error-page";
16
16
  import { applyEdgeHeaders } from "../http/response-headers";
17
+ import type { InjectionBundle } from "../tracking/injections";
17
18
 
18
19
  export type SiteCodeInjections = {
19
20
  /** Whether backoffice-managed code may be injected on this path. */
20
- isInjectablePath: (pathname: string) => boolean;
21
+ isInjectablePath: (pathname: string, backofficePath?: string) => boolean;
21
22
  /** Head / body-start / body-end snippets for the requesting host. */
22
- resolve: (host: string) => Promise<{
23
- head?: string;
24
- bodyStart?: string;
25
- bodyEnd?: string;
26
- }>;
23
+ resolve: (host: string) => Promise<InjectionBundle>;
27
24
  /** Applies a resolved bundle to the rendered HTML. */
28
- apply: (
29
- html: string,
30
- bundle: { head?: string; bodyStart?: string; bodyEnd?: string },
31
- ) => string;
25
+ apply: (html: string, bundle: InjectionBundle) => string;
32
26
  };
33
27
 
34
28
  export type ServerEntryOptions = {