mgbuild 2.1.5 → 2.1.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/index.d.ts +2 -0
- package/lib/index.js +3 -3
- package/lib/mgs/sm/api.d.ts +29 -0
- package/lib/mgs/sm/config.d.ts +6 -0
- package/lib/mgs/sm/headers.d.ts +36 -0
- package/lib/mgs/sm/index.d.ts +39 -0
- package/lib/mgs/ym/index.d.ts +1 -14
- package/lib/mgs/ym/manga.d.ts +3 -5
- package/lib/mgs/ym/recent.d.ts +1 -0
- package/lib/utils/curl.d.ts +6 -0
- package/lib/utils/tinyfetch.d.ts +5 -1
- package/package.json +1 -1
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export declare class SakuraMangaAPI {
|
|
2
|
+
static recents(): Promise<{
|
|
3
|
+
code: string;
|
|
4
|
+
img: string;
|
|
5
|
+
title: string;
|
|
6
|
+
chapters: number[];
|
|
7
|
+
}[]>;
|
|
8
|
+
static mangaParams(url: string): Promise<string | undefined>;
|
|
9
|
+
static manga(url: string): Promise<{
|
|
10
|
+
cover: string;
|
|
11
|
+
title: string;
|
|
12
|
+
geek: string;
|
|
13
|
+
slug: string;
|
|
14
|
+
description: string;
|
|
15
|
+
tags: string[];
|
|
16
|
+
available: boolean;
|
|
17
|
+
chapters: {
|
|
18
|
+
title: string;
|
|
19
|
+
number: number;
|
|
20
|
+
id: string;
|
|
21
|
+
geek: string;
|
|
22
|
+
}[];
|
|
23
|
+
}>;
|
|
24
|
+
static chapterParams(url: string): Promise<{
|
|
25
|
+
chapter_id: string | undefined;
|
|
26
|
+
token: string | undefined;
|
|
27
|
+
}>;
|
|
28
|
+
static pages(url: string): Promise<string[]>;
|
|
29
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
default: {
|
|
3
|
+
accept: string;
|
|
4
|
+
"accept-language": string;
|
|
5
|
+
"cache-control": string;
|
|
6
|
+
priority: string;
|
|
7
|
+
pragma: string;
|
|
8
|
+
"sec-ch-ua": string;
|
|
9
|
+
"sec-ch-ua-mobile": string;
|
|
10
|
+
"sec-ch-ua-platform": string;
|
|
11
|
+
"sec-fetch-dest": string;
|
|
12
|
+
"sec-fetch-mode": string;
|
|
13
|
+
"sec-fetch-site": string;
|
|
14
|
+
"sec-fetch-user": string;
|
|
15
|
+
"sec-gpc": string;
|
|
16
|
+
"upgrade-insecure-requests": string;
|
|
17
|
+
"user-agent": string;
|
|
18
|
+
};
|
|
19
|
+
XMLHttpRequest: {
|
|
20
|
+
accept: string;
|
|
21
|
+
"accept-language": string;
|
|
22
|
+
priority: string;
|
|
23
|
+
"sec-ch-ua": string;
|
|
24
|
+
"sec-ch-ua-mobile": string;
|
|
25
|
+
"sec-ch-ua-platform": string;
|
|
26
|
+
"sec-fetch-dest": string;
|
|
27
|
+
"sec-fetch-mode": string;
|
|
28
|
+
"sec-fetch-site": string;
|
|
29
|
+
"sec-fetch-user": string;
|
|
30
|
+
"sec-gpc": string;
|
|
31
|
+
"upgrade-insecure-requests": string;
|
|
32
|
+
"user-agent": string;
|
|
33
|
+
"x-requested-with": string;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
export default _default;
|
|
@@ -0,0 +1,39 @@
|
|
|
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<{
|
|
12
|
+
cover: string;
|
|
13
|
+
title: string;
|
|
14
|
+
geek: string;
|
|
15
|
+
slug: string;
|
|
16
|
+
description: string;
|
|
17
|
+
tags: string[];
|
|
18
|
+
available: boolean;
|
|
19
|
+
chapters: {
|
|
20
|
+
title: string;
|
|
21
|
+
number: number;
|
|
22
|
+
id: string;
|
|
23
|
+
geek: string;
|
|
24
|
+
}[];
|
|
25
|
+
}>;
|
|
26
|
+
chapterById(chapter_id: string | number): Promise<{
|
|
27
|
+
pages: string[];
|
|
28
|
+
}>;
|
|
29
|
+
chapter(manga_code: string, chapter_number: number): Promise<{
|
|
30
|
+
pages: string[];
|
|
31
|
+
}>;
|
|
32
|
+
recents(): Promise<{
|
|
33
|
+
code: string;
|
|
34
|
+
img: string;
|
|
35
|
+
title: string;
|
|
36
|
+
chapters: number[];
|
|
37
|
+
}[]>;
|
|
38
|
+
}
|
|
39
|
+
export {};
|
package/lib/mgs/ym/index.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { ScrapedHostChapter } from "../../@types";
|
|
2
1
|
type Log = {
|
|
3
2
|
type: "ping" | "error";
|
|
4
3
|
method: string;
|
|
@@ -9,19 +8,7 @@ type Logger = (log: Log) => any;
|
|
|
9
8
|
export declare class Scraper {
|
|
10
9
|
private logger?;
|
|
11
10
|
constructor(logger?: Logger);
|
|
12
|
-
manga(manga_code: string): Promise<
|
|
13
|
-
id: number;
|
|
14
|
-
title: string;
|
|
15
|
-
slug: string;
|
|
16
|
-
geek: string;
|
|
17
|
-
description: string;
|
|
18
|
-
cover: string;
|
|
19
|
-
tags: string[];
|
|
20
|
-
available: boolean;
|
|
21
|
-
alternative_name?: string | undefined;
|
|
22
|
-
chapters: ScrapedHostChapter[];
|
|
23
|
-
chapter_code?: string | undefined;
|
|
24
|
-
}>;
|
|
11
|
+
manga(manga_code: string): Promise<import("../../@types").ScrapedManga>;
|
|
25
12
|
private chapterList;
|
|
26
13
|
chapterById(chapter_id: string | number): Promise<{
|
|
27
14
|
pages: string[];
|
package/lib/mgs/ym/manga.d.ts
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
/// <reference types="cheerio" />
|
|
2
|
-
import {
|
|
3
|
-
export declare function getChapters($: cheerio.Root, slug: string):
|
|
4
|
-
export declare function getManga($: cheerio.Root, slug: string): ScrapedManga
|
|
5
|
-
foreignId: string;
|
|
6
|
-
};
|
|
2
|
+
import { ScrapedManga } from "../../@types";
|
|
3
|
+
export declare function getChapters($: cheerio.Root, slug: string): any;
|
|
4
|
+
export declare function getManga($: cheerio.Root, slug: string): ScrapedManga;
|
package/lib/mgs/ym/recent.d.ts
CHANGED
package/lib/utils/tinyfetch.d.ts
CHANGED
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import { RequestOptions } from "https";
|
|
3
|
+
type Options = RequestOptions & {
|
|
4
|
+
data?: string | object;
|
|
5
|
+
};
|
|
3
6
|
export declare class TinyFetch {
|
|
4
7
|
private headers;
|
|
5
8
|
constructor(headers?: Record<string, string>);
|
|
6
9
|
private request;
|
|
7
|
-
static fetch<T = any>(url: string, options?:
|
|
10
|
+
static fetch<T = any>(url: string, options?: Options): Promise<{
|
|
8
11
|
json: () => T;
|
|
9
12
|
text: () => string;
|
|
10
13
|
buffer: () => Buffer;
|
|
11
14
|
}>;
|
|
12
15
|
}
|
|
16
|
+
export {};
|