payload-auth 1.0.2 → 1.1.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/dist/better-auth/adapter/index.d.ts +2 -2
- package/dist/better-auth/adapter/index.d.ts.map +1 -1
- package/dist/better-auth/adapter/index.js +115 -69
- package/dist/better-auth/adapter/transform/index.d.ts +22 -10
- package/dist/better-auth/adapter/transform/index.d.ts.map +1 -1
- package/dist/better-auth/adapter/transform/index.js +387 -96
- package/dist/better-auth/adapter/types.d.ts +2 -1
- package/dist/better-auth/adapter/types.d.ts.map +1 -1
- package/dist/better-auth/adapter/types.js +1 -1
- package/dist/better-auth/plugin/helpers/check-passkey-plugin.d.ts +3 -0
- package/dist/better-auth/plugin/helpers/check-passkey-plugin.d.ts.map +1 -0
- package/dist/better-auth/plugin/helpers/check-passkey-plugin.js +5 -0
- package/dist/better-auth/plugin/helpers/check-username-plugin.d.ts +3 -0
- package/dist/better-auth/plugin/helpers/check-username-plugin.d.ts.map +1 -0
- package/dist/better-auth/plugin/helpers/check-username-plugin.js +5 -0
- package/dist/better-auth/plugin/helpers/generate-verify-email-url.d.ts.map +1 -1
- package/dist/better-auth/plugin/helpers/generate-verify-email-url.js +8 -8
- package/dist/better-auth/plugin/helpers/get-admin-access.d.ts +8 -0
- package/dist/better-auth/plugin/helpers/get-admin-access.d.ts.map +1 -0
- package/dist/better-auth/plugin/helpers/get-admin-access.js +22 -0
- package/dist/better-auth/plugin/helpers/get-admin-routes.d.ts +14 -0
- package/dist/better-auth/plugin/helpers/get-admin-routes.d.ts.map +1 -0
- package/dist/better-auth/plugin/helpers/get-admin-routes.js +6 -0
- package/dist/better-auth/plugin/helpers/get-all-roles.d.ts +6 -0
- package/dist/better-auth/plugin/helpers/get-all-roles.d.ts.map +1 -0
- package/dist/better-auth/plugin/helpers/get-all-roles.js +20 -0
- package/dist/better-auth/plugin/helpers/get-ip.d.ts +1 -1
- package/dist/better-auth/plugin/helpers/get-ip.d.ts.map +1 -1
- package/dist/better-auth/plugin/helpers/get-ip.js +14 -14
- package/dist/better-auth/plugin/helpers/get-requst-collection.d.ts +3 -0
- package/dist/better-auth/plugin/helpers/get-requst-collection.d.ts.map +1 -0
- package/dist/better-auth/plugin/helpers/get-requst-collection.js +14 -0
- package/dist/better-auth/plugin/helpers/index.d.ts +1 -1
- package/dist/better-auth/plugin/helpers/index.js +2 -2
- package/dist/better-auth/plugin/{lib → helpers}/prepare-session-data.d.ts +3 -3
- package/dist/better-auth/plugin/helpers/prepare-session-data.d.ts.map +1 -0
- package/dist/better-auth/plugin/helpers/prepare-session-data.js +42 -0
- package/dist/better-auth/plugin/helpers/serialize-cookie.d.ts +4 -4
- package/dist/better-auth/plugin/helpers/serialize-cookie.d.ts.map +1 -1
- package/dist/better-auth/plugin/helpers/serialize-cookie.js +34 -34
- package/dist/better-auth/plugin/index.d.ts +7 -7
- package/dist/better-auth/plugin/index.d.ts.map +1 -1
- package/dist/better-auth/plugin/index.js +145 -37
- package/dist/better-auth/plugin/{collections → lib/build-collections}/accounts/hooks/sync-password-to-user.d.ts +1 -1
- package/dist/better-auth/plugin/lib/build-collections/accounts/hooks/sync-password-to-user.d.ts.map +1 -0
- package/dist/better-auth/plugin/lib/build-collections/accounts/hooks/sync-password-to-user.js +47 -0
- package/dist/better-auth/plugin/lib/build-collections/accounts/index.d.ts +7 -0
- package/dist/better-auth/plugin/lib/build-collections/accounts/index.d.ts.map +1 -0
- package/dist/better-auth/plugin/lib/build-collections/accounts/index.js +159 -0
- package/dist/better-auth/plugin/lib/build-collections/admin-invitations/hooks/get-url-after-read.d.ts +6 -0
- package/dist/better-auth/plugin/lib/build-collections/admin-invitations/hooks/get-url-after-read.d.ts.map +1 -0
- package/dist/better-auth/plugin/lib/build-collections/admin-invitations/hooks/get-url-after-read.js +11 -0
- package/dist/better-auth/plugin/lib/build-collections/admin-invitations/hooks/get-url-before-change.d.ts +3 -0
- package/dist/better-auth/plugin/lib/build-collections/admin-invitations/hooks/get-url-before-change.d.ts.map +1 -0
- package/dist/better-auth/plugin/lib/build-collections/admin-invitations/hooks/get-url-before-change.js +8 -0
- package/dist/better-auth/plugin/lib/build-collections/admin-invitations/index.d.ts +7 -0
- package/dist/better-auth/plugin/lib/build-collections/admin-invitations/index.d.ts.map +1 -0
- package/dist/better-auth/plugin/lib/build-collections/admin-invitations/index.js +107 -0
- package/dist/better-auth/plugin/lib/build-collections/api-keys.d.ts +6 -0
- package/dist/better-auth/plugin/lib/build-collections/api-keys.d.ts.map +1 -0
- package/dist/better-auth/plugin/lib/build-collections/api-keys.js +196 -0
- package/dist/better-auth/plugin/lib/build-collections/index.d.ts +12 -0
- package/dist/better-auth/plugin/lib/build-collections/index.d.ts.map +1 -0
- package/dist/better-auth/plugin/lib/build-collections/index.js +96 -0
- package/dist/better-auth/plugin/lib/build-collections/invitations.d.ts +6 -0
- package/dist/better-auth/plugin/lib/build-collections/invitations.d.ts.map +1 -0
- package/dist/better-auth/plugin/lib/build-collections/invitations.js +91 -0
- package/dist/better-auth/plugin/lib/build-collections/jwks.d.ts +6 -0
- package/dist/better-auth/plugin/lib/build-collections/jwks.d.ts.map +1 -0
- package/dist/better-auth/plugin/lib/build-collections/jwks.js +43 -0
- package/dist/better-auth/plugin/lib/build-collections/members.d.ts +6 -0
- package/dist/better-auth/plugin/lib/build-collections/members.d.ts.map +1 -0
- package/dist/better-auth/plugin/lib/build-collections/members.js +71 -0
- package/dist/better-auth/plugin/lib/build-collections/oauth-access-tokens.d.ts +6 -0
- package/dist/better-auth/plugin/lib/build-collections/oauth-access-tokens.d.ts.map +1 -0
- package/dist/better-auth/plugin/lib/build-collections/oauth-access-tokens.js +98 -0
- package/dist/better-auth/plugin/lib/build-collections/oauth-applications.d.ts +6 -0
- package/dist/better-auth/plugin/lib/build-collections/oauth-applications.d.ts.map +1 -0
- package/dist/better-auth/plugin/lib/build-collections/oauth-applications.js +113 -0
- package/dist/better-auth/plugin/lib/build-collections/oauth-consents.d.ts +6 -0
- package/dist/better-auth/plugin/lib/build-collections/oauth-consents.d.ts.map +1 -0
- package/dist/better-auth/plugin/lib/build-collections/oauth-consents.js +67 -0
- package/dist/better-auth/plugin/lib/build-collections/organizations.d.ts +6 -0
- package/dist/better-auth/plugin/lib/build-collections/organizations.d.ts.map +1 -0
- package/dist/better-auth/plugin/lib/build-collections/organizations.js +59 -0
- package/dist/better-auth/plugin/lib/build-collections/passkeys.d.ts +6 -0
- package/dist/better-auth/plugin/lib/build-collections/passkeys.d.ts.map +1 -0
- package/dist/better-auth/plugin/lib/build-collections/passkeys.js +108 -0
- package/dist/better-auth/plugin/lib/build-collections/sessions.d.ts +8 -0
- package/dist/better-auth/plugin/lib/build-collections/sessions.d.ts.map +1 -0
- package/dist/better-auth/plugin/lib/build-collections/sessions.js +123 -0
- package/dist/better-auth/plugin/lib/build-collections/sso-providers.d.ts +6 -0
- package/dist/better-auth/plugin/lib/build-collections/sso-providers.d.ts.map +1 -0
- package/dist/better-auth/plugin/lib/build-collections/sso-providers.js +83 -0
- package/dist/better-auth/plugin/lib/build-collections/teams.d.ts +6 -0
- package/dist/better-auth/plugin/lib/build-collections/teams.d.ts.map +1 -0
- package/dist/better-auth/plugin/lib/build-collections/teams.js +45 -0
- package/dist/better-auth/plugin/lib/build-collections/two-factors.d.ts +6 -0
- package/dist/better-auth/plugin/lib/build-collections/two-factors.d.ts.map +1 -0
- package/dist/better-auth/plugin/lib/build-collections/two-factors.js +56 -0
- package/dist/better-auth/plugin/lib/build-collections/users/better-auth-strategy.d.ts +8 -0
- package/dist/better-auth/plugin/lib/build-collections/users/better-auth-strategy.d.ts.map +1 -0
- package/dist/better-auth/plugin/lib/build-collections/users/better-auth-strategy.js +52 -0
- package/dist/better-auth/plugin/lib/build-collections/users/endpoints/forgot-password.d.ts +3 -0
- package/dist/better-auth/plugin/lib/build-collections/users/endpoints/forgot-password.d.ts.map +1 -0
- package/dist/better-auth/plugin/lib/build-collections/users/endpoints/forgot-password.js +96 -0
- package/dist/better-auth/plugin/lib/build-collections/users/endpoints/generate-invite-url.d.ts +13 -0
- package/dist/better-auth/plugin/lib/build-collections/users/endpoints/generate-invite-url.d.ts.map +1 -0
- package/dist/better-auth/plugin/lib/build-collections/users/endpoints/generate-invite-url.js +67 -0
- package/dist/better-auth/plugin/lib/build-collections/users/endpoints/login.d.ts +4 -0
- package/dist/better-auth/plugin/lib/build-collections/users/endpoints/login.d.ts.map +1 -0
- package/dist/better-auth/plugin/lib/build-collections/users/endpoints/login.js +115 -0
- package/dist/better-auth/plugin/lib/build-collections/users/endpoints/refresh-token.d.ts +3 -0
- package/dist/better-auth/plugin/lib/build-collections/users/endpoints/refresh-token.d.ts.map +1 -0
- package/dist/better-auth/plugin/lib/build-collections/users/endpoints/refresh-token.js +110 -0
- package/dist/better-auth/plugin/lib/build-collections/users/endpoints/reset-password.d.ts +3 -0
- package/dist/better-auth/plugin/lib/build-collections/users/endpoints/reset-password.d.ts.map +1 -0
- package/dist/better-auth/plugin/lib/build-collections/users/endpoints/reset-password.js +62 -0
- package/dist/better-auth/plugin/lib/build-collections/users/endpoints/send-invite-url.d.ts +3 -0
- package/dist/better-auth/plugin/lib/build-collections/users/endpoints/send-invite-url.d.ts.map +1 -0
- package/dist/better-auth/plugin/lib/build-collections/users/endpoints/send-invite-url.js +42 -0
- package/dist/better-auth/plugin/lib/build-collections/users/endpoints/set-admin-role.d.ts +4 -0
- package/dist/better-auth/plugin/lib/build-collections/users/endpoints/set-admin-role.d.ts.map +1 -0
- package/dist/better-auth/plugin/lib/build-collections/users/endpoints/set-admin-role.js +79 -0
- package/dist/better-auth/plugin/lib/build-collections/users/endpoints/signup.d.ts +4 -0
- package/dist/better-auth/plugin/lib/build-collections/users/endpoints/signup.d.ts.map +1 -0
- package/dist/better-auth/plugin/lib/build-collections/users/endpoints/signup.js +153 -0
- package/dist/better-auth/plugin/{collections → lib/build-collections}/users/hooks/after-login.d.ts +1 -1
- package/dist/better-auth/plugin/lib/build-collections/users/hooks/after-login.d.ts.map +1 -0
- package/dist/better-auth/plugin/lib/build-collections/users/hooks/after-login.js +75 -0
- package/dist/better-auth/plugin/{collections → lib/build-collections}/users/hooks/after-logout.d.ts +1 -1
- package/dist/better-auth/plugin/lib/build-collections/users/hooks/after-logout.d.ts.map +1 -0
- package/dist/better-auth/plugin/lib/build-collections/users/hooks/after-logout.js +74 -0
- package/dist/better-auth/plugin/lib/build-collections/users/hooks/before-delete.d.ts +7 -0
- package/dist/better-auth/plugin/lib/build-collections/users/hooks/before-delete.d.ts.map +1 -0
- package/dist/better-auth/plugin/lib/build-collections/users/hooks/before-delete.js +45 -0
- package/dist/better-auth/plugin/{collections → lib/build-collections}/users/hooks/before-login.d.ts +1 -1
- package/dist/better-auth/plugin/lib/build-collections/users/hooks/before-login.d.ts.map +1 -0
- package/dist/better-auth/plugin/lib/build-collections/users/hooks/before-login.js +18 -0
- package/dist/better-auth/plugin/lib/build-collections/users/hooks/on-verified-change.d.ts +3 -0
- package/dist/better-auth/plugin/lib/build-collections/users/hooks/on-verified-change.d.ts.map +1 -0
- package/dist/better-auth/plugin/lib/build-collections/users/hooks/on-verified-change.js +14 -0
- package/dist/better-auth/plugin/{collections → lib/build-collections}/users/hooks/sync-account.d.ts +1 -1
- package/dist/better-auth/plugin/lib/build-collections/users/hooks/sync-account.d.ts.map +1 -0
- package/dist/better-auth/plugin/lib/build-collections/users/hooks/sync-account.js +82 -0
- package/dist/better-auth/plugin/lib/build-collections/users/index.d.ts +8 -0
- package/dist/better-auth/plugin/lib/build-collections/users/index.d.ts.map +1 -0
- package/dist/better-auth/plugin/lib/build-collections/users/index.js +345 -0
- package/dist/better-auth/plugin/lib/build-collections/utils/get-timestamp-fields.d.ts +8 -0
- package/dist/better-auth/plugin/lib/build-collections/utils/get-timestamp-fields.d.ts.map +1 -0
- package/dist/better-auth/plugin/lib/build-collections/utils/get-timestamp-fields.js +31 -0
- package/dist/better-auth/plugin/lib/{payload-access.d.ts → build-collections/utils/payload-access.d.ts} +1 -1
- package/dist/better-auth/plugin/lib/build-collections/utils/payload-access.d.ts.map +1 -0
- package/dist/better-auth/plugin/lib/build-collections/utils/payload-access.js +64 -0
- package/dist/better-auth/plugin/lib/build-collections/verifications.d.ts +7 -0
- package/dist/better-auth/plugin/lib/build-collections/verifications.d.ts.map +1 -0
- package/dist/better-auth/plugin/lib/build-collections/verifications.js +63 -0
- package/dist/better-auth/plugin/lib/{config.d.ts → constants.d.ts} +13 -1
- package/dist/better-auth/plugin/lib/constants.d.ts.map +1 -0
- package/dist/better-auth/plugin/lib/constants.js +56 -0
- package/dist/better-auth/plugin/lib/get-payload-auth.d.ts +2 -2
- package/dist/better-auth/plugin/lib/get-payload-auth.d.ts.map +1 -1
- package/dist/better-auth/plugin/lib/get-payload-auth.js +2 -2
- package/dist/better-auth/plugin/lib/get-required-collection-slugs.d.ts +4 -4
- package/dist/better-auth/plugin/lib/get-required-collection-slugs.d.ts.map +1 -1
- package/dist/better-auth/plugin/lib/get-required-collection-slugs.js +26 -43
- package/dist/better-auth/plugin/lib/init-better-auth.d.ts +4 -3
- package/dist/better-auth/plugin/lib/init-better-auth.d.ts.map +1 -1
- package/dist/better-auth/plugin/lib/init-better-auth.js +7 -7
- package/dist/better-auth/plugin/lib/sanitize-better-auth-options/admin-plugin.d.ts +3 -0
- package/dist/better-auth/plugin/lib/sanitize-better-auth-options/admin-plugin.d.ts.map +1 -0
- package/dist/better-auth/plugin/lib/sanitize-better-auth-options/admin-plugin.js +8 -0
- package/dist/better-auth/plugin/lib/sanitize-better-auth-options/api-key-plugin.d.ts +2 -0
- package/dist/better-auth/plugin/lib/sanitize-better-auth-options/api-key-plugin.d.ts.map +1 -0
- package/dist/better-auth/plugin/lib/sanitize-better-auth-options/api-key-plugin.js +17 -0
- package/dist/better-auth/plugin/lib/sanitize-better-auth-options/index.d.ts +10 -0
- package/dist/better-auth/plugin/lib/sanitize-better-auth-options/index.d.ts.map +1 -0
- package/dist/better-auth/plugin/lib/sanitize-better-auth-options/index.js +118 -0
- package/dist/better-auth/plugin/lib/sanitize-better-auth-options/oidc-plugin.d.ts +2 -0
- package/dist/better-auth/plugin/lib/sanitize-better-auth-options/oidc-plugin.d.ts.map +1 -0
- package/dist/better-auth/plugin/lib/sanitize-better-auth-options/oidc-plugin.js +58 -0
- package/dist/better-auth/plugin/lib/sanitize-better-auth-options/organizations-plugin.d.ts +2 -0
- package/dist/better-auth/plugin/lib/sanitize-better-auth-options/organizations-plugin.d.ts.map +1 -0
- package/dist/better-auth/plugin/lib/sanitize-better-auth-options/organizations-plugin.js +86 -0
- package/dist/better-auth/plugin/lib/sanitize-better-auth-options/passkey-plugin.d.ts +2 -0
- package/dist/better-auth/plugin/lib/sanitize-better-auth-options/passkey-plugin.d.ts.map +1 -0
- package/dist/better-auth/plugin/lib/sanitize-better-auth-options/passkey-plugin.js +17 -0
- package/dist/better-auth/plugin/lib/sanitize-better-auth-options/sso-plugin.d.ts +2 -0
- package/dist/better-auth/plugin/lib/sanitize-better-auth-options/sso-plugin.d.ts.map +1 -0
- package/dist/better-auth/plugin/lib/sanitize-better-auth-options/sso-plugin.js +17 -0
- package/dist/better-auth/plugin/lib/{ensure-password-set-before-create.d.ts → sanitize-better-auth-options/utils/ensure-password-set-before-create.d.ts} +1 -1
- package/dist/better-auth/plugin/lib/sanitize-better-auth-options/utils/ensure-password-set-before-create.d.ts.map +1 -0
- package/dist/better-auth/plugin/lib/sanitize-better-auth-options/utils/ensure-password-set-before-create.js +23 -0
- package/dist/better-auth/plugin/lib/sanitize-better-auth-options/utils/password.d.ts.map +1 -0
- package/dist/better-auth/plugin/lib/sanitize-better-auth-options/utils/password.js +62 -0
- package/dist/better-auth/plugin/lib/{respect-save-to-jwt-fields-middleware.d.ts → sanitize-better-auth-options/utils/save-to-jwt-middleware.d.ts} +6 -6
- package/dist/better-auth/plugin/lib/sanitize-better-auth-options/utils/save-to-jwt-middleware.d.ts.map +1 -0
- package/dist/better-auth/plugin/lib/sanitize-better-auth-options/utils/save-to-jwt-middleware.js +30 -0
- package/dist/better-auth/plugin/payload/components/admin-buttons/index.d.ts +8 -0
- package/dist/better-auth/plugin/payload/components/admin-buttons/index.d.ts.map +1 -0
- package/dist/better-auth/plugin/payload/components/admin-buttons/index.js +115 -0
- package/dist/better-auth/plugin/payload/components/admin-buttons/index.scss +31 -0
- package/dist/better-auth/plugin/payload/components/admin-invite-button/index.d.ts +11 -0
- package/dist/better-auth/plugin/payload/components/admin-invite-button/index.d.ts.map +1 -0
- package/dist/better-auth/plugin/payload/components/admin-invite-button/index.js +196 -0
- package/dist/better-auth/plugin/payload/components/admin-invite-button/index.scss +131 -0
- package/dist/better-auth/plugin/payload/components/admin-social-provider-buttons/index.d.ts +14 -0
- package/dist/better-auth/plugin/payload/components/admin-social-provider-buttons/index.d.ts.map +1 -0
- package/dist/better-auth/plugin/payload/components/admin-social-provider-buttons/index.js +111 -0
- package/dist/better-auth/plugin/payload/components/admin-social-provider-buttons/index.scss +51 -0
- package/dist/better-auth/plugin/payload/components/form-header/index.d.ts +9 -0
- package/dist/better-auth/plugin/payload/components/form-header/index.d.ts.map +1 -0
- package/dist/better-auth/plugin/payload/components/form-header/index.js +23 -0
- package/dist/better-auth/plugin/payload/components/form-header/index.scss +8 -0
- package/dist/better-auth/plugin/payload/components/icons.d.ts +9 -0
- package/dist/better-auth/plugin/payload/components/icons.d.ts.map +1 -0
- package/dist/better-auth/plugin/payload/components/icons.js +437 -0
- package/dist/better-auth/plugin/payload/components/logo.d.ts +3 -2
- package/dist/better-auth/plugin/payload/components/logo.d.ts.map +1 -1
- package/dist/better-auth/plugin/payload/components/logo.js +22 -34
- package/dist/better-auth/plugin/payload/components/logout-button.d.ts +6 -0
- package/dist/better-auth/plugin/payload/components/logout-button.d.ts.map +1 -0
- package/dist/better-auth/plugin/payload/components/logout-button.js +27 -0
- package/dist/better-auth/plugin/payload/components/rsc-redirect.d.ts +7 -0
- package/dist/better-auth/plugin/payload/components/rsc-redirect.d.ts.map +1 -0
- package/dist/better-auth/plugin/payload/components/rsc-redirect.js +8 -0
- package/dist/better-auth/plugin/payload/components/styles.css +2 -2
- package/dist/better-auth/plugin/payload/components/token-field.d.ts +5 -0
- package/dist/better-auth/plugin/payload/components/token-field.d.ts.map +1 -0
- package/dist/better-auth/plugin/payload/components/token-field.js +30 -0
- package/dist/better-auth/plugin/payload/exports/client.d.ts +6 -3
- package/dist/better-auth/plugin/payload/exports/client.d.ts.map +1 -1
- package/dist/better-auth/plugin/payload/exports/client.js +7 -4
- package/dist/better-auth/plugin/payload/exports/rsc.d.ts +9 -5
- package/dist/better-auth/plugin/payload/exports/rsc.d.ts.map +1 -1
- package/dist/better-auth/plugin/payload/exports/rsc.js +10 -6
- package/dist/better-auth/plugin/payload/utils/generate-admin-invite-url.d.ts +3 -0
- package/dist/better-auth/plugin/payload/utils/generate-admin-invite-url.d.ts.map +1 -0
- package/dist/better-auth/plugin/payload/utils/generate-admin-invite-url.js +8 -0
- package/dist/better-auth/plugin/payload/utils/generate-metadata.d.ts +15 -0
- package/dist/better-auth/plugin/payload/utils/generate-metadata.d.ts.map +1 -0
- package/dist/better-auth/plugin/payload/utils/generate-metadata.js +74 -0
- package/dist/better-auth/plugin/payload/utils/get-safe-redirect.d.ts +2 -0
- package/dist/better-auth/plugin/payload/utils/get-safe-redirect.d.ts.map +1 -0
- package/dist/better-auth/plugin/payload/utils/get-safe-redirect.js +23 -0
- package/dist/better-auth/plugin/payload/views/admin-invite/client.d.ts +12 -0
- package/dist/better-auth/plugin/payload/views/admin-invite/client.d.ts.map +1 -0
- package/dist/better-auth/plugin/payload/views/admin-invite/client.js +92 -0
- package/dist/better-auth/plugin/payload/views/admin-invite/index.d.ts +11 -0
- package/dist/better-auth/plugin/payload/views/admin-invite/index.d.ts.map +1 -0
- package/dist/better-auth/plugin/payload/views/admin-invite/index.js +84 -0
- package/dist/better-auth/plugin/payload/views/admin-invite/index.scss +25 -0
- package/dist/better-auth/plugin/payload/views/create-first-admin/client.d.ts +14 -0
- package/dist/better-auth/plugin/payload/views/create-first-admin/client.d.ts.map +1 -0
- package/dist/better-auth/plugin/payload/views/create-first-admin/client.js +95 -0
- package/dist/better-auth/plugin/payload/views/create-first-admin/index.d.ts +10 -4
- package/dist/better-auth/plugin/payload/views/create-first-admin/index.d.ts.map +1 -1
- package/dist/better-auth/plugin/payload/views/create-first-admin/index.js +124 -92
- package/dist/better-auth/plugin/payload/views/create-first-admin/index.scss +29 -0
- package/dist/better-auth/plugin/payload/views/forgot-password/client.d.ts +8 -0
- package/dist/better-auth/plugin/payload/views/forgot-password/client.d.ts.map +1 -0
- package/dist/better-auth/plugin/payload/views/forgot-password/client.js +119 -0
- package/dist/better-auth/plugin/payload/views/forgot-password/index.d.ts +9 -0
- package/dist/better-auth/plugin/payload/views/forgot-password/index.d.ts.map +1 -0
- package/dist/better-auth/plugin/payload/views/forgot-password/index.js +69 -0
- package/dist/better-auth/plugin/payload/views/forgot-password/index.scss +0 -0
- package/dist/better-auth/plugin/payload/views/inactivity/index.d.ts +5 -0
- package/dist/better-auth/plugin/payload/views/inactivity/index.d.ts.map +1 -0
- package/dist/better-auth/plugin/payload/views/inactivity/index.js +12 -0
- package/dist/better-auth/plugin/payload/views/login/form/fields/login-field.d.ts +9 -0
- package/dist/better-auth/plugin/payload/views/login/form/fields/login-field.d.ts.map +1 -0
- package/dist/better-auth/plugin/payload/views/login/form/fields/login-field.js +54 -0
- package/dist/better-auth/plugin/payload/views/login/form/fields/password/index.d.ts +1 -0
- package/dist/better-auth/plugin/payload/views/login/form/fields/password/index.d.ts.map +1 -0
- package/dist/better-auth/plugin/payload/views/login/form/fields/password/index.js +121 -0
- package/dist/better-auth/plugin/payload/views/login/form/fields/password/index.scss +31 -0
- package/dist/better-auth/plugin/payload/views/login/form/fields/password/types.d.ts +56 -0
- package/dist/better-auth/plugin/payload/views/login/form/fields/password/types.d.ts.map +1 -0
- package/dist/better-auth/plugin/payload/views/login/form/fields/password/types.js +3 -0
- package/dist/better-auth/plugin/payload/views/login/form/index.d.ts +17 -0
- package/dist/better-auth/plugin/payload/views/login/form/index.d.ts.map +1 -0
- package/dist/better-auth/plugin/payload/views/login/form/index.js +137 -0
- package/dist/better-auth/plugin/payload/views/login/form/index.scss +23 -0
- package/dist/better-auth/plugin/payload/views/login/index.d.ts +10 -5
- package/dist/better-auth/plugin/payload/views/login/index.d.ts.map +1 -1
- package/dist/better-auth/plugin/payload/views/login/index.js +81 -61
- package/dist/better-auth/plugin/payload/views/login/index.scss +10 -0
- package/dist/better-auth/plugin/payload/views/logout/client.d.ts +8 -0
- package/dist/better-auth/plugin/payload/views/logout/client.d.ts.map +1 -0
- package/dist/better-auth/plugin/payload/views/logout/client.js +76 -0
- package/dist/better-auth/plugin/payload/views/logout/index.d.ts +8 -0
- package/dist/better-auth/plugin/payload/views/logout/index.d.ts.map +1 -0
- package/dist/better-auth/plugin/payload/views/logout/index.js +14 -0
- package/dist/better-auth/plugin/payload/views/logout/index.scss +0 -0
- package/dist/better-auth/plugin/payload/views/reset-password/client.d.ts +7 -0
- package/dist/better-auth/plugin/payload/views/reset-password/client.d.ts.map +1 -0
- package/dist/better-auth/plugin/payload/views/reset-password/client.js +72 -0
- package/dist/better-auth/plugin/payload/views/reset-password/index.d.ts +5 -0
- package/dist/better-auth/plugin/payload/views/reset-password/index.d.ts.map +1 -0
- package/dist/better-auth/plugin/payload/views/reset-password/index.js +81 -0
- package/dist/better-auth/plugin/payload/views/reset-password/index.scss +9 -0
- package/dist/better-auth/plugin/payload/views/reset-password/metadata.d.ts +3 -0
- package/dist/better-auth/plugin/payload/views/reset-password/metadata.d.ts.map +1 -0
- package/dist/better-auth/plugin/payload/views/reset-password/metadata.js +11 -0
- package/dist/better-auth/plugin/types.d.ts +170 -33
- package/dist/better-auth/plugin/types.d.ts.map +1 -1
- package/dist/better-auth/plugin/types.js +1 -1
- package/dist/clerk/plugin/components/sync-clerk-users-button.d.ts +1 -1
- package/dist/clerk/plugin/components/sync-clerk-users-button.d.ts.map +1 -1
- package/dist/clerk/utils/clerk-user.d.ts +0 -3
- package/dist/clerk/utils/clerk-user.d.ts.map +1 -1
- package/dist/clerk/utils/clerk-user.js +1 -3
- package/dist/clerk/utils/load-clerk-instance.d.ts +1 -1
- package/dist/clerk/utils/load-clerk-instance.d.ts.map +1 -1
- package/package.json +14 -14
- package/LICENSE.md +0 -17
- package/dist/better-auth/adapter/dev/bin/run.d.ts +0 -2
- package/dist/better-auth/adapter/dev/bin/run.d.ts.map +0 -1
- package/dist/better-auth/adapter/dev/bin/run.js +0 -64
- package/dist/better-auth/adapter/dev/bin/schema.d.ts +0 -23
- package/dist/better-auth/adapter/dev/bin/schema.d.ts.map +0 -1
- package/dist/better-auth/adapter/dev/bin/schema.js +0 -160
- package/dist/better-auth/adapter/dev/collections.d.ts +0 -4
- package/dist/better-auth/adapter/dev/collections.d.ts.map +0 -1
- package/dist/better-auth/adapter/dev/collections.js +0 -212
- package/dist/better-auth/adapter/dev/index.d.ts +0 -4
- package/dist/better-auth/adapter/dev/index.d.ts.map +0 -1
- package/dist/better-auth/adapter/dev/index.js +0 -168
- package/dist/better-auth/adapter/test/adapter.test.d.ts +0 -2
- package/dist/better-auth/adapter/test/adapter.test.d.ts.map +0 -1
- package/dist/better-auth/adapter/test/adapter.test.js +0 -181
- package/dist/better-auth/adapter/test/better-auth-adapter-test.d.ts +0 -8
- package/dist/better-auth/adapter/test/better-auth-adapter-test.d.ts.map +0 -1
- package/dist/better-auth/adapter/test/better-auth-adapter-test.js +0 -425
- package/dist/better-auth/adapter/test/schema.test.d.ts +0 -2
- package/dist/better-auth/adapter/test/schema.test.d.ts.map +0 -1
- package/dist/better-auth/adapter/test/schema.test.js +0 -796
- package/dist/better-auth/adapter/test/test_payload1/schema.d.ts +0 -24
- package/dist/better-auth/adapter/test/test_payload1/schema.d.ts.map +0 -1
- package/dist/better-auth/adapter/test/test_payload1/schema.js +0 -177
- package/dist/better-auth/adapter/test/test_payload2/schema.d.ts +0 -24
- package/dist/better-auth/adapter/test/test_payload2/schema.d.ts.map +0 -1
- package/dist/better-auth/adapter/test/test_payload2/schema.js +0 -167
- package/dist/better-auth/adapter/test/test_payload3/schema.d.ts +0 -24
- package/dist/better-auth/adapter/test/test_payload3/schema.d.ts.map +0 -1
- package/dist/better-auth/adapter/test/test_payload3/schema.js +0 -198
- package/dist/better-auth/plugin/collections/accounts/hooks/sync-password-to-user.d.ts.map +0 -1
- package/dist/better-auth/plugin/collections/accounts/hooks/sync-password-to-user.js +0 -47
- package/dist/better-auth/plugin/collections/users/endpoints/refresh-token.d.ts +0 -7
- package/dist/better-auth/plugin/collections/users/endpoints/refresh-token.d.ts.map +0 -1
- package/dist/better-auth/plugin/collections/users/endpoints/refresh-token.js +0 -106
- package/dist/better-auth/plugin/collections/users/hooks/after-login.d.ts.map +0 -1
- package/dist/better-auth/plugin/collections/users/hooks/after-login.js +0 -71
- package/dist/better-auth/plugin/collections/users/hooks/after-logout.d.ts.map +0 -1
- package/dist/better-auth/plugin/collections/users/hooks/after-logout.js +0 -49
- package/dist/better-auth/plugin/collections/users/hooks/before-login.d.ts.map +0 -1
- package/dist/better-auth/plugin/collections/users/hooks/before-login.js +0 -18
- package/dist/better-auth/plugin/collections/users/hooks/clean-up-user-after-delete.d.ts +0 -6
- package/dist/better-auth/plugin/collections/users/hooks/clean-up-user-after-delete.d.ts.map +0 -1
- package/dist/better-auth/plugin/collections/users/hooks/clean-up-user-after-delete.js +0 -33
- package/dist/better-auth/plugin/collections/users/hooks/on-verified-change.d.ts +0 -3
- package/dist/better-auth/plugin/collections/users/hooks/on-verified-change.d.ts.map +0 -1
- package/dist/better-auth/plugin/collections/users/hooks/on-verified-change.js +0 -14
- package/dist/better-auth/plugin/collections/users/hooks/sync-account.d.ts.map +0 -1
- package/dist/better-auth/plugin/collections/users/hooks/sync-account.js +0 -82
- package/dist/better-auth/plugin/lib/auth-strategy.d.ts +0 -9
- package/dist/better-auth/plugin/lib/auth-strategy.d.ts.map +0 -1
- package/dist/better-auth/plugin/lib/auth-strategy.js +0 -48
- package/dist/better-auth/plugin/lib/build-collection-configs.d.ts +0 -12
- package/dist/better-auth/plugin/lib/build-collection-configs.d.ts.map +0 -1
- package/dist/better-auth/plugin/lib/build-collection-configs.js +0 -1558
- package/dist/better-auth/plugin/lib/config.d.ts.map +0 -1
- package/dist/better-auth/plugin/lib/config.js +0 -44
- package/dist/better-auth/plugin/lib/ensure-password-set-before-create.d.ts.map +0 -1
- package/dist/better-auth/plugin/lib/ensure-password-set-before-create.js +0 -24
- package/dist/better-auth/plugin/lib/password.d.ts.map +0 -1
- package/dist/better-auth/plugin/lib/password.js +0 -63
- package/dist/better-auth/plugin/lib/payload-access.d.ts.map +0 -1
- package/dist/better-auth/plugin/lib/payload-access.js +0 -64
- package/dist/better-auth/plugin/lib/prepare-session-data.d.ts.map +0 -1
- package/dist/better-auth/plugin/lib/prepare-session-data.js +0 -42
- package/dist/better-auth/plugin/lib/respect-save-to-jwt-fields-middleware.d.ts.map +0 -1
- package/dist/better-auth/plugin/lib/respect-save-to-jwt-fields-middleware.js +0 -30
- package/dist/better-auth/plugin/lib/sanitize-auth-options.d.ts +0 -6
- package/dist/better-auth/plugin/lib/sanitize-auth-options.d.ts.map +0 -1
- package/dist/better-auth/plugin/lib/sanitize-auth-options.js +0 -298
- package/dist/better-auth/plugin/payload/components/admin-buttons.d.ts +0 -7
- package/dist/better-auth/plugin/payload/components/admin-buttons.d.ts.map +0 -1
- package/dist/better-auth/plugin/payload/components/admin-buttons.js +0 -219
- package/dist/better-auth/plugin/payload/components/login-redirect.d.ts +0 -2
- package/dist/better-auth/plugin/payload/components/login-redirect.d.ts.map +0 -1
- package/dist/better-auth/plugin/payload/components/login-redirect.js +0 -6
- package/dist/better-auth/plugin/payload/components/logout.d.ts +0 -3
- package/dist/better-auth/plugin/payload/components/logout.d.ts.map +0 -1
- package/dist/better-auth/plugin/payload/components/logout.js +0 -61
- package/dist/better-auth/plugin/payload/components/sign-in.d.ts +0 -4
- package/dist/better-auth/plugin/payload/components/sign-in.d.ts.map +0 -1
- package/dist/better-auth/plugin/payload/components/sign-in.js +0 -384
- package/dist/better-auth/plugin/payload/components/sign-up.d.ts +0 -7
- package/dist/better-auth/plugin/payload/components/sign-up.d.ts.map +0 -1
- package/dist/better-auth/plugin/payload/components/sign-up.js +0 -503
- package/dist/better-auth/plugin/payload/components/ui/button.d.ts +0 -11
- package/dist/better-auth/plugin/payload/components/ui/button.d.ts.map +0 -1
- package/dist/better-auth/plugin/payload/components/ui/button.js +0 -42
- package/dist/better-auth/plugin/payload/components/ui/card.d.ts +0 -10
- package/dist/better-auth/plugin/payload/components/ui/card.d.ts.map +0 -1
- package/dist/better-auth/plugin/payload/components/ui/card.js +0 -55
- package/dist/better-auth/plugin/payload/components/ui/checkbox.d.ts +0 -5
- package/dist/better-auth/plugin/payload/components/ui/checkbox.d.ts.map +0 -1
- package/dist/better-auth/plugin/payload/components/ui/checkbox.js +0 -23
- package/dist/better-auth/plugin/payload/components/ui/cn.d.ts +0 -3
- package/dist/better-auth/plugin/payload/components/ui/cn.d.ts.map +0 -1
- package/dist/better-auth/plugin/payload/components/ui/cn.js +0 -7
- package/dist/better-auth/plugin/payload/components/ui/input.d.ts +0 -4
- package/dist/better-auth/plugin/payload/components/ui/input.d.ts.map +0 -1
- package/dist/better-auth/plugin/payload/components/ui/input.js +0 -14
- package/dist/better-auth/plugin/payload/components/ui/label.d.ts +0 -5
- package/dist/better-auth/plugin/payload/components/ui/label.d.ts.map +0 -1
- package/dist/better-auth/plugin/payload/components/ui/label.js +0 -15
- package/dist/better-auth/plugin/payload/components/ui/password-input.d.ts +0 -3
- package/dist/better-auth/plugin/payload/components/ui/password-input.d.ts.map +0 -1
- package/dist/better-auth/plugin/payload/components/ui/password-input.js +0 -55
- /package/dist/better-auth/plugin/lib/{password.d.ts → sanitize-better-auth-options/utils/password.d.ts} +0 -0
|
@@ -1,425 +0,0 @@
|
|
|
1
|
-
import { expect, test } from 'vitest';
|
|
2
|
-
import { generateId } from 'better-auth';
|
|
3
|
-
export async function runAdapterTest(opts) {
|
|
4
|
-
const adapter = await opts.getAdapter();
|
|
5
|
-
const user = {
|
|
6
|
-
id: '1',
|
|
7
|
-
name: 'user',
|
|
8
|
-
email: 'user@email.com',
|
|
9
|
-
emailVerified: true,
|
|
10
|
-
createdAt: new Date(),
|
|
11
|
-
updatedAt: new Date()
|
|
12
|
-
};
|
|
13
|
-
test('create model', async ()=>{
|
|
14
|
-
const res = await adapter.create({
|
|
15
|
-
model: 'user',
|
|
16
|
-
data: user
|
|
17
|
-
});
|
|
18
|
-
expect({
|
|
19
|
-
name: res.name,
|
|
20
|
-
email: res.email
|
|
21
|
-
}).toEqual({
|
|
22
|
-
name: user.name,
|
|
23
|
-
email: user.email
|
|
24
|
-
});
|
|
25
|
-
user.id = res.id;
|
|
26
|
-
});
|
|
27
|
-
test('find model', async ()=>{
|
|
28
|
-
const res = await adapter.findOne({
|
|
29
|
-
model: 'user',
|
|
30
|
-
where: [
|
|
31
|
-
{
|
|
32
|
-
field: 'id',
|
|
33
|
-
value: user.id
|
|
34
|
-
}
|
|
35
|
-
]
|
|
36
|
-
});
|
|
37
|
-
expect({
|
|
38
|
-
name: res?.name,
|
|
39
|
-
email: res?.email
|
|
40
|
-
}).toEqual({
|
|
41
|
-
name: user.name,
|
|
42
|
-
email: user.email
|
|
43
|
-
});
|
|
44
|
-
});
|
|
45
|
-
test('find model without id', async ()=>{
|
|
46
|
-
const res = await adapter.findOne({
|
|
47
|
-
model: 'user',
|
|
48
|
-
where: [
|
|
49
|
-
{
|
|
50
|
-
field: 'email',
|
|
51
|
-
value: user.email
|
|
52
|
-
}
|
|
53
|
-
]
|
|
54
|
-
});
|
|
55
|
-
expect({
|
|
56
|
-
name: res?.name,
|
|
57
|
-
email: res?.email
|
|
58
|
-
}).toEqual({
|
|
59
|
-
name: user.name,
|
|
60
|
-
email: user.email
|
|
61
|
-
});
|
|
62
|
-
});
|
|
63
|
-
test('find model with select', async ()=>{
|
|
64
|
-
const res = await adapter.findOne({
|
|
65
|
-
model: 'user',
|
|
66
|
-
where: [
|
|
67
|
-
{
|
|
68
|
-
field: 'id',
|
|
69
|
-
value: user.id
|
|
70
|
-
}
|
|
71
|
-
],
|
|
72
|
-
select: [
|
|
73
|
-
'email'
|
|
74
|
-
]
|
|
75
|
-
});
|
|
76
|
-
expect(res).toEqual({
|
|
77
|
-
id: user.id,
|
|
78
|
-
email: user.email
|
|
79
|
-
});
|
|
80
|
-
});
|
|
81
|
-
test('update model', async ()=>{
|
|
82
|
-
const newEmail = 'updated@email.com';
|
|
83
|
-
const res = await adapter.update({
|
|
84
|
-
model: 'user',
|
|
85
|
-
where: [
|
|
86
|
-
{
|
|
87
|
-
field: 'id',
|
|
88
|
-
value: user.id
|
|
89
|
-
}
|
|
90
|
-
],
|
|
91
|
-
update: {
|
|
92
|
-
email: newEmail
|
|
93
|
-
}
|
|
94
|
-
});
|
|
95
|
-
expect(res).toMatchObject({
|
|
96
|
-
email: newEmail,
|
|
97
|
-
name: user.name
|
|
98
|
-
});
|
|
99
|
-
});
|
|
100
|
-
test('should find many', async ()=>{
|
|
101
|
-
const res = await adapter.findMany({
|
|
102
|
-
model: 'user'
|
|
103
|
-
});
|
|
104
|
-
expect(res.length).toBe(1);
|
|
105
|
-
});
|
|
106
|
-
test('should find many with where', async ()=>{
|
|
107
|
-
const user = await adapter.create({
|
|
108
|
-
model: 'user',
|
|
109
|
-
data: {
|
|
110
|
-
id: '2',
|
|
111
|
-
name: 'user2',
|
|
112
|
-
email: 'test@email.com',
|
|
113
|
-
emailVerified: true,
|
|
114
|
-
createdAt: new Date(),
|
|
115
|
-
updatedAt: new Date()
|
|
116
|
-
}
|
|
117
|
-
});
|
|
118
|
-
const res = await adapter.findMany({
|
|
119
|
-
model: 'user',
|
|
120
|
-
where: [
|
|
121
|
-
{
|
|
122
|
-
field: 'id',
|
|
123
|
-
value: user.id
|
|
124
|
-
}
|
|
125
|
-
]
|
|
126
|
-
});
|
|
127
|
-
expect(res.length).toBe(1);
|
|
128
|
-
});
|
|
129
|
-
test('should find many with operators', async ()=>{
|
|
130
|
-
const newUser = await adapter.create({
|
|
131
|
-
model: 'user',
|
|
132
|
-
data: {
|
|
133
|
-
id: '3',
|
|
134
|
-
name: 'user',
|
|
135
|
-
email: 'test-email2@email.com',
|
|
136
|
-
emailVerified: true,
|
|
137
|
-
createdAt: new Date(),
|
|
138
|
-
updatedAt: new Date()
|
|
139
|
-
}
|
|
140
|
-
});
|
|
141
|
-
const res = await adapter.findMany({
|
|
142
|
-
model: 'user',
|
|
143
|
-
where: [
|
|
144
|
-
{
|
|
145
|
-
field: 'id',
|
|
146
|
-
operator: 'in',
|
|
147
|
-
value: [
|
|
148
|
-
user.id,
|
|
149
|
-
newUser.id
|
|
150
|
-
]
|
|
151
|
-
}
|
|
152
|
-
]
|
|
153
|
-
});
|
|
154
|
-
expect(res.length).toBe(2);
|
|
155
|
-
});
|
|
156
|
-
test('should work with reference fields', async ()=>{
|
|
157
|
-
let token = null;
|
|
158
|
-
const user = await adapter.create({
|
|
159
|
-
model: 'user',
|
|
160
|
-
data: {
|
|
161
|
-
id: '4',
|
|
162
|
-
name: 'user',
|
|
163
|
-
email: 'my-email@email.com',
|
|
164
|
-
emailVerified: true,
|
|
165
|
-
createdAt: new Date(),
|
|
166
|
-
updatedAt: new Date()
|
|
167
|
-
}
|
|
168
|
-
});
|
|
169
|
-
const session = await adapter.create({
|
|
170
|
-
model: 'session',
|
|
171
|
-
data: {
|
|
172
|
-
id: '1',
|
|
173
|
-
token: generateId(),
|
|
174
|
-
createdAt: new Date(),
|
|
175
|
-
updatedAt: new Date(),
|
|
176
|
-
userId: user.id,
|
|
177
|
-
expiresAt: new Date()
|
|
178
|
-
}
|
|
179
|
-
});
|
|
180
|
-
token = session.token;
|
|
181
|
-
const res = await adapter.findOne({
|
|
182
|
-
model: 'session',
|
|
183
|
-
where: [
|
|
184
|
-
{
|
|
185
|
-
field: 'userId',
|
|
186
|
-
value: user.id
|
|
187
|
-
}
|
|
188
|
-
]
|
|
189
|
-
});
|
|
190
|
-
const resToken = await adapter.findOne({
|
|
191
|
-
model: 'session',
|
|
192
|
-
where: [
|
|
193
|
-
{
|
|
194
|
-
field: 'token',
|
|
195
|
-
value: token
|
|
196
|
-
}
|
|
197
|
-
]
|
|
198
|
-
});
|
|
199
|
-
expect(res).toMatchObject({
|
|
200
|
-
userId: user.id
|
|
201
|
-
});
|
|
202
|
-
expect(resToken).toMatchObject({
|
|
203
|
-
userId: user.id
|
|
204
|
-
});
|
|
205
|
-
});
|
|
206
|
-
test('should find many with sortBy', async ()=>{
|
|
207
|
-
await adapter.create({
|
|
208
|
-
model: 'user',
|
|
209
|
-
data: {
|
|
210
|
-
id: '5',
|
|
211
|
-
name: 'a',
|
|
212
|
-
email: 'a@email.com',
|
|
213
|
-
emailVerified: true,
|
|
214
|
-
createdAt: new Date(),
|
|
215
|
-
updatedAt: new Date()
|
|
216
|
-
}
|
|
217
|
-
});
|
|
218
|
-
const res = await adapter.findMany({
|
|
219
|
-
model: 'user',
|
|
220
|
-
sortBy: {
|
|
221
|
-
field: 'name',
|
|
222
|
-
direction: 'asc'
|
|
223
|
-
}
|
|
224
|
-
});
|
|
225
|
-
expect(res[0].name).toBe('a');
|
|
226
|
-
const res2 = await adapter.findMany({
|
|
227
|
-
model: 'user',
|
|
228
|
-
sortBy: {
|
|
229
|
-
field: 'name',
|
|
230
|
-
direction: 'desc'
|
|
231
|
-
}
|
|
232
|
-
});
|
|
233
|
-
expect(res2[res2.length - 1].name).toBe('a');
|
|
234
|
-
});
|
|
235
|
-
test('should find many with limit', async ()=>{
|
|
236
|
-
const res = await adapter.findMany({
|
|
237
|
-
model: 'user',
|
|
238
|
-
limit: 1
|
|
239
|
-
});
|
|
240
|
-
expect(res.length).toBe(1);
|
|
241
|
-
});
|
|
242
|
-
test('should update with multiple where', async ()=>{
|
|
243
|
-
await adapter.updateMany({
|
|
244
|
-
model: 'user',
|
|
245
|
-
where: [
|
|
246
|
-
{
|
|
247
|
-
field: 'name',
|
|
248
|
-
value: user.name
|
|
249
|
-
},
|
|
250
|
-
{
|
|
251
|
-
field: 'email',
|
|
252
|
-
value: user.email
|
|
253
|
-
}
|
|
254
|
-
],
|
|
255
|
-
update: {
|
|
256
|
-
email: 'updated@email.com'
|
|
257
|
-
}
|
|
258
|
-
});
|
|
259
|
-
const updatedUser = await adapter.findOne({
|
|
260
|
-
model: 'user',
|
|
261
|
-
where: [
|
|
262
|
-
{
|
|
263
|
-
field: 'email',
|
|
264
|
-
value: 'updated@email.com'
|
|
265
|
-
}
|
|
266
|
-
]
|
|
267
|
-
});
|
|
268
|
-
expect(updatedUser).toMatchObject({
|
|
269
|
-
name: user.name,
|
|
270
|
-
email: 'updated@email.com'
|
|
271
|
-
});
|
|
272
|
-
});
|
|
273
|
-
test('delete model', async ()=>{
|
|
274
|
-
await adapter.delete({
|
|
275
|
-
model: 'user',
|
|
276
|
-
where: [
|
|
277
|
-
{
|
|
278
|
-
field: 'id',
|
|
279
|
-
value: user.id
|
|
280
|
-
}
|
|
281
|
-
]
|
|
282
|
-
});
|
|
283
|
-
const findRes = await adapter.findOne({
|
|
284
|
-
model: 'user',
|
|
285
|
-
where: [
|
|
286
|
-
{
|
|
287
|
-
field: 'id',
|
|
288
|
-
value: user.id
|
|
289
|
-
}
|
|
290
|
-
]
|
|
291
|
-
});
|
|
292
|
-
expect(findRes).toBeNull();
|
|
293
|
-
});
|
|
294
|
-
test('should delete many', async ()=>{
|
|
295
|
-
for (const id of [
|
|
296
|
-
'to-be-delete1',
|
|
297
|
-
'to-be-delete2',
|
|
298
|
-
'to-be-delete3'
|
|
299
|
-
]){
|
|
300
|
-
await adapter.create({
|
|
301
|
-
model: 'user',
|
|
302
|
-
data: {
|
|
303
|
-
id,
|
|
304
|
-
name: 'to-be-deleted',
|
|
305
|
-
email: `email@test-${id}.com`,
|
|
306
|
-
emailVerified: true,
|
|
307
|
-
createdAt: new Date(),
|
|
308
|
-
updatedAt: new Date()
|
|
309
|
-
}
|
|
310
|
-
});
|
|
311
|
-
}
|
|
312
|
-
const findResFirst = await adapter.findMany({
|
|
313
|
-
model: 'user',
|
|
314
|
-
where: [
|
|
315
|
-
{
|
|
316
|
-
field: 'name',
|
|
317
|
-
value: 'to-be-deleted'
|
|
318
|
-
}
|
|
319
|
-
]
|
|
320
|
-
});
|
|
321
|
-
expect(findResFirst.length).toBe(3);
|
|
322
|
-
await adapter.deleteMany({
|
|
323
|
-
model: 'user',
|
|
324
|
-
where: [
|
|
325
|
-
{
|
|
326
|
-
field: 'name',
|
|
327
|
-
value: 'to-be-deleted'
|
|
328
|
-
}
|
|
329
|
-
]
|
|
330
|
-
});
|
|
331
|
-
const findRes = await adapter.findMany({
|
|
332
|
-
model: 'user',
|
|
333
|
-
where: [
|
|
334
|
-
{
|
|
335
|
-
field: 'name',
|
|
336
|
-
value: 'to-be-deleted'
|
|
337
|
-
}
|
|
338
|
-
]
|
|
339
|
-
});
|
|
340
|
-
expect(findRes.length).toBe(0);
|
|
341
|
-
});
|
|
342
|
-
test("shouldn't throw on delete record not found", async ()=>{
|
|
343
|
-
await adapter.delete({
|
|
344
|
-
model: 'user',
|
|
345
|
-
where: [
|
|
346
|
-
{
|
|
347
|
-
field: 'id',
|
|
348
|
-
value: '5'
|
|
349
|
-
}
|
|
350
|
-
]
|
|
351
|
-
});
|
|
352
|
-
});
|
|
353
|
-
test("shouldn't throw on record not found", async ()=>{
|
|
354
|
-
const res = await adapter.findOne({
|
|
355
|
-
model: 'user',
|
|
356
|
-
where: [
|
|
357
|
-
{
|
|
358
|
-
field: 'id',
|
|
359
|
-
value: '5'
|
|
360
|
-
}
|
|
361
|
-
]
|
|
362
|
-
});
|
|
363
|
-
expect(res).toBeNull();
|
|
364
|
-
});
|
|
365
|
-
test('should find many with contains operator', async ()=>{
|
|
366
|
-
const res = await adapter.findMany({
|
|
367
|
-
model: 'user',
|
|
368
|
-
where: [
|
|
369
|
-
{
|
|
370
|
-
field: 'name',
|
|
371
|
-
operator: 'contains',
|
|
372
|
-
value: 'user2'
|
|
373
|
-
}
|
|
374
|
-
]
|
|
375
|
-
});
|
|
376
|
-
expect(res.length).toBe(1);
|
|
377
|
-
});
|
|
378
|
-
test('should search users with startsWith', async ()=>{
|
|
379
|
-
const res = await adapter.findMany({
|
|
380
|
-
model: 'user',
|
|
381
|
-
where: [
|
|
382
|
-
{
|
|
383
|
-
field: 'name',
|
|
384
|
-
operator: 'starts_with',
|
|
385
|
-
value: 'us'
|
|
386
|
-
}
|
|
387
|
-
]
|
|
388
|
-
});
|
|
389
|
-
expect(res.length).toBe(3);
|
|
390
|
-
});
|
|
391
|
-
test('should search users with endsWith', async ()=>{
|
|
392
|
-
const res = await adapter.findMany({
|
|
393
|
-
model: 'user',
|
|
394
|
-
where: [
|
|
395
|
-
{
|
|
396
|
-
field: 'name',
|
|
397
|
-
operator: 'ends_with',
|
|
398
|
-
value: 'er2'
|
|
399
|
-
}
|
|
400
|
-
]
|
|
401
|
-
});
|
|
402
|
-
expect(res.length).toBe(1);
|
|
403
|
-
});
|
|
404
|
-
test.skipIf(opts.skipGenerateIdTest)('should prefer generateId if provided', async ()=>{
|
|
405
|
-
const customAdapter = await opts.getAdapter({
|
|
406
|
-
advanced: {
|
|
407
|
-
generateId: ()=>'mocked-id'
|
|
408
|
-
}
|
|
409
|
-
});
|
|
410
|
-
const res = await customAdapter.create({
|
|
411
|
-
model: 'user',
|
|
412
|
-
data: {
|
|
413
|
-
id: '1',
|
|
414
|
-
name: 'user4',
|
|
415
|
-
email: 'user4@email.com',
|
|
416
|
-
emailVerified: true,
|
|
417
|
-
createdAt: new Date(),
|
|
418
|
-
updatedAt: new Date()
|
|
419
|
-
}
|
|
420
|
-
});
|
|
421
|
-
expect(res.id).toBe('mocked-id');
|
|
422
|
-
});
|
|
423
|
-
}
|
|
424
|
-
|
|
425
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3N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ICAgbW9kZWw6ICd1c2VyJyxcbiAgICAgIHdoZXJlOiBbXG4gICAgICAgIHtcbiAgICAgICAgICBmaWVsZDogJ2lkJyxcbiAgICAgICAgICB2YWx1ZTogJzUnLFxuICAgICAgICB9LFxuICAgICAgXSxcbiAgICB9KVxuICAgIGV4cGVjdChyZXMpLnRvQmVOdWxsKClcbiAgfSlcblxuICB0ZXN0KCdzaG91bGQgZmluZCBtYW55IHdpdGggY29udGFpbnMgb3BlcmF0b3InLCBhc3luYyAoKSA9PiB7XG4gICAgY29uc3QgcmVzID0gYXdhaXQgYWRhcHRlci5maW5kTWFueSh7XG4gICAgICBtb2RlbDogJ3VzZXInLFxuICAgICAgd2hlcmU6IFtcbiAgICAgICAge1xuICAgICAgICAgIGZpZWxkOiAnbmFtZScsXG4gICAgICAgICAgb3BlcmF0b3I6ICdjb250YWlucycsXG4gICAgICAgICAgdmFsdWU6ICd1c2VyMicsXG4gICAgICAgIH0sXG4gICAgICBdLFxuICAgIH0pXG4gICAgZXhwZWN0KHJlcy5sZW5ndGgpLnRvQmUoMSlcbiAgfSlcblxuICB0ZXN0KCdzaG91bGQgc2VhcmNoIHVzZXJzIHdpdGggc3RhcnRzV2l0aCcsIGFzeW5jICgpID0+IHtcbiAgICBjb25zdCByZXMgPSBhd2FpdCBhZGFwdGVyLmZpbmRNYW55KHtcbiAgICAgIG1vZGVsOiAndXNlcicsXG4gICAgICB3aGVyZTogW1xuICAgICAgICB7XG4gICAgICAgICAgZmllbGQ6ICduYW1lJyxcbiAgICAgICAgICBvcGVyYXRvcjogJ3N0YXJ0c193aXRoJyxcbiAgICAgICAgICB2YWx1ZTogJ3VzJyxcbiAgICAgICAgfSxcbiAgICAgIF0sXG4gICAgfSlcbiAgICBleHBlY3QocmVzLmxlbmd0aCkudG9CZSgzKVxuICB9KVxuXG4gIHRlc3QoJ3Nob3VsZCBzZWFyY2ggdXNlcnMgd2l0aCBlbmRzV2l0aCcsIGFzeW5jICgpID0+IHtcbiAgICBjb25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kFDVDthQUNEO1FBQ0g7UUFDQXZCLE9BQU9lLElBQUljLE1BQU0sRUFBRUMsSUFBSSxDQUFDO0lBQzFCO0lBRUE3QixLQUFLLHFDQUFxQztRQUN4QyxNQUFNYyxNQUFNLE1BQU1WLFFBQVF1QixRQUFRLENBQUM7WUFDakNYLE9BQU87WUFDUEksT0FBTztnQkFDTDtvQkFDRUMsT0FBTztvQkFDUFUsVUFBVTtvQkFDVlQsT0FBTztnQkFDVDthQUNEO1FBQ0g7UUFDQXZCLE9BQU9lLElBQUljLE1BQU0sRUFBRUMsSUFBSSxDQUFDO0lBQzFCO0lBRUE3QixLQUFLZ0QsTUFBTSxDQUFDN0MsS0FBSzhDLGtCQUFrQixFQUFFLHdDQUF3QztRQUMzRSxNQUFNQyxnQkFBZ0IsTUFBTS9DLEtBQUtFLFVBQVUsQ0FBQztZQUMxQzhDLFVBQVU7Z0JBQ1JsRCxZQUFZLElBQU07WUFDcEI7UUFDRjtRQUVBLE1BQU1hLE1BQU0sTUFBTW9DLGNBQWNuQyxNQUFNLENBQUM7WUFDckNDLE9BQU87WUFDUEMsTUFBTTtnQkFDSlYsSUFBSTtnQkFDSkMsTUFBTTtnQkFDTkMsT0FBTztnQkFDUEMsZUFBZTtnQkFDZkMsV0FBVyxJQUFJQztnQkFDZkMsV0FBVyxJQUFJRDtZQUNqQjtRQUNGO1FBRUFiLE9BQU9lLElBQUlQLEVBQUUsRUFBRXNCLElBQUksQ0FBQztJQUN0QjtBQUNGIn0=
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"schema.test.d.ts","sourceRoot":"","sources":["../../../../src/better-auth/adapter/test/schema.test.ts"],"names":[],"mappings":""}
|