aboutsummaryrefslogtreecommitdiffstats
path: root/packages/main/src/infrastructure/electron/impl
diff options
context:
space:
mode:
Diffstat (limited to 'packages/main/src/infrastructure/electron/impl')
-rw-r--r--packages/main/src/infrastructure/electron/impl/ElectronMainWindow.ts18
-rw-r--r--packages/main/src/infrastructure/electron/impl/ElectronPartition.ts6
-rw-r--r--packages/main/src/infrastructure/electron/impl/ElectronServiceView.ts12
-rw-r--r--packages/main/src/infrastructure/electron/impl/ElectronViewFactory.ts23
-rw-r--r--packages/main/src/infrastructure/electron/impl/__tests__/electron.integ.test.ts2
-rw-r--r--packages/main/src/infrastructure/electron/impl/__tests__/hardenSession.test.ts4
-rw-r--r--packages/main/src/infrastructure/electron/impl/__tests__/lockWebContentsToFile.test.ts4
-rw-r--r--packages/main/src/infrastructure/electron/impl/electronShell.ts2
-rw-r--r--packages/main/src/infrastructure/electron/impl/hardenSession.ts4
-rw-r--r--packages/main/src/infrastructure/electron/impl/lockWebContentsToFile.ts6
-rw-r--r--packages/main/src/infrastructure/electron/impl/setApplicationMenu.ts2
11 files changed, 44 insertions, 39 deletions
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 {
27import { BrowserWindow, ipcMain, IpcMainEvent } from 'electron'; 27import { BrowserWindow, ipcMain, IpcMainEvent } from 'electron';
28import type { IJsonPatch } from 'mobx-state-tree'; 28import type { IJsonPatch } from 'mobx-state-tree';
29 29
30import type MainStore from '../../../stores/MainStore'; 30import type MainStore from '../../../stores/MainStore.js';
31import getLogger from '../../../utils/getLogger'; 31import getLogger from '../../../utils/getLogger.js';
32import RendererBridge from '../RendererBridge'; 32import RendererBridge from '../RendererBridge.js';
33import type { MainWindow, ServiceView } from '../types'; 33import type { MainWindow, ServiceView } from '../types.js';
34 34
35import ElectronServiceView from './ElectronServiceView'; 35import ElectronServiceView from './ElectronServiceView.js';
36import type ElectronViewFactory from './ElectronViewFactory'; 36import type ElectronViewFactory from './ElectronViewFactory.js';
37import { openDevToolsWhenReady } from './devTools'; 37import { openDevToolsWhenReady } from './devTools.js';
38import lockWebContentsToFile from './lockWebContentsToFile'; 38import lockWebContentsToFile from './lockWebContentsToFile.js';
39 39
40const log = getLogger('ElectronMainWindow'); 40const 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
21import { Session, session } from 'electron'; 21import { Session, session } from 'electron';
22 22
23import type Profile from '../../../stores/Profile'; 23import type Profile from '../../../stores/Profile.js';
24import type { Partition } from '../types'; 24import type { Partition } from '../types.js';
25 25
26import type ElectronViewFactory from './ElectronViewFactory'; 26import type ElectronViewFactory from './ElectronViewFactory.js';
27 27
28export default class ElectronPartition implements Partition { 28export 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
21import { BrowserView } from 'electron'; 21import { BrowserView } from 'electron';
22 22
23import type Service from '../../../stores/Service'; 23import type Service from '../../../stores/Service.js';
24import getLogger from '../../../utils/getLogger'; 24import getLogger from '../../../utils/getLogger.js';
25import type Resources from '../../resources/Resources'; 25import type Resources from '../../resources/Resources.js';
26import type { ServiceView } from '../types'; 26import type { ServiceView } from '../types.js';
27 27
28import ElectronPartition from './ElectronPartition'; 28import ElectronPartition from './ElectronPartition.js';
29import type ElectronViewFactory from './ElectronViewFactory'; 29import type ElectronViewFactory from './ElectronViewFactory.js';
30 30
31const log = getLogger('ElectronServiceView'); 31const 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
21import type MainStore from '../../../stores/MainStore'; 21import type MainStore from '../../../stores/MainStore.js';
22import type Profile from '../../../stores/Profile'; 22import type Profile from '../../../stores/Profile.js';
23import type Service from '../../../stores/Service'; 23import type Service from '../../../stores/Service.js';
24import type Resources from '../../resources/Resources'; 24import type Resources from '../../resources/Resources.js';
25import type UserAgents from '../UserAgents'; 25import type UserAgents from '../UserAgents.js';
26import type { MainWindow, Partition, ServiceView, ViewFactory } from '../types'; 26import type {
27 MainWindow,
28 Partition,
29 ServiceView,
30 ViewFactory,
31} from '../types.js';
27 32
28import ElectronMainWindow from './ElectronMainWindow'; 33import ElectronMainWindow from './ElectronMainWindow.js';
29import ElectronPartition from './ElectronPartition'; 34import ElectronPartition from './ElectronPartition.js';
30import ElectronServiceView from './ElectronServiceView'; 35import ElectronServiceView from './ElectronServiceView.js';
31 36
32export default class ElectronViewFactory implements ViewFactory { 37export 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 @@
1import { BrowserWindow } from 'electron'; 1import { BrowserWindow } from 'electron';
2 2
3import '../ElectronMainWindow'; 3import '../ElectronMainWindow.js';
4 4
5test('create a BrowserWindow', async () => { 5test('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
33import type Resources from '../../../resources/Resources'; 33import type Resources from '../../../resources/Resources.js';
34import hardenSession from '../hardenSession'; 34import hardenSession from '../hardenSession.js';
35 35
36const permissions = [ 36const 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';
25import type { Event, HandlerDetails, WebContents } from 'electron'; 25import type { Event, HandlerDetails, WebContents } from 'electron';
26import { mocked } from 'jest-mock'; 26import { mocked } from 'jest-mock';
27 27
28import type Resources from '../../../resources/Resources'; 28import type Resources from '../../../resources/Resources.js';
29import lockWebContentsToFile from '../lockWebContentsToFile'; 29import lockWebContentsToFile from '../lockWebContentsToFile.js';
30 30
31type WillNavigateHandler = (event: Event, url: string) => void; 31type 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';
23import { app, dialog, shell } from 'electron'; 23import { app, dialog, shell } from 'electron';
24import { getLogger } from 'loglevel'; 24import { getLogger } from 'loglevel';
25 25
26import type MainEnv from '../../../stores/MainEnv'; 26import type MainEnv from '../../../stores/MainEnv.js';
27 27
28const log = getLogger('ElectronShell'); 28const 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
23import type { Session } from 'electron'; 23import type { Session } from 'electron';
24 24
25import getLogger from '../../../utils/getLogger'; 25import getLogger from '../../../utils/getLogger.js';
26import type Resources from '../../resources/Resources'; 26import 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
21import type { WebContents } from 'electron'; 21import type { WebContents } from 'electron';
22 22
23import getLogger from '../../../utils/getLogger'; 23import getLogger from '../../../utils/getLogger.js';
24import isErrno from '../../../utils/isErrno'; 24import isErrno from '../../../utils/isErrno.js';
25import type Resources from '../../resources/Resources'; 25import type Resources from '../../resources/Resources.js';
26 26
27const log = getLogger('lockWebContentsToFile'); 27const 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';
22import { autorun } from 'mobx'; 22import { autorun } from 'mobx';
23import { addDisposer } from 'mobx-state-tree'; 23import { addDisposer } from 'mobx-state-tree';
24 24
25import type MainStore from '../../../stores/MainStore'; 25import type MainStore from '../../../stores/MainStore.js';
26 26
27export default function setApplicationMenu( 27export default function setApplicationMenu(
28 store: MainStore, 28 store: MainStore,