@salesforce/cli 2.62.0 → 2.62.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/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.1 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
971
- ```
972
973
 
973
- _See code: [@salesforce/plugin-api](https://github.com/salesforcecli/plugin-api/blob/1.2.2/src/commands/api/request/rest.ts)_
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.
1013
+ ```
1014
+
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
 
@@ -1,17 +1,17 @@
1
1
  {
2
2
  "name": "@salesforce/cli",
3
- "version": "2.62.0",
3
+ "version": "2.62.1",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@salesforce/cli",
9
- "version": "2.62.0",
9
+ "version": "2.62.1",
10
10
  "hasInstallScript": true,
11
11
  "license": "BSD-3-Clause",
12
12
  "dependencies": {
13
13
  "@inquirer/select": "^2.3.5",
14
- "@oclif/core": "4.0.26",
14
+ "@oclif/core": "4.0.27",
15
15
  "@oclif/plugin-autocomplete": "3.2.5",
16
16
  "@oclif/plugin-commands": "4.0.16",
17
17
  "@oclif/plugin-help": "6.2.13",
@@ -25,7 +25,7 @@
25
25
  "@salesforce/core": "^8.2.3",
26
26
  "@salesforce/kit": "^3.1.6",
27
27
  "@salesforce/plugin-apex": "3.5.0",
28
- "@salesforce/plugin-api": "1.2.2",
28
+ "@salesforce/plugin-api": "1.3.0",
29
29
  "@salesforce/plugin-auth": "3.6.65",
30
30
  "@salesforce/plugin-data": "3.6.8",
31
31
  "@salesforce/plugin-deploy-retrieve": "3.12.16",
@@ -4033,9 +4033,9 @@
4033
4033
  }
4034
4034
  },
4035
4035
  "node_modules/@oclif/core": {
4036
- "version": "4.0.26",
4037
- "resolved": "https://registry.npmjs.org/@oclif/core/-/core-4.0.26.tgz",
4038
- "integrity": "sha512-Gtgj7l+XYYk4wqJ7fTd+fsuKusuQESrSbeue+pC1UGJWt9tyrn3TNZu/lGJSSvEQVcxZY+y09hTET+1e1bmULA==",
4036
+ "version": "4.0.27",
4037
+ "resolved": "https://registry.npmjs.org/@oclif/core/-/core-4.0.27.tgz",
4038
+ "integrity": "sha512-9j92jHr6k2tjQ6/mIwNi46Gqw+qbPFQ02mxT5T8/nxO2fgsPL3qL0kb9SR1il5AVfqpgLIG3uLUcw87rgaioUg==",
4039
4039
  "license": "MIT",
4040
4040
  "dependencies": {
4041
4041
  "ansi-escapes": "^4.3.2",
@@ -4948,9 +4948,9 @@
4948
4948
  }
4949
4949
  },
4950
4950
  "node_modules/@salesforce/plugin-api": {
4951
- "version": "1.2.2",
4952
- "resolved": "https://registry.npmjs.org/@salesforce/plugin-api/-/plugin-api-1.2.2.tgz",
4953
- "integrity": "sha512-DYcvSvK1J/C0oin9CZltk/UT4d9dOtRBztMxHVUJDR2VC5iJhlx+cjOs76V2/D+7g7Maon0lARYtY0JX+3FZnA==",
4951
+ "version": "1.3.0",
4952
+ "resolved": "https://registry.npmjs.org/@salesforce/plugin-api/-/plugin-api-1.3.0.tgz",
4953
+ "integrity": "sha512-DtCgRjlTUbxQAuCSo4g4xhbOotQcWY3dCOz3es7ihTtpevGj09vczs5acE7u8If25+XCnIdstOO1IyNoJIAzXg==",
4954
4954
  "license": "BSD-3-Clause",
4955
4955
  "dependencies": {
4956
4956
  "@oclif/core": "^4",
@@ -4959,6 +4959,7 @@
4959
4959
  "@salesforce/sf-plugins-core": "^11.3.2",
4960
4960
  "@salesforce/ts-types": "^2.0.12",
4961
4961
  "ansis": "^3.3.2",
4962
+ "form-data": "^4.0.0",
4962
4963
  "got": "^13.0.0",
4963
4964
  "proxy-agent": "^6.4.0"
4964
4965
  },
package/oclif.lock CHANGED
@@ -1874,10 +1874,10 @@
1874
1874
  proc-log "^4.0.0"
1875
1875
  which "^4.0.0"
1876
1876
 
1877
- "@oclif/core@^4", "@oclif/core@^4.0.16", "@oclif/core@^4.0.18", "@oclif/core@^4.0.19", "@oclif/core@^4.0.20", "@oclif/core@^4.0.23", "@oclif/core@^4.0.6", "@oclif/core@4.0.26":
1878
- version "4.0.26"
1879
- resolved "https://registry.npmjs.org/@oclif/core/-/core-4.0.26.tgz"
1880
- integrity sha512-Gtgj7l+XYYk4wqJ7fTd+fsuKusuQESrSbeue+pC1UGJWt9tyrn3TNZu/lGJSSvEQVcxZY+y09hTET+1e1bmULA==
1877
+ "@oclif/core@^4", "@oclif/core@^4.0.16", "@oclif/core@^4.0.18", "@oclif/core@^4.0.19", "@oclif/core@^4.0.20", "@oclif/core@^4.0.23", "@oclif/core@^4.0.6", "@oclif/core@4.0.27":
1878
+ version "4.0.27"
1879
+ resolved "https://registry.npmjs.org/@oclif/core/-/core-4.0.27.tgz"
1880
+ integrity sha512-9j92jHr6k2tjQ6/mIwNi46Gqw+qbPFQ02mxT5T8/nxO2fgsPL3qL0kb9SR1il5AVfqpgLIG3uLUcw87rgaioUg==
1881
1881
  dependencies:
1882
1882
  ansi-escapes "^4.3.2"
1883
1883
  ansis "^3.3.2"
@@ -2312,10 +2312,10 @@
2312
2312
  "@salesforce/sf-plugins-core" "^11.3.7"
2313
2313
  ansis "^3.3.1"
2314
2314
 
2315
- "@salesforce/plugin-api@1.2.2":
2316
- version "1.2.2"
2317
- resolved "https://registry.npmjs.org/@salesforce/plugin-api/-/plugin-api-1.2.2.tgz"
2318
- integrity sha512-DYcvSvK1J/C0oin9CZltk/UT4d9dOtRBztMxHVUJDR2VC5iJhlx+cjOs76V2/D+7g7Maon0lARYtY0JX+3FZnA==
2315
+ "@salesforce/plugin-api@1.3.0":
2316
+ version "1.3.0"
2317
+ resolved "https://registry.npmjs.org/@salesforce/plugin-api/-/plugin-api-1.3.0.tgz"
2318
+ integrity sha512-DtCgRjlTUbxQAuCSo4g4xhbOotQcWY3dCOz3es7ihTtpevGj09vczs5acE7u8If25+XCnIdstOO1IyNoJIAzXg==
2319
2319
  dependencies:
2320
2320
  "@oclif/core" "^4"
2321
2321
  "@salesforce/core" "^8.4.0"
@@ -2323,6 +2323,7 @@
2323
2323
  "@salesforce/sf-plugins-core" "^11.3.2"
2324
2324
  "@salesforce/ts-types" "^2.0.12"
2325
2325
  ansis "^3.3.2"
2326
+ form-data "^4.0.0"
2326
2327
  got "^13.0.0"
2327
2328
  proxy-agent "^6.4.0"
2328
2329
 
@@ -5370,5 +5370,5 @@
5370
5370
  ]
5371
5371
  }
5372
5372
  },
5373
- "version": "2.62.0"
5373
+ "version": "2.62.1"
5374
5374
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@salesforce/cli",
3
3
  "description": "The Salesforce CLI",
4
- "version": "2.62.0",
4
+ "version": "2.62.1",
5
5
  "author": "Salesforce",
6
6
  "bin": {
7
7
  "sf": "./bin/run.js",
@@ -140,7 +140,7 @@
140
140
  },
141
141
  "dependencies": {
142
142
  "@inquirer/select": "^2.3.5",
143
- "@oclif/core": "4.0.26",
143
+ "@oclif/core": "4.0.27",
144
144
  "@oclif/plugin-autocomplete": "3.2.5",
145
145
  "@oclif/plugin-commands": "4.0.16",
146
146
  "@oclif/plugin-help": "6.2.13",
@@ -154,7 +154,7 @@
154
154
  "@salesforce/core": "^8.2.3",
155
155
  "@salesforce/kit": "^3.1.6",
156
156
  "@salesforce/plugin-apex": "3.5.0",
157
- "@salesforce/plugin-api": "1.2.2",
157
+ "@salesforce/plugin-api": "1.3.0",
158
158
  "@salesforce/plugin-auth": "3.6.65",
159
159
  "@salesforce/plugin-data": "3.6.8",
160
160
  "@salesforce/plugin-deploy-retrieve": "3.12.16",