permdock 0.37.0 → 0.38.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.
Files changed (92) hide show
  1. package/dist/{adoption-scan-sufK4R53.js → adoption-scan-D-uM3y5a.js} +1 -1
  2. package/dist/{arazzo-D0ctRNBU.js → arazzo-BdWGzdqv.js} +1 -1
  3. package/dist/{arazzo-BxtTsEK2.js → arazzo-CyENGJ-M.js} +1 -1
  4. package/dist/{bsb-access-tags-LCaE48SK.js → bsb-access-tags-C4iPlzjs.js} +1 -1
  5. package/dist/{casbin-CMEY_GT4.js → casbin-DdJndgnu.js} +1 -1
  6. package/dist/{casbin-CkLvGuUb.js → casbin-ILRPO6t9.js} +1 -1
  7. package/dist/cli/bin.js +1 -1
  8. package/dist/cli/generate/watch-worker.js +1 -1
  9. package/dist/cli/index.js +1 -1
  10. package/dist/cli/plugins/app.js +1 -1
  11. package/dist/cli/plugins/openapi.js +1 -1
  12. package/dist/cli/plugins/powersync.js +1 -1
  13. package/dist/cli/plugins/rls.js +1 -1
  14. package/dist/cli/plugins/schemas.js +1 -1
  15. package/dist/cli/plugins/supabase-hook.js +1 -1
  16. package/dist/cli/plugins/supabase.js +2 -2
  17. package/dist/cli/plugins/ui.js +1 -1
  18. package/dist/{cloud-N4IUVluH.js → cloud-C8bHMKjI.js} +1 -1
  19. package/dist/{codemod-C9SQqhNG.js → codemod-D02eYuzA.js} +4 -4
  20. package/dist/{codemod-D5a5oDJX.js → codemod-D8zh3IYV.js} +1 -1
  21. package/dist/{compile-BFV2WG67.js → compile-7tf8hHlu.js} +3 -3
  22. package/dist/{completion-BUWG1FGo.js → completion-BZShluF7.js} +1 -1
  23. package/dist/{config-B3Bc6Tly.js → config-ClypJwe2.js} +1 -1
  24. package/dist/{config-report-3IhYuH4v.js → config-report-Kb-mYv9F.js} +1 -1
  25. package/dist/{context-CNI2jibq.js → context-BQQzAw83.js} +1 -1
  26. package/dist/{custom-role-rebuild-QFXiMHqJ.js → custom-role-rebuild-CRz6Ip6J.js} +1 -1
  27. package/dist/{doctor-DP7HwXw_.js → doctor-DAx9dIEX.js} +2 -2
  28. package/dist/{doctor-DhpDQ5C6.js → doctor-XSdrG1SZ.js} +17 -17
  29. package/dist/{execute-g-nMgY4t.js → execute-DgCH7kEE.js} +3 -3
  30. package/dist/gen-Df-r9jpy.js +1 -0
  31. package/dist/{gen-kind-DLnQ-vCe.js → gen-kind-DIltjpY9.js} +1 -1
  32. package/dist/{gen-CTRqv1H2.js → gen-m1X9N8DZ.js} +2 -2
  33. package/dist/{generate-dbQzpEqb.js → generate-CIjPy_cH.js} +3 -3
  34. package/dist/{generate-DcPnvokU.js → generate-DWL9aXjZ.js} +11 -11
  35. package/dist/{generate-options-4jvPn7w3.js → generate-options-RvPqyMWE.js} +7 -7
  36. package/dist/{hook-sql-3yPtwas6.js → hook-sql-C24FFEWr.js} +5 -5
  37. package/dist/{import-DEUiWePf.js → import-Dmm7N9C6.js} +1 -1
  38. package/dist/{init-DqOKr99S.js → init-Cgcea11w.js} +1 -1
  39. package/dist/{init-CUviJnno.js → init-tXmJlH7f.js} +3 -3
  40. package/dist/{inspect-functions-Uv3Ndkty.js → inspect-functions-DbhgRvDf.js} +1 -1
  41. package/dist/{interactive-only-CylKSukS.js → interactive-only-ad2JJYk8.js} +12 -7
  42. package/dist/{keys-CA3SdBHQ.js → keys-B4JLF5VZ.js} +1 -1
  43. package/dist/{login-mcxQxTAL.js → login-DAqoZl0F.js} +1 -1
  44. package/dist/{login-BMONKzI_.js → login-fz4tUg2P.js} +3 -3
  45. package/dist/{manifest-tO5SjSGH.js → manifest-DbJC_rXj.js} +34 -34
  46. package/dist/{measure-r811lN7F.js → measure-R9VWfQ2y.js} +1 -1
  47. package/dist/{model-wt3wihiH.js → model-8NWofaam.js} +1 -1
  48. package/dist/{openapi-BZHc6R7A.js → openapi-BgXg8LkZ.js} +2 -2
  49. package/dist/{openapi-document-CHJI74v_.js → openapi-document-BJcbM0-l.js} +1 -1
  50. package/dist/{openapi-CNWuAQZi.js → openapi-uxD7ABpM.js} +1 -1
  51. package/dist/{output-Bfc3EpB2.js → output-DZS9QWHI.js} +1 -1
  52. package/dist/{ownership-BuQFLjZ5.js → ownership-DO5EF2nr.js} +2 -2
  53. package/dist/{pipeline-DW7cy40F.js → pipeline-IvdKfvuP.js} +2 -2
  54. package/dist/{policy-DTk6NZm-.js → policy-V-sHH2Ku.js} +1 -1
  55. package/dist/{policy-bundle-C7Hz9Rrs.js → policy-bundle-DyJKT9TF.js} +3 -3
  56. package/dist/{powersync-LpKFefiH.js → powersync-BY6r-MIk.js} +1 -1
  57. package/dist/{powersync-CeuhNT0R.js → powersync-BkN45DVg.js} +1 -1
  58. package/dist/{powersync-CoP_nlGj.js → powersync-IqzV6QHS.js} +6 -6
  59. package/dist/{prune-config-C0uSbf1I.js → prune-config-BRqnw6rb.js} +4 -4
  60. package/dist/{pull-A1SkxAyb.js → pull-PDxkxdGN.js} +1 -1
  61. package/dist/pull-n6noMzmE.js +1 -0
  62. package/dist/{rbac-Dx88RLxH.js → rbac-BK_wp3eK.js} +1 -1
  63. package/dist/{rename-RnOp8vDq.js → rename-BbdlodFz.js} +2 -2
  64. package/dist/{resolve-names-Ch5Ve5l4.js → resolve-names-B85N2-Ws.js} +2 -2
  65. package/dist/{rls-CHJbaZxj.js → rls-BkXnBVXx.js} +7 -7
  66. package/dist/{rls-DgYAJpVW.js → rls-DTXsf2zJ.js} +3 -3
  67. package/dist/{rls-files-RZ7PGrzg.js → rls-files-BJMmTuC9.js} +1 -1
  68. package/dist/run-DqqVLgh_.js +1 -0
  69. package/dist/{run-CbJPONx5.js → run-dwwtRWj6.js} +2 -2
  70. package/dist/{scan-DjTW-y6E.js → scan-BGTnZXgx.js} +1 -1
  71. package/dist/{schema-DVyxM9xS.js → schema-KPTMZVeK.js} +1 -1
  72. package/dist/{skills-BYc8rmHF.js → skills-CexZ2QfF.js} +1 -1
  73. package/dist/{skills-BdmjI4D2.js → skills-jPbcwqhX.js} +1 -1
  74. package/dist/{supabase-BAuqWNj3.js → supabase-DgHCnzMW.js} +2 -2
  75. package/dist/supabase-hook-8jAi64W9.js +2 -0
  76. package/dist/{supabase-hook-BbwsceID.js → supabase-hook-BIBC5Ihn.js} +5 -5
  77. package/dist/{supabase-schemas-RG58AMTu.js → supabase-schemas-DOc3cNnf.js} +1 -1
  78. package/dist/{table-reads--NupdCFw.js → table-reads-CMP1MnPJ.js} +1 -1
  79. package/dist/{table-reads-Glf0BHSE.js → table-reads-CXecyZKo.js} +1 -1
  80. package/dist/{tables-Dyfviku5.js → tables-C-DzDqKb.js} +4 -4
  81. package/dist/{tenant-check-Bfd4hotj.js → tenant-check-DoZibca6.js} +3 -3
  82. package/dist/{usage-7Hwk_akY.js → usage-BiTJQNJO.js} +2 -2
  83. package/dist/usage-D7-bsLte.js +1 -0
  84. package/dist/{usage-nZP7EeRj.js → usage-ltA8iGa4.js} +1 -1
  85. package/dist/{verify-DOCJgGlw.js → verify-Dj3OjNiD.js} +3 -3
  86. package/dist/{watch-DYsWhTvO.js → watch--c--3aEf.js} +1 -1
  87. package/package.json +1 -1
  88. package/dist/gen-D-orrO2e.js +0 -1
  89. package/dist/pull-CNMED72E.js +0 -1
  90. package/dist/run-iPVAxorh.js +0 -1
  91. package/dist/supabase-hook-CObLSH20.js +0 -2
  92. package/dist/usage-Bwl8YAmq.js +0 -1
@@ -3,9 +3,9 @@ import "./sources-C6Id63F8.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
5
  import { a as loadModule, r as leavesOf, s as pickNamed, t as asPermissionTree } from "./load-m7jmit3y.js";
6
- import { a as resolveAuthorize } from "./rbac-Dx88RLxH.js";
6
+ import { a as resolveAuthorize } from "./rbac-BK_wp3eK.js";
7
7
  import { a as customRolesOn, t as CUSTOM_ROLES } from "./shared-DnVY767H.js";
8
- import { n as legacyKeySql } from "./custom-role-rebuild-QFXiMHqJ.js";
8
+ import { n as legacyKeySql } from "./custom-role-rebuild-CRz6Ip6J.js";
9
9
  import { n as byKey } from "./compare-8SNJN-9U.js";
10
10
  import { a as quoteIdent, o as quoteLiteral } from "./quote-LNaBdCGA.js";
11
11
  import { a as nameOf, o as nodes, r as child, u as walk } from "./ast-CAOxvn9t.js";
@@ -5,11 +5,11 @@ import "./budget-BH81q2cj.js";
5
5
  import "./sources-C6Id63F8.js";
6
6
  import { i as configError } from "./errors-DgLOqc6j.js";
7
7
  import { t as FIELD_VIEWS } from "./fields-CKX-qjWb.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-Dyfviku5.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-C-DzDqKb.js";
9
9
  import { b as idTypeOf, x as scopeTypeOf } from "./subject-B7p94Y0s.js";
10
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-DwGleRKB.js";
11
11
  import { a as quoteIdent, i as qualified, o as quoteLiteral, s as quoteQualified } from "./quote-LNaBdCGA.js";
12
- import { D as globalRoleRows, m as holderBody } from "./interactive-only-CylKSukS.js";
12
+ import { D as globalRoleRows, m as holderBody } from "./interactive-only-ad2JJYk8.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
@@ -2,19 +2,19 @@ import "./sources-C6Id63F8.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-RG58AMTu.js";
6
- import { o as nonEmptyOr } from "./output-Bfc3EpB2.js";
5
+ import { n as resolveSchemas, r as schemasRefusal, t as isSupabaseSchemas } from "./supabase-schemas-DOc3cNnf.js";
6
+ import { o as nonEmptyOr } from "./output-DZS9QWHI.js";
7
7
  import { n as packageManagerOf, t as addLine } from "./peer-D77JpXe-.js";
8
- import { n as describeExplain, t as runRlsGenerate } from "./generate-DcPnvokU.js";
9
- import { c as INDEX_COLUMNS_SQL, f as readTableIndexFacts, s as COLUMNS_SQL } from "./compile-BFV2WG67.js";
8
+ import { n as describeExplain, t as runRlsGenerate } from "./generate-DWL9aXjZ.js";
9
+ import { c as INDEX_COLUMNS_SQL, f as readTableIndexFacts, s as COLUMNS_SQL } from "./compile-7tf8hHlu.js";
10
10
  import { r as escapeSqlIdent } from "./sql-T4GaBh9X.js";
11
11
  import { t as beforeFirst } from "./text-D704xHVl.js";
12
12
  import { a as conditionShown, i as callsHelper, o as helperCallKeys, t as HELPER_TABLES } from "./helper-calls-DN1PJcNY.js";
13
13
  import { u as isPlatformSchema } from "./report-x9GeUvjx.js";
14
14
  import { c as ACTOR_MAY_WRITE, p as readOnlyActorKinds } from "./fields-CKX-qjWb.js";
15
- import { a as verifyResult, i as verifyIgnores, n as runRlsVerify, r as rlsFinding } from "./verify-DOCJgGlw.js";
16
- import { r as parseRbacAuthorize } from "./rbac-Dx88RLxH.js";
17
- import { n as configuredTableReads } from "./table-reads--NupdCFw.js";
15
+ import { a as verifyResult, i as verifyIgnores, n as runRlsVerify, r as rlsFinding } from "./verify-Dj3OjNiD.js";
16
+ import { r as parseRbacAuthorize } from "./rbac-BK_wp3eK.js";
17
+ import { n as configuredTableReads } from "./table-reads-CMP1MnPJ.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";
@@ -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-CHJbaZxj.js")).runRls(input);
197
+ return (await import("./rls-BkXnBVXx.js")).runRls(input);
198
198
  }
199
199
  ({
200
200
  ...shapeFlags,
@@ -305,7 +305,7 @@ const report = defineLeaf({
305
305
  const [{ runRlsReport }, { pgConnector }, { configuredTableReads }] = await Promise.all([
306
306
  import("./report-Dp-ApWVC.js"),
307
307
  import("./pg-DtiDogUp.js"),
308
- import("./table-reads-Glf0BHSE.js")
308
+ import("./table-reads-CXecyZKo.js")
309
309
  ]);
310
310
  return runRlsReport({
311
311
  cwd: ctx.cwd,
@@ -349,7 +349,7 @@ 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-r811lN7F.js"),
352
+ import("./measure-R9VWfQ2y.js"),
353
353
  import("./pg-DtiDogUp.js"),
354
354
  import("./memberships-DiCbNRny.js")
355
355
  ]);
@@ -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-DcPnvokU.js";
6
+ import { t as runRlsGenerate } from "./generate-DWL9aXjZ.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) {
@@ -0,0 +1 @@
1
+ export { t as run } from "./run-dwwtRWj6.js";
@@ -3,9 +3,9 @@ import { a as readConfig, l as withPluginOutputs, s as resolveCwd } 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-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-Bfc3EpB2.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-DZS9QWHI.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-tO5SjSGH.js";
8
+ import { a as resolve, i as leaves, n as ROOT, r as SECTIONS, t as DOCS_BASE } from "./manifest-DbJC_rXj.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";
@@ -16,7 +16,7 @@ const scan = defineLeaf({
16
16
  }
17
17
  },
18
18
  async run(ctx, { flags }) {
19
- const { runAdoptionScan } = await import("./adoption-scan-sufK4R53.js");
19
+ const { runAdoptionScan } = await import("./adoption-scan-D-uM3y5a.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-Bfc3EpB2.js";
4
+ import { o as nonEmptyOr } from "./output-DZS9QWHI.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,7 +1,7 @@
1
1
  import { t as defineLeaf } from "./command-9GAzSI7E.js";
2
2
  import { t as checkFlag } from "./flags-DQzNPxg1.js";
3
3
  import { r as pick, t as CANCELLED } from "./prompt-CPlJn_4-.js";
4
- import { n as detectedAgents, r as runSkills, t as SKILL_AGENTS } from "./skills-BdmjI4D2.js";
4
+ import { n as detectedAgents, r as runSkills, t as SKILL_AGENTS } from "./skills-jPbcwqhX.js";
5
5
  // src/cli/commands/skills.ts
6
6
  const forFlag = { for: {
7
7
  type: "string",
@@ -1,6 +1,6 @@
1
1
  import { t as byCodePoint } from "./compare-dfHDj8kT.js";
2
2
  import { t as didYouMean } from "./args-BSpXxMnb.js";
3
- import { o as nonEmptyOr } from "./output-Bfc3EpB2.js";
3
+ import { o as nonEmptyOr } from "./output-DZS9QWHI.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";
@@ -20,7 +20,7 @@ const inspect = defineLeaf({
20
20
  },
21
21
  async run(ctx, { flags }) {
22
22
  if (flags.functions !== void 0) {
23
- const { inspectFunctions } = await import("./inspect-functions-Uv3Ndkty.js");
23
+ const { inspectFunctions } = await import("./inspect-functions-DbhgRvDf.js");
24
24
  return inspectFunctions({
25
25
  cwd: ctx.cwd,
26
26
  config: ctx.config,
@@ -29,7 +29,7 @@ const inspect = defineLeaf({
29
29
  });
30
30
  }
31
31
  const out = flags.out === "" ? true : flags.out === "-" ? void 0 : flags.out;
32
- const { runSupabase } = await import("./supabase-hook-CObLSH20.js");
32
+ const { runSupabase } = await import("./supabase-hook-8jAi64W9.js");
33
33
  return runSupabase({
34
34
  cwd: ctx.cwd,
35
35
  config: ctx.config,
@@ -0,0 +1,2 @@
1
+ import "./hook-sql-C24FFEWr.js";
2
+ export { r as runSupabase } from "./supabase-hook-BIBC5Ihn.js";
@@ -5,13 +5,13 @@ import { _ as writeOutputFiles, d as pgDeltaPath, g as underSchemaDir, h as serv
5
5
  import { i as readJsonFile, o as sqlFiles, s as writeFileEnsuringDir } from "./files-DAR51W3J.js";
6
6
  import { n as formatManifestJson, t as MANIFEST_FILE } from "./manifest-json-DMaBWmcG.js";
7
7
  import { c as requirePolicy } from "./load-m7jmit3y.js";
8
- import { a as tryKeyReasons } from "./tenant-check-Bfd4hotj.js";
9
- import { n as hookUri } from "./rbac-Dx88RLxH.js";
10
- import { a as withTableReads } from "./table-reads--NupdCFw.js";
11
- import { a as supabaseHookSql, c as asideAuthzReceive, d as declarativeSql, i as supabaseHookManifest, l as configToml, n as hooklessDatabase, o as defaultOut, r as supabaseDatabaseManifest, s as hookMarker, t as grantsLabel } from "./hook-sql-3yPtwas6.js";
8
+ import { a as tryKeyReasons } from "./tenant-check-DoZibca6.js";
9
+ import { n as hookUri } from "./rbac-BK_wp3eK.js";
10
+ import { a as withTableReads } from "./table-reads-CMP1MnPJ.js";
11
+ import { a as supabaseHookSql, c as asideAuthzReceive, d as declarativeSql, i as supabaseHookManifest, l as configToml, n as hooklessDatabase, o as defaultOut, r as supabaseDatabaseManifest, s as hookMarker, t as grantsLabel } from "./hook-sql-C24FFEWr.js";
12
12
  import { r as HOOK_MARKER, s as hookMarkerFields } from "./markers-C-kThnKN.js";
13
13
  import { i as withSchemaDefaults } from "./schema-tables-Ba9LE_XB.js";
14
- import { l as supabaseConfig, n as resolveSchemas, r as schemasRefusal, t as isSupabaseSchemas } from "./supabase-schemas-RG58AMTu.js";
14
+ import { l as supabaseConfig, n as resolveSchemas, r as schemasRefusal, t as isSupabaseSchemas } from "./supabase-schemas-DOc3cNnf.js";
15
15
  import { t as readMemberships } from "./read-memberships-DVBitJZG.js";
16
16
  import { r as pgConnector } from "./pg-DmS5ITHu.js";
17
17
  import { n as MIGRATION_DIRS } from "./constants-PCJiir_3.js";
@@ -1,6 +1,6 @@
1
1
  import "./sources-C6Id63F8.js";
2
2
  import { a as describeError } from "./errors-DgLOqc6j.js";
3
- import { n as hookUri } from "./rbac-Dx88RLxH.js";
3
+ import { n as hookUri } from "./rbac-BK_wp3eK.js";
4
4
  import { n as supabaseDir, t as supabaseConfigFile } from "./supabase-dir-0lxKbrYu.js";
5
5
  import { existsSync, readFileSync } from "node:fs";
6
6
  import { join, posix } from "node:path";
@@ -7,7 +7,7 @@ import { i as loadConfiguredPolicy } from "./load-m7jmit3y.js";
7
7
  import { a as parseSqlFile, c as readPolicy, d as sqlCalls, f as stringValues, t as SqlSyntaxError } from "./ast-Dnm2TOHN.js";
8
8
  import { i as taggedAccessPolicies } from "./bsb-access-Bcw6GrQm.js";
9
9
  import { a as droppedPolicy, s as reportFiles, u as isPlatformSchema } from "./report-x9GeUvjx.js";
10
- import { a as tryKeyReasons, n as tenantCheck, r as keyReason, t as svals } from "./tenant-check-Bfd4hotj.js";
10
+ import { a as tryKeyReasons, n as tenantCheck, r as keyReason, t as svals } from "./tenant-check-DoZibca6.js";
11
11
  import { existsSync, readFileSync } from "node:fs";
12
12
  import { join, relative } from "node:path";
13
13
  // src/cli/rls/shared-functions.ts
@@ -1 +1 @@
1
- export { t as committedManifest, n as configuredTableReads, r as manifestTableReads, i as tableReads, a as withTableReads } from "./table-reads--NupdCFw.js";
1
+ export { t as committedManifest, n as configuredTableReads, r as manifestTableReads, i as tableReads, a as withTableReads } from "./table-reads-CMP1MnPJ.js";
@@ -15,7 +15,7 @@ import { t as IDENTITY_SCOPES } from "./identity-scopes-CRVAV0HU.js";
15
15
  import { a as quoteIdent, c as quoteTable, i as qualified, o as quoteLiteral, r as helperSchema, s as quoteQualified } from "./quote-LNaBdCGA.js";
16
16
  import { C as tenantTypeOf, a as kindFilterSql, b as idTypeOf, c as roleKindSql, d as subjectClaimSql, f as subjectIdSql, i as keyTenantSql, m as userIdHelperSql, s as memberVia, u as subjectClaimJsonSql, x as scopeTypeOf } from "./subject-B7p94Y0s.js";
17
17
  import { i as allowEntry, n as GLOBAL_ROLES, o as rootName, r as HELPERS, s as signedIn, t as CUSTOM_ROLES } from "./shared-DnVY767H.js";
18
- import { B as rolesTableScope, C as sourceRows, E as sqlBody, F as customRolesSql, G as activeRowSql, H as trustedReaderGrants, I as hasCustomRoleChecksFor, J as grantPermissionSql, K as activeUserSql, L as perScope, M as userActive, N as globalRoleSource, O as instancesActive, P as currentKeyExpr, R as raiseSql, S as sourceIdOf, T as sourcesKeep, U as activeInstancesSql, V as storedTenant, W as activeMembershipSql, _ as memoWriteSql, b as scopedBody, c as memoUserSql, d as disabledColumn, f as functionBody, g as memoHitList, h as memberColumn, i as interactiveAllowsSql, k as keyTenantLine, l as claimKeptLines, n as delegatedGlobalSql, o as interactiveSessionSql, p as hasBody, r as interactiveAllowsCall, s as memoGlobalUserSql, u as claimTenant, v as memoizedSetofSql, w as sourcesBodyOf, x as sourceFilters, y as memoizes, z as roleReadersSql } from "./interactive-only-CylKSukS.js";
18
+ import { B as rolesTableScope, C as sourceRows, E as sqlBody, F as customRolesSql, G as activeRowSql, H as trustedReaderGrants, I as hasCustomRoleChecksFor, J as grantPermissionSql, K as activeUserSql, L as perScope, M as userActive, N as globalRoleSource, O as instancesActive, P as currentKeyExpr, R as raiseSql, S as sourceIdOf, T as sourcesKeep, U as activeInstancesSql, V as storedTenant, W as activeMembershipSql, _ as memoWriteSql, b as scopedBody, c as memoUserSql, d as disabledColumn, f as functionBody, g as memoHitList, h as memberColumn, i as interactiveAllowsSql, k as keyTenantLine, l as claimKeptLines, n as delegatedGlobalSql, o as interactiveSessionSql, p as hasBody, r as interactiveAllowsCall, s as memoGlobalUserSql, u as claimTenant, v as memoizedSetofSql, w as sourcesBodyOf, x as sourceFilters, y as memoizes, z as roleReadersSql } from "./interactive-only-ad2JJYk8.js";
19
19
  import { S as scopeTable, _ as memberRoleOf, a as graphSqlText, b as restrictedHelper, d as linkHelper, f as memberForHelper, g as memberOfHelper, h as memberIdsHelper, i as graphSqlName, n as CLOSURE, o as hasMemberFor, p as memberForSources, r as graphHelper, s as hasMemberOf, u as isTeamScope, v as permittedForHelper, x as scopeSources, y as permittedIdsHelper } from "./names-DwGleRKB.js";
20
20
  import { n as byKey, t as byCodeUnit } from "./compare-8SNJN-9U.js";
21
21
  import { createHash } from "node:crypto";
@@ -1889,7 +1889,7 @@ function memberForFunction(ctx, scope, type) {
1889
1889
  const types = team ? "uuid, text" : "uuid";
1890
1890
  return `${team ? `drop function if exists ${fn}(uuid);\n` : ""}create or replace function ${fn}(p_user uuid${team ? ", p_active text default null" : ""})
1891
1891
  returns setof ${type}
1892
- ${functionBody(body)}
1892
+ ${functionBody(body, false, false, true)}
1893
1893
  revoke execute on function ${fn}(${types}) from public, anon, authenticated;
1894
1894
  ${authAdminGrants([`grant usage on schema ${quoteIdent(helperSchema(ctx))} to supabase_auth_admin;`, `grant execute on function ${fn}(${types}) to supabase_auth_admin;`])}`;
1895
1895
  }
@@ -1946,7 +1946,7 @@ function memberOfFunction(ctx, scope, type) {
1946
1946
  returns setof ${type}
1947
1947
  ${functionBody(sqlBody(` select m.id
1948
1948
  from ${qualified(ctx, memberForHelper(scope))}(p_user) as m(id)
1949
- where p_user = ${subjectIdSql(ctx)}`))}
1949
+ where p_user = ${subjectIdSql(ctx)}`), false, false, true)}
1950
1950
  revoke execute on function ${fn}(uuid) from public, anon;
1951
1951
  grant execute on function ${fn}(uuid) to authenticated;`;
1952
1952
  }
@@ -3272,7 +3272,7 @@ function heldSql(at, effect) {
3272
3272
  function keysFunction(fn, params, body, access, parallelSafe) {
3273
3273
  return `create or replace function ${fn}(${params})
3274
3274
  returns setof text
3275
- ${functionBody(body, parallelSafe).replace("set search_path = ''", "set search_path = ''\nset jit = off")}
3275
+ ${functionBody(body, parallelSafe, false, true).replace("set search_path = ''", "set search_path = ''\nset jit = off")}
3276
3276
  ${access}`;
3277
3277
  }
3278
3278
  /**
@@ -1,8 +1,8 @@
1
1
  import { r as isRecord } from "./compact-C4LFuqbW.js";
2
2
  import { n as CliError } from "./errors-DgLOqc6j.js";
3
- import { i as tableNames } from "./tables-Dyfviku5.js";
4
- import { r as compileGrants } from "./compile-BFV2WG67.js";
5
- import { i as buildContext, n as isRefusal, t as generateOptions } from "./generate-options-4jvPn7w3.js";
3
+ import { i as tableNames } from "./tables-C-DzDqKb.js";
4
+ import { r as compileGrants } from "./compile-7tf8hHlu.js";
5
+ import { i as buildContext, n as isRefusal, t as generateOptions } from "./generate-options-RvPqyMWE.js";
6
6
  // src/cli/rls/key-reasons.ts
7
7
  /** A grant key written as a condition group (`k#1`) or a level (`k@own`). */
8
8
  function isConditionKey(permission, grantKey) {
@@ -2,8 +2,8 @@ import { a as getResource } from "./permission-registry-DstT40VS.js";
2
2
  import { c as jsonSchemaOf } from "./catalog-doc-BX97oFAn.js";
3
3
  import { r as runCollect } from "./collect-Co-w8Eg2.js";
4
4
  import { f as usageResult } from "./errors-DgLOqc6j.js";
5
- import { t as DOCS_BASE } from "./manifest-tO5SjSGH.js";
6
- import { r as findingOf } from "./output-Bfc3EpB2.js";
5
+ import { t as DOCS_BASE } from "./manifest-DbJC_rXj.js";
6
+ import { r as findingOf } from "./output-DZS9QWHI.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";
@@ -0,0 +1 @@
1
+ export { t as runUsage } from "./usage-BiTJQNJO.js";
@@ -16,7 +16,7 @@ const usage = defineLeaf({
16
16
  }
17
17
  },
18
18
  async run(ctx, { flags }) {
19
- return (await import("./usage-Bwl8YAmq.js")).runUsage({
19
+ return (await import("./usage-D7-bsLte.js")).runUsage({
20
20
  cwd: ctx.cwd,
21
21
  config: ctx.config,
22
22
  ignore: flags.ignore,
@@ -7,15 +7,15 @@ import { s as writeFileEnsuringDir } from "./files-DAR51W3J.js";
7
7
  import { n as fixtureSubject, r as loadFixtures, t as fixtureRow } from "./fixtures-3aUUP6Nx.js";
8
8
  import { r as pgConnector } from "./pg-DmS5ITHu.js";
9
9
  import { o as loadPolicyAt } from "./load-m7jmit3y.js";
10
- import { n as commandFor } from "./compile-BFV2WG67.js";
10
+ import { n as commandFor } from "./compile-7tf8hHlu.js";
11
11
  import { r as isRecord } from "./compact-C4LFuqbW.js";
12
12
  import { n as policyRowConditionKeys } from "./row-conditions-BjARoFLU.js";
13
13
  import { c as rootScope, d as scopeList, o as normalizeMemberships } from "./scopes-B-KX9EI8.js";
14
14
  import { c as helperTablePoliciesFromRows, l as rowConditionMessage, n as HELPER_TABLE_POLICIES_SQL } from "./helper-calls-DN1PJcNY.js";
15
15
  import { a as quoteIdent, c as quoteTable, o as quoteLiteral, s as quoteQualified } from "./quote-LNaBdCGA.js";
16
- import { et as graphPlan, i as tableNames, r as tableNameOf } from "./tables-Dyfviku5.js";
16
+ import { et as graphPlan, i as tableNames, r as tableNameOf } from "./tables-C-DzDqKb.js";
17
17
  import { s as viewName, t as FIELD_VIEWS } from "./fields-CKX-qjWb.js";
18
- import { t as DOCS_BASE } from "./manifest-tO5SjSGH.js";
18
+ import { t as DOCS_BASE } from "./manifest-DbJC_rXj.js";
19
19
  import { C as membershipsClaim, g as customRoleScope } from "./evaluate-DNz6wMYv.js";
20
20
  import { n as defaultSqlCommand, t as SQL_IDENT } from "./sql-T4GaBh9X.js";
21
21
  import "./budget-BH81q2cj.js";
@@ -2,7 +2,7 @@ import { r as isRecord } from "./compact-C4LFuqbW.js";
2
2
  import { i as dateAt } from "./time-r0CKBm57.js";
3
3
  import { a as describeError, n as CliError } from "./errors-DgLOqc6j.js";
4
4
  import { n as createChangeScheduler } from "./watch-BFDMb5N4.js";
5
- import { n as receiptRows } from "./pipeline-DW7cy40F.js";
5
+ import { n as receiptRows } from "./pipeline-IvdKfvuP.js";
6
6
  import { existsSync } from "node:fs";
7
7
  import { fileURLToPath } from "node:url";
8
8
  import { Worker } from "node:worker_threads";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "permdock",
3
- "version": "0.37.0",
3
+ "version": "0.38.0",
4
4
  "description": "Typed permissions for TypeScript apps, APIs, databases, and AI agents, with the permdock CLI and test runners.",
5
5
  "keywords": [
6
6
  "ai-agents",
@@ -1 +0,0 @@
1
- export { n as renderKinds } from "./gen-CTRqv1H2.js";
@@ -1 +0,0 @@
1
- export { n as runCloudPull } from "./pull-A1SkxAyb.js";
@@ -1 +0,0 @@
1
- export { t as run } from "./run-CbJPONx5.js";
@@ -1,2 +0,0 @@
1
- import "./hook-sql-3yPtwas6.js";
2
- export { r as runSupabase } from "./supabase-hook-BbwsceID.js";
@@ -1 +0,0 @@
1
- export { t as runUsage } from "./usage-7Hwk_akY.js";