@salesforce/cli 1.40.0 → 1.43.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/CHANGELOG.md CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ## [1.43.0](https://github.com/salesforcecli/cli/compare/v1.42.0...v1.43.0) (2022-08-24)
6
+
7
+ ## [1.42.0](https://github.com/salesforcecli/cli/compare/v1.41.0...v1.42.0) (2022-08-17)
8
+
9
+ ## [1.41.0](https://github.com/salesforcecli/cli/compare/v1.40.0...v1.41.0) (2022-08-10)
10
+
5
11
  ## [1.40.0](https://github.com/salesforcecli/cli/compare/v1.39.0...v1.40.0) (2022-08-03)
6
12
 
7
13
  ## [1.39.0](https://github.com/salesforcecli/cli/compare/v1.38.0...v1.39.0) (2022-07-27)
package/README.md CHANGED
@@ -32,7 +32,7 @@ $ npm install -g @salesforce/cli
32
32
  $ sf COMMAND
33
33
  running command...
34
34
  $ sf (--version|-v)
35
- @salesforce/cli/1.40.0 linux-x64 node-v14.20.0
35
+ @salesforce/cli/1.43.0 linux-x64 node-v14.20.0
36
36
  $ sf --help [COMMAND]
37
37
  USAGE
38
38
  $ sf COMMAND
@@ -58,6 +58,7 @@ See [architecture page](ARCHITECTURE.md) for diagrams of the Salesforce CLI.
58
58
  - [`sf deploy functions`](#sf-deploy-functions)
59
59
  - [`sf deploy metadata`](#sf-deploy-metadata)
60
60
  - [`sf deploy metadata cancel`](#sf-deploy-metadata-cancel)
61
+ - [`sf deploy metadata preview`](#sf-deploy-metadata-preview)
61
62
  - [`sf deploy metadata quick`](#sf-deploy-metadata-quick)
62
63
  - [`sf deploy metadata report`](#sf-deploy-metadata-report)
63
64
  - [`sf deploy metadata resume`](#sf-deploy-metadata-resume)
@@ -84,6 +85,10 @@ See [architecture page](ARCHITECTURE.md) for diagrams of the Salesforce CLI.
84
85
  - [`sf env var set`](#sf-env-var-set)
85
86
  - [`sf env var unset`](#sf-env-var-unset)
86
87
  - [`sf generate function`](#sf-generate-function)
88
+ - [`sf generate metadata field`](#sf-generate-metadata-field)
89
+ - [`sf generate metadata platformevent`](#sf-generate-metadata-platformevent)
90
+ - [`sf generate metadata sobject`](#sf-generate-metadata-sobject)
91
+ - [`sf generate metadata tab`](#sf-generate-metadata-tab)
87
92
  - [`sf generate project`](#sf-generate-project)
88
93
  - [`sf help [COMMAND]`](#sf-help-command)
89
94
  - [`sf info:releasenotes:display [-v <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`](#sf-inforeleasenotesdisplay--v-string---json---loglevel-tracedebuginfowarnerrorfataltracedebuginfowarnerrorfatal)
@@ -106,10 +111,12 @@ See [architecture page](ARCHITECTURE.md) for diagrams of the Salesforce CLI.
106
111
  - [`sf plugins:uninstall PLUGIN...`](#sf-pluginsuninstall-plugin-2)
107
112
  - [`sf plugins update`](#sf-plugins-update)
108
113
  - [`sf retrieve metadata`](#sf-retrieve-metadata)
114
+ - [`sf retrieve metadata preview`](#sf-retrieve-metadata-preview)
109
115
  - [`sf run function`](#sf-run-function)
110
116
  - [`sf run function start`](#sf-run-function-start)
111
117
  - [`sf run function start container`](#sf-run-function-start-container)
112
118
  - [`sf run function start local`](#sf-run-function-start-local)
119
+ - [`sf search`](#sf-search)
113
120
  - [`sf update [CHANNEL]`](#sf-update-channel)
114
121
  - [`sf version`](#sf-version)
115
122
  - [`sf whatsnew [-v <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`](#sf-whatsnew--v-string---json---loglevel-tracedebuginfowarnerrorfataltracedebuginfowarnerrorfatal)
@@ -345,7 +352,7 @@ EXAMPLES
345
352
  $ sf deploy --interactive
346
353
  ```
347
354
 
348
- _See code: [@salesforce/plugin-deploy-retrieve](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/v1.5.2/src/commands/deploy.ts)_
355
+ _See code: [@salesforce/plugin-deploy-retrieve](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/v1.5.5/src/commands/deploy.ts)_
349
356
 
350
357
  ## `sf deploy functions`
351
358
 
@@ -406,8 +413,7 @@ FLAGS
406
413
  -o, --target-org=<value> Login username or alias for the target org.
407
414
  -r, --ignore-errors Ignore any errors and don’t roll back deployment.
408
415
  -t, --tests=<value>... Apex tests to run when --test-level is RunSpecifiedTests.
409
- -w, --wait=<minutes> [default: [object Object]] Number of minutes to wait for command to complete and display
410
- results.
416
+ -w, --wait=<minutes> Number of minutes to wait for command to complete and display results.
411
417
  -x, --manifest=<value> Full file path for manifest (package.xml) of components to deploy.
412
418
  --async Run the command asynchronously.
413
419
  --concise Show concise output of the deploy result.
@@ -475,8 +481,8 @@ EXAMPLES
475
481
  FLAG DESCRIPTIONS
476
482
  -a, --api-version=<value> Target API version for the deploy.
477
483
 
478
- Use this flag to override the default API version, which is the latest version supported the CLI, with the API
479
- version of your package.xml file.
484
+ Use this flag to override the default API version with the API version of your package.xml file. The default API
485
+ version is the latest version supported by the CLI.
480
486
 
481
487
  -c, --ignore-conflicts Ignore conflicts and deploy local files, even if they overwrite changes in the org.
482
488
 
@@ -631,6 +637,83 @@ FLAG DESCRIPTIONS
631
637
  deploy metadata report".
632
638
  ```
633
639
 
640
+ ## `sf deploy metadata preview`
641
+
642
+ Preview a deployment to see what will deploy to the org, the potential conflicts, and the ignored files.
643
+
644
+ ```
645
+ USAGE
646
+ $ sf deploy metadata preview [--json] [-c] [-x <value> | -d <value> | -m <value>] [-o <value>]
647
+
648
+ FLAGS
649
+ -c, --ignore-conflicts Ignore conflicts and deploy local files, even if they overwrite changes in the org.
650
+ -d, --source-dir=<value>... Path to the local source files to preview.
651
+ -m, --metadata=<value>... Metadata component names to preview.
652
+ -o, --target-org=<value> Login username or alias for the target org.
653
+ -x, --manifest=<value> Full file path for manifest (package.xml) of components to preview.
654
+
655
+ GLOBAL FLAGS
656
+ --json Format output as json.
657
+
658
+ DESCRIPTION
659
+ Preview a deployment to see what will deploy to the org, the potential conflicts, and the ignored files.
660
+
661
+ You must run this command from within a project.
662
+
663
+ The command outputs a table that describes what will happen if you run the "sf deploy metadata" command. The table
664
+ lists the metadata components that will be deployed and deleted. The table also lists the current conflicts between
665
+ files in your local project and components in the org. Finally, the table lists the files that won't be deployed
666
+ because they're included in your .forceignore file.
667
+
668
+ If your org allows source tracking, then this command considers conflicts between the org and local. Some orgs, such
669
+ as production orgs, never allow source tracking. Use the "--no-track-source" flag when you create a scratch or sandbox
670
+ org to disable source tracking.
671
+
672
+ To preview the deployment of multiple metadata components, either set multiple --metadata <name> flags or a single
673
+ --metadata flag with multiple names separated by spaces. Enclose names that contain spaces in one set of double
674
+ quotes. The same syntax applies to --manifest and --source-dir.
675
+
676
+ EXAMPLES
677
+ NOTE: The commands to preview a deployment and actually deploy it use similar flags. We provide a few preview examples here, but see the help for "sf deploy metadata" for more examples that you can adapt for previewing.
678
+
679
+ Preview the deployment of source files in a directory, such as force-app:
680
+
681
+ $ sf deploy metadata preview --source-dir force-app
682
+
683
+ Preview the deployment of all Apex classes:
684
+
685
+ $ sf deploy metadata preview --metadata ApexClass
686
+
687
+ Preview deployment of a specific Apex class:
688
+
689
+ $ sf deploy metadata preview --metadata ApexClass:MyApexClass
690
+
691
+ Preview deployment of all components listed in a manifest:
692
+
693
+ $ sf deploy metadata preview --manifest path/to/package.xml
694
+
695
+ FLAG DESCRIPTIONS
696
+ -c, --ignore-conflicts Ignore conflicts and deploy local files, even if they overwrite changes in the org.
697
+
698
+ This flag applies only to orgs that allow source tracking. It has no effect on orgs that don't allow it, such as
699
+ production orgs.
700
+
701
+ -d, --source-dir=<value>... Path to the local source files to preview.
702
+
703
+ The supplied path can be to a single file (in which case the operation is applied to only one file) or to a folder
704
+ (in which case the operation is applied to all metadata types in the directory and its subdirectories).
705
+
706
+ If you specify this flag, don’t specify --metadata or --manifest.
707
+
708
+ -o, --target-org=<value> Login username or alias for the target org.
709
+
710
+ Overrides your default org.
711
+
712
+ -x, --manifest=<value> Full file path for manifest (package.xml) of components to preview.
713
+
714
+ All child components are included. If you specify this flag, don’t specify --metadata or --source-dir.
715
+ ```
716
+
634
717
  ## `sf deploy metadata quick`
635
718
 
636
719
  Quickly deploy a validated deployment to an org.
@@ -643,8 +726,7 @@ FLAGS
643
726
  -i, --job-id=<value> Job ID of the deployment you want to quick deploy.
644
727
  -o, --target-org=<value> Login username or alias for the target org.
645
728
  -r, --use-most-recent Use the job ID of the most recently validated deployment.
646
- -w, --wait=<minutes> [default: [object Object]] Number of minutes to wait for the command to complete and display
647
- results.
729
+ -w, --wait=<minutes> Number of minutes to wait for the command to complete and display results.
648
730
  --async Run the command asynchronously.
649
731
  --concise Show concise output of the deploy result.
650
732
  --verbose Show verbose output of the deploy result.
@@ -854,8 +936,7 @@ FLAGS
854
936
  -m, --metadata=<value>... Metadata component names to validate for deployment.
855
937
  -o, --target-org=<value> Login username or alias for the target org.
856
938
  -t, --tests=<value>... Apex tests to run when --test-level is RunSpecifiedTests.
857
- -w, --wait=<minutes> [default: [object Object]] Number of minutes to wait for the command to complete and
858
- display results.
939
+ -w, --wait=<minutes> Number of minutes to wait for the command to complete and display results.
859
940
  -x, --manifest=<value> Full file path for manifest (package.xml) of components to validate for deployment.
860
941
  --async Run the command asynchronously.
861
942
  --concise Show concise output of the validation result.
@@ -906,8 +987,8 @@ EXAMPLES
906
987
  FLAG DESCRIPTIONS
907
988
  -a, --api-version=<value> Target API version for the validation.
908
989
 
909
- Use this flag to override the default API version, which is the latest version supported the CLI, with the API
910
- version in your package.xml file.
990
+ Use this flag to override the default API version with the API version of your package.xml file. The default API
991
+ version is the latest version supported by the CLI.
911
992
 
912
993
  -d, --source-dir=<value>... Path to the local source files to validate for deployment.
913
994
 
@@ -1834,6 +1915,167 @@ EXAMPLES
1834
1915
  $ sf generate function --function-name myfunction --language javascript
1835
1916
  ```
1836
1917
 
1918
+ ## `sf generate metadata field`
1919
+
1920
+ Generate metadata source files for a new custom field on a specified object.
1921
+
1922
+ ```
1923
+ USAGE
1924
+ $ sf generate metadata field -l <value> [-o <value>]
1925
+
1926
+ FLAGS
1927
+ -l, --label=<value> (required) The field's label.
1928
+ -o, --object=<value> The directory that contains the object's source files.
1929
+
1930
+ DESCRIPTION
1931
+ Generate metadata source files for a new custom field on a specified object.
1932
+
1933
+ This command is interactive and must be run in a Salesforce DX project directory. You're required to specify the
1934
+ field's label with the "--label" flag. The command uses this label to provide intelligent suggestions for other field
1935
+ properties, such as its API name.
1936
+
1937
+ You can generate a custom field on either a standard object, such as Account, or a custom object. In both cases, the
1938
+ source files for the object must already exist in your local project before you run this command. If you create a
1939
+ relationship field, the source files for the parent object must also exist in your local directory. Use the command
1940
+ "sf metadata retrieve -m CustomObject:<object>" to retrieve source files for both standard and custom objects from
1941
+ your org. To create a custom object, run the "sf generate metadata sobject" command or use the Object Manager UI in
1942
+ your Salesforce org.
1943
+
1944
+ EXAMPLES
1945
+ Create a field with the specified label; the command prompts you for the object:
1946
+
1947
+ $ sf generate metadata field --label "My Field"
1948
+
1949
+ Specify the local path to the object's folder:
1950
+
1951
+ $ sf generate metadata field --label "My Field" --object force-app/main/default/objects/MyObject__c
1952
+
1953
+ FLAG DESCRIPTIONS
1954
+ -o, --object=<value> The directory that contains the object's source files.
1955
+
1956
+ The object source files in your local project are grouped in a directoy with the same name as the object. Custom
1957
+ object names always end in "__c". An example of the object directory for the Account standard object is
1958
+ "force-app/main/default/objects/Account" An example custom object directory is
1959
+ "force-app/main/default/objects/MyObject__c"
1960
+
1961
+ If you don't specify this flag, the command prompts you to choose from your local objects.
1962
+ ```
1963
+
1964
+ ## `sf generate metadata platformevent`
1965
+
1966
+ Generate metadata source files for a new platform event.
1967
+
1968
+ ```
1969
+ USAGE
1970
+ $ sf generate metadata platformevent -l <value>
1971
+
1972
+ FLAGS
1973
+ -l, --label=<value> (required) The platform event's label.
1974
+
1975
+ DESCRIPTION
1976
+ Generate metadata source files for a new platform event.
1977
+
1978
+ This command is interactive and must be run in a Salesforce DX project directory. You're required to specify the
1979
+ event's label with the "--label" flag. The command uses this label to provide intelligent suggestions for other event
1980
+ properties, such as its API name.
1981
+
1982
+ EXAMPLES
1983
+ Create a platform event with the specified label:
1984
+
1985
+ $ sf generate metadata platformevent --label "My Platform Event"
1986
+ ```
1987
+
1988
+ ## `sf generate metadata sobject`
1989
+
1990
+ Generate metadata source files for a new custom object.
1991
+
1992
+ ```
1993
+ USAGE
1994
+ $ sf generate metadata sobject -l <value> [-f]
1995
+
1996
+ FLAGS
1997
+ -f, --use-default-features Enable all optional features without prompting.
1998
+ -l, --label=<value> (required) The custom object's label.
1999
+
2000
+ DESCRIPTION
2001
+ Generate metadata source files for a new custom object.
2002
+
2003
+ This command is interactive and must be run in a Salesforce DX project directory. You're required to specify the
2004
+ object's label with the "--label" flag. The command uses this label to provide intelligent suggestions for other
2005
+ object properties, such as its API name and plural label.
2006
+
2007
+ All Salesforce objects are required to have a Name field, so this command also prompts you for the label and type of
2008
+ the Name field. Run the "sf metadata generate field" command to create additional fields for the object.
2009
+
2010
+ To reduce the number of prompts, use the "--use-default-features" flag to automatically enable some features, such as
2011
+ reporting and search on the object.
2012
+
2013
+ EXAMPLES
2014
+ Create a custom object with the specified label and be prompted for additional information:
2015
+
2016
+ $ sf generate metadata sobject --label "My Object"
2017
+
2018
+ Create a custom object and enable optional features without prompting:
2019
+
2020
+ $ sf generate metadata sobject --label "My Object" --use-default-features
2021
+
2022
+ FLAG DESCRIPTIONS
2023
+ -f, --use-default-features Enable all optional features without prompting.
2024
+
2025
+ Enables these features:
2026
+
2027
+ * Search: Allows users to find the custom object's records when they search, including SOSL.
2028
+ * Feeds: Enables feed tracking.
2029
+ * Reports: Allows reporting of the data in the custom object records.
2030
+ * History: Enables object history tracking.
2031
+ * Activities: Allows users to associate tasks and scheduled calendar events related to the custom object records.
2032
+ * Bulk API: With Sharing and Streaming API, classifies the custom object as an Enterprise Application object.
2033
+ * Sharing: With Bulk API and Streaming API, classifies the custom object as an Enterprise Application object.
2034
+ * Streaming API: With Bulk API and Sharing, classifies the custom object as an Enterprise Application object.
2035
+ ```
2036
+
2037
+ ## `sf generate metadata tab`
2038
+
2039
+ Generate the metadata source files for a new custom tab on a custom object.
2040
+
2041
+ ```
2042
+ USAGE
2043
+ $ sf generate metadata tab -o <value> -d <value> -i <value> [--json]
2044
+
2045
+ FLAGS
2046
+ -d, --directory=<value> (required) Path to a "tabs" directory that will contain the source files for your new tab.
2047
+ -i, --icon=<value> (required) [default: 1] Number from 1 to 100 that specifies the color scheme and icon for the
2048
+ custom tab.
2049
+ -o, --object=<value> (required) API name of the custom object you're generating a tab for.
2050
+
2051
+ GLOBAL FLAGS
2052
+ --json Format output as json.
2053
+
2054
+ DESCRIPTION
2055
+ Generate the metadata source files for a new custom tab on a custom object.
2056
+
2057
+ Custom tabs let you display custom object data or other web content in Salesforce. Custom tabs appear in Salesforce as
2058
+ an item in the app’s navigation bar and in the App Launcher.
2059
+
2060
+ This command must be run in a Salesforce DX project directory. You must pass all required information to it with the
2061
+ required flags. The source files for the custom object for which you're generating a tab don't need to exist in your
2062
+ local project.
2063
+
2064
+ EXAMPLES
2065
+ Create a tab on the MyObject__c custom object:
2066
+
2067
+ $ sf generate metadata tab --object MyObject__c --icon 54 --directory force-app/main/default/tabs
2068
+
2069
+ FLAG DESCRIPTIONS
2070
+ -i, --icon=<value> Number from 1 to 100 that specifies the color scheme and icon for the custom tab.
2071
+
2072
+ See https://lightningdesignsystem.com/icons/\#custom for the available icons.
2073
+
2074
+ -o, --object=<value> API name of the custom object you're generating a tab for.
2075
+
2076
+ The API name for a custom object always ends in "__c", such as "MyObject__c".
2077
+ ```
2078
+
1837
2079
  ## `sf generate project`
1838
2080
 
1839
2081
  Generate a Salesforce DX project.
@@ -2616,8 +2858,8 @@ FLAGS
2616
2858
  -m, --metadata=<value>... Metadata component names to retrieve.
2617
2859
  -n, --package-name=<value>... Package names to retrieve.
2618
2860
  -o, --target-org=<value> Login username or alias for the target org.
2619
- -w, --wait=<value> [default: [object Object]] Number of minutes to wait for the command to complete and
2620
- display results to the terminal window.
2861
+ -w, --wait=<value> Number of minutes to wait for the command to complete and display results to the
2862
+ terminal window.
2621
2863
  -x, --manifest=<value> File path for the manifest (package.xml) that specifies the components to retrieve.
2622
2864
 
2623
2865
  GLOBAL FLAGS
@@ -2715,6 +2957,58 @@ ENVIRONMENT VARIABLES
2715
2957
  SF_USE_PROGRESS_BAR Set to false to disable the progress bar when running the metadata deploy command.
2716
2958
  ```
2717
2959
 
2960
+ ## `sf retrieve metadata preview`
2961
+
2962
+ Preview a retrieval to see what will be retrieved from the org, the potential conflicts, and the ignored files.
2963
+
2964
+ ```
2965
+ USAGE
2966
+ $ sf retrieve metadata preview [--json] [-c] [-o <value>]
2967
+
2968
+ FLAGS
2969
+ -c, --ignore-conflicts Ignore conflicts and preview the retrieve of remote components, even if they will overwrite
2970
+ local changes.
2971
+ -o, --target-org=<value> Login username or alias for the target org.
2972
+
2973
+ GLOBAL FLAGS
2974
+ --json Format output as json.
2975
+
2976
+ DESCRIPTION
2977
+ Preview a retrieval to see what will be retrieved from the org, the potential conflicts, and the ignored files.
2978
+
2979
+ You must run this command from within a project.
2980
+
2981
+ The command outputs a table that describes what will happen if you run the "sf retrieve metadata" command. The table
2982
+ lists the metadata components that will be retrieved and deleted. The table also lists the current conflicts between
2983
+ files in your local project and components in the org. Finally, the table lists the files that won't be retrieved
2984
+ because they're included in your .forceignore file.
2985
+
2986
+ If your org allows source tracking, then this command considers conflicts between the org and local. Some orgs, such
2987
+ as production orgs, never allow source tracking. Use the "--no-track-source" flag when you create a scratch or sandbox
2988
+ org to disable source tracking.
2989
+
2990
+ EXAMPLES
2991
+ Preview the retrieve of all changes from the org:
2992
+
2993
+ $ sf retrieve metadata preview
2994
+
2995
+ Preview the retrieve when ignoring any conflicts:
2996
+
2997
+ $ sf retrieve metadata preview --ignore-conflicts
2998
+
2999
+ FLAG DESCRIPTIONS
3000
+ -c, --ignore-conflicts
3001
+
3002
+ Ignore conflicts and preview the retrieve of remote components, even if they will overwrite local changes.
3003
+
3004
+ This flag applies only to orgs that allow source tracking. It has no effect on orgs that don't allow it, such as
3005
+ production orgs.
3006
+
3007
+ -o, --target-org=<value> Login username or alias for the target org.
3008
+
3009
+ Overrides your default org.
3010
+ ```
3011
+
2718
3012
  ## `sf run function`
2719
3013
 
2720
3014
  Send a cloudevent to a function.
@@ -2843,6 +3137,22 @@ EXAMPLES
2843
3137
  $ sf run function start local --port 5000 --language javascript
2844
3138
  ```
2845
3139
 
3140
+ ## `sf search`
3141
+
3142
+ Search for a command.
3143
+
3144
+ ```
3145
+ USAGE
3146
+ $ sf search
3147
+
3148
+ DESCRIPTION
3149
+ Search for a command.
3150
+
3151
+ Once you select a command, hit enter and it will show the help for that command.
3152
+ ```
3153
+
3154
+ _See code: [@oclif/plugin-search](https://github.com/oclif/plugin-search/blob/v0.0.1/dist/commands/search.ts)_
3155
+
2846
3156
  ## `sf update [CHANNEL]`
2847
3157
 
2848
3158
  update the sf CLI