@salesforce/plugin-templates 56.7.1 → 56.8.0
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/README.md +96 -13
- package/lib/commands/template/generate/flexipage/index.d.ts +24 -0
- package/lib/commands/template/generate/flexipage/index.js +113 -0
- package/lib/commands/template/generate/flexipage/index.js.map +1 -0
- package/messages/digitalExperienceSite.md +2 -2
- package/messages/flexipage.md +83 -0
- package/oclif.manifest.json +337 -154
- package/package.json +8 -3
package/README.md
CHANGED
|
@@ -122,6 +122,7 @@ Congrats, you are debugging!
|
|
|
122
122
|
- [`sf template generate apex class`](#sf-template-generate-apex-class)
|
|
123
123
|
- [`sf template generate apex trigger`](#sf-template-generate-apex-trigger)
|
|
124
124
|
- [`sf template generate digital-experience site`](#sf-template-generate-digital-experience-site)
|
|
125
|
+
- [`sf template generate flexipage`](#sf-template-generate-flexipage)
|
|
125
126
|
- [`sf template generate lightning app`](#sf-template-generate-lightning-app)
|
|
126
127
|
- [`sf template generate lightning component`](#sf-template-generate-lightning-component)
|
|
127
128
|
- [`sf template generate lightning event`](#sf-template-generate-lightning-event)
|
|
@@ -174,7 +175,7 @@ FLAG DESCRIPTIONS
|
|
|
174
175
|
directory.
|
|
175
176
|
```
|
|
176
177
|
|
|
177
|
-
_See code: [src/commands/template/generate/analytics/template.ts](https://github.com/salesforcecli/plugin-templates/blob/56.
|
|
178
|
+
_See code: [src/commands/template/generate/analytics/template.ts](https://github.com/salesforcecli/plugin-templates/blob/56.8.0/src/commands/template/generate/analytics/template.ts)_
|
|
178
179
|
|
|
179
180
|
## `sf template generate apex class`
|
|
180
181
|
|
|
@@ -234,7 +235,7 @@ FLAG DESCRIPTIONS
|
|
|
234
235
|
Supplied parameter values or default values are filled into a copy of the template.
|
|
235
236
|
```
|
|
236
237
|
|
|
237
|
-
_See code: [src/commands/template/generate/apex/class.ts](https://github.com/salesforcecli/plugin-templates/blob/56.
|
|
238
|
+
_See code: [src/commands/template/generate/apex/class.ts](https://github.com/salesforcecli/plugin-templates/blob/56.8.0/src/commands/template/generate/apex/class.ts)_
|
|
238
239
|
|
|
239
240
|
## `sf template generate apex trigger`
|
|
240
241
|
|
|
@@ -304,7 +305,7 @@ FLAG DESCRIPTIONS
|
|
|
304
305
|
Supplied parameter values or default values are filled into a copy of the template.
|
|
305
306
|
```
|
|
306
307
|
|
|
307
|
-
_See code: [src/commands/template/generate/apex/trigger.ts](https://github.com/salesforcecli/plugin-templates/blob/56.
|
|
308
|
+
_See code: [src/commands/template/generate/apex/trigger.ts](https://github.com/salesforcecli/plugin-templates/blob/56.8.0/src/commands/template/generate/apex/trigger.ts)_
|
|
308
309
|
|
|
309
310
|
## `sf template generate digital-experience site`
|
|
310
311
|
|
|
@@ -354,7 +355,89 @@ FLAG DESCRIPTIONS
|
|
|
354
355
|
project, defaults to the current directory.
|
|
355
356
|
```
|
|
356
357
|
|
|
357
|
-
_See code: [src/commands/template/generate/digital-experience/site.ts](https://github.com/salesforcecli/plugin-templates/blob/56.
|
|
358
|
+
_See code: [src/commands/template/generate/digital-experience/site.ts](https://github.com/salesforcecli/plugin-templates/blob/56.8.0/src/commands/template/generate/digital-experience/site.ts)_
|
|
359
|
+
|
|
360
|
+
## `sf template generate flexipage`
|
|
361
|
+
|
|
362
|
+
Generate a FlexiPage, also known as a Lightning page.
|
|
363
|
+
|
|
364
|
+
```
|
|
365
|
+
USAGE
|
|
366
|
+
$ sf template generate flexipage -n <value> -t RecordPage|AppPage|HomePage [--json] [--flags-dir <value>] [-d <value>]
|
|
367
|
+
[--api-version <value>] [--label <value>] [--description <value>] [-s <value>] [--primary-field <value>]
|
|
368
|
+
[--secondary-fields <value>...] [--detail-fields <value>...]
|
|
369
|
+
|
|
370
|
+
FLAGS
|
|
371
|
+
-d, --output-dir=<value> [default: .] Directory for saving the created files.
|
|
372
|
+
-n, --name=<value> (required) Name of the FlexiPage.
|
|
373
|
+
-s, --sobject=<value> API name of the Salesforce object; required when creating a RecordPage.
|
|
374
|
+
-t, --template=<option> (required) Template type for the FlexiPage.
|
|
375
|
+
<options: RecordPage|AppPage|HomePage>
|
|
376
|
+
--api-version=<value> Override the api version used for api requests made by this command
|
|
377
|
+
--description=<value> Description for the FlexiPage, which provides context about its purpose.
|
|
378
|
+
--detail-fields=<value>... Fields to display in the Details tab. Specify multiple fields separated by commas.
|
|
379
|
+
Fields are split into two columns. Used only with RecordPage.
|
|
380
|
+
--label=<value> Label of this FlexiPage; if not specified, uses the FlexiPage name as the label.
|
|
381
|
+
--primary-field=<value> Primary field for the dynamic highlights header; typically 'Name'. Used only with
|
|
382
|
+
RecordPage.
|
|
383
|
+
--secondary-fields=<value>... Secondary fields shown in the dynamic highlights header. Specify multiple fields
|
|
384
|
+
separated by commas. Maximum of 11 fields. Used only with RecordPage.
|
|
385
|
+
|
|
386
|
+
GLOBAL FLAGS
|
|
387
|
+
--flags-dir=<value> Import flag values from a directory.
|
|
388
|
+
--json Format output as json.
|
|
389
|
+
|
|
390
|
+
DESCRIPTION
|
|
391
|
+
Generate a FlexiPage, also known as a Lightning page.
|
|
392
|
+
|
|
393
|
+
FlexiPages are the metadata types associated with a Lightning page. A Lightning page represents a customizable screen
|
|
394
|
+
made up of regions containing Lightning components.
|
|
395
|
+
|
|
396
|
+
You can use this command to generate these types of FlexiPages; specify the type with the --template flag:
|
|
397
|
+
|
|
398
|
+
- AppPage: A Lightning page used as the home page for a custom app or a standalone application page.
|
|
399
|
+
- HomePage: A Lightning page used to override the Home page in Lightning Experience.
|
|
400
|
+
- RecordPage: A Lightning page used to override an object record page in Lightning Experience. Requires that you
|
|
401
|
+
specify the object name with the --sobject flag.
|
|
402
|
+
|
|
403
|
+
EXAMPLES
|
|
404
|
+
Generate a RecordPage FlexiPage for the Account object in the current directory:
|
|
405
|
+
|
|
406
|
+
$ sf template generate flexipage --name Account_Record_Page --template RecordPage --sobject Account
|
|
407
|
+
|
|
408
|
+
Generate an AppPage FlexiPage in the "force-app/main/default/flexipages" directory:
|
|
409
|
+
|
|
410
|
+
$ sf template generate flexipage --name Sales_Dashboard --template AppPage --output-dir \
|
|
411
|
+
force-app/main/default/flexipages
|
|
412
|
+
|
|
413
|
+
Generate a HomePage FlexiPage with a custom label:
|
|
414
|
+
|
|
415
|
+
$ sf template generate flexipage --name Custom_Home --template HomePage --label "Sales Home Page"
|
|
416
|
+
|
|
417
|
+
Generate a RecordPage with dynamic highlights and detail fields:
|
|
418
|
+
|
|
419
|
+
$ sf template generate flexipage --name Property_Page --template RecordPage --sobject Rental_Property__c \
|
|
420
|
+
--primary-field Name --secondary-fields Property_Address__c,City__c --detail-fields \
|
|
421
|
+
Name,Property_Address__c,City__c,Monthly_Rent__c,Bedrooms__c
|
|
422
|
+
|
|
423
|
+
FLAG DESCRIPTIONS
|
|
424
|
+
-d, --output-dir=<value> Directory for saving the created files.
|
|
425
|
+
|
|
426
|
+
The location can be an absolute path or relative to the current working directory. The default is the current
|
|
427
|
+
directory.
|
|
428
|
+
|
|
429
|
+
-n, --name=<value> Name of the FlexiPage.
|
|
430
|
+
|
|
431
|
+
The name can contain only alphanumeric characters, must start with a letter, and can't end with an underscore or
|
|
432
|
+
contain two consecutive underscores.
|
|
433
|
+
|
|
434
|
+
-s, --sobject=<value> API name of the Salesforce object; required when creating a RecordPage.
|
|
435
|
+
|
|
436
|
+
For RecordPage FlexiPages, you must specify the associated object API name, such as 'Account', 'Opportunity', or
|
|
437
|
+
'Custom_Object__c'. This sets the `sobjectType` field in the FlexiPage metadata.
|
|
438
|
+
```
|
|
439
|
+
|
|
440
|
+
_See code: [src/commands/template/generate/flexipage/index.ts](https://github.com/salesforcecli/plugin-templates/blob/56.8.0/src/commands/template/generate/flexipage/index.ts)_
|
|
358
441
|
|
|
359
442
|
## `sf template generate lightning app`
|
|
360
443
|
|
|
@@ -410,7 +493,7 @@ FLAG DESCRIPTIONS
|
|
|
410
493
|
Supplied parameter values or default values are filled into a copy of the template.
|
|
411
494
|
```
|
|
412
495
|
|
|
413
|
-
_See code: [src/commands/template/generate/lightning/app.ts](https://github.com/salesforcecli/plugin-templates/blob/56.
|
|
496
|
+
_See code: [src/commands/template/generate/lightning/app.ts](https://github.com/salesforcecli/plugin-templates/blob/56.8.0/src/commands/template/generate/lightning/app.ts)_
|
|
414
497
|
|
|
415
498
|
## `sf template generate lightning component`
|
|
416
499
|
|
|
@@ -480,7 +563,7 @@ FLAG DESCRIPTIONS
|
|
|
480
563
|
Supplied parameter values or default values are filled into a copy of the template.
|
|
481
564
|
```
|
|
482
565
|
|
|
483
|
-
_See code: [src/commands/template/generate/lightning/component.ts](https://github.com/salesforcecli/plugin-templates/blob/56.
|
|
566
|
+
_See code: [src/commands/template/generate/lightning/component.ts](https://github.com/salesforcecli/plugin-templates/blob/56.8.0/src/commands/template/generate/lightning/component.ts)_
|
|
484
567
|
|
|
485
568
|
## `sf template generate lightning event`
|
|
486
569
|
|
|
@@ -536,7 +619,7 @@ FLAG DESCRIPTIONS
|
|
|
536
619
|
Supplied parameter values or default values are filled into a copy of the template.
|
|
537
620
|
```
|
|
538
621
|
|
|
539
|
-
_See code: [src/commands/template/generate/lightning/event.ts](https://github.com/salesforcecli/plugin-templates/blob/56.
|
|
622
|
+
_See code: [src/commands/template/generate/lightning/event.ts](https://github.com/salesforcecli/plugin-templates/blob/56.8.0/src/commands/template/generate/lightning/event.ts)_
|
|
540
623
|
|
|
541
624
|
## `sf template generate lightning interface`
|
|
542
625
|
|
|
@@ -592,7 +675,7 @@ FLAG DESCRIPTIONS
|
|
|
592
675
|
Supplied parameter values or default values are filled into a copy of the template.
|
|
593
676
|
```
|
|
594
677
|
|
|
595
|
-
_See code: [src/commands/template/generate/lightning/interface.ts](https://github.com/salesforcecli/plugin-templates/blob/56.
|
|
678
|
+
_See code: [src/commands/template/generate/lightning/interface.ts](https://github.com/salesforcecli/plugin-templates/blob/56.8.0/src/commands/template/generate/lightning/interface.ts)_
|
|
596
679
|
|
|
597
680
|
## `sf template generate lightning test`
|
|
598
681
|
|
|
@@ -648,7 +731,7 @@ FLAG DESCRIPTIONS
|
|
|
648
731
|
Supplied parameter values or default values are filled into a copy of the template.
|
|
649
732
|
```
|
|
650
733
|
|
|
651
|
-
_See code: [src/commands/template/generate/lightning/test.ts](https://github.com/salesforcecli/plugin-templates/blob/56.
|
|
734
|
+
_See code: [src/commands/template/generate/lightning/test.ts](https://github.com/salesforcecli/plugin-templates/blob/56.8.0/src/commands/template/generate/lightning/test.ts)_
|
|
652
735
|
|
|
653
736
|
## `sf template generate project`
|
|
654
737
|
|
|
@@ -754,7 +837,7 @@ FLAG DESCRIPTIONS
|
|
|
754
837
|
Override the api version used for api requests made by this command
|
|
755
838
|
```
|
|
756
839
|
|
|
757
|
-
_See code: [src/commands/template/generate/project/index.ts](https://github.com/salesforcecli/plugin-templates/blob/56.
|
|
840
|
+
_See code: [src/commands/template/generate/project/index.ts](https://github.com/salesforcecli/plugin-templates/blob/56.8.0/src/commands/template/generate/project/index.ts)_
|
|
758
841
|
|
|
759
842
|
## `sf template generate static-resource`
|
|
760
843
|
|
|
@@ -817,7 +900,7 @@ FLAG DESCRIPTIONS
|
|
|
817
900
|
etc.
|
|
818
901
|
```
|
|
819
902
|
|
|
820
|
-
_See code: [src/commands/template/generate/static-resource/index.ts](https://github.com/salesforcecli/plugin-templates/blob/56.
|
|
903
|
+
_See code: [src/commands/template/generate/static-resource/index.ts](https://github.com/salesforcecli/plugin-templates/blob/56.8.0/src/commands/template/generate/static-resource/index.ts)_
|
|
821
904
|
|
|
822
905
|
## `sf template generate visualforce component`
|
|
823
906
|
|
|
@@ -874,7 +957,7 @@ FLAG DESCRIPTIONS
|
|
|
874
957
|
Supplied parameter values or default values are filled into a copy of the template.
|
|
875
958
|
```
|
|
876
959
|
|
|
877
|
-
_See code: [src/commands/template/generate/visualforce/component.ts](https://github.com/salesforcecli/plugin-templates/blob/56.
|
|
960
|
+
_See code: [src/commands/template/generate/visualforce/component.ts](https://github.com/salesforcecli/plugin-templates/blob/56.8.0/src/commands/template/generate/visualforce/component.ts)_
|
|
878
961
|
|
|
879
962
|
## `sf template generate visualforce page`
|
|
880
963
|
|
|
@@ -925,6 +1008,6 @@ FLAG DESCRIPTIONS
|
|
|
925
1008
|
The name can be up to 40 characters and must start with a letter.
|
|
926
1009
|
```
|
|
927
1010
|
|
|
928
|
-
_See code: [src/commands/template/generate/visualforce/page.ts](https://github.com/salesforcecli/plugin-templates/blob/56.
|
|
1011
|
+
_See code: [src/commands/template/generate/visualforce/page.ts](https://github.com/salesforcecli/plugin-templates/blob/56.8.0/src/commands/template/generate/visualforce/page.ts)_
|
|
929
1012
|
|
|
930
1013
|
<!-- commandsstop -->
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { SfCommand } from '@salesforce/sf-plugins-core';
|
|
2
|
+
import { CreateOutput } from '@salesforce/templates';
|
|
3
|
+
export default class FlexipageGenerate extends SfCommand<CreateOutput> {
|
|
4
|
+
static readonly summary: string;
|
|
5
|
+
static readonly description: string;
|
|
6
|
+
static readonly examples: string[];
|
|
7
|
+
static readonly state = "beta";
|
|
8
|
+
static readonly flags: {
|
|
9
|
+
name: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
|
+
template: import("@oclif/core/interfaces").OptionFlag<"RecordPage" | "AppPage" | "HomePage", import("@oclif/core/interfaces").CustomOptions>;
|
|
11
|
+
'output-dir': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
|
+
'api-version': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
|
+
label: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
|
+
description: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
15
|
+
sobject: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
16
|
+
'primary-field': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
17
|
+
'secondary-fields': import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
18
|
+
'detail-fields': import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
19
|
+
internal: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
20
|
+
loglevel: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
21
|
+
};
|
|
22
|
+
private static readonly MAX_SECONDARY_FIELDS;
|
|
23
|
+
run(): Promise<CreateOutput>;
|
|
24
|
+
}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2019, salesforce.com, inc.
|
|
3
|
+
* All rights reserved.
|
|
4
|
+
* Licensed under the BSD 3-Clause license.
|
|
5
|
+
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
6
|
+
*/
|
|
7
|
+
import { Flags, loglevel, orgApiVersionFlagWithDeprecations, SfCommand, Ux } from '@salesforce/sf-plugins-core';
|
|
8
|
+
import { TemplateType } from '@salesforce/templates';
|
|
9
|
+
import { Messages } from '@salesforce/core';
|
|
10
|
+
import { getCustomTemplates, runGenerator } from '../../../../utils/templateCommand.js';
|
|
11
|
+
import { internalFlag, outputDirFlag } from '../../../../utils/flags.js';
|
|
12
|
+
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
|
|
13
|
+
const messages = Messages.loadMessages('@salesforce/plugin-templates', 'flexipage');
|
|
14
|
+
export default class FlexipageGenerate extends SfCommand {
|
|
15
|
+
static summary = messages.getMessage('summary');
|
|
16
|
+
static description = messages.getMessage('description');
|
|
17
|
+
static examples = messages.getMessages('examples');
|
|
18
|
+
static state = 'beta';
|
|
19
|
+
static flags = {
|
|
20
|
+
name: Flags.string({
|
|
21
|
+
char: 'n',
|
|
22
|
+
summary: messages.getMessage('flags.name.summary'),
|
|
23
|
+
description: messages.getMessage('flags.name.description'),
|
|
24
|
+
required: true,
|
|
25
|
+
aliases: ['flexipagename'],
|
|
26
|
+
deprecateAliases: true,
|
|
27
|
+
}),
|
|
28
|
+
template: Flags.option({
|
|
29
|
+
char: 't',
|
|
30
|
+
summary: messages.getMessage('flags.template.summary'),
|
|
31
|
+
required: true,
|
|
32
|
+
options: ['RecordPage', 'AppPage', 'HomePage'],
|
|
33
|
+
})(),
|
|
34
|
+
'output-dir': outputDirFlag,
|
|
35
|
+
'api-version': orgApiVersionFlagWithDeprecations,
|
|
36
|
+
label: Flags.string({
|
|
37
|
+
summary: messages.getMessage('flags.label.summary'),
|
|
38
|
+
aliases: ['masterlabel'],
|
|
39
|
+
deprecateAliases: true,
|
|
40
|
+
}),
|
|
41
|
+
description: Flags.string({
|
|
42
|
+
summary: messages.getMessage('flags.description.summary'),
|
|
43
|
+
}),
|
|
44
|
+
sobject: Flags.string({
|
|
45
|
+
char: 's',
|
|
46
|
+
summary: messages.getMessage('flags.sobject.summary'),
|
|
47
|
+
description: messages.getMessage('flags.sobject.description'),
|
|
48
|
+
aliases: ['entity-name', 'entity'],
|
|
49
|
+
deprecateAliases: true,
|
|
50
|
+
}),
|
|
51
|
+
'primary-field': Flags.string({
|
|
52
|
+
summary: messages.getMessage('flags.primary-field.summary'),
|
|
53
|
+
}),
|
|
54
|
+
'secondary-fields': Flags.string({
|
|
55
|
+
summary: messages.getMessage('flags.secondary-fields.summary'),
|
|
56
|
+
multiple: true,
|
|
57
|
+
delimiter: ',',
|
|
58
|
+
}),
|
|
59
|
+
'detail-fields': Flags.string({
|
|
60
|
+
summary: messages.getMessage('flags.detail-fields.summary'),
|
|
61
|
+
multiple: true,
|
|
62
|
+
delimiter: ',',
|
|
63
|
+
}),
|
|
64
|
+
internal: internalFlag,
|
|
65
|
+
loglevel,
|
|
66
|
+
};
|
|
67
|
+
static MAX_SECONDARY_FIELDS = 11;
|
|
68
|
+
async run() {
|
|
69
|
+
const { flags } = await this.parse(FlexipageGenerate);
|
|
70
|
+
// Validate RecordPage requires sobject
|
|
71
|
+
if (flags.template === 'RecordPage' && !flags.sobject) {
|
|
72
|
+
throw new Error(messages.getMessage('errors.recordPageRequiresSobject'));
|
|
73
|
+
}
|
|
74
|
+
// Validate RecordPage-specific flags are only used with RecordPage template
|
|
75
|
+
const recordPageOnlyFlags = ['primary-field', 'secondary-fields', 'detail-fields'];
|
|
76
|
+
if (flags.template !== 'RecordPage') {
|
|
77
|
+
for (const flagName of recordPageOnlyFlags) {
|
|
78
|
+
if (flags[flagName]) {
|
|
79
|
+
throw new Error(messages.getMessage('errors.flagRequiresRecordPage', [flagName]));
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
// Validate secondary fields limit (Dynamic Highlights Panel supports max 11)
|
|
84
|
+
const secondaryFieldsCount = flags['secondary-fields']?.length ?? 0;
|
|
85
|
+
if (secondaryFieldsCount > FlexipageGenerate.MAX_SECONDARY_FIELDS) {
|
|
86
|
+
throw new Error(messages.getMessage('errors.tooManySecondaryFields', [
|
|
87
|
+
secondaryFieldsCount.toString(),
|
|
88
|
+
FlexipageGenerate.MAX_SECONDARY_FIELDS.toString(),
|
|
89
|
+
]));
|
|
90
|
+
}
|
|
91
|
+
// Convert CLI flags to library options
|
|
92
|
+
const flagsAsOptions = {
|
|
93
|
+
flexipagename: flags.name,
|
|
94
|
+
template: flags.template,
|
|
95
|
+
outputdir: flags['output-dir'],
|
|
96
|
+
apiversion: flags['api-version'],
|
|
97
|
+
masterlabel: flags.label,
|
|
98
|
+
description: flags.description,
|
|
99
|
+
entityName: flags.sobject,
|
|
100
|
+
primaryField: flags['primary-field'],
|
|
101
|
+
secondaryFields: flags['secondary-fields'] ?? [],
|
|
102
|
+
detailFields: flags['detail-fields'] ?? [],
|
|
103
|
+
internal: flags.internal,
|
|
104
|
+
};
|
|
105
|
+
return runGenerator({
|
|
106
|
+
templateType: TemplateType.Flexipage,
|
|
107
|
+
opts: flagsAsOptions,
|
|
108
|
+
ux: new Ux({ jsonEnabled: this.jsonEnabled() }),
|
|
109
|
+
templates: getCustomTemplates(this.configAggregator),
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/commands/template/generate/flexipage/index.ts"],"names":[],"mappings":"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"}
|
|
@@ -12,7 +12,7 @@ Creates an Experience Cloud site with the specified template, name, and URL path
|
|
|
12
12
|
|
|
13
13
|
<%= config.bin %> <%= command.id %> --template BuildYourOwnLWR --name mysite --url-path-prefix mysite
|
|
14
14
|
|
|
15
|
-
- Generate an Experience Cloud site like the last example, but generate the files into the specified output directory:
|
|
15
|
+
- Generate an Experience Cloud site like the last example, but generate the files into the specified output directory:
|
|
16
16
|
|
|
17
17
|
<%= config.bin %> <%= command.id %> --template BuildYourOwnLWR --name mysite --url-path-prefix mysite --output-dir force-app/main/default
|
|
18
18
|
|
|
@@ -28,7 +28,7 @@ Template to use when generating the site.
|
|
|
28
28
|
|
|
29
29
|
Supported templates:
|
|
30
30
|
|
|
31
|
-
- BuildYourOwnLWR - Creates blazing-fast digital experiences, such as websites, microsites, and portals, using the Lightning Web Components programming model. Powered by Lightning Web Runtime (LWR), this customizable template delivers unparalleled site performance.
|
|
31
|
+
- BuildYourOwnLWR - Creates blazing-fast digital experiences, such as websites, microsites, and portals, using the Lightning Web Components programming model. Powered by Lightning Web Runtime (LWR), this customizable template delivers unparalleled site performance. For additional details, see this Salesforce Help topic: https://help.salesforce.com/s/articleView?id=experience.rss_build_your_own_lwr.htm.
|
|
32
32
|
|
|
33
33
|
# flags.url-path-prefix.summary
|
|
34
34
|
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# examples
|
|
2
|
+
|
|
3
|
+
- Generate a RecordPage FlexiPage for the Account object in the current directory:
|
|
4
|
+
|
|
5
|
+
<%= config.bin %> <%= command.id %> --name Account_Record_Page --template RecordPage --sobject Account
|
|
6
|
+
|
|
7
|
+
- Generate an AppPage FlexiPage in the "force-app/main/default/flexipages" directory:
|
|
8
|
+
|
|
9
|
+
<%= config.bin %> <%= command.id %> --name Sales_Dashboard --template AppPage --output-dir force-app/main/default/flexipages
|
|
10
|
+
|
|
11
|
+
- Generate a HomePage FlexiPage with a custom label:
|
|
12
|
+
|
|
13
|
+
<%= config.bin %> <%= command.id %> --name Custom_Home --template HomePage --label "Sales Home Page"
|
|
14
|
+
|
|
15
|
+
- Generate a RecordPage with dynamic highlights and detail fields:
|
|
16
|
+
|
|
17
|
+
<%= 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
|
|
18
|
+
|
|
19
|
+
# summary
|
|
20
|
+
|
|
21
|
+
Generate a FlexiPage, also known as a Lightning page.
|
|
22
|
+
|
|
23
|
+
# description
|
|
24
|
+
|
|
25
|
+
FlexiPages are the metadata types associated with a Lightning page. A Lightning page represents a customizable screen made up of regions containing Lightning components.
|
|
26
|
+
|
|
27
|
+
You can use this command to generate these types of FlexiPages; specify the type with the --template flag:
|
|
28
|
+
|
|
29
|
+
- AppPage: A Lightning page used as the home page for a custom app or a standalone application page.
|
|
30
|
+
- HomePage: A Lightning page used to override the Home page in Lightning Experience.
|
|
31
|
+
- 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.
|
|
32
|
+
|
|
33
|
+
# flags.name.summary
|
|
34
|
+
|
|
35
|
+
Name of the FlexiPage.
|
|
36
|
+
|
|
37
|
+
# flags.name.description
|
|
38
|
+
|
|
39
|
+
The name can contain only alphanumeric characters, must start with a letter, and can't end with an underscore or contain two consecutive underscores.
|
|
40
|
+
|
|
41
|
+
# flags.template.summary
|
|
42
|
+
|
|
43
|
+
Template type for the FlexiPage.
|
|
44
|
+
|
|
45
|
+
# flags.label.summary
|
|
46
|
+
|
|
47
|
+
Label of this FlexiPage; if not specified, uses the FlexiPage name as the label.
|
|
48
|
+
|
|
49
|
+
# flags.description.summary
|
|
50
|
+
|
|
51
|
+
Description for the FlexiPage, which provides context about its purpose.
|
|
52
|
+
|
|
53
|
+
# flags.sobject.summary
|
|
54
|
+
|
|
55
|
+
API name of the Salesforce object; required when creating a RecordPage.
|
|
56
|
+
|
|
57
|
+
# flags.sobject.description
|
|
58
|
+
|
|
59
|
+
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.
|
|
60
|
+
|
|
61
|
+
# flags.primary-field.summary
|
|
62
|
+
|
|
63
|
+
Primary field for the dynamic highlights header; typically 'Name'. Used only with RecordPage.
|
|
64
|
+
|
|
65
|
+
# flags.secondary-fields.summary
|
|
66
|
+
|
|
67
|
+
Secondary fields shown in the dynamic highlights header. Specify multiple fields separated by commas. Maximum of 11 fields. Used only with RecordPage.
|
|
68
|
+
|
|
69
|
+
# flags.detail-fields.summary
|
|
70
|
+
|
|
71
|
+
Fields to display in the Details tab. Specify multiple fields separated by commas. Fields are split into two columns. Used only with RecordPage.
|
|
72
|
+
|
|
73
|
+
# errors.recordPageRequiresSobject
|
|
74
|
+
|
|
75
|
+
RecordPage template requires the --sobject flag to specify the Salesforce object API name (e.g., 'Account', 'Opportunity', 'Custom_Object__c').
|
|
76
|
+
|
|
77
|
+
# errors.tooManySecondaryFields
|
|
78
|
+
|
|
79
|
+
Too many secondary fields specified (%s). The Dynamic Highlights Panel supports a maximum of %s secondary fields.
|
|
80
|
+
|
|
81
|
+
# errors.flagRequiresRecordPage
|
|
82
|
+
|
|
83
|
+
The --%s flag can only be used with --template RecordPage.
|
package/oclif.manifest.json
CHANGED
|
@@ -1,158 +1,5 @@
|
|
|
1
1
|
{
|
|
2
2
|
"commands": {
|
|
3
|
-
"template:generate:analytics:template": {
|
|
4
|
-
"aliases": [
|
|
5
|
-
"force:analytics:template:create",
|
|
6
|
-
"analytics:generate:template"
|
|
7
|
-
],
|
|
8
|
-
"args": {},
|
|
9
|
-
"deprecateAliases": true,
|
|
10
|
-
"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.",
|
|
11
|
-
"examples": [
|
|
12
|
-
"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"
|
|
13
|
-
],
|
|
14
|
-
"flags": {
|
|
15
|
-
"json": {
|
|
16
|
-
"description": "Format output as json.",
|
|
17
|
-
"helpGroup": "GLOBAL",
|
|
18
|
-
"name": "json",
|
|
19
|
-
"allowNo": false,
|
|
20
|
-
"type": "boolean"
|
|
21
|
-
},
|
|
22
|
-
"flags-dir": {
|
|
23
|
-
"helpGroup": "GLOBAL",
|
|
24
|
-
"name": "flags-dir",
|
|
25
|
-
"summary": "Import flag values from a directory.",
|
|
26
|
-
"hasDynamicHelp": false,
|
|
27
|
-
"multiple": false,
|
|
28
|
-
"type": "option"
|
|
29
|
-
},
|
|
30
|
-
"output-dir": {
|
|
31
|
-
"aliases": [
|
|
32
|
-
"outputdir"
|
|
33
|
-
],
|
|
34
|
-
"char": "d",
|
|
35
|
-
"deprecateAliases": true,
|
|
36
|
-
"description": "The location can be an absolute path or relative to the current working directory. The default is the current directory.",
|
|
37
|
-
"name": "output-dir",
|
|
38
|
-
"summary": "Directory for saving the created files.",
|
|
39
|
-
"default": ".",
|
|
40
|
-
"hasDynamicHelp": false,
|
|
41
|
-
"multiple": false,
|
|
42
|
-
"type": "option"
|
|
43
|
-
},
|
|
44
|
-
"api-version": {
|
|
45
|
-
"aliases": [
|
|
46
|
-
"apiversion"
|
|
47
|
-
],
|
|
48
|
-
"deprecateAliases": true,
|
|
49
|
-
"description": "Override the api version used for api requests made by this command",
|
|
50
|
-
"name": "api-version",
|
|
51
|
-
"hasDynamicHelp": false,
|
|
52
|
-
"multiple": false,
|
|
53
|
-
"type": "option"
|
|
54
|
-
},
|
|
55
|
-
"name": {
|
|
56
|
-
"aliases": [
|
|
57
|
-
"templatename"
|
|
58
|
-
],
|
|
59
|
-
"char": "n",
|
|
60
|
-
"deprecateAliases": true,
|
|
61
|
-
"name": "name",
|
|
62
|
-
"required": true,
|
|
63
|
-
"summary": "Name of the Analytics template.",
|
|
64
|
-
"hasDynamicHelp": false,
|
|
65
|
-
"multiple": false,
|
|
66
|
-
"type": "option"
|
|
67
|
-
},
|
|
68
|
-
"loglevel": {
|
|
69
|
-
"deprecated": {
|
|
70
|
-
"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."
|
|
71
|
-
},
|
|
72
|
-
"hidden": true,
|
|
73
|
-
"name": "loglevel",
|
|
74
|
-
"hasDynamicHelp": false,
|
|
75
|
-
"multiple": false,
|
|
76
|
-
"type": "option"
|
|
77
|
-
}
|
|
78
|
-
},
|
|
79
|
-
"hasDynamicHelp": false,
|
|
80
|
-
"hiddenAliases": [],
|
|
81
|
-
"id": "template:generate:analytics:template",
|
|
82
|
-
"pluginAlias": "@salesforce/plugin-templates",
|
|
83
|
-
"pluginName": "@salesforce/plugin-templates",
|
|
84
|
-
"pluginType": "core",
|
|
85
|
-
"strict": true,
|
|
86
|
-
"summary": "Generate a simple Analytics template.",
|
|
87
|
-
"enableJsonFlag": true,
|
|
88
|
-
"isESM": true,
|
|
89
|
-
"relativePath": [
|
|
90
|
-
"lib",
|
|
91
|
-
"commands",
|
|
92
|
-
"template",
|
|
93
|
-
"generate",
|
|
94
|
-
"analytics",
|
|
95
|
-
"template.js"
|
|
96
|
-
],
|
|
97
|
-
"aliasPermutations": [
|
|
98
|
-
"force:analytics:template:create",
|
|
99
|
-
"analytics:force:template:create",
|
|
100
|
-
"analytics:template:force:create",
|
|
101
|
-
"analytics:template:create:force",
|
|
102
|
-
"force:template:analytics:create",
|
|
103
|
-
"template:force:analytics:create",
|
|
104
|
-
"template:analytics:force:create",
|
|
105
|
-
"template:analytics:create:force",
|
|
106
|
-
"force:template:create:analytics",
|
|
107
|
-
"template:force:create:analytics",
|
|
108
|
-
"template:create:force:analytics",
|
|
109
|
-
"template:create:analytics:force",
|
|
110
|
-
"force:analytics:create:template",
|
|
111
|
-
"analytics:force:create:template",
|
|
112
|
-
"analytics:create:force:template",
|
|
113
|
-
"analytics:create:template:force",
|
|
114
|
-
"force:create:analytics:template",
|
|
115
|
-
"create:force:analytics:template",
|
|
116
|
-
"create:analytics:force:template",
|
|
117
|
-
"create:analytics:template:force",
|
|
118
|
-
"force:create:template:analytics",
|
|
119
|
-
"create:force:template:analytics",
|
|
120
|
-
"create:template:force:analytics",
|
|
121
|
-
"create:template:analytics:force",
|
|
122
|
-
"analytics:generate:template",
|
|
123
|
-
"generate:analytics:template",
|
|
124
|
-
"generate:template:analytics",
|
|
125
|
-
"analytics:template:generate",
|
|
126
|
-
"template:analytics:generate",
|
|
127
|
-
"template:generate:analytics"
|
|
128
|
-
],
|
|
129
|
-
"permutations": [
|
|
130
|
-
"template:generate:analytics:template",
|
|
131
|
-
"generate:template:analytics:template",
|
|
132
|
-
"generate:analytics:template:template",
|
|
133
|
-
"generate:analytics:template:template",
|
|
134
|
-
"template:analytics:generate:template",
|
|
135
|
-
"analytics:template:generate:template",
|
|
136
|
-
"analytics:generate:template:template",
|
|
137
|
-
"analytics:generate:template:template",
|
|
138
|
-
"template:analytics:template:generate",
|
|
139
|
-
"analytics:template:template:generate",
|
|
140
|
-
"analytics:template:template:generate",
|
|
141
|
-
"analytics:template:generate:template",
|
|
142
|
-
"template:generate:template:analytics",
|
|
143
|
-
"generate:template:template:analytics",
|
|
144
|
-
"generate:template:template:analytics",
|
|
145
|
-
"generate:template:analytics:template",
|
|
146
|
-
"template:template:generate:analytics",
|
|
147
|
-
"template:template:generate:analytics",
|
|
148
|
-
"template:generate:template:analytics",
|
|
149
|
-
"template:generate:analytics:template",
|
|
150
|
-
"template:template:analytics:generate",
|
|
151
|
-
"template:template:analytics:generate",
|
|
152
|
-
"template:analytics:template:generate",
|
|
153
|
-
"template:analytics:generate:template"
|
|
154
|
-
]
|
|
155
|
-
},
|
|
156
3
|
"template:generate:apex:class": {
|
|
157
4
|
"aliases": [
|
|
158
5
|
"force:apex:class:create",
|
|
@@ -528,6 +375,159 @@
|
|
|
528
375
|
"trigger:apex:generate:template"
|
|
529
376
|
]
|
|
530
377
|
},
|
|
378
|
+
"template:generate:analytics:template": {
|
|
379
|
+
"aliases": [
|
|
380
|
+
"force:analytics:template:create",
|
|
381
|
+
"analytics:generate:template"
|
|
382
|
+
],
|
|
383
|
+
"args": {},
|
|
384
|
+
"deprecateAliases": true,
|
|
385
|
+
"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.",
|
|
386
|
+
"examples": [
|
|
387
|
+
"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"
|
|
388
|
+
],
|
|
389
|
+
"flags": {
|
|
390
|
+
"json": {
|
|
391
|
+
"description": "Format output as json.",
|
|
392
|
+
"helpGroup": "GLOBAL",
|
|
393
|
+
"name": "json",
|
|
394
|
+
"allowNo": false,
|
|
395
|
+
"type": "boolean"
|
|
396
|
+
},
|
|
397
|
+
"flags-dir": {
|
|
398
|
+
"helpGroup": "GLOBAL",
|
|
399
|
+
"name": "flags-dir",
|
|
400
|
+
"summary": "Import flag values from a directory.",
|
|
401
|
+
"hasDynamicHelp": false,
|
|
402
|
+
"multiple": false,
|
|
403
|
+
"type": "option"
|
|
404
|
+
},
|
|
405
|
+
"output-dir": {
|
|
406
|
+
"aliases": [
|
|
407
|
+
"outputdir"
|
|
408
|
+
],
|
|
409
|
+
"char": "d",
|
|
410
|
+
"deprecateAliases": true,
|
|
411
|
+
"description": "The location can be an absolute path or relative to the current working directory. The default is the current directory.",
|
|
412
|
+
"name": "output-dir",
|
|
413
|
+
"summary": "Directory for saving the created files.",
|
|
414
|
+
"default": ".",
|
|
415
|
+
"hasDynamicHelp": false,
|
|
416
|
+
"multiple": false,
|
|
417
|
+
"type": "option"
|
|
418
|
+
},
|
|
419
|
+
"api-version": {
|
|
420
|
+
"aliases": [
|
|
421
|
+
"apiversion"
|
|
422
|
+
],
|
|
423
|
+
"deprecateAliases": true,
|
|
424
|
+
"description": "Override the api version used for api requests made by this command",
|
|
425
|
+
"name": "api-version",
|
|
426
|
+
"hasDynamicHelp": false,
|
|
427
|
+
"multiple": false,
|
|
428
|
+
"type": "option"
|
|
429
|
+
},
|
|
430
|
+
"name": {
|
|
431
|
+
"aliases": [
|
|
432
|
+
"templatename"
|
|
433
|
+
],
|
|
434
|
+
"char": "n",
|
|
435
|
+
"deprecateAliases": true,
|
|
436
|
+
"name": "name",
|
|
437
|
+
"required": true,
|
|
438
|
+
"summary": "Name of the Analytics template.",
|
|
439
|
+
"hasDynamicHelp": false,
|
|
440
|
+
"multiple": false,
|
|
441
|
+
"type": "option"
|
|
442
|
+
},
|
|
443
|
+
"loglevel": {
|
|
444
|
+
"deprecated": {
|
|
445
|
+
"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."
|
|
446
|
+
},
|
|
447
|
+
"hidden": true,
|
|
448
|
+
"name": "loglevel",
|
|
449
|
+
"hasDynamicHelp": false,
|
|
450
|
+
"multiple": false,
|
|
451
|
+
"type": "option"
|
|
452
|
+
}
|
|
453
|
+
},
|
|
454
|
+
"hasDynamicHelp": false,
|
|
455
|
+
"hiddenAliases": [],
|
|
456
|
+
"id": "template:generate:analytics:template",
|
|
457
|
+
"pluginAlias": "@salesforce/plugin-templates",
|
|
458
|
+
"pluginName": "@salesforce/plugin-templates",
|
|
459
|
+
"pluginType": "core",
|
|
460
|
+
"strict": true,
|
|
461
|
+
"summary": "Generate a simple Analytics template.",
|
|
462
|
+
"enableJsonFlag": true,
|
|
463
|
+
"isESM": true,
|
|
464
|
+
"relativePath": [
|
|
465
|
+
"lib",
|
|
466
|
+
"commands",
|
|
467
|
+
"template",
|
|
468
|
+
"generate",
|
|
469
|
+
"analytics",
|
|
470
|
+
"template.js"
|
|
471
|
+
],
|
|
472
|
+
"aliasPermutations": [
|
|
473
|
+
"force:analytics:template:create",
|
|
474
|
+
"analytics:force:template:create",
|
|
475
|
+
"analytics:template:force:create",
|
|
476
|
+
"analytics:template:create:force",
|
|
477
|
+
"force:template:analytics:create",
|
|
478
|
+
"template:force:analytics:create",
|
|
479
|
+
"template:analytics:force:create",
|
|
480
|
+
"template:analytics:create:force",
|
|
481
|
+
"force:template:create:analytics",
|
|
482
|
+
"template:force:create:analytics",
|
|
483
|
+
"template:create:force:analytics",
|
|
484
|
+
"template:create:analytics:force",
|
|
485
|
+
"force:analytics:create:template",
|
|
486
|
+
"analytics:force:create:template",
|
|
487
|
+
"analytics:create:force:template",
|
|
488
|
+
"analytics:create:template:force",
|
|
489
|
+
"force:create:analytics:template",
|
|
490
|
+
"create:force:analytics:template",
|
|
491
|
+
"create:analytics:force:template",
|
|
492
|
+
"create:analytics:template:force",
|
|
493
|
+
"force:create:template:analytics",
|
|
494
|
+
"create:force:template:analytics",
|
|
495
|
+
"create:template:force:analytics",
|
|
496
|
+
"create:template:analytics:force",
|
|
497
|
+
"analytics:generate:template",
|
|
498
|
+
"generate:analytics:template",
|
|
499
|
+
"generate:template:analytics",
|
|
500
|
+
"analytics:template:generate",
|
|
501
|
+
"template:analytics:generate",
|
|
502
|
+
"template:generate:analytics"
|
|
503
|
+
],
|
|
504
|
+
"permutations": [
|
|
505
|
+
"template:generate:analytics:template",
|
|
506
|
+
"generate:template:analytics:template",
|
|
507
|
+
"generate:analytics:template:template",
|
|
508
|
+
"generate:analytics:template:template",
|
|
509
|
+
"template:analytics:generate:template",
|
|
510
|
+
"analytics:template:generate:template",
|
|
511
|
+
"analytics:generate:template:template",
|
|
512
|
+
"analytics:generate:template:template",
|
|
513
|
+
"template:analytics:template:generate",
|
|
514
|
+
"analytics:template:template:generate",
|
|
515
|
+
"analytics:template:template:generate",
|
|
516
|
+
"analytics:template:generate:template",
|
|
517
|
+
"template:generate:template:analytics",
|
|
518
|
+
"generate:template:template:analytics",
|
|
519
|
+
"generate:template:template:analytics",
|
|
520
|
+
"generate:template:analytics:template",
|
|
521
|
+
"template:template:generate:analytics",
|
|
522
|
+
"template:template:generate:analytics",
|
|
523
|
+
"template:generate:template:analytics",
|
|
524
|
+
"template:generate:analytics:template",
|
|
525
|
+
"template:template:analytics:generate",
|
|
526
|
+
"template:template:analytics:generate",
|
|
527
|
+
"template:analytics:template:generate",
|
|
528
|
+
"template:analytics:generate:template"
|
|
529
|
+
]
|
|
530
|
+
},
|
|
531
531
|
"template:generate:digital-experience:site": {
|
|
532
532
|
"aliases": [],
|
|
533
533
|
"args": {},
|
|
@@ -656,6 +656,189 @@
|
|
|
656
656
|
"site:digital-experience:generate:template"
|
|
657
657
|
]
|
|
658
658
|
},
|
|
659
|
+
"template:generate:flexipage": {
|
|
660
|
+
"aliases": [],
|
|
661
|
+
"args": {},
|
|
662
|
+
"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.",
|
|
663
|
+
"examples": [
|
|
664
|
+
"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",
|
|
665
|
+
"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",
|
|
666
|
+
"Generate a HomePage FlexiPage with a custom label:\n<%= config.bin %> <%= command.id %> --name Custom_Home --template HomePage --label \"Sales Home Page\"",
|
|
667
|
+
"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"
|
|
668
|
+
],
|
|
669
|
+
"flags": {
|
|
670
|
+
"json": {
|
|
671
|
+
"description": "Format output as json.",
|
|
672
|
+
"helpGroup": "GLOBAL",
|
|
673
|
+
"name": "json",
|
|
674
|
+
"allowNo": false,
|
|
675
|
+
"type": "boolean"
|
|
676
|
+
},
|
|
677
|
+
"flags-dir": {
|
|
678
|
+
"helpGroup": "GLOBAL",
|
|
679
|
+
"name": "flags-dir",
|
|
680
|
+
"summary": "Import flag values from a directory.",
|
|
681
|
+
"hasDynamicHelp": false,
|
|
682
|
+
"multiple": false,
|
|
683
|
+
"type": "option"
|
|
684
|
+
},
|
|
685
|
+
"name": {
|
|
686
|
+
"aliases": [
|
|
687
|
+
"flexipagename"
|
|
688
|
+
],
|
|
689
|
+
"char": "n",
|
|
690
|
+
"deprecateAliases": true,
|
|
691
|
+
"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.",
|
|
692
|
+
"name": "name",
|
|
693
|
+
"required": true,
|
|
694
|
+
"summary": "Name of the FlexiPage.",
|
|
695
|
+
"hasDynamicHelp": false,
|
|
696
|
+
"multiple": false,
|
|
697
|
+
"type": "option"
|
|
698
|
+
},
|
|
699
|
+
"template": {
|
|
700
|
+
"char": "t",
|
|
701
|
+
"name": "template",
|
|
702
|
+
"required": true,
|
|
703
|
+
"summary": "Template type for the FlexiPage.",
|
|
704
|
+
"hasDynamicHelp": false,
|
|
705
|
+
"multiple": false,
|
|
706
|
+
"options": [
|
|
707
|
+
"RecordPage",
|
|
708
|
+
"AppPage",
|
|
709
|
+
"HomePage"
|
|
710
|
+
],
|
|
711
|
+
"type": "option"
|
|
712
|
+
},
|
|
713
|
+
"output-dir": {
|
|
714
|
+
"aliases": [
|
|
715
|
+
"outputdir"
|
|
716
|
+
],
|
|
717
|
+
"char": "d",
|
|
718
|
+
"deprecateAliases": true,
|
|
719
|
+
"description": "The location can be an absolute path or relative to the current working directory. The default is the current directory.",
|
|
720
|
+
"name": "output-dir",
|
|
721
|
+
"summary": "Directory for saving the created files.",
|
|
722
|
+
"default": ".",
|
|
723
|
+
"hasDynamicHelp": false,
|
|
724
|
+
"multiple": false,
|
|
725
|
+
"type": "option"
|
|
726
|
+
},
|
|
727
|
+
"api-version": {
|
|
728
|
+
"aliases": [
|
|
729
|
+
"apiversion"
|
|
730
|
+
],
|
|
731
|
+
"deprecateAliases": true,
|
|
732
|
+
"description": "Override the api version used for api requests made by this command",
|
|
733
|
+
"name": "api-version",
|
|
734
|
+
"hasDynamicHelp": false,
|
|
735
|
+
"multiple": false,
|
|
736
|
+
"type": "option"
|
|
737
|
+
},
|
|
738
|
+
"label": {
|
|
739
|
+
"aliases": [
|
|
740
|
+
"masterlabel"
|
|
741
|
+
],
|
|
742
|
+
"deprecateAliases": true,
|
|
743
|
+
"name": "label",
|
|
744
|
+
"summary": "Label of this FlexiPage; if not specified, uses the FlexiPage name as the label.",
|
|
745
|
+
"hasDynamicHelp": false,
|
|
746
|
+
"multiple": false,
|
|
747
|
+
"type": "option"
|
|
748
|
+
},
|
|
749
|
+
"description": {
|
|
750
|
+
"name": "description",
|
|
751
|
+
"summary": "Description for the FlexiPage, which provides context about its purpose.",
|
|
752
|
+
"hasDynamicHelp": false,
|
|
753
|
+
"multiple": false,
|
|
754
|
+
"type": "option"
|
|
755
|
+
},
|
|
756
|
+
"sobject": {
|
|
757
|
+
"aliases": [
|
|
758
|
+
"entity-name",
|
|
759
|
+
"entity"
|
|
760
|
+
],
|
|
761
|
+
"char": "s",
|
|
762
|
+
"deprecateAliases": true,
|
|
763
|
+
"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.",
|
|
764
|
+
"name": "sobject",
|
|
765
|
+
"summary": "API name of the Salesforce object; required when creating a RecordPage.",
|
|
766
|
+
"hasDynamicHelp": false,
|
|
767
|
+
"multiple": false,
|
|
768
|
+
"type": "option"
|
|
769
|
+
},
|
|
770
|
+
"primary-field": {
|
|
771
|
+
"name": "primary-field",
|
|
772
|
+
"summary": "Primary field for the dynamic highlights header; typically 'Name'. Used only with RecordPage.",
|
|
773
|
+
"hasDynamicHelp": false,
|
|
774
|
+
"multiple": false,
|
|
775
|
+
"type": "option"
|
|
776
|
+
},
|
|
777
|
+
"secondary-fields": {
|
|
778
|
+
"name": "secondary-fields",
|
|
779
|
+
"summary": "Secondary fields shown in the dynamic highlights header. Specify multiple fields separated by commas. Maximum of 11 fields. Used only with RecordPage.",
|
|
780
|
+
"delimiter": ",",
|
|
781
|
+
"hasDynamicHelp": false,
|
|
782
|
+
"multiple": true,
|
|
783
|
+
"type": "option"
|
|
784
|
+
},
|
|
785
|
+
"detail-fields": {
|
|
786
|
+
"name": "detail-fields",
|
|
787
|
+
"summary": "Fields to display in the Details tab. Specify multiple fields separated by commas. Fields are split into two columns. Used only with RecordPage.",
|
|
788
|
+
"delimiter": ",",
|
|
789
|
+
"hasDynamicHelp": false,
|
|
790
|
+
"multiple": true,
|
|
791
|
+
"type": "option"
|
|
792
|
+
},
|
|
793
|
+
"internal": {
|
|
794
|
+
"char": "i",
|
|
795
|
+
"hidden": true,
|
|
796
|
+
"name": "internal",
|
|
797
|
+
"summary": "Generate lightning bundles without creating a -meta.xml file.",
|
|
798
|
+
"allowNo": false,
|
|
799
|
+
"type": "boolean"
|
|
800
|
+
},
|
|
801
|
+
"loglevel": {
|
|
802
|
+
"deprecated": {
|
|
803
|
+
"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."
|
|
804
|
+
},
|
|
805
|
+
"hidden": true,
|
|
806
|
+
"name": "loglevel",
|
|
807
|
+
"hasDynamicHelp": false,
|
|
808
|
+
"multiple": false,
|
|
809
|
+
"type": "option"
|
|
810
|
+
}
|
|
811
|
+
},
|
|
812
|
+
"hasDynamicHelp": false,
|
|
813
|
+
"hiddenAliases": [],
|
|
814
|
+
"id": "template:generate:flexipage",
|
|
815
|
+
"pluginAlias": "@salesforce/plugin-templates",
|
|
816
|
+
"pluginName": "@salesforce/plugin-templates",
|
|
817
|
+
"pluginType": "core",
|
|
818
|
+
"state": "beta",
|
|
819
|
+
"strict": true,
|
|
820
|
+
"summary": "Generate a FlexiPage, also known as a Lightning page.",
|
|
821
|
+
"enableJsonFlag": true,
|
|
822
|
+
"MAX_SECONDARY_FIELDS": 11,
|
|
823
|
+
"isESM": true,
|
|
824
|
+
"relativePath": [
|
|
825
|
+
"lib",
|
|
826
|
+
"commands",
|
|
827
|
+
"template",
|
|
828
|
+
"generate",
|
|
829
|
+
"flexipage",
|
|
830
|
+
"index.js"
|
|
831
|
+
],
|
|
832
|
+
"aliasPermutations": [],
|
|
833
|
+
"permutations": [
|
|
834
|
+
"template:generate:flexipage",
|
|
835
|
+
"generate:template:flexipage",
|
|
836
|
+
"generate:flexipage:template",
|
|
837
|
+
"template:flexipage:generate",
|
|
838
|
+
"flexipage:template:generate",
|
|
839
|
+
"flexipage:generate:template"
|
|
840
|
+
]
|
|
841
|
+
},
|
|
659
842
|
"template:generate:lightning:app": {
|
|
660
843
|
"aliases": [
|
|
661
844
|
"force:lightning:app:create",
|
|
@@ -2322,5 +2505,5 @@
|
|
|
2322
2505
|
]
|
|
2323
2506
|
}
|
|
2324
2507
|
},
|
|
2325
|
-
"version": "56.
|
|
2508
|
+
"version": "56.8.0"
|
|
2326
2509
|
}
|
package/package.json
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/plugin-templates",
|
|
3
3
|
"description": "Commands to create metadata from a default or custom template",
|
|
4
|
-
"version": "56.
|
|
4
|
+
"version": "56.8.0",
|
|
5
5
|
"author": "Salesforce",
|
|
6
6
|
"bugs": "https://github.com/salesforcecli/plugin-templates/issues",
|
|
7
|
+
"enableO11y": true,
|
|
8
|
+
"o11yUploadEndpoint": "https://794testsite.my.site.com/byolwr/webruntime/log/metrics",
|
|
7
9
|
"dependencies": {
|
|
8
10
|
"@salesforce/core": "^8.25.1",
|
|
9
11
|
"@salesforce/sf-plugins-core": "^12",
|
|
@@ -64,6 +66,9 @@
|
|
|
64
66
|
"apex": {
|
|
65
67
|
"description": "Create an apex class or trigger."
|
|
66
68
|
},
|
|
69
|
+
"flexipage": {
|
|
70
|
+
"description": "Generate a Lightning FlexiPage from a template."
|
|
71
|
+
},
|
|
67
72
|
"digital-experience": {
|
|
68
73
|
"description": "Create a Digital Experience site."
|
|
69
74
|
},
|
|
@@ -244,7 +249,7 @@
|
|
|
244
249
|
"exports": "./lib/index.js",
|
|
245
250
|
"type": "module",
|
|
246
251
|
"sfdx": {
|
|
247
|
-
"publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-templates/56.
|
|
248
|
-
"signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-templates/56.
|
|
252
|
+
"publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-templates/56.8.0.crt",
|
|
253
|
+
"signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-templates/56.8.0.sig"
|
|
249
254
|
}
|
|
250
255
|
}
|