@salesforce/cli 2.62.0 → 2.62.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
@@ -24,7 +24,7 @@ $ npm install -g @salesforce/cli
24
24
  $ sf COMMAND
25
25
  running command...
26
26
  $ sf (--version|-v)
27
- @salesforce/cli/2.62.0 linux-x64 node-v20.17.0
27
+ @salesforce/cli/2.62.2 linux-x64 node-v20.17.0
28
28
  $ sf --help [COMMAND]
29
29
  USAGE
30
30
  $ sf COMMAND
@@ -54,7 +54,7 @@ See [architecture page](ARCHITECTURE.md) for diagrams of the Salesforce CLI.
54
54
  - [`sf apex run test`](#sf-apex-run-test)
55
55
  - [`sf apex tail log`](#sf-apex-tail-log)
56
56
  - [`sf api request graphql`](#sf-api-request-graphql)
57
- - [`sf api request rest ENDPOINT`](#sf-api-request-rest-endpoint)
57
+ - [`sf api request rest [URL]`](#sf-api-request-rest-url)
58
58
  - [`sf autocomplete [SHELL]`](#sf-autocomplete-shell)
59
59
  - [`sf commands`](#sf-commands)
60
60
  - [`sf config get`](#sf-config-get)
@@ -903,31 +903,33 @@ EXAMPLES
903
903
  $ sf api request graphql --body example.txt --stream-to-file output.txt --include
904
904
  ```
905
905
 
906
- _See code: [@salesforce/plugin-api](https://github.com/salesforcecli/plugin-api/blob/1.2.2/src/commands/api/request/graphql.ts)_
906
+ _See code: [@salesforce/plugin-api](https://github.com/salesforcecli/plugin-api/blob/1.3.0/src/commands/api/request/graphql.ts)_
907
907
 
908
- ## `sf api request rest ENDPOINT`
908
+ ## `sf api request rest [URL]`
909
909
 
910
910
  Make an authenticated HTTP request using the Salesforce REST API.
911
911
 
912
912
  ```
913
913
  USAGE
914
- $ sf api request rest ENDPOINT -o <value> [--flags-dir <value>] [--api-version <value>] [-i | -S Example:
915
- report.xlsx] [-X GET|POST|PUT|PATCH|HEAD|DELETE|OPTIONS|TRACE] [-H key:value...] [--body file]
914
+ $ sf api request rest [URL] -o <value> [--flags-dir <value>] [--api-version <value>] [-i | -S Example: report.xlsx]
915
+ [-X GET|POST|PUT|PATCH|HEAD|DELETE|OPTIONS|TRACE] [-H key:value...] [-f file] [-b file]
916
916
 
917
917
  ARGUMENTS
918
- ENDPOINT Salesforce API endpoint
918
+ URL Salesforce API endpoint
919
919
 
920
920
  FLAGS
921
921
  -H, --header=key:value... HTTP header in "key:value" format.
922
922
  -S, --stream-to-file=Example: report.xlsx Stream responses to a file.
923
- -X, --method=<option> [default: GET] HTTP method for the request.
923
+ -X, --method=<option> HTTP method for the request.
924
924
  <options: GET|POST|PUT|PATCH|HEAD|DELETE|OPTIONS|TRACE>
925
+ -b, --body=file File or content for the body of the HTTP request. Specify "-" to read from
926
+ standard input or "" for an empty body.
927
+ -f, --file=file JSON file that contains values for the request header, body, method, and
928
+ URL.
925
929
  -i, --include Include the HTTP response status and headers in the output.
926
930
  -o, --target-org=<value> (required) Username or alias of the target org. Not required if the
927
931
  `target-org` configuration variable is already set.
928
932
  --api-version=<value> Override the api version used for api requests made by this command
929
- --body=file File or content for the body of the HTTP request. Specify "-" to read from
930
- standard input or "" for an empty body.
931
933
 
932
934
  GLOBAL FLAGS
933
935
  --flags-dir=<value> Import flag values from a directory.
@@ -957,7 +959,7 @@ EXAMPLES
957
959
 
958
960
  Create an account record using the POST method; specify the request details directly in the "--body" flag:
959
961
 
960
- $ sf api request rest 'sobjects/account' --body "{\"Name\" : \"Account from REST API\",\"ShippingCity\" : \
962
+ $ sf api request rest sobjects/account --body "{\"Name\" : \"Account from REST API\",\"ShippingCity\" : \
961
963
  \"Boise\"}" --method POST
962
964
 
963
965
  Create an account record using the information in a file called "info.json":
@@ -968,9 +970,49 @@ EXAMPLES
968
970
 
969
971
  $ sf api request rest 'sobjects/account/<Account ID>' --body "{\"BillingCity\": \"San Francisco\"}" --method \
970
972
  PATCH
973
+
974
+ Store the values for the request header, body, and so on, in a file, which you then specify with the --file flag;
975
+ see the description of --file for more information:
976
+
977
+ $ sf api request rest --file myFile.json
978
+
979
+ FLAG DESCRIPTIONS
980
+ -f, --file=file JSON file that contains values for the request header, body, method, and URL.
981
+
982
+ Use this flag instead of specifying the request details with individual flags, such as --body or --method. This
983
+ schema defines how to create the JSON file:
984
+
985
+ {
986
+ url: { raw: string } | string;
987
+ method: 'GET', 'POST', 'PUT', 'PATCH', 'HEAD', 'DELETE', 'OPTIONS', 'TRACE';
988
+ description?: string;
989
+ header: string | Array<Record<string, string>>;
990
+ body: { mode: 'raw' | 'formdata'; raw: string; formdata: FormData };
991
+ }
992
+
993
+ Salesforce CLI defined this schema to be mimic Postman schemas; both share similar properties. The CLI's schema also
994
+ supports Postman Collections to reuse and share requests. As a result, you can build an API call using Postman,
995
+ export and save it to a file, and then use the file as a value to this flag. For information about Postman, see
996
+ https://learning.postman.com/.
997
+
998
+ Here's a simple example of a JSON file that contains values for the request URL, method, and body:
999
+
1000
+ {
1001
+ "url": "sobjects/Account/<Account ID>",
1002
+ "method": "PATCH",
1003
+ "body" : {
1004
+ "mode": "raw",
1005
+ "raw": {
1006
+ "BillingCity": "Boise"
1007
+ }
1008
+ }
1009
+ }
1010
+
1011
+ See more examples in the plugin-api test directory, including JSON files that use "formdata" to define collections:
1012
+ https://github.com/salesforcecli/plugin-api/tree/main/test/test-files/data-project.
971
1013
  ```
972
1014
 
973
- _See code: [@salesforce/plugin-api](https://github.com/salesforcecli/plugin-api/blob/1.2.2/src/commands/api/request/rest.ts)_
1015
+ _See code: [@salesforce/plugin-api](https://github.com/salesforcecli/plugin-api/blob/1.3.0/src/commands/api/request/rest.ts)_
974
1016
 
975
1017
  ## `sf autocomplete [SHELL]`
976
1018
 
@@ -1030,7 +1072,7 @@ DESCRIPTION
1030
1072
  List all sf commands.
1031
1073
  ```
1032
1074
 
1033
- _See code: [@oclif/plugin-commands](https://github.com/oclif/plugin-commands/blob/4.0.16/src/commands/commands.ts)_
1075
+ _See code: [@oclif/plugin-commands](https://github.com/oclif/plugin-commands/blob/4.1.1/src/commands/commands.ts)_
1034
1076
 
1035
1077
  ## `sf config get`
1036
1078
 
@@ -5611,7 +5653,7 @@ EXAMPLES
5611
5653
  $ sf plugins
5612
5654
  ```
5613
5655
 
5614
- _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/5.4.10/src/commands/plugins/index.ts)_
5656
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/5.4.12/src/commands/plugins/index.ts)_
5615
5657
 
5616
5658
  ## `sf plugins discover`
5617
5659
 
@@ -5656,7 +5698,7 @@ EXAMPLES
5656
5698
  $ sf plugins inspect @salesforce/plugin-packaging
5657
5699
  ```
5658
5700
 
5659
- _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/5.4.10/src/commands/plugins/inspect.ts)_
5701
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/5.4.12/src/commands/plugins/inspect.ts)_
5660
5702
 
5661
5703
  ## `sf plugins install PLUGIN`
5662
5704
 
@@ -5705,7 +5747,7 @@ EXAMPLES
5705
5747
  $ sf plugins install someuser/someplugin
5706
5748
  ```
5707
5749
 
5708
- _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/5.4.10/src/commands/plugins/install.ts)_
5750
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/5.4.12/src/commands/plugins/install.ts)_
5709
5751
 
5710
5752
  ## `sf plugins link PATH`
5711
5753
 
@@ -5725,6 +5767,7 @@ FLAGS
5725
5767
 
5726
5768
  DESCRIPTION
5727
5769
  Links a plugin into the CLI for development.
5770
+
5728
5771
  Installation of a linked plugin will override a user-installed or core plugin.
5729
5772
 
5730
5773
  e.g. If you have a user-installed or core plugin that has a 'hello' command, installing a linked plugin with a 'hello'
@@ -5735,7 +5778,7 @@ EXAMPLES
5735
5778
  $ sf plugins link @salesforce/plugin-packaging
5736
5779
  ```
5737
5780
 
5738
- _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/5.4.10/src/commands/plugins/link.ts)_
5781
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/5.4.12/src/commands/plugins/link.ts)_
5739
5782
 
5740
5783
  ## `sf plugins reset`
5741
5784
 
@@ -5750,7 +5793,7 @@ FLAGS
5750
5793
  --reinstall Reinstall all plugins after uninstalling.
5751
5794
  ```
5752
5795
 
5753
- _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/5.4.10/src/commands/plugins/reset.ts)_
5796
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/5.4.12/src/commands/plugins/reset.ts)_
5754
5797
 
5755
5798
  ## `sf plugins trust verify`
5756
5799
 
@@ -5807,7 +5850,7 @@ EXAMPLES
5807
5850
  $ sf plugins uninstall @salesforce/plugin-packaging
5808
5851
  ```
5809
5852
 
5810
- _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/5.4.10/src/commands/plugins/uninstall.ts)_
5853
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/5.4.12/src/commands/plugins/uninstall.ts)_
5811
5854
 
5812
5855
  ## `sf plugins update`
5813
5856
 
@@ -5825,7 +5868,7 @@ DESCRIPTION
5825
5868
  Update installed plugins.
5826
5869
  ```
5827
5870
 
5828
- _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/5.4.10/src/commands/plugins/update.ts)_
5871
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/5.4.12/src/commands/plugins/update.ts)_
5829
5872
 
5830
5873
  ## `sf project convert mdapi`
5831
5874
 
@@ -7943,10 +7986,11 @@ update the sf CLI
7943
7986
 
7944
7987
  ```
7945
7988
  USAGE
7946
- $ sf update [CHANNEL] [--force | | [-a | -v <value> | -i]]
7989
+ $ sf update [CHANNEL] [--force | | [-a | -v <value> | -i]] [-b ]
7947
7990
 
7948
7991
  FLAGS
7949
7992
  -a, --available See available versions.
7993
+ -b, --verbose Show more details about the available versions.
7950
7994
  -i, --interactive Interactively select version to install. This is ignored if a channel is provided.
7951
7995
  -v, --version=<value> Install a specific version.
7952
7996
  --force Force a re-download of the requested version.
@@ -7972,7 +8016,7 @@ EXAMPLES
7972
8016
  $ sf update --available
7973
8017
  ```
7974
8018
 
7975
- _See code: [@oclif/plugin-update](https://github.com/oclif/plugin-update/blob/4.5.10/src/commands/update.ts)_
8019
+ _See code: [@oclif/plugin-update](https://github.com/oclif/plugin-update/blob/4.6.0/src/commands/update.ts)_
7976
8020
 
7977
8021
  ## `sf version`
7978
8022