-
Notifications
You must be signed in to change notification settings - Fork 63
/
Copy pathcustomObject.ts
38 lines (30 loc) · 978 Bytes
/
customObject.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import { Argv } from 'yargs';
import { addGlobalOptions } from '../lib/commonOpts';
import * as schemaCommand from './customObject/schema';
import * as createCommand from './customObject/create';
import { i18n } from '../lib/lang';
import { logger } from '@hubspot/local-dev-lib/logger';
import { uiBetaTag, uiLink } from '../lib/ui';
export const command = ['custom-object', 'custom-objects', 'co'];
export const describe = uiBetaTag(
i18n(`commands.customObject.describe`),
false
);
function logBetaMessage() {
uiBetaTag(i18n(`commands.customObject.betaMessage`));
logger.log(
uiLink(
i18n(`commands.customObject.seeMoreLink`),
'https://developers.hubspot.com/docs/api/crm/crm-custom-objects'
)
);
logger.log();
}
export function builder(yargs: Argv): Argv {
addGlobalOptions(yargs);
yargs.middleware([logBetaMessage]);
yargs.command(schemaCommand);
yargs.command(createCommand);
yargs.demandCommand(1, '');
return yargs;
}