permdock 0.38.1 → 0.39.0
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.js +2 -2
- package/dist/{adoption-scan-CkkOzkXs.js → adoption-scan-Cg4pyRhm.js} +1 -1
- package/dist/agent/index.js +1 -1
- package/dist/ai-sdk/index.js +3 -3
- package/dist/{annotate-dUrBHXWa.js → annotate-DcSH62rl.js} +2 -2
- package/dist/{annotate-doc-BA0betEO.js → annotate-doc-CLU0DxK7.js} +1 -1
- package/dist/app/index.js +1 -1
- package/dist/{approval-chain-BEeExHpb.js → approval-chain-e4HcSs3o.js} +2 -2
- package/dist/{arazzo-BKYLAE5e.js → arazzo-BcSSf6Du.js} +1 -1
- package/dist/{arazzo-n8as0lFp.js → arazzo-C1JA-k9F.js} +3 -3
- package/dist/{ast-CAOxvn9t.js → ast-BhvgF264.js} +1 -1
- package/dist/astro/index.js +1 -1
- package/dist/authzen/index.js +1 -1
- package/dist/better-supabase/index.js +6 -6
- package/dist/{bind-BNYcJ1D9.js → bind-CFwfgfp2.js} +2 -2
- package/dist/{bsb-access-tags-DaGRSYnv.js → bsb-access-tags-DUdAk1Jc.js} +3 -3
- package/dist/{bsb-action-keys-LgveZiHJ.js → bsb-action-keys-CQdOwvrl.js} +4 -4
- package/dist/{budgets-DFnMBpKz.js → budgets-6cfA6Ibw.js} +3 -3
- package/dist/{build-instance-BGpABVbM.js → build-instance-BX5yWZDz.js} +1 -1
- package/dist/{bundle-size-Pgm7BB5m.js → bundle-size-CeLuyWm0.js} +2 -2
- package/dist/bundle-size-DRu3x2lW.js +1 -0
- package/dist/{casbin-BmYeMFeI.js → casbin-BthXLWZo.js} +1 -1
- package/dist/{casbin-BlQqoRlv.js → casbin-DilG0fwi.js} +1 -1
- package/dist/catalog/index.js +2 -2
- package/dist/{catalog-DYC6wfAj.js → catalog-Beg7WzxZ.js} +1 -1
- package/dist/{catalog-SnaPhbZ1.js → catalog-DlVcHvH5.js} +3 -3
- package/dist/catalog-WP3LwPu_.js +1 -0
- package/dist/{catalog-operations-BqSsByIE.js → catalog-operations-DsbLxw1f.js} +1 -1
- package/dist/chat/index.js +1 -1
- package/dist/claims-size-C0kHWqou.js +1 -0
- package/dist/{claims-size-ZiUJBn0r.js → claims-size-Dxm9zWw5.js} +2 -2
- package/dist/claude-agent/index.js +2 -2
- package/dist/cli/bin.js +1 -1
- package/dist/cli/generate/watch-worker.js +2 -2
- package/dist/cli/index.js +3 -3
- package/dist/cli/plugins/app.js +1 -1
- package/dist/cli/plugins/openapi.js +2 -2
- package/dist/cli/plugins/powersync.js +1 -1
- package/dist/cli/plugins/rls.js +1 -1
- package/dist/cli/plugins/schemas.js +1 -1
- package/dist/cli/plugins/supabase-hook.js +1 -1
- package/dist/cli/plugins/supabase.js +2 -2
- package/dist/cli/plugins/ui.js +1 -1
- package/dist/{cloud-DxDQff7G.js → cloud-0zu4L55w.js} +2 -2
- package/dist/{codemod-DjcAtHr9.js → codemod-CtF7Vk_T.js} +6 -6
- package/dist/{codemod-CX9EGBJw.js → codemod-DaU2mOwl.js} +5 -5
- package/dist/collect-BchFfzIJ.js +1 -0
- package/dist/{collect-Co-w8Eg2.js → collect-BqaPdsk1.js} +4 -4
- package/dist/{collect-CcE8QBtZ.js → collect-CcQDJuYi.js} +2 -2
- package/dist/{compile-BWOrvhGt.js → compile-CeaX5VD-.js} +8 -8
- package/dist/{completion-9B7fZWsn.js → completion-Cyp3kn5b.js} +1 -1
- package/dist/{config-Dan6vcvj.js → config-C1lTq4gJ.js} +3 -3
- package/dist/{config-BgBDv1UW.js → config-CNloPiIn.js} +1 -1
- package/dist/{config-paths-CQvGng3k.js → config-paths-Cg3IXh9T.js} +3 -3
- package/dist/{config-report-oYAr9Opz.js → config-report-i9ujoKAl.js} +4 -4
- package/dist/{context-DntIOpzS.js → context-BKZmdYRf.js} +1 -1
- package/dist/{context-Nr3nknZX.js → context-CzHYMZr9.js} +1 -1
- package/dist/convex/index.js +2 -2
- package/dist/{core-BFR-V5CL.js → core-BEA7805j.js} +3 -3
- package/dist/{create-Dapy8DIK.js → create-DRiggRWE.js} +3 -3
- package/dist/{create-BICq9l-p.js → create-fNkkpOy5.js} +2 -2
- package/dist/{custom-role-rebuild-BwM6hBqt.js → custom-role-rebuild-DzbBD1cq.js} +5 -5
- package/dist/{define-permdock-B0q7Rg9b.js → define-permdock-CGI9pgqL.js} +2 -2
- package/dist/{diff-BebUlh4Z.js → diff-Bv-oDvZq.js} +1 -1
- package/dist/{diff-Sxca4_5q.js → diff-YsQOcb9N.js} +4 -4
- package/dist/{doctor-Dqh8AzIx.js → doctor-BuPSrNmh.js} +60 -47
- package/dist/{doctor-CDSxgnut.js → doctor-Mgbj6UO0.js} +2 -2
- package/dist/{edits-CqU8s2GC.js → edits-Ckbit4uD.js} +1 -1
- package/dist/elysia/index.js +1 -1
- package/dist/evaluator-C4RrXo4y.js +2 -0
- package/dist/{evaluator-eager-BLNVbEAC.js → evaluator-eager-B_4KdPgg.js} +1 -1
- package/dist/eve/index.d.ts +50 -1
- package/dist/eve/index.js +39 -3
- package/dist/{execute-CUGaCy_9.js → execute-D6FFwdwW.js} +5 -5
- package/dist/{explain-CgKGadRa.js → explain-CPYRj0qn.js} +3 -3
- package/dist/{explain-BrvY9cXX.js → explain-CvCujO8Q.js} +2 -2
- package/dist/express/index.js +1 -1
- package/dist/fastify/index.js +1 -1
- package/dist/{fetch-adapter-dmABnF7F.js → fetch-adapter-niRAPzNm.js} +1 -1
- package/dist/{fields-CKX-qjWb.js → fields-DWAwA8vX.js} +3 -3
- package/dist/{fixtures-3aUUP6Nx.js → fixtures-B29C2DGA.js} +1 -1
- package/dist/{from-snapshot-DZ4D2sLa.js → from-snapshot-O341Vdgj.js} +12 -4
- package/dist/{gen-D85_gUOz.js → gen-CZB21YVB.js} +6 -6
- package/dist/{gen-kind-Bi0dtNoV.js → gen-kind-2KPUHSs6.js} +1 -1
- package/dist/gen-tTRu05jZ.js +1 -0
- package/dist/{generate-C8kAhef2.js → generate-DFffYRB7.js} +3 -3
- package/dist/{generate-BnOSZLka.js → generate-DePdrbn_.js} +19 -19
- package/dist/{generate-options-eMjRViev.js → generate-options-Bq5qQ9H7.js} +13 -13
- package/dist/h3/index.js +2 -2
- package/dist/{helper-calls-DN1PJcNY.js → helper-calls-jStpeQ2_.js} +1 -1
- package/dist/hono/index.js +1 -1
- package/dist/{hook-sql-BQcxbOzi.js → hook-sql-Dys1kW5p.js} +13 -13
- package/dist/{import-BLN-HGJG.js → import-BIJM6oAh.js} +1 -1
- package/dist/{import-wBO24zgo.js → import-bTvN77Uj.js} +3 -3
- package/dist/{index-B1hyWi7O.d.ts → index-Cnrz9ChE.d.ts} +3 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +4 -4
- package/dist/{init-B8bPTGMb.js → init-CfDdG_Fj.js} +3 -3
- package/dist/{init-BQnRbzUb.js → init-yo4GJOkM.js} +1 -1
- package/dist/{inspect-functions-GXdyPFwI.js → inspect-functions-Cj7kZDJt.js} +1 -1
- package/dist/{instance-snapshot-D03srwnf.js → instance-snapshot-BJam8gUa.js} +10 -3
- package/dist/{interactive-only-C9NQJXpi.js → interactive-only-ek-Kf0Kq.js} +5 -5
- package/dist/{kernel-yI0nUyuX.js → kernel-UOKCD3tV.js} +3 -3
- package/dist/{keys-QhAlAjXf.js → keys-CBblXqiu.js} +1 -1
- package/dist/{lazy-provider-b8UHGi8P.js → lazy-provider-BPSgEG-A.js} +1 -1
- package/dist/{load-m7jmit3y.js → load-D03A3tZL.js} +1 -1
- package/dist/load-r-TDUcRq.js +1 -0
- package/dist/{login-kQOIJoFN.js → login-2hkrhPGs.js} +3 -3
- package/dist/{login-DnVKv2ib.js → login-CsTj_pBQ.js} +1 -1
- package/dist/{manager-chain-CFkceFls.js → manager-chain-BbrD-s7u.js} +2 -2
- package/dist/{manifest-CMh8sAAH.js → manifest-CZvwWacN.js} +42 -42
- package/dist/mcp/index.js +2 -2
- package/dist/{measure-DJl28Whs.js → measure-BhjWMmvj.js} +5 -5
- package/dist/{memberships-DiCbNRny.js → memberships-DEW0FU2p.js} +1 -1
- package/dist/{memberships-CDiSsFTu.js → memberships-DaKwjhc5.js} +3 -3
- package/dist/{migrate-BXk_rUmb.js → migrate-BBPxqBMF.js} +2 -2
- package/dist/{model-DQQYg8UW.js → model-BfhDMEDf.js} +2 -2
- package/dist/{module-values-D-AiNhBp.js → module-values-BvR7QHTM.js} +2 -2
- package/dist/{names-DwGleRKB.js → names-zCkaCepO.js} +3 -3
- package/dist/nest/index.js +1 -1
- package/dist/next/index.js +3 -3
- package/dist/next/plugin.js +1 -1
- package/dist/node/index.js +1 -1
- package/dist/openai/index.js +3 -3
- package/dist/{openapi-CuyzmD9h.js → openapi-1ZydKQE3.js} +4 -4
- package/dist/{openapi-D7kRYqWu.js → openapi-CufQiEo8.js} +2 -2
- package/dist/{openapi-document-ClyLB0-z.js → openapi-document-oqfHlSZt.js} +1 -1
- package/dist/{optional-CaQWp9HA.js → optional-Dw7to-jw.js} +11 -1
- package/dist/orpc/index.js +2 -2
- package/dist/{output-ONUzppLo.js → output-yUW7fcAk.js} +1 -1
- package/dist/{ownership-CCgncSLb.js → ownership-Bx_s_E8i.js} +7 -7
- package/dist/pdp/index.js +1 -1
- package/dist/{permdock-CbavFN6u.js → permdock-B0aE5Ime.js} +1 -1
- package/dist/{permissions-BPYOb5OB.js → permissions-CF8Ed44S.js} +1 -1
- package/dist/{pipeline-DGFc6y6x.js → pipeline-BTsmCn1p.js} +2 -2
- package/dist/{policy-AWd-ccJJ.js → policy-CXAhfYIt.js} +2 -2
- package/dist/{policy-bundle-rC5_X9hX.js → policy-bundle-BZyCcphj.js} +3 -3
- package/dist/{policy-from-catalog-BohzTN3J.js → policy-from-catalog-hECiBs9M.js} +1 -1
- package/dist/{powersync-DW7seEgS.js → powersync-C6F2F_VP.js} +1 -1
- package/dist/{powersync-C84aHECl.js → powersync-CcXYDuyo.js} +1 -1
- package/dist/{powersync-C1OW6iVd.js → powersync-DVUeHJpL.js} +13 -13
- package/dist/{program-CvarkLMS.js → program-C2fbc9NO.js} +2 -2
- package/dist/{provider-NQwLSlgb.js → provider-BT8hVigf.js} +1 -1
- package/dist/{provider-hQFC3b98.js → provider-DRsBw6My.js} +1 -1
- package/dist/{provider-store-BizF6jyu.js → provider-store-fzaF1R6q.js} +1 -1
- package/dist/{prune-config-DeTUhG2J.js → prune-config-CPvDryuI.js} +10 -10
- package/dist/{pull-C851tQak.js → pull-CEv7O_zQ.js} +1 -1
- package/dist/pull-DeXUmRKY.js +1 -0
- package/dist/{push-Br0Uz5pT.js → push-Dq9qatTg.js} +3 -3
- package/dist/{pushed-policy-dm_hFstN.js → pushed-policy-DXA5KLo6.js} +1 -1
- package/dist/{quote-LNaBdCGA.js → quote-BX3DDoTX.js} +1 -1
- package/dist/{rbac-ByuGspKZ.js → rbac-COexzCC9.js} +5 -5
- package/dist/react/index.js +1 -1
- package/dist/react/lazy.js +1 -1
- package/dist/react/provider-client-lazy.js +1 -1
- package/dist/react/provider-client.js +1 -1
- package/dist/react-native/index.js +1 -1
- package/dist/{rename-BgfR3xB9.js → rename-CoG144pW.js} +9 -9
- package/dist/{report-x9GeUvjx.js → report-B7UuE4dW.js} +1 -1
- package/dist/{report-Dp-ApWVC.js → report-CMncWbQ-.js} +1 -1
- package/dist/{request-context-C9FFFpuH.js → request-context-Bi0Crsd5.js} +1 -1
- package/dist/{resolve-config-Cu_mE2wt.js → resolve-config-LiLfxe8X.js} +1 -1
- package/dist/{resolve-names-DmX503uX.js → resolve-names-ybewcnpW.js} +7 -7
- package/dist/{resolver-C9-dU-SZ.js → resolver-CkK3cvQc.js} +4 -4
- package/dist/{rls-DTN_-HX2.js → rls-C-UfcYPG.js} +5 -5
- package/dist/{rls-JSxuWcf-.js → rls-CTWb0XEV.js} +13 -13
- package/dist/{rls-files-BsJsEeJ_.js → rls-files-DFUG6y5D.js} +1 -1
- package/dist/{roles-BeNEhv7Q.js → roles-MVZd_RrF.js} +1 -1
- package/dist/{rpc-RDBrKR7N.js → rpc-C-kZGWs6.js} +1 -1
- package/dist/{run-BgNlYtQJ.js → run-B9MRT-5k.js} +3 -3
- package/dist/run-me1Fi6eQ.js +1 -0
- package/dist/{saas-CHviJgF2.js → saas-DDz3ivSL.js} +2 -2
- package/dist/{scan-pHPntFbs.js → scan-BoHmvDOe.js} +1 -1
- package/dist/{schema-DJd7Gq_p.js → schema-Bk0R_6ul.js} +1 -1
- package/dist/{schema-tables-Ba9LE_XB.js → schema-tables-CqEHokUT.js} +2 -2
- package/dist/server/index.js +1 -1
- package/dist/{shared-DnVY767H.js → shared-BRLAQqj4.js} +1 -1
- package/dist/{size-Dm3777Ev.js → size-CQkUXcPF.js} +4 -4
- package/dist/{skills-txCdqGns.js → skills-BIGdhR5i.js} +1 -1
- package/dist/{skills-D4ItrS0F.js → skills-DiMXWCQY.js} +1 -1
- package/dist/{snapshot-size-CpdksnSr.js → snapshot-size-1zICkeFb.js} +1 -1
- package/dist/{snapshot-size-I_-fxGry.js → snapshot-size-CFwBMDNC.js} +1 -1
- package/dist/solid/index.js +1 -1
- package/dist/solid-start/index.js +2 -2
- package/dist/{sources-C6Id63F8.js → sources-DNVEyJxb.js} +10 -2
- package/dist/{src-10d_jun2.js → src-DUWw9z1D.js} +2 -2
- package/dist/{stores-jgDndNHa.js → stores-qYmLHVKv.js} +1 -1
- package/dist/{subject-B7p94Y0s.js → subject-CMkc28eP.js} +1 -1
- package/dist/supabase/index.js +3 -3
- package/dist/supabase/middleware.js +3 -3
- package/dist/{supabase-D-kxyoaX.js → supabase-BBEop7q7.js} +2 -2
- package/dist/{supabase-hook-DDxDjlOU.js → supabase-hook-C3q-XEnu.js} +8 -8
- package/dist/supabase-hook-DLnH3_5Z.js +2 -0
- package/dist/{supabase-schemas-D6ezN5Ln.js → supabase-schemas-RPYfnE6O.js} +2 -2
- package/dist/{supabase-CeJAHqZp.js → supabase-zRUmN_PE.js} +3 -3
- package/dist/svelte/index.js +2 -2
- package/dist/svelte/runtime.js +1 -1
- package/dist/svelte/source.js +1 -1
- package/dist/sveltekit/index.js +1 -1
- package/dist/{table-reads-DHB56kFZ.js → table-reads-CegjCVHG.js} +1 -1
- package/dist/{table-reads-Doh_Egx2.js → table-reads-DpncF1F-.js} +3 -3
- package/dist/{tables-E-dIHUN_.js → tables-Dr4BUH9i.js} +12 -8
- package/dist/tanstack-start/index.js +1 -1
- package/dist/{tenant-check-DGfE7Sns.js → tenant-check-C5DAstGo.js} +3 -3
- package/dist/terminal/index.js +2 -2
- package/dist/testing/core.js +1 -1
- package/dist/testing/index.d.ts +1 -1
- package/dist/testing/index.js +7 -7
- package/dist/testing/saas/index.js +2 -2
- package/dist/testing/saas/permissions.js +1 -1
- package/dist/trpc/index.js +2 -2
- package/dist/unplugin/index.js +1 -1
- package/dist/{usage-DymSoYQZ.js → usage-D5Rin-a_.js} +1 -1
- package/dist/usage-D7eCW8yi.js +1 -0
- package/dist/{usage-CX_wmL5W.js → usage-DDr-iwHr.js} +6 -6
- package/dist/{verify-CHlmYg2d.js → verify-Df9u1-v5.js} +13 -13
- package/dist/vue/index.js +1 -1
- package/dist/{warm-BOrs0-_j.js → warm-C6Hn4J-4.js} +1 -1
- package/dist/{watch-BFDMb5N4.js → watch-BuQhtt25.js} +2 -2
- package/dist/{watch-CkL1iuKJ.js → watch-DEPXy-r0.js} +2 -2
- package/dist/watch-wQLoPqC-.js +1 -0
- package/dist/workflow/index.js +1 -1
- package/package.json +3 -3
- package/skills/permdock-agents/references/runtimes.md +1 -1
- package/dist/bundle-size-CGd8wVIu.js +0 -1
- package/dist/catalog-e6QRd1JP.js +0 -1
- package/dist/claims-size-B0OvYh9z.js +0 -1
- package/dist/collect-C2_CKZ09.js +0 -1
- package/dist/evaluator-zpeC7zel.js +0 -2
- package/dist/gen-CNYlckFE.js +0 -1
- package/dist/load-BCABUQZi.js +0 -1
- package/dist/pull-CylkuBGR.js +0 -1
- package/dist/run-C7nX-hkR.js +0 -1
- package/dist/supabase-hook-BTiZ8LTJ.js +0 -2
- package/dist/usage-DcVP-SFj.js +0 -1
- package/dist/watch-5WP3ZCcR.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as configuredTableReads, o as functionShares } from "./table-reads-
|
|
1
|
+
import { n as configuredTableReads, o as functionShares } from "./table-reads-DpncF1F-.js";
|
|
2
2
|
// src/cli/rls/inspect-functions.ts
|
|
3
3
|
/**
|
|
4
4
|
* `permdock supabase inspect --functions <pattern>`: for each function the
|
|
@@ -618,9 +618,15 @@ function assignableCustomRoles(policy, customRoles, tenant, declared, mayHandOut
|
|
|
618
618
|
function clockDependent(snapshot) {
|
|
619
619
|
return snapshot.grants.some((entry) => entry.validity !== void 0) || (snapshot.subject.principal?.memberships ?? []).some((membership) => membership.expiresAt !== void 0);
|
|
620
620
|
}
|
|
621
|
-
|
|
621
|
+
/**
|
|
622
|
+
* The rowless answer of one permission. The table reads only the outcome and
|
|
623
|
+
* the denial reasons, so the evaluator runs outcome-only: it neither freezes
|
|
624
|
+
* the decision nor hashes a decision token, which is most of the cost of
|
|
625
|
+
* answering every permission of a snapshot.
|
|
626
|
+
*/
|
|
627
|
+
function rowless(snapshot, subject, permission) {
|
|
622
628
|
try {
|
|
623
|
-
return evaluateSnapshot(snapshot,
|
|
629
|
+
return evaluateSnapshot(snapshot, subject, permission, void 0, void 0, {}, true);
|
|
624
630
|
} catch {
|
|
625
631
|
/* v8 ignore next */
|
|
626
632
|
return null;
|
|
@@ -638,9 +644,10 @@ function typeLevelOf(policy, snapshot) {
|
|
|
638
644
|
const approval = [];
|
|
639
645
|
const endpoint = [];
|
|
640
646
|
const keys = new Set(snapshot.grants.filter((entry) => entry.effect === "allow").map((entry) => entry.permission));
|
|
647
|
+
const subject = subjectFromSnapshot(snapshot, void 0);
|
|
641
648
|
for (const key of [...keys].toSorted()) {
|
|
642
649
|
const permission = findPermission(policy.permissions, key);
|
|
643
|
-
const decision = permission === void 0 ? null : rowless(snapshot, permission);
|
|
650
|
+
const decision = permission === void 0 ? null : rowless(snapshot, subject, permission);
|
|
644
651
|
if (decision === null) continue;
|
|
645
652
|
switch (decision.outcome) {
|
|
646
653
|
case "granted":
|
|
@@ -3,12 +3,12 @@ import { l as scopeChain, s as resolveScope } from "./scopes-B-KX9EI8.js";
|
|
|
3
3
|
import { i as configError } from "./errors-DgLOqc6j.js";
|
|
4
4
|
import { d as sqlTextArray, i as qualifySqlTable } from "./sql-T4GaBh9X.js";
|
|
5
5
|
import { i as scopeColumn } from "./compile-BUKXrueE.js";
|
|
6
|
-
import { d as keptKeys, l as roleColumn, u as roleManifest } from "./sources-
|
|
6
|
+
import { d as keptKeys, l as roleColumn, u as roleManifest } from "./sources-DNVEyJxb.js";
|
|
7
7
|
import { t as compactMembershipsSql } from "./membership-claim-sql-DGfhIn__.js";
|
|
8
|
-
import { a as quoteIdent, c as quoteTable, i as qualified, n as declaredArray, o as quoteLiteral, r as helperSchema, s as quoteQualified } from "./quote-
|
|
9
|
-
import { C as tenantTypeOf, a as kindFilterSql, d as subjectClaimSql, f as subjectIdSql, i as keyTenantSql, r as globalKindFilterSql, s as memberVia, u as subjectClaimJsonSql, x as scopeTypeOf } from "./subject-
|
|
10
|
-
import { i as allowEntry, o as rootName, r as HELPERS, s as signedIn, t as CUSTOM_ROLES } from "./shared-
|
|
11
|
-
import { S as scopeTable, _ as memberRoleOf, h as memberIdsHelper, o as hasMemberFor, x as scopeSources } from "./names-
|
|
8
|
+
import { a as quoteIdent, c as quoteTable, i as qualified, n as declaredArray, o as quoteLiteral, r as helperSchema, s as quoteQualified } from "./quote-BX3DDoTX.js";
|
|
9
|
+
import { C as tenantTypeOf, a as kindFilterSql, d as subjectClaimSql, f as subjectIdSql, i as keyTenantSql, r as globalKindFilterSql, s as memberVia, u as subjectClaimJsonSql, x as scopeTypeOf } from "./subject-CMkc28eP.js";
|
|
10
|
+
import { i as allowEntry, o as rootName, r as HELPERS, s as signedIn, t as CUSTOM_ROLES } from "./shared-BRLAQqj4.js";
|
|
11
|
+
import { S as scopeTable, _ as memberRoleOf, h as memberIdsHelper, o as hasMemberFor, x as scopeSources } from "./names-zCkaCepO.js";
|
|
12
12
|
import { n as byKey } from "./compare-8SNJN-9U.js";
|
|
13
13
|
// src/cli/sql/active.ts
|
|
14
14
|
function checkActiveRow(label, row) {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { l as storedApprovalToken, s as resumeDecision } from "./helpers-COh0lLc1.js";
|
|
2
2
|
import { n as tenantScope, t as actorFrom } from "./adapter-context-lHq_i_77.js";
|
|
3
|
-
import { u as withApp } from "./permdock-
|
|
4
|
-
import { n as resolveOrNull } from "./build-instance-
|
|
3
|
+
import { u as withApp } from "./permdock-B0aE5Ime.js";
|
|
4
|
+
import { n as resolveOrNull } from "./build-instance-BX5yWZDz.js";
|
|
5
5
|
import { t as compact } from "./compact-C4LFuqbW.js";
|
|
6
6
|
import { t as actorMayCallTool } from "./delegation-0DVVomzu.js";
|
|
7
|
-
import { n as requestContext, t as buildReportingInstance } from "./request-context-
|
|
7
|
+
import { n as requestContext, t as buildReportingInstance } from "./request-context-Bi0Crsd5.js";
|
|
8
8
|
import { n as resourceRef } from "./resource-ref-BiQtFK-I.js";
|
|
9
9
|
import { n as describe } from "./describe-B7EosIKA.js";
|
|
10
10
|
import { a as deniedMessage } from "./errors-DOSkVeTC.js";
|
|
@@ -24,7 +24,7 @@ const keysRename = defineLeaf({
|
|
|
24
24
|
}
|
|
25
25
|
},
|
|
26
26
|
async run(ctx, { flags, args }) {
|
|
27
|
-
const { runKeysRename } = await import("./rename-
|
|
27
|
+
const { runKeysRename } = await import("./rename-CoG144pW.js");
|
|
28
28
|
const migration = given(flags.migration);
|
|
29
29
|
return runKeysRename({
|
|
30
30
|
cwd: ctx.cwd,
|
|
@@ -11,7 +11,7 @@ function lazyEvaluator() {
|
|
|
11
11
|
build: () => loaded.build,
|
|
12
12
|
load: () => {
|
|
13
13
|
loaded.promise ??= (async () => {
|
|
14
|
-
loaded.build = (await import("./evaluator-
|
|
14
|
+
loaded.build = (await import("./evaluator-C4RrXo4y.js")).buildInstance;
|
|
15
15
|
})();
|
|
16
16
|
return loaded.promise;
|
|
17
17
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { c as listPermissions } from "./permission-registry-DstT40VS.js";
|
|
2
2
|
import { a as describeError, n as CliError } from "./errors-DgLOqc6j.js";
|
|
3
|
-
import { n as jiti } from "./optional-
|
|
3
|
+
import { n as jiti } from "./optional-Dw7to-jw.js";
|
|
4
4
|
import { dirname, resolve } from "node:path";
|
|
5
5
|
import { pathToFileURL } from "node:url";
|
|
6
6
|
// src/cli/project/load.ts
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { a as loadModule, s as pickNamed } from "./load-D03A3tZL.js";
|
|
@@ -27,7 +27,7 @@ const login = defineLeaf({
|
|
|
27
27
|
}
|
|
28
28
|
},
|
|
29
29
|
async run(ctx, { flags }) {
|
|
30
|
-
const { runLogin } = await import("./login-
|
|
30
|
+
const { runLogin } = await import("./login-CsTj_pBQ.js");
|
|
31
31
|
return runLogin({
|
|
32
32
|
cwd: ctx.cwd,
|
|
33
33
|
url: given(flags.url),
|
|
@@ -43,7 +43,7 @@ const login = defineLeaf({
|
|
|
43
43
|
const logout = defineLeaf({
|
|
44
44
|
flags: { ...urlFlag },
|
|
45
45
|
async run(ctx, { flags }) {
|
|
46
|
-
const { runLogout } = await import("./login-
|
|
46
|
+
const { runLogout } = await import("./login-CsTj_pBQ.js");
|
|
47
47
|
return runLogout({
|
|
48
48
|
url: given(flags.url),
|
|
49
49
|
json: ctx.json,
|
|
@@ -55,7 +55,7 @@ const logout = defineLeaf({
|
|
|
55
55
|
const whoami = defineLeaf({
|
|
56
56
|
flags: { ...urlFlag },
|
|
57
57
|
async run(ctx, { flags }) {
|
|
58
|
-
const { runWhoami } = await import("./login-
|
|
58
|
+
const { runWhoami } = await import("./login-CsTj_pBQ.js");
|
|
59
59
|
return runWhoami({
|
|
60
60
|
url: given(flags.url),
|
|
61
61
|
json: ctx.json,
|
|
@@ -3,7 +3,7 @@ import { i as postForm, r as parseToken, s as runDeviceFlow } from "./device-f3J
|
|
|
3
3
|
import { i as writeCredentials, n as deleteCredentials, r as readCredentials, t as credentialsPath } from "./storage-BhGDhsXm.js";
|
|
4
4
|
import { n as CliError } from "./errors-DgLOqc6j.js";
|
|
5
5
|
import { n as httpRequest } from "./http-BbX_Ou3_.js";
|
|
6
|
-
import { o as nonEmptyOr } from "./output-
|
|
6
|
+
import { o as nonEmptyOr } from "./output-yUW7fcAk.js";
|
|
7
7
|
import { c as READ_SCOPES, d as issuerMetadata, i as credentialsInsideRepository, l as cloudUrl, n as cliRuntime, r as credentialStorage, s as CLI_CLIENT_ID, t as CREDENTIAL_SERVICE } from "./auth-WHKYWtnS.js";
|
|
8
8
|
import { n as randomToken, t as pkce } from "./pkce-DdsRBK7n.js";
|
|
9
9
|
import { spawn } from "node:child_process";
|
|
@@ -2,8 +2,8 @@ import { r as isRecord } from "./compact-C4LFuqbW.js";
|
|
|
2
2
|
import { n as CliError } from "./errors-DgLOqc6j.js";
|
|
3
3
|
import { i as refuseDirty, t as applyFiles } from "./files-DuV7wRim.js";
|
|
4
4
|
import { a as rel } from "./files-DAR51W3J.js";
|
|
5
|
-
import { a as readConfig } from "./config-
|
|
6
|
-
import { a as REQUEST_APPROVER_IDS, d as checkedManagers, f as isManagerRows, i as MANAGES_ROW, n as MANAGED_ROW_IDS, r as MANAGED_ROW_IDS_IN, t as ACCESSIBLE_ROW_IDS } from "./approval-chain-
|
|
5
|
+
import { a as readConfig } from "./config-C1lTq4gJ.js";
|
|
6
|
+
import { a as REQUEST_APPROVER_IDS, d as checkedManagers, f as isManagerRows, i as MANAGES_ROW, n as MANAGED_ROW_IDS, r as MANAGED_ROW_IDS_IN, t as ACCESSIBLE_ROW_IDS } from "./approval-chain-e4HcSs3o.js";
|
|
7
7
|
import { a as parseSqlFile, n as charIndex, u as removeStatements } from "./ast-Dnm2TOHN.js";
|
|
8
8
|
import { n as supabaseDir } from "./supabase-dir-0lxKbrYu.js";
|
|
9
9
|
import { readFileSync, readdirSync, statSync } from "node:fs";
|
|
@@ -30,20 +30,20 @@ const SECTIONS = [
|
|
|
30
30
|
docs: "init",
|
|
31
31
|
effects: ["files"],
|
|
32
32
|
config: false,
|
|
33
|
-
load: async () => (await import("./init-
|
|
33
|
+
load: async () => (await import("./init-CfDdG_Fj.js")).init
|
|
34
34
|
}),
|
|
35
35
|
group("preset", "Decode a preset code, or print its permdock.com/create link", "preset", [leaf("decode", "Print what a preset code holds", {
|
|
36
36
|
examples: ["permdock preset decode p1AQIDBAc"],
|
|
37
37
|
docs: "preset",
|
|
38
38
|
effects: [],
|
|
39
39
|
config: false,
|
|
40
|
-
load: async () => (await import("./init-
|
|
40
|
+
load: async () => (await import("./init-CfDdG_Fj.js")).presetDecode
|
|
41
41
|
}), leaf("url", "Print the permdock.com/create link that opens a code", {
|
|
42
42
|
examples: ["permdock preset url p1AQIDBAc"],
|
|
43
43
|
docs: "preset",
|
|
44
44
|
effects: [],
|
|
45
45
|
config: false,
|
|
46
|
-
load: async () => (await import("./init-
|
|
46
|
+
load: async () => (await import("./init-CfDdG_Fj.js")).presetUrl
|
|
47
47
|
})]),
|
|
48
48
|
group("skills", "Install, update or list the PermDock Agent Skills", "skills", [
|
|
49
49
|
leaf("install", "Copy the Agent Skills into the agent folders", {
|
|
@@ -55,21 +55,21 @@ const SECTIONS = [
|
|
|
55
55
|
docs: "skills",
|
|
56
56
|
effects: ["files"],
|
|
57
57
|
config: false,
|
|
58
|
-
load: async () => (await import("./skills-
|
|
58
|
+
load: async () => (await import("./skills-BIGdhR5i.js")).install
|
|
59
59
|
}),
|
|
60
60
|
leaf("update", "Replace installed skills with this version's", {
|
|
61
61
|
examples: ["permdock skills update"],
|
|
62
62
|
docs: "skills",
|
|
63
63
|
effects: ["files"],
|
|
64
64
|
config: false,
|
|
65
|
-
load: async () => (await import("./skills-
|
|
65
|
+
load: async () => (await import("./skills-BIGdhR5i.js")).update
|
|
66
66
|
}),
|
|
67
67
|
leaf("list", "List the skills and where each is installed", {
|
|
68
68
|
examples: ["permdock skills list"],
|
|
69
69
|
docs: "skills",
|
|
70
70
|
effects: [],
|
|
71
71
|
config: false,
|
|
72
|
-
load: async () => (await import("./skills-
|
|
72
|
+
load: async () => (await import("./skills-BIGdhR5i.js")).list
|
|
73
73
|
})
|
|
74
74
|
]),
|
|
75
75
|
leaf("doctor", "Check a PermDock installation and print a fix for each finding", {
|
|
@@ -83,7 +83,7 @@ const SECTIONS = [
|
|
|
83
83
|
effects: ["files", "database:read"],
|
|
84
84
|
config: true,
|
|
85
85
|
findings: true,
|
|
86
|
-
load: async () => (await import("./doctor-
|
|
86
|
+
load: async () => (await import("./doctor-Mgbj6UO0.js")).doctor
|
|
87
87
|
}),
|
|
88
88
|
leaf("completion", "Print the shell completion script for bash, zsh or fish", {
|
|
89
89
|
examples: ["permdock completion zsh > ~/.zfunc/_permdock", "eval \"$(permdock completion bash)\""],
|
|
@@ -91,7 +91,7 @@ const SECTIONS = [
|
|
|
91
91
|
effects: [],
|
|
92
92
|
config: false,
|
|
93
93
|
shellOutput: true,
|
|
94
|
-
load: async () => (await import("./completion-
|
|
94
|
+
load: async () => (await import("./completion-Cyp3kn5b.js")).completion
|
|
95
95
|
})
|
|
96
96
|
]
|
|
97
97
|
},
|
|
@@ -107,14 +107,14 @@ const SECTIONS = [
|
|
|
107
107
|
docs: "collect",
|
|
108
108
|
effects: ["files"],
|
|
109
109
|
config: true,
|
|
110
|
-
load: async () => (await import("./collect-
|
|
110
|
+
load: async () => (await import("./collect-CcQDJuYi.js")).collect
|
|
111
111
|
}),
|
|
112
112
|
leaf("catalog", "Export the catalog as catalog JSON, JSON Schema or Markdown", {
|
|
113
113
|
examples: ["permdock catalog --out permissions.catalog.json", "permdock catalog --kind markdown"],
|
|
114
114
|
docs: "catalog",
|
|
115
115
|
effects: ["files"],
|
|
116
116
|
config: true,
|
|
117
|
-
load: async () => (await import("./catalog-
|
|
117
|
+
load: async () => (await import("./catalog-Beg7WzxZ.js")).catalog
|
|
118
118
|
}),
|
|
119
119
|
leaf("generate", "Write every plugin's files from the policy", {
|
|
120
120
|
examples: [
|
|
@@ -125,7 +125,7 @@ const SECTIONS = [
|
|
|
125
125
|
docs: "generate",
|
|
126
126
|
effects: ["files"],
|
|
127
127
|
config: true,
|
|
128
|
-
load: async () => (await import("./generate-
|
|
128
|
+
load: async () => (await import("./generate-DFffYRB7.js")).generate
|
|
129
129
|
}),
|
|
130
130
|
leaf("usage", "Report unused, ungranted and role-less permissions and conditions on undeclared fields", {
|
|
131
131
|
examples: ["permdock usage", "permdock usage --fail-on warning"],
|
|
@@ -133,49 +133,49 @@ const SECTIONS = [
|
|
|
133
133
|
effects: [],
|
|
134
134
|
config: true,
|
|
135
135
|
findings: true,
|
|
136
|
-
load: async () => (await import("./usage-
|
|
136
|
+
load: async () => (await import("./usage-D5Rin-a_.js")).usage
|
|
137
137
|
}),
|
|
138
138
|
leaf("diff", "Compare two policies or catalogs; exit 1 on a breaking change", {
|
|
139
139
|
examples: ["permdock diff main.catalog.json permissions.catalog.json", "permdock diff ./old-policy.ts ./src/policy.ts --impact"],
|
|
140
140
|
docs: "diff",
|
|
141
141
|
effects: [],
|
|
142
142
|
config: true,
|
|
143
|
-
load: async () => (await import("./diff-
|
|
143
|
+
load: async () => (await import("./diff-Bv-oDvZq.js")).diff
|
|
144
144
|
}),
|
|
145
145
|
leaf("explain", "Show which grants decide an action for each fixture subject", {
|
|
146
146
|
examples: ["permdock explain post.update", "permdock explain invoice.send --fixtures ./fixtures.ts --json"],
|
|
147
147
|
docs: "explain",
|
|
148
148
|
effects: [],
|
|
149
149
|
config: true,
|
|
150
|
-
load: async () => (await import("./explain-
|
|
150
|
+
load: async () => (await import("./explain-CvCujO8Q.js")).explain
|
|
151
151
|
}),
|
|
152
152
|
group("snapshot", "Measure the snapshot a role sends to the client", "snapshot", [leaf("size", "Report snapshot bytes by part, raw and gzip", {
|
|
153
153
|
examples: ["permdock snapshot size", "permdock snapshot size --role admin --tenants 40 --json"],
|
|
154
154
|
docs: "snapshot",
|
|
155
155
|
effects: [],
|
|
156
156
|
config: true,
|
|
157
|
-
load: async () => (await import("./size-
|
|
157
|
+
load: async () => (await import("./size-CQkUXcPF.js")).snapshotSize
|
|
158
158
|
})]),
|
|
159
159
|
group("bundle", "Measure the client bundle the generated bundle module ships", "bundle", [leaf("size", "Report bundle bytes per role and shared part, raw and gzip", {
|
|
160
160
|
examples: ["permdock bundle size", "permdock bundle size --budget 32768 --json"],
|
|
161
161
|
docs: "bundle",
|
|
162
162
|
effects: [],
|
|
163
163
|
config: true,
|
|
164
|
-
load: async () => (await import("./size-
|
|
164
|
+
load: async () => (await import("./size-CQkUXcPF.js")).bundleSize
|
|
165
165
|
})]),
|
|
166
166
|
group("roles", "List what each role holds", "roles", [leaf("grants", "List the grants of each role, expanded per permission", {
|
|
167
167
|
examples: ["permdock roles grants", "permdock roles grants --role admin --json"],
|
|
168
168
|
docs: "roles",
|
|
169
169
|
effects: [],
|
|
170
170
|
config: true,
|
|
171
|
-
load: async () => (await import("./roles-
|
|
171
|
+
load: async () => (await import("./roles-MVZd_RrF.js")).rolesGrants
|
|
172
172
|
})]),
|
|
173
173
|
group("keys", "Change permission keys", "keys", [leaf("rename", "Retire a permission key: the tree maps it to its successor, and stored custom-role grants move", {
|
|
174
174
|
examples: ["permdock keys rename fileNode.read file.read", "permdock keys rename fileNode.comment file.comment --dry-run"],
|
|
175
175
|
docs: "keys",
|
|
176
176
|
effects: ["rewrite", "files"],
|
|
177
177
|
config: true,
|
|
178
|
-
load: async () => (await import("./keys-
|
|
178
|
+
load: async () => (await import("./keys-CBblXqiu.js")).keysRename
|
|
179
179
|
})]),
|
|
180
180
|
group("policy", "Write the static grants of a policy as a content-addressed bundle", "policy", [leaf("bundle", "Write the policy bundle that rls.staticGrants 'ref' pins by hash", {
|
|
181
181
|
examples: [
|
|
@@ -186,14 +186,14 @@ const SECTIONS = [
|
|
|
186
186
|
docs: "policy",
|
|
187
187
|
effects: ["files"],
|
|
188
188
|
config: true,
|
|
189
|
-
load: async () => (await import("./policy-
|
|
189
|
+
load: async () => (await import("./policy-CXAhfYIt.js")).policyBundle
|
|
190
190
|
})]),
|
|
191
191
|
group("claims", "Measure the memberships claim of an access token", "claims", [leaf("size", "Report claim bytes, token characters and the budget cut", {
|
|
192
192
|
examples: ["permdock claims size --memberships 60", "permdock claims size --memberships 11 --roles 3 --json"],
|
|
193
193
|
docs: "claims",
|
|
194
194
|
effects: [],
|
|
195
195
|
config: false,
|
|
196
|
-
load: async () => (await import("./size-
|
|
196
|
+
load: async () => (await import("./size-CQkUXcPF.js")).claimsSize
|
|
197
197
|
})]),
|
|
198
198
|
leaf("config", "Check permdock.config.ts for unknown keys, or print the effective config", {
|
|
199
199
|
examples: ["permdock config", "permdock config --print"],
|
|
@@ -201,7 +201,7 @@ const SECTIONS = [
|
|
|
201
201
|
effects: [],
|
|
202
202
|
config: true,
|
|
203
203
|
findings: true,
|
|
204
|
-
load: async () => (await import("./config-
|
|
204
|
+
load: async () => (await import("./config-CNloPiIn.js")).config
|
|
205
205
|
})
|
|
206
206
|
]
|
|
207
207
|
},
|
|
@@ -214,7 +214,7 @@ const SECTIONS = [
|
|
|
214
214
|
docs: "rls",
|
|
215
215
|
effects: ["files", "database:read"],
|
|
216
216
|
config: true,
|
|
217
|
-
load: async () => (await import("./rls-
|
|
217
|
+
load: async () => (await import("./rls-C-UfcYPG.js")).importPolicies
|
|
218
218
|
}),
|
|
219
219
|
leaf("verify", "Run the fixtures against the policies, or compare a live database", {
|
|
220
220
|
examples: [
|
|
@@ -226,35 +226,35 @@ const SECTIONS = [
|
|
|
226
226
|
effects: ["files", "database:read"],
|
|
227
227
|
config: true,
|
|
228
228
|
findings: true,
|
|
229
|
-
load: async () => (await import("./rls-
|
|
229
|
+
load: async () => (await import("./rls-C-UfcYPG.js")).verify
|
|
230
230
|
}),
|
|
231
231
|
leaf("migrate", "Rewrite hand-written policies onto the generated helpers", {
|
|
232
232
|
examples: ["permdock rls migrate --sql supabase/migrations --dry-run", "permdock rls migrate --sql supabase/migrations"],
|
|
233
233
|
docs: "rls",
|
|
234
234
|
effects: ["rewrite", "files"],
|
|
235
235
|
config: true,
|
|
236
|
-
load: async () => (await import("./rls-
|
|
236
|
+
load: async () => (await import("./rls-C-UfcYPG.js")).migrate
|
|
237
237
|
}),
|
|
238
238
|
leaf("explain", "Show the tables, membership sources and triggers the SQL binds to", {
|
|
239
239
|
examples: ["permdock rls explain", "permdock rls explain --db-url-stdin --json"],
|
|
240
240
|
docs: "rls",
|
|
241
241
|
effects: ["database:read"],
|
|
242
242
|
config: true,
|
|
243
|
-
load: async () => (await import("./rls-
|
|
243
|
+
load: async () => (await import("./rls-C-UfcYPG.js")).explain
|
|
244
244
|
}),
|
|
245
245
|
leaf("measure", "Run requests as a user and count version reads, helper times and share keys", {
|
|
246
246
|
examples: ["permdock rls measure --as <user-id> --local", "permdock rls measure --as <user-id>,<user-id> --tenant <tenant-id> --requests 50 --db-url-stdin"],
|
|
247
247
|
docs: "rls",
|
|
248
248
|
effects: ["database:read"],
|
|
249
249
|
config: true,
|
|
250
|
-
load: async () => (await import("./rls-
|
|
250
|
+
load: async () => (await import("./rls-C-UfcYPG.js")).measure
|
|
251
251
|
}),
|
|
252
252
|
leaf("report", "List each table's policies by command, role, origin and helper calls", {
|
|
253
253
|
examples: ["permdock rls report", "permdock rls report --local --json"],
|
|
254
254
|
docs: "rls",
|
|
255
255
|
effects: ["database:read"],
|
|
256
256
|
config: true,
|
|
257
|
-
load: async () => (await import("./rls-
|
|
257
|
+
load: async () => (await import("./rls-C-UfcYPG.js")).report
|
|
258
258
|
})
|
|
259
259
|
]),
|
|
260
260
|
group("supabase", "Generate the Supabase Custom Access Token Hook, or inspect its manifest", "supabase", [leaf("inspect", "Print or write the hook and helper manifest", {
|
|
@@ -262,14 +262,14 @@ const SECTIONS = [
|
|
|
262
262
|
docs: "supabase",
|
|
263
263
|
effects: ["files"],
|
|
264
264
|
config: true,
|
|
265
|
-
load: async () => (await import("./supabase-
|
|
265
|
+
load: async () => (await import("./supabase-BBEop7q7.js")).inspect
|
|
266
266
|
})]),
|
|
267
267
|
group("powersync", "Generate PowerSync Sync Streams from the policy, or verify them", "powersync", [leaf("verify", "Fail on stale streams or a stream that syncs a denied row", {
|
|
268
268
|
examples: ["permdock powersync verify", "permdock powersync verify --db-url-stdin"],
|
|
269
269
|
docs: "powersync",
|
|
270
270
|
effects: ["database:read"],
|
|
271
271
|
config: true,
|
|
272
|
-
load: async () => (await import("./powersync-
|
|
272
|
+
load: async () => (await import("./powersync-CcXYDuyo.js")).verify
|
|
273
273
|
})])
|
|
274
274
|
]
|
|
275
275
|
},
|
|
@@ -283,7 +283,7 @@ const SECTIONS = [
|
|
|
283
283
|
effects: ["files"],
|
|
284
284
|
config: true,
|
|
285
285
|
findings: true,
|
|
286
|
-
load: async () => (await import("./openapi-
|
|
286
|
+
load: async () => (await import("./openapi-1ZydKQE3.js")).emitDocument
|
|
287
287
|
}),
|
|
288
288
|
leaf("annotate", "Write an operations map from @permission comments or an OpenAPI document", {
|
|
289
289
|
examples: ["permdock openapi annotate --routes 'app/**/route.ts'", "permdock openapi annotate --doc openapi.yaml --tenant-path orgId"],
|
|
@@ -291,14 +291,14 @@ const SECTIONS = [
|
|
|
291
291
|
effects: ["files"],
|
|
292
292
|
config: true,
|
|
293
293
|
findings: true,
|
|
294
|
-
load: async () => (await import("./openapi-
|
|
294
|
+
load: async () => (await import("./openapi-1ZydKQE3.js")).annotateRoutes
|
|
295
295
|
}),
|
|
296
296
|
leaf("import", "Turn an OpenAPI document into a generated definition", {
|
|
297
297
|
examples: ["permdock openapi import --doc openapi.yaml --out src/permissions.generated.ts"],
|
|
298
298
|
docs: "openapi",
|
|
299
299
|
effects: ["files", "network"],
|
|
300
300
|
config: false,
|
|
301
|
-
load: async () => (await import("./openapi-
|
|
301
|
+
load: async () => (await import("./openapi-1ZydKQE3.js")).importDocument
|
|
302
302
|
})
|
|
303
303
|
]),
|
|
304
304
|
group("arazzo", "Check Arazzo workflows against the permissions", "arazzo", [leaf("check", "Resolve every Arazzo step to x-permdock-permissions", {
|
|
@@ -307,7 +307,7 @@ const SECTIONS = [
|
|
|
307
307
|
effects: [],
|
|
308
308
|
config: true,
|
|
309
309
|
findings: true,
|
|
310
|
-
load: async () => (await import("./arazzo-
|
|
310
|
+
load: async () => (await import("./arazzo-BcSSf6Du.js")).check
|
|
311
311
|
})]),
|
|
312
312
|
leaf("scan", "List authorization checks written without PermDock, to adopt it in an existing app", {
|
|
313
313
|
examples: ["permdock scan", "permdock scan --src app,lib --pattern isBeta"],
|
|
@@ -315,7 +315,7 @@ const SECTIONS = [
|
|
|
315
315
|
effects: [],
|
|
316
316
|
config: true,
|
|
317
317
|
findings: true,
|
|
318
|
-
load: async () => (await import("./scan-
|
|
318
|
+
load: async () => (await import("./scan-BoHmvDOe.js")).scan
|
|
319
319
|
}),
|
|
320
320
|
group("casl", "Import CASL rules into a generated module", "casl", [leaf("import", "Turn CASL rules per role into a permissions and policy module", {
|
|
321
321
|
examples: ["permdock casl import --rules rules.json --out src/permissions.generated.ts"],
|
|
@@ -329,7 +329,7 @@ const SECTIONS = [
|
|
|
329
329
|
docs: "casbin",
|
|
330
330
|
effects: ["files"],
|
|
331
331
|
config: false,
|
|
332
|
-
load: async () => (await import("./casbin-
|
|
332
|
+
load: async () => (await import("./casbin-BthXLWZo.js")).casbinImport
|
|
333
333
|
})])
|
|
334
334
|
]
|
|
335
335
|
},
|
|
@@ -341,34 +341,34 @@ const SECTIONS = [
|
|
|
341
341
|
docs: "login",
|
|
342
342
|
effects: ["network", "files"],
|
|
343
343
|
config: false,
|
|
344
|
-
load: async () => (await import("./login-
|
|
344
|
+
load: async () => (await import("./login-2hkrhPGs.js")).login
|
|
345
345
|
}),
|
|
346
346
|
leaf("logout", "Revoke and delete the stored PermDock Cloud login", {
|
|
347
347
|
examples: ["permdock logout"],
|
|
348
348
|
docs: "login",
|
|
349
349
|
effects: ["network", "files"],
|
|
350
350
|
config: false,
|
|
351
|
-
load: async () => (await import("./login-
|
|
351
|
+
load: async () => (await import("./login-2hkrhPGs.js")).logout
|
|
352
352
|
}),
|
|
353
353
|
leaf("whoami", "Print the PermDock Cloud identity the CLI acts as", {
|
|
354
354
|
examples: ["permdock whoami", "permdock whoami --json"],
|
|
355
355
|
docs: "login",
|
|
356
356
|
effects: [],
|
|
357
357
|
config: false,
|
|
358
|
-
load: async () => (await import("./login-
|
|
358
|
+
load: async () => (await import("./login-2hkrhPGs.js")).whoami
|
|
359
359
|
}),
|
|
360
360
|
group("cloud", "Publish to or pull from a PermDock Cloud project", "cloud", [leaf("push", "Publish the catalog, policy and manifest to a Cloud project", {
|
|
361
361
|
examples: ["permdock cloud push --dry-run", "permdock cloud push --project prj_123"],
|
|
362
362
|
docs: "cloud",
|
|
363
363
|
effects: ["network", "cloud:write"],
|
|
364
364
|
config: true,
|
|
365
|
-
load: async () => (await import("./cloud-
|
|
365
|
+
load: async () => (await import("./cloud-0zu4L55w.js")).push
|
|
366
366
|
}), leaf("pull", "Write a Cloud project's published catalog and manifest", {
|
|
367
367
|
examples: ["permdock cloud pull --project prj_123"],
|
|
368
368
|
docs: "cloud",
|
|
369
369
|
effects: ["network", "files"],
|
|
370
370
|
config: true,
|
|
371
|
-
load: async () => (await import("./cloud-
|
|
371
|
+
load: async () => (await import("./cloud-0zu4L55w.js")).pull
|
|
372
372
|
})])
|
|
373
373
|
]
|
|
374
374
|
},
|
|
@@ -383,7 +383,7 @@ const SECTIONS = [
|
|
|
383
383
|
docs: "codemod",
|
|
384
384
|
effects: ["rewrite"],
|
|
385
385
|
config: false,
|
|
386
|
-
load: async () => (await import("./codemod-
|
|
386
|
+
load: async () => (await import("./codemod-CtF7Vk_T.js")).codemod
|
|
387
387
|
})]
|
|
388
388
|
}
|
|
389
389
|
];
|
|
@@ -395,7 +395,7 @@ const COMPLETE_LEAF = leaf("__complete", "Print completion candidates for a part
|
|
|
395
395
|
config: false,
|
|
396
396
|
shellOutput: true,
|
|
397
397
|
hidden: true,
|
|
398
|
-
load: async () => (await import("./completion-
|
|
398
|
+
load: async () => (await import("./completion-Cyp3kn5b.js")).complete
|
|
399
399
|
});
|
|
400
400
|
const ROOT = group("permdock", "Collect, export, diff and check the permissions a PermDock policy declares", "", [...SECTIONS.flatMap((section) => section.entries), COMPLETE_LEAF]);
|
|
401
401
|
/** Each leaf with its path from the root, in manifest order. */
|
package/dist/mcp/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as refusalText, n as createAgentKernel } from "../kernel-
|
|
2
|
-
import { i as challengeScope, o as hasScope, s as scopesReaching, u as withApp } from "../permdock-
|
|
1
|
+
import { i as refusalText, n as createAgentKernel } from "../kernel-UOKCD3tV.js";
|
|
2
|
+
import { i as challengeScope, o as hasScope, s as scopesReaching, u as withApp } from "../permdock-B0aE5Ime.js";
|
|
3
3
|
import { t as clientNameOf } from "../clients-Bb_33pRE.js";
|
|
4
4
|
import { r as isRecord, t as compact } from "../compact-C4LFuqbW.js";
|
|
5
5
|
import { n as delegationFrom, t as authorizationDetailsOf } from "../delegation-input-7Y5Rlja7.js";
|
|
@@ -2,11 +2,11 @@ import { r as isRecord } from "./compact-C4LFuqbW.js";
|
|
|
2
2
|
import { t as readMemberships } from "./read-memberships-DVBitJZG.js";
|
|
3
3
|
import { d as scopeList, p as tenantOf } from "./scopes-B-KX9EI8.js";
|
|
4
4
|
import { r as shareKeyClaimsEligible } from "./share-key-claims-CZGAeVqa.js";
|
|
5
|
-
import "./sources-
|
|
6
|
-
import { i as loadConfiguredPolicy } from "./load-
|
|
7
|
-
import { a as quoteIdent } from "./quote-
|
|
8
|
-
import { n as activeSource } from "./memberships-
|
|
9
|
-
import { n as configuredTableReads } from "./table-reads-
|
|
5
|
+
import "./sources-DNVEyJxb.js";
|
|
6
|
+
import { i as loadConfiguredPolicy } from "./load-D03A3tZL.js";
|
|
7
|
+
import { a as quoteIdent } from "./quote-BX3DDoTX.js";
|
|
8
|
+
import { n as activeSource } from "./memberships-DaKwjhc5.js";
|
|
9
|
+
import { n as configuredTableReads } from "./table-reads-DpncF1F-.js";
|
|
10
10
|
// src/cli/rls/measure.ts
|
|
11
11
|
/** Requests per tenant when `--requests` is absent. */
|
|
12
12
|
const DEFAULT_REQUESTS = 20;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as activeFromSql, n as activeSource, r as checkSources, i as entriesSql, a as hookMemberships, o as memberForPlan, s as positiveInteger, c as typedSourceUsers, l as typedUsers } from "./memberships-
|
|
1
|
+
export { t as activeFromSql, n as activeSource, r as checkSources, i as entriesSql, a as hookMemberships, o as memberForPlan, s as positiveInteger, c as typedSourceUsers, l as typedUsers } from "./memberships-DaKwjhc5.js";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { i as scopeColumn } from "./compile-BUKXrueE.js";
|
|
2
2
|
import { l as scopeChain, s as resolveScope } from "./scopes-B-KX9EI8.js";
|
|
3
3
|
import { i as qualifySqlTable } from "./sql-T4GaBh9X.js";
|
|
4
|
-
import { o as junctionMembershipSource, u as roleManifest } from "./sources-
|
|
4
|
+
import { o as junctionMembershipSource, u as roleManifest } from "./sources-DNVEyJxb.js";
|
|
5
5
|
import { i as configError } from "./errors-DgLOqc6j.js";
|
|
6
|
-
import { _ as memberRoleOf, c as hasPermittedUsers, m as memberForTable, o as hasMemberFor, p as memberForSources } from "./names-
|
|
7
|
-
import { a as quoteIdent, o as quoteLiteral, s as quoteQualified } from "./quote-
|
|
6
|
+
import { _ as memberRoleOf, c as hasPermittedUsers, m as memberForTable, o as hasMemberFor, p as memberForSources } from "./names-zCkaCepO.js";
|
|
7
|
+
import { a as quoteIdent, o as quoteLiteral, s as quoteQualified } from "./quote-BX3DDoTX.js";
|
|
8
8
|
// src/cli/supabase-hook/memberships.ts
|
|
9
9
|
function memberForPlan(input) {
|
|
10
10
|
const memberFor = input.scopes.map((scope) => scope.name).filter((name) => hasMemberFor({
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { r as isRecord } from "./compact-C4LFuqbW.js";
|
|
2
2
|
import { r as escapeSqlIdent, s as quoteSqlLiteral } from "./sql-T4GaBh9X.js";
|
|
3
3
|
import { i as dateAt } from "./time-r0CKBm57.js";
|
|
4
|
-
import "./sources-
|
|
4
|
+
import "./sources-DNVEyJxb.js";
|
|
5
5
|
import { a as describeError } from "./errors-DgLOqc6j.js";
|
|
6
6
|
import { i as refuseDirty, t as applyFiles } from "./files-DuV7wRim.js";
|
|
7
7
|
import { _ as writeOutputFiles, n as dataMigrationFile } from "./output-files-8lfALMSU.js";
|
|
8
8
|
import { o as sqlFiles } from "./files-DAR51W3J.js";
|
|
9
9
|
import { h as sqlStatements, n as charIndex } from "./ast-Dnm2TOHN.js";
|
|
10
10
|
import { a as RETIRE_MARKER } from "./markers-C-kThnKN.js";
|
|
11
|
-
import { r as HELPERS } from "./shared-
|
|
11
|
+
import { r as HELPERS } from "./shared-BRLAQqj4.js";
|
|
12
12
|
import { i as retireSql, r as retirePlan } from "./retire-FN4aY6-n.js";
|
|
13
13
|
import { existsSync, readFileSync } from "node:fs";
|
|
14
14
|
import { relative, resolve } from "node:path";
|
|
@@ -5,9 +5,9 @@ import { i as grantList } from "./policy-CZBJDcTx.js";
|
|
|
5
5
|
import { n as CliError } from "./errors-DgLOqc6j.js";
|
|
6
6
|
import { o as sqlFiles } from "./files-DAR51W3J.js";
|
|
7
7
|
import { c as jsonSchemaOf } from "./catalog-doc-BX97oFAn.js";
|
|
8
|
-
import { a as quoteIdent, o as quoteLiteral } from "./quote-
|
|
8
|
+
import { a as quoteIdent, o as quoteLiteral } from "./quote-BX3DDoTX.js";
|
|
9
9
|
import { a as parseSqlFile, f as stringValues, l as readRelation, t as SqlSyntaxError, u as removeStatements } from "./ast-Dnm2TOHN.js";
|
|
10
|
-
import { f as compileConditionSql } from "./rbac-
|
|
10
|
+
import { f as compileConditionSql } from "./rbac-COexzCC9.js";
|
|
11
11
|
import { readFileSync } from "node:fs";
|
|
12
12
|
import { relative } from "node:path";
|
|
13
13
|
// src/cli/sql/exported-copies.ts
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { c as listPermissions } from "./permission-registry-DstT40VS.js";
|
|
2
2
|
import { i as configError } from "./errors-DgLOqc6j.js";
|
|
3
|
-
import { r as parseSync } from "./optional-
|
|
3
|
+
import { r as parseSync } from "./optional-Dw7to-jw.js";
|
|
4
4
|
import { i as isModuleKey, n as MODULE_KEYS } from "./config-shape-BODqM-rG.js";
|
|
5
|
-
import { a as loadModule, s as pickNamed, t as asPermissionTree } from "./load-
|
|
5
|
+
import { a as loadModule, s as pickNamed, t as asPermissionTree } from "./load-D03A3tZL.js";
|
|
6
6
|
import { existsSync, readFileSync, statSync } from "node:fs";
|
|
7
7
|
import { dirname, relative, resolve } from "node:path";
|
|
8
8
|
// src/cli/project/module-values.ts
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { a as scopeMembershipTable, i as scopeColumn } from "./compile-BUKXrueE.js";
|
|
2
2
|
import { c as rootScope, l as scopeChain } from "./scopes-B-KX9EI8.js";
|
|
3
3
|
import { i as qualifySqlTable } from "./sql-T4GaBh9X.js";
|
|
4
|
-
import { l as roleColumn } from "./sources-
|
|
4
|
+
import { l as roleColumn } from "./sources-DNVEyJxb.js";
|
|
5
5
|
import { i as configError } from "./errors-DgLOqc6j.js";
|
|
6
|
-
import { a as quoteIdent, o as quoteLiteral, t as CLI } from "./quote-
|
|
7
|
-
import { f as subjectIdSql } from "./subject-
|
|
6
|
+
import { a as quoteIdent, o as quoteLiteral, t as CLI } from "./quote-BX3DDoTX.js";
|
|
7
|
+
import { f as subjectIdSql } from "./subject-CMkc28eP.js";
|
|
8
8
|
// src/cli/sql/names.ts
|
|
9
9
|
/** The closure table graph grants read. Part of the SQL contract. */
|
|
10
10
|
const CLOSURE = { table: "permdock_closure" };
|
package/dist/nest/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import { f as InvalidSignatureError, g as webBotAuthVerifier, p as discoverViaSi
|
|
|
2
2
|
import { t as compact } from "../compact-C4LFuqbW.js";
|
|
3
3
|
import { n as PermDockDeniedError, r as PermDockRevokedError, t as PermDockApprovalRequiredError } from "../errors-DOSkVeTC.js";
|
|
4
4
|
import { n as PermDockValidationError } from "../validation-error-CgDOA6VS.js";
|
|
5
|
-
import { a as socketConnection, r as bindKernel } from "../bind-
|
|
5
|
+
import { a as socketConnection, r as bindKernel } from "../bind-CFwfgfp2.js";
|
|
6
6
|
import { c as writeReply, r as hasCredentials } from "../http-C9jDw_bZ.js";
|
|
7
7
|
import { t as problemFromError } from "../map-error-DYQbf-3Q.js";
|
|
8
8
|
import { a as onRevoked, n as closeReason, t as POLICY_VIOLATION } from "../stream-DdF94h7T.js";
|