@hubspot/cli 4.1.2 → 4.1.3-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/commands/customObject.js +18 -9
- package/lib/ui.js +10 -1
- package/package.json +4 -4
package/commands/customObject.js
CHANGED
|
@@ -1,30 +1,39 @@
|
|
|
1
|
+
const chalk = require('chalk');
|
|
1
2
|
const { addConfigOptions, addAccountOptions } = require('../lib/commonOpts');
|
|
2
3
|
const schemaCommand = require('./customObject/schema');
|
|
3
4
|
const createCommand = require('./customObject/create');
|
|
4
5
|
const { i18n } = require('@hubspot/cli-lib/lib/lang');
|
|
6
|
+
const { logger } = require('@hubspot/cli-lib/logger');
|
|
7
|
+
const { uiBetaWarning } = require('../lib/ui');
|
|
5
8
|
|
|
6
9
|
const i18nKey = 'cli.commands.customObject';
|
|
7
10
|
|
|
8
11
|
exports.command = ['custom-object', 'custom', 'co'];
|
|
9
12
|
exports.describe = i18n(`${i18nKey}.describe`);
|
|
10
13
|
|
|
14
|
+
const logBetaMessage = () => {
|
|
15
|
+
uiBetaWarning(() => {
|
|
16
|
+
logger.log(chalk.reset.yellow(i18n(`${i18nKey}.betaMessage`)));
|
|
17
|
+
logger.log(
|
|
18
|
+
chalk.reset.yellow(
|
|
19
|
+
i18n(`${i18nKey}.seeMoreLink`, {
|
|
20
|
+
link:
|
|
21
|
+
'https://developers.hubspot.com/docs/api/crm/crm-custom-objects',
|
|
22
|
+
})
|
|
23
|
+
)
|
|
24
|
+
);
|
|
25
|
+
});
|
|
26
|
+
};
|
|
27
|
+
|
|
11
28
|
exports.builder = yargs => {
|
|
12
29
|
addConfigOptions(yargs, true);
|
|
13
30
|
addAccountOptions(yargs, true);
|
|
14
31
|
|
|
15
32
|
yargs
|
|
33
|
+
.middleware([logBetaMessage])
|
|
16
34
|
.command(schemaCommand)
|
|
17
35
|
.command(createCommand)
|
|
18
36
|
.demandCommand(1, '');
|
|
19
37
|
|
|
20
|
-
console.warn(i18n(`${i18nKey}.warning`));
|
|
21
|
-
console.warn(i18n(`${i18nKey}.betaMessage`));
|
|
22
|
-
console.warn(
|
|
23
|
-
i18n(`${i18nKey}.seeMoreLink`, {
|
|
24
|
-
link: 'https://developers.hubspot.com/docs/api/crm/crm-custom-objects',
|
|
25
|
-
})
|
|
26
|
-
);
|
|
27
|
-
console.warn(i18n(`${i18nKey}.warning`));
|
|
28
|
-
|
|
29
38
|
return yargs;
|
|
30
39
|
};
|
package/lib/ui.js
CHANGED
|
@@ -49,7 +49,7 @@ const uiLink = (linkText, url) => {
|
|
|
49
49
|
return terminalUISupport.color ? chalk.cyan(result) : result;
|
|
50
50
|
} else {
|
|
51
51
|
return terminalUISupport.color
|
|
52
|
-
? `${linkText}: ${chalk.cyan(encodedUrl)}`
|
|
52
|
+
? `${linkText}: ${chalk.reset.cyan(encodedUrl)}`
|
|
53
53
|
: `${linkText}: ${encodedUrl}`;
|
|
54
54
|
}
|
|
55
55
|
};
|
|
@@ -93,8 +93,17 @@ const uiFeatureHighlight = (commands, title) => {
|
|
|
93
93
|
});
|
|
94
94
|
};
|
|
95
95
|
|
|
96
|
+
const uiBetaWarning = logMessage => {
|
|
97
|
+
const i18nKey = 'cli.lib.ui.betaWarning';
|
|
98
|
+
|
|
99
|
+
logger.log(i18n(`${i18nKey}.header`));
|
|
100
|
+
logMessage();
|
|
101
|
+
logger.log(i18n(`${i18nKey}.footer`));
|
|
102
|
+
};
|
|
103
|
+
|
|
96
104
|
module.exports = {
|
|
97
105
|
uiAccountDescription,
|
|
106
|
+
uiBetaWarning,
|
|
98
107
|
uiFeatureHighlight,
|
|
99
108
|
uiInfoSection,
|
|
100
109
|
uiLine,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hubspot/cli",
|
|
3
|
-
"version": "4.1.
|
|
3
|
+
"version": "4.1.3-beta.0",
|
|
4
4
|
"description": "CLI for working with HubSpot",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
"url": "https://github.com/HubSpot/hubspot-cms-tools"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@hubspot/cli-lib": "4.1.
|
|
12
|
-
"@hubspot/serverless-dev-runtime": "4.1.
|
|
11
|
+
"@hubspot/cli-lib": "4.1.3-beta.0",
|
|
12
|
+
"@hubspot/serverless-dev-runtime": "4.1.3-beta.0",
|
|
13
13
|
"archiver": "^5.3.0",
|
|
14
14
|
"chalk": "^4.1.2",
|
|
15
15
|
"express": "^4.17.1",
|
|
@@ -37,5 +37,5 @@
|
|
|
37
37
|
"publishConfig": {
|
|
38
38
|
"access": "public"
|
|
39
39
|
},
|
|
40
|
-
"gitHead": "
|
|
40
|
+
"gitHead": "1fa007888ab796fb8a6905e7a3112a1d1144085d"
|
|
41
41
|
}
|