@gorth-io/structure 0.0.0-alpha.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/LICENSE +21 -0
- package/README.md +83 -0
- package/dist/cores/ably/ai-transport/index.cjs +1 -0
- package/dist/cores/ably/ai-transport/index.d.cts +1 -0
- package/dist/cores/ably/ai-transport/index.d.ts +1 -0
- package/dist/cores/ably/ai-transport/index.js +1 -0
- package/dist/cores/ably/ai-transport/react/index.cjs +1 -0
- package/dist/cores/ably/ai-transport/react/index.d.cts +1 -0
- package/dist/cores/ably/ai-transport/react/index.d.ts +1 -0
- package/dist/cores/ably/ai-transport/react/index.js +1 -0
- package/dist/cores/ably/chat/index.cjs +1 -0
- package/dist/cores/ably/chat/index.d.cts +1 -0
- package/dist/cores/ably/chat/index.d.ts +1 -0
- package/dist/cores/ably/chat/index.js +1 -0
- package/dist/cores/ably/chat/react/index.cjs +1 -0
- package/dist/cores/ably/chat/react/index.d.cts +1 -0
- package/dist/cores/ably/chat/react/index.d.ts +1 -0
- package/dist/cores/ably/chat/react/index.js +1 -0
- package/dist/cores/ably/index.cjs +1 -0
- package/dist/cores/ably/index.d.cts +1 -0
- package/dist/cores/ably/index.d.ts +1 -0
- package/dist/cores/ably/index.js +1 -0
- package/dist/cores/ably/liveobjects/index.cjs +1 -0
- package/dist/cores/ably/liveobjects/index.d.cts +1 -0
- package/dist/cores/ably/liveobjects/index.d.ts +1 -0
- package/dist/cores/ably/liveobjects/index.js +1 -0
- package/dist/cores/ably/liveobjects/react/index.cjs +1 -0
- package/dist/cores/ably/liveobjects/react/index.d.cts +1 -0
- package/dist/cores/ably/liveobjects/react/index.d.ts +1 -0
- package/dist/cores/ably/liveobjects/react/index.js +1 -0
- package/dist/cores/ably/modular/index.cjs +1 -0
- package/dist/cores/ably/modular/index.d.cts +1 -0
- package/dist/cores/ably/modular/index.d.ts +1 -0
- package/dist/cores/ably/modular/index.js +1 -0
- package/dist/cores/ably/push/index.cjs +1 -0
- package/dist/cores/ably/push/index.d.cts +2 -0
- package/dist/cores/ably/push/index.d.ts +2 -0
- package/dist/cores/ably/push/index.js +1 -0
- package/dist/cores/ably/react/index.cjs +1 -0
- package/dist/cores/ably/react/index.d.cts +1 -0
- package/dist/cores/ably/react/index.d.ts +1 -0
- package/dist/cores/ably/react/index.js +1 -0
- package/dist/cores/ably/spaces/index.cjs +1 -0
- package/dist/cores/ably/spaces/index.d.cts +1 -0
- package/dist/cores/ably/spaces/index.d.ts +1 -0
- package/dist/cores/ably/spaces/index.js +1 -0
- package/dist/cores/axios.cjs +1 -0
- package/dist/cores/axios.d.cts +3 -0
- package/dist/cores/axios.d.ts +3 -0
- package/dist/cores/axios.js +1 -0
- package/dist/cores/graphql/index.cjs +1 -0
- package/dist/cores/graphql/index.d.cts +1 -0
- package/dist/cores/graphql/index.d.ts +1 -0
- package/dist/cores/graphql/index.js +1 -0
- package/dist/cores/graphql/request.cjs +1 -0
- package/dist/cores/graphql/request.d.cts +1 -0
- package/dist/cores/graphql/request.d.ts +1 -0
- package/dist/cores/graphql/request.js +1 -0
- package/dist/cores/graphql/tag.cjs +1 -0
- package/dist/cores/graphql/tag.d.cts +1 -0
- package/dist/cores/graphql/tag.d.ts +1 -0
- package/dist/cores/graphql/tag.js +1 -0
- package/dist/cores/index.cjs +0 -0
- package/dist/cores/index.d.cts +1 -0
- package/dist/cores/index.d.ts +1 -0
- package/dist/cores/index.js +1 -0
- package/dist/cores/jose.cjs +1 -0
- package/dist/cores/jose.d.cts +1 -0
- package/dist/cores/jose.d.ts +1 -0
- package/dist/cores/jose.js +1 -0
- package/dist/cores/pg.cjs +1 -0
- package/dist/cores/pg.d.cts +3 -0
- package/dist/cores/pg.d.ts +3 -0
- package/dist/cores/pg.js +2 -0
- package/dist/cores/pg.js.map +1 -0
- package/dist/cores/postgres.cjs +1 -0
- package/dist/cores/postgres.d.cts +2 -0
- package/dist/cores/postgres.d.ts +2 -0
- package/dist/cores/postgres.js +2 -0
- package/dist/cores/postgres.js.map +1 -0
- package/dist/cores/supabase/index.cjs +1 -0
- package/dist/cores/supabase/index.d.cts +1 -0
- package/dist/cores/supabase/index.d.ts +1 -0
- package/dist/cores/supabase/index.js +1 -0
- package/dist/cores/supabase/postgrest.cjs +1 -0
- package/dist/cores/supabase/postgrest.d.cts +1 -0
- package/dist/cores/supabase/postgrest.d.ts +1 -0
- package/dist/cores/supabase/postgrest.js +1 -0
- package/dist/cores/supabase/server.cjs +1 -0
- package/dist/cores/supabase/server.d.cts +1 -0
- package/dist/cores/supabase/server.d.ts +1 -0
- package/dist/cores/supabase/server.js +1 -0
- package/dist/cores/supabase/ssr.cjs +1 -0
- package/dist/cores/supabase/ssr.d.cts +1 -0
- package/dist/cores/supabase/ssr.d.ts +1 -0
- package/dist/cores/supabase/ssr.js +1 -0
- package/dist/cores/uuid.cjs +1 -0
- package/dist/cores/uuid.d.cts +1 -0
- package/dist/cores/uuid.d.ts +1 -0
- package/dist/cores/uuid.js +1 -0
- package/dist/cores/zod.cjs +1 -0
- package/dist/cores/zod.d.cts +3 -0
- package/dist/cores/zod.d.ts +3 -0
- package/dist/cores/zod.js +1 -0
- package/dist/formatter-vjbCoK9k.d.ts +12 -0
- package/dist/formatter-vjbCoK9k.d.ts.map +1 -0
- package/dist/index.cjs +1 -0
- package/dist/index.d.cts +6 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +1 -0
- package/dist/interface-BFsLlmGy.d.ts +1 -0
- package/dist/interface-ii8DV63k.d.cts +283 -0
- package/dist/interface-ii8DV63k.d.cts.map +1 -0
- package/dist/interface-ii8DV63k.d.ts +283 -0
- package/dist/interface-ii8DV63k.d.ts.map +1 -0
- package/dist/lib/permission.cjs +0 -0
- package/dist/lib/permission.d.cts +1 -0
- package/dist/lib/permission.d.ts +1 -0
- package/dist/lib/permission.js +1 -0
- package/dist/modules/auth/client/index.cjs +1 -0
- package/dist/modules/auth/client/index.d.cts +6 -0
- package/dist/modules/auth/client/index.d.ts +6 -0
- package/dist/modules/auth/client/index.js +1 -0
- package/dist/modules/auth/client/retry.cjs +1 -0
- package/dist/modules/auth/client/retry.d.cts +11 -0
- package/dist/modules/auth/client/retry.d.cts.map +1 -0
- package/dist/modules/auth/client/retry.d.ts +11 -0
- package/dist/modules/auth/client/retry.d.ts.map +1 -0
- package/dist/modules/auth/client/retry.js +2 -0
- package/dist/modules/auth/client/retry.js.map +1 -0
- package/dist/modules/auth/interface.cjs +1 -0
- package/dist/modules/auth/interface.d.cts +8 -0
- package/dist/modules/auth/interface.d.cts.map +1 -0
- package/dist/modules/auth/interface.d.ts +8 -0
- package/dist/modules/auth/interface.d.ts.map +1 -0
- package/dist/modules/auth/interface.js +2 -0
- package/dist/modules/auth/interface.js.map +1 -0
- package/dist/modules/auth/policy.cjs +1 -0
- package/dist/modules/auth/policy.d.cts +15 -0
- package/dist/modules/auth/policy.d.cts.map +1 -0
- package/dist/modules/auth/policy.d.ts +15 -0
- package/dist/modules/auth/policy.d.ts.map +1 -0
- package/dist/modules/auth/policy.js +2 -0
- package/dist/modules/auth/policy.js.map +1 -0
- package/dist/modules/auth/server/bearer.cjs +1 -0
- package/dist/modules/auth/server/bearer.d.cts +25 -0
- package/dist/modules/auth/server/bearer.d.cts.map +1 -0
- package/dist/modules/auth/server/bearer.d.ts +25 -0
- package/dist/modules/auth/server/bearer.d.ts.map +1 -0
- package/dist/modules/auth/server/bearer.js +2 -0
- package/dist/modules/auth/server/bearer.js.map +1 -0
- package/dist/modules/auth/server/claims.cjs +1 -0
- package/dist/modules/auth/server/claims.d.cts +37 -0
- package/dist/modules/auth/server/claims.d.cts.map +1 -0
- package/dist/modules/auth/server/claims.d.ts +37 -0
- package/dist/modules/auth/server/claims.d.ts.map +1 -0
- package/dist/modules/auth/server/claims.js +2 -0
- package/dist/modules/auth/server/claims.js.map +1 -0
- package/dist/modules/auth/server/crypto.cjs +1 -0
- package/dist/modules/auth/server/crypto.d.cts +3 -0
- package/dist/modules/auth/server/crypto.d.cts.map +1 -0
- package/dist/modules/auth/server/crypto.d.ts +3 -0
- package/dist/modules/auth/server/crypto.d.ts.map +1 -0
- package/dist/modules/auth/server/crypto.js +2 -0
- package/dist/modules/auth/server/crypto.js.map +1 -0
- package/dist/modules/auth/server/grant-guard.cjs +1 -0
- package/dist/modules/auth/server/grant-guard.d.cts +6 -0
- package/dist/modules/auth/server/grant-guard.d.cts.map +1 -0
- package/dist/modules/auth/server/grant-guard.d.ts +6 -0
- package/dist/modules/auth/server/grant-guard.d.ts.map +1 -0
- package/dist/modules/auth/server/grant-guard.js +2 -0
- package/dist/modules/auth/server/grant-guard.js.map +1 -0
- package/dist/modules/auth/server/identity-cache.cjs +1 -0
- package/dist/modules/auth/server/identity-cache.d.cts +8 -0
- package/dist/modules/auth/server/identity-cache.d.cts.map +1 -0
- package/dist/modules/auth/server/identity-cache.d.ts +8 -0
- package/dist/modules/auth/server/identity-cache.d.ts.map +1 -0
- package/dist/modules/auth/server/identity-cache.js +2 -0
- package/dist/modules/auth/server/identity-cache.js.map +1 -0
- package/dist/modules/auth/server/identity.cjs +1 -0
- package/dist/modules/auth/server/identity.d.cts +5 -0
- package/dist/modules/auth/server/identity.d.cts.map +1 -0
- package/dist/modules/auth/server/identity.d.ts +5 -0
- package/dist/modules/auth/server/identity.d.ts.map +1 -0
- package/dist/modules/auth/server/identity.js +2 -0
- package/dist/modules/auth/server/identity.js.map +1 -0
- package/dist/modules/auth/server/index.cjs +1 -0
- package/dist/modules/auth/server/index.d.cts +17 -0
- package/dist/modules/auth/server/index.d.ts +17 -0
- package/dist/modules/auth/server/index.js +1 -0
- package/dist/modules/auth/server/interface.cjs +0 -0
- package/dist/modules/auth/server/interface.d.cts +2 -0
- package/dist/modules/auth/server/interface.d.ts +3 -0
- package/dist/modules/auth/server/interface.js +1 -0
- package/dist/modules/auth/server/logout.cjs +1 -0
- package/dist/modules/auth/server/logout.d.cts +10 -0
- package/dist/modules/auth/server/logout.d.cts.map +1 -0
- package/dist/modules/auth/server/logout.d.ts +10 -0
- package/dist/modules/auth/server/logout.d.ts.map +1 -0
- package/dist/modules/auth/server/logout.js +2 -0
- package/dist/modules/auth/server/logout.js.map +1 -0
- package/dist/modules/auth/server/machine.cjs +1 -0
- package/dist/modules/auth/server/machine.d.cts +28 -0
- package/dist/modules/auth/server/machine.d.cts.map +1 -0
- package/dist/modules/auth/server/machine.d.ts +28 -0
- package/dist/modules/auth/server/machine.d.ts.map +1 -0
- package/dist/modules/auth/server/machine.js +2 -0
- package/dist/modules/auth/server/machine.js.map +1 -0
- package/dist/modules/auth/server/proof.cjs +1 -0
- package/dist/modules/auth/server/proof.d.cts +23 -0
- package/dist/modules/auth/server/proof.d.cts.map +1 -0
- package/dist/modules/auth/server/proof.d.ts +23 -0
- package/dist/modules/auth/server/proof.d.ts.map +1 -0
- package/dist/modules/auth/server/proof.js +2 -0
- package/dist/modules/auth/server/proof.js.map +1 -0
- package/dist/modules/auth/server/provider.cjs +1 -0
- package/dist/modules/auth/server/provider.d.cts +9 -0
- package/dist/modules/auth/server/provider.d.cts.map +1 -0
- package/dist/modules/auth/server/provider.d.ts +9 -0
- package/dist/modules/auth/server/provider.d.ts.map +1 -0
- package/dist/modules/auth/server/provider.js +2 -0
- package/dist/modules/auth/server/provider.js.map +1 -0
- package/dist/modules/auth/server/resource.cjs +1 -0
- package/dist/modules/auth/server/resource.d.cts +10 -0
- package/dist/modules/auth/server/resource.d.cts.map +1 -0
- package/dist/modules/auth/server/resource.d.ts +10 -0
- package/dist/modules/auth/server/resource.d.ts.map +1 -0
- package/dist/modules/auth/server/resource.js +2 -0
- package/dist/modules/auth/server/resource.js.map +1 -0
- package/dist/modules/auth/server/revocation.cjs +1 -0
- package/dist/modules/auth/server/revocation.d.cts +4 -0
- package/dist/modules/auth/server/revocation.d.cts.map +1 -0
- package/dist/modules/auth/server/revocation.d.ts +4 -0
- package/dist/modules/auth/server/revocation.d.ts.map +1 -0
- package/dist/modules/auth/server/revocation.js +2 -0
- package/dist/modules/auth/server/revocation.js.map +1 -0
- package/dist/modules/auth/server/user-info.cjs +1 -0
- package/dist/modules/auth/server/user-info.d.cts +19 -0
- package/dist/modules/auth/server/user-info.d.cts.map +1 -0
- package/dist/modules/auth/server/user-info.d.ts +19 -0
- package/dist/modules/auth/server/user-info.d.ts.map +1 -0
- package/dist/modules/auth/server/user-info.js +2 -0
- package/dist/modules/auth/server/user-info.js.map +1 -0
- package/dist/modules/common/admin.cjs +1 -0
- package/dist/modules/common/admin.d.cts +4 -0
- package/dist/modules/common/admin.d.cts.map +1 -0
- package/dist/modules/common/admin.d.ts +4 -0
- package/dist/modules/common/admin.d.ts.map +1 -0
- package/dist/modules/common/admin.js +2 -0
- package/dist/modules/common/admin.js.map +1 -0
- package/dist/modules/common/client.cjs +1 -0
- package/dist/modules/common/client.d.cts +118 -0
- package/dist/modules/common/client.d.cts.map +1 -0
- package/dist/modules/common/client.d.ts +118 -0
- package/dist/modules/common/client.d.ts.map +1 -0
- package/dist/modules/common/client.js +2 -0
- package/dist/modules/common/client.js.map +1 -0
- package/dist/modules/common/index.cjs +1 -0
- package/dist/modules/common/index.d.cts +6 -0
- package/dist/modules/common/index.d.ts +6 -0
- package/dist/modules/common/index.js +1 -0
- package/dist/modules/common/realtime.cjs +0 -0
- package/dist/modules/common/realtime.d.cts +2 -0
- package/dist/modules/common/realtime.d.ts +2 -0
- package/dist/modules/common/realtime.js +1 -0
- package/dist/modules/common/upload.cjs +1 -0
- package/dist/modules/common/upload.d.cts +4 -0
- package/dist/modules/common/upload.d.cts.map +1 -0
- package/dist/modules/common/upload.d.ts +4 -0
- package/dist/modules/common/upload.d.ts.map +1 -0
- package/dist/modules/common/upload.js +2 -0
- package/dist/modules/common/upload.js.map +1 -0
- package/dist/modules/database/index.cjs +1 -0
- package/dist/modules/database/index.d.cts +18 -0
- package/dist/modules/database/index.d.cts.map +1 -0
- package/dist/modules/database/index.d.ts +18 -0
- package/dist/modules/database/index.d.ts.map +1 -0
- package/dist/modules/database/index.js +2 -0
- package/dist/modules/database/index.js.map +1 -0
- package/dist/modules/database/postgres.cjs +1 -0
- package/dist/modules/database/postgres.d.cts +5 -0
- package/dist/modules/database/postgres.d.cts.map +1 -0
- package/dist/modules/database/postgres.d.ts +5 -0
- package/dist/modules/database/postgres.d.ts.map +1 -0
- package/dist/modules/database/postgres.js +2 -0
- package/dist/modules/database/postgres.js.map +1 -0
- package/dist/modules/desktop/index.cjs +1 -0
- package/dist/modules/desktop/index.d.cts +8 -0
- package/dist/modules/desktop/index.d.ts +8 -0
- package/dist/modules/desktop/index.js +1 -0
- package/dist/modules/desktop/interface.cjs +0 -0
- package/dist/modules/desktop/interface.d.cts +2 -0
- package/dist/modules/desktop/interface.d.ts +2 -0
- package/dist/modules/desktop/interface.js +1 -0
- package/dist/modules/desktop/proxy.cjs +1 -0
- package/dist/modules/desktop/proxy.d.cts +22 -0
- package/dist/modules/desktop/proxy.d.cts.map +1 -0
- package/dist/modules/desktop/proxy.d.ts +22 -0
- package/dist/modules/desktop/proxy.d.ts.map +1 -0
- package/dist/modules/desktop/proxy.js +2 -0
- package/dist/modules/desktop/proxy.js.map +1 -0
- package/dist/modules/desktop/release.cjs +1 -0
- package/dist/modules/desktop/release.d.cts +5 -0
- package/dist/modules/desktop/release.d.cts.map +1 -0
- package/dist/modules/desktop/release.d.ts +5 -0
- package/dist/modules/desktop/release.d.ts.map +1 -0
- package/dist/modules/desktop/release.js +2 -0
- package/dist/modules/desktop/release.js.map +1 -0
- package/dist/modules/desktop/rpc.cjs +1 -0
- package/dist/modules/desktop/rpc.d.cts +14 -0
- package/dist/modules/desktop/rpc.d.cts.map +1 -0
- package/dist/modules/desktop/rpc.d.ts +14 -0
- package/dist/modules/desktop/rpc.d.ts.map +1 -0
- package/dist/modules/desktop/rpc.js +2 -0
- package/dist/modules/desktop/rpc.js.map +1 -0
- package/dist/modules/desktop/shortcut.cjs +1 -0
- package/dist/modules/desktop/shortcut.d.cts +6 -0
- package/dist/modules/desktop/shortcut.d.cts.map +1 -0
- package/dist/modules/desktop/shortcut.d.ts +6 -0
- package/dist/modules/desktop/shortcut.d.ts.map +1 -0
- package/dist/modules/desktop/shortcut.js +2 -0
- package/dist/modules/desktop/shortcut.js.map +1 -0
- package/dist/modules/http/caller.cjs +1 -0
- package/dist/modules/http/caller.d.cts +18 -0
- package/dist/modules/http/caller.d.cts.map +1 -0
- package/dist/modules/http/caller.d.ts +18 -0
- package/dist/modules/http/caller.d.ts.map +1 -0
- package/dist/modules/http/caller.js +2 -0
- package/dist/modules/http/caller.js.map +1 -0
- package/dist/modules/http/error.cjs +1 -0
- package/dist/modules/http/error.d.cts +2 -0
- package/dist/modules/http/error.d.ts +2 -0
- package/dist/modules/http/error.js +2 -0
- package/dist/modules/http/error.js.map +1 -0
- package/dist/modules/http/failure.cjs +1 -0
- package/dist/modules/http/failure.d.cts +14 -0
- package/dist/modules/http/failure.d.cts.map +1 -0
- package/dist/modules/http/failure.d.ts +14 -0
- package/dist/modules/http/failure.d.ts.map +1 -0
- package/dist/modules/http/failure.js +2 -0
- package/dist/modules/http/failure.js.map +1 -0
- package/dist/modules/http/fetcher.cjs +1 -0
- package/dist/modules/http/fetcher.d.cts +6 -0
- package/dist/modules/http/fetcher.d.cts.map +1 -0
- package/dist/modules/http/fetcher.d.ts +6 -0
- package/dist/modules/http/fetcher.d.ts.map +1 -0
- package/dist/modules/http/fetcher.js +2 -0
- package/dist/modules/http/fetcher.js.map +1 -0
- package/dist/modules/http/index.cjs +1 -0
- package/dist/modules/http/index.d.cts +6 -0
- package/dist/modules/http/index.d.ts +6 -0
- package/dist/modules/http/index.js +1 -0
- package/dist/modules/http/response.cjs +1 -0
- package/dist/modules/http/response.d.cts +6 -0
- package/dist/modules/http/response.d.cts.map +1 -0
- package/dist/modules/http/response.d.ts +6 -0
- package/dist/modules/http/response.d.ts.map +1 -0
- package/dist/modules/http/response.js +2 -0
- package/dist/modules/http/response.js.map +1 -0
- package/dist/modules/supabase/express/client.cjs +1 -0
- package/dist/modules/supabase/express/client.d.cts +3 -0
- package/dist/modules/supabase/express/client.d.cts.map +1 -0
- package/dist/modules/supabase/express/client.d.ts +3 -0
- package/dist/modules/supabase/express/client.d.ts.map +1 -0
- package/dist/modules/supabase/express/client.js +2 -0
- package/dist/modules/supabase/express/client.js.map +1 -0
- package/dist/modules/supabase/express/index.cjs +1 -0
- package/dist/modules/supabase/express/index.d.cts +3 -0
- package/dist/modules/supabase/express/index.d.ts +3 -0
- package/dist/modules/supabase/express/index.js +1 -0
- package/dist/modules/supabase/express/server.cjs +1 -0
- package/dist/modules/supabase/express/server.d.cts +2 -0
- package/dist/modules/supabase/express/server.d.ts +2 -0
- package/dist/modules/supabase/express/server.js +1 -0
- package/dist/modules/supabase/next/client.cjs +1 -0
- package/dist/modules/supabase/next/client.d.cts +60 -0
- package/dist/modules/supabase/next/client.d.cts.map +1 -0
- package/dist/modules/supabase/next/client.d.ts +60 -0
- package/dist/modules/supabase/next/client.d.ts.map +1 -0
- package/dist/modules/supabase/next/client.js +2 -0
- package/dist/modules/supabase/next/client.js.map +1 -0
- package/dist/modules/supabase/next/index.cjs +1 -0
- package/dist/modules/supabase/next/index.d.cts +5 -0
- package/dist/modules/supabase/next/index.d.ts +5 -0
- package/dist/modules/supabase/next/index.js +1 -0
- package/dist/modules/supabase/next/middleware.cjs +1 -0
- package/dist/modules/supabase/next/middleware.d.cts +2 -0
- package/dist/modules/supabase/next/middleware.d.cts.map +1 -0
- package/dist/modules/supabase/next/middleware.d.ts +2 -0
- package/dist/modules/supabase/next/middleware.d.ts.map +1 -0
- package/dist/modules/supabase/next/middleware.js +2 -0
- package/dist/modules/supabase/next/middleware.js.map +1 -0
- package/dist/modules/supabase/next/server.cjs +1 -0
- package/dist/modules/supabase/next/server.d.cts +61 -0
- package/dist/modules/supabase/next/server.d.cts.map +1 -0
- package/dist/modules/supabase/next/server.d.ts +61 -0
- package/dist/modules/supabase/next/server.d.ts.map +1 -0
- package/dist/modules/supabase/next/server.js +2 -0
- package/dist/modules/supabase/next/server.js.map +1 -0
- package/dist/rolldown-runtime-BocRIvOZ.cjs +1 -0
- package/dist/utils/formatter.cjs +1 -0
- package/dist/utils/formatter.d.cts +11 -0
- package/dist/utils/formatter.d.cts.map +1 -0
- package/dist/utils/formatter.d.ts +2 -0
- package/dist/utils/formatter.js +2 -0
- package/dist/utils/formatter.js.map +1 -0
- package/dist/utils/interface.cjs +0 -0
- package/dist/utils/interface.d.cts +2 -0
- package/dist/utils/interface.d.ts +2 -0
- package/dist/utils/interface.js +1 -0
- package/dist/utils/normalization.cjs +1 -0
- package/dist/utils/normalization.d.cts +10 -0
- package/dist/utils/normalization.d.cts.map +1 -0
- package/dist/utils/normalization.d.ts +10 -0
- package/dist/utils/normalization.d.ts.map +1 -0
- package/dist/utils/normalization.js +2 -0
- package/dist/utils/normalization.js.map +1 -0
- package/docs/auth.md +189 -0
- package/docs/modules.md +100 -0
- package/package.json +198 -0
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { b as DefaultSchema, y as DatabaseSchema } from "../../../interface-ii8DV63k.js";
|
|
2
|
+
import { SupabaseClientOptions } from "@supabase/supabase-js";
|
|
3
|
+
export declare function createNextClient<Database = any, SchemaName extends DatabaseSchema<Database> = DefaultSchema<Database>>(url: string, publishableKey: string, options?: SupabaseClientOptions<SchemaName>): import("@supabase/supabase-js").SupabaseClient<Database, SchemaName, SchemaName extends string & Exclude<keyof Database, "__InternalSupabase"> ? SchemaName : "public" extends Exclude<keyof Database, "__InternalSupabase"> ? Exclude<keyof Database, "__InternalSupabase"> & "public" : string & Exclude<Exclude<keyof Database, "__InternalSupabase">, "__InternalSupabase">, Omit<Database, "__InternalSupabase">[SchemaName extends string & Exclude<keyof Database, "__InternalSupabase"> ? SchemaName : "public" extends Exclude<keyof Database, "__InternalSupabase"> ? Exclude<keyof Database, "__InternalSupabase"> & "public" : string & Exclude<Exclude<keyof Database, "__InternalSupabase">, "__InternalSupabase">] extends {
|
|
4
|
+
Tables: Record<string, {
|
|
5
|
+
Row: Record<string, unknown>;
|
|
6
|
+
Insert: Record<string, unknown>;
|
|
7
|
+
Update: Record<string, unknown>;
|
|
8
|
+
Relationships: {
|
|
9
|
+
foreignKeyName: string;
|
|
10
|
+
columns: string[];
|
|
11
|
+
isOneToOne?: boolean;
|
|
12
|
+
referencedRelation: string;
|
|
13
|
+
referencedColumns: string[];
|
|
14
|
+
}[];
|
|
15
|
+
ComputedFields?: string;
|
|
16
|
+
}>;
|
|
17
|
+
Views: Record<string, {
|
|
18
|
+
Row: Record<string, unknown>;
|
|
19
|
+
Insert: Record<string, unknown>;
|
|
20
|
+
Update: Record<string, unknown>;
|
|
21
|
+
Relationships: {
|
|
22
|
+
foreignKeyName: string;
|
|
23
|
+
columns: string[];
|
|
24
|
+
isOneToOne?: boolean;
|
|
25
|
+
referencedRelation: string;
|
|
26
|
+
referencedColumns: string[];
|
|
27
|
+
}[];
|
|
28
|
+
ComputedFields?: string;
|
|
29
|
+
} | {
|
|
30
|
+
Row: Record<string, unknown>;
|
|
31
|
+
Relationships: {
|
|
32
|
+
foreignKeyName: string;
|
|
33
|
+
columns: string[];
|
|
34
|
+
isOneToOne?: boolean;
|
|
35
|
+
referencedRelation: string;
|
|
36
|
+
referencedColumns: string[];
|
|
37
|
+
}[];
|
|
38
|
+
ComputedFields?: string;
|
|
39
|
+
}>;
|
|
40
|
+
Functions: Record<string, {
|
|
41
|
+
Args: Record<string, unknown> | never;
|
|
42
|
+
Returns: unknown;
|
|
43
|
+
SetofOptions?: {
|
|
44
|
+
isSetofReturn?: boolean | undefined;
|
|
45
|
+
isOneToOne?: boolean | undefined;
|
|
46
|
+
isNotNullable?: boolean | undefined;
|
|
47
|
+
to: string;
|
|
48
|
+
from: string;
|
|
49
|
+
};
|
|
50
|
+
}>;
|
|
51
|
+
} ? Omit<Database, "__InternalSupabase">[SchemaName extends string & Exclude<keyof Database, "__InternalSupabase"> ? SchemaName : "public" extends Exclude<keyof Database, "__InternalSupabase"> ? Exclude<keyof Database, "__InternalSupabase"> & "public" : string & Exclude<Exclude<keyof Database, "__InternalSupabase">, "__InternalSupabase">] : never, SchemaName extends string & Exclude<keyof Database, "__InternalSupabase"> ? Database extends {
|
|
52
|
+
__InternalSupabase: {
|
|
53
|
+
PostgrestVersion: string;
|
|
54
|
+
};
|
|
55
|
+
} ? Database["__InternalSupabase"] : {
|
|
56
|
+
PostgrestVersion: "12";
|
|
57
|
+
} : SchemaName extends {
|
|
58
|
+
PostgrestVersion: string;
|
|
59
|
+
} ? SchemaName : never>;
|
|
60
|
+
//# sourceMappingURL=client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.d.ts","names":[],"sources":["../../../../src/modules/supabase/next/client.ts"],"mappings":";;wBAIgB,iBACd,gBACA,mBAAmB,eAAe,YAAY,cAAc,WAE5D,aACA,wBACA,UAAU,sBAAsB,8CAAW,eAAA,UAAA,YAAA,4BAAA,cAAA,kCAAA,8BAAA,cAAA,kCAAA,cAAA,sDAAA,QAAA,cAAA,wDAAA,KAAA,gCAAA,4BAAA,cAAA,kCAAA,8BAAA,cAAA,kCAAA,cAAA,sDAAA,QAAA,cAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAO5C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.js","names":["createNextClient","createBrowserClient","url","publishableKey","options"],"sources":["../../../../src/modules/supabase/next/client.ts"],"sourcesContent":["import type { DatabaseSchema, DefaultSchema } from \"@/utils/interface\";\nimport { createBrowserClient } from \"@supabase/ssr\";\nimport type { SupabaseClientOptions } from \"@supabase/supabase-js\";\n\nexport function createNextClient<\n Database = any,\n SchemaName extends DatabaseSchema<Database> = DefaultSchema<Database>,\n>(\n url: string,\n publishableKey: string,\n options?: SupabaseClientOptions<SchemaName>,\n) {\n return createBrowserClient<Database, SchemaName>(\n url,\n publishableKey,\n options,\n );\n}\n"],"mappings":"A,oDAIA,SAAgBA,EAId,EACA,EACA,EACA,CACA,OAAOC,EACLC,EACAC,EACAC,CACF,CACF,C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./client.cjs"),t=require("./middleware.cjs"),n=require("./server.cjs");exports.createNextClient=e.createNextClient,exports.createNextMiddleware=t.createNextMiddleware,exports.createServer=n.createServer;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { v as CommonCookieMethods } from "../../../interface-ii8DV63k.cjs";
|
|
2
|
+
import { createNextClient } from "./client.cjs";
|
|
3
|
+
import { createNextMiddleware } from "./middleware.cjs";
|
|
4
|
+
import { createServer } from "./server.cjs";
|
|
5
|
+
export { type CommonCookieMethods, createNextClient, createNextMiddleware, createServer };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { v as CommonCookieMethods } from "../../../interface-ii8DV63k.js";
|
|
2
|
+
import { createNextClient } from "./client.js";
|
|
3
|
+
import { createNextMiddleware } from "./middleware.js";
|
|
4
|
+
import { createServer } from "./server.js";
|
|
5
|
+
export { type CommonCookieMethods, createNextClient, createNextMiddleware, createServer };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createNextClient as e}from"./client.js";import{createNextMiddleware as t}from"./middleware.js";import{createServer as n}from"./server.js";export{e as createNextClient,t as createNextMiddleware,n as createServer};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});function e(){}exports.createNextMiddleware=e;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"middleware.d.cts","names":[],"sources":["../../../../src/modules/supabase/next/middleware.ts"],"mappings":"A,wBAAgB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"middleware.d.ts","names":[],"sources":["../../../../src/modules/supabase/next/middleware.ts"],"mappings":"A,wBAAgB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"middleware.js","names":["createNextMiddleware"],"sources":["../../../../src/modules/supabase/next/middleware.ts"],"sourcesContent":["export function createNextMiddleware() {}\n"],"mappings":"AAAA,SAAgBA,GAAuB,CAAC,C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let e=require("@supabase/ssr");function t(t,n,r,i){return(0,e.createServerClient)(t,n,{...i,cookies:{getAll(){return r.getAll()},async setAll(e,t){try{await r.setAll?.(e,t)}catch{}}}})}exports.createServer=t;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { b as DefaultSchema, v as CommonCookieMethods, y as DatabaseSchema } from "../../../interface-ii8DV63k.cjs";
|
|
2
|
+
import { SupabaseClientOptions } from "@supabase/supabase-js";
|
|
3
|
+
export declare function createServer<Database = any, SchemaName extends DatabaseSchema<Database> = DefaultSchema<Database>>(url: string, publishableKey: string, cookies: CommonCookieMethods, options?: SupabaseClientOptions<SchemaName>): import("@supabase/supabase-js").SupabaseClient<Database, SchemaName, SchemaName extends string & Exclude<keyof Database, "__InternalSupabase"> ? SchemaName : "public" extends Exclude<keyof Database, "__InternalSupabase"> ? Exclude<keyof Database, "__InternalSupabase"> & "public" : string & Exclude<Exclude<keyof Database, "__InternalSupabase">, "__InternalSupabase">, Omit<Database, "__InternalSupabase">[SchemaName extends string & Exclude<keyof Database, "__InternalSupabase"> ? SchemaName : "public" extends Exclude<keyof Database, "__InternalSupabase"> ? Exclude<keyof Database, "__InternalSupabase"> & "public" : string & Exclude<Exclude<keyof Database, "__InternalSupabase">, "__InternalSupabase">] extends {
|
|
4
|
+
Tables: Record<string, {
|
|
5
|
+
Row: Record<string, unknown>;
|
|
6
|
+
Insert: Record<string, unknown>;
|
|
7
|
+
Update: Record<string, unknown>;
|
|
8
|
+
Relationships: {
|
|
9
|
+
foreignKeyName: string;
|
|
10
|
+
columns: string[];
|
|
11
|
+
isOneToOne?: boolean;
|
|
12
|
+
referencedRelation: string;
|
|
13
|
+
referencedColumns: string[];
|
|
14
|
+
}[];
|
|
15
|
+
ComputedFields?: string;
|
|
16
|
+
}>;
|
|
17
|
+
Views: Record<string, {
|
|
18
|
+
Row: Record<string, unknown>;
|
|
19
|
+
Insert: Record<string, unknown>;
|
|
20
|
+
Update: Record<string, unknown>;
|
|
21
|
+
Relationships: {
|
|
22
|
+
foreignKeyName: string;
|
|
23
|
+
columns: string[];
|
|
24
|
+
isOneToOne?: boolean;
|
|
25
|
+
referencedRelation: string;
|
|
26
|
+
referencedColumns: string[];
|
|
27
|
+
}[];
|
|
28
|
+
ComputedFields?: string;
|
|
29
|
+
} | {
|
|
30
|
+
Row: Record<string, unknown>;
|
|
31
|
+
Relationships: {
|
|
32
|
+
foreignKeyName: string;
|
|
33
|
+
columns: string[];
|
|
34
|
+
isOneToOne?: boolean;
|
|
35
|
+
referencedRelation: string;
|
|
36
|
+
referencedColumns: string[];
|
|
37
|
+
}[];
|
|
38
|
+
ComputedFields?: string;
|
|
39
|
+
}>;
|
|
40
|
+
Functions: Record<string, {
|
|
41
|
+
Args: Record<string, unknown> | never;
|
|
42
|
+
Returns: unknown;
|
|
43
|
+
SetofOptions?: {
|
|
44
|
+
isSetofReturn?: boolean | undefined;
|
|
45
|
+
isOneToOne?: boolean | undefined;
|
|
46
|
+
isNotNullable?: boolean | undefined;
|
|
47
|
+
to: string;
|
|
48
|
+
from: string;
|
|
49
|
+
};
|
|
50
|
+
}>;
|
|
51
|
+
} ? Omit<Database, "__InternalSupabase">[SchemaName extends string & Exclude<keyof Database, "__InternalSupabase"> ? SchemaName : "public" extends Exclude<keyof Database, "__InternalSupabase"> ? Exclude<keyof Database, "__InternalSupabase"> & "public" : string & Exclude<Exclude<keyof Database, "__InternalSupabase">, "__InternalSupabase">] : never, SchemaName extends string & Exclude<keyof Database, "__InternalSupabase"> ? Database extends {
|
|
52
|
+
__InternalSupabase: {
|
|
53
|
+
PostgrestVersion: string;
|
|
54
|
+
};
|
|
55
|
+
} ? Database["__InternalSupabase"] : {
|
|
56
|
+
PostgrestVersion: "12";
|
|
57
|
+
} : SchemaName extends {
|
|
58
|
+
PostgrestVersion: string;
|
|
59
|
+
} ? SchemaName : never>;
|
|
60
|
+
export type { CommonCookieMethods };
|
|
61
|
+
//# sourceMappingURL=server.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server.d.cts","names":[],"sources":["../../../../src/modules/supabase/next/server.ts"],"mappings":";;wBAQgB,aACd,gBACA,mBAAmB,eAAe,YAAY,cAAc,WAE5D,aACA,wBACA,SAAS,qBACT,UAAU,sBAAsB,8CAAW,eAAA,UAAA,YAAA,4BAAA,cAAA,kCAAA,8BAAA,cAAA,kCAAA,cAAA,sDAAA,QAAA,cAAA,wDAAA,KAAA,gCAAA,4BAAA,cAAA,kCAAA,8BAAA,cAAA,kCAAA,cAAA,sDAAA,QAAA,cAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAiB5C"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { b as DefaultSchema, v as CommonCookieMethods, y as DatabaseSchema } from "../../../interface-ii8DV63k.js";
|
|
2
|
+
import { SupabaseClientOptions } from "@supabase/supabase-js";
|
|
3
|
+
export declare function createServer<Database = any, SchemaName extends DatabaseSchema<Database> = DefaultSchema<Database>>(url: string, publishableKey: string, cookies: CommonCookieMethods, options?: SupabaseClientOptions<SchemaName>): import("@supabase/supabase-js").SupabaseClient<Database, SchemaName, SchemaName extends string & Exclude<keyof Database, "__InternalSupabase"> ? SchemaName : "public" extends Exclude<keyof Database, "__InternalSupabase"> ? Exclude<keyof Database, "__InternalSupabase"> & "public" : string & Exclude<Exclude<keyof Database, "__InternalSupabase">, "__InternalSupabase">, Omit<Database, "__InternalSupabase">[SchemaName extends string & Exclude<keyof Database, "__InternalSupabase"> ? SchemaName : "public" extends Exclude<keyof Database, "__InternalSupabase"> ? Exclude<keyof Database, "__InternalSupabase"> & "public" : string & Exclude<Exclude<keyof Database, "__InternalSupabase">, "__InternalSupabase">] extends {
|
|
4
|
+
Tables: Record<string, {
|
|
5
|
+
Row: Record<string, unknown>;
|
|
6
|
+
Insert: Record<string, unknown>;
|
|
7
|
+
Update: Record<string, unknown>;
|
|
8
|
+
Relationships: {
|
|
9
|
+
foreignKeyName: string;
|
|
10
|
+
columns: string[];
|
|
11
|
+
isOneToOne?: boolean;
|
|
12
|
+
referencedRelation: string;
|
|
13
|
+
referencedColumns: string[];
|
|
14
|
+
}[];
|
|
15
|
+
ComputedFields?: string;
|
|
16
|
+
}>;
|
|
17
|
+
Views: Record<string, {
|
|
18
|
+
Row: Record<string, unknown>;
|
|
19
|
+
Insert: Record<string, unknown>;
|
|
20
|
+
Update: Record<string, unknown>;
|
|
21
|
+
Relationships: {
|
|
22
|
+
foreignKeyName: string;
|
|
23
|
+
columns: string[];
|
|
24
|
+
isOneToOne?: boolean;
|
|
25
|
+
referencedRelation: string;
|
|
26
|
+
referencedColumns: string[];
|
|
27
|
+
}[];
|
|
28
|
+
ComputedFields?: string;
|
|
29
|
+
} | {
|
|
30
|
+
Row: Record<string, unknown>;
|
|
31
|
+
Relationships: {
|
|
32
|
+
foreignKeyName: string;
|
|
33
|
+
columns: string[];
|
|
34
|
+
isOneToOne?: boolean;
|
|
35
|
+
referencedRelation: string;
|
|
36
|
+
referencedColumns: string[];
|
|
37
|
+
}[];
|
|
38
|
+
ComputedFields?: string;
|
|
39
|
+
}>;
|
|
40
|
+
Functions: Record<string, {
|
|
41
|
+
Args: Record<string, unknown> | never;
|
|
42
|
+
Returns: unknown;
|
|
43
|
+
SetofOptions?: {
|
|
44
|
+
isSetofReturn?: boolean | undefined;
|
|
45
|
+
isOneToOne?: boolean | undefined;
|
|
46
|
+
isNotNullable?: boolean | undefined;
|
|
47
|
+
to: string;
|
|
48
|
+
from: string;
|
|
49
|
+
};
|
|
50
|
+
}>;
|
|
51
|
+
} ? Omit<Database, "__InternalSupabase">[SchemaName extends string & Exclude<keyof Database, "__InternalSupabase"> ? SchemaName : "public" extends Exclude<keyof Database, "__InternalSupabase"> ? Exclude<keyof Database, "__InternalSupabase"> & "public" : string & Exclude<Exclude<keyof Database, "__InternalSupabase">, "__InternalSupabase">] : never, SchemaName extends string & Exclude<keyof Database, "__InternalSupabase"> ? Database extends {
|
|
52
|
+
__InternalSupabase: {
|
|
53
|
+
PostgrestVersion: string;
|
|
54
|
+
};
|
|
55
|
+
} ? Database["__InternalSupabase"] : {
|
|
56
|
+
PostgrestVersion: "12";
|
|
57
|
+
} : SchemaName extends {
|
|
58
|
+
PostgrestVersion: string;
|
|
59
|
+
} ? SchemaName : never>;
|
|
60
|
+
export type { CommonCookieMethods };
|
|
61
|
+
//# sourceMappingURL=server.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server.d.ts","names":[],"sources":["../../../../src/modules/supabase/next/server.ts"],"mappings":";;wBAQgB,aACd,gBACA,mBAAmB,eAAe,YAAY,cAAc,WAE5D,aACA,wBACA,SAAS,qBACT,UAAU,sBAAsB,8CAAW,eAAA,UAAA,YAAA,4BAAA,cAAA,kCAAA,8BAAA,cAAA,kCAAA,cAAA,sDAAA,QAAA,cAAA,wDAAA,KAAA,gCAAA,4BAAA,cAAA,kCAAA,8BAAA,cAAA,kCAAA,cAAA,sDAAA,QAAA,cAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAiB5C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server.js","names":["createServer","createServerClient","url","publishableKey","options","cookies","cookiesToSet","headers"],"sources":["../../../../src/modules/supabase/next/server.ts"],"sourcesContent":["import type {\n CommonCookieMethods,\n DatabaseSchema,\n DefaultSchema,\n} from \"@/utils/interface\";\nimport { createServerClient } from \"@supabase/ssr\";\nimport type { SupabaseClientOptions } from \"@supabase/supabase-js\";\n\nexport function createServer<\n Database = any,\n SchemaName extends DatabaseSchema<Database> = DefaultSchema<Database>,\n>(\n url: string,\n publishableKey: string,\n cookies: CommonCookieMethods,\n options?: SupabaseClientOptions<SchemaName>,\n) {\n return createServerClient<Database, SchemaName>(url, publishableKey, {\n ...options,\n cookies: {\n getAll() {\n return cookies.getAll();\n },\n async setAll(cookiesToSet, headers) {\n try {\n await cookies.setAll?.(cookiesToSet, headers);\n } catch {\n /* A read-only server render cannot persist refreshed cookies. */\n }\n },\n },\n });\n}\nexport type { CommonCookieMethods } from \"@/utils/interface\";\n"],"mappings":"A,mDAQA,SAAgBA,EAId,EACA,EACA,EACA,EACA,CACA,OAAOC,EAAyCC,EAAKC,EAAgB,CACnE,GAAGC,EACH,QAAS,CACP,QAAS,CACP,OAAOC,EAAQ,OAAO,CACxB,EACA,MAAM,OAAO,EAAc,EAAS,CAClC,GAAI,CACF,MAAMA,EAAQ,SAASC,EAAcC,CAAO,CAC9C,MAAQ,CAER,CACF,CACF,CACF,CAAC,CACH,C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},s=(n,r,s)=>(s=n==null?{}:e(i(n)),o(r||!n||!n.__esModule||!a.call(n,`default`)?t(s,`default`,{value:n,enumerable:!0}):s,n));Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return s}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});function e(e){return{subject:e.sub,name:e.name,email:e.email,emailVerified:e.email_verified,username:e.preferred_username,image:e.picture}}function t(e){return e instanceof Date?e.getTime():typeof e==`string`?Date.parse(e):e}function n(e,t,n,r){return{status:e,body:JSON.stringify({error:{message:t,code:n,data:{code:r,httpStatus:e}}})}}function r(e){if(!e.trim())return``;let t=e.split(`+`).map(e=>e.trim()),n=t.pop().replace(/^Arrow/,``);if(!/^(?:[a-z0-9,./;[\]\\-]|Tab|Space|Plus|Enter|Backspace|Delete|Escape|Up|Down|Left|Right|F(?:[1-9]|1[0-9]|2[0-4]))$/i.test(n))throw Error(`Choose a letter, number, function key or navigation key.`);let r=[`CmdOrCtrl`,`Ctrl`,`Alt`,`Shift`,`Super`];if(t.some(e=>!r.includes(e))||new Set(t).size!==t.length||!t.some(e=>[`CmdOrCtrl`,`Ctrl`,`Alt`,`Super`].includes(e))&&!/^F\d+$/i.test(n))throw Error(`Use Command/Control, Alt, or a function key.`);let i=[`Tab`,`Space`,`Plus`,`Enter`,`Backspace`,`Delete`,`Escape`,`Up`,`Down`,`Left`,`Right`];return[...r.filter(e=>t.includes(e)),i.find(e=>e.toLowerCase()===n.toLowerCase())??n.toUpperCase()].join(`+`)}function i(e,t){return e.replace(`CmdOrCtrl`,t?`Super`:`Ctrl`).split(`+`).sort().join(`+`)}function a(e){let t=new Headers;for(let[n,r]of Object.entries(e.headers))if(r!=null&&r!==!1)for(let e of Array.isArray(r)?r:[r])t.append(n,String(e));for(let e of(t.get(`connection`)??``).split(`,`))e.trim()&&t.delete(e.trim());for(let e of[`content-length`,`content-encoding`,`transfer-encoding`,`connection`,`keep-alive`,`trailer`,`upgrade`,`proxy-authenticate`,`proxy-authorization`])t.delete(e);return t}function o(e,t){if(e===void 0)return null;if(typeof e==`string`||e instanceof Blob||e instanceof ReadableStream||e instanceof ArrayBuffer)return e;if(ArrayBuffer.isView(e)){let t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e.buffer,e.byteOffset,e.byteLength)),t}if(e instanceof URLSearchParams||e instanceof FormData)return e;if(typeof e==`object`&&e&&`pipe`in e)throw TypeError(`Supply mapBody for a Node stream`);return t.has(`content-type`)||t.set(`content-type`,`application/json`),JSON.stringify(e)}exports.formatEpochMilliseconds=t,exports.formatOAuthIdentity=e,exports.formatResponseBody=o,exports.formatResponseHeaders=a,exports.formatRpcFailure=n,exports.normalizeAccelerator=r,exports.shortcutIdentity=i;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { a as AuthIdentity, j as OAuthIdentityClaims, w as DesktopRpcResponse } from "../interface-ii8DV63k.cjs";
|
|
2
|
+
import { AxiosResponse } from "axios";
|
|
3
|
+
/** Call only after provider identity validation. Never project authorization roles. */
|
|
4
|
+
export declare function formatOAuthIdentity(data: OAuthIdentityClaims): AuthIdentity;
|
|
5
|
+
export declare function formatEpochMilliseconds(value: Date | string | number): number;
|
|
6
|
+
export declare function formatRpcFailure(status: number, message: string, code: number, label: string): DesktopRpcResponse;
|
|
7
|
+
export declare function normalizeAccelerator(value: string): string;
|
|
8
|
+
export declare function shortcutIdentity(accelerator: string, isMac: boolean): string;
|
|
9
|
+
export declare function formatResponseHeaders(response: AxiosResponse<unknown>): Headers;
|
|
10
|
+
export declare function formatResponseBody(data: unknown, headers: Headers): BodyInit | null;
|
|
11
|
+
//# sourceMappingURL=formatter.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"formatter.d.cts","names":[],"sources":["../../src/utils/formatter.ts"],"mappings":";;;wBAQgB,oBAAoB,MAAM,sBAAsB;wBAWhD,wBAAwB,OAAO;wBAQ/B,iBACd,gBACA,iBACA,cACA,gBACC;wBASa,qBAAqB;wBAwCrB,iBAAiB,qBAAqB;wBAQtC,sBAAsB,UAAU,yBAAsB;wBA2BtD,mBACd,eACA,SAAS,UACR"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { a as formatRpcFailure, i as formatResponseHeaders, n as formatOAuthIdentity, o as normalizeAccelerator, r as formatResponseBody, s as shortcutIdentity, t as formatEpochMilliseconds } from "../formatter-vjbCoK9k.js";
|
|
2
|
+
export { formatEpochMilliseconds, formatOAuthIdentity, formatResponseBody, formatResponseHeaders, formatRpcFailure, normalizeAccelerator, shortcutIdentity };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
function e(e){return{subject:e.sub,name:e.name,email:e.email,emailVerified:e.email_verified,username:e.preferred_username,image:e.picture}}function t(e){return e instanceof Date?e.getTime():typeof e==`string`?Date.parse(e):e}function n(e,t,n,r){return{status:e,body:JSON.stringify({error:{message:t,code:n,data:{code:r,httpStatus:e}}})}}function r(e){if(!e.trim())return``;let t=e.split(`+`).map(e=>e.trim()),n=t.pop().replace(/^Arrow/,``);if(!/^(?:[a-z0-9,./;[\]\\-]|Tab|Space|Plus|Enter|Backspace|Delete|Escape|Up|Down|Left|Right|F(?:[1-9]|1[0-9]|2[0-4]))$/i.test(n))throw Error(`Choose a letter, number, function key or navigation key.`);let r=[`CmdOrCtrl`,`Ctrl`,`Alt`,`Shift`,`Super`];if(t.some(e=>!r.includes(e))||new Set(t).size!==t.length||!t.some(e=>[`CmdOrCtrl`,`Ctrl`,`Alt`,`Super`].includes(e))&&!/^F\d+$/i.test(n))throw Error(`Use Command/Control, Alt, or a function key.`);let i=[`Tab`,`Space`,`Plus`,`Enter`,`Backspace`,`Delete`,`Escape`,`Up`,`Down`,`Left`,`Right`];return[...r.filter(e=>t.includes(e)),i.find(e=>e.toLowerCase()===n.toLowerCase())??n.toUpperCase()].join(`+`)}function i(e,t){return e.replace(`CmdOrCtrl`,t?`Super`:`Ctrl`).split(`+`).sort().join(`+`)}function a(e){let t=new Headers;for(let[n,r]of Object.entries(e.headers))if(r!=null&&r!==!1)for(let e of Array.isArray(r)?r:[r])t.append(n,String(e));for(let e of(t.get(`connection`)??``).split(`,`))e.trim()&&t.delete(e.trim());for(let e of[`content-length`,`content-encoding`,`transfer-encoding`,`connection`,`keep-alive`,`trailer`,`upgrade`,`proxy-authenticate`,`proxy-authorization`])t.delete(e);return t}function o(e,t){if(e===void 0)return null;if(typeof e==`string`||e instanceof Blob||e instanceof ReadableStream||e instanceof ArrayBuffer)return e;if(ArrayBuffer.isView(e)){let t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e.buffer,e.byteOffset,e.byteLength)),t}if(e instanceof URLSearchParams||e instanceof FormData)return e;if(typeof e==`object`&&e&&`pipe`in e)throw TypeError(`Supply mapBody for a Node stream`);return t.has(`content-type`)||t.set(`content-type`,`application/json`),JSON.stringify(e)}export{t as formatEpochMilliseconds,e as formatOAuthIdentity,o as formatResponseBody,a as formatResponseHeaders,n as formatRpcFailure,r as normalizeAccelerator,i as shortcutIdentity};
|
|
2
|
+
//# sourceMappingURL=formatter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"formatter.js","names":["formatOAuthIdentity","data","formatEpochMilliseconds","value","formatRpcFailure","label","status","normalizeAccelerator","parts","part","key","order","names","shortcutIdentity","accelerator","isMac","formatResponseHeaders","headers","name","response","item","formatResponseBody","bytes"],"sources":["../../src/utils/formatter.ts"],"sourcesContent":["import type {\n AuthIdentity,\n DesktopRpcResponse,\n OAuthIdentityClaims,\n} from \"@/utils/interface\";\nimport type { AxiosResponse } from \"axios\";\n\n/** Call only after provider identity validation. Never project authorization roles. */\nexport function formatOAuthIdentity(data: OAuthIdentityClaims): AuthIdentity {\n return {\n subject: data.sub,\n name: data.name,\n email: data.email,\n emailVerified: data.email_verified,\n username: data.preferred_username,\n image: data.picture,\n };\n}\n\nexport function formatEpochMilliseconds(value: Date | string | number): number {\n return value instanceof Date\n ? value.getTime()\n : typeof value === \"string\"\n ? Date.parse(value)\n : value;\n}\n\nexport function formatRpcFailure(\n status: number,\n message: string,\n code: number,\n label: string,\n): DesktopRpcResponse {\n return {\n status,\n body: JSON.stringify({\n error: { message, code, data: { code: label, httpStatus: status } },\n }),\n };\n}\n\nexport function normalizeAccelerator(value: string): string {\n if (!value.trim()) return \"\";\n const parts = value.split(\"+\").map((part) => part.trim());\n const key = parts.pop()!.replace(/^Arrow/, \"\");\n if (\n !/^(?:[a-z0-9,./;[\\]\\\\-]|Tab|Space|Plus|Enter|Backspace|Delete|Escape|Up|Down|Left|Right|F(?:[1-9]|1[0-9]|2[0-4]))$/i.test(\n key,\n )\n )\n throw new Error(\"Choose a letter, number, function key or navigation key.\");\n const order = [\"CmdOrCtrl\", \"Ctrl\", \"Alt\", \"Shift\", \"Super\"];\n if (\n parts.some((part) => !order.includes(part)) ||\n new Set(parts).size !== parts.length ||\n (!parts.some((part) =>\n [\"CmdOrCtrl\", \"Ctrl\", \"Alt\", \"Super\"].includes(part),\n ) &&\n !/^F\\d+$/i.test(key))\n )\n throw new Error(\"Use Command/Control, Alt, or a function key.\");\n const names = [\n \"Tab\",\n \"Space\",\n \"Plus\",\n \"Enter\",\n \"Backspace\",\n \"Delete\",\n \"Escape\",\n \"Up\",\n \"Down\",\n \"Left\",\n \"Right\",\n ];\n return [\n ...order.filter((part) => parts.includes(part)),\n names.find((part) => part.toLowerCase() === key.toLowerCase()) ??\n key.toUpperCase(),\n ].join(\"+\");\n}\n\nexport function shortcutIdentity(accelerator: string, isMac: boolean): string {\n return accelerator\n .replace(\"CmdOrCtrl\", isMac ? \"Super\" : \"Ctrl\")\n .split(\"+\")\n .sort()\n .join(\"+\");\n}\n\nexport function formatResponseHeaders(response: AxiosResponse<unknown>) {\n const headers = new Headers();\n for (const [name, value] of Object.entries(response.headers)) {\n if (value === undefined || value === null || value === false) continue;\n for (const item of Array.isArray(value) ? value : [value])\n headers.append(name, String(item));\n }\n for (const name of (headers.get(\"connection\") ?? \"\").split(\",\")) {\n if (name.trim()) headers.delete(name.trim());\n }\n // Axios may have decompressed or reserialized the payload. These wire headers\n // would otherwise make the downstream browser decode/count it a second time.\n for (const name of [\n \"content-length\",\n \"content-encoding\",\n \"transfer-encoding\",\n \"connection\",\n \"keep-alive\",\n \"trailer\",\n \"upgrade\",\n \"proxy-authenticate\",\n \"proxy-authorization\",\n ])\n headers.delete(name);\n return headers;\n}\n\nexport function formatResponseBody(\n data: unknown,\n headers: Headers,\n): BodyInit | null {\n if (data === undefined) return null;\n if (\n typeof data === \"string\" ||\n data instanceof Blob ||\n data instanceof ReadableStream\n )\n return data;\n if (data instanceof ArrayBuffer) return data;\n if (ArrayBuffer.isView(data)) {\n const bytes = new Uint8Array(data.byteLength);\n bytes.set(new Uint8Array(data.buffer, data.byteOffset, data.byteLength));\n return bytes;\n }\n if (data instanceof URLSearchParams || data instanceof FormData) return data;\n if (typeof data === \"object\" && data !== null && \"pipe\" in data)\n throw new TypeError(\"Supply mapBody for a Node stream\");\n if (!headers.has(\"content-type\"))\n headers.set(\"content-type\", \"application/json\");\n return JSON.stringify(data);\n}\n"],"mappings":"AAQA,SAAgBA,EAAoB,EAAyC,CAC3E,MAAO,CACL,QAASC,EAAK,IACd,KAAMA,EAAK,KACX,MAAOA,EAAK,MACZ,cAAeA,EAAK,eACpB,SAAUA,EAAK,mBACf,MAAOA,EAAK,OACd,CACF,CAEA,SAAgBC,EAAwB,EAAuC,CAC7E,OAAOC,aAAiB,KACpBA,EAAM,QAAQ,EACd,OAAOA,GAAU,SACf,KAAK,MAAMA,CAAK,EAChBA,CACR,CAEA,SAAgBC,EACd,EACA,EACA,EACA,EACoB,CACpB,MAAO,CACL,SACA,KAAM,KAAK,UAAU,CACnB,MAAO,CAAE,UAAS,OAAM,KAAM,CAAE,KAAMC,EAAO,WAAYC,CAAO,CAAE,CACpE,CAAC,CACH,CACF,CAEA,SAAgBC,EAAqB,EAAuB,CAC1D,GAAI,CAACJ,EAAM,KAAK,EAAG,MAAO,GAC1B,IAAMK,EAAQL,EAAM,MAAM,GAAG,CAAC,CAAC,IAAK,GAASM,EAAK,KAAK,CAAC,EAClDC,EAAMF,EAAM,IAAI,CAAC,CAAE,QAAQ,SAAU,EAAE,EAC7C,GACE,CAAC,qHAAqH,KACpHE,CACF,EAEA,MAAU,MAAM,0DAA0D,EAC5E,IAAMC,EAAQ,CAAC,YAAa,OAAQ,MAAO,QAAS,OAAO,EAC3D,GACEH,EAAM,KAAM,GAAS,CAACG,EAAM,SAASF,CAAI,CAAC,GAC1C,IAAI,IAAID,CAAK,CAAC,CAAC,OAASA,EAAM,QAC7B,CAACA,EAAM,KAAM,GACZ,CAAC,YAAa,OAAQ,MAAO,OAAO,CAAC,CAAC,SAASC,CAAI,CACrD,GACE,CAAC,UAAU,KAAKC,CAAG,EAErB,MAAU,MAAM,8CAA8C,EAChE,IAAME,EAAQ,CACZ,MACA,QACA,OACA,QACA,YACA,SACA,SACA,KACA,OACA,OACA,OACF,EACA,MAAO,CACL,GAAGD,EAAM,OAAQ,GAASH,EAAM,SAASC,CAAI,CAAC,EAC9CG,EAAM,KAAM,GAASH,EAAK,YAAY,IAAMC,EAAI,YAAY,CAAC,GAC3DA,EAAI,YAAY,CACpB,CAAC,CAAC,KAAK,GAAG,CACZ,CAEA,SAAgBG,EAAiB,EAAqB,EAAwB,CAC5E,OAAOC,EACJ,QAAQ,YAAaC,EAAQ,QAAU,MAAM,CAAC,CAC9C,MAAM,GAAG,CAAC,CACV,KAAK,CAAC,CACN,KAAK,GAAG,CACb,CAEA,SAAgBC,EAAsB,EAAkC,CACtE,IAAMC,EAAU,IAAI,QACpB,IAAK,GAAM,CAACC,EAAMf,KAAU,OAAO,QAAQgB,EAAS,OAAO,EACzD,GAAIhB,GAAiC,MAAQA,IAAU,GACvD,IAAK,IAAMiB,KAAQ,MAAM,QAAQjB,CAAK,EAAIA,EAAQ,CAACA,CAAK,EACtDc,EAAQ,OAAOC,EAAM,OAAOE,CAAI,CAAC,EAErC,IAAK,IAAMF,KAASD,EAAQ,IAAI,YAAY,GAAK,GAAA,CAAI,MAAM,GAAG,EACxDC,EAAK,KAAK,GAAGD,EAAQ,OAAOC,EAAK,KAAK,CAAC,EAI7C,IAAK,IAAMA,IAAQ,CACjB,iBACA,mBACA,oBACA,aACA,aACA,UACA,UACA,qBACA,qBACF,EACED,EAAQ,OAAOC,CAAI,EACrB,OAAOD,CACT,CAEA,SAAgBI,EACd,EACA,EACiB,CACjB,GAAIpB,IAAS,IAAA,GAAW,OAAO,KAO/B,GALE,OAAOA,GAAS,UAChBA,aAAgB,MAChBA,aAAgB,gBAGdA,aAAgB,YAAa,OAAOA,EACxC,GAAI,YAAY,OAAOA,CAAI,EAAG,CAC5B,IAAMqB,EAAQ,IAAI,WAAWrB,EAAK,UAAU,EAE5C,OADAqB,EAAM,IAAI,IAAI,WAAWrB,EAAK,OAAQA,EAAK,WAAYA,EAAK,UAAU,CAAC,EAChEqB,CACT,CACA,GAAIrB,aAAgB,iBAAmBA,aAAgB,SAAU,OAAOA,EACxE,GAAI,OAAOA,GAAS,UAAYA,GAAiB,SAAUA,EACzD,MAAU,UAAU,kCAAkC,EAGxD,OAFKgB,EAAQ,IAAI,cAAc,GAC7BA,EAAQ,IAAI,eAAgB,kBAAkB,EACzC,KAAK,UAAUhB,CAAI,CAC5B,C"}
|
|
File without changes
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { A as LogoutVerifierOptions, B as SupabaseAnyClient, C as DesktopRpcRequest, D as IdentityCacheInput, E as FetcherOptions, F as ResourceAuthOptions, H as UploadUtils, I as SessionGrantGuardOptions, L as Shortcut, M as OAuthIdentityValidatorOptions, N as ProofStorage, O as IdentityCacheOptions, P as RealtimeUtils, R as ShortcutDefinition, S as DesktopRpcPolicy, T as DesktopRpcTransportOptions, U as VerifiedLogout, V as UploadInput, W as WebResponseOptions, _ as CallerToastOptions, a as AuthIdentity, b as DefaultSchema, c as AuthRetryOptions, d as AuthSessionBinding, f as CallerErrorOptions, g as CallerResponseHandler, h as CallerRequestOptions, i as AuthFreshnessInput, j as OAuthIdentityClaims, k as LogoutStorage, l as AuthRevocation, m as CallerOptions, n as AuthErrorCode, o as AuthPolicy, p as CallerMethodOptions, r as AuthFreshness, s as AuthRetryInput, t as AuthCookieInput, u as AuthRevocationIdentity, v as CommonCookieMethods, w as DesktopRpcResponse, x as DesktopRpcHandlerOptions, y as DatabaseSchema, z as ShortcutPolicy } from "../interface-ii8DV63k.cjs";
|
|
2
|
+
export { AuthCookieInput, AuthErrorCode, AuthFreshness, AuthFreshnessInput, AuthIdentity, AuthPolicy, AuthRetryInput, AuthRetryOptions, AuthRevocation, AuthRevocationIdentity, AuthSessionBinding, CallerErrorOptions, CallerMethodOptions, CallerOptions, CallerRequestOptions, CallerResponseHandler, CallerToastOptions, CommonCookieMethods, DatabaseSchema, DefaultSchema, DesktopRpcHandlerOptions, DesktopRpcPolicy, DesktopRpcRequest, DesktopRpcResponse, DesktopRpcTransportOptions, FetcherOptions, IdentityCacheInput, IdentityCacheOptions, LogoutStorage, LogoutVerifierOptions, OAuthIdentityClaims, OAuthIdentityValidatorOptions, ProofStorage, RealtimeUtils, ResourceAuthOptions, SessionGrantGuardOptions, Shortcut, ShortcutDefinition, ShortcutPolicy, SupabaseAnyClient, UploadInput, UploadUtils, VerifiedLogout, WebResponseOptions };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { A as LogoutVerifierOptions, B as SupabaseAnyClient, C as DesktopRpcRequest, D as IdentityCacheInput, E as FetcherOptions, F as ResourceAuthOptions, H as UploadUtils, I as SessionGrantGuardOptions, L as Shortcut, M as OAuthIdentityValidatorOptions, N as ProofStorage, O as IdentityCacheOptions, P as RealtimeUtils, R as ShortcutDefinition, S as DesktopRpcPolicy, T as DesktopRpcTransportOptions, U as VerifiedLogout, V as UploadInput, W as WebResponseOptions, _ as CallerToastOptions, a as AuthIdentity, b as DefaultSchema, c as AuthRetryOptions, d as AuthSessionBinding, f as CallerErrorOptions, g as CallerResponseHandler, h as CallerRequestOptions, i as AuthFreshnessInput, j as OAuthIdentityClaims, k as LogoutStorage, l as AuthRevocation, m as CallerOptions, n as AuthErrorCode, o as AuthPolicy, p as CallerMethodOptions, r as AuthFreshness, s as AuthRetryInput, t as AuthCookieInput, u as AuthRevocationIdentity, v as CommonCookieMethods, w as DesktopRpcResponse, x as DesktopRpcHandlerOptions, y as DatabaseSchema, z as ShortcutPolicy } from "../interface-ii8DV63k.js";
|
|
2
|
+
export { AuthCookieInput, AuthErrorCode, AuthFreshness, AuthFreshnessInput, AuthIdentity, AuthPolicy, AuthRetryInput, AuthRetryOptions, AuthRevocation, AuthRevocationIdentity, AuthSessionBinding, CallerErrorOptions, CallerMethodOptions, CallerOptions, CallerRequestOptions, CallerResponseHandler, CallerToastOptions, CommonCookieMethods, DatabaseSchema, DefaultSchema, DesktopRpcHandlerOptions, DesktopRpcPolicy, DesktopRpcRequest, DesktopRpcResponse, DesktopRpcTransportOptions, FetcherOptions, IdentityCacheInput, IdentityCacheOptions, LogoutStorage, LogoutVerifierOptions, OAuthIdentityClaims, OAuthIdentityValidatorOptions, ProofStorage, RealtimeUtils, ResourceAuthOptions, SessionGrantGuardOptions, Shortcut, ShortcutDefinition, ShortcutPolicy, SupabaseAnyClient, UploadInput, UploadUtils, VerifiedLogout, WebResponseOptions };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});function e(e,t={}){try{if(typeof e!=`string`||e!==e.trim())throw Error();let n=new URL(e);if(n.username||n.password||n.hash||!t.allowQuery&&n.search||t.originOnly&&n.pathname!==`/`||n.protocol!==`https:`&&!(t.allowLoopbackHttp&&n.protocol===`http:`&&[`localhost`,`127.0.0.1`,`[::1]`].includes(n.hostname)))throw Error();return n}catch{throw TypeError(`Invalid HTTP endpoint`)}}function t(e){let t=typeof e==`string`&&/^\d+$/.test(e)?Number(e):e;if(typeof t!=`number`||!Number.isSafeInteger(t)||t<0)throw TypeError(`Invalid byte count`);return t}function n(e){let t=e instanceof Date?e.getTime():typeof e==`string`?Date.parse(e):e;if(!Number.isSafeInteger(t)||t<0)throw TypeError(`Invalid timestamp`);return t}exports.parseByteCount=t,exports.parseEpochMilliseconds=n,exports.parseHttpEndpoint=e;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export interface HttpEndpointOptions {
|
|
2
|
+
allowLoopbackHttp?: boolean;
|
|
3
|
+
allowQuery?: boolean;
|
|
4
|
+
originOnly?: boolean;
|
|
5
|
+
}
|
|
6
|
+
/** Syntax/transport validation only; callers still own destination allowlists. */
|
|
7
|
+
export declare function parseHttpEndpoint(value: string, options?: HttpEndpointOptions): URL;
|
|
8
|
+
export declare function parseByteCount(value: unknown): number;
|
|
9
|
+
export declare function parseEpochMilliseconds(value: Date | string | number): number;
|
|
10
|
+
//# sourceMappingURL=normalization.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"normalization.d.cts","names":[],"sources":["../../src/utils/normalization.ts"],"mappings":"A,iBAAiB;EACf;EACA;EACA;;;wBAIc,kBACd,eACA,UAAS,sBACR;wBAwBa,eAAe;wBAQf,uBAAuB,OAAO"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export interface HttpEndpointOptions {
|
|
2
|
+
allowLoopbackHttp?: boolean;
|
|
3
|
+
allowQuery?: boolean;
|
|
4
|
+
originOnly?: boolean;
|
|
5
|
+
}
|
|
6
|
+
/** Syntax/transport validation only; callers still own destination allowlists. */
|
|
7
|
+
export declare function parseHttpEndpoint(value: string, options?: HttpEndpointOptions): URL;
|
|
8
|
+
export declare function parseByteCount(value: unknown): number;
|
|
9
|
+
export declare function parseEpochMilliseconds(value: Date | string | number): number;
|
|
10
|
+
//# sourceMappingURL=normalization.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"normalization.d.ts","names":[],"sources":["../../src/utils/normalization.ts"],"mappings":"A,iBAAiB;EACf;EACA;EACA;;;wBAIc,kBACd,eACA,UAAS,sBACR;wBAwBa,eAAe;wBAQf,uBAAuB,OAAO"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
function e(e,t={}){try{if(typeof e!=`string`||e!==e.trim())throw Error();let n=new URL(e);if(n.username||n.password||n.hash||!t.allowQuery&&n.search||t.originOnly&&n.pathname!==`/`||n.protocol!==`https:`&&!(t.allowLoopbackHttp&&n.protocol===`http:`&&[`localhost`,`127.0.0.1`,`[::1]`].includes(n.hostname)))throw Error();return n}catch{throw TypeError(`Invalid HTTP endpoint`)}}function t(e){let t=typeof e==`string`&&/^\d+$/.test(e)?Number(e):e;if(typeof t!=`number`||!Number.isSafeInteger(t)||t<0)throw TypeError(`Invalid byte count`);return t}function n(e){let t=e instanceof Date?e.getTime():typeof e==`string`?Date.parse(e):e;if(!Number.isSafeInteger(t)||t<0)throw TypeError(`Invalid timestamp`);return t}export{t as parseByteCount,n as parseEpochMilliseconds,e as parseHttpEndpoint};
|
|
2
|
+
//# sourceMappingURL=normalization.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"normalization.js","names":["parseHttpEndpoint","value","url","options","parseByteCount","number","parseEpochMilliseconds","result"],"sources":["../../src/utils/normalization.ts"],"sourcesContent":["export interface HttpEndpointOptions {\n allowLoopbackHttp?: boolean;\n allowQuery?: boolean;\n originOnly?: boolean;\n}\n\n/** Syntax/transport validation only; callers still own destination allowlists. */\nexport function parseHttpEndpoint(\n value: string,\n options: HttpEndpointOptions = {},\n): URL {\n try {\n if (typeof value !== \"string\" || value !== value.trim()) throw new Error();\n const url = new URL(value);\n if (\n url.username ||\n url.password ||\n url.hash ||\n (!options.allowQuery && url.search) ||\n (options.originOnly && url.pathname !== \"/\") ||\n (url.protocol !== \"https:\" &&\n !(\n options.allowLoopbackHttp &&\n url.protocol === \"http:\" &&\n [\"localhost\", \"127.0.0.1\", \"[::1]\"].includes(url.hostname)\n ))\n )\n throw new Error();\n return url;\n } catch {\n throw new TypeError(\"Invalid HTTP endpoint\");\n }\n}\n\nexport function parseByteCount(value: unknown): number {\n const number =\n typeof value === \"string\" && /^\\d+$/.test(value) ? Number(value) : value;\n if (typeof number !== \"number\" || !Number.isSafeInteger(number) || number < 0)\n throw new TypeError(\"Invalid byte count\");\n return number;\n}\n\nexport function parseEpochMilliseconds(value: Date | string | number): number {\n const result =\n value instanceof Date\n ? value.getTime()\n : typeof value === \"string\"\n ? Date.parse(value)\n : value;\n if (!Number.isSafeInteger(result) || result < 0)\n throw new TypeError(\"Invalid timestamp\");\n return result;\n}\n"],"mappings":"AAOA,SAAgBA,EACd,EACA,EAA+B,CAAC,EAC3B,CACL,GAAI,CACF,GAAI,OAAOC,GAAU,UAAYA,IAAUA,EAAM,KAAK,EAAG,MAAU,MAAM,EACzE,IAAMC,EAAM,IAAI,IAAID,CAAK,EACzB,GACEC,EAAI,UACJA,EAAI,UACJA,EAAI,MACH,CAACC,EAAQ,YAAcD,EAAI,QAC3BC,EAAQ,YAAcD,EAAI,WAAa,KACvCA,EAAI,WAAa,UAChB,EACEC,EAAQ,mBACRD,EAAI,WAAa,SACjB,CAAC,YAAa,YAAa,OAAO,CAAC,CAAC,SAASA,EAAI,QAAQ,GAG7D,MAAU,MAAM,EAClB,OAAOA,CACT,MAAQ,CACN,MAAU,UAAU,uBAAuB,CAC7C,CACF,CAEA,SAAgBE,EAAe,EAAwB,CACrD,IAAMC,EACJ,OAAOJ,GAAU,UAAY,QAAQ,KAAKA,CAAK,EAAI,OAAOA,CAAK,EAAIA,EACrE,GAAI,OAAOI,GAAW,UAAY,CAAC,OAAO,cAAcA,CAAM,GAAKA,EAAS,EAC1E,MAAU,UAAU,oBAAoB,EAC1C,OAAOA,CACT,CAEA,SAAgBC,EAAuB,EAAuC,CAC5E,IAAMC,EACJN,aAAiB,KACbA,EAAM,QAAQ,EACd,OAAOA,GAAU,SACf,KAAK,MAAMA,CAAK,EAChBA,EACR,GAAI,CAAC,OAAO,cAAcM,CAAM,GAAKA,EAAS,EAC5C,MAAU,UAAU,mBAAmB,EACzC,OAAOA,CACT,C"}
|
package/docs/auth.md
ADDED
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
# Native Better Auth integration
|
|
2
|
+
|
|
3
|
+
Targets the installed Better Auth 1.7 SDK. Applications own `betterAuth({...})`,
|
|
4
|
+
provider configuration, keys, trusted origins, database schemas/adapters,
|
|
5
|
+
business permissions, cookies and routing. This package never reads env or
|
|
6
|
+
connects to a database.
|
|
7
|
+
|
|
8
|
+
SSO uses the official OAuth Provider; relying-party web apps use Generic OAuth
|
|
9
|
+
with native account/session/verification storage. Electron uses the official
|
|
10
|
+
Electron SDK with its app backend. Do not create another OAuth/session engine
|
|
11
|
+
inside Structure or use an ID token as a service access token.
|
|
12
|
+
|
|
13
|
+
## App-owned SDK and required peer
|
|
14
|
+
|
|
15
|
+
`better-auth` is a **required peer dependency** (`^1.7`), not a runtime
|
|
16
|
+
dependency installed and re-exported by Structure. The package pins 1.7 in its
|
|
17
|
+
development dependencies only for builds and integration tests.
|
|
18
|
+
|
|
19
|
+
Every consuming application must declare its own direct `better-auth`
|
|
20
|
+
dependency, including Electron main and both runtimes of a split client/server
|
|
21
|
+
application. A package manager may auto-install peers, so the peer declaration
|
|
22
|
+
does not by itself enforce a direct dependency in the application's manifest.
|
|
23
|
+
|
|
24
|
+
```sh
|
|
25
|
+
bun add better-auth@1.7
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Import native APIs directly:
|
|
29
|
+
|
|
30
|
+
```ts
|
|
31
|
+
import { betterAuth } from "better-auth";
|
|
32
|
+
import { createAuthClient } from "better-auth/react";
|
|
33
|
+
import { genericOAuth } from "better-auth/plugins/generic-oauth";
|
|
34
|
+
import { requestToResourceInput, verifyAccessTokenRequest } from "better-auth/oauth2";
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
The `cores/auth` and `cores/auth/*` namespaces are retired and explicitly
|
|
38
|
+
blocked by the export map. There are no compatibility re-exports. Native
|
|
39
|
+
adapters, cookies, integrations and plugins must use their official package
|
|
40
|
+
paths (for example `better-auth/adapters/drizzle`, `better-auth/cookies` and
|
|
41
|
+
`better-auth/next-js`).
|
|
42
|
+
|
|
43
|
+
Install optional features only in the app that uses them: OAuth Provider,
|
|
44
|
+
enterprise SSO, Infra, SCIM, Stripe or Electron use their owning
|
|
45
|
+
`@better-auth/*` package directly. Structure no longer depends on any of
|
|
46
|
+
those feature packages. This is a breaking export change; publish a new
|
|
47
|
+
breaking release/tag and update consumers deliberately.
|
|
48
|
+
|
|
49
|
+
SDK clients use `signIn.social({ provider: configuredProviderId })` in 1.7;
|
|
50
|
+
Generic OAuth does not need an invented `genericOAuthClient` plugin.
|
|
51
|
+
`nextCookies` is server integration, not a renderer/client export.
|
|
52
|
+
|
|
53
|
+
## Modules retained because current apps use them
|
|
54
|
+
|
|
55
|
+
- `modules/auth/client`: `createAuthRetry`, `waitForAuthOperation`,
|
|
56
|
+
`AuthError`, configurable freshness/policy helpers. SDK owns session renewal;
|
|
57
|
+
retry only coalesces app-provided refresh/read callbacks, retries once after
|
|
58
|
+
401, and fences late refresh results after reset/dispose.
|
|
59
|
+
- `modules/auth/server`: origin/return-path checks, SHA-256 fingerprints,
|
|
60
|
+
`createResourceAuth`, `createProofReplayStore`, `createLogoutVerifier`
|
|
61
|
+
and policy. API verification delegates to official
|
|
62
|
+
`verifyAccessTokenRequest`; persistent proof/revocation and local permissions
|
|
63
|
+
remain app-owned adapters.
|
|
64
|
+
- Signed back-channel logout is still used by the apps. Signature, issuer,
|
|
65
|
+
audience, typ, expiry, event and replay checks cannot be removed just because
|
|
66
|
+
app sessions are now native.
|
|
67
|
+
|
|
68
|
+
## New reusable helpers
|
|
69
|
+
|
|
70
|
+
### Identity cache
|
|
71
|
+
|
|
72
|
+
`createIdentityCache<Value>({ load, key?, maxAgeMs?, capacity?, maxPending?, now? })`
|
|
73
|
+
extracts the repeated UserInfo coalescing/cache logic. Default TTL is 120 seconds,
|
|
74
|
+
with 512 entries/pending operations; applications may override both.
|
|
75
|
+
|
|
76
|
+
```ts
|
|
77
|
+
import { createIdentityCache } from "@gorth/structure/modules/auth/server";
|
|
78
|
+
|
|
79
|
+
const profiles = createIdentityCache({
|
|
80
|
+
load: loadValidatedActiveProfile,
|
|
81
|
+
maxAgeMs: applicationIdentityMaxAgeMs,
|
|
82
|
+
});
|
|
83
|
+
const profile = await profiles.get(accessToken, { fresh: sensitive, signal });
|
|
84
|
+
await profiles.forget(accessToken); // invalidate when revoking this grant
|
|
85
|
+
profiles.clear(); // invalidate this factory on teardown/global invalidation
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
The loader owns endpoint allowlisting, timeout, schema/status validation and
|
|
89
|
+
safe rejection classification. Return immutable identity data. The default key
|
|
90
|
+
is a SHA-256 fingerprint; raw credentials are not Map keys. Do not pass a raw
|
|
91
|
+
token-returning custom `key` callback. A transient failure never returns expired
|
|
92
|
+
identity data. Fresh calls bypass the cache and coalesce a currently running
|
|
93
|
+
check. TTL starts before networking; already-stale results are not cached.
|
|
94
|
+
Cancellation aborts only the waiter, not other callers' shared check.
|
|
95
|
+
Invalidation fences older responses, including pending key derivation on clear.
|
|
96
|
+
|
|
97
|
+
This is an **identity-only process-local cache**, not an authorization or
|
|
98
|
+
distributed session/refresh/replay store. Every protected operation still checks
|
|
99
|
+
token expiry/audience/scopes, durable revocation and local permissions. Sensitive
|
|
100
|
+
operations can force an online check. Cache contents contain no tokens.
|
|
101
|
+
|
|
102
|
+
### Native identity validator
|
|
103
|
+
|
|
104
|
+
`createOAuthIdentityValidator({ providerId, subject, allowed? })` supplies
|
|
105
|
+
`user.validateUserInfo`. The caller selects its additional user subject field;
|
|
106
|
+
the helper accepts only that provider's SDK OAuth lifecycle with a matching
|
|
107
|
+
non-empty `profile.sub`. Optional `allowed(profile)` implements app-owned
|
|
108
|
+
identity status policy. Errors are safe identifiers, not provider payloads.
|
|
109
|
+
|
|
110
|
+
It does not verify/decode JWTs or create users. SDK verification must be enabled
|
|
111
|
+
in app provider configuration. Mutable email/username/SSO roles are never used
|
|
112
|
+
to link identities or elevate local roles. Profile mapping, defaults and schema
|
|
113
|
+
remain app-owned.
|
|
114
|
+
|
|
115
|
+
### Session grant guard
|
|
116
|
+
|
|
117
|
+
`createSessionGrantGuard({ read, assertAllowed, now? }).run(operation, signal?)`
|
|
118
|
+
surrounds a native SDK credential-access operation, for example
|
|
119
|
+
`auth.api.getAccessToken`. `read` returns an authoritative existing native
|
|
120
|
+
session binding (`id, userId, subject, sid?, expiresAt`); `assertAllowed` checks
|
|
121
|
+
durable revocation and local permissions.
|
|
122
|
+
|
|
123
|
+
The guard checks before/after the operation and rejects missing, expired,
|
|
124
|
+
revoked, cancelled or changed session/account bindings. It adds no session
|
|
125
|
+
storage, token refresh, encryption or cookie format. Use it **before** sending
|
|
126
|
+
the next upstream proxy request. It cannot undo a side effect or a request
|
|
127
|
+
already dispatched, and does not revoke provider tokens itself. Multi-instance
|
|
128
|
+
race prevention still needs the app's durable session/revocation fences.
|
|
129
|
+
SDK handles token rotation; app handles grant revocation on local sign-out.
|
|
130
|
+
|
|
131
|
+
### Revocation matching
|
|
132
|
+
|
|
133
|
+
`matchesAuthRevocation(marker, identity, now?)` is a pure predicate for
|
|
134
|
+
already-validated receipts. Both `sid` and subject must match when supplied;
|
|
135
|
+
a subject-only event covers sessions issued through the end of that JWT issuance
|
|
136
|
+
second, not future independent logins. All timestamps are epoch milliseconds.
|
|
137
|
+
Expired markers do not match. Signature verification, durable receipt uniqueness,
|
|
138
|
+
atomic session invalidation and retention remain with existing verifier/adapters.
|
|
139
|
+
|
|
140
|
+
## Breaking legacy removal
|
|
141
|
+
|
|
142
|
+
Removed runtime modules: custom OAuth/PKCE engine, custom session store/refresh
|
|
143
|
+
engine, discovery/JWKS snapshot cache, session-bound transport, BFF HMAC,
|
|
144
|
+
endpoint/schema helpers used only by those engines, purpose-bound JWE cipher,
|
|
145
|
+
custom UI auth store/session adapter and loopback desktop login orchestration.
|
|
146
|
+
Their dependent types, formatters, exports and package-only obsolete tests are
|
|
147
|
+
removed too. Do not create fallback shims.
|
|
148
|
+
|
|
149
|
+
Use native Generic OAuth, getSession/useSession/signOut/getAccessToken and
|
|
150
|
+
`@better-auth/electron` instead. Do not migrate old ciphertext into native
|
|
151
|
+
storage without an app-owned explicit migration.
|
|
152
|
+
|
|
153
|
+
Active runtime imports in the ten apps and SSO were inspected and retained.
|
|
154
|
+
Some **legacy consumer tests**, however, still exercise removed APIs:
|
|
155
|
+
|
|
156
|
+
- Chat `tests/auth.test.ts`: custom OAuth/session contracts.
|
|
157
|
+
- Browser and Launcher `tests/vitest/auth-timeout.test.ts`: `createDesktopLogin`.
|
|
158
|
+
|
|
159
|
+
These must be replaced with native SDK tests before their next package update;
|
|
160
|
+
they cannot continue to import intentionally deleted APIs. Archived `pkg`
|
|
161
|
+
sources/docs can also mention them. No app, installed package, DB or SSO
|
|
162
|
+
registration was modified in this package-only change.
|
|
163
|
+
|
|
164
|
+
Publish as a **major release** because exports were intentionally removed.
|
|
165
|
+
Version/tag/publication remains owner-controlled; current package version was
|
|
166
|
+
not silently bumped. Publish and refresh consumer lockfiles before adopting new
|
|
167
|
+
helpers. Other infrastructure modules (HTTP, desktop RPC/shortcuts, Supabase)
|
|
168
|
+
are preserved rather than assuming auth migration makes them obsolete.
|
|
169
|
+
|
|
170
|
+
## Verification
|
|
171
|
+
|
|
172
|
+
`pnpm verify` checks types, runtime tests, ESM/CJS build and public exports.
|
|
173
|
+
Tests cover SDK-native social login/account-selection/PKCE using an isolated
|
|
174
|
+
memory adapter, identity cache races, freshness, logout, grants, audience/scopes,
|
|
175
|
+
DPoP, browser-safe helper graphs, HTTP and desktop infrastructure.
|
|
176
|
+
Fixtures are not production adapters or a live browser/cloud end-to-end test.
|
|
177
|
+
|
|
178
|
+
References:
|
|
179
|
+
|
|
180
|
+
- [Generic OAuth](https://better-auth.com/docs/plugins/generic-oauth)
|
|
181
|
+
- [Session management](https://better-auth.com/docs/concepts/session-management)
|
|
182
|
+
- [OAuth Provider](https://better-auth.com/docs/plugins/oauth-provider)
|
|
183
|
+
- [Electron integration](https://better-auth.com/docs/integrations/electron)
|
|
184
|
+
|
|
185
|
+
The server helpers delegate OAuth protocol operations to public `better-auth/oauth2`
|
|
186
|
+
exports, including `verifyAccessTokenRequest`, `clientCredentialsTokenRequest`,
|
|
187
|
+
`parseAccessTokenAuthorization` and `mergeScopes`. Host-specific claim, continuity,
|
|
188
|
+
freshness and durable replay policy remain explicit. `better-auth` is supplied by
|
|
189
|
+
the host as a peer; do not instantiate a second authentication engine in this package.
|