@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,81 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PLAINTEXT_PBKDF2_ITERATIONS = void 0;
|
|
4
|
-
exports.detectPasswordHash = detectPasswordHash;
|
|
5
|
-
exports.isKnownAlgorithm = isKnownAlgorithm;
|
|
6
|
-
const node_crypto_1 = require("node:crypto");
|
|
7
|
-
const migrate_1 = require("@atlasauth/migrate");
|
|
8
|
-
const SHAPES = [
|
|
9
|
-
{ re: /^\$2[aby]\$\d{2}\$[./A-Za-z0-9]{53}$/, algorithm: 'bcrypt' },
|
|
10
|
-
{ re: /^\$argon2(id|i|d)\$/, algorithm: 'argon2' },
|
|
11
|
-
{ re: /^\$6\$(rounds=\d{1,9}\$)?[^$]{0,16}\$[./0-9A-Za-z]{86}$/, algorithm: 'sha_crypt' },
|
|
12
|
-
{ re: /^\$5\$(rounds=\d{1,9}\$)?[^$]{0,16}\$[./0-9A-Za-z]{43}$/, algorithm: 'sha_crypt' },
|
|
13
|
-
{ re: /^\$(1|apr1)\$[^$]{0,8}\$[./0-9A-Za-z]{22}$/, algorithm: 'md5_crypt', weak: true },
|
|
14
|
-
{ re: /^pbkdf2_(sha1|sha256|sha512)\$\d+\$[^$]+\$.+$/, algorithm: 'pbkdf2_django' },
|
|
15
|
-
{ re: /^bcrypt_sha256\$\$2[aby]\$/, algorithm: 'bcrypt_sha256_django' },
|
|
16
|
-
{ re: /^\$pbkdf2-(sha1|sha256|sha512)\$\d+\$[^$]*\$.+$/, algorithm: 'pbkdf2_phc' },
|
|
17
|
-
{ re: /^\$scrypt\$ln=\d+,r=\d+,p=\d+\$/, algorithm: 'scrypt_phc' },
|
|
18
|
-
{ re: /^pbkdf2:(sha1|sha256|sha512)(:\d+)?\$[^$]+\$[0-9a-f]+$/, algorithm: 'pbkdf2_werkzeug' },
|
|
19
|
-
{ re: /^scrypt:\d+:\d+:\d+\$[^$]+\$[0-9a-f]+$/, algorithm: 'scrypt_werkzeug' },
|
|
20
|
-
{ re: /^\$[PH]\$[./0-9A-Za-z]{31}$/, algorithm: 'phpass', weak: true },
|
|
21
|
-
{ re: /^\{(SSHA|SHA|SSHA256|SSHA512|SHA256|SHA512)\}[A-Za-z0-9+/=]+$/i, algorithm: 'ldap_ssha', weak: true },
|
|
22
|
-
{ re: /^\{(MD5|SMD5|SHA384|SSHA384)\}[A-Za-z0-9+/=]+$/i, algorithm: 'ldap_digest', weak: true },
|
|
23
|
-
{ re: /^\{PBKDF2(-(SHA1|SHA256|SHA512))?\}\d+\$/i, algorithm: 'ldap_pbkdf2' },
|
|
24
|
-
{ re: /^\{PBKDF2_SHA256\}[A-Za-z0-9+/=]+$/i, algorithm: 'ldap_pbkdf2' },
|
|
25
|
-
];
|
|
26
|
-
/** `{CRYPT}` / `{BCRYPT}` / `{ARGON2}` around one of the crypt-style shapes above. */
|
|
27
|
-
const WRAPPED = /^\{(CRYPT|BCRYPT|ARGON2)\}(\$.+)$/i;
|
|
28
|
-
/** Directory schemes that are not hashes Atlas can check (pass-through or Kerberos). */
|
|
29
|
-
const DELEGATED = /^\{(SASL|K5KEY|KERBEROS|UNIX|NS-MTA-MD5|RADIUS|TOTP)\}/i;
|
|
30
|
-
/**
|
|
31
|
-
* Identify a self-describing hash. `{CLEARTEXT}` (and a plaintext value when
|
|
32
|
-
* `plaintext` is allowed) is hashed here with PBKDF2 before it is written, so
|
|
33
|
-
* no password is ever stored in the clear (Atlas re-hashes it to Argon2id on
|
|
34
|
-
* the first sign-in).
|
|
35
|
-
*/
|
|
36
|
-
function detectPasswordHash(raw, options = {}) {
|
|
37
|
-
const value = raw?.trim();
|
|
38
|
-
if (!value)
|
|
39
|
-
return { ok: false, reason: 'no password' };
|
|
40
|
-
for (const s of SHAPES)
|
|
41
|
-
if (s.re.test(value))
|
|
42
|
-
return { ok: true, password: { algorithm: s.algorithm, hash: value }, weak: s.weak === true };
|
|
43
|
-
const wrapped = WRAPPED.exec(value);
|
|
44
|
-
if (wrapped) {
|
|
45
|
-
const inner = wrapped[2];
|
|
46
|
-
const known = SHAPES.find((s) => s.re.test(inner) && ['bcrypt', 'argon2', 'sha_crypt', 'sha_crypt', 'md5_crypt'].includes(s.algorithm));
|
|
47
|
-
if (known)
|
|
48
|
-
return { ok: true, password: { algorithm: 'ldap_crypt', hash: value }, weak: known.weak === true };
|
|
49
|
-
return { ok: false, reason: `{${wrapped[1].toUpperCase()}} hash in a format Atlas cannot verify` };
|
|
50
|
-
}
|
|
51
|
-
if (/^\{CRYPT\}/i.test(value))
|
|
52
|
-
return { ok: false, reason: 'traditional DES {CRYPT} hash (not verifiable)' };
|
|
53
|
-
if (DELEGATED.test(value))
|
|
54
|
-
return { ok: false, reason: `${/^\{[^}]+\}/.exec(value)[0]} is checked by another service (pass-through authentication)` };
|
|
55
|
-
const clear = /^\{CLEARTEXT\}(.*)$/i.exec(value);
|
|
56
|
-
if (clear)
|
|
57
|
-
return hashPlaintext(clear[1]);
|
|
58
|
-
if (/^\{[A-Z0-9_-]+\}/i.test(value))
|
|
59
|
-
return { ok: false, reason: `unsupported scheme ${/^\{[^}]+\}/.exec(value)[0]}` };
|
|
60
|
-
if (options.plaintext)
|
|
61
|
-
return hashPlaintext(value);
|
|
62
|
-
return { ok: false, reason: 'unrecognised hash format (name its algorithm)' };
|
|
63
|
-
}
|
|
64
|
-
/** PBKDF2-SHA256 rounds for a plaintext password hashed on export (re-hashed to Argon2id on first sign-in). */
|
|
65
|
-
exports.PLAINTEXT_PBKDF2_ITERATIONS = 10_000;
|
|
66
|
-
function hashPlaintext(password) {
|
|
67
|
-
if (!password)
|
|
68
|
-
return { ok: false, reason: 'empty password' };
|
|
69
|
-
const salt = (0, node_crypto_1.randomBytes)(16);
|
|
70
|
-
const hash = (0, node_crypto_1.pbkdf2Sync)(password, salt, exports.PLAINTEXT_PBKDF2_ITERATIONS, 32, 'sha256');
|
|
71
|
-
return {
|
|
72
|
-
ok: true,
|
|
73
|
-
password: { algorithm: 'pbkdf2', hash: hash.toString('base64'), salt: salt.toString('base64'), params: { digest: 'sha256', iterations: exports.PLAINTEXT_PBKDF2_ITERATIONS, encoding: 'base64', salt_encoding: 'base64' } },
|
|
74
|
-
weak: false,
|
|
75
|
-
};
|
|
76
|
-
}
|
|
77
|
-
/** Whether Atlas's registry has a verifier id (or `auto`). */
|
|
78
|
-
function isKnownAlgorithm(id) {
|
|
79
|
-
return migrate_1.PASSWORD_HASH_ALGORITHMS.includes(id);
|
|
80
|
-
}
|
|
81
|
-
//# sourceMappingURL=password-detect.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"password-detect.js","sourceRoot":"","sources":["../../../src/migrate/export/password-detect.ts"],"names":[],"mappings":";;;AA4CA,gDAkBC;AAiBD,4CAEC;AAjFD,6CAAsD;AACtD,gDAAiF;AAYjF,MAAM,MAAM,GAA6D;IACvE,EAAE,EAAE,EAAE,sCAAsC,EAAE,SAAS,EAAE,QAAQ,EAAE;IACnE,EAAE,EAAE,EAAE,qBAAqB,EAAE,SAAS,EAAE,QAAQ,EAAE;IAClD,EAAE,EAAE,EAAE,yDAAyD,EAAE,SAAS,EAAE,WAAW,EAAE;IACzF,EAAE,EAAE,EAAE,yDAAyD,EAAE,SAAS,EAAE,WAAW,EAAE;IACzF,EAAE,EAAE,EAAE,4CAA4C,EAAE,SAAS,EAAE,WAAW,EAAE,IAAI,EAAE,IAAI,EAAE;IACxF,EAAE,EAAE,EAAE,+CAA+C,EAAE,SAAS,EAAE,eAAe,EAAE;IACnF,EAAE,EAAE,EAAE,4BAA4B,EAAE,SAAS,EAAE,sBAAsB,EAAE;IACvE,EAAE,EAAE,EAAE,iDAAiD,EAAE,SAAS,EAAE,YAAY,EAAE;IAClF,EAAE,EAAE,EAAE,iCAAiC,EAAE,SAAS,EAAE,YAAY,EAAE;IAClE,EAAE,EAAE,EAAE,wDAAwD,EAAE,SAAS,EAAE,iBAAiB,EAAE;IAC9F,EAAE,EAAE,EAAE,wCAAwC,EAAE,SAAS,EAAE,iBAAiB,EAAE;IAC9E,EAAE,EAAE,EAAE,6BAA6B,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE;IACtE,EAAE,EAAE,EAAE,gEAAgE,EAAE,SAAS,EAAE,WAAW,EAAE,IAAI,EAAE,IAAI,EAAE;IAC5G,EAAE,EAAE,EAAE,iDAAiD,EAAE,SAAS,EAAE,aAA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AM,EAAE,gBAAgB,EAAE,CAAC;IAC9D,MAAM,IAAI,GAAG,IAAA,yBAAW,EAAC,EAAE,CAAC,CAAC;IAC7B,MAAM,IAAI,GAAG,IAAA,wBAAU,EAAC,QAAQ,EAAE,IAAI,EAAE,mCAA2B,EAAE,EAAE,EAAE,QAAQ,CAAC,CAAC;IACnF,OAAO;QACL,EAAE,EAAE,IAAI;QACR,QAAQ,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE,mCAA2B,EAAE,QAAQ,EAAE,QAAQ,EAAE,aAAa,EAAE,QAAQ,EAAE,EAAE;QACnN,IAAI,EAAE,KAAK;KACZ,CAAC;AACJ,CAAC;AAED,8DAA8D;AAC9D,SAAgB,gBAAgB,CAAC,EAAU;IACzC,OAAQ,kCAA8C,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;AACtE,CAAC"}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import type { SsoConnectionRecord } from '@atlasauth/migrate';
|
|
2
|
-
import { RecordSet, type Obj } from './record-set';
|
|
3
|
-
import { VendorHttp } from './vendor-http';
|
|
4
|
-
/**
|
|
5
|
-
* `atlas migrate ping-identity export` — a PingOne environment through its
|
|
6
|
-
* management API with a worker application (client id + secret, on this
|
|
7
|
-
* machine): users (login, email and verification, name, phones, enabled /
|
|
8
|
-
* locked state, population, last sign-on), groups (as roles, with their
|
|
9
|
-
* members), external-IdP identities and the environment's SAML / OIDC identity
|
|
10
|
-
* providers (as SSO connections).
|
|
11
|
-
*
|
|
12
|
-
* PingOne never returns password hashes, TOTP secrets or FIDO2 credentials:
|
|
13
|
-
* passwords move by lazy migration (the `ping_identity` preset checks them with
|
|
14
|
-
* PingOne's password-check call), second factors are enrolled again.
|
|
15
|
-
*/
|
|
16
|
-
/** auth.pingone.<tld> / api.pingone.<tld> for a region code. */
|
|
17
|
-
export declare function pingRegion(region: string | undefined): string;
|
|
18
|
-
export interface PingOneExportOptions {
|
|
19
|
-
environmentId: string;
|
|
20
|
-
clientId: string;
|
|
21
|
-
clientSecret: string;
|
|
22
|
-
region?: string;
|
|
23
|
-
/** Read each user's group memberships (one call per user; off for very large environments). */
|
|
24
|
-
groups?: boolean;
|
|
25
|
-
fetchImpl?: typeof fetch;
|
|
26
|
-
sleep?: (ms: number) => Promise<void>;
|
|
27
|
-
onProgress?: (message: string) => void;
|
|
28
|
-
}
|
|
29
|
-
/** A client-credentials access token for the worker application. */
|
|
30
|
-
export declare function pingOneToken(o: Pick<PingOneExportOptions, 'environmentId' | 'clientId' | 'clientSecret' | 'region' | 'fetchImpl'>): Promise<string>;
|
|
31
|
-
export declare function pingOneHttp(o: PingOneExportOptions, token: string): VendorHttp;
|
|
32
|
-
/** Every item of a PingOne collection (`_embedded.<key>`, next page in `_links.next.href`). */
|
|
33
|
-
export declare function pingOneList(http: VendorHttp, path: string, key: string): Promise<Obj[]>;
|
|
34
|
-
/** A PingOne identity provider → an SSO connection (SAML / OIDC); other types are social logins. */
|
|
35
|
-
export declare function ssoConnectionOf(idp: Obj): SsoConnectionRecord | null;
|
|
36
|
-
export declare function exportPingOne(o: PingOneExportOptions): Promise<RecordSet>;
|
|
@@ -1,218 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.pingRegion = pingRegion;
|
|
4
|
-
exports.pingOneToken = pingOneToken;
|
|
5
|
-
exports.pingOneHttp = pingOneHttp;
|
|
6
|
-
exports.pingOneList = pingOneList;
|
|
7
|
-
exports.ssoConnectionOf = ssoConnectionOf;
|
|
8
|
-
exports.exportPingOne = exportPingOne;
|
|
9
|
-
const record_set_1 = require("./record-set");
|
|
10
|
-
const translate_kit_1 = require("./translate-kit");
|
|
11
|
-
const vendor_http_1 = require("./vendor-http");
|
|
12
|
-
/**
|
|
13
|
-
* `atlas migrate ping-identity export` — a PingOne environment through its
|
|
14
|
-
* management API with a worker application (client id + secret, on this
|
|
15
|
-
* machine): users (login, email and verification, name, phones, enabled /
|
|
16
|
-
* locked state, population, last sign-on), groups (as roles, with their
|
|
17
|
-
* members), external-IdP identities and the environment's SAML / OIDC identity
|
|
18
|
-
* providers (as SSO connections).
|
|
19
|
-
*
|
|
20
|
-
* PingOne never returns password hashes, TOTP secrets or FIDO2 credentials:
|
|
21
|
-
* passwords move by lazy migration (the `ping_identity` preset checks them with
|
|
22
|
-
* PingOne's password-check call), second factors are enrolled again.
|
|
23
|
-
*/
|
|
24
|
-
/** auth.pingone.<tld> / api.pingone.<tld> for a region code. */
|
|
25
|
-
function pingRegion(region) {
|
|
26
|
-
const r = (region ?? 'com').toLowerCase().replace(/^\./, '');
|
|
27
|
-
if (!/^(com|eu|asia|ca|com\.au|sg)$/.test(r))
|
|
28
|
-
throw new Error(`Unknown PingOne region "${region}" (use com, eu, asia, ca, com.au or sg).`);
|
|
29
|
-
return r;
|
|
30
|
-
}
|
|
31
|
-
/** A client-credentials access token for the worker application. */
|
|
32
|
-
async function pingOneToken(o) {
|
|
33
|
-
const f = o.fetchImpl ?? fetch;
|
|
34
|
-
const res = await f(`https://auth.pingone.${pingRegion(o.region)}/${o.environmentId}/as/token`, {
|
|
35
|
-
method: 'POST',
|
|
36
|
-
headers: {
|
|
37
|
-
'content-type': 'application/x-www-form-urlencoded',
|
|
38
|
-
authorization: `Basic ${Buffer.from(`${encodeURIComponent(o.clientId)}:${encodeURIComponent(o.clientSecret)}`).toString('base64')}`,
|
|
39
|
-
},
|
|
40
|
-
body: 'grant_type=client_credentials',
|
|
41
|
-
});
|
|
42
|
-
const body = (await res.json().catch(() => null));
|
|
43
|
-
const token = (0, record_set_1.str)(body?.access_token);
|
|
44
|
-
if (res.status !== 200 || !token)
|
|
45
|
-
throw new Error(`PingOne refused the worker application's credentials (${res.status}${(0, record_set_1.str)(body?.error_description) ? `: ${(0, record_set_1.str)(body?.error_description)}` : ''}).`);
|
|
46
|
-
return token;
|
|
47
|
-
}
|
|
48
|
-
function pingOneHttp(o, token) {
|
|
49
|
-
return new vendor_http_1.VendorHttp({
|
|
50
|
-
vendor: 'PingOne',
|
|
51
|
-
baseUrl: `https://api.pingone.${pingRegion(o.region)}/v1/environments/${o.environmentId}`,
|
|
52
|
-
headers: { authorization: `Bearer ${token}` },
|
|
53
|
-
fetchImpl: o.fetchImpl,
|
|
54
|
-
sleep: o.sleep,
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
|
-
/** Every item of a PingOne collection (`_embedded.<key>`, next page in `_links.next.href`). */
|
|
58
|
-
async function pingOneList(http, path, key) {
|
|
59
|
-
const out = [];
|
|
60
|
-
let next = path;
|
|
61
|
-
while (next) {
|
|
62
|
-
const res = await http.get(next);
|
|
63
|
-
const body = (0, record_set_1.isObj)(res.body) ? res.body : {};
|
|
64
|
-
out.push(...(0, record_set_1.objs)((0, record_set_1.isObj)(body._embedded) ? body._embedded[key] : undefined));
|
|
65
|
-
const href = (0, record_set_1.isObj)(body._links) && (0, record_set_1.isObj)(body._links.next) ? body._links.next.href : undefined;
|
|
66
|
-
next = typeof href === 'string' ? href : undefined;
|
|
67
|
-
}
|
|
68
|
-
return out;
|
|
69
|
-
}
|
|
70
|
-
async function listOrEmpty(http, path, key) {
|
|
71
|
-
try {
|
|
72
|
-
return await pingOneList(http, path, key);
|
|
73
|
-
}
|
|
74
|
-
catch (err) {
|
|
75
|
-
if (err instanceof vendor_http_1.VendorApiError && [403, 404].includes(err.status))
|
|
76
|
-
return [];
|
|
77
|
-
throw err;
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
/** A PingOne identity provider → an SSO connection (SAML / OIDC); other types are social logins. */
|
|
81
|
-
function ssoConnectionOf(idp) {
|
|
82
|
-
const type = (0, record_set_1.str)(idp.type);
|
|
83
|
-
const id = (0, record_set_1.str)(idp.id);
|
|
84
|
-
if (!id)
|
|
85
|
-
return null;
|
|
86
|
-
if (type === 'SAML') {
|
|
87
|
-
const certs = (0, record_set_1.isObj)(idp.idpVerification) ? (0, record_set_1.objs)(idp.idpVerification.certificates) : [];
|
|
88
|
-
return (0, record_set_1.compact)({
|
|
89
|
-
id,
|
|
90
|
-
name: (0, record_set_1.str)(idp.name),
|
|
91
|
-
protocol: 'saml',
|
|
92
|
-
enabled: idp.enabled !== false,
|
|
93
|
-
saml: (0, record_set_1.compact)({
|
|
94
|
-
idp_entity_id: (0, record_set_1.str)(idp.idpEntityId),
|
|
95
|
-
idp_sso_url: (0, record_set_1.str)(idp.ssoEndpoint),
|
|
96
|
-
sp_entity_id: (0, record_set_1.str)(idp.spEntityId),
|
|
97
|
-
// The signing certificate itself is not in the list answer: fetch the certificate id's key from PingOne or paste the IdP metadata.
|
|
98
|
-
idp_certificate: (0, record_set_1.str)(certs[0]?.certificate),
|
|
99
|
-
}),
|
|
100
|
-
});
|
|
101
|
-
}
|
|
102
|
-
if (type === 'OPENID_CONNECT') {
|
|
103
|
-
return (0, record_set_1.compact)({
|
|
104
|
-
id,
|
|
105
|
-
name: (0, record_set_1.str)(idp.name),
|
|
106
|
-
protocol: 'oidc',
|
|
107
|
-
enabled: idp.enabled !== false,
|
|
108
|
-
oidc: (0, record_set_1.compact)({
|
|
109
|
-
issuer: (0, record_set_1.str)(idp.issuer),
|
|
110
|
-
discovery_url: (0, record_set_1.str)(idp.discoveryEndpoint),
|
|
111
|
-
client_id: (0, record_set_1.str)(idp.clientId),
|
|
112
|
-
scopes: Array.isArray(idp.scopes) ? idp.scopes.map(String) : undefined,
|
|
113
|
-
}),
|
|
114
|
-
});
|
|
115
|
-
}
|
|
116
|
-
return null;
|
|
117
|
-
}
|
|
118
|
-
async function exportPingOne(o) {
|
|
119
|
-
const set = new record_set_1.RecordSet();
|
|
120
|
-
const say = o.onProgress ?? (() => undefined);
|
|
121
|
-
set.manifest = { origin: `PingOne environment ${o.environmentId}` };
|
|
122
|
-
const http = pingOneHttp(o, await pingOneToken(o));
|
|
123
|
-
say('identity providers');
|
|
124
|
-
const connections = new Set();
|
|
125
|
-
for (const idp of await listOrEmpty(http, '/identityProviders', 'identityProviders')) {
|
|
126
|
-
const sso = ssoConnectionOf(idp);
|
|
127
|
-
if (sso) {
|
|
128
|
-
set.add('sso_connection', sso, sso.id);
|
|
129
|
-
connections.add(sso.id);
|
|
130
|
-
}
|
|
131
|
-
else if ((0, record_set_1.str)(idp.type))
|
|
132
|
-
set.warn(`Social identity provider "${(0, record_set_1.str)(idp.name) ?? (0, record_set_1.str)(idp.type)}" (${(0, record_set_1.str)(idp.type)}) is configured in Atlas as an OAuth provider (atlas migrate ping-identity config), not imported as a connection.`);
|
|
133
|
-
}
|
|
134
|
-
say('groups');
|
|
135
|
-
const groups = await listOrEmpty(http, '/groups', 'groups');
|
|
136
|
-
const roleOf = new Map();
|
|
137
|
-
for (const g of groups) {
|
|
138
|
-
const id = (0, record_set_1.str)(g.id);
|
|
139
|
-
const name = (0, record_set_1.str)(g.name);
|
|
140
|
-
if (!id || !name)
|
|
141
|
-
continue;
|
|
142
|
-
const key = (0, translate_kit_1.keyOf)(name);
|
|
143
|
-
roleOf.set(id, key);
|
|
144
|
-
set.add('role', { key, name, scope: 'app', description: (0, record_set_1.str)(g.description) }, key);
|
|
145
|
-
}
|
|
146
|
-
say('users');
|
|
147
|
-
const users = await pingOneList(http, '/users?limit=100', 'users');
|
|
148
|
-
let i = 0;
|
|
149
|
-
for (const u of users) {
|
|
150
|
-
const id = (0, record_set_1.str)(u.id);
|
|
151
|
-
if (!id)
|
|
152
|
-
continue;
|
|
153
|
-
if (++i % 500 === 0)
|
|
154
|
-
say(` ${i} of ${users.length} users`);
|
|
155
|
-
const name = (0, record_set_1.isObj)(u.name) ? u.name : {};
|
|
156
|
-
const email = (0, record_set_1.str)(u.email)?.toLowerCase();
|
|
157
|
-
const emails = email ? [{ email, verified: u.emailVerified === true || (0, record_set_1.str)(u.verifyStatus) === 'VERIFIED', primary: true }] : [];
|
|
158
|
-
const phones = [];
|
|
159
|
-
for (const raw of [u.mobilePhone, u.primaryPhone]) {
|
|
160
|
-
const p = (0, record_set_1.e164)(raw);
|
|
161
|
-
if (p && !phones.some((x) => x.phone === p))
|
|
162
|
-
phones.push({ phone: p, verified: false, primary: phones.length === 0 });
|
|
163
|
-
}
|
|
164
|
-
const account = (0, record_set_1.isObj)(u.account) ? u.account : {};
|
|
165
|
-
const lifecycle = (0, record_set_1.isObj)(u.lifecycle) ? u.lifecycle : {};
|
|
166
|
-
const record = (0, record_set_1.compact)({
|
|
167
|
-
id,
|
|
168
|
-
emails,
|
|
169
|
-
phones,
|
|
170
|
-
username: (0, record_set_1.str)(u.username),
|
|
171
|
-
first_name: (0, record_set_1.str)(name.given),
|
|
172
|
-
last_name: (0, record_set_1.str)(name.family),
|
|
173
|
-
name: (0, record_set_1.str)(name.formatted),
|
|
174
|
-
created_at: (0, record_set_1.str)(u.createdAt),
|
|
175
|
-
last_sign_in_at: (0, record_set_1.isObj)(u.lastSignOn) ? (0, record_set_1.str)(u.lastSignOn.at) : undefined,
|
|
176
|
-
private_metadata: { pingone: (0, record_set_1.compact)({ population: (0, record_set_1.isObj)(u.population) ? (0, record_set_1.str)(u.population.id) : undefined, type: (0, record_set_1.str)(u.type), mfa_enabled: u.mfaEnabled === true ? true : undefined }) },
|
|
177
|
-
});
|
|
178
|
-
if (u.enabled === false) {
|
|
179
|
-
record.banned = true;
|
|
180
|
-
record.ban_reason = 'Disabled in PingOne';
|
|
181
|
-
}
|
|
182
|
-
else if ((0, record_set_1.str)(account.status) === 'LOCKED')
|
|
183
|
-
record.locked = true;
|
|
184
|
-
if (['ACCOUNT_DISABLED', 'DISABLED'].includes((0, record_set_1.str)(lifecycle.status) ?? ''))
|
|
185
|
-
record.banned = true;
|
|
186
|
-
if (!record.emails?.length && !record.phones?.length && !record.username) {
|
|
187
|
-
set.omit('user', 'no email, phone or username', 1);
|
|
188
|
-
continue;
|
|
189
|
-
}
|
|
190
|
-
if (o.groups !== false && roleOf.size) {
|
|
191
|
-
const memberOf = await listOrEmpty(http, `/users/${encodeURIComponent(id)}/memberOfGroups`, 'groups');
|
|
192
|
-
const roles = memberOf.map((g) => roleOf.get((0, record_set_1.str)(g.id) ?? '')).filter((r) => !!r);
|
|
193
|
-
if (roles.length)
|
|
194
|
-
record.roles = roles;
|
|
195
|
-
}
|
|
196
|
-
set.add('user', record, id);
|
|
197
|
-
// A user who signs in through an external IdP keeps that link.
|
|
198
|
-
const ext = (0, record_set_1.isObj)(u.identityProvider) ? u.identityProvider : undefined;
|
|
199
|
-
const extType = (0, record_set_1.str)(ext?.type);
|
|
200
|
-
if (ext && extType && extType !== 'PING_ONE') {
|
|
201
|
-
const link = (0, record_set_1.compact)({
|
|
202
|
-
user_id: id,
|
|
203
|
-
provider: extType.toLowerCase(),
|
|
204
|
-
provider_user_id: (0, record_set_1.str)(ext.id) ?? id,
|
|
205
|
-
kind: connections.has((0, record_set_1.str)(ext.id) ?? '') ? 'enterprise' : 'oauth',
|
|
206
|
-
sso_connection_id: connections.has((0, record_set_1.str)(ext.id) ?? '') ? (0, record_set_1.str)(ext.id) : undefined,
|
|
207
|
-
email,
|
|
208
|
-
profile: (0, record_set_1.bag)({ external_id: (0, record_set_1.str)(u.externalId) }),
|
|
209
|
-
});
|
|
210
|
-
set.add('identity', link);
|
|
211
|
-
}
|
|
212
|
-
}
|
|
213
|
-
set.omit('password', 'PingOne never exports password hashes', users.length);
|
|
214
|
-
set.omit('mfa_factor', 'PingOne never exports TOTP secrets or FIDO2 credentials', 0);
|
|
215
|
-
set.warn('Passwords move by lazy migration (preset ping_identity); users enrol their second factor again.');
|
|
216
|
-
return set;
|
|
217
|
-
}
|
|
218
|
-
//# sourceMappingURL=pingone.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pingone.js","sourceRoot":"","sources":["../../../src/migrate/export/pingone.ts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I,EAAE,WAAW,CAAC,GAAG,CAAC,IAAA,gBAAG,EAAC,GAAG,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,OAAO;gBACjE,iBAAiB,EAAE,WAAW,CAAC,GAAG,CAAC,IAAA,gBAAG,EAAC,GAAG,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,IAAA,gBAAG,EAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS;gBAC/E,KAAK;gBACL,OAAO,EAAE,IAAA,gBAAG,EAAC,EAAE,WAAW,EAAE,IAAA,gBAAG,EAAC,CAAC,CAAC,UAAU,CAAC,EAAE,CAAC;aAC/B,CAAC,CAAC;YACrB,GAAG,CAAC,GAAG,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;QAC5B,CAAC;IACH,CAAC;IAED,GAAG,CAAC,IAAI,CAAC,UAAU,EAAE,uCAAuC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC5E,GAAG,CAAC,IAAI,CAAC,YAAY,EAAE,yDAAyD,EAAE,CAAC,CAAC,CAAC;IACrF,GAAG,CAAC,IAAI,CAAC,iGAAiG,CAAC,CAAC;IAC5G,OAAO,GAAG,CAAC;AACb,CAAC"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import type { MigrationBundleWriter } from '@atlasauth/migrate';
|
|
2
|
-
import type { CredentialSpec, ExportCursor, PluginContext } from '../framework/plugin';
|
|
3
|
-
import type { RecordSet } from './record-set';
|
|
4
|
-
/**
|
|
5
|
-
* Write a vendor export through the sealed-bundle writer: the manifest fields
|
|
6
|
-
* and warnings the exporter learned, what it had to leave out, then every
|
|
7
|
-
* record in canonical order. On `--resume` the vendor is read again and the
|
|
8
|
-
* records an earlier segment already holds are skipped (vendor listings are
|
|
9
|
-
* returned in a stable order).
|
|
10
|
-
*/
|
|
11
|
-
export declare function writeRecordSet(set: RecordSet, writer: MigrationBundleWriter, resume: {
|
|
12
|
-
cursor: ExportCursor | null;
|
|
13
|
-
checkpoint(cursor: ExportCursor): void;
|
|
14
|
-
}, say: (line: string) => void): Promise<void>;
|
|
15
|
-
/** A credential, or a CliError naming every way to pass it. */
|
|
16
|
-
export declare function need(p: PluginContext, spec: CredentialSpec): string;
|
|
17
|
-
/** A boolean flag (`--factors`). */
|
|
18
|
-
export declare function flag(p: PluginContext, name: string): boolean;
|
|
19
|
-
/** A local file named by a credential spec (flag or env var), as text or bytes; undefined when not given. */
|
|
20
|
-
export declare function localFile(p: PluginContext, spec: CredentialSpec, as: 'text'): string | undefined;
|
|
21
|
-
export declare function localFile(p: PluginContext, spec: CredentialSpec, as: 'bytes'): Buffer | undefined;
|
|
22
|
-
/** A vendor host (`acme.us.auth0.com`) from a host or URL. */
|
|
23
|
-
export declare function hostOf(raw: string): string;
|
|
24
|
-
/** Vendor errors become CLI errors with the vendor's own words (never a stack). */
|
|
25
|
-
export declare function vendorStep<T>(label: string, fn: () => Promise<T>): Promise<T>;
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.writeRecordSet = writeRecordSet;
|
|
4
|
-
exports.need = need;
|
|
5
|
-
exports.flag = flag;
|
|
6
|
-
exports.localFile = localFile;
|
|
7
|
-
exports.hostOf = hostOf;
|
|
8
|
-
exports.vendorStep = vendorStep;
|
|
9
|
-
const node_fs_1 = require("node:fs");
|
|
10
|
-
const node_path_1 = require("node:path");
|
|
11
|
-
const errors_1 = require("../../errors");
|
|
12
|
-
/**
|
|
13
|
-
* What every vendor plugin shares: replaying an exporter's {@link RecordSet}
|
|
14
|
-
* through the framework's bundle writer, and reading the owner's local files
|
|
15
|
-
* and flags.
|
|
16
|
-
*/
|
|
17
|
-
/** Records between two export checkpoints. */
|
|
18
|
-
const CHECKPOINT_EVERY = 1000;
|
|
19
|
-
/**
|
|
20
|
-
* Write a vendor export through the sealed-bundle writer: the manifest fields
|
|
21
|
-
* and warnings the exporter learned, what it had to leave out, then every
|
|
22
|
-
* record in canonical order. On `--resume` the vendor is read again and the
|
|
23
|
-
* records an earlier segment already holds are skipped (vendor listings are
|
|
24
|
-
* returned in a stable order).
|
|
25
|
-
*/
|
|
26
|
-
async function writeRecordSet(set, writer, resume, say) {
|
|
27
|
-
const start = typeof resume.cursor === 'number' ? resume.cursor : 0;
|
|
28
|
-
writer.describe(set.manifest);
|
|
29
|
-
for (const w of set.warnings)
|
|
30
|
-
writer.warn(w);
|
|
31
|
-
if (!start)
|
|
32
|
-
for (const [model, o] of Object.entries(set.omitted))
|
|
33
|
-
writer.omit(model, o.reason, o.count);
|
|
34
|
-
if (start)
|
|
35
|
-
say(` resuming after record ${start}`);
|
|
36
|
-
let i = 0;
|
|
37
|
-
for (const r of set.ordered()) {
|
|
38
|
-
i++;
|
|
39
|
-
if (i <= start)
|
|
40
|
-
continue;
|
|
41
|
-
const issues = await writer.add(r.model, r.data);
|
|
42
|
-
if (issues.length)
|
|
43
|
-
say(` left out ${r.model} #${i}: ${issues[0].message}`);
|
|
44
|
-
if (i % CHECKPOINT_EVERY === 0)
|
|
45
|
-
resume.checkpoint(i);
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
/** A credential, or a CliError naming every way to pass it. */
|
|
49
|
-
function need(p, spec) {
|
|
50
|
-
return p.credential({ ...spec, required: true });
|
|
51
|
-
}
|
|
52
|
-
/** A boolean flag (`--factors`). */
|
|
53
|
-
function flag(p, name) {
|
|
54
|
-
return p.args.values[name] === true;
|
|
55
|
-
}
|
|
56
|
-
function localFile(p, spec, as) {
|
|
57
|
-
const path = p.credential({ ...spec, required: false });
|
|
58
|
-
if (!path)
|
|
59
|
-
return undefined;
|
|
60
|
-
try {
|
|
61
|
-
return as === 'text' ? p.ctx.readFile((0, node_path_1.resolve)(path)) : (0, node_fs_1.readFileSync)((0, node_path_1.resolve)(path));
|
|
62
|
-
}
|
|
63
|
-
catch (err) {
|
|
64
|
-
throw new errors_1.CliError(`Could not read ${spec.label} at ${path}: ${err.message}`);
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
/** A vendor host (`acme.us.auth0.com`) from a host or URL. */
|
|
68
|
-
function hostOf(raw) {
|
|
69
|
-
return raw.trim().replace(/^https?:\/\//, '').replace(/[/?#].*$/, '');
|
|
70
|
-
}
|
|
71
|
-
/** Vendor errors become CLI errors with the vendor's own words (never a stack). */
|
|
72
|
-
async function vendorStep(label, fn) {
|
|
73
|
-
try {
|
|
74
|
-
return await fn();
|
|
75
|
-
}
|
|
76
|
-
catch (err) {
|
|
77
|
-
if (err instanceof errors_1.CliError)
|
|
78
|
-
throw err;
|
|
79
|
-
throw new errors_1.CliError(`${label}: ${err.message}`);
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
//# sourceMappingURL=plugin-kit.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-kit.js","sourceRoot":"","sources":["../../../src/migrate/export/plugin-kit.ts"],"names":[],"mappings":";;AAuBA,wCAmBC;AAGD,oBAEC;AAGD,oBAEC;AAKD,8BAQC;AAGD,wBAEC;AAGD,gCAOC;AAhFD,qCAAuC;AACvC,yCAAoC;AAEpC,yCAAwC;AAIxC;;;;GAIG;AAEH,8CAA8C;AAC9C,MAAM,gBAAgB,GAAG,IAAI,CAAC;AAE9B;;;;;;GAMG;AACI,KAAK,UAAU,cAAc,CAClC,GAAc,EACd,MAA6B,EAC7B,MAA+E,EAC/E,GAA2B;IAE3B,MAAM,KAAK,GAAG,OAAO,MAAM,CAAC,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;IACpE,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IAC9B,KAAK,MAAM,CAAC,IAAI,GAAG,CAAC,QAAQ;QAAE,MAAM,CAAC,IAAI,CA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IACpF,MAAM,IAAI,GAAG,CAAC,CAAC,UAAU,CAAC,EAAE,GAAG,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC,CAAC;IACxD,IAAI,CAAC,IAAI;QAAE,OAAO,SAAS,CAAC;IAC5B,IAAI,CAAC;QACH,OAAO,EAAE,KAAK,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAA,mBAAO,EAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,IAAA,sBAAY,EAAC,IAAA,mBAAO,EAAC,IAAI,CAAC,CAAC,CAAC;IACrF,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,MAAM,IAAI,iBAAQ,CAAC,kBAAkB,IAAI,CAAC,KAAK,OAAO,IAAI,KAAM,GAAa,CAAC,OAAO,EAAE,CAAC,CAAC;IAC3F,CAAC;AACH,CAAC;AAED,8DAA8D;AAC9D,SAAgB,MAAM,CAAC,GAAW;IAChC,OAAO,GAAG,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,cAAc,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;AACxE,CAAC;AAED,mFAAmF;AAC5E,KAAK,UAAU,UAAU,CAAI,KAAa,EAAE,EAAoB;IACrE,IAAI,CAAC;QACH,OAAO,MAAM,EAAE,EAAE,CAAC;IACpB,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,IAAI,GAAG,YAAY,iBAAQ;YAAE,MAAM,GAAG,CAAC;QACvC,MAAM,IAAI,iBAAQ,CAAC,GAAG,KAAK,KAAM,GAAa,CAAC,OAAO,EAAE,CAAC,CAAC;IAC5D,CAAC;AACH,CAAC"}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import type { TranslationResult } from '../framework/plugin';
|
|
2
|
-
import { type Obj } from './record-set';
|
|
3
|
-
/**
|
|
4
|
-
* `atlas migrate pocketbase config` — a PocketBase app's auth-collection
|
|
5
|
-
* options → Atlas config.
|
|
6
|
-
*
|
|
7
|
-
* Read from `_collections` (the data.db or its dump — the same source the
|
|
8
|
-
* export reads) or from a collections export file (Settings → Export
|
|
9
|
-
* collections, `pb_schema.json`), with file:line for the file. v0.23+
|
|
10
|
-
* options (`passwordAuth`, `oauth2`, `mfa`, `otp`, `authToken`, `authRule`,
|
|
11
|
-
* flattened onto the collection in an export file, under `options` in the
|
|
12
|
-
* database) and ≤0.22 options (`allowEmailAuth`, `minPasswordLength`,
|
|
13
|
-
* `onlyVerified` …) are both understood. Token secrets and OAuth client
|
|
14
|
-
* secrets are never copied.
|
|
15
|
-
*/
|
|
16
|
-
export interface PocketBaseConfigSnapshot {
|
|
17
|
-
/** `_collections` rows, or the collections array of an export file. */
|
|
18
|
-
collections: Obj[];
|
|
19
|
-
/** The export file, for file:line in the report. */
|
|
20
|
-
file?: {
|
|
21
|
-
path: string;
|
|
22
|
-
text: string;
|
|
23
|
-
};
|
|
24
|
-
/** The public PocketBase URL (bridge and lazy-migration presets). */
|
|
25
|
-
url?: string;
|
|
26
|
-
}
|
|
27
|
-
export declare function parsePocketBaseSchema(text: string): Obj[];
|
|
28
|
-
export declare function translatePocketBaseConfig(snap: PocketBaseConfigSnapshot): TranslationResult;
|