@mframework/adapter-betterauth 0.0.4 → 0.0.5

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.
Files changed (3) hide show
  1. package/package.json +1 -1
  2. package/src/index.ts +38 -0
  3. package/index.ts +0 -38
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mframework/adapter-betterauth",
3
- "version": "0.0.4",
3
+ "version": "0.0.5",
4
4
  "description": "Official Better-Auth adapter for M Framework Auth Layer",
5
5
  "main": "index.ts",
6
6
  "types": "module",
package/src/index.ts ADDED
@@ -0,0 +1,38 @@
1
+ import {
2
+ setAuthAdapter
3
+ } from '@mframework/sdk'
4
+
5
+ import { createAuthTransport } from './transport'
6
+ import { createAuthAdapter } from './auth'
7
+
8
+ export const installAuthAdapter = (config: { baseUrl: string; apiKey?: string }) => {
9
+ const transport = createAuthTransport(config)
10
+
11
+ setAuthAdapter(createAuthAdapter(transport))
12
+ }
13
+
14
+ // Export the server-side BetterAuth instance (if present) so other layers can
15
+ // import the runtime `auth` instance from this package. The file is optional
16
+ // and will only exist when BetterAuth is configured for the adapter.
17
+ export { auth, Auth } from './betterauth'
18
+ export { default as BetterAuthProvider } from './provider'
19
+ export { getAuthPlugins } from './plugins'
20
+
21
+ export * from './types'
22
+ export * from './auth'
23
+ export * from './utils'
24
+ export * from './transport'
25
+ export * from './framework'
26
+ export * from './registry'
27
+ export * from './validation'
28
+ export * from './config'
29
+ export * from 'better-auth/client/plugins'
30
+ export * from '@polar-sh/better-auth'
31
+ export * as BetterAuth from 'better-auth'
32
+ export { getAuthConfig } from './config'
33
+ export { getFrameworkContext } from './framework'
34
+ export type { AuthProvider } from './types'
35
+ export { registerAuthProvider } from './registry'
36
+ export { polarClient } from '@polar-sh/better-auth'
37
+ export { adminClient, inferAdditionalFields } from 'better-auth/client/plugins'
38
+ export { stripeClient } from '@better-auth/stripe/client'
package/index.ts DELETED
@@ -1,38 +0,0 @@
1
- import {
2
- setAuthAdapter
3
- } from '@mframework/sdk'
4
-
5
- import { createAuthTransport } from './src/transport'
6
- import { createAuthAdapter } from './src/auth'
7
-
8
- export const installAuthAdapter = (config: { baseUrl: string; apiKey?: string }) => {
9
- const transport = createAuthTransport(config)
10
-
11
- setAuthAdapter(createAuthAdapter(transport))
12
- }
13
-
14
- // Export the server-side BetterAuth instance (if present) so other layers can
15
- // import the runtime `auth` instance from this package. The file is optional
16
- // and will only exist when BetterAuth is configured for the adapter.
17
- export { auth, Auth } from './src/betterauth'
18
- export { default as BetterAuthProvider } from './src/provider'
19
- export { getAuthPlugins } from './src/plugins'
20
-
21
- export * from './src/types'
22
- export * from './src/auth'
23
- export * from './src/utils'
24
- export * from './src/transport'
25
- export * from './src/framework'
26
- export * from './src/registry'
27
- export * from './src/validation'
28
- export * from './src/config'
29
- export * from 'better-auth/client/plugins'
30
- export * from '@polar-sh/better-auth'
31
- export * as BetterAuth from 'better-auth'
32
- export { getAuthConfig } from './src/config'
33
- export { getFrameworkContext } from './src/framework'
34
- export type { AuthProvider } from './src/types'
35
- export { registerAuthProvider } from './src/registry'
36
- export { polarClient } from '@polar-sh/better-auth'
37
- export { adminClient, inferAdditionalFields } from 'better-auth/client/plugins'
38
- export { stripeClient } from '@better-auth/stripe/client'