auth0-deploy-cli 8.21.0 → 8.23.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 (333) hide show
  1. package/.circleci/config.yml +57 -5
  2. package/CHANGELOG.md +46 -2
  3. package/README.md +1 -1
  4. package/eslint.config.js +131 -0
  5. package/lib/args.js +0 -1
  6. package/lib/commands/export.js +41 -49
  7. package/lib/commands/import.js +36 -43
  8. package/lib/commands/index.js +0 -1
  9. package/lib/configFactory.js +0 -1
  10. package/lib/context/defaults.d.ts +1 -0
  11. package/lib/context/defaults.js +57 -10
  12. package/lib/context/directory/handlers/actions.js +40 -39
  13. package/lib/context/directory/handlers/attackProtection.js +22 -34
  14. package/lib/context/directory/handlers/branding.js +12 -21
  15. package/lib/context/directory/handlers/clientGrants.js +52 -62
  16. package/lib/context/directory/handlers/clients.js +44 -57
  17. package/lib/context/directory/handlers/connectionProfiles.d.ts +1 -1
  18. package/lib/context/directory/handlers/connectionProfiles.js +20 -30
  19. package/lib/context/directory/handlers/connections.js +32 -41
  20. package/lib/context/directory/handlers/customDomains.js +9 -21
  21. package/lib/context/directory/handlers/databases.js +37 -35
  22. package/lib/context/directory/handlers/emailProvider.js +22 -36
  23. package/lib/context/directory/handlers/emailTemplates.js +20 -29
  24. package/lib/context/directory/handlers/flowVaultConnections.js +40 -49
  25. package/lib/context/directory/handlers/flows.js +38 -48
  26. package/lib/context/directory/handlers/forms.js +38 -48
  27. package/lib/context/directory/handlers/guardianFactorProviders.js +9 -21
  28. package/lib/context/directory/handlers/guardianFactorTemplates.js +9 -21
  29. package/lib/context/directory/handlers/guardianFactors.js +9 -21
  30. package/lib/context/directory/handlers/guardianPhoneFactorMessageTypes.js +8 -20
  31. package/lib/context/directory/handlers/guardianPhoneFactorSelectedProvider.js +8 -20
  32. package/lib/context/directory/handlers/guardianPolicies.js +8 -20
  33. package/lib/context/directory/handlers/hooks.js +24 -34
  34. package/lib/context/directory/handlers/index.js +4 -1
  35. package/lib/context/directory/handlers/logStreams.js +12 -24
  36. package/lib/context/directory/handlers/networkACLs.js +22 -34
  37. package/lib/context/directory/handlers/organizations.js +39 -44
  38. package/lib/context/directory/handlers/pages.js +31 -37
  39. package/lib/context/directory/handlers/phoneProvider.js +12 -24
  40. package/lib/context/directory/handlers/phoneTemplates.d.ts +6 -0
  41. package/lib/context/directory/handlers/phoneTemplates.js +39 -0
  42. package/lib/context/directory/handlers/prompts.js +58 -76
  43. package/lib/context/directory/handlers/resourceServers.d.ts +1 -1
  44. package/lib/context/directory/handlers/resourceServers.js +18 -30
  45. package/lib/context/directory/handlers/roles.js +21 -31
  46. package/lib/context/directory/handlers/rules.js +22 -32
  47. package/lib/context/directory/handlers/rulesConfigs.js +3 -15
  48. package/lib/context/directory/handlers/selfServiceProfiles.js +28 -40
  49. package/lib/context/directory/handlers/tenant.js +14 -34
  50. package/lib/context/directory/handlers/themes.js +9 -21
  51. package/lib/context/directory/handlers/tokenExchangeProfiles.d.ts +5 -0
  52. package/lib/context/directory/handlers/tokenExchangeProfiles.js +41 -0
  53. package/lib/context/directory/handlers/triggers.d.ts +1 -1
  54. package/lib/context/directory/handlers/triggers.js +16 -26
  55. package/lib/context/directory/handlers/userAttributeProfiles.d.ts +1 -1
  56. package/lib/context/directory/handlers/userAttributeProfiles.js +16 -26
  57. package/lib/context/directory/index.js +66 -80
  58. package/lib/context/index.js +7 -18
  59. package/lib/context/yaml/handlers/actions.js +39 -41
  60. package/lib/context/yaml/handlers/attackProtection.js +27 -41
  61. package/lib/context/yaml/handlers/branding.js +47 -69
  62. package/lib/context/yaml/handlers/clientGrants.js +26 -40
  63. package/lib/context/yaml/handlers/clients.js +69 -84
  64. package/lib/context/yaml/handlers/connectionProfiles.d.ts +1 -1
  65. package/lib/context/yaml/handlers/connectionProfiles.js +20 -34
  66. package/lib/context/yaml/handlers/connections.js +63 -67
  67. package/lib/context/yaml/handlers/customDomains.js +7 -19
  68. package/lib/context/yaml/handlers/databases.js +63 -65
  69. package/lib/context/yaml/handlers/emailProvider.js +22 -37
  70. package/lib/context/yaml/handlers/emailTemplates.js +28 -39
  71. package/lib/context/yaml/handlers/flowVaultConnections.js +37 -50
  72. package/lib/context/yaml/handlers/flows.js +55 -66
  73. package/lib/context/yaml/handlers/forms.js +55 -66
  74. package/lib/context/yaml/handlers/guardianFactorProviders.js +7 -19
  75. package/lib/context/yaml/handlers/guardianFactorTemplates.js +7 -19
  76. package/lib/context/yaml/handlers/guardianFactors.js +7 -19
  77. package/lib/context/yaml/handlers/guardianPhoneFactorMessageTypes.js +7 -19
  78. package/lib/context/yaml/handlers/guardianPhoneFactorSelectedProvider.js +7 -19
  79. package/lib/context/yaml/handlers/guardianPolicies.js +7 -19
  80. package/lib/context/yaml/handlers/hooks.js +34 -48
  81. package/lib/context/yaml/handlers/index.js +4 -1
  82. package/lib/context/yaml/handlers/logStreams.js +16 -30
  83. package/lib/context/yaml/handlers/networkACLs.js +25 -39
  84. package/lib/context/yaml/handlers/organizations.js +37 -46
  85. package/lib/context/yaml/handlers/pages.js +31 -39
  86. package/lib/context/yaml/handlers/phoneProvider.js +17 -31
  87. package/lib/context/yaml/handlers/phoneTemplates.d.ts +6 -0
  88. package/lib/context/yaml/handlers/phoneTemplates.js +25 -0
  89. package/lib/context/yaml/handlers/prompts.js +22 -47
  90. package/lib/context/yaml/handlers/resourceServers.d.ts +1 -1
  91. package/lib/context/yaml/handlers/resourceServers.js +21 -33
  92. package/lib/context/yaml/handlers/roles.js +19 -33
  93. package/lib/context/yaml/handlers/rules.js +28 -39
  94. package/lib/context/yaml/handlers/rulesConfigs.js +14 -28
  95. package/lib/context/yaml/handlers/selfServiceProfiles.js +29 -43
  96. package/lib/context/yaml/handlers/tenant.js +19 -41
  97. package/lib/context/yaml/handlers/themes.js +7 -19
  98. package/lib/context/yaml/handlers/tokenExchangeProfiles.d.ts +5 -0
  99. package/lib/context/yaml/handlers/tokenExchangeProfiles.js +27 -0
  100. package/lib/context/yaml/handlers/triggers.d.ts +1 -1
  101. package/lib/context/yaml/handlers/triggers.js +15 -29
  102. package/lib/context/yaml/handlers/userAttributeProfiles.d.ts +1 -1
  103. package/lib/context/yaml/handlers/userAttributeProfiles.js +7 -19
  104. package/lib/context/yaml/index.js +120 -128
  105. package/lib/index.d.ts +4 -96
  106. package/lib/index.js +24 -34
  107. package/lib/keywordPreservation.d.ts +1 -1
  108. package/lib/keywordPreservation.js +11 -6
  109. package/lib/logger.js +0 -1
  110. package/lib/readonly.js +3 -4
  111. package/lib/sessionDurationsToMinutes.js +0 -1
  112. package/lib/tools/auth0/client.js +108 -127
  113. package/lib/tools/auth0/handlers/actions.d.ts +8 -26
  114. package/lib/tools/auth0/handlers/actions.js +138 -149
  115. package/lib/tools/auth0/handlers/attackProtection.js +80 -92
  116. package/lib/tools/auth0/handlers/branding.js +75 -99
  117. package/lib/tools/auth0/handlers/clientGrants.d.ts +2 -9
  118. package/lib/tools/auth0/handlers/clientGrants.js +68 -73
  119. package/lib/tools/auth0/handlers/clients.d.ts +25 -13
  120. package/lib/tools/auth0/handlers/clients.js +134 -86
  121. package/lib/tools/auth0/handlers/connectionProfiles.d.ts +3 -1
  122. package/lib/tools/auth0/handlers/connectionProfiles.js +36 -32
  123. package/lib/tools/auth0/handlers/connections.d.ts +3 -1
  124. package/lib/tools/auth0/handlers/connections.js +130 -135
  125. package/lib/tools/auth0/handlers/customDomains.d.ts +4 -1
  126. package/lib/tools/auth0/handlers/customDomains.js +43 -53
  127. package/lib/tools/auth0/handlers/databases.js +94 -114
  128. package/lib/tools/auth0/handlers/default.d.ts +2 -2
  129. package/lib/tools/auth0/handlers/default.js +210 -171
  130. package/lib/tools/auth0/handlers/emailProvider.js +41 -52
  131. package/lib/tools/auth0/handlers/emailTemplates.d.ts +1 -0
  132. package/lib/tools/auth0/handlers/emailTemplates.js +54 -70
  133. package/lib/tools/auth0/handlers/flowVaultConnections.d.ts +5 -12
  134. package/lib/tools/auth0/handlers/flowVaultConnections.js +108 -143
  135. package/lib/tools/auth0/handlers/flows.d.ts +2 -3
  136. package/lib/tools/auth0/handlers/flows.js +92 -129
  137. package/lib/tools/auth0/handlers/forms.d.ts +3 -3
  138. package/lib/tools/auth0/handlers/forms.js +98 -112
  139. package/lib/tools/auth0/handlers/guardianFactorProviders.js +61 -84
  140. package/lib/tools/auth0/handlers/guardianFactorTemplates.js +46 -68
  141. package/lib/tools/auth0/handlers/guardianFactors.js +35 -45
  142. package/lib/tools/auth0/handlers/guardianPhoneFactorMessageTypes.js +29 -45
  143. package/lib/tools/auth0/handlers/guardianPhoneFactorSelectedProvider.js +29 -45
  144. package/lib/tools/auth0/handlers/guardianPolicies.js +20 -35
  145. package/lib/tools/auth0/handlers/hooks.js +123 -153
  146. package/lib/tools/auth0/handlers/index.js +4 -1
  147. package/lib/tools/auth0/handlers/logStreams.js +42 -47
  148. package/lib/tools/auth0/handlers/networkACLs.d.ts +5 -4
  149. package/lib/tools/auth0/handlers/networkACLs.js +115 -133
  150. package/lib/tools/auth0/handlers/organizations.d.ts +10 -9
  151. package/lib/tools/auth0/handlers/organizations.js +360 -429
  152. package/lib/tools/auth0/handlers/pages.js +74 -83
  153. package/lib/tools/auth0/handlers/phoneProvider.d.ts +2 -2
  154. package/lib/tools/auth0/handlers/phoneProvider.js +69 -82
  155. package/lib/tools/auth0/handlers/phoneTemplates.d.ts +63 -0
  156. package/lib/tools/auth0/handlers/phoneTemplates.js +229 -0
  157. package/lib/tools/auth0/handlers/prompts.d.ts +7 -7
  158. package/lib/tools/auth0/handlers/prompts.js +246 -240
  159. package/lib/tools/auth0/handlers/resourceServers.d.ts +6 -1
  160. package/lib/tools/auth0/handlers/resourceServers.js +97 -60
  161. package/lib/tools/auth0/handlers/roles.js +162 -178
  162. package/lib/tools/auth0/handlers/rules.js +144 -162
  163. package/lib/tools/auth0/handlers/rulesConfigs.js +30 -39
  164. package/lib/tools/auth0/handlers/scimHandler.d.ts +4 -3
  165. package/lib/tools/auth0/handlers/scimHandler.js +110 -132
  166. package/lib/tools/auth0/handlers/selfServiceProfiles.d.ts +12 -3
  167. package/lib/tools/auth0/handlers/selfServiceProfiles.js +173 -203
  168. package/lib/tools/auth0/handlers/tenant.d.ts +5 -3
  169. package/lib/tools/auth0/handlers/tenant.js +46 -52
  170. package/lib/tools/auth0/handlers/themes.d.ts +12 -12
  171. package/lib/tools/auth0/handlers/themes.js +86 -102
  172. package/lib/tools/auth0/handlers/tokenExchangeProfiles.d.ts +60 -0
  173. package/lib/tools/auth0/handlers/tokenExchangeProfiles.js +271 -0
  174. package/lib/tools/auth0/handlers/triggers.js +59 -75
  175. package/lib/tools/auth0/handlers/userAttributeProfiles.d.ts +3 -2
  176. package/lib/tools/auth0/handlers/userAttributeProfiles.js +41 -43
  177. package/lib/tools/auth0/index.js +35 -48
  178. package/lib/tools/auth0/schema.js +6 -4
  179. package/lib/tools/calculateChanges.js +24 -15
  180. package/lib/tools/constants.d.ts +4 -2
  181. package/lib/tools/constants.js +3 -1
  182. package/lib/tools/deploy.js +17 -29
  183. package/lib/tools/index.d.ts +3 -89
  184. package/lib/tools/index.js +3 -2
  185. package/lib/tools/utils.d.ts +1 -1
  186. package/lib/tools/utils.js +12 -22
  187. package/lib/tools/validationError.js +0 -1
  188. package/lib/types.d.ts +15 -5
  189. package/lib/types.js +0 -1
  190. package/lib/utils.d.ts +3 -58
  191. package/lib/utils.js +8 -5
  192. package/package.json +13 -12
  193. package/tsconfig.json +4 -3
  194. package/.eslintignore +0 -5
  195. package/.eslintrc +0 -69
  196. package/lib/args.js.map +0 -1
  197. package/lib/commands/export.js.map +0 -1
  198. package/lib/commands/import.js.map +0 -1
  199. package/lib/commands/index.js.map +0 -1
  200. package/lib/configFactory.js.map +0 -1
  201. package/lib/context/defaults.js.map +0 -1
  202. package/lib/context/directory/handlers/actions.js.map +0 -1
  203. package/lib/context/directory/handlers/attackProtection.js.map +0 -1
  204. package/lib/context/directory/handlers/branding.js.map +0 -1
  205. package/lib/context/directory/handlers/clientGrants.js.map +0 -1
  206. package/lib/context/directory/handlers/clients.js.map +0 -1
  207. package/lib/context/directory/handlers/connectionProfiles.js.map +0 -1
  208. package/lib/context/directory/handlers/connections.js.map +0 -1
  209. package/lib/context/directory/handlers/customDomains.js.map +0 -1
  210. package/lib/context/directory/handlers/databases.js.map +0 -1
  211. package/lib/context/directory/handlers/emailProvider.js.map +0 -1
  212. package/lib/context/directory/handlers/emailTemplates.js.map +0 -1
  213. package/lib/context/directory/handlers/flowVaultConnections.js.map +0 -1
  214. package/lib/context/directory/handlers/flows.js.map +0 -1
  215. package/lib/context/directory/handlers/forms.js.map +0 -1
  216. package/lib/context/directory/handlers/guardianFactorProviders.js.map +0 -1
  217. package/lib/context/directory/handlers/guardianFactorTemplates.js.map +0 -1
  218. package/lib/context/directory/handlers/guardianFactors.js.map +0 -1
  219. package/lib/context/directory/handlers/guardianPhoneFactorMessageTypes.js.map +0 -1
  220. package/lib/context/directory/handlers/guardianPhoneFactorSelectedProvider.js.map +0 -1
  221. package/lib/context/directory/handlers/guardianPolicies.js.map +0 -1
  222. package/lib/context/directory/handlers/hooks.js.map +0 -1
  223. package/lib/context/directory/handlers/index.js.map +0 -1
  224. package/lib/context/directory/handlers/logStreams.js.map +0 -1
  225. package/lib/context/directory/handlers/networkACLs.js.map +0 -1
  226. package/lib/context/directory/handlers/organizations.js.map +0 -1
  227. package/lib/context/directory/handlers/pages.js.map +0 -1
  228. package/lib/context/directory/handlers/phoneProvider.js.map +0 -1
  229. package/lib/context/directory/handlers/prompts.js.map +0 -1
  230. package/lib/context/directory/handlers/resourceServers.js.map +0 -1
  231. package/lib/context/directory/handlers/roles.js.map +0 -1
  232. package/lib/context/directory/handlers/rules.js.map +0 -1
  233. package/lib/context/directory/handlers/rulesConfigs.js.map +0 -1
  234. package/lib/context/directory/handlers/selfServiceProfiles.js.map +0 -1
  235. package/lib/context/directory/handlers/tenant.js.map +0 -1
  236. package/lib/context/directory/handlers/themes.js.map +0 -1
  237. package/lib/context/directory/handlers/triggers.js.map +0 -1
  238. package/lib/context/directory/handlers/userAttributeProfiles.js.map +0 -1
  239. package/lib/context/directory/index.js.map +0 -1
  240. package/lib/context/index.js.map +0 -1
  241. package/lib/context/yaml/handlers/actions.js.map +0 -1
  242. package/lib/context/yaml/handlers/attackProtection.js.map +0 -1
  243. package/lib/context/yaml/handlers/branding.js.map +0 -1
  244. package/lib/context/yaml/handlers/clientGrants.js.map +0 -1
  245. package/lib/context/yaml/handlers/clients.js.map +0 -1
  246. package/lib/context/yaml/handlers/connectionProfiles.js.map +0 -1
  247. package/lib/context/yaml/handlers/connections.js.map +0 -1
  248. package/lib/context/yaml/handlers/customDomains.js.map +0 -1
  249. package/lib/context/yaml/handlers/databases.js.map +0 -1
  250. package/lib/context/yaml/handlers/emailProvider.js.map +0 -1
  251. package/lib/context/yaml/handlers/emailTemplates.js.map +0 -1
  252. package/lib/context/yaml/handlers/flowVaultConnections.js.map +0 -1
  253. package/lib/context/yaml/handlers/flows.js.map +0 -1
  254. package/lib/context/yaml/handlers/forms.js.map +0 -1
  255. package/lib/context/yaml/handlers/guardianFactorProviders.js.map +0 -1
  256. package/lib/context/yaml/handlers/guardianFactorTemplates.js.map +0 -1
  257. package/lib/context/yaml/handlers/guardianFactors.js.map +0 -1
  258. package/lib/context/yaml/handlers/guardianPhoneFactorMessageTypes.js.map +0 -1
  259. package/lib/context/yaml/handlers/guardianPhoneFactorSelectedProvider.js.map +0 -1
  260. package/lib/context/yaml/handlers/guardianPolicies.js.map +0 -1
  261. package/lib/context/yaml/handlers/hooks.js.map +0 -1
  262. package/lib/context/yaml/handlers/index.js.map +0 -1
  263. package/lib/context/yaml/handlers/logStreams.js.map +0 -1
  264. package/lib/context/yaml/handlers/networkACLs.js.map +0 -1
  265. package/lib/context/yaml/handlers/organizations.js.map +0 -1
  266. package/lib/context/yaml/handlers/pages.js.map +0 -1
  267. package/lib/context/yaml/handlers/phoneProvider.js.map +0 -1
  268. package/lib/context/yaml/handlers/prompts.js.map +0 -1
  269. package/lib/context/yaml/handlers/resourceServers.js.map +0 -1
  270. package/lib/context/yaml/handlers/roles.js.map +0 -1
  271. package/lib/context/yaml/handlers/rules.js.map +0 -1
  272. package/lib/context/yaml/handlers/rulesConfigs.js.map +0 -1
  273. package/lib/context/yaml/handlers/selfServiceProfiles.js.map +0 -1
  274. package/lib/context/yaml/handlers/tenant.js.map +0 -1
  275. package/lib/context/yaml/handlers/themes.js.map +0 -1
  276. package/lib/context/yaml/handlers/triggers.js.map +0 -1
  277. package/lib/context/yaml/handlers/userAttributeProfiles.js.map +0 -1
  278. package/lib/context/yaml/index.js.map +0 -1
  279. package/lib/index.js.map +0 -1
  280. package/lib/keywordPreservation.js.map +0 -1
  281. package/lib/logger.js.map +0 -1
  282. package/lib/readonly.js.map +0 -1
  283. package/lib/sessionDurationsToMinutes.js.map +0 -1
  284. package/lib/tools/auth0/client.js.map +0 -1
  285. package/lib/tools/auth0/handlers/actions.js.map +0 -1
  286. package/lib/tools/auth0/handlers/attackProtection.js.map +0 -1
  287. package/lib/tools/auth0/handlers/branding.js.map +0 -1
  288. package/lib/tools/auth0/handlers/clientGrants.js.map +0 -1
  289. package/lib/tools/auth0/handlers/clients.js.map +0 -1
  290. package/lib/tools/auth0/handlers/connectionProfiles.js.map +0 -1
  291. package/lib/tools/auth0/handlers/connections.js.map +0 -1
  292. package/lib/tools/auth0/handlers/customDomains.js.map +0 -1
  293. package/lib/tools/auth0/handlers/databases.js.map +0 -1
  294. package/lib/tools/auth0/handlers/default.js.map +0 -1
  295. package/lib/tools/auth0/handlers/emailProvider.js.map +0 -1
  296. package/lib/tools/auth0/handlers/emailTemplates.js.map +0 -1
  297. package/lib/tools/auth0/handlers/flowVaultConnections.js.map +0 -1
  298. package/lib/tools/auth0/handlers/flows.js.map +0 -1
  299. package/lib/tools/auth0/handlers/forms.js.map +0 -1
  300. package/lib/tools/auth0/handlers/guardianFactorProviders.js.map +0 -1
  301. package/lib/tools/auth0/handlers/guardianFactorTemplates.js.map +0 -1
  302. package/lib/tools/auth0/handlers/guardianFactors.js.map +0 -1
  303. package/lib/tools/auth0/handlers/guardianPhoneFactorMessageTypes.js.map +0 -1
  304. package/lib/tools/auth0/handlers/guardianPhoneFactorSelectedProvider.js.map +0 -1
  305. package/lib/tools/auth0/handlers/guardianPolicies.js.map +0 -1
  306. package/lib/tools/auth0/handlers/hooks.js.map +0 -1
  307. package/lib/tools/auth0/handlers/index.js.map +0 -1
  308. package/lib/tools/auth0/handlers/logStreams.js.map +0 -1
  309. package/lib/tools/auth0/handlers/networkACLs.js.map +0 -1
  310. package/lib/tools/auth0/handlers/organizations.js.map +0 -1
  311. package/lib/tools/auth0/handlers/pages.js.map +0 -1
  312. package/lib/tools/auth0/handlers/phoneProvider.js.map +0 -1
  313. package/lib/tools/auth0/handlers/prompts.js.map +0 -1
  314. package/lib/tools/auth0/handlers/resourceServers.js.map +0 -1
  315. package/lib/tools/auth0/handlers/roles.js.map +0 -1
  316. package/lib/tools/auth0/handlers/rules.js.map +0 -1
  317. package/lib/tools/auth0/handlers/rulesConfigs.js.map +0 -1
  318. package/lib/tools/auth0/handlers/scimHandler.js.map +0 -1
  319. package/lib/tools/auth0/handlers/selfServiceProfiles.js.map +0 -1
  320. package/lib/tools/auth0/handlers/tenant.js.map +0 -1
  321. package/lib/tools/auth0/handlers/themes.js.map +0 -1
  322. package/lib/tools/auth0/handlers/triggers.js.map +0 -1
  323. package/lib/tools/auth0/handlers/userAttributeProfiles.js.map +0 -1
  324. package/lib/tools/auth0/index.js.map +0 -1
  325. package/lib/tools/auth0/schema.js.map +0 -1
  326. package/lib/tools/calculateChanges.js.map +0 -1
  327. package/lib/tools/constants.js.map +0 -1
  328. package/lib/tools/deploy.js.map +0 -1
  329. package/lib/tools/index.js.map +0 -1
  330. package/lib/tools/utils.js.map +0 -1
  331. package/lib/tools/validationError.js.map +0 -1
  332. package/lib/types.js.map +0 -1
  333. package/lib/utils.js.map +0 -1
@@ -6,7 +6,7 @@ orbs:
6
6
  jobs:
7
7
  e2e_test_as_node_module:
8
8
  docker:
9
- - image: cimg/node:22.4.1
9
+ - image: cimg/node:22.12.0
10
10
  working_directory: ~/repo
11
11
  steps:
12
12
  - checkout
@@ -15,7 +15,7 @@ jobs:
15
15
 
16
16
  e2e_test_as_cli:
17
17
  docker:
18
- - image: cimg/node:22.4.1
18
+ - image: cimg/node:22.12.0
19
19
  working_directory: ~/repo
20
20
  steps:
21
21
  - checkout
@@ -66,15 +66,42 @@ jobs:
66
66
  name: Publish package
67
67
  command: npm publish
68
68
 
69
+ deploy_beta:
70
+ parameters:
71
+ v:
72
+ type: string
73
+ default: "lts"
74
+ docker:
75
+ - image: cimg/node:<< parameters.v >>
76
+ working_directory: ~/repo
77
+ steps:
78
+ - attach_workspace:
79
+ at: ~/repo
80
+ - run:
81
+ name: Authenticate with registry
82
+ command: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/repo/.npmrc
83
+ - run:
84
+ name: Publish beta package
85
+ command: npm publish --tag beta
86
+
69
87
  does_typescript_compile:
70
88
  docker:
71
- - image: cimg/node:22.4.1
89
+ - image: cimg/node:22.12.0
72
90
  working_directory: ~/repo
73
91
  steps:
74
92
  - checkout
75
93
  - run: npm ci
76
94
  - run: npx tsc --noEmit
77
95
 
96
+ does_lint_pass:
97
+ docker:
98
+ - image: cimg/node:22.12.0
99
+ working_directory: ~/repo
100
+ steps:
101
+ - checkout
102
+ - run: npm ci
103
+ - run: npm run lint
104
+
78
105
  workflows:
79
106
  version: 2
80
107
 
@@ -92,12 +119,14 @@ workflows:
92
119
  jobs:
93
120
  - does_typescript_compile:
94
121
  name: Does Typescript compile?
122
+ - does_lint_pass:
123
+ name: Does lint pass?
95
124
  - unit_test:
96
125
  name: Unit tests with Node LTS
97
126
  v: "lts"
98
127
  - unit_test:
99
128
  name: Unit tests with Node current
100
- v: "22.4.1"
129
+ v: "22.12.0"
101
130
 
102
131
  test_and_deploy:
103
132
  jobs:
@@ -118,6 +147,29 @@ workflows:
118
147
  branches:
119
148
  ignore: /.*/
120
149
  tags:
121
- only: /^v.*/
150
+ only: /^v[0-9]+\.[0-9]+\.[0-9]+$/
151
+ context:
152
+ - publish-npm
153
+
154
+ test_and_deploy_beta:
155
+ jobs:
156
+ - unit_test:
157
+ name: Unit tests with Node LTS (Beta)
158
+ v: "lts"
159
+ filters:
160
+ branches:
161
+ only: beta
162
+ tags:
163
+ only: /^v[0-9]+\.[0-9]+\.[0-9]+-beta\.[0-9]+$/
164
+ - deploy_beta:
165
+ name: Publish Beta to NPM
166
+ v: "lts"
167
+ requires:
168
+ - Unit tests with Node LTS (Beta)
169
+ filters:
170
+ branches:
171
+ ignore: /.*/
172
+ tags:
173
+ only: /^v[0-9]+\.[0-9]+\.[0-9]+-beta\.[0-9]+$/
122
174
  context:
123
175
  - publish-npm
package/CHANGELOG.md CHANGED
@@ -7,6 +7,33 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [8.23.0] - 2025-12-16
11
+
12
+ ### Added
13
+
14
+ - Add support for `brute-force-protection` in prompts custom-text. [#1221]
15
+ - Add support for `phoneTemplates`. [#1224]
16
+ - Add support for `tokenExchangeProfiles`. [#1232]
17
+
18
+ ### Changed
19
+
20
+ - Upgrading `node-auth0` from v4 to v5. [#1207]
21
+
22
+ ### Fixed
23
+
24
+ - Fix `improved_signup_bot_detection_in_classic` is added in allowed `tenant` flags. [#1231]
25
+
26
+ ## [8.22.0] - 2025-12-10
27
+
28
+ ### Added
29
+
30
+ - Add `AUTH0_EXCLUDE_THIRD_PARTY_CLIENTS` config property to exclude third-party `clients`. [#1212]
31
+
32
+ ### Fixed
33
+
34
+ - Fix managing `Auth0 My Account API` in `resourceServers`. [#1229]
35
+ - Fix `cross_origin_auth` is deprecated and migrated to `cross_origin_authentication` in `clients`. [#1223]
36
+
10
37
  ## [8.21.0] - 2025-11-21
11
38
 
12
39
  ### Added
@@ -19,6 +46,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
19
46
 
20
47
  - Fix handle responses when paginating custom domains. [#1214]
21
48
 
49
+ ## [8.20.4-beta.0] - 2025-12-02
50
+
51
+ ### Changed
52
+
53
+ - Upgrading node-auth0 from v4 to v5 [beta]. [#1207]
54
+
22
55
  ## [8.20.3] - 2025-11-14
23
56
 
24
57
  ### Fixed
@@ -1524,11 +1557,22 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1524
1557
  [#1200]: https://github.com/auth0/auth0-deploy-cli/issues/1200
1525
1558
  [#1203]: https://github.com/auth0/auth0-deploy-cli/issues/1203
1526
1559
  [#1204]: https://github.com/auth0/auth0-deploy-cli/issues/1204
1560
+ [#1207]: https://github.com/auth0/auth0-deploy-cli/issues/1207
1527
1561
  [#1209]: https://github.com/auth0/auth0-deploy-cli/issues/1209
1528
1562
  [#1211]: https://github.com/auth0/auth0-deploy-cli/issues/1211
1563
+ [#1212]: https://github.com/auth0/auth0-deploy-cli/issues/1212
1529
1564
  [#1214]: https://github.com/auth0/auth0-deploy-cli/issues/1214
1530
- [Unreleased]: https://github.com/auth0/auth0-deploy-cli/compare/v8.21.0...HEAD
1531
- [8.21.0]: https://github.com/auth0/auth0-deploy-cli/compare/v8.20.3...v8.21.0
1565
+ [#1221]: https://github.com/auth0/auth0-deploy-cli/issues/1221
1566
+ [#1223]: https://github.com/auth0/auth0-deploy-cli/issues/1223
1567
+ [#1224]: https://github.com/auth0/auth0-deploy-cli/issues/1224
1568
+ [#1229]: https://github.com/auth0/auth0-deploy-cli/issues/1229
1569
+ [#1231]: https://github.com/auth0/auth0-deploy-cli/issues/1231
1570
+ [#1232]: https://github.com/auth0/auth0-deploy-cli/issues/1232
1571
+ [Unreleased]: https://github.com/auth0/auth0-deploy-cli/compare/v8.23.0...HEAD
1572
+ [8.23.0]: https://github.com/auth0/auth0-deploy-cli/compare/v8.22.0...v8.23.0
1573
+ [8.22.0]: https://github.com/auth0/auth0-deploy-cli/compare/v8.21.0...v8.22.0
1574
+ [8.21.0]: https://github.com/auth0/auth0-deploy-cli/compare/v8.20.4-beta.0...v8.21.0
1575
+ [8.20.4-beta.0]: https://github.com/auth0/auth0-deploy-cli/compare/v8.20.3...v8.20.4-beta.0
1532
1576
  [8.20.3]: https://github.com/auth0/auth0-deploy-cli/compare/v8.20.2...v8.20.3
1533
1577
  [8.20.2]: https://github.com/auth0/auth0-deploy-cli/compare/v8.20.1...v8.20.2
1534
1578
  [8.20.1]: https://github.com/auth0/auth0-deploy-cli/compare/v8.20.0...v8.20.1
package/README.md CHANGED
@@ -48,7 +48,7 @@ This guide will help you to a working implementation of the Deploy CLI tool used
48
48
 
49
49
  ### Prerequisites
50
50
 
51
- - [Node](https://nodejs.dev/) version 20(v20.18.1) or greater
51
+ - [Node](https://nodejs.dev/) version 20(v20.19.0) or greater
52
52
  - [Auth0 Tenant](https://auth0.com/)
53
53
 
54
54
  ### Install the Deploy CLI
@@ -0,0 +1,131 @@
1
+ const js = require('@eslint/js');
2
+ const tsParser = require('@typescript-eslint/parser');
3
+ const tsEslint = require('@typescript-eslint/eslint-plugin');
4
+ const importPlugin = require('eslint-plugin-import');
5
+ const globals = require('globals');
6
+ const eslintConfigPrettier = require('eslint-config-prettier');
7
+
8
+ const baseRecommended = js.configs.recommended;
9
+
10
+ module.exports = [
11
+ {
12
+ ignores: [
13
+ 'coverage/**',
14
+ 'examples/**',
15
+ 'local/**',
16
+ 'node_modules/**',
17
+ 'lib/**',
18
+ 'test/e2e/testdata/**',
19
+ 'webpack/**',
20
+ ],
21
+ },
22
+ {
23
+ ...baseRecommended,
24
+ files: ['**/*.{js,ts,cjs,mjs}'],
25
+ linterOptions: {
26
+ reportUnusedDisableDirectives: 'off',
27
+ },
28
+ languageOptions: {
29
+ ...(baseRecommended.languageOptions ?? {}),
30
+ parser: tsParser,
31
+ parserOptions: {
32
+ ...(baseRecommended.languageOptions?.parserOptions ?? {}),
33
+ ecmaVersion: 2020,
34
+ sourceType: 'module',
35
+ },
36
+ globals: {
37
+ ...(baseRecommended.languageOptions?.globals ?? {}),
38
+ ...globals.es2020,
39
+ ...globals.node,
40
+ ...globals.mocha,
41
+ },
42
+ },
43
+ plugins: {
44
+ ...(baseRecommended.plugins ?? {}),
45
+ import: importPlugin,
46
+ '@typescript-eslint': tsEslint,
47
+ },
48
+ settings: {
49
+ 'import/resolver': {
50
+ node: {
51
+ extensions: ['.js', '.ts', '.mjs', '.cjs'],
52
+ },
53
+ },
54
+ },
55
+ rules: {
56
+ ...(baseRecommended.rules ?? {}),
57
+ 'max-len': 'off',
58
+ 'class-methods-use-this': 'off',
59
+ 'comma-dangle': 'off',
60
+ 'eol-last': ['error', 'always'],
61
+ indent: [
62
+ 'error',
63
+ 2,
64
+ {
65
+ SwitchCase: 1,
66
+ },
67
+ ],
68
+ 'import/no-extraneous-dependencies': [
69
+ 'error',
70
+ {
71
+ devDependencies: true,
72
+ },
73
+ ],
74
+ 'import/no-dynamic-require': 'off',
75
+ 'prefer-arrow-callback': 'off',
76
+ 'object-shorthand': 'off',
77
+ 'prefer-template': 'off',
78
+ 'func-names': 'off',
79
+ 'new-cap': 'off',
80
+ 'no-await-in-loop': 'off',
81
+ 'no-param-reassign': 'off',
82
+ 'no-multiple-empty-lines': [
83
+ 'error',
84
+ {
85
+ max: 1,
86
+ maxEOF: 0,
87
+ },
88
+ ],
89
+ 'no-plusplus': 'off',
90
+ 'no-extra-boolean-cast': 'off',
91
+ 'no-useless-escape': 'off',
92
+ 'no-redeclare': 'off',
93
+ 'no-unused-vars': 'off',
94
+ 'no-console': 'warn',
95
+ '@typescript-eslint/no-unused-vars': [
96
+ 'error',
97
+ {
98
+ argsIgnorePattern: '^_',
99
+ varsIgnorePattern: '^_',
100
+ caughtErrors: 'none',
101
+ ignoreRestSiblings: true,
102
+ },
103
+ ],
104
+ '@typescript-eslint/no-redeclare': 'off',
105
+ '@typescript-eslint/no-explicit-any': 'off',
106
+ 'no-var': 'off',
107
+ 'object-curly-spacing': ['error', 'always'],
108
+ quotes: [
109
+ 'error',
110
+ 'single',
111
+ {
112
+ avoidEscape: true,
113
+ },
114
+ ],
115
+ semi: ['error', 'always'],
116
+ strict: 'off',
117
+ 'space-before-blocks': ['error', 'always'],
118
+ 'import/extensions': [
119
+ 'error',
120
+ 'ignorePackages',
121
+ {
122
+ js: 'never',
123
+ ts: 'never',
124
+ mjs: 'never',
125
+ cjs: 'never',
126
+ },
127
+ ],
128
+ },
129
+ },
130
+ eslintConfigPrettier,
131
+ ];
package/lib/args.js CHANGED
@@ -100,4 +100,3 @@ function getParams() {
100
100
  exports.default = {
101
101
  getParams,
102
102
  };
103
- //# sourceMappingURL=args.js.map
@@ -1,13 +1,4 @@
1
1
  "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
2
  var __importDefault = (this && this.__importDefault) || function (mod) {
12
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
13
4
  };
@@ -19,44 +10,45 @@ const mkdirp_1 = __importDefault(require("mkdirp"));
19
10
  const logger_1 = __importDefault(require("../logger"));
20
11
  const utils_1 = require("../utils");
21
12
  const index_1 = require("../context/index");
22
- function exportCMD(params) {
23
- return __awaiter(this, void 0, void 0, function* () {
24
- const { output_folder: outputFolder, base_path: basePath, config_file: configFile, config: configObj, export_ids: exportIds, secret: clientSecret, env: shouldInheritEnv = false, experimental_ea: experimentalEA, } = params;
25
- if (shouldInheritEnv) {
26
- nconf_1.default.env().use('memory');
27
- }
28
- if (configFile) {
29
- nconf_1.default.file(configFile);
30
- }
31
- const overrides = Object.assign({ AUTH0_INPUT_FILE: outputFolder, AUTH0_BASE_PATH: basePath }, (configObj || {}));
32
- // Prepare configuration by initializing nconf, then passing that as the provider to the config object
33
- // Allow passed in secret to override the configured one
34
- if (clientSecret) {
35
- overrides.AUTH0_CLIENT_SECRET = clientSecret;
36
- }
37
- // Allow passed in export_ids to override the configured one
38
- if (exportIds) {
39
- overrides.AUTH0_EXPORT_IDENTIFIERS = exportIds;
40
- }
41
- // Overrides AUTH0_INCLUDE_EXPERIMENTAL_EA is experimental_ea passed in command line
42
- if (experimentalEA) {
43
- overrides.AUTH0_EXPERIMENTAL_EA = experimentalEA;
44
- // nconf.overrides() sometimes doesn't work, so we need to set it manually to ensure it's set
45
- nconf_1.default.set('AUTH0_EXPERIMENTAL_EA', experimentalEA);
46
- }
47
- // Check output folder
48
- if (!(0, utils_1.isDirectory)(outputFolder)) {
49
- logger_1.default.info(`Creating ${outputFolder}`);
50
- mkdirp_1.default.sync(outputFolder);
51
- }
52
- if (params.format === 'yaml') {
53
- overrides.AUTH0_INPUT_FILE = path_1.default.join(outputFolder, 'tenant.yaml');
54
- }
55
- nconf_1.default.overrides(overrides);
56
- // Setup context and load
57
- const context = yield (0, index_1.setupContext)(nconf_1.default.get(), 'export');
58
- yield context.dump();
59
- logger_1.default.info('Export Successful');
60
- });
13
+ async function exportCMD(params) {
14
+ const { output_folder: outputFolder, base_path: basePath, config_file: configFile, config: configObj, export_ids: exportIds, secret: clientSecret, env: shouldInheritEnv = false, experimental_ea: experimentalEA, } = params;
15
+ if (shouldInheritEnv) {
16
+ nconf_1.default.env().use('memory');
17
+ }
18
+ if (configFile) {
19
+ nconf_1.default.file(configFile);
20
+ }
21
+ const overrides = {
22
+ AUTH0_INPUT_FILE: outputFolder,
23
+ AUTH0_BASE_PATH: basePath,
24
+ ...(configObj || {}),
25
+ };
26
+ // Prepare configuration by initializing nconf, then passing that as the provider to the config object
27
+ // Allow passed in secret to override the configured one
28
+ if (clientSecret) {
29
+ overrides.AUTH0_CLIENT_SECRET = clientSecret;
30
+ }
31
+ // Allow passed in export_ids to override the configured one
32
+ if (exportIds) {
33
+ overrides.AUTH0_EXPORT_IDENTIFIERS = exportIds;
34
+ }
35
+ // Overrides AUTH0_INCLUDE_EXPERIMENTAL_EA is experimental_ea passed in command line
36
+ if (experimentalEA) {
37
+ overrides.AUTH0_EXPERIMENTAL_EA = experimentalEA;
38
+ // nconf.overrides() sometimes doesn't work, so we need to set it manually to ensure it's set
39
+ nconf_1.default.set('AUTH0_EXPERIMENTAL_EA', experimentalEA);
40
+ }
41
+ // Check output folder
42
+ if (!(0, utils_1.isDirectory)(outputFolder)) {
43
+ logger_1.default.info(`Creating ${outputFolder}`);
44
+ mkdirp_1.default.sync(outputFolder);
45
+ }
46
+ if (params.format === 'yaml') {
47
+ overrides.AUTH0_INPUT_FILE = path_1.default.join(outputFolder, 'tenant.yaml');
48
+ }
49
+ nconf_1.default.overrides(overrides);
50
+ // Setup context and load
51
+ const context = await (0, index_1.setupContext)(nconf_1.default.get(), 'export');
52
+ await context.dump();
53
+ logger_1.default.info('Export Successful');
61
54
  }
62
- //# sourceMappingURL=export.js.map
@@ -1,13 +1,4 @@
1
1
  "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
2
  var __importDefault = (this && this.__importDefault) || function (mod) {
12
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
13
4
  };
@@ -18,38 +9,40 @@ const configFactory_1 = require("../configFactory");
18
9
  const tools_1 = require("../tools");
19
10
  const logger_1 = __importDefault(require("../logger"));
20
11
  const context_1 = require("../context");
21
- function importCMD(params) {
22
- return __awaiter(this, void 0, void 0, function* () {
23
- const { input_file: inputFile, base_path: basePath, config_file: configFile, config: configObj, env: shouldInheritEnv = false, secret: clientSecret, experimental_ea: experimentalEA, } = params;
24
- if (shouldInheritEnv) {
25
- nconf_1.default.env().use('memory');
26
- const mappings = nconf_1.default.get('AUTH0_KEYWORD_REPLACE_MAPPINGS') || {};
27
- nconf_1.default.set('AUTH0_KEYWORD_REPLACE_MAPPINGS', Object.assign(mappings, process.env));
28
- }
29
- if (configFile) {
30
- nconf_1.default.file(configFile);
31
- }
32
- const overrides = Object.assign({ AUTH0_INPUT_FILE: inputFile, AUTH0_BASE_PATH: basePath, AUTH0_KEYWORD_REPLACE_MAPPINGS: {} }, (configObj || {}));
33
- // Prepare configuration by initializing nconf, then passing that as the provider to the config object
34
- // Allow passed in secret to override the configured one
35
- if (clientSecret) {
36
- overrides.AUTH0_CLIENT_SECRET = clientSecret;
37
- }
38
- // Overrides AUTH0_INCLUDE_EXPERIMENTAL_EA is experimental_ea passed in command line
39
- if (experimentalEA) {
40
- overrides.AUTH0_EXPERIMENTAL_EA = experimentalEA;
41
- // nconf.overrides() sometimes doesn't work, so we need to set it manually to ensure it's set
42
- nconf_1.default.set('AUTH0_EXPERIMENTAL_EA', experimentalEA);
43
- }
44
- nconf_1.default.overrides(overrides);
45
- // Setup context and load
46
- const context = yield (0, context_1.setupContext)(nconf_1.default.get(), 'import');
47
- yield context.loadAssetsFromLocal();
48
- const config = (0, configFactory_1.configFactory)();
49
- config.setProvider((key) => nconf_1.default.get(key));
50
- //@ts-ignore because context and assets still need to be typed TODO: type assets and type context
51
- yield (0, tools_1.deploy)(context.assets, context.mgmtClient, config);
52
- logger_1.default.info('Import Successful');
53
- });
12
+ async function importCMD(params) {
13
+ const { input_file: inputFile, base_path: basePath, config_file: configFile, config: configObj, env: shouldInheritEnv = false, secret: clientSecret, experimental_ea: experimentalEA, } = params;
14
+ if (shouldInheritEnv) {
15
+ nconf_1.default.env().use('memory');
16
+ const mappings = nconf_1.default.get('AUTH0_KEYWORD_REPLACE_MAPPINGS') || {};
17
+ nconf_1.default.set('AUTH0_KEYWORD_REPLACE_MAPPINGS', Object.assign(mappings, process.env));
18
+ }
19
+ if (configFile) {
20
+ nconf_1.default.file(configFile);
21
+ }
22
+ const overrides = {
23
+ AUTH0_INPUT_FILE: inputFile,
24
+ AUTH0_BASE_PATH: basePath,
25
+ AUTH0_KEYWORD_REPLACE_MAPPINGS: {},
26
+ ...(configObj || {}),
27
+ };
28
+ // Prepare configuration by initializing nconf, then passing that as the provider to the config object
29
+ // Allow passed in secret to override the configured one
30
+ if (clientSecret) {
31
+ overrides.AUTH0_CLIENT_SECRET = clientSecret;
32
+ }
33
+ // Overrides AUTH0_INCLUDE_EXPERIMENTAL_EA is experimental_ea passed in command line
34
+ if (experimentalEA) {
35
+ overrides.AUTH0_EXPERIMENTAL_EA = experimentalEA;
36
+ // nconf.overrides() sometimes doesn't work, so we need to set it manually to ensure it's set
37
+ nconf_1.default.set('AUTH0_EXPERIMENTAL_EA', experimentalEA);
38
+ }
39
+ nconf_1.default.overrides(overrides);
40
+ // Setup context and load
41
+ const context = await (0, context_1.setupContext)(nconf_1.default.get(), 'import');
42
+ await context.loadAssetsFromLocal();
43
+ const config = (0, configFactory_1.configFactory)();
44
+ config.setProvider((key) => nconf_1.default.get(key));
45
+ //@ts-ignore because context and assets still need to be typed TODO: type assets and type context
46
+ await (0, tools_1.deploy)(context.assets, context.mgmtClient, config);
47
+ logger_1.default.info('Import Successful');
54
48
  }
55
- //# sourceMappingURL=import.js.map
@@ -11,4 +11,3 @@ exports.default = {
11
11
  deploy: import_1.default,
12
12
  dump: export_1.default,
13
13
  };
14
- //# sourceMappingURL=index.js.map
@@ -22,4 +22,3 @@ const configFactory = () => {
22
22
  return config;
23
23
  };
24
24
  exports.configFactory = configFactory;
25
- //# sourceMappingURL=configFactory.js.map
@@ -1,6 +1,7 @@
1
1
  import { AttackProtection } from '../tools/auth0/handlers/attackProtection';
2
2
  export declare function emailProviderDefaults(emailProvider: any): any;
3
3
  export declare function phoneProviderDefaults(phoneProvider: any): any;
4
+ export declare function phoneTemplatesDefaults(phoneTemplate: any): any;
4
5
  export declare function connectionDefaults(connection: any): any;
5
6
  export declare function logStreamDefaults(logStreams: any): any;
6
7
  export declare function attackProtectionDefaults(attackProtection: AttackProtection): AttackProtection;
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.emailProviderDefaults = emailProviderDefaults;
4
4
  exports.phoneProviderDefaults = phoneProviderDefaults;
5
+ exports.phoneTemplatesDefaults = phoneTemplatesDefaults;
5
6
  exports.connectionDefaults = connectionDefaults;
6
7
  exports.logStreamDefaults = logStreamDefaults;
7
8
  exports.attackProtectionDefaults = attackProtectionDefaults;
@@ -9,33 +10,55 @@ const utils_1 = require("../tools/utils");
9
10
  // eslint-disable-next-line import/prefer-default-export
10
11
  function emailProviderDefaults(emailProvider) {
11
12
  // eslint-disable-line
12
- const updated = Object.assign({}, emailProvider);
13
+ const updated = { ...emailProvider };
13
14
  const apiKeyProviders = ['mailgun', 'mandrill', 'sendgrid', 'sparkpost'];
14
15
  // Add placeholder for credentials as they cannot be exported
15
16
  const { name } = updated;
16
17
  if (apiKeyProviders.includes(name)) {
17
- updated.credentials = Object.assign({ api_key: `##${name.toUpperCase()}_API_KEY##` }, (updated.credentials || {}));
18
+ updated.credentials = {
19
+ api_key: `##${name.toUpperCase()}_API_KEY##`,
20
+ ...(updated.credentials || {}),
21
+ };
18
22
  }
19
23
  if (name === 'smtp') {
20
24
  // This is to mask smtp_user to '##SMTP_USER##'
21
25
  if (updated.credentials && 'smtp_user' in updated.credentials) {
22
26
  delete updated.credentials.smtp_user;
23
27
  }
24
- updated.credentials = Object.assign({ smtp_host: '##SMTP_HOSTNAME##', smtp_port: '##SMTP_PORT##', smtp_user: '##SMTP_USER##', smtp_pass: '##SMTP_PASS##' }, (updated.credentials || {}));
28
+ updated.credentials = {
29
+ smtp_host: '##SMTP_HOSTNAME##',
30
+ smtp_port: '##SMTP_PORT##',
31
+ smtp_user: '##SMTP_USER##',
32
+ smtp_pass: '##SMTP_PASS##',
33
+ ...(updated.credentials || {}),
34
+ };
25
35
  }
26
36
  if (name === 'ses') {
27
- updated.credentials = Object.assign({ accessKeyId: '##SES_ACCESS_KEY_ID##', secretAccessKey: '##SES_ACCESS_SECRET_KEY##', region: '##SES_AWS_REGION##' }, (updated.credentials || {}));
37
+ updated.credentials = {
38
+ accessKeyId: '##SES_ACCESS_KEY_ID##',
39
+ secretAccessKey: '##SES_ACCESS_SECRET_KEY##',
40
+ region: '##SES_AWS_REGION##',
41
+ ...(updated.credentials || {}),
42
+ };
28
43
  }
29
44
  if (name === 'azure_cs') {
30
- updated.credentials = Object.assign({ connectionString: '##AZURE_CS_CONNECTION_KEY##' }, (updated.credentials || {}));
45
+ updated.credentials = {
46
+ connectionString: '##AZURE_CS_CONNECTION_KEY##',
47
+ ...(updated.credentials || {}),
48
+ };
31
49
  }
32
50
  if (name === 'ms365') {
33
- updated.credentials = Object.assign({ tenantId: '##MS365_TENANT_ID##', clientId: '##MS365_CLIENT_ID##', clientSecret: '##MS365_CLIENT_SECRET##' }, (updated.credentials || {}));
51
+ updated.credentials = {
52
+ tenantId: '##MS365_TENANT_ID##',
53
+ clientId: '##MS365_CLIENT_ID##',
54
+ clientSecret: '##MS365_CLIENT_SECRET##',
55
+ ...(updated.credentials || {}),
56
+ };
34
57
  }
35
58
  return updated;
36
59
  }
37
60
  function phoneProviderDefaults(phoneProvider) {
38
- const updated = Object.assign({}, phoneProvider);
61
+ const updated = { ...phoneProvider };
39
62
  const removeKeysFromOutput = [
40
63
  'id',
41
64
  'created_at',
@@ -59,6 +82,24 @@ function phoneProviderDefaults(phoneProvider) {
59
82
  }
60
83
  return updated;
61
84
  }
85
+ function phoneTemplatesDefaults(phoneTemplate) {
86
+ const updated = { ...phoneTemplate };
87
+ // Strip read-only fields that are returned by the API but should not be included in exported config
88
+ const removeKeysFromOutput = [
89
+ 'id',
90
+ 'channel',
91
+ 'customizable',
92
+ 'tenant',
93
+ 'created_at',
94
+ 'updated_at',
95
+ ];
96
+ removeKeysFromOutput.forEach((key) => {
97
+ if (key in updated) {
98
+ delete updated[key];
99
+ }
100
+ });
101
+ return updated;
102
+ }
62
103
  function connectionDefaults(connection) {
63
104
  if (connection.options) {
64
105
  // Mask secret for key: connection.options.client_secret
@@ -103,14 +144,20 @@ function attackProtectionDefaults(attackProtection) {
103
144
  const providersWithSecrets = ['arkose', 'hcaptcha', 'friendly_captcha', 'recaptcha_v2'];
104
145
  providersWithSecrets.forEach((provider) => {
105
146
  if (captcha[provider]) {
106
- captcha[provider] = Object.assign(Object.assign({}, captcha[provider]), { secret: `##CAPTCHA_${provider.toUpperCase()}_SECRET##` });
147
+ captcha[provider] = {
148
+ ...captcha[provider],
149
+ secret: `##CAPTCHA_${provider.toUpperCase()}_SECRET##`,
150
+ };
107
151
  }
108
152
  });
109
153
  if ('recaptcha_enterprise' in captcha) {
110
- captcha.recaptcha_enterprise = Object.assign(Object.assign({}, captcha.recaptcha_enterprise), { api_key: '##CAPTCHA_RECAPTCHA_ENTERPRISE_API_KEY##', project_id: '##CAPTCHA_RECAPTCHA_ENTERPRISE_PROJECT_ID##' });
154
+ captcha.recaptcha_enterprise = {
155
+ ...captcha.recaptcha_enterprise,
156
+ api_key: '##CAPTCHA_RECAPTCHA_ENTERPRISE_API_KEY##',
157
+ project_id: '##CAPTCHA_RECAPTCHA_ENTERPRISE_PROJECT_ID##',
158
+ };
111
159
  }
112
160
  attackProtection.captcha = captcha;
113
161
  }
114
162
  return attackProtection;
115
163
  }
116
- //# sourceMappingURL=defaults.js.map