sf-browserforce 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (285) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +266 -0
  3. package/bin/run +9 -0
  4. package/bin/run.cmd +3 -0
  5. package/lib/browserforce-command.d.ts +27 -0
  6. package/lib/browserforce-command.js +162 -0
  7. package/lib/browserforce-command.js.map +1 -0
  8. package/lib/browserforce.d.ts +27 -0
  9. package/lib/browserforce.js +163 -0
  10. package/lib/browserforce.js.map +1 -0
  11. package/lib/commands/browserforce/apply.d.ts +10 -0
  12. package/lib/commands/browserforce/apply.js +83 -0
  13. package/lib/commands/browserforce/apply.js.map +1 -0
  14. package/lib/commands/browserforce/playwright.d.ts +9 -0
  15. package/lib/commands/browserforce/playwright.js +53 -0
  16. package/lib/commands/browserforce/playwright.js.map +1 -0
  17. package/lib/config-parser.d.ts +16 -0
  18. package/lib/config-parser.js +24 -0
  19. package/lib/config-parser.js.map +1 -0
  20. package/lib/index.d.ts +1 -0
  21. package/lib/index.js +2 -0
  22. package/lib/index.js.map +1 -0
  23. package/lib/jsforce-utils.d.ts +5 -0
  24. package/lib/jsforce-utils.js +14 -0
  25. package/lib/jsforce-utils.js.map +1 -0
  26. package/lib/pages/login.d.ts +7 -0
  27. package/lib/pages/login.js +17 -0
  28. package/lib/pages/login.js.map +1 -0
  29. package/lib/plugin.d.ts +15 -0
  30. package/lib/plugin.js +28 -0
  31. package/lib/plugin.js.map +1 -0
  32. package/lib/plugins/activity-settings/index.d.ts +9 -0
  33. package/lib/plugins/activity-settings/index.e2e-spec.d.ts +1 -0
  34. package/lib/plugins/activity-settings/index.e2e-spec.js +36 -0
  35. package/lib/plugins/activity-settings/index.e2e-spec.js.map +1 -0
  36. package/lib/plugins/activity-settings/index.js +102 -0
  37. package/lib/plugins/activity-settings/index.js.map +1 -0
  38. package/lib/plugins/auth-providers/index.d.ts +13 -0
  39. package/lib/plugins/auth-providers/index.e2e-spec.d.ts +1 -0
  40. package/lib/plugins/auth-providers/index.e2e-spec.js +78 -0
  41. package/lib/plugins/auth-providers/index.e2e-spec.js.map +1 -0
  42. package/lib/plugins/auth-providers/index.js +135 -0
  43. package/lib/plugins/auth-providers/index.js.map +1 -0
  44. package/lib/plugins/company-information/index.d.ts +8 -0
  45. package/lib/plugins/company-information/index.e2e-spec.d.ts +1 -0
  46. package/lib/plugins/company-information/index.e2e-spec.js +37 -0
  47. package/lib/plugins/company-information/index.e2e-spec.js.map +1 -0
  48. package/lib/plugins/company-information/index.js +114 -0
  49. package/lib/plugins/company-information/index.js.map +1 -0
  50. package/lib/plugins/customer-portal/available-custom-objects/index.d.ts +14 -0
  51. package/lib/plugins/customer-portal/available-custom-objects/index.js +203 -0
  52. package/lib/plugins/customer-portal/available-custom-objects/index.js.map +1 -0
  53. package/lib/plugins/customer-portal/available-custom-objects/index.test.d.ts +1 -0
  54. package/lib/plugins/customer-portal/available-custom-objects/index.test.js +39 -0
  55. package/lib/plugins/customer-portal/available-custom-objects/index.test.js.map +1 -0
  56. package/lib/plugins/customer-portal/enabled/index.d.ts +6 -0
  57. package/lib/plugins/customer-portal/enabled/index.js +89 -0
  58. package/lib/plugins/customer-portal/enabled/index.js.map +1 -0
  59. package/lib/plugins/customer-portal/enabled/index.test.d.ts +1 -0
  60. package/lib/plugins/customer-portal/enabled/index.test.js +34 -0
  61. package/lib/plugins/customer-portal/enabled/index.test.js.map +1 -0
  62. package/lib/plugins/customer-portal/index.d.ts +15 -0
  63. package/lib/plugins/customer-portal/index.e2e-spec.d.ts +1 -0
  64. package/lib/plugins/customer-portal/index.e2e-spec.js +188 -0
  65. package/lib/plugins/customer-portal/index.e2e-spec.js.map +1 -0
  66. package/lib/plugins/customer-portal/index.js +58 -0
  67. package/lib/plugins/customer-portal/index.js.map +1 -0
  68. package/lib/plugins/customer-portal/index.test.d.ts +1 -0
  69. package/lib/plugins/customer-portal/index.test.js +84 -0
  70. package/lib/plugins/customer-portal/index.test.js.map +1 -0
  71. package/lib/plugins/customer-portal/portals/index.d.ts +25 -0
  72. package/lib/plugins/customer-portal/portals/index.js +254 -0
  73. package/lib/plugins/customer-portal/portals/index.js.map +1 -0
  74. package/lib/plugins/customer-portal/portals/index.test.d.ts +1 -0
  75. package/lib/plugins/customer-portal/portals/index.test.js +140 -0
  76. package/lib/plugins/customer-portal/portals/index.test.js.map +1 -0
  77. package/lib/plugins/density-settings/index.d.ts +10 -0
  78. package/lib/plugins/density-settings/index.e2e-spec.d.ts +1 -0
  79. package/lib/plugins/density-settings/index.e2e-spec.js +39 -0
  80. package/lib/plugins/density-settings/index.e2e-spec.js.map +1 -0
  81. package/lib/plugins/density-settings/index.js +101 -0
  82. package/lib/plugins/density-settings/index.js.map +1 -0
  83. package/lib/plugins/deprecated.d.ts +4 -0
  84. package/lib/plugins/deprecated.js +28 -0
  85. package/lib/plugins/deprecated.js.map +1 -0
  86. package/lib/plugins/email-deliverability/index.d.ts +9 -0
  87. package/lib/plugins/email-deliverability/index.e2e-spec.d.ts +1 -0
  88. package/lib/plugins/email-deliverability/index.e2e-spec.js +55 -0
  89. package/lib/plugins/email-deliverability/index.e2e-spec.js.map +1 -0
  90. package/lib/plugins/email-deliverability/index.js +109 -0
  91. package/lib/plugins/email-deliverability/index.js.map +1 -0
  92. package/lib/plugins/high-velocity-sales-settings/index.d.ts +10 -0
  93. package/lib/plugins/high-velocity-sales-settings/index.e2e-spec.d.ts +1 -0
  94. package/lib/plugins/high-velocity-sales-settings/index.e2e-spec.js +29 -0
  95. package/lib/plugins/high-velocity-sales-settings/index.e2e-spec.js.map +1 -0
  96. package/lib/plugins/high-velocity-sales-settings/index.js +105 -0
  97. package/lib/plugins/high-velocity-sales-settings/index.js.map +1 -0
  98. package/lib/plugins/high-velocity-sales-settings/page.d.ts +8 -0
  99. package/lib/plugins/high-velocity-sales-settings/page.js +27 -0
  100. package/lib/plugins/high-velocity-sales-settings/page.js.map +1 -0
  101. package/lib/plugins/history-tracking/index.d.ts +19 -0
  102. package/lib/plugins/history-tracking/index.e2e-spec.d.ts +1 -0
  103. package/lib/plugins/history-tracking/index.e2e-spec.js +128 -0
  104. package/lib/plugins/history-tracking/index.e2e-spec.js.map +1 -0
  105. package/lib/plugins/history-tracking/index.js +272 -0
  106. package/lib/plugins/history-tracking/index.js.map +1 -0
  107. package/lib/plugins/home-page-layouts/index.d.ts +14 -0
  108. package/lib/plugins/home-page-layouts/index.e2e-spec.d.ts +1 -0
  109. package/lib/plugins/home-page-layouts/index.e2e-spec.js +47 -0
  110. package/lib/plugins/home-page-layouts/index.e2e-spec.js.map +1 -0
  111. package/lib/plugins/home-page-layouts/index.js +145 -0
  112. package/lib/plugins/home-page-layouts/index.js.map +1 -0
  113. package/lib/plugins/home-page-layouts/index.test.d.ts +1 -0
  114. package/lib/plugins/home-page-layouts/index.test.js +104 -0
  115. package/lib/plugins/home-page-layouts/index.test.js.map +1 -0
  116. package/lib/plugins/index.d.ts +28 -0
  117. package/lib/plugins/index.js +29 -0
  118. package/lib/plugins/index.js.map +1 -0
  119. package/lib/plugins/lightning-experience-settings/index.d.ts +17 -0
  120. package/lib/plugins/lightning-experience-settings/index.e2e-spec.d.ts +1 -0
  121. package/lib/plugins/lightning-experience-settings/index.e2e-spec.js +48 -0
  122. package/lib/plugins/lightning-experience-settings/index.e2e-spec.js.map +1 -0
  123. package/lib/plugins/lightning-experience-settings/index.js +149 -0
  124. package/lib/plugins/lightning-experience-settings/index.js.map +1 -0
  125. package/lib/plugins/linkedin-sales-navigator-settings/index.d.ts +8 -0
  126. package/lib/plugins/linkedin-sales-navigator-settings/index.e2e-spec.d.ts +1 -0
  127. package/lib/plugins/linkedin-sales-navigator-settings/index.e2e-spec.js +29 -0
  128. package/lib/plugins/linkedin-sales-navigator-settings/index.e2e-spec.js.map +1 -0
  129. package/lib/plugins/linkedin-sales-navigator-settings/index.js +93 -0
  130. package/lib/plugins/linkedin-sales-navigator-settings/index.js.map +1 -0
  131. package/lib/plugins/linkedin-sales-navigator-settings/page.d.ts +9 -0
  132. package/lib/plugins/linkedin-sales-navigator-settings/page.js +35 -0
  133. package/lib/plugins/linkedin-sales-navigator-settings/page.js.map +1 -0
  134. package/lib/plugins/login-as-user/index.d.ts +9 -0
  135. package/lib/plugins/login-as-user/index.js +104 -0
  136. package/lib/plugins/login-as-user/index.js.map +1 -0
  137. package/lib/plugins/logout-login-as-user/index.d.ts +6 -0
  138. package/lib/plugins/logout-login-as-user/index.js +76 -0
  139. package/lib/plugins/logout-login-as-user/index.js.map +1 -0
  140. package/lib/plugins/omni-channel-settings/index.d.ts +9 -0
  141. package/lib/plugins/omni-channel-settings/index.e2e-spec.d.ts +1 -0
  142. package/lib/plugins/omni-channel-settings/index.e2e-spec.js +30 -0
  143. package/lib/plugins/omni-channel-settings/index.e2e-spec.js.map +1 -0
  144. package/lib/plugins/omni-channel-settings/index.js +97 -0
  145. package/lib/plugins/omni-channel-settings/index.js.map +1 -0
  146. package/lib/plugins/opportunity-splits/index.d.ts +9 -0
  147. package/lib/plugins/opportunity-splits/index.e2e-spec.d.ts +1 -0
  148. package/lib/plugins/opportunity-splits/index.e2e-spec.js +46 -0
  149. package/lib/plugins/opportunity-splits/index.e2e-spec.js.map +1 -0
  150. package/lib/plugins/opportunity-splits/index.js +117 -0
  151. package/lib/plugins/opportunity-splits/index.js.map +1 -0
  152. package/lib/plugins/opportunity-splits/pages/layout-selection.d.ts +8 -0
  153. package/lib/plugins/opportunity-splits/pages/layout-selection.js +15 -0
  154. package/lib/plugins/opportunity-splits/pages/layout-selection.js.map +1 -0
  155. package/lib/plugins/opportunity-splits/pages/overview.d.ts +11 -0
  156. package/lib/plugins/opportunity-splits/pages/overview.js +32 -0
  157. package/lib/plugins/opportunity-splits/pages/overview.js.map +1 -0
  158. package/lib/plugins/opportunity-splits/pages/setup.d.ts +9 -0
  159. package/lib/plugins/opportunity-splits/pages/setup.js +17 -0
  160. package/lib/plugins/opportunity-splits/pages/setup.js.map +1 -0
  161. package/lib/plugins/permission-sets/index.d.ts +10 -0
  162. package/lib/plugins/permission-sets/index.e2e-spec.d.ts +1 -0
  163. package/lib/plugins/permission-sets/index.e2e-spec.js +47 -0
  164. package/lib/plugins/permission-sets/index.e2e-spec.js.map +1 -0
  165. package/lib/plugins/permission-sets/index.js +22 -0
  166. package/lib/plugins/permission-sets/index.js.map +1 -0
  167. package/lib/plugins/permission-sets/service-presence-status/index.d.ts +10 -0
  168. package/lib/plugins/permission-sets/service-presence-status/index.js +124 -0
  169. package/lib/plugins/permission-sets/service-presence-status/index.js.map +1 -0
  170. package/lib/plugins/picklists/field-dependencies/index.d.ts +11 -0
  171. package/lib/plugins/picklists/field-dependencies/index.js +133 -0
  172. package/lib/plugins/picklists/field-dependencies/index.js.map +1 -0
  173. package/lib/plugins/picklists/field-dependencies/index.test.d.ts +1 -0
  174. package/lib/plugins/picklists/field-dependencies/index.test.js +64 -0
  175. package/lib/plugins/picklists/field-dependencies/index.test.js.map +1 -0
  176. package/lib/plugins/picklists/field-dependencies/pages.d.ts +15 -0
  177. package/lib/plugins/picklists/field-dependencies/pages.js +50 -0
  178. package/lib/plugins/picklists/field-dependencies/pages.js.map +1 -0
  179. package/lib/plugins/picklists/index.d.ts +23 -0
  180. package/lib/plugins/picklists/index.e2e-spec.d.ts +1 -0
  181. package/lib/plugins/picklists/index.e2e-spec.js +128 -0
  182. package/lib/plugins/picklists/index.e2e-spec.js.map +1 -0
  183. package/lib/plugins/picklists/index.js +229 -0
  184. package/lib/plugins/picklists/index.js.map +1 -0
  185. package/lib/plugins/picklists/pages.d.ts +45 -0
  186. package/lib/plugins/picklists/pages.js +185 -0
  187. package/lib/plugins/picklists/pages.js.map +1 -0
  188. package/lib/plugins/picklists/standard-value-set.d.ts +1 -0
  189. package/lib/plugins/picklists/standard-value-set.js +80 -0
  190. package/lib/plugins/picklists/standard-value-set.js.map +1 -0
  191. package/lib/plugins/record-types/index.d.ts +14 -0
  192. package/lib/plugins/record-types/index.e2e-spec.d.ts +1 -0
  193. package/lib/plugins/record-types/index.e2e-spec.js +76 -0
  194. package/lib/plugins/record-types/index.e2e-spec.js.map +1 -0
  195. package/lib/plugins/record-types/index.js +133 -0
  196. package/lib/plugins/record-types/index.js.map +1 -0
  197. package/lib/plugins/record-types/pages.d.ts +14 -0
  198. package/lib/plugins/record-types/pages.js +50 -0
  199. package/lib/plugins/record-types/pages.js.map +1 -0
  200. package/lib/plugins/relate-contact-to-multiple-accounts/index.d.ts +11 -0
  201. package/lib/plugins/relate-contact-to-multiple-accounts/index.e2e-spec.d.ts +1 -0
  202. package/lib/plugins/relate-contact-to-multiple-accounts/index.e2e-spec.js +30 -0
  203. package/lib/plugins/relate-contact-to-multiple-accounts/index.e2e-spec.js.map +1 -0
  204. package/lib/plugins/relate-contact-to-multiple-accounts/index.js +120 -0
  205. package/lib/plugins/relate-contact-to-multiple-accounts/index.js.map +1 -0
  206. package/lib/plugins/reports-and-dashboards/folder-sharing/index.d.ts +8 -0
  207. package/lib/plugins/reports-and-dashboards/folder-sharing/index.e2e-spec.d.ts +1 -0
  208. package/lib/plugins/reports-and-dashboards/folder-sharing/index.e2e-spec.js +3 -0
  209. package/lib/plugins/reports-and-dashboards/folder-sharing/index.e2e-spec.js.map +1 -0
  210. package/lib/plugins/reports-and-dashboards/folder-sharing/index.js +116 -0
  211. package/lib/plugins/reports-and-dashboards/folder-sharing/index.js.map +1 -0
  212. package/lib/plugins/reports-and-dashboards/index.d.ts +11 -0
  213. package/lib/plugins/reports-and-dashboards/index.e2e-spec.d.ts +1 -0
  214. package/lib/plugins/reports-and-dashboards/index.e2e-spec.js +3 -0
  215. package/lib/plugins/reports-and-dashboards/index.e2e-spec.js.map +1 -0
  216. package/lib/plugins/reports-and-dashboards/index.js +29 -0
  217. package/lib/plugins/reports-and-dashboards/index.js.map +1 -0
  218. package/lib/plugins/salesforce-cpq-config/formConfig.d.ts +17 -0
  219. package/lib/plugins/salesforce-cpq-config/formConfig.js +649 -0
  220. package/lib/plugins/salesforce-cpq-config/formConfig.js.map +1 -0
  221. package/lib/plugins/salesforce-cpq-config/index.d.ts +7 -0
  222. package/lib/plugins/salesforce-cpq-config/index.e2e-spec.d.ts +1 -0
  223. package/lib/plugins/salesforce-cpq-config/index.e2e-spec.js +37 -0
  224. package/lib/plugins/salesforce-cpq-config/index.e2e-spec.js.map +1 -0
  225. package/lib/plugins/salesforce-cpq-config/index.js +261 -0
  226. package/lib/plugins/salesforce-cpq-config/index.js.map +1 -0
  227. package/lib/plugins/salesforce-to-salesforce/index.d.ts +9 -0
  228. package/lib/plugins/salesforce-to-salesforce/index.e2e-spec.d.ts +1 -0
  229. package/lib/plugins/salesforce-to-salesforce/index.e2e-spec.js +34 -0
  230. package/lib/plugins/salesforce-to-salesforce/index.e2e-spec.js.map +1 -0
  231. package/lib/plugins/salesforce-to-salesforce/index.js +107 -0
  232. package/lib/plugins/salesforce-to-salesforce/index.js.map +1 -0
  233. package/lib/plugins/scheduled-batches/index.d.ts +10 -0
  234. package/lib/plugins/scheduled-batches/index.js +145 -0
  235. package/lib/plugins/scheduled-batches/index.js.map +1 -0
  236. package/lib/plugins/scheduled-batches/page.d.ts +19 -0
  237. package/lib/plugins/scheduled-batches/page.js +39 -0
  238. package/lib/plugins/scheduled-batches/page.js.map +1 -0
  239. package/lib/plugins/security/authentication-configuration/index.d.ts +15 -0
  240. package/lib/plugins/security/authentication-configuration/index.e2e-spec.d.ts +1 -0
  241. package/lib/plugins/security/authentication-configuration/index.e2e-spec.js +129 -0
  242. package/lib/plugins/security/authentication-configuration/index.e2e-spec.js.map +1 -0
  243. package/lib/plugins/security/authentication-configuration/index.js +200 -0
  244. package/lib/plugins/security/authentication-configuration/index.js.map +1 -0
  245. package/lib/plugins/security/certificate-and-key-management/index.d.ts +23 -0
  246. package/lib/plugins/security/certificate-and-key-management/index.e2e-spec.d.ts +1 -0
  247. package/lib/plugins/security/certificate-and-key-management/index.e2e-spec.js +59 -0
  248. package/lib/plugins/security/certificate-and-key-management/index.e2e-spec.js.map +1 -0
  249. package/lib/plugins/security/certificate-and-key-management/index.js +233 -0
  250. package/lib/plugins/security/certificate-and-key-management/index.js.map +1 -0
  251. package/lib/plugins/security/certificate-and-key-management/index.test.d.ts +1 -0
  252. package/lib/plugins/security/certificate-and-key-management/index.test.js +61 -0
  253. package/lib/plugins/security/certificate-and-key-management/index.test.js.map +1 -0
  254. package/lib/plugins/security/index.d.ts +13 -0
  255. package/lib/plugins/security/index.js +41 -0
  256. package/lib/plugins/security/index.js.map +1 -0
  257. package/lib/plugins/service-channels/capacity/index.d.ts +18 -0
  258. package/lib/plugins/service-channels/capacity/index.js +194 -0
  259. package/lib/plugins/service-channels/capacity/index.js.map +1 -0
  260. package/lib/plugins/service-channels/index.d.ts +12 -0
  261. package/lib/plugins/service-channels/index.e2e-spec.d.ts +1 -0
  262. package/lib/plugins/service-channels/index.e2e-spec.js +67 -0
  263. package/lib/plugins/service-channels/index.e2e-spec.js.map +1 -0
  264. package/lib/plugins/service-channels/index.js +37 -0
  265. package/lib/plugins/service-channels/index.js.map +1 -0
  266. package/lib/plugins/slack/index.d.ts +9 -0
  267. package/lib/plugins/slack/index.e2e-spec.d.ts +1 -0
  268. package/lib/plugins/slack/index.e2e-spec.js +47 -0
  269. package/lib/plugins/slack/index.e2e-spec.js.map +1 -0
  270. package/lib/plugins/slack/index.js +111 -0
  271. package/lib/plugins/slack/index.js.map +1 -0
  272. package/lib/plugins/user-access-policies/index.d.ts +19 -0
  273. package/lib/plugins/user-access-policies/index.e2e-spec.d.ts +1 -0
  274. package/lib/plugins/user-access-policies/index.e2e-spec.js +61 -0
  275. package/lib/plugins/user-access-policies/index.e2e-spec.js.map +1 -0
  276. package/lib/plugins/user-access-policies/index.js +176 -0
  277. package/lib/plugins/user-access-policies/index.js.map +1 -0
  278. package/lib/plugins/user-access-policies/page.d.ts +30 -0
  279. package/lib/plugins/user-access-policies/page.js +114 -0
  280. package/lib/plugins/user-access-policies/page.js.map +1 -0
  281. package/lib/plugins/utils.d.ts +13 -0
  282. package/lib/plugins/utils.js +159 -0
  283. package/lib/plugins/utils.js.map +1 -0
  284. package/oclif.manifest.json +177 -0
  285. package/package.json +65 -0
@@ -0,0 +1,116 @@
1
+ var __addDisposableResource = (this && this.__addDisposableResource) || function (env, value, async) {
2
+ if (value !== null && value !== void 0) {
3
+ if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected.");
4
+ var dispose, inner;
5
+ if (async) {
6
+ if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined.");
7
+ dispose = value[Symbol.asyncDispose];
8
+ }
9
+ if (dispose === void 0) {
10
+ if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined.");
11
+ dispose = value[Symbol.dispose];
12
+ if (async) inner = dispose;
13
+ }
14
+ if (typeof dispose !== "function") throw new TypeError("Object not disposable.");
15
+ if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };
16
+ env.stack.push({ value: value, dispose: dispose, async: async });
17
+ }
18
+ else if (async) {
19
+ env.stack.push({ async: true });
20
+ }
21
+ return value;
22
+ };
23
+ var __disposeResources = (this && this.__disposeResources) || (function (SuppressedError) {
24
+ return function (env) {
25
+ function fail(e) {
26
+ env.error = env.hasError ? new SuppressedError(e, env.error, "An error was suppressed during disposal.") : e;
27
+ env.hasError = true;
28
+ }
29
+ var r, s = 0;
30
+ function next() {
31
+ while (r = env.stack.pop()) {
32
+ try {
33
+ if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);
34
+ if (r.dispose) {
35
+ var result = r.dispose.call(r.value);
36
+ if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });
37
+ }
38
+ else s |= 1;
39
+ }
40
+ catch (e) {
41
+ fail(e);
42
+ }
43
+ }
44
+ if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();
45
+ if (env.hasError) throw env.error;
46
+ }
47
+ return next();
48
+ };
49
+ })(typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
50
+ var e = new Error(message);
51
+ return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
52
+ });
53
+ import { BrowserforcePlugin } from '../../../plugin.js';
54
+ const BASE_PATH = '/ui/rpt/AnalyticsSharingSettingsPage/e';
55
+ const BASE_SELECTOR = 'div.pbBody';
56
+ const ENABLE_CHECKBOX_SELECTOR = 'input[id="0"]';
57
+ const SAVE_BUTTON_SELECTOR = 'input[id="saveButton"]';
58
+ export class FolderSharing extends BrowserforcePlugin {
59
+ async retrieve(definition) {
60
+ const env_1 = { stack: [], error: void 0, hasError: false };
61
+ try {
62
+ const response = {
63
+ enableEnhancedFolderSharing: true,
64
+ };
65
+ const page = __addDisposableResource(env_1, await this.browserforce.openPage(BASE_PATH), true);
66
+ try {
67
+ const frameOrPage = await this.browserforce.waitForSelectorInFrameOrPage(page, BASE_SELECTOR);
68
+ const inputEnable = await frameOrPage.locator(ENABLE_CHECKBOX_SELECTOR).count();
69
+ if (inputEnable > 0) {
70
+ response.enableEnhancedFolderSharing = await frameOrPage.locator(ENABLE_CHECKBOX_SELECTOR).isChecked();
71
+ }
72
+ else {
73
+ // already enabled
74
+ response.enableEnhancedFolderSharing = true;
75
+ }
76
+ }
77
+ catch (e) {
78
+ if (e instanceof Error && e.message.match('Insufficient Privileges')) {
79
+ return response;
80
+ }
81
+ throw e;
82
+ }
83
+ return response;
84
+ }
85
+ catch (e_1) {
86
+ env_1.error = e_1;
87
+ env_1.hasError = true;
88
+ }
89
+ finally {
90
+ const result_1 = __disposeResources(env_1);
91
+ if (result_1)
92
+ await result_1;
93
+ }
94
+ }
95
+ async apply(config) {
96
+ const env_2 = { stack: [], error: void 0, hasError: false };
97
+ try {
98
+ if (config.enableEnhancedFolderSharing === false) {
99
+ throw new Error('`enableEnhancedFolderSharing` cannot be disabled once enabled');
100
+ }
101
+ const page = __addDisposableResource(env_2, await this.browserforce.openPage(BASE_PATH), true);
102
+ await page.locator(ENABLE_CHECKBOX_SELECTOR).setChecked(config.enableEnhancedFolderSharing);
103
+ await Promise.all([page.waitForEvent('load'), page.locator(SAVE_BUTTON_SELECTOR).click()]);
104
+ }
105
+ catch (e_2) {
106
+ env_2.error = e_2;
107
+ env_2.hasError = true;
108
+ }
109
+ finally {
110
+ const result_2 = __disposeResources(env_2);
111
+ if (result_2)
112
+ await result_2;
113
+ }
114
+ }
115
+ }
116
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/plugins/reports-and-dashboards/folder-sharing/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAExD,MAAM,SAAS,GAAG,wCAAwC,CAAC;AAE3D,MAAM,aAAa,GAAG,YAAY,CAAC;AACnC,MAAM,wBAAwB,GAAG,eAAe,CAAC;AACjD,MAAM,oBAAoB,GAAG,wBAAwB,CAAC;AAMtD,MAAM,OAAO,aAAc,SAAQ,kBAAkB;IAC5C,KAAK,CAAC,QAAQ,CAAC,UAAmB;;;YACvC,MAAM,QAAQ,GAAG;gBACf,2BAA2B,EAAE,IAAI;aAClC,CAAC;YACF,MAAY,IAAI,kCAAG,MAAM,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,SAAS,CAAC,OAAA,CAAC;YAE/D,IAAI,CAAC;gBACH,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,YAAY,CAAC,4BAA4B,CAAC,IAAI,EAAE,aAAa,CAAC,CAAC;gBAC9F,MAAM,WAAW,GAAG,MAAM,WAAW,CAAC,OAAO,CAAC,wBAAwB,CAAC,CAAC,KAAK,EAAE,CAAC;gBAChF,IAAI,WAAW,GAAG,CAAC,EAAE,CAAC;oBACpB,QAAQ,CAAC,2BAA2B,GAAG,MAAM,WAAW,CAAC,OAAO,CAAC,wBAAwB,CAAC,CAAC,SAAS,EAAE,CAAC;gBACzG,CAAC;qBAAM,CAAC;oBACN,kBAAkB;oBAClB,QAAQ,CAAC,2BAA2B,GAAG,IAAI,CAAC;gBAC9C,CAAC;YACH,CAAC;YAAC,OAAO,CAAC,EAAE,CAAC;gBACX,IAAI,CAAC,YAAY,KAAK,IAAI,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,yBAAyB,CAAC,EAAE,CAAC;oBACrE,OAAO,QAAQ,CAAC;gBAClB,CAAC;gBACD,MAAM,CAAC,CAAC;YACV,CAAC;YACD,OAAO,QAAQ,CAAC;;;;;;;;;;;KACjB;IAEM,KAAK,CAAC,KAAK,CAAC,MAAc;;;YAC/B,IAAI,MAAM,CAAC,2BAA2B,KAAK,KAAK,EAAE,CAAC;gBACjD,MAAM,IAAI,KAAK,CAAC,+DAA+D,CAAC,CAAC;YACnF,CAAC;YACD,MAAY,IAAI,kCAAG,MAAM,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,SAAS,CAAC,OAAA,CAAC;YAC/D,MAAM,IAAI,CAAC,OAAO,CAAC,wBAAwB,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,2BAA2B,CAAC,CAAC;YAC5F,MAAM,OAAO,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,oBAAoB,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;;;;;;;;;;;KAC5F;CACF"}
@@ -0,0 +1,11 @@
1
+ import { BrowserforcePlugin } from '../../plugin.js';
2
+ import { Config as FolderSharingConfig } from './folder-sharing/index.js';
3
+ type Config = {
4
+ folderSharing?: FolderSharingConfig;
5
+ };
6
+ export declare class ReportsAndDashboards extends BrowserforcePlugin {
7
+ retrieve(definition?: Config): Promise<Config>;
8
+ diff(state: Config, definition: Config): Config | undefined;
9
+ apply(plan: Config): Promise<void>;
10
+ }
11
+ export {};
@@ -0,0 +1,3 @@
1
+ export {};
2
+ // no tests because the folder sharing setting is only available in old orgs
3
+ //# sourceMappingURL=index.e2e-spec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.e2e-spec.js","sourceRoot":"","sources":["../../../src/plugins/reports-and-dashboards/index.e2e-spec.ts"],"names":[],"mappings":";AAAA,4EAA4E"}
@@ -0,0 +1,29 @@
1
+ import { BrowserforcePlugin } from '../../plugin.js';
2
+ import { FolderSharing } from './folder-sharing/index.js';
3
+ export class ReportsAndDashboards extends BrowserforcePlugin {
4
+ async retrieve(definition) {
5
+ const response = {};
6
+ if (definition) {
7
+ if (definition.folderSharing) {
8
+ const pluginFolderSharing = new FolderSharing(this.browserforce);
9
+ response.folderSharing = await pluginFolderSharing.retrieve(definition.folderSharing);
10
+ }
11
+ }
12
+ return response;
13
+ }
14
+ diff(state, definition) {
15
+ const response = {};
16
+ const folderSharing = new FolderSharing(this.browserforce).diff(state.folderSharing, definition.folderSharing);
17
+ if (folderSharing !== undefined) {
18
+ response.folderSharing = folderSharing;
19
+ }
20
+ return Object.keys(response).length ? response : undefined;
21
+ }
22
+ async apply(plan) {
23
+ if (plan.folderSharing) {
24
+ const pluginFolderSharing = new FolderSharing(this.browserforce);
25
+ await pluginFolderSharing.apply(plan.folderSharing);
26
+ }
27
+ }
28
+ }
29
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/plugins/reports-and-dashboards/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAiC,MAAM,2BAA2B,CAAC;AAMzF,MAAM,OAAO,oBAAqB,SAAQ,kBAAkB;IACnD,KAAK,CAAC,QAAQ,CAAC,UAAmB;QACvC,MAAM,QAAQ,GAAW,EAAE,CAAC;QAC5B,IAAI,UAAU,EAAE,CAAC;YACf,IAAI,UAAU,CAAC,aAAa,EAAE,CAAC;gBAC7B,MAAM,mBAAmB,GAAG,IAAI,aAAa,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;gBACjE,QAAQ,CAAC,aAAa,GAAG,MAAM,mBAAmB,CAAC,QAAQ,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;YACxF,CAAC;QACH,CAAC;QACD,OAAO,QAAQ,CAAC;IAClB,CAAC;IAEM,IAAI,CAAC,KAAa,EAAE,UAAkB;QAC3C,MAAM,QAAQ,GAAW,EAAE,CAAC;QAC5B,MAAM,aAAa,GAAG,IAAI,aAAa,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,aAAa,EAAE,UAAU,CAAC,aAAa,CAEhG,CAAC;QACd,IAAI,aAAa,KAAK,SAAS,EAAE,CAAC;YAChC,QAAQ,CAAC,aAAa,GAAG,aAAa,CAAC;QACzC,CAAC;QACD,OAAO,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC;IAC7D,CAAC;IAEM,KAAK,CAAC,KAAK,CAAC,IAAY;QAC7B,IAAI,IAAI,CAAC,aAAa,EAAE,CAAC;YACvB,MAAM,mBAAmB,GAAG,IAAI,aAAa,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;YACjE,MAAM,mBAAmB,CAAC,KAAK,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;QACtD,CAAC;IACH,CAAC;CACF"}
@@ -0,0 +1,17 @@
1
+ export type FormConfig = {
2
+ [key: string]: {
3
+ label: string;
4
+ component: string;
5
+ id: string;
6
+ properties: {
7
+ [key: string]: {
8
+ label: string;
9
+ component: string;
10
+ type: string;
11
+ name: string;
12
+ immediatelySave?: boolean;
13
+ };
14
+ };
15
+ };
16
+ };
17
+ export declare const formConfig: FormConfig;