New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

autopilot-sdk

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

autopilot-sdk - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

51

dist/utils.js

@@ -18,2 +18,4 @@ 'use strict';

function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { step("next", value); }, function (err) { step("throw", err); }); } } return step("next"); }); }; }
var VERSION = 'v1';

@@ -35,19 +37,40 @@ var ENDPOINT = 'https://api2.autopilothq.com/' + VERSION;

var request = async function request(method, path, _ref) {
var token = _ref.token,
options = _objectWithoutProperties(_ref, ['token']);
var request = function () {
var _ref2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(method, path, _ref) {
var token = _ref.token,
options = _objectWithoutProperties(_ref, ['token']);
// create an instance of axios with authentication
var http = _axios2.default.create({
baseURL: ENDPOINT,
headers: {
'Content-Type': 'application/json',
autopilotapikey: token
}
});
var http, res;
return regeneratorRuntime.wrap(function _callee$(_context) {
while (1) {
switch (_context.prev = _context.next) {
case 0:
// create an instance of axios with authentication
http = _axios2.default.create({
baseURL: ENDPOINT,
headers: {
'Content-Type': 'application/json',
autopilotapikey: token
}
});
_context.next = 3;
return http[method](path, { data: options });
var res = await http[method](path, { data: options });
return res.data;
};
case 3:
res = _context.sent;
return _context.abrupt('return', res.data);
case 5:
case 'end':
return _context.stop();
}
}
}, _callee, undefined);
}));
return function request(_x, _x2, _x3) {
return _ref2.apply(this, arguments);
};
}();
var parse = exports.parse = function parse(obj) {

@@ -54,0 +77,0 @@ var keys = Object.keys(obj);

{
"name": "autopilot-sdk",
"description": "Node SDK for Autopilot",
"version": "0.0.1",
"version": "0.0.2",
"author": "Samuel Amoah <sa.am@programmer.net>",

@@ -13,2 +13,3 @@ "keywords": [

"babel-cli": "^6.24.1",
"babel-plugin-transform-async-to-generator": "^6.24.1",
"babel-plugin-transform-object-rest-spread": "^6.26.0",

@@ -15,0 +16,0 @@ "babel-preset-es2015": "^6.24.1",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc