sfdx-browserforce-plugin 2.11.2 → 2.11.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -6
- package/lib/plugins/company-information/index.d.ts +1 -2
- package/lib/plugins/high-velocity-sales-settings/index.d.ts +1 -2
- package/lib/plugins/high-velocity-sales-settings/page.js +11 -4
- package/lib/plugins/high-velocity-sales-settings/page.js.map +1 -1
- package/oclif.manifest.json +82 -122
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
[](https://github.com/amtrack/sfdx-browserforce-plugin/actions)
|
|
6
6
|
|
|
7
7
|
Unlike the [Scratch Org Definition Configuration](https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_scratch_orgs_def_file.htm) which can only be used **on the creation of a scratch org** (`sfdx force:org:create -f config/scratch-def.json`),
|
|
8
|
-
the _Browserforce Configuration_ allows to "shape" **any org**, (e.g. scratch org, sandbox or production org) with **similar preferences and unofficial preferences** that are not (yet) available in the _Scratch Org Definition Configuration_ or as _Metadata_ (`
|
|
8
|
+
the _Browserforce Configuration_ allows to "shape" **any org**, (e.g. scratch org, sandbox or production org) with **similar preferences and unofficial preferences** that are not (yet) available in the _Scratch Org Definition Configuration_ or as _Metadata_ (`sf browserforce:apply -f config/setup-admin-login-as-any.json -u myOrg@example.com`).
|
|
9
9
|
|
|
10
10
|
Further benefits:
|
|
11
11
|
|
|
@@ -19,8 +19,8 @@ Further benefits:
|
|
|
19
19
|
There are several different methods to install `sfdx-browserforce-plugin`:
|
|
20
20
|
|
|
21
21
|
```console
|
|
22
|
-
# as an
|
|
23
|
-
|
|
22
|
+
# as an sf plugin globally
|
|
23
|
+
sf plugins install sfdx-browserforce-plugin
|
|
24
24
|
|
|
25
25
|
# or standalone globally
|
|
26
26
|
npm install --global sfdx-browserforce-plugin
|
|
@@ -34,8 +34,8 @@ npm install --save-dev sfdx-browserforce-plugin
|
|
|
34
34
|
Depending on your choice of installation, you can find the `browserforce` namespace:
|
|
35
35
|
|
|
36
36
|
```console
|
|
37
|
-
# globally in the
|
|
38
|
-
|
|
37
|
+
# globally in the sf cli
|
|
38
|
+
sf browserforce
|
|
39
39
|
|
|
40
40
|
# globally in the sfdx-browserforce-plugin executable
|
|
41
41
|
sfdx-browserforce-plugin browserforce
|
|
@@ -80,7 +80,7 @@ Tip: If you use _Visual Studio Code_, you can leverage tab completion to build t
|
|
|
80
80
|
Next apply the config:
|
|
81
81
|
|
|
82
82
|
```console
|
|
83
|
-
$
|
|
83
|
+
$ sf browserforce:apply -f ./config/setup-admin-login-as-any.json --targetusername myOrg@example.com
|
|
84
84
|
logging in... done
|
|
85
85
|
Applying definition file ./config/setup-admin-login-as-any.json to org myOrg@example.com
|
|
86
86
|
[Security] retrieving state... done
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { BrowserforcePlugin } from '../../plugin';
|
|
2
|
-
type Config = {
|
|
2
|
+
export type Config = {
|
|
3
3
|
defaultCurrencyIsoCode?: string;
|
|
4
4
|
};
|
|
5
5
|
export declare class CompanyInformation extends BrowserforcePlugin {
|
|
6
6
|
retrieve(): Promise<Config>;
|
|
7
7
|
apply(config: Config): Promise<void>;
|
|
8
8
|
}
|
|
9
|
-
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Connection } from '@salesforce/core';
|
|
2
2
|
import { BrowserforcePlugin } from '../../plugin';
|
|
3
|
-
type Config = {
|
|
3
|
+
export type Config = {
|
|
4
4
|
setUpAndEnable: boolean;
|
|
5
5
|
};
|
|
6
6
|
export declare class HighVelocitySalesSettings extends BrowserforcePlugin {
|
|
@@ -8,4 +8,3 @@ export declare class HighVelocitySalesSettings extends BrowserforcePlugin {
|
|
|
8
8
|
apply(config: Config): Promise<void>;
|
|
9
9
|
}
|
|
10
10
|
export declare function disableHighVelocitySalesUsingMetadata(conn: Connection): Promise<void>;
|
|
11
|
-
export {};
|
|
@@ -4,6 +4,7 @@ exports.HighVelocitySalesSetupPage = void 0;
|
|
|
4
4
|
const browserforce_1 = require("../../browserforce");
|
|
5
5
|
const SET_UP_AND_ENABLE_HVS_BUTTON = 'button.setupAndEnableButton';
|
|
6
6
|
const ENABLE_TOGGLE = '#toggleHighVelocitySalesPref';
|
|
7
|
+
const AUTOMATION_TAB_ITEM = 'pierce/#automationTab__item';
|
|
7
8
|
class HighVelocitySalesSetupPage {
|
|
8
9
|
constructor(page) {
|
|
9
10
|
this.page = page;
|
|
@@ -12,12 +13,18 @@ class HighVelocitySalesSetupPage {
|
|
|
12
13
|
return 'lightning/setup/SalesEngagement/home';
|
|
13
14
|
}
|
|
14
15
|
async setUpAndEnable() {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
});
|
|
16
|
+
// starting Winter 24 (v59.0) there is a new tab bar and the item is located in the "Automation" tab
|
|
17
|
+
// wait for tab item or the button directly
|
|
18
|
+
await this.page.waitForSelector(`${AUTOMATION_TAB_ITEM}, ${SET_UP_AND_ENABLE_HVS_BUTTON}`, { timeout: 60000 });
|
|
19
|
+
if (await this.page.$(AUTOMATION_TAB_ITEM)) {
|
|
20
|
+
await Promise.all([
|
|
21
|
+
this.page.waitForSelector(SET_UP_AND_ENABLE_HVS_BUTTON, { timeout: 60000 }),
|
|
22
|
+
this.page.click(AUTOMATION_TAB_ITEM)
|
|
23
|
+
]);
|
|
24
|
+
}
|
|
18
25
|
await Promise.all([
|
|
19
26
|
this.page.waitForSelector(ENABLE_TOGGLE, { timeout: 60000 }),
|
|
20
|
-
|
|
27
|
+
this.page.click(SET_UP_AND_ENABLE_HVS_BUTTON)
|
|
21
28
|
]);
|
|
22
29
|
await (0, browserforce_1.throwPageErrors)(this.page);
|
|
23
30
|
await this.page.close();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"page.js","sourceRoot":"","sources":["../../../src/plugins/high-velocity-sales-settings/page.ts"],"names":[],"mappings":";;;AACA,qDAAqD;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AC,KAAK,EAAE,CAAC;IAC1B,CAAC;CACF;AA5BD,gEA4BC"}
|
package/oclif.manifest.json
CHANGED
|
@@ -1,163 +1,123 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "2.11.2",
|
|
3
2
|
"commands": {
|
|
4
3
|
"browserforce:apply": {
|
|
5
|
-
"id": "browserforce:apply",
|
|
6
|
-
"description": "apply a plan from a definition file",
|
|
7
|
-
"strict": true,
|
|
8
|
-
"usage": "<%= command.id %> [-f <string>] [-p <string>] [-s <string>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]",
|
|
9
|
-
"pluginName": "sfdx-browserforce-plugin",
|
|
10
|
-
"pluginAlias": "sfdx-browserforce-plugin",
|
|
11
|
-
"pluginType": "core",
|
|
12
4
|
"aliases": [],
|
|
5
|
+
"args": {},
|
|
6
|
+
"description": "apply a plan from a definition file",
|
|
13
7
|
"examples": [
|
|
14
8
|
"$ sfdx <%= command.id %> -f ./config/setup-admin-login-as-any.json --targetusername myOrg@example.com\n logging in... done\n Applying definition file ./config/setup-admin-login-as-any.json to org myOrg@example.com\n [Security] retrieving state... done\n [Security] changing 'loginAccessPolicies' to '{\"administratorsCanLogInAsAnyUser\":true}'... done\n logging out... done\n "
|
|
15
9
|
],
|
|
16
|
-
"flags": {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
"info",
|
|
34
|
-
"warn",
|
|
35
|
-
"error",
|
|
36
|
-
"fatal",
|
|
37
|
-
"TRACE",
|
|
38
|
-
"DEBUG",
|
|
39
|
-
"INFO",
|
|
40
|
-
"WARN",
|
|
41
|
-
"ERROR",
|
|
42
|
-
"FATAL"
|
|
43
|
-
],
|
|
44
|
-
"default": "warn"
|
|
45
|
-
},
|
|
46
|
-
"targetusername": {
|
|
47
|
-
"name": "targetusername",
|
|
48
|
-
"type": "option",
|
|
49
|
-
"char": "u",
|
|
50
|
-
"description": "username or alias for the target org; overrides default target org",
|
|
51
|
-
"multiple": false
|
|
52
|
-
},
|
|
53
|
-
"apiversion": {
|
|
54
|
-
"name": "apiversion",
|
|
55
|
-
"type": "option",
|
|
56
|
-
"description": "override the api version used for api requests made by this command",
|
|
57
|
-
"multiple": false
|
|
58
|
-
},
|
|
10
|
+
"flags": {},
|
|
11
|
+
"hasDynamicHelp": false,
|
|
12
|
+
"id": "browserforce:apply",
|
|
13
|
+
"pluginAlias": "sfdx-browserforce-plugin",
|
|
14
|
+
"pluginName": "sfdx-browserforce-plugin",
|
|
15
|
+
"pluginType": "core",
|
|
16
|
+
"strict": true,
|
|
17
|
+
"parse": true,
|
|
18
|
+
"parserOptions": {},
|
|
19
|
+
"supportsUsername": false,
|
|
20
|
+
"requiresUsername": true,
|
|
21
|
+
"supportsDevhubUsername": false,
|
|
22
|
+
"requiresDevhubUsername": false,
|
|
23
|
+
"requiresProject": false,
|
|
24
|
+
"result": {},
|
|
25
|
+
"varargs": false,
|
|
26
|
+
"flagsConfig": {
|
|
59
27
|
"definitionfile": {
|
|
60
|
-
"
|
|
61
|
-
"type": "option",
|
|
28
|
+
"kind": "string",
|
|
62
29
|
"char": "f",
|
|
63
30
|
"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.",
|
|
64
|
-
"
|
|
31
|
+
"input": [],
|
|
32
|
+
"multiple": false,
|
|
33
|
+
"type": "option"
|
|
65
34
|
},
|
|
66
35
|
"planfile": {
|
|
67
|
-
"
|
|
68
|
-
"type": "option",
|
|
36
|
+
"kind": "string",
|
|
69
37
|
"char": "p",
|
|
38
|
+
"name": "plan",
|
|
70
39
|
"description": "path to a browserforce plan file",
|
|
71
|
-
"
|
|
40
|
+
"input": [],
|
|
41
|
+
"multiple": false,
|
|
42
|
+
"type": "option"
|
|
72
43
|
},
|
|
73
44
|
"statefile": {
|
|
74
|
-
"
|
|
75
|
-
"type": "option",
|
|
45
|
+
"kind": "string",
|
|
76
46
|
"char": "s",
|
|
47
|
+
"name": "state",
|
|
77
48
|
"description": "path to a browserforce state file",
|
|
78
|
-
"
|
|
49
|
+
"input": [],
|
|
50
|
+
"multiple": false,
|
|
51
|
+
"type": "option"
|
|
79
52
|
}
|
|
80
53
|
},
|
|
81
|
-
"
|
|
54
|
+
"isESM": false,
|
|
55
|
+
"relativePath": [
|
|
56
|
+
"lib",
|
|
57
|
+
"commands",
|
|
58
|
+
"browserforce",
|
|
59
|
+
"apply.js"
|
|
60
|
+
]
|
|
82
61
|
},
|
|
83
62
|
"browserforce:plan": {
|
|
84
|
-
"id": "browserforce:plan",
|
|
85
|
-
"description": "retrieve state and generate plan file",
|
|
86
|
-
"strict": true,
|
|
87
|
-
"usage": "<%= command.id %> [-f <string>] [-p <string>] [-s <string>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]",
|
|
88
|
-
"pluginName": "sfdx-browserforce-plugin",
|
|
89
|
-
"pluginAlias": "sfdx-browserforce-plugin",
|
|
90
|
-
"pluginType": "core",
|
|
91
63
|
"aliases": [],
|
|
64
|
+
"args": {},
|
|
65
|
+
"description": "retrieve state and generate plan file",
|
|
92
66
|
"examples": [
|
|
93
67
|
"$ sfdx <%= command.id %> -f ./config/setup-admin-login-as-any.json --targetusername myOrg@example.com\n logging in... done\n Generating plan with definition file ./config/setup-admin-login-as-any.json from org myOrg@example.com\n [Security] retrieving state... done\n [Security] generating plan... done\n logging out... done\n "
|
|
94
68
|
],
|
|
95
|
-
"flags": {
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
"info",
|
|
113
|
-
"warn",
|
|
114
|
-
"error",
|
|
115
|
-
"fatal",
|
|
116
|
-
"TRACE",
|
|
117
|
-
"DEBUG",
|
|
118
|
-
"INFO",
|
|
119
|
-
"WARN",
|
|
120
|
-
"ERROR",
|
|
121
|
-
"FATAL"
|
|
122
|
-
],
|
|
123
|
-
"default": "warn"
|
|
124
|
-
},
|
|
125
|
-
"targetusername": {
|
|
126
|
-
"name": "targetusername",
|
|
127
|
-
"type": "option",
|
|
128
|
-
"char": "u",
|
|
129
|
-
"description": "username or alias for the target org; overrides default target org",
|
|
130
|
-
"multiple": false
|
|
131
|
-
},
|
|
132
|
-
"apiversion": {
|
|
133
|
-
"name": "apiversion",
|
|
134
|
-
"type": "option",
|
|
135
|
-
"description": "override the api version used for api requests made by this command",
|
|
136
|
-
"multiple": false
|
|
137
|
-
},
|
|
69
|
+
"flags": {},
|
|
70
|
+
"hasDynamicHelp": false,
|
|
71
|
+
"id": "browserforce:plan",
|
|
72
|
+
"pluginAlias": "sfdx-browserforce-plugin",
|
|
73
|
+
"pluginName": "sfdx-browserforce-plugin",
|
|
74
|
+
"pluginType": "core",
|
|
75
|
+
"strict": true,
|
|
76
|
+
"parse": true,
|
|
77
|
+
"parserOptions": {},
|
|
78
|
+
"supportsUsername": false,
|
|
79
|
+
"requiresUsername": true,
|
|
80
|
+
"supportsDevhubUsername": false,
|
|
81
|
+
"requiresDevhubUsername": false,
|
|
82
|
+
"requiresProject": false,
|
|
83
|
+
"result": {},
|
|
84
|
+
"varargs": false,
|
|
85
|
+
"flagsConfig": {
|
|
138
86
|
"definitionfile": {
|
|
139
|
-
"
|
|
140
|
-
"type": "option",
|
|
87
|
+
"kind": "string",
|
|
141
88
|
"char": "f",
|
|
142
89
|
"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.",
|
|
143
|
-
"
|
|
90
|
+
"input": [],
|
|
91
|
+
"multiple": false,
|
|
92
|
+
"type": "option"
|
|
144
93
|
},
|
|
145
94
|
"planfile": {
|
|
146
|
-
"
|
|
147
|
-
"type": "option",
|
|
95
|
+
"kind": "string",
|
|
148
96
|
"char": "p",
|
|
97
|
+
"name": "plan",
|
|
149
98
|
"description": "path to a browserforce plan file",
|
|
150
|
-
"
|
|
99
|
+
"input": [],
|
|
100
|
+
"multiple": false,
|
|
101
|
+
"type": "option"
|
|
151
102
|
},
|
|
152
103
|
"statefile": {
|
|
153
|
-
"
|
|
154
|
-
"type": "option",
|
|
104
|
+
"kind": "string",
|
|
155
105
|
"char": "s",
|
|
106
|
+
"name": "state",
|
|
156
107
|
"description": "path to a browserforce state file",
|
|
157
|
-
"
|
|
108
|
+
"input": [],
|
|
109
|
+
"multiple": false,
|
|
110
|
+
"type": "option"
|
|
158
111
|
}
|
|
159
112
|
},
|
|
160
|
-
"
|
|
113
|
+
"isESM": false,
|
|
114
|
+
"relativePath": [
|
|
115
|
+
"lib",
|
|
116
|
+
"commands",
|
|
117
|
+
"browserforce",
|
|
118
|
+
"plan.js"
|
|
119
|
+
]
|
|
161
120
|
}
|
|
162
|
-
}
|
|
121
|
+
},
|
|
122
|
+
"version": "2.11.3"
|
|
163
123
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sfdx-browserforce-plugin",
|
|
3
|
-
"version": "2.11.
|
|
3
|
+
"version": "2.11.3",
|
|
4
4
|
"description": "sfdx plugin for browser automation",
|
|
5
5
|
"author": "Matthias Rolke <mr.amtrack@gmail.com>",
|
|
6
6
|
"bin": {
|
|
@@ -16,10 +16,10 @@
|
|
|
16
16
|
},
|
|
17
17
|
"devDependencies": {
|
|
18
18
|
"@types/mocha": "10.0.2",
|
|
19
|
-
"@types/node": "18.18.
|
|
19
|
+
"@types/node": "18.18.4",
|
|
20
20
|
"mocha": "10.2.0",
|
|
21
21
|
"nyc": "15.1.0",
|
|
22
|
-
"oclif": "
|
|
22
|
+
"oclif": "4.0.1",
|
|
23
23
|
"ts-node": "10.9.1",
|
|
24
24
|
"typescript": "5.2.2"
|
|
25
25
|
},
|