@noego/forge 0.1.27 → 0.1.28

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/dist/client.d.ts CHANGED
@@ -25,6 +25,8 @@ declare type ContextBuilder = (req: any, res: any) => Record<string, any>;
25
25
  export declare interface ControllerEvents {
26
26
  }
27
27
 
28
+ declare type ControllerFactory = (controllerClass: new (...args: any[]) => any) => Promise<unknown> | unknown;
29
+
28
30
  export declare interface ControllerInput {
29
31
  }
30
32
 
@@ -144,7 +146,7 @@ declare interface IRoute {
144
146
  body?: Body_2;
145
147
  }
146
148
 
147
- export declare function loadRoute(node: any, base_path: string, route: IRoute, combinedParams: any, urlParams: any, query: any): Promise<void>;
149
+ export declare function loadRoute(node: any, base_path: string, route: IRoute, combinedParams: any, urlParams: any, query: any, controllerFactory?: (controllerClass: new (...args: any[]) => any) => Promise<unknown> | unknown): Promise<void>;
148
150
 
149
151
  declare function makeUrlParser(pattern: string): (pathname: string) => Record<string, string> | null;
150
152
 
@@ -191,6 +193,8 @@ declare interface ServerOptions {
191
193
  assets?: ForgeAssets;
192
194
  context_builder?: ContextBuilder;
193
195
  middleware_path?: string;
196
+ /** Optional PageController factory used by the client for each page/layout/controller instantiation. */
197
+ controller_factory?: ControllerFactory;
194
198
  }
195
199
 
196
200
  export declare function shadowUrl(pattern: string, url: string): any;