Socket
Socket
Sign inDemoInstall

@hubspot/cms-cli

Package Overview
Dependencies
Maintainers
11
Versions
134
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hubspot/cms-cli - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3-beta.4

bin/hs-init.js

37

commands/auth.js

@@ -23,40 +23,7 @@ const { version } = require('../package.json');

} = require('../lib/usageTracking');
const { PORTAL_ID, CLIENT_ID, CLIENT_SECRET } = require('../lib/prompts');
const getAuthContext = async () => {
const prompt = inquirer.createPromptModule();
return prompt([
{
name: 'portalId',
message: 'Enter the HubSpot CMS portal ID:',
type: 'number',
validate(val) {
if (!Number.isNaN(val) && val > 0) {
return true;
}
return 'A HubSpot portal ID must be provided.';
},
},
{
name: 'clientId',
message: 'Enter your OAuth2 client ID:',
validate(val) {
if (typeof val !== 'string' || val.length !== 36) {
return 'The OAuth2 client ID is 36 characters long. Please try again.';
}
return true;
},
},
{
name: 'clientSecret',
message: 'Enter your OAuth2 client secret:',
validate(val) {
if (typeof val !== 'string' || val.length !== 36) {
return 'The OAuth2 client secret is 36 characters long. Please try again.';
} else if (val[0] === '*') {
return 'Please copy actual OAuth2 client secret not the asterisks used to hide it.';
}
return true;
},
},
]);
return prompt([PORTAL_ID, CLIENT_ID, CLIENT_SECRET]);
};

@@ -63,0 +30,0 @@

@@ -9,2 +9,5 @@ const { version } = require('../package.json');

.description('Tools for working with the HubSpot CMS')
.command('init', 'initialize a hubspot config file', {
noHelp: true,
})
.command('auth [type]', 'configure authentication with HubSpot')

@@ -11,0 +14,0 @@ .command('upload <src> <dest>', 'upload a file or folder to HubSpot')

{
"name": "@hubspot/cms-cli",
"version": "1.0.2",
"version": "1.0.3-beta.4",
"description": "CLI for interacting with the HubSpot CMS",

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

"@hubspot/api-auth-lib": "^1.0.2",
"@hubspot/cms-lib": "^1.0.2",
"@hubspot/cms-lib": "^1.0.3-beta.4",
"commander": "^2.16.0",

@@ -29,3 +29,3 @@ "inquirer": "^6.3.1",

},
"gitHead": "f5075f2d00c58fe94c9becb3e6df9c8a28cafc40"
"gitHead": "b65246f5191a992b22a0e480d9cb27a3e1fbc492"
}
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