diff options
Diffstat (limited to 'packages/shared')
-rw-r--r-- | packages/shared/.eslintrc.cjs | 5 | ||||
-rw-r--r-- | packages/shared/esbuild.config.js | 10 | ||||
-rw-r--r-- | packages/shared/src/index.ts | 18 | ||||
-rw-r--r-- | packages/shared/src/stores/Config.ts | 7 | ||||
-rw-r--r-- | packages/shared/src/stores/SharedStore.ts | 3 | ||||
-rw-r--r-- | packages/shared/tsconfig.build.json | 4 | ||||
-rw-r--r-- | packages/shared/tsconfig.json | 6 |
7 files changed, 15 insertions, 38 deletions
diff --git a/packages/shared/.eslintrc.cjs b/packages/shared/.eslintrc.cjs index c19829d..25fd252 100644 --- a/packages/shared/.eslintrc.cjs +++ b/packages/shared/.eslintrc.cjs | |||
@@ -6,10 +6,7 @@ module.exports = { | |||
6 | }, | 6 | }, |
7 | overrides: [ | 7 | overrides: [ |
8 | { | 8 | { |
9 | files: [ | 9 | files: ['.eslintrc.cjs', 'esbuild.config.js'], |
10 | '.eslintrc.cjs', | ||
11 | 'esbuild.config.js', | ||
12 | ], | ||
13 | env: { | 10 | env: { |
14 | node: true, | 11 | node: true, |
15 | }, | 12 | }, |
diff --git a/packages/shared/esbuild.config.js b/packages/shared/esbuild.config.js index 78249ab..44501bd 100644 --- a/packages/shared/esbuild.config.js +++ b/packages/shared/esbuild.config.js | |||
@@ -4,9 +4,7 @@ import getEsbuildConfig from '../../config/getEsbuildConfig.js'; | |||
4 | 4 | ||
5 | export default getEsbuildConfig({ | 5 | export default getEsbuildConfig({ |
6 | absWorkingDir: fileURLToDirname(import.meta.url), | 6 | absWorkingDir: fileURLToDirname(import.meta.url), |
7 | entryPoints: [ | 7 | entryPoints: ['src/index.ts'], |
8 | 'src/index.ts', | ||
9 | ], | ||
10 | outfile: 'dist/index.mjs', | 8 | outfile: 'dist/index.mjs', |
11 | format: 'esm', | 9 | format: 'esm', |
12 | // The package that includes this one will have a header comment, | 10 | // The package that includes this one will have a header comment, |
@@ -14,9 +12,5 @@ export default getEsbuildConfig({ | |||
14 | banner: {}, | 12 | banner: {}, |
15 | platform: 'node', | 13 | platform: 'node', |
16 | target: [chrome, node], | 14 | target: [chrome, node], |
17 | external: [ | 15 | external: ['mobx', 'mobx-state-tree', 'zod'], |
18 | 'mobx', | ||
19 | 'mobx-state-tree', | ||
20 | 'zod', | ||
21 | ], | ||
22 | }); | 16 | }); |
diff --git a/packages/shared/src/index.ts b/packages/shared/src/index.ts index 9828ec4..6383f63 100644 --- a/packages/shared/src/index.ts +++ b/packages/shared/src/index.ts | |||
@@ -22,18 +22,14 @@ export type { SophieRenderer } from './contextBridge/SophieRenderer'; | |||
22 | 22 | ||
23 | export { MainToRendererIpcMessage, RendererToMainIpcMessage } from './ipc'; | 23 | export { MainToRendererIpcMessage, RendererToMainIpcMessage } from './ipc'; |
24 | 24 | ||
25 | export type { | 25 | export type { Action, BrowserViewBounds, ThemeSource } from './schemas'; |
26 | Action, | 26 | export { action, browserViewBounds, themeSource } from './schemas'; |
27 | BrowserViewBounds, | ||
28 | ThemeSource, | ||
29 | } from './schemas'; | ||
30 | export { | ||
31 | action, | ||
32 | browserViewBounds, | ||
33 | themeSource, | ||
34 | } from './schemas'; | ||
35 | 27 | ||
36 | export type { Config, ConfigSnapshotIn, ConfigSnapshotOut } from './stores/Config'; | 28 | export type { |
29 | Config, | ||
30 | ConfigSnapshotIn, | ||
31 | ConfigSnapshotOut, | ||
32 | } from './stores/Config'; | ||
37 | export { config } from './stores/Config'; | 33 | export { config } from './stores/Config'; |
38 | 34 | ||
39 | export type { | 35 | export type { |
diff --git a/packages/shared/src/stores/Config.ts b/packages/shared/src/stores/Config.ts index 432945c..1d98a33 100644 --- a/packages/shared/src/stores/Config.ts +++ b/packages/shared/src/stores/Config.ts | |||
@@ -18,12 +18,7 @@ | |||
18 | * SPDX-License-Identifier: AGPL-3.0-only | 18 | * SPDX-License-Identifier: AGPL-3.0-only |
19 | */ | 19 | */ |
20 | 20 | ||
21 | import { | 21 | import { Instance, types, SnapshotIn, SnapshotOut } from 'mobx-state-tree'; |
22 | Instance, | ||
23 | types, | ||
24 | SnapshotIn, | ||
25 | SnapshotOut, | ||
26 | } from 'mobx-state-tree'; | ||
27 | 22 | ||
28 | import { themeSource } from '../schemas'; | 23 | import { themeSource } from '../schemas'; |
29 | 24 | ||
diff --git a/packages/shared/src/stores/SharedStore.ts b/packages/shared/src/stores/SharedStore.ts index c6c3ddc..cb14394 100644 --- a/packages/shared/src/stores/SharedStore.ts +++ b/packages/shared/src/stores/SharedStore.ts | |||
@@ -37,7 +37,8 @@ export interface SharedStore extends Instance<typeof sharedStore> {} | |||
37 | 37 | ||
38 | export interface SharedStoreSnapshotIn extends SnapshotIn<typeof sharedStore> {} | 38 | export interface SharedStoreSnapshotIn extends SnapshotIn<typeof sharedStore> {} |
39 | 39 | ||
40 | export interface SharedStoreSnapshotOut extends SnapshotOut<typeof sharedStore> {} | 40 | export interface SharedStoreSnapshotOut |
41 | extends SnapshotOut<typeof sharedStore> {} | ||
41 | 42 | ||
42 | export interface SharedStoreListener { | 43 | export interface SharedStoreListener { |
43 | onSnapshot(snapshot: SharedStoreSnapshotIn): void; | 44 | onSnapshot(snapshot: SharedStoreSnapshotIn): void; |
diff --git a/packages/shared/tsconfig.build.json b/packages/shared/tsconfig.build.json index 9a0c835..d300514 100644 --- a/packages/shared/tsconfig.build.json +++ b/packages/shared/tsconfig.build.json | |||
@@ -6,7 +6,5 @@ | |||
6 | "emitDeclarationOnly": true, | 6 | "emitDeclarationOnly": true, |
7 | "rootDir": "src" | 7 | "rootDir": "src" |
8 | }, | 8 | }, |
9 | "include": [ | 9 | "include": ["src/**/*.ts"] |
10 | "src/**/*.ts" | ||
11 | ] | ||
12 | } | 10 | } |
diff --git a/packages/shared/tsconfig.json b/packages/shared/tsconfig.json index 3e6c6ff..daad7c4 100644 --- a/packages/shared/tsconfig.json +++ b/packages/shared/tsconfig.json | |||
@@ -7,9 +7,5 @@ | |||
7 | "noEmit": true, | 7 | "noEmit": true, |
8 | "rootDir": null | 8 | "rootDir": null |
9 | }, | 9 | }, |
10 | "include": [ | 10 | "include": ["src/**/*.ts", ".eslintrc.cjs", "esbuild.config.js"] |
11 | "src/**/*.ts", | ||
12 | ".eslintrc.cjs", | ||
13 | "esbuild.config.js" | ||
14 | ] | ||
15 | } | 11 | } |