@adonisjs/inertia 1.0.0-23 → 1.0.0-24

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.
@@ -20,7 +20,7 @@ var ServerRenderer = class {
20
20
  render = await import(this.config.ssr.bundle);
21
21
  }
22
22
  const result = await render.default(pageObject);
23
- return { head: [result.head], body: result.body };
23
+ return { head: result.head, body: result.body };
24
24
  }
25
25
  };
26
26
 
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  InertiaMiddleware
3
- } from "../chunk-DSDSTPDS.js";
3
+ } from "../chunk-Y7UMAJ3S.js";
4
4
 
5
5
  // providers/inertia_provider.ts
6
6
  import { configProvider } from "@adonisjs/core";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  InertiaMiddleware
3
- } from "../chunk-DSDSTPDS.js";
3
+ } from "../chunk-Y7UMAJ3S.js";
4
4
  export {
5
5
  InertiaMiddleware as default
6
6
  };
@@ -123,5 +123,12 @@ interface PageObject<TPageProps extends PageProps = PageProps> {
123
123
  * ```
124
124
  */
125
125
  type InferPageProps<Controller, Method extends keyof Controller> = Controller[Method] extends (...args: any[]) => any ? Serialize<Exclude<Awaited<ReturnType<Controller[Method]>>, string>['props']> : never;
126
+ /**
127
+ * Signature for the method in the SSR entrypoint file
128
+ */
129
+ type RenderInertiaSsrApp = (page: PageObject) => Promise<{
130
+ head: string[];
131
+ body: string;
132
+ }>;
126
133
 
127
- export type { AssetsVersion, Data, InertiaConfig, InferPageProps, MaybePromise, PageObject, PageProps, ResolvedConfig, SharedData, SharedDatumFactory };
134
+ export type { AssetsVersion, Data, InertiaConfig, InferPageProps, MaybePromise, PageObject, PageProps, RenderInertiaSsrApp, ResolvedConfig, SharedData, SharedDatumFactory };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@adonisjs/inertia",
3
3
  "description": "Official Inertia.js adapter for AdonisJS",
4
- "version": "1.0.0-23",
4
+ "version": "1.0.0-24",
5
5
  "engines": {
6
6
  "node": ">=18.16.0"
7
7
  },