sfdx-browserforce-plugin 4.2.0 → 4.4.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/bin/run +6 -5
- package/lib/browserforce-command.d.ts +8 -0
- package/lib/browserforce-command.js +32 -63
- package/lib/browserforce-command.js.map +1 -1
- package/lib/browserforce.d.ts +20 -0
- package/lib/browserforce.js +14 -19
- package/lib/browserforce.js.map +1 -1
- package/lib/commands/browserforce/apply.d.ts +10 -0
- package/lib/commands/browserforce/apply.js +15 -20
- package/lib/commands/browserforce/apply.js.map +1 -1
- package/lib/commands/browserforce/plan.d.ts +10 -0
- package/lib/commands/browserforce/plan.js +17 -47
- package/lib/commands/browserforce/plan.js.map +1 -1
- package/lib/config-parser.d.ts +16 -0
- package/lib/config-parser.js +1 -5
- package/lib/config-parser.js.map +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.js +1 -2
- package/lib/jsforce-utils.d.ts +5 -0
- package/lib/jsforce-utils.js +1 -5
- package/lib/jsforce-utils.js.map +1 -1
- package/lib/pages/login.d.ts +8 -0
- package/lib/pages/login.js +2 -5
- package/lib/pages/login.js.map +1 -1
- package/lib/plugin.d.ts +17 -0
- package/lib/plugin.js +5 -7
- package/lib/plugin.js.map +1 -1
- 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 +6 -11
- package/lib/plugins/activity-settings/index.e2e-spec.js.map +1 -1
- package/lib/plugins/activity-settings/index.js +2 -6
- package/lib/plugins/activity-settings/index.js.map +1 -1
- package/lib/plugins/communities/index.d.ts +10 -0
- package/lib/plugins/communities/index.e2e-spec.d.ts +1 -0
- package/lib/plugins/communities/index.e2e-spec.js +6 -11
- package/lib/plugins/communities/index.e2e-spec.js.map +1 -1
- package/lib/plugins/communities/index.js +2 -6
- package/lib/plugins/communities/index.js.map +1 -1
- 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 +6 -11
- package/lib/plugins/company-information/index.e2e-spec.js.map +1 -1
- package/lib/plugins/company-information/index.js +2 -6
- package/lib/plugins/company-information/index.js.map +1 -1
- package/lib/plugins/customer-portal/available-custom-objects/index.d.ts +14 -0
- package/lib/plugins/customer-portal/available-custom-objects/index.js +4 -8
- package/lib/plugins/customer-portal/available-custom-objects/index.js.map +1 -1
- 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 +4 -9
- package/lib/plugins/customer-portal/available-custom-objects/index.test.js.map +1 -1
- package/lib/plugins/customer-portal/enabled/index.d.ts +6 -0
- package/lib/plugins/customer-portal/enabled/index.js +2 -6
- package/lib/plugins/customer-portal/enabled/index.js.map +1 -1
- package/lib/plugins/customer-portal/enabled/index.test.d.ts +1 -0
- package/lib/plugins/customer-portal/enabled/index.test.js +4 -9
- package/lib/plugins/customer-portal/enabled/index.test.js.map +1 -1
- 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 +25 -51
- package/lib/plugins/customer-portal/index.e2e-spec.js.map +1 -1
- package/lib/plugins/customer-portal/index.js +14 -18
- package/lib/plugins/customer-portal/index.js.map +1 -1
- package/lib/plugins/customer-portal/index.test.d.ts +1 -0
- package/lib/plugins/customer-portal/index.test.js +4 -9
- package/lib/plugins/customer-portal/index.test.js.map +1 -1
- package/lib/plugins/customer-portal/portals/index.d.ts +25 -0
- package/lib/plugins/customer-portal/portals/index.js +6 -33
- package/lib/plugins/customer-portal/portals/index.js.map +1 -1
- package/lib/plugins/customer-portal/portals/index.test.d.ts +1 -0
- package/lib/plugins/customer-portal/portals/index.test.js +4 -9
- package/lib/plugins/customer-portal/portals/index.test.js.map +1 -1
- package/lib/plugins/defer-sharing-calculation/index.d.ts +9 -0
- package/lib/plugins/defer-sharing-calculation/index.e2e-spec.d.ts +1 -0
- package/lib/plugins/defer-sharing-calculation/index.e2e-spec.js +14 -40
- package/lib/plugins/defer-sharing-calculation/index.e2e-spec.js.map +1 -1
- package/lib/plugins/defer-sharing-calculation/index.js +2 -6
- package/lib/plugins/defer-sharing-calculation/index.js.map +1 -1
- package/lib/plugins/density-settings/index.d.ts +17 -0
- package/lib/plugins/density-settings/index.e2e-spec.d.ts +1 -0
- package/lib/plugins/density-settings/index.e2e-spec.js +7 -12
- package/lib/plugins/density-settings/index.e2e-spec.js.map +1 -1
- package/lib/plugins/density-settings/index.js +2 -6
- package/lib/plugins/density-settings/index.js.map +1 -1
- 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 +8 -13
- package/lib/plugins/email-deliverability/index.e2e-spec.js.map +1 -1
- package/lib/plugins/email-deliverability/index.js +2 -6
- package/lib/plugins/email-deliverability/index.js.map +1 -1
- 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 +6 -11
- package/lib/plugins/high-velocity-sales-settings/index.e2e-spec.js.map +1 -1
- package/lib/plugins/high-velocity-sales-settings/index.js +5 -10
- package/lib/plugins/high-velocity-sales-settings/index.js.map +1 -1
- package/lib/plugins/high-velocity-sales-settings/page.d.ts +7 -0
- package/lib/plugins/high-velocity-sales-settings/page.js +7 -10
- package/lib/plugins/high-velocity-sales-settings/page.js.map +1 -1
- 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 +6 -11
- package/lib/plugins/home-page-layouts/index.e2e-spec.js.map +1 -1
- package/lib/plugins/home-page-layouts/index.js +2 -6
- package/lib/plugins/home-page-layouts/index.js.map +1 -1
- package/lib/plugins/home-page-layouts/index.test.d.ts +1 -0
- package/lib/plugins/home-page-layouts/index.test.js +4 -9
- package/lib/plugins/home-page-layouts/index.test.js.map +1 -1
- package/lib/plugins/index.d.ts +21 -0
- package/lib/plugins/index.js +21 -41
- package/lib/plugins/index.js.map +1 -1
- 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 +7 -12
- package/lib/plugins/lightning-experience-settings/index.e2e-spec.js.map +1 -1
- package/lib/plugins/lightning-experience-settings/index.js +2 -6
- package/lib/plugins/lightning-experience-settings/index.js.map +1 -1
- 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 +6 -11
- package/lib/plugins/linkedin-sales-navigator-settings/index.e2e-spec.js.map +1 -1
- package/lib/plugins/linkedin-sales-navigator-settings/index.js +5 -9
- package/lib/plugins/linkedin-sales-navigator-settings/index.js.map +1 -1
- package/lib/plugins/linkedin-sales-navigator-settings/page.d.ts +8 -0
- package/lib/plugins/linkedin-sales-navigator-settings/page.js +4 -7
- package/lib/plugins/linkedin-sales-navigator-settings/page.js.map +1 -1
- 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 +11 -37
- package/lib/plugins/opportunity-splits/index.e2e-spec.js.map +1 -1
- package/lib/plugins/opportunity-splits/index.js +10 -14
- package/lib/plugins/opportunity-splits/index.js.map +1 -1
- package/lib/plugins/opportunity-splits/pages/layout-selection.d.ts +8 -0
- package/lib/plugins/opportunity-splits/pages/layout-selection.js +5 -8
- package/lib/plugins/opportunity-splits/pages/layout-selection.js.map +1 -1
- package/lib/plugins/opportunity-splits/pages/overview.d.ts +10 -0
- package/lib/plugins/opportunity-splits/pages/overview.js +3 -6
- package/lib/plugins/opportunity-splits/pages/overview.js.map +1 -1
- package/lib/plugins/opportunity-splits/pages/setup.d.ts +8 -0
- package/lib/plugins/opportunity-splits/pages/setup.js +5 -8
- package/lib/plugins/opportunity-splits/pages/setup.js.map +1 -1
- package/lib/plugins/picklists/field-dependencies/index.d.ts +11 -0
- package/lib/plugins/picklists/field-dependencies/index.js +10 -14
- package/lib/plugins/picklists/field-dependencies/index.js.map +1 -1
- package/lib/plugins/picklists/field-dependencies/index.test.d.ts +1 -0
- package/lib/plugins/picklists/field-dependencies/index.test.js +4 -9
- package/lib/plugins/picklists/field-dependencies/index.test.js.map +1 -1
- package/lib/plugins/picklists/field-dependencies/pages.d.ts +14 -0
- package/lib/plugins/picklists/field-dependencies/pages.js +9 -12
- package/lib/plugins/picklists/field-dependencies/pages.js.map +1 -1
- 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 +30 -52
- package/lib/plugins/picklists/index.e2e-spec.js.map +1 -1
- package/lib/plugins/picklists/index.js +17 -21
- package/lib/plugins/picklists/index.js.map +1 -1
- package/lib/plugins/picklists/pages.d.ts +40 -0
- package/lib/plugins/picklists/pages.js +12 -16
- package/lib/plugins/picklists/pages.js.map +1 -1
- package/lib/plugins/picklists/standard-value-set.d.ts +1 -0
- package/lib/plugins/picklists/standard-value-set.js +3 -10
- package/lib/plugins/picklists/standard-value-set.js.map +1 -1
- package/lib/plugins/record-types/index.d.ts +13 -0
- package/lib/plugins/record-types/index.e2e-spec.d.ts +1 -0
- package/lib/plugins/record-types/index.e2e-spec.js +12 -38
- package/lib/plugins/record-types/index.e2e-spec.js.map +1 -1
- package/lib/plugins/record-types/index.js +4 -8
- package/lib/plugins/record-types/index.js.map +1 -1
- package/lib/plugins/record-types/pages.d.ts +15 -0
- package/lib/plugins/record-types/pages.js +5 -8
- package/lib/plugins/record-types/pages.js.map +1 -1
- 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 +6 -11
- package/lib/plugins/relate-contact-to-multiple-accounts/index.e2e-spec.js.map +1 -1
- package/lib/plugins/relate-contact-to-multiple-accounts/index.js +5 -9
- package/lib/plugins/relate-contact-to-multiple-accounts/index.js.map +1 -1
- 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 +1 -1
- package/lib/plugins/reports-and-dashboards/folder-sharing/index.js +2 -6
- package/lib/plugins/reports-and-dashboards/folder-sharing/index.js.map +1 -1
- 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 +1 -1
- package/lib/plugins/reports-and-dashboards/index.js +6 -10
- package/lib/plugins/reports-and-dashboards/index.js.map +1 -1
- 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 +185 -0
- package/lib/plugins/salesforce-cpq-config/index.js.map +1 -0
- package/lib/plugins/salesforce-cpq-config/types.d.ts +16 -0
- package/lib/plugins/salesforce-cpq-config/types.js +2 -0
- package/lib/plugins/salesforce-cpq-config/types.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 +6 -11
- package/lib/plugins/salesforce-to-salesforce/index.e2e-spec.js.map +1 -1
- package/lib/plugins/salesforce-to-salesforce/index.js +4 -11
- package/lib/plugins/salesforce-to-salesforce/index.js.map +1 -1
- package/lib/plugins/security/certificate-and-key-management/index.d.ts +23 -0
- package/lib/plugins/security/certificate-and-key-management/index.js +6 -33
- package/lib/plugins/security/certificate-and-key-management/index.js.map +1 -1
- 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 +4 -9
- package/lib/plugins/security/certificate-and-key-management/index.test.js.map +1 -1
- package/lib/plugins/security/identity-provider/index.d.ts +9 -0
- package/lib/plugins/security/identity-provider/index.js +5 -32
- package/lib/plugins/security/identity-provider/index.js.map +1 -1
- package/lib/plugins/security/index.d.ts +17 -0
- package/lib/plugins/security/index.e2e-spec.d.ts +1 -0
- package/lib/plugins/security/index.e2e-spec.js +13 -18
- package/lib/plugins/security/index.e2e-spec.js.map +1 -1
- package/lib/plugins/security/index.js +18 -22
- package/lib/plugins/security/index.js.map +1 -1
- package/lib/plugins/security/login-access-policies/index.d.ts +8 -0
- package/lib/plugins/security/login-access-policies/index.e2e-spec.d.ts +1 -0
- package/lib/plugins/security/login-access-policies/index.e2e-spec.js +6 -11
- package/lib/plugins/security/login-access-policies/index.e2e-spec.js.map +1 -1
- package/lib/plugins/security/login-access-policies/index.js +2 -6
- package/lib/plugins/security/login-access-policies/index.js.map +1 -1
- package/lib/plugins/security/sharing/index.d.ts +8 -0
- package/lib/plugins/security/sharing/index.e2e-spec.d.ts +1 -0
- package/lib/plugins/security/sharing/index.e2e-spec.js +6 -11
- package/lib/plugins/security/sharing/index.e2e-spec.js.map +1 -1
- package/lib/plugins/security/sharing/index.js +2 -6
- package/lib/plugins/security/sharing/index.js.map +1 -1
- 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 +7 -12
- package/lib/plugins/slack/index.e2e-spec.js.map +1 -1
- package/lib/plugins/slack/index.js +2 -6
- package/lib/plugins/slack/index.js.map +1 -1
- package/lib/plugins/utils.d.ts +3 -0
- package/lib/plugins/utils.js +6 -12
- package/lib/plugins/utils.js.map +1 -1
- package/oclif.manifest.json +13 -85
- package/package.json +16 -23
- package/messages/browserforce.json +0 -7
package/bin/run
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// eslint-disable-next-line node/shebang
|
|
4
|
+
async function main() {
|
|
5
|
+
const { execute } = await import('@oclif/core');
|
|
6
|
+
await execute({ dir: import.meta.url });
|
|
7
|
+
}
|
|
4
8
|
|
|
5
|
-
|
|
6
|
-
.run()
|
|
7
|
-
.then(require("@oclif/core/flush"))
|
|
8
|
-
.catch(require("@oclif/core/handle"));
|
|
9
|
+
await main();
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { SfCommand } from '@salesforce/sf-plugins-core';
|
|
2
|
+
import { Browserforce } from './browserforce.js';
|
|
3
|
+
export declare abstract class BrowserforceCommand<T> extends SfCommand<T> {
|
|
4
|
+
protected bf: Browserforce;
|
|
5
|
+
protected settings: any[];
|
|
6
|
+
init(): Promise<void>;
|
|
7
|
+
finally(err?: Error): Promise<void>;
|
|
8
|
+
}
|
|
@@ -1,45 +1,38 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
})
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
})
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
return result;
|
|
1
|
+
import { Flags, SfCommand, Ux, requiredOrgFlagWithDeprecations } from '@salesforce/sf-plugins-core';
|
|
2
|
+
import { promises } from 'fs';
|
|
3
|
+
import * as path from 'path';
|
|
4
|
+
import { Browserforce } from './browserforce.js';
|
|
5
|
+
import { ConfigParser } from './config-parser.js';
|
|
6
|
+
import * as DRIVERS from './plugin.js';
|
|
7
|
+
const baseFlags = {
|
|
8
|
+
'target-org': requiredOrgFlagWithDeprecations,
|
|
9
|
+
definitionfile: Flags.string({
|
|
10
|
+
char: 'f',
|
|
11
|
+
description: 'path to a browserforce state file'
|
|
12
|
+
}),
|
|
13
|
+
planfile: Flags.string({
|
|
14
|
+
char: 'p',
|
|
15
|
+
name: 'plan',
|
|
16
|
+
description: 'path to a browserforce plan file'
|
|
17
|
+
}),
|
|
18
|
+
statefile: Flags.string({
|
|
19
|
+
char: 's',
|
|
20
|
+
name: 'state',
|
|
21
|
+
description: 'path to a browserforce definition file\nThe schema is similar to the scratch org definition file.\nSee https://github.com/amtrack/sfdx-browserforce-plugin#supported-org-preferences for supported values.'
|
|
22
|
+
})
|
|
24
23
|
};
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
const sf_plugins_core_1 = require("@salesforce/sf-plugins-core");
|
|
29
|
-
const fs_1 = require("fs");
|
|
30
|
-
const path = __importStar(require("path"));
|
|
31
|
-
const browserforce_1 = require("./browserforce");
|
|
32
|
-
const config_parser_1 = require("./config-parser");
|
|
33
|
-
const DRIVERS = __importStar(require("./plugins"));
|
|
34
|
-
core_1.Messages.importMessagesDirectory(__dirname);
|
|
35
|
-
const messages = core_1.Messages.loadMessages('sfdx-browserforce-plugin', 'browserforce');
|
|
36
|
-
class BrowserforceCommand extends sf_plugins_core_1.SfCommand {
|
|
24
|
+
export class BrowserforceCommand extends SfCommand {
|
|
25
|
+
bf;
|
|
26
|
+
settings;
|
|
37
27
|
async init() {
|
|
38
|
-
const { flags } = await this.parse(BrowserforceCommand);
|
|
39
28
|
await super.init();
|
|
29
|
+
const { flags } = await this.parse({
|
|
30
|
+
flags: this.ctor.flags,
|
|
31
|
+
baseFlags
|
|
32
|
+
});
|
|
40
33
|
let definition;
|
|
41
34
|
if (flags.definitionfile) {
|
|
42
|
-
const definitionFileData = await
|
|
35
|
+
const definitionFileData = await promises.readFile(path.resolve(flags.definitionfile), 'utf8');
|
|
43
36
|
try {
|
|
44
37
|
definition = JSON.parse(definitionFileData);
|
|
45
38
|
}
|
|
@@ -48,15 +41,12 @@ class BrowserforceCommand extends sf_plugins_core_1.SfCommand {
|
|
|
48
41
|
}
|
|
49
42
|
}
|
|
50
43
|
// TODO: use require.resolve to dynamically load plugins from npm packages
|
|
51
|
-
this.settings =
|
|
52
|
-
this.bf = new
|
|
44
|
+
this.settings = ConfigParser.parse(DRIVERS, definition);
|
|
45
|
+
this.bf = new Browserforce(flags['target-org'], new Ux({ jsonEnabled: this.jsonEnabled() }));
|
|
53
46
|
this.spinner.start('logging in');
|
|
54
47
|
await this.bf.login();
|
|
55
48
|
this.spinner.stop();
|
|
56
49
|
}
|
|
57
|
-
async run() {
|
|
58
|
-
throw new Error('BrowserforceCommand should not be run directly');
|
|
59
|
-
}
|
|
60
50
|
async finally(err) {
|
|
61
51
|
this.spinner.stop(err?.message);
|
|
62
52
|
if (this.bf) {
|
|
@@ -66,25 +56,4 @@ class BrowserforceCommand extends sf_plugins_core_1.SfCommand {
|
|
|
66
56
|
}
|
|
67
57
|
}
|
|
68
58
|
}
|
|
69
|
-
exports.BrowserforceCommand = BrowserforceCommand;
|
|
70
|
-
BrowserforceCommand.flags = {
|
|
71
|
-
'target-org': sf_plugins_core_1.requiredOrgFlagWithDeprecations,
|
|
72
|
-
definitionfile: sf_plugins_core_1.Flags.string({
|
|
73
|
-
char: 'f',
|
|
74
|
-
summary: messages.getMessage('definitionFileDescription'),
|
|
75
|
-
description: messages.getMessage('definitionFileDescription')
|
|
76
|
-
}),
|
|
77
|
-
planfile: sf_plugins_core_1.Flags.string({
|
|
78
|
-
char: 'p',
|
|
79
|
-
name: 'plan',
|
|
80
|
-
summary: messages.getMessage('planFileDescription'),
|
|
81
|
-
description: messages.getMessage('planFileDescription')
|
|
82
|
-
}),
|
|
83
|
-
statefile: sf_plugins_core_1.Flags.string({
|
|
84
|
-
char: 's',
|
|
85
|
-
name: 'state',
|
|
86
|
-
summary: messages.getMessage('stateFileDescription'),
|
|
87
|
-
description: messages.getMessage('stateFileDescription')
|
|
88
|
-
})
|
|
89
|
-
};
|
|
90
59
|
//# sourceMappingURL=browserforce-command.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browserforce-command.js","sourceRoot":"","sources":["../src/browserforce-command.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"browserforce-command.js","sourceRoot":"","sources":["../src/browserforce-command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE,EAAE,+BAA+B,EAAE,MAAM,6BAA6B,CAAC;AACpG,OAAO,EAAE,QAAQ,EAAE,MAAM,IAAI,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,KAAK,OAAO,MAAM,aAAa,CAAC;AAEvC,MAAM,SAAS,GAAG;IAChB,YAAY,EAAE,+BAA+B;IAC7C,cAAc,EAAE,KAAK,CAAC,MAAM,CAAC;QAC3B,IAAI,EAAE,GAAG;QACT,WAAW,EAAE,mCAAmC;KACjD,CAAC;IACF,QAAQ,EAAE,KAAK,CAAC,MAAM,CAAC;QACrB,IAAI,EAAE,GAAG;QACT,IAAI,EAAE,MAAM;QACZ,WAAW,EAAE,kCAAkC;KAChD,CAAC;IACF,SAAS,EAAE,KAAK,CAAC,MAAM,CAAC;QACtB,IAAI,EAAE,GAAG;QACT,IAAI,EAAE,OAAO;QACb,W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AAI,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;QAChC,IAAI,IAAI,CAAC,EAAE,EAAE,CAAC;YACZ,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC;YAClC,MAAM,IAAI,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC;YACvB,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;QACtB,CAAC;IACH,CAAC;CACF"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Org } from '@salesforce/core';
|
|
2
|
+
import { type Ux } from '@salesforce/sf-plugins-core';
|
|
3
|
+
import { Browser, Frame, Page, WaitForOptions } from 'puppeteer';
|
|
4
|
+
export declare class Browserforce {
|
|
5
|
+
org: Org;
|
|
6
|
+
logger?: Ux;
|
|
7
|
+
browser: Browser;
|
|
8
|
+
page: Page;
|
|
9
|
+
constructor(org: Org, logger?: Ux);
|
|
10
|
+
login(): Promise<Browserforce>;
|
|
11
|
+
logout(): Promise<Browserforce>;
|
|
12
|
+
throwPageErrors(page: Page): Promise<void>;
|
|
13
|
+
getNewPage(): Promise<Page>;
|
|
14
|
+
openPage(urlPath: string, options?: WaitForOptions): Promise<Page>;
|
|
15
|
+
waitForSelectorInFrameOrPage(page: Page, selector: string): Promise<Page | Frame>;
|
|
16
|
+
getMyDomain(): string | null;
|
|
17
|
+
getInstanceUrl(): string;
|
|
18
|
+
}
|
|
19
|
+
export declare function throwPageErrors(page: Page): Promise<void>;
|
|
20
|
+
export declare function retry<T>(input: (attemptCount: number) => PromiseLike<T> | T): Promise<T>;
|
package/lib/browserforce.js
CHANGED
|
@@ -1,22 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.retry = exports.throwPageErrors = exports.Browserforce = void 0;
|
|
7
|
-
const p_retry_1 = __importDefault(require("p-retry"));
|
|
8
|
-
const puppeteer_1 = require("puppeteer");
|
|
9
|
-
const login_1 = require("./pages/login");
|
|
1
|
+
import pRetry from 'p-retry';
|
|
2
|
+
import { launch } from 'puppeteer';
|
|
3
|
+
import { LoginPage } from './pages/login.js';
|
|
10
4
|
const ERROR_DIV_SELECTOR = '#errorTitle';
|
|
11
5
|
const ERROR_DIVS_SELECTOR = 'div.errorMsg';
|
|
12
6
|
const VF_IFRAME_SELECTOR = 'iframe[name^=vfFrameId]';
|
|
13
|
-
class Browserforce {
|
|
7
|
+
export class Browserforce {
|
|
8
|
+
org;
|
|
9
|
+
logger;
|
|
10
|
+
browser;
|
|
11
|
+
page;
|
|
14
12
|
constructor(org, logger) {
|
|
15
13
|
this.org = org;
|
|
16
14
|
this.logger = logger;
|
|
17
15
|
}
|
|
18
16
|
async login() {
|
|
19
|
-
this.browser = await
|
|
17
|
+
this.browser = await launch({
|
|
20
18
|
args: [
|
|
21
19
|
'--no-sandbox',
|
|
22
20
|
'--disable-setuid-sandbox',
|
|
@@ -27,7 +25,7 @@ class Browserforce {
|
|
|
27
25
|
});
|
|
28
26
|
const page = await this.getNewPage();
|
|
29
27
|
try {
|
|
30
|
-
const loginPage = new
|
|
28
|
+
const loginPage = new LoginPage(page);
|
|
31
29
|
await loginPage.login(this.org);
|
|
32
30
|
}
|
|
33
31
|
finally {
|
|
@@ -53,7 +51,7 @@ class Browserforce {
|
|
|
53
51
|
// path instead of url
|
|
54
52
|
async openPage(urlPath, options) {
|
|
55
53
|
let page;
|
|
56
|
-
const result = await (
|
|
54
|
+
const result = await pRetry(async () => {
|
|
57
55
|
page = await this.getNewPage();
|
|
58
56
|
const url = `${this.getInstanceUrl()}/${urlPath}`;
|
|
59
57
|
const response = await page.goto(url, options);
|
|
@@ -112,8 +110,7 @@ class Browserforce {
|
|
|
112
110
|
return this.org.getConnection().instanceUrl?.replace(/\/$/, '');
|
|
113
111
|
}
|
|
114
112
|
}
|
|
115
|
-
|
|
116
|
-
async function throwPageErrors(page) {
|
|
113
|
+
export async function throwPageErrors(page) {
|
|
117
114
|
const errorHandle = await page.$(ERROR_DIV_SELECTOR);
|
|
118
115
|
if (errorHandle) {
|
|
119
116
|
const errorMsg = await page.evaluate((div) => div.innerText, errorHandle);
|
|
@@ -136,9 +133,8 @@ async function throwPageErrors(page) {
|
|
|
136
133
|
}
|
|
137
134
|
}
|
|
138
135
|
}
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
const res = await (0, p_retry_1.default)(input, {
|
|
136
|
+
export async function retry(input) {
|
|
137
|
+
const res = await pRetry(input, {
|
|
142
138
|
onFailedAttempt: (error) => {
|
|
143
139
|
console.warn(`retrying ${error.retriesLeft} more time(s) because of "${error}"`);
|
|
144
140
|
},
|
|
@@ -147,5 +143,4 @@ async function retry(input) {
|
|
|
147
143
|
});
|
|
148
144
|
return res;
|
|
149
145
|
}
|
|
150
|
-
exports.retry = retry;
|
|
151
146
|
//# sourceMappingURL=browserforce.js.map
|
package/lib/browserforce.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browserforce.js","sourceRoot":"","sources":["../src/browserforce.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"browserforce.js","sourceRoot":"","sources":["../src/browserforce.ts"],"names":[],"mappings":"AAEA,OAAO,MAAM,MAAM,SAAS,CAAC;AAC7B,OAAO,EAAkB,MAAM,EAAwB,MAAM,WAAW,CAAC;AACzE,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE7C,MAAM,kBAAkB,GAAG,aAAa,CAAC;AACzC,MAAM,mBAAmB,GAAG,cAAc,CAAC;AAC3C,MAAM,kBAAkB,GAAG,yBAAyB,CAAC;AAErD,MAAM,OAAO,YAAY;IAChB,GAAG,CAAM;IACT,MAAM,CAAM;IACZ,OAAO,CAAU;IACjB,IAAI,CAAO;IAClB,YAAY,GAAQ,EAAE,MAAW;QAC/B,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;QACf,IAAI,CAAC,MAAM,GAAG,M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,IAAI,CAAC,YAAY,KAAK,CAAC,WAAW,6BAA6B,KAAK,GAAG,CAAC,CAAC;QACnF,CAAC;QACD,OAAO,EAAE,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,8BAA8B,IAAI,GAAG,EAAE,EAAE,CAAC;QACxE,UAAU,EAAE,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,6BAA6B,IAAI,MAAM,EAAE,EAAE,CAAC;KAC9E,CAAC,CAAC;IACH,OAAO,GAAG,CAAC;AACb,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BrowserforceCommand } from '../../browserforce-command.js';
|
|
2
|
+
type BrowserforceApplyResponse = {
|
|
3
|
+
success: boolean;
|
|
4
|
+
};
|
|
5
|
+
export declare class BrowserforceApply extends BrowserforceCommand<BrowserforceApplyResponse> {
|
|
6
|
+
static description: string;
|
|
7
|
+
static examples: string[];
|
|
8
|
+
run(): Promise<BrowserforceApplyResponse>;
|
|
9
|
+
}
|
|
10
|
+
export {};
|
|
@@ -1,11 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { BrowserforceCommand } from '../../browserforce-command.js';
|
|
2
|
+
export class BrowserforceApply extends BrowserforceCommand {
|
|
3
|
+
static description = 'apply a plan from a definition file';
|
|
4
|
+
static examples = [
|
|
5
|
+
`$ <%= config.bin %> <%= command.id %> -f ./config/setup-admin-login-as-any.json --target-org myOrg@example.com
|
|
6
|
+
logging in... done
|
|
7
|
+
Applying definition file ./config/setup-admin-login-as-any.json to org myOrg@example.com
|
|
8
|
+
[Security] retrieving state... done
|
|
9
|
+
[Security] changing 'loginAccessPolicies' to '{"administratorsCanLogInAsAnyUser":true}'... done
|
|
10
|
+
logging out... done
|
|
11
|
+
`
|
|
12
|
+
];
|
|
9
13
|
async run() {
|
|
10
14
|
const { flags } = await this.parse(BrowserforceApply);
|
|
11
15
|
this.log(`Applying definition file ${flags.definitionfile} to org ${flags['target-org'].getUsername()}`);
|
|
@@ -42,18 +46,9 @@ class BrowserforceApply extends browserforce_command_1.BrowserforceCommand {
|
|
|
42
46
|
this.log(`[${driver.name}] no action necessary`);
|
|
43
47
|
}
|
|
44
48
|
}
|
|
45
|
-
return {
|
|
49
|
+
return {
|
|
50
|
+
success: true
|
|
51
|
+
};
|
|
46
52
|
}
|
|
47
53
|
}
|
|
48
|
-
exports.BrowserforceApply = BrowserforceApply;
|
|
49
|
-
BrowserforceApply.description = messages.getMessage('applyCommandDescription');
|
|
50
|
-
BrowserforceApply.examples = [
|
|
51
|
-
`$ <%= config.bin %> <%= command.id %> -f ./config/setup-admin-login-as-any.json --target-org myOrg@example.com
|
|
52
|
-
logging in... done
|
|
53
|
-
Applying definition file ./config/setup-admin-login-as-any.json to org myOrg@example.com
|
|
54
|
-
[Security] retrieving state... done
|
|
55
|
-
[Security] changing 'loginAccessPolicies' to '{"administratorsCanLogInAsAnyUser":true}'... done
|
|
56
|
-
logging out... done
|
|
57
|
-
`
|
|
58
|
-
];
|
|
59
54
|
//# sourceMappingURL=apply.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apply.js","sourceRoot":"","sources":["../../../src/commands/browserforce/apply.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"apply.js","sourceRoot":"","sources":["../../../src/commands/browserforce/apply.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAMpE,MAAM,OAAO,iBAAkB,SAAQ,mBAA8C;IAC5E,MAAM,CAAC,WAAW,GAAG,qCAAqC,CAAC;IAC3D,MAAM,CAAC,QAAQ,GAAG;QACvB;;;;;;GAMD;KACA,CAAC;IAEK,KAAK,CAAC,GAAG;QACd,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC;QACtD,IAAI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gBAAC,OAAO,GAAG,EAAE,CAAC;oBACb,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;oBAC5B,MAAM,GAAG,CAAC;gBACZ,CAAC;gBACD,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;YACtB,CAAC;iBAAM,CAAC;gBACN,IAAI,CAAC,GAAG,CAAC,IAAI,MAAM,CAAC,IAAI,uBAAuB,CAAC,CAAC;YACnD,CAAC;QACH,CAAC;QACD,OAAO;YACL,OAAO,EAAE,IAAI;SACd,CAAC;IACJ,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BrowserforceCommand } from '../../browserforce-command.js';
|
|
2
|
+
type BrowserforceApplyResponse = {
|
|
3
|
+
success: boolean;
|
|
4
|
+
};
|
|
5
|
+
export declare class BrowserforcePlanCommand extends BrowserforceCommand<BrowserforceApplyResponse> {
|
|
6
|
+
static description: string;
|
|
7
|
+
static examples: string[];
|
|
8
|
+
run(): Promise<BrowserforceApplyResponse>;
|
|
9
|
+
}
|
|
10
|
+
export {};
|
|
@@ -1,36 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.BrowserforcePlanCommand = void 0;
|
|
27
|
-
const promises_1 = require("fs/promises");
|
|
28
|
-
const core_1 = require("@salesforce/core");
|
|
29
|
-
const path = __importStar(require("path"));
|
|
30
|
-
const browserforce_command_1 = require("../../browserforce-command");
|
|
31
|
-
core_1.Messages.importMessagesDirectory(__dirname);
|
|
32
|
-
const messages = core_1.Messages.loadMessages('sfdx-browserforce-plugin', 'browserforce');
|
|
33
|
-
class BrowserforcePlanCommand extends browserforce_command_1.BrowserforceCommand {
|
|
1
|
+
import { writeFile } from 'fs/promises';
|
|
2
|
+
import * as path from 'path';
|
|
3
|
+
import { BrowserforceCommand } from '../../browserforce-command.js';
|
|
4
|
+
export class BrowserforcePlanCommand extends BrowserforceCommand {
|
|
5
|
+
static description = 'retrieve state and generate plan file';
|
|
6
|
+
static examples = [
|
|
7
|
+
`$ <%= config.bin %> <%= command.id %> -f ./config/setup-admin-login-as-any.json --target-org myOrg@example.com
|
|
8
|
+
logging in... done
|
|
9
|
+
Generating plan with definition file ./config/setup-admin-login-as-any.json from org myOrg@example.com
|
|
10
|
+
[Security] retrieving state... done
|
|
11
|
+
[Security] generating plan... done
|
|
12
|
+
logging out... done
|
|
13
|
+
`
|
|
14
|
+
];
|
|
34
15
|
async run() {
|
|
35
16
|
const { flags } = await this.parse(BrowserforcePlanCommand);
|
|
36
17
|
this.log(`Generating plan with definition file ${flags.definitionfile} from org ${flags['target-org'].getUsername()}`);
|
|
@@ -61,26 +42,15 @@ class BrowserforcePlanCommand extends browserforce_command_1.BrowserforceCommand
|
|
|
61
42
|
}
|
|
62
43
|
if (flags.statefile) {
|
|
63
44
|
this.spinner.start('writing state file');
|
|
64
|
-
await
|
|
45
|
+
await writeFile(path.resolve(flags.statefile), JSON.stringify(state, null, 2));
|
|
65
46
|
this.spinner.stop();
|
|
66
47
|
}
|
|
67
48
|
if (flags.planfile) {
|
|
68
49
|
this.spinner.start('writing plan file');
|
|
69
|
-
await
|
|
50
|
+
await writeFile(path.resolve(flags.planfile), JSON.stringify(plan, null, 2));
|
|
70
51
|
this.spinner.stop();
|
|
71
52
|
}
|
|
72
|
-
return { success: true
|
|
53
|
+
return { success: true };
|
|
73
54
|
}
|
|
74
55
|
}
|
|
75
|
-
exports.BrowserforcePlanCommand = BrowserforcePlanCommand;
|
|
76
|
-
BrowserforcePlanCommand.description = messages.getMessage('planCommandDescription');
|
|
77
|
-
BrowserforcePlanCommand.examples = [
|
|
78
|
-
`$ <%= config.bin %> <%= command.id %> -f ./config/setup-admin-login-as-any.json --target-org myOrg@example.com
|
|
79
|
-
logging in... done
|
|
80
|
-
Generating plan with definition file ./config/setup-admin-login-as-any.json from org myOrg@example.com
|
|
81
|
-
[Security] retrieving state... done
|
|
82
|
-
[Security] generating plan... done
|
|
83
|
-
logging out... done
|
|
84
|
-
`
|
|
85
|
-
];
|
|
86
56
|
//# sourceMappingURL=plan.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plan.js","sourceRoot":"","sources":["../../../src/commands/browserforce/plan.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"plan.js","sourceRoot":"","sources":["../../../src/commands/browserforce/plan.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAMpE,MAAM,OAAO,uBAAwB,SAAQ,mBAA8C;IAClF,MAAM,CAAC,WAAW,GAAG,uCAAuC,CAAC;IAC7D,MAAM,CAAC,QAAQ,GAAG;QACvB;;;;;;GAMD;KACA,CAAC;IAEK,KAAK,CAAC,GAAG;QACd,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,uBAAuB,CAAC,CAAC;QAC5D,IAAI,CAAC,GAAG,CACN,wCAAwC,KAAK,CAAC,cAAc,aAAa,KAAK,CAAC,YAAY,CAAC,CAAC,WAAW,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,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,SAAS,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;YAC/E,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;QACtB,CAAC;QACD,IAAI,KAAK,CAAC,QAAQ,EAAE,CAAC;YACnB,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,mBAAmB,CAAC,CAAC;YACxC,MAAM,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;YAC7E,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;QACtB,CAAC;QACD,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;IAC3B,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { BrowserforcePlugin } from './plugin.js';
|
|
2
|
+
type Drivers = {
|
|
3
|
+
[key: string]: typeof BrowserforcePlugin;
|
|
4
|
+
};
|
|
5
|
+
type Data = {
|
|
6
|
+
settings?: unknown;
|
|
7
|
+
};
|
|
8
|
+
type Config = {
|
|
9
|
+
Driver: typeof BrowserforcePlugin;
|
|
10
|
+
key: string;
|
|
11
|
+
value: unknown;
|
|
12
|
+
};
|
|
13
|
+
export declare class ConfigParser {
|
|
14
|
+
static parse(drivers: Drivers, data: Data): Config[];
|
|
15
|
+
}
|
|
16
|
+
export {};
|
package/lib/config-parser.js
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ConfigParser = void 0;
|
|
4
|
-
class ConfigParser {
|
|
1
|
+
export class ConfigParser {
|
|
5
2
|
static parse(drivers, data) {
|
|
6
3
|
const settings = [];
|
|
7
4
|
if (data?.settings) {
|
|
@@ -24,5 +21,4 @@ class ConfigParser {
|
|
|
24
21
|
return settings;
|
|
25
22
|
}
|
|
26
23
|
}
|
|
27
|
-
exports.ConfigParser = ConfigParser;
|
|
28
24
|
//# sourceMappingURL=config-parser.js.map
|
package/lib/config-parser.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config-parser.js","sourceRoot":"","sources":["../src/config-parser.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"config-parser.js","sourceRoot":"","sources":["../src/config-parser.ts"],"names":[],"mappings":"AAgBA,MAAM,OAAO,YAAY;IAChB,MAAM,CAAC,KAAK,CAAC,OAAgB,EAAE,IAAU;QAC9C,MAAM,QAAQ,GAAa,EAAE,CAAC;QAC9B,IAAI,IAAI,EAAE,QAAQ,EAAE,CAAC;YACnB,KAAK,MAAM,UAAU,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC;gBACpD,IAAI,OAAO,CAAC,UAAU,CAAC,EAAE,CAAC;oBACxB,QAAQ,CAAC,IAAI,CAAC;wBACZ,MAAM,EAAE,OAAO,CAAC,UAAU,CAAC;wBAC3B,GAAG,EAAE,UAAU;wBACf,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC;qBACjC,CAAC,CAAC;gBACL,CAAC;qBAAM,CAAC;oBACN,MAAM,IAAI,KAAK,CAAC,gCAAgC,UAAU,oBAAoB,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;gBACxG,CAAC;YACH,CAAC;QACH,CAAC;aAAM,CAAC;YACN,MAAM,IAAI,KAAK,CAAC,+CAA+C,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACzF,CAAC;QACD,OAAO,QAAQ,CAAC;IAClB,CAAC;CACF"}
|
package/lib/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/lib/index.js
CHANGED
package/lib/jsforce-utils.js
CHANGED
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ensureArray = void 0;
|
|
4
1
|
/**
|
|
5
2
|
* workaround as the Metadata API (converted from XML) returns an object instead of an array of length 1
|
|
6
3
|
* @param prop result of a Metadata API call (array or object)
|
|
7
4
|
*/
|
|
8
|
-
function ensureArray(prop) {
|
|
5
|
+
export function ensureArray(prop) {
|
|
9
6
|
if (Array.isArray(prop)) {
|
|
10
7
|
return prop;
|
|
11
8
|
}
|
|
@@ -14,5 +11,4 @@ function ensureArray(prop) {
|
|
|
14
11
|
}
|
|
15
12
|
return [prop];
|
|
16
13
|
}
|
|
17
|
-
exports.ensureArray = ensureArray;
|
|
18
14
|
//# sourceMappingURL=jsforce-utils.js.map
|
package/lib/jsforce-utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jsforce-utils.js","sourceRoot":"","sources":["../src/jsforce-utils.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"jsforce-utils.js","sourceRoot":"","sources":["../src/jsforce-utils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,UAAU,WAAW,CAAI,IAAa;IAC1C,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;QACxB,OAAO,IAAI,CAAC;IACd,CAAC;IACD,IAAI,IAAI,KAAK,SAAS,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;QACxC,OAAO,EAAE,CAAC;IACZ,CAAC;IACD,OAAO,CAAC,IAAI,CAAC,CAAC;AAChB,CAAC"}
|
package/lib/pages/login.js
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.LoginPage = void 0;
|
|
4
1
|
const ERROR_DIV_SELECTOR = '#error';
|
|
5
2
|
const PATH = 'secur/frontdoor.jsp';
|
|
6
3
|
const POST_LOGIN_PATH = 'setup/forcecomHomepage.apexp';
|
|
7
|
-
class LoginPage {
|
|
4
|
+
export class LoginPage {
|
|
5
|
+
page;
|
|
8
6
|
constructor(page) {
|
|
9
7
|
this.page = page;
|
|
10
8
|
}
|
|
@@ -38,5 +36,4 @@ class LoginPage {
|
|
|
38
36
|
}
|
|
39
37
|
}
|
|
40
38
|
}
|
|
41
|
-
exports.LoginPage = LoginPage;
|
|
42
39
|
//# sourceMappingURL=login.js.map
|
package/lib/pages/login.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"login.js","sourceRoot":"","sources":["../../src/pages/login.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"login.js","sourceRoot":"","sources":["../../src/pages/login.ts"],"names":[],"mappings":"AAGA,MAAM,kBAAkB,GAAG,QAAQ,CAAC;AACpC,MAAM,IAAI,GAAG,qBAAqB,CAAC;AACnC,MAAM,eAAe,GAAG,8BAA8B,CAAC;AAEvD,MAAM,OAAO,SAAS;IACZ,IAAI,CAAO;IAEnB,YAAY,IAAU;QACpB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;IAED,KAAK,CAAC,KAAK,CAAC,GAAQ;QAClB,IAAI,CAAC;YACH,MAAM,GAAG,CAAC,WAAW,EAAE,CAAC;QAC1B,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,MAAM,IAAI,KAAK,CAAC,cAAc,CAAC,CAAC;QAClC,CAAC;QACD,MAAM,IAAI,GAAG,GAAG,CAAC,aAAa,EAAE,CAAC;QACjC,MAAM,IAAI,CAAC,IAAI,CAAC,IAAI,CAClB,GAAG,IAAI,CAAC,WAAW,IAAI,IAAI,QAAQ,IAAI,CAAC,WAAW,WAAW,kBAAkB,CAAC,eAAe,CAAC,EAAE,EACnG;YACE,6GAA6G;YAC7G,SAAS,EAAE,CAAC,MAAM,EAAE,cAAc,CAAC;SACpC,CACF,CAAC;QACF,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;QACrC,IAAI,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,UAAU,CAAC,EAAE,CAAC;YACrC,qDAAqD;YACrD,kCAAkC;YAClC,MAAM,IAAI,CAAC,eAAe,EAAE,CAAC;QAC/B,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAED,KAAK,CAAC,eAAe;QACnB,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC;QAC1D,IAAI,WAAW,EAAE,CAAC;YAChB,MAAM,YAAY,GAAG,CAAC,MAAM,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,GAAmB,EAAE,EAAE,CAAC,GAAG,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC;YAC7G,IAAI,YAAY,EAAE,CAAC;gBACjB,MAAM,IAAI,KAAK,CAAC,YAAY,CAAC,CAAC;YAChC,CAAC;QACH,CAAC;IACH,CAAC;CACF"}
|
package/lib/plugin.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Org } from '@salesforce/core';
|
|
2
|
+
import { Browserforce } from './browserforce.js';
|
|
3
|
+
export declare abstract class BrowserforcePlugin {
|
|
4
|
+
protected browserforce: Browserforce;
|
|
5
|
+
protected org: Org;
|
|
6
|
+
constructor(browserforce: Browserforce);
|
|
7
|
+
abstract retrieve(definition?: unknown): Promise<unknown>;
|
|
8
|
+
/**
|
|
9
|
+
* deep diff
|
|
10
|
+
* @param state
|
|
11
|
+
* @param definition
|
|
12
|
+
* @returns undefined when there is no diff
|
|
13
|
+
*/
|
|
14
|
+
diff(state: unknown, definition: unknown): unknown;
|
|
15
|
+
abstract apply(plan: unknown): Promise<unknown>;
|
|
16
|
+
run(definition: unknown): Promise<unknown>;
|
|
17
|
+
}
|