sfdx-browserforce-plugin 2.11.2 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (182) hide show
  1. package/README.md +10 -10
  2. package/lib/browserforce-command.js +25 -19
  3. package/lib/browserforce-command.js.map +1 -1
  4. package/lib/browserforce.js +11 -28
  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 +13 -4
  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 +11 -9
  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 +104 -112
  138. package/package.json +12 -10
  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 -9
  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 -11
  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
@@ -1,163 +1,155 @@
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
- "$ 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 "
15
9
  ],
16
10
  "flags": {
17
11
  "json": {
12
+ "description": "Format output as json.",
13
+ "helpGroup": "GLOBAL",
18
14
  "name": "json",
19
- "type": "boolean",
20
- "description": "format output as json",
21
- "allowNo": false
15
+ "allowNo": false,
16
+ "type": "boolean"
22
17
  },
23
- "loglevel": {
24
- "name": "loglevel",
25
- "type": "option",
26
- "description": "logging level for this command invocation",
27
- "required": false,
28
- "helpValue": "(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)",
29
- "multiple": false,
30
- "options": [
31
- "trace",
32
- "debug",
33
- "info",
34
- "warn",
35
- "error",
36
- "fatal",
37
- "TRACE",
38
- "DEBUG",
39
- "INFO",
40
- "WARN",
41
- "ERROR",
42
- "FATAL"
18
+ "target-org": {
19
+ "aliases": [
20
+ "targetusername",
21
+ "u"
43
22
  ],
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
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"
58
32
  },
59
33
  "definitionfile": {
60
- "name": "definitionfile",
61
- "type": "option",
62
34
  "char": "f",
63
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.",
64
- "multiple": false
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,
39
+ "multiple": false,
40
+ "type": "option"
65
41
  },
66
42
  "planfile": {
67
- "name": "planfile",
68
- "type": "option",
69
43
  "char": "p",
70
44
  "description": "path to a browserforce plan file",
71
- "multiple": false
45
+ "name": "planfile",
46
+ "summary": "path to a browserforce plan file",
47
+ "hasDynamicHelp": false,
48
+ "multiple": false,
49
+ "type": "option"
72
50
  },
73
51
  "statefile": {
74
- "name": "statefile",
75
- "type": "option",
76
52
  "char": "s",
77
53
  "description": "path to a browserforce state file",
78
- "multiple": false
54
+ "name": "statefile",
55
+ "summary": "path to a browserforce state file",
56
+ "hasDynamicHelp": false,
57
+ "multiple": false,
58
+ "type": "option"
79
59
  }
80
60
  },
81
- "args": {}
82
- },
83
- "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",
61
+ "hasDynamicHelp": true,
62
+ "hiddenAliases": [],
63
+ "id": "browserforce:apply",
89
64
  "pluginAlias": "sfdx-browserforce-plugin",
65
+ "pluginName": "sfdx-browserforce-plugin",
90
66
  "pluginType": "core",
67
+ "strict": true,
68
+ "enableJsonFlag": true,
69
+ "SF_ENV": "SF_ENV",
70
+ "isESM": false,
71
+ "relativePath": [
72
+ "lib",
73
+ "commands",
74
+ "browserforce",
75
+ "apply.js"
76
+ ]
77
+ },
78
+ "browserforce:plan": {
91
79
  "aliases": [],
80
+ "args": {},
81
+ "description": "retrieve state and generate plan file",
92
82
  "examples": [
93
- "$ 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 "
94
84
  ],
95
85
  "flags": {
96
86
  "json": {
87
+ "description": "Format output as json.",
88
+ "helpGroup": "GLOBAL",
97
89
  "name": "json",
98
- "type": "boolean",
99
- "description": "format output as json",
100
- "allowNo": false
90
+ "allowNo": false,
91
+ "type": "boolean"
101
92
  },
102
- "loglevel": {
103
- "name": "loglevel",
104
- "type": "option",
105
- "description": "logging level for this command invocation",
106
- "required": false,
107
- "helpValue": "(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL)",
108
- "multiple": false,
109
- "options": [
110
- "trace",
111
- "debug",
112
- "info",
113
- "warn",
114
- "error",
115
- "fatal",
116
- "TRACE",
117
- "DEBUG",
118
- "INFO",
119
- "WARN",
120
- "ERROR",
121
- "FATAL"
93
+ "target-org": {
94
+ "aliases": [
95
+ "targetusername",
96
+ "u"
122
97
  ],
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
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"
137
107
  },
138
108
  "definitionfile": {
139
- "name": "definitionfile",
140
- "type": "option",
141
109
  "char": "f",
142
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.",
143
- "multiple": false
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,
114
+ "multiple": false,
115
+ "type": "option"
144
116
  },
145
117
  "planfile": {
146
- "name": "planfile",
147
- "type": "option",
148
118
  "char": "p",
149
119
  "description": "path to a browserforce plan file",
150
- "multiple": false
120
+ "name": "planfile",
121
+ "summary": "path to a browserforce plan file",
122
+ "hasDynamicHelp": false,
123
+ "multiple": false,
124
+ "type": "option"
151
125
  },
152
126
  "statefile": {
153
- "name": "statefile",
154
- "type": "option",
155
127
  "char": "s",
156
128
  "description": "path to a browserforce state file",
157
- "multiple": false
129
+ "name": "statefile",
130
+ "summary": "path to a browserforce state file",
131
+ "hasDynamicHelp": false,
132
+ "multiple": false,
133
+ "type": "option"
158
134
  }
159
135
  },
160
- "args": {}
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",
145
+ "isESM": false,
146
+ "relativePath": [
147
+ "lib",
148
+ "commands",
149
+ "browserforce",
150
+ "plan.js"
151
+ ]
161
152
  }
162
- }
153
+ },
154
+ "version": "3.0.0"
163
155
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sfdx-browserforce-plugin",
3
- "version": "2.11.2",
3
+ "version": "3.0.0",
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.0.0",
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": {
16
+ "@salesforce/dev-config": "4.1.0",
17
+ "@salesforce/prettier-config": "0.0.3",
18
18
  "@types/mocha": "10.0.2",
19
- "@types/node": "18.18.1",
19
+ "@types/node": "18.18.5",
20
20
  "mocha": "10.2.0",
21
21
  "nyc": "15.1.0",
22
- "oclif": "3.17.2",
22
+ "oclif": "4.0.2",
23
+ "prettier": "3.0.3",
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,9 +0,0 @@
1
- import { BrowserforcePlugin } from '../../plugin';
2
- type Config = {
3
- defaultCurrencyIsoCode?: string;
4
- };
5
- export declare class CompanyInformation extends BrowserforcePlugin {
6
- retrieve(): Promise<Config>;
7
- apply(config: Config): Promise<void>;
8
- }
9
- export {};
@@ -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,11 +0,0 @@
1
- import { Connection } from '@salesforce/core';
2
- import { BrowserforcePlugin } from '../../plugin';
3
- 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>;
11
- export {};
@@ -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 {};