permdock 0.26.0 → 0.27.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{adoption-scan-b0_Xpab8.js → adoption-scan-Bd-m2Fe_.js} +1 -1
- package/dist/{arazzo-Hxerfx3_.js → arazzo-BGfRLmhk.js} +1 -1
- package/dist/{arazzo-DMmcumRx.js → arazzo-CsifZ8xx.js} +1 -1
- package/dist/{casbin-CYwbggCS.js → casbin-D8T6IXmf.js} +1 -1
- package/dist/{casbin-Co1KcLWU.js → casbin-n0dqdBSj.js} +1 -1
- package/dist/cli/bin.js +1 -1
- package/dist/cli/generate/watch-worker.js +1 -1
- package/dist/cli/index.d.ts +2 -2
- package/dist/cli/index.js +1 -1
- package/dist/cli/plugins/app.d.ts +10 -4
- package/dist/cli/plugins/app.js +15 -5
- package/dist/cli/plugins/better-supabase.d.ts +1 -1
- package/dist/cli/plugins/openapi.d.ts +1 -1
- package/dist/cli/plugins/openapi.js +1 -1
- package/dist/cli/plugins/powersync.d.ts +1 -1
- package/dist/cli/plugins/powersync.js +1 -1
- package/dist/cli/plugins/rls.d.ts +2 -2
- package/dist/cli/plugins/rls.js +1 -1
- package/dist/cli/plugins/schemas.d.ts +1 -1
- package/dist/cli/plugins/schemas.js +1 -1
- package/dist/cli/plugins/scim.d.ts +2 -2
- package/dist/cli/plugins/supabase-hook.d.ts +2 -2
- package/dist/cli/plugins/supabase-hook.js +1 -1
- package/dist/cli/plugins/supabase.d.ts +3 -3
- package/dist/cli/plugins/supabase.js +2 -2
- package/dist/cli/plugins/ui.d.ts +1 -1
- package/dist/cli/plugins/ui.js +1 -1
- package/dist/{cloud-BfEI9TLS.js → cloud-g-922e2y.js} +1 -1
- package/dist/{codemod-DwH0IZ2x.js → codemod-9WzZaZsY.js} +1 -1
- package/dist/{codemod-p67ePW25.js → codemod-BrSNfQG4.js} +2 -2
- package/dist/{compile-Blrr5WWw.js → compile-DVzlNtwB.js} +1 -1
- package/dist/{completion-CfrZOGcB.js → completion-Duu9XUtU.js} +1 -1
- package/dist/{config-D6gh_xvs.js → config-B46LCIi1.js} +1 -1
- package/dist/{config-report-BaHEBpt-.js → config-report-BwSd_ErT.js} +1 -1
- package/dist/{doctor-DCsyH7YR.js → doctor-BaqGN07N.js} +2 -2
- package/dist/{doctor-Bg12v-8M.js → doctor-CNV-I5-C.js} +13 -13
- package/dist/{execute-SN8_dlch.js → execute-DVGgG2j9.js} +1 -1
- package/dist/{gen-B4GUqsfM.js → gen-DovbVJ0i.js} +31 -23
- package/dist/{gen-kind-Bahz_i3U.js → gen-kind-DRWg-ta4.js} +3 -1
- package/dist/gen-rrMLA6rz.js +1 -0
- package/dist/{generate-CbtjKcjn.js → generate-DBmalxoO.js} +1 -1
- package/dist/{generate-options-BDgadlwe.js → generate-options-WJQoS1Lu.js} +112 -31
- package/dist/{generate-B-msjuaO.js → generate-yGW045al.js} +10 -11
- package/dist/{hook-sql-BIR4fL7i.js → hook-sql-FU-vnUkl.js} +3 -3
- package/dist/{import-BZi1tZxq.js → import-C7tYaABo.js} +1 -1
- package/dist/{init-K3tKOwf4.js → init-CN7tPYLP.js} +3 -3
- package/dist/{init-9cqnSJWG.js → init-CntB_X4r.js} +1 -1
- package/dist/{login-CP0UxnLw.js → login-CnR0EQd6.js} +1 -1
- package/dist/{login-C1I5KIsK.js → login-gwlxVT40.js} +3 -3
- package/dist/{manifest-DvS2IoXo.js → manifest-B2syNUwo.js} +30 -30
- package/dist/next/plugin.d.ts +1 -1
- package/dist/{openapi-BT5XY7HY.js → openapi-C4btogJT.js} +1 -1
- package/dist/{openapi-document-Ca5yAjc6.js → openapi-document-BqXMCObA.js} +1 -1
- package/dist/{openapi-BHqqNSoG.js → openapi-qD85gUJ5.js} +1 -1
- package/dist/{output-djxu62oH.js → output-ubzzotuT.js} +1 -1
- package/dist/{ownership-BO0sI5FB.js → ownership-Cw5-N2Ul.js} +1 -1
- package/dist/{plugin-DGmbeXwA.d.ts → plugin-1XW5OfAZ.d.ts} +1 -1
- package/dist/{policy-BhSUlHRr.js → policy-C3-aUrcn.js} +1 -1
- package/dist/{policy-bundle-97xaDULc.js → policy-bundle-COTjSP1d.js} +3 -3
- package/dist/{powersync-DdDLP02A.js → powersync-3MJa650H.js} +4 -4
- package/dist/{powersync-CN7IQIKk.js → powersync-BcIQ5rz6.js} +1 -1
- package/dist/{powersync-m9uYgCFF.js → powersync-DzFm4hgt.js} +1 -1
- package/dist/pull-8AsfQuQR.js +1 -0
- package/dist/{pull-9oQvY18T.js → pull-AjAqYEpz.js} +1 -1
- package/dist/{resolve-names-Cmg6SPAa.js → resolve-names-Bb6tL3EI.js} +1 -1
- package/dist/{rls-Cv1V8YfI.js → rls-GYIzJF3m.js} +5 -5
- package/dist/{rls-files-Bj446vbj.js → rls-files-D1aDyRlu.js} +1 -1
- package/dist/{rls-BrsMogAP.js → rls-fzNIKj80.js} +1 -1
- package/dist/{rls-options-Dpj_pEyU.d.ts → rls-options-CEpg5nDP.d.ts} +1 -1
- package/dist/{run-DX4D6S6V.js → run-Cs9E4tsz.js} +2 -2
- package/dist/run-Dordj5mh.js +1 -0
- package/dist/{scan-Cj7PQLrS.js → scan-CoG-QiZ6.js} +1 -1
- package/dist/{schema-CJPvTfeN.js → schema-C1J6y5a1.js} +1 -1
- package/dist/{skills-Cr1C0b9D.js → skills-ByTBjMpX.js} +1 -1
- package/dist/{skills-B5bc6JIA.js → skills-CkRRq5tM.js} +1 -1
- package/dist/{supabase-BG1HPdQU.js → supabase-DlINOaAC.js} +1 -1
- package/dist/supabase-hook-BMBUDtLU.js +2 -0
- package/dist/{supabase-hook-tdR45aXY.js → supabase-hook-CjVG8JJC.js} +1 -1
- package/dist/{tables-CRTCBuFi.js → tables-BYICzaNo.js} +24 -13
- package/dist/{types-D8VXQxKL.d.ts → types-nXo_oQYk.d.ts} +6 -2
- package/dist/unplugin/index.d.ts +1 -1
- package/dist/{usage-B-E747wO.js → usage-CFSPH513.js} +1 -1
- package/dist/usage-DfponlA-.js +1 -0
- package/dist/{usage-B7nx0_aa.js → usage-EQlT--OM.js} +2 -2
- package/dist/{verify-9HObfifg.js → verify-BNhn8P33.js} +3 -3
- package/package.json +1 -1
- package/dist/gen-BC66z5Fd.js +0 -1
- package/dist/pull-jvJPMQhP.js +0 -1
- package/dist/run-decqEKNa.js +0 -1
- package/dist/supabase-hook-hd9abKy4.js +0 -2
- package/dist/usage-rqQ9ViXv.js +0 -1
|
@@ -7,7 +7,7 @@ import { i as fileDrift } from "./output-files-DNid6TBl.js";
|
|
|
7
7
|
import { t as shortDiff } from "./text-diff-CsglY49A.js";
|
|
8
8
|
import { i as readJsonFile, s as writeFileEnsuringDir } from "./files-DAR51W3J.js";
|
|
9
9
|
import { a as loadModule, n as asPolicy, s as pickNamed, t as asPermissionTree } from "./load-CZnlAyZ8.js";
|
|
10
|
-
import { n as validateOverlay, t as validateOpenapi } from "./schema-
|
|
10
|
+
import { n as validateOverlay, t as validateOpenapi } from "./schema-C1J6y5a1.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-C4btogJT.js");
|
|
7
7
|
const outcome = await runOpenapi({
|
|
8
8
|
cwd: source.cwd,
|
|
9
9
|
config: source.config,
|
|
@@ -81,7 +81,7 @@ const importDocument = defineLeaf({
|
|
|
81
81
|
async run(ctx, { flags }) {
|
|
82
82
|
const doc = given(flags.doc);
|
|
83
83
|
if (doc === void 0) throw missingInput("openapi import", ["--doc"], "the OpenAPI document to import");
|
|
84
|
-
return (await import("./import-
|
|
84
|
+
return (await import("./import-C7tYaABo.js")).runOpenapiImport({
|
|
85
85
|
cwd: ctx.cwd,
|
|
86
86
|
doc,
|
|
87
87
|
out: fileOut("openapi import", flags.out),
|
|
@@ -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-B2syNUwo.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
|
|
@@ -6,7 +6,7 @@ import { i as qualifySqlTable } from "./sql-T4GaBh9X.js";
|
|
|
6
6
|
import { l as roleColumn } from "./sources-DnjJPGfb.js";
|
|
7
7
|
import { i as configError } from "./errors-DgLOqc6j.js";
|
|
8
8
|
import { a as quoteIdent, i as qualified, n as declaredArray, o as quoteLiteral, s as quoteQualified } from "./quote-BKrTBbcH.js";
|
|
9
|
-
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-
|
|
9
|
+
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-BYICzaNo.js";
|
|
10
10
|
// src/cli/rls/assignments.ts
|
|
11
11
|
/**
|
|
12
12
|
* The client roles whose writes the assignment triggers check; any other role
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { D as Policy, Tn as Scope, _ as Grant, kr as Condition } from "./policy-types-93NwI8iI.js";
|
|
2
|
-
import { o as PermDockConfig } from "./types-
|
|
2
|
+
import { o as PermDockConfig } from "./types-nXo_oQYk.js";
|
|
3
3
|
import { P as ResourceNode } from "./vocabulary-FYgI_NoI.js";
|
|
4
4
|
/** The settings of `supabase/config.toml` doctor reads. */
|
|
5
5
|
type SupabaseConfig = {
|
|
@@ -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-COTjSP1d.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 { n as compileGrants } from "./compile-
|
|
4
|
-
import {
|
|
2
|
+
import { i as buildContext, n as isRefusal, o as inheritTargets, t as generateOptions } from "./generate-options-WJQoS1Lu.js";
|
|
3
|
+
import { n as compileGrants } from "./compile-DVzlNtwB.js";
|
|
4
|
+
import { G as POLICY_BUNDLE_FORMAT, K as bundleLoaderSql, i as tableNames, q as policyBundle } from "./tables-BYICzaNo.js";
|
|
5
5
|
import { existsSync, readFileSync } from "node:fs";
|
|
6
6
|
import { resolve } from "node:path";
|
|
7
7
|
// src/cli/policy-bundle.ts
|
|
@@ -8,7 +8,7 @@ import { i as fileDrift } from "./output-files-DNid6TBl.js";
|
|
|
8
8
|
import { n as fixtureSubject, r as loadFixtures, t as fixtureRow } from "./fixtures-Bm0G0A7H.js";
|
|
9
9
|
import { n as pgConnector } from "./pg-CA651850.js";
|
|
10
10
|
import { c as requirePolicy } from "./load-CZnlAyZ8.js";
|
|
11
|
-
import { t as canFixture } from "./verify-
|
|
11
|
+
import { t as canFixture } from "./verify-BNhn8P33.js";
|
|
12
12
|
import { a as roleNames, i as collectGrants, t as assignableRoles } from "./grants-BzjbUCdR.js";
|
|
13
13
|
import { a as quoteIdent, s as quoteQualified } from "./quote-BKrTBbcH.js";
|
|
14
14
|
import { a as scopeMembershipTable, i as scopeColumn } from "./compile-BUKXrueE.js";
|
|
@@ -18,9 +18,9 @@ import { d as keptKeys, t as AUTHZ_VERSION_TABLE } from "./sources-DnjJPGfb.js";
|
|
|
18
18
|
import { a as customRolesOn, t as CUSTOM_ROLES } from "./shared-BdF5DJDQ.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 { i as tableFor } from "./compile-
|
|
23
|
-
import { i as tableNames, r as tableNameOf } from "./tables-
|
|
21
|
+
import { t as ownershipRules } from "./ownership-Cw5-N2Ul.js";
|
|
22
|
+
import { i as tableFor } from "./compile-DVzlNtwB.js";
|
|
23
|
+
import { i as tableNames, r as tableNameOf } from "./tables-BYICzaNo.js";
|
|
24
24
|
import { l as policyLevels } from "./policy-DFD2J5o_.js";
|
|
25
25
|
import { r as contextRefs, t as andConditions } from "./conditions-CkHgXoZB.js";
|
|
26
26
|
import { p as scopeField } from "./tenancy-B5Xxt9Sc.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-DzFm4hgt.js");
|
|
28
28
|
return runPowerSync({
|
|
29
29
|
cwd: ctx.cwd,
|
|
30
30
|
config: ctx.config,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { r as powersyncFiles, t as runPowerSync } from "./powersync-
|
|
1
|
+
export { r as powersyncFiles, t as runPowerSync } from "./powersync-3MJa650H.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { n as runCloudPull } from "./pull-AjAqYEpz.js";
|
|
@@ -4,7 +4,7 @@ import { n as parseSupabaseManifest } from "./manifest-B-8d2lhG.js";
|
|
|
4
4
|
import { o as formatCatalogJson } from "./catalog-doc-Bp5khmCG.js";
|
|
5
5
|
import { t as catalogPath } from "./catalog-path-bG0XxHMu.js";
|
|
6
6
|
import { a as describeError } from "./errors-DgLOqc6j.js";
|
|
7
|
-
import { a as nonEmptyOr } from "./output-
|
|
7
|
+
import { a as nonEmptyOr } from "./output-ubzzotuT.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";
|
|
@@ -5,7 +5,7 @@ import "./budget-BH81q2cj.js";
|
|
|
5
5
|
import "./sources-DnjJPGfb.js";
|
|
6
6
|
import { i as configError } from "./errors-DgLOqc6j.js";
|
|
7
7
|
import { t as FIELD_VIEWS } from "./fields-6d1j-q3c.js";
|
|
8
|
-
import { C as forUserContext,
|
|
8
|
+
import { C as forUserContext, Z as graphPlan, d as permittedByPermissionHelper, i as tableNames, o as PERMISSION_HELPERS, p as holderSources, s as checkName, w as grantBodies } from "./tables-BYICzaNo.js";
|
|
9
9
|
import { D as idTypeOf, O as scopeTypeOf } from "./shared-BdF5DJDQ.js";
|
|
10
10
|
import { G as graphHelper, K as graphSqlName, Q as isTeamScope, T as globalRoleRows, X as hasPermittedUsers, Z as inheritedRowsHelper, ct as restrictedHelper, et as memberForHelper, f as holderBody, it as memberOfHelper, ot as permittedForHelper, rt as memberIdsHelper, st as permittedIdsHelper, ut as scopeTable } from "./interactive-only-BZu9rLpa.js";
|
|
11
11
|
import { a as quoteIdent, i as qualified, o as quoteLiteral, s as quoteQualified } from "./quote-BKrTBbcH.js";
|
|
@@ -2,13 +2,13 @@ import "./sources-DnjJPGfb.js";
|
|
|
2
2
|
import { a as describeError, f as usageResult, o as exitCodeOfError } from "./errors-DgLOqc6j.js";
|
|
3
3
|
import { i as requirePeer, n as packageManagerOf, t as addLine } from "./peer-D77JpXe-.js";
|
|
4
4
|
import { n as pgConnector, t as connectPgPool } from "./pg-CA651850.js";
|
|
5
|
-
import { f as isSupabaseSchemas, m as schemasRefusal } from "./hook-sql-
|
|
6
|
-
import { a as nonEmptyOr } from "./output-
|
|
7
|
-
import { n as describeExplain, t as runRlsGenerate } from "./generate-
|
|
8
|
-
import { a as COLUMNS_SQL, o as INDEX_COLUMNS_SQL, u as readTableIndexFacts } from "./compile-
|
|
5
|
+
import { f as isSupabaseSchemas, m as schemasRefusal } from "./hook-sql-FU-vnUkl.js";
|
|
6
|
+
import { a as nonEmptyOr } from "./output-ubzzotuT.js";
|
|
7
|
+
import { n as describeExplain, t as runRlsGenerate } from "./generate-yGW045al.js";
|
|
8
|
+
import { a as COLUMNS_SQL, o as INDEX_COLUMNS_SQL, u as readTableIndexFacts } from "./compile-DVzlNtwB.js";
|
|
9
9
|
import { r as escapeSqlIdent } from "./sql-T4GaBh9X.js";
|
|
10
10
|
import { t as beforeFirst } from "./text-D704xHVl.js";
|
|
11
|
-
import { a as verifyResult, c as callsHelper, i as verifyIgnores, l as helperCallKeys, n as runRlsVerify, o as HELPER_TABLES, r as rlsFinding } from "./verify-
|
|
11
|
+
import { a as verifyResult, c as callsHelper, i as verifyIgnores, l as helperCallKeys, n as runRlsVerify, o as HELPER_TABLES, r as rlsFinding } from "./verify-BNhn8P33.js";
|
|
12
12
|
import { c as ACTOR_MAY_WRITE, p as readOnlyActorKinds } from "./fields-6d1j-q3c.js";
|
|
13
13
|
import { r as parseRbacAuthorize } from "./rbac-B-49toAp.js";
|
|
14
14
|
import { delimiter, join } from "node:path";
|
|
@@ -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-DNid6TBl.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-yGW045al.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) {
|
|
@@ -192,7 +192,7 @@ async function rlsInput(ctx, verb, shape, options) {
|
|
|
192
192
|
};
|
|
193
193
|
}
|
|
194
194
|
async function runRls(input) {
|
|
195
|
-
return (await import("./rls-
|
|
195
|
+
return (await import("./rls-GYIzJF3m.js")).runRls(input);
|
|
196
196
|
}
|
|
197
197
|
({
|
|
198
198
|
...shapeFlags,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { b as SupabaseSchemas, u as RlsConfig, v as RlsTarget } from "./types-
|
|
1
|
+
import { b as SupabaseSchemas, u as RlsConfig, v as RlsTarget } from "./types-nXo_oQYk.js";
|
|
2
2
|
/**
|
|
3
3
|
* `rls.seeds` as a mode, or `false` to skip the rows, or where they are
|
|
4
4
|
* written.
|
|
@@ -3,9 +3,9 @@ import { a as resolveCwd, i as readConfig, o as withPluginOutputs } from "./conf
|
|
|
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-0EWFk-4S.js";
|
|
6
|
-
import { c as confirmationRequired, d as quote, f as replayArgv, i as githubAnnotations, l as consentDigest, n as errorDocument, o as resultDocument, s as sarifLog, t as dataOf, u as consentReasons } from "./output-
|
|
6
|
+
import { c as confirmationRequired, d as quote, f as replayArgv, i as githubAnnotations, l as consentDigest, n as errorDocument, o as resultDocument, s as sarifLog, t as dataOf, u as consentReasons } from "./output-ubzzotuT.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-B2syNUwo.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-Cs9E4tsz.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-Bd-m2Fe_.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-bJfT8aIA.js";
|
|
2
2
|
import { r as isRecord } from "./compact-C4LFuqbW.js";
|
|
3
3
|
import { t as DRAFT_PINS } from "./pins-CXXkVEiD.js";
|
|
4
|
-
import { a as nonEmptyOr } from "./output-
|
|
4
|
+
import { a as nonEmptyOr } from "./output-ubzzotuT.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";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as byCodePoint } from "./compare-dfHDj8kT.js";
|
|
2
2
|
import { t as didYouMean } from "./args-0EWFk-4S.js";
|
|
3
|
-
import { a as nonEmptyOr } from "./output-
|
|
3
|
+
import { a as nonEmptyOr } from "./output-ubzzotuT.js";
|
|
4
4
|
import { i as readJsonFile, s as writeFileEnsuringDir } from "./files-DAR51W3J.js";
|
|
5
5
|
import { l as packageRoot } from "./version-D-jWyJb9.js";
|
|
6
6
|
import { cpSync, existsSync, lstatSync, readFileSync, readdirSync, readlinkSync, realpathSync } from "node:fs";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as defineLeaf } from "./command-9GAzSI7E.js";
|
|
2
2
|
import { t as checkFlag } from "./flags-C0e-BzGW.js";
|
|
3
3
|
import { r as pick, t as CANCELLED } from "./prompt-CSXHcJxy.js";
|
|
4
|
-
import { n as detectedAgents, r as runSkills, t as SKILL_AGENTS } from "./skills-
|
|
4
|
+
import { n as detectedAgents, r as runSkills, t as SKILL_AGENTS } from "./skills-ByTBjMpX.js";
|
|
5
5
|
// src/cli/commands/skills.ts
|
|
6
6
|
const forFlag = { for: {
|
|
7
7
|
type: "string",
|
|
@@ -15,7 +15,7 @@ const inspect = defineLeaf({
|
|
|
15
15
|
},
|
|
16
16
|
async run(ctx, { flags }) {
|
|
17
17
|
const out = flags.out === "" ? true : flags.out === "-" ? void 0 : flags.out;
|
|
18
|
-
const { runSupabase } = await import("./supabase-hook-
|
|
18
|
+
const { runSupabase } = await import("./supabase-hook-BMBUDtLU.js");
|
|
19
19
|
return runSupabase({
|
|
20
20
|
cwd: ctx.cwd,
|
|
21
21
|
config: ctx.config,
|
|
@@ -6,7 +6,7 @@ import { i as readJsonFile, o as sqlFiles, s as writeFileEnsuringDir } from "./f
|
|
|
6
6
|
import { n as formatManifestJson, t as MANIFEST_FILE } from "./manifest-json-DMaBWmcG.js";
|
|
7
7
|
import { c as requirePolicy } from "./load-CZnlAyZ8.js";
|
|
8
8
|
import { n as hookUri } from "./rbac-B-49toAp.js";
|
|
9
|
-
import { a as supabaseHookSql, c as asideAuthzReceive, f as isSupabaseSchemas, h as declarativeSql, i as supabaseHookManifest, l as configToml, m as schemasRefusal, n as hooklessDatabase, o as defaultOut, p as resolveSchemas, r as supabaseDatabaseManifest, s as hookMarker, t as grantsLabel } from "./hook-sql-
|
|
9
|
+
import { a as supabaseHookSql, c as asideAuthzReceive, f as isSupabaseSchemas, h as declarativeSql, i as supabaseHookManifest, l as configToml, m as schemasRefusal, n as hooklessDatabase, o as defaultOut, p as resolveSchemas, r as supabaseDatabaseManifest, s as hookMarker, t as grantsLabel } from "./hook-sql-FU-vnUkl.js";
|
|
10
10
|
import { r as HOOK_MARKER, s as hookMarkerFields } from "./markers-C-kThnKN.js";
|
|
11
11
|
import { a as supabaseConfig } from "./supabase-config-mXcggV5I.js";
|
|
12
12
|
import { t as readMemberships } from "./read-memberships-BkePIa1F.js";
|
|
@@ -12,7 +12,7 @@ import { d as restrictedRowsSql, i as scopeColumn, l as relationArmSql } from ".
|
|
|
12
12
|
import { t as AUTHZ_VERSION_TABLE } from "./sources-DnjJPGfb.js";
|
|
13
13
|
import { a as quoteIdent, c as quoteTable, i as qualified, o as quoteLiteral, r as helperSchema, s as quoteQualified } from "./quote-BKrTBbcH.js";
|
|
14
14
|
import { A as tenantTypeOf, D as idTypeOf, O as scopeTypeOf, _ as subjectClaimJsonSql, d as keyTenantSql, f as kindFilterSql, h as roleKindSql, i as allowEntry, m as memberVia, n as GLOBAL_ROLES, o as rootName, r as HELPERS, s as signedIn, t as CUSTOM_ROLES, v as subjectClaimSql, x as userIdHelperSql, y as subjectIdSql } from "./shared-BdF5DJDQ.js";
|
|
15
|
-
import { $ as linkHelper, A as userActive, B as trustedReaderGrants, C as sourcesKeep, D as keyTenantLine, E as instancesActive, F as perScope, G as graphHelper, H as byKey, I as raiseSql, J as hasMemberFor, K as graphSqlName, L as roleReadersSql, M as currentKeyExpr, N as customRolesSql, P as hasCustomRoleChecksFor, Q as isTeamScope, R as rolesTableScope, S as sourcesBodyOf, V as byCodeUnit, W as CLOSURE, Y as hasMemberOf, _ as memoizes, at as memberRoleOf, b as sourceIdOf, c as claimTenant, ct as restrictedHelper, d as hasBody, dt as activeInstancesSql, et as memberForHelper, ft as activeMembershipSql, g as memoizedSetofSql, gt as grantPermissionSql, h as memoWriteSql, it as memberOfHelper, j as globalRoleSource, l as disabledColumn, lt as scopeSources, m as memoHitList, mt as activeUserSql, n as interactiveAllowsCall, o as memoUserSql, ot as permittedForHelper, p as memberColumn, pt as activeRowSql, q as graphSqlText, r as interactiveAllowsSql, rt as memberIdsHelper, s as claimKeptLines, st as permittedIdsHelper, tt as memberForSources, u as functionBody, ut as scopeTable, v as scopedBody, w as sqlBody, x as sourceRows, y as sourceFilters, z as storedTenant } from "./interactive-only-BZu9rLpa.js";
|
|
15
|
+
import { $ as linkHelper, A as userActive, B as trustedReaderGrants, C as sourcesKeep, D as keyTenantLine, E as instancesActive, F as perScope, G as graphHelper, H as byKey, I as raiseSql, J as hasMemberFor, K as graphSqlName, L as roleReadersSql, M as currentKeyExpr, N as customRolesSql, P as hasCustomRoleChecksFor, Q as isTeamScope, R as rolesTableScope, S as sourcesBodyOf, V as byCodeUnit, W as CLOSURE, Y as hasMemberOf, _ as memoizes, a as interactiveSessionSql, at as memberRoleOf, b as sourceIdOf, c as claimTenant, ct as restrictedHelper, d as hasBody, dt as activeInstancesSql, et as memberForHelper, ft as activeMembershipSql, g as memoizedSetofSql, gt as grantPermissionSql, h as memoWriteSql, it as memberOfHelper, j as globalRoleSource, l as disabledColumn, lt as scopeSources, m as memoHitList, mt as activeUserSql, n as interactiveAllowsCall, o as memoUserSql, ot as permittedForHelper, p as memberColumn, pt as activeRowSql, q as graphSqlText, r as interactiveAllowsSql, rt as memberIdsHelper, s as claimKeptLines, st as permittedIdsHelper, tt as memberForSources, u as functionBody, ut as scopeTable, v as scopedBody, w as sqlBody, x as sourceRows, y as sourceFilters, z as storedTenant } from "./interactive-only-BZu9rLpa.js";
|
|
16
16
|
import { createHash } from "node:crypto";
|
|
17
17
|
// src/cli/rls/graph.ts
|
|
18
18
|
function tableFor(resource, tables) {
|
|
@@ -623,6 +623,12 @@ function permissionOf(plan, expr) {
|
|
|
623
623
|
function apiKeyAllowsCall(ctx, grant) {
|
|
624
624
|
return `${qualified(ctx, API_KEY_ALLOWS)}(${grant})`;
|
|
625
625
|
}
|
|
626
|
+
function apiKeyUnlimitedSql(key) {
|
|
627
|
+
return `${key} is null or ${key} = 'null'::jsonb`;
|
|
628
|
+
}
|
|
629
|
+
function apiKeyClaimSql(ctx, plan) {
|
|
630
|
+
return subjectClaimJsonSql(ctx, plan.claim);
|
|
631
|
+
}
|
|
626
632
|
function apiKeyAllowsSql(ctx, plan, anonExecute) {
|
|
627
633
|
const fn = qualified(ctx, API_KEY_ALLOWS);
|
|
628
634
|
const scopes = `k -> ${quoteLiteral(plan.scopes)}`;
|
|
@@ -638,7 +644,7 @@ security definer
|
|
|
638
644
|
set search_path = ''
|
|
639
645
|
as $$
|
|
640
646
|
select case
|
|
641
|
-
when k
|
|
647
|
+
when ${apiKeyUnlimitedSql("k")} then true
|
|
642
648
|
when exists (
|
|
643
649
|
select 1 from ${qualified(ctx, "role_permissions")} rp
|
|
644
650
|
where rp.grant_key = p_grant and rp.effect = 'deny'
|
|
@@ -2098,6 +2104,14 @@ function tokenScopesPlan(setting, policy) {
|
|
|
2098
2104
|
}));
|
|
2099
2105
|
return { scopes: delegatedScopeMap(permissions, policy.oauthScopes) };
|
|
2100
2106
|
}
|
|
2107
|
+
function tokenScopeUnlimitedSql(ctx) {
|
|
2108
|
+
const act = subjectClaimJsonSql(ctx, "act");
|
|
2109
|
+
return `coalesce(${subjectClaimSql(ctx, "client_id")}, '') = ''
|
|
2110
|
+
and (${act} is null
|
|
2111
|
+
or ${act} = 'null'::jsonb
|
|
2112
|
+
or (jsonb_typeof(${act}) = 'object'
|
|
2113
|
+
and ${act} ->> 'kind' in ('support', 'impersonation')))`;
|
|
2114
|
+
}
|
|
2101
2115
|
function tokenScopeAllowsCall(ctx, grant) {
|
|
2102
2116
|
return `${qualified(ctx, TOKEN_SCOPE_ALLOWS)}(${grant})`;
|
|
2103
2117
|
}
|
|
@@ -2123,7 +2137,6 @@ function tokenScopeRows(ctx) {
|
|
|
2123
2137
|
function tokenScopeAllowsSql(ctx, plan, anonExecute) {
|
|
2124
2138
|
const fn = qualified(ctx, TOKEN_SCOPE_ALLOWS);
|
|
2125
2139
|
const map = qualified(ctx, TOKEN_SCOPE_MAP);
|
|
2126
|
-
const act = subjectClaimJsonSql(ctx, "act");
|
|
2127
2140
|
const grants = anonExecute ? `revoke execute on function ${fn}(text) from public;
|
|
2128
2141
|
grant execute on function ${fn}(text) to anon, authenticated;` : `revoke execute on function ${fn}(text) from public, anon;
|
|
2129
2142
|
grant execute on function ${fn}(text) to authenticated;`;
|
|
@@ -2146,11 +2159,7 @@ security definer
|
|
|
2146
2159
|
set search_path = ''
|
|
2147
2160
|
as $$
|
|
2148
2161
|
select case
|
|
2149
|
-
when
|
|
2150
|
-
and (${act} is null
|
|
2151
|
-
or ${act} = 'null'::jsonb
|
|
2152
|
-
or (jsonb_typeof(${act}) = 'object'
|
|
2153
|
-
and ${act} ->> 'kind' in ('support', 'impersonation'))) then true
|
|
2162
|
+
when ${tokenScopeUnlimitedSql(ctx)} then true
|
|
2154
2163
|
when exists (
|
|
2155
2164
|
select 1 from ${qualified(ctx, "role_permissions")} rp
|
|
2156
2165
|
where rp.grant_key = p_grant and rp.effect = 'deny'
|
|
@@ -2522,17 +2531,19 @@ function grantBodies(ctx) {
|
|
|
2522
2531
|
const scoped = ctx.tokenScopes !== void 0;
|
|
2523
2532
|
const interactive = ctx.interactiveOnly !== void 0;
|
|
2524
2533
|
const set = ctx.grantSet === true;
|
|
2525
|
-
const ceiling = (grant) => {
|
|
2534
|
+
const ceiling = (grant, once) => {
|
|
2526
2535
|
const calls = [
|
|
2527
2536
|
...keys === void 0 ? [] : [apiKeyAllowsCall(ctx, grant)],
|
|
2528
2537
|
...scoped ? [tokenScopeAllowsCall(ctx, grant)] : [],
|
|
2529
2538
|
...interactive ? [interactiveAllowsCall(ctx, grant)] : []
|
|
2530
2539
|
];
|
|
2531
|
-
|
|
2540
|
+
if (calls.length === 0) return;
|
|
2541
|
+
if (set) return `((select ${interactiveSessionSql(ctx)}) or (${calls.join(" and ")}))`;
|
|
2542
|
+
return once ? calls.map((call) => `(select ${call})`).join(" and ") : calls.join(" and ");
|
|
2532
2543
|
};
|
|
2533
|
-
const allows = ceiling(set ? "ids.grant_key" : "p_grant");
|
|
2544
|
+
const allows = ceiling(set ? "ids.grant_key" : "p_grant", true);
|
|
2534
2545
|
const keyTenant = keys === void 0 ? "" : ` and ${keyTenantSql(ctx, void 0) ?? "true"}`;
|
|
2535
|
-
const hasAllows = ceiling(set ? "g.grant_key" : "p_grant");
|
|
2546
|
+
const hasAllows = ceiling(set ? "g.grant_key" : "p_grant", false);
|
|
2536
2547
|
return {
|
|
2537
2548
|
has: memoBody(ctx, "global", "boolean", sqlBody(hasAllows === void 0 ? hasBody(ctx) : set ? ` select g.grant_key
|
|
2538
2549
|
from (
|
|
@@ -3237,4 +3248,4 @@ function resolveVias(tables, scopes, dialect) {
|
|
|
3237
3248
|
}
|
|
3238
3249
|
return Object.keys(out).length === 0 ? void 0 : out;
|
|
3239
3250
|
}
|
|
3240
|
-
export {
|
|
3251
|
+
export { tokenScopeUnlimitedSql as A, apiKeyUnlimitedSql as B, forUserContext as C, seedSql as D, memoReadsSql as E, capabilityAccessSql as F, POLICY_BUNDLE_FORMAT as G, HOOK_TEAM_READER as H, API_KEY_ALLOWS as I, closureBackfillSql as J, bundleLoaderSql as K, apiKeyAllowsCall as L, memoReadTriggersSql as M, guardAuthAdminGrants as N, TOKEN_SCOPE_ALLOWS as O, unguardAuthAdminGrants as P, graphSql as Q, apiKeyClaimSql as R, accessSql as S, helpersSql as T, hookTeamReader as U, apiKeysPlan as V, hookTeamsHelper as W, graphIdsSql as X, closureDepths as Y, graphPlan as Z, sourceTransferTriggerSql as _, tablelessResources as a, ASSIGNMENTS as b, permissionHelpersSql as c, permittedByPermissionHelper as d, requiresSql as f, sourceRowsSql as g, sourceHoldersTriggerSql as h, tableNames as i, tokenScopesPlan as j, tokenScopeAllowsCall as k, permissionKeysForHelper as l, pairsSql as m, resolveVias as n, PERMISSION_HELPERS as o, holderSources as p, policyBundle as q, tableNameOf as r, checkName as s, checkSharedTables as t, permissionKeysHelper as u, holdersTriggerSql as v, grantBodies as w, OWNERSHIP as x, transferTriggerSql as y, apiKeyFields as z };
|
|
@@ -1115,12 +1115,16 @@ type PermDockConfig = {
|
|
|
1115
1115
|
readonly seeds?: Seeds;
|
|
1116
1116
|
};
|
|
1117
1117
|
/** What `permdock gen --kind` writes. */
|
|
1118
|
-
type GenKind = "zod" | "valibot" | "arktype" | "json-schema" | "standard-schema" | "constants" | "factories" | "react" | "vue" | "svelte" | "solid" | "messages" | "bundle";
|
|
1118
|
+
type GenKind = "zod" | "valibot" | "arktype" | "json-schema" | "standard-schema" | "constants" | "types" | "sql" | "factories" | "react" | "vue" | "svelte" | "solid" | "messages" | "bundle";
|
|
1119
1119
|
/** `permdock gen` input. */
|
|
1120
1120
|
type GenConfig = {
|
|
1121
1121
|
/** The directory the generated files go to; default `src/permdock`. */
|
|
1122
1122
|
readonly out?: string;
|
|
1123
|
-
/**
|
|
1123
|
+
/**
|
|
1124
|
+
* The kinds `permdock gen` writes without `--kind`; default `['constants',
|
|
1125
|
+
* 'types', 'sql']`. `zod`, `valibot` and `factories` add `types`, which they
|
|
1126
|
+
* import.
|
|
1127
|
+
*/
|
|
1124
1128
|
readonly kinds?: readonly GenKind[];
|
|
1125
1129
|
/**
|
|
1126
1130
|
* Also write `fields.ts`: `<resource>Fields` per resource, with each field's
|
package/dist/unplugin/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { s as PermDockPluginOptions } from "../types-
|
|
1
|
+
import { s as PermDockPluginOptions } from "../types-nXo_oQYk.js";
|
|
2
2
|
import { createUnplugin } from "unplugin";
|
|
3
3
|
type CreateUnplugin = typeof createUnplugin<PermDockPluginOptions | undefined>;
|
|
4
4
|
export declare const createPermDockUnplugin: ReturnType<CreateUnplugin>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { t as runUsage } from "./usage-EQlT--OM.js";
|
|
@@ -2,8 +2,8 @@ import { a as getResource } from "./permission-registry-DMYRZVcn.js";
|
|
|
2
2
|
import { c as jsonSchemaOf } from "./catalog-doc-Bp5khmCG.js";
|
|
3
3
|
import { r as runCollect } from "./collect-BJZsuBW4.js";
|
|
4
4
|
import { f as usageResult } from "./errors-DgLOqc6j.js";
|
|
5
|
-
import { t as DOCS_BASE } from "./manifest-
|
|
6
|
-
import { r as findingOf } from "./output-
|
|
5
|
+
import { t as DOCS_BASE } from "./manifest-B2syNUwo.js";
|
|
6
|
+
import { r as findingOf } from "./output-ubzzotuT.js";
|
|
7
7
|
import { o as USAGE_REPORT_SCHEMA } from "./version-D-jWyJb9.js";
|
|
8
8
|
import { n as jiti, r as parseSync, t as createVisitor } from "./optional-CaQWp9HA.js";
|
|
9
9
|
import { a as rel, r as listSourceFiles } from "./files-DAR51W3J.js";
|
|
@@ -7,16 +7,16 @@ import { s as writeFileEnsuringDir } from "./files-DAR51W3J.js";
|
|
|
7
7
|
import { n as fixtureSubject, r as loadFixtures, t as fixtureRow } from "./fixtures-Bm0G0A7H.js";
|
|
8
8
|
import { n as pgConnector } from "./pg-CA651850.js";
|
|
9
9
|
import { o as loadPolicyAt } from "./load-CZnlAyZ8.js";
|
|
10
|
-
import { t as commandFor } from "./compile-
|
|
10
|
+
import { t as commandFor } from "./compile-DVzlNtwB.js";
|
|
11
11
|
import { r as isRecord } from "./compact-C4LFuqbW.js";
|
|
12
12
|
import { t as policyRowConditionKeys } from "./row-conditions-DwIJocfQ.js";
|
|
13
13
|
import { c as rootScope, d as scopeList, o as normalizeMemberships } from "./scopes-B-KX9EI8.js";
|
|
14
14
|
import { t as beforeFirst } from "./text-D704xHVl.js";
|
|
15
15
|
import { T as columnTypesOf, a as customRolesOn, r as HELPERS } from "./shared-BdF5DJDQ.js";
|
|
16
16
|
import { a as quoteIdent, c as quoteTable, o as quoteLiteral, s as quoteQualified } from "./quote-BKrTBbcH.js";
|
|
17
|
-
import {
|
|
17
|
+
import { Z as graphPlan, i as tableNames, r as tableNameOf } from "./tables-BYICzaNo.js";
|
|
18
18
|
import { s as viewName, t as FIELD_VIEWS } from "./fields-6d1j-q3c.js";
|
|
19
|
-
import { t as DOCS_BASE } from "./manifest-
|
|
19
|
+
import { t as DOCS_BASE } from "./manifest-B2syNUwo.js";
|
|
20
20
|
import { b as membershipsClaim, m as customRoleScope } from "./evaluate-D8SdfP3h.js";
|
|
21
21
|
import { n as defaultSqlCommand, t as SQL_IDENT } from "./sql-T4GaBh9X.js";
|
|
22
22
|
import "./budget-BH81q2cj.js";
|
package/package.json
CHANGED
package/dist/gen-BC66z5Fd.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { t as renderKinds } from "./gen-B4GUqsfM.js";
|
package/dist/pull-jvJPMQhP.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { n as runCloudPull } from "./pull-9oQvY18T.js";
|
package/dist/run-decqEKNa.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { t as run } from "./run-DX4D6S6V.js";
|
package/dist/usage-rqQ9ViXv.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { t as runUsage } from "./usage-B7nx0_aa.js";
|