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