sf-browserforce 1.0.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/LICENSE +21 -0
- package/README.md +266 -0
- package/bin/run +9 -0
- package/bin/run.cmd +3 -0
- package/lib/browserforce-command.d.ts +27 -0
- package/lib/browserforce-command.js +162 -0
- package/lib/browserforce-command.js.map +1 -0
- package/lib/browserforce.d.ts +27 -0
- package/lib/browserforce.js +163 -0
- package/lib/browserforce.js.map +1 -0
- package/lib/commands/browserforce/apply.d.ts +10 -0
- package/lib/commands/browserforce/apply.js +83 -0
- package/lib/commands/browserforce/apply.js.map +1 -0
- package/lib/commands/browserforce/playwright.d.ts +9 -0
- package/lib/commands/browserforce/playwright.js +53 -0
- package/lib/commands/browserforce/playwright.js.map +1 -0
- package/lib/config-parser.d.ts +16 -0
- package/lib/config-parser.js +24 -0
- package/lib/config-parser.js.map +1 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +2 -0
- package/lib/index.js.map +1 -0
- package/lib/jsforce-utils.d.ts +5 -0
- package/lib/jsforce-utils.js +14 -0
- package/lib/jsforce-utils.js.map +1 -0
- package/lib/pages/login.d.ts +7 -0
- package/lib/pages/login.js +17 -0
- package/lib/pages/login.js.map +1 -0
- package/lib/plugin.d.ts +15 -0
- package/lib/plugin.js +28 -0
- package/lib/plugin.js.map +1 -0
- package/lib/plugins/activity-settings/index.d.ts +9 -0
- package/lib/plugins/activity-settings/index.e2e-spec.d.ts +1 -0
- package/lib/plugins/activity-settings/index.e2e-spec.js +36 -0
- package/lib/plugins/activity-settings/index.e2e-spec.js.map +1 -0
- package/lib/plugins/activity-settings/index.js +102 -0
- package/lib/plugins/activity-settings/index.js.map +1 -0
- package/lib/plugins/auth-providers/index.d.ts +13 -0
- package/lib/plugins/auth-providers/index.e2e-spec.d.ts +1 -0
- package/lib/plugins/auth-providers/index.e2e-spec.js +78 -0
- package/lib/plugins/auth-providers/index.e2e-spec.js.map +1 -0
- package/lib/plugins/auth-providers/index.js +135 -0
- package/lib/plugins/auth-providers/index.js.map +1 -0
- package/lib/plugins/company-information/index.d.ts +8 -0
- package/lib/plugins/company-information/index.e2e-spec.d.ts +1 -0
- package/lib/plugins/company-information/index.e2e-spec.js +37 -0
- package/lib/plugins/company-information/index.e2e-spec.js.map +1 -0
- package/lib/plugins/company-information/index.js +114 -0
- package/lib/plugins/company-information/index.js.map +1 -0
- package/lib/plugins/customer-portal/available-custom-objects/index.d.ts +14 -0
- package/lib/plugins/customer-portal/available-custom-objects/index.js +203 -0
- package/lib/plugins/customer-portal/available-custom-objects/index.js.map +1 -0
- package/lib/plugins/customer-portal/available-custom-objects/index.test.d.ts +1 -0
- package/lib/plugins/customer-portal/available-custom-objects/index.test.js +39 -0
- package/lib/plugins/customer-portal/available-custom-objects/index.test.js.map +1 -0
- package/lib/plugins/customer-portal/enabled/index.d.ts +6 -0
- package/lib/plugins/customer-portal/enabled/index.js +89 -0
- package/lib/plugins/customer-portal/enabled/index.js.map +1 -0
- package/lib/plugins/customer-portal/enabled/index.test.d.ts +1 -0
- package/lib/plugins/customer-portal/enabled/index.test.js +34 -0
- package/lib/plugins/customer-portal/enabled/index.test.js.map +1 -0
- package/lib/plugins/customer-portal/index.d.ts +15 -0
- package/lib/plugins/customer-portal/index.e2e-spec.d.ts +1 -0
- package/lib/plugins/customer-portal/index.e2e-spec.js +188 -0
- package/lib/plugins/customer-portal/index.e2e-spec.js.map +1 -0
- package/lib/plugins/customer-portal/index.js +58 -0
- package/lib/plugins/customer-portal/index.js.map +1 -0
- package/lib/plugins/customer-portal/index.test.d.ts +1 -0
- package/lib/plugins/customer-portal/index.test.js +84 -0
- package/lib/plugins/customer-portal/index.test.js.map +1 -0
- package/lib/plugins/customer-portal/portals/index.d.ts +25 -0
- package/lib/plugins/customer-portal/portals/index.js +254 -0
- package/lib/plugins/customer-portal/portals/index.js.map +1 -0
- package/lib/plugins/customer-portal/portals/index.test.d.ts +1 -0
- package/lib/plugins/customer-portal/portals/index.test.js +140 -0
- package/lib/plugins/customer-portal/portals/index.test.js.map +1 -0
- package/lib/plugins/density-settings/index.d.ts +10 -0
- package/lib/plugins/density-settings/index.e2e-spec.d.ts +1 -0
- package/lib/plugins/density-settings/index.e2e-spec.js +39 -0
- package/lib/plugins/density-settings/index.e2e-spec.js.map +1 -0
- package/lib/plugins/density-settings/index.js +101 -0
- package/lib/plugins/density-settings/index.js.map +1 -0
- package/lib/plugins/deprecated.d.ts +4 -0
- package/lib/plugins/deprecated.js +28 -0
- package/lib/plugins/deprecated.js.map +1 -0
- package/lib/plugins/email-deliverability/index.d.ts +9 -0
- package/lib/plugins/email-deliverability/index.e2e-spec.d.ts +1 -0
- package/lib/plugins/email-deliverability/index.e2e-spec.js +55 -0
- package/lib/plugins/email-deliverability/index.e2e-spec.js.map +1 -0
- package/lib/plugins/email-deliverability/index.js +109 -0
- package/lib/plugins/email-deliverability/index.js.map +1 -0
- package/lib/plugins/high-velocity-sales-settings/index.d.ts +10 -0
- package/lib/plugins/high-velocity-sales-settings/index.e2e-spec.d.ts +1 -0
- package/lib/plugins/high-velocity-sales-settings/index.e2e-spec.js +29 -0
- package/lib/plugins/high-velocity-sales-settings/index.e2e-spec.js.map +1 -0
- package/lib/plugins/high-velocity-sales-settings/index.js +105 -0
- package/lib/plugins/high-velocity-sales-settings/index.js.map +1 -0
- package/lib/plugins/high-velocity-sales-settings/page.d.ts +8 -0
- package/lib/plugins/high-velocity-sales-settings/page.js +27 -0
- package/lib/plugins/high-velocity-sales-settings/page.js.map +1 -0
- package/lib/plugins/history-tracking/index.d.ts +19 -0
- package/lib/plugins/history-tracking/index.e2e-spec.d.ts +1 -0
- package/lib/plugins/history-tracking/index.e2e-spec.js +128 -0
- package/lib/plugins/history-tracking/index.e2e-spec.js.map +1 -0
- package/lib/plugins/history-tracking/index.js +272 -0
- package/lib/plugins/history-tracking/index.js.map +1 -0
- package/lib/plugins/home-page-layouts/index.d.ts +14 -0
- package/lib/plugins/home-page-layouts/index.e2e-spec.d.ts +1 -0
- package/lib/plugins/home-page-layouts/index.e2e-spec.js +47 -0
- package/lib/plugins/home-page-layouts/index.e2e-spec.js.map +1 -0
- package/lib/plugins/home-page-layouts/index.js +145 -0
- package/lib/plugins/home-page-layouts/index.js.map +1 -0
- package/lib/plugins/home-page-layouts/index.test.d.ts +1 -0
- package/lib/plugins/home-page-layouts/index.test.js +104 -0
- package/lib/plugins/home-page-layouts/index.test.js.map +1 -0
- package/lib/plugins/index.d.ts +28 -0
- package/lib/plugins/index.js +29 -0
- package/lib/plugins/index.js.map +1 -0
- package/lib/plugins/lightning-experience-settings/index.d.ts +17 -0
- package/lib/plugins/lightning-experience-settings/index.e2e-spec.d.ts +1 -0
- package/lib/plugins/lightning-experience-settings/index.e2e-spec.js +48 -0
- package/lib/plugins/lightning-experience-settings/index.e2e-spec.js.map +1 -0
- package/lib/plugins/lightning-experience-settings/index.js +149 -0
- package/lib/plugins/lightning-experience-settings/index.js.map +1 -0
- package/lib/plugins/linkedin-sales-navigator-settings/index.d.ts +8 -0
- package/lib/plugins/linkedin-sales-navigator-settings/index.e2e-spec.d.ts +1 -0
- package/lib/plugins/linkedin-sales-navigator-settings/index.e2e-spec.js +29 -0
- package/lib/plugins/linkedin-sales-navigator-settings/index.e2e-spec.js.map +1 -0
- package/lib/plugins/linkedin-sales-navigator-settings/index.js +93 -0
- package/lib/plugins/linkedin-sales-navigator-settings/index.js.map +1 -0
- package/lib/plugins/linkedin-sales-navigator-settings/page.d.ts +9 -0
- package/lib/plugins/linkedin-sales-navigator-settings/page.js +35 -0
- package/lib/plugins/linkedin-sales-navigator-settings/page.js.map +1 -0
- package/lib/plugins/login-as-user/index.d.ts +9 -0
- package/lib/plugins/login-as-user/index.js +104 -0
- package/lib/plugins/login-as-user/index.js.map +1 -0
- package/lib/plugins/logout-login-as-user/index.d.ts +6 -0
- package/lib/plugins/logout-login-as-user/index.js +76 -0
- package/lib/plugins/logout-login-as-user/index.js.map +1 -0
- package/lib/plugins/omni-channel-settings/index.d.ts +9 -0
- package/lib/plugins/omni-channel-settings/index.e2e-spec.d.ts +1 -0
- package/lib/plugins/omni-channel-settings/index.e2e-spec.js +30 -0
- package/lib/plugins/omni-channel-settings/index.e2e-spec.js.map +1 -0
- package/lib/plugins/omni-channel-settings/index.js +97 -0
- package/lib/plugins/omni-channel-settings/index.js.map +1 -0
- package/lib/plugins/opportunity-splits/index.d.ts +9 -0
- package/lib/plugins/opportunity-splits/index.e2e-spec.d.ts +1 -0
- package/lib/plugins/opportunity-splits/index.e2e-spec.js +46 -0
- package/lib/plugins/opportunity-splits/index.e2e-spec.js.map +1 -0
- package/lib/plugins/opportunity-splits/index.js +117 -0
- package/lib/plugins/opportunity-splits/index.js.map +1 -0
- package/lib/plugins/opportunity-splits/pages/layout-selection.d.ts +8 -0
- package/lib/plugins/opportunity-splits/pages/layout-selection.js +15 -0
- package/lib/plugins/opportunity-splits/pages/layout-selection.js.map +1 -0
- package/lib/plugins/opportunity-splits/pages/overview.d.ts +11 -0
- package/lib/plugins/opportunity-splits/pages/overview.js +32 -0
- package/lib/plugins/opportunity-splits/pages/overview.js.map +1 -0
- package/lib/plugins/opportunity-splits/pages/setup.d.ts +9 -0
- package/lib/plugins/opportunity-splits/pages/setup.js +17 -0
- package/lib/plugins/opportunity-splits/pages/setup.js.map +1 -0
- package/lib/plugins/permission-sets/index.d.ts +10 -0
- package/lib/plugins/permission-sets/index.e2e-spec.d.ts +1 -0
- package/lib/plugins/permission-sets/index.e2e-spec.js +47 -0
- package/lib/plugins/permission-sets/index.e2e-spec.js.map +1 -0
- package/lib/plugins/permission-sets/index.js +22 -0
- package/lib/plugins/permission-sets/index.js.map +1 -0
- package/lib/plugins/permission-sets/service-presence-status/index.d.ts +10 -0
- package/lib/plugins/permission-sets/service-presence-status/index.js +124 -0
- package/lib/plugins/permission-sets/service-presence-status/index.js.map +1 -0
- package/lib/plugins/picklists/field-dependencies/index.d.ts +11 -0
- package/lib/plugins/picklists/field-dependencies/index.js +133 -0
- package/lib/plugins/picklists/field-dependencies/index.js.map +1 -0
- package/lib/plugins/picklists/field-dependencies/index.test.d.ts +1 -0
- package/lib/plugins/picklists/field-dependencies/index.test.js +64 -0
- package/lib/plugins/picklists/field-dependencies/index.test.js.map +1 -0
- package/lib/plugins/picklists/field-dependencies/pages.d.ts +15 -0
- package/lib/plugins/picklists/field-dependencies/pages.js +50 -0
- package/lib/plugins/picklists/field-dependencies/pages.js.map +1 -0
- package/lib/plugins/picklists/index.d.ts +23 -0
- package/lib/plugins/picklists/index.e2e-spec.d.ts +1 -0
- package/lib/plugins/picklists/index.e2e-spec.js +128 -0
- package/lib/plugins/picklists/index.e2e-spec.js.map +1 -0
- package/lib/plugins/picklists/index.js +229 -0
- package/lib/plugins/picklists/index.js.map +1 -0
- package/lib/plugins/picklists/pages.d.ts +45 -0
- package/lib/plugins/picklists/pages.js +185 -0
- package/lib/plugins/picklists/pages.js.map +1 -0
- package/lib/plugins/picklists/standard-value-set.d.ts +1 -0
- package/lib/plugins/picklists/standard-value-set.js +80 -0
- package/lib/plugins/picklists/standard-value-set.js.map +1 -0
- package/lib/plugins/record-types/index.d.ts +14 -0
- package/lib/plugins/record-types/index.e2e-spec.d.ts +1 -0
- package/lib/plugins/record-types/index.e2e-spec.js +76 -0
- package/lib/plugins/record-types/index.e2e-spec.js.map +1 -0
- package/lib/plugins/record-types/index.js +133 -0
- package/lib/plugins/record-types/index.js.map +1 -0
- package/lib/plugins/record-types/pages.d.ts +14 -0
- package/lib/plugins/record-types/pages.js +50 -0
- package/lib/plugins/record-types/pages.js.map +1 -0
- package/lib/plugins/relate-contact-to-multiple-accounts/index.d.ts +11 -0
- package/lib/plugins/relate-contact-to-multiple-accounts/index.e2e-spec.d.ts +1 -0
- package/lib/plugins/relate-contact-to-multiple-accounts/index.e2e-spec.js +30 -0
- package/lib/plugins/relate-contact-to-multiple-accounts/index.e2e-spec.js.map +1 -0
- package/lib/plugins/relate-contact-to-multiple-accounts/index.js +120 -0
- package/lib/plugins/relate-contact-to-multiple-accounts/index.js.map +1 -0
- package/lib/plugins/reports-and-dashboards/folder-sharing/index.d.ts +8 -0
- package/lib/plugins/reports-and-dashboards/folder-sharing/index.e2e-spec.d.ts +1 -0
- package/lib/plugins/reports-and-dashboards/folder-sharing/index.e2e-spec.js +3 -0
- package/lib/plugins/reports-and-dashboards/folder-sharing/index.e2e-spec.js.map +1 -0
- package/lib/plugins/reports-and-dashboards/folder-sharing/index.js +116 -0
- package/lib/plugins/reports-and-dashboards/folder-sharing/index.js.map +1 -0
- package/lib/plugins/reports-and-dashboards/index.d.ts +11 -0
- package/lib/plugins/reports-and-dashboards/index.e2e-spec.d.ts +1 -0
- package/lib/plugins/reports-and-dashboards/index.e2e-spec.js +3 -0
- package/lib/plugins/reports-and-dashboards/index.e2e-spec.js.map +1 -0
- package/lib/plugins/reports-and-dashboards/index.js +29 -0
- package/lib/plugins/reports-and-dashboards/index.js.map +1 -0
- package/lib/plugins/salesforce-cpq-config/formConfig.d.ts +17 -0
- package/lib/plugins/salesforce-cpq-config/formConfig.js +649 -0
- package/lib/plugins/salesforce-cpq-config/formConfig.js.map +1 -0
- package/lib/plugins/salesforce-cpq-config/index.d.ts +7 -0
- package/lib/plugins/salesforce-cpq-config/index.e2e-spec.d.ts +1 -0
- package/lib/plugins/salesforce-cpq-config/index.e2e-spec.js +37 -0
- package/lib/plugins/salesforce-cpq-config/index.e2e-spec.js.map +1 -0
- package/lib/plugins/salesforce-cpq-config/index.js +261 -0
- package/lib/plugins/salesforce-cpq-config/index.js.map +1 -0
- package/lib/plugins/salesforce-to-salesforce/index.d.ts +9 -0
- package/lib/plugins/salesforce-to-salesforce/index.e2e-spec.d.ts +1 -0
- package/lib/plugins/salesforce-to-salesforce/index.e2e-spec.js +34 -0
- package/lib/plugins/salesforce-to-salesforce/index.e2e-spec.js.map +1 -0
- package/lib/plugins/salesforce-to-salesforce/index.js +107 -0
- package/lib/plugins/salesforce-to-salesforce/index.js.map +1 -0
- package/lib/plugins/scheduled-batches/index.d.ts +10 -0
- package/lib/plugins/scheduled-batches/index.js +145 -0
- package/lib/plugins/scheduled-batches/index.js.map +1 -0
- package/lib/plugins/scheduled-batches/page.d.ts +19 -0
- package/lib/plugins/scheduled-batches/page.js +39 -0
- package/lib/plugins/scheduled-batches/page.js.map +1 -0
- package/lib/plugins/security/authentication-configuration/index.d.ts +15 -0
- package/lib/plugins/security/authentication-configuration/index.e2e-spec.d.ts +1 -0
- package/lib/plugins/security/authentication-configuration/index.e2e-spec.js +129 -0
- package/lib/plugins/security/authentication-configuration/index.e2e-spec.js.map +1 -0
- package/lib/plugins/security/authentication-configuration/index.js +200 -0
- package/lib/plugins/security/authentication-configuration/index.js.map +1 -0
- package/lib/plugins/security/certificate-and-key-management/index.d.ts +23 -0
- package/lib/plugins/security/certificate-and-key-management/index.e2e-spec.d.ts +1 -0
- package/lib/plugins/security/certificate-and-key-management/index.e2e-spec.js +59 -0
- package/lib/plugins/security/certificate-and-key-management/index.e2e-spec.js.map +1 -0
- package/lib/plugins/security/certificate-and-key-management/index.js +233 -0
- package/lib/plugins/security/certificate-and-key-management/index.js.map +1 -0
- package/lib/plugins/security/certificate-and-key-management/index.test.d.ts +1 -0
- package/lib/plugins/security/certificate-and-key-management/index.test.js +61 -0
- package/lib/plugins/security/certificate-and-key-management/index.test.js.map +1 -0
- package/lib/plugins/security/index.d.ts +13 -0
- package/lib/plugins/security/index.js +41 -0
- package/lib/plugins/security/index.js.map +1 -0
- package/lib/plugins/service-channels/capacity/index.d.ts +18 -0
- package/lib/plugins/service-channels/capacity/index.js +194 -0
- package/lib/plugins/service-channels/capacity/index.js.map +1 -0
- package/lib/plugins/service-channels/index.d.ts +12 -0
- package/lib/plugins/service-channels/index.e2e-spec.d.ts +1 -0
- package/lib/plugins/service-channels/index.e2e-spec.js +67 -0
- package/lib/plugins/service-channels/index.e2e-spec.js.map +1 -0
- package/lib/plugins/service-channels/index.js +37 -0
- package/lib/plugins/service-channels/index.js.map +1 -0
- package/lib/plugins/slack/index.d.ts +9 -0
- package/lib/plugins/slack/index.e2e-spec.d.ts +1 -0
- package/lib/plugins/slack/index.e2e-spec.js +47 -0
- package/lib/plugins/slack/index.e2e-spec.js.map +1 -0
- package/lib/plugins/slack/index.js +111 -0
- package/lib/plugins/slack/index.js.map +1 -0
- package/lib/plugins/user-access-policies/index.d.ts +19 -0
- package/lib/plugins/user-access-policies/index.e2e-spec.d.ts +1 -0
- package/lib/plugins/user-access-policies/index.e2e-spec.js +61 -0
- package/lib/plugins/user-access-policies/index.e2e-spec.js.map +1 -0
- package/lib/plugins/user-access-policies/index.js +176 -0
- package/lib/plugins/user-access-policies/index.js.map +1 -0
- package/lib/plugins/user-access-policies/page.d.ts +30 -0
- package/lib/plugins/user-access-policies/page.js +114 -0
- package/lib/plugins/user-access-policies/page.js.map +1 -0
- package/lib/plugins/utils.d.ts +13 -0
- package/lib/plugins/utils.js +159 -0
- package/lib/plugins/utils.js.map +1 -0
- package/oclif.manifest.json +177 -0
- package/package.json +65 -0
|
@@ -0,0 +1,101 @@
|
|
|
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
|
+
});
|
|
53
|
+
import { waitForPageErrors } from '../../browserforce.js';
|
|
54
|
+
import { BrowserforcePlugin } from '../../plugin.js';
|
|
55
|
+
const BASE_PATH = '/lightning/setup/DensitySetup/home';
|
|
56
|
+
const availableOptions = ['Comfy', 'Compact'];
|
|
57
|
+
export class DensitySettings extends BrowserforcePlugin {
|
|
58
|
+
async retrieve() {
|
|
59
|
+
const env_1 = { stack: [], error: void 0, hasError: false };
|
|
60
|
+
try {
|
|
61
|
+
const page = __addDisposableResource(env_1, await this.browserforce.openPage(BASE_PATH), true);
|
|
62
|
+
const density = (await page.locator('input[name="options"]:checked').getAttribute('value'));
|
|
63
|
+
return {
|
|
64
|
+
density,
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
catch (e_1) {
|
|
68
|
+
env_1.error = e_1;
|
|
69
|
+
env_1.hasError = true;
|
|
70
|
+
}
|
|
71
|
+
finally {
|
|
72
|
+
const result_1 = __disposeResources(env_1);
|
|
73
|
+
if (result_1)
|
|
74
|
+
await result_1;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
async apply(config) {
|
|
78
|
+
const env_2 = { stack: [], error: void 0, hasError: false };
|
|
79
|
+
try {
|
|
80
|
+
if (!availableOptions.includes(config.density)) {
|
|
81
|
+
throw new Error(`Could not find density "${config.density}". Available options: ${availableOptions.join(', ')}`);
|
|
82
|
+
}
|
|
83
|
+
const page = __addDisposableResource(env_2, await this.browserforce.openPage(BASE_PATH), true);
|
|
84
|
+
const densityPickerItem = page.locator(`one-density-visual-picker-item:has(input[name="options"][value="${config.density}"])`);
|
|
85
|
+
await Promise.all([
|
|
86
|
+
Promise.race([page.waitForResponse(/DensityUserSettings\.setDefaultDensitySetting=1/), waitForPageErrors(page)]),
|
|
87
|
+
densityPickerItem.click(),
|
|
88
|
+
]);
|
|
89
|
+
}
|
|
90
|
+
catch (e_2) {
|
|
91
|
+
env_2.error = e_2;
|
|
92
|
+
env_2.hasError = true;
|
|
93
|
+
}
|
|
94
|
+
finally {
|
|
95
|
+
const result_2 = __disposeResources(env_2);
|
|
96
|
+
if (result_2)
|
|
97
|
+
await result_2;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/plugins/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BAChH,iBAAiB,CAAC,KAAK,EAAE;aAC1B,CAAC,CAAC;;;;;;;;;;;KACJ;CACF"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export const DEPRECATED_DRIVERS = ['communities', 'defer-sharing-calculation'];
|
|
2
|
+
export const handleDeprecations = (definition) => {
|
|
3
|
+
for (const driverName of Object.keys(definition.settings)) {
|
|
4
|
+
if (DEPRECATED_DRIVERS.includes(driverName)) {
|
|
5
|
+
throw new Error(`The sfdx-browserforce-plugin setting '${driverName}' is deprecated and has been removed.
|
|
6
|
+
✅ Salesforce now supports this setting in the Metadata API.
|
|
7
|
+
👉 Please see the instructions at https://github.com/amtrack/sfdx-browserforce-plugin/wiki/Hall-of-Fame#${driverName}.`);
|
|
8
|
+
}
|
|
9
|
+
if (driverName === 'security') {
|
|
10
|
+
if (definition.settings[driverName]?.loginAccessPolicies !== undefined) {
|
|
11
|
+
throw new Error(`The sfdx-browserforce-plugin setting 'security.loginAccessPolicies' is deprecated and has been removed.
|
|
12
|
+
✅ Salesforce now supports this setting in the Metadata API.
|
|
13
|
+
👉 Please see the instructions at https://github.com/amtrack/sfdx-browserforce-plugin/wiki/Hall-of-Fame#security-loginaccesspolicies-administratorscanloginasanyuser.`);
|
|
14
|
+
}
|
|
15
|
+
if (definition.settings[driverName]?.identityProvider !== undefined) {
|
|
16
|
+
throw new Error(`The sfdx-browserforce-plugin setting 'security.identityProvider' is deprecated and has been removed.
|
|
17
|
+
✅ Salesforce now supports this setting in the Metadata API.
|
|
18
|
+
👉 Please see the instructions at https://github.com/amtrack/sfdx-browserforce-plugin/wiki/Hall-of-Fame#security-identityprovider.`);
|
|
19
|
+
}
|
|
20
|
+
if (definition.settings[driverName]?.sharing !== undefined) {
|
|
21
|
+
throw new Error(`The sfdx-browserforce-plugin setting 'security.sharing' is deprecated and has been removed.
|
|
22
|
+
✅ Salesforce now supports this setting in the Metadata API.
|
|
23
|
+
👉 Please see the instructions at https://github.com/amtrack/sfdx-browserforce-plugin/wiki/Hall-of-Fame#security-sharing.`);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=deprecated.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deprecated.js","sourceRoot":"","sources":["../../src/plugins/deprecated.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,aAAa,EAAE,2BAA2B,CAAC,CAAC;AAE/E,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,UAAiC,EAAE,EAAE;IACtE,KAAK,MAAM,UAAU,IAAI,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC1D,IAAI,kBAAkB,CAAC,QAAQ,CAAC,UAAU,CAAC,EAAE,CAAC;YAC5C,MAAM,IAAI,KAAK,CACb,yCAAyC,UAAU;;0GAE+C,UAAU,GAAG,CAChH,CAAC;QACJ,CAAC;QACD,IAAI,UAAU,KAAK,UAAU,EAAE,CAAC;YAC9B,IAAI,UAAU,CAAC,QAAQ,CAAC,UAAU,CAAC,EAAE,mBAAmB,KAAK,SAAS,EAAE,CAAC;gBACvE,MAAM,IAAI,KAAK,CACb;;sKAE4J,CAC7J,CAAC;YACJ,CAAC;YACD,IAAI,UAAU,CAAC,QAAQ,CAAC,UAAU,CAAC,EAAE,gBAAgB,KAAK,SAAS,EAAE,CAAC;gBACpE,MAAM,IAAI,KAAK,CACb;;mIAEyH,CAC1H,CAAC;YACJ,CAAC;YACD,IAAI,UAAU,CAAC,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,KAAK,SAAS,EAAE,CAAC;gBAC3D,MAAM,IAAI,KAAK,CACb;;0HAEgH,CACjH,CAAC;YACJ,CAAC;QACH,CAAC;IACH,CAAC;AACH,CAAC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BrowserforcePlugin } from '../../plugin.js';
|
|
2
|
+
type Config = {
|
|
3
|
+
accessLevel: string;
|
|
4
|
+
};
|
|
5
|
+
export declare class EmailDeliverability extends BrowserforcePlugin {
|
|
6
|
+
retrieve(definition?: Config): Promise<Config>;
|
|
7
|
+
apply(config: Config): Promise<void>;
|
|
8
|
+
}
|
|
9
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import assert from 'assert';
|
|
2
|
+
import { EmailDeliverability } from './index.js';
|
|
3
|
+
describe(EmailDeliverability.name, function () {
|
|
4
|
+
let plugin;
|
|
5
|
+
before(() => {
|
|
6
|
+
plugin = new EmailDeliverability(global.browserforce);
|
|
7
|
+
});
|
|
8
|
+
const configNone = {
|
|
9
|
+
accessLevel: 'No access',
|
|
10
|
+
};
|
|
11
|
+
const configAll = {
|
|
12
|
+
accessLevel: 'All email',
|
|
13
|
+
};
|
|
14
|
+
const configSystem = {
|
|
15
|
+
accessLevel: 'System email only',
|
|
16
|
+
};
|
|
17
|
+
const configInvalid = {
|
|
18
|
+
accessLevel: 'Invalid',
|
|
19
|
+
};
|
|
20
|
+
// Note order is important here, the scratch org will be created with all access set, I have placed last so if a scratch is reused at least it is in the same state
|
|
21
|
+
it('should set "no access"', async () => {
|
|
22
|
+
await plugin.run(configNone);
|
|
23
|
+
});
|
|
24
|
+
it('should already be set to "no access"', async () => {
|
|
25
|
+
const res = await plugin.retrieve();
|
|
26
|
+
assert.deepStrictEqual(res, configNone);
|
|
27
|
+
});
|
|
28
|
+
it('should set "system only"', async () => {
|
|
29
|
+
await plugin.apply(configSystem);
|
|
30
|
+
});
|
|
31
|
+
it('should be set to "system only"', async () => {
|
|
32
|
+
const res = await plugin.retrieve();
|
|
33
|
+
assert.deepStrictEqual(res, configSystem);
|
|
34
|
+
});
|
|
35
|
+
it('should apply all email', async () => {
|
|
36
|
+
await plugin.apply(configAll);
|
|
37
|
+
});
|
|
38
|
+
it('should already be have all enabled', async () => {
|
|
39
|
+
const res = await plugin.retrieve();
|
|
40
|
+
assert.deepStrictEqual(res, configAll);
|
|
41
|
+
});
|
|
42
|
+
it('should error on invalid input', async () => {
|
|
43
|
+
let err;
|
|
44
|
+
try {
|
|
45
|
+
await plugin.apply(configInvalid);
|
|
46
|
+
}
|
|
47
|
+
catch (e) {
|
|
48
|
+
err = e;
|
|
49
|
+
}
|
|
50
|
+
assert.throws(() => {
|
|
51
|
+
throw err;
|
|
52
|
+
}, /Invalid email access level/);
|
|
53
|
+
});
|
|
54
|
+
});
|
|
55
|
+
//# sourceMappingURL=index.e2e-spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.e2e-spec.js","sourceRoot":"","sources":["../../../src/plugins/email-deliverability/index.e2e-spec.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEjD,QAAQ,CAAC,mBAAmB,CAAC,IAAI,EAAE;IACjC,IAAI,MAA2B,CAAC;IAChC,MAAM,CAAC,GAAG,EAAE;QACV,MAAM,GAAG,IAAI,mBAAmB,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;IACxD,CAAC,CAAC,CAAC;IACH,MAAM,UAAU,GAAG;QACjB,WAAW,EAAE,WAAW;KACzB,CAAC;IACF,MAAM,SAAS,GAAG;QAChB,WAAW,EAAE,WAAW;KACzB,CAAC;IACF,MAAM,YAAY,GAAG;QACnB,WAAW,EAAE,mBAAmB;KACjC,CAAC;IACF,MAAM,aAAa,GAAG;QACpB,WAAW,EAAE,SAAS;KACvB,CAAC;IAEF,mKAAmK;IACnK,EAAE,CAAC,wBAAwB,EAAE,KAAK,IAAI,EAAE;QACtC,MAAM,MAAM,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;IAC/B,CAAC,CAAC,CAAC;IACH,EAAE,CAAC,sCAAsC,EAAE,KAAK,IAAI,EAAE;QACpD,MAAM,GAAG,GAAG,M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
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
|
+
});
|
|
53
|
+
import { BrowserforcePlugin } from '../../plugin.js';
|
|
54
|
+
const BASE_PATH = '/email-admin/editOrgEmailSettings.apexp';
|
|
55
|
+
const ACCESS_LEVEL_SELECTOR = 'select[id$=":sendEmailAccessControlSelect"]';
|
|
56
|
+
const CONFIRM_MESSAGE_SELECTOR = 'span[id$=":successText"]';
|
|
57
|
+
const SAVE_BUTTON_SELECTOR = 'input[id$=":saveBtn"]';
|
|
58
|
+
const ACCESS_LEVEL_VALUES = new Map([
|
|
59
|
+
['No access', '0'],
|
|
60
|
+
['System email only', '1'],
|
|
61
|
+
['All email', '2'],
|
|
62
|
+
]);
|
|
63
|
+
export class EmailDeliverability extends BrowserforcePlugin {
|
|
64
|
+
async retrieve(definition) {
|
|
65
|
+
const env_1 = { stack: [], error: void 0, hasError: false };
|
|
66
|
+
try {
|
|
67
|
+
const page = __addDisposableResource(env_1, await this.browserforce.openPage(BASE_PATH), true);
|
|
68
|
+
const selectedOption = await page.locator(`${ACCESS_LEVEL_SELECTOR} > option[selected]`).textContent();
|
|
69
|
+
if (!selectedOption) {
|
|
70
|
+
throw new Error('Selected access level not found...');
|
|
71
|
+
}
|
|
72
|
+
return {
|
|
73
|
+
accessLevel: selectedOption,
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
catch (e_1) {
|
|
77
|
+
env_1.error = e_1;
|
|
78
|
+
env_1.hasError = true;
|
|
79
|
+
}
|
|
80
|
+
finally {
|
|
81
|
+
const result_1 = __disposeResources(env_1);
|
|
82
|
+
if (result_1)
|
|
83
|
+
await result_1;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
async apply(config) {
|
|
87
|
+
const env_2 = { stack: [], error: void 0, hasError: false };
|
|
88
|
+
try {
|
|
89
|
+
const accessLevelNumber = ACCESS_LEVEL_VALUES.get(config.accessLevel);
|
|
90
|
+
if (accessLevelNumber === undefined) {
|
|
91
|
+
throw new Error(`Invalid email access level ${config.accessLevel}`);
|
|
92
|
+
}
|
|
93
|
+
const page = __addDisposableResource(env_2, await this.browserforce.openPage(BASE_PATH), true);
|
|
94
|
+
await page.locator(ACCESS_LEVEL_SELECTOR).selectOption(accessLevelNumber);
|
|
95
|
+
await page.locator(SAVE_BUTTON_SELECTOR).click();
|
|
96
|
+
await page.locator(CONFIRM_MESSAGE_SELECTOR).waitFor();
|
|
97
|
+
}
|
|
98
|
+
catch (e_2) {
|
|
99
|
+
env_2.error = e_2;
|
|
100
|
+
env_2.hasError = true;
|
|
101
|
+
}
|
|
102
|
+
finally {
|
|
103
|
+
const result_2 = __disposeResources(env_2);
|
|
104
|
+
if (result_2)
|
|
105
|
+
await result_2;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/plugins/email-deliverability/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAErD,MAAM,SAAS,GAAG,yCAAyC,CAAC;AAE5D,MAAM,qBAAqB,GAAG,6CAA6C,CAAC;AAC5E,MAAM,wBAAwB,GAAG,0BAA0B,CAAC;AAC5D,MAAM,oBAAoB,GAAG,uBAAuB,CAAC;AAErD,MAAM,mBAAmB,GAAG,IAAI,GAAG,CAAC;IAClC,CAAC,WAAW,EAAE,GAAG,CAAC;IAClB,CAAC,m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../plugin.js';
|
|
3
|
+
export type Config = {
|
|
4
|
+
setUpAndEnable: boolean;
|
|
5
|
+
};
|
|
6
|
+
export declare class HighVelocitySalesSettings extends BrowserforcePlugin {
|
|
7
|
+
retrieve(definition?: Config): Promise<Config>;
|
|
8
|
+
apply(config: Config): Promise<void>;
|
|
9
|
+
}
|
|
10
|
+
export declare function disableHighVelocitySalesUsingMetadata(connection: Connection): Promise<void>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import assert from 'assert';
|
|
2
|
+
import { HighVelocitySalesSettings } from './index.js';
|
|
3
|
+
describe(HighVelocitySalesSettings.name, function () {
|
|
4
|
+
let plugin;
|
|
5
|
+
before(() => {
|
|
6
|
+
plugin = new HighVelocitySalesSettings(global.browserforce);
|
|
7
|
+
});
|
|
8
|
+
const configEnabled = {
|
|
9
|
+
setUpAndEnable: true,
|
|
10
|
+
};
|
|
11
|
+
const configDisabled = {
|
|
12
|
+
setUpAndEnable: false,
|
|
13
|
+
};
|
|
14
|
+
it('should enable', async () => {
|
|
15
|
+
await plugin.run(configEnabled);
|
|
16
|
+
});
|
|
17
|
+
it('should already be enabled', async () => {
|
|
18
|
+
const res = await plugin.run(configEnabled);
|
|
19
|
+
assert.deepStrictEqual(res, { message: 'no action necessary' });
|
|
20
|
+
});
|
|
21
|
+
it('should disable', async () => {
|
|
22
|
+
await plugin.run(configDisabled);
|
|
23
|
+
});
|
|
24
|
+
it('should already be disabled', async () => {
|
|
25
|
+
const res = await plugin.run(configDisabled);
|
|
26
|
+
assert.deepStrictEqual(res, { message: 'no action necessary' });
|
|
27
|
+
});
|
|
28
|
+
});
|
|
29
|
+
//# sourceMappingURL=index.e2e-spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.e2e-spec.js","sourceRoot":"","sources":["../../../src/plugins/high-velocity-sales-settings/index.e2e-spec.ts"],"names":[],"mappings":"AAAA,OAAO,M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
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
|
+
});
|
|
53
|
+
import { BrowserforcePlugin } from '../../plugin.js';
|
|
54
|
+
import { HighVelocitySalesSetupPage } from './page.js';
|
|
55
|
+
const MSG_NOT_AVAILABLE = `HighVelocitySales is not available in this organization.
|
|
56
|
+
Please add 'HighVelocitySales' to your Scratch Org Features or purchase a license.`;
|
|
57
|
+
export class HighVelocitySalesSettings extends BrowserforcePlugin {
|
|
58
|
+
async retrieve(definition) {
|
|
59
|
+
const result = { setUpAndEnable: false };
|
|
60
|
+
try {
|
|
61
|
+
const settings = await this.browserforce.connection.metadata.read('HighVelocitySalesSettings', 'HighVelocitySales');
|
|
62
|
+
result.setUpAndEnable = settings['enableHighVelocitySalesSetup'] === true;
|
|
63
|
+
}
|
|
64
|
+
catch (e) {
|
|
65
|
+
if (/INVALID_TYPE: This type of metadata is not available for this organization/.test(e)) {
|
|
66
|
+
throw new Error(MSG_NOT_AVAILABLE);
|
|
67
|
+
}
|
|
68
|
+
else {
|
|
69
|
+
throw e;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
return result;
|
|
73
|
+
}
|
|
74
|
+
async apply(config) {
|
|
75
|
+
if (config.setUpAndEnable) {
|
|
76
|
+
const env_1 = { stack: [], error: void 0, hasError: false };
|
|
77
|
+
try {
|
|
78
|
+
const page = __addDisposableResource(env_1, await this.browserforce.openPage(HighVelocitySalesSetupPage.getUrl()), true);
|
|
79
|
+
const hvs = new HighVelocitySalesSetupPage(page);
|
|
80
|
+
await hvs.setUpAndEnable();
|
|
81
|
+
}
|
|
82
|
+
catch (e_1) {
|
|
83
|
+
env_1.error = e_1;
|
|
84
|
+
env_1.hasError = true;
|
|
85
|
+
}
|
|
86
|
+
finally {
|
|
87
|
+
const result_1 = __disposeResources(env_1);
|
|
88
|
+
if (result_1)
|
|
89
|
+
await result_1;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
else {
|
|
93
|
+
await disableHighVelocitySalesUsingMetadata(this.browserforce.connection);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
export async function disableHighVelocitySalesUsingMetadata(connection) {
|
|
98
|
+
const settings = {
|
|
99
|
+
fullName: 'HighVelocitySales',
|
|
100
|
+
enableHighVelocitySalesSetup: false,
|
|
101
|
+
enableHighVelocitySales: false,
|
|
102
|
+
};
|
|
103
|
+
await connection.metadata.update('HighVelocitySalesSettings', settings);
|
|
104
|
+
}
|
|
105
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +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,MAAM,GAAG,EAAE,cAAc,EAAE,KAAK,EAAE,CAAC;QACzC,IAAI,CAAC;YACH,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC,QAAQ,CAAC,IAAI,CAC/D,2BAA2B,EAC3B,mBAAmB,CACpB,CAAC;YACF,MAAM,CAAC,cAAc,GAAG,QAAQ,CAAC,8BAA8B,CAAC,KAAK,IAAI,CAAC;QAC5E,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,IAAI,4EAA4E,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC;gBACzF,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAC;YACrC,CAAC;iBAAM,CAAC;gBACN,MAAM,CAAC,CAAC;YACV,CAAC;QACH,CAAC;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;IAEM,KAAK,CAAC,KAAK,CAAC,MAAc;QAC/B,IAAI,MAAM,CAAC,cAAc,EAAE,CAAC;;;gBAC1B,MAAY,IAAI,kCAAG,MAAM,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,0BAA0B,CAAC,MAAM,EAAE,CAAC,OAAA,CAAC;gBACzF,MAAM,GAAG,GAAG,IAAI,0BAA0B,CAAC,IAAI,CAAC,CAAC;gBACjD,MAAM,GAAG,CAAC,cAAc,EAAE,CAAC;;;;;;;;;;;SAC5B;aAAM,CAAC;YACN,MAAM,qCAAqC,CAAC,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC;QAC5E,CAAC;IACH,CAAC;CACF;AAED,MAAM,CAAC,KAAK,UAAU,qCAAqC,CAAC,UAAsB;IAChF,MAAM,QAAQ,GAAG;QACf,QAAQ,EAAE,mBAAmB;QAC7B,4BAA4B,EAAE,KAAK;QACnC,uBAAuB,EAAE,KAAK;KAC/B,CAAC;IACF,MAAM,UAAU,CAAC,QAAQ,CAAC,MAAM,CAAC,2BAA2B,EAAE,QAAQ,CAAC,CAAC;AAC1E,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Page } from 'playwright';
|
|
2
|
+
import { type SalesforceUrlPath } from '../../browserforce.js';
|
|
3
|
+
export declare class HighVelocitySalesSetupPage {
|
|
4
|
+
private page;
|
|
5
|
+
constructor(page: Page);
|
|
6
|
+
static getUrl(): SalesforceUrlPath;
|
|
7
|
+
setUpAndEnable(): Promise<void>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { waitForPageErrors } from '../../browserforce.js';
|
|
2
|
+
const SET_UP_AND_ENABLE_HVS_BUTTON = 'button.setupAndEnableButton';
|
|
3
|
+
const ENABLE_TOGGLE = '#toggleHighVelocitySalesPref';
|
|
4
|
+
const AUTOMATION_TAB_ITEM = 'lightning-tab-bar li[data-tab-value="automationTab"]';
|
|
5
|
+
export class HighVelocitySalesSetupPage {
|
|
6
|
+
page;
|
|
7
|
+
constructor(page) {
|
|
8
|
+
this.page = page;
|
|
9
|
+
}
|
|
10
|
+
static getUrl() {
|
|
11
|
+
return '/lightning/setup/SalesEngagement/home';
|
|
12
|
+
}
|
|
13
|
+
async setUpAndEnable() {
|
|
14
|
+
await Promise.race([
|
|
15
|
+
this.page.locator(AUTOMATION_TAB_ITEM).waitFor(),
|
|
16
|
+
// workaround: Starting Spring '26 there is a modal "Event fired" on page load.
|
|
17
|
+
this.page.locator(`div[role=dialog] button.slds-modal__close`).click(),
|
|
18
|
+
]);
|
|
19
|
+
const tabCount = await this.page.locator(AUTOMATION_TAB_ITEM).count();
|
|
20
|
+
if (tabCount > 0) {
|
|
21
|
+
await this.page.locator(AUTOMATION_TAB_ITEM).click();
|
|
22
|
+
}
|
|
23
|
+
await this.page.locator(SET_UP_AND_ENABLE_HVS_BUTTON).click();
|
|
24
|
+
await Promise.race([this.page.locator(ENABLE_TOGGLE).waitFor({ timeout: 90_000 }), waitForPageErrors(this.page)]);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=page.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"page.js","sourceRoot":"","sources":["../../../src/plugins/high-velocity-sales-settings/page.ts"],"names":[],"mappings":"AACA,OAAO,EAA0B,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAElF,MAAM,4BAA4B,GAAG,6BAA6B,CAAC;AACnE,MAAM,aAAa,GAAG,8BAA8B,CAAC;AACrD,MAAM,mBAAmB,GAAG,sDAAsD,CAAC;AAEnF,MAAM,OAAO,0BAA0B;IAC7B,IAAI,CAAO;IAEnB,YAAY,IAAU;QACpB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;IAEM,MAAM,CAAC,MAAM;QAClB,OAAO,uCAAuC,CAAC;IACjD,CAAC;IAEM,KAAK,CAAC,cAAc;QACzB,MAAM,OAAO,CAAC,IAAI,CAAC;YACjB,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC,OAAO,EAAE;YAChD,+EAA+E;YAC/E,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,2CAA2C,CAAC,CAAC,KAAK,EAAE;SACvE,CAAC,CAAC;QACH,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,mBAAmB,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,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC,OAAO,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,EAAE,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACpH,CAAC;CACF"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { BrowserforcePlugin } from '../../plugin.js';
|
|
2
|
+
type HistoryTrackingConfig = {
|
|
3
|
+
objectApiName: string;
|
|
4
|
+
enableHistoryTracking?: boolean;
|
|
5
|
+
fieldHistoryTracking?: FieldHistoryTrackingConfig[];
|
|
6
|
+
};
|
|
7
|
+
export type FieldHistoryTrackingConfig = {
|
|
8
|
+
fieldApiName: string;
|
|
9
|
+
enableHistoryTracking: boolean;
|
|
10
|
+
};
|
|
11
|
+
export declare class HistoryTracking extends BrowserforcePlugin {
|
|
12
|
+
retrieve(definition?: HistoryTrackingConfig[]): Promise<HistoryTrackingConfig[]>;
|
|
13
|
+
apply(plan: HistoryTrackingConfig[]): Promise<void>;
|
|
14
|
+
private queryCustomFieldsAndPopulateMap;
|
|
15
|
+
private parseNamespacedFieldApiName;
|
|
16
|
+
private getFieldSelectorByFieldApiName;
|
|
17
|
+
private getTableEnumOrIdByObjectApiName;
|
|
18
|
+
}
|
|
19
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|