mgbuild 2.1.63 → 2.1.65
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/@types/index.d.ts +1 -1
- package/lib/index.d.ts +2 -2
- package/lib/index.js +1 -1
- package/lib/mgs/ast/index.d.ts +1 -1
- package/lib/mgs/ma/2.0/api.d.ts +40 -0
- package/lib/mgs/ma/2.0/index.d.ts +39 -0
- package/lib/mgs/yc/2.0/api.d.ts +43 -0
- package/lib/mgs/yc/2.0/index.d.ts +36 -0
- package/lib/utils/tinyfetch.d.ts +2 -0
- package/lib/utils/tools.d.ts +1 -0
- package/package.json +1 -1
package/lib/mgs/ast/index.d.ts
CHANGED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export declare class Api {
|
|
2
|
+
private baseURL;
|
|
3
|
+
private logger?;
|
|
4
|
+
constructor(baseURL: string, logger?: ((logger: any) => void) | undefined);
|
|
5
|
+
private get;
|
|
6
|
+
data(): Promise<{
|
|
7
|
+
data: {
|
|
8
|
+
manga_id: number;
|
|
9
|
+
titulo: string;
|
|
10
|
+
descricao: string;
|
|
11
|
+
imagem: string;
|
|
12
|
+
qnt_capitulo: number;
|
|
13
|
+
generos: string;
|
|
14
|
+
titulo_brasil?: string;
|
|
15
|
+
descricao_brasil?: string;
|
|
16
|
+
}[];
|
|
17
|
+
}>;
|
|
18
|
+
chapter(chapterId: string): Promise<{
|
|
19
|
+
data: {
|
|
20
|
+
chapter: {
|
|
21
|
+
hash: string;
|
|
22
|
+
baseUrl: string;
|
|
23
|
+
data: string[];
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
}>;
|
|
27
|
+
chapters(mangaId: string): Promise<{
|
|
28
|
+
data: {
|
|
29
|
+
capitulo_id: number;
|
|
30
|
+
capitulo_nome: string;
|
|
31
|
+
}[];
|
|
32
|
+
}>;
|
|
33
|
+
recents(): Promise<{
|
|
34
|
+
data: {
|
|
35
|
+
manga_id: number;
|
|
36
|
+
capitulo_id: number;
|
|
37
|
+
capitulo_nome: string;
|
|
38
|
+
}[];
|
|
39
|
+
}>;
|
|
40
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
type Logger = (log: {
|
|
2
|
+
type: "ping" | "error";
|
|
3
|
+
method: string;
|
|
4
|
+
url: string;
|
|
5
|
+
time: string;
|
|
6
|
+
}) => any;
|
|
7
|
+
export declare class Scraper {
|
|
8
|
+
private api;
|
|
9
|
+
private data?;
|
|
10
|
+
constructor(logger?: Logger);
|
|
11
|
+
private dataRequest;
|
|
12
|
+
private getData;
|
|
13
|
+
manga(mangaId: string | number): Promise<{
|
|
14
|
+
title: string | undefined;
|
|
15
|
+
slug: string | undefined;
|
|
16
|
+
geek: string;
|
|
17
|
+
description: string;
|
|
18
|
+
cover: string;
|
|
19
|
+
tags: string[];
|
|
20
|
+
available: boolean;
|
|
21
|
+
alternative_name: string | undefined;
|
|
22
|
+
chapters: {
|
|
23
|
+
id: number;
|
|
24
|
+
geek: string;
|
|
25
|
+
number: number;
|
|
26
|
+
title: string;
|
|
27
|
+
}[];
|
|
28
|
+
}>;
|
|
29
|
+
chapterById(chapterId: string): Promise<{
|
|
30
|
+
pages: string[];
|
|
31
|
+
}>;
|
|
32
|
+
recents(_page?: number): Promise<{
|
|
33
|
+
code: string;
|
|
34
|
+
title: string;
|
|
35
|
+
cover: string;
|
|
36
|
+
chapters: number[];
|
|
37
|
+
}[]>;
|
|
38
|
+
}
|
|
39
|
+
export {};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
export declare class Api {
|
|
2
|
+
private baseURL;
|
|
3
|
+
private logger?;
|
|
4
|
+
constructor(baseURL: string, logger?: ((logger: any) => void) | undefined);
|
|
5
|
+
private get;
|
|
6
|
+
page(pageAPIUrl: string): Promise<string | undefined>;
|
|
7
|
+
chapter(chapterId: string): Promise<{
|
|
8
|
+
pages: {
|
|
9
|
+
url: string;
|
|
10
|
+
}[];
|
|
11
|
+
}>;
|
|
12
|
+
mangas(mangaId: string): Promise<{
|
|
13
|
+
id: number;
|
|
14
|
+
name: string;
|
|
15
|
+
sinopse: string;
|
|
16
|
+
coverImage: string;
|
|
17
|
+
slug: string;
|
|
18
|
+
alternativeTitles?: string[] | undefined;
|
|
19
|
+
isAdult: boolean;
|
|
20
|
+
vip: boolean;
|
|
21
|
+
genres: {
|
|
22
|
+
name: string;
|
|
23
|
+
}[];
|
|
24
|
+
chapters: {
|
|
25
|
+
id: number;
|
|
26
|
+
name: string;
|
|
27
|
+
index: number;
|
|
28
|
+
volume: number;
|
|
29
|
+
createdAt: string;
|
|
30
|
+
updatedAt: string;
|
|
31
|
+
}[];
|
|
32
|
+
}>;
|
|
33
|
+
recents(): Promise<{
|
|
34
|
+
updates: {
|
|
35
|
+
serieId: number;
|
|
36
|
+
chapterNumber: number;
|
|
37
|
+
title: string;
|
|
38
|
+
slug: string;
|
|
39
|
+
cover: string;
|
|
40
|
+
vipOnly: boolean;
|
|
41
|
+
}[];
|
|
42
|
+
}>;
|
|
43
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
type Logger = (log: {
|
|
2
|
+
type: "ping" | "error";
|
|
3
|
+
method: string;
|
|
4
|
+
url: string;
|
|
5
|
+
time: string;
|
|
6
|
+
}) => any;
|
|
7
|
+
export declare class Scraper {
|
|
8
|
+
private api;
|
|
9
|
+
constructor(logger?: Logger);
|
|
10
|
+
manga(mangaId: string): Promise<{
|
|
11
|
+
title: string;
|
|
12
|
+
slug: string | undefined;
|
|
13
|
+
geek: string;
|
|
14
|
+
description: string;
|
|
15
|
+
cover: string;
|
|
16
|
+
tags: string[];
|
|
17
|
+
available: boolean;
|
|
18
|
+
alternative_name: string | undefined;
|
|
19
|
+
chapters: {
|
|
20
|
+
id: string;
|
|
21
|
+
geek: string;
|
|
22
|
+
number: number;
|
|
23
|
+
title: string;
|
|
24
|
+
}[];
|
|
25
|
+
}>;
|
|
26
|
+
chapterById(chapterId: string): Promise<{
|
|
27
|
+
pages: string[];
|
|
28
|
+
}>;
|
|
29
|
+
recents(_page?: number): Promise<{
|
|
30
|
+
code: string;
|
|
31
|
+
title: string;
|
|
32
|
+
cover: string;
|
|
33
|
+
chapters: number[];
|
|
34
|
+
}[]>;
|
|
35
|
+
}
|
|
36
|
+
export {};
|
package/lib/utils/tinyfetch.d.ts
CHANGED
package/lib/utils/tools.d.ts
CHANGED
|
@@ -16,6 +16,7 @@ export declare function getSlug(href?: string): string | undefined;
|
|
|
16
16
|
export declare function toSlug(title?: string, language?: MainLanguages): string | undefined;
|
|
17
17
|
export declare function GeekGen(title: string): string;
|
|
18
18
|
export declare function isExtra(title: string): boolean;
|
|
19
|
+
export declare function delay(s: number, human?: boolean): Promise<unknown>;
|
|
19
20
|
export declare function toStringNumber(value: string): string | null;
|
|
20
21
|
export declare function toNumber(value: string): number | null;
|
|
21
22
|
export declare function generateHash(size?: number): string;
|