From 4ac6f73887ee814b54d74b397ab34ed35f1b4c2f Mon Sep 17 00:00:00 2001 From: Gal Schlezinger Date: Mon, 30 Sep 2024 19:33:40 +0300 Subject: [PATCH] remove isEmailAddress because it breaks tests (and probably irrelevant?) --- src/sdk.ts | 5 ----- tsup.config.ts | 1 - 2 files changed, 6 deletions(-) diff --git a/src/sdk.ts b/src/sdk.ts index 64ac365..a015c63 100644 --- a/src/sdk.ts +++ b/src/sdk.ts @@ -13,7 +13,6 @@ import { createScheduledHandler } from './instrumentation/scheduled.js' //@ts-ignore import * as versions from '../versions.json' import { createEmailHandler } from './instrumentation/email.js' -import { EmailMessage } from 'cloudflare:email' type FetchHandler = ExportedHandlerFetchHandler type ScheduledHandler = ExportedHandlerScheduledHandler @@ -35,10 +34,6 @@ export function isAlarm(trigger: Trigger): trigger is 'do-alarm' { return trigger === 'do-alarm' } -export function isEmailMessage(trigger: Trigger): trigger is ForwardableEmailMessage { - return !!(trigger instanceof EmailMessage && trigger.headers && trigger.forward) -} - const createResource = (config: ResolvedTraceConfig): Resource => { const workerResourceAttrs = { 'cloud.provider': 'cloudflare', diff --git a/tsup.config.ts b/tsup.config.ts index fc5f993..b7ee126 100644 --- a/tsup.config.ts +++ b/tsup.config.ts @@ -6,5 +6,4 @@ export default defineConfig({ dts: true, clean: true, sourcemap: true, - external: ['cloudflare:email'], })