sfdx-browserforce-plugin 5.2.0-next.5 → 6.0.0-next.2

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.
Files changed (71) hide show
  1. package/lib/browserforce-command.js +4 -1
  2. package/lib/browserforce-command.js.map +1 -1
  3. package/lib/browserforce.d.ts +0 -1
  4. package/lib/browserforce.js +88 -23
  5. package/lib/browserforce.js.map +1 -1
  6. package/lib/plugins/activity-settings/index.js +93 -20
  7. package/lib/plugins/activity-settings/index.js.map +1 -1
  8. package/lib/plugins/company-information/index.js +104 -31
  9. package/lib/plugins/company-information/index.js.map +1 -1
  10. package/lib/plugins/customer-portal/available-custom-objects/index.js +166 -71
  11. package/lib/plugins/customer-portal/available-custom-objects/index.js.map +1 -1
  12. package/lib/plugins/customer-portal/enabled/index.js +73 -10
  13. package/lib/plugins/customer-portal/enabled/index.js.map +1 -1
  14. package/lib/plugins/customer-portal/portals/index.js +196 -101
  15. package/lib/plugins/customer-portal/portals/index.js.map +1 -1
  16. package/lib/plugins/density-settings/index.js +95 -21
  17. package/lib/plugins/density-settings/index.js.map +1 -1
  18. package/lib/plugins/email-deliverability/index.js +94 -21
  19. package/lib/plugins/email-deliverability/index.js.map +1 -1
  20. package/lib/plugins/high-velocity-sales-settings/index.js +67 -2
  21. package/lib/plugins/high-velocity-sales-settings/index.js.map +1 -1
  22. package/lib/plugins/high-velocity-sales-settings/page.js +0 -1
  23. package/lib/plugins/high-velocity-sales-settings/page.js.map +1 -1
  24. package/lib/plugins/history-tracking/index.js +162 -83
  25. package/lib/plugins/history-tracking/index.js.map +1 -1
  26. package/lib/plugins/home-page-layouts/index.js +129 -57
  27. package/lib/plugins/home-page-layouts/index.js.map +1 -1
  28. package/lib/plugins/lightning-experience-settings/index.js +85 -12
  29. package/lib/plugins/lightning-experience-settings/index.js.map +1 -1
  30. package/lib/plugins/linkedin-sales-navigator-settings/index.js +84 -6
  31. package/lib/plugins/linkedin-sales-navigator-settings/index.js.map +1 -1
  32. package/lib/plugins/linkedin-sales-navigator-settings/page.js +0 -2
  33. package/lib/plugins/linkedin-sales-navigator-settings/page.js.map +1 -1
  34. package/lib/plugins/omni-channel-settings/index.js +88 -13
  35. package/lib/plugins/omni-channel-settings/index.js.map +1 -1
  36. package/lib/plugins/opportunity-splits/index.js +103 -18
  37. package/lib/plugins/opportunity-splits/index.js.map +1 -1
  38. package/lib/plugins/permission-sets/service-presence-status/index.js +124 -51
  39. package/lib/plugins/permission-sets/service-presence-status/index.js.map +1 -1
  40. package/lib/plugins/picklists/field-dependencies/index.js +86 -4
  41. package/lib/plugins/picklists/field-dependencies/index.js.map +1 -1
  42. package/lib/plugins/picklists/field-dependencies/pages.js +0 -1
  43. package/lib/plugins/picklists/field-dependencies/pages.js.map +1 -1
  44. package/lib/plugins/picklists/index.js +128 -55
  45. package/lib/plugins/picklists/index.js.map +1 -1
  46. package/lib/plugins/record-types/index.js +73 -10
  47. package/lib/plugins/record-types/index.js.map +1 -1
  48. package/lib/plugins/record-types/pages.js +0 -1
  49. package/lib/plugins/record-types/pages.js.map +1 -1
  50. package/lib/plugins/relate-contact-to-multiple-accounts/index.js +102 -28
  51. package/lib/plugins/relate-contact-to-multiple-accounts/index.js.map +1 -1
  52. package/lib/plugins/reports-and-dashboards/folder-sharing/index.js +107 -35
  53. package/lib/plugins/reports-and-dashboards/folder-sharing/index.js.map +1 -1
  54. package/lib/plugins/salesforce-cpq-config/index.js +249 -165
  55. package/lib/plugins/salesforce-cpq-config/index.js.map +1 -1
  56. package/lib/plugins/salesforce-to-salesforce/index.js +93 -20
  57. package/lib/plugins/salesforce-to-salesforce/index.js.map +1 -1
  58. package/lib/plugins/security/authentication-configuration/index.js +121 -49
  59. package/lib/plugins/security/authentication-configuration/index.js.map +1 -1
  60. package/lib/plugins/security/certificate-and-key-management/index.js +142 -57
  61. package/lib/plugins/security/certificate-and-key-management/index.js.map +1 -1
  62. package/lib/plugins/service-channels/capacity/index.js +173 -102
  63. package/lib/plugins/service-channels/capacity/index.js.map +1 -1
  64. package/lib/plugins/slack/index.js +101 -27
  65. package/lib/plugins/slack/index.js.map +1 -1
  66. package/lib/plugins/user-access-policies/index.js +96 -24
  67. package/lib/plugins/user-access-policies/index.js.map +1 -1
  68. package/lib/plugins/user-access-policies/page.js +0 -6
  69. package/lib/plugins/user-access-policies/page.js.map +1 -1
  70. package/oclif.manifest.json +1 -1
  71. package/package.json +1 -1
@@ -1,3 +1,55 @@
1
+ var __addDisposableResource = (this && this.__addDisposableResource) || function (env, value, async) {
2
+ if (value !== null && value !== void 0) {
3
+ if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected.");
4
+ var dispose, inner;
5
+ if (async) {
6
+ if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined.");
7
+ dispose = value[Symbol.asyncDispose];
8
+ }
9
+ if (dispose === void 0) {
10
+ if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined.");
11
+ dispose = value[Symbol.dispose];
12
+ if (async) inner = dispose;
13
+ }
14
+ if (typeof dispose !== "function") throw new TypeError("Object not disposable.");
15
+ if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };
16
+ env.stack.push({ value: value, dispose: dispose, async: async });
17
+ }
18
+ else if (async) {
19
+ env.stack.push({ async: true });
20
+ }
21
+ return value;
22
+ };
23
+ var __disposeResources = (this && this.__disposeResources) || (function (SuppressedError) {
24
+ return function (env) {
25
+ function fail(e) {
26
+ env.error = env.hasError ? new SuppressedError(e, env.error, "An error was suppressed during disposal.") : e;
27
+ env.hasError = true;
28
+ }
29
+ var r, s = 0;
30
+ function next() {
31
+ while (r = env.stack.pop()) {
32
+ try {
33
+ if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);
34
+ if (r.dispose) {
35
+ var result = r.dispose.call(r.value);
36
+ if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });
37
+ }
38
+ else s |= 1;
39
+ }
40
+ catch (e) {
41
+ fail(e);
42
+ }
43
+ }
44
+ if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();
45
+ if (env.hasError) throw env.error;
46
+ }
47
+ return next();
48
+ };
49
+ })(typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
50
+ var e = new Error(message);
51
+ return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
52
+ });
1
53
  import { BrowserforcePlugin } from '../../plugin.js';
2
54
  import { HighVelocitySalesSetupPage } from './page.js';
3
55
  const MSG_NOT_AVAILABLE = `HighVelocitySales is not available in this organization.
@@ -22,8 +74,21 @@ export class HighVelocitySalesSettings extends BrowserforcePlugin {
22
74
  }
23
75
  async apply(config) {
24
76
  if (config.setUpAndEnable) {
25
- const page = new HighVelocitySalesSetupPage(await this.browserforce.openPage(HighVelocitySalesSetupPage.getUrl()));
26
- await page.setUpAndEnable();
77
+ const env_1 = { stack: [], error: void 0, hasError: false };
78
+ try {
79
+ const page = __addDisposableResource(env_1, await this.browserforce.openPage(HighVelocitySalesSetupPage.getUrl()), true);
80
+ const hvs = new HighVelocitySalesSetupPage(page);
81
+ await hvs.setUpAndEnable();
82
+ }
83
+ catch (e_1) {
84
+ env_1.error = e_1;
85
+ env_1.hasError = true;
86
+ }
87
+ finally {
88
+ const result_1 = __disposeResources(env_1);
89
+ if (result_1)
90
+ await result_1;
91
+ }
27
92
  }
28
93
  else {
29
94
  const conn = this.org.getConnection();
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/plugins/high-velocity-sales-settings/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,0BAA0B,EAAE,MAAM,WAAW,CAAC;AAEvD,MAAM,iBAAiB,GAAG;mFACyD,CAAC;AAMpF,MAAM,OAAO,yBAA0B,SAAQ,kBAAkB;IACxD,KAAK,CAAC,QAAQ,CAAC,UAAmB;QACvC,MAAM,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gBACjD,MAAM,GAAG,CAAC,cAAc,EAAE,CAAC;;;;;;;;;;;SAC5B;aAAM,CAAC;YACN,MAAM,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,aAAa,EAAE,CAAC;YACtC,MAAM,qCAAqC,CAAC,IAAI,CAAC,CAAC;QACpD,CAAC;IACH,CAAC;CACF;AAED,MAAM,CAAC,KAAK,UAAU,qCAAqC,CACzD,IAAgB;IAEhB,MAAM,QAAQ,GAAG;QACf,QAAQ,EAAE,mBAAmB;QAC7B,4BAA4B,EAAE,KAAK;QACnC,uBAAuB,EAAE,KAAK;KAC/B,CAAC;IACF,MAAM,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,2BAA2B,EAAE,QAAQ,CAAC,CAAC;AACpE,CAAC"}
@@ -21,7 +21,6 @@ export class HighVelocitySalesSetupPage {
21
21
  this.page.locator(ENABLE_TOGGLE).waitFor({ timeout: 90_000 }),
22
22
  waitForPageErrors(this.page),
23
23
  ]);
24
- await this.page.close();
25
24
  }
26
25
  }
27
26
  //# sourceMappingURL=page.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"page.js","sourceRoot":"","sources":["../../../src/plugins/high-velocity-sales-settings/page.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE1D,MAAM,4BAA4B,GAAG,6BAA6B,CAAC;AACnE,MAAM,aAAa,GAAG,8BAA8B,CAAC;AACrD,MAAM,mBAAmB,GACvB,sDAAsD,CAAC;AAEzD,MAAM,OAAO,0BAA0B;IAC7B,IAAI,CAAO;IAEnB,YAAY,IAAU;QACpB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;IAEM,MAAM,CAAC,MAAM;QAClB,OAAO,sCAAsC,CAAC;IAChD,CAAC;IAEM,KAAK,CAAC,cAAc;QACzB,MAAM,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC,OAAO,EAAE,CAAC;QACvD,M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mB,CAAC,CAAC,KAAK,EAAE,CAAC;QACtE,IAAI,QAAQ,GAAG,CAAC,EAAE,CAAC;YACjB,MAAM,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC,KAAK,EAAE,CAAC;QACvD,CAAC;QACD,MAAM,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,4BAA4B,CAAC,CAAC,KAAK,EAAE,CAAC;QAC9D,MAAM,OAAO,CAAC,IAAI,CAAC;YACjB,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC,OAAO,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC;YAC7D,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC;SAC7B,CAAC,CAAC;IACL,CAAC;CACF"}
@@ -1,6 +1,58 @@
1
+ var __addDisposableResource = (this && this.__addDisposableResource) || function (env, value, async) {
2
+ if (value !== null && value !== void 0) {
3
+ if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected.");
4
+ var dispose, inner;
5
+ if (async) {
6
+ if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined.");
7
+ dispose = value[Symbol.asyncDispose];
8
+ }
9
+ if (dispose === void 0) {
10
+ if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined.");
11
+ dispose = value[Symbol.dispose];
12
+ if (async) inner = dispose;
13
+ }
14
+ if (typeof dispose !== "function") throw new TypeError("Object not disposable.");
15
+ if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };
16
+ env.stack.push({ value: value, dispose: dispose, async: async });
17
+ }
18
+ else if (async) {
19
+ env.stack.push({ async: true });
20
+ }
21
+ return value;
22
+ };
23
+ var __disposeResources = (this && this.__disposeResources) || (function (SuppressedError) {
24
+ return function (env) {
25
+ function fail(e) {
26
+ env.error = env.hasError ? new SuppressedError(e, env.error, "An error was suppressed during disposal.") : e;
27
+ env.hasError = true;
28
+ }
29
+ var r, s = 0;
30
+ function next() {
31
+ while (r = env.stack.pop()) {
32
+ try {
33
+ if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);
34
+ if (r.dispose) {
35
+ var result = r.dispose.call(r.value);
36
+ if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });
37
+ }
38
+ else s |= 1;
39
+ }
40
+ catch (e) {
41
+ fail(e);
42
+ }
43
+ }
44
+ if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();
45
+ if (env.hasError) throw env.error;
46
+ }
47
+ return next();
48
+ };
49
+ })(typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
50
+ var e = new Error(message);
51
+ return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
52
+ });
1
53
  import { waitForPageErrors } from '../../browserforce.js';
2
54
  import { BrowserforcePlugin } from '../../plugin.js';
3
- const BASE_PATH = 'ui/setup/layout/FieldHistoryTracking?pEntity={APINAME}';
55
+ const BASE_PATH = `ui/setup/layout/FieldHistoryTracking?pEntity={APINAME}&retURL=${encodeURIComponent('/setup/forcecomHomepage.apexp')}`;
4
56
  const ENABLE_HISTORY_SELECTOR = 'input[type="checkbox"][id="enable"]';
5
57
  const ENABLE_FIELD_HISTORY_SELECTOR = 'input[id="{APINAME}_fht"]';
6
58
  const SAVE_BUTTON_SELECTOR = 'input[type="submit"][name="save"]';
@@ -12,52 +64,63 @@ export class HistoryTracking extends BrowserforcePlugin {
12
64
  const tableEnumOrIdByObjectApiName = await this.getTableEnumOrIdByObjectApiName(definition);
13
65
  // Now we can iterate over all history tracking configurations in the definition
14
66
  for (const historyTrackingConfig of definition) {
15
- const historyTrackingResult = { ...historyTrackingConfig };
16
- // Open the object history tracking setup page
17
- const page = await this.browserforce.openPage(BASE_PATH.replace('{APINAME}', tableEnumOrIdByObjectApiName.get(historyTrackingConfig.objectApiName)));
18
- // Retrieve the object history tracking
19
- // If this is a custom object, this checkbox does not exist, so skip
20
- if (!historyTrackingConfig.objectApiName.includes('__c')) {
21
- historyTrackingResult.enableHistoryTracking = await page
22
- .locator(ENABLE_HISTORY_SELECTOR)
23
- .isChecked();
24
- }
25
- // If we have no field history tracking, there is nothing more to do
26
- if (!historyTrackingConfig.fieldHistoryTracking) {
27
- historyTrackingConfigs.push(historyTrackingResult);
28
- continue;
29
- }
30
- const fieldHistoryTrackingConfigs = [];
31
- // If the object history tracking is false, then we already know all field history tracking is false
32
- // Only so long as this is a standard object
33
- if (!historyTrackingResult.enableHistoryTracking &&
34
- !historyTrackingConfig.objectApiName.includes('__c')) {
67
+ const env_1 = { stack: [], error: void 0, hasError: false };
68
+ try {
69
+ const historyTrackingResult = { ...historyTrackingConfig };
70
+ // Open the object history tracking setup page
71
+ const page = __addDisposableResource(env_1, await this.browserforce.openPage(BASE_PATH.replace('{APINAME}', tableEnumOrIdByObjectApiName.get(historyTrackingConfig.objectApiName))), true);
72
+ // Retrieve the object history tracking
73
+ // If this is a custom object, this checkbox does not exist, so skip
74
+ if (!historyTrackingConfig.objectApiName.includes('__c')) {
75
+ historyTrackingResult.enableHistoryTracking = await page
76
+ .locator(ENABLE_HISTORY_SELECTOR)
77
+ .isChecked();
78
+ }
79
+ // If we have no field history tracking, there is nothing more to do
80
+ if (!historyTrackingConfig.fieldHistoryTracking) {
81
+ historyTrackingConfigs.push(historyTrackingResult);
82
+ continue;
83
+ }
84
+ const fieldHistoryTrackingConfigs = [];
85
+ // If the object history tracking is false, then we already know all field history tracking is false
86
+ // Only so long as this is a standard object
87
+ if (!historyTrackingResult.enableHistoryTracking &&
88
+ !historyTrackingConfig.objectApiName.includes('__c')) {
89
+ for (const fieldHistoryTracking of historyTrackingConfig.fieldHistoryTracking) {
90
+ fieldHistoryTrackingConfigs.push({
91
+ ...fieldHistoryTracking,
92
+ enableHistoryTracking: false,
93
+ });
94
+ }
95
+ historyTrackingResult.fieldHistoryTracking =
96
+ fieldHistoryTrackingConfigs;
97
+ historyTrackingConfigs.push(historyTrackingResult);
98
+ continue;
99
+ }
100
+ // We need to determine the correct html selector for each field that is configured
101
+ // This is because custom fields are identified using their CustomField.Id value
102
+ const fieldSelectorByFieldApiName = await this.getFieldSelectorByFieldApiName(tableEnumOrIdByObjectApiName.get(historyTrackingConfig.objectApiName), historyTrackingConfig.fieldHistoryTracking);
103
+ // We can now retrieve the field history settings for the fields specified for the object
35
104
  for (const fieldHistoryTracking of historyTrackingConfig.fieldHistoryTracking) {
36
- fieldHistoryTrackingConfigs.push({
37
- ...fieldHistoryTracking,
38
- enableHistoryTracking: false,
39
- });
105
+ const fieldHistoryTrackingResult = { ...fieldHistoryTracking };
106
+ const fieldApiName = fieldSelectorByFieldApiName.get(fieldHistoryTracking.fieldApiName);
107
+ fieldHistoryTrackingResult.enableHistoryTracking = await page
108
+ .locator(ENABLE_FIELD_HISTORY_SELECTOR.replace('{APINAME}', fieldApiName))
109
+ .isChecked();
110
+ fieldHistoryTrackingConfigs.push(fieldHistoryTrackingResult);
40
111
  }
41
- historyTrackingResult.fieldHistoryTracking =
42
- fieldHistoryTrackingConfigs;
112
+ historyTrackingResult.fieldHistoryTracking = fieldHistoryTrackingConfigs;
43
113
  historyTrackingConfigs.push(historyTrackingResult);
44
- continue;
45
114
  }
46
- // We need to determine the correct html selector for each field that is configured
47
- // This is because custom fields are identified using their CustomField.Id value
48
- const fieldSelectorByFieldApiName = await this.getFieldSelectorByFieldApiName(tableEnumOrIdByObjectApiName.get(historyTrackingConfig.objectApiName), historyTrackingConfig.fieldHistoryTracking);
49
- // We can now retrieve the field history settings for the fields specified for the object
50
- for (const fieldHistoryTracking of historyTrackingConfig.fieldHistoryTracking) {
51
- const fieldHistoryTrackingResult = { ...fieldHistoryTracking };
52
- const fieldApiName = fieldSelectorByFieldApiName.get(fieldHistoryTracking.fieldApiName);
53
- fieldHistoryTrackingResult.enableHistoryTracking = await page
54
- .locator(ENABLE_FIELD_HISTORY_SELECTOR.replace('{APINAME}', fieldApiName))
55
- .isChecked();
56
- fieldHistoryTrackingConfigs.push(fieldHistoryTrackingResult);
115
+ catch (e_1) {
116
+ env_1.error = e_1;
117
+ env_1.hasError = true;
118
+ }
119
+ finally {
120
+ const result_1 = __disposeResources(env_1);
121
+ if (result_1)
122
+ await result_1;
57
123
  }
58
- historyTrackingResult.fieldHistoryTracking = fieldHistoryTrackingConfigs;
59
- historyTrackingConfigs.push(historyTrackingResult);
60
- await page.close();
61
124
  }
62
125
  return historyTrackingConfigs;
63
126
  }
@@ -67,49 +130,59 @@ export class HistoryTracking extends BrowserforcePlugin {
67
130
  const tableEnumOrIdByObjectApiName = await this.getTableEnumOrIdByObjectApiName(plan);
68
131
  // Now we can iterate over all history tracking configurations in the plan
69
132
  for (const historyTrackingConfig of plan) {
70
- // Open the object history tracking setup page
71
- const page = await this.browserforce.openPage(BASE_PATH.replace('{APINAME}', tableEnumOrIdByObjectApiName.get(historyTrackingConfig.objectApiName)));
72
- // Retrieve the object history tracking
73
- // If this is a custom object, this checkbox does not exist, so skip
74
- if (!historyTrackingConfig.objectApiName.includes('__c')) {
75
- const historyTrackingEnabled = await page
76
- .locator(ENABLE_HISTORY_SELECTOR)
77
- .isChecked();
78
- if (historyTrackingConfig.enableHistoryTracking !== historyTrackingEnabled) {
79
- // Click the checkbox
80
- await page.locator(ENABLE_HISTORY_SELECTOR).click();
81
- }
82
- }
83
- if (historyTrackingConfig.fieldHistoryTracking) {
84
- // We need to determine the correct html selector for each field that is configured
85
- // This is because custom fields are identified using their CustomField.Id value
86
- const fieldSelectorByFieldApiName = await this.getFieldSelectorByFieldApiName(tableEnumOrIdByObjectApiName.get(historyTrackingConfig.objectApiName), historyTrackingConfig.fieldHistoryTracking);
87
- // We can now retrieve the field history settings for the fields specified for the object
88
- for (const fieldHistoryTracking of historyTrackingConfig.fieldHistoryTracking) {
89
- const fieldApiName = fieldSelectorByFieldApiName.get(fieldHistoryTracking.fieldApiName);
90
- const fieldSelector = ENABLE_FIELD_HISTORY_SELECTOR.replace('{APINAME}', fieldApiName);
91
- const fieldHistoryTrackingEnabled = await page
92
- .locator(fieldSelector)
133
+ const env_2 = { stack: [], error: void 0, hasError: false };
134
+ try {
135
+ // Open the object history tracking setup page
136
+ const page = __addDisposableResource(env_2, await this.browserforce.openPage(BASE_PATH.replace('{APINAME}', tableEnumOrIdByObjectApiName.get(historyTrackingConfig.objectApiName))), true);
137
+ // Retrieve the object history tracking
138
+ // If this is a custom object, this checkbox does not exist, so skip
139
+ if (!historyTrackingConfig.objectApiName.includes('__c')) {
140
+ const historyTrackingEnabled = await page
141
+ .locator(ENABLE_HISTORY_SELECTOR)
93
142
  .isChecked();
94
- if (fieldHistoryTracking.enableHistoryTracking !==
95
- fieldHistoryTrackingEnabled) {
143
+ if (historyTrackingConfig.enableHistoryTracking !== historyTrackingEnabled) {
96
144
  // Click the checkbox
97
- await page.locator(fieldSelector).click();
145
+ await page.locator(ENABLE_HISTORY_SELECTOR).click();
98
146
  }
99
147
  }
148
+ if (historyTrackingConfig.fieldHistoryTracking) {
149
+ // We need to determine the correct html selector for each field that is configured
150
+ // This is because custom fields are identified using their CustomField.Id value
151
+ const fieldSelectorByFieldApiName = await this.getFieldSelectorByFieldApiName(tableEnumOrIdByObjectApiName.get(historyTrackingConfig.objectApiName), historyTrackingConfig.fieldHistoryTracking);
152
+ // We can now retrieve the field history settings for the fields specified for the object
153
+ for (const fieldHistoryTracking of historyTrackingConfig.fieldHistoryTracking) {
154
+ const fieldApiName = fieldSelectorByFieldApiName.get(fieldHistoryTracking.fieldApiName);
155
+ const fieldSelector = ENABLE_FIELD_HISTORY_SELECTOR.replace('{APINAME}', fieldApiName);
156
+ const fieldHistoryTrackingEnabled = await page
157
+ .locator(fieldSelector)
158
+ .isChecked();
159
+ if (fieldHistoryTracking.enableHistoryTracking !==
160
+ fieldHistoryTrackingEnabled) {
161
+ // Click the checkbox
162
+ await page.locator(fieldSelector).click();
163
+ }
164
+ }
165
+ }
166
+ // Save the settings
167
+ await page
168
+ .locator(SAVE_BUTTON_SELECTOR)
169
+ .filter({ visible: true }) // there are three save buttons [not visible, top row, bottom row]
170
+ .first()
171
+ .click();
172
+ await Promise.race([
173
+ page.waitForURL((url) => url.pathname.startsWith('/setup/forcecomHomepage.apexp')),
174
+ waitForPageErrors(page),
175
+ ]);
176
+ }
177
+ catch (e_2) {
178
+ env_2.error = e_2;
179
+ env_2.hasError = true;
180
+ }
181
+ finally {
182
+ const result_2 = __disposeResources(env_2);
183
+ if (result_2)
184
+ await result_2;
100
185
  }
101
- // Save the settings
102
- await page
103
- .locator(SAVE_BUTTON_SELECTOR)
104
- .filter({ visible: true }) // there are three save buttons [not visible, top row, bottom row]
105
- .first()
106
- .click();
107
- await Promise.race([
108
- page.waitForURL((url) => url.pathname !== `/ui/setup/layout/FieldHistoryTracking`),
109
- waitForPageErrors(page),
110
- ]);
111
- // Close the page
112
- await page.close();
113
186
  }
114
187
  }
115
188
  async getFieldSelectorByFieldApiName(tableEnumOrId, fieldHistoryTrackingConfigs) {
@@ -136,17 +209,21 @@ export class HistoryTracking extends BrowserforcePlugin {
136
209
  return fieldSelectorByFieldApiName;
137
210
  }
138
211
  if (personAccountFieldApiNames.length > 0) {
212
+ // NOTE: Unfortunately this includes deleted records
213
+ // WORKAROUND: ORDER BY CreatedDate
139
214
  const personAccountFieldsQuery = await this.org
140
215
  .getConnection()
141
- .tooling.query(`SELECT Id, DeveloperName FROM CustomField WHERE DeveloperName IN (${personAccountFieldApiNames.join(',')}) AND TableEnumOrId = 'Contact'`);
216
+ .tooling.query(`SELECT Id, DeveloperName FROM CustomField WHERE DeveloperName IN (${personAccountFieldApiNames.join(',')}) AND TableEnumOrId = 'Contact' ORDER By CreatedDate ASC`);
142
217
  for (const personAccountField of personAccountFieldsQuery.records) {
143
218
  fieldSelectorByFieldApiName.set(`${personAccountField.DeveloperName}__pc`, personAccountField.Id.substring(0, 15));
144
219
  }
145
220
  }
146
221
  if (customFieldApiNames.length > 0) {
222
+ // NOTE: Unfortunately this includes deleted records
223
+ // WORKAROUND: ORDER BY CreatedDate
147
224
  const customFieldsQuery = await this.org
148
225
  .getConnection()
149
- .tooling.query(`SELECT Id, DeveloperName FROM CustomField WHERE DeveloperName IN (${customFieldApiNames.join(',')}) AND TableEnumOrId = '${tableEnumOrId}'`);
226
+ .tooling.query(`SELECT Id, DeveloperName FROM CustomField WHERE DeveloperName IN (${customFieldApiNames.join(',')}) AND TableEnumOrId = '${tableEnumOrId}' ORDER By CreatedDate ASC`);
150
227
  for (const customField of customFieldsQuery.records) {
151
228
  fieldSelectorByFieldApiName.set(`${customField.DeveloperName}__c`, customField.Id.substring(0, 15));
152
229
  }
@@ -168,9 +245,11 @@ export class HistoryTracking extends BrowserforcePlugin {
168
245
  if (customObjectApiNames.length === 0) {
169
246
  return tableEnumOrIdByObjectApiName;
170
247
  }
248
+ // NOTE: Unfortunately this includes deleted records
249
+ // WORKAROUND: ORDER BY CreatedDate
171
250
  const customObjectsQuery = await this.org
172
251
  .getConnection()
173
- .tooling.query(`SELECT Id, DeveloperName FROM CustomObject WHERE DeveloperName IN (${customObjectApiNames.join(',')})`);
252
+ .tooling.query(`SELECT Id, DeveloperName FROM CustomObject WHERE DeveloperName IN (${customObjectApiNames.join(',')}) ORDER BY CreatedDate ASC`);
174
253
  for (const customObject of customObjectsQuery.records) {
175
254
  tableEnumOrIdByObjectApiName.set(`${customObject.DeveloperName}__c`, customObject.Id);
176
255
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/plugins/history-tracking/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAErD,MAAM,SAAS,GAAG,wDAAwD,CAAC;AAE3E,MAAM,uBAAuB,GAAG,qCAAqC,CAAC;AACtE,MAAM,6BAA6B,GAAG,2BAA2B,CAAC;AAClE,MAAM,oBAAoB,GAAG,mCAAmC,CAAC;AAajE,MAAM,OAAO,eAAgB,SAAQ,k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