mgbuild 2.1.8 → 2.1.10

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.
@@ -0,0 +1,6 @@
1
+ import { APIRecentsResponse, APIMangaResponse, APIChapterResponse } from "./types";
2
+ export declare class MediocreAPI {
3
+ static recents(log?: (url: string) => void): Promise<APIRecentsResponse>;
4
+ static manga(mangaId: string | number, log?: (url: string) => void): Promise<APIMangaResponse>;
5
+ static chapter(chapterId: string | number, log?: (url: string) => void): Promise<APIChapterResponse>;
6
+ }
@@ -0,0 +1,86 @@
1
+ declare const _default: {
2
+ fetch: {
3
+ accept: string;
4
+ "accept-language": string;
5
+ "cache-control": string;
6
+ pragma: string;
7
+ priority: 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-gpc": string;
15
+ "content-type": string;
16
+ referrer: string;
17
+ };
18
+ manga: {
19
+ accept: string;
20
+ "accept-language": string;
21
+ "cache-control": string;
22
+ priority: string;
23
+ pragma: string;
24
+ "sec-ch-ua": string;
25
+ "sec-ch-ua-mobile": string;
26
+ "sec-ch-ua-platform": string;
27
+ "sec-fetch-dest": string;
28
+ "sec-fetch-mode": string;
29
+ "sec-fetch-site": string;
30
+ "sec-fetch-user": string;
31
+ "sec-gpc": string;
32
+ "upgrade-insecure-requests": string;
33
+ "user-agent": string;
34
+ };
35
+ chapter: {
36
+ accept: string;
37
+ "accept-language": string;
38
+ "cache-control": string;
39
+ priority: string;
40
+ pragma: string;
41
+ "sec-ch-ua": string;
42
+ "sec-ch-ua-mobile": string;
43
+ "sec-ch-ua-platform": string;
44
+ "sec-fetch-dest": string;
45
+ "sec-fetch-mode": string;
46
+ "sec-fetch-site": string;
47
+ "sec-fetch-user": string;
48
+ "sec-gpc": string;
49
+ "upgrade-insecure-requests": string;
50
+ "user-agent": string;
51
+ };
52
+ chapterList: {
53
+ accept: string;
54
+ "accept-language": string;
55
+ "cache-control": string;
56
+ pragma: string;
57
+ priority: 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-gpc": string;
65
+ "x-requested-with": string;
66
+ "Referrer-Policy": string;
67
+ };
68
+ recent: {
69
+ accept: string;
70
+ "accept-language": string;
71
+ "cache-control": string;
72
+ priority: string;
73
+ pragma: string;
74
+ "sec-ch-ua": string;
75
+ "sec-ch-ua-mobile": string;
76
+ "sec-ch-ua-platform": string;
77
+ "sec-fetch-dest": string;
78
+ "sec-fetch-mode": string;
79
+ "sec-fetch-site": string;
80
+ "sec-fetch-user": string;
81
+ "sec-gpc": string;
82
+ "upgrade-insecure-requests": string;
83
+ "user-agent": string;
84
+ };
85
+ };
86
+ export default _default;
@@ -0,0 +1,40 @@
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
+ id: number;
13
+ title: string;
14
+ description: string;
15
+ available: boolean;
16
+ cover: string;
17
+ geek: string;
18
+ slug: string;
19
+ tags: string[];
20
+ chapters: {
21
+ id: number;
22
+ number: number;
23
+ title: string;
24
+ geek: string;
25
+ }[];
26
+ }>;
27
+ chapterById(chapter_id: string | number): Promise<{
28
+ pages: string[];
29
+ }>;
30
+ chapter(manga_code: string, chapter_number: number): Promise<{
31
+ pages: string[];
32
+ }>;
33
+ recents(): Promise<{
34
+ title: string;
35
+ cover: string;
36
+ code: string;
37
+ chapters: (number | undefined)[];
38
+ }[]>;
39
+ }
40
+ export {};
@@ -0,0 +1,115 @@
1
+ export type Capitulo = {
2
+ id: number;
3
+ nome: string;
4
+ tem_paginas: boolean;
5
+ imagem: string;
6
+ descricao: string;
7
+ lancado_em: any;
8
+ numero: string;
9
+ lido: boolean;
10
+ totallinks: number;
11
+ };
12
+ export type RecentData = {
13
+ id: number;
14
+ nome: string;
15
+ descricao: string;
16
+ imagem: string;
17
+ formato: Formato;
18
+ criada_em: string;
19
+ tags: Tag[];
20
+ status: Status;
21
+ total_capitulos: number;
22
+ total_lidos: number;
23
+ ultimo_lido: any;
24
+ leitura: Leitura;
25
+ total_usuarios_lendo: number;
26
+ total_usuarios_leram: number;
27
+ total_usuarios_lerao: number;
28
+ links: any[];
29
+ atualizacoes: Atualizacoes;
30
+ agente: Agente;
31
+ capitulos_importados: number;
32
+ capitulos_nao_importados: number;
33
+ ultimo_capitulo: UltimoCapitulo;
34
+ };
35
+ export type Formato = {
36
+ id: number;
37
+ nome: string;
38
+ };
39
+ export type Tag = {
40
+ id: number;
41
+ nome: string;
42
+ };
43
+ export type Status = {
44
+ id: number;
45
+ nome: string;
46
+ };
47
+ export type Leitura = {
48
+ status: any;
49
+ };
50
+ export type Atualizacoes = {
51
+ dia_semana: string;
52
+ frequencia: string;
53
+ status: string;
54
+ };
55
+ export type Agente = {
56
+ id: number;
57
+ nome: string;
58
+ };
59
+ export type UltimoCapitulo = {
60
+ capId: number;
61
+ obrId: number;
62
+ cap_nome: string;
63
+ cap_desc: string;
64
+ cap_num: string;
65
+ cap_image: string;
66
+ cap_paginas: string;
67
+ cap_importar: number;
68
+ cap_tentativas: number;
69
+ cap_lancado_em: any;
70
+ cap_criado_em: string;
71
+ };
72
+ export type Pagina = {
73
+ src: string;
74
+ };
75
+ export type Obra = {
76
+ id: number;
77
+ nome: string;
78
+ capitulos: Capitulo[];
79
+ };
80
+ export type APIRecentsResponse = {
81
+ data: RecentData[];
82
+ };
83
+ export type APIMangaResponse = {
84
+ id: number;
85
+ nome: string;
86
+ descricao: string;
87
+ imagem: string;
88
+ formato: Formato;
89
+ criada_em: string;
90
+ tags: Tag[];
91
+ status: Status;
92
+ leitura: Leitura;
93
+ total_capitulos: number;
94
+ total_lidos: number;
95
+ ultimo_lido: any;
96
+ capitulos: Capitulo[];
97
+ links: any[];
98
+ atualizacoes: Atualizacoes;
99
+ agente: Agente;
100
+ };
101
+ export type APIChapterResponse = {
102
+ id: number;
103
+ nome: string;
104
+ descricao: string;
105
+ numero: string;
106
+ imagem: string;
107
+ paginas: Pagina[];
108
+ lancado_em: any;
109
+ criado_em: string;
110
+ total_comentarios: number;
111
+ links: any[];
112
+ obra: Obra;
113
+ cap_anterior: number;
114
+ lido: boolean;
115
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mgbuild",
3
- "version": "2.1.8",
3
+ "version": "2.1.10",
4
4
  "scripts": {},
5
5
  "description": "",
6
6
  "main": "lib/index.js",