chore: bumped @antfu/eslint-config + reformat

This commit is contained in:
alina sireneva
2024-12-03 09:55:37 +03:00
parent a9ef0198e9
commit a07b6673dc
527 changed files with 1860 additions and 1584 deletions

View File

@@ -1,6 +1,6 @@
import { assertEquals } from 'https://deno.land/std@0.223.0/assert/mod.ts'
import { User, tl } from '@mtcute/core'
import { tl, User } from '@mtcute/core'
import { BaseTelegramClient, TelegramClient } from '@mtcute/core/client.js'
import { assertEquals } from 'https://deno.land/std@0.223.0/assert/mod.ts'
import { getApiParams } from '../utils.ts'

View File

@@ -1,6 +1,6 @@
import { assertEquals } from 'https://deno.land/std@0.223.0/assert/mod.ts'
import { MtPeerNotFoundError } from '@mtcute/core'
import { TelegramClient } from '@mtcute/core/client.js'
import { assertEquals } from 'https://deno.land/std@0.223.0/assert/mod.ts'
import { getApiParams } from '../utils.ts'

View File

@@ -1,10 +1,10 @@
import { createHash } from 'node:crypto'
import { assertEquals } from 'https://deno.land/std@0.223.0/assert/mod.ts'
import type { FileDownloadLocation } from '@mtcute/core'
import { createHash } from 'node:crypto'
import { Thumbnail } from '@mtcute/core'
import { TelegramClient } from '@mtcute/core/client.js'
import { sleep } from '@mtcute/core/utils.js'
import { assertEquals } from 'https://deno.land/std@0.223.0/assert/mod.ts'
import { getApiParams } from '../utils.ts'

View File

@@ -1,6 +1,6 @@
import { assertEquals, assertNotEquals } from 'https://deno.land/std@0.223.0/assert/mod.ts'
import type { Message } from '@mtcute/core'
import { TelegramClient } from '@mtcute/core/client.js'
import { assertEquals, assertNotEquals } from 'https://deno.land/std@0.223.0/assert/mod.ts'
import { getApiParams, waitFor } from '../utils.ts'

View File

@@ -1,11 +1,11 @@
import { assertEquals, assertGreater, assertInstanceOf } from 'https://deno.land/std@0.223.0/assert/mod.ts'
import { TelegramClient } from '@mtcute/core/client.js'
import type { Message } from '@mtcute/deno'
import type { CustomMethods } from './_worker.ts'
import { TelegramClient } from '@mtcute/core/client.js'
import { Long, TelegramWorkerPort, tl } from '@mtcute/deno'
import { getApiParams, waitFor } from '../utils.ts'
import { assertEquals, assertGreater, assertInstanceOf } from 'https://deno.land/std@0.223.0/assert/mod.ts'
import type { CustomMethods } from './_worker.ts'
import { getApiParams, waitFor } from '../utils.ts'
Deno.test('5. worker', { sanitizeResources: false }, async (t) => {
const worker = new Worker(new URL('_worker.ts', import.meta.url), {

View File

@@ -1,5 +1,5 @@
import { assertEquals } from 'https://deno.land/std@0.223.0/assert/mod.ts'
import { BaseTelegramClient } from '@mtcute/core/client.js'
import { assertEquals } from 'https://deno.land/std@0.223.0/assert/mod.ts'
import { getApiParams } from '../../utils.ts'

View File

@@ -1,8 +1,8 @@
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'
import { WebPlatform } from '@mtcute/web'
import { assertEquals } from 'https://deno.land/std@0.223.0/assert/mod.ts'
// here we primarily want to check that everything imports properly,
// and that the code is actually executable. The actual correctness

View File

@@ -1,11 +1,11 @@
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'
import { TlBinaryReader, TlBinaryWriter } from '@mtcute/tl-runtime'
import { __tlReaderMap } from '@mtcute/tl/binary/reader.js'
import { __tlWriterMap } from '@mtcute/tl/binary/writer.js'
import { TlBinaryReader, TlBinaryWriter } from '@mtcute/tl-runtime'
import { WebPlatform } from '@mtcute/web'
import { assertEquals } from 'https://deno.land/std@0.223.0/assert/mod.ts'
// here we primarily want to check that @mtcute/tl correctly works with @mtcute/tl-runtime

View File

@@ -1,6 +1,6 @@
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'
import { assertEquals } from 'https://deno.land/std@0.223.0/assert/mod.ts'
await new WebCryptoProvider().initialize()
const platform = new WebPlatform()

View File

@@ -1,6 +1,6 @@
const { BaseTelegramClient } = require('@mtcute/core/client.js')
const { describe, it } = require('mocha')
const { expect } = require('chai')
const { describe, it } = require('mocha')
const { getApiParams } = require('../utils')

View File

@@ -1,8 +1,8 @@
const { NodePlatform } = require('@mtcute/node')
const { TlBinaryReader, TlBinaryWriter, TlSerializationCounter } = require('@mtcute/tl-runtime')
const { expect } = require('chai')
const Long = require('long')
const { describe, it } = require('mocha')
const { expect } = require('chai')
const { NodePlatform } = require('@mtcute/node')
// here we primarily want to check that everything imports properly,
// and that the code is actually executable. The actual correctness

View File

@@ -1,11 +1,11 @@
const Long = require('long')
const { TlBinaryReader, TlBinaryWriter } = require('@mtcute/tl-runtime')
const { NodePlatform } = require('@mtcute/node')
const { tl } = require('@mtcute/tl')
const { TlBinaryReader, TlBinaryWriter } = require('@mtcute/tl-runtime')
const { __tlReaderMap } = require('@mtcute/tl/binary/reader')
const { __tlWriterMap } = require('@mtcute/tl/binary/writer')
const { describe, it } = require('mocha')
const { expect } = require('chai')
const { NodePlatform } = require('@mtcute/node')
const Long = require('long')
const { describe, it } = require('mocha')
// here we primarily want to check that @mtcute/tl correctly works with @mtcute/tl-runtime

View File

@@ -1,7 +1,7 @@
const wasm = require('@mtcute/wasm')
const { describe, it, before } = require('mocha')
const { expect } = require('chai')
const { NodeCryptoProvider } = require('@mtcute/node/utils.js')
const wasm = require('@mtcute/wasm')
const { expect } = require('chai')
const { describe, it, before } = require('mocha')
before(async () => {
await new NodeCryptoProvider().initialize()

View File

@@ -1,6 +1,6 @@
import { BaseTelegramClient } from '@mtcute/core/client.js'
import { expect } from 'chai'
import { describe, it } from 'mocha'
import { BaseTelegramClient } from '@mtcute/core/client.js'
import { getApiParams } from '../utils.js'

View File

@@ -1,8 +1,8 @@
import { NodePlatform } from '@mtcute/node'
import { TlBinaryReader, TlBinaryWriter, TlSerializationCounter } from '@mtcute/tl-runtime'
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'
// here we primarily want to check that everything imports properly,
// and that the code is actually executable. The actual correctness

View File

@@ -1,11 +1,11 @@
import { NodePlatform } from '@mtcute/node'
import { tl } from '@mtcute/tl'
import { TlBinaryReader, TlBinaryWriter } from '@mtcute/tl-runtime'
import { __tlReaderMap } from '@mtcute/tl/binary/reader.js'
import { __tlWriterMap } from '@mtcute/tl/binary/writer.js'
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'
import { __tlWriterMap } from '@mtcute/tl/binary/writer.js'
import { TlBinaryReader, TlBinaryWriter } from '@mtcute/tl-runtime'
// here we primarily want to check that @mtcute/tl correctly works with @mtcute/tl-runtime

View File

@@ -1,7 +1,7 @@
import { expect } from 'chai'
import { before, describe, it } from 'mocha'
import { NodeCryptoProvider } from '@mtcute/node/utils.js'
import { ige256Decrypt, ige256Encrypt } from '@mtcute/wasm'
import { expect } from 'chai'
import { before, describe, it } from 'mocha'
before(async () => {
await new NodeCryptoProvider().initialize()

View File

@@ -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 { execSync } = require('node: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

View File

@@ -1,6 +1,6 @@
const cp = require('node:child_process')
const fs = require('node:fs')
const path = require('node:path')
const cp = require('node:child_process')
const glob = require('glob')

View File

@@ -1,7 +1,7 @@
import { tl, User } from '@mtcute/core'
import { BaseTelegramClient, TelegramClient } from '@mtcute/core/client.js'
import { expect } from 'chai'
import { describe, it } from 'mocha'
import { User, tl } from '@mtcute/core'
import { BaseTelegramClient, TelegramClient } from '@mtcute/core/client.js'
import { getApiParams } from '../utils.js'

View File

@@ -1,7 +1,7 @@
import { expect } from 'chai'
import { describe, it } from 'mocha'
import { MtPeerNotFoundError } from '@mtcute/core'
import { TelegramClient } from '@mtcute/core/client.js'
import { expect } from 'chai'
import { describe, it } from 'mocha'
import { getApiParams } from '../utils.js'

View File

@@ -1,11 +1,11 @@
import { createHash } from 'node:crypto'
import { expect } from 'chai'
import { describe, it } from 'mocha'
import type { FileDownloadLocation } from '@mtcute/core'
import { createHash } from 'node:crypto'
import { Thumbnail } from '@mtcute/core'
import { TelegramClient } from '@mtcute/core/client.js'
import { sleep } from '@mtcute/core/utils.js'
import { expect } from 'chai'
import { describe, it } from 'mocha'
import { getApiParams } from '../utils.js'

View File

@@ -1,7 +1,7 @@
import { expect } from 'chai'
import { describe, it } from 'mocha'
import type { Message } from '@mtcute/core'
import { TelegramClient } from '@mtcute/core/client.js'
import { expect } from 'chai'
import { describe, it } from 'mocha'
import { getApiParams, waitFor } from '../utils.js'

View File

@@ -1,16 +1,16 @@
import type { Message } from '@mtcute/node'
import type { CustomMethods } from './_worker.js'
import path from 'node:path'
import { Worker } from 'node:worker_threads'
import { expect } from 'chai'
import { describe, it } from 'mocha'
import { TelegramClient } from '@mtcute/core/client.js'
import type { Message } from '@mtcute/node'
import { Long, TelegramWorkerPort, tl } from '@mtcute/node'
import { expect } from 'chai'
import { describe, it } from 'mocha'
import { getApiParams, waitFor } from '../utils.js'
import type { CustomMethods } from './_worker.js'
describe('5. worker', function () {
this.timeout(300_000)

View File

@@ -1,6 +1,6 @@
import { BaseTelegramClient } from '@mtcute/core/client.js'
import { expect } from 'chai'
import { describe, it } from 'mocha'
import { BaseTelegramClient } from '@mtcute/core/client.js'
// @fix-import
import { getApiParams } from '../../utils'

View File

@@ -1,12 +1,12 @@
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'
import { TlBinaryReader, TlBinaryWriter } from '@mtcute/tl-runtime'
import { __tlReaderMap } from '@mtcute/tl/binary/reader.js'
import { __tlWriterMap } from '@mtcute/tl/binary/writer.js'
import { TlBinaryReader, TlBinaryWriter } from '@mtcute/tl-runtime'
import { expect } from 'chai'
import Long from 'long'
import { describe, it } from 'mocha'
// here we primarily want to check that @mtcute/tl correctly works with @mtcute/tl-runtime

View File

@@ -1,7 +1,7 @@
import { expect } from 'chai'
import { before, describe, it } from 'mocha'
import { NodeCryptoProvider } from '@mtcute/node/utils.js'
import { ige256Decrypt, ige256Encrypt } from '@mtcute/wasm'
import { expect } from 'chai'
import { before, describe, it } from 'mocha'
before(async () => {
await new NodeCryptoProvider().initialize()

View File

@@ -1,12 +1,12 @@
import { join } from 'node:path'
import type { MaybePromise } from '@mtcute/core'
import type { BaseTelegramClientOptions } from '@mtcute/core/client.js'
import { join } from 'node:path'
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'
import type { BaseTelegramClientOptions } from '@mtcute/core/client.js'
export function getApiParams(storage?: string): BaseTelegramClientOptions {
if (!process.env.API_ID || !process.env.API_HASH) {