@uninspired/auth-client 0.0.8 → 0.0.10
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/cjs/index.js +2 -2
- package/dist/cjs/index.js.map +3 -3
- package/dist/esm/index.js +2 -2
- package/dist/esm/index.js.map +3 -3
- package/dist/types/index.d.ts +3407 -0
- package/package.json +2 -2
package/dist/cjs/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var{defineProperty:
|
|
1
|
+
var{defineProperty:p,getOwnPropertyNames:l,getOwnPropertyDescriptor:s}=Object,C=Object.prototype.hasOwnProperty;var u=new WeakMap,a=(t)=>{var e=u.get(t),r;if(e)return e;if(e=p({},"__esModule",{value:!0}),t&&typeof t==="object"||typeof t==="function")l(t).map((n)=>!C.call(e,n)&&p(e,n,{get:()=>t[n],enumerable:!(r=s(t,n))||r.enumerable}));return u.set(t,e),e};var h=(t,e)=>{for(var r in e)p(t,r,{get:e[r],enumerable:!0,configurable:!0,set:(n)=>e[r]=()=>n})};var k={};h(k,{makeUsBetterAuthClient:()=>y,makePublicClient:()=>f,makeCheckoutClient:()=>R,makeAppClient:()=>m});module.exports=a(k);var o=require("better-auth/client/plugins"),c=require("better-auth/react"),i=require("hono/client"),y=(t)=>{return c.createAuthClient({baseURL:t,plugins:[o.customSessionClient(),o.magicLinkClient(),o.emailOTPClient(),o.passkeyClient()]})},R=(t,e)=>{return i.hc(t,{...e,fetch:(r,n)=>(e?.fetch??fetch)(r,{...n,credentials:"include",headers:{...n.headers,"Content-Type":"application/json"}})})},m=(t,e)=>{return i.hc(t,{...e,fetch:(r,n)=>(e?.fetch??fetch)(r,{...n,credentials:"include",headers:{...n.headers,"Content-Type":"application/json"}})})},f=(t,e)=>{return i.hc(t,e)};
|
|
2
2
|
|
|
3
|
-
//# debugId=
|
|
3
|
+
//# debugId=4ECA85DFA07CF91E64756E2164756E21
|
|
4
4
|
//# sourceMappingURL=index.js.map
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/index.ts"],
|
|
4
4
|
"sourcesContent": [
|
|
5
|
-
"import {\n customSessionClient,\n magicLinkClient,\n emailOTPClient,\n passkeyClient,\n} from \"better-auth/client/plugins\";\nimport { createAuthClient } from \"better-auth/react\";\nimport type {\n AppRouter,\n Auth,\n CheckoutRouter,\n PublicRouter,\n} from \"@us-accounts/api\";\nimport { hc, type ClientRequestOptions } from \"hono/client\";\n\nexport
|
|
5
|
+
"import {\n customSessionClient,\n magicLinkClient,\n emailOTPClient,\n passkeyClient,\n} from \"better-auth/client/plugins\";\nimport { createAuthClient } from \"better-auth/react\";\nimport type {\n AppRouter,\n Auth,\n CheckoutRouter,\n PublicRouter,\n} from \"@us-accounts/api\";\nimport { hc, type ClientRequestOptions } from \"hono/client\";\n\nexport const makeUsBetterAuthClient = (baseURL: string) => {\n return createAuthClient({\n baseURL,\n plugins: [\n customSessionClient<Auth>(),\n magicLinkClient(),\n emailOTPClient(),\n passkeyClient(),\n ],\n });\n};\n\nexport type CheckoutClient = ReturnType<typeof hc<CheckoutRouter>>;\n\nexport const makeCheckoutClient = (\n baseURL: string,\n options?: ClientRequestOptions,\n): CheckoutClient => {\n return hc<CheckoutRouter>(baseURL, {\n ...options,\n fetch: (url: any, init: any) =>\n (options?.fetch ?? fetch)(url, {\n ...init,\n credentials: \"include\",\n headers: {\n ...init.headers,\n \"Content-Type\": \"application/json\",\n },\n }),\n });\n};\n\nexport type AppClient = ReturnType<typeof hc<AppRouter>>;\n\nexport const makeAppClient = (\n baseURL: string,\n options?: ClientRequestOptions,\n): AppClient => {\n return hc<AppRouter>(baseURL, {\n ...options,\n fetch: (url: any, init: any) =>\n (options?.fetch ?? fetch)(url, {\n ...init,\n credentials: \"include\",\n headers: {\n ...init.headers,\n \"Content-Type\": \"application/json\",\n },\n }),\n });\n};\n\nexport type PublicClient = ReturnType<typeof hc<PublicRouter>>;\n\nexport const makePublicClient = (\n baseURL: string,\n options?: ClientRequestOptions,\n): PublicClient => {\n return hc<PublicRouter>(baseURL, options);\n};\n"
|
|
6
6
|
],
|
|
7
|
-
"mappings": "8kBAKO,IALP,wCAMA,+BAOA,
|
|
8
|
-
"debugId": "
|
|
7
|
+
"mappings": "8kBAKO,IALP,wCAMA,+BAOA,yBAEa,EAAyB,CAAC,IAAoB,CACzD,OAAO,mBAAiB,CACtB,UACA,QAAS,CACP,sBAA0B,EAC1B,kBAAgB,EAChB,iBAAe,EACf,gBAAc,CAChB,CACF,CAAC,GAKU,EAAqB,CAChC,EACA,IACmB,CACnB,OAAO,KAAmB,EAAS,IAC9B,EACH,MAAO,CAAC,EAAU,KACf,GAAS,OAAS,OAAO,EAAK,IAC1B,EACH,YAAa,UACb,QAAS,IACJ,EAAK,QACR,eAAgB,kBAClB,CACF,CAAC,CACL,CAAC,GAKU,EAAgB,CAC3B,EACA,IACc,CACd,OAAO,KAAc,EAAS,IACzB,EACH,MAAO,CAAC,EAAU,KACf,GAAS,OAAS,OAAO,EAAK,IAC1B,EACH,YAAa,UACb,QAAS,IACJ,EAAK,QACR,eAAgB,kBAClB,CACF,CAAC,CACL,CAAC,GAKU,EAAmB,CAC9B,EACA,IACiB,CACjB,OAAO,KAAiB,EAAS,CAAO",
|
|
8
|
+
"debugId": "4ECA85DFA07CF91E64756E2164756E21",
|
|
9
9
|
"names": []
|
|
10
10
|
}
|
package/dist/esm/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{customSessionClient as
|
|
1
|
+
import{customSessionClient as i,magicLinkClient as p,emailOTPClient as u,passkeyClient as c}from"better-auth/client/plugins";import{createAuthClient as l}from"better-auth/react";import{hc as o}from"hono/client";var h=(e)=>{return l({baseURL:e,plugins:[i(),p(),u(),c()]})},y=(e,t)=>{return o(e,{...t,fetch:(r,n)=>(t?.fetch??fetch)(r,{...n,credentials:"include",headers:{...n.headers,"Content-Type":"application/json"}})})},R=(e,t)=>{return o(e,{...t,fetch:(r,n)=>(t?.fetch??fetch)(r,{...n,credentials:"include",headers:{...n.headers,"Content-Type":"application/json"}})})},m=(e,t)=>{return o(e,t)};export{h as makeUsBetterAuthClient,m as makePublicClient,y as makeCheckoutClient,R as makeAppClient};
|
|
2
2
|
|
|
3
|
-
//# debugId=
|
|
3
|
+
//# debugId=842F612FDD58662A64756E2164756E21
|
|
4
4
|
//# sourceMappingURL=index.js.map
|
package/dist/esm/index.js.map
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/index.ts"],
|
|
4
4
|
"sourcesContent": [
|
|
5
|
-
"import {\n customSessionClient,\n magicLinkClient,\n emailOTPClient,\n passkeyClient,\n} from \"better-auth/client/plugins\";\nimport { createAuthClient } from \"better-auth/react\";\nimport type {\n AppRouter,\n Auth,\n CheckoutRouter,\n PublicRouter,\n} from \"@us-accounts/api\";\nimport { hc, type ClientRequestOptions } from \"hono/client\";\n\nexport
|
|
5
|
+
"import {\n customSessionClient,\n magicLinkClient,\n emailOTPClient,\n passkeyClient,\n} from \"better-auth/client/plugins\";\nimport { createAuthClient } from \"better-auth/react\";\nimport type {\n AppRouter,\n Auth,\n CheckoutRouter,\n PublicRouter,\n} from \"@us-accounts/api\";\nimport { hc, type ClientRequestOptions } from \"hono/client\";\n\nexport const makeUsBetterAuthClient = (baseURL: string) => {\n return createAuthClient({\n baseURL,\n plugins: [\n customSessionClient<Auth>(),\n magicLinkClient(),\n emailOTPClient(),\n passkeyClient(),\n ],\n });\n};\n\nexport type CheckoutClient = ReturnType<typeof hc<CheckoutRouter>>;\n\nexport const makeCheckoutClient = (\n baseURL: string,\n options?: ClientRequestOptions,\n): CheckoutClient => {\n return hc<CheckoutRouter>(baseURL, {\n ...options,\n fetch: (url: any, init: any) =>\n (options?.fetch ?? fetch)(url, {\n ...init,\n credentials: \"include\",\n headers: {\n ...init.headers,\n \"Content-Type\": \"application/json\",\n },\n }),\n });\n};\n\nexport type AppClient = ReturnType<typeof hc<AppRouter>>;\n\nexport const makeAppClient = (\n baseURL: string,\n options?: ClientRequestOptions,\n): AppClient => {\n return hc<AppRouter>(baseURL, {\n ...options,\n fetch: (url: any, init: any) =>\n (options?.fetch ?? fetch)(url, {\n ...init,\n credentials: \"include\",\n headers: {\n ...init.headers,\n \"Content-Type\": \"application/json\",\n },\n }),\n });\n};\n\nexport type PublicClient = ReturnType<typeof hc<PublicRouter>>;\n\nexport const makePublicClient = (\n baseURL: string,\n options?: ClientRequestOptions,\n): PublicClient => {\n return hc<PublicRouter>(baseURL, options);\n};\n"
|
|
6
6
|
],
|
|
7
|
-
"mappings": "AAAA,8BACE,qBACA,oBACA,mBACA,mCAEF,2BAAS,0BAOT,aAAS,oBAEF,
|
|
8
|
-
"debugId": "
|
|
7
|
+
"mappings": "AAAA,8BACE,qBACA,oBACA,mBACA,mCAEF,2BAAS,0BAOT,aAAS,oBAEF,IAAM,EAAyB,CAAC,IAAoB,CACzD,OAAO,EAAiB,CACtB,UACA,QAAS,CACP,EAA0B,EAC1B,EAAgB,EAChB,EAAe,EACf,EAAc,CAChB,CACF,CAAC,GAKU,EAAqB,CAChC,EACA,IACmB,CACnB,OAAO,EAAmB,EAAS,IAC9B,EACH,MAAO,CAAC,EAAU,KACf,GAAS,OAAS,OAAO,EAAK,IAC1B,EACH,YAAa,UACb,QAAS,IACJ,EAAK,QACR,eAAgB,kBAClB,CACF,CAAC,CACL,CAAC,GAKU,EAAgB,CAC3B,EACA,IACc,CACd,OAAO,EAAc,EAAS,IACzB,EACH,MAAO,CAAC,EAAU,KACf,GAAS,OAAS,OAAO,EAAK,IAC1B,EACH,YAAa,UACb,QAAS,IACJ,EAAK,QACR,eAAgB,kBAClB,CACF,CAAC,CACL,CAAC,GAKU,EAAmB,CAC9B,EACA,IACiB,CACjB,OAAO,EAAiB,EAAS,CAAO",
|
|
8
|
+
"debugId": "842F612FDD58662A64756E2164756E21",
|
|
9
9
|
"names": []
|
|
10
10
|
}
|