react-native-consumet 3.0.1 → 5.0.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.
Files changed (1166) hide show
  1. package/README.md +1 -1
  2. package/android/build.gradle +1 -18
  3. package/android/generated/java/com/consumet/NativeConsumetSpec.java +0 -8
  4. package/android/generated/jni/RNConsumetSpec-generated.cpp +0 -12
  5. package/android/generated/jni/react/renderer/components/RNConsumetSpec/RNConsumetSpecJSI.h +0 -18
  6. package/android/src/androidTest/java/com/consumet/TestSupport.kt +12 -6
  7. package/android/src/androidTest/java/com/consumet/WebViewContractTest.kt +70 -22
  8. package/android/src/main/AndroidManifest.xml +2 -3
  9. package/android/src/main/java/com/consumet/ConsumetModule.kt +0 -11
  10. package/android/src/main/java/com/consumet/DeobfuscatorModule.kt +6 -11
  11. package/android/src/main/java/com/consumet/HttpClients.kt +26 -0
  12. package/android/src/main/java/com/consumet/HttpRequestModule.kt +134 -198
  13. package/android/src/main/java/com/consumet/RequestHeaders.kt +39 -0
  14. package/android/src/main/java/com/consumet/WebViewTask.kt +33 -23
  15. package/ios/Consumet.mm +340 -432
  16. package/ios/RCConsumetSynchronyCache.m +3 -1
  17. package/ios/generated/ReactCodegen/RNConsumetSpec/RNConsumetSpec-generated.mm +0 -14
  18. package/ios/generated/ReactCodegen/RNConsumetSpec/RNConsumetSpec.h +0 -6
  19. package/ios/generated/ReactCodegen/RNConsumetSpecJSI.h +0 -18
  20. package/lib/commonjs/NativeConsumet.ts +50 -52
  21. package/lib/commonjs/extension-registry.json +48 -188
  22. package/lib/commonjs/extension-registry.json.sig +1 -1
  23. package/lib/commonjs/extractors/file-hosts.js +42 -0
  24. package/lib/commonjs/extractors/file-hosts.js.map +1 -0
  25. package/lib/commonjs/extractors/flixcloud.js +25 -60
  26. package/lib/commonjs/extractors/flixcloud.js.map +1 -1
  27. package/lib/commonjs/extractors/gofile.js +123 -97
  28. package/lib/commonjs/extractors/gofile.js.map +1 -1
  29. package/lib/commonjs/extractors/hls.js +46 -0
  30. package/lib/commonjs/extractors/hls.js.map +1 -0
  31. package/lib/commonjs/extractors/hubcloud.js +131 -288
  32. package/lib/commonjs/extractors/hubcloud.js.map +1 -1
  33. package/lib/commonjs/extractors/index.js +4 -116
  34. package/lib/commonjs/extractors/index.js.map +1 -1
  35. package/lib/commonjs/extractors/kwik.js +15 -49
  36. package/lib/commonjs/extractors/kwik.js.map +1 -1
  37. package/lib/commonjs/extractors/megacloud.js +67 -140
  38. package/lib/commonjs/extractors/megacloud.js.map +1 -1
  39. package/lib/commonjs/extractors/megaplay.js +78 -128
  40. package/lib/commonjs/extractors/megaplay.js.map +1 -1
  41. package/lib/commonjs/extractors/packer.js +40 -0
  42. package/lib/commonjs/extractors/packer.js.map +1 -0
  43. package/lib/commonjs/extractors/streamwish.js +47 -103
  44. package/lib/commonjs/extractors/streamwish.js.map +1 -1
  45. package/lib/commonjs/extractors/url.js +11 -0
  46. package/lib/commonjs/extractors/url.js.map +1 -0
  47. package/lib/commonjs/extractors/vidhide.js +32 -59
  48. package/lib/commonjs/extractors/vidhide.js.map +1 -1
  49. package/lib/commonjs/index.js +123 -217
  50. package/lib/commonjs/index.js.map +1 -1
  51. package/lib/commonjs/models/anime-parser.js +4 -17
  52. package/lib/commonjs/models/anime-parser.js.map +1 -1
  53. package/lib/commonjs/models/base-parser.js.map +1 -1
  54. package/lib/commonjs/models/base-provider.js +6 -33
  55. package/lib/commonjs/models/base-provider.js.map +1 -1
  56. package/lib/commonjs/models/index.js +25 -52
  57. package/lib/commonjs/models/index.js.map +1 -1
  58. package/lib/commonjs/models/lightnovel-parser.js.map +1 -1
  59. package/lib/commonjs/models/manga-parser.js.map +1 -1
  60. package/lib/commonjs/models/meta-error.js +10 -4
  61. package/lib/commonjs/models/meta-error.js.map +1 -1
  62. package/lib/commonjs/models/movie-parser.js.map +1 -1
  63. package/lib/commonjs/models/provider-error.js +54 -0
  64. package/lib/commonjs/models/provider-error.js.map +1 -0
  65. package/lib/commonjs/models/types.js +13 -22
  66. package/lib/commonjs/models/types.js.map +1 -1
  67. package/lib/commonjs/models/video-extractor.js +0 -10
  68. package/lib/commonjs/models/video-extractor.js.map +1 -1
  69. package/lib/commonjs/providers/anime/anikoto/anikoto.js +3 -182
  70. package/lib/commonjs/providers/anime/anikoto/anikoto.js.map +1 -1
  71. package/lib/commonjs/providers/anime/anikoto/create-anikoto.js +319 -436
  72. package/lib/commonjs/providers/anime/anikoto/create-anikoto.js.map +1 -1
  73. package/lib/commonjs/providers/anime/anikoto/hianime.js +77 -0
  74. package/lib/commonjs/providers/anime/anikoto/hianime.js.map +1 -0
  75. package/lib/commonjs/providers/anime/animepahe/animepahe.js +2 -66
  76. package/lib/commonjs/providers/anime/animepahe/animepahe.js.map +1 -1
  77. package/lib/commonjs/providers/anime/animepahe/create-animepahe.js +259 -190
  78. package/lib/commonjs/providers/anime/animepahe/create-animepahe.js.map +1 -1
  79. package/lib/commonjs/providers/anime/helpers.js +16 -0
  80. package/lib/commonjs/providers/anime/helpers.js.map +1 -0
  81. package/lib/commonjs/providers/anime/index.js +1 -13
  82. package/lib/commonjs/providers/anime/index.js.map +1 -1
  83. package/lib/commonjs/providers/anime/reanime/create-reanime.js +42 -62
  84. package/lib/commonjs/providers/anime/reanime/create-reanime.js.map +1 -1
  85. package/lib/commonjs/providers/anime/reanime/reanime.js +2 -27
  86. package/lib/commonjs/providers/anime/reanime/reanime.js.map +1 -1
  87. package/lib/commonjs/providers/common/concurrency.js +38 -0
  88. package/lib/commonjs/providers/common/concurrency.js.map +1 -0
  89. package/lib/commonjs/providers/common/enc-dec.js +9 -0
  90. package/lib/commonjs/providers/common/enc-dec.js.map +1 -0
  91. package/lib/commonjs/providers/common/errors.js +77 -0
  92. package/lib/commonjs/providers/common/errors.js.map +1 -0
  93. package/lib/commonjs/providers/common/media-status.js +20 -0
  94. package/lib/commonjs/providers/common/media-status.js.map +1 -0
  95. package/lib/commonjs/providers/common/search.js +15 -0
  96. package/lib/commonjs/providers/common/search.js.map +1 -0
  97. package/lib/commonjs/providers/common/servers.js +45 -0
  98. package/lib/commonjs/providers/common/servers.js.map +1 -0
  99. package/lib/commonjs/providers/common/ttl-cache.js +59 -0
  100. package/lib/commonjs/providers/common/ttl-cache.js.map +1 -0
  101. package/lib/commonjs/providers/index.js +2 -3
  102. package/lib/commonjs/providers/index.js.map +1 -1
  103. package/lib/commonjs/providers/light-novels/novelupdates.js +49 -98
  104. package/lib/commonjs/providers/light-novels/novelupdates.js.map +1 -1
  105. package/lib/commonjs/providers/light-novels/readlightnovels.js +51 -93
  106. package/lib/commonjs/providers/light-novels/readlightnovels.js.map +1 -1
  107. package/lib/commonjs/providers/manga/asurascans.js +43 -56
  108. package/lib/commonjs/providers/manga/asurascans.js.map +1 -1
  109. package/lib/commonjs/providers/manga/flamescans.js +11 -33
  110. package/lib/commonjs/providers/manga/flamescans.js.map +1 -1
  111. package/lib/commonjs/providers/manga/mangadex.js +18 -17
  112. package/lib/commonjs/providers/manga/mangadex.js.map +1 -1
  113. package/lib/commonjs/providers/manga/mangahere.js +107 -169
  114. package/lib/commonjs/providers/manga/mangahere.js.map +1 -1
  115. package/lib/commonjs/providers/manga/mangakakalot.js +26 -56
  116. package/lib/commonjs/providers/manga/mangakakalot.js.map +1 -1
  117. package/lib/commonjs/providers/manga/mangapill.js +82 -120
  118. package/lib/commonjs/providers/manga/mangapill.js.map +1 -1
  119. package/lib/commonjs/providers/manga/shared.js +72 -0
  120. package/lib/commonjs/providers/manga/shared.js.map +1 -0
  121. package/lib/commonjs/providers/meta/anilist-media.js +252 -0
  122. package/lib/commonjs/providers/meta/anilist-media.js.map +1 -0
  123. package/lib/commonjs/providers/meta/anilist.js +435 -842
  124. package/lib/commonjs/providers/meta/anilist.js.map +1 -1
  125. package/lib/commonjs/providers/meta/index.js +2 -2
  126. package/lib/commonjs/providers/meta/index.js.map +1 -1
  127. package/lib/commonjs/providers/meta/mal.js +139 -323
  128. package/lib/commonjs/providers/meta/mal.js.map +1 -1
  129. package/lib/commonjs/providers/meta/shared.js +132 -0
  130. package/lib/commonjs/providers/meta/shared.js.map +1 -0
  131. package/lib/commonjs/providers/meta/tmdb.js +251 -298
  132. package/lib/commonjs/providers/meta/tmdb.js.map +1 -1
  133. package/lib/commonjs/providers/movies/index.js +7 -15
  134. package/lib/commonjs/providers/movies/index.js.map +1 -1
  135. package/lib/commonjs/providers/movies/multimovies/create-multimovies.js +217 -409
  136. package/lib/commonjs/providers/movies/multimovies/create-multimovies.js.map +1 -1
  137. package/lib/commonjs/providers/movies/multimovies/multimovies.js +2 -42
  138. package/lib/commonjs/providers/movies/multimovies/multimovies.js.map +1 -1
  139. package/lib/commonjs/providers/movies/multistream/create-multistream.js +130 -0
  140. package/lib/commonjs/providers/movies/multistream/create-multistream.js.map +1 -0
  141. package/lib/commonjs/providers/movies/multistream/multistream.js +12 -0
  142. package/lib/commonjs/providers/movies/multistream/multistream.js.map +1 -0
  143. package/lib/commonjs/providers/movies/multistream/utils.js +330 -406
  144. package/lib/commonjs/providers/movies/multistream/utils.js.map +1 -1
  145. package/lib/commonjs/providers/movies/netflixmirror/create-netflixmirror.js +69 -15
  146. package/lib/commonjs/providers/movies/netflixmirror/create-netflixmirror.js.map +1 -1
  147. package/lib/commonjs/providers/movies/netflixmirror/netflixmirror.js +6 -15
  148. package/lib/commonjs/providers/movies/netflixmirror/netflixmirror.js.map +1 -1
  149. package/lib/commonjs/providers/movies/site-paths.js +34 -0
  150. package/lib/commonjs/providers/movies/site-paths.js.map +1 -0
  151. package/lib/commonjs/providers/movies/vegamovies/create-vegamovies.js +474 -654
  152. package/lib/commonjs/providers/movies/vegamovies/create-vegamovies.js.map +1 -1
  153. package/lib/commonjs/providers/movies/vegamovies/vegamovies.js +2 -44
  154. package/lib/commonjs/providers/movies/vegamovies/vegamovies.js.map +1 -1
  155. package/lib/commonjs/providers/provider-class.js +28 -0
  156. package/lib/commonjs/providers/provider-class.js.map +1 -0
  157. package/lib/commonjs/registry-signing-keys.json +6 -0
  158. package/lib/commonjs/utils/ExtractorManager.js +156 -215
  159. package/lib/commonjs/utils/ExtractorManager.js.map +1 -1
  160. package/lib/commonjs/utils/ProviderManager.js +127 -241
  161. package/lib/commonjs/utils/ProviderManager.js.map +1 -1
  162. package/lib/commonjs/utils/constants.js +3 -9
  163. package/lib/commonjs/utils/constants.js.map +1 -1
  164. package/lib/commonjs/utils/create-extractor-context.js +29 -17
  165. package/lib/commonjs/utils/create-extractor-context.js.map +1 -1
  166. package/lib/commonjs/utils/create-provider-context.js +32 -98
  167. package/lib/commonjs/utils/create-provider-context.js.map +1 -1
  168. package/lib/commonjs/utils/extension-integrity.js +2 -2
  169. package/lib/commonjs/utils/extension-integrity.js.map +1 -1
  170. package/lib/commonjs/utils/extension-modules.js +274 -44
  171. package/lib/commonjs/utils/extension-modules.js.map +1 -1
  172. package/lib/commonjs/utils/fetch-with-timeout.js +3 -2
  173. package/lib/commonjs/utils/fetch-with-timeout.js.map +1 -1
  174. package/lib/commonjs/utils/meta-http.js +18 -28
  175. package/lib/commonjs/utils/meta-http.js.map +1 -1
  176. package/lib/commonjs/utils/registry-schema.js +50 -16
  177. package/lib/commonjs/utils/registry-schema.js.map +1 -1
  178. package/lib/commonjs/utils/registry-signature-format.js +43 -0
  179. package/lib/commonjs/utils/registry-signature-format.js.map +1 -0
  180. package/lib/commonjs/utils/registry-signature.js +27 -62
  181. package/lib/commonjs/utils/registry-signature.js.map +1 -1
  182. package/lib/commonjs/utils/runtime-modules.js +14 -0
  183. package/lib/commonjs/utils/runtime-modules.js.map +1 -0
  184. package/lib/commonjs/utils/tmdb.js +185 -0
  185. package/lib/commonjs/utils/tmdb.js.map +1 -0
  186. package/lib/commonjs/utils/url-polyfill.js +13 -59
  187. package/lib/commonjs/utils/url-polyfill.js.map +1 -1
  188. package/lib/commonjs/utils/utf8.js +52 -0
  189. package/lib/commonjs/utils/utf8.js.map +1 -0
  190. package/lib/commonjs/utils/utils.js +23 -326
  191. package/lib/commonjs/utils/utils.js.map +1 -1
  192. package/lib/module/NativeConsumet.ts +50 -52
  193. package/lib/module/extension-registry.json +48 -188
  194. package/lib/module/extension-registry.json.sig +1 -1
  195. package/lib/module/extractors/file-hosts.js +32 -0
  196. package/lib/module/extractors/file-hosts.js.map +1 -0
  197. package/lib/module/extractors/flixcloud.js +23 -57
  198. package/lib/module/extractors/flixcloud.js.map +1 -1
  199. package/lib/module/extractors/gofile.js +123 -97
  200. package/lib/module/extractors/gofile.js.map +1 -1
  201. package/lib/module/extractors/hls.js +41 -0
  202. package/lib/module/extractors/hls.js.map +1 -0
  203. package/lib/module/extractors/hubcloud.js +132 -288
  204. package/lib/module/extractors/hubcloud.js.map +1 -1
  205. package/lib/module/extractors/index.js +4 -20
  206. package/lib/module/extractors/index.js.map +1 -1
  207. package/lib/module/extractors/kwik.js +16 -49
  208. package/lib/module/extractors/kwik.js.map +1 -1
  209. package/lib/module/extractors/megacloud.js +68 -140
  210. package/lib/module/extractors/megacloud.js.map +1 -1
  211. package/lib/module/extractors/megaplay.js +78 -128
  212. package/lib/module/extractors/megaplay.js.map +1 -1
  213. package/lib/module/extractors/packer.js +36 -0
  214. package/lib/module/extractors/packer.js.map +1 -0
  215. package/lib/module/extractors/streamwish.js +47 -103
  216. package/lib/module/extractors/streamwish.js.map +1 -1
  217. package/lib/module/extractors/url.js +7 -0
  218. package/lib/module/extractors/url.js.map +1 -0
  219. package/lib/module/extractors/vidhide.js +32 -59
  220. package/lib/module/extractors/vidhide.js.map +1 -1
  221. package/lib/module/index.js +20 -49
  222. package/lib/module/index.js.map +1 -1
  223. package/lib/module/models/anime-parser.js +4 -17
  224. package/lib/module/models/anime-parser.js.map +1 -1
  225. package/lib/module/models/base-parser.js.map +1 -1
  226. package/lib/module/models/base-provider.js +6 -33
  227. package/lib/module/models/base-provider.js.map +1 -1
  228. package/lib/module/models/index.js +9 -10
  229. package/lib/module/models/index.js.map +1 -1
  230. package/lib/module/models/lightnovel-parser.js.map +1 -1
  231. package/lib/module/models/manga-parser.js.map +1 -1
  232. package/lib/module/models/meta-error.js +11 -4
  233. package/lib/module/models/meta-error.js.map +1 -1
  234. package/lib/module/models/movie-parser.js.map +1 -1
  235. package/lib/module/models/provider-error.js +49 -0
  236. package/lib/module/models/provider-error.js.map +1 -0
  237. package/lib/module/models/types.js +12 -21
  238. package/lib/module/models/types.js.map +1 -1
  239. package/lib/module/models/video-extractor.js +1 -9
  240. package/lib/module/models/video-extractor.js.map +1 -1
  241. package/lib/module/providers/anime/anikoto/anikoto.js +2 -181
  242. package/lib/module/providers/anime/anikoto/anikoto.js.map +1 -1
  243. package/lib/module/providers/anime/anikoto/create-anikoto.js +320 -436
  244. package/lib/module/providers/anime/anikoto/create-anikoto.js.map +1 -1
  245. package/lib/module/providers/anime/anikoto/hianime.js +69 -0
  246. package/lib/module/providers/anime/anikoto/hianime.js.map +1 -0
  247. package/lib/module/providers/anime/animepahe/animepahe.js +2 -66
  248. package/lib/module/providers/anime/animepahe/animepahe.js.map +1 -1
  249. package/lib/module/providers/anime/animepahe/create-animepahe.js +260 -190
  250. package/lib/module/providers/anime/animepahe/create-animepahe.js.map +1 -1
  251. package/lib/module/providers/anime/helpers.js +12 -0
  252. package/lib/module/providers/anime/helpers.js.map +1 -0
  253. package/lib/module/providers/anime/index.js +1 -13
  254. package/lib/module/providers/anime/index.js.map +1 -1
  255. package/lib/module/providers/anime/reanime/create-reanime.js +40 -60
  256. package/lib/module/providers/anime/reanime/create-reanime.js.map +1 -1
  257. package/lib/module/providers/anime/reanime/reanime.js +2 -26
  258. package/lib/module/providers/anime/reanime/reanime.js.map +1 -1
  259. package/lib/module/providers/common/concurrency.js +34 -0
  260. package/lib/module/providers/common/concurrency.js.map +1 -0
  261. package/lib/module/providers/common/enc-dec.js +5 -0
  262. package/lib/module/providers/common/enc-dec.js.map +1 -0
  263. package/lib/module/providers/common/errors.js +70 -0
  264. package/lib/module/providers/common/errors.js.map +1 -0
  265. package/lib/module/providers/common/media-status.js +17 -0
  266. package/lib/module/providers/common/media-status.js.map +1 -0
  267. package/lib/module/providers/common/search.js +11 -0
  268. package/lib/module/providers/common/search.js.map +1 -0
  269. package/lib/module/providers/common/servers.js +40 -0
  270. package/lib/module/providers/common/servers.js.map +1 -0
  271. package/lib/module/providers/common/ttl-cache.js +54 -0
  272. package/lib/module/providers/common/ttl-cache.js.map +1 -0
  273. package/lib/module/providers/index.js +5 -6
  274. package/lib/module/providers/index.js.map +1 -1
  275. package/lib/module/providers/light-novels/novelupdates.js +51 -99
  276. package/lib/module/providers/light-novels/novelupdates.js.map +1 -1
  277. package/lib/module/providers/light-novels/readlightnovels.js +52 -93
  278. package/lib/module/providers/light-novels/readlightnovels.js.map +1 -1
  279. package/lib/module/providers/manga/asurascans.js +43 -56
  280. package/lib/module/providers/manga/asurascans.js.map +1 -1
  281. package/lib/module/providers/manga/flamescans.js +12 -34
  282. package/lib/module/providers/manga/flamescans.js.map +1 -1
  283. package/lib/module/providers/manga/mangadex.js +19 -18
  284. package/lib/module/providers/manga/mangadex.js.map +1 -1
  285. package/lib/module/providers/manga/mangahere.js +108 -170
  286. package/lib/module/providers/manga/mangahere.js.map +1 -1
  287. package/lib/module/providers/manga/mangakakalot.js +27 -57
  288. package/lib/module/providers/manga/mangakakalot.js.map +1 -1
  289. package/lib/module/providers/manga/mangapill.js +83 -122
  290. package/lib/module/providers/manga/mangapill.js.map +1 -1
  291. package/lib/module/providers/manga/shared.js +63 -0
  292. package/lib/module/providers/manga/shared.js.map +1 -0
  293. package/lib/module/providers/meta/anilist-media.js +239 -0
  294. package/lib/module/providers/meta/anilist-media.js.map +1 -0
  295. package/lib/module/providers/meta/anilist.js +429 -837
  296. package/lib/module/providers/meta/anilist.js.map +1 -1
  297. package/lib/module/providers/meta/index.js +1 -1
  298. package/lib/module/providers/meta/index.js.map +1 -1
  299. package/lib/module/providers/meta/mal.js +136 -322
  300. package/lib/module/providers/meta/mal.js.map +1 -1
  301. package/lib/module/providers/meta/shared.js +124 -0
  302. package/lib/module/providers/meta/shared.js.map +1 -0
  303. package/lib/module/providers/meta/tmdb.js +251 -299
  304. package/lib/module/providers/meta/tmdb.js.map +1 -1
  305. package/lib/module/providers/movies/index.js +5 -13
  306. package/lib/module/providers/movies/index.js.map +1 -1
  307. package/lib/module/providers/movies/multimovies/create-multimovies.js +218 -409
  308. package/lib/module/providers/movies/multimovies/create-multimovies.js.map +1 -1
  309. package/lib/module/providers/movies/multimovies/multimovies.js +2 -42
  310. package/lib/module/providers/movies/multimovies/multimovies.js.map +1 -1
  311. package/lib/module/providers/movies/multistream/create-multistream.js +127 -0
  312. package/lib/module/providers/movies/multistream/create-multistream.js.map +1 -0
  313. package/lib/module/providers/movies/multistream/multistream.js +9 -0
  314. package/lib/module/providers/movies/multistream/multistream.js.map +1 -0
  315. package/lib/module/providers/movies/multistream/utils.js +325 -397
  316. package/lib/module/providers/movies/multistream/utils.js.map +1 -1
  317. package/lib/module/providers/movies/netflixmirror/create-netflixmirror.js +69 -15
  318. package/lib/module/providers/movies/netflixmirror/create-netflixmirror.js.map +1 -1
  319. package/lib/module/providers/movies/netflixmirror/netflixmirror.js +6 -14
  320. package/lib/module/providers/movies/netflixmirror/netflixmirror.js.map +1 -1
  321. package/lib/module/providers/movies/site-paths.js +28 -0
  322. package/lib/module/providers/movies/site-paths.js.map +1 -0
  323. package/lib/module/providers/movies/vegamovies/create-vegamovies.js +474 -654
  324. package/lib/module/providers/movies/vegamovies/create-vegamovies.js.map +1 -1
  325. package/lib/module/providers/movies/vegamovies/vegamovies.js +2 -44
  326. package/lib/module/providers/movies/vegamovies/vegamovies.js.map +1 -1
  327. package/lib/module/providers/provider-class.js +25 -0
  328. package/lib/module/providers/provider-class.js.map +1 -0
  329. package/lib/module/registry-signing-keys.json +6 -0
  330. package/lib/module/utils/ExtractorManager.js +155 -215
  331. package/lib/module/utils/ExtractorManager.js.map +1 -1
  332. package/lib/module/utils/ProviderManager.js +128 -241
  333. package/lib/module/utils/ProviderManager.js.map +1 -1
  334. package/lib/module/utils/constants.js +2 -8
  335. package/lib/module/utils/constants.js.map +1 -1
  336. package/lib/module/utils/create-extractor-context.js +28 -18
  337. package/lib/module/utils/create-extractor-context.js.map +1 -1
  338. package/lib/module/utils/create-provider-context.js +33 -98
  339. package/lib/module/utils/create-provider-context.js.map +1 -1
  340. package/lib/module/utils/extension-integrity.js +1 -1
  341. package/lib/module/utils/extension-integrity.js.map +1 -1
  342. package/lib/module/utils/extension-modules.js +270 -44
  343. package/lib/module/utils/extension-modules.js.map +1 -1
  344. package/lib/module/utils/fetch-with-timeout.js +3 -2
  345. package/lib/module/utils/fetch-with-timeout.js.map +1 -1
  346. package/lib/module/utils/meta-http.js +17 -26
  347. package/lib/module/utils/meta-http.js.map +1 -1
  348. package/lib/module/utils/registry-schema.js +48 -15
  349. package/lib/module/utils/registry-schema.js.map +1 -1
  350. package/lib/module/utils/registry-signature-format.js +37 -0
  351. package/lib/module/utils/registry-signature-format.js.map +1 -0
  352. package/lib/module/utils/registry-signature.js +23 -58
  353. package/lib/module/utils/registry-signature.js.map +1 -1
  354. package/lib/module/utils/runtime-modules.js +10 -0
  355. package/lib/module/utils/runtime-modules.js.map +1 -0
  356. package/lib/module/utils/tmdb.js +172 -0
  357. package/lib/module/utils/tmdb.js.map +1 -0
  358. package/lib/module/utils/url-polyfill.js +1 -47
  359. package/lib/module/utils/url-polyfill.js.map +1 -1
  360. package/lib/module/utils/utf8.js +45 -0
  361. package/lib/module/utils/utf8.js.map +1 -0
  362. package/lib/module/utils/utils.js +16 -281
  363. package/lib/module/utils/utils.js.map +1 -1
  364. package/lib/typescript/commonjs/src/NativeConsumet.d.ts +44 -79
  365. package/lib/typescript/commonjs/src/NativeConsumet.d.ts.map +1 -1
  366. package/lib/typescript/commonjs/src/extractors/file-hosts.d.ts +18 -0
  367. package/lib/typescript/commonjs/src/extractors/file-hosts.d.ts.map +1 -0
  368. package/lib/typescript/commonjs/src/extractors/flixcloud.d.ts +9 -9
  369. package/lib/typescript/commonjs/src/extractors/flixcloud.d.ts.map +1 -1
  370. package/lib/typescript/commonjs/src/extractors/gofile.d.ts +5 -6
  371. package/lib/typescript/commonjs/src/extractors/gofile.d.ts.map +1 -1
  372. package/lib/typescript/commonjs/src/extractors/hls.d.ts +14 -0
  373. package/lib/typescript/commonjs/src/extractors/hls.d.ts.map +1 -0
  374. package/lib/typescript/commonjs/src/extractors/hubcloud.d.ts +8 -4
  375. package/lib/typescript/commonjs/src/extractors/hubcloud.d.ts.map +1 -1
  376. package/lib/typescript/commonjs/src/extractors/index.d.ts +4 -20
  377. package/lib/typescript/commonjs/src/extractors/index.d.ts.map +1 -1
  378. package/lib/typescript/commonjs/src/extractors/kwik.d.ts +6 -7
  379. package/lib/typescript/commonjs/src/extractors/kwik.d.ts.map +1 -1
  380. package/lib/typescript/commonjs/src/extractors/megacloud.d.ts +7 -5
  381. package/lib/typescript/commonjs/src/extractors/megacloud.d.ts.map +1 -1
  382. package/lib/typescript/commonjs/src/extractors/megaplay.d.ts +6 -7
  383. package/lib/typescript/commonjs/src/extractors/megaplay.d.ts.map +1 -1
  384. package/lib/typescript/commonjs/src/extractors/packer.d.ts +3 -0
  385. package/lib/typescript/commonjs/src/extractors/packer.d.ts.map +1 -0
  386. package/lib/typescript/commonjs/src/extractors/streamwish.d.ts +5 -7
  387. package/lib/typescript/commonjs/src/extractors/streamwish.d.ts.map +1 -1
  388. package/lib/typescript/commonjs/src/extractors/url.d.ts +4 -0
  389. package/lib/typescript/commonjs/src/extractors/url.d.ts.map +1 -0
  390. package/lib/typescript/commonjs/src/extractors/vidhide.d.ts +5 -7
  391. package/lib/typescript/commonjs/src/extractors/vidhide.d.ts.map +1 -1
  392. package/lib/typescript/commonjs/src/index.d.ts +17 -20
  393. package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
  394. package/lib/typescript/commonjs/src/models/anime-parser.d.ts +10 -21
  395. package/lib/typescript/commonjs/src/models/anime-parser.d.ts.map +1 -1
  396. package/lib/typescript/commonjs/src/models/base-parser.d.ts +0 -5
  397. package/lib/typescript/commonjs/src/models/base-parser.d.ts.map +1 -1
  398. package/lib/typescript/commonjs/src/models/base-provider.d.ts +7 -31
  399. package/lib/typescript/commonjs/src/models/base-provider.d.ts.map +1 -1
  400. package/lib/typescript/commonjs/src/models/extension-manifest.d.ts +5 -1
  401. package/lib/typescript/commonjs/src/models/extension-manifest.d.ts.map +1 -1
  402. package/lib/typescript/commonjs/src/models/extractor-context.d.ts +5 -34
  403. package/lib/typescript/commonjs/src/models/extractor-context.d.ts.map +1 -1
  404. package/lib/typescript/commonjs/src/models/index.d.ts +13 -15
  405. package/lib/typescript/commonjs/src/models/index.d.ts.map +1 -1
  406. package/lib/typescript/commonjs/src/models/lightnovel-parser.d.ts +5 -12
  407. package/lib/typescript/commonjs/src/models/lightnovel-parser.d.ts.map +1 -1
  408. package/lib/typescript/commonjs/src/models/manga-parser.d.ts +2 -10
  409. package/lib/typescript/commonjs/src/models/manga-parser.d.ts.map +1 -1
  410. package/lib/typescript/commonjs/src/models/meta-error.d.ts +9 -3
  411. package/lib/typescript/commonjs/src/models/meta-error.d.ts.map +1 -1
  412. package/lib/typescript/commonjs/src/models/movie-parser.d.ts +8 -24
  413. package/lib/typescript/commonjs/src/models/movie-parser.d.ts.map +1 -1
  414. package/lib/typescript/commonjs/src/models/provider-context.d.ts +11 -138
  415. package/lib/typescript/commonjs/src/models/provider-context.d.ts.map +1 -1
  416. package/lib/typescript/commonjs/src/models/provider-error.d.ts +32 -0
  417. package/lib/typescript/commonjs/src/models/provider-error.d.ts.map +1 -0
  418. package/lib/typescript/commonjs/src/models/types.d.ts +43 -39
  419. package/lib/typescript/commonjs/src/models/types.d.ts.map +1 -1
  420. package/lib/typescript/commonjs/src/models/video-extractor.d.ts +7 -38
  421. package/lib/typescript/commonjs/src/models/video-extractor.d.ts.map +1 -1
  422. package/lib/typescript/commonjs/src/providers/anime/anikoto/anikoto.d.ts +4 -148
  423. package/lib/typescript/commonjs/src/providers/anime/anikoto/anikoto.d.ts.map +1 -1
  424. package/lib/typescript/commonjs/src/providers/anime/anikoto/create-anikoto.d.ts +2 -2
  425. package/lib/typescript/commonjs/src/providers/anime/anikoto/create-anikoto.d.ts.map +1 -1
  426. package/lib/typescript/commonjs/src/providers/anime/anikoto/hianime.d.ts +24 -0
  427. package/lib/typescript/commonjs/src/providers/anime/anikoto/hianime.d.ts.map +1 -0
  428. package/lib/typescript/commonjs/src/providers/anime/animepahe/animepahe.d.ts +4 -40
  429. package/lib/typescript/commonjs/src/providers/anime/animepahe/animepahe.d.ts.map +1 -1
  430. package/lib/typescript/commonjs/src/providers/anime/animepahe/create-animepahe.d.ts +4 -4
  431. package/lib/typescript/commonjs/src/providers/anime/animepahe/create-animepahe.d.ts.map +1 -1
  432. package/lib/typescript/commonjs/src/providers/anime/helpers.d.ts +6 -0
  433. package/lib/typescript/commonjs/src/providers/anime/helpers.d.ts.map +1 -0
  434. package/lib/typescript/commonjs/src/providers/anime/index.d.ts +3 -18
  435. package/lib/typescript/commonjs/src/providers/anime/index.d.ts.map +1 -1
  436. package/lib/typescript/commonjs/src/providers/anime/reanime/create-reanime.d.ts +2 -2
  437. package/lib/typescript/commonjs/src/providers/anime/reanime/create-reanime.d.ts.map +1 -1
  438. package/lib/typescript/commonjs/src/providers/anime/reanime/reanime.d.ts +4 -23
  439. package/lib/typescript/commonjs/src/providers/anime/reanime/reanime.d.ts.map +1 -1
  440. package/lib/typescript/commonjs/src/providers/common/concurrency.d.ts +8 -0
  441. package/lib/typescript/commonjs/src/providers/common/concurrency.d.ts.map +1 -0
  442. package/lib/typescript/commonjs/src/providers/common/enc-dec.d.ts +3 -0
  443. package/lib/typescript/commonjs/src/providers/common/enc-dec.d.ts.map +1 -0
  444. package/lib/typescript/commonjs/src/providers/common/errors.d.ts +36 -0
  445. package/lib/typescript/commonjs/src/providers/common/errors.d.ts.map +1 -0
  446. package/lib/typescript/commonjs/src/providers/common/media-status.d.ts +7 -0
  447. package/lib/typescript/commonjs/src/providers/common/media-status.d.ts.map +1 -0
  448. package/lib/typescript/commonjs/src/providers/common/search.d.ts +4 -0
  449. package/lib/typescript/commonjs/src/providers/common/search.d.ts.map +1 -0
  450. package/lib/typescript/commonjs/src/providers/common/servers.d.ts +17 -0
  451. package/lib/typescript/commonjs/src/providers/common/servers.d.ts.map +1 -0
  452. package/lib/typescript/commonjs/src/providers/common/ttl-cache.d.ts +21 -0
  453. package/lib/typescript/commonjs/src/providers/common/ttl-cache.d.ts.map +1 -0
  454. package/lib/typescript/commonjs/src/providers/index.d.ts +5 -6
  455. package/lib/typescript/commonjs/src/providers/index.d.ts.map +1 -1
  456. package/lib/typescript/commonjs/src/providers/light-novels/novelupdates.d.ts +11 -12
  457. package/lib/typescript/commonjs/src/providers/light-novels/novelupdates.d.ts.map +1 -1
  458. package/lib/typescript/commonjs/src/providers/light-novels/readlightnovels.d.ts +3 -11
  459. package/lib/typescript/commonjs/src/providers/light-novels/readlightnovels.d.ts.map +1 -1
  460. package/lib/typescript/commonjs/src/providers/manga/asurascans.d.ts +1 -5
  461. package/lib/typescript/commonjs/src/providers/manga/asurascans.d.ts.map +1 -1
  462. package/lib/typescript/commonjs/src/providers/manga/flamescans.d.ts +2 -4
  463. package/lib/typescript/commonjs/src/providers/manga/flamescans.d.ts.map +1 -1
  464. package/lib/typescript/commonjs/src/providers/manga/mangadex.d.ts +6 -4
  465. package/lib/typescript/commonjs/src/providers/manga/mangadex.d.ts.map +1 -1
  466. package/lib/typescript/commonjs/src/providers/manga/mangahere.d.ts +4 -4
  467. package/lib/typescript/commonjs/src/providers/manga/mangahere.d.ts.map +1 -1
  468. package/lib/typescript/commonjs/src/providers/manga/mangakakalot.d.ts +4 -13
  469. package/lib/typescript/commonjs/src/providers/manga/mangakakalot.d.ts.map +1 -1
  470. package/lib/typescript/commonjs/src/providers/manga/mangapill.d.ts +1 -8
  471. package/lib/typescript/commonjs/src/providers/manga/mangapill.d.ts.map +1 -1
  472. package/lib/typescript/commonjs/src/providers/manga/shared.d.ts +28 -0
  473. package/lib/typescript/commonjs/src/providers/manga/shared.d.ts.map +1 -0
  474. package/lib/typescript/commonjs/src/providers/meta/anilist-media.d.ts +188 -0
  475. package/lib/typescript/commonjs/src/providers/meta/anilist-media.d.ts.map +1 -0
  476. package/lib/typescript/commonjs/src/providers/meta/anilist.d.ts +90 -131
  477. package/lib/typescript/commonjs/src/providers/meta/anilist.d.ts.map +1 -1
  478. package/lib/typescript/commonjs/src/providers/meta/index.d.ts +1 -2
  479. package/lib/typescript/commonjs/src/providers/meta/index.d.ts.map +1 -1
  480. package/lib/typescript/commonjs/src/providers/meta/mal.d.ts +12 -18
  481. package/lib/typescript/commonjs/src/providers/meta/mal.d.ts.map +1 -1
  482. package/lib/typescript/commonjs/src/providers/meta/shared.d.ts +48 -0
  483. package/lib/typescript/commonjs/src/providers/meta/shared.d.ts.map +1 -0
  484. package/lib/typescript/commonjs/src/providers/meta/tmdb.d.ts +77 -26
  485. package/lib/typescript/commonjs/src/providers/meta/tmdb.d.ts.map +1 -1
  486. package/lib/typescript/commonjs/src/providers/movies/index.d.ts +8 -20
  487. package/lib/typescript/commonjs/src/providers/movies/index.d.ts.map +1 -1
  488. package/lib/typescript/commonjs/src/providers/movies/multimovies/create-multimovies.d.ts +8 -3
  489. package/lib/typescript/commonjs/src/providers/movies/multimovies/create-multimovies.d.ts.map +1 -1
  490. package/lib/typescript/commonjs/src/providers/movies/multimovies/multimovies.d.ts +4 -25
  491. package/lib/typescript/commonjs/src/providers/movies/multimovies/multimovies.d.ts.map +1 -1
  492. package/lib/typescript/commonjs/src/providers/movies/multistream/create-multistream.d.ts +26 -0
  493. package/lib/typescript/commonjs/src/providers/movies/multistream/create-multistream.d.ts.map +1 -0
  494. package/lib/typescript/commonjs/src/providers/movies/multistream/multistream.d.ts +6 -0
  495. package/lib/typescript/commonjs/src/providers/movies/multistream/multistream.d.ts.map +1 -0
  496. package/lib/typescript/commonjs/src/providers/movies/multistream/utils.d.ts +21 -19
  497. package/lib/typescript/commonjs/src/providers/movies/multistream/utils.d.ts.map +1 -1
  498. package/lib/typescript/commonjs/src/providers/movies/netflixmirror/create-netflixmirror.d.ts +40 -8
  499. package/lib/typescript/commonjs/src/providers/movies/netflixmirror/create-netflixmirror.d.ts.map +1 -1
  500. package/lib/typescript/commonjs/src/providers/movies/netflixmirror/netflixmirror.d.ts +8 -11
  501. package/lib/typescript/commonjs/src/providers/movies/netflixmirror/netflixmirror.d.ts.map +1 -1
  502. package/lib/typescript/commonjs/src/providers/movies/site-paths.d.ts +12 -0
  503. package/lib/typescript/commonjs/src/providers/movies/site-paths.d.ts.map +1 -0
  504. package/lib/typescript/commonjs/src/providers/movies/vegamovies/create-vegamovies.d.ts +9 -3
  505. package/lib/typescript/commonjs/src/providers/movies/vegamovies/create-vegamovies.d.ts.map +1 -1
  506. package/lib/typescript/commonjs/src/providers/movies/vegamovies/vegamovies.d.ts +4 -27
  507. package/lib/typescript/commonjs/src/providers/movies/vegamovies/vegamovies.d.ts.map +1 -1
  508. package/lib/typescript/commonjs/src/providers/provider-class.d.ts +23 -0
  509. package/lib/typescript/commonjs/src/providers/provider-class.d.ts.map +1 -0
  510. package/lib/typescript/commonjs/src/utils/ExtractorManager.d.ts +57 -49
  511. package/lib/typescript/commonjs/src/utils/ExtractorManager.d.ts.map +1 -1
  512. package/lib/typescript/commonjs/src/utils/ProviderManager.d.ts +50 -69
  513. package/lib/typescript/commonjs/src/utils/ProviderManager.d.ts.map +1 -1
  514. package/lib/typescript/commonjs/src/utils/constants.d.ts +2 -7
  515. package/lib/typescript/commonjs/src/utils/constants.d.ts.map +1 -1
  516. package/lib/typescript/commonjs/src/utils/create-extractor-context.d.ts +17 -5
  517. package/lib/typescript/commonjs/src/utils/create-extractor-context.d.ts.map +1 -1
  518. package/lib/typescript/commonjs/src/utils/create-provider-context.d.ts +12 -8
  519. package/lib/typescript/commonjs/src/utils/create-provider-context.d.ts.map +1 -1
  520. package/lib/typescript/commonjs/src/utils/extension-integrity.d.ts.map +1 -1
  521. package/lib/typescript/commonjs/src/utils/extension-modules.d.ts +74 -24
  522. package/lib/typescript/commonjs/src/utils/extension-modules.d.ts.map +1 -1
  523. package/lib/typescript/commonjs/src/utils/fetch-with-timeout.d.ts +1 -1
  524. package/lib/typescript/commonjs/src/utils/fetch-with-timeout.d.ts.map +1 -1
  525. package/lib/typescript/commonjs/src/utils/meta-http.d.ts +2 -13
  526. package/lib/typescript/commonjs/src/utils/meta-http.d.ts.map +1 -1
  527. package/lib/typescript/commonjs/src/utils/registry-schema.d.ts +27 -1
  528. package/lib/typescript/commonjs/src/utils/registry-schema.d.ts.map +1 -1
  529. package/lib/typescript/commonjs/src/utils/registry-signature-format.d.ts +15 -0
  530. package/lib/typescript/commonjs/src/utils/registry-signature-format.d.ts.map +1 -0
  531. package/lib/typescript/commonjs/src/utils/registry-signature.d.ts +10 -4
  532. package/lib/typescript/commonjs/src/utils/registry-signature.d.ts.map +1 -1
  533. package/lib/typescript/commonjs/src/utils/runtime-modules.d.ts +8 -0
  534. package/lib/typescript/commonjs/src/utils/runtime-modules.d.ts.map +1 -0
  535. package/lib/typescript/commonjs/src/utils/tmdb.d.ts +86 -0
  536. package/lib/typescript/commonjs/src/utils/tmdb.d.ts.map +1 -0
  537. package/lib/typescript/commonjs/src/utils/url-polyfill.d.ts.map +1 -1
  538. package/lib/typescript/commonjs/src/utils/utf8.d.ts +7 -0
  539. package/lib/typescript/commonjs/src/utils/utf8.d.ts.map +1 -0
  540. package/lib/typescript/commonjs/src/utils/utils.d.ts +12 -36
  541. package/lib/typescript/commonjs/src/utils/utils.d.ts.map +1 -1
  542. package/lib/typescript/module/src/NativeConsumet.d.ts +44 -79
  543. package/lib/typescript/module/src/NativeConsumet.d.ts.map +1 -1
  544. package/lib/typescript/module/src/extractors/file-hosts.d.ts +18 -0
  545. package/lib/typescript/module/src/extractors/file-hosts.d.ts.map +1 -0
  546. package/lib/typescript/module/src/extractors/flixcloud.d.ts +9 -9
  547. package/lib/typescript/module/src/extractors/flixcloud.d.ts.map +1 -1
  548. package/lib/typescript/module/src/extractors/gofile.d.ts +5 -6
  549. package/lib/typescript/module/src/extractors/gofile.d.ts.map +1 -1
  550. package/lib/typescript/module/src/extractors/hls.d.ts +14 -0
  551. package/lib/typescript/module/src/extractors/hls.d.ts.map +1 -0
  552. package/lib/typescript/module/src/extractors/hubcloud.d.ts +8 -4
  553. package/lib/typescript/module/src/extractors/hubcloud.d.ts.map +1 -1
  554. package/lib/typescript/module/src/extractors/index.d.ts +4 -20
  555. package/lib/typescript/module/src/extractors/index.d.ts.map +1 -1
  556. package/lib/typescript/module/src/extractors/kwik.d.ts +6 -7
  557. package/lib/typescript/module/src/extractors/kwik.d.ts.map +1 -1
  558. package/lib/typescript/module/src/extractors/megacloud.d.ts +7 -5
  559. package/lib/typescript/module/src/extractors/megacloud.d.ts.map +1 -1
  560. package/lib/typescript/module/src/extractors/megaplay.d.ts +6 -7
  561. package/lib/typescript/module/src/extractors/megaplay.d.ts.map +1 -1
  562. package/lib/typescript/module/src/extractors/packer.d.ts +3 -0
  563. package/lib/typescript/module/src/extractors/packer.d.ts.map +1 -0
  564. package/lib/typescript/module/src/extractors/streamwish.d.ts +5 -7
  565. package/lib/typescript/module/src/extractors/streamwish.d.ts.map +1 -1
  566. package/lib/typescript/module/src/extractors/url.d.ts +4 -0
  567. package/lib/typescript/module/src/extractors/url.d.ts.map +1 -0
  568. package/lib/typescript/module/src/extractors/vidhide.d.ts +5 -7
  569. package/lib/typescript/module/src/extractors/vidhide.d.ts.map +1 -1
  570. package/lib/typescript/module/src/index.d.ts +17 -20
  571. package/lib/typescript/module/src/index.d.ts.map +1 -1
  572. package/lib/typescript/module/src/models/anime-parser.d.ts +10 -21
  573. package/lib/typescript/module/src/models/anime-parser.d.ts.map +1 -1
  574. package/lib/typescript/module/src/models/base-parser.d.ts +0 -5
  575. package/lib/typescript/module/src/models/base-parser.d.ts.map +1 -1
  576. package/lib/typescript/module/src/models/base-provider.d.ts +7 -31
  577. package/lib/typescript/module/src/models/base-provider.d.ts.map +1 -1
  578. package/lib/typescript/module/src/models/extension-manifest.d.ts +5 -1
  579. package/lib/typescript/module/src/models/extension-manifest.d.ts.map +1 -1
  580. package/lib/typescript/module/src/models/extractor-context.d.ts +5 -34
  581. package/lib/typescript/module/src/models/extractor-context.d.ts.map +1 -1
  582. package/lib/typescript/module/src/models/index.d.ts +13 -15
  583. package/lib/typescript/module/src/models/index.d.ts.map +1 -1
  584. package/lib/typescript/module/src/models/lightnovel-parser.d.ts +5 -12
  585. package/lib/typescript/module/src/models/lightnovel-parser.d.ts.map +1 -1
  586. package/lib/typescript/module/src/models/manga-parser.d.ts +2 -10
  587. package/lib/typescript/module/src/models/manga-parser.d.ts.map +1 -1
  588. package/lib/typescript/module/src/models/meta-error.d.ts +9 -3
  589. package/lib/typescript/module/src/models/meta-error.d.ts.map +1 -1
  590. package/lib/typescript/module/src/models/movie-parser.d.ts +8 -24
  591. package/lib/typescript/module/src/models/movie-parser.d.ts.map +1 -1
  592. package/lib/typescript/module/src/models/provider-context.d.ts +11 -138
  593. package/lib/typescript/module/src/models/provider-context.d.ts.map +1 -1
  594. package/lib/typescript/module/src/models/provider-error.d.ts +32 -0
  595. package/lib/typescript/module/src/models/provider-error.d.ts.map +1 -0
  596. package/lib/typescript/module/src/models/types.d.ts +43 -39
  597. package/lib/typescript/module/src/models/types.d.ts.map +1 -1
  598. package/lib/typescript/module/src/models/video-extractor.d.ts +7 -38
  599. package/lib/typescript/module/src/models/video-extractor.d.ts.map +1 -1
  600. package/lib/typescript/module/src/providers/anime/anikoto/anikoto.d.ts +4 -148
  601. package/lib/typescript/module/src/providers/anime/anikoto/anikoto.d.ts.map +1 -1
  602. package/lib/typescript/module/src/providers/anime/anikoto/create-anikoto.d.ts +2 -2
  603. package/lib/typescript/module/src/providers/anime/anikoto/create-anikoto.d.ts.map +1 -1
  604. package/lib/typescript/module/src/providers/anime/anikoto/hianime.d.ts +24 -0
  605. package/lib/typescript/module/src/providers/anime/anikoto/hianime.d.ts.map +1 -0
  606. package/lib/typescript/module/src/providers/anime/animepahe/animepahe.d.ts +4 -40
  607. package/lib/typescript/module/src/providers/anime/animepahe/animepahe.d.ts.map +1 -1
  608. package/lib/typescript/module/src/providers/anime/animepahe/create-animepahe.d.ts +4 -4
  609. package/lib/typescript/module/src/providers/anime/animepahe/create-animepahe.d.ts.map +1 -1
  610. package/lib/typescript/module/src/providers/anime/helpers.d.ts +6 -0
  611. package/lib/typescript/module/src/providers/anime/helpers.d.ts.map +1 -0
  612. package/lib/typescript/module/src/providers/anime/index.d.ts +3 -18
  613. package/lib/typescript/module/src/providers/anime/index.d.ts.map +1 -1
  614. package/lib/typescript/module/src/providers/anime/reanime/create-reanime.d.ts +2 -2
  615. package/lib/typescript/module/src/providers/anime/reanime/create-reanime.d.ts.map +1 -1
  616. package/lib/typescript/module/src/providers/anime/reanime/reanime.d.ts +4 -23
  617. package/lib/typescript/module/src/providers/anime/reanime/reanime.d.ts.map +1 -1
  618. package/lib/typescript/module/src/providers/common/concurrency.d.ts +8 -0
  619. package/lib/typescript/module/src/providers/common/concurrency.d.ts.map +1 -0
  620. package/lib/typescript/module/src/providers/common/enc-dec.d.ts +3 -0
  621. package/lib/typescript/module/src/providers/common/enc-dec.d.ts.map +1 -0
  622. package/lib/typescript/module/src/providers/common/errors.d.ts +36 -0
  623. package/lib/typescript/module/src/providers/common/errors.d.ts.map +1 -0
  624. package/lib/typescript/module/src/providers/common/media-status.d.ts +7 -0
  625. package/lib/typescript/module/src/providers/common/media-status.d.ts.map +1 -0
  626. package/lib/typescript/module/src/providers/common/search.d.ts +4 -0
  627. package/lib/typescript/module/src/providers/common/search.d.ts.map +1 -0
  628. package/lib/typescript/module/src/providers/common/servers.d.ts +17 -0
  629. package/lib/typescript/module/src/providers/common/servers.d.ts.map +1 -0
  630. package/lib/typescript/module/src/providers/common/ttl-cache.d.ts +21 -0
  631. package/lib/typescript/module/src/providers/common/ttl-cache.d.ts.map +1 -0
  632. package/lib/typescript/module/src/providers/index.d.ts +5 -6
  633. package/lib/typescript/module/src/providers/index.d.ts.map +1 -1
  634. package/lib/typescript/module/src/providers/light-novels/novelupdates.d.ts +11 -12
  635. package/lib/typescript/module/src/providers/light-novels/novelupdates.d.ts.map +1 -1
  636. package/lib/typescript/module/src/providers/light-novels/readlightnovels.d.ts +3 -11
  637. package/lib/typescript/module/src/providers/light-novels/readlightnovels.d.ts.map +1 -1
  638. package/lib/typescript/module/src/providers/manga/asurascans.d.ts +1 -5
  639. package/lib/typescript/module/src/providers/manga/asurascans.d.ts.map +1 -1
  640. package/lib/typescript/module/src/providers/manga/flamescans.d.ts +2 -4
  641. package/lib/typescript/module/src/providers/manga/flamescans.d.ts.map +1 -1
  642. package/lib/typescript/module/src/providers/manga/mangadex.d.ts +6 -4
  643. package/lib/typescript/module/src/providers/manga/mangadex.d.ts.map +1 -1
  644. package/lib/typescript/module/src/providers/manga/mangahere.d.ts +4 -4
  645. package/lib/typescript/module/src/providers/manga/mangahere.d.ts.map +1 -1
  646. package/lib/typescript/module/src/providers/manga/mangakakalot.d.ts +4 -13
  647. package/lib/typescript/module/src/providers/manga/mangakakalot.d.ts.map +1 -1
  648. package/lib/typescript/module/src/providers/manga/mangapill.d.ts +1 -8
  649. package/lib/typescript/module/src/providers/manga/mangapill.d.ts.map +1 -1
  650. package/lib/typescript/module/src/providers/manga/shared.d.ts +28 -0
  651. package/lib/typescript/module/src/providers/manga/shared.d.ts.map +1 -0
  652. package/lib/typescript/module/src/providers/meta/anilist-media.d.ts +188 -0
  653. package/lib/typescript/module/src/providers/meta/anilist-media.d.ts.map +1 -0
  654. package/lib/typescript/module/src/providers/meta/anilist.d.ts +90 -131
  655. package/lib/typescript/module/src/providers/meta/anilist.d.ts.map +1 -1
  656. package/lib/typescript/module/src/providers/meta/index.d.ts +1 -2
  657. package/lib/typescript/module/src/providers/meta/index.d.ts.map +1 -1
  658. package/lib/typescript/module/src/providers/meta/mal.d.ts +12 -18
  659. package/lib/typescript/module/src/providers/meta/mal.d.ts.map +1 -1
  660. package/lib/typescript/module/src/providers/meta/shared.d.ts +48 -0
  661. package/lib/typescript/module/src/providers/meta/shared.d.ts.map +1 -0
  662. package/lib/typescript/module/src/providers/meta/tmdb.d.ts +77 -26
  663. package/lib/typescript/module/src/providers/meta/tmdb.d.ts.map +1 -1
  664. package/lib/typescript/module/src/providers/movies/index.d.ts +8 -20
  665. package/lib/typescript/module/src/providers/movies/index.d.ts.map +1 -1
  666. package/lib/typescript/module/src/providers/movies/multimovies/create-multimovies.d.ts +8 -3
  667. package/lib/typescript/module/src/providers/movies/multimovies/create-multimovies.d.ts.map +1 -1
  668. package/lib/typescript/module/src/providers/movies/multimovies/multimovies.d.ts +4 -25
  669. package/lib/typescript/module/src/providers/movies/multimovies/multimovies.d.ts.map +1 -1
  670. package/lib/typescript/module/src/providers/movies/multistream/create-multistream.d.ts +26 -0
  671. package/lib/typescript/module/src/providers/movies/multistream/create-multistream.d.ts.map +1 -0
  672. package/lib/typescript/module/src/providers/movies/multistream/multistream.d.ts +6 -0
  673. package/lib/typescript/module/src/providers/movies/multistream/multistream.d.ts.map +1 -0
  674. package/lib/typescript/module/src/providers/movies/multistream/utils.d.ts +21 -19
  675. package/lib/typescript/module/src/providers/movies/multistream/utils.d.ts.map +1 -1
  676. package/lib/typescript/module/src/providers/movies/netflixmirror/create-netflixmirror.d.ts +40 -8
  677. package/lib/typescript/module/src/providers/movies/netflixmirror/create-netflixmirror.d.ts.map +1 -1
  678. package/lib/typescript/module/src/providers/movies/netflixmirror/netflixmirror.d.ts +8 -11
  679. package/lib/typescript/module/src/providers/movies/netflixmirror/netflixmirror.d.ts.map +1 -1
  680. package/lib/typescript/module/src/providers/movies/site-paths.d.ts +12 -0
  681. package/lib/typescript/module/src/providers/movies/site-paths.d.ts.map +1 -0
  682. package/lib/typescript/module/src/providers/movies/vegamovies/create-vegamovies.d.ts +9 -3
  683. package/lib/typescript/module/src/providers/movies/vegamovies/create-vegamovies.d.ts.map +1 -1
  684. package/lib/typescript/module/src/providers/movies/vegamovies/vegamovies.d.ts +4 -27
  685. package/lib/typescript/module/src/providers/movies/vegamovies/vegamovies.d.ts.map +1 -1
  686. package/lib/typescript/module/src/providers/provider-class.d.ts +23 -0
  687. package/lib/typescript/module/src/providers/provider-class.d.ts.map +1 -0
  688. package/lib/typescript/module/src/utils/ExtractorManager.d.ts +57 -49
  689. package/lib/typescript/module/src/utils/ExtractorManager.d.ts.map +1 -1
  690. package/lib/typescript/module/src/utils/ProviderManager.d.ts +50 -69
  691. package/lib/typescript/module/src/utils/ProviderManager.d.ts.map +1 -1
  692. package/lib/typescript/module/src/utils/constants.d.ts +2 -7
  693. package/lib/typescript/module/src/utils/constants.d.ts.map +1 -1
  694. package/lib/typescript/module/src/utils/create-extractor-context.d.ts +17 -5
  695. package/lib/typescript/module/src/utils/create-extractor-context.d.ts.map +1 -1
  696. package/lib/typescript/module/src/utils/create-provider-context.d.ts +12 -8
  697. package/lib/typescript/module/src/utils/create-provider-context.d.ts.map +1 -1
  698. package/lib/typescript/module/src/utils/extension-integrity.d.ts.map +1 -1
  699. package/lib/typescript/module/src/utils/extension-modules.d.ts +74 -24
  700. package/lib/typescript/module/src/utils/extension-modules.d.ts.map +1 -1
  701. package/lib/typescript/module/src/utils/fetch-with-timeout.d.ts +1 -1
  702. package/lib/typescript/module/src/utils/fetch-with-timeout.d.ts.map +1 -1
  703. package/lib/typescript/module/src/utils/meta-http.d.ts +2 -13
  704. package/lib/typescript/module/src/utils/meta-http.d.ts.map +1 -1
  705. package/lib/typescript/module/src/utils/registry-schema.d.ts +27 -1
  706. package/lib/typescript/module/src/utils/registry-schema.d.ts.map +1 -1
  707. package/lib/typescript/module/src/utils/registry-signature-format.d.ts +15 -0
  708. package/lib/typescript/module/src/utils/registry-signature-format.d.ts.map +1 -0
  709. package/lib/typescript/module/src/utils/registry-signature.d.ts +10 -4
  710. package/lib/typescript/module/src/utils/registry-signature.d.ts.map +1 -1
  711. package/lib/typescript/module/src/utils/runtime-modules.d.ts +8 -0
  712. package/lib/typescript/module/src/utils/runtime-modules.d.ts.map +1 -0
  713. package/lib/typescript/module/src/utils/tmdb.d.ts +86 -0
  714. package/lib/typescript/module/src/utils/tmdb.d.ts.map +1 -0
  715. package/lib/typescript/module/src/utils/url-polyfill.d.ts.map +1 -1
  716. package/lib/typescript/module/src/utils/utf8.d.ts +7 -0
  717. package/lib/typescript/module/src/utils/utf8.d.ts.map +1 -0
  718. package/lib/typescript/module/src/utils/utils.d.ts +12 -36
  719. package/lib/typescript/module/src/utils/utils.d.ts.map +1 -1
  720. package/package.json +8 -10
  721. package/src/NativeConsumet.ts +50 -52
  722. package/src/extension-registry.json +48 -188
  723. package/src/extension-registry.json.sig +1 -1
  724. package/src/extractors/file-hosts.ts +29 -0
  725. package/src/extractors/flixcloud.ts +23 -53
  726. package/src/extractors/gofile.ts +140 -128
  727. package/src/extractors/hls.ts +43 -0
  728. package/src/extractors/hubcloud.ts +147 -331
  729. package/src/extractors/index.ts +4 -20
  730. package/src/extractors/kwik.ts +17 -56
  731. package/src/extractors/megacloud.ts +50 -153
  732. package/src/extractors/megaplay.ts +77 -147
  733. package/src/extractors/packer.ts +40 -0
  734. package/src/extractors/streamwish.ts +50 -122
  735. package/src/extractors/url.ts +6 -0
  736. package/src/extractors/vidhide.ts +29 -81
  737. package/src/index.tsx +51 -228
  738. package/src/models/anime-parser.ts +12 -21
  739. package/src/models/base-parser.ts +0 -5
  740. package/src/models/base-provider.ts +7 -31
  741. package/src/models/extension-manifest.ts +7 -1
  742. package/src/models/extractor-context.ts +5 -46
  743. package/src/models/index.ts +13 -119
  744. package/src/models/lightnovel-parser.ts +5 -12
  745. package/src/models/manga-parser.ts +2 -10
  746. package/src/models/meta-error.ts +12 -5
  747. package/src/models/movie-parser.ts +9 -24
  748. package/src/models/provider-context.ts +11 -149
  749. package/src/models/provider-error.ts +57 -0
  750. package/src/models/types.ts +40 -41
  751. package/src/models/video-extractor.ts +7 -43
  752. package/src/providers/anime/anikoto/anikoto.ts +5 -218
  753. package/src/providers/anime/anikoto/create-anikoto.ts +321 -510
  754. package/src/providers/anime/anikoto/hianime.ts +67 -0
  755. package/src/providers/anime/animepahe/animepahe.ts +5 -78
  756. package/src/providers/anime/animepahe/create-animepahe.ts +253 -212
  757. package/src/providers/anime/helpers.ts +9 -0
  758. package/src/providers/anime/index.ts +0 -12
  759. package/src/providers/anime/reanime/create-reanime.ts +37 -62
  760. package/src/providers/anime/reanime/reanime.ts +5 -44
  761. package/src/providers/common/concurrency.ts +32 -0
  762. package/src/providers/common/enc-dec.ts +2 -0
  763. package/src/providers/common/errors.ts +84 -0
  764. package/src/providers/common/media-status.ts +20 -0
  765. package/src/providers/common/search.ts +6 -0
  766. package/src/providers/common/servers.ts +40 -0
  767. package/src/providers/common/ttl-cache.ts +65 -0
  768. package/src/providers/index.ts +5 -7
  769. package/src/providers/light-novels/novelupdates.ts +55 -125
  770. package/src/providers/light-novels/readlightnovels.ts +81 -117
  771. package/src/providers/manga/asurascans.ts +46 -64
  772. package/src/providers/manga/flamescans.ts +11 -44
  773. package/src/providers/manga/mangadex.ts +15 -23
  774. package/src/providers/manga/mangahere.ts +112 -188
  775. package/src/providers/manga/mangakakalot.ts +25 -66
  776. package/src/providers/manga/mangapill.ts +105 -149
  777. package/src/providers/manga/shared.ts +71 -0
  778. package/src/providers/meta/anilist-media.ts +235 -0
  779. package/src/providers/meta/anilist.ts +460 -892
  780. package/src/providers/meta/index.ts +1 -1
  781. package/src/providers/meta/mal.ts +156 -416
  782. package/src/providers/meta/shared.ts +136 -0
  783. package/src/providers/meta/tmdb.ts +334 -358
  784. package/src/providers/movies/index.ts +4 -12
  785. package/src/providers/movies/multimovies/create-multimovies.ts +215 -452
  786. package/src/providers/movies/multimovies/multimovies.ts +5 -58
  787. package/src/providers/movies/multistream/create-multistream.ts +141 -0
  788. package/src/providers/movies/multistream/multistream.ts +7 -0
  789. package/src/providers/movies/multistream/utils.ts +234 -410
  790. package/src/providers/movies/netflixmirror/create-netflixmirror.ts +72 -34
  791. package/src/providers/movies/netflixmirror/netflixmirror.ts +9 -15
  792. package/src/providers/movies/site-paths.ts +25 -0
  793. package/src/providers/movies/vegamovies/create-vegamovies.ts +450 -725
  794. package/src/providers/movies/vegamovies/vegamovies.ts +5 -62
  795. package/src/providers/provider-class.ts +39 -0
  796. package/src/registry-signing-keys.json +6 -0
  797. package/src/utils/ExtractorManager.ts +177 -237
  798. package/src/utils/ProviderManager.ts +170 -278
  799. package/src/utils/constants.ts +2 -10
  800. package/src/utils/create-extractor-context.ts +36 -28
  801. package/src/utils/create-provider-context.ts +51 -121
  802. package/src/utils/extension-integrity.ts +1 -2
  803. package/src/utils/extension-modules.ts +281 -61
  804. package/src/utils/fetch-with-timeout.ts +4 -2
  805. package/src/utils/meta-http.ts +20 -27
  806. package/src/utils/registry-schema.ts +48 -15
  807. package/src/utils/registry-signature-format.ts +37 -0
  808. package/src/utils/registry-signature.ts +26 -67
  809. package/src/utils/runtime-modules.ts +7 -0
  810. package/src/utils/tmdb.ts +186 -0
  811. package/src/utils/url-polyfill.ts +2 -46
  812. package/src/utils/utf8.ts +44 -0
  813. package/src/utils/utils.ts +16 -362
  814. package/android/src/main/AndroidManifestNew.xml +0 -3
  815. package/android/src/main/java/com/consumet/DdosGuardModule.kt +0 -179
  816. package/lib/commonjs/extractors/asianload.js +0 -75
  817. package/lib/commonjs/extractors/asianload.js.map +0 -1
  818. package/lib/commonjs/extractors/filemoon.js +0 -66
  819. package/lib/commonjs/extractors/filemoon.js.map +0 -1
  820. package/lib/commonjs/extractors/gdflix.js +0 -165
  821. package/lib/commonjs/extractors/gdflix.js.map +0 -1
  822. package/lib/commonjs/extractors/gogocdn.js +0 -128
  823. package/lib/commonjs/extractors/gogocdn.js.map +0 -1
  824. package/lib/commonjs/extractors/megaup.js +0 -113
  825. package/lib/commonjs/extractors/megaup.js.map +0 -1
  826. package/lib/commonjs/extractors/mixdrop.js +0 -37
  827. package/lib/commonjs/extractors/mixdrop.js.map +0 -1
  828. package/lib/commonjs/extractors/mp4player.js +0 -57
  829. package/lib/commonjs/extractors/mp4player.js.map +0 -1
  830. package/lib/commonjs/extractors/mp4upload.js +0 -38
  831. package/lib/commonjs/extractors/mp4upload.js.map +0 -1
  832. package/lib/commonjs/extractors/rapidcloud.js +0 -180
  833. package/lib/commonjs/extractors/rapidcloud.js.map +0 -1
  834. package/lib/commonjs/extractors/streamhub.js +0 -61
  835. package/lib/commonjs/extractors/streamhub.js.map +0 -1
  836. package/lib/commonjs/extractors/streamlare.js +0 -55
  837. package/lib/commonjs/extractors/streamlare.js.map +0 -1
  838. package/lib/commonjs/extractors/streamsb.js +0 -69
  839. package/lib/commonjs/extractors/streamsb.js.map +0 -1
  840. package/lib/commonjs/extractors/streamtape.js +0 -42
  841. package/lib/commonjs/extractors/streamtape.js.map +0 -1
  842. package/lib/commonjs/extractors/vidmoly.js +0 -54
  843. package/lib/commonjs/extractors/vidmoly.js.map +0 -1
  844. package/lib/commonjs/extractors/vizcloud.js +0 -67
  845. package/lib/commonjs/extractors/vizcloud.js.map +0 -1
  846. package/lib/commonjs/extractors/voe.js +0 -100
  847. package/lib/commonjs/extractors/voe.js.map +0 -1
  848. package/lib/commonjs/models/base-types.js +0 -2
  849. package/lib/commonjs/models/base-types.js.map +0 -1
  850. package/lib/commonjs/providers/anime/animekai/animekai.js +0 -118
  851. package/lib/commonjs/providers/anime/animekai/animekai.js.map +0 -1
  852. package/lib/commonjs/providers/anime/animekai/create-animekai.js +0 -518
  853. package/lib/commonjs/providers/anime/animekai/create-animekai.js.map +0 -1
  854. package/lib/commonjs/providers/anime/animeunity.js +0 -187
  855. package/lib/commonjs/providers/anime/animeunity.js.map +0 -1
  856. package/lib/commonjs/providers/anime/anineko/anineko.js +0 -41
  857. package/lib/commonjs/providers/anime/anineko/anineko.js.map +0 -1
  858. package/lib/commonjs/providers/anime/anineko/create-anineko.js +0 -449
  859. package/lib/commonjs/providers/anime/anineko/create-anineko.js.map +0 -1
  860. package/lib/commonjs/providers/anime/zoro/create-zoro.js +0 -586
  861. package/lib/commonjs/providers/anime/zoro/create-zoro.js.map +0 -1
  862. package/lib/commonjs/providers/anime/zoro/zoro.js +0 -193
  863. package/lib/commonjs/providers/anime/zoro/zoro.js.map +0 -1
  864. package/lib/commonjs/providers/meta/tmdb-api-key.js +0 -29
  865. package/lib/commonjs/providers/meta/tmdb-api-key.js.map +0 -1
  866. package/lib/commonjs/providers/movies/himovies/create-himovies.js +0 -436
  867. package/lib/commonjs/providers/movies/himovies/create-himovies.js.map +0 -1
  868. package/lib/commonjs/providers/movies/himovies/himovies.js +0 -79
  869. package/lib/commonjs/providers/movies/himovies/himovies.js.map +0 -1
  870. package/lib/commonjs/providers/movies/multistream/index.js +0 -222
  871. package/lib/commonjs/providers/movies/multistream/index.js.map +0 -1
  872. package/lib/commonjs/providers/movies/netflixmirror/disneymirror.js +0 -22
  873. package/lib/commonjs/providers/movies/netflixmirror/disneymirror.js.map +0 -1
  874. package/lib/commonjs/providers/movies/netflixmirror/netmirror-parser.js +0 -30
  875. package/lib/commonjs/providers/movies/netflixmirror/netmirror-parser.js.map +0 -1
  876. package/lib/commonjs/providers/movies/netflixmirror/primemirror.js +0 -22
  877. package/lib/commonjs/providers/movies/netflixmirror/primemirror.js.map +0 -1
  878. package/lib/commonjs/providers/movies/yflix/create-yflix.js +0 -418
  879. package/lib/commonjs/providers/movies/yflix/create-yflix.js.map +0 -1
  880. package/lib/commonjs/providers/movies/yflix/yflix.js +0 -66
  881. package/lib/commonjs/providers/movies/yflix/yflix.js.map +0 -1
  882. package/lib/commonjs/providers/provider-args.js +0 -17
  883. package/lib/commonjs/providers/provider-args.js.map +0 -1
  884. package/lib/commonjs/registry-signing-keys.js +0 -26
  885. package/lib/commonjs/registry-signing-keys.js.map +0 -1
  886. package/lib/commonjs/utils/extension-utils.js +0 -105
  887. package/lib/commonjs/utils/extension-utils.js.map +0 -1
  888. package/lib/commonjs/utils/index.js +0 -312
  889. package/lib/commonjs/utils/index.js.map +0 -1
  890. package/lib/commonjs/utils/provider-maps.js +0 -69
  891. package/lib/commonjs/utils/provider-maps.js.map +0 -1
  892. package/lib/commonjs/utils/queries.js +0 -45
  893. package/lib/commonjs/utils/queries.js.map +0 -1
  894. package/lib/module/extractors/asianload.js +0 -69
  895. package/lib/module/extractors/asianload.js.map +0 -1
  896. package/lib/module/extractors/filemoon.js +0 -62
  897. package/lib/module/extractors/filemoon.js.map +0 -1
  898. package/lib/module/extractors/gdflix.js +0 -161
  899. package/lib/module/extractors/gdflix.js.map +0 -1
  900. package/lib/module/extractors/gogocdn.js +0 -122
  901. package/lib/module/extractors/gogocdn.js.map +0 -1
  902. package/lib/module/extractors/megaup.js +0 -109
  903. package/lib/module/extractors/megaup.js.map +0 -1
  904. package/lib/module/extractors/mixdrop.js +0 -32
  905. package/lib/module/extractors/mixdrop.js.map +0 -1
  906. package/lib/module/extractors/mp4player.js +0 -52
  907. package/lib/module/extractors/mp4player.js.map +0 -1
  908. package/lib/module/extractors/mp4upload.js +0 -33
  909. package/lib/module/extractors/mp4upload.js.map +0 -1
  910. package/lib/module/extractors/rapidcloud.js +0 -174
  911. package/lib/module/extractors/rapidcloud.js.map +0 -1
  912. package/lib/module/extractors/streamhub.js +0 -56
  913. package/lib/module/extractors/streamhub.js.map +0 -1
  914. package/lib/module/extractors/streamlare.js +0 -50
  915. package/lib/module/extractors/streamlare.js.map +0 -1
  916. package/lib/module/extractors/streamsb.js +0 -64
  917. package/lib/module/extractors/streamsb.js.map +0 -1
  918. package/lib/module/extractors/streamtape.js +0 -37
  919. package/lib/module/extractors/streamtape.js.map +0 -1
  920. package/lib/module/extractors/vidmoly.js +0 -49
  921. package/lib/module/extractors/vidmoly.js.map +0 -1
  922. package/lib/module/extractors/vizcloud.js +0 -62
  923. package/lib/module/extractors/vizcloud.js.map +0 -1
  924. package/lib/module/extractors/voe.js +0 -95
  925. package/lib/module/extractors/voe.js.map +0 -1
  926. package/lib/module/models/base-types.js +0 -2
  927. package/lib/module/models/base-types.js.map +0 -1
  928. package/lib/module/providers/anime/animekai/animekai.js +0 -113
  929. package/lib/module/providers/anime/animekai/animekai.js.map +0 -1
  930. package/lib/module/providers/anime/animekai/create-animekai.js +0 -514
  931. package/lib/module/providers/anime/animekai/create-animekai.js.map +0 -1
  932. package/lib/module/providers/anime/animeunity.js +0 -183
  933. package/lib/module/providers/anime/animeunity.js.map +0 -1
  934. package/lib/module/providers/anime/anineko/anineko.js +0 -36
  935. package/lib/module/providers/anime/anineko/anineko.js.map +0 -1
  936. package/lib/module/providers/anime/anineko/create-anineko.js +0 -445
  937. package/lib/module/providers/anime/anineko/create-anineko.js.map +0 -1
  938. package/lib/module/providers/anime/zoro/create-zoro.js +0 -582
  939. package/lib/module/providers/anime/zoro/create-zoro.js.map +0 -1
  940. package/lib/module/providers/anime/zoro/zoro.js +0 -189
  941. package/lib/module/providers/anime/zoro/zoro.js.map +0 -1
  942. package/lib/module/providers/meta/tmdb-api-key.js +0 -24
  943. package/lib/module/providers/meta/tmdb-api-key.js.map +0 -1
  944. package/lib/module/providers/movies/himovies/create-himovies.js +0 -432
  945. package/lib/module/providers/movies/himovies/create-himovies.js.map +0 -1
  946. package/lib/module/providers/movies/himovies/himovies.js +0 -75
  947. package/lib/module/providers/movies/himovies/himovies.js.map +0 -1
  948. package/lib/module/providers/movies/multistream/index.js +0 -217
  949. package/lib/module/providers/movies/multistream/index.js.map +0 -1
  950. package/lib/module/providers/movies/netflixmirror/disneymirror.js +0 -17
  951. package/lib/module/providers/movies/netflixmirror/disneymirror.js.map +0 -1
  952. package/lib/module/providers/movies/netflixmirror/netmirror-parser.js +0 -25
  953. package/lib/module/providers/movies/netflixmirror/netmirror-parser.js.map +0 -1
  954. package/lib/module/providers/movies/netflixmirror/primemirror.js +0 -17
  955. package/lib/module/providers/movies/netflixmirror/primemirror.js.map +0 -1
  956. package/lib/module/providers/movies/yflix/create-yflix.js +0 -414
  957. package/lib/module/providers/movies/yflix/create-yflix.js.map +0 -1
  958. package/lib/module/providers/movies/yflix/yflix.js +0 -61
  959. package/lib/module/providers/movies/yflix/yflix.js.map +0 -1
  960. package/lib/module/providers/provider-args.js +0 -14
  961. package/lib/module/providers/provider-args.js.map +0 -1
  962. package/lib/module/registry-signing-keys.js +0 -22
  963. package/lib/module/registry-signing-keys.js.map +0 -1
  964. package/lib/module/utils/extension-utils.js +0 -100
  965. package/lib/module/utils/extension-utils.js.map +0 -1
  966. package/lib/module/utils/index.js +0 -21
  967. package/lib/module/utils/index.js.map +0 -1
  968. package/lib/module/utils/provider-maps.js +0 -65
  969. package/lib/module/utils/provider-maps.js.map +0 -1
  970. package/lib/module/utils/queries.js +0 -29
  971. package/lib/module/utils/queries.js.map +0 -1
  972. package/lib/typescript/commonjs/src/extractors/asianload.d.ts +0 -17
  973. package/lib/typescript/commonjs/src/extractors/asianload.d.ts.map +0 -1
  974. package/lib/typescript/commonjs/src/extractors/filemoon.d.ts +0 -14
  975. package/lib/typescript/commonjs/src/extractors/filemoon.d.ts.map +0 -1
  976. package/lib/typescript/commonjs/src/extractors/gdflix.d.ts +0 -7
  977. package/lib/typescript/commonjs/src/extractors/gdflix.d.ts.map +0 -1
  978. package/lib/typescript/commonjs/src/extractors/gogocdn.d.ts +0 -19
  979. package/lib/typescript/commonjs/src/extractors/gogocdn.d.ts.map +0 -1
  980. package/lib/typescript/commonjs/src/extractors/megaup.d.ts +0 -6
  981. package/lib/typescript/commonjs/src/extractors/megaup.d.ts.map +0 -1
  982. package/lib/typescript/commonjs/src/extractors/mixdrop.d.ts +0 -10
  983. package/lib/typescript/commonjs/src/extractors/mixdrop.d.ts.map +0 -1
  984. package/lib/typescript/commonjs/src/extractors/mp4player.d.ts +0 -15
  985. package/lib/typescript/commonjs/src/extractors/mp4player.d.ts.map +0 -1
  986. package/lib/typescript/commonjs/src/extractors/mp4upload.d.ts +0 -10
  987. package/lib/typescript/commonjs/src/extractors/mp4upload.d.ts.map +0 -1
  988. package/lib/typescript/commonjs/src/extractors/rapidcloud.d.ts +0 -17
  989. package/lib/typescript/commonjs/src/extractors/rapidcloud.d.ts.map +0 -1
  990. package/lib/typescript/commonjs/src/extractors/streamhub.d.ts +0 -14
  991. package/lib/typescript/commonjs/src/extractors/streamhub.d.ts.map +0 -1
  992. package/lib/typescript/commonjs/src/extractors/streamlare.d.ts +0 -13
  993. package/lib/typescript/commonjs/src/extractors/streamlare.d.ts.map +0 -1
  994. package/lib/typescript/commonjs/src/extractors/streamsb.d.ts +0 -14
  995. package/lib/typescript/commonjs/src/extractors/streamsb.d.ts.map +0 -1
  996. package/lib/typescript/commonjs/src/extractors/streamtape.d.ts +0 -10
  997. package/lib/typescript/commonjs/src/extractors/streamtape.d.ts.map +0 -1
  998. package/lib/typescript/commonjs/src/extractors/vidmoly.d.ts +0 -10
  999. package/lib/typescript/commonjs/src/extractors/vidmoly.d.ts.map +0 -1
  1000. package/lib/typescript/commonjs/src/extractors/vizcloud.d.ts +0 -12
  1001. package/lib/typescript/commonjs/src/extractors/vizcloud.d.ts.map +0 -1
  1002. package/lib/typescript/commonjs/src/extractors/voe.d.ts +0 -15
  1003. package/lib/typescript/commonjs/src/extractors/voe.d.ts.map +0 -1
  1004. package/lib/typescript/commonjs/src/models/base-types.d.ts +0 -23
  1005. package/lib/typescript/commonjs/src/models/base-types.d.ts.map +0 -1
  1006. package/lib/typescript/commonjs/src/providers/anime/animekai/animekai.d.ts +0 -90
  1007. package/lib/typescript/commonjs/src/providers/anime/animekai/animekai.d.ts.map +0 -1
  1008. package/lib/typescript/commonjs/src/providers/anime/animekai/create-animekai.d.ts +0 -32
  1009. package/lib/typescript/commonjs/src/providers/anime/animekai/create-animekai.d.ts.map +0 -1
  1010. package/lib/typescript/commonjs/src/providers/anime/animeunity.d.ts +0 -39
  1011. package/lib/typescript/commonjs/src/providers/anime/animeunity.d.ts.map +0 -1
  1012. package/lib/typescript/commonjs/src/providers/anime/anineko/anineko.d.ts +0 -28
  1013. package/lib/typescript/commonjs/src/providers/anime/anineko/anineko.d.ts.map +0 -1
  1014. package/lib/typescript/commonjs/src/providers/anime/anineko/create-anineko.d.ts +0 -52
  1015. package/lib/typescript/commonjs/src/providers/anime/anineko/create-anineko.d.ts.map +0 -1
  1016. package/lib/typescript/commonjs/src/providers/anime/zoro/create-zoro.d.ts +0 -49
  1017. package/lib/typescript/commonjs/src/providers/anime/zoro/create-zoro.d.ts.map +0 -1
  1018. package/lib/typescript/commonjs/src/providers/anime/zoro/zoro.d.ts +0 -139
  1019. package/lib/typescript/commonjs/src/providers/anime/zoro/zoro.d.ts.map +0 -1
  1020. package/lib/typescript/commonjs/src/providers/meta/tmdb-api-key.d.ts +0 -7
  1021. package/lib/typescript/commonjs/src/providers/meta/tmdb-api-key.d.ts.map +0 -1
  1022. package/lib/typescript/commonjs/src/providers/movies/himovies/create-himovies.d.ts +0 -24
  1023. package/lib/typescript/commonjs/src/providers/movies/himovies/create-himovies.d.ts.map +0 -1
  1024. package/lib/typescript/commonjs/src/providers/movies/himovies/himovies.d.ts +0 -50
  1025. package/lib/typescript/commonjs/src/providers/movies/himovies/himovies.d.ts.map +0 -1
  1026. package/lib/typescript/commonjs/src/providers/movies/multistream/index.d.ts +0 -44
  1027. package/lib/typescript/commonjs/src/providers/movies/multistream/index.d.ts.map +0 -1
  1028. package/lib/typescript/commonjs/src/providers/movies/netflixmirror/disneymirror.d.ts +0 -12
  1029. package/lib/typescript/commonjs/src/providers/movies/netflixmirror/disneymirror.d.ts.map +0 -1
  1030. package/lib/typescript/commonjs/src/providers/movies/netflixmirror/netmirror-parser.d.ts +0 -21
  1031. package/lib/typescript/commonjs/src/providers/movies/netflixmirror/netmirror-parser.d.ts.map +0 -1
  1032. package/lib/typescript/commonjs/src/providers/movies/netflixmirror/primemirror.d.ts +0 -12
  1033. package/lib/typescript/commonjs/src/providers/movies/netflixmirror/primemirror.d.ts.map +0 -1
  1034. package/lib/typescript/commonjs/src/providers/movies/yflix/create-yflix.d.ts +0 -25
  1035. package/lib/typescript/commonjs/src/providers/movies/yflix/create-yflix.d.ts.map +0 -1
  1036. package/lib/typescript/commonjs/src/providers/movies/yflix/yflix.d.ts +0 -49
  1037. package/lib/typescript/commonjs/src/providers/movies/yflix/yflix.d.ts.map +0 -1
  1038. package/lib/typescript/commonjs/src/providers/provider-args.d.ts +0 -8
  1039. package/lib/typescript/commonjs/src/providers/provider-args.d.ts.map +0 -1
  1040. package/lib/typescript/commonjs/src/registry-signing-keys.d.ts +0 -18
  1041. package/lib/typescript/commonjs/src/registry-signing-keys.d.ts.map +0 -1
  1042. package/lib/typescript/commonjs/src/utils/extension-utils.d.ts +0 -31
  1043. package/lib/typescript/commonjs/src/utils/extension-utils.d.ts.map +0 -1
  1044. package/lib/typescript/commonjs/src/utils/index.d.ts +0 -19
  1045. package/lib/typescript/commonjs/src/utils/index.d.ts.map +0 -1
  1046. package/lib/typescript/commonjs/src/utils/provider-maps.d.ts +0 -39
  1047. package/lib/typescript/commonjs/src/utils/provider-maps.d.ts.map +0 -1
  1048. package/lib/typescript/commonjs/src/utils/queries.d.ts +0 -22
  1049. package/lib/typescript/commonjs/src/utils/queries.d.ts.map +0 -1
  1050. package/lib/typescript/module/src/extractors/asianload.d.ts +0 -17
  1051. package/lib/typescript/module/src/extractors/asianload.d.ts.map +0 -1
  1052. package/lib/typescript/module/src/extractors/filemoon.d.ts +0 -14
  1053. package/lib/typescript/module/src/extractors/filemoon.d.ts.map +0 -1
  1054. package/lib/typescript/module/src/extractors/gdflix.d.ts +0 -7
  1055. package/lib/typescript/module/src/extractors/gdflix.d.ts.map +0 -1
  1056. package/lib/typescript/module/src/extractors/gogocdn.d.ts +0 -19
  1057. package/lib/typescript/module/src/extractors/gogocdn.d.ts.map +0 -1
  1058. package/lib/typescript/module/src/extractors/megaup.d.ts +0 -6
  1059. package/lib/typescript/module/src/extractors/megaup.d.ts.map +0 -1
  1060. package/lib/typescript/module/src/extractors/mixdrop.d.ts +0 -10
  1061. package/lib/typescript/module/src/extractors/mixdrop.d.ts.map +0 -1
  1062. package/lib/typescript/module/src/extractors/mp4player.d.ts +0 -15
  1063. package/lib/typescript/module/src/extractors/mp4player.d.ts.map +0 -1
  1064. package/lib/typescript/module/src/extractors/mp4upload.d.ts +0 -10
  1065. package/lib/typescript/module/src/extractors/mp4upload.d.ts.map +0 -1
  1066. package/lib/typescript/module/src/extractors/rapidcloud.d.ts +0 -17
  1067. package/lib/typescript/module/src/extractors/rapidcloud.d.ts.map +0 -1
  1068. package/lib/typescript/module/src/extractors/streamhub.d.ts +0 -14
  1069. package/lib/typescript/module/src/extractors/streamhub.d.ts.map +0 -1
  1070. package/lib/typescript/module/src/extractors/streamlare.d.ts +0 -13
  1071. package/lib/typescript/module/src/extractors/streamlare.d.ts.map +0 -1
  1072. package/lib/typescript/module/src/extractors/streamsb.d.ts +0 -14
  1073. package/lib/typescript/module/src/extractors/streamsb.d.ts.map +0 -1
  1074. package/lib/typescript/module/src/extractors/streamtape.d.ts +0 -10
  1075. package/lib/typescript/module/src/extractors/streamtape.d.ts.map +0 -1
  1076. package/lib/typescript/module/src/extractors/vidmoly.d.ts +0 -10
  1077. package/lib/typescript/module/src/extractors/vidmoly.d.ts.map +0 -1
  1078. package/lib/typescript/module/src/extractors/vizcloud.d.ts +0 -12
  1079. package/lib/typescript/module/src/extractors/vizcloud.d.ts.map +0 -1
  1080. package/lib/typescript/module/src/extractors/voe.d.ts +0 -15
  1081. package/lib/typescript/module/src/extractors/voe.d.ts.map +0 -1
  1082. package/lib/typescript/module/src/models/base-types.d.ts +0 -23
  1083. package/lib/typescript/module/src/models/base-types.d.ts.map +0 -1
  1084. package/lib/typescript/module/src/providers/anime/animekai/animekai.d.ts +0 -90
  1085. package/lib/typescript/module/src/providers/anime/animekai/animekai.d.ts.map +0 -1
  1086. package/lib/typescript/module/src/providers/anime/animekai/create-animekai.d.ts +0 -32
  1087. package/lib/typescript/module/src/providers/anime/animekai/create-animekai.d.ts.map +0 -1
  1088. package/lib/typescript/module/src/providers/anime/animeunity.d.ts +0 -39
  1089. package/lib/typescript/module/src/providers/anime/animeunity.d.ts.map +0 -1
  1090. package/lib/typescript/module/src/providers/anime/anineko/anineko.d.ts +0 -28
  1091. package/lib/typescript/module/src/providers/anime/anineko/anineko.d.ts.map +0 -1
  1092. package/lib/typescript/module/src/providers/anime/anineko/create-anineko.d.ts +0 -52
  1093. package/lib/typescript/module/src/providers/anime/anineko/create-anineko.d.ts.map +0 -1
  1094. package/lib/typescript/module/src/providers/anime/zoro/create-zoro.d.ts +0 -49
  1095. package/lib/typescript/module/src/providers/anime/zoro/create-zoro.d.ts.map +0 -1
  1096. package/lib/typescript/module/src/providers/anime/zoro/zoro.d.ts +0 -139
  1097. package/lib/typescript/module/src/providers/anime/zoro/zoro.d.ts.map +0 -1
  1098. package/lib/typescript/module/src/providers/meta/tmdb-api-key.d.ts +0 -7
  1099. package/lib/typescript/module/src/providers/meta/tmdb-api-key.d.ts.map +0 -1
  1100. package/lib/typescript/module/src/providers/movies/himovies/create-himovies.d.ts +0 -24
  1101. package/lib/typescript/module/src/providers/movies/himovies/create-himovies.d.ts.map +0 -1
  1102. package/lib/typescript/module/src/providers/movies/himovies/himovies.d.ts +0 -50
  1103. package/lib/typescript/module/src/providers/movies/himovies/himovies.d.ts.map +0 -1
  1104. package/lib/typescript/module/src/providers/movies/multistream/index.d.ts +0 -44
  1105. package/lib/typescript/module/src/providers/movies/multistream/index.d.ts.map +0 -1
  1106. package/lib/typescript/module/src/providers/movies/netflixmirror/disneymirror.d.ts +0 -12
  1107. package/lib/typescript/module/src/providers/movies/netflixmirror/disneymirror.d.ts.map +0 -1
  1108. package/lib/typescript/module/src/providers/movies/netflixmirror/netmirror-parser.d.ts +0 -21
  1109. package/lib/typescript/module/src/providers/movies/netflixmirror/netmirror-parser.d.ts.map +0 -1
  1110. package/lib/typescript/module/src/providers/movies/netflixmirror/primemirror.d.ts +0 -12
  1111. package/lib/typescript/module/src/providers/movies/netflixmirror/primemirror.d.ts.map +0 -1
  1112. package/lib/typescript/module/src/providers/movies/yflix/create-yflix.d.ts +0 -25
  1113. package/lib/typescript/module/src/providers/movies/yflix/create-yflix.d.ts.map +0 -1
  1114. package/lib/typescript/module/src/providers/movies/yflix/yflix.d.ts +0 -49
  1115. package/lib/typescript/module/src/providers/movies/yflix/yflix.d.ts.map +0 -1
  1116. package/lib/typescript/module/src/providers/provider-args.d.ts +0 -8
  1117. package/lib/typescript/module/src/providers/provider-args.d.ts.map +0 -1
  1118. package/lib/typescript/module/src/registry-signing-keys.d.ts +0 -18
  1119. package/lib/typescript/module/src/registry-signing-keys.d.ts.map +0 -1
  1120. package/lib/typescript/module/src/utils/extension-utils.d.ts +0 -31
  1121. package/lib/typescript/module/src/utils/extension-utils.d.ts.map +0 -1
  1122. package/lib/typescript/module/src/utils/index.d.ts +0 -19
  1123. package/lib/typescript/module/src/utils/index.d.ts.map +0 -1
  1124. package/lib/typescript/module/src/utils/provider-maps.d.ts +0 -39
  1125. package/lib/typescript/module/src/utils/provider-maps.d.ts.map +0 -1
  1126. package/lib/typescript/module/src/utils/queries.d.ts +0 -22
  1127. package/lib/typescript/module/src/utils/queries.d.ts.map +0 -1
  1128. package/src/extractors/asianload.ts +0 -89
  1129. package/src/extractors/filemoon.ts +0 -60
  1130. package/src/extractors/gdflix.ts +0 -165
  1131. package/src/extractors/gogocdn.ts +0 -155
  1132. package/src/extractors/megaup.ts +0 -125
  1133. package/src/extractors/mixdrop.ts +0 -35
  1134. package/src/extractors/mp4player.ts +0 -57
  1135. package/src/extractors/mp4upload.ts +0 -35
  1136. package/src/extractors/rapidcloud.ts +0 -200
  1137. package/src/extractors/streamhub.ts +0 -62
  1138. package/src/extractors/streamlare.ts +0 -65
  1139. package/src/extractors/streamsb.ts +0 -77
  1140. package/src/extractors/streamtape.ts +0 -42
  1141. package/src/extractors/vidmoly.ts +0 -52
  1142. package/src/extractors/vizcloud.ts +0 -70
  1143. package/src/extractors/voe.ts +0 -107
  1144. package/src/models/base-types.ts +0 -23
  1145. package/src/providers/anime/animekai/animekai.ts +0 -126
  1146. package/src/providers/anime/animekai/create-animekai.ts +0 -589
  1147. package/src/providers/anime/animeunity.ts +0 -226
  1148. package/src/providers/anime/anineko/anineko.ts +0 -54
  1149. package/src/providers/anime/anineko/create-anineko.ts +0 -490
  1150. package/src/providers/anime/zoro/create-zoro.ts +0 -645
  1151. package/src/providers/anime/zoro/zoro.ts +0 -201
  1152. package/src/providers/meta/tmdb-api-key.ts +0 -27
  1153. package/src/providers/movies/himovies/create-himovies.ts +0 -518
  1154. package/src/providers/movies/himovies/himovies.ts +0 -89
  1155. package/src/providers/movies/multistream/index.ts +0 -244
  1156. package/src/providers/movies/netflixmirror/disneymirror.ts +0 -16
  1157. package/src/providers/movies/netflixmirror/netmirror-parser.ts +0 -43
  1158. package/src/providers/movies/netflixmirror/primemirror.ts +0 -16
  1159. package/src/providers/movies/yflix/create-yflix.ts +0 -496
  1160. package/src/providers/movies/yflix/yflix.ts +0 -85
  1161. package/src/providers/provider-args.ts +0 -15
  1162. package/src/registry-signing-keys.ts +0 -20
  1163. package/src/utils/extension-utils.ts +0 -130
  1164. package/src/utils/index.ts +0 -96
  1165. package/src/utils/provider-maps.ts +0 -80
  1166. package/src/utils/queries.ts +0 -37
@@ -1,40 +1,48 @@
1
- import { load } from 'cheerio';
1
+ import axios, { type AxiosInstance } from 'axios';
2
+ import { load, type CheerioAPI } from 'cheerio';
2
3
  import CryptoJS from 'crypto-js';
3
4
  import type { ExtractorContext } from '../models';
4
- import { defaultAxios } from './extension-utils';
5
+ import * as BundledExtractors from '../extractors';
6
+ import { nativeMethods } from '../NativeConsumet';
7
+ import { USER_AGENT } from './constants';
5
8
  import { PolyURL, PolyURLSearchParams } from './url-polyfill';
6
- import type { ExtractorContextConfig } from '../models/extractor-context';
7
- import {
8
- bypassDdosGuard,
9
- getDdosGuardCookiesWithWebView,
10
- makeGetRequestWithWebView,
11
- makePostRequestWithWebView,
12
- makePostRequest,
13
- deobfuscateScript,
14
- } from '../NativeConsumet';
15
9
 
16
- /**
17
- * Create extractor context for context-aware extractors
18
- */
10
+ export interface ExtractorContextConfig {
11
+ /** HTTP client for every request; defaults to `defaultAxios` */
12
+ axios?: AxiosInstance;
13
+ /** Defaults to cheerio's `load` */
14
+ load?: (html: string) => CheerioAPI;
15
+ /** `USER_AGENT` of the context; defaults to the library's. Doesn't change the headers of `axios`. */
16
+ userAgent?: string;
17
+ }
18
+
19
+ /** The HTTP client contexts use unless the app passes its own: a 15 s timeout and browser-like headers. */
20
+ export const defaultAxios = axios.create({
21
+ timeout: 15000,
22
+ headers: {
23
+ 'User-Agent': USER_AGENT,
24
+ 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8',
25
+ 'Accept-Language': 'en-US,en;q=0.5',
26
+ 'Accept-Encoding': 'gzip, deflate',
27
+ 'Cache-Control': 'no-cache',
28
+ 'Pragma': 'no-cache',
29
+ },
30
+ });
31
+
19
32
  export function createExtractorContext(config: ExtractorContextConfig = {}): ExtractorContext {
20
33
  return {
21
34
  axios: config.axios || defaultAxios,
22
35
  load: config.load || load,
23
36
  CryptoJS,
24
- USER_AGENT:
25
- config.userAgent ||
26
- 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36',
27
- PolyURL: PolyURL,
28
- PolyURLSearchParams: PolyURLSearchParams,
29
- NativeConsumet: {
30
- getDdosGuardCookiesWithWebView,
31
- makeGetRequestWithWebView,
32
- makePostRequestWithWebView,
33
- makePostRequest,
34
- bypassDdosGuard,
35
- deobfuscateScript,
36
- },
37
+ USER_AGENT: config.userAgent || USER_AGENT,
38
+ PolyURL,
39
+ PolyURLSearchParams,
40
+ NativeConsumet: nativeMethods,
37
41
  };
38
42
  }
39
43
 
40
- export default createExtractorContext;
44
+ /** The extractors the library bundles, by name. */
45
+ export const defaultExtractors: typeof BundledExtractors = { ...BundledExtractors };
46
+
47
+ /** `createExtractorContext()`: the library's axios, cheerio and user agent. */
48
+ export const defaultExtractorContext: ExtractorContext = createExtractorContext();
@@ -1,139 +1,69 @@
1
- import { load } from 'cheerio';
2
- import CryptoJS from 'crypto-js';
3
- import type { ProviderContext, ProviderContextConfig } from '../models/provider-context';
4
- import type { ExtractorContext, IVideoExtractor } from '../models';
5
1
  import {
6
2
  AnimeParser,
7
3
  MovieParser,
8
4
  MangaParser,
9
- StreamingServers,
10
- MediaFormat,
11
- MediaStatus,
12
- SubOrDub,
13
- WatchListType,
14
- TvType,
15
- Genres,
16
- Topics,
5
+ extensionEnums,
6
+ type ExtractorFactory,
7
+ type ProviderContext,
17
8
  } from '../models';
9
+ import { createExtractorContext, defaultExtractors, type ExtractorContextConfig } from './create-extractor-context';
10
+ import type { ExtractorManager } from './ExtractorManager';
18
11
 
19
- import { defaultAxios, defaultExtractors } from './extension-utils';
20
- import { PolyURL, PolyURLSearchParams } from './url-polyfill';
21
- import {
22
- getDdosGuardCookiesWithWebView,
23
- makeGetRequestWithWebView,
24
- makePostRequestWithWebView,
25
- makePostRequest,
26
- bypassDdosGuard,
27
- deobfuscateScript,
28
- } from '../NativeConsumet';
12
+ export interface ProviderContextConfig extends ExtractorContextConfig {
13
+ /** Extractors to use instead of the bundled and registry ones, by name. */
14
+ extractors?: Record<string, ExtractorFactory>;
15
+ /**
16
+ * Supplies registry versions of extractors: `ctx.extractors.X` runs X's hash-verified registry
17
+ * version when the manager's registry lists X, falling back to the bundled X.
18
+ */
19
+ extractorManager?: ExtractorManager;
20
+ }
21
+
22
+ const createCustomBaseUrl = (defaultUrl: string, customUrl?: string): string => {
23
+ if (!customUrl) return defaultUrl;
24
+ return /^https?:\/\//.test(customUrl) ? customUrl : `http://${customUrl}`;
25
+ };
29
26
 
30
- /**
31
- * Creates a provider context with sensible defaults for extensions
32
- *
33
- * @param config Optional configuration to override defaults
34
- * @returns Complete ProviderContext ready for use with extensions
35
- */
36
27
  export function createProviderContext(config: ProviderContextConfig = {}): ProviderContext {
37
- const extractorManager = config.extractorManager;
28
+ const { extractorManager } = config;
29
+ const bundled = defaultExtractors as unknown as Record<string, ExtractorFactory | undefined>;
38
30
 
39
- // A factory shaped like the bundled ones (`X(ctx).extract(url)`) that runs the registry version of
40
- // the extractor, verified and cached by the shared manager, falling back to the bundled version.
31
+ // The manager falls back to the bundled version itself when the registry one can't be used.
41
32
  const registryBacked =
42
- (name: string, bundled?: (ctx?: ExtractorContext) => IVideoExtractor) =>
43
- (callerCtx?: ExtractorContext): IVideoExtractor => ({
44
- serverName: name,
45
- sources: [],
46
- extract: async (...args: any[]) => {
47
- let extractor: any;
48
- try {
49
- extractor = await extractorManager!.loadExtractor(name);
50
- } catch (error) {
51
- if (!bundled) throw error;
52
- }
53
- // loadExtractor returns the bundled extractor itself when the registry code fails; it throws
54
- // when the entry can't be used at all (e.g. it needs a newer context), so build it here.
55
- if (typeof extractor?.extract !== 'function') {
56
- if (!bundled) throw new Error(`Extractor '${name}' is not available`);
57
- extractor = bundled(callerCtx);
58
- }
59
- return extractor.extract(...(args as [any]));
60
- },
33
+ (name: string): ExtractorFactory =>
34
+ (callerCtx) => ({
35
+ extract: async (videoUrl, ...args) =>
36
+ (await extractorManager!.loadExtractorFactory(name))(callerCtx ?? ctx).extract(videoUrl, ...args),
61
37
  });
62
38
 
63
- const finalExtractors = new Proxy(defaultExtractors, {
64
- get: (target: any, prop: string | symbol) => {
65
- if (typeof prop !== 'string') return target[prop];
66
-
67
- // Custom extractors from the config always win
68
- if (config.extractors && config.extractors[prop]) {
69
- return config.extractors[prop];
70
- }
71
-
72
- // Extractors in the app's registry run their registry version
73
- if (extractorManager?.getExtractorMetadata(prop)) {
74
- return registryBacked(prop, target[prop]);
75
- }
76
-
77
- if (target[prop]) {
78
- return target[prop];
79
- }
39
+ const missing =
40
+ (name: string): ExtractorFactory =>
41
+ () => ({
42
+ extract: async () => {
43
+ throw new Error(`Extractor '${name}' not found in the registry or the bundled extractors`);
44
+ },
45
+ });
80
46
 
81
- return (): IVideoExtractor => ({
82
- serverName: prop,
83
- sources: [],
84
- extract: async () => {
85
- throw new Error(`Extractor '${prop}' not found in the registry or the bundled extractors`);
86
- },
87
- });
47
+ const extractors = new Proxy(bundled, {
48
+ get: (target, prop) => {
49
+ if (typeof prop !== 'string') return Reflect.get(target, prop);
50
+ const custom = config.extractors?.[prop];
51
+ if (custom) return custom;
52
+ const own = target[prop];
53
+ if (extractorManager?.getExtractorMetadata(prop)) return registryBacked(prop);
54
+ if (own) return ((callerCtx) => own(callerCtx ?? ctx)) as ExtractorFactory;
55
+ return missing(prop);
88
56
  },
89
- });
57
+ }) as unknown as ProviderContext['extractors'];
90
58
 
91
- // Create base URL normalization utility
92
- const createCustomBaseUrl = (defaultUrl: string, customUrl?: string): string => {
93
- if (!customUrl) {
94
- return defaultUrl;
95
- }
96
-
97
- if (customUrl.startsWith('http://') || customUrl.startsWith('https://')) {
98
- return customUrl;
99
- } else {
100
- return `http://${customUrl}`;
101
- }
102
- };
103
-
104
- return {
105
- axios: config.axios || defaultAxios,
106
- load: config.load || load,
107
- CryptoJS,
108
- USER_AGENT:
109
- config.userAgent ||
110
- 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36',
111
- AnimeParser: config.AnimeParser || AnimeParser,
112
- MovieParser: config.MovieParser || MovieParser,
113
- MangaParser: config.MangaParser || MangaParser,
114
- extractors: finalExtractors,
115
- extractorManager,
116
- PolyURL: PolyURL,
117
- PolyURLSearchParams: PolyURLSearchParams,
59
+ const ctx: ProviderContext = {
60
+ ...createExtractorContext(config),
61
+ AnimeParser,
62
+ MovieParser,
63
+ MangaParser,
64
+ extractors,
118
65
  createCustomBaseUrl,
119
- enums: {
120
- StreamingServers,
121
- MediaFormat,
122
- MediaStatus,
123
- SubOrDub,
124
- WatchListType,
125
- TvType,
126
- Genres,
127
- Topics,
128
- },
129
- NativeConsumet: {
130
- getDdosGuardCookiesWithWebView,
131
- makeGetRequestWithWebView,
132
- makePostRequestWithWebView,
133
- makePostRequest,
134
- bypassDdosGuard,
135
- deobfuscateScript,
136
- },
66
+ enums: extensionEnums,
137
67
  };
68
+ return ctx;
138
69
  }
139
- export default createProviderContext;
@@ -1,4 +1,5 @@
1
1
  import CryptoJS from 'crypto-js';
2
+ import { IDENTIFIER_RE } from './registry-schema';
2
3
 
3
4
  export type IntegrityErrorCode = 'INTEGRITY_MISMATCH' | 'INTEGRITY_MISSING' | 'INVALID_IDENTIFIER';
4
5
 
@@ -39,8 +40,6 @@ export interface ExecuteCodeOptions {
39
40
  skipIntegrity?: boolean;
40
41
  }
41
42
 
42
- const IDENTIFIER_RE = /^[A-Za-z_$][A-Za-z0-9_$]*$/;
43
-
44
43
  export const sha256Hex = (code: string): string => CryptoJS.SHA256(code).toString(CryptoJS.enc.Hex);
45
44
 
46
45
  /**
@@ -1,33 +1,11 @@
1
- import {
2
- StreamingServers,
3
- MediaFormat,
4
- MediaStatus,
5
- SubOrDub,
6
- WatchListType,
7
- TvType,
8
- Genres,
9
- Topics,
10
- } from '../models/types';
11
-
12
- /** Module names registry bundles import from the runtime (see scripts/build-extensions.js). */
13
- export const MODELS_MODULE = 'react-native-consumet/models';
14
- export const UTILS_MODULE = 'react-native-consumet/utils';
15
-
16
- // Paths tsc-built extensions used for the same modules, at any depth (`../models`, `../../../models/index.js`).
17
- const LEGACY_MODELS = /^(\.\.\/)+models(\/index)?(\.js)?$/;
18
- const LEGACY_UTILS = /^(\.\.\/)+utils(\/index|\/create-provider-context|\/create-extractor-context)?(\.js)?$/;
19
-
20
- /** The library's enums, handed to extensions as-is so their values always match. */
21
- export const extensionEnums = {
22
- StreamingServers,
23
- MediaFormat,
24
- MediaStatus,
25
- SubOrDub,
26
- WatchListType,
27
- TvType,
28
- Genres,
29
- Topics,
30
- };
1
+ import { extensionEnums } from '../models/types';
2
+ import type { ExtractorContext, ProviderContext } from '../models';
3
+ import { MODELS_MODULE, UTILS_MODULE } from './runtime-modules';
4
+ import { assertValidIdentifier, verifyExtensionCode, type IntegrityOptions } from './extension-integrity';
5
+ import { IDENTIFIER_RE } from './registry-schema';
6
+ import { createExtensionFetch, fetchTextWithTimeout } from './fetch-with-timeout';
7
+
8
+ export type ExtensionKind = 'provider' | 'extractor';
31
9
 
32
10
  /**
33
11
  * Builds the `require` extension code runs with. Only the modules passed in resolve; anything
@@ -36,8 +14,7 @@ export const extensionEnums = {
36
14
  */
37
15
  export function createExtensionRequire(extensionId: string, modules: Record<string, unknown>) {
38
16
  return (specifier: string): any => {
39
- const key = LEGACY_MODELS.test(specifier) ? MODELS_MODULE : LEGACY_UTILS.test(specifier) ? UTILS_MODULE : specifier;
40
- if (Object.prototype.hasOwnProperty.call(modules, key)) return modules[key];
17
+ if (Object.prototype.hasOwnProperty.call(modules, specifier)) return modules[specifier];
41
18
  throw new Error(
42
19
  `Extension '${extensionId}' requires '${specifier}', which the extension runtime does not provide. ` +
43
20
  'Registry code must be a single-file bundle (yarn build).'
@@ -47,58 +24,301 @@ export function createExtensionRequire(extensionId: string, modules: Record<stri
47
24
 
48
25
  export type ExtensionFactory = (...args: any[]) => any;
49
26
 
27
+ const isIdentifier = (value: unknown): value is string => typeof value === 'string' && IDENTIFIER_RE.test(value);
28
+
50
29
  /** The globals extension code runs with; each key becomes a local constant of that name. */
51
30
  export type ExtensionGlobals = { exports: Record<string, any>; module: { exports: any } } & Record<string, unknown>;
52
31
 
32
+ const isProviderContext = (ctx: ExtractorContext | ProviderContext): ctx is ProviderContext => 'enums' in ctx;
33
+
53
34
  /**
54
- * Run single-file extension code and return the function it provides as `name`: `exports[name]`,
55
- * `module.exports[name]`, a top-level `function name` (code without exports), or its default
56
- * export. Undefined when it provides none. `name` must be a valid identifier (assertValidIdentifier).
35
+ * The globals and `require`-able modules registry code of `kind` runs with, built from the context it
36
+ * gets. Extractor code also sees axios, cheerio's load, CryptoJS and the URL classes as globals;
37
+ * provider code reaches them through `require` or its context.
57
38
  */
58
- export function evaluateExtensionCode(
39
+ export function extensionGlobals(
40
+ kind: ExtensionKind,
41
+ id: string,
42
+ ctx: ExtractorContext | ProviderContext
43
+ ): ExtensionGlobals {
44
+ const parsers = isProviderContext(ctx)
45
+ ? { AnimeParser: ctx.AnimeParser, MovieParser: ctx.MovieParser, MangaParser: ctx.MangaParser }
46
+ : {};
47
+ const utils = isProviderContext(ctx)
48
+ ? { createProviderContext: () => ctx, createExtractorContext: () => ctx }
49
+ : { createExtractorContext: () => ctx };
50
+ // The only modules registry code can require; anything else throws (EXT-5).
51
+ const modules: Record<string, unknown> = {
52
+ 'cheerio': { load: ctx.load },
53
+ 'axios': ctx.axios,
54
+ 'crypto-js': ctx.CryptoJS,
55
+ [MODELS_MODULE]: { ...parsers, ...extensionEnums },
56
+ [UTILS_MODULE]: utils,
57
+ };
58
+ const globals: ExtensionGlobals = {
59
+ exports: {},
60
+ module: { exports: {} },
61
+ require: createExtensionRequire(id, modules),
62
+ console,
63
+ Promise,
64
+ Object,
65
+ fetch: createExtensionFetch(ctx.axios),
66
+ };
67
+ if (kind === 'extractor') {
68
+ Object.assign(globals, {
69
+ axios: ctx.axios,
70
+ load: ctx.load,
71
+ CryptoJS: ctx.CryptoJS,
72
+ URL: ctx.PolyURL,
73
+ URLSearchParams: ctx.PolyURLSearchParams,
74
+ });
75
+ }
76
+ return globals;
77
+ }
78
+
79
+ /** The functions an evaluation of extension code provides, by the name they were asked for. */
80
+ export type ExtensionFactories = Map<string, ExtensionFactory | undefined>;
81
+
82
+ /** Extension code wrapped in a function that runs it and returns its top-level `names`, in order. */
83
+ function parseExtensionCode(
59
84
  code: string,
60
- name: string,
61
- globals: ExtensionGlobals,
62
- kind: 'provider' | 'extractor'
63
- ): ExtensionFactory | undefined {
64
- const label = kind === 'provider' ? 'Provider' : 'Extractor';
65
- let run: (context: ExtensionGlobals) => unknown;
66
- try {
67
- run = new Function(
68
- 'context',
69
- `
85
+ names: readonly string[],
86
+ globals: ExtensionGlobals
87
+ ): (context: ExtensionGlobals) => unknown[] {
88
+ return new Function(
89
+ 'context',
90
+ `
70
91
  ${Object.keys(globals)
71
92
  .map((key) => `const ${key} = context.${key};`)
72
93
  .join('\n ')}
73
94
 
74
- try {
75
- ${code}
76
- } catch (execError) {
77
- console.error('Error during ${kind} code execution:', execError);
78
- throw new Error('${label} code execution failed: ' + execError.message);
79
- }
95
+ ${code}
80
96
 
81
- return typeof ${name} !== 'undefined' ? ${name} : undefined;
97
+ return [${names.map((name) => `typeof ${name} !== 'undefined' ? ${name} : undefined`).join(', ')}];
82
98
  `
83
- ) as typeof run;
99
+ ) as (context: ExtensionGlobals) => unknown[];
100
+ }
101
+
102
+ /**
103
+ * Run single-file extension code once and return the functions it provides for `names`. For each
104
+ * name: a top-level `function name`, `exports[name]`, `module.exports[name]`, or its default export;
105
+ * undefined when it provides none. `names[0]` is the one the caller needs; the others are looked up
106
+ * when the code also parses with them, and are missing from the result otherwise. Every name must
107
+ * be a valid identifier (assertValidIdentifier).
108
+ */
109
+ export function evaluateExtensionCode(
110
+ code: string,
111
+ names: readonly string[],
112
+ globals: ExtensionGlobals,
113
+ kind: ExtensionKind
114
+ ): ExtensionFactories {
115
+ const label = kind === 'provider' ? 'Provider' : 'Extractor';
116
+ const parseError = (syntaxError: any) =>
117
+ new Error(`Failed to parse ${kind} code: ${syntaxError.message}`, { cause: syntaxError });
118
+ let captured = names;
119
+ let run: (context: ExtensionGlobals) => unknown[];
120
+ try {
121
+ run = parseExtensionCode(code, captured, globals);
84
122
  } catch (syntaxError: any) {
85
- console.error(`Syntax error in ${kind} code:`, syntaxError);
86
- throw new Error(`Failed to parse ${kind} code: ${syntaxError.message}`);
123
+ if (names.length <= 1) throw parseError(syntaxError);
124
+ // A name that can't be referenced (a reserved word, say) must not fail the one asked for.
125
+ captured = names.slice(0, 1);
126
+ try {
127
+ run = parseExtensionCode(code, captured, globals);
128
+ } catch (singleError: any) {
129
+ throw parseError(singleError);
130
+ }
87
131
  }
88
132
 
89
133
  // The top-level declaration comes first: it always binds its own name, while bundle export
90
134
  // getters built without block scoping can point at another export on Hermes (see
91
135
  // scripts/hermes-safe-dist.js). Exports cover code without a top-level declaration, and the
92
136
  // default export (`export default`) is the last resort.
93
- const declared = run(globals);
137
+ let declared: unknown;
138
+ try {
139
+ declared = run(globals);
140
+ } catch (execError: any) {
141
+ throw new Error(`${label} code execution failed: ${execError?.message ?? execError}`, { cause: execError });
142
+ }
143
+ // Not the list when the code returns early on its own (a top-level `return`).
144
+ const declaredAt = (index: number) => (Array.isArray(declared) ? declared[index] : undefined);
94
145
  const { exports, module } = globals;
95
- return [declared, exports[name], module.exports?.[name], exports.default, module.exports?.default].find(
96
- (candidate): candidate is ExtensionFactory => typeof candidate === 'function'
146
+ return new Map(
147
+ captured.map((name, index): [string, ExtensionFactory | undefined] => [
148
+ name,
149
+ [declaredAt(index), exports[name], module.exports?.[name], exports.default, module.exports?.default].find(
150
+ (candidate): candidate is ExtensionFactory => typeof candidate === 'function'
151
+ ),
152
+ ])
97
153
  );
98
154
  }
99
155
 
156
+ /** Thrown when a registry entry's code can't be downloaded; `status` is the HTTP status, if any. */
157
+ export class RegistryFetchError extends Error {
158
+ readonly kind: ExtensionKind;
159
+ readonly url: string;
160
+ readonly status?: number;
161
+
162
+ constructor(kind: ExtensionKind, url: string, message: string, status?: number) {
163
+ super(message);
164
+ this.name = 'RegistryFetchError';
165
+ this.kind = kind;
166
+ this.url = url;
167
+ this.status = status;
168
+ Object.setPrototypeOf(this, RegistryFetchError.prototype);
169
+ }
170
+ }
171
+
172
+ /** Download the code a registry entry's `main` points at. */
173
+ export async function fetchEntryCode(kind: ExtensionKind, main: string): Promise<string> {
174
+ const what = kind === 'provider' ? 'extension' : 'extractor';
175
+ let response: Awaited<ReturnType<typeof fetchTextWithTimeout>>;
176
+ try {
177
+ response = await fetchTextWithTimeout(main, {
178
+ method: 'GET',
179
+ headers: { 'Accept': 'text/plain, application/javascript, */*', 'User-Agent': 'react-native-consumet' },
180
+ });
181
+ } catch (error) {
182
+ throw new RegistryFetchError(kind, main, `Failed to fetch ${what}: ${(error as Error)?.message ?? error}`);
183
+ }
184
+ if (!response.ok) {
185
+ throw new RegistryFetchError(
186
+ kind,
187
+ main,
188
+ `Failed to fetch ${what}: ${response.status} ${response.statusText}`,
189
+ response.status
190
+ );
191
+ }
192
+ return response.text;
193
+ }
194
+
195
+ /**
196
+ * One evaluation of verified code with a sha256: the functions it provides by name, and the keys
197
+ * compiled from it. Every key whose entry has that sha256 shares it, and so its top-level state.
198
+ */
199
+ type SharedModule = { sha256: string; code: string; factories: ExtensionFactories; keys: Set<string> };
200
+
100
201
  /** Compiled extension code, reused only for the same code and sha256 (one entry per key). */
101
- export type CompiledCode = { sha256: string; code: string; factory: ExtensionFactory };
202
+ type CompiledCode = { sha256: string; code: string; factory: ExtensionFactory; module?: SharedModule };
203
+
204
+ export interface CompileRequest {
205
+ kind: ExtensionKind;
206
+ /** Registry id of the entry, for errors */
207
+ id: string;
208
+ /** The function the code must provide; must be a plain identifier, as it's interpolated into the code */
209
+ name: unknown;
210
+ code: string;
211
+ entry: { id?: string; name?: string; sha256?: string };
212
+ globals: () => ExtensionGlobals;
213
+ /**
214
+ * The function names of other entries whose code has the same sha256, also looked up when the
215
+ * code runs, so those entries get their function from the same run. Names that aren't plain
216
+ * identifiers are skipped.
217
+ */
218
+ siblings?: () => readonly unknown[];
219
+ /** Run the code without checking it against `entry.sha256`; such code is never cached or shared. */
220
+ skipIntegrity?: boolean;
221
+ }
222
+
223
+ /** Whether a cache key belongs to the extension or extractor `id`: keys are `${id}` and `${id}|…`. */
224
+ const isKeyOf = (key: string, id: string) => key === id || key.startsWith(`${id}|`);
225
+ /** The id a cache key belongs to. */
226
+ const idOfKey = (key: string) => key.split('|')[0]!;
227
+
228
+ /**
229
+ * Turns verified registry code into the function it provides. The same code verified against the
230
+ * same hash runs from its compiled copy; unverified code is checked again on every call. Verified
231
+ * code with a sha256 runs once per sha256: entries that share a bundle (same code, same hash) get
232
+ * their functions from one run, so they share its top-level state.
233
+ */
234
+ export class CompiledCodeCache {
235
+ private compiled = new Map<string, CompiledCode>();
236
+ // By sha256
237
+ private modules = new Map<string, SharedModule>();
238
+
239
+ constructor(private integrityOptions: IntegrityOptions = {}) {}
240
+
241
+ /**
242
+ * The function `name` for `key`, when this cache has it from code verified against `sha256` (not
243
+ * empty): compiled for `key`, or provided by a run of code with that sha256 for another key.
244
+ * Undefined otherwise, without running anything.
245
+ */
246
+ lookup(key: string, sha256: string | undefined, name: unknown): ExtensionFactory | undefined {
247
+ if (!sha256) return undefined;
248
+ const cached = this.compiled.get(key);
249
+ if (cached?.sha256 === sha256) return cached.factory;
250
+ const module = this.modules.get(sha256);
251
+ const factory = typeof name === 'string' ? module?.factories.get(name) : undefined;
252
+ if (!module || !factory) return undefined;
253
+ this.remember(key, { sha256, code: module.code, factory, module });
254
+ return factory;
255
+ }
256
+
257
+ compile(key: string, request: CompileRequest): ExtensionFactory {
258
+ const { kind, id, name, code, entry, skipIntegrity } = request;
259
+ assertValidIdentifier(name, kind === 'provider' ? 'factoryName' : 'extractor name', id);
260
+ const label = kind === 'provider' ? 'extension' : 'extractor code';
261
+ const notFound = () => new Error(`Factory function '${name}' not found in ${label}`);
262
+
263
+ const sha256 = entry.sha256 ?? '';
264
+ const cached = this.compiled.get(key);
265
+ if (cached?.sha256 === sha256 && cached.code === code) return cached.factory;
266
+ if (!skipIntegrity) verifyExtensionCode(code, entry, this.integrityOptions);
267
+
268
+ // Only verified code with a hash is shared.
269
+ const shareable = !skipIntegrity && sha256 !== '';
270
+ const shared = shareable ? this.modules.get(sha256) : undefined;
271
+ if (shared && shared.code === code && shared.factories.has(name)) {
272
+ const factory = shared.factories.get(name);
273
+ if (!factory) throw notFound();
274
+ this.remember(key, { sha256, code, factory, module: shared });
275
+ return factory;
276
+ }
277
+
278
+ const siblings = shareable ? (request.siblings?.() ?? []) : [];
279
+ const names = [name, ...siblings.filter((sibling): sibling is string => isIdentifier(sibling) && sibling !== name)];
280
+ const factories = evaluateExtensionCode(code, Array.from(new Set(names)), request.globals(), kind);
281
+ const factory = factories.get(name);
282
+ if (!factory) throw notFound();
283
+ if (skipIntegrity) return factory;
284
+ // When a shared run exists (one that lacks this name), this run stays this key's own.
285
+ const module = shareable && !shared ? { sha256, code, factories, keys: new Set<string>() } : undefined;
286
+ if (module) this.modules.set(sha256, module);
287
+ this.remember(key, { sha256, code, factory, module });
288
+ return factory;
289
+ }
290
+
291
+ /**
292
+ * Forget the compiled code of one extension or extractor (keys `${id}` and `${id}|…`), the shared
293
+ * runs it came from, and the compiled code of every other key that came from those runs. Returns
294
+ * the ids of those other keys.
295
+ */
296
+ forget(id: string): string[] {
297
+ const siblings = new Set<string>();
298
+ for (const [key, { module }] of Array.from(this.compiled.entries())) {
299
+ if (!isKeyOf(key, id) || !this.compiled.has(key)) continue;
300
+ this.compiled.delete(key);
301
+ if (!module) continue;
302
+ if (this.modules.get(module.sha256) === module) this.modules.delete(module.sha256);
303
+ for (const other of module.keys) {
304
+ this.compiled.delete(other);
305
+ if (!isKeyOf(other, id)) siblings.add(idOfKey(other));
306
+ }
307
+ }
308
+ return Array.from(siblings);
309
+ }
310
+
311
+ /** Store the compiled code of `key`, moving it off the shared run it had before. */
312
+ private remember(key: string, compiled: CompiledCode): void {
313
+ const previous = this.compiled.get(key)?.module;
314
+ if (previous && previous !== compiled.module) {
315
+ previous.keys.delete(key);
316
+ if (!previous.keys.size && this.modules.get(previous.sha256) === previous) this.modules.delete(previous.sha256);
317
+ }
318
+ this.compiled.set(key, compiled);
319
+ compiled.module?.keys.add(key);
320
+ }
321
+ }
102
322
 
103
323
  /**
104
324
  * Share one load per key: concurrent callers get the same promise, later callers the result.
@@ -118,6 +338,6 @@ export function memoiseLoad<T>(cache: Map<string, Promise<T>>, key: string, load
118
338
  /** Delete the entries of one extension or extractor: keys `${id}` and `${id}|…`. */
119
339
  export function deleteEntriesOf(cache: Map<string, unknown>, id: string): void {
120
340
  for (const key of Array.from(cache.keys())) {
121
- if (key === id || key.startsWith(`${id}|`)) cache.delete(key);
341
+ if (isKeyOf(key, id)) cache.delete(key);
122
342
  }
123
343
  }