From ab1cda612cf6d427bffb66d5674a3673eb958e50 Mon Sep 17 00:00:00 2001 From: Kristóf Marussy Date: Fri, 8 Apr 2022 02:10:22 +0200 Subject: feat(service-preload): Embed service-inject MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- packages/service-shared/src/index.ts | 2 +- packages/service-shared/src/ipc.ts | 1 - packages/service-shared/src/schemas.ts | 12 ------------ 3 files changed, 1 insertion(+), 14 deletions(-) (limited to 'packages/service-shared/src') 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 @@ export { MainToServiceIpcMessage, ServiceToMainIpcMessage } from './ipc'; -export { UnreadCount, WebSource } from './schemas'; +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 @@ export enum MainToServiceIpcMessage {} export enum ServiceToMainIpcMessage { - ApiExposedInMainWorld = 'sophie-service-to-main:api-exposed-in-main-world', SetUnreadCount = 'sophie-service-to-main:set-unread-count', } 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__ */ (() => Intentionally naming the type the same as the schema definition. */ export type UnreadCount = z.infer; - -export const WebSource = /* @__PURE__ */ (() => - z.object({ - code: z.string(), - url: z.string().nonempty(), - }))(); - -/* - eslint-disable-next-line @typescript-eslint/no-redeclare -- - Intentionally naming the type the same as the schema definition. -*/ -export type WebSource = z.infer; -- cgit v1.2.3-70-g09d2