aboutsummaryrefslogtreecommitdiffstats
path: root/packages/shared/src/index.ts
diff options
context:
space:
mode:
authorLibravatar Kristóf Marussy <kristof@marussy.com>2022-01-23 17:12:47 +0100
committerLibravatar Kristóf Marussy <kristof@marussy.com>2022-02-08 21:43:17 +0100
commit044b2de8c7861504704468ba441d4a6a37eed8f7 (patch)
tree940d2b7946d07a0c69b5e3ad46c25c599cf2aca7 /packages/shared/src/index.ts
parentfeat: Add selected service field to SharedStore (diff)
downloadsophie-044b2de8c7861504704468ba441d4a6a37eed8f7.tar.gz
sophie-044b2de8c7861504704468ba441d4a6a37eed8f7.tar.zst
sophie-044b2de8c7861504704468ba441d4a6a37eed8f7.zip
refactor: Move runtime state into shared models
Now the runtime state lives inside the model (instead of being associated to the static settings via a map), which simplifies state management. Static settings are now located inside the runtime models, so we must create tests to make sure that the settings are being persisted correctly. The contents of the config file are now generated as a view of store (instead of a snapshot), which adds flexibility. Signed-off-by: Kristóf Marussy <kristof@marussy.com>
Diffstat (limited to 'packages/shared/src/index.ts')
-rw-r--r--packages/shared/src/index.ts41
1 files changed, 20 insertions, 21 deletions
diff --git a/packages/shared/src/index.ts b/packages/shared/src/index.ts
index df02854..55cf5ce 100644
--- a/packages/shared/src/index.ts
+++ b/packages/shared/src/index.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
21export type { SophieRenderer } from './contextBridge/SophieRenderer'; 21export type { default as SophieRenderer } from './contextBridge/SophieRenderer';
22 22
23export { MainToRendererIpcMessage, RendererToMainIpcMessage } from './ipc'; 23export { MainToRendererIpcMessage, RendererToMainIpcMessage } from './ipc';
24 24
@@ -26,34 +26,33 @@ export type { Action, BrowserViewBounds, ThemeSource } from './schemas';
26export { action, browserViewBounds, themeSource } from './schemas'; 26export { action, browserViewBounds, themeSource } from './schemas';
27 27
28export type { 28export type {
29 Config, 29 GlobalSettings,
30 ConfigSnapshotIn, 30 GlobalSettingsSnapshotIn,
31 ConfigSnapshotOut, 31 GlobalSettingsSnapshotOut,
32} from './stores/Config'; 32} from './stores/GlobalSettings';
33export { config } from './stores/Config'; 33export { globalSettings } from './stores/GlobalSettings';
34 34
35export type { 35export type { Profile } from './stores/Profile';
36 Profile,
37 ProfileSnapshotIn,
38 ProfileSnapshotOut,
39} from './stores/Profile';
40export { profile } from './stores/Profile'; 36export { profile } from './stores/Profile';
41 37
42export type { 38export type {
43 RuntimeService, 39 ProfileSettings,
44 RuntimeServiceSnapshotIn, 40 ProfileSettingsSnapshotIn,
45 RuntimeServiceSnapshotOut, 41 ProfileSettingsSnapshotOut,
46} from './stores/RuntimeService'; 42} from './stores/ProfileSettings';
47export { runtimeService } from './stores/RuntimeService'; 43export { profileSettings } from './stores/ProfileSettings';
48 44
49export type { 45export type { Service } from './stores/Service';
50 Service,
51 ServiceSnapshotIn,
52 ServiceSnapshotOut,
53} from './stores/Service';
54export { service } from './stores/Service'; 46export { service } from './stores/Service';
55 47
56export type { 48export type {
49 ServiceSettings,
50 ServiceSettingsSnapshotIn,
51 ServiceSettingsSnapshotOut,
52} from './stores/ServiceSettings';
53export { serviceSettings } from './stores/ServiceSettings';
54
55export type {
57 SharedStore, 56 SharedStore,
58 SharedStoreListener, 57 SharedStoreListener,
59 SharedStoreSnapshotIn, 58 SharedStoreSnapshotIn,