auth0-deploy-cli 8.20.4-beta.0 → 8.22.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 (318) hide show
  1. package/.circleci/config.yml +5 -46
  2. package/.eslintignore +5 -0
  3. package/.eslintrc +69 -0
  4. package/CHANGELOG.md +30 -6
  5. package/lib/args.js +1 -0
  6. package/lib/args.js.map +1 -0
  7. package/lib/commands/export.js +49 -41
  8. package/lib/commands/export.js.map +1 -0
  9. package/lib/commands/import.js +43 -36
  10. package/lib/commands/import.js.map +1 -0
  11. package/lib/commands/index.js +1 -0
  12. package/lib/commands/index.js.map +1 -0
  13. package/lib/configFactory.js +1 -0
  14. package/lib/configFactory.js.map +1 -0
  15. package/lib/context/defaults.js +10 -38
  16. package/lib/context/defaults.js.map +1 -0
  17. package/lib/context/directory/handlers/actions.js +39 -40
  18. package/lib/context/directory/handlers/actions.js.map +1 -0
  19. package/lib/context/directory/handlers/attackProtection.js +34 -22
  20. package/lib/context/directory/handlers/attackProtection.js.map +1 -0
  21. package/lib/context/directory/handlers/branding.js +21 -12
  22. package/lib/context/directory/handlers/branding.js.map +1 -0
  23. package/lib/context/directory/handlers/clientGrants.js +62 -52
  24. package/lib/context/directory/handlers/clientGrants.js.map +1 -0
  25. package/lib/context/directory/handlers/clients.js +60 -17
  26. package/lib/context/directory/handlers/clients.js.map +1 -0
  27. package/lib/context/directory/handlers/connectionProfiles.d.ts +11 -0
  28. package/lib/context/directory/handlers/connectionProfiles.js +59 -0
  29. package/lib/context/directory/handlers/connectionProfiles.js.map +1 -0
  30. package/lib/context/directory/handlers/connections.js +41 -32
  31. package/lib/context/directory/handlers/connections.js.map +1 -0
  32. package/lib/context/directory/handlers/customDomains.js +21 -9
  33. package/lib/context/directory/handlers/customDomains.js.map +1 -0
  34. package/lib/context/directory/handlers/databases.js +35 -37
  35. package/lib/context/directory/handlers/databases.js.map +1 -0
  36. package/lib/context/directory/handlers/emailProvider.js +36 -22
  37. package/lib/context/directory/handlers/emailProvider.js.map +1 -0
  38. package/lib/context/directory/handlers/emailTemplates.js +29 -20
  39. package/lib/context/directory/handlers/emailTemplates.js.map +1 -0
  40. package/lib/context/directory/handlers/flowVaultConnections.js +49 -39
  41. package/lib/context/directory/handlers/flowVaultConnections.js.map +1 -0
  42. package/lib/context/directory/handlers/flows.js +48 -38
  43. package/lib/context/directory/handlers/flows.js.map +1 -0
  44. package/lib/context/directory/handlers/forms.js +48 -38
  45. package/lib/context/directory/handlers/forms.js.map +1 -0
  46. package/lib/context/directory/handlers/guardianFactorProviders.js +21 -9
  47. package/lib/context/directory/handlers/guardianFactorProviders.js.map +1 -0
  48. package/lib/context/directory/handlers/guardianFactorTemplates.js +21 -9
  49. package/lib/context/directory/handlers/guardianFactorTemplates.js.map +1 -0
  50. package/lib/context/directory/handlers/guardianFactors.js +21 -9
  51. package/lib/context/directory/handlers/guardianFactors.js.map +1 -0
  52. package/lib/context/directory/handlers/guardianPhoneFactorMessageTypes.js +20 -8
  53. package/lib/context/directory/handlers/guardianPhoneFactorMessageTypes.js.map +1 -0
  54. package/lib/context/directory/handlers/guardianPhoneFactorSelectedProvider.js +20 -8
  55. package/lib/context/directory/handlers/guardianPhoneFactorSelectedProvider.js.map +1 -0
  56. package/lib/context/directory/handlers/guardianPolicies.js +20 -8
  57. package/lib/context/directory/handlers/guardianPolicies.js.map +1 -0
  58. package/lib/context/directory/handlers/hooks.js +34 -24
  59. package/lib/context/directory/handlers/hooks.js.map +1 -0
  60. package/lib/context/directory/handlers/index.js +3 -0
  61. package/lib/context/directory/handlers/index.js.map +1 -0
  62. package/lib/context/directory/handlers/logStreams.js +24 -12
  63. package/lib/context/directory/handlers/logStreams.js.map +1 -0
  64. package/lib/context/directory/handlers/networkACLs.js +34 -22
  65. package/lib/context/directory/handlers/networkACLs.js.map +1 -0
  66. package/lib/context/directory/handlers/organizations.js +44 -39
  67. package/lib/context/directory/handlers/organizations.js.map +1 -0
  68. package/lib/context/directory/handlers/pages.js +37 -31
  69. package/lib/context/directory/handlers/pages.js.map +1 -0
  70. package/lib/context/directory/handlers/phoneProvider.js +24 -12
  71. package/lib/context/directory/handlers/phoneProvider.js.map +1 -0
  72. package/lib/context/directory/handlers/prompts.js +76 -58
  73. package/lib/context/directory/handlers/prompts.js.map +1 -0
  74. package/lib/context/directory/handlers/resourceServers.d.ts +1 -1
  75. package/lib/context/directory/handlers/resourceServers.js +30 -18
  76. package/lib/context/directory/handlers/resourceServers.js.map +1 -0
  77. package/lib/context/directory/handlers/roles.js +31 -21
  78. package/lib/context/directory/handlers/roles.js.map +1 -0
  79. package/lib/context/directory/handlers/rules.js +32 -22
  80. package/lib/context/directory/handlers/rules.js.map +1 -0
  81. package/lib/context/directory/handlers/rulesConfigs.js +15 -3
  82. package/lib/context/directory/handlers/rulesConfigs.js.map +1 -0
  83. package/lib/context/directory/handlers/selfServiceProfiles.js +40 -28
  84. package/lib/context/directory/handlers/selfServiceProfiles.js.map +1 -0
  85. package/lib/context/directory/handlers/tenant.js +34 -14
  86. package/lib/context/directory/handlers/tenant.js.map +1 -0
  87. package/lib/context/directory/handlers/themes.js +21 -9
  88. package/lib/context/directory/handlers/themes.js.map +1 -0
  89. package/lib/context/directory/handlers/triggers.d.ts +1 -1
  90. package/lib/context/directory/handlers/triggers.js +26 -16
  91. package/lib/context/directory/handlers/triggers.js.map +1 -0
  92. package/lib/context/directory/handlers/userAttributeProfiles.d.ts +1 -1
  93. package/lib/context/directory/handlers/userAttributeProfiles.js +26 -16
  94. package/lib/context/directory/handlers/userAttributeProfiles.js.map +1 -0
  95. package/lib/context/directory/index.js +80 -66
  96. package/lib/context/directory/index.js.map +1 -0
  97. package/lib/context/index.js +20 -9
  98. package/lib/context/index.js.map +1 -0
  99. package/lib/context/yaml/handlers/actions.js +41 -39
  100. package/lib/context/yaml/handlers/actions.js.map +1 -0
  101. package/lib/context/yaml/handlers/attackProtection.js +41 -27
  102. package/lib/context/yaml/handlers/attackProtection.js.map +1 -0
  103. package/lib/context/yaml/handlers/branding.js +69 -47
  104. package/lib/context/yaml/handlers/branding.js.map +1 -0
  105. package/lib/context/yaml/handlers/clientGrants.js +40 -26
  106. package/lib/context/yaml/handlers/clientGrants.js.map +1 -0
  107. package/lib/context/yaml/handlers/clients.js +85 -41
  108. package/lib/context/yaml/handlers/clients.js.map +1 -0
  109. package/lib/context/yaml/handlers/connectionProfiles.d.ts +11 -0
  110. package/lib/context/yaml/handlers/connectionProfiles.js +44 -0
  111. package/lib/context/yaml/handlers/connectionProfiles.js.map +1 -0
  112. package/lib/context/yaml/handlers/connections.js +67 -63
  113. package/lib/context/yaml/handlers/connections.js.map +1 -0
  114. package/lib/context/yaml/handlers/customDomains.js +19 -7
  115. package/lib/context/yaml/handlers/customDomains.js.map +1 -0
  116. package/lib/context/yaml/handlers/databases.js +65 -63
  117. package/lib/context/yaml/handlers/databases.js.map +1 -0
  118. package/lib/context/yaml/handlers/emailProvider.js +37 -22
  119. package/lib/context/yaml/handlers/emailProvider.js.map +1 -0
  120. package/lib/context/yaml/handlers/emailTemplates.js +39 -28
  121. package/lib/context/yaml/handlers/emailTemplates.js.map +1 -0
  122. package/lib/context/yaml/handlers/flowVaultConnections.js +50 -36
  123. package/lib/context/yaml/handlers/flowVaultConnections.js.map +1 -0
  124. package/lib/context/yaml/handlers/flows.js +66 -55
  125. package/lib/context/yaml/handlers/flows.js.map +1 -0
  126. package/lib/context/yaml/handlers/forms.js +66 -55
  127. package/lib/context/yaml/handlers/forms.js.map +1 -0
  128. package/lib/context/yaml/handlers/guardianFactorProviders.js +19 -7
  129. package/lib/context/yaml/handlers/guardianFactorProviders.js.map +1 -0
  130. package/lib/context/yaml/handlers/guardianFactorTemplates.js +19 -7
  131. package/lib/context/yaml/handlers/guardianFactorTemplates.js.map +1 -0
  132. package/lib/context/yaml/handlers/guardianFactors.js +19 -7
  133. package/lib/context/yaml/handlers/guardianFactors.js.map +1 -0
  134. package/lib/context/yaml/handlers/guardianPhoneFactorMessageTypes.js +19 -7
  135. package/lib/context/yaml/handlers/guardianPhoneFactorMessageTypes.js.map +1 -0
  136. package/lib/context/yaml/handlers/guardianPhoneFactorSelectedProvider.js +19 -7
  137. package/lib/context/yaml/handlers/guardianPhoneFactorSelectedProvider.js.map +1 -0
  138. package/lib/context/yaml/handlers/guardianPolicies.js +19 -7
  139. package/lib/context/yaml/handlers/guardianPolicies.js.map +1 -0
  140. package/lib/context/yaml/handlers/hooks.js +48 -34
  141. package/lib/context/yaml/handlers/hooks.js.map +1 -0
  142. package/lib/context/yaml/handlers/index.js +3 -0
  143. package/lib/context/yaml/handlers/index.js.map +1 -0
  144. package/lib/context/yaml/handlers/logStreams.js +30 -16
  145. package/lib/context/yaml/handlers/logStreams.js.map +1 -0
  146. package/lib/context/yaml/handlers/networkACLs.js +39 -25
  147. package/lib/context/yaml/handlers/networkACLs.js.map +1 -0
  148. package/lib/context/yaml/handlers/organizations.js +46 -37
  149. package/lib/context/yaml/handlers/organizations.js.map +1 -0
  150. package/lib/context/yaml/handlers/pages.js +39 -31
  151. package/lib/context/yaml/handlers/pages.js.map +1 -0
  152. package/lib/context/yaml/handlers/phoneProvider.js +31 -17
  153. package/lib/context/yaml/handlers/phoneProvider.js.map +1 -0
  154. package/lib/context/yaml/handlers/prompts.js +47 -22
  155. package/lib/context/yaml/handlers/prompts.js.map +1 -0
  156. package/lib/context/yaml/handlers/resourceServers.d.ts +1 -1
  157. package/lib/context/yaml/handlers/resourceServers.js +33 -21
  158. package/lib/context/yaml/handlers/resourceServers.js.map +1 -0
  159. package/lib/context/yaml/handlers/roles.js +33 -19
  160. package/lib/context/yaml/handlers/roles.js.map +1 -0
  161. package/lib/context/yaml/handlers/rules.js +39 -28
  162. package/lib/context/yaml/handlers/rules.js.map +1 -0
  163. package/lib/context/yaml/handlers/rulesConfigs.js +28 -14
  164. package/lib/context/yaml/handlers/rulesConfigs.js.map +1 -0
  165. package/lib/context/yaml/handlers/selfServiceProfiles.js +43 -29
  166. package/lib/context/yaml/handlers/selfServiceProfiles.js.map +1 -0
  167. package/lib/context/yaml/handlers/tenant.js +41 -19
  168. package/lib/context/yaml/handlers/tenant.js.map +1 -0
  169. package/lib/context/yaml/handlers/themes.js +19 -7
  170. package/lib/context/yaml/handlers/themes.js.map +1 -0
  171. package/lib/context/yaml/handlers/triggers.d.ts +1 -1
  172. package/lib/context/yaml/handlers/triggers.js +29 -15
  173. package/lib/context/yaml/handlers/triggers.js.map +1 -0
  174. package/lib/context/yaml/handlers/userAttributeProfiles.d.ts +1 -1
  175. package/lib/context/yaml/handlers/userAttributeProfiles.js +19 -7
  176. package/lib/context/yaml/handlers/userAttributeProfiles.js.map +1 -0
  177. package/lib/context/yaml/index.js +128 -120
  178. package/lib/context/yaml/index.js.map +1 -0
  179. package/lib/index.d.ts +96 -4
  180. package/lib/index.js +34 -24
  181. package/lib/index.js.map +1 -0
  182. package/lib/keywordPreservation.d.ts +1 -1
  183. package/lib/keywordPreservation.js +6 -10
  184. package/lib/keywordPreservation.js.map +1 -0
  185. package/lib/logger.js +1 -0
  186. package/lib/logger.js.map +1 -0
  187. package/lib/readonly.js +4 -3
  188. package/lib/readonly.js.map +1 -0
  189. package/lib/sessionDurationsToMinutes.js +1 -0
  190. package/lib/sessionDurationsToMinutes.js.map +1 -0
  191. package/lib/tools/auth0/client.js +127 -108
  192. package/lib/tools/auth0/client.js.map +1 -0
  193. package/lib/tools/auth0/handlers/actions.d.ts +26 -8
  194. package/lib/tools/auth0/handlers/actions.js +149 -138
  195. package/lib/tools/auth0/handlers/actions.js.map +1 -0
  196. package/lib/tools/auth0/handlers/attackProtection.js +92 -80
  197. package/lib/tools/auth0/handlers/attackProtection.js.map +1 -0
  198. package/lib/tools/auth0/handlers/branding.js +99 -75
  199. package/lib/tools/auth0/handlers/branding.js.map +1 -0
  200. package/lib/tools/auth0/handlers/clientGrants.d.ts +9 -2
  201. package/lib/tools/auth0/handlers/clientGrants.js +72 -65
  202. package/lib/tools/auth0/handlers/clientGrants.js.map +1 -0
  203. package/lib/tools/auth0/handlers/clients.d.ts +96 -7
  204. package/lib/tools/auth0/handlers/clients.js +221 -66
  205. package/lib/tools/auth0/handlers/clients.js.map +1 -0
  206. package/lib/tools/auth0/handlers/connectionProfiles.d.ts +182 -0
  207. package/lib/tools/auth0/handlers/connectionProfiles.js +239 -0
  208. package/lib/tools/auth0/handlers/connectionProfiles.js.map +1 -0
  209. package/lib/tools/auth0/handlers/connections.d.ts +1 -3
  210. package/lib/tools/auth0/handlers/connections.js +135 -130
  211. package/lib/tools/auth0/handlers/connections.js.map +1 -0
  212. package/lib/tools/auth0/handlers/customDomains.d.ts +1 -4
  213. package/lib/tools/auth0/handlers/customDomains.js +53 -43
  214. package/lib/tools/auth0/handlers/customDomains.js.map +1 -0
  215. package/lib/tools/auth0/handlers/databases.js +114 -94
  216. package/lib/tools/auth0/handlers/databases.js.map +1 -0
  217. package/lib/tools/auth0/handlers/default.d.ts +2 -2
  218. package/lib/tools/auth0/handlers/default.js +171 -210
  219. package/lib/tools/auth0/handlers/default.js.map +1 -0
  220. package/lib/tools/auth0/handlers/emailProvider.js +52 -41
  221. package/lib/tools/auth0/handlers/emailProvider.js.map +1 -0
  222. package/lib/tools/auth0/handlers/emailTemplates.js +71 -49
  223. package/lib/tools/auth0/handlers/emailTemplates.js.map +1 -0
  224. package/lib/tools/auth0/handlers/flowVaultConnections.d.ts +12 -5
  225. package/lib/tools/auth0/handlers/flowVaultConnections.js +143 -108
  226. package/lib/tools/auth0/handlers/flowVaultConnections.js.map +1 -0
  227. package/lib/tools/auth0/handlers/flows.d.ts +3 -2
  228. package/lib/tools/auth0/handlers/flows.js +129 -92
  229. package/lib/tools/auth0/handlers/flows.js.map +1 -0
  230. package/lib/tools/auth0/handlers/forms.d.ts +3 -3
  231. package/lib/tools/auth0/handlers/forms.js +112 -98
  232. package/lib/tools/auth0/handlers/forms.js.map +1 -0
  233. package/lib/tools/auth0/handlers/guardianFactorProviders.js +84 -61
  234. package/lib/tools/auth0/handlers/guardianFactorProviders.js.map +1 -0
  235. package/lib/tools/auth0/handlers/guardianFactorTemplates.js +68 -46
  236. package/lib/tools/auth0/handlers/guardianFactorTemplates.js.map +1 -0
  237. package/lib/tools/auth0/handlers/guardianFactors.js +45 -35
  238. package/lib/tools/auth0/handlers/guardianFactors.js.map +1 -0
  239. package/lib/tools/auth0/handlers/guardianPhoneFactorMessageTypes.js +45 -29
  240. package/lib/tools/auth0/handlers/guardianPhoneFactorMessageTypes.js.map +1 -0
  241. package/lib/tools/auth0/handlers/guardianPhoneFactorSelectedProvider.js +45 -29
  242. package/lib/tools/auth0/handlers/guardianPhoneFactorSelectedProvider.js.map +1 -0
  243. package/lib/tools/auth0/handlers/guardianPolicies.js +35 -20
  244. package/lib/tools/auth0/handlers/guardianPolicies.js.map +1 -0
  245. package/lib/tools/auth0/handlers/hooks.js +153 -123
  246. package/lib/tools/auth0/handlers/hooks.js.map +1 -0
  247. package/lib/tools/auth0/handlers/index.js +3 -0
  248. package/lib/tools/auth0/handlers/index.js.map +1 -0
  249. package/lib/tools/auth0/handlers/logStreams.js +47 -42
  250. package/lib/tools/auth0/handlers/logStreams.js.map +1 -0
  251. package/lib/tools/auth0/handlers/networkACLs.d.ts +4 -5
  252. package/lib/tools/auth0/handlers/networkACLs.js +133 -115
  253. package/lib/tools/auth0/handlers/networkACLs.js.map +1 -0
  254. package/lib/tools/auth0/handlers/organizations.d.ts +9 -10
  255. package/lib/tools/auth0/handlers/organizations.js +429 -360
  256. package/lib/tools/auth0/handlers/organizations.js.map +1 -0
  257. package/lib/tools/auth0/handlers/pages.js +83 -74
  258. package/lib/tools/auth0/handlers/pages.js.map +1 -0
  259. package/lib/tools/auth0/handlers/phoneProvider.d.ts +2 -2
  260. package/lib/tools/auth0/handlers/phoneProvider.js +82 -69
  261. package/lib/tools/auth0/handlers/phoneProvider.js.map +1 -0
  262. package/lib/tools/auth0/handlers/prompts.d.ts +5 -5
  263. package/lib/tools/auth0/handlers/prompts.js +235 -240
  264. package/lib/tools/auth0/handlers/prompts.js.map +1 -0
  265. package/lib/tools/auth0/handlers/resourceServers.d.ts +2 -3
  266. package/lib/tools/auth0/handlers/resourceServers.js +106 -57
  267. package/lib/tools/auth0/handlers/resourceServers.js.map +1 -0
  268. package/lib/tools/auth0/handlers/roles.js +178 -162
  269. package/lib/tools/auth0/handlers/roles.js.map +1 -0
  270. package/lib/tools/auth0/handlers/rules.js +162 -144
  271. package/lib/tools/auth0/handlers/rules.js.map +1 -0
  272. package/lib/tools/auth0/handlers/rulesConfigs.js +39 -30
  273. package/lib/tools/auth0/handlers/rulesConfigs.js.map +1 -0
  274. package/lib/tools/auth0/handlers/scimHandler.d.ts +3 -4
  275. package/lib/tools/auth0/handlers/scimHandler.js +132 -110
  276. package/lib/tools/auth0/handlers/scimHandler.js.map +1 -0
  277. package/lib/tools/auth0/handlers/selfServiceProfiles.d.ts +5 -13
  278. package/lib/tools/auth0/handlers/selfServiceProfiles.js +204 -170
  279. package/lib/tools/auth0/handlers/selfServiceProfiles.js.map +1 -0
  280. package/lib/tools/auth0/handlers/tenant.d.ts +3 -5
  281. package/lib/tools/auth0/handlers/tenant.js +52 -45
  282. package/lib/tools/auth0/handlers/tenant.js.map +1 -0
  283. package/lib/tools/auth0/handlers/themes.d.ts +12 -12
  284. package/lib/tools/auth0/handlers/themes.js +102 -86
  285. package/lib/tools/auth0/handlers/themes.js.map +1 -0
  286. package/lib/tools/auth0/handlers/triggers.js +75 -59
  287. package/lib/tools/auth0/handlers/triggers.js.map +1 -0
  288. package/lib/tools/auth0/handlers/userAttributeProfiles.d.ts +4 -4
  289. package/lib/tools/auth0/handlers/userAttributeProfiles.js +63 -56
  290. package/lib/tools/auth0/handlers/userAttributeProfiles.js.map +1 -0
  291. package/lib/tools/auth0/index.js +48 -35
  292. package/lib/tools/auth0/index.js.map +1 -0
  293. package/lib/tools/auth0/schema.js +4 -6
  294. package/lib/tools/auth0/schema.js.map +1 -0
  295. package/lib/tools/calculateChanges.js +15 -24
  296. package/lib/tools/calculateChanges.js.map +1 -0
  297. package/lib/tools/constants.d.ts +3 -2
  298. package/lib/tools/constants.js +2 -0
  299. package/lib/tools/constants.js.map +1 -0
  300. package/lib/tools/deploy.js +29 -17
  301. package/lib/tools/deploy.js.map +1 -0
  302. package/lib/tools/index.d.ts +89 -3
  303. package/lib/tools/index.js +2 -3
  304. package/lib/tools/index.js.map +1 -0
  305. package/lib/tools/utils.d.ts +1 -1
  306. package/lib/tools/utils.js +22 -12
  307. package/lib/tools/utils.js.map +1 -0
  308. package/lib/tools/validationError.js +1 -0
  309. package/lib/tools/validationError.js.map +1 -0
  310. package/lib/types.d.ts +8 -9
  311. package/lib/types.js +1 -0
  312. package/lib/types.js.map +1 -0
  313. package/lib/utils.d.ts +58 -3
  314. package/lib/utils.js +5 -8
  315. package/lib/utils.js.map +1 -0
  316. package/package.json +12 -13
  317. package/tsconfig.json +3 -4
  318. package/eslint.config.js +0 -130
@@ -1,40 +1,54 @@
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
+ };
2
11
  var __importDefault = (this && this.__importDefault) || function (mod) {
3
12
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
13
  };
5
14
  Object.defineProperty(exports, "__esModule", { value: true });
6
15
  const logger_1 = __importDefault(require("../../../logger"));
7
- async function parse(context) {
8
- const { networkACLs } = context.assets;
9
- if (!networkACLs)
10
- return { networkACLs: null };
11
- return {
12
- networkACLs,
13
- };
16
+ function parse(context) {
17
+ return __awaiter(this, void 0, void 0, function* () {
18
+ const { networkACLs } = context.assets;
19
+ if (!networkACLs)
20
+ return { networkACLs: null };
21
+ return {
22
+ networkACLs,
23
+ };
24
+ });
14
25
  }
15
- async function dump(context) {
16
- let { networkACLs } = context.assets;
17
- if (!networkACLs)
18
- return { networkACLs: null };
19
- if (Array.isArray(networkACLs) && networkACLs.length === 0) {
20
- logger_1.default.info('No network ACLs available, skipping dump');
21
- return { networkACLs: null };
22
- }
23
- const removeKeysFromOutput = ['created_at', 'updated_at'];
24
- networkACLs = networkACLs.map((networkACL) => {
25
- removeKeysFromOutput.forEach((key) => {
26
- if (key in networkACL) {
27
- delete networkACL[key];
28
- }
26
+ function dump(context) {
27
+ return __awaiter(this, void 0, void 0, function* () {
28
+ let { networkACLs } = context.assets;
29
+ if (!networkACLs)
30
+ return { networkACLs: null };
31
+ if (Array.isArray(networkACLs) && networkACLs.length === 0) {
32
+ logger_1.default.info('No network ACLs available, skipping dump');
33
+ return { networkACLs: null };
34
+ }
35
+ const removeKeysFromOutput = ['created_at', 'updated_at'];
36
+ networkACLs = networkACLs.map((networkACL) => {
37
+ removeKeysFromOutput.forEach((key) => {
38
+ if (key in networkACL) {
39
+ delete networkACL[key];
40
+ }
41
+ });
42
+ return networkACL;
29
43
  });
30
- return networkACL;
44
+ return {
45
+ networkACLs,
46
+ };
31
47
  });
32
- return {
33
- networkACLs,
34
- };
35
48
  }
36
49
  const networkACLsHandler = {
37
50
  parse,
38
51
  dump,
39
52
  };
40
53
  exports.default = networkACLsHandler;
54
+ //# sourceMappingURL=networkACLs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"networkACLs.js","sourceRoot":"","sources":["../../../../src/context/yaml/handlers/networkACLs.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAIA,6DAAkC;AAIlC,SAAe,KAAK,CAAC,OAAoB;;QACvC,MAAM,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC;QAEvC,IAAI,CAAC,WAAW;YAAE,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;QAE/C,OAAO;YACL,WAAW;SACZ,CAAC;IACJ,CAAC;CAAA;AAED,SAAe,IAAI,CAAC,OAAoB;;QACtC,IAAI,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC;QAErC,IAAI,CAAC,WAAW;YAAE,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;QAE/C,IAAI,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC3D,gBAAG,CAAC,IAAI,CAAC,0CAA0C,CAAC,CAAC;YACrD,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;QAC/B,CAAC;QAED,MAAM,oBAAoB,GAAG,CAAC,YAAY,EAAE,YAAY,CAAC,CAAC;QAE1D,WAAW,GAAG,WAAW,CAAC,GAAG,CAAC,CAAC,UAAU,EAAE,EAAE;YAC3C,oBAAoB,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;gBACnC,IAAI,GAAG,IAAI,UAAU,EAAE,CAAC;oBACtB,OAAO,UAAU,CAAC,GAAG,CAAC,CAAC;gBACzB,CAAC;YACH,CAAC,CAAC,CAAC;YAEH,OAAO,UAAU,CAAC;QACpB,CAAC,CAAC,CAAC;QAEH,OAAO;YACL,WAAW;SACZ,CAAC;IACJ,CAAC;CAAA;AAED,MAAM,kBAAkB,GAAmC;IACzD,KAAK;IACL,IAAI;CACL,CAAC;AAEF,kBAAe,kBAAkB,CAAC"}
@@ -1,46 +1,55 @@
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
+ };
2
11
  Object.defineProperty(exports, "__esModule", { value: true });
3
- async function parse(context) {
4
- const { organizations } = context.assets;
5
- if (!organizations)
6
- return { organizations: null };
7
- return {
8
- organizations,
9
- };
12
+ function parse(context) {
13
+ return __awaiter(this, void 0, void 0, function* () {
14
+ const { organizations } = context.assets;
15
+ if (!organizations)
16
+ return { organizations: null };
17
+ return {
18
+ organizations,
19
+ };
20
+ });
10
21
  }
11
- async function dump(context) {
12
- const { organizations } = context.assets;
13
- if (!organizations)
14
- return { organizations: null };
15
- return {
16
- organizations: organizations.map((org) => {
17
- if (org.connections.length > 0) {
18
- org.connections = org.connections.map((c) => {
19
- // connection is a computed field
20
- const name = c.connection && c.connection.name;
21
- delete c.connection_id;
22
- delete c.connection;
23
- return {
24
- name,
25
- ...c,
26
- };
27
- });
28
- }
29
- if (org.discovery_domains && org.discovery_domains.length > 0) {
30
- org.discovery_domains = org.discovery_domains.map((dd) => {
31
- // discovery_domains id is a computed field
32
- delete dd.id;
33
- return {
34
- ...dd,
35
- };
36
- });
37
- }
38
- return org;
39
- }),
40
- };
22
+ function dump(context) {
23
+ return __awaiter(this, void 0, void 0, function* () {
24
+ const { organizations } = context.assets;
25
+ if (!organizations)
26
+ return { organizations: null };
27
+ return {
28
+ organizations: organizations.map((org) => {
29
+ if (org.connections.length > 0) {
30
+ org.connections = org.connections.map((c) => {
31
+ // connection is a computed field
32
+ const name = c.connection && c.connection.name;
33
+ delete c.connection_id;
34
+ delete c.connection;
35
+ return Object.assign({ name }, c);
36
+ });
37
+ }
38
+ if (org.discovery_domains && org.discovery_domains.length > 0) {
39
+ org.discovery_domains = org.discovery_domains.map((dd) => {
40
+ // discovery_domains id is a computed field
41
+ delete dd.id;
42
+ return Object.assign({}, dd);
43
+ });
44
+ }
45
+ return org;
46
+ }),
47
+ };
48
+ });
41
49
  }
42
50
  const organizationsHandler = {
43
51
  parse,
44
52
  dump,
45
53
  };
46
54
  exports.default = organizationsHandler;
55
+ //# sourceMappingURL=organizations.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"organizations.js","sourceRoot":"","sources":["../../../../src/context/yaml/handlers/organizations.ts"],"names":[],"mappings":";;;;;;;;;;;AAQA,SAAe,KAAK,CAAC,OAAoB;;QACvC,MAAM,EAAE,aAAa,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC;QAEzC,IAAI,CAAC,aAAa;YAAE,OAAO,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC;QAEnD,OAAO;YACL,aAAa;SACd,CAAC;IACJ,CAAC;CAAA;AAED,SAAe,IAAI,CAAC,OAAoB;;QACtC,MAAM,EAAE,aAAa,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC;QAEzC,IAAI,CAAC,aAAa;YAAE,OAAO,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC;QAEnD,OAAO;YACL,aAAa,EAAE,aAAa,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE;gBACvC,IAAI,GAAG,CAAC,WAAW,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;oBAC/B,GAAG,CAAC,WAAW,GAAG,GAAG,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE;wBAC1C,iCAAiC;wBACjC,MAAM,IAAI,GAAG,CAAC,CAAC,UAAU,IAAI,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC;wBAC/C,OAAO,CAAC,CAAC,aAAa,CAAC;wBACvB,OAAO,CAAC,CAAC,UAAU,CAAC;wBAEpB,uBACE,IAAI,IACD,CAAC,EACJ;oBACJ,CAAC,CAAC,CAAC;gBACL,CAAC;gBACD,IAAI,GAAG,CAAC,iBAAiB,IAAI,GAAG,CAAC,iBAAiB,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;oBAC9D,GAAG,CAAC,iBAAiB,GAAG,GAAG,CAAC,iBAAiB,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE;wBACvD,2CAA2C;wBAC3C,OAAO,EAAE,CAAC,EAAE,CAAC;wBAEb,yBACK,EAAE,EACL;oBACJ,CAAC,CAAC,CAAC;gBACL,CAAC;gBAED,OAAO,GAAG,CAAC;YACb,CAAC,CAAC;SACH,CAAC;IACJ,CAAC;CAAA;AAED,MAAM,oBAAoB,GAAqC;IAC7D,KAAK;IACL,IAAI;CACL,CAAC;AAEF,kBAAe,oBAAoB,CAAC"}
@@ -1,4 +1,13 @@
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
+ };
2
11
  var __importDefault = (this && this.__importDefault) || function (mod) {
3
12
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
13
  };
@@ -6,43 +15,42 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
15
  const path_1 = __importDefault(require("path"));
7
16
  const fs_extra_1 = __importDefault(require("fs-extra"));
8
17
  const logger_1 = __importDefault(require("../../../logger"));
9
- async function parse(context) {
10
- // Load the HTML file for each page
11
- const { pages } = context.assets;
12
- if (!pages)
13
- return { pages: null };
14
- return {
15
- pages: [
16
- ...pages.map((page) => ({
17
- ...page,
18
- html: page.html ? context.loadFile(page.html) : '',
19
- })),
20
- ],
21
- };
22
- }
23
- async function dump(context) {
24
- let pages = context.assets.pages;
25
- if (!pages) {
26
- return { pages: null };
27
- }
28
- const pagesFolder = path_1.default.join(context.basePath, 'pages');
29
- fs_extra_1.default.ensureDirSync(pagesFolder);
30
- pages = pages.map((page) => {
31
- if (page.html === undefined) {
32
- return page;
33
- }
34
- const htmlFile = path_1.default.join(pagesFolder, `${page.name}.html`);
35
- logger_1.default.info(`Writing ${htmlFile}`);
36
- fs_extra_1.default.writeFileSync(htmlFile, page.html);
18
+ function parse(context) {
19
+ return __awaiter(this, void 0, void 0, function* () {
20
+ // Load the HTML file for each page
21
+ const { pages } = context.assets;
22
+ if (!pages)
23
+ return { pages: null };
37
24
  return {
38
- ...page,
39
- html: `./pages/${page.name}.html`,
25
+ pages: [
26
+ ...pages.map((page) => (Object.assign(Object.assign({}, page), { html: page.html ? context.loadFile(page.html) : '' }))),
27
+ ],
40
28
  };
41
29
  });
42
- return { pages };
30
+ }
31
+ function dump(context) {
32
+ return __awaiter(this, void 0, void 0, function* () {
33
+ let pages = context.assets.pages;
34
+ if (!pages) {
35
+ return { pages: null };
36
+ }
37
+ const pagesFolder = path_1.default.join(context.basePath, 'pages');
38
+ fs_extra_1.default.ensureDirSync(pagesFolder);
39
+ pages = pages.map((page) => {
40
+ if (page.html === undefined) {
41
+ return page;
42
+ }
43
+ const htmlFile = path_1.default.join(pagesFolder, `${page.name}.html`);
44
+ logger_1.default.info(`Writing ${htmlFile}`);
45
+ fs_extra_1.default.writeFileSync(htmlFile, page.html);
46
+ return Object.assign(Object.assign({}, page), { html: `./pages/${page.name}.html` });
47
+ });
48
+ return { pages };
49
+ });
43
50
  }
44
51
  const pagesHandler = {
45
52
  parse,
46
53
  dump,
47
54
  };
48
55
  exports.default = pagesHandler;
56
+ //# sourceMappingURL=pages.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pages.js","sourceRoot":"","sources":["../../../../src/context/yaml/handlers/pages.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,gDAAwB;AACxB,wDAA0B;AAE1B,6DAAkC;AAQlC,SAAe,KAAK,CAAC,OAAoB;;QACvC,mCAAmC;QACnC,MAAM,EAAE,KAAK,EAAE,GAAG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,CAAC;IACnB,CAAC;CAAA;AAED,MAAM,YAAY,GAA6B;IAC7C,KAAK;IACL,IAAI;CACL,CAAC;AAEF,kBAAe,YAAY,CAAC"}
@@ -1,28 +1,42 @@
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
+ };
2
11
  Object.defineProperty(exports, "__esModule", { value: true });
3
12
  const defaults_1 = require("../../defaults");
4
- async function parse(context) {
5
- const { phoneProviders } = context.assets;
6
- if (!phoneProviders)
7
- return { phoneProviders: null };
8
- return {
9
- phoneProviders,
10
- };
13
+ function parse(context) {
14
+ return __awaiter(this, void 0, void 0, function* () {
15
+ const { phoneProviders } = context.assets;
16
+ if (!phoneProviders)
17
+ return { phoneProviders: null };
18
+ return {
19
+ phoneProviders,
20
+ };
21
+ });
11
22
  }
12
- async function dump(context) {
13
- if (!context.assets.phoneProviders)
14
- return { phoneProviders: null };
15
- let { phoneProviders } = context.assets;
16
- phoneProviders = phoneProviders.map((provider) => {
17
- provider = (0, defaults_1.phoneProviderDefaults)(provider);
18
- return provider;
23
+ function dump(context) {
24
+ return __awaiter(this, void 0, void 0, function* () {
25
+ if (!context.assets.phoneProviders)
26
+ return { phoneProviders: null };
27
+ let { phoneProviders } = context.assets;
28
+ phoneProviders = phoneProviders.map((provider) => {
29
+ provider = (0, defaults_1.phoneProviderDefaults)(provider);
30
+ return provider;
31
+ });
32
+ return {
33
+ phoneProviders,
34
+ };
19
35
  });
20
- return {
21
- phoneProviders,
22
- };
23
36
  }
24
37
  const phoneProviderHandler = {
25
38
  parse,
26
39
  dump,
27
40
  };
28
41
  exports.default = phoneProviderHandler;
42
+ //# sourceMappingURL=phoneProvider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"phoneProvider.js","sourceRoot":"","sources":["../../../../src/context/yaml/handlers/phoneProvider.ts"],"names":[],"mappings":";;;;;;;;;;;AAIA,6CAAuD;AAIvD,SAAe,KAAK,CAAC,OAAoB;;QACvC,MAAM,EAAE,cAAc,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC;QAE1C,IAAI,CAAC,cAAc;YAAE,OAAO,EAAE,cAAc,EAAE,IAAI,EAAE,CAAC;QAErD,OAAO;YACL,cAAc;SACf,CAAC;IACJ,CAAC;CAAA;AAED,SAAe,IAAI,CAAC,OAAoB;;QACtC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,cAAc;YAAE,OAAO,EAAE,cAAc,EAAE,IAAI,EAAE,CAAC;QAEpE,IAAI,EAAE,cAAc,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC;QAExC,cAAc,GAAG,cAAc,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE;YAC/C,QAAQ,GAAG,IAAA,gCAAqB,EAAC,QAAQ,CAAC,CAAC;YAC3C,OAAO,QAAQ,CAAC;QAClB,CAAC,CAAC,CAAC;QAEH,OAAO;YACL,cAAc;SACf,CAAC;IACJ,CAAC;CAAA;AAED,MAAM,oBAAoB,GAAsC;IAC9D,KAAK;IACL,IAAI;CACL,CAAC;AAEF,kBAAe,oBAAoB,CAAC"}
@@ -1,4 +1,24 @@
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
+ var __rest = (this && this.__rest) || function (s, e) {
12
+ var t = {};
13
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
14
+ t[p] = s[p];
15
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
16
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
17
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
18
+ t[p[i]] = s[p[i]];
19
+ }
20
+ return t;
21
+ };
2
22
  var __importDefault = (this && this.__importDefault) || function (mod) {
3
23
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
24
  };
@@ -34,17 +54,19 @@ const loadScreenRenderers = (context, screenRenderArray) => {
34
54
  });
35
55
  return loadedRenderers;
36
56
  };
37
- async function parse(context) {
38
- const { prompts } = context.assets;
39
- if (!prompts)
40
- return { prompts: null };
41
- if (prompts.screenRenderers && prompts.screenRenderers.length > 0) {
42
- const screenRendersYAML = prompts.screenRenderers;
43
- prompts.screenRenderers = loadScreenRenderers(context, screenRendersYAML);
44
- }
45
- return {
46
- prompts,
47
- };
57
+ function parse(context) {
58
+ return __awaiter(this, void 0, void 0, function* () {
59
+ const { prompts } = context.assets;
60
+ if (!prompts)
61
+ return { prompts: null };
62
+ if (prompts.screenRenderers && prompts.screenRenderers.length > 0) {
63
+ const screenRendersYAML = prompts.screenRenderers;
64
+ prompts.screenRenderers = loadScreenRenderers(context, screenRendersYAML);
65
+ }
66
+ return {
67
+ prompts,
68
+ };
69
+ });
48
70
  }
49
71
  const dumpScreenRenderers = (context, screenRenderers) => {
50
72
  const screenRenderArray = [];
@@ -54,7 +76,7 @@ const dumpScreenRenderers = (context, screenRenderers) => {
54
76
  const renderSettingsDir = path_1.default.join(promptsDirectory, tools_1.constants.PROMPTS_SCREEN_RENDER_DIRECTORY);
55
77
  (0, fs_extra_1.ensureDirSync)(renderSettingsDir);
56
78
  screenRenderers.forEach((renderer) => {
57
- const { tenant, ...screenRendererConfig } = renderer;
79
+ const { tenant } = renderer, screenRendererConfig = __rest(renderer, ["tenant"]);
58
80
  if (!renderer.prompt || !renderer.screen) {
59
81
  logger_1.default.error('Invalid screen renderer:', renderer);
60
82
  return;
@@ -76,19 +98,22 @@ const dumpScreenRenderers = (context, screenRenderers) => {
76
98
  });
77
99
  return screenRenderArray;
78
100
  };
79
- async function dump(context) {
80
- const { prompts } = context.assets;
81
- if (!prompts)
82
- return { prompts: null };
83
- if (prompts.screenRenderers && prompts.screenRenderers.length > 0) {
84
- prompts.screenRenderers = dumpScreenRenderers(context, prompts.screenRenderers);
85
- }
86
- return {
87
- prompts,
88
- };
101
+ function dump(context) {
102
+ return __awaiter(this, void 0, void 0, function* () {
103
+ const { prompts } = context.assets;
104
+ if (!prompts)
105
+ return { prompts: null };
106
+ if (prompts.screenRenderers && prompts.screenRenderers.length > 0) {
107
+ prompts.screenRenderers = dumpScreenRenderers(context, prompts.screenRenderers);
108
+ }
109
+ return {
110
+ prompts,
111
+ };
112
+ });
89
113
  }
90
114
  const promptsHandler = {
91
115
  parse,
92
116
  dump,
93
117
  };
94
118
  exports.default = promptsHandler;
119
+ //# sourceMappingURL=prompts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prompts.js","sourceRoot":"","sources":["../../../../src/context/yaml/handlers/prompts.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gDAAwB;AACxB,uCAAwD;AAIxD,0CAA2C;AAG3C,0CAA0C;AAC1C,6DAAkC;AAUlC,MAAM,mBAAmB,GAAG,CAAC,QAAgB,EAAE,EAAE,CAAC,cAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,iBAAS,CAAC,iBAAiB,CAAC,CAAC;AAEnG,MAAM,mBAAmB,GAAG,CAC1B,OAAoB,EACpB,iBAAmC,EAC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AAE,CAAC,CAAC,CAAC,CAAC;QAEvE,gEAAgE;QAChE,IAAI,WAAW,GAAG,iBAAiB,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAgB,CAAC,CAAC,CAAC;QAEtF,IAAI,CAAC,WAAW,EAAE,CAAC;YACjB,uDAAuD;YACvD,WAAW,GAAG,EAAE,CAAC,QAAQ,CAAC,MAAgB,CAAC,EAAE,EAAE,EAAE,CAAC;YAClD,iBAAiB,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QACtC,CAAC;QAED,iCAAiC;QACjC,WAAW,CAAC,QAAQ,CAAC,MAAgB,CAAC,CACpC,QAAQ,CAAC,MAAgB,CAC1B,GAAG,aAAa,iBAAS,CAAC,+BAA+B,IAAI,QAAQ,EAAE,CAAC;IAC3E,CAAC,CAAC,CAAC;IAEH,OAAO,iBAAiB,CAAC;AAC3B,CAAC,CAAC;AAEF,SAAe,IAAI,CAAC,OAAoB;;QACtC,MAAM,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC;QAEnC,IAAI,CAAC,OAAO;YAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;QAEvC,IAAI,OAAO,CAAC,eAAe,IAAI,OAAO,CAAC,eAAe,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAClE,OAAO,CAAC,eAAe,GAAG,mBAAmB,CAAC,OAAO,EAAE,OAAO,CAAC,eAAe,CAAC,CAAC;QAClF,CAAC;QAED,OAAO;YACL,OAAO;SACR,CAAC;IACJ,CAAC;CAAA;AAED,MAAM,cAAc,GAA+B;IACjD,KAAK;IACL,IAAI;CACL,CAAC;AAEF,kBAAe,cAAc,CAAC"}
@@ -1,6 +1,6 @@
1
+ import { ResourceServer } from 'auth0';
1
2
  import { YAMLHandler } from '.';
2
3
  import { ParsedAsset } from '../../../types';
3
- import { ResourceServer } from '../../../tools/auth0/handlers/resourceServers';
4
4
  type ParsedResourceServers = ParsedAsset<'resourceServers', ResourceServer[]>;
5
5
  declare const resourceServersHandler: YAMLHandler<ParsedResourceServers>;
6
6
  export default resourceServersHandler;
@@ -1,31 +1,43 @@
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
+ };
2
11
  Object.defineProperty(exports, "__esModule", { value: true });
3
12
  const client_1 = require("../../../tools/auth0/client");
4
13
  const utils_1 = require("../../../utils");
5
- async function dumpAndParse(context) {
6
- const { resourceServers } = context.assets;
7
- let { clients } = context.assets;
8
- if (!resourceServers) {
9
- return { resourceServers: null };
10
- }
11
- if (clients === undefined) {
12
- clients = await (0, client_1.paginate)(context.mgmtClient.clients.list, {
13
- paginate: true,
14
- include_totals: true,
15
- });
16
- }
17
- return {
18
- resourceServers: resourceServers.map((rs) => {
19
- const dumpResourceServer = { ...rs };
20
- if (dumpResourceServer.client_id) {
21
- dumpResourceServer.client_id = (0, utils_1.convertClientIdToName)(dumpResourceServer.client_id, clients || []);
22
- }
23
- return dumpResourceServer;
24
- }),
25
- };
14
+ function dumpAndParse(context) {
15
+ return __awaiter(this, void 0, void 0, function* () {
16
+ const { resourceServers } = context.assets;
17
+ let { clients } = context.assets;
18
+ if (!resourceServers) {
19
+ return { resourceServers: null };
20
+ }
21
+ if (clients === undefined) {
22
+ clients = yield (0, client_1.paginate)(context.mgmtClient.clients.getAll, {
23
+ paginate: true,
24
+ include_totals: true,
25
+ });
26
+ }
27
+ return {
28
+ resourceServers: resourceServers.map((rs) => {
29
+ const dumpResourceServer = Object.assign({}, rs);
30
+ if (dumpResourceServer.client_id) {
31
+ dumpResourceServer.client_id = (0, utils_1.convertClientIdToName)(dumpResourceServer.client_id, clients || []);
32
+ }
33
+ return dumpResourceServer;
34
+ }),
35
+ };
36
+ });
26
37
  }
27
38
  const resourceServersHandler = {
28
39
  parse: dumpAndParse,
29
40
  dump: dumpAndParse,
30
41
  };
31
42
  exports.default = resourceServersHandler;
43
+ //# sourceMappingURL=resourceServers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resourceServers.js","sourceRoot":"","sources":["../../../../src/context/yaml/handlers/resourceServers.ts"],"names":[],"mappings":";;;;;;;;;;;AAIA,wDAAuD;AACvD,0CAAuD;AAIvD,SAAe,YAAY,CAAC,OAAoB;;QAC9C,MAAM,EAAE,eAAe,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC;QAC3C,IAAI,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC;QAEjC,IAAI,CAAC,eAAe,EAAE,CAAC;YACrB,OAAO,EAAE,eAAe,EAAE,IAAI,EAAE,CAAC;QACnC,CAAC;QAED,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;YAC1B,OAAO,GAAG,MAAM,IAAA,iBAAQ,EAAS,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,MAAM,EAAE;gBAClE,QAAQ,EAAE,IAAI;gBACd,cAAc,EAAE,IAAI;aACrB,CAAC,CAAC;QACL,CAAC;QAED,OAAO;YACL,eAAe,EAAE,eAAe,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE;gBAC1C,MAAM,kBAAkB,qBAAQ,EAAE,CAAE,CAAC;gBACrC,IAAI,kBAAkB,CAAC,SAAS,EAAE,CAAC;oBACjC,kBAAkB,CAAC,SAAS,GAAG,IAAA,6BAAqB,EAClD,kBAAkB,CAAC,SAAS,EAC5B,OAAO,IAAI,EAAE,CACd,CAAC;gBACJ,CAAC;gBACD,OAAO,kBAAkB,CAAC;YAC5B,CAAC,CAAC;SACH,CAAC;IACJ,CAAC;CAAA;AAED,MAAM,sBAAsB,GAAuC;IACjE,KAAK,EAAE,YAAY;IACnB,IAAI,EAAE,YAAY;CACnB,CAAC;AAEF,kBAAe,sBAAsB,CAAC"}
@@ -1,28 +1,42 @@
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
+ };
2
11
  Object.defineProperty(exports, "__esModule", { value: true });
3
- async function parse(context) {
4
- const { roles } = context.assets;
5
- if (!roles)
6
- return { roles: null };
7
- return {
8
- roles,
9
- };
12
+ function parse(context) {
13
+ return __awaiter(this, void 0, void 0, function* () {
14
+ const { roles } = context.assets;
15
+ if (!roles)
16
+ return { roles: null };
17
+ return {
18
+ roles,
19
+ };
20
+ });
10
21
  }
11
- async function dump(context) {
12
- const { roles } = context.assets;
13
- if (!roles)
14
- return { roles: null };
15
- return {
16
- roles: roles.map((role) => {
17
- if (role.description === null) {
18
- delete role.description;
19
- }
20
- return role;
21
- }),
22
- };
22
+ function dump(context) {
23
+ return __awaiter(this, void 0, void 0, function* () {
24
+ const { roles } = context.assets;
25
+ if (!roles)
26
+ return { roles: null };
27
+ return {
28
+ roles: roles.map((role) => {
29
+ if (role.description === null) {
30
+ delete role.description;
31
+ }
32
+ return role;
33
+ }),
34
+ };
35
+ });
23
36
  }
24
37
  const rolesHandler = {
25
38
  parse,
26
39
  dump,
27
40
  };
28
41
  exports.default = rolesHandler;
42
+ //# sourceMappingURL=roles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"roles.js","sourceRoot":"","sources":["../../../../src/context/yaml/handlers/roles.ts"],"names":[],"mappings":";;;;;;;;;;;AAMA,SAAe,KAAK,CAAC,OAAoB;;QACvC,MAAM,EAAE,KAAK,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC;QAEjC,IAAI,CAAC,KAAK;YAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;QAEnC,OAAO;YACL,KAAK;SACN,CAAC;IACJ,CAAC;CAAA;AAED,SAAe,IAAI,CAAC,OAAoB;;QACtC,MAAM,EAAE,KAAK,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC;QAEjC,IAAI,CAAC,KAAK;YAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;QAEnC,OAAO;YACL,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;gBACxB,IAAI,IAAI,CAAC,WAAW,KAAK,IAAI,EAAE,CAAC;oBAC9B,OAAO,IAAI,CAAC,WAAW,CAAC;gBAC1B,CAAC;gBAED,OAAO,IAAI,CAAC;YACd,CAAC,CAAC;SACH,CAAC;IACJ,CAAC;CAAA;AAED,MAAM,YAAY,GAA6B;IAC7C,KAAK;IACL,IAAI;CACL,CAAC;AAEF,kBAAe,YAAY,CAAC"}