permdock 0.2.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/a2a/index.d.ts +4 -4
- package/dist/a2a/index.js +2 -2
- package/dist/ai-sdk/index.d.ts +3 -3
- package/dist/ai-sdk/index.js +1 -1
- package/dist/approvals/index.d.ts +2 -2
- package/dist/{arazzo-cmvX2jDe.js → arazzo-C9chp3ST.js} +1 -1
- package/dist/authzen/index.d.ts +3 -3
- package/dist/authzen/index.js +1 -1
- package/dist/better-auth/index.d.ts +1 -1
- package/dist/better-supabase/index.d.ts +27 -10
- package/dist/better-supabase/index.js +44 -16
- package/dist/{bind-CVy3Espv.d.ts → bind-C_ob3LKa.d.ts} +5 -5
- package/dist/{bind-VnYn2HKq.js → bind-CuzGytRf.js} +1 -1
- package/dist/{capability-Dq43tT1u.d.ts → capability-2kYTMWDv.d.ts} +1 -1
- package/dist/catalog-CRW5Mx_B.js +2 -0
- package/dist/{catalog-h2tlKFkq.js → catalog-CYj-mX2O.js} +2 -2
- package/dist/{catalog-z8q6bi_r.js → catalog-DWF5cYqB.js} +2 -2
- package/dist/{catalog-doc-Dsc9y7sd.js → catalog-doc-DdGm82XT.js} +3 -26
- package/dist/claude-agent/index.d.ts +3 -3
- package/dist/claude-agent/index.js +1 -1
- package/dist/clerk/index.d.ts +2 -2
- package/dist/cli/bin.js +1 -1
- package/dist/cli/index.d.ts +1 -1
- package/dist/cli/index.js +1 -1
- package/dist/cloud/index.d.ts +4 -4
- package/dist/{cloud-BGhHS-lY.js → cloud-CfwZ39Rl.js} +2 -2
- package/dist/{cloud-Bo3e9Ak3.js → cloud-DWLXO2af.js} +3 -3
- package/dist/{collect-DLlujdHC.js → collect-CHB22Sx4.js} +3 -3
- package/dist/{collect-DDDv_ESs.js → collect-DSTE3ml9.js} +1 -1
- package/dist/collect-DSWOk19R.js +2 -0
- package/dist/{commands-DWOrSQic.js → commands-BeaGNj_o.js} +13 -13
- package/dist/compile/index.d.ts +1 -1
- package/dist/{compile-CNnl6uIt.d.ts → compile-BkRyBDBw.d.ts} +1 -1
- package/dist/{config-Bn00Z3ks.js → config-ir40y8m0.js} +2 -2
- package/dist/{config-report-Dw_JcUqT.js → config-report-CdCgbRnV.js} +4 -4
- package/dist/{context-Ttp0ekMT.js → context-Bcy85rGi.js} +2 -2
- package/dist/convex/index.d.ts +3 -3
- package/dist/convex/index.js +1 -1
- package/dist/{create-BWyx3jua.d.ts → create-B1d519XK.d.ts} +5 -5
- package/dist/{create-CPhDL6qx.js → create-CMwIl-w2.js} +1 -1
- package/dist/{describe-PdoqESvg.d.ts → describe-DMYiCjJV.d.ts} +1 -1
- package/dist/{diff-B8Tunc3o.js → diff-2VaeChzX.js} +3 -3
- package/dist/{diff-CzqLxZ77.js → diff-C9RDjjhs.js} +2 -2
- package/dist/{doctor-rOr-4ZfS.js → doctor-Djh6JDEk.js} +2 -2
- package/dist/{doctor-WpvG6p4k.js → doctor-DvH0IQff.js} +10 -10
- package/dist/{doctor-collect-ByfYlNv1.js → doctor-collect-CjdO0wQX.js} +10 -9
- package/dist/drizzle/index.d.ts +2 -2
- package/dist/elysia/index.d.ts +3 -3
- package/dist/elysia/index.js +1 -1
- package/dist/{errors-DAqevpNk.d.ts → errors-DPdqI50v.d.ts} +2 -2
- package/dist/eve/index.d.ts +3 -3
- package/dist/eve/index.js +1 -1
- package/dist/express/index.d.ts +3 -3
- package/dist/express/index.js +1 -1
- package/dist/fastify/index.d.ts +3 -3
- package/dist/fastify/index.js +1 -1
- package/dist/{from-snapshot-C3sHpZNS.js → from-snapshot-CTLijvdm.js} +1 -0
- package/dist/hono/index.d.ts +3 -3
- package/dist/hono/index.js +1 -1
- package/dist/{index-CtE07CBF.d.ts → index-0nNqHspG.d.ts} +2 -2
- package/dist/{index-D3vbkoSI.d.ts → index-BNc7Wer_.d.ts} +1 -1
- package/dist/{index-D6_cSa1z.d.ts → index-C7Tw7MaW.d.ts} +2 -2
- package/dist/{index-A0YNL8jZ.d.ts → index-C8z4RjQV.d.ts} +1 -1
- package/dist/index.d.ts +10 -10
- package/dist/index.js +3 -3
- package/dist/{instance-options-BK_rNOSC.d.ts → instance-options-jARdwfPN.d.ts} +1 -1
- package/dist/jwt/index.d.ts +4 -4
- package/dist/{kernel-GSQnMz3O.js → kernel-_RRHmnMY.js} +1 -1
- package/dist/kysely/index.d.ts +2 -2
- package/dist/mcp/index.d.ts +6 -6
- package/dist/mcp/index.js +2 -2
- package/dist/nest/index.d.ts +3 -3
- package/dist/nest/index.js +1 -1
- package/dist/next/index.d.ts +5 -5
- package/dist/next/index.js +1 -1
- package/dist/next/plugin.d.ts +1 -1
- package/dist/next/plugin.js +1 -1
- package/dist/node/index.d.ts +3 -3
- package/dist/node/index.js +1 -1
- package/dist/openai/index.d.ts +3 -3
- package/dist/openai/index.js +1 -1
- package/dist/openapi/index.d.ts +2 -2
- package/dist/{openapi-Bbg4wGVL.js → openapi-CQTsgKoB.js} +1 -1
- package/dist/orpc/index.d.ts +4 -4
- package/dist/orpc/index.js +2 -2
- package/dist/otel/index.d.ts +2 -2
- package/dist/{parse-local-manifest-BkGQNzAh.d.ts → parse-local-manifest-JLnaBH0S.d.ts} +1 -1
- package/dist/pdp/index.d.ts +2 -2
- package/dist/pdp/index.js +1 -1
- package/dist/{permdock-CzqXjCpU.js → permdock-CbgvLnuo.js} +35 -27
- package/dist/{permissions-CpZrivYv.js → permissions-RJrovw98.js} +1 -1
- package/dist/{policy-D8UFyERw.d.ts → policy-D2W7uv19.d.ts} +1 -1
- package/dist/{policy-CFZAr_Al.d.ts → policy-IB6yxpC3.d.ts} +21 -5
- package/dist/powersync-CrBX8hY6.js +2 -0
- package/dist/{powersync-yW1UUFzp.js → powersync-DE19b9dT.js} +2 -2
- package/dist/{powersync-C7kLglqX.js → powersync-Dv1_aWF7.js} +7 -7
- package/dist/prisma/index.d.ts +1 -1
- package/dist/{problem-details-CkL50EEf.d.ts → problem-details-DX075l9V.d.ts} +1 -1
- package/dist/{protected-CNsMzrVd.d.ts → protected-BdnIEFkY.d.ts} +3 -3
- package/dist/{protected-Cs6kTaHo.js → protected-utU-SLuy.js} +1 -1
- package/dist/{protected-bZs6rbT1.d.ts → protected-xAr24FEC.d.ts} +3 -3
- package/dist/{provider-DLzpb2Xz.js → provider-CSQd7m92.js} +2 -2
- package/dist/{provider-Cjr62YMV.d.ts → provider-DZY281jO.d.ts} +1 -1
- package/dist/{provider-store-DNyC1y48.js → provider-store-Cfbvo4DE.js} +2 -2
- package/dist/react/index.d.ts +6 -6
- package/dist/react/index.js +2 -2
- package/dist/react/provider-client.d.ts +1 -1
- package/dist/react/provider-client.js +1 -1
- package/dist/react-native/index.d.ts +8 -8
- package/dist/react-native/index.js +3 -3
- package/dist/{replay-sqBGMnNs.d.ts → replay-CYyiLiwO.d.ts} +1 -1
- package/dist/{rls-BMNydpHk.js → rls-DiinlRML.js} +12 -12
- package/dist/{rls-CEvs64Kj.js → rls-P-BeBx0n.js} +2 -2
- package/dist/{rls-fields-BMasREhR.js → rls-fields-CZOMlwHl.js} +96 -8
- package/dist/{rls-graph-pc9fuXYm.js → rls-graph-CHwx0V8q.js} +2 -2
- package/dist/{rls-import-D8F7j35Q.js → rls-import-4lLW_pbb.js} +2 -2
- package/dist/{rls-migrate-7wikfrVI.js → rls-migrate-CN4TlJTO.js} +2 -2
- package/dist/{rls-ownership-B5Lkq62W.js → rls-ownership-DcYlZ09B.js} +3 -3
- package/dist/{rls-shared-aOQ4hGTO.js → rls-shared-Cewd_-zI.js} +4 -2
- package/dist/{rls-verify-D8B7dOTh.js → rls-verify-CMv9H3wV.js} +8 -7
- package/dist/row-conditions-h2HythXQ.js +27 -0
- package/dist/{rpc-DOK54_CS.js → rpc-DL9Sqvb1.js} +1 -1
- package/dist/{run-YXCJDNYk.js → run-BWc9qqvE.js} +1 -1
- package/dist/{saas-Bj_FFkjN.js → saas-DhpJjnBA.js} +2 -2
- package/dist/scim/index.d.ts +1 -1
- package/dist/server/index.d.ts +6 -6
- package/dist/server/index.js +1 -1
- package/dist/{sink-Gs6TTVa-.d.ts → sink-B1fZzIMf.d.ts} +1 -1
- package/dist/{skills-JaymNCdK.js → skills-C5CbhhpG.js} +1 -1
- package/dist/{snapshot-cache-DwQH8ufx.d.ts → snapshot-cache-B-LxUahj.d.ts} +1 -1
- package/dist/solid/index.d.ts +4 -4
- package/dist/solid/index.js +2 -2
- package/dist/{sources-B0UvrJ21.js → sources-4p0-4xQm.js} +12 -1
- package/dist/{sources-BcJgw0lt.d.ts → sources-BdOYLw9j.d.ts} +2 -2
- package/dist/{src-CSbUiozF.js → src-BDwEZWrZ.js} +1 -1
- package/dist/ssf/index.d.ts +3 -3
- package/dist/{store-D_pjn91-.d.ts → store-jOBYpiXC.d.ts} +2 -2
- package/dist/{store-options-yO0V6gRn.js → store-options-ByhZq1jV.js} +1 -1
- package/dist/{stores-4_sqiOA1.js → stores-BT2pSCub.js} +1 -1
- package/dist/{stores-DVR5NHLE.d.ts → stores-C0IMQrGI.d.ts} +2 -2
- package/dist/{stream-DlvG2hs-.d.ts → stream-D1RXubw2.d.ts} +1 -1
- package/dist/supabase/index.d.ts +15 -4
- package/dist/supabase/index.js +2 -2
- package/dist/supabase/middleware.d.ts +4 -4
- package/dist/supabase/middleware.js +2 -2
- package/dist/{supabase-DTBaC20O.js → supabase-C0qESOa-.js} +7 -5
- package/dist/{supabase-config-Bs44dare.js → supabase-config-Bj3iDH2I.js} +1 -1
- package/dist/supabase-hook-gd3s8bxB.js +2 -0
- package/dist/{supabase-hook-BuxLQLpU.js → supabase-hook-ntETYCQu.js} +56 -10
- package/dist/{supabase-CwafwxxF.js → supabase-s4o9s1O1.js} +2 -2
- package/dist/{supautils-DYZnzRWV.js → supautils-u8jXTGrt.js} +1 -1
- package/dist/svelte/index.d.ts +5 -5
- package/dist/svelte/index.js +2 -2
- package/dist/svelte/runtime.d.ts +2 -2
- package/dist/svelte/runtime.js +1 -1
- package/dist/svelte/source.d.ts +5 -5
- package/dist/svelte/source.js +1 -1
- package/dist/terminal/index.d.ts +4 -4
- package/dist/terminal/index.js +1 -1
- package/dist/testing/index.d.ts +5 -5
- package/dist/testing/index.js +5 -5
- package/dist/testing/saas/index.d.ts +2 -2
- package/dist/testing/saas/index.js +2 -2
- package/dist/testing/saas/permissions.js +1 -1
- package/dist/trpc/index.d.ts +4 -4
- package/dist/trpc/index.js +2 -2
- package/dist/{types-C3s9xVJG.d.ts → types-BnIEz1sU.d.ts} +1 -1
- package/dist/{types-yF5LmQVD.d.ts → types-C97IskBw.d.ts} +1 -1
- package/dist/{types-kxznc7cn.d.ts → types-CKNSyIf_.d.ts} +1 -1
- package/dist/{types-9AWO9EGt.d.ts → types-Cq_H8N_X.d.ts} +2 -2
- package/dist/{types-BPxgszlT.d.ts → types-DbjRN55U.d.ts} +15 -2
- package/dist/{types-BVyImy5I.d.ts → types-DxiCGmmd.d.ts} +1 -1
- package/dist/{types-vNSDF7Dq.d.ts → types-QCuYJh4q.d.ts} +1 -1
- package/dist/{types-vKyAMtcX.d.ts → types-aqOHTHcp.d.ts} +1 -1
- package/dist/unplugin/index.d.ts +1 -1
- package/dist/unplugin/index.js +1 -1
- package/dist/{usage-D07N9QJ3.js → usage-B0YuTQRO.js} +2 -2
- package/dist/usage-DorAJiU_.js +2 -0
- package/dist/{usage-DG1oeCca.js → usage-ItS7nLcl.js} +2 -2
- package/dist/{validation-error-CtF23SrC.d.ts → validation-error-Ba264OaJ.d.ts} +1 -1
- package/dist/vue/index.d.ts +4 -4
- package/dist/vue/index.js +2 -2
- package/dist/watch-BwxLTYMZ.js +2 -0
- package/dist/{watch-UihESpsJ.js → watch-DVBJ9cBq.js} +1 -1
- package/dist/webmcp/index.d.ts +1 -1
- package/package.json +3 -3
- package/dist/catalog-BjZSovXQ.js +0 -2
- package/dist/collect-rG2IQ3t0.js +0 -2
- package/dist/powersync-A8x_Yyvh.js +0 -2
- package/dist/supabase-hook-D5qVd_D8.js +0 -2
- package/dist/usage-D82l1CwK.js +0 -2
- package/dist/watch-Etoa_Mvr.js +0 -2
package/dist/next/plugin.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as describeError } from "../errors-CWfoNg9N.js";
|
|
2
|
-
import { n as createCollectScheduler, r as report, t as collectOnce } from "../watch-
|
|
2
|
+
import { n as createCollectScheduler, r as report, t as collectOnce } from "../watch-DVBJ9cBq.js";
|
|
3
3
|
//#region src/cli/plugin.ts
|
|
4
4
|
const PHASE_BUILD = "phase-production-build";
|
|
5
5
|
const PHASE_DEV = "phase-development-server";
|
package/dist/node/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { C as Policy, D as PolicyVocabulary, Nr as Principal, ln as PermDock } from "../policy-
|
|
1
|
+
import { C as Policy, D as PolicyVocabulary, Nr as Principal, ln as PermDock } from "../policy-IB6yxpC3.js";
|
|
2
2
|
import { f as Permission } from "../permissions-DttnqqxC.js";
|
|
3
|
-
import { a as ScopeGuard, h as InvalidSignatureError, i as ProtectOptions, n as OpenApiHooks, t as Guard, w as verifyWebBotAuth, x as discoverViaSignatureAgent } from "../create-
|
|
4
|
-
import { t as ServerAdapterOptions } from "../bind-
|
|
3
|
+
import { a as ScopeGuard, h as InvalidSignatureError, i as ProtectOptions, n as OpenApiHooks, t as Guard, w as verifyWebBotAuth, x as discoverViaSignatureAgent } from "../create-B1d519XK.js";
|
|
4
|
+
import { t as ServerAdapterOptions } from "../bind-C_ob3LKa.js";
|
|
5
5
|
import { a as toRequest, i as sendResponse, n as fromResponse, r as isServerResponse, t as NodeRequest } from "../http-DPuDaChb.js";
|
|
6
6
|
import { IncomingMessage, ServerResponse } from "node:http";
|
|
7
7
|
//#region src/node/create.d.ts
|
package/dist/node/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as discoverViaSignatureAgent, r as InvalidSignatureError, s as verifyWebBotAuth } from "../evaluations-tz6D9A2G.js";
|
|
2
|
-
import { r as bindKernel } from "../bind-
|
|
2
|
+
import { r as bindKernel } from "../bind-CuzGytRf.js";
|
|
3
3
|
import { i as toRequest, n as isServerResponse, r as sendResponse, t as fromResponse } from "../http-BIhmLfCc.js";
|
|
4
4
|
//#region src/node/create.ts
|
|
5
5
|
const nodeRequest = (req) => req;
|
package/dist/openai/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { C as Policy, D as PolicyVocabulary, Nr as Principal, kr as Delegation, ln as PermDock } from "../policy-
|
|
1
|
+
import { C as Policy, D as PolicyVocabulary, Nr as Principal, kr as Delegation, ln as PermDock } from "../policy-IB6yxpC3.js";
|
|
2
2
|
import { f as Permission } from "../permissions-DttnqqxC.js";
|
|
3
|
-
import { c as ApprovalRequest, f as ApprovalStore } from "../types-
|
|
4
|
-
import { t as InstanceOptions } from "../instance-options-
|
|
3
|
+
import { c as ApprovalRequest, f as ApprovalStore } from "../types-aqOHTHcp.js";
|
|
4
|
+
import { t as InstanceOptions } from "../instance-options-jARdwfPN.js";
|
|
5
5
|
import { t as ToolMap } from "../types-Bvc4oWT6.js";
|
|
6
6
|
//#region src/openai/create.d.ts
|
|
7
7
|
/** The app context passed to `run(agent, input, { context })`. */
|
package/dist/openai/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as compact } from "../compact-y6vfu2_f.js";
|
|
2
2
|
import { r as memoryApprovalStore } from "../store-DMAWwAJV.js";
|
|
3
3
|
import { t as instanceOptions } from "../instance-options-Dhhcnm3y.js";
|
|
4
|
-
import { n as createAgentKernel, t as approvalTokenOf } from "../kernel-
|
|
4
|
+
import { n as createAgentKernel, t as approvalTokenOf } from "../kernel-_RRHmnMY.js";
|
|
5
5
|
//#region src/openai/create.ts
|
|
6
6
|
function appContext(runContext) {
|
|
7
7
|
const context = runContext?.context;
|
package/dist/openapi/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { C as Policy, Ir as Condition, Nr as Principal } from "../policy-
|
|
1
|
+
import { C as Policy, Ir as Condition, Nr as Principal } from "../policy-IB6yxpC3.js";
|
|
2
2
|
import { f as Permission, m as PermissionTree } from "../permissions-DttnqqxC.js";
|
|
3
|
-
import { a as ProblemDetails } from "../errors-
|
|
3
|
+
import { a as ProblemDetails } from "../errors-DPdqI50v.js";
|
|
4
4
|
import { StandardJSONSchemaV1, StandardSchemaV1 } from "@standard-schema/spec";
|
|
5
5
|
//#region src/openapi/types.d.ts
|
|
6
6
|
type OpenApiTarget = "3.1" | "3.2" | "3.3";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as listArg, i as globalArgs, s as stringArg, t as COMMAND_DESCRIPTIONS } from "./commands-
|
|
1
|
+
import { a as listArg, i as globalArgs, s as stringArg, t as COMMAND_DESCRIPTIONS } from "./commands-BeaGNj_o.js";
|
|
2
2
|
import { defineCommand } from "citty";
|
|
3
3
|
//#region src/cli/commands/openapi.ts
|
|
4
4
|
function openapi(ctx) {
|
package/dist/orpc/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { C as Policy, D as PolicyVocabulary, Nr as Principal, ln as PermDock } from "../policy-
|
|
1
|
+
import { C as Policy, D as PolicyVocabulary, Nr as Principal, ln as PermDock } from "../policy-IB6yxpC3.js";
|
|
2
2
|
import { f as Permission } from "../permissions-DttnqqxC.js";
|
|
3
3
|
import { n as RevocationFeed } from "../revocations-Cy06JNx2.js";
|
|
4
|
-
import { A as ConnectionOptions, O as Connection, n as OpenApiHooks } from "../create-
|
|
5
|
-
import { t as ServerAdapterOptions } from "../bind-
|
|
6
|
-
import { t as StreamProtectOptions } from "../stream-
|
|
4
|
+
import { A as ConnectionOptions, O as Connection, n as OpenApiHooks } from "../create-B1d519XK.js";
|
|
5
|
+
import { t as ServerAdapterOptions } from "../bind-C_ob3LKa.js";
|
|
6
|
+
import { t as StreamProtectOptions } from "../stream-D1RXubw2.js";
|
|
7
7
|
import { Middleware } from "@orpc/server";
|
|
8
8
|
//#region src/orpc/create.d.ts
|
|
9
9
|
type OrpcMiddlewareOpts<TCtx extends object = object, TInput = unknown> = {
|
package/dist/orpc/index.js
CHANGED
|
@@ -2,9 +2,9 @@ import { t as compact } from "../compact-y6vfu2_f.js";
|
|
|
2
2
|
import { p as isPermission } from "../permissions-DVoF6dMt.js";
|
|
3
3
|
import { a as problemMessage } from "../http-SO7qGttf.js";
|
|
4
4
|
import { t as problemFromError } from "../map-error-pgUWNNtG.js";
|
|
5
|
-
import { n as attached } from "../bind-
|
|
5
|
+
import { n as attached } from "../bind-CuzGytRf.js";
|
|
6
6
|
import { a as reloadAfter, r as isAsyncIterable } from "../stream-DDpvynSB.js";
|
|
7
|
-
import { i as rpcCode, n as guardStream, r as problemBody, t as bindRpcKernel } from "../rpc-
|
|
7
|
+
import { i as rpcCode, n as guardStream, r as problemBody, t as bindRpcKernel } from "../rpc-DL9Sqvb1.js";
|
|
8
8
|
import { ORPCError } from "@orpc/server";
|
|
9
9
|
//#region src/orpc/create.ts
|
|
10
10
|
function toOpts(mw, input, next) {
|
package/dist/otel/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { D as PolicyVocabulary, ln as PermDock } from "../policy-
|
|
2
|
-
import { a as OtelOptions, i as OtelApi, n as GEN_AI_TOOL_CALL_ID, o as OtelWrap, r as GEN_AI_TOOL_NAME, s as StructuralLogger, t as GENAI_SEMCONV_PIN } from "../types-
|
|
1
|
+
import { D as PolicyVocabulary, ln as PermDock } from "../policy-IB6yxpC3.js";
|
|
2
|
+
import { a as OtelOptions, i as OtelApi, n as GEN_AI_TOOL_CALL_ID, o as OtelWrap, r as GEN_AI_TOOL_NAME, s as StructuralLogger, t as GENAI_SEMCONV_PIN } from "../types-QCuYJh4q.js";
|
|
3
3
|
//#region src/otel/instrument.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* Listens on one instance. Spans carry no duration and no histogram is
|
package/dist/pdp/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as Policy, D as PolicyVocabulary, Nr as Principal, it as DecisionProvider, un as PermDockOptions } from "../policy-
|
|
2
|
-
import { a as RelationMap, c as RemotePdpEndpoints, d as SpiceDbCheck, f as SpiceDbOptions, i as PdpPermDock, l as RemotePdpMapping, n as OpenFgaTuple, o as RemotePdpAuth, r as PdpFactory, s as RemotePdpCache, t as OpenFgaOptions, u as RemotePdpOptions } from "../types-
|
|
1
|
+
import { C as Policy, D as PolicyVocabulary, Nr as Principal, it as DecisionProvider, un as PermDockOptions } from "../policy-IB6yxpC3.js";
|
|
2
|
+
import { a as RelationMap, c as RemotePdpEndpoints, d as SpiceDbCheck, f as SpiceDbOptions, i as PdpPermDock, l as RemotePdpMapping, n as OpenFgaTuple, o as RemotePdpAuth, r as PdpFactory, s as RemotePdpCache, t as OpenFgaOptions, u as RemotePdpOptions } from "../types-DxiCGmmd.js";
|
|
3
3
|
//#region src/pdp/create.d.ts
|
|
4
4
|
export declare function createPermDock<TUser, TPrincipal extends Principal = Principal, V extends PolicyVocabulary = PolicyVocabulary>(policy: Policy<TUser, TPrincipal, V>, user: TUser | null, options?: PermDockOptions): Promise<PdpPermDock<V>>;
|
|
5
5
|
//#endregion
|
package/dist/pdp/index.js
CHANGED
|
@@ -5,7 +5,7 @@ import { n as PermDockValidationError } from "../validation-error-CnjZ4t92.js";
|
|
|
5
5
|
import { a as deniedMessage, i as approvalMessage, n as PermDockDeniedError, t as PermDockApprovalRequiredError } from "../errors-Cz5zn0mW.js";
|
|
6
6
|
import { d as isArazzoSimulateInput } from "../snapshot-Enxd0n-s.js";
|
|
7
7
|
import { n as isThenable } from "../thenable-okc2xDsj.js";
|
|
8
|
-
import { t as createPermDock$1 } from "../permdock-
|
|
8
|
+
import { t as createPermDock$1 } from "../permdock-CbgvLnuo.js";
|
|
9
9
|
import { s as isRecord } from "../map-AcxK9o_D.js";
|
|
10
10
|
import { a as postJson, c as ttlMs, i as joinUrl, n as denied, o as resourceIdOf, r as granted, s as ttlCache, t as cacheKey } from "../shared-DRu8VFVM.js";
|
|
11
11
|
//#region src/pdp/create.ts
|
|
@@ -2000,46 +2000,52 @@ function decideRoleChange(policy, principal, scopes, change, customRoles, author
|
|
|
2000
2000
|
}
|
|
2001
2001
|
const kind = change?.kind;
|
|
2002
2002
|
const target = change?.target;
|
|
2003
|
-
|
|
2003
|
+
const global = change?.scope === "global";
|
|
2004
|
+
if (typeof name !== "string" || kind !== "assign" && kind !== "revoke" && kind !== "transfer" || (global ? change.id !== void 0 : typeof change.id !== "string" || change.id === "") || target === null || typeof target !== "object" || typeof target.id !== "string" || target.id === "") {
|
|
2004
2005
|
deny("validation");
|
|
2005
2006
|
return done(null);
|
|
2006
2007
|
}
|
|
2008
|
+
const id = change.id ?? "";
|
|
2007
2009
|
const binding = bindingOf(policy, name);
|
|
2008
2010
|
const declared = declaredRoleNames$1(policy).has(name);
|
|
2009
|
-
const named = declared ? [] : tenantCustomRoles(policy, customRoles).filter((role) => role.name === name);
|
|
2011
|
+
const named = declared || global ? [] : tenantCustomRoles(policy, customRoles).filter((role) => role.name === name);
|
|
2010
2012
|
if (!declared && named.length === 0) {
|
|
2011
2013
|
deny("unknown-role");
|
|
2012
2014
|
return done(null);
|
|
2013
2015
|
}
|
|
2014
|
-
const scope = resolveScope(scopes, change.scope);
|
|
2016
|
+
const scope = global ? "global" : resolveScope(scopes, change.scope);
|
|
2015
2017
|
const customAt = named.map((role) => customRoleScope(role, scopes));
|
|
2016
2018
|
const on = declared ? binding?.on ?? findRole(policy.vocabulary?.roles, name)?.on : customAt.includes(scope) ? scope : customAt[0];
|
|
2017
|
-
const heldAt = typeof on === "string" ? resolveScope(scopes, on) : void 0;
|
|
2019
|
+
const heldAt = typeof on === "string" ? resolveScope(scopes, on) : global ? "global" : void 0;
|
|
2018
2020
|
if (scope === void 0 || heldAt === void 0 || heldAt !== scope) {
|
|
2019
2021
|
deny("scope", { expected: heldAt ?? null });
|
|
2020
2022
|
return done(null);
|
|
2021
2023
|
}
|
|
2022
|
-
const root = scopes[0]?.name;
|
|
2023
|
-
const supplied = change.within === void 0 ? void 0 : Object.entries(change.within).find(([key]) => resolveScope(scopes, key) === root)?.[1];
|
|
2024
2024
|
let tenant;
|
|
2025
2025
|
let within = change.within;
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
const
|
|
2029
|
-
const
|
|
2030
|
-
if (
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2026
|
+
let custom;
|
|
2027
|
+
if (!global) {
|
|
2028
|
+
const root = scopes[0]?.name;
|
|
2029
|
+
const supplied = change.within === void 0 ? void 0 : Object.entries(change.within).find(([key]) => resolveScope(scopes, key) === root)?.[1];
|
|
2030
|
+
if (scope === root) tenant = id;
|
|
2031
|
+
else {
|
|
2032
|
+
const anchor = heldAnchor(principal, scopes, scope, id, now);
|
|
2033
|
+
const held = anchor === void 0 ? void 0 : tenantOf(anchor, scopes);
|
|
2034
|
+
if (held !== void 0) {
|
|
2035
|
+
tenant = supplied === void 0 || supplied === held ? held : void 0;
|
|
2036
|
+
within = anchor?.within;
|
|
2037
|
+
} else if (options.trusted === true) tenant = supplied;
|
|
2038
|
+
}
|
|
2039
|
+
if (tenant === void 0) {
|
|
2040
|
+
deny("no-membership", {
|
|
2041
|
+
scope,
|
|
2042
|
+
id
|
|
2043
|
+
});
|
|
2044
|
+
return done(null);
|
|
2045
|
+
}
|
|
2046
|
+
const found = tenant;
|
|
2047
|
+
custom = named.find((role) => sameId(role.tenant, found) && customRoleScope(role, scopes) === scope && sameId(customRoleId(role) ?? id, id));
|
|
2041
2048
|
}
|
|
2042
|
-
const custom = named.find((role) => sameId(role.tenant, tenant) && customRoleScope(role, scopes) === scope && sameId(customRoleId(role) ?? change.id, change.id));
|
|
2043
2049
|
if (!declared && custom === void 0) {
|
|
2044
2050
|
deny("unknown-role");
|
|
2045
2051
|
return done(null);
|
|
@@ -2054,7 +2060,7 @@ function decideRoleChange(policy, principal, scopes, change, customRoles, author
|
|
|
2054
2060
|
let by = null;
|
|
2055
2061
|
if (kind === "transfer") {
|
|
2056
2062
|
if (self) deny("self-demotion");
|
|
2057
|
-
if (holdsAt(principal, name, scope,
|
|
2063
|
+
if (global ? (principal.roles ?? []).includes(name) : holdsAt(principal, name, scope, id, now)) by = name;
|
|
2058
2064
|
else deny("not-assignable-by", { holds: false });
|
|
2059
2065
|
} else {
|
|
2060
2066
|
if (self) deny(kind === "revoke" ? "self-demotion" : "not-assignable-by", { self: true });
|
|
@@ -2062,7 +2068,7 @@ function decideRoleChange(policy, principal, scopes, change, customRoles, author
|
|
|
2062
2068
|
const revocable = kind === "revoke" && custom !== void 0 && allowed.inert?.has(name);
|
|
2063
2069
|
if (!allowed.assignable.has(name) && revocable !== true) deny("not-assignable-by");
|
|
2064
2070
|
else if (custom === void 0 && usesAssigns(policy) && !allowed.manage) {
|
|
2065
|
-
const held = rolesAtInstance(policy, principal, scopes, scope,
|
|
2071
|
+
const held = global ? rankRoles(policy, (principal.roles ?? []).filter((role) => declaredRoleNames$1(policy).has(role))) : rolesAtInstance(policy, principal, scopes, scope, id, within, now);
|
|
2066
2072
|
by = held.find((role) => bindingOf(policy, role)?.assigns?.includes(name) === true) ?? null;
|
|
2067
2073
|
if (by === null) deny("not-assignable-by", { held });
|
|
2068
2074
|
}
|
|
@@ -2742,6 +2748,7 @@ function buildInstance(policy, subject, envBase, team) {
|
|
|
2742
2748
|
const relationCache = envBase.relationCache ?? /* @__PURE__ */ new Map();
|
|
2743
2749
|
const relations = relationReader(envBase.relations, relationCache, policy.resources);
|
|
2744
2750
|
const assignableAt = (tenant) => assignableIn(policy, subject, envBase.customRoles, customGrants, tenant, tenant === void 0 ? void 0 : envBase.assignable?.get(tenant));
|
|
2751
|
+
const assignableGlobal = () => assignableIn(policy, subject, envBase.customRoles, customGrants, void 0, void 0, nowSeconds(), true);
|
|
2745
2752
|
const envFor = (emit, skipAlternatives = false) => ({
|
|
2746
2753
|
emit,
|
|
2747
2754
|
simulated: envBase.simulated,
|
|
@@ -3054,22 +3061,23 @@ function buildInstance(policy, subject, envBase, team) {
|
|
|
3054
3061
|
return audiencesOf(policy, heldRoleNames(policy, subject, subject.principal?.tenant));
|
|
3055
3062
|
},
|
|
3056
3063
|
assignableRoles(options) {
|
|
3064
|
+
if (options?.scope === "global") return assignableGlobal().roles.filter((leaf) => leaf.on === void 0);
|
|
3057
3065
|
return assignableAt(options?.tenant ?? subject.principal?.tenant).roles;
|
|
3058
3066
|
},
|
|
3059
3067
|
assignablePermissions(options) {
|
|
3060
|
-
if (options?.scope === "global") return
|
|
3068
|
+
if (options?.scope === "global") return assignableGlobal().permissions;
|
|
3061
3069
|
const tenant = options?.tenant ?? subject.principal?.tenant;
|
|
3062
3070
|
return tenant === void 0 ? [] : assignableAt(tenant).permissions;
|
|
3063
3071
|
},
|
|
3064
3072
|
assignableLevels(permission, options) {
|
|
3065
3073
|
const of = (found) => (Object.hasOwn(found.levels, permission.key) ? found.levels[permission.key] : void 0) ?? [];
|
|
3066
|
-
if (options?.scope === "global") return of(
|
|
3074
|
+
if (options?.scope === "global") return of(assignableGlobal());
|
|
3067
3075
|
const tenant = options?.tenant ?? subject.principal?.tenant;
|
|
3068
3076
|
return tenant === void 0 ? [] : of(assignableAt(tenant));
|
|
3069
3077
|
},
|
|
3070
3078
|
decideRoleChange(change, options) {
|
|
3071
3079
|
return decideRoleChange(policy, subject.principal, scopeList(policy.scopes), change, envBase.customRoles, (tenant) => {
|
|
3072
|
-
const found = assignableAt(tenant);
|
|
3080
|
+
const found = tenant === void 0 ? assignableGlobal() : assignableAt(tenant);
|
|
3073
3081
|
return {
|
|
3074
3082
|
assignable: new Set(found.roles.map((leaf) => leaf.key)),
|
|
3075
3083
|
manage: found.manage,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { b as resource, n as definePermissions } from "./permissions-DVoF6dMt.js";
|
|
2
|
-
import { s as crud } from "./src-
|
|
2
|
+
import { s as crud } from "./src-BDwEZWrZ.js";
|
|
3
3
|
import { b as definePlans, x as defineRoles } from "./grantee-Cv5Sogfv.js";
|
|
4
4
|
//#region src/testing/saas/schema.ts
|
|
5
5
|
function accepts(kind, value) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as Policy, Nr as Principal, Pr as Subject } from "./policy-
|
|
1
|
+
import { C as Policy, Nr as Principal, Pr as Subject } from "./policy-IB6yxpC3.js";
|
|
2
2
|
import { c as saasPlans, l as saasRoles, s as saasPermissions } from "./permissions-CDgvKG5L.js";
|
|
3
3
|
//#region src/testing/saas/policy.d.ts
|
|
4
4
|
/** Daily API-key quota per subject; the bucket should be per tenant too. */
|
|
@@ -629,13 +629,9 @@ type RoleChangeTarget = {
|
|
|
629
629
|
/** `idp` when the identity provider owns the target's membership: the application cannot change it. */
|
|
630
630
|
readonly managedBy?: "idp";
|
|
631
631
|
};
|
|
632
|
-
type
|
|
632
|
+
type RoleChangeBase = {
|
|
633
633
|
readonly kind: "assign" | "revoke" | "transfer";
|
|
634
634
|
readonly role: string | Role;
|
|
635
|
-
/** The scope the role is held at (a declared name or alias). */
|
|
636
|
-
readonly scope: string;
|
|
637
|
-
/** The scope instance. */
|
|
638
|
-
readonly id: string;
|
|
639
635
|
/** Ids of the instance's ancestor scopes; a holder there may assign here. */
|
|
640
636
|
readonly within?: Readonly<Record<string, string>>;
|
|
641
637
|
readonly target: RoleChangeTarget;
|
|
@@ -646,6 +642,20 @@ type RoleChange = {
|
|
|
646
642
|
*/
|
|
647
643
|
readonly holders?: number;
|
|
648
644
|
};
|
|
645
|
+
/**
|
|
646
|
+
* A role held at a named scope instance (`scope` is a declared name or alias
|
|
647
|
+
* and `id` the instance), or a global role: `scope: 'global'` with no `id`.
|
|
648
|
+
* A global change has no tenant, so `within` and `holders` do not apply to it.
|
|
649
|
+
*/
|
|
650
|
+
type RoleChange = RoleChangeBase & ({
|
|
651
|
+
/** The scope the role is held at (a declared name or alias). */
|
|
652
|
+
readonly scope: string;
|
|
653
|
+
/** The scope instance. */
|
|
654
|
+
readonly id: string;
|
|
655
|
+
} | {
|
|
656
|
+
readonly scope: "global";
|
|
657
|
+
readonly id?: undefined;
|
|
658
|
+
});
|
|
649
659
|
/**
|
|
650
660
|
* `granted` names the role that authorised the change (`null` when a
|
|
651
661
|
* `meta.manageRoles` holder or the declared-role ceiling did); `denied` lists
|
|
@@ -913,8 +923,14 @@ type PermDock<V extends PolicyVocabulary = PolicyVocabulary> = {
|
|
|
913
923
|
}) => readonly Role[];
|
|
914
924
|
/** The distinct `meta.audience` values of the roles held in the active tenant, in rank order. */
|
|
915
925
|
readonly audiences: () => readonly string[];
|
|
926
|
+
/**
|
|
927
|
+
* The roles the subject may hand out in a tenant (the active one by
|
|
928
|
+
* default), or with `scope: 'global'` the global roles it may hand out. A
|
|
929
|
+
* snapshot answers only the tenant form.
|
|
930
|
+
*/
|
|
916
931
|
readonly assignableRoles: (options?: {
|
|
917
932
|
readonly tenant?: string;
|
|
933
|
+
readonly scope?: "global";
|
|
918
934
|
}) => readonly Role[];
|
|
919
935
|
/**
|
|
920
936
|
* The custom-role ceiling the subject may hand out: in a tenant (empty
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as globalArgs, s as stringArg, t as COMMAND_DESCRIPTIONS } from "./commands-
|
|
1
|
+
import { i as globalArgs, s as stringArg, t as COMMAND_DESCRIPTIONS } from "./commands-BeaGNj_o.js";
|
|
2
2
|
import { defineCommand } from "citty";
|
|
3
3
|
//#region src/cli/commands/powersync.ts
|
|
4
4
|
function powersync(ctx) {
|
|
@@ -44,7 +44,7 @@ function powersync(ctx) {
|
|
|
44
44
|
const db = stringArg(parsed.db);
|
|
45
45
|
const fixtures = stringArg(parsed.fixtures);
|
|
46
46
|
const from = stringArg(parsed.from);
|
|
47
|
-
const { runPowerSync } = await import("./powersync-
|
|
47
|
+
const { runPowerSync } = await import("./powersync-CrBX8hY6.js");
|
|
48
48
|
ctx.report(await runPowerSync({
|
|
49
49
|
cwd: ctx.cwd,
|
|
50
50
|
config: ctx.config,
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { i as findPermission } from "./permissions-DVoF6dMt.js";
|
|
2
2
|
import { c as isConditionRef, s as isConditionDate } from "./refs-KYb4ntaz.js";
|
|
3
|
-
import { _ as memoryRoleSource, p as localSnapshotManifest } from "./src-
|
|
3
|
+
import { _ as memoryRoleSource, p as localSnapshotManifest } from "./src-BDwEZWrZ.js";
|
|
4
4
|
import { d as scopeList, o as resolveScope } from "./scopes-CVdPrWN-.js";
|
|
5
5
|
import { t as requiresApproval } from "./approval-required-TzNB9oQA.js";
|
|
6
|
-
import { t as createPermDock } from "./permdock-
|
|
6
|
+
import { t as createPermDock } from "./permdock-CbgvLnuo.js";
|
|
7
7
|
import { o as usageResult } from "./errors-CWfoNg9N.js";
|
|
8
8
|
import { a as loadModule, n as asPolicy, o as pickNamed } from "./load-DhWEB9P1.js";
|
|
9
9
|
import { i as scopeMembershipTable, r as scopeColumn } from "./compile-Ba4blROR.js";
|
|
10
10
|
import { i as quoteSqlLiteral, t as SQL_IDENT } from "./sql-xdg5f4Fi.js";
|
|
11
|
-
import "./sources-
|
|
12
|
-
import {
|
|
13
|
-
import { H as collectGrants, W as contextRefs, h as tableFor, w as connectPg } from "./rls-fields-
|
|
11
|
+
import "./sources-4p0-4xQm.js";
|
|
12
|
+
import { G as quoteIdent, t as CUSTOM_ROLES } from "./rls-shared-Cewd_-zI.js";
|
|
13
|
+
import { H as collectGrants, W as contextRefs, h as tableFor, w as connectPg } from "./rls-fields-CZOMlwHl.js";
|
|
14
14
|
import { n as fixtureSubject, r as loadFixtures, t as fixtureRow } from "./fixtures-ht28Cplr.js";
|
|
15
|
-
import { a as ownershipRules } from "./rls-ownership-
|
|
16
|
-
import { t as canFixture } from "./rls-verify-
|
|
15
|
+
import { a as ownershipRules } from "./rls-ownership-DcYlZ09B.js";
|
|
16
|
+
import { t as canFixture } from "./rls-verify-CMv9H3wV.js";
|
|
17
17
|
import { existsSync, readFileSync, writeFileSync } from "node:fs";
|
|
18
18
|
import { resolve } from "node:path";
|
|
19
19
|
//#region src/cli/powersync-streams.ts
|
package/dist/prisma/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Ir as Condition, Pr as Subject, mn as WhereResult } from "../policy-
|
|
1
|
+
import { Ir as Condition, Pr as Subject, mn as WhereResult } from "../policy-IB6yxpC3.js";
|
|
2
2
|
import { r as RelationsMapping } from "../graph-sql-B-dsAT6j.js";
|
|
3
3
|
import { n as WithSubjectOptions, t as RowCheck } from "../row-check-Dt35czLy.js";
|
|
4
4
|
//#region src/prisma/model-fields.d.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Yn as Decision } from "./policy-
|
|
1
|
+
import { Yn as Decision } from "./policy-IB6yxpC3.js";
|
|
2
2
|
//#region src/core/problem-details.d.ts
|
|
3
3
|
type Disclosure = "hide" | "reveal";
|
|
4
4
|
/** The plans a `not-entitled` denial asks for; empty unless every denial is `not-entitled`. */
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { D as PolicyVocabulary, Mr as Membership, Yn as Decision } from "./policy-
|
|
1
|
+
import { D as PolicyVocabulary, Mr as Membership, Yn as Decision } from "./policy-IB6yxpC3.js";
|
|
2
2
|
import { f as Permission } from "./permissions-DttnqqxC.js";
|
|
3
3
|
import { r as Role } from "./vocabulary-DA8a8zif.js";
|
|
4
|
-
import { a as FilterResult, c as SubjectView, l as TenantView, o as PermissionSet, r as ClientPermDock, s as PermissionState, t as ApprovalHandle, u as UseRolesOptions } from "./types-
|
|
5
|
-
import { n as ProtectedProps } from "./types-
|
|
4
|
+
import { a as FilterResult, c as SubjectView, l as TenantView, o as PermissionSet, r as ClientPermDock, s as PermissionState, t as ApprovalHandle, u as UseRolesOptions } from "./types-CKNSyIf_.js";
|
|
5
|
+
import { n as ProtectedProps } from "./types-BnIEz1sU.js";
|
|
6
6
|
import { ReactNode } from "react";
|
|
7
7
|
//#region src/react/hooks.d.ts
|
|
8
8
|
declare function usePermDock<V extends PolicyVocabulary = PolicyVocabulary>(): ClientPermDock<V>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as storeOf } from "./store-options-
|
|
1
|
+
import { n as storeOf } from "./store-options-ByhZq1jV.js";
|
|
2
2
|
import { a as protectedView, c as subjectView, i as permissionSet, l as tenantView, n as filterResult, o as rolesView, s as scopedTenant, t as approvalHandle } from "./views-Soe7bGSC.js";
|
|
3
3
|
import { i as PermDockStoreContext, r as PermDockSnapshotPromiseContext } from "./live-options-H2eG8dfJ.js";
|
|
4
4
|
import { Suspense, use, useMemo, useSyncExternalStore } from "react";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Yn as Decision, er as GrantedDecision, ln as PermDock } from "./policy-
|
|
1
|
+
import { Yn as Decision, er as GrantedDecision, ln as PermDock } from "./policy-IB6yxpC3.js";
|
|
2
2
|
import { f as Permission } from "./permissions-DttnqqxC.js";
|
|
3
3
|
import { t as PermissionBoundaryState } from "./boundary-BmHxVH1J.js";
|
|
4
|
-
import { s as PermissionState } from "./types-
|
|
5
|
-
import { t as ClientStore } from "./store-
|
|
4
|
+
import { s as PermissionState } from "./types-CKNSyIf_.js";
|
|
5
|
+
import { t as ClientStore } from "./store-jOBYpiXC.js";
|
|
6
6
|
import { Snippet } from "svelte";
|
|
7
7
|
//#region src/svelte/boundary.d.ts
|
|
8
8
|
type PermissionBoundaryProps = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as compact } from "./compact-y6vfu2_f.js";
|
|
2
|
-
import { t as emptySnapshot } from "./from-snapshot-
|
|
3
|
-
import { t as adapterStore } from "./store-options-
|
|
2
|
+
import { t as emptySnapshot } from "./from-snapshot-CTLijvdm.js";
|
|
3
|
+
import { t as adapterStore } from "./store-options-ByhZq1jV.js";
|
|
4
4
|
import { i as PermDockStoreContext, n as useKeyed, r as PermDockSnapshotPromiseContext, t as useLiveOptions } from "./live-options-H2eG8dfJ.js";
|
|
5
5
|
import { useLayoutEffect } from "react";
|
|
6
6
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as PermDockProviderProps } from "./types-
|
|
1
|
+
import { t as PermDockProviderProps } from "./types-BnIEz1sU.js";
|
|
2
2
|
import { ReactElement } from "react";
|
|
3
3
|
//#region src/react/provider.d.ts
|
|
4
4
|
declare function PermDockProvider(props: PermDockProviderProps): ReactElement;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as compact } from "./compact-y6vfu2_f.js";
|
|
2
|
-
import { t as emptySnapshot } from "./from-snapshot-
|
|
3
|
-
import { i as isPromiseLike, t as adapterStore } from "./store-options-
|
|
2
|
+
import { t as emptySnapshot } from "./from-snapshot-CTLijvdm.js";
|
|
3
|
+
import { i as isPromiseLike, t as adapterStore } from "./store-options-ByhZq1jV.js";
|
|
4
4
|
//#region src/client/provider-store.ts
|
|
5
5
|
/**
|
|
6
6
|
* Store options that read `read()` on every request, so a rotated token, a
|
package/dist/react/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { n as requiredPlans } from "../problem-details-
|
|
2
|
-
import { i as describe } from "../describe-
|
|
1
|
+
import { n as requiredPlans } from "../problem-details-DX075l9V.js";
|
|
2
|
+
import { i as describe } from "../describe-DMYiCjJV.js";
|
|
3
3
|
import { t as approvalHeaders } from "../headers-Cf-zWvsO.js";
|
|
4
|
-
import { a as FilterResult, c as SubjectView, i as ClientStatus, l as TenantView, n as ApprovalState, o as PermissionSet, r as ClientPermDock, s as PermissionState, t as ApprovalHandle } from "../types-
|
|
5
|
-
import { n as ProtectedProps, t as PermDockProviderProps } from "../types-
|
|
6
|
-
import { a as useFilter, c as usePermission, d as useSubject, f as useTenant, i as useAssignableRoles, l as usePermissions, n as useApproval, o as useMemberships, r as useAssignablePermissions, s as usePermDock, t as Protected, u as useRoles } from "../protected-
|
|
7
|
-
import { t as PermDockProvider } from "../provider-
|
|
4
|
+
import { a as FilterResult, c as SubjectView, i as ClientStatus, l as TenantView, n as ApprovalState, o as PermissionSet, r as ClientPermDock, s as PermissionState, t as ApprovalHandle } from "../types-CKNSyIf_.js";
|
|
5
|
+
import { n as ProtectedProps, t as PermDockProviderProps } from "../types-BnIEz1sU.js";
|
|
6
|
+
import { a as useFilter, c as usePermission, d as useSubject, f as useTenant, i as useAssignableRoles, l as usePermissions, n as useApproval, o as useMemberships, r as useAssignablePermissions, s as usePermDock, t as Protected, u as useRoles } from "../protected-BdnIEFkY.js";
|
|
7
|
+
import { t as PermDockProvider } from "../provider-DZY281jO.js";
|
|
8
8
|
export { type ApprovalHandle, type ApprovalState, type ClientPermDock, type ClientStatus, type FilterResult, PermDockProvider, type PermDockProviderProps, type PermissionSet, type PermissionState, Protected, type ProtectedProps, type SubjectView, type TenantView, approvalHeaders, describe, requiredPlans, useApproval, useAssignablePermissions, useAssignableRoles, useFilter, useMemberships, usePermDock, usePermission, usePermissions, useRoles, useSubject, useTenant };
|
package/dist/react/index.js
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
import { r as requiredPlans } from "../problem-details-_AMOYz-w.js";
|
|
3
3
|
import { t as describe } from "../describe-B_gVZEVi.js";
|
|
4
4
|
import { t as approvalHeaders } from "../headers-BZSDieNT.js";
|
|
5
|
-
import { a as useFilter, c as usePermission, d as useSubject, f as useTenant, i as useAssignableRoles, l as usePermissions, n as useApproval, o as useMemberships, r as useAssignablePermissions, s as usePermDock, t as Protected, u as useRoles } from "../protected-
|
|
6
|
-
import { t as PermDockProvider } from "../provider-
|
|
5
|
+
import { a as useFilter, c as usePermission, d as useSubject, f as useTenant, i as useAssignableRoles, l as usePermissions, n as useApproval, o as useMemberships, r as useAssignablePermissions, s as usePermDock, t as Protected, u as useRoles } from "../protected-utU-SLuy.js";
|
|
6
|
+
import { t as PermDockProvider } from "../provider-CSQd7m92.js";
|
|
7
7
|
export { PermDockProvider, Protected, approvalHeaders, describe, requiredPlans, useApproval, useAssignablePermissions, useAssignableRoles, useFilter, useMemberships, usePermDock, usePermission, usePermissions, useRoles, useSubject, useTenant };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as PermDockProvider } from "../provider-
|
|
1
|
+
import { t as PermDockProvider } from "../provider-DZY281jO.js";
|
|
2
2
|
export { PermDockProvider };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { At as SnapshotSource, Dr as CustomRole, Ft as TokenVerifier, Mr as Membership, Tt as Snapshot, pt as LocalSnapshotManifest } from "../policy-
|
|
1
|
+
import { At as SnapshotSource, Dr as CustomRole, Ft as TokenVerifier, Mr as Membership, Tt as Snapshot, pt as LocalSnapshotManifest } from "../policy-IB6yxpC3.js";
|
|
2
2
|
import { f as Permission } from "../permissions-DttnqqxC.js";
|
|
3
|
-
import { n as requiredPlans } from "../problem-details-
|
|
4
|
-
import { i as describe } from "../describe-
|
|
5
|
-
import { t as parseLocalSnapshotManifest } from "../parse-local-manifest-
|
|
3
|
+
import { n as requiredPlans } from "../problem-details-DX075l9V.js";
|
|
4
|
+
import { i as describe } from "../describe-DMYiCjJV.js";
|
|
5
|
+
import { t as parseLocalSnapshotManifest } from "../parse-local-manifest-JLnaBH0S.js";
|
|
6
6
|
import { t as approvalHeaders } from "../headers-Cf-zWvsO.js";
|
|
7
|
-
import { a as FilterResult, c as SubjectView, i as ClientStatus, l as TenantView, n as ApprovalState, o as PermissionSet, r as ClientPermDock, s as PermissionState, t as ApprovalHandle } from "../types-
|
|
8
|
-
import { n as ProtectedProps } from "../types-
|
|
9
|
-
import { a as useFilter, c as usePermission, d as useSubject, f as useTenant, i as useAssignableRoles, l as usePermissions, n as useApproval, o as useMemberships, r as useAssignablePermissions, s as usePermDock, t as Protected, u as useRoles } from "../protected-
|
|
10
|
-
import { t as ClientStore } from "../store-
|
|
7
|
+
import { a as FilterResult, c as SubjectView, i as ClientStatus, l as TenantView, n as ApprovalState, o as PermissionSet, r as ClientPermDock, s as PermissionState, t as ApprovalHandle } from "../types-CKNSyIf_.js";
|
|
8
|
+
import { n as ProtectedProps } from "../types-BnIEz1sU.js";
|
|
9
|
+
import { a as useFilter, c as usePermission, d as useSubject, f as useTenant, i as useAssignableRoles, l as usePermissions, n as useApproval, o as useMemberships, r as useAssignablePermissions, s as usePermDock, t as Protected, u as useRoles } from "../protected-BdnIEFkY.js";
|
|
10
|
+
import { t as ClientStore } from "../store-jOBYpiXC.js";
|
|
11
11
|
import { ReactElement, ReactNode } from "react";
|
|
12
12
|
//#region src/react-native/guards.d.ts
|
|
13
13
|
/** `true` once the provider has a snapshot to answer from: storage was read or a seed was given. Hide the splash screen on it. */
|
|
@@ -8,12 +8,12 @@ import { n as parseSnapshot, o as bindConditionRefs } from "../snapshot-Enxd0n-s
|
|
|
8
8
|
import { s as flattenGrantee } from "../grantee-Cv5Sogfv.js";
|
|
9
9
|
import { p as resolveActiveTenant, u as nowSeconds } from "../validity-uOp8UpYn.js";
|
|
10
10
|
import { n as isThenable } from "../thenable-okc2xDsj.js";
|
|
11
|
-
import { r as heldRoleNames, t as emptySnapshot } from "../from-snapshot-
|
|
11
|
+
import { r as heldRoleNames, t as emptySnapshot } from "../from-snapshot-CTLijvdm.js";
|
|
12
12
|
import { t as parseLocalSnapshotManifest } from "../parse-local-manifest-BrMozJCo.js";
|
|
13
13
|
import { t as approvalHeaders } from "../headers-BZSDieNT.js";
|
|
14
|
-
import { n as storeOf, r as isJws, t as adapterStore } from "../store-options-
|
|
14
|
+
import { n as storeOf, r as isJws, t as adapterStore } from "../store-options-ByhZq1jV.js";
|
|
15
15
|
import { i as PermDockStoreContext, n as useKeyed, t as useLiveOptions } from "../live-options-H2eG8dfJ.js";
|
|
16
|
-
import { a as useFilter, c as usePermission, d as useSubject, f as useTenant, i as useAssignableRoles, l as usePermissions, n as useApproval, o as useMemberships, r as useAssignablePermissions, s as usePermDock, t as Protected, u as useRoles } from "../protected-
|
|
16
|
+
import { a as useFilter, c as usePermission, d as useSubject, f as useTenant, i as useAssignableRoles, l as usePermissions, n as useApproval, o as useMemberships, r as useAssignablePermissions, s as usePermDock, t as Protected, u as useRoles } from "../protected-utU-SLuy.js";
|
|
17
17
|
import { useEffect, useMemo, useRef } from "react";
|
|
18
18
|
import { jsx } from "react/jsx-runtime";
|
|
19
19
|
//#region src/react-native/guards.ts
|
|
@@ -4,21 +4,21 @@ import { d as scopeList, o as resolveScope } from "./scopes-CVdPrWN-.js";
|
|
|
4
4
|
import { E as listRoles, s as flattenGrantee } from "./grantee-Cv5Sogfv.js";
|
|
5
5
|
import { h as scopeField } from "./validity-uOp8UpYn.js";
|
|
6
6
|
import { i as describeError, o as usageResult } from "./errors-CWfoNg9N.js";
|
|
7
|
-
import {
|
|
7
|
+
import { t as policyRowConditionKeys } from "./row-conditions-h2HythXQ.js";
|
|
8
8
|
import { a as loadModule, n as asPolicy, o as pickNamed } from "./load-DhWEB9P1.js";
|
|
9
9
|
import "./budget-NbEtbJC_.js";
|
|
10
10
|
import { n as escapeSqlIdent } from "./sql-xdg5f4Fi.js";
|
|
11
|
-
import "./sources-
|
|
11
|
+
import "./sources-4p0-4xQm.js";
|
|
12
12
|
import { i as SEEDS_MARKER, r as INDEXES_MARKER, t as GRANTS_MARKER } from "./markers-B0hYLvMD.js";
|
|
13
13
|
import { n as requirePeer } from "./peer-BOr_kJE1.js";
|
|
14
|
-
import { f as splitUndiffed, n as supabaseConfig } from "./supabase-config-
|
|
15
|
-
import {
|
|
16
|
-
import { A as helpersSql, B as breakGlassHolder, C as readTableIndexFacts, E as accessSql, F as seedSql, H as collectGrants, S as pruneIndexTargets, T as connectPgPool, U as roleNames, V as breakGlassKey, a as fieldViewsSql, b as indexTargets, c as assemblePolicies, d as readOnlyActorPolicies, f as branchClauses, g as permissionHelpersSql, h as tableFor, i as fieldViews, l as orSql, m as compileGrants, n as columnGrantSql, o as rowBranches, q as apiKeysPlan, r as columnRevokeSql, u as readOnlyActorKinds, v as permittedByPermissionHelper, x as indexesSql, y as COLUMNS_SQL } from "./rls-fields-
|
|
17
|
-
import { c as helperCallKeys, i as HELPER_TABLES, n as graphPlan, r as graphSql, s as callsHelper, t as closureDepths } from "./rls-graph-
|
|
18
|
-
import { a as ownershipRules, o as ownershipSql, r as assignmentSql } from "./rls-ownership-
|
|
19
|
-
import { _ as seedsMigration, d as resolveAuthorize, f as driftOf, g as pgDeltaPath, h as partPath, l as parseRbacAuthorize, m as parseSplit, o as supabaseHookSql, p as isSeedsDirectory, t as grantsLabel, u as rbacScaffold, v as writeSqlFiles } from "./supabase-hook-
|
|
20
|
-
import { n as runRlsVerify } from "./rls-verify-
|
|
21
|
-
import { t as supautilsRejections } from "./supautils-
|
|
14
|
+
import { f as splitUndiffed, n as supabaseConfig } from "./supabase-config-Bj3iDH2I.js";
|
|
15
|
+
import { $ as sessionLiveHelperSql, G as quoteIdent$1, K as quoteLiteral, Q as scopeTypeOf, R as memberIdsHelper, T as graphSqlName, U as permittedIdsHelper, V as parseMembershipsFlag, W as qualifiedTable$1, X as scopeSources, Z as scopeTable, f as SESSION_LIVE_HELPER, o as qualified$1, q as quoteTable, r as HELPERS, rt as subjectIdSql, tt as subjectClaimJsonSql, w as graphHelper, y as checkSuspension } from "./rls-shared-Cewd_-zI.js";
|
|
16
|
+
import { A as helpersSql, B as breakGlassHolder, C as readTableIndexFacts, E as accessSql, F as seedSql, H as collectGrants, S as pruneIndexTargets, T as connectPgPool, U as roleNames, V as breakGlassKey, a as fieldViewsSql, b as indexTargets, c as assemblePolicies, d as readOnlyActorPolicies, f as branchClauses, g as permissionHelpersSql, h as tableFor, i as fieldViews, l as orSql, m as compileGrants, n as columnGrantSql, o as rowBranches, q as apiKeysPlan, r as columnRevokeSql, u as readOnlyActorKinds, v as permittedByPermissionHelper, x as indexesSql, y as COLUMNS_SQL } from "./rls-fields-CZOMlwHl.js";
|
|
17
|
+
import { c as helperCallKeys, i as HELPER_TABLES, n as graphPlan, r as graphSql, s as callsHelper, t as closureDepths } from "./rls-graph-CHwx0V8q.js";
|
|
18
|
+
import { a as ownershipRules, o as ownershipSql, r as assignmentSql } from "./rls-ownership-DcYlZ09B.js";
|
|
19
|
+
import { _ as seedsMigration, d as resolveAuthorize, f as driftOf, g as pgDeltaPath, h as partPath, l as parseRbacAuthorize, m as parseSplit, o as supabaseHookSql, p as isSeedsDirectory, t as grantsLabel, u as rbacScaffold, v as writeSqlFiles } from "./supabase-hook-ntETYCQu.js";
|
|
20
|
+
import { n as runRlsVerify } from "./rls-verify-CMv9H3wV.js";
|
|
21
|
+
import { t as supautilsRejections } from "./supautils-u8jXTGrt.js";
|
|
22
22
|
import { basename, delimiter, join, resolve } from "node:path";
|
|
23
23
|
import { spawnSync } from "node:child_process";
|
|
24
24
|
//#region src/cli/rls-advisors.ts
|
|
@@ -2363,7 +2363,7 @@ async function migrate(input) {
|
|
|
2363
2363
|
output: generated.output
|
|
2364
2364
|
};
|
|
2365
2365
|
await requirePeer(() => import("pgsql-parser"), "pgsql-parser", "permdock rls migrate", input.cwd);
|
|
2366
|
-
const { migrateTarget, runRlsMigrate } = await import("./rls-migrate-
|
|
2366
|
+
const { migrateTarget, runRlsMigrate } = await import("./rls-migrate-CN4TlJTO.js");
|
|
2367
2367
|
return runRlsMigrate({
|
|
2368
2368
|
cwd: input.cwd,
|
|
2369
2369
|
sql: input.sql,
|
|
@@ -2471,7 +2471,7 @@ async function runRls(input) {
|
|
|
2471
2471
|
}
|
|
2472
2472
|
case "import": {
|
|
2473
2473
|
await requirePeer(() => import("pgsql-parser"), "pgsql-parser", "permdock rls import", input.cwd);
|
|
2474
|
-
const { runRlsImport } = await import("./rls-import-
|
|
2474
|
+
const { runRlsImport } = await import("./rls-import-4lLW_pbb.js");
|
|
2475
2475
|
return runRlsImport({
|
|
2476
2476
|
cwd: input.cwd,
|
|
2477
2477
|
config: input.config,
|