@mtkruto/node 0.63.6 → 0.63.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -36,6 +36,6 @@ export declare function toInputChannel(inputPeer: Api.InputPeer): Api.inputChann
36
36
  export declare function repr(value: unknown): string | null;
37
37
  export declare const UPLOAD_POOL_SIZE = 3;
38
38
  export declare const UPLOAD_REQUEST_PER_CONNECTION = 2;
39
- export declare const DOWNLOAD_POOL_SIZE = 1;
40
- export declare const DOWNLOAD_REQUEST_PER_CONNECTION = 1;
39
+ export declare const DOWNLOAD_POOL_SIZE = 3;
40
+ export declare const DOWNLOAD_REQUEST_PER_CONNECTION = 2;
41
41
  //# sourceMappingURL=0_utilities.d.ts.map
@@ -192,5 +192,5 @@ export function repr(value) {
192
192
  }
193
193
  export const UPLOAD_POOL_SIZE = 3;
194
194
  export const UPLOAD_REQUEST_PER_CONNECTION = 2;
195
- export const DOWNLOAD_POOL_SIZE = 1;
196
- export const DOWNLOAD_REQUEST_PER_CONNECTION = 1;
195
+ export const DOWNLOAD_POOL_SIZE = 3;
196
+ export const DOWNLOAD_REQUEST_PER_CONNECTION = 2;
@@ -1 +1 @@
1
- {"version":3,"file":"2_file_manager.d.ts","sourceRoot":"","sources":["../../src/client/2_file_manager.ts"],"names":[],"mappings":"AAyBA,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAEjC,OAAO,EAA+C,UAAU,EAA8C,OAAO,EAAkB,MAAM,eAAe,CAAC;AAE7J,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAE9D,OAAO,EAAE,CAAC,EAAE,MAAM,cAAc,CAAC;AAEjC,qBAAa,WAAW;;gBAOV,CAAC,EAAE,CAAC;IAOV,MAAM,CAAC,IAAI,EAAE,UAAU,EAAE,MAAM,CAAC,EAAE,aAAa,EAAE,SAAS,CAAC,EAAE,IAAI,GAAG,CAAC,CAAC,IAAI,EAAE,MAAM,KA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AAC,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM;IAevD,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,MAAM;IAY7B,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,cAAc;IAmDjD,iBAAiB,CAAC,eAAe,EAAE,GAAG,CAAC,iBAAiB,EAAE,IAAI,SAAI;IAalE,sBAAsB,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,EAAE;CA6CnD"}
@@ -9,7 +9,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
9
9
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
10
10
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
11
11
  };
12
- var _FileManager_instances, _a, _FileManager_c, _FileManager_Lupload, _FileManager_UPLOAD_MAX_CHUNK_SIZE, _FileManager_DOWNLOAD_MAX_CHUNK_SIZE, _FileManager_BIG_FILE_THRESHOLD, _FileManager_uploadStream, _FileManager_uploadBuffer, _FileManager_uploadPart, _FileManager_handleError, _FileManager_getFileContents, _FileManager_CUSTOM_EMOJI_TTL;
12
+ var _FileManager_instances, _a, _FileManager_c, _FileManager_Lupload, _FileManager_UPLOAD_MAX_CHUNK_SIZE, _FileManager_DOWNLOAD_MAX_CHUNK_SIZE, _FileManager_BIG_FILE_THRESHOLD, _FileManager_uploadStream, _FileManager_uploadBuffer, _FileManager_uploadPart, _FileManager_handleError, _FileManager_getFileContents, _FileManager_downloadPart, _FileManager_CUSTOM_EMOJI_TTL;
13
13
  /**
14
14
  * MTKruto - Cross-runtime JavaScript library for building Telegram clients
15
15
  * Copyright (C) 2023-2025 Roj <https://roj.im/>
@@ -37,7 +37,7 @@ import { Api } from "../2_tl.js";
37
37
  import { getDc } from "../3_transport.js";
38
38
  import { constructSticker, deserializeFileId, FileType, PhotoSourceType, serializeFileId, toUniqueFileId } from "../3_types.js";
39
39
  import { STICKER_SET_NAME_TTL } from "../4_constants.js";
40
- import { UPLOAD_POOL_SIZE, UPLOAD_REQUEST_PER_CONNECTION } from "./0_utilities.js";
40
+ import { DOWNLOAD_POOL_SIZE, DOWNLOAD_REQUEST_PER_CONNECTION, UPLOAD_POOL_SIZE, UPLOAD_REQUEST_PER_CONNECTION } from "./0_utilities.js";
41
41
  export class FileManager {
42
42
  constructor(c) {
43
43
  _FileManager_instances.add(this);
@@ -99,50 +99,24 @@ export class FileManager {
99
99
  let offset = params?.offset ? BigInt(params.offset) : 0n;
100
100
  let part = 0;
101
101
  let ms = 0.05;
102
+ let promises = new Array();
102
103
  while (true) {
103
- signal?.throwIfAborted();
104
- let retryIn = 1;
105
- let errorCount = 0;
106
- try {
107
- const file = await __classPrivateFieldGet(this, _FileManager_c, "f").invoke({ _: "upload.getFile", location, offset, limit }, { dc, type: "download" });
108
- signal?.throwIfAborted();
109
- if (Api.is("upload.file", file)) {
110
- yield file.bytes;
111
- if (id != null) {
112
- await __classPrivateFieldGet(this, _FileManager_c, "f").storage.saveFilePart(id, part, file.bytes);
113
- signal?.throwIfAborted();
114
- }
115
- ++part;
116
- if (file.bytes.length < limit) {
117
- if (id != null) {
118
- await __classPrivateFieldGet(this, _FileManager_c, "f").storage.setFilePartCount(id, part + 1, chunkSize);
119
- signal?.throwIfAborted();
120
- }
121
- break;
122
- }
123
- else {
124
- offset += BigInt(file.bytes.length);
125
- }
126
- }
127
- else {
128
- unreachable();
129
- }
104
+ if (part > 0) {
130
105
  await delay(ms);
131
106
  ms = Math.max(ms * .8, 0.003);
132
107
  }
133
- catch (err) {
134
- if (typeof err === "object" && err instanceof AssertionError) {
135
- throw err;
136
- }
137
- ++errorCount;
138
- if (errorCount > 20) {
139
- retryIn = 0;
140
- }
141
- await __classPrivateFieldGet(this, _FileManager_instances, "m", _FileManager_handleError).call(this, err, retryIn, `[${id}-${part + 1}]`);
142
- signal?.throwIfAborted();
143
- retryIn += 2;
144
- if (retryIn > 11) {
145
- retryIn = 11;
108
+ promises.push(__classPrivateFieldGet(this, _FileManager_instances, "m", _FileManager_downloadPart).call(this, dc, location, part++, offset, limit, id, signal));
109
+ offset += BigInt(limit);
110
+ if (promises.length == DOWNLOAD_POOL_SIZE * DOWNLOAD_REQUEST_PER_CONNECTION) {
111
+ const chunks = await Promise.all(promises);
112
+ promises = [];
113
+ for (const chunk of chunks) {
114
+ if (chunk.length) {
115
+ yield chunk;
116
+ }
117
+ if (chunk.length < limit) {
118
+ return;
119
+ }
146
120
  }
147
121
  }
148
122
  }
@@ -455,6 +429,50 @@ _a = FileManager, _FileManager_c = new WeakMap(), _FileManager_Lupload = new Wea
455
429
  }
456
430
  }
457
431
  return { size: params?.fileSize ? params.fileSize : size, name, contents };
432
+ }, _FileManager_downloadPart = async function _FileManager_downloadPart(dc, location, index, offset, limit, id, signal) {
433
+ while (true) {
434
+ signal?.throwIfAborted();
435
+ let retryIn = 1;
436
+ let errorCount = 0;
437
+ try {
438
+ const file = await __classPrivateFieldGet(this, _FileManager_c, "f").invoke({ _: "upload.getFile", location, offset, limit }, { dc, type: "download" });
439
+ signal?.throwIfAborted();
440
+ if (Api.is("upload.file", file)) {
441
+ if (id != null) {
442
+ await __classPrivateFieldGet(this, _FileManager_c, "f").storage.saveFilePart(id, index, file.bytes);
443
+ signal?.throwIfAborted();
444
+ }
445
+ if (file.bytes.length < limit) {
446
+ if (id != null) {
447
+ await __classPrivateFieldGet(this, _FileManager_c, "f").storage.setFilePartCount(id, index + 1, limit);
448
+ signal?.throwIfAborted();
449
+ }
450
+ }
451
+ else {
452
+ offset += BigInt(file.bytes.length);
453
+ }
454
+ return file.bytes;
455
+ }
456
+ else {
457
+ unreachable();
458
+ }
459
+ }
460
+ catch (err) {
461
+ if (typeof err === "object" && err instanceof AssertionError) {
462
+ throw err;
463
+ }
464
+ ++errorCount;
465
+ if (errorCount > 20) {
466
+ retryIn = 0;
467
+ }
468
+ await __classPrivateFieldGet(this, _FileManager_instances, "m", _FileManager_handleError).call(this, err, retryIn, `[${id}-${index + 1}]`);
469
+ signal?.throwIfAborted();
470
+ retryIn += 2;
471
+ if (retryIn > 11) {
472
+ retryIn = 11;
473
+ }
474
+ }
475
+ }
458
476
  };
459
477
  _FileManager_UPLOAD_MAX_CHUNK_SIZE = { value: 512 * kilobyte };
460
478
  _FileManager_DOWNLOAD_MAX_CHUNK_SIZE = { value: 1 * megabyte };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mtkruto/node",
3
- "version": "0.63.6",
3
+ "version": "0.63.7",
4
4
  "description": "MTKruto for Node.js",
5
5
  "author": "Roj <rojvv@icloud.com>",
6
6
  "repository": {
@@ -36,6 +36,6 @@ export declare function toInputChannel(inputPeer: Api.InputPeer): Api.inputChann
36
36
  export declare function repr(value: unknown): string | null;
37
37
  export declare const UPLOAD_POOL_SIZE = 3;
38
38
  export declare const UPLOAD_REQUEST_PER_CONNECTION = 2;
39
- export declare const DOWNLOAD_POOL_SIZE = 1;
40
- export declare const DOWNLOAD_REQUEST_PER_CONNECTION = 1;
39
+ export declare const DOWNLOAD_POOL_SIZE = 3;
40
+ export declare const DOWNLOAD_REQUEST_PER_CONNECTION = 2;
41
41
  //# sourceMappingURL=0_utilities.d.ts.map
@@ -211,5 +211,5 @@ function repr(value) {
211
211
  }
212
212
  exports.UPLOAD_POOL_SIZE = 3;
213
213
  exports.UPLOAD_REQUEST_PER_CONNECTION = 2;
214
- exports.DOWNLOAD_POOL_SIZE = 1;
215
- exports.DOWNLOAD_REQUEST_PER_CONNECTION = 1;
214
+ exports.DOWNLOAD_POOL_SIZE = 3;
215
+ exports.DOWNLOAD_REQUEST_PER_CONNECTION = 2;
@@ -1 +1 @@
1
- {"version":3,"file":"2_file_manager.d.ts","sourceRoot":"","sources":["../../src/client/2_file_manager.ts"],"names":[],"mappings":"AAyBA,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAEjC,OAAO,EAA+C,UAAU,EAA8C,OAA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,EAAE,MAAM,CAAC,EAAE,aAAa,EAAE,SAAS,CAAC,EAAE,IAAI,GAAG,CAAC,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC,EAAE,WAAW,UAAO,GAAG,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC;IA6M1I,aAAa,CAAC,QAAQ,EAAE,GAAG,CAAC,iBAAiB,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,cAAc,GAAG,SAAS;IA8FtG,MAAM,CAAC,iBAAiB,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM;IAevD,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,MAAM;IAY7B,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,cAAc;IAmDjD,iBAAiB,CAAC,eAAe,EAAE,GAAG,CAAC,iBAAiB,EAAE,IAAI,SAAI;IAalE,sBAAsB,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,EAAE;CA6CnD"}
@@ -33,7 +33,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
33
33
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
34
34
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
35
35
  };
36
- var _FileManager_instances, _a, _FileManager_c, _FileManager_Lupload, _FileManager_UPLOAD_MAX_CHUNK_SIZE, _FileManager_DOWNLOAD_MAX_CHUNK_SIZE, _FileManager_BIG_FILE_THRESHOLD, _FileManager_uploadStream, _FileManager_uploadBuffer, _FileManager_uploadPart, _FileManager_handleError, _FileManager_getFileContents, _FileManager_CUSTOM_EMOJI_TTL;
36
+ var _FileManager_instances, _a, _FileManager_c, _FileManager_Lupload, _FileManager_UPLOAD_MAX_CHUNK_SIZE, _FileManager_DOWNLOAD_MAX_CHUNK_SIZE, _FileManager_BIG_FILE_THRESHOLD, _FileManager_uploadStream, _FileManager_uploadBuffer, _FileManager_uploadPart, _FileManager_handleError, _FileManager_getFileContents, _FileManager_downloadPart, _FileManager_CUSTOM_EMOJI_TTL;
37
37
  Object.defineProperty(exports, "__esModule", { value: true });
38
38
  exports.FileManager = void 0;
39
39
  /**
@@ -125,50 +125,24 @@ class FileManager {
125
125
  let offset = params?.offset ? BigInt(params.offset) : 0n;
126
126
  let part = 0;
127
127
  let ms = 0.05;
128
+ let promises = new Array();
128
129
  while (true) {
129
- signal?.throwIfAborted();
130
- let retryIn = 1;
131
- let errorCount = 0;
132
- try {
133
- const file = await __classPrivateFieldGet(this, _FileManager_c, "f").invoke({ _: "upload.getFile", location, offset, limit }, { dc, type: "download" });
134
- signal?.throwIfAborted();
135
- if (_2_tl_js_1.Api.is("upload.file", file)) {
136
- yield file.bytes;
137
- if (id != null) {
138
- await __classPrivateFieldGet(this, _FileManager_c, "f").storage.saveFilePart(id, part, file.bytes);
139
- signal?.throwIfAborted();
140
- }
141
- ++part;
142
- if (file.bytes.length < limit) {
143
- if (id != null) {
144
- await __classPrivateFieldGet(this, _FileManager_c, "f").storage.setFilePartCount(id, part + 1, chunkSize);
145
- signal?.throwIfAborted();
146
- }
147
- break;
148
- }
149
- else {
150
- offset += BigInt(file.bytes.length);
151
- }
152
- }
153
- else {
154
- (0, _0_deps_js_1.unreachable)();
155
- }
130
+ if (part > 0) {
156
131
  await (0, _0_deps_js_1.delay)(ms);
157
132
  ms = Math.max(ms * .8, 0.003);
158
133
  }
159
- catch (err) {
160
- if (typeof err === "object" && err instanceof _0_deps_js_1.AssertionError) {
161
- throw err;
162
- }
163
- ++errorCount;
164
- if (errorCount > 20) {
165
- retryIn = 0;
166
- }
167
- await __classPrivateFieldGet(this, _FileManager_instances, "m", _FileManager_handleError).call(this, err, retryIn, `[${id}-${part + 1}]`);
168
- signal?.throwIfAborted();
169
- retryIn += 2;
170
- if (retryIn > 11) {
171
- retryIn = 11;
134
+ promises.push(__classPrivateFieldGet(this, _FileManager_instances, "m", _FileManager_downloadPart).call(this, dc, location, part++, offset, limit, id, signal));
135
+ offset += BigInt(limit);
136
+ if (promises.length == _0_utilities_js_1.DOWNLOAD_POOL_SIZE * _0_utilities_js_1.DOWNLOAD_REQUEST_PER_CONNECTION) {
137
+ const chunks = await Promise.all(promises);
138
+ promises = [];
139
+ for (const chunk of chunks) {
140
+ if (chunk.length) {
141
+ yield chunk;
142
+ }
143
+ if (chunk.length < limit) {
144
+ return;
145
+ }
172
146
  }
173
147
  }
174
148
  }
@@ -482,6 +456,50 @@ _a = FileManager, _FileManager_c = new WeakMap(), _FileManager_Lupload = new Wea
482
456
  }
483
457
  }
484
458
  return { size: params?.fileSize ? params.fileSize : size, name, contents };
459
+ }, _FileManager_downloadPart = async function _FileManager_downloadPart(dc, location, index, offset, limit, id, signal) {
460
+ while (true) {
461
+ signal?.throwIfAborted();
462
+ let retryIn = 1;
463
+ let errorCount = 0;
464
+ try {
465
+ const file = await __classPrivateFieldGet(this, _FileManager_c, "f").invoke({ _: "upload.getFile", location, offset, limit }, { dc, type: "download" });
466
+ signal?.throwIfAborted();
467
+ if (_2_tl_js_1.Api.is("upload.file", file)) {
468
+ if (id != null) {
469
+ await __classPrivateFieldGet(this, _FileManager_c, "f").storage.saveFilePart(id, index, file.bytes);
470
+ signal?.throwIfAborted();
471
+ }
472
+ if (file.bytes.length < limit) {
473
+ if (id != null) {
474
+ await __classPrivateFieldGet(this, _FileManager_c, "f").storage.setFilePartCount(id, index + 1, limit);
475
+ signal?.throwIfAborted();
476
+ }
477
+ }
478
+ else {
479
+ offset += BigInt(file.bytes.length);
480
+ }
481
+ return file.bytes;
482
+ }
483
+ else {
484
+ (0, _0_deps_js_1.unreachable)();
485
+ }
486
+ }
487
+ catch (err) {
488
+ if (typeof err === "object" && err instanceof _0_deps_js_1.AssertionError) {
489
+ throw err;
490
+ }
491
+ ++errorCount;
492
+ if (errorCount > 20) {
493
+ retryIn = 0;
494
+ }
495
+ await __classPrivateFieldGet(this, _FileManager_instances, "m", _FileManager_handleError).call(this, err, retryIn, `[${id}-${index + 1}]`);
496
+ signal?.throwIfAborted();
497
+ retryIn += 2;
498
+ if (retryIn > 11) {
499
+ retryIn = 11;
500
+ }
501
+ }
502
+ }
485
503
  };
486
504
  _FileManager_UPLOAD_MAX_CHUNK_SIZE = { value: 512 * _1_utilities_js_1.kilobyte };
487
505
  _FileManager_DOWNLOAD_MAX_CHUNK_SIZE = { value: 1 * _1_utilities_js_1.megabyte };