diff options
author | Kristóf Marussy <kristof@marussy.com> | 2022-04-08 02:10:22 +0200 |
---|---|---|
committer | Kristóf Marussy <kristof@marussy.com> | 2022-05-16 00:55:00 +0200 |
commit | ab1cda612cf6d427bffb66d5674a3673eb958e50 (patch) | |
tree | aeb01a0b431ca850b75d276af745bde807851839 /packages/service-shared | |
parent | fix(main): Do not show spurious abort error (diff) | |
download | sophie-ab1cda612cf6d427bffb66d5674a3673eb958e50.tar.gz sophie-ab1cda612cf6d427bffb66d5674a3673eb958e50.tar.zst sophie-ab1cda612cf6d427bffb66d5674a3673eb958e50.zip |
feat(service-preload): Embed service-inject
Embed the service-inject script into the service-preload script to avoid
having to load it manually and reduce IPC communication when a service
loads.
Signed-off-by: Kristóf Marussy <kristof@marussy.com>
Diffstat (limited to 'packages/service-shared')
-rw-r--r-- | packages/service-shared/src/index.ts | 2 | ||||
-rw-r--r-- | packages/service-shared/src/ipc.ts | 1 | ||||
-rw-r--r-- | packages/service-shared/src/schemas.ts | 12 |
3 files changed, 1 insertions, 14 deletions
diff --git a/packages/service-shared/src/index.ts b/packages/service-shared/src/index.ts index a2e5ee5..5165fe5 100644 --- a/packages/service-shared/src/index.ts +++ b/packages/service-shared/src/index.ts | |||
@@ -20,4 +20,4 @@ | |||
20 | 20 | ||
21 | export { MainToServiceIpcMessage, ServiceToMainIpcMessage } from './ipc'; | 21 | export { MainToServiceIpcMessage, ServiceToMainIpcMessage } from './ipc'; |
22 | 22 | ||
23 | export { UnreadCount, WebSource } from './schemas'; | 23 | export { UnreadCount } from './schemas'; |
diff --git a/packages/service-shared/src/ipc.ts b/packages/service-shared/src/ipc.ts index e0a8755..4ead5bd 100644 --- a/packages/service-shared/src/ipc.ts +++ b/packages/service-shared/src/ipc.ts | |||
@@ -21,6 +21,5 @@ | |||
21 | export enum MainToServiceIpcMessage {} | 21 | export enum MainToServiceIpcMessage {} |
22 | 22 | ||
23 | export enum ServiceToMainIpcMessage { | 23 | export enum ServiceToMainIpcMessage { |
24 | ApiExposedInMainWorld = 'sophie-service-to-main:api-exposed-in-main-world', | ||
25 | SetUnreadCount = 'sophie-service-to-main:set-unread-count', | 24 | SetUnreadCount = 'sophie-service-to-main:set-unread-count', |
26 | } | 25 | } |
diff --git a/packages/service-shared/src/schemas.ts b/packages/service-shared/src/schemas.ts index bb1926f..799faac 100644 --- a/packages/service-shared/src/schemas.ts +++ b/packages/service-shared/src/schemas.ts | |||
@@ -31,15 +31,3 @@ export const UnreadCount = /* @__PURE__ */ (() => | |||
31 | Intentionally naming the type the same as the schema definition. | 31 | Intentionally naming the type the same as the schema definition. |
32 | */ | 32 | */ |
33 | export type UnreadCount = z.infer<typeof UnreadCount>; | 33 | export type UnreadCount = z.infer<typeof UnreadCount>; |
34 | |||
35 | export const WebSource = /* @__PURE__ */ (() => | ||
36 | z.object({ | ||
37 | code: z.string(), | ||
38 | url: z.string().nonempty(), | ||
39 | }))(); | ||
40 | |||
41 | /* | ||
42 | eslint-disable-next-line @typescript-eslint/no-redeclare -- | ||
43 | Intentionally naming the type the same as the schema definition. | ||
44 | */ | ||
45 | export type WebSource = z.infer<typeof WebSource>; | ||