sfdx-browserforce-plugin 2.11.3 → 3.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (182) hide show
  1. package/README.md +6 -6
  2. package/lib/browserforce-command.js +25 -19
  3. package/lib/browserforce-command.js.map +1 -1
  4. package/lib/browserforce.js +16 -32
  5. package/lib/browserforce.js.map +1 -1
  6. package/lib/commands/browserforce/apply.js +14 -14
  7. package/lib/commands/browserforce/apply.js.map +1 -1
  8. package/lib/commands/browserforce/plan.js +16 -15
  9. package/lib/commands/browserforce/plan.js.map +1 -1
  10. package/lib/config-parser.js +1 -1
  11. package/lib/config-parser.js.map +1 -1
  12. package/lib/jsforce-utils.js.map +1 -1
  13. package/lib/plugin.js +11 -30
  14. package/lib/plugin.js.map +1 -1
  15. package/lib/plugins/activity-settings/index.e2e-spec.js +41 -0
  16. package/lib/plugins/activity-settings/index.e2e-spec.js.map +1 -0
  17. package/lib/plugins/activity-settings/index.js +1 -4
  18. package/lib/plugins/activity-settings/index.js.map +1 -1
  19. package/lib/plugins/communities/index.e2e-spec.js +39 -0
  20. package/lib/plugins/communities/index.e2e-spec.js.map +1 -0
  21. package/lib/plugins/communities/index.js +2 -7
  22. package/lib/plugins/communities/index.js.map +1 -1
  23. package/lib/plugins/company-information/index.e2e-spec.js +42 -0
  24. package/lib/plugins/company-information/index.e2e-spec.js.map +1 -0
  25. package/lib/plugins/company-information/index.js +8 -12
  26. package/lib/plugins/company-information/index.js.map +1 -1
  27. package/lib/plugins/customer-portal/available-custom-objects/index.js +20 -48
  28. package/lib/plugins/customer-portal/available-custom-objects/index.js.map +1 -1
  29. package/lib/plugins/customer-portal/available-custom-objects/index.test.js +44 -0
  30. package/lib/plugins/customer-portal/available-custom-objects/index.test.js.map +1 -0
  31. package/lib/plugins/customer-portal/enabled/index.js +3 -11
  32. package/lib/plugins/customer-portal/enabled/index.js.map +1 -1
  33. package/lib/plugins/customer-portal/enabled/index.test.js +39 -0
  34. package/lib/plugins/customer-portal/enabled/index.test.js.map +1 -0
  35. package/lib/plugins/customer-portal/index.e2e-spec.js +222 -0
  36. package/lib/plugins/customer-portal/index.e2e-spec.js.map +1 -0
  37. package/lib/plugins/customer-portal/index.js +17 -13
  38. package/lib/plugins/customer-portal/index.js.map +1 -1
  39. package/lib/plugins/customer-portal/index.test.js +89 -0
  40. package/lib/plugins/customer-portal/index.test.js.map +1 -0
  41. package/lib/plugins/customer-portal/portals/index.js +17 -25
  42. package/lib/plugins/customer-portal/portals/index.js.map +1 -1
  43. package/lib/plugins/customer-portal/portals/index.test.js +145 -0
  44. package/lib/plugins/customer-portal/portals/index.test.js.map +1 -0
  45. package/lib/plugins/defer-sharing-calculation/index.e2e-spec.js +96 -0
  46. package/lib/plugins/defer-sharing-calculation/index.e2e-spec.js.map +1 -0
  47. package/lib/plugins/defer-sharing-calculation/index.js +2 -7
  48. package/lib/plugins/defer-sharing-calculation/index.js.map +1 -1
  49. package/lib/plugins/density-settings/index.e2e-spec.js +44 -0
  50. package/lib/plugins/density-settings/index.e2e-spec.js.map +1 -0
  51. package/lib/plugins/density-settings/index.js +8 -6
  52. package/lib/plugins/density-settings/index.js.map +1 -1
  53. package/lib/plugins/email-deliverability/index.e2e-spec.js +60 -0
  54. package/lib/plugins/email-deliverability/index.e2e-spec.js.map +1 -0
  55. package/lib/plugins/email-deliverability/index.js +7 -10
  56. package/lib/plugins/email-deliverability/index.js.map +1 -1
  57. package/lib/plugins/high-velocity-sales-settings/index.e2e-spec.js +34 -0
  58. package/lib/plugins/high-velocity-sales-settings/index.e2e-spec.js.map +1 -0
  59. package/lib/plugins/high-velocity-sales-settings/index.js +1 -2
  60. package/lib/plugins/high-velocity-sales-settings/index.js.map +1 -1
  61. package/lib/plugins/high-velocity-sales-settings/page.js +6 -6
  62. package/lib/plugins/high-velocity-sales-settings/page.js.map +1 -1
  63. package/lib/plugins/home-page-layouts/index.e2e-spec.js +52 -0
  64. package/lib/plugins/home-page-layouts/index.e2e-spec.js.map +1 -0
  65. package/lib/plugins/home-page-layouts/index.js +14 -32
  66. package/lib/plugins/home-page-layouts/index.js.map +1 -1
  67. package/lib/plugins/home-page-layouts/index.test.js +109 -0
  68. package/lib/plugins/home-page-layouts/index.test.js.map +1 -0
  69. package/lib/plugins/lightning-experience-settings/index.e2e-spec.js +44 -0
  70. package/lib/plugins/lightning-experience-settings/index.e2e-spec.js.map +1 -0
  71. package/lib/plugins/lightning-experience-settings/index.js +12 -10
  72. package/lib/plugins/lightning-experience-settings/index.js.map +1 -1
  73. package/lib/plugins/opportunity-splits/index.e2e-spec.js +70 -0
  74. package/lib/plugins/opportunity-splits/index.e2e-spec.js.map +1 -0
  75. package/lib/plugins/opportunity-splits/pages/layout-selection.js +1 -4
  76. package/lib/plugins/opportunity-splits/pages/layout-selection.js.map +1 -1
  77. package/lib/plugins/opportunity-splits/pages/overview.js +1 -4
  78. package/lib/plugins/opportunity-splits/pages/overview.js.map +1 -1
  79. package/lib/plugins/opportunity-splits/pages/setup.js +1 -4
  80. package/lib/plugins/opportunity-splits/pages/setup.js.map +1 -1
  81. package/lib/plugins/picklists/field-dependencies/index.js +15 -10
  82. package/lib/plugins/picklists/field-dependencies/index.js.map +1 -1
  83. package/lib/plugins/picklists/field-dependencies/index.test.js +69 -0
  84. package/lib/plugins/picklists/field-dependencies/index.test.js.map +1 -0
  85. package/lib/plugins/picklists/field-dependencies/pages.js +3 -12
  86. package/lib/plugins/picklists/field-dependencies/pages.js.map +1 -1
  87. package/lib/plugins/picklists/index.e2e-spec.js +118 -0
  88. package/lib/plugins/picklists/index.e2e-spec.js.map +1 -0
  89. package/lib/plugins/picklists/index.js +36 -27
  90. package/lib/plugins/picklists/index.js.map +1 -1
  91. package/lib/plugins/picklists/pages.js +7 -28
  92. package/lib/plugins/picklists/pages.js.map +1 -1
  93. package/lib/plugins/picklists/standard-value-set.js +1 -1
  94. package/lib/plugins/picklists/standard-value-set.js.map +1 -1
  95. package/lib/plugins/record-types/index.e2e-spec.js +99 -0
  96. package/lib/plugins/record-types/index.e2e-spec.js.map +1 -0
  97. package/lib/plugins/record-types/index.js +1 -2
  98. package/lib/plugins/record-types/index.js.map +1 -1
  99. package/lib/plugins/record-types/pages.js +4 -10
  100. package/lib/plugins/record-types/pages.js.map +1 -1
  101. package/lib/plugins/relate-contact-to-multiple-accounts/index.e2e-spec.js +34 -0
  102. package/lib/plugins/relate-contact-to-multiple-accounts/index.e2e-spec.js.map +1 -0
  103. package/lib/plugins/relate-contact-to-multiple-accounts/index.js +3 -12
  104. package/lib/plugins/relate-contact-to-multiple-accounts/index.js.map +1 -1
  105. package/lib/plugins/reports-and-dashboards/folder-sharing/index.e2e-spec.js +3 -0
  106. package/lib/plugins/reports-and-dashboards/folder-sharing/index.e2e-spec.js.map +1 -0
  107. package/lib/plugins/reports-and-dashboards/folder-sharing/index.js +1 -4
  108. package/lib/plugins/reports-and-dashboards/folder-sharing/index.js.map +1 -1
  109. package/lib/plugins/reports-and-dashboards/index.e2e-spec.js +3 -0
  110. package/lib/plugins/reports-and-dashboards/index.e2e-spec.js.map +1 -0
  111. package/lib/plugins/reports-and-dashboards/index.js +6 -6
  112. package/lib/plugins/reports-and-dashboards/index.js.map +1 -1
  113. package/lib/plugins/salesforce-to-salesforce/index.e2e-spec.js +39 -0
  114. package/lib/plugins/salesforce-to-salesforce/index.e2e-spec.js.map +1 -0
  115. package/lib/plugins/salesforce-to-salesforce/index.js +1 -4
  116. package/lib/plugins/salesforce-to-salesforce/index.js.map +1 -1
  117. package/lib/plugins/security/certificate-and-key-management/index.js +25 -36
  118. package/lib/plugins/security/certificate-and-key-management/index.js.map +1 -1
  119. package/lib/plugins/security/certificate-and-key-management/index.test.js +66 -0
  120. package/lib/plugins/security/certificate-and-key-management/index.test.js.map +1 -0
  121. package/lib/plugins/security/identity-provider/index.js +13 -24
  122. package/lib/plugins/security/identity-provider/index.js.map +1 -1
  123. package/lib/plugins/security/index.e2e-spec.js +86 -0
  124. package/lib/plugins/security/index.e2e-spec.js.map +1 -0
  125. package/lib/plugins/security/index.js +24 -15
  126. package/lib/plugins/security/index.js.map +1 -1
  127. package/lib/plugins/security/login-access-policies/index.e2e-spec.js +32 -0
  128. package/lib/plugins/security/login-access-policies/index.e2e-spec.js.map +1 -0
  129. package/lib/plugins/security/login-access-policies/index.js +2 -5
  130. package/lib/plugins/security/login-access-policies/index.js.map +1 -1
  131. package/lib/plugins/security/sharing/index.e2e-spec.js +34 -0
  132. package/lib/plugins/security/sharing/index.e2e-spec.js.map +1 -0
  133. package/lib/plugins/security/sharing/index.js +5 -11
  134. package/lib/plugins/security/sharing/index.js.map +1 -1
  135. package/lib/plugins/utils.js +38 -41
  136. package/lib/plugins/utils.js.map +1 -1
  137. package/oclif.manifest.json +85 -53
  138. package/package.json +13 -11
  139. package/lib/browserforce-command.d.ts +0 -15
  140. package/lib/browserforce.d.ts +0 -26
  141. package/lib/commands/browserforce/apply.d.ts +0 -6
  142. package/lib/commands/browserforce/plan.d.ts +0 -6
  143. package/lib/config-parser.d.ts +0 -16
  144. package/lib/index.d.ts +0 -1
  145. package/lib/jsforce-utils.d.ts +0 -5
  146. package/lib/plugin.d.ts +0 -11
  147. package/lib/plugins/activity-settings/index.d.ts +0 -9
  148. package/lib/plugins/communities/index.d.ts +0 -10
  149. package/lib/plugins/company-information/index.d.ts +0 -8
  150. package/lib/plugins/customer-portal/available-custom-objects/index.d.ts +0 -14
  151. package/lib/plugins/customer-portal/enabled/index.d.ts +0 -7
  152. package/lib/plugins/customer-portal/index.d.ts +0 -15
  153. package/lib/plugins/customer-portal/portals/index.d.ts +0 -25
  154. package/lib/plugins/defer-sharing-calculation/index.d.ts +0 -9
  155. package/lib/plugins/density-settings/index.d.ts +0 -17
  156. package/lib/plugins/email-deliverability/index.d.ts +0 -9
  157. package/lib/plugins/high-velocity-sales-settings/index.d.ts +0 -10
  158. package/lib/plugins/high-velocity-sales-settings/page.d.ts +0 -7
  159. package/lib/plugins/home-page-layouts/index.d.ts +0 -14
  160. package/lib/plugins/index.d.ts +0 -18
  161. package/lib/plugins/lightning-experience-settings/index.d.ts +0 -17
  162. package/lib/plugins/opportunity-splits/index.d.ts +0 -9
  163. package/lib/plugins/opportunity-splits/pages/layout-selection.d.ts +0 -8
  164. package/lib/plugins/opportunity-splits/pages/overview.d.ts +0 -10
  165. package/lib/plugins/opportunity-splits/pages/setup.d.ts +0 -8
  166. package/lib/plugins/picklists/field-dependencies/index.d.ts +0 -11
  167. package/lib/plugins/picklists/field-dependencies/pages.d.ts +0 -14
  168. package/lib/plugins/picklists/index.d.ts +0 -23
  169. package/lib/plugins/picklists/pages.d.ts +0 -40
  170. package/lib/plugins/picklists/standard-value-set.d.ts +0 -1
  171. package/lib/plugins/record-types/index.d.ts +0 -13
  172. package/lib/plugins/record-types/pages.d.ts +0 -15
  173. package/lib/plugins/relate-contact-to-multiple-accounts/index.d.ts +0 -9
  174. package/lib/plugins/reports-and-dashboards/folder-sharing/index.d.ts +0 -8
  175. package/lib/plugins/reports-and-dashboards/index.d.ts +0 -11
  176. package/lib/plugins/salesforce-to-salesforce/index.d.ts +0 -9
  177. package/lib/plugins/security/certificate-and-key-management/index.d.ts +0 -23
  178. package/lib/plugins/security/identity-provider/index.d.ts +0 -10
  179. package/lib/plugins/security/index.d.ts +0 -17
  180. package/lib/plugins/security/login-access-policies/index.d.ts +0 -8
  181. package/lib/plugins/security/sharing/index.d.ts +0 -8
  182. package/lib/plugins/utils.d.ts +0 -4
@@ -5,52 +5,68 @@
5
5
  "args": {},
6
6
  "description": "apply a plan from a definition file",
7
7
  "examples": [
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 "
8
+ "$ <%= config.bin %> <%= command.id %> -f ./config/setup-admin-login-as-any.json --target-org 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 "
9
9
  ],
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": {
10
+ "flags": {
11
+ "json": {
12
+ "description": "Format output as json.",
13
+ "helpGroup": "GLOBAL",
14
+ "name": "json",
15
+ "allowNo": false,
16
+ "type": "boolean"
17
+ },
18
+ "target-org": {
19
+ "aliases": [
20
+ "targetusername",
21
+ "u"
22
+ ],
23
+ "char": "o",
24
+ "deprecateAliases": true,
25
+ "name": "target-org",
26
+ "noCacheDefault": true,
27
+ "required": true,
28
+ "summary": "Username or alias of the target org.",
29
+ "hasDynamicHelp": true,
30
+ "multiple": false,
31
+ "type": "option"
32
+ },
27
33
  "definitionfile": {
28
- "kind": "string",
29
34
  "char": "f",
30
35
  "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.",
31
- "input": [],
36
+ "name": "definitionfile",
37
+ "summary": "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.",
38
+ "hasDynamicHelp": false,
32
39
  "multiple": false,
33
40
  "type": "option"
34
41
  },
35
42
  "planfile": {
36
- "kind": "string",
37
43
  "char": "p",
38
- "name": "plan",
39
44
  "description": "path to a browserforce plan file",
40
- "input": [],
45
+ "name": "planfile",
46
+ "summary": "path to a browserforce plan file",
47
+ "hasDynamicHelp": false,
41
48
  "multiple": false,
42
49
  "type": "option"
43
50
  },
44
51
  "statefile": {
45
- "kind": "string",
46
52
  "char": "s",
47
- "name": "state",
48
53
  "description": "path to a browserforce state file",
49
- "input": [],
54
+ "name": "statefile",
55
+ "summary": "path to a browserforce state file",
56
+ "hasDynamicHelp": false,
50
57
  "multiple": false,
51
58
  "type": "option"
52
59
  }
53
60
  },
61
+ "hasDynamicHelp": true,
62
+ "hiddenAliases": [],
63
+ "id": "browserforce:apply",
64
+ "pluginAlias": "sfdx-browserforce-plugin",
65
+ "pluginName": "sfdx-browserforce-plugin",
66
+ "pluginType": "core",
67
+ "strict": true,
68
+ "enableJsonFlag": true,
69
+ "SF_ENV": "SF_ENV",
54
70
  "isESM": false,
55
71
  "relativePath": [
56
72
  "lib",
@@ -64,52 +80,68 @@
64
80
  "args": {},
65
81
  "description": "retrieve state and generate plan file",
66
82
  "examples": [
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 "
83
+ "$ <%= config.bin %> <%= command.id %> -f ./config/setup-admin-login-as-any.json --target-org 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 "
68
84
  ],
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": {
85
+ "flags": {
86
+ "json": {
87
+ "description": "Format output as json.",
88
+ "helpGroup": "GLOBAL",
89
+ "name": "json",
90
+ "allowNo": false,
91
+ "type": "boolean"
92
+ },
93
+ "target-org": {
94
+ "aliases": [
95
+ "targetusername",
96
+ "u"
97
+ ],
98
+ "char": "o",
99
+ "deprecateAliases": true,
100
+ "name": "target-org",
101
+ "noCacheDefault": true,
102
+ "required": true,
103
+ "summary": "Username or alias of the target org.",
104
+ "hasDynamicHelp": true,
105
+ "multiple": false,
106
+ "type": "option"
107
+ },
86
108
  "definitionfile": {
87
- "kind": "string",
88
109
  "char": "f",
89
110
  "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.",
90
- "input": [],
111
+ "name": "definitionfile",
112
+ "summary": "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.",
113
+ "hasDynamicHelp": false,
91
114
  "multiple": false,
92
115
  "type": "option"
93
116
  },
94
117
  "planfile": {
95
- "kind": "string",
96
118
  "char": "p",
97
- "name": "plan",
98
119
  "description": "path to a browserforce plan file",
99
- "input": [],
120
+ "name": "planfile",
121
+ "summary": "path to a browserforce plan file",
122
+ "hasDynamicHelp": false,
100
123
  "multiple": false,
101
124
  "type": "option"
102
125
  },
103
126
  "statefile": {
104
- "kind": "string",
105
127
  "char": "s",
106
- "name": "state",
107
128
  "description": "path to a browserforce state file",
108
- "input": [],
129
+ "name": "statefile",
130
+ "summary": "path to a browserforce state file",
131
+ "hasDynamicHelp": false,
109
132
  "multiple": false,
110
133
  "type": "option"
111
134
  }
112
135
  },
136
+ "hasDynamicHelp": true,
137
+ "hiddenAliases": [],
138
+ "id": "browserforce:plan",
139
+ "pluginAlias": "sfdx-browserforce-plugin",
140
+ "pluginName": "sfdx-browserforce-plugin",
141
+ "pluginType": "core",
142
+ "strict": true,
143
+ "enableJsonFlag": true,
144
+ "SF_ENV": "SF_ENV",
113
145
  "isESM": false,
114
146
  "relativePath": [
115
147
  "lib",
@@ -119,5 +151,5 @@
119
151
  ]
120
152
  }
121
153
  },
122
- "version": "2.11.3"
154
+ "version": "3.0.1"
123
155
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sfdx-browserforce-plugin",
3
- "version": "2.11.3",
3
+ "version": "3.0.1",
4
4
  "description": "sfdx plugin for browser automation",
5
5
  "author": "Matthias Rolke <mr.amtrack@gmail.com>",
6
6
  "bin": {
@@ -8,18 +8,19 @@
8
8
  },
9
9
  "dependencies": {
10
10
  "@mdapi-issues/listmetadata-standardvalueset": "2.0.3",
11
- "@salesforce/command": "5.2.16",
12
- "json-merge-patch": "1.0.2",
11
+ "@salesforce/sf-plugins-core": "4.1.1",
13
12
  "p-retry": "4.6.2",
14
- "puppeteer": "19.2.0",
15
- "tslib": "2.4.0"
13
+ "puppeteer": "19.2.0"
16
14
  },
17
15
  "devDependencies": {
18
- "@types/mocha": "10.0.2",
19
- "@types/node": "18.18.4",
16
+ "@salesforce/dev-config": "4.1.0",
17
+ "@salesforce/prettier-config": "0.0.3",
18
+ "@types/mocha": "10.0.4",
19
+ "@types/node": "20.9.0",
20
20
  "mocha": "10.2.0",
21
21
  "nyc": "15.1.0",
22
- "oclif": "4.0.1",
22
+ "oclif": "4.0.3",
23
+ "prettier": "3.1.0",
23
24
  "ts-node": "10.9.1",
24
25
  "typescript": "5.2.2"
25
26
  },
@@ -39,7 +40,8 @@
39
40
  ],
40
41
  "license": "MIT",
41
42
  "oclif": {
42
- "bin": "sfdx-browserforce-plugin",
43
+ "bin": "sf",
44
+ "topicSeparator": " ",
43
45
  "commands": "./lib/commands",
44
46
  "topics": {
45
47
  "browserforce": {
@@ -58,7 +60,7 @@
58
60
  "generate:plugin": "npx hygen plugin new",
59
61
  "prepack": "yarn build",
60
62
  "prepare": "yarn build",
61
- "test": "nyc --reporter=lcov --reporter=text mocha --require ts-node/register \"test/**/*.test.ts\" \"src/**/*.test.ts\"",
62
- "test:e2e": "mocha --require ts-node/register --slow 30s --timeout 2m --file test/e2e-setup.ts \"test/**/*.e2e-spec.ts\" \"src/**/*.e2e-spec.ts\""
63
+ "test": "tsc -p test && nyc --reporter=lcov --reporter=text mocha --require ts-node/register \"test/**/*.test.ts\" \"src/**/*.test.ts\"",
64
+ "test:e2e": "tsc -p test && mocha --require ts-node/register --slow 30s --timeout 2m --file test/e2e-setup.ts \"test/**/*.e2e-spec.ts\" \"src/**/*.e2e-spec.ts\""
63
65
  }
64
66
  }
@@ -1,15 +0,0 @@
1
- import { flags, SfdxCommand } from '@salesforce/command';
2
- import { Browserforce } from './browserforce';
3
- export declare class BrowserforceCommand extends SfdxCommand {
4
- protected static requiresUsername: boolean;
5
- protected static flagsConfig: {
6
- definitionfile: flags.Discriminated<flags.String>;
7
- planfile: flags.Discriminated<flags.String>;
8
- statefile: flags.Discriminated<flags.String>;
9
- };
10
- protected bf: Browserforce;
11
- protected settings: any[];
12
- init(): Promise<void>;
13
- run(): Promise<unknown>;
14
- finally(err: Error): Promise<void>;
15
- }
@@ -1,26 +0,0 @@
1
- import { Org } from '@salesforce/core';
2
- import { Browser, Frame, Page, WaitForOptions } from 'puppeteer';
3
- export interface Logger {
4
- log(...args: string[]): unknown;
5
- warn(message: string): unknown;
6
- error(...args: unknown[]): unknown;
7
- }
8
- export declare class Browserforce {
9
- org: Org;
10
- logger: Logger;
11
- browser: Browser;
12
- page: Page;
13
- constructor(org: Org, logger?: Logger);
14
- login(): Promise<Browserforce>;
15
- logout(): Promise<Browserforce>;
16
- resolveDomains(): Promise<void>;
17
- throwPageErrors(page: Page): Promise<void>;
18
- openPage(urlPath: string, options?: WaitForOptions): Promise<Page>;
19
- waitForSelectorInFrameOrPage(page: Page, selector: string): Promise<Page | Frame>;
20
- getMyDomain(): string;
21
- getInstanceDomain(): string;
22
- getInstanceUrl(): string;
23
- getLightningUrl(): string;
24
- }
25
- export declare function throwPageErrors(page: Page): Promise<void>;
26
- export declare function retry<T>(input: (attemptCount: number) => PromiseLike<T> | T): Promise<T>;
@@ -1,6 +0,0 @@
1
- import { BrowserforceCommand } from '../../browserforce-command';
2
- export declare class BrowserforceApply extends BrowserforceCommand {
3
- static description: string;
4
- static examples: string[];
5
- run(): Promise<unknown>;
6
- }
@@ -1,6 +0,0 @@
1
- import { BrowserforceCommand } from '../../browserforce-command';
2
- export declare class BrowserforcePlanCommand extends BrowserforceCommand {
3
- static description: string;
4
- static examples: string[];
5
- run(): Promise<unknown>;
6
- }
@@ -1,16 +0,0 @@
1
- import { BrowserforcePlugin } from './plugin';
2
- type Drivers = {
3
- [key: string]: unknown;
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/index.d.ts DELETED
@@ -1 +0,0 @@
1
- export {};
@@ -1,5 +0,0 @@
1
- /**
2
- * workaround as the Metadata API (converted from XML) returns an object instead of an array of length 1
3
- * @param prop result of a Metadata API call (array or object)
4
- */
5
- export declare function ensureArray<T>(prop: T): Array<T>;
package/lib/plugin.d.ts DELETED
@@ -1,11 +0,0 @@
1
- import { Org } from '@salesforce/core';
2
- import { Browserforce } from './browserforce';
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
- diff(state: unknown, definition: unknown): unknown;
9
- abstract apply(plan: unknown): Promise<unknown>;
10
- run(plan: unknown): Promise<unknown>;
11
- }
@@ -1,9 +0,0 @@
1
- import { BrowserforcePlugin } from '../../plugin';
2
- type Config = {
3
- allowUsersToRelateMultipleContactsToTasksAndEvents: boolean;
4
- };
5
- export declare class ActivitySettings extends BrowserforcePlugin {
6
- retrieve(): Promise<Config>;
7
- apply(config: Config): Promise<void>;
8
- }
9
- export {};
@@ -1,10 +0,0 @@
1
- import { BrowserforcePlugin } from '../../plugin';
2
- type Config = {
3
- enabled?: boolean;
4
- domainName?: string;
5
- };
6
- export declare class Communities extends BrowserforcePlugin {
7
- retrieve(): Promise<Config>;
8
- apply(config: Config): Promise<void>;
9
- }
10
- export {};
@@ -1,8 +0,0 @@
1
- import { BrowserforcePlugin } from '../../plugin';
2
- export type Config = {
3
- defaultCurrencyIsoCode?: string;
4
- };
5
- export declare class CompanyInformation extends BrowserforcePlugin {
6
- retrieve(): Promise<Config>;
7
- apply(config: Config): Promise<void>;
8
- }
@@ -1,14 +0,0 @@
1
- import { BrowserforcePlugin } from '../../../plugin';
2
- export type Config = AvailableCustomObjectConfig[];
3
- type AvailableCustomObjectConfig = {
4
- name: string;
5
- namespacePrefix?: string;
6
- available: boolean;
7
- _id?: string;
8
- };
9
- export declare class CustomerPortalAvailableCustomObjects extends BrowserforcePlugin {
10
- retrieve(definition?: Config): Promise<Config>;
11
- diff(state: Config, definition: Config): Config;
12
- apply(plan: Config): Promise<void>;
13
- }
14
- export {};
@@ -1,7 +0,0 @@
1
- import { BrowserforcePlugin } from '../../../plugin';
2
- export type Config = boolean;
3
- export declare class CustomerPortalEnable extends BrowserforcePlugin {
4
- retrieve(definition?: Config): Promise<Config>;
5
- diff(state: Config, definition: Config): Config;
6
- apply(plan: Config): Promise<void>;
7
- }
@@ -1,15 +0,0 @@
1
- import { BrowserforcePlugin } from '../../plugin';
2
- import { Config as CustomerPortalAvailableCustomObjectsConfig } from './available-custom-objects';
3
- import { Config as CustomerPortalEnableConfig } from './enabled';
4
- import { Config as CustomerPortalSetupConfig } from './portals';
5
- type Config = {
6
- enabled?: CustomerPortalEnableConfig;
7
- portals?: CustomerPortalSetupConfig;
8
- availableCustomObjects?: CustomerPortalAvailableCustomObjectsConfig;
9
- };
10
- export declare class CustomerPortal extends BrowserforcePlugin {
11
- retrieve(definition?: Config): Promise<Config>;
12
- diff(state: Config, definition: Config): Config;
13
- apply(config: Config): Promise<void>;
14
- }
15
- export {};
@@ -1,25 +0,0 @@
1
- import { BrowserforcePlugin } from '../../../plugin';
2
- export type Config = PortalConfig[];
3
- type PortalConfig = {
4
- adminUser?: string;
5
- description?: string;
6
- isSelfRegistrationActivated?: boolean;
7
- name: string;
8
- oldName?: string;
9
- selfRegUserDefaultLicense?: string;
10
- selfRegUserDefaultProfile?: string;
11
- selfRegUserDefaultRole?: string;
12
- portalProfileMemberships?: PortalProfileMembership[];
13
- _id?: string;
14
- };
15
- type PortalProfileMembership = {
16
- name: string;
17
- active: boolean;
18
- _id?: string;
19
- };
20
- export declare class CustomerPortalSetup extends BrowserforcePlugin {
21
- retrieve(definition?: Config): Promise<Config>;
22
- diff(source: Config, target: Config): Config;
23
- apply(config: Config): Promise<void>;
24
- }
25
- export {};
@@ -1,9 +0,0 @@
1
- import { BrowserforcePlugin } from '../../plugin';
2
- type Config = {
3
- suspend: boolean;
4
- };
5
- export declare class DeferSharingCalculation extends BrowserforcePlugin {
6
- retrieve(definition?: Config): Promise<Config>;
7
- apply(config: Config): Promise<void>;
8
- }
9
- export {};
@@ -1,17 +0,0 @@
1
- import { ElementHandle, Page } from 'puppeteer';
2
- import { BrowserforcePlugin } from '../../plugin';
3
- type Config = {
4
- density: string;
5
- };
6
- type Density = {
7
- value: string;
8
- checked: boolean;
9
- elementHandle: ElementHandle;
10
- };
11
- export declare class DensitySettings extends BrowserforcePlugin {
12
- retrieve(): Promise<Config>;
13
- apply(config: Config): Promise<void>;
14
- getDensities(page: Page): Promise<Density[]>;
15
- setDensity(page: Page, name: string): Promise<void>;
16
- }
17
- export {};
@@ -1,9 +0,0 @@
1
- import { BrowserforcePlugin } from '../../plugin';
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 {};
@@ -1,10 +0,0 @@
1
- import { Connection } from '@salesforce/core';
2
- import { BrowserforcePlugin } from '../../plugin';
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(conn: Connection): Promise<void>;
@@ -1,7 +0,0 @@
1
- import { Page } from 'puppeteer';
2
- export declare class HighVelocitySalesSetupPage {
3
- private page;
4
- constructor(page: Page);
5
- static getUrl(): string;
6
- setUpAndEnable(): Promise<void>;
7
- }
@@ -1,14 +0,0 @@
1
- import { BrowserforcePlugin } from '../../plugin';
2
- type Config = {
3
- homePageLayoutAssignments: HomePageLayoutAssignment[];
4
- };
5
- type HomePageLayoutAssignment = {
6
- profile: string;
7
- layout: string;
8
- };
9
- export declare class HomePageLayouts extends BrowserforcePlugin {
10
- retrieve(definition?: Config): Promise<Config>;
11
- diff(source: Config, target: Config): Config;
12
- apply(config: Config): Promise<void>;
13
- }
14
- export {};
@@ -1,18 +0,0 @@
1
- import { ActivitySettings as activitySettings } from './activity-settings';
2
- import { Communities as communities } from './communities';
3
- import { CustomerPortal as customerPortal } from './customer-portal';
4
- import { DeferSharingCalculation as deferSharingCalculation } from './defer-sharing-calculation';
5
- import { DensitySettings as densitySettings } from './density-settings';
6
- import { EmailDeliverability as emailDeliverability } from './email-deliverability';
7
- import { HighVelocitySalesSettings as highVelocitySalesSettings } from './high-velocity-sales-settings';
8
- import { HomePageLayouts as homePageLayouts } from './home-page-layouts';
9
- import { LightningExperienceSettings as lightningExperienceSettings } from './lightning-experience-settings';
10
- import { OpportunitySplits as opportunitySplits } from './opportunity-splits';
11
- import { Picklists as picklists } from './picklists';
12
- import { RecordTypes as recordTypes } from './record-types';
13
- import { RelateContactToMultipleAccounts as relateContactToMultipleAccounts } from './relate-contact-to-multiple-accounts';
14
- import { ReportsAndDashboards as reportsAndDashboards } from './reports-and-dashboards';
15
- import { SalesforceToSalesforce as salesforceToSalesforce } from './salesforce-to-salesforce';
16
- import { Security as security } from './security';
17
- import { CompanyInformation as companyInformation } from './company-information';
18
- export { activitySettings, communities, customerPortal, deferSharingCalculation, densitySettings, emailDeliverability, highVelocitySalesSettings, homePageLayouts, lightningExperienceSettings, opportunitySplits, picklists, recordTypes, relateContactToMultipleAccounts, reportsAndDashboards, salesforceToSalesforce, security, companyInformation };
@@ -1,17 +0,0 @@
1
- import { ElementHandle, Page } from 'puppeteer';
2
- import { BrowserforcePlugin } from '../../plugin';
3
- type Config = {
4
- activeThemeName: string;
5
- };
6
- type Theme = {
7
- developerName: string;
8
- isActive: boolean;
9
- rowElementHandle: ElementHandle;
10
- };
11
- export declare class LightningExperienceSettings extends BrowserforcePlugin {
12
- retrieve(): Promise<Config>;
13
- apply(config: Config): Promise<void>;
14
- getThemeData(page: Page): Promise<Theme[]>;
15
- setActiveTheme(page: Page, themeDeveloperName: string): Promise<void>;
16
- }
17
- export {};
@@ -1,9 +0,0 @@
1
- import { BrowserforcePlugin } from '../../plugin';
2
- type Config = {
3
- enabled: boolean;
4
- };
5
- export declare class OpportunitySplits extends BrowserforcePlugin {
6
- retrieve(definition?: Config): Promise<Config>;
7
- apply(config: Config): Promise<void>;
8
- }
9
- export {};
@@ -1,8 +0,0 @@
1
- import { Page } from 'puppeteer';
2
- import { OverviewPage } from './overview';
3
- export declare class LayoutSelectionPage {
4
- static PATH: string;
5
- private page;
6
- constructor(page: Page);
7
- choose(): Promise<OverviewPage>;
8
- }
@@ -1,10 +0,0 @@
1
- import { Page } from 'puppeteer';
2
- export declare class OverviewPage {
3
- static PATH: string;
4
- private page;
5
- constructor(page: Page);
6
- isEnabled(): Promise<boolean>;
7
- waitUntilEnabled(): Promise<void>;
8
- disable(): Promise<OverviewPage>;
9
- waitUntilDisabled(): Promise<void>;
10
- }
@@ -1,8 +0,0 @@
1
- import { Page } from 'puppeteer';
2
- import { LayoutSelectionPage } from './layout-selection';
3
- export declare class SetupPage {
4
- static PATH: string;
5
- private page;
6
- constructor(page: Page);
7
- enable(): Promise<LayoutSelectionPage>;
8
- }
@@ -1,11 +0,0 @@
1
- import { BrowserforcePlugin } from '../../../plugin';
2
- export type FieldDependencyConfig = {
3
- object: string;
4
- dependentField: string;
5
- controllingField: string;
6
- };
7
- export type Config = FieldDependencyConfig[];
8
- export declare class FieldDependencies extends BrowserforcePlugin {
9
- retrieve(definition?: Config): Promise<Config>;
10
- apply(plan: Config): Promise<void>;
11
- }
@@ -1,14 +0,0 @@
1
- import { Page } from 'puppeteer';
2
- export declare class FieldDependencyPage {
3
- private page;
4
- constructor(page: Page);
5
- static getUrl(customObjectId: string): string;
6
- clickDeleteDependencyActionForField(customFieldId: string): Promise<FieldDependencyPage>;
7
- }
8
- export declare class NewFieldDependencyPage {
9
- protected page: any;
10
- protected saveButton: string;
11
- constructor(page: Page);
12
- static getUrl(customObjectId: string, dependentFieldId: string, controllingFieldId: string): string;
13
- save(): Promise<void>;
14
- }