Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@hyperone/cli-core

Package Overview
Dependencies
Maintainers
1
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hyperone/cli-core - npm Package Compare versions

Comparing version 1.0.12 to 1.0.13

21

lib/api.js

@@ -18,13 +18,16 @@

const update = async (method, uri, json) => http[method](uri, {
json,
headers: await getHeaders(),
const update = async (method, uri, options={}) => http[method](uri, {
...options,
headers: {
...await getHeaders(),
...options.headers || {},
},
});
result.delete = (uri, body) => update('delete', uri, body);
result.patch = (uri, body) => update('patch', uri, body);
result.post = (uri, body) => update('post', uri, body);
result.put = (uri, body) => update('put', uri, body);
result.head = (uri) => update('head', uri);
result.get = (uri) => update('get', uri);
result.delete = (uri, options={}) => update('delete', uri, options);
result.patch = (uri, options={}) => update('patch', uri, options);
result.post = (uri, options={}) => update('post', uri, options);
result.put = (uri, options={}) => update('put', uri, options);
result.head = (uri, options={}) => update('head', uri, options);
result.get = (uri, options={}) => update('get', uri, options);

@@ -31,0 +34,0 @@ result.setHeaders = (h) => {

@@ -6,2 +6,7 @@ import fetch from 'node-fetch';

const renderPath = (path, parameters) => path.replace(new RegExp(/{(.+?)}/g), (source, name) => {
if (name in parameters) return encodeURIComponent(parameters[name]);
return source;
});
export default {

@@ -52,3 +57,4 @@ init: async (options) => {

},
getUrl: path => `${spec.servers[0].url}${path}`,
renderPath,
getUrl: (path, parameters = {}) => `${spec.servers[0].url}${renderPath(path, parameters)}`,
spec, // TODO: Remove me

@@ -55,0 +61,0 @@ getChild: (prefix) => Object

{
"name": "@hyperone/cli-core",
"version": "1.0.12",
"version": "1.0.13",
"description": "",

@@ -29,3 +29,3 @@ "main": "index.js",

"license": "MIT",
"gitHead": "0e4a91ccb71944831bdce5a123e2c66db02f8d4c"
"gitHead": "ffed02ce77a52b163cab5ce701d538186609d679"
}
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