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,19 @@
1
+ import { Browserforce } from '../../browserforce.js';
2
+ import { type FrameLocator, type Page } from 'playwright';
3
+ export declare class ScheduledBatchesPage {
4
+ private page;
5
+ constructor(page: Page | FrameLocator);
6
+ /**
7
+ * Click the Apply Changes button
8
+ */
9
+ clickApplyChanges(): Promise<void>;
10
+ resolveAllJobScheduleNames(browserforce: Browserforce, scheduleObjectApi: string): Promise<{
11
+ name: string;
12
+ id: string;
13
+ }[]>;
14
+ resolveJobScheduleNames(browserforce: Browserforce, jobScheduleNames: string[], scheduleObjectApi: string): Promise<{
15
+ name: string;
16
+ id: string;
17
+ }[]>;
18
+ static getTableSelector(): string;
19
+ }
@@ -0,0 +1,39 @@
1
+ import { waitForPageErrors } from '../../browserforce.js';
2
+ const TABLE_SELECTOR = 'table.list, table.slds-vf-data-table';
3
+ const APPLY_BUTTON_SELECTOR = 'input[type="submit"][value="Apply Changes"].btn';
4
+ export class ScheduledBatchesPage {
5
+ page;
6
+ constructor(page) {
7
+ this.page = page;
8
+ }
9
+ /**
10
+ * Click the Apply Changes button
11
+ */
12
+ async clickApplyChanges() {
13
+ // Save the settings
14
+ await this.page
15
+ .locator(APPLY_BUTTON_SELECTOR)
16
+ .filter({ visible: true }) // there are three save buttons [not visible, top row, bottom row]
17
+ .first()
18
+ .click();
19
+ await Promise.race([
20
+ this.page.getByText('Success:Batch Job Schedules updated successfully').waitFor(),
21
+ waitForPageErrors(this.page),
22
+ ]);
23
+ }
24
+ async resolveAllJobScheduleNames(browserforce, scheduleObjectApi) {
25
+ const query = `SELECT Id, Name FROM ${scheduleObjectApi}`;
26
+ const result = await browserforce.connection.query(query);
27
+ return result.records.map((record) => ({ id: record.Id, name: record.Name }));
28
+ }
29
+ async resolveJobScheduleNames(browserforce, jobScheduleNames, scheduleObjectApi) {
30
+ const escapedJobScheduleNames = jobScheduleNames.map((jobScheduleName) => jobScheduleName.replace(/'/g, "''"));
31
+ const query = `SELECT Id, Name FROM ${scheduleObjectApi} WHERE Name IN ('${escapedJobScheduleNames.join("', '")}')`;
32
+ const result = await browserforce.connection.query(query);
33
+ return result.records.map((record) => ({ id: record.Id, name: record.Name }));
34
+ }
35
+ static getTableSelector() {
36
+ return TABLE_SELECTOR;
37
+ }
38
+ }
39
+ //# sourceMappingURL=page.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"page.js","sourceRoot":"","sources":["../../../src/plugins/scheduled-batches/page.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAGxE,MAAM,cAAc,GAAG,sCAAsC,CAAC;AAC9D,MAAM,qBAAqB,GAAG,iDAAiD,CAAC;AAEhF,MAAM,OAAO,oBAAoB;IACvB,IAAI,CAAsB;IAElC,YAAY,IAAyB;QACnC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;IAED;;OAEG;IACI,KAAK,CAAC,iBAAiB;QAC5B,oBAAoB;QACpB,MAAM,IAAI,CAAC,IAAI;aACZ,OAAO,CAAC,qBAAqB,CAAC;aAC9B,MAAM,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,kEAAkE;aAC5F,KAAK,EAAE;aACP,KAAK,EAAE,CAAC;QAEX,MAAM,OAAO,CAAC,IAAI,CAAC;YACjB,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,kDAAkD,CAAC,CAAC,OAAO,EAAE;YACjF,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC;SAC7B,CAAC,CAAC;IACL,CAAC;IAEM,KAAK,CAAC,0BAA0B,CACrC,YAA0B,EAC1B,iBAAyB;QAEzB,MAAM,KAAK,GAAG,wBAAwB,iBAAiB,EAAE,CAAC;QAC1D,MAAM,MAAM,GAAG,MAAM,YAAY,CAAC,UAAU,CAAC,KAAK,CAA+B,KAAK,CAAC,CAAC;QAExF,OAAO,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE,MAAM,CAAC,EAAE,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;IAChF,CAAC;IAEM,KAAK,CAAC,uBAAuB,CAClC,YAA0B,EAC1B,gBAA0B,EAC1B,iBAAyB;QAEzB,MAAM,uBAAuB,GAAG,gBAAgB,CAAC,GAAG,CAAC,CAAC,eAAe,EAAE,EAAE,CAAC,eAAe,CAAC,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC;QAC/G,MAAM,KAAK,GAAG,wBAAwB,iBAAiB,oBAAoB,uBAAuB,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC;QACpH,MAAM,MAAM,GAAG,MAAM,YAAY,CAAC,UAAU,CAAC,KAAK,CAA+B,KAAK,CAAC,CAAC;QAExF,OAAO,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE,MAAM,CAAC,EAAE,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;IAChF,CAAC;IAEM,MAAM,CAAC,gBAAgB;QAC5B,OAAO,cAAc,CAAC;IACxB,CAAC;CACF"}
@@ -0,0 +1,15 @@
1
+ import { BrowserforcePlugin } from '../../../plugin.js';
2
+ export type Config = {
3
+ services: Array<{
4
+ label: string;
5
+ enabled: boolean;
6
+ } | {
7
+ authProviderApiName: string;
8
+ enabled: boolean;
9
+ }>;
10
+ };
11
+ export declare class AuthenticationConfiguration extends BrowserforcePlugin {
12
+ private getAuthProviderIds;
13
+ retrieve(definition: Config): Promise<Config>;
14
+ apply(plan: Config): Promise<void>;
15
+ }
@@ -0,0 +1,129 @@
1
+ import assert from 'assert';
2
+ import * as child from 'child_process';
3
+ import { fileURLToPath } from 'node:url';
4
+ import * as path from 'path';
5
+ import { AuthenticationConfiguration } from './index.js';
6
+ const __dirname = fileURLToPath(new URL('.', import.meta.url));
7
+ describe(AuthenticationConfiguration.name, function () {
8
+ let plugin;
9
+ before(() => {
10
+ plugin = new AuthenticationConfiguration(global.browserforce);
11
+ });
12
+ describe('authentication configuration', () => {
13
+ const configRetrieveSingle = {
14
+ services: [{ label: 'Login Form', enabled: true }],
15
+ };
16
+ const configRmoveSingle = {
17
+ services: [{ label: 'Login Form', enabled: false }],
18
+ };
19
+ const configApplyMultiple = {
20
+ services: [
21
+ { label: 'Login Form', enabled: false },
22
+ { label: 'TestAuthMethod', enabled: true },
23
+ ],
24
+ };
25
+ const configApplyMissing = {
26
+ services: [{ label: 'FakeAuthMethod', enabled: true }],
27
+ };
28
+ const resetTestState = {
29
+ services: [
30
+ { label: 'Login Form', enabled: true },
31
+ { label: 'TestAuthMethod', enabled: false },
32
+ ],
33
+ };
34
+ const configRetrieveByApiName = {
35
+ services: [{ authProviderApiName: 'TestAuthMethod', enabled: true }],
36
+ };
37
+ const configApplyByApiName = {
38
+ services: [
39
+ { label: 'Login Form', enabled: true },
40
+ { authProviderApiName: 'TestAuthMethod', enabled: false },
41
+ ],
42
+ };
43
+ const configApplyMissingApiName = {
44
+ services: [{ authProviderApiName: 'NonExistentAuthProvider', enabled: true }],
45
+ };
46
+ it('should retrieve the single enabled Login Form auth', async () => {
47
+ const res = await plugin.retrieve(configRetrieveSingle);
48
+ assert.deepStrictEqual(res, configRetrieveSingle);
49
+ });
50
+ it('should not do anything when the configuration is already set', async () => {
51
+ const res = await plugin.run(configRetrieveSingle);
52
+ assert.deepStrictEqual(res, { message: 'no action necessary' });
53
+ });
54
+ it('should throw an error when trying to remove the only enabled service', async () => {
55
+ let err;
56
+ try {
57
+ await plugin.apply(configRmoveSingle);
58
+ }
59
+ catch (e) {
60
+ err = e;
61
+ }
62
+ assert.throws(() => {
63
+ throw err;
64
+ }, /You must select at least one authentication service/);
65
+ });
66
+ it('should deploy an AuthProvider for testing', () => {
67
+ const sourceDeployCmd = child.spawnSync('sf', [
68
+ 'project',
69
+ 'deploy',
70
+ 'start',
71
+ '-d',
72
+ path.join(__dirname, 'sfdx-source'),
73
+ '--json',
74
+ ]);
75
+ assert.deepStrictEqual(sourceDeployCmd.status, 0, sourceDeployCmd.output.toString());
76
+ });
77
+ it('should update multiple auth services', async () => {
78
+ await plugin.apply(configApplyMultiple);
79
+ const res = await plugin.retrieve(configApplyMultiple);
80
+ assert.deepStrictEqual(res, configApplyMultiple);
81
+ });
82
+ it('should retrieve using authProviderApiName', async () => {
83
+ const res = await plugin.retrieve(configRetrieveByApiName);
84
+ assert.deepStrictEqual(res, configRetrieveByApiName);
85
+ });
86
+ it('should update auth service using authProviderApiName', async () => {
87
+ await plugin.apply(configApplyByApiName);
88
+ const res = await plugin.retrieve(configApplyByApiName);
89
+ assert.deepStrictEqual(res, configApplyByApiName);
90
+ });
91
+ it('should not do anything when run with authProviderApiName and config already set', async () => {
92
+ const res = await plugin.run(configApplyByApiName);
93
+ assert.deepStrictEqual(res, { message: 'no action necessary' });
94
+ });
95
+ it('should throw an error when authProviderApiName does not exist', async () => {
96
+ let err;
97
+ try {
98
+ await plugin.apply(configApplyMissingApiName);
99
+ }
100
+ catch (e) {
101
+ err = e;
102
+ }
103
+ assert.throws(() => {
104
+ throw err;
105
+ }, /not found/);
106
+ });
107
+ it('should throw an error when trying to apply a missing service', async () => {
108
+ let err;
109
+ try {
110
+ await plugin.apply(configApplyMissing);
111
+ }
112
+ catch (e) {
113
+ err = e;
114
+ }
115
+ assert.throws(() => {
116
+ throw err;
117
+ }, /not found/);
118
+ });
119
+ it('should reset auth services back to default', async () => {
120
+ await plugin.apply(resetTestState);
121
+ const res = await plugin.retrieve(resetTestState);
122
+ assert.deepStrictEqual(res, resetTestState);
123
+ });
124
+ it('should remove the testing AuthProvider', async () => {
125
+ await global.browserforce.connection.metadata.delete('AuthProvider', ['TestAuthMethod']);
126
+ });
127
+ });
128
+ });
129
+ //# sourceMappingURL=index.e2e-spec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.e2e-spec.js","sourceRoot":"","sources":["../../../../src/plugins/security/authentication-configuration/index.e2e-spec.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,KAAK,KAAK,MAAM,eAAe,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAe,2BAA2B,EAAE,MAAM,YAAY,CAAC;AAEtE,MAAM,SAAS,GAAG,aAAa,CAAC,IAAI,GAAG,CAAC,GAAG,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AAE/D,QAAQ,CAAC,2BAA2B,CAAC,IAAI,EAAE;IACzC,IAAI,MAAmC,CAAC;IAExC,MAAM,CAAC,GAAG,EAAE;QACV,MAAM,GAAG,IAAI,2BAA2B,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;IAChE,CAAC,CAAC,CAAC;IAEH,QAAQ,CAAC,8BAA8B,EAAE,GAAG,EAAE;QAC5C,MAAM,oBAAoB,GAAW;YACnC,QAAQ,EAAE,CAAC,EAAE,KAAK,EAAE,YAAY,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;SACnD,CAAC;QACF,MAAM,iBAAiB,GAAW;YAChC,QAAQ,EAAE,CAAC,EAAE,KAAK,EAAE,YAAY,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;SACpD,CAAC;QACF,MAAM,mBAAmB,GAAW;YAClC,QAAQ,EAAE;gBACR,EAAE,KAAK,EAAE,YAAY,EAAE,OAAO,EAAE,KAAK,EAAE;gBACvC,EAAE,KAAK,EAAE,gBAAgB,EAAE,OAAO,EAAE,IAAI,EAAE;aAC3C;SACF,CAAC;QACF,MAAM,kBAAkB,GAAW;YACjC,QAAQ,EAAE,CAAC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Ac,CAAC,CAAC;YACnC,MAAM,GAAG,GAAG,MAAM,MAAM,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC;YAClD,MAAM,CAAC,eAAe,CAAC,GAAG,EAAE,cAAc,CAAC,CAAC;QAC9C,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,wCAAwC,EAAE,KAAK,IAAI,EAAE;YACtD,MAAM,MAAM,CAAC,YAAY,CAAC,UAAU,CAAC,QAAQ,CAAC,MAAM,CAAC,cAAc,EAAE,CAAC,gBAAgB,CAAC,CAAC,CAAC;QAC3F,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -0,0 +1,200 @@
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 EDIT_VIEW_PATH = '/lightning/setup/OrgDomain/page?address=%2Fdomainname%2FEditLogin.apexp';
55
+ const SETUP_FORM_SELECTOR = 'form[id="BrandSetup:brandSetupForm"]';
56
+ const SERVICE_CHECKBOX_SELECTOR = 'input.authOption[type="checkbox"]';
57
+ const SAVE_BUTTON_SELECTOR = 'input[id$=":Save"]';
58
+ function authProviderIdMatchesCheckboxValue(authProviderId, checkboxValue) {
59
+ if (!checkboxValue)
60
+ return false;
61
+ // Support 15-char and 18-char Salesforce Id comparison
62
+ const id15 = authProviderId.substring(0, 15);
63
+ return authProviderId === checkboxValue || id15 === checkboxValue || authProviderId.includes(checkboxValue);
64
+ }
65
+ export class AuthenticationConfiguration extends BrowserforcePlugin {
66
+ async getAuthProviderIds(developerNames) {
67
+ if (developerNames.length === 0)
68
+ return new Map();
69
+ const developerNamesList = developerNames.map((name) => `'${name}'`).join(',');
70
+ const authProviders = await this.browserforce.connection.query(`SELECT Id, DeveloperName FROM AuthProvider WHERE DeveloperName IN (${developerNamesList})`);
71
+ const map = new Map();
72
+ for (const record of authProviders.records) {
73
+ map.set(record.DeveloperName, record.Id);
74
+ }
75
+ return map;
76
+ }
77
+ async retrieve(definition) {
78
+ const env_1 = { stack: [], error: void 0, hasError: false };
79
+ try {
80
+ const page = __addDisposableResource(env_1, await this.browserforce.openPage(EDIT_VIEW_PATH), true);
81
+ const frameOrPage = await this.browserforce.waitForSelectorInFrameOrPage(page, SETUP_FORM_SELECTOR);
82
+ const authProviderApiNames = definition.services
83
+ .filter((s) => 'authProviderApiName' in s)
84
+ .map((s) => s.authProviderApiName);
85
+ const authProviderIdMap = await this.getAuthProviderIds(authProviderApiNames);
86
+ const inputLocators = await frameOrPage.locator(SERVICE_CHECKBOX_SELECTOR).all();
87
+ const allServices = await Promise.all(inputLocators.map(async (input) => {
88
+ const id = await input.getAttribute('id');
89
+ const value = await input.getAttribute('value');
90
+ const labelLocator = frameOrPage.locator(`label[for="${id}"]`);
91
+ const labelCount = await labelLocator.count();
92
+ const label = labelCount > 0 ? (await labelLocator.textContent()).trim() : id;
93
+ return {
94
+ label,
95
+ value,
96
+ enabled: await input.isChecked(),
97
+ };
98
+ }));
99
+ const services = definition.services
100
+ .map((definedService) => {
101
+ if ('label' in definedService) {
102
+ const service = allServices.find((s) => s.label === definedService.label);
103
+ return service ? { label: service.label, enabled: service.enabled } : null;
104
+ }
105
+ const authProviderId = authProviderIdMap.get(definedService.authProviderApiName);
106
+ if (!authProviderId)
107
+ return null;
108
+ const service = allServices.find((s) => authProviderIdMatchesCheckboxValue(authProviderId, s.value));
109
+ return service ? { authProviderApiName: definedService.authProviderApiName, enabled: service.enabled } : null;
110
+ })
111
+ .filter((s) => s !== null);
112
+ return { services };
113
+ }
114
+ catch (e_1) {
115
+ env_1.error = e_1;
116
+ env_1.hasError = true;
117
+ }
118
+ finally {
119
+ const result_1 = __disposeResources(env_1);
120
+ if (result_1)
121
+ await result_1;
122
+ }
123
+ }
124
+ async apply(plan) {
125
+ const env_2 = { stack: [], error: void 0, hasError: false };
126
+ try {
127
+ const page = __addDisposableResource(env_2, await this.browserforce.openPage(EDIT_VIEW_PATH), true);
128
+ const frameOrPage = await this.browserforce.waitForSelectorInFrameOrPage(page, SETUP_FORM_SELECTOR);
129
+ const authProviderApiNames = plan.services
130
+ .filter((s) => 'authProviderApiName' in s)
131
+ .map((s) => s.authProviderApiName);
132
+ const authProviderIdMap = await this.getAuthProviderIds(authProviderApiNames);
133
+ for (const svc of plan.services) {
134
+ const inputLocators = await frameOrPage.locator(SERVICE_CHECKBOX_SELECTOR).all();
135
+ let checkboxId = null;
136
+ if ('label' in svc) {
137
+ for (const input of inputLocators) {
138
+ const id = await input.getAttribute('id');
139
+ const labelLocator = frameOrPage.locator(`label[for="${id}"]`);
140
+ const labelCount = await labelLocator.count();
141
+ if (labelCount > 0) {
142
+ const labelText = (await labelLocator.textContent()).trim();
143
+ if (labelText === svc.label) {
144
+ checkboxId = id;
145
+ break;
146
+ }
147
+ }
148
+ }
149
+ if (!checkboxId) {
150
+ throw new Error(`Authentication service "${svc.label}" not found`);
151
+ }
152
+ }
153
+ else {
154
+ const authProviderId = authProviderIdMap.get(svc.authProviderApiName);
155
+ if (!authProviderId) {
156
+ throw new Error(`AuthProvider with DeveloperName '${svc.authProviderApiName}' not found. ` +
157
+ `Please verify the AuthProvider exists in your org.`);
158
+ }
159
+ for (const input of inputLocators) {
160
+ const id = await input.getAttribute('id');
161
+ const value = await input.getAttribute('value');
162
+ if (authProviderIdMatchesCheckboxValue(authProviderId, value)) {
163
+ checkboxId = id;
164
+ break;
165
+ }
166
+ }
167
+ if (!checkboxId) {
168
+ throw new Error(`Authentication service for AuthProvider '${svc.authProviderApiName}' not found. ` +
169
+ `It may not be available in the Authentication Service configuration.`);
170
+ }
171
+ }
172
+ const selector = `[id="${checkboxId}"]`;
173
+ const isChecked = await frameOrPage.locator(selector).isChecked();
174
+ if (svc.enabled !== isChecked) {
175
+ await frameOrPage.locator(selector).click();
176
+ }
177
+ }
178
+ const inputLocators = await frameOrPage.locator(SERVICE_CHECKBOX_SELECTOR).all();
179
+ const checkedStates = await Promise.all(inputLocators.map((input) => input.isChecked()));
180
+ const anyChecked = checkedStates.some((checked) => checked);
181
+ if (!anyChecked) {
182
+ throw new Error('Change failed: "You must select at least one authentication service."');
183
+ }
184
+ await Promise.all([
185
+ page.waitForResponse((resp) => new URL(resp.url()).pathname === '/domainname/DomainName.apexp'),
186
+ frameOrPage.locator(SAVE_BUTTON_SELECTOR).first().click(),
187
+ ]);
188
+ }
189
+ catch (e_2) {
190
+ env_2.error = e_2;
191
+ env_2.hasError = true;
192
+ }
193
+ finally {
194
+ const result_2 = __disposeResources(env_2);
195
+ if (result_2)
196
+ await result_2;
197
+ }
198
+ }
199
+ }
200
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/plugins/security/authentication-configuration/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAWxD,MAAM,cAAc,GAAG,yEAAyE,CAAC;AAEjG,MAAM,mBAAmB,GAAG,sCAAsC,CAAC;AACnE,MAAM,yBAAyB,GAAG,mCAAmC,CAAC;AACtE,MAAM,oBAAoB,GAAG,oBAAoB,CAAC;AAElD,SAAS,kCAAkC,CAAC,cAAsB,EAAE,aAA4B;IAC9F,IAAI,CAAC,aAAa;QAAE,OAAO,KAAK,CAAC;IACjC,uDAAuD;IACvD,MAAM,IAAI,GAAG,cAAc,CAAC,SAAS,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IAC7C,OAAO,cAAc,KAAK,aAAa,IAAI,IAAI,KAAK,aAAa,IAAI,cAAc,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC;AAC9G,CAAC;AAED,MAAM,OAAO,2BAA4B,SAAQ,kBAAkB;IACzD,KAAK,CAAC,kBAAkB,CAAC,cAAwB;QACvD,IAAI,cAAc,CAAC,MAAM,KAAK,CAAC;YAAE,OAAO,IAAI,GAAG,EAAE,CAAC;QAClD,MAAM,kBAAkB,GAAG,cAAc,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,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AI,CAAC;gBACxC,MAAM,SAAS,GAAG,MAAM,WAAW,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,SAAS,EAAE,CAAC;gBAElE,IAAI,GAAG,CAAC,OAAO,KAAK,SAAS,EAAE,CAAC;oBAC9B,MAAM,WAAW,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,KAAK,EAAE,CAAC;gBAC9C,CAAC;YACH,CAAC;YAED,MAAM,aAAa,GAAG,MAAM,WAAW,CAAC,OAAO,CAAC,yBAAyB,CAAC,CAAC,GAAG,EAAE,CAAC;YACjF,MAAM,aAAa,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC;YACzF,MAAM,UAAU,GAAG,aAAa,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,CAAC;YAC5D,IAAI,CAAC,UAAU,EAAE,CAAC;gBAChB,MAAM,IAAI,KAAK,CAAC,uEAAuE,CAAC,CAAC;YAC3F,CAAC;YACD,MAAM,OAAO,CAAC,GAAG,CAAC;gBAChB,IAAI,CAAC,eAAe,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,GAAG,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC,QAAQ,KAAK,8BAA8B,CAAC;gBAC/F,WAAW,CAAC,OAAO,CAAC,oBAAoB,CAAC,CAAC,KAAK,EAAE,CAAC,KAAK,EAAE;aAC1D,CAAC,CAAC;;;;;;;;;;;KACJ;CACF"}
@@ -0,0 +1,23 @@
1
+ import { BrowserforcePlugin } from '../../../plugin.js';
2
+ export type Config = {
3
+ certificates?: Certificate[];
4
+ importFromKeystore?: KeyStore[];
5
+ };
6
+ type Certificate = {
7
+ name: string;
8
+ label: string;
9
+ exportable?: boolean;
10
+ keySize?: number;
11
+ _id?: string;
12
+ };
13
+ type KeyStore = {
14
+ name: string;
15
+ filePath?: string;
16
+ password?: string;
17
+ };
18
+ export declare class CertificateAndKeyManagement extends BrowserforcePlugin {
19
+ retrieve(definition: Config): Promise<Config>;
20
+ diff(state?: Config, definition?: Config): Config | undefined;
21
+ apply(plan: Config): Promise<void>;
22
+ }
23
+ export {};
@@ -0,0 +1,59 @@
1
+ import assert from 'assert';
2
+ import { spawnSync } from 'node:child_process';
3
+ import { join, resolve } from 'node:path';
4
+ import { fileURLToPath } from 'node:url';
5
+ import { CertificateAndKeyManagement } from './index.js';
6
+ describe(CertificateAndKeyManagement.name, function () {
7
+ let pluginCertificateManagement;
8
+ before(() => {
9
+ pluginCertificateManagement = new CertificateAndKeyManagement(global.browserforce);
10
+ });
11
+ const configCreatedCert = {
12
+ certificates: [
13
+ {
14
+ name: 'foo',
15
+ label: 'foo',
16
+ },
17
+ ],
18
+ };
19
+ const configImportFromKeystore = {
20
+ importFromKeystore: [
21
+ {
22
+ filePath: './src/plugins/security/certificate-and-key-management/Dummy.jks',
23
+ name: 'Dummy',
24
+ },
25
+ ],
26
+ };
27
+ it('should enable Identity Provider as a prerequisite', async () => {
28
+ // https://salesforce.stackexchange.com/questions/61618/import-keystore-in-certificate-and-key-management
29
+ const __dirname = fileURLToPath(new URL('.', import.meta.url));
30
+ const dir = resolve(join(__dirname, 'sfdx-source', 'identity-provider'));
31
+ const sourceDeployCmd = spawnSync('sf', ['project', 'deploy', 'start', '-d', dir, '--json']);
32
+ assert.deepStrictEqual(sourceDeployCmd.status, 0, sourceDeployCmd.output.toString());
33
+ });
34
+ it('should create a self-signed certificate', async () => {
35
+ await pluginCertificateManagement.apply(configCreatedCert);
36
+ });
37
+ it('should not do anything if self-signed certificate is already available', async () => {
38
+ // explictly pass definition to retrieve
39
+ const res = await pluginCertificateManagement.run(configCreatedCert);
40
+ assert.deepStrictEqual(res, { message: 'no action necessary' });
41
+ });
42
+ it('should import a cert from a keystore', async () => {
43
+ await pluginCertificateManagement.run(configImportFromKeystore);
44
+ });
45
+ it('should not do anything if cert is already available in keystore', async () => {
46
+ const res = await pluginCertificateManagement.run(configImportFromKeystore);
47
+ assert.deepStrictEqual(res, { message: 'no action necessary' });
48
+ });
49
+ it('should disable Identity Provider', async () => {
50
+ const __dirname = fileURLToPath(new URL('.', import.meta.url));
51
+ const dir = resolve(join(__dirname, 'sfdx-source', 'disable-identity-provider'));
52
+ const sourceDeployCmd = spawnSync('sf', ['project', 'deploy', 'start', '-d', dir, '--json']);
53
+ assert.deepStrictEqual(sourceDeployCmd.status, 0, sourceDeployCmd.output.toString());
54
+ });
55
+ it('should delete certificates using Metadata API', async () => {
56
+ await global.browserforce.connection.metadata.delete('Certificate', ['identity_provider', 'foo', 'Dummy']);
57
+ });
58
+ });
59
+ //# sourceMappingURL=index.e2e-spec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.e2e-spec.js","sourceRoot":"","sources":["../../../../src/plugins/security/certificate-and-key-management/index.e2e-spec.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,2BAA2B,EAAE,MAAM,YAAY,CAAC;AAEzD,QAAQ,CAAC,2BAA2B,CAAC,IAAI,EAAE;IACzC,IAAI,2BAAwD,CAAC;IAC7D,MAAM,CAAC,GAAG,EAAE;QACV,2BAA2B,GAAG,IAAI,2BAA2B,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;IACrF,CAAC,CAAC,CAAC;IAEH,MAAM,iBAAiB,GAAG;QACxB,YAAY,EAAE;YACZ;gBACE,IAAI,EAAE,KAAK;gBACX,KAAK,EAAE,KAAK;aACb;SACF;KACF,CAAC;IACF,MAAM,wBAAwB,GAAG;QAC/B,kBAAkB,EAAE;YAClB;gBACE,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