Skip to content

Commit 9d2253c

Browse files
authored
feat(plugins): ➕ add the extra and extraData plugin back (scullyio#9)
1 parent 3af15cf commit 9d2253c

21 files changed

Lines changed: 1394 additions & 89 deletions

core/cli/src/lib/pluginManagement/Plugin.interfaces.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,18 @@ export type ScullySystem = `scullySystem`;
66
export type ErrorString = string;
77
export type ConfigValidator = (RouteConfig) => ErrorString[] | Promise<ErrorString[]>;
88

9-
export type RoutePlugin = {
10-
(route?: string, config?: any): Promise<HandledRoute[]>;
9+
export interface RoutePlugin {
10+
(route: string, config?: any): Promise<HandledRoute[]>;
1111
[configValidator]?: ConfigValidator | undefined;
1212
};
1313
export type PluginFunction = (...args: any[]) => any;
1414
export type postProcessByDomPlugin = (dom?: JSDOM, route?: HandledRoute) => Promise<JSDOM>;
1515
export type postProcessByHtmlPlugin = (html: string, route: HandledRoute) => Promise<string>;
16-
export type RouteProcess = { (routes?: HandledRoute[]): Promise<HandledRoute[]>; [routeProcessPriority]?: number };
16+
export type RouteProcess = { (routes?: HandledRoute[]): Promise<HandledRoute[]>;[routeProcessPriority]?: number };
1717
export type RouteDiscoveryPlugin = (routes?: HandledRoute[]) => Promise<void>;
1818
export type AllDonePlugin = (routes?: HandledRoute[]) => Promise<void>;
19-
export type BeforeAllPlugin = { (): Promise<void | undefined | boolean>; [priority]?: number };
20-
export type FilePlugin = { (html: string, route?: HandledRoute): Promise<string>; [AlternateExtensionsForFilePlugin]?: string[] };
19+
export type BeforeAllPlugin = { (): Promise<void | undefined | boolean>;[priority]?: number };
20+
export type FilePlugin = { (html: string, route?: HandledRoute): Promise<string>;[AlternateExtensionsForFilePlugin]?: string[] };
2121
export type ScullySystemPlugin = PluginFunction;
2222
export type EnterprisePlugin = PluginFunction;
2323

0 commit comments

Comments
 (0)