aboutsummaryrefslogtreecommitdiffstats
path: root/src/stores
diff options
context:
space:
mode:
Diffstat (limited to 'src/stores')
-rw-r--r--src/stores/AppStore.ts2
-rw-r--r--src/stores/GlobalErrorStore.ts2
-rw-r--r--src/stores/RecipePreviewsStore.ts2
-rw-r--r--src/stores/RecipesStore.ts2
-rw-r--r--src/stores/RequestStore.ts2
-rw-r--r--src/stores/ServicesStore.ts2
-rw-r--r--src/stores/SettingsStore.ts2
-rw-r--r--src/stores/UIStore.ts2
-rw-r--r--src/stores/UserStore.ts2
-rw-r--r--src/stores/index.ts22
-rw-r--r--src/stores/lib/TypedStore.ts2
11 files changed, 29 insertions, 13 deletions
diff --git a/src/stores/AppStore.ts b/src/stores/AppStore.ts
index 5659460c6..f333a0060 100644
--- a/src/stores/AppStore.ts
+++ b/src/stores/AppStore.ts
@@ -14,7 +14,7 @@ import ms from 'ms';
14import { URL } from 'url'; 14import { URL } from 'url';
15import { readJsonSync } from 'fs-extra'; 15import { readJsonSync } from 'fs-extra';
16 16
17import { Stores } from 'src/stores.types'; 17import { Stores } from 'src/@types/stores.types';
18import { ApiInterface } from 'src/api'; 18import { ApiInterface } from 'src/api';
19import { Actions } from 'src/actions/lib/actions'; 19import { Actions } from 'src/actions/lib/actions';
20import TypedStore from './lib/TypedStore'; 20import TypedStore from './lib/TypedStore';
diff --git a/src/stores/GlobalErrorStore.ts b/src/stores/GlobalErrorStore.ts
index cb364574b..fcc1276c8 100644
--- a/src/stores/GlobalErrorStore.ts
+++ b/src/stores/GlobalErrorStore.ts
@@ -1,7 +1,7 @@
1import { observable, action } from 'mobx'; 1import { observable, action } from 'mobx';
2import { Actions } from 'src/actions/lib/actions'; 2import { Actions } from 'src/actions/lib/actions';
3import { ApiInterface } from 'src/api'; 3import { ApiInterface } from 'src/api';
4import { Stores } from 'src/stores.types'; 4import { Stores } from 'src/@types/stores.types';
5import Request from './lib/Request'; 5import Request from './lib/Request';
6import TypedStore from './lib/TypedStore'; 6import TypedStore from './lib/TypedStore';
7 7
diff --git a/src/stores/RecipePreviewsStore.ts b/src/stores/RecipePreviewsStore.ts
index 500f69b40..099867785 100644
--- a/src/stores/RecipePreviewsStore.ts
+++ b/src/stores/RecipePreviewsStore.ts
@@ -2,7 +2,7 @@ import { action, computed, observable } from 'mobx';
2import { Actions } from 'src/actions/lib/actions'; 2import { Actions } from 'src/actions/lib/actions';
3import { ApiInterface } from 'src/api'; 3import { ApiInterface } from 'src/api';
4import Recipe from 'src/models/Recipe'; 4import Recipe from 'src/models/Recipe';
5import { Stores } from 'src/stores.types'; 5import { Stores } from 'src/@types/stores.types';
6 6
7import CachedRequest from './lib/CachedRequest'; 7import CachedRequest from './lib/CachedRequest';
8import Request from './lib/Request'; 8import Request from './lib/Request';
diff --git a/src/stores/RecipesStore.ts b/src/stores/RecipesStore.ts
index af2aa7fb0..d63e46bef 100644
--- a/src/stores/RecipesStore.ts
+++ b/src/stores/RecipesStore.ts
@@ -2,7 +2,7 @@ import { action, computed, observable } from 'mobx';
2import { readJSONSync } from 'fs-extra'; 2import { readJSONSync } from 'fs-extra';
3import semver from 'semver'; 3import semver from 'semver';
4 4
5import { Stores } from 'src/stores.types'; 5import { Stores } from 'src/@types/stores.types';
6import { ApiInterface } from 'src/api'; 6import { ApiInterface } from 'src/api';
7import { Actions } from 'src/actions/lib/actions'; 7import { Actions } from 'src/actions/lib/actions';
8import Recipe from 'src/models/Recipe'; 8import Recipe from 'src/models/Recipe';
diff --git a/src/stores/RequestStore.ts b/src/stores/RequestStore.ts
index 03ad2c7db..af686388a 100644
--- a/src/stores/RequestStore.ts
+++ b/src/stores/RequestStore.ts
@@ -4,7 +4,7 @@ import ms from 'ms';
4 4
5import { Actions } from 'src/actions/lib/actions'; 5import { Actions } from 'src/actions/lib/actions';
6import { ApiInterface } from 'src/api'; 6import { ApiInterface } from 'src/api';
7import { Stores } from 'src/stores.types'; 7import { Stores } from 'src/@types/stores.types';
8import CachedRequest from './lib/CachedRequest'; 8import CachedRequest from './lib/CachedRequest';
9import { LOCAL_PORT } from '../config'; 9import { LOCAL_PORT } from '../config';
10 10
diff --git a/src/stores/ServicesStore.ts b/src/stores/ServicesStore.ts
index caa44146f..0164d092a 100644
--- a/src/stores/ServicesStore.ts
+++ b/src/stores/ServicesStore.ts
@@ -5,7 +5,7 @@ import ms from 'ms';
5import { ensureFileSync, pathExistsSync, writeFileSync } from 'fs-extra'; 5import { ensureFileSync, pathExistsSync, writeFileSync } from 'fs-extra';
6import { join } from 'path'; 6import { join } from 'path';
7 7
8import { Stores } from 'src/stores.types'; 8import { Stores } from 'src/@types/stores.types';
9import { ApiInterface } from 'src/api'; 9import { ApiInterface } from 'src/api';
10import { Actions } from 'src/actions/lib/actions'; 10import { Actions } from 'src/actions/lib/actions';
11import Request from './lib/Request'; 11import Request from './lib/Request';
diff --git a/src/stores/SettingsStore.ts b/src/stores/SettingsStore.ts
index 524f2e50c..dabd7b099 100644
--- a/src/stores/SettingsStore.ts
+++ b/src/stores/SettingsStore.ts
@@ -2,7 +2,7 @@ import { ipcRenderer } from 'electron';
2import { getCurrentWindow } from '@electron/remote'; 2import { getCurrentWindow } from '@electron/remote';
3import { action, computed, observable, reaction } from 'mobx'; 3import { action, computed, observable, reaction } from 'mobx';
4import localStorage from 'mobx-localstorage'; 4import localStorage from 'mobx-localstorage';
5import { Stores } from 'src/stores.types'; 5import { Stores } from 'src/@types/stores.types';
6import { ApiInterface } from 'src/api'; 6import { ApiInterface } from 'src/api';
7import { Actions } from 'src/actions/lib/actions'; 7import { Actions } from 'src/actions/lib/actions';
8import { 8import {
diff --git a/src/stores/UIStore.ts b/src/stores/UIStore.ts
index 306b14cb1..e9e099ebc 100644
--- a/src/stores/UIStore.ts
+++ b/src/stores/UIStore.ts
@@ -1,7 +1,7 @@
1import { action, observable, computed, reaction } from 'mobx'; 1import { action, observable, computed, reaction } from 'mobx';
2import { nativeTheme } from '@electron/remote'; 2import { nativeTheme } from '@electron/remote';
3 3
4import { Stores } from 'src/stores.types'; 4import { Stores } from 'src/@types/stores.types';
5import { ApiInterface } from 'src/api'; 5import { ApiInterface } from 'src/api';
6import { Actions } from 'src/actions/lib/actions'; 6import { Actions } from 'src/actions/lib/actions';
7import { Theme, theme, ThemeType } from '../themes'; 7import { Theme, theme, ThemeType } from '../themes';
diff --git a/src/stores/UserStore.ts b/src/stores/UserStore.ts
index 616ff29a6..0827f8196 100644
--- a/src/stores/UserStore.ts
+++ b/src/stores/UserStore.ts
@@ -6,7 +6,7 @@ import { ipcRenderer } from 'electron';
6 6
7import { ApiInterface } from 'src/api'; 7import { ApiInterface } from 'src/api';
8import { Actions } from 'src/actions/lib/actions'; 8import { Actions } from 'src/actions/lib/actions';
9import { Stores } from 'src/stores.types'; 9import { Stores } from 'src/@types/stores.types';
10import { TODOS_PARTITION_ID } from '../config'; 10import { TODOS_PARTITION_ID } from '../config';
11import { isDevMode } from '../environment-remote'; 11import { isDevMode } from '../environment-remote';
12import Request from './lib/Request'; 12import Request from './lib/Request';
diff --git a/src/stores/index.ts b/src/stores/index.ts
index a5b1a7452..aac501cda 100644
--- a/src/stores/index.ts
+++ b/src/stores/index.ts
@@ -1,4 +1,3 @@
1import { Stores } from 'src/stores.types';
2import { RouterStore } from 'mobx-react-router'; 1import { RouterStore } from 'mobx-react-router';
3import { ApiInterface } from 'src/api'; 2import { ApiInterface } from 'src/api';
4import { Actions } from 'src/actions/lib/actions'; 3import { Actions } from 'src/actions/lib/actions';
@@ -16,12 +15,29 @@ import { workspaceStore } from '../features/workspaces';
16import { communityRecipesStore } from '../features/communityRecipes'; 15import { communityRecipesStore } from '../features/communityRecipes';
17import { todosStore } from '../features/todos'; 16import { todosStore } from '../features/todos';
18 17
18export interface RealStores {
19 router: RouterStore;
20 app: AppStore;
21 user: UserStore;
22 features: FeaturesStore;
23 settings: SettingsStore;
24 services: ServicesStore;
25 recipes: RecipesStore;
26 recipePreviews: RecipePreviewsStore;
27 ui: UIStore;
28 requests: RequestStore;
29 globalError: GlobalErrorStore;
30 workspaces: typeof workspaceStore;
31 communityRecipes: typeof communityRecipesStore;
32 todos: typeof todosStore;
33}
34
19export default ( 35export default (
20 api: ApiInterface, 36 api: ApiInterface,
21 actions: Actions, 37 actions: Actions,
22 router: RouterStore, 38 router: RouterStore,
23): Stores => { 39): RealStores => {
24 const stores: Stores | any = {}; 40 const stores: RealStores | any = {};
25 Object.assign(stores, { 41 Object.assign(stores, {
26 router, 42 router,
27 app: new AppStore(stores, api, actions), 43 app: new AppStore(stores, api, actions),
diff --git a/src/stores/lib/TypedStore.ts b/src/stores/lib/TypedStore.ts
index 7f9d2d60f..c78f83850 100644
--- a/src/stores/lib/TypedStore.ts
+++ b/src/stores/lib/TypedStore.ts
@@ -1,7 +1,7 @@
1import { computed, IReactionPublic, observable } from 'mobx'; 1import { computed, IReactionPublic, observable } from 'mobx';
2import { Actions } from 'src/actions/lib/actions'; 2import { Actions } from 'src/actions/lib/actions';
3import { ApiInterface } from 'src/api'; 3import { ApiInterface } from 'src/api';
4import { Stores } from 'src/stores.types'; 4import { Stores } from 'src/@types/stores.types';
5import Reaction from './Reaction'; 5import Reaction from './Reaction';
6 6
7export default abstract class TypedStore { 7export default abstract class TypedStore {