@salesforce/plugin-templates 56.13.0 → 56.13.2

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 CHANGED
@@ -131,6 +131,7 @@ Congrats, you are debugging!
131
131
  - [`sf template generate lightning test`](#sf-template-generate-lightning-test)
132
132
  - [`sf template generate project`](#sf-template-generate-project)
133
133
  - [`sf template generate static-resource`](#sf-template-generate-static-resource)
134
+ - [`sf template generate ui-bundle`](#sf-template-generate-ui-bundle)
134
135
  - [`sf template generate visualforce component`](#sf-template-generate-visualforce-component)
135
136
  - [`sf template generate visualforce page`](#sf-template-generate-visualforce-page)
136
137
 
@@ -176,7 +177,7 @@ FLAG DESCRIPTIONS
176
177
  directory.
177
178
  ```
178
179
 
179
- _See code: [src/commands/template/generate/analytics/template.ts](https://github.com/salesforcecli/plugin-templates/blob/56.13.0/src/commands/template/generate/analytics/template.ts)_
180
+ _See code: [src/commands/template/generate/analytics/template.ts](https://github.com/salesforcecli/plugin-templates/blob/56.13.2/src/commands/template/generate/analytics/template.ts)_
180
181
 
181
182
  ## `sf template generate apex class`
182
183
 
@@ -236,7 +237,7 @@ FLAG DESCRIPTIONS
236
237
  Supplied parameter values or default values are filled into a copy of the template.
237
238
  ```
238
239
 
239
- _See code: [src/commands/template/generate/apex/class.ts](https://github.com/salesforcecli/plugin-templates/blob/56.13.0/src/commands/template/generate/apex/class.ts)_
240
+ _See code: [src/commands/template/generate/apex/class.ts](https://github.com/salesforcecli/plugin-templates/blob/56.13.2/src/commands/template/generate/apex/class.ts)_
240
241
 
241
242
  ## `sf template generate apex trigger`
242
243
 
@@ -306,7 +307,7 @@ FLAG DESCRIPTIONS
306
307
  Supplied parameter values or default values are filled into a copy of the template.
307
308
  ```
308
309
 
309
- _See code: [src/commands/template/generate/apex/trigger.ts](https://github.com/salesforcecli/plugin-templates/blob/56.13.0/src/commands/template/generate/apex/trigger.ts)_
310
+ _See code: [src/commands/template/generate/apex/trigger.ts](https://github.com/salesforcecli/plugin-templates/blob/56.13.2/src/commands/template/generate/apex/trigger.ts)_
310
311
 
311
312
  ## `sf template generate digital-experience site`
312
313
 
@@ -360,7 +361,7 @@ FLAG DESCRIPTIONS
360
361
  project, defaults to the current directory.
361
362
  ```
362
363
 
363
- _See code: [src/commands/template/generate/digital-experience/site.ts](https://github.com/salesforcecli/plugin-templates/blob/56.13.0/src/commands/template/generate/digital-experience/site.ts)_
364
+ _See code: [src/commands/template/generate/digital-experience/site.ts](https://github.com/salesforcecli/plugin-templates/blob/56.13.2/src/commands/template/generate/digital-experience/site.ts)_
364
365
 
365
366
  ## `sf template generate flexipage`
366
367
 
@@ -442,7 +443,7 @@ FLAG DESCRIPTIONS
442
443
  'Custom_Object__c'. This sets the `sobjectType` field in the FlexiPage metadata.
443
444
  ```
444
445
 
445
- _See code: [src/commands/template/generate/flexipage/index.ts](https://github.com/salesforcecli/plugin-templates/blob/56.13.0/src/commands/template/generate/flexipage/index.ts)_
446
+ _See code: [src/commands/template/generate/flexipage/index.ts](https://github.com/salesforcecli/plugin-templates/blob/56.13.2/src/commands/template/generate/flexipage/index.ts)_
446
447
 
447
448
  ## `sf template generate lightning app`
448
449
 
@@ -498,7 +499,7 @@ FLAG DESCRIPTIONS
498
499
  Supplied parameter values or default values are filled into a copy of the template.
499
500
  ```
500
501
 
501
- _See code: [src/commands/template/generate/lightning/app.ts](https://github.com/salesforcecli/plugin-templates/blob/56.13.0/src/commands/template/generate/lightning/app.ts)_
502
+ _See code: [src/commands/template/generate/lightning/app.ts](https://github.com/salesforcecli/plugin-templates/blob/56.13.2/src/commands/template/generate/lightning/app.ts)_
502
503
 
503
504
  ## `sf template generate lightning component`
504
505
 
@@ -568,7 +569,7 @@ FLAG DESCRIPTIONS
568
569
  Supplied parameter values or default values are filled into a copy of the template.
569
570
  ```
570
571
 
571
- _See code: [src/commands/template/generate/lightning/component.ts](https://github.com/salesforcecli/plugin-templates/blob/56.13.0/src/commands/template/generate/lightning/component.ts)_
572
+ _See code: [src/commands/template/generate/lightning/component.ts](https://github.com/salesforcecli/plugin-templates/blob/56.13.2/src/commands/template/generate/lightning/component.ts)_
572
573
 
573
574
  ## `sf template generate lightning event`
574
575
 
@@ -624,7 +625,7 @@ FLAG DESCRIPTIONS
624
625
  Supplied parameter values or default values are filled into a copy of the template.
625
626
  ```
626
627
 
627
- _See code: [src/commands/template/generate/lightning/event.ts](https://github.com/salesforcecli/plugin-templates/blob/56.13.0/src/commands/template/generate/lightning/event.ts)_
628
+ _See code: [src/commands/template/generate/lightning/event.ts](https://github.com/salesforcecli/plugin-templates/blob/56.13.2/src/commands/template/generate/lightning/event.ts)_
628
629
 
629
630
  ## `sf template generate lightning interface`
630
631
 
@@ -680,7 +681,7 @@ FLAG DESCRIPTIONS
680
681
  Supplied parameter values or default values are filled into a copy of the template.
681
682
  ```
682
683
 
683
- _See code: [src/commands/template/generate/lightning/interface.ts](https://github.com/salesforcecli/plugin-templates/blob/56.13.0/src/commands/template/generate/lightning/interface.ts)_
684
+ _See code: [src/commands/template/generate/lightning/interface.ts](https://github.com/salesforcecli/plugin-templates/blob/56.13.2/src/commands/template/generate/lightning/interface.ts)_
684
685
 
685
686
  ## `sf template generate lightning test`
686
687
 
@@ -736,7 +737,7 @@ FLAG DESCRIPTIONS
736
737
  Supplied parameter values or default values are filled into a copy of the template.
737
738
  ```
738
739
 
739
- _See code: [src/commands/template/generate/lightning/test.ts](https://github.com/salesforcecli/plugin-templates/blob/56.13.0/src/commands/template/generate/lightning/test.ts)_
740
+ _See code: [src/commands/template/generate/lightning/test.ts](https://github.com/salesforcecli/plugin-templates/blob/56.13.2/src/commands/template/generate/lightning/test.ts)_
740
741
 
741
742
  ## `sf template generate project`
742
743
 
@@ -849,7 +850,7 @@ FLAG DESCRIPTIONS
849
850
  Override the api version used for api requests made by this command
850
851
  ```
851
852
 
852
- _See code: [src/commands/template/generate/project/index.ts](https://github.com/salesforcecli/plugin-templates/blob/56.13.0/src/commands/template/generate/project/index.ts)_
853
+ _See code: [src/commands/template/generate/project/index.ts](https://github.com/salesforcecli/plugin-templates/blob/56.13.2/src/commands/template/generate/project/index.ts)_
853
854
 
854
855
  ## `sf template generate static-resource`
855
856
 
@@ -912,7 +913,94 @@ FLAG DESCRIPTIONS
912
913
  etc.
913
914
  ```
914
915
 
915
- _See code: [src/commands/template/generate/static-resource/index.ts](https://github.com/salesforcecli/plugin-templates/blob/56.13.0/src/commands/template/generate/static-resource/index.ts)_
916
+ _See code: [src/commands/template/generate/static-resource/index.ts](https://github.com/salesforcecli/plugin-templates/blob/56.13.2/src/commands/template/generate/static-resource/index.ts)_
917
+
918
+ ## `sf template generate ui-bundle`
919
+
920
+ Generate a UI bundle, which contains the code and metadata to build a UI experience that uses non-native Salesforce frameworks, such as React.
921
+
922
+ ```
923
+ USAGE
924
+ $ sf template generate ui-bundle -n <value> [--json] [--flags-dir <value>] [-t default|reactbasic] [-l <value>] [-d <value>]
925
+ [--api-version <value>]
926
+
927
+ FLAGS
928
+ -d, --output-dir=<value> Directory into which the files are created.
929
+ -l, --label=<value> Master label for the UI bundle.
930
+ -n, --name=<value> (required) API name of the generated UI bundle.
931
+ -t, --template=<option> [default: default] Template to use when creating the files for a specific UI framework.
932
+ <options: default|reactbasic>
933
+ --api-version=<value> Override the api version used for api requests made by this command
934
+
935
+ GLOBAL FLAGS
936
+ --flags-dir=<value> Import flag values from a directory.
937
+ --json Format output as json.
938
+
939
+ DESCRIPTION
940
+ Generate a UI bundle, which contains the code and metadata to build a UI experience that uses non-native Salesforce
941
+ frameworks, such as React.
942
+
943
+ Salesforce provides native UI frameworks, such as Lighting Web Components (LWC), to build applications that run on the
944
+ Salesforce Platform. But you can also use non-native JavaScript- or TypeScript-based UI frameworks, such as React, to
945
+ build a UI experience for the Salesforce Platform and that you can launch from the App Launcher.
946
+
947
+ These non-native UI experiences are defined by the "UIBundle" metadata type in your DX project. Use this command to
948
+ generate the required DX project structure and files. For example, when you run this command and specify the name
949
+ MyUiBundle, then the files are generated into a "uiBundles/MyUiBundle" directory. Use the --output-dir flag to specify
950
+ a different directory.
951
+
952
+ Use the --template flag for generating the files to get started with a speciic UI framework, such as React. Check out
953
+ the README.md file in the generated "uiBundles/<bundlename>" directory for more information about the template.
954
+
955
+ ALIASES
956
+ $ sf ui-bundle generate
957
+
958
+ EXAMPLES
959
+ Generate a UI bundle called MyUiBundle in the current directory:
960
+
961
+ $ sf template generate ui-bundle --name MyUiBundle
962
+
963
+ Generate a React-based UI bundle:
964
+
965
+ $ sf template generate ui-bundle --name MyReactApp --template reactbasic
966
+
967
+ Generate the React-based UI bundle in the "force-app/main/default/uiBundles" directory:
968
+
969
+ $ sf template generate ui-bundle --name MyUiBundle --template reactbasic --output-dir \
970
+ force-app/main/default/uiBundles
971
+
972
+ FLAG DESCRIPTIONS
973
+ -d, --output-dir=<value> Directory into which the files are created.
974
+
975
+ The location can be an absolute path or relative to the current working directory.
976
+
977
+ If not specified, the command reads your sfdx-project.json and defaults to "uiBundles" directory within your default
978
+ package directory. When running outside a Salesforce DX project, defaults to the current directory.
979
+
980
+ **Important:** This command automatically ensures the output directory ends with "uiBundles". If your specified path
981
+ doesn't end with "uiBundles", it's automatically appended. The UI bundle is created at "<output-dir>/<name>".
982
+
983
+ **Examples:**
984
+
985
+ - "--output-dir force-app/main/default" → Creates a UI bundle at "force-app/main/default/uiBundles/MyUiBundle/"
986
+ - "--output-dir force-app/main/default/uiBundles" → Creates a UI bundle at
987
+ "force-app/main/default/uiBundles/MyUiBundle/" (no change)
988
+
989
+ -l, --label=<value> Master label for the UI bundle.
990
+
991
+ If not specified, the label is derived from the name.
992
+
993
+ -n, --name=<value> API name of the generated UI bundle.
994
+
995
+ This name can contain only underscores and alphanumeric characters, and must be unique in your org. It must begin
996
+ with a letter, not include spaces, not end with an underscore, and not contain two consecutive underscores.
997
+
998
+ -t, --template=default|reactbasic Template to use when creating the files for a specific UI framework.
999
+
1000
+ Supplied parameter values or default values are filled into a copy of the template.
1001
+ ```
1002
+
1003
+ _See code: [src/commands/template/generate/ui-bundle/index.ts](https://github.com/salesforcecli/plugin-templates/blob/56.13.2/src/commands/template/generate/ui-bundle/index.ts)_
916
1004
 
917
1005
  ## `sf template generate visualforce component`
918
1006
 
@@ -969,7 +1057,7 @@ FLAG DESCRIPTIONS
969
1057
  Supplied parameter values or default values are filled into a copy of the template.
970
1058
  ```
971
1059
 
972
- _See code: [src/commands/template/generate/visualforce/component.ts](https://github.com/salesforcecli/plugin-templates/blob/56.13.0/src/commands/template/generate/visualforce/component.ts)_
1060
+ _See code: [src/commands/template/generate/visualforce/component.ts](https://github.com/salesforcecli/plugin-templates/blob/56.13.2/src/commands/template/generate/visualforce/component.ts)_
973
1061
 
974
1062
  ## `sf template generate visualforce page`
975
1063
 
@@ -1020,6 +1108,6 @@ FLAG DESCRIPTIONS
1020
1108
  The name can be up to 40 characters and must start with a letter.
1021
1109
  ```
1022
1110
 
1023
- _See code: [src/commands/template/generate/visualforce/page.ts](https://github.com/salesforcecli/plugin-templates/blob/56.13.0/src/commands/template/generate/visualforce/page.ts)_
1111
+ _See code: [src/commands/template/generate/visualforce/page.ts](https://github.com/salesforcecli/plugin-templates/blob/56.13.2/src/commands/template/generate/visualforce/page.ts)_
1024
1112
 
1025
1113
  <!-- commandsstop -->
@@ -5,7 +5,6 @@ export default class UiBundleGenerate extends SfCommand<CreateOutput> {
5
5
  static readonly summary: string;
6
6
  static readonly description: string;
7
7
  static readonly examples: string[];
8
- static readonly hidden = true;
9
8
  static readonly aliases: string[];
10
9
  static readonly flags: {
11
10
  name: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
@@ -16,7 +16,6 @@ export default class UiBundleGenerate extends SfCommand {
16
16
  static summary = messages.getMessage('summary');
17
17
  static description = messages.getMessage('description');
18
18
  static examples = messages.getMessages('examples');
19
- static hidden = true; // Hide from external developers until GA
20
19
  static aliases = ['ui-bundle:generate'];
21
20
  static flags = {
22
21
  name: Flags.string({
@@ -1 +1 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MAAM,CAAC,KAAK,CAAC,mBAAmB;QACtC,IAAI,CAAC;YACH,MAAM,OAAO,GAAG,MAAM,SAAS,CAAC,OAAO,EAAE,CAAC;YAC1C,MAAM,cAAc,GAAG,OAAO,CAAC,iBAAiB,EAAE,CAAC;YACnD,OAAO,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,cAAc,CAAC,CAAC;QAC3E,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,GAAG,CAAC;QACb,CAAC;IACH,CAAC;IAEM,KAAK,CAAC,GAAG;QACd,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC;QAErD,MAAM,SAAS,GAAG,KAAK,CAAC,YAAY,CAAC,IAAI,CAAC,MAAM,gBAAgB,CAAC,mBAAmB,EAAE,CAAC,CAAC;QAExF,MAAM,cAAc,GAAoB;YACtC,UAAU,EAAE,KAAK,CAAC,IAAI;YACtB,QAAQ,EAAE,KAAK,CAAC,QAAQ;YACxB,WAAW,EAAE,KAAK,CAAC,KAAK;YACxB,SAAS,EAAE,SAAS;YACpB,UAAU,EAAE,KAAK,CAAC,aAAa,CAAC;SACjC,CAAC;QAEF,OAAO,YAAY,CAAC;YAClB,YAAY,EAAE,YAAY,CAAC,QAAQ;YACnC,IAAI,EAAE,cAAc;YACpB,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,WAAW,EAAE,IAAI,CAAC,WAAW,EAAE,EAAE,CAAC;YAC/C,SAAS,EAAE,kBAAkB,CAAC,IAAI,CAAC,gBAAgB,CAAC;SACrD,CAAC,CAAC;IACL,CAAC"}
@@ -1,10 +1,14 @@
1
1
  # summary
2
2
 
3
- Generate a UI bundle.
3
+ Generate a UI bundle, which contains the code and metadata to build a UI experience that uses non-native Salesforce frameworks, such as React.
4
4
 
5
5
  # description
6
6
 
7
- Generates a UI bundle in the specified directory or the current working directory. The UI bundle files are created in a folder with the designated name. UI bundle files must be contained in a parent directory called "uiBundles" 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.
7
+ Salesforce provides native UI frameworks, such as Lighting Web Components (LWC), to build applications that run on the Salesforce Platform. But you can also use non-native JavaScript- or TypeScript-based UI frameworks, such as React, to build a UI experience for the Salesforce Platform and that you can launch from the App Launcher.
8
+
9
+ These non-native UI experiences are defined by the "UIBundle" metadata type in your DX project. Use this command to generate the required DX project structure and files. For example, when you run this command and specify the name MyUiBundle, then the files are generated into a "uiBundles/MyUiBundle" directory. Use the --output-dir flag to specify a different directory.
10
+
11
+ Use the --template flag for generating the files to get started with a speciic UI framework, such as React. Check out the README.md file in the generated "uiBundles/<bundlename>" directory for more information about the template.
8
12
 
9
13
  # examples
10
14
 
@@ -16,13 +20,13 @@ Generates a UI bundle in the specified directory or the current working director
16
20
 
17
21
  <%= config.bin %> <%= command.id %> --name MyReactApp --template reactbasic
18
22
 
19
- - Generate the UI bundle in the "force-app/main/default/uiBundles" directory:
23
+ - Generate the React-based UI bundle in the "force-app/main/default/uiBundles" directory:
20
24
 
21
- <%= config.bin %> <%= command.id %> --name MyUiBundle --output-dir force-app/main/default/uiBundles
25
+ <%= config.bin %> <%= command.id %> --name MyUiBundle --template reactbasic --output-dir force-app/main/default/uiBundles
22
26
 
23
27
  # flags.name.summary
24
28
 
25
- Name of the generated UI bundle.
29
+ API name of the generated UI bundle.
26
30
 
27
31
  # flags.name.description
28
32
 
@@ -30,7 +34,7 @@ This name can contain only underscores and alphanumeric characters, and must be
30
34
 
31
35
  # flags.template.summary
32
36
 
33
- Template to use for file creation.
37
+ Template to use when creating the files for a specific UI framework.
34
38
 
35
39
  # flags.template.description
36
40
 
@@ -46,17 +50,17 @@ If not specified, the label is derived from the name.
46
50
 
47
51
  # flags.output-dir.summary
48
52
 
49
- Directory for saving the created files.
53
+ Directory into which the files are created.
50
54
 
51
55
  # flags.output-dir.description
52
56
 
53
57
  The location can be an absolute path or relative to the current working directory.
54
58
 
55
- **Important:** The generator automatically ensures the output directory ends with "uiBundles". If your specified path doesn't end with "uiBundles", it's automatically appended. The UI bundle is created at "<output-dir>/<name>".
59
+ If not specified, the command reads your sfdx-project.json and defaults to "uiBundles" directory within your default package directory. When running outside a Salesforce DX project, defaults to the current directory.
60
+
61
+ **Important:** This command automatically ensures the output directory ends with "uiBundles". If your specified path doesn't end with "uiBundles", it's automatically appended. The UI bundle is created at "<output-dir>/<name>".
56
62
 
57
63
  **Examples:**
58
64
 
59
65
  - "--output-dir force-app/main/default" → Creates a UI bundle at "force-app/main/default/uiBundles/MyUiBundle/"
60
66
  - "--output-dir force-app/main/default/uiBundles" → Creates a UI bundle at "force-app/main/default/uiBundles/MyUiBundle/" (no change)
61
-
62
- If not specified, the command reads your sfdx-project.json and defaults to "uiBundles" directory within your default package directory. When running outside a Salesforce DX project, defaults to the current directory.
@@ -375,6 +375,134 @@
375
375
  "trigger:apex:generate:template"
376
376
  ]
377
377
  },
378
+ "template:generate:digital-experience:site": {
379
+ "aliases": [],
380
+ "args": {},
381
+ "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.",
382
+ "examples": [
383
+ "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",
384
+ "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"
385
+ ],
386
+ "flags": {
387
+ "json": {
388
+ "description": "Format output as json.",
389
+ "helpGroup": "GLOBAL",
390
+ "name": "json",
391
+ "allowNo": false,
392
+ "type": "boolean"
393
+ },
394
+ "flags-dir": {
395
+ "helpGroup": "GLOBAL",
396
+ "name": "flags-dir",
397
+ "summary": "Import flag values from a directory.",
398
+ "hasDynamicHelp": false,
399
+ "multiple": false,
400
+ "type": "option"
401
+ },
402
+ "target-org": {
403
+ "char": "o",
404
+ "name": "target-org",
405
+ "noCacheDefault": true,
406
+ "summary": "Username or alias of the target org.",
407
+ "hasDynamicHelp": true,
408
+ "multiple": false,
409
+ "type": "option"
410
+ },
411
+ "name": {
412
+ "char": "n",
413
+ "name": "name",
414
+ "required": true,
415
+ "summary": "Name of the Experience Cloud site to generate.",
416
+ "hasDynamicHelp": false,
417
+ "multiple": false,
418
+ "type": "option"
419
+ },
420
+ "template-name": {
421
+ "char": "t",
422
+ "name": "template-name",
423
+ "required": true,
424
+ "summary": "Template to use when generating the site.",
425
+ "hasDynamicHelp": false,
426
+ "multiple": false,
427
+ "options": [
428
+ "Build Your Own (LWR)"
429
+ ],
430
+ "type": "option"
431
+ },
432
+ "url-path-prefix": {
433
+ "char": "p",
434
+ "name": "url-path-prefix",
435
+ "summary": "URL path prefix for the site; must contain only alphanumeric characters.",
436
+ "default": "",
437
+ "hasDynamicHelp": false,
438
+ "multiple": false,
439
+ "type": "option"
440
+ },
441
+ "admin-email": {
442
+ "char": "e",
443
+ "name": "admin-email",
444
+ "summary": "Email address for the site administrator. Defaults to the username of the currently authenticated user.",
445
+ "hasDynamicHelp": false,
446
+ "multiple": false,
447
+ "type": "option"
448
+ },
449
+ "output-dir": {
450
+ "char": "d",
451
+ "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.",
452
+ "name": "output-dir",
453
+ "summary": "Directory to generate the site files in.",
454
+ "hasDynamicHelp": false,
455
+ "multiple": false,
456
+ "type": "option"
457
+ }
458
+ },
459
+ "hasDynamicHelp": true,
460
+ "hiddenAliases": [],
461
+ "id": "template:generate:digital-experience:site",
462
+ "pluginAlias": "@salesforce/plugin-templates",
463
+ "pluginName": "@salesforce/plugin-templates",
464
+ "pluginType": "core",
465
+ "state": "preview",
466
+ "strict": true,
467
+ "summary": "Generate an Experience Cloud site.",
468
+ "enableJsonFlag": true,
469
+ "isESM": true,
470
+ "relativePath": [
471
+ "lib",
472
+ "commands",
473
+ "template",
474
+ "generate",
475
+ "digital-experience",
476
+ "site.js"
477
+ ],
478
+ "aliasPermutations": [],
479
+ "permutations": [
480
+ "template:generate:digital-experience:site",
481
+ "generate:template:digital-experience:site",
482
+ "generate:digital-experience:template:site",
483
+ "generate:digital-experience:site:template",
484
+ "template:digital-experience:generate:site",
485
+ "digital-experience:template:generate:site",
486
+ "digital-experience:generate:template:site",
487
+ "digital-experience:generate:site:template",
488
+ "template:digital-experience:site:generate",
489
+ "digital-experience:template:site:generate",
490
+ "digital-experience:site:template:generate",
491
+ "digital-experience:site:generate:template",
492
+ "template:generate:site:digital-experience",
493
+ "generate:template:site:digital-experience",
494
+ "generate:site:template:digital-experience",
495
+ "generate:site:digital-experience:template",
496
+ "template:site:generate:digital-experience",
497
+ "site:template:generate:digital-experience",
498
+ "site:generate:template:digital-experience",
499
+ "site:generate:digital-experience:template",
500
+ "template:site:digital-experience:generate",
501
+ "site:template:digital-experience:generate",
502
+ "site:digital-experience:template:generate",
503
+ "site:digital-experience:generate:template"
504
+ ]
505
+ },
378
506
  "template:generate:analytics:template": {
379
507
  "aliases": [
380
508
  "force:analytics:template:create",
@@ -528,134 +656,6 @@
528
656
  "template:analytics:generate:template"
529
657
  ]
530
658
  },
531
- "template:generate:digital-experience:site": {
532
- "aliases": [],
533
- "args": {},
534
- "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.",
535
- "examples": [
536
- "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",
537
- "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"
538
- ],
539
- "flags": {
540
- "json": {
541
- "description": "Format output as json.",
542
- "helpGroup": "GLOBAL",
543
- "name": "json",
544
- "allowNo": false,
545
- "type": "boolean"
546
- },
547
- "flags-dir": {
548
- "helpGroup": "GLOBAL",
549
- "name": "flags-dir",
550
- "summary": "Import flag values from a directory.",
551
- "hasDynamicHelp": false,
552
- "multiple": false,
553
- "type": "option"
554
- },
555
- "target-org": {
556
- "char": "o",
557
- "name": "target-org",
558
- "noCacheDefault": true,
559
- "summary": "Username or alias of the target org.",
560
- "hasDynamicHelp": true,
561
- "multiple": false,
562
- "type": "option"
563
- },
564
- "name": {
565
- "char": "n",
566
- "name": "name",
567
- "required": true,
568
- "summary": "Name of the Experience Cloud site to generate.",
569
- "hasDynamicHelp": false,
570
- "multiple": false,
571
- "type": "option"
572
- },
573
- "template-name": {
574
- "char": "t",
575
- "name": "template-name",
576
- "required": true,
577
- "summary": "Template to use when generating the site.",
578
- "hasDynamicHelp": false,
579
- "multiple": false,
580
- "options": [
581
- "Build Your Own (LWR)"
582
- ],
583
- "type": "option"
584
- },
585
- "url-path-prefix": {
586
- "char": "p",
587
- "name": "url-path-prefix",
588
- "summary": "URL path prefix for the site; must contain only alphanumeric characters.",
589
- "default": "",
590
- "hasDynamicHelp": false,
591
- "multiple": false,
592
- "type": "option"
593
- },
594
- "admin-email": {
595
- "char": "e",
596
- "name": "admin-email",
597
- "summary": "Email address for the site administrator. Defaults to the username of the currently authenticated user.",
598
- "hasDynamicHelp": false,
599
- "multiple": false,
600
- "type": "option"
601
- },
602
- "output-dir": {
603
- "char": "d",
604
- "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.",
605
- "name": "output-dir",
606
- "summary": "Directory to generate the site files in.",
607
- "hasDynamicHelp": false,
608
- "multiple": false,
609
- "type": "option"
610
- }
611
- },
612
- "hasDynamicHelp": true,
613
- "hiddenAliases": [],
614
- "id": "template:generate:digital-experience:site",
615
- "pluginAlias": "@salesforce/plugin-templates",
616
- "pluginName": "@salesforce/plugin-templates",
617
- "pluginType": "core",
618
- "state": "preview",
619
- "strict": true,
620
- "summary": "Generate an Experience Cloud site.",
621
- "enableJsonFlag": true,
622
- "isESM": true,
623
- "relativePath": [
624
- "lib",
625
- "commands",
626
- "template",
627
- "generate",
628
- "digital-experience",
629
- "site.js"
630
- ],
631
- "aliasPermutations": [],
632
- "permutations": [
633
- "template:generate:digital-experience:site",
634
- "generate:template:digital-experience:site",
635
- "generate:digital-experience:template:site",
636
- "generate:digital-experience:site:template",
637
- "template:digital-experience:generate:site",
638
- "digital-experience:template:generate:site",
639
- "digital-experience:generate:template:site",
640
- "digital-experience:generate:site:template",
641
- "template:digital-experience:site:generate",
642
- "digital-experience:template:site:generate",
643
- "digital-experience:site:template:generate",
644
- "digital-experience:site:generate:template",
645
- "template:generate:site:digital-experience",
646
- "generate:template:site:digital-experience",
647
- "generate:site:template:digital-experience",
648
- "generate:site:digital-experience:template",
649
- "template:site:generate:digital-experience",
650
- "site:template:generate:digital-experience",
651
- "site:generate:template:digital-experience",
652
- "site:generate:digital-experience:template",
653
- "template:site:digital-experience:generate",
654
- "site:template:digital-experience:generate",
655
- "site:digital-experience:template:generate",
656
- "site:digital-experience:generate:template"
657
- ]
658
- },
659
659
  "template:generate:flexipage": {
660
660
  "aliases": [],
661
661
  "args": {},
@@ -1913,18 +1913,16 @@
1913
1913
  "project:generate:template"
1914
1914
  ]
1915
1915
  },
1916
- "template:generate:static-resource": {
1916
+ "template:generate:ui-bundle": {
1917
1917
  "aliases": [
1918
- "force:staticresource:create",
1919
- "static-resource:generate"
1918
+ "ui-bundle:generate"
1920
1919
  ],
1921
1920
  "args": {},
1922
- "deprecateAliases": true,
1923
- "description": "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.",
1921
+ "description": "Salesforce provides native UI frameworks, such as Lighting Web Components (LWC), to build applications that run on the Salesforce Platform. But you can also use non-native JavaScript- or TypeScript-based UI frameworks, such as React, to build a UI experience for the Salesforce Platform and that you can launch from the App Launcher.\n\nThese non-native UI experiences are defined by the \"UIBundle\" metadata type in your DX project. Use this command to generate the required DX project structure and files. For example, when you run this command and specify the name MyUiBundle, then the files are generated into a \"uiBundles/MyUiBundle\" directory. Use the --output-dir flag to specify a different directory.\n\nUse the --template flag for generating the files to get started with a speciic UI framework, such as React. Check out the README.md file in the generated \"uiBundles/<bundlename>\" directory for more information about the template.",
1924
1922
  "examples": [
1925
- "Generate the metadata file for a static resource called MyResource in the current directory:\n<%= config.bin %> <%= command.id %> --name MyResource",
1926
- "Similar to previous example, but specifies a MIME type of application/json:\n<%= config.bin %> <%= command.id %> --name MyResource --type application/json",
1927
- "Generate the resource file in the \"force-app/main/default/staticresources\" directory:\n<%= config.bin %> <%= command.id %> --name MyResource --output-dir force-app/main/default/staticresources"
1923
+ "Generate a UI bundle called MyUiBundle in the current directory:\n<%= config.bin %> <%= command.id %> --name MyUiBundle",
1924
+ "Generate a React-based UI bundle:\n<%= config.bin %> <%= command.id %> --name MyReactApp --template reactbasic",
1925
+ "Generate the React-based UI bundle in the \"force-app/main/default/uiBundles\" directory:\n<%= config.bin %> <%= command.id %> --name MyUiBundle --template reactbasic --output-dir force-app/main/default/uiBundles"
1928
1926
  ],
1929
1927
  "flags": {
1930
1928
  "json": {
@@ -1943,76 +1941,63 @@
1943
1941
  "type": "option"
1944
1942
  },
1945
1943
  "name": {
1946
- "aliases": [
1947
- "resourcename"
1948
- ],
1949
1944
  "char": "n",
1950
- "deprecateAliases": true,
1951
1945
  "description": "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.",
1952
1946
  "name": "name",
1953
1947
  "required": true,
1954
- "summary": "Name of the generated static resource.",
1948
+ "summary": "API name of the generated UI bundle.",
1955
1949
  "hasDynamicHelp": false,
1956
1950
  "multiple": false,
1957
1951
  "type": "option"
1958
1952
  },
1959
- "type": {
1960
- "aliases": [
1961
- "contenttype"
1953
+ "template": {
1954
+ "char": "t",
1955
+ "description": "Supplied parameter values or default values are filled into a copy of the template.",
1956
+ "name": "template",
1957
+ "summary": "Template to use when creating the files for a specific UI framework.",
1958
+ "default": "default",
1959
+ "hasDynamicHelp": false,
1960
+ "multiple": false,
1961
+ "options": [
1962
+ "default",
1963
+ "reactbasic"
1962
1964
  ],
1963
- "deprecateAliases": true,
1964
- "description": "Must be a valid MIME type such as application/json, application/javascript, application/zip, text/plain, text/css, etc.",
1965
- "name": "type",
1966
- "summary": "Content type (mime type) of the generated static resource.",
1967
- "default": "application/zip",
1965
+ "type": "option"
1966
+ },
1967
+ "label": {
1968
+ "char": "l",
1969
+ "description": "If not specified, the label is derived from the name.",
1970
+ "name": "label",
1971
+ "summary": "Master label for the UI bundle.",
1968
1972
  "hasDynamicHelp": false,
1969
1973
  "multiple": false,
1970
1974
  "type": "option"
1971
1975
  },
1972
1976
  "output-dir": {
1973
- "aliases": [
1974
- "outputdir"
1975
- ],
1976
1977
  "char": "d",
1977
- "deprecateAliases": true,
1978
- "description": "The location can be an absolute path or relative to the current working directory. The default is the current directory.",
1978
+ "description": "The location can be an absolute path or relative to the current working directory.\n\nIf not specified, the command reads your sfdx-project.json and defaults to \"uiBundles\" directory within your default package directory. When running outside a Salesforce DX project, defaults to the current directory.\n\n**Important:** This command automatically ensures the output directory ends with \"uiBundles\". If your specified path doesn't end with \"uiBundles\", it's automatically appended. The UI bundle is created at \"<output-dir>/<name>\".\n\n**Examples:**\n\n- \"--output-dir force-app/main/default\" → Creates a UI bundle at \"force-app/main/default/uiBundles/MyUiBundle/\"\n- \"--output-dir force-app/main/default/uiBundles\" → Creates a UI bundle at \"force-app/main/default/uiBundles/MyUiBundle/\" (no change)",
1979
1979
  "name": "output-dir",
1980
- "summary": "Directory for saving the created files.",
1981
- "default": ".",
1980
+ "summary": "Directory into which the files are created.",
1982
1981
  "hasDynamicHelp": false,
1983
1982
  "multiple": false,
1984
1983
  "type": "option"
1985
1984
  },
1986
1985
  "api-version": {
1987
- "aliases": [
1988
- "apiversion"
1989
- ],
1990
- "deprecateAliases": true,
1991
1986
  "description": "Override the api version used for api requests made by this command",
1992
1987
  "name": "api-version",
1993
1988
  "hasDynamicHelp": false,
1994
1989
  "multiple": false,
1995
1990
  "type": "option"
1996
- },
1997
- "loglevel": {
1998
- "deprecated": {
1999
- "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."
2000
- },
2001
- "hidden": true,
2002
- "name": "loglevel",
2003
- "hasDynamicHelp": false,
2004
- "multiple": false,
2005
- "type": "option"
2006
1991
  }
2007
1992
  },
2008
1993
  "hasDynamicHelp": false,
2009
1994
  "hiddenAliases": [],
2010
- "id": "template:generate:static-resource",
1995
+ "id": "template:generate:ui-bundle",
2011
1996
  "pluginAlias": "@salesforce/plugin-templates",
2012
1997
  "pluginName": "@salesforce/plugin-templates",
2013
1998
  "pluginType": "core",
2014
1999
  "strict": true,
2015
- "summary": "Generate a static resource.",
2000
+ "summary": "Generate a UI bundle, which contains the code and metadata to build a UI experience that uses non-native Salesforce frameworks, such as React.",
2016
2001
  "enableJsonFlag": true,
2017
2002
  "isESM": true,
2018
2003
  "relativePath": [
@@ -2020,38 +2005,34 @@
2020
2005
  "commands",
2021
2006
  "template",
2022
2007
  "generate",
2023
- "static-resource",
2008
+ "ui-bundle",
2024
2009
  "index.js"
2025
2010
  ],
2026
2011
  "aliasPermutations": [
2027
- "force:staticresource:create",
2028
- "staticresource:force:create",
2029
- "staticresource:create:force",
2030
- "force:create:staticresource",
2031
- "create:force:staticresource",
2032
- "create:staticresource:force",
2033
- "static-resource:generate",
2034
- "generate:static-resource"
2012
+ "ui-bundle:generate",
2013
+ "generate:ui-bundle"
2035
2014
  ],
2036
2015
  "permutations": [
2037
- "template:generate:static-resource",
2038
- "generate:template:static-resource",
2039
- "generate:static-resource:template",
2040
- "template:static-resource:generate",
2041
- "static-resource:template:generate",
2042
- "static-resource:generate:template"
2016
+ "template:generate:ui-bundle",
2017
+ "generate:template:ui-bundle",
2018
+ "generate:ui-bundle:template",
2019
+ "template:ui-bundle:generate",
2020
+ "ui-bundle:template:generate",
2021
+ "ui-bundle:generate:template"
2043
2022
  ]
2044
2023
  },
2045
- "template:generate:ui-bundle": {
2024
+ "template:generate:static-resource": {
2046
2025
  "aliases": [
2047
- "ui-bundle:generate"
2026
+ "force:staticresource:create",
2027
+ "static-resource:generate"
2048
2028
  ],
2049
2029
  "args": {},
2050
- "description": "Generates a UI bundle in the specified directory or the current working directory. The UI bundle files are created in a folder with the designated name. UI bundle files must be contained in a parent directory called \"uiBundles\" 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.",
2030
+ "deprecateAliases": true,
2031
+ "description": "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.",
2051
2032
  "examples": [
2052
- "Generate a UI bundle called MyUiBundle in the current directory:\n<%= config.bin %> <%= command.id %> --name MyUiBundle",
2053
- "Generate a React-based UI bundle:\n<%= config.bin %> <%= command.id %> --name MyReactApp --template reactbasic",
2054
- "Generate the UI bundle in the \"force-app/main/default/uiBundles\" directory:\n<%= config.bin %> <%= command.id %> --name MyUiBundle --output-dir force-app/main/default/uiBundles"
2033
+ "Generate the metadata file for a static resource called MyResource in the current directory:\n<%= config.bin %> <%= command.id %> --name MyResource",
2034
+ "Similar to previous example, but specifies a MIME type of application/json:\n<%= config.bin %> <%= command.id %> --name MyResource --type application/json",
2035
+ "Generate the resource file in the \"force-app/main/default/staticresources\" directory:\n<%= config.bin %> <%= command.id %> --name MyResource --output-dir force-app/main/default/staticresources"
2055
2036
  ],
2056
2037
  "flags": {
2057
2038
  "json": {
@@ -2070,64 +2051,76 @@
2070
2051
  "type": "option"
2071
2052
  },
2072
2053
  "name": {
2054
+ "aliases": [
2055
+ "resourcename"
2056
+ ],
2073
2057
  "char": "n",
2058
+ "deprecateAliases": true,
2074
2059
  "description": "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.",
2075
2060
  "name": "name",
2076
2061
  "required": true,
2077
- "summary": "Name of the generated UI bundle.",
2062
+ "summary": "Name of the generated static resource.",
2078
2063
  "hasDynamicHelp": false,
2079
2064
  "multiple": false,
2080
2065
  "type": "option"
2081
2066
  },
2082
- "template": {
2083
- "char": "t",
2084
- "description": "Supplied parameter values or default values are filled into a copy of the template.",
2085
- "name": "template",
2086
- "summary": "Template to use for file creation.",
2087
- "default": "default",
2088
- "hasDynamicHelp": false,
2089
- "multiple": false,
2090
- "options": [
2091
- "default",
2092
- "reactbasic"
2067
+ "type": {
2068
+ "aliases": [
2069
+ "contenttype"
2093
2070
  ],
2094
- "type": "option"
2095
- },
2096
- "label": {
2097
- "char": "l",
2098
- "description": "If not specified, the label is derived from the name.",
2099
- "name": "label",
2100
- "summary": "Master label for the UI bundle.",
2071
+ "deprecateAliases": true,
2072
+ "description": "Must be a valid MIME type such as application/json, application/javascript, application/zip, text/plain, text/css, etc.",
2073
+ "name": "type",
2074
+ "summary": "Content type (mime type) of the generated static resource.",
2075
+ "default": "application/zip",
2101
2076
  "hasDynamicHelp": false,
2102
2077
  "multiple": false,
2103
2078
  "type": "option"
2104
2079
  },
2105
2080
  "output-dir": {
2081
+ "aliases": [
2082
+ "outputdir"
2083
+ ],
2106
2084
  "char": "d",
2107
- "description": "The location can be an absolute path or relative to the current working directory.\n\n**Important:** The generator automatically ensures the output directory ends with \"uiBundles\". If your specified path doesn't end with \"uiBundles\", it's automatically appended. The UI bundle is created at \"<output-dir>/<name>\".\n\n**Examples:**\n\n- \"--output-dir force-app/main/default\" → Creates a UI bundle at \"force-app/main/default/uiBundles/MyUiBundle/\"\n- \"--output-dir force-app/main/default/uiBundles\" → Creates a UI bundle at \"force-app/main/default/uiBundles/MyUiBundle/\" (no change)\n\nIf not specified, the command reads your sfdx-project.json and defaults to \"uiBundles\" directory within your default package directory. When running outside a Salesforce DX project, defaults to the current directory.",
2085
+ "deprecateAliases": true,
2086
+ "description": "The location can be an absolute path or relative to the current working directory. The default is the current directory.",
2108
2087
  "name": "output-dir",
2109
2088
  "summary": "Directory for saving the created files.",
2089
+ "default": ".",
2110
2090
  "hasDynamicHelp": false,
2111
2091
  "multiple": false,
2112
2092
  "type": "option"
2113
2093
  },
2114
2094
  "api-version": {
2095
+ "aliases": [
2096
+ "apiversion"
2097
+ ],
2098
+ "deprecateAliases": true,
2115
2099
  "description": "Override the api version used for api requests made by this command",
2116
2100
  "name": "api-version",
2117
2101
  "hasDynamicHelp": false,
2118
2102
  "multiple": false,
2119
2103
  "type": "option"
2104
+ },
2105
+ "loglevel": {
2106
+ "deprecated": {
2107
+ "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."
2108
+ },
2109
+ "hidden": true,
2110
+ "name": "loglevel",
2111
+ "hasDynamicHelp": false,
2112
+ "multiple": false,
2113
+ "type": "option"
2120
2114
  }
2121
2115
  },
2122
2116
  "hasDynamicHelp": false,
2123
- "hidden": true,
2124
2117
  "hiddenAliases": [],
2125
- "id": "template:generate:ui-bundle",
2118
+ "id": "template:generate:static-resource",
2126
2119
  "pluginAlias": "@salesforce/plugin-templates",
2127
2120
  "pluginName": "@salesforce/plugin-templates",
2128
2121
  "pluginType": "core",
2129
2122
  "strict": true,
2130
- "summary": "Generate a UI bundle.",
2123
+ "summary": "Generate a static resource.",
2131
2124
  "enableJsonFlag": true,
2132
2125
  "isESM": true,
2133
2126
  "relativePath": [
@@ -2135,20 +2128,26 @@
2135
2128
  "commands",
2136
2129
  "template",
2137
2130
  "generate",
2138
- "ui-bundle",
2131
+ "static-resource",
2139
2132
  "index.js"
2140
2133
  ],
2141
2134
  "aliasPermutations": [
2142
- "ui-bundle:generate",
2143
- "generate:ui-bundle"
2135
+ "force:staticresource:create",
2136
+ "staticresource:force:create",
2137
+ "staticresource:create:force",
2138
+ "force:create:staticresource",
2139
+ "create:force:staticresource",
2140
+ "create:staticresource:force",
2141
+ "static-resource:generate",
2142
+ "generate:static-resource"
2144
2143
  ],
2145
2144
  "permutations": [
2146
- "template:generate:ui-bundle",
2147
- "generate:template:ui-bundle",
2148
- "generate:ui-bundle:template",
2149
- "template:ui-bundle:generate",
2150
- "ui-bundle:template:generate",
2151
- "ui-bundle:generate:template"
2145
+ "template:generate:static-resource",
2146
+ "generate:template:static-resource",
2147
+ "generate:static-resource:template",
2148
+ "template:static-resource:generate",
2149
+ "static-resource:template:generate",
2150
+ "static-resource:generate:template"
2152
2151
  ]
2153
2152
  },
2154
2153
  "template:generate:visualforce:component": {
@@ -2507,5 +2506,5 @@
2507
2506
  ]
2508
2507
  }
2509
2508
  },
2510
- "version": "56.13.0"
2509
+ "version": "56.13.2"
2511
2510
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@salesforce/plugin-templates",
3
3
  "description": "Commands to create metadata from a default or custom template",
4
- "version": "56.13.0",
4
+ "version": "56.13.2",
5
5
  "author": "Salesforce",
6
6
  "bugs": "https://github.com/salesforcecli/plugin-templates/issues",
7
7
  "enableO11y": true,
@@ -252,7 +252,7 @@
252
252
  "exports": "./lib/index.js",
253
253
  "type": "module",
254
254
  "sfdx": {
255
- "publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-templates/56.13.0.crt",
256
- "signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-templates/56.13.0.sig"
255
+ "publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-templates/56.13.2.crt",
256
+ "signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-templates/56.13.2.sig"
257
257
  }
258
258
  }