Socket
Socket
Sign inDemoInstall

@hubspot/cms-lib

Package Overview
Dependencies
Maintainers
13
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 2.0.2-beta.0 to 2.0.2-beta.1

__tests__/__snapshots__/schema.js.snap

4

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

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

},
"gitHead": "24034a03b99779398a995a28155663641d5a2d4c"
"gitHead": "0b8b2ffb98fd120a9e0830ea3ca1a5189ddce9b4"
}

@@ -28,11 +28,31 @@ const fs = require('fs-extra');

const writeSchemaToDisk = (schema, dest) => {
const fullPath = path.resolve(getCwd(), dest || '', `${schema.name}.json`);
const cleanSchema = schema => {
const parsedSchema = {};
parsedSchema.name = schema.name;
parsedSchema.labels = schema.labels;
parsedSchema.requiredProperties = schema.requiredProperties;
parsedSchema.searchableProperties = schema.searchableProperties;
parsedSchema.primaryDisplayProperty = schema.primaryDisplayProperty;
parsedSchema.associatedObjects = schema.associatedObjects;
parsedSchema.properties = schema.properties
.filter(p => !p.name.startsWith('hs_'))
.map(p => ({
name: p.name,
label: p.label,
type: p.type,
fieldType: p.fieldType,
description: p.description,
}));
return parsedSchema;
};
const writeSchemaToDisk = (schema, dest) =>
fs.outputFileSync(
fullPath,
prettier.format(JSON.stringify(schema), {
path.resolve(getCwd(), dest || '', `${schema.name}.json`),
prettier.format(JSON.stringify(cleanSchema(schema)), {
parser: 'json',
})
);
};

@@ -62,4 +82,5 @@ const listSchemas = async portalId => {

listSchemas,
cleanSchema,
downloadSchemas,
downloadSchema,
};
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