UNPKG

sfdx-hardis

Version:

Swiss-army-knife Toolbox for Salesforce. Allows you to define a complete CD/CD Pipeline. Orchestrate base commands and assist users with interactive wizards

13 lines (12 loc) 1.22 kB
import { SfCommand } from '@salesforce/sf-plugins-core'; export type HelloWorldResult = { name: string; time: string; }; export default class World extends SfCommand<HelloWorldResult> { static readonly summary: string; static readonly description = "\n## Command Behavior\n\n**Says hello to the world or a specified person.**\n\nThis is a simple command used for demonstration purposes. It outputs a greeting message to the console.\n\nKey functionalities:\n\n- **Customizable Greeting:** You can specify a name using the `--name` flag to personalize the greeting.\n- **Timestamp:** The greeting includes the current date.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **Flag Parsing:** It parses the `--name` flag to get the recipient of the greeting.\n- **Date Retrieval:** It gets the current date using `new Date().toDateString()`.\n- **Console Output:** It constructs the greeting message using the provided name and the current date, and then logs it to the console using `this.log()`.\n</details>\n"; static readonly examples: string[]; static readonly flags: any; run(): Promise<HelloWorldResult>; }