@mtkruto/node 0.0.996 → 0.0.998
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/esm/0_deps.d.ts +2 -2
- package/esm/0_deps.js +2 -2
- package/esm/3_types.d.ts +1 -0
- package/esm/3_types.js +1 -0
- package/esm/4_constants.d.ts +1 -1
- package/esm/4_constants.js +1 -1
- package/esm/client/0_html.js +1 -1
- package/esm/client/3_types.d.ts +3 -2
- package/esm/client/3_types.js +1 -1
- package/esm/client/4_client.d.ts +11 -4
- package/esm/client/4_client.js +60 -9
- package/esm/deps/deno.land/std@0.201.0/assert/assert_greater.d.ts +5 -0
- package/esm/deps/deno.land/std@0.201.0/assert/assert_greater.js +14 -0
- package/esm/deps/deno.land/std@0.201.0/assert/assert_greater_or_equal.d.ts +5 -0
- package/esm/deps/deno.land/std@0.201.0/assert/assert_greater_or_equal.js +14 -0
- package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_instance_of.js +2 -2
- package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_is_error.js +4 -1
- package/esm/deps/deno.land/std@0.201.0/assert/assert_less.d.ts +5 -0
- package/esm/deps/deno.land/std@0.201.0/assert/assert_less.js +14 -0
- package/esm/deps/deno.land/std@0.201.0/assert/assert_less_or_equal.d.ts +5 -0
- package/esm/deps/deno.land/std@0.201.0/assert/assert_less_or_equal.js +14 -0
- package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/mod.d.ts +4 -0
- package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/mod.js +4 -0
- package/{script/deps/deno.land/std@0.200.0 → esm/deps/deno.land/std@0.201.0}/fmt/colors.d.ts +8 -1
- package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/fmt/colors.js +8 -1
- package/esm/tl/3_tl_reader.d.ts +1 -1
- package/esm/tl/3_tl_reader.js +6 -0
- package/esm/tl/4_tl_writer.js +8 -0
- package/esm/tl/6_message.js +3 -0
- package/esm/types/0_chat_action.d.ts +1 -0
- package/esm/types/0_chat_action.js +1 -0
- package/esm/types/0_message_entity.d.ts +10 -10
- package/esm/types/0_message_entity.js +12 -12
- package/esm/types/1_chat.d.ts +5 -10
- package/esm/types/1_chat.js +4 -11
- package/esm/types/1_sticker.d.ts +2 -2
- package/esm/types/1_sticker.js +1 -1
- package/esm/types/3_message.js +3 -3
- package/package.json +1 -1
- package/script/0_deps.d.ts +2 -2
- package/script/0_deps.js +2 -2
- package/script/3_types.d.ts +1 -0
- package/script/3_types.js +1 -0
- package/script/4_constants.d.ts +1 -1
- package/script/4_constants.js +1 -1
- package/script/client/0_html.js +1 -1
- package/script/client/3_types.d.ts +3 -2
- package/script/client/3_types.js +3 -0
- package/script/client/4_client.d.ts +11 -4
- package/script/client/4_client.js +60 -9
- package/script/deps/deno.land/std@0.201.0/assert/assert_greater.d.ts +5 -0
- package/script/deps/deno.land/std@0.201.0/assert/assert_greater.js +18 -0
- package/script/deps/deno.land/std@0.201.0/assert/assert_greater_or_equal.d.ts +5 -0
- package/script/deps/deno.land/std@0.201.0/assert/assert_greater_or_equal.js +18 -0
- package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_instance_of.js +2 -2
- package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_is_error.js +4 -1
- package/script/deps/deno.land/std@0.201.0/assert/assert_less.d.ts +5 -0
- package/script/deps/deno.land/std@0.201.0/assert/assert_less.js +18 -0
- package/script/deps/deno.land/std@0.201.0/assert/assert_less_or_equal.d.ts +5 -0
- package/script/deps/deno.land/std@0.201.0/assert/assert_less_or_equal.js +18 -0
- package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/mod.d.ts +4 -0
- package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/mod.js +4 -0
- package/{esm/deps/deno.land/std@0.200.0 → script/deps/deno.land/std@0.201.0}/fmt/colors.d.ts +8 -1
- package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/fmt/colors.js +10 -3
- package/script/tl/3_tl_reader.d.ts +1 -1
- package/script/tl/3_tl_reader.js +6 -0
- package/script/tl/4_tl_writer.js +8 -0
- package/script/tl/6_message.js +3 -0
- package/script/types/0_chat_action.d.ts +1 -0
- package/script/types/0_chat_action.js +2 -0
- package/script/types/0_message_entity.d.ts +10 -10
- package/script/types/0_message_entity.js +12 -12
- package/script/types/1_chat.d.ts +5 -10
- package/script/types/1_chat.js +5 -12
- package/script/types/1_sticker.d.ts +2 -2
- package/script/types/1_sticker.js +1 -1
- package/script/types/3_message.js +2 -2
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/_constants.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/_constants.js +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/_diff.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/_diff.js +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/_format.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/_format.js +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert.js +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_almost_equals.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_almost_equals.js +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_array_includes.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_array_includes.js +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_equals.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_equals.js +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_exists.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_exists.js +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_false.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_false.js +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_instance_of.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_is_error.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_match.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_match.js +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_not_equals.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_not_equals.js +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_not_instance_of.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_not_instance_of.js +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_not_match.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_not_match.js +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_not_strict_equals.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_not_strict_equals.js +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_object_match.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_object_match.js +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_rejects.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_rejects.js +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_strict_equals.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_strict_equals.js +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_string_includes.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_string_includes.js +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_throws.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_throws.js +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assertion_error.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assertion_error.js +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/equal.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/equal.js +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/fail.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/fail.js +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/unimplemented.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/unimplemented.js +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/unreachable.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/unreachable.js +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/encoding/base64.d.ts +0 -0
- /package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/encoding/base64.js +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/_constants.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/_constants.js +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/_diff.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/_diff.js +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/_format.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/_format.js +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert.js +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_almost_equals.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_almost_equals.js +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_array_includes.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_array_includes.js +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_equals.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_equals.js +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_exists.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_exists.js +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_false.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_false.js +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_instance_of.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_is_error.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_match.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_match.js +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_not_equals.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_not_equals.js +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_not_instance_of.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_not_instance_of.js +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_not_match.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_not_match.js +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_not_strict_equals.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_not_strict_equals.js +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_object_match.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_object_match.js +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_rejects.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_rejects.js +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_strict_equals.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_strict_equals.js +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_string_includes.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_string_includes.js +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_throws.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_throws.js +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assertion_error.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assertion_error.js +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/equal.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/equal.js +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/fail.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/fail.js +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/unimplemented.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/unimplemented.js +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/unreachable.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/unreachable.js +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/encoding/base64.d.ts +0 -0
- /package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/encoding/base64.js +0 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.assertLessOrEqual = void 0;
|
|
4
|
+
// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
|
|
5
|
+
const _format_js_1 = require("./_format.js");
|
|
6
|
+
const assertion_error_js_1 = require("./assertion_error.js");
|
|
7
|
+
/**
|
|
8
|
+
* Make an assertion that `actual` is less than or equal to `expected`.
|
|
9
|
+
* If not then throw.
|
|
10
|
+
*/
|
|
11
|
+
function assertLessOrEqual(actual, expected, msg) {
|
|
12
|
+
if (actual <= expected)
|
|
13
|
+
return;
|
|
14
|
+
const actualString = (0, _format_js_1.format)(actual);
|
|
15
|
+
const expectedString = (0, _format_js_1.format)(expected);
|
|
16
|
+
throw new assertion_error_js_1.AssertionError(msg ?? `Expect ${actualString} <= ${expectedString}`);
|
|
17
|
+
}
|
|
18
|
+
exports.assertLessOrEqual = assertLessOrEqual;
|
|
@@ -12,8 +12,12 @@ export * from "./assert_array_includes.js";
|
|
|
12
12
|
export * from "./assert_equals.js";
|
|
13
13
|
export * from "./assert_exists.js";
|
|
14
14
|
export * from "./assert_false.js";
|
|
15
|
+
export * from "./assert_greater_or_equal.js";
|
|
16
|
+
export * from "./assert_greater.js";
|
|
15
17
|
export * from "./assert_instance_of.js";
|
|
16
18
|
export * from "./assert_is_error.js";
|
|
19
|
+
export * from "./assert_less_or_equal.js";
|
|
20
|
+
export * from "./assert_less.js";
|
|
17
21
|
export * from "./assert_match.js";
|
|
18
22
|
export * from "./assert_not_equals.js";
|
|
19
23
|
export * from "./assert_not_instance_of.js";
|
|
@@ -29,8 +29,12 @@ __exportStar(require("./assert_array_includes.js"), exports);
|
|
|
29
29
|
__exportStar(require("./assert_equals.js"), exports);
|
|
30
30
|
__exportStar(require("./assert_exists.js"), exports);
|
|
31
31
|
__exportStar(require("./assert_false.js"), exports);
|
|
32
|
+
__exportStar(require("./assert_greater_or_equal.js"), exports);
|
|
33
|
+
__exportStar(require("./assert_greater.js"), exports);
|
|
32
34
|
__exportStar(require("./assert_instance_of.js"), exports);
|
|
33
35
|
__exportStar(require("./assert_is_error.js"), exports);
|
|
36
|
+
__exportStar(require("./assert_less_or_equal.js"), exports);
|
|
37
|
+
__exportStar(require("./assert_less.js"), exports);
|
|
34
38
|
__exportStar(require("./assert_match.js"), exports);
|
|
35
39
|
__exportStar(require("./assert_not_equals.js"), exports);
|
|
36
40
|
__exportStar(require("./assert_not_instance_of.js"), exports);
|
package/{esm/deps/deno.land/std@0.200.0 → script/deps/deno.land/std@0.201.0}/fmt/colors.d.ts
RENAMED
|
@@ -262,9 +262,16 @@ export declare function rgb24(str: string, color: number | Rgb): string;
|
|
|
262
262
|
* @param color code
|
|
263
263
|
*/
|
|
264
264
|
export declare function bgRgb24(str: string, color: number | Rgb): string;
|
|
265
|
+
/**
|
|
266
|
+
* @deprecated (will be removed in 1.0.0) Use `stripAnsiCode` instead.
|
|
267
|
+
*
|
|
268
|
+
* Remove ANSI escape codes from the string.
|
|
269
|
+
* @param string to remove ANSI escape codes from
|
|
270
|
+
*/
|
|
271
|
+
export declare const stripColor: typeof stripAnsiCode;
|
|
265
272
|
/**
|
|
266
273
|
* Remove ANSI escape codes from the string.
|
|
267
274
|
* @param string to remove ANSI escape codes from
|
|
268
275
|
*/
|
|
269
|
-
export declare function
|
|
276
|
+
export declare function stripAnsiCode(string: string): string;
|
|
270
277
|
export {};
|
|
@@ -27,7 +27,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
27
27
|
return result;
|
|
28
28
|
};
|
|
29
29
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
|
-
exports.stripColor = exports.bgRgb24 = exports.rgb24 = exports.bgRgb8 = exports.rgb8 = exports.bgBrightWhite = exports.bgBrightCyan = exports.bgBrightMagenta = exports.bgBrightBlue = exports.bgBrightYellow = exports.bgBrightGreen = exports.bgBrightRed = exports.bgBrightBlack = exports.bgWhite = exports.bgCyan = exports.bgMagenta = exports.bgBlue = exports.bgYellow = exports.bgGreen = exports.bgRed = exports.bgBlack = exports.brightWhite = exports.brightCyan = exports.brightMagenta = exports.brightBlue = exports.brightYellow = exports.brightGreen = exports.brightRed = exports.brightBlack = exports.gray = exports.white = exports.cyan = exports.magenta = exports.blue = exports.yellow = exports.green = exports.red = exports.black = exports.strikethrough = exports.hidden = exports.inverse = exports.underline = exports.italic = exports.dim = exports.bold = exports.reset = exports.getColorEnabled = exports.setColorEnabled = void 0;
|
|
30
|
+
exports.stripAnsiCode = exports.stripColor = exports.bgRgb24 = exports.rgb24 = exports.bgRgb8 = exports.rgb8 = exports.bgBrightWhite = exports.bgBrightCyan = exports.bgBrightMagenta = exports.bgBrightBlue = exports.bgBrightYellow = exports.bgBrightGreen = exports.bgBrightRed = exports.bgBrightBlack = exports.bgWhite = exports.bgCyan = exports.bgMagenta = exports.bgBlue = exports.bgYellow = exports.bgGreen = exports.bgRed = exports.bgBlack = exports.brightWhite = exports.brightCyan = exports.brightMagenta = exports.brightBlue = exports.brightYellow = exports.brightGreen = exports.brightRed = exports.brightBlack = exports.gray = exports.white = exports.cyan = exports.magenta = exports.blue = exports.yellow = exports.green = exports.red = exports.black = exports.strikethrough = exports.hidden = exports.inverse = exports.underline = exports.italic = exports.dim = exports.bold = exports.reset = exports.getColorEnabled = exports.setColorEnabled = void 0;
|
|
31
31
|
/**
|
|
32
32
|
* String formatters and utilities for dealing with ANSI color codes.
|
|
33
33
|
*
|
|
@@ -538,11 +538,18 @@ const ANSI_PATTERN = new RegExp([
|
|
|
538
538
|
"[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)",
|
|
539
539
|
"(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))",
|
|
540
540
|
].join("|"), "g");
|
|
541
|
+
/**
|
|
542
|
+
* @deprecated (will be removed in 1.0.0) Use `stripAnsiCode` instead.
|
|
543
|
+
*
|
|
544
|
+
* Remove ANSI escape codes from the string.
|
|
545
|
+
* @param string to remove ANSI escape codes from
|
|
546
|
+
*/
|
|
547
|
+
exports.stripColor = stripAnsiCode;
|
|
541
548
|
/**
|
|
542
549
|
* Remove ANSI escape codes from the string.
|
|
543
550
|
* @param string to remove ANSI escape codes from
|
|
544
551
|
*/
|
|
545
|
-
function
|
|
552
|
+
function stripAnsiCode(string) {
|
|
546
553
|
return string.replace(ANSI_PATTERN, "");
|
|
547
554
|
}
|
|
548
|
-
exports.
|
|
555
|
+
exports.stripAnsiCode = stripAnsiCode;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TLRawReader } from "./0_tl_raw_reader.js";
|
|
2
2
|
import { TLObject } from "./1_tl_object.js";
|
|
3
|
-
export type ReadObject = TLObject | Array<ReadObject | TLObject>;
|
|
3
|
+
export type ReadObject = boolean | TLObject | Array<ReadObject | TLObject>;
|
|
4
4
|
export declare class TLReader extends TLRawReader {
|
|
5
5
|
readObject(id?: number): ReadObject;
|
|
6
6
|
}
|
package/script/tl/3_tl_reader.js
CHANGED
|
@@ -18,6 +18,12 @@ class TLReader extends _0_tl_raw_reader_js_1.TLRawReader {
|
|
|
18
18
|
}
|
|
19
19
|
return items;
|
|
20
20
|
}
|
|
21
|
+
else if (id == 0x997275b5) {
|
|
22
|
+
return true;
|
|
23
|
+
}
|
|
24
|
+
else if (id == 0xbc799737) {
|
|
25
|
+
return false;
|
|
26
|
+
}
|
|
21
27
|
const constructor = _2_types_js_1.map.get(id);
|
|
22
28
|
if (constructor) {
|
|
23
29
|
return (0, _3_deserialize_js_1.deserialize)(this, constructor[_1_tl_object_js_1.paramDesc], constructor);
|
package/script/tl/4_tl_writer.js
CHANGED
|
@@ -13,6 +13,14 @@ class TLWriter extends _0_tl_raw_writer_js_1.TLRawWriter {
|
|
|
13
13
|
this.writeObject(item);
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
|
+
else if (typeof object === "boolean") {
|
|
17
|
+
if (object) {
|
|
18
|
+
this.writeInt32(0x997275b5, false);
|
|
19
|
+
}
|
|
20
|
+
else {
|
|
21
|
+
this.writeInt32(0xbc799737, false);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
16
24
|
else {
|
|
17
25
|
this.write(object[_1_tl_object_js_1.serialize]());
|
|
18
26
|
}
|
package/script/tl/6_message.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type ChatAction = "type" | "uploadPhoto" | "recordVideo" | "uploadVideo" | "recordVoice" | "uploadAudio" | "uploadDocument" | "chooseSticker" | "findLocation" | "recordVideoNote" | "uploadVideoNote";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { types } from "../2_tl.js";
|
|
2
|
-
export type MessageEntityType = "mention" | "hashtag" | "
|
|
2
|
+
export type MessageEntityType = "mention" | "hashtag" | "botCommand" | "url" | "email" | "bold" | "italic" | "code" | "pre" | "textLink" | "textMention" | "cashtag" | "phoneNumber" | "underline" | "strikethrough" | "blockquote" | "bankCard" | "spoiler" | "customEmoji";
|
|
3
3
|
export declare namespace MessageEntity {
|
|
4
4
|
interface Base {
|
|
5
5
|
type: MessageEntityType;
|
|
@@ -15,7 +15,7 @@ export declare namespace MessageEntity {
|
|
|
15
15
|
type: "hashtag";
|
|
16
16
|
}
|
|
17
17
|
interface BotCommand extends Base {
|
|
18
|
-
type: "
|
|
18
|
+
type: "botCommand";
|
|
19
19
|
}
|
|
20
20
|
interface URL extends Base {
|
|
21
21
|
type: "url";
|
|
@@ -38,20 +38,20 @@ export declare namespace MessageEntity {
|
|
|
38
38
|
type: "code";
|
|
39
39
|
}
|
|
40
40
|
interface TextLink extends Base {
|
|
41
|
-
type: "
|
|
42
|
-
/** For "
|
|
41
|
+
type: "textLink";
|
|
42
|
+
/** For "textLink" only, URL that will be opened after user taps on the text */
|
|
43
43
|
url: string;
|
|
44
44
|
}
|
|
45
45
|
interface TextMention extends Base {
|
|
46
|
-
type: "
|
|
47
|
-
/** For "
|
|
46
|
+
type: "textMention";
|
|
47
|
+
/** For "textMention" only, the ID of the mentioned user */
|
|
48
48
|
userId: number;
|
|
49
49
|
}
|
|
50
50
|
interface Cashtag extends Base {
|
|
51
51
|
type: "cashtag";
|
|
52
52
|
}
|
|
53
53
|
interface PhoneNumber extends Base {
|
|
54
|
-
type: "
|
|
54
|
+
type: "phoneNumber";
|
|
55
55
|
}
|
|
56
56
|
interface Underline extends Base {
|
|
57
57
|
type: "underline";
|
|
@@ -63,14 +63,14 @@ export declare namespace MessageEntity {
|
|
|
63
63
|
type: "blockquote";
|
|
64
64
|
}
|
|
65
65
|
interface BankCard extends Base {
|
|
66
|
-
type: "
|
|
66
|
+
type: "bankCard";
|
|
67
67
|
}
|
|
68
68
|
interface Spoiler extends Base {
|
|
69
69
|
type: "spoiler";
|
|
70
70
|
}
|
|
71
71
|
interface CustomEmoji extends Base {
|
|
72
|
-
type: "
|
|
73
|
-
/** For "
|
|
72
|
+
type: "customEmoji";
|
|
73
|
+
/** For "customEmoji" only, unique identifier of the custom emoji */
|
|
74
74
|
customEmojiId: string;
|
|
75
75
|
}
|
|
76
76
|
}
|
|
@@ -10,7 +10,7 @@ function constructMessageEntity(obj) {
|
|
|
10
10
|
return { type: "hashtag", offset: obj.offset, length: obj.length };
|
|
11
11
|
}
|
|
12
12
|
else if (obj instanceof _2_tl_js_1.types.MessageEntityBotCommand) {
|
|
13
|
-
return { type: "
|
|
13
|
+
return { type: "botCommand", offset: obj.offset ?? 0, length: obj.length };
|
|
14
14
|
}
|
|
15
15
|
else if (obj instanceof _2_tl_js_1.types.MessageEntityURL) {
|
|
16
16
|
return { type: "url", offset: obj.offset, length: obj.length };
|
|
@@ -31,16 +31,16 @@ function constructMessageEntity(obj) {
|
|
|
31
31
|
return { type: "pre", offset: obj.offset, length: obj.length, language: obj.language };
|
|
32
32
|
}
|
|
33
33
|
else if (obj instanceof _2_tl_js_1.types.MessageEntityTextURL) {
|
|
34
|
-
return { type: "
|
|
34
|
+
return { type: "textLink", offset: obj.offset, length: obj.length, url: obj.url };
|
|
35
35
|
}
|
|
36
36
|
else if (obj instanceof _2_tl_js_1.types.MessageEntityMentionName) {
|
|
37
|
-
return { type: "
|
|
37
|
+
return { type: "textMention", offset: obj.offset, length: obj.length, userId: Number(obj.userId) };
|
|
38
38
|
}
|
|
39
39
|
else if (obj instanceof _2_tl_js_1.types.MessageEntityCashtag) {
|
|
40
40
|
return { type: "cashtag", offset: obj.offset, length: obj.length };
|
|
41
41
|
}
|
|
42
42
|
else if (obj instanceof _2_tl_js_1.types.MessageEntityPhone) {
|
|
43
|
-
return { type: "
|
|
43
|
+
return { type: "phoneNumber", offset: obj.offset, length: obj.length };
|
|
44
44
|
}
|
|
45
45
|
else if (obj instanceof _2_tl_js_1.types.MessageEntityUnderline) {
|
|
46
46
|
return { type: "underline", offset: obj.offset, length: obj.length };
|
|
@@ -52,13 +52,13 @@ function constructMessageEntity(obj) {
|
|
|
52
52
|
return { type: "blockquote", offset: obj.offset, length: obj.length };
|
|
53
53
|
}
|
|
54
54
|
else if (obj instanceof _2_tl_js_1.types.MessageEntityBankCard) {
|
|
55
|
-
return { type: "
|
|
55
|
+
return { type: "bankCard", offset: obj.offset, length: obj.length };
|
|
56
56
|
}
|
|
57
57
|
else if (obj instanceof _2_tl_js_1.types.MessageEntitySpoiler) {
|
|
58
58
|
return { type: "spoiler", offset: obj.offset, length: obj.length };
|
|
59
59
|
}
|
|
60
60
|
else if (obj instanceof _2_tl_js_1.types.MessageEntityCustomEmoji) {
|
|
61
|
-
return { type: "
|
|
61
|
+
return { type: "customEmoji", offset: obj.offset, length: obj.length, customEmojiId: String(obj.documentId) };
|
|
62
62
|
}
|
|
63
63
|
else {
|
|
64
64
|
return null;
|
|
@@ -72,7 +72,7 @@ function messageEntityToTlObject(entity) {
|
|
|
72
72
|
return new _2_tl_js_1.types.MessageEntityMention({ offset, length });
|
|
73
73
|
case "hashtag":
|
|
74
74
|
return new _2_tl_js_1.types.MessageEntityHashtag({ offset, length });
|
|
75
|
-
case "
|
|
75
|
+
case "botCommand":
|
|
76
76
|
return new _2_tl_js_1.types.MessageEntityBotCommand({ offset, length });
|
|
77
77
|
case "url":
|
|
78
78
|
return new _2_tl_js_1.types.MessageEntityURL({ offset, length });
|
|
@@ -86,13 +86,13 @@ function messageEntityToTlObject(entity) {
|
|
|
86
86
|
return new _2_tl_js_1.types.MessageEntityCode({ offset, length });
|
|
87
87
|
case "pre":
|
|
88
88
|
return new _2_tl_js_1.types.MessageEntityPre({ offset, length, language: entity.language });
|
|
89
|
-
case "
|
|
89
|
+
case "textLink":
|
|
90
90
|
return new _2_tl_js_1.types.MessageEntityTextURL({ offset, length, url: entity.url });
|
|
91
|
-
case "
|
|
91
|
+
case "textMention":
|
|
92
92
|
return new _2_tl_js_1.types.MessageEntityMentionName({ offset, length, userId: BigInt(entity.userId) });
|
|
93
93
|
case "cashtag":
|
|
94
94
|
return new _2_tl_js_1.types.MessageEntityCashtag({ offset, length });
|
|
95
|
-
case "
|
|
95
|
+
case "phoneNumber":
|
|
96
96
|
return new _2_tl_js_1.types.MessageEntityPhone({ offset, length });
|
|
97
97
|
case "underline":
|
|
98
98
|
return new _2_tl_js_1.types.MessageEntityUnderline({ offset, length });
|
|
@@ -100,11 +100,11 @@ function messageEntityToTlObject(entity) {
|
|
|
100
100
|
return new _2_tl_js_1.types.MessageEntityStrike({ offset, length });
|
|
101
101
|
case "blockquote":
|
|
102
102
|
return new _2_tl_js_1.types.MessageEntityBlockquote({ offset, length });
|
|
103
|
-
case "
|
|
103
|
+
case "bankCard":
|
|
104
104
|
return new _2_tl_js_1.types.MessageEntityBankCard({ offset, length });
|
|
105
105
|
case "spoiler":
|
|
106
106
|
return new _2_tl_js_1.types.MessageEntitySpoiler({ offset, length });
|
|
107
|
-
case "
|
|
107
|
+
case "customEmoji":
|
|
108
108
|
return new _2_tl_js_1.types.MessageEntityCustomEmoji({ offset, length, documentId: BigInt(entity.customEmojiId) });
|
|
109
109
|
}
|
|
110
110
|
}
|
package/script/types/1_chat.d.ts
CHANGED
|
@@ -1,12 +1,7 @@
|
|
|
1
1
|
import { types } from "../2_tl.js";
|
|
2
2
|
import { Color } from "./0_color.js";
|
|
3
3
|
import { ChatPhoto } from "./0_chat_photo.js";
|
|
4
|
-
export
|
|
5
|
-
Private = "private",
|
|
6
|
-
Group = "group",
|
|
7
|
-
Supergroup = "supergroup",
|
|
8
|
-
Channel = "channel"
|
|
9
|
-
}
|
|
4
|
+
export type ChatType = "private" | "group" | "supergroup" | "channel";
|
|
10
5
|
export declare namespace Chat {
|
|
11
6
|
interface Base {
|
|
12
7
|
/** Type of chat, can be either "private", "group", "supergroup" or "channel" */
|
|
@@ -18,7 +13,7 @@ export declare namespace Chat {
|
|
|
18
13
|
photo?: ChatPhoto;
|
|
19
14
|
}
|
|
20
15
|
interface Private extends Base {
|
|
21
|
-
type:
|
|
16
|
+
type: "private";
|
|
22
17
|
/** True, if this user is a bot */
|
|
23
18
|
isBot?: boolean;
|
|
24
19
|
/** First name of the other party in a private chat */
|
|
@@ -45,7 +40,7 @@ export declare namespace Chat {
|
|
|
45
40
|
restrictionReason?: types.RestrictionReason[];
|
|
46
41
|
}
|
|
47
42
|
interface Group extends Base {
|
|
48
|
-
type:
|
|
43
|
+
type: "group";
|
|
49
44
|
/** Title, for supergroups, channels and group chats */
|
|
50
45
|
title: string;
|
|
51
46
|
/** Chat photo. */
|
|
@@ -74,7 +69,7 @@ export declare namespace Chat {
|
|
|
74
69
|
restrictionReason?: types.RestrictionReason[];
|
|
75
70
|
}
|
|
76
71
|
interface Channel extends ChannelBase {
|
|
77
|
-
type:
|
|
72
|
+
type: "channel";
|
|
78
73
|
/** Title, for supergroups, channels and group chats */
|
|
79
74
|
title: string;
|
|
80
75
|
/** Username, for private chats, supergroups and channels if available */
|
|
@@ -83,7 +78,7 @@ export declare namespace Chat {
|
|
|
83
78
|
also?: string[];
|
|
84
79
|
}
|
|
85
80
|
interface Supergroup extends ChannelBase {
|
|
86
|
-
type:
|
|
81
|
+
type: "supergroup";
|
|
87
82
|
/** True, if the supergroup chat is a forum (has [topics](https://telegram.org/blog/topics-in-groups-collectible-usernames#topics-in-groups) enabled) */
|
|
88
83
|
isForum: boolean;
|
|
89
84
|
}
|
package/script/types/1_chat.js
CHANGED
|
@@ -1,23 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.constructChat =
|
|
3
|
+
exports.constructChat = void 0;
|
|
4
4
|
const _1_utilities_js_1 = require("../1_utilities.js");
|
|
5
5
|
const _2_tl_js_1 = require("../2_tl.js");
|
|
6
6
|
const _4_constants_js_1 = require("../4_constants.js");
|
|
7
7
|
const _0_color_js_1 = require("./0_color.js");
|
|
8
8
|
const _0_chat_photo_js_1 = require("./0_chat_photo.js");
|
|
9
|
-
var ChatType;
|
|
10
|
-
(function (ChatType) {
|
|
11
|
-
ChatType["Private"] = "private";
|
|
12
|
-
ChatType["Group"] = "group";
|
|
13
|
-
ChatType["Supergroup"] = "supergroup";
|
|
14
|
-
ChatType["Channel"] = "channel";
|
|
15
|
-
})(ChatType = exports.ChatType || (exports.ChatType = {}));
|
|
16
9
|
function constructChat(chat) {
|
|
17
10
|
if (chat instanceof _2_tl_js_1.types.User) {
|
|
18
11
|
const id = Number(chat.id);
|
|
19
12
|
const chat_ = {
|
|
20
|
-
type:
|
|
13
|
+
type: "private",
|
|
21
14
|
isBot: chat.bot || false,
|
|
22
15
|
id,
|
|
23
16
|
color: (0, _0_color_js_1.getColor)(id),
|
|
@@ -40,7 +33,7 @@ function constructChat(chat) {
|
|
|
40
33
|
else if (chat instanceof _2_tl_js_1.types.Chat) {
|
|
41
34
|
const id = Number(-chat.id);
|
|
42
35
|
const chat_ = {
|
|
43
|
-
type:
|
|
36
|
+
type: "group",
|
|
44
37
|
id,
|
|
45
38
|
color: (0, _0_color_js_1.getColor)(id),
|
|
46
39
|
title: chat.title,
|
|
@@ -59,7 +52,7 @@ function constructChat(chat) {
|
|
|
59
52
|
chat_ = {
|
|
60
53
|
id,
|
|
61
54
|
color: (0, _0_color_js_1.getColor)(id),
|
|
62
|
-
type:
|
|
55
|
+
type: "supergroup",
|
|
63
56
|
title,
|
|
64
57
|
isScam,
|
|
65
58
|
isFake,
|
|
@@ -73,7 +66,7 @@ function constructChat(chat) {
|
|
|
73
66
|
chat_ = {
|
|
74
67
|
id,
|
|
75
68
|
color: (0, _0_color_js_1.getColor)(id),
|
|
76
|
-
type:
|
|
69
|
+
type: "channel",
|
|
77
70
|
title,
|
|
78
71
|
isScam,
|
|
79
72
|
isFake,
|
|
@@ -8,8 +8,8 @@ export interface Sticker {
|
|
|
8
8
|
fileId: string;
|
|
9
9
|
/** Unique identifier for this file, which is supposed to be the same over time and for different users and bots. Can't be used to download or reuse the file. */
|
|
10
10
|
fileUniqueId: string;
|
|
11
|
-
/** Type of the sticker, currently one of "regular", "mask", "
|
|
12
|
-
type: "regular" | "mask" | "
|
|
11
|
+
/** Type of the sticker, currently one of "regular", "mask", "customEmoji". The type of the sticker is independent from its format, which is determined by the fields is_animated and is_video. */
|
|
12
|
+
type: "regular" | "mask" | "customEmoji";
|
|
13
13
|
/** Sticker width */
|
|
14
14
|
width: number;
|
|
15
15
|
/** Sticker height */
|
|
@@ -12,7 +12,7 @@ async function constructSticker(document, fileId, fileUniqueId, getStickerSetNam
|
|
|
12
12
|
return {
|
|
13
13
|
fileId,
|
|
14
14
|
fileUniqueId,
|
|
15
|
-
// TODO:
|
|
15
|
+
// TODO: custom emoji type?
|
|
16
16
|
type: stickerAttribute.mask ? "mask" : "regular",
|
|
17
17
|
width: imageSizeAttribute ? imageSizeAttribute.w : videoAttribute ? videoAttribute.w : 512,
|
|
18
18
|
height: imageSizeAttribute ? imageSizeAttribute.h : videoAttribute ? videoAttribute.h : 512,
|
|
@@ -120,10 +120,10 @@ async function constructServiceMessage(message_, chat, getEntity, getMessage) {
|
|
|
120
120
|
}
|
|
121
121
|
}
|
|
122
122
|
else if (message_.action instanceof _2_tl_js_1.types.MessageActionChannelCreate) {
|
|
123
|
-
if (message.chat.type ==
|
|
123
|
+
if (message.chat.type == "channel") {
|
|
124
124
|
message.channelCreated = true;
|
|
125
125
|
}
|
|
126
|
-
else if (message.chat.type ==
|
|
126
|
+
else if (message.chat.type == "supergroup") {
|
|
127
127
|
message.supergroupCreated = true;
|
|
128
128
|
}
|
|
129
129
|
else {
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/esm/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_not_strict_equals.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/script/deps/deno.land/{std@0.200.0 → std@0.201.0}/assert/assert_array_includes.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|