@mtcute/node 0.25.8 → 0.26.1

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.
package/client.cjs CHANGED
@@ -6,7 +6,6 @@ if (typeof globalThis !== "undefined" && !globalThis._MTCUTE_CJS_DEPRECATION_WAR
6
6
  "use strict";
7
7
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
8
8
  const node_readline = require("node:readline");
9
- const utils = require("@fuman/utils");
10
9
  const client_js = require("@mtcute/core/client.js");
11
10
  const downloadFile = require("./methods/download-file.cjs");
12
11
  const downloadNodeStream = require("./methods/download-node-stream.cjs");
@@ -77,13 +76,6 @@ class TelegramClient extends client_js.TelegramClient {
77
76
  return user;
78
77
  });
79
78
  }
80
- run(params, then) {
81
- if (typeof params === "function") {
82
- then = params;
83
- params = {};
84
- }
85
- this.start(params).then(then).catch((err) => this.onError.emit(utils.unknownToError(err)));
86
- }
87
79
  downloadToFile(filename, location, params) {
88
80
  return downloadFile.downloadToFile(this, filename, location, params);
89
81
  }
package/client.d.cts CHANGED
@@ -34,7 +34,6 @@ export declare class TelegramClient extends TelegramClientBase {
34
34
  input(text: string): Promise<string>;
35
35
  destroy(): Promise<void>;
36
36
  start(params?: Parameters<TelegramClientBase['start']>[0]): Promise<User>;
37
- run(params: Parameters<TelegramClient['start']>[0] | ((user: User) => void | Promise<void>), then?: (user: User) => void | Promise<void>): void;
38
37
  downloadToFile(filename: string, location: FileDownloadLocation, params?: FileDownloadParameters | undefined): Promise<void>;
39
38
  downloadAsNodeStream(location: FileDownloadLocation, params?: FileDownloadParameters | undefined): Readable;
40
39
  }
package/client.d.ts CHANGED
@@ -34,7 +34,6 @@ export declare class TelegramClient extends TelegramClientBase {
34
34
  input(text: string): Promise<string>;
35
35
  destroy(): Promise<void>;
36
36
  start(params?: Parameters<TelegramClientBase['start']>[0]): Promise<User>;
37
- run(params: Parameters<TelegramClient['start']>[0] | ((user: User) => void | Promise<void>), then?: (user: User) => void | Promise<void>): void;
38
37
  downloadToFile(filename: string, location: FileDownloadLocation, params?: FileDownloadParameters | undefined): Promise<void>;
39
38
  downloadAsNodeStream(location: FileDownloadLocation, params?: FileDownloadParameters | undefined): Readable;
40
39
  }
package/client.js CHANGED
@@ -1,5 +1,4 @@
1
1
  import { createInterface } from "node:readline";
2
- import { unknownToError } from "@fuman/utils";
3
2
  import { BaseTelegramClient as BaseTelegramClient$1, TelegramClient as TelegramClient$1 } from "@mtcute/core/client.js";
4
3
  import { downloadToFile } from "./methods/download-file.js";
5
4
  import { downloadAsNodeStream } from "./methods/download-node-stream.js";
@@ -70,13 +69,6 @@ class TelegramClient extends TelegramClient$1 {
70
69
  return user;
71
70
  });
72
71
  }
73
- run(params, then) {
74
- if (typeof params === "function") {
75
- then = params;
76
- params = {};
77
- }
78
- this.start(params).then(then).catch((err) => this.onError.emit(unknownToError(err)));
79
- }
80
72
  downloadToFile(filename, location, params) {
81
73
  return downloadToFile(this, filename, location, params);
82
74
  }
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@mtcute/node",
3
3
  "type": "module",
4
- "version": "0.25.8",
4
+ "version": "0.26.1",
5
5
  "description": "Meta-package for Node.js",
6
6
  "license": "MIT",
7
7
  "dependencies": {
8
- "@mtcute/core": "^0.25.8",
9
- "@mtcute/html-parser": "^0.25.8",
10
- "@mtcute/markdown-parser": "^0.25.8",
8
+ "@mtcute/core": "^0.26.1",
9
+ "@mtcute/html-parser": "^0.26.1",
10
+ "@mtcute/markdown-parser": "^0.26.1",
11
11
  "@mtcute/wasm": "^0.24.3",
12
12
  "@fuman/utils": "0.0.15",
13
13
  "@fuman/net": "0.0.15",