chore: some cleanup

This commit is contained in:
alina 🌸 2024-11-26 20:21:47 +03:00
parent 2cbed9b883
commit 2b0d4d99aa
Signed by: teidesu
SSH key fingerprint: SHA256:uNeCpw6aTSU4aIObXLvHfLkDa82HWH9EiOj9AXOIRpI
14 changed files with 199 additions and 27 deletions

View file

@ -47,17 +47,17 @@
}, },
"devDependencies": { "devDependencies": {
"@antfu/eslint-config": "2.26.0", "@antfu/eslint-config": "2.26.0",
"@fuman/build": "https://pkg.pr.new/teidesu/fuman/@fuman/build@6017eb4", "@fuman/build": "https://pkg.pr.new/teidesu/fuman/@fuman/build@1a73dc1",
"@fuman/utils": "https://pkg.pr.new/teidesu/fuman/@fuman/utils@6017eb4", "@fuman/utils": "https://pkg.pr.new/teidesu/fuman/@fuman/utils@6017eb4",
"@types/deno": "npm:@teidesu/deno-types@1.46.3", "@types/deno": "npm:@teidesu/deno-types@1.46.3",
"@types/node": "20.10.0", "@types/node": "20.10.0",
"@types/bun": "1.1.14",
"@types/ws": "8.5.4", "@types/ws": "8.5.4",
"@vitest/browser": "2.0.5", "@vitest/browser": "2.0.5",
"@vitest/coverage-v8": "2.0.5", "@vitest/coverage-v8": "2.0.5",
"@vitest/expect": "2.0.5", "@vitest/expect": "2.0.5",
"@vitest/spy": "2.0.5", "@vitest/spy": "2.0.5",
"@vitest/ui": "2.0.5", "@vitest/ui": "2.0.5",
"bun-types": "^1.1.24",
"chai": "5.1.0", "chai": "5.1.0",
"cjs-module-lexer": "1.2.3", "cjs-module-lexer": "1.2.3",
"dotenv-flow": "4.1.0", "dotenv-flow": "4.1.0",

View file

@ -1 +0,0 @@
../../node/src/common-internals-node

View file

@ -1,14 +1,32 @@
import * as os from 'node:os' import * as os from 'node:os'
import { NodePlatform } from './common-internals-node/platform.js' import type { ICorePlatform } from '@mtcute/core'
import { normalizeFile } from './utils/normalize-file.js'
export class BunPlatform extends NodePlatform { import { normalizeFile } from './utils/normalize-file.js'
import { defaultLoggingHandler } from './utils/logging.js'
import { beforeExit } from './utils/exit-hook.js'
export class BunPlatform implements ICorePlatform {
// ICorePlatform
declare log: typeof defaultLoggingHandler
declare beforeExit: typeof beforeExit
declare normalizeFile: typeof normalizeFile declare normalizeFile: typeof normalizeFile
getDeviceModel(): string { getDeviceModel(): string {
return `Bun/${Bun.version} (${os.type()} ${os.arch()})` return `Bun/${Bun.version} (${os.type()} ${os.arch()})`
} }
getDefaultLogLevel(): number | null {
const envLogLevel = Number.parseInt(process.env.MTCUTE_LOG_LEVEL ?? '')
if (!Number.isNaN(envLogLevel)) {
return envLogLevel
}
return null
}
} }
BunPlatform.prototype.normalizeFile = normalizeFile BunPlatform.prototype.normalizeFile = normalizeFile
BunPlatform.prototype.log = defaultLoggingHandler
BunPlatform.prototype.beforeExit = beforeExit

View file

@ -18,7 +18,7 @@ import { downloadAsNodeStream } from './methods/download-node-stream.js'
import { SqliteStorage } from './sqlite/index.js' import { SqliteStorage } from './sqlite/index.js'
import { NodeCryptoProvider } from './utils/crypto.js' import { NodeCryptoProvider } from './utils/crypto.js'
import { TcpTransport } from './utils/tcp.js' import { TcpTransport } from './utils/tcp.js'
import { NodePlatform } from './common-internals-node/platform.js' import { NodePlatform } from './utils/platform.js'
export type { TelegramClientOptions } export type { TelegramClientOptions }

View file

@ -1,2 +0,0 @@
this folder is for common code across `@mtcute/node` and `@mtcute/bun`.
it is symlinked into `@mtcute/bun`

View file

@ -1,5 +1,5 @@
export * from './client.js' export * from './client.js'
export * from './common-internals-node/platform.js' export * from './utils/platform.js'
export * from './sqlite/index.js' export * from './sqlite/index.js'
export * from './utils/tcp.js' export * from './utils/tcp.js'
export * from './utils/proxies.js' export * from './utils/proxies.js'

View file

@ -0,0 +1,54 @@
// roughly based on https://github.com/sindresorhus/exit-hook/blob/main/index.js, MIT license
let installed = false
let handled = false
const callbacks = new Set<() => void>()
const myHandlers = new Map<string, () => void>()
function register(shouldManuallyExit: boolean, signal: number, event: string) {
function eventHandler() {
if (handled) {
return
}
handled = true
for (const callback of callbacks) {
callback()
}
for (const [event, handler] of myHandlers) {
process.off(event, handler)
}
if (shouldManuallyExit) {
// send the signal again and let node handle it
process.kill(process.pid, signal)
}
}
process.on(event, eventHandler)
myHandlers.set(event, eventHandler)
}
export function beforeExit(fn: () => void): () => void {
// unsupported platform
if (typeof process === 'undefined') return () => {}
if (!installed) {
installed = true
register(true, 0, 'beforeExit')
register(true, 2, 'SIGINT')
register(true, 15, 'SIGTERM')
register(false, 15, 'exit')
}
callbacks.add(fn)
return () => {
callbacks.delete(fn)
}
}

View file

@ -0,0 +1,38 @@
const isTty = typeof process === 'object' && Boolean(process.stdout?.isTTY)
const BASE_FORMAT = isTty ? '%s [%s] [%s%s\x1B[0m] ' : '%s [%s] [%s] '
const LEVEL_NAMES = isTty
? [
'', // OFF
'\x1B[31mERR\x1B[0m',
'\x1B[33mWRN\x1B[0m',
'\x1B[34mINF\x1B[0m',
'\x1B[36mDBG\x1B[0m',
'\x1B[35mVRB\x1B[0m',
]
: [
'', // OFF
'ERR',
'WRN',
'INF',
'DBG',
'VRB',
]
const TAG_COLORS = [6, 2, 3, 4, 5, 1].map(i => `\x1B[3${i};1m`)
/** @internal */
export const defaultLoggingHandler: (
color: number,
level: number,
tag: string,
fmt: string,
args: unknown[]
) => void = isTty
? (color: number, level: number, tag: string, fmt: string, args: unknown[]): void => {
// eslint-disable-next-line no-console
console.log(BASE_FORMAT + fmt, new Date().toISOString(), LEVEL_NAMES[level], TAG_COLORS[color], tag, ...args)
}
: (color: number, level: number, tag: string, fmt: string, args: unknown[]): void => {
// eslint-disable-next-line no-console
console.log(BASE_FORMAT + fmt, new Date().toISOString(), LEVEL_NAMES[level], tag, ...args)
}

View file

@ -14,7 +14,7 @@ import {
TelegramWorkerPort as TelegramWorkerPortBase, TelegramWorkerPort as TelegramWorkerPortBase,
} from '@mtcute/core/worker.js' } from '@mtcute/core/worker.js'
import { NodePlatform } from './common-internals-node/platform.js' import { NodePlatform } from './utils/platform.js'
export type { TelegramWorkerOptions, WorkerCustomMethods } export type { TelegramWorkerOptions, WorkerCustomMethods }

View file

@ -15,11 +15,14 @@ importers:
specifier: 2.26.0 specifier: 2.26.0
version: 2.26.0(@typescript-eslint/utils@8.14.0(eslint@9.9.0)(typescript@5.5.4))(@vue/compiler-sfc@3.5.13)(eslint@9.9.0)(typescript@5.5.4)(vitest@2.0.5(@types/node@20.10.0)(@vitest/browser@2.0.5)(@vitest/ui@2.0.5)) version: 2.26.0(@typescript-eslint/utils@8.14.0(eslint@9.9.0)(typescript@5.5.4))(@vue/compiler-sfc@3.5.13)(eslint@9.9.0)(typescript@5.5.4)(vitest@2.0.5(@types/node@20.10.0)(@vitest/browser@2.0.5)(@vitest/ui@2.0.5))
'@fuman/build': '@fuman/build':
specifier: https://pkg.pr.new/teidesu/fuman/@fuman/build@6017eb4 specifier: https://pkg.pr.new/teidesu/fuman/@fuman/build@1a73dc1
version: https://pkg.pr.new/teidesu/fuman/@fuman/build@6017eb4(tough-cookie@4.1.4)(typescript@5.5.4)(vite@5.4.2(@types/node@20.10.0)) version: https://pkg.pr.new/teidesu/fuman/@fuman/build@1a73dc1(tough-cookie@4.1.4)(typescript@5.5.4)(vite@5.4.2(@types/node@20.10.0))
'@fuman/utils': '@fuman/utils':
specifier: https://pkg.pr.new/teidesu/fuman/@fuman/utils@6017eb4 specifier: https://pkg.pr.new/teidesu/fuman/@fuman/utils@6017eb4
version: https://pkg.pr.new/teidesu/fuman/@fuman/utils@6017eb4 version: https://pkg.pr.new/teidesu/fuman/@fuman/utils@6017eb4
'@types/bun':
specifier: 1.1.14
version: 1.1.14
'@types/deno': '@types/deno':
specifier: npm:@teidesu/deno-types@1.46.3 specifier: npm:@teidesu/deno-types@1.46.3
version: '@teidesu/deno-types@1.46.3' version: '@teidesu/deno-types@1.46.3'
@ -44,9 +47,6 @@ importers:
'@vitest/ui': '@vitest/ui':
specifier: 2.0.5 specifier: 2.0.5
version: 2.0.5(vitest@2.0.5) version: 2.0.5(vitest@2.0.5)
bun-types:
specifier: ^1.1.24
version: 1.1.34
chai: chai:
specifier: 5.1.0 specifier: 5.1.0
version: 5.1.0 version: 5.1.0
@ -904,8 +904,8 @@ packages:
resolution: {integrity: sha512-BsWiH1yFGjXXS2yvrf5LyuoSIIbPrGUWob917o+BTKuZ7qJdxX8aJLRxs1fS9n6r7vESrq1OUqb68dANcFXuQQ==} resolution: {integrity: sha512-BsWiH1yFGjXXS2yvrf5LyuoSIIbPrGUWob917o+BTKuZ7qJdxX8aJLRxs1fS9n6r7vESrq1OUqb68dANcFXuQQ==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
'@fuman/build@https://pkg.pr.new/teidesu/fuman/@fuman/build@6017eb4': '@fuman/build@https://pkg.pr.new/teidesu/fuman/@fuman/build@1a73dc1':
resolution: {tarball: https://pkg.pr.new/teidesu/fuman/@fuman/build@6017eb4} resolution: {tarball: https://pkg.pr.new/teidesu/fuman/@fuman/build@1a73dc1}
version: 0.0.1 version: 0.0.1
hasBin: true hasBin: true
peerDependencies: peerDependencies:
@ -916,6 +916,24 @@ packages:
resolution: {tarball: https://pkg.pr.new/teidesu/fuman/@fuman/bun@6017eb4} resolution: {tarball: https://pkg.pr.new/teidesu/fuman/@fuman/bun@6017eb4}
version: 0.0.1 version: 0.0.1
'@fuman/fetch@https://pkg.pr.new/teidesu/fuman/@fuman/fetch@1a73dc1':
resolution: {tarball: https://pkg.pr.new/teidesu/fuman/@fuman/fetch@1a73dc1}
version: 0.0.1
peerDependencies:
tough-cookie: ^5.0.0 || ^4.0.0
valibot: ^0.42.0
yup: ^1.0.0
zod: ^3.0.0
peerDependenciesMeta:
tough-cookie:
optional: true
valibot:
optional: true
yup:
optional: true
zod:
optional: true
'@fuman/fetch@https://pkg.pr.new/teidesu/fuman/@fuman/fetch@6017eb4': '@fuman/fetch@https://pkg.pr.new/teidesu/fuman/@fuman/fetch@6017eb4':
resolution: {tarball: https://pkg.pr.new/teidesu/fuman/@fuman/fetch@6017eb4} resolution: {tarball: https://pkg.pr.new/teidesu/fuman/@fuman/fetch@6017eb4}
version: 0.0.1 version: 0.0.1
@ -934,18 +952,34 @@ packages:
zod: zod:
optional: true optional: true
'@fuman/io@https://pkg.pr.new/teidesu/fuman/@fuman/io@1a73dc1':
resolution: {tarball: https://pkg.pr.new/teidesu/fuman/@fuman/io@1a73dc1}
version: 0.0.1
'@fuman/io@https://pkg.pr.new/teidesu/fuman/@fuman/io@6017eb4': '@fuman/io@https://pkg.pr.new/teidesu/fuman/@fuman/io@6017eb4':
resolution: {tarball: https://pkg.pr.new/teidesu/fuman/@fuman/io@6017eb4} resolution: {tarball: https://pkg.pr.new/teidesu/fuman/@fuman/io@6017eb4}
version: 0.0.1 version: 0.0.1
'@fuman/net@https://pkg.pr.new/teidesu/fuman/@fuman/net@1a73dc1':
resolution: {tarball: https://pkg.pr.new/teidesu/fuman/@fuman/net@1a73dc1}
version: 0.0.1
'@fuman/net@https://pkg.pr.new/teidesu/fuman/@fuman/net@6017eb4': '@fuman/net@https://pkg.pr.new/teidesu/fuman/@fuman/net@6017eb4':
resolution: {tarball: https://pkg.pr.new/teidesu/fuman/@fuman/net@6017eb4} resolution: {tarball: https://pkg.pr.new/teidesu/fuman/@fuman/net@6017eb4}
version: 0.0.1 version: 0.0.1
'@fuman/node@https://pkg.pr.new/teidesu/fuman/@fuman/node@1a73dc1':
resolution: {tarball: https://pkg.pr.new/teidesu/fuman/@fuman/node@1a73dc1}
version: 0.0.1
'@fuman/node@https://pkg.pr.new/teidesu/fuman/@fuman/node@6017eb4': '@fuman/node@https://pkg.pr.new/teidesu/fuman/@fuman/node@6017eb4':
resolution: {tarball: https://pkg.pr.new/teidesu/fuman/@fuman/node@6017eb4} resolution: {tarball: https://pkg.pr.new/teidesu/fuman/@fuman/node@6017eb4}
version: 0.0.1 version: 0.0.1
'@fuman/utils@https://pkg.pr.new/teidesu/fuman/@fuman/utils@1a73dc1':
resolution: {tarball: https://pkg.pr.new/teidesu/fuman/@fuman/utils@1a73dc1}
version: 0.0.1
'@fuman/utils@https://pkg.pr.new/teidesu/fuman/@fuman/utils@6017eb4': '@fuman/utils@https://pkg.pr.new/teidesu/fuman/@fuman/utils@6017eb4':
resolution: {tarball: https://pkg.pr.new/teidesu/fuman/@fuman/utils@6017eb4} resolution: {tarball: https://pkg.pr.new/teidesu/fuman/@fuman/utils@6017eb4}
version: 0.0.1 version: 0.0.1
@ -1276,6 +1310,9 @@ packages:
'@types/better-sqlite3@7.6.4': '@types/better-sqlite3@7.6.4':
resolution: {integrity: sha512-dzrRZCYPXIXfSR1/surNbJ/grU3scTaygS0OMzjlGf71i9sc2fGyHPXXiXmEvNIoE0cGwsanEFMVJxPXmco9Eg==} resolution: {integrity: sha512-dzrRZCYPXIXfSR1/surNbJ/grU3scTaygS0OMzjlGf71i9sc2fGyHPXXiXmEvNIoE0cGwsanEFMVJxPXmco9Eg==}
'@types/bun@1.1.14':
resolution: {integrity: sha512-opVYiFGtO2af0dnWBdZWlioLBoxSdDO5qokaazLhq8XQtGZbY4pY3/JxY8Zdf/hEwGubbp7ErZXoN1+h2yesxA==}
'@types/cookie@0.6.0': '@types/cookie@0.6.0':
resolution: {integrity: sha512-4Kh9a6B2bQciAhf7FSuMRRkUWecJgJu9nPnx3yzpsfXX/c50REIqpHY4C82bXP90qrLtXtkDxTZosYO3UpOwlA==} resolution: {integrity: sha512-4Kh9a6B2bQciAhf7FSuMRRkUWecJgJu9nPnx3yzpsfXX/c50REIqpHY4C82bXP90qrLtXtkDxTZosYO3UpOwlA==}
@ -1691,8 +1728,8 @@ packages:
builtin-status-codes@3.0.0: builtin-status-codes@3.0.0:
resolution: {integrity: sha512-HpGFw18DgFWlncDfjTa2rcQ4W88O1mC8e8yZ2AvQY5KDaktSTwo+KRf6nHK6FRI5FyRyb/5T6+TSxfP7QyGsmQ==} resolution: {integrity: sha512-HpGFw18DgFWlncDfjTa2rcQ4W88O1mC8e8yZ2AvQY5KDaktSTwo+KRf6nHK6FRI5FyRyb/5T6+TSxfP7QyGsmQ==}
bun-types@1.1.34: bun-types@1.1.37:
resolution: {integrity: sha512-br5QygTEL/TwB4uQOb96Ky22j4Gq2WxWH/8Oqv20fk5HagwKXo/akB+LiYgSfzexCt6kkcUaVm+bKiPl71xPvw==} resolution: {integrity: sha512-C65lv6eBr3LPJWFZ2gswyrGZ82ljnH8flVE03xeXxKhi2ZGtFiO4isRKTKnitbSqtRAcaqYSR6djt1whI66AbA==}
cac@6.7.14: cac@6.7.14:
resolution: {integrity: sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==} resolution: {integrity: sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==}
@ -4253,13 +4290,13 @@ snapshots:
'@eslint/object-schema@2.1.4': {} '@eslint/object-schema@2.1.4': {}
'@fuman/build@https://pkg.pr.new/teidesu/fuman/@fuman/build@6017eb4(tough-cookie@4.1.4)(typescript@5.5.4)(vite@5.4.2(@types/node@20.10.0))': '@fuman/build@https://pkg.pr.new/teidesu/fuman/@fuman/build@1a73dc1(tough-cookie@4.1.4)(typescript@5.5.4)(vite@5.4.2(@types/node@20.10.0))':
dependencies: dependencies:
'@drizzle-team/brocli': 0.10.2 '@drizzle-team/brocli': 0.10.2
'@fuman/fetch': https://pkg.pr.new/teidesu/fuman/@fuman/fetch@6017eb4(tough-cookie@4.1.4)(zod@3.23.8) '@fuman/fetch': https://pkg.pr.new/teidesu/fuman/@fuman/fetch@1a73dc1(tough-cookie@4.1.4)(zod@3.23.8)
'@fuman/io': https://pkg.pr.new/teidesu/fuman/@fuman/io@6017eb4 '@fuman/io': https://pkg.pr.new/teidesu/fuman/@fuman/io@1a73dc1
'@fuman/node': https://pkg.pr.new/teidesu/fuman/@fuman/node@6017eb4 '@fuman/node': https://pkg.pr.new/teidesu/fuman/@fuman/node@1a73dc1
'@fuman/utils': https://pkg.pr.new/teidesu/fuman/@fuman/utils@6017eb4 '@fuman/utils': https://pkg.pr.new/teidesu/fuman/@fuman/utils@1a73dc1
cross-spawn: 7.0.3 cross-spawn: 7.0.3
detect-indent: 7.0.1 detect-indent: 7.0.1
js-yaml: 4.1.0 js-yaml: 4.1.0
@ -4280,6 +4317,13 @@ snapshots:
'@fuman/net': https://pkg.pr.new/teidesu/fuman/@fuman/net@6017eb4 '@fuman/net': https://pkg.pr.new/teidesu/fuman/@fuman/net@6017eb4
'@fuman/utils': https://pkg.pr.new/teidesu/fuman/@fuman/utils@6017eb4 '@fuman/utils': https://pkg.pr.new/teidesu/fuman/@fuman/utils@6017eb4
'@fuman/fetch@https://pkg.pr.new/teidesu/fuman/@fuman/fetch@1a73dc1(tough-cookie@4.1.4)(zod@3.23.8)':
dependencies:
'@fuman/utils': https://pkg.pr.new/teidesu/fuman/@fuman/utils@1a73dc1
optionalDependencies:
tough-cookie: 4.1.4
zod: 3.23.8
'@fuman/fetch@https://pkg.pr.new/teidesu/fuman/@fuman/fetch@6017eb4(tough-cookie@4.1.4)(zod@3.23.8)': '@fuman/fetch@https://pkg.pr.new/teidesu/fuman/@fuman/fetch@6017eb4(tough-cookie@4.1.4)(zod@3.23.8)':
dependencies: dependencies:
'@fuman/utils': https://pkg.pr.new/teidesu/fuman/@fuman/utils@6017eb4 '@fuman/utils': https://pkg.pr.new/teidesu/fuman/@fuman/utils@6017eb4
@ -4287,21 +4331,38 @@ snapshots:
tough-cookie: 4.1.4 tough-cookie: 4.1.4
zod: 3.23.8 zod: 3.23.8
'@fuman/io@https://pkg.pr.new/teidesu/fuman/@fuman/io@1a73dc1':
dependencies:
'@fuman/utils': https://pkg.pr.new/teidesu/fuman/@fuman/utils@1a73dc1
'@fuman/io@https://pkg.pr.new/teidesu/fuman/@fuman/io@6017eb4': '@fuman/io@https://pkg.pr.new/teidesu/fuman/@fuman/io@6017eb4':
dependencies: dependencies:
'@fuman/utils': https://pkg.pr.new/teidesu/fuman/@fuman/utils@6017eb4 '@fuman/utils': https://pkg.pr.new/teidesu/fuman/@fuman/utils@6017eb4
'@fuman/net@https://pkg.pr.new/teidesu/fuman/@fuman/net@1a73dc1':
dependencies:
'@fuman/io': https://pkg.pr.new/teidesu/fuman/@fuman/io@1a73dc1
'@fuman/utils': https://pkg.pr.new/teidesu/fuman/@fuman/utils@1a73dc1
'@fuman/net@https://pkg.pr.new/teidesu/fuman/@fuman/net@6017eb4': '@fuman/net@https://pkg.pr.new/teidesu/fuman/@fuman/net@6017eb4':
dependencies: dependencies:
'@fuman/io': https://pkg.pr.new/teidesu/fuman/@fuman/io@6017eb4 '@fuman/io': https://pkg.pr.new/teidesu/fuman/@fuman/io@6017eb4
'@fuman/utils': https://pkg.pr.new/teidesu/fuman/@fuman/utils@6017eb4 '@fuman/utils': https://pkg.pr.new/teidesu/fuman/@fuman/utils@6017eb4
'@fuman/node@https://pkg.pr.new/teidesu/fuman/@fuman/node@1a73dc1':
dependencies:
'@fuman/io': https://pkg.pr.new/teidesu/fuman/@fuman/io@1a73dc1
'@fuman/net': https://pkg.pr.new/teidesu/fuman/@fuman/net@1a73dc1
'@fuman/utils': https://pkg.pr.new/teidesu/fuman/@fuman/utils@1a73dc1
'@fuman/node@https://pkg.pr.new/teidesu/fuman/@fuman/node@6017eb4': '@fuman/node@https://pkg.pr.new/teidesu/fuman/@fuman/node@6017eb4':
dependencies: dependencies:
'@fuman/io': https://pkg.pr.new/teidesu/fuman/@fuman/io@6017eb4 '@fuman/io': https://pkg.pr.new/teidesu/fuman/@fuman/io@6017eb4
'@fuman/net': https://pkg.pr.new/teidesu/fuman/@fuman/net@6017eb4 '@fuman/net': https://pkg.pr.new/teidesu/fuman/@fuman/net@6017eb4
'@fuman/utils': https://pkg.pr.new/teidesu/fuman/@fuman/utils@6017eb4 '@fuman/utils': https://pkg.pr.new/teidesu/fuman/@fuman/utils@6017eb4
'@fuman/utils@https://pkg.pr.new/teidesu/fuman/@fuman/utils@1a73dc1': {}
'@fuman/utils@https://pkg.pr.new/teidesu/fuman/@fuman/utils@6017eb4': {} '@fuman/utils@https://pkg.pr.new/teidesu/fuman/@fuman/utils@6017eb4': {}
'@humanwhocodes/module-importer@1.0.1': {} '@humanwhocodes/module-importer@1.0.1': {}
@ -4665,6 +4726,10 @@ snapshots:
dependencies: dependencies:
'@types/node': 20.10.0 '@types/node': 20.10.0
'@types/bun@1.1.14':
dependencies:
bun-types: 1.1.37
'@types/cookie@0.6.0': {} '@types/cookie@0.6.0': {}
'@types/cross-spawn@6.0.6': '@types/cross-spawn@6.0.6':
@ -5202,7 +5267,7 @@ snapshots:
builtin-status-codes@3.0.0: {} builtin-status-codes@3.0.0: {}
bun-types@1.1.34: bun-types@1.1.37:
dependencies: dependencies:
'@types/node': 20.12.14 '@types/node': 20.12.14
'@types/ws': 8.5.13 '@types/ws': 8.5.13

View file

@ -12,7 +12,7 @@
"moduleResolution": "Bundler", "moduleResolution": "Bundler",
"resolveJsonModule": true, "resolveJsonModule": true,
"types": [ "types": [
"bun-types", "bun",
"node", "node",
"deno/ns", "deno/ns",
"vite/client" "vite/client"