auth0-deploy-cli 8.20.3 → 8.20.4-beta.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 (309) hide show
  1. package/.circleci/config.yml +46 -5
  2. package/CHANGELOG.md +9 -1
  3. package/eslint.config.js +130 -0
  4. package/lib/args.js +0 -1
  5. package/lib/commands/export.js +41 -49
  6. package/lib/commands/import.js +36 -43
  7. package/lib/commands/index.js +0 -1
  8. package/lib/configFactory.js +0 -1
  9. package/lib/context/defaults.js +38 -10
  10. package/lib/context/directory/handlers/actions.js +40 -39
  11. package/lib/context/directory/handlers/attackProtection.js +22 -34
  12. package/lib/context/directory/handlers/branding.js +12 -21
  13. package/lib/context/directory/handlers/clientGrants.js +52 -62
  14. package/lib/context/directory/handlers/clients.js +17 -29
  15. package/lib/context/directory/handlers/connections.js +32 -41
  16. package/lib/context/directory/handlers/customDomains.js +9 -21
  17. package/lib/context/directory/handlers/databases.js +37 -35
  18. package/lib/context/directory/handlers/emailProvider.js +22 -36
  19. package/lib/context/directory/handlers/emailTemplates.js +20 -29
  20. package/lib/context/directory/handlers/flowVaultConnections.js +39 -49
  21. package/lib/context/directory/handlers/flows.js +38 -48
  22. package/lib/context/directory/handlers/forms.js +38 -48
  23. package/lib/context/directory/handlers/guardianFactorProviders.js +9 -21
  24. package/lib/context/directory/handlers/guardianFactorTemplates.js +9 -21
  25. package/lib/context/directory/handlers/guardianFactors.js +9 -21
  26. package/lib/context/directory/handlers/guardianPhoneFactorMessageTypes.js +8 -20
  27. package/lib/context/directory/handlers/guardianPhoneFactorSelectedProvider.js +8 -20
  28. package/lib/context/directory/handlers/guardianPolicies.js +8 -20
  29. package/lib/context/directory/handlers/hooks.js +24 -34
  30. package/lib/context/directory/handlers/index.js +0 -1
  31. package/lib/context/directory/handlers/logStreams.js +12 -24
  32. package/lib/context/directory/handlers/networkACLs.js +22 -34
  33. package/lib/context/directory/handlers/organizations.js +39 -44
  34. package/lib/context/directory/handlers/pages.js +31 -37
  35. package/lib/context/directory/handlers/phoneProvider.js +12 -24
  36. package/lib/context/directory/handlers/prompts.js +58 -76
  37. package/lib/context/directory/handlers/resourceServers.d.ts +1 -1
  38. package/lib/context/directory/handlers/resourceServers.js +18 -30
  39. package/lib/context/directory/handlers/roles.js +21 -31
  40. package/lib/context/directory/handlers/rules.js +22 -32
  41. package/lib/context/directory/handlers/rulesConfigs.js +3 -15
  42. package/lib/context/directory/handlers/selfServiceProfiles.js +28 -40
  43. package/lib/context/directory/handlers/tenant.js +14 -34
  44. package/lib/context/directory/handlers/themes.js +9 -21
  45. package/lib/context/directory/handlers/triggers.d.ts +1 -1
  46. package/lib/context/directory/handlers/triggers.js +16 -26
  47. package/lib/context/directory/handlers/userAttributeProfiles.d.ts +1 -1
  48. package/lib/context/directory/handlers/userAttributeProfiles.js +16 -26
  49. package/lib/context/directory/index.js +66 -80
  50. package/lib/context/index.js +7 -18
  51. package/lib/context/yaml/handlers/actions.js +39 -41
  52. package/lib/context/yaml/handlers/attackProtection.js +27 -41
  53. package/lib/context/yaml/handlers/branding.js +47 -69
  54. package/lib/context/yaml/handlers/clientGrants.js +26 -40
  55. package/lib/context/yaml/handlers/clients.js +41 -55
  56. package/lib/context/yaml/handlers/connections.js +63 -67
  57. package/lib/context/yaml/handlers/customDomains.js +7 -19
  58. package/lib/context/yaml/handlers/databases.js +63 -65
  59. package/lib/context/yaml/handlers/emailProvider.js +22 -37
  60. package/lib/context/yaml/handlers/emailTemplates.js +28 -39
  61. package/lib/context/yaml/handlers/flowVaultConnections.js +36 -50
  62. package/lib/context/yaml/handlers/flows.js +55 -66
  63. package/lib/context/yaml/handlers/forms.js +55 -66
  64. package/lib/context/yaml/handlers/guardianFactorProviders.js +7 -19
  65. package/lib/context/yaml/handlers/guardianFactorTemplates.js +7 -19
  66. package/lib/context/yaml/handlers/guardianFactors.js +7 -19
  67. package/lib/context/yaml/handlers/guardianPhoneFactorMessageTypes.js +7 -19
  68. package/lib/context/yaml/handlers/guardianPhoneFactorSelectedProvider.js +7 -19
  69. package/lib/context/yaml/handlers/guardianPolicies.js +7 -19
  70. package/lib/context/yaml/handlers/hooks.js +34 -48
  71. package/lib/context/yaml/handlers/index.js +0 -1
  72. package/lib/context/yaml/handlers/logStreams.js +16 -30
  73. package/lib/context/yaml/handlers/networkACLs.js +25 -39
  74. package/lib/context/yaml/handlers/organizations.js +37 -46
  75. package/lib/context/yaml/handlers/pages.js +31 -39
  76. package/lib/context/yaml/handlers/phoneProvider.js +17 -31
  77. package/lib/context/yaml/handlers/prompts.js +22 -47
  78. package/lib/context/yaml/handlers/resourceServers.d.ts +1 -1
  79. package/lib/context/yaml/handlers/resourceServers.js +21 -33
  80. package/lib/context/yaml/handlers/roles.js +19 -33
  81. package/lib/context/yaml/handlers/rules.js +28 -39
  82. package/lib/context/yaml/handlers/rulesConfigs.js +14 -28
  83. package/lib/context/yaml/handlers/selfServiceProfiles.js +29 -43
  84. package/lib/context/yaml/handlers/tenant.js +19 -41
  85. package/lib/context/yaml/handlers/themes.js +7 -19
  86. package/lib/context/yaml/handlers/triggers.d.ts +1 -1
  87. package/lib/context/yaml/handlers/triggers.js +15 -29
  88. package/lib/context/yaml/handlers/userAttributeProfiles.d.ts +1 -1
  89. package/lib/context/yaml/handlers/userAttributeProfiles.js +7 -19
  90. package/lib/context/yaml/index.js +120 -128
  91. package/lib/index.d.ts +4 -95
  92. package/lib/index.js +24 -34
  93. package/lib/keywordPreservation.d.ts +1 -1
  94. package/lib/keywordPreservation.js +10 -6
  95. package/lib/logger.js +0 -1
  96. package/lib/readonly.js +3 -4
  97. package/lib/sessionDurationsToMinutes.js +0 -1
  98. package/lib/tools/auth0/client.js +110 -123
  99. package/lib/tools/auth0/handlers/actions.d.ts +8 -26
  100. package/lib/tools/auth0/handlers/actions.js +138 -149
  101. package/lib/tools/auth0/handlers/attackProtection.js +80 -92
  102. package/lib/tools/auth0/handlers/branding.js +75 -99
  103. package/lib/tools/auth0/handlers/clientGrants.d.ts +2 -8
  104. package/lib/tools/auth0/handlers/clientGrants.js +65 -70
  105. package/lib/tools/auth0/handlers/clients.d.ts +3 -9
  106. package/lib/tools/auth0/handlers/clients.js +59 -63
  107. package/lib/tools/auth0/handlers/connections.d.ts +3 -1
  108. package/lib/tools/auth0/handlers/connections.js +130 -135
  109. package/lib/tools/auth0/handlers/customDomains.d.ts +4 -1
  110. package/lib/tools/auth0/handlers/customDomains.js +43 -53
  111. package/lib/tools/auth0/handlers/databases.js +94 -114
  112. package/lib/tools/auth0/handlers/default.d.ts +2 -2
  113. package/lib/tools/auth0/handlers/default.js +210 -171
  114. package/lib/tools/auth0/handlers/emailProvider.js +41 -52
  115. package/lib/tools/auth0/handlers/emailTemplates.js +49 -71
  116. package/lib/tools/auth0/handlers/flowVaultConnections.d.ts +5 -12
  117. package/lib/tools/auth0/handlers/flowVaultConnections.js +108 -143
  118. package/lib/tools/auth0/handlers/flows.d.ts +2 -3
  119. package/lib/tools/auth0/handlers/flows.js +92 -129
  120. package/lib/tools/auth0/handlers/forms.d.ts +3 -3
  121. package/lib/tools/auth0/handlers/forms.js +98 -112
  122. package/lib/tools/auth0/handlers/guardianFactorProviders.js +61 -84
  123. package/lib/tools/auth0/handlers/guardianFactorTemplates.js +46 -68
  124. package/lib/tools/auth0/handlers/guardianFactors.js +35 -45
  125. package/lib/tools/auth0/handlers/guardianPhoneFactorMessageTypes.js +29 -45
  126. package/lib/tools/auth0/handlers/guardianPhoneFactorSelectedProvider.js +29 -45
  127. package/lib/tools/auth0/handlers/guardianPolicies.js +20 -35
  128. package/lib/tools/auth0/handlers/hooks.js +123 -153
  129. package/lib/tools/auth0/handlers/index.js +0 -1
  130. package/lib/tools/auth0/handlers/logStreams.js +42 -47
  131. package/lib/tools/auth0/handlers/networkACLs.d.ts +5 -4
  132. package/lib/tools/auth0/handlers/networkACLs.js +115 -133
  133. package/lib/tools/auth0/handlers/organizations.d.ts +10 -9
  134. package/lib/tools/auth0/handlers/organizations.js +360 -429
  135. package/lib/tools/auth0/handlers/pages.js +74 -83
  136. package/lib/tools/auth0/handlers/phoneProvider.d.ts +2 -2
  137. package/lib/tools/auth0/handlers/phoneProvider.js +69 -82
  138. package/lib/tools/auth0/handlers/prompts.d.ts +5 -5
  139. package/lib/tools/auth0/handlers/prompts.js +242 -249
  140. package/lib/tools/auth0/handlers/resourceServers.d.ts +3 -1
  141. package/lib/tools/auth0/handlers/resourceServers.js +59 -60
  142. package/lib/tools/auth0/handlers/roles.js +162 -178
  143. package/lib/tools/auth0/handlers/rules.js +144 -162
  144. package/lib/tools/auth0/handlers/rulesConfigs.js +30 -39
  145. package/lib/tools/auth0/handlers/scimHandler.d.ts +4 -3
  146. package/lib/tools/auth0/handlers/scimHandler.js +110 -132
  147. package/lib/tools/auth0/handlers/selfServiceProfiles.d.ts +11 -3
  148. package/lib/tools/auth0/handlers/selfServiceProfiles.js +170 -208
  149. package/lib/tools/auth0/handlers/tenant.d.ts +5 -3
  150. package/lib/tools/auth0/handlers/tenant.js +45 -52
  151. package/lib/tools/auth0/handlers/themes.d.ts +12 -12
  152. package/lib/tools/auth0/handlers/themes.js +86 -102
  153. package/lib/tools/auth0/handlers/triggers.js +59 -75
  154. package/lib/tools/auth0/handlers/userAttributeProfiles.d.ts +3 -2
  155. package/lib/tools/auth0/handlers/userAttributeProfiles.js +54 -56
  156. package/lib/tools/auth0/index.js +35 -48
  157. package/lib/tools/auth0/schema.js +6 -4
  158. package/lib/tools/calculateChanges.js +24 -15
  159. package/lib/tools/constants.d.ts +2 -2
  160. package/lib/tools/constants.js +0 -1
  161. package/lib/tools/deploy.js +17 -29
  162. package/lib/tools/index.d.ts +3 -88
  163. package/lib/tools/index.js +3 -2
  164. package/lib/tools/utils.d.ts +1 -1
  165. package/lib/tools/utils.js +12 -22
  166. package/lib/tools/validationError.js +0 -1
  167. package/lib/types.d.ts +8 -4
  168. package/lib/types.js +0 -1
  169. package/lib/utils.d.ts +3 -57
  170. package/lib/utils.js +8 -5
  171. package/package.json +12 -11
  172. package/tsconfig.json +4 -3
  173. package/.eslintignore +0 -5
  174. package/.eslintrc +0 -69
  175. package/lib/args.js.map +0 -1
  176. package/lib/commands/export.js.map +0 -1
  177. package/lib/commands/import.js.map +0 -1
  178. package/lib/commands/index.js.map +0 -1
  179. package/lib/configFactory.js.map +0 -1
  180. package/lib/context/defaults.js.map +0 -1
  181. package/lib/context/directory/handlers/actions.js.map +0 -1
  182. package/lib/context/directory/handlers/attackProtection.js.map +0 -1
  183. package/lib/context/directory/handlers/branding.js.map +0 -1
  184. package/lib/context/directory/handlers/clientGrants.js.map +0 -1
  185. package/lib/context/directory/handlers/clients.js.map +0 -1
  186. package/lib/context/directory/handlers/connections.js.map +0 -1
  187. package/lib/context/directory/handlers/customDomains.js.map +0 -1
  188. package/lib/context/directory/handlers/databases.js.map +0 -1
  189. package/lib/context/directory/handlers/emailProvider.js.map +0 -1
  190. package/lib/context/directory/handlers/emailTemplates.js.map +0 -1
  191. package/lib/context/directory/handlers/flowVaultConnections.js.map +0 -1
  192. package/lib/context/directory/handlers/flows.js.map +0 -1
  193. package/lib/context/directory/handlers/forms.js.map +0 -1
  194. package/lib/context/directory/handlers/guardianFactorProviders.js.map +0 -1
  195. package/lib/context/directory/handlers/guardianFactorTemplates.js.map +0 -1
  196. package/lib/context/directory/handlers/guardianFactors.js.map +0 -1
  197. package/lib/context/directory/handlers/guardianPhoneFactorMessageTypes.js.map +0 -1
  198. package/lib/context/directory/handlers/guardianPhoneFactorSelectedProvider.js.map +0 -1
  199. package/lib/context/directory/handlers/guardianPolicies.js.map +0 -1
  200. package/lib/context/directory/handlers/hooks.js.map +0 -1
  201. package/lib/context/directory/handlers/index.js.map +0 -1
  202. package/lib/context/directory/handlers/logStreams.js.map +0 -1
  203. package/lib/context/directory/handlers/networkACLs.js.map +0 -1
  204. package/lib/context/directory/handlers/organizations.js.map +0 -1
  205. package/lib/context/directory/handlers/pages.js.map +0 -1
  206. package/lib/context/directory/handlers/phoneProvider.js.map +0 -1
  207. package/lib/context/directory/handlers/prompts.js.map +0 -1
  208. package/lib/context/directory/handlers/resourceServers.js.map +0 -1
  209. package/lib/context/directory/handlers/roles.js.map +0 -1
  210. package/lib/context/directory/handlers/rules.js.map +0 -1
  211. package/lib/context/directory/handlers/rulesConfigs.js.map +0 -1
  212. package/lib/context/directory/handlers/selfServiceProfiles.js.map +0 -1
  213. package/lib/context/directory/handlers/tenant.js.map +0 -1
  214. package/lib/context/directory/handlers/themes.js.map +0 -1
  215. package/lib/context/directory/handlers/triggers.js.map +0 -1
  216. package/lib/context/directory/handlers/userAttributeProfiles.js.map +0 -1
  217. package/lib/context/directory/index.js.map +0 -1
  218. package/lib/context/index.js.map +0 -1
  219. package/lib/context/yaml/handlers/actions.js.map +0 -1
  220. package/lib/context/yaml/handlers/attackProtection.js.map +0 -1
  221. package/lib/context/yaml/handlers/branding.js.map +0 -1
  222. package/lib/context/yaml/handlers/clientGrants.js.map +0 -1
  223. package/lib/context/yaml/handlers/clients.js.map +0 -1
  224. package/lib/context/yaml/handlers/connections.js.map +0 -1
  225. package/lib/context/yaml/handlers/customDomains.js.map +0 -1
  226. package/lib/context/yaml/handlers/databases.js.map +0 -1
  227. package/lib/context/yaml/handlers/emailProvider.js.map +0 -1
  228. package/lib/context/yaml/handlers/emailTemplates.js.map +0 -1
  229. package/lib/context/yaml/handlers/flowVaultConnections.js.map +0 -1
  230. package/lib/context/yaml/handlers/flows.js.map +0 -1
  231. package/lib/context/yaml/handlers/forms.js.map +0 -1
  232. package/lib/context/yaml/handlers/guardianFactorProviders.js.map +0 -1
  233. package/lib/context/yaml/handlers/guardianFactorTemplates.js.map +0 -1
  234. package/lib/context/yaml/handlers/guardianFactors.js.map +0 -1
  235. package/lib/context/yaml/handlers/guardianPhoneFactorMessageTypes.js.map +0 -1
  236. package/lib/context/yaml/handlers/guardianPhoneFactorSelectedProvider.js.map +0 -1
  237. package/lib/context/yaml/handlers/guardianPolicies.js.map +0 -1
  238. package/lib/context/yaml/handlers/hooks.js.map +0 -1
  239. package/lib/context/yaml/handlers/index.js.map +0 -1
  240. package/lib/context/yaml/handlers/logStreams.js.map +0 -1
  241. package/lib/context/yaml/handlers/networkACLs.js.map +0 -1
  242. package/lib/context/yaml/handlers/organizations.js.map +0 -1
  243. package/lib/context/yaml/handlers/pages.js.map +0 -1
  244. package/lib/context/yaml/handlers/phoneProvider.js.map +0 -1
  245. package/lib/context/yaml/handlers/prompts.js.map +0 -1
  246. package/lib/context/yaml/handlers/resourceServers.js.map +0 -1
  247. package/lib/context/yaml/handlers/roles.js.map +0 -1
  248. package/lib/context/yaml/handlers/rules.js.map +0 -1
  249. package/lib/context/yaml/handlers/rulesConfigs.js.map +0 -1
  250. package/lib/context/yaml/handlers/selfServiceProfiles.js.map +0 -1
  251. package/lib/context/yaml/handlers/tenant.js.map +0 -1
  252. package/lib/context/yaml/handlers/themes.js.map +0 -1
  253. package/lib/context/yaml/handlers/triggers.js.map +0 -1
  254. package/lib/context/yaml/handlers/userAttributeProfiles.js.map +0 -1
  255. package/lib/context/yaml/index.js.map +0 -1
  256. package/lib/index.js.map +0 -1
  257. package/lib/keywordPreservation.js.map +0 -1
  258. package/lib/logger.js.map +0 -1
  259. package/lib/readonly.js.map +0 -1
  260. package/lib/sessionDurationsToMinutes.js.map +0 -1
  261. package/lib/tools/auth0/client.js.map +0 -1
  262. package/lib/tools/auth0/handlers/actions.js.map +0 -1
  263. package/lib/tools/auth0/handlers/attackProtection.js.map +0 -1
  264. package/lib/tools/auth0/handlers/branding.js.map +0 -1
  265. package/lib/tools/auth0/handlers/clientGrants.js.map +0 -1
  266. package/lib/tools/auth0/handlers/clients.js.map +0 -1
  267. package/lib/tools/auth0/handlers/connections.js.map +0 -1
  268. package/lib/tools/auth0/handlers/customDomains.js.map +0 -1
  269. package/lib/tools/auth0/handlers/databases.js.map +0 -1
  270. package/lib/tools/auth0/handlers/default.js.map +0 -1
  271. package/lib/tools/auth0/handlers/emailProvider.js.map +0 -1
  272. package/lib/tools/auth0/handlers/emailTemplates.js.map +0 -1
  273. package/lib/tools/auth0/handlers/flowVaultConnections.js.map +0 -1
  274. package/lib/tools/auth0/handlers/flows.js.map +0 -1
  275. package/lib/tools/auth0/handlers/forms.js.map +0 -1
  276. package/lib/tools/auth0/handlers/guardianFactorProviders.js.map +0 -1
  277. package/lib/tools/auth0/handlers/guardianFactorTemplates.js.map +0 -1
  278. package/lib/tools/auth0/handlers/guardianFactors.js.map +0 -1
  279. package/lib/tools/auth0/handlers/guardianPhoneFactorMessageTypes.js.map +0 -1
  280. package/lib/tools/auth0/handlers/guardianPhoneFactorSelectedProvider.js.map +0 -1
  281. package/lib/tools/auth0/handlers/guardianPolicies.js.map +0 -1
  282. package/lib/tools/auth0/handlers/hooks.js.map +0 -1
  283. package/lib/tools/auth0/handlers/index.js.map +0 -1
  284. package/lib/tools/auth0/handlers/logStreams.js.map +0 -1
  285. package/lib/tools/auth0/handlers/networkACLs.js.map +0 -1
  286. package/lib/tools/auth0/handlers/organizations.js.map +0 -1
  287. package/lib/tools/auth0/handlers/pages.js.map +0 -1
  288. package/lib/tools/auth0/handlers/phoneProvider.js.map +0 -1
  289. package/lib/tools/auth0/handlers/prompts.js.map +0 -1
  290. package/lib/tools/auth0/handlers/resourceServers.js.map +0 -1
  291. package/lib/tools/auth0/handlers/roles.js.map +0 -1
  292. package/lib/tools/auth0/handlers/rules.js.map +0 -1
  293. package/lib/tools/auth0/handlers/rulesConfigs.js.map +0 -1
  294. package/lib/tools/auth0/handlers/scimHandler.js.map +0 -1
  295. package/lib/tools/auth0/handlers/selfServiceProfiles.js.map +0 -1
  296. package/lib/tools/auth0/handlers/tenant.js.map +0 -1
  297. package/lib/tools/auth0/handlers/themes.js.map +0 -1
  298. package/lib/tools/auth0/handlers/triggers.js.map +0 -1
  299. package/lib/tools/auth0/handlers/userAttributeProfiles.js.map +0 -1
  300. package/lib/tools/auth0/index.js.map +0 -1
  301. package/lib/tools/auth0/schema.js.map +0 -1
  302. package/lib/tools/calculateChanges.js.map +0 -1
  303. package/lib/tools/constants.js.map +0 -1
  304. package/lib/tools/deploy.js.map +0 -1
  305. package/lib/tools/index.js.map +0 -1
  306. package/lib/tools/utils.js.map +0 -1
  307. package/lib/tools/validationError.js.map +0 -1
  308. package/lib/types.js.map +0 -1
  309. 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,9 +66,27 @@ 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
@@ -97,7 +115,7 @@ workflows:
97
115
  v: "lts"
98
116
  - unit_test:
99
117
  name: Unit tests with Node current
100
- v: "22.4.1"
118
+ v: "22.12.0"
101
119
 
102
120
  test_and_deploy:
103
121
  jobs:
@@ -118,6 +136,29 @@ workflows:
118
136
  branches:
119
137
  ignore: /.*/
120
138
  tags:
121
- only: /^v.*/
139
+ only: /^v[0-9]+\.[0-9]+\.[0-9]+$/
140
+ context:
141
+ - publish-npm
142
+
143
+ test_and_deploy_beta:
144
+ jobs:
145
+ - unit_test:
146
+ name: Unit tests with Node LTS (Beta)
147
+ v: "lts"
148
+ filters:
149
+ branches:
150
+ only: beta
151
+ tags:
152
+ only: /^v[0-9]+\.[0-9]+\.[0-9]+-beta\.[0-9]+$/
153
+ - deploy_beta:
154
+ name: Publish Beta to NPM
155
+ v: "lts"
156
+ requires:
157
+ - Unit tests with Node LTS (Beta)
158
+ filters:
159
+ branches:
160
+ ignore: /.*/
161
+ tags:
162
+ only: /^v[0-9]+\.[0-9]+\.[0-9]+-beta\.[0-9]+$/
122
163
  context:
123
164
  - publish-npm
package/CHANGELOG.md CHANGED
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [8.20.4-beta.0] - 2025-12-02
11
+
12
+ ### Changed
13
+
14
+ - Upgrading node-auth0 from v4 to v5 [beta]. [#1207]
15
+
10
16
  ## [8.20.3] - 2025-11-14
11
17
 
12
18
  ### Fixed
@@ -1511,7 +1517,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1511
1517
  [#1196]: https://github.com/auth0/auth0-deploy-cli/issues/1196
1512
1518
  [#1200]: https://github.com/auth0/auth0-deploy-cli/issues/1200
1513
1519
  [#1203]: https://github.com/auth0/auth0-deploy-cli/issues/1203
1514
- [Unreleased]: https://github.com/auth0/auth0-deploy-cli/compare/v8.20.3...HEAD
1520
+ [#1207]: https://github.com/auth0/auth0-deploy-cli/issues/1207
1521
+ [Unreleased]: https://github.com/auth0/auth0-deploy-cli/compare/v8.20.4-beta.0...HEAD
1522
+ [8.20.4-beta.0]: https://github.com/auth0/auth0-deploy-cli/compare/v8.20.3...v8.20.4-beta.0
1515
1523
  [8.20.3]: https://github.com/auth0/auth0-deploy-cli/compare/v8.20.2...v8.20.3
1516
1524
  [8.20.2]: https://github.com/auth0/auth0-deploy-cli/compare/v8.20.1...v8.20.2
1517
1525
  [8.20.1]: https://github.com/auth0/auth0-deploy-cli/compare/v8.20.0...v8.20.1
@@ -0,0 +1,130 @@
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
+ '@typescript-eslint/no-unused-vars': [
95
+ 'error',
96
+ {
97
+ argsIgnorePattern: '^_',
98
+ varsIgnorePattern: '^_',
99
+ caughtErrors: 'none',
100
+ ignoreRestSiblings: true,
101
+ },
102
+ ],
103
+ '@typescript-eslint/no-redeclare': 'off',
104
+ '@typescript-eslint/no-explicit-any': 'off',
105
+ 'no-var': 'off',
106
+ 'object-curly-spacing': ['error', 'always'],
107
+ quotes: [
108
+ 'error',
109
+ 'single',
110
+ {
111
+ avoidEscape: true,
112
+ },
113
+ ],
114
+ semi: ['error', 'always'],
115
+ strict: 'off',
116
+ 'space-before-blocks': ['error', 'always'],
117
+ 'import/extensions': [
118
+ 'error',
119
+ 'ignorePackages',
120
+ {
121
+ js: 'never',
122
+ ts: 'never',
123
+ mjs: 'never',
124
+ cjs: 'never',
125
+ },
126
+ ],
127
+ },
128
+ },
129
+ eslintConfigPrettier,
130
+ ];
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
@@ -9,33 +9,55 @@ const utils_1 = require("../tools/utils");
9
9
  // eslint-disable-next-line import/prefer-default-export
10
10
  function emailProviderDefaults(emailProvider) {
11
11
  // eslint-disable-line
12
- const updated = Object.assign({}, emailProvider);
12
+ const updated = { ...emailProvider };
13
13
  const apiKeyProviders = ['mailgun', 'mandrill', 'sendgrid', 'sparkpost'];
14
14
  // Add placeholder for credentials as they cannot be exported
15
15
  const { name } = updated;
16
16
  if (apiKeyProviders.includes(name)) {
17
- updated.credentials = Object.assign({ api_key: `##${name.toUpperCase()}_API_KEY##` }, (updated.credentials || {}));
17
+ updated.credentials = {
18
+ api_key: `##${name.toUpperCase()}_API_KEY##`,
19
+ ...(updated.credentials || {}),
20
+ };
18
21
  }
19
22
  if (name === 'smtp') {
20
23
  // This is to mask smtp_user to '##SMTP_USER##'
21
24
  if (updated.credentials && 'smtp_user' in updated.credentials) {
22
25
  delete updated.credentials.smtp_user;
23
26
  }
24
- updated.credentials = Object.assign({ smtp_host: '##SMTP_HOSTNAME##', smtp_port: '##SMTP_PORT##', smtp_user: '##SMTP_USER##', smtp_pass: '##SMTP_PASS##' }, (updated.credentials || {}));
27
+ updated.credentials = {
28
+ smtp_host: '##SMTP_HOSTNAME##',
29
+ smtp_port: '##SMTP_PORT##',
30
+ smtp_user: '##SMTP_USER##',
31
+ smtp_pass: '##SMTP_PASS##',
32
+ ...(updated.credentials || {}),
33
+ };
25
34
  }
26
35
  if (name === 'ses') {
27
- updated.credentials = Object.assign({ accessKeyId: '##SES_ACCESS_KEY_ID##', secretAccessKey: '##SES_ACCESS_SECRET_KEY##', region: '##SES_AWS_REGION##' }, (updated.credentials || {}));
36
+ updated.credentials = {
37
+ accessKeyId: '##SES_ACCESS_KEY_ID##',
38
+ secretAccessKey: '##SES_ACCESS_SECRET_KEY##',
39
+ region: '##SES_AWS_REGION##',
40
+ ...(updated.credentials || {}),
41
+ };
28
42
  }
29
43
  if (name === 'azure_cs') {
30
- updated.credentials = Object.assign({ connectionString: '##AZURE_CS_CONNECTION_KEY##' }, (updated.credentials || {}));
44
+ updated.credentials = {
45
+ connectionString: '##AZURE_CS_CONNECTION_KEY##',
46
+ ...(updated.credentials || {}),
47
+ };
31
48
  }
32
49
  if (name === 'ms365') {
33
- updated.credentials = Object.assign({ tenantId: '##MS365_TENANT_ID##', clientId: '##MS365_CLIENT_ID##', clientSecret: '##MS365_CLIENT_SECRET##' }, (updated.credentials || {}));
50
+ updated.credentials = {
51
+ tenantId: '##MS365_TENANT_ID##',
52
+ clientId: '##MS365_CLIENT_ID##',
53
+ clientSecret: '##MS365_CLIENT_SECRET##',
54
+ ...(updated.credentials || {}),
55
+ };
34
56
  }
35
57
  return updated;
36
58
  }
37
59
  function phoneProviderDefaults(phoneProvider) {
38
- const updated = Object.assign({}, phoneProvider);
60
+ const updated = { ...phoneProvider };
39
61
  const removeKeysFromOutput = [
40
62
  'id',
41
63
  'created_at',
@@ -103,14 +125,20 @@ function attackProtectionDefaults(attackProtection) {
103
125
  const providersWithSecrets = ['arkose', 'hcaptcha', 'friendly_captcha', 'recaptcha_v2'];
104
126
  providersWithSecrets.forEach((provider) => {
105
127
  if (captcha[provider]) {
106
- captcha[provider] = Object.assign(Object.assign({}, captcha[provider]), { secret: `##CAPTCHA_${provider.toUpperCase()}_SECRET##` });
128
+ captcha[provider] = {
129
+ ...captcha[provider],
130
+ secret: `##CAPTCHA_${provider.toUpperCase()}_SECRET##`,
131
+ };
107
132
  }
108
133
  });
109
134
  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##' });
135
+ captcha.recaptcha_enterprise = {
136
+ ...captcha.recaptcha_enterprise,
137
+ api_key: '##CAPTCHA_RECAPTCHA_ENTERPRISE_API_KEY##',
138
+ project_id: '##CAPTCHA_RECAPTCHA_ENTERPRISE_PROJECT_ID##',
139
+ };
111
140
  }
112
141
  attackProtection.captcha = captcha;
113
142
  }
114
143
  return attackProtection;
115
144
  }
116
- //# sourceMappingURL=defaults.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
  };
@@ -25,10 +16,12 @@ function parse(context) {
25
16
  return { actions: null }; // Skip
26
17
  const files = (0, utils_1.getFiles)(actionsFolder, ['.json']);
27
18
  const actions = files.map((file) => {
28
- const action = Object.assign({}, (0, utils_1.loadJSON)(file, {
29
- mappings: context.mappings,
30
- disableKeywordReplacement: context.disableKeywordReplacement,
31
- }));
19
+ const action = {
20
+ ...(0, utils_1.loadJSON)(file, {
21
+ mappings: context.mappings,
22
+ disableKeywordReplacement: context.disableKeywordReplacement,
23
+ }),
24
+ };
32
25
  const actionFolder = path_1.default.join(tools_1.constants.ACTIONS_DIRECTORY, `${action.name}`);
33
26
  if (action.code) {
34
27
  // Convert `action.code` path to Unix-style path by replacing backslashes and multiple slashes with a single forward slash, and remove leading drive letters or './'.
@@ -69,32 +62,41 @@ function mapActionCode(filePath, action) {
69
62
  return `./${tools_1.constants.ACTIONS_DIRECTORY}/${actionName}/code.js`;
70
63
  }
71
64
  function mapToAction(filePath, action, includeIdentifiers) {
72
- return Object.assign(Object.assign({}, (includeIdentifiers && action.id ? { id: action.id } : {})), { name: action.name, code: mapActionCode(filePath, action), runtime: action.runtime, status: action.status, dependencies: action.dependencies, secrets: mapSecrets(action.secrets), supported_triggers: action.supported_triggers, deployed: action.deployed || action.all_changes_deployed, installed_integration_id: action.installed_integration_id });
65
+ return {
66
+ ...(includeIdentifiers && action.id ? { id: action.id } : {}),
67
+ name: action.name,
68
+ code: mapActionCode(filePath, action),
69
+ runtime: action.runtime,
70
+ status: action.status,
71
+ dependencies: action.dependencies,
72
+ secrets: mapSecrets(action.secrets),
73
+ supported_triggers: action.supported_triggers,
74
+ deployed: action.deployed || action.all_changes_deployed,
75
+ installed_integration_id: action.installed_integration_id,
76
+ };
73
77
  }
74
- function dump(context) {
75
- return __awaiter(this, void 0, void 0, function* () {
76
- const { actions } = context.assets;
77
- if (!actions)
78
- return;
79
- // Marketplace actions are not currently supported for management (See ESD-23225)
80
- const filteredActions = actions.filter((action) => {
81
- if ((0, actions_1.isMarketplaceAction)(action)) {
82
- logger_1.default.warn(`Skipping export of marketplace action "${action.name}". Management of marketplace actions are not currently supported.`);
83
- return false;
84
- }
85
- return true;
86
- });
87
- // Create Actions folder
88
- const actionsFolder = path_1.default.join(context.filePath, tools_1.constants.ACTIONS_DIRECTORY);
89
- fs_extra_1.default.ensureDirSync(actionsFolder);
90
- const includeIdentifiers = Boolean(context.config.AUTH0_EXPORT_IDENTIFIERS);
91
- filteredActions.forEach((action) => {
92
- // Dump template metadata
93
- const name = (0, utils_1.sanitize)(action.name);
94
- const actionFile = path_1.default.join(actionsFolder, `${name}.json`);
95
- logger_1.default.info(`Writing ${actionFile}`);
96
- fs_extra_1.default.writeFileSync(actionFile, JSON.stringify(mapToAction(context.filePath, action, includeIdentifiers), null, 2));
97
- });
78
+ async function dump(context) {
79
+ const { actions } = context.assets;
80
+ if (!actions)
81
+ return;
82
+ // Marketplace actions are not currently supported for management (See ESD-23225)
83
+ const filteredActions = actions.filter((action) => {
84
+ if ((0, actions_1.isMarketplaceAction)(action)) {
85
+ logger_1.default.warn(`Skipping export of marketplace action "${action.name}". Management of marketplace actions are not currently supported.`);
86
+ return false;
87
+ }
88
+ return true;
89
+ });
90
+ // Create Actions folder
91
+ const actionsFolder = path_1.default.join(context.filePath, tools_1.constants.ACTIONS_DIRECTORY);
92
+ fs_extra_1.default.ensureDirSync(actionsFolder);
93
+ const includeIdentifiers = Boolean(context.config.AUTH0_EXPORT_IDENTIFIERS);
94
+ filteredActions.forEach((action) => {
95
+ // Dump template metadata
96
+ const name = (0, utils_1.sanitize)(action.name);
97
+ const actionFile = path_1.default.join(actionsFolder, `${name}.json`);
98
+ logger_1.default.info(`Writing ${actionFile}`);
99
+ fs_extra_1.default.writeFileSync(actionFile, JSON.stringify(mapToAction(context.filePath, action, includeIdentifiers), null, 2));
98
100
  });
99
101
  }
100
102
  const actionsHandler = {
@@ -102,4 +104,3 @@ const actionsHandler = {
102
104
  dump,
103
105
  };
104
106
  exports.default = actionsHandler;
105
- //# sourceMappingURL=actions.js.map