@salesforce/plugin-templates 55.3.0 → 55.4.1
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/LICENSE.txt +1 -1
- package/lib/commands/analytics/generate/template.d.ts +16 -0
- package/lib/commands/analytics/generate/template.js +53 -0
- package/lib/commands/analytics/generate/template.js.map +1 -0
- package/lib/commands/apex/generate/class.d.ts +17 -0
- package/lib/commands/apex/generate/class.js +65 -0
- package/lib/commands/apex/generate/class.js.map +1 -0
- package/lib/commands/apex/generate/trigger.d.ts +19 -0
- package/lib/commands/apex/generate/trigger.js +86 -0
- package/lib/commands/apex/generate/trigger.js.map +1 -0
- package/lib/commands/lightning/generate/app.d.ts +18 -0
- package/lib/commands/lightning/generate/app.js +68 -0
- package/lib/commands/lightning/generate/app.js.map +1 -0
- package/lib/commands/lightning/generate/component.d.ts +19 -0
- package/lib/commands/lightning/generate/component.js +75 -0
- package/lib/commands/lightning/generate/component.js.map +1 -0
- package/lib/commands/lightning/generate/event.d.ts +18 -0
- package/lib/commands/lightning/generate/event.js +68 -0
- package/lib/commands/lightning/generate/event.js.map +1 -0
- package/lib/commands/lightning/generate/interface.d.ts +18 -0
- package/lib/commands/lightning/generate/interface.js +68 -0
- package/lib/commands/lightning/generate/interface.js.map +1 -0
- package/lib/commands/lightning/generate/test.d.ts +18 -0
- package/lib/commands/lightning/generate/test.js +68 -0
- package/lib/commands/lightning/generate/test.js.map +1 -0
- package/lib/commands/project/generate.d.ts +20 -0
- package/lib/commands/project/generate.js +93 -0
- package/lib/commands/project/generate.js.map +1 -0
- package/lib/commands/static-resource/generate.d.ts +17 -0
- package/lib/commands/static-resource/generate.js +64 -0
- package/lib/commands/static-resource/generate.js.map +1 -0
- package/lib/commands/visualforce/generate/component.d.ts +18 -0
- package/lib/commands/visualforce/generate/component.js +73 -0
- package/lib/commands/visualforce/generate/component.js.map +1 -0
- package/lib/commands/visualforce/generate/page.d.ts +18 -0
- package/lib/commands/visualforce/generate/page.js +75 -0
- package/lib/commands/visualforce/generate/page.js.map +1 -0
- package/lib/tsconfig.tsbuildinfo +1 -0
- package/lib/utils/flags.d.ts +3 -0
- package/lib/utils/flags.js +36 -0
- package/lib/utils/flags.js.map +1 -0
- package/lib/utils/templateCommand.d.ts +58 -14
- package/lib/utils/templateCommand.js +42 -82
- package/lib/utils/templateCommand.js.map +1 -1
- package/messages/analyticsTemplate.md +17 -0
- package/messages/apexClass.md +25 -0
- package/messages/apexTrigger.md +40 -0
- package/messages/lightning.md +27 -0
- package/messages/lightningApp.md +9 -0
- package/messages/lightningCmp.md +31 -0
- package/messages/lightningEvent.md +9 -0
- package/messages/lightningInterface.md +9 -0
- package/messages/lightningTest.md +21 -0
- package/messages/messages.md +43 -0
- package/messages/project.md +87 -0
- package/messages/staticResource.md +37 -0
- package/messages/vf.md +39 -0
- package/oclif.manifest.json +1190 -1
- package/package.json +173 -96
- package/lib/commands/force/analytics/template/create.d.ts +0 -15
- package/lib/commands/force/analytics/template/create.js +0 -42
- package/lib/commands/force/analytics/template/create.js.map +0 -1
- package/lib/commands/force/apex/class/create.d.ts +0 -16
- package/lib/commands/force/apex/class/create.js +0 -52
- package/lib/commands/force/apex/class/create.js.map +0 -1
- package/lib/commands/force/apex/trigger/create.d.ts +0 -18
- package/lib/commands/force/apex/trigger/create.js +0 -74
- package/lib/commands/force/apex/trigger/create.js.map +0 -1
- package/lib/commands/force/lightning/app/create.d.ts +0 -17
- package/lib/commands/force/lightning/app/create.js +0 -58
- package/lib/commands/force/lightning/app/create.js.map +0 -1
- package/lib/commands/force/lightning/component/create.d.ts +0 -18
- package/lib/commands/force/lightning/component/create.js +0 -67
- package/lib/commands/force/lightning/component/create.js.map +0 -1
- package/lib/commands/force/lightning/event/create.d.ts +0 -17
- package/lib/commands/force/lightning/event/create.js +0 -58
- package/lib/commands/force/lightning/event/create.js.map +0 -1
- package/lib/commands/force/lightning/interface/create.d.ts +0 -17
- package/lib/commands/force/lightning/interface/create.js +0 -58
- package/lib/commands/force/lightning/interface/create.js.map +0 -1
- package/lib/commands/force/lightning/test/create.d.ts +0 -16
- package/lib/commands/force/lightning/test/create.js +0 -56
- package/lib/commands/force/lightning/test/create.js.map +0 -1
- package/lib/commands/force/project/create.d.ts +0 -19
- package/lib/commands/force/project/create.js +0 -78
- package/lib/commands/force/project/create.js.map +0 -1
- package/lib/commands/force/staticresource/create.d.ts +0 -16
- package/lib/commands/force/staticresource/create.js +0 -49
- package/lib/commands/force/staticresource/create.js.map +0 -1
- package/lib/commands/force/visualforce/component/create.d.ts +0 -17
- package/lib/commands/force/visualforce/component/create.js +0 -59
- package/lib/commands/force/visualforce/component/create.js.map +0 -1
- package/lib/commands/force/visualforce/page/create.d.ts +0 -17
- package/lib/commands/force/visualforce/page/create.js +0 -59
- package/lib/commands/force/visualforce/page/create.js.map +0 -1
- package/lib/utils/index.d.ts +0 -2
- package/lib/utils/index.js +0 -14
- package/lib/utils/index.js.map +0 -1
- package/lib/utils/messageUtil.d.ts +0 -33
- package/lib/utils/messageUtil.js +0 -59
- package/lib/utils/messageUtil.js.map +0 -1
- package/messages/messages.json +0 -87
- package/yarn.lock +0 -9362
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# summary
|
|
2
|
+
|
|
3
|
+
Generate a Lightning %s.
|
|
4
|
+
|
|
5
|
+
# description
|
|
6
|
+
|
|
7
|
+
Generates a Lightning %s bundle in the specified directory or the current working directory. The bundle consists of multiple files in a folder with the designated name.
|
|
8
|
+
|
|
9
|
+
# flags.name
|
|
10
|
+
|
|
11
|
+
Name of the generated Lightning %s.
|
|
12
|
+
|
|
13
|
+
# flags.name.description
|
|
14
|
+
|
|
15
|
+
The name can be up to 40 characters and must start with a letter.
|
|
16
|
+
|
|
17
|
+
# flags.internal
|
|
18
|
+
|
|
19
|
+
Generate lightning bundles without creating a -meta.xml file.
|
|
20
|
+
|
|
21
|
+
# flags.template
|
|
22
|
+
|
|
23
|
+
Template to use for file creation.
|
|
24
|
+
|
|
25
|
+
# flags.template.description
|
|
26
|
+
|
|
27
|
+
Supplied parameter values or default values are filled into a copy of the template.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# examples
|
|
2
|
+
|
|
3
|
+
- Generate the metadata files for a Lightning app bundle called "myapp" in the current directory:
|
|
4
|
+
|
|
5
|
+
<%= config.bin %> <%= command.id %> --name myapp
|
|
6
|
+
|
|
7
|
+
- Similar to the previous example, but generate the files in the "force-app/main/default/aura" directory:
|
|
8
|
+
|
|
9
|
+
<%= config.bin %> <%= command.id %> --name myapp --output-dir force-app/main/default/aura
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# examples
|
|
2
|
+
|
|
3
|
+
- Generate the metadata files for an Aura component bundle in the current directory:
|
|
4
|
+
|
|
5
|
+
<%= config.bin %> <%= command.id %> --name mycomponent
|
|
6
|
+
|
|
7
|
+
- Generate a Lightning web component bundle in the current directory:
|
|
8
|
+
|
|
9
|
+
<%= config.bin %> <%= command.id %> --name mycomponent --type lwc
|
|
10
|
+
|
|
11
|
+
- Generate an Aura component bundle in the "force-app/main/default/aura" directory:
|
|
12
|
+
|
|
13
|
+
<%= config.bin %> <%= command.id %> --name mycomponent --output-dir force-app/main/default/aura
|
|
14
|
+
|
|
15
|
+
- Generate a Lightning web component bundle in the "force-app/main/default/lwc" directory:
|
|
16
|
+
|
|
17
|
+
<%= config.bin %> <%= command.id %> --name mycomponent --type lwc --output-dir force-app/main/default/lwc
|
|
18
|
+
|
|
19
|
+
# summary
|
|
20
|
+
|
|
21
|
+
Generate a bundle for an Aura component or a Lightning web component.
|
|
22
|
+
|
|
23
|
+
# description
|
|
24
|
+
|
|
25
|
+
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".
|
|
26
|
+
|
|
27
|
+
To 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.
|
|
28
|
+
|
|
29
|
+
# flags.type
|
|
30
|
+
|
|
31
|
+
Type of the component bundle.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# examples
|
|
2
|
+
|
|
3
|
+
- Generate the metadata files for a Lightning event bundle called "myevent" in the current directory:
|
|
4
|
+
|
|
5
|
+
<%= config.bin %> <%= command.id %> --name myevent
|
|
6
|
+
|
|
7
|
+
- Similar to previous example, but generate the files in the "force-app/main/default/aura" directory:
|
|
8
|
+
|
|
9
|
+
<%= config.bin %> <%= command.id %> --name myevent --output-dir force-app/main/default/aura
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# examples
|
|
2
|
+
|
|
3
|
+
- Generate the metadata files for a Lightning interface bundle called "myinterface" in the current directory:
|
|
4
|
+
|
|
5
|
+
<%= config.bin %> <%= command.id %> --name myinterface
|
|
6
|
+
|
|
7
|
+
- Similar to the previous example but generate the files in the "force-app/main/default/aura" directory:
|
|
8
|
+
|
|
9
|
+
<%= config.bin %> <%= command.id %> --name myinterface --output-dir force-app/main/default/aura
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# examples
|
|
2
|
+
|
|
3
|
+
- Generate the metadata files for the Lightning test called MyLightningTest in the current directory:
|
|
4
|
+
|
|
5
|
+
<%= config.bin %> <%= command.id %> --name MyLightningTest
|
|
6
|
+
|
|
7
|
+
- Similar to the previous example but generate the files in the "force-app/main/default/lightningTests" directory:
|
|
8
|
+
|
|
9
|
+
<%= config.bin %> <%= command.id %> --name MyLightningTest --output-dir force-app/main/default/lightningTests
|
|
10
|
+
|
|
11
|
+
# summary
|
|
12
|
+
|
|
13
|
+
Generate a Lightning test.
|
|
14
|
+
|
|
15
|
+
# description
|
|
16
|
+
|
|
17
|
+
Generates the test in the specified directory or the current working directory. The .resource file and associated metadata file are generated.
|
|
18
|
+
|
|
19
|
+
# flags.name.description
|
|
20
|
+
|
|
21
|
+
Name of the new Lightning test; can be up to 40 characters and must start with a letter.
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# flags.outputdir
|
|
2
|
+
|
|
3
|
+
Directory for saving the created files.
|
|
4
|
+
|
|
5
|
+
# flags.outputdir.description
|
|
6
|
+
|
|
7
|
+
The location can be an absolute path or relative to the current working directory. The default is the current directory.
|
|
8
|
+
|
|
9
|
+
# flags.outputdirLighting.description
|
|
10
|
+
|
|
11
|
+
If you don’t specify an outputdir, we create a subfolder in your current working directory with the name of your bundle. For example, if the current working directory is force-app and your Lightning bundle is called myBundle, we create force-app/myBundle/ to store the files in the bundle.
|
|
12
|
+
|
|
13
|
+
# flags.template
|
|
14
|
+
|
|
15
|
+
Template to use for file creation.
|
|
16
|
+
|
|
17
|
+
# flags.template.description
|
|
18
|
+
|
|
19
|
+
Supplied parameter values or default values are filled into a copy of the template.
|
|
20
|
+
|
|
21
|
+
# TargetDirOutput
|
|
22
|
+
|
|
23
|
+
target dir = %s
|
|
24
|
+
|
|
25
|
+
# MissingAuraFolder
|
|
26
|
+
|
|
27
|
+
Lightning bundles must have a parent folder named 'aura'.
|
|
28
|
+
|
|
29
|
+
# MissingLightningComponentTemplate
|
|
30
|
+
|
|
31
|
+
Template %s not available for component type %s.
|
|
32
|
+
|
|
33
|
+
# MissingLWCFolder
|
|
34
|
+
|
|
35
|
+
Lightning bundles must have a parent folder named 'lwc'.
|
|
36
|
+
|
|
37
|
+
# InvalidTemplate
|
|
38
|
+
|
|
39
|
+
Expected --template=foo to be one of:
|
|
40
|
+
|
|
41
|
+
# StandardReadMe
|
|
42
|
+
|
|
43
|
+
Now that you’ve created a Salesforce DX project, what’s next?
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# summary
|
|
2
|
+
|
|
3
|
+
Generate a Salesforce DX project.
|
|
4
|
+
|
|
5
|
+
# description
|
|
6
|
+
|
|
7
|
+
A Salesforce DX project has a specific structure and a configuration file (sfdx-project.json) that identifies the directory as a Salesforce DX project. This command generates the necessary configuration files and directories to get you started.
|
|
8
|
+
|
|
9
|
+
By default, the generated sfdx-project.json file sets the sourceApiVersion property to the default API version currently used by Salesforce CLI. To specify a different version, set the apiVersion configuration variable. For example: "sf config set apiVersion=57.0 --global".
|
|
10
|
+
|
|
11
|
+
# examples
|
|
12
|
+
|
|
13
|
+
- Generate a project called "mywork":
|
|
14
|
+
|
|
15
|
+
<%= config.bin %> <%= command.id %> --name mywork
|
|
16
|
+
|
|
17
|
+
- Similar to previous example, but generate the files in a directory called "myapp":
|
|
18
|
+
|
|
19
|
+
<%= config.bin %> <%= command.id %> --name mywork --default-package-dir myapp
|
|
20
|
+
|
|
21
|
+
- Similar to prevoius example, but also generate a default package.xml manifest file:
|
|
22
|
+
|
|
23
|
+
<%= config.bin %> <%= command.id %> --name mywork --default-package-dir myapp --manifest
|
|
24
|
+
|
|
25
|
+
- Generate a project with the minimum files and directories:
|
|
26
|
+
|
|
27
|
+
<%= config.bin %> <%= command.id %> --name mywork --template empty
|
|
28
|
+
|
|
29
|
+
# flags.name
|
|
30
|
+
|
|
31
|
+
Name of the generated project.
|
|
32
|
+
|
|
33
|
+
# flags.name.description
|
|
34
|
+
|
|
35
|
+
Generates a project directory with this name; any valid directory name is accepted. Also sets the "name" property in the sfdx-project.json file to this name.
|
|
36
|
+
|
|
37
|
+
# flags.template
|
|
38
|
+
|
|
39
|
+
Template to use for project creation.
|
|
40
|
+
|
|
41
|
+
# flags.template.description
|
|
42
|
+
|
|
43
|
+
The template determines the sample configuration files and directories that this command generates. For example, the empty template provides these files and directory to get you started.
|
|
44
|
+
|
|
45
|
+
- .forceignore
|
|
46
|
+
- config/project-scratch-def.json
|
|
47
|
+
- sfdx-project.json
|
|
48
|
+
- package.json
|
|
49
|
+
- force-app (basic source directory structure)
|
|
50
|
+
|
|
51
|
+
The standard template provides a complete force-app directory structure so you know where to put your source. It also provides additional files and scripts, especially useful when using Salesforce Extensions for VS Code. For example:
|
|
52
|
+
|
|
53
|
+
- .gitignore: Use Git for version control.
|
|
54
|
+
- .prettierrc and .prettierignore: Use Prettier to format your Aura components.
|
|
55
|
+
- .vscode/extensions.json: When launched, Visual Studio Code, prompts you to install the recommended extensions for your project.
|
|
56
|
+
- .vscode/launch.json: Configures Replay Debugger.
|
|
57
|
+
- .vscode/settings.json: Additional configuration settings.
|
|
58
|
+
|
|
59
|
+
The analytics template provides similar files and the force-app/main/default/waveTemplates directory.
|
|
60
|
+
|
|
61
|
+
# flags.namespace
|
|
62
|
+
|
|
63
|
+
Namespace associated with this project and any connected scratch orgs.
|
|
64
|
+
|
|
65
|
+
# flags.packagedir
|
|
66
|
+
|
|
67
|
+
Default package directory name.
|
|
68
|
+
|
|
69
|
+
# flags.packagedir.description
|
|
70
|
+
|
|
71
|
+
Metadata items such as classes and Lightning bundles are placed inside this folder.
|
|
72
|
+
|
|
73
|
+
# flags.manifest
|
|
74
|
+
|
|
75
|
+
Generate a manifest (package.xml) for change-set based development.
|
|
76
|
+
|
|
77
|
+
# flags.manifest.description
|
|
78
|
+
|
|
79
|
+
Generates a default manifest (package.xml) for fetching Apex, Visualforce, Lightning components, and static resources.
|
|
80
|
+
|
|
81
|
+
# flags.loginurl
|
|
82
|
+
|
|
83
|
+
Salesforce instance login URL.
|
|
84
|
+
|
|
85
|
+
# flags.loginurl.description
|
|
86
|
+
|
|
87
|
+
Normally defaults to https://login.salesforce.com.
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# summary
|
|
2
|
+
|
|
3
|
+
Generate a static resource.
|
|
4
|
+
|
|
5
|
+
# description
|
|
6
|
+
|
|
7
|
+
Generates the metadata resource file in the specified directory or the current working directory. Static resource files must be contained in a parent directory called "staticresources" in your package directory. Either run this command from an existing directory of this name, or use the --output-dir flag to create one or point to an existing one.
|
|
8
|
+
|
|
9
|
+
# examples
|
|
10
|
+
|
|
11
|
+
- Generate the metadata file for a static resource called MyResource in the current directory:
|
|
12
|
+
|
|
13
|
+
<%= config.bin %> <%= command.id %> --name MyResource
|
|
14
|
+
|
|
15
|
+
- Similar to previous example, but specifies a MIME type of application/json:
|
|
16
|
+
|
|
17
|
+
<%= config.bin %> <%= command.id %> --name MyResource --type application/json
|
|
18
|
+
|
|
19
|
+
- Generate the resource file in the "force-app/main/default/staticresources" directory:
|
|
20
|
+
|
|
21
|
+
<%= config.bin %> <%= command.id %> --name MyResource --output-dir force-app/main/default/staticresources
|
|
22
|
+
|
|
23
|
+
# flags.name.summary
|
|
24
|
+
|
|
25
|
+
Name of the generated static resource.
|
|
26
|
+
|
|
27
|
+
# flags.name.description
|
|
28
|
+
|
|
29
|
+
This name can contain only underscores and alphanumeric characters, and must be unique in your org. It must begin with a letter, not include spaces, not end with an underscore, and not contain two consecutive underscores.
|
|
30
|
+
|
|
31
|
+
# flags.type.summary
|
|
32
|
+
|
|
33
|
+
Content type (mime type) of the generated static resource.
|
|
34
|
+
|
|
35
|
+
# flags.type.description
|
|
36
|
+
|
|
37
|
+
Must be a valid MIME type such as application/json, application/javascript, application/zip, text/plain, text/css, etc.
|
package/messages/vf.md
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# summary
|
|
2
|
+
|
|
3
|
+
Generate a Visualforce %s.
|
|
4
|
+
|
|
5
|
+
# description
|
|
6
|
+
|
|
7
|
+
The command generates the .%s file and associated metadata file in the specified directory or the current working directory by default.
|
|
8
|
+
|
|
9
|
+
# flags.name
|
|
10
|
+
|
|
11
|
+
Name of the generated Visualforce %s.
|
|
12
|
+
|
|
13
|
+
# flags.name.description
|
|
14
|
+
|
|
15
|
+
The name can be up to 40 characters and must start with a letter.
|
|
16
|
+
|
|
17
|
+
# flags.label
|
|
18
|
+
|
|
19
|
+
Visualforce %s label.
|
|
20
|
+
|
|
21
|
+
# examples.component
|
|
22
|
+
|
|
23
|
+
- Generate the metadata files for a Visualforce component in the current directory:
|
|
24
|
+
|
|
25
|
+
<%= config.bin %> <%= command.id %> --name mycomponent --label mylabel
|
|
26
|
+
|
|
27
|
+
- Similar to previous example, but generate the files in the directory "force-app/main/default/components":
|
|
28
|
+
|
|
29
|
+
<%= config.bin %> <%= command.id %> --name mycomponent --label mylabel --output-dir components
|
|
30
|
+
|
|
31
|
+
# examples.page
|
|
32
|
+
|
|
33
|
+
- Generate the metadata files for a Visualforce page in the current directory:
|
|
34
|
+
|
|
35
|
+
<%= config.bin %> <%= command.id %> --name mypage --label mylabel
|
|
36
|
+
|
|
37
|
+
- Similar to previous example, but generate the files in the directory "force-app/main/default/pages":
|
|
38
|
+
|
|
39
|
+
<%= config.bin %> <%= command.id %> --name mypage --label mylabel --output-dir pages
|