skystream-cli 1.4.2 → 1.4.3

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 +12 -5
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -12,7 +12,7 @@ const program = new Command();
12
12
  program
13
13
  .name('skystream')
14
14
  .description('SkyStream Plugin Development Kit CLI (Sky Gen 2)')
15
- .version('1.4.2');
15
+ .version('1.4.3');
16
16
  // Schemas
17
17
  const pluginSchema = z.object({
18
18
  packageName: z.string().min(5).regex(/^[a-z0-9._-]+$/),
@@ -198,7 +198,7 @@ const JS_TEMPLATE = `(function() {
198
198
  data: [
199
199
  new StreamResult({
200
200
  url: "https://test-streams.mux.dev/x36xhzz/x36xhzz.m3u8",
201
- quality: "1080p", // (optional)
201
+ source: "Server [1080p]", // (optional)
202
202
  headers: { "Referer": \`\${manifest.baseUrl}\` }, // (optional)
203
203
  subtitles: [
204
204
  { url: \`\${manifest.baseUrl}/sub.vtt\`, label: "English", lang: "en" } // (optional)
@@ -560,9 +560,9 @@ program.command('test')
560
560
  }
561
561
 
562
562
  class StreamResult {
563
- constructor({ url, quality, headers, subtitles, drmKid, drmKey, licenseUrl }) {
563
+ constructor({ url, source, quality, headers, subtitles, drmKid, drmKey, licenseUrl }) {
564
564
  this.url = url;
565
- this.quality = quality || 'Auto';
565
+ this.source = source || quality || 'Auto';
566
566
  this.headers = headers;
567
567
  this.subtitles = subtitles;
568
568
  this.drmKid = drmKid;
@@ -576,7 +576,14 @@ program.command('test')
576
576
  const sandbox = Object.create(null);
577
577
  Object.assign(sandbox, context);
578
578
  // Ensure Node globals are present
579
- sandbox.console = console;
579
+ sandbox.atob = (str) => Buffer.from(str, 'base64').toString('binary');
580
+ sandbox.btoa = (str) => Buffer.from(str, 'binary').toString('base64');
581
+ sandbox.URL = URL;
582
+ sandbox.console = {
583
+ log: (...args) => console.log('[JS LOG]', ...args),
584
+ error: (...args) => console.error('[JS ERROR]', ...args),
585
+ warn: (...args) => console.warn('[JS WARN]', ...args),
586
+ };
580
587
  sandbox.axios = axios;
581
588
  sandbox.Buffer = Buffer;
582
589
  sandbox.setTimeout = setTimeout;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skystream-cli",
3
- "version": "1.4.2",
3
+ "version": "1.4.3",
4
4
  "type": "module",
5
5
  "description": "SkyStream Plugin Development Kit & Repository Manager",
6
6
  "main": "dist/index.js",