@salesforce/plugin-org 3.0.4 → 3.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -107,7 +107,9 @@ the [SandboxNuts](https://github.com/salesforcecli/plugin-org/actions/workflows/
107
107
  - [`sf org create scratch`](#sf-org-create-scratch)
108
108
  - [`sf org delete sandbox`](#sf-org-delete-sandbox)
109
109
  - [`sf org delete scratch`](#sf-org-delete-scratch)
110
+ - [`sf org disable tracking`](#sf-org-disable-tracking)
110
111
  - [`sf org display`](#sf-org-display)
112
+ - [`sf org enable tracking`](#sf-org-enable-tracking)
111
113
  - [`sf org list`](#sf-org-list)
112
114
  - [`sf org list metadata`](#sf-org-list-metadata)
113
115
  - [`sf org list metadata-types`](#sf-org-list-metadata-types)
@@ -132,7 +134,7 @@ FLAGS
132
134
  -t, --type=<option> (required) Type of org to create.
133
135
  <options: sandbox>
134
136
  -w, --wait=<value> [default: 6 minutes] Number of minutes to wait while polling for status.
135
- --api-version=<value> Override the api version used for api requests made by this command
137
+ --api-version=<value> Override the api version used for api requests made by this command
136
138
 
137
139
  GLOBAL FLAGS
138
140
  --json Format output as json.
@@ -160,7 +162,7 @@ FLAG DESCRIPTIONS
160
162
  for a number of minutes, the client exits. Specify a longer wait time if timeouts occur frequently.
161
163
  ```
162
164
 
163
- _See code: [src/commands/force/org/clone.ts](https://github.com/salesforcecli/plugin-org/blob/3.0.4/src/commands/force/org/clone.ts)_
165
+ _See code: [src/commands/force/org/clone.ts](https://github.com/salesforcecli/plugin-org/blob/3.0.6/src/commands/force/org/clone.ts)_
164
166
 
165
167
  ## `sf force org create`
166
168
 
@@ -184,7 +186,7 @@ FLAGS
184
186
  <options: scratch|sandbox>
185
187
  -v, --target-dev-hub=<value> Username or alias of the Dev Hub org.
186
188
  -w, --wait=<value> [default: 6 minutes] Streaming client socket timeout (in minutes).
187
- --api-version=<value> Override the api version used for api requests made by this command
189
+ --api-version=<value> Override the api version used for api requests made by this command
188
190
 
189
191
  GLOBAL FLAGS
190
192
  --json Format output as json.
@@ -208,7 +210,7 @@ EXAMPLES
208
210
  $ sf force org create -t sandbox -f config/dev-sandbox-def.json -a MyDevSandbox -u prodOrg
209
211
  ```
210
212
 
211
- _See code: [src/commands/force/org/create.ts](https://github.com/salesforcecli/plugin-org/blob/3.0.4/src/commands/force/org/create.ts)_
213
+ _See code: [src/commands/force/org/create.ts](https://github.com/salesforcecli/plugin-org/blob/3.0.6/src/commands/force/org/create.ts)_
212
214
 
213
215
  ## `sf force org delete`
214
216
 
@@ -219,9 +221,9 @@ USAGE
219
221
  $ sf force org delete -o <value> [--json] [--api-version <value>] [-p]
220
222
 
221
223
  FLAGS
222
- -o, --target-org=<value> (required) Username or alias of the target org.
223
- -p, --no-prompt No prompt to confirm deletion.
224
- --api-version=<value> Override the api version used for api requests made by this command
224
+ -o, --target-org=<value> (required) Username or alias of the target org.
225
+ -p, --no-prompt No prompt to confirm deletion.
226
+ --api-version=<value> Override the api version used for api requests made by this command
225
227
 
226
228
  GLOBAL FLAGS
227
229
  --json Format output as json.
@@ -240,7 +242,7 @@ EXAMPLES
240
242
  $ sf force org delete -u MyOrgAlias -p
241
243
  ```
242
244
 
243
- _See code: [src/commands/force/org/delete.ts](https://github.com/salesforcecli/plugin-org/blob/3.0.4/src/commands/force/org/delete.ts)_
245
+ _See code: [src/commands/force/org/delete.ts](https://github.com/salesforcecli/plugin-org/blob/3.0.6/src/commands/force/org/delete.ts)_
244
246
 
245
247
  ## `sf force org status`
246
248
 
@@ -256,7 +258,7 @@ FLAGS
256
258
  -o, --target-org=<value> (required) Username or alias of the target org.
257
259
  -s, --setdefaultusername Set the created or cloned org as your default.
258
260
  -w, --wait=<value> [default: 6 minutes] Number of minutes to wait while polling for status.
259
- --api-version=<value> Override the api version used for api requests made by this command
261
+ --api-version=<value> Override the api version used for api requests made by this command
260
262
 
261
263
  GLOBAL FLAGS
262
264
  --json Format output as json.
@@ -278,7 +280,7 @@ EXAMPLES
278
280
  $ sf force org status --sandboxname DevSbx1 --wait 45 --setdefaultusername -u prodOrg
279
281
  ```
280
282
 
281
- _See code: [src/commands/force/org/status.ts](https://github.com/salesforcecli/plugin-org/blob/3.0.4/src/commands/force/org/status.ts)_
283
+ _See code: [src/commands/force/org/status.ts](https://github.com/salesforcecli/plugin-org/blob/3.0.6/src/commands/force/org/status.ts)_
282
284
 
283
285
  ## `sf org create sandbox`
284
286
 
@@ -300,9 +302,9 @@ FLAGS
300
302
  -o, --target-org=<value> (required) Username or alias of the production org that contains the sandbox license.
301
303
  -s, --set-default Set the sandbox org as your default org.
302
304
  -w, --wait=<minutes> [default: 30 minutes] Number of minutes to wait for the sandbox org to be ready.
303
- --async Request the sandbox creation, but don't wait for it to complete.
304
- --no-prompt Don't prompt for confirmation about the sandbox configuration.
305
- --no-track-source Do not use source tracking for this sandbox.
305
+ --async Request the sandbox creation, but don't wait for it to complete.
306
+ --no-prompt Don't prompt for confirmation about the sandbox configuration.
307
+ --no-track-source Do not use source tracking for this sandbox.
306
308
 
307
309
  GLOBAL FLAGS
308
310
  --json Format output as json.
@@ -383,7 +385,7 @@ FLAG DESCRIPTIONS
383
385
  sandbox.
384
386
  ```
385
387
 
386
- _See code: [src/commands/org/create/sandbox.ts](https://github.com/salesforcecli/plugin-org/blob/3.0.4/src/commands/org/create/sandbox.ts)_
388
+ _See code: [src/commands/org/create/sandbox.ts](https://github.com/salesforcecli/plugin-org/blob/3.0.6/src/commands/org/create/sandbox.ts)_
387
389
 
388
390
  ## `sf org create scratch`
389
391
 
@@ -406,30 +408,30 @@ FLAGS
406
408
  -v, --target-dev-hub=<value> (required) Username or alias of the Dev Hub org.
407
409
  -w, --wait=<minutes> [default: 5 minutes] Number of minutes to wait for the scratch org to be ready.
408
410
  -y, --duration-days=<days> [default: 7 days] Number of days before the org expires.
409
- --api-version=<value> Override the api version used for api requests made by this command
410
- --async Request the org, but don't wait for it to complete.
411
+ --api-version=<value> Override the api version used for api requests made by this command
412
+ --async Request the org, but don't wait for it to complete.
411
413
 
412
414
  PACKAGING FLAGS
413
415
  -c, --no-ancestors Don't include second-generation managed package (2GP) ancestors in the scratch org.
414
416
  -m, --no-namespace Create the scratch org with no namespace, even if the Dev Hub has a namespace.
415
417
 
416
418
  DEFINITION FILE OVERRIDE FLAGS
417
- -e, --edition=<option> Salesforce edition of the scratch org. Overrides the value of the "edition" option in the
418
- definition file, if set.
419
- <options: developer|enterprise|group|professional|partner-developer|partner-enterprise|partner
420
- -group|partner-professional>
421
- --admin-email=<value> Email address that will be applied to the org's admin user. Overrides the value of the
422
- "adminEmail" option in the definition file, if set.
423
- --description=<value> Description of the scratch org in the Dev Hub. Overrides the value of the "description" option
424
- in the definition file, if set.
425
- --name=<value> Name of the org, such as "Acme Company". Overrides the value of the "orgName" option in the
426
- definition file, if set.
427
- --release=<option> Release of the scratch org as compared to the Dev Hub release.
428
- <options: preview|previous>
429
- --source-org=<value> 15-character ID of the org whose shape the new scratch org will be based on. Overrides the
430
- value of the "sourceOrg" option in the definition file, if set.
431
- --username=<value> Username of the scratch org admin user. Overrides the value of the "username" option in the
432
- definition file, if set.
419
+ -e, --edition=<option> Salesforce edition of the scratch org. Overrides the value of the "edition" option in the
420
+ definition file, if set.
421
+ <options: developer|enterprise|group|professional|partner-developer|partner-enterprise|part
422
+ ner-group|partner-professional>
423
+ --admin-email=<value> Email address that will be applied to the org's admin user. Overrides the value of the
424
+ "adminEmail" option in the definition file, if set.
425
+ --description=<value> Description of the scratch org in the Dev Hub. Overrides the value of the "description"
426
+ option in the definition file, if set.
427
+ --name=<value> Name of the org, such as "Acme Company". Overrides the value of the "orgName" option in the
428
+ definition file, if set.
429
+ --release=<option> Release of the scratch org as compared to the Dev Hub release.
430
+ <options: preview|previous>
431
+ --source-org=<value> 15-character ID of the org whose shape the new scratch org will be based on. Overrides the
432
+ value of the "sourceOrg" option in the definition file, if set.
433
+ --username=<value> Username of the scratch org admin user. Overrides the value of the "username" option in the
434
+ definition file, if set.
433
435
 
434
436
  GLOBAL FLAGS
435
437
  --json Format output as json.
@@ -536,7 +538,7 @@ FLAG DESCRIPTIONS
536
538
  Omit this flag to have Salesforce generate a unique username for your org.
537
539
  ```
538
540
 
539
- _See code: [src/commands/org/create/scratch.ts](https://github.com/salesforcecli/plugin-org/blob/3.0.4/src/commands/org/create/scratch.ts)_
541
+ _See code: [src/commands/org/create/scratch.ts](https://github.com/salesforcecli/plugin-org/blob/3.0.6/src/commands/org/create/scratch.ts)_
540
542
 
541
543
  ## `sf org delete sandbox`
542
544
 
@@ -580,7 +582,7 @@ EXAMPLES
580
582
  $ sf org delete sandbox --target-org my-sandbox --no-prompt
581
583
  ```
582
584
 
583
- _See code: [src/commands/org/delete/sandbox.ts](https://github.com/salesforcecli/plugin-org/blob/3.0.4/src/commands/org/delete/sandbox.ts)_
585
+ _See code: [src/commands/org/delete/sandbox.ts](https://github.com/salesforcecli/plugin-org/blob/3.0.6/src/commands/org/delete/sandbox.ts)_
584
586
 
585
587
  ## `sf org delete scratch`
586
588
 
@@ -622,7 +624,38 @@ EXAMPLES
622
624
  $ sf org delete scratch --target-org my-scratch-org --no-prompt
623
625
  ```
624
626
 
625
- _See code: [src/commands/org/delete/scratch.ts](https://github.com/salesforcecli/plugin-org/blob/3.0.4/src/commands/org/delete/scratch.ts)_
627
+ _See code: [src/commands/org/delete/scratch.ts](https://github.com/salesforcecli/plugin-org/blob/3.0.6/src/commands/org/delete/scratch.ts)_
628
+
629
+ ## `sf org disable tracking`
630
+
631
+ Disable source tracking in local auth file.
632
+
633
+ ```
634
+ USAGE
635
+ $ sf org disable tracking -o <value> [--json]
636
+
637
+ FLAGS
638
+ -o, --target-org=<value> (required) Username or alias of the target org.
639
+
640
+ GLOBAL FLAGS
641
+ --json Format output as json.
642
+
643
+ DESCRIPTION
644
+ Disable source tracking in local auth file.
645
+
646
+ This has no effect on the org. It stores the setting in the CLI's configuration file for this org so that no source
647
+ tracking operations are executed when working with this org.
648
+
649
+ EXAMPLES
650
+ Disable tracking on an org using an alias
651
+ - sf org disable tracking -o someAlias
652
+ Disable tracking on an org using a username
653
+ - sf org disable tracking -o you@example.com
654
+ Disable tracking on your default org
655
+ - sf org disable tracking
656
+ ```
657
+
658
+ _See code: [src/commands/org/disable/tracking.ts](https://github.com/salesforcecli/plugin-org/blob/3.0.6/src/commands/org/disable/tracking.ts)_
626
659
 
627
660
  ## `sf org display`
628
661
 
@@ -633,9 +666,9 @@ USAGE
633
666
  $ sf org display -o <value> [--json] [--api-version <value>] [--verbose]
634
667
 
635
668
  FLAGS
636
- -o, --target-org=<value> (required) Username or alias of the target org.
637
- --api-version=<value> Override the api version used for api requests made by this command
638
- --verbose Display the sfdxAuthUrl property.
669
+ -o, --target-org=<value> (required) Username or alias of the target org.
670
+ --api-version=<value> Override the api version used for api requests made by this command
671
+ --verbose Display the sfdxAuthUrl property.
639
672
 
640
673
  GLOBAL FLAGS
641
674
  --json Format output as json.
@@ -665,7 +698,40 @@ EXAMPLES
665
698
  $ sf org display --target-org TestOrg1 --verbose
666
699
  ```
667
700
 
668
- _See code: [src/commands/org/display.ts](https://github.com/salesforcecli/plugin-org/blob/3.0.4/src/commands/org/display.ts)_
701
+ _See code: [src/commands/org/display.ts](https://github.com/salesforcecli/plugin-org/blob/3.0.6/src/commands/org/display.ts)_
702
+
703
+ ## `sf org enable tracking`
704
+
705
+ Enable source tracking in local auth file.
706
+
707
+ ```
708
+ USAGE
709
+ $ sf org enable tracking -o <value> [--json]
710
+
711
+ FLAGS
712
+ -o, --target-org=<value> (required) Username or alias of the target org.
713
+
714
+ GLOBAL FLAGS
715
+ --json Format output as json.
716
+
717
+ DESCRIPTION
718
+ Enable source tracking in local auth file.
719
+
720
+ This has no effect on the org. It stores the setting in the CLI's configuration file for this org so that source
721
+ tracking operations are executed when working with this org.
722
+
723
+ This command will throw an error if the org does not support tracking.
724
+
725
+ EXAMPLES
726
+ Enable tracking on an org using an alias
727
+ - sf org enable tracking -o someAlias
728
+ Enable tracking on an org using a username
729
+ - sf org enable tracking -o you@example.com
730
+ Enable tracking on your default org
731
+ - sf org enable tracking
732
+ ```
733
+
734
+ _See code: [src/commands/org/enable/tracking.ts](https://github.com/salesforcecli/plugin-org/blob/3.0.6/src/commands/org/enable/tracking.ts)_
669
735
 
670
736
  ## `sf org list`
671
737
 
@@ -676,12 +742,12 @@ USAGE
676
742
  $ sf org list [--json] [--verbose] [--all] [-p --clean] [--skip-connection-status]
677
743
 
678
744
  FLAGS
679
- -p, --no-prompt Don't prompt for confirmation.
680
- --all Include expired, deleted, and unknown-status scratch orgs.
681
- --clean Remove all local org authorizations for non-active scratch orgs. Use "org logout" to remove
682
- non-scratch orgs.
683
- --skip-connection-status Skip retrieving the connection status of non-scratch orgs.
684
- --verbose List more information about each org.
745
+ -p, --no-prompt Don't prompt for confirmation.
746
+ --all Include expired, deleted, and unknown-status scratch orgs.
747
+ --clean Remove all local org authorizations for non-active scratch orgs. Use "org logout" to
748
+ remove non-scratch orgs.
749
+ --skip-connection-status Skip retrieving the connection status of non-scratch orgs.
750
+ --verbose List more information about each org.
685
751
 
686
752
  GLOBAL FLAGS
687
753
  --json Format output as json.
@@ -703,7 +769,7 @@ EXAMPLES
703
769
  $ sf org list --clean
704
770
  ```
705
771
 
706
- _See code: [src/commands/org/list.ts](https://github.com/salesforcecli/plugin-org/blob/3.0.4/src/commands/org/list.ts)_
772
+ _See code: [src/commands/org/list.ts](https://github.com/salesforcecli/plugin-org/blob/3.0.6/src/commands/org/list.ts)_
707
773
 
708
774
  ## `sf org list metadata`
709
775
 
@@ -718,8 +784,8 @@ FLAGS
718
784
  -m, --metadata-type=<value> (required) Metadata type to be retrieved, such as CustomObject; metadata type names are
719
785
  case-sensitive.
720
786
  -o, --target-org=<value> (required) Username or alias of the target org.
721
- --api-version=<value> API version to use; default is the most recent API version.
722
- --folder=<value> Folder associated with the component; required for components that use folders; folder
787
+ --api-version=<value> API version to use; default is the most recent API version.
788
+ --folder=<value> Folder associated with the component; required for components that use folders; folder
723
789
  names are case-sensitive.
724
790
 
725
791
  GLOBAL FLAGS
@@ -767,7 +833,7 @@ FLAG DESCRIPTIONS
767
833
  Examples of metadata types that use folders are Dashboard, Document, EmailTemplate, and Report.
768
834
  ```
769
835
 
770
- _See code: [src/commands/org/list/metadata.ts](https://github.com/salesforcecli/plugin-org/blob/3.0.4/src/commands/org/list/metadata.ts)_
836
+ _See code: [src/commands/org/list/metadata.ts](https://github.com/salesforcecli/plugin-org/blob/3.0.6/src/commands/org/list/metadata.ts)_
771
837
 
772
838
  ## `sf org list metadata-types`
773
839
 
@@ -780,7 +846,7 @@ USAGE
780
846
  FLAGS
781
847
  -f, --output-file=<value> Pathname of the file in which to write the results.
782
848
  -o, --target-org=<value> (required) Username or alias of the target org.
783
- --api-version=<value> API version to use; default is the most recent API version.
849
+ --api-version=<value> API version to use; default is the most recent API version.
784
850
 
785
851
  GLOBAL FLAGS
786
852
  --json Format output as json.
@@ -820,7 +886,7 @@ FLAG DESCRIPTIONS
820
886
  Override the api version used for api requests made by this command
821
887
  ```
822
888
 
823
- _See code: [src/commands/org/list/metadata-types.ts](https://github.com/salesforcecli/plugin-org/blob/3.0.4/src/commands/org/list/metadata-types.ts)_
889
+ _See code: [src/commands/org/list/metadata-types.ts](https://github.com/salesforcecli/plugin-org/blob/3.0.6/src/commands/org/list/metadata-types.ts)_
824
890
 
825
891
  ## `sf org open`
826
892
 
@@ -838,7 +904,7 @@ FLAGS
838
904
  -o, --target-org=<value> (required) Username or alias of the target org.
839
905
  -p, --path=<value> Navigation URL path to open a specific page.
840
906
  -r, --url-only Display navigation URL, but don’t launch browser.
841
- --api-version=<value> Override the api version used for api requests made by this command
907
+ --api-version=<value> Override the api version used for api requests made by this command
842
908
 
843
909
  GLOBAL FLAGS
844
910
  --json Format output as json.
@@ -885,7 +951,7 @@ EXAMPLES
885
951
  $ sf org open --source-file force-app/main/default/flows/Hello.flow-meta.xml
886
952
  ```
887
953
 
888
- _See code: [src/commands/org/open.ts](https://github.com/salesforcecli/plugin-org/blob/3.0.4/src/commands/org/open.ts)_
954
+ _See code: [src/commands/org/open.ts](https://github.com/salesforcecli/plugin-org/blob/3.0.6/src/commands/org/open.ts)_
889
955
 
890
956
  ## `sf org resume sandbox`
891
957
 
@@ -947,7 +1013,7 @@ FLAG DESCRIPTIONS
947
1013
  returns the job ID. To resume checking the sandbox creation, rerun this command.
948
1014
  ```
949
1015
 
950
- _See code: [src/commands/org/resume/sandbox.ts](https://github.com/salesforcecli/plugin-org/blob/3.0.4/src/commands/org/resume/sandbox.ts)_
1016
+ _See code: [src/commands/org/resume/sandbox.ts](https://github.com/salesforcecli/plugin-org/blob/3.0.6/src/commands/org/resume/sandbox.ts)_
951
1017
 
952
1018
  ## `sf org resume scratch`
953
1019
 
@@ -993,6 +1059,6 @@ FLAG DESCRIPTIONS
993
1059
  The job ID is valid for 24 hours after you start the scratch org creation.
994
1060
  ```
995
1061
 
996
- _See code: [src/commands/org/resume/scratch.ts](https://github.com/salesforcecli/plugin-org/blob/3.0.4/src/commands/org/resume/scratch.ts)_
1062
+ _See code: [src/commands/org/resume/scratch.ts](https://github.com/salesforcecli/plugin-org/blob/3.0.6/src/commands/org/resume/scratch.ts)_
997
1063
 
998
1064
  <!-- commandsstop -->
@@ -0,0 +1,14 @@
1
+ import { SfCommand } from '@salesforce/sf-plugins-core';
2
+ export type OrgDisableTrackingResult = {
3
+ tracksSource: boolean;
4
+ username: string;
5
+ };
6
+ export default class OrgDisableTracking extends SfCommand<OrgDisableTrackingResult> {
7
+ static readonly summary: string;
8
+ static readonly description: string;
9
+ static readonly examples: string[];
10
+ static readonly flags: {
11
+ 'target-org': import("@oclif/core/lib/interfaces/parser.js").OptionFlag<import("@salesforce/core").Org, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
12
+ };
13
+ run(): Promise<OrgDisableTrackingResult>;
14
+ }
@@ -0,0 +1,30 @@
1
+ /*
2
+ * Copyright (c) 2023, salesforce.com, inc.
3
+ * All rights reserved.
4
+ * Licensed under the BSD 3-Clause license.
5
+ * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
6
+ */
7
+ import { dirname } from 'node:path';
8
+ import { fileURLToPath } from 'node:url';
9
+ import { SfCommand, Flags } from '@salesforce/sf-plugins-core';
10
+ import { Messages } from '@salesforce/core';
11
+ Messages.importMessagesDirectory(dirname(fileURLToPath(import.meta.url)));
12
+ const messages = Messages.loadMessages('@salesforce/plugin-org', 'org.disable.tracking');
13
+ export default class OrgDisableTracking extends SfCommand {
14
+ static summary = messages.getMessage('summary');
15
+ static description = messages.getMessage('description');
16
+ static examples = messages.getMessages('examples');
17
+ static flags = {
18
+ 'target-org': Flags.requiredOrg(),
19
+ };
20
+ async run() {
21
+ const { flags } = await this.parse(OrgDisableTracking);
22
+ await flags['target-org'].setTracksSource(false);
23
+ this.logSuccess(messages.getMessage('success', [flags['target-org'].getUsername()]));
24
+ return {
25
+ tracksSource: await flags['target-org'].tracksSource(),
26
+ username: flags['target-org'].getUsername(),
27
+ };
28
+ }
29
+ }
30
+ //# sourceMappingURL=tracking.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tracking.js","sourceRoot":"","sources":["../../../../src/commands/org/disable/tracking.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE5C,QAAQ,CAAC,uBAAuB,CAAC,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AAC1E,MAAM,QAAQ,GAAG,QAAQ,CAAC,YAAY,CAAC,wBAAwB,EAAE,sBAAsB,CAAC,CAAC;AAOzF,MAAM,CAAC,OAAO,OAAO,kBAAmB,SAAQ,SAAmC;IAC1E,MAAM,CAAU,OAAO,GAAG,QAAQ,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;IACzD,MAAM,CAAU,WAAW,GAAG,QAAQ,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;IACjE,MAAM,CAAU,QAAQ,GAAG,QAAQ,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;IAE5D,MAAM,CAAU,KAAK,GAAG;QAC7B,YAAY,EAAE,KAAK,CAAC,WAAW,EAAE;KAClC,CAAC;IAEK,KAAK,CAAC,GAAG;QACd,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAC;QACvD,MAAM,KAAK,CAAC,YAAY,CAAC,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC;QACjD,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,UAAU,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,CAAC;QACrF,OAAO;YACL,YAAY,EAAE,MAAM,KAAK,CAAC,YAAY,CAAC,CAAC,YAAY,EAAE;YACtD,QAAQ,EAAE,KAAK,CAAC,YAAY,CAAC,CAAC,WAAW,EAAY;SACtD,CAAC;IACJ,CAAC"}
@@ -0,0 +1,14 @@
1
+ import { SfCommand } from '@salesforce/sf-plugins-core';
2
+ export type OrgEnableTrackingResult = {
3
+ tracksSource: boolean;
4
+ username: string;
5
+ };
6
+ export default class OrgEnableTracking extends SfCommand<OrgEnableTrackingResult> {
7
+ static readonly summary: string;
8
+ static readonly description: string;
9
+ static readonly examples: string[];
10
+ static readonly flags: {
11
+ 'target-org': import("@oclif/core/lib/interfaces/parser.js").OptionFlag<import("@salesforce/core").Org, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
12
+ };
13
+ run(): Promise<OrgEnableTrackingResult>;
14
+ }
@@ -0,0 +1,34 @@
1
+ /*
2
+ * Copyright (c) 2023, salesforce.com, inc.
3
+ * All rights reserved.
4
+ * Licensed under the BSD 3-Clause license.
5
+ * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
6
+ */
7
+ import { dirname } from 'node:path';
8
+ import { fileURLToPath } from 'node:url';
9
+ import { SfCommand, Flags } from '@salesforce/sf-plugins-core';
10
+ import { Messages } from '@salesforce/core';
11
+ Messages.importMessagesDirectory(dirname(fileURLToPath(import.meta.url)));
12
+ const messages = Messages.loadMessages('@salesforce/plugin-org', 'org.enable.tracking');
13
+ export default class OrgEnableTracking extends SfCommand {
14
+ static summary = messages.getMessage('summary');
15
+ static description = messages.getMessage('description');
16
+ static examples = messages.getMessages('examples');
17
+ static flags = {
18
+ 'target-org': Flags.requiredOrg(),
19
+ };
20
+ async run() {
21
+ const { flags } = await this.parse(OrgEnableTracking);
22
+ // can this org do tracking?
23
+ if (!(await flags['target-org'].supportsSourceTracking())) {
24
+ throw messages.createError('error.TrackingNotAvailable');
25
+ }
26
+ await flags['target-org'].setTracksSource(true);
27
+ this.logSuccess(messages.getMessage('success', [flags['target-org'].getUsername()]));
28
+ return {
29
+ tracksSource: await flags['target-org'].tracksSource(),
30
+ username: flags['target-org'].getUsername(),
31
+ };
32
+ }
33
+ }
34
+ //# sourceMappingURL=tracking.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tracking.js","sourceRoot":"","sources":["../../../../src/commands/org/enable/tracking.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE5C,QAAQ,CAAC,uBAAuB,CAAC,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AAC1E,MAAM,QAAQ,GAAG,QAAQ,CAAC,YAAY,CAAC,wBAAwB,EAAE,qBAAqB,CAAC,CAAC;AAOxF,MAAM,CAAC,OAAO,OAAO,iBAAkB,SAAQ,SAAkC;IACxE,MAAM,CAAU,OAAO,GAAG,QAAQ,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;IACzD,MAAM,CAAU,WAAW,GAAG,QAAQ,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;IACjE,MAAM,CAAU,QAAQ,GAAG,QAAQ,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;IAE5D,MAAM,CAAU,KAAK,GAAG;QAC7B,YAAY,EAAE,KAAK,CAAC,WAAW,EAAE;KAClC,CAAC;IAEK,KAAK,CAAC,GAAG;QACd,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC;QAEtD,4BAA4B;QAC5B,IAAI,CAAC,CAAC,MAAM,KAAK,CAAC,YAAY,CAAC,CAAC,sBAAsB,EAAE,CAAC,EAAE;YACzD,MAAM,QAAQ,CAAC,WAAW,CAAC,4BAA4B,CAAC,CAAC;SAC1D;QAED,MAAM,KAAK,CAAC,YAAY,CAAC,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;QAChD,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,UAAU,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,CAAC;QACrF,OAAO;YACL,YAAY,EAAE,MAAM,KAAK,CAAC,YAAY,CAAC,CAAC,YAAY,EAAE;YACtD,QAAQ,EAAE,KAAK,CAAC,YAAY,CAAC,CAAC,WAAW,EAAY;SACtD,CAAC;IACJ,CAAC"}
@@ -0,0 +1,25 @@
1
+ # summary
2
+
3
+ Disable source tracking in local auth file.
4
+
5
+ # description
6
+
7
+ This has no effect on the org. It stores the setting in the CLI's configuration file for this org so that no source tracking operations are executed when working with this org.
8
+
9
+ # examples
10
+
11
+ Disable tracking on an org using an alias
12
+
13
+ - <%= config.bin %> <%= command.id %> -o someAlias
14
+
15
+ Disable tracking on an org using a username
16
+
17
+ - <%= config.bin %> <%= command.id %> -o you@example.com
18
+
19
+ Disable tracking on your default org
20
+
21
+ - <%= config.bin %> <%= command.id %>
22
+
23
+ # success
24
+
25
+ Disabled source tracking for %s.
@@ -0,0 +1,39 @@
1
+ # summary
2
+
3
+ Enable source tracking in local auth file.
4
+
5
+ # description
6
+
7
+ This has no effect on the org. It stores the setting in the CLI's configuration file for this org so that source tracking operations are executed when working with this org.
8
+
9
+ This command will throw an error if the org does not support tracking.
10
+
11
+ # examples
12
+
13
+ Enable tracking on an org using an alias
14
+
15
+ - <%= config.bin %> <%= command.id %> -o someAlias
16
+
17
+ Enable tracking on an org using a username
18
+
19
+ - <%= config.bin %> <%= command.id %> -o you@example.com
20
+
21
+ Enable tracking on your default org
22
+
23
+ - <%= config.bin %> <%= command.id %>
24
+
25
+ # success
26
+
27
+ Enabled source tracking for %s.
28
+
29
+ # error.TrackingNotAvailable
30
+
31
+ This org cannot enable source tracking because the SourceMember object is not available, or you do not have access to it.
32
+
33
+ # error.TrackingNotAvailable.actions
34
+
35
+ - If the org is a sandbox, make sure that your production org has Source Tracking enabled in sandboxes. See https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_setup_enable_source_tracking_sandboxes.htm.
36
+
37
+ - Make sure that your user can access the SourceMembers table via the tooling API.
38
+
39
+ - If the Org is a production org, source tracking cannot be enabled.