fix: fixed build for other packages
This commit is contained in:
parent
c8e026dc03
commit
4e78b643df
9 changed files with 16 additions and 11 deletions
|
@ -1,7 +1,7 @@
|
|||
import { Parser } from 'htmlparser2'
|
||||
import Long from 'long'
|
||||
|
||||
import type { InputText, MessageEntity, TextWithEntities, tl } from '@mtcute/client'
|
||||
import type { InputText, MessageEntity, TextWithEntities, tl } from '@mtcute/core'
|
||||
|
||||
const MENTION_REGEX = /^tg:\/\/user\?id=(\d+)(?:&hash=(-?[0-9a-fA-F]+)(?:&|$)|&|$)/
|
||||
|
||||
|
|
|
@ -8,6 +8,6 @@
|
|||
"./src",
|
||||
],
|
||||
"references": [
|
||||
{ "path": "../client" }
|
||||
{ "path": "../core" }
|
||||
]
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||
|
||||
import type { tl } from '@mtcute/client'
|
||||
import type { tl } from '@mtcute/core'
|
||||
|
||||
type Values<T> = T[keyof T]
|
||||
type SafeGet<T, K extends string> = T extends Record<K, unknown> ? T[K] : never
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import Long from 'long'
|
||||
|
||||
import type { InputText, MessageEntity, TextWithEntities, tl } from '@mtcute/client'
|
||||
import type { InputText, MessageEntity, TextWithEntities, tl } from '@mtcute/core'
|
||||
|
||||
const MENTION_REGEX = /^tg:\/\/user\?id=(\d+)(?:&hash=(-?[0-9a-fA-F]+)(?:&|$)|&|$)/
|
||||
const EMOJI_REGEX = /^tg:\/\/emoji\?id=(-?\d+)/
|
||||
|
|
|
@ -8,6 +8,6 @@
|
|||
"./src",
|
||||
],
|
||||
"references": [
|
||||
{ "path": "../client" }
|
||||
{ "path": "../core" }
|
||||
]
|
||||
}
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
import { createRequire } from 'module'
|
||||
import { createInterface, Interface as RlInterface } from 'readline'
|
||||
|
||||
import { TelegramClient, TelegramClientOptions, User } from '@mtcute/client'
|
||||
import { TelegramClient, TelegramClientOptions, User } from '@mtcute/core'
|
||||
import { SqliteStorage } from '@mtcute/sqlite'
|
||||
|
||||
export * from '@mtcute/client'
|
||||
export * from '@mtcute/core'
|
||||
export * from '@mtcute/html-parser'
|
||||
export * from '@mtcute/markdown-parser'
|
||||
export { SqliteStorage }
|
||||
|
@ -29,6 +29,12 @@ try {
|
|||
*/
|
||||
export class NodeTelegramClient extends TelegramClient {
|
||||
constructor(opts: TelegramClientOptions) {
|
||||
if ('client' in opts) {
|
||||
super(opts)
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
super({
|
||||
// eslint-disable-next-line
|
||||
crypto: nativeCrypto ? () => new nativeCrypto() : undefined,
|
||||
|
@ -99,6 +105,6 @@ export class NodeTelegramClient extends TelegramClient {
|
|||
|
||||
this.start(params)
|
||||
.then(then)
|
||||
.catch((err) => this._emitError(err))
|
||||
.catch((err) => this.emitError(err))
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
"./utils.ts",
|
||||
],
|
||||
"references": [
|
||||
{ "path": "../client" },
|
||||
{ "path": "../core" },
|
||||
{ "path": "../sqlite" },
|
||||
{ "path": "../dispatcher" },
|
||||
{ "path": "../html-parser" },
|
||||
|
|
|
@ -2,7 +2,6 @@ module.exports = {
|
|||
extends: ['../../.config/typedoc/config.base.cjs'],
|
||||
entryPoints: ['./index.ts'],
|
||||
externalPattern: [
|
||||
'../client/**',
|
||||
'../core/**',
|
||||
'../html-parser/**',
|
||||
'../markdown-parser/**',
|
||||
|
|
|
@ -1 +1 @@
|
|||
export * from '@mtcute/client/utils.js'
|
||||
export * from '@mtcute/core/utils.js'
|
||||
|
|
Loading…
Reference in a new issue