From 02a578ea4e8575e6a18e77bb07322388f9e7a042 Mon Sep 17 00:00:00 2001 From: Gabriel Massadas Date: Mon, 15 Jan 2024 22:20:31 +0000 Subject: [PATCH] Bump postal-mime --- worker/package-lock.json | 8 ++++---- worker/package.json | 2 +- worker/src/emails/receiveEmail.ts | 3 +-- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/worker/package-lock.json b/worker/package-lock.json index 2186a96..25c74ec 100644 --- a/worker/package-lock.json +++ b/worker/package-lock.json @@ -11,7 +11,7 @@ "dependencies": { "@cloudflare/itty-router-openapi": "1.0.7", "itty-router": "4.0.26", - "postal-mime": "^1.0.16" + "postal-mime": "^2.0.2" }, "bin": { "r2-explorer": "bin/r2-explorer.js" @@ -3069,9 +3069,9 @@ } }, "node_modules/postal-mime": { - "version": "1.0.16", - "resolved": "https://registry.npmjs.org/postal-mime/-/postal-mime-1.0.16.tgz", - "integrity": "sha512-DIpZ6HfV8GIGerAOui+Q3YEE9EZNK3sdZdH2yGVhbVsB7F6bbD3L4D+W2wch7aV+aOkY5EMjMuKYbRDQGdSQBA==" + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/postal-mime/-/postal-mime-2.0.2.tgz", + "integrity": "sha512-xenIIdC8u7NJFXGrhPafHqEpAWJTU7SVbtCsgIKSMEGv+coUbPOkA6LDl0geFPprkqXsZFtwfAgGCEbvDuzjTg==" }, "node_modules/prebuild-install": { "version": "7.1.1", diff --git a/worker/package.json b/worker/package.json index ece6447..9f98848 100644 --- a/worker/package.json +++ b/worker/package.json @@ -97,7 +97,7 @@ "dependencies": { "@cloudflare/itty-router-openapi": "1.0.7", "itty-router": "4.0.26", - "postal-mime": "^1.0.16" + "postal-mime": "^2.0.2" }, "bin": { "r2-explorer": "bin/r2-explorer.js" diff --git a/worker/src/emails/receiveEmail.ts b/worker/src/emails/receiveEmail.ts index 5bbc3de..451fb47 100644 --- a/worker/src/emails/receiveEmail.ts +++ b/worker/src/emails/receiveEmail.ts @@ -1,7 +1,6 @@ import {getCurrentTimestampMilliseconds} from "../dates"; import {Context} from "../interfaces"; - -const PostalMime = require('postal-mime/dist/node').postalMime.default; +import PostalMime from 'postal-mime'; async function streamToArrayBuffer(stream, streamSize) { let result = new Uint8Array(streamSize);