skystream-cli 1.3.5 → 1.3.6

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 +6 -5
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -9,7 +9,7 @@ const program = new Command();
9
9
  program
10
10
  .name('skystream')
11
11
  .description('SkyStream Plugin Development Kit CLI (Sky Gen 2)')
12
- .version('1.3.5');
12
+ .version('1.3.6');
13
13
  // Schemas
14
14
  const pluginSchema = z.object({
15
15
  packageName: z.string().min(5).regex(/^[a-z0-9._-]+$/),
@@ -436,13 +436,13 @@ program.command('test')
436
436
  http_get: async (url, headers, cb) => {
437
437
  try {
438
438
  const res = await axios.get(url, { headers: headers || {} });
439
- const result = { statusCode: res.status, body: typeof res.data === 'string' ? res.data : JSON.stringify(res.data), headers: res.headers };
439
+ const result = { status: res.status, statusCode: res.status, body: typeof res.data === 'string' ? res.data : JSON.stringify(res.data), headers: res.headers };
440
440
  if (cb)
441
441
  cb(result);
442
442
  return result;
443
443
  }
444
444
  catch (e) {
445
- const res = { statusCode: e.response?.status || 500, body: e.response?.data || e.message, headers: e.response?.headers || {} };
445
+ const res = { status: e.response?.status || 500, statusCode: e.response?.status || 500, body: e.response?.data || e.message, headers: e.response?.headers || {} };
446
446
  if (cb)
447
447
  cb(res);
448
448
  return res;
@@ -451,13 +451,13 @@ program.command('test')
451
451
  http_post: async (url, headers, body, cb) => {
452
452
  try {
453
453
  const res = await axios.post(url, body, { headers: headers || {} });
454
- const result = { statusCode: res.status, body: typeof res.data === 'string' ? res.data : JSON.stringify(res.data), headers: res.headers };
454
+ const result = { status: res.status, statusCode: res.status, body: typeof res.data === 'string' ? res.data : JSON.stringify(res.data), headers: res.headers };
455
455
  if (cb)
456
456
  cb(result);
457
457
  return result;
458
458
  }
459
459
  catch (e) {
460
- const res = { statusCode: e.response?.status || 500, body: e.response?.data || e.message, headers: e.response?.headers || {} };
460
+ const res = { status: e.response?.status || 500, statusCode: e.response?.status || 500, body: e.response?.data || e.message, headers: e.response?.headers || {} };
461
461
  if (cb)
462
462
  cb(res);
463
463
  return res;
@@ -475,6 +475,7 @@ program.command('test')
475
475
  fetch: async (url) => {
476
476
  const res = await axios.get(url);
477
477
  return {
478
+ status: res.status,
478
479
  statusCode: res.status,
479
480
  body: typeof res.data === 'string' ? res.data : JSON.stringify(res.data),
480
481
  headers: res.headers
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skystream-cli",
3
- "version": "1.3.5",
3
+ "version": "1.3.6",
4
4
  "type": "module",
5
5
  "description": "SkyStream Plugin Development Kit & Repository Manager",
6
6
  "main": "dist/index.js",