diff options
author | Kristóf Marussy <kristof@marussy.com> | 2022-05-25 18:40:23 +0200 |
---|---|---|
committer | Kristóf Marussy <kristof@marussy.com> | 2022-05-26 15:49:18 +0200 |
commit | 8484d3262dfb4fedd8b83f65d053bc21e455008d (patch) | |
tree | 9020f95a13ddf11863b0541619dd57ca3f511104 /packages/main | |
parent | chore(deps): bump dependencies (diff) | |
download | sophie-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')
40 files changed, 151 insertions, 146 deletions
diff --git a/packages/main/src/i18n/I18nStore.ts b/packages/main/src/i18n/I18nStore.ts index 8ea4430..4c77322 100644 --- a/packages/main/src/i18n/I18nStore.ts +++ b/packages/main/src/i18n/I18nStore.ts | |||
@@ -21,7 +21,7 @@ | |||
21 | import type { i18n, ResourceKey, TFunction } from 'i18next'; | 21 | import type { i18n, ResourceKey, TFunction } from 'i18next'; |
22 | import { IAtom, createAtom } from 'mobx'; | 22 | import { IAtom, createAtom } from 'mobx'; |
23 | 23 | ||
24 | import getLogger from '../utils/getLogger'; | 24 | import getLogger from '../utils/getLogger.js'; |
25 | 25 | ||
26 | const log = getLogger('I18nStore'); | 26 | const log = getLogger('I18nStore'); |
27 | 27 | ||
diff --git a/packages/main/src/i18n/RepositoryBasedI18nBackend.ts b/packages/main/src/i18n/RepositoryBasedI18nBackend.ts index 23f70d7..5b667d5 100644 --- a/packages/main/src/i18n/RepositoryBasedI18nBackend.ts +++ b/packages/main/src/i18n/RepositoryBasedI18nBackend.ts | |||
@@ -26,9 +26,9 @@ import type { | |||
26 | } from 'i18next'; | 26 | } from 'i18next'; |
27 | import { debounce } from 'lodash-es'; | 27 | import { debounce } from 'lodash-es'; |
28 | 28 | ||
29 | import getLogger from '../utils/getLogger'; | 29 | import getLogger from '../utils/getLogger.js'; |
30 | 30 | ||
31 | import type LocatlizationRepository from './LocalizationRepository'; | 31 | import type LocatlizationRepository from './LocalizationRepository.js'; |
32 | 32 | ||
33 | const MISSING_ENTRIES_DEBOUNCE_TIME_MS = 1000; | 33 | const MISSING_ENTRIES_DEBOUNCE_TIME_MS = 1000; |
34 | 34 | ||
diff --git a/packages/main/src/i18n/i18nLog.ts b/packages/main/src/i18n/i18nLog.ts index 308a1cc..94f6473 100644 --- a/packages/main/src/i18n/i18nLog.ts +++ b/packages/main/src/i18n/i18nLog.ts | |||
@@ -20,7 +20,7 @@ | |||
20 | 20 | ||
21 | import type { LoggerModule } from 'i18next'; | 21 | import type { LoggerModule } from 'i18next'; |
22 | 22 | ||
23 | import getLogger from '../utils/getLogger'; | 23 | import getLogger from '../utils/getLogger.js'; |
24 | 24 | ||
25 | const log = getLogger('i18nLog'); | 25 | const log = getLogger('i18nLog'); |
26 | 26 | ||
diff --git a/packages/main/src/i18n/impl/LocaltizationFiles.ts b/packages/main/src/i18n/impl/LocaltizationFiles.ts index 9cd854e..74e3ae3 100644 --- a/packages/main/src/i18n/impl/LocaltizationFiles.ts +++ b/packages/main/src/i18n/impl/LocaltizationFiles.ts | |||
@@ -22,10 +22,10 @@ import { readFile, writeFile } from 'node:fs/promises'; | |||
22 | 22 | ||
23 | import type { ResourceKey } from 'i18next'; | 23 | import type { ResourceKey } from 'i18next'; |
24 | 24 | ||
25 | import type Resources from '../../infrastructure/resources/Resources'; | 25 | import type Resources from '../../infrastructure/resources/Resources.js'; |
26 | import getLogger from '../../utils/getLogger'; | 26 | import getLogger from '../../utils/getLogger.js'; |
27 | import isErrno from '../../utils/isErrno'; | 27 | import isErrno from '../../utils/isErrno.js'; |
28 | import type LocatlizationRepository from '../LocalizationRepository'; | 28 | import type LocatlizationRepository from '../LocalizationRepository.js'; |
29 | 29 | ||
30 | const log = getLogger('LocalizationFiles'); | 30 | const log = getLogger('LocalizationFiles'); |
31 | 31 | ||
diff --git a/packages/main/src/i18n/loadLocalization.ts b/packages/main/src/i18n/loadLocalization.ts index e62b3e3..19da9e2 100644 --- a/packages/main/src/i18n/loadLocalization.ts +++ b/packages/main/src/i18n/loadLocalization.ts | |||
@@ -23,13 +23,13 @@ import i18next, { i18n } from 'i18next'; | |||
23 | import { reaction } from 'mobx'; | 23 | import { reaction } from 'mobx'; |
24 | import { addDisposer } from 'mobx-state-tree'; | 24 | import { addDisposer } from 'mobx-state-tree'; |
25 | 25 | ||
26 | import type MainStore from '../stores/MainStore'; | 26 | import type MainStore from '../stores/MainStore.js'; |
27 | import getLogger from '../utils/getLogger'; | 27 | import getLogger from '../utils/getLogger.js'; |
28 | 28 | ||
29 | import I18nStore from './I18nStore'; | 29 | import I18nStore from './I18nStore.js'; |
30 | import type LocatlizationRepository from './LocalizationRepository'; | 30 | import type LocatlizationRepository from './LocalizationRepository.js'; |
31 | import RepositoryBasedI18nBackend from './RepositoryBasedI18nBackend'; | 31 | import RepositoryBasedI18nBackend from './RepositoryBasedI18nBackend.js'; |
32 | import i18nLog from './i18nLog'; | 32 | import i18nLog from './i18nLog.js'; |
33 | 33 | ||
34 | const log = getLogger('loadLocationzation'); | 34 | const log = getLogger('loadLocationzation'); |
35 | 35 | ||
diff --git a/packages/main/src/index.ts b/packages/main/src/index.ts index 3494f25..3496212 100644 --- a/packages/main/src/index.ts +++ b/packages/main/src/index.ts | |||
@@ -23,11 +23,11 @@ import os from 'node:os'; | |||
23 | 23 | ||
24 | import { app } from 'electron'; | 24 | import { app } from 'electron'; |
25 | 25 | ||
26 | import { enableStacktraceSourceMaps } from './infrastructure/electron/impl/devTools'; | 26 | import { enableStacktraceSourceMaps } from './infrastructure/electron/impl/devTools.js'; |
27 | import electronShell from './infrastructure/electron/impl/electronShell'; | 27 | import electronShell from './infrastructure/electron/impl/electronShell.js'; |
28 | import initReactions from './initReactions'; | 28 | import initReactions from './initReactions.js'; |
29 | import MainStore from './stores/MainStore'; | 29 | import MainStore from './stores/MainStore.js'; |
30 | import getLogger from './utils/getLogger'; | 30 | import getLogger from './utils/getLogger.js'; |
31 | 31 | ||
32 | const isDevelopment = import.meta.env.MODE === 'development'; | 32 | const isDevelopment = import.meta.env.MODE === 'development'; |
33 | 33 | ||
diff --git a/packages/main/src/infrastructure/config/ConfigRepository.ts b/packages/main/src/infrastructure/config/ConfigRepository.ts index 67bffb0..7d5e12b 100644 --- a/packages/main/src/infrastructure/config/ConfigRepository.ts +++ b/packages/main/src/infrastructure/config/ConfigRepository.ts | |||
@@ -18,7 +18,7 @@ | |||
18 | * SPDX-License-Identifier: AGPL-3.0-only | 18 | * SPDX-License-Identifier: AGPL-3.0-only |
19 | */ | 19 | */ |
20 | 20 | ||
21 | import type Disposer from '../../utils/Disposer'; | 21 | import type Disposer from '../../utils/Disposer.js'; |
22 | 22 | ||
23 | export type ReadConfigResult = | 23 | export type ReadConfigResult = |
24 | | { found: true; contents: string } | 24 | | { found: true; contents: string } |
diff --git a/packages/main/src/infrastructure/config/impl/ConfigFile.ts b/packages/main/src/infrastructure/config/impl/ConfigFile.ts index 6203c89..684a827 100644 --- a/packages/main/src/infrastructure/config/impl/ConfigFile.ts +++ b/packages/main/src/infrastructure/config/impl/ConfigFile.ts | |||
@@ -24,11 +24,11 @@ import path from 'node:path'; | |||
24 | 24 | ||
25 | import { throttle } from 'lodash-es'; | 25 | import { throttle } from 'lodash-es'; |
26 | 26 | ||
27 | import type Disposer from '../../../utils/Disposer'; | 27 | import type Disposer from '../../../utils/Disposer.js'; |
28 | import getLogger from '../../../utils/getLogger'; | 28 | import getLogger from '../../../utils/getLogger.js'; |
29 | import isErrno from '../../../utils/isErrno'; | 29 | import isErrno from '../../../utils/isErrno.js'; |
30 | import type ConfigRepository from '../ConfigRepository'; | 30 | import type ConfigRepository from '../ConfigRepository.js'; |
31 | import type { ReadConfigResult } from '../ConfigRepository'; | 31 | import type { ReadConfigResult } from '../ConfigRepository.js'; |
32 | 32 | ||
33 | const log = getLogger('ConfigFile'); | 33 | const log = getLogger('ConfigFile'); |
34 | 34 | ||
diff --git a/packages/main/src/infrastructure/electron/RendererBridge.ts b/packages/main/src/infrastructure/electron/RendererBridge.ts index 097580a..921f09a 100644 --- a/packages/main/src/infrastructure/electron/RendererBridge.ts +++ b/packages/main/src/infrastructure/electron/RendererBridge.ts | |||
@@ -26,8 +26,8 @@ import { | |||
26 | onPatch, | 26 | onPatch, |
27 | } from 'mobx-state-tree'; | 27 | } from 'mobx-state-tree'; |
28 | 28 | ||
29 | import type MainStore from '../../stores/MainStore'; | 29 | import type MainStore from '../../stores/MainStore.js'; |
30 | import Disposer from '../../utils/Disposer'; | 30 | import Disposer from '../../utils/Disposer.js'; |
31 | 31 | ||
32 | export type PatchListener = (patch: IJsonPatch[]) => void; | 32 | export type PatchListener = (patch: IJsonPatch[]) => void; |
33 | 33 | ||
diff --git a/packages/main/src/infrastructure/electron/__tests__/RendererBridge.test.ts b/packages/main/src/infrastructure/electron/__tests__/RendererBridge.test.ts index b7c8a76..e29429d 100644 --- a/packages/main/src/infrastructure/electron/__tests__/RendererBridge.test.ts +++ b/packages/main/src/infrastructure/electron/__tests__/RendererBridge.test.ts | |||
@@ -30,8 +30,8 @@ import { | |||
30 | unprotect, | 30 | unprotect, |
31 | } from 'mobx-state-tree'; | 31 | } from 'mobx-state-tree'; |
32 | 32 | ||
33 | import MainStore from '../../../stores/MainStore'; | 33 | import MainStore from '../../../stores/MainStore.js'; |
34 | import RendererBridge, { type PatchListener } from '../RendererBridge'; | 34 | import RendererBridge, { type PatchListener } from '../RendererBridge.js'; |
35 | 35 | ||
36 | const TestStore = MainStore.actions((theSelf) => ({ | 36 | const TestStore = MainStore.actions((theSelf) => ({ |
37 | /** | 37 | /** |
diff --git a/packages/main/src/infrastructure/electron/__tests__/UserAgents.test.ts b/packages/main/src/infrastructure/electron/__tests__/UserAgents.test.ts index d963704..0c6dd1c 100644 --- a/packages/main/src/infrastructure/electron/__tests__/UserAgents.test.ts +++ b/packages/main/src/infrastructure/electron/__tests__/UserAgents.test.ts | |||
@@ -18,7 +18,7 @@ | |||
18 | * SPDX-License-Identifier: AGPL-3.0-only | 18 | * SPDX-License-Identifier: AGPL-3.0-only |
19 | */ | 19 | */ |
20 | 20 | ||
21 | import UserAgents from '../UserAgents'; | 21 | import UserAgents from '../UserAgents.js'; |
22 | 22 | ||
23 | let userAgents: UserAgents; | 23 | let userAgents: UserAgents; |
24 | 24 | ||
diff --git a/packages/main/src/infrastructure/electron/impl/ElectronMainWindow.ts b/packages/main/src/infrastructure/electron/impl/ElectronMainWindow.ts index 20a1f70..c4b3823 100644 --- a/packages/main/src/infrastructure/electron/impl/ElectronMainWindow.ts +++ b/packages/main/src/infrastructure/electron/impl/ElectronMainWindow.ts | |||
@@ -27,15 +27,15 @@ import { | |||
27 | import { BrowserWindow, ipcMain, IpcMainEvent } from 'electron'; | 27 | import { BrowserWindow, ipcMain, IpcMainEvent } from 'electron'; |
28 | import type { IJsonPatch } from 'mobx-state-tree'; | 28 | import type { IJsonPatch } from 'mobx-state-tree'; |
29 | 29 | ||
30 | import type MainStore from '../../../stores/MainStore'; | 30 | import type MainStore from '../../../stores/MainStore.js'; |
31 | import getLogger from '../../../utils/getLogger'; | 31 | import getLogger from '../../../utils/getLogger.js'; |
32 | import RendererBridge from '../RendererBridge'; | 32 | import RendererBridge from '../RendererBridge.js'; |
33 | import type { MainWindow, ServiceView } from '../types'; | 33 | import type { MainWindow, ServiceView } from '../types.js'; |
34 | 34 | ||
35 | import ElectronServiceView from './ElectronServiceView'; | 35 | import ElectronServiceView from './ElectronServiceView.js'; |
36 | import type ElectronViewFactory from './ElectronViewFactory'; | 36 | import type ElectronViewFactory from './ElectronViewFactory.js'; |
37 | import { openDevToolsWhenReady } from './devTools'; | 37 | import { openDevToolsWhenReady } from './devTools.js'; |
38 | import lockWebContentsToFile from './lockWebContentsToFile'; | 38 | import lockWebContentsToFile from './lockWebContentsToFile.js'; |
39 | 39 | ||
40 | const log = getLogger('ElectronMainWindow'); | 40 | const log = getLogger('ElectronMainWindow'); |
41 | 41 | ||
diff --git a/packages/main/src/infrastructure/electron/impl/ElectronPartition.ts b/packages/main/src/infrastructure/electron/impl/ElectronPartition.ts index e60ce21..d1220c5 100644 --- a/packages/main/src/infrastructure/electron/impl/ElectronPartition.ts +++ b/packages/main/src/infrastructure/electron/impl/ElectronPartition.ts | |||
@@ -20,10 +20,10 @@ | |||
20 | 20 | ||
21 | import { Session, session } from 'electron'; | 21 | import { Session, session } from 'electron'; |
22 | 22 | ||
23 | import type Profile from '../../../stores/Profile'; | 23 | import type Profile from '../../../stores/Profile.js'; |
24 | import type { Partition } from '../types'; | 24 | import type { Partition } from '../types.js'; |
25 | 25 | ||
26 | import type ElectronViewFactory from './ElectronViewFactory'; | 26 | import type ElectronViewFactory from './ElectronViewFactory.js'; |
27 | 27 | ||
28 | export default class ElectronPartition implements Partition { | 28 | export default class ElectronPartition implements Partition { |
29 | readonly id: string; | 29 | readonly id: string; |
diff --git a/packages/main/src/infrastructure/electron/impl/ElectronServiceView.ts b/packages/main/src/infrastructure/electron/impl/ElectronServiceView.ts index a9298bd..91247c8 100644 --- a/packages/main/src/infrastructure/electron/impl/ElectronServiceView.ts +++ b/packages/main/src/infrastructure/electron/impl/ElectronServiceView.ts | |||
@@ -20,13 +20,13 @@ | |||
20 | 20 | ||
21 | import { BrowserView } from 'electron'; | 21 | import { BrowserView } from 'electron'; |
22 | 22 | ||
23 | import type Service from '../../../stores/Service'; | 23 | import type Service from '../../../stores/Service.js'; |
24 | import getLogger from '../../../utils/getLogger'; | 24 | import getLogger from '../../../utils/getLogger.js'; |
25 | import type Resources from '../../resources/Resources'; | 25 | import type Resources from '../../resources/Resources.js'; |
26 | import type { ServiceView } from '../types'; | 26 | import type { ServiceView } from '../types.js'; |
27 | 27 | ||
28 | import ElectronPartition from './ElectronPartition'; | 28 | import ElectronPartition from './ElectronPartition.js'; |
29 | import type ElectronViewFactory from './ElectronViewFactory'; | 29 | import type ElectronViewFactory from './ElectronViewFactory.js'; |
30 | 30 | ||
31 | const log = getLogger('ElectronServiceView'); | 31 | const log = getLogger('ElectronServiceView'); |
32 | 32 | ||
diff --git a/packages/main/src/infrastructure/electron/impl/ElectronViewFactory.ts b/packages/main/src/infrastructure/electron/impl/ElectronViewFactory.ts index c72860d..df3de85 100644 --- a/packages/main/src/infrastructure/electron/impl/ElectronViewFactory.ts +++ b/packages/main/src/infrastructure/electron/impl/ElectronViewFactory.ts | |||
@@ -18,16 +18,21 @@ | |||
18 | * SPDX-License-Identifier: AGPL-3.0-only | 18 | * SPDX-License-Identifier: AGPL-3.0-only |
19 | */ | 19 | */ |
20 | 20 | ||
21 | import type MainStore from '../../../stores/MainStore'; | 21 | import type MainStore from '../../../stores/MainStore.js'; |
22 | import type Profile from '../../../stores/Profile'; | 22 | import type Profile from '../../../stores/Profile.js'; |
23 | import type Service from '../../../stores/Service'; | 23 | import type Service from '../../../stores/Service.js'; |
24 | import type Resources from '../../resources/Resources'; | 24 | import type Resources from '../../resources/Resources.js'; |
25 | import type UserAgents from '../UserAgents'; | 25 | import type UserAgents from '../UserAgents.js'; |
26 | import type { MainWindow, Partition, ServiceView, ViewFactory } from '../types'; | 26 | import type { |
27 | MainWindow, | ||
28 | Partition, | ||
29 | ServiceView, | ||
30 | ViewFactory, | ||
31 | } from '../types.js'; | ||
27 | 32 | ||
28 | import ElectronMainWindow from './ElectronMainWindow'; | 33 | import ElectronMainWindow from './ElectronMainWindow.js'; |
29 | import ElectronPartition from './ElectronPartition'; | 34 | import ElectronPartition from './ElectronPartition.js'; |
30 | import ElectronServiceView from './ElectronServiceView'; | 35 | import ElectronServiceView from './ElectronServiceView.js'; |
31 | 36 | ||
32 | export default class ElectronViewFactory implements ViewFactory { | 37 | export default class ElectronViewFactory implements ViewFactory { |
33 | private readonly webContentsIdToServiceView = new Map< | 38 | private readonly webContentsIdToServiceView = new Map< |
diff --git a/packages/main/src/infrastructure/electron/impl/__tests__/electron.integ.test.ts b/packages/main/src/infrastructure/electron/impl/__tests__/electron.integ.test.ts index 67cf689..75b12ac 100644 --- a/packages/main/src/infrastructure/electron/impl/__tests__/electron.integ.test.ts +++ b/packages/main/src/infrastructure/electron/impl/__tests__/electron.integ.test.ts | |||
@@ -1,6 +1,6 @@ | |||
1 | import { BrowserWindow } from 'electron'; | 1 | import { BrowserWindow } from 'electron'; |
2 | 2 | ||
3 | import '../ElectronMainWindow'; | 3 | import '../ElectronMainWindow.js'; |
4 | 4 | ||
5 | test('create a BrowserWindow', async () => { | 5 | test('create a BrowserWindow', async () => { |
6 | const w = new BrowserWindow(); | 6 | const w = new BrowserWindow(); |
diff --git a/packages/main/src/infrastructure/electron/impl/__tests__/hardenSession.test.ts b/packages/main/src/infrastructure/electron/impl/__tests__/hardenSession.test.ts index 7b70d10..bbbd675 100644 --- a/packages/main/src/infrastructure/electron/impl/__tests__/hardenSession.test.ts +++ b/packages/main/src/infrastructure/electron/impl/__tests__/hardenSession.test.ts | |||
@@ -30,8 +30,8 @@ import type { | |||
30 | WebContents, | 30 | WebContents, |
31 | } from 'electron'; | 31 | } from 'electron'; |
32 | 32 | ||
33 | import type Resources from '../../../resources/Resources'; | 33 | import type Resources from '../../../resources/Resources.js'; |
34 | import hardenSession from '../hardenSession'; | 34 | import hardenSession from '../hardenSession.js'; |
35 | 35 | ||
36 | const permissions = [ | 36 | const permissions = [ |
37 | 'clipboard-read', | 37 | 'clipboard-read', |
diff --git a/packages/main/src/infrastructure/electron/impl/__tests__/lockWebContentsToFile.test.ts b/packages/main/src/infrastructure/electron/impl/__tests__/lockWebContentsToFile.test.ts index 47525d3..6332db7 100644 --- a/packages/main/src/infrastructure/electron/impl/__tests__/lockWebContentsToFile.test.ts +++ b/packages/main/src/infrastructure/electron/impl/__tests__/lockWebContentsToFile.test.ts | |||
@@ -25,8 +25,8 @@ import { fake } from '@sophie/test-utils'; | |||
25 | import type { Event, HandlerDetails, WebContents } from 'electron'; | 25 | import type { Event, HandlerDetails, WebContents } from 'electron'; |
26 | import { mocked } from 'jest-mock'; | 26 | import { mocked } from 'jest-mock'; |
27 | 27 | ||
28 | import type Resources from '../../../resources/Resources'; | 28 | import type Resources from '../../../resources/Resources.js'; |
29 | import lockWebContentsToFile from '../lockWebContentsToFile'; | 29 | import lockWebContentsToFile from '../lockWebContentsToFile.js'; |
30 | 30 | ||
31 | type WillNavigateHandler = (event: Event, url: string) => void; | 31 | type WillNavigateHandler = (event: Event, url: string) => void; |
32 | 32 | ||
diff --git a/packages/main/src/infrastructure/electron/impl/electronShell.ts b/packages/main/src/infrastructure/electron/impl/electronShell.ts index f7f7001..da246c0 100644 --- a/packages/main/src/infrastructure/electron/impl/electronShell.ts +++ b/packages/main/src/infrastructure/electron/impl/electronShell.ts | |||
@@ -23,7 +23,7 @@ import { writeFile } from 'node:fs/promises'; | |||
23 | import { app, dialog, shell } from 'electron'; | 23 | import { app, dialog, shell } from 'electron'; |
24 | import { getLogger } from 'loglevel'; | 24 | import { getLogger } from 'loglevel'; |
25 | 25 | ||
26 | import type MainEnv from '../../../stores/MainEnv'; | 26 | import type MainEnv from '../../../stores/MainEnv.js'; |
27 | 27 | ||
28 | const log = getLogger('ElectronShell'); | 28 | const log = getLogger('ElectronShell'); |
29 | 29 | ||
diff --git a/packages/main/src/infrastructure/electron/impl/hardenSession.ts b/packages/main/src/infrastructure/electron/impl/hardenSession.ts index fc358a1..0574146 100644 --- a/packages/main/src/infrastructure/electron/impl/hardenSession.ts +++ b/packages/main/src/infrastructure/electron/impl/hardenSession.ts | |||
@@ -22,8 +22,8 @@ import { URL } from 'node:url'; | |||
22 | 22 | ||
23 | import type { Session } from 'electron'; | 23 | import type { Session } from 'electron'; |
24 | 24 | ||
25 | import getLogger from '../../../utils/getLogger'; | 25 | import getLogger from '../../../utils/getLogger.js'; |
26 | import type Resources from '../../resources/Resources'; | 26 | import type Resources from '../../resources/Resources.js'; |
27 | 27 | ||
28 | /** | 28 | /** |
29 | * URL prefixes Sophie is allowed load in dev mode. | 29 | * URL prefixes Sophie is allowed load in dev mode. |
diff --git a/packages/main/src/infrastructure/electron/impl/lockWebContentsToFile.ts b/packages/main/src/infrastructure/electron/impl/lockWebContentsToFile.ts index da40a56..338c845 100644 --- a/packages/main/src/infrastructure/electron/impl/lockWebContentsToFile.ts +++ b/packages/main/src/infrastructure/electron/impl/lockWebContentsToFile.ts | |||
@@ -20,9 +20,9 @@ | |||
20 | 20 | ||
21 | import type { WebContents } from 'electron'; | 21 | import type { WebContents } from 'electron'; |
22 | 22 | ||
23 | import getLogger from '../../../utils/getLogger'; | 23 | import getLogger from '../../../utils/getLogger.js'; |
24 | import isErrno from '../../../utils/isErrno'; | 24 | import isErrno from '../../../utils/isErrno.js'; |
25 | import type Resources from '../../resources/Resources'; | 25 | import type Resources from '../../resources/Resources.js'; |
26 | 26 | ||
27 | const log = getLogger('lockWebContentsToFile'); | 27 | const log = getLogger('lockWebContentsToFile'); |
28 | 28 | ||
diff --git a/packages/main/src/infrastructure/electron/impl/setApplicationMenu.ts b/packages/main/src/infrastructure/electron/impl/setApplicationMenu.ts index 32b2d4d..7e45401 100644 --- a/packages/main/src/infrastructure/electron/impl/setApplicationMenu.ts +++ b/packages/main/src/infrastructure/electron/impl/setApplicationMenu.ts | |||
@@ -22,7 +22,7 @@ import { Menu, MenuItemConstructorOptions } from 'electron'; | |||
22 | import { autorun } from 'mobx'; | 22 | import { autorun } from 'mobx'; |
23 | import { addDisposer } from 'mobx-state-tree'; | 23 | import { addDisposer } from 'mobx-state-tree'; |
24 | 24 | ||
25 | import type MainStore from '../../../stores/MainStore'; | 25 | import type MainStore from '../../../stores/MainStore.js'; |
26 | 26 | ||
27 | export default function setApplicationMenu( | 27 | export default function setApplicationMenu( |
28 | store: MainStore, | 28 | store: MainStore, |
diff --git a/packages/main/src/infrastructure/electron/types.ts b/packages/main/src/infrastructure/electron/types.ts index 92ca9ad..608a342 100644 --- a/packages/main/src/infrastructure/electron/types.ts +++ b/packages/main/src/infrastructure/electron/types.ts | |||
@@ -18,9 +18,9 @@ | |||
18 | * SPDX-License-Identifier: AGPL-3.0-only | 18 | * SPDX-License-Identifier: AGPL-3.0-only |
19 | */ | 19 | */ |
20 | 20 | ||
21 | import type MainStore from '../../stores/MainStore'; | 21 | import type MainStore from '../../stores/MainStore.js'; |
22 | import type Profile from '../../stores/Profile'; | 22 | import type Profile from '../../stores/Profile.js'; |
23 | import type Service from '../../stores/Service'; | 23 | import type Service from '../../stores/Service.js'; |
24 | 24 | ||
25 | export interface ViewFactory { | 25 | export interface ViewFactory { |
26 | createMainWindow(store: MainStore): Promise<MainWindow>; | 26 | createMainWindow(store: MainStore): Promise<MainWindow>; |
diff --git a/packages/main/src/infrastructure/resources/impl/__tests__/getDistResources.test.ts b/packages/main/src/infrastructure/resources/impl/__tests__/getDistResources.test.ts index 649536b..c7c6e22 100644 --- a/packages/main/src/infrastructure/resources/impl/__tests__/getDistResources.test.ts +++ b/packages/main/src/infrastructure/resources/impl/__tests__/getDistResources.test.ts | |||
@@ -20,8 +20,8 @@ | |||
20 | 20 | ||
21 | import os from 'node:os'; | 21 | import os from 'node:os'; |
22 | 22 | ||
23 | import Resources from '../../Resources'; | 23 | import Resources from '../../Resources.js'; |
24 | import getDistResources from '../getDistResources'; | 24 | import getDistResources from '../getDistResources.js'; |
25 | 25 | ||
26 | const defaultDevServerURL = 'http://localhost:3000/'; | 26 | const defaultDevServerURL = 'http://localhost:3000/'; |
27 | 27 | ||
diff --git a/packages/main/src/infrastructure/resources/impl/getDistResources.ts b/packages/main/src/infrastructure/resources/impl/getDistResources.ts index 3c1ffb3..3b7827c 100644 --- a/packages/main/src/infrastructure/resources/impl/getDistResources.ts +++ b/packages/main/src/infrastructure/resources/impl/getDistResources.ts | |||
@@ -21,7 +21,7 @@ | |||
21 | import path from 'node:path'; | 21 | import path from 'node:path'; |
22 | import { pathToFileURL, URL } from 'node:url'; | 22 | import { pathToFileURL, URL } from 'node:url'; |
23 | 23 | ||
24 | import Resources from '../Resources'; | 24 | import Resources from '../Resources.js'; |
25 | 25 | ||
26 | export default function getDistResources( | 26 | export default function getDistResources( |
27 | devMode: boolean, | 27 | devMode: boolean, |
diff --git a/packages/main/src/initReactions.ts b/packages/main/src/initReactions.ts index 05bc205..cbc0265 100644 --- a/packages/main/src/initReactions.ts +++ b/packages/main/src/initReactions.ts | |||
@@ -20,20 +20,20 @@ | |||
20 | 20 | ||
21 | import { app, session } from 'electron'; | 21 | import { app, session } from 'electron'; |
22 | 22 | ||
23 | import LocalizationFiles from './i18n/impl/LocaltizationFiles'; | 23 | import LocalizationFiles from './i18n/impl/LocaltizationFiles.js'; |
24 | import loadLocalization from './i18n/loadLocalization'; | 24 | import loadLocalization from './i18n/loadLocalization.js'; |
25 | import ConfigFile from './infrastructure/config/impl/ConfigFile'; | 25 | import ConfigFile from './infrastructure/config/impl/ConfigFile.js'; |
26 | import UserAgents from './infrastructure/electron/UserAgents'; | 26 | import UserAgents from './infrastructure/electron/UserAgents.js'; |
27 | import ElectronViewFactory from './infrastructure/electron/impl/ElectronViewFactory'; | 27 | import ElectronViewFactory from './infrastructure/electron/impl/ElectronViewFactory.js'; |
28 | import { installDevToolsExtensions } from './infrastructure/electron/impl/devTools'; | 28 | import { installDevToolsExtensions } from './infrastructure/electron/impl/devTools.js'; |
29 | import hardenSession from './infrastructure/electron/impl/hardenSession'; | 29 | import hardenSession from './infrastructure/electron/impl/hardenSession.js'; |
30 | import setApplicationMenu from './infrastructure/electron/impl/setApplicationMenu'; | 30 | import setApplicationMenu from './infrastructure/electron/impl/setApplicationMenu.js'; |
31 | import getDistResources from './infrastructure/resources/impl/getDistResources'; | 31 | import getDistResources from './infrastructure/resources/impl/getDistResources.js'; |
32 | import loadServices from './reactions/loadServices'; | 32 | import loadServices from './reactions/loadServices.js'; |
33 | import synchronizeConfig from './reactions/synchronizeConfig'; | 33 | import synchronizeConfig from './reactions/synchronizeConfig.js'; |
34 | import synchronizeNativeTheme from './reactions/synchronizeNativeTheme'; | 34 | import synchronizeNativeTheme from './reactions/synchronizeNativeTheme.js'; |
35 | import type MainStore from './stores/MainStore'; | 35 | import type MainStore from './stores/MainStore.js'; |
36 | import type Disposer from './utils/Disposer'; | 36 | import type Disposer from './utils/Disposer.js'; |
37 | 37 | ||
38 | export default async function initReactions( | 38 | export default async function initReactions( |
39 | store: MainStore, | 39 | store: MainStore, |
diff --git a/packages/main/src/reactions/__tests__/synchronizeConfig.test.ts b/packages/main/src/reactions/__tests__/synchronizeConfig.test.ts index f0e88c1..d4d8abf 100644 --- a/packages/main/src/reactions/__tests__/synchronizeConfig.test.ts +++ b/packages/main/src/reactions/__tests__/synchronizeConfig.test.ts | |||
@@ -21,10 +21,10 @@ | |||
21 | import { jest } from '@jest/globals'; | 21 | import { jest } from '@jest/globals'; |
22 | import { mocked } from 'jest-mock'; | 22 | import { mocked } from 'jest-mock'; |
23 | 23 | ||
24 | import type ConfigRepository from '../../infrastructure/config/ConfigRepository'; | 24 | import type ConfigRepository from '../../infrastructure/config/ConfigRepository.js'; |
25 | import SharedStore from '../../stores/SharedStore'; | 25 | import SharedStore from '../../stores/SharedStore.js'; |
26 | import type Disposer from '../../utils/Disposer'; | 26 | import type Disposer from '../../utils/Disposer.js'; |
27 | import synchronizeConfig, { serializeConfig } from '../synchronizeConfig'; | 27 | import synchronizeConfig, { serializeConfig } from '../synchronizeConfig.js'; |
28 | 28 | ||
29 | let store: SharedStore; | 29 | let store: SharedStore; |
30 | const repository: ConfigRepository = { | 30 | const repository: ConfigRepository = { |
diff --git a/packages/main/src/reactions/__tests__/synchronizeNativeTheme.test.ts b/packages/main/src/reactions/__tests__/synchronizeNativeTheme.test.ts index 05f14fb..c89f989 100644 --- a/packages/main/src/reactions/__tests__/synchronizeNativeTheme.test.ts +++ b/packages/main/src/reactions/__tests__/synchronizeNativeTheme.test.ts | |||
@@ -21,8 +21,8 @@ | |||
21 | import { jest } from '@jest/globals'; | 21 | import { jest } from '@jest/globals'; |
22 | import { mocked } from 'jest-mock'; | 22 | import { mocked } from 'jest-mock'; |
23 | 23 | ||
24 | import SharedStore from '../../stores/SharedStore'; | 24 | import SharedStore from '../../stores/SharedStore.js'; |
25 | import type Disposer from '../../utils/Disposer'; | 25 | import type Disposer from '../../utils/Disposer.js'; |
26 | 26 | ||
27 | let shouldUseDarkColors = false; | 27 | let shouldUseDarkColors = false; |
28 | 28 | ||
@@ -39,7 +39,7 @@ jest.unstable_mockModule('electron', () => ({ | |||
39 | 39 | ||
40 | const { nativeTheme } = await import('electron'); | 40 | const { nativeTheme } = await import('electron'); |
41 | const { default: synchronizeNativeTheme } = await import( | 41 | const { default: synchronizeNativeTheme } = await import( |
42 | '../synchronizeNativeTheme' | 42 | '../synchronizeNativeTheme.js' |
43 | ); | 43 | ); |
44 | 44 | ||
45 | let store: SharedStore; | 45 | let store: SharedStore; |
diff --git a/packages/main/src/reactions/loadServices.ts b/packages/main/src/reactions/loadServices.ts index 50fd2cb..1325a36 100644 --- a/packages/main/src/reactions/loadServices.ts +++ b/packages/main/src/reactions/loadServices.ts | |||
@@ -26,10 +26,10 @@ import type { | |||
26 | Partition, | 26 | Partition, |
27 | ServiceView, | 27 | ServiceView, |
28 | ViewFactory, | 28 | ViewFactory, |
29 | } from '../infrastructure/electron/types'; | 29 | } from '../infrastructure/electron/types.js'; |
30 | import type MainStore from '../stores/MainStore'; | 30 | import type MainStore from '../stores/MainStore.js'; |
31 | import type Service from '../stores/Service'; | 31 | import type Service from '../stores/Service.js'; |
32 | import getLogger from '../utils/getLogger'; | 32 | import getLogger from '../utils/getLogger.js'; |
33 | 33 | ||
34 | const log = getLogger('loadServices'); | 34 | const log = getLogger('loadServices'); |
35 | 35 | ||
diff --git a/packages/main/src/reactions/synchronizeConfig.ts b/packages/main/src/reactions/synchronizeConfig.ts index 5fe924a..f3c8b4a 100644 --- a/packages/main/src/reactions/synchronizeConfig.ts +++ b/packages/main/src/reactions/synchronizeConfig.ts | |||
@@ -21,11 +21,11 @@ | |||
21 | import { debounce } from 'lodash-es'; | 21 | import { debounce } from 'lodash-es'; |
22 | import { reaction } from 'mobx'; | 22 | import { reaction } from 'mobx'; |
23 | 23 | ||
24 | import type ConfigRepository from '../infrastructure/config/ConfigRepository'; | 24 | import type ConfigRepository from '../infrastructure/config/ConfigRepository.js'; |
25 | import type SharedStore from '../stores/SharedStore'; | 25 | import type SharedStore from '../stores/SharedStore.js'; |
26 | import type Config from '../stores/config/Config'; | 26 | import type Config from '../stores/config/Config.js'; |
27 | import type Disposer from '../utils/Disposer'; | 27 | import type Disposer from '../utils/Disposer.js'; |
28 | import getLogger from '../utils/getLogger'; | 28 | import getLogger from '../utils/getLogger.js'; |
29 | 29 | ||
30 | const DEFAULT_CONFIG_DEBOUNCE_TIME_MS = 1000; | 30 | const DEFAULT_CONFIG_DEBOUNCE_TIME_MS = 1000; |
31 | 31 | ||
diff --git a/packages/main/src/reactions/synchronizeNativeTheme.ts b/packages/main/src/reactions/synchronizeNativeTheme.ts index 384d54d..10d5f69 100644 --- a/packages/main/src/reactions/synchronizeNativeTheme.ts +++ b/packages/main/src/reactions/synchronizeNativeTheme.ts | |||
@@ -21,9 +21,9 @@ | |||
21 | import { nativeTheme } from 'electron'; | 21 | import { nativeTheme } from 'electron'; |
22 | import { autorun } from 'mobx'; | 22 | import { autorun } from 'mobx'; |
23 | 23 | ||
24 | import type SharedStore from '../stores/SharedStore'; | 24 | import type SharedStore from '../stores/SharedStore.js'; |
25 | import type Disposer from '../utils/Disposer'; | 25 | import type Disposer from '../utils/Disposer.js'; |
26 | import getLogger from '../utils/getLogger'; | 26 | import getLogger from '../utils/getLogger.js'; |
27 | 27 | ||
28 | const log = getLogger('synchronizeNativeTheme'); | 28 | const log = getLogger('synchronizeNativeTheme'); |
29 | 29 | ||
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 @@ | |||
21 | import { defineGlobalSettingsModel, ThemeSource } from '@sophie/shared'; | 21 | import { defineGlobalSettingsModel, ThemeSource } from '@sophie/shared'; |
22 | import { Instance, resolveIdentifier } from 'mobx-state-tree'; | 22 | import { Instance, resolveIdentifier } from 'mobx-state-tree'; |
23 | 23 | ||
24 | import getLogger from '../utils/getLogger'; | 24 | import getLogger from '../utils/getLogger.js'; |
25 | 25 | ||
26 | import Service from './Service'; | 26 | import Service from './Service.js'; |
27 | 27 | ||
28 | const log = getLogger('sharedStore'); | 28 | const 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'; | |||
22 | import type { ResourceKey } from 'i18next'; | 22 | import type { ResourceKey } from 'i18next'; |
23 | import { flow, Instance, types } from 'mobx-state-tree'; | 23 | import { flow, Instance, types } from 'mobx-state-tree'; |
24 | 24 | ||
25 | import type I18nStore from '../i18n/I18nStore'; | 25 | import type I18nStore from '../i18n/I18nStore.js'; |
26 | import type { UseTranslationResult } from '../i18n/I18nStore'; | 26 | import type { UseTranslationResult } from '../i18n/I18nStore.js'; |
27 | import type { MainWindow } from '../infrastructure/electron/types'; | 27 | import type { MainWindow } from '../infrastructure/electron/types.js'; |
28 | import getLogger from '../utils/getLogger'; | 28 | import getLogger from '../utils/getLogger.js'; |
29 | 29 | ||
30 | import GlobalSettings from './GlobalSettings'; | 30 | import GlobalSettings from './GlobalSettings.js'; |
31 | import { getEnv } from './MainEnv'; | 31 | import { getEnv } from './MainEnv.js'; |
32 | import Profile from './Profile'; | 32 | import Profile from './Profile.js'; |
33 | import Service from './Service'; | 33 | import Service from './Service.js'; |
34 | import SharedStore from './SharedStore'; | 34 | import SharedStore from './SharedStore.js'; |
35 | 35 | ||
36 | const log = getLogger('MainStore'); | 36 | const 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 @@ | |||
21 | import { Certificate, Profile as ProfileBase } from '@sophie/shared'; | 21 | import { Certificate, Profile as ProfileBase } from '@sophie/shared'; |
22 | import { clone, getSnapshot, Instance } from 'mobx-state-tree'; | 22 | import { clone, getSnapshot, Instance } from 'mobx-state-tree'; |
23 | 23 | ||
24 | import type ProfileConfig from './config/ProfileConfig'; | 24 | import type ProfileConfig from './config/ProfileConfig.js'; |
25 | 25 | ||
26 | const Profile = ProfileBase.views((self) => ({ | 26 | const 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'; |
30 | import { type Instance, getSnapshot, cast, flow } from 'mobx-state-tree'; | 30 | import { type Instance, getSnapshot, cast, flow } from 'mobx-state-tree'; |
31 | 31 | ||
32 | import type { ServiceView } from '../infrastructure/electron/types'; | 32 | import type { ServiceView } from '../infrastructure/electron/types.js'; |
33 | import getLogger from '../utils/getLogger'; | 33 | import getLogger from '../utils/getLogger.js'; |
34 | 34 | ||
35 | import { getEnv } from './MainEnv'; | 35 | import { getEnv } from './MainEnv.js'; |
36 | import ServiceSettings from './ServiceSettings'; | 36 | import ServiceSettings from './ServiceSettings.js'; |
37 | import type ServiceConfig from './config/ServiceConfig'; | 37 | import type ServiceConfig from './config/ServiceConfig.js'; |
38 | 38 | ||
39 | const log = getLogger('Service'); | 39 | const 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 @@ | |||
21 | import { defineServiceSettingsModel } from '@sophie/shared'; | 21 | import { defineServiceSettingsModel } from '@sophie/shared'; |
22 | import { Instance } from 'mobx-state-tree'; | 22 | import { Instance } from 'mobx-state-tree'; |
23 | 23 | ||
24 | import Profile from './Profile'; | 24 | import Profile from './Profile.js'; |
25 | 25 | ||
26 | const ServiceSettings = defineServiceSettingsModel(Profile); | 26 | const 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 @@ | |||
21 | import { defineSharedStoreModel, WritingDirection } from '@sophie/shared'; | 21 | import { defineSharedStoreModel, WritingDirection } from '@sophie/shared'; |
22 | import { getSnapshot, Instance } from 'mobx-state-tree'; | 22 | import { getSnapshot, Instance } from 'mobx-state-tree'; |
23 | 23 | ||
24 | import getLogger from '../utils/getLogger'; | 24 | import getLogger from '../utils/getLogger.js'; |
25 | 25 | ||
26 | import GlobalSettings from './GlobalSettings'; | 26 | import GlobalSettings from './GlobalSettings.js'; |
27 | import Profile from './Profile'; | 27 | import Profile from './Profile.js'; |
28 | import Service from './Service'; | 28 | import Service from './Service.js'; |
29 | import type Config from './config/Config'; | 29 | import type Config from './config/Config.js'; |
30 | import loadConfig from './config/loadConfig'; | 30 | import loadConfig from './config/loadConfig.js'; |
31 | 31 | ||
32 | const log = getLogger('SharedStore'); | 32 | const 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 | ||
21 | import SharedStore from '../SharedStore'; | 21 | import SharedStore from '../SharedStore.js'; |
22 | import type Config from '../config/Config'; | 22 | import type Config from '../config/Config.js'; |
23 | import type ProfileConfig from '../config/ProfileConfig'; | 23 | import type ProfileConfig from '../config/ProfileConfig.js'; |
24 | import type ServiceConfig from '../config/ServiceConfig'; | 24 | import type ServiceConfig from '../config/ServiceConfig.js'; |
25 | 25 | ||
26 | const profileProps: ProfileConfig = { | 26 | const 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 | ||
21 | import type { GlobalSettingsSnapshotIn } from '../GlobalSettings'; | 21 | import type { GlobalSettingsSnapshotIn } from '../GlobalSettings.js'; |
22 | 22 | ||
23 | import type ProfileConfig from './ProfileConfig'; | 23 | import type ProfileConfig from './ProfileConfig.js'; |
24 | import type ServiceConfig from './ServiceConfig'; | 24 | import type ServiceConfig from './ServiceConfig.js'; |
25 | 25 | ||
26 | export default interface Config extends GlobalSettingsSnapshotIn { | 26 | export 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 { | |||
30 | import { nanoid } from 'nanoid'; | 30 | import { nanoid } from 'nanoid'; |
31 | import slug from 'slug'; | 31 | import slug from 'slug'; |
32 | 32 | ||
33 | import GlobalSettings from '../GlobalSettings'; | 33 | import GlobalSettings from '../GlobalSettings.js'; |
34 | import type Profile from '../Profile'; | 34 | import type Profile from '../Profile.js'; |
35 | import type Service from '../Service'; | 35 | import type Service from '../Service.js'; |
36 | import type { ServiceSettingsSnapshotIn } from '../ServiceSettings'; | 36 | import type { ServiceSettingsSnapshotIn } from '../ServiceSettings.js'; |
37 | 37 | ||
38 | import type Config from './Config'; | 38 | import type Config from './Config.js'; |
39 | import type ProfileConfig from './ProfileConfig'; | 39 | import type ProfileConfig from './ProfileConfig.js'; |
40 | import type ServiceConfig from './ServiceConfig'; | 40 | import type ServiceConfig from './ServiceConfig.js'; |
41 | 41 | ||
42 | function generateId(name?: string | undefined): string { | 42 | function generateId(name?: string | undefined): string { |
43 | const nameSlug = typeof name === 'undefined' ? '' : slug(name); | 43 | const nameSlug = typeof name === 'undefined' ? '' : slug(name); |