permdock 0.38.2 → 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/{adoption-scan-BSVL4wIW.js → adoption-scan-Cg4pyRhm.js} +1 -1
- package/dist/{annotate-dUrBHXWa.js → annotate-DcSH62rl.js} +2 -2
- package/dist/{annotate-doc-BA0betEO.js → annotate-doc-CLU0DxK7.js} +1 -1
- package/dist/{approval-chain-BEeExHpb.js → approval-chain-e4HcSs3o.js} +2 -2
- package/dist/{arazzo-DbuxB5Gw.js → arazzo-BcSSf6Du.js} +1 -1
- package/dist/{arazzo-C04bMN6Y.js → arazzo-C1JA-k9F.js} +2 -2
- package/dist/{ast-CAOxvn9t.js → ast-BhvgF264.js} +1 -1
- package/dist/better-supabase/index.js +2 -2
- package/dist/{bsb-access-tags-BfKzb3sw.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-BGWdTAHq.js → budgets-6cfA6Ibw.js} +1 -1
- package/dist/{casbin-Bp8ajVRK.js → casbin-BthXLWZo.js} +1 -1
- package/dist/{casbin-DAHhk83J.js → casbin-DilG0fwi.js} +1 -1
- 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/claims-size-C0kHWqou.js +1 -0
- package/dist/{claims-size-ZiUJBn0r.js → claims-size-Dxm9zWw5.js} +2 -2
- package/dist/cli/bin.js +1 -1
- package/dist/cli/generate/watch-worker.js +2 -2
- package/dist/cli/index.js +2 -2
- 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-DnsG5KF6.js → cloud-0zu4L55w.js} +2 -2
- package/dist/{codemod-BpFi3dGX.js → codemod-CtF7Vk_T.js} +6 -6
- package/dist/{codemod-DdSdwmq4.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-5QQLSNRY.js → compile-CeaX5VD-.js} +7 -7
- package/dist/{completion-j34Zp_y7.js → completion-Cyp3kn5b.js} +1 -1
- package/dist/{config-Dan6vcvj.js → config-C1lTq4gJ.js} +3 -3
- package/dist/{config-DoywTd1z.js → config-CNloPiIn.js} +1 -1
- package/dist/{config-paths-CQvGng3k.js → config-paths-Cg3IXh9T.js} +3 -3
- package/dist/{config-report-BO_DLUaK.js → config-report-i9ujoKAl.js} +4 -4
- package/dist/{context-Dew6yQqT.js → context-BKZmdYRf.js} +1 -1
- package/dist/{custom-role-rebuild-BwM6hBqt.js → custom-role-rebuild-DzbBD1cq.js} +5 -5
- package/dist/{diff-p217YnI5.js → diff-Bv-oDvZq.js} +1 -1
- package/dist/{diff-CcbTG1G4.js → diff-YsQOcb9N.js} +2 -2
- package/dist/{doctor-cPl8X1Ef.js → doctor-BuPSrNmh.js} +58 -45
- package/dist/{doctor-jVVYFNCd.js → doctor-Mgbj6UO0.js} +2 -2
- package/dist/{edits-CqU8s2GC.js → edits-Ckbit4uD.js} +1 -1
- package/dist/eve/index.d.ts +50 -1
- package/dist/eve/index.js +37 -1
- package/dist/{execute-hsLYXuwL.js → execute-D6FFwdwW.js} +5 -5
- package/dist/{explain-BHSgFpfd.js → explain-CPYRj0qn.js} +1 -1
- package/dist/{explain-DVv1Wbay.js → explain-CvCujO8Q.js} +2 -2
- package/dist/{fields-CKX-qjWb.js → fields-DWAwA8vX.js} +3 -3
- package/dist/{fixtures-3aUUP6Nx.js → fixtures-B29C2DGA.js} +1 -1
- package/dist/{gen-BZ-03GIG.js → gen-CZB21YVB.js} +5 -5
- package/dist/{gen-kind-BKSdYxVh.js → gen-kind-2KPUHSs6.js} +1 -1
- package/dist/gen-tTRu05jZ.js +1 -0
- package/dist/{generate-BrSCnqfT.js → generate-DFffYRB7.js} +3 -3
- package/dist/{generate-Ckt9pvJD.js → generate-DePdrbn_.js} +18 -18
- package/dist/{generate-options-DudA1wrX.js → generate-options-Bq5qQ9H7.js} +13 -13
- package/dist/{helper-calls-DN1PJcNY.js → helper-calls-jStpeQ2_.js} +1 -1
- package/dist/{hook-sql-BArV58df.js → hook-sql-Dys1kW5p.js} +13 -13
- package/dist/{import-DvPcOvx4.js → import-BIJM6oAh.js} +1 -1
- package/dist/{import-wBO24zgo.js → import-bTvN77Uj.js} +3 -3
- package/dist/{init-D50xP3eQ.js → init-CfDdG_Fj.js} +3 -3
- package/dist/{init-ukHYcnVG.js → init-yo4GJOkM.js} +1 -1
- package/dist/{inspect-functions-BevsMf1c.js → inspect-functions-Cj7kZDJt.js} +1 -1
- package/dist/{interactive-only-C9NQJXpi.js → interactive-only-ek-Kf0Kq.js} +5 -5
- package/dist/{keys-C9gcgQqN.js → keys-CBblXqiu.js} +1 -1
- package/dist/{load-m7jmit3y.js → load-D03A3tZL.js} +1 -1
- package/dist/load-r-TDUcRq.js +1 -0
- package/dist/{login-CO5_OmE5.js → login-2hkrhPGs.js} +3 -3
- package/dist/{login-CeyA9IUa.js → login-CsTj_pBQ.js} +1 -1
- package/dist/{manager-chain-CFkceFls.js → manager-chain-BbrD-s7u.js} +2 -2
- package/dist/{manifest-DWO7EC1m.js → manifest-CZvwWacN.js} +42 -42
- package/dist/{measure-CJOb4tnF.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-Cjt2WEm3.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/next/plugin.js +1 -1
- package/dist/{openapi-BlkqnsHh.js → openapi-1ZydKQE3.js} +4 -4
- package/dist/{openapi-WZ7O-5gx.js → openapi-CufQiEo8.js} +2 -2
- package/dist/{openapi-document-qHp-hW5Y.js → openapi-document-oqfHlSZt.js} +1 -1
- package/dist/{optional-CaQWp9HA.js → optional-Dw7to-jw.js} +11 -1
- package/dist/{output-C3gBd5Yp.js → output-yUW7fcAk.js} +1 -1
- package/dist/{ownership-BGAqnS59.js → ownership-Bx_s_E8i.js} +7 -7
- package/dist/{pipeline-BXsElIBt.js → pipeline-BTsmCn1p.js} +2 -2
- package/dist/{policy-BOXVx6pf.js → policy-CXAhfYIt.js} +2 -2
- package/dist/{policy-bundle-BbXW3vec.js → policy-bundle-BZyCcphj.js} +3 -3
- package/dist/{powersync-WHQ4bGgx.js → powersync-C6F2F_VP.js} +1 -1
- package/dist/{powersync-CXTWMf2h.js → powersync-CcXYDuyo.js} +1 -1
- package/dist/{powersync-cShrvGN9.js → powersync-DVUeHJpL.js} +11 -11
- package/dist/{program-CvarkLMS.js → program-C2fbc9NO.js} +2 -2
- package/dist/{prune-config-CdcEIILi.js → prune-config-CPvDryuI.js} +10 -10
- package/dist/{pull-b_1Jv1XY.js → pull-CEv7O_zQ.js} +1 -1
- package/dist/pull-DeXUmRKY.js +1 -0
- package/dist/{push-Dl7o5gU_.js → push-Dq9qatTg.js} +2 -2
- package/dist/{quote-LNaBdCGA.js → quote-BX3DDoTX.js} +1 -1
- package/dist/{rbac-BlVLEzQC.js → rbac-COexzCC9.js} +5 -5
- package/dist/{rename-B61GbsZQ.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/{resolve-config-Cu_mE2wt.js → resolve-config-LiLfxe8X.js} +1 -1
- package/dist/{resolve-names-D9S1ytiK.js → resolve-names-ybewcnpW.js} +7 -7
- package/dist/{resolver-CDJq6Q7f.js → resolver-CkK3cvQc.js} +1 -1
- package/dist/{rls-DUrkfLte.js → rls-C-UfcYPG.js} +5 -5
- package/dist/{rls-BKoLx_wE.js → rls-CTWb0XEV.js} +13 -13
- package/dist/{rls-files-CXNRzrb-.js → rls-files-DFUG6y5D.js} +1 -1
- package/dist/{roles-BeNEhv7Q.js → roles-MVZd_RrF.js} +1 -1
- package/dist/{run-DC-N-B56.js → run-B9MRT-5k.js} +3 -3
- package/dist/run-me1Fi6eQ.js +1 -0
- package/dist/{scan-DodOeypJ.js → scan-BoHmvDOe.js} +1 -1
- package/dist/{schema-owUQ1gtu.js → schema-Bk0R_6ul.js} +1 -1
- package/dist/{schema-tables-Ba9LE_XB.js → schema-tables-CqEHokUT.js} +2 -2
- package/dist/{shared-DnVY767H.js → shared-BRLAQqj4.js} +1 -1
- package/dist/{size-DNSNqUda.js → size-CQkUXcPF.js} +2 -2
- package/dist/{skills-s2aKsx2b.js → skills-BIGdhR5i.js} +1 -1
- package/dist/{skills-CCpuGcKP.js → skills-DiMXWCQY.js} +1 -1
- package/dist/{sources-C6Id63F8.js → sources-DNVEyJxb.js} +10 -2
- package/dist/{subject-B7p94Y0s.js → subject-CMkc28eP.js} +1 -1
- package/dist/supabase/index.js +3 -3
- package/dist/{supabase-BTQJN5xy.js → supabase-BBEop7q7.js} +2 -2
- package/dist/{supabase-hook-Q7W7FeMZ.js → supabase-hook-C3q-XEnu.js} +8 -8
- package/dist/supabase-hook-DLnH3_5Z.js +2 -0
- package/dist/{supabase-schemas-DsIQxBsk.js → supabase-schemas-RPYfnE6O.js} +2 -2
- package/dist/{supabase-DayxaRcg.js → supabase-zRUmN_PE.js} +2 -2
- package/dist/{table-reads-BnUbRW9A.js → table-reads-CegjCVHG.js} +1 -1
- package/dist/{table-reads-BqTGNTSZ.js → table-reads-DpncF1F-.js} +3 -3
- package/dist/{tables-CKtoAAm5.js → tables-Dr4BUH9i.js} +11 -7
- package/dist/{tenant-check-cX7MSxRQ.js → tenant-check-C5DAstGo.js} +3 -3
- package/dist/unplugin/index.js +1 -1
- package/dist/{usage-Ct-_O647.js → usage-D5Rin-a_.js} +1 -1
- package/dist/usage-D7eCW8yi.js +1 -0
- package/dist/{usage-C_gw6Dsh.js → usage-DDr-iwHr.js} +6 -6
- package/dist/{verify-BHM21t2P.js → verify-Df9u1-v5.js} +11 -11
- package/dist/{watch-BFDMb5N4.js → watch-BuQhtt25.js} +2 -2
- package/dist/{watch-DEnagZ5d.js → watch-DEPXy-r0.js} +2 -2
- package/dist/watch-wQLoPqC-.js +1 -0
- package/package.json +2 -2
- package/skills/permdock-agents/references/runtimes.md +1 -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/gen-BHsow3sw.js +0 -1
- package/dist/load-BCABUQZi.js +0 -1
- package/dist/pull-DTiAI52h.js +0 -1
- package/dist/run-BR0E2gC_.js +0 -1
- package/dist/supabase-hook-D6qeBhbR.js +0 -2
- package/dist/usage-CRHxOpvu.js +0 -1
- package/dist/watch-5WP3ZCcR.js +0 -1
|
@@ -1,52 +1,53 @@
|
|
|
1
1
|
import { c as rootScope, d as scopeList, o as normalizeMemberships, s as resolveScope } from "./scopes-B-KX9EI8.js";
|
|
2
2
|
import { r as supabaseTenantClaim } from "./budget-BH81q2cj.js";
|
|
3
|
-
import { r as runCollect } from "./collect-
|
|
3
|
+
import { r as runCollect } from "./collect-BqaPdsk1.js";
|
|
4
4
|
import { t as didYouMean } from "./args-BSpXxMnb.js";
|
|
5
|
-
import { t as DOCS_BASE } from "./manifest-
|
|
6
|
-
import { o as nonEmptyOr, r as findingOf } from "./output-
|
|
5
|
+
import { t as DOCS_BASE } from "./manifest-CZvwWacN.js";
|
|
6
|
+
import { o as nonEmptyOr, r as findingOf } from "./output-yUW7fcAk.js";
|
|
7
7
|
import { t as createStyle } from "./style-CQDaLJtP.js";
|
|
8
8
|
import { i as DOCTOR_REPORT_SCHEMA } from "./version-D-jWyJb9.js";
|
|
9
9
|
import { a as rel, n as doctorSrcPath, o as sqlFiles$1, r as listSourceFiles } from "./files-DAR51W3J.js";
|
|
10
10
|
import { r as pgConnector } from "./pg-DmS5ITHu.js";
|
|
11
11
|
import { a as describeError, n as CliError } from "./errors-DgLOqc6j.js";
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import { i as
|
|
15
|
-
import { i as
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import { i as
|
|
12
|
+
import { r as manifestTableReads, s as sharedFunctionsOf, t as committedManifest } from "./table-reads-DpncF1F-.js";
|
|
13
|
+
import { S as restatedFacts, _ as workspaceDirs, b as readJson, d as betterSupabaseAuthzVersions, f as betterSupabaseConfig, g as betterSupabaseTenantClaim, h as betterSupabaseInstalled, m as betterSupabaseDefaults, o as readParsedConfig, p as betterSupabaseConfigPath, t as configFileIn, u as BETTER_SUPABASE_AUTHZ_TOPIC, v as filesOf, x as membershipDisagreements, y as nodeFiles } from "./config-C1lTq4gJ.js";
|
|
14
|
+
import { i as withSchemaDefaults, n as schemaDefaults, r as schemaTables } from "./schema-tables-CqEHokUT.js";
|
|
15
|
+
import { a as loadModule, i as loadConfiguredPolicy, n as asPolicy, s as pickNamed } from "./load-D03A3tZL.js";
|
|
16
|
+
import { i as runSkillsInstall } from "./skills-DiMXWCQY.js";
|
|
17
|
+
import { a as pd074, c as readSupabaseConfig, i as pd045, l as supabaseConfig, n as resolveSchemas, o as pd127, s as pd136, u as supabaseConfigName } from "./supabase-schemas-RPYfnE6O.js";
|
|
18
|
+
import { f as attrsPlan, i as supabaseHookManifest, n as hooklessDatabase, r as supabaseDatabaseManifest } from "./hook-sql-Dys1kW5p.js";
|
|
19
|
+
import { i as pd039, t as hookOut } from "./supabase-hook-C3q-XEnu.js";
|
|
19
20
|
import { t as parseCatalog } from "./parse-CUqZ_lLC.js";
|
|
20
21
|
import { t as catalogPath } from "./catalog-path-bG0XxHMu.js";
|
|
21
22
|
import { n as bsbActions, t as answerOf } from "./bsb-actions-DcDxQ_Ku.js";
|
|
22
23
|
import { c as outFiles } from "./output-files-8lfALMSU.js";
|
|
23
|
-
import { a as guardedTables, r as unsatisfiedKinds, t as ownershipRules } from "./ownership-
|
|
24
|
+
import { a as guardedTables, r as unsatisfiedKinds, t as ownershipRules } from "./ownership-Bx_s_E8i.js";
|
|
24
25
|
import { n as MIGRATION_DIRS, t as DEFAULT_SENSITIVE_ACTIONS } from "./constants-PCJiir_3.js";
|
|
25
26
|
import { n as membershipColumns, r as tableKey } from "./deciding-columns-DBZsrpdD.js";
|
|
26
27
|
import { a as parseSqlFile, c as readPolicy$1, d as sqlCalls, f as stringValues, h as sqlStatements, l as readRelation, o as parseSqlLenient, p as group, r as functionArgTypes, s as parseSqlStatements, t as SqlSyntaxError } from "./ast-Dnm2TOHN.js";
|
|
27
28
|
import { t as applyFiles } from "./files-DuV7wRim.js";
|
|
28
|
-
import { o as splitIgnored } from "./verify-
|
|
29
|
+
import { o as splitIgnored } from "./verify-Df9u1-v5.js";
|
|
29
30
|
import { a as updatedBaseline, i as readBaseline, n as baselineText, t as applyBaseline } from "./baseline-file-BQoki1O_.js";
|
|
30
31
|
import { n as activeTenantMismatch, t as authorizationProvider } from "./provider-DRsBw6My.js";
|
|
31
32
|
import { r as isRecord } from "./compact-C4LFuqbW.js";
|
|
32
33
|
import "./authz-topic-D8x24Jv-.js";
|
|
33
|
-
import { n as activeSource } from "./memberships-
|
|
34
|
-
import { n as budgetBreaches, r as snapshotProbeOptions, t as breachText } from "./budgets-
|
|
35
|
-
import { a as nameOf, i as lineIndex, o as nodes, r as child, u as walk } from "./ast-
|
|
36
|
-
import {
|
|
34
|
+
import { n as activeSource } from "./memberships-DaKwjhc5.js";
|
|
35
|
+
import { n as budgetBreaches, r as snapshotProbeOptions, t as breachText } from "./budgets-6cfA6Ibw.js";
|
|
36
|
+
import { a as nameOf, i as lineIndex, o as nodes, r as child, u as walk } from "./ast-BhvgF264.js";
|
|
37
|
+
import { i as parseTree, t as createVisitor } from "./optional-Dw7to-jw.js";
|
|
37
38
|
import { t as canonicalJson } from "./canonical-json-BibZkXtE.js";
|
|
38
39
|
import { c as jsonSchemaOf, i as catalogOAuthScopes } from "./catalog-doc-BX97oFAn.js";
|
|
39
|
-
import { a as pd015, i as pd014, n as ADAPTER_SPECIFIERS, o as runtimeSpecifiers, r as pd001, t as runUsage } from "./usage-
|
|
40
|
+
import { a as pd015, i as pd014, n as ADAPTER_SPECIFIERS, o as runtimeSpecifiers, r as pd001, t as runUsage } from "./usage-DDr-iwHr.js";
|
|
40
41
|
import { c as listPermissions, h as formerKeys } from "./permission-registry-DstT40VS.js";
|
|
41
|
-
import { t as resolveNames } from "./resolve-names-
|
|
42
|
+
import { t as resolveNames } from "./resolve-names-ybewcnpW.js";
|
|
42
43
|
import "./markers-C-kThnKN.js";
|
|
43
44
|
import { i as qualifySqlTable, s as quoteSqlLiteral } from "./sql-T4GaBh9X.js";
|
|
44
45
|
import { s as parseCredential } from "./credential-D9in5keC.js";
|
|
45
46
|
import { u as separationConflicts } from "./policy-CZBJDcTx.js";
|
|
46
47
|
import { O as validateCustomRole } from "./evaluate-DNz6wMYv.js";
|
|
47
|
-
import { d as keptKeys, r as PERMDOCK_SCHEMA } from "./sources-
|
|
48
|
-
import { a as quoteIdent } from "./quote-
|
|
49
|
-
import { t as configProperty } from "./config-paths-
|
|
48
|
+
import { d as keptKeys, r as PERMDOCK_SCHEMA } from "./sources-DNVEyJxb.js";
|
|
49
|
+
import { a as quoteIdent } from "./quote-BX3DDoTX.js";
|
|
50
|
+
import { t as configProperty } from "./config-paths-Cg3IXh9T.js";
|
|
50
51
|
import { o as hasConditionOp, u as isSqlFunctionField } from "./refs-Cix9Zjis.js";
|
|
51
52
|
import { o as flattenGrantee } from "./grantee-BSCdpIF3.js";
|
|
52
53
|
import { u as isPrincipalRelation } from "./resource-relations-Ck5sjYQR.js";
|
|
@@ -54,31 +55,30 @@ import { t as operationCoverage } from "./coverage-C3jVYC9Y.js";
|
|
|
54
55
|
import { a as snapshotSize, r as mostPrivilegedRole, t as SNAPSHOT_BUDGET_BYTES } from "./snapshot-size-1zICkeFb.js";
|
|
55
56
|
import { a as taggedPolicyId, o as taggedPolicyIds } from "./bsb-access-Bcw6GrQm.js";
|
|
56
57
|
import { t as membershipSourcesOf } from "./sources-BbSUNmFX.js";
|
|
57
|
-
import { a as ownedObjects, i as inReservedDir, o as shownKey, r as generatedByPermdock, s as withoutOwned, t as policyModel } from "./model-
|
|
58
|
-
import { a as pd114, i as pd110, r as pd109 } from "./claims-size-
|
|
58
|
+
import { a as ownedObjects, i as inReservedDir, o as shownKey, r as generatedByPermdock, s as withoutOwned, t as policyModel } from "./model-BfhDMEDf.js";
|
|
59
|
+
import { a as pd114, i as pd110, r as pd109 } from "./claims-size-Dxm9zWw5.js";
|
|
59
60
|
import { t as importFromApp } from "./app-peer-BnMh5lqz.js";
|
|
60
|
-
import { c as rlsReport, o as policiesFor } from "./report-
|
|
61
|
+
import { c as rlsReport, o as policiesFor } from "./report-B7UuE4dW.js";
|
|
61
62
|
import { a as scopeMembershipTable } from "./compile-BUKXrueE.js";
|
|
62
|
-
import { a as powersyncOut, c as streamOf, i as powersyncFiles, n as staleFiles, o as roleSources, r as publicationPath, s as scopeSourcesOf } from "./powersync-
|
|
63
|
-
import { t as parseProgram } from "./program-
|
|
64
|
-
import { t as FIELD_VIEWS } from "./fields-
|
|
65
|
-
import { n as restatedDefaults } from "./resolve-config-
|
|
63
|
+
import { a as powersyncOut, c as streamOf, i as powersyncFiles, n as staleFiles, o as roleSources, r as publicationPath, s as scopeSourcesOf } from "./powersync-DVUeHJpL.js";
|
|
64
|
+
import { t as parseProgram } from "./program-C2fbc9NO.js";
|
|
65
|
+
import { t as FIELD_VIEWS } from "./fields-DWAwA8vX.js";
|
|
66
|
+
import { n as restatedDefaults } from "./resolve-config-LiLfxe8X.js";
|
|
66
67
|
import { n as policyRowConditionKeys } from "./row-conditions-BjARoFLU.js";
|
|
67
|
-
import { X as policyBundle, et as graphPlan, i as tableNames, r as tableNameOf } from "./tables-
|
|
68
|
+
import { X as policyBundle, et as graphPlan, i as tableNames, r as tableNameOf } from "./tables-Dr4BUH9i.js";
|
|
68
69
|
import { n as byKey } from "./compare-8SNJN-9U.js";
|
|
69
|
-
import { a as tableFor, n as commandFor, o as unmappedActions, r as compileGrants, t as INFERRED_VERBS } from "./compile-
|
|
70
|
-
import { p as contextRefs } from "./rbac-
|
|
71
|
-
import { l as rowConditionMessage, r as ROW_CONDITION_FIX, s as helperTablePolicies } from "./helper-calls-
|
|
72
|
-
import { i as graphSqlName } from "./names-
|
|
73
|
-
import { t as CUSTOM_ROLES } from "./shared-
|
|
70
|
+
import { a as tableFor, n as commandFor, o as unmappedActions, r as compileGrants, t as INFERRED_VERBS } from "./compile-CeaX5VD-.js";
|
|
71
|
+
import { p as contextRefs } from "./rbac-COexzCC9.js";
|
|
72
|
+
import { l as rowConditionMessage, r as ROW_CONDITION_FIX, s as helperTablePolicies } from "./helper-calls-jStpeQ2_.js";
|
|
73
|
+
import { i as graphSqlName } from "./names-zCkaCepO.js";
|
|
74
|
+
import { t as CUSTOM_ROLES } from "./shared-BRLAQqj4.js";
|
|
74
75
|
import { n as isSeeds } from "./seeds-Bs44UDS3.js";
|
|
75
76
|
import { r as FIXTURES_PATH, s as seedPathsLine } from "./seed-sql-CjF7u0aX.js";
|
|
76
|
-
import { i as buildContext, n as isRefusal, o as inheritTargets, t as generateOptions } from "./generate-options-
|
|
77
|
-
import { n as propertyKey } from "./edits-
|
|
77
|
+
import { i as buildContext, n as isRefusal, o as inheritTargets, t as generateOptions } from "./generate-options-Bq5qQ9H7.js";
|
|
78
|
+
import { n as propertyKey } from "./edits-Ckbit4uD.js";
|
|
78
79
|
import { n as legacyHelperNames, r as retirePlan, t as legacyHelperCalls } from "./retire-FN4aY6-n.js";
|
|
79
80
|
import { t as supautilsRejections } from "./supautils-ym4X20ig.js";
|
|
80
81
|
import { t as MANIFEST_FILE } from "./manifest-json-DMaBWmcG.js";
|
|
81
|
-
import { r as manifestTableReads, s as sharedFunctionsOf, t as committedManifest } from "./table-reads-BqTGNTSZ.js";
|
|
82
82
|
import { isDeepStrictEqual } from "node:util";
|
|
83
83
|
import { readFileSync } from "node:fs";
|
|
84
84
|
import { dirname, join, resolve } from "node:path";
|
|
@@ -91,6 +91,8 @@ function loadProject(input) {
|
|
|
91
91
|
let sources;
|
|
92
92
|
let policyLoad;
|
|
93
93
|
let collected;
|
|
94
|
+
let tables;
|
|
95
|
+
let tableReads;
|
|
94
96
|
const loadPolicy = () => {
|
|
95
97
|
policyLoad ??= readPolicy(cwd, config.policy);
|
|
96
98
|
return policyLoad;
|
|
@@ -127,6 +129,17 @@ function loadProject(input) {
|
|
|
127
129
|
loadPolicy: policy
|
|
128
130
|
});
|
|
129
131
|
return collected;
|
|
132
|
+
},
|
|
133
|
+
schemaTables: () => {
|
|
134
|
+
tables ??= schemaTables(cwd);
|
|
135
|
+
return tables;
|
|
136
|
+
},
|
|
137
|
+
manifestTableReads: () => {
|
|
138
|
+
if (tableReads === void 0) {
|
|
139
|
+
const manifest = committedManifest(cwd);
|
|
140
|
+
tableReads = manifest === void 0 ? Promise.resolve([]) : manifestTableReads(cwd, config, manifest);
|
|
141
|
+
}
|
|
142
|
+
return tableReads;
|
|
130
143
|
}
|
|
131
144
|
};
|
|
132
145
|
}
|
|
@@ -566,7 +579,7 @@ async function providerOf(input) {
|
|
|
566
579
|
const path = catalogPath(input.config, input.cwd);
|
|
567
580
|
try {
|
|
568
581
|
const scopes = scopeList(policy.scopes);
|
|
569
|
-
const config = await withSchemaDefaults(input.cwd, input.config, policy);
|
|
582
|
+
const config = await withSchemaDefaults(input.cwd, input.config, policy, input.schemaTables?.());
|
|
570
583
|
const manifest = hooklessDatabase(input.config) ? supabaseDatabaseManifest(scopes, config, {}, policy) : supabaseHookManifest(scopes, config, {}, policy);
|
|
571
584
|
return authorizationProvider({
|
|
572
585
|
manifest,
|
|
@@ -714,7 +727,7 @@ function jsxAttribute(node) {
|
|
|
714
727
|
};
|
|
715
728
|
}
|
|
716
729
|
function passedBundles(source) {
|
|
717
|
-
const parsed =
|
|
730
|
+
const parsed = parseTree(source.file, source.text);
|
|
718
731
|
if (parsed.errors.some((error) => {
|
|
719
732
|
return error.severity === "Error";
|
|
720
733
|
})) return [];
|
|
@@ -1723,7 +1736,7 @@ function isPermDockSpecifier(value) {
|
|
|
1723
1736
|
* each builds the object once.
|
|
1724
1737
|
*/
|
|
1725
1738
|
function callsInFunctions(source, cacheHelpers) {
|
|
1726
|
-
const { program } =
|
|
1739
|
+
const { program } = parseTree(source.file, source.text);
|
|
1727
1740
|
const names = /* @__PURE__ */ new Map();
|
|
1728
1741
|
const namespaces = /* @__PURE__ */ new Set();
|
|
1729
1742
|
const lazy = [];
|
|
@@ -3525,7 +3538,7 @@ const OWN_OPTIONS = /* @__PURE__ */ new Set([
|
|
|
3525
3538
|
]);
|
|
3526
3539
|
const BUILDERS = /* @__PURE__ */ new Set(["createPermDock", "getPermDock"]);
|
|
3527
3540
|
function sitesOf(source) {
|
|
3528
|
-
const parsed =
|
|
3541
|
+
const parsed = parseTree(source.file, source.text);
|
|
3529
3542
|
if (parsed.errors.some((error) => {
|
|
3530
3543
|
return error.severity === "Error";
|
|
3531
3544
|
})) return {
|
|
@@ -4064,7 +4077,7 @@ async function pd075(input) {
|
|
|
4064
4077
|
*/
|
|
4065
4078
|
async function pd134(input) {
|
|
4066
4079
|
if (input.config.rls === void 0) return [];
|
|
4067
|
-
const tables = await schemaTables(input.cwd);
|
|
4080
|
+
const tables = await (input.schemaTables?.() ?? schemaTables(input.cwd));
|
|
4068
4081
|
if (tables.size === 0) return [];
|
|
4069
4082
|
const policy = await policyOf(input);
|
|
4070
4083
|
if (policy === void 0) return [];
|
|
@@ -5372,7 +5385,7 @@ async function pd128(input) {
|
|
|
5372
5385
|
const manifest = committedManifest(input.cwd);
|
|
5373
5386
|
const recorded = manifest?.rls.tableReads;
|
|
5374
5387
|
if (manifest === void 0 || recorded === void 0) return [];
|
|
5375
|
-
const current = await manifestTableReads(input.cwd, input.config, manifest);
|
|
5388
|
+
const current = await (input.manifestTableReads?.() ?? manifestTableReads(input.cwd, input.config, manifest));
|
|
5376
5389
|
const now = new Map(current.map((read) => [read.table, read]));
|
|
5377
5390
|
return recorded.flatMap((read) => {
|
|
5378
5391
|
if (read.share !== "tenant") return [];
|
|
@@ -5409,7 +5422,7 @@ async function pd137(input) {
|
|
|
5409
5422
|
});
|
|
5410
5423
|
const recorded = manifest.rls.sharedFunctions;
|
|
5411
5424
|
if (recorded === void 0 || recorded.length === 0) return twoArgument;
|
|
5412
|
-
const reads = await manifestTableReads(input.cwd, input.config, manifest);
|
|
5425
|
+
const reads = await (input.manifestTableReads?.() ?? manifestTableReads(input.cwd, input.config, manifest));
|
|
5413
5426
|
const now = new Map(reads.map((read) => [read.table, read]));
|
|
5414
5427
|
const valid = new Set((await sharedFunctionsOf({
|
|
5415
5428
|
cwd: input.cwd,
|
|
@@ -6313,7 +6326,7 @@ async function supabaseSetup(input) {
|
|
|
6313
6326
|
if (policy === void 0) return [];
|
|
6314
6327
|
let manifest;
|
|
6315
6328
|
try {
|
|
6316
|
-
manifest = supabaseHookManifest(scopeList(policy.scopes), await withSchemaDefaults(input.cwd, input.config, policy), { out: hookOut(input.cwd, input.config) }, policy);
|
|
6329
|
+
manifest = supabaseHookManifest(scopeList(policy.scopes), await withSchemaDefaults(input.cwd, input.config, policy, input.schemaTables()), { out: hookOut(input.cwd, input.config) }, policy);
|
|
6317
6330
|
} catch {
|
|
6318
6331
|
return [];
|
|
6319
6332
|
}
|
|
@@ -11,7 +11,7 @@ const doctor = defineLeaf({
|
|
|
11
11
|
description: "Check codes or groups to run",
|
|
12
12
|
valueHint: "code",
|
|
13
13
|
async complete() {
|
|
14
|
-
const { DOCTOR_CHECKS } = await import("./doctor-
|
|
14
|
+
const { DOCTOR_CHECKS } = await import("./doctor-BuPSrNmh.js");
|
|
15
15
|
return [.../* @__PURE__ */ new Set([...DOCTOR_CHECKS.map(({ code }) => code), ...DOCTOR_CHECKS.flatMap(({ groups }) => groups)])];
|
|
16
16
|
}
|
|
17
17
|
},
|
|
@@ -46,7 +46,7 @@ const doctor = defineLeaf({
|
|
|
46
46
|
if (answer === void 0) return CANCELLED;
|
|
47
47
|
fix = answer;
|
|
48
48
|
}
|
|
49
|
-
return (await import("./doctor-
|
|
49
|
+
return (await import("./doctor-BuPSrNmh.js")).runDoctor({
|
|
50
50
|
cwd: ctx.cwd,
|
|
51
51
|
config: ctx.config,
|
|
52
52
|
only: flags.only,
|
package/dist/eve/index.d.ts
CHANGED
|
@@ -65,6 +65,49 @@ type EvePermDockOptions<TUser = unknown> = Omit<AgentAdapterOptions<EveContext,
|
|
|
65
65
|
readonly subject?: (context: EveContext) => TUser | Promise<TUser>;
|
|
66
66
|
readonly approvers?: EveApprovers;
|
|
67
67
|
};
|
|
68
|
+
/** Structural `SessionAuthContext` of the session that is subscribed. */
|
|
69
|
+
type EveSubscriber = {
|
|
70
|
+
readonly auth: EvePrincipal | null;
|
|
71
|
+
readonly sessionId: string;
|
|
72
|
+
};
|
|
73
|
+
/** What a session asked `eve__subscribe` for, as `onSubscribe` sees it. */
|
|
74
|
+
type EveSubscriptionRequest = {
|
|
75
|
+
readonly channelName: string;
|
|
76
|
+
readonly event: string;
|
|
77
|
+
readonly input: Readonly<Record<string, unknown>>;
|
|
78
|
+
};
|
|
79
|
+
/** One delivery, as eve's `onEvent` sees it. */
|
|
80
|
+
type EveChannelEvent = {
|
|
81
|
+
readonly id: string;
|
|
82
|
+
readonly name: string;
|
|
83
|
+
readonly data: Readonly<Record<string, unknown>>;
|
|
84
|
+
};
|
|
85
|
+
/** The subscription a delivery belongs to. */
|
|
86
|
+
type EveSubscription = EveSubscriptionRequest & {
|
|
87
|
+
readonly id: string;
|
|
88
|
+
};
|
|
89
|
+
type EveSubscriptionOptions = {
|
|
90
|
+
/** Loads the row the permission is checked on from the subscription's `input`. */
|
|
91
|
+
readonly data?: (input: Readonly<Record<string, unknown>>) => unknown;
|
|
92
|
+
/**
|
|
93
|
+
* Formats a delivery for a subscriber that still holds the grant; `null`
|
|
94
|
+
* drops it.
|
|
95
|
+
*/
|
|
96
|
+
readonly onEvent: (context: EveSubscriber & {
|
|
97
|
+
readonly event: EveChannelEvent;
|
|
98
|
+
readonly subscription: EveSubscription;
|
|
99
|
+
}) => string | null | Promise<string | null>;
|
|
100
|
+
};
|
|
101
|
+
/** `onSubscribe` and `onEvent` for a channel's `experimental.subscriptions`. */
|
|
102
|
+
type EveSubscriptionPair = {
|
|
103
|
+
readonly onSubscribe: (context: EveSubscriber & {
|
|
104
|
+
readonly subscription: EveSubscriptionRequest;
|
|
105
|
+
}) => Promise<void>;
|
|
106
|
+
readonly onEvent: (context: EveSubscriber & {
|
|
107
|
+
readonly event: EveChannelEvent;
|
|
108
|
+
readonly subscription: EveSubscription;
|
|
109
|
+
}) => Promise<string | null>;
|
|
110
|
+
};
|
|
68
111
|
type EveRequestResult = "not-applicable" | "user-approval" | {
|
|
69
112
|
readonly type: "denied";
|
|
70
113
|
readonly reason: string;
|
|
@@ -83,6 +126,12 @@ type EveApprovalPair = {
|
|
|
83
126
|
type EvePermDock<V extends PolicyVocabulary = PolicyVocabulary> = AgentPermDock<EveContext, V> & {
|
|
84
127
|
readonly approval: EveApprovalPair;
|
|
85
128
|
readonly approvalFor: (permission: Permission, data?: (input: unknown) => unknown) => EveApprovalPair;
|
|
129
|
+
/**
|
|
130
|
+
* Gates an eve channel's subscriptions on `permission`: `onSubscribe`
|
|
131
|
+
* throws unless the subscriber is granted, and `onEvent` drops a delivery
|
|
132
|
+
* once the grant is gone. eve captures `auth` when the session subscribes.
|
|
133
|
+
*/
|
|
134
|
+
readonly subscriptionFor: (permission: Permission, options: EveSubscriptionOptions) => EveSubscriptionPair;
|
|
86
135
|
readonly getPermDock: (ctx: EveContext) => Promise<PermDock<V>>;
|
|
87
136
|
};
|
|
88
137
|
export declare function rolesOf(principal: EvePrincipal | null | undefined): string[];
|
|
@@ -93,4 +142,4 @@ export declare function rolesOf(principal: EvePrincipal | null | undefined): str
|
|
|
93
142
|
export declare function subjectFromEve(context: EveContext): unknown;
|
|
94
143
|
export declare function actorFromEve(_context: EveContext): unknown;
|
|
95
144
|
export declare function createPermDock<TUser, TPrincipal extends Principal = Principal, V extends PolicyVocabulary = PolicyVocabulary>(policy: Policy<TUser, TPrincipal, V>, given: EvePermDockOptions<TUser>): EvePermDock<V>;
|
|
96
|
-
export type { EveApprovalContext, EveApprovalPair, EveApprovers, EveContext, EvePermDock, EvePermDockOptions, EvePrincipal, EveRequestResult, EveResponseContext, EveResponseResult };
|
|
145
|
+
export type { EveApprovalContext, EveApprovalPair, EveApprovers, EveChannelEvent, EveContext, EvePermDock, EvePermDockOptions, EvePrincipal, EveRequestResult, EveResponseContext, EveResponseResult, EveSubscriber, EveSubscription, EveSubscriptionOptions, EveSubscriptionPair, EveSubscriptionRequest };
|
package/dist/eve/index.js
CHANGED
|
@@ -6,6 +6,8 @@ import { u as withApp } from "../permdock-B0aE5Ime.js";
|
|
|
6
6
|
import { t as compact } from "../compact-C4LFuqbW.js";
|
|
7
7
|
// src/eve/create.ts
|
|
8
8
|
const TOKENS_PER_PROCESS = 1e3;
|
|
9
|
+
/** The tool name a subscription check is recorded and delegated under. */
|
|
10
|
+
const SUBSCRIBE_TOOL = "eve__subscribe";
|
|
9
11
|
function rolesOf(principal) {
|
|
10
12
|
const roles = principal?.attributes?.["roles"];
|
|
11
13
|
if (typeof roles === "string") return [roles];
|
|
@@ -158,10 +160,44 @@ function createPermDock(policy, given) {
|
|
|
158
160
|
});
|
|
159
161
|
return pairFor(() => binding);
|
|
160
162
|
};
|
|
163
|
+
const subscriptionFor = (permission, subscriptionOptions) => {
|
|
164
|
+
const { data } = subscriptionOptions;
|
|
165
|
+
const load = (input) => data?.(input);
|
|
166
|
+
const binding = compact({
|
|
167
|
+
permission,
|
|
168
|
+
data: data === void 0 ? void 0 : load
|
|
169
|
+
});
|
|
170
|
+
const verdictFor = (subscriber, input) => {
|
|
171
|
+
if (subscriber.auth === null) return Promise.resolve({
|
|
172
|
+
outcome: "denied",
|
|
173
|
+
decision: null,
|
|
174
|
+
permission,
|
|
175
|
+
reason: "Denied: the subscribing session has no authenticated caller."
|
|
176
|
+
});
|
|
177
|
+
return kernel.evaluate(binding, SUBSCRIBE_TOOL, input, { session: {
|
|
178
|
+
id: subscriber.sessionId,
|
|
179
|
+
auth: {
|
|
180
|
+
initiator: subscriber.auth,
|
|
181
|
+
current: subscriber.auth
|
|
182
|
+
}
|
|
183
|
+
} }, { denyPending: true });
|
|
184
|
+
};
|
|
185
|
+
return Object.freeze({
|
|
186
|
+
onSubscribe: async (context) => {
|
|
187
|
+
const verdict = await verdictFor(context, context.subscription.input);
|
|
188
|
+
if (verdict.outcome === "granted") return;
|
|
189
|
+
throw new Error(verdict.outcome === "denied" ? verdict.reason : verdict.summary);
|
|
190
|
+
},
|
|
191
|
+
onEvent: async (context) => {
|
|
192
|
+
return (await verdictFor(context, context.subscription.input)).outcome === "granted" ? subscriptionOptions.onEvent(context) : null;
|
|
193
|
+
}
|
|
194
|
+
});
|
|
195
|
+
};
|
|
161
196
|
return Object.freeze({
|
|
162
197
|
...agent,
|
|
163
198
|
approval,
|
|
164
|
-
approvalFor
|
|
199
|
+
approvalFor,
|
|
200
|
+
subscriptionFor
|
|
165
201
|
});
|
|
166
202
|
}
|
|
167
203
|
export { actorFromEve, createPermDock, rolesOf, subjectFromEve };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { n as budgetBreaches, t as breachText } from "./budgets-
|
|
1
|
+
import { n as budgetBreaches, t as breachText } from "./budgets-6cfA6Ibw.js";
|
|
2
2
|
import { a as suggestion } from "./args-BSpXxMnb.js";
|
|
3
3
|
import { n as CliError } from "./errors-DgLOqc6j.js";
|
|
4
|
-
import { r as runGen } from "./gen-
|
|
5
|
-
import { c as requirePolicy } from "./load-
|
|
6
|
-
import { t as projectContext } from "./context-
|
|
7
|
-
import { r as runGenerate } from "./pipeline-
|
|
4
|
+
import { r as runGen } from "./gen-CZB21YVB.js";
|
|
5
|
+
import { c as requirePolicy } from "./load-D03A3tZL.js";
|
|
6
|
+
import { t as projectContext } from "./context-BKZmdYRf.js";
|
|
7
|
+
import { r as runGenerate } from "./pipeline-BTsmCn1p.js";
|
|
8
8
|
import { n as isPermDockPlugin } from "./plugin-MQVfUBUS.js";
|
|
9
9
|
import { relative, resolve } from "node:path";
|
|
10
10
|
import { fileURLToPath } from "node:url";
|
|
@@ -2,7 +2,7 @@ import { n as findPermission } from "./permission-registry-DstT40VS.js";
|
|
|
2
2
|
import { t as getPermDock } from "./permdock-B0aE5Ime.js";
|
|
3
3
|
import { A as memoryCustomRoleSource } from "./src-DUWw9z1D.js";
|
|
4
4
|
import { i as configError } from "./errors-DgLOqc6j.js";
|
|
5
|
-
import { n as fixtureSubject, r as loadFixtures, t as fixtureRow } from "./fixtures-
|
|
5
|
+
import { n as fixtureSubject, r as loadFixtures, t as fixtureRow } from "./fixtures-B29C2DGA.js";
|
|
6
6
|
// src/cli/explain.ts
|
|
7
7
|
function grantOf(grant) {
|
|
8
8
|
return {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as defineLeaf } from "./command-9GAzSI7E.js";
|
|
2
2
|
import { f as usageResult } from "./errors-DgLOqc6j.js";
|
|
3
3
|
import { f as policyFlag, l as given } from "./flags-DQzNPxg1.js";
|
|
4
|
-
import { c as requirePolicy } from "./load-
|
|
4
|
+
import { c as requirePolicy } from "./load-D03A3tZL.js";
|
|
5
5
|
// src/cli/commands/explain.ts
|
|
6
6
|
const explain = defineLeaf({
|
|
7
7
|
positionals: [{
|
|
@@ -19,7 +19,7 @@ const explain = defineLeaf({
|
|
|
19
19
|
},
|
|
20
20
|
async run(ctx, { flags, args }) {
|
|
21
21
|
try {
|
|
22
|
-
const { runExplain } = await import("./explain-
|
|
22
|
+
const { runExplain } = await import("./explain-CPYRj0qn.js");
|
|
23
23
|
const policy = await requirePolicy(ctx.cwd, given(flags.policy) ?? ctx.config.policy, "set policy in permdock.config.ts or pass --policy");
|
|
24
24
|
return await runExplain({
|
|
25
25
|
cwd: ctx.cwd,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { c as jsonSchemaOf } from "./catalog-doc-BX97oFAn.js";
|
|
2
2
|
import { i as configError } from "./errors-DgLOqc6j.js";
|
|
3
|
-
import { a as quoteIdent, i as qualified, o as quoteLiteral, r as helperSchema, s as quoteQualified } from "./quote-
|
|
4
|
-
import { s as signedIn } from "./shared-
|
|
3
|
+
import { a as quoteIdent, i as qualified, o as quoteLiteral, r as helperSchema, s as quoteQualified } from "./quote-BX3DDoTX.js";
|
|
4
|
+
import { s as signedIn } from "./shared-BRLAQqj4.js";
|
|
5
5
|
import { a as sole } from "./compact-C4LFuqbW.js";
|
|
6
|
-
import { u as subjectClaimJsonSql } from "./subject-
|
|
6
|
+
import { u as subjectClaimJsonSql } from "./subject-CMkc28eP.js";
|
|
7
7
|
// src/cli/sql/clauses.ts
|
|
8
8
|
/**
|
|
9
9
|
* True when `sql` is one parenthesised expression, so AND / OR need not wrap it
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as isRecord } from "./compact-C4LFuqbW.js";
|
|
2
2
|
import { i as configError } from "./errors-DgLOqc6j.js";
|
|
3
3
|
import { i as readJsonFile } from "./files-DAR51W3J.js";
|
|
4
|
-
import { a as loadModule, s as pickNamed } from "./load-
|
|
4
|
+
import { a as loadModule, s as pickNamed } from "./load-D03A3tZL.js";
|
|
5
5
|
import { existsSync } from "node:fs";
|
|
6
6
|
import { resolve } from "node:path";
|
|
7
7
|
// src/cli/fixtures.ts
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { p as clientBundle } from "./permdock-B0aE5Ime.js";
|
|
2
|
-
import { t as loadConfiguredOperations } from "./catalog-operations-
|
|
2
|
+
import { t as loadConfiguredOperations } from "./catalog-operations-DsbLxw1f.js";
|
|
3
3
|
import { i as configError, n as CliError } from "./errors-DgLOqc6j.js";
|
|
4
4
|
import { n as fileSummary, r as planFiles } from "./files-DuV7wRim.js";
|
|
5
5
|
import { _ as writeOutputFiles, r as driftOf } from "./output-files-8lfALMSU.js";
|
|
6
6
|
import { t as pluginVersion } from "./version-CU6e2wxV.js";
|
|
7
|
-
import { c as requirePolicy } from "./load-
|
|
8
|
-
import { i as withSchemaDefaults } from "./schema-tables-
|
|
7
|
+
import { c as requirePolicy } from "./load-D03A3tZL.js";
|
|
8
|
+
import { i as withSchemaDefaults } from "./schema-tables-CqEHokUT.js";
|
|
9
9
|
import { t as canonicalJson } from "./canonical-json-BibZkXtE.js";
|
|
10
10
|
import { r as isRecord } from "./compact-C4LFuqbW.js";
|
|
11
11
|
import { t as byCodePoint } from "./compare-dfHDj8kT.js";
|
|
@@ -13,7 +13,7 @@ import { c as listPermissions } from "./permission-registry-DstT40VS.js";
|
|
|
13
13
|
import { d as scopeList } from "./scopes-B-KX9EI8.js";
|
|
14
14
|
import { o as listPlans, s as listRoles } from "./vocabulary-CE2k7s1a.js";
|
|
15
15
|
import { c as jsonSchemaOf } from "./catalog-doc-BX97oFAn.js";
|
|
16
|
-
import { t as resolveNames } from "./resolve-names-
|
|
16
|
+
import { t as resolveNames } from "./resolve-names-ybewcnpW.js";
|
|
17
17
|
import { t as DESCRIBE_TITLES } from "./describe-B7EosIKA.js";
|
|
18
18
|
import { i as schemaExpression } from "./generate-5_kz2309.js";
|
|
19
19
|
import { existsSync, readFileSync } from "node:fs";
|
|
@@ -401,7 +401,7 @@ function modelDigest(model) {
|
|
|
401
401
|
return createHash("sha256").update(canonicalJson(model)).digest("base64url");
|
|
402
402
|
}
|
|
403
403
|
/**
|
|
404
|
-
* `// @generated by permdock generate zod@0.
|
|
404
|
+
* `// @generated by permdock generate zod@0.39.0 from policy.ts sha-256:…; do
|
|
405
405
|
* not edit`.
|
|
406
406
|
*/
|
|
407
407
|
function generatedHeader(kind, info) {
|
|
@@ -47,7 +47,7 @@ function kindPlugin(kind, options = {}) {
|
|
|
47
47
|
}],
|
|
48
48
|
emit: async (_task, model, source) => {
|
|
49
49
|
if (source === void 0) return [];
|
|
50
|
-
const { renderKinds } = await import("./gen-
|
|
50
|
+
const { renderKinds } = await import("./gen-tTRu05jZ.js");
|
|
51
51
|
const files = await renderKinds({
|
|
52
52
|
cwd: source.cwd,
|
|
53
53
|
config: source.config,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { n as renderKinds } from "./gen-CZB21YVB.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { t as defineLeaf } from "./command-9GAzSI7E.js";
|
|
2
2
|
import { n as CliError } from "./errors-DgLOqc6j.js";
|
|
3
3
|
import { c as generateFlags, f as policyFlag, i as dryRunFlag, n as dbUrl, r as dbUrlFlags, t as checkFlag } from "./flags-DQzNPxg1.js";
|
|
4
|
-
import { t as executeGenerate } from "./execute-
|
|
5
|
-
import { n as receiptRows } from "./pipeline-
|
|
4
|
+
import { t as executeGenerate } from "./execute-D6FFwdwW.js";
|
|
5
|
+
import { n as receiptRows } from "./pipeline-BTsmCn1p.js";
|
|
6
6
|
// src/cli/commands/generate.ts
|
|
7
7
|
function concurrencyFlag(value) {
|
|
8
8
|
if (value === void 0 || value === "") return;
|
|
@@ -24,7 +24,7 @@ const generate = defineLeaf({
|
|
|
24
24
|
const db = await dbUrl(ctx, flags);
|
|
25
25
|
const policy = flags.policy !== void 0 && flags.policy !== "" ? flags.policy : ctx.config.policy;
|
|
26
26
|
if (flags.watch) {
|
|
27
|
-
const { watchGenerate } = await import("./watch-
|
|
27
|
+
const { watchGenerate } = await import("./watch-DEPXy-r0.js");
|
|
28
28
|
return watchGenerate(ctx, {
|
|
29
29
|
...policy === void 0 ? {} : { policy },
|
|
30
30
|
only: flags.only,
|
|
@@ -1,38 +1,38 @@
|
|
|
1
1
|
import { c as listPermissions, u as renamedKeys } from "./permission-registry-DstT40VS.js";
|
|
2
2
|
import { n as policyRowConditionKeys, t as grantHasRowConditions } from "./row-conditions-BjARoFLU.js";
|
|
3
3
|
import { a as describeError, i as configError, o as exitCodeOfError } from "./errors-DgLOqc6j.js";
|
|
4
|
-
import { i as withSchemaDefaults } from "./schema-tables-
|
|
4
|
+
import { i as withSchemaDefaults } from "./schema-tables-CqEHokUT.js";
|
|
5
5
|
import { r as isRecord, t as compact } from "./compact-C4LFuqbW.js";
|
|
6
6
|
import { n as supabaseDir } from "./supabase-dir-0lxKbrYu.js";
|
|
7
7
|
import { a as parseSqlFile, f as stringValues, g as statementRanges, l as readRelation, m as splitUndiffed, o as parseSqlLenient, t as SqlSyntaxError } from "./ast-Dnm2TOHN.js";
|
|
8
8
|
import { n as loadBsbSql, r as schemaSqlFiles } from "./bsb-access-Bcw6GrQm.js";
|
|
9
|
-
import { D as seedSql, F as guardAuthAdminGrants, I as unguardAuthAdminGrants, S as accessSql, T as helpersSql, Z as closureBackfillSql, c as permissionHelpersSql, d as permittedByPermissionHelper, i as tableNames, o as PERMISSION_HELPERS, r as tableNameOf, s as checkName, tt as graphSql, u as permissionKeysHelper } from "./tables-
|
|
9
|
+
import { D as seedSql, F as guardAuthAdminGrants, I as unguardAuthAdminGrants, S as accessSql, T as helpersSql, Z as closureBackfillSql, c as permissionHelpersSql, d as permittedByPermissionHelper, i as tableNames, o as PERMISSION_HELPERS, r as tableNameOf, s as checkName, tt as graphSql, u as permissionKeysHelper } from "./tables-Dr4BUH9i.js";
|
|
10
10
|
import { i as qualifySqlTable } from "./sql-T4GaBh9X.js";
|
|
11
|
-
import { a as tableFor, d as pruneIndexTargets, f as readTableIndexFacts, i as inferredCommand, l as indexTargets, r as compileGrants, u as indexesSql } from "./compile-
|
|
12
|
-
import { a as CANDIDATES, c as rowHelpersSql, i as buildContext, l as rowSetSql, n as isRefusal, o as inheritTargets, r as splitsPart, s as levelKeys, t as generateOptions } from "./generate-options-
|
|
11
|
+
import { a as tableFor, d as pruneIndexTargets, f as readTableIndexFacts, i as inferredCommand, l as indexTargets, r as compileGrants, u as indexesSql } from "./compile-CeaX5VD-.js";
|
|
12
|
+
import { a as CANDIDATES, c as rowHelpersSql, i as buildContext, l as rowSetSql, n as isRefusal, o as inheritTargets, r as splitsPart, s as levelKeys, t as generateOptions } from "./generate-options-Bq5qQ9H7.js";
|
|
13
13
|
import { t as policyFromCatalog } from "./policy-from-catalog-hECiBs9M.js";
|
|
14
|
-
import { t as fetchProjectPolicy } from "./pull-
|
|
15
|
-
import { c as requirePolicy } from "./load-
|
|
16
|
-
import { o as nonEmptyOr } from "./output-
|
|
14
|
+
import { t as fetchProjectPolicy } from "./pull-CEv7O_zQ.js";
|
|
15
|
+
import { c as requirePolicy } from "./load-D03A3tZL.js";
|
|
16
|
+
import { o as nonEmptyOr } from "./output-yUW7fcAk.js";
|
|
17
17
|
import { i as INDEXES_MARKER, n as GRANTS_MARKER, o as SEEDS_MARKER, t as BACKFILL_MARKER } from "./markers-C-kThnKN.js";
|
|
18
|
-
import { S as scopeTable, h as memberIdsHelper, i as graphSqlName, r as graphHelper, t as BOOTSTRAP_PERMISSIONS, x as scopeSources, y as permittedIdsHelper } from "./names-
|
|
19
|
-
import { a as quoteIdent, c as quoteTable, i as qualified$1, o as quoteLiteral, s as quoteQualified } from "./quote-
|
|
20
|
-
import { b as idTypeOf, f as subjectIdSql, l as sessionLiveHelperSql, t as SESSION_LIVE_HELPER, u as subjectClaimJsonSql, x as scopeTypeOf } from "./subject-
|
|
21
|
-
import { a as supabaseHookSql, c as asideAuthzReceive, d as declarativeSql, t as grantsLabel, u as approvalsSql } from "./hook-sql-
|
|
22
|
-
import { i as assignmentSql, n as ownershipSql } from "./ownership-
|
|
23
|
-
import { r as rebuildPlan, t as DROPPED_LIST } from "./custom-role-rebuild-
|
|
18
|
+
import { S as scopeTable, h as memberIdsHelper, i as graphSqlName, r as graphHelper, t as BOOTSTRAP_PERMISSIONS, x as scopeSources, y as permittedIdsHelper } from "./names-zCkaCepO.js";
|
|
19
|
+
import { a as quoteIdent, c as quoteTable, i as qualified$1, o as quoteLiteral, s as quoteQualified } from "./quote-BX3DDoTX.js";
|
|
20
|
+
import { b as idTypeOf, f as subjectIdSql, l as sessionLiveHelperSql, t as SESSION_LIVE_HELPER, u as subjectClaimJsonSql, x as scopeTypeOf } from "./subject-CMkc28eP.js";
|
|
21
|
+
import { a as supabaseHookSql, c as asideAuthzReceive, d as declarativeSql, t as grantsLabel, u as approvalsSql } from "./hook-sql-Dys1kW5p.js";
|
|
22
|
+
import { i as assignmentSql, n as ownershipSql } from "./ownership-Bx_s_E8i.js";
|
|
23
|
+
import { r as rebuildPlan, t as DROPPED_LIST } from "./custom-role-rebuild-DzbBD1cq.js";
|
|
24
24
|
import { p as scopeField } from "./tenancy-B5Xxt9Sc.js";
|
|
25
|
-
import { c as breakGlassKey, i as rbacScaffold, l as collectGrants, s as breakGlassHolder } from "./rbac-
|
|
25
|
+
import { c as breakGlassKey, i as rbacScaffold, l as collectGrants, s as breakGlassHolder } from "./rbac-COexzCC9.js";
|
|
26
26
|
import { t as supautilsRejections } from "./supautils-ym4X20ig.js";
|
|
27
|
-
import { a as fieldViewsSql, c as ACTOR_MAY_WRITE, d as assemblePolicies, i as fieldViews, l as actorMayWriteCall, m as readOnlyActorPolicies, n as columnGrantSql, o as rowBranches, p as readOnlyActorKinds, r as columnRevokeSql, u as actorMayWriteSql } from "./fields-
|
|
27
|
+
import { a as fieldViewsSql, c as ACTOR_MAY_WRITE, d as assemblePolicies, i as fieldViews, l as actorMayWriteCall, m as readOnlyActorPolicies, n as columnGrantSql, o as rowBranches, p as readOnlyActorKinds, r as columnRevokeSql, u as actorMayWriteSql } from "./fields-DWAwA8vX.js";
|
|
28
28
|
import { l as isFieldRelation } from "./resource-relations-Ck5sjYQR.js";
|
|
29
29
|
import { c as rootScope } from "./scopes-B-KX9EI8.js";
|
|
30
|
-
import { o as rootName, r as HELPERS, t as CUSTOM_ROLES } from "./shared-
|
|
31
|
-
import { n as permissionHoldersSql } from "./resolve-names-
|
|
30
|
+
import { o as rootName, r as HELPERS, t as CUSTOM_ROLES } from "./shared-BRLAQqj4.js";
|
|
31
|
+
import { n as permissionHoldersSql } from "./resolve-names-ybewcnpW.js";
|
|
32
32
|
import { n as byKey } from "./compare-8SNJN-9U.js";
|
|
33
33
|
import { i as dateAt } from "./time-r0CKBm57.js";
|
|
34
34
|
import { _ as writeOutputFiles, a as isSeedsDirectory, d as pgDeltaPath, g as underSchemaDir, h as serviceRel, l as parseSplit, m as seedsMigration, n as dataMigrationFile, p as seedDeltaNote, r as driftOf, u as partPath } from "./output-files-8lfALMSU.js";
|
|
35
|
-
import { c as readSupabaseConfig, n as resolveSchemas } from "./supabase-schemas-
|
|
35
|
+
import { c as readSupabaseConfig, n as resolveSchemas } from "./supabase-schemas-RPYfnE6O.js";
|
|
36
36
|
import { o as sqlFiles } from "./files-DAR51W3J.js";
|
|
37
37
|
import { n as MIGRATION_DIRS } from "./constants-PCJiir_3.js";
|
|
38
38
|
import { readFileSync } from "node:fs";
|
|
@@ -8,20 +8,20 @@ import "./budget-BH81q2cj.js";
|
|
|
8
8
|
import { i as qualifySqlTable } from "./sql-T4GaBh9X.js";
|
|
9
9
|
import { t as membershipSourcesOf } from "./sources-BbSUNmFX.js";
|
|
10
10
|
import { a as scopeMembershipTable, i as scopeColumn } from "./compile-BUKXrueE.js";
|
|
11
|
-
import "./sources-
|
|
12
|
-
import { a as quoteIdent, c as quoteTable, i as qualified, o as quoteLiteral, s as quoteQualified } from "./quote-
|
|
11
|
+
import "./sources-DNVEyJxb.js";
|
|
12
|
+
import { a as quoteIdent, c as quoteTable, i as qualified, o as quoteLiteral, s as quoteQualified } from "./quote-BX3DDoTX.js";
|
|
13
13
|
import { l as parseSplit } from "./output-files-8lfALMSU.js";
|
|
14
|
-
import { f as orSql, g as branchClauses } from "./fields-
|
|
15
|
-
import { b as idTypeOf, f as subjectIdSql, g as parseMembershipsFlag, n as USER_ID_HELPER, x as scopeTypeOf, y as firstScopeType } from "./subject-
|
|
16
|
-
import { a as customRolesOn, r as HELPERS, s as signedIn, t as CUSTOM_ROLES } from "./shared-
|
|
17
|
-
import { R as raiseSql, a as interactiveOnlyKeys, c as memoUserSql, g as memoHitList, q as checkSuspension, v as memoizedSetofSql, y as memoizes } from "./interactive-only-
|
|
18
|
-
import { i as graphSqlName } from "./names-
|
|
19
|
-
import { $ as graphIdsSql, B as apiKeyClaimSql, E as memoReadsSql, H as apiKeyUnlimitedSql, N as tokenScopesPlan, O as TOKEN_SCOPE_ALLOWS, P as memoReadTriggersSql, Q as closureDepths, R as API_KEY_ALLOWS, U as apiKeysPlan, a as tablelessResources, d as permittedByPermissionHelper, et as graphPlan, i as tableNames, j as tokenScopeUnlimitedSql, k as isTokenScopesSetting, n as resolveVias, o as PERMISSION_HELPERS, t as checkSharedTables } from "./tables-
|
|
20
|
-
import { t as resolveNames } from "./resolve-names-
|
|
21
|
-
import { a as resolveAuthorize, o as assignableRoles, u as roleNames } from "./rbac-
|
|
22
|
-
import { a as tableFor } from "./compile-
|
|
23
|
-
import { r as rebuildPlan, t as DROPPED_LIST } from "./custom-role-rebuild-
|
|
24
|
-
import { r as unsatisfiedKinds, t as ownershipRules } from "./ownership-
|
|
14
|
+
import { f as orSql, g as branchClauses } from "./fields-DWAwA8vX.js";
|
|
15
|
+
import { b as idTypeOf, f as subjectIdSql, g as parseMembershipsFlag, n as USER_ID_HELPER, x as scopeTypeOf, y as firstScopeType } from "./subject-CMkc28eP.js";
|
|
16
|
+
import { a as customRolesOn, r as HELPERS, s as signedIn, t as CUSTOM_ROLES } from "./shared-BRLAQqj4.js";
|
|
17
|
+
import { R as raiseSql, a as interactiveOnlyKeys, c as memoUserSql, g as memoHitList, q as checkSuspension, v as memoizedSetofSql, y as memoizes } from "./interactive-only-ek-Kf0Kq.js";
|
|
18
|
+
import { i as graphSqlName } from "./names-zCkaCepO.js";
|
|
19
|
+
import { $ as graphIdsSql, B as apiKeyClaimSql, E as memoReadsSql, H as apiKeyUnlimitedSql, N as tokenScopesPlan, O as TOKEN_SCOPE_ALLOWS, P as memoReadTriggersSql, Q as closureDepths, R as API_KEY_ALLOWS, U as apiKeysPlan, a as tablelessResources, d as permittedByPermissionHelper, et as graphPlan, i as tableNames, j as tokenScopeUnlimitedSql, k as isTokenScopesSetting, n as resolveVias, o as PERMISSION_HELPERS, t as checkSharedTables } from "./tables-Dr4BUH9i.js";
|
|
20
|
+
import { t as resolveNames } from "./resolve-names-ybewcnpW.js";
|
|
21
|
+
import { a as resolveAuthorize, o as assignableRoles, u as roleNames } from "./rbac-COexzCC9.js";
|
|
22
|
+
import { a as tableFor } from "./compile-CeaX5VD-.js";
|
|
23
|
+
import { r as rebuildPlan, t as DROPPED_LIST } from "./custom-role-rebuild-DzbBD1cq.js";
|
|
24
|
+
import { r as unsatisfiedKinds, t as ownershipRules } from "./ownership-Bx_s_E8i.js";
|
|
25
25
|
// src/cli/rls/custom-role-sync.ts
|
|
26
26
|
/**
|
|
27
27
|
* `rls.customRoles.from.sync: 'trigger'`: after-row triggers on the legacy
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as beforeFirst } from "./text-D704xHVl.js";
|
|
2
2
|
import { a as parseSqlFile, c as readPolicy, t as SqlSyntaxError } from "./ast-Dnm2TOHN.js";
|
|
3
|
-
import { r as HELPERS } from "./shared-
|
|
3
|
+
import { r as HELPERS } from "./shared-BRLAQqj4.js";
|
|
4
4
|
import { deparse } from "pgsql-parser";
|
|
5
5
|
// src/cli/sql/helper-calls.ts
|
|
6
6
|
/**
|