react-native-consumet 1.2.3 → 1.3.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/commonjs/extension-registry.json +27 -3
- package/lib/commonjs/extractors/megacloud.js +8 -35
- package/lib/commonjs/extractors/megacloud.js.map +1 -1
- package/lib/commonjs/providers/anime/aniwatchtv/aniwatchtv.js +187 -0
- package/lib/commonjs/providers/anime/aniwatchtv/aniwatchtv.js.map +1 -0
- package/lib/commonjs/providers/anime/aniwatchtv/create-aniwatchtv.js +572 -0
- package/lib/commonjs/providers/anime/aniwatchtv/create-aniwatchtv.js.map +1 -0
- package/lib/commonjs/providers/anime/index.js +5 -1
- package/lib/commonjs/providers/anime/index.js.map +1 -1
- package/lib/commonjs/providers/meta/anilist.js +2 -1
- package/lib/commonjs/providers/meta/anilist.js.map +1 -1
- package/lib/commonjs/utils/provider-maps.js +3 -0
- package/lib/commonjs/utils/provider-maps.js.map +1 -1
- package/lib/module/extension-registry.json +27 -3
- package/lib/module/extractors/megacloud.js +8 -35
- package/lib/module/extractors/megacloud.js.map +1 -1
- package/lib/module/providers/anime/aniwatchtv/aniwatchtv.js +184 -0
- package/lib/module/providers/anime/aniwatchtv/aniwatchtv.js.map +1 -0
- package/lib/module/providers/anime/aniwatchtv/create-aniwatchtv.js +569 -0
- package/lib/module/providers/anime/aniwatchtv/create-aniwatchtv.js.map +1 -0
- package/lib/module/providers/anime/index.js +5 -1
- package/lib/module/providers/anime/index.js.map +1 -1
- package/lib/module/providers/meta/anilist.js +2 -1
- package/lib/module/providers/meta/anilist.js.map +1 -1
- package/lib/module/utils/provider-maps.js +3 -0
- package/lib/module/utils/provider-maps.js.map +1 -1
- package/lib/typescript/commonjs/src/extractors/megacloud.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/providers/anime/aniwatchtv/aniwatchtv.d.ts +134 -0
- package/lib/typescript/commonjs/src/providers/anime/aniwatchtv/aniwatchtv.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/providers/anime/aniwatchtv/create-aniwatchtv.d.ts +49 -0
- package/lib/typescript/commonjs/src/providers/anime/aniwatchtv/create-aniwatchtv.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/providers/anime/index.d.ts +4 -0
- package/lib/typescript/commonjs/src/providers/anime/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/providers/meta/anilist.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/utils/provider-maps.d.ts +1 -0
- package/lib/typescript/commonjs/src/utils/provider-maps.d.ts.map +1 -1
- package/lib/typescript/module/src/extractors/megacloud.d.ts.map +1 -1
- package/lib/typescript/module/src/providers/anime/aniwatchtv/aniwatchtv.d.ts +134 -0
- package/lib/typescript/module/src/providers/anime/aniwatchtv/aniwatchtv.d.ts.map +1 -0
- package/lib/typescript/module/src/providers/anime/aniwatchtv/create-aniwatchtv.d.ts +49 -0
- package/lib/typescript/module/src/providers/anime/aniwatchtv/create-aniwatchtv.d.ts.map +1 -0
- package/lib/typescript/module/src/providers/anime/index.d.ts +4 -0
- package/lib/typescript/module/src/providers/anime/index.d.ts.map +1 -1
- package/lib/typescript/module/src/providers/meta/anilist.d.ts.map +1 -1
- package/lib/typescript/module/src/utils/provider-maps.d.ts +1 -0
- package/lib/typescript/module/src/utils/provider-maps.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/extension-registry.json +27 -3
- package/src/extractors/megacloud.ts +7 -38
- package/src/providers/anime/aniwatchtv/aniwatchtv.ts +198 -0
- package/src/providers/anime/aniwatchtv/create-aniwatchtv.ts +632 -0
- package/src/providers/anime/index.ts +4 -0
- package/src/providers/meta/anilist.ts +7 -1
- package/src/utils/provider-maps.ts +3 -0
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
import { AnimeParser } from '../../../models';
|
|
2
|
+
import { createProviderContext } from '../../../utils/create-provider-context';
|
|
3
|
+
import createAniWatchTv, { type AniWatchTvProviderInstance } from './create-aniwatchtv';
|
|
4
|
+
|
|
5
|
+
// Backward compatibility wrapper class
|
|
6
|
+
export class AniWatchTv extends AnimeParser {
|
|
7
|
+
private instance: AniWatchTvProviderInstance;
|
|
8
|
+
override logo: string;
|
|
9
|
+
override name: string;
|
|
10
|
+
override baseUrl: string;
|
|
11
|
+
override classPath: string;
|
|
12
|
+
override isNSFW: boolean;
|
|
13
|
+
override isWorking: boolean;
|
|
14
|
+
override readonly isDubAvailableSeparately: boolean;
|
|
15
|
+
|
|
16
|
+
constructor(customBaseURL?: string) {
|
|
17
|
+
super();
|
|
18
|
+
|
|
19
|
+
// Use the context factory to create a complete context with all defaults
|
|
20
|
+
const defaultContext = createProviderContext();
|
|
21
|
+
|
|
22
|
+
this.instance = createAniWatchTv(defaultContext, customBaseURL);
|
|
23
|
+
|
|
24
|
+
this.logo = this.instance.logo;
|
|
25
|
+
this.name = this.instance.name;
|
|
26
|
+
this.baseUrl = this.instance.baseUrl;
|
|
27
|
+
this.classPath = this.instance.classPath;
|
|
28
|
+
this.isNSFW = this.instance.isNSFW ?? false;
|
|
29
|
+
this.isWorking = this.instance.isWorking ?? true;
|
|
30
|
+
this.isDubAvailableSeparately = this.instance.isDubAvailableSeparately ?? false;
|
|
31
|
+
|
|
32
|
+
// Bind all methods to preserve proper typing
|
|
33
|
+
this.search = this.instance.search;
|
|
34
|
+
this.fetchAdvancedSearch = this.instance.fetchAdvancedSearch;
|
|
35
|
+
this.fetchTopAiring = this.instance.fetchTopAiring;
|
|
36
|
+
this.fetchMostPopular = this.instance.fetchMostPopular;
|
|
37
|
+
this.fetchMostFavorite = this.instance.fetchMostFavorite;
|
|
38
|
+
this.fetchLatestCompleted = this.instance.fetchLatestCompleted;
|
|
39
|
+
this.fetchRecentlyUpdated = this.instance.fetchRecentlyUpdated;
|
|
40
|
+
this.fetchRecentlyAdded = this.instance.fetchRecentlyAdded;
|
|
41
|
+
this.fetchTopUpcoming = this.instance.fetchTopUpcoming;
|
|
42
|
+
this.fetchStudio = this.instance.fetchStudio;
|
|
43
|
+
this.fetchSubbedAnime = this.instance.fetchSubbedAnime;
|
|
44
|
+
this.fetchDubbedAnime = this.instance.fetchDubbedAnime;
|
|
45
|
+
this.fetchMovie = this.instance.fetchMovie;
|
|
46
|
+
this.fetchTV = this.instance.fetchTV;
|
|
47
|
+
this.fetchOVA = this.instance.fetchOVA;
|
|
48
|
+
this.fetchONA = this.instance.fetchONA;
|
|
49
|
+
this.fetchSpecial = this.instance.fetchSpecial;
|
|
50
|
+
this.fetchGenres = this.instance.fetchGenres;
|
|
51
|
+
this.genreSearch = this.instance.genreSearch;
|
|
52
|
+
this.fetchSchedule = this.instance.fetchSchedule;
|
|
53
|
+
this.fetchSpotlight = this.instance.fetchSpotlight;
|
|
54
|
+
this.fetchSearchSuggestions = this.instance.fetchSearchSuggestions;
|
|
55
|
+
this.fetchContinueWatching = this.instance.fetchContinueWatching;
|
|
56
|
+
this.fetchWatchList = this.instance.fetchWatchList;
|
|
57
|
+
this.fetchAnimeInfo = this.instance.fetchAnimeInfo;
|
|
58
|
+
this.fetchEpisodeSources = this.instance.fetchEpisodeSources;
|
|
59
|
+
this.fetchEpisodeServers = this.instance.fetchEpisodeServers;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* @param query Search query
|
|
64
|
+
* @param page Page number (optional)
|
|
65
|
+
*/
|
|
66
|
+
search!: AniWatchTvProviderInstance['search'];
|
|
67
|
+
/**
|
|
68
|
+
* Fetch advanced anime search results with various filters.
|
|
69
|
+
*
|
|
70
|
+
* @param page Page number (default: 1)
|
|
71
|
+
* @param type One of (Optional): movie, tv, ova, ona, special, music
|
|
72
|
+
* @param status One of (Optional): finished_airing, currently_airing, not_yet_aired
|
|
73
|
+
* @param rated One of (Optional): g, pg, pg_13, r, r_plus, rx
|
|
74
|
+
* @param score Number from 1 to 10 (Optional)
|
|
75
|
+
* @param season One of (Optional): spring, summer, fall, winter
|
|
76
|
+
* @param language One of (Optional): sub, dub, sub_dub
|
|
77
|
+
* @param startDate Start date object { year, month, day } (Optional)
|
|
78
|
+
* @param endDate End date object { year, month, day } (Optional)
|
|
79
|
+
* @param sort One of (Optional): recently_added, recently_updated, score, name_az, released_date, most_watched
|
|
80
|
+
* @param genres Array of genres (Optional): action, adventure, cars, comedy, dementia, demons, mystery, drama, ecchi, fantasy, game, historical, horror, kids, magic, martial_arts, mecha, music, parody, samurai, romance, school, sci_fi, shoujo, shoujo_ai, shounen, shounen_ai, space, sports, super_power, vampire, harem, military, slice_of_life, supernatural, police, psychological, thriller, seinen, isekai, josei
|
|
81
|
+
* @returns A Promise resolving to the search results.
|
|
82
|
+
*/
|
|
83
|
+
fetchAdvancedSearch!: AniWatchTvProviderInstance['fetchAdvancedSearch'];
|
|
84
|
+
/**
|
|
85
|
+
* @param page number
|
|
86
|
+
*/
|
|
87
|
+
fetchTopAiring!: AniWatchTvProviderInstance['fetchTopAiring'];
|
|
88
|
+
/**
|
|
89
|
+
* @param page number
|
|
90
|
+
*/
|
|
91
|
+
fetchMostPopular!: AniWatchTvProviderInstance['fetchMostPopular'];
|
|
92
|
+
/**
|
|
93
|
+
* @param page number
|
|
94
|
+
*/
|
|
95
|
+
fetchMostFavorite!: AniWatchTvProviderInstance['fetchMostFavorite'];
|
|
96
|
+
/**
|
|
97
|
+
* @param page number
|
|
98
|
+
*/
|
|
99
|
+
fetchLatestCompleted!: AniWatchTvProviderInstance['fetchLatestCompleted'];
|
|
100
|
+
/**
|
|
101
|
+
* @param page number
|
|
102
|
+
*/
|
|
103
|
+
fetchRecentlyUpdated!: AniWatchTvProviderInstance['fetchRecentlyUpdated'];
|
|
104
|
+
/**
|
|
105
|
+
* @param page number
|
|
106
|
+
*/
|
|
107
|
+
fetchRecentlyAdded!: AniWatchTvProviderInstance['fetchRecentlyAdded'];
|
|
108
|
+
/**
|
|
109
|
+
* @param page number
|
|
110
|
+
*/
|
|
111
|
+
fetchTopUpcoming!: AniWatchTvProviderInstance['fetchTopUpcoming'];
|
|
112
|
+
/**
|
|
113
|
+
* @param studio Studio id, e.g. "toei-animation"
|
|
114
|
+
* @param page page number (optional) `default 1`
|
|
115
|
+
*/
|
|
116
|
+
fetchStudio!: AniWatchTvProviderInstance['fetchStudio'];
|
|
117
|
+
/**
|
|
118
|
+
* @param page number
|
|
119
|
+
*/
|
|
120
|
+
fetchSubbedAnime!: AniWatchTvProviderInstance['fetchSubbedAnime'];
|
|
121
|
+
/**
|
|
122
|
+
* @param page number
|
|
123
|
+
*/
|
|
124
|
+
fetchDubbedAnime!: AniWatchTvProviderInstance['fetchDubbedAnime'];
|
|
125
|
+
/**
|
|
126
|
+
* @param page number
|
|
127
|
+
*/
|
|
128
|
+
fetchMovie!: AniWatchTvProviderInstance['fetchMovie'];
|
|
129
|
+
/**
|
|
130
|
+
* @param page number
|
|
131
|
+
*/
|
|
132
|
+
fetchTV!: AniWatchTvProviderInstance['fetchTV'];
|
|
133
|
+
/**
|
|
134
|
+
* @param page number
|
|
135
|
+
*/
|
|
136
|
+
fetchOVA!: AniWatchTvProviderInstance['fetchOVA'];
|
|
137
|
+
/**
|
|
138
|
+
* @param page number
|
|
139
|
+
*/
|
|
140
|
+
fetchONA!: AniWatchTvProviderInstance['fetchONA'];
|
|
141
|
+
/**
|
|
142
|
+
* @param page number
|
|
143
|
+
*/
|
|
144
|
+
fetchSpecial!: AniWatchTvProviderInstance['fetchSpecial'];
|
|
145
|
+
fetchGenres!: AniWatchTvProviderInstance['fetchGenres'];
|
|
146
|
+
/**
|
|
147
|
+
* @param page number
|
|
148
|
+
*/
|
|
149
|
+
genreSearch!: AniWatchTvProviderInstance['genreSearch'];
|
|
150
|
+
/**
|
|
151
|
+
* Fetches the schedule for a given date.
|
|
152
|
+
* @param date The date in format 'YYYY-MM-DD'. Defaults to the current date.
|
|
153
|
+
* @returns A promise that resolves to an object containing the search results.
|
|
154
|
+
*/
|
|
155
|
+
fetchSchedule!: AniWatchTvProviderInstance['fetchSchedule'];
|
|
156
|
+
fetchSpotlight!: AniWatchTvProviderInstance['fetchSpotlight'];
|
|
157
|
+
fetchSearchSuggestions!: AniWatchTvProviderInstance['fetchSearchSuggestions'];
|
|
158
|
+
/**
|
|
159
|
+
* Fetches the list of episodes that the user is currently watching.
|
|
160
|
+
* @param connectSid The session ID of the user. Note: This can be obtained from the browser cookies (needs to be signed in)
|
|
161
|
+
* @returns A promise that resolves to an array of anime episodes.
|
|
162
|
+
*/
|
|
163
|
+
fetchContinueWatching!: AniWatchTvProviderInstance['fetchContinueWatching'];
|
|
164
|
+
fetchWatchList!: AniWatchTvProviderInstance['fetchWatchList'];
|
|
165
|
+
/**
|
|
166
|
+
* @param id Anime id
|
|
167
|
+
*/
|
|
168
|
+
fetchAnimeInfo!: AniWatchTvProviderInstance['fetchAnimeInfo'];
|
|
169
|
+
/**
|
|
170
|
+
*
|
|
171
|
+
* @param episodeId Episode id
|
|
172
|
+
* @param server server type (default `VidCloud`) (optional)
|
|
173
|
+
* @param subOrDub sub or dub (default `SubOrDub.SUB`) (optional)
|
|
174
|
+
*/
|
|
175
|
+
fetchEpisodeSources!: AniWatchTvProviderInstance['fetchEpisodeSources'];
|
|
176
|
+
/**
|
|
177
|
+
* Method not implemented in AniWatchTv provider.
|
|
178
|
+
* @param episodeId Episode id
|
|
179
|
+
*/
|
|
180
|
+
fetchEpisodeServers!: AniWatchTvProviderInstance['fetchEpisodeServers'];
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
export default AniWatchTv;
|
|
184
|
+
|
|
185
|
+
// (async () => {
|
|
186
|
+
// // tsx ./src/providers/anime/aniwatchtv/aniwatchtv.ts
|
|
187
|
+
// const aniwatchtv = new AniWatchTv();
|
|
188
|
+
// const anime = await aniwatchtv.search('Dandadan');
|
|
189
|
+
// const info = await aniwatchtv.fetchAnimeInfo('solo-leveling-season-2-arise-from-the-shadow-19413');
|
|
190
|
+
// // console.log(info.episodes);
|
|
191
|
+
// const sources = await aniwatchtv.fetchEpisodeServers(
|
|
192
|
+
// 'solo-leveling-season-2-arise-from-the-shadow-19413$episode$131394',
|
|
193
|
+
// // 'megacloud-hd-2',
|
|
194
|
+
// // undefined,
|
|
195
|
+
// SubOrDub.DUB
|
|
196
|
+
// );
|
|
197
|
+
// // console.log(sources);
|
|
198
|
+
// })();
|