@vyla-entertainment/sdk 1.0.0 → 1.4.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 (46) hide show
  1. package/.github/workflows/publish.yml +38 -0
  2. package/LICENSE +0 -0
  3. package/README.md +19 -2
  4. package/package.json +3 -2
  5. package/src/config.js +0 -0
  6. package/src/downloads/downloads.js +0 -0
  7. package/src/downloads/sources/trendimovies.js +0 -0
  8. package/src/health.js +0 -0
  9. package/src/sdk.d.ts +123 -0
  10. package/src/sdk.js +0 -0
  11. package/src/sources/123anime.js +0 -0
  12. package/src/sources/1embed.js +0 -0
  13. package/src/sources/anihq.js +0 -0
  14. package/src/sources/anineko.js +0 -0
  15. package/src/sources/anipm.js +0 -0
  16. package/src/sources/flaxmovies.js +0 -0
  17. package/src/sources/fsharetv.js +0 -0
  18. package/src/sources/fsonic.js +0 -0
  19. package/src/sources/fsonline.js +0 -0
  20. package/src/sources/goated.js +0 -0
  21. package/src/sources/hexa.js +0 -0
  22. package/src/sources/kisskh.js +0 -0
  23. package/src/sources/lookmovie.js +0 -0
  24. package/src/sources/mapple.js +0 -0
  25. package/src/sources/meowtv.js +0 -0
  26. package/src/sources/nebula.js +0 -0
  27. package/src/sources/nekowatch.js +0 -0
  28. package/src/sources/opstream.js +0 -0
  29. package/src/sources/peachify.js +0 -0
  30. package/src/sources/pengu.js +0 -0
  31. package/src/sources/purstream.js +0 -0
  32. package/src/sources/vidapi.js +0 -0
  33. package/src/sources/vidcore.js +0 -0
  34. package/src/sources/videasy.js +0 -0
  35. package/src/sources/vidfast.js +0 -0
  36. package/src/sources/vidlink.js +0 -0
  37. package/src/sources/vidnest.js +0 -0
  38. package/src/sources/vidrift.js +0 -0
  39. package/src/sources/vidrock.js +0 -0
  40. package/src/sources/vidsync.js +0 -0
  41. package/src/sources/vidup.js +0 -0
  42. package/src/sources/vidzee.js +0 -0
  43. package/src/sources/vixsrc.js +0 -0
  44. package/src/sources/xpass.js +0 -0
  45. package/src/subtitles.js +0 -0
  46. package/src/utils/helpers.js +0 -0
@@ -0,0 +1,38 @@
1
+ name: Publish npm package
2
+
3
+ on:
4
+ workflow_dispatch:
5
+
6
+ permissions:
7
+ contents: write
8
+
9
+ jobs:
10
+ publish:
11
+ runs-on: ubuntu-latest
12
+
13
+ steps:
14
+ - uses: actions/checkout@v4
15
+ with:
16
+ token: ${{ secrets.GITHUB_TOKEN }}
17
+
18
+ - uses: actions/setup-node@v4
19
+ with:
20
+ node-version: 22
21
+ registry-url: https://registry.npmjs.org/
22
+
23
+ - name: Configure git
24
+ run: |
25
+ git config user.name "github-actions[bot]"
26
+ git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
27
+
28
+ - run: npm ci
29
+
30
+ - name: Bump version
31
+ run: |
32
+ npm version minor
33
+ git push --follow-tags
34
+
35
+ - name: Publish
36
+ run: npm publish
37
+ env:
38
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_KEY }}
package/LICENSE CHANGED
File without changes
package/README.md CHANGED
@@ -40,5 +40,22 @@ await sdk.probeAllSources(); -> {'key': {ok, ms}, ...}
40
40
 
41
41
  // Get HLS streams
42
42
  // Args: source key, tmdb id, season?, episode?, clientIP?
43
- await sdk.getStream('nebula', '0000000', null, null, null) -> {allUrls: {url, quality, label, ...}[]}
44
- ```
43
+ await sdk.getStream('nebula', '0000000', null, null, null) -> {allUrls: {url, quality, label?, server?, type?, skipProxy?, skipVerify?, headers? ...}[]}
44
+ ```
45
+
46
+ # [DMCA](https://docs.vyla.cc/misc/dmca)
47
+
48
+ If your source is listed here, I sincerely apologize. I understand that its inclusion may be costing you a lot of money, and that was never my intention. Please contact me as soon as possible, and I'll remove it ASAP.
49
+
50
+ This is a small hobby project that I built for learning and personal interest, not for profit. I genuinely want to respect the wishes of source owners and will address any removal requests as quickly as I can.
51
+
52
+ This project is developed and maintained by [Vyla Entertainment](https://github.com/vyla-entertainment) (@vyla-entertainment).
53
+
54
+ Original work and core authorship:
55
+
56
+ [@endoverdosing](https://github.com/EndOverdosing)
57
+
58
+ [@GavinGoGaming](https://github.com/GavinGoGaming)
59
+
60
+ Full credits and acknowledgements:
61
+ https://docs.vyla.cc/misc/credit
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vyla-entertainment/sdk",
3
- "version": "1.0.0",
3
+ "version": "1.4.0",
4
4
  "scripts": {
5
5
  "test": "node test/index.js"
6
6
  },
@@ -18,6 +18,7 @@
18
18
  "type": "module",
19
19
  "description": "Vyla's multi-provider stream scraper SDK",
20
20
  "main": "src/sdk.js",
21
+ "types": "src/sdk.d.ts",
21
22
  "directories": {
22
23
  "test": "test"
23
24
  },
@@ -28,4 +29,4 @@
28
29
  "publishConfig": {
29
30
  "access": "public"
30
31
  }
31
- }
32
+ }
package/src/config.js CHANGED
File without changes
File without changes
File without changes
package/src/health.js CHANGED
File without changes
package/src/sdk.d.ts ADDED
@@ -0,0 +1,123 @@
1
+ export interface SourceConfig {
2
+ key: string;
3
+ label: string;
4
+ sourceFile: string;
5
+ proxyParam: string;
6
+ timeout: number;
7
+ jitter: number;
8
+ retries: number;
9
+ multiUrl: boolean;
10
+ skipProxy?: boolean;
11
+ cdnHeaders?: {
12
+ pattern: RegExp;
13
+ headers: {
14
+ Referer: string;
15
+ Origin: string;
16
+ };
17
+ }[];
18
+ skipVerify?: boolean;
19
+ verifyHeaders?: boolean;
20
+ disabled?: boolean;
21
+ sourcesTimeout?: number;
22
+ }
23
+ export interface ProbeResult {
24
+ ok: boolean;
25
+ ms: number | null;
26
+ }
27
+ export interface StreamResult {
28
+ url: string;
29
+ headers: {
30
+ "User-Agent": string;
31
+ Referer: string;
32
+ Origin: string;
33
+ [key: string]: string;
34
+ };
35
+ server: string;
36
+ quality: string;
37
+ type: "mp4" | "hls";
38
+ skipVerify?: boolean;
39
+ skipProxy?: boolean;
40
+ }
41
+
42
+ export interface DownloadResult {
43
+ url: string;
44
+ quality: string;
45
+ size: number | null;
46
+ type: "mkv";
47
+ active: boolean;
48
+ }
49
+ export interface SubtitleResult {
50
+ label: string;
51
+ file: string;
52
+ type: "vtt" | "srt";
53
+ source: string;
54
+ }
55
+
56
+ export type ProbeAllResult = Record<string, ProbeResult>;
57
+
58
+ export interface VylaSDKOptions {
59
+ tmdbApiKey?: string;
60
+ }
61
+
62
+ // Descriptions written with Claude.
63
+ export default class VylaSDK {
64
+ tmdbApiKey?: string;
65
+
66
+ constructor(options?: VylaSDKOptions);
67
+
68
+ /**
69
+ * Get the list of configured sources.
70
+ * @param excludeDisabled If true, filters out disabled sources.
71
+ */
72
+ getSources(excludeDisabled?: boolean): SourceConfig[];
73
+
74
+ /**
75
+ * Probe all active (non-disabled) sources for availability.
76
+ */
77
+ probeAllSources(): Promise<ProbeAllResult>;
78
+
79
+ /**
80
+ * Probe a single source by key.
81
+ */
82
+ probeSource(key: string): Promise<ProbeResult>;
83
+
84
+ /**
85
+ * Get a playable stream for a given source/media id.
86
+ * @param key Source key
87
+ * @param id Media id (e.g. TMDB id)
88
+ * @param s Season number (for TV), or null for movies
89
+ * @param e Episode number (for TV), or null for movies
90
+ * @param clientIP Optional client IP for source-specific logic
91
+ */
92
+ getStream(
93
+ key: string,
94
+ id: string | number,
95
+ s?: number | null,
96
+ e?: number | null,
97
+ clientIP?: string | null
98
+ ): Promise<StreamResult>;
99
+
100
+ /**
101
+ * Get subtitles for a movie or TV episode.
102
+ * @param id Media id
103
+ * @param s Season number (for TV), or null for movies
104
+ * @param e Episode number (for TV), or null for movies
105
+ */
106
+ getSubtitles(
107
+ id: string | number,
108
+ s?: number | null,
109
+ e?: number | null
110
+ ): Promise<SubtitleResult[]>;
111
+
112
+ /**
113
+ * Get download links for a movie or TV episode.
114
+ * @param id Media id
115
+ * @param s Season number (for TV), or null for movies
116
+ * @param e Episode number (for TV), or null for movies
117
+ */
118
+ getDownloads(
119
+ id: string | number,
120
+ s?: number | null,
121
+ e?: number | null
122
+ ): Promise<DownloadResult[]>;
123
+ }
package/src/sdk.js CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
package/src/subtitles.js CHANGED
File without changes
File without changes