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,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/next/plugin.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as describeError } from "../errors-DgLOqc6j.js";
|
|
2
|
-
import { i as report, r as createCollectScheduler, t as collectOnce } from "../watch-
|
|
2
|
+
import { i as report, r as createCollectScheduler, t as collectOnce } from "../watch-BuQhtt25.js";
|
|
3
3
|
// src/cli/plugin.ts
|
|
4
4
|
const PHASE_BUILD = "phase-production-build";
|
|
5
5
|
const PHASE_DEV = "phase-development-server";
|
|
@@ -79,7 +79,7 @@ const emitFlags = {
|
|
|
79
79
|
}
|
|
80
80
|
};
|
|
81
81
|
async function executeOpenapiEmit(ctx, flags) {
|
|
82
|
-
return (await import("./openapi-
|
|
82
|
+
return (await import("./openapi-CufQiEo8.js")).runOpenapi({
|
|
83
83
|
cwd: ctx.cwd,
|
|
84
84
|
config: ctx.config,
|
|
85
85
|
rest: ["emit"],
|
|
@@ -132,7 +132,7 @@ async function executeAnnotate(ctx, flags) {
|
|
|
132
132
|
const routes = given(flags.routes);
|
|
133
133
|
const doc = given(flags.doc);
|
|
134
134
|
if (routes !== void 0 && doc !== void 0) throw new CliError("usage", "openapi annotate takes --routes or --doc, not both", { code: "usage" });
|
|
135
|
-
if (doc !== void 0) return (await import("./annotate-doc-
|
|
135
|
+
if (doc !== void 0) return (await import("./annotate-doc-CLU0DxK7.js")).runAnnotateDocument({
|
|
136
136
|
cwd: ctx.cwd,
|
|
137
137
|
config: ctx.config,
|
|
138
138
|
doc,
|
|
@@ -145,7 +145,7 @@ async function executeAnnotate(ctx, flags) {
|
|
|
145
145
|
});
|
|
146
146
|
if (routes === void 0) throw missingInput("openapi annotate", ["--routes or --doc"], "the route modules or the OpenAPI document to read");
|
|
147
147
|
const writeSpec = given(flags["write-spec"]);
|
|
148
|
-
return (await import("./annotate-
|
|
148
|
+
return (await import("./annotate-DcSH62rl.js")).runAnnotate({
|
|
149
149
|
cwd: ctx.cwd,
|
|
150
150
|
routes,
|
|
151
151
|
...writeSpec === void 0 ? {} : { writeSpec },
|
|
@@ -183,7 +183,7 @@ const importDocument = defineLeaf({
|
|
|
183
183
|
async run(ctx, { flags }) {
|
|
184
184
|
const doc = given(flags.doc);
|
|
185
185
|
if (doc === void 0) throw missingInput("openapi import", ["--doc"], "the OpenAPI document to import");
|
|
186
|
-
return (await import("./import-
|
|
186
|
+
return (await import("./import-BIJM6oAh.js")).runOpenapiImport({
|
|
187
187
|
cwd: ctx.cwd,
|
|
188
188
|
doc,
|
|
189
189
|
out: fileOut("openapi import", flags.out),
|
|
@@ -6,8 +6,8 @@ import { i as configError } from "./errors-DgLOqc6j.js";
|
|
|
6
6
|
import { i as fileDrift } from "./output-files-8lfALMSU.js";
|
|
7
7
|
import { t as shortDiff } from "./text-diff-DxKRNFlx.js";
|
|
8
8
|
import { i as readJsonFile, s as writeFileEnsuringDir } from "./files-DAR51W3J.js";
|
|
9
|
-
import { a as loadModule, n as asPolicy, s as pickNamed, t as asPermissionTree } from "./load-
|
|
10
|
-
import { n as validateOverlay, t as validateOpenapi } from "./schema-
|
|
9
|
+
import { a as loadModule, n as asPolicy, s as pickNamed, t as asPermissionTree } from "./load-D03A3tZL.js";
|
|
10
|
+
import { n as validateOverlay, t as validateOpenapi } from "./schema-Bk0R_6ul.js";
|
|
11
11
|
import { existsSync } from "node:fs";
|
|
12
12
|
import { resolve } from "node:path";
|
|
13
13
|
// src/cli/openapi/emit/merge.ts
|
|
@@ -3,7 +3,7 @@ import { n as CliError } from "./errors-DgLOqc6j.js";
|
|
|
3
3
|
/** The annotated document, without writing it. */
|
|
4
4
|
async function openapiDocument(task, options, source) {
|
|
5
5
|
if (options.doc === void 0) return [];
|
|
6
|
-
const { runOpenapi } = await import("./openapi-
|
|
6
|
+
const { runOpenapi } = await import("./openapi-CufQiEo8.js");
|
|
7
7
|
const outcome = await runOpenapi({
|
|
8
8
|
cwd: source.cwd,
|
|
9
9
|
config: source.config,
|
|
@@ -35,6 +35,16 @@ function jiti() {
|
|
|
35
35
|
function parseSync(...args) {
|
|
36
36
|
return oxc().parseSync(...args);
|
|
37
37
|
}
|
|
38
|
+
function parseTree(...args) {
|
|
39
|
+
const parser = oxc();
|
|
40
|
+
const [file, text, options] = args;
|
|
41
|
+
if (!parser.rawTransferSupported()) return parser.parseSync(file, text, options);
|
|
42
|
+
const raw = {
|
|
43
|
+
...options,
|
|
44
|
+
experimentalRawTransfer: true
|
|
45
|
+
};
|
|
46
|
+
return parser.parseSync(file, text, raw);
|
|
47
|
+
}
|
|
38
48
|
/** `new Visitor(visitor)` from `oxc-parser`, loaded on first call. */
|
|
39
49
|
function createVisitor(visitor) {
|
|
40
50
|
return new (oxc()).Visitor(visitor);
|
|
@@ -43,4 +53,4 @@ function createVisitor(visitor) {
|
|
|
43
53
|
function visitorKeyTypes() {
|
|
44
54
|
return Object.keys(oxc().visitorKeys);
|
|
45
55
|
}
|
|
46
|
-
export { visitorKeyTypes as i, jiti as n, parseSync as r, createVisitor as t };
|
|
56
|
+
export { visitorKeyTypes as a, parseTree as i, jiti as n, parseSync as r, createVisitor as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { c as isActionRequired, l as isRetryable, n as CliError, t as CLI_ERRORS_URL } from "./errors-DgLOqc6j.js";
|
|
2
|
-
import { t as DOCS_BASE } from "./manifest-
|
|
2
|
+
import { t as DOCS_BASE } from "./manifest-CZvwWacN.js";
|
|
3
3
|
import { s as cliVersion } from "./version-D-jWyJb9.js";
|
|
4
4
|
import { createHash } from "node:crypto";
|
|
5
5
|
// src/cli/core/consent.ts
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { l as scopeChain, s as resolveScope } from "./scopes-B-KX9EI8.js";
|
|
2
2
|
import { r as findRole } from "./vocabulary-CE2k7s1a.js";
|
|
3
|
-
import { S as scopeTable, _ as memberRoleOf, m as memberForTable, x as scopeSources } from "./names-
|
|
4
|
-
import { C as tenantTypeOf, a as kindFilterSql, f as subjectIdSql, r as globalKindFilterSql, s as memberVia } from "./subject-
|
|
3
|
+
import { S as scopeTable, _ as memberRoleOf, m as memberForTable, x as scopeSources } from "./names-zCkaCepO.js";
|
|
4
|
+
import { C as tenantTypeOf, a as kindFilterSql, f as subjectIdSql, r as globalKindFilterSql, s as memberVia } from "./subject-CMkc28eP.js";
|
|
5
5
|
import { i as qualifySqlTable } from "./sql-T4GaBh9X.js";
|
|
6
|
-
import { l as roleColumn } from "./sources-
|
|
6
|
+
import { l as roleColumn } from "./sources-DNVEyJxb.js";
|
|
7
7
|
import { i as configError } from "./errors-DgLOqc6j.js";
|
|
8
|
-
import { a as quoteIdent, i as qualified, n as declaredArray, o as quoteLiteral, s as quoteQualified } from "./quote-
|
|
9
|
-
import { s as signedIn, t as CUSTOM_ROLES } from "./shared-
|
|
10
|
-
import { A as membershipRows, D as globalRoleRows, I as hasCustomRoleChecksFor, T as sourcesKeep, V as storedTenant, d as disabledColumn, h as memberColumn, j as roleRows, l as claimKeptLines, n as delegatedGlobalSql, o as interactiveSessionSql, x as sourceFilters } from "./interactive-only-
|
|
11
|
-
import { _ as sourceTransferTriggerSql, b as ASSIGNMENTS, g as sourceRowsSql, h as sourceHoldersTriggerSql, m as pairsSql, p as holderSources, v as holdersTriggerSql, x as OWNERSHIP, y as transferTriggerSql } from "./tables-
|
|
8
|
+
import { a as quoteIdent, i as qualified, n as declaredArray, o as quoteLiteral, s as quoteQualified } from "./quote-BX3DDoTX.js";
|
|
9
|
+
import { s as signedIn, t as CUSTOM_ROLES } from "./shared-BRLAQqj4.js";
|
|
10
|
+
import { A as membershipRows, D as globalRoleRows, I as hasCustomRoleChecksFor, T as sourcesKeep, V as storedTenant, d as disabledColumn, h as memberColumn, j as roleRows, l as claimKeptLines, n as delegatedGlobalSql, o as interactiveSessionSql, x as sourceFilters } from "./interactive-only-ek-Kf0Kq.js";
|
|
11
|
+
import { _ as sourceTransferTriggerSql, b as ASSIGNMENTS, g as sourceRowsSql, h as sourceHoldersTriggerSql, m as pairsSql, p as holderSources, v as holdersTriggerSql, x as OWNERSHIP, y as transferTriggerSql } from "./tables-Dr4BUH9i.js";
|
|
12
12
|
// src/cli/rls/assignments.ts
|
|
13
13
|
/**
|
|
14
14
|
* The client roles whose writes the assignment triggers check; any other role
|
|
@@ -2,8 +2,8 @@ import { t as canonicalJson } from "./canonical-json-BibZkXtE.js";
|
|
|
2
2
|
import { r as planFiles, t as applyFiles } from "./files-DuV7wRim.js";
|
|
3
3
|
import { s as writeFileEnsuringDir } from "./files-DAR51W3J.js";
|
|
4
4
|
import { n as CliError } from "./errors-DgLOqc6j.js";
|
|
5
|
-
import { a as ownedObjects, i as inReservedDir, n as foreignSchemaFiles, o as shownKey, s as withoutOwned, t as policyModel } from "./model-
|
|
6
|
-
import { n as resolveSchemas } from "./supabase-schemas-
|
|
5
|
+
import { a as ownedObjects, i as inReservedDir, n as foreignSchemaFiles, o as shownKey, s as withoutOwned, t as policyModel } from "./model-BfhDMEDf.js";
|
|
6
|
+
import { n as resolveSchemas } from "./supabase-schemas-RPYfnE6O.js";
|
|
7
7
|
import { i as orderPlugins } from "./plugin-MQVfUBUS.js";
|
|
8
8
|
import { existsSync, readFileSync, readdirSync, statSync } from "node:fs";
|
|
9
9
|
import { join, relative, resolve } from "node:path";
|
|
@@ -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, i as dryRunFlag, l as given, t as checkFlag, u as outFlag } 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/policy.ts
|
|
6
6
|
const policyBundle = defineLeaf({
|
|
7
7
|
flags: {
|
|
@@ -18,7 +18,7 @@ const policyBundle = defineLeaf({
|
|
|
18
18
|
},
|
|
19
19
|
async run(ctx, { flags }) {
|
|
20
20
|
try {
|
|
21
|
-
const { runPolicyBundle } = await import("./policy-bundle-
|
|
21
|
+
const { runPolicyBundle } = await import("./policy-bundle-BZyCcphj.js");
|
|
22
22
|
const policy = await requirePolicy(ctx.cwd, given(flags.policy) ?? ctx.config.policy, "set policy in permdock.config.ts or pass --policy");
|
|
23
23
|
return runPolicyBundle({
|
|
24
24
|
cwd: ctx.cwd,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { n as fileSummary, t as applyFiles } from "./files-DuV7wRim.js";
|
|
2
|
-
import { i as buildContext, n as isRefusal, o as inheritTargets, t as generateOptions } from "./generate-options-
|
|
3
|
-
import { r as compileGrants } from "./compile-
|
|
4
|
-
import { X as policyBundle, Y as bundleLoaderSql, i as tableNames, q as POLICY_BUNDLE_FORMAT } from "./tables-
|
|
2
|
+
import { i as buildContext, n as isRefusal, o as inheritTargets, t as generateOptions } from "./generate-options-Bq5qQ9H7.js";
|
|
3
|
+
import { r as compileGrants } from "./compile-CeaX5VD-.js";
|
|
4
|
+
import { X as policyBundle, Y as bundleLoaderSql, i as tableNames, q as POLICY_BUNDLE_FORMAT } from "./tables-Dr4BUH9i.js";
|
|
5
5
|
import { existsSync, readFileSync } from "node:fs";
|
|
6
6
|
import { resolve } from "node:path";
|
|
7
7
|
// src/cli/policy-bundle.ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { i as powersyncFiles, r as publicationPath, t as runPowerSync } from "./powersync-
|
|
1
|
+
export { i as powersyncFiles, r as publicationPath, t as runPowerSync } from "./powersync-DVUeHJpL.js";
|
|
@@ -24,7 +24,7 @@ const verify = defineLeaf({
|
|
|
24
24
|
const db = await dbUrl(ctx, flags, { required: true });
|
|
25
25
|
const fixtures = given(flags.fixtures);
|
|
26
26
|
const from = given(flags.policy);
|
|
27
|
-
const { runPowerSync } = await import("./powersync-
|
|
27
|
+
const { runPowerSync } = await import("./powersync-C6F2F_VP.js");
|
|
28
28
|
return runPowerSync({
|
|
29
29
|
cwd: ctx.cwd,
|
|
30
30
|
config: ctx.config,
|
|
@@ -5,28 +5,28 @@ import { A as memoryCustomRoleSource, _ as localSnapshotManifest } from "./src-D
|
|
|
5
5
|
import { f as usageResult } from "./errors-DgLOqc6j.js";
|
|
6
6
|
import { t as applyFiles } from "./files-DuV7wRim.js";
|
|
7
7
|
import { i as fileDrift } from "./output-files-8lfALMSU.js";
|
|
8
|
-
import { n as fixtureSubject, r as loadFixtures, t as fixtureRow } from "./fixtures-
|
|
8
|
+
import { n as fixtureSubject, r as loadFixtures, t as fixtureRow } from "./fixtures-B29C2DGA.js";
|
|
9
9
|
import { r as pgConnector } from "./pg-DmS5ITHu.js";
|
|
10
|
-
import { c as requirePolicy } from "./load-
|
|
11
|
-
import { t as canFixture } from "./verify-
|
|
12
|
-
import { d as andConditions, l as collectGrants, o as assignableRoles, p as contextRefs, u as roleNames } from "./rbac-
|
|
13
|
-
import { a as quoteIdent, s as quoteQualified } from "./quote-
|
|
10
|
+
import { c as requirePolicy } from "./load-D03A3tZL.js";
|
|
11
|
+
import { t as canFixture } from "./verify-Df9u1-v5.js";
|
|
12
|
+
import { d as andConditions, l as collectGrants, o as assignableRoles, p as contextRefs, u as roleNames } from "./rbac-COexzCC9.js";
|
|
13
|
+
import { a as quoteIdent, s as quoteQualified } from "./quote-BX3DDoTX.js";
|
|
14
14
|
import { a as scopeMembershipTable, i as scopeColumn } from "./compile-BUKXrueE.js";
|
|
15
15
|
import { r as isRecord, t as compact } from "./compact-C4LFuqbW.js";
|
|
16
16
|
import { d as scopeList, s as resolveScope } from "./scopes-B-KX9EI8.js";
|
|
17
|
-
import { d as keptKeys, t as AUTHZ_VERSION_TABLE } from "./sources-
|
|
18
|
-
import { a as customRolesOn, t as CUSTOM_ROLES } from "./shared-
|
|
17
|
+
import { d as keptKeys, t as AUTHZ_VERSION_TABLE } from "./sources-DNVEyJxb.js";
|
|
18
|
+
import { a as customRolesOn, t as CUSTOM_ROLES } from "./shared-BRLAQqj4.js";
|
|
19
19
|
import { t as membershipSourcesOf } from "./sources-BbSUNmFX.js";
|
|
20
20
|
import { s as quoteSqlLiteral, t as SQL_IDENT } from "./sql-T4GaBh9X.js";
|
|
21
|
-
import { t as ownershipRules } from "./ownership-
|
|
22
|
-
import { a as tableFor } from "./compile-
|
|
23
|
-
import { i as tableNames, r as tableNameOf } from "./tables-
|
|
21
|
+
import { t as ownershipRules } from "./ownership-Bx_s_E8i.js";
|
|
22
|
+
import { a as tableFor } from "./compile-CeaX5VD-.js";
|
|
23
|
+
import { i as tableNames, r as tableNameOf } from "./tables-Dr4BUH9i.js";
|
|
24
24
|
import { l as policyLevels } from "./policy-CZBJDcTx.js";
|
|
25
25
|
import { p as scopeField } from "./tenancy-B5Xxt9Sc.js";
|
|
26
26
|
import { t as requiresApproval } from "./approval-required-B-R4Yw3J.js";
|
|
27
27
|
import { o as sqlFiles } from "./files-DAR51W3J.js";
|
|
28
28
|
import { o as parseSqlLenient } from "./ast-Dnm2TOHN.js";
|
|
29
|
-
import { n as resolveSchemas } from "./supabase-schemas-
|
|
29
|
+
import { n as resolveSchemas } from "./supabase-schemas-RPYfnE6O.js";
|
|
30
30
|
import { existsSync, readFileSync } from "node:fs";
|
|
31
31
|
import { join, resolve } from "node:path";
|
|
32
32
|
// src/cli/powersync/claims.ts
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { i as parseTree } from "./optional-Dw7to-jw.js";
|
|
2
2
|
// src/cli/source/program.ts
|
|
3
3
|
/** The program of `text`, or `undefined` when the parser reports an error. */
|
|
4
4
|
function parseProgram(file, text) {
|
|
5
|
-
const parsed =
|
|
5
|
+
const parsed = parseTree(file, text);
|
|
6
6
|
return parsed.errors.some((error) => {
|
|
7
7
|
return error.severity === "Error";
|
|
8
8
|
}) ? void 0 : parsed.program;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { n as CliError } from "./errors-DgLOqc6j.js";
|
|
2
2
|
import { i as refuseDirty, t as applyFiles } from "./files-DuV7wRim.js";
|
|
3
3
|
import { a as rel } from "./files-DAR51W3J.js";
|
|
4
|
-
import { t as genFiles } from "./gen-
|
|
5
|
-
import { t as projectContext } from "./context-
|
|
6
|
-
import { t as emitPluginFiles } from "./pipeline-
|
|
4
|
+
import { t as genFiles } from "./gen-CZB21YVB.js";
|
|
5
|
+
import { t as projectContext } from "./context-BKZmdYRf.js";
|
|
6
|
+
import { t as emitPluginFiles } from "./pipeline-BTsmCn1p.js";
|
|
7
7
|
import { n as isPermDockPlugin } from "./plugin-MQVfUBUS.js";
|
|
8
|
-
import { S as restatedFacts, c as withDerivedDefaults, o as readParsedConfig, t as configFileIn } from "./config-
|
|
9
|
-
import { c as requirePolicy } from "./load-
|
|
10
|
-
import { n as restatedDefaults, r as withoutPath } from "./resolve-config-
|
|
11
|
-
import { n as writtenPaths, t as configProperty } from "./config-paths-
|
|
12
|
-
import { r as removeProperty, t as applyEditsStrict } from "./edits-
|
|
13
|
-
import { n as commandFor } from "./compile-
|
|
14
|
-
import { r as schemaTables, t as restatedSchemaDefaults } from "./schema-tables-
|
|
8
|
+
import { S as restatedFacts, c as withDerivedDefaults, o as readParsedConfig, t as configFileIn } from "./config-C1lTq4gJ.js";
|
|
9
|
+
import { c as requirePolicy } from "./load-D03A3tZL.js";
|
|
10
|
+
import { n as restatedDefaults, r as withoutPath } from "./resolve-config-LiLfxe8X.js";
|
|
11
|
+
import { n as writtenPaths, t as configProperty } from "./config-paths-Cg3IXh9T.js";
|
|
12
|
+
import { r as removeProperty, t as applyEditsStrict } from "./edits-Ckbit4uD.js";
|
|
13
|
+
import { n as commandFor } from "./compile-CeaX5VD-.js";
|
|
14
|
+
import { r as schemaTables, t as restatedSchemaDefaults } from "./schema-tables-CqEHokUT.js";
|
|
15
15
|
import { readFileSync } from "node:fs";
|
|
16
16
|
// src/cli/codemod/prune-config.ts
|
|
17
17
|
/** Every generated file for `config`, as sorted `path` and text pairs. */
|
|
@@ -4,7 +4,7 @@ import { n as parseSupabaseManifest } from "./manifest-teSfgeqF.js";
|
|
|
4
4
|
import { o as formatCatalogJson } from "./catalog-doc-BX97oFAn.js";
|
|
5
5
|
import { t as catalogPath } from "./catalog-path-bG0XxHMu.js";
|
|
6
6
|
import { a as describeError } from "./errors-DgLOqc6j.js";
|
|
7
|
-
import { o as nonEmptyOr } from "./output-
|
|
7
|
+
import { o as nonEmptyOr } from "./output-yUW7fcAk.js";
|
|
8
8
|
import { s as cliVersion } from "./version-D-jWyJb9.js";
|
|
9
9
|
import { s as writeFileEnsuringDir } from "./files-DAR51W3J.js";
|
|
10
10
|
import { n as formatManifestJson } from "./manifest-json-DMaBWmcG.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { n as runCloudPull } from "./pull-CEv7O_zQ.js";
|
|
@@ -4,12 +4,12 @@ import { r as isRecord } from "./compact-C4LFuqbW.js";
|
|
|
4
4
|
import { n as PermDockValidationError } from "./validation-error-CgDOA6VS.js";
|
|
5
5
|
import { t as catalogFingerprint } from "./catalog-fingerprint-DAWZARy6.js";
|
|
6
6
|
import { n as parseSupabaseManifest } from "./manifest-teSfgeqF.js";
|
|
7
|
-
import { n as runCatalog } from "./catalog-
|
|
7
|
+
import { n as runCatalog } from "./catalog-DlVcHvH5.js";
|
|
8
8
|
import { a as describeError, n as CliError } from "./errors-DgLOqc6j.js";
|
|
9
9
|
import { n as httpRequest, t as authFailure } from "./http-BbX_Ou3_.js";
|
|
10
10
|
import { s as cliVersion } from "./version-D-jWyJb9.js";
|
|
11
11
|
import "./manifest-json-DMaBWmcG.js";
|
|
12
|
-
import { i as loadConfiguredPolicy } from "./load-
|
|
12
|
+
import { i as loadConfiguredPolicy } from "./load-D03A3tZL.js";
|
|
13
13
|
import { a as pushAuth, l as cloudUrl, n as cliRuntime, u as firstNonEmpty } from "./auth-WHKYWtnS.js";
|
|
14
14
|
import { existsSync, readFileSync } from "node:fs";
|
|
15
15
|
import { resolve } from "node:path";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as quoteQualifiedTable, c as quoteSqlTable, o as quoteSqlIdent, s as quoteSqlLiteral } from "./sql-T4GaBh9X.js";
|
|
2
|
-
import "./sources-
|
|
2
|
+
import "./sources-DNVEyJxb.js";
|
|
3
3
|
// src/cli/sql/quote.ts
|
|
4
4
|
function quoteIdent(name) {
|
|
5
5
|
return quoteSqlIdent(name, CLI);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as authorizeSql } from "./supabase-
|
|
1
|
+
import { n as authorizeSql } from "./supabase-zRUmN_PE.js";
|
|
2
2
|
import { i as configError } from "./errors-DgLOqc6j.js";
|
|
3
3
|
import { r as relationCondition, t as inheritCondition } from "./grantee-conditions-Dob6QQAc.js";
|
|
4
4
|
import { c as rootScope, d as scopeList, s as resolveScope } from "./scopes-B-KX9EI8.js";
|
|
@@ -10,10 +10,10 @@ import { n as isForbiddenKey } from "./paths-CeS_gpHf.js";
|
|
|
10
10
|
import { i as qualifySqlTable } from "./sql-T4GaBh9X.js";
|
|
11
11
|
import { u as isoAt } from "./time-r0CKBm57.js";
|
|
12
12
|
import { u as isSqlFunctionField } from "./refs-Cix9Zjis.js";
|
|
13
|
-
import { K as activeUserSql, U as activeInstancesSql, W as activeMembershipSql, c as memoUserSql, g as memoHitList, y as memoizes } from "./interactive-only-
|
|
14
|
-
import { S as sqlType, a as kindFilterSql, b as idTypeOf, c as roleKindSql, d as subjectClaimSql, f as subjectIdSql, h as CLAIM, i as keyTenantSql, o as liveSessionSql, p as tenantClaimSql, s as memberVia, u as subjectClaimJsonSql } from "./subject-
|
|
15
|
-
import { S as scopeTable, _ as memberRoleOf, a as graphSqlText, b as restrictedHelper, d as linkHelper, h as memberIdsHelper, l as inheritedRowsHelper, n as CLOSURE, r as graphHelper, x as scopeSources } from "./names-
|
|
16
|
-
import { a as quoteIdent, c as quoteTable, i as qualified, l as textArrayLiteral, o as quoteLiteral, r as helperSchema, s as quoteQualified } from "./quote-
|
|
13
|
+
import { K as activeUserSql, U as activeInstancesSql, W as activeMembershipSql, c as memoUserSql, g as memoHitList, y as memoizes } from "./interactive-only-ek-Kf0Kq.js";
|
|
14
|
+
import { S as sqlType, a as kindFilterSql, b as idTypeOf, c as roleKindSql, d as subjectClaimSql, f as subjectIdSql, h as CLAIM, i as keyTenantSql, o as liveSessionSql, p as tenantClaimSql, s as memberVia, u as subjectClaimJsonSql } from "./subject-CMkc28eP.js";
|
|
15
|
+
import { S as scopeTable, _ as memberRoleOf, a as graphSqlText, b as restrictedHelper, d as linkHelper, h as memberIdsHelper, l as inheritedRowsHelper, n as CLOSURE, r as graphHelper, x as scopeSources } from "./names-zCkaCepO.js";
|
|
16
|
+
import { a as quoteIdent, c as quoteTable, i as qualified, l as textArrayLiteral, o as quoteLiteral, r as helperSchema, s as quoteQualified } from "./quote-BX3DDoTX.js";
|
|
17
17
|
// src/cli/sql/conditions.ts
|
|
18
18
|
const MAX_CLAIM_DEPTH = 8;
|
|
19
19
|
/**
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { u as renamedKeys } from "./permission-registry-DstT40VS.js";
|
|
2
|
-
import "./sources-
|
|
2
|
+
import "./sources-DNVEyJxb.js";
|
|
3
3
|
import { i as configError, n as CliError } from "./errors-DgLOqc6j.js";
|
|
4
4
|
import { i as refuseDirty, n as fileSummary, t as applyFiles } from "./files-DuV7wRim.js";
|
|
5
|
-
import { a as loadModule, r as leavesOf, s as pickNamed, t as asPermissionTree } from "./load-
|
|
6
|
-
import { a as resolveAuthorize } from "./rbac-
|
|
7
|
-
import { a as customRolesOn, t as CUSTOM_ROLES } from "./shared-
|
|
8
|
-
import { n as legacyKeySql } from "./custom-role-rebuild-
|
|
5
|
+
import { a as loadModule, r as leavesOf, s as pickNamed, t as asPermissionTree } from "./load-D03A3tZL.js";
|
|
6
|
+
import { a as resolveAuthorize } from "./rbac-COexzCC9.js";
|
|
7
|
+
import { a as customRolesOn, t as CUSTOM_ROLES } from "./shared-BRLAQqj4.js";
|
|
8
|
+
import { n as legacyKeySql } from "./custom-role-rebuild-DzbBD1cq.js";
|
|
9
9
|
import { n as byKey } from "./compare-8SNJN-9U.js";
|
|
10
|
-
import { a as quoteIdent, o as quoteLiteral } from "./quote-
|
|
11
|
-
import { a as nameOf, o as nodes, r as child, u as walk } from "./ast-
|
|
12
|
-
import { n as propertyKey, r as removeProperty, t as applyEditsStrict } from "./edits-
|
|
13
|
-
import { t as parseProgram } from "./program-
|
|
10
|
+
import { a as quoteIdent, o as quoteLiteral } from "./quote-BX3DDoTX.js";
|
|
11
|
+
import { a as nameOf, o as nodes, r as child, u as walk } from "./ast-BhvgF264.js";
|
|
12
|
+
import { n as propertyKey, r as removeProperty, t as applyEditsStrict } from "./edits-Ckbit4uD.js";
|
|
13
|
+
import { t as parseProgram } from "./program-C2fbc9NO.js";
|
|
14
14
|
import { existsSync, readFileSync } from "node:fs";
|
|
15
15
|
import { join, relative, resolve } from "node:path";
|
|
16
16
|
// src/cli/keys/rename-sql.ts
|
|
@@ -4,7 +4,7 @@ import { a as rel, o as sqlFiles } from "./files-DAR51W3J.js";
|
|
|
4
4
|
import { n as MIGRATION_DIRS } from "./constants-PCJiir_3.js";
|
|
5
5
|
import { a as parseSqlFile, c as readPolicy, d as sqlCalls, i as isPolicyCommand, t as SqlSyntaxError } from "./ast-Dnm2TOHN.js";
|
|
6
6
|
import { i as taggedAccessPolicies } from "./bsb-access-Bcw6GrQm.js";
|
|
7
|
-
import { i as callsHelper, o as helperCallKeys } from "./helper-calls-
|
|
7
|
+
import { i as callsHelper, o as helperCallKeys } from "./helper-calls-jStpeQ2_.js";
|
|
8
8
|
import { n as supabaseDir } from "./supabase-dir-0lxKbrYu.js";
|
|
9
9
|
import { readFileSync } from "node:fs";
|
|
10
10
|
import { deparse } from "pgsql-parser";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as NON_LEAKPROOF_INDEXED_SQL, n as POLICIES_MAX, r as REPORT_POLICIES_SQL, i as TABLE_READ_RULES, a as droppedPolicy, o as policiesFor, s as reportFiles, c as rlsReport, l as runRlsReport } from "./report-
|
|
1
|
+
export { t as NON_LEAKPROOF_INDEXED_SQL, n as POLICIES_MAX, r as REPORT_POLICIES_SQL, i as TABLE_READ_RULES, a as droppedPolicy, o as policiesFor, s as reportFiles, c as rlsReport, l as runRlsReport } from "./report-B7UuE4dW.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as supabaseMembershipsBudget } from "./budget-BH81q2cj.js";
|
|
2
|
-
import { r as PERMDOCK_SCHEMA } from "./sources-
|
|
2
|
+
import { r as PERMDOCK_SCHEMA } from "./sources-DNVEyJxb.js";
|
|
3
3
|
import { t as defaultSrcPath } from "./files-DAR51W3J.js";
|
|
4
4
|
import { n as MIGRATION_DIRS, t as DEFAULT_SENSITIVE_ACTIONS } from "./constants-PCJiir_3.js";
|
|
5
5
|
import { isDeepStrictEqual } from "node:util";
|
|
@@ -2,14 +2,14 @@ import { n as freezeDeep } from "./freeze-DGfJq_j2.js";
|
|
|
2
2
|
import { c as listPermissions } from "./permission-registry-DstT40VS.js";
|
|
3
3
|
import { d as scopeList } from "./scopes-B-KX9EI8.js";
|
|
4
4
|
import "./budget-BH81q2cj.js";
|
|
5
|
-
import "./sources-
|
|
5
|
+
import "./sources-DNVEyJxb.js";
|
|
6
6
|
import { i as configError } from "./errors-DgLOqc6j.js";
|
|
7
|
-
import { t as FIELD_VIEWS } from "./fields-
|
|
8
|
-
import { C as forUserContext, d as permittedByPermissionHelper, et as graphPlan, i as tableNames, o as PERMISSION_HELPERS, p as holderSources, s as checkName, w as grantBodies } from "./tables-
|
|
9
|
-
import { b as idTypeOf, x as scopeTypeOf } from "./subject-
|
|
10
|
-
import { S as scopeTable, b as restrictedHelper, c as hasPermittedUsers, f as memberForHelper, g as memberOfHelper, h as memberIdsHelper, i as graphSqlName, l as inheritedRowsHelper, r as graphHelper, u as isTeamScope, v as permittedForHelper, y as permittedIdsHelper } from "./names-
|
|
11
|
-
import { a as quoteIdent, i as qualified, o as quoteLiteral, s as quoteQualified } from "./quote-
|
|
12
|
-
import { D as globalRoleRows, m as holderBody } from "./interactive-only-
|
|
7
|
+
import { t as FIELD_VIEWS } from "./fields-DWAwA8vX.js";
|
|
8
|
+
import { C as forUserContext, d as permittedByPermissionHelper, et as graphPlan, i as tableNames, o as PERMISSION_HELPERS, p as holderSources, s as checkName, w as grantBodies } from "./tables-Dr4BUH9i.js";
|
|
9
|
+
import { b as idTypeOf, x as scopeTypeOf } from "./subject-CMkc28eP.js";
|
|
10
|
+
import { S as scopeTable, b as restrictedHelper, c as hasPermittedUsers, f as memberForHelper, g as memberOfHelper, h as memberIdsHelper, i as graphSqlName, l as inheritedRowsHelper, r as graphHelper, u as isTeamScope, v as permittedForHelper, y as permittedIdsHelper } from "./names-zCkaCepO.js";
|
|
11
|
+
import { a as quoteIdent, i as qualified, o as quoteLiteral, s as quoteQualified } from "./quote-BX3DDoTX.js";
|
|
12
|
+
import { D as globalRoleRows, m as holderBody } from "./interactive-only-ek-Kf0Kq.js";
|
|
13
13
|
// src/cli/rls/permission-holders.ts
|
|
14
14
|
/**
|
|
15
15
|
* `permitted_<scope>_users(p_permission, p_id)`. Names are part of the SQL
|
|
@@ -9,7 +9,7 @@ import { t as instanceOptions } from "./instance-options-CLErhA76.js";
|
|
|
9
9
|
import { n as versionSources } from "./define-permdock-CGI9pgqL.js";
|
|
10
10
|
import { t as buildInstance } from "./build-instance-BX5yWZDz.js";
|
|
11
11
|
import { n as NO_GRANT } from "./decision-hHv4UZgy.js";
|
|
12
|
-
import { a as hookApiNames } from "./sources-
|
|
12
|
+
import { a as hookApiNames } from "./sources-DNVEyJxb.js";
|
|
13
13
|
import { o as subjectFromSupabase } from "./definition-options-DLBlRrPO.js";
|
|
14
14
|
// src/supabase/postgrest.ts
|
|
15
15
|
function callRpc(client, schema, fn, args) {
|
|
@@ -194,7 +194,7 @@ async function rlsInput(ctx, verb, shape, options) {
|
|
|
194
194
|
};
|
|
195
195
|
}
|
|
196
196
|
async function runRls(input) {
|
|
197
|
-
return (await import("./rls-
|
|
197
|
+
return (await import("./rls-CTWb0XEV.js")).runRls(input);
|
|
198
198
|
}
|
|
199
199
|
({
|
|
200
200
|
...shapeFlags,
|
|
@@ -303,9 +303,9 @@ const report = defineLeaf({
|
|
|
303
303
|
async run(ctx, { flags }) {
|
|
304
304
|
const db = await dbUrl(ctx, flags);
|
|
305
305
|
const [{ runRlsReport }, { pgConnector }, { configuredTableReads }] = await Promise.all([
|
|
306
|
-
import("./report-
|
|
306
|
+
import("./report-CMncWbQ-.js"),
|
|
307
307
|
import("./pg-DtiDogUp.js"),
|
|
308
|
-
import("./table-reads-
|
|
308
|
+
import("./table-reads-CegjCVHG.js")
|
|
309
309
|
]);
|
|
310
310
|
return runRlsReport({
|
|
311
311
|
cwd: ctx.cwd,
|
|
@@ -349,9 +349,9 @@ const measure = defineLeaf({
|
|
|
349
349
|
if (db === void 0) throw missingInput("rls measure", ["--db-url-stdin", "--local"], "the database to run requests against");
|
|
350
350
|
const tenant = given(flags.tenant);
|
|
351
351
|
const [{ runRlsMeasure, DEFAULT_REQUESTS, DEFAULT_TABLES }, { pgConnector }, { positiveInteger }] = await Promise.all([
|
|
352
|
-
import("./measure-
|
|
352
|
+
import("./measure-BhjWMmvj.js"),
|
|
353
353
|
import("./pg-DtiDogUp.js"),
|
|
354
|
-
import("./memberships-
|
|
354
|
+
import("./memberships-DEW0FU2p.js")
|
|
355
355
|
]);
|
|
356
356
|
return runRlsMeasure({
|
|
357
357
|
cwd: ctx.cwd,
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import "./sources-
|
|
1
|
+
import "./sources-DNVEyJxb.js";
|
|
2
2
|
import { a as describeError, f as usageResult, o as exitCodeOfError } from "./errors-DgLOqc6j.js";
|
|
3
3
|
import { n as openPgPool, r as pgConnector, t as connectPgPool } from "./pg-DmS5ITHu.js";
|
|
4
4
|
import { i as taggedAccessPolicies } from "./bsb-access-Bcw6GrQm.js";
|
|
5
|
-
import { n as resolveSchemas, r as schemasRefusal, t as isSupabaseSchemas } from "./supabase-schemas-
|
|
6
|
-
import { o as nonEmptyOr } from "./output-
|
|
5
|
+
import { n as resolveSchemas, r as schemasRefusal, t as isSupabaseSchemas } from "./supabase-schemas-RPYfnE6O.js";
|
|
6
|
+
import { o as nonEmptyOr } from "./output-yUW7fcAk.js";
|
|
7
7
|
import { n as packageManagerOf, t as addLine } from "./peer-D77JpXe-.js";
|
|
8
|
-
import { n as describeExplain, t as runRlsGenerate } from "./generate-
|
|
9
|
-
import { c as INDEX_COLUMNS_SQL, f as readTableIndexFacts, s as COLUMNS_SQL } from "./compile-
|
|
8
|
+
import { n as describeExplain, t as runRlsGenerate } from "./generate-DePdrbn_.js";
|
|
9
|
+
import { c as INDEX_COLUMNS_SQL, f as readTableIndexFacts, s as COLUMNS_SQL } from "./compile-CeaX5VD-.js";
|
|
10
10
|
import { r as escapeSqlIdent } from "./sql-T4GaBh9X.js";
|
|
11
11
|
import { t as beforeFirst } from "./text-D704xHVl.js";
|
|
12
|
-
import { a as conditionShown, i as callsHelper, o as helperCallKeys, t as HELPER_TABLES } from "./helper-calls-
|
|
13
|
-
import { u as isPlatformSchema } from "./report-
|
|
14
|
-
import { c as ACTOR_MAY_WRITE, p as readOnlyActorKinds } from "./fields-
|
|
15
|
-
import { a as verifyResult, i as verifyIgnores, n as runRlsVerify, r as rlsFinding } from "./verify-
|
|
16
|
-
import { r as parseRbacAuthorize } from "./rbac-
|
|
17
|
-
import { n as configuredTableReads } from "./table-reads-
|
|
12
|
+
import { a as conditionShown, i as callsHelper, o as helperCallKeys, t as HELPER_TABLES } from "./helper-calls-jStpeQ2_.js";
|
|
13
|
+
import { u as isPlatformSchema } from "./report-B7UuE4dW.js";
|
|
14
|
+
import { c as ACTOR_MAY_WRITE, p as readOnlyActorKinds } from "./fields-DWAwA8vX.js";
|
|
15
|
+
import { a as verifyResult, i as verifyIgnores, n as runRlsVerify, r as rlsFinding } from "./verify-Df9u1-v5.js";
|
|
16
|
+
import { r as parseRbacAuthorize } from "./rbac-COexzCC9.js";
|
|
17
|
+
import { n as configuredTableReads } from "./table-reads-DpncF1F-.js";
|
|
18
18
|
import { r as isRecord } from "./compact-C4LFuqbW.js";
|
|
19
19
|
import { a as rel, o as sqlFiles } from "./files-DAR51W3J.js";
|
|
20
20
|
import { t as importFromApp } from "./app-peer-BnMh5lqz.js";
|
|
@@ -913,7 +913,7 @@ async function migrate(input) {
|
|
|
913
913
|
code: 2,
|
|
914
914
|
output: generated.output
|
|
915
915
|
};
|
|
916
|
-
const { migrateTarget, runRlsMigrate } = await import("./migrate-
|
|
916
|
+
const { migrateTarget, runRlsMigrate } = await import("./migrate-BBPxqBMF.js");
|
|
917
917
|
return runRlsMigrate({
|
|
918
918
|
cwd: input.cwd,
|
|
919
919
|
sql: input.sql,
|
|
@@ -1074,7 +1074,7 @@ async function runRls(input) {
|
|
|
1074
1074
|
});
|
|
1075
1075
|
}
|
|
1076
1076
|
case "import": {
|
|
1077
|
-
const { runRlsImport } = await import("./import-
|
|
1077
|
+
const { runRlsImport } = await import("./import-bTvN77Uj.js");
|
|
1078
1078
|
return runRlsImport({
|
|
1079
1079
|
cwd: input.cwd,
|
|
1080
1080
|
config: input.config,
|
|
@@ -3,7 +3,7 @@ import { i as dateAt } from "./time-r0CKBm57.js";
|
|
|
3
3
|
import { n as CliError } from "./errors-DgLOqc6j.js";
|
|
4
4
|
import { m as seedsMigration, p as seedDeltaNote } from "./output-files-8lfALMSU.js";
|
|
5
5
|
import { a as fixturesPresent, i as defaultsSeedSql, o as fixturesSeedSql, r as FIXTURES_PATH, t as DEFAULTS_MARKER } from "./seed-sql-CjF7u0aX.js";
|
|
6
|
-
import { t as runRlsGenerate } from "./generate-
|
|
6
|
+
import { t as runRlsGenerate } from "./generate-DePdrbn_.js";
|
|
7
7
|
import { a as quietIo, r as noted } from "./plugin-MQVfUBUS.js";
|
|
8
8
|
// src/cli/generate/plugins/rls-options.ts
|
|
9
9
|
function seedMode(seeds) {
|
|
@@ -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/roles.ts
|
|
6
6
|
const rolesGrants = defineLeaf({
|
|
7
7
|
flags: {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { i as dateAt } from "./time-r0CKBm57.js";
|
|
2
|
-
import { a as readConfig, l as withPluginOutputs, s as resolveCwd } from "./config-
|
|
2
|
+
import { a as readConfig, l as withPluginOutputs, s as resolveCwd } from "./config-C1lTq4gJ.js";
|
|
3
3
|
import { t as beforeFirst } from "./text-D704xHVl.js";
|
|
4
4
|
import { a as describeError, n as CliError, r as cliFailure, s as failureOf, u as kindOfCode } from "./errors-DgLOqc6j.js";
|
|
5
5
|
import { a as suggestion, i as parseLeaf, o as GLOBAL_FLAGS, r as parseFlags } from "./args-BSpXxMnb.js";
|
|
6
|
-
import { a as githubAnnotations, c as sarifLog, d as consentReasons, f as quote, i as findingsDocument, l as confirmationRequired, n as errorDocument, p as replayArgv, s as resultDocument, t as dataOf, u as consentDigest } from "./output-
|
|
6
|
+
import { a as githubAnnotations, c as sarifLog, d as consentReasons, f as quote, i as findingsDocument, l as confirmationRequired, n as errorDocument, p as replayArgv, s as resultDocument, t as dataOf, u as consentDigest } from "./output-yUW7fcAk.js";
|
|
7
7
|
import { r as progressReporter, t as redact } from "./credentials-6ZWbJ-Re.js";
|
|
8
|
-
import { a as resolve, i as leaves, n as ROOT, r as SECTIONS, t as DOCS_BASE } from "./manifest-
|
|
8
|
+
import { a as resolve, i as leaves, n as ROOT, r as SECTIONS, t as DOCS_BASE } from "./manifest-CZvwWacN.js";
|
|
9
9
|
import { t as createStyle } from "./style-CQDaLJtP.js";
|
|
10
10
|
import { s as cliVersion } from "./version-D-jWyJb9.js";
|
|
11
11
|
import { n as isPermDockPlugin } from "./plugin-MQVfUBUS.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { t as run } from "./run-B9MRT-5k.js";
|
|
@@ -16,7 +16,7 @@ const scan = defineLeaf({
|
|
|
16
16
|
}
|
|
17
17
|
},
|
|
18
18
|
async run(ctx, { flags }) {
|
|
19
|
-
const { runAdoptionScan } = await import("./adoption-scan-
|
|
19
|
+
const { runAdoptionScan } = await import("./adoption-scan-Cg4pyRhm.js");
|
|
20
20
|
return runAdoptionScan({
|
|
21
21
|
cwd: ctx.cwd,
|
|
22
22
|
srcPath: flags.src.length > 0 ? flags.src : ctx.config.collect?.srcPath ?? ["src"],
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as require__2020 } from "./2020-DBXhfpuK.js";
|
|
2
2
|
import { r as isRecord } from "./compact-C4LFuqbW.js";
|
|
3
3
|
import { t as DRAFT_PINS } from "./pins-CXXkVEiD.js";
|
|
4
|
-
import { o as nonEmptyOr } from "./output-
|
|
4
|
+
import { o as nonEmptyOr } from "./output-yUW7fcAk.js";
|
|
5
5
|
import { l as packageRoot } from "./version-D-jWyJb9.js";
|
|
6
6
|
import { readFileSync } from "node:fs";
|
|
7
7
|
import { join } from "node:path";
|
|
@@ -158,10 +158,10 @@ function restatedSchemaDefaults(config, policy, tables) {
|
|
|
158
158
|
return paths;
|
|
159
159
|
}
|
|
160
160
|
/** `config` with the `rls.tables` and `rls.scopeTypes` the schema files imply. */
|
|
161
|
-
async function withSchemaDefaults(cwd, config, policy) {
|
|
161
|
+
async function withSchemaDefaults(cwd, config, policy, known) {
|
|
162
162
|
const rls = config.rls;
|
|
163
163
|
if (rls === void 0) return config;
|
|
164
|
-
const tables = await schemaTables(cwd);
|
|
164
|
+
const tables = await (known ?? schemaTables(cwd));
|
|
165
165
|
if (tables.size === 0) return config;
|
|
166
166
|
const defaults = schemaDefaults(config, policy, tables);
|
|
167
167
|
const addTables = Object.keys(defaults.tables).length > 0;
|