From cf9739fa8aba2e98e82a3656afc5414476ddb3cc Mon Sep 17 00:00:00 2001
From: alina sireneva
Date: Mon, 12 Aug 2024 05:23:26 +0300
Subject: [PATCH 1/8] build: bumped deps
---
.config/vite.browser.mts | 11 +-
.config/vite.mts | 10 +-
package.json | 26 +-
packages/core/src/utils/logger.test.ts | 2 +-
packages/create-bot/package.json | 2 +-
packages/node/src/utils/stream-utils.test.ts | 4 +-
packages/test/package.json | 2 +-
packages/test/src/crypto.ts | 2 +-
pnpm-lock.yaml | 1544 +++++++++++-------
9 files changed, 1013 insertions(+), 590 deletions(-)
diff --git a/.config/vite.browser.mts b/.config/vite.browser.mts
index 34508d53..dfda1eea 100644
--- a/.config/vite.browser.mts
+++ b/.config/vite.browser.mts
@@ -1,11 +1,11 @@
///
-import { defineConfig, mergeConfig } from 'vite'
+import { mergeConfig } from 'vite'
import { nodePolyfills } from 'vite-plugin-node-polyfills'
import baseConfig from './vite.mjs'
import { fixupCjs } from './vite-utils/fixup-cjs'
-export default mergeConfig(baseConfig, defineConfig({
+export default mergeConfig(baseConfig, {
test: {
browser: {
enabled: true,
@@ -36,7 +36,12 @@ export default mergeConfig(baseConfig, defineConfig({
},
})
],
+ build: {
+ rollupOptions: {
+ external: ['bun:sqlite']
+ }
+ },
define: {
'import.meta.env.TEST_ENV': '"browser"'
}
-}))
+})
diff --git a/.config/vite.mts b/.config/vite.mts
index f4ee57c5..5bc69261 100644
--- a/.config/vite.mts
+++ b/.config/vite.mts
@@ -25,5 +25,13 @@ export default defineConfig({
},
define: {
'import.meta.env.TEST_ENV': '"node"'
- }
+ },
+ optimizeDeps: {
+ esbuildOptions: {
+ // for WHATEVER REASON browserify-zlib uses `global` and it dies in browser lol
+ define: {
+ global: 'globalThis',
+ },
+ },
+ },
})
diff --git a/package.json b/package.json
index f58f944f..c962944f 100644
--- a/package.json
+++ b/package.json
@@ -34,7 +34,7 @@
"test:browser:dev": "vitest --config .config/vite.browser.mts watch",
"lint": "eslint .",
"lint:ci": "NODE_OPTIONS=\\\"--max_old_space_size=8192\\\" eslint --config .config/eslint.ci.js .",
- "lint:tsc": "rimraf packages/**/dist && pnpm -r --workspace-concurrency=4 exec tsc --build",
+ "lint:tsc": "rimraf packages/**/dist packages/**/*.tsbuildinfo && pnpm -r --workspace-concurrency=4 exec tsc --build",
"lint:tsc:ci": "pnpm -r exec tsc --build",
"lint:dpdm": "dpdm -T --no-warning --no-tree --exit-code circular:1 packages/*",
"lint:fix": "eslint --fix .",
@@ -50,34 +50,34 @@
"@types/ws": "8.5.4",
"@typescript-eslint/eslint-plugin": "6.4.0",
"@typescript-eslint/parser": "6.4.0",
- "@vitest/browser": "1.4.0",
- "@vitest/coverage-v8": "1.4.0",
- "@vitest/expect": "1.4.0",
- "@vitest/spy": "1.4.0",
- "@vitest/ui": "1.4.0",
+ "@vitest/browser": "2.0.5",
+ "@vitest/coverage-v8": "2.0.5",
+ "@vitest/expect": "2.0.5",
+ "@vitest/spy": "2.0.5",
+ "@vitest/ui": "2.0.5",
"chai": "5.1.0",
"cjs-module-lexer": "1.2.3",
- "dotenv-flow": "3.2.0",
+ "dotenv-flow": "4.1.0",
"dpdm": "3.14.0",
- "esbuild": "0.18.20",
+ "esbuild": "0.23.0",
"eslint": "8.47.0",
"eslint-config-prettier": "8.8.0",
"eslint-import-resolver-typescript": "3.6.0",
"eslint-plugin-ascii": "1.0.0",
"eslint-plugin-import": "2.28.0",
"eslint-plugin-simple-import-sort": "10.0.0",
- "glob": "10.2.6",
+ "glob": "11.0.0",
"playwright": "1.42.1",
"prettier": "3.0.3",
- "rimraf": "5.0.1",
+ "rimraf": "6.0.1",
"semver": "7.5.1",
"ts-node": "10.9.1",
"tsconfig-paths": "4.2.0",
- "typedoc": "0.25.12",
+ "typedoc": "0.26.5",
"typescript": "5.4.3",
"vite": "5.1.6",
- "vite-plugin-node-polyfills": "0.21.0",
- "vitest": "1.4.0"
+ "vite-plugin-node-polyfills": "0.22.0",
+ "vitest": "2.0.5"
},
"packageManager": "pnpm@9.0.6",
"prettier": "./.config/prettier.cjs",
diff --git a/packages/core/src/utils/logger.test.ts b/packages/core/src/utils/logger.test.ts
index 10c7d128..d996024e 100644
--- a/packages/core/src/utils/logger.test.ts
+++ b/packages/core/src/utils/logger.test.ts
@@ -10,7 +10,7 @@ describe('logger', () => {
const mgr = new LogManager()
mgr.level = LogManager.INFO
- const spy = vi.fn>()
+ const spy = vi.fn()
mgr.handler = spy
return [mgr, spy] as const
diff --git a/packages/create-bot/package.json b/packages/create-bot/package.json
index 63746dc1..58c4f4d5 100644
--- a/packages/create-bot/package.json
+++ b/packages/create-bot/package.json
@@ -17,7 +17,7 @@
"dependencies": {
"colorette": "2.0.20",
"cross-spawn": "7.0.3",
- "glob": "10.2.6",
+ "glob": "11.0.0",
"handlebars": "4.7.8",
"inquirer": "9.2.11",
"openurl": "1.1.1"
diff --git a/packages/node/src/utils/stream-utils.test.ts b/packages/node/src/utils/stream-utils.test.ts
index 20a747ea..9cf89a10 100644
--- a/packages/node/src/utils/stream-utils.test.ts
+++ b/packages/node/src/utils/stream-utils.test.ts
@@ -1,9 +1,9 @@
import { Readable } from 'stream'
import { describe, expect, it } from 'vitest'
-import { nodeStreamToWeb, webStreamToNode } from './stream-utils.js'
-
if (import.meta.env.TEST_ENV === 'node' || import.meta.env.TEST_ENV === 'bun') {
+ const { nodeStreamToWeb, webStreamToNode } = await import('./stream-utils.js')
+
describe('nodeStreamToWeb', () => {
it('should correctly convert a readable stream', async () => {
const stream = new Readable({
diff --git a/packages/test/package.json b/packages/test/package.json
index d35c2886..38321e67 100644
--- a/packages/test/package.json
+++ b/packages/test/package.json
@@ -21,7 +21,7 @@
"@mtcute/node": "workspace:^",
"@mtcute/web": "workspace:^",
"@mtcute/tl": "workspace:*",
- "vitest": "^1.4.0"
+ "vitest": "*"
},
"peerDependenciesMeta": {
"@mtcute/node": {
diff --git a/packages/test/src/crypto.ts b/packages/test/src/crypto.ts
index 42d91799..2c263668 100644
--- a/packages/test/src/crypto.ts
+++ b/packages/test/src/crypto.ts
@@ -53,7 +53,7 @@ export function useFakeMathRandom(source = DEFAULT_ENTROPY): void {
const sourceBytes = getPlatform().hexDecode(source)
const dv = dataViewFromBuffer(sourceBytes)
- let spy: MockInstance<[], number>
+ let spy: MockInstance<() => number>
beforeEach(() => {
let offset = 0
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index cf34ad80..33cf52ec 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -27,20 +27,20 @@ importers:
specifier: 6.4.0
version: 6.4.0(eslint@8.47.0)(typescript@5.4.3)
'@vitest/browser':
- specifier: 1.4.0
- version: 1.4.0(playwright@1.42.1)(vitest@1.4.0)
+ specifier: 2.0.5
+ version: 2.0.5(playwright@1.42.1)(typescript@5.4.3)(vitest@2.0.5)
'@vitest/coverage-v8':
- specifier: 1.4.0
- version: 1.4.0(vitest@1.4.0(@types/node@20.10.0)(@vitest/browser@1.4.0)(@vitest/ui@1.4.0))
+ specifier: 2.0.5
+ version: 2.0.5(vitest@2.0.5(@types/node@20.10.0)(@vitest/browser@2.0.5)(@vitest/ui@2.0.5))
'@vitest/expect':
- specifier: 1.4.0
- version: 1.4.0
+ specifier: 2.0.5
+ version: 2.0.5
'@vitest/spy':
- specifier: 1.4.0
- version: 1.4.0
+ specifier: 2.0.5
+ version: 2.0.5
'@vitest/ui':
- specifier: 1.4.0
- version: 1.4.0(vitest@1.4.0)
+ specifier: 2.0.5
+ version: 2.0.5(vitest@2.0.5)
chai:
specifier: 5.1.0
version: 5.1.0
@@ -48,14 +48,14 @@ importers:
specifier: 1.2.3
version: 1.2.3
dotenv-flow:
- specifier: 3.2.0
- version: 3.2.0
+ specifier: 4.1.0
+ version: 4.1.0
dpdm:
specifier: 3.14.0
version: 3.14.0
esbuild:
- specifier: 0.18.20
- version: 0.18.20
+ specifier: 0.23.0
+ version: 0.23.0
eslint:
specifier: 8.47.0
version: 8.47.0
@@ -75,8 +75,8 @@ importers:
specifier: 10.0.0
version: 10.0.0(eslint@8.47.0)
glob:
- specifier: 10.2.6
- version: 10.2.6
+ specifier: 11.0.0
+ version: 11.0.0
playwright:
specifier: 1.42.1
version: 1.42.1
@@ -84,8 +84,8 @@ importers:
specifier: 3.0.3
version: 3.0.3
rimraf:
- specifier: 5.0.1
- version: 5.0.1
+ specifier: 6.0.1
+ version: 6.0.1
semver:
specifier: 7.5.1
version: 7.5.1
@@ -96,8 +96,8 @@ importers:
specifier: 4.2.0
version: 4.2.0
typedoc:
- specifier: 0.25.12
- version: 0.25.12(typescript@5.4.3)
+ specifier: 0.26.5
+ version: 0.26.5(typescript@5.4.3)
typescript:
specifier: 5.4.3
version: 5.4.3
@@ -105,11 +105,11 @@ importers:
specifier: 5.1.6
version: 5.1.6(@types/node@20.10.0)
vite-plugin-node-polyfills:
- specifier: 0.21.0
- version: 0.21.0(rollup@4.13.0)(vite@5.1.6(@types/node@20.10.0))
+ specifier: 0.22.0
+ version: 0.22.0(rollup@4.13.0)(vite@5.1.6(@types/node@20.10.0))
vitest:
- specifier: 1.4.0
- version: 1.4.0(@types/node@20.10.0)(@vitest/browser@1.4.0)(@vitest/ui@1.4.0)
+ specifier: 2.0.5
+ version: 2.0.5(@types/node@20.10.0)(@vitest/browser@2.0.5)(@vitest/ui@2.0.5)
packages/bun:
dependencies:
@@ -183,8 +183,8 @@ importers:
specifier: 7.0.3
version: 7.0.3
glob:
- specifier: 10.2.6
- version: 10.2.6
+ specifier: 11.0.0
+ version: 11.0.0
handlebars:
specifier: 4.7.8
version: 4.7.8
@@ -363,8 +363,8 @@ importers:
specifier: 5.2.3
version: 5.2.3
vitest:
- specifier: ^1.4.0
- version: 1.4.0(@types/node@20.10.0)(@vitest/browser@1.4.0)(@vitest/ui@1.4.0)
+ specifier: '*'
+ version: 2.0.5(@types/node@20.10.0)(@vitest/browser@2.0.5)(@vitest/ui@2.0.5)
devDependencies:
'@mtcute/tl-utils':
specifier: workspace:^
@@ -454,26 +454,59 @@ packages:
resolution: {integrity: sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==}
engines: {node: '>=6.0.0'}
+ '@babel/code-frame@7.24.7':
+ resolution: {integrity: sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA==}
+ engines: {node: '>=6.9.0'}
+
'@babel/helper-string-parser@7.23.4':
resolution: {integrity: sha512-803gmbQdqwdf4olxrX4AJyFBV/RTr3rSmOj0rKwesmzlfhYNDEs+/iOcznzpNWlJlIlTJC2QfPFcHB6DlzdVLQ==}
engines: {node: '>=6.9.0'}
+ '@babel/helper-string-parser@7.24.8':
+ resolution: {integrity: sha512-pO9KhhRcuUyGnJWwyEgnRJTSIZHiT+vMD0kPeD+so0l7mxkMT19g3pjY9GTnHySck/hDzq+dtW/4VgnMkippsQ==}
+ engines: {node: '>=6.9.0'}
+
'@babel/helper-validator-identifier@7.22.20':
resolution: {integrity: sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==}
engines: {node: '>=6.9.0'}
- '@babel/parser@7.24.0':
- resolution: {integrity: sha512-QuP/FxEAzMSjXygs8v4N9dvdXzEHN4W1oF3PxuWAtPo08UdM17u89RDMgjLn/mlc56iM0HlLmVkO/wgR+rDgHg==}
+ '@babel/helper-validator-identifier@7.24.7':
+ resolution: {integrity: sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w==}
+ engines: {node: '>=6.9.0'}
+
+ '@babel/highlight@7.24.7':
+ resolution: {integrity: sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw==}
+ engines: {node: '>=6.9.0'}
+
+ '@babel/parser@7.25.3':
+ resolution: {integrity: sha512-iLTJKDbJ4hMvFPgQwwsVoxtHyWpKKPBrxkANrSYewDPaPpT5py5yeVkgPIJ7XYXhndxJpaA3PyALSXQ7u8e/Dw==}
engines: {node: '>=6.0.0'}
hasBin: true
+ '@babel/runtime@7.25.0':
+ resolution: {integrity: sha512-7dRy4DwXwtzBrPbZflqxnvfxLF8kdZXPkhymtDeFoFqE6ldzjQFgYTtYIFARcLEYDrqfBfYcZt1WqFxRoyC9Rw==}
+ engines: {node: '>=6.9.0'}
+
'@babel/types@7.24.0':
resolution: {integrity: sha512-+j7a5c253RfKh8iABBhywc8NSfP5LURe7Uh4qpsh6jc+aLJguvmIUBdjSdEMQv2bENrCR5MfRdjGo7vzS/ob7w==}
engines: {node: '>=6.9.0'}
+ '@babel/types@7.25.2':
+ resolution: {integrity: sha512-YTnYtra7W9e6/oAZEHj0bJehPRUlLH9/fbpT5LfB0NhQXyALCRkRs3zH9v07IYhkgpqX6Z78FnuccZr/l4Fs4Q==}
+ engines: {node: '>=6.9.0'}
+
'@bcoe/v8-coverage@0.2.3':
resolution: {integrity: sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==}
+ '@bundled-es-modules/cookie@2.0.0':
+ resolution: {integrity: sha512-Or6YHg/kamKHpxULAdSqhGqnWFneIXu1NKvvfBBzKGwpVsYuFIQ5aBPHDnnoR3ghW1nvSkALd+EF9iMtY7Vjxw==}
+
+ '@bundled-es-modules/statuses@1.0.1':
+ resolution: {integrity: sha512-yn7BklA5acgcBr+7w064fGV+SGIFySjCKpqjcWgBAIfrAkY+4GQTJJHQMeT3V/sgz23VTEVV8TtOmkvJAhFVfg==}
+
+ '@bundled-es-modules/tough-cookie@0.1.6':
+ resolution: {integrity: sha512-dvMHbL464C0zI+Yqxbz6kZ5TOEp7GLW+pry/RWndAR8MJQAXZ2rPmIs8tziTZjeIyhSNZgZbCePtfSbdWqStJw==}
+
'@cspotcode/source-map-support@0.8.1':
resolution: {integrity: sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==}
engines: {node: '>=12'}
@@ -484,11 +517,11 @@ packages:
cpu: [ppc64]
os: [aix]
- '@esbuild/android-arm64@0.18.20':
- resolution: {integrity: sha512-Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ==}
- engines: {node: '>=12'}
- cpu: [arm64]
- os: [android]
+ '@esbuild/aix-ppc64@0.23.0':
+ resolution: {integrity: sha512-3sG8Zwa5fMcA9bgqB8AfWPQ+HFke6uD3h1s3RIwUNK8EG7a4buxvuFTs3j1IMs2NXAk9F30C/FF4vxRgQCcmoQ==}
+ engines: {node: '>=18'}
+ cpu: [ppc64]
+ os: [aix]
'@esbuild/android-arm64@0.19.12':
resolution: {integrity: sha512-P0UVNGIienjZv3f5zq0DP3Nt2IE/3plFzuaS96vihvD0Hd6H/q4WXUGpCxD/E8YrSXfNyRPbpTq+T8ZQioSuPA==}
@@ -496,10 +529,10 @@ packages:
cpu: [arm64]
os: [android]
- '@esbuild/android-arm@0.18.20':
- resolution: {integrity: sha512-fyi7TDI/ijKKNZTUJAQqiG5T7YjJXgnzkURqmGj13C6dCqckZBLdl4h7bkhHt/t0WP+zO9/zwroDvANaOqO5Sw==}
- engines: {node: '>=12'}
- cpu: [arm]
+ '@esbuild/android-arm64@0.23.0':
+ resolution: {integrity: sha512-EuHFUYkAVfU4qBdyivULuu03FhJO4IJN9PGuABGrFy4vUuzk91P2d+npxHcFdpUnfYKy0PuV+n6bKIpHOB3prQ==}
+ engines: {node: '>=18'}
+ cpu: [arm64]
os: [android]
'@esbuild/android-arm@0.19.12':
@@ -508,10 +541,10 @@ packages:
cpu: [arm]
os: [android]
- '@esbuild/android-x64@0.18.20':
- resolution: {integrity: sha512-8GDdlePJA8D6zlZYJV/jnrRAi6rOiNaCC/JclcXpB+KIuvfBN4owLtgzY2bsxnx666XjJx2kDPUmnTtR8qKQUg==}
- engines: {node: '>=12'}
- cpu: [x64]
+ '@esbuild/android-arm@0.23.0':
+ resolution: {integrity: sha512-+KuOHTKKyIKgEEqKbGTK8W7mPp+hKinbMBeEnNzjJGyFcWsfrXjSTNluJHCY1RqhxFurdD8uNXQDei7qDlR6+g==}
+ engines: {node: '>=18'}
+ cpu: [arm]
os: [android]
'@esbuild/android-x64@0.19.12':
@@ -520,11 +553,11 @@ packages:
cpu: [x64]
os: [android]
- '@esbuild/darwin-arm64@0.18.20':
- resolution: {integrity: sha512-bxRHW5kHU38zS2lPTPOyuyTm+S+eobPUnTNkdJEfAddYgEcll4xkT8DB9d2008DtTbl7uJag2HuE5NZAZgnNEA==}
- engines: {node: '>=12'}
- cpu: [arm64]
- os: [darwin]
+ '@esbuild/android-x64@0.23.0':
+ resolution: {integrity: sha512-WRrmKidLoKDl56LsbBMhzTTBxrsVwTKdNbKDalbEZr0tcsBgCLbEtoNthOW6PX942YiYq8HzEnb4yWQMLQuipQ==}
+ engines: {node: '>=18'}
+ cpu: [x64]
+ os: [android]
'@esbuild/darwin-arm64@0.19.12':
resolution: {integrity: sha512-B6IeSgZgtEzGC42jsI+YYu9Z3HKRxp8ZT3cqhvliEHovq8HSX2YX8lNocDn79gCKJXOSaEot9MVYky7AKjCs8g==}
@@ -532,10 +565,10 @@ packages:
cpu: [arm64]
os: [darwin]
- '@esbuild/darwin-x64@0.18.20':
- resolution: {integrity: sha512-pc5gxlMDxzm513qPGbCbDukOdsGtKhfxD1zJKXjCCcU7ju50O7MeAZ8c4krSJcOIJGFR+qx21yMMVYwiQvyTyQ==}
- engines: {node: '>=12'}
- cpu: [x64]
+ '@esbuild/darwin-arm64@0.23.0':
+ resolution: {integrity: sha512-YLntie/IdS31H54Ogdn+v50NuoWF5BDkEUFpiOChVa9UnKpftgwzZRrI4J132ETIi+D8n6xh9IviFV3eXdxfow==}
+ engines: {node: '>=18'}
+ cpu: [arm64]
os: [darwin]
'@esbuild/darwin-x64@0.19.12':
@@ -544,11 +577,11 @@ packages:
cpu: [x64]
os: [darwin]
- '@esbuild/freebsd-arm64@0.18.20':
- resolution: {integrity: sha512-yqDQHy4QHevpMAaxhhIwYPMv1NECwOvIpGCZkECn8w2WFHXjEwrBn3CeNIYsibZ/iZEUemj++M26W3cNR5h+Tw==}
- engines: {node: '>=12'}
- cpu: [arm64]
- os: [freebsd]
+ '@esbuild/darwin-x64@0.23.0':
+ resolution: {integrity: sha512-IMQ6eme4AfznElesHUPDZ+teuGwoRmVuuixu7sv92ZkdQcPbsNHzutd+rAfaBKo8YK3IrBEi9SLLKWJdEvJniQ==}
+ engines: {node: '>=18'}
+ cpu: [x64]
+ os: [darwin]
'@esbuild/freebsd-arm64@0.19.12':
resolution: {integrity: sha512-4aRvFIXmwAcDBw9AueDQ2YnGmz5L6obe5kmPT8Vd+/+x/JMVKCgdcRwH6APrbpNXsPz+K653Qg8HB/oXvXVukA==}
@@ -556,10 +589,10 @@ packages:
cpu: [arm64]
os: [freebsd]
- '@esbuild/freebsd-x64@0.18.20':
- resolution: {integrity: sha512-tgWRPPuQsd3RmBZwarGVHZQvtzfEBOreNuxEMKFcd5DaDn2PbBxfwLcj4+aenoh7ctXcbXmOQIn8HI6mCSw5MQ==}
- engines: {node: '>=12'}
- cpu: [x64]
+ '@esbuild/freebsd-arm64@0.23.0':
+ resolution: {integrity: sha512-0muYWCng5vqaxobq6LB3YNtevDFSAZGlgtLoAc81PjUfiFz36n4KMpwhtAd4he8ToSI3TGyuhyx5xmiWNYZFyw==}
+ engines: {node: '>=18'}
+ cpu: [arm64]
os: [freebsd]
'@esbuild/freebsd-x64@0.19.12':
@@ -568,11 +601,11 @@ packages:
cpu: [x64]
os: [freebsd]
- '@esbuild/linux-arm64@0.18.20':
- resolution: {integrity: sha512-2YbscF+UL7SQAVIpnWvYwM+3LskyDmPhe31pE7/aoTMFKKzIc9lLbyGUpmmb8a8AixOL61sQ/mFh3jEjHYFvdA==}
- engines: {node: '>=12'}
- cpu: [arm64]
- os: [linux]
+ '@esbuild/freebsd-x64@0.23.0':
+ resolution: {integrity: sha512-XKDVu8IsD0/q3foBzsXGt/KjD/yTKBCIwOHE1XwiXmrRwrX6Hbnd5Eqn/WvDekddK21tfszBSrE/WMaZh+1buQ==}
+ engines: {node: '>=18'}
+ cpu: [x64]
+ os: [freebsd]
'@esbuild/linux-arm64@0.19.12':
resolution: {integrity: sha512-EoTjyYyLuVPfdPLsGVVVC8a0p1BFFvtpQDB/YLEhaXyf/5bczaGeN15QkR+O4S5LeJ92Tqotve7i1jn35qwvdA==}
@@ -580,10 +613,10 @@ packages:
cpu: [arm64]
os: [linux]
- '@esbuild/linux-arm@0.18.20':
- resolution: {integrity: sha512-/5bHkMWnq1EgKr1V+Ybz3s1hWXok7mDFUMQ4cG10AfW3wL02PSZi5kFpYKrptDsgb2WAJIvRcDm+qIvXf/apvg==}
- engines: {node: '>=12'}
- cpu: [arm]
+ '@esbuild/linux-arm64@0.23.0':
+ resolution: {integrity: sha512-j1t5iG8jE7BhonbsEg5d9qOYcVZv/Rv6tghaXM/Ug9xahM0nX/H2gfu6X6z11QRTMT6+aywOMA8TDkhPo8aCGw==}
+ engines: {node: '>=18'}
+ cpu: [arm64]
os: [linux]
'@esbuild/linux-arm@0.19.12':
@@ -592,10 +625,10 @@ packages:
cpu: [arm]
os: [linux]
- '@esbuild/linux-ia32@0.18.20':
- resolution: {integrity: sha512-P4etWwq6IsReT0E1KHU40bOnzMHoH73aXp96Fs8TIT6z9Hu8G6+0SHSw9i2isWrD2nbx2qo5yUqACgdfVGx7TA==}
- engines: {node: '>=12'}
- cpu: [ia32]
+ '@esbuild/linux-arm@0.23.0':
+ resolution: {integrity: sha512-SEELSTEtOFu5LPykzA395Mc+54RMg1EUgXP+iw2SJ72+ooMwVsgfuwXo5Fn0wXNgWZsTVHwY2cg4Vi/bOD88qw==}
+ engines: {node: '>=18'}
+ cpu: [arm]
os: [linux]
'@esbuild/linux-ia32@0.19.12':
@@ -604,10 +637,10 @@ packages:
cpu: [ia32]
os: [linux]
- '@esbuild/linux-loong64@0.18.20':
- resolution: {integrity: sha512-nXW8nqBTrOpDLPgPY9uV+/1DjxoQ7DoB2N8eocyq8I9XuqJ7BiAMDMf9n1xZM9TgW0J8zrquIb/A7s3BJv7rjg==}
- engines: {node: '>=12'}
- cpu: [loong64]
+ '@esbuild/linux-ia32@0.23.0':
+ resolution: {integrity: sha512-P7O5Tkh2NbgIm2R6x1zGJJsnacDzTFcRWZyTTMgFdVit6E98LTxO+v8LCCLWRvPrjdzXHx9FEOA8oAZPyApWUA==}
+ engines: {node: '>=18'}
+ cpu: [ia32]
os: [linux]
'@esbuild/linux-loong64@0.19.12':
@@ -616,10 +649,10 @@ packages:
cpu: [loong64]
os: [linux]
- '@esbuild/linux-mips64el@0.18.20':
- resolution: {integrity: sha512-d5NeaXZcHp8PzYy5VnXV3VSd2D328Zb+9dEq5HE6bw6+N86JVPExrA6O68OPwobntbNJ0pzCpUFZTo3w0GyetQ==}
- engines: {node: '>=12'}
- cpu: [mips64el]
+ '@esbuild/linux-loong64@0.23.0':
+ resolution: {integrity: sha512-InQwepswq6urikQiIC/kkx412fqUZudBO4SYKu0N+tGhXRWUqAx+Q+341tFV6QdBifpjYgUndV1hhMq3WeJi7A==}
+ engines: {node: '>=18'}
+ cpu: [loong64]
os: [linux]
'@esbuild/linux-mips64el@0.19.12':
@@ -628,10 +661,10 @@ packages:
cpu: [mips64el]
os: [linux]
- '@esbuild/linux-ppc64@0.18.20':
- resolution: {integrity: sha512-WHPyeScRNcmANnLQkq6AfyXRFr5D6N2sKgkFo2FqguP44Nw2eyDlbTdZwd9GYk98DZG9QItIiTlFLHJHjxP3FA==}
- engines: {node: '>=12'}
- cpu: [ppc64]
+ '@esbuild/linux-mips64el@0.23.0':
+ resolution: {integrity: sha512-J9rflLtqdYrxHv2FqXE2i1ELgNjT+JFURt/uDMoPQLcjWQA5wDKgQA4t/dTqGa88ZVECKaD0TctwsUfHbVoi4w==}
+ engines: {node: '>=18'}
+ cpu: [mips64el]
os: [linux]
'@esbuild/linux-ppc64@0.19.12':
@@ -640,10 +673,10 @@ packages:
cpu: [ppc64]
os: [linux]
- '@esbuild/linux-riscv64@0.18.20':
- resolution: {integrity: sha512-WSxo6h5ecI5XH34KC7w5veNnKkju3zBRLEQNY7mv5mtBmrP/MjNBCAlsM2u5hDBlS3NGcTQpoBvRzqBcRtpq1A==}
- engines: {node: '>=12'}
- cpu: [riscv64]
+ '@esbuild/linux-ppc64@0.23.0':
+ resolution: {integrity: sha512-cShCXtEOVc5GxU0fM+dsFD10qZ5UpcQ8AM22bYj0u/yaAykWnqXJDpd77ublcX6vdDsWLuweeuSNZk4yUxZwtw==}
+ engines: {node: '>=18'}
+ cpu: [ppc64]
os: [linux]
'@esbuild/linux-riscv64@0.19.12':
@@ -652,10 +685,10 @@ packages:
cpu: [riscv64]
os: [linux]
- '@esbuild/linux-s390x@0.18.20':
- resolution: {integrity: sha512-+8231GMs3mAEth6Ja1iK0a1sQ3ohfcpzpRLH8uuc5/KVDFneH6jtAJLFGafpzpMRO6DzJ6AvXKze9LfFMrIHVQ==}
- engines: {node: '>=12'}
- cpu: [s390x]
+ '@esbuild/linux-riscv64@0.23.0':
+ resolution: {integrity: sha512-HEtaN7Y5UB4tZPeQmgz/UhzoEyYftbMXrBCUjINGjh3uil+rB/QzzpMshz3cNUxqXN7Vr93zzVtpIDL99t9aRw==}
+ engines: {node: '>=18'}
+ cpu: [riscv64]
os: [linux]
'@esbuild/linux-s390x@0.19.12':
@@ -664,10 +697,10 @@ packages:
cpu: [s390x]
os: [linux]
- '@esbuild/linux-x64@0.18.20':
- resolution: {integrity: sha512-UYqiqemphJcNsFEskc73jQ7B9jgwjWrSayxawS6UVFZGWrAAtkzjxSqnoclCXxWtfwLdzU+vTpcNYhpn43uP1w==}
- engines: {node: '>=12'}
- cpu: [x64]
+ '@esbuild/linux-s390x@0.23.0':
+ resolution: {integrity: sha512-WDi3+NVAuyjg/Wxi+o5KPqRbZY0QhI9TjrEEm+8dmpY9Xir8+HE/HNx2JoLckhKbFopW0RdO2D72w8trZOV+Wg==}
+ engines: {node: '>=18'}
+ cpu: [s390x]
os: [linux]
'@esbuild/linux-x64@0.19.12':
@@ -676,11 +709,11 @@ packages:
cpu: [x64]
os: [linux]
- '@esbuild/netbsd-x64@0.18.20':
- resolution: {integrity: sha512-iO1c++VP6xUBUmltHZoMtCUdPlnPGdBom6IrO4gyKPFFVBKioIImVooR5I83nTew5UOYrk3gIJhbZh8X44y06A==}
- engines: {node: '>=12'}
+ '@esbuild/linux-x64@0.23.0':
+ resolution: {integrity: sha512-a3pMQhUEJkITgAw6e0bWA+F+vFtCciMjW/LPtoj99MhVt+Mfb6bbL9hu2wmTZgNd994qTAEw+U/r6k3qHWWaOQ==}
+ engines: {node: '>=18'}
cpu: [x64]
- os: [netbsd]
+ os: [linux]
'@esbuild/netbsd-x64@0.19.12':
resolution: {integrity: sha512-3ltjQ7n1owJgFbuC61Oj++XhtzmymoCihNFgT84UAmJnxJfm4sYCiSLTXZtE00VWYpPMYc+ZQmB6xbSdVh0JWA==}
@@ -688,10 +721,16 @@ packages:
cpu: [x64]
os: [netbsd]
- '@esbuild/openbsd-x64@0.18.20':
- resolution: {integrity: sha512-e5e4YSsuQfX4cxcygw/UCPIEP6wbIL+se3sxPdCiMbFLBWu0eiZOJ7WoD+ptCLrmjZBK1Wk7I6D/I3NglUGOxg==}
- engines: {node: '>=12'}
+ '@esbuild/netbsd-x64@0.23.0':
+ resolution: {integrity: sha512-cRK+YDem7lFTs2Q5nEv/HHc4LnrfBCbH5+JHu6wm2eP+d8OZNoSMYgPZJq78vqQ9g+9+nMuIsAO7skzphRXHyw==}
+ engines: {node: '>=18'}
cpu: [x64]
+ os: [netbsd]
+
+ '@esbuild/openbsd-arm64@0.23.0':
+ resolution: {integrity: sha512-suXjq53gERueVWu0OKxzWqk7NxiUWSUlrxoZK7usiF50C6ipColGR5qie2496iKGYNLhDZkPxBI3erbnYkU0rQ==}
+ engines: {node: '>=18'}
+ cpu: [arm64]
os: [openbsd]
'@esbuild/openbsd-x64@0.19.12':
@@ -700,11 +739,11 @@ packages:
cpu: [x64]
os: [openbsd]
- '@esbuild/sunos-x64@0.18.20':
- resolution: {integrity: sha512-kDbFRFp0YpTQVVrqUd5FTYmWo45zGaXe0X8E1G/LKFC0v8x0vWrhOWSLITcCn63lmZIxfOMXtCfti/RxN/0wnQ==}
- engines: {node: '>=12'}
+ '@esbuild/openbsd-x64@0.23.0':
+ resolution: {integrity: sha512-6p3nHpby0DM/v15IFKMjAaayFhqnXV52aEmv1whZHX56pdkK+MEaLoQWj+H42ssFarP1PcomVhbsR4pkz09qBg==}
+ engines: {node: '>=18'}
cpu: [x64]
- os: [sunos]
+ os: [openbsd]
'@esbuild/sunos-x64@0.19.12':
resolution: {integrity: sha512-HKjJwRrW8uWtCQnQOz9qcU3mUZhTUQvi56Q8DPTLLB+DawoiQdjsYq+j+D3s9I8VFtDr+F9CjgXKKC4ss89IeA==}
@@ -712,11 +751,11 @@ packages:
cpu: [x64]
os: [sunos]
- '@esbuild/win32-arm64@0.18.20':
- resolution: {integrity: sha512-ddYFR6ItYgoaq4v4JmQQaAI5s7npztfV4Ag6NrhiaW0RrnOXqBkgwZLofVTlq1daVTQNhtI5oieTvkRPfZrePg==}
- engines: {node: '>=12'}
- cpu: [arm64]
- os: [win32]
+ '@esbuild/sunos-x64@0.23.0':
+ resolution: {integrity: sha512-BFelBGfrBwk6LVrmFzCq1u1dZbG4zy/Kp93w2+y83Q5UGYF1d8sCzeLI9NXjKyujjBBniQa8R8PzLFAUrSM9OA==}
+ engines: {node: '>=18'}
+ cpu: [x64]
+ os: [sunos]
'@esbuild/win32-arm64@0.19.12':
resolution: {integrity: sha512-URgtR1dJnmGvX864pn1B2YUYNzjmXkuJOIqG2HdU62MVS4EHpU2946OZoTMnRUHklGtJdJZ33QfzdjGACXhn1A==}
@@ -724,10 +763,10 @@ packages:
cpu: [arm64]
os: [win32]
- '@esbuild/win32-ia32@0.18.20':
- resolution: {integrity: sha512-Wv7QBi3ID/rROT08SABTS7eV4hX26sVduqDOTe1MvGMjNd3EjOz4b7zeexIR62GTIEKrfJXKL9LFxTYgkyeu7g==}
- engines: {node: '>=12'}
- cpu: [ia32]
+ '@esbuild/win32-arm64@0.23.0':
+ resolution: {integrity: sha512-lY6AC8p4Cnb7xYHuIxQ6iYPe6MfO2CC43XXKo9nBXDb35krYt7KGhQnOkRGar5psxYkircpCqfbNDB4uJbS2jQ==}
+ engines: {node: '>=18'}
+ cpu: [arm64]
os: [win32]
'@esbuild/win32-ia32@0.19.12':
@@ -736,10 +775,10 @@ packages:
cpu: [ia32]
os: [win32]
- '@esbuild/win32-x64@0.18.20':
- resolution: {integrity: sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ==}
- engines: {node: '>=12'}
- cpu: [x64]
+ '@esbuild/win32-ia32@0.23.0':
+ resolution: {integrity: sha512-7L1bHlOTcO4ByvI7OXVI5pNN6HSu6pUQq9yodga8izeuB1KcT2UkHaH6118QJwopExPn0rMHIseCTx1CRo/uNA==}
+ engines: {node: '>=18'}
+ cpu: [ia32]
os: [win32]
'@esbuild/win32-x64@0.19.12':
@@ -748,6 +787,12 @@ packages:
cpu: [x64]
os: [win32]
+ '@esbuild/win32-x64@0.23.0':
+ resolution: {integrity: sha512-Arm+WgUFLUATuoxCJcahGuk6Yj9Pzxd6l11Zb/2aAuv5kWWvvfhLFo2fni4uSK5vzlUdCGZ/BdV5tH8klj8p8g==}
+ engines: {node: '>=18'}
+ cpu: [x64]
+ os: [win32]
+
'@eslint-community/eslint-utils@4.4.0':
resolution: {integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
@@ -781,6 +826,22 @@ packages:
'@humanwhocodes/object-schema@1.2.1':
resolution: {integrity: sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==}
+ '@inquirer/confirm@3.1.22':
+ resolution: {integrity: sha512-gsAKIOWBm2Q87CDfs9fEo7wJT3fwWIJfnDGMn9Qy74gBnNFOACDNfhUzovubbJjWnKLGBln7/NcSmZwj5DuEXg==}
+ engines: {node: '>=18'}
+
+ '@inquirer/core@9.0.10':
+ resolution: {integrity: sha512-TdESOKSVwf6+YWDz8GhS6nKscwzkIyakEzCLJ5Vh6O3Co2ClhCJ0A4MG909MUWfaWdpJm7DE45ii51/2Kat9tA==}
+ engines: {node: '>=18'}
+
+ '@inquirer/figures@1.0.5':
+ resolution: {integrity: sha512-79hP/VWdZ2UVc9bFGJnoQ/lQMpL74mGgzSYX1xUqCVk7/v73vJCMw1VuyWN1jGkZ9B3z7THAbySqGbCNefcjfA==}
+ engines: {node: '>=18'}
+
+ '@inquirer/type@1.5.2':
+ resolution: {integrity: sha512-w9qFkumYDCNyDZmNQjf/n6qQuvQ4dMC3BJesY4oF+yr0CxR5vxujflAVeIcS6U336uzi9GM0kAfZlLrZ9UTkpA==}
+ engines: {node: '>=18'}
+
'@isaacs/cliui@8.0.2':
resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==}
engines: {node: '>=12'}
@@ -789,10 +850,6 @@ packages:
resolution: {integrity: sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==}
engines: {node: '>=8'}
- '@jest/schemas@29.6.3':
- resolution: {integrity: sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==}
- engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0}
-
'@jridgewell/gen-mapping@0.3.5':
resolution: {integrity: sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==}
engines: {node: '>=6.0.0'}
@@ -815,6 +872,9 @@ packages:
'@jridgewell/sourcemap-codec@1.4.15':
resolution: {integrity: sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==}
+ '@jridgewell/sourcemap-codec@1.5.0':
+ resolution: {integrity: sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==}
+
'@jridgewell/trace-mapping@0.3.25':
resolution: {integrity: sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==}
@@ -867,6 +927,10 @@ packages:
resolution: {integrity: sha512-ccfcIDlogiXNq5KcbAwbaO7lMh3Tm1i3khMPYpxlK8hH/W53zN81KM9coerRLOnTGu3nfXIniAmQbRI9OxbC0w==}
engines: {node: '>= 0.4'}
+ '@mswjs/interceptors@0.29.1':
+ resolution: {integrity: sha512-3rDakgJZ77+RiQUuSK69t1F0m8BQKA8Vh5DCS5V0DWvNY67zob2JhhQrhCO0AKLGINTRSFd1tBaHcJTkhefoSw==}
+ engines: {node: '>=18'}
+
'@nodelib/fs.scandir@2.1.5':
resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==}
engines: {node: '>= 8'}
@@ -879,6 +943,15 @@ packages:
resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==}
engines: {node: '>= 8'}
+ '@open-draft/deferred-promise@2.2.0':
+ resolution: {integrity: sha512-CecwLWx3rhxVQF6V4bAgPS5t+So2sTbPgAzafKkVizyi7tlwpcFpdFqq+wqF2OwNBmqFuu6tOyouTuxgpMfzmA==}
+
+ '@open-draft/logger@0.3.0':
+ resolution: {integrity: sha512-X2g45fzhxH238HKO4xbSr7+wBS8Fvw6ixhTDuvLd5mqh6bJJCFAPwU9mPDxbcrRtfxv4u5IHCEH77BmxvXmmxQ==}
+
+ '@open-draft/until@2.1.0':
+ resolution: {integrity: sha512-U69T3ItWHvLwGg5eJ0n3I62nWuE6ilHlmz7zM0npLBRvPRd7e6NYmg54vvRtP5mZG7kZqZCFVdsTWo7BPtBujg==}
+
'@pkgjs/parseargs@0.11.0':
resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==}
engines: {node: '>=14'}
@@ -969,8 +1042,8 @@ packages:
cpu: [x64]
os: [win32]
- '@sinclair/typebox@0.27.8':
- resolution: {integrity: sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==}
+ '@shikijs/core@1.12.1':
+ resolution: {integrity: sha512-biCz/mnkMktImI6hMfMX3H9kOeqsInxWEyCHbSlL8C/2TR1FqfmGxTLRNwYCKsyCyxWLbB8rEqXRVZuyxuLFmA==}
'@teidesu/deno-types@1.43.1':
resolution: {integrity: sha512-jzXpp07pu4035n3XJMkuBR1NAKquH0hA8dVwL7pMxoi8mWo7ki4uMz8KRpgGx78YYfyPuB91SKS5pnt2omKotQ==}
@@ -981,6 +1054,16 @@ packages:
peerDependencies:
typescript: ^5.0.0
+ '@testing-library/dom@10.4.0':
+ resolution: {integrity: sha512-pemlzrSESWbdAloYml3bAJMEfNh1Z7EduzqPKprCH5S341frlpYnUEW0H72dLxa6IsYr+mPno20GiSm+h9dEdQ==}
+ engines: {node: '>=18'}
+
+ '@testing-library/user-event@14.5.2':
+ resolution: {integrity: sha512-YAh82Wh4TIrxYLmfGcixwD18oIjyC1pFQC2Y01F2lzV2HTMiYrI0nze0FD0ocB//CKS/7jIUgae+adPqxK5yCQ==}
+ engines: {node: '>=12', npm: '>=6'}
+ peerDependencies:
+ '@testing-library/dom': '>=7.21.4'
+
'@ts-morph/common@0.23.0':
resolution: {integrity: sha512-m7Lllj9n/S6sOkCkRftpM7L24uvmfXQFedlW/4hENcuJH1HHm9u5EgxZb9uVjQSCGrbBWBkOGgcTxNg36r6ywA==}
@@ -996,9 +1079,15 @@ packages:
'@tsconfig/node16@1.0.2':
resolution: {integrity: sha512-eZxlbI8GZscaGS7kkc/trHTT5xgrjH3/1n2JDwusC9iahPKWMRvRjJSAN5mCXviuTGQ/lHnhvv8Q1YTpnfz9gA==}
+ '@types/aria-query@5.0.4':
+ resolution: {integrity: sha512-rfT93uj5s0PRL7EzccGMs3brplhcrghnDoV26NqKhCAS1hVo+WdNsPvE/yb6ilfr5hi2MEk6d5EWJTKdxg8jVw==}
+
'@types/better-sqlite3@7.6.4':
resolution: {integrity: sha512-dzrRZCYPXIXfSR1/surNbJ/grU3scTaygS0OMzjlGf71i9sc2fGyHPXXiXmEvNIoE0cGwsanEFMVJxPXmco9Eg==}
+ '@types/cookie@0.6.0':
+ resolution: {integrity: sha512-4Kh9a6B2bQciAhf7FSuMRRkUWecJgJu9nPnx3yzpsfXX/c50REIqpHY4C82bXP90qrLtXtkDxTZosYO3UpOwlA==}
+
'@types/cross-spawn@6.0.6':
resolution: {integrity: sha512-fXRhhUkG4H3TQk5dBhQ7m/JDdSNHKwR2BBia62lhwEIq9xGiQKLxd6LymNhn47SjXhsUEPmxi+PKw2OkW4LLjA==}
@@ -1008,12 +1097,12 @@ packages:
'@types/events@3.0.0':
resolution: {integrity: sha512-EaObqwIvayI5a8dCzhFrjKzVwKLxjoG9T6Ppd5CEo07LRKfQ8Yokw54r5+Wq7FaBQ+yXRvQAYPrHwya1/UFt9g==}
+ '@types/hast@3.0.4':
+ resolution: {integrity: sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ==}
+
'@types/inquirer@9.0.6':
resolution: {integrity: sha512-1Go1AAP/yOy3Pth5Xf1DC3nfZ03cJLCPx6E2YnSN/5I3w1jHBVH4170DkZ+JxfmA7c9kL9+bf9z3FRGa4kNAqg==}
- '@types/istanbul-lib-coverage@2.0.6':
- resolution: {integrity: sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==}
-
'@types/js-yaml@4.0.5':
resolution: {integrity: sha512-FhpRzf927MNQdRZP0J5DLIdTXhjLYzeUTmLAu69mnVksLH9CJY3IuSeEgbKUki7GQZm0WqDkGzyxju2EZGD2wA==}
@@ -1023,21 +1112,39 @@ packages:
'@types/json5@0.0.29':
resolution: {integrity: sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==}
+ '@types/mute-stream@0.0.4':
+ resolution: {integrity: sha512-CPM9nzrCPPJHQNA9keH9CVkVI+WR5kMa+7XEs5jcGQ0VoAGnLv242w8lIVgwAEfmE4oufJRaTc9PNLQl0ioAow==}
+
'@types/node@20.10.0':
resolution: {integrity: sha512-D0WfRmU9TQ8I9PFx9Yc+EBHw+vSpIub4IDvQivcp26PtPrdMGAq5SDcpXEo/epqa/DXotVpekHiLNTg3iaKXBQ==}
'@types/node@20.11.30':
resolution: {integrity: sha512-dHM6ZxwlmuZaRmUPfv1p+KrdD1Dci04FbdEm/9wEMouFqxYoFl5aMkt0VMAUtYRQDyYvD41WJLukhq/ha3YuTw==}
+ '@types/node@22.2.0':
+ resolution: {integrity: sha512-bm6EG6/pCpkxDf/0gDNDdtDILMOHgaQBVOJGdwsqClnxA3xL6jtMv76rLBc006RVMWbmaf0xbmom4Z/5o2nRkQ==}
+
'@types/openurl@1.0.3':
resolution: {integrity: sha512-rdWpxNve8iUBizep3BwjGzcdfk2XeXeeFiMwIgLN6dAKxCusfFC6H9XVvfPeNObRFpSgqI+HVmoG7UOB9HEnBQ==}
'@types/semver@7.5.0':
resolution: {integrity: sha512-G8hZ6XJiHnuhQKR7ZmysCeJWE08o8T0AXtk5darsCaTVsYZhhgUrq53jizaR2FvsoeCwJhlmwTjkXBY5Pn/ZHw==}
+ '@types/statuses@2.0.5':
+ resolution: {integrity: sha512-jmIUGWrAiwu3dZpxntxieC+1n/5c3mjrImkmOSQ2NC5uP6cYO4aAZDdSmRcI5C1oiTmqlZGHC+/NmJrKogbP5A==}
+
'@types/through@0.0.32':
resolution: {integrity: sha512-7XsfXIsjdfJM2wFDRAtEWp3zb2aVPk5QeyZxGlVK57q4u26DczMHhJmlhr0Jqv0THwxam/L8REXkj8M2I/lcvw==}
+ '@types/tough-cookie@4.0.5':
+ resolution: {integrity: sha512-/Ad8+nIOV7Rl++6f1BdKxFSMgmoqEoYbHRpPcx3JEfv8VRsQe9Z4mCXeJBzxs7mbHY/XOZZuXlRNfhpVPbs6ZA==}
+
+ '@types/unist@3.0.2':
+ resolution: {integrity: sha512-dqId9J8K/vGi5Zr7oo212BGii5m3q5Hxlkwy3WpYuKPklmBEvsbMYYyLxAQpSffdLl/gdW0XUpKWFvYmyoWCoQ==}
+
+ '@types/wrap-ansi@3.0.0':
+ resolution: {integrity: sha512-ltIpx+kM7g/MLRZfkbL7EsCEjfzCcScLpkg37eXEtx5kmrAKBkTJwd1GIAjDSL8wTpM6Hzn5YO4pSb91BEwu1g==}
+
'@types/ws@8.5.10':
resolution: {integrity: sha512-vmQSUcfalpIq0R9q7uTo2lXs6eGIpt9wtnLdMv9LVpIjCA/+ufZRozlVoVelIYixx1ugCBKDhn89vnsEGOCx9A==}
@@ -1102,12 +1209,12 @@ packages:
resolution: {integrity: sha512-yJSfyT+uJm+JRDWYRYdCm2i+pmvXJSMtPR9Cq5/XQs4QIgNoLcoRtDdzsLbLsFM/c6um6ohQkg/MLxWvoIndJA==}
engines: {node: ^16.0.0 || >=18.0.0}
- '@vitest/browser@1.4.0':
- resolution: {integrity: sha512-kC44DzuqPZZrqe2P7SX2a3zHDAt919WtpkUMAxzv9eP5uPfVXtpk2Ipms2NXJGY5190aJc1uY+ambfJ3rwDJRA==}
+ '@vitest/browser@2.0.5':
+ resolution: {integrity: sha512-VbOYtu/6R3d7ASZREcrJmRY/sQuRFO9wMVsEDqfYbWiJRh2fDNi8CL1Csn7Ux31pOcPmmM5QvzFCMpiojvVh8g==}
peerDependencies:
playwright: '*'
safaridriver: '*'
- vitest: 1.4.0
+ vitest: 2.0.5
webdriverio: '*'
peerDependenciesMeta:
playwright:
@@ -1117,30 +1224,33 @@ packages:
webdriverio:
optional: true
- '@vitest/coverage-v8@1.4.0':
- resolution: {integrity: sha512-4hDGyH1SvKpgZnIByr9LhGgCEuF9DKM34IBLCC/fVfy24Z3+PZ+Ii9hsVBsHvY1umM1aGPEjceRkzxCfcQ10wg==}
+ '@vitest/coverage-v8@2.0.5':
+ resolution: {integrity: sha512-qeFcySCg5FLO2bHHSa0tAZAOnAUbp4L6/A5JDuj9+bt53JREl8hpLjLHEWF0e/gWc8INVpJaqA7+Ene2rclpZg==}
peerDependencies:
- vitest: 1.4.0
+ vitest: 2.0.5
- '@vitest/expect@1.4.0':
- resolution: {integrity: sha512-Jths0sWCJZ8BxjKe+p+eKsoqev1/T8lYcrjavEaz8auEJ4jAVY0GwW3JKmdVU4mmNPLPHixh4GNXP7GFtAiDHA==}
+ '@vitest/expect@2.0.5':
+ resolution: {integrity: sha512-yHZtwuP7JZivj65Gxoi8upUN2OzHTi3zVfjwdpu2WrvCZPLwsJ2Ey5ILIPccoW23dd/zQBlJ4/dhi7DWNyXCpA==}
- '@vitest/runner@1.4.0':
- resolution: {integrity: sha512-EDYVSmesqlQ4RD2VvWo3hQgTJ7ZrFQ2VSJdfiJiArkCerDAGeyF1i6dHkmySqk573jLp6d/cfqCN+7wUB5tLgg==}
+ '@vitest/pretty-format@2.0.5':
+ resolution: {integrity: sha512-h8k+1oWHfwTkyTkb9egzwNMfJAEx4veaPSnMeKbVSjp4euqGSbQlm5+6VHwTr7u4FJslVVsUG5nopCaAYdOmSQ==}
- '@vitest/snapshot@1.4.0':
- resolution: {integrity: sha512-saAFnt5pPIA5qDGxOHxJ/XxhMFKkUSBJmVt5VgDsAqPTX6JP326r5C/c9UuCMPoXNzuudTPsYDZCoJ5ilpqG2A==}
+ '@vitest/runner@2.0.5':
+ resolution: {integrity: sha512-TfRfZa6Bkk9ky4tW0z20WKXFEwwvWhRY+84CnSEtq4+3ZvDlJyY32oNTJtM7AW9ihW90tX/1Q78cb6FjoAs+ig==}
- '@vitest/spy@1.4.0':
- resolution: {integrity: sha512-Ywau/Qs1DzM/8Uc+yA77CwSegizMlcgTJuYGAi0jujOteJOUf1ujunHThYo243KG9nAyWT3L9ifPYZ5+As/+6Q==}
+ '@vitest/snapshot@2.0.5':
+ resolution: {integrity: sha512-SgCPUeDFLaM0mIUHfaArq8fD2WbaXG/zVXjRupthYfYGzc8ztbFbu6dUNOblBG7XLMR1kEhS/DNnfCZ2IhdDew==}
- '@vitest/ui@1.4.0':
- resolution: {integrity: sha512-XC6CMhN1gzYcGbpn6/Oanj4Au2EXwQEX6vpcOeLlZv8dy7g11Ukx8zwtYQbwxs9duK2s9j2o5rbQiCP5DPAcmw==}
+ '@vitest/spy@2.0.5':
+ resolution: {integrity: sha512-c/jdthAhvJdpfVuaexSrnawxZz6pywlTPe84LUB2m/4t3rl2fTo9NFGBG4oWgaD+FTgDDV8hJ/nibT7IfH3JfA==}
+
+ '@vitest/ui@2.0.5':
+ resolution: {integrity: sha512-m+ZpVt/PVi/nbeRKEjdiYeoh0aOfI9zr3Ria9LO7V2PlMETtAXJS3uETEZkc8Be2oOl8mhd7Ew+5SRBXRYncNw==}
peerDependencies:
- vitest: 1.4.0
+ vitest: 2.0.5
- '@vitest/utils@1.4.0':
- resolution: {integrity: sha512-mx3Yd1/6e2Vt/PUC98DcqTirtfxUyAZ32uK82r8rZzbtBeBo+nqgnjx/LvqQdWsrvNtm14VmurNgcf4nqY5gJg==}
+ '@vitest/utils@2.0.5':
+ resolution: {integrity: sha512-d8HKbqIcya+GR67mkZbrzhS5kKhtp8dQLcmRZLGTscGVg7yImT82cIrhtn2L8+VujWcy6KZweApgNmPsTAO/UQ==}
acorn-jsx@5.3.2:
resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==}
@@ -1151,20 +1261,11 @@ packages:
resolution: {integrity: sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==}
engines: {node: '>=0.4.0'}
- acorn-walk@8.3.2:
- resolution: {integrity: sha512-cjkyv4OtNCIeqhHrfS81QWXoCBPExR/J62oyEqepVw8WaQeSqpW2uhuLPh1m9eWhDuOo/jUXVTlifvesOWp/4A==}
- engines: {node: '>=0.4.0'}
-
acorn@8.10.0:
resolution: {integrity: sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==}
engines: {node: '>=0.4.0'}
hasBin: true
- acorn@8.11.3:
- resolution: {integrity: sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==}
- engines: {node: '>=0.4.0'}
- hasBin: true
-
ajv@6.12.6:
resolution: {integrity: sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==}
@@ -1180,8 +1281,9 @@ packages:
resolution: {integrity: sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==}
engines: {node: '>=12'}
- ansi-sequence-parser@1.1.0:
- resolution: {integrity: sha512-lEm8mt52to2fT8GhciPCGeCXACSz2UwIN4X2e2LJSnZ5uAbn2/dsYdOmUXq0AtWS5cpAupysIneExOgH0Vd2TQ==}
+ ansi-styles@3.2.1:
+ resolution: {integrity: sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==}
+ engines: {node: '>=4'}
ansi-styles@4.3.0:
resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==}
@@ -1204,6 +1306,9 @@ packages:
argparse@2.0.1:
resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==}
+ aria-query@5.3.0:
+ resolution: {integrity: sha512-b0P0sZPKtyu8HkeRAfCq0IfURZK+SuwMjY1UXGBU27wpAiTwQAIlq56IbIO+ytk/JjS1fMR14ee5WBBfKi5J6A==}
+
array-buffer-byte-length@1.0.0:
resolution: {integrity: sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==}
@@ -1233,9 +1338,6 @@ packages:
assert@2.1.0:
resolution: {integrity: sha512-eLHpSK/Y4nhMJ07gDaAzoX/XAKS8PSaojml3M0DM4JpV1LAi5JOJ/p6H/XWrl8L+DzVEvVCW1z3vWAaB9oTsQw==}
- assertion-error@1.1.0:
- resolution: {integrity: sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==}
-
assertion-error@2.0.1:
resolution: {integrity: sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==}
engines: {node: '>=12'}
@@ -1342,14 +1444,18 @@ packages:
resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==}
engines: {node: '>=6'}
- chai@4.4.1:
- resolution: {integrity: sha512-13sOfMv2+DWduEU+/xbun3LScLoqN17nBeTLUsmDfKdoiC1fr0n9PU4guu4AhRcOVFk/sW8LyZWHuhWtQZiF+g==}
- engines: {node: '>=4'}
-
chai@5.1.0:
resolution: {integrity: sha512-kDZ7MZyM6Q1DhR9jy7dalKohXQ2yrlXkk59CR52aRKxJrobmlBNqnFQxX9xOX8w+4mz8SYlKJa/7D7ddltFXCw==}
engines: {node: '>=12'}
+ chai@5.1.1:
+ resolution: {integrity: sha512-pT1ZgP8rPNqUgieVaEY+ryQr6Q4HXNg8Ei9UnLUrjN4IA7dvQC5JB+/kxVcPNDHyBcc/26CXPkbNzq3qwrOEKA==}
+ engines: {node: '>=12'}
+
+ chalk@2.4.2:
+ resolution: {integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==}
+ engines: {node: '>=4'}
+
chalk@4.1.2:
resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==}
engines: {node: '>=10'}
@@ -1361,13 +1467,14 @@ packages:
chardet@0.7.0:
resolution: {integrity: sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==}
- check-error@1.0.3:
- resolution: {integrity: sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg==}
-
check-error@2.0.0:
resolution: {integrity: sha512-tjLAOBHKVxtPoHe/SA7kNOMvhCRdCJ3vETdeY0RuAc9popf+hyaSV6ZEg9hr4cpWF7jmo/JSWEnLDrnijS9Tog==}
engines: {node: '>= 16'}
+ check-error@2.1.1:
+ resolution: {integrity: sha512-OAlb+T7V4Op9OwdkjmguYRqncdlx5JiofwOAUkmTF+jNdHwzTaTs4sRAGpzLF3oOz5xAyDGrPgeIDFQmDOTiJw==}
+ engines: {node: '>= 16'}
+
cheerio-select@2.1.0:
resolution: {integrity: sha512-9v9kG0LvzrlcungtnJtpGNxY+fzECQKhK4EGJX2vByejiMX84MFNQw4UxPJl3bFbTMw+Dfs37XaIkCwTZfLh4g==}
@@ -1392,6 +1499,10 @@ packages:
resolution: {integrity: sha512-jHgecW0pxkonBJdrKsqxgRX9AcG+u/5k0Q7WPDfi8AogLAdwxEkyYYNWwZ5GvVFoFx2uiY1eNcSK00fh+1+FyQ==}
engines: {node: '>=6'}
+ cli-spinners@2.9.2:
+ resolution: {integrity: sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==}
+ engines: {node: '>=6'}
+
cli-width@4.1.0:
resolution: {integrity: sha512-ouuZd4/dm2Sw5Gmqy6bGyNNNe1qt9RpmxveLSO7KcgsTnU7RXfsw+/bukWGo1abgBiMAic068rclZsO4IWmmxQ==}
engines: {node: '>= 12'}
@@ -1407,10 +1518,16 @@ packages:
code-block-writer@13.0.1:
resolution: {integrity: sha512-c5or4P6erEA69TxaxTNcHUNcIn+oyxSRTOWV+pSYF+z4epXqNvwvJ70XPGjPNgue83oAFAPBRQYwpAJ/Hpe/Sg==}
+ color-convert@1.9.3:
+ resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==}
+
color-convert@2.0.1:
resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==}
engines: {node: '>=7.0.0'}
+ color-name@1.1.3:
+ resolution: {integrity: sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==}
+
color-name@1.1.4:
resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==}
@@ -1426,8 +1543,9 @@ packages:
constants-browserify@1.0.0:
resolution: {integrity: sha512-xFxOwqIzR/e1k1gLiWEophSCMqXcwVHIH7akf7b/vxcUeGunlj3hvZaaqxwHsTgn+IndtkQJgSztIDWeumWJDQ==}
- convert-source-map@2.0.0:
- resolution: {integrity: sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==}
+ cookie@0.5.0:
+ resolution: {integrity: sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==}
+ engines: {node: '>= 0.6'}
core-util-is@1.0.3:
resolution: {integrity: sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==}
@@ -1483,6 +1601,15 @@ packages:
supports-color:
optional: true
+ debug@4.3.6:
+ resolution: {integrity: sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg==}
+ engines: {node: '>=6.0'}
+ peerDependencies:
+ supports-color: '*'
+ peerDependenciesMeta:
+ supports-color:
+ optional: true
+
decompress-response@6.0.0:
resolution: {integrity: sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==}
engines: {node: '>=10'}
@@ -1495,10 +1622,6 @@ packages:
babel-plugin-macros:
optional: true
- deep-eql@4.1.3:
- resolution: {integrity: sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw==}
- engines: {node: '>=6'}
-
deep-eql@5.0.1:
resolution: {integrity: sha512-nwQCf6ne2gez3o1MxWifqkciwt0zhl0LO1/UwVu4uMBuPmflWM4oQ70XMqHqnBJA+nhzncaqL9HVL6KkHJ28lw==}
engines: {node: '>=6'}
@@ -1525,6 +1648,10 @@ packages:
resolution: {integrity: sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==}
engines: {node: '>= 0.4'}
+ dequal@2.0.3:
+ resolution: {integrity: sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==}
+ engines: {node: '>=6'}
+
des.js@1.1.0:
resolution: {integrity: sha512-r17GxjhUCjSRy8aiJpr8/UadFIzMzJGexI3Nmz4ADi9LYSFx4gTBp80+NaX/YsXWWLhpZ7v/v/ubEc/bCNfKwg==}
@@ -1532,10 +1659,6 @@ packages:
resolution: {integrity: sha512-463v3ZeIrcWtdgIg6vI6XUncguvr2TnGl4SzDXinkt9mSLpBJKXT3mW6xT3VQdDN11+WVs29pgvivTc4Lp8v+w==}
engines: {node: '>=8'}
- diff-sequences@29.6.3:
- resolution: {integrity: sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==}
- engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0}
-
diff@4.0.2:
resolution: {integrity: sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==}
engines: {node: '>=0.3.1'}
@@ -1555,6 +1678,9 @@ packages:
resolution: {integrity: sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==}
engines: {node: '>=6.0.0'}
+ dom-accessibility-api@0.5.16:
+ resolution: {integrity: sha512-X7BJ2yElsnOJ30pZF4uIIDfBEVgF4XEBxL9Bxhy6dnrm5hkzqmsWHGTiHqRiITNhMyFLyAiWndIJP7Z1NTteDg==}
+
dom-serializer@1.4.1:
resolution: {integrity: sha512-VHwB3KfrcOOkelEG2ZOfxqLZdfkil8PtJi4P8N2MMXucZq2yLp75ClViUlOVwyoHEDjYU433Aq+5zWP61+RGag==}
@@ -1582,13 +1708,13 @@ packages:
domutils@3.1.0:
resolution: {integrity: sha512-H78uMmQtI2AhgDJjWeQmHwJJ2bLPD3GMmO7Zja/ZZh84wkm+4ut+IUnUdRa8uCGX88DiVx1j6FRe1XfxEgjEZA==}
- dotenv-flow@3.2.0:
- resolution: {integrity: sha512-GEB6RrR4AbqDJvNSFrYHqZ33IKKbzkvLYiD5eo4+9aFXr4Y4G+QaFrB/fNp0y6McWBmvaPn3ZNjIufnj8irCtg==}
- engines: {node: '>= 8.0.0'}
+ dotenv-flow@4.1.0:
+ resolution: {integrity: sha512-0cwP9jpQBQfyHwvE0cRhraZMkdV45TQedA8AAUZMsFzvmLcQyc1HPv+oX0OOYwLFjIlvgVepQ+WuQHbqDaHJZg==}
+ engines: {node: '>= 12.0.0'}
- dotenv@8.6.0:
- resolution: {integrity: sha512-IrPdXQsk2BbzvCBGBOTmmSH5SodmqZNt4ERAZDmW4CT+tL8VtvinqywuANaFu4bOMWki16nqf0e4oC0QIaDr/g==}
- engines: {node: '>=10'}
+ dotenv@16.4.5:
+ resolution: {integrity: sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==}
+ engines: {node: '>=12'}
dpdm@3.14.0:
resolution: {integrity: sha512-YJzsFSyEtj88q5eTELg3UWU7TVZkG1dpbF4JDQ3t1b07xuzXmdoGeSz9TKOke1mUuOpWlk4q+pBh+aHzD6GBTg==}
@@ -1649,20 +1775,24 @@ packages:
resolution: {integrity: sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==}
engines: {node: '>= 0.4'}
- esbuild@0.18.20:
- resolution: {integrity: sha512-ceqxoedUrcayh7Y7ZX6NdbbDzGROiyVBgC4PriJThBKSVPWnnFHZAkfI1lJT8QFkOwH4qOS2SJkS4wvpGl8BpA==}
- engines: {node: '>=12'}
- hasBin: true
-
esbuild@0.19.12:
resolution: {integrity: sha512-aARqgq8roFBj054KvQr5f1sFu0D65G+miZRCuJyJ0G13Zwx7vRar5Zhn2tkQNzIXcBrNVsv/8stehpj+GAjgbg==}
engines: {node: '>=12'}
hasBin: true
+ esbuild@0.23.0:
+ resolution: {integrity: sha512-1lvV17H2bMYda/WaFb2jLPeHU3zml2k4/yagNMG8Q/YtfMjCwEUZa2eXXMgZTVSL5q1n4H7sQ0X6CdJDqqeCFA==}
+ engines: {node: '>=18'}
+ hasBin: true
+
escalade@3.1.1:
resolution: {integrity: sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==}
engines: {node: '>=6'}
+ escape-string-regexp@1.0.5:
+ resolution: {integrity: sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==}
+ engines: {node: '>=0.8.0'}
+
escape-string-regexp@4.0.0:
resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==}
engines: {node: '>=10'}
@@ -1923,23 +2053,18 @@ packages:
resolution: {integrity: sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==}
engines: {node: '>=10.13.0'}
- glob@10.2.6:
- resolution: {integrity: sha512-U/rnDpXJGF414QQQZv5uVsabTVxMSwzS5CH0p3DRCIV6ownl4f7PzGnkGmvlum2wB+9RlJWJZ6ACU1INnBqiPA==}
- engines: {node: '>=16 || 14 >=14.17'}
+ glob@10.4.5:
+ resolution: {integrity: sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==}
hasBin: true
- glob@10.3.10:
- resolution: {integrity: sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==}
- engines: {node: '>=16 || 14 >=14.17'}
- hasBin: true
-
- glob@10.3.12:
- resolution: {integrity: sha512-TCNv8vJ+xz4QiqTpfOJA7HvYv+tNIRHKfUWw/q+v2jdgN4ebz+KY9tGx5J4rHP0o84mNP+ApH66HRX8us3Khqg==}
- engines: {node: '>=16 || 14 >=14.17'}
+ glob@11.0.0:
+ resolution: {integrity: sha512-9UiX/Bl6J2yaBbxKoEBRm4Cipxgok8kQYcOPEhScPwebu2I0HoQOuYdIO6S3hLuWoZgpDpwQZMzTFxgpkyT76g==}
+ engines: {node: 20 || >=22}
hasBin: true
glob@7.2.3:
resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==}
+ deprecated: Glob versions prior to v9 are no longer supported
globals@13.20.0:
resolution: {integrity: sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==}
@@ -1962,6 +2087,10 @@ packages:
graphemer@1.4.0:
resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==}
+ graphql@16.9.0:
+ resolution: {integrity: sha512-GGTKBX4SD7Wdb8mqeDLni2oaRGYQWjWHGKPQ24ZMnUtKfcsVoiv4uX8+LJr1K6U5VW2Lu1BwJnj7uiori0YtRw==}
+ engines: {node: ^12.22.0 || ^14.16.0 || ^16.0.0 || >=17.0.0}
+
gunzip-maybe@1.4.2:
resolution: {integrity: sha512-4haO1M4mLO91PW57BMsDFf75UmwoRX0GkdD+Faw+Lr+r/OZrOCS0pIBwOL1xCKQqnQzbNFGgK2V2CpBUPeFNTw==}
hasBin: true
@@ -1974,6 +2103,10 @@ packages:
has-bigints@1.0.2:
resolution: {integrity: sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==}
+ has-flag@3.0.0:
+ resolution: {integrity: sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==}
+ engines: {node: '>=4'}
+
has-flag@4.0.0:
resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==}
engines: {node: '>=8'}
@@ -2015,6 +2148,9 @@ packages:
resolution: {integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==}
engines: {node: '>= 0.4'}
+ headers-polyfill@4.0.3:
+ resolution: {integrity: sha512-IScLbePpkvO846sIwOtOTDjutRMWdXdJmXdMvk6gCBHxFO8d+QKOQedyZSxFTTFYRSmlgSTDtXqqq4pcenBXLQ==}
+
hmac-drbg@1.0.1:
resolution: {integrity: sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg==}
@@ -2141,6 +2277,9 @@ packages:
resolution: {integrity: sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==}
engines: {node: '>= 0.4'}
+ is-node-process@1.2.0:
+ resolution: {integrity: sha512-Vg4o6/fqPxIjtxgUH5QLJhwZ7gW5diGCVlXpuUfELC62CuxM1iHcRe51f2W1FDy04Ai4KJkagKjx3XaqyfRKXw==}
+
is-number-object@1.0.7:
resolution: {integrity: sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==}
engines: {node: '>= 0.4'}
@@ -2205,20 +2344,23 @@ packages:
resolution: {integrity: sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==}
engines: {node: '>=10'}
- istanbul-lib-source-maps@5.0.4:
- resolution: {integrity: sha512-wHOoEsNJTVltaJp8eVkm8w+GVkVNHT2YDYo53YdzQEL2gWm1hBX5cGFR9hQJtuGLebidVX7et3+dmDZrmclduw==}
+ istanbul-lib-source-maps@5.0.6:
+ resolution: {integrity: sha512-yg2d+Em4KizZC5niWhQaIomgf5WlL4vOOjZ5xGCmF8SnPE/mDWWXgvRExdcpCgh9lLRRa1/fSYp2ymmbJ1pI+A==}
engines: {node: '>=10'}
istanbul-reports@3.1.7:
resolution: {integrity: sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g==}
engines: {node: '>=8'}
- jackspeak@2.3.6:
- resolution: {integrity: sha512-N3yCS/NegsOBokc8GAdM8UcmfsKiSS8cipheD/nivzr700H+nsMOxJjQnvwOcRYVuFkdH0wGUvW2WbXGmrZGbQ==}
- engines: {node: '>=14'}
+ jackspeak@3.4.3:
+ resolution: {integrity: sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==}
- js-tokens@8.0.3:
- resolution: {integrity: sha512-UfJMcSJc+SEXEl9lH/VLHSZbThQyLpw1vLO1Lb+j4RWDvG3N2f7yj3PVQA3cmkTBNldJ9eFnM+xEXxHIXrYiJw==}
+ jackspeak@4.0.1:
+ resolution: {integrity: sha512-cub8rahkh0Q/bw1+GxP7aeSe29hHHn2V4m29nnDlvCdlgU+3UGxkZp7Z53jLUdpX3jdTO0nJZUDl3xvbWc2Xog==}
+ engines: {node: 20 || >=22}
+
+ js-tokens@4.0.0:
+ resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==}
js-yaml@4.1.0:
resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==}
@@ -2239,9 +2381,6 @@ packages:
engines: {node: '>=6'}
hasBin: true
- jsonc-parser@3.2.0:
- resolution: {integrity: sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==}
-
jsonfile@6.1.0:
resolution: {integrity: sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==}
@@ -2249,9 +2388,8 @@ packages:
resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==}
engines: {node: '>= 0.8.0'}
- local-pkg@0.5.0:
- resolution: {integrity: sha512-ok6z3qlYyCDS4ZEU27HaU6x/xZa9Whf8jD4ptH5UZTQYZVYeb9bnZ3ojVhiJNLiXK1Hfc0GNbLXcmZ5plLDDBg==}
- engines: {node: '>=14'}
+ linkify-it@5.0.0:
+ resolution: {integrity: sha512-5aHCbzQRADcdP+ATqnDuhhJ/MRIqDkZX5pyjFHRRysS8vZ5AbqGEoFIb6pYHPZ+L/OC2Lc+xT8uHVVR5CAK/wQ==}
locate-path@6.0.0:
resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==}
@@ -2270,33 +2408,40 @@ packages:
long@5.2.3:
resolution: {integrity: sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q==}
- loupe@2.3.7:
- resolution: {integrity: sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA==}
-
loupe@3.1.0:
resolution: {integrity: sha512-qKl+FrLXUhFuHUoDJG7f8P8gEMHq9NFS0c6ghXG1J0rldmZFQZoNVv/vyirE9qwCIhWZDsvEFd1sbFu3GvRQFg==}
+ loupe@3.1.1:
+ resolution: {integrity: sha512-edNu/8D5MKVfGVFRhFf8aAxiTM6Wumfz5XsaatSxlD3w4R1d/WEKUTydCdPGbl9K7QG/Ca3GnDV2sIKIpXRQcw==}
+
lru-cache@10.2.2:
resolution: {integrity: sha512-9hp3Vp2/hFQUiIwKo8XCeFVnrg8Pk3TYNPIR7tJADKi5YfcF7vEaK7avFHTlSy3kOKYaJQaalfEo6YuXdceBOQ==}
engines: {node: 14 || >=16.14}
+ lru-cache@11.0.0:
+ resolution: {integrity: sha512-Qv32eSV1RSCfhY3fpPE2GNZ8jgM9X7rdAfemLWqTUxwiyIC4jJ6Sy0fZ8H+oLWevO6i4/bizg7c8d8i6bxrzbA==}
+ engines: {node: 20 || >=22}
+
lru-cache@6.0.0:
resolution: {integrity: sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==}
engines: {node: '>=10'}
- lru-cache@9.1.2:
- resolution: {integrity: sha512-ERJq3FOzJTxBbFjZ7iDs+NiK4VI9Wz+RdrrAB8dio1oV+YvdPzUEE4QNiT2VD51DkIbCYRUUzCRkssXCHqSnKQ==}
- engines: {node: 14 || >=16.14}
-
lunr@2.3.9:
resolution: {integrity: sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==}
+ lz-string@1.5.0:
+ resolution: {integrity: sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ==}
+ hasBin: true
+
+ magic-string@0.30.11:
+ resolution: {integrity: sha512-+Wri9p0QHMy+545hKww7YAu5NyzF8iomPL/RQazugQ9+Ez4Ic3mERMd8ZTX5rfK944j+560ZJi8iAwgak1Ac7A==}
+
magic-string@0.30.8:
resolution: {integrity: sha512-ISQTe55T2ao7XtlAStud6qwYPZjE4GK1S/BeVPus4jrq6JuOnQ00YKQC581RWhR122W7msZV263KzVeLoqidyQ==}
engines: {node: '>=12'}
- magicast@0.3.3:
- resolution: {integrity: sha512-ZbrP1Qxnpoes8sz47AM0z08U+jW6TyRgZzcWy3Ma3vDhJttwMwAFDMMQFobwdBxByBD46JYmxRzeF7w2+wJEuw==}
+ magicast@0.3.4:
+ resolution: {integrity: sha512-TyDF/Pn36bBji9rWKHlZe+PZb6Mx5V8IHCSxk7X4aljM4e/vyDvZZYwHewdVaqiA0nb3ghfHU/6AUpDxWoER2Q==}
make-dir@4.0.0:
resolution: {integrity: sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==}
@@ -2305,14 +2450,16 @@ packages:
make-error@1.3.6:
resolution: {integrity: sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==}
- marked@4.3.0:
- resolution: {integrity: sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A==}
- engines: {node: '>= 12'}
+ markdown-it@14.1.0:
+ resolution: {integrity: sha512-a54IwgWPaeBCAAsv13YgmALOF1elABB08FxO9i+r4VFk5Vl4pKokRPeX8u5TCgSsPi6ec1otfLjdOpVcgbpshg==}
hasBin: true
md5.js@1.3.5:
resolution: {integrity: sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==}
+ mdurl@2.0.0:
+ resolution: {integrity: sha512-Lf+9+2r+Tdp5wXDXC4PcIBjTDtq4UKjCPMQhKIuzpJNW0b96kVqSwW0bT7FhRSfmAiFYgP+SCRvdrDozfh0U5w==}
+
merge-stream@2.0.0:
resolution: {integrity: sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==}
@@ -2346,26 +2493,22 @@ packages:
minimalistic-crypto-utils@1.0.1:
resolution: {integrity: sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg==}
+ minimatch@10.0.1:
+ resolution: {integrity: sha512-ethXTt3SGGR+95gudmqJ1eNhRO7eGEGIgYA9vnPatK4/etz2MEVDno5GMCibdMTuBMyElzIlgxMna3K94XDIDQ==}
+ engines: {node: 20 || >=22}
+
minimatch@3.1.2:
resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==}
- minimatch@9.0.1:
- resolution: {integrity: sha512-0jWhJpD/MdhPXwPuiRkCbfYfSKp2qnn2eOc279qI7f+osl/l+prKSrvhg157zSYvx/1nmgn2NqdT6k2Z7zSH9w==}
- engines: {node: '>=16 || 14 >=14.17'}
-
- minimatch@9.0.3:
- resolution: {integrity: sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==}
+ minimatch@9.0.5:
+ resolution: {integrity: sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==}
engines: {node: '>=16 || 14 >=14.17'}
minimist@1.2.6:
resolution: {integrity: sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==}
- minipass@6.0.2:
- resolution: {integrity: sha512-MzWSV5nYVT7mVyWCwn2o7JH13w2TBRmmSqSRCKzTw+lmft9X4z+3wjvs06Tzijo5z4W/kahUCDpRXTF+ZrmF/w==}
- engines: {node: '>=16 || 14 >=14.17'}
-
- minipass@7.0.4:
- resolution: {integrity: sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==}
+ minipass@7.1.2:
+ resolution: {integrity: sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==}
engines: {node: '>=16 || 14 >=14.17'}
mkdirp-classic@0.5.3:
@@ -2376,9 +2519,6 @@ packages:
engines: {node: '>=10'}
hasBin: true
- mlly@1.6.1:
- resolution: {integrity: sha512-vLgaHvaeunuOXHSmEbZ9izxPx3USsk8KCQ8iC+aTlp5sKRSoZvwhHh5L9VbKSaVC6sJDqbyohIS76E2VmHIPAA==}
-
mrmime@2.0.0:
resolution: {integrity: sha512-eu38+hdgojoyq63s+yTpN4XMBdt5l8HhMhc4VKLO9KM5caLIBvUm4thi7fFaxyTmCKeNnXZ5pAlBwCUnhA09uw==}
engines: {node: '>=10'}
@@ -2389,6 +2529,16 @@ packages:
ms@2.1.3:
resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==}
+ msw@2.3.5:
+ resolution: {integrity: sha512-+GUI4gX5YC5Bv33epBrD+BGdmDvBg2XGruiWnI3GbIbRmMMBeZ5gs3mJ51OWSGHgJKztZ8AtZeYMMNMVrje2/Q==}
+ engines: {node: '>=18'}
+ hasBin: true
+ peerDependencies:
+ typescript: '>= 4.7.x'
+ peerDependenciesMeta:
+ typescript:
+ optional: true
+
mute-stream@1.0.0:
resolution: {integrity: sha512-avsJQhyd+680gKXyG/sQc0nXaC6rBkPOfyHYcFb9+hdkqQkR9bdnkJ0AMZhke0oesPqIO+mFFJ+IdBc7mst4IA==}
engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0}
@@ -2484,18 +2634,20 @@ packages:
resolution: {integrity: sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==}
engines: {node: '>=0.10.0'}
+ outvariant@1.4.3:
+ resolution: {integrity: sha512-+Sl2UErvtsoajRDKCE5/dBz4DIvHXQQnAxtQTF04OJxY0+DyZXSo5P5Bb7XYWOh81syohlYL24hbDwxedPUJCA==}
+
p-limit@3.1.0:
resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==}
engines: {node: '>=10'}
- p-limit@5.0.0:
- resolution: {integrity: sha512-/Eaoq+QyLSiXQ4lyYV23f14mZRQcXnxfHrN0vCai+ak9G0pp9iEQukIIZq5NccEvwRB8PUnZT0KsOoDCINS1qQ==}
- engines: {node: '>=18'}
-
p-locate@5.0.0:
resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==}
engines: {node: '>=10'}
+ package-json-from-dist@1.0.0:
+ resolution: {integrity: sha512-dATvCeZN/8wQsGywez1mzHtTlP22H8OEfPrVMLNr4/eGa+ijtLn/6M5f0dY8UKNrC2O9UCU6SSoG3qRKnt7STw==}
+
pako@0.2.9:
resolution: {integrity: sha512-NUcwaKxUxWrZLpDG+z/xZaCgQITkA/Dv4V/T6bw7VON6l1Xz/VnrBqrYjZQ12TamKHzITTfOEIYUj48y2KXImA==}
@@ -2538,13 +2690,16 @@ packages:
path-parse@1.0.7:
resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==}
- path-scurry@1.10.1:
- resolution: {integrity: sha512-MkhCqzzBEpPvxxQ71Md0b1Kk51W01lrYvlMzSUaIzNsODdd7mqhiimSZlr+VegAz5Z6Vzt9Xg2ttE//XBhH3EQ==}
- engines: {node: '>=16 || 14 >=14.17'}
+ path-scurry@1.11.1:
+ resolution: {integrity: sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==}
+ engines: {node: '>=16 || 14 >=14.18'}
- path-scurry@1.10.2:
- resolution: {integrity: sha512-7xTavNy5RQXnsjANvVvMkEjvloOinkAjv/Z6Ildz9v2RinZ4SBKTWFOVRbaF8p0vpHnyjV/UwNDdKuUv6M5qcA==}
- engines: {node: '>=16 || 14 >=14.17'}
+ path-scurry@2.0.0:
+ resolution: {integrity: sha512-ypGJsmGtdXUOeM5u93TyeIEfEhM6s+ljAhrk5vAvSx8uyY/02OvrZnA0YNGUrPXfpJMgI1ODd3nwz8Npx4O4cg==}
+ engines: {node: 20 || >=22}
+
+ path-to-regexp@6.2.2:
+ resolution: {integrity: sha512-GQX3SSMokngb36+whdpRXE+3f9V8UzyAorlYvOGx87ufGHehNTn5lCxrKtLyZ4Yl/wEKnNnr98ZzOwwDZV5ogw==}
path-type@4.0.0:
resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==}
@@ -2553,9 +2708,6 @@ packages:
pathe@1.1.2:
resolution: {integrity: sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==}
- pathval@1.1.1:
- resolution: {integrity: sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==}
-
pathval@2.0.0:
resolution: {integrity: sha512-vE7JKRyES09KiunauX7nd2Q9/L7lhok4smP9RZTDeD4MVs72Dp2qNFVz39Nz5a0FVEW0BJR6C0DYrq6unoziZA==}
engines: {node: '>= 14.16'}
@@ -2578,9 +2730,6 @@ packages:
resolution: {integrity: sha512-NPE8TDbzl/3YQYY7CSS228s3g2ollTFnc+Qi3tqmqJp9Vg2ovUpixcJEo2HJScN2Ez+kEaal6y70c0ehqJBJeA==}
engines: {node: '>=10'}
- pkg-types@1.0.3:
- resolution: {integrity: sha512-nN7pYi0AQqJnoLPC9eHFQ8AcyaixBUOwvqc5TDnIKCMEE6I0y8P7OKA7fPexsXGCGxQDl/cmrLAp26LhcwxZ4A==}
-
playwright-core@1.42.1:
resolution: {integrity: sha512-mxz6zclokgrke9p1vtdy/COWBH+eOZgYUVVU34C73M+4j4HLlQJHtfcqiqqxpP0o8HhMkflvfbquLX5dg6wlfA==}
engines: {node: '>=16'}
@@ -2609,9 +2758,9 @@ packages:
engines: {node: '>=14'}
hasBin: true
- pretty-format@29.7.0:
- resolution: {integrity: sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==}
- engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0}
+ pretty-format@27.5.1:
+ resolution: {integrity: sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ==}
+ engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0}
printj@1.1.2:
resolution: {integrity: sha512-zA2SmoLaxZyArQTOPj5LXecR+RagfPSU5Kw1qP+jkWeNlrq+eJZyY2oS68SU1Z/7/myXM4lo9716laOFAVStCQ==}
@@ -2625,6 +2774,9 @@ packages:
resolution: {integrity: sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==}
engines: {node: '>= 0.6.0'}
+ psl@1.9.0:
+ resolution: {integrity: sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==}
+
public-encrypt@4.0.3:
resolution: {integrity: sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==}
@@ -2637,6 +2789,10 @@ packages:
pumpify@1.5.1:
resolution: {integrity: sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ==}
+ punycode.js@2.3.1:
+ resolution: {integrity: sha512-uxFIHU0YlHYhDQtV4R9J6a52SLx28BCjT+4ieh7IGbgwVJWO+km431c4yRlREUAsAmt/uMjQUyQHNEPf0M39CA==}
+ engines: {node: '>=6'}
+
punycode@1.4.1:
resolution: {integrity: sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ==}
@@ -2652,6 +2808,9 @@ packages:
resolution: {integrity: sha512-773xhDQnZBMFobEiztv8LIl70ch5MSF/jUQVlhwFyBILqq96anmoctVIYz+ZRp0qbCKATTn6ev02M3r7Ga5vqA==}
engines: {node: '>=0.4.x'}
+ querystringify@2.2.0:
+ resolution: {integrity: sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==}
+
queue-microtask@1.2.3:
resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==}
@@ -2668,8 +2827,8 @@ packages:
resolution: {integrity: sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==}
hasBin: true
- react-is@18.2.0:
- resolution: {integrity: sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==}
+ react-is@17.0.2:
+ resolution: {integrity: sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==}
readable-stream@2.3.8:
resolution: {integrity: sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==}
@@ -2678,6 +2837,9 @@ packages:
resolution: {integrity: sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==}
engines: {node: '>= 6'}
+ regenerator-runtime@0.14.1:
+ resolution: {integrity: sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==}
+
regexp.prototype.flags@1.5.0:
resolution: {integrity: sha512-0SutC3pNudRKgquxGoRGIz946MZVHqbNfPjBdxeOhBrdgDKlRoXmYLQN9xRbrR09ZXWeGAdPuif7egofn6v5LA==}
engines: {node: '>= 0.4'}
@@ -2686,6 +2848,9 @@ packages:
resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==}
engines: {node: '>=0.10.0'}
+ requires-port@1.0.0:
+ resolution: {integrity: sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==}
+
resolve-from@4.0.0:
resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==}
engines: {node: '>=4'}
@@ -2707,11 +2872,12 @@ packages:
rimraf@3.0.2:
resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==}
+ deprecated: Rimraf versions prior to v4 are no longer supported
hasBin: true
- rimraf@5.0.1:
- resolution: {integrity: sha512-OfFZdwtd3lZ+XZzYP/6gTACubwFcHdLRqS9UX3UwpU2dnGQYkPFISRwvM3w9IiB2w7bW5qGo/uAwE4SmXXSKvg==}
- engines: {node: '>=14'}
+ rimraf@6.0.1:
+ resolution: {integrity: sha512-9dkvaxAsk/xNXSJzMgFqqMCuFgt2+KsOFek3TMLfo8NCPfWpBmqwyNn5Y+NX56QUYfCtsyhF3ayiboEoUmJk/A==}
+ engines: {node: 20 || >=22}
hasBin: true
ripemd160@2.0.2:
@@ -2782,8 +2948,8 @@ packages:
resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==}
engines: {node: '>=8'}
- shiki@0.14.7:
- resolution: {integrity: sha512-dNPAPrxSc87ua2sKJ3H5dQ/6ZaY8RNnaAqK+t0eG7p0Soi2ydiqbGOTaZCqaYvA/uZYfS1LJnemt3Q+mSfcPCg==}
+ shiki@1.12.1:
+ resolution: {integrity: sha512-nwmjbHKnOYYAe1aaQyEBHvQymJgfm86ZSS7fT8OaPRr4sbAcBNz7PbfAikMEFSDQ6se2j2zobkXvVKcBOm0ysg==}
side-channel@1.0.4:
resolution: {integrity: sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==}
@@ -2824,6 +2990,10 @@ packages:
resolution: {integrity: sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==}
engines: {node: '>=0.10.0'}
+ source-map-js@1.2.0:
+ resolution: {integrity: sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==}
+ engines: {node: '>=0.10.0'}
+
source-map@0.6.1:
resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==}
engines: {node: '>=0.10.0'}
@@ -2831,6 +3001,10 @@ packages:
stackback@0.0.2:
resolution: {integrity: sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==}
+ statuses@2.0.1:
+ resolution: {integrity: sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==}
+ engines: {node: '>= 0.8'}
+
std-env@3.7.0:
resolution: {integrity: sha512-JPbdCEQLj1w5GilpiHAx3qJvFndqybBysA3qUOnznweH4QbNYUsW/ea8QzSrnh0vNsezMMw5bcVool8lM0gwzg==}
@@ -2846,6 +3020,9 @@ packages:
streamx@2.16.1:
resolution: {integrity: sha512-m9QYj6WygWyWa3H1YY69amr4nVgy61xfjys7xO7kviL5rfIEc2naf+ewFiOA+aEJD7y0JO3h2GoiUv4TDwEGzQ==}
+ strict-event-emitter@0.5.1:
+ resolution: {integrity: sha512-vMgjE/GGEPEFnhFub6pa4FmJBRBVOLpIII2hvCZ8Kzb7K0hlHo7mQv6xYrBvCL2LtAIBwFUK8wvuJgTVSQ5MFQ==}
+
string-width@4.2.3:
resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==}
engines: {node: '>=8'}
@@ -2894,8 +3071,9 @@ packages:
resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==}
engines: {node: '>=8'}
- strip-literal@2.0.0:
- resolution: {integrity: sha512-f9vHgsCWBq2ugHAkGMiiYY+AYG0D/cbloKKg0nhaaaSNsujdGIpVXCNsrJpCKr5M0f4aI31mr13UjY6GAuXCKA==}
+ supports-color@5.5.0:
+ resolution: {integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==}
+ engines: {node: '>=4'}
supports-color@7.2.0:
resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==}
@@ -2919,9 +3097,9 @@ packages:
tar-stream@3.1.7:
resolution: {integrity: sha512-qJj60CXt7IU1Ffyc3NJMjh6EkuCFej46zUqJ4J7pqYlThyd9bO0XBTmcOIhSzZJVWfsLks0+nle/j538YAW9RQ==}
- test-exclude@6.0.0:
- resolution: {integrity: sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==}
- engines: {node: '>=8'}
+ test-exclude@7.0.1:
+ resolution: {integrity: sha512-pFYqmTw68LXVjeWJMST4+borgQP2AyMNbg1BpZh9LbyhUeNkeaPF9gzfPGUAnSMV3qPYdWUwDIjjCLiSDOl7vg==}
+ engines: {node: '>=18'}
text-table@0.2.0:
resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==}
@@ -2933,15 +3111,19 @@ packages:
resolution: {integrity: sha512-9phl76Cqm6FhSX9Xe1ZUAMLtm1BLkKj2Qd5ApyWkXzsMRaA7dgr81kf4wJmQf/hAvg8EEyJxDo3du/0KlhPiKQ==}
engines: {node: '>=0.6.0'}
- tinybench@2.6.0:
- resolution: {integrity: sha512-N8hW3PG/3aOoZAN5V/NSAEDz0ZixDSSt5b/a05iqtpgfLWMSVuCo7w0k2vVvEjdrIoeGqZzweX2WlyioNIHchA==}
+ tinybench@2.9.0:
+ resolution: {integrity: sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==}
- tinypool@0.8.2:
- resolution: {integrity: sha512-SUszKYe5wgsxnNOVlBYO6IC+8VGWdVGZWAqUxp3UErNBtptZvWbwyUOyzNL59zigz2rCA92QiL3wvG+JDSdJdQ==}
+ tinypool@1.0.0:
+ resolution: {integrity: sha512-KIKExllK7jp3uvrNtvRBYBWBOAXSX8ZvoaD8T+7KB/QHIuoJW3Pmr60zucywjAlMb5TeXUkcs/MWeWLu0qvuAQ==}
+ engines: {node: ^18.0.0 || >=20.0.0}
+
+ tinyrainbow@1.2.0:
+ resolution: {integrity: sha512-weEDEq7Z5eTHPDh4xjX789+fHfF+P8boiFB+0vbWzpbnbsEr/GRaohi/uMKxg8RZMXnl1ItAi/IUHWMsjDV7kQ==}
engines: {node: '>=14.0.0'}
- tinyspy@2.2.1:
- resolution: {integrity: sha512-KYad6Vy5VDWV4GH3fjpseMQ/XU2BhIYP7Vzd0LG44qRWm/Yt2WCOTicFdvmgo6gWaqooMQCawTtILVQJupKu7A==}
+ tinyspy@3.0.0:
+ resolution: {integrity: sha512-q5nmENpTHgiPVd1cJDDc9cVoYN5x4vCvwT3FMilvKPKneCBZAxn2YWQjDF0UMcE9k0Cay1gBiDfTMU0g+mPMQA==}
engines: {node: '>=14.0.0'}
tmp@0.0.33:
@@ -2960,6 +3142,10 @@ packages:
resolution: {integrity: sha512-sf4i37nQ2LBx4m3wB74y+ubopq6W/dIzXg0FDGjsYnZHVa1Da8FH853wlL2gtUhg+xJXjfk3kUZS3BRoQeoQBQ==}
engines: {node: '>=6'}
+ tough-cookie@4.1.4:
+ resolution: {integrity: sha512-Loo5UUvLD9ScZ6jh8beX1T6sO1w2/MpCRpEP7V280GKMVUQ0Jzar2U3UJPsrdbziLEMMhu3Ujnq//rhiFuIeag==}
+ engines: {node: '>=6'}
+
ts-api-utils@1.0.1:
resolution: {integrity: sha512-lC/RGlPmwdrIBFTX59wwNzqh7aR2otPNPR/5brHZm/XKFYKsfqxihXUe9pU3JI+3vGkl+vyCoNNnPhJn3aLK1A==}
engines: {node: '>=16.13.0'}
@@ -3003,10 +3189,6 @@ packages:
resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==}
engines: {node: '>= 0.8.0'}
- type-detect@4.0.8:
- resolution: {integrity: sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==}
- engines: {node: '>=4'}
-
type-fest@0.20.2:
resolution: {integrity: sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==}
engines: {node: '>=10'}
@@ -3015,23 +3197,27 @@ packages:
resolution: {integrity: sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==}
engines: {node: '>=10'}
+ type-fest@4.24.0:
+ resolution: {integrity: sha512-spAaHzc6qre0TlZQQ2aA/nGMe+2Z/wyGk5Z+Ru2VUfdNwT6kWO6TjevOlpebsATEG1EIQ2sOiDszud3lO5mt/Q==}
+ engines: {node: '>=16'}
+
typed-array-length@1.0.4:
resolution: {integrity: sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==}
- typedoc@0.25.12:
- resolution: {integrity: sha512-F+qhkK2VoTweDXd1c42GS/By2DvI2uDF4/EpG424dTexSHdtCH52C6IcAvMA6jR3DzAWZjHpUOW+E02kyPNUNw==}
- engines: {node: '>= 16'}
+ typedoc@0.26.5:
+ resolution: {integrity: sha512-Vn9YKdjKtDZqSk+by7beZ+xzkkr8T8CYoiasqyt4TTRFy5+UHzL/mF/o4wGBjRF+rlWQHDb0t6xCpA3JNL5phg==}
+ engines: {node: '>= 18'}
hasBin: true
peerDependencies:
- typescript: 4.6.x || 4.7.x || 4.8.x || 4.9.x || 5.0.x || 5.1.x || 5.2.x || 5.3.x || 5.4.x
+ typescript: 4.6.x || 4.7.x || 4.8.x || 4.9.x || 5.0.x || 5.1.x || 5.2.x || 5.3.x || 5.4.x || 5.5.x
typescript@5.4.3:
resolution: {integrity: sha512-KrPd3PKaCLr78MalgiwJnA25Nm8HAmdwN3mYUYZgG/wizIo9EainNVQI9/yDavtVFRN2h3k8uf3GLHuhDMgEHg==}
engines: {node: '>=14.17'}
hasBin: true
- ufo@1.5.1:
- resolution: {integrity: sha512-HGyF79+/qZ4soRvM+nHERR2pJ3VXDZ/8sL1uLahdgEDf580NkgiWOxLk33FetExqOWp352JZRsgXbG/4MaGOSg==}
+ uc.micro@2.1.0:
+ resolution: {integrity: sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A==}
uglify-js@3.17.4:
resolution: {integrity: sha512-T9q82TJI9e/C1TAxYvfb16xO120tMVFZrGA3f9/P4424DNu6ypK103y0GPFVa17yotwSyZW5iYXgjYHkGrJW/g==}
@@ -3044,6 +3230,13 @@ packages:
undici-types@5.26.5:
resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==}
+ undici-types@6.13.0:
+ resolution: {integrity: sha512-xtFJHudx8S2DSoujjMd1WeWvn7KKWFRESZTMeL1RptAYERu29D6jphMjjY+vn96jvN3kVPDNxU/E13VTaXj6jg==}
+
+ universalify@0.2.0:
+ resolution: {integrity: sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==}
+ engines: {node: '>= 4.0.0'}
+
universalify@2.0.0:
resolution: {integrity: sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==}
engines: {node: '>= 10.0.0'}
@@ -3051,6 +3244,9 @@ packages:
uri-js@4.4.1:
resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==}
+ url-parse@1.5.10:
+ resolution: {integrity: sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==}
+
url@0.11.3:
resolution: {integrity: sha512-6hxOLGfZASQK/cijlZnZJTq8OXAkt/3YGfQX45vvMYXpZoo8NdWZcY73K108Jf759lS1Bv/8wXnHDTSz17dSRw==}
@@ -3063,17 +3259,13 @@ packages:
v8-compile-cache-lib@3.0.1:
resolution: {integrity: sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==}
- v8-to-istanbul@9.2.0:
- resolution: {integrity: sha512-/EH/sDgxU2eGxajKdwLCDmQ4FWq+kpi3uCmBGpw1xJtnAxEjlD8j8PEiGWpCIMIs3ciNAgH0d3TTJiUkYzyZjA==}
- engines: {node: '>=10.12.0'}
-
- vite-node@1.4.0:
- resolution: {integrity: sha512-VZDAseqjrHgNd4Kh8icYHWzTKSCZMhia7GyHfhtzLW33fZlG9SwsB6CEhgyVOWkJfJ2pFLrp/Gj1FSfAiqH9Lw==}
+ vite-node@2.0.5:
+ resolution: {integrity: sha512-LdsW4pxj0Ot69FAoXZ1yTnA9bjGohr2yNBU7QKRxpz8ITSkhuDl6h3zS/tvgz4qrNjeRnvrWeXQ8ZF7Um4W00Q==}
engines: {node: ^18.0.0 || >=20.0.0}
hasBin: true
- vite-plugin-node-polyfills@0.21.0:
- resolution: {integrity: sha512-Sk4DiKnmxN8E0vhgEhzLudfJQfaT8k4/gJ25xvUPG54KjLJ6HAmDKbr4rzDD/QWEY+Lwg80KE85fGYBQihEPQA==}
+ vite-plugin-node-polyfills@0.22.0:
+ resolution: {integrity: sha512-F+G3LjiGbG8QpbH9bZ//GSBr9i1InSTkaulfUHFa9jkLqVGORFBoqc2A/Yu5Mmh1kNAbiAeKeK+6aaQUf3x0JA==}
peerDependencies:
vite: ^2.0.0 || ^3.0.0 || ^4.0.0 || ^5.0.0
@@ -3105,15 +3297,15 @@ packages:
terser:
optional: true
- vitest@1.4.0:
- resolution: {integrity: sha512-gujzn0g7fmwf83/WzrDTnncZt2UiXP41mHuFYFrdwaLRVQ6JYQEiME2IfEjU3vcFL3VKa75XhI3lFgn+hfVsQw==}
+ vitest@2.0.5:
+ resolution: {integrity: sha512-8GUxONfauuIdeSl5f9GTgVEpg5BTOlplET4WEDaeY2QBiN8wSm68vxN/tb5z405OwppfoCavnwXafiaYBC/xOA==}
engines: {node: ^18.0.0 || >=20.0.0}
hasBin: true
peerDependencies:
'@edge-runtime/vm': '*'
'@types/node': ^18.0.0 || >=20.0.0
- '@vitest/browser': 1.4.0
- '@vitest/ui': 1.4.0
+ '@vitest/browser': 2.0.5
+ '@vitest/ui': 2.0.5
happy-dom: '*'
jsdom: '*'
peerDependenciesMeta:
@@ -3133,12 +3325,6 @@ packages:
vm-browserify@1.1.2:
resolution: {integrity: sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ==}
- vscode-oniguruma@1.7.0:
- resolution: {integrity: sha512-L9WMGRfrjOhgHSdOYgCt/yRMsXzLDJSL7BPrOZt73gU0iWO4mpqzqQzOz5srxqTvMBaR0XZTSrVWo4j55Rc6cA==}
-
- vscode-textmate@8.0.0:
- resolution: {integrity: sha512-AFbieoL7a5LMqcnOF04ji+rpXadgOXnZsxQr//r83kLPr7biP7am3g9zbaZIaBGwBRWeSvoMD4mgPdX3e4NWBg==}
-
wcwidth@1.0.1:
resolution: {integrity: sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==}
@@ -3154,8 +3340,8 @@ packages:
engines: {node: '>= 8'}
hasBin: true
- why-is-node-running@2.2.2:
- resolution: {integrity: sha512-6tSwToZxTOcotxHeA+qGCq1mVzKR3CwcJGmVcY+QE8SHy6TnpFnh8PAvPNHYr7EcuVeG0QSMxtYCuO1ta/G/oA==}
+ why-is-node-running@2.3.0:
+ resolution: {integrity: sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w==}
engines: {node: '>=8'}
hasBin: true
@@ -3189,6 +3375,18 @@ packages:
utf-8-validate:
optional: true
+ ws@8.18.0:
+ resolution: {integrity: sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==}
+ engines: {node: '>=10.0.0'}
+ peerDependencies:
+ bufferutil: ^4.0.1
+ utf-8-validate: '>=5.0.2'
+ peerDependenciesMeta:
+ bufferutil:
+ optional: true
+ utf-8-validate:
+ optional: true
+
xtend@4.0.2:
resolution: {integrity: sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==}
engines: {node: '>=0.4'}
@@ -3200,6 +3398,11 @@ packages:
yallist@4.0.0:
resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==}
+ yaml@2.5.0:
+ resolution: {integrity: sha512-2wWLbGbYDiSqqIKoPjar3MPgB94ErzCtrNE1FdqGuaO0pi2JGjmE8aW8TDZwzU7vuxcGRdL/4gPQwQ7hD5AMSw==}
+ engines: {node: '>= 14'}
+ hasBin: true
+
yargs-parser@21.1.1:
resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==}
engines: {node: '>=12'}
@@ -3216,9 +3419,9 @@ packages:
resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==}
engines: {node: '>=10'}
- yocto-queue@1.0.0:
- resolution: {integrity: sha512-9bnSc/HEW2uRy67wc+T8UwauLuPJVn28jb+GtJY16iiKWyvmYJRXVT4UamsAEGQfPohgr2q4Tq0sQbQlxTfi1g==}
- engines: {node: '>=12.20'}
+ yoctocolors-cjs@2.1.2:
+ resolution: {integrity: sha512-cYVsTjKl8b+FrnidjibDWskAv7UKOfcwaVZdp/it9n1s9fU3IkgDbhdIRKCW4JDsAlECJY0ytoVPT3sK6kideA==}
+ engines: {node: '>=18'}
snapshots:
@@ -3229,13 +3432,33 @@ snapshots:
'@jridgewell/gen-mapping': 0.3.5
'@jridgewell/trace-mapping': 0.3.25
+ '@babel/code-frame@7.24.7':
+ dependencies:
+ '@babel/highlight': 7.24.7
+ picocolors: 1.0.0
+
'@babel/helper-string-parser@7.23.4': {}
+ '@babel/helper-string-parser@7.24.8': {}
+
'@babel/helper-validator-identifier@7.22.20': {}
- '@babel/parser@7.24.0':
+ '@babel/helper-validator-identifier@7.24.7': {}
+
+ '@babel/highlight@7.24.7':
dependencies:
- '@babel/types': 7.24.0
+ '@babel/helper-validator-identifier': 7.24.7
+ chalk: 2.4.2
+ js-tokens: 4.0.0
+ picocolors: 1.0.0
+
+ '@babel/parser@7.25.3':
+ dependencies:
+ '@babel/types': 7.25.2
+
+ '@babel/runtime@7.25.0':
+ dependencies:
+ regenerator-runtime: 0.14.1
'@babel/types@7.24.0':
dependencies:
@@ -3243,8 +3466,27 @@ snapshots:
'@babel/helper-validator-identifier': 7.22.20
to-fast-properties: 2.0.0
+ '@babel/types@7.25.2':
+ dependencies:
+ '@babel/helper-string-parser': 7.24.8
+ '@babel/helper-validator-identifier': 7.24.7
+ to-fast-properties: 2.0.0
+
'@bcoe/v8-coverage@0.2.3': {}
+ '@bundled-es-modules/cookie@2.0.0':
+ dependencies:
+ cookie: 0.5.0
+
+ '@bundled-es-modules/statuses@1.0.1':
+ dependencies:
+ statuses: 2.0.1
+
+ '@bundled-es-modules/tough-cookie@0.1.6':
+ dependencies:
+ '@types/tough-cookie': 4.0.5
+ tough-cookie: 4.1.4
+
'@cspotcode/source-map-support@0.8.1':
dependencies:
'@jridgewell/trace-mapping': 0.3.9
@@ -3252,138 +3494,144 @@ snapshots:
'@esbuild/aix-ppc64@0.19.12':
optional: true
- '@esbuild/android-arm64@0.18.20':
+ '@esbuild/aix-ppc64@0.23.0':
optional: true
'@esbuild/android-arm64@0.19.12':
optional: true
- '@esbuild/android-arm@0.18.20':
+ '@esbuild/android-arm64@0.23.0':
optional: true
'@esbuild/android-arm@0.19.12':
optional: true
- '@esbuild/android-x64@0.18.20':
+ '@esbuild/android-arm@0.23.0':
optional: true
'@esbuild/android-x64@0.19.12':
optional: true
- '@esbuild/darwin-arm64@0.18.20':
+ '@esbuild/android-x64@0.23.0':
optional: true
'@esbuild/darwin-arm64@0.19.12':
optional: true
- '@esbuild/darwin-x64@0.18.20':
+ '@esbuild/darwin-arm64@0.23.0':
optional: true
'@esbuild/darwin-x64@0.19.12':
optional: true
- '@esbuild/freebsd-arm64@0.18.20':
+ '@esbuild/darwin-x64@0.23.0':
optional: true
'@esbuild/freebsd-arm64@0.19.12':
optional: true
- '@esbuild/freebsd-x64@0.18.20':
+ '@esbuild/freebsd-arm64@0.23.0':
optional: true
'@esbuild/freebsd-x64@0.19.12':
optional: true
- '@esbuild/linux-arm64@0.18.20':
+ '@esbuild/freebsd-x64@0.23.0':
optional: true
'@esbuild/linux-arm64@0.19.12':
optional: true
- '@esbuild/linux-arm@0.18.20':
+ '@esbuild/linux-arm64@0.23.0':
optional: true
'@esbuild/linux-arm@0.19.12':
optional: true
- '@esbuild/linux-ia32@0.18.20':
+ '@esbuild/linux-arm@0.23.0':
optional: true
'@esbuild/linux-ia32@0.19.12':
optional: true
- '@esbuild/linux-loong64@0.18.20':
+ '@esbuild/linux-ia32@0.23.0':
optional: true
'@esbuild/linux-loong64@0.19.12':
optional: true
- '@esbuild/linux-mips64el@0.18.20':
+ '@esbuild/linux-loong64@0.23.0':
optional: true
'@esbuild/linux-mips64el@0.19.12':
optional: true
- '@esbuild/linux-ppc64@0.18.20':
+ '@esbuild/linux-mips64el@0.23.0':
optional: true
'@esbuild/linux-ppc64@0.19.12':
optional: true
- '@esbuild/linux-riscv64@0.18.20':
+ '@esbuild/linux-ppc64@0.23.0':
optional: true
'@esbuild/linux-riscv64@0.19.12':
optional: true
- '@esbuild/linux-s390x@0.18.20':
+ '@esbuild/linux-riscv64@0.23.0':
optional: true
'@esbuild/linux-s390x@0.19.12':
optional: true
- '@esbuild/linux-x64@0.18.20':
+ '@esbuild/linux-s390x@0.23.0':
optional: true
'@esbuild/linux-x64@0.19.12':
optional: true
- '@esbuild/netbsd-x64@0.18.20':
+ '@esbuild/linux-x64@0.23.0':
optional: true
'@esbuild/netbsd-x64@0.19.12':
optional: true
- '@esbuild/openbsd-x64@0.18.20':
+ '@esbuild/netbsd-x64@0.23.0':
+ optional: true
+
+ '@esbuild/openbsd-arm64@0.23.0':
optional: true
'@esbuild/openbsd-x64@0.19.12':
optional: true
- '@esbuild/sunos-x64@0.18.20':
+ '@esbuild/openbsd-x64@0.23.0':
optional: true
'@esbuild/sunos-x64@0.19.12':
optional: true
- '@esbuild/win32-arm64@0.18.20':
+ '@esbuild/sunos-x64@0.23.0':
optional: true
'@esbuild/win32-arm64@0.19.12':
optional: true
- '@esbuild/win32-ia32@0.18.20':
+ '@esbuild/win32-arm64@0.23.0':
optional: true
'@esbuild/win32-ia32@0.19.12':
optional: true
- '@esbuild/win32-x64@0.18.20':
+ '@esbuild/win32-ia32@0.23.0':
optional: true
'@esbuild/win32-x64@0.19.12':
optional: true
+ '@esbuild/win32-x64@0.23.0':
+ optional: true
+
'@eslint-community/eslint-utils@4.4.0(eslint@8.47.0)':
dependencies:
eslint: 8.47.0
@@ -3421,6 +3669,33 @@ snapshots:
'@humanwhocodes/object-schema@1.2.1': {}
+ '@inquirer/confirm@3.1.22':
+ dependencies:
+ '@inquirer/core': 9.0.10
+ '@inquirer/type': 1.5.2
+
+ '@inquirer/core@9.0.10':
+ dependencies:
+ '@inquirer/figures': 1.0.5
+ '@inquirer/type': 1.5.2
+ '@types/mute-stream': 0.0.4
+ '@types/node': 22.2.0
+ '@types/wrap-ansi': 3.0.0
+ ansi-escapes: 4.3.2
+ cli-spinners: 2.9.2
+ cli-width: 4.1.0
+ mute-stream: 1.0.0
+ signal-exit: 4.1.0
+ strip-ansi: 6.0.1
+ wrap-ansi: 6.2.0
+ yoctocolors-cjs: 2.1.2
+
+ '@inquirer/figures@1.0.5': {}
+
+ '@inquirer/type@1.5.2':
+ dependencies:
+ mute-stream: 1.0.0
+
'@isaacs/cliui@8.0.2':
dependencies:
string-width: 5.1.2
@@ -3432,10 +3707,6 @@ snapshots:
'@istanbuljs/schema@0.1.3': {}
- '@jest/schemas@29.6.3':
- dependencies:
- '@sinclair/typebox': 0.27.8
-
'@jridgewell/gen-mapping@0.3.5':
dependencies:
'@jridgewell/set-array': 1.2.1
@@ -3452,6 +3723,8 @@ snapshots:
'@jridgewell/sourcemap-codec@1.4.15': {}
+ '@jridgewell/sourcemap-codec@1.5.0': {}
+
'@jridgewell/trace-mapping@0.3.25':
dependencies:
'@jridgewell/resolve-uri': 3.1.2
@@ -3518,6 +3791,15 @@ snapshots:
dependencies:
call-bind: 1.0.2
+ '@mswjs/interceptors@0.29.1':
+ dependencies:
+ '@open-draft/deferred-promise': 2.2.0
+ '@open-draft/logger': 0.3.0
+ '@open-draft/until': 2.1.0
+ is-node-process: 1.2.0
+ outvariant: 1.4.3
+ strict-event-emitter: 0.5.1
+
'@nodelib/fs.scandir@2.1.5':
dependencies:
'@nodelib/fs.stat': 2.0.5
@@ -3530,6 +3812,15 @@ snapshots:
'@nodelib/fs.scandir': 2.1.5
fastq: 1.13.0
+ '@open-draft/deferred-promise@2.2.0': {}
+
+ '@open-draft/logger@0.3.0':
+ dependencies:
+ is-node-process: 1.2.0
+ outvariant: 1.4.3
+
+ '@open-draft/until@2.1.0': {}
+
'@pkgjs/parseargs@0.11.0':
optional: true
@@ -3590,7 +3881,9 @@ snapshots:
'@rollup/rollup-win32-x64-msvc@4.13.0':
optional: true
- '@sinclair/typebox@0.27.8': {}
+ '@shikijs/core@1.12.1':
+ dependencies:
+ '@types/hast': 3.0.4
'@teidesu/deno-types@1.43.1': {}
@@ -3599,7 +3892,7 @@ snapshots:
arg: 5.0.2
dedent: 1.5.3
eager-async-pool: 1.0.0
- glob: 10.3.12
+ glob: 10.4.5
gunzip-maybe: 1.4.2
semver: 7.6.0
tar-stream: 3.1.7
@@ -3608,10 +3901,25 @@ snapshots:
transitivePeerDependencies:
- babel-plugin-macros
+ '@testing-library/dom@10.4.0':
+ dependencies:
+ '@babel/code-frame': 7.24.7
+ '@babel/runtime': 7.25.0
+ '@types/aria-query': 5.0.4
+ aria-query: 5.3.0
+ chalk: 4.1.2
+ dom-accessibility-api: 0.5.16
+ lz-string: 1.5.0
+ pretty-format: 27.5.1
+
+ '@testing-library/user-event@14.5.2(@testing-library/dom@10.4.0)':
+ dependencies:
+ '@testing-library/dom': 10.4.0
+
'@ts-morph/common@0.23.0':
dependencies:
fast-glob: 3.3.2
- minimatch: 9.0.3
+ minimatch: 9.0.5
mkdirp: 3.0.1
path-browserify: 1.0.1
@@ -3623,10 +3931,14 @@ snapshots:
'@tsconfig/node16@1.0.2': {}
+ '@types/aria-query@5.0.4': {}
+
'@types/better-sqlite3@7.6.4':
dependencies:
'@types/node': 20.10.0
+ '@types/cookie@0.6.0': {}
+
'@types/cross-spawn@6.0.6':
dependencies:
'@types/node': 20.10.0
@@ -3635,19 +3947,25 @@ snapshots:
'@types/events@3.0.0': {}
+ '@types/hast@3.0.4':
+ dependencies:
+ '@types/unist': 3.0.2
+
'@types/inquirer@9.0.6':
dependencies:
'@types/through': 0.0.32
rxjs: 7.8.1
- '@types/istanbul-lib-coverage@2.0.6': {}
-
'@types/js-yaml@4.0.5': {}
'@types/json-schema@7.0.12': {}
'@types/json5@0.0.29': {}
+ '@types/mute-stream@0.0.4':
+ dependencies:
+ '@types/node': 20.10.0
+
'@types/node@20.10.0':
dependencies:
undici-types: 5.26.5
@@ -3656,16 +3974,28 @@ snapshots:
dependencies:
undici-types: 5.26.5
+ '@types/node@22.2.0':
+ dependencies:
+ undici-types: 6.13.0
+
'@types/openurl@1.0.3':
dependencies:
'@types/node': 20.10.0
'@types/semver@7.5.0': {}
+ '@types/statuses@2.0.5': {}
+
'@types/through@0.0.32':
dependencies:
'@types/node': 20.10.0
+ '@types/tough-cookie@4.0.5': {}
+
+ '@types/unist@3.0.2': {}
+
+ '@types/wrap-ansi@3.0.0': {}
+
'@types/ws@8.5.10':
dependencies:
'@types/node': 20.10.0
@@ -3759,74 +4089,84 @@ snapshots:
'@typescript-eslint/types': 6.4.0
eslint-visitor-keys: 3.4.1
- '@vitest/browser@1.4.0(playwright@1.42.1)(vitest@1.4.0)':
+ '@vitest/browser@2.0.5(playwright@1.42.1)(typescript@5.4.3)(vitest@2.0.5)':
dependencies:
- '@vitest/utils': 1.4.0
- magic-string: 0.30.8
+ '@testing-library/dom': 10.4.0
+ '@testing-library/user-event': 14.5.2(@testing-library/dom@10.4.0)
+ '@vitest/utils': 2.0.5
+ magic-string: 0.30.11
+ msw: 2.3.5(typescript@5.4.3)
sirv: 2.0.4
- vitest: 1.4.0(@types/node@20.10.0)(@vitest/browser@1.4.0)(@vitest/ui@1.4.0)
+ vitest: 2.0.5(@types/node@20.10.0)(@vitest/browser@2.0.5)(@vitest/ui@2.0.5)
+ ws: 8.18.0
optionalDependencies:
playwright: 1.42.1
+ transitivePeerDependencies:
+ - bufferutil
+ - typescript
+ - utf-8-validate
- '@vitest/coverage-v8@1.4.0(vitest@1.4.0(@types/node@20.10.0)(@vitest/browser@1.4.0)(@vitest/ui@1.4.0))':
+ '@vitest/coverage-v8@2.0.5(vitest@2.0.5(@types/node@20.10.0)(@vitest/browser@2.0.5)(@vitest/ui@2.0.5))':
dependencies:
'@ampproject/remapping': 2.3.0
'@bcoe/v8-coverage': 0.2.3
- debug: 4.3.4
+ debug: 4.3.6
istanbul-lib-coverage: 3.2.2
istanbul-lib-report: 3.0.1
- istanbul-lib-source-maps: 5.0.4
+ istanbul-lib-source-maps: 5.0.6
istanbul-reports: 3.1.7
- magic-string: 0.30.8
- magicast: 0.3.3
- picocolors: 1.0.0
+ magic-string: 0.30.11
+ magicast: 0.3.4
std-env: 3.7.0
- strip-literal: 2.0.0
- test-exclude: 6.0.0
- v8-to-istanbul: 9.2.0
- vitest: 1.4.0(@types/node@20.10.0)(@vitest/browser@1.4.0)(@vitest/ui@1.4.0)
+ test-exclude: 7.0.1
+ tinyrainbow: 1.2.0
+ vitest: 2.0.5(@types/node@20.10.0)(@vitest/browser@2.0.5)(@vitest/ui@2.0.5)
transitivePeerDependencies:
- supports-color
- '@vitest/expect@1.4.0':
+ '@vitest/expect@2.0.5':
dependencies:
- '@vitest/spy': 1.4.0
- '@vitest/utils': 1.4.0
- chai: 4.4.1
+ '@vitest/spy': 2.0.5
+ '@vitest/utils': 2.0.5
+ chai: 5.1.1
+ tinyrainbow: 1.2.0
- '@vitest/runner@1.4.0':
+ '@vitest/pretty-format@2.0.5':
dependencies:
- '@vitest/utils': 1.4.0
- p-limit: 5.0.0
+ tinyrainbow: 1.2.0
+
+ '@vitest/runner@2.0.5':
+ dependencies:
+ '@vitest/utils': 2.0.5
pathe: 1.1.2
- '@vitest/snapshot@1.4.0':
+ '@vitest/snapshot@2.0.5':
dependencies:
- magic-string: 0.30.8
+ '@vitest/pretty-format': 2.0.5
+ magic-string: 0.30.11
pathe: 1.1.2
- pretty-format: 29.7.0
- '@vitest/spy@1.4.0':
+ '@vitest/spy@2.0.5':
dependencies:
- tinyspy: 2.2.1
+ tinyspy: 3.0.0
- '@vitest/ui@1.4.0(vitest@1.4.0)':
+ '@vitest/ui@2.0.5(vitest@2.0.5)':
dependencies:
- '@vitest/utils': 1.4.0
+ '@vitest/utils': 2.0.5
fast-glob: 3.3.2
fflate: 0.8.2
flatted: 3.3.1
pathe: 1.1.2
- picocolors: 1.0.0
sirv: 2.0.4
- vitest: 1.4.0(@types/node@20.10.0)(@vitest/browser@1.4.0)(@vitest/ui@1.4.0)
+ tinyrainbow: 1.2.0
+ vitest: 2.0.5(@types/node@20.10.0)(@vitest/browser@2.0.5)(@vitest/ui@2.0.5)
- '@vitest/utils@1.4.0':
+ '@vitest/utils@2.0.5':
dependencies:
- diff-sequences: 29.6.3
+ '@vitest/pretty-format': 2.0.5
estree-walker: 3.0.3
- loupe: 2.3.7
- pretty-format: 29.7.0
+ loupe: 3.1.1
+ tinyrainbow: 1.2.0
acorn-jsx@5.3.2(acorn@8.10.0):
dependencies:
@@ -3834,12 +4174,8 @@ snapshots:
acorn-walk@8.2.0: {}
- acorn-walk@8.3.2: {}
-
acorn@8.10.0: {}
- acorn@8.11.3: {}
-
ajv@6.12.6:
dependencies:
fast-deep-equal: 3.1.3
@@ -3855,7 +4191,9 @@ snapshots:
ansi-regex@6.0.1: {}
- ansi-sequence-parser@1.1.0: {}
+ ansi-styles@3.2.1:
+ dependencies:
+ color-convert: 1.9.3
ansi-styles@4.3.0:
dependencies:
@@ -3871,6 +4209,10 @@ snapshots:
argparse@2.0.1: {}
+ aria-query@5.3.0:
+ dependencies:
+ dequal: 2.0.3
+
array-buffer-byte-length@1.0.0:
dependencies:
call-bind: 1.0.2
@@ -3922,8 +4264,6 @@ snapshots:
object.assign: 4.1.4
util: 0.12.5
- assertion-error@1.1.0: {}
-
assertion-error@2.0.1: {}
available-typed-arrays@1.0.5: {}
@@ -4058,16 +4398,6 @@ snapshots:
callsites@3.1.0: {}
- chai@4.4.1:
- dependencies:
- assertion-error: 1.1.0
- check-error: 1.0.3
- deep-eql: 4.1.3
- get-func-name: 2.0.2
- loupe: 2.3.7
- pathval: 1.1.1
- type-detect: 4.0.8
-
chai@5.1.0:
dependencies:
assertion-error: 2.0.1
@@ -4076,6 +4406,20 @@ snapshots:
loupe: 3.1.0
pathval: 2.0.0
+ chai@5.1.1:
+ dependencies:
+ assertion-error: 2.0.1
+ check-error: 2.1.1
+ deep-eql: 5.0.1
+ loupe: 3.1.0
+ pathval: 2.0.0
+
+ chalk@2.4.2:
+ dependencies:
+ ansi-styles: 3.2.1
+ escape-string-regexp: 1.0.5
+ supports-color: 5.5.0
+
chalk@4.1.2:
dependencies:
ansi-styles: 4.3.0
@@ -4085,12 +4429,10 @@ snapshots:
chardet@0.7.0: {}
- check-error@1.0.3:
- dependencies:
- get-func-name: 2.0.2
-
check-error@2.0.0: {}
+ check-error@2.1.1: {}
+
cheerio-select@2.1.0:
dependencies:
boolbase: 1.0.0
@@ -4125,6 +4467,8 @@ snapshots:
cli-spinners@2.9.1: {}
+ cli-spinners@2.9.2: {}
+
cli-width@4.1.0: {}
cliui@8.0.1:
@@ -4137,10 +4481,16 @@ snapshots:
code-block-writer@13.0.1: {}
+ color-convert@1.9.3:
+ dependencies:
+ color-name: 1.1.3
+
color-convert@2.0.1:
dependencies:
color-name: 1.1.4
+ color-name@1.1.3: {}
+
color-name@1.1.4: {}
colorette@2.0.20: {}
@@ -4151,7 +4501,7 @@ snapshots:
constants-browserify@1.0.0: {}
- convert-source-map@2.0.0: {}
+ cookie@0.5.0: {}
core-util-is@1.0.3: {}
@@ -4224,16 +4574,16 @@ snapshots:
dependencies:
ms: 2.1.2
+ debug@4.3.6:
+ dependencies:
+ ms: 2.1.2
+
decompress-response@6.0.0:
dependencies:
mimic-response: 3.1.0
dedent@1.5.3: {}
- deep-eql@4.1.3:
- dependencies:
- type-detect: 4.0.8
-
deep-eql@5.0.1: {}
deep-extend@0.6.0: {}
@@ -4261,6 +4611,8 @@ snapshots:
has-property-descriptors: 1.0.2
object-keys: 1.1.1
+ dequal@2.0.3: {}
+
des.js@1.1.0:
dependencies:
inherits: 2.0.4
@@ -4268,8 +4620,6 @@ snapshots:
detect-libc@2.0.1: {}
- diff-sequences@29.6.3: {}
-
diff@4.0.2: {}
diffie-hellman@5.0.3:
@@ -4290,6 +4640,8 @@ snapshots:
dependencies:
esutils: 2.0.3
+ dom-accessibility-api@0.5.16: {}
+
dom-serializer@1.4.1:
dependencies:
domelementtype: 2.3.0
@@ -4326,17 +4678,17 @@ snapshots:
domelementtype: 2.3.0
domhandler: 5.0.3
- dotenv-flow@3.2.0:
+ dotenv-flow@4.1.0:
dependencies:
- dotenv: 8.6.0
+ dotenv: 16.4.5
- dotenv@8.6.0: {}
+ dotenv@16.4.5: {}
dpdm@3.14.0:
dependencies:
chalk: 4.1.2
fs-extra: 11.1.1
- glob: 10.3.10
+ glob: 10.4.5
ora: 5.4.1
tslib: 2.6.2
typescript: 5.4.3
@@ -4439,31 +4791,6 @@ snapshots:
is-date-object: 1.0.5
is-symbol: 1.0.4
- esbuild@0.18.20:
- optionalDependencies:
- '@esbuild/android-arm': 0.18.20
- '@esbuild/android-arm64': 0.18.20
- '@esbuild/android-x64': 0.18.20
- '@esbuild/darwin-arm64': 0.18.20
- '@esbuild/darwin-x64': 0.18.20
- '@esbuild/freebsd-arm64': 0.18.20
- '@esbuild/freebsd-x64': 0.18.20
- '@esbuild/linux-arm': 0.18.20
- '@esbuild/linux-arm64': 0.18.20
- '@esbuild/linux-ia32': 0.18.20
- '@esbuild/linux-loong64': 0.18.20
- '@esbuild/linux-mips64el': 0.18.20
- '@esbuild/linux-ppc64': 0.18.20
- '@esbuild/linux-riscv64': 0.18.20
- '@esbuild/linux-s390x': 0.18.20
- '@esbuild/linux-x64': 0.18.20
- '@esbuild/netbsd-x64': 0.18.20
- '@esbuild/openbsd-x64': 0.18.20
- '@esbuild/sunos-x64': 0.18.20
- '@esbuild/win32-arm64': 0.18.20
- '@esbuild/win32-ia32': 0.18.20
- '@esbuild/win32-x64': 0.18.20
-
esbuild@0.19.12:
optionalDependencies:
'@esbuild/aix-ppc64': 0.19.12
@@ -4490,8 +4817,37 @@ snapshots:
'@esbuild/win32-ia32': 0.19.12
'@esbuild/win32-x64': 0.19.12
+ esbuild@0.23.0:
+ optionalDependencies:
+ '@esbuild/aix-ppc64': 0.23.0
+ '@esbuild/android-arm': 0.23.0
+ '@esbuild/android-arm64': 0.23.0
+ '@esbuild/android-x64': 0.23.0
+ '@esbuild/darwin-arm64': 0.23.0
+ '@esbuild/darwin-x64': 0.23.0
+ '@esbuild/freebsd-arm64': 0.23.0
+ '@esbuild/freebsd-x64': 0.23.0
+ '@esbuild/linux-arm': 0.23.0
+ '@esbuild/linux-arm64': 0.23.0
+ '@esbuild/linux-ia32': 0.23.0
+ '@esbuild/linux-loong64': 0.23.0
+ '@esbuild/linux-mips64el': 0.23.0
+ '@esbuild/linux-ppc64': 0.23.0
+ '@esbuild/linux-riscv64': 0.23.0
+ '@esbuild/linux-s390x': 0.23.0
+ '@esbuild/linux-x64': 0.23.0
+ '@esbuild/netbsd-x64': 0.23.0
+ '@esbuild/openbsd-arm64': 0.23.0
+ '@esbuild/openbsd-x64': 0.23.0
+ '@esbuild/sunos-x64': 0.23.0
+ '@esbuild/win32-arm64': 0.23.0
+ '@esbuild/win32-ia32': 0.23.0
+ '@esbuild/win32-x64': 0.23.0
+
escalade@3.1.1: {}
+ escape-string-regexp@1.0.5: {}
+
escape-string-regexp@4.0.0: {}
escape-string-regexp@5.0.0: {}
@@ -4811,29 +5167,23 @@ snapshots:
dependencies:
is-glob: 4.0.3
- glob@10.2.6:
+ glob@10.4.5:
dependencies:
foreground-child: 3.1.1
- jackspeak: 2.3.6
- minimatch: 9.0.1
- minipass: 6.0.2
- path-scurry: 1.10.1
+ jackspeak: 3.4.3
+ minimatch: 9.0.5
+ minipass: 7.1.2
+ package-json-from-dist: 1.0.0
+ path-scurry: 1.11.1
- glob@10.3.10:
+ glob@11.0.0:
dependencies:
foreground-child: 3.1.1
- jackspeak: 2.3.6
- minimatch: 9.0.3
- minipass: 6.0.2
- path-scurry: 1.10.1
-
- glob@10.3.12:
- dependencies:
- foreground-child: 3.1.1
- jackspeak: 2.3.6
- minimatch: 9.0.3
- minipass: 7.0.4
- path-scurry: 1.10.2
+ jackspeak: 4.0.1
+ minimatch: 10.0.1
+ minipass: 7.1.2
+ package-json-from-dist: 1.0.0
+ path-scurry: 2.0.0
glob@7.2.3:
dependencies:
@@ -4869,6 +5219,8 @@ snapshots:
graphemer@1.4.0: {}
+ graphql@16.9.0: {}
+
gunzip-maybe@1.4.2:
dependencies:
browserify-zlib: 0.1.4
@@ -4889,6 +5241,8 @@ snapshots:
has-bigints@1.0.2: {}
+ has-flag@3.0.0: {}
+
has-flag@4.0.0: {}
has-property-descriptors@1.0.0:
@@ -4931,6 +5285,8 @@ snapshots:
dependencies:
function-bind: 1.1.2
+ headers-polyfill@4.0.3: {}
+
hmac-drbg@1.0.1:
dependencies:
hash.js: 1.1.7
@@ -5068,6 +5424,8 @@ snapshots:
is-negative-zero@2.0.2: {}
+ is-node-process@1.2.0: {}
+
is-number-object@1.0.7:
dependencies:
has-tostringtag: 1.0.0
@@ -5125,10 +5483,10 @@ snapshots:
make-dir: 4.0.0
supports-color: 7.2.0
- istanbul-lib-source-maps@5.0.4:
+ istanbul-lib-source-maps@5.0.6:
dependencies:
'@jridgewell/trace-mapping': 0.3.25
- debug: 4.3.4
+ debug: 4.3.6
istanbul-lib-coverage: 3.2.2
transitivePeerDependencies:
- supports-color
@@ -5138,13 +5496,19 @@ snapshots:
html-escaper: 2.0.2
istanbul-lib-report: 3.0.1
- jackspeak@2.3.6:
+ jackspeak@3.4.3:
dependencies:
'@isaacs/cliui': 8.0.2
optionalDependencies:
'@pkgjs/parseargs': 0.11.0
- js-tokens@8.0.3: {}
+ jackspeak@4.0.1:
+ dependencies:
+ '@isaacs/cliui': 8.0.2
+ optionalDependencies:
+ '@pkgjs/parseargs': 0.11.0
+
+ js-tokens@4.0.0: {}
js-yaml@4.1.0:
dependencies:
@@ -5160,8 +5524,6 @@ snapshots:
json5@2.2.3: {}
- jsonc-parser@3.2.0: {}
-
jsonfile@6.1.0:
dependencies:
universalify: 2.0.0
@@ -5173,10 +5535,9 @@ snapshots:
prelude-ls: 1.2.1
type-check: 0.4.0
- local-pkg@0.5.0:
+ linkify-it@5.0.0:
dependencies:
- mlly: 1.6.1
- pkg-types: 1.0.3
+ uc.micro: 2.1.0
locate-path@6.0.0:
dependencies:
@@ -5193,33 +5554,39 @@ snapshots:
long@5.2.3: {}
- loupe@2.3.7:
+ loupe@3.1.0:
dependencies:
get-func-name: 2.0.2
- loupe@3.1.0:
+ loupe@3.1.1:
dependencies:
get-func-name: 2.0.2
lru-cache@10.2.2: {}
+ lru-cache@11.0.0: {}
+
lru-cache@6.0.0:
dependencies:
yallist: 4.0.0
- lru-cache@9.1.2: {}
-
lunr@2.3.9: {}
+ lz-string@1.5.0: {}
+
+ magic-string@0.30.11:
+ dependencies:
+ '@jridgewell/sourcemap-codec': 1.5.0
+
magic-string@0.30.8:
dependencies:
'@jridgewell/sourcemap-codec': 1.4.15
- magicast@0.3.3:
+ magicast@0.3.4:
dependencies:
- '@babel/parser': 7.24.0
+ '@babel/parser': 7.25.3
'@babel/types': 7.24.0
- source-map-js: 1.0.2
+ source-map-js: 1.2.0
make-dir@4.0.0:
dependencies:
@@ -5227,7 +5594,14 @@ snapshots:
make-error@1.3.6: {}
- marked@4.3.0: {}
+ markdown-it@14.1.0:
+ dependencies:
+ argparse: 2.0.1
+ entities: 4.5.0
+ linkify-it: 5.0.0
+ mdurl: 2.0.0
+ punycode.js: 2.3.1
+ uc.micro: 2.1.0
md5.js@1.3.5:
dependencies:
@@ -5235,6 +5609,8 @@ snapshots:
inherits: 2.0.4
safe-buffer: 5.2.1
+ mdurl@2.0.0: {}
+
merge-stream@2.0.0: {}
merge2@1.4.1: {}
@@ -5259,41 +5635,54 @@ snapshots:
minimalistic-crypto-utils@1.0.1: {}
+ minimatch@10.0.1:
+ dependencies:
+ brace-expansion: 2.0.1
+
minimatch@3.1.2:
dependencies:
brace-expansion: 1.1.11
- minimatch@9.0.1:
- dependencies:
- brace-expansion: 2.0.1
-
- minimatch@9.0.3:
+ minimatch@9.0.5:
dependencies:
brace-expansion: 2.0.1
minimist@1.2.6: {}
- minipass@6.0.2: {}
-
- minipass@7.0.4: {}
+ minipass@7.1.2: {}
mkdirp-classic@0.5.3: {}
mkdirp@3.0.1: {}
- mlly@1.6.1:
- dependencies:
- acorn: 8.11.3
- pathe: 1.1.2
- pkg-types: 1.0.3
- ufo: 1.5.1
-
mrmime@2.0.0: {}
ms@2.1.2: {}
ms@2.1.3: {}
+ msw@2.3.5(typescript@5.4.3):
+ dependencies:
+ '@bundled-es-modules/cookie': 2.0.0
+ '@bundled-es-modules/statuses': 1.0.1
+ '@bundled-es-modules/tough-cookie': 0.1.6
+ '@inquirer/confirm': 3.1.22
+ '@mswjs/interceptors': 0.29.1
+ '@open-draft/until': 2.1.0
+ '@types/cookie': 0.6.0
+ '@types/statuses': 2.0.5
+ chalk: 4.1.2
+ graphql: 16.9.0
+ headers-polyfill: 4.0.3
+ is-node-process: 1.2.0
+ outvariant: 1.4.3
+ path-to-regexp: 6.2.2
+ strict-event-emitter: 0.5.1
+ type-fest: 4.24.0
+ yargs: 17.7.2
+ optionalDependencies:
+ typescript: 5.4.3
+
mute-stream@1.0.0: {}
nanoid@3.3.7: {}
@@ -5424,18 +5813,18 @@ snapshots:
os-tmpdir@1.0.2: {}
+ outvariant@1.4.3: {}
+
p-limit@3.1.0:
dependencies:
yocto-queue: 0.1.0
- p-limit@5.0.0:
- dependencies:
- yocto-queue: 1.0.0
-
p-locate@5.0.0:
dependencies:
p-limit: 3.1.0
+ package-json-from-dist@1.0.0: {}
+
pako@0.2.9: {}
pako@1.0.11: {}
@@ -5474,22 +5863,22 @@ snapshots:
path-parse@1.0.7: {}
- path-scurry@1.10.1:
- dependencies:
- lru-cache: 9.1.2
- minipass: 6.0.2
-
- path-scurry@1.10.2:
+ path-scurry@1.11.1:
dependencies:
lru-cache: 10.2.2
- minipass: 7.0.4
+ minipass: 7.1.2
+
+ path-scurry@2.0.0:
+ dependencies:
+ lru-cache: 11.0.0
+ minipass: 7.1.2
+
+ path-to-regexp@6.2.2: {}
path-type@4.0.0: {}
pathe@1.1.2: {}
- pathval@1.1.1: {}
-
pathval@2.0.0: {}
pbkdf2@3.1.2:
@@ -5514,12 +5903,6 @@ snapshots:
dependencies:
find-up: 5.0.0
- pkg-types@1.0.3:
- dependencies:
- jsonc-parser: 3.2.0
- mlly: 1.6.1
- pathe: 1.1.2
-
playwright-core@1.42.1: {}
playwright@1.42.1:
@@ -5553,11 +5936,11 @@ snapshots:
prettier@3.0.3: {}
- pretty-format@29.7.0:
+ pretty-format@27.5.1:
dependencies:
- '@jest/schemas': 29.6.3
+ ansi-regex: 5.0.1
ansi-styles: 5.2.0
- react-is: 18.2.0
+ react-is: 17.0.2
printj@1.1.2: {}
@@ -5565,6 +5948,8 @@ snapshots:
process@0.11.10: {}
+ psl@1.9.0: {}
+
public-encrypt@4.0.3:
dependencies:
bn.js: 4.12.0
@@ -5590,6 +5975,8 @@ snapshots:
inherits: 2.0.4
pump: 2.0.1
+ punycode.js@2.3.1: {}
+
punycode@1.4.1: {}
punycode@2.1.1: {}
@@ -5600,6 +5987,8 @@ snapshots:
querystring-es3@0.2.1: {}
+ querystringify@2.2.0: {}
+
queue-microtask@1.2.3: {}
queue-tick@1.0.1: {}
@@ -5620,7 +6009,7 @@ snapshots:
minimist: 1.2.6
strip-json-comments: 2.0.1
- react-is@18.2.0: {}
+ react-is@17.0.2: {}
readable-stream@2.3.8:
dependencies:
@@ -5638,6 +6027,8 @@ snapshots:
string_decoder: 1.3.0
util-deprecate: 1.0.2
+ regenerator-runtime@0.14.1: {}
+
regexp.prototype.flags@1.5.0:
dependencies:
call-bind: 1.0.2
@@ -5646,6 +6037,8 @@ snapshots:
require-directory@2.1.1: {}
+ requires-port@1.0.0: {}
+
resolve-from@4.0.0: {}
resolve-pkg-maps@1.0.0: {}
@@ -5667,9 +6060,10 @@ snapshots:
dependencies:
glob: 7.2.3
- rimraf@5.0.1:
+ rimraf@6.0.1:
dependencies:
- glob: 10.2.6
+ glob: 11.0.0
+ package-json-from-dist: 1.0.0
ripemd160@2.0.2:
dependencies:
@@ -5753,12 +6147,10 @@ snapshots:
shebang-regex@3.0.0: {}
- shiki@0.14.7:
+ shiki@1.12.1:
dependencies:
- ansi-sequence-parser: 1.1.0
- jsonc-parser: 3.2.0
- vscode-oniguruma: 1.7.0
- vscode-textmate: 8.0.0
+ '@shikijs/core': 1.12.1
+ '@types/hast': 3.0.4
side-channel@1.0.4:
dependencies:
@@ -5799,10 +6191,14 @@ snapshots:
source-map-js@1.0.2: {}
+ source-map-js@1.2.0: {}
+
source-map@0.6.1: {}
stackback@0.0.2: {}
+ statuses@2.0.1: {}
+
std-env@3.7.0: {}
stream-browserify@3.0.0:
@@ -5826,6 +6222,8 @@ snapshots:
optionalDependencies:
bare-events: 2.2.2
+ strict-event-emitter@0.5.1: {}
+
string-width@4.2.3:
dependencies:
emoji-regex: 8.0.0
@@ -5880,9 +6278,9 @@ snapshots:
strip-json-comments@3.1.1: {}
- strip-literal@2.0.0:
+ supports-color@5.5.0:
dependencies:
- js-tokens: 8.0.3
+ has-flag: 3.0.0
supports-color@7.2.0:
dependencies:
@@ -5913,11 +6311,11 @@ snapshots:
fast-fifo: 1.3.2
streamx: 2.16.1
- test-exclude@6.0.0:
+ test-exclude@7.0.1:
dependencies:
'@istanbuljs/schema': 0.1.3
- glob: 7.2.3
- minimatch: 3.1.2
+ glob: 10.4.5
+ minimatch: 9.0.5
text-table@0.2.0: {}
@@ -5930,11 +6328,13 @@ snapshots:
dependencies:
setimmediate: 1.0.5
- tinybench@2.6.0: {}
+ tinybench@2.9.0: {}
- tinypool@0.8.2: {}
+ tinypool@1.0.0: {}
- tinyspy@2.2.1: {}
+ tinyrainbow@1.2.0: {}
+
+ tinyspy@3.0.0: {}
tmp@0.0.33:
dependencies:
@@ -5948,6 +6348,13 @@ snapshots:
totalist@3.0.1: {}
+ tough-cookie@4.1.4:
+ dependencies:
+ psl: 1.9.0
+ punycode: 2.1.1
+ universalify: 0.2.0
+ url-parse: 1.5.10
+
ts-api-utils@1.0.1(typescript@5.4.3):
dependencies:
typescript: 5.4.3
@@ -6000,29 +6407,30 @@ snapshots:
dependencies:
prelude-ls: 1.2.1
- type-detect@4.0.8: {}
-
type-fest@0.20.2: {}
type-fest@0.21.3: {}
+ type-fest@4.24.0: {}
+
typed-array-length@1.0.4:
dependencies:
call-bind: 1.0.2
for-each: 0.3.3
is-typed-array: 1.1.10
- typedoc@0.25.12(typescript@5.4.3):
+ typedoc@0.26.5(typescript@5.4.3):
dependencies:
lunr: 2.3.9
- marked: 4.3.0
- minimatch: 9.0.3
- shiki: 0.14.7
+ markdown-it: 14.1.0
+ minimatch: 9.0.5
+ shiki: 1.12.1
typescript: 5.4.3
+ yaml: 2.5.0
typescript@5.4.3: {}
- ufo@1.5.1: {}
+ uc.micro@2.1.0: {}
uglify-js@3.17.4:
optional: true
@@ -6036,12 +6444,21 @@ snapshots:
undici-types@5.26.5: {}
+ undici-types@6.13.0: {}
+
+ universalify@0.2.0: {}
+
universalify@2.0.0: {}
uri-js@4.4.1:
dependencies:
punycode: 2.1.1
+ url-parse@1.5.10:
+ dependencies:
+ querystringify: 2.2.0
+ requires-port: 1.0.0
+
url@0.11.3:
dependencies:
punycode: 1.4.1
@@ -6059,18 +6476,12 @@ snapshots:
v8-compile-cache-lib@3.0.1: {}
- v8-to-istanbul@9.2.0:
- dependencies:
- '@jridgewell/trace-mapping': 0.3.25
- '@types/istanbul-lib-coverage': 2.0.6
- convert-source-map: 2.0.0
-
- vite-node@1.4.0(@types/node@20.10.0):
+ vite-node@2.0.5(@types/node@20.10.0):
dependencies:
cac: 6.7.14
- debug: 4.3.4
+ debug: 4.3.6
pathe: 1.1.2
- picocolors: 1.0.0
+ tinyrainbow: 1.2.0
vite: 5.1.6(@types/node@20.10.0)
transitivePeerDependencies:
- '@types/node'
@@ -6082,7 +6493,7 @@ snapshots:
- supports-color
- terser
- vite-plugin-node-polyfills@0.21.0(rollup@4.13.0)(vite@5.1.6(@types/node@20.10.0)):
+ vite-plugin-node-polyfills@0.22.0(rollup@4.13.0)(vite@5.1.6(@types/node@20.10.0)):
dependencies:
'@rollup/plugin-inject': 5.0.5(rollup@4.13.0)
node-stdlib-browser: 1.2.0
@@ -6099,32 +6510,31 @@ snapshots:
'@types/node': 20.10.0
fsevents: 2.3.3
- vitest@1.4.0(@types/node@20.10.0)(@vitest/browser@1.4.0)(@vitest/ui@1.4.0):
+ vitest@2.0.5(@types/node@20.10.0)(@vitest/browser@2.0.5)(@vitest/ui@2.0.5):
dependencies:
- '@vitest/expect': 1.4.0
- '@vitest/runner': 1.4.0
- '@vitest/snapshot': 1.4.0
- '@vitest/spy': 1.4.0
- '@vitest/utils': 1.4.0
- acorn-walk: 8.3.2
- chai: 4.4.1
- debug: 4.3.4
+ '@ampproject/remapping': 2.3.0
+ '@vitest/expect': 2.0.5
+ '@vitest/pretty-format': 2.0.5
+ '@vitest/runner': 2.0.5
+ '@vitest/snapshot': 2.0.5
+ '@vitest/spy': 2.0.5
+ '@vitest/utils': 2.0.5
+ chai: 5.1.1
+ debug: 4.3.6
execa: 8.0.1
- local-pkg: 0.5.0
- magic-string: 0.30.8
+ magic-string: 0.30.11
pathe: 1.1.2
- picocolors: 1.0.0
std-env: 3.7.0
- strip-literal: 2.0.0
- tinybench: 2.6.0
- tinypool: 0.8.2
+ tinybench: 2.9.0
+ tinypool: 1.0.0
+ tinyrainbow: 1.2.0
vite: 5.1.6(@types/node@20.10.0)
- vite-node: 1.4.0(@types/node@20.10.0)
- why-is-node-running: 2.2.2
+ vite-node: 2.0.5(@types/node@20.10.0)
+ why-is-node-running: 2.3.0
optionalDependencies:
'@types/node': 20.10.0
- '@vitest/browser': 1.4.0(playwright@1.42.1)(vitest@1.4.0)
- '@vitest/ui': 1.4.0(vitest@1.4.0)
+ '@vitest/browser': 2.0.5(playwright@1.42.1)(typescript@5.4.3)(vitest@2.0.5)
+ '@vitest/ui': 2.0.5(vitest@2.0.5)
transitivePeerDependencies:
- less
- lightningcss
@@ -6136,10 +6546,6 @@ snapshots:
vm-browserify@1.1.2: {}
- vscode-oniguruma@1.7.0: {}
-
- vscode-textmate@8.0.0: {}
-
wcwidth@1.0.1:
dependencies:
defaults: 1.0.4
@@ -6165,7 +6571,7 @@ snapshots:
dependencies:
isexe: 2.0.0
- why-is-node-running@2.2.2:
+ why-is-node-running@2.3.0:
dependencies:
siginfo: 2.0.0
stackback: 0.0.2
@@ -6194,12 +6600,16 @@ snapshots:
ws@8.13.0: {}
+ ws@8.18.0: {}
+
xtend@4.0.2: {}
y18n@5.0.8: {}
yallist@4.0.0: {}
+ yaml@2.5.0: {}
+
yargs-parser@21.1.1: {}
yargs@17.7.2:
@@ -6216,4 +6626,4 @@ snapshots:
yocto-queue@0.1.0: {}
- yocto-queue@1.0.0: {}
+ yoctocolors-cjs@2.1.2: {}
From 407910c2be2e60a250c171d0568277dde9d690aa Mon Sep 17 00:00:00 2001
From: alina sireneva
Date: Mon, 12 Aug 2024 08:19:16 +0300
Subject: [PATCH 2/8] build: friendship ended with prettier
---
.config/eslint.cjs | 2 +-
package.json | 4 ----
packages/core/scripts/generate-client.cjs | 15 ------------
packages/core/scripts/generate-updates.cjs | 14 +----------
packages/create-bot/template/package.json.hbs | 1 -
packages/dispatcher/scripts/generate.cjs | 5 +---
packages/dispatcher/src/filters/chat.ts | 1 -
packages/dispatcher/src/filters/user.ts | 1 -
pnpm-lock.yaml | 23 -------------------
9 files changed, 3 insertions(+), 63 deletions(-)
diff --git a/.config/eslint.cjs b/.config/eslint.cjs
index 02b8bd5b..03b4c66b 100644
--- a/.config/eslint.cjs
+++ b/.config/eslint.cjs
@@ -4,7 +4,7 @@ module.exports = {
es2021: true,
node: true,
},
- extends: ['eslint:recommended', 'plugin:import/recommended', 'prettier'],
+ extends: ['eslint:recommended', 'plugin:import/recommended'],
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
diff --git a/package.json b/package.json
index c962944f..6c53bcab 100644
--- a/package.json
+++ b/package.json
@@ -38,7 +38,6 @@
"lint:tsc:ci": "pnpm -r exec tsc --build",
"lint:dpdm": "dpdm -T --no-warning --no-tree --exit-code circular:1 packages/*",
"lint:fix": "eslint --fix .",
- "format": "prettier --write \"packages/**/*.ts\"",
"publish-all": "node scripts/publish.js all",
"docs": "typedoc --options .config/typedoc/config.cjs",
"build-package": "node scripts/build-package.js"
@@ -61,14 +60,12 @@
"dpdm": "3.14.0",
"esbuild": "0.23.0",
"eslint": "8.47.0",
- "eslint-config-prettier": "8.8.0",
"eslint-import-resolver-typescript": "3.6.0",
"eslint-plugin-ascii": "1.0.0",
"eslint-plugin-import": "2.28.0",
"eslint-plugin-simple-import-sort": "10.0.0",
"glob": "11.0.0",
"playwright": "1.42.1",
- "prettier": "3.0.3",
"rimraf": "6.0.1",
"semver": "7.5.1",
"ts-node": "10.9.1",
@@ -80,7 +77,6 @@
"vitest": "2.0.5"
},
"packageManager": "pnpm@9.0.6",
- "prettier": "./.config/prettier.cjs",
"eslintConfig": {
"extends": "./.config/eslint.cjs"
}
diff --git a/packages/core/scripts/generate-client.cjs b/packages/core/scripts/generate-client.cjs
index 670d2052..b802bfff 100644
--- a/packages/core/scripts/generate-client.cjs
+++ b/packages/core/scripts/generate-client.cjs
@@ -1,7 +1,6 @@
const ts = require('typescript')
const path = require('path')
const fs = require('fs')
-const prettier = require('prettier')
const updates = require('./generate-updates.cjs')
const schema = require('../../tl/api-schema.json')
@@ -185,16 +184,6 @@ function determineCommonAvailability(methods, resolver = (v) => v) {
return common
}
-async function runPrettier(targetFile) {
- const prettierConfig = await prettier.resolveConfig(targetFile)
- let fullSource = await fs.promises.readFile(targetFile, 'utf-8')
- fullSource = await prettier.format(fullSource, {
- ...(prettierConfig || {}),
- filepath: targetFile,
- })
- await fs.promises.writeFile(targetFile, fullSource)
-}
-
function runEslint(targetFile) {
require('child_process').execSync(`pnpm exec eslint --fix ${targetFile}`, {
stdio: 'inherit',
@@ -781,10 +770,6 @@ withParams(params: RpcCallOptions): this\n`)
await new Promise((resolve) => { outputMethods.end(resolve) })
await new Promise((resolve) => { output.end(resolve) })
- // format the resulting files with prettier and eslint
- runPrettier(targetFile)
- runPrettier(targetFileMethods)
-
runEslint(targetFile)
runEslint(targetFileMethods)
}
diff --git a/packages/core/scripts/generate-updates.cjs b/packages/core/scripts/generate-updates.cjs
index c814655d..e33c65b7 100644
--- a/packages/core/scripts/generate-updates.cjs
+++ b/packages/core/scripts/generate-updates.cjs
@@ -1,6 +1,5 @@
const fs = require('fs')
const path = require('path')
-const prettier = require('prettier')
const snakeToCamel = (s) => {
return s.replace(/(? {
@@ -65,17 +64,6 @@ function replaceSections(filename, sections, dir = __dirname) {
const types = parseUpdateTypes()
-async function formatFile(filename, dir = __dirname) {
- const targetFile = path.join(dir, '../src/', filename)
- const prettierConfig = await prettier.resolveConfig(targetFile)
- let fullSource = await fs.promises.readFile(targetFile, 'utf-8')
- fullSource = await prettier.format(fullSource, {
- ...(prettierConfig || {}),
- filepath: targetFile,
- })
- await fs.promises.writeFile(targetFile, fullSource)
-}
-
function toSentence(type, stype = 'inline') {
const name = camelToSnake(type.handlerTypeName).toLowerCase().replace(/_/g, ' ')
@@ -100,7 +88,7 @@ async function main() {
generateParsedUpdate()
}
-module.exports = { types, toSentence, replaceSections, formatFile }
+module.exports = { types, toSentence, replaceSections }
if (require.main === module) {
main().catch(console.error)
diff --git a/packages/create-bot/template/package.json.hbs b/packages/create-bot/template/package.json.hbs
index 5576e2c5..5b75fd6e 100644
--- a/packages/create-bot/template/package.json.hbs
+++ b/packages/create-bot/template/package.json.hbs
@@ -11,7 +11,6 @@
{{#if features.linters}}
"lint": "eslint .",
"lint:fix": "eslint --fix .",
- "format": "prettier --write \"src/**/*.ts\"",
{{/if}}
{{#if (eq runtime "bun")}}
{{#if features.typescript}}
diff --git a/packages/dispatcher/scripts/generate.cjs b/packages/dispatcher/scripts/generate.cjs
index 197b4ecb..a582bf46 100644
--- a/packages/dispatcher/scripts/generate.cjs
+++ b/packages/dispatcher/scripts/generate.cjs
@@ -1,4 +1,4 @@
-const { types, toSentence, replaceSections, formatFile } = require('../../core/scripts/generate-updates.cjs')
+const { types, toSentence, replaceSections } = require('../../core/scripts/generate-updates.cjs')
function generateHandler() {
const lines = []
@@ -105,9 +105,6 @@ ${
async function main() {
generateHandler()
generateDispatcher()
-
- await formatFile('handler.ts', __dirname)
- await formatFile('dispatcher.ts', __dirname)
}
module.exports = { types, toSentence }
diff --git a/packages/dispatcher/src/filters/chat.ts b/packages/dispatcher/src/filters/chat.ts
index 6a170660..a024f721 100644
--- a/packages/dispatcher/src/filters/chat.ts
+++ b/packages/dispatcher/src/filters/chat.ts
@@ -37,7 +37,6 @@ export const chat =
(msg) =>
msg.chat.chatType === type
-// prettier-ignore
/**
* Filter updates by marked chat ID(s) or username(s)
*
diff --git a/packages/dispatcher/src/filters/user.ts b/packages/dispatcher/src/filters/user.ts
index f2e591d5..81743435 100644
--- a/packages/dispatcher/src/filters/user.ts
+++ b/packages/dispatcher/src/filters/user.ts
@@ -32,7 +32,6 @@ export const me: UpdateFilter = (msg) =>
*/
export const bot: UpdateFilter = (msg) => msg.sender.constructor === User && msg.sender.isBot
-// prettier-ignore
/**
* Filter updates by user ID(s) or username(s)
*
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 33cf52ec..1257c329 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -59,9 +59,6 @@ importers:
eslint:
specifier: 8.47.0
version: 8.47.0
- eslint-config-prettier:
- specifier: 8.8.0
- version: 8.8.0(eslint@8.47.0)
eslint-import-resolver-typescript:
specifier: 3.6.0
version: 3.6.0(@typescript-eslint/parser@6.4.0(eslint@8.47.0)(typescript@5.4.3))(eslint-plugin-import@2.28.0)(eslint@8.47.0)
@@ -80,9 +77,6 @@ importers:
playwright:
specifier: 1.42.1
version: 1.42.1
- prettier:
- specifier: 3.0.3
- version: 3.0.3
rimraf:
specifier: 6.0.1
version: 6.0.1
@@ -1801,12 +1795,6 @@ packages:
resolution: {integrity: sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==}
engines: {node: '>=12'}
- eslint-config-prettier@8.8.0:
- resolution: {integrity: sha512-wLbQiFre3tdGgpDv67NQKnJuTlcUVYHas3k+DZCc2U2BadthoEY4B7hLPvAxaqdyOGCzuLfii2fqGph10va7oA==}
- hasBin: true
- peerDependencies:
- eslint: '>=7.0.0'
-
eslint-import-resolver-node@0.3.7:
resolution: {integrity: sha512-gozW2blMLJCeFpBwugLTGyvVjNoeo1knonXAcatC6bjPBZitotxdWf7Gimr25N4c0AAOo4eOUfaG82IJPDpqCA==}
@@ -2753,11 +2741,6 @@ packages:
resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==}
engines: {node: '>= 0.8.0'}
- prettier@3.0.3:
- resolution: {integrity: sha512-L/4pUDMxcNa8R/EthV08Zt42WBO4h1rarVtK0K+QJG0X187OLo7l699jWw0GKuwzkPQ//jMFA/8Xm6Fh3J/DAg==}
- engines: {node: '>=14'}
- hasBin: true
-
pretty-format@27.5.1:
resolution: {integrity: sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ==}
engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0}
@@ -4852,10 +4835,6 @@ snapshots:
escape-string-regexp@5.0.0: {}
- eslint-config-prettier@8.8.0(eslint@8.47.0):
- dependencies:
- eslint: 8.47.0
-
eslint-import-resolver-node@0.3.7:
dependencies:
debug: 3.2.7
@@ -5934,8 +5913,6 @@ snapshots:
prelude-ls@1.2.1: {}
- prettier@3.0.3: {}
-
pretty-format@27.5.1:
dependencies:
ansi-regex: 5.0.1
From e429dbe40a3d8fee94164ac7c61a4d40feaf4e75 Mon Sep 17 00:00:00 2001
From: alina sireneva
Date: Mon, 12 Aug 2024 09:19:45 +0300
Subject: [PATCH 3/8] chore: move everything to esm
---
.config/{eslint.ci.js => eslint.ci.cjs} | 0
.config/eslint.cjs | 8 +---
.config/vite-utils/test-setup-plugin.ts | 2 +-
.../{test-setup.mts => test-setup.ts} | 0
.config/{vite.browser.mts => vite.browser.ts} | 2 +-
.config/{vite.bun.mts => vite.bun.ts} | 0
.config/{vite.deno.mts => vite.deno.ts} | 0
.config/{vite.mts => vite.ts} | 2 +-
.github/workflows/test.yaml | 4 +-
e2e/deno/init-server.js | 42 +++++++++----------
package.json | 19 +++++----
packages/crypto-node/build.config.cjs | 4 +-
scripts/build-package.js | 40 ++++++++++--------
scripts/bump-version.js | 33 ++++++++-------
scripts/find-updated-packages.js | 27 +++++++-----
.../{gen-deps-graph.mjs => gen-deps-graph.js} | 4 +-
scripts/generate-changelog.js | 14 ++++---
scripts/git-utils.js | 23 +++++-----
scripts/publish.js | 27 ++++++------
...rcefiles.mjs => remove-jsr-sourcefiles.js} | 0
scripts/{utils.mjs => utils.js} | 0
...versions.mjs => validate-deps-versions.js} | 2 +-
22 files changed, 133 insertions(+), 120 deletions(-)
rename .config/{eslint.ci.js => eslint.ci.cjs} (100%)
rename .config/vite-utils/{test-setup.mts => test-setup.ts} (100%)
rename .config/{vite.browser.mts => vite.browser.ts} (97%)
rename .config/{vite.bun.mts => vite.bun.ts} (100%)
rename .config/{vite.deno.mts => vite.deno.ts} (100%)
rename .config/{vite.mts => vite.ts} (94%)
rename scripts/{gen-deps-graph.mjs => gen-deps-graph.js} (88%)
rename scripts/{remove-jsr-sourcefiles.mjs => remove-jsr-sourcefiles.js} (100%)
rename scripts/{utils.mjs => utils.js} (100%)
rename scripts/{validate-deps-versions.mjs => validate-deps-versions.js} (97%)
diff --git a/.config/eslint.ci.js b/.config/eslint.ci.cjs
similarity index 100%
rename from .config/eslint.ci.js
rename to .config/eslint.ci.cjs
diff --git a/.config/eslint.cjs b/.config/eslint.cjs
index 03b4c66b..ea738b9f 100644
--- a/.config/eslint.cjs
+++ b/.config/eslint.cjs
@@ -167,6 +167,7 @@ module.exports = {
'import/no-relative-packages': 'error',
'import/no-mutable-exports': 'error',
'import/no-default-export': 'error',
+ 'import/no-unresolved': 'off',
'no-console': ['error', { allow: ['warn', 'error'] }],
},
ignorePatterns: [
@@ -281,17 +282,10 @@ module.exports = {
{
files: ['packages/bun/**', 'packages/deno/**'],
rules: {
- 'import/no-unresolved': 'off',
'no-restricted-imports': 'off',
'import/no-relative-packages': 'off', // common-internals is symlinked from node
}
},
- {
- files: ['e2e/deno/**'],
- rules: {
- 'import/no-unresolved': 'off',
- }
- },
],
settings: {
'import/resolver': {
diff --git a/.config/vite-utils/test-setup-plugin.ts b/.config/vite-utils/test-setup-plugin.ts
index 4e638511..b3c94452 100644
--- a/.config/vite-utils/test-setup-plugin.ts
+++ b/.config/vite-utils/test-setup-plugin.ts
@@ -1,7 +1,7 @@
import { Plugin } from 'vite'
import { fileURLToPath } from 'url'
-const setupFile = fileURLToPath(new URL('./test-setup.mts', import.meta.url))
+const setupFile = fileURLToPath(new URL('./test-setup.ts', import.meta.url))
export function testSetup(params?: { additionalCode?: string }): Plugin {
const { additionalCode = '' } = params || {}
diff --git a/.config/vite-utils/test-setup.mts b/.config/vite-utils/test-setup.ts
similarity index 100%
rename from .config/vite-utils/test-setup.mts
rename to .config/vite-utils/test-setup.ts
diff --git a/.config/vite.browser.mts b/.config/vite.browser.ts
similarity index 97%
rename from .config/vite.browser.mts
rename to .config/vite.browser.ts
index dfda1eea..b06c7b57 100644
--- a/.config/vite.browser.mts
+++ b/.config/vite.browser.ts
@@ -2,7 +2,7 @@
import { mergeConfig } from 'vite'
import { nodePolyfills } from 'vite-plugin-node-polyfills'
-import baseConfig from './vite.mjs'
+import baseConfig from './vite.js'
import { fixupCjs } from './vite-utils/fixup-cjs'
export default mergeConfig(baseConfig, {
diff --git a/.config/vite.bun.mts b/.config/vite.bun.ts
similarity index 100%
rename from .config/vite.bun.mts
rename to .config/vite.bun.ts
diff --git a/.config/vite.deno.mts b/.config/vite.deno.ts
similarity index 100%
rename from .config/vite.deno.mts
rename to .config/vite.deno.ts
diff --git a/.config/vite.mts b/.config/vite.ts
similarity index 94%
rename from .config/vite.mts
rename to .config/vite.ts
index 5bc69261..355a2d0c 100644
--- a/.config/vite.mts
+++ b/.config/vite.ts
@@ -20,7 +20,7 @@ export default defineConfig({
]
},
setupFiles: [
- './.config/vite-utils/test-setup.mts'
+ './.config/vite-utils/test-setup.ts'
]
},
define: {
diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml
index 1ae23c58..5a328454 100644
--- a/.github/workflows/test.yaml
+++ b/.github/workflows/test.yaml
@@ -52,7 +52,7 @@ jobs:
with:
bun-version: '1.1.4'
- name: 'Build tests'
- run: pnpm exec vite build -c .config/vite.bun.mts
+ run: pnpm exec vite build -c .config/vite.bun.ts
- name: 'Run tests'
run: cd dist/tests && bun test
@@ -65,7 +65,7 @@ jobs:
with:
deno-version: '1.43.1'
- name: 'Build tests'
- run: pnpm exec vite build -c .config/vite.deno.mts
+ run: pnpm exec vite build -c .config/vite.deno.ts
- name: 'Run tests'
run: cd dist/tests && deno test -A --unstable-ffi
diff --git a/e2e/deno/init-server.js b/e2e/deno/init-server.js
index 429a2e9e..40ce6f58 100644
--- a/e2e/deno/init-server.js
+++ b/e2e/deno/init-server.js
@@ -1,5 +1,5 @@
/* eslint-disable no-console */
-const { execSync } = require('child_process')
+import { execSync } from 'child_process'
function getDockerContainerIp(name) {
const containerId = execSync(`docker compose ps -q ${name}`).toString().trim()
@@ -41,27 +41,25 @@ async function createBucket(name) {
}
}
-(async () => {
- for (const bucket of ['modules', 'docs', 'publishing', 'npm']) {
- const ok = await createBucket(bucket)
- console.log(`[i] Created bucket ${bucket}: ${ok}`)
- }
+for (const bucket of ['modules', 'docs', 'publishing', 'npm']) {
+ const ok = await createBucket(bucket)
+ console.log(`[i] Created bucket ${bucket}: ${ok}`)
+}
- // create @mtcute scope if it doesn't exist
- const resp = await fetch(`${API_URL}api/scopes`, {
- method: 'POST',
- headers: {
- 'Content-Type': 'application/json',
- Cookie: 'token=token',
- },
- body: JSON.stringify({ scope: 'mtcute' }),
- })
+// create @mtcute scope if it doesn't exist
+const resp = await fetch(`${API_URL}api/scopes`, {
+ method: 'POST',
+ headers: {
+ 'Content-Type': 'application/json',
+ Cookie: 'token=token',
+ },
+ body: JSON.stringify({ scope: 'mtcute' }),
+})
- if (resp.status !== 200 && resp.status !== 409) {
- throw new Error(`Failed to create scope: ${resp.statusText} ${await resp.text()}`)
- }
+if (resp.status !== 200 && resp.status !== 409) {
+ throw new Error(`Failed to create scope: ${resp.statusText} ${await resp.text()}`)
+}
- if (resp.status === 200) {
- console.log('[i] Created scope mtcute')
- }
-})()
+if (resp.status === 200) {
+ console.log('[i] Created scope mtcute')
+}
diff --git a/package.json b/package.json
index 6c53bcab..3d57ca76 100644
--- a/package.json
+++ b/package.json
@@ -5,6 +5,7 @@
"description": "Type-safe library for MTProto (Telegram API) for browser and NodeJS",
"license": "MIT",
"author": "alina sireneva ",
+ "type": "module",
"keywords": [
"telegram",
"telegram-api",
@@ -24,16 +25,16 @@
"packages/*"
],
"scripts": {
- "postinstall": "node scripts/validate-deps-versions.mjs && node scripts/remove-jsr-sourcefiles.mjs",
- "test": "pnpm run -r test && vitest --config .config/vite.mts run",
- "test:dev": "vitest --config .config/vite.mts watch",
- "test:ui": "vitest --config .config/vite.mts --ui",
- "test:coverage": "vitest --config .config/vite.mts run --coverage",
- "test:ci": "vitest --config .config/vite.mts run --coverage.enabled --coverage.reporter=json",
- "test:browser": "vitest --config .config/vite.browser.mts run",
- "test:browser:dev": "vitest --config .config/vite.browser.mts watch",
+ "postinstall": "node scripts/validate-deps-versions.js && node scripts/remove-jsr-sourcefiles.js",
+ "test": "pnpm run -r test && vitest --config .config/vite.ts run",
+ "test:dev": "vitest --config .config/vite.ts watch",
+ "test:ui": "vitest --config .config/vite.ts --ui",
+ "test:coverage": "vitest --config .config/vite.ts run --coverage",
+ "test:ci": "vitest --config .config/vite.ts run --coverage.enabled --coverage.reporter=json",
+ "test:browser": "vitest --config .config/vite.browser.ts run",
+ "test:browser:dev": "vitest --config .config/vite.browser.ts watch",
"lint": "eslint .",
- "lint:ci": "NODE_OPTIONS=\\\"--max_old_space_size=8192\\\" eslint --config .config/eslint.ci.js .",
+ "lint:ci": "NODE_OPTIONS=\\\"--max_old_space_size=8192\\\" eslint --config .config/eslint.ci.cjs .",
"lint:tsc": "rimraf packages/**/dist packages/**/*.tsbuildinfo && pnpm -r --workspace-concurrency=4 exec tsc --build",
"lint:tsc:ci": "pnpm -r exec tsc --build",
"lint:dpdm": "dpdm -T --no-warning --no-tree --exit-code circular:1 packages/*",
diff --git a/packages/crypto-node/build.config.cjs b/packages/crypto-node/build.config.cjs
index fa1e79df..dc8b949e 100644
--- a/packages/crypto-node/build.config.cjs
+++ b/packages/crypto-node/build.config.cjs
@@ -4,7 +4,7 @@ const fs = require('fs')
const cp = require('child_process')
const { Readable } = require('stream')
-const git = require('../../scripts/git-utils')
+let git
const GITHUB_TOKEN = process.env.GITHUB_TOKEN
let SKIP_PREBUILT = process.env.BUILD_FOR_DOCS === '1'
@@ -151,6 +151,8 @@ async function extractArtifacts(artifacts) {
module.exports = ({ fs, glob, path, packageDir, outDir }) => ({
async final() {
+ // eslint-disable-next-line import/no-relative-packages
+ git = await import('../../scripts/git-utils.js')
const libDir = path.join(packageDir, 'lib')
if (!SKIP_PREBUILT) {
diff --git a/scripts/build-package.js b/scripts/build-package.js
index 72b7487f..b31b2698 100644
--- a/scripts/build-package.js
+++ b/scripts/build-package.js
@@ -1,12 +1,15 @@
/* eslint-disable no-inner-declarations */
-const cp = require('child_process')
-const path = require('path')
-const fs = require('fs')
-const glob = require('glob')
-const ts = require('typescript')
-const stc = require('@teidesu/slow-types-compiler')
-// @ts-ignore
-const rootPackageJson = require('../package.json')
+import * as cp from 'child_process'
+import * as fs from 'fs'
+import * as glob from 'glob'
+import { createRequire } from 'module'
+import * as path from 'path'
+import ts from 'typescript'
+
+import * as stc from '@teidesu/slow-types-compiler'
+const __dirname = path.dirname(new URL(import.meta.url).pathname)
+
+const rootPackageJson = JSON.parse(fs.readFileSync(path.join(__dirname, '../package.json'), 'utf-8'))
if (process.argv.length < 3) {
console.log('Usage: build-package.js ')
@@ -30,6 +33,9 @@ function transformFile(file, transform) {
if (res != null) fs.writeFileSync(file, res)
}
+// todo make them esm
+const require = createRequire(import.meta.url)
+
const buildConfig = {
buildTs: true,
buildCjs: true,
@@ -617,12 +623,12 @@ if (!IS_JSR) {
fs.writeFileSync(path.join(outDir, '.npmignore'), '*.tsbuildinfo\n')
}
-Promise.resolve(buildConfig.final()).then(() => {
- if (IS_JSR && !process.env.CI) {
- console.log('[i] Trying to publish with --dry-run')
- exec('deno publish --dry-run --allow-dirty --quiet', { cwd: outDir })
- console.log('[v] All good!')
- } else {
- console.log('[v] Done!')
- }
-})
+await buildConfig.final()
+
+if (IS_JSR && !process.env.CI) {
+ console.log('[i] Trying to publish with --dry-run')
+ exec('deno publish --dry-run --allow-dirty --quiet', { cwd: outDir })
+ console.log('[v] All good!')
+} else {
+ console.log('[v] Done!')
+}
diff --git a/scripts/bump-version.js b/scripts/bump-version.js
index 7b3ab98f..3479f649 100644
--- a/scripts/bump-version.js
+++ b/scripts/bump-version.js
@@ -1,14 +1,17 @@
-const fs = require('fs')
-const path = require('path')
-const semver = require('semver')
+import { appendFileSync, readdirSync, readFileSync, writeFileSync } from 'fs'
+import { EOL } from 'os'
+import { dirname, join } from 'path'
+import { inc, rcompare } from 'semver'
+import { fileURLToPath } from 'url'
+
+const __dirname = dirname(new URL(import.meta.url).pathname)
function collectPackageJsons() {
- return fs
- .readdirSync(path.join(__dirname, '../packages'))
+ return readdirSync(join(__dirname, '../packages'))
.filter((s) => !s.startsWith('.'))
.map((name) => {
try {
- return JSON.parse(fs.readFileSync(path.join(__dirname, '../packages', name, 'package.json'), 'utf-8'))
+ return JSON.parse(readFileSync(join(__dirname, '../packages', name, 'package.json'), 'utf-8'))
} catch (e) {
if (e.code !== 'ENOENT') throw e
@@ -23,9 +26,9 @@ function bumpVersions(packages, kind) {
const maxVersion = pkgJsons
.filter((it) => it.name !== '@mtcute/tl')
.map((it) => it.version)
- .sort(semver.rcompare)[0]
+ .sort(rcompare)[0]
- const nextVersion = semver.inc(maxVersion, kind)
+ const nextVersion = inc(maxVersion, kind)
console.log('[i] Bumping versions to %s', nextVersion)
for (const pkg of packages) {
@@ -38,20 +41,20 @@ function bumpVersions(packages, kind) {
}
pkgJson.version = nextVersion
- fs.writeFileSync(
- path.join(__dirname, '../packages', pkg, 'package.json'),
+ writeFileSync(
+ join(__dirname, '../packages', pkg, 'package.json'),
JSON.stringify(pkgJson, null, 4) + '\n',
)
}
- const rootPkgJson = JSON.parse(fs.readFileSync(path.join(__dirname, '../package.json'), 'utf-8'))
+ const rootPkgJson = JSON.parse(readFileSync(join(__dirname, '../package.json'), 'utf-8'))
rootPkgJson.version = nextVersion
- fs.writeFileSync(path.join(__dirname, '../package.json'), JSON.stringify(rootPkgJson, null, 4) + '\n')
+ writeFileSync(join(__dirname, '../package.json'), JSON.stringify(rootPkgJson, null, 4) + '\n')
return nextVersion
}
-if (require.main === module) {
+if (process.argv[1] === fileURLToPath(import.meta.url)) {
const kind = process.argv[2]
const packages = process.argv[3]
@@ -75,8 +78,8 @@ if (require.main === module) {
const ver = bumpVersions(packagesList, kind)
if (process.env.GITHUB_OUTPUT) {
- fs.appendFileSync(process.env.GITHUB_OUTPUT, `version=${ver}${require('os').EOL}`)
+ appendFileSync(process.env.GITHUB_OUTPUT, `version=${ver}${EOL}`)
}
}
-module.exports = { bumpVersions }
+export { bumpVersions }
diff --git a/scripts/find-updated-packages.js b/scripts/find-updated-packages.js
index f8a68552..eb2f56ea 100644
--- a/scripts/find-updated-packages.js
+++ b/scripts/find-updated-packages.js
@@ -1,22 +1,27 @@
-const cp = require('child_process')
-const fs = require('fs')
-const path = require('path')
-const { listPackages } = require('./publish')
-const { getLatestTag, findChangedFilesSince } = require('./git-utils')
+import { execSync } from 'child_process'
+import { appendFileSync, existsSync } from 'fs'
+import { EOL } from 'os'
+import { dirname, join } from 'path'
+import { fileURLToPath } from 'url'
+
+import { findChangedFilesSince, getLatestTag } from './git-utils.js'
+import { listPackages } from './publish.js'
getTsconfigFiles.cache = {}
+const __dirname = dirname(new URL(import.meta.url).pathname)
+
function getTsconfigFiles(pkg) {
- if (!fs.existsSync(path.join(__dirname, `../packages/${pkg}/tsconfig.json`))) {
+ if (!existsSync(join(__dirname, `../packages/${pkg}/tsconfig.json`))) {
throw new Error(`[!] ${pkg} does not have a tsconfig.json`)
}
if (pkg in getTsconfigFiles.cache) return getTsconfigFiles.cache[pkg]
console.log('[i] Getting tsconfig files for %s', pkg)
- const res = cp.execSync('pnpm exec tsc --showConfig', {
+ const res = execSync('pnpm exec tsc --showConfig', {
encoding: 'utf8',
stdio: 'pipe',
- cwd: path.join(__dirname, `../packages/${pkg}`),
+ cwd: join(__dirname, `../packages/${pkg}`),
})
const json = JSON.parse(res)
@@ -68,9 +73,9 @@ function findChangedPackagesSince(tag, until) {
return Array.from(changedPackages)
}
-module.exports = { findChangedPackagesSince, getLatestTag }
+export { findChangedPackagesSince, getLatestTag }
-if (require.main === module && process.env.CI && process.env.GITHUB_OUTPUT) {
+if (process.argv[1] === fileURLToPath(import.meta.url) && process.env.CI && process.env.GITHUB_OUTPUT) {
const kind = process.argv[2]
const input = process.argv[3]
@@ -102,5 +107,5 @@ if (require.main === module && process.env.CI && process.env.GITHUB_OUTPUT) {
}
console.log('[i] Will publish:', res)
- fs.appendFileSync(process.env.GITHUB_OUTPUT, `modified=${res.join(',')}${require('os').EOL}`)
+ appendFileSync(process.env.GITHUB_OUTPUT, `modified=${res.join(',')}${EOL}`)
}
diff --git a/scripts/gen-deps-graph.mjs b/scripts/gen-deps-graph.js
similarity index 88%
rename from scripts/gen-deps-graph.mjs
rename to scripts/gen-deps-graph.js
index 5072beec..b6e0a57a 100644
--- a/scripts/gen-deps-graph.mjs
+++ b/scripts/gen-deps-graph.js
@@ -1,5 +1,5 @@
-// node scripts/gen-deps-graph.mjs | dot -Tsvg > deps.svg
-import { getPackageJsons } from './utils.mjs'
+// node scripts/gen-deps-graph.js | dot -Tsvg > deps.svg
+import { getPackageJsons } from './utils.js'
const packageJsons = await getPackageJsons()
diff --git a/scripts/generate-changelog.js b/scripts/generate-changelog.js
index b301fbdf..607e04e9 100644
--- a/scripts/generate-changelog.js
+++ b/scripts/generate-changelog.js
@@ -1,5 +1,9 @@
-const fs = require('fs')
-const { getLatestTag, getCommitsSince, parseConventionalCommit, findChangedFilesSince } = require('./git-utils')
+import { randomUUID } from 'crypto'
+import { appendFileSync } from 'fs'
+import { EOL } from 'os'
+import { fileURLToPath } from 'url'
+
+import { findChangedFilesSince, getCommitsSince, getLatestTag, parseConventionalCommit } from './git-utils.js'
function generateChangelog(onlyPackages) {
const byPackage = {}
@@ -52,7 +56,7 @@ function generateChangelog(onlyPackages) {
return ret
}
-if (require.main === module) {
+if (process.argv[1] === fileURLToPath(import.meta.url)) {
let onlyPackages = null
if (process.argv[2]) {
@@ -62,8 +66,8 @@ if (require.main === module) {
const res = generateChangelog(onlyPackages)
if (process.env.CI && process.env.GITHUB_OUTPUT) {
- const delim = `---${require('crypto').randomUUID()}---${require('os').EOL}`
- fs.appendFileSync(process.env.GITHUB_OUTPUT, `changelog<<${delim}${res}${delim}`)
+ const delim = `---${randomUUID()}---${EOL}`
+ appendFileSync(process.env.GITHUB_OUTPUT, `changelog<<${delim}${res}${delim}`)
} else {
console.log(res)
}
diff --git a/scripts/git-utils.js b/scripts/git-utils.js
index 2c2185ce..dac25fe5 100644
--- a/scripts/git-utils.js
+++ b/scripts/git-utils.js
@@ -1,14 +1,14 @@
-const cp = require('child_process')
+import { execSync } from 'child_process'
function getLatestTag() {
try {
- const res = cp.execSync('git describe --abbrev=0 --tags', { encoding: 'utf8', stdio: 'pipe' }).trim()
+ const res = execSync('git describe --abbrev=0 --tags', { encoding: 'utf8', stdio: 'pipe' }).trim()
return res
} catch (e) {
if (e.stderr.match(/^fatal: (No names found|No tags can describe)/i)) {
// no tags found, let's just return the first commit
- return cp.execSync('git rev-list --max-parents=0 HEAD', { encoding: 'utf8' }).trim()
+ return execSync('git rev-list --max-parents=0 HEAD', { encoding: 'utf8' }).trim()
}
throw e
@@ -16,14 +16,13 @@ function getLatestTag() {
}
function findChangedFilesSince(tag, until = 'HEAD') {
- return cp.execSync(`git diff --name-only ${tag} ${until}`, { encoding: 'utf8', stdio: 'pipe' }).trim().split('\n')
+ return execSync(`git diff --name-only ${tag} ${until}`, { encoding: 'utf8', stdio: 'pipe' }).trim().split('\n')
}
function getCommitsSince(tag, until = 'HEAD') {
const delim = `---${Math.random().toString(36).slice(2)}---`
- const lines = cp
- .execSync(`git log --pretty="format:%H %s%n%b%n${delim}" ${tag}..${until}`, { encoding: 'utf8', stdio: 'pipe' })
+ const lines = execSync(`git log --pretty="format:%H %s%n%b%n${delim}" ${tag}..${until}`, { encoding: 'utf8', stdio: 'pipe' })
.trim()
.split('\n')
@@ -50,11 +49,11 @@ function getCommitsSince(tag, until = 'HEAD') {
}
function getCurrentCommit() {
- return cp.execSync('git rev-parse HEAD', { encoding: 'utf8', stdio: 'pipe' }).trim()
+ return execSync('git rev-parse HEAD', { encoding: 'utf8', stdio: 'pipe' }).trim()
}
function getCurrentBranch() {
- return cp.execSync('git rev-parse --abbrev-ref HEAD', { encoding: 'utf8', stdio: 'pipe' }).trim()
+ return execSync('git rev-parse --abbrev-ref HEAD', { encoding: 'utf8', stdio: 'pipe' }).trim()
}
function parseConventionalCommit(msg) {
@@ -67,11 +66,11 @@ function parseConventionalCommit(msg) {
return { type, scope, breaking: Boolean(breaking), subject }
}
-module.exports = {
- getLatestTag,
+export {
findChangedFilesSince,
getCommitsSince,
- parseConventionalCommit,
- getCurrentCommit,
getCurrentBranch,
+ getCurrentCommit,
+ getLatestTag,
+ parseConventionalCommit,
}
diff --git a/scripts/publish.js b/scripts/publish.js
index ecdd7dd5..ee7696b8 100644
--- a/scripts/publish.js
+++ b/scripts/publish.js
@@ -1,12 +1,18 @@
-const fs = require('fs')
-const path = require('path')
-const cp = require('child_process')
-const stc = require('@teidesu/slow-types-compiler')
+import * as cp from 'child_process'
+import * as fs from 'fs'
+import { createRequire } from 'module'
+import * as path from 'path'
+import { fileURLToPath } from 'url'
+import * as stc from '@teidesu/slow-types-compiler'
const IS_JSR = process.env.JSR === '1'
const MAIN_REGISTRY = IS_JSR ? 'https://jsr.io/' : 'https://registry.npmjs.org'
let REGISTRY = process.env.REGISTRY || MAIN_REGISTRY
-exports.REGISTRY = REGISTRY
+const EXPORTED_REGISTRY = REGISTRY
+
+const __dirname = path.dirname(new URL(import.meta.url).pathname)
+const require = createRequire(import.meta.url)
+
if (!REGISTRY.endsWith('/')) REGISTRY += '/'
if (process.env.E2E && IS_JSR) {
@@ -148,8 +154,6 @@ function listPackages(all = false) {
return packages
}
-exports.listPackages = listPackages
-
async function main(arg = process.argv[2]) {
if (!arg) {
console.log('Usage: publish.js ')
@@ -248,11 +252,8 @@ async function main(arg = process.argv[2]) {
process.exit(0) // idk why but it sometimes hangs indefinitely
}
-exports.main = main
+export { listPackages, main, EXPORTED_REGISTRY as REGISTRY }
-if (require.main === module) {
- main().catch((e) => {
- console.error(e)
- process.exit(1)
- })
+if (process.argv[1] === fileURLToPath(import.meta.url)) {
+ await main()
}
diff --git a/scripts/remove-jsr-sourcefiles.mjs b/scripts/remove-jsr-sourcefiles.js
similarity index 100%
rename from scripts/remove-jsr-sourcefiles.mjs
rename to scripts/remove-jsr-sourcefiles.js
diff --git a/scripts/utils.mjs b/scripts/utils.js
similarity index 100%
rename from scripts/utils.mjs
rename to scripts/utils.js
diff --git a/scripts/validate-deps-versions.mjs b/scripts/validate-deps-versions.js
similarity index 97%
rename from scripts/validate-deps-versions.mjs
rename to scripts/validate-deps-versions.js
index 0a54ae30..2efcb060 100644
--- a/scripts/validate-deps-versions.mjs
+++ b/scripts/validate-deps-versions.js
@@ -1,7 +1,7 @@
import semver from 'semver'
import { fileURLToPath } from 'url'
-import { getPackageJsons } from './utils.mjs'
+import { getPackageJsons } from './utils.js'
export async function validateDepsVersions() {
const packageJsons = await getPackageJsons(true)
From a0ed9c24263d3b73ab3a6f7df79df85985330cc5 Mon Sep 17 00:00:00 2001
From: alina sireneva
Date: Tue, 13 Aug 2024 04:53:07 +0300
Subject: [PATCH 4/8] chore: migrate to antfu eslint config (+ reformat)
---
.config/eslint.ci.cjs | 30 -
.config/eslint.cjs | 295 --
.config/prettier.cjs | 4 +-
.config/tsconfig.build.json | 12 +-
.config/typedoc/config.cjs | 8 +-
.config/typedoc/plugin-external-links.cjs | 4 +-
.config/typedoc/plugin-umami.cjs | 8 +-
.../vite-utils/collect-test-entrypoints.ts | 10 +-
.config/vite-utils/fixup-cjs.ts | 2 +-
.config/vite-utils/polyfills-bun.ts | 6 +-
.config/vite-utils/polyfills-deno.ts | 11 +-
.config/vite-utils/polyfills.ts | 15 +-
.config/vite-utils/test-setup-plugin.ts | 7 +-
.config/vite-utils/test-setup.ts | 5 +-
.config/vite.browser.ts | 14 +-
.config/vite.bun.ts | 56 +-
.config/vite.deno.ts | 33 +-
.config/vite.ts | 8 +-
README.md | 4 +-
e2e/deno/README.md | 4 +-
e2e/deno/deno.json | 18 +-
e2e/deno/init-server.js | 4 +-
e2e/deno/tests/01.auth.ts | 8 +-
e2e/deno/tests/02.methods.ts | 1 -
e2e/deno/tests/03.files.ts | 5 +-
e2e/deno/tests/04.updates.ts | 7 +-
e2e/deno/tests/05.worker.ts | 13 +-
e2e/deno/tests/_worker.ts | 2 +-
e2e/deno/tests/packaging/base-client.ts | 1 -
e2e/deno/tests/packaging/tl-runtime.ts | 10 +-
e2e/deno/tests/packaging/tl-schema.ts | 3 +-
e2e/deno/tests/packaging/wasm.ts | 1 -
e2e/deno/utils.ts | 7 +-
e2e/node/.mocharc.json | 2 +-
e2e/node/README.md | 4 +-
e2e/node/cjs/package.json | 2 +-
e2e/node/cjs/tests/tl-runtime.js | 8 +-
e2e/node/cjs/tests/tl-schema.js | 3 +-
e2e/node/cjs/utils.js | 2 +-
e2e/node/config.js | 6 +-
e2e/node/esm/package.json | 2 +-
e2e/node/esm/tests/base-client.js | 1 -
e2e/node/esm/tests/tl-runtime.js | 9 +-
e2e/node/esm/tests/tl-schema.js | 3 +-
e2e/node/esm/tests/wasm.js | 1 -
e2e/node/esm/utils.js | 4 +-
e2e/node/package.json | 68 +-
e2e/node/publish-canary.js | 12 +-
e2e/node/runner.js | 11 +-
e2e/node/ts/build-esm.cjs | 7 +-
e2e/node/ts/mocha.esm.json | 2 +-
e2e/node/ts/package.json | 2 +-
e2e/node/ts/run-esm.cjs | 2 +-
e2e/node/ts/tests/01.auth.ts | 10 +-
e2e/node/ts/tests/02.methods.ts | 7 +-
e2e/node/ts/tests/03.files.ts | 10 +-
e2e/node/ts/tests/04.updates.ts | 10 +-
e2e/node/ts/tests/05.worker.ts | 23 +-
e2e/node/ts/tests/_worker.ts | 2 +-
e2e/node/ts/tests/packaging/base-client.ts | 1 -
e2e/node/ts/tests/packaging/tl-schema.ts | 3 +-
e2e/node/ts/tests/packaging/wasm.ts | 1 -
e2e/node/ts/tsconfig.json | 52 +-
e2e/node/ts/utils.ts | 10 +-
eslint.config.js | 120 +
package.json | 156 +-
packages/bun/package.json | 54 +-
packages/bun/src/client.ts | 21 +-
packages/bun/src/methods/download-file.ts | 3 +-
.../bun/src/methods/download-node-stream.ts | 4 +-
packages/bun/src/platform.ts | 2 +-
packages/bun/src/sqlite/driver.ts | 4 +-
packages/bun/src/sqlite/index.ts | 3 +-
packages/bun/src/sqlite/sqlite.test.ts | 1 -
packages/bun/src/utils/crypto.test.ts | 1 -
packages/bun/src/utils/crypto.ts | 11 +-
packages/bun/src/utils/normalize-file.ts | 16 +-
packages/bun/src/utils/tcp.ts | 15 +-
packages/bun/src/worker.ts | 16 +-
packages/bun/tsconfig.json | 34 +-
packages/convert/README.md | 2 +-
packages/convert/package.json | 36 +-
packages/convert/src/dcs.ts | 20 +-
.../src/gramjs/__fixtures__/generate.cjs | 6 +-
.../src/gramjs/__fixtures__/session.ts | 4 +-
packages/convert/src/gramjs/convert.test.ts | 33 +-
packages/convert/src/gramjs/convert.ts | 6 +-
packages/convert/src/gramjs/parse.test.ts | 17 +-
packages/convert/src/gramjs/parse.ts | 2 +-
packages/convert/src/gramjs/serialize.test.ts | 17 +-
packages/convert/src/gramjs/serialize.ts | 4 +-
.../src/mtkruto/__fixtures__/generate.js | 2 +-
.../src/mtkruto/__fixtures__/session.ts | 4 +-
packages/convert/src/mtkruto/convert.test.ts | 33 +-
packages/convert/src/mtkruto/convert.ts | 6 +-
packages/convert/src/mtkruto/parse.test.ts | 17 +-
packages/convert/src/mtkruto/parse.ts | 5 +-
.../convert/src/mtkruto/serialize.test.ts | 17 +-
packages/convert/src/mtkruto/serialize.ts | 3 +-
.../src/pyrogram/__fixtures__/session.ts | 4 +-
.../src/pyrogram/__fixtures__/session_old.ts | 4 +-
packages/convert/src/pyrogram/convert.test.ts | 33 +-
packages/convert/src/pyrogram/convert.ts | 6 +-
packages/convert/src/pyrogram/parse.test.ts | 33 +-
packages/convert/src/pyrogram/parse.ts | 2 +-
.../convert/src/pyrogram/serialize.test.ts | 33 +-
packages/convert/src/pyrogram/serialize.ts | 2 +-
.../src/telethon/__fixtures__/session.ts | 4 +-
.../src/telethon/__fixtures__/session_v6.ts | 4 +-
packages/convert/src/telethon/convert.test.ts | 33 +-
packages/convert/src/telethon/convert.ts | 6 +-
packages/convert/src/telethon/parse.test.ts | 33 +-
packages/convert/src/telethon/parse.ts | 3 +-
.../convert/src/telethon/serialize.test.ts | 33 +-
packages/convert/src/telethon/serialize.ts | 5 +-
packages/convert/src/utils/ip.ts | 4 +-
packages/convert/tsconfig.json | 22 +-
packages/core/README.md | 2 +-
packages/core/build.config.cjs | 8 +-
packages/core/package.json | 68 +-
packages/core/scripts/generate-app-config.cjs | 10 +-
packages/core/scripts/generate-client.cjs | 128 +-
packages/core/scripts/generate-updates.cjs | 26 +-
packages/core/src/highlevel/base.test.ts | 1 -
packages/core/src/highlevel/base.ts | 42 +-
packages/core/src/highlevel/client.ts | 3405 ++++++++---------
packages/core/src/highlevel/client.types.ts | 5 +-
.../highlevel/managers/app-config-manager.ts | 6 +-
packages/core/src/highlevel/methods.ts | 54 +-
packages/core/src/highlevel/methods/README.md | 2 +-
.../core/src/highlevel/methods/_imports.ts | 8 +-
packages/core/src/highlevel/methods/_init.ts | 39 +-
.../highlevel/methods/auth/check-password.ts | 5 +-
.../methods/auth/get-password-hint.ts | 4 +-
.../src/highlevel/methods/auth/log-out.ts | 2 +-
.../methods/auth/recover-password.ts | 5 +-
.../src/highlevel/methods/auth/resend-code.ts | 2 +-
.../core/src/highlevel/methods/auth/run.ts | 7 +-
.../src/highlevel/methods/auth/send-code.ts | 4 +-
.../methods/auth/send-recovery-code.ts | 4 +-
.../src/highlevel/methods/auth/sign-in-bot.ts | 5 +-
.../src/highlevel/methods/auth/sign-in-qr.ts | 15 +-
.../src/highlevel/methods/auth/sign-in.ts | 5 +-
.../src/highlevel/methods/auth/start-test.ts | 15 +-
.../core/src/highlevel/methods/auth/start.ts | 39 +-
.../core/src/highlevel/methods/auth/utils.ts | 4 +-
.../methods/bots/answer-callback-query.ts | 4 +-
.../methods/bots/answer-inline-query.ts | 26 +-
.../methods/bots/answer-pre-checkout-query.ts | 5 +-
.../methods/bots/delete-my-commands.ts | 13 +-
.../highlevel/methods/bots/get-bot-info.ts | 8 +-
.../methods/bots/get-bot-menu-button.ts | 8 +-
.../methods/bots/get-callback-answer.ts | 11 +-
.../methods/bots/get-game-high-scores.ts | 11 +-
.../highlevel/methods/bots/get-my-commands.ts | 13 +-
.../methods/bots/normalize-command-scope.ts | 4 +-
.../highlevel/methods/bots/set-bot-info.ts | 6 +-
.../methods/bots/set-bot-menu-button.ts | 6 +-
.../highlevel/methods/bots/set-game-score.ts | 9 +-
.../highlevel/methods/bots/set-my-commands.ts | 13 +-
.../methods/bots/set-my-default-rights.ts | 4 +-
.../methods/chats/add-chat-members.ts | 9 +-
.../highlevel/methods/chats/archive-chats.ts | 8 +-
.../methods/chats/ban-chat-member.ts | 9 +-
.../methods/chats/batched-queries.ts | 16 +-
.../highlevel/methods/chats/create-channel.ts | 2 +-
.../highlevel/methods/chats/create-group.ts | 9 +-
.../methods/chats/create-supergroup.ts | 2 +-
.../highlevel/methods/chats/delete-channel.ts | 4 +-
.../methods/chats/delete-chat-photo.ts | 9 +-
.../highlevel/methods/chats/delete-group.ts | 5 +-
.../highlevel/methods/chats/delete-history.ts | 4 +-
.../methods/chats/delete-user-history.ts | 6 +-
.../methods/chats/edit-admin-rights.ts | 6 +-
.../methods/chats/get-chat-event-log.ts | 11 +-
.../methods/chats/get-chat-member.ts | 17 +-
.../methods/chats/get-chat-members.ts | 16 +-
.../methods/chats/get-chat-preview.ts | 2 +-
.../src/highlevel/methods/chats/get-chat.ts | 6 +-
.../highlevel/methods/chats/get-full-chat.ts | 13 +-
.../methods/chats/get-nearby-chats.ts | 8 +-
.../methods/chats/get-similar-channels.ts | 7 +-
.../methods/chats/iter-chat-event-log.ts | 8 +-
.../methods/chats/iter-chat-members.ts | 5 +-
.../src/highlevel/methods/chats/join-chat.ts | 5 +-
.../methods/chats/kick-chat-member.ts | 5 +-
.../src/highlevel/methods/chats/leave-chat.ts | 10 +-
.../methods/chats/mark-chat-unread.ts | 4 +-
.../src/highlevel/methods/chats/open-chat.ts | 4 +-
.../methods/chats/reorder-usernames.ts | 4 +-
.../methods/chats/restrict-chat-member.ts | 7 +-
.../src/highlevel/methods/chats/save-draft.ts | 6 +-
.../highlevel/methods/chats/set-chat-color.ts | 7 +-
.../chats/set-chat-default-permissions.ts | 7 +-
.../methods/chats/set-chat-description.ts | 4 +-
.../highlevel/methods/chats/set-chat-photo.ts | 11 +-
.../highlevel/methods/chats/set-chat-title.ts | 9 +-
.../highlevel/methods/chats/set-chat-ttl.ts | 4 +-
.../methods/chats/set-chat-username.ts | 4 +-
.../highlevel/methods/chats/set-slow-mode.ts | 4 +-
.../chats/toggle-content-protection.ts | 4 +-
.../methods/chats/toggle-fragment-username.ts | 4 +-
.../methods/chats/toggle-join-requests.ts | 4 +-
.../methods/chats/toggle-join-to-send.ts | 4 +-
.../methods/chats/unarchive-chats.ts | 8 +-
.../methods/chats/unban-chat-member.ts | 9 +-
.../highlevel/methods/contacts/add-contact.ts | 5 +-
.../methods/contacts/delete-contacts.ts | 9 +-
.../methods/contacts/get-contacts.ts | 4 +-
.../methods/contacts/import-contacts.ts | 11 +-
.../methods/dialogs/create-folder.ts | 7 +-
.../methods/dialogs/delete-folder.ts | 4 +-
.../highlevel/methods/dialogs/edit-folder.ts | 7 +-
.../highlevel/methods/dialogs/find-dialogs.ts | 11 +-
.../highlevel/methods/dialogs/find-folder.ts | 5 +-
.../methods/dialogs/get-chatlist-preview.ts | 2 +-
.../highlevel/methods/dialogs/get-folders.ts | 6 +-
.../methods/dialogs/get-peer-dialogs.ts | 10 +-
.../highlevel/methods/dialogs/iter-dialogs.ts | 29 +-
.../methods/dialogs/join-chatlist.ts | 13 +-
.../methods/dialogs/set-folders-order.ts | 2 +-
.../methods/files/download-buffer.ts | 6 +-
.../highlevel/methods/files/download-file.ts | 6 +-
.../methods/files/download-iterable.ts | 18 +-
.../methods/files/download-node-stream.ts | 6 +-
.../methods/files/download-stream.ts | 8 +-
.../files/normalize-file-to-document.ts | 5 +-
.../methods/files/normalize-input-file.ts | 6 +-
.../methods/files/normalize-input-media.ts | 48 +-
.../highlevel/methods/files/upload-file.ts | 20 +-
.../highlevel/methods/files/upload-media.ts | 12 +-
.../methods/forums/create-forum-topic.ts | 6 +-
.../forums/delete-forum-topic-history.ts | 2 +-
.../methods/forums/edit-forum-topic.ts | 5 +-
.../methods/forums/get-forum-topics-by-id.ts | 7 +-
.../methods/forums/get-forum-topics.ts | 13 +-
.../methods/forums/iter-forum-topics.ts | 5 +-
.../forums/reorder-pinned-forum-topics.ts | 4 +-
.../forums/toggle-forum-topic-closed.ts | 2 +-
.../forums/toggle-forum-topic-pinned.ts | 4 +-
.../highlevel/methods/forums/toggle-forum.ts | 4 +-
.../forums/toggle-general-topic-hidden.ts | 4 +-
.../invite-links/create-invite-link.ts | 5 +-
.../methods/invite-links/edit-invite-link.ts | 5 +-
.../invite-links/export-invite-link.ts | 5 +-
.../invite-links/get-invite-link-members.ts | 19 +-
.../methods/invite-links/get-invite-link.ts | 5 +-
.../methods/invite-links/get-invite-links.ts | 15 +-
.../invite-links/get-primary-invite-link.ts | 5 +-
.../invite-links/hide-all-join-requests.ts | 2 +-
.../methods/invite-links/hide-join-request.ts | 4 +-
.../invite-links/iter-invite-link-members.ts | 5 +-
.../methods/invite-links/iter-invite-links.ts | 5 +-
.../invite-links/revoke-invite-link.ts | 5 +-
.../methods/messages/_business-connection.ts | 12 +-
.../highlevel/methods/messages/close-poll.ts | 5 +-
.../methods/messages/delete-messages.ts | 7 +-
.../messages/delete-scheduled-messages.ts | 4 +-
.../methods/messages/edit-inline-message.ts | 9 +-
.../methods/messages/edit-message.ts | 17 +-
.../methods/messages/find-in-update.ts | 23 +-
.../methods/messages/forward-messages.ts | 8 +-
.../messages/get-all-scheduled-messages.ts | 5 +-
.../methods/messages/get-available-effects.ts | 6 +-
.../messages/get-callback-query-message.ts | 29 +-
.../messages/get-discussion-message.ts | 12 +-
.../methods/messages/get-fact-check.ts | 6 +-
.../highlevel/methods/messages/get-history.ts | 18 +-
.../methods/messages/get-message-by-link.ts | 5 +-
.../methods/messages/get-message-group.ts | 10 +-
.../methods/messages/get-message-reactions.ts | 9 +-
.../methods/messages/get-messages-unsafe.ts | 10 +-
.../methods/messages/get-messages.ts | 23 +-
.../methods/messages/get-reaction-users.ts | 12 +-
.../methods/messages/get-reply-to.ts | 5 +-
.../messages/get-scheduled-messages.ts | 7 +-
.../methods/messages/iter-history.ts | 5 +-
.../methods/messages/iter-reaction-users.ts | 6 +-
.../methods/messages/iter-search-global.ts | 6 +-
.../methods/messages/iter-search-messages.ts | 6 +-
.../highlevel/methods/messages/pin-message.ts | 6 +-
.../methods/messages/read-history.ts | 4 +-
.../methods/messages/read-reactions.ts | 4 +-
.../methods/messages/search-global.ts | 17 +-
.../methods/messages/search-hashtag.ts | 16 +-
.../methods/messages/search-messages.ts | 10 +-
.../highlevel/methods/messages/send-answer.ts | 7 +-
.../methods/messages/send-comment.ts | 7 +-
.../highlevel/methods/messages/send-common.ts | 18 +-
.../methods/messages/send-copy-group.ts | 29 +-
.../highlevel/methods/messages/send-copy.ts | 24 +-
.../methods/messages/send-media-group.ts | 16 +-
.../highlevel/methods/messages/send-media.ts | 18 +-
.../highlevel/methods/messages/send-quote.ts | 11 +-
.../methods/messages/send-reaction.ts | 9 +-
.../highlevel/methods/messages/send-reply.ts | 7 +-
.../methods/messages/send-scheduled.ts | 11 +-
.../methods/messages/send-text.test.ts | 17 +-
.../highlevel/methods/messages/send-text.ts | 17 +-
.../highlevel/methods/messages/send-typing.ts | 7 +-
.../highlevel/methods/messages/send-vote.ts | 12 +-
.../methods/messages/translate-message.ts | 5 +-
.../methods/messages/translate-text.ts | 4 +-
.../methods/messages/unpin-all-messages.ts | 4 +-
.../methods/messages/unpin-message.ts | 5 +-
.../src/highlevel/methods/misc/chain-id.ts | 4 +-
.../methods/misc/get-collectible-info.ts | 10 +-
.../methods/misc/init-takeout-session.ts | 4 +-
.../methods/misc/normalize-privacy-rules.ts | 6 +-
.../highlevel/methods/misc/normalize-text.ts | 6 +-
.../src/highlevel/methods/misc/with-params.ts | 6 +-
.../methods/password/change-cloud-password.ts | 2 +-
.../methods/password/enable-cloud-password.ts | 2 +-
.../methods/password/password-email.ts | 2 +-
.../methods/password/remove-cloud-password.ts | 2 +-
.../highlevel/methods/premium/apply-boost.ts | 4 +-
.../methods/premium/can-apply-boost.ts | 19 +-
.../premium/create-business-chat-link.ts | 4 +-
.../premium/edit-business-chat-link.ts | 4 +-
.../methods/premium/get-boost-stats.ts | 4 +-
.../highlevel/methods/premium/get-boosts.ts | 7 +-
.../premium/get-business-chat-links.ts | 4 +-
.../premium/get-business-connection.ts | 2 +-
.../methods/premium/get-my-boost-slots.ts | 4 +-
.../methods/premium/iter-boosters.ts | 7 +-
.../methods/premium/set-business-intro.ts | 13 +-
.../premium/set-business-work-hours.ts | 37 +-
.../src/highlevel/methods/stickers/_utils.ts | 15 +-
.../methods/stickers/add-sticker-to-set.ts | 12 +-
.../methods/stickers/create-sticker-set.ts | 11 +-
.../stickers/delete-sticker-from-set.ts | 4 +-
.../methods/stickers/get-custom-emojis.ts | 8 +-
.../stickers/get-installed-stickers.ts | 4 +-
.../methods/stickers/get-my-sticker-sets.ts | 6 +-
.../methods/stickers/get-sticker-set.ts | 5 +-
.../methods/stickers/move-sticker-in-set.ts | 4 +-
.../stickers/replace-sticker-in-set.ts | 8 +-
.../methods/stickers/set-chat-sticker-set.ts | 5 +-
.../methods/stickers/set-sticker-set-thumb.ts | 7 +-
.../methods/stories/can-send-story.ts | 4 +-
.../methods/stories/delete-stories.ts | 6 +-
.../highlevel/methods/stories/edit-story.ts | 11 +-
.../methods/stories/find-in-update.ts | 4 +-
.../methods/stories/get-all-stories.ts | 2 +-
.../methods/stories/get-peer-stories.ts | 5 +-
.../methods/stories/get-profile-stories.ts | 5 +-
.../methods/stories/get-stories-by-id.ts | 7 +-
.../stories/get-stories-interactions.ts | 9 +-
.../methods/stories/get-story-link.ts | 6 +-
.../methods/stories/get-story-viewers.ts | 5 +-
.../methods/stories/hide-my-stories-views.ts | 2 +-
.../stories/increment-stories-views.ts | 6 +-
.../methods/stories/iter-all-stories.ts | 5 +-
.../methods/stories/iter-profile-stories.ts | 5 +-
.../methods/stories/iter-story-viewers.ts | 5 +-
.../highlevel/methods/stories/read-stories.ts | 4 +-
.../highlevel/methods/stories/report-story.ts | 8 +-
.../methods/stories/send-story-reaction.ts | 5 +-
.../highlevel/methods/stories/send-story.ts | 13 +-
.../stories/toggle-peer-stories-archived.ts | 4 +-
.../methods/stories/toggle-stories-pinned.ts | 8 +-
.../src/highlevel/methods/users/block-user.ts | 5 +-
.../methods/users/delete-profile-photos.ts | 6 +-
.../methods/users/edit-close-friends.ts | 7 +-
.../methods/users/get-common-chats.ts | 8 +-
.../highlevel/methods/users/get-global-ttl.ts | 4 +-
.../src/highlevel/methods/users/get-me.ts | 2 +-
.../methods/users/get-my-username.ts | 4 +-
.../methods/users/get-profile-photo.ts | 8 +-
.../methods/users/get-profile-photos.ts | 9 +-
.../highlevel/methods/users/get-users.test.ts | 7 +-
.../src/highlevel/methods/users/get-users.ts | 12 +-
.../methods/users/iter-profile-photos.ts | 5 +-
.../methods/users/resolve-peer-many.ts | 16 +-
.../methods/users/resolve-peer.test.ts | 4 +-
.../highlevel/methods/users/resolve-peer.ts | 17 +-
.../highlevel/methods/users/set-global-ttl.ts | 2 +-
.../methods/users/set-my-birthday.ts | 10 +-
.../methods/users/set-my-emoji-status.ts | 4 +-
.../methods/users/set-my-profile-photo.ts | 5 +-
.../methods/users/set-my-username.ts | 2 +-
.../highlevel/methods/users/set-offline.ts | 2 +-
.../highlevel/methods/users/unblock-user.ts | 5 +-
.../highlevel/methods/users/update-profile.ts | 2 +-
.../core/src/highlevel/storage/provider.ts | 7 +-
.../src/highlevel/storage/repository/peers.ts | 16 +-
.../storage/repository/ref-messages.ts | 12 +-
.../highlevel/storage/service/current-user.ts | 9 +-
.../src/highlevel/storage/service/peers.ts | 11 +-
.../highlevel/storage/service/ref-messages.ts | 5 +-
.../src/highlevel/storage/service/updates.ts | 5 +-
.../core/src/highlevel/storage/storage.ts | 15 +-
.../src/highlevel/types/auth/sent-code.ts | 26 +-
.../types/bots/command-scope/inner.ts | 22 +-
.../highlevel/types/bots/game-high-score.ts | 4 +-
.../types/bots/inline-message/factories.ts | 11 +-
.../types/bots/inline-message/index.ts | 4 +-
.../types/bots/inline-message/types.ts | 22 +-
.../types/bots/inline-result/factories.ts | 45 +-
.../types/bots/inline-result/types.ts | 28 +-
.../types/bots/keyboards/builder.test.ts | 4 +-
.../highlevel/types/bots/keyboards/builder.ts | 6 +-
.../types/bots/keyboards/factories.ts | 15 +-
.../highlevel/types/bots/keyboards/index.ts | 3 +-
.../types/bots/keyboards/keyboards.test.ts | 5 +-
.../highlevel/types/bots/keyboards/types.ts | 12 +-
.../highlevel/types/calls/discard-reason.ts | 2 +-
.../core/src/highlevel/types/conversation.ts | 39 +-
packages/core/src/highlevel/types/errors.ts | 5 +-
.../highlevel/types/files/file-location.ts | 10 +-
.../highlevel/types/files/uploaded-file.ts | 2 +-
.../core/src/highlevel/types/files/utils.ts | 41 +-
.../src/highlevel/types/files/web-document.ts | 13 +-
.../core/src/highlevel/types/media/audio.ts | 3 +-
.../core/src/highlevel/types/media/contact.ts | 2 +-
.../core/src/highlevel/types/media/dice.ts | 2 +-
.../highlevel/types/media/document-utils.ts | 10 +-
.../src/highlevel/types/media/document.ts | 11 +-
.../highlevel/types/media/extended-media.ts | 3 +-
.../core/src/highlevel/types/media/game.ts | 7 +-
.../types/media/input-media/factories.ts | 7 +-
.../types/media/input-media/index.ts | 1 +
.../types/media/input-media/types.ts | 52 +-
.../core/src/highlevel/types/media/invoice.ts | 3 +-
.../src/highlevel/types/media/location.ts | 2 +-
.../src/highlevel/types/media/paid-media.ts | 7 +-
.../core/src/highlevel/types/media/photo.ts | 17 +-
.../core/src/highlevel/types/media/poll.ts | 14 +-
.../core/src/highlevel/types/media/sticker.ts | 5 +-
.../core/src/highlevel/types/media/story.ts | 7 +-
.../src/highlevel/types/media/thumbnail.ts | 21 +-
.../core/src/highlevel/types/media/venue.ts | 3 +-
.../core/src/highlevel/types/media/video.ts | 7 +-
.../core/src/highlevel/types/media/voice.ts | 3 +-
.../src/highlevel/types/media/web-page.ts | 5 +-
.../src/highlevel/types/messages/dialog.ts | 9 +-
.../highlevel/types/messages/draft-message.ts | 3 +-
.../highlevel/types/messages/fact-check.ts | 3 +-
.../types/messages/input-message-id.ts | 3 +-
.../types/messages/message-action.ts | 109 +-
.../types/messages/message-effect.ts | 6 +-
.../types/messages/message-entity.ts | 50 +-
.../types/messages/message-forward.ts | 8 +-
.../highlevel/types/messages/message-media.ts | 54 +-
.../types/messages/message-reactions.ts | 8 +-
.../types/messages/message-replies.ts | 9 +-
.../src/highlevel/types/messages/message.ts | 27 +-
.../types/messages/replied-message.ts | 12 +-
.../src/highlevel/types/misc/app-config.ts | 1 -
.../highlevel/types/misc/collectible-info.ts | 5 +-
.../core/src/highlevel/types/misc/entities.ts | 2 +-
.../types/misc/input-privacy-rule/allow.ts | 9 +-
.../types/misc/input-privacy-rule/disallow.ts | 9 +-
.../types/misc/input-privacy-rule/types.ts | 4 +-
.../src/highlevel/types/misc/sticker-set.ts | 43 +-
.../highlevel/types/misc/takeout-session.ts | 21 +-
.../src/highlevel/types/peers/chat-colors.ts | 2 +-
.../types/peers/chat-event/actions.ts | 78 +-
.../types/peers/chat-event/filters.ts | 16 +-
.../highlevel/types/peers/chat-event/index.ts | 8 +-
.../types/peers/chat-invite-link-member.ts | 5 +-
.../highlevel/types/peers/chat-invite-link.ts | 6 +-
.../highlevel/types/peers/chat-location.ts | 2 +-
.../src/highlevel/types/peers/chat-member.ts | 6 +-
.../highlevel/types/peers/chat-permissions.ts | 2 +-
.../src/highlevel/types/peers/chat-photo.ts | 9 +-
.../src/highlevel/types/peers/chat-preview.ts | 5 +-
.../core/src/highlevel/types/peers/chat.ts | 17 +-
.../highlevel/types/peers/chatlist-preview.ts | 5 +-
.../src/highlevel/types/peers/forum-topic.ts | 20 +-
.../src/highlevel/types/peers/full-chat.ts | 5 +-
.../core/src/highlevel/types/peers/peer.ts | 18 +-
.../highlevel/types/peers/peers-index.test.ts | 2 +-
.../src/highlevel/types/peers/peers-index.ts | 4 +-
.../highlevel/types/peers/typing-status.ts | 36 +-
.../src/highlevel/types/peers/user.test.ts | 2 +-
.../core/src/highlevel/types/peers/user.ts | 5 +-
.../src/highlevel/types/premium/boost-slot.ts | 5 +-
.../highlevel/types/premium/boost-stats.ts | 2 +-
.../core/src/highlevel/types/premium/boost.ts | 5 +-
.../types/premium/business-account.ts | 3 +-
.../types/premium/business-chat-link.ts | 4 +-
.../types/premium/business-connection.ts | 4 +-
.../highlevel/types/premium/business-intro.ts | 4 +-
.../types/premium/business-location.ts | 2 +-
.../types/premium/business-work-hours.test.ts | 1 -
.../types/premium/business-work-hours.ts | 10 +-
.../highlevel/types/reactions/emoji-status.ts | 2 +-
.../types/reactions/peer-reaction.ts | 8 +-
.../types/reactions/reaction-count.ts | 6 +-
.../src/highlevel/types/reactions/types.ts | 3 +-
.../highlevel/types/stories/all-stories.ts | 5 +-
.../types/stories/interactive/base.ts | 2 +-
.../types/stories/interactive/channel-post.ts | 5 +-
.../types/stories/interactive/index.ts | 17 +-
.../types/stories/interactive/input.ts | 10 +-
.../types/stories/interactive/location.ts | 3 +-
.../types/stories/interactive/reaction.ts | 6 +-
.../types/stories/interactive/url.ts | 2 +-
.../types/stories/interactive/venue.ts | 5 +-
.../types/stories/interactive/weather.ts | 3 +-
.../highlevel/types/stories/peer-stories.ts | 6 +-
.../highlevel/types/stories/stealth-mode.ts | 2 +-
.../types/stories/story-interactions.ts | 8 +-
.../highlevel/types/stories/story-viewer.ts | 9 +-
.../core/src/highlevel/types/stories/story.ts | 15 +-
.../types/updates/bot-chat-join-request.ts | 5 +-
.../highlevel/types/updates/bot-reaction.ts | 16 +-
.../highlevel/types/updates/bot-stopped.ts | 5 +-
.../types/updates/business-message.ts | 4 +-
.../highlevel/types/updates/callback-query.ts | 10 +-
.../types/updates/chat-join-request.ts | 7 +-
.../types/updates/chat-member-update.ts | 32 +-
.../types/updates/chosen-inline-result.ts | 5 +-
.../updates/delete-business-message-update.ts | 4 +-
.../types/updates/delete-message-update.ts | 2 +-
.../types/updates/delete-story-update.ts | 5 +-
.../types/updates/history-read-update.ts | 14 +-
.../core/src/highlevel/types/updates/index.ts | 60 +-
.../highlevel/types/updates/inline-query.ts | 5 +-
.../highlevel/types/updates/parse-update.ts | 9 +-
.../highlevel/types/updates/poll-update.ts | 6 +-
.../src/highlevel/types/updates/poll-vote.ts | 5 +-
.../types/updates/pre-checkout-query.ts | 5 +-
.../highlevel/types/updates/story-update.ts | 5 +-
.../types/updates/user-status-update.ts | 5 +-
.../types/updates/user-typing-update.ts | 6 +-
packages/core/src/highlevel/types/utils.ts | 5 +-
.../core/src/highlevel/updates/manager.ts | 71 +-
packages/core/src/highlevel/updates/parsed.ts | 7 +-
packages/core/src/highlevel/updates/types.ts | 8 +-
packages/core/src/highlevel/updates/utils.ts | 17 +-
.../src/highlevel/utils/convert-file-id.ts | 21 +-
.../core/src/highlevel/utils/entities.test.ts | 5 +-
packages/core/src/highlevel/utils/entities.ts | 4 +-
.../src/highlevel/utils/file-type.test.ts | 3 +-
.../core/src/highlevel/utils/file-type.ts | 50 +-
.../src/highlevel/utils/file-utils.test.ts | 163 +-
.../core/src/highlevel/utils/file-utils.ts | 71 +-
.../src/highlevel/utils/inline-utils.test.ts | 3 +-
.../core/src/highlevel/utils/inline-utils.ts | 2 +-
.../src/highlevel/utils/inspectable.test.ts | 4 +
.../core/src/highlevel/utils/inspectable.ts | 18 +-
packages/core/src/highlevel/utils/memoize.ts | 3 +-
.../core/src/highlevel/utils/misc-utils.ts | 3 +-
.../src/highlevel/utils/peer-utils.test.ts | 2 +-
.../core/src/highlevel/utils/peer-utils.ts | 8 +-
.../src/highlevel/utils/query-batcher.test.ts | 52 +-
.../core/src/highlevel/utils/query-batcher.ts | 4 +-
.../src/highlevel/utils/stream-utils.test.ts | 32 +-
.../core/src/highlevel/utils/stream-utils.ts | 2 +-
.../highlevel/utils/string-session.test.ts | 3 +-
.../src/highlevel/utils/string-session.ts | 7 +-
.../src/highlevel/utils/voice-utils.test.ts | 217 +-
.../core/src/highlevel/worker/app-config.ts | 7 +-
packages/core/src/highlevel/worker/errors.ts | 28 +-
packages/core/src/highlevel/worker/invoker.ts | 9 +-
packages/core/src/highlevel/worker/port.ts | 15 +-
.../core/src/highlevel/worker/protocol.ts | 94 +-
packages/core/src/highlevel/worker/storage.ts | 9 +-
packages/core/src/highlevel/worker/worker.ts | 22 +-
packages/core/src/index.ts | 3 +-
packages/core/src/network/auth-key.test.ts | 61 +-
packages/core/src/network/auth-key.ts | 11 +-
packages/core/src/network/authorization.ts | 34 +-
packages/core/src/network/client.ts | 42 +-
.../core/src/network/config-manager.test.ts | 3 +-
packages/core/src/network/config-manager.ts | 10 +-
.../core/src/network/middlewares/default.ts | 11 +-
.../src/network/middlewares/flood-waiter.ts | 10 +-
.../network/middlewares/internal-errors.ts | 4 +-
.../core/src/network/middlewares/on-error.ts | 6 +-
.../core/src/network/middlewares/on-method.ts | 12 +-
packages/core/src/network/mtproto-session.ts | 121 +-
.../src/network/multi-session-connection.ts | 27 +-
packages/core/src/network/network-manager.ts | 36 +-
.../src/network/persistent-connection.test.ts | 8 +-
.../core/src/network/persistent-connection.ts | 10 +-
packages/core/src/network/server-salt.ts | 3 +-
.../core/src/network/session-connection.ts | 81 +-
.../core/src/network/transports/abstract.ts | 9 +-
.../network/transports/intermediate.test.ts | 1 -
.../src/network/transports/intermediate.ts | 11 +-
.../src/network/transports/obfuscated.test.ts | 13 +-
.../core/src/network/transports/obfuscated.ts | 21 +-
.../core/src/network/transports/streamed.ts | 2 +-
.../core/src/network/transports/wrapped.ts | 11 +-
packages/core/src/platform.ts | 22 +-
packages/core/src/storage/driver.ts | 12 +-
packages/core/src/storage/memory/driver.ts | 2 +-
packages/core/src/storage/memory/index.ts | 5 +-
.../core/src/storage/memory/memory.test.ts | 1 -
.../storage/memory/repository/auth-keys.ts | 4 +-
.../core/src/storage/memory/repository/kv.ts | 4 +-
.../src/storage/memory/repository/peers.ts | 4 +-
.../storage/memory/repository/ref-messages.ts | 4 +-
packages/core/src/storage/provider.ts | 6 +-
.../core/src/storage/repository/auth-keys.ts | 14 +-
.../core/src/storage/repository/key-value.ts | 10 +-
.../src/storage/service/auth-keys.test.ts | 1 -
.../core/src/storage/service/auth-keys.ts | 8 +-
packages/core/src/storage/service/base.ts | 11 +-
.../core/src/storage/service/default-dcs.ts | 17 +-
.../core/src/storage/service/future-salts.ts | 8 +-
.../core/src/storage/service/updates.test.ts | 2 +-
.../src/storage/service/utils.test-utils.ts | 3 +-
packages/core/src/storage/sqlite/driver.ts | 5 +-
packages/core/src/storage/sqlite/index.ts | 5 +-
.../storage/sqlite/repository/auth-keys.ts | 6 +-
.../core/src/storage/sqlite/repository/kv.ts | 21 +-
.../src/storage/sqlite/repository/peers.ts | 6 +-
.../storage/sqlite/repository/ref-messages.ts | 6 +-
packages/core/src/storage/sqlite/types.ts | 15 +-
packages/core/src/storage/storage.ts | 12 +-
packages/core/src/types/utils.ts | 4 +-
packages/core/src/utils/async-lock.test.ts | 3 +-
packages/core/src/utils/async-lock.ts | 3 +-
packages/core/src/utils/bigint-utils.test.ts | 30 +-
packages/core/src/utils/bigint-utils.ts | 6 +-
packages/core/src/utils/binary/asn1-parser.ts | 32 +-
packages/core/src/utils/buffer-utils.test.ts | 26 +-
packages/core/src/utils/composer.test.ts | 7 +-
packages/core/src/utils/composer.ts | 1 +
.../core/src/utils/controllable-promise.ts | 4 +-
packages/core/src/utils/crypto/abstract.ts | 37 +-
.../src/utils/crypto/factorization.test.ts | 2 +-
.../core/src/utils/crypto/factorization.ts | 3 +-
packages/core/src/utils/crypto/keys.test.ts | 1 -
packages/core/src/utils/crypto/keys.ts | 9 +-
.../src/utils/crypto/miller-rabin.test.ts | 9 +-
.../core/src/utils/crypto/miller-rabin.ts | 3 +-
.../core/src/utils/crypto/mtproto.test.ts | 2 +-
packages/core/src/utils/crypto/mtproto.ts | 3 +-
.../core/src/utils/crypto/password.test.ts | 84 +-
packages/core/src/utils/crypto/password.ts | 9 +-
packages/core/src/utils/crypto/utils.test.ts | 1 +
packages/core/src/utils/deque.test.ts | 2 +-
packages/core/src/utils/error-reporting.ts | 6 +-
packages/core/src/utils/function-utils.ts | 3 +-
packages/core/src/utils/links/bots.test.ts | 3 +-
packages/core/src/utils/links/bots.ts | 7 +-
packages/core/src/utils/links/chat.test.ts | 3 +-
packages/core/src/utils/links/chat.ts | 165 +-
packages/core/src/utils/links/common.ts | 2 +-
packages/core/src/utils/links/index.ts | 1 +
packages/core/src/utils/links/misc.test.ts | 3 +-
packages/core/src/utils/links/misc.ts | 6 +-
packages/core/src/utils/links/proxy.test.ts | 3 +-
packages/core/src/utils/links/proxy.ts | 16 +-
packages/core/src/utils/links/user.test.ts | 3 +-
packages/core/src/utils/logger.test.ts | 3 +-
packages/core/src/utils/logger.ts | 31 +-
packages/core/src/utils/long-utils.test.ts | 4 +-
packages/core/src/utils/long-utils.ts | 12 +-
packages/core/src/utils/lru-map.test.ts | 39 -
packages/core/src/utils/lru-map.ts | 4 +-
packages/core/src/utils/lru-set.test.ts | 36 +-
packages/core/src/utils/lru-set.ts | 10 +-
packages/core/src/utils/misc-utils.ts | 3 +-
packages/core/src/utils/peer-utils.test.ts | 5 +-
packages/core/src/utils/peer-utils.ts | 8 +-
packages/core/src/utils/reloadable.ts | 2 +-
packages/core/src/utils/tl-json.ts | 2 +-
.../core/src/utils/type-assertions.test.ts | 4 +-
packages/core/src/utils/type-assertions.ts | 4 +-
packages/core/tsconfig.json | 26 +-
packages/create-bot/package.json | 56 +-
.../create-bot/scripts/generate-import-map.js | 2 +-
packages/create-bot/src/cli.ts | 11 +-
packages/create-bot/src/dependencies.ts | 4 +-
packages/create-bot/src/features/cli.ts | 3 +-
packages/create-bot/src/main.ts | 7 +-
packages/create-bot/src/package-manager.ts | 5 +-
packages/create-bot/src/templater.ts | 14 +-
packages/create-bot/src/utils.ts | 2 +-
packages/create-bot/tsconfig.json | 14 +-
packages/crypto-node/README.md | 2 +-
packages/crypto-node/build.config.cjs | 42 +-
packages/crypto-node/package.json | 56 +-
packages/crypto-node/src/index.ts | 4 +-
packages/crypto-node/src/native.cjs | 1 +
packages/crypto-node/src/native.d.cts | 4 +-
.../tests/node-native-crypto.test.ts | 1 -
packages/crypto-node/tests/tsconfig.json | 14 +-
packages/crypto-node/tsconfig.json | 22 +-
packages/deno/package.json | 58 +-
packages/deno/src/client.ts | 21 +-
packages/deno/src/methods/download-file.ts | 4 +-
packages/deno/src/platform.ts | 6 +-
packages/deno/src/sqlite/driver.ts | 11 +-
packages/deno/src/sqlite/index.ts | 3 +-
packages/deno/src/sqlite/sqlite.test.ts | 1 -
packages/deno/src/utils/crypto.test.ts | 1 -
packages/deno/src/utils/crypto.ts | 12 +-
packages/deno/src/utils/normalize-file.ts | 4 +-
packages/deno/src/utils/tcp.ts | 12 +-
packages/deno/src/worker.ts | 10 +-
packages/deno/tsconfig.json | 28 +-
packages/dispatcher/README.md | 4 +-
packages/dispatcher/package.json | 40 +-
packages/dispatcher/scripts/generate.cjs | 26 +-
.../src/callback-data-builder.test.ts | 3 +-
.../dispatcher/src/callback-data-builder.ts | 41 +-
packages/dispatcher/src/context/base.ts | 4 +-
.../src/context/business-message.ts | 15 +-
.../dispatcher/src/context/callback-query.ts | 7 +-
.../src/context/chat-join-request.ts | 4 +-
.../src/context/chosen-inline-result.ts | 4 +-
.../dispatcher/src/context/inline-query.ts | 7 +-
packages/dispatcher/src/context/message.ts | 15 +-
packages/dispatcher/src/context/parse.ts | 6 +-
.../src/context/pre-checkout-query.ts | 4 +-
.../src/context/scene-transition.ts | 2 +-
packages/dispatcher/src/dispatcher.ts | 96 +-
packages/dispatcher/src/filters/bots.test.ts | 20 +-
packages/dispatcher/src/filters/bots.ts | 96 +-
packages/dispatcher/src/filters/chat.ts | 75 +-
packages/dispatcher/src/filters/group.ts | 12 +-
packages/dispatcher/src/filters/index.ts | 2 +
packages/dispatcher/src/filters/logic.ts | 9 +-
packages/dispatcher/src/filters/message.ts | 163 +-
packages/dispatcher/src/filters/state.ts | 11 +-
packages/dispatcher/src/filters/text.ts | 57 +-
packages/dispatcher/src/filters/types.ts | 10 +-
packages/dispatcher/src/filters/updates.ts | 18 +-
packages/dispatcher/src/filters/user.ts | 95 +-
packages/dispatcher/src/handler.ts | 70 +-
packages/dispatcher/src/state/key.ts | 7 +-
packages/dispatcher/src/state/provider.ts | 4 +-
.../dispatcher/src/state/providers/memory.ts | 7 +-
.../dispatcher/src/state/providers/sqlite.ts | 6 +-
packages/dispatcher/src/state/repository.ts | 14 +-
packages/dispatcher/src/state/service.ts | 5 +-
packages/dispatcher/src/state/update-state.ts | 12 +-
packages/dispatcher/src/wizard.ts | 11 +-
packages/dispatcher/tests/dispatcher.test.ts | 55 +-
packages/dispatcher/tests/tsconfig.json | 14 +-
packages/dispatcher/tsconfig.json | 22 +-
packages/file-id/package.json | 42 +-
packages/file-id/src/parse.test.ts | 1 -
packages/file-id/src/parse.ts | 11 +-
packages/file-id/src/serialize-unique.test.ts | 1 -
packages/file-id/src/serialize-unique.ts | 9 +-
packages/file-id/src/serialize.ts | 3 +-
packages/file-id/src/types-inner.ts | 22 +-
packages/file-id/src/types.ts | 1 +
packages/file-id/src/utils.test.ts | 1 -
packages/file-id/tsconfig.json | 22 +-
packages/html-parser/README.md | 6 +-
packages/html-parser/package.json | 34 +-
packages/html-parser/src/html-parser.test.ts | 42 +-
packages/html-parser/src/index.ts | 25 +-
packages/html-parser/tests/tsconfig.json | 14 +-
packages/html-parser/tsconfig.json | 22 +-
packages/http-proxy/index.ts | 26 +-
packages/http-proxy/package.json | 32 +-
packages/http-proxy/tsconfig.json | 22 +-
packages/i18n/package.json | 42 +-
packages/i18n/src/index.ts | 2 +-
packages/i18n/src/plurals/english.ts | 6 +-
packages/i18n/src/plurals/russian.ts | 2 +-
packages/i18n/src/types.ts | 20 +-
packages/i18n/src/utils.ts | 11 +-
packages/i18n/tests/i18n.test.ts | 12 +-
packages/i18n/tests/tsconfig.json | 14 +-
packages/i18n/tsconfig.json | 22 +-
packages/markdown-parser/README.md | 6 +-
packages/markdown-parser/package.json | 32 +-
packages/markdown-parser/src/index.ts | 14 +-
.../src/markdown-parser.test.ts | 11 +-
packages/markdown-parser/tsconfig.json | 22 +-
packages/mtproxy/fake-tls.ts | 30 +-
packages/mtproxy/index.ts | 24 +-
packages/mtproxy/package.json | 32 +-
packages/mtproxy/tsconfig.json | 24 +-
packages/node/package.json | 56 +-
packages/node/src/client.ts | 33 +-
.../src/common-internals-node/exit-hook.ts | 2 +-
.../node/src/common-internals-node/logging.ts | 30 +-
.../src/common-internals-node/platform.ts | 13 +-
.../node/src/common-internals-node/readme.md | 2 +-
packages/node/src/methods/download-file.ts | 7 +-
.../node/src/methods/download-node-stream.ts | 4 +-
packages/node/src/sqlite/driver.ts | 7 +-
packages/node/src/sqlite/index.ts | 3 +-
packages/node/src/sqlite/sqlite.test.ts | 1 -
packages/node/src/utils/crypto.test.ts | 1 -
packages/node/src/utils/crypto.ts | 16 +-
packages/node/src/utils/normalize-file.ts | 12 +-
packages/node/src/utils/stream-utils.test.ts | 6 +-
packages/node/src/utils/stream-utils.ts | 6 +-
packages/node/src/utils/tcp.test.ts | 13 +-
packages/node/src/utils/tcp.ts | 18 +-
packages/node/src/utils/version.ts | 2 +-
packages/node/src/worker.ts | 16 +-
packages/node/tsconfig.json | 28 +-
packages/socks-proxy/index.ts | 67 +-
packages/socks-proxy/package.json | 34 +-
packages/socks-proxy/tsconfig.json | 6 +-
packages/test/package.json | 70 +-
packages/test/src/client.test.ts | 1 -
packages/test/src/client.ts | 17 +-
packages/test/src/crypto.ts | 10 +-
packages/test/src/platform.test.ts | 1 -
packages/test/src/schema.ts | 3 +-
packages/test/src/storage.ts | 3 +-
packages/test/src/storage/auth-keys.ts | 3 +-
packages/test/src/storage/key-value.ts | 3 +-
packages/test/src/storage/peers.ts | 9 +-
packages/test/src/storage/ref-messages.ts | 3 +-
packages/test/src/stub.ts | 8 +-
packages/test/src/transport.test.ts | 1 -
packages/test/src/transport.ts | 12 +-
packages/test/src/types.ts | 8 +-
packages/test/src/utils.ts | 3 +-
packages/test/tests/tsconfig.json | 14 +-
packages/test/tsconfig.json | 22 +-
packages/tl-runtime/README.md | 2 +-
packages/tl-runtime/package.json | 36 +-
packages/tl-runtime/src/platform.ts | 14 +-
packages/tl-runtime/src/reader.test.ts | 114 +-
packages/tl-runtime/src/reader.ts | 24 +-
packages/tl-runtime/src/writer.test.ts | 113 +-
packages/tl-runtime/src/writer.ts | 27 +-
packages/tl-runtime/tsconfig.json | 16 +-
packages/tl-utils/package.json | 40 +-
packages/tl-utils/src/calculator.test.ts | 34 +-
packages/tl-utils/src/calculator.ts | 22 +-
packages/tl-utils/src/codegen/errors.test.ts | 2 +-
packages/tl-utils/src/codegen/errors.ts | 11 +-
packages/tl-utils/src/codegen/reader.test.ts | 1 +
packages/tl-utils/src/codegen/reader.ts | 18 +-
packages/tl-utils/src/codegen/types.test.ts | 3 +-
packages/tl-utils/src/codegen/types.ts | 47 +-
packages/tl-utils/src/codegen/utils.ts | 16 +-
packages/tl-utils/src/codegen/writer.test.ts | 11 +-
packages/tl-utils/src/codegen/writer.ts | 36 +-
packages/tl-utils/src/ctor-id.test.ts | 23 +-
packages/tl-utils/src/ctor-id.ts | 2 +-
packages/tl-utils/src/diff.test.ts | 6 +-
packages/tl-utils/src/diff.ts | 8 +-
packages/tl-utils/src/json/from-json.test.ts | 3 +-
packages/tl-utils/src/json/from-json.ts | 7 +-
packages/tl-utils/src/json/types.ts | 7 +-
packages/tl-utils/src/merge.test.ts | 32 +-
packages/tl-utils/src/merge.ts | 8 +-
packages/tl-utils/src/parse.test.ts | 92 +-
packages/tl-utils/src/parse.ts | 22 +-
packages/tl-utils/src/patch.ts | 14 +-
packages/tl-utils/src/schema.test.ts | 2 +-
packages/tl-utils/src/schema.ts | 2 +-
packages/tl-utils/src/stringify.test.ts | 4 +-
packages/tl-utils/src/stringify.ts | 18 +-
packages/tl-utils/src/utils.ts | 2 +-
packages/tl-utils/tsconfig.json | 16 +-
packages/tl/README.md | 7 +-
packages/tl/api-schema.json | 2 +-
packages/tl/app-config.json | 2 +-
packages/tl/build.config.cjs | 2 +-
packages/tl/data/documentation.cache.json | 2 +-
packages/tl/data/int53-overrides.json | 372 +-
packages/tl/mtp-schema.json | 2 +-
packages/tl/package.json | 72 +-
packages/tl/raw-errors.json | 2 +-
packages/tl/scripts/constants.ts | 12 +-
packages/tl/scripts/documentation.ts | 81 +-
packages/tl/scripts/fetch-api.ts | 61 +-
packages/tl/scripts/fetch-errors.ts | 28 +-
packages/tl/scripts/fetch-mtp.ts | 6 +-
packages/tl/scripts/gen-code.ts | 28 +-
packages/tl/scripts/gen-rsa-keys.ts | 17 +-
packages/tl/scripts/package.json | 2 +-
.../tl/scripts/process-descriptions-yaml.ts | 22 +-
packages/tl/scripts/schema.ts | 3 +-
packages/tl/scripts/utils.ts | 2 +-
packages/tl/tsconfig.json | 22 +-
packages/wasm/README.md | 4 +-
packages/wasm/build.config.cjs | 2 +-
packages/wasm/package.json | 56 +-
packages/wasm/src/index.ts | 2 +-
packages/wasm/tests/allocator.test.ts | 1 +
packages/wasm/tests/ctr.test.ts | 2 +-
packages/wasm/tests/gunzip.test.ts | 3 +-
packages/wasm/tests/hash.test.ts | 2 +-
packages/wasm/tests/ige.test.ts | 3 +-
packages/wasm/tests/init.ts | 2 +-
packages/wasm/tests/tsconfig.json | 14 +-
packages/wasm/tests/zlib.test.ts | 5 +-
packages/wasm/tsconfig.json | 16 +-
packages/web/README.md | 8 +-
packages/web/package.json | 66 +-
packages/web/src/client.ts | 14 +-
.../web/src/common-internals-web/base64.ts | 38 +-
packages/web/src/common-internals-web/hex.ts | 25 +-
.../web/src/common-internals-web/readme.md | 2 +-
packages/web/src/common-internals-web/utf8.ts | 6 +-
packages/web/src/crypto.ts | 14 +-
packages/web/src/idb/idb.test.ts | 3 +-
packages/web/src/idb/index.ts | 2 +-
packages/web/src/idb/repository/auth-keys.ts | 4 +-
packages/web/src/idb/repository/kv.ts | 4 +-
packages/web/src/idb/repository/peers.ts | 4 +-
.../web/src/idb/repository/ref-messages.ts | 4 +-
packages/web/src/platform.ts | 6 +-
packages/web/src/wasm.ts | 8 +-
packages/web/src/websocket.test.ts | 7 +-
packages/web/src/websocket.ts | 39 +-
packages/web/src/worker.ts | 17 +-
packages/web/tsconfig.json | 22 +-
pnpm-lock.yaml | 2391 ++++++++----
scripts/build-package.js | 48 +-
scripts/bump-version.js | 21 +-
scripts/find-updated-packages.js | 14 +-
scripts/generate-changelog.js | 18 +-
scripts/git-utils.js | 2 +-
scripts/publish.js | 45 +-
scripts/remove-jsr-sourcefiles.js | 7 +-
scripts/utils.js | 10 +-
scripts/validate-deps-versions.js | 5 +-
tsconfig.json | 82 +-
920 files changed, 10134 insertions(+), 8999 deletions(-)
delete mode 100644 .config/eslint.ci.cjs
delete mode 100644 .config/eslint.cjs
create mode 100644 eslint.config.js
diff --git a/.config/eslint.ci.cjs b/.config/eslint.ci.cjs
deleted file mode 100644
index c7bbe2f9..00000000
--- a/.config/eslint.ci.cjs
+++ /dev/null
@@ -1,30 +0,0 @@
-const baseConfig = require('./eslint.cjs')
-
-module.exports = {
- ...baseConfig,
- overrides: [
- baseConfig.overrides[0],
- {
- ...baseConfig.overrides[0],
- files: ['packages/**/*.ts'],
- extends: ['plugin:@typescript-eslint/strict-type-checked', 'plugin:import/typescript'],
- parser: '@typescript-eslint/parser',
- parserOptions: {
- project: true,
- tsconfigRootDir: __dirname,
- },
- rules: {
- ...baseConfig.overrides[0].rules,
- '@typescript-eslint/restrict-template-expressions': ['error', { allowNever: true }],
- },
- reportUnusedDisableDirectives: false,
- },
- ...baseConfig.overrides.slice(1),
- {
- files: ['e2e/**'],
- rules: {
- 'import/no-unresolved': 'off',
- },
- },
- ],
-}
diff --git a/.config/eslint.cjs b/.config/eslint.cjs
deleted file mode 100644
index ea738b9f..00000000
--- a/.config/eslint.cjs
+++ /dev/null
@@ -1,295 +0,0 @@
-module.exports = {
- env: {
- browser: true,
- es2021: true,
- node: true,
- },
- extends: ['eslint:recommended', 'plugin:import/recommended'],
- parserOptions: {
- ecmaVersion: 'latest',
- sourceType: 'module',
- },
- plugins: ['ascii', 'import', 'simple-import-sort'],
- reportUnusedDisableDirectives: true,
- rules: {
- // see https://github.com/airbnb/javascript/blob/master/packages/eslint-config-airbnb-base/rules/style.js#L122
- indent: [
- 2,
- 4,
- {
- SwitchCase: 1,
- VariableDeclarator: 1,
- outerIIFEBody: 1,
- // MemberExpression: null,
- FunctionDeclaration: {
- parameters: 1,
- body: 1,
- },
- FunctionExpression: {
- parameters: 1,
- body: 1,
- },
- CallExpression: {
- arguments: 1,
- },
- ArrayExpression: 1,
- ObjectExpression: 1,
- ImportDeclaration: 1,
- flatTernaryExpressions: false,
- // list derived from https://github.com/benjamn/ast-types/blob/HEAD/def/jsx.js
- ignoredNodes: [
- 'JSXElement',
- 'JSXElement > *',
- 'JSXAttribute',
- 'JSXIdentifier',
- 'JSXNamespacedName',
- 'JSXMemberExpression',
- 'JSXSpreadAttribute',
- 'JSXExpressionContainer',
- 'JSXOpeningElement',
- 'JSXClosingElement',
- 'JSXText',
- 'JSXEmptyExpression',
- 'JSXSpreadChild',
- ],
- ignoreComments: false,
- },
- ],
-
- semi: [2, 'never', { beforeStatementContinuationChars: 'never' }],
- 'semi-spacing': [2, { before: false, after: true }],
- 'wrap-iife': [2, 'inside'],
- 'no-caller': 2,
- 'no-cond-assign': [2, 'except-parens'],
- 'no-constant-condition': 0,
- 'no-debugger': 2,
- 'no-dupe-args': 2,
- 'no-dupe-keys': 2,
- 'no-duplicate-case': 2,
- 'no-empty': [2, { allowEmptyCatch: true }],
- 'no-empty-function': 'off',
- 'no-extra-boolean-cast': 2,
- // "no-extra-parens": [2, "all"],
- 'no-extra-semi': 2,
- 'no-func-assign': 2,
- 'no-new': 2,
- 'no-sparse-arrays': 2,
- 'no-unexpected-multiline': 2,
- 'no-unreachable': 2,
-
- 'max-params': [1, 5],
- 'max-depth': [1, 4],
- 'no-eq-null': 0,
- 'no-unused-expressions': 0,
- 'dot-notation': 2,
- 'use-isnan': 2,
-
- // Best practices
- 'block-scoped-var': 2,
- complexity: [0, 11],
- curly: [2, 'multi-line'],
- eqeqeq: [2, 'always', { null: 'ignore' }],
- 'no-else-return': 2,
- 'no-extra-bind': 2,
- 'no-implicit-coercion': 2,
- 'no-return-assign': 0,
- 'no-sequences': 2,
- yoda: 2,
-
- // Variables
- 'no-restricted-globals': ['error'],
- 'no-var': 1,
-
- // Codestyle
- 'arrow-parens': [2, 'always'],
- 'array-bracket-spacing': [2, 'never'],
- 'brace-style': [2, '1tbs', { allowSingleLine: true }],
- camelcase: [2, { properties: 'never' }],
- 'comma-dangle': ['warn', 'always-multiline'],
- 'comma-spacing': [2, { before: false, after: true }],
- 'eol-last': 2,
- 'func-call-spacing': [2, 'never'],
- 'block-spacing': 2,
- 'keyword-spacing': [2, { before: true, after: true }],
- 'max-len': [
- 2,
- {
- code: 120,
- ignoreUrls: true,
- ignoreComments: false,
- ignoreRegExpLiterals: true,
- ignoreStrings: true,
- ignoreTemplateLiterals: true,
- ignorePattern: 'require',
- },
- ],
- 'no-lonely-if': 2,
- 'no-mixed-spaces-and-tabs': 2,
- 'no-multi-spaces': 2,
- 'no-multiple-empty-lines': [2, { max: 1, maxBOF: 0, maxEOF: 0 }],
- 'no-trailing-spaces': 2,
- 'ascii/valid-name': 2,
- 'no-unneeded-ternary': 2,
- 'no-nested-ternary': 2,
- 'object-curly-spacing': [2, 'always'],
- 'one-var-declaration-per-line': [2, 'initializations'],
- 'one-var': [2, { let: 'never', const: 'never' }],
- 'operator-linebreak': [2, 'after'],
- 'padded-blocks': [2, 'never'],
- 'quote-props': [2, 'as-needed', { numbers: true }],
- quotes: [2, 'single', { avoidEscape: true }],
- 'space-before-blocks': [2, 'always'],
- 'space-before-function-paren': [
- 2,
- {
- named: 'never',
- anonymous: 'always',
- },
- ],
- 'space-in-parens': 2,
- 'key-spacing': [2, { beforeColon: false, afterColon: true, mode: 'strict' }],
- 'space-infix-ops': 2,
- 'padding-line-between-statements': [
- 'error',
- { blankLine: 'always', prev: '*', next: 'return' },
- { blankLine: 'always', prev: '*', next: 'block-like' },
- { blankLine: 'any', prev: 'block-like', next: 'block-like' },
- { blankLine: 'any', prev: 'case', next: 'case' },
- ],
-
- 'simple-import-sort/imports': [
- 'error',
- {
- groups: [['^[a-z]'], ['^@?mtcute'], ['^@/'], ['^~/'], ['^\\.']],
- },
- ],
- 'simple-import-sort/exports': 'error',
- 'import/no-relative-packages': 'error',
- 'import/no-mutable-exports': 'error',
- 'import/no-default-export': 'error',
- 'import/no-unresolved': 'off',
- 'no-console': ['error', { allow: ['warn', 'error'] }],
- },
- ignorePatterns: [
- 'node_modules/',
- '.config/',
- '.idea/',
- '.vscode/',
-
- 'private/',
- 'docs/',
- 'dist/',
-
- '*.json',
-
- // codegen
- 'packages/tl/binary/rsa-keys.js',
- 'packages/tl/binary/reader.js',
- 'packages/tl/binary/writer.js',
- 'packages/tl/index.js',
- 'packages/tl/index.d.ts',
- 'packages/tl/*.json',
-
- 'packages/client/utils.ts',
- 'packages/core/utils.ts'
- ],
- overrides: [
- {
- files: ['**/*.ts', '**/*.tsx'],
- env: { browser: true, es6: true, node: true },
- extends: ['plugin:@typescript-eslint/strict', 'plugin:import/typescript'],
- globals: { Atomics: 'readonly', SharedArrayBuffer: 'readonly' },
- parser: '@typescript-eslint/parser',
- plugins: ['@typescript-eslint'],
- rules: {
- // https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/eslint-plugin#supported-rules
- '@typescript-eslint/member-delimiter-style': [
- 'error',
- {
- multiline: {
- delimiter: 'none',
- },
- singleline: {
- delimiter: 'semi', // because prettier
- },
- },
- ],
- '@typescript-eslint/consistent-type-assertions': 2,
- '@typescript-eslint/no-explicit-any': 2,
- '@typescript-eslint/no-unused-vars': [
- 2,
- {
- args: 'after-used',
- argsIgnorePattern: '^_',
- ignoreRestSiblings: true,
- vars: 'all',
- varsIgnorePattern: '^_',
- },
- ],
- '@typescript-eslint/no-non-null-assertion': 'off', // todo MTQ-36
- '@typescript-eslint/no-empty-function': 'off',
- '@typescript-eslint/no-confusing-void-expression': 'off',
- '@typescript-eslint/no-unnecessary-condition': 'off',
- '@typescript-eslint/no-var-requires': 'off',
-
- '@typescript-eslint/no-unsafe-enum-comparison': 'off',
- '@typescript-eslint/no-invalid-void-type': 'off',
- '@typescript-eslint/unbound-method': 'off',
- '@typescript-eslint/no-dynamic-delete': 'off',
- '@typescript-eslint/no-unsafe-member-access': 'off',
- 'no-restricted-globals': ['error', 'Buffer', '__dirname', 'require'],
- 'no-restricted-imports': [
- 'error',
- {
- paths: ['buffer', 'crypto', 'fs', 'path', 'stream'],
- patterns: ['@mtcute/*/dist**'],
- },
- ],
- },
- reportUnusedDisableDirectives: false,
- settings: {
- 'import/resolver': {
- node: true,
- typescript: true,
- },
- },
- },
- {
- files: ['**/scripts/**', '*.test.ts', 'packages/create-*/**', '**/build.config.cjs', 'packages/node/**'],
- rules: {
- 'no-console': 'off',
- 'no-restricted-imports': [
- 'error',
- {
- patterns: ['@mtcute/*/dist**'],
- },
- ],
- },
- },
- {
- files: ['packages/client/src/methods/**/*.ts'],
- rules: {
- // this + max 3 more
- 'max-params': ['error', 4],
- },
- },
- {
- files: ['e2e/**', 'packages/node/**', 'packages/bun/**'],
- rules: {
- 'no-restricted-globals': 'off',
- },
- },
- {
- files: ['packages/bun/**', 'packages/deno/**'],
- rules: {
- 'no-restricted-imports': 'off',
- 'import/no-relative-packages': 'off', // common-internals is symlinked from node
- }
- },
- ],
- settings: {
- 'import/resolver': {
- node: true,
- },
- },
-}
diff --git a/.config/prettier.cjs b/.config/prettier.cjs
index 616469ff..59959378 100644
--- a/.config/prettier.cjs
+++ b/.config/prettier.cjs
@@ -27,9 +27,9 @@ module.exports = {
'packages/tl/*.json',
'*.d.ts',
- '**/dist'
+ '**/dist',
],
options: { requirePragma: true },
- }
+ },
],
}
diff --git a/.config/tsconfig.build.json b/.config/tsconfig.build.json
index 24ed8f74..bd168a0e 100644
--- a/.config/tsconfig.build.json
+++ b/.config/tsconfig.build.json
@@ -1,8 +1,8 @@
{
- "extends": "../tsconfig.json",
- "exclude": [
- "../**/*.test.ts",
- "../**/*.test-utils.ts",
- "../**/__fixtures__/**",
- ]
+ "extends": "../tsconfig.json",
+ "exclude": [
+ "../**/*.test.ts",
+ "../**/*.test-utils.ts",
+ "../**/__fixtures__/**"
+ ]
}
diff --git a/.config/typedoc/config.cjs b/.config/typedoc/config.cjs
index c70df48b..89b87976 100644
--- a/.config/typedoc/config.cjs
+++ b/.config/typedoc/config.cjs
@@ -1,5 +1,5 @@
-const fs = require('fs')
-const path = require('path')
+const fs = require('node:fs')
+const path = require('node:path')
module.exports = {
...require('./config.base.cjs'),
@@ -7,8 +7,8 @@ module.exports = {
out: '../../docs',
entryPoints: fs
.readdirSync(path.join(__dirname, '../../packages'))
- .filter((it) => !['crypto', 'tl', 'create-bot'].includes(it))
- .map((it) => `../../packages/${it}`),
+ .filter(it => !['crypto', 'tl', 'create-bot'].includes(it))
+ .map(it => `../../packages/${it}`),
entryPointStrategy: 'packages',
// logLevel: 'Verbose',
}
diff --git a/.config/typedoc/plugin-external-links.cjs b/.config/typedoc/plugin-external-links.cjs
index feb58bc4..b43462db 100644
--- a/.config/typedoc/plugin-external-links.cjs
+++ b/.config/typedoc/plugin-external-links.cjs
@@ -1,6 +1,6 @@
function load(app) {
app.converter.addUnknownSymbolResolver((declaration) => {
- const symbol = declaration.symbolReference?.path?.map((path) => path.path).join('.')
+ const symbol = declaration.symbolReference?.path?.map(path => path.path).join('.')
if (symbol === 'Long' || symbol === 'tl.Long') {
return {
@@ -40,7 +40,7 @@ function load(app) {
}
}
- name = (ns ? ns + '.' : '') + name
+ name = (ns ? `${ns}.` : '') + name
let url
diff --git a/.config/typedoc/plugin-umami.cjs b/.config/typedoc/plugin-umami.cjs
index add840a5..c79cbec5 100644
--- a/.config/typedoc/plugin-umami.cjs
+++ b/.config/typedoc/plugin-umami.cjs
@@ -7,14 +7,14 @@ const UMAMI_NOSCRIPT = `https://tei.su/zond.php?website=${WEBSITE_ID}`
const { createElement: h } = JSX
function load(app) {
- app.renderer.hooks.on('head.end', (event) => {
+ app.renderer.hooks.on('head.end', () => {
return h('script', {
- async: true,
- src: `${UMAMI_URL}/script.js`,
+ 'async': true,
+ 'src': `${UMAMI_URL}/script.js`,
'data-website-id': WEBSITE_ID,
})
})
- app.renderer.hooks.on('body.begin', (event) => {
+ app.renderer.hooks.on('body.begin', () => {
return h(
'noscript',
null,
diff --git a/.config/vite-utils/collect-test-entrypoints.ts b/.config/vite-utils/collect-test-entrypoints.ts
index 45aa9e44..0864f5d1 100644
--- a/.config/vite-utils/collect-test-entrypoints.ts
+++ b/.config/vite-utils/collect-test-entrypoints.ts
@@ -1,13 +1,15 @@
-import { join, resolve } from 'path'
-import * as fs from 'fs'
+import { join, resolve } from 'node:path'
+import * as fs from 'node:fs'
+
import { globSync } from 'glob'
-export function collectTestEntrypoints(params: { skipPackages: string[]; skipTests: string[] }) {
+export function collectTestEntrypoints(params: { skipPackages: string[], skipTests: string[] }) {
const files: string[] = []
+ // eslint-disable-next-line no-restricted-globals
const packages = resolve(__dirname, '../../packages')
- const skipTests = params.skipTests.map((path) => resolve(packages, path))
+ const skipTests = params.skipTests.map(path => resolve(packages, path))
for (const dir of fs.readdirSync(packages)) {
if (dir.startsWith('.') || params.skipPackages.includes(dir)) continue
diff --git a/.config/vite-utils/fixup-cjs.ts b/.config/vite-utils/fixup-cjs.ts
index f43da923..1a650361 100644
--- a/.config/vite-utils/fixup-cjs.ts
+++ b/.config/vite-utils/fixup-cjs.ts
@@ -1,4 +1,4 @@
-import { Plugin } from 'vite'
+import type { Plugin } from 'vite'
import * as cjsLexer from 'cjs-module-lexer'
import esbuild from 'esbuild'
diff --git a/.config/vite-utils/polyfills-bun.ts b/.config/vite-utils/polyfills-bun.ts
index dfd88472..479da870 100644
--- a/.config/vite-utils/polyfills-bun.ts
+++ b/.config/vite-utils/polyfills-bun.ts
@@ -1,9 +1,9 @@
-import { describe, it, beforeEach, afterEach, beforeAll, afterAll, jest, vi as bunVi } from 'bun:test'
+import { afterAll, afterEach, beforeAll, beforeEach, vi as bunVi, it, jest } from 'bun:test'
// https://github.com/oven-sh/bun/issues/6044
-import console from 'console'
import * as chai from 'chai'
import * as vitestExpect from '@vitest/expect'
import * as vitestSpy from '@vitest/spy'
+
import { setupChai, stubGlobal, unstubAllGlobals, waitFor } from './polyfills'
setupChai(chai, vitestExpect)
@@ -15,7 +15,7 @@ export const vi = {
...jest,
...bunVi,
...vitestSpy,
- mocked: (fn) => fn,
+ mocked: fn => fn,
stubGlobal,
unstubAllGlobals,
waitFor,
diff --git a/.config/vite-utils/polyfills-deno.ts b/.config/vite-utils/polyfills-deno.ts
index 564280b0..7021a58c 100644
--- a/.config/vite-utils/polyfills-deno.ts
+++ b/.config/vite-utils/polyfills-deno.ts
@@ -1,12 +1,14 @@
// @ts-expect-error no typings
-import { describe as _describe, it, beforeEach, afterEach, beforeAll, afterAll } from 'jsr:@std/testing/bdd'
+import util from 'node:util'
+
+import { describe as _describe, afterAll, afterEach, beforeAll, beforeEach, it } from 'jsr:@std/testing/bdd'
// @ts-expect-error no typings
import * as vitestSpy from 'npm:@vitest/spy@1.4.0'
// @ts-expect-error no typings
import * as chai from 'npm:chai'
// @ts-expect-error no typings
import * as vitestExpect from 'npm:@vitest/expect@1.4.0'
-import util from 'node:util'
+
import { setupChai, stubGlobal, unstubAllGlobals, waitFor } from './polyfills'
export { it, beforeEach, afterEach, beforeAll, afterAll }
@@ -15,6 +17,7 @@ setupChai(chai, vitestExpect)
// https://github.com/denoland/deno_std/issues/2213
Object.defineProperty(it, 'each', {
+ // eslint-disable-next-line ts/no-unsafe-function-type
value: (items: any[][]) => (name: string, fn: Function) => {
return items.map((item) => {
return it(`${util.format(name, ...item)}`, () => fn(...item))
@@ -23,8 +26,8 @@ Object.defineProperty(it, 'each', {
})
// https://github.com/denoland/deno_std/issues/4634
-export const describe = (...args) => {
- const fn = args.find((arg) => typeof arg === 'function')
+export function describe(...args) {
+ const fn = args.find(arg => typeof arg === 'function')
if (fn.toString().startsWith('async')) {
return
}
diff --git a/.config/vite-utils/polyfills.ts b/.config/vite-utils/polyfills.ts
index 35cd70f3..85710032 100644
--- a/.config/vite-utils/polyfills.ts
+++ b/.config/vite-utils/polyfills.ts
@@ -6,32 +6,32 @@ export function setupChai(chai: any, vitestExpect: any) {
utils.addMethod(
chai.Assertion.prototype,
'toMatchInlineSnapshot',
- function (properties?: object, inlineSnapshot?: string, message?: string) {
+ function (properties?: object, inlineSnapshot?: string) {
// based on https://github.com/vitest-dev/vitest/blob/main/packages/vitest/src/integrations/snapshot/chai.ts
const received = utils.flag(this, 'object')
if (typeof properties === 'string') {
- message = inlineSnapshot
inlineSnapshot = properties
properties = undefined
}
if (typeof inlineSnapshot !== 'string') {
- throw new Error('toMatchInlineSnapshot requires a string argument')
+ throw new TypeError('toMatchInlineSnapshot requires a string argument')
}
// todo use @vitest/snapshot
if (typeof received === 'string') {
- const snapshot = '"' + received + '"'
+ const snapshot = `"${received}"`
return chai.expect(snapshot).eql(inlineSnapshot.trim())
} else {
- const obj = eval('(' + inlineSnapshot + ')') // idc lol
+ // eslint-disable-next-line no-eval
+ const obj = eval(`(${inlineSnapshot})`) // idc lol
return chai.expect(received).eql(obj)
}
},
)
- utils.addMethod(chai.Assertion.prototype, 'toMatchSnapshot', function () {
+ utils.addMethod(chai.Assertion.prototype, 'toMatchSnapshot', () => {
// todo use @vitest/snapshot
})
})
@@ -71,6 +71,7 @@ export function unstubAllGlobals() {
stubbedGlobal.clear()
}
+// eslint-disable-next-line ts/no-unsafe-function-type
export async function waitFor(fn: Function) {
// less customizations than vi.waitFor but it's good enough for now
const timeout = Date.now() + 5000
@@ -81,7 +82,7 @@ export async function waitFor(fn: Function) {
return await fn()
} catch (e) {
lastError = e
- await new Promise((resolve) => setTimeout(resolve, 10))
+ await new Promise(resolve => setTimeout(resolve, 10))
}
}
diff --git a/.config/vite-utils/test-setup-plugin.ts b/.config/vite-utils/test-setup-plugin.ts
index b3c94452..bd8515ff 100644
--- a/.config/vite-utils/test-setup-plugin.ts
+++ b/.config/vite-utils/test-setup-plugin.ts
@@ -1,5 +1,6 @@
-import { Plugin } from 'vite'
-import { fileURLToPath } from 'url'
+import { fileURLToPath } from 'node:url'
+
+import type { Plugin } from 'vite'
const setupFile = fileURLToPath(new URL('./test-setup.ts', import.meta.url))
@@ -12,7 +13,7 @@ export function testSetup(params?: { additionalCode?: string }): Plugin {
if (!id.match(/\.test\.m?[tj]s/)) return
return {
- code: `import '${setupFile}'\n` + additionalCode + code,
+ code: `import '${setupFile}'\n${additionalCode}${code}`,
map: null,
}
},
diff --git a/.config/vite-utils/test-setup.ts b/.config/vite-utils/test-setup.ts
index 1be216bc..5c66fba7 100644
--- a/.config/vite-utils/test-setup.ts
+++ b/.config/vite-utils/test-setup.ts
@@ -1,4 +1,5 @@
import { expect } from 'vitest'
+
import { setPlatform } from '../../packages/core/src/platform.js'
import { buffersEqual } from '../../packages/core/src/utils/buffer-utils.js'
@@ -15,5 +16,5 @@ expect.addEqualityTesters([
if (a instanceof Uint8Array && b instanceof Uint8Array) {
return buffersEqual(a, b)
}
- }
-])
\ No newline at end of file
+ },
+])
diff --git a/.config/vite.browser.ts b/.config/vite.browser.ts
index b06c7b57..d2586158 100644
--- a/.config/vite.browser.ts
+++ b/.config/vite.browser.ts
@@ -14,7 +14,7 @@ export default mergeConfig(baseConfig, {
slowHijackESM: false,
},
fakeTimers: {
- toFake: ['setTimeout', 'clearTimeout', 'setInterval', 'clearInterval', 'Date']
+ toFake: ['setTimeout', 'clearTimeout', 'setInterval', 'clearInterval', 'Date'],
},
retry: process.env.CI ? 3 : 0,
isolate: false,
@@ -28,20 +28,20 @@ export default mergeConfig(baseConfig, {
plugins: [
fixupCjs(),
nodePolyfills({
- include: ['stream', 'path', 'zlib', 'util'],
+ include: ['stream', 'path', 'zlib', 'util', 'events'],
globals: {
Buffer: false,
global: false,
process: false,
},
- })
+ }),
],
build: {
rollupOptions: {
- external: ['bun:sqlite']
- }
+ external: ['bun:sqlite'],
+ },
},
define: {
- 'import.meta.env.TEST_ENV': '"browser"'
- }
+ 'import.meta.env.TEST_ENV': '"browser"',
+ },
})
diff --git a/.config/vite.bun.ts b/.config/vite.bun.ts
index 66f62f5e..ac2bdad6 100644
--- a/.config/vite.bun.ts
+++ b/.config/vite.bun.ts
@@ -1,7 +1,8 @@
+/* eslint-disable no-restricted-globals */
+import { resolve } from 'node:path'
+
import { defineConfig } from 'vite'
-import { globSync } from 'glob'
-import { resolve, join } from 'path'
-import * as fs from 'fs'
+
import { fixupCjs } from './vite-utils/fixup-cjs'
import { testSetup } from './vite-utils/test-setup-plugin'
import { collectTestEntrypoints } from './vite-utils/collect-test-entrypoints'
@@ -11,39 +12,26 @@ const POLYFILLS = resolve(__dirname, 'vite-utils/polyfills-bun.ts')
export default defineConfig({
build: {
lib: {
- entry: process.env.ENTRYPOINT ? [process.env.ENTRYPOINT] : collectTestEntrypoints({
- // https://github.com/oven-sh/bun/issues/4145 prevents us from using vitest directly
- // so we have to use bun's native test runner
- skipPackages: ['create-bot', 'crypto-node'],
- // bun:test doesn't support certain features of vitest, so we'll skip them for now
- // https://github.com/oven-sh/bun/issues/1825
- skipTests: [
+ entry: process.env.ENTRYPOINT
+ ? [process.env.ENTRYPOINT]
+ : collectTestEntrypoints({
+ // https://github.com/oven-sh/bun/issues/4145 prevents us from using vitest directly
+ // so we have to use bun's native test runner
+ skipPackages: ['create-bot', 'crypto-node'],
+ // bun:test doesn't support certain features of vitest, so we'll skip them for now
+ // https://github.com/oven-sh/bun/issues/1825
+ skipTests: [
// uses timers
- 'core/src/network/config-manager.test.ts',
- 'core/src/network/persistent-connection.test.ts',
- ],
- }),
+ 'core/src/network/config-manager.test.ts',
+ 'core/src/network/persistent-connection.test.ts',
+ ],
+ }),
formats: ['es'],
},
rollupOptions: {
external: [
- 'node:zlib',
+ /^(node|bun):.*/,
'vitest',
- 'stream',
- 'net',
- 'crypto',
- 'module',
- 'fs',
- 'fs/promises',
- 'node:fs',
- 'readline',
- 'worker_threads',
- 'events',
- 'path',
- 'util',
- 'os',
- 'bun:test',
- 'bun:sqlite',
],
output: {
chunkFileNames: 'chunk-[hash].js',
@@ -66,8 +54,8 @@ export default defineConfig({
name: 'polyfills',
transform(code) {
if (!code.includes('vitest')) return code
- code = code.replace(/^import {(.+?)} from ['"]vitest['"]/gms, (_, names) => {
- const namesParsed = names.split(',').map((name) => name.trim())
+ code = code.replace(/^import \{(.+?)\} from ['"]vitest['"]/gms, (_, names) => {
+ const namesParsed = names.split(',').map(name => name.trim())
const namesFromFixup: string[] = []
const newNames = namesParsed
@@ -92,13 +80,13 @@ export default defineConfig({
},
{
name: 'fix-wasm-load',
- async transform(code, id) {
+ async transform(code) {
if (code.includes('@mtcute/wasm/mtcute.wasm')) {
return code.replace('@mtcute/wasm/mtcute.wasm', resolve(__dirname, '../packages/wasm/mtcute.wasm'))
}
return code
- }
+ },
},
testSetup(),
],
diff --git a/.config/vite.deno.ts b/.config/vite.deno.ts
index 073611d4..796d847f 100644
--- a/.config/vite.deno.ts
+++ b/.config/vite.deno.ts
@@ -1,26 +1,31 @@
+import { resolve } from 'node:path'
+
import { defineConfig } from 'vite'
-import { resolve, join } from 'path'
+
import { fixupCjs } from './vite-utils/fixup-cjs'
import { testSetup } from './vite-utils/test-setup-plugin'
import { collectTestEntrypoints } from './vite-utils/collect-test-entrypoints'
+// eslint-disable-next-line no-restricted-globals
const POLYFILLS = resolve(__dirname, 'vite-utils/polyfills-deno.ts')
export default defineConfig({
build: {
lib: {
- entry: process.env.ENTRYPOINT ? [process.env.ENTRYPOINT] : collectTestEntrypoints({
- // these packages rely on node apis and are not meant to be run under deno
- skipPackages: ['create-bot', 'crypto-node', 'bun', 'node', 'http-proxy', 'socks-proxy', 'mtproxy'],
- skipTests: [
+ entry: process.env.ENTRYPOINT
+ ? [process.env.ENTRYPOINT]
+ : collectTestEntrypoints({
+ // these packages rely on node apis and are not meant to be run under deno
+ skipPackages: ['create-bot', 'crypto-node', 'bun', 'node', 'http-proxy', 'socks-proxy', 'mtproxy'],
+ skipTests: [
// uses timers
- 'core/src/network/config-manager.test.ts',
- 'core/src/network/persistent-connection.test.ts',
- // https://github.com/denoland/deno/issues/22470
- 'wasm/tests/gunzip.test.ts',
- 'wasm/tests/zlib.test.ts',
- ],
- }),
+ 'core/src/network/config-manager.test.ts',
+ 'core/src/network/persistent-connection.test.ts',
+ // https://github.com/denoland/deno/issues/22470
+ 'wasm/tests/gunzip.test.ts',
+ 'wasm/tests/zlib.test.ts',
+ ],
+ }),
formats: ['es'],
},
rollupOptions: {
@@ -48,8 +53,8 @@ export default defineConfig({
name: 'polyfills',
transform(code) {
if (!code.includes('vitest')) return code
- code = code.replace(/^import {(.+?)} from ['"]vitest['"]/gms, (_, names) => {
- const namesParsed = names.split(',').map((name) => name.trim())
+ code = code.replace(/^import \{(.+?)\} from ['"]vitest['"]/gms, (_, names) => {
+ const namesParsed = names.split(',').map(name => name.trim())
return `import {${namesParsed.join(', ')}} from '${POLYFILLS}'`
})
diff --git a/.config/vite.ts b/.config/vite.ts
index 355a2d0c..39bbe63b 100644
--- a/.config/vite.ts
+++ b/.config/vite.ts
@@ -17,14 +17,14 @@ export default defineConfig({
],
exclude: [
'packages/**/index.ts',
- ]
+ ],
},
setupFiles: [
- './.config/vite-utils/test-setup.ts'
- ]
+ './.config/vite-utils/test-setup.ts',
+ ],
},
define: {
- 'import.meta.env.TEST_ENV': '"node"'
+ 'import.meta.env.TEST_ENV': '"node"',
},
optimizeDeps: {
esbuildOptions: {
diff --git a/README.md b/README.md
index 4657fb0f..74f24c53 100644
--- a/README.md
+++ b/README.md
@@ -19,7 +19,7 @@
> [!WARNING]
-> mtcute is currently in alpha stage: the api is not very stable yet, and there may be a lot of bugs
+> mtcute is currently in alpha stage: the api is not very stable yet, and there may be a lot of bugs
> feel free to try it out, though, any feedback is appreciated!
>
> releases may not follow semver just yet, so please pin the versions for now
@@ -29,7 +29,7 @@ import { TelegramClient } from '@mtcute/node'
import { Dispatcher, filters } from '@mtcute/dispatcher'
const tg = new TelegramClient({
- apiId: parseInt(process.env.API_ID),
+ apiId: Number.parseInt(process.env.API_ID),
apiHash: process.env.API_HASH,
storage: 'my-account'
})
diff --git a/e2e/deno/README.md b/e2e/deno/README.md
index 5b579dc9..034bfa89 100644
--- a/e2e/deno/README.md
+++ b/e2e/deno/README.md
@@ -6,7 +6,7 @@ They are made for 2 purposes:
- Ensure published packages work as expected and can properly be imported
- Ensure that the library works with the actual Telegram API
-To achieve the first goal, we use a local JSR instance container where we publish the package,
+To achieve the first goal, we use a local JSR instance container where we publish the package,
and then install it from there in another container
## Setting up
@@ -27,4 +27,4 @@ Before running the tests, you need to copy `.env.example` to `.env` and fill in
./cli.sh run
# or in docker
./cli.sh run-docker
-```
\ No newline at end of file
+```
diff --git a/e2e/deno/deno.json b/e2e/deno/deno.json
index 71f4e17a..120e67e5 100644
--- a/e2e/deno/deno.json
+++ b/e2e/deno/deno.json
@@ -1,10 +1,10 @@
{
- "imports": {
- "@mtcute/web": "jsr:@mtcute/web@*",
- "@mtcute/wasm": "jsr:@mtcute/wasm@*",
- "@mtcute/tl": "jsr:@mtcute/tl@*",
- "@mtcute/tl-runtime": "jsr:@mtcute/tl-runtime@*",
- "@mtcute/core": "jsr:@mtcute/core@*",
- "@mtcute/deno": "jsr:@mtcute/deno@*"
- }
-}
\ No newline at end of file
+ "imports": {
+ "@mtcute/web": "jsr:@mtcute/web@*",
+ "@mtcute/wasm": "jsr:@mtcute/wasm@*",
+ "@mtcute/tl": "jsr:@mtcute/tl@*",
+ "@mtcute/tl-runtime": "jsr:@mtcute/tl-runtime@*",
+ "@mtcute/core": "jsr:@mtcute/core@*",
+ "@mtcute/deno": "jsr:@mtcute/deno@*"
+ }
+}
diff --git a/e2e/deno/init-server.js b/e2e/deno/init-server.js
index 40ce6f58..dc1152fd 100644
--- a/e2e/deno/init-server.js
+++ b/e2e/deno/init-server.js
@@ -1,5 +1,5 @@
/* eslint-disable no-console */
-import { execSync } from 'child_process'
+import { execSync } from 'node:child_process'
function getDockerContainerIp(name) {
const containerId = execSync(`docker compose ps -q ${name}`).toString().trim()
@@ -51,7 +51,7 @@ const resp = await fetch(`${API_URL}api/scopes`, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
- Cookie: 'token=token',
+ 'Cookie': 'token=token',
},
body: JSON.stringify({ scope: 'mtcute' }),
})
diff --git a/e2e/deno/tests/01.auth.ts b/e2e/deno/tests/01.auth.ts
index 5236b549..b728e7df 100644
--- a/e2e/deno/tests/01.auth.ts
+++ b/e2e/deno/tests/01.auth.ts
@@ -1,14 +1,14 @@
import { assertEquals } from 'https://deno.land/std@0.223.0/assert/mod.ts'
-
-import { tl, User } from '@mtcute/core'
+import { User, tl } from '@mtcute/core'
import { BaseTelegramClient, TelegramClient } from '@mtcute/core/client.js'
import { getApiParams } from '../utils.ts'
-const getAccountId = () =>
- Math.floor(Math.random() * 10000)
+function getAccountId() {
+ return Math.floor(Math.random() * 10000)
.toString()
.padStart(4, '0')
+}
async function authorizeInDc(dc: number, base: BaseTelegramClient) {
const tg = new TelegramClient({ client: base })
diff --git a/e2e/deno/tests/02.methods.ts b/e2e/deno/tests/02.methods.ts
index f62b9a13..e60e6841 100644
--- a/e2e/deno/tests/02.methods.ts
+++ b/e2e/deno/tests/02.methods.ts
@@ -1,5 +1,4 @@
import { assertEquals, assertNotEquals } from 'https://deno.land/std@0.223.0/assert/mod.ts'
-
import { MtPeerNotFoundError } from '@mtcute/core'
import { TelegramClient } from '@mtcute/core/client.js'
diff --git a/e2e/deno/tests/03.files.ts b/e2e/deno/tests/03.files.ts
index 3cbbbf5a..dee5d703 100644
--- a/e2e/deno/tests/03.files.ts
+++ b/e2e/deno/tests/03.files.ts
@@ -1,7 +1,8 @@
-import { assertEquals } from 'https://deno.land/std@0.223.0/assert/mod.ts'
import { createHash } from 'node:crypto'
-import { FileDownloadLocation, Thumbnail } from '@mtcute/core'
+import { assertEquals } from 'https://deno.land/std@0.223.0/assert/mod.ts'
+import type { FileDownloadLocation } from '@mtcute/core'
+import { Thumbnail } from '@mtcute/core'
import { TelegramClient } from '@mtcute/core/client.js'
import { sleep } from '@mtcute/core/utils.js'
diff --git a/e2e/deno/tests/04.updates.ts b/e2e/deno/tests/04.updates.ts
index 37bc49e1..f19d015f 100644
--- a/e2e/deno/tests/04.updates.ts
+++ b/e2e/deno/tests/04.updates.ts
@@ -1,6 +1,5 @@
import { assertEquals, assertNotEquals } from 'https://deno.land/std@0.223.0/assert/mod.ts'
-
-import { Message } from '@mtcute/core'
+import type { Message } from '@mtcute/core'
import { TelegramClient } from '@mtcute/core/client.js'
import { getApiParams, waitFor } from '../utils.ts'
@@ -18,7 +17,7 @@ Deno.test('4. handling updates', { sanitizeResources: false }, async (t) => {
await t.step('should send and receive messages', async () => {
const tg1Messages: Message[] = []
- tg1.on('new_message', (msg) => tg1Messages.push(msg))
+ tg1.on('new_message', msg => tg1Messages.push(msg))
const [tg1User] = await tg1.getUsers('self')
let username = tg1User!.username
@@ -36,7 +35,7 @@ Deno.test('4. handling updates', { sanitizeResources: false }, async (t) => {
await waitFor(() => {
assertNotEquals(
- tg1Messages.find((msg) => msg.text === messageText),
+ tg1Messages.find(msg => msg.text === messageText),
undefined,
)
})
diff --git a/e2e/deno/tests/05.worker.ts b/e2e/deno/tests/05.worker.ts
index d50bcf41..c4dd6480 100644
--- a/e2e/deno/tests/05.worker.ts
+++ b/e2e/deno/tests/05.worker.ts
@@ -1,9 +1,10 @@
import { assertEquals, assertGreater, assertInstanceOf } from 'https://deno.land/std@0.223.0/assert/mod.ts'
-
import { TelegramClient } from '@mtcute/core/client.js'
-import { Long, Message, TelegramWorkerPort, tl } from '@mtcute/deno'
+import type { Message } from '@mtcute/deno'
+import { Long, TelegramWorkerPort, tl } from '@mtcute/deno'
import { getApiParams, waitFor } from '../utils.ts'
+
import type { CustomMethods } from './_worker.ts'
Deno.test('5. worker', { sanitizeResources: false }, async (t) => {
@@ -16,7 +17,7 @@ Deno.test('5. worker', { sanitizeResources: false }, async (t) => {
})
const portClient = new TelegramClient({ client: port })
- await t.step('should make api calls', async function () {
+ await t.step('should make api calls', async () => {
const res = await port.call({ _: 'help.getConfig' })
assertEquals(res._, 'config')
@@ -25,7 +26,7 @@ Deno.test('5. worker', { sanitizeResources: false }, async (t) => {
assertEquals(Long.isLong((premiumPromo.users[0] as tl.RawUser).accessHash), true)
})
- await t.step('should call custom methods', async function () {
+ await t.step('should call custom methods', async () => {
const hello = await port.invokeCustom('hello')
assertEquals(hello, 'world')
@@ -33,7 +34,7 @@ Deno.test('5. worker', { sanitizeResources: false }, async (t) => {
assertEquals(sum, 5)
})
- await t.step('should throw errors', async function () {
+ await t.step('should throw errors', async () => {
try {
await port.call({ _: 'test.useConfigSimple' })
throw new Error('should have thrown')
@@ -42,7 +43,7 @@ Deno.test('5. worker', { sanitizeResources: false }, async (t) => {
}
})
- await t.step('should receive updates', async function () {
+ await t.step('should receive updates', async () => {
const client2 = new TelegramClient(getApiParams('dc2.session'))
try {
diff --git a/e2e/deno/tests/_worker.ts b/e2e/deno/tests/_worker.ts
index 1b5e3938..967cbd9a 100644
--- a/e2e/deno/tests/_worker.ts
+++ b/e2e/deno/tests/_worker.ts
@@ -1,4 +1,4 @@
-import { WorkerCustomMethods } from '@mtcute/core/worker.js'
+import type { WorkerCustomMethods } from '@mtcute/core/worker.js'
import { BaseTelegramClient, TelegramWorker } from '@mtcute/deno'
import { getApiParams } from '../utils.ts'
diff --git a/e2e/deno/tests/packaging/base-client.ts b/e2e/deno/tests/packaging/base-client.ts
index b752892a..f929853f 100644
--- a/e2e/deno/tests/packaging/base-client.ts
+++ b/e2e/deno/tests/packaging/base-client.ts
@@ -1,5 +1,4 @@
import { assertEquals } from 'https://deno.land/std@0.223.0/assert/mod.ts'
-
import { BaseTelegramClient } from '@mtcute/core/client.js'
import { getApiParams } from '../../utils.ts'
diff --git a/e2e/deno/tests/packaging/tl-runtime.ts b/e2e/deno/tests/packaging/tl-runtime.ts
index b00dbeb0..ec577252 100644
--- a/e2e/deno/tests/packaging/tl-runtime.ts
+++ b/e2e/deno/tests/packaging/tl-runtime.ts
@@ -1,6 +1,4 @@
-/* eslint-disable @typescript-eslint/no-explicit-any */
import { assertEquals } from 'https://deno.land/std@0.223.0/assert/mod.ts'
-
import { Long } from '@mtcute/core'
import { setPlatform } from '@mtcute/core/platform.js'
import { TlBinaryReader, TlBinaryWriter, TlSerializationCounter } from '@mtcute/tl-runtime'
@@ -19,7 +17,7 @@ Deno.test('encodings', () => {
Deno.test('TlBinaryReader', () => {
const map = {
- '85337187': function (r: any) {
+ 85337187(r: any) {
const ret: any = {}
ret._ = 'mt_resPQ'
ret.nonce = r.int128()
@@ -30,8 +28,8 @@ Deno.test('TlBinaryReader', () => {
return ret
},
}
- const data =
- '000000000000000001c8831ec97ae55140000000632416053e0549828cca27e966b301a48fece2fca5cf4d33f4a11ea877ba4aa5739073300817ed48941a08f98100000015c4b51c01000000216be86c022bb4c3'
+ const data
+ = '000000000000000001c8831ec97ae55140000000632416053e0549828cca27e966b301a48fece2fca5cf4d33f4a11ea877ba4aa5739073300817ed48941a08f98100000015c4b51c01000000216be86c022bb4c3'
const buf = p.hexDecode(data)
const r = new TlBinaryReader(map, buf, 8)
@@ -45,7 +43,7 @@ Deno.test('TlBinaryReader', () => {
Deno.test('TlBinaryWriter', () => {
const map = {
- mt_resPQ: function (w: any, obj: any) {
+ mt_resPQ(w: any, obj: any) {
w.uint(85337187)
w.bytes(obj.pq)
w.vector(w.long, obj.serverPublicKeyFingerprints)
diff --git a/e2e/deno/tests/packaging/tl-schema.ts b/e2e/deno/tests/packaging/tl-schema.ts
index 5514729e..348fa9c9 100644
--- a/e2e/deno/tests/packaging/tl-schema.ts
+++ b/e2e/deno/tests/packaging/tl-schema.ts
@@ -1,5 +1,4 @@
import { assertEquals } from 'https://deno.land/std@0.223.0/assert/mod.ts'
-
import { Long } from '@mtcute/core'
import { setPlatform } from '@mtcute/core/platform.js'
import { tl } from '@mtcute/tl'
@@ -29,7 +28,7 @@ Deno.test('@mtcute/tl', async (t) => {
await t.step('readers map works with TlBinaryReader', () => {
const buf = p.hexDecode('4ca5e8dd7b00000000000000c801000000000000')
- // eslint-disable-next-line
+
const obj = TlBinaryReader.deserializeObject(__tlReaderMap, buf)
assertEquals(obj._, 'inputPeerUser')
diff --git a/e2e/deno/tests/packaging/wasm.ts b/e2e/deno/tests/packaging/wasm.ts
index 865f670e..69a210ae 100644
--- a/e2e/deno/tests/packaging/wasm.ts
+++ b/e2e/deno/tests/packaging/wasm.ts
@@ -1,5 +1,4 @@
import { assertEquals } from 'https://deno.land/std@0.223.0/assert/mod.ts'
-
import { ige256Decrypt, ige256Encrypt } from '@mtcute/wasm'
import { WebCryptoProvider, WebPlatform } from '@mtcute/web'
diff --git a/e2e/deno/utils.ts b/e2e/deno/utils.ts
index dfba3630..86f0f183 100644
--- a/e2e/deno/utils.ts
+++ b/e2e/deno/utils.ts
@@ -1,9 +1,10 @@
-import { MaybePromise, MemoryStorage } from '@mtcute/core'
+import type { MaybePromise } from '@mtcute/core'
+import { MemoryStorage } from '@mtcute/core'
import { setPlatform } from '@mtcute/core/platform.js'
import { LogManager, sleep } from '@mtcute/core/utils.js'
import { DenoCryptoProvider, DenoPlatform, SqliteStorage, TcpTransport } from '@mtcute/deno'
-export const getApiParams = (storage?: string) => {
+export function getApiParams(storage?: string) {
if (!Deno.env.has('API_ID') || !Deno.env.has('API_HASH')) {
throw new Error('API_ID and API_HASH env variables must be set')
}
@@ -13,7 +14,7 @@ export const getApiParams = (storage?: string) => {
setPlatform(new DenoPlatform())
return {
- apiId: parseInt(Deno.env.get('API_ID')!),
+ apiId: Number.parseInt(Deno.env.get('API_ID')!),
apiHash: Deno.env.get('API_HASH')!,
testMode: true,
storage: storage ? new SqliteStorage(`.sessions/${storage}`) : new MemoryStorage(),
diff --git a/e2e/node/.mocharc.json b/e2e/node/.mocharc.json
index 1c46b480..04373577 100644
--- a/e2e/node/.mocharc.json
+++ b/e2e/node/.mocharc.json
@@ -1,3 +1,3 @@
{
- "node-option": []
+ "node-option": []
}
diff --git a/e2e/node/README.md b/e2e/node/README.md
index 842f184f..3733d8e4 100644
--- a/e2e/node/README.md
+++ b/e2e/node/README.md
@@ -6,7 +6,7 @@ They are made for 2 purposes:
- Ensure published packages work as expected and can properly be imported
- Ensure that the library works with the actual Telegram API (WIP)
-To achieve the first goal, we use a Verdaccio container to publish the package to,
+To achieve the first goal, we use a Verdaccio container to publish the package to,
and then install it from there in another container
## Setting up
@@ -45,4 +45,4 @@ npm config set -L project @mtcute:registry http://verdaccio.e2e.orb.local/
> Replace the URL above with the one generated with your Docker GUI of choice
> (e2e > verdaccio > RMB > Open in browser). Example above assumes OrbStack
-Then use `./cli.sh run` to run the tests
\ No newline at end of file
+Then use `./cli.sh run` to run the tests
diff --git a/e2e/node/cjs/package.json b/e2e/node/cjs/package.json
index 9e26dfee..0967ef42 100644
--- a/e2e/node/cjs/package.json
+++ b/e2e/node/cjs/package.json
@@ -1 +1 @@
-{}
\ No newline at end of file
+{}
diff --git a/e2e/node/cjs/tests/tl-runtime.js b/e2e/node/cjs/tests/tl-runtime.js
index 4e38b6ef..1799c80d 100644
--- a/e2e/node/cjs/tests/tl-runtime.js
+++ b/e2e/node/cjs/tests/tl-runtime.js
@@ -24,7 +24,7 @@ describe('@mtcute/tl-runtime', () => {
describe('TlBinaryReader', () => {
const map = {
- '85337187': function (r) {
+ 85337187(r) {
const ret = {}
ret._ = 'mt_resPQ'
ret.nonce = r.int128()
@@ -35,8 +35,8 @@ describe('@mtcute/tl-runtime', () => {
return ret
},
}
- const data =
- '000000000000000001c8831ec97ae55140000000632416053e0549828cca27e966b301a48fece2fca5cf4d33f4a11ea877ba4aa5739073300817ed48941a08f98100000015c4b51c01000000216be86c022bb4c3'
+ const data
+ = '000000000000000001c8831ec97ae55140000000632416053e0549828cca27e966b301a48fece2fca5cf4d33f4a11ea877ba4aa5739073300817ed48941a08f98100000015c4b51c01000000216be86c022bb4c3'
it('should work with Buffers', () => {
const buf = Buffer.from(data, 'hex')
@@ -64,7 +64,7 @@ describe('@mtcute/tl-runtime', () => {
describe('TlBinaryWriter', () => {
const map = {
- mt_resPQ: function (w, obj) {
+ mt_resPQ(w, obj) {
w.uint(85337187)
w.bytes(obj.pq)
w.vector(w.long, obj.serverPublicKeyFingerprints)
diff --git a/e2e/node/cjs/tests/tl-schema.js b/e2e/node/cjs/tests/tl-schema.js
index 43508e29..f84c8c9e 100644
--- a/e2e/node/cjs/tests/tl-schema.js
+++ b/e2e/node/cjs/tests/tl-schema.js
@@ -1,5 +1,4 @@
const Long = require('long')
-
const { TlBinaryReader, TlBinaryWriter } = require('@mtcute/tl-runtime')
const { tl } = require('@mtcute/tl')
const { __tlReaderMap } = require('@mtcute/tl/binary/reader')
@@ -35,6 +34,6 @@ describe('@mtcute/tl', () => {
})
it('correctly checks for combinator types', () => {
- expect(tl.isAnyInputUser({ _: 'inputUserEmpty' })).to.be.true
+ expect(tl.isAnyInputUser({ _: 'inputUserEmpty' })).to.eq(true)
})
})
diff --git a/e2e/node/cjs/utils.js b/e2e/node/cjs/utils.js
index a81c0027..be23b064 100644
--- a/e2e/node/cjs/utils.js
+++ b/e2e/node/cjs/utils.js
@@ -12,7 +12,7 @@ exports.getApiParams = () => {
setPlatform(new NodePlatform())
return {
- apiId: parseInt(process.env.API_ID),
+ apiId: Number.parseInt(process.env.API_ID),
apiHash: process.env.API_HASH,
testMode: true,
storage: new MemoryStorage(),
diff --git a/e2e/node/config.js b/e2e/node/config.js
index af1d6e14..1f7159fc 100644
--- a/e2e/node/config.js
+++ b/e2e/node/config.js
@@ -1,17 +1,17 @@
module.exports = {
cjs: {
getFiles: () => 'tests/**/*.js',
- runFile: (file) => `mocha ${file}`,
+ runFile: file => `mocha ${file}`,
},
esm: {
getFiles: () => 'tests/**/*.js',
- runFile: (file) => `mocha ${file}`,
+ runFile: file => `mocha ${file}`,
},
ts: {
getFiles: () => 'tests/**/*.ts',
beforeAll: () => ['tsc', 'node build-esm.cjs'],
runFile: (file) => {
- if (require('path').basename(file)[0] === '_') return null
+ if (require('node:path').basename(file)[0] === '_') return null
if (file.startsWith('tests/packaging/')) {
// packaging tests - we need to make sure everything imports and works
diff --git a/e2e/node/esm/package.json b/e2e/node/esm/package.json
index 7c34deb5..5ffd9800 100644
--- a/e2e/node/esm/package.json
+++ b/e2e/node/esm/package.json
@@ -1 +1 @@
-{"type":"module"}
\ No newline at end of file
+{ "type": "module" }
diff --git a/e2e/node/esm/tests/base-client.js b/e2e/node/esm/tests/base-client.js
index 818b5c97..855ddf90 100644
--- a/e2e/node/esm/tests/base-client.js
+++ b/e2e/node/esm/tests/base-client.js
@@ -1,6 +1,5 @@
import { expect } from 'chai'
import { describe, it } from 'mocha'
-
import { BaseTelegramClient } from '@mtcute/core/client.js'
import { getApiParams } from '../utils.js'
diff --git a/e2e/node/esm/tests/tl-runtime.js b/e2e/node/esm/tests/tl-runtime.js
index d5a4d3d8..43ce673a 100644
--- a/e2e/node/esm/tests/tl-runtime.js
+++ b/e2e/node/esm/tests/tl-runtime.js
@@ -1,7 +1,6 @@
import { expect } from 'chai'
import Long from 'long'
import { describe, it } from 'mocha'
-
import { NodePlatform } from '@mtcute/node'
import { TlBinaryReader, TlBinaryWriter, TlSerializationCounter } from '@mtcute/tl-runtime'
@@ -24,7 +23,7 @@ describe('encodings', () => {
describe('TlBinaryReader', () => {
const map = {
- '85337187': function (r) {
+ 85337187(r) {
const ret = {}
ret._ = 'mt_resPQ'
ret.nonce = r.int128()
@@ -35,8 +34,8 @@ describe('TlBinaryReader', () => {
return ret
},
}
- const data =
- '000000000000000001c8831ec97ae55140000000632416053e0549828cca27e966b301a48fece2fca5cf4d33f4a11ea877ba4aa5739073300817ed48941a08f98100000015c4b51c01000000216be86c022bb4c3'
+ const data
+ = '000000000000000001c8831ec97ae55140000000632416053e0549828cca27e966b301a48fece2fca5cf4d33f4a11ea877ba4aa5739073300817ed48941a08f98100000015c4b51c01000000216be86c022bb4c3'
it('should work with Buffers', () => {
const buf = Buffer.from(data, 'hex')
@@ -64,7 +63,7 @@ describe('TlBinaryReader', () => {
describe('TlBinaryWriter', () => {
const map = {
- mt_resPQ: function (w, obj) {
+ mt_resPQ(w, obj) {
w.uint(85337187)
w.bytes(obj.pq)
w.vector(w.long, obj.serverPublicKeyFingerprints)
diff --git a/e2e/node/esm/tests/tl-schema.js b/e2e/node/esm/tests/tl-schema.js
index ba4aab19..f83799f4 100644
--- a/e2e/node/esm/tests/tl-schema.js
+++ b/e2e/node/esm/tests/tl-schema.js
@@ -1,7 +1,6 @@
import { expect } from 'chai'
import Long from 'long'
import { describe, it } from 'mocha'
-
import { NodePlatform } from '@mtcute/node'
import { tl } from '@mtcute/tl'
import { __tlReaderMap } from '@mtcute/tl/binary/reader.js'
@@ -35,6 +34,6 @@ describe('@mtcute/tl', () => {
})
it('correctly checks for combinator types', () => {
- expect(tl.isAnyInputUser({ _: 'inputUserEmpty' })).to.be.true
+ expect(tl.isAnyInputUser({ _: 'inputUserEmpty' })).to.eq(true)
})
})
diff --git a/e2e/node/esm/tests/wasm.js b/e2e/node/esm/tests/wasm.js
index 27291ffa..1de0b398 100644
--- a/e2e/node/esm/tests/wasm.js
+++ b/e2e/node/esm/tests/wasm.js
@@ -1,6 +1,5 @@
import { expect } from 'chai'
import { before, describe, it } from 'mocha'
-
import { NodeCryptoProvider } from '@mtcute/node/utils.js'
import { ige256Decrypt, ige256Encrypt } from '@mtcute/wasm'
diff --git a/e2e/node/esm/utils.js b/e2e/node/esm/utils.js
index 938b6c7d..3b2b9aeb 100644
--- a/e2e/node/esm/utils.js
+++ b/e2e/node/esm/utils.js
@@ -4,7 +4,7 @@ import { LogManager } from '@mtcute/core/utils.js'
import { NodePlatform, TcpTransport } from '@mtcute/node'
import { NodeCryptoProvider } from '@mtcute/node/utils.js'
-export const getApiParams = () => {
+export function getApiParams() {
if (!process.env.API_ID || !process.env.API_HASH) {
throw new Error('API_ID and API_HASH env variables must be set')
}
@@ -12,7 +12,7 @@ export const getApiParams = () => {
setPlatform(new NodePlatform())
return {
- apiId: parseInt(process.env.API_ID),
+ apiId: Number.parseInt(process.env.API_ID),
apiHash: process.env.API_HASH,
testMode: true,
storage: new MemoryStorage(),
diff --git a/e2e/node/package.json b/e2e/node/package.json
index a94bfe9f..dd273173 100644
--- a/e2e/node/package.json
+++ b/e2e/node/package.json
@@ -1,35 +1,35 @@
{
- "name": "mtcute-e2e",
- "private": true,
- "dependencies": {
- "@mtcute/bun": "*",
- "@mtcute/core": "*",
- "@mtcute/crypto-node": "*",
- "@mtcute/dispatcher": "*",
- "@mtcute/file-id": "*",
- "@mtcute/html-parser": "*",
- "@mtcute/http-proxy": "*",
- "@mtcute/i18n": "*",
- "@mtcute/markdown-parser": "*",
- "@mtcute/mtproxy": "*",
- "@mtcute/node": "*",
- "@mtcute/socks-proxy": "*",
- "@mtcute/tl": "*",
- "@mtcute/tl-runtime": "*",
- "@mtcute/tl-utils": "*",
- "@mtcute/wasm": "*",
- "@mtcute/web": "*",
- "@types/chai": "^4.3.8",
- "@types/mocha": "^10.0.2",
- "chai": "^4.3.10",
- "dotenv": "16.3.1",
- "glob": "10.3.10",
- "long": "^5.2.3",
- "mocha": "^10.2.0",
- "ts-node": "^10.9.1",
- "typescript": "^5.2.2"
- },
- "devDependencies": {
- "@types/node": "^20.8.10"
- }
-}
\ No newline at end of file
+ "name": "mtcute-e2e",
+ "private": true,
+ "dependencies": {
+ "@mtcute/bun": "*",
+ "@mtcute/core": "*",
+ "@mtcute/crypto-node": "*",
+ "@mtcute/dispatcher": "*",
+ "@mtcute/file-id": "*",
+ "@mtcute/html-parser": "*",
+ "@mtcute/http-proxy": "*",
+ "@mtcute/i18n": "*",
+ "@mtcute/markdown-parser": "*",
+ "@mtcute/mtproxy": "*",
+ "@mtcute/node": "*",
+ "@mtcute/socks-proxy": "*",
+ "@mtcute/tl": "*",
+ "@mtcute/tl-runtime": "*",
+ "@mtcute/tl-utils": "*",
+ "@mtcute/wasm": "*",
+ "@mtcute/web": "*",
+ "@types/chai": "^4.3.8",
+ "@types/mocha": "^10.0.2",
+ "chai": "^4.3.10",
+ "dotenv": "16.3.1",
+ "glob": "10.3.10",
+ "long": "^5.2.3",
+ "mocha": "^10.2.0",
+ "ts-node": "^10.9.1",
+ "typescript": "^5.2.2"
+ },
+ "devDependencies": {
+ "@types/node": "^20.8.10"
+ }
+}
diff --git a/e2e/node/publish-canary.js b/e2e/node/publish-canary.js
index 59ca7257..9ed9273b 100644
--- a/e2e/node/publish-canary.js
+++ b/e2e/node/publish-canary.js
@@ -2,9 +2,9 @@
// at this point, we should have all our packages installed in node_modules
// so it should be safe to just cd into them and run `npm publish` on them
-const fs = require('fs')
-const path = require('path')
-const { execSync } = require('child_process')
+const fs = require('node:fs')
+const path = require('node:path')
+const { execSync } = require('node:child_process')
// setup tokenw
const { NPM_TOKEN, REGISTRY, CURRENT_COMMIT } = process.env
@@ -19,8 +19,8 @@ const commit = CURRENT_COMMIT.slice(0, 7)
const myPkgJson = JSON.parse(fs.readFileSync(path.join(__dirname, 'package.json'), 'utf8'))
const packages = Object.keys(myPkgJson.dependencies)
- .filter((x) => x.startsWith('@mtcute/'))
- .map((x) => x.slice('@mtcute/'.length))
+ .filter(x => x.startsWith('@mtcute/'))
+ .map(x => x.slice('@mtcute/'.length))
const workDir = path.join(__dirname, 'temp')
fs.mkdirSync(workDir, { recursive: true })
@@ -41,7 +41,7 @@ async function main() {
// prepare working directory
for (const pkg of packages) {
- const data = await fetch(`http://localhost:4873/@mtcute/${pkg}`).then((x) => x.json())
+ const data = await fetch(`http://localhost:4873/@mtcute/${pkg}`).then(x => x.json())
const version = data['dist-tags'].latest
const tarball = data.versions[version].dist.tarball
diff --git a/e2e/node/runner.js b/e2e/node/runner.js
index dd591f8f..95c9ad27 100644
--- a/e2e/node/runner.js
+++ b/e2e/node/runner.js
@@ -1,7 +1,8 @@
/* eslint-disable no-console */
+const cp = require('node:child_process')
+const path = require('node:path')
+
const glob = require('glob')
-const cp = require('child_process')
-const path = require('path')
const env = {}
require('dotenv').config({ processEnv: env })
@@ -44,7 +45,7 @@ function runForFile(dir, file, single = true) {
for (const c of cmds) {
console.log('%s $ %s', dir, c)
- cp.execSync('pnpm exec ' + c, options)
+ cp.execSync(`pnpm exec ${c}`, options)
}
}
@@ -69,7 +70,7 @@ function runForDir(dir) {
if (beforeAll) {
for (const c of beforeAll()) {
console.log('%s $ %s', dir, c)
- cp.execSync('pnpm exec ' + c, options)
+ cp.execSync(`pnpm exec ${c}`, options)
}
}
@@ -116,7 +117,7 @@ async function main() {
if (file) {
const files = glob.sync(config[dir].getFiles(), { cwd: path.join(__dirname, dir) })
- const matchingFile = files.find((f) => f.endsWith(file))
+ const matchingFile = files.find(f => f.endsWith(file))
if (!matchingFile) {
console.log("Can't find file %s", file)
diff --git a/e2e/node/ts/build-esm.cjs b/e2e/node/ts/build-esm.cjs
index 64d189ef..4835ead5 100644
--- a/e2e/node/ts/build-esm.cjs
+++ b/e2e/node/ts/build-esm.cjs
@@ -1,6 +1,7 @@
-const fs = require('fs')
-const path = require('path')
-const cp = require('child_process')
+const fs = require('node:fs')
+const path = require('node:path')
+const cp = require('node:child_process')
+
const glob = require('glob')
function fixForEsm() {
diff --git a/e2e/node/ts/mocha.esm.json b/e2e/node/ts/mocha.esm.json
index 95448eb3..72a03424 100644
--- a/e2e/node/ts/mocha.esm.json
+++ b/e2e/node/ts/mocha.esm.json
@@ -1,3 +1,3 @@
{
- "node-option": ["experimental-specifier-resolution=node", "loader=ts-node/esm"]
+ "node-option": ["experimental-specifier-resolution=node", "loader=ts-node/esm"]
}
diff --git a/e2e/node/ts/package.json b/e2e/node/ts/package.json
index 0292b995..a3c15a7a 100644
--- a/e2e/node/ts/package.json
+++ b/e2e/node/ts/package.json
@@ -1 +1 @@
-{"type":"commonjs"}
\ No newline at end of file
+{ "type": "commonjs" }
diff --git a/e2e/node/ts/run-esm.cjs b/e2e/node/ts/run-esm.cjs
index c00361e1..1ef05b1c 100644
--- a/e2e/node/ts/run-esm.cjs
+++ b/e2e/node/ts/run-esm.cjs
@@ -1,4 +1,4 @@
-const cp = require('child_process')
+const cp = require('node:child_process')
const { fixForEsm } = require('./build-esm.cjs')
diff --git a/e2e/node/ts/tests/01.auth.ts b/e2e/node/ts/tests/01.auth.ts
index aef3419f..386fc9d0 100644
--- a/e2e/node/ts/tests/01.auth.ts
+++ b/e2e/node/ts/tests/01.auth.ts
@@ -1,15 +1,15 @@
import { expect } from 'chai'
import { describe, it } from 'mocha'
-
-import { tl, User } from '@mtcute/core'
+import { User, tl } from '@mtcute/core'
import { BaseTelegramClient, TelegramClient } from '@mtcute/core/client.js'
import { getApiParams } from '../utils.js'
-const getAccountId = () =>
- Math.floor(Math.random() * 10000)
+function getAccountId() {
+ return Math.floor(Math.random() * 10000)
.toString()
.padStart(4, '0')
+}
async function authorizeInDc(dc: number, base: BaseTelegramClient) {
const tg = new TelegramClient({ client: base })
@@ -61,7 +61,7 @@ async function authorizeInDc(dc: number, base: BaseTelegramClient) {
await tg.close()
- expect(user.isSelf).to.be.true
+ expect(user.isSelf).to.eq(true)
expect(user.phoneNumber).to.equal(phone)
break
}
diff --git a/e2e/node/ts/tests/02.methods.ts b/e2e/node/ts/tests/02.methods.ts
index 1ad7ec03..5f5ef74c 100644
--- a/e2e/node/ts/tests/02.methods.ts
+++ b/e2e/node/ts/tests/02.methods.ts
@@ -1,6 +1,5 @@
import { expect } from 'chai'
import { describe, it } from 'mocha'
-
import { MtPeerNotFoundError } from '@mtcute/core'
import { TelegramClient } from '@mtcute/core/client.js'
@@ -16,14 +15,14 @@ describe('2. calling methods', function () {
it('getUsers(@BotFather)', async () => {
const [user] = await tg.getUsers('botfather')
- expect(user?.isBot).to.be.true
+ expect(user?.isBot).to.eq(true)
expect(user?.displayName).to.equal('BotFather')
})
it('getUsers(@BotFather) - cached', async () => {
const [user] = await tg.getUsers('botfather')
- expect(user?.isBot).to.be.true
+ expect(user?.isBot).to.eq(true)
expect(user?.displayName).to.equal('BotFather')
})
@@ -53,7 +52,7 @@ describe('2. calling methods', function () {
const res = await tg.updateProfile({ bio })
const newSelf = await tg.getFullChat('self')
- expect(res.isSelf).to.be.true
+ expect(res.isSelf).to.eq(true)
expect(oldSelf.bio).to.not.equal(newSelf.bio)
expect(newSelf.bio).to.equal(bio)
})
diff --git a/e2e/node/ts/tests/03.files.ts b/e2e/node/ts/tests/03.files.ts
index bbfc00b5..84df8bd6 100644
--- a/e2e/node/ts/tests/03.files.ts
+++ b/e2e/node/ts/tests/03.files.ts
@@ -1,9 +1,9 @@
-/* eslint-disable no-restricted-imports */
-import { expect } from 'chai'
-import { createHash } from 'crypto'
-import { describe, it } from 'mocha'
+import { createHash } from 'node:crypto'
-import { FileDownloadLocation, Thumbnail } from '@mtcute/core'
+import { expect } from 'chai'
+import { describe, it } from 'mocha'
+import type { FileDownloadLocation } from '@mtcute/core'
+import { Thumbnail } from '@mtcute/core'
import { TelegramClient } from '@mtcute/core/client.js'
import { sleep } from '@mtcute/core/utils.js'
diff --git a/e2e/node/ts/tests/04.updates.ts b/e2e/node/ts/tests/04.updates.ts
index a6349b34..7bd50023 100644
--- a/e2e/node/ts/tests/04.updates.ts
+++ b/e2e/node/ts/tests/04.updates.ts
@@ -1,12 +1,11 @@
import { expect } from 'chai'
import { describe, it } from 'mocha'
-
-import { Message } from '@mtcute/core'
+import type { Message } from '@mtcute/core'
import { TelegramClient } from '@mtcute/core/client.js'
import { getApiParams, waitFor } from '../utils.js'
-describe('4. handling updates', async function () {
+describe('4. handling updates', function () {
this.timeout(300_000)
const tg1 = new TelegramClient(getApiParams('dc1.session'))
@@ -27,7 +26,7 @@ describe('4. handling updates', async function () {
it('should send and receive messages', async () => {
const tg1Messages: Message[] = []
- tg1.on('new_message', (msg) => tg1Messages.push(msg))
+ tg1.on('new_message', msg => tg1Messages.push(msg))
const [tg1User] = await tg1.getUsers('self')
let username = tg1User!.username
@@ -44,7 +43,8 @@ describe('4. handling updates', async function () {
expect(sentMsg.chat.id).to.equal(tg1User!.id)
await waitFor(() => {
- expect(tg1Messages.find((msg) => msg.text === messageText)).to.exist
+ // eslint-disable-next-line ts/no-unused-expressions
+ expect(tg1Messages.find(msg => msg.text === messageText)).to.exist
})
})
})
diff --git a/e2e/node/ts/tests/05.worker.ts b/e2e/node/ts/tests/05.worker.ts
index b00cd4f8..bdb3d91c 100644
--- a/e2e/node/ts/tests/05.worker.ts
+++ b/e2e/node/ts/tests/05.worker.ts
@@ -1,16 +1,17 @@
-/* eslint-disable no-restricted-imports */
+import path from 'node:path'
+import { Worker } from 'node:worker_threads'
+
import { expect } from 'chai'
import { describe, it } from 'mocha'
-import path from 'path'
-import { Worker } from 'worker_threads'
-
import { TelegramClient } from '@mtcute/core/client.js'
-import { Long, Message, TelegramWorkerPort, tl } from '@mtcute/node'
+import type { Message } from '@mtcute/node'
+import { Long, TelegramWorkerPort, tl } from '@mtcute/node'
import { getApiParams, waitFor } from '../utils.js'
+
import type { CustomMethods } from './_worker.js'
-describe('5. worker', async function () {
+describe('5. worker', function () {
this.timeout(300_000)
const worker = new Worker(path.resolve(__dirname, '_worker.js'))
@@ -20,7 +21,7 @@ describe('5. worker', async function () {
})
const portClient = new TelegramClient({ client: port })
- it('should make api calls', async function () {
+ it('should make api calls', async () => {
const res = await port.call({ _: 'help.getConfig' })
expect(res._).to.equal('config')
@@ -29,7 +30,7 @@ describe('5. worker', async function () {
expect(Long.isLong((premiumPromo.users[0] as tl.RawUser).accessHash)).to.equal(true)
})
- it('should call custom methods', async function () {
+ it('should call custom methods', async () => {
const hello = await port.invokeCustom('hello')
expect(hello).to.equal('world')
@@ -37,7 +38,7 @@ describe('5. worker', async function () {
expect(sum).to.equal(5)
})
- it('should throw errors', async function () {
+ it('should throw errors', async () => {
try {
await port.call({ _: 'test.useConfigSimple' })
throw new Error('should have thrown')
@@ -46,7 +47,7 @@ describe('5. worker', async function () {
}
})
- it('should receive updates', async function () {
+ it('should receive updates', async () => {
const client2 = new TelegramClient(getApiParams('dc2.session'))
try {
@@ -86,6 +87,6 @@ describe('5. worker', async function () {
this.afterAll(async () => {
await port.close()
- worker.terminate()
+ void worker.terminate()
})
})
diff --git a/e2e/node/ts/tests/_worker.ts b/e2e/node/ts/tests/_worker.ts
index 7b0f43f1..03ea259d 100644
--- a/e2e/node/ts/tests/_worker.ts
+++ b/e2e/node/ts/tests/_worker.ts
@@ -1,4 +1,4 @@
-import { WorkerCustomMethods } from '@mtcute/core/worker.js'
+import type { WorkerCustomMethods } from '@mtcute/core/worker.js'
import { BaseTelegramClient, TelegramWorker } from '@mtcute/node'
import { getApiParams } from '../utils.js'
diff --git a/e2e/node/ts/tests/packaging/base-client.ts b/e2e/node/ts/tests/packaging/base-client.ts
index 665cbcef..a6d300f1 100644
--- a/e2e/node/ts/tests/packaging/base-client.ts
+++ b/e2e/node/ts/tests/packaging/base-client.ts
@@ -1,6 +1,5 @@
import { expect } from 'chai'
import { describe, it } from 'mocha'
-
import { BaseTelegramClient } from '@mtcute/core/client.js'
// @fix-import
diff --git a/e2e/node/ts/tests/packaging/tl-schema.ts b/e2e/node/ts/tests/packaging/tl-schema.ts
index 241fe134..7c346140 100644
--- a/e2e/node/ts/tests/packaging/tl-schema.ts
+++ b/e2e/node/ts/tests/packaging/tl-schema.ts
@@ -1,7 +1,6 @@
import { expect } from 'chai'
import Long from 'long'
import { describe, it } from 'mocha'
-
import { setPlatform } from '@mtcute/core/platform.js'
import { NodePlatform } from '@mtcute/node'
import { tl } from '@mtcute/tl'
@@ -39,6 +38,6 @@ describe('@mtcute/tl', () => {
})
it('correctly checks for combinator types', () => {
- expect(tl.isAnyInputUser({ _: 'inputUserEmpty' })).to.be.true
+ expect(tl.isAnyInputUser({ _: 'inputUserEmpty' })).to.eq(true)
})
})
diff --git a/e2e/node/ts/tests/packaging/wasm.ts b/e2e/node/ts/tests/packaging/wasm.ts
index 27291ffa..1de0b398 100644
--- a/e2e/node/ts/tests/packaging/wasm.ts
+++ b/e2e/node/ts/tests/packaging/wasm.ts
@@ -1,6 +1,5 @@
import { expect } from 'chai'
import { before, describe, it } from 'mocha'
-
import { NodeCryptoProvider } from '@mtcute/node/utils.js'
import { ige256Decrypt, ige256Encrypt } from '@mtcute/wasm'
diff --git a/e2e/node/ts/tsconfig.json b/e2e/node/ts/tsconfig.json
index deed9d5a..2cbc7b39 100644
--- a/e2e/node/ts/tsconfig.json
+++ b/e2e/node/ts/tsconfig.json
@@ -1,28 +1,28 @@
{
- "compilerOptions": {
- "outDir": "./dist",
- "module": "NodeNext",
- "moduleResolution": "NodeNext",
- "target": "es2020",
- "allowJs": true,
- "sourceMap": true,
- "inlineSources": true,
- "declaration": true,
- "esModuleInterop": true,
- "allowSyntheticDefaultImports": true,
- "strict": true,
- "noImplicitAny": true,
- "noImplicitThis": true,
- "incremental": true,
- "stripInternal": true,
- "skipLibCheck": true,
- "rootDir": "."
- },
- "exclude": [
- "**/node_modules",
- ],
- "include": [
- "./tests",
- "./utils.ts"
- ]
+ "compilerOptions": {
+ "incremental": true,
+ "target": "es2020",
+ "rootDir": ".",
+ "module": "NodeNext",
+ "moduleResolution": "NodeNext",
+ "allowJs": true,
+ "strict": true,
+ "noImplicitAny": true,
+ "noImplicitThis": true,
+ "declaration": true,
+ "inlineSources": true,
+ "outDir": "./dist",
+ "sourceMap": true,
+ "stripInternal": true,
+ "allowSyntheticDefaultImports": true,
+ "esModuleInterop": true,
+ "skipLibCheck": true
+ },
+ "include": [
+ "./tests",
+ "./utils.ts"
+ ],
+ "exclude": [
+ "**/node_modules"
+ ]
}
diff --git a/e2e/node/ts/utils.ts b/e2e/node/ts/utils.ts
index c39fa786..35472042 100644
--- a/e2e/node/ts/utils.ts
+++ b/e2e/node/ts/utils.ts
@@ -1,13 +1,13 @@
-// eslint-disable-next-line no-restricted-imports
-import { join } from 'path'
+import { join } from 'node:path'
-import { MaybePromise, MemoryStorage } from '@mtcute/core'
+import type { MaybePromise } from '@mtcute/core'
+import { MemoryStorage } from '@mtcute/core'
import { setPlatform } from '@mtcute/core/platform.js'
import { LogManager, sleep } from '@mtcute/core/utils.js'
import { NodePlatform, SqliteStorage, TcpTransport } from '@mtcute/node'
import { NodeCryptoProvider } from '@mtcute/node/utils.js'
-export const getApiParams = (storage?: string) => {
+export function getApiParams(storage?: string) {
if (!process.env.API_ID || !process.env.API_HASH) {
throw new Error('API_ID and API_HASH env variables must be set')
}
@@ -15,7 +15,7 @@ export const getApiParams = (storage?: string) => {
setPlatform(new NodePlatform())
return {
- apiId: parseInt(process.env.API_ID),
+ apiId: Number.parseInt(process.env.API_ID),
apiHash: process.env.API_HASH,
testMode: true,
storage: storage ? new SqliteStorage(join(__dirname, storage)) : new MemoryStorage(),
diff --git a/eslint.config.js b/eslint.config.js
new file mode 100644
index 00000000..38298990
--- /dev/null
+++ b/eslint.config.js
@@ -0,0 +1,120 @@
+import antfu from '@antfu/eslint-config'
+
+export default antfu({
+ type: 'lib',
+ typescript: process.env.CI
+ ? {
+ tsconfigPath: 'tsconfig.json',
+ ignoresTypeAware: [
+ '.config/**/*',
+ 'e2e/**',
+ ],
+ overrides: {
+ 'ts/consistent-type-imports': 'off',
+ },
+ }
+ : true,
+ yaml: false,
+ markdown: false,
+ linterOptions: {
+ reportUnusedDisableDirectives: Boolean(process.env.CI),
+ },
+ rules: {
+ 'style/indent': ['error', 4, {
+ offsetTernaryExpressions: false,
+ // the rest is from default config: https://github.com/eslint-stylistic/eslint-stylistic/blob/main/packages/eslint-plugin/configs/customize.ts
+ ArrayExpression: 1,
+ CallExpression: { arguments: 1 },
+ flatTernaryExpressions: false,
+ FunctionDeclaration: { body: 1, parameters: 1 },
+ FunctionExpression: { body: 1, parameters: 1 },
+ ignoreComments: false,
+ ignoredNodes: [
+ 'TemplateLiteral *',
+ 'TSUnionType',
+ 'TSIntersectionType',
+ 'TSTypeParameterInstantiation',
+ 'FunctionExpression > .params[decorators.length > 0]',
+ 'FunctionExpression > .params > :matches(Decorator, :not(:first-child))',
+ ],
+ ImportDeclaration: 1,
+ MemberExpression: 1,
+ ObjectExpression: 1,
+ outerIIFEBody: 1,
+ SwitchCase: 1,
+ VariableDeclarator: 1,
+ }],
+ 'curly': ['error', 'multi-line'],
+ 'style/brace-style': ['error', '1tbs', { allowSingleLine: true }],
+ 'node/prefer-global/process': ['error', 'always'],
+ 'node/prefer-global/buffer': ['error', 'always'],
+ 'no-restricted-globals': ['error', 'Buffer', '__dirname', 'require'],
+ 'style/quotes': ['error', 'single', { avoidEscape: true }],
+ 'test/consistent-test-it': 'off',
+ 'test/prefer-lowercase-title': 'off',
+ 'test/no-identical-title': 'off',
+ 'import/order': ['error', { 'newlines-between': 'always' }],
+ 'antfu/if-newline': 'off',
+ 'import/no-relative-packages': 'error',
+ 'style/max-statements-per-line': ['error', { max: 2 }],
+ 'ts/no-redeclare': 'off',
+ 'eslint-comments/no-unlimited-disable': 'off',
+ 'no-cond-assign': 'off',
+ 'ts/explicit-function-return-type': 'off', // todo: enable once we move to isolatedDeclarations
+ 'no-labels': 'off',
+ 'no-restricted-syntax': 'off',
+ 'unicorn/no-new-array': 'off',
+ 'jsdoc/check-param-names': 'off', // todo: will fix in another iteration
+ 'jsdoc/require-returns-description': 'off', // todo: will fix in another iteration
+ 'ts/no-unsafe-member-access': 'off',
+ 'ts/no-dynamic-delete': 'off',
+ 'ts/strict-boolean-expressions': 'off',
+ 'ts/unbound-method': 'off',
+ 'ts/no-invalid-void-type': 'off',
+ 'ts/no-unsafe-enum-comparison': 'off',
+ 'ts/promise-function-async': 'off',
+ 'dot-notation': 'off',
+ 'ts/dot-notation': 'off',
+ 'ts/switch-exhaustiveness-check': 'off',
+ 'ts/restrict-template-expressions': 'off',
+ 'ts/method-signature-style': 'off',
+ },
+}, {
+ ignores: [
+ // codegen
+ 'packages/tl/binary/rsa-keys.js',
+ 'packages/tl/binary/reader.js',
+ 'packages/tl/binary/writer.js',
+ 'packages/tl/index.js',
+ 'packages/tl/index.d.ts',
+ 'packages/tl/*.json',
+ 'packages/core/utils.ts',
+ 'e2e/deno/.jsr-data',
+ 'e2e/node/.verdaccio',
+ ],
+}, {
+ files: ['e2e/**', 'packages/node/**', 'packages/bun/**'],
+ rules: {
+ 'no-restricted-globals': 'off',
+ },
+}, {
+ files: ['packages/bun/**', 'packages/deno/**'],
+ rules: {
+ 'no-restricted-imports': 'off',
+ 'import/no-relative-packages': 'off', // common-internals is symlinked from node
+ },
+}, {
+ files: ['**/scripts/**', '**/*.cjs'],
+ rules: {
+ 'no-restricted-imports': 'off',
+ 'no-restricted-globals': 'off',
+ 'no-console': 'off',
+ },
+}, {
+ files: ['packages/create-*/**', 'packages/deno/**'],
+ rules: {
+ 'node/prefer-global/process': ['error', 'never'],
+ 'node/prefer-global/buffer': ['error', 'never'],
+ 'no-console': 'off',
+ },
+})
diff --git a/package.json b/package.json
index 3d57ca76..83a9130f 100644
--- a/package.json
+++ b/package.json
@@ -1,84 +1,76 @@
{
- "name": "mtcute-workspace",
- "private": true,
- "version": "0.16.6",
- "description": "Type-safe library for MTProto (Telegram API) for browser and NodeJS",
- "license": "MIT",
- "author": "alina sireneva ",
- "type": "module",
- "keywords": [
- "telegram",
- "telegram-api",
- "telegram-bot",
- "telegram-library",
- "mtproto",
- "tgbot",
- "userbot",
- "api"
- ],
- "repository": {
- "type": "git",
- "url": "https://github.com/mtcute/mtcute"
- },
- "homepage": "https://mtcute.dev",
- "workspaces": [
- "packages/*"
- ],
- "scripts": {
- "postinstall": "node scripts/validate-deps-versions.js && node scripts/remove-jsr-sourcefiles.js",
- "test": "pnpm run -r test && vitest --config .config/vite.ts run",
- "test:dev": "vitest --config .config/vite.ts watch",
- "test:ui": "vitest --config .config/vite.ts --ui",
- "test:coverage": "vitest --config .config/vite.ts run --coverage",
- "test:ci": "vitest --config .config/vite.ts run --coverage.enabled --coverage.reporter=json",
- "test:browser": "vitest --config .config/vite.browser.ts run",
- "test:browser:dev": "vitest --config .config/vite.browser.ts watch",
- "lint": "eslint .",
- "lint:ci": "NODE_OPTIONS=\\\"--max_old_space_size=8192\\\" eslint --config .config/eslint.ci.cjs .",
- "lint:tsc": "rimraf packages/**/dist packages/**/*.tsbuildinfo && pnpm -r --workspace-concurrency=4 exec tsc --build",
- "lint:tsc:ci": "pnpm -r exec tsc --build",
- "lint:dpdm": "dpdm -T --no-warning --no-tree --exit-code circular:1 packages/*",
- "lint:fix": "eslint --fix .",
- "publish-all": "node scripts/publish.js all",
- "docs": "typedoc --options .config/typedoc/config.cjs",
- "build-package": "node scripts/build-package.js"
- },
- "devDependencies": {
- "@teidesu/slow-types-compiler": "1.1.0",
- "@types/node": "20.10.0",
- "@types/deno": "npm:@teidesu/deno-types@1.43.1",
- "@types/ws": "8.5.4",
- "@typescript-eslint/eslint-plugin": "6.4.0",
- "@typescript-eslint/parser": "6.4.0",
- "@vitest/browser": "2.0.5",
- "@vitest/coverage-v8": "2.0.5",
- "@vitest/expect": "2.0.5",
- "@vitest/spy": "2.0.5",
- "@vitest/ui": "2.0.5",
- "chai": "5.1.0",
- "cjs-module-lexer": "1.2.3",
- "dotenv-flow": "4.1.0",
- "dpdm": "3.14.0",
- "esbuild": "0.23.0",
- "eslint": "8.47.0",
- "eslint-import-resolver-typescript": "3.6.0",
- "eslint-plugin-ascii": "1.0.0",
- "eslint-plugin-import": "2.28.0",
- "eslint-plugin-simple-import-sort": "10.0.0",
- "glob": "11.0.0",
- "playwright": "1.42.1",
- "rimraf": "6.0.1",
- "semver": "7.5.1",
- "ts-node": "10.9.1",
- "tsconfig-paths": "4.2.0",
- "typedoc": "0.26.5",
- "typescript": "5.4.3",
- "vite": "5.1.6",
- "vite-plugin-node-polyfills": "0.22.0",
- "vitest": "2.0.5"
- },
- "packageManager": "pnpm@9.0.6",
- "eslintConfig": {
- "extends": "./.config/eslint.cjs"
- }
+ "name": "mtcute-workspace",
+ "type": "module",
+ "version": "0.16.6",
+ "private": true,
+ "packageManager": "pnpm@9.0.6",
+ "description": "Type-safe library for MTProto (Telegram API) for browser and NodeJS",
+ "author": "alina sireneva ",
+ "license": "MIT",
+ "homepage": "https://mtcute.dev",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/mtcute/mtcute"
+ },
+ "keywords": [
+ "telegram",
+ "telegram-api",
+ "telegram-bot",
+ "telegram-library",
+ "mtproto",
+ "tgbot",
+ "userbot",
+ "api"
+ ],
+ "workspaces": [
+ "packages/*"
+ ],
+ "scripts": {
+ "postinstall": "node scripts/validate-deps-versions.js && node scripts/remove-jsr-sourcefiles.js",
+ "test": "pnpm run -r test && vitest --config .config/vite.ts run",
+ "test:dev": "vitest --config .config/vite.ts watch",
+ "test:ui": "vitest --config .config/vite.ts --ui",
+ "test:coverage": "vitest --config .config/vite.ts run --coverage",
+ "test:ci": "vitest --config .config/vite.ts run --coverage.enabled --coverage.reporter=json",
+ "test:browser": "vitest --config .config/vite.browser.ts run",
+ "test:browser:dev": "vitest --config .config/vite.browser.ts watch",
+ "lint": "eslint",
+ "lint:ci": "CI=1 NODE_OPTIONS=\\\"--max_old_space_size=8192\\\" eslint",
+ "lint:tsc": "rimraf packages/**/dist packages/**/*.tsbuildinfo && pnpm -r --workspace-concurrency=4 exec tsc --build",
+ "lint:tsc:ci": "pnpm -r exec tsc --build",
+ "lint:dpdm": "dpdm -T --no-warning --no-tree --exit-code circular:1 packages/*",
+ "lint:fix": "eslint --fix .",
+ "publish-all": "node scripts/publish.js all",
+ "docs": "typedoc --options .config/typedoc/config.cjs",
+ "build-package": "node scripts/build-package.js"
+ },
+ "devDependencies": {
+ "@antfu/eslint-config": "2.26.0",
+ "@teidesu/slow-types-compiler": "1.1.0",
+ "@types/deno": "npm:@teidesu/deno-types@1.43.1",
+ "@types/node": "20.10.0",
+ "@types/ws": "8.5.4",
+ "@vitest/browser": "2.0.5",
+ "@vitest/coverage-v8": "2.0.5",
+ "@vitest/expect": "2.0.5",
+ "@vitest/spy": "2.0.5",
+ "@vitest/ui": "2.0.5",
+ "chai": "5.1.0",
+ "cjs-module-lexer": "1.2.3",
+ "dotenv-flow": "4.1.0",
+ "dpdm": "3.14.0",
+ "esbuild": "0.23.0",
+ "eslint": "9.9.0",
+ "glob": "11.0.0",
+ "playwright": "1.42.1",
+ "rimraf": "6.0.1",
+ "semver": "7.5.1",
+ "ts-node": "10.9.1",
+ "tsconfig-paths": "4.2.0",
+ "typedoc": "0.26.5",
+ "typescript": "5.5.4",
+ "vite": "5.1.6",
+ "vite-plugin-node-polyfills": "0.22.0",
+ "vitest": "2.0.5"
+ }
}
diff --git a/packages/bun/package.json b/packages/bun/package.json
index af2a7a8f..f98784a0 100644
--- a/packages/bun/package.json
+++ b/packages/bun/package.json
@@ -1,29 +1,29 @@
{
- "name": "@mtcute/bun",
- "private": true,
- "version": "0.16.6",
- "description": "Meta-package for Bun",
- "author": "alina sireneva ",
- "license": "MIT",
- "type": "module",
- "sideEffects": false,
- "scripts": {
- "docs": "typedoc",
- "build": "pnpm run -w build-package bun"
- },
- "exports": {
- ".": "./src/index.ts",
- "./utils.js": "./src/utils.ts",
- "./methods.js": "./src/methods.ts"
- },
- "dependencies": {
- "@mtcute/core": "workspace:^",
- "@mtcute/wasm": "workspace:^",
- "@mtcute/markdown-parser": "workspace:^",
- "@mtcute/html-parser": "workspace:^"
- },
- "devDependencies": {
- "@mtcute/test": "workspace:^",
- "bun-types": "1.0.33"
- }
+ "name": "@mtcute/bun",
+ "type": "module",
+ "version": "0.16.6",
+ "private": true,
+ "description": "Meta-package for Bun",
+ "author": "alina sireneva ",
+ "license": "MIT",
+ "sideEffects": false,
+ "exports": {
+ ".": "./src/index.ts",
+ "./utils.js": "./src/utils.ts",
+ "./methods.js": "./src/methods.ts"
+ },
+ "scripts": {
+ "docs": "typedoc",
+ "build": "pnpm run -w build-package bun"
+ },
+ "dependencies": {
+ "@mtcute/core": "workspace:^",
+ "@mtcute/html-parser": "workspace:^",
+ "@mtcute/markdown-parser": "workspace:^",
+ "@mtcute/wasm": "workspace:^"
+ },
+ "devDependencies": {
+ "@mtcute/test": "workspace:^",
+ "bun-types": "1.0.33"
+ }
}
diff --git a/packages/bun/src/client.ts b/packages/bun/src/client.ts
index 3baa53e3..97f1e85f 100644
--- a/packages/bun/src/client.ts
+++ b/packages/bun/src/client.ts
@@ -1,11 +1,14 @@
-import { createInterface, Interface as RlInterface } from 'readline'
+import type { Interface as RlInterface } from 'node:readline'
+import { createInterface } from 'node:readline'
-import { FileDownloadLocation, FileDownloadParameters, ITelegramStorageProvider, PartialOnly, User } from '@mtcute/core'
+import type { FileDownloadLocation, FileDownloadParameters, ITelegramStorageProvider, PartialOnly, User } from '@mtcute/core'
+import type {
+ BaseTelegramClientOptions as BaseTelegramClientOptionsBase,
+ TelegramClientOptions,
+} from '@mtcute/core/client.js'
import {
BaseTelegramClient as BaseTelegramClientBase,
- BaseTelegramClientOptions as BaseTelegramClientOptionsBase,
TelegramClient as TelegramClientBase,
- TelegramClientOptions,
} from '@mtcute/core/client.js'
import { setPlatform } from '@mtcute/core/platform.js'
@@ -48,9 +51,9 @@ export class BaseTelegramClient extends BaseTelegramClientBase {
transport: () => new TcpTransport(),
...opts,
storage:
- typeof opts.storage === 'string' ?
- new SqliteStorage(opts.storage) :
- opts.storage ?? new SqliteStorage('client.session'),
+ typeof opts.storage === 'string'
+ ? new SqliteStorage(opts.storage)
+ : opts.storage ?? new SqliteStorage('client.session'),
})
}
}
@@ -91,7 +94,7 @@ export class TelegramClient extends TelegramClientBase {
})
}
- return new Promise((res) => this._rl?.question(text, res))
+ return new Promise(res => this._rl?.question(text, res))
}
close(): Promise {
@@ -131,7 +134,7 @@ export class TelegramClient extends TelegramClientBase {
this.start(params)
.then(then)
- .catch((err) => this.emitError(err))
+ .catch(err => this.emitError(err))
}
downloadToFile(
diff --git a/packages/bun/src/methods/download-file.ts b/packages/bun/src/methods/download-file.ts
index f847b361..68523f16 100644
--- a/packages/bun/src/methods/download-file.ts
+++ b/packages/bun/src/methods/download-file.ts
@@ -1,6 +1,7 @@
import { unlinkSync } from 'node:fs'
-import { FileDownloadLocation, FileDownloadParameters, FileLocation, ITelegramClient } from '@mtcute/core'
+import type { FileDownloadLocation, FileDownloadParameters, ITelegramClient } from '@mtcute/core'
+import { FileLocation } from '@mtcute/core'
import { downloadAsIterable } from '@mtcute/core/methods.js'
/**
diff --git a/packages/bun/src/methods/download-node-stream.ts b/packages/bun/src/methods/download-node-stream.ts
index fa9874cd..5187640a 100644
--- a/packages/bun/src/methods/download-node-stream.ts
+++ b/packages/bun/src/methods/download-node-stream.ts
@@ -1,6 +1,6 @@
-import { Readable } from 'stream'
+import { Readable } from 'node:stream'
-import { FileDownloadLocation, FileDownloadParameters, ITelegramClient } from '@mtcute/core'
+import type { FileDownloadLocation, FileDownloadParameters, ITelegramClient } from '@mtcute/core'
import { downloadAsStream } from '@mtcute/core/methods.js'
/**
diff --git a/packages/bun/src/platform.ts b/packages/bun/src/platform.ts
index 39f8c937..60ff10ce 100644
--- a/packages/bun/src/platform.ts
+++ b/packages/bun/src/platform.ts
@@ -1,4 +1,4 @@
-import * as os from 'os'
+import * as os from 'node:os'
import { NodePlatform } from './common-internals-node/platform.js'
import { normalizeFile } from './utils/normalize-file.js'
diff --git a/packages/bun/src/sqlite/driver.ts b/packages/bun/src/sqlite/driver.ts
index 362e5f97..ed9e703f 100644
--- a/packages/bun/src/sqlite/driver.ts
+++ b/packages/bun/src/sqlite/driver.ts
@@ -1,6 +1,6 @@
import { Database } from 'bun:sqlite'
-
-import { BaseSqliteStorageDriver, ISqliteDatabase } from '@mtcute/core'
+import type { ISqliteDatabase } from '@mtcute/core'
+import { BaseSqliteStorageDriver } from '@mtcute/core'
export interface SqliteStorageDriverOptions {
/**
diff --git a/packages/bun/src/sqlite/index.ts b/packages/bun/src/sqlite/index.ts
index 882b228d..1d5374f0 100644
--- a/packages/bun/src/sqlite/index.ts
+++ b/packages/bun/src/sqlite/index.ts
@@ -1,6 +1,7 @@
import { BaseSqliteStorage } from '@mtcute/core'
-import { SqliteStorageDriver, SqliteStorageDriverOptions } from './driver.js'
+import type { SqliteStorageDriverOptions } from './driver.js'
+import { SqliteStorageDriver } from './driver.js'
export { SqliteStorageDriver } from './driver.js'
diff --git a/packages/bun/src/sqlite/sqlite.test.ts b/packages/bun/src/sqlite/sqlite.test.ts
index 6810d931..bc6504a8 100644
--- a/packages/bun/src/sqlite/sqlite.test.ts
+++ b/packages/bun/src/sqlite/sqlite.test.ts
@@ -1,5 +1,4 @@
import { afterAll, beforeAll, describe } from 'vitest'
-
import { LogManager } from '@mtcute/core/utils.js'
import {
testAuthKeysRepository,
diff --git a/packages/bun/src/utils/crypto.test.ts b/packages/bun/src/utils/crypto.test.ts
index 17292c91..5bb77b50 100644
--- a/packages/bun/src/utils/crypto.test.ts
+++ b/packages/bun/src/utils/crypto.test.ts
@@ -1,5 +1,4 @@
import { describe } from 'vitest'
-
import { testCryptoProvider } from '@mtcute/test'
if (import.meta.env.TEST_ENV === 'bun') {
diff --git a/packages/bun/src/utils/crypto.ts b/packages/bun/src/utils/crypto.ts
index 02840d3f..3d4a3904 100644
--- a/packages/bun/src/utils/crypto.ts
+++ b/packages/bun/src/utils/crypto.ts
@@ -1,7 +1,7 @@
-// eslint-disable-next-line no-restricted-imports
-import { readFile } from 'fs/promises'
+import { readFile } from 'node:fs/promises'
-import { BaseCryptoProvider, IAesCtr, ICryptoProvider, IEncryptionScheme } from '@mtcute/core/utils.js'
+import type { IAesCtr, ICryptoProvider, IEncryptionScheme } from '@mtcute/core/utils.js'
+import { BaseCryptoProvider } from '@mtcute/core/utils.js'
import {
createCtr256,
ctr256,
@@ -28,7 +28,6 @@ const ALGO_TO_SUBTLE: Record = {
export class BunCryptoProvider extends BaseCryptoProvider implements ICryptoProvider {
async initialize(): Promise {
- // eslint-disable-next-line no-restricted-globals
const wasmFile = require.resolve('@mtcute/wasm/mtcute.wasm')
const wasm = await readFile(wasmFile)
initSync(wasm)
@@ -49,7 +48,7 @@ export class BunCryptoProvider extends BaseCryptoProvider implements ICryptoProv
const ctx = createCtr256(key, iv)
return {
- process: (data) => ctr256(ctx, data),
+ process: data => ctr256(ctx, data),
close: () => freeCtr256(ctx),
}
}
@@ -74,7 +73,7 @@ export class BunCryptoProvider extends BaseCryptoProvider implements ICryptoProv
keyMaterial,
(keylen || 64) * 8,
)
- .then((result) => new Uint8Array(result))
+ .then(result => new Uint8Array(result))
}
sha1(data: Uint8Array): Uint8Array {
diff --git a/packages/bun/src/utils/normalize-file.ts b/packages/bun/src/utils/normalize-file.ts
index 49b00f75..516b4fd6 100644
--- a/packages/bun/src/utils/normalize-file.ts
+++ b/packages/bun/src/utils/normalize-file.ts
@@ -1,10 +1,10 @@
-import { BunFile } from 'bun'
-import { ReadStream } from 'fs'
-import { stat } from 'fs/promises'
-import { basename } from 'path'
-import { Readable as NodeReadable } from 'stream'
+import { ReadStream } from 'node:fs'
+import { stat } from 'node:fs/promises'
+import { basename } from 'node:path'
+import { Readable as NodeReadable } from 'node:stream'
-import { UploadFileLike } from '@mtcute/core'
+import type { BunFile } from 'bun'
+import type { UploadFileLike } from '@mtcute/core'
// https://github.com/oven-sh/bun/issues/10481
function isBunFile(file: unknown): file is BunFile {
@@ -18,7 +18,7 @@ export async function normalizeFile(file: UploadFileLike) {
if (isBunFile(file)) {
return {
- file: file,
+ file,
fileName: file.name,
fileSize: file.size,
}
@@ -27,7 +27,7 @@ export async function normalizeFile(file: UploadFileLike) {
// while these are not Bun-specific, they still may happen
if (file instanceof ReadStream) {
const fileName = basename(file.path.toString())
- const fileSize = await stat(file.path.toString()).then((stat) => stat.size)
+ const fileSize = await stat(file.path.toString()).then(stat => stat.size)
return {
file: NodeReadable.toWeb(file) as unknown as ReadableStream,
diff --git a/packages/bun/src/utils/tcp.ts b/packages/bun/src/utils/tcp.ts
index e8141d8b..d0bedf57 100644
--- a/packages/bun/src/utils/tcp.ts
+++ b/packages/bun/src/utils/tcp.ts
@@ -1,8 +1,9 @@
-import { Socket } from 'bun'
-import EventEmitter from 'events'
+import EventEmitter from 'node:events'
-import { IntermediatePacketCodec, IPacketCodec, ITelegramTransport, MtcuteError, TransportState } from '@mtcute/core'
-import { BasicDcOption, ICryptoProvider, Logger } from '@mtcute/core/utils.js'
+import type { Socket } from 'bun'
+import type { IPacketCodec, ITelegramTransport } from '@mtcute/core'
+import { IntermediatePacketCodec, MtcuteError, TransportState } from '@mtcute/core'
+import type { BasicDcOption, ICryptoProvider, Logger } from '@mtcute/core/utils.js'
/**
* Base for TCP transports.
@@ -41,7 +42,7 @@ export abstract class BaseTcpTransport extends EventEmitter implements ITelegram
return this._currentDc
}
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
+ // eslint-disable-next-line unused-imports/no-unused-vars
connect(dc: BasicDcOption, testMode: boolean): void {
if (this._state !== TransportState.Idle) {
throw new MtcuteError('Transport is not IDLE')
@@ -49,8 +50,8 @@ export abstract class BaseTcpTransport extends EventEmitter implements ITelegram
if (!this.packetCodecInitialized) {
this._packetCodec.setup?.(this._crypto, this.log)
- this._packetCodec.on('error', (err) => this.emit('error', err))
- this._packetCodec.on('packet', (buf) => this.emit('message', buf))
+ this._packetCodec.on('error', err => this.emit('error', err))
+ this._packetCodec.on('packet', buf => this.emit('message', buf))
this.packetCodecInitialized = true
}
diff --git a/packages/bun/src/worker.ts b/packages/bun/src/worker.ts
index 877db612..477e87e0 100644
--- a/packages/bun/src/worker.ts
+++ b/packages/bun/src/worker.ts
@@ -1,18 +1,20 @@
-import { parentPort, Worker } from 'worker_threads'
+import { Worker, parentPort } from 'node:worker_threads'
import { setPlatform } from '@mtcute/core/platform.js'
-import {
+import type {
ClientMessageHandler,
RespondFn,
SendFn,
SomeWorker,
- TelegramWorker as TelegramWorkerBase,
TelegramWorkerOptions,
- TelegramWorkerPort as TelegramWorkerPortBase,
TelegramWorkerPortOptions,
WorkerCustomMethods,
WorkerMessageHandler,
} from '@mtcute/core/worker.js'
+import {
+ TelegramWorker as TelegramWorkerBase,
+ TelegramWorkerPort as TelegramWorkerPortBase,
+} from '@mtcute/core/worker.js'
import { BunPlatform } from './platform.js'
@@ -35,8 +37,8 @@ export class TelegramWorker extends TelegramWorke
const respond: RespondFn = port.postMessage.bind(port)
- // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
- parentPort.on('message', (message) => handler(message, respond))
+ // eslint-disable-next-line ts/no-unsafe-argument
+ parentPort.on('message', message => handler(message, respond))
return respond
}
@@ -50,7 +52,7 @@ export class TelegramWorkerPort extends TelegramW
connectToWorker(worker: SomeWorker, handler: ClientMessageHandler): [SendFn, () => void] {
if (!(worker instanceof Worker)) {
- throw new Error('Only worker_threads are supported')
+ throw new TypeError('Only worker_threads are supported')
}
const send: SendFn = worker.postMessage.bind(worker)
diff --git a/packages/bun/tsconfig.json b/packages/bun/tsconfig.json
index 9d487df1..30689cd4 100644
--- a/packages/bun/tsconfig.json
+++ b/packages/bun/tsconfig.json
@@ -1,20 +1,20 @@
{
- "extends": "../../tsconfig.json",
- "compilerOptions": {
- "outDir": "./dist",
- "rootDir": "./src",
- "types": [
- "bun-types",
- "vite/client"
- ]
- },
- "include": [
- "./src",
+ "extends": "../../tsconfig.json",
+ "compilerOptions": {
+ "rootDir": "./src",
+ "types": [
+ "bun-types",
+ "vite/client"
],
- "references": [
- { "path": "../core" },
- { "path": "../dispatcher" },
- { "path": "../html-parser" },
- { "path": "../markdown-parser" }
- ]
+ "outDir": "./dist"
+ },
+ "references": [
+ { "path": "../core" },
+ { "path": "../dispatcher" },
+ { "path": "../html-parser" },
+ { "path": "../markdown-parser" }
+ ],
+ "include": [
+ "./src"
+ ]
}
diff --git a/packages/convert/README.md b/packages/convert/README.md
index 58360337..f9b580fd 100644
--- a/packages/convert/README.md
+++ b/packages/convert/README.md
@@ -8,7 +8,7 @@ Currently only the libraries that support exporting sessions to strings are supp
## [Telethon](https://github.com/LonamiWebs/Telethon)
-> Telethon v2 seems to have removed the ability to export sessions,
+> Telethon v2 seems to have removed the ability to export sessions,
> so it's currently not supported
```ts
diff --git a/packages/convert/package.json b/packages/convert/package.json
index 44096fea..92402ee6 100644
--- a/packages/convert/package.json
+++ b/packages/convert/package.json
@@ -1,20 +1,20 @@
{
- "name": "@mtcute/convert",
- "private": true,
- "version": "0.16.0",
- "description": "Cross-library session conversion utilities",
- "author": "alina sireneva ",
- "license": "MIT",
- "type": "module",
- "sideEffects": false,
- "scripts": {
- "build": "pnpm run -w build-package convert"
- },
- "exports": "./src/index.ts",
- "dependencies": {
- "@mtcute/core": "workspace:^"
- },
- "devDependencies": {
- "@mtcute/test": "workspace:^"
- }
+ "name": "@mtcute/convert",
+ "type": "module",
+ "version": "0.16.0",
+ "private": true,
+ "description": "Cross-library session conversion utilities",
+ "author": "alina sireneva ",
+ "license": "MIT",
+ "sideEffects": false,
+ "exports": "./src/index.ts",
+ "scripts": {
+ "build": "pnpm run -w build-package convert"
+ },
+ "dependencies": {
+ "@mtcute/core": "workspace:^"
+ },
+ "devDependencies": {
+ "@mtcute/test": "workspace:^"
+ }
}
diff --git a/packages/convert/src/dcs.ts b/packages/convert/src/dcs.ts
index a02f883b..d42afcad 100644
--- a/packages/convert/src/dcs.ts
+++ b/packages/convert/src/dcs.ts
@@ -1,4 +1,4 @@
-import { DcOptions } from '@mtcute/core/utils.js'
+import type { DcOptions } from '@mtcute/core/utils.js'
// some libraries only store the DCs in the source code, so we need to map them to the correct DCs
// this may not be very accurate, but it's better than nothing
@@ -7,7 +7,7 @@ import { DcOptions } from '@mtcute/core/utils.js'
// we'll also only map to ipv4 since that's more portable
export const DC_MAPPING_PROD: Record = {
- '1': {
+ 1: {
main: {
id: 1,
ipAddress: '149.154.175.56',
@@ -19,7 +19,7 @@ export const DC_MAPPING_PROD: Record = {
port: 443,
},
},
- '2': {
+ 2: {
main: {
id: 2,
ipAddress: '149.154.167.41',
@@ -31,7 +31,7 @@ export const DC_MAPPING_PROD: Record = {
port: 443,
},
},
- '3': {
+ 3: {
main: {
id: 3,
ipAddress: '149.154.175.100',
@@ -43,7 +43,7 @@ export const DC_MAPPING_PROD: Record = {
port: 443,
},
},
- '4': {
+ 4: {
main: {
id: 4,
ipAddress: '149.154.167.91',
@@ -55,7 +55,7 @@ export const DC_MAPPING_PROD: Record = {
port: 443,
},
},
- '5': {
+ 5: {
main: {
id: 5,
ipAddress: '91.108.56.179',
@@ -70,7 +70,7 @@ export const DC_MAPPING_PROD: Record = {
}
export const DC_MAPPING_TEST: Record = {
- '1': {
+ 1: {
main: {
id: 1,
ipAddress: '149.154.175.10',
@@ -82,7 +82,7 @@ export const DC_MAPPING_TEST: Record = {
port: 80,
},
},
- '2': {
+ 2: {
main: {
id: 2,
ipAddress: '149.154.167.40',
@@ -94,7 +94,7 @@ export const DC_MAPPING_TEST: Record = {
port: 443,
},
},
- '3': {
+ 3: {
main: {
id: 3,
ipAddress: '149.154.175.117',
@@ -109,5 +109,5 @@ export const DC_MAPPING_TEST: Record = {
}
export function isTestDc(ip: string): boolean {
- return Object.values(DC_MAPPING_TEST).some((dc) => dc.main.ipAddress === ip || dc.media.ipAddress === ip)
+ return Object.values(DC_MAPPING_TEST).some(dc => dc.main.ipAddress === ip || dc.media.ipAddress === ip)
}
diff --git a/packages/convert/src/gramjs/__fixtures__/generate.cjs b/packages/convert/src/gramjs/__fixtures__/generate.cjs
index 982fba2d..591a3c4a 100644
--- a/packages/convert/src/gramjs/__fixtures__/generate.cjs
+++ b/packages/convert/src/gramjs/__fixtures__/generate.cjs
@@ -1,6 +1,5 @@
-/* eslint-disable no-console */
-const { execSync } = require('child_process')
-const fs = require('fs')
+const { execSync } = require('node:child_process')
+const fs = require('node:fs')
const VERSION = '2.19.20'
const TMP_DIR = '/tmp/gramjs'
@@ -36,6 +35,7 @@ async function main() {
const session = stringSession.save()
fs.writeFileSync(
+ // eslint-disable-next-line node/no-path-concat
`${__dirname}/session.ts`,
`export const GRAMJS_SESSION = '${session}'\n`,
)
diff --git a/packages/convert/src/gramjs/__fixtures__/session.ts b/packages/convert/src/gramjs/__fixtures__/session.ts
index b05d3643..7a8433a5 100644
--- a/packages/convert/src/gramjs/__fixtures__/session.ts
+++ b/packages/convert/src/gramjs/__fixtures__/session.ts
@@ -1,2 +1,2 @@
-export const GRAMJS_SESSION =
- '1AgAOMTQ5LjE1NC4xNjcuNDABu60obcEYS8Yb/I7YlCwaLvW84dXCX2oGnBYG+zuMciJhHP99c8ZJvwxJgH8yU1QrqI+Gh0kK0JAuQucIpDfq/jJVLZ1ZRimq5yy1XbeEs65gtZA1+SUwZRXahh+NzGbPmOVUMCnCtRONo9GNvcx/QxSXRrh7T/K0YYN1iHsK1vJDk8/SUnthvTNmRycC+JLn4fMtctqP4Le2WPOH/deYbUF0BlwmR77M7fv1GZSInqCgWReaIl5nvn0IqA4mOCTkdOgcvwOiB2UmXwiyInxRuLdBIyLbBUDCuTlmL1m3FJqbuEpZEUJnoJf2YDFZ1wR6TfL0MUS1VwnjOcy3WIIFwwg='
+export const GRAMJS_SESSION
+ = '1AgAOMTQ5LjE1NC4xNjcuNDABu60obcEYS8Yb/I7YlCwaLvW84dXCX2oGnBYG+zuMciJhHP99c8ZJvwxJgH8yU1QrqI+Gh0kK0JAuQucIpDfq/jJVLZ1ZRimq5yy1XbeEs65gtZA1+SUwZRXahh+NzGbPmOVUMCnCtRONo9GNvcx/QxSXRrh7T/K0YYN1iHsK1vJDk8/SUnthvTNmRycC+JLn4fMtctqP4Le2WPOH/deYbUF0BlwmR77M7fv1GZSInqCgWReaIl5nvn0IqA4mOCTkdOgcvwOiB2UmXwiyInxRuLdBIyLbBUDCuTlmL1m3FJqbuEpZEUJnoJf2YDFZ1wR6TfL0MUS1VwnjOcy3WIIFwwg='
diff --git a/packages/convert/src/gramjs/convert.test.ts b/packages/convert/src/gramjs/convert.test.ts
index 1572fbf6..f18d5318 100644
--- a/packages/convert/src/gramjs/convert.test.ts
+++ b/packages/convert/src/gramjs/convert.test.ts
@@ -1,5 +1,4 @@
import { describe, expect, it } from 'vitest'
-
import { getPlatform } from '@mtcute/core/platform.js'
import { GRAMJS_SESSION } from './__fixtures__/session.js'
@@ -9,14 +8,14 @@ describe('gramjs/convert', () => {
it('should correctly convert from gramjs sessions', () => {
expect(convertFromGramjsSession(GRAMJS_SESSION)).toEqual({
authKey: getPlatform().hexDecode(
- 'ad286dc1184bc61bfc8ed8942c1a2ef5bce1d5c25f6a069c1606fb3b8c722261' +
- '1cff7d73c649bf0c49807f3253542ba88f8687490ad0902e42e708a437eafe32' +
- '552d9d594629aae72cb55db784b3ae60b59035f925306515da861f8dcc66cf98' +
- 'e5543029c2b5138da3d18dbdcc7f43149746b87b4ff2b4618375887b0ad6f243' +
- '93cfd2527b61bd3366472702f892e7e1f32d72da8fe0b7b658f387fdd7986d41' +
- '74065c2647beccedfbf51994889ea0a059179a225e67be7d08a80e263824e474' +
- 'e81cbf03a20765265f08b2227c51b8b7412322db0540c2b939662f59b7149a9b' +
- 'b84a59114267a097f6603159d7047a4df2f43144b55709e339ccb7588205c308',
+ 'ad286dc1184bc61bfc8ed8942c1a2ef5bce1d5c25f6a069c1606fb3b8c722261'
+ + '1cff7d73c649bf0c49807f3253542ba88f8687490ad0902e42e708a437eafe32'
+ + '552d9d594629aae72cb55db784b3ae60b59035f925306515da861f8dcc66cf98'
+ + 'e5543029c2b5138da3d18dbdcc7f43149746b87b4ff2b4618375887b0ad6f243'
+ + '93cfd2527b61bd3366472702f892e7e1f32d72da8fe0b7b658f387fdd7986d41'
+ + '74065c2647beccedfbf51994889ea0a059179a225e67be7d08a80e263824e474'
+ + 'e81cbf03a20765265f08b2227c51b8b7412322db0540c2b939662f59b7149a9b'
+ + 'b84a59114267a097f6603159d7047a4df2f43144b55709e339ccb7588205c308',
),
primaryDcs: {
main: {
@@ -41,14 +40,14 @@ describe('gramjs/convert', () => {
expect(
convertToGramjsSession({
authKey: getPlatform().hexDecode(
- 'ad286dc1184bc61bfc8ed8942c1a2ef5bce1d5c25f6a069c1606fb3b8c722261' +
- '1cff7d73c649bf0c49807f3253542ba88f8687490ad0902e42e708a437eafe32' +
- '552d9d594629aae72cb55db784b3ae60b59035f925306515da861f8dcc66cf98' +
- 'e5543029c2b5138da3d18dbdcc7f43149746b87b4ff2b4618375887b0ad6f243' +
- '93cfd2527b61bd3366472702f892e7e1f32d72da8fe0b7b658f387fdd7986d41' +
- '74065c2647beccedfbf51994889ea0a059179a225e67be7d08a80e263824e474' +
- 'e81cbf03a20765265f08b2227c51b8b7412322db0540c2b939662f59b7149a9b' +
- 'b84a59114267a097f6603159d7047a4df2f43144b55709e339ccb7588205c308',
+ 'ad286dc1184bc61bfc8ed8942c1a2ef5bce1d5c25f6a069c1606fb3b8c722261'
+ + '1cff7d73c649bf0c49807f3253542ba88f8687490ad0902e42e708a437eafe32'
+ + '552d9d594629aae72cb55db784b3ae60b59035f925306515da861f8dcc66cf98'
+ + 'e5543029c2b5138da3d18dbdcc7f43149746b87b4ff2b4618375887b0ad6f243'
+ + '93cfd2527b61bd3366472702f892e7e1f32d72da8fe0b7b658f387fdd7986d41'
+ + '74065c2647beccedfbf51994889ea0a059179a225e67be7d08a80e263824e474'
+ + 'e81cbf03a20765265f08b2227c51b8b7412322db0540c2b939662f59b7149a9b'
+ + 'b84a59114267a097f6603159d7047a4df2f43144b55709e339ccb7588205c308',
),
primaryDcs: {
main: {
diff --git a/packages/convert/src/gramjs/convert.ts b/packages/convert/src/gramjs/convert.ts
index 05993b5a..60cc786c 100644
--- a/packages/convert/src/gramjs/convert.ts
+++ b/packages/convert/src/gramjs/convert.ts
@@ -1,7 +1,9 @@
-import { readStringSession, StringSessionData } from '@mtcute/core/utils.js'
+import type { StringSessionData } from '@mtcute/core/utils.js'
+import { readStringSession } from '@mtcute/core/utils.js'
import { convertFromTelethonSession } from '../telethon/convert.js'
-import { TelethonSession } from '../telethon/types.js'
+import type { TelethonSession } from '../telethon/types.js'
+
import { parseGramjsSession } from './parse.js'
import { serializeGramjsSession } from './serialize.js'
diff --git a/packages/convert/src/gramjs/parse.test.ts b/packages/convert/src/gramjs/parse.test.ts
index ec4dead1..8c944c08 100644
--- a/packages/convert/src/gramjs/parse.test.ts
+++ b/packages/convert/src/gramjs/parse.test.ts
@@ -1,5 +1,4 @@
import { describe, expect, it } from 'vitest'
-
import { getPlatform } from '@mtcute/core/platform.js'
import { GRAMJS_SESSION } from './__fixtures__/session.js'
@@ -13,14 +12,14 @@ describe('gramjs/parse', () => {
port: 443,
ipv6: false,
authKey: getPlatform().hexDecode(
- 'ad286dc1184bc61bfc8ed8942c1a2ef5bce1d5c25f6a069c1606fb3b8c722261' +
- '1cff7d73c649bf0c49807f3253542ba88f8687490ad0902e42e708a437eafe32' +
- '552d9d594629aae72cb55db784b3ae60b59035f925306515da861f8dcc66cf98' +
- 'e5543029c2b5138da3d18dbdcc7f43149746b87b4ff2b4618375887b0ad6f243' +
- '93cfd2527b61bd3366472702f892e7e1f32d72da8fe0b7b658f387fdd7986d41' +
- '74065c2647beccedfbf51994889ea0a059179a225e67be7d08a80e263824e474' +
- 'e81cbf03a20765265f08b2227c51b8b7412322db0540c2b939662f59b7149a9b' +
- 'b84a59114267a097f6603159d7047a4df2f43144b55709e339ccb7588205c308',
+ 'ad286dc1184bc61bfc8ed8942c1a2ef5bce1d5c25f6a069c1606fb3b8c722261'
+ + '1cff7d73c649bf0c49807f3253542ba88f8687490ad0902e42e708a437eafe32'
+ + '552d9d594629aae72cb55db784b3ae60b59035f925306515da861f8dcc66cf98'
+ + 'e5543029c2b5138da3d18dbdcc7f43149746b87b4ff2b4618375887b0ad6f243'
+ + '93cfd2527b61bd3366472702f892e7e1f32d72da8fe0b7b658f387fdd7986d41'
+ + '74065c2647beccedfbf51994889ea0a059179a225e67be7d08a80e263824e474'
+ + 'e81cbf03a20765265f08b2227c51b8b7412322db0540c2b939662f59b7149a9b'
+ + 'b84a59114267a097f6603159d7047a4df2f43144b55709e339ccb7588205c308',
),
})
})
diff --git a/packages/convert/src/gramjs/parse.ts b/packages/convert/src/gramjs/parse.ts
index 950a975c..99623166 100644
--- a/packages/convert/src/gramjs/parse.ts
+++ b/packages/convert/src/gramjs/parse.ts
@@ -2,7 +2,7 @@ import { MtArgumentError } from '@mtcute/core'
import { getPlatform } from '@mtcute/core/platform.js'
import { dataViewFromBuffer } from '@mtcute/core/utils.js'
-import { TelethonSession } from '../telethon/types.js'
+import type { TelethonSession } from '../telethon/types.js'
export function parseGramjsSession(session: string): TelethonSession {
if (session[0] !== '1') {
diff --git a/packages/convert/src/gramjs/serialize.test.ts b/packages/convert/src/gramjs/serialize.test.ts
index 57936fe2..dd6a43d8 100644
--- a/packages/convert/src/gramjs/serialize.test.ts
+++ b/packages/convert/src/gramjs/serialize.test.ts
@@ -1,5 +1,4 @@
import { describe, expect, it } from 'vitest'
-
import { getPlatform } from '@mtcute/core/platform.js'
import { GRAMJS_SESSION } from './__fixtures__/session.js'
@@ -14,14 +13,14 @@ describe('gramjs/serialize', () => {
port: 443,
ipv6: false,
authKey: getPlatform().hexDecode(
- 'ad286dc1184bc61bfc8ed8942c1a2ef5bce1d5c25f6a069c1606fb3b8c722261' +
- '1cff7d73c649bf0c49807f3253542ba88f8687490ad0902e42e708a437eafe32' +
- '552d9d594629aae72cb55db784b3ae60b59035f925306515da861f8dcc66cf98' +
- 'e5543029c2b5138da3d18dbdcc7f43149746b87b4ff2b4618375887b0ad6f243' +
- '93cfd2527b61bd3366472702f892e7e1f32d72da8fe0b7b658f387fdd7986d41' +
- '74065c2647beccedfbf51994889ea0a059179a225e67be7d08a80e263824e474' +
- 'e81cbf03a20765265f08b2227c51b8b7412322db0540c2b939662f59b7149a9b' +
- 'b84a59114267a097f6603159d7047a4df2f43144b55709e339ccb7588205c308',
+ 'ad286dc1184bc61bfc8ed8942c1a2ef5bce1d5c25f6a069c1606fb3b8c722261'
+ + '1cff7d73c649bf0c49807f3253542ba88f8687490ad0902e42e708a437eafe32'
+ + '552d9d594629aae72cb55db784b3ae60b59035f925306515da861f8dcc66cf98'
+ + 'e5543029c2b5138da3d18dbdcc7f43149746b87b4ff2b4618375887b0ad6f243'
+ + '93cfd2527b61bd3366472702f892e7e1f32d72da8fe0b7b658f387fdd7986d41'
+ + '74065c2647beccedfbf51994889ea0a059179a225e67be7d08a80e263824e474'
+ + 'e81cbf03a20765265f08b2227c51b8b7412322db0540c2b939662f59b7149a9b'
+ + 'b84a59114267a097f6603159d7047a4df2f43144b55709e339ccb7588205c308',
),
}),
).toEqual(GRAMJS_SESSION)
diff --git a/packages/convert/src/gramjs/serialize.ts b/packages/convert/src/gramjs/serialize.ts
index adaa0178..49fc155c 100644
--- a/packages/convert/src/gramjs/serialize.ts
+++ b/packages/convert/src/gramjs/serialize.ts
@@ -2,7 +2,7 @@ import { MtArgumentError } from '@mtcute/core'
import { getPlatform } from '@mtcute/core/platform.js'
import { dataViewFromBuffer } from '@mtcute/core/utils.js'
-import { TelethonSession } from '../telethon/types.js'
+import type { TelethonSession } from '../telethon/types.js'
export function serializeGramjsSession(session: TelethonSession) {
if (session.authKey.length !== 256) {
@@ -24,5 +24,5 @@ export function serializeGramjsSession(session: TelethonSession) {
pos += 2
u8.set(session.authKey, pos)
- return '1' + getPlatform().base64Encode(u8)
+ return `1${getPlatform().base64Encode(u8)}`
}
diff --git a/packages/convert/src/mtkruto/__fixtures__/generate.js b/packages/convert/src/mtkruto/__fixtures__/generate.js
index b0e353ab..3af29548 100644
--- a/packages/convert/src/mtkruto/__fixtures__/generate.js
+++ b/packages/convert/src/mtkruto/__fixtures__/generate.js
@@ -1,4 +1,4 @@
-/* eslint-disable import/no-unresolved, no-undef, no-console */
+/* eslint-disable no-undef, no-console */
import { Client, StorageMemory } from 'https://deno.land/x/mtkruto@0.1.157/mod.ts'
diff --git a/packages/convert/src/mtkruto/__fixtures__/session.ts b/packages/convert/src/mtkruto/__fixtures__/session.ts
index 348e0acd..c6c7b3d3 100644
--- a/packages/convert/src/mtkruto/__fixtures__/session.ts
+++ b/packages/convert/src/mtkruto/__fixtures__/session.ts
@@ -1,2 +1,2 @@
-export const MTKRUTO_SESSION =
- 'BjItdGVzdAAB_gABAQABWEIKa07Ch-9zoA024mDOpsv20TW4YwuoRRROqSi41YQCbD3c4nKnz7BcFIu1mfn6f6Xm3OTVqoT0zib4p_AuZD9H-t8j5AagecRg-oSpQlmjoiUazKQSxnxWotGWf1mPNntAeOvDNa5t1NjXUxmqdB3e2AjYLF_E2jDESVgUuDBQUMBHIDc_xFBAlz6kVxCZ6iINJHbnyJ2F19tbEPFJvSM999RKaFj5lUUVs0qKNXEUmsFYUuIdPBzjWilY8Uvf9nYU_xXd9CUAAXS5_i4aaWlHoTIf3zn8ZEINhDIU1DMauh5vhSWt7F0fkxODjtou-7PdIunuDtqyQm4steuNJc8'
+export const MTKRUTO_SESSION
+ = 'BjItdGVzdAAB_gABAQABWEIKa07Ch-9zoA024mDOpsv20TW4YwuoRRROqSi41YQCbD3c4nKnz7BcFIu1mfn6f6Xm3OTVqoT0zib4p_AuZD9H-t8j5AagecRg-oSpQlmjoiUazKQSxnxWotGWf1mPNntAeOvDNa5t1NjXUxmqdB3e2AjYLF_E2jDESVgUuDBQUMBHIDc_xFBAlz6kVxCZ6iINJHbnyJ2F19tbEPFJvSM999RKaFj5lUUVs0qKNXEUmsFYUuIdPBzjWilY8Uvf9nYU_xXd9CUAAXS5_i4aaWlHoTIf3zn8ZEINhDIU1DMauh5vhSWt7F0fkxODjtou-7PdIunuDtqyQm4steuNJc8'
diff --git a/packages/convert/src/mtkruto/convert.test.ts b/packages/convert/src/mtkruto/convert.test.ts
index 939f0699..3f123445 100644
--- a/packages/convert/src/mtkruto/convert.test.ts
+++ b/packages/convert/src/mtkruto/convert.test.ts
@@ -1,5 +1,4 @@
import { describe, expect, it } from 'vitest'
-
import { u8HexDecode } from '@mtcute/test'
import { MTKRUTO_SESSION } from './__fixtures__/session.js'
@@ -9,14 +8,14 @@ describe('mtkruto/convert', () => {
it('should correctly convert from mtkruto sessions', () => {
expect(convertFromMtkrutoSession(MTKRUTO_SESSION)).toEqual({
authKey: u8HexDecode(
- '58420a6b4ec287ef73a00d36e260cea6cbf6d135b8630ba845144ea928b8d584' +
- '026c3ddce272a7cfb05c148bb599f9fa7fa5e6dce4d5aa84f4ce26f8a7f02e64' +
- '3f47fadf23e406a079c460fa84a94259a3a2251acca412c67c56a2d1967f598f' +
- '367b4078ebc335ae6dd4d8d75319aa741dded808d82c5fc4da30c4495814b830' +
- '5050c04720373fc45040973ea4571099ea220d2476e7c89d85d7db5b10f149bd' +
- '233df7d44a6858f9954515b34a8a3571149ac15852e21d3c1ce35a2958f14bdf' +
- 'f67614ff15ddf4250074b9fe2e1a696947a1321fdf39fc64420d843214d4331a' +
- 'ba1e6f8525adec5d1f9313838eda2efbb3dd22e9ee0edab2426e2cb5eb8d25cf',
+ '58420a6b4ec287ef73a00d36e260cea6cbf6d135b8630ba845144ea928b8d584'
+ + '026c3ddce272a7cfb05c148bb599f9fa7fa5e6dce4d5aa84f4ce26f8a7f02e64'
+ + '3f47fadf23e406a079c460fa84a94259a3a2251acca412c67c56a2d1967f598f'
+ + '367b4078ebc335ae6dd4d8d75319aa741dded808d82c5fc4da30c4495814b830'
+ + '5050c04720373fc45040973ea4571099ea220d2476e7c89d85d7db5b10f149bd'
+ + '233df7d44a6858f9954515b34a8a3571149ac15852e21d3c1ce35a2958f14bdf'
+ + 'f67614ff15ddf4250074b9fe2e1a696947a1321fdf39fc64420d843214d4331a'
+ + 'ba1e6f8525adec5d1f9313838eda2efbb3dd22e9ee0edab2426e2cb5eb8d25cf',
),
primaryDcs: {
main: {
@@ -39,14 +38,14 @@ describe('mtkruto/convert', () => {
expect(
convertToMtkrutoSession({
authKey: u8HexDecode(
- '58420a6b4ec287ef73a00d36e260cea6cbf6d135b8630ba845144ea928b8d584' +
- '026c3ddce272a7cfb05c148bb599f9fa7fa5e6dce4d5aa84f4ce26f8a7f02e64' +
- '3f47fadf23e406a079c460fa84a94259a3a2251acca412c67c56a2d1967f598f' +
- '367b4078ebc335ae6dd4d8d75319aa741dded808d82c5fc4da30c4495814b830' +
- '5050c04720373fc45040973ea4571099ea220d2476e7c89d85d7db5b10f149bd' +
- '233df7d44a6858f9954515b34a8a3571149ac15852e21d3c1ce35a2958f14bdf' +
- 'f67614ff15ddf4250074b9fe2e1a696947a1321fdf39fc64420d843214d4331a' +
- 'ba1e6f8525adec5d1f9313838eda2efbb3dd22e9ee0edab2426e2cb5eb8d25cf',
+ '58420a6b4ec287ef73a00d36e260cea6cbf6d135b8630ba845144ea928b8d584'
+ + '026c3ddce272a7cfb05c148bb599f9fa7fa5e6dce4d5aa84f4ce26f8a7f02e64'
+ + '3f47fadf23e406a079c460fa84a94259a3a2251acca412c67c56a2d1967f598f'
+ + '367b4078ebc335ae6dd4d8d75319aa741dded808d82c5fc4da30c4495814b830'
+ + '5050c04720373fc45040973ea4571099ea220d2476e7c89d85d7db5b10f149bd'
+ + '233df7d44a6858f9954515b34a8a3571149ac15852e21d3c1ce35a2958f14bdf'
+ + 'f67614ff15ddf4250074b9fe2e1a696947a1321fdf39fc64420d843214d4331a'
+ + 'ba1e6f8525adec5d1f9313838eda2efbb3dd22e9ee0edab2426e2cb5eb8d25cf',
),
primaryDcs: {
main: {
diff --git a/packages/convert/src/mtkruto/convert.ts b/packages/convert/src/mtkruto/convert.ts
index d3f15693..1fdcbdc8 100644
--- a/packages/convert/src/mtkruto/convert.ts
+++ b/packages/convert/src/mtkruto/convert.ts
@@ -1,9 +1,11 @@
-import { readStringSession, StringSessionData } from '@mtcute/core/utils.js'
+import type { StringSessionData } from '@mtcute/core/utils.js'
+import { readStringSession } from '@mtcute/core/utils.js'
import { DC_MAPPING_PROD, DC_MAPPING_TEST } from '../dcs.js'
+
import { parseMtkrutoSession } from './parse.js'
import { serializeMtkrutoSession } from './serialize.js'
-import { MtkrutoSession } from './types.js'
+import type { MtkrutoSession } from './types.js'
export function convertFromMtkrutoSession(session: MtkrutoSession | string): StringSessionData {
if (typeof session === 'string') {
diff --git a/packages/convert/src/mtkruto/parse.test.ts b/packages/convert/src/mtkruto/parse.test.ts
index 77aa19d4..46be4c2e 100644
--- a/packages/convert/src/mtkruto/parse.test.ts
+++ b/packages/convert/src/mtkruto/parse.test.ts
@@ -1,5 +1,4 @@
import { describe, expect, it } from 'vitest'
-
import { u8HexDecode } from '@mtcute/test'
import { MTKRUTO_SESSION } from './__fixtures__/session.js'
@@ -11,14 +10,14 @@ describe('mtkruto/parse', () => {
dcId: 2,
isTest: true,
authKey: u8HexDecode(
- '58420a6b4ec287ef73a00d36e260cea6cbf6d135b8630ba845144ea928b8d584' +
- '026c3ddce272a7cfb05c148bb599f9fa7fa5e6dce4d5aa84f4ce26f8a7f02e64' +
- '3f47fadf23e406a079c460fa84a94259a3a2251acca412c67c56a2d1967f598f' +
- '367b4078ebc335ae6dd4d8d75319aa741dded808d82c5fc4da30c4495814b830' +
- '5050c04720373fc45040973ea4571099ea220d2476e7c89d85d7db5b10f149bd' +
- '233df7d44a6858f9954515b34a8a3571149ac15852e21d3c1ce35a2958f14bdf' +
- 'f67614ff15ddf4250074b9fe2e1a696947a1321fdf39fc64420d843214d4331a' +
- 'ba1e6f8525adec5d1f9313838eda2efbb3dd22e9ee0edab2426e2cb5eb8d25cf',
+ '58420a6b4ec287ef73a00d36e260cea6cbf6d135b8630ba845144ea928b8d584'
+ + '026c3ddce272a7cfb05c148bb599f9fa7fa5e6dce4d5aa84f4ce26f8a7f02e64'
+ + '3f47fadf23e406a079c460fa84a94259a3a2251acca412c67c56a2d1967f598f'
+ + '367b4078ebc335ae6dd4d8d75319aa741dded808d82c5fc4da30c4495814b830'
+ + '5050c04720373fc45040973ea4571099ea220d2476e7c89d85d7db5b10f149bd'
+ + '233df7d44a6858f9954515b34a8a3571149ac15852e21d3c1ce35a2958f14bdf'
+ + 'f67614ff15ddf4250074b9fe2e1a696947a1321fdf39fc64420d843214d4331a'
+ + 'ba1e6f8525adec5d1f9313838eda2efbb3dd22e9ee0edab2426e2cb5eb8d25cf',
),
})
})
diff --git a/packages/convert/src/mtkruto/parse.ts b/packages/convert/src/mtkruto/parse.ts
index 796e00e9..5afa35a9 100644
--- a/packages/convert/src/mtkruto/parse.ts
+++ b/packages/convert/src/mtkruto/parse.ts
@@ -3,7 +3,8 @@ import { getPlatform } from '@mtcute/core/platform.js'
import { TlBinaryReader } from '@mtcute/core/utils.js'
import { telegramRleDecode } from '../utils/rle.js'
-import { MtkrutoSession } from './types.js'
+
+import type { MtkrutoSession } from './types.js'
export function parseMtkrutoSession(session: string): MtkrutoSession {
const data = telegramRleDecode(getPlatform().base64Decode(session, true))
@@ -19,7 +20,7 @@ export function parseMtkrutoSession(session: string): MtkrutoSession {
}
const dcId = Number(dcIdStr)
- if (isNaN(dcId)) {
+ if (Number.isNaN(dcId)) {
throw new MtArgumentError(`Invalid DC ID: ${dcIdStr}`)
}
diff --git a/packages/convert/src/mtkruto/serialize.test.ts b/packages/convert/src/mtkruto/serialize.test.ts
index fa945c17..de8011bb 100644
--- a/packages/convert/src/mtkruto/serialize.test.ts
+++ b/packages/convert/src/mtkruto/serialize.test.ts
@@ -1,5 +1,4 @@
import { describe, expect, it } from 'vitest'
-
import { u8HexDecode } from '@mtcute/test'
import { MTKRUTO_SESSION } from './__fixtures__/session.js'
@@ -12,14 +11,14 @@ describe('mtkruto/serialize', () => {
dcId: 2,
isTest: true,
authKey: u8HexDecode(
- '58420a6b4ec287ef73a00d36e260cea6cbf6d135b8630ba845144ea928b8d584' +
- '026c3ddce272a7cfb05c148bb599f9fa7fa5e6dce4d5aa84f4ce26f8a7f02e64' +
- '3f47fadf23e406a079c460fa84a94259a3a2251acca412c67c56a2d1967f598f' +
- '367b4078ebc335ae6dd4d8d75319aa741dded808d82c5fc4da30c4495814b830' +
- '5050c04720373fc45040973ea4571099ea220d2476e7c89d85d7db5b10f149bd' +
- '233df7d44a6858f9954515b34a8a3571149ac15852e21d3c1ce35a2958f14bdf' +
- 'f67614ff15ddf4250074b9fe2e1a696947a1321fdf39fc64420d843214d4331a' +
- 'ba1e6f8525adec5d1f9313838eda2efbb3dd22e9ee0edab2426e2cb5eb8d25cf',
+ '58420a6b4ec287ef73a00d36e260cea6cbf6d135b8630ba845144ea928b8d584'
+ + '026c3ddce272a7cfb05c148bb599f9fa7fa5e6dce4d5aa84f4ce26f8a7f02e64'
+ + '3f47fadf23e406a079c460fa84a94259a3a2251acca412c67c56a2d1967f598f'
+ + '367b4078ebc335ae6dd4d8d75319aa741dded808d82c5fc4da30c4495814b830'
+ + '5050c04720373fc45040973ea4571099ea220d2476e7c89d85d7db5b10f149bd'
+ + '233df7d44a6858f9954515b34a8a3571149ac15852e21d3c1ce35a2958f14bdf'
+ + 'f67614ff15ddf4250074b9fe2e1a696947a1321fdf39fc64420d843214d4331a'
+ + 'ba1e6f8525adec5d1f9313838eda2efbb3dd22e9ee0edab2426e2cb5eb8d25cf',
),
}),
).toEqual(MTKRUTO_SESSION)
diff --git a/packages/convert/src/mtkruto/serialize.ts b/packages/convert/src/mtkruto/serialize.ts
index 1e7986cc..1e2b6722 100644
--- a/packages/convert/src/mtkruto/serialize.ts
+++ b/packages/convert/src/mtkruto/serialize.ts
@@ -2,7 +2,8 @@ import { getPlatform } from '@mtcute/core/platform.js'
import { TlBinaryWriter } from '@mtcute/core/utils.js'
import { telegramRleEncode } from '../utils/rle.js'
-import { MtkrutoSession } from './types.js'
+
+import type { MtkrutoSession } from './types.js'
export function serializeMtkrutoSession(session: MtkrutoSession): string {
const dcIdStr = `${session.dcId}${session.isTest ? '-test' : ''}`
diff --git a/packages/convert/src/pyrogram/__fixtures__/session.ts b/packages/convert/src/pyrogram/__fixtures__/session.ts
index 58642802..51858e88 100644
--- a/packages/convert/src/pyrogram/__fixtures__/session.ts
+++ b/packages/convert/src/pyrogram/__fixtures__/session.ts
@@ -1,2 +1,2 @@
-export const PYROGRAM_TEST_SESSION =
- 'AgAyyvcBTk6KssqikKPxEhxfXJpkoFIgQ_o8VpCk_4g0tcHe0rVCXx34AaDKvaNOlbkJOZ4jA3AI8iDYkI2opuifbM_7S2u9MMdnrjfg5jpfkXfI9-wF8DK_UBGIe1zk_Ibn0IHLRz-lkb-QqZNhh8O8Ggb8cieamatEYwLrkjkZR7JG53q76F0ktUd22L6_bUlp9p_qgXqBg8vZdkIIs9T1OiShw2X6TNO0lYqfJVaczMVQcT9Zt0FiyrAMpovFuT7-96OFKWcQ9gzrs_SHfz9HrQgBwvNSdkVziXTtxLJXsaNz3smGeyh-CEuEgdF3enIECnzftlvvUClLN_ylcPir1bi4_wAAAAEqEi1JAA'
+export const PYROGRAM_TEST_SESSION
+ = 'AgAyyvcBTk6KssqikKPxEhxfXJpkoFIgQ_o8VpCk_4g0tcHe0rVCXx34AaDKvaNOlbkJOZ4jA3AI8iDYkI2opuifbM_7S2u9MMdnrjfg5jpfkXfI9-wF8DK_UBGIe1zk_Ibn0IHLRz-lkb-QqZNhh8O8Ggb8cieamatEYwLrkjkZR7JG53q76F0ktUd22L6_bUlp9p_qgXqBg8vZdkIIs9T1OiShw2X6TNO0lYqfJVaczMVQcT9Zt0FiyrAMpovFuT7-96OFKWcQ9gzrs_SHfz9HrQgBwvNSdkVziXTtxLJXsaNz3smGeyh-CEuEgdF3enIECnzftlvvUClLN_ylcPir1bi4_wAAAAEqEi1JAA'
diff --git a/packages/convert/src/pyrogram/__fixtures__/session_old.ts b/packages/convert/src/pyrogram/__fixtures__/session_old.ts
index 6951698f..85a6385c 100644
--- a/packages/convert/src/pyrogram/__fixtures__/session_old.ts
+++ b/packages/convert/src/pyrogram/__fixtures__/session_old.ts
@@ -1,2 +1,2 @@
-export const PYROGRAM_TEST_SESSION_OLD =
- 'AgEWdHMtuA1pC01YkNiHpL1bC0yBC3wzGZCwSRWKlA_a69RhePUN3M51NpnwSXrW3pZV9FS8WjAwUkA23uT_49t8c7Umw3ihhKD6-hTpZ5wXC2MuC0EsF0-Z6WshYhT3gmN6QhEt0jlXo5cW1BJ3MYmXtsTWNf_hJfd3_wF_ZFa58ntVV-3qd08wQRhiL_IxM7L5YazjPw0dg2z92CqRARku_oq5D29V6W6bo8T-SLzF_ujj5ZcAQL25mJtCcXfhhjp9atxcrqnKzEs05xyrehnlJZKoGmnX0mF2P_6wUHqZC9tcTBUV4AmFcbuy7m_4SYLnJ8MbftNs7aWHHNcB1R4fAAAAASoSLUkA'
+export const PYROGRAM_TEST_SESSION_OLD
+ = 'AgEWdHMtuA1pC01YkNiHpL1bC0yBC3wzGZCwSRWKlA_a69RhePUN3M51NpnwSXrW3pZV9FS8WjAwUkA23uT_49t8c7Umw3ihhKD6-hTpZ5wXC2MuC0EsF0-Z6WshYhT3gmN6QhEt0jlXo5cW1BJ3MYmXtsTWNf_hJfd3_wF_ZFa58ntVV-3qd08wQRhiL_IxM7L5YazjPw0dg2z92CqRARku_oq5D29V6W6bo8T-SLzF_ujj5ZcAQL25mJtCcXfhhjp9atxcrqnKzEs05xyrehnlJZKoGmnX0mF2P_6wUHqZC9tcTBUV4AmFcbuy7m_4SYLnJ8MbftNs7aWHHNcB1R4fAAAAASoSLUkA'
diff --git a/packages/convert/src/pyrogram/convert.test.ts b/packages/convert/src/pyrogram/convert.test.ts
index 547990ac..12d575a6 100644
--- a/packages/convert/src/pyrogram/convert.test.ts
+++ b/packages/convert/src/pyrogram/convert.test.ts
@@ -1,5 +1,4 @@
import { describe, expect, it } from 'vitest'
-
import { getPlatform } from '@mtcute/core/platform.js'
import { PYROGRAM_TEST_SESSION_OLD } from './__fixtures__/session_old.js'
@@ -9,14 +8,14 @@ describe('pyrogram/convert', () => {
it('should correctly convert from pyrogram sessions', () => {
expect(convertFromPyrogramSession(PYROGRAM_TEST_SESSION_OLD)).toEqual({
authKey: getPlatform().hexDecode(
- '1674732db80d690b4d5890d887a4bd5b0b4c810b7c331990b049158a940fdaeb' +
- 'd46178f50ddcce753699f0497ad6de9655f454bc5a3030524036dee4ffe3db7c' +
- '73b526c378a184a0fafa14e9679c170b632e0b412c174f99e96b216214f78263' +
- '7a42112dd23957a39716d41277318997b6c4d635ffe125f777ff017f6456b9f2' +
- '7b5557edea774f304118622ff23133b2f961ace33f0d1d836cfdd82a9101192e' +
- 'fe8ab90f6f55e96e9ba3c4fe48bcc5fee8e3e5970040bdb9989b427177e1863a' +
- '7d6adc5caea9cacc4b34e71cab7a19e52592a81a69d7d261763ffeb0507a990b' +
- 'db5c4c1515e0098571bbb2ee6ff84982e727c31b7ed36ceda5871cd701d51e1f',
+ '1674732db80d690b4d5890d887a4bd5b0b4c810b7c331990b049158a940fdaeb'
+ + 'd46178f50ddcce753699f0497ad6de9655f454bc5a3030524036dee4ffe3db7c'
+ + '73b526c378a184a0fafa14e9679c170b632e0b412c174f99e96b216214f78263'
+ + '7a42112dd23957a39716d41277318997b6c4d635ffe125f777ff017f6456b9f2'
+ + '7b5557edea774f304118622ff23133b2f961ace33f0d1d836cfdd82a9101192e'
+ + 'fe8ab90f6f55e96e9ba3c4fe48bcc5fee8e3e5970040bdb9989b427177e1863a'
+ + '7d6adc5caea9cacc4b34e71cab7a19e52592a81a69d7d261763ffeb0507a990b'
+ + 'db5c4c1515e0098571bbb2ee6ff84982e727c31b7ed36ceda5871cd701d51e1f',
),
primaryDcs: {
main: {
@@ -45,14 +44,14 @@ describe('pyrogram/convert', () => {
expect(
convertToPyrogramSession({
authKey: getPlatform().hexDecode(
- '1674732db80d690b4d5890d887a4bd5b0b4c810b7c331990b049158a940fdaeb' +
- 'd46178f50ddcce753699f0497ad6de9655f454bc5a3030524036dee4ffe3db7c' +
- '73b526c378a184a0fafa14e9679c170b632e0b412c174f99e96b216214f78263' +
- '7a42112dd23957a39716d41277318997b6c4d635ffe125f777ff017f6456b9f2' +
- '7b5557edea774f304118622ff23133b2f961ace33f0d1d836cfdd82a9101192e' +
- 'fe8ab90f6f55e96e9ba3c4fe48bcc5fee8e3e5970040bdb9989b427177e1863a' +
- '7d6adc5caea9cacc4b34e71cab7a19e52592a81a69d7d261763ffeb0507a990b' +
- 'db5c4c1515e0098571bbb2ee6ff84982e727c31b7ed36ceda5871cd701d51e1f',
+ '1674732db80d690b4d5890d887a4bd5b0b4c810b7c331990b049158a940fdaeb'
+ + 'd46178f50ddcce753699f0497ad6de9655f454bc5a3030524036dee4ffe3db7c'
+ + '73b526c378a184a0fafa14e9679c170b632e0b412c174f99e96b216214f78263'
+ + '7a42112dd23957a39716d41277318997b6c4d635ffe125f777ff017f6456b9f2'
+ + '7b5557edea774f304118622ff23133b2f961ace33f0d1d836cfdd82a9101192e'
+ + 'fe8ab90f6f55e96e9ba3c4fe48bcc5fee8e3e5970040bdb9989b427177e1863a'
+ + '7d6adc5caea9cacc4b34e71cab7a19e52592a81a69d7d261763ffeb0507a990b'
+ + 'db5c4c1515e0098571bbb2ee6ff84982e727c31b7ed36ceda5871cd701d51e1f',
),
primaryDcs: {
main: {
diff --git a/packages/convert/src/pyrogram/convert.ts b/packages/convert/src/pyrogram/convert.ts
index d79b6a49..605e8a8b 100644
--- a/packages/convert/src/pyrogram/convert.ts
+++ b/packages/convert/src/pyrogram/convert.ts
@@ -1,9 +1,11 @@
-import { readStringSession, StringSessionData } from '@mtcute/core/utils.js'
+import type { StringSessionData } from '@mtcute/core/utils.js'
+import { readStringSession } from '@mtcute/core/utils.js'
import { DC_MAPPING_PROD, DC_MAPPING_TEST } from '../dcs.js'
+
import { parsePyrogramSession } from './parse.js'
import { serializePyrogramSession } from './serialize.js'
-import { PyrogramSession } from './types.js'
+import type { PyrogramSession } from './types.js'
export function convertFromPyrogramSession(session: PyrogramSession | string): StringSessionData {
if (typeof session === 'string') {
diff --git a/packages/convert/src/pyrogram/parse.test.ts b/packages/convert/src/pyrogram/parse.test.ts
index 69fb4a71..141b38da 100644
--- a/packages/convert/src/pyrogram/parse.test.ts
+++ b/packages/convert/src/pyrogram/parse.test.ts
@@ -1,5 +1,4 @@
import { describe, expect, it } from 'vitest'
-
import { getPlatform } from '@mtcute/core/platform.js'
import { PYROGRAM_TEST_SESSION } from './__fixtures__/session.js'
@@ -14,14 +13,14 @@ describe('pyrogram/parse', () => {
userId: 5000801609,
dcId: 2,
authKey: getPlatform().hexDecode(
- '1674732db80d690b4d5890d887a4bd5b0b4c810b7c331990b049158a940fdaeb' +
- 'd46178f50ddcce753699f0497ad6de9655f454bc5a3030524036dee4ffe3db7c' +
- '73b526c378a184a0fafa14e9679c170b632e0b412c174f99e96b216214f78263' +
- '7a42112dd23957a39716d41277318997b6c4d635ffe125f777ff017f6456b9f2' +
- '7b5557edea774f304118622ff23133b2f961ace33f0d1d836cfdd82a9101192e' +
- 'fe8ab90f6f55e96e9ba3c4fe48bcc5fee8e3e5970040bdb9989b427177e1863a' +
- '7d6adc5caea9cacc4b34e71cab7a19e52592a81a69d7d261763ffeb0507a990b' +
- 'db5c4c1515e0098571bbb2ee6ff84982e727c31b7ed36ceda5871cd701d51e1f',
+ '1674732db80d690b4d5890d887a4bd5b0b4c810b7c331990b049158a940fdaeb'
+ + 'd46178f50ddcce753699f0497ad6de9655f454bc5a3030524036dee4ffe3db7c'
+ + '73b526c378a184a0fafa14e9679c170b632e0b412c174f99e96b216214f78263'
+ + '7a42112dd23957a39716d41277318997b6c4d635ffe125f777ff017f6456b9f2'
+ + '7b5557edea774f304118622ff23133b2f961ace33f0d1d836cfdd82a9101192e'
+ + 'fe8ab90f6f55e96e9ba3c4fe48bcc5fee8e3e5970040bdb9989b427177e1863a'
+ + '7d6adc5caea9cacc4b34e71cab7a19e52592a81a69d7d261763ffeb0507a990b'
+ + 'db5c4c1515e0098571bbb2ee6ff84982e727c31b7ed36ceda5871cd701d51e1f',
),
})
})
@@ -34,14 +33,14 @@ describe('pyrogram/parse', () => {
userId: 5000801609,
dcId: 2,
authKey: getPlatform().hexDecode(
- '4e4e8ab2caa290a3f1121c5f5c9a64a0522043fa3c5690a4ff8834b5c1ded2b5' +
- '425f1df801a0cabda34e95b909399e23037008f220d8908da8a6e89f6ccffb4b' +
- '6bbd30c767ae37e0e63a5f9177c8f7ec05f032bf5011887b5ce4fc86e7d081cb' +
- '473fa591bf90a9936187c3bc1a06fc72279a99ab446302eb92391947b246e77a' +
- 'bbe85d24b54776d8bebf6d4969f69fea817a8183cbd9764208b3d4f53a24a1c3' +
- '65fa4cd3b4958a9f25569cccc550713f59b74162cab00ca68bc5b93efef7a385' +
- '296710f60cebb3f4877f3f47ad0801c2f3527645738974edc4b257b1a373dec9' +
- '867b287e084b8481d1777a72040a7cdfb65bef50294b37fca570f8abd5b8b8ff',
+ '4e4e8ab2caa290a3f1121c5f5c9a64a0522043fa3c5690a4ff8834b5c1ded2b5'
+ + '425f1df801a0cabda34e95b909399e23037008f220d8908da8a6e89f6ccffb4b'
+ + '6bbd30c767ae37e0e63a5f9177c8f7ec05f032bf5011887b5ce4fc86e7d081cb'
+ + '473fa591bf90a9936187c3bc1a06fc72279a99ab446302eb92391947b246e77a'
+ + 'bbe85d24b54776d8bebf6d4969f69fea817a8183cbd9764208b3d4f53a24a1c3'
+ + '65fa4cd3b4958a9f25569cccc550713f59b74162cab00ca68bc5b93efef7a385'
+ + '296710f60cebb3f4877f3f47ad0801c2f3527645738974edc4b257b1a373dec9'
+ + '867b287e084b8481d1777a72040a7cdfb65bef50294b37fca570f8abd5b8b8ff',
),
})
})
diff --git a/packages/convert/src/pyrogram/parse.ts b/packages/convert/src/pyrogram/parse.ts
index 1363f893..6c6d7b67 100644
--- a/packages/convert/src/pyrogram/parse.ts
+++ b/packages/convert/src/pyrogram/parse.ts
@@ -4,7 +4,7 @@ import { Long } from '@mtcute/core'
import { getPlatform } from '@mtcute/core/platform.js'
import { dataViewFromBuffer, longFromBuffer } from '@mtcute/core/utils.js'
-import { PyrogramSession } from './types.js'
+import type { PyrogramSession } from './types.js'
const SESSION_STRING_SIZE = 351
const SESSION_STRING_SIZE_64 = 356
diff --git a/packages/convert/src/pyrogram/serialize.test.ts b/packages/convert/src/pyrogram/serialize.test.ts
index 3af64870..b9c4c0d1 100644
--- a/packages/convert/src/pyrogram/serialize.test.ts
+++ b/packages/convert/src/pyrogram/serialize.test.ts
@@ -1,5 +1,4 @@
import { describe, expect, it } from 'vitest'
-
import { getPlatform } from '@mtcute/core/platform.js'
import { PYROGRAM_TEST_SESSION } from './__fixtures__/session.js'
@@ -15,14 +14,14 @@ describe('pyrogram/serialize', () => {
userId: 5000801609,
dcId: 2,
authKey: getPlatform().hexDecode(
- '1674732db80d690b4d5890d887a4bd5b0b4c810b7c331990b049158a940fdaeb' +
- 'd46178f50ddcce753699f0497ad6de9655f454bc5a3030524036dee4ffe3db7c' +
- '73b526c378a184a0fafa14e9679c170b632e0b412c174f99e96b216214f78263' +
- '7a42112dd23957a39716d41277318997b6c4d635ffe125f777ff017f6456b9f2' +
- '7b5557edea774f304118622ff23133b2f961ace33f0d1d836cfdd82a9101192e' +
- 'fe8ab90f6f55e96e9ba3c4fe48bcc5fee8e3e5970040bdb9989b427177e1863a' +
- '7d6adc5caea9cacc4b34e71cab7a19e52592a81a69d7d261763ffeb0507a990b' +
- 'db5c4c1515e0098571bbb2ee6ff84982e727c31b7ed36ceda5871cd701d51e1f',
+ '1674732db80d690b4d5890d887a4bd5b0b4c810b7c331990b049158a940fdaeb'
+ + 'd46178f50ddcce753699f0497ad6de9655f454bc5a3030524036dee4ffe3db7c'
+ + '73b526c378a184a0fafa14e9679c170b632e0b412c174f99e96b216214f78263'
+ + '7a42112dd23957a39716d41277318997b6c4d635ffe125f777ff017f6456b9f2'
+ + '7b5557edea774f304118622ff23133b2f961ace33f0d1d836cfdd82a9101192e'
+ + 'fe8ab90f6f55e96e9ba3c4fe48bcc5fee8e3e5970040bdb9989b427177e1863a'
+ + '7d6adc5caea9cacc4b34e71cab7a19e52592a81a69d7d261763ffeb0507a990b'
+ + 'db5c4c1515e0098571bbb2ee6ff84982e727c31b7ed36ceda5871cd701d51e1f',
),
}),
).toEqual(PYROGRAM_TEST_SESSION_OLD)
@@ -37,14 +36,14 @@ describe('pyrogram/serialize', () => {
userId: 5000801609,
dcId: 2,
authKey: getPlatform().hexDecode(
- '4e4e8ab2caa290a3f1121c5f5c9a64a0522043fa3c5690a4ff8834b5c1ded2b5' +
- '425f1df801a0cabda34e95b909399e23037008f220d8908da8a6e89f6ccffb4b' +
- '6bbd30c767ae37e0e63a5f9177c8f7ec05f032bf5011887b5ce4fc86e7d081cb' +
- '473fa591bf90a9936187c3bc1a06fc72279a99ab446302eb92391947b246e77a' +
- 'bbe85d24b54776d8bebf6d4969f69fea817a8183cbd9764208b3d4f53a24a1c3' +
- '65fa4cd3b4958a9f25569cccc550713f59b74162cab00ca68bc5b93efef7a385' +
- '296710f60cebb3f4877f3f47ad0801c2f3527645738974edc4b257b1a373dec9' +
- '867b287e084b8481d1777a72040a7cdfb65bef50294b37fca570f8abd5b8b8ff',
+ '4e4e8ab2caa290a3f1121c5f5c9a64a0522043fa3c5690a4ff8834b5c1ded2b5'
+ + '425f1df801a0cabda34e95b909399e23037008f220d8908da8a6e89f6ccffb4b'
+ + '6bbd30c767ae37e0e63a5f9177c8f7ec05f032bf5011887b5ce4fc86e7d081cb'
+ + '473fa591bf90a9936187c3bc1a06fc72279a99ab446302eb92391947b246e77a'
+ + 'bbe85d24b54776d8bebf6d4969f69fea817a8183cbd9764208b3d4f53a24a1c3'
+ + '65fa4cd3b4958a9f25569cccc550713f59b74162cab00ca68bc5b93efef7a385'
+ + '296710f60cebb3f4877f3f47ad0801c2f3527645738974edc4b257b1a373dec9'
+ + '867b287e084b8481d1777a72040a7cdfb65bef50294b37fca570f8abd5b8b8ff',
),
}),
).toEqual(PYROGRAM_TEST_SESSION)
diff --git a/packages/convert/src/pyrogram/serialize.ts b/packages/convert/src/pyrogram/serialize.ts
index 97f4c307..f6c74795 100644
--- a/packages/convert/src/pyrogram/serialize.ts
+++ b/packages/convert/src/pyrogram/serialize.ts
@@ -2,7 +2,7 @@ import { Long, MtArgumentError } from '@mtcute/core'
import { getPlatform } from '@mtcute/core/platform.js'
import { dataViewFromBuffer } from '@mtcute/core/utils.js'
-import { PyrogramSession } from './types.js'
+import type { PyrogramSession } from './types.js'
const SESSION_STRING_SIZE_OLD = 267
const SESSION_STRING_SIZE = 271
diff --git a/packages/convert/src/telethon/__fixtures__/session.ts b/packages/convert/src/telethon/__fixtures__/session.ts
index f53df8c3..c209e384 100644
--- a/packages/convert/src/telethon/__fixtures__/session.ts
+++ b/packages/convert/src/telethon/__fixtures__/session.ts
@@ -1,2 +1,2 @@
-export const TELETHON_TEST_SESSION =
- '1ApWapygAUChJS1_xwUK01Is4cOvQa1JKTn1POabdMUCfLmXNYFUyvG3v9Z_qbFNFp3zYP--3aVpTYI2DpB2Ib46p_bwSC0j1QEjvdQxJj26cVj8NfslrCkYrdV3glOhdczSq08kp31eqBGXMPhA7wy7DOcSLLAoy-Jf3Q_V_Q3y2a8_64ArFJe8PFfSqkdO56VQutajNLscFUtTQXUQFLJ7ft6vIl__UOc9tpQZEiFW7jWmID79WkfYLHFjuChTVKGMLDa8YcZj6z5Sq-pXPE9VbAbJ5L1JRqXOey3QGtZgJeIEww_WWD5nMMUfhLIydD2i7eDmVoUE5EIZPpsevJmjiGLw4vJk='
+export const TELETHON_TEST_SESSION
+ = '1ApWapygAUChJS1_xwUK01Is4cOvQa1JKTn1POabdMUCfLmXNYFUyvG3v9Z_qbFNFp3zYP--3aVpTYI2DpB2Ib46p_bwSC0j1QEjvdQxJj26cVj8NfslrCkYrdV3glOhdczSq08kp31eqBGXMPhA7wy7DOcSLLAoy-Jf3Q_V_Q3y2a8_64ArFJe8PFfSqkdO56VQutajNLscFUtTQXUQFLJ7ft6vIl__UOc9tpQZEiFW7jWmID79WkfYLHFjuChTVKGMLDa8YcZj6z5Sq-pXPE9VbAbJ5L1JRqXOey3QGtZgJeIEww_WWD5nMMUfhLIydD2i7eDmVoUE5EIZPpsevJmjiGLw4vJk='
diff --git a/packages/convert/src/telethon/__fixtures__/session_v6.ts b/packages/convert/src/telethon/__fixtures__/session_v6.ts
index 14495480..dc7bf5ba 100644
--- a/packages/convert/src/telethon/__fixtures__/session_v6.ts
+++ b/packages/convert/src/telethon/__fixtures__/session_v6.ts
@@ -1,2 +1,2 @@
-export const TELETHON_TEST_SESSION_V6 =
- '1ASABCyjyPfABAAAAAAAAAA4Bu4pveAFWSE51_trKsrRQeMvGXMl8fI6NsGaWqdrXXeqyaXne9qNthqnrBmH56kHfOhFUCPSoVzNNrGgnQr67AYQbkhpP_Yml2EDd8epdc6Gywh4q2NBgYyW6VBT8UKg89-FebYTO6n47I1cJMGsSZ1ddxEOpIpHXsSmPdGBSTz6uaHbLYo0jnxd59PQn4H4dKb8FxuOQsUVa3vY_o79HMVMQRVT1IksUKFg5gAe5ZJ0yx6W4pMviVbC-TYZC0HInmv2fFMv-S3rQyg1C7qpU-Gbo1P6UZC4KZGmu2pMJooFNyfRbFgl3BI5Z-FNx9TKu4UFrF9G6Q0l8PjPXOZm4j-c='
+export const TELETHON_TEST_SESSION_V6
+ = '1ASABCyjyPfABAAAAAAAAAA4Bu4pveAFWSE51_trKsrRQeMvGXMl8fI6NsGaWqdrXXeqyaXne9qNthqnrBmH56kHfOhFUCPSoVzNNrGgnQr67AYQbkhpP_Yml2EDd8epdc6Gywh4q2NBgYyW6VBT8UKg89-FebYTO6n47I1cJMGsSZ1ddxEOpIpHXsSmPdGBSTz6uaHbLYo0jnxd59PQn4H4dKb8FxuOQsUVa3vY_o79HMVMQRVT1IksUKFg5gAe5ZJ0yx6W4pMviVbC-TYZC0HInmv2fFMv-S3rQyg1C7qpU-Gbo1P6UZC4KZGmu2pMJooFNyfRbFgl3BI5Z-FNx9TKu4UFrF9G6Q0l8PjPXOZm4j-c='
diff --git a/packages/convert/src/telethon/convert.test.ts b/packages/convert/src/telethon/convert.test.ts
index 904ed375..d9d8867c 100644
--- a/packages/convert/src/telethon/convert.test.ts
+++ b/packages/convert/src/telethon/convert.test.ts
@@ -1,5 +1,4 @@
import { describe, expect, it } from 'vitest'
-
import { getPlatform } from '@mtcute/core/platform.js'
import { TELETHON_TEST_SESSION } from './__fixtures__/session.js'
@@ -9,14 +8,14 @@ describe('telethon/convert', () => {
it('should correctly convert from telethon sessions', () => {
expect(convertFromTelethonSession(TELETHON_TEST_SESSION)).toEqual({
authKey: getPlatform().hexDecode(
- '28494b5ff1c142b4d48b3870ebd06b524a4e7d4f39a6dd31409f2e65cd605532' +
- 'bc6deff59fea6c5345a77cd83fefb7695a53608d83a41d886f8ea9fdbc120b48' +
- 'f54048ef750c498f6e9c563f0d7ec96b0a462b755de094e85d7334aad3c929df' +
- '57aa0465cc3e103bc32ec339c48b2c0a32f897f743f57f437cb66bcffae00ac5' +
- '25ef0f15f4aa91d3b9e9542eb5a8cd2ec70552d4d05d44052c9edfb7abc897ff' +
- 'd439cf6da506448855bb8d69880fbf5691f60b1c58ee0a14d528630b0daf1871' +
- '98facf94aafa95cf13d55b01b2792f5251a9739ecb7406b59809788130c3f596' +
- '0f99cc3147e12c8c9d0f68bb783995a1413910864fa6c7af2668e218bc38bc99',
+ '28494b5ff1c142b4d48b3870ebd06b524a4e7d4f39a6dd31409f2e65cd605532'
+ + 'bc6deff59fea6c5345a77cd83fefb7695a53608d83a41d886f8ea9fdbc120b48'
+ + 'f54048ef750c498f6e9c563f0d7ec96b0a462b755de094e85d7334aad3c929df'
+ + '57aa0465cc3e103bc32ec339c48b2c0a32f897f743f57f437cb66bcffae00ac5'
+ + '25ef0f15f4aa91d3b9e9542eb5a8cd2ec70552d4d05d44052c9edfb7abc897ff'
+ + 'd439cf6da506448855bb8d69880fbf5691f60b1c58ee0a14d528630b0daf1871'
+ + '98facf94aafa95cf13d55b01b2792f5251a9739ecb7406b59809788130c3f596'
+ + '0f99cc3147e12c8c9d0f68bb783995a1413910864fa6c7af2668e218bc38bc99',
),
primaryDcs: {
main: {
@@ -41,14 +40,14 @@ describe('telethon/convert', () => {
expect(
convertToTelethonSession({
authKey: getPlatform().hexDecode(
- '28494b5ff1c142b4d48b3870ebd06b524a4e7d4f39a6dd31409f2e65cd605532' +
- 'bc6deff59fea6c5345a77cd83fefb7695a53608d83a41d886f8ea9fdbc120b48' +
- 'f54048ef750c498f6e9c563f0d7ec96b0a462b755de094e85d7334aad3c929df' +
- '57aa0465cc3e103bc32ec339c48b2c0a32f897f743f57f437cb66bcffae00ac5' +
- '25ef0f15f4aa91d3b9e9542eb5a8cd2ec70552d4d05d44052c9edfb7abc897ff' +
- 'd439cf6da506448855bb8d69880fbf5691f60b1c58ee0a14d528630b0daf1871' +
- '98facf94aafa95cf13d55b01b2792f5251a9739ecb7406b59809788130c3f596' +
- '0f99cc3147e12c8c9d0f68bb783995a1413910864fa6c7af2668e218bc38bc99',
+ '28494b5ff1c142b4d48b3870ebd06b524a4e7d4f39a6dd31409f2e65cd605532'
+ + 'bc6deff59fea6c5345a77cd83fefb7695a53608d83a41d886f8ea9fdbc120b48'
+ + 'f54048ef750c498f6e9c563f0d7ec96b0a462b755de094e85d7334aad3c929df'
+ + '57aa0465cc3e103bc32ec339c48b2c0a32f897f743f57f437cb66bcffae00ac5'
+ + '25ef0f15f4aa91d3b9e9542eb5a8cd2ec70552d4d05d44052c9edfb7abc897ff'
+ + 'd439cf6da506448855bb8d69880fbf5691f60b1c58ee0a14d528630b0daf1871'
+ + '98facf94aafa95cf13d55b01b2792f5251a9739ecb7406b59809788130c3f596'
+ + '0f99cc3147e12c8c9d0f68bb783995a1413910864fa6c7af2668e218bc38bc99',
),
primaryDcs: {
main: {
diff --git a/packages/convert/src/telethon/convert.ts b/packages/convert/src/telethon/convert.ts
index 3e32e591..c14c49a2 100644
--- a/packages/convert/src/telethon/convert.ts
+++ b/packages/convert/src/telethon/convert.ts
@@ -1,9 +1,11 @@
-import { BasicDcOption, readStringSession, StringSessionData } from '@mtcute/core/utils.js'
+import type { BasicDcOption, StringSessionData } from '@mtcute/core/utils.js'
+import { readStringSession } from '@mtcute/core/utils.js'
import { isTestDc } from '../dcs.js'
+
import { parseTelethonSession } from './parse.js'
import { serializeTelethonSession } from './serialize.js'
-import { TelethonSession } from './types.js'
+import type { TelethonSession } from './types.js'
export function convertFromTelethonSession(session: TelethonSession | string): StringSessionData {
if (typeof session === 'string') {
diff --git a/packages/convert/src/telethon/parse.test.ts b/packages/convert/src/telethon/parse.test.ts
index 58a56e61..ca85915e 100644
--- a/packages/convert/src/telethon/parse.test.ts
+++ b/packages/convert/src/telethon/parse.test.ts
@@ -1,5 +1,4 @@
import { describe, expect, it } from 'vitest'
-
import { getPlatform } from '@mtcute/core/platform.js'
import { TELETHON_TEST_SESSION } from './__fixtures__/session.js'
@@ -14,14 +13,14 @@ describe('telethon/parse', () => {
port: 80,
ipv6: false,
authKey: getPlatform().hexDecode(
- '28494b5ff1c142b4d48b3870ebd06b524a4e7d4f39a6dd31409f2e65cd605532' +
- 'bc6deff59fea6c5345a77cd83fefb7695a53608d83a41d886f8ea9fdbc120b48' +
- 'f54048ef750c498f6e9c563f0d7ec96b0a462b755de094e85d7334aad3c929df' +
- '57aa0465cc3e103bc32ec339c48b2c0a32f897f743f57f437cb66bcffae00ac5' +
- '25ef0f15f4aa91d3b9e9542eb5a8cd2ec70552d4d05d44052c9edfb7abc897ff' +
- 'd439cf6da506448855bb8d69880fbf5691f60b1c58ee0a14d528630b0daf1871' +
- '98facf94aafa95cf13d55b01b2792f5251a9739ecb7406b59809788130c3f596' +
- '0f99cc3147e12c8c9d0f68bb783995a1413910864fa6c7af2668e218bc38bc99',
+ '28494b5ff1c142b4d48b3870ebd06b524a4e7d4f39a6dd31409f2e65cd605532'
+ + 'bc6deff59fea6c5345a77cd83fefb7695a53608d83a41d886f8ea9fdbc120b48'
+ + 'f54048ef750c498f6e9c563f0d7ec96b0a462b755de094e85d7334aad3c929df'
+ + '57aa0465cc3e103bc32ec339c48b2c0a32f897f743f57f437cb66bcffae00ac5'
+ + '25ef0f15f4aa91d3b9e9542eb5a8cd2ec70552d4d05d44052c9edfb7abc897ff'
+ + 'd439cf6da506448855bb8d69880fbf5691f60b1c58ee0a14d528630b0daf1871'
+ + '98facf94aafa95cf13d55b01b2792f5251a9739ecb7406b59809788130c3f596'
+ + '0f99cc3147e12c8c9d0f68bb783995a1413910864fa6c7af2668e218bc38bc99',
),
})
})
@@ -33,14 +32,14 @@ describe('telethon/parse', () => {
port: 443,
ipv6: true,
authKey: getPlatform().hexDecode(
- '8a6f780156484e75fedacab2b45078cbc65cc97c7c8e8db06696a9dad75deab2' +
- '6979def6a36d86a9eb0661f9ea41df3a115408f4a857334dac682742bebb0184' +
- '1b921a4ffd89a5d840ddf1ea5d73a1b2c21e2ad8d0606325ba5414fc50a83cf7' +
- 'e15e6d84ceea7e3b235709306b1267575dc443a92291d7b1298f7460524f3eae' +
- '6876cb628d239f1779f4f427e07e1d29bf05c6e390b1455adef63fa3bf473153' +
- '104554f5224b142858398007b9649d32c7a5b8a4cbe255b0be4d8642d072279a' +
- 'fd9f14cbfe4b7ad0ca0d42eeaa54f866e8d4fe94642e0a6469aeda9309a2814d' +
- 'c9f45b160977048e59f85371f532aee1416b17d1ba43497c3e33d73999b88fe7',
+ '8a6f780156484e75fedacab2b45078cbc65cc97c7c8e8db06696a9dad75deab2'
+ + '6979def6a36d86a9eb0661f9ea41df3a115408f4a857334dac682742bebb0184'
+ + '1b921a4ffd89a5d840ddf1ea5d73a1b2c21e2ad8d0606325ba5414fc50a83cf7'
+ + 'e15e6d84ceea7e3b235709306b1267575dc443a92291d7b1298f7460524f3eae'
+ + '6876cb628d239f1779f4f427e07e1d29bf05c6e390b1455adef63fa3bf473153'
+ + '104554f5224b142858398007b9649d32c7a5b8a4cbe255b0be4d8642d072279a'
+ + 'fd9f14cbfe4b7ad0ca0d42eeaa54f866e8d4fe94642e0a6469aeda9309a2814d'
+ + 'c9f45b160977048e59f85371f532aee1416b17d1ba43497c3e33d73999b88fe7',
),
})
})
diff --git a/packages/convert/src/telethon/parse.ts b/packages/convert/src/telethon/parse.ts
index b630cd72..e366f5b7 100644
--- a/packages/convert/src/telethon/parse.ts
+++ b/packages/convert/src/telethon/parse.ts
@@ -3,7 +3,8 @@ import { getPlatform } from '@mtcute/core/platform.js'
import { dataViewFromBuffer } from '@mtcute/core/utils.js'
import { parseIpFromBytes } from '../utils/ip.js'
-import { TelethonSession } from './types.js'
+
+import type { TelethonSession } from './types.js'
export function parseTelethonSession(session: string): TelethonSession {
if (session[0] !== '1') {
diff --git a/packages/convert/src/telethon/serialize.test.ts b/packages/convert/src/telethon/serialize.test.ts
index 66ed90bc..ed9fcfc4 100644
--- a/packages/convert/src/telethon/serialize.test.ts
+++ b/packages/convert/src/telethon/serialize.test.ts
@@ -1,5 +1,4 @@
import { describe, expect, it } from 'vitest'
-
import { getPlatform } from '@mtcute/core/platform.js'
import { TELETHON_TEST_SESSION } from './__fixtures__/session.js'
@@ -15,14 +14,14 @@ describe('telethon/serialize', () => {
port: 80,
ipv6: false,
authKey: getPlatform().hexDecode(
- '28494b5ff1c142b4d48b3870ebd06b524a4e7d4f39a6dd31409f2e65cd605532' +
- 'bc6deff59fea6c5345a77cd83fefb7695a53608d83a41d886f8ea9fdbc120b48' +
- 'f54048ef750c498f6e9c563f0d7ec96b0a462b755de094e85d7334aad3c929df' +
- '57aa0465cc3e103bc32ec339c48b2c0a32f897f743f57f437cb66bcffae00ac5' +
- '25ef0f15f4aa91d3b9e9542eb5a8cd2ec70552d4d05d44052c9edfb7abc897ff' +
- 'd439cf6da506448855bb8d69880fbf5691f60b1c58ee0a14d528630b0daf1871' +
- '98facf94aafa95cf13d55b01b2792f5251a9739ecb7406b59809788130c3f596' +
- '0f99cc3147e12c8c9d0f68bb783995a1413910864fa6c7af2668e218bc38bc99',
+ '28494b5ff1c142b4d48b3870ebd06b524a4e7d4f39a6dd31409f2e65cd605532'
+ + 'bc6deff59fea6c5345a77cd83fefb7695a53608d83a41d886f8ea9fdbc120b48'
+ + 'f54048ef750c498f6e9c563f0d7ec96b0a462b755de094e85d7334aad3c929df'
+ + '57aa0465cc3e103bc32ec339c48b2c0a32f897f743f57f437cb66bcffae00ac5'
+ + '25ef0f15f4aa91d3b9e9542eb5a8cd2ec70552d4d05d44052c9edfb7abc897ff'
+ + 'd439cf6da506448855bb8d69880fbf5691f60b1c58ee0a14d528630b0daf1871'
+ + '98facf94aafa95cf13d55b01b2792f5251a9739ecb7406b59809788130c3f596'
+ + '0f99cc3147e12c8c9d0f68bb783995a1413910864fa6c7af2668e218bc38bc99',
),
}),
).toEqual(TELETHON_TEST_SESSION)
@@ -36,14 +35,14 @@ describe('telethon/serialize', () => {
port: 443,
ipv6: true,
authKey: getPlatform().hexDecode(
- '8a6f780156484e75fedacab2b45078cbc65cc97c7c8e8db06696a9dad75deab2' +
- '6979def6a36d86a9eb0661f9ea41df3a115408f4a857334dac682742bebb0184' +
- '1b921a4ffd89a5d840ddf1ea5d73a1b2c21e2ad8d0606325ba5414fc50a83cf7' +
- 'e15e6d84ceea7e3b235709306b1267575dc443a92291d7b1298f7460524f3eae' +
- '6876cb628d239f1779f4f427e07e1d29bf05c6e390b1455adef63fa3bf473153' +
- '104554f5224b142858398007b9649d32c7a5b8a4cbe255b0be4d8642d072279a' +
- 'fd9f14cbfe4b7ad0ca0d42eeaa54f866e8d4fe94642e0a6469aeda9309a2814d' +
- 'c9f45b160977048e59f85371f532aee1416b17d1ba43497c3e33d73999b88fe7',
+ '8a6f780156484e75fedacab2b45078cbc65cc97c7c8e8db06696a9dad75deab2'
+ + '6979def6a36d86a9eb0661f9ea41df3a115408f4a857334dac682742bebb0184'
+ + '1b921a4ffd89a5d840ddf1ea5d73a1b2c21e2ad8d0606325ba5414fc50a83cf7'
+ + 'e15e6d84ceea7e3b235709306b1267575dc443a92291d7b1298f7460524f3eae'
+ + '6876cb628d239f1779f4f427e07e1d29bf05c6e390b1455adef63fa3bf473153'
+ + '104554f5224b142858398007b9649d32c7a5b8a4cbe255b0be4d8642d072279a'
+ + 'fd9f14cbfe4b7ad0ca0d42eeaa54f866e8d4fe94642e0a6469aeda9309a2814d'
+ + 'c9f45b160977048e59f85371f532aee1416b17d1ba43497c3e33d73999b88fe7',
),
}),
).toEqual(TELETHON_TEST_SESSION_V6)
diff --git a/packages/convert/src/telethon/serialize.ts b/packages/convert/src/telethon/serialize.ts
index 442612c7..bacd7a36 100644
--- a/packages/convert/src/telethon/serialize.ts
+++ b/packages/convert/src/telethon/serialize.ts
@@ -3,7 +3,8 @@ import { getPlatform } from '@mtcute/core/platform.js'
import { dataViewFromBuffer } from '@mtcute/core/utils.js'
import { serializeIpv4ToBytes, serializeIpv6ToBytes } from '../utils/ip.js'
-import { TelethonSession } from './types.js'
+
+import type { TelethonSession } from './types.js'
export function serializeTelethonSession(session: TelethonSession) {
if (session.authKey.length !== 256) {
@@ -33,5 +34,5 @@ export function serializeTelethonSession(session: TelethonSession) {
let b64 = getPlatform().base64Encode(u8, true)
while (b64.length % 4 !== 0) b64 += '=' // for some reason telethon uses padding
- return '1' + b64
+ return `1${b64}`
}
diff --git a/packages/convert/src/utils/ip.ts b/packages/convert/src/utils/ip.ts
index 8f01b386..7776e29a 100644
--- a/packages/convert/src/utils/ip.ts
+++ b/packages/convert/src/utils/ip.ts
@@ -41,8 +41,8 @@ export function serializeIpv6ToBytes(ip: string, buf: Uint8Array) {
}
for (let i = 0; i < 8; i++) {
- const val = parseInt(parts[i], 16)
+ const val = Number.parseInt(parts[i], 16)
buf[i * 2] = val >> 8
- buf[i * 2 + 1] = val & 0xff
+ buf[i * 2 + 1] = val & 0xFF
}
}
diff --git a/packages/convert/tsconfig.json b/packages/convert/tsconfig.json
index 798d46cb..3b5437ec 100644
--- a/packages/convert/tsconfig.json
+++ b/packages/convert/tsconfig.json
@@ -1,13 +1,13 @@
{
- "extends": "../../tsconfig.json",
- "compilerOptions": {
- "outDir": "./dist/esm",
- "rootDir": "./src",
- },
- "include": [
- "./src",
- ],
- "references": [
- { "path": "../core" },
- ],
+ "extends": "../../tsconfig.json",
+ "compilerOptions": {
+ "rootDir": "./src",
+ "outDir": "./dist/esm"
+ },
+ "references": [
+ { "path": "../core" }
+ ],
+ "include": [
+ "./src"
+ ]
}
diff --git a/packages/core/README.md b/packages/core/README.md
index 407d500e..bd738bde 100644
--- a/packages/core/README.md
+++ b/packages/core/README.md
@@ -45,4 +45,4 @@ const self = await tg.start({
password: 'my-password',
})
console.log(`✨ logged in as ${self.displayName}`)
-```
\ No newline at end of file
+```
diff --git a/packages/core/build.config.cjs b/packages/core/build.config.cjs
index 631e06a0..cf790424 100644
--- a/packages/core/build.config.cjs
+++ b/packages/core/build.config.cjs
@@ -5,7 +5,7 @@ module.exports = ({ path, glob, transformFile, packageDir, outDir, jsr }) => ({
esmImportDirectives: true,
final() {
const version = require(path.join(packageDir, 'package.json')).version
- const replaceVersion = (content) => content.replace('%VERSION%', version)
+ const replaceVersion = content => content.replace('%VERSION%', version)
if (jsr) {
transformFile(path.join(outDir, 'network/network-manager.ts'), replaceVersion)
@@ -21,11 +21,11 @@ module.exports = ({ path, glob, transformFile, packageDir, outDir, jsr }) => ({
// skip for jsr for now because types aren't resolved correctly and it breaks everything (TODO: fix this)
const decoratorsRegex = new RegExp(
`(${KNOWN_DECORATORS.join('|')})\\((.+?)\\)(?:;|$)`,
- 'gsm',
+ 'gms',
)
const replaceDecorators = (content, file) => {
- if (!KNOWN_DECORATORS.some((d) => content.includes(d))) return null
+ if (!KNOWN_DECORATORS.some(d => content.includes(d))) return null
const countPerClass = new Map()
@@ -61,7 +61,7 @@ module.exports = ({ path, glob, transformFile, packageDir, outDir, jsr }) => ({
)
}
- return content + '\n' + customExports.join('\n') + '\n'
+ return `${content}\n${customExports.join('\n')}\n`
}
const globSrc = path.join(outDir, jsr ? 'highlevel/types/**/*.ts' : 'esm/highlevel/types/**/*.js')
diff --git a/packages/core/package.json b/packages/core/package.json
index 4868565e..664bf81c 100644
--- a/packages/core/package.json
+++ b/packages/core/package.json
@@ -1,36 +1,36 @@
{
- "name": "@mtcute/core",
- "private": true,
- "version": "0.16.6",
- "description": "Type-safe library for MTProto (Telegram API)",
- "author": "alina sireneva ",
- "license": "MIT",
- "type": "module",
- "sideEffects": false,
- "scripts": {
- "build": "pnpm run -w build-package core",
- "gen-client": "node ./scripts/generate-client.cjs",
- "gen-updates": "node ./scripts/generate-updates.cjs"
- },
- "exports": {
- ".": "./src/index.ts",
- "./utils.js": "./src/utils/index.ts",
- "./client.js": "./src/highlevel/client.ts",
- "./worker.js": "./src/highlevel/worker/index.ts",
- "./methods.js": "./src/highlevel/methods.ts",
- "./platform.js": "./src/platform.ts"
- },
- "dependencies": {
- "@mtcute/tl": "workspace:^",
- "@mtcute/tl-runtime": "workspace:^",
- "@mtcute/file-id": "workspace:^",
- "@types/events": "3.0.0",
- "events": "3.2.0",
- "long": "5.2.3"
- },
- "devDependencies": {
- "@types/ws": "8.5.4",
- "@mtcute/test": "workspace:^",
- "ws": "8.13.0"
- }
+ "name": "@mtcute/core",
+ "type": "module",
+ "version": "0.16.6",
+ "private": true,
+ "description": "Type-safe library for MTProto (Telegram API)",
+ "author": "alina sireneva ",
+ "license": "MIT",
+ "sideEffects": false,
+ "exports": {
+ ".": "./src/index.ts",
+ "./utils.js": "./src/utils/index.ts",
+ "./client.js": "./src/highlevel/client.ts",
+ "./worker.js": "./src/highlevel/worker/index.ts",
+ "./methods.js": "./src/highlevel/methods.ts",
+ "./platform.js": "./src/platform.ts"
+ },
+ "scripts": {
+ "build": "pnpm run -w build-package core",
+ "gen-client": "node ./scripts/generate-client.cjs",
+ "gen-updates": "node ./scripts/generate-updates.cjs"
+ },
+ "dependencies": {
+ "@mtcute/file-id": "workspace:^",
+ "@mtcute/tl": "workspace:^",
+ "@mtcute/tl-runtime": "workspace:^",
+ "@types/events": "3.0.0",
+ "events": "3.2.0",
+ "long": "5.2.3"
+ },
+ "devDependencies": {
+ "@mtcute/test": "workspace:^",
+ "@types/ws": "8.5.4",
+ "ws": "8.13.0"
+ }
}
diff --git a/packages/core/scripts/generate-app-config.cjs b/packages/core/scripts/generate-app-config.cjs
index 807c3bc3..fffd2e7b 100644
--- a/packages/core/scripts/generate-app-config.cjs
+++ b/packages/core/scripts/generate-app-config.cjs
@@ -1,5 +1,5 @@
-const fs = require('fs')
-const path = require('path')
+const fs = require('node:fs')
+const path = require('node:path')
const spec = require('@mtcute/tl/app-config.json')
@@ -12,11 +12,11 @@ out.write(`// This file is generated automatically, do not modify!
export interface AppConfigSchema {
`)
-const indent = (str) => str.split('\n').map((x) => ' ' + x).join('\n')
+const indent = str => str.split('\n').map(x => ` ${x}`).join('\n')
for (const [key, { type, description }] of Object.entries(spec)) {
- out.write(indent(description) + '\n')
- out.write(indent(`${key}?: ${type}`) + '\n')
+ out.write(`${indent(description)}\n`)
+ out.write(`${indent(`${key}?: ${type}`)}\n`)
}
out.write(' [key: string]: unknown\n')
diff --git a/packages/core/scripts/generate-client.cjs b/packages/core/scripts/generate-client.cjs
index b802bfff..2119d348 100644
--- a/packages/core/scripts/generate-client.cjs
+++ b/packages/core/scripts/generate-client.cjs
@@ -1,12 +1,14 @@
+const path = require('node:path')
+const fs = require('node:fs')
+
const ts = require('typescript')
-const path = require('path')
-const fs = require('fs')
-const updates = require('./generate-updates.cjs')
const schema = require('../../tl/api-schema.json')
+const updates = require('./generate-updates.cjs')
+
function findMethodAvailability(method) {
- const entry = schema.e.find((it) => it.kind === 'method' && it.name === method)
+ const entry = schema.e.find(it => it.kind === 'method' && it.name === method)
if (!entry) return null
return entry.available ?? null
@@ -21,7 +23,7 @@ async function* getFiles(dir) {
const res = path.resolve(dir, dirent.name)
if (dirent.isDirectory()) {
- yield* getFiles(res)
+ yield * getFiles(res)
} else {
yield res
}
@@ -73,15 +75,15 @@ function findRawApiUsages(ast, fileName) {
visitRecursively(
ast,
- (node) => node.kind === ts.SyntaxKind.CallExpression,
+ node => node.kind === ts.SyntaxKind.CallExpression,
(call) => {
if (call.expression.kind !== ts.SyntaxKind.PropertyAccessExpression) return
const prop = call.expression
if (
- prop.name.escapedText === 'call' &&
- prop.expression.kind === ts.SyntaxKind.Identifier &&
- prop.expression.escapedText === firstParamName
+ prop.name.escapedText === 'call'
+ && prop.expression.kind === ts.SyntaxKind.Identifier
+ && prop.expression.escapedText === firstParamName
) {
usages.push(call)
}
@@ -101,7 +103,7 @@ function findRawApiUsages(ast, fileName) {
)
}
- const method = arg.properties.find((it) => it.name.escapedText === '_')
+ const method = arg.properties.find(it => it.name.escapedText === '_')
if (!method || method.kind !== ts.SyntaxKind.PropertyAssignment) {
throwError(call, fileName, 'First argument to this.call() must have a _ property')
@@ -141,18 +143,18 @@ function findDependencies(ast) {
visitRecursively(
ast,
- (node) => node.kind === ts.SyntaxKind.CallExpression,
+ node => node.kind === ts.SyntaxKind.CallExpression,
(call) => {
if (call.expression.kind !== ts.SyntaxKind.PropertyAccessExpression) return
const prop = call.expression
if (
- prop.name.escapedText !== 'call' &&
- prop.name.escapedText !== '_emitError' &&
- prop.name.escapedText !== '_cachePeersFrom' &&
- prop.name.escapedText !== 'importSession' &&
- prop.name.escapedText !== 'emit' &&
- prop.expression.kind === ts.SyntaxKind.ThisKeyword
+ prop.name.escapedText !== 'call'
+ && prop.name.escapedText !== '_emitError'
+ && prop.name.escapedText !== '_cachePeersFrom'
+ && prop.name.escapedText !== 'importSession'
+ && prop.name.escapedText !== 'emit'
+ && prop.expression.kind === ts.SyntaxKind.ThisKeyword
) {
deps.add(prop.name.escapedText)
}
@@ -162,14 +164,14 @@ function findDependencies(ast) {
return [...deps]
}
-function determineCommonAvailability(methods, resolver = (v) => v) {
+function determineCommonAvailability(methods, resolver = v => v) {
let common = 'both'
for (const method of methods) {
const available = resolver(method)
if (available === null) {
- console.log('availability null for ' + method)
+ console.log(`availability null for ${method}`)
return null
}
@@ -185,7 +187,7 @@ function determineCommonAvailability(methods, resolver = (v) => v) {
}
function runEslint(targetFile) {
- require('child_process').execSync(`pnpm exec eslint --fix ${targetFile}`, {
+ require('node:child_process').execSync(`pnpm exec eslint --fix ${targetFile}`, {
stdio: 'inherit',
})
}
@@ -200,15 +202,15 @@ async function addSingleMethod(state, fileName) {
function getLeadingComments(ast) {
return (ts.getLeadingCommentRanges(fileFullText, ast.pos) || [])
- .map((range) => fileFullText.substring(range.pos, range.end))
+ .map(range => fileFullText.substring(range.pos, range.end))
.join('\n')
}
function checkForFlag(ast, flag) {
return getLeadingComments(ast)
.split('\n')
- .map((i) => i.replace(/^(\/\/|\s*\*+|\/\*\*+\s*)/g, '').trim())
- .find((i) => i.startsWith(flag))
+ .map(i => i.replace(/^(\/\/|\s*\*+|\/\*{2,}\s*)/g, '').trim())
+ .find(i => i.startsWith(flag))
}
const hasOverloads = {}
@@ -221,8 +223,8 @@ async function addSingleMethod(state, fileName) {
if (!isCopy) continue
if (
- !stmt.importClause.namedBindings ||
- stmt.importClause.namedBindings.kind !== ts.SyntaxKind.NamedImports
+ !stmt.importClause.namedBindings
+ || stmt.importClause.namedBindings.kind !== ts.SyntaxKind.NamedImports
) {
throwError(stmt, fileName, 'Only named imports are supported!')
}
@@ -236,7 +238,7 @@ async function addSingleMethod(state, fileName) {
const modName = path.basename(modFullPath)
module = path.join(path.relative(targetDir, modPath), modName).replace(/\\/g, '/') // replace path delim to unix
- if (module[0] !== '.') module = './' + module
+ if (module[0] !== '.') module = `./${module}`
}
if (module === './client') {
@@ -263,8 +265,8 @@ async function addSingleMethod(state, fileName) {
)
}
- const isExported = (stmt.modifiers || []).find((mod) => mod.kind === ts.SyntaxKind.ExportKeyword)
- const isDeclare = (stmt.modifiers || []).find((mod) => mod.kind === ts.SyntaxKind.DeclareKeyword)
+ const isExported = (stmt.modifiers || []).find(mod => mod.kind === ts.SyntaxKind.ExportKeyword)
+ const isDeclare = (stmt.modifiers || []).find(mod => mod.kind === ts.SyntaxKind.DeclareKeyword)
const isInitialize = checkForFlag(stmt, '@initialize')
const isManualImpl = checkForFlag(stmt, '@manual-impl')
const isInitializeSuper = isInitialize === 'super'
@@ -291,7 +293,7 @@ async function addSingleMethod(state, fileName) {
return available
})()
const rawApiMethods = available === null && findRawApiUsages(stmt, fileName)
- const dependencies = findDependencies(stmt).filter((it) => it !== name)
+ const dependencies = findDependencies(stmt).filter(it => it !== name)
if (isInitialize && isExported) {
throwError(isExported, fileName, 'Initialization methods must not be exported')
@@ -380,7 +382,7 @@ async function addSingleMethod(state, fileName) {
continue
}
- const isExported = (stmt.modifiers || []).find((mod) => mod.kind === ts.SyntaxKind.ExportKeyword)
+ const isExported = (stmt.modifiers || []).find(mod => mod.kind === ts.SyntaxKind.ExportKeyword)
if (isTypeExported) {
if (!isExported) {
@@ -414,7 +416,7 @@ async function addSingleMethod(state, fileName) {
})
}
} else if (stmt.kind === ts.SyntaxKind.TypeAliasDeclaration && isTypeExported) {
- const isExported = (stmt.modifiers || []).find((mod) => mod.kind === ts.SyntaxKind.ExportKeyword)
+ const isExported = (stmt.modifiers || []).find(mod => mod.kind === ts.SyntaxKind.ExportKeyword)
if (!isExported) {
throwError(stmt, fileName, 'Exported type aliases must be exported')
@@ -460,11 +462,10 @@ async function main() {
}
output.write(
- '/* eslint-disable @typescript-eslint/no-unsafe-declaration-merging, @typescript-eslint/unified-signatures */\n' +
- '/* eslint-disable @typescript-eslint/no-unsafe-argument */\n' +
- '/* THIS FILE WAS AUTO-GENERATED */\n' +
- "import EventEmitter from 'events'\n" +
- "import Long from 'long'\n",
+ '/* eslint-disable ts/no-unsafe-declaration-merging, ts/no-unsafe-argument */\n'
+ + '/* THIS FILE WAS AUTO-GENERATED */\n'
+ + "import EventEmitter from 'events'\n"
+ + "import Long from 'long'\n",
)
Object.entries(state.imports).forEach(([module, items]) => {
items = [...items]
@@ -507,7 +508,7 @@ on(name: '${type.typeName}', handler: ((upd: ${type.updateType}) => void)): this
})
output.write(`
-// eslint-disable-next-line @typescript-eslint/no-explicit-any
+// eslint-disable-next-line ts/no-explicit-any
on(name: string, handler: (...args: any[]) => void): this\n
/**
@@ -543,7 +544,7 @@ withParams(params: RpcCallOptions): this\n`)
// try to determine it automatically
const checkDepsAvailability = (deps) => {
return determineCommonAvailability(deps, (name) => {
- const method = state.methods.list.find((it) => it.name === name && !it.overload)
+ const method = state.methods.list.find(it => it.name === name && !it.overload)
if (!method) {
throwError(
@@ -572,12 +573,12 @@ withParams(params: RpcCallOptions): this\n`)
// create method that calls that function and passes `this`
// first let's determine the signature
- const returnType = func.type ? ': ' + func.type.getText() : ''
- const generics = func.typeParameters ?
- `<${func.typeParameters.map((it) => it.getFullText()).join(', ')}>` :
- ''
+ const returnType = func.type ? `: ${func.type.getText()}` : ''
+ const generics = func.typeParameters
+ ? `<${func.typeParameters.map(it => it.getFullText()).join(', ')}>`
+ : ''
const rawParams = (func.parameters || []).filter(
- (it) => !it.type || it.type.getText() !== 'ITelegramClient',
+ it => !it.type || it.type.getText() !== 'ITelegramClient',
)
const parameters = rawParams
.map((it) => {
@@ -589,16 +590,16 @@ withParams(params: RpcCallOptions): this\n`)
// no explicit type.
// infer from initializer
if (
- it.initializer.kind === ts.SyntaxKind.TrueKeyword ||
- it.initializer.kind === ts.SyntaxKind.FalseKeyword
+ it.initializer.kind === ts.SyntaxKind.TrueKeyword
+ || it.initializer.kind === ts.SyntaxKind.FalseKeyword
) {
it.type = { kind: ts.SyntaxKind.BooleanKeyword }
} else if (it.initializer.kind === ts.SyntaxKind.StringLiteral) {
it.type = { kind: ts.SyntaxKind.StringKeyword }
} else if (
- it.initializer.kind === ts.SyntaxKind.NumericLiteral ||
- (it.initializer.kind === ts.SyntaxKind.Identifier &&
- (it.initializer.escapedText === 'NaN' || it.initializer.escapedText === 'Infinity'))
+ it.initializer.kind === ts.SyntaxKind.NumericLiteral
+ || (it.initializer.kind === ts.SyntaxKind.Identifier
+ && (it.initializer.escapedText === 'NaN' || it.initializer.escapedText === 'Infinity'))
) {
it.type = { kind: ts.SyntaxKind.NumberKeyword }
} else {
@@ -609,7 +610,7 @@ withParams(params: RpcCallOptions): this\n`)
const deleteParents = (obj) => {
if (Array.isArray(obj)) {
- return obj.forEach((it) => deleteParents(it))
+ return obj.forEach(it => deleteParents(it))
}
if (obj.parent) delete obj.parent
@@ -637,15 +638,16 @@ withParams(params: RpcCallOptions): this\n`)
// remove @internal mark and set default values for parameters
comment = comment
- .replace(/^\s*\/\/+\s*@(alias|available|manual).*$/gm, '')
- .replace(/(\n^|\/\*)\s*\*\s*@internal.*/m, '')
- .replace(/((?:\n^|\/\*)\s*\*\s*@param )([^\s]+?)($|\s+)/gm, (_, pref, arg, post) => {
- const param = rawParams.find((it) => it.name.escapedText === arg)
+ .replace(/^\s*\/{2,}\s*@(alias|available|manual).*$/gm, '')
+ .replace(/(\n|\/\*)\s*\*\s*@internal.*/, '')
+ .replace(/((?:\n|\/\*)\s*\*\s*@param )(\S+)($|\s+)/gm, (_, pref, arg, post) => {
+ const param = rawParams.find(it => it.name.escapedText === arg)
if (!param) return _
if (!param._savedDefault) return _
return `${pref}[${arg}=${param._savedDefault.trim()}]${post}`
})
+ // eslint-disable-next-line regexp/optimal-lookaround-quantifier
.replace(/(?<=\/\*.*)(?=\n\s*\*\s*(?:@[a-z]+|\/))/s, () => {
switch (available) {
case 'user':
@@ -663,7 +665,7 @@ withParams(params: RpcCallOptions): this\n`)
if (!hasOverloads) {
if (!comment.match(/\/\*\*?\s*\*\//)) {
// empty comment, no need to write it
- output.write(comment + '\n')
+ output.write(`${comment}\n`)
}
output.write(`${name}${generics}(${parameters})${returnType}\n`)
@@ -696,11 +698,11 @@ withParams(params: RpcCallOptions): this\n`)
output.write('constructor(opts: TelegramClientOptions) {\n')
output.write(' super()\n')
state.init.forEach((code) => {
- output.write(code + '\n')
+ output.write(`${code}\n`)
})
output.write('}\n')
- classContents.forEach((line) => output.write(line + '\n'))
+ classContents.forEach(line => output.write(`${line}\n`))
output.write(` withParams(params: RpcCallOptions): this {
return withParams(this, params)
@@ -708,7 +710,7 @@ withParams(params: RpcCallOptions): this\n`)
output.write('}\n')
- classProtoDecls.forEach((line) => output.write(line + '\n'))
+ classProtoDecls.forEach(line => output.write(`${line}\n`))
// proxied methods
;[
'prepare',
@@ -736,18 +738,18 @@ withParams(params: RpcCallOptions): this\n`)
'changePrimaryDc',
].forEach((name) => {
output.write(
- `TelegramClient.prototype.${name} = function(...args) {\n` +
- ` return this._client.${name}(...args)\n` +
- '}\n',
+ `TelegramClient.prototype.${name} = function(...args) {\n`
+ + ` return this._client.${name}(...args)\n`
+ + '}\n',
)
})
// disabled methods - they are used internally and we don't want to expose them
// if the user *really* needs them, they can use `client._client` to access the underlying client
;['onServerUpdate', 'onUpdate'].forEach((name) => {
output.write(
- `TelegramClient.prototype.${name} = function() {\n` +
- ` throw new Error('${name} is not available for TelegramClient, use .on() methods instead')\n` +
- '}\n',
+ `TelegramClient.prototype.${name} = function() {\n`
+ + ` throw new Error('${name} is not available for TelegramClient, use .on() methods instead')\n`
+ + '}\n',
)
})
state.impls.forEach(({ name, code }) => output.write(`TelegramClient.prototype.${name} = ${code}\n`))
diff --git a/packages/core/scripts/generate-updates.cjs b/packages/core/scripts/generate-updates.cjs
index e33c65b7..2e16ce70 100644
--- a/packages/core/scripts/generate-updates.cjs
+++ b/packages/core/scripts/generate-updates.cjs
@@ -1,17 +1,17 @@
-const fs = require('fs')
-const path = require('path')
+const fs = require('node:fs')
+const path = require('node:path')
-const snakeToCamel = (s) => {
+function snakeToCamel(s) {
return s.replace(/(? {
return $1.substr(1).toUpperCase()
})
}
-const camelToPascal = (s) => s[0].toUpperCase() + s.substr(1)
+const camelToPascal = s => s[0].toUpperCase() + s.substr(1)
-const camelToSnake = (s) => {
+function camelToSnake(s) {
return s.replace(/(?<=[a-zA-Z0-9])([A-Z0-9]+(?=[A-Z]|$)|[A-Z0-9])/g, ($1) => {
- return '_' + $1.toLowerCase()
+ return `_${$1.toLowerCase()}`
})
}
@@ -19,8 +19,8 @@ function parseUpdateTypes() {
const lines = fs
.readFileSync(path.join(__dirname, 'update-types.txt'), 'utf-8')
.split('\n')
- .map((it) => it.trim())
- .filter((it) => it && it[0] !== '#')
+ .map(it => it.trim())
+ .filter(it => it && it[0] !== '#')
const ret = []
@@ -41,11 +41,11 @@ function parseUpdateTypes() {
}
function replaceSections(filename, sections, dir = __dirname) {
- let lines = fs.readFileSync(path.join(dir, '../src', filename), 'utf-8').split('\n')
+ const lines = fs.readFileSync(path.join(dir, '../src', filename), 'utf-8').split('\n')
const findMarker = (marker) => {
- const idx = lines.findIndex((line) => line.trim() === `// ${marker}`)
- if (idx === -1) throw new Error(marker + ' not found')
+ const idx = lines.findIndex(line => line.trim() === `// ${marker}`)
+ if (idx === -1) throw new Error(`${marker} not found`)
return idx
}
@@ -79,8 +79,8 @@ function toSentence(type, stype = 'inline') {
function generateParsedUpdate() {
replaceSections('highlevel/types/updates/index.ts', {
codegen:
- 'export type ParsedUpdate =\n' +
- types.map((typ) => ` | { name: '${typ.typeName}'; data: ${typ.updateType} }\n`).join(''),
+ `export type ParsedUpdate =\n${
+ types.map(typ => ` | { name: '${typ.typeName}'; data: ${typ.updateType} }\n`).join('')}`,
})
}
diff --git a/packages/core/src/highlevel/base.test.ts b/packages/core/src/highlevel/base.test.ts
index 8447405a..4aeef310 100644
--- a/packages/core/src/highlevel/base.test.ts
+++ b/packages/core/src/highlevel/base.test.ts
@@ -1,5 +1,4 @@
import { describe, expect, it } from 'vitest'
-
import { StubTelegramClient } from '@mtcute/test'
describe('BaseTelegramClient', () => {
diff --git a/packages/core/src/highlevel/base.ts b/packages/core/src/highlevel/base.ts
index f6708d9a..c04052b2 100644
--- a/packages/core/src/highlevel/base.ts
+++ b/packages/core/src/highlevel/base.ts
@@ -1,30 +1,35 @@
-/* eslint-disable @typescript-eslint/require-await */
-import { mtp, tl } from '@mtcute/tl'
+import type { mtp } from '@mtcute/tl'
+import { tl } from '@mtcute/tl'
-import { MtClient, MtClientOptions } from '../network/client.js'
-import { ConnectionKind, RpcCallOptions } from '../network/network-manager.js'
-import { StorageManagerExtraOptions } from '../storage/storage.js'
+import type { MtClientOptions } from '../network/client.js'
+import { MtClient } from '../network/client.js'
+import type { ConnectionKind, RpcCallOptions } from '../network/network-manager.js'
+import type { StorageManagerExtraOptions } from '../storage/storage.js'
import { MtArgumentError } from '../types/errors.js'
-import { MustEqual } from '../types/utils.js'
+import type { MustEqual } from '../types/utils.js'
import { reportUnknownError } from '../utils/error-reporting.js'
+import type {
+ ICryptoProvider,
+ Logger,
+ StringSessionData,
+} from '../utils/index.js'
import {
asyncResettable,
computeNewPasswordHash,
computeSrpParams,
- ICryptoProvider,
isTlRpcError,
- Logger,
readStringSession,
- StringSessionData,
writeStringSession,
} from '../utils/index.js'
import { LogManager } from '../utils/logger.js'
-import { ConnectionState, ITelegramClient, ServerUpdateHandler } from './client.types.js'
+
+import type { ConnectionState, ITelegramClient, ServerUpdateHandler } from './client.types.js'
import { AppConfigManager } from './managers/app-config-manager.js'
-import { ITelegramStorageProvider } from './storage/provider.js'
-import { TelegramStorageManager, TelegramStorageManagerExtraOptions } from './storage/storage.js'
+import type { ITelegramStorageProvider } from './storage/provider.js'
+import type { TelegramStorageManagerExtraOptions } from './storage/storage.js'
+import { TelegramStorageManager } from './storage/storage.js'
import { UpdatesManager } from './updates/manager.js'
-import { RawUpdateHandler, UpdatesManagerParams } from './updates/types.js'
+import type { RawUpdateHandler, UpdatesManagerParams } from './updates/types.js'
export interface BaseTelegramClientOptions extends MtClientOptions {
storage: ITelegramStorageProvider
@@ -88,6 +93,7 @@ export class BaseTelegramClient implements ITelegramClient {
...this.params.storageOptions,
})
}
+
readonly appConfig = new AppConfigManager(this)
private _prepare = asyncResettable(async () => {
@@ -197,6 +203,7 @@ export class BaseTelegramClient implements ITelegramClient {
const res = await this.mt.call(message, params)
if (isTlRpcError(res)) {
+ // eslint-disable-next-line unicorn/error-message
const error = makeRpcError(res, new Error().stack ?? '', message._)
if (error.unknown && this.params.enableErrorReporting) {
@@ -208,7 +215,7 @@ export class BaseTelegramClient implements ITelegramClient {
await this.storage.peers.updatePeersFrom(res)
- // eslint-disable-next-line @typescript-eslint/no-unsafe-return
+ // eslint-disable-next-line ts/no-unsafe-return
return res
}
@@ -233,9 +240,9 @@ export class BaseTelegramClient implements ITelegramClient {
if (data.testMode && !this.params.testMode) {
throw new Error(
- 'This session string is not for the current backend. ' +
- `Session is ${data.testMode ? 'test' : 'prod'}, ` +
- `but the client is ${this.params.testMode ? 'test' : 'prod'}`,
+ 'This session string is not for the current backend. '
+ + `Session is ${data.testMode ? 'test' : 'prod'}, `
+ + `but the client is ${this.params.testMode ? 'test' : 'prod'}`,
)
}
@@ -346,6 +353,7 @@ export class BaseTelegramClient implements ITelegramClient {
computeSrpParams(request: tl.account.RawPassword, password: string): Promise {
return computeSrpParams(this.crypto, request, password)
}
+
computeNewPasswordHash(algo: tl.TypePasswordKdfAlgo, password: string): Promise {
return computeNewPasswordHash(this.crypto, algo, password)
}
diff --git a/packages/core/src/highlevel/client.ts b/packages/core/src/highlevel/client.ts
index fa5409b6..53bb083c 100644
--- a/packages/core/src/highlevel/client.ts
+++ b/packages/core/src/highlevel/client.ts
@@ -1,29 +1,38 @@
-/* eslint-disable @typescript-eslint/no-unsafe-declaration-merging, @typescript-eslint/unified-signatures */
-/* eslint-disable @typescript-eslint/no-unsafe-argument */
+/* eslint-disable ts/no-unsafe-declaration-merging, ts/no-unsafe-argument */
/* THIS FILE WAS AUTO-GENERATED */
-import EventEmitter from 'events'
-import Long from 'long'
+import EventEmitter from 'node:events'
-import { tdFileId } from '@mtcute/file-id'
-import { tl } from '@mtcute/tl'
+import type Long from 'long'
+import type { tdFileId } from '@mtcute/file-id'
+import type { tl } from '@mtcute/tl'
-import { RpcCallOptions } from '../network/index.js'
-import { MaybeArray, MaybePromise, MtUnsupportedError, PartialExcept, PartialOnly } from '../types/index.js'
-import { BaseTelegramClient, BaseTelegramClientOptions } from './base.js'
-import { ITelegramClient } from './client.types.js'
+import type { RpcCallOptions } from '../network/index.js'
+import type { MaybeArray, MaybePromise, PartialExcept, PartialOnly } from '../types/index.js'
+import { MtUnsupportedError } from '../types/index.js'
+
+import type { BaseTelegramClientOptions } from './base.js'
+import { BaseTelegramClient } from './base.js'
+import type { ITelegramClient } from './client.types.js'
+import type { AllStories, ArrayPaginated, ArrayWithTotal, Boost, BoostSlot, BoostStats, BotChatJoinRequestUpdate, BotCommands, BotReactionCountUpdate, BotReactionUpdate, BotStoppedUpdate, BusinessCallbackQuery, BusinessChatLink, BusinessConnection, BusinessMessage, BusinessWorkHoursDay, CallbackQuery, Chat, ChatEvent, ChatInviteLink, ChatInviteLinkMember, ChatJoinRequestUpdate, ChatMember, ChatMemberUpdate, ChatPreview, ChatlistPreview, ChosenInlineResult, CollectibleInfo, DeleteBusinessMessageUpdate, DeleteMessageUpdate, DeleteStoryUpdate, Dialog, FactCheck, FileDownloadLocation, FileDownloadParameters, ForumTopic, FullChat, GameHighScore, HistoryReadUpdate, InlineCallbackQuery, InlineQuery, InputChatEventFilters, InputDialogFolder, InputFileLike, InputInlineResult, InputMediaLike, InputMediaSticker, InputMessageId, InputPeerLike, InputPrivacyRule, InputReaction, InputStickerSet, InputStickerSetItem, InputText, MaybeDynamic, Message, MessageEffect, MessageMedia, MessageReactions, ParametersSkip2, ParsedUpdate, PeerReaction, PeerStories, PeersIndex, Photo, Poll, PollUpdate, PollVoteUpdate, PreCheckoutQuery, RawDocument, ReplyMarkup, SentCode, Sticker, StickerSet, StickerSourceType, StickerType, StoriesStealthMode, Story, StoryInteractions, StoryUpdate, StoryViewer, StoryViewersList, TakeoutSession, TextWithEntities, TypingStatus, UploadFileLike, UploadedFile, User, UserStatusUpdate, UserTypingUpdate } from './types/index.js'
+import type { StringSessionData } from './utils/string-session.js'
+import type { ITelegramStorageProvider } from './storage/provider.js'
+import { Conversation } from './types/conversation.js'
+import type { ParsedUpdateHandlerParams } from './updates/parsed.js'
+import { makeParsedUpdateHandler } from './updates/parsed.js'
import { checkPassword } from './methods/auth/check-password.js'
import { getPasswordHint } from './methods/auth/get-password-hint.js'
-import { logOut, LogOutResult } from './methods/auth/log-out.js'
+import type { LogOutResult } from './methods/auth/log-out.js'
+import { logOut } from './methods/auth/log-out.js'
import { recoverPassword } from './methods/auth/recover-password.js'
import { resendCode } from './methods/auth/resend-code.js'
import { run } from './methods/auth/run.js'
import { sendCode } from './methods/auth/send-code.js'
import { sendRecoveryCode } from './methods/auth/send-recovery-code.js'
-import { signIn } from './methods/auth/sign-in.js'
import { signInBot } from './methods/auth/sign-in-bot.js'
import { signInQr } from './methods/auth/sign-in-qr.js'
-import { start } from './methods/auth/start.js'
+import { signIn } from './methods/auth/sign-in.js'
import { startTest } from './methods/auth/start-test.js'
+import { start } from './methods/auth/start.js'
import { isSelfPeer } from './methods/auth/utils.js'
import { answerCallbackQuery } from './methods/bots/answer-callback-query.js'
import { answerInlineQuery } from './methods/bots/answer-inline-query.js'
@@ -43,7 +52,8 @@ import { addChatMembers } from './methods/chats/add-chat-members.js'
import { archiveChats } from './methods/chats/archive-chats.js'
import { banChatMember } from './methods/chats/ban-chat-member.js'
import { createChannel } from './methods/chats/create-channel.js'
-import { createGroup, CreateGroupResult } from './methods/chats/create-group.js'
+import type { CreateGroupResult } from './methods/chats/create-group.js'
+import { createGroup } from './methods/chats/create-group.js'
import { createSupergroup } from './methods/chats/create-supergroup.js'
import { deleteChannel } from './methods/chats/delete-channel.js'
import { deleteChatPhoto } from './methods/chats/delete-chat-photo.js'
@@ -51,11 +61,11 @@ import { deleteGroup } from './methods/chats/delete-group.js'
import { deleteHistory } from './methods/chats/delete-history.js'
import { deleteUserHistory } from './methods/chats/delete-user-history.js'
import { editAdminRights } from './methods/chats/edit-admin-rights.js'
-import { getChat } from './methods/chats/get-chat.js'
import { getChatEventLog } from './methods/chats/get-chat-event-log.js'
import { getChatMember } from './methods/chats/get-chat-member.js'
import { getChatMembers } from './methods/chats/get-chat-members.js'
import { getChatPreview } from './methods/chats/get-chat-preview.js'
+import { getChat } from './methods/chats/get-chat.js'
import { getFullChat } from './methods/chats/get-full-chat.js'
import { getNearbyChats } from './methods/chats/get-nearby-chats.js'
import { getSimilarChannels } from './methods/chats/get-similar-channels.js'
@@ -108,20 +118,22 @@ import { uploadMedia } from './methods/files/upload-media.js'
import { createForumTopic } from './methods/forums/create-forum-topic.js'
import { deleteForumTopicHistory } from './methods/forums/delete-forum-topic-history.js'
import { editForumTopic } from './methods/forums/edit-forum-topic.js'
-import { getForumTopics, GetForumTopicsOffset } from './methods/forums/get-forum-topics.js'
import { getForumTopicsById } from './methods/forums/get-forum-topics-by-id.js'
+import type { GetForumTopicsOffset } from './methods/forums/get-forum-topics.js'
+import { getForumTopics } from './methods/forums/get-forum-topics.js'
import { iterForumTopics } from './methods/forums/iter-forum-topics.js'
import { reorderPinnedForumTopics } from './methods/forums/reorder-pinned-forum-topics.js'
-import { toggleForum } from './methods/forums/toggle-forum.js'
import { toggleForumTopicClosed } from './methods/forums/toggle-forum-topic-closed.js'
import { toggleForumTopicPinned } from './methods/forums/toggle-forum-topic-pinned.js'
+import { toggleForum } from './methods/forums/toggle-forum.js'
import { toggleGeneralTopicHidden } from './methods/forums/toggle-general-topic-hidden.js'
import { createInviteLink } from './methods/invite-links/create-invite-link.js'
import { editInviteLink } from './methods/invite-links/edit-invite-link.js'
import { exportInviteLink } from './methods/invite-links/export-invite-link.js'
-import { getInviteLink } from './methods/invite-links/get-invite-link.js'
import { getInviteLinkMembers } from './methods/invite-links/get-invite-link-members.js'
-import { getInviteLinks, GetInviteLinksOffset } from './methods/invite-links/get-invite-links.js'
+import { getInviteLink } from './methods/invite-links/get-invite-link.js'
+import type { GetInviteLinksOffset } from './methods/invite-links/get-invite-links.js'
+import { getInviteLinks } from './methods/invite-links/get-invite-links.js'
import { getPrimaryInviteLink } from './methods/invite-links/get-primary-invite-link.js'
import { hideAllJoinRequests } from './methods/invite-links/hide-all-join-requests.js'
import { hideJoinRequest } from './methods/invite-links/hide-join-request.js'
@@ -129,23 +141,27 @@ import { iterInviteLinkMembers } from './methods/invite-links/iter-invite-link-m
import { iterInviteLinks } from './methods/invite-links/iter-invite-links.js'
import { revokeInviteLink } from './methods/invite-links/revoke-invite-link.js'
import { closePoll } from './methods/messages/close-poll.js'
-import { deleteMessages, deleteMessagesById, DeleteMessagesParams } from './methods/messages/delete-messages.js'
+import type { DeleteMessagesParams } from './methods/messages/delete-messages.js'
+import { deleteMessages, deleteMessagesById } from './methods/messages/delete-messages.js'
import { deleteScheduledMessages } from './methods/messages/delete-scheduled-messages.js'
import { editInlineMessage } from './methods/messages/edit-inline-message.js'
import { editMessage } from './methods/messages/edit-message.js'
-import { ForwardMessageOptions, forwardMessages, forwardMessagesById } from './methods/messages/forward-messages.js'
+import type { ForwardMessageOptions } from './methods/messages/forward-messages.js'
+import { forwardMessages, forwardMessagesById } from './methods/messages/forward-messages.js'
import { getAllScheduledMessages } from './methods/messages/get-all-scheduled-messages.js'
import { getAvailableMessageEffects } from './methods/messages/get-available-effects.js'
import { getCallbackQueryMessage } from './methods/messages/get-callback-query-message.js'
import { getDiscussionMessage } from './methods/messages/get-discussion-message.js'
import { getFactCheck } from './methods/messages/get-fact-check.js'
-import { getHistory, GetHistoryOffset } from './methods/messages/get-history.js'
+import type { GetHistoryOffset } from './methods/messages/get-history.js'
+import { getHistory } from './methods/messages/get-history.js'
import { getMessageByLink } from './methods/messages/get-message-by-link.js'
import { getMessageGroup } from './methods/messages/get-message-group.js'
import { getMessageReactions, getMessageReactionsById } from './methods/messages/get-message-reactions.js'
-import { getMessages } from './methods/messages/get-messages.js'
import { getMessagesUnsafe } from './methods/messages/get-messages-unsafe.js'
-import { getReactionUsers, GetReactionUsersOffset } from './methods/messages/get-reaction-users.js'
+import { getMessages } from './methods/messages/get-messages.js'
+import type { GetReactionUsersOffset } from './methods/messages/get-reaction-users.js'
+import { getReactionUsers } from './methods/messages/get-reaction-users.js'
import { getReplyTo } from './methods/messages/get-reply-to.js'
import { getScheduledMessages } from './methods/messages/get-scheduled-messages.js'
import { iterHistory } from './methods/messages/iter-history.js'
@@ -155,17 +171,23 @@ import { iterSearchMessages } from './methods/messages/iter-search-messages.js'
import { pinMessage } from './methods/messages/pin-message.js'
import { readHistory } from './methods/messages/read-history.js'
import { readReactions } from './methods/messages/read-reactions.js'
-import { searchGlobal, SearchGlobalOffset } from './methods/messages/search-global.js'
-import { iterSearchHashtag, searchHashtag, SearchHashtagOffset } from './methods/messages/search-hashtag.js'
-import { searchMessages, SearchMessagesOffset } from './methods/messages/search-messages.js'
+import type { SearchGlobalOffset } from './methods/messages/search-global.js'
+import { searchGlobal } from './methods/messages/search-global.js'
+import type { SearchHashtagOffset } from './methods/messages/search-hashtag.js'
+import { iterSearchHashtag, searchHashtag } from './methods/messages/search-hashtag.js'
+import type { SearchMessagesOffset } from './methods/messages/search-messages.js'
+import { searchMessages } from './methods/messages/search-messages.js'
import { answerMedia, answerMediaGroup, answerText } from './methods/messages/send-answer.js'
import { commentMedia, commentMediaGroup, commentText } from './methods/messages/send-comment.js'
-import { CommonSendParams } from './methods/messages/send-common.js'
-import { sendCopy, SendCopyParams } from './methods/messages/send-copy.js'
-import { sendCopyGroup, SendCopyGroupParams } from './methods/messages/send-copy-group.js'
-import { sendMedia } from './methods/messages/send-media.js'
+import type { CommonSendParams } from './methods/messages/send-common.js'
+import type { SendCopyGroupParams } from './methods/messages/send-copy-group.js'
+import { sendCopyGroup } from './methods/messages/send-copy-group.js'
+import type { SendCopyParams } from './methods/messages/send-copy.js'
+import { sendCopy } from './methods/messages/send-copy.js'
import { sendMediaGroup } from './methods/messages/send-media-group.js'
-import { QuoteParamsFrom, quoteWithMedia, quoteWithMediaGroup, quoteWithText } from './methods/messages/send-quote.js'
+import { sendMedia } from './methods/messages/send-media.js'
+import type { QuoteParamsFrom } from './methods/messages/send-quote.js'
+import { quoteWithMedia, quoteWithMediaGroup, quoteWithText } from './methods/messages/send-quote.js'
import { sendReaction } from './methods/messages/send-reaction.js'
import { replyMedia, replyMediaGroup, replyText } from './methods/messages/send-reply.js'
import { sendScheduled } from './methods/messages/send-scheduled.js'
@@ -179,13 +201,13 @@ import { unpinMessage } from './methods/messages/unpin-message.js'
import { getCollectibleInfo } from './methods/misc/get-collectible-info.js'
import { initTakeoutSession } from './methods/misc/init-takeout-session.js'
import { _normalizePrivacyRules } from './methods/misc/normalize-privacy-rules.js'
-import { withParams } from './methods/misc/with-params.js'
import { changeCloudPassword } from './methods/password/change-cloud-password.js'
import { enableCloudPassword } from './methods/password/enable-cloud-password.js'
import { cancelPasswordEmail, resendPasswordEmail, verifyPasswordEmail } from './methods/password/password-email.js'
import { removeCloudPassword } from './methods/password/remove-cloud-password.js'
import { applyBoost } from './methods/premium/apply-boost.js'
-import { canApplyBoost, CanApplyBoostResult } from './methods/premium/can-apply-boost.js'
+import type { CanApplyBoostResult } from './methods/premium/can-apply-boost.js'
+import { canApplyBoost } from './methods/premium/can-apply-boost.js'
import { createBusinessChatLink } from './methods/premium/create-business-chat-link.js'
import { deleteBusinessChatLink, editBusinessChatLink } from './methods/premium/edit-business-chat-link.js'
import { getBoostStats } from './methods/premium/get-boost-stats.js'
@@ -207,7 +229,8 @@ import { moveStickerInSet } from './methods/stickers/move-sticker-in-set.js'
import { replaceStickerInSet } from './methods/stickers/replace-sticker-in-set.js'
import { setChatStickerSet } from './methods/stickers/set-chat-sticker-set.js'
import { setStickerSetThumb } from './methods/stickers/set-sticker-set-thumb.js'
-import { canSendStory, CanSendStoryResult } from './methods/stories/can-send-story.js'
+import type { CanSendStoryResult } from './methods/stories/can-send-story.js'
+import { canSendStory } from './methods/stories/can-send-story.js'
import { deleteStories } from './methods/stories/delete-stories.js'
import { editStory } from './methods/stories/edit-story.js'
import { getAllStories } from './methods/stories/get-all-stories.js'
@@ -224,8 +247,8 @@ import { iterProfileStories } from './methods/stories/iter-profile-stories.js'
import { iterStoryViewers } from './methods/stories/iter-story-viewers.js'
import { readStories } from './methods/stories/read-stories.js'
import { reportStory } from './methods/stories/report-story.js'
-import { sendStory } from './methods/stories/send-story.js'
import { sendStoryReaction } from './methods/stories/send-story-reaction.js'
+import { sendStory } from './methods/stories/send-story.js'
import { togglePeerStoriesArchived } from './methods/stories/toggle-peer-stories-archived.js'
import { toggleStoriesPinned } from './methods/stories/toggle-stories-pinned.js'
import { blockUser } from './methods/users/block-user.js'
@@ -239,8 +262,8 @@ import { getProfilePhoto } from './methods/users/get-profile-photo.js'
import { getProfilePhotos } from './methods/users/get-profile-photos.js'
import { getUsers } from './methods/users/get-users.js'
import { iterProfilePhotos } from './methods/users/iter-profile-photos.js'
-import { resolveChannel, resolvePeer, resolveUser } from './methods/users/resolve-peer.js'
import { resolvePeerMany } from './methods/users/resolve-peer-many.js'
+import { resolveChannel, resolvePeer, resolveUser } from './methods/users/resolve-peer.js'
import { setGlobalTtl } from './methods/users/set-global-ttl.js'
import { setMyBirthday } from './methods/users/set-my-birthday.js'
import { setMyEmojiStatus } from './methods/users/set-my-emoji-status.js'
@@ -249,116 +272,21 @@ import { setMyUsername } from './methods/users/set-my-username.js'
import { setOffline } from './methods/users/set-offline.js'
import { unblockUser } from './methods/users/unblock-user.js'
import { updateProfile } from './methods/users/update-profile.js'
-import { ITelegramStorageProvider } from './storage/provider.js'
-import { Conversation } from './types/conversation.js'
-import {
- AllStories,
- ArrayPaginated,
- ArrayWithTotal,
- Boost,
- BoostSlot,
- BoostStats,
- BotChatJoinRequestUpdate,
- BotCommands,
- BotReactionCountUpdate,
- BotReactionUpdate,
- BotStoppedUpdate,
- BusinessCallbackQuery,
- BusinessChatLink,
- BusinessConnection,
- BusinessMessage,
- BusinessWorkHoursDay,
- CallbackQuery,
- Chat,
- ChatEvent,
- ChatInviteLink,
- ChatInviteLinkMember,
- ChatJoinRequestUpdate,
- ChatlistPreview,
- ChatMember,
- ChatMemberUpdate,
- ChatPreview,
- ChosenInlineResult,
- CollectibleInfo,
- DeleteBusinessMessageUpdate,
- DeleteMessageUpdate,
- DeleteStoryUpdate,
- Dialog,
- FactCheck,
- FileDownloadLocation,
- FileDownloadParameters,
- ForumTopic,
- FullChat,
- GameHighScore,
- HistoryReadUpdate,
- InlineCallbackQuery,
- InlineQuery,
- InputChatEventFilters,
- InputDialogFolder,
- InputFileLike,
- InputInlineResult,
- InputMediaLike,
- InputMediaSticker,
- InputMessageId,
- InputPeerLike,
- InputPrivacyRule,
- InputReaction,
- InputStickerSet,
- InputStickerSetItem,
- InputText,
- MaybeDynamic,
- Message,
- MessageEffect,
- MessageMedia,
- MessageReactions,
- ParametersSkip2,
- ParsedUpdate,
- PeerReaction,
- PeersIndex,
- PeerStories,
- Photo,
- Poll,
- PollUpdate,
- PollVoteUpdate,
- PreCheckoutQuery,
- RawDocument,
- ReplyMarkup,
- SentCode,
- Sticker,
- StickerSet,
- StickerSourceType,
- StickerType,
- StoriesStealthMode,
- Story,
- StoryInteractions,
- StoryUpdate,
- StoryViewer,
- StoryViewersList,
- TakeoutSession,
- TextWithEntities,
- TypingStatus,
- UploadedFile,
- UploadFileLike,
- User,
- UserStatusUpdate,
- UserTypingUpdate,
-} from './types/index.js'
-import { makeParsedUpdateHandler, ParsedUpdateHandlerParams } from './updates/parsed.js'
-import { StringSessionData } from './utils/string-session.js'
+import { withParams } from './methods/misc/with-params.js'
// from methods/_init.ts
// @copy
type TelegramClientOptions = (
| (PartialOnly, 'transport' | 'crypto'> & {
- /**
- * Storage to use for this client.
- *
- * If a string is passed, it will be used as
- * a name for the default platform-specific storage provider to use.
- *
- * @default `"client.session"`
- */
- storage?: string | ITelegramStorageProvider
- })
+ /**
+ * Storage to use for this client.
+ *
+ * If a string is passed, it will be used as
+ * a name for the default platform-specific storage provider to use.
+ *
+ * @default `"client.session"`
+ */
+ storage?: string | ITelegramStorageProvider
+ })
| { client: ITelegramClient }
) & {
/**
@@ -380,218 +308,218 @@ type TelegramClientOptions = (
}
export interface TelegramClient extends ITelegramClient {
- /**
- * Register a raw update handler
- *
- * @param name Event name
- * @param handler Raw update handler
- */
- on(name: 'raw_update', handler: (upd: tl.TypeUpdate | tl.TypeMessage, peers: PeersIndex) => void): this
+/**
+ * Register a raw update handler
+ *
+ * @param name Event name
+ * @param handler Raw update handler
+ */
+ on(name: 'raw_update', handler: ((upd: tl.TypeUpdate | tl.TypeMessage, peers: PeersIndex) => void)): this
/**
* Register a parsed update handler
*
* @param name Event name
* @param handler Raw update handler
*/
- on(name: 'update', handler: (upd: ParsedUpdate) => void): this
+ on(name: 'update', handler: ((upd: ParsedUpdate) => void)): this
/**
* Register a new message handler
*
* @param name Event name
* @param handler New message handler
*/
- on(name: 'new_message', handler: (upd: Message) => void): this
+ on(name: 'new_message', handler: ((upd: Message) => void)): this
/**
* Register an edit message handler
*
* @param name Event name
* @param handler Edit message handler
*/
- on(name: 'edit_message', handler: (upd: Message) => void): this
+ on(name: 'edit_message', handler: ((upd: Message) => void)): this
/**
* Register a message group handler
*
* @param name Event name
* @param handler Message group handler
*/
- on(name: 'message_group', handler: (upd: Message[]) => void): this
+ on(name: 'message_group', handler: ((upd: Message[]) => void)): this
/**
* Register a delete message handler
*
* @param name Event name
* @param handler Delete message handler
*/
- on(name: 'delete_message', handler: (upd: DeleteMessageUpdate) => void): this
+ on(name: 'delete_message', handler: ((upd: DeleteMessageUpdate) => void)): this
/**
* Register a chat member update handler
*
* @param name Event name
* @param handler Chat member update handler
*/
- on(name: 'chat_member', handler: (upd: ChatMemberUpdate) => void): this
+ on(name: 'chat_member', handler: ((upd: ChatMemberUpdate) => void)): this
/**
* Register an inline query handler
*
* @param name Event name
* @param handler Inline query handler
*/
- on(name: 'inline_query', handler: (upd: InlineQuery) => void): this
+ on(name: 'inline_query', handler: ((upd: InlineQuery) => void)): this
/**
* Register a chosen inline result handler
*
* @param name Event name
* @param handler Chosen inline result handler
*/
- on(name: 'chosen_inline_result', handler: (upd: ChosenInlineResult) => void): this
+ on(name: 'chosen_inline_result', handler: ((upd: ChosenInlineResult) => void)): this
/**
* Register a callback query handler
*
* @param name Event name
* @param handler Callback query handler
*/
- on(name: 'callback_query', handler: (upd: CallbackQuery) => void): this
+ on(name: 'callback_query', handler: ((upd: CallbackQuery) => void)): this
/**
* Register an inline callback query handler
*
* @param name Event name
* @param handler Inline callback query handler
*/
- on(name: 'inline_callback_query', handler: (upd: InlineCallbackQuery) => void): this
+ on(name: 'inline_callback_query', handler: ((upd: InlineCallbackQuery) => void)): this
/**
* Register a business callback query handler
*
* @param name Event name
* @param handler Business callback query handler
*/
- on(name: 'business_callback_query', handler: (upd: BusinessCallbackQuery) => void): this
+ on(name: 'business_callback_query', handler: ((upd: BusinessCallbackQuery) => void)): this
/**
* Register a poll update handler
*
* @param name Event name
* @param handler Poll update handler
*/
- on(name: 'poll', handler: (upd: PollUpdate) => void): this
+ on(name: 'poll', handler: ((upd: PollUpdate) => void)): this
/**
* Register a poll vote handler
*
* @param name Event name
* @param handler Poll vote handler
*/
- on(name: 'poll_vote', handler: (upd: PollVoteUpdate) => void): this
+ on(name: 'poll_vote', handler: ((upd: PollVoteUpdate) => void)): this
/**
* Register an user status update handler
*
* @param name Event name
* @param handler User status update handler
*/
- on(name: 'user_status', handler: (upd: UserStatusUpdate) => void): this
+ on(name: 'user_status', handler: ((upd: UserStatusUpdate) => void)): this
/**
* Register an user typing handler
*
* @param name Event name
* @param handler User typing handler
*/
- on(name: 'user_typing', handler: (upd: UserTypingUpdate) => void): this
+ on(name: 'user_typing', handler: ((upd: UserTypingUpdate) => void)): this
/**
* Register a history read handler
*
* @param name Event name
* @param handler History read handler
*/
- on(name: 'history_read', handler: (upd: HistoryReadUpdate) => void): this
+ on(name: 'history_read', handler: ((upd: HistoryReadUpdate) => void)): this
/**
* Register a bot stopped handler
*
* @param name Event name
* @param handler Bot stopped handler
*/
- on(name: 'bot_stopped', handler: (upd: BotStoppedUpdate) => void): this
+ on(name: 'bot_stopped', handler: ((upd: BotStoppedUpdate) => void)): this
/**
* Register a bot chat join request handler
*
* @param name Event name
* @param handler Bot chat join request handler
*/
- on(name: 'bot_chat_join_request', handler: (upd: BotChatJoinRequestUpdate) => void): this
+ on(name: 'bot_chat_join_request', handler: ((upd: BotChatJoinRequestUpdate) => void)): this
/**
* Register a chat join request handler
*
* @param name Event name
* @param handler Chat join request handler
*/
- on(name: 'chat_join_request', handler: (upd: ChatJoinRequestUpdate) => void): this
+ on(name: 'chat_join_request', handler: ((upd: ChatJoinRequestUpdate) => void)): this
/**
* Register a pre checkout query handler
*
* @param name Event name
* @param handler Pre checkout query handler
*/
- on(name: 'pre_checkout_query', handler: (upd: PreCheckoutQuery) => void): this
+ on(name: 'pre_checkout_query', handler: ((upd: PreCheckoutQuery) => void)): this
/**
* Register a story update handler
*
* @param name Event name
* @param handler Story update handler
*/
- on(name: 'story', handler: (upd: StoryUpdate) => void): this
+ on(name: 'story', handler: ((upd: StoryUpdate) => void)): this
/**
* Register a delete story handler
*
* @param name Event name
* @param handler Delete story handler
*/
- on(name: 'delete_story', handler: (upd: DeleteStoryUpdate) => void): this
+ on(name: 'delete_story', handler: ((upd: DeleteStoryUpdate) => void)): this
/**
* Register a bot reaction update handler
*
* @param name Event name
* @param handler Bot reaction update handler
*/
- on(name: 'bot_reaction', handler: (upd: BotReactionUpdate) => void): this
+ on(name: 'bot_reaction', handler: ((upd: BotReactionUpdate) => void)): this
/**
* Register a bot reaction count update handler
*
* @param name Event name
* @param handler Bot reaction count update handler
*/
- on(name: 'bot_reaction_count', handler: (upd: BotReactionCountUpdate) => void): this
+ on(name: 'bot_reaction_count', handler: ((upd: BotReactionCountUpdate) => void)): this
/**
* Register a business connection update handler
*
* @param name Event name
* @param handler Business connection update handler
*/
- on(name: 'business_connection', handler: (upd: BusinessConnection) => void): this
+ on(name: 'business_connection', handler: ((upd: BusinessConnection) => void)): this
/**
* Register a new business message handler
*
* @param name Event name
* @param handler New business message handler
*/
- on(name: 'new_business_message', handler: (upd: BusinessMessage) => void): this
+ on(name: 'new_business_message', handler: ((upd: BusinessMessage) => void)): this
/**
* Register an edit business message handler
*
* @param name Event name
* @param handler Edit business message handler
*/
- on(name: 'edit_business_message', handler: (upd: BusinessMessage) => void): this
+ on(name: 'edit_business_message', handler: ((upd: BusinessMessage) => void)): this
/**
* Register a business message group handler
*
* @param name Event name
* @param handler Business message group handler
*/
- on(name: 'business_message_group', handler: (upd: BusinessMessage[]) => void): this
+ on(name: 'business_message_group', handler: ((upd: BusinessMessage[]) => void)): this
/**
* Register a delete business message handler
*
* @param name Event name
* @param handler Delete business message handler
*/
- on(name: 'delete_business_message', handler: (upd: DeleteBusinessMessageUpdate) => void): this
+ on(name: 'delete_business_message', handler: ((upd: DeleteBusinessMessageUpdate) => void)): this
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
+ // eslint-disable-next-line ts/no-explicit-any
on(name: string, handler: (...args: any[]) => void): this
/**
@@ -638,10 +566,11 @@ export interface TelegramClient extends ITelegramClient {
* @returns The authorized user
* @throws BadRequestError In case the code is invalid
*/
- recoverPassword(params: {
+ recoverPassword(
+ params: {
/** The recovery code sent via email */
- recoveryCode: string
- }): Promise
+ recoveryCode: string
+ }): Promise
/**
* Re-send the confirmation code using a different type.
*
@@ -650,16 +579,17 @@ export interface TelegramClient extends ITelegramClient {
* **Available**: 👤 users only
*
*/
- resendCode(params: {
+ resendCode(
+ params: {
/** Phone number in international format */
- phone: string
+ phone: string
- /** Confirmation code identifier from {@link SentCode} */
- phoneCodeHash: string
+ /** Confirmation code identifier from {@link SentCode} */
+ phoneCodeHash: string
- /** Abort signal */
- abortSignal?: AbortSignal
- }): Promise
+ /** Abort signal */
+ abortSignal?: AbortSignal
+ }): Promise
/**
* Simple wrapper that calls {@link start} and then
* provided callback function (if any) without the
@@ -674,7 +604,9 @@ export interface TelegramClient extends ITelegramClient {
* @param then Function to be called after {@link start} returns
* @deprecated This method provides no real value over {@link start}, please use it instead
*/
- run(params: Parameters[1], then?: (user: User) => void | Promise): void
+ run(
+ params: Parameters[1],
+ then?: (user: User) => void | Promise): void
/**
* Send the confirmation code to the given phone number
*
@@ -682,19 +614,20 @@ export interface TelegramClient extends ITelegramClient {
*
* @returns An object containing information about the sent confirmation code
*/
- sendCode(params: {
+ sendCode(
+ params: {
/** Phone number in international format */
- phone: string
+ phone: string
- /** Saved future auth tokens, if any */
- futureAuthTokens?: Uint8Array[]
+ /** Saved future auth tokens, if any */
+ futureAuthTokens?: Uint8Array[]
- /** Additional code settings to pass to the server */
- codeSettings?: Omit
+ /** Additional code settings to pass to the server */
+ codeSettings?: Omit
- /** Abort signal */
- abortSignal?: AbortSignal
- }): Promise
+ /** Abort signal */
+ abortSignal?: AbortSignal
+ }): Promise
/**
* Send a code to email needed to recover your password
*
@@ -722,34 +655,35 @@ export interface TelegramClient extends ITelegramClient {
* **Available**: 👤 users only
*
*/
- signInQr(params: {
+ signInQr(
+ params: {
/**
* Function that will be called whenever the login URL is changed.
*
* The app is expected to display `url` as a QR code to the user
*/
- onUrlUpdated: (url: string, expires: Date) => void
+ onUrlUpdated: (url: string, expires: Date) => void
- /**
- * Function that will be called when the user has scanned the QR code
- * (i.e. when `updateLoginToken` is received), and the library is finalizing the auth
- */
- onQrScanned?: () => void
+ /**
+ * Function that will be called when the user has scanned the QR code
+ * (i.e. when `updateLoginToken` is received), and the library is finalizing the auth
+ */
+ onQrScanned?: () => void
- /** Password for 2FA */
- password?: MaybeDynamic
+ /** Password for 2FA */
+ password?: MaybeDynamic
- /**
- * Function that will be called after the server has rejected the password.
- *
- * Note that in case {@link password} is not a function,
- * this callback will never be called, and an error will be thrown instead.
- */
- invalidPasswordCallback?: () => MaybePromise
+ /**
+ * Function that will be called after the server has rejected the password.
+ *
+ * Note that in case {@link password} is not a function,
+ * this callback will never be called, and an error will be thrown instead.
+ */
+ invalidPasswordCallback?: () => MaybePromise
- /** Abort signal */
- abortSignal?: AbortSignal
- }): Promise
+ /** Abort signal */
+ abortSignal?: AbortSignal
+ }): Promise
/**
* Authorize a user in Telegram with a valid confirmation code.
*
@@ -759,16 +693,17 @@ export interface TelegramClient extends ITelegramClient {
* @throws BadRequestError In case the arguments are invalid
* @throws SessionPasswordNeededError In case a password is needed to sign in
*/
- signIn(params: {
+ signIn(
+ params: {
/** Phone number in international format */
- phone: string
- /** Code identifier from {@link sendCode} */
- phoneCodeHash: string
- /** The confirmation code that was received */
- phoneCode: string
- /** Abort signal */
- abortSignal?: AbortSignal
- }): Promise
+ phone: string
+ /** Code identifier from {@link sendCode} */
+ phoneCodeHash: string
+ /** The confirmation code that was received */
+ phoneCode: string
+ /** Abort signal */
+ abortSignal?: AbortSignal
+ }): Promise
/**
* Utility function to quickly authorize on test DC
* using a [Test phone number](https://core.telegram.org/api/auth#test-phone-numbers),
@@ -781,26 +716,27 @@ export interface TelegramClient extends ITelegramClient {
*
* @param params Additional parameters
*/
- startTest(params?: {
+ startTest(
+ params?: {
/**
* Whether to log out if current session is logged in.
*
* @default false.
*/
- logout?: boolean
+ logout?: boolean
- /**
- * Override phone number. Must be a valid Test phone number.
- *
- * By default is randomly generated.
- */
- phone?: string
+ /**
+ * Override phone number. Must be a valid Test phone number.
+ *
+ * By default is randomly generated.
+ */
+ phone?: string
- /**
- * Override user's DC. Must be a valid test DC.
- */
- dcId?: number
- }): Promise
+ /**
+ * Override user's DC. Must be a valid test DC.
+ */
+ dcId?: number
+ }): Promise
/**
* Start the client in an interactive and declarative manner,
@@ -817,7 +753,8 @@ export interface TelegramClient extends ITelegramClient {
* **Available**: ✅ both users and bots
*
*/
- start(params: {
+ start(
+ params: {
/**
* String session exported using {@link TelegramClient.exportSession}.
*
@@ -826,84 +763,85 @@ export interface TelegramClient extends ITelegramClient {
* Note that passed session will be ignored in case storage already
* contains authorization.
*/
- session?: string | StringSessionData
+ session?: string | StringSessionData
- /**
- * Whether to overwrite existing session.
- */
- sessionForce?: boolean
+ /**
+ * Whether to overwrite existing session.
+ */
+ sessionForce?: boolean
- /**
- * When passed, [QR login flow](https://core.telegram.org/api/qr-login)
- * will be used instead of the regular login flow.
- *
- * This function will be called whenever the login URL is changed,
- * and the app is expected to display it as a QR code to the user.
- */
- qrCodeHandler?: (url: string, expires: Date) => void
+ /**
+ * When passed, [QR login flow](https://core.telegram.org/api/qr-login)
+ * will be used instead of the regular login flow.
+ *
+ * This function will be called whenever the login URL is changed,
+ * and the app is expected to display it as a QR code to the user.
+ */
+ qrCodeHandler?: (url: string, expires: Date) => void
- /**
- * Phone number of the account.
- * If account does not exist, it will be created
- */
- phone?: MaybeDynamic
+ /**
+ * Phone number of the account.
+ * If account does not exist, it will be created
+ */
+ phone?: MaybeDynamic
- /**
- * Bot token to use. Ignored if `phone` is supplied.
- */
- botToken?: MaybeDynamic
+ /**
+ * Bot token to use. Ignored if `phone` is supplied.
+ */
+ botToken?: MaybeDynamic
- /**
- * 2FA password. Ignored if `botToken` is supplied
- */
- password?: MaybeDynamic
+ /**
+ * 2FA password. Ignored if `botToken` is supplied
+ */
+ password?: MaybeDynamic
- /**
- * Code sent to the phone (either sms, call, flash call or other).
- * Ignored if `botToken` is supplied, must be present if `phone` is supplied.
- */
- code?: MaybeDynamic
+ /**
+ * Code sent to the phone (either sms, call, flash call or other).
+ * Ignored if `botToken` is supplied, must be present if `phone` is supplied.
+ */
+ code?: MaybeDynamic
- /**
- * If passed, this function will be called if provided code or 2FA password
- * was invalid. New code/password will be requested later.
- *
- * If provided `code`/`password` is a constant string, providing an
- * invalid one will interrupt authorization flow.
- */
- invalidCodeCallback?: (type: 'code' | 'password') => MaybePromise
+ /**
+ * If passed, this function will be called if provided code or 2FA password
+ * was invalid. New code/password will be requested later.
+ *
+ * If provided `code`/`password` is a constant string, providing an
+ * invalid one will interrupt authorization flow.
+ */
+ invalidCodeCallback?: (type: 'code' | 'password') => MaybePromise
- /**
- * Whether to force code delivery through SMS
- */
- forceSms?: boolean
+ /**
+ * Whether to force code delivery through SMS
+ */
+ forceSms?: boolean
- /**
- * Custom method that is called when a code is sent. Can be used
- * to show a GUI alert of some kind.
- *
- * This method is called *before* {@link start.params.code}.
- *
- * @param code
- * @default `console.log`.
- */
- codeSentCallback?: (code: SentCode) => MaybePromise
+ /**
+ * Custom method that is called when a code is sent. Can be used
+ * to show a GUI alert of some kind.
+ *
+ * This method is called *before* {@link start.params.code}.
+ *
+ * @param code
+ * @default `console.log`.
+ */
+ codeSentCallback?: (code: SentCode) => MaybePromise
- /** Saved future auth tokens, if any */
- futureAuthTokens?: Uint8Array[]
+ /** Saved future auth tokens, if any */
+ futureAuthTokens?: Uint8Array[]
- /** Additional code settings to pass to the server */
- codeSettings?: Omit
+ /** Additional code settings to pass to the server */
+ codeSettings?: Omit
- /** Abort signal */
- abortSignal?: AbortSignal
- }): Promise
+ /** Abort signal */
+ abortSignal?: AbortSignal
+ }): Promise
/**
* Check if the given peer/input peer is referring to the current user
* **Available**: ✅ both users and bots
*
*/
- isSelfPeer(peer: tl.TypeInputPeer | tl.TypePeer | tl.TypeInputUser): boolean
+ isSelfPeer(
+ peer: tl.TypeInputPeer | tl.TypePeer | tl.TypeInputUser): boolean
/**
* Send an answer to a callback query.
*
@@ -915,12 +853,12 @@ export interface TelegramClient extends ITelegramClient {
answerCallbackQuery(
queryId: Long | CallbackQuery,
params?: {
- /**
- * Maximum amount of time in seconds for which
- * this result can be cached by the client (not server!).
- *
- * @default 0
- */
+ /**
+ * Maximum amount of time in seconds for which
+ * this result can be cached by the client (not server!).
+ *
+ * @default 0
+ */
cacheTime?: number
/**
@@ -948,8 +886,7 @@ export interface TelegramClient extends ITelegramClient {
* with a deep-link parameter.
*/
url?: string
- },
- ): Promise
+ }): Promise
/**
* Answer an inline query.
*
@@ -963,12 +900,12 @@ export interface TelegramClient extends ITelegramClient {
queryId: tl.Long | InlineQuery,
results: InputInlineResult[],
params?: {
- /**
- * Maximum number of time in seconds that the results of the
- * query may be cached on the server for.
- *
- * @default 300
- */
+ /**
+ * Maximum number of time in seconds that the results of the
+ * query may be cached on the server for.
+ *
+ * @default 300
+ */
cacheTime?: number
/**
@@ -1019,9 +956,9 @@ export interface TelegramClient extends ITelegramClient {
* the chat where they wanted to use the bot's inline capabilities
*/
switchPm?: {
- /**
- * Text of the button
- */
+ /**
+ * Text of the button
+ */
text: string
/**
@@ -1035,9 +972,9 @@ export interface TelegramClient extends ITelegramClient {
* list with the specified text, that switches the user to the specified bot web app.
*/
switchWebview?: {
- /**
- * Text of the button
- */
+ /**
+ * Text of the button
+ */
text: string
/**
@@ -1045,62 +982,62 @@ export interface TelegramClient extends ITelegramClient {
*/
url: string
}
- },
- ): Promise
+ }): Promise
/**
* Answer a pre-checkout query.
*
- * **Available**: ✅ both users and bots
+ * **Available**: 🤖 bots only
*
* @param queryId Pre-checkout query ID
*/
answerPreCheckoutQuery(
queryId: tl.Long | PreCheckoutQuery,
params?: {
- /** If pre-checkout is rejected, error message to show to the user */
+ /** If pre-checkout is rejected, error message to show to the user */
error?: string
- },
- ): Promise
+ }): Promise
/**
* Delete commands for the current bot and the given scope.
*
* Does the same as passing `null` to {@link setMyCommands}
*
* Learn more about scopes in the [Bot API docs](https://core.telegram.org/bots/api#botcommandscope)
- * **Available**: ✅ both users and bots
+ * **Available**: 🤖 bots only
*
*/
- deleteMyCommands(params?: {
+ deleteMyCommands(
+ params?: {
/**
* Scope of the commands.
*
* @default `BotScope.default_` (i.e. `botCommandScopeDefault`)
*/
- scope?: tl.TypeBotCommandScope | BotCommands.IntermediateScope
+ scope?: tl.TypeBotCommandScope | BotCommands.IntermediateScope
- /**
- * User language applied to the scope.
- */
- langCode?: string
- }): Promise
+ /**
+ * User language applied to the scope.
+ */
+ langCode?: string
+ }): Promise
/**
* Gets information about a bot the current uzer owns (or the current bot)
* **Available**: ✅ both users and bots
*
*/
- getBotInfo(params: {
+ getBotInfo(
+ params: {
/**
* When called by a user, a bot the user owns must be specified.
* When called by a bot, must be empty
*/
- bot?: InputPeerLike
+ bot?: InputPeerLike
- /**
- * If passed, will retrieve the bot's description in the given language.
- * If left empty, will retrieve the fallback description.
- */
- langCode?: string
- }): Promise
+ /**
+ * If passed, will retrieve the bot's description in the given language.
+ * If left empty, will retrieve the fallback description.
+ */
+ langCode?: string
+ }): Promise
/**
* Fetches the menu button set for the given user.
* **Available**: 🤖 bots only
@@ -1117,7 +1054,7 @@ export interface TelegramClient extends ITelegramClient {
*/
getCallbackAnswer(
params: InputMessageId & {
- /** Data contained in the button */
+ /** Data contained in the button */
data: string | Uint8Array
/**
@@ -1151,8 +1088,7 @@ export interface TelegramClient extends ITelegramClient {
* it is checked by Telegram.
*/
password?: string
- },
- ): Promise
+ }): Promise
/**
* Get high scores of a game
* **Available**: 🤖 bots only
@@ -1160,10 +1096,9 @@ export interface TelegramClient extends ITelegramClient {
*/
getGameHighScores(
params: InputMessageId & {
- /** ID of the user to find high scores for */
+ /** ID of the user to find high scores for */
userId?: InputPeerLike
- },
- ): Promise
+ }): Promise
/**
* Get high scores of a game from an inline message
*
@@ -1174,62 +1109,65 @@ export interface TelegramClient extends ITelegramClient {
*/
getInlineGameHighScores(
messageId: string | tl.TypeInputBotInlineMessageID,
- userId?: InputPeerLike,
- ): Promise
+ userId?: InputPeerLike): Promise
/**
* Get a list of current bot's commands for the given command scope
* and user language. If they are not set, empty set is returned.
*
* Learn more about scopes in the [Bot API docs](https://core.telegram.org/bots/api#botcommandscope)
- * **Available**: ✅ both users and bots
+ * **Available**: 🤖 bots only
*
*/
- getMyCommands(params?: {
+ getMyCommands(
+ params?: {
/**
* Scope of the commands.
*
* @default `BotScope.default_` (i.e. `botCommandScopeDefault`)
*/
- scope?: tl.TypeBotCommandScope | BotCommands.IntermediateScope
+ scope?: tl.TypeBotCommandScope | BotCommands.IntermediateScope
- /**
- * User language applied to the scope.
- */
- langCode?: string
- }): Promise
+ /**
+ * User language applied to the scope.
+ */
+ langCode?: string
+ }): Promise
/**
* Sets information about a bot the current uzer owns (or the current bot)
* **Available**: ✅ both users and bots
*
*/
- setBotInfo(params: {
+ setBotInfo(
+ params: {
/**
* When called by a user, a bot the user owns must be specified.
* When called by a bot, must be empty
*/
- bot?: InputPeerLike
+ bot?: InputPeerLike
- /**
- * If passed, will update the bot's description in the given language.
- * If left empty, will change the fallback description.
- */
- langCode?: string
+ /**
+ * If passed, will update the bot's description in the given language.
+ * If left empty, will change the fallback description.
+ */
+ langCode?: string
- /** New bot name */
- name?: string
+ /** New bot name */
+ name?: string
- /** New bio text (displayed in the profile) */
- bio?: string
+ /** New bio text (displayed in the profile) */
+ bio?: string
- /** New description text (displayed when the chat is empty) */
- description?: string
- }): Promise
+ /** New description text (displayed when the chat is empty) */
+ description?: string
+ }): Promise
/**
* Sets a menu button for the given user.
- * **Available**: ✅ both users and bots
+ * **Available**: 🤖 bots only
*
*/
- setBotMenuButton(user: InputPeerLike, button: tl.TypeBotMenuButton): Promise
+ setBotMenuButton(
+ user: InputPeerLike,
+ button: tl.TypeBotMenuButton): Promise
/**
* Set a score of a user in a game
*
@@ -1240,7 +1178,7 @@ export interface TelegramClient extends ITelegramClient {
*/
setGameScore(
params: InputMessageId & {
- /** ID of the user who has scored */
+ /** ID of the user who has scored */
userId: InputPeerLike
/** The new score (must be >0) */
@@ -1263,8 +1201,7 @@ export interface TelegramClient extends ITelegramClient {
* to the client's update handler.
*/
shouldDispatch?: true
- },
- ): Promise
+ }): Promise
/**
* Set a score of a user in a game contained in
* an inline message
@@ -1273,25 +1210,26 @@ export interface TelegramClient extends ITelegramClient {
*
* @param params
*/
- setInlineGameScore(params: {
+ setInlineGameScore(
+ params: {
/** ID of the inline message */
- messageId: string | tl.TypeInputBotInlineMessageID
- /** ID of the user who has scored */
- userId: InputPeerLike
- /** The new score (must be >0) */
- score: number
- /**
- * When `true`, the game message will not be modified
- * to include the new score
- */
- noEdit?: boolean
+ messageId: string | tl.TypeInputBotInlineMessageID
+ /** ID of the user who has scored */
+ userId: InputPeerLike
+ /** The new score (must be >0) */
+ score: number
+ /**
+ * When `true`, the game message will not be modified
+ * to include the new score
+ */
+ noEdit?: boolean
- /**
- * Whether to allow user's score to decrease.
- * This can be useful when fixing mistakes or banning cheaters
- */
- force?: boolean
- }): Promise
+ /**
+ * Whether to allow user's score to decrease.
+ * This can be useful when fixing mistakes or banning cheaters
+ */
+ force?: boolean
+ }): Promise
/**
* Set or delete commands for the current bot and the given scope
*
@@ -1299,37 +1237,39 @@ export interface TelegramClient extends ITelegramClient {
* **Available**: 🤖 bots only
*
*/
- setMyCommands(params: {
+ setMyCommands(
+ params: {
/**
* New list of bot commands for the given scope.
*
* Pass empty array or `null` to delete them.
*/
- commands: tl.RawBotCommand[] | null
+ commands: tl.RawBotCommand[] | null
- /**
- * Scope of the commands.
- *
- * @default `BotScope.default_` (i.e. `botCommandScopeDefault`)
- */
- scope?: tl.TypeBotCommandScope | BotCommands.IntermediateScope
+ /**
+ * Scope of the commands.
+ *
+ * @default `BotScope.default_` (i.e. `botCommandScopeDefault`)
+ */
+ scope?: tl.TypeBotCommandScope | BotCommands.IntermediateScope
- /**
- * User language applied to the scope.
- */
- langCode?: string
- }): Promise
+ /**
+ * User language applied to the scope.
+ */
+ langCode?: string
+ }): Promise
/**
* Sets the default chat permissions for the bot in the supergroup or channel.
* **Available**: 🤖 bots only
*
*/
- setMyDefaultRights(params: {
+ setMyDefaultRights(
+ params: {
/** Whether to target groups or channels. */
- target: 'channel' | 'group'
- /** The default chat permissions. */
- rights: Omit
- }): Promise
+ target: 'channel' | 'group'
+ /** The default chat permissions. */
+ rights: Omit
+ }): Promise
/**
* Add one or more new members to a group, supergroup or channel.
*
@@ -1343,15 +1283,14 @@ export interface TelegramClient extends ITelegramClient {
chatId: InputPeerLike,
users: MaybeArray,
params: {
- /**
- * Number of old messages to be forwarded (0-100).
- * Only applicable to legacy groups, ignored for supergroups and channels
- *
- * @default 100
- */
+ /**
+ * Number of old messages to be forwarded (0-100).
+ * Only applicable to legacy groups, ignored for supergroups and channels
+ *
+ * @default 100
+ */
forwardCount?: number
- },
- ): Promise
+ }): Promise
/**
* Archive one or more chats
*
@@ -1372,19 +1311,20 @@ export interface TelegramClient extends ITelegramClient {
*
* @returns Service message about removed user, if one was generated.
*/
- banChatMember(params: {
+ banChatMember(
+ params: {
/** Chat ID */
- chatId: InputPeerLike
+ chatId: InputPeerLike
- /** ID of the user/channel to ban */
- participantId: InputPeerLike
+ /** ID of the user/channel to ban */
+ participantId: InputPeerLike
- /**
- * Whether to dispatch the returned service message (if any)
- * to the client's update handler.
- */
- shouldDispatch?: true
- }): Promise
+ /**
+ * Whether to dispatch the returned service message (if any)
+ * to the client's update handler.
+ */
+ shouldDispatch?: true
+ }): Promise
/**
* Create a new broadcast channel
*
@@ -1392,17 +1332,18 @@ export interface TelegramClient extends ITelegramClient {
*
* @returns Newly created channel
*/
- createChannel(params: {
+ createChannel(
+ params: {
/**
* Channel title
*/
- title: string
+ title: string
- /**
- * Channel description
- */
- description?: string
- }): Promise
+ /**
+ * Channel description
+ */
+ description?: string
+ }): Promise
/**
* Create a legacy group chat
*
@@ -1411,25 +1352,26 @@ export interface TelegramClient extends ITelegramClient {
* **Available**: 👤 users only
*
*/
- createGroup(params: {
+ createGroup(
+ params: {
/**
* Group title
*/
- title: string
+ title: string
- /**
- * User(s) to be invited in the group (ID(s), username(s) or phone number(s)).
- * Due to Telegram limitations, you can't create a legacy group with just yourself.
- */
- users: MaybeArray
+ /**
+ * User(s) to be invited in the group (ID(s), username(s) or phone number(s)).
+ * Due to Telegram limitations, you can't create a legacy group with just yourself.
+ */
+ users: MaybeArray
- /**
- * TTL period (in seconds) for the newly created chat
- *
- * @default 0 (i.e. messages don't expire)
- */
- ttlPeriod?: number
- }): Promise
+ /**
+ * TTL period (in seconds) for the newly created chat
+ *
+ * @default 0 (i.e. messages don't expire)
+ */
+ ttlPeriod?: number
+ }): Promise
/**
* Create a new supergroup
*
@@ -1437,29 +1379,30 @@ export interface TelegramClient extends ITelegramClient {
*
* @returns Newly created supergroup
*/
- createSupergroup(params: {
+ createSupergroup(
+ params: {
/**
* Supergroup title
*/
- title: string
+ title: string
- /**
- * Supergroup description
- */
- description?: string
+ /**
+ * Supergroup description
+ */
+ description?: string
- /**
- * Whether to create a forum
- */
- forum?: boolean
+ /**
+ * Whether to create a forum
+ */
+ forum?: boolean
- /**
- * TTL period (in seconds) for the newly created supergroup
- *
- * @default 0 (i.e. messages don't expire)
- */
- ttlPeriod?: number
- }): Promise
+ /**
+ * TTL period (in seconds) for the newly created supergroup
+ *
+ * @default 0 (i.e. messages don't expire)
+ */
+ ttlPeriod?: number
+ }): Promise
/**
* Delete a channel or a supergroup
@@ -1504,14 +1447,14 @@ export interface TelegramClient extends ITelegramClient {
deleteHistory(
chat: InputPeerLike,
params?: {
- /**
- * Deletion mode. Can be:
- * - `delete`: delete messages (only for yourself) AND the dialog itself
- * - `clear`: delete messages (only for yourself), but keep the dialog in the list
- * - `revoke`: delete messages for all users
- *
- * @default 'delete'
- */
+ /**
+ * Deletion mode. Can be:
+ * - `delete`: delete messages (only for yourself) AND the dialog itself
+ * - `clear`: delete messages (only for yourself), but keep the dialog in the list
+ * - `revoke`: delete messages for all users
+ *
+ * @default 'delete'
+ */
mode: 'delete' | 'clear' | 'revoke'
/**
@@ -1520,40 +1463,41 @@ export interface TelegramClient extends ITelegramClient {
* @default 0, i.e. remove all messages
*/
maxId?: number
- },
- ): Promise
+ }): Promise
/**
* Delete all messages of a user (or channel) in a supergroup
* **Available**: 👤 users only
*
*/
- deleteUserHistory(params: {
+ deleteUserHistory(
+ params: {
/** Chat ID */
- chatId: InputPeerLike
- /** User/channel ID whose messages to delete */
- participantId: InputPeerLike
+ chatId: InputPeerLike
+ /** User/channel ID whose messages to delete */
+ participantId: InputPeerLike
- /**
- * Whether to dispatch the updates that will be generated by this call.
- * Doesn't follow `disableNoDispatch`
- */
- shouldDispatch?: true
- }): Promise
+ /**
+ * Whether to dispatch the updates that will be generated by this call.
+ * Doesn't follow `disableNoDispatch`
+ */
+ shouldDispatch?: true
+ }): Promise
/**
* Edit supergroup/channel admin rights of a user.
* **Available**: ✅ both users and bots
*
*/
- editAdminRights(params: {
+ editAdminRights(
+ params: {
/** Chat ID */
- chatId: InputPeerLike
- /** User ID */
- userId: InputPeerLike
- /** New admin rights */
- rights: Omit
- /** Custom admin rank */
- rank?: string
- }): Promise
+ chatId: InputPeerLike
+ /** User ID */
+ userId: InputPeerLike
+ /** New admin rights */
+ rights: Omit
+ /** Custom admin rank */
+ rank?: string
+ }): Promise
/**
* Get chat event log ("Recent actions" in official clients).
*
@@ -1572,9 +1516,9 @@ export interface TelegramClient extends ITelegramClient {
getChatEventLog(
chatId: InputPeerLike,
params?: {
- /**
- * Search query
- */
+ /**
+ * Search query
+ */
query?: string
/**
@@ -1619,8 +1563,7 @@ export interface TelegramClient extends ITelegramClient {
* @default 100
*/
limit?: number
- },
- ): Promise
+ }): Promise
/**
* Get information about a single chat member
*
@@ -1630,12 +1573,13 @@ export interface TelegramClient extends ITelegramClient {
* @param userId User ID, username, phone number, `"me"` or `"self"`
* @returns Chat member, or `null` if user is not a member of the chat
*/
- getChatMember(params: {
+ getChatMember(
+ params: {
/** Chat ID or username */
- chatId: InputPeerLike
- /** User ID, username, phone number, `"me"` or `"self"` */
- userId: InputPeerLike
- }): Promise
+ chatId: InputPeerLike
+ /** User ID, username, phone number, `"me"` or `"self"` */
+ userId: InputPeerLike
+ }): Promise
/**
* Get a chunk of members of some chat.
*
@@ -1649,14 +1593,14 @@ export interface TelegramClient extends ITelegramClient {
getChatMembers(
chatId: InputPeerLike,
params?: {
- /**
- * Search query to filter members by their display names and usernames
- *
- * > **Note**: Only used for these values of `filter`:
- * > `all, banned, restricted, mention, contacts`
- *
- * @default `''` (empty string)
- */
+ /**
+ * Search query to filter members by their display names and usernames
+ *
+ * > **Note**: Only used for these values of `filter`:
+ * > `all, banned, restricted, mention, contacts`
+ *
+ * @default `''` (empty string)
+ */
query?: string
/**
@@ -1691,8 +1635,7 @@ export interface TelegramClient extends ITelegramClient {
* @default `recent`
*/
type?: 'all' | 'banned' | 'restricted' | 'bots' | 'recent' | 'admins' | 'contacts' | 'mention'
- },
- ): Promise>
+ }): Promise>
/**
* Get preview information about a private chat.
*
@@ -1750,7 +1693,8 @@ export interface TelegramClient extends ITelegramClient {
* **Available**: 👤 users only
*
*/
- getSimilarChannels(channel: InputPeerLike): Promise>
+ getSimilarChannels(
+ channel: InputPeerLike): Promise>
/**
* Iterate over chat event log.
*
@@ -1764,11 +1708,11 @@ export interface TelegramClient extends ITelegramClient {
iterChatEventLog(
chatId: InputPeerLike,
params?: Parameters[2] & {
- /**
- * Total number of events to return.
- *
- * @default Infinity
- */
+ /**
+ * Total number of events to return.
+ *
+ * @default Infinity
+ */
limit?: number
/**
@@ -1778,8 +1722,7 @@ export interface TelegramClient extends ITelegramClient {
* @default 100
*/
chunkSize?: number
- },
- ): AsyncIterableIterator
+ }): AsyncIterableIterator
/**
* Iterate through chat members
*
@@ -1795,15 +1738,14 @@ export interface TelegramClient extends ITelegramClient {
iterChatMembers(
chatId: InputPeerLike,
params?: Parameters[2] & {
- /**
- * Chunk size, which will be passed as `limit` parameter
- * to {@link getChatMembers}. Usually you shouldn't care about this.
- *
- * @default `200`
- */
+ /**
+ * Chunk size, which will be passed as `limit` parameter
+ * to {@link getChatMembers}. Usually you shouldn't care about this.
+ *
+ * @default `200`
+ */
chunkSize?: number
- },
- ): AsyncIterableIterator
+ }): AsyncIterableIterator
/**
* Join a channel or supergroup
*
@@ -1827,12 +1769,13 @@ export interface TelegramClient extends ITelegramClient {
*
* @returns Service message about removed user, if one was generated.
*/
- kickChatMember(params: {
+ kickChatMember(
+ params: {
/** Chat ID */
- chatId: InputPeerLike
- /** User ID */
- userId: InputPeerLike
- }): Promise
+ chatId: InputPeerLike
+ /** User ID */
+ userId: InputPeerLike
+ }): Promise
/**
* Leave a group chat, supergroup or channel
*
@@ -1843,12 +1786,11 @@ export interface TelegramClient extends ITelegramClient {
leaveChat(
chatId: InputPeerLike,
params?: {
- /**
- * Whether to clear history after leaving (only for legacy group chats)
- */
+ /**
+ * Whether to clear history after leaving (only for legacy group chats)
+ */
clear?: boolean
- },
- ): Promise
+ }): Promise
/**
* Mark a chat as unread
*
@@ -1892,37 +1834,40 @@ export interface TelegramClient extends ITelegramClient {
*
* @param peerId Bot, channel or "me"/"self"
*/
- reorderUsernames(peerId: InputPeerLike, order: string[]): Promise
+ reorderUsernames(
+ peerId: InputPeerLike,
+ order: string[]): Promise
/**
* Restrict a user in a supergroup.
* **Available**: ✅ both users and bots
*
*/
- restrictChatMember(params: {
+ restrictChatMember(
+ params: {
/** Chat ID */
- chatId: InputPeerLike
+ chatId: InputPeerLike
- /** User ID */
- userId: InputPeerLike
+ /** User ID */
+ userId: InputPeerLike
- /**
- * Restrictions for the user. Note that unlike Bot API, this object contains
- * the restrictions, and not the permissions, i.e.
- * passing `sendMessages=true` will disallow the user to send messages,
- * and passing `{}` (empty object) will lift any restrictions
- */
- restrictions: Omit
+ /**
+ * Restrictions for the user. Note that unlike Bot API, this object contains
+ * the restrictions, and not the permissions, i.e.
+ * passing `sendMessages=true` will disallow the user to send messages,
+ * and passing `{}` (empty object) will lift any restrictions
+ */
+ restrictions: Omit
- /**
- * Date when the user will be unrestricted.
- * When `number` is passed, UNIX time in ms is expected.
- * If this value is less than 30 seconds or more than 366 days in
- * the future, user will be restricted forever.
- *
- * @default `0`, i.e. forever
- */
- until?: number | Date
- }): Promise
+ /**
+ * Date when the user will be unrestricted.
+ * When `number` is passed, UNIX time in ms is expected.
+ * If this value is less than 30 seconds or more than 366 days in
+ * the future, user will be restricted forever.
+ *
+ * @default `0`, i.e. forever
+ */
+ until?: number | Date
+ }): Promise
/**
* Save or delete a draft message associated with some chat
*
@@ -1931,48 +1876,51 @@ export interface TelegramClient extends ITelegramClient {
* @param chatId ID of the chat, its username, phone or `"me"` or `"self"`
* @param draft Draft message, or `null` to delete.
*/
- saveDraft(chatId: InputPeerLike, draft: null | Omit): Promise
+ saveDraft(
+ chatId: InputPeerLike,
+ draft: null | Omit): Promise
/**
* Set peer color and optionally background pattern
* **Available**: 👤 users only
*
*/
- setChatColor(params: {
+ setChatColor(
+ params: {
/**
* Peer where to update the color.
*
* By default will change the color for the current user
*/
- peer?: InputPeerLike
+ peer?: InputPeerLike
- /**
- * Color identificator
- *
- * Note that this value is **not** an RGB color representation. Instead, it is
- * a number which should be used to pick a color from a predefined
- * list of colors:
- * - `0-6` are the default colors used by Telegram clients:
- * `red, orange, purple, green, sea, blue, pink`
- * - `>= 7` are returned by `help.getAppConfig`.
- */
- color: number
+ /**
+ * Color identificator
+ *
+ * Note that this value is **not** an RGB color representation. Instead, it is
+ * a number which should be used to pick a color from a predefined
+ * list of colors:
+ * - `0-6` are the default colors used by Telegram clients:
+ * `red, orange, purple, green, sea, blue, pink`
+ * - `>= 7` are returned by `help.getAppConfig`.
+ */
+ color: number
- /**
- * Background pattern emoji ID.
- *
- * Must be an adaptive emoji, otherwise the request will fail.
- */
- backgroundEmojiId?: tl.Long
+ /**
+ * Background pattern emoji ID.
+ *
+ * Must be an adaptive emoji, otherwise the request will fail.
+ */
+ backgroundEmojiId?: tl.Long
- /**
- * Whether to set this color for the profile
- * header instead of chat name/replies.
- *
- * Currently only available for the current user.
- */
- forProfile?: boolean
- }): Promise
+ /**
+ * Whether to set this color for the profile
+ * header instead of chat name/replies.
+ *
+ * Currently only available for the current user.
+ */
+ forProfile?: boolean
+ }): Promise
/**
* Change default chat permissions for all members.
*
@@ -1989,8 +1937,7 @@ export interface TelegramClient extends ITelegramClient {
*/
setChatDefaultPermissions(
chatId: InputPeerLike,
- restrictions: Omit,
- ): Promise
+ restrictions: Omit): Promise
/**
* Change chat description
*
@@ -2001,7 +1948,9 @@ export interface TelegramClient extends ITelegramClient {
* @param chatId Chat ID or username
* @param description New chat description, 0-255 characters
*/
- setChatDescription(chatId: InputPeerLike, description: string): Promise
+ setChatDescription(
+ chatId: InputPeerLike,
+ description: string): Promise
/**
* Set a new chat photo or video.
*
@@ -2009,22 +1958,23 @@ export interface TelegramClient extends ITelegramClient {
* **Available**: ✅ both users and bots
*
*/
- setChatPhoto(params: {
+ setChatPhoto(
+ params: {
/** Chat ID or username */
- chatId: InputPeerLike
+ chatId: InputPeerLike
- /** Media type (photo or video) */
+ /** Media type (photo or video) */
- type: 'photo' | 'video'
+ type: 'photo' | 'video'
- /** Input media file */
- media: InputFileLike
- /**
- * When `type = video`, timestamp in seconds which will be shown
- * as a static preview.
- */
- previewSec?: number
- }): Promise
+ /** Input media file */
+ media: InputFileLike
+ /**
+ * When `type = video`, timestamp in seconds which will be shown
+ * as a static preview.
+ */
+ previewSec?: number
+ }): Promise
/**
* Change chat title
*
@@ -2055,7 +2005,9 @@ export interface TelegramClient extends ITelegramClient {
* @param chatId Chat ID or current username
* @param username New username, or `null` to remove
*/
- setChatUsername(chatId: InputPeerLike, username: string | null): Promise
+ setChatUsername(
+ chatId: InputPeerLike,
+ username: string | null): Promise
/**
* Set supergroup's slow mode interval.
*
@@ -2076,7 +2028,8 @@ export interface TelegramClient extends ITelegramClient {
* @param chatId Chat ID or username
* @param [enabled=false] Whether content protection should be enabled
*/
- toggleContentProtection(chatId: InputPeerLike, enabled?: boolean): Promise
+ toggleContentProtection(
+ chatId: InputPeerLike, enabled?: boolean): Promise
/**
* Toggle a collectible (Fragment) username
*
@@ -2085,20 +2038,21 @@ export interface TelegramClient extends ITelegramClient {
* **Available**: 👤 users only
*
*/
- toggleFragmentUsername(params: {
+ toggleFragmentUsername(
+ params: {
/** Peer ID whose username to toggle */
- peerId: InputPeerLike
+ peerId: InputPeerLike
- /**
- * Username to toggle
- */
- username: string
+ /**
+ * Username to toggle
+ */
+ username: string
- /**
- * Whether to enable or disable the username
- */
- active: boolean
- }): Promise
+ /**
+ * Whether to enable or disable the username
+ */
+ active: boolean
+ }): Promise
/**
* Set whether a channel/supergroup has join requests enabled.
*
@@ -2110,7 +2064,8 @@ export interface TelegramClient extends ITelegramClient {
* @param chatId Chat ID or username
* @param [enabled=false] Whether join requests should be enabled
*/
- toggleJoinRequests(chatId: InputPeerLike, enabled?: boolean): Promise
+ toggleJoinRequests(
+ chatId: InputPeerLike, enabled?: boolean): Promise
/**
* Set whether a channel/supergroup has join-to-send setting enabled.
*
@@ -2142,13 +2097,14 @@ export interface TelegramClient extends ITelegramClient {
* **Available**: ✅ both users and bots
*
*/
- unbanChatMember(params: {
+ unbanChatMember(
+ params: {
/** Chat ID */
- chatId: InputPeerLike
+ chatId: InputPeerLike
- /** User/channel ID who should be unbanned */
- participantId: InputPeerLike
- }): Promise
+ /** User/channel ID who should be unbanned */
+ participantId: InputPeerLike
+ }): Promise
/**
* Unban a user/channel from a supergroup or a channel,
@@ -2160,45 +2116,47 @@ export interface TelegramClient extends ITelegramClient {
* **Available**: ✅ both users and bots
*
*/
- unrestrictChatMember(params: {
+ unrestrictChatMember(
+ params: {
/** Chat ID */
- chatId: InputPeerLike
+ chatId: InputPeerLike
- /** User/channel ID who should be unbanned */
- participantId: InputPeerLike
- }): Promise
+ /** User/channel ID who should be unbanned */
+ participantId: InputPeerLike
+ }): Promise
/**
* Add an existing Telegram user as a contact
* **Available**: 👤 users only
*
*/
- addContact(params: {
+ addContact(
+ params: {
/** User ID, username or phone number */
- userId: InputPeerLike
+ userId: InputPeerLike
- /**
- * First name of the contact
- */
- firstName: string
+ /**
+ * First name of the contact
+ */
+ firstName: string
- /**
- * Last name of the contact
- */
- lastName?: string
+ /**
+ * Last name of the contact
+ */
+ lastName?: string
- /**
- * Phone number of the contact, if available
- */
- phone?: string
+ /**
+ * Phone number of the contact, if available
+ */
+ phone?: string
- /**
- * Whether to share your own phone number
- * with the newly created contact
- *
- * @default false
- */
- sharePhone?: boolean
- }): Promise
+ /**
+ * Whether to share your own phone number
+ * with the newly created contact
+ *
+ * @default false
+ */
+ sharePhone?: boolean
+ }): Promise
/**
* Delete one or more contacts from your Telegram contacts list
*
@@ -2224,8 +2182,7 @@ export interface TelegramClient extends ITelegramClient {
* @param contacts List of contacts
*/
importContacts(
- contacts: PartialOnly, 'clientId'>[],
- ): Promise
+ contacts: PartialOnly, 'clientId'>[]): Promise
/**
* Create a folder from given parameters
*
@@ -2237,7 +2194,8 @@ export interface TelegramClient extends ITelegramClient {
* @param folder Parameters for the folder
* @returns Newly created folder
*/
- createFolder(folder: PartialExcept): Promise
+ createFolder(
+ folder: PartialExcept): Promise
/**
* Delete a folder by its ID
*
@@ -2253,18 +2211,19 @@ export interface TelegramClient extends ITelegramClient {
*
* @returns Modified folder
*/
- editFolder(params: {
+ editFolder(
+ params: {
/**
* Folder, folder ID or name.
* Note that passing an ID or name will require re-fetching all folders,
* and passing name might affect not the right folder if you have multiple
* with the same name.
*/
- folder: tl.RawDialogFilter | number | string
+ folder: tl.RawDialogFilter | number | string
- /** Modification to be applied to this folder */
- modification: Partial>
- }): Promise
+ /** Modification to be applied to this folder */
+ modification: Partial>
+ }): Promise
/**
* Try to find a dialog (dialogs) with a given peer (peers) by their ID, username or phone number.
@@ -2288,14 +2247,15 @@ export interface TelegramClient extends ITelegramClient {
*
* @param params Search parameters. At least one must be set.
*/
- findFolder(params: {
+ findFolder(
+ params: {
/** Folder title */
- title?: string
- /** Folder emoji */
- emoji?: string
- /** Folder ID */
- id?: number
- }): Promise
+ title?: string
+ /** Folder emoji */
+ emoji?: string
+ /** Folder ID */
+ id?: number
+ }): Promise
/**
* Get a preview of a chatlist by its invite link
*
@@ -2330,108 +2290,109 @@ export interface TelegramClient extends ITelegramClient {
*
* @param params Fetch parameters
*/
- iterDialogs(params?: {
+ iterDialogs(
+ params?: {
/**
* Offset message date used as an anchor for pagination.
*/
- offsetDate?: Date | number
+ offsetDate?: Date | number
- /**
- * Offset message ID used as an anchor for pagination
- */
- offsetId?: number
+ /**
+ * Offset message ID used as an anchor for pagination
+ */
+ offsetId?: number
- /**
- * Offset peer used as an anchor for pagination
- */
- offsetPeer?: tl.TypeInputPeer
+ /**
+ * Offset peer used as an anchor for pagination
+ */
+ offsetPeer?: tl.TypeInputPeer
- /**
- * Limits the number of dialogs to be received.
- *
- * @default `Infinity`, i.e. all dialogs are fetched
- */
- limit?: number
+ /**
+ * Limits the number of dialogs to be received.
+ *
+ * @default `Infinity`, i.e. all dialogs are fetched
+ */
+ limit?: number
- /**
- * Chunk size which will be passed to `messages.getDialogs`.
- * You shouldn't usually care about this.
- *
- * @default 100.
- */
- chunkSize?: number
+ /**
+ * Chunk size which will be passed to `messages.getDialogs`.
+ * You shouldn't usually care about this.
+ *
+ * @default 100.
+ */
+ chunkSize?: number
- /**
- * How to handle pinned dialogs?
- *
- * Whether to `include` them at the start of the list,
- * `exclude` them at all, or `only` return pinned dialogs.
- *
- * Additionally, for folders you can specify
- * `keep`, which will return pinned dialogs
- * ordered by date among other non-pinned dialogs.
- *
- * > **Note**: When using `include` mode with folders,
- * > pinned dialogs will only be fetched if all offset
- * > parameters are unset.
- *
- * @default `include`.
- */
- pinned?: 'include' | 'exclude' | 'only' | 'keep'
+ /**
+ * How to handle pinned dialogs?
+ *
+ * Whether to `include` them at the start of the list,
+ * `exclude` them at all, or `only` return pinned dialogs.
+ *
+ * Additionally, for folders you can specify
+ * `keep`, which will return pinned dialogs
+ * ordered by date among other non-pinned dialogs.
+ *
+ * > **Note**: When using `include` mode with folders,
+ * > pinned dialogs will only be fetched if all offset
+ * > parameters are unset.
+ *
+ * @default `include`.
+ */
+ pinned?: 'include' | 'exclude' | 'only' | 'keep'
- /**
- * How to handle archived chats?
- *
- * Whether to `keep` them among other dialogs,
- * `exclude` them from the list, or `only`
- * return archived dialogs
- *
- * Ignored for folders, since folders
- * themselves contain information about archived chats.
- *
- * > **Note**: when `pinned=only`, `archived=keep` will act as `only`
- * > because of Telegram API limitations.
- *
- * @default `exclude`
- */
- archived?: 'keep' | 'exclude' | 'only'
+ /**
+ * How to handle archived chats?
+ *
+ * Whether to `keep` them among other dialogs,
+ * `exclude` them from the list, or `only`
+ * return archived dialogs
+ *
+ * Ignored for folders, since folders
+ * themselves contain information about archived chats.
+ *
+ * > **Note**: when `pinned=only`, `archived=keep` will act as `only`
+ * > because of Telegram API limitations.
+ *
+ * @default `exclude`
+ */
+ archived?: 'keep' | 'exclude' | 'only'
- /**
- * Folder from which the dialogs will be fetched.
- *
- * You can pass folder object, id or title
- *
- * Note that passing anything except object will
- * cause the list of the folders to be fetched,
- * and passing a title may fetch from
- * a wrong folder if you have multiple with the same title.
- *
- * Also note that fetching dialogs in a folder is
- * *orders of magnitudes* slower than normal because
- * of Telegram API limitations - we have to fetch all dialogs
- * and filter the ones we need manually. If possible,
- * use {@link Dialog.filterFolder} instead.
- *
- * When a folder with given ID or title is not found,
- * {@link MtArgumentError} is thrown
- *
- * @default (fetches from "All" folder)
- */
- folder?: InputDialogFolder
+ /**
+ * Folder from which the dialogs will be fetched.
+ *
+ * You can pass folder object, id or title
+ *
+ * Note that passing anything except object will
+ * cause the list of the folders to be fetched,
+ * and passing a title may fetch from
+ * a wrong folder if you have multiple with the same title.
+ *
+ * Also note that fetching dialogs in a folder is
+ * orders of magnitudes* slower than normal because
+ * of Telegram API limitations - we have to fetch all dialogs
+ * and filter the ones we need manually. If possible,
+ * use {@link Dialog.filterFolder} instead.
+ *
+ * When a folder with given ID or title is not found,
+ * {@link MtArgumentError} is thrown
+ *
+ * @default (fetches from "All" folder)
+ */
+ folder?: InputDialogFolder
- /**
- * Additional filtering for the dialogs.
- *
- * If `folder` is not provided, this filter is used instead.
- * If `folder` is provided, fields from this object are used
- * to override filters inside the folder.
- */
- filter?: Partial>
- }): AsyncIterableIterator