@atlasauth/cli 0.23.0 → 0.25.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 (527) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/package.json +3 -3
  3. package/dist/args.d.ts +0 -601
  4. package/dist/args.js +0 -289
  5. package/dist/args.js.map +0 -1
  6. package/dist/cli.d.ts +0 -2
  7. package/dist/cli.js +0 -19
  8. package/dist/cli.js.map +0 -1
  9. package/dist/commands/actions-gallery.d.ts +0 -8
  10. package/dist/commands/actions-gallery.js +0 -197
  11. package/dist/commands/actions-gallery.js.map +0 -1
  12. package/dist/commands/actions.d.ts +0 -13
  13. package/dist/commands/actions.js +0 -135
  14. package/dist/commands/actions.js.map +0 -1
  15. package/dist/commands/admin.d.ts +0 -49
  16. package/dist/commands/admin.js +0 -353
  17. package/dist/commands/admin.js.map +0 -1
  18. package/dist/commands/api-keys.d.ts +0 -4
  19. package/dist/commands/api-keys.js +0 -96
  20. package/dist/commands/api-keys.js.map +0 -1
  21. package/dist/commands/auth.d.ts +0 -25
  22. package/dist/commands/auth.js +0 -102
  23. package/dist/commands/auth.js.map +0 -1
  24. package/dist/commands/config.d.ts +0 -90
  25. package/dist/commands/config.js +0 -1430
  26. package/dist/commands/config.js.map +0 -1
  27. package/dist/commands/csp.d.ts +0 -32
  28. package/dist/commands/csp.js +0 -180
  29. package/dist/commands/csp.js.map +0 -1
  30. package/dist/commands/dev.d.ts +0 -8
  31. package/dist/commands/dev.js +0 -84
  32. package/dist/commands/dev.js.map +0 -1
  33. package/dist/commands/fga.d.ts +0 -10
  34. package/dist/commands/fga.js +0 -146
  35. package/dist/commands/fga.js.map +0 -1
  36. package/dist/commands/golive.d.ts +0 -40
  37. package/dist/commands/golive.js +0 -285
  38. package/dist/commands/golive.js.map +0 -1
  39. package/dist/commands/id-accounts.d.ts +0 -13
  40. package/dist/commands/id-accounts.js +0 -195
  41. package/dist/commands/id-accounts.js.map +0 -1
  42. package/dist/commands/import-better-auth.d.ts +0 -3
  43. package/dist/commands/import-better-auth.js +0 -164
  44. package/dist/commands/import-better-auth.js.map +0 -1
  45. package/dist/commands/import.d.ts +0 -3
  46. package/dist/commands/import.js +0 -123
  47. package/dist/commands/import.js.map +0 -1
  48. package/dist/commands/info.d.ts +0 -75
  49. package/dist/commands/info.js +0 -362
  50. package/dist/commands/info.js.map +0 -1
  51. package/dist/commands/init.d.ts +0 -3
  52. package/dist/commands/init.js +0 -438
  53. package/dist/commands/init.js.map +0 -1
  54. package/dist/commands/integrations.d.ts +0 -8
  55. package/dist/commands/integrations.js +0 -112
  56. package/dist/commands/integrations.js.map +0 -1
  57. package/dist/commands/listen.d.ts +0 -17
  58. package/dist/commands/listen.js +0 -223
  59. package/dist/commands/listen.js.map +0 -1
  60. package/dist/commands/mcp.d.ts +0 -38
  61. package/dist/commands/mcp.js +0 -111
  62. package/dist/commands/mcp.js.map +0 -1
  63. package/dist/commands/migrate.d.ts +0 -16
  64. package/dist/commands/migrate.js +0 -114
  65. package/dist/commands/migrate.js.map +0 -1
  66. package/dist/commands/move-origin.d.ts +0 -11
  67. package/dist/commands/move-origin.js +0 -95
  68. package/dist/commands/move-origin.js.map +0 -1
  69. package/dist/commands/operator.d.ts +0 -18
  70. package/dist/commands/operator.js +0 -238
  71. package/dist/commands/operator.js.map +0 -1
  72. package/dist/commands/orgs.d.ts +0 -4
  73. package/dist/commands/orgs.js +0 -72
  74. package/dist/commands/orgs.js.map +0 -1
  75. package/dist/commands/pages.d.ts +0 -14
  76. package/dist/commands/pages.js +0 -113
  77. package/dist/commands/pages.js.map +0 -1
  78. package/dist/commands/partner-platforms.d.ts +0 -10
  79. package/dist/commands/partner-platforms.js +0 -157
  80. package/dist/commands/partner-platforms.js.map +0 -1
  81. package/dist/commands/project-commands.d.ts +0 -38
  82. package/dist/commands/project-commands.js +0 -361
  83. package/dist/commands/project-commands.js.map +0 -1
  84. package/dist/commands/referrals.d.ts +0 -69
  85. package/dist/commands/referrals.js +0 -1056
  86. package/dist/commands/referrals.js.map +0 -1
  87. package/dist/commands/resources.d.ts +0 -44
  88. package/dist/commands/resources.js +0 -234
  89. package/dist/commands/resources.js.map +0 -1
  90. package/dist/commands/sessions.d.ts +0 -4
  91. package/dist/commands/sessions.js +0 -28
  92. package/dist/commands/sessions.js.map +0 -1
  93. package/dist/commands/shared.d.ts +0 -38
  94. package/dist/commands/shared.js +0 -69
  95. package/dist/commands/shared.js.map +0 -1
  96. package/dist/commands/status.d.ts +0 -3
  97. package/dist/commands/status.js +0 -77
  98. package/dist/commands/status.js.map +0 -1
  99. package/dist/commands/users.d.ts +0 -4
  100. package/dist/commands/users.js +0 -100
  101. package/dist/commands/users.js.map +0 -1
  102. package/dist/commands/webhooks.d.ts +0 -34
  103. package/dist/commands/webhooks.js +0 -301
  104. package/dist/commands/webhooks.js.map +0 -1
  105. package/dist/config-http.d.ts +0 -29
  106. package/dist/config-http.js +0 -64
  107. package/dist/config-http.js.map +0 -1
  108. package/dist/config.d.ts +0 -64
  109. package/dist/config.js +0 -69
  110. package/dist/config.js.map +0 -1
  111. package/dist/context.d.ts +0 -72
  112. package/dist/context.js +0 -27
  113. package/dist/context.js.map +0 -1
  114. package/dist/errors.d.ts +0 -15
  115. package/dist/errors.js +0 -25
  116. package/dist/errors.js.map +0 -1
  117. package/dist/help.d.ts +0 -8
  118. package/dist/help.js +0 -868
  119. package/dist/help.js.map +0 -1
  120. package/dist/import/csv.d.ts +0 -6
  121. package/dist/import/csv.js +0 -63
  122. package/dist/import/csv.js.map +0 -1
  123. package/dist/import/vendors.d.ts +0 -57
  124. package/dist/import/vendors.js +0 -568
  125. package/dist/import/vendors.js.map +0 -1
  126. package/dist/index.d.ts +0 -32
  127. package/dist/index.js +0 -79
  128. package/dist/index.js.map +0 -1
  129. package/dist/io.d.ts +0 -21
  130. package/dist/io.js +0 -28
  131. package/dist/io.js.map +0 -1
  132. package/dist/migrate/appwrite/plugin.d.ts +0 -2
  133. package/dist/migrate/appwrite/plugin.js +0 -103
  134. package/dist/migrate/appwrite/plugin.js.map +0 -1
  135. package/dist/migrate/auth0/plugin.d.ts +0 -2
  136. package/dist/migrate/auth0/plugin.js +0 -126
  137. package/dist/migrate/auth0/plugin.js.map +0 -1
  138. package/dist/migrate/authentik/plugin.d.ts +0 -2
  139. package/dist/migrate/authentik/plugin.js +0 -135
  140. package/dist/migrate/authentik/plugin.js.map +0 -1
  141. package/dist/migrate/azure-ad-b2c/plugin.d.ts +0 -8
  142. package/dist/migrate/azure-ad-b2c/plugin.js +0 -165
  143. package/dist/migrate/azure-ad-b2c/plugin.js.map +0 -1
  144. package/dist/migrate/better-auth/integration.d.ts +0 -59
  145. package/dist/migrate/better-auth/integration.js +0 -81
  146. package/dist/migrate/better-auth/integration.js.map +0 -1
  147. package/dist/migrate/better-auth/orchestrator.d.ts +0 -43
  148. package/dist/migrate/better-auth/orchestrator.js +0 -525
  149. package/dist/migrate/better-auth/orchestrator.js.map +0 -1
  150. package/dist/migrate/better-auth/output.d.ts +0 -20
  151. package/dist/migrate/better-auth/output.js +0 -146
  152. package/dist/migrate/better-auth/output.js.map +0 -1
  153. package/dist/migrate/better-auth/translate.d.ts +0 -77
  154. package/dist/migrate/better-auth/translate.js +0 -1989
  155. package/dist/migrate/better-auth/translate.js.map +0 -1
  156. package/dist/migrate/clerk/plugin.d.ts +0 -2
  157. package/dist/migrate/clerk/plugin.js +0 -76
  158. package/dist/migrate/clerk/plugin.js.map +0 -1
  159. package/dist/migrate/cognito/plugin.d.ts +0 -5
  160. package/dist/migrate/cognito/plugin.js +0 -170
  161. package/dist/migrate/cognito/plugin.js.map +0 -1
  162. package/dist/migrate/corbado/plugin.d.ts +0 -2
  163. package/dist/migrate/corbado/plugin.js +0 -63
  164. package/dist/migrate/corbado/plugin.js.map +0 -1
  165. package/dist/migrate/descope/plugin.d.ts +0 -2
  166. package/dist/migrate/descope/plugin.js +0 -83
  167. package/dist/migrate/descope/plugin.js.map +0 -1
  168. package/dist/migrate/entra-external-id/plugin.d.ts +0 -8
  169. package/dist/migrate/entra-external-id/plugin.js +0 -12
  170. package/dist/migrate/entra-external-id/plugin.js.map +0 -1
  171. package/dist/migrate/export/appwrite-config.d.ts +0 -28
  172. package/dist/migrate/export/appwrite-config.js +0 -170
  173. package/dist/migrate/export/appwrite-config.js.map +0 -1
  174. package/dist/migrate/export/appwrite.d.ts +0 -51
  175. package/dist/migrate/export/appwrite.js +0 -288
  176. package/dist/migrate/export/appwrite.js.map +0 -1
  177. package/dist/migrate/export/auth0-config.d.ts +0 -29
  178. package/dist/migrate/export/auth0-config.js +0 -249
  179. package/dist/migrate/export/auth0-config.js.map +0 -1
  180. package/dist/migrate/export/auth0.d.ts +0 -62
  181. package/dist/migrate/export/auth0.js +0 -575
  182. package/dist/migrate/export/auth0.js.map +0 -1
  183. package/dist/migrate/export/authentik-config.d.ts +0 -45
  184. package/dist/migrate/export/authentik-config.js +0 -357
  185. package/dist/migrate/export/authentik-config.js.map +0 -1
  186. package/dist/migrate/export/authentik.d.ts +0 -110
  187. package/dist/migrate/export/authentik.js +0 -838
  188. package/dist/migrate/export/authentik.js.map +0 -1
  189. package/dist/migrate/export/azure-config.d.ts +0 -58
  190. package/dist/migrate/export/azure-config.js +0 -344
  191. package/dist/migrate/export/azure-config.js.map +0 -1
  192. package/dist/migrate/export/azure.d.ts +0 -85
  193. package/dist/migrate/export/azure.js +0 -373
  194. package/dist/migrate/export/azure.js.map +0 -1
  195. package/dist/migrate/export/clerk-config.d.ts +0 -26
  196. package/dist/migrate/export/clerk-config.js +0 -227
  197. package/dist/migrate/export/clerk-config.js.map +0 -1
  198. package/dist/migrate/export/clerk.d.ts +0 -46
  199. package/dist/migrate/export/clerk.js +0 -486
  200. package/dist/migrate/export/clerk.js.map +0 -1
  201. package/dist/migrate/export/cognito-config.d.ts +0 -25
  202. package/dist/migrate/export/cognito-config.js +0 -273
  203. package/dist/migrate/export/cognito-config.js.map +0 -1
  204. package/dist/migrate/export/cognito.d.ts +0 -103
  205. package/dist/migrate/export/cognito.js +0 -441
  206. package/dist/migrate/export/cognito.js.map +0 -1
  207. package/dist/migrate/export/corbado-config.d.ts +0 -20
  208. package/dist/migrate/export/corbado-config.js +0 -63
  209. package/dist/migrate/export/corbado-config.js.map +0 -1
  210. package/dist/migrate/export/corbado.d.ts +0 -37
  211. package/dist/migrate/export/corbado.js +0 -132
  212. package/dist/migrate/export/corbado.js.map +0 -1
  213. package/dist/migrate/export/descope.d.ts +0 -35
  214. package/dist/migrate/export/descope.js +0 -208
  215. package/dist/migrate/export/descope.js.map +0 -1
  216. package/dist/migrate/export/fake-vendor.test-helper.d.ts +0 -27
  217. package/dist/migrate/export/fake-vendor.test-helper.js +0 -41
  218. package/dist/migrate/export/fake-vendor.test-helper.js.map +0 -1
  219. package/dist/migrate/export/firebase-config.d.ts +0 -24
  220. package/dist/migrate/export/firebase-config.js +0 -215
  221. package/dist/migrate/export/firebase-config.js.map +0 -1
  222. package/dist/migrate/export/firebase.d.ts +0 -102
  223. package/dist/migrate/export/firebase.js +0 -464
  224. package/dist/migrate/export/firebase.js.map +0 -1
  225. package/dist/migrate/export/frameworks/app-users.d.ts +0 -42
  226. package/dist/migrate/export/frameworks/app-users.js +0 -161
  227. package/dist/migrate/export/frameworks/app-users.js.map +0 -1
  228. package/dist/migrate/export/frameworks/authjs.d.ts +0 -41
  229. package/dist/migrate/export/frameworks/authjs.js +0 -146
  230. package/dist/migrate/export/frameworks/authjs.js.map +0 -1
  231. package/dist/migrate/export/frameworks/devise.d.ts +0 -39
  232. package/dist/migrate/export/frameworks/devise.js +0 -218
  233. package/dist/migrate/export/frameworks/devise.js.map +0 -1
  234. package/dist/migrate/export/frameworks/django.d.ts +0 -45
  235. package/dist/migrate/export/frameworks/django.js +0 -315
  236. package/dist/migrate/export/frameworks/django.js.map +0 -1
  237. package/dist/migrate/export/frameworks/lucia.d.ts +0 -42
  238. package/dist/migrate/export/frameworks/lucia.js +0 -263
  239. package/dist/migrate/export/frameworks/lucia.js.map +0 -1
  240. package/dist/migrate/export/frameworks/tables.d.ts +0 -90
  241. package/dist/migrate/export/frameworks/tables.js +0 -325
  242. package/dist/migrate/export/frameworks/tables.js.map +0 -1
  243. package/dist/migrate/export/frameworks/webauthn.d.ts +0 -25
  244. package/dist/migrate/export/frameworks/webauthn.js +0 -130
  245. package/dist/migrate/export/frameworks/webauthn.js.map +0 -1
  246. package/dist/migrate/export/frontegg-config.d.ts +0 -29
  247. package/dist/migrate/export/frontegg-config.js +0 -238
  248. package/dist/migrate/export/frontegg-config.js.map +0 -1
  249. package/dist/migrate/export/frontegg.d.ts +0 -67
  250. package/dist/migrate/export/frontegg.js +0 -410
  251. package/dist/migrate/export/frontegg.js.map +0 -1
  252. package/dist/migrate/export/fusionauth-config.d.ts +0 -26
  253. package/dist/migrate/export/fusionauth-config.js +0 -226
  254. package/dist/migrate/export/fusionauth-config.js.map +0 -1
  255. package/dist/migrate/export/fusionauth.d.ts +0 -99
  256. package/dist/migrate/export/fusionauth.js +0 -642
  257. package/dist/migrate/export/fusionauth.js.map +0 -1
  258. package/dist/migrate/export/hanko-config.d.ts +0 -27
  259. package/dist/migrate/export/hanko-config.js +0 -265
  260. package/dist/migrate/export/hanko-config.js.map +0 -1
  261. package/dist/migrate/export/hanko.d.ts +0 -52
  262. package/dist/migrate/export/hanko.js +0 -605
  263. package/dist/migrate/export/hanko.js.map +0 -1
  264. package/dist/migrate/export/keycloak-config.d.ts +0 -19
  265. package/dist/migrate/export/keycloak-config.js +0 -219
  266. package/dist/migrate/export/keycloak-config.js.map +0 -1
  267. package/dist/migrate/export/keycloak.d.ts +0 -155
  268. package/dist/migrate/export/keycloak.js +0 -878
  269. package/dist/migrate/export/keycloak.js.map +0 -1
  270. package/dist/migrate/export/kinde-descope-config.d.ts +0 -38
  271. package/dist/migrate/export/kinde-descope-config.js +0 -172
  272. package/dist/migrate/export/kinde-descope-config.js.map +0 -1
  273. package/dist/migrate/export/kinde.d.ts +0 -57
  274. package/dist/migrate/export/kinde.js +0 -333
  275. package/dist/migrate/export/kinde.js.map +0 -1
  276. package/dist/migrate/export/ldap.d.ts +0 -53
  277. package/dist/migrate/export/ldap.js +0 -277
  278. package/dist/migrate/export/ldap.js.map +0 -1
  279. package/dist/migrate/export/logto-config.d.ts +0 -27
  280. package/dist/migrate/export/logto-config.js +0 -264
  281. package/dist/migrate/export/logto-config.js.map +0 -1
  282. package/dist/migrate/export/logto.d.ts +0 -150
  283. package/dist/migrate/export/logto.js +0 -809
  284. package/dist/migrate/export/logto.js.map +0 -1
  285. package/dist/migrate/export/magic-config.d.ts +0 -14
  286. package/dist/migrate/export/magic-config.js +0 -28
  287. package/dist/migrate/export/magic-config.js.map +0 -1
  288. package/dist/migrate/export/magic.d.ts +0 -31
  289. package/dist/migrate/export/magic.js +0 -93
  290. package/dist/migrate/export/magic.js.map +0 -1
  291. package/dist/migrate/export/mini-yaml.d.ts +0 -19
  292. package/dist/migrate/export/mini-yaml.js +0 -581
  293. package/dist/migrate/export/mini-yaml.js.map +0 -1
  294. package/dist/migrate/export/nhost-config.d.ts +0 -26
  295. package/dist/migrate/export/nhost-config.js +0 -360
  296. package/dist/migrate/export/nhost-config.js.map +0 -1
  297. package/dist/migrate/export/nhost.d.ts +0 -64
  298. package/dist/migrate/export/nhost.js +0 -304
  299. package/dist/migrate/export/nhost.js.map +0 -1
  300. package/dist/migrate/export/okta-config.d.ts +0 -30
  301. package/dist/migrate/export/okta-config.js +0 -205
  302. package/dist/migrate/export/okta-config.js.map +0 -1
  303. package/dist/migrate/export/okta.d.ts +0 -43
  304. package/dist/migrate/export/okta.js +0 -337
  305. package/dist/migrate/export/okta.js.map +0 -1
  306. package/dist/migrate/export/onelogin.d.ts +0 -22
  307. package/dist/migrate/export/onelogin.js +0 -123
  308. package/dist/migrate/export/onelogin.js.map +0 -1
  309. package/dist/migrate/export/ory-config.d.ts +0 -58
  310. package/dist/migrate/export/ory-config.js +0 -451
  311. package/dist/migrate/export/ory-config.js.map +0 -1
  312. package/dist/migrate/export/ory.d.ts +0 -81
  313. package/dist/migrate/export/ory.js +0 -555
  314. package/dist/migrate/export/ory.js.map +0 -1
  315. package/dist/migrate/export/password-detect.d.ts +0 -29
  316. package/dist/migrate/export/password-detect.js +0 -81
  317. package/dist/migrate/export/password-detect.js.map +0 -1
  318. package/dist/migrate/export/pingone.d.ts +0 -36
  319. package/dist/migrate/export/pingone.js +0 -218
  320. package/dist/migrate/export/pingone.js.map +0 -1
  321. package/dist/migrate/export/plugin-kit.d.ts +0 -25
  322. package/dist/migrate/export/plugin-kit.js +0 -82
  323. package/dist/migrate/export/plugin-kit.js.map +0 -1
  324. package/dist/migrate/export/pocketbase-config.d.ts +0 -28
  325. package/dist/migrate/export/pocketbase-config.js +0 -180
  326. package/dist/migrate/export/pocketbase-config.js.map +0 -1
  327. package/dist/migrate/export/pocketbase.d.ts +0 -52
  328. package/dist/migrate/export/pocketbase.js +0 -243
  329. package/dist/migrate/export/pocketbase.js.map +0 -1
  330. package/dist/migrate/export/project-files.d.ts +0 -15
  331. package/dist/migrate/export/project-files.js +0 -43
  332. package/dist/migrate/export/project-files.js.map +0 -1
  333. package/dist/migrate/export/propelauth-config.d.ts +0 -18
  334. package/dist/migrate/export/propelauth-config.js +0 -58
  335. package/dist/migrate/export/propelauth-config.js.map +0 -1
  336. package/dist/migrate/export/propelauth-harness.test-helper.d.ts +0 -62
  337. package/dist/migrate/export/propelauth-harness.test-helper.js +0 -109
  338. package/dist/migrate/export/propelauth-harness.test-helper.js.map +0 -1
  339. package/dist/migrate/export/propelauth.d.ts +0 -48
  340. package/dist/migrate/export/propelauth.js +0 -255
  341. package/dist/migrate/export/propelauth.js.map +0 -1
  342. package/dist/migrate/export/record-set.d.ts +0 -44
  343. package/dist/migrate/export/record-set.js +0 -98
  344. package/dist/migrate/export/record-set.js.map +0 -1
  345. package/dist/migrate/export/source-lines.d.ts +0 -17
  346. package/dist/migrate/export/source-lines.js +0 -43
  347. package/dist/migrate/export/source-lines.js.map +0 -1
  348. package/dist/migrate/export/sso-metadata.d.ts +0 -47
  349. package/dist/migrate/export/sso-metadata.js +0 -180
  350. package/dist/migrate/export/sso-metadata.js.map +0 -1
  351. package/dist/migrate/export/stytch-config.d.ts +0 -22
  352. package/dist/migrate/export/stytch-config.js +0 -102
  353. package/dist/migrate/export/stytch-config.js.map +0 -1
  354. package/dist/migrate/export/stytch.d.ts +0 -68
  355. package/dist/migrate/export/stytch.js +0 -510
  356. package/dist/migrate/export/stytch.js.map +0 -1
  357. package/dist/migrate/export/supabase-config.d.ts +0 -48
  358. package/dist/migrate/export/supabase-config.js +0 -408
  359. package/dist/migrate/export/supabase-config.js.map +0 -1
  360. package/dist/migrate/export/supabase.d.ts +0 -86
  361. package/dist/migrate/export/supabase.js +0 -524
  362. package/dist/migrate/export/supabase.js.map +0 -1
  363. package/dist/migrate/export/supertokens-config.d.ts +0 -20
  364. package/dist/migrate/export/supertokens-config.js +0 -150
  365. package/dist/migrate/export/supertokens-config.js.map +0 -1
  366. package/dist/migrate/export/supertokens.d.ts +0 -125
  367. package/dist/migrate/export/supertokens.js +0 -464
  368. package/dist/migrate/export/supertokens.js.map +0 -1
  369. package/dist/migrate/export/table.d.ts +0 -35
  370. package/dist/migrate/export/table.js +0 -248
  371. package/dist/migrate/export/table.js.map +0 -1
  372. package/dist/migrate/export/translate-kit.d.ts +0 -46
  373. package/dist/migrate/export/translate-kit.js +0 -148
  374. package/dist/migrate/export/translate-kit.js.map +0 -1
  375. package/dist/migrate/export/userfront-config.d.ts +0 -15
  376. package/dist/migrate/export/userfront-config.js +0 -49
  377. package/dist/migrate/export/userfront-config.js.map +0 -1
  378. package/dist/migrate/export/userfront.d.ts +0 -38
  379. package/dist/migrate/export/userfront.js +0 -189
  380. package/dist/migrate/export/userfront.js.map +0 -1
  381. package/dist/migrate/export/vendor-http.d.ts +0 -46
  382. package/dist/migrate/export/vendor-http.js +0 -138
  383. package/dist/migrate/export/vendor-http.js.map +0 -1
  384. package/dist/migrate/export/workos-config.d.ts +0 -23
  385. package/dist/migrate/export/workos-config.js +0 -125
  386. package/dist/migrate/export/workos-config.js.map +0 -1
  387. package/dist/migrate/export/workos.d.ts +0 -46
  388. package/dist/migrate/export/workos.js +0 -272
  389. package/dist/migrate/export/workos.js.map +0 -1
  390. package/dist/migrate/export/zip.d.ts +0 -8
  391. package/dist/migrate/export/zip.js +0 -66
  392. package/dist/migrate/export/zip.js.map +0 -1
  393. package/dist/migrate/export/zitadel-config.d.ts +0 -37
  394. package/dist/migrate/export/zitadel-config.js +0 -279
  395. package/dist/migrate/export/zitadel-config.js.map +0 -1
  396. package/dist/migrate/export/zitadel.d.ts +0 -82
  397. package/dist/migrate/export/zitadel.js +0 -447
  398. package/dist/migrate/export/zitadel.js.map +0 -1
  399. package/dist/migrate/firebase/plugin.d.ts +0 -2
  400. package/dist/migrate/firebase/plugin.js +0 -152
  401. package/dist/migrate/firebase/plugin.js.map +0 -1
  402. package/dist/migrate/framework/builtins.d.ts +0 -2
  403. package/dist/migrate/framework/builtins.js +0 -52
  404. package/dist/migrate/framework/builtins.js.map +0 -1
  405. package/dist/migrate/framework/commands.d.ts +0 -20
  406. package/dist/migrate/framework/commands.js +0 -58
  407. package/dist/migrate/framework/commands.js.map +0 -1
  408. package/dist/migrate/framework/custom.d.ts +0 -12
  409. package/dist/migrate/framework/custom.js +0 -96
  410. package/dist/migrate/framework/custom.js.map +0 -1
  411. package/dist/migrate/framework/orchestrator.d.ts +0 -113
  412. package/dist/migrate/framework/orchestrator.js +0 -532
  413. package/dist/migrate/framework/orchestrator.js.map +0 -1
  414. package/dist/migrate/framework/plugin.d.ts +0 -167
  415. package/dist/migrate/framework/plugin.js +0 -3
  416. package/dist/migrate/framework/plugin.js.map +0 -1
  417. package/dist/migrate/framework/registry.d.ts +0 -11
  418. package/dist/migrate/framework/registry.js +0 -44
  419. package/dist/migrate/framework/registry.js.map +0 -1
  420. package/dist/migrate/framework/report.d.ts +0 -17
  421. package/dist/migrate/framework/report.js +0 -103
  422. package/dist/migrate/framework/report.js.map +0 -1
  423. package/dist/migrate/frameworks/plugins.d.ts +0 -29
  424. package/dist/migrate/frameworks/plugins.js +0 -402
  425. package/dist/migrate/frameworks/plugins.js.map +0 -1
  426. package/dist/migrate/frameworks/report.d.ts +0 -92
  427. package/dist/migrate/frameworks/report.js +0 -207
  428. package/dist/migrate/frameworks/report.js.map +0 -1
  429. package/dist/migrate/frameworks/translate-js.d.ts +0 -5
  430. package/dist/migrate/frameworks/translate-js.js +0 -503
  431. package/dist/migrate/frameworks/translate-js.js.map +0 -1
  432. package/dist/migrate/frameworks/translate-rails-django.d.ts +0 -3
  433. package/dist/migrate/frameworks/translate-rails-django.js +0 -1391
  434. package/dist/migrate/frameworks/translate-rails-django.js.map +0 -1
  435. package/dist/migrate/frontegg/plugin.d.ts +0 -2
  436. package/dist/migrate/frontegg/plugin.js +0 -78
  437. package/dist/migrate/frontegg/plugin.js.map +0 -1
  438. package/dist/migrate/fusionauth/plugin.d.ts +0 -2
  439. package/dist/migrate/fusionauth/plugin.js +0 -109
  440. package/dist/migrate/fusionauth/plugin.js.map +0 -1
  441. package/dist/migrate/hanko/plugin.d.ts +0 -2
  442. package/dist/migrate/hanko/plugin.js +0 -100
  443. package/dist/migrate/hanko/plugin.js.map +0 -1
  444. package/dist/migrate/keycloak/plugin.d.ts +0 -2
  445. package/dist/migrate/keycloak/plugin.js +0 -148
  446. package/dist/migrate/keycloak/plugin.js.map +0 -1
  447. package/dist/migrate/kinde/plugin.d.ts +0 -2
  448. package/dist/migrate/kinde/plugin.js +0 -105
  449. package/dist/migrate/kinde/plugin.js.map +0 -1
  450. package/dist/migrate/ldap/plugin.d.ts +0 -2
  451. package/dist/migrate/ldap/plugin.js +0 -73
  452. package/dist/migrate/ldap/plugin.js.map +0 -1
  453. package/dist/migrate/logto/plugin.d.ts +0 -2
  454. package/dist/migrate/logto/plugin.js +0 -131
  455. package/dist/migrate/logto/plugin.js.map +0 -1
  456. package/dist/migrate/magic/plugin.d.ts +0 -2
  457. package/dist/migrate/magic/plugin.js +0 -56
  458. package/dist/migrate/magic/plugin.js.map +0 -1
  459. package/dist/migrate/nhost/plugin.d.ts +0 -2
  460. package/dist/migrate/nhost/plugin.js +0 -115
  461. package/dist/migrate/nhost/plugin.js.map +0 -1
  462. package/dist/migrate/oidc/plugin.d.ts +0 -2
  463. package/dist/migrate/oidc/plugin.js +0 -73
  464. package/dist/migrate/oidc/plugin.js.map +0 -1
  465. package/dist/migrate/okta/plugin.d.ts +0 -2
  466. package/dist/migrate/okta/plugin.js +0 -105
  467. package/dist/migrate/okta/plugin.js.map +0 -1
  468. package/dist/migrate/onelogin/plugin.d.ts +0 -2
  469. package/dist/migrate/onelogin/plugin.js +0 -61
  470. package/dist/migrate/onelogin/plugin.js.map +0 -1
  471. package/dist/migrate/ory/plugin.d.ts +0 -2
  472. package/dist/migrate/ory/plugin.js +0 -186
  473. package/dist/migrate/ory/plugin.js.map +0 -1
  474. package/dist/migrate/ping-identity/plugin.d.ts +0 -2
  475. package/dist/migrate/ping-identity/plugin.js +0 -100
  476. package/dist/migrate/ping-identity/plugin.js.map +0 -1
  477. package/dist/migrate/pocketbase/plugin.d.ts +0 -2
  478. package/dist/migrate/pocketbase/plugin.js +0 -99
  479. package/dist/migrate/pocketbase/plugin.js.map +0 -1
  480. package/dist/migrate/propelauth/plugin.d.ts +0 -2
  481. package/dist/migrate/propelauth/plugin.js +0 -65
  482. package/dist/migrate/propelauth/plugin.js.map +0 -1
  483. package/dist/migrate/saml/plugin.d.ts +0 -2
  484. package/dist/migrate/saml/plugin.js +0 -79
  485. package/dist/migrate/saml/plugin.js.map +0 -1
  486. package/dist/migrate/stytch/plugin.d.ts +0 -2
  487. package/dist/migrate/stytch/plugin.js +0 -97
  488. package/dist/migrate/stytch/plugin.js.map +0 -1
  489. package/dist/migrate/supabase/plugin.d.ts +0 -2
  490. package/dist/migrate/supabase/plugin.js +0 -149
  491. package/dist/migrate/supabase/plugin.js.map +0 -1
  492. package/dist/migrate/supertokens/plugin.d.ts +0 -2
  493. package/dist/migrate/supertokens/plugin.js +0 -114
  494. package/dist/migrate/supertokens/plugin.js.map +0 -1
  495. package/dist/migrate/user-table/plugin.d.ts +0 -2
  496. package/dist/migrate/user-table/plugin.js +0 -62
  497. package/dist/migrate/user-table/plugin.js.map +0 -1
  498. package/dist/migrate/userfront/plugin.d.ts +0 -2
  499. package/dist/migrate/userfront/plugin.js +0 -60
  500. package/dist/migrate/userfront/plugin.js.map +0 -1
  501. package/dist/migrate/workos/plugin.d.ts +0 -2
  502. package/dist/migrate/workos/plugin.js +0 -81
  503. package/dist/migrate/workos/plugin.js.map +0 -1
  504. package/dist/migrate/zitadel/plugin.d.ts +0 -2
  505. package/dist/migrate/zitadel/plugin.js +0 -114
  506. package/dist/migrate/zitadel/plugin.js.map +0 -1
  507. package/dist/output.d.ts +0 -41
  508. package/dist/output.js +0 -72
  509. package/dist/output.js.map +0 -1
  510. package/dist/project.d.ts +0 -64
  511. package/dist/project.js +0 -86
  512. package/dist/project.js.map +0 -1
  513. package/dist/prompt.d.ts +0 -15
  514. package/dist/prompt.js +0 -46
  515. package/dist/prompt.js.map +0 -1
  516. package/dist/run.d.ts +0 -12
  517. package/dist/run.js +0 -157
  518. package/dist/run.js.map +0 -1
  519. package/dist/secrets.d.ts +0 -41
  520. package/dist/secrets.js +0 -142
  521. package/dist/secrets.js.map +0 -1
  522. package/dist/serialize.d.ts +0 -30
  523. package/dist/serialize.js +0 -131
  524. package/dist/serialize.js.map +0 -1
  525. package/dist/version.d.ts +0 -7
  526. package/dist/version.js +0 -21
  527. package/dist/version.js.map +0 -1
@@ -1,189 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.checkTenantId = checkTenantId;
4
- exports.userfrontHttp = userfrontHttp;
5
- exports.exportUserfront = exportUserfront;
6
- exports.mapUserfrontUser = mapUserfrontUser;
7
- const record_set_1 = require("./record-set");
8
- const translate_kit_1 = require("./translate-kit");
9
- const vendor_http_1 = require("./vendor-http");
10
- const API = 'https://api.userfront.com/v0';
11
- const MAX_PAGES = 100_000;
12
- /** First-factor strategies that are not a social login. */
13
- const NON_SOCIAL = new Set(['password', 'link', 'verificationCode', 'totp', 'sso', 'saml', 'passkey', 'webauthn', 'email', 'phone']);
14
- function checkTenantId(tenantId) {
15
- const t = tenantId.trim();
16
- if (!/^[A-Za-z0-9]{4,16}$/.test(t))
17
- throw new Error(`Not a Userfront tenant id: ${tenantId}`);
18
- return t;
19
- }
20
- function userfrontHttp(o) {
21
- return new vendor_http_1.VendorHttp({
22
- vendor: 'Userfront',
23
- baseUrl: (o.apiBase ?? API).replace(/\/+$/, ''),
24
- headers: { authorization: `Bearer ${o.apiKey}` },
25
- fetchImpl: o.fetchImpl,
26
- sleep: o.sleep,
27
- });
28
- }
29
- async function exportUserfront(opts) {
30
- const set = new record_set_1.RecordSet();
31
- const tid = checkTenantId(opts.tenantId);
32
- if (!/^uf_(test|live)_admin_/.test(opts.apiKey))
33
- throw new Error('Userfront export needs an admin API key (uf_live_admin_… or uf_test_admin_…).');
34
- const progress = opts.onProgress ?? (() => undefined);
35
- const http = userfrontHttp(opts);
36
- progress('organizations');
37
- const orgIds = new Set();
38
- await walk(async (page) => (await http.get(`/tenants/${tid}/tenants?page=${page}`)).body, (body) => (0, record_set_1.objs)(body?.results).concat((0, record_set_1.objs)(body?.tenants)), (body) => {
39
- const n = body?.totalPages;
40
- return typeof n === 'number' ? n : undefined;
41
- }, (t) => {
42
- const id = (0, record_set_1.str)(t.tenantId);
43
- if (!id || id === tid || orgIds.has(id))
44
- return false;
45
- orgIds.add(id);
46
- set.add('organization', (0, record_set_1.compact)({ id, name: (0, record_set_1.str)(t.name) ?? id, image_url: (0, record_set_1.str)(t.image), public_metadata: (0, record_set_1.bag)(t.data), created_at: (0, record_set_1.str)(t.createdAt) }), id);
47
- return true;
48
- });
49
- progress('roles');
50
- const roleNames = new Set();
51
- const rolesBody = await optional(async () => (await http.get(`/tenants/${tid}/roles`)).body);
52
- for (const r of (0, record_set_1.objs)(rolesBody?.roles)) {
53
- const name = (0, record_set_1.str)(r.name);
54
- if (name)
55
- roleNames.add(name);
56
- }
57
- progress('users');
58
- const seen = new Set();
59
- let unknownOrgs = 0;
60
- let mfa = 0;
61
- let passkeys = 0;
62
- let social = 0;
63
- await walk((page) => findUsers(http, tid, page), (body) => (0, record_set_1.objs)(body?.results), (body) => {
64
- const meta = body?.meta;
65
- return (0, record_set_1.isObj)(meta) && typeof meta.totalPages === 'number' ? meta.totalPages : undefined;
66
- }, (u) => {
67
- const rawId = (0, record_set_1.str)(u.userId);
68
- if (rawId && seen.has(rawId))
69
- return false;
70
- if (rawId)
71
- seen.add(rawId);
72
- const user = mapUserfrontUser(u, tid);
73
- if (!user) {
74
- set.omit('user', 'no email, phone number or username');
75
- return true;
76
- }
77
- const authz = (0, record_set_1.isObj)(u.authorization) ? u.authorization : {};
78
- const mine = authz[tid];
79
- const own = (0, record_set_1.isObj)(mine) ? (0, record_set_1.strs)(mine.roles) : [];
80
- if (own.length)
81
- user.roles = own.map(translate_kit_1.keyOf);
82
- for (const n of own)
83
- roleNames.add(n);
84
- set.add('user', user, user.id);
85
- for (const [orgId, raw] of Object.entries(authz)) {
86
- if (orgId === tid || !(0, record_set_1.isObj)(raw))
87
- continue;
88
- if (!orgIds.has(orgId)) {
89
- unknownOrgs++;
90
- continue;
91
- }
92
- const roles = (0, record_set_1.strs)(raw.roles).map(translate_kit_1.keyOf);
93
- set.add('membership', { organization_id: orgId, user_id: user.id, role: roles[0] ?? 'member' }, `${orgId}:${user.id}`);
94
- for (const r of (0, record_set_1.strs)(raw.roles))
95
- roleNames.add(r);
96
- if (roles.length > 1)
97
- set.warn('Some organization members hold several Userfront roles; Atlas seats each member with one role (the first).');
98
- }
99
- const auth = (0, record_set_1.isObj)(u.authentication) ? u.authentication : {};
100
- if (u.isMfaRequired === true || (0, record_set_1.objs)(auth.secondFactors).length > 0)
101
- mfa++;
102
- for (const f of (0, record_set_1.objs)(auth.firstFactors)) {
103
- const strategy = (0, record_set_1.str)(f.strategy);
104
- if (strategy && /passkey|webauthn/i.test(strategy))
105
- passkeys++;
106
- else if (strategy && !NON_SOCIAL.has(strategy))
107
- social++;
108
- }
109
- return true;
110
- });
111
- if (unknownOrgs > 0) {
112
- set.warn(`${unknownOrgs} organization grant(s) name a tenant that is not in the organization listing; those memberships were left out.`);
113
- }
114
- if (mfa > 0)
115
- set.omit('mfa_factor', 'Userfront does not export second-factor secrets; members enrol again in Atlas', mfa);
116
- if (passkeys > 0)
117
- set.omit('passkey', 'Userfront does not export passkey public keys; register again in Atlas', passkeys);
118
- if (social > 0)
119
- set.omit('identity', "Userfront does not export social accounts' provider user ids: they relink by verified email on first social sign-in", social);
120
- if (set.count('user') > 0) {
121
- set.warn('Userfront never returns password hashes: turn on the userfront lazy-migration preset so each password moves on its first Atlas sign-in.');
122
- }
123
- for (const name of roleNames) {
124
- const key = (0, translate_kit_1.keyOf)(name);
125
- set.add('role', { key, name, scope: 'app' }, `app:${key}`);
126
- if (orgIds.size > 0)
127
- set.add('role', { key, name, scope: 'organization' }, `org:${key}`);
128
- }
129
- set.manifest = { origin: tid, settings: { tenant_id: tid } };
130
- return set;
131
- }
132
- /**
133
- * Walk a paged listing whose page numbering Userfront does not document: page
134
- * 0 is probed, then pages go up from 1 until one is empty, past the reported
135
- * total, or adds nobody new (a row seen twice is taken once).
136
- */
137
- async function walk(get, rowsOf, totalPages, take) {
138
- for (let page = 0; page < MAX_PAGES; page++) {
139
- const body = await optional(() => get(page));
140
- const rows = rowsOf(body);
141
- let fresh = 0;
142
- for (const r of rows)
143
- if (take(r))
144
- fresh++;
145
- const pages = totalPages(body);
146
- if (page > 0 && (rows.length === 0 || (pages !== undefined && page > pages)))
147
- break;
148
- if (page >= 2 && fresh === 0)
149
- break;
150
- }
151
- }
152
- async function findUsers(http, tenantId, page) {
153
- return (await http.post(`/tenants/${tenantId}/users/find`, { filters: {}, page, order: [['createdAt', 'ASC']] })).body;
154
- }
155
- /** One Userfront user (users/find result) → a user record. */
156
- function mapUserfrontUser(u, tenantId) {
157
- const id = (0, record_set_1.str)(u.userId);
158
- if (!id)
159
- return null;
160
- const email = (0, record_set_1.str)(u.email)?.toLowerCase();
161
- const phone = (0, record_set_1.e164)(u.phoneNumber);
162
- const username = (0, record_set_1.str)(u.username);
163
- const uuid = (0, record_set_1.str)(u.userUuid);
164
- const user = (0, record_set_1.compact)({
165
- id,
166
- emails: email ? [{ email, verified: u.isEmailConfirmed === true || (u.isEmailConfirmed === undefined && u.isConfirmed === true), primary: true }] : [],
167
- phones: phone ? [{ phone, verified: u.isPhoneNumberConfirmed === true, primary: !email }] : [],
168
- username,
169
- name: (0, record_set_1.str)(u.name),
170
- image_url: (0, record_set_1.str)(u.image),
171
- locked: u.locked === true ? true : undefined,
172
- public_metadata: (0, record_set_1.bag)(u.data),
173
- private_metadata: (0, record_set_1.bag)({ ...(uuid ? { userfront_user_uuid: uuid } : {}), userfront_tenant_id: tenantId }),
174
- created_at: (0, record_set_1.str)(u.createdAt),
175
- last_sign_in_at: (0, record_set_1.str)(u.lastActiveAt),
176
- });
177
- return user.emails?.length || user.phones?.length || user.username ? user : null;
178
- }
179
- async function optional(fn) {
180
- try {
181
- return await fn();
182
- }
183
- catch (err) {
184
- if (err instanceof vendor_http_1.VendorApiError && [400, 403, 404, 405].includes(err.status))
185
- return null;
186
- throw err;
187
- }
188
- }
189
- //# sourceMappingURL=userfront.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"userfront.js","sourceRoot":"","sources":["../../../src/migrate/export/userfront.ts"],"names":[],"mappings":";;AAqCA,sCAIC;AAED,sCAQC;AAED,0CAoGC;AA6BD,4CAqBC;AA1MD,6CAA+F;AAC/F,mDAAwC;AACxC,+CAA2D;AA6B3D,MAAM,GAAG,GAAG,8BAA8B,CAAC;AAC3C,MAAM,SAAS,GAAG,OAAO,CAAC;AAC1B,2DAA2D;AAC3D,MAAM,UAAU,G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AC;QACxG,UAAU,EAAE,IAAA,gBAAG,EAAC,CAAC,CAAC,SAAS,CAAC;QAC5B,eAAe,EAAE,IAAA,gBAAG,EAAC,CAAC,CAAC,YAAY,CAAC;KACrC,CAAC,CAAC;IACH,OAAO,IAAI,CAAC,MAAM,EAAE,MAAM,IAAI,IAAI,CAAC,MAAM,EAAE,MAAM,IAAI,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC;AACnF,CAAC;AAED,KAAK,UAAU,QAAQ,CAAI,EAAoB;IAC7C,IAAI,CAAC;QACH,OAAO,MAAM,EAAE,EAAE,CAAC;IACpB,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,IAAI,GAAG,YAAY,4BAAc,IAAI,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC;YAAE,OAAO,IAAI,CAAC;QAC5F,MAAM,GAAG,CAAC;IACZ,CAAC;AACH,CAAC"}
@@ -1,46 +0,0 @@
1
- /**
2
- * The HTTP side of `atlas migrate export <vendor>`: calls the OLD vendor's
3
- * management API from the owner's machine, with the owner's vendor
4
- * credentials. Nothing here talks to Atlas, and no vendor credential is ever
5
- * written into a bundle or sent anywhere but the vendor.
6
- *
7
- * Shared by every vendor exporter: JSON requests, a bounded retry on 429 and
8
- * 5xx that honours `Retry-After` (and the `X-RateLimit-Reset` epoch some
9
- * vendors send instead), and errors that name the call without echoing a
10
- * credential.
11
- */
12
- export declare class VendorApiError extends Error {
13
- readonly vendor: string;
14
- readonly status: number;
15
- readonly path: string;
16
- constructor(vendor: string, status: number, path: string, detail: string);
17
- }
18
- export interface VendorHttpOptions {
19
- vendor: string;
20
- baseUrl: string;
21
- /** Headers on every call (the authorization header lives here, never in a URL). */
22
- headers?: Record<string, string> | (() => Promise<Record<string, string>> | Record<string, string>);
23
- fetchImpl?: typeof fetch;
24
- sleep?: (ms: number) => Promise<void>;
25
- /** Attempts per call on 429/5xx, the first included. */
26
- attempts?: number;
27
- now?: () => number;
28
- }
29
- export interface VendorResponse<T> {
30
- status: number;
31
- body: T;
32
- headers: Headers;
33
- }
34
- export declare class VendorHttp {
35
- private readonly o;
36
- constructor(o: VendorHttpOptions);
37
- get vendor(): string;
38
- url(path: string): string;
39
- get<T>(path: string): Promise<VendorResponse<T>>;
40
- post<T>(path: string, body: unknown): Promise<VendorResponse<T>>;
41
- request<T>(method: string, path: string, body?: unknown): Promise<VendorResponse<T>>;
42
- private waitFor;
43
- private now;
44
- }
45
- /** The `rel="next"` URL of an RFC 8288 `Link` header (Okta's pagination). */
46
- export declare function nextLink(header: string | null): string | null;
@@ -1,138 +0,0 @@
1
- "use strict";
2
- /**
3
- * The HTTP side of `atlas migrate export <vendor>`: calls the OLD vendor's
4
- * management API from the owner's machine, with the owner's vendor
5
- * credentials. Nothing here talks to Atlas, and no vendor credential is ever
6
- * written into a bundle or sent anywhere but the vendor.
7
- *
8
- * Shared by every vendor exporter: JSON requests, a bounded retry on 429 and
9
- * 5xx that honours `Retry-After` (and the `X-RateLimit-Reset` epoch some
10
- * vendors send instead), and errors that name the call without echoing a
11
- * credential.
12
- */
13
- Object.defineProperty(exports, "__esModule", { value: true });
14
- exports.VendorHttp = exports.VendorApiError = void 0;
15
- exports.nextLink = nextLink;
16
- class VendorApiError extends Error {
17
- vendor;
18
- status;
19
- path;
20
- constructor(vendor, status, path, detail) {
21
- super(`${vendor} API ${status} on ${path}${detail ? `: ${detail}` : ''}`);
22
- this.vendor = vendor;
23
- this.status = status;
24
- this.path = path;
25
- }
26
- }
27
- exports.VendorApiError = VendorApiError;
28
- const MAX_WAIT_MS = 60_000;
29
- class VendorHttp {
30
- o;
31
- constructor(o) {
32
- this.o = o;
33
- }
34
- get vendor() {
35
- return this.o.vendor;
36
- }
37
- url(path) {
38
- return /^https:\/\//.test(path) ? path : `${this.o.baseUrl.replace(/\/+$/, '')}${path.startsWith('/') ? '' : '/'}${path}`;
39
- }
40
- async get(path) {
41
- return this.request('GET', path);
42
- }
43
- async post(path, body) {
44
- return this.request('POST', path, body);
45
- }
46
- async request(method, path, body) {
47
- const fetchImpl = this.o.fetchImpl ?? fetch;
48
- const sleep = this.o.sleep ?? ((ms) => new Promise((r) => setTimeout(r, ms)));
49
- const attempts = Math.max(1, this.o.attempts ?? 5);
50
- const display = path.split('?')[0].replace(/^https:\/\/[^/]+/, '');
51
- for (let attempt = 1;; attempt++) {
52
- const extra = typeof this.o.headers === 'function' ? await this.o.headers() : this.o.headers;
53
- const headers = { accept: 'application/json', ...extra };
54
- if (body !== undefined)
55
- headers['content-type'] = 'application/json';
56
- let res;
57
- try {
58
- res = await fetchImpl(this.url(path), {
59
- method,
60
- headers,
61
- body: body === undefined ? undefined : JSON.stringify(body),
62
- });
63
- }
64
- catch (err) {
65
- if (attempt < attempts) {
66
- await sleep(backoff(attempt));
67
- continue;
68
- }
69
- throw new VendorApiError(this.o.vendor, 0, display, err instanceof Error ? err.message : String(err));
70
- }
71
- if ((res.status === 429 || res.status >= 500) && attempt < attempts) {
72
- await sleep(this.waitFor(res, attempt));
73
- continue;
74
- }
75
- const text = await res.text();
76
- let parsed = null;
77
- if (text) {
78
- try {
79
- parsed = JSON.parse(text);
80
- }
81
- catch {
82
- parsed = text;
83
- }
84
- }
85
- if (res.status < 200 || res.status >= 300) {
86
- throw new VendorApiError(this.o.vendor, res.status, display, errorDetail(parsed));
87
- }
88
- return { status: res.status, body: parsed, headers: res.headers };
89
- }
90
- }
91
- waitFor(res, attempt) {
92
- const retryAfter = res.headers.get('retry-after');
93
- if (retryAfter) {
94
- const secs = Number(retryAfter);
95
- if (Number.isFinite(secs))
96
- return Math.min(Math.max(secs * 1000, 0), MAX_WAIT_MS);
97
- const at = Date.parse(retryAfter);
98
- if (Number.isFinite(at))
99
- return Math.min(Math.max(at - this.now(), 0), MAX_WAIT_MS);
100
- }
101
- const reset = Number(res.headers.get('x-ratelimit-reset'));
102
- if (Number.isFinite(reset) && reset > 1e9) {
103
- return Math.min(Math.max(reset * 1000 - this.now(), 250), MAX_WAIT_MS);
104
- }
105
- return backoff(attempt);
106
- }
107
- now() {
108
- return (this.o.now ?? Date.now)();
109
- }
110
- }
111
- exports.VendorHttp = VendorHttp;
112
- function backoff(attempt) {
113
- return Math.min(500 * 2 ** (attempt - 1), MAX_WAIT_MS);
114
- }
115
- /** A short, credential-free description of a vendor error body. */
116
- function errorDetail(body) {
117
- if (typeof body === 'string')
118
- return body.slice(0, 200);
119
- if (!body || typeof body !== 'object')
120
- return '';
121
- const b = body;
122
- const first = Array.isArray(b.errors) ? b.errors[0] : undefined;
123
- const pick = [b.message, b.error_description, b.errorSummary, b.errorDescription, first?.long_message, first?.message, b.error, b.errorCode];
124
- const found = pick.find((v) => typeof v === 'string' && v);
125
- return typeof found === 'string' ? found.slice(0, 200) : '';
126
- }
127
- /** The `rel="next"` URL of an RFC 8288 `Link` header (Okta's pagination). */
128
- function nextLink(header) {
129
- if (!header)
130
- return null;
131
- for (const part of header.split(',')) {
132
- const m = /<([^>]+)>\s*;\s*rel="?next"?/.exec(part.trim());
133
- if (m)
134
- return m[1];
135
- }
136
- return null;
137
- }
138
- //# sourceMappingURL=vendor-http.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"vendor-http.js","sourceRoot":"","sources":["../../../src/migrate/export/vendor-http.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;AAmIH,4BAOC;AAxID,MAAa,cAAe,SAAQ,KAAK;IAE5B;IACA;IACA;IAHX,YACW,MAAc,EACd,MAAc,EACd,IAAY,EACrB,MAAc;QAEd,KAAK,CAAC,GAAG,MAAM,QAAQ,MAAM,OAAO,IAAI,GAAG,MAAM,CAAC,CAAC,CAAC,KAAK,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;QALjE,WAAM,GAAN,MAAM,CAAQ;QACd,WAAM,GAAN,MAAM,CAAQ;QACd,SAAI,GAAJ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AO,EAAE,CAAC;IACjD,MAAM,CAAC,GAAG,IAA+B,CAAC;IAC1C,MAAM,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAyC,CAAC,CAAC,CAAC,SAAS,CAAC;IACzG,MAAM,IAAI,GAAG,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,iBAAiB,EAAE,CAAC,CAAC,YAAY,EAAE,CAAC,CAAC,gBAAgB,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC;IAC7I,MAAM,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,QAAQ,IAAI,CAAC,CAAC,CAAC;IAC3D,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;AAC9D,CAAC;AAED,6EAA6E;AAC7E,SAAgB,QAAQ,CAAC,MAAqB;IAC5C,IAAI,CAAC,MAAM;QAAE,OAAO,IAAI,CAAC;IACzB,KAAK,MAAM,IAAI,IAAI,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC;QACrC,MAAM,CAAC,GAAG,8BAA8B,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;QAC3D,IAAI,CAAC;YAAE,OAAO,CAAC,CAAC,CAAC,CAAE,CAAC;IACtB,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
@@ -1,23 +0,0 @@
1
- import type { TranslationResult } from '../framework/plugin';
2
- import { type Obj } from './record-set';
3
- import { type VendorHttp } from './vendor-http';
4
- /**
5
- * `atlas migrate workos config` — what WorkOS's API exposes of an environment:
6
- * roles and permissions (RBAC), the redirect URIs and CORS origins registered
7
- * for AuthKit, and the SSO connections / Directory Sync directories (which
8
- * move with the data export). Authentication methods, MFA policy, session and
9
- * token lifetimes, branding, email templates, JWT templates and signup rules
10
- * live only in the WorkOS dashboard: the report lists each as manual, with
11
- * where to find it.
12
- */
13
- export interface WorkosConfigSnapshot {
14
- clientId?: string;
15
- roles: Obj[];
16
- permissions: Obj[];
17
- redirectUris: Obj[];
18
- corsOrigins: Obj[];
19
- connections: Obj[];
20
- directories: number;
21
- }
22
- export declare function fetchWorkosConfig(http: VendorHttp, clientId?: string): Promise<WorkosConfigSnapshot>;
23
- export declare function translateWorkosConfig(snap: WorkosConfigSnapshot): TranslationResult;
@@ -1,125 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.fetchWorkosConfig = fetchWorkosConfig;
4
- exports.translateWorkosConfig = translateWorkosConfig;
5
- const record_set_1 = require("./record-set");
6
- const translate_kit_1 = require("./translate-kit");
7
- const vendor_http_1 = require("./vendor-http");
8
- async function listOf(http, path) {
9
- const out = [];
10
- let after;
11
- try {
12
- for (;;) {
13
- const q = new URLSearchParams({ limit: '100', order: 'asc' });
14
- if (after)
15
- q.set('after', after);
16
- const body = (await http.get(`${path}?${q.toString()}`)).body;
17
- out.push(...(0, record_set_1.objs)((0, record_set_1.isObj)(body) ? body.data : undefined));
18
- const next = (0, record_set_1.isObj)(body) && (0, record_set_1.isObj)(body.list_metadata) ? (0, record_set_1.str)(body.list_metadata.after) : undefined;
19
- if (!next || next === after)
20
- break;
21
- after = next;
22
- }
23
- }
24
- catch (err) {
25
- // Absent on this environment (RBAC off, endpoint not offered, no permission).
26
- if (err instanceof vendor_http_1.VendorApiError && [400, 403, 404, 405].includes(err.status))
27
- return out;
28
- throw err;
29
- }
30
- return out;
31
- }
32
- async function plainList(http, path) {
33
- try {
34
- const body = (await http.get(path)).body;
35
- return (0, record_set_1.objs)((0, record_set_1.isObj)(body) ? body.data : undefined);
36
- }
37
- catch (err) {
38
- if (err instanceof vendor_http_1.VendorApiError && [400, 403, 404, 405].includes(err.status))
39
- return [];
40
- throw err;
41
- }
42
- }
43
- async function fetchWorkosConfig(http, clientId) {
44
- return {
45
- ...(clientId ? { clientId } : {}),
46
- // The roles listing is not paginated.
47
- roles: await plainList(http, '/authorization/roles'),
48
- permissions: await listOf(http, '/authorization/permissions'),
49
- redirectUris: await listOf(http, '/user_management/redirect_uris'),
50
- corsOrigins: await listOf(http, '/user_management/cors_origins'),
51
- connections: await listOf(http, '/connections'),
52
- directories: (await listOf(http, '/directories')).length,
53
- };
54
- }
55
- function translateWorkosConfig(snap) {
56
- const b = new translate_kit_1.ConfigBuilder();
57
- for (const p of snap.permissions) {
58
- const key = (0, record_set_1.str)(p.slug);
59
- if (key)
60
- b.push('permissions', { key, name: (0, record_set_1.str)(p.name) ?? key, description: (0, record_set_1.str)(p.description) ?? '' });
61
- }
62
- if (snap.permissions.length)
63
- b.add('mapped', 'authorization', 'permissions', `${snap.permissions.length} permission(s).`, 'permissions');
64
- let roles = 0;
65
- for (const r of snap.roles) {
66
- const slug = (0, record_set_1.str)(r.slug);
67
- // Organization-specific roles are exported per organization with the data.
68
- if (!slug || (0, record_set_1.str)(r.type) === 'OrganizationRole')
69
- continue;
70
- roles++;
71
- b.roles[slug] = slug;
72
- b.push('roles', { key: slug, name: (0, record_set_1.str)(r.name) ?? slug, description: (0, record_set_1.str)(r.description) ?? '', permissions: (0, record_set_1.strs)(r.permissions) });
73
- }
74
- if (roles)
75
- b.add('mapped', 'authorization', 'environment roles', `${roles} role(s); members keep the same role slug as their Atlas role key.`, 'roles');
76
- if (snap.roles.length === 0)
77
- b.add('manual', 'authorization', 'roles', 'No roles were returned (RBAC may be off for this environment); the default "admin" and "member" roles carry over as Atlas organization roles.');
78
- const redirects = new Set();
79
- for (const u of snap.redirectUris) {
80
- const uri = (0, record_set_1.str)(u.uri);
81
- if (uri)
82
- redirects.add(uri);
83
- }
84
- for (const url of redirects) {
85
- if (url.includes('*'))
86
- b.add('differs', 'redirect URIs', url, 'Atlas redirect URLs are exact (no wildcards).', 'redirect_urls');
87
- else
88
- b.push('redirect_urls', { url });
89
- }
90
- const exact = [...redirects].filter((u) => !u.includes('*')).length;
91
- if (exact)
92
- b.add('mapped', 'redirect URIs', 'redirect_uris', `${exact} redirect URI(s).`, 'redirect_urls');
93
- if (redirects.size === 0)
94
- b.add('manual', 'redirect URIs', 'redirect_uris', 'WorkOS did not list its redirect URIs by API: add your app\'s post-sign-in URLs to Atlas (redirect_urls).', 'redirect_urls');
95
- for (const o of snap.corsOrigins) {
96
- const origin = (0, record_set_1.str)(o.origin);
97
- if (origin)
98
- b.add('manual', 'CORS origins', origin, 'Add this origin to the allowed origins of your Atlas instance (Atlas dashboard → Settings → Allowed origins).');
99
- }
100
- const sso = snap.connections.length;
101
- if (sso)
102
- b.add('mapped', 'enterprise', `${sso} SSO connection(s)`, 'Move with the data export as Atlas SSO connections. WorkOS does not return the identity provider details: each customer\'s IdP is set up again against the new Atlas service-provider settings.', 'sso_connections');
103
- if (snap.directories)
104
- b.add('manual', 'enterprise', `${snap.directories} Directory Sync directory(ies)`, 'Reconnect through Atlas SCIM provisioning; the identity provider re-provisions users and groups.');
105
- for (const [setting, where] of [
106
- ['authentication methods (password, Magic Auth, social, passkeys)', 'Authentication → Methods'],
107
- ['social connections (client ids and secrets)', 'Authentication → Social login (use the same OAuth apps in Atlas so imported accounts relink)'],
108
- ['multi-factor authentication policy', 'Authentication → Multi-Factor Auth'],
109
- ['session lifetime and access token lifetime', 'Authentication → Sessions'],
110
- ['sign-up rules, email verification and domain restrictions', 'Authentication → Sign-up'],
111
- ['branding, hosted-page text and email templates', 'Branding and Email'],
112
- ['JWT templates and custom claims', 'Authentication → Sessions → JWT template'],
113
- ['custom authentication domain', 'Domains'],
114
- ['Radar (bot and fraud rules)', 'Radar'],
115
- ['webhooks and events', 'Webhooks (create Atlas webhook endpoints)'],
116
- ]) {
117
- b.add('manual', 'settings not in the API', setting, `WorkOS does not expose this by API; copy it from the WorkOS dashboard (${where}).`);
118
- }
119
- return b.result(`WorkOS environment${snap.clientId ? ` ${snap.clientId}` : ''}`, {
120
- ...(snap.clientId
121
- ? { bridge: { preset: 'workos', vars: { client_id: snap.clientId } }, lazy: { preset: 'workos', config: { client_id: snap.clientId } } }
122
- : {}),
123
- });
124
- }
125
- //# sourceMappingURL=workos-config.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"workos-config.js","sourceRoot":"","sources":["../../../src/migrate/export/workos-config.ts"],"names":[],"mappings":";;AAwDA,8CAWC;AAED,sDA+DC;AAlID,6CAAgE;AAChE,mDAAgD;AAChD,+CAAgE;AAqBhE,KAAK,UAAU,MAAM,CAAC,IAAgB,EAAE,IAAY;IAClD,MAAM,GAAG,GAAU,EAAE,CAAC;IACtB,IAAI,KAAyB,CAAC;IAC9B,IAAI,CAAC;QACH,SAAS,CAAC;YACR,MAAM,CAAC,GAAG,IAAI,eAAe,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC;YAC9D,IAAI,KAAK;gBAAE,CAAC,CAAC,GAAG,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;YACjC,MAAM,IAAI,GAAG,CAAC,MAAM,IAAI,CAAC,GAAG,CAAM,GAAG,IAAI,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;YACnE,GAAG,CAAC,IAAI,CAAC,GAAG,IAAA,iBAAI,EAAC,IAAA,kBAAK,EAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;YACvD,MAAM,IAAI,GAAG,IAAA,kBAAK,EAAC,IAAI,CAAC,IAAI,IAAA,kBAAK,EAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,IAAA,gBAAG,EAAC,IAAI,CAAC,aA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5E,CAAC,4CAA4C,EAAE,2BAA2B,CAAC;QAC3E,CAAC,2DAA2D,EAAE,0BAA0B,CAAC;QACzF,CAAC,gDAAgD,EAAE,oBAAoB,CAAC;QACxE,CAAC,iCAAiC,EAAE,0CAA0C,CAAC;QAC/E,CAAC,8BAA8B,EAAE,SAAS,CAAC;QAC3C,CAAC,6BAA6B,EAAE,OAAO,CAAC;QACxC,CAAC,qBAAqB,EAAE,2CAA2C,CAAC;KAC5D,EAAE,CAAC;QACX,CAAC,CAAC,GAAG,CAAC,QAAQ,EAAE,yBAAyB,EAAE,OAAO,EAAE,0EAA0E,KAAK,IAAI,CAAC,CAAC;IAC3I,CAAC;IAED,OAAO,CAAC,CAAC,MAAM,CAAC,qBAAqB,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE;QAC/E,GAAG,CAAC,IAAI,CAAC,QAAQ;YACf,CAAC,CAAC,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE,SAAS,EAAE,IAAI,CAAC,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,SAAS,EAAE,IAAI,CAAC,QAAQ,EAAE,EAAE,EAAE;YACxI,CAAC,CAAC,EAAE,CAAC;KACR,CAAC,CAAC;AACL,CAAC"}
@@ -1,46 +0,0 @@
1
- import type { UserRecord } from '@atlasauth/migrate';
2
- import { RecordSet, type Obj } from './record-set';
3
- /**
4
- * `atlas migrate export workos` — a WorkOS environment (AuthKit + SSO +
5
- * Directory Sync) onto the canonical bundle models, read with an API key on
6
- * this machine.
7
- *
8
- * - organizations (verified domains, metadata), environment roles and each
9
- * organization's custom roles, memberships with their role slug, pending
10
- * and past invitations;
11
- * - users (verified email, names, avatar, metadata, last sign-in) with the
12
- * OAuth identities WorkOS holds for them (provider user ids, so social
13
- * sign-in relinks exactly);
14
- * - SSO connections (SAML / OIDC) with the IdP signing certificates WorkOS
15
- * returns; the IdP entity id, SSO URL and OIDC client secret are NOT
16
- * available through the API, so the customer's IdP is reconfigured against
17
- * the new Atlas connection;
18
- * - password hashes: WorkOS publishes no export of them (only an import
19
- * path). If WorkOS support gives you a hash file, pass it
20
- * (--workos-hashes-file); otherwise turn on the `workos` lazy-migration
21
- * preset, which checks each password against WorkOS on first sign-in.
22
- *
23
- * Not exportable: TOTP secrets and passkeys (users enrol again), API key
24
- * secrets (reissue as Atlas API keys), sessions (the `workos` bridge preset
25
- * exchanges the access token). Directory Sync directories are reconnected in
26
- * Atlas SCIM.
27
- */
28
- export interface WorkosExportOptions {
29
- apiKey: string;
30
- /** For the manifest only (the client id appears in token issuers). */
31
- clientId?: string;
32
- /** API base (default https://api.workos.com). */
33
- baseUrl?: string;
34
- /** A password-hash export from WorkOS support (CSV or NDJSON), when the owner has one. */
35
- hashesText?: string;
36
- /** Also count TOTP / SMS / WebAuthn factors per user (one more request each) so the report says how many re-enrol. */
37
- countFactors?: boolean;
38
- fetchImpl?: typeof fetch;
39
- sleep?: (ms: number) => Promise<void>;
40
- onProgress?: (message: string) => void;
41
- }
42
- export declare function exportWorkos(opts: WorkosExportOptions): Promise<RecordSet>;
43
- /** One WorkOS user → a user record (a user always has an email). */
44
- export declare function mapWorkosUser(u: Obj): UserRecord | null;
45
- /** `GoogleOAuth` → `google`, `GitHubOAuth` → `github`: the provider name an Atlas provider key is looked up by. */
46
- export declare function providerKey(provider: string): string;