@atlasauth/cli 0.11.0 → 0.13.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 +15 -0
- package/dist/args.d.ts +121 -0
- package/dist/args.js +45 -0
- package/dist/args.js.map +1 -1
- package/dist/commands/config.js +71 -6
- package/dist/commands/config.js.map +1 -1
- package/dist/commands/dev.d.ts +8 -0
- package/dist/commands/dev.js +84 -0
- package/dist/commands/dev.js.map +1 -0
- package/dist/commands/init.js +13 -8
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/migrate.d.ts +6 -2
- package/dist/commands/migrate.js +13 -3
- package/dist/commands/migrate.js.map +1 -1
- package/dist/commands/pages.d.ts +14 -0
- package/dist/commands/pages.js +113 -0
- package/dist/commands/pages.js.map +1 -0
- package/dist/context.d.ts +1 -1
- package/dist/help.d.ts +1 -1
- package/dist/help.js +96 -2
- package/dist/help.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/migrate/appwrite/plugin.d.ts +2 -0
- package/dist/migrate/appwrite/plugin.js +103 -0
- package/dist/migrate/appwrite/plugin.js.map +1 -0
- package/dist/migrate/auth0/plugin.d.ts +2 -0
- package/dist/migrate/auth0/plugin.js +126 -0
- package/dist/migrate/auth0/plugin.js.map +1 -0
- package/dist/migrate/authentik/plugin.d.ts +2 -0
- package/dist/migrate/authentik/plugin.js +135 -0
- package/dist/migrate/authentik/plugin.js.map +1 -0
- package/dist/migrate/azure-ad-b2c/plugin.d.ts +8 -0
- package/dist/migrate/azure-ad-b2c/plugin.js +165 -0
- package/dist/migrate/azure-ad-b2c/plugin.js.map +1 -0
- package/dist/migrate/clerk/plugin.d.ts +2 -0
- package/dist/migrate/clerk/plugin.js +76 -0
- package/dist/migrate/clerk/plugin.js.map +1 -0
- package/dist/migrate/cognito/plugin.d.ts +5 -0
- package/dist/migrate/cognito/plugin.js +170 -0
- package/dist/migrate/cognito/plugin.js.map +1 -0
- package/dist/migrate/corbado/plugin.d.ts +2 -0
- package/dist/migrate/corbado/plugin.js +63 -0
- package/dist/migrate/corbado/plugin.js.map +1 -0
- package/dist/migrate/descope/plugin.d.ts +2 -0
- package/dist/migrate/descope/plugin.js +83 -0
- package/dist/migrate/descope/plugin.js.map +1 -0
- package/dist/migrate/entra-external-id/plugin.d.ts +8 -0
- package/dist/migrate/entra-external-id/plugin.js +12 -0
- package/dist/migrate/entra-external-id/plugin.js.map +1 -0
- package/dist/migrate/export/appwrite-config.d.ts +28 -0
- package/dist/migrate/export/appwrite-config.js +170 -0
- package/dist/migrate/export/appwrite-config.js.map +1 -0
- package/dist/migrate/export/appwrite.d.ts +51 -0
- package/dist/migrate/export/appwrite.js +288 -0
- package/dist/migrate/export/appwrite.js.map +1 -0
- package/dist/migrate/export/auth0-config.d.ts +29 -0
- package/dist/migrate/export/auth0-config.js +249 -0
- package/dist/migrate/export/auth0-config.js.map +1 -0
- package/dist/migrate/export/auth0.d.ts +62 -0
- package/dist/migrate/export/auth0.js +575 -0
- package/dist/migrate/export/auth0.js.map +1 -0
- package/dist/migrate/export/authentik-config.d.ts +45 -0
- package/dist/migrate/export/authentik-config.js +357 -0
- package/dist/migrate/export/authentik-config.js.map +1 -0
- package/dist/migrate/export/authentik.d.ts +110 -0
- package/dist/migrate/export/authentik.js +838 -0
- package/dist/migrate/export/authentik.js.map +1 -0
- package/dist/migrate/export/azure-config.d.ts +58 -0
- package/dist/migrate/export/azure-config.js +344 -0
- package/dist/migrate/export/azure-config.js.map +1 -0
- package/dist/migrate/export/azure.d.ts +85 -0
- package/dist/migrate/export/azure.js +373 -0
- package/dist/migrate/export/azure.js.map +1 -0
- package/dist/migrate/export/clerk-config.d.ts +26 -0
- package/dist/migrate/export/clerk-config.js +227 -0
- package/dist/migrate/export/clerk-config.js.map +1 -0
- package/dist/migrate/export/clerk.d.ts +46 -0
- package/dist/migrate/export/clerk.js +486 -0
- package/dist/migrate/export/clerk.js.map +1 -0
- package/dist/migrate/export/cognito-config.d.ts +25 -0
- package/dist/migrate/export/cognito-config.js +273 -0
- package/dist/migrate/export/cognito-config.js.map +1 -0
- package/dist/migrate/export/cognito.d.ts +103 -0
- package/dist/migrate/export/cognito.js +441 -0
- package/dist/migrate/export/cognito.js.map +1 -0
- package/dist/migrate/export/corbado-config.d.ts +20 -0
- package/dist/migrate/export/corbado-config.js +63 -0
- package/dist/migrate/export/corbado-config.js.map +1 -0
- package/dist/migrate/export/corbado.d.ts +37 -0
- package/dist/migrate/export/corbado.js +132 -0
- package/dist/migrate/export/corbado.js.map +1 -0
- package/dist/migrate/export/descope.d.ts +35 -0
- package/dist/migrate/export/descope.js +208 -0
- package/dist/migrate/export/descope.js.map +1 -0
- package/dist/migrate/export/fake-vendor.test-helper.d.ts +27 -0
- package/dist/migrate/export/fake-vendor.test-helper.js +41 -0
- package/dist/migrate/export/fake-vendor.test-helper.js.map +1 -0
- package/dist/migrate/export/firebase-config.d.ts +24 -0
- package/dist/migrate/export/firebase-config.js +215 -0
- package/dist/migrate/export/firebase-config.js.map +1 -0
- package/dist/migrate/export/firebase.d.ts +102 -0
- package/dist/migrate/export/firebase.js +464 -0
- package/dist/migrate/export/firebase.js.map +1 -0
- package/dist/migrate/export/frameworks/app-users.d.ts +42 -0
- package/dist/migrate/export/frameworks/app-users.js +161 -0
- package/dist/migrate/export/frameworks/app-users.js.map +1 -0
- package/dist/migrate/export/frameworks/authjs.d.ts +41 -0
- package/dist/migrate/export/frameworks/authjs.js +146 -0
- package/dist/migrate/export/frameworks/authjs.js.map +1 -0
- package/dist/migrate/export/frameworks/devise.d.ts +39 -0
- package/dist/migrate/export/frameworks/devise.js +218 -0
- package/dist/migrate/export/frameworks/devise.js.map +1 -0
- package/dist/migrate/export/frameworks/django.d.ts +45 -0
- package/dist/migrate/export/frameworks/django.js +315 -0
- package/dist/migrate/export/frameworks/django.js.map +1 -0
- package/dist/migrate/export/frameworks/lucia.d.ts +42 -0
- package/dist/migrate/export/frameworks/lucia.js +263 -0
- package/dist/migrate/export/frameworks/lucia.js.map +1 -0
- package/dist/migrate/export/frameworks/tables.d.ts +90 -0
- package/dist/migrate/export/frameworks/tables.js +325 -0
- package/dist/migrate/export/frameworks/tables.js.map +1 -0
- package/dist/migrate/export/frameworks/webauthn.d.ts +25 -0
- package/dist/migrate/export/frameworks/webauthn.js +130 -0
- package/dist/migrate/export/frameworks/webauthn.js.map +1 -0
- package/dist/migrate/export/frontegg-config.d.ts +29 -0
- package/dist/migrate/export/frontegg-config.js +238 -0
- package/dist/migrate/export/frontegg-config.js.map +1 -0
- package/dist/migrate/export/frontegg.d.ts +67 -0
- package/dist/migrate/export/frontegg.js +410 -0
- package/dist/migrate/export/frontegg.js.map +1 -0
- package/dist/migrate/export/fusionauth-config.d.ts +26 -0
- package/dist/migrate/export/fusionauth-config.js +226 -0
- package/dist/migrate/export/fusionauth-config.js.map +1 -0
- package/dist/migrate/export/fusionauth.d.ts +99 -0
- package/dist/migrate/export/fusionauth.js +642 -0
- package/dist/migrate/export/fusionauth.js.map +1 -0
- package/dist/migrate/export/hanko-config.d.ts +27 -0
- package/dist/migrate/export/hanko-config.js +265 -0
- package/dist/migrate/export/hanko-config.js.map +1 -0
- package/dist/migrate/export/hanko.d.ts +52 -0
- package/dist/migrate/export/hanko.js +605 -0
- package/dist/migrate/export/hanko.js.map +1 -0
- package/dist/migrate/export/keycloak-config.d.ts +19 -0
- package/dist/migrate/export/keycloak-config.js +219 -0
- package/dist/migrate/export/keycloak-config.js.map +1 -0
- package/dist/migrate/export/keycloak.d.ts +155 -0
- package/dist/migrate/export/keycloak.js +878 -0
- package/dist/migrate/export/keycloak.js.map +1 -0
- package/dist/migrate/export/kinde-descope-config.d.ts +38 -0
- package/dist/migrate/export/kinde-descope-config.js +172 -0
- package/dist/migrate/export/kinde-descope-config.js.map +1 -0
- package/dist/migrate/export/kinde.d.ts +57 -0
- package/dist/migrate/export/kinde.js +333 -0
- package/dist/migrate/export/kinde.js.map +1 -0
- package/dist/migrate/export/ldap.d.ts +53 -0
- package/dist/migrate/export/ldap.js +277 -0
- package/dist/migrate/export/ldap.js.map +1 -0
- package/dist/migrate/export/logto-config.d.ts +27 -0
- package/dist/migrate/export/logto-config.js +264 -0
- package/dist/migrate/export/logto-config.js.map +1 -0
- package/dist/migrate/export/logto.d.ts +150 -0
- package/dist/migrate/export/logto.js +809 -0
- package/dist/migrate/export/logto.js.map +1 -0
- package/dist/migrate/export/magic-config.d.ts +14 -0
- package/dist/migrate/export/magic-config.js +28 -0
- package/dist/migrate/export/magic-config.js.map +1 -0
- package/dist/migrate/export/magic.d.ts +31 -0
- package/dist/migrate/export/magic.js +93 -0
- package/dist/migrate/export/magic.js.map +1 -0
- package/dist/migrate/export/mini-yaml.d.ts +19 -0
- package/dist/migrate/export/mini-yaml.js +581 -0
- package/dist/migrate/export/mini-yaml.js.map +1 -0
- package/dist/migrate/export/nhost-config.d.ts +26 -0
- package/dist/migrate/export/nhost-config.js +360 -0
- package/dist/migrate/export/nhost-config.js.map +1 -0
- package/dist/migrate/export/nhost.d.ts +64 -0
- package/dist/migrate/export/nhost.js +304 -0
- package/dist/migrate/export/nhost.js.map +1 -0
- package/dist/migrate/export/okta-config.d.ts +30 -0
- package/dist/migrate/export/okta-config.js +205 -0
- package/dist/migrate/export/okta-config.js.map +1 -0
- package/dist/migrate/export/okta.d.ts +43 -0
- package/dist/migrate/export/okta.js +337 -0
- package/dist/migrate/export/okta.js.map +1 -0
- package/dist/migrate/export/onelogin.d.ts +22 -0
- package/dist/migrate/export/onelogin.js +123 -0
- package/dist/migrate/export/onelogin.js.map +1 -0
- package/dist/migrate/export/ory-config.d.ts +58 -0
- package/dist/migrate/export/ory-config.js +451 -0
- package/dist/migrate/export/ory-config.js.map +1 -0
- package/dist/migrate/export/ory.d.ts +81 -0
- package/dist/migrate/export/ory.js +555 -0
- package/dist/migrate/export/ory.js.map +1 -0
- package/dist/migrate/export/password-detect.d.ts +29 -0
- package/dist/migrate/export/password-detect.js +81 -0
- package/dist/migrate/export/password-detect.js.map +1 -0
- package/dist/migrate/export/pingone.d.ts +36 -0
- package/dist/migrate/export/pingone.js +218 -0
- package/dist/migrate/export/pingone.js.map +1 -0
- package/dist/migrate/export/plugin-kit.d.ts +25 -0
- package/dist/migrate/export/plugin-kit.js +82 -0
- package/dist/migrate/export/plugin-kit.js.map +1 -0
- package/dist/migrate/export/pocketbase-config.d.ts +28 -0
- package/dist/migrate/export/pocketbase-config.js +180 -0
- package/dist/migrate/export/pocketbase-config.js.map +1 -0
- package/dist/migrate/export/pocketbase.d.ts +52 -0
- package/dist/migrate/export/pocketbase.js +243 -0
- package/dist/migrate/export/pocketbase.js.map +1 -0
- package/dist/migrate/export/project-files.d.ts +15 -0
- package/dist/migrate/export/project-files.js +43 -0
- package/dist/migrate/export/project-files.js.map +1 -0
- package/dist/migrate/export/propelauth-config.d.ts +18 -0
- package/dist/migrate/export/propelauth-config.js +58 -0
- package/dist/migrate/export/propelauth-config.js.map +1 -0
- package/dist/migrate/export/propelauth-harness.test-helper.d.ts +62 -0
- package/dist/migrate/export/propelauth-harness.test-helper.js +109 -0
- package/dist/migrate/export/propelauth-harness.test-helper.js.map +1 -0
- package/dist/migrate/export/propelauth.d.ts +48 -0
- package/dist/migrate/export/propelauth.js +255 -0
- package/dist/migrate/export/propelauth.js.map +1 -0
- package/dist/migrate/export/record-set.d.ts +44 -0
- package/dist/migrate/export/record-set.js +98 -0
- package/dist/migrate/export/record-set.js.map +1 -0
- package/dist/migrate/export/source-lines.d.ts +17 -0
- package/dist/migrate/export/source-lines.js +43 -0
- package/dist/migrate/export/source-lines.js.map +1 -0
- package/dist/migrate/export/sso-metadata.d.ts +47 -0
- package/dist/migrate/export/sso-metadata.js +180 -0
- package/dist/migrate/export/sso-metadata.js.map +1 -0
- package/dist/migrate/export/stytch-config.d.ts +22 -0
- package/dist/migrate/export/stytch-config.js +102 -0
- package/dist/migrate/export/stytch-config.js.map +1 -0
- package/dist/migrate/export/stytch.d.ts +68 -0
- package/dist/migrate/export/stytch.js +510 -0
- package/dist/migrate/export/stytch.js.map +1 -0
- package/dist/migrate/export/supabase-config.d.ts +48 -0
- package/dist/migrate/export/supabase-config.js +408 -0
- package/dist/migrate/export/supabase-config.js.map +1 -0
- package/dist/migrate/export/supabase.d.ts +86 -0
- package/dist/migrate/export/supabase.js +524 -0
- package/dist/migrate/export/supabase.js.map +1 -0
- package/dist/migrate/export/supertokens-config.d.ts +20 -0
- package/dist/migrate/export/supertokens-config.js +150 -0
- package/dist/migrate/export/supertokens-config.js.map +1 -0
- package/dist/migrate/export/supertokens.d.ts +125 -0
- package/dist/migrate/export/supertokens.js +464 -0
- package/dist/migrate/export/supertokens.js.map +1 -0
- package/dist/migrate/export/table.d.ts +35 -0
- package/dist/migrate/export/table.js +248 -0
- package/dist/migrate/export/table.js.map +1 -0
- package/dist/migrate/export/translate-kit.d.ts +46 -0
- package/dist/migrate/export/translate-kit.js +148 -0
- package/dist/migrate/export/translate-kit.js.map +1 -0
- package/dist/migrate/export/userfront-config.d.ts +15 -0
- package/dist/migrate/export/userfront-config.js +49 -0
- package/dist/migrate/export/userfront-config.js.map +1 -0
- package/dist/migrate/export/userfront.d.ts +38 -0
- package/dist/migrate/export/userfront.js +189 -0
- package/dist/migrate/export/userfront.js.map +1 -0
- package/dist/migrate/export/vendor-http.d.ts +46 -0
- package/dist/migrate/export/vendor-http.js +138 -0
- package/dist/migrate/export/vendor-http.js.map +1 -0
- package/dist/migrate/export/workos-config.d.ts +23 -0
- package/dist/migrate/export/workos-config.js +125 -0
- package/dist/migrate/export/workos-config.js.map +1 -0
- package/dist/migrate/export/workos.d.ts +46 -0
- package/dist/migrate/export/workos.js +272 -0
- package/dist/migrate/export/workos.js.map +1 -0
- package/dist/migrate/export/zip.d.ts +8 -0
- package/dist/migrate/export/zip.js +66 -0
- package/dist/migrate/export/zip.js.map +1 -0
- package/dist/migrate/export/zitadel-config.d.ts +37 -0
- package/dist/migrate/export/zitadel-config.js +279 -0
- package/dist/migrate/export/zitadel-config.js.map +1 -0
- package/dist/migrate/export/zitadel.d.ts +82 -0
- package/dist/migrate/export/zitadel.js +447 -0
- package/dist/migrate/export/zitadel.js.map +1 -0
- package/dist/migrate/firebase/plugin.d.ts +2 -0
- package/dist/migrate/firebase/plugin.js +152 -0
- package/dist/migrate/firebase/plugin.js.map +1 -0
- package/dist/migrate/framework/builtins.d.ts +2 -0
- package/dist/migrate/framework/builtins.js +52 -0
- package/dist/migrate/framework/builtins.js.map +1 -0
- package/dist/migrate/framework/commands.d.ts +20 -0
- package/dist/migrate/framework/commands.js +58 -0
- package/dist/migrate/framework/commands.js.map +1 -0
- package/dist/migrate/framework/custom.d.ts +12 -0
- package/dist/migrate/framework/custom.js +96 -0
- package/dist/migrate/framework/custom.js.map +1 -0
- package/dist/migrate/framework/orchestrator.d.ts +113 -0
- package/dist/migrate/framework/orchestrator.js +532 -0
- package/dist/migrate/framework/orchestrator.js.map +1 -0
- package/dist/migrate/framework/plugin.d.ts +167 -0
- package/dist/migrate/framework/plugin.js +3 -0
- package/dist/migrate/framework/plugin.js.map +1 -0
- package/dist/migrate/framework/registry.d.ts +11 -0
- package/dist/migrate/framework/registry.js +44 -0
- package/dist/migrate/framework/registry.js.map +1 -0
- package/dist/migrate/framework/report.d.ts +17 -0
- package/dist/migrate/framework/report.js +103 -0
- package/dist/migrate/framework/report.js.map +1 -0
- package/dist/migrate/frameworks/plugins.d.ts +29 -0
- package/dist/migrate/frameworks/plugins.js +402 -0
- package/dist/migrate/frameworks/plugins.js.map +1 -0
- package/dist/migrate/frameworks/report.d.ts +92 -0
- package/dist/migrate/frameworks/report.js +207 -0
- package/dist/migrate/frameworks/report.js.map +1 -0
- package/dist/migrate/frameworks/translate-js.d.ts +5 -0
- package/dist/migrate/frameworks/translate-js.js +503 -0
- package/dist/migrate/frameworks/translate-js.js.map +1 -0
- package/dist/migrate/frameworks/translate-rails-django.d.ts +3 -0
- package/dist/migrate/frameworks/translate-rails-django.js +1391 -0
- package/dist/migrate/frameworks/translate-rails-django.js.map +1 -0
- package/dist/migrate/frontegg/plugin.d.ts +2 -0
- package/dist/migrate/frontegg/plugin.js +78 -0
- package/dist/migrate/frontegg/plugin.js.map +1 -0
- package/dist/migrate/fusionauth/plugin.d.ts +2 -0
- package/dist/migrate/fusionauth/plugin.js +109 -0
- package/dist/migrate/fusionauth/plugin.js.map +1 -0
- package/dist/migrate/hanko/plugin.d.ts +2 -0
- package/dist/migrate/hanko/plugin.js +100 -0
- package/dist/migrate/hanko/plugin.js.map +1 -0
- package/dist/migrate/keycloak/plugin.d.ts +2 -0
- package/dist/migrate/keycloak/plugin.js +148 -0
- package/dist/migrate/keycloak/plugin.js.map +1 -0
- package/dist/migrate/kinde/plugin.d.ts +2 -0
- package/dist/migrate/kinde/plugin.js +105 -0
- package/dist/migrate/kinde/plugin.js.map +1 -0
- package/dist/migrate/ldap/plugin.d.ts +2 -0
- package/dist/migrate/ldap/plugin.js +73 -0
- package/dist/migrate/ldap/plugin.js.map +1 -0
- package/dist/migrate/logto/plugin.d.ts +2 -0
- package/dist/migrate/logto/plugin.js +131 -0
- package/dist/migrate/logto/plugin.js.map +1 -0
- package/dist/migrate/magic/plugin.d.ts +2 -0
- package/dist/migrate/magic/plugin.js +56 -0
- package/dist/migrate/magic/plugin.js.map +1 -0
- package/dist/migrate/nhost/plugin.d.ts +2 -0
- package/dist/migrate/nhost/plugin.js +115 -0
- package/dist/migrate/nhost/plugin.js.map +1 -0
- package/dist/migrate/oidc/plugin.d.ts +2 -0
- package/dist/migrate/oidc/plugin.js +73 -0
- package/dist/migrate/oidc/plugin.js.map +1 -0
- package/dist/migrate/okta/plugin.d.ts +2 -0
- package/dist/migrate/okta/plugin.js +105 -0
- package/dist/migrate/okta/plugin.js.map +1 -0
- package/dist/migrate/onelogin/plugin.d.ts +2 -0
- package/dist/migrate/onelogin/plugin.js +61 -0
- package/dist/migrate/onelogin/plugin.js.map +1 -0
- package/dist/migrate/ory/plugin.d.ts +2 -0
- package/dist/migrate/ory/plugin.js +186 -0
- package/dist/migrate/ory/plugin.js.map +1 -0
- package/dist/migrate/ping-identity/plugin.d.ts +2 -0
- package/dist/migrate/ping-identity/plugin.js +100 -0
- package/dist/migrate/ping-identity/plugin.js.map +1 -0
- package/dist/migrate/pocketbase/plugin.d.ts +2 -0
- package/dist/migrate/pocketbase/plugin.js +99 -0
- package/dist/migrate/pocketbase/plugin.js.map +1 -0
- package/dist/migrate/propelauth/plugin.d.ts +2 -0
- package/dist/migrate/propelauth/plugin.js +65 -0
- package/dist/migrate/propelauth/plugin.js.map +1 -0
- package/dist/migrate/saml/plugin.d.ts +2 -0
- package/dist/migrate/saml/plugin.js +79 -0
- package/dist/migrate/saml/plugin.js.map +1 -0
- package/dist/migrate/stytch/plugin.d.ts +2 -0
- package/dist/migrate/stytch/plugin.js +97 -0
- package/dist/migrate/stytch/plugin.js.map +1 -0
- package/dist/migrate/supabase/plugin.d.ts +2 -0
- package/dist/migrate/supabase/plugin.js +149 -0
- package/dist/migrate/supabase/plugin.js.map +1 -0
- package/dist/migrate/supertokens/plugin.d.ts +2 -0
- package/dist/migrate/supertokens/plugin.js +114 -0
- package/dist/migrate/supertokens/plugin.js.map +1 -0
- package/dist/migrate/user-table/plugin.d.ts +2 -0
- package/dist/migrate/user-table/plugin.js +62 -0
- package/dist/migrate/user-table/plugin.js.map +1 -0
- package/dist/migrate/userfront/plugin.d.ts +2 -0
- package/dist/migrate/userfront/plugin.js +60 -0
- package/dist/migrate/userfront/plugin.js.map +1 -0
- package/dist/migrate/workos/plugin.d.ts +2 -0
- package/dist/migrate/workos/plugin.js +81 -0
- package/dist/migrate/workos/plugin.js.map +1 -0
- package/dist/migrate/zitadel/plugin.d.ts +2 -0
- package/dist/migrate/zitadel/plugin.js +114 -0
- package/dist/migrate/zitadel/plugin.js.map +1 -0
- package/dist/run.js +4 -0
- package/dist/run.js.map +1 -1
- package/package.json +7 -5
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
import type { MigrationBundleWriter, MigrationSource } from '@atlasauth/migrate';
|
|
2
|
+
import type { ParsedArgs } from '../../args';
|
|
3
|
+
import type { RunContext } from '../../context';
|
|
4
|
+
import type { Json } from '../../serialize';
|
|
5
|
+
/**
|
|
6
|
+
* The TRANSLATOR PLUGIN interface behind `atlas migrate <vendor> [config|export|import|bridge]`.
|
|
7
|
+
*
|
|
8
|
+
* One plugin per vendor, registered in ./registry.ts. The framework owns the
|
|
9
|
+
* command surface, the resumable orchestrator (`atlas migrate <vendor>` with
|
|
10
|
+
* no subcommand runs every step with checkpoints), the upload/import of the
|
|
11
|
+
* bundle, the bridge settings call and the codemod hand-off; a plugin only
|
|
12
|
+
* supplies the vendor-specific parts:
|
|
13
|
+
*
|
|
14
|
+
* config read the vendor's configuration (its API with the owner's
|
|
15
|
+
* credentials, an export file, or the app's config source) and
|
|
16
|
+
* translate it into Atlas config-as-code plus a report in which
|
|
17
|
+
* every setting is `mapped` (1:1), `differs`, or `manual`, with where
|
|
18
|
+
* it came from (file:line or the vendor setting path).
|
|
19
|
+
* export read the vendor's users / orgs / … and write them through the
|
|
20
|
+
* {@link MigrationBundleWriter} the framework hands over (sealed to
|
|
21
|
+
* the instance's import key). Vendor credentials come from flags or
|
|
22
|
+
* env vars ON THIS MACHINE and are never sent to Atlas.
|
|
23
|
+
* bridge the zero-logout bridge preset and its variables (resolved from the
|
|
24
|
+
* translation or flags), applied with PUT /v1/migrations/{source}/bridge.
|
|
25
|
+
* lazy the lazy-migration preset for vendors whose hashes never leave
|
|
26
|
+
* (applied with PUT /v1/legacy_auth_connection).
|
|
27
|
+
* code the `atlas migrate code --from <vendor>` codemod id, when one exists.
|
|
28
|
+
*/
|
|
29
|
+
export type ReportStatus = 'mapped' | 'differs' | 'manual';
|
|
30
|
+
/** One line of the translation report. */
|
|
31
|
+
export interface TranslationReportEntry {
|
|
32
|
+
status: ReportStatus;
|
|
33
|
+
/** The vendor area (`connections`, `tenant settings`, `plugin:organization` …). */
|
|
34
|
+
area: string;
|
|
35
|
+
/** The vendor setting path (`session_lifetime`, `password_policy.min_length`). */
|
|
36
|
+
setting: string;
|
|
37
|
+
/** Where it lands in Atlas (`auth_config.session.idleMs`, `oauth_providers google`). */
|
|
38
|
+
atlas?: string;
|
|
39
|
+
note: string;
|
|
40
|
+
/** Source location for a config read from code (file and 1-based line); absent for an API/file read. */
|
|
41
|
+
file?: string;
|
|
42
|
+
line?: number;
|
|
43
|
+
}
|
|
44
|
+
/** Atlas config-as-code, as `atlas config import --dir` reads it. Keys are the document types. */
|
|
45
|
+
export type ConfigDocuments = Record<string, Json>;
|
|
46
|
+
export interface TranslationResult {
|
|
47
|
+
/** Where the config was read from, for the report header (`auth0 tenant acme.us.auth0.com`, `src/auth.ts`). */
|
|
48
|
+
origin: string;
|
|
49
|
+
documents: ConfigDocuments;
|
|
50
|
+
report: TranslationReportEntry[];
|
|
51
|
+
/** Env vars the documents' `${NAME}` placeholders need at import time. */
|
|
52
|
+
env: Array<{
|
|
53
|
+
name: string;
|
|
54
|
+
for: string;
|
|
55
|
+
}>;
|
|
56
|
+
/** Vendor ids → Atlas ids for the data import and the codemod (provider keys, role keys). */
|
|
57
|
+
mappings: {
|
|
58
|
+
providers: Record<string, string>;
|
|
59
|
+
roles: Record<string, string>;
|
|
60
|
+
};
|
|
61
|
+
/** What the bridge step needs, when the translation learned it (preset variables, cookie names). */
|
|
62
|
+
bridge?: {
|
|
63
|
+
preset: string;
|
|
64
|
+
vars: Record<string, string>;
|
|
65
|
+
};
|
|
66
|
+
/** What the lazy-migration step needs, when the translation learned it. */
|
|
67
|
+
lazy?: {
|
|
68
|
+
preset: string;
|
|
69
|
+
config: Record<string, string>;
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* A credential an exporter needs, read from `--set <flag>=<value>` or an env
|
|
74
|
+
* var — never sent to Atlas. (Vendor flags are `--set` pairs because the CLI's
|
|
75
|
+
* option schema is strict and shared by every command.)
|
|
76
|
+
*/
|
|
77
|
+
export interface CredentialSpec {
|
|
78
|
+
/** The `--set` name (`auth0-domain` → `--set auth0-domain=acme.us.auth0.com`). A leading `--` is ignored. */
|
|
79
|
+
flag: string;
|
|
80
|
+
/** The env var (`AUTH0_DOMAIN`). */
|
|
81
|
+
env: string;
|
|
82
|
+
label: string;
|
|
83
|
+
required: boolean;
|
|
84
|
+
secret?: boolean;
|
|
85
|
+
}
|
|
86
|
+
/** Everything a plugin step gets. */
|
|
87
|
+
export interface PluginContext {
|
|
88
|
+
ctx: RunContext;
|
|
89
|
+
args: ParsedArgs;
|
|
90
|
+
/** The project folder (`atlas migrate <vendor> <step> [path]`). */
|
|
91
|
+
project: string;
|
|
92
|
+
/** `--set` / env lookup for a credential spec (`--set` wins). Throws a CliError when a required one is missing. */
|
|
93
|
+
credential(spec: CredentialSpec): string | undefined;
|
|
94
|
+
/** HTTP for the VENDOR's API (injectable for tests — never real vendors in tests). */
|
|
95
|
+
fetch: typeof fetch;
|
|
96
|
+
/** Progress line (stderr in --json mode). */
|
|
97
|
+
say(line: string): void;
|
|
98
|
+
dryRun: boolean;
|
|
99
|
+
}
|
|
100
|
+
export interface ExportSummary {
|
|
101
|
+
counts: Record<string, number>;
|
|
102
|
+
omitted: Record<string, {
|
|
103
|
+
count: number;
|
|
104
|
+
reason: string;
|
|
105
|
+
}>;
|
|
106
|
+
warnings: string[];
|
|
107
|
+
}
|
|
108
|
+
/** An exporter's checkpoint, so `--resume` restarts a long export where it stopped (opaque to the framework). */
|
|
109
|
+
export type ExportCursor = Json;
|
|
110
|
+
export interface MigrationPlugin {
|
|
111
|
+
/** CLI spelling (`auth0`, `better-auth`). */
|
|
112
|
+
vendor: string;
|
|
113
|
+
source: MigrationSource;
|
|
114
|
+
label: string;
|
|
115
|
+
/** One-paragraph help for `atlas migrate <vendor> --help`. */
|
|
116
|
+
help: string;
|
|
117
|
+
config?: {
|
|
118
|
+
/** What `config` reads (`your Auth0 tenant via the Management API`, `your auth.ts`). */
|
|
119
|
+
reads: string;
|
|
120
|
+
credentials?: CredentialSpec[];
|
|
121
|
+
translate(p: PluginContext): Promise<TranslationResult>;
|
|
122
|
+
};
|
|
123
|
+
export?: {
|
|
124
|
+
reads: string;
|
|
125
|
+
credentials: CredentialSpec[];
|
|
126
|
+
/**
|
|
127
|
+
* Write every record through `writer` in canonical model order (the writer
|
|
128
|
+
* enforces it). `cursor` is the last checkpoint this export saved with
|
|
129
|
+
* `checkpoint` (resume), or null on a fresh run.
|
|
130
|
+
*/
|
|
131
|
+
run(p: PluginContext, writer: MigrationBundleWriter, resume: {
|
|
132
|
+
cursor: ExportCursor | null;
|
|
133
|
+
checkpoint(cursor: ExportCursor): void;
|
|
134
|
+
}): Promise<void>;
|
|
135
|
+
/** Input checks before the import key is fetched or a segment is opened (throw a CliError to stop). */
|
|
136
|
+
check?(p: PluginContext): void;
|
|
137
|
+
/** What cannot be exported and the fallback, shown before the export runs. */
|
|
138
|
+
limits?: string[];
|
|
139
|
+
};
|
|
140
|
+
bridge?: {
|
|
141
|
+
/** The default preset; a translation's `bridge.preset` (e.g. Auth.js JWT vs database sessions) wins over it. */
|
|
142
|
+
preset: string;
|
|
143
|
+
/** When the vendor has several presets (hosted / self-hosted, token / cookie): the one the flags pick; `preset` otherwise. */
|
|
144
|
+
presetFor?(p: PluginContext, translation?: TranslationResult): string;
|
|
145
|
+
/** Preset variables from flags / the translation; missing ones are asked for. */
|
|
146
|
+
vars(p: PluginContext, translation?: TranslationResult): Record<string, string>;
|
|
147
|
+
/**
|
|
148
|
+
* The HS256 shared secret for presets whose tokens are signed on the
|
|
149
|
+
* owner's server (a bridge assertion from an extractor), or undefined.
|
|
150
|
+
* Sent once as `shared_secret` (write-only on the Atlas side).
|
|
151
|
+
*/
|
|
152
|
+
sharedSecret?(p: PluginContext, preset: string): string | undefined;
|
|
153
|
+
};
|
|
154
|
+
lazy?: {
|
|
155
|
+
preset: string;
|
|
156
|
+
config(p: PluginContext, translation?: TranslationResult): Record<string, string>;
|
|
157
|
+
/**
|
|
158
|
+
* Only a fallback (the hashes export): the program skips the step unless
|
|
159
|
+
* the translation asked for it or settings were given.
|
|
160
|
+
*/
|
|
161
|
+
optional?: boolean;
|
|
162
|
+
/** Where the vendor secret comes from (a credential spec), when the preset needs one. */
|
|
163
|
+
secret?: CredentialSpec;
|
|
164
|
+
};
|
|
165
|
+
/** The codemod vendor id (`atlas migrate code --from <id>`). */
|
|
166
|
+
codemod?: string;
|
|
167
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.js","sourceRoot":"","sources":["../../../src/migrate/framework/plugin.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { MigrationPlugin } from './plugin';
|
|
2
|
+
export declare function registerMigrationPlugin(plugin: MigrationPlugin, options?: {
|
|
3
|
+
replace?: boolean;
|
|
4
|
+
}): void;
|
|
5
|
+
/** Whether a plugin is registered under exactly this vendor name (no alias / source matching). */
|
|
6
|
+
export declare function hasMigrationPlugin(vendor: string): boolean;
|
|
7
|
+
/** The plugin for a vendor spelling (`auth0`, `aws-cognito`, `next-auth` …), or undefined. */
|
|
8
|
+
export declare function migrationPlugin(vendor: string): MigrationPlugin | undefined;
|
|
9
|
+
export declare function migrationPlugins(): MigrationPlugin[];
|
|
10
|
+
/** Test helper: forget every registered plugin. */
|
|
11
|
+
export declare function resetMigrationPlugins(): void;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.registerMigrationPlugin = registerMigrationPlugin;
|
|
4
|
+
exports.hasMigrationPlugin = hasMigrationPlugin;
|
|
5
|
+
exports.migrationPlugin = migrationPlugin;
|
|
6
|
+
exports.migrationPlugins = migrationPlugins;
|
|
7
|
+
exports.resetMigrationPlugins = resetMigrationPlugins;
|
|
8
|
+
const migrate_1 = require("@atlasauth/migrate");
|
|
9
|
+
/**
|
|
10
|
+
* The `atlas migrate <vendor>` plugin registry. A vendor track adds its plugin
|
|
11
|
+
* module under src/migrate/<vendor>/ and one line to BUILT_IN_PLUGINS in
|
|
12
|
+
* ./builtins.ts — nothing else in the framework changes.
|
|
13
|
+
*/
|
|
14
|
+
const plugins = new Map();
|
|
15
|
+
function registerMigrationPlugin(plugin, options = {}) {
|
|
16
|
+
if (plugins.has(plugin.vendor) && !options.replace)
|
|
17
|
+
throw new Error(`atlas migrate: plugin "${plugin.vendor}" is already registered.`);
|
|
18
|
+
plugins.set(plugin.vendor, plugin);
|
|
19
|
+
}
|
|
20
|
+
/** Whether a plugin is registered under exactly this vendor name (no alias / source matching). */
|
|
21
|
+
function hasMigrationPlugin(vendor) {
|
|
22
|
+
return plugins.has(vendor.toLowerCase());
|
|
23
|
+
}
|
|
24
|
+
/** The plugin for a vendor spelling (`auth0`, `aws-cognito`, `next-auth` …), or undefined. */
|
|
25
|
+
function migrationPlugin(vendor) {
|
|
26
|
+
const direct = plugins.get(vendor.toLowerCase());
|
|
27
|
+
if (direct)
|
|
28
|
+
return direct;
|
|
29
|
+
const source = (0, migrate_1.sourceFromVendor)(vendor);
|
|
30
|
+
if (!source)
|
|
31
|
+
return undefined;
|
|
32
|
+
for (const p of plugins.values())
|
|
33
|
+
if (p.source === source)
|
|
34
|
+
return p;
|
|
35
|
+
return undefined;
|
|
36
|
+
}
|
|
37
|
+
function migrationPlugins() {
|
|
38
|
+
return [...plugins.values()].sort((a, b) => a.vendor.localeCompare(b.vendor));
|
|
39
|
+
}
|
|
40
|
+
/** Test helper: forget every registered plugin. */
|
|
41
|
+
function resetMigrationPlugins() {
|
|
42
|
+
plugins.clear();
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=registry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../../src/migrate/framework/registry.ts"],"names":[],"mappings":";;AAWA,0DAGC;AAGD,gDAEC;AAGD,0CA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,SAAgB,qBAAqB;IACnC,OAAO,CAAC,KAAK,EAAE,CAAC;AAClB,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type Format } from '../../serialize';
|
|
2
|
+
import type { MigrationPlugin, ReportStatus, TranslationReportEntry, TranslationResult } from './plugin';
|
|
3
|
+
/**
|
|
4
|
+
* Writing a plugin's translation: the config-as-code documents (the
|
|
5
|
+
* `atlas config import --dir` format) plus `<vendor>-report.md` and
|
|
6
|
+
* `<vendor>-report.json`. The JSON report holds the whole translation, so a
|
|
7
|
+
* resumed run reads it back instead of asking the vendor again.
|
|
8
|
+
*/
|
|
9
|
+
export declare const reportMd: (plugin: MigrationPlugin) => string;
|
|
10
|
+
export declare const reportJsonName: (plugin: MigrationPlugin) => string;
|
|
11
|
+
export declare function reportCounts(report: TranslationReportEntry[]): Record<ReportStatus, number>;
|
|
12
|
+
export declare function renderTranslationReport(plugin: MigrationPlugin, t: TranslationResult): string;
|
|
13
|
+
/** Write the documents (non-empty ones) and both reports into `dir`. Returns the file names written. */
|
|
14
|
+
export declare function writePluginTranslation(plugin: MigrationPlugin, t: TranslationResult, dir: string, format: Format): string[];
|
|
15
|
+
/** The translation a previous run wrote into `dir`, or undefined. */
|
|
16
|
+
export declare function readPluginTranslation(plugin: MigrationPlugin, dir: string): TranslationResult | undefined;
|
|
17
|
+
export declare function translationSummary(plugin: MigrationPlugin, t: TranslationResult, dir: string, written: string[]): string[];
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.reportJsonName = exports.reportMd = void 0;
|
|
4
|
+
exports.reportCounts = reportCounts;
|
|
5
|
+
exports.renderTranslationReport = renderTranslationReport;
|
|
6
|
+
exports.writePluginTranslation = writePluginTranslation;
|
|
7
|
+
exports.readPluginTranslation = readPluginTranslation;
|
|
8
|
+
exports.translationSummary = translationSummary;
|
|
9
|
+
const node_fs_1 = require("node:fs");
|
|
10
|
+
const node_path_1 = require("node:path");
|
|
11
|
+
const serialize_1 = require("../../serialize");
|
|
12
|
+
/**
|
|
13
|
+
* Writing a plugin's translation: the config-as-code documents (the
|
|
14
|
+
* `atlas config import --dir` format) plus `<vendor>-report.md` and
|
|
15
|
+
* `<vendor>-report.json`. The JSON report holds the whole translation, so a
|
|
16
|
+
* resumed run reads it back instead of asking the vendor again.
|
|
17
|
+
*/
|
|
18
|
+
const reportMd = (plugin) => `${plugin.vendor}-report.md`;
|
|
19
|
+
exports.reportMd = reportMd;
|
|
20
|
+
const reportJsonName = (plugin) => `${plugin.vendor}-report.json`;
|
|
21
|
+
exports.reportJsonName = reportJsonName;
|
|
22
|
+
const ORDER = ['manual', 'differs', 'mapped'];
|
|
23
|
+
const HEADINGS = { manual: 'Needs a manual step', differs: 'Maps with a difference', mapped: 'Maps 1:1' };
|
|
24
|
+
function reportCounts(report) {
|
|
25
|
+
const out = { mapped: 0, differs: 0, manual: 0 };
|
|
26
|
+
for (const e of report)
|
|
27
|
+
out[e.status] += 1;
|
|
28
|
+
return out;
|
|
29
|
+
}
|
|
30
|
+
const where = (e) => (e.file ? `${e.file}${e.line ? `:${e.line}` : ''}` : e.setting);
|
|
31
|
+
const cell = (text) => text.replace(/\|/g, '\\|').replace(/\n/g, ' ');
|
|
32
|
+
function renderTranslationReport(plugin, t) {
|
|
33
|
+
const c = reportCounts(t.report);
|
|
34
|
+
const lines = [`# ${plugin.label} → Atlas: configuration report`, '', `Read from ${t.origin}.`, '', `${c.mapped} map 1:1, ${c.differs} map with a difference, ${c.manual} need a manual step.`, ''];
|
|
35
|
+
if (t.env.length) {
|
|
36
|
+
lines.push('## Environment variables to set before applying', '');
|
|
37
|
+
for (const e of t.env)
|
|
38
|
+
lines.push(`- \`${e.name}\`: ${e.for}`);
|
|
39
|
+
lines.push('');
|
|
40
|
+
}
|
|
41
|
+
for (const status of ORDER) {
|
|
42
|
+
const entries = t.report.filter((e) => e.status === status);
|
|
43
|
+
if (!entries.length)
|
|
44
|
+
continue;
|
|
45
|
+
lines.push(`## ${HEADINGS[status]} (${entries.length})`, '', `| ${plugin.label} | Atlas | Note | Where |`, '|---|---|---|---|');
|
|
46
|
+
for (const e of entries)
|
|
47
|
+
lines.push(`| \`${cell(e.setting)}\` | ${e.atlas ? `\`${cell(e.atlas)}\`` : ''} | ${cell(e.note)} | \`${cell(where(e))}\` |`);
|
|
48
|
+
lines.push('');
|
|
49
|
+
}
|
|
50
|
+
for (const [title, map] of [['Provider ids', t.mappings.providers], ['Roles', t.mappings.roles]]) {
|
|
51
|
+
const rows = Object.entries(map);
|
|
52
|
+
if (!rows.length)
|
|
53
|
+
continue;
|
|
54
|
+
lines.push(`## ${title}`, '', `| ${plugin.label} | Atlas |`, '|---|---|');
|
|
55
|
+
for (const [from, to] of rows)
|
|
56
|
+
lines.push(`| \`${from}\` | \`${to}\` |`);
|
|
57
|
+
lines.push('');
|
|
58
|
+
}
|
|
59
|
+
return lines.join('\n');
|
|
60
|
+
}
|
|
61
|
+
/** Write the documents (non-empty ones) and both reports into `dir`. Returns the file names written. */
|
|
62
|
+
function writePluginTranslation(plugin, t, dir, format) {
|
|
63
|
+
(0, node_fs_1.mkdirSync)(dir, { recursive: true });
|
|
64
|
+
const ext = format === 'json' ? 'json' : 'yaml';
|
|
65
|
+
const written = [];
|
|
66
|
+
for (const [type, value] of Object.entries(t.documents)) {
|
|
67
|
+
if (value === null || (Array.isArray(value) && value.length === 0))
|
|
68
|
+
continue;
|
|
69
|
+
const name = `${type}.${ext}`;
|
|
70
|
+
(0, node_fs_1.writeFileSync)((0, node_path_1.join)(dir, name), (0, serialize_1.serialize)(value, format));
|
|
71
|
+
written.push(name);
|
|
72
|
+
}
|
|
73
|
+
(0, node_fs_1.writeFileSync)((0, node_path_1.join)(dir, (0, exports.reportMd)(plugin)), renderTranslationReport(plugin, t));
|
|
74
|
+
(0, node_fs_1.writeFileSync)((0, node_path_1.join)(dir, (0, exports.reportJsonName)(plugin)), JSON.stringify({ object: 'config_translation', vendor: plugin.vendor, source: plugin.source, counts: reportCounts(t.report), translation: t }, null, 2) + '\n');
|
|
75
|
+
written.push((0, exports.reportMd)(plugin), (0, exports.reportJsonName)(plugin));
|
|
76
|
+
return written;
|
|
77
|
+
}
|
|
78
|
+
/** The translation a previous run wrote into `dir`, or undefined. */
|
|
79
|
+
function readPluginTranslation(plugin, dir) {
|
|
80
|
+
const path = (0, node_path_1.join)(dir, (0, exports.reportJsonName)(plugin));
|
|
81
|
+
if (!(0, node_fs_1.existsSync)(path))
|
|
82
|
+
return undefined;
|
|
83
|
+
try {
|
|
84
|
+
return JSON.parse((0, node_fs_1.readFileSync)(path, 'utf8')).translation;
|
|
85
|
+
}
|
|
86
|
+
catch {
|
|
87
|
+
return undefined;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
function translationSummary(plugin, t, dir, written) {
|
|
91
|
+
const c = reportCounts(t.report);
|
|
92
|
+
const out = [
|
|
93
|
+
`Read ${plugin.label} configuration from ${t.origin}.`,
|
|
94
|
+
`Wrote ${written.length - 2} config file(s) and the report to ${dir}: ${written.join(', ')}`,
|
|
95
|
+
`${c.mapped} map 1:1, ${c.differs} map with a difference, ${c.manual} need a manual step (see ${(0, node_path_1.join)(dir, (0, exports.reportMd)(plugin))}).`,
|
|
96
|
+
];
|
|
97
|
+
if (t.env.length)
|
|
98
|
+
out.push(`Set before applying: ${t.env.map((e) => e.name).join(', ')}`);
|
|
99
|
+
for (const e of t.report.filter((x) => x.status === 'manual'))
|
|
100
|
+
out.push(` manual ${where(e)} ${e.note}`);
|
|
101
|
+
return out;
|
|
102
|
+
}
|
|
103
|
+
//# sourceMappingURL=report.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"report.js","sourceRoot":"","sources":["../../../src/migrate/framework/report.ts"],"names":[],"mappings":";;;AAkBA,oCAIC;AAKD,0DAuBC;AAGD,wDAcC;AAGD,sDAQC;AAED,gDAUC;AA1FD,qCAA6E;A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C,CAAC,IAAI,EAAE,CAAC,CAAC;IAC5G,OAAO,GAAG,CAAC;AACb,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { type FrameworkExport, Tables } from '../export/frameworks/tables';
|
|
2
|
+
import type { MigrationPlugin, PluginContext } from '../framework/plugin';
|
|
3
|
+
/**
|
|
4
|
+
* The tables to export from: `--file` (an export script's NDJSON stream, or a
|
|
5
|
+
* single JSON / NDJSON / CSV table file) and/or `--set dump=<dir>`.
|
|
6
|
+
*/
|
|
7
|
+
export declare function readInput(p: PluginContext, opts?: {
|
|
8
|
+
singleFile?: (text: string, tables: Tables) => void;
|
|
9
|
+
}): Tables;
|
|
10
|
+
/** Write a framework export's rows through the bundle writer, in canonical order. */
|
|
11
|
+
export declare function writeFrameworkExport(p: PluginContext, out: FrameworkExport, writer: Parameters<NonNullable<MigrationPlugin['export']>['run']>[1]): Promise<void>;
|
|
12
|
+
/** Presets whose token is a bridge assertion signed on the owner's server (see the backend extractors). */
|
|
13
|
+
export declare const ASSERTION_PRESETS: Set<string>;
|
|
14
|
+
/**
|
|
15
|
+
* The bridge secret shared by the extractor on your server and Atlas:
|
|
16
|
+
* `--set bridge-secret=…` / ATLAS_BRIDGE_SECRET, else the one generated on an
|
|
17
|
+
* earlier run, else a new one — kept in atlas-migrate/<vendor>/bridge-secret
|
|
18
|
+
* (mode 0600) for your server's ATLAS_BRIDGE_SECRET.
|
|
19
|
+
*/
|
|
20
|
+
export declare function bridgeSecret(p: PluginContext, vendor: string, preset: string): string | undefined;
|
|
21
|
+
export declare const authJsPlugin: MigrationPlugin;
|
|
22
|
+
export declare const luciaPlugin: MigrationPlugin;
|
|
23
|
+
/** `google=googleId,github=github_id` → { google: 'googleId', github: 'github_id' }. */
|
|
24
|
+
export declare function parsePairs(text: string): Record<string, string>;
|
|
25
|
+
export declare const passportPlugin: MigrationPlugin;
|
|
26
|
+
export declare const ironSessionPlugin: MigrationPlugin;
|
|
27
|
+
export declare const devisePlugin: MigrationPlugin;
|
|
28
|
+
export declare const djangoPlugin: MigrationPlugin;
|
|
29
|
+
export declare const FRAMEWORK_PLUGINS: readonly MigrationPlugin[];
|