v0.12.0
This commit is contained in:
parent
0219f24a8b
commit
bb722883a3
24 changed files with 26 additions and 26 deletions
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "mtcute-workspace",
|
||||
"private": true,
|
||||
"version": "0.11.0",
|
||||
"version": "0.12.0",
|
||||
"description": "Type-safe library for MTProto (Telegram API) for browser and NodeJS",
|
||||
"license": "MIT",
|
||||
"author": "alina sireneva <alina@tei.su>",
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "@mtcute/bun",
|
||||
"private": true,
|
||||
"version": "0.11.0",
|
||||
"version": "0.12.0",
|
||||
"description": "Meta-package for Bun",
|
||||
"author": "alina sireneva <alina@tei.su>",
|
||||
"license": "MIT",
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "@mtcute/convert",
|
||||
"private": true,
|
||||
"version": "0.11.0",
|
||||
"version": "0.12.0",
|
||||
"description": "Cross-library session conversion utilities",
|
||||
"author": "alina sireneva <alina@tei.su>",
|
||||
"license": "MIT",
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "@mtcute/core",
|
||||
"private": true,
|
||||
"version": "0.11.0",
|
||||
"version": "0.12.0",
|
||||
"description": "Type-safe library for MTProto (Telegram API)",
|
||||
"author": "alina sireneva <alina@tei.su>",
|
||||
"license": "MIT",
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "@mtcute/create-bot",
|
||||
"private": true,
|
||||
"version": "0.11.0",
|
||||
"version": "0.12.0",
|
||||
"description": "Bot starter kit for mtcute",
|
||||
"author": "alina sireneva <alina@tei.su>",
|
||||
"license": "MIT",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@mtcute/crypto-node",
|
||||
"version": "0.11.0",
|
||||
"version": "0.12.0",
|
||||
"description": "Native crypto implementation for NodeJS",
|
||||
"author": "alina sireneva <alina@tei.su>",
|
||||
"private": true,
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "@mtcute/deno",
|
||||
"private": true,
|
||||
"version": "0.11.0",
|
||||
"version": "0.12.0",
|
||||
"description": "Meta-package for Deno",
|
||||
"author": "alina sireneva <alina@tei.su>",
|
||||
"license": "MIT",
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "@mtcute/dispatcher",
|
||||
"private": true,
|
||||
"version": "0.11.0",
|
||||
"version": "0.12.0",
|
||||
"description": "Updates dispatcher and bot framework for @mtcute/client",
|
||||
"author": "alina sireneva <alina@tei.su>",
|
||||
"license": "MIT",
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "@mtcute/file-id",
|
||||
"private": true,
|
||||
"version": "0.11.0",
|
||||
"version": "0.12.0",
|
||||
"description": "Support for TDLib and Bot API file ID for mtcute",
|
||||
"author": "alina sireneva <alina@tei.su>",
|
||||
"license": "MIT",
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "@mtcute/html-parser",
|
||||
"private": true,
|
||||
"version": "0.11.0",
|
||||
"version": "0.12.0",
|
||||
"description": "HTML entities parser for mtcute",
|
||||
"author": "alina sireneva <alina@tei.su>",
|
||||
"license": "MIT",
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "@mtcute/http-proxy",
|
||||
"private": true,
|
||||
"version": "0.11.0",
|
||||
"version": "0.12.0",
|
||||
"description": "HTTP(S) proxy support for mtcute",
|
||||
"author": "alina sireneva <alina@tei.su>",
|
||||
"license": "MIT",
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "@mtcute/i18n",
|
||||
"private": true,
|
||||
"version": "0.11.0",
|
||||
"version": "0.12.0",
|
||||
"description": "I18n for mtcute",
|
||||
"author": "alina sireneva <alina@tei.su>",
|
||||
"license": "MIT",
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "@mtcute/markdown-parser",
|
||||
"private": true,
|
||||
"version": "0.11.0",
|
||||
"version": "0.12.0",
|
||||
"description": "Markdown entities parser for mtcute",
|
||||
"author": "alina sireneva <alina@tei.su>",
|
||||
"license": "MIT",
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "@mtcute/mtproxy",
|
||||
"private": true,
|
||||
"version": "0.11.0",
|
||||
"version": "0.12.0",
|
||||
"description": "MTProto proxy (MTProxy) support for mtcute",
|
||||
"author": "alina sireneva <alina@tei.su>",
|
||||
"license": "MIT",
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "@mtcute/node",
|
||||
"private": true,
|
||||
"version": "0.11.0",
|
||||
"version": "0.12.0",
|
||||
"description": "Meta-package for Node.js",
|
||||
"author": "alina sireneva <alina@tei.su>",
|
||||
"license": "MIT",
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "@mtcute/socks-proxy",
|
||||
"private": true,
|
||||
"version": "0.11.0",
|
||||
"version": "0.12.0",
|
||||
"description": "SOCKS4/5 proxy support for mtcute",
|
||||
"author": "alina sireneva <alina@tei.su>",
|
||||
"license": "MIT",
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "@mtcute/test",
|
||||
"private": true,
|
||||
"version": "0.11.0",
|
||||
"version": "0.12.0",
|
||||
"description": "Test utilities for mtcute",
|
||||
"author": "alina sireneva <alina@tei.su>",
|
||||
"license": "MIT",
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "@mtcute/tl-runtime",
|
||||
"private": true,
|
||||
"version": "0.11.0",
|
||||
"version": "0.12.0",
|
||||
"description": "Runtime for TL",
|
||||
"author": "alina sireneva <alina@tei.su>",
|
||||
"license": "MIT",
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "@mtcute/tl-utils",
|
||||
"private": true,
|
||||
"version": "0.11.0",
|
||||
"version": "0.12.0",
|
||||
"description": "Utils for working with TL schema",
|
||||
"author": "alina sireneva <alina@tei.su>",
|
||||
"license": "MIT",
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "@mtcute/wasm",
|
||||
"private": true,
|
||||
"version": "0.11.0",
|
||||
"version": "0.12.0",
|
||||
"description": "WASM implementation of common algorithms used in Telegram",
|
||||
"author": "alina sireneva <alina@tei.su>",
|
||||
"license": "MIT",
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "@mtcute/web",
|
||||
"private": true,
|
||||
"version": "0.11.0",
|
||||
"version": "0.12.0",
|
||||
"description": "Meta-package for the web platform",
|
||||
"author": "alina sireneva <alina@tei.su>",
|
||||
"license": "MIT",
|
||||
|
|
|
@ -111,14 +111,14 @@ function fromByteArray(uint8: Uint8Array) {
|
|||
return parts.join('')
|
||||
}
|
||||
|
||||
export function base64Encode(buf: Uint8Array, url = false): string {
|
||||
export function base64Encode(buf: Uint8Array, url: boolean = false): string {
|
||||
const str = fromByteArray(buf)
|
||||
if (url) return str.replace(/\+/g, '-').replace(/\//g, '_').replace(/=/g, '')
|
||||
|
||||
return str
|
||||
}
|
||||
|
||||
export function base64Decode(string: string, url = false): Uint8Array {
|
||||
export function base64Decode(string: string, url: boolean = false): Uint8Array {
|
||||
if (url) {
|
||||
string = string.replace(/-/g, '+').replace(/_/g, '/')
|
||||
while (string.length % 4) string += '='
|
||||
|
|
|
@ -25,13 +25,13 @@ const TAG_COLORS = [
|
|||
]
|
||||
|
||||
/** @internal */
|
||||
export const defaultLoggingHandler = (
|
||||
export const defaultLoggingHandler: (
|
||||
color: number,
|
||||
level: number,
|
||||
tag: string,
|
||||
fmt: string,
|
||||
args: unknown[],
|
||||
): void => {
|
||||
) => void = (color: number, level: number, tag: string, fmt: string, args: unknown[]): void => {
|
||||
// eslint-disable-next-line no-console
|
||||
console.log(
|
||||
BASE_FORMAT + fmt,
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
const sharedEncoder = new TextEncoder()
|
||||
const sharedDecoder = new TextDecoder('utf8')
|
||||
|
||||
export function utf8ByteLength(str: string) {
|
||||
export function utf8ByteLength(str: string): number {
|
||||
// https://stackoverflow.com/a/23329386
|
||||
let s = str.length
|
||||
|
||||
|
|
Loading…
Reference in a new issue