skystream-cli 1.0.0 → 1.1.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 (2) hide show
  1. package/dist/index.js +73 -5
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -48,8 +48,23 @@ const JS_TEMPLATE = `(function() {
48
48
  */
49
49
  async function getHome(cb) {
50
50
  try {
51
- // Example data structure: { "Trending": [mediaItem1, ...] }
52
- cb({ success: true, data: {} });
51
+ // Standard: Return a Map of Category -> List of items
52
+ cb({
53
+ success: true,
54
+ data: {
55
+ "Trending": [
56
+ new MultimediaItem({
57
+ title: "Example Movie",
58
+ url: "https://site.com/movie",
59
+ posterUrl: "https://site.com/poster.jpg",
60
+ type: "movie", // Valid types: movie, series, anime, livestream
61
+ bannerUrl: "https://site.com/banner.jpg", // (optional)
62
+ description: "Plot summary here...", // (optional)
63
+ headers: { "Referer": "https://site.com" } // (optional)
64
+ })
65
+ ]
66
+ }
67
+ });
53
68
  } catch (e) {
54
69
  cb({ success: false, errorCode: "PARSE_ERROR", message: (e instanceof Error) ? e.message : String(e) });
55
70
  }
@@ -62,7 +77,21 @@ const JS_TEMPLATE = `(function() {
62
77
  */
63
78
  async function search(query, cb) {
64
79
  try {
65
- cb({ success: true, data: [] });
80
+ // Standard: Return a List of items
81
+ cb({
82
+ success: true,
83
+ data: [
84
+ new MultimediaItem({
85
+ title: "Example Movie",
86
+ url: "https://site.com/movie",
87
+ posterUrl: "https://site.com/poster.jpg",
88
+ type: "movie", // Valid types: movie, series, anime, livestream
89
+ bannerUrl: "https://site.com/banner.jpg", // (optional)
90
+ description: "Plot summary here...", // (optional)
91
+ headers: { "Referer": "https://site.com" } // (optional)
92
+ })
93
+ ]
94
+ });
66
95
  } catch (e) {
67
96
  cb({ success: false, errorCode: "SEARCH_ERROR", message: (e instanceof Error) ? e.message : String(e) });
68
97
  }
@@ -75,7 +104,30 @@ const JS_TEMPLATE = `(function() {
75
104
  */
76
105
  function load(url, cb) {
77
106
  try {
78
- cb({ success: true, data: { title: "Item", url, isFolder: false, episodes: [] } });
107
+ // Standard: Return a single item with full metadata
108
+ cb({
109
+ success: true,
110
+ data: new MultimediaItem({
111
+ title: "Example Movie Full Details",
112
+ url: url,
113
+ posterUrl: "https://site.com/poster.jpg",
114
+ type: "movie", // Valid types: movie, series, anime, livestream
115
+ bannerUrl: "https://site.com/banner.jpg", // (optional)
116
+ description: "This is a detailed description of the movie.", // (optional)
117
+ headers: { "Referer": "https://site.com" }, // (optional)
118
+ episodes: [
119
+ new Episode({
120
+ name: "Episode 1",
121
+ url: "https://site.com/watch/1",
122
+ season: 1, // (optional)
123
+ episode: 1, // (optional)
124
+ description: "Episode summary...", // (optional)
125
+ posterUrl: "https://site.com/ep-poster.jpg", // (optional)
126
+ headers: { "Referer": "https://site.com" } // (optional)
127
+ })
128
+ ]
129
+ })
130
+ });
79
131
  } catch (e) {
80
132
  cb({ success: false, errorCode: "LOAD_ERROR", message: (e instanceof Error) ? e.message : String(e) });
81
133
  }
@@ -88,7 +140,23 @@ const JS_TEMPLATE = `(function() {
88
140
  */
89
141
  async function loadStreams(url, cb) {
90
142
  try {
91
- cb({ success: true, data: [] });
143
+ // Standard: Return a List of stream urls
144
+ cb({
145
+ success: true,
146
+ data: [
147
+ new StreamResult({
148
+ url: "https://test-streams.mux.dev/x36xhzz/x36xhzz.m3u8",
149
+ quality: "1080p", // (optional)
150
+ headers: { "Referer": "https://site.com" }, // (optional)
151
+ subtitles: [
152
+ { url: "https://site.com/sub.vtt", label: "English", lang: "en" } // (optional)
153
+ ],
154
+ drmKid: "kid_value", // (optional)
155
+ drmKey: "key_value", // (optional)
156
+ licenseUrl: "https://license-server.com" // (optional)
157
+ })
158
+ ]
159
+ });
92
160
  } catch (e) {
93
161
  cb({ success: false, errorCode: "STREAM_ERROR", message: (e instanceof Error) ? e.message : String(e) });
94
162
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skystream-cli",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "type": "module",
5
5
  "description": "SkyStream Plugin Development Kit & Repository Manager",
6
6
  "main": "dist/index.js",