@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.
- package/CHANGELOG.md +13 -0
- package/package.json +3 -3
- package/dist/args.d.ts +0 -601
- package/dist/args.js +0 -289
- package/dist/args.js.map +0 -1
- package/dist/cli.d.ts +0 -2
- package/dist/cli.js +0 -19
- package/dist/cli.js.map +0 -1
- package/dist/commands/actions-gallery.d.ts +0 -8
- package/dist/commands/actions-gallery.js +0 -197
- package/dist/commands/actions-gallery.js.map +0 -1
- package/dist/commands/actions.d.ts +0 -13
- package/dist/commands/actions.js +0 -135
- package/dist/commands/actions.js.map +0 -1
- package/dist/commands/admin.d.ts +0 -49
- package/dist/commands/admin.js +0 -353
- package/dist/commands/admin.js.map +0 -1
- package/dist/commands/api-keys.d.ts +0 -4
- package/dist/commands/api-keys.js +0 -96
- package/dist/commands/api-keys.js.map +0 -1
- package/dist/commands/auth.d.ts +0 -25
- package/dist/commands/auth.js +0 -102
- package/dist/commands/auth.js.map +0 -1
- package/dist/commands/config.d.ts +0 -90
- package/dist/commands/config.js +0 -1430
- package/dist/commands/config.js.map +0 -1
- package/dist/commands/csp.d.ts +0 -32
- package/dist/commands/csp.js +0 -180
- package/dist/commands/csp.js.map +0 -1
- package/dist/commands/dev.d.ts +0 -8
- package/dist/commands/dev.js +0 -84
- package/dist/commands/dev.js.map +0 -1
- package/dist/commands/fga.d.ts +0 -10
- package/dist/commands/fga.js +0 -146
- package/dist/commands/fga.js.map +0 -1
- package/dist/commands/golive.d.ts +0 -40
- package/dist/commands/golive.js +0 -285
- package/dist/commands/golive.js.map +0 -1
- package/dist/commands/id-accounts.d.ts +0 -13
- package/dist/commands/id-accounts.js +0 -195
- package/dist/commands/id-accounts.js.map +0 -1
- package/dist/commands/import-better-auth.d.ts +0 -3
- package/dist/commands/import-better-auth.js +0 -164
- package/dist/commands/import-better-auth.js.map +0 -1
- package/dist/commands/import.d.ts +0 -3
- package/dist/commands/import.js +0 -123
- package/dist/commands/import.js.map +0 -1
- package/dist/commands/info.d.ts +0 -75
- package/dist/commands/info.js +0 -362
- package/dist/commands/info.js.map +0 -1
- package/dist/commands/init.d.ts +0 -3
- package/dist/commands/init.js +0 -438
- package/dist/commands/init.js.map +0 -1
- package/dist/commands/integrations.d.ts +0 -8
- package/dist/commands/integrations.js +0 -112
- package/dist/commands/integrations.js.map +0 -1
- package/dist/commands/listen.d.ts +0 -17
- package/dist/commands/listen.js +0 -223
- package/dist/commands/listen.js.map +0 -1
- package/dist/commands/mcp.d.ts +0 -38
- package/dist/commands/mcp.js +0 -111
- package/dist/commands/mcp.js.map +0 -1
- package/dist/commands/migrate.d.ts +0 -16
- package/dist/commands/migrate.js +0 -114
- package/dist/commands/migrate.js.map +0 -1
- package/dist/commands/move-origin.d.ts +0 -11
- package/dist/commands/move-origin.js +0 -95
- package/dist/commands/move-origin.js.map +0 -1
- package/dist/commands/operator.d.ts +0 -18
- package/dist/commands/operator.js +0 -238
- package/dist/commands/operator.js.map +0 -1
- package/dist/commands/orgs.d.ts +0 -4
- package/dist/commands/orgs.js +0 -72
- package/dist/commands/orgs.js.map +0 -1
- package/dist/commands/pages.d.ts +0 -14
- package/dist/commands/pages.js +0 -113
- package/dist/commands/pages.js.map +0 -1
- package/dist/commands/partner-platforms.d.ts +0 -10
- package/dist/commands/partner-platforms.js +0 -157
- package/dist/commands/partner-platforms.js.map +0 -1
- package/dist/commands/project-commands.d.ts +0 -38
- package/dist/commands/project-commands.js +0 -361
- package/dist/commands/project-commands.js.map +0 -1
- package/dist/commands/referrals.d.ts +0 -69
- package/dist/commands/referrals.js +0 -1056
- package/dist/commands/referrals.js.map +0 -1
- package/dist/commands/resources.d.ts +0 -44
- package/dist/commands/resources.js +0 -234
- package/dist/commands/resources.js.map +0 -1
- package/dist/commands/sessions.d.ts +0 -4
- package/dist/commands/sessions.js +0 -28
- package/dist/commands/sessions.js.map +0 -1
- package/dist/commands/shared.d.ts +0 -38
- package/dist/commands/shared.js +0 -69
- package/dist/commands/shared.js.map +0 -1
- package/dist/commands/status.d.ts +0 -3
- package/dist/commands/status.js +0 -77
- package/dist/commands/status.js.map +0 -1
- package/dist/commands/users.d.ts +0 -4
- package/dist/commands/users.js +0 -100
- package/dist/commands/users.js.map +0 -1
- package/dist/commands/webhooks.d.ts +0 -34
- package/dist/commands/webhooks.js +0 -301
- package/dist/commands/webhooks.js.map +0 -1
- package/dist/config-http.d.ts +0 -29
- package/dist/config-http.js +0 -64
- package/dist/config-http.js.map +0 -1
- package/dist/config.d.ts +0 -64
- package/dist/config.js +0 -69
- package/dist/config.js.map +0 -1
- package/dist/context.d.ts +0 -72
- package/dist/context.js +0 -27
- package/dist/context.js.map +0 -1
- package/dist/errors.d.ts +0 -15
- package/dist/errors.js +0 -25
- package/dist/errors.js.map +0 -1
- package/dist/help.d.ts +0 -8
- package/dist/help.js +0 -868
- package/dist/help.js.map +0 -1
- package/dist/import/csv.d.ts +0 -6
- package/dist/import/csv.js +0 -63
- package/dist/import/csv.js.map +0 -1
- package/dist/import/vendors.d.ts +0 -57
- package/dist/import/vendors.js +0 -568
- package/dist/import/vendors.js.map +0 -1
- package/dist/index.d.ts +0 -32
- package/dist/index.js +0 -79
- package/dist/index.js.map +0 -1
- package/dist/io.d.ts +0 -21
- package/dist/io.js +0 -28
- package/dist/io.js.map +0 -1
- package/dist/migrate/appwrite/plugin.d.ts +0 -2
- package/dist/migrate/appwrite/plugin.js +0 -103
- package/dist/migrate/appwrite/plugin.js.map +0 -1
- package/dist/migrate/auth0/plugin.d.ts +0 -2
- package/dist/migrate/auth0/plugin.js +0 -126
- package/dist/migrate/auth0/plugin.js.map +0 -1
- package/dist/migrate/authentik/plugin.d.ts +0 -2
- package/dist/migrate/authentik/plugin.js +0 -135
- package/dist/migrate/authentik/plugin.js.map +0 -1
- package/dist/migrate/azure-ad-b2c/plugin.d.ts +0 -8
- package/dist/migrate/azure-ad-b2c/plugin.js +0 -165
- package/dist/migrate/azure-ad-b2c/plugin.js.map +0 -1
- package/dist/migrate/better-auth/integration.d.ts +0 -59
- package/dist/migrate/better-auth/integration.js +0 -81
- package/dist/migrate/better-auth/integration.js.map +0 -1
- package/dist/migrate/better-auth/orchestrator.d.ts +0 -43
- package/dist/migrate/better-auth/orchestrator.js +0 -525
- package/dist/migrate/better-auth/orchestrator.js.map +0 -1
- package/dist/migrate/better-auth/output.d.ts +0 -20
- package/dist/migrate/better-auth/output.js +0 -146
- package/dist/migrate/better-auth/output.js.map +0 -1
- package/dist/migrate/better-auth/translate.d.ts +0 -77
- package/dist/migrate/better-auth/translate.js +0 -1989
- package/dist/migrate/better-auth/translate.js.map +0 -1
- package/dist/migrate/clerk/plugin.d.ts +0 -2
- package/dist/migrate/clerk/plugin.js +0 -76
- package/dist/migrate/clerk/plugin.js.map +0 -1
- package/dist/migrate/cognito/plugin.d.ts +0 -5
- package/dist/migrate/cognito/plugin.js +0 -170
- package/dist/migrate/cognito/plugin.js.map +0 -1
- package/dist/migrate/corbado/plugin.d.ts +0 -2
- package/dist/migrate/corbado/plugin.js +0 -63
- package/dist/migrate/corbado/plugin.js.map +0 -1
- package/dist/migrate/descope/plugin.d.ts +0 -2
- package/dist/migrate/descope/plugin.js +0 -83
- package/dist/migrate/descope/plugin.js.map +0 -1
- package/dist/migrate/entra-external-id/plugin.d.ts +0 -8
- package/dist/migrate/entra-external-id/plugin.js +0 -12
- package/dist/migrate/entra-external-id/plugin.js.map +0 -1
- package/dist/migrate/export/appwrite-config.d.ts +0 -28
- package/dist/migrate/export/appwrite-config.js +0 -170
- package/dist/migrate/export/appwrite-config.js.map +0 -1
- package/dist/migrate/export/appwrite.d.ts +0 -51
- package/dist/migrate/export/appwrite.js +0 -288
- package/dist/migrate/export/appwrite.js.map +0 -1
- package/dist/migrate/export/auth0-config.d.ts +0 -29
- package/dist/migrate/export/auth0-config.js +0 -249
- package/dist/migrate/export/auth0-config.js.map +0 -1
- package/dist/migrate/export/auth0.d.ts +0 -62
- package/dist/migrate/export/auth0.js +0 -575
- package/dist/migrate/export/auth0.js.map +0 -1
- package/dist/migrate/export/authentik-config.d.ts +0 -45
- package/dist/migrate/export/authentik-config.js +0 -357
- package/dist/migrate/export/authentik-config.js.map +0 -1
- package/dist/migrate/export/authentik.d.ts +0 -110
- package/dist/migrate/export/authentik.js +0 -838
- package/dist/migrate/export/authentik.js.map +0 -1
- package/dist/migrate/export/azure-config.d.ts +0 -58
- package/dist/migrate/export/azure-config.js +0 -344
- package/dist/migrate/export/azure-config.js.map +0 -1
- package/dist/migrate/export/azure.d.ts +0 -85
- package/dist/migrate/export/azure.js +0 -373
- package/dist/migrate/export/azure.js.map +0 -1
- package/dist/migrate/export/clerk-config.d.ts +0 -26
- package/dist/migrate/export/clerk-config.js +0 -227
- package/dist/migrate/export/clerk-config.js.map +0 -1
- package/dist/migrate/export/clerk.d.ts +0 -46
- package/dist/migrate/export/clerk.js +0 -486
- package/dist/migrate/export/clerk.js.map +0 -1
- package/dist/migrate/export/cognito-config.d.ts +0 -25
- package/dist/migrate/export/cognito-config.js +0 -273
- package/dist/migrate/export/cognito-config.js.map +0 -1
- package/dist/migrate/export/cognito.d.ts +0 -103
- package/dist/migrate/export/cognito.js +0 -441
- package/dist/migrate/export/cognito.js.map +0 -1
- package/dist/migrate/export/corbado-config.d.ts +0 -20
- package/dist/migrate/export/corbado-config.js +0 -63
- package/dist/migrate/export/corbado-config.js.map +0 -1
- package/dist/migrate/export/corbado.d.ts +0 -37
- package/dist/migrate/export/corbado.js +0 -132
- package/dist/migrate/export/corbado.js.map +0 -1
- package/dist/migrate/export/descope.d.ts +0 -35
- package/dist/migrate/export/descope.js +0 -208
- package/dist/migrate/export/descope.js.map +0 -1
- package/dist/migrate/export/fake-vendor.test-helper.d.ts +0 -27
- package/dist/migrate/export/fake-vendor.test-helper.js +0 -41
- package/dist/migrate/export/fake-vendor.test-helper.js.map +0 -1
- package/dist/migrate/export/firebase-config.d.ts +0 -24
- package/dist/migrate/export/firebase-config.js +0 -215
- package/dist/migrate/export/firebase-config.js.map +0 -1
- package/dist/migrate/export/firebase.d.ts +0 -102
- package/dist/migrate/export/firebase.js +0 -464
- package/dist/migrate/export/firebase.js.map +0 -1
- package/dist/migrate/export/frameworks/app-users.d.ts +0 -42
- package/dist/migrate/export/frameworks/app-users.js +0 -161
- package/dist/migrate/export/frameworks/app-users.js.map +0 -1
- package/dist/migrate/export/frameworks/authjs.d.ts +0 -41
- package/dist/migrate/export/frameworks/authjs.js +0 -146
- package/dist/migrate/export/frameworks/authjs.js.map +0 -1
- package/dist/migrate/export/frameworks/devise.d.ts +0 -39
- package/dist/migrate/export/frameworks/devise.js +0 -218
- package/dist/migrate/export/frameworks/devise.js.map +0 -1
- package/dist/migrate/export/frameworks/django.d.ts +0 -45
- package/dist/migrate/export/frameworks/django.js +0 -315
- package/dist/migrate/export/frameworks/django.js.map +0 -1
- package/dist/migrate/export/frameworks/lucia.d.ts +0 -42
- package/dist/migrate/export/frameworks/lucia.js +0 -263
- package/dist/migrate/export/frameworks/lucia.js.map +0 -1
- package/dist/migrate/export/frameworks/tables.d.ts +0 -90
- package/dist/migrate/export/frameworks/tables.js +0 -325
- package/dist/migrate/export/frameworks/tables.js.map +0 -1
- package/dist/migrate/export/frameworks/webauthn.d.ts +0 -25
- package/dist/migrate/export/frameworks/webauthn.js +0 -130
- package/dist/migrate/export/frameworks/webauthn.js.map +0 -1
- package/dist/migrate/export/frontegg-config.d.ts +0 -29
- package/dist/migrate/export/frontegg-config.js +0 -238
- package/dist/migrate/export/frontegg-config.js.map +0 -1
- package/dist/migrate/export/frontegg.d.ts +0 -67
- package/dist/migrate/export/frontegg.js +0 -410
- package/dist/migrate/export/frontegg.js.map +0 -1
- package/dist/migrate/export/fusionauth-config.d.ts +0 -26
- package/dist/migrate/export/fusionauth-config.js +0 -226
- package/dist/migrate/export/fusionauth-config.js.map +0 -1
- package/dist/migrate/export/fusionauth.d.ts +0 -99
- package/dist/migrate/export/fusionauth.js +0 -642
- package/dist/migrate/export/fusionauth.js.map +0 -1
- package/dist/migrate/export/hanko-config.d.ts +0 -27
- package/dist/migrate/export/hanko-config.js +0 -265
- package/dist/migrate/export/hanko-config.js.map +0 -1
- package/dist/migrate/export/hanko.d.ts +0 -52
- package/dist/migrate/export/hanko.js +0 -605
- package/dist/migrate/export/hanko.js.map +0 -1
- package/dist/migrate/export/keycloak-config.d.ts +0 -19
- package/dist/migrate/export/keycloak-config.js +0 -219
- package/dist/migrate/export/keycloak-config.js.map +0 -1
- package/dist/migrate/export/keycloak.d.ts +0 -155
- package/dist/migrate/export/keycloak.js +0 -878
- package/dist/migrate/export/keycloak.js.map +0 -1
- package/dist/migrate/export/kinde-descope-config.d.ts +0 -38
- package/dist/migrate/export/kinde-descope-config.js +0 -172
- package/dist/migrate/export/kinde-descope-config.js.map +0 -1
- package/dist/migrate/export/kinde.d.ts +0 -57
- package/dist/migrate/export/kinde.js +0 -333
- package/dist/migrate/export/kinde.js.map +0 -1
- package/dist/migrate/export/ldap.d.ts +0 -53
- package/dist/migrate/export/ldap.js +0 -277
- package/dist/migrate/export/ldap.js.map +0 -1
- package/dist/migrate/export/logto-config.d.ts +0 -27
- package/dist/migrate/export/logto-config.js +0 -264
- package/dist/migrate/export/logto-config.js.map +0 -1
- package/dist/migrate/export/logto.d.ts +0 -150
- package/dist/migrate/export/logto.js +0 -809
- package/dist/migrate/export/logto.js.map +0 -1
- package/dist/migrate/export/magic-config.d.ts +0 -14
- package/dist/migrate/export/magic-config.js +0 -28
- package/dist/migrate/export/magic-config.js.map +0 -1
- package/dist/migrate/export/magic.d.ts +0 -31
- package/dist/migrate/export/magic.js +0 -93
- package/dist/migrate/export/magic.js.map +0 -1
- package/dist/migrate/export/mini-yaml.d.ts +0 -19
- package/dist/migrate/export/mini-yaml.js +0 -581
- package/dist/migrate/export/mini-yaml.js.map +0 -1
- package/dist/migrate/export/nhost-config.d.ts +0 -26
- package/dist/migrate/export/nhost-config.js +0 -360
- package/dist/migrate/export/nhost-config.js.map +0 -1
- package/dist/migrate/export/nhost.d.ts +0 -64
- package/dist/migrate/export/nhost.js +0 -304
- package/dist/migrate/export/nhost.js.map +0 -1
- package/dist/migrate/export/okta-config.d.ts +0 -30
- package/dist/migrate/export/okta-config.js +0 -205
- package/dist/migrate/export/okta-config.js.map +0 -1
- package/dist/migrate/export/okta.d.ts +0 -43
- package/dist/migrate/export/okta.js +0 -337
- package/dist/migrate/export/okta.js.map +0 -1
- package/dist/migrate/export/onelogin.d.ts +0 -22
- package/dist/migrate/export/onelogin.js +0 -123
- package/dist/migrate/export/onelogin.js.map +0 -1
- package/dist/migrate/export/ory-config.d.ts +0 -58
- package/dist/migrate/export/ory-config.js +0 -451
- package/dist/migrate/export/ory-config.js.map +0 -1
- package/dist/migrate/export/ory.d.ts +0 -81
- package/dist/migrate/export/ory.js +0 -555
- package/dist/migrate/export/ory.js.map +0 -1
- package/dist/migrate/export/password-detect.d.ts +0 -29
- package/dist/migrate/export/password-detect.js +0 -81
- package/dist/migrate/export/password-detect.js.map +0 -1
- package/dist/migrate/export/pingone.d.ts +0 -36
- package/dist/migrate/export/pingone.js +0 -218
- package/dist/migrate/export/pingone.js.map +0 -1
- package/dist/migrate/export/plugin-kit.d.ts +0 -25
- package/dist/migrate/export/plugin-kit.js +0 -82
- package/dist/migrate/export/plugin-kit.js.map +0 -1
- package/dist/migrate/export/pocketbase-config.d.ts +0 -28
- package/dist/migrate/export/pocketbase-config.js +0 -180
- package/dist/migrate/export/pocketbase-config.js.map +0 -1
- package/dist/migrate/export/pocketbase.d.ts +0 -52
- package/dist/migrate/export/pocketbase.js +0 -243
- package/dist/migrate/export/pocketbase.js.map +0 -1
- package/dist/migrate/export/project-files.d.ts +0 -15
- package/dist/migrate/export/project-files.js +0 -43
- package/dist/migrate/export/project-files.js.map +0 -1
- package/dist/migrate/export/propelauth-config.d.ts +0 -18
- package/dist/migrate/export/propelauth-config.js +0 -58
- package/dist/migrate/export/propelauth-config.js.map +0 -1
- package/dist/migrate/export/propelauth-harness.test-helper.d.ts +0 -62
- package/dist/migrate/export/propelauth-harness.test-helper.js +0 -109
- package/dist/migrate/export/propelauth-harness.test-helper.js.map +0 -1
- package/dist/migrate/export/propelauth.d.ts +0 -48
- package/dist/migrate/export/propelauth.js +0 -255
- package/dist/migrate/export/propelauth.js.map +0 -1
- package/dist/migrate/export/record-set.d.ts +0 -44
- package/dist/migrate/export/record-set.js +0 -98
- package/dist/migrate/export/record-set.js.map +0 -1
- package/dist/migrate/export/source-lines.d.ts +0 -17
- package/dist/migrate/export/source-lines.js +0 -43
- package/dist/migrate/export/source-lines.js.map +0 -1
- package/dist/migrate/export/sso-metadata.d.ts +0 -47
- package/dist/migrate/export/sso-metadata.js +0 -180
- package/dist/migrate/export/sso-metadata.js.map +0 -1
- package/dist/migrate/export/stytch-config.d.ts +0 -22
- package/dist/migrate/export/stytch-config.js +0 -102
- package/dist/migrate/export/stytch-config.js.map +0 -1
- package/dist/migrate/export/stytch.d.ts +0 -68
- package/dist/migrate/export/stytch.js +0 -510
- package/dist/migrate/export/stytch.js.map +0 -1
- package/dist/migrate/export/supabase-config.d.ts +0 -48
- package/dist/migrate/export/supabase-config.js +0 -408
- package/dist/migrate/export/supabase-config.js.map +0 -1
- package/dist/migrate/export/supabase.d.ts +0 -86
- package/dist/migrate/export/supabase.js +0 -524
- package/dist/migrate/export/supabase.js.map +0 -1
- package/dist/migrate/export/supertokens-config.d.ts +0 -20
- package/dist/migrate/export/supertokens-config.js +0 -150
- package/dist/migrate/export/supertokens-config.js.map +0 -1
- package/dist/migrate/export/supertokens.d.ts +0 -125
- package/dist/migrate/export/supertokens.js +0 -464
- package/dist/migrate/export/supertokens.js.map +0 -1
- package/dist/migrate/export/table.d.ts +0 -35
- package/dist/migrate/export/table.js +0 -248
- package/dist/migrate/export/table.js.map +0 -1
- package/dist/migrate/export/translate-kit.d.ts +0 -46
- package/dist/migrate/export/translate-kit.js +0 -148
- package/dist/migrate/export/translate-kit.js.map +0 -1
- package/dist/migrate/export/userfront-config.d.ts +0 -15
- package/dist/migrate/export/userfront-config.js +0 -49
- package/dist/migrate/export/userfront-config.js.map +0 -1
- package/dist/migrate/export/userfront.d.ts +0 -38
- package/dist/migrate/export/userfront.js +0 -189
- package/dist/migrate/export/userfront.js.map +0 -1
- package/dist/migrate/export/vendor-http.d.ts +0 -46
- package/dist/migrate/export/vendor-http.js +0 -138
- package/dist/migrate/export/vendor-http.js.map +0 -1
- package/dist/migrate/export/workos-config.d.ts +0 -23
- package/dist/migrate/export/workos-config.js +0 -125
- package/dist/migrate/export/workos-config.js.map +0 -1
- package/dist/migrate/export/workos.d.ts +0 -46
- package/dist/migrate/export/workos.js +0 -272
- package/dist/migrate/export/workos.js.map +0 -1
- package/dist/migrate/export/zip.d.ts +0 -8
- package/dist/migrate/export/zip.js +0 -66
- package/dist/migrate/export/zip.js.map +0 -1
- package/dist/migrate/export/zitadel-config.d.ts +0 -37
- package/dist/migrate/export/zitadel-config.js +0 -279
- package/dist/migrate/export/zitadel-config.js.map +0 -1
- package/dist/migrate/export/zitadel.d.ts +0 -82
- package/dist/migrate/export/zitadel.js +0 -447
- package/dist/migrate/export/zitadel.js.map +0 -1
- package/dist/migrate/firebase/plugin.d.ts +0 -2
- package/dist/migrate/firebase/plugin.js +0 -152
- package/dist/migrate/firebase/plugin.js.map +0 -1
- package/dist/migrate/framework/builtins.d.ts +0 -2
- package/dist/migrate/framework/builtins.js +0 -52
- package/dist/migrate/framework/builtins.js.map +0 -1
- package/dist/migrate/framework/commands.d.ts +0 -20
- package/dist/migrate/framework/commands.js +0 -58
- package/dist/migrate/framework/commands.js.map +0 -1
- package/dist/migrate/framework/custom.d.ts +0 -12
- package/dist/migrate/framework/custom.js +0 -96
- package/dist/migrate/framework/custom.js.map +0 -1
- package/dist/migrate/framework/orchestrator.d.ts +0 -113
- package/dist/migrate/framework/orchestrator.js +0 -532
- package/dist/migrate/framework/orchestrator.js.map +0 -1
- package/dist/migrate/framework/plugin.d.ts +0 -167
- package/dist/migrate/framework/plugin.js +0 -3
- package/dist/migrate/framework/plugin.js.map +0 -1
- package/dist/migrate/framework/registry.d.ts +0 -11
- package/dist/migrate/framework/registry.js +0 -44
- package/dist/migrate/framework/registry.js.map +0 -1
- package/dist/migrate/framework/report.d.ts +0 -17
- package/dist/migrate/framework/report.js +0 -103
- package/dist/migrate/framework/report.js.map +0 -1
- package/dist/migrate/frameworks/plugins.d.ts +0 -29
- package/dist/migrate/frameworks/plugins.js +0 -402
- package/dist/migrate/frameworks/plugins.js.map +0 -1
- package/dist/migrate/frameworks/report.d.ts +0 -92
- package/dist/migrate/frameworks/report.js +0 -207
- package/dist/migrate/frameworks/report.js.map +0 -1
- package/dist/migrate/frameworks/translate-js.d.ts +0 -5
- package/dist/migrate/frameworks/translate-js.js +0 -503
- package/dist/migrate/frameworks/translate-js.js.map +0 -1
- package/dist/migrate/frameworks/translate-rails-django.d.ts +0 -3
- package/dist/migrate/frameworks/translate-rails-django.js +0 -1391
- package/dist/migrate/frameworks/translate-rails-django.js.map +0 -1
- package/dist/migrate/frontegg/plugin.d.ts +0 -2
- package/dist/migrate/frontegg/plugin.js +0 -78
- package/dist/migrate/frontegg/plugin.js.map +0 -1
- package/dist/migrate/fusionauth/plugin.d.ts +0 -2
- package/dist/migrate/fusionauth/plugin.js +0 -109
- package/dist/migrate/fusionauth/plugin.js.map +0 -1
- package/dist/migrate/hanko/plugin.d.ts +0 -2
- package/dist/migrate/hanko/plugin.js +0 -100
- package/dist/migrate/hanko/plugin.js.map +0 -1
- package/dist/migrate/keycloak/plugin.d.ts +0 -2
- package/dist/migrate/keycloak/plugin.js +0 -148
- package/dist/migrate/keycloak/plugin.js.map +0 -1
- package/dist/migrate/kinde/plugin.d.ts +0 -2
- package/dist/migrate/kinde/plugin.js +0 -105
- package/dist/migrate/kinde/plugin.js.map +0 -1
- package/dist/migrate/ldap/plugin.d.ts +0 -2
- package/dist/migrate/ldap/plugin.js +0 -73
- package/dist/migrate/ldap/plugin.js.map +0 -1
- package/dist/migrate/logto/plugin.d.ts +0 -2
- package/dist/migrate/logto/plugin.js +0 -131
- package/dist/migrate/logto/plugin.js.map +0 -1
- package/dist/migrate/magic/plugin.d.ts +0 -2
- package/dist/migrate/magic/plugin.js +0 -56
- package/dist/migrate/magic/plugin.js.map +0 -1
- package/dist/migrate/nhost/plugin.d.ts +0 -2
- package/dist/migrate/nhost/plugin.js +0 -115
- package/dist/migrate/nhost/plugin.js.map +0 -1
- package/dist/migrate/oidc/plugin.d.ts +0 -2
- package/dist/migrate/oidc/plugin.js +0 -73
- package/dist/migrate/oidc/plugin.js.map +0 -1
- package/dist/migrate/okta/plugin.d.ts +0 -2
- package/dist/migrate/okta/plugin.js +0 -105
- package/dist/migrate/okta/plugin.js.map +0 -1
- package/dist/migrate/onelogin/plugin.d.ts +0 -2
- package/dist/migrate/onelogin/plugin.js +0 -61
- package/dist/migrate/onelogin/plugin.js.map +0 -1
- package/dist/migrate/ory/plugin.d.ts +0 -2
- package/dist/migrate/ory/plugin.js +0 -186
- package/dist/migrate/ory/plugin.js.map +0 -1
- package/dist/migrate/ping-identity/plugin.d.ts +0 -2
- package/dist/migrate/ping-identity/plugin.js +0 -100
- package/dist/migrate/ping-identity/plugin.js.map +0 -1
- package/dist/migrate/pocketbase/plugin.d.ts +0 -2
- package/dist/migrate/pocketbase/plugin.js +0 -99
- package/dist/migrate/pocketbase/plugin.js.map +0 -1
- package/dist/migrate/propelauth/plugin.d.ts +0 -2
- package/dist/migrate/propelauth/plugin.js +0 -65
- package/dist/migrate/propelauth/plugin.js.map +0 -1
- package/dist/migrate/saml/plugin.d.ts +0 -2
- package/dist/migrate/saml/plugin.js +0 -79
- package/dist/migrate/saml/plugin.js.map +0 -1
- package/dist/migrate/stytch/plugin.d.ts +0 -2
- package/dist/migrate/stytch/plugin.js +0 -97
- package/dist/migrate/stytch/plugin.js.map +0 -1
- package/dist/migrate/supabase/plugin.d.ts +0 -2
- package/dist/migrate/supabase/plugin.js +0 -149
- package/dist/migrate/supabase/plugin.js.map +0 -1
- package/dist/migrate/supertokens/plugin.d.ts +0 -2
- package/dist/migrate/supertokens/plugin.js +0 -114
- package/dist/migrate/supertokens/plugin.js.map +0 -1
- package/dist/migrate/user-table/plugin.d.ts +0 -2
- package/dist/migrate/user-table/plugin.js +0 -62
- package/dist/migrate/user-table/plugin.js.map +0 -1
- package/dist/migrate/userfront/plugin.d.ts +0 -2
- package/dist/migrate/userfront/plugin.js +0 -60
- package/dist/migrate/userfront/plugin.js.map +0 -1
- package/dist/migrate/workos/plugin.d.ts +0 -2
- package/dist/migrate/workos/plugin.js +0 -81
- package/dist/migrate/workos/plugin.js.map +0 -1
- package/dist/migrate/zitadel/plugin.d.ts +0 -2
- package/dist/migrate/zitadel/plugin.js +0 -114
- package/dist/migrate/zitadel/plugin.js.map +0 -1
- package/dist/output.d.ts +0 -41
- package/dist/output.js +0 -72
- package/dist/output.js.map +0 -1
- package/dist/project.d.ts +0 -64
- package/dist/project.js +0 -86
- package/dist/project.js.map +0 -1
- package/dist/prompt.d.ts +0 -15
- package/dist/prompt.js +0 -46
- package/dist/prompt.js.map +0 -1
- package/dist/run.d.ts +0 -12
- package/dist/run.js +0 -157
- package/dist/run.js.map +0 -1
- package/dist/secrets.d.ts +0 -41
- package/dist/secrets.js +0 -142
- package/dist/secrets.js.map +0 -1
- package/dist/serialize.d.ts +0 -30
- package/dist/serialize.js +0 -131
- package/dist/serialize.js.map +0 -1
- package/dist/version.d.ts +0 -7
- package/dist/version.js +0 -21
- package/dist/version.js.map +0 -1
|
@@ -1,165 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.azureAdB2cPlugin = void 0;
|
|
4
|
-
exports.readPolicyDir = readPolicyDir;
|
|
5
|
-
exports.azurePlugin = azurePlugin;
|
|
6
|
-
const node_fs_1 = require("node:fs");
|
|
7
|
-
const node_path_1 = require("node:path");
|
|
8
|
-
const azure_1 = require("../export/azure");
|
|
9
|
-
const azure_config_1 = require("../export/azure-config");
|
|
10
|
-
const errors_1 = require("../../errors");
|
|
11
|
-
const project_files_1 = require("../export/project-files");
|
|
12
|
-
const plugin_kit_1 = require("../export/plugin-kit");
|
|
13
|
-
/**
|
|
14
|
-
* `atlas migrate azure-ad-b2c` and (through {@link azurePlugin})
|
|
15
|
-
* `atlas migrate entra-external-id` — a Microsoft customer-identity tenant
|
|
16
|
-
* through Microsoft Graph with an app registration the owner creates
|
|
17
|
-
* (client credentials). Users keyed by their object id with sign-in
|
|
18
|
-
* identities, federated links, custom attributes, groups and SMS / email
|
|
19
|
-
* factors; identity providers, user flows, custom policies (B2C), app
|
|
20
|
-
* registrations and groups as Atlas config; the JWT bridge preset; lazy
|
|
21
|
-
* migration (B2C ROPC user flow, External ID native authentication) — Graph
|
|
22
|
-
* never returns a password. The client secret is sent to Microsoft only.
|
|
23
|
-
*/
|
|
24
|
-
const TENANT = { flag: '--azure-tenant', env: 'AZURE_TENANT_ID', label: 'the tenant id (GUID) or domain (contoso.onmicrosoft.com)', required: true };
|
|
25
|
-
const CLIENT_ID = { flag: '--azure-client-id', env: 'AZURE_CLIENT_ID', label: 'the client id of an app registration with Graph User.Read.All (application)', required: false };
|
|
26
|
-
const CLIENT_SECRET = { flag: '--azure-client-secret', env: 'AZURE_CLIENT_SECRET', label: 'that app registration\'s client secret', required: false, secret: true };
|
|
27
|
-
const ACCESS_TOKEN = { flag: '--azure-graph-token', env: 'AZURE_GRAPH_TOKEN', label: 'a Microsoft Graph access token, instead of client credentials', required: false, secret: true };
|
|
28
|
-
const AUTH_METHODS = { flag: '--azure-auth-methods', env: 'AZURE_EXPORT_AUTH_METHODS', label: 'true to read each user\'s phone / email MFA methods (UserAuthenticationMethod.Read.All)', required: false };
|
|
29
|
-
const DIRECTORY_USERS = { flag: '--azure-directory-users', env: 'AZURE_EXPORT_DIRECTORY_USERS', label: 'true to also export admin / work accounts', required: false };
|
|
30
|
-
const GROUPS_AS = { flag: '--groups-as', env: 'ATLAS_MIGRATE_GROUPS_AS', label: 'how groups move: roles or skip', required: false };
|
|
31
|
-
const POLICY_DIR = { flag: '--b2c-policy-dir', env: 'B2C_POLICY_DIR', label: 'a folder with your B2C custom policy XML files (TrustFrameworkBase.xml, …)', required: false };
|
|
32
|
-
const APP_CLIENT_ID = { flag: '--azure-app-client-id', env: 'AZURE_APP_CLIENT_ID', label: 'your app\'s client id (the ID token audience; for lazy migration a public client)', required: false };
|
|
33
|
-
const SIGN_IN_POLICY = { flag: '--b2c-policy', env: 'B2C_POLICY', label: 'the user flow / custom policy that issued your users\' tokens (B2C_1_signupsignin)', required: false };
|
|
34
|
-
const ROPC_CLIENT_ID = { flag: '--b2c-ropc-client-id', env: 'B2C_ROPC_CLIENT_ID', label: 'the public client registration the ROPC user flow signs in with, when it is not your app\'s client id', required: false };
|
|
35
|
-
const ROPC_POLICY = { flag: '--b2c-ropc-policy', env: 'B2C_ROPC_POLICY', label: 'the ROPC user flow lazy migration checks passwords with (B2C_1_ROPC_Auth)', required: false };
|
|
36
|
-
const CUSTOM_DOMAIN = { flag: '--azure-custom-domain', env: 'AZURE_CUSTOM_DOMAIN', label: 'a custom domain in front of b2clogin.com / ciamlogin.com', required: false };
|
|
37
|
-
function graph(p) {
|
|
38
|
-
const tenant = (0, plugin_kit_1.need)(p, TENANT).trim();
|
|
39
|
-
const accessToken = p.credential(ACCESS_TOKEN);
|
|
40
|
-
const clientId = p.credential(CLIENT_ID);
|
|
41
|
-
const clientSecret = p.credential(CLIENT_SECRET);
|
|
42
|
-
if (!accessToken && !(clientId && clientSecret)) {
|
|
43
|
-
throw new errors_1.CliError('Microsoft Graph: pass an app registration\'s client id and secret (AZURE_CLIENT_ID, AZURE_CLIENT_SECRET) with the User.Read.All application permission, or a Graph access token (AZURE_GRAPH_TOKEN).');
|
|
44
|
-
}
|
|
45
|
-
return { tenant, accessToken, clientId, clientSecret };
|
|
46
|
-
}
|
|
47
|
-
/** The B2C custom policy files of a folder (`*.xml`), for the config report. */
|
|
48
|
-
function readPolicyDir(dir) {
|
|
49
|
-
const root = (0, node_path_1.resolve)(dir);
|
|
50
|
-
let names;
|
|
51
|
-
try {
|
|
52
|
-
names = (0, node_fs_1.readdirSync)(root);
|
|
53
|
-
}
|
|
54
|
-
catch (err) {
|
|
55
|
-
throw new errors_1.CliError(`Could not read the custom policy folder ${dir}: ${err.message}`);
|
|
56
|
-
}
|
|
57
|
-
return names
|
|
58
|
-
.filter((n) => n.toLowerCase().endsWith('.xml') && (0, node_fs_1.statSync)((0, node_path_1.join)(root, n)).isFile())
|
|
59
|
-
.sort()
|
|
60
|
-
.map((n) => ({ file: (0, node_path_1.basename)(n), text: (0, node_fs_1.readFileSync)((0, node_path_1.join)(root, n), 'utf8') }));
|
|
61
|
-
}
|
|
62
|
-
/** Tenant name of a domain argument (`contoso.onmicrosoft.com` → `contoso`), or undefined for a GUID. */
|
|
63
|
-
function tenantNameOf(raw) {
|
|
64
|
-
const m = raw ? /^([a-z0-9-]+)\.(onmicrosoft|b2clogin|ciamlogin)\.com$/i.exec(raw.trim()) : null;
|
|
65
|
-
return m ? m[1].toLowerCase() : undefined;
|
|
66
|
-
}
|
|
67
|
-
const GUID = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
68
|
-
/** The plugin for one of the two Microsoft customer-identity products. */
|
|
69
|
-
function azurePlugin(kind) {
|
|
70
|
-
const b2c = kind === 'b2c';
|
|
71
|
-
const label = b2c ? 'Azure AD B2C' : 'Microsoft Entra External ID';
|
|
72
|
-
const preset = b2c ? 'azure_ad_b2c' : 'entra_external_id';
|
|
73
|
-
const commonVars = (p, base) => {
|
|
74
|
-
const out = { ...base };
|
|
75
|
-
const tenant = p.credential({ ...TENANT, required: false })?.trim();
|
|
76
|
-
const name = tenantNameOf(tenant);
|
|
77
|
-
if (name)
|
|
78
|
-
out.tenant = name;
|
|
79
|
-
if (tenant && GUID.test(tenant))
|
|
80
|
-
out.tenant_id = tenant.toLowerCase();
|
|
81
|
-
const clientId = p.credential(APP_CLIENT_ID);
|
|
82
|
-
if (clientId)
|
|
83
|
-
out.client_id = clientId;
|
|
84
|
-
return out;
|
|
85
|
-
};
|
|
86
|
-
return {
|
|
87
|
-
vendor: b2c ? 'azure-ad-b2c' : 'entra-external-id',
|
|
88
|
-
source: preset,
|
|
89
|
-
label,
|
|
90
|
-
help: b2c
|
|
91
|
-
? 'Move an Azure AD B2C tenant: identity providers, user flows, custom policies (with file and line), custom attributes, app registrations and groups as Atlas config; consumer users keyed by object id with their sign-in names, social links, custom attributes, groups and SMS / email factors; a zero-logout bridge for B2C ID tokens; lazy migration through a ROPC user flow (Graph never returns passwords); and the MSAL code. Your app registration secret stays on this machine.'
|
|
92
|
-
: 'Move a Microsoft Entra External ID (external) tenant: identity providers, sign-up / sign-in flows, custom attributes, app registrations and groups as Atlas config; customers keyed by object id with their sign-in identities, social links, custom attributes, groups and SMS / email factors; a zero-logout bridge for External ID ID tokens; lazy migration through the native authentication API (Graph never returns passwords); and the MSAL code. Your app registration secret stays on this machine.',
|
|
93
|
-
config: {
|
|
94
|
-
reads: `your ${label} tenant via Microsoft Graph${b2c ? ' (and your custom policy files with --b2c-policy-dir)' : ''}`,
|
|
95
|
-
credentials: [TENANT, CLIENT_ID, CLIENT_SECRET, ACCESS_TOKEN, ...(b2c ? [POLICY_DIR] : [])],
|
|
96
|
-
async translate(p) {
|
|
97
|
-
const g = graph(p);
|
|
98
|
-
const dir = b2c ? p.credential(POLICY_DIR) : undefined;
|
|
99
|
-
const policies = dir ? readPolicyDir(dir) : [];
|
|
100
|
-
const snap = await (0, plugin_kit_1.vendorStep)(label, () => (0, azure_config_1.fetchAzureConfig)((0, azure_1.graphHttp)({ ...g, fetchImpl: p.fetch }), kind, g.tenant, policies));
|
|
101
|
-
return (0, azure_config_1.translateAzureConfig)(snap);
|
|
102
|
-
},
|
|
103
|
-
},
|
|
104
|
-
export: {
|
|
105
|
-
reads: 'Microsoft Graph (users with their identities and extension attributes, groups, authentication methods)',
|
|
106
|
-
credentials: [TENANT, CLIENT_ID, CLIENT_SECRET, ACCESS_TOKEN, AUTH_METHODS, DIRECTORY_USERS],
|
|
107
|
-
limits: [
|
|
108
|
-
`${label} never returns passwords: Graph's password field is write-only. Every password moves by lazy migration, ${b2c ? 'through a ROPC user flow' : 'through the native authentication API'}, on the user's first Atlas sign-in.`,
|
|
109
|
-
'Authenticator-app (software OATH) secrets and FIDO2 keys are never exported: those users enrol again. SMS and email methods move with --set azure-auth-methods=true.',
|
|
110
|
-
'Sessions are not exported: the bridge exchanges the ID token your app holds (MSAL caches up to v3 are read in the browser; v4 caches are encrypted).',
|
|
111
|
-
...(b2c ? ['Federated identities that Graph keeps only as an alternativeSecurityId cannot be linked by id: those users relink by verified email on first sign-in.'] : []),
|
|
112
|
-
],
|
|
113
|
-
async run(p, writer, resume) {
|
|
114
|
-
const g = graph(p);
|
|
115
|
-
const groups = p.credential(GROUPS_AS) ?? 'roles';
|
|
116
|
-
if (groups !== 'roles' && groups !== 'skip')
|
|
117
|
-
throw new errors_1.CliError(`${label}: --groups-as must be roles or skip (got ${groups}).`);
|
|
118
|
-
const set = await (0, plugin_kit_1.vendorStep)(label, () => (0, azure_1.exportAzure)({
|
|
119
|
-
kind,
|
|
120
|
-
...g,
|
|
121
|
-
authMethods: (0, project_files_1.truthyCredential)(p, AUTH_METHODS),
|
|
122
|
-
includeDirectoryUsers: (0, project_files_1.truthyCredential)(p, DIRECTORY_USERS),
|
|
123
|
-
groups,
|
|
124
|
-
fetchImpl: p.fetch,
|
|
125
|
-
onProgress: (m) => p.say(` reading ${m}`),
|
|
126
|
-
}));
|
|
127
|
-
await (0, plugin_kit_1.writeRecordSet)(set, writer, resume, p.say);
|
|
128
|
-
},
|
|
129
|
-
},
|
|
130
|
-
bridge: {
|
|
131
|
-
preset,
|
|
132
|
-
vars(p, t) {
|
|
133
|
-
const vars = commonVars(p, t?.bridge?.vars);
|
|
134
|
-
if (b2c) {
|
|
135
|
-
const policy = p.credential(SIGN_IN_POLICY);
|
|
136
|
-
if (policy)
|
|
137
|
-
vars.policy = policy;
|
|
138
|
-
}
|
|
139
|
-
return vars;
|
|
140
|
-
},
|
|
141
|
-
},
|
|
142
|
-
lazy: {
|
|
143
|
-
preset,
|
|
144
|
-
config(p, t) {
|
|
145
|
-
const config = commonVars(p, t?.lazy?.config);
|
|
146
|
-
delete config.tenant_id;
|
|
147
|
-
if (b2c) {
|
|
148
|
-
const policy = p.credential(ROPC_POLICY);
|
|
149
|
-
if (policy)
|
|
150
|
-
config.policy = policy;
|
|
151
|
-
const ropcClient = p.credential(ROPC_CLIENT_ID);
|
|
152
|
-
if (ropcClient)
|
|
153
|
-
config.client_id = ropcClient;
|
|
154
|
-
}
|
|
155
|
-
const domain = p.credential(CUSTOM_DOMAIN);
|
|
156
|
-
if (domain)
|
|
157
|
-
config.custom_domain = domain;
|
|
158
|
-
return config;
|
|
159
|
-
},
|
|
160
|
-
},
|
|
161
|
-
codemod: b2c ? 'azure-ad-b2c' : 'entra-external-id',
|
|
162
|
-
};
|
|
163
|
-
}
|
|
164
|
-
exports.azureAdB2cPlugin = azurePlugin('b2c');
|
|
165
|
-
//# sourceMappingURL=plugin.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.js","sourceRoot":"","sources":["../../../src/migrate/azure-ad-b2c/plugin.ts"],"names":[],"mappings":";;;AA+CA,sCAYC;AAWD,kCAwFC;AA9JD,qCAA8D;AAC9D,yCAAoD;AACpD,2CAAyE;AACzE,yDAA0G;AAC1G,yCAAwC;AACxC,2DAA2D;AAE3D,qDAAwE;AAExE;;;;;;;;;;GAUG;AAEH,MAAM,MAAM,GAAmB,EAAE,IAAI,EAAE,gBAAgB,EAAE,GAAG,EAAE,iBAAiB,EAAE,KAAK,EAAE,0DAA0D,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;AACrK,MAAM,SA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AC,WAAW,CAAC,CAAC;oBACzC,IAAI,MAAM;wBAAE,MAAM,CAAC,MAAM,GAAG,MAAM,CAAC;oBACnC,MAAM,UAAU,GAAG,CAAC,CAAC,UAAU,CAAC,cAAc,CAAC,CAAC;oBAChD,IAAI,UAAU;wBAAE,MAAM,CAAC,SAAS,GAAG,UAAU,CAAC;gBAChD,CAAC;gBACD,MAAM,MAAM,GAAG,CAAC,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;gBAC3C,IAAI,MAAM;oBAAE,MAAM,CAAC,aAAa,GAAG,MAAM,CAAC;gBAC1C,OAAO,MAAM,CAAC;YAChB,CAAC;SACF;QACD,OAAO,EAAE,GAAG,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,mBAAmB;KACpD,CAAC;AACJ,CAAC;AAEY,QAAA,gBAAgB,GAAoB,WAAW,CAAC,KAAK,CAAC,CAAC"}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { type BetterAuthImport, type BetterAuthImportOptions } from '@atlasauth/backend';
|
|
2
|
-
import type { ConfigHttp } from '../../config-http';
|
|
3
|
-
/**
|
|
4
|
-
* Every call the Better Auth migration makes into the import and session-bridge
|
|
5
|
-
* APIs lives in this one module:
|
|
6
|
-
*
|
|
7
|
-
* - the export/import pair: the `@atlasauth/better-auth-migrate` exporter seals
|
|
8
|
-
* a bundle to the instance's import key (`GET /v1/better_auth_imports/public_key`),
|
|
9
|
-
* which is uploaded in line-split parts, finalized (which runs the dry run)
|
|
10
|
-
* and applied under `/v1/better_auth_imports`, and
|
|
11
|
-
* - the session bridge (`/v1/migrations/better_auth/bridge`), which lets a live
|
|
12
|
-
* Better Auth session become an Atlas session during the cutover window.
|
|
13
|
-
*/
|
|
14
|
-
/** The exporter's documented command line. */
|
|
15
|
-
export declare const EXPORTER_BIN = "atlas-better-auth-export";
|
|
16
|
-
export declare const EXPORTER_PACKAGE = "@atlasauth/better-auth-migrate";
|
|
17
|
-
/** `publicKey` is the key's compact `kid:public_key` form. */
|
|
18
|
-
export declare function exporterCommand(opts: {
|
|
19
|
-
out: string;
|
|
20
|
-
publicKey: string;
|
|
21
|
-
}): {
|
|
22
|
-
cmd: string;
|
|
23
|
-
args: string[];
|
|
24
|
-
display: string;
|
|
25
|
-
};
|
|
26
|
-
/** The import key the exporter seals the bundle to (the private half stays with Atlas), as `kid:public_key`. */
|
|
27
|
-
export declare function getImportPublicKey(http: ConfigHttp): Promise<string>;
|
|
28
|
-
export type ImportJob = BetterAuthImport;
|
|
29
|
-
/** Statuses an import rests in; anything else is still being worked on. */
|
|
30
|
-
export declare const RESTING_STATUSES: readonly string[];
|
|
31
|
-
/**
|
|
32
|
-
* Upload a sealed bundle: create the import, send it in line-split parts of at
|
|
33
|
-
* most 8 MiB, then finalize (which checks the parts and the key and runs the
|
|
34
|
-
* dry run; a large bundle comes back `analyzing` and finishes in the background).
|
|
35
|
-
*/
|
|
36
|
-
export declare function uploadBundle(http: ConfigHttp, opts: {
|
|
37
|
-
bundle: string;
|
|
38
|
-
options?: BetterAuthImportOptions;
|
|
39
|
-
onPart?: (n: number, of: number) => void;
|
|
40
|
-
}): Promise<ImportJob>;
|
|
41
|
-
export declare function getImport(http: ConfigHttp, id: string): Promise<ImportJob>;
|
|
42
|
-
/** Finalize an import whose upload finished but was never finalized. */
|
|
43
|
-
export declare function finalizeImport(http: ConfigHttp, id: string): Promise<ImportJob>;
|
|
44
|
-
/** Apply a dry-run-ready import, or resume a failed one from where it stopped. */
|
|
45
|
-
export declare function applyImport(http: ConfigHttp, id: string, opts: {
|
|
46
|
-
confirmConflicts: boolean;
|
|
47
|
-
}): Promise<ImportJob>;
|
|
48
|
-
export interface BridgeSettings {
|
|
49
|
-
/** Better Auth's `advanced.cookiePrefix` (default `better-auth`). */
|
|
50
|
-
cookiePrefix: string;
|
|
51
|
-
/** When the bridge stops accepting Better Auth sessions (epoch ms). */
|
|
52
|
-
endsAt: number;
|
|
53
|
-
}
|
|
54
|
-
/**
|
|
55
|
-
* Turn the Better Auth session bridge on for a window. The old app's Better
|
|
56
|
-
* Auth secret is stored write-only so Atlas can check the cookie signature
|
|
57
|
-
* (the live fallback to the old app stays off unless set up separately).
|
|
58
|
-
*/
|
|
59
|
-
export declare function enableSessionBridge(http: ConfigHttp, settings: BridgeSettings, secret: string): Promise<void>;
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RESTING_STATUSES = exports.EXPORTER_PACKAGE = exports.EXPORTER_BIN = void 0;
|
|
4
|
-
exports.exporterCommand = exporterCommand;
|
|
5
|
-
exports.getImportPublicKey = getImportPublicKey;
|
|
6
|
-
exports.uploadBundle = uploadBundle;
|
|
7
|
-
exports.getImport = getImport;
|
|
8
|
-
exports.finalizeImport = finalizeImport;
|
|
9
|
-
exports.applyImport = applyImport;
|
|
10
|
-
exports.enableSessionBridge = enableSessionBridge;
|
|
11
|
-
const backend_1 = require("@atlasauth/backend");
|
|
12
|
-
/**
|
|
13
|
-
* Every call the Better Auth migration makes into the import and session-bridge
|
|
14
|
-
* APIs lives in this one module:
|
|
15
|
-
*
|
|
16
|
-
* - the export/import pair: the `@atlasauth/better-auth-migrate` exporter seals
|
|
17
|
-
* a bundle to the instance's import key (`GET /v1/better_auth_imports/public_key`),
|
|
18
|
-
* which is uploaded in line-split parts, finalized (which runs the dry run)
|
|
19
|
-
* and applied under `/v1/better_auth_imports`, and
|
|
20
|
-
* - the session bridge (`/v1/migrations/better_auth/bridge`), which lets a live
|
|
21
|
-
* Better Auth session become an Atlas session during the cutover window.
|
|
22
|
-
*/
|
|
23
|
-
/** The exporter's documented command line. */
|
|
24
|
-
exports.EXPORTER_BIN = 'atlas-better-auth-export';
|
|
25
|
-
exports.EXPORTER_PACKAGE = '@atlasauth/better-auth-migrate';
|
|
26
|
-
/** `publicKey` is the key's compact `kid:public_key` form. */
|
|
27
|
-
function exporterCommand(opts) {
|
|
28
|
-
const args = ['--yes', exports.EXPORTER_BIN, '--out', opts.out, '--public-key', opts.publicKey];
|
|
29
|
-
return { cmd: 'npx', args, display: `npx ${exports.EXPORTER_BIN} --out ${opts.out} --public-key ${opts.publicKey}` };
|
|
30
|
-
}
|
|
31
|
-
/** The import key the exporter seals the bundle to (the private half stays with Atlas), as `kid:public_key`. */
|
|
32
|
-
async function getImportPublicKey(http) {
|
|
33
|
-
const key = await http.get('/v1/better_auth_imports/public_key');
|
|
34
|
-
if (!key?.compact)
|
|
35
|
-
throw new Error('The instance did not return an import key.');
|
|
36
|
-
return key.compact;
|
|
37
|
-
}
|
|
38
|
-
/** Statuses an import rests in; anything else is still being worked on. */
|
|
39
|
-
exports.RESTING_STATUSES = ['uploading', 'ready', 'invalid', 'completed', 'failed'];
|
|
40
|
-
const importPath = (id, sub = '') => `/v1/better_auth_imports/${encodeURIComponent(id)}${sub}`;
|
|
41
|
-
/**
|
|
42
|
-
* Upload a sealed bundle: create the import, send it in line-split parts of at
|
|
43
|
-
* most 8 MiB, then finalize (which checks the parts and the key and runs the
|
|
44
|
-
* dry run; a large bundle comes back `analyzing` and finishes in the background).
|
|
45
|
-
*/
|
|
46
|
-
async function uploadBundle(http, opts) {
|
|
47
|
-
const parts = (0, backend_1.splitBundleParts)(opts.bundle);
|
|
48
|
-
if (parts.length === 0)
|
|
49
|
-
throw new Error('The bundle is empty.');
|
|
50
|
-
const created = await http.post('/v1/better_auth_imports', opts.options ? { options: opts.options } : {});
|
|
51
|
-
for (let i = 0; i < parts.length; i++) {
|
|
52
|
-
await http.put(importPath(created.id, `/parts/${i + 1}`), { data: parts[i] });
|
|
53
|
-
opts.onPart?.(i + 1, parts.length);
|
|
54
|
-
}
|
|
55
|
-
return http.post(importPath(created.id, '/finalize'), {});
|
|
56
|
-
}
|
|
57
|
-
async function getImport(http, id) {
|
|
58
|
-
return http.get(importPath(id));
|
|
59
|
-
}
|
|
60
|
-
/** Finalize an import whose upload finished but was never finalized. */
|
|
61
|
-
async function finalizeImport(http, id) {
|
|
62
|
-
return http.post(importPath(id, '/finalize'), {});
|
|
63
|
-
}
|
|
64
|
-
/** Apply a dry-run-ready import, or resume a failed one from where it stopped. */
|
|
65
|
-
async function applyImport(http, id, opts) {
|
|
66
|
-
return http.post(importPath(id, '/apply'), opts.confirmConflicts ? { confirm_conflicts: true } : {});
|
|
67
|
-
}
|
|
68
|
-
/**
|
|
69
|
-
* Turn the Better Auth session bridge on for a window. The old app's Better
|
|
70
|
-
* Auth secret is stored write-only so Atlas can check the cookie signature
|
|
71
|
-
* (the live fallback to the old app stays off unless set up separately).
|
|
72
|
-
*/
|
|
73
|
-
async function enableSessionBridge(http, settings, secret) {
|
|
74
|
-
await http.put('/v1/migrations/better_auth/bridge', {
|
|
75
|
-
enabled: true,
|
|
76
|
-
ends_at: settings.endsAt,
|
|
77
|
-
cookie_prefix: settings.cookiePrefix,
|
|
78
|
-
live_fallback: { secret },
|
|
79
|
-
});
|
|
80
|
-
}
|
|
81
|
-
//# sourceMappingURL=integration.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"integration.js","sourceRoot":"","sources":["../../../src/migrate/better-auth/integration.ts"],"names":[],"mappings":";;;AAoBA,0CAGC;AAGD,gDAIC;AAcD,oCAYC;AAED,8BAEC;AAGD,wCAEC;AAGD,kCAEC;AAcD,kDAOC;AA3FD,gDAAqI;AAGrI;;;;;;;;;;GAUG;AAEH,8CAA8C;AACjC,QAAA,YAAY,GAAG,0BAA0B,CAAC;AAC1C,QAAA,gBAAgB,GAAG,gCAAgC,CAAC;AAEjE,8DAA8D;AAC9D,SAAgB,eAAe,CAAC,IAAwC;IACtE,MAAM,IAAI,GAAG,CAAC,OAAO,EAAE,oBAAY,EAAE,OAAO,EAAE,IAAI,CAAC,GAAG,EAAE,cAAc,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC;IACxF,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,oBAAY,UA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
import type { RunContext } from '../../context';
|
|
3
|
-
import { type Json } from '../../serialize';
|
|
4
|
-
/**
|
|
5
|
-
* `atlas migrate better-auth [path]` — the whole Better Auth → Atlas program as
|
|
6
|
-
* one resumable run:
|
|
7
|
-
*
|
|
8
|
-
* preflight → translate → apply (review the diff, confirm, config push) →
|
|
9
|
-
* export (the exporter runs in the app) → import (dry run, confirm, apply) →
|
|
10
|
-
* bridge (no forced logout) → code (the codemod) → verify (checklist).
|
|
11
|
-
*
|
|
12
|
-
* Each finished step is checkpointed in the state file, so `--resume` carries
|
|
13
|
-
* on where a run stopped (a confirmation declined, an env var missing, the
|
|
14
|
-
* export not run yet). `--dry-run` walks every step without changing the
|
|
15
|
-
* instance or the code; `--yes` answers every confirmation.
|
|
16
|
-
*/
|
|
17
|
-
export declare const STEPS: readonly ["preflight", "translate", "apply", "export", "import", "bridge", "code", "verify"];
|
|
18
|
-
export type StepId = (typeof STEPS)[number];
|
|
19
|
-
type StepStatus = 'done' | 'skipped' | 'planned' | 'action_needed' | 'awaiting_confirmation' | 'blocked';
|
|
20
|
-
interface StepRecord {
|
|
21
|
-
status: StepStatus;
|
|
22
|
-
at?: number;
|
|
23
|
-
detail?: Record<string, unknown>;
|
|
24
|
-
message?: string;
|
|
25
|
-
}
|
|
26
|
-
export interface MigrationState {
|
|
27
|
-
version: 1;
|
|
28
|
-
project: string;
|
|
29
|
-
instance_id: string | null;
|
|
30
|
-
environment: string | null;
|
|
31
|
-
started_at: number;
|
|
32
|
-
steps: Partial<Record<StepId, StepRecord>>;
|
|
33
|
-
}
|
|
34
|
-
/** `${NAME}` placeholders in the config files that the environment does not set. */
|
|
35
|
-
export declare function missingPlaceholders(dir: string, env: NodeJS.ProcessEnv): Set<string>;
|
|
36
|
-
/** Leaves of `desired` that differ from `live` (arrays compare as a whole). */
|
|
37
|
-
export declare function leafDiff(desired: Json, live: Json, prefix?: string): Array<{
|
|
38
|
-
path: string;
|
|
39
|
-
from: Json | undefined;
|
|
40
|
-
to: Json;
|
|
41
|
-
}>;
|
|
42
|
-
export declare function migrateBetterAuth(ctx: RunContext, args: ParsedArgs, projectArg: string | undefined): Promise<number>;
|
|
43
|
-
export {};
|