mgbuild 1.9.8 → 1.9.9

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.
Files changed (88) hide show
  1. package/lib/@types/index.d.ts +30 -30
  2. package/lib/data/tagMatcher.d.ts +7 -7
  3. package/lib/data/tagMatcherx.d.ts +7 -7
  4. package/lib/hqs/getHqAndChapters.d.ts +1 -1
  5. package/lib/hqs/getHqChapterById.d.ts +8 -8
  6. package/lib/hqs/getHqDetails.d.ts +1 -1
  7. package/lib/hqs/index.d.ts +5 -5
  8. package/lib/hqs/listHqIds.d.ts +5 -5
  9. package/lib/hqs/listUpdatedHqs.d.ts +6 -6
  10. package/lib/hqs/utils.d.ts +46 -46
  11. package/lib/index.d.ts +24 -22
  12. package/lib/index.js +3 -3
  13. package/lib/mgs/br/chapter.d.ts +4 -4
  14. package/lib/mgs/br/config.d.ts +6 -6
  15. package/lib/mgs/br/headers.d.ts +54 -54
  16. package/lib/mgs/br/index.d.ts +20 -20
  17. package/lib/mgs/br/manga.d.ts +3 -3
  18. package/lib/mgs/br/recent.d.ts +3 -3
  19. package/lib/mgs/fm/chapter.d.ts +4 -0
  20. package/lib/mgs/fm/config.d.ts +6 -0
  21. package/lib/mgs/fm/headers.d.ts +72 -0
  22. package/lib/mgs/fm/index.d.ts +17 -0
  23. package/lib/mgs/fm/manga.d.ts +3 -0
  24. package/lib/mgs/fm/recent.d.ts +3 -0
  25. package/lib/mgs/ma/chapter.d.ts +4 -4
  26. package/lib/mgs/ma/config.d.ts +6 -6
  27. package/lib/mgs/ma/headers.d.ts +48 -48
  28. package/lib/mgs/ma/index.d.ts +20 -20
  29. package/lib/mgs/ma/manga.d.ts +3 -3
  30. package/lib/mgs/ma/recent.d.ts +3 -3
  31. package/lib/mgs/md/core/predict.d.ts +3 -3
  32. package/lib/mgs/md/core/scraper.d.ts +36 -36
  33. package/lib/mgs/md/core/transform.d.ts +19 -19
  34. package/lib/mgs/md/core/utils.d.ts +39 -39
  35. package/lib/mgs/md/index.d.ts +27 -27
  36. package/lib/mgs/md/types/bulk-info.d.ts +112 -112
  37. package/lib/mgs/md/types/chapters.d.ts +59 -59
  38. package/lib/mgs/md/types/info.d.ts +82 -82
  39. package/lib/mgs/md/types/pages.d.ts +11 -11
  40. package/lib/mgs/md/types/recents.d.ts +134 -134
  41. package/lib/mgs/md/types/transform.d.ts +44 -44
  42. package/lib/mgs/ml/chapter.d.ts +3 -3
  43. package/lib/mgs/ml/config.d.ts +6 -6
  44. package/lib/mgs/ml/headers.d.ts +75 -75
  45. package/lib/mgs/ml/index.d.ts +18 -18
  46. package/lib/mgs/ml/manga.d.ts +3 -3
  47. package/lib/mgs/ml/recent.d.ts +3 -3
  48. package/lib/mgs/mo/chapter.d.ts +4 -4
  49. package/lib/mgs/mo/config.d.ts +6 -6
  50. package/lib/mgs/mo/headers.d.ts +73 -73
  51. package/lib/mgs/mo/index.d.ts +21 -21
  52. package/lib/mgs/mo/manga.d.ts +4 -4
  53. package/lib/mgs/mo/recent.d.ts +3 -3
  54. package/lib/mgs/rm/chapter.d.ts +4 -4
  55. package/lib/mgs/rm/config.d.ts +6 -6
  56. package/lib/mgs/rm/headers.d.ts +99 -99
  57. package/lib/mgs/rm/index.d.ts +24 -24
  58. package/lib/mgs/rm/manga.d.ts +3 -3
  59. package/lib/mgs/rm/recent.d.ts +3 -3
  60. package/lib/mgs/sc/chapter.d.ts +4 -4
  61. package/lib/mgs/sc/config.d.ts +6 -6
  62. package/lib/mgs/sc/headers.d.ts +70 -70
  63. package/lib/mgs/sc/index.d.ts +20 -20
  64. package/lib/mgs/sc/manga.d.ts +4 -4
  65. package/lib/mgs/sc/recent.d.ts +3 -3
  66. package/lib/mgs/sr/api/book.d.ts +101 -101
  67. package/lib/mgs/sr/api/chapter.d.ts +20 -20
  68. package/lib/mgs/sr/api/chapters.d.ts +12 -12
  69. package/lib/mgs/sr/api/index.d.ts +10 -10
  70. package/lib/mgs/sr/api/recents.d.ts +49 -49
  71. package/lib/mgs/sr/config.d.ts +6 -6
  72. package/lib/mgs/sr/headers.d.ts +65 -65
  73. package/lib/mgs/sr/index.d.ts +20 -20
  74. package/lib/mgs/sr/manga.d.ts +11 -11
  75. package/lib/mgs/sr/recent.d.ts +3 -3
  76. package/lib/mgs/st/chapter.d.ts +4 -4
  77. package/lib/mgs/st/config.d.ts +6 -6
  78. package/lib/mgs/st/headers.d.ts +70 -70
  79. package/lib/mgs/st/index.d.ts +21 -21
  80. package/lib/mgs/st/manga.d.ts +4 -4
  81. package/lib/mgs/st/recent.d.ts +58 -58
  82. package/lib/utils/graphQLRequest.d.ts +7 -7
  83. package/lib/utils/request.d.ts +1 -1
  84. package/lib/utils/tag.d.ts +3 -3
  85. package/lib/utils/tinyfetch.d.ts +12 -12
  86. package/lib/utils/tools.d.ts +29 -29
  87. package/lib/utils/type.d.ts +5 -5
  88. package/package.json +10 -10
@@ -1,4 +1,4 @@
1
- /// <reference types="cheerio" />
2
- export declare function getChapter($: cheerio.Root): Promise<{
3
- pages: string[];
4
- }>;
1
+ /// <reference types="cheerio" />
2
+ export declare function getChapter($: cheerio.Root): Promise<{
3
+ pages: string[];
4
+ }>;
@@ -1,6 +1,6 @@
1
- declare const _default: {
2
- manga: {
3
- SCRAPE_BASE_URL: string;
4
- };
5
- };
6
- export default _default;
1
+ declare const _default: {
2
+ manga: {
3
+ SCRAPE_BASE_URL: string;
4
+ };
5
+ };
6
+ export default _default;
@@ -1,70 +1,70 @@
1
- declare const _default: {
2
- manga: {
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
- chapter: {
20
- accept: string;
21
- "accept-language": string;
22
- "cache-control": string;
23
- priority: string;
24
- pragma: string;
25
- "sec-ch-ua": string;
26
- "sec-ch-ua-mobile": string;
27
- "sec-ch-ua-platform": string;
28
- "sec-fetch-dest": string;
29
- "sec-fetch-mode": string;
30
- "sec-fetch-site": string;
31
- "sec-fetch-user": string;
32
- "sec-gpc": string;
33
- "upgrade-insecure-requests": string;
34
- "user-agent": string;
35
- };
36
- chapterList: {
37
- accept: string;
38
- "accept-language": string;
39
- "cache-control": string;
40
- pragma: string;
41
- priority: string;
42
- "sec-ch-ua": string;
43
- "sec-ch-ua-mobile": string;
44
- "sec-ch-ua-platform": string;
45
- "sec-fetch-dest": string;
46
- "sec-fetch-mode": string;
47
- "sec-fetch-site": string;
48
- "sec-gpc": string;
49
- "x-requested-with": string;
50
- "Referrer-Policy": string;
51
- };
52
- recent: {
53
- accept: string;
54
- "accept-language": string;
55
- "cache-control": string;
56
- priority: string;
57
- pragma: string;
58
- "sec-ch-ua": string;
59
- "sec-ch-ua-mobile": string;
60
- "sec-ch-ua-platform": string;
61
- "sec-fetch-dest": string;
62
- "sec-fetch-mode": string;
63
- "sec-fetch-site": string;
64
- "sec-fetch-user": string;
65
- "sec-gpc": string;
66
- "upgrade-insecure-requests": string;
67
- "user-agent": string;
68
- };
69
- };
70
- export default _default;
1
+ declare const _default: {
2
+ manga: {
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
+ chapter: {
20
+ accept: string;
21
+ "accept-language": string;
22
+ "cache-control": string;
23
+ priority: string;
24
+ pragma: string;
25
+ "sec-ch-ua": string;
26
+ "sec-ch-ua-mobile": string;
27
+ "sec-ch-ua-platform": string;
28
+ "sec-fetch-dest": string;
29
+ "sec-fetch-mode": string;
30
+ "sec-fetch-site": string;
31
+ "sec-fetch-user": string;
32
+ "sec-gpc": string;
33
+ "upgrade-insecure-requests": string;
34
+ "user-agent": string;
35
+ };
36
+ chapterList: {
37
+ accept: string;
38
+ "accept-language": string;
39
+ "cache-control": string;
40
+ pragma: string;
41
+ priority: string;
42
+ "sec-ch-ua": string;
43
+ "sec-ch-ua-mobile": string;
44
+ "sec-ch-ua-platform": string;
45
+ "sec-fetch-dest": string;
46
+ "sec-fetch-mode": string;
47
+ "sec-fetch-site": string;
48
+ "sec-gpc": string;
49
+ "x-requested-with": string;
50
+ "Referrer-Policy": string;
51
+ };
52
+ recent: {
53
+ accept: string;
54
+ "accept-language": string;
55
+ "cache-control": string;
56
+ priority: string;
57
+ pragma: string;
58
+ "sec-ch-ua": string;
59
+ "sec-ch-ua-mobile": string;
60
+ "sec-ch-ua-platform": string;
61
+ "sec-fetch-dest": string;
62
+ "sec-fetch-mode": string;
63
+ "sec-fetch-site": string;
64
+ "sec-fetch-user": string;
65
+ "sec-gpc": string;
66
+ "upgrade-insecure-requests": string;
67
+ "user-agent": string;
68
+ };
69
+ };
70
+ export default _default;
@@ -1,21 +1,21 @@
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
- private chapterList;
12
- manga(manga_code: string): Promise<import("../..").ScrapedManga>;
13
- chapterById(chapter_id: string | number): Promise<{
14
- pages: string[];
15
- }>;
16
- chapter(manga_code: string, chapter_number: number): Promise<{
17
- pages: string[];
18
- }>;
19
- recents(page?: number): Promise<import("../..").RecentScrapeList[]>;
20
- }
21
- export {};
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
+ private chapterList;
12
+ manga(manga_code: string): Promise<import("../..").ScrapedManga>;
13
+ chapterById(chapter_id: string | number): Promise<{
14
+ pages: string[];
15
+ }>;
16
+ chapter(manga_code: string, chapter_number: number): Promise<{
17
+ pages: string[];
18
+ }>;
19
+ recents(page?: number): Promise<import("../..").RecentScrapeList[]>;
20
+ }
21
+ export {};
@@ -1,4 +1,4 @@
1
- /// <reference types="cheerio" />
2
- import { ScrapedHostChapter, ScrapedManga } from "../../@types";
3
- export declare function getChapters($: cheerio.Root, slug: string): ScrapedHostChapter[];
4
- export declare function getManga($: cheerio.Root, slug: string): ScrapedManga;
1
+ /// <reference types="cheerio" />
2
+ import { ScrapedHostChapter, ScrapedManga } from "../../@types";
3
+ export declare function getChapters($: cheerio.Root, slug: string): ScrapedHostChapter[];
4
+ export declare function getManga($: cheerio.Root, slug: string): ScrapedManga;
@@ -1,58 +1,58 @@
1
- /// <reference types="cheerio" />
2
- import { RecentScrapeList } from "../../@types";
3
- export type RawScrapeItem = {
4
- obr_id: number;
5
- obr_nome: string;
6
- obr_outros_nomes: string[];
7
- obr_descricao: string;
8
- formt_id: number;
9
- stt_id: number;
10
- obr_status: string;
11
- obr_imagem: string;
12
- obr_imagem_fundo: any;
13
- obr_visualizacoes: number;
14
- obr_criada_em: string;
15
- obr_atualizado_em: string;
16
- obr_slug: string;
17
- obr_mais_18: boolean;
18
- obr_vip: boolean;
19
- scan_id: number;
20
- parceira_id: any;
21
- formato: Formato;
22
- status: Status;
23
- tags: Tag[];
24
- total_capitulos: number;
25
- ultimos_capitulos: LastChapters[];
26
- favorito: boolean;
27
- total_lidos: number;
28
- genero: Genere;
29
- rating: number;
30
- total_rating: number;
31
- };
32
- export type Formato = {
33
- formt_id: number;
34
- formt_nome: string;
35
- };
36
- export type Status = {
37
- stt_id: number;
38
- stt_nome: string;
39
- stt_cor: string;
40
- };
41
- export type Tag = {
42
- tag_id: number;
43
- tag_nome: string;
44
- };
45
- export type LastChapters = {
46
- cap_id: number;
47
- cap_nome: string;
48
- cap_numero: number;
49
- cap_lancado_em: string;
50
- cap_new: boolean;
51
- cap_lido: boolean;
52
- cap_disponivel: boolean;
53
- };
54
- export type Genere = {
55
- gen_id: number;
56
- gen_nome: string;
57
- };
58
- export declare function getRecentList($: cheerio.Root): RecentScrapeList[];
1
+ /// <reference types="cheerio" />
2
+ import { RecentScrapeList } from "../../@types";
3
+ export type RawScrapeItem = {
4
+ obr_id: number;
5
+ obr_nome: string;
6
+ obr_outros_nomes: string[];
7
+ obr_descricao: string;
8
+ formt_id: number;
9
+ stt_id: number;
10
+ obr_status: string;
11
+ obr_imagem: string;
12
+ obr_imagem_fundo: any;
13
+ obr_visualizacoes: number;
14
+ obr_criada_em: string;
15
+ obr_atualizado_em: string;
16
+ obr_slug: string;
17
+ obr_mais_18: boolean;
18
+ obr_vip: boolean;
19
+ scan_id: number;
20
+ parceira_id: any;
21
+ formato: Formato;
22
+ status: Status;
23
+ tags: Tag[];
24
+ total_capitulos: number;
25
+ ultimos_capitulos: LastChapters[];
26
+ favorito: boolean;
27
+ total_lidos: number;
28
+ genero: Genere;
29
+ rating: number;
30
+ total_rating: number;
31
+ };
32
+ export type Formato = {
33
+ formt_id: number;
34
+ formt_nome: string;
35
+ };
36
+ export type Status = {
37
+ stt_id: number;
38
+ stt_nome: string;
39
+ stt_cor: string;
40
+ };
41
+ export type Tag = {
42
+ tag_id: number;
43
+ tag_nome: string;
44
+ };
45
+ export type LastChapters = {
46
+ cap_id: number;
47
+ cap_nome: string;
48
+ cap_numero: number;
49
+ cap_lancado_em: string;
50
+ cap_new: boolean;
51
+ cap_lido: boolean;
52
+ cap_disponivel: boolean;
53
+ };
54
+ export type Genere = {
55
+ gen_id: number;
56
+ gen_nome: string;
57
+ };
58
+ export declare function getRecentList($: cheerio.Root): RecentScrapeList[];
@@ -1,7 +1,7 @@
1
- interface GraphQLRequestBody {
2
- query: string;
3
- operationName: string;
4
- variables?: any;
5
- }
6
- export declare function graphQLRequest(body: GraphQLRequestBody): Promise<any>;
7
- export {};
1
+ interface GraphQLRequestBody {
2
+ query: string;
3
+ operationName: string;
4
+ variables?: any;
5
+ }
6
+ export declare function graphQLRequest(body: GraphQLRequestBody): Promise<any>;
7
+ export {};
@@ -1 +1 @@
1
- export {};
1
+ export {};
@@ -1,3 +1,3 @@
1
- import { Languages } from "./type";
2
- export declare function getTags(genres: string, language?: Languages): string[];
3
- export declare function getTagsBySimilarity(genres: string, language?: Languages): string[];
1
+ import { Languages } from "./type";
2
+ export declare function getTags(genres: string, language?: Languages): string[];
3
+ export declare function getTagsBySimilarity(genres: string, language?: Languages): string[];
@@ -1,12 +1,12 @@
1
- /// <reference types="node" />
2
- import { RequestOptions } from "https";
3
- export declare class TinyFetch {
4
- private headers;
5
- constructor(headers?: Record<string, string>);
6
- private request;
7
- static fetch<T = any>(url: string, options?: RequestOptions): Promise<{
8
- json: () => T;
9
- text: () => string;
10
- buffer: () => Buffer;
11
- }>;
12
- }
1
+ /// <reference types="node" />
2
+ import { RequestOptions } from "https";
3
+ export declare class TinyFetch {
4
+ private headers;
5
+ constructor(headers?: Record<string, string>);
6
+ private request;
7
+ static fetch<T = any>(url: string, options?: RequestOptions): Promise<{
8
+ json: () => T;
9
+ text: () => string;
10
+ buffer: () => Buffer;
11
+ }>;
12
+ }
@@ -1,29 +1,29 @@
1
- /// <reference types="node" />
2
- /// <reference types="node" />
3
- /// <reference types="cheerio" />
4
- import { RequestInit } from "node-fetch";
5
- import { MainLanguages } from "./type";
6
- export declare function zlibDecode<T>(data: string): T;
7
- export declare function getText(url: string, options?: RequestInit): Promise<string>;
8
- export declare function getImgBuffer(url: string, options?: RequestInit): Promise<Buffer>;
9
- export declare function urlFromSrcSet(srcset?: string): string;
10
- export declare function getJSON<T>(url: string, options?: RequestInit): Promise<T>;
11
- export declare function HTML(url: string, options?: RequestInit): Promise<cheerio.Root>;
12
- export declare function checkThumb(thumbnail?: string): string | undefined;
13
- export declare function hasFinished(finished?: string): boolean;
14
- export declare function getSlug(href?: string): string | undefined;
15
- export declare function toSlug(title?: string, language?: MainLanguages): string | undefined;
16
- export declare function GeekGen(title: string): string;
17
- export declare function isExtra(title: string): boolean;
18
- export declare function toStringNumber(value: string): string | null;
19
- export declare function toNumber(value: string): number | null;
20
- export declare function generateHash(size?: number): string;
21
- export declare function hash(): string;
22
- export declare function getChapterNumber(number?: string | number): number | undefined;
23
- export declare function getChapterTitle(number?: string | number, language?: string): string;
24
- export declare function getChapterId(url?: string): number | false;
25
- export declare function unionChapterNumberFormat(chapter_number: number): string;
26
- export declare function atob(data: string): string;
27
- export declare function btoa(data: string): string;
28
- export declare function removeDuplicates<T>(array: T[], callback: (a: T) => unknown): NonNullable<T>[];
29
- export declare function extractContentRegex(content: string, regex: RegExp): string | undefined;
1
+ /// <reference types="node" />
2
+ /// <reference types="node" />
3
+ /// <reference types="cheerio" />
4
+ import { RequestInit } from "node-fetch";
5
+ import { MainLanguages } from "./type";
6
+ export declare function zlibDecode<T>(data: string): T;
7
+ export declare function getText(url: string, options?: RequestInit): Promise<string>;
8
+ export declare function getImgBuffer(url: string, options?: RequestInit): Promise<Buffer>;
9
+ export declare function urlFromSrcSet(srcset?: string): string;
10
+ export declare function getJSON<T>(url: string, options?: RequestInit): Promise<T>;
11
+ export declare function HTML(url: string, options?: RequestInit): Promise<cheerio.Root>;
12
+ export declare function checkThumb(thumbnail?: string): string | undefined;
13
+ export declare function hasFinished(finished?: string): boolean;
14
+ export declare function getSlug(href?: string): string | undefined;
15
+ export declare function toSlug(title?: string, language?: MainLanguages): string | undefined;
16
+ export declare function GeekGen(title: string): string;
17
+ export declare function isExtra(title: string): boolean;
18
+ export declare function toStringNumber(value: string): string | null;
19
+ export declare function toNumber(value: string): number | null;
20
+ export declare function generateHash(size?: number): string;
21
+ export declare function hash(): string;
22
+ export declare function getChapterNumber(number?: string | number): number | undefined;
23
+ export declare function getChapterTitle(number?: string | number, language?: string): string;
24
+ export declare function getChapterId(url?: string): number | false;
25
+ export declare function unionChapterNumberFormat(chapter_number: number): string;
26
+ export declare function atob(data: string): string;
27
+ export declare function btoa(data: string): string;
28
+ export declare function removeDuplicates<T>(array: T[], callback: (a: T) => unknown): NonNullable<T>[];
29
+ export declare function extractContentRegex(content: string, regex: RegExp): string | undefined;
@@ -1,5 +1,5 @@
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
- [key in Languages]?: string;
5
- };
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
+ [key in Languages]?: string;
5
+ };
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
- {
2
- "name": "mgbuild",
3
- "version": "1.9.8",
4
- "scripts": {},
5
- "description": "",
6
- "main": "lib/index.js",
7
- "keywords": [],
8
- "author": "",
9
- "license": "ISC"
10
- }
1
+ {
2
+ "name": "mgbuild",
3
+ "version": "1.9.9",
4
+ "scripts": {},
5
+ "description": "",
6
+ "main": "lib/index.js",
7
+ "keywords": [],
8
+ "author": "",
9
+ "license": "ISC"
10
+ }