chalk#magenta TypeScript Examples
The following examples show how to use
chalk#magenta.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: list.ts From cli with Apache License 2.0 | 5 votes |
@Trackable()
@Preconditions(IsAuthenticated())
public async run() {
CliUx.ux.warn(`${magenta('deprecated')} Use ${SourceList.id} instead`);
const {flags} = await this.parse(SourcePushList);
const authenticatedClient = new AuthenticatedClient();
const org = (await authenticatedClient.cfg.get()).organization;
const platformClient = await authenticatedClient.getClient();
const sources = await platformClient.source.list({
filterHostType: FilterHostType.PUSH,
});
if (sources.totalEntries === 0) {
this.log(
dedent(`
There is no push source in organization ${org}
You can create one using source:push:new
`)
);
return;
}
CliUx.ux.table(
this.flattenSourceModels(sources.sourceModels),
{
id: {},
name: {},
owner: {},
sourceVisibility: {
header: 'Source visibility',
},
status: {},
numberOfDocuments: {
header: 'Number of documents',
},
},
{...flags}
);
}
Example #2
Source File: list.ts From cli with Apache License 2.0 | 5 votes |
public static description = `${magenta(
'[Deprecated]'
)} List all available push sources in your Coveo organization`;