@gorth-io/structure 0.0.0-alpha.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +12 -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 +3 -0
- package/dist/cores/ably/spaces/index.d.ts +3 -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-MMKFBkro.d.cts +12 -0
- package/dist/formatter-MMKFBkro.d.cts.map +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-BR9QNgXO.d.cts +283 -0
- package/dist/interface-BR9QNgXO.d.cts.map +1 -0
- package/dist/interface-ii8DV63k.d.ts +283 -0
- package/dist/interface-ii8DV63k.d.ts.map +1 -0
- package/dist/interface-weqBVeUf.d.cts +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 +5 -0
- package/dist/modules/auth/client/index.d.ts +5 -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/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 +12 -0
- package/dist/modules/auth/server/index.d.ts +12 -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 +3 -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/proof.cjs +1 -0
- package/dist/modules/auth/server/proof.d.cts +6 -0
- package/dist/modules/auth/server/proof.d.cts.map +1 -0
- package/dist/modules/auth/server/proof.d.ts +6 -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/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/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/desktop/index.cjs +1 -0
- package/dist/modules/desktop/index.d.cts +6 -0
- package/dist/modules/desktop/index.d.ts +6 -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/rpc.cjs +1 -0
- package/dist/modules/desktop/rpc.d.cts +7 -0
- package/dist/modules/desktop/rpc.d.cts.map +1 -0
- package/dist/modules/desktop/rpc.d.ts +7 -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/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 +5 -0
- package/dist/modules/http/index.d.ts +5 -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 +2 -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/docs/auth.md +183 -0
- package/docs/modules.md +36 -0
- package/package.json +189 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"revocation.js","names":["matchesAuthRevocation","marker","identity","now","value","AuthError"],"sources":["../../../../src/modules/auth/server/revocation.ts"],"sourcesContent":["import { AuthError } from \"@/modules/auth/interface\";\nimport type { AuthRevocation, AuthRevocationIdentity } from \"@/utils/interface\";\n\n/** Both sid/sub must match when supplied. Subject-only events use iat's entire second. */\nexport function matchesAuthRevocation(\n marker: AuthRevocation,\n identity: AuthRevocationIdentity,\n now: number = Date.now(),\n): boolean {\n if (\n (!marker.sid && !marker.subject) ||\n !identity.subject ||\n [marker.issuedAt, marker.expiresAt, identity.issuedAt, now].some(\n (value) => !Number.isSafeInteger(value) || value < 0,\n )\n )\n throw new AuthError(\"rejected\");\n return (\n marker.expiresAt > now &&\n (!marker.subject || marker.subject === identity.subject) &&\n (!marker.sid || marker.sid === identity.sid) &&\n (!!marker.sid ||\n Math.floor(identity.issuedAt / 1000) <=\n Math.floor(marker.issuedAt / 1000))\n );\n}\n"],"mappings":"A,4CAIA,SAAgBA,EACd,EACA,EACA,EAAc,KAAK,IAAI,EACd,CACT,GACG,CAACC,EAAO,KAAO,CAACA,EAAO,SACxB,CAACC,EAAS,SACV,CAACD,EAAO,SAAUA,EAAO,UAAWC,EAAS,SAAUC,CAAG,CAAC,CAAC,KACzD,GAAU,CAAC,OAAO,cAAcC,CAAK,GAAKA,EAAQ,CACrD,EAEA,MAAM,IAAIC,EAAU,UAAU,EAChC,OACEJ,EAAO,UAAYE,IAClB,CAACF,EAAO,SAAWA,EAAO,UAAYC,EAAS,WAC/C,CAACD,EAAO,KAAOA,EAAO,MAAQC,EAAS,OACvC,CAAC,CAACD,EAAO,KACR,KAAK,MAAMC,EAAS,SAAW,GAAI,GACjC,KAAK,MAAMD,EAAO,SAAW,GAAI,EAEzC,C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let e=require("@supabase/supabase-js");function t(t,n,r){return(0,e.createClient)(t,n,r)}function n(t,n,r){return(0,e.createClient)(t,n,r)}exports.createCommonAdminClient=t,exports.createCommonPublicClient=n;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { SupabaseClientOptions } from "@supabase/supabase-js";
|
|
2
|
+
export declare function createCommonAdminClient(url: string, serviceRoleKey: string, options?: SupabaseClientOptions<"public">): import("@supabase/supabase-js").SupabaseClient<any, "public", "public", any, any>;
|
|
3
|
+
export declare function createCommonPublicClient(url: string, anonOrPublishableKey: string, options?: SupabaseClientOptions<"public">): import("@supabase/supabase-js").SupabaseClient<any, "public", "public", any, any>;
|
|
4
|
+
//# sourceMappingURL=admin.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"admin.d.cts","names":[],"sources":["../../../src/modules/common/admin.ts"],"mappings":";wBAGgB,wBACd,aACA,wBACA,UAAU,kEAA+B;wBAK3B,yBACd,aACA,8BACA,UAAU,kEAA+B"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { SupabaseClientOptions } from "@supabase/supabase-js";
|
|
2
|
+
export declare function createCommonAdminClient(url: string, serviceRoleKey: string, options?: SupabaseClientOptions<"public">): import("@supabase/supabase-js").SupabaseClient<any, "public", "public", any, any>;
|
|
3
|
+
export declare function createCommonPublicClient(url: string, anonOrPublishableKey: string, options?: SupabaseClientOptions<"public">): import("@supabase/supabase-js").SupabaseClient<any, "public", "public", any, any>;
|
|
4
|
+
//# sourceMappingURL=admin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"admin.d.ts","names":[],"sources":["../../../src/modules/common/admin.ts"],"mappings":";wBAGgB,wBACd,aACA,wBACA,UAAU,kEAA+B;wBAK3B,yBACd,aACA,8BACA,UAAU,kEAA+B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"admin.js","names":["createCommonAdminClient","createClient","url","serviceRoleKey","options","createCommonPublicClient","anonOrPublishableKey"],"sources":["../../../src/modules/common/admin.ts"],"sourcesContent":["import type { SupabaseClientOptions } from \"@supabase/supabase-js\";\nimport { createClient } from \"@supabase/supabase-js\";\n\nexport function createCommonAdminClient(\n url: string,\n serviceRoleKey: string,\n options?: SupabaseClientOptions<\"public\">,\n) {\n return createClient(url, serviceRoleKey, options);\n}\n\nexport function createCommonPublicClient(\n url: string,\n anonOrPublishableKey: string,\n options?: SupabaseClientOptions<\"public\">,\n) {\n return createClient(url, anonOrPublishableKey, options);\n}\n"],"mappings":"A,qDAGA,SAAgBA,EACd,EACA,EACA,EACA,CACA,OAAOC,EAAaC,EAAKC,EAAgBC,CAAO,CAClD,CAEA,SAAgBC,EACd,EACA,EACA,EACA,CACA,OAAOJ,EAAaC,EAAKI,EAAsBF,CAAO,CACxD,C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let e=require("@supabase/ssr");function t(t,n,r){return(0,e.createBrowserClient)(t,n,{...r??{}})}function n(t,n,r,i){return(0,e.createServerClient)(t,n,{...i,cookies:r})}exports.createCommonBrowserClient=t,exports.createCommonServerClient=n;
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { v as CommonCookieMethods } from "../../interface-BR9QNgXO.cjs";
|
|
2
|
+
import { SupabaseClientOptions } from "@supabase/supabase-js";
|
|
3
|
+
export declare function createCommonBrowserClient<Database = any, SchemaName extends string & keyof Omit<Database, "__InternalSupabase"> = "public" extends keyof Omit<Database, "__InternalSupabase"> ? "public" : string & keyof Omit<Database, "__InternalSupabase">>(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
|
+
export declare function createCommonServerClient<Database = any, SchemaName extends string & keyof Omit<Database, "__InternalSupabase"> = "public" extends keyof Omit<Database, "__InternalSupabase"> ? "public" : string & keyof Omit<Database, "__InternalSupabase">>(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 {
|
|
61
|
+
Tables: Record<string, {
|
|
62
|
+
Row: Record<string, unknown>;
|
|
63
|
+
Insert: Record<string, unknown>;
|
|
64
|
+
Update: Record<string, unknown>;
|
|
65
|
+
Relationships: {
|
|
66
|
+
foreignKeyName: string;
|
|
67
|
+
columns: string[];
|
|
68
|
+
isOneToOne?: boolean;
|
|
69
|
+
referencedRelation: string;
|
|
70
|
+
referencedColumns: string[];
|
|
71
|
+
}[];
|
|
72
|
+
ComputedFields?: string;
|
|
73
|
+
}>;
|
|
74
|
+
Views: Record<string, {
|
|
75
|
+
Row: Record<string, unknown>;
|
|
76
|
+
Insert: Record<string, unknown>;
|
|
77
|
+
Update: Record<string, unknown>;
|
|
78
|
+
Relationships: {
|
|
79
|
+
foreignKeyName: string;
|
|
80
|
+
columns: string[];
|
|
81
|
+
isOneToOne?: boolean;
|
|
82
|
+
referencedRelation: string;
|
|
83
|
+
referencedColumns: string[];
|
|
84
|
+
}[];
|
|
85
|
+
ComputedFields?: string;
|
|
86
|
+
} | {
|
|
87
|
+
Row: Record<string, unknown>;
|
|
88
|
+
Relationships: {
|
|
89
|
+
foreignKeyName: string;
|
|
90
|
+
columns: string[];
|
|
91
|
+
isOneToOne?: boolean;
|
|
92
|
+
referencedRelation: string;
|
|
93
|
+
referencedColumns: string[];
|
|
94
|
+
}[];
|
|
95
|
+
ComputedFields?: string;
|
|
96
|
+
}>;
|
|
97
|
+
Functions: Record<string, {
|
|
98
|
+
Args: Record<string, unknown> | never;
|
|
99
|
+
Returns: unknown;
|
|
100
|
+
SetofOptions?: {
|
|
101
|
+
isSetofReturn?: boolean | undefined;
|
|
102
|
+
isOneToOne?: boolean | undefined;
|
|
103
|
+
isNotNullable?: boolean | undefined;
|
|
104
|
+
to: string;
|
|
105
|
+
from: string;
|
|
106
|
+
};
|
|
107
|
+
}>;
|
|
108
|
+
} ? 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 {
|
|
109
|
+
__InternalSupabase: {
|
|
110
|
+
PostgrestVersion: string;
|
|
111
|
+
};
|
|
112
|
+
} ? Database["__InternalSupabase"] : {
|
|
113
|
+
PostgrestVersion: "12";
|
|
114
|
+
} : SchemaName extends {
|
|
115
|
+
PostgrestVersion: string;
|
|
116
|
+
} ? SchemaName : never>;
|
|
117
|
+
export type { CommonCookieMethods };
|
|
118
|
+
//# sourceMappingURL=client.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.d.cts","names":[],"sources":["../../../src/modules/common/client.ts"],"mappings":";;wBAIgB,0BACd,gBACA,kCAAkC,KAAK,yDACd,KAAK,4DAET,KAAK,iCAE1B,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAK5C;wBAEe,yBACd,gBACA,kCAAkC,KAAK,yDACd,KAAK,4DAET,KAAK,iCAE1B,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAM5C"}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { v as CommonCookieMethods } from "../../interface-ii8DV63k.js";
|
|
2
|
+
import { SupabaseClientOptions } from "@supabase/supabase-js";
|
|
3
|
+
export declare function createCommonBrowserClient<Database = any, SchemaName extends string & keyof Omit<Database, "__InternalSupabase"> = "public" extends keyof Omit<Database, "__InternalSupabase"> ? "public" : string & keyof Omit<Database, "__InternalSupabase">>(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
|
+
export declare function createCommonServerClient<Database = any, SchemaName extends string & keyof Omit<Database, "__InternalSupabase"> = "public" extends keyof Omit<Database, "__InternalSupabase"> ? "public" : string & keyof Omit<Database, "__InternalSupabase">>(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 {
|
|
61
|
+
Tables: Record<string, {
|
|
62
|
+
Row: Record<string, unknown>;
|
|
63
|
+
Insert: Record<string, unknown>;
|
|
64
|
+
Update: Record<string, unknown>;
|
|
65
|
+
Relationships: {
|
|
66
|
+
foreignKeyName: string;
|
|
67
|
+
columns: string[];
|
|
68
|
+
isOneToOne?: boolean;
|
|
69
|
+
referencedRelation: string;
|
|
70
|
+
referencedColumns: string[];
|
|
71
|
+
}[];
|
|
72
|
+
ComputedFields?: string;
|
|
73
|
+
}>;
|
|
74
|
+
Views: Record<string, {
|
|
75
|
+
Row: Record<string, unknown>;
|
|
76
|
+
Insert: Record<string, unknown>;
|
|
77
|
+
Update: Record<string, unknown>;
|
|
78
|
+
Relationships: {
|
|
79
|
+
foreignKeyName: string;
|
|
80
|
+
columns: string[];
|
|
81
|
+
isOneToOne?: boolean;
|
|
82
|
+
referencedRelation: string;
|
|
83
|
+
referencedColumns: string[];
|
|
84
|
+
}[];
|
|
85
|
+
ComputedFields?: string;
|
|
86
|
+
} | {
|
|
87
|
+
Row: Record<string, unknown>;
|
|
88
|
+
Relationships: {
|
|
89
|
+
foreignKeyName: string;
|
|
90
|
+
columns: string[];
|
|
91
|
+
isOneToOne?: boolean;
|
|
92
|
+
referencedRelation: string;
|
|
93
|
+
referencedColumns: string[];
|
|
94
|
+
}[];
|
|
95
|
+
ComputedFields?: string;
|
|
96
|
+
}>;
|
|
97
|
+
Functions: Record<string, {
|
|
98
|
+
Args: Record<string, unknown> | never;
|
|
99
|
+
Returns: unknown;
|
|
100
|
+
SetofOptions?: {
|
|
101
|
+
isSetofReturn?: boolean | undefined;
|
|
102
|
+
isOneToOne?: boolean | undefined;
|
|
103
|
+
isNotNullable?: boolean | undefined;
|
|
104
|
+
to: string;
|
|
105
|
+
from: string;
|
|
106
|
+
};
|
|
107
|
+
}>;
|
|
108
|
+
} ? 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 {
|
|
109
|
+
__InternalSupabase: {
|
|
110
|
+
PostgrestVersion: string;
|
|
111
|
+
};
|
|
112
|
+
} ? Database["__InternalSupabase"] : {
|
|
113
|
+
PostgrestVersion: "12";
|
|
114
|
+
} : SchemaName extends {
|
|
115
|
+
PostgrestVersion: string;
|
|
116
|
+
} ? SchemaName : never>;
|
|
117
|
+
export type { CommonCookieMethods };
|
|
118
|
+
//# sourceMappingURL=client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.d.ts","names":[],"sources":["../../../src/modules/common/client.ts"],"mappings":";;wBAIgB,0BACd,gBACA,kCAAkC,KAAK,yDACd,KAAK,4DAET,KAAK,iCAE1B,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAK5C;wBAEe,yBACd,gBACA,kCAAkC,KAAK,yDACd,KAAK,4DAET,KAAK,iCAE1B,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAM5C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.js","names":["createCommonBrowserClient","createBrowserClient","url","publishableKey","options","createCommonServerClient","createServerClient"],"sources":["../../../src/modules/common/client.ts"],"sourcesContent":["import type { CommonCookieMethods } from \"@/utils/interface\";\nimport { createBrowserClient, createServerClient } from \"@supabase/ssr\";\nimport type { SupabaseClientOptions } from \"@supabase/supabase-js\";\n\nexport function createCommonBrowserClient<\n Database = any,\n SchemaName extends string & keyof Omit<Database, \"__InternalSupabase\"> =\n \"public\" extends keyof Omit<Database, \"__InternalSupabase\">\n ? \"public\"\n : string & keyof Omit<Database, \"__InternalSupabase\">,\n>(\n url: string,\n publishableKey: string,\n options?: SupabaseClientOptions<SchemaName>,\n) {\n return createBrowserClient<Database, SchemaName>(url, publishableKey, {\n ...(options ?? {}),\n });\n}\n\nexport function createCommonServerClient<\n Database = any,\n SchemaName extends string & keyof Omit<Database, \"__InternalSupabase\"> =\n \"public\" extends keyof Omit<Database, \"__InternalSupabase\">\n ? \"public\"\n : string & keyof Omit<Database, \"__InternalSupabase\">,\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 });\n}\n\nexport type { CommonCookieMethods } from \"@/utils/interface\";\n"],"mappings":"A,4EAIA,SAAgBA,EAOd,EACA,EACA,EACA,CACA,OAAOC,EAA0CC,EAAKC,EAAgB,CACpE,GAAIC,GAAW,CAAC,CAClB,CAAC,CACH,CAEA,SAAgBC,EAOd,EACA,EACA,EACA,EACA,CACA,OAAOC,EAAyCJ,EAAKC,EAAgB,CACnE,GAAGC,EACH,SACF,CAAC,CACH,C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./admin.cjs"),t=require("./client.cjs");require("./realtime.cjs");const n=require("./upload.cjs");exports.createCommonAdminClient=e.createCommonAdminClient,exports.createCommonBrowserClient=t.createCommonBrowserClient,exports.createCommonPublicClient=e.createCommonPublicClient,exports.createCommonServerClient=t.createCommonServerClient,exports.createCommonUploadUtils=n.createCommonUploadUtils;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { H as UploadUtils, P as RealtimeUtils, v as CommonCookieMethods } from "../../interface-BR9QNgXO.cjs";
|
|
2
|
+
import { createCommonAdminClient, createCommonPublicClient } from "./admin.cjs";
|
|
3
|
+
import { createCommonBrowserClient, createCommonServerClient } from "./client.cjs";
|
|
4
|
+
import "./realtime.cjs";
|
|
5
|
+
import { createCommonUploadUtils } from "./upload.cjs";
|
|
6
|
+
export { type CommonCookieMethods, type RealtimeUtils, type UploadUtils, createCommonAdminClient, createCommonBrowserClient, createCommonPublicClient, createCommonServerClient, createCommonUploadUtils };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { H as UploadUtils, P as RealtimeUtils, v as CommonCookieMethods } from "../../interface-ii8DV63k.js";
|
|
2
|
+
import { createCommonAdminClient, createCommonPublicClient } from "./admin.js";
|
|
3
|
+
import { createCommonBrowserClient, createCommonServerClient } from "./client.js";
|
|
4
|
+
import "./realtime.js";
|
|
5
|
+
import { createCommonUploadUtils } from "./upload.js";
|
|
6
|
+
export { type CommonCookieMethods, type RealtimeUtils, type UploadUtils, createCommonAdminClient, createCommonBrowserClient, createCommonPublicClient, createCommonServerClient, createCommonUploadUtils };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createCommonAdminClient as e,createCommonPublicClient as t}from"./admin.js";import{createCommonBrowserClient as n,createCommonServerClient as r}from"./client.js";import"./realtime.js";import{createCommonUploadUtils as i}from"./upload.js";export{e as createCommonAdminClient,n as createCommonBrowserClient,t as createCommonPublicClient,r as createCommonServerClient,i as createCommonUploadUtils};
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});function e(e){return{upload({bucket:t,path:n,fileBody:r,options:i}){return e.storage.from(t).upload(n,r,i)},upsert({bucket:t,path:n,fileBody:r,options:i}){return e.storage.from(t).upload(n,r,{...i??{},upsert:!0})},remove(t,n){return e.storage.from(t).remove(n)},getPublicUrl(t,n){return e.storage.from(t).getPublicUrl(n)},createSignedUrl(t,n,r){return e.storage.from(t).createSignedUrl(n,r)}}}exports.createCommonUploadUtils=e;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"upload.d.cts","names":[],"sources":["../../../src/modules/common/upload.ts"],"mappings":";wBAMgB,wBACd,QAAQ,oBACP"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"upload.d.ts","names":[],"sources":["../../../src/modules/common/upload.ts"],"mappings":";wBAMgB,wBACd,QAAQ,oBACP"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
function e(e){return{upload({bucket:t,path:n,fileBody:r,options:i}){return e.storage.from(t).upload(n,r,i)},upsert({bucket:t,path:n,fileBody:r,options:i}){return e.storage.from(t).upload(n,r,{...i??{},upsert:!0})},remove(t,n){return e.storage.from(t).remove(n)},getPublicUrl(t,n){return e.storage.from(t).getPublicUrl(n)},createSignedUrl(t,n,r){return e.storage.from(t).createSignedUrl(n,r)}}}export{e as createCommonUploadUtils};
|
|
2
|
+
//# sourceMappingURL=upload.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"upload.js","names":["createCommonUploadUtils","client","bucket","path","fileBody","options","paths","expiresIn"],"sources":["../../../src/modules/common/upload.ts"],"sourcesContent":["import type {\n SupabaseAnyClient,\n UploadInput,\n UploadUtils,\n} from \"@/utils/interface\";\n\nexport function createCommonUploadUtils(\n client: SupabaseAnyClient,\n): UploadUtils {\n return {\n upload({ bucket, path, fileBody, options }: UploadInput) {\n return client.storage.from(bucket).upload(path, fileBody, options as any);\n },\n upsert({ bucket, path, fileBody, options }: UploadInput) {\n return client.storage.from(bucket).upload(path, fileBody, {\n ...(options ?? {}),\n upsert: true,\n } as any);\n },\n remove(bucket: string, paths: string[]) {\n return client.storage.from(bucket).remove(paths);\n },\n getPublicUrl(bucket: string, path: string) {\n return client.storage.from(bucket).getPublicUrl(path);\n },\n createSignedUrl(bucket: string, path: string, expiresIn: number) {\n return client.storage.from(bucket).createSignedUrl(path, expiresIn);\n },\n };\n}\n\nexport type { UploadUtils } from \"@/utils/interface\";\n"],"mappings":"AAMA,SAAgBA,EACd,EACa,CACb,MAAO,CACL,OAAO,CAAE,SAAQ,OAAM,WAAU,WAAwB,CACvD,OAAOC,EAAO,QAAQ,KAAKC,CAAM,CAAC,CAAC,OAAOC,EAAMC,EAAUC,CAAc,CAC1E,EACA,OAAO,CAAE,SAAQ,OAAM,WAAU,WAAwB,CACvD,OAAOJ,EAAO,QAAQ,KAAKC,CAAM,CAAC,CAAC,OAAOC,EAAMC,EAAU,CACxD,GAAIC,GAAW,CAAC,EAChB,OAAQ,EACV,CAAQ,CACV,EACA,OAAO,EAAgB,EAAiB,CACtC,OAAOJ,EAAO,QAAQ,KAAKC,CAAM,CAAC,CAAC,OAAOI,CAAK,CACjD,EACA,aAAa,EAAgB,EAAc,CACzC,OAAOL,EAAO,QAAQ,KAAKC,CAAM,CAAC,CAAC,aAAaC,CAAI,CACtD,EACA,gBAAgB,EAAgB,EAAc,EAAmB,CAC/D,OAAOF,EAAO,QAAQ,KAAKC,CAAM,CAAC,CAAC,gBAAgBC,EAAMI,CAAS,CACpE,CACF,CACF,C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../utils/formatter.cjs"),t=require("./rpc.cjs"),n=require("./shortcut.cjs");exports.createDesktopRpcHandler=t.createDesktopRpcHandler,exports.createDesktopRpcTransport=t.createDesktopRpcTransport,exports.createShortcutValidator=n.createShortcutValidator,exports.normalizeAccelerator=e.normalizeAccelerator,exports.shortcutIdentity=e.shortcutIdentity;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { C as DesktopRpcRequest, L as Shortcut, R as ShortcutDefinition, S as DesktopRpcPolicy, w as DesktopRpcResponse, z as ShortcutPolicy } from "../../interface-BR9QNgXO.cjs";
|
|
2
|
+
import "./interface.cjs";
|
|
3
|
+
import { createDesktopRpcHandler, createDesktopRpcTransport } from "./rpc.cjs";
|
|
4
|
+
import { o as normalizeAccelerator, s as shortcutIdentity } from "../../formatter-MMKFBkro.cjs";
|
|
5
|
+
import { createShortcutValidator } from "./shortcut.cjs";
|
|
6
|
+
export { type DesktopRpcPolicy, type DesktopRpcRequest, type DesktopRpcResponse, type Shortcut, type ShortcutDefinition, type ShortcutPolicy, createDesktopRpcHandler, createDesktopRpcTransport, createShortcutValidator, normalizeAccelerator, shortcutIdentity };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { C as DesktopRpcRequest, L as Shortcut, R as ShortcutDefinition, S as DesktopRpcPolicy, w as DesktopRpcResponse, z as ShortcutPolicy } from "../../interface-ii8DV63k.js";
|
|
2
|
+
import "./interface.js";
|
|
3
|
+
import { createDesktopRpcHandler, createDesktopRpcTransport } from "./rpc.js";
|
|
4
|
+
import { o as normalizeAccelerator, s as shortcutIdentity } from "../../formatter-vjbCoK9k.js";
|
|
5
|
+
import { createShortcutValidator } from "./shortcut.js";
|
|
6
|
+
export { type DesktopRpcPolicy, type DesktopRpcRequest, type DesktopRpcResponse, type Shortcut, type ShortcutDefinition, type ShortcutPolicy, createDesktopRpcHandler, createDesktopRpcTransport, createShortcutValidator, normalizeAccelerator, shortcutIdentity };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{normalizeAccelerator as e,shortcutIdentity as t}from"../../utils/formatter.js";import{createDesktopRpcHandler as n,createDesktopRpcTransport as r}from"./rpc.js";import{createShortcutValidator as i}from"./shortcut.js";export{n as createDesktopRpcHandler,r as createDesktopRpcTransport,i as createShortcutValidator,e as normalizeAccelerator,t as shortcutIdentity};
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../auth/client/retry.cjs"),t=require("../../utils/formatter.cjs");let n=require("zod");function r(e){let t=e.origin??`https://desktop.invalid`,n=e.endpoint??`/trpc`,r=e.maxUrlLength??2e6,i=e.maxBodyBytes??8e6,a=e.maxResponseBytes??8e6,o=new URL(t);if(o.origin!==t||o.protocol!==`https:`||!/^\/[a-zA-Z][a-zA-Z0-9/-]*$/.test(n)||n.endsWith(`/`)||![r,i,a].every(e=>Number.isSafeInteger(e)&&e>0&&e<=16e6))throw TypeError(`Invalid desktop RPC policy`);return{origin:t,endpoint:n,maxUrlLength:r,maxBodyBytes:i,maxResponseBytes:a}}function i(e){return n.z.object({url:n.z.string().max(e.maxUrlLength).refine(t=>{try{let n=new URL(t),r=n.pathname.slice(e.endpoint.length+1);return n.origin===e.origin&&n.pathname.startsWith(e.endpoint+`/`)&&/^[a-zA-Z][a-zA-Z0-9.]*$/.test(r)&&!n.username&&!n.password&&!n.hash}catch{return!1}}),method:n.z.enum([`GET`,`POST`]),body:n.z.string().max(e.maxBodyBytes).optional()}).strict().refine(t=>(t.method!==`GET`||t.body===void 0)&&(t.body===void 0||new TextEncoder().encode(t.body).length<=e.maxBodyBytes))}function a(e){let n=r(e),a=i(n);return async function(r){let i=a.safeParse(r);if(!i.success)return t.formatRpcFailure(400,`Invalid desktop RPC request.`,-32600,`BAD_REQUEST`);try{let t=await e.handle(new Request(i.data.url,{method:i.data.method,body:i.data.body,headers:{"content-type":`application/json`}})),r=await o(t,n.maxResponseBytes);if(t.status<200||t.status>599)throw Error();return{status:t.status,body:r}}catch{return t.formatRpcFailure(500,`Desktop RPC unavailable.`,-32603,`INTERNAL_SERVER_ERROR`)}}}async function o(e,t){if(!e.body)return``;let n=e.body.getReader(),r=[],i=0;try{for(;;){let e=await n.read();if(e.done)break;if(i+=e.value.byteLength,i>t)throw await n.cancel(),Error(`RPC response too large`);r.push(e.value)}}finally{n.releaseLock()}let a=new Uint8Array(i),o=0;for(let e of r)a.set(e,o),o+=e.length;return new TextDecoder().decode(a)}function s(t){let n=r(t),a=i(n);return async function(r,i){let s=i?.signal??(r instanceof Request?r.signal:void 0);s?.throwIfAborted();let c=(i?.method??(r instanceof Request?r.method:`GET`)).toUpperCase(),l=i?.body??(r instanceof Request&&c===`POST`?await o(new Response(r.body),n.maxBodyBytes):void 0);if(l!==void 0&&typeof l!=`string`)throw TypeError(`Desktop RPC body must be text`);let u=a.parse({url:r instanceof Request?r.url:String(r),method:c,...l===void 0?{}:{body:l}});s?.throwIfAborted();let d=await e.waitForAuthOperation(t.request(u,s??void 0),s??void 0);if(s?.throwIfAborted(),!Number.isInteger(d.status)||d.status<200||d.status>599||typeof d.body!=`string`||new TextEncoder().encode(d.body).length>n.maxResponseBytes)throw TypeError(`Invalid desktop RPC response`);return new Response([204,205,304].includes(d.status)?null:d.body,{status:d.status,headers:{"content-type":`application/json`}})}}exports.createDesktopRpcHandler=a,exports.createDesktopRpcTransport=s;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import "./interface.cjs";
|
|
2
|
+
import { T as DesktopRpcTransportOptions, w as DesktopRpcResponse, x as DesktopRpcHandlerOptions } from "../../interface-BR9QNgXO.cjs";
|
|
3
|
+
/** Main-process packet validation. Supply tRPC's fetchRequestHandler as handle. */
|
|
4
|
+
export declare function createDesktopRpcHandler(options: DesktopRpcHandlerOptions): (input: unknown) => Promise<DesktopRpcResponse>;
|
|
5
|
+
/** No network request: URL is protocol metadata passed to app-owned trusted IPC. */
|
|
6
|
+
export declare function createDesktopRpcTransport(options: DesktopRpcTransportOptions): (input: string | URL | Request, init?: RequestInit) => Promise<Response>;
|
|
7
|
+
//# sourceMappingURL=rpc.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rpc.d.cts","names":[],"sources":["../../../src/modules/desktop/rpc.ts"],"mappings":";;;wBAmEgB,wBAAwB,SAAS,4BAI7C,mBACC,QAAQ;;wBA2DG,0BAA0B,SAAS,8BAI/C,gBAAgB,MAAM,SACtB,OAAO,gBACN,QAAQ"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import "./interface.js";
|
|
2
|
+
import { T as DesktopRpcTransportOptions, w as DesktopRpcResponse, x as DesktopRpcHandlerOptions } from "../../interface-ii8DV63k.js";
|
|
3
|
+
/** Main-process packet validation. Supply tRPC's fetchRequestHandler as handle. */
|
|
4
|
+
export declare function createDesktopRpcHandler(options: DesktopRpcHandlerOptions): (input: unknown) => Promise<DesktopRpcResponse>;
|
|
5
|
+
/** No network request: URL is protocol metadata passed to app-owned trusted IPC. */
|
|
6
|
+
export declare function createDesktopRpcTransport(options: DesktopRpcTransportOptions): (input: string | URL | Request, init?: RequestInit) => Promise<Response>;
|
|
7
|
+
//# sourceMappingURL=rpc.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rpc.d.ts","names":[],"sources":["../../../src/modules/desktop/rpc.ts"],"mappings":";;;wBAmEgB,wBAAwB,SAAS,4BAI7C,mBACC,QAAQ;;wBA2DG,0BAA0B,SAAS,8BAI/C,gBAAgB,MAAM,SACtB,OAAO,gBACN,QAAQ"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{waitForAuthOperation as e}from"../auth/client/retry.js";import{formatRpcFailure as t}from"../../utils/formatter.js";import{z as n}from"zod";function r(e){let t=e.origin??`https://desktop.invalid`,n=e.endpoint??`/trpc`,r=e.maxUrlLength??2e6,i=e.maxBodyBytes??8e6,a=e.maxResponseBytes??8e6,o=new URL(t);if(o.origin!==t||o.protocol!==`https:`||!/^\/[a-zA-Z][a-zA-Z0-9/-]*$/.test(n)||n.endsWith(`/`)||![r,i,a].every(e=>Number.isSafeInteger(e)&&e>0&&e<=16e6))throw TypeError(`Invalid desktop RPC policy`);return{origin:t,endpoint:n,maxUrlLength:r,maxBodyBytes:i,maxResponseBytes:a}}function i(e){return n.object({url:n.string().max(e.maxUrlLength).refine(t=>{try{let n=new URL(t),r=n.pathname.slice(e.endpoint.length+1);return n.origin===e.origin&&n.pathname.startsWith(e.endpoint+`/`)&&/^[a-zA-Z][a-zA-Z0-9.]*$/.test(r)&&!n.username&&!n.password&&!n.hash}catch{return!1}}),method:n.enum([`GET`,`POST`]),body:n.string().max(e.maxBodyBytes).optional()}).strict().refine(t=>(t.method!==`GET`||t.body===void 0)&&(t.body===void 0||new TextEncoder().encode(t.body).length<=e.maxBodyBytes))}function a(e){let n=r(e),a=i(n);return async function(r){let i=a.safeParse(r);if(!i.success)return t(400,`Invalid desktop RPC request.`,-32600,`BAD_REQUEST`);try{let t=await e.handle(new Request(i.data.url,{method:i.data.method,body:i.data.body,headers:{"content-type":`application/json`}})),r=await o(t,n.maxResponseBytes);if(t.status<200||t.status>599)throw Error();return{status:t.status,body:r}}catch{return t(500,`Desktop RPC unavailable.`,-32603,`INTERNAL_SERVER_ERROR`)}}}async function o(e,t){if(!e.body)return``;let n=e.body.getReader(),r=[],i=0;try{for(;;){let e=await n.read();if(e.done)break;if(i+=e.value.byteLength,i>t)throw await n.cancel(),Error(`RPC response too large`);r.push(e.value)}}finally{n.releaseLock()}let a=new Uint8Array(i),o=0;for(let e of r)a.set(e,o),o+=e.length;return new TextDecoder().decode(a)}function s(t){let n=r(t),a=i(n);return async function(r,i){let s=i?.signal??(r instanceof Request?r.signal:void 0);s?.throwIfAborted();let c=(i?.method??(r instanceof Request?r.method:`GET`)).toUpperCase(),l=i?.body??(r instanceof Request&&c===`POST`?await o(new Response(r.body),n.maxBodyBytes):void 0);if(l!==void 0&&typeof l!=`string`)throw TypeError(`Desktop RPC body must be text`);let u=a.parse({url:r instanceof Request?r.url:String(r),method:c,...l===void 0?{}:{body:l}});s?.throwIfAborted();let d=await e(t.request(u,s??void 0),s??void 0);if(s?.throwIfAborted(),!Number.isInteger(d.status)||d.status<200||d.status>599||typeof d.body!=`string`||new TextEncoder().encode(d.body).length>n.maxResponseBytes)throw TypeError(`Invalid desktop RPC response`);return new Response([204,205,304].includes(d.status)?null:d.body,{status:d.status,headers:{"content-type":`application/json`}})}}export{a as createDesktopRpcHandler,s as createDesktopRpcTransport};
|
|
2
|
+
//# sourceMappingURL=rpc.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rpc.js","names":["rpcPolicy","origin","options","endpoint","maxUrlLength","maxBodyBytes","maxResponseBytes","url","value","requestSchema","z","policy","path","input","createDesktopRpcHandler","schema","parsed","formatRpcFailure","response","body","boundedResponseText","reader","chunks","size","next","limit","bytes","offset","chunk","createDesktopRpcTransport","signal","init","method","result","waitForAuthOperation"],"sources":["../../../src/modules/desktop/rpc.ts"],"sourcesContent":["import { waitForAuthOperation } from \"@/modules/auth/client/retry\";\nimport type {\n DesktopRpcPolicy,\n DesktopRpcResponse,\n} from \"@/modules/desktop/interface\";\nimport { formatRpcFailure } from \"@/utils/formatter\";\nimport type {\n DesktopRpcHandlerOptions,\n DesktopRpcTransportOptions,\n} from \"@/utils/interface\";\nimport { z } from \"zod\";\n\nfunction rpcPolicy(options: DesktopRpcPolicy) {\n const origin = options.origin ?? \"https://desktop.invalid\";\n const endpoint = options.endpoint ?? \"/trpc\";\n const maxUrlLength = options.maxUrlLength ?? 2_000_000;\n const maxBodyBytes = options.maxBodyBytes ?? 8_000_000;\n const maxResponseBytes = options.maxResponseBytes ?? 8_000_000;\n const url = new URL(origin);\n if (\n url.origin !== origin ||\n url.protocol !== \"https:\" ||\n !/^\\/[a-zA-Z][a-zA-Z0-9/-]*$/.test(endpoint) ||\n endpoint.endsWith(\"/\") ||\n ![maxUrlLength, maxBodyBytes, maxResponseBytes].every(\n (value) =>\n Number.isSafeInteger(value) && value > 0 && value <= 16_000_000,\n )\n )\n throw new TypeError(\"Invalid desktop RPC policy\");\n return { origin, endpoint, maxUrlLength, maxBodyBytes, maxResponseBytes };\n}\nfunction requestSchema(policy: ReturnType<typeof rpcPolicy>) {\n return z\n .object({\n url: z\n .string()\n .max(policy.maxUrlLength)\n .refine((value) => {\n try {\n const url = new URL(value);\n const path = url.pathname.slice(policy.endpoint.length + 1);\n return (\n url.origin === policy.origin &&\n url.pathname.startsWith(policy.endpoint + \"/\") &&\n /^[a-zA-Z][a-zA-Z0-9.]*$/.test(path) &&\n !url.username &&\n !url.password &&\n !url.hash\n );\n } catch {\n return false;\n }\n }),\n method: z.enum([\"GET\", \"POST\"]),\n body: z.string().max(policy.maxBodyBytes).optional(),\n })\n .strict()\n .refine(\n (input) =>\n (input.method !== \"GET\" || input.body === undefined) &&\n (input.body === undefined ||\n new TextEncoder().encode(input.body).length <= policy.maxBodyBytes),\n );\n}\n\n/** Main-process packet validation. Supply tRPC's fetchRequestHandler as handle. */\nexport function createDesktopRpcHandler(options: DesktopRpcHandlerOptions) {\n const policy = rpcPolicy(options);\n const schema = requestSchema(policy);\n return async function handleRpcRequest(\n input: unknown,\n ): Promise<DesktopRpcResponse> {\n const parsed = schema.safeParse(input);\n if (!parsed.success)\n return formatRpcFailure(\n 400,\n \"Invalid desktop RPC request.\",\n -32600,\n \"BAD_REQUEST\",\n );\n try {\n const response = await options.handle(\n new Request(parsed.data.url, {\n method: parsed.data.method,\n body: parsed.data.body,\n headers: { \"content-type\": \"application/json\" },\n }),\n );\n const body = await boundedResponseText(response, policy.maxResponseBytes);\n if (response.status < 200 || response.status > 599) throw new Error();\n return { status: response.status, body };\n } catch {\n return formatRpcFailure(\n 500,\n \"Desktop RPC unavailable.\",\n -32603,\n \"INTERNAL_SERVER_ERROR\",\n );\n }\n };\n}\nasync function boundedResponseText(response: Response, limit: number) {\n if (!response.body) return \"\";\n const reader = response.body.getReader();\n const chunks: Uint8Array[] = [];\n let size = 0;\n try {\n for (;;) {\n const next = await reader.read();\n if (next.done) break;\n size += next.value.byteLength;\n if (size > limit) {\n await reader.cancel();\n throw new Error(\"RPC response too large\");\n }\n chunks.push(next.value);\n }\n } finally {\n reader.releaseLock();\n }\n const bytes = new Uint8Array(size);\n let offset = 0;\n for (const chunk of chunks) {\n bytes.set(chunk, offset);\n offset += chunk.length;\n }\n return new TextDecoder().decode(bytes);\n}\n\n/** No network request: URL is protocol metadata passed to app-owned trusted IPC. */\nexport function createDesktopRpcTransport(options: DesktopRpcTransportOptions) {\n const policy = rpcPolicy(options);\n const schema = requestSchema(policy);\n return async function rpcFetch(\n input: string | URL | Request,\n init?: RequestInit,\n ): Promise<Response> {\n const signal =\n init?.signal ?? (input instanceof Request ? input.signal : undefined);\n signal?.throwIfAborted();\n const method = (\n init?.method ?? (input instanceof Request ? input.method : \"GET\")\n ).toUpperCase();\n const body =\n init?.body ??\n (input instanceof Request && method === \"POST\"\n ? await boundedResponseText(\n new Response(input.body),\n policy.maxBodyBytes,\n )\n : undefined);\n if (body !== undefined && typeof body !== \"string\")\n throw new TypeError(\"Desktop RPC body must be text\");\n const parsed = schema.parse({\n url: input instanceof Request ? input.url : String(input),\n method,\n ...(body === undefined ? {} : { body }),\n });\n signal?.throwIfAborted();\n const result = await waitForAuthOperation(\n options.request(parsed, signal ?? undefined),\n signal ?? undefined,\n );\n signal?.throwIfAborted();\n if (\n !Number.isInteger(result.status) ||\n result.status < 200 ||\n result.status > 599 ||\n typeof result.body !== \"string\" ||\n new TextEncoder().encode(result.body).length > policy.maxResponseBytes\n )\n throw new TypeError(\"Invalid desktop RPC response\");\n return new Response(\n [204, 205, 304].includes(result.status) ? null : result.body,\n {\n status: result.status,\n headers: { \"content-type\": \"application/json\" },\n },\n );\n };\n}\n"],"mappings":"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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../utils/formatter.cjs");function t(t){let n=new Set(t.reserved.map(n=>e.shortcutIdentity(e.normalizeAccelerator(n),t.isMac)));return function(r,i,a){if(!r.some(e=>e.id===i))throw Error(`Unknown shortcut.`);let o=e.normalizeAccelerator(a),s=e.shortcutIdentity(o,t.isMac),c=s.split(`+`);if(new Set(c).size!==c.length)throw Error(`Duplicate shortcut modifier.`);if(o&&r.some(n=>n.id!==i&&e.shortcutIdentity(e.normalizeAccelerator(n.accelerator),t.isMac)===s))throw Error(`This shortcut is already assigned.`);if(o&&n.has(s))throw Error(`This shortcut is reserved by the application or operating system.`);return o}}exports.createShortcutValidator=t,exports.normalizeAccelerator=e.normalizeAccelerator,exports.shortcutIdentity=e.shortcutIdentity;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import "./interface.cjs";
|
|
2
|
+
import { L as Shortcut, z as ShortcutPolicy } from "../../interface-BR9QNgXO.cjs";
|
|
3
|
+
import { o as normalizeAccelerator, s as shortcutIdentity } from "../../formatter-MMKFBkro.cjs";
|
|
4
|
+
export declare function createShortcutValidator(policy: ShortcutPolicy): (shortcuts: readonly Shortcut[], id: string, value: string) => string;
|
|
5
|
+
export { type ShortcutPolicy, normalizeAccelerator, shortcutIdentity };
|
|
6
|
+
//# sourceMappingURL=shortcut.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shortcut.d.cts","names":[],"sources":["../../../src/modules/desktop/shortcut.ts"],"mappings":";;;wBAIgB,wBAAwB,QAAQ,kBAO5C,oBAAoB,YACpB,YACA"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import "./interface.js";
|
|
2
|
+
import { L as Shortcut, z as ShortcutPolicy } from "../../interface-ii8DV63k.js";
|
|
3
|
+
import { o as normalizeAccelerator, s as shortcutIdentity } from "../../formatter-vjbCoK9k.js";
|
|
4
|
+
export declare function createShortcutValidator(policy: ShortcutPolicy): (shortcuts: readonly Shortcut[], id: string, value: string) => string;
|
|
5
|
+
export { type ShortcutPolicy, normalizeAccelerator, shortcutIdentity };
|
|
6
|
+
//# sourceMappingURL=shortcut.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shortcut.d.ts","names":[],"sources":["../../../src/modules/desktop/shortcut.ts"],"mappings":";;;wBAIgB,wBAAwB,QAAQ,kBAO5C,oBAAoB,YACpB,YACA"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{normalizeAccelerator as e,shortcutIdentity as t}from"../../utils/formatter.js";function n(n){let r=new Set(n.reserved.map(r=>t(e(r),n.isMac)));return function(i,a,o){if(!i.some(e=>e.id===a))throw Error(`Unknown shortcut.`);let s=e(o),c=t(s,n.isMac),l=c.split(`+`);if(new Set(l).size!==l.length)throw Error(`Duplicate shortcut modifier.`);if(s&&i.some(r=>r.id!==a&&t(e(r.accelerator),n.isMac)===c))throw Error(`This shortcut is already assigned.`);if(s&&r.has(c))throw Error(`This shortcut is reserved by the application or operating system.`);return s}}export{n as createShortcutValidator,e as normalizeAccelerator,t as shortcutIdentity};
|
|
2
|
+
//# sourceMappingURL=shortcut.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shortcut.js","names":["createShortcutValidator","reserved","policy","shortcutIdentity","normalizeAccelerator","value","shortcuts","shortcut","id","accelerator","identity","parts"],"sources":["../../../src/modules/desktop/shortcut.ts"],"sourcesContent":["import type { Shortcut } from \"@/modules/desktop/interface\";\nimport { normalizeAccelerator, shortcutIdentity } from \"@/utils/formatter\";\nimport type { ShortcutPolicy } from \"@/utils/interface\";\n\nexport function createShortcutValidator(policy: ShortcutPolicy) {\n const reserved = new Set(\n policy.reserved.map((value) =>\n shortcutIdentity(normalizeAccelerator(value), policy.isMac),\n ),\n );\n return function validateShortcutChange(\n shortcuts: readonly Shortcut[],\n id: string,\n value: string,\n ) {\n if (!shortcuts.some((shortcut) => shortcut.id === id))\n throw new Error(\"Unknown shortcut.\");\n const accelerator = normalizeAccelerator(value);\n const identity = shortcutIdentity(accelerator, policy.isMac);\n const parts = identity.split(\"+\");\n if (new Set(parts).size !== parts.length)\n throw new Error(\"Duplicate shortcut modifier.\");\n if (\n accelerator &&\n shortcuts.some(\n (shortcut) =>\n shortcut.id !== id &&\n shortcutIdentity(\n normalizeAccelerator(shortcut.accelerator),\n policy.isMac,\n ) === identity,\n )\n )\n throw new Error(\"This shortcut is already assigned.\");\n if (accelerator && reserved.has(identity))\n throw new Error(\n \"This shortcut is reserved by the application or operating system.\",\n );\n return accelerator;\n };\n}\n\nexport type { ShortcutPolicy } from \"@/utils/interface\";\n\nexport { normalizeAccelerator, shortcutIdentity } from \"@/utils/formatter\";\n"],"mappings":"A,sFAIA,SAAgBA,EAAwB,EAAwB,CAC9D,IAAMC,EAAW,IAAI,IACnBC,EAAO,SAAS,IAAK,GACnBC,EAAiBC,EAAqBC,CAAK,EAAGH,EAAO,KAAK,CAC5D,CACF,EACA,OAAO,SACL,EACA,EACA,EACA,CACA,GAAI,CAACI,EAAU,KAAM,GAAaC,EAAS,KAAOC,CAAE,EAClD,MAAU,MAAM,mBAAmB,EACrC,IAAMC,EAAcL,EAAqBC,CAAK,EACxCK,EAAWP,EAAiBM,EAAaP,EAAO,KAAK,EACrDS,EAAQD,EAAS,MAAM,GAAG,EAChC,GAAI,IAAI,IAAIC,CAAK,CAAC,CAAC,OAASA,EAAM,OAChC,MAAU,MAAM,8BAA8B,EAChD,GACEF,GACAH,EAAU,KACP,GACCC,EAAS,KAAOC,GAChBL,EACEC,EAAqBG,EAAS,WAAW,EACzCL,EAAO,KACT,IAAMQ,CACV,EAEA,MAAU,MAAM,oCAAoC,EACtD,GAAID,GAAeR,EAAS,IAAIS,CAAQ,EACtC,MAAU,MACR,mEACF,EACF,OAAOD,CACT,CACF,C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../auth/client/retry.cjs"),t=require("./error.cjs"),n=require("./fetcher.cjs");let r=require("axios");function i(i){let a=n.createFetcher(i.client),o=i.refresh?e.createAuthRetry({refresh:i.refresh,getStatus:e=>(0,r.isAxiosError)(e)?e.response?.status:void 0}):void 0;function s(e,t,n){if(t===!1||!i.notify)return;let r=typeof t==`object`?t[e]:void 0,a=typeof r==`function`?r(n):r??(e===`error`?n.message:void 0);if(a)try{i.notify(e,a)}catch{}}async function c(e){let{url:n,method:c=`GET`,body:l,params:u,query:d,baseURL:f,auth:p=!0,unwrapData:m=!0,schema:h,responseHandler:g,toast:_,onSuccess:v,onError:y,retryUnsafe:b,...x}=e,S=c.toUpperCase(),C=()=>a({...x,url:n,method:c,body:l,params:d??u,baseURL:f===null?``:f,responseType:x.responseType??(typeof g==`string`&&g!==`content-type`?g===`arrayBuffer`?`arraybuffer`:g:void 0)});try{x.signal?.throwIfAborted();let e=x.signal,t=o?await o.withAuthRetry(C,{signal:e,enabled:p&&(i.canRetry?.(n)??!/(?:^|\/)auth(?:\/|\?|$)/.test(n))&&([`GET`,`HEAD`,`OPTIONS`].includes(S)||b===!0)}):await C(),r=t.status===204||S===`HEAD`?null:typeof g==`function`?await g(t):m&&t.data!==null&&typeof t.data==`object`&&`data`in t.data?t.data.data:t.data;h&&(r=await h.parseAsync(r));let a=r;return await v?.(a),s(`success`,_,a),a}catch(e){let n=t.normalizeCallerError(e);throw i.mapError&&(n=i.mapError(n,(0,r.isAxiosError)(e)?e.response?.data:void 0)),await y?.(n),n.code!==`ERR_CANCELED`&&s(`error`,_,n),n}}return{caller:c,http:{request:c,get(e,t={}){return c({...t,url:e,method:`GET`})},post(e,t,n={}){return c({...n,url:e,method:`POST`,body:t})},put(e,t,n={}){return c({...n,url:e,method:`PUT`,body:t})},patch(e,t,n={}){return c({...n,url:e,method:`PATCH`,body:t})},delete(e,t={}){return c({...t,url:e,method:`DELETE`})},head(e,t={}){return c({...t,url:e,method:`HEAD`})},options(e,t={}){return c({...t,url:e,method:`OPTIONS`})}},reset:()=>o?.reset(),dispose:()=>o?.dispose()}}exports.createCaller=i;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { _ as CallerToastOptions, g as CallerResponseHandler, h as CallerRequestOptions, m as CallerOptions, p as CallerMethodOptions } from "../../interface-BR9QNgXO.cjs";
|
|
2
|
+
export declare function createCaller(options: CallerOptions): {
|
|
3
|
+
caller: <Data = unknown, Body = unknown, Params = Record<string, unknown>>(input: CallerRequestOptions<Data, Body, Params>) => Promise<Data>;
|
|
4
|
+
http: {
|
|
5
|
+
request: <Data = unknown, Body = unknown, Params = Record<string, unknown>>(input: CallerRequestOptions<Data, Body, Params>) => Promise<Data>;
|
|
6
|
+
get<Data = unknown, Params = Record<string, unknown>>(url: string, input?: CallerMethodOptions<Data, never, Params>): Promise<Data>;
|
|
7
|
+
post<Data = unknown, Body = unknown, Params = Record<string, unknown>>(url: string, body?: Body, input?: CallerMethodOptions<Data, Body, Params>): Promise<Data>;
|
|
8
|
+
put<Data = unknown, Body = unknown, Params = Record<string, unknown>>(url: string, body?: Body, input?: CallerMethodOptions<Data, Body, Params>): Promise<Data>;
|
|
9
|
+
patch<Data = unknown, Body = unknown, Params = Record<string, unknown>>(url: string, body?: Body, input?: CallerMethodOptions<Data, Body, Params>): Promise<Data>;
|
|
10
|
+
delete<Data = unknown, Body = unknown, Params = Record<string, unknown>>(url: string, input?: Omit<CallerRequestOptions<Data, Body, Params>, "url" | "method">): Promise<Data>;
|
|
11
|
+
head<Data = unknown, Params = Record<string, unknown>>(url: string, input?: CallerMethodOptions<Data, never, Params>): Promise<Data>;
|
|
12
|
+
options<Data = unknown, Body = unknown, Params = Record<string, unknown>>(url: string, input?: Omit<CallerRequestOptions<Data, Body, Params>, "url" | "method">): Promise<Data>;
|
|
13
|
+
};
|
|
14
|
+
reset: () => void | undefined;
|
|
15
|
+
dispose: () => void | undefined;
|
|
16
|
+
};
|
|
17
|
+
export type { CallerOptions, CallerRequestOptions, CallerResponseHandler, CallerToastOptions };
|
|
18
|
+
//# sourceMappingURL=caller.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"caller.d.cts","names":[],"sources":["../../../src/modules/http/caller.ts"],"mappings":";wBAUgB,aAAa,SAAS;EAgClC,SAAA,gBACA,gBACA,SAAM,yBAAA,OACC,qBAAqB,MAAM,MAAM,YAAU,QAAQ;;IAH1D,UAAA,gBACA,gBACA,SAAM,yBAAA,OACC,qBAAqB,MAAM,MAAM,YAAU,QAAQ;IAmFtD,IAAA,gBAAgB,SAAM,yBAAA,aACb,QACJ,oBAAoB,aAAa,UAAO,QAAA;IAI5C,KAAA,gBAAgB,gBAAgB,SAAM,yBAAA,aAC9B,OACJ,MAAI,QACJ,oBAAoB,MAAM,MAAM,UAAO,QAAA;IAS5C,IAAA,gBAAgB,gBAAgB,SAAM,yBAAA,aAC7B,OACJ,MAAI,QACJ,oBAAoB,MAAM,MAAM,UAAO,QAAA;IAI1C,MAAA,gBAAgB,gBAAgB,SAAM,yBAAA,aAC/B,OACJ,MAAI,QACJ,oBAAoB,MAAM,MAAM,UAAO,QAAA;IASzC,OAAA,gBAAgB,gBAAgB,SAAM,yBAAA,aAChC,QACJ,KACL,qBAAqB,MAAM,MAAM,6BAElC,QAAA;IAIE,KAAA,gBAAgB,SAAM,yBAAA,aACd,QACJ,oBAAoB,aAAa,UAAO,QAAA;IAIzC,QAAA,gBAAgB,gBAAgB,SAAM,yBAAA,aACjC,QACJ,KACL,qBAAqB,MAAM,MAAM,6BAElC,QAAA"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { _ as CallerToastOptions, g as CallerResponseHandler, h as CallerRequestOptions, m as CallerOptions, p as CallerMethodOptions } from "../../interface-ii8DV63k.js";
|
|
2
|
+
export declare function createCaller(options: CallerOptions): {
|
|
3
|
+
caller: <Data = unknown, Body = unknown, Params = Record<string, unknown>>(input: CallerRequestOptions<Data, Body, Params>) => Promise<Data>;
|
|
4
|
+
http: {
|
|
5
|
+
request: <Data = unknown, Body = unknown, Params = Record<string, unknown>>(input: CallerRequestOptions<Data, Body, Params>) => Promise<Data>;
|
|
6
|
+
get<Data = unknown, Params = Record<string, unknown>>(url: string, input?: CallerMethodOptions<Data, never, Params>): Promise<Data>;
|
|
7
|
+
post<Data = unknown, Body = unknown, Params = Record<string, unknown>>(url: string, body?: Body, input?: CallerMethodOptions<Data, Body, Params>): Promise<Data>;
|
|
8
|
+
put<Data = unknown, Body = unknown, Params = Record<string, unknown>>(url: string, body?: Body, input?: CallerMethodOptions<Data, Body, Params>): Promise<Data>;
|
|
9
|
+
patch<Data = unknown, Body = unknown, Params = Record<string, unknown>>(url: string, body?: Body, input?: CallerMethodOptions<Data, Body, Params>): Promise<Data>;
|
|
10
|
+
delete<Data = unknown, Body = unknown, Params = Record<string, unknown>>(url: string, input?: Omit<CallerRequestOptions<Data, Body, Params>, "url" | "method">): Promise<Data>;
|
|
11
|
+
head<Data = unknown, Params = Record<string, unknown>>(url: string, input?: CallerMethodOptions<Data, never, Params>): Promise<Data>;
|
|
12
|
+
options<Data = unknown, Body = unknown, Params = Record<string, unknown>>(url: string, input?: Omit<CallerRequestOptions<Data, Body, Params>, "url" | "method">): Promise<Data>;
|
|
13
|
+
};
|
|
14
|
+
reset: () => void | undefined;
|
|
15
|
+
dispose: () => void | undefined;
|
|
16
|
+
};
|
|
17
|
+
export type { CallerOptions, CallerRequestOptions, CallerResponseHandler, CallerToastOptions };
|
|
18
|
+
//# sourceMappingURL=caller.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"caller.d.ts","names":[],"sources":["../../../src/modules/http/caller.ts"],"mappings":";wBAUgB,aAAa,SAAS;EAgClC,SAAA,gBACA,gBACA,SAAM,yBAAA,OACC,qBAAqB,MAAM,MAAM,YAAU,QAAQ;;IAH1D,UAAA,gBACA,gBACA,SAAM,yBAAA,OACC,qBAAqB,MAAM,MAAM,YAAU,QAAQ;IAmFtD,IAAA,gBAAgB,SAAM,yBAAA,aACb,QACJ,oBAAoB,aAAa,UAAO,QAAA;IAI5C,KAAA,gBAAgB,gBAAgB,SAAM,yBAAA,aAC9B,OACJ,MAAI,QACJ,oBAAoB,MAAM,MAAM,UAAO,QAAA;IAS5C,IAAA,gBAAgB,gBAAgB,SAAM,yBAAA,aAC7B,OACJ,MAAI,QACJ,oBAAoB,MAAM,MAAM,UAAO,QAAA;IAI1C,MAAA,gBAAgB,gBAAgB,SAAM,yBAAA,aAC/B,OACJ,MAAI,QACJ,oBAAoB,MAAM,MAAM,UAAO,QAAA;IASzC,OAAA,gBAAgB,gBAAgB,SAAM,yBAAA,aAChC,QACJ,KACL,qBAAqB,MAAM,MAAM,6BAElC,QAAA;IAIE,KAAA,gBAAgB,SAAM,yBAAA,aACd,QACJ,oBAAoB,aAAa,UAAO,QAAA;IAIzC,QAAA,gBAAgB,gBAAgB,SAAM,yBAAA,aACjC,QACJ,KACL,qBAAqB,MAAM,MAAM,6BAElC,QAAA"}
|