@atlasauth/cli 0.25.0 → 0.26.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 (546) hide show
  1. package/CHANGELOG.md +37 -0
  2. package/README.md +26 -5
  3. package/dist/args.d.ts +631 -0
  4. package/dist/args.js +304 -0
  5. package/dist/args.js.map +1 -0
  6. package/dist/cli.d.ts +2 -0
  7. package/dist/cli.js +19 -0
  8. package/dist/cli.js.map +1 -0
  9. package/dist/commands/actions-gallery.d.ts +8 -0
  10. package/dist/commands/actions-gallery.js +197 -0
  11. package/dist/commands/actions-gallery.js.map +1 -0
  12. package/dist/commands/actions.d.ts +13 -0
  13. package/dist/commands/actions.js +135 -0
  14. package/dist/commands/actions.js.map +1 -0
  15. package/dist/commands/admin.d.ts +49 -0
  16. package/dist/commands/admin.js +353 -0
  17. package/dist/commands/admin.js.map +1 -0
  18. package/dist/commands/api-keys.d.ts +4 -0
  19. package/dist/commands/api-keys.js +96 -0
  20. package/dist/commands/api-keys.js.map +1 -0
  21. package/dist/commands/auth.d.ts +25 -0
  22. package/dist/commands/auth.js +102 -0
  23. package/dist/commands/auth.js.map +1 -0
  24. package/dist/commands/config.d.ts +128 -0
  25. package/dist/commands/config.js +1822 -0
  26. package/dist/commands/config.js.map +1 -0
  27. package/dist/commands/csp.d.ts +32 -0
  28. package/dist/commands/csp.js +180 -0
  29. package/dist/commands/csp.js.map +1 -0
  30. package/dist/commands/dev.d.ts +8 -0
  31. package/dist/commands/dev.js +84 -0
  32. package/dist/commands/dev.js.map +1 -0
  33. package/dist/commands/doctor-scan.d.ts +27 -0
  34. package/dist/commands/doctor-scan.js +221 -0
  35. package/dist/commands/doctor-scan.js.map +1 -0
  36. package/dist/commands/fga.d.ts +10 -0
  37. package/dist/commands/fga.js +146 -0
  38. package/dist/commands/fga.js.map +1 -0
  39. package/dist/commands/golive.d.ts +40 -0
  40. package/dist/commands/golive.js +297 -0
  41. package/dist/commands/golive.js.map +1 -0
  42. package/dist/commands/id-accounts.d.ts +13 -0
  43. package/dist/commands/id-accounts.js +195 -0
  44. package/dist/commands/id-accounts.js.map +1 -0
  45. package/dist/commands/import-better-auth.d.ts +3 -0
  46. package/dist/commands/import-better-auth.js +164 -0
  47. package/dist/commands/import-better-auth.js.map +1 -0
  48. package/dist/commands/import-jsonl.d.ts +50 -0
  49. package/dist/commands/import-jsonl.js +252 -0
  50. package/dist/commands/import-jsonl.js.map +1 -0
  51. package/dist/commands/import.d.ts +3 -0
  52. package/dist/commands/import.js +133 -0
  53. package/dist/commands/import.js.map +1 -0
  54. package/dist/commands/info.d.ts +75 -0
  55. package/dist/commands/info.js +362 -0
  56. package/dist/commands/info.js.map +1 -0
  57. package/dist/commands/init-next.d.ts +4 -0
  58. package/dist/commands/init-next.js +86 -0
  59. package/dist/commands/init-next.js.map +1 -0
  60. package/dist/commands/init.d.ts +3 -0
  61. package/dist/commands/init.js +525 -0
  62. package/dist/commands/init.js.map +1 -0
  63. package/dist/commands/integrations.d.ts +8 -0
  64. package/dist/commands/integrations.js +112 -0
  65. package/dist/commands/integrations.js.map +1 -0
  66. package/dist/commands/listen.d.ts +17 -0
  67. package/dist/commands/listen.js +223 -0
  68. package/dist/commands/listen.js.map +1 -0
  69. package/dist/commands/mcp.d.ts +38 -0
  70. package/dist/commands/mcp.js +111 -0
  71. package/dist/commands/mcp.js.map +1 -0
  72. package/dist/commands/migrate.d.ts +16 -0
  73. package/dist/commands/migrate.js +114 -0
  74. package/dist/commands/migrate.js.map +1 -0
  75. package/dist/commands/move-origin.d.ts +11 -0
  76. package/dist/commands/move-origin.js +95 -0
  77. package/dist/commands/move-origin.js.map +1 -0
  78. package/dist/commands/operator.d.ts +18 -0
  79. package/dist/commands/operator.js +238 -0
  80. package/dist/commands/operator.js.map +1 -0
  81. package/dist/commands/orgs.d.ts +4 -0
  82. package/dist/commands/orgs.js +72 -0
  83. package/dist/commands/orgs.js.map +1 -0
  84. package/dist/commands/pages.d.ts +14 -0
  85. package/dist/commands/pages.js +113 -0
  86. package/dist/commands/pages.js.map +1 -0
  87. package/dist/commands/partner-platforms.d.ts +10 -0
  88. package/dist/commands/partner-platforms.js +157 -0
  89. package/dist/commands/partner-platforms.js.map +1 -0
  90. package/dist/commands/project-commands.d.ts +38 -0
  91. package/dist/commands/project-commands.js +431 -0
  92. package/dist/commands/project-commands.js.map +1 -0
  93. package/dist/commands/referrals.d.ts +69 -0
  94. package/dist/commands/referrals.js +1056 -0
  95. package/dist/commands/referrals.js.map +1 -0
  96. package/dist/commands/resources.d.ts +44 -0
  97. package/dist/commands/resources.js +234 -0
  98. package/dist/commands/resources.js.map +1 -0
  99. package/dist/commands/sessions.d.ts +4 -0
  100. package/dist/commands/sessions.js +28 -0
  101. package/dist/commands/sessions.js.map +1 -0
  102. package/dist/commands/setup-guide.d.ts +3 -0
  103. package/dist/commands/setup-guide.js +38 -0
  104. package/dist/commands/setup-guide.js.map +1 -0
  105. package/dist/commands/shared.d.ts +38 -0
  106. package/dist/commands/shared.js +69 -0
  107. package/dist/commands/shared.js.map +1 -0
  108. package/dist/commands/status.d.ts +3 -0
  109. package/dist/commands/status.js +77 -0
  110. package/dist/commands/status.js.map +1 -0
  111. package/dist/commands/users.d.ts +4 -0
  112. package/dist/commands/users.js +111 -0
  113. package/dist/commands/users.js.map +1 -0
  114. package/dist/commands/webhooks.d.ts +34 -0
  115. package/dist/commands/webhooks.js +301 -0
  116. package/dist/commands/webhooks.js.map +1 -0
  117. package/dist/config-http.d.ts +38 -0
  118. package/dist/config-http.js +70 -0
  119. package/dist/config-http.js.map +1 -0
  120. package/dist/config.d.ts +64 -0
  121. package/dist/config.js +69 -0
  122. package/dist/config.js.map +1 -0
  123. package/dist/context.d.ts +89 -0
  124. package/dist/context.js +32 -0
  125. package/dist/context.js.map +1 -0
  126. package/dist/define-config.d.ts +9 -0
  127. package/dist/define-config.js +8 -0
  128. package/dist/define-config.js.map +1 -0
  129. package/dist/errors.d.ts +15 -0
  130. package/dist/errors.js +25 -0
  131. package/dist/errors.js.map +1 -0
  132. package/dist/help.d.ts +8 -0
  133. package/dist/help.js +926 -0
  134. package/dist/help.js.map +1 -0
  135. package/dist/import/csv.d.ts +6 -0
  136. package/dist/import/csv.js +63 -0
  137. package/dist/import/csv.js.map +1 -0
  138. package/dist/import/vendors.d.ts +57 -0
  139. package/dist/import/vendors.js +568 -0
  140. package/dist/import/vendors.js.map +1 -0
  141. package/dist/index.d.ts +33 -0
  142. package/dist/index.js +81 -0
  143. package/dist/index.js.map +1 -0
  144. package/dist/io.d.ts +21 -0
  145. package/dist/io.js +28 -0
  146. package/dist/io.js.map +1 -0
  147. package/dist/migrate/appwrite/plugin.d.ts +2 -0
  148. package/dist/migrate/appwrite/plugin.js +103 -0
  149. package/dist/migrate/appwrite/plugin.js.map +1 -0
  150. package/dist/migrate/auth0/plugin.d.ts +2 -0
  151. package/dist/migrate/auth0/plugin.js +126 -0
  152. package/dist/migrate/auth0/plugin.js.map +1 -0
  153. package/dist/migrate/authentik/plugin.d.ts +2 -0
  154. package/dist/migrate/authentik/plugin.js +135 -0
  155. package/dist/migrate/authentik/plugin.js.map +1 -0
  156. package/dist/migrate/azure-ad-b2c/plugin.d.ts +8 -0
  157. package/dist/migrate/azure-ad-b2c/plugin.js +165 -0
  158. package/dist/migrate/azure-ad-b2c/plugin.js.map +1 -0
  159. package/dist/migrate/better-auth/integration.d.ts +59 -0
  160. package/dist/migrate/better-auth/integration.js +81 -0
  161. package/dist/migrate/better-auth/integration.js.map +1 -0
  162. package/dist/migrate/better-auth/orchestrator.d.ts +43 -0
  163. package/dist/migrate/better-auth/orchestrator.js +525 -0
  164. package/dist/migrate/better-auth/orchestrator.js.map +1 -0
  165. package/dist/migrate/better-auth/output.d.ts +20 -0
  166. package/dist/migrate/better-auth/output.js +146 -0
  167. package/dist/migrate/better-auth/output.js.map +1 -0
  168. package/dist/migrate/better-auth/translate.d.ts +77 -0
  169. package/dist/migrate/better-auth/translate.js +1989 -0
  170. package/dist/migrate/better-auth/translate.js.map +1 -0
  171. package/dist/migrate/clerk/plugin.d.ts +2 -0
  172. package/dist/migrate/clerk/plugin.js +76 -0
  173. package/dist/migrate/clerk/plugin.js.map +1 -0
  174. package/dist/migrate/cognito/plugin.d.ts +5 -0
  175. package/dist/migrate/cognito/plugin.js +170 -0
  176. package/dist/migrate/cognito/plugin.js.map +1 -0
  177. package/dist/migrate/corbado/plugin.d.ts +2 -0
  178. package/dist/migrate/corbado/plugin.js +63 -0
  179. package/dist/migrate/corbado/plugin.js.map +1 -0
  180. package/dist/migrate/descope/plugin.d.ts +2 -0
  181. package/dist/migrate/descope/plugin.js +83 -0
  182. package/dist/migrate/descope/plugin.js.map +1 -0
  183. package/dist/migrate/entra-external-id/plugin.d.ts +8 -0
  184. package/dist/migrate/entra-external-id/plugin.js +12 -0
  185. package/dist/migrate/entra-external-id/plugin.js.map +1 -0
  186. package/dist/migrate/export/appwrite-config.d.ts +28 -0
  187. package/dist/migrate/export/appwrite-config.js +170 -0
  188. package/dist/migrate/export/appwrite-config.js.map +1 -0
  189. package/dist/migrate/export/appwrite.d.ts +51 -0
  190. package/dist/migrate/export/appwrite.js +288 -0
  191. package/dist/migrate/export/appwrite.js.map +1 -0
  192. package/dist/migrate/export/auth0-config.d.ts +29 -0
  193. package/dist/migrate/export/auth0-config.js +249 -0
  194. package/dist/migrate/export/auth0-config.js.map +1 -0
  195. package/dist/migrate/export/auth0.d.ts +62 -0
  196. package/dist/migrate/export/auth0.js +575 -0
  197. package/dist/migrate/export/auth0.js.map +1 -0
  198. package/dist/migrate/export/authentik-config.d.ts +45 -0
  199. package/dist/migrate/export/authentik-config.js +357 -0
  200. package/dist/migrate/export/authentik-config.js.map +1 -0
  201. package/dist/migrate/export/authentik.d.ts +110 -0
  202. package/dist/migrate/export/authentik.js +838 -0
  203. package/dist/migrate/export/authentik.js.map +1 -0
  204. package/dist/migrate/export/azure-config.d.ts +58 -0
  205. package/dist/migrate/export/azure-config.js +344 -0
  206. package/dist/migrate/export/azure-config.js.map +1 -0
  207. package/dist/migrate/export/azure.d.ts +85 -0
  208. package/dist/migrate/export/azure.js +373 -0
  209. package/dist/migrate/export/azure.js.map +1 -0
  210. package/dist/migrate/export/clerk-config.d.ts +26 -0
  211. package/dist/migrate/export/clerk-config.js +227 -0
  212. package/dist/migrate/export/clerk-config.js.map +1 -0
  213. package/dist/migrate/export/clerk.d.ts +46 -0
  214. package/dist/migrate/export/clerk.js +486 -0
  215. package/dist/migrate/export/clerk.js.map +1 -0
  216. package/dist/migrate/export/cognito-config.d.ts +25 -0
  217. package/dist/migrate/export/cognito-config.js +273 -0
  218. package/dist/migrate/export/cognito-config.js.map +1 -0
  219. package/dist/migrate/export/cognito.d.ts +103 -0
  220. package/dist/migrate/export/cognito.js +441 -0
  221. package/dist/migrate/export/cognito.js.map +1 -0
  222. package/dist/migrate/export/corbado-config.d.ts +20 -0
  223. package/dist/migrate/export/corbado-config.js +63 -0
  224. package/dist/migrate/export/corbado-config.js.map +1 -0
  225. package/dist/migrate/export/corbado.d.ts +37 -0
  226. package/dist/migrate/export/corbado.js +132 -0
  227. package/dist/migrate/export/corbado.js.map +1 -0
  228. package/dist/migrate/export/descope.d.ts +35 -0
  229. package/dist/migrate/export/descope.js +208 -0
  230. package/dist/migrate/export/descope.js.map +1 -0
  231. package/dist/migrate/export/fake-vendor.test-helper.d.ts +27 -0
  232. package/dist/migrate/export/fake-vendor.test-helper.js +41 -0
  233. package/dist/migrate/export/fake-vendor.test-helper.js.map +1 -0
  234. package/dist/migrate/export/firebase-config.d.ts +24 -0
  235. package/dist/migrate/export/firebase-config.js +215 -0
  236. package/dist/migrate/export/firebase-config.js.map +1 -0
  237. package/dist/migrate/export/firebase.d.ts +102 -0
  238. package/dist/migrate/export/firebase.js +464 -0
  239. package/dist/migrate/export/firebase.js.map +1 -0
  240. package/dist/migrate/export/frameworks/app-users.d.ts +42 -0
  241. package/dist/migrate/export/frameworks/app-users.js +161 -0
  242. package/dist/migrate/export/frameworks/app-users.js.map +1 -0
  243. package/dist/migrate/export/frameworks/authjs.d.ts +41 -0
  244. package/dist/migrate/export/frameworks/authjs.js +146 -0
  245. package/dist/migrate/export/frameworks/authjs.js.map +1 -0
  246. package/dist/migrate/export/frameworks/devise.d.ts +39 -0
  247. package/dist/migrate/export/frameworks/devise.js +218 -0
  248. package/dist/migrate/export/frameworks/devise.js.map +1 -0
  249. package/dist/migrate/export/frameworks/django.d.ts +45 -0
  250. package/dist/migrate/export/frameworks/django.js +315 -0
  251. package/dist/migrate/export/frameworks/django.js.map +1 -0
  252. package/dist/migrate/export/frameworks/lucia.d.ts +42 -0
  253. package/dist/migrate/export/frameworks/lucia.js +263 -0
  254. package/dist/migrate/export/frameworks/lucia.js.map +1 -0
  255. package/dist/migrate/export/frameworks/tables.d.ts +90 -0
  256. package/dist/migrate/export/frameworks/tables.js +325 -0
  257. package/dist/migrate/export/frameworks/tables.js.map +1 -0
  258. package/dist/migrate/export/frameworks/webauthn.d.ts +25 -0
  259. package/dist/migrate/export/frameworks/webauthn.js +130 -0
  260. package/dist/migrate/export/frameworks/webauthn.js.map +1 -0
  261. package/dist/migrate/export/frontegg-config.d.ts +29 -0
  262. package/dist/migrate/export/frontegg-config.js +238 -0
  263. package/dist/migrate/export/frontegg-config.js.map +1 -0
  264. package/dist/migrate/export/frontegg.d.ts +67 -0
  265. package/dist/migrate/export/frontegg.js +410 -0
  266. package/dist/migrate/export/frontegg.js.map +1 -0
  267. package/dist/migrate/export/fusionauth-config.d.ts +26 -0
  268. package/dist/migrate/export/fusionauth-config.js +226 -0
  269. package/dist/migrate/export/fusionauth-config.js.map +1 -0
  270. package/dist/migrate/export/fusionauth.d.ts +99 -0
  271. package/dist/migrate/export/fusionauth.js +642 -0
  272. package/dist/migrate/export/fusionauth.js.map +1 -0
  273. package/dist/migrate/export/hanko-config.d.ts +27 -0
  274. package/dist/migrate/export/hanko-config.js +265 -0
  275. package/dist/migrate/export/hanko-config.js.map +1 -0
  276. package/dist/migrate/export/hanko.d.ts +52 -0
  277. package/dist/migrate/export/hanko.js +605 -0
  278. package/dist/migrate/export/hanko.js.map +1 -0
  279. package/dist/migrate/export/keycloak-config.d.ts +19 -0
  280. package/dist/migrate/export/keycloak-config.js +219 -0
  281. package/dist/migrate/export/keycloak-config.js.map +1 -0
  282. package/dist/migrate/export/keycloak.d.ts +155 -0
  283. package/dist/migrate/export/keycloak.js +878 -0
  284. package/dist/migrate/export/keycloak.js.map +1 -0
  285. package/dist/migrate/export/kinde-descope-config.d.ts +38 -0
  286. package/dist/migrate/export/kinde-descope-config.js +172 -0
  287. package/dist/migrate/export/kinde-descope-config.js.map +1 -0
  288. package/dist/migrate/export/kinde.d.ts +57 -0
  289. package/dist/migrate/export/kinde.js +333 -0
  290. package/dist/migrate/export/kinde.js.map +1 -0
  291. package/dist/migrate/export/ldap.d.ts +53 -0
  292. package/dist/migrate/export/ldap.js +277 -0
  293. package/dist/migrate/export/ldap.js.map +1 -0
  294. package/dist/migrate/export/logto-config.d.ts +27 -0
  295. package/dist/migrate/export/logto-config.js +264 -0
  296. package/dist/migrate/export/logto-config.js.map +1 -0
  297. package/dist/migrate/export/logto.d.ts +150 -0
  298. package/dist/migrate/export/logto.js +809 -0
  299. package/dist/migrate/export/logto.js.map +1 -0
  300. package/dist/migrate/export/magic-config.d.ts +14 -0
  301. package/dist/migrate/export/magic-config.js +28 -0
  302. package/dist/migrate/export/magic-config.js.map +1 -0
  303. package/dist/migrate/export/magic.d.ts +31 -0
  304. package/dist/migrate/export/magic.js +93 -0
  305. package/dist/migrate/export/magic.js.map +1 -0
  306. package/dist/migrate/export/mini-yaml.d.ts +19 -0
  307. package/dist/migrate/export/mini-yaml.js +581 -0
  308. package/dist/migrate/export/mini-yaml.js.map +1 -0
  309. package/dist/migrate/export/nhost-config.d.ts +26 -0
  310. package/dist/migrate/export/nhost-config.js +360 -0
  311. package/dist/migrate/export/nhost-config.js.map +1 -0
  312. package/dist/migrate/export/nhost.d.ts +64 -0
  313. package/dist/migrate/export/nhost.js +304 -0
  314. package/dist/migrate/export/nhost.js.map +1 -0
  315. package/dist/migrate/export/okta-config.d.ts +30 -0
  316. package/dist/migrate/export/okta-config.js +205 -0
  317. package/dist/migrate/export/okta-config.js.map +1 -0
  318. package/dist/migrate/export/okta.d.ts +43 -0
  319. package/dist/migrate/export/okta.js +337 -0
  320. package/dist/migrate/export/okta.js.map +1 -0
  321. package/dist/migrate/export/onelogin.d.ts +22 -0
  322. package/dist/migrate/export/onelogin.js +123 -0
  323. package/dist/migrate/export/onelogin.js.map +1 -0
  324. package/dist/migrate/export/ory-config.d.ts +58 -0
  325. package/dist/migrate/export/ory-config.js +451 -0
  326. package/dist/migrate/export/ory-config.js.map +1 -0
  327. package/dist/migrate/export/ory.d.ts +81 -0
  328. package/dist/migrate/export/ory.js +555 -0
  329. package/dist/migrate/export/ory.js.map +1 -0
  330. package/dist/migrate/export/password-detect.d.ts +29 -0
  331. package/dist/migrate/export/password-detect.js +81 -0
  332. package/dist/migrate/export/password-detect.js.map +1 -0
  333. package/dist/migrate/export/pingone.d.ts +36 -0
  334. package/dist/migrate/export/pingone.js +218 -0
  335. package/dist/migrate/export/pingone.js.map +1 -0
  336. package/dist/migrate/export/plugin-kit.d.ts +25 -0
  337. package/dist/migrate/export/plugin-kit.js +82 -0
  338. package/dist/migrate/export/plugin-kit.js.map +1 -0
  339. package/dist/migrate/export/pocketbase-config.d.ts +28 -0
  340. package/dist/migrate/export/pocketbase-config.js +180 -0
  341. package/dist/migrate/export/pocketbase-config.js.map +1 -0
  342. package/dist/migrate/export/pocketbase.d.ts +52 -0
  343. package/dist/migrate/export/pocketbase.js +243 -0
  344. package/dist/migrate/export/pocketbase.js.map +1 -0
  345. package/dist/migrate/export/project-files.d.ts +15 -0
  346. package/dist/migrate/export/project-files.js +43 -0
  347. package/dist/migrate/export/project-files.js.map +1 -0
  348. package/dist/migrate/export/propelauth-config.d.ts +18 -0
  349. package/dist/migrate/export/propelauth-config.js +58 -0
  350. package/dist/migrate/export/propelauth-config.js.map +1 -0
  351. package/dist/migrate/export/propelauth-harness.test-helper.d.ts +62 -0
  352. package/dist/migrate/export/propelauth-harness.test-helper.js +109 -0
  353. package/dist/migrate/export/propelauth-harness.test-helper.js.map +1 -0
  354. package/dist/migrate/export/propelauth.d.ts +48 -0
  355. package/dist/migrate/export/propelauth.js +255 -0
  356. package/dist/migrate/export/propelauth.js.map +1 -0
  357. package/dist/migrate/export/record-set.d.ts +44 -0
  358. package/dist/migrate/export/record-set.js +98 -0
  359. package/dist/migrate/export/record-set.js.map +1 -0
  360. package/dist/migrate/export/source-lines.d.ts +17 -0
  361. package/dist/migrate/export/source-lines.js +43 -0
  362. package/dist/migrate/export/source-lines.js.map +1 -0
  363. package/dist/migrate/export/sso-metadata.d.ts +47 -0
  364. package/dist/migrate/export/sso-metadata.js +180 -0
  365. package/dist/migrate/export/sso-metadata.js.map +1 -0
  366. package/dist/migrate/export/stytch-config.d.ts +22 -0
  367. package/dist/migrate/export/stytch-config.js +102 -0
  368. package/dist/migrate/export/stytch-config.js.map +1 -0
  369. package/dist/migrate/export/stytch.d.ts +68 -0
  370. package/dist/migrate/export/stytch.js +510 -0
  371. package/dist/migrate/export/stytch.js.map +1 -0
  372. package/dist/migrate/export/supabase-config.d.ts +48 -0
  373. package/dist/migrate/export/supabase-config.js +408 -0
  374. package/dist/migrate/export/supabase-config.js.map +1 -0
  375. package/dist/migrate/export/supabase.d.ts +86 -0
  376. package/dist/migrate/export/supabase.js +524 -0
  377. package/dist/migrate/export/supabase.js.map +1 -0
  378. package/dist/migrate/export/supertokens-config.d.ts +20 -0
  379. package/dist/migrate/export/supertokens-config.js +150 -0
  380. package/dist/migrate/export/supertokens-config.js.map +1 -0
  381. package/dist/migrate/export/supertokens.d.ts +125 -0
  382. package/dist/migrate/export/supertokens.js +464 -0
  383. package/dist/migrate/export/supertokens.js.map +1 -0
  384. package/dist/migrate/export/table.d.ts +35 -0
  385. package/dist/migrate/export/table.js +248 -0
  386. package/dist/migrate/export/table.js.map +1 -0
  387. package/dist/migrate/export/translate-kit.d.ts +46 -0
  388. package/dist/migrate/export/translate-kit.js +148 -0
  389. package/dist/migrate/export/translate-kit.js.map +1 -0
  390. package/dist/migrate/export/userfront-config.d.ts +15 -0
  391. package/dist/migrate/export/userfront-config.js +49 -0
  392. package/dist/migrate/export/userfront-config.js.map +1 -0
  393. package/dist/migrate/export/userfront.d.ts +38 -0
  394. package/dist/migrate/export/userfront.js +189 -0
  395. package/dist/migrate/export/userfront.js.map +1 -0
  396. package/dist/migrate/export/vendor-http.d.ts +46 -0
  397. package/dist/migrate/export/vendor-http.js +138 -0
  398. package/dist/migrate/export/vendor-http.js.map +1 -0
  399. package/dist/migrate/export/workos-config.d.ts +23 -0
  400. package/dist/migrate/export/workos-config.js +125 -0
  401. package/dist/migrate/export/workos-config.js.map +1 -0
  402. package/dist/migrate/export/workos.d.ts +46 -0
  403. package/dist/migrate/export/workos.js +272 -0
  404. package/dist/migrate/export/workos.js.map +1 -0
  405. package/dist/migrate/export/zip.d.ts +8 -0
  406. package/dist/migrate/export/zip.js +66 -0
  407. package/dist/migrate/export/zip.js.map +1 -0
  408. package/dist/migrate/export/zitadel-config.d.ts +37 -0
  409. package/dist/migrate/export/zitadel-config.js +279 -0
  410. package/dist/migrate/export/zitadel-config.js.map +1 -0
  411. package/dist/migrate/export/zitadel.d.ts +82 -0
  412. package/dist/migrate/export/zitadel.js +447 -0
  413. package/dist/migrate/export/zitadel.js.map +1 -0
  414. package/dist/migrate/firebase/plugin.d.ts +2 -0
  415. package/dist/migrate/firebase/plugin.js +152 -0
  416. package/dist/migrate/firebase/plugin.js.map +1 -0
  417. package/dist/migrate/framework/builtins.d.ts +2 -0
  418. package/dist/migrate/framework/builtins.js +52 -0
  419. package/dist/migrate/framework/builtins.js.map +1 -0
  420. package/dist/migrate/framework/commands.d.ts +20 -0
  421. package/dist/migrate/framework/commands.js +58 -0
  422. package/dist/migrate/framework/commands.js.map +1 -0
  423. package/dist/migrate/framework/custom.d.ts +12 -0
  424. package/dist/migrate/framework/custom.js +96 -0
  425. package/dist/migrate/framework/custom.js.map +1 -0
  426. package/dist/migrate/framework/orchestrator.d.ts +113 -0
  427. package/dist/migrate/framework/orchestrator.js +532 -0
  428. package/dist/migrate/framework/orchestrator.js.map +1 -0
  429. package/dist/migrate/framework/plugin.d.ts +167 -0
  430. package/dist/migrate/framework/plugin.js +3 -0
  431. package/dist/migrate/framework/plugin.js.map +1 -0
  432. package/dist/migrate/framework/registry.d.ts +11 -0
  433. package/dist/migrate/framework/registry.js +44 -0
  434. package/dist/migrate/framework/registry.js.map +1 -0
  435. package/dist/migrate/framework/report.d.ts +17 -0
  436. package/dist/migrate/framework/report.js +103 -0
  437. package/dist/migrate/framework/report.js.map +1 -0
  438. package/dist/migrate/frameworks/plugins.d.ts +29 -0
  439. package/dist/migrate/frameworks/plugins.js +402 -0
  440. package/dist/migrate/frameworks/plugins.js.map +1 -0
  441. package/dist/migrate/frameworks/report.d.ts +92 -0
  442. package/dist/migrate/frameworks/report.js +207 -0
  443. package/dist/migrate/frameworks/report.js.map +1 -0
  444. package/dist/migrate/frameworks/translate-js.d.ts +5 -0
  445. package/dist/migrate/frameworks/translate-js.js +503 -0
  446. package/dist/migrate/frameworks/translate-js.js.map +1 -0
  447. package/dist/migrate/frameworks/translate-rails-django.d.ts +3 -0
  448. package/dist/migrate/frameworks/translate-rails-django.js +1391 -0
  449. package/dist/migrate/frameworks/translate-rails-django.js.map +1 -0
  450. package/dist/migrate/frontegg/plugin.d.ts +2 -0
  451. package/dist/migrate/frontegg/plugin.js +78 -0
  452. package/dist/migrate/frontegg/plugin.js.map +1 -0
  453. package/dist/migrate/fusionauth/plugin.d.ts +2 -0
  454. package/dist/migrate/fusionauth/plugin.js +109 -0
  455. package/dist/migrate/fusionauth/plugin.js.map +1 -0
  456. package/dist/migrate/hanko/plugin.d.ts +2 -0
  457. package/dist/migrate/hanko/plugin.js +100 -0
  458. package/dist/migrate/hanko/plugin.js.map +1 -0
  459. package/dist/migrate/keycloak/plugin.d.ts +2 -0
  460. package/dist/migrate/keycloak/plugin.js +148 -0
  461. package/dist/migrate/keycloak/plugin.js.map +1 -0
  462. package/dist/migrate/kinde/plugin.d.ts +2 -0
  463. package/dist/migrate/kinde/plugin.js +105 -0
  464. package/dist/migrate/kinde/plugin.js.map +1 -0
  465. package/dist/migrate/ldap/plugin.d.ts +2 -0
  466. package/dist/migrate/ldap/plugin.js +73 -0
  467. package/dist/migrate/ldap/plugin.js.map +1 -0
  468. package/dist/migrate/logto/plugin.d.ts +2 -0
  469. package/dist/migrate/logto/plugin.js +131 -0
  470. package/dist/migrate/logto/plugin.js.map +1 -0
  471. package/dist/migrate/magic/plugin.d.ts +2 -0
  472. package/dist/migrate/magic/plugin.js +56 -0
  473. package/dist/migrate/magic/plugin.js.map +1 -0
  474. package/dist/migrate/nhost/plugin.d.ts +2 -0
  475. package/dist/migrate/nhost/plugin.js +115 -0
  476. package/dist/migrate/nhost/plugin.js.map +1 -0
  477. package/dist/migrate/oidc/plugin.d.ts +2 -0
  478. package/dist/migrate/oidc/plugin.js +73 -0
  479. package/dist/migrate/oidc/plugin.js.map +1 -0
  480. package/dist/migrate/okta/plugin.d.ts +2 -0
  481. package/dist/migrate/okta/plugin.js +105 -0
  482. package/dist/migrate/okta/plugin.js.map +1 -0
  483. package/dist/migrate/onelogin/plugin.d.ts +2 -0
  484. package/dist/migrate/onelogin/plugin.js +61 -0
  485. package/dist/migrate/onelogin/plugin.js.map +1 -0
  486. package/dist/migrate/ory/plugin.d.ts +2 -0
  487. package/dist/migrate/ory/plugin.js +186 -0
  488. package/dist/migrate/ory/plugin.js.map +1 -0
  489. package/dist/migrate/ping-identity/plugin.d.ts +2 -0
  490. package/dist/migrate/ping-identity/plugin.js +100 -0
  491. package/dist/migrate/ping-identity/plugin.js.map +1 -0
  492. package/dist/migrate/pocketbase/plugin.d.ts +2 -0
  493. package/dist/migrate/pocketbase/plugin.js +99 -0
  494. package/dist/migrate/pocketbase/plugin.js.map +1 -0
  495. package/dist/migrate/propelauth/plugin.d.ts +2 -0
  496. package/dist/migrate/propelauth/plugin.js +65 -0
  497. package/dist/migrate/propelauth/plugin.js.map +1 -0
  498. package/dist/migrate/saml/plugin.d.ts +2 -0
  499. package/dist/migrate/saml/plugin.js +79 -0
  500. package/dist/migrate/saml/plugin.js.map +1 -0
  501. package/dist/migrate/stytch/plugin.d.ts +2 -0
  502. package/dist/migrate/stytch/plugin.js +97 -0
  503. package/dist/migrate/stytch/plugin.js.map +1 -0
  504. package/dist/migrate/supabase/plugin.d.ts +2 -0
  505. package/dist/migrate/supabase/plugin.js +149 -0
  506. package/dist/migrate/supabase/plugin.js.map +1 -0
  507. package/dist/migrate/supertokens/plugin.d.ts +2 -0
  508. package/dist/migrate/supertokens/plugin.js +114 -0
  509. package/dist/migrate/supertokens/plugin.js.map +1 -0
  510. package/dist/migrate/user-table/plugin.d.ts +2 -0
  511. package/dist/migrate/user-table/plugin.js +62 -0
  512. package/dist/migrate/user-table/plugin.js.map +1 -0
  513. package/dist/migrate/userfront/plugin.d.ts +2 -0
  514. package/dist/migrate/userfront/plugin.js +60 -0
  515. package/dist/migrate/userfront/plugin.js.map +1 -0
  516. package/dist/migrate/workos/plugin.d.ts +2 -0
  517. package/dist/migrate/workos/plugin.js +81 -0
  518. package/dist/migrate/workos/plugin.js.map +1 -0
  519. package/dist/migrate/zitadel/plugin.d.ts +2 -0
  520. package/dist/migrate/zitadel/plugin.js +114 -0
  521. package/dist/migrate/zitadel/plugin.js.map +1 -0
  522. package/dist/output.d.ts +41 -0
  523. package/dist/output.js +72 -0
  524. package/dist/output.js.map +1 -0
  525. package/dist/project.d.ts +64 -0
  526. package/dist/project.js +86 -0
  527. package/dist/project.js.map +1 -0
  528. package/dist/prompt.d.ts +15 -0
  529. package/dist/prompt.js +46 -0
  530. package/dist/prompt.js.map +1 -0
  531. package/dist/redact.d.ts +41 -0
  532. package/dist/redact.js +115 -0
  533. package/dist/redact.js.map +1 -0
  534. package/dist/run.d.ts +12 -0
  535. package/dist/run.js +169 -0
  536. package/dist/run.js.map +1 -0
  537. package/dist/secrets.d.ts +41 -0
  538. package/dist/secrets.js +142 -0
  539. package/dist/secrets.js.map +1 -0
  540. package/dist/serialize.d.ts +30 -0
  541. package/dist/serialize.js +131 -0
  542. package/dist/serialize.js.map +1 -0
  543. package/dist/version.d.ts +7 -0
  544. package/dist/version.js +21 -0
  545. package/dist/version.js.map +1 -0
  546. package/package.json +3 -3
@@ -0,0 +1,146 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.REPORT_JSON = exports.REPORT_MD = void 0;
4
+ exports.reportCounts = reportCounts;
5
+ exports.documentFiles = documentFiles;
6
+ exports.writeTranslation = writeTranslation;
7
+ exports.reportJson = reportJson;
8
+ exports.renderReport = renderReport;
9
+ exports.summaryLines = summaryLines;
10
+ const node_fs_1 = require("node:fs");
11
+ const node_path_1 = require("node:path");
12
+ const serialize_1 = require("../../serialize");
13
+ /** The report files written next to the config documents (ignored by `atlas config import`). */
14
+ exports.REPORT_MD = 'better-auth-report.md';
15
+ exports.REPORT_JSON = 'better-auth-report.json';
16
+ const ORDER = ['manual', 'differs', 'mapped'];
17
+ const HEADINGS = {
18
+ manual: 'Needs a manual step',
19
+ differs: 'Maps with a difference',
20
+ mapped: 'Maps 1:1',
21
+ };
22
+ /** Counts per status. */
23
+ function reportCounts(report) {
24
+ const out = { mapped: 0, differs: 0, manual: 0 };
25
+ for (const e of report)
26
+ out[e.status] += 1;
27
+ return out;
28
+ }
29
+ /** The resource files a translation produces: only the non-empty ones, plus the instance. */
30
+ function documentFiles(t) {
31
+ const d = t.document;
32
+ const files = [{ type: 'instance', value: d.instance }];
33
+ const collections = [
34
+ ['oauth_providers', d.oauth_providers],
35
+ ['custom_oauth_providers', d.custom_oauth_providers],
36
+ ['permissions', d.permissions],
37
+ ['roles', d.roles],
38
+ ['oauth_clients', d.oauth_clients],
39
+ ['resource_servers', d.resource_servers],
40
+ ['billing_plans', d.billing_plans],
41
+ ['redirect_urls', d.redirect_urls],
42
+ ['jwt_templates', d.jwt_templates],
43
+ ];
44
+ for (const [type, value] of collections)
45
+ if (value.length)
46
+ files.push({ type, value });
47
+ return files;
48
+ }
49
+ /** Write the config documents and both reports into `dir`. Returns the file names written. */
50
+ function writeTranslation(t, dir, format) {
51
+ (0, node_fs_1.mkdirSync)(dir, { recursive: true });
52
+ const ext = format === 'json' ? 'json' : 'yaml';
53
+ const written = [];
54
+ for (const f of documentFiles(t)) {
55
+ const name = `${f.type}.${ext}`;
56
+ (0, node_fs_1.writeFileSync)((0, node_path_1.join)(dir, name), (0, serialize_1.serialize)(f.value, format));
57
+ written.push(name);
58
+ }
59
+ (0, node_fs_1.writeFileSync)((0, node_path_1.join)(dir, exports.REPORT_MD), renderReport(t));
60
+ (0, node_fs_1.writeFileSync)((0, node_path_1.join)(dir, exports.REPORT_JSON), JSON.stringify(reportJson(t), null, 2) + '\n');
61
+ written.push(exports.REPORT_MD, exports.REPORT_JSON);
62
+ return written;
63
+ }
64
+ /** The machine-readable report (no values of secrets: only env var names). */
65
+ function reportJson(t) {
66
+ return {
67
+ object: 'better_auth_config_translation',
68
+ source: t.source,
69
+ other_instances: t.otherInstances,
70
+ plugins: t.plugins,
71
+ counts: reportCounts(t.report),
72
+ report: t.report,
73
+ env: t.env,
74
+ secrets: t.secrets,
75
+ mappings: t.mappings,
76
+ bridge: t.bridge,
77
+ document: t.document,
78
+ };
79
+ }
80
+ /** The human report, as Markdown. */
81
+ function renderReport(t) {
82
+ const counts = reportCounts(t.report);
83
+ const lines = [];
84
+ lines.push('# Better Auth → Atlas: configuration report', '');
85
+ lines.push(t.source ? `Translated \`betterAuth()\` at \`${t.source.file}:${t.source.line}\`.` : 'No `betterAuth()` call was found.', '');
86
+ if (t.plugins.length)
87
+ lines.push(`Plugins: ${t.plugins.map((p) => `\`${p}\``).join(', ')}.`, '');
88
+ lines.push(`${counts.mapped} map 1:1, ${counts.differs} map with a difference, ${counts.manual} need a manual step.`, '');
89
+ if (t.env.length) {
90
+ lines.push('## Environment variables to set before applying', '');
91
+ lines.push('The config files hold `${NAME}` placeholders, never secret values. Set these (from your app\'s environment) when you run `atlas config import` or `atlas migrate better-auth`:', '');
92
+ for (const e of t.env)
93
+ lines.push(`- \`${e.name}\`: ${e.for}`);
94
+ lines.push('');
95
+ }
96
+ if (t.secrets.length) {
97
+ lines.push('## Secrets stored before the config', '');
98
+ for (const s of t.secrets)
99
+ lines.push(`- captcha secret for \`${s.provider}\` from \`${s.env}\` (write-only)`);
100
+ lines.push('');
101
+ }
102
+ for (const status of ORDER) {
103
+ const entries = t.report.filter((e) => e.status === status);
104
+ if (!entries.length)
105
+ continue;
106
+ lines.push(`## ${HEADINGS[status]} (${entries.length})`, '');
107
+ lines.push('| Better Auth | Atlas | Note | Where |', '|---|---|---|---|');
108
+ for (const e of entries) {
109
+ lines.push(`| \`${cell(e.option)}\` | ${e.atlas ? `\`${cell(e.atlas)}\`` : ''} | ${cell(e.note)} | \`${e.file}:${e.line}\` |`);
110
+ }
111
+ lines.push('');
112
+ }
113
+ const providers = Object.entries(t.mappings.providers);
114
+ if (providers.length) {
115
+ lines.push('## Provider ids', '', '| Better Auth providerId | Atlas provider |', '|---|---|');
116
+ for (const [from, to] of providers)
117
+ lines.push(`| \`${from}\` | \`${to}\` |`);
118
+ lines.push('');
119
+ }
120
+ const roles = Object.entries(t.mappings.roles);
121
+ if (roles.length) {
122
+ lines.push('## Organization roles', '', '| Better Auth role | Atlas role |', '|---|---|');
123
+ for (const [from, to] of roles)
124
+ lines.push(`| \`${from}\` | \`${to}\` |`);
125
+ lines.push('');
126
+ }
127
+ return lines.join('\n');
128
+ }
129
+ function cell(text) {
130
+ return text.replace(/\|/g, '\\|').replace(/\n/g, ' ');
131
+ }
132
+ /** Short terminal summary lines. */
133
+ function summaryLines(t, dir, written) {
134
+ const c = reportCounts(t.report);
135
+ const out = [
136
+ t.source ? `Read betterAuth() at ${t.source.file}:${t.source.line}${t.plugins.length ? ` with ${t.plugins.length} plugin(s): ${t.plugins.join(', ')}` : ''}.` : 'No betterAuth() call found.',
137
+ `Wrote ${written.length - 2} config file(s) and the report to ${dir}: ${written.join(', ')}`,
138
+ `${c.mapped} map 1:1, ${c.differs} map with a difference, ${c.manual} need a manual step (see ${(0, node_path_1.join)(dir, exports.REPORT_MD)}).`,
139
+ ];
140
+ if (t.env.length)
141
+ out.push(`Set before applying: ${t.env.map((e) => e.name).join(', ')}`);
142
+ for (const e of t.report.filter((x) => x.status === 'manual'))
143
+ out.push(` manual ${e.file}:${e.line} ${e.option}: ${e.note}`);
144
+ return out;
145
+ }
146
+ //# sourceMappingURL=output.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"output.js","sourceRoot":"","sources":["../../../src/migrate/better-auth/output.ts"],"names":[],"mappings":";;;AAiBA,oCAIC;AAGD,sCAgBC;AAGD,4CAaC;AAGD,gCAcC;AAGD,oCAyCC;AAOD,oCAUC;AAtID,qCAAmD;AACnD,yCAAiC;AACjC,+CAAoE;AAGpE,gGAAgG;AACnF,QAAA,SAAS,GAAG,uBAAuB,CAAC;AACpC,QAAA,WAAW,GAAG,yBAAyB,CAAC;AAErD,MAAM,KAAK,GAAmB,CAAC,QAAQ,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAC;AAC9D,MAAM,QAAQ,GAAiC;IAC7C,MAAM,EAAE,qBAAqB;IAC7B,OAAO,EAAE,wBAAwB;IACjC,MAAM,EAAE,UAAU;CACnB,CAAC;AAEF,yBAAyB;AACzB,SAAgB,YAAY,CAAC,MAAqB;IAChD,MAAM,GAAG,GAAiC,EAAE,MAAM,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC;IAC/E,KAAK,MAAM,CAAC,IAAI,MAAM;QAAE,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAC3C,OAAO,GAAG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AC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,6BAA6B;QAC7L,SAAS,OAAO,CAAC,MAAM,GAAG,CAAC,qCAAqC,GAAG,KAAK,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;QAC5F,GAAG,CAAC,CAAC,MAAM,aAAa,CAAC,CAAC,OAAO,2BAA2B,CAAC,CAAC,MAAM,4BAA4B,IAAA,gBAAI,EAAC,GAAG,EAAE,iBAAS,CAAC,IAAI;KACzH,CAAC;IACF,IAAI,CAAC,CAAC,GAAG,CAAC,MAAM;QAAE,GAAG,CAAC,IAAI,CAAC,wBAAwB,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAC1F,KAAK,MAAM,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,QAAQ,CAAC;QAAE,GAAG,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;IACjI,OAAO,GAAG,CAAC;AACb,CAAC"}
@@ -0,0 +1,77 @@
1
+ import { type BetterAuthAnalysis, type SourceLoc } from '@atlasauth/upgrade';
2
+ import type { Json } from '../../serialize';
3
+ /**
4
+ * Better Auth options → an Atlas config-as-code document (the same per-resource
5
+ * files `atlas config export` writes and `atlas config import` applies) plus a
6
+ * line-by-line report of what mapped 1:1, what maps with a difference and what
7
+ * needs a manual step, each with the file and line of the option.
8
+ *
9
+ * Pure: it works on the static analysis only. Secrets are NEVER read: a value
10
+ * that comes from an environment variable is written as a `${NAME}` placeholder
11
+ * (the import interpolates it from the environment), and a secret hard-coded in
12
+ * source is replaced by a placeholder and flagged.
13
+ */
14
+ export type ReportStatus = 'mapped' | 'differs' | 'manual';
15
+ export interface ReportEntry {
16
+ status: ReportStatus;
17
+ /** The Better Auth area: `emailAndPassword`, `plugin:organization`, … */
18
+ area: string;
19
+ /** The Better Auth option path (`session.expiresIn`). */
20
+ option: string;
21
+ /** Where it lands in Atlas (`auth_config.session.idleMs`, `oauth_providers google`). */
22
+ atlas?: string;
23
+ note: string;
24
+ file: string;
25
+ line: number;
26
+ }
27
+ export interface ConfigDocument {
28
+ instance: {
29
+ allowed_origins?: string[];
30
+ auth_config: Record<string, Json>;
31
+ };
32
+ oauth_providers: Json[];
33
+ custom_oauth_providers: Json[];
34
+ permissions: Json[];
35
+ roles: Json[];
36
+ oauth_clients: Json[];
37
+ resource_servers: Json[];
38
+ billing_plans: Json[];
39
+ redirect_urls: Json[];
40
+ jwt_templates: Json[];
41
+ }
42
+ export interface Translation {
43
+ /** The `betterAuth()` call that was translated. */
44
+ source: SourceLoc | null;
45
+ /** Every other `betterAuth()` call found (not translated). */
46
+ otherInstances: SourceLoc[];
47
+ document: ConfigDocument;
48
+ report: ReportEntry[];
49
+ /** Environment variables the document's `${NAME}` placeholders need at import time. */
50
+ env: Array<{
51
+ name: string;
52
+ for: string;
53
+ }>;
54
+ /** Secrets that are stored through their own write-only endpoint before the config is applied. */
55
+ secrets: Array<{
56
+ kind: 'captcha_secret';
57
+ provider: string;
58
+ env: string;
59
+ }>;
60
+ /** Better Auth ids → Atlas ids, for the data import and the code rewrite. */
61
+ mappings: {
62
+ providers: Record<string, string>;
63
+ roles: Record<string, string>;
64
+ };
65
+ /** What the session bridge needs to recognise a Better Auth session. */
66
+ bridge: {
67
+ cookiePrefix: string;
68
+ sessionCookie: string;
69
+ secretEnv: string | null;
70
+ expiresInSeconds: number;
71
+ };
72
+ /** Plugin ids found, in order. */
73
+ plugins: string[];
74
+ }
75
+ /** Better Auth social provider id → Atlas catalog provider key. */
76
+ export declare const SOCIAL_PROVIDER_MAP: Record<string, string>;
77
+ export declare function translateBetterAuth(analysis: BetterAuthAnalysis): Translation;