Skip to content

Commit

Permalink
Merge branch 'main' of github.com:HubSpot/hubspot-cli into jy/add-pro…
Browse files Browse the repository at this point in the history
…ject-translation
  • Loading branch information
joe-yeager committed Jan 9, 2025
2 parents 5707bd6 + af6eee1 commit 476f4da
Show file tree
Hide file tree
Showing 8 changed files with 136 additions and 56 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# @hubspot/cli

[![Official Release](https://img.shields.io/npm/v/@hubspot/cli/latest?label=Official%20Release)](https://www.npmjs.com/package/@hubspot/cli) [![Latest Version](https://img.shields.io/github/v/tag/hubspot/hubspot-cli?label=Latest%20Version)](https://www.npmjs.com/package/@hubspot/cli?activeTab=versions)
[![Official Release](https://img.shields.io/npm/v/@hubspot/cli/latest?label=Official%20Release)](https://www.npmjs.com/package/@hubspot/cli) [![Latest Beta Version](https://img.shields.io/npm/v/@hubspot/cli/next?label=Latest%20Beta%20Version)](https://www.npmjs.com/package/@hubspot/cli?activeTab=versions)

A CLI for HubSpot developers to enable local development and automation. [Learn more about building on HubSpot](https://developers.hubspot.com).

Expand Down Expand Up @@ -58,14 +58,15 @@ There are two ways that the tools can authenticate with HubSpot.
3. Select `OAuth2` and follow the steps

_**Note:** The Account ID used should be the Test Account ID (not the developer app ID). Client ID and Client Secret are from the developer app._

### Exit Codes

The CLI will exit with one of the following exit codes:

- `0`: A successful run
- `1`: There was a config problem or an internal error
- `2`: There are warnings or validation issues


## Changelog

The best way to stay up to date is to check out the [Github Releases](https://github.com/HubSpot/hubspot-cli/releases) and also follow our [developer changelog posts](https://developers.hubspot.com/changelog) for an easier to read breakdown of major changes.
4 changes: 2 additions & 2 deletions acceptance-tests/tests/workflows/secretsFlow.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ const SECRET = {
};

const secretPollingOptions = {
interval: 2000,
timeout: 20000,
interval: 5000,
timeout: 60000,
};

async function waitForSecretsListToContainSecret(testState: TestState) {
Expand Down
8 changes: 5 additions & 3 deletions commands/customObject/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,14 @@ exports.describe = i18n(`${i18nKey}.describe`);
exports.handler = async options => {
const { path, name: providedName, derivedAccountId } = options;
let definitionPath = path;
let name = providedName;

trackCommandUsage('custom-object-batch-create', null, derivedAccountId);

if (!name) {
name = await inputPrompt(i18n(`${i18nKey}.inputName`));
}

if (!definitionPath) {
definitionPath = await inputPrompt(i18n(`${i18nKey}.inputPath`));
}
Expand All @@ -34,9 +39,6 @@ exports.handler = async options => {
process.exit(EXIT_CODES.ERROR);
}

const name =
providedName || (await inputPrompt(i18n(`${i18nKey}.inputSchema`)));

try {
await batchCreateObjects(derivedAccountId, name, objectJson);
logger.success(i18n(`${i18nKey}.success.objectsCreated`));
Expand Down
4 changes: 2 additions & 2 deletions commands/hubdb/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ exports.handler = async options => {

let filePath;
try {
const { path: filePath } =
const filePath =
'path' in options
? path.resolve(getCwd(), options.path)
: await selectPathPrompt(options);
: path.resolve(getCwd(), (await selectPathPrompt(options)).path);
if (!checkAndConvertToJson(filePath)) {
process.exit(EXIT_CODES.ERROR);
}
Expand Down
2 changes: 1 addition & 1 deletion commands/project/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ exports.handler = async options => {
latestBuild.buildId === deployedBuildId
? undefined
: latestBuild.buildId,
validate: () =>
validate: buildId =>
validateBuildId(
buildId,
deployedBuildId,
Expand Down
4 changes: 2 additions & 2 deletions lang/en.lyaml
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,8 @@ en:
describe: "Schema name to add the object instance to"
success:
objectsCreated: "Objects created"
inputSchema: "What would you like to name the schema?"
inputPath: "[--path] Where is the JSON file containing the object definitions?"
inputName: "[--name] Enter the name of the schema for the custom object(s) you'd like to create:"
inputPath: "[--path] Enter the path to the JSON file containing the object definitions:"
schema:
describe: "Commands for managing custom object schemas."
subcommands:
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"name": "@hubspot/cli",
"version": "7.0.1-experimental.0",
"version": "7.0.0-beta.0",
"description": "The official CLI for developing on HubSpot",
"license": "Apache-2.0",
"repository": "https://github.com/HubSpot/hubspot-cli",
"dependencies": {
"@hubspot/local-dev-lib": "3.1.0",
"@hubspot/project-parsing-lib": "0.0.1",
"@hubspot/serverless-dev-runtime": "7.0.0",
"@hubspot/serverless-dev-runtime": "7.0.1",
"@hubspot/theme-preview-dev-server": "0.0.10",
"@hubspot/ui-extensions-dev-server": "0.8.33",
"@hubspot/ui-extensions-dev-server": "0.8.40",
"archiver": "^7.0.1",
"chalk": "^4.1.2",
"chokidar": "^3.0.1",
Expand Down
Loading

0 comments on commit 476f4da

Please sign in to comment.