mgbuild 1.7.5 → 1.7.7
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 +4 -4
- package/lib/index.d.ts +2 -0
- package/lib/index.js +56314 -1
- package/lib/mgs/br/index.d.ts +3 -3
- package/lib/mgs/md/core/scraper.d.ts +3 -3
- package/lib/mgs/md/core/utils.d.ts +2 -2
- package/lib/mgs/md/index.d.ts +1 -1
- package/lib/mgs/md/types/bulk-info.d.ts +12 -12
- package/lib/mgs/md/types/chapters.d.ts +5 -5
- package/lib/mgs/md/types/info.d.ts +12 -12
- package/lib/mgs/md/types/pages.d.ts +2 -2
- package/lib/mgs/md/types/recents.d.ts +12 -12
- package/lib/mgs/md/types/transform.d.ts +5 -5
- package/lib/mgs/rm/chapter.d.ts +4 -0
- package/lib/mgs/rm/config.d.ts +8 -0
- package/lib/mgs/rm/headers.d.ts +60 -0
- package/lib/mgs/rm/index.d.ts +20 -0
- package/lib/mgs/rm/manga.d.ts +3 -0
- package/lib/mgs/rm/recent.d.ts +3 -0
- package/lib/utils/tools.d.ts +1 -0
- package/lib/utils/type.d.ts +3 -3
- package/package.json +1 -1
package/lib/mgs/br/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
type Log = {
|
|
2
2
|
type: "ping" | "error";
|
|
3
3
|
method: string;
|
|
4
4
|
url: string;
|
|
5
5
|
time: string;
|
|
6
6
|
};
|
|
7
|
-
|
|
7
|
+
type Logger = (log: Log) => any;
|
|
8
8
|
export declare class Scraper {
|
|
9
9
|
private logger?;
|
|
10
10
|
constructor(logger?: Logger);
|
|
@@ -14,7 +14,7 @@ export declare class Scraper {
|
|
|
14
14
|
}>;
|
|
15
15
|
chapter(manga_code: string, chapter_number: number): Promise<{
|
|
16
16
|
pages: string[];
|
|
17
|
-
}
|
|
17
|
+
}>;
|
|
18
18
|
recents(page?: number): Promise<import("../..").RecentScrapeList[]>;
|
|
19
19
|
}
|
|
20
20
|
export {};
|
|
@@ -4,17 +4,17 @@ import type { GetMangaChaptersResponse } from "../types/chapters";
|
|
|
4
4
|
import type { GetRecentChaptersResponse } from "../types/recents";
|
|
5
5
|
import type { GetChapterPagesResponse } from "../types/pages";
|
|
6
6
|
import { Languages, MainLanguages } from "../../../utils/type";
|
|
7
|
-
export
|
|
7
|
+
export type Log = {
|
|
8
8
|
type: "ping" | "error";
|
|
9
9
|
method: string;
|
|
10
10
|
url: string;
|
|
11
11
|
time: string;
|
|
12
12
|
};
|
|
13
|
-
export
|
|
13
|
+
export type ChapterConfig = {
|
|
14
14
|
page?: number;
|
|
15
15
|
order?: "asc" | "desc";
|
|
16
16
|
};
|
|
17
|
-
export
|
|
17
|
+
export type Logger = (log: Log) => any;
|
|
18
18
|
export declare class BruteScraper {
|
|
19
19
|
private logger?;
|
|
20
20
|
constructor(logger?: Logger);
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { LanguageItem, Languages } from "../../../utils/type";
|
|
2
2
|
export declare const CHAPTERS_PER_PAGE = 96;
|
|
3
3
|
export declare function getPage(targetChapterPage: number): number;
|
|
4
|
-
export
|
|
4
|
+
export type ChapterEndpointConfig = {
|
|
5
5
|
number: number;
|
|
6
6
|
language: Languages;
|
|
7
7
|
};
|
|
8
|
-
export
|
|
8
|
+
export type ChaptersEndpointConfig = {
|
|
9
9
|
order: "asc" | "desc";
|
|
10
10
|
language: Languages;
|
|
11
11
|
page: number;
|
package/lib/mgs/md/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type GetBulkInfoResponse = {
|
|
2
2
|
result: string;
|
|
3
3
|
response: string;
|
|
4
4
|
data: Data[];
|
|
@@ -6,13 +6,13 @@ export declare type GetBulkInfoResponse = {
|
|
|
6
6
|
offset: number;
|
|
7
7
|
total: number;
|
|
8
8
|
};
|
|
9
|
-
|
|
9
|
+
type Data = {
|
|
10
10
|
id: string;
|
|
11
11
|
type: string;
|
|
12
12
|
attributes: Attributes;
|
|
13
13
|
relationships: Relationship[];
|
|
14
14
|
};
|
|
15
|
-
|
|
15
|
+
type Attributes = {
|
|
16
16
|
title: Title;
|
|
17
17
|
altTitles: AltTitle[];
|
|
18
18
|
description: Description;
|
|
@@ -34,10 +34,10 @@ declare type Attributes = {
|
|
|
34
34
|
availableTranslatedLanguages: string[];
|
|
35
35
|
latestUploadedChapter: string;
|
|
36
36
|
};
|
|
37
|
-
|
|
37
|
+
type Title = {
|
|
38
38
|
en: string;
|
|
39
39
|
};
|
|
40
|
-
|
|
40
|
+
type AltTitle = {
|
|
41
41
|
en?: string;
|
|
42
42
|
"ko-ro"?: string;
|
|
43
43
|
ru?: string;
|
|
@@ -57,7 +57,7 @@ declare type AltTitle = {
|
|
|
57
57
|
sl?: string;
|
|
58
58
|
"ja-ro"?: string;
|
|
59
59
|
};
|
|
60
|
-
|
|
60
|
+
type Description = {
|
|
61
61
|
en: string;
|
|
62
62
|
pt?: string;
|
|
63
63
|
"es-la"?: string;
|
|
@@ -65,7 +65,7 @@ declare type Description = {
|
|
|
65
65
|
fr?: string;
|
|
66
66
|
ru?: string;
|
|
67
67
|
};
|
|
68
|
-
|
|
68
|
+
type Links = {
|
|
69
69
|
al: string;
|
|
70
70
|
ap: string;
|
|
71
71
|
bw?: string;
|
|
@@ -79,28 +79,28 @@ declare type Links = {
|
|
|
79
79
|
raw?: string;
|
|
80
80
|
engtl?: string;
|
|
81
81
|
};
|
|
82
|
-
|
|
82
|
+
type Tag = {
|
|
83
83
|
id: string;
|
|
84
84
|
type: string;
|
|
85
85
|
attributes: Attributes2;
|
|
86
86
|
relationships: any[];
|
|
87
87
|
};
|
|
88
|
-
|
|
88
|
+
type Attributes2 = {
|
|
89
89
|
name: Name;
|
|
90
90
|
description: object;
|
|
91
91
|
group: string;
|
|
92
92
|
version: number;
|
|
93
93
|
};
|
|
94
|
-
|
|
94
|
+
type Name = {
|
|
95
95
|
en: string;
|
|
96
96
|
};
|
|
97
|
-
|
|
97
|
+
type Relationship = {
|
|
98
98
|
id: string;
|
|
99
99
|
type: string;
|
|
100
100
|
attributes?: Attributes3;
|
|
101
101
|
related?: string;
|
|
102
102
|
};
|
|
103
|
-
|
|
103
|
+
type Attributes3 = {
|
|
104
104
|
description: string;
|
|
105
105
|
volume: string;
|
|
106
106
|
fileName: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type GetMangaChaptersResponse = {
|
|
2
2
|
result: string;
|
|
3
3
|
response: string;
|
|
4
4
|
data: Data[];
|
|
@@ -8,13 +8,13 @@ export declare type GetMangaChaptersResponse = {
|
|
|
8
8
|
last_page: number;
|
|
9
9
|
invalid_page: boolean;
|
|
10
10
|
};
|
|
11
|
-
|
|
11
|
+
type Data = {
|
|
12
12
|
id: string;
|
|
13
13
|
type: string;
|
|
14
14
|
attributes: Attributes;
|
|
15
15
|
relationships: Relationship[];
|
|
16
16
|
};
|
|
17
|
-
|
|
17
|
+
type Attributes = {
|
|
18
18
|
volume?: string;
|
|
19
19
|
chapter: string;
|
|
20
20
|
title?: string;
|
|
@@ -27,12 +27,12 @@ declare type Attributes = {
|
|
|
27
27
|
pages: number;
|
|
28
28
|
version: number;
|
|
29
29
|
};
|
|
30
|
-
|
|
30
|
+
type Relationship = {
|
|
31
31
|
id: string;
|
|
32
32
|
type: string;
|
|
33
33
|
attributes?: Attributes2;
|
|
34
34
|
};
|
|
35
|
-
|
|
35
|
+
type Attributes2 = {
|
|
36
36
|
username?: string;
|
|
37
37
|
roles?: string[];
|
|
38
38
|
version: number;
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { LanguageItem } from "../../../utils/type";
|
|
2
|
-
export
|
|
2
|
+
export type GetMangaInfoResponse = {
|
|
3
3
|
result: string;
|
|
4
4
|
response: string;
|
|
5
5
|
data: Data;
|
|
6
6
|
};
|
|
7
|
-
export
|
|
7
|
+
export type ListMangaResponse = {
|
|
8
8
|
result: string;
|
|
9
9
|
response: string;
|
|
10
10
|
data: Data[];
|
|
11
11
|
};
|
|
12
|
-
|
|
12
|
+
type Data = {
|
|
13
13
|
id: string;
|
|
14
14
|
type: string;
|
|
15
15
|
attributes: Attributes;
|
|
16
16
|
relationships: Relationship[];
|
|
17
17
|
};
|
|
18
|
-
|
|
18
|
+
type Attributes = {
|
|
19
19
|
title: Title;
|
|
20
20
|
altTitles: AltTitle[];
|
|
21
21
|
description: Description;
|
|
@@ -37,10 +37,10 @@ declare type Attributes = {
|
|
|
37
37
|
availableTranslatedLanguages: string[];
|
|
38
38
|
latestUploadedChapter: string;
|
|
39
39
|
};
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
40
|
+
type Title = LanguageItem;
|
|
41
|
+
type AltTitle = LanguageItem;
|
|
42
|
+
type Description = LanguageItem;
|
|
43
|
+
type Links = {
|
|
44
44
|
al: string;
|
|
45
45
|
ap: string;
|
|
46
46
|
bw: string;
|
|
@@ -52,22 +52,22 @@ declare type Links = {
|
|
|
52
52
|
raw: string;
|
|
53
53
|
engtl: string;
|
|
54
54
|
};
|
|
55
|
-
|
|
55
|
+
type Tag = {
|
|
56
56
|
id: string;
|
|
57
57
|
type: string;
|
|
58
58
|
attributes: Attributes2;
|
|
59
59
|
relationships: any[];
|
|
60
60
|
};
|
|
61
|
-
|
|
61
|
+
type Attributes2 = {
|
|
62
62
|
name: Name;
|
|
63
63
|
description: object;
|
|
64
64
|
group: string;
|
|
65
65
|
version: number;
|
|
66
66
|
};
|
|
67
|
-
|
|
67
|
+
type Name = {
|
|
68
68
|
en: string;
|
|
69
69
|
};
|
|
70
|
-
|
|
70
|
+
type Relationship = {
|
|
71
71
|
id: string;
|
|
72
72
|
type: string;
|
|
73
73
|
related?: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type GetRecentChaptersResponse = {
|
|
2
2
|
result: string;
|
|
3
3
|
response: string;
|
|
4
4
|
data: Daum[];
|
|
@@ -6,13 +6,13 @@ export declare type GetRecentChaptersResponse = {
|
|
|
6
6
|
offset: number;
|
|
7
7
|
total: number;
|
|
8
8
|
};
|
|
9
|
-
|
|
9
|
+
type Daum = {
|
|
10
10
|
id: string;
|
|
11
11
|
type: string;
|
|
12
12
|
attributes: Attributes;
|
|
13
13
|
relationships: Relationship[];
|
|
14
14
|
};
|
|
15
|
-
|
|
15
|
+
type Attributes = {
|
|
16
16
|
volume?: string;
|
|
17
17
|
chapter: string;
|
|
18
18
|
title?: string;
|
|
@@ -25,12 +25,12 @@ declare type Attributes = {
|
|
|
25
25
|
pages: number;
|
|
26
26
|
version: number;
|
|
27
27
|
};
|
|
28
|
-
|
|
28
|
+
type Relationship = {
|
|
29
29
|
id: string;
|
|
30
30
|
type: string;
|
|
31
31
|
attributes: Attributes2;
|
|
32
32
|
};
|
|
33
|
-
|
|
33
|
+
type Attributes2 = {
|
|
34
34
|
name?: string;
|
|
35
35
|
altNames?: AltName[];
|
|
36
36
|
locked?: boolean;
|
|
@@ -70,13 +70,13 @@ declare type Attributes2 = {
|
|
|
70
70
|
username?: string;
|
|
71
71
|
roles?: string[];
|
|
72
72
|
};
|
|
73
|
-
|
|
73
|
+
type AltName = {
|
|
74
74
|
en: string;
|
|
75
75
|
};
|
|
76
|
-
|
|
76
|
+
type Title = {
|
|
77
77
|
en: string;
|
|
78
78
|
};
|
|
79
|
-
|
|
79
|
+
type AltTitle = {
|
|
80
80
|
ja?: string;
|
|
81
81
|
en?: string;
|
|
82
82
|
fr?: string;
|
|
@@ -102,7 +102,7 @@ declare type AltTitle = {
|
|
|
102
102
|
tl?: string;
|
|
103
103
|
pl?: string;
|
|
104
104
|
};
|
|
105
|
-
|
|
105
|
+
type Links = {
|
|
106
106
|
al?: string;
|
|
107
107
|
ap?: string;
|
|
108
108
|
bw?: string;
|
|
@@ -116,19 +116,19 @@ declare type Links = {
|
|
|
116
116
|
raw?: string;
|
|
117
117
|
engtl?: string;
|
|
118
118
|
};
|
|
119
|
-
|
|
119
|
+
type Tag = {
|
|
120
120
|
id: string;
|
|
121
121
|
type: string;
|
|
122
122
|
attributes: Attributes3;
|
|
123
123
|
relationships: any[];
|
|
124
124
|
};
|
|
125
|
-
|
|
125
|
+
type Attributes3 = {
|
|
126
126
|
name: Name;
|
|
127
127
|
description: object;
|
|
128
128
|
group: string;
|
|
129
129
|
version: number;
|
|
130
130
|
};
|
|
131
|
-
|
|
131
|
+
type Name = {
|
|
132
132
|
en: string;
|
|
133
133
|
};
|
|
134
134
|
export {};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { MainLanguages } from "../../../utils/type";
|
|
2
|
-
export
|
|
2
|
+
export type Chapter = {
|
|
3
3
|
id: string;
|
|
4
4
|
number: number;
|
|
5
5
|
title: string;
|
|
6
6
|
geek: string;
|
|
7
7
|
};
|
|
8
|
-
export
|
|
8
|
+
export type Manga = {
|
|
9
9
|
id: number;
|
|
10
10
|
title: string;
|
|
11
11
|
slug: string;
|
|
@@ -18,18 +18,18 @@ export declare type Manga = {
|
|
|
18
18
|
chapters: Chapter[];
|
|
19
19
|
chapter_code?: string;
|
|
20
20
|
};
|
|
21
|
-
export
|
|
21
|
+
export type Recent = {
|
|
22
22
|
code: string;
|
|
23
23
|
chapters: number[];
|
|
24
24
|
title: string;
|
|
25
25
|
cover?: string;
|
|
26
26
|
};
|
|
27
|
-
export
|
|
27
|
+
export type MangaCoverInfo = {
|
|
28
28
|
id: string;
|
|
29
29
|
cover: string;
|
|
30
30
|
coverPath: string;
|
|
31
31
|
};
|
|
32
|
-
export
|
|
32
|
+
export type MangaInfo = {
|
|
33
33
|
id: string;
|
|
34
34
|
title: string;
|
|
35
35
|
slug: string;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
manga: {
|
|
3
|
+
referer: string;
|
|
4
|
+
"Referrer-Policy": string;
|
|
5
|
+
accept: string;
|
|
6
|
+
"accept-language": string;
|
|
7
|
+
"cache-control": string;
|
|
8
|
+
priority: string;
|
|
9
|
+
pragma: string;
|
|
10
|
+
"sec-ch-ua": string;
|
|
11
|
+
"sec-ch-ua-mobile": string;
|
|
12
|
+
"sec-ch-ua-platform": string;
|
|
13
|
+
"sec-fetch-dest": string;
|
|
14
|
+
"sec-fetch-mode": string;
|
|
15
|
+
"sec-fetch-site": string;
|
|
16
|
+
"sec-fetch-user": string;
|
|
17
|
+
"sec-gpc": string;
|
|
18
|
+
"upgrade-insecure-requests": string;
|
|
19
|
+
"user-agent": string;
|
|
20
|
+
};
|
|
21
|
+
chapter: {
|
|
22
|
+
referer: string;
|
|
23
|
+
"Referrer-Policy": string;
|
|
24
|
+
accept: string;
|
|
25
|
+
"accept-language": string;
|
|
26
|
+
"cache-control": string;
|
|
27
|
+
priority: string;
|
|
28
|
+
pragma: string;
|
|
29
|
+
"sec-ch-ua": string;
|
|
30
|
+
"sec-ch-ua-mobile": string;
|
|
31
|
+
"sec-ch-ua-platform": string;
|
|
32
|
+
"sec-fetch-dest": string;
|
|
33
|
+
"sec-fetch-mode": string;
|
|
34
|
+
"sec-fetch-site": string;
|
|
35
|
+
"sec-fetch-user": string;
|
|
36
|
+
"sec-gpc": string;
|
|
37
|
+
"upgrade-insecure-requests": string;
|
|
38
|
+
"user-agent": string;
|
|
39
|
+
};
|
|
40
|
+
recent: {
|
|
41
|
+
referer: string;
|
|
42
|
+
"Referrer-Policy": string;
|
|
43
|
+
accept: string;
|
|
44
|
+
"accept-language": string;
|
|
45
|
+
"cache-control": string;
|
|
46
|
+
priority: string;
|
|
47
|
+
pragma: string;
|
|
48
|
+
"sec-ch-ua": string;
|
|
49
|
+
"sec-ch-ua-mobile": string;
|
|
50
|
+
"sec-ch-ua-platform": string;
|
|
51
|
+
"sec-fetch-dest": string;
|
|
52
|
+
"sec-fetch-mode": string;
|
|
53
|
+
"sec-fetch-site": string;
|
|
54
|
+
"sec-fetch-user": string;
|
|
55
|
+
"sec-gpc": string;
|
|
56
|
+
"upgrade-insecure-requests": string;
|
|
57
|
+
"user-agent": string;
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
export default _default;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
type Log = {
|
|
2
|
+
type: "ping" | "error";
|
|
3
|
+
method: string;
|
|
4
|
+
url: string;
|
|
5
|
+
time: string;
|
|
6
|
+
};
|
|
7
|
+
type Logger = (log: Log) => any;
|
|
8
|
+
export declare class Scraper {
|
|
9
|
+
private logger?;
|
|
10
|
+
constructor(logger?: Logger);
|
|
11
|
+
manga(manga_code: string): Promise<import("../..").ScrapedManga>;
|
|
12
|
+
chapterById(chapter_id: string | number): Promise<{
|
|
13
|
+
pages: string[];
|
|
14
|
+
}>;
|
|
15
|
+
chapter(manga_code: string, chapter_number: number): Promise<{
|
|
16
|
+
pages: string[];
|
|
17
|
+
}>;
|
|
18
|
+
recents(page?: number): Promise<import("../..").RecentScrapeList[]>;
|
|
19
|
+
}
|
|
20
|
+
export {};
|
package/lib/utils/tools.d.ts
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { RequestInit } from "node-fetch";
|
|
3
3
|
import { MainLanguages } from "./type";
|
|
4
4
|
export declare function getText(url: string, options?: RequestInit): Promise<string>;
|
|
5
|
+
export declare function urlFromSrcSet(srcset?: string): string;
|
|
5
6
|
export declare function getJSON(url: string, options?: RequestInit): Promise<any>;
|
|
6
7
|
export declare function HTML(url: string, options?: RequestInit): Promise<cheerio.Root>;
|
|
7
8
|
export declare function checkThumb(thumbnail?: string): string | undefined;
|
package/lib/utils/type.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
1
|
+
export type MainLanguages = "en" | "pt" | "es";
|
|
2
|
+
export type Languages = "en" | "pt" | "pt-br" | "es" | "es-la" | "ja-ro";
|
|
3
|
+
export type LanguageItem = {
|
|
4
4
|
[key in Languages]?: string;
|
|
5
5
|
};
|