@sprucelabs/heartwood-view-controllers 111.1.31 → 111.1.32

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.
@@ -516,7 +516,9 @@ export interface AppViewController {
516
516
  renderToolBelt?(): ToolBelt | null | undefined;
517
517
  load?(options: AppViewControllerLoadOptions): Promise<void>;
518
518
  }
519
- export type AppViewControllerConstructor = new (options: ViewControllerOptions) => AppViewController;
519
+ export type AppViewControllerConstructor = (new (options: ViewControllerOptions) => AppViewController) & {
520
+ id: string;
521
+ };
520
522
  export interface AppViewControllerLoadOptions {
521
523
  router: Router;
522
524
  authenticator: Authenticator;
@@ -27,6 +27,7 @@ export default class ViewControllerFactory {
27
27
  BuildPlugin<P extends ViewControllerPlugin>(Plugin: new (options: ViewControllerPluginOptions) => P): P;
28
28
  BuildApp<A extends AppViewController>(App: new (options: ViewControllerOptions) => A): A;
29
29
  hasController(name: string): boolean;
30
+ hasApp(namespace: string): boolean;
30
31
  getController<N extends ViewControllerId>(name: N): any;
31
32
  setDates(dates: DateUtil): void;
32
33
  addPlugin(named: string, plugin: ViewControllerPlugin): void;
@@ -67,11 +67,9 @@ export default class ViewControllerFactory {
67
67
  }
68
68
  importControllers(Vcs, plugins, App) {
69
69
  for (const Vc of Vcs) {
70
- //@ts-ignore
71
70
  this.controllerMap[Vc.id] = Vc;
72
71
  }
73
72
  if (App) {
74
- //@ts-ignore
75
73
  this.AppMap[App.id] = App;
76
74
  }
77
75
  this.importPlugins(plugins);
@@ -92,6 +90,9 @@ export default class ViewControllerFactory {
92
90
  //@ts-ignore
93
91
  return !!this.controllerMap[name];
94
92
  }
93
+ hasApp(namespace) {
94
+ return !!this.AppMap[namespace];
95
+ }
95
96
  getController(name) {
96
97
  return this.controllerMap[name];
97
98
  }
@@ -516,7 +516,9 @@ export interface AppViewController {
516
516
  renderToolBelt?(): ToolBelt | null | undefined;
517
517
  load?(options: AppViewControllerLoadOptions): Promise<void>;
518
518
  }
519
- export type AppViewControllerConstructor = new (options: ViewControllerOptions) => AppViewController;
519
+ export type AppViewControllerConstructor = (new (options: ViewControllerOptions) => AppViewController) & {
520
+ id: string;
521
+ };
520
522
  export interface AppViewControllerLoadOptions {
521
523
  router: Router;
522
524
  authenticator: Authenticator;
@@ -27,6 +27,7 @@ export default class ViewControllerFactory {
27
27
  BuildPlugin<P extends ViewControllerPlugin>(Plugin: new (options: ViewControllerPluginOptions) => P): P;
28
28
  BuildApp<A extends AppViewController>(App: new (options: ViewControllerOptions) => A): A;
29
29
  hasController(name: string): boolean;
30
+ hasApp(namespace: string): boolean;
30
31
  getController<N extends ViewControllerId>(name: N): any;
31
32
  setDates(dates: DateUtil): void;
32
33
  addPlugin(named: string, plugin: ViewControllerPlugin): void;
@@ -65,11 +65,9 @@ class ViewControllerFactory {
65
65
  }
66
66
  importControllers(Vcs, plugins, App) {
67
67
  for (const Vc of Vcs) {
68
- //@ts-ignore
69
68
  this.controllerMap[Vc.id] = Vc;
70
69
  }
71
70
  if (App) {
72
- //@ts-ignore
73
71
  this.AppMap[App.id] = App;
74
72
  }
75
73
  this.importPlugins(plugins);
@@ -90,6 +88,9 @@ class ViewControllerFactory {
90
88
  //@ts-ignore
91
89
  return !!this.controllerMap[name];
92
90
  }
91
+ hasApp(namespace) {
92
+ return !!this.AppMap[namespace];
93
+ }
93
94
  getController(name) {
94
95
  return this.controllerMap[name];
95
96
  }
package/package.json CHANGED
@@ -13,7 +13,7 @@
13
13
  "sideEffects": false,
14
14
  "license": "MIT",
15
15
  "description": "All the power of Heartwood in one, convenient package.",
16
- "version": "111.1.31",
16
+ "version": "111.1.32",
17
17
  "skill": {
18
18
  "namespace": "HeartwoodViewControllers",
19
19
  "commandOverrides": {