mgbuild 1.8.8 → 1.9.0
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.js +1 -1
- package/lib/mgs/br/index.d.ts +2 -2
- package/lib/mgs/ma/index.d.ts +2 -2
- 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/mo/index.d.ts +2 -2
- package/lib/mgs/rm/headers.d.ts +47 -8
- package/lib/mgs/rm/index.d.ts +11 -7
- package/lib/mgs/sr/api/book.d.ts +14 -14
- package/lib/mgs/sr/api/chapter.d.ts +3 -3
- package/lib/mgs/sr/api/chapters.d.ts +1 -1
- package/lib/mgs/sr/api/recents.d.ts +8 -8
- package/lib/mgs/sr/index.d.ts +2 -2
- package/lib/utils/tools.d.ts +3 -0
- package/lib/utils/type.d.ts +3 -3
- package/package.json +2 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type RecentBook = {
|
|
2
2
|
book_name_original: string;
|
|
3
3
|
book_name: string;
|
|
4
4
|
book_nsfw: number;
|
|
@@ -16,33 +16,33 @@ export declare type RecentBook = {
|
|
|
16
16
|
book_name_alternatives: string;
|
|
17
17
|
nsfw: boolean;
|
|
18
18
|
};
|
|
19
|
-
export
|
|
19
|
+
export type BookTag = {
|
|
20
20
|
tag: Tag;
|
|
21
21
|
};
|
|
22
|
-
export
|
|
22
|
+
export type Tag = {
|
|
23
23
|
tag_nsfw: boolean;
|
|
24
24
|
tag_name: string;
|
|
25
25
|
tag_name_ptBR: string;
|
|
26
26
|
};
|
|
27
|
-
export
|
|
27
|
+
export type BookCategory = {
|
|
28
28
|
categories: Categories;
|
|
29
29
|
};
|
|
30
|
-
export
|
|
30
|
+
export type Categories = {
|
|
31
31
|
cat_name: string;
|
|
32
32
|
cat_nsfw: boolean;
|
|
33
33
|
cat_name_ptBR: string;
|
|
34
34
|
};
|
|
35
|
-
export
|
|
35
|
+
export type BookTemp = {
|
|
36
36
|
book_temp_caps: BookTempCap[];
|
|
37
37
|
};
|
|
38
|
-
export
|
|
38
|
+
export type BookTempCap = {
|
|
39
39
|
btc_cap: number;
|
|
40
40
|
btc_date_created: string;
|
|
41
41
|
btc_date_updated: string;
|
|
42
42
|
btc_name: string;
|
|
43
43
|
scan: Scan;
|
|
44
44
|
};
|
|
45
|
-
export
|
|
45
|
+
export type Scan = {
|
|
46
46
|
scan_auto_update: boolean;
|
|
47
47
|
scan_id: number;
|
|
48
48
|
scan_name: string;
|
package/lib/mgs/sr/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);
|
package/lib/utils/tools.d.ts
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
/// <reference types="node" />
|
|
1
3
|
/// <reference types="cheerio" />
|
|
2
4
|
import { RequestInit } from "node-fetch";
|
|
3
5
|
import { MainLanguages } from "./type";
|
|
4
6
|
export declare function zlibDecode<T>(data: string): T;
|
|
5
7
|
export declare function getText(url: string, options?: RequestInit): Promise<string>;
|
|
8
|
+
export declare function getImgBuffer(url: string, options?: RequestInit): Promise<Buffer>;
|
|
6
9
|
export declare function urlFromSrcSet(srcset?: string): string;
|
|
7
10
|
export declare function getJSON<T>(url: string, options?: RequestInit): Promise<T>;
|
|
8
11
|
export declare function HTML(url: string, options?: RequestInit): Promise<cheerio.Root>;
|
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
|
};
|