refactor: fix Element type import
This commit is contained in:
parent
74fd9ee55c
commit
8faec7fbfd
|
|
@ -1,5 +1,6 @@
|
|||
import * as entities from 'entities';
|
||||
import { load, type CheerioAPI, type Element } from 'cheerio';
|
||||
import { load, type CheerioAPI } from 'cheerio';
|
||||
import type { Element } from 'domhandler';
|
||||
import { simplecc } from 'simplecc-wasm';
|
||||
import ofetch from '@/utils/ofetch';
|
||||
import { config } from '@/config';
|
||||
|
|
|
|||
|
|
@ -5,7 +5,8 @@ import cache from '@/utils/cache';
|
|||
import ofetch from '@/utils/ofetch';
|
||||
import { parseDate, parseRelativeDate } from '@/utils/parse-date';
|
||||
|
||||
import { type CheerioAPI, type Cheerio, type Element, load } from 'cheerio';
|
||||
import { type CheerioAPI, type Cheerio, load } from 'cheerio';
|
||||
import type { Element } from 'domhandler';
|
||||
import { type Context } from 'hono';
|
||||
import path from 'node:path';
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,8 @@ import cache from '@/utils/cache';
|
|||
import ofetch from '@/utils/ofetch';
|
||||
import { parseDate } from '@/utils/parse-date';
|
||||
|
||||
import { type CheerioAPI, type Cheerio, type Element, load } from 'cheerio';
|
||||
import { type CheerioAPI, type Cheerio, load } from 'cheerio';
|
||||
import type { Element } from 'domhandler';
|
||||
import { type Context } from 'hono';
|
||||
import path from 'node:path';
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,8 @@ import ofetch from '@/utils/ofetch';
|
|||
import { parseDate } from '@/utils/parse-date';
|
||||
import timezone from '@/utils/timezone';
|
||||
|
||||
import { type CheerioAPI, type Cheerio, type Element, load } from 'cheerio';
|
||||
import { type CheerioAPI, type Cheerio, load } from 'cheerio';
|
||||
import type { Element } from 'domhandler';
|
||||
import { type Context } from 'hono';
|
||||
import path from 'node:path';
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,8 @@ import ofetch from '@/utils/ofetch';
|
|||
import { parseDate } from '@/utils/parse-date';
|
||||
import timezone from '@/utils/timezone';
|
||||
|
||||
import { type CheerioAPI, type Cheerio, type Element, load } from 'cheerio';
|
||||
import { type CheerioAPI, type Cheerio, load } from 'cheerio';
|
||||
import type { Element } from 'domhandler';
|
||||
import { type Context } from 'hono';
|
||||
import path from 'node:path';
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,8 @@ import cache from '@/utils/cache';
|
|||
import ofetch from '@/utils/ofetch';
|
||||
import { parseDate } from '@/utils/parse-date';
|
||||
|
||||
import { type CheerioAPI, type Cheerio, type Element, load } from 'cheerio';
|
||||
import { type CheerioAPI, type Cheerio, load } from 'cheerio';
|
||||
import type { Element } from 'domhandler';
|
||||
import { type Context } from 'hono';
|
||||
|
||||
export const handler = async (ctx: Context): Promise<Data> => {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
import path from 'node:path';
|
||||
|
||||
import { type CheerioAPI, type Cheerio, type Element, load } from 'cheerio';
|
||||
import { type CheerioAPI, type Cheerio, load } from 'cheerio';
|
||||
import type { Element } from 'domhandler';
|
||||
import { type Context } from 'hono';
|
||||
|
||||
import { type DataItem, type Route, type Data, ViewType } from '@/types';
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
import path from 'node:path';
|
||||
|
||||
import { type CheerioAPI, type Cheerio, type Element, load } from 'cheerio';
|
||||
import { type CheerioAPI, type Cheerio, load } from 'cheerio';
|
||||
import type { Element } from 'domhandler';
|
||||
import { type Context } from 'hono';
|
||||
|
||||
import { type DataItem, type Route, type Data, ViewType } from '@/types';
|
||||
|
|
|
|||
|
|
@ -3,7 +3,8 @@ import { type Data, type DataItem, type Route, ViewType } from '@/types';
|
|||
import ofetch from '@/utils/ofetch';
|
||||
import { parseDate } from '@/utils/parse-date';
|
||||
|
||||
import { type CheerioAPI, type Cheerio, type Element, load } from 'cheerio';
|
||||
import { type CheerioAPI, type Cheerio, load } from 'cheerio';
|
||||
import type { Element } from 'domhandler';
|
||||
import { type Context } from 'hono';
|
||||
|
||||
export const handler = async (ctx: Context): Promise<Data> => {
|
||||
|
|
|
|||
|
|
@ -5,7 +5,8 @@ import cache from '@/utils/cache';
|
|||
import ofetch from '@/utils/ofetch';
|
||||
import { parseDate } from '@/utils/parse-date';
|
||||
|
||||
import { type CheerioAPI, type Cheerio, type Element, load } from 'cheerio';
|
||||
import { type CheerioAPI, type Cheerio, load } from 'cheerio';
|
||||
import type { Element } from 'domhandler';
|
||||
import { type Context } from 'hono';
|
||||
import path from 'node:path';
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,8 @@ import cache from '@/utils/cache';
|
|||
import ofetch from '@/utils/ofetch';
|
||||
import { parseDate } from '@/utils/parse-date';
|
||||
|
||||
import { type CheerioAPI, type Cheerio, type Element, load } from 'cheerio';
|
||||
import { type CheerioAPI, type Cheerio, load } from 'cheerio';
|
||||
import type { Element } from 'domhandler';
|
||||
import { type Context } from 'hono';
|
||||
import path from 'node:path';
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,8 @@ import cache from '@/utils/cache';
|
|||
import ofetch from '@/utils/ofetch';
|
||||
import { parseDate } from '@/utils/parse-date';
|
||||
|
||||
import { type CheerioAPI, type Cheerio, type Element, load } from 'cheerio';
|
||||
import { type CheerioAPI, type Cheerio, load } from 'cheerio';
|
||||
import type { Element } from 'domhandler';
|
||||
import { type Context } from 'hono';
|
||||
|
||||
export const handler = async (ctx: Context): Promise<Data> => {
|
||||
|
|
|
|||
|
|
@ -4,7 +4,8 @@ import cache from '@/utils/cache';
|
|||
import ofetch from '@/utils/ofetch';
|
||||
import { parseDate } from '@/utils/parse-date';
|
||||
|
||||
import { type CheerioAPI, type Cheerio, type Element, load } from 'cheerio';
|
||||
import { type CheerioAPI, type Cheerio, load } from 'cheerio';
|
||||
import type { Element } from 'domhandler';
|
||||
import { type Context } from 'hono';
|
||||
|
||||
export const handler = async (ctx: Context): Promise<Data> => {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import { type Cheerio, type CheerioAPI, type Element, load } from 'cheerio';
|
||||
import { type Cheerio, type CheerioAPI, load } from 'cheerio';
|
||||
import type { Element } from 'domhandler';
|
||||
import ofetch from '@/utils/ofetch';
|
||||
import type { DataItem } from '@/types';
|
||||
import { parseDate } from '@/utils/parse-date';
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
import path from 'node:path';
|
||||
|
||||
import { type CheerioAPI, type Cheerio, type Element, load } from 'cheerio';
|
||||
import { type CheerioAPI, type Cheerio, load } from 'cheerio';
|
||||
import type { Element } from 'domhandler';
|
||||
import { type Context } from 'hono';
|
||||
|
||||
import { type DataItem, type Route, type Data, ViewType } from '@/types';
|
||||
|
|
|
|||
|
|
@ -6,7 +6,8 @@ import ofetch from '@/utils/ofetch';
|
|||
import { parseDate } from '@/utils/parse-date';
|
||||
import timezone from '@/utils/timezone';
|
||||
|
||||
import { type CheerioAPI, type Cheerio, type Element, load } from 'cheerio';
|
||||
import { type CheerioAPI, type Cheerio, load } from 'cheerio';
|
||||
import type { Element } from 'domhandler';
|
||||
import { type Context } from 'hono';
|
||||
import path from 'node:path';
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,8 @@ import cache from '@/utils/cache';
|
|||
import ofetch from '@/utils/ofetch';
|
||||
import { parseDate } from '@/utils/parse-date';
|
||||
|
||||
import { type CheerioAPI, type Cheerio, type Element, load } from 'cheerio';
|
||||
import { type CheerioAPI, type Cheerio, load } from 'cheerio';
|
||||
import type { Element } from 'domhandler';
|
||||
import { type Context } from 'hono';
|
||||
|
||||
export const handler = async (ctx: Context): Promise<Data> => {
|
||||
|
|
|
|||
|
|
@ -3,7 +3,8 @@ import { type Data, type DataItem, type Route, ViewType } from '@/types';
|
|||
import ofetch from '@/utils/ofetch';
|
||||
import { parseDate } from '@/utils/parse-date';
|
||||
|
||||
import { type CheerioAPI, type Cheerio, type Element, load } from 'cheerio';
|
||||
import { type CheerioAPI, type Cheerio, load } from 'cheerio';
|
||||
import type { Element } from 'domhandler';
|
||||
import { type Context } from 'hono';
|
||||
|
||||
export const handler = async (ctx: Context): Promise<Data> => {
|
||||
|
|
|
|||
|
|
@ -5,7 +5,8 @@ import ofetch from '@/utils/ofetch';
|
|||
import { parseDate } from '@/utils/parse-date';
|
||||
import timezone from '@/utils/timezone';
|
||||
|
||||
import { type CheerioAPI, type Cheerio, type Element, load } from 'cheerio';
|
||||
import { type CheerioAPI, type Cheerio, load } from 'cheerio';
|
||||
import type { Element } from 'domhandler';
|
||||
import { type Context } from 'hono';
|
||||
|
||||
export const handler = async (ctx: Context): Promise<Data> => {
|
||||
|
|
|
|||
|
|
@ -6,7 +6,8 @@ import ofetch from '@/utils/ofetch';
|
|||
import { parseDate } from '@/utils/parse-date';
|
||||
import timezone from '@/utils/timezone';
|
||||
|
||||
import { type CheerioAPI, type Cheerio, type Element, load } from 'cheerio';
|
||||
import { type CheerioAPI, type Cheerio, load } from 'cheerio';
|
||||
import type { Element } from 'domhandler';
|
||||
import { type Context } from 'hono';
|
||||
|
||||
const domain: string = 'www.dydytt.net';
|
||||
|
|
|
|||
|
|
@ -6,7 +6,8 @@ import ofetch from '@/utils/ofetch';
|
|||
import { parseDate } from '@/utils/parse-date';
|
||||
import timezone from '@/utils/timezone';
|
||||
|
||||
import { type CheerioAPI, type Cheerio, type Element, load } from 'cheerio';
|
||||
import { type CheerioAPI, type Cheerio, load } from 'cheerio';
|
||||
import type { Element } from 'domhandler';
|
||||
import { type Context } from 'hono';
|
||||
import path from 'node:path';
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,8 @@ import ofetch from '@/utils/ofetch';
|
|||
import { parseDate } from '@/utils/parse-date';
|
||||
import timezone from '@/utils/timezone';
|
||||
|
||||
import { type CheerioAPI, type Cheerio, type Element, load } from 'cheerio';
|
||||
import { type CheerioAPI, type Cheerio, load } from 'cheerio';
|
||||
import type { Element } from 'domhandler';
|
||||
import { type Context } from 'hono';
|
||||
|
||||
export const handler = async (ctx: Context): Promise<Data> => {
|
||||
|
|
|
|||
|
|
@ -4,7 +4,8 @@ import ofetch from '@/utils/ofetch';
|
|||
import { parseDate } from '@/utils/parse-date';
|
||||
import timezone from '@/utils/timezone';
|
||||
|
||||
import { type CheerioAPI, type Cheerio, type Element, load } from 'cheerio';
|
||||
import { type CheerioAPI, type Cheerio, load } from 'cheerio';
|
||||
import type { Element } from 'domhandler';
|
||||
import { type Context } from 'hono';
|
||||
|
||||
export const handler = async (ctx: Context): Promise<Data> => {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import { type CheerioAPI, type Cheerio, type Element, load } from 'cheerio';
|
||||
import { type CheerioAPI, type Cheerio, load } from 'cheerio';
|
||||
import type { Element } from 'domhandler';
|
||||
|
||||
import { type DataItem } from '@/types';
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
import path from 'node:path';
|
||||
|
||||
import { type CheerioAPI, type Cheerio, type Element, load } from 'cheerio';
|
||||
import { type CheerioAPI, type Cheerio, load } from 'cheerio';
|
||||
import type { Element } from 'domhandler';
|
||||
import { type Context } from 'hono';
|
||||
|
||||
import { type DataItem, type Route, type Data, ViewType } from '@/types';
|
||||
|
|
|
|||
|
|
@ -5,7 +5,8 @@ import cache from '@/utils/cache';
|
|||
import ofetch from '@/utils/ofetch';
|
||||
import { parseDate } from '@/utils/parse-date';
|
||||
|
||||
import { type CheerioAPI, type Cheerio, type Element, load } from 'cheerio';
|
||||
import { type CheerioAPI, type Cheerio, load } from 'cheerio';
|
||||
import type { Element } from 'domhandler';
|
||||
import { type Context } from 'hono';
|
||||
import path from 'node:path';
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,8 @@ import ofetch from '@/utils/ofetch';
|
|||
import { parseDate } from '@/utils/parse-date';
|
||||
import timezone from '@/utils/timezone';
|
||||
|
||||
import { type CheerioAPI, type Cheerio, type Element, load } from 'cheerio';
|
||||
import { type CheerioAPI, type Cheerio, load } from 'cheerio';
|
||||
import type { Element } from 'domhandler';
|
||||
import { type Context } from 'hono';
|
||||
import path from 'node:path';
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,8 @@ import { type Data, type DataItem, type Route, ViewType } from '@/types';
|
|||
import ofetch from '@/utils/ofetch';
|
||||
import { parseDate } from '@/utils/parse-date';
|
||||
|
||||
import { type CheerioAPI, type Cheerio, type Element, load } from 'cheerio';
|
||||
import { type CheerioAPI, type Cheerio, load } from 'cheerio';
|
||||
import type { Element } from 'domhandler';
|
||||
import { type Context } from 'hono';
|
||||
|
||||
export const handler = async (ctx: Context): Promise<Data> => {
|
||||
|
|
|
|||
|
|
@ -5,7 +5,8 @@ import cache from '@/utils/cache';
|
|||
import ofetch from '@/utils/ofetch';
|
||||
import { parseDate } from '@/utils/parse-date';
|
||||
|
||||
import { type CheerioAPI, type Cheerio, type Element, load } from 'cheerio';
|
||||
import { type CheerioAPI, type Cheerio, load } from 'cheerio';
|
||||
import type { Element } from 'domhandler';
|
||||
import { type Context } from 'hono';
|
||||
import path from 'node:path';
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,8 @@ import cache from '@/utils/cache';
|
|||
import ofetch from '@/utils/ofetch';
|
||||
import { parseDate } from '@/utils/parse-date';
|
||||
|
||||
import { type CheerioAPI, type Cheerio, type Element, load } from 'cheerio';
|
||||
import { type CheerioAPI, type Cheerio, load } from 'cheerio';
|
||||
import type { Element } from 'domhandler';
|
||||
import { type Context } from 'hono';
|
||||
|
||||
export const handler = async (ctx: Context): Promise<Data> => {
|
||||
|
|
|
|||
|
|
@ -4,7 +4,8 @@ import cache from '@/utils/cache';
|
|||
import ofetch from '@/utils/ofetch';
|
||||
import { parseDate } from '@/utils/parse-date';
|
||||
|
||||
import { type CheerioAPI, type Cheerio, type Element, load } from 'cheerio';
|
||||
import { type CheerioAPI, type Cheerio, load } from 'cheerio';
|
||||
import type { Element } from 'domhandler';
|
||||
import { type Context } from 'hono';
|
||||
|
||||
export const handler = async (ctx: Context): Promise<Data> => {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
import path from 'node:path';
|
||||
|
||||
import { type CheerioAPI, type Cheerio, type Element, load } from 'cheerio';
|
||||
import { type CheerioAPI, type Cheerio, load } from 'cheerio';
|
||||
import type { Element } from 'domhandler';
|
||||
import { type Context } from 'hono';
|
||||
|
||||
import { type DataItem, type Route, type Data, ViewType } from '@/types';
|
||||
|
|
|
|||
|
|
@ -5,7 +5,8 @@ import cache from '@/utils/cache';
|
|||
import ofetch from '@/utils/ofetch';
|
||||
import { parseDate } from '@/utils/parse-date';
|
||||
|
||||
import { type CheerioAPI, type Cheerio, type Element, load } from 'cheerio';
|
||||
import { type CheerioAPI, type Cheerio, load } from 'cheerio';
|
||||
import type { Element } from 'domhandler';
|
||||
import { type Context } from 'hono';
|
||||
import path from 'node:path';
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,8 @@ import ofetch from '@/utils/ofetch';
|
|||
import { parseDate } from '@/utils/parse-date';
|
||||
import timezone from '@/utils/timezone';
|
||||
|
||||
import { type CheerioAPI, type Cheerio, type Element, load } from 'cheerio';
|
||||
import { type CheerioAPI, type Cheerio, load } from 'cheerio';
|
||||
import type { Element } from 'domhandler';
|
||||
import { type Context } from 'hono';
|
||||
import path from 'node:path';
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,8 @@ import cache from '@/utils/cache';
|
|||
import ofetch from '@/utils/ofetch';
|
||||
import { parseDate } from '@/utils/parse-date';
|
||||
|
||||
import { type CheerioAPI, type Cheerio, type Element, load } from 'cheerio';
|
||||
import { type CheerioAPI, type Cheerio, load } from 'cheerio';
|
||||
import type { Element } from 'domhandler';
|
||||
import { type Context } from 'hono';
|
||||
import path from 'node:path';
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,8 @@ import ofetch from '@/utils/ofetch';
|
|||
import { parseDate } from '@/utils/parse-date';
|
||||
import timezone from '@/utils/timezone';
|
||||
|
||||
import { type CheerioAPI, type Cheerio, type Element, load } from 'cheerio';
|
||||
import { type CheerioAPI, type Cheerio, load } from 'cheerio';
|
||||
import type { Element } from 'domhandler';
|
||||
import { type Context } from 'hono';
|
||||
|
||||
export const handler = async (ctx: Context): Promise<Data> => {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
import { Route } from '@/types';
|
||||
import cache from '@/utils/cache';
|
||||
import got from '@/utils/got';
|
||||
import { load, type CheerioAPI, type Element } from 'cheerio';
|
||||
import { load, type CheerioAPI } from 'cheerio';
|
||||
import type { Element } from 'domhandler';
|
||||
import { art } from '@/utils/render';
|
||||
import path from 'node:path';
|
||||
import { config } from '@/config';
|
||||
|
|
|
|||
|
|
@ -5,7 +5,8 @@ import ofetch from '@/utils/ofetch';
|
|||
import { parseDate } from '@/utils/parse-date';
|
||||
import timezone from '@/utils/timezone';
|
||||
|
||||
import { type CheerioAPI, type Cheerio, type Element, load } from 'cheerio';
|
||||
import { type CheerioAPI, type Cheerio, load } from 'cheerio';
|
||||
import type { Element } from 'domhandler';
|
||||
import { type Context } from 'hono';
|
||||
|
||||
export const handler = async (ctx: Context): Promise<Data> => {
|
||||
|
|
|
|||
|
|
@ -26,7 +26,8 @@
|
|||
*/
|
||||
|
||||
import ofetch from '@/utils/ofetch';
|
||||
import { type Cheerio, type CheerioAPI, type Element, load } from 'cheerio';
|
||||
import { type Cheerio, type CheerioAPI, load } from 'cheerio';
|
||||
import type { Element } from 'domhandler';
|
||||
import { parseDate } from '@/utils/parse-date';
|
||||
import cache from '@/utils/cache';
|
||||
import logger from '@/utils/logger';
|
||||
|
|
|
|||
|
|
@ -172,6 +172,7 @@
|
|||
"@vercel/nft": "0.29.2",
|
||||
"@vitest/coverage-v8": "2.1.9",
|
||||
"discord-api-types": "0.38.3",
|
||||
"domhandler": "5.0.3",
|
||||
"eslint": "9.26.0",
|
||||
"eslint-config-prettier": "10.1.2",
|
||||
"eslint-nibble": "8.1.0",
|
||||
|
|
|
|||
|
|
@ -383,6 +383,9 @@ importers:
|
|||
discord-api-types:
|
||||
specifier: 0.38.3
|
||||
version: 0.38.3
|
||||
domhandler:
|
||||
specifier: 5.0.3
|
||||
version: 5.0.3
|
||||
eslint:
|
||||
specifier: 9.26.0
|
||||
version: 9.26.0(jiti@2.4.2)
|
||||
|
|
|
|||
Loading…
Reference in New Issue