mirror of
https://github.com/dreamhunter2333/cloudflare_temp_email.git
synced 2026-09-05 07:27:27 +08:00
fix: worker node compat (#699)
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
diff --git a/lib/core/network/client.js b/lib/core/network/client.js
|
diff --git a/lib/core/network/client.js b/lib/core/network/client.js
|
||||||
index 25fbbbb47c7f88e83ae26f629e5ae1a0c141725c..209d4a6bf05352f44eeb082eb327581d698de5ce 100644
|
index 25fbbbb47c7f88e83ae26f629e5ae1a0c141725c..ab82c5391596ee2ed8dbe4128f3ba57a8cc998ca 100644
|
||||||
--- a/lib/core/network/client.js
|
--- a/lib/core/network/client.js
|
||||||
+++ b/lib/core/network/client.js
|
+++ b/lib/core/network/client.js
|
||||||
@@ -1,18 +1,18 @@
|
@@ -1,18 +1,18 @@
|
||||||
@@ -37,7 +37,17 @@ index 25fbbbb47c7f88e83ae26f629e5ae1a0c141725c..209d4a6bf05352f44eeb082eb327581d
|
|||||||
const path = __importStar(require("path"));
|
const path = __importStar(require("path"));
|
||||||
const node_fetch_1 = __importDefault(require("node-fetch"));
|
const node_fetch_1 = __importDefault(require("node-fetch"));
|
||||||
const check_1 = require("../helpers/check");
|
const check_1 = require("../helpers/check");
|
||||||
@@ -61,10 +61,10 @@ const DEFAULT_OPTIONS = {
|
@@ -39,7 +39,8 @@ const multipart_stream_1 = __importDefault(require("./multipart-stream"));
|
||||||
|
const error_1 = __importDefault(require("./error"));
|
||||||
|
const url_1 = require("url");
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
||||||
|
-const debug = require('debug')('telegraf:client');
|
||||||
|
+// const debug = require('debug')('telegraf:client');
|
||||||
|
+const debug = (msg) => console.debug(`[telegraf:client] ${msg}`);
|
||||||
|
const { isStream } = multipart_stream_1.default;
|
||||||
|
const WEBHOOK_REPLY_METHOD_ALLOWLIST = new Set([
|
||||||
|
'answerCallbackQuery',
|
||||||
|
@@ -61,10 +62,10 @@ const DEFAULT_OPTIONS = {
|
||||||
apiRoot: 'https://api.telegram.org',
|
apiRoot: 'https://api.telegram.org',
|
||||||
apiMode: 'bot',
|
apiMode: 'bot',
|
||||||
webhookReply: true,
|
webhookReply: true,
|
||||||
@@ -52,7 +62,7 @@ index 25fbbbb47c7f88e83ae26f629e5ae1a0c141725c..209d4a6bf05352f44eeb082eb327581d
|
|||||||
attachmentAgent: undefined,
|
attachmentAgent: undefined,
|
||||||
testEnv: false,
|
testEnv: false,
|
||||||
};
|
};
|
||||||
@@ -112,9 +112,9 @@ async function buildFormDataConfig(payload, agent) {
|
@@ -112,9 +113,9 @@ async function buildFormDataConfig(payload, agent) {
|
||||||
}
|
}
|
||||||
const boundary = crypto.randomBytes(32).toString('hex');
|
const boundary = crypto.randomBytes(32).toString('hex');
|
||||||
const formData = new multipart_stream_1.default(boundary);
|
const formData = new multipart_stream_1.default(boundary);
|
||||||
@@ -65,7 +75,7 @@ index 25fbbbb47c7f88e83ae26f629e5ae1a0c141725c..209d4a6bf05352f44eeb082eb327581d
|
|||||||
return {
|
return {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
compress: true,
|
compress: true,
|
||||||
@@ -205,14 +205,15 @@ async function attachFormMedia(form, media, id, agent) {
|
@@ -205,14 +206,15 @@ async function attachFormMedia(form, media, id, agent) {
|
||||||
if ('source' in media && media.source) {
|
if ('source' in media && media.source) {
|
||||||
let mediaSource = media.source;
|
let mediaSource = media.source;
|
||||||
if (typeof media.source === 'string') {
|
if (typeof media.source === 'string') {
|
||||||
|
|||||||
Generated
+3
-3
@@ -6,7 +6,7 @@ settings:
|
|||||||
|
|
||||||
patchedDependencies:
|
patchedDependencies:
|
||||||
telegraf@4.16.3:
|
telegraf@4.16.3:
|
||||||
hash: 7d0a1784bb35f50fee25f26a14017734b9461612c635e71734b59527280c9563
|
hash: 4ce8461c7f21d886ddd30d13d2be4fc8c72134fd7ffa5da3b27319c883447eed
|
||||||
path: patches/telegraf@4.16.3.patch
|
path: patches/telegraf@4.16.3.patch
|
||||||
|
|
||||||
importers:
|
importers:
|
||||||
@@ -39,7 +39,7 @@ importers:
|
|||||||
version: 4.7.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
|
version: 4.7.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
|
||||||
telegraf:
|
telegraf:
|
||||||
specifier: 4.16.3
|
specifier: 4.16.3
|
||||||
version: 4.16.3(patch_hash=7d0a1784bb35f50fee25f26a14017734b9461612c635e71734b59527280c9563)
|
version: 4.16.3(patch_hash=4ce8461c7f21d886ddd30d13d2be4fc8c72134fd7ffa5da3b27319c883447eed)
|
||||||
worker-mailer:
|
worker-mailer:
|
||||||
specifier: ^1.1.4
|
specifier: ^1.1.4
|
||||||
version: 1.1.4
|
version: 1.1.4
|
||||||
@@ -3563,7 +3563,7 @@ snapshots:
|
|||||||
dependencies:
|
dependencies:
|
||||||
has-flag: 4.0.0
|
has-flag: 4.0.0
|
||||||
|
|
||||||
telegraf@4.16.3(patch_hash=7d0a1784bb35f50fee25f26a14017734b9461612c635e71734b59527280c9563):
|
telegraf@4.16.3(patch_hash=4ce8461c7f21d886ddd30d13d2be4fc8c72134fd7ffa5da3b27319c883447eed):
|
||||||
dependencies:
|
dependencies:
|
||||||
'@telegraf/types': 7.1.0
|
'@telegraf/types': 7.1.0
|
||||||
abort-controller: 3.0.0
|
abort-controller: 3.0.0
|
||||||
|
|||||||
Reference in New Issue
Block a user