@salesforce/cli 1.36.0 → 1.39.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 +12 -0
- package/README.md +97 -22
- package/dist/hooks/incomplete.js +7 -1
- package/npm-shrinkwrap.json +330 -304
- package/oclif.manifest.json +1 -1
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,18 @@
|
|
|
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.39.0](https://github.com/salesforcecli/cli/compare/v1.38.0...v1.39.0) (2022-07-27)
|
|
6
|
+
|
|
7
|
+
## [1.38.0](https://github.com/salesforcecli/cli/compare/v1.36.0...v1.38.0) (2022-07-20)
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
- run command match when only one exists ([ab519b8](https://github.com/salesforcecli/cli/commit/ab519b8a7739db232fbb8709e31ae274038bd5c8))
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
- **deps:** update plugin-functions to 1.12.1 ([42f5ecd](https://github.com/salesforcecli/cli/commit/42f5ecdd30e395d823678658da1df51409c89028))
|
|
16
|
+
|
|
5
17
|
## [1.36.0](https://github.com/salesforcecli/cli/compare/v1.35.0...v1.36.0) (2022-07-06)
|
|
6
18
|
|
|
7
19
|
## [1.35.0](https://github.com/salesforcecli/cli/compare/v1.34.0...v1.35.0) (2022-06-29)
|
package/README.md
CHANGED
|
@@ -31,7 +31,7 @@ $ npm install -g @salesforce/cli
|
|
|
31
31
|
$ sf COMMAND
|
|
32
32
|
running command...
|
|
33
33
|
$ sf (--version|-v)
|
|
34
|
-
@salesforce/cli/1.
|
|
34
|
+
@salesforce/cli/1.39.0 linux-x64 node-v14.20.0
|
|
35
35
|
$ sf --help [COMMAND]
|
|
36
36
|
USAGE
|
|
37
37
|
$ sf COMMAND
|
|
@@ -66,6 +66,7 @@ USAGE
|
|
|
66
66
|
- [`sf env delete scratch`](#sf-env-delete-scratch)
|
|
67
67
|
- [`sf env display`](#sf-env-display)
|
|
68
68
|
- [`sf env list`](#sf-env-list)
|
|
69
|
+
- [`sf env log`](#sf-env-log)
|
|
69
70
|
- [`sf env log tail`](#sf-env-log-tail)
|
|
70
71
|
- [`sf env logdrain add`](#sf-env-logdrain-add)
|
|
71
72
|
- [`sf env logdrain list`](#sf-env-logdrain-list)
|
|
@@ -342,9 +343,11 @@ _See code: [@salesforce/plugin-deploy-retrieve](https://github.com/salesforcecli
|
|
|
342
343
|
|
|
343
344
|
## `sf deploy functions`
|
|
344
345
|
|
|
346
|
+
Deploy a Salesforce Function to an org from your local project.
|
|
347
|
+
|
|
345
348
|
```
|
|
346
349
|
USAGE
|
|
347
|
-
$ sf deploy functions -o <value> [-b <value>] [--force] [-q]
|
|
350
|
+
$ sf deploy functions -o <value> [--json] [-b <value>] [--force] [-q]
|
|
348
351
|
|
|
349
352
|
FLAGS
|
|
350
353
|
-b, --branch=<value> Deploy the latest commit from a branch different from the currently active branch.
|
|
@@ -352,6 +355,28 @@ FLAGS
|
|
|
352
355
|
to.
|
|
353
356
|
-q, --quiet Limit the amount of output displayed from the deploy process.
|
|
354
357
|
--force Ignore warnings and overwrite remote repository (not allowed in production).
|
|
358
|
+
|
|
359
|
+
GLOBAL FLAGS
|
|
360
|
+
--json Format output as json.
|
|
361
|
+
|
|
362
|
+
DESCRIPTION
|
|
363
|
+
Deploy a Salesforce Function to an org from your local project.
|
|
364
|
+
|
|
365
|
+
You must run this command from within a git repository. Only committed changes to Functions are deployed. The active
|
|
366
|
+
branch is deployed unless specified otherwise with `--branch`.
|
|
367
|
+
|
|
368
|
+
EXAMPLES
|
|
369
|
+
Deploy a Salesforce Function:
|
|
370
|
+
|
|
371
|
+
$ sf deploy functions --connected-org org-alias
|
|
372
|
+
|
|
373
|
+
Deploy to 'deploy-branch':
|
|
374
|
+
|
|
375
|
+
$ sf deploy functions --connected-org org-alias --branch deploy-branch
|
|
376
|
+
|
|
377
|
+
Overwrite the remote repository:
|
|
378
|
+
|
|
379
|
+
$ sf deploy functions --connected-org org-alias --force
|
|
355
380
|
```
|
|
356
381
|
|
|
357
382
|
## `sf deploy metadata`
|
|
@@ -965,12 +990,15 @@ Create a compute environment for use with Salesforce Functions.
|
|
|
965
990
|
|
|
966
991
|
```
|
|
967
992
|
USAGE
|
|
968
|
-
$ sf env create compute [-o <value>] [-a <value>
|
|
993
|
+
$ sf env create compute [--json] [-o <value>] [-a <value>]
|
|
969
994
|
|
|
970
995
|
FLAGS
|
|
971
996
|
-a, --alias=<value> Alias for the created environment.
|
|
972
997
|
-o, --connected-org=<value> Username or alias for the org that the compute environment should be connected to.
|
|
973
998
|
|
|
999
|
+
GLOBAL FLAGS
|
|
1000
|
+
--json Format output as json.
|
|
1001
|
+
|
|
974
1002
|
DESCRIPTION
|
|
975
1003
|
Create a compute environment for use with Salesforce Functions.
|
|
976
1004
|
|
|
@@ -1203,12 +1231,15 @@ Delete an environment.
|
|
|
1203
1231
|
|
|
1204
1232
|
```
|
|
1205
1233
|
USAGE
|
|
1206
|
-
$ sf env delete [-e <value> | ] [--confirm <value>]
|
|
1234
|
+
$ sf env delete [--json] [-e <value> | ] [--confirm <value>]
|
|
1207
1235
|
|
|
1208
1236
|
FLAGS
|
|
1209
1237
|
-e, --target-compute=<value> Environment name.
|
|
1210
1238
|
--confirm=name... Confirmation name.
|
|
1211
1239
|
|
|
1240
|
+
GLOBAL FLAGS
|
|
1241
|
+
--json Format output as json.
|
|
1242
|
+
|
|
1212
1243
|
DESCRIPTION
|
|
1213
1244
|
Delete an environment.
|
|
1214
1245
|
|
|
@@ -1408,6 +1439,24 @@ EXAMPLES
|
|
|
1408
1439
|
$ sf env list --csv --no-header
|
|
1409
1440
|
```
|
|
1410
1441
|
|
|
1442
|
+
## `sf env log`
|
|
1443
|
+
|
|
1444
|
+
Stream log output for an environment.
|
|
1445
|
+
|
|
1446
|
+
```
|
|
1447
|
+
USAGE
|
|
1448
|
+
$ sf env log [-e <value> | ] [-n <value>]
|
|
1449
|
+
|
|
1450
|
+
FLAGS
|
|
1451
|
+
-e, --target-compute=<value> Compute environment name to retrieve logs.
|
|
1452
|
+
-n, --num=<value> Number of lines to display.
|
|
1453
|
+
|
|
1454
|
+
EXAMPLES
|
|
1455
|
+
Stream log output:
|
|
1456
|
+
|
|
1457
|
+
$ sf env log --target-compute environment-alias
|
|
1458
|
+
```
|
|
1459
|
+
|
|
1411
1460
|
## `sf env log tail`
|
|
1412
1461
|
|
|
1413
1462
|
Stream log output for an environment.
|
|
@@ -1431,12 +1480,15 @@ Add log drain to a specified environment.
|
|
|
1431
1480
|
|
|
1432
1481
|
```
|
|
1433
1482
|
USAGE
|
|
1434
|
-
$ sf env logdrain add [-e <value> | ] [-l <value> | ]
|
|
1483
|
+
$ sf env logdrain add [--json] [-e <value> | ] [-l <value> | ]
|
|
1435
1484
|
|
|
1436
1485
|
FLAGS
|
|
1437
1486
|
-e, --target-compute=<value> Environment name.
|
|
1438
1487
|
-l, --drain-url=<value> Endpoint that will receive sent logs.
|
|
1439
1488
|
|
|
1489
|
+
GLOBAL FLAGS
|
|
1490
|
+
--json Format output as json.
|
|
1491
|
+
|
|
1440
1492
|
DESCRIPTION
|
|
1441
1493
|
Add log drain to a specified environment.
|
|
1442
1494
|
|
|
@@ -1455,11 +1507,13 @@ List log drains connected to a specified environment.
|
|
|
1455
1507
|
|
|
1456
1508
|
```
|
|
1457
1509
|
USAGE
|
|
1458
|
-
$ sf env logdrain list [-e <value> | ]
|
|
1510
|
+
$ sf env logdrain list [--json] [-e <value> | ]
|
|
1459
1511
|
|
|
1460
1512
|
FLAGS
|
|
1461
1513
|
-e, --target-compute=<value> Environment name.
|
|
1462
|
-
|
|
1514
|
+
|
|
1515
|
+
GLOBAL FLAGS
|
|
1516
|
+
--json Format output as json.
|
|
1463
1517
|
|
|
1464
1518
|
EXAMPLES
|
|
1465
1519
|
List log drains:
|
|
@@ -1477,12 +1531,15 @@ Remove log drain from a specified environment.
|
|
|
1477
1531
|
|
|
1478
1532
|
```
|
|
1479
1533
|
USAGE
|
|
1480
|
-
$ sf env logdrain remove [-e <value> | ] [-l <value> | ]
|
|
1534
|
+
$ sf env logdrain remove [--json] [-e <value> | ] [-l <value> | ]
|
|
1481
1535
|
|
|
1482
1536
|
FLAGS
|
|
1483
1537
|
-e, --target-compute=<value> Environment name.
|
|
1484
1538
|
-l, --drain-url=<value> Log drain url to remove.
|
|
1485
1539
|
|
|
1540
|
+
GLOBAL FLAGS
|
|
1541
|
+
--json Format output as json.
|
|
1542
|
+
|
|
1486
1543
|
DESCRIPTION
|
|
1487
1544
|
Remove log drain from a specified environment.
|
|
1488
1545
|
|
|
@@ -1655,11 +1712,13 @@ Display a single config variable for an environment.
|
|
|
1655
1712
|
|
|
1656
1713
|
```
|
|
1657
1714
|
USAGE
|
|
1658
|
-
$ sf env var get [KEY] [-e <value> | ]
|
|
1715
|
+
$ sf env var get [KEY] [--json] [-e <value> | ]
|
|
1659
1716
|
|
|
1660
1717
|
FLAGS
|
|
1661
1718
|
-e, --target-compute=<value> Environment name.
|
|
1662
|
-
|
|
1719
|
+
|
|
1720
|
+
GLOBAL FLAGS
|
|
1721
|
+
--json Format output as json.
|
|
1663
1722
|
|
|
1664
1723
|
DESCRIPTION
|
|
1665
1724
|
Display a single config variable for an environment.
|
|
@@ -1678,11 +1737,13 @@ List your environment's config vars in a table.
|
|
|
1678
1737
|
|
|
1679
1738
|
```
|
|
1680
1739
|
USAGE
|
|
1681
|
-
$ sf env var list [-e <value> | ]
|
|
1740
|
+
$ sf env var list [--json] [-e <value> | ]
|
|
1682
1741
|
|
|
1683
1742
|
FLAGS
|
|
1684
1743
|
-e, --target-compute=<value> Environment name.
|
|
1685
|
-
|
|
1744
|
+
|
|
1745
|
+
GLOBAL FLAGS
|
|
1746
|
+
--json Format output as json.
|
|
1686
1747
|
|
|
1687
1748
|
DESCRIPTION
|
|
1688
1749
|
List your environment's config vars in a table.
|
|
@@ -1705,11 +1766,14 @@ Set a single config value for an environment.
|
|
|
1705
1766
|
|
|
1706
1767
|
```
|
|
1707
1768
|
USAGE
|
|
1708
|
-
$ sf env var set [-e <value> | ]
|
|
1769
|
+
$ sf env var set [--json] [-e <value> | ]
|
|
1709
1770
|
|
|
1710
1771
|
FLAGS
|
|
1711
1772
|
-e, --target-compute=<value> Environment name.
|
|
1712
1773
|
|
|
1774
|
+
GLOBAL FLAGS
|
|
1775
|
+
--json Format output as json.
|
|
1776
|
+
|
|
1713
1777
|
EXAMPLES
|
|
1714
1778
|
Set a config value:
|
|
1715
1779
|
|
|
@@ -1722,11 +1786,14 @@ Unset a single config value for an environment.
|
|
|
1722
1786
|
|
|
1723
1787
|
```
|
|
1724
1788
|
USAGE
|
|
1725
|
-
$ sf env var unset [-e <value> | ]
|
|
1789
|
+
$ sf env var unset [--json] [-e <value> | ]
|
|
1726
1790
|
|
|
1727
1791
|
FLAGS
|
|
1728
1792
|
-e, --target-compute=<value> Environment name.
|
|
1729
1793
|
|
|
1794
|
+
GLOBAL FLAGS
|
|
1795
|
+
--json Format output as json.
|
|
1796
|
+
|
|
1730
1797
|
DESCRIPTION
|
|
1731
1798
|
Unset a single config value for an environment.
|
|
1732
1799
|
|
|
@@ -1758,7 +1825,7 @@ DESCRIPTION
|
|
|
1758
1825
|
EXAMPLES
|
|
1759
1826
|
Create a JavaScript function:
|
|
1760
1827
|
|
|
1761
|
-
$ sf generate function --function-name
|
|
1828
|
+
$ sf generate function --function-name myfunction --language javascript
|
|
1762
1829
|
```
|
|
1763
1830
|
|
|
1764
1831
|
## `sf generate project`
|
|
@@ -1969,7 +2036,7 @@ Login using JWT instead of default web-based flow. This will authenticate you wi
|
|
|
1969
2036
|
|
|
1970
2037
|
```
|
|
1971
2038
|
USAGE
|
|
1972
|
-
$ sf login functions jwt -u <value> -f <value> -i <value> [-l <value> | ] [
|
|
2039
|
+
$ sf login functions jwt -u <value> -f <value> -i <value> [--json] [-l <value> | ] [-a <value>] [-d] [-v]
|
|
1973
2040
|
|
|
1974
2041
|
FLAGS
|
|
1975
2042
|
-a, --alias=<value> Alias for the org.
|
|
@@ -1979,7 +2046,9 @@ FLAGS
|
|
|
1979
2046
|
-l, --instance-url=<value> The login URL of the instance the org lives on.
|
|
1980
2047
|
-u, --username=<value> (required) Authentication username.
|
|
1981
2048
|
-v, --set-default-dev-hub Set the org as the default Dev Hub for scratch org creation.
|
|
1982
|
-
|
|
2049
|
+
|
|
2050
|
+
GLOBAL FLAGS
|
|
2051
|
+
--json Format output as json.
|
|
1983
2052
|
|
|
1984
2053
|
DESCRIPTION
|
|
1985
2054
|
Login using JWT instead of default web-based flow. This will authenticate you with both sf and Salesforce Functions.
|
|
@@ -2217,7 +2286,10 @@ Log out of your Salesforce Functions account.
|
|
|
2217
2286
|
|
|
2218
2287
|
```
|
|
2219
2288
|
USAGE
|
|
2220
|
-
$ sf logout functions
|
|
2289
|
+
$ sf logout functions [--json]
|
|
2290
|
+
|
|
2291
|
+
GLOBAL FLAGS
|
|
2292
|
+
--json Format output as json.
|
|
2221
2293
|
|
|
2222
2294
|
EXAMPLES
|
|
2223
2295
|
Log out:
|
|
@@ -2616,7 +2688,7 @@ Send a cloudevent to a function.
|
|
|
2616
2688
|
|
|
2617
2689
|
```
|
|
2618
2690
|
USAGE
|
|
2619
|
-
$ sf run function [-l <value> | ] [-H <value>] [-p <value>] [-s] [-o <value>]
|
|
2691
|
+
$ sf run function [--json] [-l <value> | ] [-H <value>] [-p <value>] [-s] [-o <value>]
|
|
2620
2692
|
|
|
2621
2693
|
FLAGS
|
|
2622
2694
|
-H, --headers=<value>... Set headers.
|
|
@@ -2625,6 +2697,9 @@ FLAGS
|
|
|
2625
2697
|
-p, --payload=<value> Set the payload of the cloudevent as a JSON object or a path to a file via @file.json.
|
|
2626
2698
|
-s, --structured Set the cloudevent to be emitted as a structured JSON cloudevent.
|
|
2627
2699
|
|
|
2700
|
+
GLOBAL FLAGS
|
|
2701
|
+
--json Format output as json.
|
|
2702
|
+
|
|
2628
2703
|
EXAMPLES
|
|
2629
2704
|
Run a function:
|
|
2630
2705
|
|
|
@@ -2834,10 +2909,10 @@ Show information on your Salesforce Functions login.
|
|
|
2834
2909
|
|
|
2835
2910
|
```
|
|
2836
2911
|
USAGE
|
|
2837
|
-
$ sf whoami functions [
|
|
2912
|
+
$ sf whoami functions [--json]
|
|
2838
2913
|
|
|
2839
|
-
FLAGS
|
|
2840
|
-
|
|
2914
|
+
GLOBAL FLAGS
|
|
2915
|
+
--json Format output as json.
|
|
2841
2916
|
|
|
2842
2917
|
DESCRIPTION
|
|
2843
2918
|
Show information on your Salesforce Functions login.
|
package/dist/hooks/incomplete.js
CHANGED
|
@@ -8,7 +8,9 @@
|
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
9
|
const core_1 = require("@oclif/core");
|
|
10
10
|
const sf_plugins_core_1 = require("@salesforce/sf-plugins-core");
|
|
11
|
-
|
|
11
|
+
async function determineCommand(config, matches) {
|
|
12
|
+
if (matches.length === 1)
|
|
13
|
+
return matches[0].id;
|
|
12
14
|
const prompter = new sf_plugins_core_1.Prompter();
|
|
13
15
|
const { command } = await prompter.timedPrompt([
|
|
14
16
|
{
|
|
@@ -18,6 +20,10 @@ const hook = async function ({ config, matches, argv }) {
|
|
|
18
20
|
choices: matches.map((p) => (0, core_1.toConfiguredId)(p.id, config)),
|
|
19
21
|
},
|
|
20
22
|
]);
|
|
23
|
+
return command;
|
|
24
|
+
}
|
|
25
|
+
const hook = async function ({ config, matches, argv }) {
|
|
26
|
+
const command = await determineCommand(config, matches);
|
|
21
27
|
if (argv.includes('--help') || argv.includes('-h')) {
|
|
22
28
|
return config.runCommand('help', [(0, core_1.toStandardizedId)(command, config)]);
|
|
23
29
|
}
|