@hubspot/cms-cli
Advanced tools
Comparing version 1.0.2 to 1.0.3-beta.4
@@ -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" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
60135
60
1741
2
1