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

@base-cms/base4-rest-api

Package Overview
Dependencies
Maintainers
2
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@base-cms/base4-rest-api - npm Package Compare versions

Comparing version 1.0.0-beta.5 to 1.0.0-beta.6

4

package.json
{
"name": "@base-cms/base4-rest-api",
"version": "1.0.0-beta.5",
"version": "1.0.0-beta.6",
"description": "A Base4 REST API client.",

@@ -23,3 +23,3 @@ "main": "src/index.js",

},
"gitHead": "bfe40af02b077c4d143195ca9e4d6c319f9ee4db"
"gitHead": "bea84c918c2ff89f92c185159affca39e3c35717"
}

@@ -12,3 +12,3 @@ const fetch = require('node-fetch');

constructor({
hostname,
uri,
username,

@@ -19,4 +19,4 @@ password,

} = {}) {
if (!hostname || !username || !password) throw new Error('A hostname, username, and password are required for the Base REST API.');
this.hostname = hostname.replace('http://', '').replace('https://', '').replace(/\/+$/, '');
if (!uri || !username || !password) throw new Error('A uri, username, and password are required for the Base REST API.');
this.uri = uri.replace(/\/+$/, '');
this.username = username;

@@ -168,3 +168,3 @@ this.password = password;

if (!endpoint) throw new Error('An API endpoint is required.');
return `https://${this.hostname}/${cleanPath(this.baseEndpoint)}/${type}/${cleanPath(endpoint)}`;
return `${this.uri}/${cleanPath(this.baseEndpoint)}/${type}/${cleanPath(endpoint)}`;
}

@@ -171,0 +171,0 @@

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