UNPKG

@salesforce/plugin-templates

Version:

Commands to create metadata from a default or custom template

1,248 lines 109 kB
{ "commands": { "template:generate:analytics:template": { "aliases": [ "force:analytics:template:create", "analytics:generate:template" ], "args": {}, "deprecateAliases": true, "description": "The metadata files associated with the Analytics template must be contained in a parent directory called \"waveTemplates\" in your package directory. Either run this command from an existing directory of this name, or use the --output-dir flag to generate one or point to an existing one.", "examples": [ "Generate the metadata files for a simple Analytics template file called myTemplate in the force-app/main/default/waveTemplates directory:\n<%= config.bin %> <%= command.id %> --name myTemplate --output-dir force-app/main/default/waveTemplates" ], "flags": { "json": { "description": "Format output as json.", "helpGroup": "GLOBAL", "name": "json", "allowNo": false, "type": "boolean" }, "flags-dir": { "helpGroup": "GLOBAL", "name": "flags-dir", "summary": "Import flag values from a directory.", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "output-dir": { "aliases": [ "outputdir" ], "char": "d", "deprecateAliases": true, "description": "The location can be an absolute path or relative to the current working directory. The default is the current directory.", "name": "output-dir", "summary": "Directory for saving the created files.", "default": ".", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "api-version": { "aliases": [ "apiversion" ], "deprecateAliases": true, "description": "Override the api version used for api requests made by this command", "name": "api-version", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "name": { "aliases": [ "templatename" ], "char": "n", "deprecateAliases": true, "name": "name", "required": true, "summary": "Name of the Analytics template.", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "loglevel": { "deprecated": { "message": "The loglevel flag is no longer in use on this command. You may use it without error, but it will be ignored.\nSet the log level using the `SFDX_LOG_LEVEL` environment variable." }, "hidden": true, "name": "loglevel", "hasDynamicHelp": false, "multiple": false, "type": "option" } }, "hasDynamicHelp": false, "hiddenAliases": [], "id": "template:generate:analytics:template", "pluginAlias": "@salesforce/plugin-templates", "pluginName": "@salesforce/plugin-templates", "pluginType": "core", "strict": true, "summary": "Generate a simple Analytics template.", "enableJsonFlag": true, "isESM": true, "relativePath": [ "lib", "commands", "template", "generate", "analytics", "template.js" ], "aliasPermutations": [ "force:analytics:template:create", "analytics:force:template:create", "analytics:template:force:create", "analytics:template:create:force", "force:template:analytics:create", "template:force:analytics:create", "template:analytics:force:create", "template:analytics:create:force", "force:template:create:analytics", "template:force:create:analytics", "template:create:force:analytics", "template:create:analytics:force", "force:analytics:create:template", "analytics:force:create:template", "analytics:create:force:template", "analytics:create:template:force", "force:create:analytics:template", "create:force:analytics:template", "create:analytics:force:template", "create:analytics:template:force", "force:create:template:analytics", "create:force:template:analytics", "create:template:force:analytics", "create:template:analytics:force", "analytics:generate:template", "generate:analytics:template", "generate:template:analytics", "analytics:template:generate", "template:analytics:generate", "template:generate:analytics" ], "permutations": [ "template:generate:analytics:template", "generate:template:analytics:template", "generate:analytics:template:template", "generate:analytics:template:template", "template:analytics:generate:template", "analytics:template:generate:template", "analytics:generate:template:template", "analytics:generate:template:template", "template:analytics:template:generate", "analytics:template:template:generate", "analytics:template:template:generate", "analytics:template:generate:template", "template:generate:template:analytics", "generate:template:template:analytics", "generate:template:template:analytics", "generate:template:analytics:template", "template:template:generate:analytics", "template:template:generate:analytics", "template:generate:template:analytics", "template:generate:analytics:template", "template:template:analytics:generate", "template:template:analytics:generate", "template:analytics:template:generate", "template:analytics:generate:template" ] }, "template:generate:apex:class": { "aliases": [ "force:apex:class:create", "apex:generate:class" ], "args": {}, "deprecateAliases": true, "description": "Generates the Apex *.cls file and associated metadata file. These files must be contained in a parent directory called \"classes\" in your package directory. Either run this command from an existing directory of this name, or use the --output-dir flag to generate one or point to an existing one.", "examples": [ "Generate two metadata files associated with the MyClass Apex class (MyClass.cls and MyClass.cls-meta.xml) in the current directory:\n<%= config.bin %> <%= command.id %> --name MyClass", "Similar to previous example, but generates the files in the \"force-app/main/default/classes\" directory:\n<%= config.bin %> <%= command.id %> --name MyClass --output-dir force-app/main/default/classes" ], "flags": { "json": { "description": "Format output as json.", "helpGroup": "GLOBAL", "name": "json", "allowNo": false, "type": "boolean" }, "flags-dir": { "helpGroup": "GLOBAL", "name": "flags-dir", "summary": "Import flag values from a directory.", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "name": { "aliases": [ "classname" ], "char": "n", "deprecateAliases": true, "description": "The name can be up to 40 characters and must start with a letter.", "name": "name", "required": true, "summary": "Name of the generated Apex class.", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "template": { "char": "t", "description": "Supplied parameter values or default values are filled into a copy of the template.", "name": "template", "summary": "Template to use for file creation.", "default": "DefaultApexClass", "hasDynamicHelp": false, "multiple": false, "options": [ "ApexException", "ApexUnitTest", "BasicUnitTest", "DefaultApexClass", "InboundEmailService" ], "type": "option" }, "output-dir": { "aliases": [ "outputdir" ], "char": "d", "deprecateAliases": true, "description": "The location can be an absolute path or relative to the current working directory. The default is the current directory.", "name": "output-dir", "summary": "Directory for saving the created files.", "default": ".", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "api-version": { "aliases": [ "apiversion" ], "deprecateAliases": true, "description": "Override the api version used for api requests made by this command", "name": "api-version", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "loglevel": { "deprecated": { "message": "The loglevel flag is no longer in use on this command. You may use it without error, but it will be ignored.\nSet the log level using the `SFDX_LOG_LEVEL` environment variable." }, "hidden": true, "name": "loglevel", "hasDynamicHelp": false, "multiple": false, "type": "option" } }, "hasDynamicHelp": false, "hiddenAliases": [], "id": "template:generate:apex:class", "pluginAlias": "@salesforce/plugin-templates", "pluginName": "@salesforce/plugin-templates", "pluginType": "core", "strict": true, "summary": "Generate an Apex class.", "enableJsonFlag": true, "isESM": true, "relativePath": [ "lib", "commands", "template", "generate", "apex", "class.js" ], "aliasPermutations": [ "force:apex:class:create", "apex:force:class:create", "apex:class:force:create", "apex:class:create:force", "force:class:apex:create", "class:force:apex:create", "class:apex:force:create", "class:apex:create:force", "force:class:create:apex", "class:force:create:apex", "class:create:force:apex", "class:create:apex:force", "force:apex:create:class", "apex:force:create:class", "apex:create:force:class", "apex:create:class:force", "force:create:apex:class", "create:force:apex:class", "create:apex:force:class", "create:apex:class:force", "force:create:class:apex", "create:force:class:apex", "create:class:force:apex", "create:class:apex:force", "apex:generate:class", "generate:apex:class", "generate:class:apex", "apex:class:generate", "class:apex:generate", "class:generate:apex" ], "permutations": [ "template:generate:apex:class", "generate:template:apex:class", "generate:apex:template:class", "generate:apex:class:template", "template:apex:generate:class", "apex:template:generate:class", "apex:generate:template:class", "apex:generate:class:template", "template:apex:class:generate", "apex:template:class:generate", "apex:class:template:generate", "apex:class:generate:template", "template:generate:class:apex", "generate:template:class:apex", "generate:class:template:apex", "generate:class:apex:template", "template:class:generate:apex", "class:template:generate:apex", "class:generate:template:apex", "class:generate:apex:template", "template:class:apex:generate", "class:template:apex:generate", "class:apex:template:generate", "class:apex:generate:template" ] }, "template:generate:apex:trigger": { "aliases": [ "force:apex:trigger:create", "apex:generate:trigger" ], "args": {}, "deprecateAliases": true, "description": "Generates the Apex trigger *.trigger file and associated metadata file. These files must be contained in a parent directory called \"triggers\" in your package directory. Either run this command from an existing directory of this name, or use the --output-dir flag to generate one or point to an existing one.\n\nIf you don't specify the --sobject flag, the .trigger file contains the generic placeholder SOBJECT; replace it with the Salesforce object you want to generate a trigger for. If you don't specify --event, \"before insert\" is used.", "examples": [ "Generate two files associated with the MyTrigger Apex trigger (MyTrigger.trigger and MyTrigger.trigger-meta.xml) in the current directory:\n<%= config.bin %> <%= command.id %> --name MyTrigger", "Similar to the previous example, but generate the files in the \"force-app/main/default/triggers\" directory:\n<%= config.bin %> <%= command.id %> --name MyTrigger --output-dir force-app/main/default/triggers", "Generate files for a trigger that fires on the Account object before and after an insert:\n<%= config.bin %> <%= command.id %> --name MyTrigger --sobject Account --event \"before insert,after insert\"" ], "flags": { "json": { "description": "Format output as json.", "helpGroup": "GLOBAL", "name": "json", "allowNo": false, "type": "boolean" }, "flags-dir": { "helpGroup": "GLOBAL", "name": "flags-dir", "summary": "Import flag values from a directory.", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "name": { "aliases": [ "triggername" ], "char": "n", "deprecateAliases": true, "description": "The name can be up to 40 characters and must start with a letter.", "name": "name", "required": true, "summary": "Name of the generated Apex trigger", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "template": { "char": "t", "description": "Supplied parameter values or default values are filled into a copy of the template.", "name": "template", "summary": "Template to use for file creation.", "default": "ApexTrigger", "hasDynamicHelp": false, "multiple": false, "options": [ "ApexTrigger" ], "type": "option" }, "output-dir": { "aliases": [ "outputdir" ], "char": "d", "deprecateAliases": true, "description": "The location can be an absolute path or relative to the current working directory. The default is the current directory.", "name": "output-dir", "summary": "Directory for saving the created files.", "default": ".", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "api-version": { "aliases": [ "apiversion" ], "deprecateAliases": true, "description": "Override the api version used for api requests made by this command", "name": "api-version", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "sobject": { "char": "s", "name": "sobject", "summary": "Salesforce object to generate a trigger on.", "default": "SOBJECT", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "event": { "aliases": [ "triggerevents" ], "char": "e", "deprecateAliases": true, "name": "event", "summary": "Events that fire the trigger.", "default": [ "before insert" ], "delimiter": ",", "hasDynamicHelp": false, "multiple": true, "options": [ "before insert", "before update", "before delete", "after insert", "after update", "after delete", "after undelete" ], "type": "option" }, "loglevel": { "deprecated": { "message": "The loglevel flag is no longer in use on this command. You may use it without error, but it will be ignored.\nSet the log level using the `SFDX_LOG_LEVEL` environment variable." }, "hidden": true, "name": "loglevel", "hasDynamicHelp": false, "multiple": false, "type": "option" } }, "hasDynamicHelp": false, "hiddenAliases": [], "id": "template:generate:apex:trigger", "pluginAlias": "@salesforce/plugin-templates", "pluginName": "@salesforce/plugin-templates", "pluginType": "core", "strict": true, "summary": "Generate an Apex trigger.", "enableJsonFlag": true, "isESM": true, "relativePath": [ "lib", "commands", "template", "generate", "apex", "trigger.js" ], "aliasPermutations": [ "force:apex:trigger:create", "apex:force:trigger:create", "apex:trigger:force:create", "apex:trigger:create:force", "force:trigger:apex:create", "trigger:force:apex:create", "trigger:apex:force:create", "trigger:apex:create:force", "force:trigger:create:apex", "trigger:force:create:apex", "trigger:create:force:apex", "trigger:create:apex:force", "force:apex:create:trigger", "apex:force:create:trigger", "apex:create:force:trigger", "apex:create:trigger:force", "force:create:apex:trigger", "create:force:apex:trigger", "create:apex:force:trigger", "create:apex:trigger:force", "force:create:trigger:apex", "create:force:trigger:apex", "create:trigger:force:apex", "create:trigger:apex:force", "apex:generate:trigger", "generate:apex:trigger", "generate:trigger:apex", "apex:trigger:generate", "trigger:apex:generate", "trigger:generate:apex" ], "permutations": [ "template:generate:apex:trigger", "generate:template:apex:trigger", "generate:apex:template:trigger", "generate:apex:trigger:template", "template:apex:generate:trigger", "apex:template:generate:trigger", "apex:generate:template:trigger", "apex:generate:trigger:template", "template:apex:trigger:generate", "apex:template:trigger:generate", "apex:trigger:template:generate", "apex:trigger:generate:template", "template:generate:trigger:apex", "generate:template:trigger:apex", "generate:trigger:template:apex", "generate:trigger:apex:template", "template:trigger:generate:apex", "trigger:template:generate:apex", "trigger:generate:template:apex", "trigger:generate:apex:template", "template:trigger:apex:generate", "trigger:template:apex:generate", "trigger:apex:template:generate", "trigger:apex:generate:template" ] }, "template:generate:digital-experience:site": { "aliases": [], "args": {}, "description": "Creates the metadata of an Experience Cloud site with the specified template, name, and URL path prefix. The output includes all the necessary metadata files, including DigitalExperienceConfig, DigitalExperienceBundle, Network, and CustomSite.\nUnlike `sf community create`, which builds the site directly in the org, this command generates only the local metadata.", "examples": [ "Generate an Experience Cloud site using the Build Your Own (LWR) template. The site is called \"mysite\" and has the URL path prefix \"mysite\":\n<%= config.bin %> <%= command.id %> --template-name \"Build Your Own (LWR)\" --name mysite --url-path-prefix mysite", "Generate an Experience Cloud site like the last example, but generate the files into the specified output directory:\n<%= config.bin %> <%= command.id %> --template-name \"Build Your Own (LWR)\" --name mysite --url-path-prefix mysite --output-dir force-app/main/default" ], "flags": { "json": { "description": "Format output as json.", "helpGroup": "GLOBAL", "name": "json", "allowNo": false, "type": "boolean" }, "flags-dir": { "helpGroup": "GLOBAL", "name": "flags-dir", "summary": "Import flag values from a directory.", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "target-org": { "char": "o", "name": "target-org", "noCacheDefault": true, "summary": "Username or alias of the target org.", "hasDynamicHelp": true, "multiple": false, "type": "option" }, "name": { "char": "n", "name": "name", "required": true, "summary": "Name of the Experience Cloud site to generate.", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "template-name": { "char": "t", "name": "template-name", "required": true, "summary": "Template to use when generating the site.", "hasDynamicHelp": false, "multiple": false, "options": [ "Build Your Own (LWR)" ], "type": "option" }, "url-path-prefix": { "char": "p", "name": "url-path-prefix", "summary": "URL path prefix for the site; must contain only alphanumeric characters.", "default": "", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "admin-email": { "char": "e", "name": "admin-email", "summary": "Email address for the site administrator. Defaults to the username of the currently authenticated user.", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "output-dir": { "char": "d", "description": "The location can be an absolute path or relative to the current working directory. If not specified, the command reads your sfdx-project.json file and uses the default package directory. When running outside a Salesforce DX project, defaults to the current directory.", "name": "output-dir", "summary": "Directory to generate the site files in.", "hasDynamicHelp": false, "multiple": false, "type": "option" } }, "hasDynamicHelp": true, "hiddenAliases": [], "id": "template:generate:digital-experience:site", "pluginAlias": "@salesforce/plugin-templates", "pluginName": "@salesforce/plugin-templates", "pluginType": "core", "state": "preview", "strict": true, "summary": "Generate an Experience Cloud site.", "enableJsonFlag": true, "isESM": true, "relativePath": [ "lib", "commands", "template", "generate", "digital-experience", "site.js" ], "aliasPermutations": [], "permutations": [ "template:generate:digital-experience:site", "generate:template:digital-experience:site", "generate:digital-experience:template:site", "generate:digital-experience:site:template", "template:digital-experience:generate:site", "digital-experience:template:generate:site", "digital-experience:generate:template:site", "digital-experience:generate:site:template", "template:digital-experience:site:generate", "digital-experience:template:site:generate", "digital-experience:site:template:generate", "digital-experience:site:generate:template", "template:generate:site:digital-experience", "generate:template:site:digital-experience", "generate:site:template:digital-experience", "generate:site:digital-experience:template", "template:site:generate:digital-experience", "site:template:generate:digital-experience", "site:generate:template:digital-experience", "site:generate:digital-experience:template", "template:site:digital-experience:generate", "site:template:digital-experience:generate", "site:digital-experience:template:generate", "site:digital-experience:generate:template" ] }, "template:generate:flexipage": { "aliases": [], "args": {}, "description": "FlexiPages are the metadata types associated with a Lightning page. A Lightning page represents a customizable screen made up of regions containing Lightning components.\n\nYou can use this command to generate these types of FlexiPages; specify the type with the --template flag:\n\n- AppPage: A Lightning page used as the home page for a custom app or a standalone application page.\n- HomePage: A Lightning page used to override the Home page in Lightning Experience.\n- RecordPage: A Lightning page used to override an object record page in Lightning Experience. Requires that you specify the object name with the --sobject flag.", "examples": [ "Generate a RecordPage FlexiPage for the Account object in the current directory:\n<%= config.bin %> <%= command.id %> --name Account_Record_Page --template RecordPage --sobject Account", "Generate an AppPage FlexiPage in the \"force-app/main/default/flexipages\" directory:\n<%= config.bin %> <%= command.id %> --name Sales_Dashboard --template AppPage --output-dir force-app/main/default/flexipages", "Generate a HomePage FlexiPage with a custom label:\n<%= config.bin %> <%= command.id %> --name Custom_Home --template HomePage --label \"Sales Home Page\"", "Generate a RecordPage with dynamic highlights and detail fields:\n<%= config.bin %> <%= command.id %> --name Property_Page --template RecordPage --sobject Rental_Property__c --primary-field Name --secondary-fields Property_Address__c,City__c --detail-fields Name,Property_Address__c,City__c,Monthly_Rent__c,Bedrooms__c" ], "flags": { "json": { "description": "Format output as json.", "helpGroup": "GLOBAL", "name": "json", "allowNo": false, "type": "boolean" }, "flags-dir": { "helpGroup": "GLOBAL", "name": "flags-dir", "summary": "Import flag values from a directory.", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "name": { "aliases": [ "flexipagename" ], "char": "n", "deprecateAliases": true, "description": "The name can contain only alphanumeric characters, must start with a letter, and can't end with an underscore or contain two consecutive underscores.", "name": "name", "required": true, "summary": "Name of the FlexiPage.", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "template": { "char": "t", "name": "template", "required": true, "summary": "Template type for the FlexiPage.", "hasDynamicHelp": false, "multiple": false, "options": [ "RecordPage", "AppPage", "HomePage" ], "type": "option" }, "output-dir": { "aliases": [ "outputdir" ], "char": "d", "deprecateAliases": true, "description": "The location can be an absolute path or relative to the current working directory. The default is the current directory.", "name": "output-dir", "summary": "Directory for saving the created files.", "default": ".", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "api-version": { "aliases": [ "apiversion" ], "deprecateAliases": true, "description": "Override the api version used for api requests made by this command", "name": "api-version", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "label": { "aliases": [ "masterlabel" ], "deprecateAliases": true, "name": "label", "summary": "Label of this FlexiPage; if not specified, uses the FlexiPage name as the label.", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "description": { "name": "description", "summary": "Description for the FlexiPage, which provides context about its purpose.", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "sobject": { "aliases": [ "entity-name", "entity" ], "char": "s", "deprecateAliases": true, "description": "For RecordPage FlexiPages, you must specify the associated object API name, such as 'Account', 'Opportunity', or 'Custom_Object__c'. This sets the `sobjectType` field in the FlexiPage metadata.", "name": "sobject", "summary": "API name of the Salesforce object; required when creating a RecordPage.", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "primary-field": { "name": "primary-field", "summary": "Primary field for the dynamic highlights header; typically 'Name'. Used only with RecordPage.", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "secondary-fields": { "name": "secondary-fields", "summary": "Secondary fields shown in the dynamic highlights header. Specify multiple fields separated by commas. Maximum of 11 fields. Used only with RecordPage.", "delimiter": ",", "hasDynamicHelp": false, "multiple": true, "type": "option" }, "detail-fields": { "name": "detail-fields", "summary": "Fields to display in the Details tab. Specify multiple fields separated by commas. Fields are split into two columns. Used only with RecordPage.", "delimiter": ",", "hasDynamicHelp": false, "multiple": true, "type": "option" }, "internal": { "char": "i", "hidden": true, "name": "internal", "summary": "Generate lightning bundles without creating a -meta.xml file.", "allowNo": false, "type": "boolean" }, "loglevel": { "deprecated": { "message": "The loglevel flag is no longer in use on this command. You may use it without error, but it will be ignored.\nSet the log level using the `SFDX_LOG_LEVEL` environment variable." }, "hidden": true, "name": "loglevel", "hasDynamicHelp": false, "multiple": false, "type": "option" } }, "hasDynamicHelp": false, "hiddenAliases": [], "id": "template:generate:flexipage", "pluginAlias": "@salesforce/plugin-templates", "pluginName": "@salesforce/plugin-templates", "pluginType": "core", "state": "beta", "strict": true, "summary": "Generate a FlexiPage, also known as a Lightning page.", "enableJsonFlag": true, "MAX_SECONDARY_FIELDS": 11, "isESM": true, "relativePath": [ "lib", "commands", "template", "generate", "flexipage", "index.js" ], "aliasPermutations": [], "permutations": [ "template:generate:flexipage", "generate:template:flexipage", "generate:flexipage:template", "template:flexipage:generate", "flexipage:template:generate", "flexipage:generate:template" ] }, "template:generate:lightning:app": { "aliases": [ "force:lightning:app:create", "lightning:generate:app" ], "args": {}, "deprecateAliases": true, "description": "Generates a Lightning App bundle in the specified directory or the current working directory. The bundle consists of multiple files in a folder with the designated name.", "examples": [ "Generate the metadata files for a Lightning app bundle called \"myapp\" in the current directory:\n<%= config.bin %> <%= command.id %> --name myapp", "Similar to the previous example, but generate the files in the \"force-app/main/default/aura\" directory:\n<%= config.bin %> <%= command.id %> --name myapp --output-dir force-app/main/default/aura" ], "flags": { "json": { "description": "Format output as json.", "helpGroup": "GLOBAL", "name": "json", "allowNo": false, "type": "boolean" }, "flags-dir": { "helpGroup": "GLOBAL", "name": "flags-dir", "summary": "Import flag values from a directory.", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "name": { "aliases": [ "appname" ], "char": "n", "deprecateAliases": true, "description": "The name can be up to 40 characters and must start with a letter.", "name": "name", "required": true, "summary": "Name of the generated Lightning App.", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "template": { "char": "t", "description": "Supplied parameter values or default values are filled into a copy of the template. For Lightning Web Components, if this flag isn't specified, the CLI command automatically selects the template based on the \"defaultLwcLanguage\" field in the DX project's \"sfdx-project.json\" file.", "name": "template", "summary": "Template to use for file creation.", "default": "DefaultLightningApp", "hasDynamicHelp": false, "multiple": false, "options": [ "DefaultLightningApp" ], "type": "option" }, "output-dir": { "aliases": [ "outputdir" ], "char": "d", "deprecateAliases": true, "description": "The location can be an absolute path or relative to the current working directory. The default is the current directory.", "name": "output-dir", "summary": "Directory for saving the created files.", "default": ".", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "api-version": { "aliases": [ "apiversion" ], "deprecateAliases": true, "description": "Override the api version used for api requests made by this command", "name": "api-version", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "internal": { "char": "i", "hidden": true, "name": "internal", "summary": "Generate lightning bundles without creating a -meta.xml file.", "allowNo": false, "type": "boolean" }, "loglevel": { "deprecated": { "message": "The loglevel flag is no longer in use on this command. You may use it without error, but it will be ignored.\nSet the log level using the `SFDX_LOG_LEVEL` environment variable." }, "hidden": true, "name": "loglevel", "hasDynamicHelp": false, "multiple": false, "type": "option" } }, "hasDynamicHelp": false, "hiddenAliases": [], "id": "template:generate:lightning:app", "pluginAlias": "@salesforce/plugin-templates", "pluginName": "@salesforce/plugin-templates", "pluginType": "core", "strict": true, "summary": "Generate a Lightning App.", "enableJsonFlag": true, "isESM": true, "relativePath": [ "lib", "commands", "template", "generate", "lightning", "app.js" ], "aliasPermutations": [ "force:lightning:app:create", "lightning:force:app:create", "lightning:app:force:create", "lightning:app:create:force", "force:app:lightning:create", "app:force:lightning:create", "app:lightning:force:create", "app:lightning:create:force", "force:app:create:lightning", "app:force:create:lightning", "app:create:force:lightning", "app:create:lightning:force", "force:lightning:create:app", "lightning:force:create:app", "lightning:create:force:app", "lightning:create:app:force", "force:create:lightning:app", "create:force:lightning:app", "create:lightning:force:app", "create:lightning:app:force", "force:create:app:lightning", "create:force:app:lightning", "create:app:force:lightning", "create:app:lightning:force", "lightning:generate:app", "generate:lightning:app", "generate:app:lightning", "lightning:app:generate", "app:lightning:generate", "app:generate:lightning" ], "permutations": [ "template:generate:lightning:app", "generate:template:lightning:app", "generate:lightning:template:app", "generate:lightning:app:template", "template:lightning:generate:app", "lightning:template:generate:app", "lightning:generate:template:app", "lightning:generate:app:template", "template:lightning:app:generate", "lightning:template:app:generate", "lightning:app:template:generate", "lightning:app:generate:template", "template:generate:app:lightning", "generate:template:app:lightning", "generate:app:template:lightning", "generate:app:lightning:template", "template:app:generate:lightning", "app:template:generate:lightning", "app:generate:template:lightning", "app:generate:lightning:template", "template:app:lightning:generate", "app:template:lightning:generate", "app:lightning:template:generate", "app:lightning:generate:template" ] }, "template:generate:lightning:component": { "aliases": [ "force:lightning:component:create", "lightning:generate:component" ], "args": {}, "deprecateAliases": true, "description": "Generates the bundle in the specified directory or the current working directory. The bundle consists of multiple files in a directory with the designated name. Lightning web components are contained in the directory with name \"lwc\", Aura components in \"aura\".\n\nTo generate a Lightning web component, pass \"--type lwc\" to the command. If you don’t specify --type, Salesforce CLI generates an Aura component by default.", "examples": [ "Generate the metadata files for an Aura component bundle in the current directory:\n<%= config.bin %> <%= command.id %> --name mycomponent", "Generate a Lightning web component bundle in the current directory:\n<%= config.bin %> <%= command.id %> --name mycomponent --type lwc", "Generate an Aura component bundle in the \"force-app/main/default/aura\" directory:\n<%= config.bin %> <%= command.id %> --name mycomponent --output-dir force-app/main/default/aura", "Generate a Lightning web component bundle in the \"force-app/main/default/lwc\" directory:\n<%= config.bin %> <%= command.id %> --name mycomponent --type lwc --output-dir force-app/main/default/lwc", "Generate a TypeScript Lightning Web Component:\n<%= config.bin %> <%= command.id %> --name mycomponent --type lwc --template typescript" ], "flags": { "json": { "description": "Format output as json.", "helpGroup": "GLOBAL", "name": "json", "allowNo": false, "type": "boolean" }, "flags-dir": { "helpGroup": "GLOBAL", "name": "flags-dir", "summary": "Import flag values from a directory.", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "name": { "aliases": [ "componentname" ], "char": "n", "deprecateAliases": true, "description": "The name can be up to 40 characters and must start with a letter.", "name": "name", "required": true, "summary": "Name of the generated Lightning Component.", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "template": { "char": "t", "description": "Supplied parameter values or default values are filled into a copy of the template. For Lightning Web Components, if this flag isn't specified, the CLI command automatically selects the template based on the \"defaultLwcLanguage\" field in the DX project's \"sfdx-project.json\" file.", "name": "template", "summary": "Template to use for file creation.", "default": "default", "hasDynamicHelp": false, "multiple": false, "options": [ "default", "analyticsDashboard", "analyticsDashboardWithStep", "typescript" ], "type": "option" }, "output-dir": { "aliases": [ "outputdir" ], "char": "d", "deprecateAliases": true, "description": "The location can be an absolute path or relative to the current working directory. The default is the current directory.", "name": "output-dir", "summary": "Directory for saving the created files.", "default": ".", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "api-version": { "aliases": [ "apiversion" ], "deprecateAliases": true, "description": "Override the api version used for api requests made by this command", "name": "api-version", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "type": { "name": "type", "summary": "Type of the component bundle.", "default": "aura", "hasDynamicHelp": false, "multiple": false, "options": [ "aura", "lwc" ], "type": "option" }, "internal": { "char": "i", "hidden": true, "name": "internal", "summary": "Generate lightning bundles without creating a -meta.xml file.", "allowNo": false, "type": "boolean" }, "loglevel": { "deprecated": { "message": "The loglevel flag is no longer in use on this command. You may use it without error, but it will be ignored.\nSet the log level using the `SFDX_LOG_LEVEL` environment variable." }, "hidden": true, "name": "loglevel", "hasDynamicHelp": false, "multiple": false, "type": "option" } }, "hasDynamicHelp": false, "hiddenAliases": [], "id": "template:generate:lightning:component", "pluginAlias": "@salesforce/plugin-templates", "pluginName": "@salesforce/plugin-templates", "pluginType": "core", "strict": true, "summary": "Generate a bundle for an Aura component or a Lightning web component.", "enableJsonFlag": true, "isESM": true, "relativePath": [ "lib", "commands", "template", "generate", "lightning", "component.js" ], "aliasPermutations": [ "force:lightning:component:create", "lightning:force:component:create", "lightning:component:force:create", "lightning:component:create:force", "force:component:lightning:create", "component:force:lightning:create", "component:lightning:force:create", "component:lightning:create:force", "force:component:create:lightning", "component:force:create:lightning", "component:create:force:lightning", "component:create:lightning:force", "force:lightning:create:component", "lightning:force:create:component", "lightning:create:force:component", "lightning:create:component:force", "force:create:lightning:component", "create:force:lightning:component", "create:lightning:force:component", "create:lightning:component:force", "force:create:component:lightning", "create:force:component:lightning", "create:component:force:lightning", "create:component:lightning:force", "lightning:generate:component", "generate:lightning:component", "generate:component:lightning", "lightning:component:generate", "component:lightning:generate", "component:generate:lightning" ], "permutations": [ "template:generate:lightning:component", "generate:template:lightning:component", "generate:lightning:template:component", "generate:lightning:component:template", "template:lightning:generate:component", "lightning:template:generate:component", "lightning:generate:template:component", "lightning:generate:component:template", "template:lightning:component:generate", "lightning:template:component:generate", "lightning:component:template:generate", "lightning:component:generate:template", "template:generate:component:lightning", "generate:template:component:lightning", "generate:component:template:lightning", "generate:component:lightning:template", "template:component:generate:lightning", "component:template:generate:lightning", "component:generate:template:lightning", "component:generate:lightning:template", "template:component:lightning:generate", "component:template:lightning:generate", "component:lightning:template:generate", "component:lightning:generate:template" ] }, "template:generate:lightning:embedding": { "aliases": [], "args": {}, "description": "The generated LWC bundle consumes the first-party <lightning-embedding> component, which is pre-wired with the three required attributes: the widget URL (src), iframe sandbox tokens, and an accessible iframe title (shell-title).\n\nThe generated LWC bundle contains four files (.html, .js, .js-meta.xml, .css) in a directory named with the camelCased component name. The bundle must live under a parent folder named \"lwc\".", "examples": [ "Generate an embedding wrapper LWC in the current directory:\n<%= config.bin %> <%= command.id %> --name MyEmbeddingWrapper --src https://app.example.com --sandbox allow-forms --shell-title \"Expense Report Widget\"", "Generate an embedding wrapper LWC in the \"force-app/main/default/lwc\" directory with multiple sandbox tokens:\n<%= config.bin %> <%= command.id %> --name MyEmbeddingWrapper --src https://app.example.com --sandbox allow-forms --sandbox allow-scripts --shell-title \"Expense Report Widget\" --output-dir force-app/main/default/lwc" ], "flags": { "json": { "description": "Format output as json.", "helpGroup": "GLOBAL", "name": "json", "allowNo": false, "type": "boolean" }, "flags-dir": { "helpGroup": "GLOBAL", "name": "flags-dir", "summary": "Import flag values from a directory.", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "name": { "char": "n", "description": "The component name is also used (camelCased) as the LWC folder name and file stem. Must contain only alphanumeric characters and start with a letter.", "name": "name", "required": true, "summary": "Name of the generated component; must be in PascalCase format.", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "src": { "char": "s", "description": "The UR