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

@hubspot/cms-lib

Package Overview
Dependencies
Maintainers
10
Versions
115
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hubspot/cms-lib - npm Package Compare versions

Comparing version 0.0.21-beta.1 to 0.0.22-beta.0

api/blogs.js

13

api/designManager.js

@@ -10,2 +10,14 @@ const http = require('../http');

*/
async function fetchMenus(portalId, query = {}) {
return http.get(portalId, {
uri: `${DESIGN_MANAGER_API_PATH}/menus`,
query,
});
}
/**
* @async
* @param {number} portalId
* @returns {Promise}
*/
async function fetchBuiltinMapping(portalId) {

@@ -19,2 +31,3 @@ return http.get(portalId, {

fetchBuiltinMapping,
fetchMenus,
};

@@ -24,2 +24,13 @@ const fs = require('fs-extra');

}
if (typeof source !== 'string') {
// JSON responses will have already been parsed.
// TODO: Directly write the stream so we don't lose fidelity like whitespace.
try {
source = JSON.stringify(source, null, 2);
} catch (err) {
throw new TypeError(
`Unable to parse "${filePath}" source: ${typeof source}`
);
}
}
const node = {

@@ -26,0 +37,0 @@ source,

15

http.js

@@ -69,4 +69,17 @@ const request = require('request-promise-native');

const addQueryParams = (requestOptions, params = {}) => {
const { qs } = requestOptions;
return {
...requestOptions,
qs: {
...qs,
...params,
},
};
};
const getRequest = async (portalId, options) => {
return request.get(await withAuth(portalId, options));
const { query, ...rest } = options;
const requestOptions = addQueryParams(rest, query);
return request.get(await withAuth(portalId, requestOptions));
};

@@ -73,0 +86,0 @@

4

package.json
{
"name": "@hubspot/cms-lib",
"version": "0.0.21-beta.1",
"version": "0.0.22-beta.0",
"description": "Library for working with the HubSpot CMS",

@@ -26,3 +26,3 @@ "license": "Apache-2.0",

},
"gitHead": "d1be995482c0d9334d494718df89d36cd5bd986f"
"gitHead": "8c4960b91d6badcafc71af98c18a2597ec4bf67a"
}
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