@salesforce/cli 1.25.1 → 1.27.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 +14 -0
- package/README.md +794 -37
- package/npm-shrinkwrap.json +9565 -13066
- package/oclif.manifest.json +1 -1
- package/package.json +16 -15
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.27.0 linux-x64 node-v14.19.2
|
|
35
35
|
$ sf --help [COMMAND]
|
|
36
36
|
USAGE
|
|
37
37
|
$ sf COMMAND
|
|
@@ -52,17 +52,27 @@ USAGE
|
|
|
52
52
|
- [`sf deploy`](#sf-deploy)
|
|
53
53
|
- [`sf deploy functions`](#sf-deploy-functions)
|
|
54
54
|
- [`sf deploy metadata`](#sf-deploy-metadata)
|
|
55
|
+
- [`sf deploy metadata cancel`](#sf-deploy-metadata-cancel)
|
|
56
|
+
- [`sf deploy metadata quick`](#sf-deploy-metadata-quick)
|
|
57
|
+
- [`sf deploy metadata report`](#sf-deploy-metadata-report)
|
|
58
|
+
- [`sf deploy metadata resume`](#sf-deploy-metadata-resume)
|
|
59
|
+
- [`sf deploy metadata validate`](#sf-deploy-metadata-validate)
|
|
55
60
|
- [`sf env compute collaborator add`](#sf-env-compute-collaborator-add)
|
|
56
61
|
- [`sf env create compute`](#sf-env-create-compute)
|
|
62
|
+
- [`sf env create sandbox`](#sf-env-create-sandbox)
|
|
63
|
+
- [`sf env create scratch`](#sf-env-create-scratch)
|
|
57
64
|
- [`sf env delete`](#sf-env-delete)
|
|
65
|
+
- [`sf env delete sandbox`](#sf-env-delete-sandbox)
|
|
66
|
+
- [`sf env delete scratch`](#sf-env-delete-scratch)
|
|
58
67
|
- [`sf env display`](#sf-env-display)
|
|
59
68
|
- [`sf env list`](#sf-env-list)
|
|
60
|
-
- [`sf env log`](#sf-env-log)
|
|
61
69
|
- [`sf env log tail`](#sf-env-log-tail)
|
|
62
70
|
- [`sf env logdrain add`](#sf-env-logdrain-add)
|
|
63
71
|
- [`sf env logdrain list`](#sf-env-logdrain-list)
|
|
64
72
|
- [`sf env logdrain remove`](#sf-env-logdrain-remove)
|
|
65
73
|
- [`sf env open`](#sf-env-open)
|
|
74
|
+
- [`sf env resume sandbox`](#sf-env-resume-sandbox)
|
|
75
|
+
- [`sf env resume scratch`](#sf-env-resume-scratch)
|
|
66
76
|
- [`sf env var get KEY`](#sf-env-var-get-key)
|
|
67
77
|
- [`sf env var list`](#sf-env-var-list)
|
|
68
78
|
- [`sf env var set`](#sf-env-var-set)
|
|
@@ -125,7 +135,7 @@ EXAMPLES
|
|
|
125
135
|
$ sf autocomplete --refresh-cache
|
|
126
136
|
```
|
|
127
137
|
|
|
128
|
-
_See code: [@oclif/plugin-autocomplete](https://github.com/oclif/plugin-autocomplete/blob/v1.
|
|
138
|
+
_See code: [@oclif/plugin-autocomplete](https://github.com/oclif/plugin-autocomplete/blob/v1.3.0/src/commands/autocomplete/index.ts)_
|
|
129
139
|
|
|
130
140
|
## `sf config get`
|
|
131
141
|
|
|
@@ -328,7 +338,7 @@ EXAMPLES
|
|
|
328
338
|
$ sf deploy --interactive
|
|
329
339
|
```
|
|
330
340
|
|
|
331
|
-
_See code: [@salesforce/plugin-deploy-retrieve](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/v1.
|
|
341
|
+
_See code: [@salesforce/plugin-deploy-retrieve](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/v1.4.2/src/commands/deploy.ts)_
|
|
332
342
|
|
|
333
343
|
## `sf deploy functions`
|
|
334
344
|
|
|
@@ -350,8 +360,9 @@ Deploy metadata in source format to an org from your local project.
|
|
|
350
360
|
|
|
351
361
|
```
|
|
352
362
|
USAGE
|
|
353
|
-
$ sf deploy metadata [--json] [-a <value>] [--
|
|
354
|
-
<value>] [-
|
|
363
|
+
$ sf deploy metadata [--json] [-a <value>] [--async | -w <value>] [--concise | --verbose] [--dry-run] [-r] [-g] [-x
|
|
364
|
+
<value>] [-m <value>] [-d <value>] [-o <value>] [-t <value>] [-l
|
|
365
|
+
NoTestRun|RunSpecifiedTests|RunLocalTests|RunAllTestsInOrg]
|
|
355
366
|
|
|
356
367
|
FLAGS
|
|
357
368
|
-a, --api-version=<value> Target API version for the deploy.
|
|
@@ -366,6 +377,8 @@ FLAGS
|
|
|
366
377
|
-w, --wait=<minutes> [default: [object Object]] Number of minutes to wait for command to complete and display
|
|
367
378
|
results.
|
|
368
379
|
-x, --manifest=<value> Full file path for manifest (package.xml) of components to deploy.
|
|
380
|
+
--async Run the command asynchronously.
|
|
381
|
+
--concise Show concise output of the deploy result.
|
|
369
382
|
--dry-run Validate deploy and run Apex tests but don’t save to the org.
|
|
370
383
|
--verbose Show verbose output of the deploy result.
|
|
371
384
|
|
|
@@ -380,9 +393,6 @@ DESCRIPTION
|
|
|
380
393
|
This command doesn't support source-tracking. The source you deploy overwrites the corresponding metadata in your org.
|
|
381
394
|
This command doesn’t attempt to merge your source with the versions in your org.
|
|
382
395
|
|
|
383
|
-
To run the command asynchronously, set --wait to 0, which immediately returns the job ID. This way, you can continue
|
|
384
|
-
to use the CLI.
|
|
385
|
-
|
|
386
396
|
To deploy multiple metadata components, either set multiple --metadata <name> flags or a single --metadata flag with
|
|
387
397
|
multiple names separated by spaces. Enclose names that contain spaces in one set of double quotes. The same syntax
|
|
388
398
|
applies to --manifest and --source-dir.
|
|
@@ -479,19 +489,439 @@ FLAG DESCRIPTIONS
|
|
|
479
489
|
|
|
480
490
|
-w, --wait=<minutes> Number of minutes to wait for command to complete and display results.
|
|
481
491
|
|
|
482
|
-
If the command continues to run after the wait period, the CLI returns control of the terminal window to you
|
|
492
|
+
If the command continues to run after the wait period, the CLI returns control of the terminal window to you and
|
|
493
|
+
returns the job ID. To resume the deployment, run "sf deploy metadata resume". To check the status of the
|
|
494
|
+
deployment, run "sf deploy metadata report".
|
|
483
495
|
|
|
484
496
|
-x, --manifest=<value> Full file path for manifest (package.xml) of components to deploy.
|
|
485
497
|
|
|
486
498
|
All child components are included. If you specify this flag, don’t specify --metadata or --source-dir.
|
|
487
499
|
|
|
500
|
+
--async Run the command asynchronously.
|
|
501
|
+
|
|
502
|
+
The command immediately returns the job ID and control of the terminal to you. This way, you can continue to use the
|
|
503
|
+
CLI. To resume the deployment, run "sf deploy metadata resume". To check the status of the deployment, run "sf
|
|
504
|
+
deploy metadata report".
|
|
505
|
+
|
|
506
|
+
CONFIGURATION VARIABLES
|
|
507
|
+
target-org Username or alias of the org that all commands run against by default. (sf only)
|
|
508
|
+
org-api-version API version of your project. Default: API version of your Dev Hub org.
|
|
509
|
+
|
|
510
|
+
ENVIRONMENT VARIABLES
|
|
511
|
+
SF_TARGET_ORG Username or alias of your default org. Overrides the target-org configuration variable.
|
|
512
|
+
SF_USE_PROGRESS_BAR Set to false to disable the progress bar when running the metadata deploy command.
|
|
513
|
+
|
|
514
|
+
ERROR CODES
|
|
515
|
+
Succeeded (0) The deploy succeeded.
|
|
516
|
+
Canceled (1) The deploy was canceled.
|
|
517
|
+
Failed (1) The deploy failed.
|
|
518
|
+
SucceededPartial (68) The deploy partially succeeded.
|
|
519
|
+
InProgress (69) The deploy is in progress.
|
|
520
|
+
Pending (69) The deploy is pending.
|
|
521
|
+
Canceling (69) The deploy is being canceled.
|
|
522
|
+
```
|
|
523
|
+
|
|
524
|
+
## `sf deploy metadata cancel`
|
|
525
|
+
|
|
526
|
+
Cancel a deploy operation.
|
|
527
|
+
|
|
528
|
+
```
|
|
529
|
+
USAGE
|
|
530
|
+
$ sf deploy metadata cancel [--json] [--async | -w <value>] [-i <value>] [-r]
|
|
531
|
+
|
|
532
|
+
FLAGS
|
|
533
|
+
-i, --job-id=<value> Job ID of the deploy operation you want to cancel.
|
|
534
|
+
-r, --use-most-recent Use the job ID of the most recent deploy operation.
|
|
535
|
+
-w, --wait=<minutes> Number of minutes to wait for the command to complete and display results.
|
|
536
|
+
--async Run the command asynchronously.
|
|
537
|
+
|
|
538
|
+
GLOBAL FLAGS
|
|
539
|
+
--json Format output as json.
|
|
540
|
+
|
|
541
|
+
DESCRIPTION
|
|
542
|
+
Cancel a deploy operation.
|
|
543
|
+
|
|
544
|
+
Use this command to cancel a deploy operation that hasn't yet completed in the org. Deploy operations include standard
|
|
545
|
+
deploys, quick deploys, deploy validations, and deploy cancellations.
|
|
546
|
+
|
|
547
|
+
Run this command by either passing it a job ID or specifying the --use-most-recent flag to use the job ID of the most
|
|
548
|
+
recent deploy operation.
|
|
549
|
+
|
|
550
|
+
EXAMPLES
|
|
551
|
+
Cancel a deploy operation using a job ID:
|
|
552
|
+
|
|
553
|
+
$ sf deploy metadata cancel --job-id 0Af0x000017yLUFCA2
|
|
554
|
+
|
|
555
|
+
Cancel the most recent deploy operation:
|
|
556
|
+
|
|
557
|
+
$ sf deploy metadata cancel --use-most-recent
|
|
558
|
+
|
|
559
|
+
FLAG DESCRIPTIONS
|
|
560
|
+
-i, --job-id=<value> Job ID of the deploy operation you want to cancel.
|
|
561
|
+
|
|
562
|
+
These commands return a job ID if they time out or you specified the --async flag:
|
|
563
|
+
|
|
564
|
+
- sf deploy metadata
|
|
565
|
+
- sf deploy metadata validate
|
|
566
|
+
- sf deploy metadata quick
|
|
567
|
+
- sf deploy metadata cancel
|
|
568
|
+
|
|
569
|
+
The job ID is valid for 10 days from when you started the deploy operation.
|
|
570
|
+
|
|
571
|
+
-r, --use-most-recent Use the job ID of the most recent deploy operation.
|
|
572
|
+
|
|
573
|
+
For performance reasons, this flag uses job IDs for deploy operations that started only in the past 3 days or less.
|
|
574
|
+
If your most recent deploy operations was more than 3 days ago, this flag won't find a job ID.
|
|
575
|
+
|
|
576
|
+
-w, --wait=<minutes> Number of minutes to wait for the command to complete and display results.
|
|
577
|
+
|
|
578
|
+
If the command continues to run after the wait period, the CLI returns control of the terminal window to you. To
|
|
579
|
+
resume watching the cancellation, run "sf deploy metadata resume". To check the status of the cancellation, run "sf
|
|
580
|
+
deploy metadata report".
|
|
581
|
+
|
|
582
|
+
--async Run the command asynchronously.
|
|
583
|
+
|
|
584
|
+
The command immediately returns the control of the terminal to you. This way, you can continue to use the CLI. To
|
|
585
|
+
resume watching the cancellation, run "sf deploy metadata resume". To check the status of the cancellation, run "sf
|
|
586
|
+
deploy metadata report".
|
|
587
|
+
```
|
|
588
|
+
|
|
589
|
+
## `sf deploy metadata quick`
|
|
590
|
+
|
|
591
|
+
Quickly deploy a validated deployment to an org.
|
|
592
|
+
|
|
593
|
+
```
|
|
594
|
+
USAGE
|
|
595
|
+
$ sf deploy metadata quick [--json] [--async | -w <value>] [--concise | --verbose] [-i <value>] [-o <value>] [-r]
|
|
596
|
+
|
|
597
|
+
FLAGS
|
|
598
|
+
-i, --job-id=<value> Job ID of the deployment you want to quick deploy.
|
|
599
|
+
-o, --target-org=<value> Login username or alias for the target org.
|
|
600
|
+
-r, --use-most-recent Use the job ID of the most recently validated deployment.
|
|
601
|
+
-w, --wait=<minutes> [default: [object Object]] Number of minutes to wait for the command to complete and display
|
|
602
|
+
results.
|
|
603
|
+
--async Run the command asynchronously.
|
|
604
|
+
--concise Show concise output of the deploy result.
|
|
605
|
+
--verbose Show verbose output of the deploy result.
|
|
606
|
+
|
|
607
|
+
GLOBAL FLAGS
|
|
608
|
+
--json Format output as json.
|
|
609
|
+
|
|
610
|
+
DESCRIPTION
|
|
611
|
+
Quickly deploy a validated deployment to an org.
|
|
612
|
+
|
|
613
|
+
Before you run this command, first create a validated deployment with the "sf deploy metadata validate" command, which
|
|
614
|
+
returns a job ID. Validated deployments haven't been deployed to the org yet; you deploy them with this command.
|
|
615
|
+
Either pass the job ID to this command or use the --use-most-recent flag to use the job ID of the most recently
|
|
616
|
+
validated deployment. For the quick deploy to succeed, the associated validated deployment must also have succeeded.
|
|
617
|
+
|
|
618
|
+
Executing this quick deploy command takes less time than a standard deploy because it skips running Apex tests. These
|
|
619
|
+
tests were previously run as part of the validation. Validating first and then running a quick deploy is useful if the
|
|
620
|
+
deployment to your production org take several hours and you don’t want to risk a failed deploy.
|
|
621
|
+
|
|
622
|
+
This command doesn't support source-tracking. The source you deploy overwrites the corresponding metadata in your org.
|
|
623
|
+
This command doesn’t attempt to merge your source with the versions in your org.
|
|
624
|
+
|
|
625
|
+
EXAMPLES
|
|
626
|
+
Run a quick deploy to your default org using a job ID:
|
|
627
|
+
|
|
628
|
+
$ sf deploy metadata quick --job-id 0Af0x000017yLUFCA2
|
|
629
|
+
|
|
630
|
+
Asynchronously run a quick deploy of the most recently validated deployment to an org with alias "my-prod-org":
|
|
631
|
+
|
|
632
|
+
$ sf deploy metadata quick --async --use-most-recent --target-org my-prod-org
|
|
633
|
+
|
|
634
|
+
FLAG DESCRIPTIONS
|
|
635
|
+
-i, --job-id=<value> Job ID of the deployment you want to quick deploy.
|
|
636
|
+
|
|
637
|
+
The job ID is valid for 10 days from when you started the validation.
|
|
638
|
+
|
|
639
|
+
-o, --target-org=<value> Login username or alias for the target org.
|
|
640
|
+
|
|
641
|
+
Overrides your default org.
|
|
642
|
+
|
|
643
|
+
-r, --use-most-recent Use the job ID of the most recently validated deployment.
|
|
644
|
+
|
|
645
|
+
For performance reasons, this flag uses only job IDs that were validated in the past 3 days or less. If your most
|
|
646
|
+
recent deployment validation was more than 3 days ago, this flag won't find a job ID.
|
|
647
|
+
|
|
648
|
+
-w, --wait=<minutes> Number of minutes to wait for the command to complete and display results.
|
|
649
|
+
|
|
650
|
+
If the command continues to run after the wait period, the CLI returns control of the terminal window to you. To
|
|
651
|
+
resume watching the deploy, run "sf deploy metadata resume". To check the status of the deploy, run "sf deploy
|
|
652
|
+
metadata report".
|
|
653
|
+
|
|
654
|
+
--async Run the command asynchronously.
|
|
655
|
+
|
|
656
|
+
The command immediately returns the control of the terminal to you. This way, you can continue to use the CLI. To
|
|
657
|
+
resume watching the deploy, run "sf deploy metadata resume". To check the status of the deploy, run "sf deploy
|
|
658
|
+
metadata report".
|
|
659
|
+
|
|
660
|
+
ERROR CODES
|
|
661
|
+
Succeeded (0) The deploy succeeded.
|
|
662
|
+
Canceled (1) The deploy was canceled.
|
|
663
|
+
Failed (1) The deploy failed.
|
|
664
|
+
SucceededPartial (68) The deploy partially succeeded.
|
|
665
|
+
InProgress (69) The deploy is in progress.
|
|
666
|
+
Pending (69) The deploy is pending.
|
|
667
|
+
Canceling (69) The deploy is being canceled.
|
|
668
|
+
```
|
|
669
|
+
|
|
670
|
+
## `sf deploy metadata report`
|
|
671
|
+
|
|
672
|
+
Check the status of a deploy operation.
|
|
673
|
+
|
|
674
|
+
```
|
|
675
|
+
USAGE
|
|
676
|
+
$ sf deploy metadata report [--json] [-i <value>] [-r]
|
|
677
|
+
|
|
678
|
+
FLAGS
|
|
679
|
+
-i, --job-id=<value> Job ID of the deploy operation you want to check the status of.
|
|
680
|
+
-r, --use-most-recent Use the job ID of the most recent deploy operation.
|
|
681
|
+
|
|
682
|
+
GLOBAL FLAGS
|
|
683
|
+
--json Format output as json.
|
|
684
|
+
|
|
685
|
+
DESCRIPTION
|
|
686
|
+
Check the status of a deploy operation.
|
|
687
|
+
|
|
688
|
+
Deploy operations include standard deploys, quick deploys, deploy validations, and deploy cancellations.
|
|
689
|
+
|
|
690
|
+
Run this command by either passing it a job ID or specifying the --use-most-recent flag to use the job ID of the most
|
|
691
|
+
recent deploy operation.
|
|
692
|
+
|
|
693
|
+
EXAMPLES
|
|
694
|
+
Check the status using a job ID:
|
|
695
|
+
|
|
696
|
+
$ sf deploy metadata report --job-id 0Af0x000017yLUFCA2
|
|
697
|
+
|
|
698
|
+
Check the status of the most recent deploy operation:
|
|
699
|
+
|
|
700
|
+
$ sf deploy metadata report --use-most-recent
|
|
701
|
+
|
|
702
|
+
FLAG DESCRIPTIONS
|
|
703
|
+
-i, --job-id=<value> Job ID of the deploy operation you want to check the status of.
|
|
704
|
+
|
|
705
|
+
These commands return a job ID if they time out or you specified the --async flag:
|
|
706
|
+
|
|
707
|
+
- sf deploy metadata
|
|
708
|
+
- sf deploy metadata validate
|
|
709
|
+
- sf deploy metadata quick
|
|
710
|
+
- sf deploy metadata cancel
|
|
711
|
+
|
|
712
|
+
The job ID is valid for 10 days from when you started the deploy operation.
|
|
713
|
+
|
|
714
|
+
-r, --use-most-recent Use the job ID of the most recent deploy operation.
|
|
715
|
+
|
|
716
|
+
For performance reasons, this flag uses job IDs for deploy operations that started only in the past 3 days or less.
|
|
717
|
+
If your most recent operation was more than 3 days ago, this flag won't find a job ID.
|
|
718
|
+
```
|
|
719
|
+
|
|
720
|
+
## `sf deploy metadata resume`
|
|
721
|
+
|
|
722
|
+
Resume watching a deploy operation.
|
|
723
|
+
|
|
724
|
+
```
|
|
725
|
+
USAGE
|
|
726
|
+
$ sf deploy metadata resume [--json] [--concise | --verbose] [-i <value>] [-r] [-w <value>]
|
|
727
|
+
|
|
728
|
+
FLAGS
|
|
729
|
+
-i, --job-id=<value> Job ID of the deploy operation you want to resume.
|
|
730
|
+
-r, --use-most-recent Use the job ID of the most recent deploy operation.
|
|
731
|
+
-w, --wait=<minutes> Number of minutes to wait for the command to complete and display results.
|
|
732
|
+
--concise Show concise output of the deploy operation result.
|
|
733
|
+
--verbose Show verbose output of the deploy operation result.
|
|
734
|
+
|
|
735
|
+
GLOBAL FLAGS
|
|
736
|
+
--json Format output as json.
|
|
737
|
+
|
|
738
|
+
DESCRIPTION
|
|
739
|
+
Resume watching a deploy operation.
|
|
740
|
+
|
|
741
|
+
Use this command to resume watching a deploy operation if the original command times out or you specified the --async
|
|
742
|
+
flag. Deploy operations include standard deploys, quick deploys, deploy validations, and deploy cancellations. This
|
|
743
|
+
command doesn't resume the original operation itself, because the operation always continues after you've started it,
|
|
744
|
+
regardless of whether you're watching it or not.
|
|
745
|
+
|
|
746
|
+
Run this command by either passing it a job ID or specifying the --use-most-recent flag to use the job ID of the most
|
|
747
|
+
recent deploy operation.
|
|
748
|
+
|
|
749
|
+
EXAMPLES
|
|
750
|
+
Resume watching a deploy operation using a job ID:
|
|
751
|
+
|
|
752
|
+
$ sf deploy metadata resume --job-id 0Af0x000017yLUFCA2
|
|
753
|
+
|
|
754
|
+
Resume watching the most recent deploy operation:
|
|
755
|
+
|
|
756
|
+
$ sf deploy metadata resume --use-most-recent
|
|
757
|
+
|
|
758
|
+
FLAG DESCRIPTIONS
|
|
759
|
+
-i, --job-id=<value> Job ID of the deploy operation you want to resume.
|
|
760
|
+
|
|
761
|
+
These commands return a job ID if they time out or you specified the --async flag:
|
|
762
|
+
|
|
763
|
+
- sf deploy metadata
|
|
764
|
+
- sf deploy metadata validate
|
|
765
|
+
- sf deploy metadata quick
|
|
766
|
+
- sf deploy metadata cancel
|
|
767
|
+
|
|
768
|
+
The job ID is valid for 10 days from when you started the deploy operation.
|
|
769
|
+
|
|
770
|
+
-r, --use-most-recent Use the job ID of the most recent deploy operation.
|
|
771
|
+
|
|
772
|
+
For performance reasons, this flag uses job IDs for deploy operations that started only in the past 3 days or less.
|
|
773
|
+
If your most recent operation was more than 3 days ago, this flag won't find a job ID.
|
|
774
|
+
|
|
775
|
+
-w, --wait=<minutes> Number of minutes to wait for the command to complete and display results.
|
|
776
|
+
|
|
777
|
+
If the command continues to run after the wait period, the CLI returns control of the terminal window to you. To
|
|
778
|
+
resume watching the deploy operation, run this command again. To check the status of the deploy operation, run "sf
|
|
779
|
+
deploy metadata report".
|
|
780
|
+
|
|
781
|
+
ENVIRONMENT VARIABLES
|
|
782
|
+
SF_USE_PROGRESS_BAR Set to false to disable the progress bar when running the metadata deploy command.
|
|
783
|
+
|
|
784
|
+
ERROR CODES
|
|
785
|
+
Succeeded (0) The deploy succeeded.
|
|
786
|
+
Canceled (1) The deploy was canceled.
|
|
787
|
+
Failed (1) The deploy failed.
|
|
788
|
+
SucceededPartial (68) The deploy partially succeeded.
|
|
789
|
+
InProgress (69) The deploy is in progress.
|
|
790
|
+
Pending (69) The deploy is pending.
|
|
791
|
+
Canceling (69) The deploy is being canceled.
|
|
792
|
+
```
|
|
793
|
+
|
|
794
|
+
## `sf deploy metadata validate`
|
|
795
|
+
|
|
796
|
+
Validate a metadata deployment without actually executing it.
|
|
797
|
+
|
|
798
|
+
```
|
|
799
|
+
USAGE
|
|
800
|
+
$ sf deploy metadata validate [--json] [-a <value>] [--async] [--concise | --verbose] [-x <value> | -m <value> | -d <value>]
|
|
801
|
+
[-o <value>] [-t <value>] [-l RunAllTestsInOrg|RunLocalTests|RunSpecifiedTests] [-w <value>]
|
|
802
|
+
|
|
803
|
+
FLAGS
|
|
804
|
+
-a, --api-version=<value> Target API version for the validation.
|
|
805
|
+
-d, --source-dir=<value>... Path to the local source files to validate for deployment.
|
|
806
|
+
-l, --test-level=<option> [default: RunLocalTests] Deployment Apex testing level.
|
|
807
|
+
<options: RunAllTestsInOrg|RunLocalTests|RunSpecifiedTests>
|
|
808
|
+
-m, --metadata=<value>... Metadata component names to validate for deployment.
|
|
809
|
+
-o, --target-org=<value> Login username or alias for the target org.
|
|
810
|
+
-t, --tests=<value>... Apex tests to run when --test-level is RunSpecifiedTests.
|
|
811
|
+
-w, --wait=<minutes> [default: [object Object]] Number of minutes to wait for the command to complete and
|
|
812
|
+
display results.
|
|
813
|
+
-x, --manifest=<value> Full file path for manifest (package.xml) of components to validate for deployment.
|
|
814
|
+
--async Run the command asynchronously.
|
|
815
|
+
--concise Show concise output of the validation result.
|
|
816
|
+
--verbose Show verbose output of the validation result.
|
|
817
|
+
|
|
818
|
+
GLOBAL FLAGS
|
|
819
|
+
--json Format output as json.
|
|
820
|
+
|
|
821
|
+
DESCRIPTION
|
|
822
|
+
Validate a metadata deployment without actually executing it.
|
|
823
|
+
|
|
824
|
+
Use this command to verify whether a deployment will succeed without actually deploying the metadata to your org. This
|
|
825
|
+
command is similar to "sf deploy metadata", except you're required to run Apex tests, and the command returns a job ID
|
|
826
|
+
rather than executing the deployment. If the validation succeeds, then you pass this job ID to the "sf deploy metadata
|
|
827
|
+
quick" command to actually deploy the metadata. This quick deploy takes less time because it skips running Apex tests.
|
|
828
|
+
The job ID is valid for 10 days from when you started the validation. Validating first is useful if the deployment to
|
|
829
|
+
your production org take several hours and you don’t want to risk a failed deploy.
|
|
830
|
+
|
|
831
|
+
You must run this command from within a project.
|
|
832
|
+
|
|
833
|
+
This command doesn't support source-tracking. When you quick deploy with the resulting job ID, the source you deploy
|
|
834
|
+
overwrites the corresponding metadata in your org.
|
|
835
|
+
|
|
836
|
+
To validate the deployment of multiple metadata components, either set multiple --metadata <name> flags or a single
|
|
837
|
+
--metadata flag with multiple names separated by spaces. Enclose names that contain spaces in one set of double
|
|
838
|
+
quotes. The same syntax applies to --manifest and --source-dir.
|
|
839
|
+
|
|
840
|
+
EXAMPLES
|
|
841
|
+
NOTE: These examples focus on validating large deployments. See the help for "sf deploy metadata" for examples of deploying smaller sets of metadata which you can also use to validate.
|
|
842
|
+
|
|
843
|
+
Validate the deployment of all source files in a directory to the default org:
|
|
844
|
+
|
|
845
|
+
$ sf deploy metadata validate --source-dir path/to/source
|
|
846
|
+
|
|
847
|
+
Asynchronously validate the deployment and run all tests in the org with alias "my-prod-org"; command immediately
|
|
848
|
+
returns the job ID:
|
|
849
|
+
|
|
850
|
+
$ sf deploy metadata validate --source-dir path/to/source --async --test-level RunAllTestsInOrg --target-org \
|
|
851
|
+
my-prod-org
|
|
852
|
+
|
|
853
|
+
Validate the deployment of all components listed in a manifest:
|
|
854
|
+
|
|
855
|
+
$ sf deploy metadata validate --manifest path/to/package.xml
|
|
856
|
+
|
|
857
|
+
FLAG DESCRIPTIONS
|
|
858
|
+
-a, --api-version=<value> Target API version for the validation.
|
|
859
|
+
|
|
860
|
+
Use this flag to override the default API version, which is the latest version supported the CLI, with the API
|
|
861
|
+
version in your package.xml file.
|
|
862
|
+
|
|
863
|
+
-d, --source-dir=<value>... Path to the local source files to validate for deployment.
|
|
864
|
+
|
|
865
|
+
The supplied path can be to a single file (in which case the operation is applied to only one file) or to a folder
|
|
866
|
+
(in which case the operation is applied to all metadata types in the directory and its subdirectories).
|
|
867
|
+
|
|
868
|
+
If you specify this flag, don’t specify --metadata or --manifest.
|
|
869
|
+
|
|
870
|
+
-l, --test-level=RunAllTestsInOrg|RunLocalTests|RunSpecifiedTests Deployment Apex testing level.
|
|
871
|
+
|
|
872
|
+
Valid values are:
|
|
873
|
+
|
|
874
|
+
- RunSpecifiedTests — Runs only the tests that you specify with the --run-tests flag. Code coverage requirements
|
|
875
|
+
differ from the default coverage requirements when using this test level. Executed tests must comprise a minimum of
|
|
876
|
+
75% code coverage for each class and trigger in the deployment package. This coverage is computed for each class and
|
|
877
|
+
trigger individually and is different than the overall coverage percentage.
|
|
878
|
+
|
|
879
|
+
- RunLocalTests — All tests in your org are run, except the ones that originate from installed managed and unlocked
|
|
880
|
+
packages. This test level is the default for production deployments that include Apex classes or triggers.
|
|
881
|
+
|
|
882
|
+
- RunAllTestsInOrg — All tests in your org are run, including tests of managed packages.
|
|
883
|
+
|
|
884
|
+
If you don’t specify a test level, the default behavior depends on the contents of your deployment package. For more
|
|
885
|
+
information, see [Running Tests in a
|
|
886
|
+
Deployment](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_deploy_running_tests.htm)
|
|
887
|
+
in the "Metadata API Developer Guide".
|
|
888
|
+
|
|
889
|
+
-o, --target-org=<value> Login username or alias for the target org.
|
|
890
|
+
|
|
891
|
+
Overrides your default org.
|
|
892
|
+
|
|
893
|
+
-w, --wait=<minutes> Number of minutes to wait for the command to complete and display results.
|
|
894
|
+
|
|
895
|
+
If the command continues to run after the wait period, the CLI returns control of the terminal window to you and
|
|
896
|
+
returns the job ID. To resume watching the validation, run "sf deploy metadata resume". To check the status of the
|
|
897
|
+
validation, run "sf deploy metadata report".
|
|
898
|
+
|
|
899
|
+
-x, --manifest=<value> Full file path for manifest (package.xml) of components to validate for deployment.
|
|
900
|
+
|
|
901
|
+
All child components are included. If you specify this flag, don’t specify --metadata or --source-dir.
|
|
902
|
+
|
|
903
|
+
--async Run the command asynchronously.
|
|
904
|
+
|
|
905
|
+
The command immediately returns the job ID and control of the terminal to you. This way, you can continue to use the
|
|
906
|
+
CLI. To resume watching the validation, run "sf deploy metadata resume". To check the status of the validation, run
|
|
907
|
+
"sf deploy metadata report".
|
|
908
|
+
|
|
488
909
|
CONFIGURATION VARIABLES
|
|
489
|
-
target-org
|
|
490
|
-
|
|
910
|
+
target-org Username or alias of the org that all commands run against by default. (sf only)
|
|
911
|
+
org-api-version API version of your project. Default: API version of your Dev Hub org.
|
|
491
912
|
|
|
492
913
|
ENVIRONMENT VARIABLES
|
|
493
914
|
SF_TARGET_ORG Username or alias of your default org. Overrides the target-org configuration variable.
|
|
494
915
|
SF_USE_PROGRESS_BAR Set to false to disable the progress bar when running the metadata deploy command.
|
|
916
|
+
|
|
917
|
+
ERROR CODES
|
|
918
|
+
Succeeded (0) The deploy succeeded.
|
|
919
|
+
Canceled (1) The deploy was canceled.
|
|
920
|
+
Failed (1) The deploy failed.
|
|
921
|
+
SucceededPartial (68) The deploy partially succeeded.
|
|
922
|
+
InProgress (69) The deploy is in progress.
|
|
923
|
+
Pending (69) The deploy is pending.
|
|
924
|
+
Canceling (69) The deploy is being canceled.
|
|
495
925
|
```
|
|
496
926
|
|
|
497
927
|
## `sf env compute collaborator add`
|
|
@@ -517,7 +947,7 @@ Create a compute environment for use with Salesforce Functions.
|
|
|
517
947
|
|
|
518
948
|
```
|
|
519
949
|
USAGE
|
|
520
|
-
$ sf env create compute [-o <value>] [-a <value>]
|
|
950
|
+
$ sf env create compute [-o <value>] [-a <value> | ]
|
|
521
951
|
|
|
522
952
|
FLAGS
|
|
523
953
|
-a, --alias=<value> Alias for the created environment.
|
|
@@ -544,6 +974,184 @@ EXAMPLES
|
|
|
544
974
|
$ sf env create compute --alias environment-alias
|
|
545
975
|
```
|
|
546
976
|
|
|
977
|
+
## `sf env create sandbox`
|
|
978
|
+
|
|
979
|
+
Create a sandbox org.
|
|
980
|
+
|
|
981
|
+
```
|
|
982
|
+
USAGE
|
|
983
|
+
$ sf env create sandbox [--json] [-f <value> | -n <value> | -l Developer|Developer_Pro|Partial|Full] [-s] [-a <value>]
|
|
984
|
+
[-w <value> | --async] [-i <value> | ] [-c <value> | ] [-o <value>] [--no-prompt]
|
|
985
|
+
|
|
986
|
+
FLAGS
|
|
987
|
+
-a, --alias=<value> Alias for the sandbox org.
|
|
988
|
+
-c, --clone=<value> Name of the sandbox org to clone.
|
|
989
|
+
-f, --definition-file=<value> Path to a sandbox definition file.
|
|
990
|
+
-i, --poll-interval=<seconds> [default: [object Object]] Number of seconds to wait
|
|
991
|
+
between retries.
|
|
992
|
+
-l, --license-type=(Developer|Developer_Pro|Partial|Full) [default: Developer] Type of sandbox license.
|
|
993
|
+
-n, --name=<value> Name of the sandbox org.
|
|
994
|
+
-o, --target-org=<value> Username or alias of the production org that contains the
|
|
995
|
+
sandbox license.
|
|
996
|
+
-s, --set-default Set the sandbox org as your default org.
|
|
997
|
+
-w, --wait=<minutes> [default: [object Object]] Number of minutes to wait for
|
|
998
|
+
the sandbox org to be ready.
|
|
999
|
+
--async Request the sandbox creation, but don't wait for it to
|
|
1000
|
+
complete.
|
|
1001
|
+
--no-prompt Don't prompt for confirmation about the sandbox
|
|
1002
|
+
configuration.
|
|
1003
|
+
|
|
1004
|
+
GLOBAL FLAGS
|
|
1005
|
+
--json Format output as json.
|
|
1006
|
+
|
|
1007
|
+
DESCRIPTION
|
|
1008
|
+
Create a sandbox org.
|
|
1009
|
+
|
|
1010
|
+
There are two ways to create a sandbox org: specify a definition file that contains the sandbox options or use the
|
|
1011
|
+
--name and --license-type flags to specify the two required options. If you want to set an option other than name or
|
|
1012
|
+
license type, such as apexClassId, you must use a definition file.
|
|
1013
|
+
|
|
1014
|
+
EXAMPLES
|
|
1015
|
+
Create a sandbox org using a definition file and give it the alias "MyDevSandbox". The production org that contains
|
|
1016
|
+
the sandbox license has the alias "prodOrg".
|
|
1017
|
+
|
|
1018
|
+
$ sf env create sandbox -f config/dev-sandbox-def.json --alias MyDevSandbox --target-org prodOrg
|
|
1019
|
+
|
|
1020
|
+
Create a sandbox org by directly specifying its name and type of license (Developer) instead of using a definition
|
|
1021
|
+
file. Set the sandbox org as your default.
|
|
1022
|
+
|
|
1023
|
+
$ sf env create sandbox --name mysandbox --license-type Developer --alias MyDevSandbox --target-org prodOrg \
|
|
1024
|
+
--set-default
|
|
1025
|
+
|
|
1026
|
+
FLAG DESCRIPTIONS
|
|
1027
|
+
-a, --alias=<value> Alias for the sandbox org.
|
|
1028
|
+
|
|
1029
|
+
When you create a sandbox, the generated usernames are based on the usernames present in the production org. To
|
|
1030
|
+
ensure uniqueness, the new usernames are appended with the name of the sandbox. For example, the username
|
|
1031
|
+
"user@example.com" in the production org results in the username "user@example.com.mysandbox" in a sandbox named
|
|
1032
|
+
"mysandbox". When you set an alias for a sandbox org, it's assigned to the resulting username of the user running
|
|
1033
|
+
this command.
|
|
1034
|
+
|
|
1035
|
+
-c, --clone=<value> Name of the sandbox org to clone.
|
|
1036
|
+
|
|
1037
|
+
The value of clone must be an existing sandbox in the same target-org.
|
|
1038
|
+
|
|
1039
|
+
-f, --definition-file=<value> Path to a sandbox definition file.
|
|
1040
|
+
|
|
1041
|
+
The sandbox definition file is a blueprint for the sandbox. You can create different definition files for each
|
|
1042
|
+
sandbox type that you use in the development process. See
|
|
1043
|
+
https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_sandbox_definition.htm for all the
|
|
1044
|
+
options you can specify in the defintion file.
|
|
1045
|
+
|
|
1046
|
+
-n, --name=<value> Name of the sandbox org.
|
|
1047
|
+
|
|
1048
|
+
The name must be a unique alphanumeric string (10 or fewer characters) to identify the sandbox. You can’t reuse a
|
|
1049
|
+
name while a sandbox is in the process of being deleted.
|
|
1050
|
+
|
|
1051
|
+
-o, --target-org=<value> Username or alias of the production org that contains the sandbox license.
|
|
1052
|
+
|
|
1053
|
+
When it creates the sandbox org, Salesforce copies the metadata, and optionally data, from your production org to
|
|
1054
|
+
the new sandbox org.
|
|
1055
|
+
|
|
1056
|
+
-w, --wait=<minutes> Number of minutes to wait for the sandbox org to be ready.
|
|
1057
|
+
|
|
1058
|
+
If the command continues to run after the wait period, the CLI returns control of the terminal to you and displays
|
|
1059
|
+
the "sf env resume sandbox" command you run to check the status of the create. The displayed command includes the
|
|
1060
|
+
job ID for the running sandbox creation.
|
|
1061
|
+
|
|
1062
|
+
--async Request the sandbox creation, but don't wait for it to complete.
|
|
1063
|
+
|
|
1064
|
+
The command immediately displays the job ID and returns control of the terminal to you. This way, you can continue
|
|
1065
|
+
to use the CLI. To check the status of the sandbox creation, run "sf env resume sandbox".
|
|
1066
|
+
```
|
|
1067
|
+
|
|
1068
|
+
## `sf env create scratch`
|
|
1069
|
+
|
|
1070
|
+
Create a scratch org.
|
|
1071
|
+
|
|
1072
|
+
```
|
|
1073
|
+
USAGE
|
|
1074
|
+
$ sf env create scratch [--json] [-a <value>] [--async] [-d] [-f <value>] [-v <value>] [-c] [-e
|
|
1075
|
+
developer|enterprise|group|professional|partner-developer|partner-enterprise|partner-group|partner-professional]
|
|
1076
|
+
[-m] [-y <value>] [-w <value>] [--api-version <value>] [-i <value>]
|
|
1077
|
+
|
|
1078
|
+
FLAGS
|
|
1079
|
+
-a, --alias=<value> Alias for the scratch org.
|
|
1080
|
+
-d, --set-default Set the scratch org as your default org
|
|
1081
|
+
-e, --edition=<option> Salesforce edition of the scratch org.
|
|
1082
|
+
<options: developer|enterprise|group|professional|partner-developer|partner-enterprise|
|
|
1083
|
+
partner-group|partner-professional>
|
|
1084
|
+
-f, --definition-file=<value> Path to a scratch org definition file.
|
|
1085
|
+
-i, --client-id=<value> Consumer key of the Dev Hub connected app.
|
|
1086
|
+
-v, --target-dev-hub=<value> Username or alias of the Dev Hub org.
|
|
1087
|
+
-w, --wait=<minutes> [default: [object Object]] Number of minutes to wait for the scratch org to be ready.
|
|
1088
|
+
-y, --duration-days=<days> [default: [object Object]] Number of days before the org expires.
|
|
1089
|
+
--api-version=<value> Override the api version used for api requests made by this command
|
|
1090
|
+
--async Request the org, but don't wait for it to complete.
|
|
1091
|
+
|
|
1092
|
+
PACKAGING FLAGS
|
|
1093
|
+
-c, --no-ancestors Don't include second-generation managed package (2GP) ancestors in the scratch org.
|
|
1094
|
+
-m, --no-namespace Create the scratch org with no namespace, even if the Dev Hub has a namespace.
|
|
1095
|
+
|
|
1096
|
+
GLOBAL FLAGS
|
|
1097
|
+
--json Format output as json.
|
|
1098
|
+
|
|
1099
|
+
DESCRIPTION
|
|
1100
|
+
Create a scratch org.
|
|
1101
|
+
|
|
1102
|
+
There are two ways to create a scratch org: specify a definition file that contains the options or use the --edition
|
|
1103
|
+
flag to specify the one required option. If you want to set options other than the edition, such as org features or
|
|
1104
|
+
settings, you must use a definition file.
|
|
1105
|
+
|
|
1106
|
+
You must specify a Dev Hub to create a scratch org, either with the --target-dev-hub flag or by setting your default
|
|
1107
|
+
Dev Hub with the target-dev-hub configuration variable.
|
|
1108
|
+
|
|
1109
|
+
EXAMPLES
|
|
1110
|
+
Create a Developer edition scratch org using your default Dev Hub and give the scratch org an alias:
|
|
1111
|
+
|
|
1112
|
+
$ sf env create scratch --edition=developer --alias my-scratch-org
|
|
1113
|
+
|
|
1114
|
+
Specify the Dev Hub using its alias and a scratch org definition file. Set the scratch org as your default and
|
|
1115
|
+
specify that it expires in 3 days:
|
|
1116
|
+
|
|
1117
|
+
$ sf env create scratch --target-dev-hub=MyHub --definition-file config/project-scratch-def.json --set-default \
|
|
1118
|
+
--duration-days 3
|
|
1119
|
+
|
|
1120
|
+
FLAG DESCRIPTIONS
|
|
1121
|
+
-a, --alias=<value> Alias for the scratch org.
|
|
1122
|
+
|
|
1123
|
+
New scratch orgs include one administrator by default. The admin user's username is auto-generated and looks
|
|
1124
|
+
something like test-wvkpnfm5z113@example.com. When you set an alias for a new scratch org, it's assigned this
|
|
1125
|
+
username.
|
|
1126
|
+
|
|
1127
|
+
-e, --edition=developer|enterprise|group|professional|partner-developer|partner-enterprise|partner-group|partner-professional
|
|
1128
|
+
|
|
1129
|
+
Salesforce edition of the scratch org.
|
|
1130
|
+
|
|
1131
|
+
The editions that begin with "partner-" are available only if the Dev Hub org is a Partner Business Org.
|
|
1132
|
+
|
|
1133
|
+
-f, --definition-file=<value> Path to a scratch org definition file.
|
|
1134
|
+
|
|
1135
|
+
The scratch org definition file is a blueprint for the scratch org. It mimics the shape of an org that you use in
|
|
1136
|
+
the development life cycle, such as acceptance testing, packaging, or production. See
|
|
1137
|
+
<https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_scratch_orgs_def_file.htm> for
|
|
1138
|
+
all the option you can specify in the definition file.
|
|
1139
|
+
|
|
1140
|
+
-v, --target-dev-hub=<value> Username or alias of the Dev Hub org.
|
|
1141
|
+
|
|
1142
|
+
Overrides the value of the target-dev-hub configuration variable, if set.
|
|
1143
|
+
|
|
1144
|
+
-w, --wait=<minutes> Number of minutes to wait for the scratch org to be ready.
|
|
1145
|
+
|
|
1146
|
+
If the command continues to run after the wait period, the CLI returns control of the terminal to you and displays
|
|
1147
|
+
the job ID. To resume the scratch org creation, run the env resume scratch command and pass it the job ID.
|
|
1148
|
+
|
|
1149
|
+
--async Request the org, but don't wait for it to complete.
|
|
1150
|
+
|
|
1151
|
+
The command immediately displays the job ID and returns control of the terminal to you. This way, you can continue
|
|
1152
|
+
to use the CLI. To resume the scratch org creation, run "sf env resume scratch".
|
|
1153
|
+
```
|
|
1154
|
+
|
|
547
1155
|
## `sf env delete`
|
|
548
1156
|
|
|
549
1157
|
Delete an environment.
|
|
@@ -575,6 +1183,77 @@ EXAMPLES
|
|
|
575
1183
|
$ sf env delete --target-compute environment-alias --confirm environment-alias
|
|
576
1184
|
```
|
|
577
1185
|
|
|
1186
|
+
## `sf env delete sandbox`
|
|
1187
|
+
|
|
1188
|
+
Delete a sandbox.
|
|
1189
|
+
|
|
1190
|
+
```
|
|
1191
|
+
USAGE
|
|
1192
|
+
$ sf env delete sandbox [--json] [-o <value>] [-p]
|
|
1193
|
+
|
|
1194
|
+
FLAGS
|
|
1195
|
+
-o, --target-org=<value> Sandbox alias or login user.
|
|
1196
|
+
-p, --no-prompt Don't prompt the user to confirm the deletion.
|
|
1197
|
+
|
|
1198
|
+
GLOBAL FLAGS
|
|
1199
|
+
--json Format output as json.
|
|
1200
|
+
|
|
1201
|
+
DESCRIPTION
|
|
1202
|
+
Delete a sandbox.
|
|
1203
|
+
|
|
1204
|
+
Specify a sandbox with either the username you used when you logged into it with "sf login", or the alias you gave the
|
|
1205
|
+
sandbox when you created it. Run "sf env list" to view all your environments, including sandboxes, and their aliases.
|
|
1206
|
+
|
|
1207
|
+
EXAMPLES
|
|
1208
|
+
Delete a sandbox with alias my-sandbox:
|
|
1209
|
+
|
|
1210
|
+
$ sf env delete sandbox --target-org=my-sandbox
|
|
1211
|
+
|
|
1212
|
+
Specify a username instead of an alias:
|
|
1213
|
+
|
|
1214
|
+
$ sf env delete sandbox --target-org=myusername@example.com.qa
|
|
1215
|
+
|
|
1216
|
+
Delete the sandbox without prompting to confirm :
|
|
1217
|
+
|
|
1218
|
+
$ sf env delete sandbox --target-org=my-sandbox --no-prompt
|
|
1219
|
+
```
|
|
1220
|
+
|
|
1221
|
+
## `sf env delete scratch`
|
|
1222
|
+
|
|
1223
|
+
Delete a scratch org.
|
|
1224
|
+
|
|
1225
|
+
```
|
|
1226
|
+
USAGE
|
|
1227
|
+
$ sf env delete scratch [--json] [-o <value>] [-p]
|
|
1228
|
+
|
|
1229
|
+
FLAGS
|
|
1230
|
+
-o, --target-org=<value> Scratch org alias or login user.
|
|
1231
|
+
-p, --no-prompt Don't prompt the user to confirm the deletion.
|
|
1232
|
+
|
|
1233
|
+
GLOBAL FLAGS
|
|
1234
|
+
--json Format output as json.
|
|
1235
|
+
|
|
1236
|
+
DESCRIPTION
|
|
1237
|
+
Delete a scratch org.
|
|
1238
|
+
|
|
1239
|
+
Specify a scratch org with either the username you used when you logged into it with "sf login", or the alias you gave
|
|
1240
|
+
the scratch org when you created it. Run "sf env list" to view all your environments, including scratch orgs, and
|
|
1241
|
+
their aliases.
|
|
1242
|
+
|
|
1243
|
+
EXAMPLES
|
|
1244
|
+
Delete a scratch org with alias my-scratch-org:
|
|
1245
|
+
|
|
1246
|
+
$ sf env delete scratch --target-org=my-scratch-org
|
|
1247
|
+
|
|
1248
|
+
Specify a username instead of an alias:
|
|
1249
|
+
|
|
1250
|
+
$ sf env delete scratch --target-org=test-123456-abcdefg@example.com
|
|
1251
|
+
|
|
1252
|
+
Delete the scratch org without prompting to confirm :
|
|
1253
|
+
|
|
1254
|
+
$ sf env delete scratch --target-org=my-scratch-org --no-prompt
|
|
1255
|
+
```
|
|
1256
|
+
|
|
578
1257
|
## `sf env display`
|
|
579
1258
|
|
|
580
1259
|
Display details about an environment.
|
|
@@ -684,24 +1363,6 @@ EXAMPLES
|
|
|
684
1363
|
$ sf env list --csv --no-header
|
|
685
1364
|
```
|
|
686
1365
|
|
|
687
|
-
## `sf env log`
|
|
688
|
-
|
|
689
|
-
Stream log output for an environment.
|
|
690
|
-
|
|
691
|
-
```
|
|
692
|
-
USAGE
|
|
693
|
-
$ sf env log [-e <value> | ] [-n <value>]
|
|
694
|
-
|
|
695
|
-
FLAGS
|
|
696
|
-
-e, --target-compute=<value> Compute environment name to retrieve logs.
|
|
697
|
-
-n, --num=<value> Number of lines to display.
|
|
698
|
-
|
|
699
|
-
EXAMPLES
|
|
700
|
-
Stream log output:
|
|
701
|
-
|
|
702
|
-
$ sf env log --target-compute environment-alias
|
|
703
|
-
```
|
|
704
|
-
|
|
705
1366
|
## `sf env log tail`
|
|
706
1367
|
|
|
707
1368
|
Stream log output for an environment.
|
|
@@ -845,6 +1506,104 @@ FLAG DESCRIPTIONS
|
|
|
845
1506
|
browser applications differ depending on the operating system you're on; check your documentation for details.
|
|
846
1507
|
```
|
|
847
1508
|
|
|
1509
|
+
## `sf env resume sandbox`
|
|
1510
|
+
|
|
1511
|
+
Check the status of a sandbox creation, and log in to it if it's ready.
|
|
1512
|
+
|
|
1513
|
+
```
|
|
1514
|
+
USAGE
|
|
1515
|
+
$ sf env resume sandbox [--json] [-w <value>] [-n <value> | -i <value>] [-l] [-o <value>]
|
|
1516
|
+
|
|
1517
|
+
FLAGS
|
|
1518
|
+
-i, --job-id=<value> Job ID of the incomplete sandbox creation that you want to check the status of.
|
|
1519
|
+
-l, --use-most-recent Use the most recent sandbox create request.
|
|
1520
|
+
-n, --name=<value> Name of the sandbox org.
|
|
1521
|
+
-o, --target-org=<value> Username or alias of the production org that contains the sandbox license.
|
|
1522
|
+
-w, --wait=<minutes> Number of minutes to wait for the sandbox org to be ready.
|
|
1523
|
+
|
|
1524
|
+
GLOBAL FLAGS
|
|
1525
|
+
--json Format output as json.
|
|
1526
|
+
|
|
1527
|
+
DESCRIPTION
|
|
1528
|
+
Check the status of a sandbox creation, and log in to it if it's ready.
|
|
1529
|
+
|
|
1530
|
+
Sandbox creation can take a long time. If the original "sf env create sandbox" command either times out, or you
|
|
1531
|
+
specified the --async flag, the command displays a job ID. Use this job ID to check whether the sandbox creation is
|
|
1532
|
+
complete, and if it is, the command then logs into it.
|
|
1533
|
+
|
|
1534
|
+
You can also use the sandbox name to check the status or the --use-most-recent flag to use the job ID of the most
|
|
1535
|
+
recent sandbox creation.
|
|
1536
|
+
|
|
1537
|
+
EXAMPLES
|
|
1538
|
+
Check the status of a sandbox creation using its name and specify a production org with alias "prodOrg":
|
|
1539
|
+
|
|
1540
|
+
$ sf env resume sandbox --name mysandbox --target-org prodOrg
|
|
1541
|
+
|
|
1542
|
+
Check the status using the job ID:
|
|
1543
|
+
|
|
1544
|
+
$ sf env resume sandbox --job-id 0GRxxxxxxxx
|
|
1545
|
+
|
|
1546
|
+
Check the status of the most recent sandbox create request:
|
|
1547
|
+
|
|
1548
|
+
$ sf env resume sandbox --use-most-recent
|
|
1549
|
+
|
|
1550
|
+
FLAG DESCRIPTIONS
|
|
1551
|
+
-i, --job-id=<value> Job ID of the incomplete sandbox creation that you want to check the status of.
|
|
1552
|
+
|
|
1553
|
+
The job ID is valid for 24 hours after you start the sandbox creation.
|
|
1554
|
+
|
|
1555
|
+
-o, --target-org=<value> Username or alias of the production org that contains the sandbox license.
|
|
1556
|
+
|
|
1557
|
+
When it creates the sandbox org, Salesforce copies the metadata, and optionally data, from your production org to
|
|
1558
|
+
the new sandbox org.
|
|
1559
|
+
|
|
1560
|
+
-w, --wait=<minutes> Number of minutes to wait for the sandbox org to be ready.
|
|
1561
|
+
|
|
1562
|
+
If the command continues to run after the wait period, the CLI returns control of the terminal window to you and
|
|
1563
|
+
returns the job ID. To resume checking the sandbox creation, rerun this command.
|
|
1564
|
+
```
|
|
1565
|
+
|
|
1566
|
+
## `sf env resume scratch`
|
|
1567
|
+
|
|
1568
|
+
Resume the creation of an incomplete scratch org.
|
|
1569
|
+
|
|
1570
|
+
```
|
|
1571
|
+
USAGE
|
|
1572
|
+
$ sf env resume scratch [--json] [-i <value>] [-r]
|
|
1573
|
+
|
|
1574
|
+
FLAGS
|
|
1575
|
+
-i, --job-id=<value> Job ID of the incomplete scratch org create that you want to resume.
|
|
1576
|
+
-r, --use-most-recent Use the job ID of the most recent incomplete scratch org.
|
|
1577
|
+
|
|
1578
|
+
GLOBAL FLAGS
|
|
1579
|
+
--json Format output as json.
|
|
1580
|
+
|
|
1581
|
+
DESCRIPTION
|
|
1582
|
+
Resume the creation of an incomplete scratch org.
|
|
1583
|
+
|
|
1584
|
+
When the original "sf env create scratch" command either times out or is run with the --async flag, it displays a job
|
|
1585
|
+
ID.
|
|
1586
|
+
|
|
1587
|
+
Run this command by either passing it a job ID or using the --use-most-recent flag to specify the most recent
|
|
1588
|
+
incomplete scratch org.
|
|
1589
|
+
|
|
1590
|
+
EXAMPLES
|
|
1591
|
+
Resume a scratch org create with a job ID:
|
|
1592
|
+
|
|
1593
|
+
$ sf env resume scratch --job-id 2SR3u0000008fBDGAY
|
|
1594
|
+
|
|
1595
|
+
Resume your most recent incomplete scratch org:
|
|
1596
|
+
|
|
1597
|
+
$ sf env resume scratch --use-most-recent
|
|
1598
|
+
|
|
1599
|
+
FLAG DESCRIPTIONS
|
|
1600
|
+
-i, --job-id=<value> Job ID of the incomplete scratch org create that you want to resume.
|
|
1601
|
+
|
|
1602
|
+
The job ID is the same as the record ID of the incomplete scratch org in the ScratchOrgInfo object of the Dev Hub.
|
|
1603
|
+
|
|
1604
|
+
The job ID is valid for 24 hours after you start the scratch org creation.
|
|
1605
|
+
```
|
|
1606
|
+
|
|
848
1607
|
## `sf env var get KEY`
|
|
849
1608
|
|
|
850
1609
|
Display a single config variable for an environment.
|
|
@@ -1784,14 +2543,12 @@ FLAG DESCRIPTIONS
|
|
|
1784
2543
|
If you specify this parameter, don’t specify --metadata or --source-dir.
|
|
1785
2544
|
|
|
1786
2545
|
CONFIGURATION VARIABLES
|
|
1787
|
-
target-org
|
|
1788
|
-
|
|
2546
|
+
target-org Username or alias of the org that all commands run against by default. (sf only)
|
|
2547
|
+
org-api-version API version of your project. Default: API version of your Dev Hub org.
|
|
1789
2548
|
|
|
1790
2549
|
ENVIRONMENT VARIABLES
|
|
1791
|
-
SF_TARGET_ORG
|
|
1792
|
-
|
|
1793
|
-
SFDX_USE_PROGRESS_BAR Set to false to disable the progress bar when running force:mdapi:deploy, force:source:deploy,
|
|
1794
|
-
or force:source:push.
|
|
2550
|
+
SF_TARGET_ORG Username or alias of your default org. Overrides the target-org configuration variable.
|
|
2551
|
+
SF_USE_PROGRESS_BAR Set to false to disable the progress bar when running the metadata deploy command.
|
|
1795
2552
|
```
|
|
1796
2553
|
|
|
1797
2554
|
## `sf run function`
|