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 | |
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>
93 files changed, 309 insertions, 294 deletions
diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 3d944e4..e76ff6f 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs | |||
@@ -44,8 +44,9 @@ module.exports = { | |||
44 | }, | 44 | }, |
45 | }, | 45 | }, |
46 | rules: { | 46 | rules: { |
47 | // TODO Flip this to `ignorePackages` once we are on `nodenext` resolution. | 47 | // `import/exteions` is buggy with ts files: |
48 | 'import/extensions': ['error', 'never'], | 48 | // https://github.com/import-js/eslint-plugin-import/issues/2111 |
49 | 'import/extensions': 'off', | ||
49 | 'import/no-unresolved': 'error', | 50 | 'import/no-unresolved': 'error', |
50 | 'import/order': [ | 51 | 'import/order': [ |
51 | 'error', | 52 | 'error', |
@@ -107,13 +108,6 @@ module.exports = { | |||
107 | }, | 108 | }, |
108 | }, | 109 | }, |
109 | { | 110 | { |
110 | files: ['**/*.js'], | ||
111 | rules: { | ||
112 | // ESM requires extensions for imports. | ||
113 | 'import/extensions': ['error', 'ignorePackages'], | ||
114 | }, | ||
115 | }, | ||
116 | { | ||
117 | files: ['**/*.cjs'], | 111 | files: ['**/*.cjs'], |
118 | parserOptions: { | 112 | parserOptions: { |
119 | sourceType: 'script', | 113 | sourceType: 'script', |
diff --git a/config/tsconfig.base.json b/config/tsconfig.base.json index ff7594e..64522ce 100644 --- a/config/tsconfig.base.json +++ b/config/tsconfig.base.json | |||
@@ -1,8 +1,8 @@ | |||
1 | { | 1 | { |
2 | "compilerOptions": { | 2 | "compilerOptions": { |
3 | "module": "esnext", | 3 | "module": "Node16", |
4 | "target": "esnext", | 4 | "target": "es2022", |
5 | "moduleResolution": "node", | 5 | "moduleResolution": "Node16", |
6 | "esModuleInterop": true, | 6 | "esModuleInterop": true, |
7 | "allowSyntheticDefaultImports": true, | 7 | "allowSyntheticDefaultImports": true, |
8 | "strict": true, | 8 | "strict": true, |
@@ -12,6 +12,6 @@ | |||
12 | "isolatedModules": true, | 12 | "isolatedModules": true, |
13 | "skipLibCheck": true, | 13 | "skipLibCheck": true, |
14 | "checkJs": true, | 14 | "checkJs": true, |
15 | "lib": ["esnext"] | 15 | "lib": ["es2021"] |
16 | } | 16 | } |
17 | } | 17 | } |
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); |
diff --git a/packages/preload/src/contextBridge/__tests__/createSophieRenderer.test.ts b/packages/preload/src/contextBridge/__tests__/createSophieRenderer.test.ts index 21620ed..b6af137 100644 --- a/packages/preload/src/contextBridge/__tests__/createSophieRenderer.test.ts +++ b/packages/preload/src/contextBridge/__tests__/createSophieRenderer.test.ts | |||
@@ -41,7 +41,7 @@ jest.unstable_mockModule('electron', () => ({ | |||
41 | const { ipcRenderer } = await import('electron'); | 41 | const { ipcRenderer } = await import('electron'); |
42 | 42 | ||
43 | const { default: createSophieRenderer } = await import( | 43 | const { default: createSophieRenderer } = await import( |
44 | '../createSophieRenderer' | 44 | '../createSophieRenderer.js' |
45 | ); | 45 | ); |
46 | 46 | ||
47 | const event: Electron.IpcRendererEvent = | 47 | const event: Electron.IpcRendererEvent = |
diff --git a/packages/preload/src/contextBridge/createSophieRenderer.ts b/packages/preload/src/contextBridge/createSophieRenderer.ts index 3de9d9e..a05efd0 100644 --- a/packages/preload/src/contextBridge/createSophieRenderer.ts +++ b/packages/preload/src/contextBridge/createSophieRenderer.ts | |||
@@ -20,8 +20,12 @@ | |||
20 | 20 | ||
21 | import { SophieRenderer } from '@sophie/shared'; | 21 | import { SophieRenderer } from '@sophie/shared'; |
22 | 22 | ||
23 | import SharedStoreConnector, { dispatchAction } from './SharedStoreConnector'; | 23 | import SharedStoreConnector, { |
24 | import TranslationsConnector, { getTranslation } from './TranslationsConnector'; | 24 | dispatchAction, |
25 | } from './SharedStoreConnector.js'; | ||
26 | import TranslationsConnector, { | ||
27 | getTranslation, | ||
28 | } from './TranslationsConnector.js'; | ||
25 | 29 | ||
26 | export default function createSophieRenderer(devMode: boolean): SophieRenderer { | 30 | export default function createSophieRenderer(devMode: boolean): SophieRenderer { |
27 | const sharedStoreConnector = new SharedStoreConnector(devMode); | 31 | const sharedStoreConnector = new SharedStoreConnector(devMode); |
diff --git a/packages/preload/src/index.ts b/packages/preload/src/index.ts index f13220c..3ad6fee 100644 --- a/packages/preload/src/index.ts +++ b/packages/preload/src/index.ts | |||
@@ -20,7 +20,7 @@ | |||
20 | 20 | ||
21 | import { contextBridge } from 'electron'; | 21 | import { contextBridge } from 'electron'; |
22 | 22 | ||
23 | import createSophieRenderer from './contextBridge/createSophieRenderer'; | 23 | import createSophieRenderer from './contextBridge/createSophieRenderer.js'; |
24 | 24 | ||
25 | const isDevelopment = import.meta.env.MODE === 'development'; | 25 | const isDevelopment = import.meta.env.MODE === 'development'; |
26 | 26 | ||
diff --git a/packages/preload/tsconfig.json b/packages/preload/tsconfig.json index 18c72b4..80ff957 100644 --- a/packages/preload/tsconfig.json +++ b/packages/preload/tsconfig.json | |||
@@ -2,7 +2,7 @@ | |||
2 | "extends": "../../config/tsconfig.base.json", | 2 | "extends": "../../config/tsconfig.base.json", |
3 | "compilerOptions": { | 3 | "compilerOptions": { |
4 | "noEmit": true, | 4 | "noEmit": true, |
5 | "lib": ["dom", "dom.iterable", "esnext"], | 5 | "lib": ["dom", "dom.iterable", "es2021"], |
6 | "types": ["@types/jest"] | 6 | "types": ["@types/jest"] |
7 | }, | 7 | }, |
8 | "references": [ | 8 | "references": [ |
diff --git a/packages/renderer/src/components/App.tsx b/packages/renderer/src/components/App.tsx index 86e2a55..193afe6 100644 --- a/packages/renderer/src/components/App.tsx +++ b/packages/renderer/src/components/App.tsx | |||
@@ -23,11 +23,11 @@ import { styled } from '@mui/material/styles'; | |||
23 | import { observer } from 'mobx-react-lite'; | 23 | import { observer } from 'mobx-react-lite'; |
24 | import React, { useCallback } from 'react'; | 24 | import React, { useCallback } from 'react'; |
25 | 25 | ||
26 | import type RendererStore from '../stores/RendererStore'; | 26 | import type RendererStore from '../stores/RendererStore.js'; |
27 | 27 | ||
28 | import ServicePanel from './ServicePanel'; | 28 | import ServicePanel from './ServicePanel.js'; |
29 | import WindowTitle from './WindowTitle'; | 29 | import WindowTitle from './WindowTitle.js'; |
30 | import Sidebar from './sidebar/Sidebar'; | 30 | import Sidebar from './sidebar/Sidebar.js'; |
31 | 31 | ||
32 | const AppRoot = styled(Box)({ | 32 | const AppRoot = styled(Box)({ |
33 | display: 'flex', | 33 | display: 'flex', |
diff --git a/packages/renderer/src/components/BrowserViewPlaceholder.tsx b/packages/renderer/src/components/BrowserViewPlaceholder.tsx index 2bfc9b0..b309c4d 100644 --- a/packages/renderer/src/components/BrowserViewPlaceholder.tsx +++ b/packages/renderer/src/components/BrowserViewPlaceholder.tsx | |||
@@ -22,7 +22,7 @@ import Box from '@mui/material/Box'; | |||
22 | import throttle from 'lodash-es/throttle'; | 22 | import throttle from 'lodash-es/throttle'; |
23 | import React, { ReactNode, useCallback, useRef } from 'react'; | 23 | import React, { ReactNode, useCallback, useRef } from 'react'; |
24 | 24 | ||
25 | import Service from '../stores/Service'; | 25 | import Service from '../stores/Service.js'; |
26 | 26 | ||
27 | function BrowserViewPlaceholder({ | 27 | function BrowserViewPlaceholder({ |
28 | service, | 28 | service, |
diff --git a/packages/renderer/src/components/ServicePanel.tsx b/packages/renderer/src/components/ServicePanel.tsx index 2c79d99..507bc15 100644 --- a/packages/renderer/src/components/ServicePanel.tsx +++ b/packages/renderer/src/components/ServicePanel.tsx | |||
@@ -23,14 +23,14 @@ import { styled } from '@mui/material/styles'; | |||
23 | import { observer } from 'mobx-react-lite'; | 23 | import { observer } from 'mobx-react-lite'; |
24 | import React from 'react'; | 24 | import React from 'react'; |
25 | 25 | ||
26 | import type RendererStore from '../stores/RendererStore'; | 26 | import type RendererStore from '../stores/RendererStore.js'; |
27 | import Service from '../stores/Service'; | 27 | import Service from '../stores/Service.js'; |
28 | 28 | ||
29 | import BrowserViewPlaceholder from './BrowserViewPlaceholder'; | 29 | import BrowserViewPlaceholder from './BrowserViewPlaceholder.js'; |
30 | import InsecureConnectionBanner from './banner/InsecureConnectionBanner'; | 30 | import InsecureConnectionBanner from './banner/InsecureConnectionBanner.js'; |
31 | import NewWindowBanner from './banner/NewWindowBanner'; | 31 | import NewWindowBanner from './banner/NewWindowBanner.js'; |
32 | import ErrorPage from './errorPage/ErrorPage'; | 32 | import ErrorPage from './errorPage/ErrorPage.js'; |
33 | import LocationBar from './locationBar/LocationBar'; | 33 | import LocationBar from './locationBar/LocationBar.js'; |
34 | 34 | ||
35 | const ServicePanelRoot = styled(Box, { | 35 | const ServicePanelRoot = styled(Box, { |
36 | shouldForwardProp: (prop) => prop !== 'hidden', | 36 | shouldForwardProp: (prop) => prop !== 'hidden', |
diff --git a/packages/renderer/src/components/ThemeProvider.tsx b/packages/renderer/src/components/ThemeProvider.tsx index aa14039..50cc1c9 100644 --- a/packages/renderer/src/components/ThemeProvider.tsx +++ b/packages/renderer/src/components/ThemeProvider.tsx | |||
@@ -25,7 +25,7 @@ import { | |||
25 | import { observer } from 'mobx-react-lite'; | 25 | import { observer } from 'mobx-react-lite'; |
26 | import React, { type ReactNode } from 'react'; | 26 | import React, { type ReactNode } from 'react'; |
27 | 27 | ||
28 | import type RendererStore from '../stores/RendererStore'; | 28 | import type RendererStore from '../stores/RendererStore.js'; |
29 | 29 | ||
30 | function ThemeProvider({ | 30 | function ThemeProvider({ |
31 | children, | 31 | children, |
diff --git a/packages/renderer/src/components/WindowTitle.tsx b/packages/renderer/src/components/WindowTitle.tsx index 95e0fe6..fca8b4f 100644 --- a/packages/renderer/src/components/WindowTitle.tsx +++ b/packages/renderer/src/components/WindowTitle.tsx | |||
@@ -22,7 +22,7 @@ import { observer } from 'mobx-react-lite'; | |||
22 | import { useEffect } from 'react'; | 22 | import { useEffect } from 'react'; |
23 | import { useTranslation } from 'react-i18next'; | 23 | import { useTranslation } from 'react-i18next'; |
24 | 24 | ||
25 | import type Service from '../stores/Service'; | 25 | import type Service from '../stores/Service.js'; |
26 | 26 | ||
27 | function WindowTitle({ | 27 | function WindowTitle({ |
28 | selectedService, | 28 | selectedService, |
diff --git a/packages/renderer/src/components/banner/InsecureConnectionBanner.tsx b/packages/renderer/src/components/banner/InsecureConnectionBanner.tsx index 0b70db6..6165153 100644 --- a/packages/renderer/src/components/banner/InsecureConnectionBanner.tsx +++ b/packages/renderer/src/components/banner/InsecureConnectionBanner.tsx | |||
@@ -27,9 +27,9 @@ import { observer } from 'mobx-react-lite'; | |||
27 | import React from 'react'; | 27 | import React from 'react'; |
28 | import { useTranslation } from 'react-i18next'; | 28 | import { useTranslation } from 'react-i18next'; |
29 | 29 | ||
30 | import type Service from '../../stores/Service'; | 30 | import type Service from '../../stores/Service.js'; |
31 | 31 | ||
32 | import NotificationBanner from './NotificationBanner'; | 32 | import NotificationBanner from './NotificationBanner.js'; |
33 | 33 | ||
34 | function InsecureConnectionBanner({ | 34 | function InsecureConnectionBanner({ |
35 | service, | 35 | service, |
diff --git a/packages/renderer/src/components/banner/NewWindowBanner.tsx b/packages/renderer/src/components/banner/NewWindowBanner.tsx index ad9d07d..b9b0e4a 100644 --- a/packages/renderer/src/components/banner/NewWindowBanner.tsx +++ b/packages/renderer/src/components/banner/NewWindowBanner.tsx | |||
@@ -29,9 +29,9 @@ import { observer } from 'mobx-react-lite'; | |||
29 | import React from 'react'; | 29 | import React from 'react'; |
30 | import { Trans, useTranslation } from 'react-i18next'; | 30 | import { Trans, useTranslation } from 'react-i18next'; |
31 | 31 | ||
32 | import type Service from '../../stores/Service'; | 32 | import type Service from '../../stores/Service.js'; |
33 | 33 | ||
34 | import NotificationBanner from './NotificationBanner'; | 34 | import NotificationBanner from './NotificationBanner.js'; |
35 | 35 | ||
36 | function NewWindowBanner({ | 36 | function NewWindowBanner({ |
37 | service, | 37 | service, |
diff --git a/packages/renderer/src/components/banner/NotificationBanner.tsx b/packages/renderer/src/components/banner/NotificationBanner.tsx index 818f498..70fe693 100644 --- a/packages/renderer/src/components/banner/NotificationBanner.tsx +++ b/packages/renderer/src/components/banner/NotificationBanner.tsx | |||
@@ -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 { Typography } from '@mui/material'; | ||
22 | import Alert, { AlertColor } from '@mui/material/Alert'; | 21 | import Alert, { AlertColor } from '@mui/material/Alert'; |
23 | import Box from '@mui/material/Box'; | 22 | import Box from '@mui/material/Box'; |
23 | import Typography from '@mui/material/Typography'; | ||
24 | import { styled } from '@mui/material/styles'; | 24 | import { styled } from '@mui/material/styles'; |
25 | import React, { ReactNode } from 'react'; | 25 | import React, { ReactNode } from 'react'; |
26 | import { useTranslation } from 'react-i18next'; | 26 | import { useTranslation } from 'react-i18next'; |
diff --git a/packages/renderer/src/components/errorPage/CertificateDetails.tsx b/packages/renderer/src/components/errorPage/CertificateDetails.tsx index 51e7920..04d483e 100644 --- a/packages/renderer/src/components/errorPage/CertificateDetails.tsx +++ b/packages/renderer/src/components/errorPage/CertificateDetails.tsx | |||
@@ -32,10 +32,10 @@ import { observer } from 'mobx-react-lite'; | |||
32 | import React, { useState } from 'react'; | 32 | import React, { useState } from 'react'; |
33 | import { useTranslation } from 'react-i18next'; | 33 | import { useTranslation } from 'react-i18next'; |
34 | 34 | ||
35 | import type Service from '../../stores/Service'; | 35 | import type Service from '../../stores/Service.js'; |
36 | 36 | ||
37 | import SingleCertificateDetails from './SingleCertificateDetails'; | 37 | import SingleCertificateDetails from './SingleCertificateDetails.js'; |
38 | import TrustCertificateDialog from './TrustCertificateDialog'; | 38 | import TrustCertificateDialog from './TrustCertificateDialog.js'; |
39 | 39 | ||
40 | const SUMMARY_ID = 'Sophie-CertificateDetails-header'; | 40 | const SUMMARY_ID = 'Sophie-CertificateDetails-header'; |
41 | const DETAILS_ID = 'Sophie-CertificateDetails-content'; | 41 | const DETAILS_ID = 'Sophie-CertificateDetails-content'; |
diff --git a/packages/renderer/src/components/errorPage/ErrorPage.tsx b/packages/renderer/src/components/errorPage/ErrorPage.tsx index 10f54cd..dc01ddf 100644 --- a/packages/renderer/src/components/errorPage/ErrorPage.tsx +++ b/packages/renderer/src/components/errorPage/ErrorPage.tsx | |||
@@ -29,9 +29,9 @@ import { observer } from 'mobx-react-lite'; | |||
29 | import React from 'react'; | 29 | import React from 'react'; |
30 | import { useTranslation } from 'react-i18next'; | 30 | import { useTranslation } from 'react-i18next'; |
31 | 31 | ||
32 | import type Service from '../../stores/Service'; | 32 | import type Service from '../../stores/Service.js'; |
33 | 33 | ||
34 | import CertificateDetails from './CertificateDetails'; | 34 | import CertificateDetails from './CertificateDetails.js'; |
35 | 35 | ||
36 | interface ErrorDetails { | 36 | interface ErrorDetails { |
37 | icon: JSX.Element; | 37 | icon: JSX.Element; |
diff --git a/packages/renderer/src/components/locationBar/ExtraButtons.tsx b/packages/renderer/src/components/locationBar/ExtraButtons.tsx index 4d4c3c4..bea115d 100644 --- a/packages/renderer/src/components/locationBar/ExtraButtons.tsx +++ b/packages/renderer/src/components/locationBar/ExtraButtons.tsx | |||
@@ -25,7 +25,7 @@ import { observer } from 'mobx-react-lite'; | |||
25 | import React from 'react'; | 25 | import React from 'react'; |
26 | import { useTranslation } from 'react-i18next'; | 26 | import { useTranslation } from 'react-i18next'; |
27 | 27 | ||
28 | import type Service from '../../stores/Service'; | 28 | import type Service from '../../stores/Service.js'; |
29 | 29 | ||
30 | function ExtraButtons({ service }: { service: Service }): JSX.Element { | 30 | function ExtraButtons({ service }: { service: Service }): JSX.Element { |
31 | const { t } = useTranslation(undefined, { | 31 | const { t } = useTranslation(undefined, { |
diff --git a/packages/renderer/src/components/locationBar/GoButton.tsx b/packages/renderer/src/components/locationBar/GoButton.tsx index 471f25e..571124a 100644 --- a/packages/renderer/src/components/locationBar/GoButton.tsx +++ b/packages/renderer/src/components/locationBar/GoButton.tsx | |||
@@ -22,7 +22,7 @@ import IconGo from '@mui/icons-material/Send'; | |||
22 | import IconButton from '@mui/material/IconButton'; | 22 | import IconButton from '@mui/material/IconButton'; |
23 | import React, { MouseEventHandler } from 'react'; | 23 | import React, { MouseEventHandler } from 'react'; |
24 | 24 | ||
25 | import LocationInputAdornment from './LocationInputAdornment'; | 25 | import LocationInputAdornment from './LocationInputAdornment.js'; |
26 | 26 | ||
27 | export default function GoButton({ | 27 | export default function GoButton({ |
28 | onClick, | 28 | onClick, |
diff --git a/packages/renderer/src/components/locationBar/LocationBar.tsx b/packages/renderer/src/components/locationBar/LocationBar.tsx index 11981e9..fd7dcbb 100644 --- a/packages/renderer/src/components/locationBar/LocationBar.tsx +++ b/packages/renderer/src/components/locationBar/LocationBar.tsx | |||
@@ -22,12 +22,12 @@ import { styled } from '@mui/material/styles'; | |||
22 | import { observer } from 'mobx-react-lite'; | 22 | import { observer } from 'mobx-react-lite'; |
23 | import React from 'react'; | 23 | import React from 'react'; |
24 | 24 | ||
25 | import type RendererStore from '../../stores/RendererStore'; | 25 | import type RendererStore from '../../stores/RendererStore.js'; |
26 | import type Service from '../../stores/Service'; | 26 | import type Service from '../../stores/Service.js'; |
27 | 27 | ||
28 | import ExtraButtons from './ExtraButtons'; | 28 | import ExtraButtons from './ExtraButtons.js'; |
29 | import LocationTextField from './LocationTextField'; | 29 | import LocationTextField from './LocationTextField.js'; |
30 | import NavigationButtons from './NavigationButtons'; | 30 | import NavigationButtons from './NavigationButtons.js'; |
31 | 31 | ||
32 | export function getLocaltionBarID(service: Service): string { | 32 | export function getLocaltionBarID(service: Service): string { |
33 | return `Sophie-${service.id}-LocationBar`; | 33 | return `Sophie-${service.id}-LocationBar`; |
diff --git a/packages/renderer/src/components/locationBar/LocationTextField.tsx b/packages/renderer/src/components/locationBar/LocationTextField.tsx index 1d6b561..9b028b3 100644 --- a/packages/renderer/src/components/locationBar/LocationTextField.tsx +++ b/packages/renderer/src/components/locationBar/LocationTextField.tsx | |||
@@ -24,12 +24,12 @@ import { autorun } from 'mobx'; | |||
24 | import { observer } from 'mobx-react-lite'; | 24 | import { observer } from 'mobx-react-lite'; |
25 | import React, { useCallback, useEffect, useState } from 'react'; | 25 | import React, { useCallback, useEffect, useState } from 'react'; |
26 | 26 | ||
27 | import Service from '../../stores/Service'; | 27 | import Service from '../../stores/Service.js'; |
28 | 28 | ||
29 | import GoButton from './GoButton'; | 29 | import GoButton from './GoButton.js'; |
30 | import LocationOverlayInput from './LocationOverlayInput'; | 30 | import LocationOverlayInput from './LocationOverlayInput.js'; |
31 | import SecurityLabel from './SecurityLabel'; | 31 | import SecurityLabel from './SecurityLabel.js'; |
32 | import UrlOverlay from './UrlOverlay'; | 32 | import UrlOverlay from './UrlOverlay.js'; |
33 | 33 | ||
34 | const LocationTextFieldRoot = styled(FilledInput, { | 34 | const LocationTextFieldRoot = styled(FilledInput, { |
35 | name: 'LocationTextField', | 35 | name: 'LocationTextField', |
diff --git a/packages/renderer/src/components/locationBar/NavigationButtons.tsx b/packages/renderer/src/components/locationBar/NavigationButtons.tsx index 96e40e7..ab455eb 100644 --- a/packages/renderer/src/components/locationBar/NavigationButtons.tsx +++ b/packages/renderer/src/components/locationBar/NavigationButtons.tsx | |||
@@ -23,14 +23,14 @@ import IconArrowForward from '@mui/icons-material/ArrowForward'; | |||
23 | import IconStop from '@mui/icons-material/Close'; | 23 | import IconStop from '@mui/icons-material/Close'; |
24 | import IconHome from '@mui/icons-material/HomeOutlined'; | 24 | import IconHome from '@mui/icons-material/HomeOutlined'; |
25 | import IconRefresh from '@mui/icons-material/Refresh'; | 25 | import IconRefresh from '@mui/icons-material/Refresh'; |
26 | import { useTheme } from '@mui/material'; | ||
27 | import Box from '@mui/material/Box'; | 26 | import Box from '@mui/material/Box'; |
28 | import IconButton from '@mui/material/IconButton'; | 27 | import IconButton from '@mui/material/IconButton'; |
28 | import { useTheme } from '@mui/material/styles'; | ||
29 | import { observer } from 'mobx-react-lite'; | 29 | import { observer } from 'mobx-react-lite'; |
30 | import React from 'react'; | 30 | import React from 'react'; |
31 | import { useTranslation } from 'react-i18next'; | 31 | import { useTranslation } from 'react-i18next'; |
32 | 32 | ||
33 | import type Service from '../../stores/Service'; | 33 | import type Service from '../../stores/Service.js'; |
34 | 34 | ||
35 | function NavigationButtons({ service }: { service: Service }): JSX.Element { | 35 | function NavigationButtons({ service }: { service: Service }): JSX.Element { |
36 | const { t } = useTranslation(undefined, { | 36 | const { t } = useTranslation(undefined, { |
diff --git a/packages/renderer/src/components/locationBar/SecurityLabel.tsx b/packages/renderer/src/components/locationBar/SecurityLabel.tsx index ac51cff..7521fa6 100644 --- a/packages/renderer/src/components/locationBar/SecurityLabel.tsx +++ b/packages/renderer/src/components/locationBar/SecurityLabel.tsx | |||
@@ -27,8 +27,8 @@ import { SecurityLabelKind } from '@sophie/shared'; | |||
27 | import React from 'react'; | 27 | import React from 'react'; |
28 | import { useTranslation } from 'react-i18next'; | 28 | import { useTranslation } from 'react-i18next'; |
29 | 29 | ||
30 | import LocationInputAdornment from './LocationInputAdornment'; | 30 | import LocationInputAdornment from './LocationInputAdornment.js'; |
31 | import getAlertColor from './getAlertColor'; | 31 | import getAlertColor from './getAlertColor.js'; |
32 | 32 | ||
33 | const SecurityLabelRoot = styled(LocationInputAdornment, { | 33 | const SecurityLabelRoot = styled(LocationInputAdornment, { |
34 | name: 'SecurityLabel', | 34 | name: 'SecurityLabel', |
diff --git a/packages/renderer/src/components/locationBar/UrlOverlay.tsx b/packages/renderer/src/components/locationBar/UrlOverlay.tsx index a71fa4e..eaa86d2 100644 --- a/packages/renderer/src/components/locationBar/UrlOverlay.tsx +++ b/packages/renderer/src/components/locationBar/UrlOverlay.tsx | |||
@@ -21,7 +21,7 @@ | |||
21 | import { styled } from '@mui/material/styles'; | 21 | import { styled } from '@mui/material/styles'; |
22 | import React from 'react'; | 22 | import React from 'react'; |
23 | 23 | ||
24 | import getAlertColor from './getAlertColor'; | 24 | import getAlertColor from './getAlertColor.js'; |
25 | 25 | ||
26 | export type SplitResult = | 26 | export type SplitResult = |
27 | | { | 27 | | { |
diff --git a/packages/renderer/src/components/sidebar/ServiceIcon.tsx b/packages/renderer/src/components/sidebar/ServiceIcon.tsx index 7a6d58a..f3f025a 100644 --- a/packages/renderer/src/components/sidebar/ServiceIcon.tsx +++ b/packages/renderer/src/components/sidebar/ServiceIcon.tsx | |||
@@ -24,7 +24,7 @@ import { styled } from '@mui/material/styles'; | |||
24 | import { observer } from 'mobx-react-lite'; | 24 | import { observer } from 'mobx-react-lite'; |
25 | import React, { useEffect, useState } from 'react'; | 25 | import React, { useEffect, useState } from 'react'; |
26 | 26 | ||
27 | import type Service from '../../stores/Service'; | 27 | import type Service from '../../stores/Service.js'; |
28 | 28 | ||
29 | const ServiceIconRoot = styled('div', { | 29 | const ServiceIconRoot = styled('div', { |
30 | name: 'ServiceIcon', | 30 | name: 'ServiceIcon', |
diff --git a/packages/renderer/src/components/sidebar/ServiceSwitcher.tsx b/packages/renderer/src/components/sidebar/ServiceSwitcher.tsx index 7aa9124..56487df 100644 --- a/packages/renderer/src/components/sidebar/ServiceSwitcher.tsx +++ b/packages/renderer/src/components/sidebar/ServiceSwitcher.tsx | |||
@@ -26,11 +26,11 @@ import { observer } from 'mobx-react-lite'; | |||
26 | import React from 'react'; | 26 | import React from 'react'; |
27 | import { useTranslation } from 'react-i18next'; | 27 | import { useTranslation } from 'react-i18next'; |
28 | 28 | ||
29 | import type RendererStore from '../../stores/RendererStore'; | 29 | import type RendererStore from '../../stores/RendererStore.js'; |
30 | import type Service from '../../stores/Service'; | 30 | import type Service from '../../stores/Service.js'; |
31 | import { getServicePanelID } from '../ServicePanel'; | 31 | import { getServicePanelID } from '../ServicePanel.js'; |
32 | 32 | ||
33 | import ServiceIcon from './ServiceIcon'; | 33 | import ServiceIcon from './ServiceIcon.js'; |
34 | 34 | ||
35 | const ServiceSwitcherRoot = styled(Tabs, { | 35 | const ServiceSwitcherRoot = styled(Tabs, { |
36 | name: 'ServiceSwitcher', | 36 | name: 'ServiceSwitcher', |
diff --git a/packages/renderer/src/components/sidebar/Sidebar.tsx b/packages/renderer/src/components/sidebar/Sidebar.tsx index 6c802ac..7308900 100644 --- a/packages/renderer/src/components/sidebar/Sidebar.tsx +++ b/packages/renderer/src/components/sidebar/Sidebar.tsx | |||
@@ -22,11 +22,11 @@ import Box from '@mui/material/Box'; | |||
22 | import { styled } from '@mui/material/styles'; | 22 | import { styled } from '@mui/material/styles'; |
23 | import React from 'react'; | 23 | import React from 'react'; |
24 | 24 | ||
25 | import RendererStore from '../../stores/RendererStore'; | 25 | import RendererStore from '../../stores/RendererStore.js'; |
26 | 26 | ||
27 | import ServiceSwitcher from './ServiceSwitcher'; | 27 | import ServiceSwitcher from './ServiceSwitcher.js'; |
28 | import ToggleDarkModeButton from './ToggleDarkModeButton'; | 28 | import ToggleDarkModeButton from './ToggleDarkModeButton.js'; |
29 | import ToggleLocationBarButton from './ToggleLocationBarButton'; | 29 | import ToggleLocationBarButton from './ToggleLocationBarButton.js'; |
30 | 30 | ||
31 | const SidebarRoot = styled(Box)(({ theme }) => ({ | 31 | const SidebarRoot = styled(Box)(({ theme }) => ({ |
32 | flex: 0, | 32 | flex: 0, |
diff --git a/packages/renderer/src/components/sidebar/ToggleDarkModeButton.tsx b/packages/renderer/src/components/sidebar/ToggleDarkModeButton.tsx index a922389..5e15d4b 100644 --- a/packages/renderer/src/components/sidebar/ToggleDarkModeButton.tsx +++ b/packages/renderer/src/components/sidebar/ToggleDarkModeButton.tsx | |||
@@ -25,7 +25,7 @@ import { observer } from 'mobx-react-lite'; | |||
25 | import React from 'react'; | 25 | import React from 'react'; |
26 | import { useTranslation } from 'react-i18next'; | 26 | import { useTranslation } from 'react-i18next'; |
27 | 27 | ||
28 | import type RendererStore from '../../stores/RendererStore'; | 28 | import type RendererStore from '../../stores/RendererStore.js'; |
29 | 29 | ||
30 | function ToggleDarkModeButton({ | 30 | function ToggleDarkModeButton({ |
31 | store: { shared }, | 31 | store: { shared }, |
diff --git a/packages/renderer/src/components/sidebar/ToggleLocationBarButton.tsx b/packages/renderer/src/components/sidebar/ToggleLocationBarButton.tsx index b6644a3..64b4ca9 100644 --- a/packages/renderer/src/components/sidebar/ToggleLocationBarButton.tsx +++ b/packages/renderer/src/components/sidebar/ToggleLocationBarButton.tsx | |||
@@ -20,15 +20,15 @@ | |||
20 | 20 | ||
21 | import IconChevronLeft from '@mui/icons-material/KeyboardDoubleArrowLeft'; | 21 | import IconChevronLeft from '@mui/icons-material/KeyboardDoubleArrowLeft'; |
22 | import IconChevronRight from '@mui/icons-material/KeyboardDoubleArrowRight'; | 22 | import IconChevronRight from '@mui/icons-material/KeyboardDoubleArrowRight'; |
23 | import { useTheme } from '@mui/material'; | ||
24 | import CircularProgress from '@mui/material/CircularProgress'; | 23 | import CircularProgress from '@mui/material/CircularProgress'; |
25 | import IconButton from '@mui/material/IconButton'; | 24 | import IconButton from '@mui/material/IconButton'; |
25 | import { useTheme } from '@mui/material/styles'; | ||
26 | import { observer } from 'mobx-react-lite'; | 26 | import { observer } from 'mobx-react-lite'; |
27 | import React from 'react'; | 27 | import React from 'react'; |
28 | import { useTranslation } from 'react-i18next'; | 28 | import { useTranslation } from 'react-i18next'; |
29 | 29 | ||
30 | import type RendererStore from '../../stores/RendererStore'; | 30 | import type RendererStore from '../../stores/RendererStore.js'; |
31 | import { getLocaltionBarID } from '../locationBar/LocationBar'; | 31 | import { getLocaltionBarID } from '../locationBar/LocationBar.js'; |
32 | 32 | ||
33 | function ToggleLocationBarIcon({ | 33 | function ToggleLocationBarIcon({ |
34 | loading, | 34 | loading, |
diff --git a/packages/renderer/src/i18n/RtlCacheProvider.tsx b/packages/renderer/src/i18n/RtlCacheProvider.tsx index 1303314..8b6fcf2 100644 --- a/packages/renderer/src/i18n/RtlCacheProvider.tsx +++ b/packages/renderer/src/i18n/RtlCacheProvider.tsx | |||
@@ -23,7 +23,7 @@ import { CacheProvider } from '@emotion/react'; | |||
23 | import { observer } from 'mobx-react-lite'; | 23 | import { observer } from 'mobx-react-lite'; |
24 | import React, { type ReactNode } from 'react'; | 24 | import React, { type ReactNode } from 'react'; |
25 | 25 | ||
26 | import type RendererStore from '../stores/RendererStore'; | 26 | import type RendererStore from '../stores/RendererStore.js'; |
27 | 27 | ||
28 | function RtlCacheProvider({ | 28 | function RtlCacheProvider({ |
29 | children, | 29 | children, |
diff --git a/packages/renderer/src/i18n/loadRendererLoalization.ts b/packages/renderer/src/i18n/loadRendererLoalization.ts index 4d7b84a..d3ad252 100644 --- a/packages/renderer/src/i18n/loadRendererLoalization.ts +++ b/packages/renderer/src/i18n/loadRendererLoalization.ts | |||
@@ -24,10 +24,10 @@ import { reaction } from 'mobx'; | |||
24 | import { addDisposer } from 'mobx-state-tree'; | 24 | import { addDisposer } from 'mobx-state-tree'; |
25 | import { initReactI18next } from 'react-i18next'; | 25 | import { initReactI18next } from 'react-i18next'; |
26 | 26 | ||
27 | import RendererStore from '../stores/RendererStore'; | 27 | import RendererStore from '../stores/RendererStore.js'; |
28 | import { getLogger } from '../utils/log'; | 28 | import { getLogger } from '../utils/log.js'; |
29 | 29 | ||
30 | import RendererIpcI18nBackend from './RendererIpcI18nBackend'; | 30 | import RendererIpcI18nBackend from './RendererIpcI18nBackend.js'; |
31 | 31 | ||
32 | const log = getLogger('loadRendererLocalization'); | 32 | const log = getLogger('loadRendererLocalization'); |
33 | 33 | ||
diff --git a/packages/renderer/src/index.tsx b/packages/renderer/src/index.tsx index 980e4dd..32fcee6 100644 --- a/packages/renderer/src/index.tsx +++ b/packages/renderer/src/index.tsx | |||
@@ -25,14 +25,14 @@ import React, { Suspense, lazy } from 'react'; | |||
25 | import { createRoot } from 'react-dom/client'; | 25 | import { createRoot } from 'react-dom/client'; |
26 | 26 | ||
27 | import './style.css'; | 27 | import './style.css'; |
28 | import Loading from './components/Loading'; | 28 | import Loading from './components/Loading.js'; |
29 | import ThemeProvider from './components/ThemeProvider'; | 29 | import ThemeProvider from './components/ThemeProvider.js'; |
30 | import { exposeToReduxDevtools, hotReload } from './devTools'; | 30 | import { exposeToReduxDevtools, hotReload } from './devTools.js'; |
31 | import RtlCacheProvider from './i18n/RtlCacheProvider'; | 31 | import RtlCacheProvider from './i18n/RtlCacheProvider.js'; |
32 | import createRtlCache from './i18n/createRtlCache'; | 32 | import createRtlCache from './i18n/createRtlCache.js'; |
33 | import loadRendererLocalization from './i18n/loadRendererLoalization'; | 33 | import loadRendererLocalization from './i18n/loadRendererLoalization.js'; |
34 | import { createAndConnectRendererStore } from './stores/RendererStore'; | 34 | import { createAndConnectRendererStore } from './stores/RendererStore.js'; |
35 | import { getLogger } from './utils/log'; | 35 | import { getLogger } from './utils/log.js'; |
36 | 36 | ||
37 | const isDevelopment = import.meta.env.MODE === 'development'; | 37 | const isDevelopment = import.meta.env.MODE === 'development'; |
38 | 38 | ||
@@ -65,7 +65,7 @@ addDisposer(store, disposeSetHtmlLang); | |||
65 | 65 | ||
66 | const rtlCache = createRtlCache(); | 66 | const rtlCache = createRtlCache(); |
67 | 67 | ||
68 | const App = lazy(() => import('./components/App')); | 68 | const App = lazy(() => import('./components/App.js')); |
69 | 69 | ||
70 | function Root(): JSX.Element { | 70 | function Root(): JSX.Element { |
71 | return ( | 71 | return ( |
diff --git a/packages/renderer/src/stores/GlobalSettings.ts b/packages/renderer/src/stores/GlobalSettings.ts index 52971d4..11c2ebd 100644 --- a/packages/renderer/src/stores/GlobalSettings.ts +++ b/packages/renderer/src/stores/GlobalSettings.ts | |||
@@ -21,8 +21,8 @@ | |||
21 | import { defineGlobalSettingsModel, ThemeSource } from '@sophie/shared'; | 21 | import { defineGlobalSettingsModel, ThemeSource } from '@sophie/shared'; |
22 | import { Instance } from 'mobx-state-tree'; | 22 | import { Instance } from 'mobx-state-tree'; |
23 | 23 | ||
24 | import { getEnv } from './RendererEnv'; | 24 | import { getEnv } from './RendererEnv.js'; |
25 | import Service from './Service'; | 25 | import Service from './Service.js'; |
26 | 26 | ||
27 | const GlobalSettings = defineGlobalSettingsModel(Service).actions((self) => ({ | 27 | const GlobalSettings = defineGlobalSettingsModel(Service).actions((self) => ({ |
28 | setSelectedServiceId(serviceId: string): void { | 28 | setSelectedServiceId(serviceId: string): void { |
diff --git a/packages/renderer/src/stores/RendererStore.ts b/packages/renderer/src/stores/RendererStore.ts index a3983ca..c4110bd 100644 --- a/packages/renderer/src/stores/RendererStore.ts +++ b/packages/renderer/src/stores/RendererStore.ts | |||
@@ -21,12 +21,12 @@ | |||
21 | import type { SophieRenderer } from '@sophie/shared'; | 21 | import type { SophieRenderer } from '@sophie/shared'; |
22 | import { applySnapshot, applyPatch, Instance, types } from 'mobx-state-tree'; | 22 | import { applySnapshot, applyPatch, Instance, types } from 'mobx-state-tree'; |
23 | 23 | ||
24 | import { getLogger } from '../utils/log'; | 24 | import { getLogger } from '../utils/log.js'; |
25 | 25 | ||
26 | import type GlobalSettings from './GlobalSettings'; | 26 | import type GlobalSettings from './GlobalSettings.js'; |
27 | import type RendererEnv from './RendererEnv'; | 27 | import type RendererEnv from './RendererEnv.js'; |
28 | import type Service from './Service'; | 28 | import type Service from './Service.js'; |
29 | import SharedStore from './SharedStore'; | 29 | import SharedStore from './SharedStore.js'; |
30 | 30 | ||
31 | const log = getLogger('RendererStore'); | 31 | const log = getLogger('RendererStore'); |
32 | 32 | ||
diff --git a/packages/renderer/src/stores/Service.ts b/packages/renderer/src/stores/Service.ts index c8d513f..ff01964 100644 --- a/packages/renderer/src/stores/Service.ts +++ b/packages/renderer/src/stores/Service.ts | |||
@@ -25,8 +25,8 @@ import { | |||
25 | } from '@sophie/shared'; | 25 | } from '@sophie/shared'; |
26 | import { Instance } from 'mobx-state-tree'; | 26 | import { Instance } from 'mobx-state-tree'; |
27 | 27 | ||
28 | import { getEnv } from './RendererEnv'; | 28 | import { getEnv } from './RendererEnv.js'; |
29 | import ServiceSettings from './ServiceSettings'; | 29 | import ServiceSettings from './ServiceSettings.js'; |
30 | 30 | ||
31 | const Service = defineServiceModel(ServiceSettings) | 31 | const Service = defineServiceModel(ServiceSettings) |
32 | .views((self) => ({ | 32 | .views((self) => ({ |
diff --git a/packages/renderer/src/stores/ServiceSettings.ts b/packages/renderer/src/stores/ServiceSettings.ts index 5d37347..d5c2843 100644 --- a/packages/renderer/src/stores/ServiceSettings.ts +++ b/packages/renderer/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/renderer/src/stores/SharedStore.ts b/packages/renderer/src/stores/SharedStore.ts index 062479d..0b04a86 100644 --- a/packages/renderer/src/stores/SharedStore.ts +++ b/packages/renderer/src/stores/SharedStore.ts | |||
@@ -21,9 +21,9 @@ | |||
21 | import { defineSharedStoreModel } from '@sophie/shared'; | 21 | import { defineSharedStoreModel } from '@sophie/shared'; |
22 | import { Instance } from 'mobx-state-tree'; | 22 | import { Instance } from 'mobx-state-tree'; |
23 | 23 | ||
24 | import GlobalSettings from './GlobalSettings'; | 24 | import GlobalSettings from './GlobalSettings.js'; |
25 | import Profile from './Profile'; | 25 | import Profile from './Profile.js'; |
26 | import Service from './Service'; | 26 | import Service from './Service.js'; |
27 | 27 | ||
28 | const SharedStore = defineSharedStoreModel( | 28 | const SharedStore = defineSharedStoreModel( |
29 | GlobalSettings, | 29 | GlobalSettings, |
diff --git a/packages/renderer/tsconfig.json b/packages/renderer/tsconfig.json index 4fe3896..3b576a8 100644 --- a/packages/renderer/tsconfig.json +++ b/packages/renderer/tsconfig.json | |||
@@ -2,8 +2,10 @@ | |||
2 | "extends": "../../config/tsconfig.base.json", | 2 | "extends": "../../config/tsconfig.base.json", |
3 | "compilerOptions": { | 3 | "compilerOptions": { |
4 | "noEmit": true, | 4 | "noEmit": true, |
5 | "module": "es2022", | ||
6 | "moduleResolution": "node", | ||
5 | "jsx": "react", | 7 | "jsx": "react", |
6 | "lib": ["dom", "dom.iterable", "esnext"], | 8 | "lib": ["dom", "dom.iterable", "es2021"], |
7 | "types": ["@types/jest", "vite/client"] | 9 | "types": ["@types/jest", "vite/client"] |
8 | }, | 10 | }, |
9 | "references": [ | 11 | "references": [ |
diff --git a/packages/service-inject/tsconfig.json b/packages/service-inject/tsconfig.json index 33ce1de..126bce4 100644 --- a/packages/service-inject/tsconfig.json +++ b/packages/service-inject/tsconfig.json | |||
@@ -2,7 +2,7 @@ | |||
2 | "extends": "../../config/tsconfig.base.json", | 2 | "extends": "../../config/tsconfig.base.json", |
3 | "compilerOptions": { | 3 | "compilerOptions": { |
4 | "noEmit": true, | 4 | "noEmit": true, |
5 | "lib": ["dom", "dom.iterable", "esnext"] | 5 | "lib": ["dom", "dom.iterable", "es2021"] |
6 | }, | 6 | }, |
7 | "references": [ | 7 | "references": [ |
8 | { | 8 | { |
diff --git a/packages/service-preload/tsconfig.json b/packages/service-preload/tsconfig.json index d7fb8cb..a3ba1bc 100644 --- a/packages/service-preload/tsconfig.json +++ b/packages/service-preload/tsconfig.json | |||
@@ -2,7 +2,7 @@ | |||
2 | "extends": "../../config/tsconfig.base.json", | 2 | "extends": "../../config/tsconfig.base.json", |
3 | "compilerOptions": { | 3 | "compilerOptions": { |
4 | "noEmit": true, | 4 | "noEmit": true, |
5 | "lib": ["dom", "dom.iterable", "esnext"] | 5 | "lib": ["dom", "dom.iterable", "es2021"] |
6 | }, | 6 | }, |
7 | "references": [ | 7 | "references": [ |
8 | { | 8 | { |
diff --git a/packages/service-shared/package.json b/packages/service-shared/package.json index 57a2297..3940cf5 100644 --- a/packages/service-shared/package.json +++ b/packages/service-shared/package.json | |||
@@ -4,7 +4,12 @@ | |||
4 | "private": true, | 4 | "private": true, |
5 | "sideEffects": false, | 5 | "sideEffects": false, |
6 | "type": "module", | 6 | "type": "module", |
7 | "exports": "./dist/index.mjs", | 7 | "exports": { |
8 | ".": { | ||
9 | "import": "./dist/index.mjs", | ||
10 | "types": "./dist/index.d.ts" | ||
11 | } | ||
12 | }, | ||
8 | "types": "dist/index.d.ts", | 13 | "types": "dist/index.d.ts", |
9 | "scripts": { | 14 | "scripts": { |
10 | "typecheck:workspace": "yarn g:typecheck", | 15 | "typecheck:workspace": "yarn g:typecheck", |
diff --git a/packages/service-shared/src/index.ts b/packages/service-shared/src/index.ts index 5165fe5..c415e45 100644 --- a/packages/service-shared/src/index.ts +++ b/packages/service-shared/src/index.ts | |||
@@ -18,6 +18,6 @@ | |||
18 | * SPDX-License-Identifier: AGPL-3.0-only | 18 | * SPDX-License-Identifier: AGPL-3.0-only |
19 | */ | 19 | */ |
20 | 20 | ||
21 | export { MainToServiceIpcMessage, ServiceToMainIpcMessage } from './ipc'; | 21 | export { MainToServiceIpcMessage, ServiceToMainIpcMessage } from './ipc.js'; |
22 | 22 | ||
23 | export { UnreadCount } from './schemas'; | 23 | export { UnreadCount } from './schemas.js'; |
diff --git a/packages/shared/package.json b/packages/shared/package.json index 2498797..6078902 100644 --- a/packages/shared/package.json +++ b/packages/shared/package.json | |||
@@ -4,7 +4,12 @@ | |||
4 | "private": true, | 4 | "private": true, |
5 | "sideEffects": false, | 5 | "sideEffects": false, |
6 | "type": "module", | 6 | "type": "module", |
7 | "exports": "./dist/index.mjs", | 7 | "exports": { |
8 | ".": { | ||
9 | "import": "./dist/index.mjs", | ||
10 | "types": "./dist/index.d.ts" | ||
11 | } | ||
12 | }, | ||
8 | "types": "dist/index.d.ts", | 13 | "types": "dist/index.d.ts", |
9 | "scripts": { | 14 | "scripts": { |
10 | "typecheck:workspace": "yarn g:typecheck", | 15 | "typecheck:workspace": "yarn g:typecheck", |
diff --git a/packages/shared/src/contextBridge/SophieRenderer.ts b/packages/shared/src/contextBridge/SophieRenderer.ts index 732f941..7b934e5 100644 --- a/packages/shared/src/contextBridge/SophieRenderer.ts +++ b/packages/shared/src/contextBridge/SophieRenderer.ts | |||
@@ -20,9 +20,9 @@ | |||
20 | 20 | ||
21 | import type { ResourceKey } from 'i18next'; | 21 | import type { ResourceKey } from 'i18next'; |
22 | 22 | ||
23 | import { Action } from '../schemas/Action'; | 23 | import { Action } from '../schemas/Action.js'; |
24 | import { Translation } from '../schemas/Translation'; | 24 | import { Translation } from '../schemas/Translation.js'; |
25 | import { SharedStoreListener } from '../stores/SharedStoreBase'; | 25 | import { SharedStoreListener } from '../stores/SharedStoreBase.js'; |
26 | 26 | ||
27 | export default interface SophieRenderer { | 27 | export default interface SophieRenderer { |
28 | onSharedStoreChange(this: void, listener: SharedStoreListener): Promise<void>; | 28 | onSharedStoreChange(this: void, listener: SharedStoreListener): Promise<void>; |
diff --git a/packages/shared/src/index.ts b/packages/shared/src/index.ts index b1d05f8..2e06234 100644 --- a/packages/shared/src/index.ts +++ b/packages/shared/src/index.ts | |||
@@ -18,71 +18,71 @@ | |||
18 | * SPDX-License-Identifier: AGPL-3.0-only | 18 | * SPDX-License-Identifier: AGPL-3.0-only |
19 | */ | 19 | */ |
20 | 20 | ||
21 | export type { default as SophieRenderer } from './contextBridge/SophieRenderer'; | 21 | export type { default as SophieRenderer } from './contextBridge/SophieRenderer.js'; |
22 | 22 | ||
23 | export { MainToRendererIpcMessage, RendererToMainIpcMessage } from './ipc'; | 23 | export { MainToRendererIpcMessage, RendererToMainIpcMessage } from './ipc.js'; |
24 | 24 | ||
25 | export { Action } from './schemas/Action'; | 25 | export { Action } from './schemas/Action.js'; |
26 | 26 | ||
27 | export { BrowserViewBounds } from './schemas/BrowserViewBounds'; | 27 | export { BrowserViewBounds } from './schemas/BrowserViewBounds.js'; |
28 | 28 | ||
29 | export { ServiceAction } from './schemas/ServiceAction'; | 29 | export { ServiceAction } from './schemas/ServiceAction.js'; |
30 | 30 | ||
31 | export { ThemeSource } from './schemas/ThemeSource'; | 31 | export { ThemeSource } from './schemas/ThemeSource.js'; |
32 | 32 | ||
33 | export { Translation } from './schemas/Translation'; | 33 | export { Translation } from './schemas/Translation.js'; |
34 | 34 | ||
35 | export type { | 35 | export type { |
36 | CertificatePrincipal, | 36 | CertificatePrincipal, |
37 | CertificateSnapshotIn, | 37 | CertificateSnapshotIn, |
38 | } from './stores/Certificate'; | 38 | } from './stores/Certificate.js'; |
39 | export { default as Certificate } from './stores/Certificate'; | 39 | export { default as Certificate } from './stores/Certificate.js'; |
40 | 40 | ||
41 | export type { | 41 | export type { |
42 | GlobalSettingsSnapshotIn, | 42 | GlobalSettingsSnapshotIn, |
43 | GlobalSettingsSnapshotOut, | 43 | GlobalSettingsSnapshotOut, |
44 | } from './stores/GlobalSettingsBase'; | 44 | } from './stores/GlobalSettingsBase.js'; |
45 | export { | 45 | export { |
46 | default as GlobalSettingsBase, | 46 | default as GlobalSettingsBase, |
47 | defineGlobalSettingsModel, | 47 | defineGlobalSettingsModel, |
48 | SYSTEM_LOCALE, | 48 | SYSTEM_LOCALE, |
49 | } from './stores/GlobalSettingsBase'; | 49 | } from './stores/GlobalSettingsBase.js'; |
50 | 50 | ||
51 | export { default as Profile } from './stores/Profile'; | 51 | export { default as Profile } from './stores/Profile.js'; |
52 | 52 | ||
53 | export type { | 53 | export type { |
54 | ProfileSettingsSnapshotIn, | 54 | ProfileSettingsSnapshotIn, |
55 | ProfileSettingsSnapshotOut, | 55 | ProfileSettingsSnapshotOut, |
56 | } from './stores/ProfileSettings'; | 56 | } from './stores/ProfileSettings.js'; |
57 | export { default as ProfileSettings } from './stores/ProfileSettings'; | 57 | export { default as ProfileSettings } from './stores/ProfileSettings.js'; |
58 | 58 | ||
59 | export { | 59 | export { |
60 | default as ServiceBase, | 60 | default as ServiceBase, |
61 | defineServiceModel, | 61 | defineServiceModel, |
62 | SecurityLabelKind, | 62 | SecurityLabelKind, |
63 | } from './stores/ServiceBase'; | 63 | } from './stores/ServiceBase.js'; |
64 | 64 | ||
65 | export type { | 65 | export type { |
66 | ServiceSettingsSnapshotIn, | 66 | ServiceSettingsSnapshotIn, |
67 | ServiceSettingsSnapshotOut, | 67 | ServiceSettingsSnapshotOut, |
68 | } from './stores/ServiceSettingsBase'; | 68 | } from './stores/ServiceSettingsBase.js'; |
69 | export { | 69 | export { |
70 | default as ServiceSettingsBase, | 70 | default as ServiceSettingsBase, |
71 | defineServiceSettingsModel, | 71 | defineServiceSettingsModel, |
72 | } from './stores/ServiceSettingsBase'; | 72 | } from './stores/ServiceSettingsBase.js'; |
73 | 73 | ||
74 | export type { ServiceStateSnapshotIn } from './stores/ServiceState'; | 74 | export type { ServiceStateSnapshotIn } from './stores/ServiceState.js'; |
75 | export { default as ServiceState } from './stores/ServiceState'; | 75 | export { default as ServiceState } from './stores/ServiceState.js'; |
76 | 76 | ||
77 | export type { | 77 | export type { |
78 | SharedStoreListener, | 78 | SharedStoreListener, |
79 | SharedStoreSnapshotIn, | 79 | SharedStoreSnapshotIn, |
80 | SharedStoreSnapshotOut, | 80 | SharedStoreSnapshotOut, |
81 | } from './stores/SharedStoreBase'; | 81 | } from './stores/SharedStoreBase.js'; |
82 | export { | 82 | export { |
83 | default as SharedStoreBase, | 83 | default as SharedStoreBase, |
84 | defineSharedStoreModel, | 84 | defineSharedStoreModel, |
85 | FALLBACK_LOCALE, | 85 | FALLBACK_LOCALE, |
86 | } from './stores/SharedStoreBase'; | 86 | } from './stores/SharedStoreBase.js'; |
87 | 87 | ||
88 | export { default as WritingDirection } from './stores/WritingDirection'; | 88 | export { default as WritingDirection } from './stores/WritingDirection.js'; |
diff --git a/packages/shared/src/schemas/Action.ts b/packages/shared/src/schemas/Action.ts index 7ece27a..11d63aa 100644 --- a/packages/shared/src/schemas/Action.ts +++ b/packages/shared/src/schemas/Action.ts | |||
@@ -20,8 +20,8 @@ | |||
20 | 20 | ||
21 | import { z } from 'zod'; | 21 | import { z } from 'zod'; |
22 | 22 | ||
23 | import { ServiceAction } from './ServiceAction'; | 23 | import { ServiceAction } from './ServiceAction.js'; |
24 | import { ThemeSource } from './ThemeSource'; | 24 | import { ThemeSource } from './ThemeSource.js'; |
25 | 25 | ||
26 | export const Action = /* @__PURE__ */ (() => | 26 | export const Action = /* @__PURE__ */ (() => |
27 | z.union([ | 27 | z.union([ |
diff --git a/packages/shared/src/schemas/ServiceAction.ts b/packages/shared/src/schemas/ServiceAction.ts index 9486aaf..744c7cf 100644 --- a/packages/shared/src/schemas/ServiceAction.ts +++ b/packages/shared/src/schemas/ServiceAction.ts | |||
@@ -20,7 +20,7 @@ | |||
20 | 20 | ||
21 | import { z } from 'zod'; | 21 | import { z } from 'zod'; |
22 | 22 | ||
23 | import { BrowserViewBounds } from './BrowserViewBounds'; | 23 | import { BrowserViewBounds } from './BrowserViewBounds.js'; |
24 | 24 | ||
25 | export const ServiceAction = /* @__PURE__ */ (() => | 25 | export const ServiceAction = /* @__PURE__ */ (() => |
26 | z.union([ | 26 | z.union([ |
diff --git a/packages/shared/src/stores/GlobalSettingsBase.ts b/packages/shared/src/stores/GlobalSettingsBase.ts index c74c822..9d677c4 100644 --- a/packages/shared/src/stores/GlobalSettingsBase.ts +++ b/packages/shared/src/stores/GlobalSettingsBase.ts | |||
@@ -26,9 +26,9 @@ import { | |||
26 | IAnyModelType, | 26 | IAnyModelType, |
27 | } from 'mobx-state-tree'; | 27 | } from 'mobx-state-tree'; |
28 | 28 | ||
29 | import { ThemeSource } from '../schemas/ThemeSource'; | 29 | import { ThemeSource } from '../schemas/ThemeSource.js'; |
30 | 30 | ||
31 | import ServiceBase from './ServiceBase'; | 31 | import ServiceBase from './ServiceBase.js'; |
32 | 32 | ||
33 | export const SYSTEM_LOCALE = 'system'; | 33 | export const SYSTEM_LOCALE = 'system'; |
34 | 34 | ||
diff --git a/packages/shared/src/stores/Profile.ts b/packages/shared/src/stores/Profile.ts index 611ca6f..076c639 100644 --- a/packages/shared/src/stores/Profile.ts +++ b/packages/shared/src/stores/Profile.ts | |||
@@ -20,8 +20,8 @@ | |||
20 | 20 | ||
21 | import { Instance, types } from 'mobx-state-tree'; | 21 | import { Instance, types } from 'mobx-state-tree'; |
22 | 22 | ||
23 | import Certificate, { CertificateSnapshotIn } from './Certificate'; | 23 | import Certificate, { CertificateSnapshotIn } from './Certificate.js'; |
24 | import ProfileSettings from './ProfileSettings'; | 24 | import ProfileSettings from './ProfileSettings.js'; |
25 | 25 | ||
26 | const Profile = /* @__PURE__ */ (() => | 26 | const Profile = /* @__PURE__ */ (() => |
27 | types | 27 | types |
diff --git a/packages/shared/src/stores/ServiceBase.ts b/packages/shared/src/stores/ServiceBase.ts index 0e4be97..7bd1d68 100644 --- a/packages/shared/src/stores/ServiceBase.ts +++ b/packages/shared/src/stores/ServiceBase.ts | |||
@@ -20,10 +20,10 @@ | |||
20 | 20 | ||
21 | import { IAnyModelType, Instance, types } from 'mobx-state-tree'; | 21 | import { IAnyModelType, Instance, types } from 'mobx-state-tree'; |
22 | 22 | ||
23 | import type { CertificateSnapshotIn } from './Certificate'; | 23 | import type { CertificateSnapshotIn } from './Certificate.js'; |
24 | import type Profile from './Profile'; | 24 | import type Profile from './Profile.js'; |
25 | import ServiceSettingsBase from './ServiceSettingsBase'; | 25 | import ServiceSettingsBase from './ServiceSettingsBase.js'; |
26 | import ServiceState from './ServiceState'; | 26 | import ServiceState from './ServiceState.js'; |
27 | 27 | ||
28 | export enum SecurityLabelKind { | 28 | export enum SecurityLabelKind { |
29 | Empty = 'empty', | 29 | Empty = 'empty', |
diff --git a/packages/shared/src/stores/ServiceSettingsBase.ts b/packages/shared/src/stores/ServiceSettingsBase.ts index 45eb15d..b9df516 100644 --- a/packages/shared/src/stores/ServiceSettingsBase.ts +++ b/packages/shared/src/stores/ServiceSettingsBase.ts | |||
@@ -26,7 +26,7 @@ import { | |||
26 | IAnyModelType, | 26 | IAnyModelType, |
27 | } from 'mobx-state-tree'; | 27 | } from 'mobx-state-tree'; |
28 | 28 | ||
29 | import ProfileBase from './Profile'; | 29 | import ProfileBase from './Profile.js'; |
30 | 30 | ||
31 | export function defineServiceSettingsModel<TP extends IAnyModelType>( | 31 | export function defineServiceSettingsModel<TP extends IAnyModelType>( |
32 | profile: TP, | 32 | profile: TP, |
diff --git a/packages/shared/src/stores/ServiceState.ts b/packages/shared/src/stores/ServiceState.ts index ad49321..d311a70 100644 --- a/packages/shared/src/stores/ServiceState.ts +++ b/packages/shared/src/stores/ServiceState.ts | |||
@@ -20,7 +20,7 @@ | |||
20 | 20 | ||
21 | import { Instance, SnapshotIn, types } from 'mobx-state-tree'; | 21 | import { Instance, SnapshotIn, types } from 'mobx-state-tree'; |
22 | 22 | ||
23 | import Certificate from './Certificate'; | 23 | import Certificate from './Certificate.js'; |
24 | 24 | ||
25 | const ServiceState = /* @__PURE__ */ (() => | 25 | const ServiceState = /* @__PURE__ */ (() => |
26 | types.optional( | 26 | types.optional( |
diff --git a/packages/shared/src/stores/SharedStoreBase.ts b/packages/shared/src/stores/SharedStoreBase.ts index 949ef6a..4526c95 100644 --- a/packages/shared/src/stores/SharedStoreBase.ts +++ b/packages/shared/src/stores/SharedStoreBase.ts | |||
@@ -27,10 +27,10 @@ import { | |||
27 | IAnyModelType, | 27 | IAnyModelType, |
28 | } from 'mobx-state-tree'; | 28 | } from 'mobx-state-tree'; |
29 | 29 | ||
30 | import GlobalSettingsBase from './GlobalSettingsBase'; | 30 | import GlobalSettingsBase from './GlobalSettingsBase.js'; |
31 | import ProfileBase from './Profile'; | 31 | import ProfileBase from './Profile.js'; |
32 | import ServiceBase from './ServiceBase'; | 32 | import ServiceBase from './ServiceBase.js'; |
33 | import WritingDirection from './WritingDirection'; | 33 | import WritingDirection from './WritingDirection.js'; |
34 | 34 | ||
35 | export const FALLBACK_LOCALE = 'en'; | 35 | export const FALLBACK_LOCALE = 'en'; |
36 | 36 | ||
diff --git a/packages/test-utils/src/index.ts b/packages/test-utils/src/index.ts index c4db5b0..52ac98d 100644 --- a/packages/test-utils/src/index.ts +++ b/packages/test-utils/src/index.ts | |||
@@ -22,4 +22,4 @@ | |||
22 | eslint-disable-next-line import/prefer-default-export -- | 22 | eslint-disable-next-line import/prefer-default-export -- |
23 | Keep API consistent for more helpers in the future. | 23 | Keep API consistent for more helpers in the future. |
24 | */ | 24 | */ |
25 | export { default as fake } from './fake'; | 25 | export { default as fake } from './fake.js'; |