faire-auth 1.0.0 → 1.0.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/{access-Crt-IJ2P.cjs → access-BZ7-AbTM.cjs} +1 -1
- package/dist/{adapter-factory-DT-_2aHJ.cjs → adapter-factory-D1I7joki.cjs} +2 -2
- package/dist/adapters/drizzle-adapter/index.cjs +5 -5
- package/dist/adapters/drizzle-adapter/index.d.cts +1 -1
- package/dist/adapters/drizzle-adapter/index.d.mts +2 -2
- package/dist/adapters/drizzle-adapter/index.mjs +3 -3
- package/dist/adapters/index.cjs +4 -4
- package/dist/adapters/index.d.cts +1 -1
- package/dist/adapters/index.d.mts +2 -2
- package/dist/adapters/index.mjs +3 -3
- package/dist/adapters/kysely-adapter/index.cjs +5 -5
- package/dist/adapters/kysely-adapter/index.d.cts +1 -1
- package/dist/adapters/kysely-adapter/index.d.mts +2 -2
- package/dist/adapters/kysely-adapter/index.mjs +4 -4
- package/dist/adapters/memory-adapter/index.cjs +5 -5
- package/dist/adapters/memory-adapter/index.d.cts +1 -1
- package/dist/adapters/memory-adapter/index.d.mts +2 -2
- package/dist/adapters/memory-adapter/index.mjs +4 -4
- package/dist/adapters/mongodb-adapter/index.cjs +294 -6
- package/dist/adapters/mongodb-adapter/index.d.cts +34 -2
- package/dist/adapters/mongodb-adapter/index.d.mts +35 -3
- package/dist/adapters/mongodb-adapter/index.mjs +291 -4
- package/dist/adapters/prisma-adapter/index.cjs +5 -5
- package/dist/adapters/prisma-adapter/index.d.cts +1 -1
- package/dist/adapters/prisma-adapter/index.d.mts +2 -2
- package/dist/adapters/prisma-adapter/index.mjs +3 -3
- package/dist/adapters/test.cjs +3 -3
- package/dist/adapters/test.d.cts +1 -1
- package/dist/adapters/test.d.mts +2 -2
- package/dist/adapters/test.mjs +2 -2
- package/dist/api/index.cjs +15 -15
- package/dist/api/index.d.cts +1 -1
- package/dist/api/index.d.mts +2 -2
- package/dist/api/index.mjs +8 -8
- package/dist/api/middleware/index.cjs +8 -8
- package/dist/api/middleware/index.d.cts +3 -3
- package/dist/api/middleware/index.d.mts +4 -4
- package/dist/api/middleware/index.mjs +3 -3
- package/dist/{api-_B7qO28y.mjs → api-B4RDwBty.mjs} +7 -7
- package/dist/{api-Bm89BLgN.cjs → api-CaRC1Gio.cjs} +12 -12
- package/dist/{bearer-CHeREcGT.cjs → bearer-DDzrp5M7.cjs} +2 -2
- package/dist/{bearer-0SeEmaS4.mjs → bearer-WZcs7gxL.mjs} +1 -1
- package/dist/{bun-sqlite-dialect-wuaC2-gh.cjs → bun-sqlite-dialect-DPgTzc0w.cjs} +1 -1
- package/dist/{chunk-Ceigfy4P.mjs → chunk-BFnQceUY.mjs} +1 -13
- package/dist/{chunk-oakRccI5.cjs → chunk-fPmz2rbM.cjs} +0 -9
- package/dist/client/index.cjs +26 -7
- package/dist/client/index.d.cts +27 -4
- package/dist/client/index.d.mts +28 -5
- package/dist/client/index.mjs +25 -6
- package/dist/client/lynx/index.cjs +5 -5
- package/dist/client/lynx/index.d.cts +9 -9
- package/dist/client/lynx/index.d.mts +27 -27
- package/dist/client/lynx/index.mjs +3 -3
- package/dist/client/plugins/index.d.cts +1 -1
- package/dist/client/plugins/index.d.mts +2 -2
- package/dist/client/react/index.cjs +5 -5
- package/dist/client/react/index.d.cts +9 -9
- package/dist/client/react/index.d.mts +3 -3
- package/dist/client/react/index.mjs +3 -3
- package/dist/client/solid/index.cjs +5 -5
- package/dist/client/solid/index.d.cts +16 -16
- package/dist/client/solid/index.d.mts +17 -17
- package/dist/client/solid/index.mjs +3 -3
- package/dist/client/svelte/index.cjs +4 -4
- package/dist/client/svelte/index.d.cts +16 -16
- package/dist/client/svelte/index.d.mts +27 -27
- package/dist/client/svelte/index.mjs +3 -3
- package/dist/client/vue/index.cjs +5 -5
- package/dist/client/vue/index.d.cts +27 -27
- package/dist/client/vue/index.d.mts +28 -28
- package/dist/client/vue/index.mjs +3 -3
- package/dist/{cookies-B5xeA6i8.cjs → cookies-BTl72THv.cjs} +3 -3
- package/dist/{cookies-Ch1JfQIz.mjs → cookies-BTs1o992.mjs} +2 -2
- package/dist/crypto/index.cjs +1 -1
- package/dist/crypto/index.d.cts +2 -2
- package/dist/crypto/index.d.mts +3 -3
- package/dist/crypto/index.mjs +1 -1
- package/dist/{crypto-CyQRFtkq.mjs → crypto-DH2Aa7jN.mjs} +1 -1
- package/dist/{crypto-CcTxYH82.cjs → crypto-DpSCnrTp.cjs} +1 -1
- package/dist/db/index.cjs +10 -10
- package/dist/db/index.d.cts +1 -1
- package/dist/db/index.d.mts +2 -2
- package/dist/db/index.mjs +6 -6
- package/dist/{db-xiJtoDgz.mjs → db-4tUsQJXd.mjs} +3 -3
- package/dist/{db-BTKyYu-_.cjs → db-ChMbb_U-.cjs} +8 -8
- package/dist/{email-verification-CWhj2qfb.mjs → email-verification-C_lBu_JY.mjs} +3 -3
- package/dist/{email-verification-C-AsfJsb.cjs → email-verification-DI_0H4JC.cjs} +5 -5
- package/dist/{hono-Cdukwu5K.cjs → hono-C14rpOEa.cjs} +1 -1
- package/dist/{hono-Covz10jU.mjs → hono-CO-zsqI-.mjs} +2 -2
- package/dist/{hono-BEq1NYVX.cjs → hono-DnW5crl1.cjs} +4 -4
- package/dist/index-BC42NdCJ.d.mts +992 -0
- package/dist/{index-B-WeOMzg.d.cts → index-BNCikaaH.d.cts} +834 -834
- package/dist/{index-Qu-iJGNr.d.mts → index-BfbDrljm.d.cts} +15 -15
- package/dist/index-BotKDRUI.d.mts +13350 -0
- package/dist/index-CL5oW5Uh.d.cts +13350 -0
- package/dist/index-ClFGA8tb.d.mts +33 -0
- package/dist/index-DCuvAh3N.d.mts +992 -0
- package/dist/{index-jlessPI0.d.mts → index-DK2ECcVe.d.mts} +382 -382
- package/dist/{index-B09P9p5_.d.cts → index-Dsua4U8w.d.cts} +6 -6
- package/dist/index-KQ5RLFjm.d.cts +33 -0
- package/dist/{index-BVHscLQl.d.cts → index-w-IdIOQJ.d.cts} +15 -15
- package/dist/{index-ppgcFe12.d.mts → index-ztVZPQdV.d.mts} +6 -6
- package/dist/index.cjs +721 -27
- package/dist/index.d.cts +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +711 -16
- package/dist/integrations/next-js.cjs +3 -3
- package/dist/integrations/next-js.d.cts +3 -3
- package/dist/integrations/next-js.d.mts +6 -6
- package/dist/integrations/next-js.mjs +2 -2
- package/dist/integrations/node.d.cts +1 -1
- package/dist/integrations/node.d.mts +2 -2
- package/dist/integrations/react-start.cjs +3 -3
- package/dist/integrations/react-start.d.cts +5 -5
- package/dist/integrations/react-start.d.mts +6 -6
- package/dist/integrations/react-start.mjs +2 -2
- package/dist/integrations/svelte-kit.cjs +3 -3
- package/dist/integrations/svelte-kit.d.cts +5 -5
- package/dist/integrations/svelte-kit.d.mts +6 -6
- package/dist/integrations/svelte-kit.mjs +2 -2
- package/dist/{ip-B5SwXaMB.cjs → ip-C17Qdq-G.cjs} +2 -2
- package/dist/{json-CcJ2HjGo.cjs → json--tl7Grvs.cjs} +1 -1
- package/dist/{kysely-adapter-DRuoT_X8.mjs → kysely-adapter-CtIdoHa8.mjs} +3 -3
- package/dist/{kysely-adapter-Bxi7sPdG.cjs → kysely-adapter-QZTx077T.cjs} +4 -4
- package/dist/{logged-DQK3C64b.cjs → logged-Dv3st5qc.cjs} +1 -1
- package/dist/{memory-adapter-BlnDIAAX.cjs → memory-adapter-17RZd5df.cjs} +2 -2
- package/dist/{memory-adapter-Db3tsJTn.mjs → memory-adapter-Dp4XdCZK.mjs} +1 -1
- package/dist/{node-sqlite-dialect-mJWC8LWQ.cjs → node-sqlite-dialect-DP11CB0y.cjs} +1 -1
- package/dist/oauth2/index.cjs +11 -11
- package/dist/oauth2/index.d.cts +1 -1
- package/dist/oauth2/index.d.mts +2 -2
- package/dist/oauth2/index.mjs +6 -6
- package/dist/{oauth2-BLeOEi7Y.cjs → oauth2-5RL4cVNS.cjs} +3 -3
- package/dist/{oauth2-B8M0lW9l.mjs → oauth2-C56wz-n9.mjs} +2 -2
- package/dist/{origin-check-id9lTnqZ.cjs → origin-check-DjLTuZQ8.cjs} +2 -2
- package/dist/{passkey-B6N20LSS.cjs → passkey-BTT-v5c-.cjs} +4 -4
- package/dist/{passkey-DJsR_GX3.mjs → passkey-CzY_W2us.mjs} +2 -2
- package/dist/plugins/access/index.cjs +1 -1
- package/dist/plugins/access/index.d.cts +1 -1
- package/dist/plugins/access/index.d.mts +1 -1
- package/dist/plugins/access/index.mjs +1 -1
- package/dist/plugins/bearer/index.cjs +4 -4
- package/dist/plugins/bearer/index.d.cts +2 -2
- package/dist/plugins/bearer/index.d.mts +3 -3
- package/dist/plugins/bearer/index.mjs +3 -3
- package/dist/plugins/index.cjs +5215 -31
- package/dist/plugins/index.d.cts +270 -270
- package/dist/plugins/index.d.mts +352 -352
- package/dist/plugins/index.mjs +5202 -19
- package/dist/plugins/passkey/index.cjs +10 -10
- package/dist/plugins/passkey/index.d.cts +2 -2
- package/dist/plugins/passkey/index.d.mts +3 -3
- package/dist/plugins/passkey/index.mjs +5 -5
- package/dist/{schema-D-qjygfE.cjs → schema-CirKflVs.cjs} +2 -2
- package/dist/{session-rH8ougDl.mjs → session-CM3rmOYF.mjs} +1 -1
- package/dist/{session-De9POJTW.cjs → session-Cwrj4GfV.cjs} +5 -5
- package/dist/social-providers/index.cjs +1 -1
- package/dist/social-providers/index.d.cts +1 -1
- package/dist/social-providers/index.d.mts +1 -1
- package/dist/social-providers/index.mjs +1 -1
- package/dist/{social-providers-DoYJhBe3.mjs → social-providers-B8RK5yqI.mjs} +1 -1
- package/dist/{social-providers-DcFNUT0S.cjs → social-providers-BmFOIIPk.cjs} +1 -1
- package/dist/{state-CqJfCIl9.mjs → state-CQghgH9I.mjs} +1 -1
- package/dist/{state--f7fwIGh.cjs → state-CvSihlVT.cjs} +2 -2
- package/dist/test-utils/bun-sqlite-dialect-BSWhhKNs.mjs +155 -0
- package/dist/test-utils/bun-sqlite-dialect-BZBvHchL.cjs +156 -0
- package/dist/test-utils/index.cjs +8927 -482
- package/dist/test-utils/index.d.cts +8637 -579
- package/dist/test-utils/index.d.mts +8636 -576
- package/dist/test-utils/index.mjs +8712 -265
- package/dist/test-utils/node-sqlite-dialect-BgJqjBOu.cjs +156 -0
- package/dist/test-utils/node-sqlite-dialect-DAQXiobH.mjs +155 -0
- package/dist/types/index.d.cts +1 -1
- package/dist/types/index.d.mts +2 -2
- package/dist/{url-D2yvKaM7.cjs → url-Ce7CVaQD.cjs} +1 -1
- package/dist/utils/cookies.cjs +4 -4
- package/dist/utils/cookies.d.cts +1 -1
- package/dist/utils/cookies.d.mts +2 -2
- package/dist/utils/cookies.mjs +2 -2
- package/package.json +2 -2
- package/dist/auth-Bo9PDt5j.cjs +0 -739
- package/dist/auth-Ds4AG4h4.mjs +0 -709
- package/dist/index-C2-2QDyS.d.cts +0 -35
- package/dist/index-CWAqWfoZ.d.cts +0 -27
- package/dist/index-CYSShrFx.d.mts +0 -27
- package/dist/index-to0RO38U.d.mts +0 -35
- package/dist/mongodb-adapter-C_qGQED5.mjs +0 -291
- package/dist/mongodb-adapter-C_qfK87x.cjs +0 -297
- package/dist/plugins-C1lm2Wj3.cjs +0 -5254
- package/dist/plugins-Dai1QkRU.mjs +0 -5199
- package/dist/vanilla-Bu2PmFzE.cjs +0 -30
- package/dist/vanilla-TfHqeiC7.mjs +0 -25
- /package/dist/{access-B5bBI4uT.mjs → access-D0DRqUKC.mjs} +0 -0
- /package/dist/{adapter-factory-BXei1QRX.mjs → adapter-factory-lKIOf2OR.mjs} +0 -0
- /package/dist/{bun-sqlite-dialect-CfkBo2v5.mjs → bun-sqlite-dialect-6NqeV3px.mjs} +0 -0
- /package/dist/{defu-B0Svx_x4.cjs → defu-BmOYq4PU.cjs} +0 -0
- /package/dist/{defu-SZkpHhbR.mjs → defu-D9ZTXqlo.mjs} +0 -0
- /package/dist/{hono-DuE14mmj.d.mts → hono-D0VqxVy1.d.mts} +0 -0
- /package/dist/{index-B5_0QTLg.d.mts → index-BDhhaE6Y.d.cts} +0 -0
- /package/dist/{index-B7SKyR_a.d.cts → index-CF9iq55a.d.mts} +0 -0
- /package/dist/{index-CTwrVluH.d.mts → index-CRt_fppq.d.mts} +0 -0
- /package/dist/{index-cs4Sh0En.d.cts → index-CdLyn7qP.d.cts} +0 -0
- /package/dist/{node-sqlite-dialect-BfBzyOAg.mjs → node-sqlite-dialect-w4DAg0PH.mjs} +0 -0
- /package/dist/{parser-CeAer-RM.mjs → parser-B25ylT5u.mjs} +0 -0
- /package/dist/{parser-CdncAl9i.cjs → parser-B_wxvaAr.cjs} +0 -0
|
@@ -5,9 +5,6 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
5
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
6
|
var __getProtoOf = Object.getPrototypeOf;
|
|
7
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __commonJS = (cb, mod) => function() {
|
|
9
|
-
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
10
|
-
};
|
|
11
8
|
var __export = (all) => {
|
|
12
9
|
let target = {};
|
|
13
10
|
for (var name in all) __defProp(target, name, {
|
|
@@ -34,12 +31,6 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
34
31
|
|
|
35
32
|
//#endregion
|
|
36
33
|
|
|
37
|
-
Object.defineProperty(exports, '__commonJS', {
|
|
38
|
-
enumerable: true,
|
|
39
|
-
get: function () {
|
|
40
|
-
return __commonJS;
|
|
41
|
-
}
|
|
42
|
-
});
|
|
43
34
|
Object.defineProperty(exports, '__export', {
|
|
44
35
|
enumerable: true,
|
|
45
36
|
get: function () {
|
package/dist/client/index.cjs
CHANGED
|
@@ -1,11 +1,30 @@
|
|
|
1
|
-
require('../logged-
|
|
2
|
-
require('../url-
|
|
1
|
+
const require_logged = require('../logged-Dv3st5qc.cjs');
|
|
2
|
+
const require_url = require('../url-Ce7CVaQD.cjs');
|
|
3
3
|
require('../request-CPNlp-DK.cjs');
|
|
4
|
-
require('../defu-
|
|
5
|
-
const require_hono = require('../hono-
|
|
6
|
-
require('../parser-
|
|
7
|
-
const require_vanilla = require('../vanilla-Bu2PmFzE.cjs');
|
|
4
|
+
require('../defu-BmOYq4PU.cjs');
|
|
5
|
+
const require_hono = require('../hono-DnW5crl1.cjs');
|
|
6
|
+
require('../parser-B_wxvaAr.cjs');
|
|
8
7
|
|
|
8
|
+
//#region src/client/vanilla.ts
|
|
9
|
+
const capitalizeFirstLetter = (str) => str.charAt(0).toUpperCase() + str.slice(1);
|
|
10
|
+
const createAuthClient = () => (options) => {
|
|
11
|
+
const baseURL = require_url.getBaseURL(options.baseURL, options.basePath);
|
|
12
|
+
const { pluginsActions, pluginsAtoms, $fetch, atomListeners, $store } = require_hono.getClientConfig(options);
|
|
13
|
+
let resolvedHooks = {};
|
|
14
|
+
for (const [key, value] of Object.entries(pluginsAtoms)) resolvedHooks[`use${capitalizeFirstLetter(key)}`] = value;
|
|
15
|
+
const routes = {
|
|
16
|
+
...pluginsActions,
|
|
17
|
+
...resolvedHooks,
|
|
18
|
+
$fetch,
|
|
19
|
+
$store
|
|
20
|
+
};
|
|
21
|
+
return require_hono.createHonoClient({
|
|
22
|
+
baseURL,
|
|
23
|
+
createFetchOptions: options.fetchOptions
|
|
24
|
+
}, routes, require_logged.logged_default.wrap($fetch, "fetch", "immediate"), pluginsAtoms, atomListeners);
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
//#endregion
|
|
9
28
|
//#region src/client/index.ts
|
|
10
29
|
const InferPlugin = () => ({
|
|
11
30
|
id: "infer-server-plugin",
|
|
@@ -18,5 +37,5 @@ function InferAuth() {
|
|
|
18
37
|
//#endregion
|
|
19
38
|
exports.InferAuth = InferAuth;
|
|
20
39
|
exports.InferPlugin = InferPlugin;
|
|
21
|
-
exports.createAuthClient =
|
|
40
|
+
exports.createAuthClient = createAuthClient;
|
|
22
41
|
exports.useAuthQuery = require_hono.useAuthQuery;
|
package/dist/client/index.d.cts
CHANGED
|
@@ -1,8 +1,31 @@
|
|
|
1
|
-
import { $ as Client, Q as CamelCase, X as createAuthClient, Y as InferResolvedHooks, Z as AtomListener, at as InferAdditionalAsClient, ct as InferPluginsFromClient, dt as IsSignal, et as ClientOptions, ft as RevalidateOptions, ht as FetchOptions, it as InferActions, lt as InferSessionFromClient, mt as Store, nt as FaireAuthClientPlugin, ot as InferAdditionalFromClient, pt as SessionQueryParams, rt as Inc, st as InferErrorCodes, tt as CreateSchemaType, ut as InferUserFromClient } from "../index-
|
|
1
|
+
import { $ as Client, I as FaireAuthOptions, Q as CamelCase, X as createAuthClient, Y as InferResolvedHooks, Z as AtomListener, _t as FaireAuthPlugin, at as InferAdditionalAsClient, ct as InferPluginsFromClient, dt as IsSignal, et as ClientOptions, ft as RevalidateOptions, ht as FetchOptions, it as InferActions, lt as InferSessionFromClient, mt as Store, nt as FaireAuthClientPlugin, ot as InferAdditionalFromClient, pt as SessionQueryParams, rt as Inc, st as InferErrorCodes, tt as CreateSchemaType, ut as InferUserFromClient } from "../index-BNCikaaH.cjs";
|
|
2
2
|
import "../hono-DOM31WQz.cjs";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { t as index_d_exports } from "../index-BDhhaE6Y.cjs";
|
|
4
|
+
import { BetterFetch, BetterFetchError, BetterFetchOption } from "@better-fetch/fetch";
|
|
5
|
+
import { PreinitializedWritableAtom } from "nanostores";
|
|
5
6
|
export * from "@better-fetch/fetch";
|
|
6
7
|
export * from "nanostores";
|
|
8
|
+
|
|
9
|
+
//#region src/client/query.d.ts
|
|
10
|
+
declare const useAuthQuery: <T>(initializedAtom: PreinitializedWritableAtom<any> | PreinitializedWritableAtom<any>[], path: string, $fetch: BetterFetch, options?: ((value: {
|
|
11
|
+
data: null | T;
|
|
12
|
+
error: BetterFetchError | null;
|
|
13
|
+
isPending: boolean;
|
|
14
|
+
}) => BetterFetchOption) | BetterFetchOption) => PreinitializedWritableAtom<{
|
|
15
|
+
data: null | T;
|
|
16
|
+
error: BetterFetchError | null;
|
|
17
|
+
isPending: boolean;
|
|
18
|
+
isRefetching: boolean;
|
|
19
|
+
refetch: () => void;
|
|
20
|
+
}> & object;
|
|
21
|
+
//#endregion
|
|
22
|
+
//#region src/client/index.d.ts
|
|
23
|
+
declare const InferPlugin: <T extends FaireAuthPlugin>() => {
|
|
24
|
+
id: "infer-server-plugin";
|
|
25
|
+
$InferServerPlugin: T;
|
|
26
|
+
};
|
|
27
|
+
declare function InferAuth<O extends {
|
|
28
|
+
options: FaireAuthOptions;
|
|
29
|
+
}>(): O["options"];
|
|
7
30
|
type SocialProvider = index_d_exports.SocialProvider;
|
|
8
|
-
export { AtomListener, CamelCase, Client, ClientOptions, CreateSchemaType, FaireAuthClientPlugin, FetchOptions, Inc, InferActions, InferAdditionalAsClient, InferAdditionalFromClient, InferAuth, InferErrorCodes, InferPlugin, InferPluginsFromClient, InferResolvedHooks, InferSessionFromClient, InferUserFromClient, IsSignal, RevalidateOptions, SessionQueryParams, SocialProvider, Store, createAuthClient, useAuthQuery };
|
|
31
|
+
export { AtomListener, CamelCase, Client, ClientOptions, CreateSchemaType, FaireAuthClientPlugin, type FetchOptions, Inc, InferActions, InferAdditionalAsClient, InferAdditionalFromClient, InferAuth, InferErrorCodes, InferPlugin, InferPluginsFromClient, InferResolvedHooks, InferSessionFromClient, InferUserFromClient, IsSignal, RevalidateOptions, SessionQueryParams, type SocialProvider, Store, createAuthClient, useAuthQuery };
|
package/dist/client/index.d.mts
CHANGED
|
@@ -1,8 +1,31 @@
|
|
|
1
|
-
import { $ as Client, Q as CamelCase, X as createAuthClient, Y as InferResolvedHooks, Z as AtomListener, at as InferAdditionalAsClient, ct as InferPluginsFromClient, dt as IsSignal, et as ClientOptions, ft as RevalidateOptions, ht as FetchOptions, it as InferActions, lt as InferSessionFromClient, mt as Store, nt as FaireAuthClientPlugin, ot as InferAdditionalFromClient, pt as SessionQueryParams, rt as Inc, st as InferErrorCodes, tt as CreateSchemaType, ut as InferUserFromClient } from "../index-
|
|
2
|
-
import "../hono-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { $ as Client, I as FaireAuthOptions, Q as CamelCase, X as createAuthClient, Y as InferResolvedHooks, Z as AtomListener, _t as FaireAuthPlugin, at as InferAdditionalAsClient, ct as InferPluginsFromClient, dt as IsSignal, et as ClientOptions, ft as RevalidateOptions, ht as FetchOptions, it as InferActions, lt as InferSessionFromClient, mt as Store, nt as FaireAuthClientPlugin, ot as InferAdditionalFromClient, pt as SessionQueryParams, rt as Inc, st as InferErrorCodes, tt as CreateSchemaType, ut as InferUserFromClient } from "../index-BotKDRUI.mjs";
|
|
2
|
+
import "../hono-D0VqxVy1.mjs";
|
|
3
|
+
import { t as index_d_exports } from "../index-CF9iq55a.mjs";
|
|
4
|
+
import { BetterFetch, BetterFetchError, BetterFetchOption } from "@better-fetch/fetch";
|
|
5
|
+
import { PreinitializedWritableAtom } from "nanostores";
|
|
5
6
|
export * from "@better-fetch/fetch";
|
|
6
7
|
export * from "nanostores";
|
|
8
|
+
|
|
9
|
+
//#region src/client/query.d.ts
|
|
10
|
+
declare const useAuthQuery: <T>(initializedAtom: PreinitializedWritableAtom<any> | PreinitializedWritableAtom<any>[], path: string, $fetch: BetterFetch, options?: ((value: {
|
|
11
|
+
data: null | T;
|
|
12
|
+
error: BetterFetchError | null;
|
|
13
|
+
isPending: boolean;
|
|
14
|
+
}) => BetterFetchOption) | BetterFetchOption) => PreinitializedWritableAtom<{
|
|
15
|
+
data: null | T;
|
|
16
|
+
error: BetterFetchError | null;
|
|
17
|
+
isPending: boolean;
|
|
18
|
+
isRefetching: boolean;
|
|
19
|
+
refetch: () => void;
|
|
20
|
+
}> & object;
|
|
21
|
+
//#endregion
|
|
22
|
+
//#region src/client/index.d.ts
|
|
23
|
+
declare const InferPlugin: <T extends FaireAuthPlugin>() => {
|
|
24
|
+
id: "infer-server-plugin";
|
|
25
|
+
$InferServerPlugin: T;
|
|
26
|
+
};
|
|
27
|
+
declare function InferAuth<O extends {
|
|
28
|
+
options: FaireAuthOptions;
|
|
29
|
+
}>(): O["options"];
|
|
7
30
|
type SocialProvider = index_d_exports.SocialProvider;
|
|
8
|
-
export { AtomListener, CamelCase, Client, ClientOptions, CreateSchemaType, FaireAuthClientPlugin, FetchOptions, Inc, InferActions, InferAdditionalAsClient, InferAdditionalFromClient, InferAuth, InferErrorCodes, InferPlugin, InferPluginsFromClient, InferResolvedHooks, InferSessionFromClient, InferUserFromClient, IsSignal, RevalidateOptions, SessionQueryParams, SocialProvider, Store, createAuthClient, useAuthQuery };
|
|
31
|
+
export { AtomListener, CamelCase, Client, ClientOptions, CreateSchemaType, FaireAuthClientPlugin, type FetchOptions, Inc, InferActions, InferAdditionalAsClient, InferAdditionalFromClient, InferAuth, InferErrorCodes, InferPlugin, InferPluginsFromClient, InferResolvedHooks, InferSessionFromClient, InferUserFromClient, IsSignal, RevalidateOptions, SessionQueryParams, type SocialProvider, Store, createAuthClient, useAuthQuery };
|
package/dist/client/index.mjs
CHANGED
|
@@ -1,11 +1,30 @@
|
|
|
1
|
-
import "../logged-CyGfp8_H.mjs";
|
|
2
|
-
import "../url-BoUuoIwZ.mjs";
|
|
1
|
+
import { t as logged_default } from "../logged-CyGfp8_H.mjs";
|
|
2
|
+
import { t as getBaseURL } from "../url-BoUuoIwZ.mjs";
|
|
3
3
|
import "../request-1NL_1lyJ.mjs";
|
|
4
|
-
import "../defu-
|
|
5
|
-
import { r as useAuthQuery } from "../hono-
|
|
6
|
-
import "../parser-
|
|
7
|
-
import { t as createAuthClient } from "../vanilla-TfHqeiC7.mjs";
|
|
4
|
+
import "../defu-D9ZTXqlo.mjs";
|
|
5
|
+
import { n as getClientConfig, r as useAuthQuery, t as createHonoClient } from "../hono-CO-zsqI-.mjs";
|
|
6
|
+
import "../parser-B25ylT5u.mjs";
|
|
8
7
|
|
|
8
|
+
//#region src/client/vanilla.ts
|
|
9
|
+
const capitalizeFirstLetter = (str) => str.charAt(0).toUpperCase() + str.slice(1);
|
|
10
|
+
const createAuthClient = () => (options) => {
|
|
11
|
+
const baseURL = getBaseURL(options.baseURL, options.basePath);
|
|
12
|
+
const { pluginsActions, pluginsAtoms, $fetch, atomListeners, $store } = getClientConfig(options);
|
|
13
|
+
let resolvedHooks = {};
|
|
14
|
+
for (const [key, value] of Object.entries(pluginsAtoms)) resolvedHooks[`use${capitalizeFirstLetter(key)}`] = value;
|
|
15
|
+
const routes = {
|
|
16
|
+
...pluginsActions,
|
|
17
|
+
...resolvedHooks,
|
|
18
|
+
$fetch,
|
|
19
|
+
$store
|
|
20
|
+
};
|
|
21
|
+
return createHonoClient({
|
|
22
|
+
baseURL,
|
|
23
|
+
createFetchOptions: options.fetchOptions
|
|
24
|
+
}, routes, logged_default.wrap($fetch, "fetch", "immediate"), pluginsAtoms, atomListeners);
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
//#endregion
|
|
9
28
|
//#region src/client/index.ts
|
|
10
29
|
const InferPlugin = () => ({
|
|
11
30
|
id: "infer-server-plugin",
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
const require_chunk = require('../../chunk-
|
|
2
|
-
const require_url = require('../../url-
|
|
1
|
+
const require_chunk = require('../../chunk-fPmz2rbM.cjs');
|
|
2
|
+
const require_url = require('../../url-Ce7CVaQD.cjs');
|
|
3
3
|
require('../../request-CPNlp-DK.cjs');
|
|
4
|
-
require('../../defu-
|
|
5
|
-
const require_hono = require('../../hono-
|
|
6
|
-
require('../../parser-
|
|
4
|
+
require('../../defu-BmOYq4PU.cjs');
|
|
5
|
+
const require_hono = require('../../hono-DnW5crl1.cjs');
|
|
6
|
+
require('../../parser-B_wxvaAr.cjs');
|
|
7
7
|
let nanostores = require("nanostores");
|
|
8
8
|
let __lynx_js_react = require("@lynx-js/react");
|
|
9
9
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { $ as Client, B as DefaultApp, dt as IsSignal, et as ClientOptions, it as InferActions, nt as FaireAuthClientPlugin, pt as SessionQueryParams, st as InferErrorCodes } from "../../index-
|
|
1
|
+
import { $ as Client, B as DefaultApp, dt as IsSignal, et as ClientOptions, it as InferActions, nt as FaireAuthClientPlugin, pt as SessionQueryParams, st as InferErrorCodes } from "../../index-BNCikaaH.cjs";
|
|
2
2
|
import "../../hono-DOM31WQz.cjs";
|
|
3
|
-
import * as
|
|
3
|
+
import * as _faire_auth_core_types35 from "@faire-auth/core/types";
|
|
4
4
|
import { AnyHono, Prettify, UnionToIntersection } from "@faire-auth/core/types";
|
|
5
|
-
import * as
|
|
5
|
+
import * as hono38 from "hono";
|
|
6
6
|
import { Hono } from "hono";
|
|
7
7
|
import * as _faire_auth_core_db1 from "@faire-auth/core/db";
|
|
8
8
|
import { BASE_ERROR_CODES } from "@faire-auth/core/error";
|
|
@@ -59,9 +59,9 @@ declare function useStore<SomeStore extends Store>(store: SomeStore, options?: U
|
|
|
59
59
|
//#region src/client/lynx/index.d.ts
|
|
60
60
|
declare function capitalizeFirstLetter(str: string): string;
|
|
61
61
|
type InferResolvedHooks<O extends ClientOptions> = O["plugins"] extends Array<infer Plugin> ? Plugin extends FaireAuthClientPlugin ? Plugin["getAtoms"] extends ((fetch: any) => infer Atoms) ? Atoms extends Record<string, any> ? { [key in keyof Atoms as IsSignal<key> extends true ? never : key extends string ? `use${Capitalize<key>}` : never]: () => ReturnType<Atoms[key]["get"]> } : {} : {} : {} : {};
|
|
62
|
-
declare const createAuthClient: <App extends AnyHono = DefaultApp>() => <Option extends ClientOptions>(options: Option) => UnionToIntersection<InferResolvedHooks<Option>> & (App extends Hono<any, infer S extends
|
|
62
|
+
declare const createAuthClient: <App extends AnyHono = DefaultApp>() => <Option extends ClientOptions>(options: Option) => UnionToIntersection<InferResolvedHooks<Option>> & (App extends Hono<any, infer S extends hono38.Schema, infer P extends string> ? Client<S, P, Option> : never) & InferActions<Option> & {
|
|
63
63
|
useSession: () => {
|
|
64
|
-
data: App extends Hono<any, infer S_1 extends
|
|
64
|
+
data: App extends Hono<any, infer S_1 extends hono38.Schema, infer P_1 extends string> ? (S_1[`${P_1}/get-session`]["$get"]["output"] & {
|
|
65
65
|
success: true;
|
|
66
66
|
})["data"] : never;
|
|
67
67
|
isPending: boolean;
|
|
@@ -71,7 +71,7 @@ declare const createAuthClient: <App extends AnyHono = DefaultApp>() => <Option
|
|
|
71
71
|
}) => void;
|
|
72
72
|
};
|
|
73
73
|
$Infer: {
|
|
74
|
-
Session: NonNullable<App extends Hono<any, infer S_1 extends
|
|
74
|
+
Session: NonNullable<App extends Hono<any, infer S_1 extends hono38.Schema, infer P_1 extends string> ? (S_1[`${P_1}/get-session`]["$get"]["output"] & {
|
|
75
75
|
success: true;
|
|
76
76
|
})["data"] : never>;
|
|
77
77
|
};
|
|
@@ -127,15 +127,15 @@ declare const createAuthClient: <App extends AnyHono = DefaultApp>() => <Option
|
|
|
127
127
|
retryAttempt?: number;
|
|
128
128
|
errorSchema?: _better_fetch_fetch9.StandardSchemaV1;
|
|
129
129
|
disableValidation?: boolean;
|
|
130
|
-
catchAllError?: boolean;
|
|
131
130
|
defaultOutput?: _better_fetch_fetch9.StandardSchemaV1;
|
|
132
131
|
defaultError?: _better_fetch_fetch9.StandardSchemaV1;
|
|
132
|
+
catchAllError?: boolean;
|
|
133
133
|
schema?: _better_fetch_fetch9.Schema;
|
|
134
134
|
customFetchImpl: any;
|
|
135
135
|
}, unknown, unknown, _better_fetch_fetch9.Schema>;
|
|
136
136
|
$store: {
|
|
137
|
-
notify: (signal?:
|
|
138
|
-
listen: (signal:
|
|
137
|
+
notify: (signal?: _faire_auth_core_types35.LiteralStringUnion<"$sessionSignal">) => void;
|
|
138
|
+
listen: (signal: _faire_auth_core_types35.LiteralStringUnion<"$sessionSignal">, listener: (value: boolean, oldValue?: boolean | undefined) => void) => void;
|
|
139
139
|
atoms: {
|
|
140
140
|
session: nanostores2.PreinitializedWritableAtom<{
|
|
141
141
|
data: {
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { $ as Client, B as DefaultApp, dt as IsSignal, et as ClientOptions, it as InferActions, nt as FaireAuthClientPlugin, pt as SessionQueryParams, st as InferErrorCodes } from "../../index-
|
|
2
|
-
import "../../hono-
|
|
1
|
+
import { $ as Client, B as DefaultApp, dt as IsSignal, et as ClientOptions, it as InferActions, nt as FaireAuthClientPlugin, pt as SessionQueryParams, st as InferErrorCodes } from "../../index-BotKDRUI.mjs";
|
|
2
|
+
import "../../hono-D0VqxVy1.mjs";
|
|
3
3
|
import { BASE_ERROR_CODES } from "@faire-auth/core/error";
|
|
4
|
-
import * as
|
|
4
|
+
import * as hono67 from "hono";
|
|
5
5
|
import { Hono } from "hono";
|
|
6
|
-
import * as
|
|
7
|
-
import * as
|
|
6
|
+
import * as _faire_auth_core_db9 from "@faire-auth/core/db";
|
|
7
|
+
import * as _better_fetch_fetch39 from "@better-fetch/fetch";
|
|
8
8
|
import { BetterFetchError } from "@better-fetch/fetch";
|
|
9
|
-
import * as
|
|
9
|
+
import * as nanostores8 from "nanostores";
|
|
10
10
|
import { Store, StoreValue } from "nanostores";
|
|
11
11
|
import { DependencyList } from "@lynx-js/react";
|
|
12
|
-
import * as
|
|
12
|
+
import * as _faire_auth_core_types43 from "@faire-auth/core/types";
|
|
13
13
|
import { AnyHono, Prettify, UnionToIntersection } from "@faire-auth/core/types";
|
|
14
14
|
export * from "@better-fetch/fetch";
|
|
15
15
|
export * from "nanostores";
|
|
@@ -59,9 +59,9 @@ declare function useStore<SomeStore extends Store>(store: SomeStore, options?: U
|
|
|
59
59
|
//#region src/client/lynx/index.d.ts
|
|
60
60
|
declare function capitalizeFirstLetter(str: string): string;
|
|
61
61
|
type InferResolvedHooks<O extends ClientOptions> = O["plugins"] extends Array<infer Plugin> ? Plugin extends FaireAuthClientPlugin ? Plugin["getAtoms"] extends ((fetch: any) => infer Atoms) ? Atoms extends Record<string, any> ? { [key in keyof Atoms as IsSignal<key> extends true ? never : key extends string ? `use${Capitalize<key>}` : never]: () => ReturnType<Atoms[key]["get"]> } : {} : {} : {} : {};
|
|
62
|
-
declare const createAuthClient: <App extends AnyHono = DefaultApp>() => <Option extends ClientOptions>(options: Option) => UnionToIntersection<InferResolvedHooks<Option>> & (App extends Hono<any, infer S extends
|
|
62
|
+
declare const createAuthClient: <App extends AnyHono = DefaultApp>() => <Option extends ClientOptions>(options: Option) => UnionToIntersection<InferResolvedHooks<Option>> & (App extends Hono<any, infer S extends hono67.Schema, infer P extends string> ? Client<S, P, Option> : never) & InferActions<Option> & {
|
|
63
63
|
useSession: () => {
|
|
64
|
-
data: App extends Hono<any, infer S_1 extends
|
|
64
|
+
data: App extends Hono<any, infer S_1 extends hono67.Schema, infer P_1 extends string> ? (S_1[`${P_1}/get-session`]["$get"]["output"] & {
|
|
65
65
|
success: true;
|
|
66
66
|
})["data"] : never;
|
|
67
67
|
isPending: boolean;
|
|
@@ -71,18 +71,18 @@ declare const createAuthClient: <App extends AnyHono = DefaultApp>() => <Option
|
|
|
71
71
|
}) => void;
|
|
72
72
|
};
|
|
73
73
|
$Infer: {
|
|
74
|
-
Session: NonNullable<App extends Hono<any, infer S_1 extends
|
|
74
|
+
Session: NonNullable<App extends Hono<any, infer S_1 extends hono67.Schema, infer P_1 extends string> ? (S_1[`${P_1}/get-session`]["$get"]["output"] & {
|
|
75
75
|
success: true;
|
|
76
76
|
})["data"] : never>;
|
|
77
77
|
};
|
|
78
|
-
$fetch:
|
|
79
|
-
plugins: (
|
|
78
|
+
$fetch: _better_fetch_fetch39.BetterFetch<{
|
|
79
|
+
plugins: (_better_fetch_fetch39.BetterFetchPlugin | {
|
|
80
80
|
id: string;
|
|
81
81
|
name: string;
|
|
82
82
|
hooks: {};
|
|
83
83
|
})[];
|
|
84
84
|
method: string;
|
|
85
|
-
output?:
|
|
85
|
+
output?: _better_fetch_fetch39.StandardSchemaV1 | typeof Blob | typeof File;
|
|
86
86
|
query?: any;
|
|
87
87
|
baseURL: string;
|
|
88
88
|
headers?: HeadersInit & (HeadersInit | {
|
|
@@ -116,39 +116,39 @@ declare const createAuthClient: <App extends AnyHono = DefaultApp>() => <Option
|
|
|
116
116
|
referrer?: string;
|
|
117
117
|
referrerPolicy?: ReferrerPolicy;
|
|
118
118
|
signal?: AbortSignal | null;
|
|
119
|
-
onRetry?: (response:
|
|
119
|
+
onRetry?: (response: _better_fetch_fetch39.ResponseContext) => Promise<void> | void;
|
|
120
120
|
hookOptions?: {
|
|
121
121
|
cloneResponse?: boolean;
|
|
122
122
|
};
|
|
123
123
|
timeout?: number;
|
|
124
124
|
duplex?: "full" | "half";
|
|
125
125
|
jsonParser: (text: string) => Promise<any> | any;
|
|
126
|
-
retry?:
|
|
126
|
+
retry?: _better_fetch_fetch39.RetryOptions;
|
|
127
127
|
retryAttempt?: number;
|
|
128
|
-
errorSchema?:
|
|
128
|
+
errorSchema?: _better_fetch_fetch39.StandardSchemaV1;
|
|
129
129
|
disableValidation?: boolean;
|
|
130
|
+
defaultOutput?: _better_fetch_fetch39.StandardSchemaV1;
|
|
131
|
+
defaultError?: _better_fetch_fetch39.StandardSchemaV1;
|
|
130
132
|
catchAllError?: boolean;
|
|
131
|
-
|
|
132
|
-
defaultError?: _better_fetch_fetch0.StandardSchemaV1;
|
|
133
|
-
schema?: _better_fetch_fetch0.Schema;
|
|
133
|
+
schema?: _better_fetch_fetch39.Schema;
|
|
134
134
|
customFetchImpl: any;
|
|
135
|
-
}, unknown, unknown,
|
|
135
|
+
}, unknown, unknown, _better_fetch_fetch39.Schema>;
|
|
136
136
|
$store: {
|
|
137
|
-
notify: (signal?:
|
|
138
|
-
listen: (signal:
|
|
137
|
+
notify: (signal?: _faire_auth_core_types43.LiteralStringUnion<"$sessionSignal">) => void;
|
|
138
|
+
listen: (signal: _faire_auth_core_types43.LiteralStringUnion<"$sessionSignal">, listener: (value: boolean, oldValue?: boolean | undefined) => void) => void;
|
|
139
139
|
atoms: {
|
|
140
|
-
session:
|
|
140
|
+
session: nanostores8.PreinitializedWritableAtom<{
|
|
141
141
|
data: {
|
|
142
|
-
user:
|
|
143
|
-
session:
|
|
142
|
+
user: _faire_auth_core_db9.User;
|
|
143
|
+
session: _faire_auth_core_db9.Session;
|
|
144
144
|
} | null;
|
|
145
145
|
error: BetterFetchError | null;
|
|
146
146
|
isPending: boolean;
|
|
147
147
|
isRefetching: boolean;
|
|
148
148
|
refetch: () => void;
|
|
149
149
|
}> & object;
|
|
150
|
-
$sessionSignal:
|
|
151
|
-
} & Record<string,
|
|
150
|
+
$sessionSignal: nanostores8.PreinitializedWritableAtom<boolean> & object;
|
|
151
|
+
} & Record<string, nanostores8.WritableAtom<any>>;
|
|
152
152
|
};
|
|
153
153
|
$ERROR_CODES: Prettify<InferErrorCodes<Option> & typeof BASE_ERROR_CODES>;
|
|
154
154
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { t as getBaseURL } from "../../url-BoUuoIwZ.mjs";
|
|
2
2
|
import "../../request-1NL_1lyJ.mjs";
|
|
3
|
-
import "../../defu-
|
|
4
|
-
import { n as getClientConfig, t as createHonoClient } from "../../hono-
|
|
5
|
-
import "../../parser-
|
|
3
|
+
import "../../defu-D9ZTXqlo.mjs";
|
|
4
|
+
import { n as getClientConfig, t as createHonoClient } from "../../hono-CO-zsqI-.mjs";
|
|
5
|
+
import "../../parser-B25ylT5u.mjs";
|
|
6
6
|
import { listenKeys } from "nanostores";
|
|
7
7
|
import { useCallback, useRef, useSyncExternalStore } from "@lynx-js/react";
|
|
8
8
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { I as FaireAuthOptions } from "../../index-
|
|
2
|
-
import "../../hono-
|
|
1
|
+
import { I as FaireAuthOptions } from "../../index-BotKDRUI.mjs";
|
|
2
|
+
import "../../hono-D0VqxVy1.mjs";
|
|
3
3
|
export * from "@simplewebauthn/server";
|
|
4
4
|
|
|
5
5
|
//#region src/client/plugins/infer-plugin.d.ts
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
const require_chunk = require('../../chunk-
|
|
2
|
-
const require_url = require('../../url-
|
|
1
|
+
const require_chunk = require('../../chunk-fPmz2rbM.cjs');
|
|
2
|
+
const require_url = require('../../url-Ce7CVaQD.cjs');
|
|
3
3
|
require('../../request-CPNlp-DK.cjs');
|
|
4
|
-
require('../../defu-
|
|
5
|
-
const require_hono = require('../../hono-
|
|
6
|
-
require('../../parser-
|
|
4
|
+
require('../../defu-BmOYq4PU.cjs');
|
|
5
|
+
const require_hono = require('../../hono-DnW5crl1.cjs');
|
|
6
|
+
require('../../parser-B_wxvaAr.cjs');
|
|
7
7
|
let nanostores = require("nanostores");
|
|
8
8
|
let react = require("react");
|
|
9
9
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { $ as Client, B as DefaultApp, dt as IsSignal, et as ClientOptions, it as InferActions, nt as FaireAuthClientPlugin, pt as SessionQueryParams, st as InferErrorCodes } from "../../index-
|
|
1
|
+
import { $ as Client, B as DefaultApp, dt as IsSignal, et as ClientOptions, it as InferActions, nt as FaireAuthClientPlugin, pt as SessionQueryParams, st as InferErrorCodes } from "../../index-BNCikaaH.cjs";
|
|
2
2
|
import "../../hono-DOM31WQz.cjs";
|
|
3
|
-
import * as
|
|
3
|
+
import * as _faire_auth_core_types33 from "@faire-auth/core/types";
|
|
4
4
|
import { AnyHono, Prettify, UnionToIntersection } from "@faire-auth/core/types";
|
|
5
|
-
import * as
|
|
5
|
+
import * as hono35 from "hono";
|
|
6
6
|
import { Hono } from "hono";
|
|
7
7
|
import * as _faire_auth_core_db0 from "@faire-auth/core/db";
|
|
8
8
|
import { BASE_ERROR_CODES } from "@faire-auth/core/error";
|
|
@@ -59,9 +59,9 @@ declare function useStore<SomeStore extends Store>(store: SomeStore, options?: U
|
|
|
59
59
|
//#region src/client/react/index.d.ts
|
|
60
60
|
declare function capitalizeFirstLetter(str: string): string;
|
|
61
61
|
type InferResolvedHooks<O extends ClientOptions> = O["plugins"] extends Array<infer Plugin> ? Plugin extends FaireAuthClientPlugin ? Plugin["getAtoms"] extends ((fetch: any) => infer Atoms) ? Atoms extends Record<string, any> ? { [key in keyof Atoms as IsSignal<key> extends true ? never : key extends string ? `use${Capitalize<key>}` : never]: () => ReturnType<Atoms[key]["get"]> } : {} : {} : {} : {};
|
|
62
|
-
declare const createAuthClient: <App extends AnyHono = DefaultApp>() => <Option extends ClientOptions>(options: Option) => UnionToIntersection<InferResolvedHooks<Option>> & (App extends Hono<any, infer S extends
|
|
62
|
+
declare const createAuthClient: <App extends AnyHono = DefaultApp>() => <Option extends ClientOptions>(options: Option) => UnionToIntersection<InferResolvedHooks<Option>> & (App extends Hono<any, infer S extends hono35.Schema, infer P extends string> ? Client<S, P, Option> : never) & InferActions<Option> & {
|
|
63
63
|
useSession: () => {
|
|
64
|
-
data: (App extends Hono<any, infer S_1 extends
|
|
64
|
+
data: (App extends Hono<any, infer S_1 extends hono35.Schema, infer P_1 extends string> ? (S_1[`${P_1}/get-session`]["$get"]["output"] & {
|
|
65
65
|
success: true;
|
|
66
66
|
})["data"] : never) | null;
|
|
67
67
|
isPending: boolean;
|
|
@@ -71,7 +71,7 @@ declare const createAuthClient: <App extends AnyHono = DefaultApp>() => <Option
|
|
|
71
71
|
}) => void;
|
|
72
72
|
};
|
|
73
73
|
$Infer: {
|
|
74
|
-
Session: NonNullable<App extends Hono<any, infer S_1 extends
|
|
74
|
+
Session: NonNullable<App extends Hono<any, infer S_1 extends hono35.Schema, infer P_1 extends string> ? (S_1[`${P_1}/get-session`]["$get"]["output"] & {
|
|
75
75
|
success: true;
|
|
76
76
|
})["data"] : never>;
|
|
77
77
|
};
|
|
@@ -127,15 +127,15 @@ declare const createAuthClient: <App extends AnyHono = DefaultApp>() => <Option
|
|
|
127
127
|
retryAttempt?: number;
|
|
128
128
|
errorSchema?: _better_fetch_fetch0.StandardSchemaV1;
|
|
129
129
|
disableValidation?: boolean;
|
|
130
|
-
catchAllError?: boolean;
|
|
131
130
|
defaultOutput?: _better_fetch_fetch0.StandardSchemaV1;
|
|
132
131
|
defaultError?: _better_fetch_fetch0.StandardSchemaV1;
|
|
132
|
+
catchAllError?: boolean;
|
|
133
133
|
schema?: _better_fetch_fetch0.Schema;
|
|
134
134
|
customFetchImpl: any;
|
|
135
135
|
}, unknown, unknown, _better_fetch_fetch0.Schema>;
|
|
136
136
|
$store: {
|
|
137
|
-
notify: (signal?:
|
|
138
|
-
listen: (signal:
|
|
137
|
+
notify: (signal?: _faire_auth_core_types33.LiteralStringUnion<"$sessionSignal">) => void;
|
|
138
|
+
listen: (signal: _faire_auth_core_types33.LiteralStringUnion<"$sessionSignal">, listener: (value: boolean, oldValue?: boolean | undefined) => void) => void;
|
|
139
139
|
atoms: {
|
|
140
140
|
session: nanostores0.PreinitializedWritableAtom<{
|
|
141
141
|
data: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { $ as Client, B as DefaultApp, dt as IsSignal, et as ClientOptions, it as InferActions, nt as FaireAuthClientPlugin, pt as SessionQueryParams, st as InferErrorCodes } from "../../index-
|
|
2
|
-
import "../../hono-
|
|
1
|
+
import { $ as Client, B as DefaultApp, dt as IsSignal, et as ClientOptions, it as InferActions, nt as FaireAuthClientPlugin, pt as SessionQueryParams, st as InferErrorCodes } from "../../index-BotKDRUI.mjs";
|
|
2
|
+
import "../../hono-D0VqxVy1.mjs";
|
|
3
3
|
import { BASE_ERROR_CODES } from "@faire-auth/core/error";
|
|
4
4
|
import * as hono38 from "hono";
|
|
5
5
|
import { Hono } from "hono";
|
|
@@ -127,9 +127,9 @@ declare const createAuthClient: <App extends AnyHono = DefaultApp>() => <Option
|
|
|
127
127
|
retryAttempt?: number;
|
|
128
128
|
errorSchema?: _better_fetch_fetch9.StandardSchemaV1;
|
|
129
129
|
disableValidation?: boolean;
|
|
130
|
-
catchAllError?: boolean;
|
|
131
130
|
defaultOutput?: _better_fetch_fetch9.StandardSchemaV1;
|
|
132
131
|
defaultError?: _better_fetch_fetch9.StandardSchemaV1;
|
|
132
|
+
catchAllError?: boolean;
|
|
133
133
|
schema?: _better_fetch_fetch9.Schema;
|
|
134
134
|
customFetchImpl: any;
|
|
135
135
|
}, unknown, unknown, _better_fetch_fetch9.Schema>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { t as getBaseURL } from "../../url-BoUuoIwZ.mjs";
|
|
2
2
|
import "../../request-1NL_1lyJ.mjs";
|
|
3
|
-
import "../../defu-
|
|
4
|
-
import { n as getClientConfig, t as createHonoClient } from "../../hono-
|
|
5
|
-
import "../../parser-
|
|
3
|
+
import "../../defu-D9ZTXqlo.mjs";
|
|
4
|
+
import { n as getClientConfig, t as createHonoClient } from "../../hono-CO-zsqI-.mjs";
|
|
5
|
+
import "../../parser-B25ylT5u.mjs";
|
|
6
6
|
import { listenKeys } from "nanostores";
|
|
7
7
|
import { useCallback, useRef, useSyncExternalStore } from "react";
|
|
8
8
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
const require_chunk = require('../../chunk-
|
|
2
|
-
const require_url = require('../../url-
|
|
1
|
+
const require_chunk = require('../../chunk-fPmz2rbM.cjs');
|
|
2
|
+
const require_url = require('../../url-Ce7CVaQD.cjs');
|
|
3
3
|
require('../../request-CPNlp-DK.cjs');
|
|
4
|
-
require('../../defu-
|
|
5
|
-
const require_hono = require('../../hono-
|
|
6
|
-
require('../../parser-
|
|
4
|
+
require('../../defu-BmOYq4PU.cjs');
|
|
5
|
+
const require_hono = require('../../hono-DnW5crl1.cjs');
|
|
6
|
+
require('../../parser-B_wxvaAr.cjs');
|
|
7
7
|
let solid_js_store = require("solid-js/store");
|
|
8
8
|
let solid_js = require("solid-js");
|
|
9
9
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { $ as Client, B as DefaultApp, dt as IsSignal, et as ClientOptions, it as InferActions, nt as FaireAuthClientPlugin, st as InferErrorCodes } from "../../index-
|
|
1
|
+
import { $ as Client, B as DefaultApp, dt as IsSignal, et as ClientOptions, it as InferActions, nt as FaireAuthClientPlugin, st as InferErrorCodes } from "../../index-BNCikaaH.cjs";
|
|
2
2
|
import "../../hono-DOM31WQz.cjs";
|
|
3
3
|
import { AnyHono, Prettify, UnionToIntersection } from "@faire-auth/core/types";
|
|
4
|
-
import * as
|
|
4
|
+
import * as hono67 from "hono";
|
|
5
5
|
import { Hono } from "hono";
|
|
6
6
|
import { BASE_ERROR_CODES } from "@faire-auth/core/error";
|
|
7
|
-
import * as
|
|
7
|
+
import * as _better_fetch_fetch39 from "@better-fetch/fetch";
|
|
8
8
|
import { BetterFetchError } from "@better-fetch/fetch";
|
|
9
9
|
import { Accessor } from "solid-js";
|
|
10
10
|
export * from "@better-fetch/fetch";
|
|
@@ -12,9 +12,9 @@ export * from "nanostores";
|
|
|
12
12
|
|
|
13
13
|
//#region src/client/solid/index.d.ts
|
|
14
14
|
type InferResolvedHooks<O extends ClientOptions> = O["plugins"] extends Array<infer Plugin> ? Plugin extends FaireAuthClientPlugin ? Plugin["getAtoms"] extends ((fetch: any) => infer Atoms) ? Atoms extends Record<string, any> ? { [key in keyof Atoms as IsSignal<key> extends true ? never : key extends string ? `use${Capitalize<key>}` : never]: () => Accessor<ReturnType<Atoms[key]["get"]>> } : {} : {} : {} : {};
|
|
15
|
-
declare const createAuthClient: <App extends AnyHono = DefaultApp>() => <Option extends ClientOptions>(options: Option) => UnionToIntersection<InferResolvedHooks<Option>> & (App extends Hono<any, infer S extends
|
|
15
|
+
declare const createAuthClient: <App extends AnyHono = DefaultApp>() => <Option extends ClientOptions>(options: Option) => UnionToIntersection<InferResolvedHooks<Option>> & (App extends Hono<any, infer S extends hono67.Schema, infer P extends string> ? Client<S, P, Option> : never) & InferActions<Option> & {
|
|
16
16
|
useSession: () => Accessor<{
|
|
17
|
-
data: App extends Hono<any, infer S_1 extends
|
|
17
|
+
data: App extends Hono<any, infer S_1 extends hono67.Schema, infer P_1 extends string> ? (S_1[`${P_1}/get-session`]["$get"]["output"] & {
|
|
18
18
|
success: true;
|
|
19
19
|
})["data"] : never;
|
|
20
20
|
isPending: boolean;
|
|
@@ -22,18 +22,18 @@ declare const createAuthClient: <App extends AnyHono = DefaultApp>() => <Option
|
|
|
22
22
|
error: BetterFetchError | null;
|
|
23
23
|
}>;
|
|
24
24
|
$Infer: {
|
|
25
|
-
Session: NonNullable<App extends Hono<any, infer S_1 extends
|
|
25
|
+
Session: NonNullable<App extends Hono<any, infer S_1 extends hono67.Schema, infer P_1 extends string> ? (S_1[`${P_1}/get-session`]["$get"]["output"] & {
|
|
26
26
|
success: true;
|
|
27
27
|
})["data"] : never>;
|
|
28
28
|
};
|
|
29
|
-
$fetch:
|
|
30
|
-
plugins: (
|
|
29
|
+
$fetch: _better_fetch_fetch39.BetterFetch<{
|
|
30
|
+
plugins: (_better_fetch_fetch39.BetterFetchPlugin | {
|
|
31
31
|
id: string;
|
|
32
32
|
name: string;
|
|
33
33
|
hooks: {};
|
|
34
34
|
})[];
|
|
35
35
|
method: string;
|
|
36
|
-
output?:
|
|
36
|
+
output?: _better_fetch_fetch39.StandardSchemaV1 | typeof Blob | typeof File;
|
|
37
37
|
query?: any;
|
|
38
38
|
baseURL: string;
|
|
39
39
|
headers?: HeadersInit & (HeadersInit | {
|
|
@@ -67,23 +67,23 @@ declare const createAuthClient: <App extends AnyHono = DefaultApp>() => <Option
|
|
|
67
67
|
referrer?: string;
|
|
68
68
|
referrerPolicy?: ReferrerPolicy;
|
|
69
69
|
signal?: AbortSignal | null;
|
|
70
|
-
onRetry?: (response:
|
|
70
|
+
onRetry?: (response: _better_fetch_fetch39.ResponseContext) => Promise<void> | void;
|
|
71
71
|
hookOptions?: {
|
|
72
72
|
cloneResponse?: boolean;
|
|
73
73
|
};
|
|
74
74
|
timeout?: number;
|
|
75
75
|
duplex?: "full" | "half";
|
|
76
76
|
jsonParser: (text: string) => Promise<any> | any;
|
|
77
|
-
retry?:
|
|
77
|
+
retry?: _better_fetch_fetch39.RetryOptions;
|
|
78
78
|
retryAttempt?: number;
|
|
79
|
-
errorSchema?:
|
|
79
|
+
errorSchema?: _better_fetch_fetch39.StandardSchemaV1;
|
|
80
80
|
disableValidation?: boolean;
|
|
81
|
+
defaultOutput?: _better_fetch_fetch39.StandardSchemaV1;
|
|
82
|
+
defaultError?: _better_fetch_fetch39.StandardSchemaV1;
|
|
81
83
|
catchAllError?: boolean;
|
|
82
|
-
|
|
83
|
-
defaultError?: _better_fetch_fetch19.StandardSchemaV1;
|
|
84
|
-
schema?: _better_fetch_fetch19.Schema;
|
|
84
|
+
schema?: _better_fetch_fetch39.Schema;
|
|
85
85
|
customFetchImpl: any;
|
|
86
|
-
}, unknown, unknown,
|
|
86
|
+
}, unknown, unknown, _better_fetch_fetch39.Schema>;
|
|
87
87
|
$ERROR_CODES: Prettify<InferErrorCodes<Option> & typeof BASE_ERROR_CODES>;
|
|
88
88
|
};
|
|
89
89
|
//#endregion
|