@atlasauth/cli 0.25.0 → 0.25.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/dist/args.d.ts +601 -0
- package/dist/args.js +289 -0
- package/dist/args.js.map +1 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +19 -0
- package/dist/cli.js.map +1 -0
- package/dist/commands/actions-gallery.d.ts +8 -0
- package/dist/commands/actions-gallery.js +197 -0
- package/dist/commands/actions-gallery.js.map +1 -0
- package/dist/commands/actions.d.ts +13 -0
- package/dist/commands/actions.js +135 -0
- package/dist/commands/actions.js.map +1 -0
- package/dist/commands/admin.d.ts +49 -0
- package/dist/commands/admin.js +353 -0
- package/dist/commands/admin.js.map +1 -0
- package/dist/commands/api-keys.d.ts +4 -0
- package/dist/commands/api-keys.js +96 -0
- package/dist/commands/api-keys.js.map +1 -0
- package/dist/commands/auth.d.ts +25 -0
- package/dist/commands/auth.js +102 -0
- package/dist/commands/auth.js.map +1 -0
- package/dist/commands/config.d.ts +104 -0
- package/dist/commands/config.js +1532 -0
- package/dist/commands/config.js.map +1 -0
- package/dist/commands/csp.d.ts +32 -0
- package/dist/commands/csp.js +180 -0
- package/dist/commands/csp.js.map +1 -0
- package/dist/commands/dev.d.ts +8 -0
- package/dist/commands/dev.js +84 -0
- package/dist/commands/dev.js.map +1 -0
- package/dist/commands/fga.d.ts +10 -0
- package/dist/commands/fga.js +146 -0
- package/dist/commands/fga.js.map +1 -0
- package/dist/commands/golive.d.ts +40 -0
- package/dist/commands/golive.js +285 -0
- package/dist/commands/golive.js.map +1 -0
- package/dist/commands/id-accounts.d.ts +13 -0
- package/dist/commands/id-accounts.js +195 -0
- package/dist/commands/id-accounts.js.map +1 -0
- package/dist/commands/import-better-auth.d.ts +3 -0
- package/dist/commands/import-better-auth.js +164 -0
- package/dist/commands/import-better-auth.js.map +1 -0
- package/dist/commands/import.d.ts +3 -0
- package/dist/commands/import.js +123 -0
- package/dist/commands/import.js.map +1 -0
- package/dist/commands/info.d.ts +75 -0
- package/dist/commands/info.js +362 -0
- package/dist/commands/info.js.map +1 -0
- package/dist/commands/init.d.ts +3 -0
- package/dist/commands/init.js +438 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/integrations.d.ts +8 -0
- package/dist/commands/integrations.js +112 -0
- package/dist/commands/integrations.js.map +1 -0
- package/dist/commands/listen.d.ts +17 -0
- package/dist/commands/listen.js +223 -0
- package/dist/commands/listen.js.map +1 -0
- package/dist/commands/mcp.d.ts +38 -0
- package/dist/commands/mcp.js +111 -0
- package/dist/commands/mcp.js.map +1 -0
- package/dist/commands/migrate.d.ts +16 -0
- package/dist/commands/migrate.js +114 -0
- package/dist/commands/migrate.js.map +1 -0
- package/dist/commands/move-origin.d.ts +11 -0
- package/dist/commands/move-origin.js +95 -0
- package/dist/commands/move-origin.js.map +1 -0
- package/dist/commands/operator.d.ts +18 -0
- package/dist/commands/operator.js +238 -0
- package/dist/commands/operator.js.map +1 -0
- package/dist/commands/orgs.d.ts +4 -0
- package/dist/commands/orgs.js +72 -0
- package/dist/commands/orgs.js.map +1 -0
- package/dist/commands/pages.d.ts +14 -0
- package/dist/commands/pages.js +113 -0
- package/dist/commands/pages.js.map +1 -0
- package/dist/commands/partner-platforms.d.ts +10 -0
- package/dist/commands/partner-platforms.js +157 -0
- package/dist/commands/partner-platforms.js.map +1 -0
- package/dist/commands/project-commands.d.ts +38 -0
- package/dist/commands/project-commands.js +361 -0
- package/dist/commands/project-commands.js.map +1 -0
- package/dist/commands/referrals.d.ts +69 -0
- package/dist/commands/referrals.js +1056 -0
- package/dist/commands/referrals.js.map +1 -0
- package/dist/commands/resources.d.ts +44 -0
- package/dist/commands/resources.js +234 -0
- package/dist/commands/resources.js.map +1 -0
- package/dist/commands/sessions.d.ts +4 -0
- package/dist/commands/sessions.js +28 -0
- package/dist/commands/sessions.js.map +1 -0
- package/dist/commands/shared.d.ts +38 -0
- package/dist/commands/shared.js +69 -0
- package/dist/commands/shared.js.map +1 -0
- package/dist/commands/status.d.ts +3 -0
- package/dist/commands/status.js +77 -0
- package/dist/commands/status.js.map +1 -0
- package/dist/commands/users.d.ts +4 -0
- package/dist/commands/users.js +100 -0
- package/dist/commands/users.js.map +1 -0
- package/dist/commands/webhooks.d.ts +34 -0
- package/dist/commands/webhooks.js +301 -0
- package/dist/commands/webhooks.js.map +1 -0
- package/dist/config-http.d.ts +29 -0
- package/dist/config-http.js +64 -0
- package/dist/config-http.js.map +1 -0
- package/dist/config.d.ts +64 -0
- package/dist/config.js +69 -0
- package/dist/config.js.map +1 -0
- package/dist/context.d.ts +72 -0
- package/dist/context.js +27 -0
- package/dist/context.js.map +1 -0
- package/dist/define-config.d.ts +9 -0
- package/dist/define-config.js +8 -0
- package/dist/define-config.js.map +1 -0
- package/dist/errors.d.ts +15 -0
- package/dist/errors.js +25 -0
- package/dist/errors.js.map +1 -0
- package/dist/help.d.ts +8 -0
- package/dist/help.js +868 -0
- package/dist/help.js.map +1 -0
- package/dist/import/csv.d.ts +6 -0
- package/dist/import/csv.js +63 -0
- package/dist/import/csv.js.map +1 -0
- package/dist/import/vendors.d.ts +57 -0
- package/dist/import/vendors.js +568 -0
- package/dist/import/vendors.js.map +1 -0
- package/dist/index.d.ts +33 -0
- package/dist/index.js +81 -0
- package/dist/index.js.map +1 -0
- package/dist/io.d.ts +21 -0
- package/dist/io.js +28 -0
- package/dist/io.js.map +1 -0
- package/dist/migrate/appwrite/plugin.d.ts +2 -0
- package/dist/migrate/appwrite/plugin.js +103 -0
- package/dist/migrate/appwrite/plugin.js.map +1 -0
- package/dist/migrate/auth0/plugin.d.ts +2 -0
- package/dist/migrate/auth0/plugin.js +126 -0
- package/dist/migrate/auth0/plugin.js.map +1 -0
- package/dist/migrate/authentik/plugin.d.ts +2 -0
- package/dist/migrate/authentik/plugin.js +135 -0
- package/dist/migrate/authentik/plugin.js.map +1 -0
- package/dist/migrate/azure-ad-b2c/plugin.d.ts +8 -0
- package/dist/migrate/azure-ad-b2c/plugin.js +165 -0
- package/dist/migrate/azure-ad-b2c/plugin.js.map +1 -0
- package/dist/migrate/better-auth/integration.d.ts +59 -0
- package/dist/migrate/better-auth/integration.js +81 -0
- package/dist/migrate/better-auth/integration.js.map +1 -0
- package/dist/migrate/better-auth/orchestrator.d.ts +43 -0
- package/dist/migrate/better-auth/orchestrator.js +525 -0
- package/dist/migrate/better-auth/orchestrator.js.map +1 -0
- package/dist/migrate/better-auth/output.d.ts +20 -0
- package/dist/migrate/better-auth/output.js +146 -0
- package/dist/migrate/better-auth/output.js.map +1 -0
- package/dist/migrate/better-auth/translate.d.ts +77 -0
- package/dist/migrate/better-auth/translate.js +1989 -0
- package/dist/migrate/better-auth/translate.js.map +1 -0
- package/dist/migrate/clerk/plugin.d.ts +2 -0
- package/dist/migrate/clerk/plugin.js +76 -0
- package/dist/migrate/clerk/plugin.js.map +1 -0
- package/dist/migrate/cognito/plugin.d.ts +5 -0
- package/dist/migrate/cognito/plugin.js +170 -0
- package/dist/migrate/cognito/plugin.js.map +1 -0
- package/dist/migrate/corbado/plugin.d.ts +2 -0
- package/dist/migrate/corbado/plugin.js +63 -0
- package/dist/migrate/corbado/plugin.js.map +1 -0
- package/dist/migrate/descope/plugin.d.ts +2 -0
- package/dist/migrate/descope/plugin.js +83 -0
- package/dist/migrate/descope/plugin.js.map +1 -0
- package/dist/migrate/entra-external-id/plugin.d.ts +8 -0
- package/dist/migrate/entra-external-id/plugin.js +12 -0
- package/dist/migrate/entra-external-id/plugin.js.map +1 -0
- package/dist/migrate/export/appwrite-config.d.ts +28 -0
- package/dist/migrate/export/appwrite-config.js +170 -0
- package/dist/migrate/export/appwrite-config.js.map +1 -0
- package/dist/migrate/export/appwrite.d.ts +51 -0
- package/dist/migrate/export/appwrite.js +288 -0
- package/dist/migrate/export/appwrite.js.map +1 -0
- package/dist/migrate/export/auth0-config.d.ts +29 -0
- package/dist/migrate/export/auth0-config.js +249 -0
- package/dist/migrate/export/auth0-config.js.map +1 -0
- package/dist/migrate/export/auth0.d.ts +62 -0
- package/dist/migrate/export/auth0.js +575 -0
- package/dist/migrate/export/auth0.js.map +1 -0
- package/dist/migrate/export/authentik-config.d.ts +45 -0
- package/dist/migrate/export/authentik-config.js +357 -0
- package/dist/migrate/export/authentik-config.js.map +1 -0
- package/dist/migrate/export/authentik.d.ts +110 -0
- package/dist/migrate/export/authentik.js +838 -0
- package/dist/migrate/export/authentik.js.map +1 -0
- package/dist/migrate/export/azure-config.d.ts +58 -0
- package/dist/migrate/export/azure-config.js +344 -0
- package/dist/migrate/export/azure-config.js.map +1 -0
- package/dist/migrate/export/azure.d.ts +85 -0
- package/dist/migrate/export/azure.js +373 -0
- package/dist/migrate/export/azure.js.map +1 -0
- package/dist/migrate/export/clerk-config.d.ts +26 -0
- package/dist/migrate/export/clerk-config.js +227 -0
- package/dist/migrate/export/clerk-config.js.map +1 -0
- package/dist/migrate/export/clerk.d.ts +46 -0
- package/dist/migrate/export/clerk.js +486 -0
- package/dist/migrate/export/clerk.js.map +1 -0
- package/dist/migrate/export/cognito-config.d.ts +25 -0
- package/dist/migrate/export/cognito-config.js +273 -0
- package/dist/migrate/export/cognito-config.js.map +1 -0
- package/dist/migrate/export/cognito.d.ts +103 -0
- package/dist/migrate/export/cognito.js +441 -0
- package/dist/migrate/export/cognito.js.map +1 -0
- package/dist/migrate/export/corbado-config.d.ts +20 -0
- package/dist/migrate/export/corbado-config.js +63 -0
- package/dist/migrate/export/corbado-config.js.map +1 -0
- package/dist/migrate/export/corbado.d.ts +37 -0
- package/dist/migrate/export/corbado.js +132 -0
- package/dist/migrate/export/corbado.js.map +1 -0
- package/dist/migrate/export/descope.d.ts +35 -0
- package/dist/migrate/export/descope.js +208 -0
- package/dist/migrate/export/descope.js.map +1 -0
- package/dist/migrate/export/fake-vendor.test-helper.d.ts +27 -0
- package/dist/migrate/export/fake-vendor.test-helper.js +41 -0
- package/dist/migrate/export/fake-vendor.test-helper.js.map +1 -0
- package/dist/migrate/export/firebase-config.d.ts +24 -0
- package/dist/migrate/export/firebase-config.js +215 -0
- package/dist/migrate/export/firebase-config.js.map +1 -0
- package/dist/migrate/export/firebase.d.ts +102 -0
- package/dist/migrate/export/firebase.js +464 -0
- package/dist/migrate/export/firebase.js.map +1 -0
- package/dist/migrate/export/frameworks/app-users.d.ts +42 -0
- package/dist/migrate/export/frameworks/app-users.js +161 -0
- package/dist/migrate/export/frameworks/app-users.js.map +1 -0
- package/dist/migrate/export/frameworks/authjs.d.ts +41 -0
- package/dist/migrate/export/frameworks/authjs.js +146 -0
- package/dist/migrate/export/frameworks/authjs.js.map +1 -0
- package/dist/migrate/export/frameworks/devise.d.ts +39 -0
- package/dist/migrate/export/frameworks/devise.js +218 -0
- package/dist/migrate/export/frameworks/devise.js.map +1 -0
- package/dist/migrate/export/frameworks/django.d.ts +45 -0
- package/dist/migrate/export/frameworks/django.js +315 -0
- package/dist/migrate/export/frameworks/django.js.map +1 -0
- package/dist/migrate/export/frameworks/lucia.d.ts +42 -0
- package/dist/migrate/export/frameworks/lucia.js +263 -0
- package/dist/migrate/export/frameworks/lucia.js.map +1 -0
- package/dist/migrate/export/frameworks/tables.d.ts +90 -0
- package/dist/migrate/export/frameworks/tables.js +325 -0
- package/dist/migrate/export/frameworks/tables.js.map +1 -0
- package/dist/migrate/export/frameworks/webauthn.d.ts +25 -0
- package/dist/migrate/export/frameworks/webauthn.js +130 -0
- package/dist/migrate/export/frameworks/webauthn.js.map +1 -0
- package/dist/migrate/export/frontegg-config.d.ts +29 -0
- package/dist/migrate/export/frontegg-config.js +238 -0
- package/dist/migrate/export/frontegg-config.js.map +1 -0
- package/dist/migrate/export/frontegg.d.ts +67 -0
- package/dist/migrate/export/frontegg.js +410 -0
- package/dist/migrate/export/frontegg.js.map +1 -0
- package/dist/migrate/export/fusionauth-config.d.ts +26 -0
- package/dist/migrate/export/fusionauth-config.js +226 -0
- package/dist/migrate/export/fusionauth-config.js.map +1 -0
- package/dist/migrate/export/fusionauth.d.ts +99 -0
- package/dist/migrate/export/fusionauth.js +642 -0
- package/dist/migrate/export/fusionauth.js.map +1 -0
- package/dist/migrate/export/hanko-config.d.ts +27 -0
- package/dist/migrate/export/hanko-config.js +265 -0
- package/dist/migrate/export/hanko-config.js.map +1 -0
- package/dist/migrate/export/hanko.d.ts +52 -0
- package/dist/migrate/export/hanko.js +605 -0
- package/dist/migrate/export/hanko.js.map +1 -0
- package/dist/migrate/export/keycloak-config.d.ts +19 -0
- package/dist/migrate/export/keycloak-config.js +219 -0
- package/dist/migrate/export/keycloak-config.js.map +1 -0
- package/dist/migrate/export/keycloak.d.ts +155 -0
- package/dist/migrate/export/keycloak.js +878 -0
- package/dist/migrate/export/keycloak.js.map +1 -0
- package/dist/migrate/export/kinde-descope-config.d.ts +38 -0
- package/dist/migrate/export/kinde-descope-config.js +172 -0
- package/dist/migrate/export/kinde-descope-config.js.map +1 -0
- package/dist/migrate/export/kinde.d.ts +57 -0
- package/dist/migrate/export/kinde.js +333 -0
- package/dist/migrate/export/kinde.js.map +1 -0
- package/dist/migrate/export/ldap.d.ts +53 -0
- package/dist/migrate/export/ldap.js +277 -0
- package/dist/migrate/export/ldap.js.map +1 -0
- package/dist/migrate/export/logto-config.d.ts +27 -0
- package/dist/migrate/export/logto-config.js +264 -0
- package/dist/migrate/export/logto-config.js.map +1 -0
- package/dist/migrate/export/logto.d.ts +150 -0
- package/dist/migrate/export/logto.js +809 -0
- package/dist/migrate/export/logto.js.map +1 -0
- package/dist/migrate/export/magic-config.d.ts +14 -0
- package/dist/migrate/export/magic-config.js +28 -0
- package/dist/migrate/export/magic-config.js.map +1 -0
- package/dist/migrate/export/magic.d.ts +31 -0
- package/dist/migrate/export/magic.js +93 -0
- package/dist/migrate/export/magic.js.map +1 -0
- package/dist/migrate/export/mini-yaml.d.ts +19 -0
- package/dist/migrate/export/mini-yaml.js +581 -0
- package/dist/migrate/export/mini-yaml.js.map +1 -0
- package/dist/migrate/export/nhost-config.d.ts +26 -0
- package/dist/migrate/export/nhost-config.js +360 -0
- package/dist/migrate/export/nhost-config.js.map +1 -0
- package/dist/migrate/export/nhost.d.ts +64 -0
- package/dist/migrate/export/nhost.js +304 -0
- package/dist/migrate/export/nhost.js.map +1 -0
- package/dist/migrate/export/okta-config.d.ts +30 -0
- package/dist/migrate/export/okta-config.js +205 -0
- package/dist/migrate/export/okta-config.js.map +1 -0
- package/dist/migrate/export/okta.d.ts +43 -0
- package/dist/migrate/export/okta.js +337 -0
- package/dist/migrate/export/okta.js.map +1 -0
- package/dist/migrate/export/onelogin.d.ts +22 -0
- package/dist/migrate/export/onelogin.js +123 -0
- package/dist/migrate/export/onelogin.js.map +1 -0
- package/dist/migrate/export/ory-config.d.ts +58 -0
- package/dist/migrate/export/ory-config.js +451 -0
- package/dist/migrate/export/ory-config.js.map +1 -0
- package/dist/migrate/export/ory.d.ts +81 -0
- package/dist/migrate/export/ory.js +555 -0
- package/dist/migrate/export/ory.js.map +1 -0
- package/dist/migrate/export/password-detect.d.ts +29 -0
- package/dist/migrate/export/password-detect.js +81 -0
- package/dist/migrate/export/password-detect.js.map +1 -0
- package/dist/migrate/export/pingone.d.ts +36 -0
- package/dist/migrate/export/pingone.js +218 -0
- package/dist/migrate/export/pingone.js.map +1 -0
- package/dist/migrate/export/plugin-kit.d.ts +25 -0
- package/dist/migrate/export/plugin-kit.js +82 -0
- package/dist/migrate/export/plugin-kit.js.map +1 -0
- package/dist/migrate/export/pocketbase-config.d.ts +28 -0
- package/dist/migrate/export/pocketbase-config.js +180 -0
- package/dist/migrate/export/pocketbase-config.js.map +1 -0
- package/dist/migrate/export/pocketbase.d.ts +52 -0
- package/dist/migrate/export/pocketbase.js +243 -0
- package/dist/migrate/export/pocketbase.js.map +1 -0
- package/dist/migrate/export/project-files.d.ts +15 -0
- package/dist/migrate/export/project-files.js +43 -0
- package/dist/migrate/export/project-files.js.map +1 -0
- package/dist/migrate/export/propelauth-config.d.ts +18 -0
- package/dist/migrate/export/propelauth-config.js +58 -0
- package/dist/migrate/export/propelauth-config.js.map +1 -0
- package/dist/migrate/export/propelauth-harness.test-helper.d.ts +62 -0
- package/dist/migrate/export/propelauth-harness.test-helper.js +109 -0
- package/dist/migrate/export/propelauth-harness.test-helper.js.map +1 -0
- package/dist/migrate/export/propelauth.d.ts +48 -0
- package/dist/migrate/export/propelauth.js +255 -0
- package/dist/migrate/export/propelauth.js.map +1 -0
- package/dist/migrate/export/record-set.d.ts +44 -0
- package/dist/migrate/export/record-set.js +98 -0
- package/dist/migrate/export/record-set.js.map +1 -0
- package/dist/migrate/export/source-lines.d.ts +17 -0
- package/dist/migrate/export/source-lines.js +43 -0
- package/dist/migrate/export/source-lines.js.map +1 -0
- package/dist/migrate/export/sso-metadata.d.ts +47 -0
- package/dist/migrate/export/sso-metadata.js +180 -0
- package/dist/migrate/export/sso-metadata.js.map +1 -0
- package/dist/migrate/export/stytch-config.d.ts +22 -0
- package/dist/migrate/export/stytch-config.js +102 -0
- package/dist/migrate/export/stytch-config.js.map +1 -0
- package/dist/migrate/export/stytch.d.ts +68 -0
- package/dist/migrate/export/stytch.js +510 -0
- package/dist/migrate/export/stytch.js.map +1 -0
- package/dist/migrate/export/supabase-config.d.ts +48 -0
- package/dist/migrate/export/supabase-config.js +408 -0
- package/dist/migrate/export/supabase-config.js.map +1 -0
- package/dist/migrate/export/supabase.d.ts +86 -0
- package/dist/migrate/export/supabase.js +524 -0
- package/dist/migrate/export/supabase.js.map +1 -0
- package/dist/migrate/export/supertokens-config.d.ts +20 -0
- package/dist/migrate/export/supertokens-config.js +150 -0
- package/dist/migrate/export/supertokens-config.js.map +1 -0
- package/dist/migrate/export/supertokens.d.ts +125 -0
- package/dist/migrate/export/supertokens.js +464 -0
- package/dist/migrate/export/supertokens.js.map +1 -0
- package/dist/migrate/export/table.d.ts +35 -0
- package/dist/migrate/export/table.js +248 -0
- package/dist/migrate/export/table.js.map +1 -0
- package/dist/migrate/export/translate-kit.d.ts +46 -0
- package/dist/migrate/export/translate-kit.js +148 -0
- package/dist/migrate/export/translate-kit.js.map +1 -0
- package/dist/migrate/export/userfront-config.d.ts +15 -0
- package/dist/migrate/export/userfront-config.js +49 -0
- package/dist/migrate/export/userfront-config.js.map +1 -0
- package/dist/migrate/export/userfront.d.ts +38 -0
- package/dist/migrate/export/userfront.js +189 -0
- package/dist/migrate/export/userfront.js.map +1 -0
- package/dist/migrate/export/vendor-http.d.ts +46 -0
- package/dist/migrate/export/vendor-http.js +138 -0
- package/dist/migrate/export/vendor-http.js.map +1 -0
- package/dist/migrate/export/workos-config.d.ts +23 -0
- package/dist/migrate/export/workos-config.js +125 -0
- package/dist/migrate/export/workos-config.js.map +1 -0
- package/dist/migrate/export/workos.d.ts +46 -0
- package/dist/migrate/export/workos.js +272 -0
- package/dist/migrate/export/workos.js.map +1 -0
- package/dist/migrate/export/zip.d.ts +8 -0
- package/dist/migrate/export/zip.js +66 -0
- package/dist/migrate/export/zip.js.map +1 -0
- package/dist/migrate/export/zitadel-config.d.ts +37 -0
- package/dist/migrate/export/zitadel-config.js +279 -0
- package/dist/migrate/export/zitadel-config.js.map +1 -0
- package/dist/migrate/export/zitadel.d.ts +82 -0
- package/dist/migrate/export/zitadel.js +447 -0
- package/dist/migrate/export/zitadel.js.map +1 -0
- package/dist/migrate/firebase/plugin.d.ts +2 -0
- package/dist/migrate/firebase/plugin.js +152 -0
- package/dist/migrate/firebase/plugin.js.map +1 -0
- package/dist/migrate/framework/builtins.d.ts +2 -0
- package/dist/migrate/framework/builtins.js +52 -0
- package/dist/migrate/framework/builtins.js.map +1 -0
- package/dist/migrate/framework/commands.d.ts +20 -0
- package/dist/migrate/framework/commands.js +58 -0
- package/dist/migrate/framework/commands.js.map +1 -0
- package/dist/migrate/framework/custom.d.ts +12 -0
- package/dist/migrate/framework/custom.js +96 -0
- package/dist/migrate/framework/custom.js.map +1 -0
- package/dist/migrate/framework/orchestrator.d.ts +113 -0
- package/dist/migrate/framework/orchestrator.js +532 -0
- package/dist/migrate/framework/orchestrator.js.map +1 -0
- package/dist/migrate/framework/plugin.d.ts +167 -0
- package/dist/migrate/framework/plugin.js +3 -0
- package/dist/migrate/framework/plugin.js.map +1 -0
- package/dist/migrate/framework/registry.d.ts +11 -0
- package/dist/migrate/framework/registry.js +44 -0
- package/dist/migrate/framework/registry.js.map +1 -0
- package/dist/migrate/framework/report.d.ts +17 -0
- package/dist/migrate/framework/report.js +103 -0
- package/dist/migrate/framework/report.js.map +1 -0
- package/dist/migrate/frameworks/plugins.d.ts +29 -0
- package/dist/migrate/frameworks/plugins.js +402 -0
- package/dist/migrate/frameworks/plugins.js.map +1 -0
- package/dist/migrate/frameworks/report.d.ts +92 -0
- package/dist/migrate/frameworks/report.js +207 -0
- package/dist/migrate/frameworks/report.js.map +1 -0
- package/dist/migrate/frameworks/translate-js.d.ts +5 -0
- package/dist/migrate/frameworks/translate-js.js +503 -0
- package/dist/migrate/frameworks/translate-js.js.map +1 -0
- package/dist/migrate/frameworks/translate-rails-django.d.ts +3 -0
- package/dist/migrate/frameworks/translate-rails-django.js +1391 -0
- package/dist/migrate/frameworks/translate-rails-django.js.map +1 -0
- package/dist/migrate/frontegg/plugin.d.ts +2 -0
- package/dist/migrate/frontegg/plugin.js +78 -0
- package/dist/migrate/frontegg/plugin.js.map +1 -0
- package/dist/migrate/fusionauth/plugin.d.ts +2 -0
- package/dist/migrate/fusionauth/plugin.js +109 -0
- package/dist/migrate/fusionauth/plugin.js.map +1 -0
- package/dist/migrate/hanko/plugin.d.ts +2 -0
- package/dist/migrate/hanko/plugin.js +100 -0
- package/dist/migrate/hanko/plugin.js.map +1 -0
- package/dist/migrate/keycloak/plugin.d.ts +2 -0
- package/dist/migrate/keycloak/plugin.js +148 -0
- package/dist/migrate/keycloak/plugin.js.map +1 -0
- package/dist/migrate/kinde/plugin.d.ts +2 -0
- package/dist/migrate/kinde/plugin.js +105 -0
- package/dist/migrate/kinde/plugin.js.map +1 -0
- package/dist/migrate/ldap/plugin.d.ts +2 -0
- package/dist/migrate/ldap/plugin.js +73 -0
- package/dist/migrate/ldap/plugin.js.map +1 -0
- package/dist/migrate/logto/plugin.d.ts +2 -0
- package/dist/migrate/logto/plugin.js +131 -0
- package/dist/migrate/logto/plugin.js.map +1 -0
- package/dist/migrate/magic/plugin.d.ts +2 -0
- package/dist/migrate/magic/plugin.js +56 -0
- package/dist/migrate/magic/plugin.js.map +1 -0
- package/dist/migrate/nhost/plugin.d.ts +2 -0
- package/dist/migrate/nhost/plugin.js +115 -0
- package/dist/migrate/nhost/plugin.js.map +1 -0
- package/dist/migrate/oidc/plugin.d.ts +2 -0
- package/dist/migrate/oidc/plugin.js +73 -0
- package/dist/migrate/oidc/plugin.js.map +1 -0
- package/dist/migrate/okta/plugin.d.ts +2 -0
- package/dist/migrate/okta/plugin.js +105 -0
- package/dist/migrate/okta/plugin.js.map +1 -0
- package/dist/migrate/onelogin/plugin.d.ts +2 -0
- package/dist/migrate/onelogin/plugin.js +61 -0
- package/dist/migrate/onelogin/plugin.js.map +1 -0
- package/dist/migrate/ory/plugin.d.ts +2 -0
- package/dist/migrate/ory/plugin.js +186 -0
- package/dist/migrate/ory/plugin.js.map +1 -0
- package/dist/migrate/ping-identity/plugin.d.ts +2 -0
- package/dist/migrate/ping-identity/plugin.js +100 -0
- package/dist/migrate/ping-identity/plugin.js.map +1 -0
- package/dist/migrate/pocketbase/plugin.d.ts +2 -0
- package/dist/migrate/pocketbase/plugin.js +99 -0
- package/dist/migrate/pocketbase/plugin.js.map +1 -0
- package/dist/migrate/propelauth/plugin.d.ts +2 -0
- package/dist/migrate/propelauth/plugin.js +65 -0
- package/dist/migrate/propelauth/plugin.js.map +1 -0
- package/dist/migrate/saml/plugin.d.ts +2 -0
- package/dist/migrate/saml/plugin.js +79 -0
- package/dist/migrate/saml/plugin.js.map +1 -0
- package/dist/migrate/stytch/plugin.d.ts +2 -0
- package/dist/migrate/stytch/plugin.js +97 -0
- package/dist/migrate/stytch/plugin.js.map +1 -0
- package/dist/migrate/supabase/plugin.d.ts +2 -0
- package/dist/migrate/supabase/plugin.js +149 -0
- package/dist/migrate/supabase/plugin.js.map +1 -0
- package/dist/migrate/supertokens/plugin.d.ts +2 -0
- package/dist/migrate/supertokens/plugin.js +114 -0
- package/dist/migrate/supertokens/plugin.js.map +1 -0
- package/dist/migrate/user-table/plugin.d.ts +2 -0
- package/dist/migrate/user-table/plugin.js +62 -0
- package/dist/migrate/user-table/plugin.js.map +1 -0
- package/dist/migrate/userfront/plugin.d.ts +2 -0
- package/dist/migrate/userfront/plugin.js +60 -0
- package/dist/migrate/userfront/plugin.js.map +1 -0
- package/dist/migrate/workos/plugin.d.ts +2 -0
- package/dist/migrate/workos/plugin.js +81 -0
- package/dist/migrate/workos/plugin.js.map +1 -0
- package/dist/migrate/zitadel/plugin.d.ts +2 -0
- package/dist/migrate/zitadel/plugin.js +114 -0
- package/dist/migrate/zitadel/plugin.js.map +1 -0
- package/dist/output.d.ts +41 -0
- package/dist/output.js +72 -0
- package/dist/output.js.map +1 -0
- package/dist/project.d.ts +64 -0
- package/dist/project.js +86 -0
- package/dist/project.js.map +1 -0
- package/dist/prompt.d.ts +15 -0
- package/dist/prompt.js +46 -0
- package/dist/prompt.js.map +1 -0
- package/dist/run.d.ts +12 -0
- package/dist/run.js +157 -0
- package/dist/run.js.map +1 -0
- package/dist/secrets.d.ts +41 -0
- package/dist/secrets.js +142 -0
- package/dist/secrets.js.map +1 -0
- package/dist/serialize.d.ts +30 -0
- package/dist/serialize.js +131 -0
- package/dist/serialize.js.map +1 -0
- package/dist/version.d.ts +7 -0
- package/dist/version.js +21 -0
- package/dist/version.js.map +1 -0
- package/package.json +3 -3
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.parsePocketBaseSchema = parsePocketBaseSchema;
|
|
4
|
+
exports.translatePocketBaseConfig = translatePocketBaseConfig;
|
|
5
|
+
const record_set_1 = require("./record-set");
|
|
6
|
+
const source_lines_1 = require("./source-lines");
|
|
7
|
+
const translate_kit_1 = require("./translate-kit");
|
|
8
|
+
function parsePocketBaseSchema(text) {
|
|
9
|
+
const parsed = JSON.parse(text);
|
|
10
|
+
if (Array.isArray(parsed))
|
|
11
|
+
return (0, record_set_1.objs)(parsed);
|
|
12
|
+
if ((0, record_set_1.isObj)(parsed) && Array.isArray(parsed.collections))
|
|
13
|
+
return (0, record_set_1.objs)(parsed.collections);
|
|
14
|
+
throw new Error('Not a PocketBase collections export (expected a JSON array of collections).');
|
|
15
|
+
}
|
|
16
|
+
/** Options of a collection, wherever this PocketBase version keeps them. */
|
|
17
|
+
function optionsOf(c) {
|
|
18
|
+
const o = typeof c.options === 'string' ? safeJson(c.options) : c.options;
|
|
19
|
+
return { ...((0, record_set_1.isObj)(o) ? o : {}), ...c };
|
|
20
|
+
}
|
|
21
|
+
function safeJson(s) {
|
|
22
|
+
try {
|
|
23
|
+
return JSON.parse(s);
|
|
24
|
+
}
|
|
25
|
+
catch {
|
|
26
|
+
return undefined;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
function translatePocketBaseConfig(snap) {
|
|
30
|
+
const b = new translate_kit_1.ConfigBuilder();
|
|
31
|
+
const auth = snap.collections.filter((c) => (0, record_set_1.str)(c.type) === 'auth' && (0, record_set_1.str)(c.name) !== '_superusers');
|
|
32
|
+
const main = auth.find((c) => (0, record_set_1.str)(c.name) === 'users') ?? auth[0];
|
|
33
|
+
if (!main) {
|
|
34
|
+
b.add('manual', 'collections', '_collections', 'No auth collection found: nothing to translate.');
|
|
35
|
+
return b.result(snap.file?.path ?? 'pocketbase _collections');
|
|
36
|
+
}
|
|
37
|
+
const name = (0, record_set_1.str)(main.name);
|
|
38
|
+
const o = optionsOf(main);
|
|
39
|
+
const file = snap.file;
|
|
40
|
+
// Lines are searched from the collection's own "name" key onwards.
|
|
41
|
+
const start = file ? Math.max(0, file.text.search(new RegExp(`"name"\\s*:\\s*"${name.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')}"`))) : 0;
|
|
42
|
+
const line = (...keys) => {
|
|
43
|
+
if (!file)
|
|
44
|
+
return undefined;
|
|
45
|
+
// The collection's "id" may come before "name": search the whole object for the first key.
|
|
46
|
+
const from = file.text.lastIndexOf('{', start);
|
|
47
|
+
let at = from < 0 ? 0 : from;
|
|
48
|
+
for (const k of keys) {
|
|
49
|
+
const i = file.text.indexOf(`"${k}"`, at);
|
|
50
|
+
if (i < 0)
|
|
51
|
+
return undefined;
|
|
52
|
+
at = i + k.length + 2;
|
|
53
|
+
}
|
|
54
|
+
return (0, source_lines_1.lineAt)(file.text, at);
|
|
55
|
+
};
|
|
56
|
+
const where = (...keys) => {
|
|
57
|
+
const l = line(...keys);
|
|
58
|
+
return { f: l ? file.path : undefined, l };
|
|
59
|
+
};
|
|
60
|
+
const area = `collection ${name}`;
|
|
61
|
+
const put = (status, keys, note, atlas) => {
|
|
62
|
+
const w = where(...keys);
|
|
63
|
+
(0, source_lines_1.addAt)(b, w.f, w.l, status, area, keys.join('.'), note, atlas);
|
|
64
|
+
};
|
|
65
|
+
if (auth.length > 1) {
|
|
66
|
+
b.add('differs', 'collections', 'auth collections', `${auth.length} auth collections (${auth.map((c) => (0, record_set_1.str)(c.name)).join(', ')}): Atlas has one user pool per instance. Their records are imported together, each tagged with private_metadata.pocketbase_collection; use app roles to tell them apart.`, 'users');
|
|
67
|
+
}
|
|
68
|
+
// ── password and identity fields ──
|
|
69
|
+
const pa = (0, record_set_1.isObj)(o.passwordAuth) ? o.passwordAuth : undefined;
|
|
70
|
+
if (pa) {
|
|
71
|
+
const on = pa.enabled !== false;
|
|
72
|
+
b.set('strategies.password', on);
|
|
73
|
+
if (on)
|
|
74
|
+
put('mapped', ['passwordAuth', 'enabled'], 'Password sign-in. Imported bcrypt hashes verify as they are and are upgraded to Argon2id.', 'auth_config.strategies.password');
|
|
75
|
+
const fields = (0, record_set_1.strs)(pa.identityFields);
|
|
76
|
+
if (fields.includes('username')) {
|
|
77
|
+
b.set('strategies.username', true);
|
|
78
|
+
put('mapped', ['passwordAuth', 'identityFields'], 'Username sign-in.', 'auth_config.strategies.username');
|
|
79
|
+
}
|
|
80
|
+
const other = fields.filter((f) => f !== 'email' && f !== 'username');
|
|
81
|
+
if (other.length)
|
|
82
|
+
put('manual', ['passwordAuth', 'identityFields'], `Sign-in by ${other.join(', ')} has no Atlas equivalent: those users sign in by email or username.`);
|
|
83
|
+
}
|
|
84
|
+
else if (typeof o.allowEmailAuth === 'boolean' || typeof o.allowUsernameAuth === 'boolean') {
|
|
85
|
+
// ≤0.22
|
|
86
|
+
const email = o.allowEmailAuth === true;
|
|
87
|
+
const username = o.allowUsernameAuth === true;
|
|
88
|
+
b.set('strategies.password', email || username);
|
|
89
|
+
if (email || username)
|
|
90
|
+
put('mapped', ['allowEmailAuth'], 'Password sign-in. Imported bcrypt hashes verify as they are and are upgraded to Argon2id.', 'auth_config.strategies.password');
|
|
91
|
+
if (username) {
|
|
92
|
+
b.set('strategies.username', true);
|
|
93
|
+
put('mapped', ['allowUsernameAuth'], 'Username sign-in.', 'auth_config.strategies.username');
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
const minPw = typeof o.minPasswordLength === 'number' ? o.minPasswordLength : passwordFieldMin(main);
|
|
97
|
+
if (minPw !== undefined) {
|
|
98
|
+
b.set('passwordPolicy.minLength', Math.max(8, minPw));
|
|
99
|
+
put(minPw < 8 ? 'differs' : 'mapped', typeof o.minPasswordLength === 'number' ? ['minPasswordLength'] : ['fields', 'password', 'min'], minPw < 8 ? `PocketBase allows ${minPw}; Atlas requires at least 8 (existing passwords still sign in).` : `${minPw} characters minimum.`, 'auth_config.passwordPolicy.minLength');
|
|
100
|
+
}
|
|
101
|
+
if (o.onlyVerified === true) {
|
|
102
|
+
b.set('requireEmailVerification', true);
|
|
103
|
+
put('mapped', ['onlyVerified'], 'Only verified users may sign in.', 'auth_config.requireEmailVerification');
|
|
104
|
+
}
|
|
105
|
+
if ((0, record_set_1.strs)(o.onlyEmailDomains).length)
|
|
106
|
+
put('manual', ['onlyEmailDomains'], `Sign-up limited to ${(0, record_set_1.strs)(o.onlyEmailDomains).join(', ')}: add these domains to the Atlas allowlist (restrictions.allowlistOnly).`, 'auth_config.restrictions');
|
|
107
|
+
if ((0, record_set_1.strs)(o.exceptEmailDomains).length)
|
|
108
|
+
put('manual', ['exceptEmailDomains'], `Blocked domains ${(0, record_set_1.strs)(o.exceptEmailDomains).join(', ')}: add them to the Atlas blocklist.`, 'blocklist');
|
|
109
|
+
// ── OAuth2 ──
|
|
110
|
+
const oauth = (0, record_set_1.isObj)(o.oauth2) ? o.oauth2 : undefined;
|
|
111
|
+
if (oauth?.enabled === true || o.allowOAuth2Auth === true) {
|
|
112
|
+
const providers = (0, record_set_1.objs)(oauth?.providers);
|
|
113
|
+
for (const p of providers) {
|
|
114
|
+
const pname = (0, record_set_1.str)(p.name);
|
|
115
|
+
if (!pname)
|
|
116
|
+
continue;
|
|
117
|
+
const atlas = (0, translate_kit_1.socialKey)(pname);
|
|
118
|
+
const w = where('oauth2', 'providers', pname);
|
|
119
|
+
if (atlas) {
|
|
120
|
+
b.socialProvider({ atlasKey: atlas, vendorName: pname, area: `${area} oauth2`, setting: `oauth2.providers.${pname}`, clientId: (0, record_set_1.str)(p.clientId) });
|
|
121
|
+
if (w.l)
|
|
122
|
+
Object.assign(b.report[b.report.length - 1], { file: w.f, line: w.l });
|
|
123
|
+
}
|
|
124
|
+
else {
|
|
125
|
+
(0, source_lines_1.addAt)(b, w.f, w.l, 'manual', `${area} oauth2`, `oauth2.providers.${pname}`, `"${pname}" is not an Atlas built-in provider: add it as a custom OAuth/OIDC provider with the same client id${(0, record_set_1.str)(p.clientId) ? ` (${(0, record_set_1.str)(p.clientId)})` : ''} and authorization / token / userinfo URLs.`, 'custom_oauth_providers');
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
if (!providers.length)
|
|
129
|
+
put('manual', ['allowOAuth2Auth'], 'OAuth2 is on but the providers live in the app settings (≤0.22): add each one in the Atlas dashboard with the same client id so imported links keep working.', 'oauth_providers');
|
|
130
|
+
const mapped = (0, record_set_1.isObj)(oauth?.mappedFields) ? oauth.mappedFields : undefined;
|
|
131
|
+
if (mapped && Object.values(mapped).some((v) => (0, record_set_1.str)(v)))
|
|
132
|
+
put('differs', ['oauth2', 'mappedFields'], 'PocketBase copies provider fields onto the record; Atlas fills first/last name and image from the provider profile automatically.', 'user profile');
|
|
133
|
+
}
|
|
134
|
+
// ── OTP and MFA ──
|
|
135
|
+
const otp = (0, record_set_1.isObj)(o.otp) ? o.otp : undefined;
|
|
136
|
+
if (otp?.enabled === true) {
|
|
137
|
+
b.set('strategies.emailCode', true);
|
|
138
|
+
put('mapped', ['otp', 'enabled'], 'One-time email codes become Atlas email-code sign-in.', 'auth_config.strategies.emailCode');
|
|
139
|
+
if (typeof otp.duration === 'number')
|
|
140
|
+
put('differs', ['otp', 'duration'], `Codes live ${otp.duration} s in PocketBase; set verification.emailCode.ttlMinutes (whole minutes).`, 'auth_config.verification.emailCode.ttlMinutes');
|
|
141
|
+
if (typeof otp.length === 'number' && otp.length !== 6)
|
|
142
|
+
put('differs', ['otp', 'length'], `PocketBase sends ${otp.length}-digit codes; Atlas's length is set in verification.emailCode.length.`, 'auth_config.verification.emailCode.length');
|
|
143
|
+
}
|
|
144
|
+
const mfa = (0, record_set_1.isObj)(o.mfa) ? o.mfa : undefined;
|
|
145
|
+
if (mfa?.enabled === true) {
|
|
146
|
+
b.set('mfaPolicy', (0, record_set_1.str)(mfa.rule) ? 'optional' : 'required');
|
|
147
|
+
put('differs', ['mfa', 'enabled'], `PocketBase MFA asks for a second, different sign-in method (password then OTP)${(0, record_set_1.str)(mfa.rule) ? ` when "${(0, record_set_1.str)(mfa.rule)}" matches` : ''}. Atlas MFA is an enrolled second factor (authenticator app, SMS, passkey or email code): users enrol one after the move.`, 'auth_config.mfaPolicy');
|
|
148
|
+
}
|
|
149
|
+
// ── tokens, rules, emails ──
|
|
150
|
+
const token = (0, record_set_1.isObj)(o.authToken) ? o.authToken : undefined;
|
|
151
|
+
if (typeof token?.duration === 'number' && token.duration > 0) {
|
|
152
|
+
const ms = (0, translate_kit_1.clampSessionMs)(token.duration * 1000);
|
|
153
|
+
b.set('session.absoluteMs', ms);
|
|
154
|
+
put(ms === token.duration * 1000 ? 'mapped' : 'differs', ['authToken', 'duration'], `Auth tokens last ${token.duration} s; Atlas sessions last as long (and refresh short-lived session tokens on their own). The token secret is not copied.`, 'auth_config.session.absoluteMs');
|
|
155
|
+
}
|
|
156
|
+
if ((0, record_set_1.str)(o.authRule))
|
|
157
|
+
put('manual', ['authRule'], `Sign-in is limited by the rule "${(0, record_set_1.str)(o.authRule)}": express it as an Atlas pre-sign-in action or restriction.`, 'actions');
|
|
158
|
+
if ((0, record_set_1.str)(o.manageRule))
|
|
159
|
+
put('manual', ['manageRule'], `"${(0, record_set_1.str)(o.manageRule)}" may manage other users: give those users an Atlas app role with the users:write permission.`, 'roles');
|
|
160
|
+
if ((0, record_set_1.isObj)(o.authAlert) && o.authAlert.enabled === true)
|
|
161
|
+
put('manual', ['authAlert', 'enabled'], 'New-device sign-in alerts: enable Atlas\'s new sign-in notification email (Emails).');
|
|
162
|
+
for (const tpl of ['verificationTemplate', 'resetPasswordTemplate', 'confirmEmailChangeTemplate']) {
|
|
163
|
+
if ((0, record_set_1.isObj)(o[tpl]) && (0, record_set_1.str)(o[tpl].body))
|
|
164
|
+
put('manual', [tpl], 'Custom email template: recreate it in Atlas Emails (Atlas variables differ).', 'email_templates');
|
|
165
|
+
}
|
|
166
|
+
const vars = { collection: name };
|
|
167
|
+
if (snap.url)
|
|
168
|
+
vars.url = snap.url.replace(/\/+$/, '');
|
|
169
|
+
return b.result(file?.path ?? `pocketbase collection ${name}`, {
|
|
170
|
+
bridge: { preset: 'pocketbase', vars: { ...vars } },
|
|
171
|
+
lazy: { preset: 'pocketbase', config: { ...vars } },
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
/** v0.23+ keeps the minimum length on the password field. */
|
|
175
|
+
function passwordFieldMin(c) {
|
|
176
|
+
const fields = typeof c.fields === 'string' ? safeJson(c.fields) : c.fields;
|
|
177
|
+
const pw = (0, record_set_1.objs)(fields).find((f) => (0, record_set_1.str)(f.name) === 'password' && (0, record_set_1.str)(f.type) === 'password');
|
|
178
|
+
return typeof pw?.min === 'number' && pw.min > 0 ? pw.min : undefined;
|
|
179
|
+
}
|
|
180
|
+
//# sourceMappingURL=pocketbase-config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pocketbase-config.js","sourceRoot":"","sources":["../../../src/migrate/export/pocketbase-config.ts"],"names":[],"mappings":";;AA2BA,sDAKC;AAgBD,8DAkIC;AAjLD,6CAAgE;AAChE,iDAA+C;AAC/C,mDAA2E;AAwB3E,SAAgB,qBAAqB,CAAC,IAAY;IAChD,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAY,CAAC;IAC3C,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC;QAAE,OAAO,IAAA,iBAAI,EAAC,MAAM,CAAC,CAAC;IAC/C,IAAI,IAAA,kBAAK,EAAC,MAAM,CAAC,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,WAAW,CAAC;QAAE,OAAO,IAAA,iBAAI,EAAC,MAAM,CAAC,WAAW,CAAC,CAAC;IACxF,MAAM,IAAI,KAAK,CAAC,6EAA6E,CAAC,CAAC;AACjG,CAAC;AAED,4EAA4E;AAC5E,SAAS,SAAS,CAAC,CAAM;IACvB,MAAM,CAAC,GAAG,OAAO,CAAC,CAAC,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC;IAC1E,OAAO,EAAE,GAAG,CAAC,IAAA,kBAAK,EAAC,CAAC,CAAC,CAAC,CAAC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|
|
5
|
+
* PocketBase's REST API never returns a password hash or a token key (they
|
|
6
|
+
* are stripped from every record, superusers included), so the export reads
|
|
7
|
+
* the SQLite database: `pb_data/data.db` directly through Node's built-in
|
|
8
|
+
* `node:sqlite` (read-only; stop the server or copy the file with its -wal
|
|
9
|
+
* and -shm first), or a dump directory the owner made with `sqlite3 -json`
|
|
10
|
+
* (one `<table>.json` per table: `_collections`, each auth collection, and
|
|
11
|
+
* `_externalAuths`). Nothing connects to a running PocketBase.
|
|
12
|
+
*
|
|
13
|
+
* What moves: every auth collection's records (v0.23+ `password`, ≤0.22
|
|
14
|
+
* `passwordHash`, both Go bcrypt), email + verified, username, name, avatar
|
|
15
|
+
* (as a file URL when the PocketBase URL is given), custom fields as public
|
|
16
|
+
* metadata, and OAuth2 links from `_externalAuths`. Superusers (`_superusers`,
|
|
17
|
+
* or ≤0.22 `_admins`) stay behind unless asked for. `_mfas` and `_otps` hold
|
|
18
|
+
* one-time sign-in state, not enrolments: nothing to carry. Tokens are HS256
|
|
19
|
+
* signed with a per-record key, so the bridge asks PocketBase about them
|
|
20
|
+
* (`pocketbase` bridge preset) instead of importing sessions.
|
|
21
|
+
*/
|
|
22
|
+
export interface PocketBaseTables {
|
|
23
|
+
/** `_collections` rows (`id, name, type, options, fields` or ≤0.22 `schema`). */
|
|
24
|
+
collections: Obj[];
|
|
25
|
+
/** Rows by table name. */
|
|
26
|
+
tables: Map<string, Obj[]>;
|
|
27
|
+
}
|
|
28
|
+
export interface PocketBaseExportOptions {
|
|
29
|
+
/** Auth collections to export (default: every auth collection except `_superusers`). */
|
|
30
|
+
collections?: string[];
|
|
31
|
+
includeSuperusers?: boolean;
|
|
32
|
+
/** The public PocketBase URL, to turn avatar file names into URLs. */
|
|
33
|
+
url?: string;
|
|
34
|
+
/** Shown in the dashboard as where the data came from (a file path, never a credential). */
|
|
35
|
+
origin?: string;
|
|
36
|
+
}
|
|
37
|
+
export declare function exportPocketBase(db: PocketBaseTables, opts?: PocketBaseExportOptions): RecordSet;
|
|
38
|
+
/** PocketBase stores `2024-01-02 03:04:05.123Z`; the bundle wants ISO-8601. */
|
|
39
|
+
export declare function pbTime(v: unknown): string | undefined;
|
|
40
|
+
/**
|
|
41
|
+
* A dump directory: one file per table (`_collections.json`, `users.json`,
|
|
42
|
+
* `_externalAuths.json` …) as `sqlite3 -json` writes it (a JSON array), NDJSON,
|
|
43
|
+
* or CSV with a header row.
|
|
44
|
+
*/
|
|
45
|
+
export declare function readPocketBaseDump(dir: string): PocketBaseTables;
|
|
46
|
+
export declare function parseTable(text: string, ext: string): Obj[];
|
|
47
|
+
/**
|
|
48
|
+
* `pb_data/data.db` through Node's built-in SQLite (Node 22.5+), opened
|
|
49
|
+
* read-only. Reads `_collections`, every auth collection's table and
|
|
50
|
+
* `_externalAuths` — nothing else.
|
|
51
|
+
*/
|
|
52
|
+
export declare function readPocketBaseDb(path: string): Promise<PocketBaseTables>;
|
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.exportPocketBase = exportPocketBase;
|
|
37
|
+
exports.pbTime = pbTime;
|
|
38
|
+
exports.readPocketBaseDump = readPocketBaseDump;
|
|
39
|
+
exports.parseTable = parseTable;
|
|
40
|
+
exports.readPocketBaseDb = readPocketBaseDb;
|
|
41
|
+
const node_fs_1 = require("node:fs");
|
|
42
|
+
const node_path_1 = require("node:path");
|
|
43
|
+
const csv_1 = require("../../import/csv");
|
|
44
|
+
const record_set_1 = require("./record-set");
|
|
45
|
+
/** Fields every auth record has that are not metadata. */
|
|
46
|
+
const SYSTEM_FIELDS = new Set([
|
|
47
|
+
'id', 'email', 'emailVisibility', 'verified', 'password', 'passwordHash', 'tokenKey', 'username', 'name', 'avatar', 'created', 'updated',
|
|
48
|
+
'lastResetSentAt', 'lastVerificationSentAt', 'lastLoginAlertSentAt',
|
|
49
|
+
]);
|
|
50
|
+
function exportPocketBase(db, opts = {}) {
|
|
51
|
+
const set = new record_set_1.RecordSet();
|
|
52
|
+
const auth = db.collections.filter((c) => (0, record_set_1.str)(c.type) === 'auth');
|
|
53
|
+
const wanted = opts.collections?.length ? new Set(opts.collections) : null;
|
|
54
|
+
const chosen = auth.filter((c) => {
|
|
55
|
+
const name = (0, record_set_1.str)(c.name) ?? '';
|
|
56
|
+
if (wanted)
|
|
57
|
+
return wanted.has(name);
|
|
58
|
+
return name !== '_superusers' || opts.includeSuperusers === true;
|
|
59
|
+
});
|
|
60
|
+
if (wanted)
|
|
61
|
+
for (const name of wanted)
|
|
62
|
+
if (!auth.some((c) => (0, record_set_1.str)(c.name) === name))
|
|
63
|
+
set.warn(`"${name}" is not an auth collection in this database and was skipped.`);
|
|
64
|
+
if (!auth.length)
|
|
65
|
+
set.warn('No auth collection found in _collections: is this a PocketBase data.db (or a dump of it)?');
|
|
66
|
+
if (db.tables.has('_admins') && opts.includeSuperusers)
|
|
67
|
+
set.warn('PocketBase ≤0.22 admins (_admins) are not exported: create them again as Atlas instance admins.');
|
|
68
|
+
const userIds = new Set();
|
|
69
|
+
const multiple = chosen.length > 1;
|
|
70
|
+
for (const c of chosen) {
|
|
71
|
+
const name = (0, record_set_1.str)(c.name);
|
|
72
|
+
const collectionId = (0, record_set_1.str)(c.id) ?? name;
|
|
73
|
+
const rows = db.tables.get(name) ?? db.tables.get(name.toLowerCase()) ?? [];
|
|
74
|
+
if (!rows.length)
|
|
75
|
+
set.warn(`The auth collection "${name}" has no rows in the export (was its table dumped?).`);
|
|
76
|
+
for (const r of rows) {
|
|
77
|
+
const id = (0, record_set_1.str)(r.id);
|
|
78
|
+
if (!id)
|
|
79
|
+
continue;
|
|
80
|
+
if (userIds.has(id)) {
|
|
81
|
+
set.omit('user', 'record id already exported from another auth collection');
|
|
82
|
+
continue;
|
|
83
|
+
}
|
|
84
|
+
const user = mapRecord(r, { collection: name, collectionId, url: opts.url, tag: multiple || name !== 'users' });
|
|
85
|
+
if (!user) {
|
|
86
|
+
set.omit('user', 'record without an email or username');
|
|
87
|
+
continue;
|
|
88
|
+
}
|
|
89
|
+
userIds.add(id);
|
|
90
|
+
set.add('user', (0, record_set_1.compact)(user));
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
if (set.list('user').some((u) => !u.password))
|
|
94
|
+
set.warn('Some records have no password hash (OAuth2- or OTP-only users): they keep signing in with those methods.');
|
|
95
|
+
// OAuth2 links: v0.23+ collectionRef/recordRef, ≤0.22 collectionId/recordId.
|
|
96
|
+
for (const e of db.tables.get('_externalauths') ?? db.tables.get('_externalAuths') ?? []) {
|
|
97
|
+
const userId = (0, record_set_1.str)(e.recordRef) ?? (0, record_set_1.str)(e.recordId);
|
|
98
|
+
const provider = (0, record_set_1.str)(e.provider);
|
|
99
|
+
const providerId = (0, record_set_1.str)(e.providerId);
|
|
100
|
+
if (!userId || !provider || !providerId || !userIds.has(userId))
|
|
101
|
+
continue;
|
|
102
|
+
set.add('identity', (0, record_set_1.compact)({ id: (0, record_set_1.str)(e.id), user_id: userId, provider, provider_user_id: providerId, kind: 'oauth' }), `${provider}:${providerId}`);
|
|
103
|
+
}
|
|
104
|
+
const providers = new Set(set.list('identity').map((i) => i.provider));
|
|
105
|
+
set.manifest = { ...set.manifest, origin: opts.origin ?? 'pocketbase data.db', providers: [...providers].sort() };
|
|
106
|
+
set.warn('PocketBase auth tokens are signed per record and cannot be imported: enable the pocketbase bridge preset so signed-in users move without a new sign-in.');
|
|
107
|
+
return set;
|
|
108
|
+
}
|
|
109
|
+
function mapRecord(r, ctx) {
|
|
110
|
+
const email = (0, record_set_1.str)(r.email)?.toLowerCase();
|
|
111
|
+
const username = (0, record_set_1.str)(r.username);
|
|
112
|
+
if (!email && !username)
|
|
113
|
+
return null;
|
|
114
|
+
const hash = (0, record_set_1.str)(r.password) ?? (0, record_set_1.str)(r.passwordHash);
|
|
115
|
+
const avatar = (0, record_set_1.str)(r.avatar);
|
|
116
|
+
const meta = {};
|
|
117
|
+
for (const [k, v] of Object.entries(r)) {
|
|
118
|
+
if (SYSTEM_FIELDS.has(k) || v === null || v === '' || v === undefined)
|
|
119
|
+
continue;
|
|
120
|
+
meta[k] = parseJsonish(v);
|
|
121
|
+
}
|
|
122
|
+
return {
|
|
123
|
+
id: (0, record_set_1.str)(r.id),
|
|
124
|
+
emails: email ? [{ email, verified: truthy(r.verified), primary: true }] : undefined,
|
|
125
|
+
username,
|
|
126
|
+
name: (0, record_set_1.str)(r.name),
|
|
127
|
+
image_url: avatar && ctx.url ? `${ctx.url.replace(/\/+$/, '')}/api/files/${encodeURIComponent(ctx.collectionId)}/${encodeURIComponent((0, record_set_1.str)(r.id))}/${encodeURIComponent(avatar)}` : undefined,
|
|
128
|
+
password: hash && /^\$2[aby]\$\d{2}\$/.test(hash) ? { algorithm: 'auto', hash } : undefined,
|
|
129
|
+
public_metadata: Object.keys(meta).length ? meta : undefined,
|
|
130
|
+
private_metadata: ctx.tag ? { pocketbase_collection: ctx.collection } : undefined,
|
|
131
|
+
created_at: pbTime(r.created),
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
/** PocketBase stores `2024-01-02 03:04:05.123Z`; the bundle wants ISO-8601. */
|
|
135
|
+
function pbTime(v) {
|
|
136
|
+
const s = (0, record_set_1.str)(v);
|
|
137
|
+
if (!s)
|
|
138
|
+
return undefined;
|
|
139
|
+
return /^\d{4}-\d{2}-\d{2} \d/.test(s) ? s.replace(' ', 'T') : s;
|
|
140
|
+
}
|
|
141
|
+
const truthy = (v) => v === true || v === 1 || v === '1' || v === 'true';
|
|
142
|
+
/** JSON / multi-select / relation fields come out of SQLite as JSON text. */
|
|
143
|
+
function parseJsonish(v) {
|
|
144
|
+
if (typeof v !== 'string')
|
|
145
|
+
return v;
|
|
146
|
+
const t = v.trim();
|
|
147
|
+
if ((t.startsWith('{') && t.endsWith('}')) || (t.startsWith('[') && t.endsWith(']'))) {
|
|
148
|
+
try {
|
|
149
|
+
return JSON.parse(t);
|
|
150
|
+
}
|
|
151
|
+
catch {
|
|
152
|
+
return v;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
return v;
|
|
156
|
+
}
|
|
157
|
+
// ── readers ─────────────────────────────────────────────────────────────────
|
|
158
|
+
function tablesFrom(byName) {
|
|
159
|
+
const collections = (byName.get('_collections') ?? []).map((c) => ({ ...c, options: parseJsonish(c.options), fields: parseJsonish(c.fields ?? c.schema) }));
|
|
160
|
+
return { collections, tables: byName };
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* A dump directory: one file per table (`_collections.json`, `users.json`,
|
|
164
|
+
* `_externalAuths.json` …) as `sqlite3 -json` writes it (a JSON array), NDJSON,
|
|
165
|
+
* or CSV with a header row.
|
|
166
|
+
*/
|
|
167
|
+
function readPocketBaseDump(dir) {
|
|
168
|
+
const byName = new Map();
|
|
169
|
+
for (const file of (0, node_fs_1.readdirSync)(dir).sort()) {
|
|
170
|
+
const path = (0, node_path_1.join)(dir, file);
|
|
171
|
+
const ext = (0, node_path_1.extname)(file).toLowerCase();
|
|
172
|
+
if (!(0, node_fs_1.statSync)(path).isFile() || !['.json', '.ndjson', '.jsonl', '.csv'].includes(ext))
|
|
173
|
+
continue;
|
|
174
|
+
const rows = parseTable((0, node_fs_1.readFileSync)(path, 'utf8'), ext);
|
|
175
|
+
const name = (0, node_path_1.basename)(file, (0, node_path_1.extname)(file));
|
|
176
|
+
byName.set(name, rows);
|
|
177
|
+
if (name.toLowerCase() !== name)
|
|
178
|
+
byName.set(name.toLowerCase(), rows);
|
|
179
|
+
}
|
|
180
|
+
return tablesFrom(byName);
|
|
181
|
+
}
|
|
182
|
+
function parseTable(text, ext) {
|
|
183
|
+
if (ext === '.csv')
|
|
184
|
+
return (0, csv_1.parseCsv)(text);
|
|
185
|
+
if (ext === '.ndjson' || ext === '.jsonl') {
|
|
186
|
+
return text
|
|
187
|
+
.split(/\r?\n/)
|
|
188
|
+
.map((l) => l.trim())
|
|
189
|
+
.filter(Boolean)
|
|
190
|
+
.map((l) => JSON.parse(l))
|
|
191
|
+
.filter(record_set_1.isObj);
|
|
192
|
+
}
|
|
193
|
+
const t = text.trim();
|
|
194
|
+
if (!t)
|
|
195
|
+
return [];
|
|
196
|
+
const parsed = JSON.parse(t);
|
|
197
|
+
if (Array.isArray(parsed))
|
|
198
|
+
return parsed.filter(record_set_1.isObj);
|
|
199
|
+
if ((0, record_set_1.isObj)(parsed) && Array.isArray(parsed.rows))
|
|
200
|
+
return parsed.rows.filter(record_set_1.isObj);
|
|
201
|
+
if ((0, record_set_1.isObj)(parsed) && Array.isArray(parsed.items))
|
|
202
|
+
return parsed.items.filter(record_set_1.isObj);
|
|
203
|
+
return [];
|
|
204
|
+
}
|
|
205
|
+
/**
|
|
206
|
+
* `pb_data/data.db` through Node's built-in SQLite (Node 22.5+), opened
|
|
207
|
+
* read-only. Reads `_collections`, every auth collection's table and
|
|
208
|
+
* `_externalAuths` — nothing else.
|
|
209
|
+
*/
|
|
210
|
+
async function readPocketBaseDb(path) {
|
|
211
|
+
const spec = 'node:sqlite';
|
|
212
|
+
let mod;
|
|
213
|
+
try {
|
|
214
|
+
mod = (await Promise.resolve(`${spec}`).then(s => __importStar(require(s))));
|
|
215
|
+
}
|
|
216
|
+
catch {
|
|
217
|
+
throw new Error('This Node.js has no built-in SQLite (node:sqlite, Node 22.5+). Dump the tables with sqlite3 -json instead and pass the folder with --set pocketbase-dump=<dir>.');
|
|
218
|
+
}
|
|
219
|
+
const db = new mod.DatabaseSync(path, { readOnly: true });
|
|
220
|
+
try {
|
|
221
|
+
const all = (sql) => db.prepare(sql).all().filter(record_set_1.isObj);
|
|
222
|
+
const has = new Set(all("SELECT name FROM sqlite_master WHERE type = 'table'").map((r) => (0, record_set_1.str)(r.name)).filter((n) => !!n));
|
|
223
|
+
if (!has.has('_collections'))
|
|
224
|
+
throw new Error(`${path} has no _collections table: it is not a PocketBase data.db.`);
|
|
225
|
+
const byName = new Map();
|
|
226
|
+
const q = (name) => `"${name.replace(/"/g, '""')}"`;
|
|
227
|
+
byName.set('_collections', all('SELECT * FROM _collections'));
|
|
228
|
+
for (const c of byName.get('_collections')) {
|
|
229
|
+
const name = (0, record_set_1.str)(c.name);
|
|
230
|
+
if (name && (0, record_set_1.str)(c.type) === 'auth' && has.has(name))
|
|
231
|
+
byName.set(name, all(`SELECT * FROM ${q(name)}`));
|
|
232
|
+
}
|
|
233
|
+
if (has.has('_externalAuths'))
|
|
234
|
+
byName.set('_externalAuths', all('SELECT * FROM _externalAuths'));
|
|
235
|
+
if (has.has('_admins'))
|
|
236
|
+
byName.set('_admins', []);
|
|
237
|
+
return tablesFrom(byName);
|
|
238
|
+
}
|
|
239
|
+
finally {
|
|
240
|
+
db.close();
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
//# sourceMappingURL=pocketbase.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pocketbase.js","sourceRoot":"","sources":["../../../src/migrate/export/pocketbase.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkDA,4CAmDC;AA2BD,wBAIC;AA8BD,gDAYC;AAED,gCAiBC;AAYD,4CA0BC;AAvOD,qCAA8D;AAC9D,yCAAoD;AAEpD,0CAA4C;AAC5C,6CAAwE;AAwCxE,0DAA0D;AAC1D,MAAM,aAAa,GAAG,IAAI,GAAG,CAAC;IAC5B,IAAI,EAAE,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAE,UAAU,EAAE,cAAc,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS;IACxI,iBAAiB,EAAE,wBAAwB,EAAE,sBAAsB;CACpE,CAAC,CAAC;AAEH,SAAgB,gBAAgB,CAAC,EAAoB,EAAE,OAAgC,EAAE;IACvF,MAAM,GAAG,GAAG,IAAI,sBAAS,EAAE,CAAC;IAC5B,MAAM,IAAI,GAAG,EAAE,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAA,gBAAG,EAAC,CAAC,CAAC,IAAI,CAAC,KAAK,MAAM,CAAC,CAAC;IAClE,MAAM,MAAM,GAAG,IAAI,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC,CAAC,IAAI,GAAG,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CAAC;IACb,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { CredentialSpec, PluginContext } from '../framework/plugin';
|
|
2
|
+
/**
|
|
3
|
+
* A config file the vendor keeps in the app's repository (appwrite.json,
|
|
4
|
+
* nhost/nhost.toml, pb_schema.json): the path named by the flag / env var, or
|
|
5
|
+
* the first of `candidates` that exists in the project folder. The report
|
|
6
|
+
* shows the path relative to the project.
|
|
7
|
+
*/
|
|
8
|
+
export declare function projectFile(p: PluginContext, spec: CredentialSpec, candidates: string[]): {
|
|
9
|
+
path: string;
|
|
10
|
+
text: string;
|
|
11
|
+
} | undefined;
|
|
12
|
+
/** A folder the owner named (a table dump), or the first candidate folder that exists in the project. */
|
|
13
|
+
export declare function projectDir(p: PluginContext, spec: CredentialSpec, candidates?: string[]): string | undefined;
|
|
14
|
+
/** `--set name=true` / an env var set to true, 1 or yes. */
|
|
15
|
+
export declare function truthyCredential(p: PluginContext, spec: CredentialSpec): boolean;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.projectFile = projectFile;
|
|
4
|
+
exports.projectDir = projectDir;
|
|
5
|
+
exports.truthyCredential = truthyCredential;
|
|
6
|
+
const node_fs_1 = require("node:fs");
|
|
7
|
+
const node_path_1 = require("node:path");
|
|
8
|
+
const plugin_kit_1 = require("./plugin-kit");
|
|
9
|
+
/**
|
|
10
|
+
* A config file the vendor keeps in the app's repository (appwrite.json,
|
|
11
|
+
* nhost/nhost.toml, pb_schema.json): the path named by the flag / env var, or
|
|
12
|
+
* the first of `candidates` that exists in the project folder. The report
|
|
13
|
+
* shows the path relative to the project.
|
|
14
|
+
*/
|
|
15
|
+
function projectFile(p, spec, candidates) {
|
|
16
|
+
const named = p.credential({ ...spec, required: false });
|
|
17
|
+
if (named)
|
|
18
|
+
return { path: named, text: (0, plugin_kit_1.localFile)(p, spec, 'text') };
|
|
19
|
+
for (const c of candidates) {
|
|
20
|
+
const full = (0, node_path_1.resolve)(p.project, c);
|
|
21
|
+
if ((0, node_fs_1.existsSync)(full) && (0, node_fs_1.statSync)(full).isFile())
|
|
22
|
+
return { path: (0, node_path_1.relative)((0, node_path_1.resolve)(p.project), full) || c, text: p.ctx.readFile(full) };
|
|
23
|
+
}
|
|
24
|
+
return undefined;
|
|
25
|
+
}
|
|
26
|
+
/** A folder the owner named (a table dump), or the first candidate folder that exists in the project. */
|
|
27
|
+
function projectDir(p, spec, candidates = []) {
|
|
28
|
+
const named = p.credential({ ...spec, required: false });
|
|
29
|
+
if (named)
|
|
30
|
+
return (0, node_path_1.resolve)(named);
|
|
31
|
+
for (const c of candidates) {
|
|
32
|
+
const full = (0, node_path_1.join)((0, node_path_1.resolve)(p.project), c);
|
|
33
|
+
if ((0, node_fs_1.existsSync)(full) && (0, node_fs_1.statSync)(full).isDirectory())
|
|
34
|
+
return full;
|
|
35
|
+
}
|
|
36
|
+
return undefined;
|
|
37
|
+
}
|
|
38
|
+
/** `--set name=true` / an env var set to true, 1 or yes. */
|
|
39
|
+
function truthyCredential(p, spec) {
|
|
40
|
+
const v = p.credential({ ...spec, required: false });
|
|
41
|
+
return v !== undefined && /^(1|true|yes|on)$/i.test(v.trim());
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=project-files.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"project-files.js","sourceRoot":"","sources":["../../../src/migrate/export/project-files.ts"],"names":[],"mappings":";;AAWA,kCAQC;AAGD,gCAQC;AAGD,4CAGC;AApCD,qCAA+C;AAC/C,yCAAoD;AAEpD,6CAAyC;AAEzC;;;;;GAKG;AACH,SAAgB,WAAW,CAAC,CAAgB,EAAE,IAAoB,EAAE,UAAoB;IACtF,MAAM,KAAK,GAAG,CAAC,CAAC,UAAU,CAAC,EAAE,GAAG,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC,CAAC;IACzD,IA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BAAgB,CAAC,CAAgB,EAAE,IAAoB;IACrE,MAAM,CAAC,GAAG,CAAC,CAAC,UAAU,CAAC,EAAE,GAAG,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC,CAAC;IACrD,OAAO,CAAC,KAAK,SAAS,IAAI,oBAAoB,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;AAChE,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { TranslationResult } from '../framework/plugin';
|
|
2
|
+
import { type VendorHttp } from './vendor-http';
|
|
3
|
+
/**
|
|
4
|
+
* `atlas migrate propelauth config` — what PropelAuth's backend API exposes
|
|
5
|
+
* about a project's configuration: the custom role mappings, and which
|
|
6
|
+
* organizations have SAML set up. Login methods, password and MFA rules,
|
|
7
|
+
* session lifetimes, branding and the hosted-page settings live only in the
|
|
8
|
+
* PropelAuth dashboard: the report lists each as manual with where to find it.
|
|
9
|
+
*/
|
|
10
|
+
export interface PropelauthConfigSnapshot {
|
|
11
|
+
authUrl: string;
|
|
12
|
+
/** Names of the custom role mappings (shape UNCONFIRMED: tolerated as objects or bare names). */
|
|
13
|
+
roleMappings: string[];
|
|
14
|
+
orgs: number;
|
|
15
|
+
samlOrgs: number;
|
|
16
|
+
}
|
|
17
|
+
export declare function fetchPropelauthConfig(http: VendorHttp, authUrl: string): Promise<PropelauthConfigSnapshot>;
|
|
18
|
+
export declare function translatePropelauthConfig(snap: PropelauthConfigSnapshot): TranslationResult;
|