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