@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.
- package/CHANGELOG.md +37 -0
- package/README.md +26 -5
- package/dist/args.d.ts +631 -0
- package/dist/args.js +304 -0
- package/dist/args.js.map +1 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +19 -0
- package/dist/cli.js.map +1 -0
- package/dist/commands/actions-gallery.d.ts +8 -0
- package/dist/commands/actions-gallery.js +197 -0
- package/dist/commands/actions-gallery.js.map +1 -0
- package/dist/commands/actions.d.ts +13 -0
- package/dist/commands/actions.js +135 -0
- package/dist/commands/actions.js.map +1 -0
- package/dist/commands/admin.d.ts +49 -0
- package/dist/commands/admin.js +353 -0
- package/dist/commands/admin.js.map +1 -0
- package/dist/commands/api-keys.d.ts +4 -0
- package/dist/commands/api-keys.js +96 -0
- package/dist/commands/api-keys.js.map +1 -0
- package/dist/commands/auth.d.ts +25 -0
- package/dist/commands/auth.js +102 -0
- package/dist/commands/auth.js.map +1 -0
- package/dist/commands/config.d.ts +128 -0
- package/dist/commands/config.js +1822 -0
- package/dist/commands/config.js.map +1 -0
- package/dist/commands/csp.d.ts +32 -0
- package/dist/commands/csp.js +180 -0
- package/dist/commands/csp.js.map +1 -0
- package/dist/commands/dev.d.ts +8 -0
- package/dist/commands/dev.js +84 -0
- package/dist/commands/dev.js.map +1 -0
- package/dist/commands/doctor-scan.d.ts +27 -0
- package/dist/commands/doctor-scan.js +221 -0
- package/dist/commands/doctor-scan.js.map +1 -0
- package/dist/commands/fga.d.ts +10 -0
- package/dist/commands/fga.js +146 -0
- package/dist/commands/fga.js.map +1 -0
- package/dist/commands/golive.d.ts +40 -0
- package/dist/commands/golive.js +297 -0
- package/dist/commands/golive.js.map +1 -0
- package/dist/commands/id-accounts.d.ts +13 -0
- package/dist/commands/id-accounts.js +195 -0
- package/dist/commands/id-accounts.js.map +1 -0
- package/dist/commands/import-better-auth.d.ts +3 -0
- package/dist/commands/import-better-auth.js +164 -0
- package/dist/commands/import-better-auth.js.map +1 -0
- package/dist/commands/import-jsonl.d.ts +50 -0
- package/dist/commands/import-jsonl.js +252 -0
- package/dist/commands/import-jsonl.js.map +1 -0
- package/dist/commands/import.d.ts +3 -0
- package/dist/commands/import.js +133 -0
- package/dist/commands/import.js.map +1 -0
- package/dist/commands/info.d.ts +75 -0
- package/dist/commands/info.js +362 -0
- package/dist/commands/info.js.map +1 -0
- package/dist/commands/init-next.d.ts +4 -0
- package/dist/commands/init-next.js +86 -0
- package/dist/commands/init-next.js.map +1 -0
- package/dist/commands/init.d.ts +3 -0
- package/dist/commands/init.js +525 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/integrations.d.ts +8 -0
- package/dist/commands/integrations.js +112 -0
- package/dist/commands/integrations.js.map +1 -0
- package/dist/commands/listen.d.ts +17 -0
- package/dist/commands/listen.js +223 -0
- package/dist/commands/listen.js.map +1 -0
- package/dist/commands/mcp.d.ts +38 -0
- package/dist/commands/mcp.js +111 -0
- package/dist/commands/mcp.js.map +1 -0
- package/dist/commands/migrate.d.ts +16 -0
- package/dist/commands/migrate.js +114 -0
- package/dist/commands/migrate.js.map +1 -0
- package/dist/commands/move-origin.d.ts +11 -0
- package/dist/commands/move-origin.js +95 -0
- package/dist/commands/move-origin.js.map +1 -0
- package/dist/commands/operator.d.ts +18 -0
- package/dist/commands/operator.js +238 -0
- package/dist/commands/operator.js.map +1 -0
- package/dist/commands/orgs.d.ts +4 -0
- package/dist/commands/orgs.js +72 -0
- package/dist/commands/orgs.js.map +1 -0
- package/dist/commands/pages.d.ts +14 -0
- package/dist/commands/pages.js +113 -0
- package/dist/commands/pages.js.map +1 -0
- package/dist/commands/partner-platforms.d.ts +10 -0
- package/dist/commands/partner-platforms.js +157 -0
- package/dist/commands/partner-platforms.js.map +1 -0
- package/dist/commands/project-commands.d.ts +38 -0
- package/dist/commands/project-commands.js +431 -0
- package/dist/commands/project-commands.js.map +1 -0
- package/dist/commands/referrals.d.ts +69 -0
- package/dist/commands/referrals.js +1056 -0
- package/dist/commands/referrals.js.map +1 -0
- package/dist/commands/resources.d.ts +44 -0
- package/dist/commands/resources.js +234 -0
- package/dist/commands/resources.js.map +1 -0
- package/dist/commands/sessions.d.ts +4 -0
- package/dist/commands/sessions.js +28 -0
- package/dist/commands/sessions.js.map +1 -0
- package/dist/commands/setup-guide.d.ts +3 -0
- package/dist/commands/setup-guide.js +38 -0
- package/dist/commands/setup-guide.js.map +1 -0
- package/dist/commands/shared.d.ts +38 -0
- package/dist/commands/shared.js +69 -0
- package/dist/commands/shared.js.map +1 -0
- package/dist/commands/status.d.ts +3 -0
- package/dist/commands/status.js +77 -0
- package/dist/commands/status.js.map +1 -0
- package/dist/commands/users.d.ts +4 -0
- package/dist/commands/users.js +111 -0
- package/dist/commands/users.js.map +1 -0
- package/dist/commands/webhooks.d.ts +34 -0
- package/dist/commands/webhooks.js +301 -0
- package/dist/commands/webhooks.js.map +1 -0
- package/dist/config-http.d.ts +38 -0
- package/dist/config-http.js +70 -0
- package/dist/config-http.js.map +1 -0
- package/dist/config.d.ts +64 -0
- package/dist/config.js +69 -0
- package/dist/config.js.map +1 -0
- package/dist/context.d.ts +89 -0
- package/dist/context.js +32 -0
- package/dist/context.js.map +1 -0
- package/dist/define-config.d.ts +9 -0
- package/dist/define-config.js +8 -0
- package/dist/define-config.js.map +1 -0
- package/dist/errors.d.ts +15 -0
- package/dist/errors.js +25 -0
- package/dist/errors.js.map +1 -0
- package/dist/help.d.ts +8 -0
- package/dist/help.js +926 -0
- package/dist/help.js.map +1 -0
- package/dist/import/csv.d.ts +6 -0
- package/dist/import/csv.js +63 -0
- package/dist/import/csv.js.map +1 -0
- package/dist/import/vendors.d.ts +57 -0
- package/dist/import/vendors.js +568 -0
- package/dist/import/vendors.js.map +1 -0
- package/dist/index.d.ts +33 -0
- package/dist/index.js +81 -0
- package/dist/index.js.map +1 -0
- package/dist/io.d.ts +21 -0
- package/dist/io.js +28 -0
- package/dist/io.js.map +1 -0
- package/dist/migrate/appwrite/plugin.d.ts +2 -0
- package/dist/migrate/appwrite/plugin.js +103 -0
- package/dist/migrate/appwrite/plugin.js.map +1 -0
- package/dist/migrate/auth0/plugin.d.ts +2 -0
- package/dist/migrate/auth0/plugin.js +126 -0
- package/dist/migrate/auth0/plugin.js.map +1 -0
- package/dist/migrate/authentik/plugin.d.ts +2 -0
- package/dist/migrate/authentik/plugin.js +135 -0
- package/dist/migrate/authentik/plugin.js.map +1 -0
- package/dist/migrate/azure-ad-b2c/plugin.d.ts +8 -0
- package/dist/migrate/azure-ad-b2c/plugin.js +165 -0
- package/dist/migrate/azure-ad-b2c/plugin.js.map +1 -0
- package/dist/migrate/better-auth/integration.d.ts +59 -0
- package/dist/migrate/better-auth/integration.js +81 -0
- package/dist/migrate/better-auth/integration.js.map +1 -0
- package/dist/migrate/better-auth/orchestrator.d.ts +43 -0
- package/dist/migrate/better-auth/orchestrator.js +525 -0
- package/dist/migrate/better-auth/orchestrator.js.map +1 -0
- package/dist/migrate/better-auth/output.d.ts +20 -0
- package/dist/migrate/better-auth/output.js +146 -0
- package/dist/migrate/better-auth/output.js.map +1 -0
- package/dist/migrate/better-auth/translate.d.ts +77 -0
- package/dist/migrate/better-auth/translate.js +1989 -0
- package/dist/migrate/better-auth/translate.js.map +1 -0
- package/dist/migrate/clerk/plugin.d.ts +2 -0
- package/dist/migrate/clerk/plugin.js +76 -0
- package/dist/migrate/clerk/plugin.js.map +1 -0
- package/dist/migrate/cognito/plugin.d.ts +5 -0
- package/dist/migrate/cognito/plugin.js +170 -0
- package/dist/migrate/cognito/plugin.js.map +1 -0
- package/dist/migrate/corbado/plugin.d.ts +2 -0
- package/dist/migrate/corbado/plugin.js +63 -0
- package/dist/migrate/corbado/plugin.js.map +1 -0
- package/dist/migrate/descope/plugin.d.ts +2 -0
- package/dist/migrate/descope/plugin.js +83 -0
- package/dist/migrate/descope/plugin.js.map +1 -0
- package/dist/migrate/entra-external-id/plugin.d.ts +8 -0
- package/dist/migrate/entra-external-id/plugin.js +12 -0
- package/dist/migrate/entra-external-id/plugin.js.map +1 -0
- package/dist/migrate/export/appwrite-config.d.ts +28 -0
- package/dist/migrate/export/appwrite-config.js +170 -0
- package/dist/migrate/export/appwrite-config.js.map +1 -0
- package/dist/migrate/export/appwrite.d.ts +51 -0
- package/dist/migrate/export/appwrite.js +288 -0
- package/dist/migrate/export/appwrite.js.map +1 -0
- package/dist/migrate/export/auth0-config.d.ts +29 -0
- package/dist/migrate/export/auth0-config.js +249 -0
- package/dist/migrate/export/auth0-config.js.map +1 -0
- package/dist/migrate/export/auth0.d.ts +62 -0
- package/dist/migrate/export/auth0.js +575 -0
- package/dist/migrate/export/auth0.js.map +1 -0
- package/dist/migrate/export/authentik-config.d.ts +45 -0
- package/dist/migrate/export/authentik-config.js +357 -0
- package/dist/migrate/export/authentik-config.js.map +1 -0
- package/dist/migrate/export/authentik.d.ts +110 -0
- package/dist/migrate/export/authentik.js +838 -0
- package/dist/migrate/export/authentik.js.map +1 -0
- package/dist/migrate/export/azure-config.d.ts +58 -0
- package/dist/migrate/export/azure-config.js +344 -0
- package/dist/migrate/export/azure-config.js.map +1 -0
- package/dist/migrate/export/azure.d.ts +85 -0
- package/dist/migrate/export/azure.js +373 -0
- package/dist/migrate/export/azure.js.map +1 -0
- package/dist/migrate/export/clerk-config.d.ts +26 -0
- package/dist/migrate/export/clerk-config.js +227 -0
- package/dist/migrate/export/clerk-config.js.map +1 -0
- package/dist/migrate/export/clerk.d.ts +46 -0
- package/dist/migrate/export/clerk.js +486 -0
- package/dist/migrate/export/clerk.js.map +1 -0
- package/dist/migrate/export/cognito-config.d.ts +25 -0
- package/dist/migrate/export/cognito-config.js +273 -0
- package/dist/migrate/export/cognito-config.js.map +1 -0
- package/dist/migrate/export/cognito.d.ts +103 -0
- package/dist/migrate/export/cognito.js +441 -0
- package/dist/migrate/export/cognito.js.map +1 -0
- package/dist/migrate/export/corbado-config.d.ts +20 -0
- package/dist/migrate/export/corbado-config.js +63 -0
- package/dist/migrate/export/corbado-config.js.map +1 -0
- package/dist/migrate/export/corbado.d.ts +37 -0
- package/dist/migrate/export/corbado.js +132 -0
- package/dist/migrate/export/corbado.js.map +1 -0
- package/dist/migrate/export/descope.d.ts +35 -0
- package/dist/migrate/export/descope.js +208 -0
- package/dist/migrate/export/descope.js.map +1 -0
- package/dist/migrate/export/fake-vendor.test-helper.d.ts +27 -0
- package/dist/migrate/export/fake-vendor.test-helper.js +41 -0
- package/dist/migrate/export/fake-vendor.test-helper.js.map +1 -0
- package/dist/migrate/export/firebase-config.d.ts +24 -0
- package/dist/migrate/export/firebase-config.js +215 -0
- package/dist/migrate/export/firebase-config.js.map +1 -0
- package/dist/migrate/export/firebase.d.ts +102 -0
- package/dist/migrate/export/firebase.js +464 -0
- package/dist/migrate/export/firebase.js.map +1 -0
- package/dist/migrate/export/frameworks/app-users.d.ts +42 -0
- package/dist/migrate/export/frameworks/app-users.js +161 -0
- package/dist/migrate/export/frameworks/app-users.js.map +1 -0
- package/dist/migrate/export/frameworks/authjs.d.ts +41 -0
- package/dist/migrate/export/frameworks/authjs.js +146 -0
- package/dist/migrate/export/frameworks/authjs.js.map +1 -0
- package/dist/migrate/export/frameworks/devise.d.ts +39 -0
- package/dist/migrate/export/frameworks/devise.js +218 -0
- package/dist/migrate/export/frameworks/devise.js.map +1 -0
- package/dist/migrate/export/frameworks/django.d.ts +45 -0
- package/dist/migrate/export/frameworks/django.js +315 -0
- package/dist/migrate/export/frameworks/django.js.map +1 -0
- package/dist/migrate/export/frameworks/lucia.d.ts +42 -0
- package/dist/migrate/export/frameworks/lucia.js +263 -0
- package/dist/migrate/export/frameworks/lucia.js.map +1 -0
- package/dist/migrate/export/frameworks/tables.d.ts +90 -0
- package/dist/migrate/export/frameworks/tables.js +325 -0
- package/dist/migrate/export/frameworks/tables.js.map +1 -0
- package/dist/migrate/export/frameworks/webauthn.d.ts +25 -0
- package/dist/migrate/export/frameworks/webauthn.js +130 -0
- package/dist/migrate/export/frameworks/webauthn.js.map +1 -0
- package/dist/migrate/export/frontegg-config.d.ts +29 -0
- package/dist/migrate/export/frontegg-config.js +238 -0
- package/dist/migrate/export/frontegg-config.js.map +1 -0
- package/dist/migrate/export/frontegg.d.ts +67 -0
- package/dist/migrate/export/frontegg.js +410 -0
- package/dist/migrate/export/frontegg.js.map +1 -0
- package/dist/migrate/export/fusionauth-config.d.ts +26 -0
- package/dist/migrate/export/fusionauth-config.js +226 -0
- package/dist/migrate/export/fusionauth-config.js.map +1 -0
- package/dist/migrate/export/fusionauth.d.ts +99 -0
- package/dist/migrate/export/fusionauth.js +642 -0
- package/dist/migrate/export/fusionauth.js.map +1 -0
- package/dist/migrate/export/hanko-config.d.ts +27 -0
- package/dist/migrate/export/hanko-config.js +265 -0
- package/dist/migrate/export/hanko-config.js.map +1 -0
- package/dist/migrate/export/hanko.d.ts +52 -0
- package/dist/migrate/export/hanko.js +605 -0
- package/dist/migrate/export/hanko.js.map +1 -0
- package/dist/migrate/export/keycloak-config.d.ts +19 -0
- package/dist/migrate/export/keycloak-config.js +219 -0
- package/dist/migrate/export/keycloak-config.js.map +1 -0
- package/dist/migrate/export/keycloak.d.ts +155 -0
- package/dist/migrate/export/keycloak.js +878 -0
- package/dist/migrate/export/keycloak.js.map +1 -0
- package/dist/migrate/export/kinde-descope-config.d.ts +38 -0
- package/dist/migrate/export/kinde-descope-config.js +172 -0
- package/dist/migrate/export/kinde-descope-config.js.map +1 -0
- package/dist/migrate/export/kinde.d.ts +57 -0
- package/dist/migrate/export/kinde.js +333 -0
- package/dist/migrate/export/kinde.js.map +1 -0
- package/dist/migrate/export/ldap.d.ts +53 -0
- package/dist/migrate/export/ldap.js +277 -0
- package/dist/migrate/export/ldap.js.map +1 -0
- package/dist/migrate/export/logto-config.d.ts +27 -0
- package/dist/migrate/export/logto-config.js +264 -0
- package/dist/migrate/export/logto-config.js.map +1 -0
- package/dist/migrate/export/logto.d.ts +150 -0
- package/dist/migrate/export/logto.js +809 -0
- package/dist/migrate/export/logto.js.map +1 -0
- package/dist/migrate/export/magic-config.d.ts +14 -0
- package/dist/migrate/export/magic-config.js +28 -0
- package/dist/migrate/export/magic-config.js.map +1 -0
- package/dist/migrate/export/magic.d.ts +31 -0
- package/dist/migrate/export/magic.js +93 -0
- package/dist/migrate/export/magic.js.map +1 -0
- package/dist/migrate/export/mini-yaml.d.ts +19 -0
- package/dist/migrate/export/mini-yaml.js +581 -0
- package/dist/migrate/export/mini-yaml.js.map +1 -0
- package/dist/migrate/export/nhost-config.d.ts +26 -0
- package/dist/migrate/export/nhost-config.js +360 -0
- package/dist/migrate/export/nhost-config.js.map +1 -0
- package/dist/migrate/export/nhost.d.ts +64 -0
- package/dist/migrate/export/nhost.js +304 -0
- package/dist/migrate/export/nhost.js.map +1 -0
- package/dist/migrate/export/okta-config.d.ts +30 -0
- package/dist/migrate/export/okta-config.js +205 -0
- package/dist/migrate/export/okta-config.js.map +1 -0
- package/dist/migrate/export/okta.d.ts +43 -0
- package/dist/migrate/export/okta.js +337 -0
- package/dist/migrate/export/okta.js.map +1 -0
- package/dist/migrate/export/onelogin.d.ts +22 -0
- package/dist/migrate/export/onelogin.js +123 -0
- package/dist/migrate/export/onelogin.js.map +1 -0
- package/dist/migrate/export/ory-config.d.ts +58 -0
- package/dist/migrate/export/ory-config.js +451 -0
- package/dist/migrate/export/ory-config.js.map +1 -0
- package/dist/migrate/export/ory.d.ts +81 -0
- package/dist/migrate/export/ory.js +555 -0
- package/dist/migrate/export/ory.js.map +1 -0
- package/dist/migrate/export/password-detect.d.ts +29 -0
- package/dist/migrate/export/password-detect.js +81 -0
- package/dist/migrate/export/password-detect.js.map +1 -0
- package/dist/migrate/export/pingone.d.ts +36 -0
- package/dist/migrate/export/pingone.js +218 -0
- package/dist/migrate/export/pingone.js.map +1 -0
- package/dist/migrate/export/plugin-kit.d.ts +25 -0
- package/dist/migrate/export/plugin-kit.js +82 -0
- package/dist/migrate/export/plugin-kit.js.map +1 -0
- package/dist/migrate/export/pocketbase-config.d.ts +28 -0
- package/dist/migrate/export/pocketbase-config.js +180 -0
- package/dist/migrate/export/pocketbase-config.js.map +1 -0
- package/dist/migrate/export/pocketbase.d.ts +52 -0
- package/dist/migrate/export/pocketbase.js +243 -0
- package/dist/migrate/export/pocketbase.js.map +1 -0
- package/dist/migrate/export/project-files.d.ts +15 -0
- package/dist/migrate/export/project-files.js +43 -0
- package/dist/migrate/export/project-files.js.map +1 -0
- package/dist/migrate/export/propelauth-config.d.ts +18 -0
- package/dist/migrate/export/propelauth-config.js +58 -0
- package/dist/migrate/export/propelauth-config.js.map +1 -0
- package/dist/migrate/export/propelauth-harness.test-helper.d.ts +62 -0
- package/dist/migrate/export/propelauth-harness.test-helper.js +109 -0
- package/dist/migrate/export/propelauth-harness.test-helper.js.map +1 -0
- package/dist/migrate/export/propelauth.d.ts +48 -0
- package/dist/migrate/export/propelauth.js +255 -0
- package/dist/migrate/export/propelauth.js.map +1 -0
- package/dist/migrate/export/record-set.d.ts +44 -0
- package/dist/migrate/export/record-set.js +98 -0
- package/dist/migrate/export/record-set.js.map +1 -0
- package/dist/migrate/export/source-lines.d.ts +17 -0
- package/dist/migrate/export/source-lines.js +43 -0
- package/dist/migrate/export/source-lines.js.map +1 -0
- package/dist/migrate/export/sso-metadata.d.ts +47 -0
- package/dist/migrate/export/sso-metadata.js +180 -0
- package/dist/migrate/export/sso-metadata.js.map +1 -0
- package/dist/migrate/export/stytch-config.d.ts +22 -0
- package/dist/migrate/export/stytch-config.js +102 -0
- package/dist/migrate/export/stytch-config.js.map +1 -0
- package/dist/migrate/export/stytch.d.ts +68 -0
- package/dist/migrate/export/stytch.js +510 -0
- package/dist/migrate/export/stytch.js.map +1 -0
- package/dist/migrate/export/supabase-config.d.ts +48 -0
- package/dist/migrate/export/supabase-config.js +408 -0
- package/dist/migrate/export/supabase-config.js.map +1 -0
- package/dist/migrate/export/supabase.d.ts +86 -0
- package/dist/migrate/export/supabase.js +524 -0
- package/dist/migrate/export/supabase.js.map +1 -0
- package/dist/migrate/export/supertokens-config.d.ts +20 -0
- package/dist/migrate/export/supertokens-config.js +150 -0
- package/dist/migrate/export/supertokens-config.js.map +1 -0
- package/dist/migrate/export/supertokens.d.ts +125 -0
- package/dist/migrate/export/supertokens.js +464 -0
- package/dist/migrate/export/supertokens.js.map +1 -0
- package/dist/migrate/export/table.d.ts +35 -0
- package/dist/migrate/export/table.js +248 -0
- package/dist/migrate/export/table.js.map +1 -0
- package/dist/migrate/export/translate-kit.d.ts +46 -0
- package/dist/migrate/export/translate-kit.js +148 -0
- package/dist/migrate/export/translate-kit.js.map +1 -0
- package/dist/migrate/export/userfront-config.d.ts +15 -0
- package/dist/migrate/export/userfront-config.js +49 -0
- package/dist/migrate/export/userfront-config.js.map +1 -0
- package/dist/migrate/export/userfront.d.ts +38 -0
- package/dist/migrate/export/userfront.js +189 -0
- package/dist/migrate/export/userfront.js.map +1 -0
- package/dist/migrate/export/vendor-http.d.ts +46 -0
- package/dist/migrate/export/vendor-http.js +138 -0
- package/dist/migrate/export/vendor-http.js.map +1 -0
- package/dist/migrate/export/workos-config.d.ts +23 -0
- package/dist/migrate/export/workos-config.js +125 -0
- package/dist/migrate/export/workos-config.js.map +1 -0
- package/dist/migrate/export/workos.d.ts +46 -0
- package/dist/migrate/export/workos.js +272 -0
- package/dist/migrate/export/workos.js.map +1 -0
- package/dist/migrate/export/zip.d.ts +8 -0
- package/dist/migrate/export/zip.js +66 -0
- package/dist/migrate/export/zip.js.map +1 -0
- package/dist/migrate/export/zitadel-config.d.ts +37 -0
- package/dist/migrate/export/zitadel-config.js +279 -0
- package/dist/migrate/export/zitadel-config.js.map +1 -0
- package/dist/migrate/export/zitadel.d.ts +82 -0
- package/dist/migrate/export/zitadel.js +447 -0
- package/dist/migrate/export/zitadel.js.map +1 -0
- package/dist/migrate/firebase/plugin.d.ts +2 -0
- package/dist/migrate/firebase/plugin.js +152 -0
- package/dist/migrate/firebase/plugin.js.map +1 -0
- package/dist/migrate/framework/builtins.d.ts +2 -0
- package/dist/migrate/framework/builtins.js +52 -0
- package/dist/migrate/framework/builtins.js.map +1 -0
- package/dist/migrate/framework/commands.d.ts +20 -0
- package/dist/migrate/framework/commands.js +58 -0
- package/dist/migrate/framework/commands.js.map +1 -0
- package/dist/migrate/framework/custom.d.ts +12 -0
- package/dist/migrate/framework/custom.js +96 -0
- package/dist/migrate/framework/custom.js.map +1 -0
- package/dist/migrate/framework/orchestrator.d.ts +113 -0
- package/dist/migrate/framework/orchestrator.js +532 -0
- package/dist/migrate/framework/orchestrator.js.map +1 -0
- package/dist/migrate/framework/plugin.d.ts +167 -0
- package/dist/migrate/framework/plugin.js +3 -0
- package/dist/migrate/framework/plugin.js.map +1 -0
- package/dist/migrate/framework/registry.d.ts +11 -0
- package/dist/migrate/framework/registry.js +44 -0
- package/dist/migrate/framework/registry.js.map +1 -0
- package/dist/migrate/framework/report.d.ts +17 -0
- package/dist/migrate/framework/report.js +103 -0
- package/dist/migrate/framework/report.js.map +1 -0
- package/dist/migrate/frameworks/plugins.d.ts +29 -0
- package/dist/migrate/frameworks/plugins.js +402 -0
- package/dist/migrate/frameworks/plugins.js.map +1 -0
- package/dist/migrate/frameworks/report.d.ts +92 -0
- package/dist/migrate/frameworks/report.js +207 -0
- package/dist/migrate/frameworks/report.js.map +1 -0
- package/dist/migrate/frameworks/translate-js.d.ts +5 -0
- package/dist/migrate/frameworks/translate-js.js +503 -0
- package/dist/migrate/frameworks/translate-js.js.map +1 -0
- package/dist/migrate/frameworks/translate-rails-django.d.ts +3 -0
- package/dist/migrate/frameworks/translate-rails-django.js +1391 -0
- package/dist/migrate/frameworks/translate-rails-django.js.map +1 -0
- package/dist/migrate/frontegg/plugin.d.ts +2 -0
- package/dist/migrate/frontegg/plugin.js +78 -0
- package/dist/migrate/frontegg/plugin.js.map +1 -0
- package/dist/migrate/fusionauth/plugin.d.ts +2 -0
- package/dist/migrate/fusionauth/plugin.js +109 -0
- package/dist/migrate/fusionauth/plugin.js.map +1 -0
- package/dist/migrate/hanko/plugin.d.ts +2 -0
- package/dist/migrate/hanko/plugin.js +100 -0
- package/dist/migrate/hanko/plugin.js.map +1 -0
- package/dist/migrate/keycloak/plugin.d.ts +2 -0
- package/dist/migrate/keycloak/plugin.js +148 -0
- package/dist/migrate/keycloak/plugin.js.map +1 -0
- package/dist/migrate/kinde/plugin.d.ts +2 -0
- package/dist/migrate/kinde/plugin.js +105 -0
- package/dist/migrate/kinde/plugin.js.map +1 -0
- package/dist/migrate/ldap/plugin.d.ts +2 -0
- package/dist/migrate/ldap/plugin.js +73 -0
- package/dist/migrate/ldap/plugin.js.map +1 -0
- package/dist/migrate/logto/plugin.d.ts +2 -0
- package/dist/migrate/logto/plugin.js +131 -0
- package/dist/migrate/logto/plugin.js.map +1 -0
- package/dist/migrate/magic/plugin.d.ts +2 -0
- package/dist/migrate/magic/plugin.js +56 -0
- package/dist/migrate/magic/plugin.js.map +1 -0
- package/dist/migrate/nhost/plugin.d.ts +2 -0
- package/dist/migrate/nhost/plugin.js +115 -0
- package/dist/migrate/nhost/plugin.js.map +1 -0
- package/dist/migrate/oidc/plugin.d.ts +2 -0
- package/dist/migrate/oidc/plugin.js +73 -0
- package/dist/migrate/oidc/plugin.js.map +1 -0
- package/dist/migrate/okta/plugin.d.ts +2 -0
- package/dist/migrate/okta/plugin.js +105 -0
- package/dist/migrate/okta/plugin.js.map +1 -0
- package/dist/migrate/onelogin/plugin.d.ts +2 -0
- package/dist/migrate/onelogin/plugin.js +61 -0
- package/dist/migrate/onelogin/plugin.js.map +1 -0
- package/dist/migrate/ory/plugin.d.ts +2 -0
- package/dist/migrate/ory/plugin.js +186 -0
- package/dist/migrate/ory/plugin.js.map +1 -0
- package/dist/migrate/ping-identity/plugin.d.ts +2 -0
- package/dist/migrate/ping-identity/plugin.js +100 -0
- package/dist/migrate/ping-identity/plugin.js.map +1 -0
- package/dist/migrate/pocketbase/plugin.d.ts +2 -0
- package/dist/migrate/pocketbase/plugin.js +99 -0
- package/dist/migrate/pocketbase/plugin.js.map +1 -0
- package/dist/migrate/propelauth/plugin.d.ts +2 -0
- package/dist/migrate/propelauth/plugin.js +65 -0
- package/dist/migrate/propelauth/plugin.js.map +1 -0
- package/dist/migrate/saml/plugin.d.ts +2 -0
- package/dist/migrate/saml/plugin.js +79 -0
- package/dist/migrate/saml/plugin.js.map +1 -0
- package/dist/migrate/stytch/plugin.d.ts +2 -0
- package/dist/migrate/stytch/plugin.js +97 -0
- package/dist/migrate/stytch/plugin.js.map +1 -0
- package/dist/migrate/supabase/plugin.d.ts +2 -0
- package/dist/migrate/supabase/plugin.js +149 -0
- package/dist/migrate/supabase/plugin.js.map +1 -0
- package/dist/migrate/supertokens/plugin.d.ts +2 -0
- package/dist/migrate/supertokens/plugin.js +114 -0
- package/dist/migrate/supertokens/plugin.js.map +1 -0
- package/dist/migrate/user-table/plugin.d.ts +2 -0
- package/dist/migrate/user-table/plugin.js +62 -0
- package/dist/migrate/user-table/plugin.js.map +1 -0
- package/dist/migrate/userfront/plugin.d.ts +2 -0
- package/dist/migrate/userfront/plugin.js +60 -0
- package/dist/migrate/userfront/plugin.js.map +1 -0
- package/dist/migrate/workos/plugin.d.ts +2 -0
- package/dist/migrate/workos/plugin.js +81 -0
- package/dist/migrate/workos/plugin.js.map +1 -0
- package/dist/migrate/zitadel/plugin.d.ts +2 -0
- package/dist/migrate/zitadel/plugin.js +114 -0
- package/dist/migrate/zitadel/plugin.js.map +1 -0
- package/dist/output.d.ts +41 -0
- package/dist/output.js +72 -0
- package/dist/output.js.map +1 -0
- package/dist/project.d.ts +64 -0
- package/dist/project.js +86 -0
- package/dist/project.js.map +1 -0
- package/dist/prompt.d.ts +15 -0
- package/dist/prompt.js +46 -0
- package/dist/prompt.js.map +1 -0
- package/dist/redact.d.ts +41 -0
- package/dist/redact.js +115 -0
- package/dist/redact.js.map +1 -0
- package/dist/run.d.ts +12 -0
- package/dist/run.js +169 -0
- package/dist/run.js.map +1 -0
- package/dist/secrets.d.ts +41 -0
- package/dist/secrets.js +142 -0
- package/dist/secrets.js.map +1 -0
- package/dist/serialize.d.ts +30 -0
- package/dist/serialize.js +131 -0
- package/dist/serialize.js.map +1 -0
- package/dist/version.d.ts +7 -0
- package/dist/version.js +21 -0
- package/dist/version.js.map +1 -0
- package/package.json +3 -3
|
@@ -0,0 +1,402 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FRAMEWORK_PLUGINS = exports.djangoPlugin = exports.devisePlugin = exports.ironSessionPlugin = exports.passportPlugin = exports.luciaPlugin = exports.authJsPlugin = exports.ASSERTION_PRESETS = void 0;
|
|
4
|
+
exports.readInput = readInput;
|
|
5
|
+
exports.writeFrameworkExport = writeFrameworkExport;
|
|
6
|
+
exports.bridgeSecret = bridgeSecret;
|
|
7
|
+
exports.parsePairs = parsePairs;
|
|
8
|
+
const node_crypto_1 = require("node:crypto");
|
|
9
|
+
const node_fs_1 = require("node:fs");
|
|
10
|
+
const node_path_1 = require("node:path");
|
|
11
|
+
const args_1 = require("../../args");
|
|
12
|
+
const errors_1 = require("../../errors");
|
|
13
|
+
const app_users_1 = require("../export/frameworks/app-users");
|
|
14
|
+
const authjs_1 = require("../export/frameworks/authjs");
|
|
15
|
+
const devise_1 = require("../export/frameworks/devise");
|
|
16
|
+
const django_1 = require("../export/frameworks/django");
|
|
17
|
+
const lucia_1 = require("../export/frameworks/lucia");
|
|
18
|
+
const tables_1 = require("../export/frameworks/tables");
|
|
19
|
+
const translate_js_1 = require("./translate-js");
|
|
20
|
+
const translate_rails_django_1 = require("./translate-rails-django");
|
|
21
|
+
/**
|
|
22
|
+
* The `atlas migrate <vendor>` plugins for the self-hosted frameworks:
|
|
23
|
+
* Auth.js / NextAuth, Lucia, Passport (+ express-session), iron-session,
|
|
24
|
+
* Devise and Django (contrib.auth + allauth).
|
|
25
|
+
*
|
|
26
|
+
* These keep users in the APP's database, so there is no vendor API to call:
|
|
27
|
+
* `config` reads the app's source (statically), `export` reads table dumps
|
|
28
|
+
* made with the owner's own tools (`--set dump=<dir>`) or the NDJSON a
|
|
29
|
+
* framework export script prints (`--file <path>`, `--file -` for stdin).
|
|
30
|
+
* Database credentials and app secrets never reach the CLI, let alone Atlas.
|
|
31
|
+
*/
|
|
32
|
+
// ── Shared inputs ───────────────────────────────────────────────────────────
|
|
33
|
+
const DUMP = { flag: '--dump', env: 'ATLAS_MIGRATE_DUMP', label: 'the folder of table dumps (--set dump=<dir>)', required: false };
|
|
34
|
+
const RP_ID = { flag: '--rp-id', env: 'ATLAS_MIGRATE_RP_ID', label: 'the WebAuthn relying-party id passkeys were registered on (your domain)', required: false };
|
|
35
|
+
const SESSIONS = { flag: '--sessions', env: 'ATLAS_MIGRATE_SESSIONS', label: 'whether to export live sessions (true / false)', required: false };
|
|
36
|
+
function setting(p, name, env, label, secret = false) {
|
|
37
|
+
return p.credential({ flag: `--${name}`, env, label, required: false, secret });
|
|
38
|
+
}
|
|
39
|
+
function flagBool(p, spec, fallback) {
|
|
40
|
+
const v = p.credential(spec)?.toLowerCase();
|
|
41
|
+
if (v === undefined)
|
|
42
|
+
return fallback;
|
|
43
|
+
if (['1', 'true', 'yes', 'on'].includes(v))
|
|
44
|
+
return true;
|
|
45
|
+
if (['0', 'false', 'no', 'off'].includes(v))
|
|
46
|
+
return false;
|
|
47
|
+
throw new errors_1.CliError(`${spec.label}: expected true or false, got "${v}".`);
|
|
48
|
+
}
|
|
49
|
+
/** The `--file` path, `-` for stdin. */
|
|
50
|
+
function fileArg(p) {
|
|
51
|
+
return (0, args_1.str)(p.args.values, 'file');
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* The tables to export from: `--file` (an export script's NDJSON stream, or a
|
|
55
|
+
* single JSON / NDJSON / CSV table file) and/or `--set dump=<dir>`.
|
|
56
|
+
*/
|
|
57
|
+
function readInput(p, opts = {}) {
|
|
58
|
+
const dump = p.credential(DUMP);
|
|
59
|
+
const file = fileArg(p);
|
|
60
|
+
const tables = dump ? (0, tables_1.readDumpDir)((0, node_path_1.resolve)(dump)) : new tables_1.Tables();
|
|
61
|
+
if (file) {
|
|
62
|
+
const text = file === '-' ? (0, node_fs_1.readFileSync)(0, 'utf8') : p.ctx.readFile((0, node_path_1.resolve)(file));
|
|
63
|
+
if (opts.singleFile && !looksLikeStream(text))
|
|
64
|
+
opts.singleFile(text, tables);
|
|
65
|
+
else
|
|
66
|
+
(0, tables_1.tablesFromStream)(text, tables);
|
|
67
|
+
}
|
|
68
|
+
return tables;
|
|
69
|
+
}
|
|
70
|
+
/** True for the export scripts' `{"table": …, "row": …}` NDJSON. */
|
|
71
|
+
function looksLikeStream(text) {
|
|
72
|
+
return /^\s*\{\s*"table"\s*:/m.test(text);
|
|
73
|
+
}
|
|
74
|
+
function needInput(p, hint) {
|
|
75
|
+
if (!p.credential(DUMP) && !fileArg(p))
|
|
76
|
+
throw new errors_1.CliError(hint);
|
|
77
|
+
}
|
|
78
|
+
/** Write a framework export's rows through the bundle writer, in canonical order. */
|
|
79
|
+
async function writeFrameworkExport(p, out, writer) {
|
|
80
|
+
for (const w of out.warnings)
|
|
81
|
+
writer.warn(w);
|
|
82
|
+
for (const [model, o] of Object.entries(out.omitted))
|
|
83
|
+
writer.omit(model, o.reason, o.count);
|
|
84
|
+
let written = 0;
|
|
85
|
+
for (const [model, data] of out.entries()) {
|
|
86
|
+
const issues = await writer.add(model, data);
|
|
87
|
+
if (issues.length)
|
|
88
|
+
p.say(` left out a ${model}: ${issues[0].message}`);
|
|
89
|
+
else
|
|
90
|
+
written++;
|
|
91
|
+
}
|
|
92
|
+
const counts = Object.entries(out.counts()).map(([m, n]) => `${n} ${m}`).join(', ');
|
|
93
|
+
p.say(` read ${counts || 'no records'} (${written} written)`);
|
|
94
|
+
}
|
|
95
|
+
/** The bridge preset and variables: the translation's when there is one, flags over it. */
|
|
96
|
+
function bridgeVars(p, translation, names) {
|
|
97
|
+
const vars = { ...(translation?.bridge?.vars ?? {}) };
|
|
98
|
+
for (const name of names) {
|
|
99
|
+
const v = p.credential({ flag: `--${name.replace(/_/g, '-')}`, env: `ATLAS_BRIDGE_${name.toUpperCase()}`, label: name, required: false });
|
|
100
|
+
if (v)
|
|
101
|
+
vars[name] = v;
|
|
102
|
+
}
|
|
103
|
+
return vars;
|
|
104
|
+
}
|
|
105
|
+
function lazyConfig(p, translation, keys) {
|
|
106
|
+
const config = { ...(translation?.lazy?.config ?? {}) };
|
|
107
|
+
for (const key of keys) {
|
|
108
|
+
const v = p.credential({ flag: `--${key.replace(/_/g, '-')}`, env: `ATLAS_LAZY_${key.toUpperCase()}`, label: key, required: false });
|
|
109
|
+
if (v)
|
|
110
|
+
config[key] = v;
|
|
111
|
+
}
|
|
112
|
+
// A placeholder from the source is not a URL the preset can call.
|
|
113
|
+
for (const [k, v] of Object.entries(config))
|
|
114
|
+
if (v.includes('${'))
|
|
115
|
+
delete config[k];
|
|
116
|
+
return config;
|
|
117
|
+
}
|
|
118
|
+
/** Presets whose token is a bridge assertion signed on the owner's server (see the backend extractors). */
|
|
119
|
+
exports.ASSERTION_PRESETS = new Set(['authjs_jwt', 'iron_session', 'devise', 'django_signed_cookies']);
|
|
120
|
+
/**
|
|
121
|
+
* The bridge secret shared by the extractor on your server and Atlas:
|
|
122
|
+
* `--set bridge-secret=…` / ATLAS_BRIDGE_SECRET, else the one generated on an
|
|
123
|
+
* earlier run, else a new one — kept in atlas-migrate/<vendor>/bridge-secret
|
|
124
|
+
* (mode 0600) for your server's ATLAS_BRIDGE_SECRET.
|
|
125
|
+
*/
|
|
126
|
+
function bridgeSecret(p, vendor, preset) {
|
|
127
|
+
if (!exports.ASSERTION_PRESETS.has(preset))
|
|
128
|
+
return undefined;
|
|
129
|
+
const given = p.credential({ flag: '--bridge-secret', env: 'ATLAS_BRIDGE_SECRET', label: 'the bridge secret', required: false, secret: true });
|
|
130
|
+
if (given)
|
|
131
|
+
return given;
|
|
132
|
+
const path = (0, node_path_1.resolve)(p.project, 'atlas-migrate', vendor, 'bridge-secret');
|
|
133
|
+
if ((0, node_fs_1.existsSync)(path)) {
|
|
134
|
+
const kept = (0, node_fs_1.readFileSync)(path, 'utf8').trim();
|
|
135
|
+
if (kept)
|
|
136
|
+
return kept;
|
|
137
|
+
}
|
|
138
|
+
const secret = (0, node_crypto_1.randomBytes)(32).toString('base64url');
|
|
139
|
+
(0, node_fs_1.mkdirSync)((0, node_path_1.resolve)(p.project, 'atlas-migrate', vendor), { recursive: true });
|
|
140
|
+
(0, node_fs_1.writeFileSync)(path, `${secret}\n`, { mode: 0o600 });
|
|
141
|
+
p.say(` generated the bridge secret in ${path}: set it as ATLAS_BRIDGE_SECRET on the server that runs the bridge middleware (it never goes in your code)`);
|
|
142
|
+
return secret;
|
|
143
|
+
}
|
|
144
|
+
function frameworkPlugin(input) {
|
|
145
|
+
return {
|
|
146
|
+
vendor: input.vendor,
|
|
147
|
+
source: input.source,
|
|
148
|
+
label: input.label,
|
|
149
|
+
help: input.help,
|
|
150
|
+
config: {
|
|
151
|
+
reads: input.reads,
|
|
152
|
+
async translate(p) {
|
|
153
|
+
return input.translate(p.project);
|
|
154
|
+
},
|
|
155
|
+
},
|
|
156
|
+
export: {
|
|
157
|
+
reads: input.exportReads,
|
|
158
|
+
credentials: input.credentials,
|
|
159
|
+
limits: input.limits,
|
|
160
|
+
check: input.check,
|
|
161
|
+
async run(p, writer) {
|
|
162
|
+
const out = input.run(p);
|
|
163
|
+
await writeFrameworkExport(p, out, writer);
|
|
164
|
+
},
|
|
165
|
+
},
|
|
166
|
+
bridge: {
|
|
167
|
+
preset: input.bridgePreset,
|
|
168
|
+
vars: (p, translation) => bridgeVars(p, translation, input.bridgeVarNames),
|
|
169
|
+
sharedSecret: (p, preset) => bridgeSecret(p, input.vendor, preset),
|
|
170
|
+
},
|
|
171
|
+
...(input.lazy
|
|
172
|
+
? {
|
|
173
|
+
lazy: {
|
|
174
|
+
preset: input.lazy.preset,
|
|
175
|
+
config: (p, translation) => lazyConfig(p, translation, input.lazy.keys),
|
|
176
|
+
optional: true,
|
|
177
|
+
},
|
|
178
|
+
}
|
|
179
|
+
: {}),
|
|
180
|
+
...(input.codemod ? { codemod: input.codemod } : {}),
|
|
181
|
+
};
|
|
182
|
+
}
|
|
183
|
+
const DUMP_HINT = (vendor, tables) => `Export your ${tables} first, one file per table (<table>.csv / .json / .ndjson — psql \\copy, sqlite3 -json, mongoexport, mysqldump --tab), then pass the folder: atlas migrate ${vendor} export --set dump=<dir>.`;
|
|
184
|
+
// ── Auth.js / NextAuth ──────────────────────────────────────────────────────
|
|
185
|
+
exports.authJsPlugin = frameworkPlugin({
|
|
186
|
+
vendor: 'authjs',
|
|
187
|
+
source: 'authjs',
|
|
188
|
+
label: 'Auth.js (NextAuth)',
|
|
189
|
+
help: 'Moves an Auth.js / NextAuth v4 or v5 app: config reads your NextAuth(...) / Auth(...) options (providers, session strategy and lifetime, cookies, pages); export reads your adapter tables (User, Account, Session, Authenticator) from a dump folder (--set dump=<dir>) — Prisma, Drizzle, Kysely, TypeORM, MongoDB and the SQL adapters all use these shapes. Database sessions bridge through the imported session table (preset authjs); JWT sessions are decrypted on your server with AUTH_SECRET (preset authjs_jwt).',
|
|
190
|
+
reads: 'your Auth.js configuration (auth.ts / [...nextauth].ts), statically',
|
|
191
|
+
translate: translate_js_1.translateAuthJs,
|
|
192
|
+
exportReads: 'a dump of your Auth.js adapter tables (--set dump=<dir>)',
|
|
193
|
+
credentials: [DUMP, RP_ID, SESSIONS],
|
|
194
|
+
check: (p) => needInput(p, DUMP_HINT('authjs', 'adapter tables (User, Account, Session, Authenticator)')),
|
|
195
|
+
run(p) {
|
|
196
|
+
return (0, authjs_1.exportAuthJs)(readInput(p), {
|
|
197
|
+
rpId: p.credential(RP_ID),
|
|
198
|
+
oauthTokens: flagBool(p, { flag: '--oauth-tokens', env: 'ATLAS_MIGRATE_OAUTH_TOKENS', label: 'whether to carry OAuth access / refresh tokens', required: false }, false),
|
|
199
|
+
sessions: flagBool(p, SESSIONS, true),
|
|
200
|
+
passwordColumn: setting(p, 'password-column', 'ATLAS_MIGRATE_PASSWORD_COLUMN', 'the users column holding a Credentials-provider hash'),
|
|
201
|
+
});
|
|
202
|
+
},
|
|
203
|
+
limits: [
|
|
204
|
+
'Passwords exist only if your Credentials provider stored hashes; a scheme Atlas cannot verify falls back to lazy migration (preset authjs_credentials).',
|
|
205
|
+
'JWT-strategy sessions live only in the browser: the bridge decrypts them on your server with AUTH_SECRET (preset authjs_jwt).',
|
|
206
|
+
'Verification tokens (magic links in flight) are not exported: those links expire and users request a new one.',
|
|
207
|
+
],
|
|
208
|
+
bridgePreset: 'authjs',
|
|
209
|
+
bridgeVarNames: ['cookie_name'],
|
|
210
|
+
lazy: { preset: 'authjs_credentials', keys: ['base_url', 'provider_id', 'identifier_field'] },
|
|
211
|
+
codemod: 'authjs',
|
|
212
|
+
});
|
|
213
|
+
// ── Lucia ───────────────────────────────────────────────────────────────────
|
|
214
|
+
exports.luciaPlugin = frameworkPlugin({
|
|
215
|
+
vendor: 'lucia',
|
|
216
|
+
source: 'lucia',
|
|
217
|
+
label: 'Lucia',
|
|
218
|
+
help: 'Moves a Lucia v2 / v3 app or one built on the Lucia guide (the post-v3 "sessions from scratch" pattern): config reads new Lucia(...) (session expiry, cookie name and attributes) and your Arctic OAuth providers; export reads the user, session, key / oauth_account, and guide TOTP / recovery / passkey tables from a dump folder. Sessions bridge through the imported session table (preset lucia).',
|
|
219
|
+
reads: 'your Lucia setup (new Lucia(...) and Arctic providers), statically',
|
|
220
|
+
translate: translate_js_1.translateLucia,
|
|
221
|
+
exportReads: 'a dump of your Lucia tables (--set dump=<dir>)',
|
|
222
|
+
credentials: [DUMP, RP_ID, SESSIONS, { flag: '--encryption-key', env: 'LUCIA_ENCRYPTION_KEY', label: 'the guide ENCRYPTION_KEY (base64), for TOTP keys and recovery codes', required: false, secret: true }],
|
|
223
|
+
check: (p) => needInput(p, DUMP_HINT('lucia', 'user, session and oauth_account / key tables')),
|
|
224
|
+
run(p) {
|
|
225
|
+
const hashing = setting(p, 'session-hashing', 'ATLAS_MIGRATE_SESSION_HASHING', 'how session ids store the token (none / sha256-hex)');
|
|
226
|
+
if (hashing && hashing !== 'none' && hashing !== 'sha256-hex')
|
|
227
|
+
throw new errors_1.CliError('session-hashing must be none or sha256-hex.');
|
|
228
|
+
return (0, lucia_1.exportLucia)(readInput(p), {
|
|
229
|
+
rpId: p.credential(RP_ID),
|
|
230
|
+
sessions: flagBool(p, SESSIONS, true),
|
|
231
|
+
encryptionKey: setting(p, 'encryption-key', 'LUCIA_ENCRYPTION_KEY', 'the guide ENCRYPTION_KEY', true),
|
|
232
|
+
sessionIdHashing: hashing,
|
|
233
|
+
userTable: setting(p, 'user-table', 'ATLAS_MIGRATE_USER_TABLE', 'the user table name'),
|
|
234
|
+
sessionTable: setting(p, 'session-table', 'ATLAS_MIGRATE_SESSION_TABLE', 'the session table name'),
|
|
235
|
+
oauthTable: setting(p, 'oauth-table', 'ATLAS_MIGRATE_OAUTH_TABLE', 'the OAuth account table name'),
|
|
236
|
+
});
|
|
237
|
+
},
|
|
238
|
+
limits: [
|
|
239
|
+
'Guide-style TOTP keys and recovery codes are encrypted with your ENCRYPTION_KEY: pass it (--set encryption-key=…, read only on this machine) or those users enrol again.',
|
|
240
|
+
'Passkeys with an algorithm other than ES256 cannot be converted and are re-registered.',
|
|
241
|
+
],
|
|
242
|
+
bridgePreset: 'lucia',
|
|
243
|
+
bridgeVarNames: ['cookie_name'],
|
|
244
|
+
codemod: 'lucia',
|
|
245
|
+
});
|
|
246
|
+
// ── Passport / iron-session (the app's own users table) ─────────────────────
|
|
247
|
+
function appUsersOptions(p) {
|
|
248
|
+
const s = (name, label) => setting(p, name, `ATLAS_MIGRATE_${name.toUpperCase().replace(/-/g, '_')}`, label);
|
|
249
|
+
const identityColumns = s('identity-columns', 'provider=column pairs, comma separated (google=googleId,github=githubId)');
|
|
250
|
+
const digest = s('plm-digest', 'the passport-local-mongoose digest (sha1 / sha256 / sha512)');
|
|
251
|
+
if (digest && !['sha1', 'sha256', 'sha512'].includes(digest))
|
|
252
|
+
throw new errors_1.CliError('plm-digest must be sha1, sha256 or sha512.');
|
|
253
|
+
const iterations = s('plm-iterations', 'the passport-local-mongoose iteration count');
|
|
254
|
+
if (iterations && !/^\d+$/.test(iterations))
|
|
255
|
+
throw new errors_1.CliError('plm-iterations must be a whole number.');
|
|
256
|
+
return {
|
|
257
|
+
usersTable: s('users-table', 'the users table'),
|
|
258
|
+
idColumn: s('id-column', 'the user id column'),
|
|
259
|
+
emailColumn: s('email-column', 'the email column'),
|
|
260
|
+
emailVerifiedColumn: s('email-verified-column', 'the email-verified column'),
|
|
261
|
+
usernameColumn: s('username-column', 'the username column'),
|
|
262
|
+
nameColumn: s('name-column', 'the display name column'),
|
|
263
|
+
passwordColumn: s('password-column', 'the password hash column'),
|
|
264
|
+
plmDigest: digest,
|
|
265
|
+
plmIterations: iterations ? Number(iterations) : undefined,
|
|
266
|
+
identityColumns: identityColumns ? parsePairs(identityColumns) : undefined,
|
|
267
|
+
identitiesTable: s('identities-table', 'a separate social identities table'),
|
|
268
|
+
sessionsTable: s('sessions-table', 'the express-session store table'),
|
|
269
|
+
sessionUserPath: s('session-user-path', 'where the user id sits in the session JSON'),
|
|
270
|
+
sessions: flagBool(p, SESSIONS, true),
|
|
271
|
+
};
|
|
272
|
+
}
|
|
273
|
+
/** `google=googleId,github=github_id` → { google: 'googleId', github: 'github_id' }. */
|
|
274
|
+
function parsePairs(text) {
|
|
275
|
+
const out = {};
|
|
276
|
+
for (const part of text.split(',')) {
|
|
277
|
+
const [k, v] = part.split('=').map((x) => x.trim());
|
|
278
|
+
if (!k || !v)
|
|
279
|
+
throw new errors_1.CliError(`identity-columns: "${part}" is not provider=column.`);
|
|
280
|
+
out[k] = v;
|
|
281
|
+
}
|
|
282
|
+
return out;
|
|
283
|
+
}
|
|
284
|
+
const APP_USERS_CREDENTIALS = [DUMP, SESSIONS];
|
|
285
|
+
exports.passportPlugin = frameworkPlugin({
|
|
286
|
+
vendor: 'passport',
|
|
287
|
+
source: 'passport',
|
|
288
|
+
label: 'Passport.js',
|
|
289
|
+
help: 'Moves an Express app on Passport.js and express-session: config reads your strategies (local, social, OIDC, SAML, JWT) and session() options; export reads YOUR users table by column (bcrypt, Argon2, scrypt, PBKDF2 and passport-local-mongoose hashes carry over), linked provider ids, and the express-session store (connect-pg-simple, connect-mongo, connect-redis dumps). Sessions bridge through the imported store (preset passport).',
|
|
290
|
+
reads: 'your Passport strategies and express-session options, statically',
|
|
291
|
+
translate: translate_js_1.translatePassport,
|
|
292
|
+
exportReads: 'a dump of your users table and session store (--set dump=<dir>)',
|
|
293
|
+
credentials: APP_USERS_CREDENTIALS,
|
|
294
|
+
check: (p) => needInput(p, DUMP_HINT('passport', 'users table (and your express-session store table)')),
|
|
295
|
+
run(p) {
|
|
296
|
+
return (0, app_users_1.exportAppUsers)(readInput(p), appUsersOptions(p));
|
|
297
|
+
},
|
|
298
|
+
limits: [
|
|
299
|
+
'Passport keeps no user store of its own: name your users table and columns when they differ from the defaults (--set users-table=… --set email-column=… --set password-column=…).',
|
|
300
|
+
'MemoryStore sessions cannot be exported: those users sign in again once.',
|
|
301
|
+
'A password scheme Atlas cannot verify falls back to lazy migration through a verify endpoint in your app (preset webhook).',
|
|
302
|
+
],
|
|
303
|
+
bridgePreset: 'passport',
|
|
304
|
+
bridgeVarNames: ['cookie_name'],
|
|
305
|
+
codemod: 'passport',
|
|
306
|
+
});
|
|
307
|
+
exports.ironSessionPlugin = frameworkPlugin({
|
|
308
|
+
vendor: 'iron-session',
|
|
309
|
+
source: 'iron_session',
|
|
310
|
+
label: 'iron-session',
|
|
311
|
+
help: 'Moves an app that keeps its session in an iron-session sealed cookie: config reads your session options (cookieName, ttl, cookieOptions); export reads YOUR users table by column. The session itself only exists in the cookie, so the bridge unseals it on your server with the session password (preset iron_session) and Atlas only sees a short-lived signed assertion.',
|
|
312
|
+
reads: 'your getIronSession / sealData options, statically',
|
|
313
|
+
translate: translate_js_1.translateIronSession,
|
|
314
|
+
exportReads: 'a dump of your users table (--set dump=<dir>)',
|
|
315
|
+
credentials: APP_USERS_CREDENTIALS,
|
|
316
|
+
check: (p) => needInput(p, DUMP_HINT('iron-session', 'users table')),
|
|
317
|
+
run(p) {
|
|
318
|
+
return (0, app_users_1.exportAppUsers)(readInput(p), { ...appUsersOptions(p), sessions: false });
|
|
319
|
+
},
|
|
320
|
+
limits: [
|
|
321
|
+
'iron-session has no server-side session store and no user table: export your own users table; sessions move through the bridge only.',
|
|
322
|
+
],
|
|
323
|
+
bridgePreset: 'iron_session',
|
|
324
|
+
bridgeVarNames: ['cookie_name'],
|
|
325
|
+
codemod: 'iron-session',
|
|
326
|
+
});
|
|
327
|
+
// ── Devise / Django (an export script run inside the app) ───────────────────
|
|
328
|
+
/** Write the export script into the migration folder and explain how to run it. */
|
|
329
|
+
function scriptMissing(p, vendor, file, script, run) {
|
|
330
|
+
const dir = (0, node_path_1.resolve)(p.project, 'atlas-migrate', vendor);
|
|
331
|
+
const path = (0, node_path_1.join)(dir, file);
|
|
332
|
+
if (!p.dryRun) {
|
|
333
|
+
(0, node_fs_1.mkdirSync)(dir, { recursive: true });
|
|
334
|
+
(0, node_fs_1.writeFileSync)(path, script, { mode: 0o600 });
|
|
335
|
+
}
|
|
336
|
+
throw new errors_1.CliError(`Wrote the export script to ${path}. Run it inside your app and pipe it in:\n ${run.replace('{script}', (0, node_path_1.join)('atlas-migrate', vendor, file))}\n(or redirect it to a file and pass --file <path>).`);
|
|
337
|
+
}
|
|
338
|
+
exports.devisePlugin = frameworkPlugin({
|
|
339
|
+
vendor: 'devise',
|
|
340
|
+
source: 'devise',
|
|
341
|
+
label: 'Devise (Rails)',
|
|
342
|
+
help: 'Moves a Rails app on Devise: config reads config/initializers/devise.rb, your Devise models, OmniAuth providers and the session store; export runs a small Rails runner script inside your app (written for you on the first run) that streams users, confirmable / lockable state, OmniAuth identities, devise-two-factor secrets and activerecord-session_store sessions — bcrypt hashes (with your pepper) carry over. Cookie-store sessions bridge through deviseExtractor on your server (preset devise); activerecord sessions through the imported table (devise_active_record).',
|
|
343
|
+
reads: 'config/initializers/devise.rb, your Devise models and session store, statically',
|
|
344
|
+
translate: translate_rails_django_1.translateDevise,
|
|
345
|
+
exportReads: 'the Rails export script output (--file <path>, or --file - to pipe it)',
|
|
346
|
+
credentials: [SESSIONS],
|
|
347
|
+
check(p) {
|
|
348
|
+
if (!fileArg(p) && !p.credential(DUMP))
|
|
349
|
+
scriptMissing(p, 'devise', 'atlas_export.rb', devise_1.DEVISE_EXPORT_SCRIPT, 'bin/rails runner {script} [User] | atlas migrate devise export --file -');
|
|
350
|
+
},
|
|
351
|
+
run(p) {
|
|
352
|
+
return (0, devise_1.exportDevise)(readInput(p), {
|
|
353
|
+
usersTable: setting(p, 'users-table', 'ATLAS_MIGRATE_USERS_TABLE', 'the Devise model table'),
|
|
354
|
+
trustUnconfirmable: flagBool(p, { flag: '--trust-unconfirmable', env: 'ATLAS_MIGRATE_TRUST_UNCONFIRMABLE', label: 'treat emails as verified when the model is not :confirmable', required: false }, false),
|
|
355
|
+
sessions: flagBool(p, SESSIONS, true),
|
|
356
|
+
});
|
|
357
|
+
},
|
|
358
|
+
limits: [
|
|
359
|
+
'devise-encryptable digests (SHA-1/SHA-512, Authlogic, restful_authentication) do not carry over: those users migrate lazily (preset devise_json) or reset.',
|
|
360
|
+
'Cookie-store sessions are opened on your server with secret_key_base; the bridge needs the JSON (or hybrid) cookie serializer, not Marshal.',
|
|
361
|
+
],
|
|
362
|
+
bridgePreset: 'devise',
|
|
363
|
+
bridgeVarNames: ['cookie_name'],
|
|
364
|
+
lazy: { preset: 'devise_json', keys: ['base_url', 'path', 'scope'] },
|
|
365
|
+
});
|
|
366
|
+
exports.djangoPlugin = frameworkPlugin({
|
|
367
|
+
vendor: 'django',
|
|
368
|
+
source: 'django',
|
|
369
|
+
label: 'Django (contrib.auth, django-allauth)',
|
|
370
|
+
help: 'Moves a Django app on django.contrib.auth with or without django-allauth: config reads settings.py (password hashers and validators, session engine and age, allauth account / socialaccount / mfa settings); export reads `manage.py dumpdata` JSON or, better, the export script (written for you on the first run) that also decrypts allauth TOTP secrets and lists unused recovery codes. pbkdf2_sha256, argon2, bcrypt_sha256 and scrypt hashes carry over. Database sessions bridge through the imported table (preset django); signed-cookie sessions through djangoSignedCookieExtractor (django_signed_cookies).',
|
|
371
|
+
reads: 'your Django settings, statically',
|
|
372
|
+
translate: translate_rails_django_1.translateDjango,
|
|
373
|
+
exportReads: 'manage.py dumpdata JSON or the export script output (--file <path>, or --file - to pipe it)',
|
|
374
|
+
credentials: [SESSIONS, RP_ID],
|
|
375
|
+
check(p) {
|
|
376
|
+
if (!fileArg(p) && !p.credential(DUMP))
|
|
377
|
+
scriptMissing(p, 'django', 'atlas_export.py', django_1.DJANGO_EXPORT_SCRIPT, 'python manage.py shell < {script} | atlas migrate django export --file -');
|
|
378
|
+
},
|
|
379
|
+
run(p) {
|
|
380
|
+
const tables = readInput(p, {
|
|
381
|
+
// dumpdata: one JSON array of { model, pk, fields }, which the exporter reads as the "dumpdata" table.
|
|
382
|
+
singleFile: (text, into) => into.set('dumpdata', (0, tables_1.parseTableText)(text, '.json')),
|
|
383
|
+
});
|
|
384
|
+
return (0, django_1.exportDjango)(tables, {
|
|
385
|
+
userModel: setting(p, 'user-model', 'ATLAS_MIGRATE_USER_MODEL', 'AUTH_USER_MODEL (app_label.model)'),
|
|
386
|
+
rpId: p.credential(RP_ID),
|
|
387
|
+
oauthTokens: flagBool(p, { flag: '--oauth-tokens', env: 'ATLAS_MIGRATE_OAUTH_TOKENS', label: 'whether to carry OAuth tokens', required: false }, false),
|
|
388
|
+
sessions: flagBool(p, SESSIONS, true),
|
|
389
|
+
trustEmails: flagBool(p, { flag: '--trust-emails', env: 'ATLAS_MIGRATE_TRUST_EMAILS', label: 'treat user.email as verified without allauth', required: false }, false),
|
|
390
|
+
});
|
|
391
|
+
},
|
|
392
|
+
limits: [
|
|
393
|
+
'allauth recovery codes and TOTP secrets encrypted by a custom MFA adapter need the export script (run inside your app); a plain dumpdata leaves them out.',
|
|
394
|
+
'cache and file session engines cannot be exported: those users sign in again once. Signed-cookie sessions are opened on your server with SECRET_KEY.',
|
|
395
|
+
'A custom password hasher falls back to lazy migration through the allauth headless API (preset allauth_headless).',
|
|
396
|
+
],
|
|
397
|
+
bridgePreset: 'django',
|
|
398
|
+
bridgeVarNames: ['cookie_name'],
|
|
399
|
+
lazy: { preset: 'allauth_headless', keys: ['base_url', 'login_field'] },
|
|
400
|
+
});
|
|
401
|
+
exports.FRAMEWORK_PLUGINS = [exports.authJsPlugin, exports.luciaPlugin, exports.passportPlugin, exports.ironSessionPlugin, exports.devisePlugin, exports.djangoPlugin];
|
|
402
|
+
//# sourceMappingURL=plugins.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugins.js","sourceRoot":"","sources":["../../../src/migrate/frameworks/plugins.ts"],"names":[],"mappings":";;;AAuDA,8BAUC;AAYD,oDAWC;AAgCD,oCAcC;AA6JD,gCAQC;AA3SD,6CAA0C;AAC1C,qCAA6E;AAC7E,yCAA0C;AAE1C,qCAAiC;AACjC,yCAAwC;AACxC,8DAA4F;AAC5F,wDAA2D;AAC3D,wDAAiF;AACjF,wDAAiF;AACjF,sDAAyD;AACzD,wDAA0H;AAE1H,iDAA0G;AAC1G,qEAA4E;AAE5E;;;;;;;;;;GAUG;AAEH,+EAA+E;AAE/E,MAAM,IAAI,GAAmB,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,EAAE,oBAAoB,EAAE,KAAK,EAAE,8CAA8C,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;AACnJ,MAAM,KAAK,GAAmB,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,EAAE,qBAAqB,EAAE,KAAK,EAAE,yEAAyE,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;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EAAE,aAAa,CAAC,EAAE;CACxE,CAAC,CAAC;AAEU,QAAA,iBAAiB,GAA+B,CAAC,oBAAY,EAAE,mBAAW,EAAE,sBAAc,EAAE,yBAAiB,EAAE,oBAAY,EAAE,oBAAY,CAAC,CAAC"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import type { Json } from '../../serialize';
|
|
2
|
+
import type { ReportStatus, TranslationReportEntry, TranslationResult } from '../framework/plugin';
|
|
3
|
+
/**
|
|
4
|
+
* The builder every self-hosted-framework translator (Auth.js, Lucia,
|
|
5
|
+
* Passport, iron-session, Devise, Django) fills: Atlas config-as-code
|
|
6
|
+
* (`instance.auth_config`, `oauth_providers`, `custom_oauth_providers`,
|
|
7
|
+
* `redirect_urls`) plus the mapped / differs / manual report with the file and
|
|
8
|
+
* line each setting came from. Secrets are never copied: a value read from an
|
|
9
|
+
* environment variable becomes a `${NAME}` placeholder, and a secret
|
|
10
|
+
* hard-coded in source becomes a placeholder plus a manual entry.
|
|
11
|
+
*/
|
|
12
|
+
export declare const DAY = 86400;
|
|
13
|
+
/** Atlas session bounds (seconds). */
|
|
14
|
+
export declare const MIN_IDLE_S = 300;
|
|
15
|
+
export declare const MAX_ABSOLUTE_S: number;
|
|
16
|
+
export interface Where {
|
|
17
|
+
file: string;
|
|
18
|
+
line: number;
|
|
19
|
+
}
|
|
20
|
+
/** A configuration value as a translator read it: literal, env var, or something only a human can read. */
|
|
21
|
+
export type ConfigValue = {
|
|
22
|
+
kind: 'literal';
|
|
23
|
+
value: string | number | boolean;
|
|
24
|
+
at: Where;
|
|
25
|
+
} | {
|
|
26
|
+
kind: 'env';
|
|
27
|
+
name: string;
|
|
28
|
+
at: Where;
|
|
29
|
+
} | {
|
|
30
|
+
kind: 'opaque';
|
|
31
|
+
text: string;
|
|
32
|
+
at: Where;
|
|
33
|
+
};
|
|
34
|
+
export declare class TranslationBuilder {
|
|
35
|
+
readonly origin: string;
|
|
36
|
+
readonly fallback: Where;
|
|
37
|
+
readonly authConfig: Record<string, Json>;
|
|
38
|
+
readonly oauthProviders: Json[];
|
|
39
|
+
readonly customOauthProviders: Json[];
|
|
40
|
+
readonly redirectUrls: Json[];
|
|
41
|
+
readonly allowedOrigins: Set<string>;
|
|
42
|
+
readonly report: TranslationReportEntry[];
|
|
43
|
+
readonly env: Map<string, string>;
|
|
44
|
+
readonly providers: Record<string, string>;
|
|
45
|
+
readonly roles: Record<string, string>;
|
|
46
|
+
bridge?: {
|
|
47
|
+
preset: string;
|
|
48
|
+
vars: Record<string, string>;
|
|
49
|
+
};
|
|
50
|
+
lazy?: {
|
|
51
|
+
preset: string;
|
|
52
|
+
config: Record<string, string>;
|
|
53
|
+
};
|
|
54
|
+
constructor(origin: string, fallback: Where);
|
|
55
|
+
set(path: string, value: Json): void;
|
|
56
|
+
get(path: string): Json | undefined;
|
|
57
|
+
add(status: ReportStatus, area: string, setting: string, note: string, at?: Where, atlas?: string): void;
|
|
58
|
+
/** A config string: a literal stays, an env var becomes `${NAME}`, anything else a `${fallback}` placeholder + manual entry. */
|
|
59
|
+
configString(v: ConfigValue | undefined, purpose: string, fallback: string, opts: {
|
|
60
|
+
secret?: boolean;
|
|
61
|
+
area: string;
|
|
62
|
+
setting: string;
|
|
63
|
+
}): string;
|
|
64
|
+
/**
|
|
65
|
+
* An enabled social provider (`oauth_providers`). Keeps the same OAuth app so
|
|
66
|
+
* imported identities relink by provider user id.
|
|
67
|
+
*/
|
|
68
|
+
oauthProvider(input: {
|
|
69
|
+
sourceId: string;
|
|
70
|
+
atlasKey: string;
|
|
71
|
+
clientId: string;
|
|
72
|
+
clientSecret?: string;
|
|
73
|
+
scopes?: string[];
|
|
74
|
+
values?: Record<string, Json>;
|
|
75
|
+
area: string;
|
|
76
|
+
setting: string;
|
|
77
|
+
at?: Where;
|
|
78
|
+
}): void;
|
|
79
|
+
/** Session lifetime: `idle` true = activity extends it (rolling), false = fixed. */
|
|
80
|
+
session(seconds: number, rolling: boolean, area: string, setting: string, at: Where | undefined, sourceWords: string): void;
|
|
81
|
+
/** Minimum password length (Atlas requires at least 8). */
|
|
82
|
+
minPasswordLength(n: number, area: string, setting: string, at: Where | undefined, sourceWords: string): void;
|
|
83
|
+
result(): TranslationResult;
|
|
84
|
+
}
|
|
85
|
+
export declare function clamp(n: number, min: number, max: number): number;
|
|
86
|
+
export declare function humanDuration(seconds: number): string;
|
|
87
|
+
/**
|
|
88
|
+
* Social provider names the frameworks use → Atlas catalog provider keys
|
|
89
|
+
* (Auth.js provider ids, arctic class names lowercased, Passport strategy
|
|
90
|
+
* names, OmniAuth strategies, django-allauth provider ids).
|
|
91
|
+
*/
|
|
92
|
+
export declare const FRAMEWORK_PROVIDER_MAP: Record<string, string>;
|