aboutsummaryrefslogtreecommitdiffstats
path: root/packages/main/src/stores
diff options
context:
space:
mode:
authorLibravatar Kristóf Marussy <kristof@marussy.com>2022-05-25 18:40:23 +0200
committerLibravatar Kristóf Marussy <kristof@marussy.com>2022-05-26 15:49:18 +0200
commit8484d3262dfb4fedd8b83f65d053bc21e455008d (patch)
tree9020f95a13ddf11863b0541619dd57ca3f511104 /packages/main/src/stores
parentchore(deps): bump dependencies (diff)
downloadsophie-8484d3262dfb4fedd8b83f65d053bc21e455008d.tar.gz
sophie-8484d3262dfb4fedd8b83f65d053bc21e455008d.tar.zst
sophie-8484d3262dfb4fedd8b83f65d053bc21e455008d.zip
chore: use node16 moduleResolution where possible
We can't do this in the renderer package, because we need to import MUI files that are not exported (MUI v6 is not ESM yet). Signed-off-by: Kristóf Marussy <kristof@marussy.com>
Diffstat (limited to 'packages/main/src/stores')
-rw-r--r--packages/main/src/stores/GlobalSettings.ts4
-rw-r--r--packages/main/src/stores/MainStore.ts18
-rw-r--r--packages/main/src/stores/Profile.ts2
-rw-r--r--packages/main/src/stores/Service.ts10
-rw-r--r--packages/main/src/stores/ServiceSettings.ts2
-rw-r--r--packages/main/src/stores/SharedStore.ts12
-rw-r--r--packages/main/src/stores/__tests__/SharedStore.test.ts8
-rw-r--r--packages/main/src/stores/config/Config.ts6
-rw-r--r--packages/main/src/stores/config/loadConfig.ts14
9 files changed, 38 insertions, 38 deletions
diff --git a/packages/main/src/stores/GlobalSettings.ts b/packages/main/src/stores/GlobalSettings.ts
index 84248ea..9ebc1b1 100644
--- a/packages/main/src/stores/GlobalSettings.ts
+++ b/packages/main/src/stores/GlobalSettings.ts
@@ -21,9 +21,9 @@
21import { defineGlobalSettingsModel, ThemeSource } from '@sophie/shared'; 21import { defineGlobalSettingsModel, ThemeSource } from '@sophie/shared';
22import { Instance, resolveIdentifier } from 'mobx-state-tree'; 22import { Instance, resolveIdentifier } from 'mobx-state-tree';
23 23
24import getLogger from '../utils/getLogger'; 24import getLogger from '../utils/getLogger.js';
25 25
26import Service from './Service'; 26import Service from './Service.js';
27 27
28const log = getLogger('sharedStore'); 28const log = getLogger('sharedStore');
29 29
diff --git a/packages/main/src/stores/MainStore.ts b/packages/main/src/stores/MainStore.ts
index b3e2830..1abd20c 100644
--- a/packages/main/src/stores/MainStore.ts
+++ b/packages/main/src/stores/MainStore.ts
@@ -22,16 +22,16 @@ import type { Action } from '@sophie/shared';
22import type { ResourceKey } from 'i18next'; 22import type { ResourceKey } from 'i18next';
23import { flow, Instance, types } from 'mobx-state-tree'; 23import { flow, Instance, types } from 'mobx-state-tree';
24 24
25import type I18nStore from '../i18n/I18nStore'; 25import type I18nStore from '../i18n/I18nStore.js';
26import type { UseTranslationResult } from '../i18n/I18nStore'; 26import type { UseTranslationResult } from '../i18n/I18nStore.js';
27import type { MainWindow } from '../infrastructure/electron/types'; 27import type { MainWindow } from '../infrastructure/electron/types.js';
28import getLogger from '../utils/getLogger'; 28import getLogger from '../utils/getLogger.js';
29 29
30import GlobalSettings from './GlobalSettings'; 30import GlobalSettings from './GlobalSettings.js';
31import { getEnv } from './MainEnv'; 31import { getEnv } from './MainEnv.js';
32import Profile from './Profile'; 32import Profile from './Profile.js';
33import Service from './Service'; 33import Service from './Service.js';
34import SharedStore from './SharedStore'; 34import SharedStore from './SharedStore.js';
35 35
36const log = getLogger('MainStore'); 36const log = getLogger('MainStore');
37 37
diff --git a/packages/main/src/stores/Profile.ts b/packages/main/src/stores/Profile.ts
index 405a5d4..b4343a0 100644
--- a/packages/main/src/stores/Profile.ts
+++ b/packages/main/src/stores/Profile.ts
@@ -21,7 +21,7 @@
21import { Certificate, Profile as ProfileBase } from '@sophie/shared'; 21import { Certificate, Profile as ProfileBase } from '@sophie/shared';
22import { clone, getSnapshot, Instance } from 'mobx-state-tree'; 22import { clone, getSnapshot, Instance } from 'mobx-state-tree';
23 23
24import type ProfileConfig from './config/ProfileConfig'; 24import type ProfileConfig from './config/ProfileConfig.js';
25 25
26const Profile = ProfileBase.views((self) => ({ 26const Profile = ProfileBase.views((self) => ({
27 get config(): ProfileConfig { 27 get config(): ProfileConfig {
diff --git a/packages/main/src/stores/Service.ts b/packages/main/src/stores/Service.ts
index 9256f65..3b7d0b2 100644
--- a/packages/main/src/stores/Service.ts
+++ b/packages/main/src/stores/Service.ts
@@ -29,12 +29,12 @@ import {
29} from '@sophie/shared'; 29} from '@sophie/shared';
30import { type Instance, getSnapshot, cast, flow } from 'mobx-state-tree'; 30import { type Instance, getSnapshot, cast, flow } from 'mobx-state-tree';
31 31
32import type { ServiceView } from '../infrastructure/electron/types'; 32import type { ServiceView } from '../infrastructure/electron/types.js';
33import getLogger from '../utils/getLogger'; 33import getLogger from '../utils/getLogger.js';
34 34
35import { getEnv } from './MainEnv'; 35import { getEnv } from './MainEnv.js';
36import ServiceSettings from './ServiceSettings'; 36import ServiceSettings from './ServiceSettings.js';
37import type ServiceConfig from './config/ServiceConfig'; 37import type ServiceConfig from './config/ServiceConfig.js';
38 38
39const log = getLogger('Service'); 39const log = getLogger('Service');
40 40
diff --git a/packages/main/src/stores/ServiceSettings.ts b/packages/main/src/stores/ServiceSettings.ts
index 5d37347..d5c2843 100644
--- a/packages/main/src/stores/ServiceSettings.ts
+++ b/packages/main/src/stores/ServiceSettings.ts
@@ -21,7 +21,7 @@
21import { defineServiceSettingsModel } from '@sophie/shared'; 21import { defineServiceSettingsModel } from '@sophie/shared';
22import { Instance } from 'mobx-state-tree'; 22import { Instance } from 'mobx-state-tree';
23 23
24import Profile from './Profile'; 24import Profile from './Profile.js';
25 25
26const ServiceSettings = defineServiceSettingsModel(Profile); 26const ServiceSettings = defineServiceSettingsModel(Profile);
27 27
diff --git a/packages/main/src/stores/SharedStore.ts b/packages/main/src/stores/SharedStore.ts
index f93c3d4..e1c2d3c 100644
--- a/packages/main/src/stores/SharedStore.ts
+++ b/packages/main/src/stores/SharedStore.ts
@@ -21,13 +21,13 @@
21import { defineSharedStoreModel, WritingDirection } from '@sophie/shared'; 21import { defineSharedStoreModel, WritingDirection } from '@sophie/shared';
22import { getSnapshot, Instance } from 'mobx-state-tree'; 22import { getSnapshot, Instance } from 'mobx-state-tree';
23 23
24import getLogger from '../utils/getLogger'; 24import getLogger from '../utils/getLogger.js';
25 25
26import GlobalSettings from './GlobalSettings'; 26import GlobalSettings from './GlobalSettings.js';
27import Profile from './Profile'; 27import Profile from './Profile.js';
28import Service from './Service'; 28import Service from './Service.js';
29import type Config from './config/Config'; 29import type Config from './config/Config.js';
30import loadConfig from './config/loadConfig'; 30import loadConfig from './config/loadConfig.js';
31 31
32const log = getLogger('SharedStore'); 32const log = getLogger('SharedStore');
33 33
diff --git a/packages/main/src/stores/__tests__/SharedStore.test.ts b/packages/main/src/stores/__tests__/SharedStore.test.ts
index 0ed63e3..78396da 100644
--- a/packages/main/src/stores/__tests__/SharedStore.test.ts
+++ b/packages/main/src/stores/__tests__/SharedStore.test.ts
@@ -18,10 +18,10 @@
18 * SPDX-License-Identifier: AGPL-3.0-only 18 * SPDX-License-Identifier: AGPL-3.0-only
19 */ 19 */
20 20
21import SharedStore from '../SharedStore'; 21import SharedStore from '../SharedStore.js';
22import type Config from '../config/Config'; 22import type Config from '../config/Config.js';
23import type ProfileConfig from '../config/ProfileConfig'; 23import type ProfileConfig from '../config/ProfileConfig.js';
24import type ServiceConfig from '../config/ServiceConfig'; 24import type ServiceConfig from '../config/ServiceConfig.js';
25 25
26const profileProps: ProfileConfig = { 26const profileProps: ProfileConfig = {
27 name: 'Test profile', 27 name: 'Test profile',
diff --git a/packages/main/src/stores/config/Config.ts b/packages/main/src/stores/config/Config.ts
index c38e3c5..adb10a6 100644
--- a/packages/main/src/stores/config/Config.ts
+++ b/packages/main/src/stores/config/Config.ts
@@ -18,10 +18,10 @@
18 * SPDX-License-Identifier: AGPL-3.0-only 18 * SPDX-License-Identifier: AGPL-3.0-only
19 */ 19 */
20 20
21import type { GlobalSettingsSnapshotIn } from '../GlobalSettings'; 21import type { GlobalSettingsSnapshotIn } from '../GlobalSettings.js';
22 22
23import type ProfileConfig from './ProfileConfig'; 23import type ProfileConfig from './ProfileConfig.js';
24import type ServiceConfig from './ServiceConfig'; 24import type ServiceConfig from './ServiceConfig.js';
25 25
26export default interface Config extends GlobalSettingsSnapshotIn { 26export default interface Config extends GlobalSettingsSnapshotIn {
27 profiles?: ProfileConfig[] | undefined; 27 profiles?: ProfileConfig[] | undefined;
diff --git a/packages/main/src/stores/config/loadConfig.ts b/packages/main/src/stores/config/loadConfig.ts
index 2463084..8a1adcb 100644
--- a/packages/main/src/stores/config/loadConfig.ts
+++ b/packages/main/src/stores/config/loadConfig.ts
@@ -30,14 +30,14 @@ import {
30import { nanoid } from 'nanoid'; 30import { nanoid } from 'nanoid';
31import slug from 'slug'; 31import slug from 'slug';
32 32
33import GlobalSettings from '../GlobalSettings'; 33import GlobalSettings from '../GlobalSettings.js';
34import type Profile from '../Profile'; 34import type Profile from '../Profile.js';
35import type Service from '../Service'; 35import type Service from '../Service.js';
36import type { ServiceSettingsSnapshotIn } from '../ServiceSettings'; 36import type { ServiceSettingsSnapshotIn } from '../ServiceSettings.js';
37 37
38import type Config from './Config'; 38import type Config from './Config.js';
39import type ProfileConfig from './ProfileConfig'; 39import type ProfileConfig from './ProfileConfig.js';
40import type ServiceConfig from './ServiceConfig'; 40import type ServiceConfig from './ServiceConfig.js';
41 41
42function generateId(name?: string | undefined): string { 42function generateId(name?: string | undefined): string {
43 const nameSlug = typeof name === 'undefined' ? '' : slug(name); 43 const nameSlug = typeof name === 'undefined' ? '' : slug(name);