@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,42 +0,0 @@
1
- import { FrameworkExport, type Tables } from './tables';
2
- /**
3
- * Lucia → canonical records. Lucia never owned a schema the way an adapter
4
- * library does, so three generations are recognised:
5
- *
6
- * - v1 / v2: `auth_user`, `user_key` / `auth_key` (key id `<provider>:<provider
7
- * user id>`, `hashed_password` on email/username keys, Lucia's own
8
- * `s2:` scrypt) and `user_session` / `auth_session` (`active_expires`,
9
- * `idle_expires` in epoch ms);
10
- * - v3: your `user` table, `session(id, user_id, expires_at)`, OAuth links in
11
- * a table you named (`oauth_account(provider_id, provider_user_id, user_id)`
12
- * by the docs) or `<provider>_id` columns on the user (`github_id`), and a
13
- * password column you filled with oslo's Argon2id / Scrypt / Bcrypt;
14
- * - the current Lucia guide (sessions you implement): `session.id` is
15
- * hex(sha256(token)); TOTP keys in `totp_credential.key` and the recovery
16
- * code in `user.recovery_code`, both AES-128-GCM encrypted under your
17
- * ENCRYPTION_KEY; passkeys in `passkey_credential` with a SEC1 public key.
18
- */
19
- export interface LuciaExportOptions {
20
- /** How session rows store the cookie token: `none` (v2/v3, the id IS the token) or `sha256-hex` (the guide). Auto-detected. */
21
- sessionIdHashing?: 'none' | 'sha256-hex';
22
- /** The guide's ENCRYPTION_KEY (base64), to read encrypted TOTP keys and recovery codes. */
23
- encryptionKey?: string;
24
- /** WebAuthn RP id, for passkey_credential rows. */
25
- rpId?: string;
26
- /** Include live sessions. Default true. */
27
- sessions?: boolean;
28
- /** Table name overrides. */
29
- userTable?: string;
30
- sessionTable?: string;
31
- oauthTable?: string;
32
- now?: Date;
33
- }
34
- export declare function exportLucia(tables: Tables, options?: LuciaExportOptions): FrameworkExport;
35
- /** The guide's `encrypt()`: iv(16) ‖ ciphertext ‖ tag(16), AES-128-GCM (AES-256 for a 32-byte key). */
36
- export declare function decryptGuideValue(v: unknown, key: Buffer): Buffer | null;
37
- export declare function base32(data: Buffer): string;
38
- /**
39
- * An uncompressed SEC1 P-256 key (0x04 ‖ x ‖ y) as a COSE_Key:
40
- * {1: 2 (EC2), 3: -7 (ES256), -1: 1 (P-256), -2: x, -3: y}, CBOR-encoded.
41
- */
42
- export declare function coseFromSec1(key: Buffer | null): Buffer | null;
@@ -1,263 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.exportLucia = exportLucia;
4
- exports.decryptGuideValue = decryptGuideValue;
5
- exports.base32 = base32;
6
- exports.coseFromSec1 = coseFromSec1;
7
- const node_crypto_1 = require("node:crypto");
8
- const tables_1 = require("./tables");
9
- const PASSWORD_COLUMNS = ['password_hash', 'hashed_password', 'passwordHash', 'hashedPassword', 'password'];
10
- const PROVIDER_COLUMNS = {
11
- github_id: 'github',
12
- google_id: 'google',
13
- discord_id: 'discord',
14
- apple_id: 'apple',
15
- gitlab_id: 'gitlab',
16
- twitter_id: 'twitter',
17
- facebook_id: 'facebook',
18
- microsoft_id: 'microsoft',
19
- twitch_id: 'twitch',
20
- spotify_id: 'spotify',
21
- };
22
- function exportLucia(tables, options = {}) {
23
- const out = new tables_1.FrameworkExport();
24
- const now = (options.now ?? new Date()).getTime();
25
- const userTable = tables.find(...(options.userTable ? [options.userTable] : ['auth_user', 'user', 'users', 'User']));
26
- if (!userTable) {
27
- out.warn('No user table found (looked for auth_user, user, users; pass --user-table).');
28
- return out;
29
- }
30
- const keyTable = tables.find('user_key', 'auth_key', 'key');
31
- const generation = keyTable ? 'v2' : 'v3';
32
- out.manifest.sourceVersion = generation === 'v2' ? 'lucia v1/v2' : 'lucia v3 / guide';
33
- // v2 keys: email/username keys carry the password; others are OAuth links.
34
- const keysByUser = new Map();
35
- for (const k of keyTable?.rows ?? []) {
36
- const uid = (0, tables_1.text)((0, tables_1.col)(k, 'user_id', 'userId'));
37
- if (!uid)
38
- continue;
39
- const list = keysByUser.get(uid) ?? [];
40
- list.push(k);
41
- keysByUser.set(uid, list);
42
- }
43
- const key = options.encryptionKey ? Buffer.from(options.encryptionKey, 'base64') : undefined;
44
- const userIds = new Set();
45
- const providers = new Set();
46
- let unknownHashes = 0;
47
- for (const row of userTable.rows) {
48
- const id = (0, tables_1.text)((0, tables_1.col)(row, 'id', '_id'));
49
- if (!id) {
50
- out.omit('user', 'row without an id');
51
- continue;
52
- }
53
- let email = (0, tables_1.text)((0, tables_1.col)(row, 'email', 'email_address'))?.toLowerCase();
54
- let username = (0, tables_1.text)((0, tables_1.col)(row, 'username'));
55
- let digest = (0, tables_1.text)((0, tables_1.col)(row, ...PASSWORD_COLUMNS));
56
- const identities = [];
57
- for (const k of keysByUser.get(id) ?? []) {
58
- const keyId = (0, tables_1.text)((0, tables_1.col)(k, 'id'));
59
- if (!keyId || !keyId.includes(':'))
60
- continue;
61
- const provider = keyId.slice(0, keyId.indexOf(':'));
62
- const subject = keyId.slice(keyId.indexOf(':') + 1);
63
- if (provider === 'email') {
64
- email ??= subject.toLowerCase();
65
- digest ??= (0, tables_1.text)((0, tables_1.col)(k, 'hashed_password'));
66
- }
67
- else if (provider === 'username') {
68
- username ??= subject;
69
- digest ??= (0, tables_1.text)((0, tables_1.col)(k, 'hashed_password'));
70
- }
71
- else
72
- identities.push({ provider, subject });
73
- }
74
- for (const [column, provider] of Object.entries(PROVIDER_COLUMNS)) {
75
- const subject = (0, tables_1.text)(row[column]);
76
- if (subject)
77
- identities.push({ provider, subject });
78
- }
79
- if (!email && !username) {
80
- out.omit('user', 'no email or username');
81
- continue;
82
- }
83
- let password;
84
- if (digest) {
85
- password = (0, tables_1.selfDescribingHash)(digest) ?? undefined;
86
- if (!password)
87
- unknownHashes++;
88
- }
89
- const name = (0, tables_1.text)((0, tables_1.col)(row, 'name', 'display_name'));
90
- userIds.add(id);
91
- out.add('user', {
92
- id,
93
- emails: email ? [{ email, verified: (0, tables_1.bool)((0, tables_1.col)(row, 'email_verified', 'emailVerified')), primary: true }] : undefined,
94
- username,
95
- name,
96
- ...(0, tables_1.splitName)(name),
97
- password,
98
- created_at: (0, tables_1.time)((0, tables_1.col)(row, 'created_at', 'createdAt')),
99
- });
100
- for (const i of identities) {
101
- providers.add(i.provider);
102
- out.add('identity', { user_id: id, provider: i.provider, provider_user_id: i.subject, kind: 'oauth' });
103
- }
104
- // The guide's recovery code: one encrypted code on the user row.
105
- const recovery = (0, tables_1.col)(row, 'recovery_code');
106
- if (recovery !== undefined && key) {
107
- const code = decryptGuideValue(recovery, key);
108
- if (code)
109
- out.add('mfa_factor', { user_id: id, type: 'backup_codes', backup_codes: [code.toString('utf8')] });
110
- else
111
- out.omit('mfa_factor', 'recovery code that does not decrypt under the ENCRYPTION_KEY given');
112
- }
113
- }
114
- if (unknownHashes)
115
- out.warn(`${unknownHashes} password value(s) are not a format Atlas verifies: those users reset their password or migrate lazily.`);
116
- const oauth = tables.find(...(options.oauthTable ? [options.oauthTable] : ['oauth_account', 'oauth_accounts', 'account']));
117
- for (const row of oauth?.rows ?? []) {
118
- const userId = (0, tables_1.text)((0, tables_1.col)(row, 'user_id', 'userId'));
119
- const provider = (0, tables_1.text)((0, tables_1.col)(row, 'provider_id', 'provider'));
120
- const subject = (0, tables_1.text)((0, tables_1.col)(row, 'provider_user_id', 'providerUserId'));
121
- if (!userId || !provider || !subject || !userIds.has(userId)) {
122
- out.omit('identity', 'oauth account row without a known user, provider or provider user id');
123
- continue;
124
- }
125
- providers.add(provider);
126
- out.add('identity', { user_id: userId, provider, provider_user_id: subject, kind: 'oauth' });
127
- }
128
- out.manifest.providers = [...providers].sort();
129
- // The guide's TOTP credentials.
130
- const totp = tables.rows('totp_credential', 'totp_credentials');
131
- if (totp.length && !key) {
132
- out.omit('mfa_factor', 'TOTP keys are encrypted: pass --encryption-key (your ENCRYPTION_KEY) to carry them', totp.length);
133
- }
134
- for (const row of key ? totp : []) {
135
- const userId = (0, tables_1.text)((0, tables_1.col)(row, 'user_id', 'userId'));
136
- const secret = decryptGuideValue((0, tables_1.col)(row, 'key'), key);
137
- if (!userId || !userIds.has(userId) || !secret) {
138
- out.omit('mfa_factor', 'TOTP row without a known user, or a key that does not decrypt');
139
- continue;
140
- }
141
- out.add('mfa_factor', { user_id: userId, type: 'totp', secret_base32: base32(secret), digits: 6, period: 30, algorithm: 'SHA1', verified: true });
142
- }
143
- // The guide's passkeys: SEC1 P-256 public keys (COSE alg -7) are re-encoded as COSE.
144
- const passkeys = tables.rows('passkey_credential', 'passkey_credentials');
145
- if (passkeys.length && !options.rpId) {
146
- out.omit('passkey', 'no RP id given (--rp-id): a passkey only works on the domain it was registered for', passkeys.length);
147
- }
148
- for (const row of options.rpId ? passkeys : []) {
149
- const userId = (0, tables_1.text)((0, tables_1.col)(row, 'user_id', 'userId'));
150
- const credentialId = bytesOf((0, tables_1.col)(row, 'id'));
151
- const alg = Number((0, tables_1.col)(row, 'algorithm', 'algorithm_id'));
152
- const cose = alg === -7 ? coseFromSec1(bytesOf((0, tables_1.col)(row, 'public_key'))) : null;
153
- if (!userId || !userIds.has(userId) || !credentialId || !cose) {
154
- out.omit('passkey', alg === -7 ? 'passkey row without a known user or a readable key' : 'passkey with an algorithm other than ES256 (re-register it)');
155
- continue;
156
- }
157
- out.add('passkey', {
158
- user_id: userId,
159
- credential_id: credentialId.toString('base64url'),
160
- public_key: cose.toString('base64url'),
161
- rp_id: options.rpId,
162
- name: (0, tables_1.text)((0, tables_1.col)(row, 'name')),
163
- });
164
- }
165
- if (options.rpId)
166
- out.manifest.rpId = options.rpId;
167
- if (options.sessions !== false) {
168
- const sessions = tables.find(...(options.sessionTable ? [options.sessionTable] : ['user_session', 'auth_session', 'session', 'sessions']));
169
- const hashing = options.sessionIdHashing ?? detectHashing(sessions?.rows ?? []);
170
- for (const row of sessions?.rows ?? []) {
171
- const sid = (0, tables_1.text)((0, tables_1.col)(row, 'id'));
172
- const userId = (0, tables_1.text)((0, tables_1.col)(row, 'user_id', 'userId'));
173
- // v2 sessions stay usable until idle_expires (Lucia renews them on use).
174
- const expires = (0, tables_1.timeMs)((0, tables_1.col)(row, 'idle_expires', 'expires_at', 'expiresAt', 'active_expires'));
175
- if (!sid || !userId || !userIds.has(userId) || expires === undefined) {
176
- out.omit('session', 'session row without an id, a known user or an expiry');
177
- continue;
178
- }
179
- if (expires <= now) {
180
- out.omit('session', 'expired');
181
- continue;
182
- }
183
- out.add('session', {
184
- id: sid.slice(0, 64),
185
- user_id: userId,
186
- // The bridge hashes the cookie token: for guide sessions the stored id already is that hash.
187
- token_hash: hashing === 'sha256-hex' ? sid.toLowerCase() : (0, tables_1.sha256Hex)(sid),
188
- expires_at: new Date(expires).toISOString(),
189
- });
190
- }
191
- out.manifest.settings = { session_cookie: 'auth_session', session_id_hashing: hashing };
192
- }
193
- return out;
194
- }
195
- /** Guide sessions store 64-char lowercase hex ids; Lucia v2/v3 ids are 15–40 char alphanumerics. */
196
- function detectHashing(rows) {
197
- if (!rows.length)
198
- return 'none';
199
- return rows.every((r) => /^[0-9a-f]{64}$/.test(String((0, tables_1.col)(r, 'id') ?? ''))) ? 'sha256-hex' : 'none';
200
- }
201
- /** A bytes column from a dump: `\x…` hex (Postgres), plain hex, or base64. */
202
- function bytesOf(v) {
203
- if (Buffer.isBuffer(v))
204
- return v;
205
- const s = (0, tables_1.text)(v);
206
- if (!s)
207
- return null;
208
- if (/^\\x[0-9a-f]*$/i.test(s))
209
- return Buffer.from(s.slice(2), 'hex');
210
- if (/^([0-9a-f]{2})+$/i.test(s) && s.length >= 32)
211
- return Buffer.from(s, 'hex');
212
- if (/^[A-Za-z0-9+/_-]+={0,2}$/.test(s))
213
- return Buffer.from(s.replace(/-/g, '+').replace(/_/g, '/'), 'base64');
214
- return null;
215
- }
216
- /** The guide's `encrypt()`: iv(16) ‖ ciphertext ‖ tag(16), AES-128-GCM (AES-256 for a 32-byte key). */
217
- function decryptGuideValue(v, key) {
218
- const data = bytesOf(v);
219
- if (!data || data.length < 33 || (key.length !== 16 && key.length !== 32))
220
- return null;
221
- try {
222
- const decipher = (0, node_crypto_1.createDecipheriv)(key.length === 16 ? 'aes-128-gcm' : 'aes-256-gcm', key, data.subarray(0, 16));
223
- decipher.setAuthTag(data.subarray(data.length - 16));
224
- return Buffer.concat([decipher.update(data.subarray(16, data.length - 16)), decipher.final()]);
225
- }
226
- catch {
227
- return null;
228
- }
229
- }
230
- const B32 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ234567';
231
- function base32(data) {
232
- let bits = 0;
233
- let value = 0;
234
- let out = '';
235
- for (const byte of data) {
236
- value = (value << 8) | byte;
237
- bits += 8;
238
- while (bits >= 5) {
239
- out += B32[(value >>> (bits - 5)) & 31];
240
- bits -= 5;
241
- }
242
- }
243
- if (bits > 0)
244
- out += B32[(value << (5 - bits)) & 31];
245
- return out;
246
- }
247
- /**
248
- * An uncompressed SEC1 P-256 key (0x04 ‖ x ‖ y) as a COSE_Key:
249
- * {1: 2 (EC2), 3: -7 (ES256), -1: 1 (P-256), -2: x, -3: y}, CBOR-encoded.
250
- */
251
- function coseFromSec1(key) {
252
- if (!key || key.length !== 65 || key[0] !== 0x04)
253
- return null;
254
- const x = key.subarray(1, 33);
255
- const y = key.subarray(33, 65);
256
- return Buffer.concat([
257
- Buffer.from([0xa5, 0x01, 0x02, 0x03, 0x26, 0x20, 0x01, 0x21, 0x58, 0x20]),
258
- x,
259
- Buffer.from([0x22, 0x58, 0x20]),
260
- y,
261
- ]);
262
- }
263
- //# sourceMappingURL=lucia.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"lucia.js","sourceRoot":"","sources":["../../../../src/migrate/export/frameworks/lucia.ts"],"names":[],"mappings":";;AA8DA,kCAuKC;AAoBD,8CAUC;AAGD,wBAcC;AAMD,oCAUC;AApSD,6CAA+C;AAC/C,qCAYkB;AAmClB,MAAM,gBAAgB,GAAG,CAAC,eAAe,EAAE,iBAAiB,EAAE,cAAc,EAAE,gBAAgB,EAAE,UAAU,CAAC,CAAC;AAC5G,MAAM,gBAAgB,GAA2B;IAC/C,SAAS,EAAE,QAAQ;IACnB,SAAS,EAAE,QAAQ;IACnB,UAAU,EAAE,SAAS;IACrB,QAAQ,EAAE,OAAO;IACjB,SAAS,EAAE,QAAQ;IACnB,UAAU,EAAE,SAAS;IACrB,WAAW,EAAE,UAAU;IACvB,YAAY,EAAE,WAAW;IACzB,SAAS,EAAE,QAAQ;IACnB,UAAU,EAAE,SAAS;CACtB,CAAC;AAEF,SAAgB,WAAW,CAAC,MAAc,EAAE,UAA8B,EAAE;IAC1E,MAAM,GAAG,GAAG,I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AC,CAAC,EAAE,EAAE,CAAC,CAAC;IAC9B,MAAM,CAAC,GAAG,GAAG,CAAC,QAAQ,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;IAC/B,OAAO,MAAM,CAAC,MAAM,CAAC;QACnB,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;QACzE,CAAC;QACD,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;QAC/B,CAAC;KACF,CAAC,CAAC;AACL,CAAC"}
@@ -1,90 +0,0 @@
1
- import { type CanonicalModel, type CanonicalRecordData, type MigrationManifest, type Timestamp } from '@atlasauth/migrate';
2
- /**
3
- * The self-hosted frameworks (Auth.js, Lucia, Passport, iron-session, Devise,
4
- * Django) keep users in the APP's own database, so their exporters read table
5
- * dumps the owner makes with their usual tools — `psql \copy … csv`,
6
- * `mysqldump --tab`, `sqlite3 -json`, `mongoexport`, Prisma/Drizzle scripts,
7
- * `manage.py dumpdata`, the Rails runner script — rather than connecting to a
8
- * database. Nothing leaves the owner's machine unsealed, and no database
9
- * driver is needed.
10
- *
11
- * A dump directory holds one file per table, `<table>.json` (an array, or
12
- * `{ "rows": [...] }`), `<table>.ndjson` / `.jsonl`, or `<table>.csv`. Table
13
- * lookups are case-insensitive and accept the names every adapter uses
14
- * (`User`, `users`, `user`, `auth_user` …), so a mapper names the candidates.
15
- */
16
- export type Row = Record<string, unknown>;
17
- /** Rows by table name (lowercase). */
18
- export declare class Tables {
19
- private readonly byName;
20
- constructor(tables?: Record<string, Row[]>);
21
- set(name: string, rows: Row[]): void;
22
- /** The first table that exists among `names` (case-insensitive), with its name. */
23
- find(...names: string[]): {
24
- name: string;
25
- rows: Row[];
26
- } | undefined;
27
- rows(...names: string[]): Row[];
28
- names(): string[];
29
- }
30
- /** Read every table file in a dump directory. */
31
- export declare function readDumpDir(dir: string): Tables;
32
- /**
33
- * Rows streamed as NDJSON `{"table": "<name>", "row": {…}}` lines — what the
34
- * Rails and Django export scripts print, piped into `--file -`.
35
- */
36
- export declare function tablesFromStream(text: string, into?: Tables): Tables;
37
- /** Parse one table file's text by its extension. */
38
- export declare function parseTableText(text: string, ext: string): Row[];
39
- export declare function isRow(v: unknown): v is Row;
40
- /** The first present, non-empty column among `names` (exact, then case-insensitive). */
41
- export declare function col(row: Row, ...names: string[]): unknown;
42
- export declare function text(v: unknown): string | undefined;
43
- export declare function bool(v: unknown): boolean;
44
- /**
45
- * A timestamp column as the bundle wants it: ISO strings pass, numbers are
46
- * epoch ms (or seconds when small), SQL `2024-01-02 03:04:05[+00]` strings are
47
- * made ISO. Undefined when absent or unparseable.
48
- */
49
- export declare function time(v: unknown): Timestamp | undefined;
50
- export declare function timeMs(v: unknown): number | undefined;
51
- /** A JSON column (object, or a string holding one). */
52
- export declare function json(v: unknown): Row | undefined;
53
- /** Lowercase hex sha256 — the bundle's session `token_hash`. */
54
- export declare function sha256Hex(value: string): string;
55
- /** Any base64 / base64url / `\x`-hex bytes column as base64url (passkey fields). */
56
- export declare function base64url(v: unknown): string | undefined;
57
- /**
58
- * The password-hash algorithm a stored digest self-describes, for a column
59
- * the app filled itself (Auth.js Credentials, Lucia, Passport): bcrypt and
60
- * Argon2 PHC strings, oslo/Better Auth `salt:key` scrypt, Lucia's own scrypt,
61
- * Django/passlib PBKDF2. `auto` lets Atlas's registry recognise it; null =
62
- * not a format Atlas can verify (the user resets or migrates lazily).
63
- */
64
- export declare function selfDescribingHash(digest: string): {
65
- algorithm: string;
66
- hash: string;
67
- } | null;
68
- /** Records by canonical model, plus what the exporter could not carry. */
69
- export declare class FrameworkExport {
70
- private readonly rows;
71
- readonly warnings: string[];
72
- readonly omitted: Record<string, {
73
- count: number;
74
- reason: string;
75
- }>;
76
- manifest: Partial<Pick<MigrationManifest, 'origin' | 'sourceVersion' | 'rpId' | 'providers' | 'settings'>>;
77
- add<M extends CanonicalModel>(model: M, data: CanonicalRecordData[M]): void;
78
- list<M extends CanonicalModel>(model: M): Array<CanonicalRecordData[M]>;
79
- count(model: CanonicalModel): number;
80
- warn(message: string): void;
81
- omit(model: string, reason: string, count?: number): void;
82
- /** Every row as `[model, data]`, in the canonical order the bundle writer requires. */
83
- entries(): Generator<[CanonicalModel, unknown]>;
84
- counts(): Record<string, number>;
85
- }
86
- /** Split "Ada Lovelace" for exports that only keep a display name. */
87
- export declare function splitName(name: string | undefined): {
88
- first_name?: string;
89
- last_name?: string;
90
- };