@mtkruto/node 0.0.939 → 0.0.940

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.
@@ -46,7 +46,7 @@ export class ConnectionWebSocket {
46
46
  }
47
47
  };
48
48
  this.webSocket.onerror = (err) => {
49
- d("WebSocket error: %O", err);
49
+ d("WebSocket error: %o", err);
50
50
  };
51
51
  }
52
52
  get connected() {
@@ -4,7 +4,7 @@ export declare const publicKeys: Map<bigint, [bigint, bigint]>;
4
4
  export declare const VECTOR_CONSTRUCTOR = 481674261;
5
5
  export declare const DEFAULT_INITIAL_DC: DC;
6
6
  export declare const LAYER = 158;
7
- export declare const DEFAULT_APP_VERSION = "MTKruto 0.0.939";
7
+ export declare const DEFAULT_APP_VERSION = "MTKruto 0.0.940";
8
8
  export declare const DEFAULT_DEVICE_MODEL: string;
9
9
  export declare const DEFAULT_LANG_CODE: string;
10
10
  export declare const DEFAULT_LANG_PACK = "";
package/esm/constants.js CHANGED
@@ -62,7 +62,7 @@ export const publicKeys = new Map([
62
62
  export const VECTOR_CONSTRUCTOR = 0x1CB5C415;
63
63
  export const DEFAULT_INITIAL_DC = "2-test";
64
64
  export const LAYER = 158;
65
- export const DEFAULT_APP_VERSION = "MTKruto 0.0.939";
65
+ export const DEFAULT_APP_VERSION = "MTKruto 0.0.940";
66
66
  // @ts-ignore: lib
67
67
  export const DEFAULT_DEVICE_MODEL = typeof dntShim.Deno === "undefined" ? typeof navigator === "undefined" ? typeof process === "undefined" ? "Unknown" : process.platform + "-" + process.arch : navigator.userAgent.split(" ")[0] : dntShim.Deno.build.os + "-" + dntShim.Deno.build.arch;
68
68
  export const DEFAULT_LANG_CODE = typeof navigator === "undefined" ? "en" : navigator.language.split("-")[0];
@@ -61,4 +61,4 @@ export declare namespace KeyboardButton {
61
61
  /** This object represents one button of the reply keyboard. For simple text buttons, _String_ can be used instead of this object to specify the button text. The optional fields _web_app_, _request_user_, _request_chat_, _request_contact_, _request_location_, and _request_poll_ are mutually exclusive. */
62
62
  export type KeyboardButton = KeyboardButton.Text | KeyboardButton.RequestUser | KeyboardButton.RequestChat | KeyboardButton.RequestContact | KeyboardButton.RequestLocation | KeyboardButton.RequestPoll | KeyboardButton.WebApp;
63
63
  export declare function constructKeyboardButton(button_: types.TypeKeyboardButton): KeyboardButton;
64
- export declare function keyboardButtonToTlObject(button: KeyboardButton): types.KeyboardButtonRequestPhone | types.KeyboardButtonRequestGeoLocation | types.KeyboardButtonRequestPoll | types.KeyboardButtonWebView | types.KeyboardButtonRequestPeer;
64
+ export declare function keyboardButtonToTlObject(button: KeyboardButton): types.KeyboardButton | types.KeyboardButtonRequestPhone | types.KeyboardButtonRequestGeoLocation | types.KeyboardButtonRequestPoll | types.KeyboardButtonWebView | types.KeyboardButtonRequestPeer;
@@ -128,6 +128,6 @@ export function keyboardButtonToTlObject(button) {
128
128
  return new types.KeyboardButtonWebView({ text: button.text, url: button.webApp.url });
129
129
  }
130
130
  else {
131
- UNREACHABLE();
131
+ return new types.KeyboardButton({ text: button.text });
132
132
  }
133
133
  }
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "module": "./esm/mod.js",
3
3
  "main": "./script/mod.js",
4
4
  "name": "@mtkruto/node",
5
- "version": "0.0.939",
5
+ "version": "0.0.940",
6
6
  "description": "MTKruto for Node.js",
7
7
  "author": "Roj <rojvv@icloud.com>",
8
8
  "license": "LGPL-3.0-or-later",
@@ -72,7 +72,7 @@ class ConnectionWebSocket {
72
72
  }
73
73
  };
74
74
  this.webSocket.onerror = (err) => {
75
- d("WebSocket error: %O", err);
75
+ d("WebSocket error: %o", err);
76
76
  };
77
77
  }
78
78
  get connected() {
@@ -4,7 +4,7 @@ export declare const publicKeys: Map<bigint, [bigint, bigint]>;
4
4
  export declare const VECTOR_CONSTRUCTOR = 481674261;
5
5
  export declare const DEFAULT_INITIAL_DC: DC;
6
6
  export declare const LAYER = 158;
7
- export declare const DEFAULT_APP_VERSION = "MTKruto 0.0.939";
7
+ export declare const DEFAULT_APP_VERSION = "MTKruto 0.0.940";
8
8
  export declare const DEFAULT_DEVICE_MODEL: string;
9
9
  export declare const DEFAULT_LANG_CODE: string;
10
10
  export declare const DEFAULT_LANG_PACK = "";
@@ -88,7 +88,7 @@ exports.publicKeys = new Map([
88
88
  exports.VECTOR_CONSTRUCTOR = 0x1CB5C415;
89
89
  exports.DEFAULT_INITIAL_DC = "2-test";
90
90
  exports.LAYER = 158;
91
- exports.DEFAULT_APP_VERSION = "MTKruto 0.0.939";
91
+ exports.DEFAULT_APP_VERSION = "MTKruto 0.0.940";
92
92
  // @ts-ignore: lib
93
93
  exports.DEFAULT_DEVICE_MODEL = typeof dntShim.Deno === "undefined" ? typeof navigator === "undefined" ? typeof process === "undefined" ? "Unknown" : process.platform + "-" + process.arch : navigator.userAgent.split(" ")[0] : dntShim.Deno.build.os + "-" + dntShim.Deno.build.arch;
94
94
  exports.DEFAULT_LANG_CODE = typeof navigator === "undefined" ? "en" : navigator.language.split("-")[0];
@@ -61,4 +61,4 @@ export declare namespace KeyboardButton {
61
61
  /** This object represents one button of the reply keyboard. For simple text buttons, _String_ can be used instead of this object to specify the button text. The optional fields _web_app_, _request_user_, _request_chat_, _request_contact_, _request_location_, and _request_poll_ are mutually exclusive. */
62
62
  export type KeyboardButton = KeyboardButton.Text | KeyboardButton.RequestUser | KeyboardButton.RequestChat | KeyboardButton.RequestContact | KeyboardButton.RequestLocation | KeyboardButton.RequestPoll | KeyboardButton.WebApp;
63
63
  export declare function constructKeyboardButton(button_: types.TypeKeyboardButton): KeyboardButton;
64
- export declare function keyboardButtonToTlObject(button: KeyboardButton): types.KeyboardButtonRequestPhone | types.KeyboardButtonRequestGeoLocation | types.KeyboardButtonRequestPoll | types.KeyboardButtonWebView | types.KeyboardButtonRequestPeer;
64
+ export declare function keyboardButtonToTlObject(button: KeyboardButton): types.KeyboardButton | types.KeyboardButtonRequestPhone | types.KeyboardButtonRequestGeoLocation | types.KeyboardButtonRequestPoll | types.KeyboardButtonWebView | types.KeyboardButtonRequestPeer;
@@ -155,7 +155,7 @@ function keyboardButtonToTlObject(button) {
155
155
  return new types.KeyboardButtonWebView({ text: button.text, url: button.webApp.url });
156
156
  }
157
157
  else {
158
- (0, _0_control_js_1.UNREACHABLE)();
158
+ return new types.KeyboardButton({ text: button.text });
159
159
  }
160
160
  }
161
161
  exports.keyboardButtonToTlObject = keyboardButtonToTlObject;