permdock 0.28.0 → 0.28.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-BHQm3Li7.js → adoption-scan-6eUACbvC.js} +1 -1
- package/dist/{arazzo-UwtVzma6.js → arazzo-DSzOxgr1.js} +1 -1
- package/dist/{arazzo-CAQr4N7Z.js → arazzo-Du3koIf5.js} +1 -1
- package/dist/{casbin-Ccbaft52.js → casbin-B5UnU9nM.js} +1 -1
- package/dist/{casbin-CSgPeAJK.js → casbin-CW2uo-Jt.js} +1 -1
- package/dist/cli/bin.js +1 -1
- package/dist/cli/generate/watch-worker.js +1 -1
- package/dist/cli/index.js +1 -1
- package/dist/cli/plugins/app.js +1 -1
- package/dist/cli/plugins/openapi.js +1 -1
- 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-CFtvELWj.js → cloud-DhpR9oxl.js} +1 -1
- package/dist/{codemod-ClcPRv4c.js → codemod-BRY1780A.js} +1 -1
- package/dist/{codemod-3PFIcPag.js → codemod-DEsebwQn.js} +2 -2
- package/dist/{compile-mfTqcMJ5.js → compile-CT7x66_U.js} +1 -1
- package/dist/{completion-D4p_MQX7.js → completion-CW1poYOM.js} +1 -1
- package/dist/{config-D9bq79Yi.js → config-DP7Stalz.js} +1 -1
- package/dist/{config-report-DZfIl6zc.js → config-report-CnuPIG_V.js} +1 -1
- package/dist/{doctor-CuhkBJ06.js → doctor-B3rZsURs.js} +2 -2
- package/dist/{doctor-FHjwjHYC.js → doctor-CkaAS-Uk.js} +70 -23
- package/dist/{execute-DdH84BHC.js → execute-CdqPJ6SP.js} +2 -2
- package/dist/{gen-CcKymoUw.js → gen-DCmo0Irk.js} +2 -2
- package/dist/gen-DnaCR5w3.js +1 -0
- package/dist/{gen-kind-Bf9jYVgn.js → gen-kind-10IxFLdl.js} +1 -1
- package/dist/{generate-UMuStlLD.js → generate-BuNebxmi.js} +1 -1
- package/dist/{generate-BCUVV4vB.js → generate-CYUj-cvA.js} +10 -10
- package/dist/{generate-options-Cg5sAHhT.js → generate-options-AvKV0IXA.js} +5 -5
- package/dist/{hook-sql-C0aUoiOH.js → hook-sql-Cunsdk5x.js} +5 -5
- package/dist/{import--taRAR01.js → import-CDCWY5Ou.js} +1 -1
- package/dist/{init-CP3fYFb6.js → init-QA12XZy5.js} +3 -3
- package/dist/{init-Cfi7_gXO.js → init-erhwH2o6.js} +1 -1
- package/dist/{login-BjkyJNGn.js → login-BJmDn5p2.js} +3 -3
- package/dist/{login-kg9Pd0C2.js → login-OBqLmoA2.js} +1 -1
- package/dist/{manifest-C7dWk0k5.js → manifest-BY70KZmp.js} +30 -30
- package/dist/{openapi-dJFJTHiW.js → openapi-B9Lpb4Px.js} +1 -1
- package/dist/{openapi-B5jo5ClY.js → openapi-DmEgZ9X8.js} +1 -1
- package/dist/{openapi-document-B58hIsZ4.js → openapi-document-BJDwMJRO.js} +1 -1
- package/dist/{output-Pne7BTXn.js → output-Cqtb8lW_.js} +1 -1
- package/dist/{ownership-BPGoxz1T.js → ownership-fYxdtYs0.js} +1 -1
- package/dist/{policy-bundle-nbcxlVOb.js → policy-bundle-AFVba7nt.js} +3 -3
- package/dist/{policy-G8iZ2T5P.js → policy-gS3zexF5.js} +1 -1
- package/dist/{powersync-BoOMFQRl.js → powersync-TraBGEw2.js} +1 -1
- package/dist/{powersync-B9KEEiJE.js → powersync-WvWQh2kU.js} +1 -1
- package/dist/{powersync-CqAj9QJt.js → powersync-d4eoYO3I.js} +4 -4
- package/dist/pull-Bn9a5g9Q.js +1 -0
- package/dist/{pull-DXuh-rob.js → pull-xhMWizWH.js} +1 -1
- package/dist/{rbac-FlJv7Ba9.js → rbac-ir19O-e-.js} +1 -1
- package/dist/{resolve-names-CROyyjVR.js → resolve-names-B3PM0l3J.js} +1 -1
- package/dist/{rls-BL90Ec30.js → rls-CYbk1UmD.js} +6 -6
- package/dist/{rls-DV4MUNMb.js → rls-DEPAx9uQ.js} +1 -1
- package/dist/{rls-files-BgLoAa9x.js → rls-files-CxdOxMKl.js} +1 -1
- package/dist/run-BtTQlk1R.js +1 -0
- package/dist/{run-BFDAiNuS.js → run-CI5opYjC.js} +2 -2
- package/dist/{scan-CoyAmDAz.js → scan-BrILYXP9.js} +1 -1
- package/dist/{schema-9eGIiLry.js → schema-C-Nn6M1P.js} +1 -1
- package/dist/{skills-BPDVfXgR.js → skills-C2SqRGXy.js} +1 -1
- package/dist/{skills-B8nt-KuB.js → skills-Cuf4gcfr.js} +1 -1
- package/dist/supabase/index.js +1 -1
- package/dist/{supabase-Ctn_Z6xf.js → supabase-BzK3lplm.js} +3 -3
- package/dist/{supabase-D5KN965n.js → supabase-V_yr_spa.js} +1 -1
- package/dist/{supabase-config-CjX-GjEp.js → supabase-config-BrhSp-U7.js} +1 -1
- package/dist/supabase-hook-BJImmLmb.js +2 -0
- package/dist/{supabase-hook-CmW2MLWa.js → supabase-hook-C7v1wRUV.js} +3 -3
- package/dist/{tables-Btlt_Rp-.js → tables-D-tmMHww.js} +1 -1
- package/dist/{usage-DRReZaxQ.js → usage-Bh-VP8co.js} +1 -1
- package/dist/usage-DpmLPRRx.js +1 -0
- package/dist/{usage-DVjr2ZDc.js → usage-XS56d_Kx.js} +2 -2
- package/dist/{verify-BOB_Jyjx.js → verify-aCeiREkh.js} +3 -3
- package/package.json +1 -1
- package/dist/gen-BseS8XeZ.js +0 -1
- package/dist/pull-8Vce3V1e.js +0 -1
- package/dist/run-mEbYi2Ow.js +0 -1
- package/dist/supabase-hook-CjChM-eX.js +0 -2
- package/dist/usage-nVi3-z-j.js +0 -1
|
@@ -21,7 +21,7 @@ const check = defineLeaf({
|
|
|
21
21
|
...permissionsFlag
|
|
22
22
|
},
|
|
23
23
|
async run(ctx, { flags }) {
|
|
24
|
-
return (await import("./arazzo-
|
|
24
|
+
return (await import("./arazzo-Du3koIf5.js")).runArazzo({
|
|
25
25
|
cwd: ctx.cwd,
|
|
26
26
|
config: ctx.config,
|
|
27
27
|
doc: given(flags.doc),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { _ as arazzoFindings } from "./src-BAYcigFU.js";
|
|
2
2
|
import { d as missingInput } from "./errors-DgLOqc6j.js";
|
|
3
|
-
import { t as DOCS_BASE } from "./manifest-
|
|
3
|
+
import { t as DOCS_BASE } from "./manifest-BY70KZmp.js";
|
|
4
4
|
import { t as ARAZZO_REPORT_SCHEMA } from "./version-D-jWyJb9.js";
|
|
5
5
|
import { i as readJsonFile } from "./files-DAR51W3J.js";
|
|
6
6
|
import { a as loadModule, s as pickNamed, t as asPermissionTree } from "./load-CZnlAyZ8.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as applyFiles } from "./files-DuV7wRim.js";
|
|
2
|
-
import { a as nonEmptyOr } from "./output-
|
|
2
|
+
import { a as nonEmptyOr } from "./output-Cqtb8lW_.js";
|
|
3
3
|
import { n as isIdentifier, t as emitPolicyModule } from "./policy-module-Bp4HvsRg.js";
|
|
4
4
|
import { existsSync, readFileSync } from "node:fs";
|
|
5
5
|
import { resolve } from "node:path";
|
|
@@ -16,7 +16,7 @@ const casbinImport = defineLeaf({
|
|
|
16
16
|
...outFlag
|
|
17
17
|
},
|
|
18
18
|
async run(ctx, { flags }) {
|
|
19
|
-
const { runCasbinImport } = await import("./casbin-
|
|
19
|
+
const { runCasbinImport } = await import("./casbin-B5UnU9nM.js");
|
|
20
20
|
return runCasbinImport({
|
|
21
21
|
cwd: ctx.cwd,
|
|
22
22
|
model: given(flags.model),
|
package/dist/cli/bin.js
CHANGED
|
@@ -11,7 +11,7 @@ if (argv.length === 1 && (argv[0] === "--version" || argv[0] === "-v")) {
|
|
|
11
11
|
const [{ isCi }, { trapSignals }, { run }, { streamHasColors }] = await Promise.all([
|
|
12
12
|
import("../env-hbYumkRp.js"),
|
|
13
13
|
import("../signals-a1NxAP0X.js"),
|
|
14
|
-
import("../run-
|
|
14
|
+
import("../run-BtTQlk1R.js"),
|
|
15
15
|
import("../style-Crf-90o6.js")
|
|
16
16
|
]);
|
|
17
17
|
const signals = trapSignals();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as isRecord } from "../../compact-C4LFuqbW.js";
|
|
2
2
|
import { a as describeError } from "../../errors-DgLOqc6j.js";
|
|
3
3
|
import { i as readConfig } from "../../config-iyy90IOU.js";
|
|
4
|
-
import { t as executeGenerate } from "../../execute-
|
|
4
|
+
import { t as executeGenerate } from "../../execute-CdqPJ6SP.js";
|
|
5
5
|
import { resolve } from "node:path";
|
|
6
6
|
import { parentPort, workerData } from "node:worker_threads";
|
|
7
7
|
// src/cli/generate/watch-worker.ts
|
package/dist/cli/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import { t as catalogPath } from "../catalog-path-bG0XxHMu.js";
|
|
|
2
2
|
import { t as defineConfig } from "../config-iyy90IOU.js";
|
|
3
3
|
import { t as definePlugin } from "../plugin-MQVfUBUS.js";
|
|
4
4
|
import { c as parseGrantsMarker, l as parseHookMarker } from "../markers-C-kThnKN.js";
|
|
5
|
-
import { t as run } from "../run-
|
|
5
|
+
import { t as run } from "../run-CI5opYjC.js";
|
|
6
6
|
import { n as parsePushedPolicy, r as pushedPolicy, t as PUSHED_POLICY_SCHEMA } from "../pushed-policy-rpB6k77P.js";
|
|
7
7
|
// src/cli/token-schemas.ts
|
|
8
8
|
const ID = {
|
package/dist/cli/plugins/app.js
CHANGED
|
@@ -32,7 +32,7 @@ function openapi(options = {}) {
|
|
|
32
32
|
return operationsFile(source.cwd, options.routes, task.out);
|
|
33
33
|
}
|
|
34
34
|
if (options.doc === void 0) return [];
|
|
35
|
-
const { openapiDocument } = await import("../../openapi-document-
|
|
35
|
+
const { openapiDocument } = await import("../../openapi-document-BJDwMJRO.js");
|
|
36
36
|
return openapiDocument(task, options, source);
|
|
37
37
|
}
|
|
38
38
|
});
|
|
@@ -18,7 +18,7 @@ function powersync(options = {}) {
|
|
|
18
18
|
}],
|
|
19
19
|
emit: async (task, _model, source) => {
|
|
20
20
|
if (source === void 0) return [];
|
|
21
|
-
const { powersyncFiles } = await import("../../powersync-
|
|
21
|
+
const { powersyncFiles } = await import("../../powersync-WvWQh2kU.js");
|
|
22
22
|
return powersyncFiles(source.policy, source.config, task.out).files.map((file) => ({
|
|
23
23
|
path: file.path,
|
|
24
24
|
contents: file.text
|
package/dist/cli/plugins/rls.js
CHANGED
|
@@ -19,7 +19,7 @@ function rls(options = {}) {
|
|
|
19
19
|
}],
|
|
20
20
|
config: (config) => withRlsOutputs(config, options),
|
|
21
21
|
emit: async (task, _model, source) => {
|
|
22
|
-
const { filesForRls } = await import("../../rls-files-
|
|
22
|
+
const { filesForRls } = await import("../../rls-files-CxdOxMKl.js");
|
|
23
23
|
return filesForRls(task, options, source);
|
|
24
24
|
}
|
|
25
25
|
});
|
|
@@ -18,7 +18,7 @@ function supabaseHook(options = {}) {
|
|
|
18
18
|
config: (config) => withHookOut(config, options.out),
|
|
19
19
|
emit: async (_task, _model, source) => {
|
|
20
20
|
if (source === void 0) return [];
|
|
21
|
-
const { runSupabase } = await import("../../supabase-hook-
|
|
21
|
+
const { runSupabase } = await import("../../supabase-hook-BJImmLmb.js");
|
|
22
22
|
const outcome = await runSupabase({
|
|
23
23
|
cwd: source.cwd,
|
|
24
24
|
config: source.config,
|
|
@@ -37,14 +37,14 @@ function supabase(options = {}) {
|
|
|
37
37
|
config: (config) => withHookOut(withRlsOutputs(config, options), hookOut),
|
|
38
38
|
emit: async (task, _model, source) => {
|
|
39
39
|
if (task.id === "sql") {
|
|
40
|
-
const { filesForRls } = await import("../../rls-files-
|
|
40
|
+
const { filesForRls } = await import("../../rls-files-CxdOxMKl.js");
|
|
41
41
|
return filesForRls(task, {
|
|
42
42
|
...rlsOptions,
|
|
43
43
|
dialect: "supabase"
|
|
44
44
|
}, source);
|
|
45
45
|
}
|
|
46
46
|
if (source === void 0) return [];
|
|
47
|
-
const { runSupabase } = await import("../../supabase-hook-
|
|
47
|
+
const { runSupabase } = await import("../../supabase-hook-BJImmLmb.js");
|
|
48
48
|
const hookOptions = hook === false || hook === void 0 ? {} : hook;
|
|
49
49
|
const outcome = await runSupabase({
|
|
50
50
|
cwd: source.cwd,
|
package/dist/cli/plugins/ui.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as kindPlugin } from "../../gen-kind-
|
|
1
|
+
import { t as kindPlugin } from "../../gen-kind-10IxFLdl.js";
|
|
2
2
|
// src/cli/plugins/ui.ts
|
|
3
3
|
/** `permdock/react` bound to the policy's vocabulary. Carries `"use client"`. */
|
|
4
4
|
function reactHooks(options = {}) {
|
|
@@ -70,7 +70,7 @@ const pull = defineLeaf({
|
|
|
70
70
|
},
|
|
71
71
|
async run(ctx, { flags }) {
|
|
72
72
|
const env = await withStdinSecret(ctx, "token", flags["token-stdin"], "PERMDOCK_CLOUD_TOKEN");
|
|
73
|
-
return (await import("./pull-
|
|
73
|
+
return (await import("./pull-Bn9a5g9Q.js")).runCloudPull({
|
|
74
74
|
cwd: ctx.cwd,
|
|
75
75
|
config: ctx.config,
|
|
76
76
|
url: given(flags.url),
|
|
@@ -5,7 +5,7 @@ import { t as catalogFingerprint } from "./catalog-fingerprint-DAWZARy6.js";
|
|
|
5
5
|
import { r as isRecord } from "./compact-C4LFuqbW.js";
|
|
6
6
|
import { n as flagSpellings, o as GLOBAL_FLAGS } from "./args-Bc0HLiD4.js";
|
|
7
7
|
import { c as generateFlags, f as policyFlag, i as dryRunFlag, r as dbUrlFlags, t as checkFlag } from "./flags-C0e-BzGW.js";
|
|
8
|
-
import { n as ROOT } from "./manifest-
|
|
8
|
+
import { n as ROOT } from "./manifest-BY70KZmp.js";
|
|
9
9
|
import { i as visitorKeyTypes, r as parseSync, t as createVisitor } from "./optional-CaQWp9HA.js";
|
|
10
10
|
import { n as defaultSqlCommand } from "./sql-T4GaBh9X.js";
|
|
11
11
|
import { t as beforeFirst } from "./text-D704xHVl.js";
|
|
@@ -7,7 +7,7 @@ const codemod = defineLeaf({
|
|
|
7
7
|
description: "The release to migrate to (0.5)",
|
|
8
8
|
required: true,
|
|
9
9
|
async complete() {
|
|
10
|
-
return (await import("./codemod-
|
|
10
|
+
return (await import("./codemod-BRY1780A.js")).codemodVersions();
|
|
11
11
|
}
|
|
12
12
|
}, {
|
|
13
13
|
name: "paths",
|
|
@@ -22,7 +22,7 @@ const codemod = defineLeaf({
|
|
|
22
22
|
}
|
|
23
23
|
},
|
|
24
24
|
async run(ctx, { flags, args, rest }) {
|
|
25
|
-
return (await import("./codemod-
|
|
25
|
+
return (await import("./codemod-BRY1780A.js")).runCodemod({
|
|
26
26
|
cwd: ctx.cwd,
|
|
27
27
|
version: args["version"],
|
|
28
28
|
paths: rest,
|
|
@@ -11,7 +11,7 @@ import { l as isConditionRef, o as hasConditionOp } from "./refs-Cix9Zjis.js";
|
|
|
11
11
|
import { t as requiresApproval } from "./approval-required-B-R4Yw3J.js";
|
|
12
12
|
import { c as jsonSchemaOf } from "./catalog-doc-Bp5khmCG.js";
|
|
13
13
|
import { i as configError } from "./errors-DgLOqc6j.js";
|
|
14
|
-
import { F as capabilityAccessSql, L as apiKeyAllowsCall, S as accessSql, f as requiresSql, k as tokenScopeAllowsCall } from "./tables-
|
|
14
|
+
import { F as capabilityAccessSql, L as apiKeyAllowsCall, S as accessSql, f as requiresSql, k as tokenScopeAllowsCall } from "./tables-D-tmMHww.js";
|
|
15
15
|
import { t as connectPgPool } from "./pg-CA651850.js";
|
|
16
16
|
import { n as interactiveAllowsCall, ut as scopeTable } from "./interactive-only-CQsgMc1E.js";
|
|
17
17
|
import { a as quoteIdent, c as quoteTable, o as quoteLiteral } from "./quote-BKrTBbcH.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as suggestion, o as GLOBAL_FLAGS } from "./args-Bc0HLiD4.js";
|
|
2
2
|
import { t as defineLeaf } from "./command-9GAzSI7E.js";
|
|
3
|
-
import { a as resolve } from "./manifest-
|
|
3
|
+
import { a as resolve } from "./manifest-BY70KZmp.js";
|
|
4
4
|
import { n as CliError } from "./errors-DgLOqc6j.js";
|
|
5
5
|
// src/cli/core/completion.ts
|
|
6
6
|
const SHELLS = [
|
|
@@ -10,7 +10,7 @@ const config = defineLeaf({
|
|
|
10
10
|
...failOnFlag
|
|
11
11
|
},
|
|
12
12
|
async run(ctx, { flags }) {
|
|
13
|
-
const { runConfig } = await import("./config-report-
|
|
13
|
+
const { runConfig } = await import("./config-report-CnuPIG_V.js");
|
|
14
14
|
return runConfig({
|
|
15
15
|
cwd: ctx.cwd,
|
|
16
16
|
config: ctx.config,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "./sources-DnjJPGfb.js";
|
|
2
2
|
import { t as catalogPath } from "./catalog-path-bG0XxHMu.js";
|
|
3
3
|
import { n as guessPermissions, t as barrelFile } from "./collect-BOh9Pxob.js";
|
|
4
|
-
import { t as DOCS_BASE } from "./manifest-
|
|
4
|
+
import { t as DOCS_BASE } from "./manifest-BY70KZmp.js";
|
|
5
5
|
import { r as CONFIG_REPORT_SCHEMA } from "./version-D-jWyJb9.js";
|
|
6
6
|
import { a as rel, t as defaultSrcPath } from "./files-DAR51W3J.js";
|
|
7
7
|
import { n as MIGRATION_DIRS, t as DEFAULT_SENSITIVE_ACTIONS } from "./constants-PCJiir_3.js";
|
|
@@ -10,7 +10,7 @@ const doctor = defineLeaf({
|
|
|
10
10
|
description: "Check codes or groups to run",
|
|
11
11
|
valueHint: "code",
|
|
12
12
|
async complete() {
|
|
13
|
-
const { DOCTOR_CHECKS } = await import("./doctor-
|
|
13
|
+
const { DOCTOR_CHECKS } = await import("./doctor-CkaAS-Uk.js");
|
|
14
14
|
return [.../* @__PURE__ */ new Set([...DOCTOR_CHECKS.map(({ code }) => code), ...DOCTOR_CHECKS.flatMap(({ groups }) => groups)])];
|
|
15
15
|
}
|
|
16
16
|
},
|
|
@@ -35,7 +35,7 @@ const doctor = defineLeaf({
|
|
|
35
35
|
if (answer === void 0) return CANCELLED;
|
|
36
36
|
fix = answer;
|
|
37
37
|
}
|
|
38
|
-
return (await import("./doctor-
|
|
38
|
+
return (await import("./doctor-CkaAS-Uk.js")).runDoctor({
|
|
39
39
|
cwd: ctx.cwd,
|
|
40
40
|
config: ctx.config,
|
|
41
41
|
only: flags.only,
|
|
@@ -2,8 +2,8 @@ import { c as rootScope, d as scopeList, o as normalizeMemberships, s as resolve
|
|
|
2
2
|
import { r as supabaseTenantClaim } from "./budget-BH81q2cj.js";
|
|
3
3
|
import { r as runCollect } from "./collect-BOh9Pxob.js";
|
|
4
4
|
import { t as didYouMean } from "./args-Bc0HLiD4.js";
|
|
5
|
-
import { t as DOCS_BASE } from "./manifest-
|
|
6
|
-
import { a as nonEmptyOr, r as findingOf } from "./output-
|
|
5
|
+
import { t as DOCS_BASE } from "./manifest-BY70KZmp.js";
|
|
6
|
+
import { a as nonEmptyOr, r as findingOf } from "./output-Cqtb8lW_.js";
|
|
7
7
|
import { t as createStyle } from "./style-CQDaLJtP.js";
|
|
8
8
|
import { i as DOCTOR_REPORT_SCHEMA } from "./version-D-jWyJb9.js";
|
|
9
9
|
import { a as rel, n as doctorSrcPath, o as sqlFiles$1, r as listSourceFiles } from "./files-DAR51W3J.js";
|
|
@@ -11,25 +11,25 @@ import { n as pgConnector } from "./pg-CA651850.js";
|
|
|
11
11
|
import { a as describeError, i as configError } from "./errors-DgLOqc6j.js";
|
|
12
12
|
import { a as betterSupabaseInstalled, c as workspaceDirs, d as readJson, i as betterSupabaseDefaults, l as filesOf, n as betterSupabaseAuthzVersions, o as betterSupabaseTenantClaim, r as betterSupabaseConfig, t as BETTER_SUPABASE_AUTHZ_TOPIC, u as nodeFiles } from "./better-supabase-DSbs4MtQ.js";
|
|
13
13
|
import { a as loadModule, i as loadConfiguredPolicy, n as asPolicy, s as pickNamed } from "./load-CZnlAyZ8.js";
|
|
14
|
-
import { i as runSkillsInstall } from "./skills-
|
|
15
|
-
import { a as supabaseConfig, i as readSupabaseConfig, n as pd045, r as pd074 } from "./supabase-config-
|
|
16
|
-
import { d as activeSource, g as attrsPlan, i as supabaseHookManifest, n as hooklessDatabase, p as resolveSchemas, r as supabaseDatabaseManifest } from "./hook-sql-
|
|
17
|
-
import { i as pd039, t as hookOut } from "./supabase-hook-
|
|
14
|
+
import { i as runSkillsInstall } from "./skills-Cuf4gcfr.js";
|
|
15
|
+
import { a as supabaseConfig, i as readSupabaseConfig, n as pd045, r as pd074 } from "./supabase-config-BrhSp-U7.js";
|
|
16
|
+
import { d as activeSource, g as attrsPlan, i as supabaseHookManifest, n as hooklessDatabase, p as resolveSchemas, r as supabaseDatabaseManifest } from "./hook-sql-Cunsdk5x.js";
|
|
17
|
+
import { i as pd039, t as hookOut } from "./supabase-hook-C7v1wRUV.js";
|
|
18
18
|
import { c as outFiles } from "./output-files-D5D-8-4l.js";
|
|
19
|
-
import { a as guardedTables, r as unsatisfiedKinds, t as ownershipRules } from "./ownership-
|
|
19
|
+
import { a as guardedTables, r as unsatisfiedKinds, t as ownershipRules } from "./ownership-fYxdtYs0.js";
|
|
20
20
|
import { n as MIGRATION_DIRS, t as DEFAULT_SENSITIVE_ACTIONS } from "./constants-PCJiir_3.js";
|
|
21
21
|
import { i as group, n as membershipColumns, o as sqlStatements, r as tableKey } from "./deciding-columns-BnglEKqU.js";
|
|
22
22
|
import { r as isRecord } from "./compact-C4LFuqbW.js";
|
|
23
|
-
import { d as rowConditionMessage, f as parseIgnores, p as splitIgnored, s as ROW_CONDITION_FIX, u as helperTablePolicies } from "./verify-
|
|
23
|
+
import { d as rowConditionMessage, f as parseIgnores, p as splitIgnored, s as ROW_CONDITION_FIX, u as helperTablePolicies } from "./verify-aCeiREkh.js";
|
|
24
24
|
import { n as activeTenantMismatch, t as authorizationProvider } from "./provider-BnnFjtWI.js";
|
|
25
25
|
import { t as parseCatalog } from "./parse-nfHSt1Wy.js";
|
|
26
26
|
import "./authz-topic-D8x24Jv-.js";
|
|
27
27
|
import { t as catalogPath } from "./catalog-path-bG0XxHMu.js";
|
|
28
28
|
import { t as canonicalJson } from "./canonical-json-BibZkXtE.js";
|
|
29
29
|
import { c as jsonSchemaOf, i as catalogOAuthScopes } from "./catalog-doc-Bp5khmCG.js";
|
|
30
|
-
import { a as pd010, c as pd014, d as pd038, f as pd041, i as pd008, l as pd015, n as pd001, o as pd011, p as pd057, r as pd007, s as pd013, t as runUsage, u as pd036 } from "./usage-
|
|
30
|
+
import { a as pd010, c as pd014, d as pd038, f as pd041, i as pd008, l as pd015, n as pd001, o as pd011, p as pd057, r as pd007, s as pd013, t as runUsage, u as pd036 } from "./usage-XS56d_Kx.js";
|
|
31
31
|
import { c as listPermissions, h as formerKeys } from "./permission-registry-DMYRZVcn.js";
|
|
32
|
-
import { t as resolveNames } from "./resolve-names-
|
|
32
|
+
import { t as resolveNames } from "./resolve-names-B3PM0l3J.js";
|
|
33
33
|
import "./markers-C-kThnKN.js";
|
|
34
34
|
import { i as qualifySqlTable, s as quoteSqlLiteral } from "./sql-T4GaBh9X.js";
|
|
35
35
|
import { s as parseCredential } from "./credential-ke0KMQeB.js";
|
|
@@ -47,17 +47,17 @@ import { t as membershipSourcesOf } from "./sources-BbSUNmFX.js";
|
|
|
47
47
|
import { n as pd110, r as pd114, t as pd109 } from "./perf-token-dFGVP14-.js";
|
|
48
48
|
import { a as scopeMembershipTable } from "./compile-BUKXrueE.js";
|
|
49
49
|
import { t as policyModel } from "./model-BkQLENu6.js";
|
|
50
|
-
import { a as roleSources, i as powersyncOut, n as staleFiles, o as scopeSourcesOf, r as powersyncFiles, s as streamOf } from "./powersync-
|
|
50
|
+
import { a as roleSources, i as powersyncOut, n as staleFiles, o as scopeSourcesOf, r as powersyncFiles, s as streamOf } from "./powersync-d4eoYO3I.js";
|
|
51
51
|
import { t as FIELD_VIEWS } from "./fields-6d1j-q3c.js";
|
|
52
52
|
import { t as policyRowConditionKeys } from "./row-conditions-DwIJocfQ.js";
|
|
53
|
-
import {
|
|
53
|
+
import { J as policyBundle, Q as graphPlan, i as tableNames, r as tableNameOf } from "./tables-D-tmMHww.js";
|
|
54
54
|
import { H as byKey, K as graphSqlName } from "./interactive-only-CQsgMc1E.js";
|
|
55
|
-
import { i as tableFor, n as compileGrants, t as commandFor } from "./compile-
|
|
55
|
+
import { i as tableFor, n as compileGrants, t as commandFor } from "./compile-CT7x66_U.js";
|
|
56
56
|
import { r as contextRefs } from "./conditions-VlAMOm20.js";
|
|
57
57
|
import { t as CUSTOM_ROLES } from "./shared-BdF5DJDQ.js";
|
|
58
58
|
import { n as isSeeds } from "./seeds-BDTG7xl-.js";
|
|
59
59
|
import { r as FIXTURES_PATH, s as seedPathsLine } from "./seed-sql-CjF7u0aX.js";
|
|
60
|
-
import { i as buildContext, n as isRefusal, o as inheritTargets, t as generateOptions } from "./generate-options-
|
|
60
|
+
import { i as buildContext, n as isRefusal, o as inheritTargets, t as generateOptions } from "./generate-options-AvKV0IXA.js";
|
|
61
61
|
import { n as legacyHelperNames, r as retirePlan, t as legacyHelperCalls } from "./retire-BNiXnbBR.js";
|
|
62
62
|
import { t as supautilsRejections } from "./supautils-DXzJ2E2Q.js";
|
|
63
63
|
import { isDeepStrictEqual } from "node:util";
|
|
@@ -2138,14 +2138,28 @@ function pd106(cwd, config, files = nodeFiles) {
|
|
|
2138
2138
|
}
|
|
2139
2139
|
const CUSTOM_ROLE_TABLE = /\bcustom_role_(?:permissions|includes)\b/iu;
|
|
2140
2140
|
const UNSARGABLE_TENANT = /\btenant_id"?\s*::\s*text\b|\btenant_id"?\s+is\s+not\s+distinct\s+from\b/iu;
|
|
2141
|
+
const CREATE_FUNCTION$1 = new RegExp(String.raw`^create\s+(?:or\s+replace\s+)?function\s+${NAME$1}\s*\(`, "iu");
|
|
2142
|
+
function functionName(statement) {
|
|
2143
|
+
const match = CREATE_FUNCTION$1.exec(statement.text);
|
|
2144
|
+
return match === null ? void 0 : unquote$1(group(match, 1));
|
|
2145
|
+
}
|
|
2141
2146
|
/**
|
|
2142
2147
|
* PD107: a statement reads a custom-role table and compares `tenant_id` through
|
|
2143
2148
|
* a `text` cast or `is not distinct from`. Neither form can use the table's
|
|
2144
|
-
* `(tenant_id, …)` index, so each probe scans every tenant's roles.
|
|
2149
|
+
* `(tenant_id, …)` index, so each probe scans every tenant's roles. A function
|
|
2150
|
+
* that a later migration or the schema files define again is not reported: the
|
|
2151
|
+
* database runs the last definition.
|
|
2145
2152
|
*/
|
|
2146
2153
|
function pd107(cwd, config, files = nodeFiles) {
|
|
2147
|
-
|
|
2148
|
-
|
|
2154
|
+
const statements = statementsOf(cwd, config, files);
|
|
2155
|
+
const last = /* @__PURE__ */ new Map();
|
|
2156
|
+
for (const [index, statement] of statements.entries()) {
|
|
2157
|
+
const name = functionName(statement);
|
|
2158
|
+
if (name !== void 0) last.set(name, index);
|
|
2159
|
+
}
|
|
2160
|
+
return statements.flatMap((statement, index) => {
|
|
2161
|
+
const name = functionName(statement);
|
|
2162
|
+
if (!CUSTOM_ROLE_TABLE.test(statement.text) || name !== void 0 && last.get(name) !== index) return [];
|
|
2149
2163
|
const match = UNSARGABLE_TENANT.exec(statement.text);
|
|
2150
2164
|
if (match === null) return [];
|
|
2151
2165
|
return [{
|
|
@@ -2487,14 +2501,27 @@ function branchGaps(policy, resources) {
|
|
|
2487
2501
|
}
|
|
2488
2502
|
return findings;
|
|
2489
2503
|
}
|
|
2504
|
+
const NATIVE_REFRESH = /\bnativeRefresh\s*\(/u;
|
|
2505
|
+
const AUTHZ_CHANGE_REFRESH = /\bauthzChangeRefresh\s*\(/u;
|
|
2506
|
+
const REFRESH_SESSION = /\.refreshSession\s*\(/u;
|
|
2507
|
+
/**
|
|
2508
|
+
* The sources refresh the session and reconnect on an authorization change:
|
|
2509
|
+
* `nativeRefresh`, or an app bridge that calls `refreshSession()` and hands
|
|
2510
|
+
* PermDock the refresh through `authzChangeRefresh`.
|
|
2511
|
+
*/
|
|
2512
|
+
function wiresRefresh(sources) {
|
|
2513
|
+
const has = (pattern) => sources.some((source) => pattern.test(source.text));
|
|
2514
|
+
return has(NATIVE_REFRESH) || has(AUTHZ_CHANGE_REFRESH) && has(REFRESH_SESSION);
|
|
2515
|
+
}
|
|
2490
2516
|
/**
|
|
2491
2517
|
* PD084: a synced stream reads a token claim. PowerSync keeps the claims a
|
|
2492
2518
|
* connection started with, so after a role or tenant change the device syncs by
|
|
2493
|
-
* the old claims until the app refreshes the session and reconnects.
|
|
2519
|
+
* the old claims until the app refreshes the session and reconnects. Quiet when
|
|
2520
|
+
* the sources wire that refresh.
|
|
2494
2521
|
*/
|
|
2495
|
-
async function pd084(input) {
|
|
2522
|
+
async function pd084(input, sources = []) {
|
|
2496
2523
|
const { config } = input;
|
|
2497
|
-
if (config.powersync === void 0 || config.policy === void 0) return [];
|
|
2524
|
+
if (config.powersync === void 0 || config.policy === void 0 || wiresRefresh(sources)) return [];
|
|
2498
2525
|
const policy = await policyOf(input);
|
|
2499
2526
|
if (policy === void 0) return [];
|
|
2500
2527
|
let claims;
|
|
@@ -2507,7 +2534,7 @@ async function pd084(input) {
|
|
|
2507
2534
|
code: "PD084",
|
|
2508
2535
|
severity: "warning",
|
|
2509
2536
|
message,
|
|
2510
|
-
fix: "pass nativeRefresh from permdock/react-native to refreshOn, which refreshes the session and reconnects PowerSync on each authz:<uid> message"
|
|
2537
|
+
fix: "pass nativeRefresh from permdock/react-native to refreshOn, which refreshes the session and reconnects PowerSync on each authz:<uid> message; an app bridge that calls refreshSession() and refreshes PermDock through authzChangeRefresh also clears it"
|
|
2511
2538
|
}));
|
|
2512
2539
|
}
|
|
2513
2540
|
/**
|
|
@@ -3335,6 +3362,7 @@ const LITERAL = String.raw`'((?:[^']|'')*)'`;
|
|
|
3335
3362
|
const SEED_ROW = new RegExp(String.raw`\(\s*${LITERAL}\s*,\s*${LITERAL}\s*,\s*${LITERAL}\s*,\s*${LITERAL}\s*,\s*${LITERAL}\s*\)`, "gu");
|
|
3336
3363
|
const SEED_VIEW = /^create\s+(?:or\s+replace\s+)?view\s+((?:"[^"]+"|\w+)(?:\.(?:"[^"]+"|\w+))?)\s*\([^)]*\)\s*with\s*\([^)]*\)\s*as\s+([\s\S]*)$/iu;
|
|
3337
3364
|
const SEED_FUNCTION = /^create\s+(?:or\s+replace\s+)?function\s+(?:"[^"]+"|\w+)\.(?:"seed"|seed)\s*\(\s*\)[\s\S]*?\$(\w*)\$([\s\S]*)\$\1\$/iu;
|
|
3365
|
+
const BUNDLE_HASH = /\bhash\s*=\s*'(sha-256:[\w-]+)'/u;
|
|
3338
3366
|
function rowKey(values) {
|
|
3339
3367
|
return values.join(" ");
|
|
3340
3368
|
}
|
|
@@ -3357,6 +3385,16 @@ function lastSeed(files, cwd, config, table) {
|
|
|
3357
3385
|
for (const file of sqlFiles$1(cwd, config.doctor?.migrations ?? MIGRATION_DIRS)) for (const { text } of seedStatements(files.read(file))) {
|
|
3358
3386
|
const insert = SEED_INSERT.exec(text) ?? SEED_VIEW.exec(text);
|
|
3359
3387
|
if (insert !== null && tableKey(group(insert, 1)) === table) {
|
|
3388
|
+
const body = group(insert, 2);
|
|
3389
|
+
if (body.includes("permdock_policy_bundle")) {
|
|
3390
|
+
const pinned = BUNDLE_HASH.exec(body);
|
|
3391
|
+
seeded = {
|
|
3392
|
+
file: rel(cwd, file),
|
|
3393
|
+
rows: /* @__PURE__ */ new Set(),
|
|
3394
|
+
bundle: pinned === null ? "" : group(pinned, 1)
|
|
3395
|
+
};
|
|
3396
|
+
continue;
|
|
3397
|
+
}
|
|
3360
3398
|
const rows = /* @__PURE__ */ new Set();
|
|
3361
3399
|
for (const row of group(insert, 2).matchAll(SEED_ROW)) rows.add(rowKey(row.slice(1, 6).map((value) => value.replaceAll("''", "'"))));
|
|
3362
3400
|
seeded = {
|
|
@@ -3405,20 +3443,29 @@ async function pd054(input) {
|
|
|
3405
3443
|
}
|
|
3406
3444
|
};
|
|
3407
3445
|
let expected;
|
|
3446
|
+
let hash;
|
|
3408
3447
|
try {
|
|
3409
3448
|
const options = generateOptions(generate);
|
|
3410
3449
|
const built = isRefusal(options) ? options : buildContext(generate, policy, options);
|
|
3411
3450
|
if (isRefusal(built)) return [];
|
|
3412
|
-
|
|
3451
|
+
const rows = compileGrants(policy, built.ctx, tableNames(rls?.tables), [], true, rls?.rowHelpers !== void 0 || inheritTargets(policy).length > 0).rolePermissions;
|
|
3452
|
+
expected = new Set(rows.map((row) => rowKey([
|
|
3413
3453
|
row.role,
|
|
3414
3454
|
row.permission,
|
|
3415
3455
|
row.grantKey,
|
|
3416
3456
|
row.scope,
|
|
3417
3457
|
row.effect
|
|
3418
3458
|
])));
|
|
3459
|
+
hash = policyBundle(rows).hash;
|
|
3419
3460
|
} catch {
|
|
3420
3461
|
return [];
|
|
3421
3462
|
}
|
|
3463
|
+
if (seeded.bundle !== void 0) return seeded.bundle === hash ? [] : [{
|
|
3464
|
+
code: "PD054",
|
|
3465
|
+
severity: "warning",
|
|
3466
|
+
message: `${seeded.file} pins ${schema}.role_permissions to the policy bundle ${seeded.bundle === "" ? "(none)" : seeded.bundle}, but the policy compiles to ${hash}`,
|
|
3467
|
+
fix: "run permdock rls generate and permdock policy bundle, and apply both"
|
|
3468
|
+
}];
|
|
3422
3469
|
const missing = [...expected].filter((row) => !seeded.rows.has(row));
|
|
3423
3470
|
const stale = [...seeded.rows].filter((row) => !expected.has(row));
|
|
3424
3471
|
if (missing.length === 0 && stale.length === 0) return [];
|
|
@@ -4515,7 +4562,7 @@ const DOCTOR_CHECKS = [
|
|
|
4515
4562
|
{
|
|
4516
4563
|
code: "PD084",
|
|
4517
4564
|
groups: ["powersync", "react-native"],
|
|
4518
|
-
run: pd084
|
|
4565
|
+
run: (project) => pd084(project, project.sources())
|
|
4519
4566
|
},
|
|
4520
4567
|
{
|
|
4521
4568
|
code: "PD102",
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { a as suggestion } from "./args-Bc0HLiD4.js";
|
|
2
2
|
import { n as CliError } from "./errors-DgLOqc6j.js";
|
|
3
|
-
import { n as runGen } from "./gen-
|
|
3
|
+
import { n as runGen } from "./gen-DCmo0Irk.js";
|
|
4
4
|
import { c as requirePolicy } from "./load-CZnlAyZ8.js";
|
|
5
5
|
import { n as packageManagerOf } from "./peer-D77JpXe-.js";
|
|
6
|
-
import { i as readSupabaseConfig } from "./supabase-config-
|
|
6
|
+
import { i as readSupabaseConfig } from "./supabase-config-BrhSp-U7.js";
|
|
7
7
|
import { n as runGenerate } from "./pipeline-CGctXudd.js";
|
|
8
8
|
import { n as isPermDockPlugin } from "./plugin-MQVfUBUS.js";
|
|
9
9
|
import { existsSync, readdirSync } from "node:fs";
|
|
@@ -12,7 +12,7 @@ import { c as listPermissions } from "./permission-registry-DMYRZVcn.js";
|
|
|
12
12
|
import { d as scopeList } from "./scopes-B-KX9EI8.js";
|
|
13
13
|
import { o as listPlans, s as listRoles } from "./vocabulary-CE2k7s1a.js";
|
|
14
14
|
import { c as jsonSchemaOf } from "./catalog-doc-Bp5khmCG.js";
|
|
15
|
-
import { t as resolveNames } from "./resolve-names-
|
|
15
|
+
import { t as resolveNames } from "./resolve-names-B3PM0l3J.js";
|
|
16
16
|
import { t as DESCRIBE_TITLES } from "./describe-B7EosIKA.js";
|
|
17
17
|
import { i as schemaExpression } from "./generate-5_kz2309.js";
|
|
18
18
|
import { existsSync, readFileSync } from "node:fs";
|
|
@@ -397,7 +397,7 @@ function modelDigest(model) {
|
|
|
397
397
|
return createHash("sha256").update(canonicalJson(model)).digest("base64url");
|
|
398
398
|
}
|
|
399
399
|
/**
|
|
400
|
-
* `// @generated by permdock generate zod@0.28.
|
|
400
|
+
* `// @generated by permdock generate zod@0.28.1 from policy.ts sha-256:…; do
|
|
401
401
|
* not edit`.
|
|
402
402
|
*/
|
|
403
403
|
function generatedHeader(kind, info) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { t as renderKinds } from "./gen-DCmo0Irk.js";
|
|
@@ -47,7 +47,7 @@ function kindPlugin(kind, options = {}) {
|
|
|
47
47
|
}],
|
|
48
48
|
emit: async (_task, model, source) => {
|
|
49
49
|
if (source === void 0) return [];
|
|
50
|
-
const { renderKinds } = await import("./gen-
|
|
50
|
+
const { renderKinds } = await import("./gen-DnaCR5w3.js");
|
|
51
51
|
const files = await renderKinds({
|
|
52
52
|
cwd: source.cwd,
|
|
53
53
|
config: source.config,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as defineLeaf } from "./command-9GAzSI7E.js";
|
|
2
2
|
import { n as CliError } from "./errors-DgLOqc6j.js";
|
|
3
3
|
import { c as generateFlags, f as policyFlag, i as dryRunFlag, n as dbUrl, r as dbUrlFlags, t as checkFlag } from "./flags-C0e-BzGW.js";
|
|
4
|
-
import { t as executeGenerate } from "./execute-
|
|
4
|
+
import { t as executeGenerate } from "./execute-CdqPJ6SP.js";
|
|
5
5
|
import { t as receiptRows } from "./pipeline-CGctXudd.js";
|
|
6
6
|
// src/cli/commands/generate.ts
|
|
7
7
|
function concurrencyFlag(value) {
|
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
import { c as listPermissions, u as renamedKeys } from "./permission-registry-DMYRZVcn.js";
|
|
2
2
|
import { t as policyRowConditionKeys } from "./row-conditions-DwIJocfQ.js";
|
|
3
3
|
import { a as describeError, i as configError, o as exitCodeOfError } from "./errors-DgLOqc6j.js";
|
|
4
|
-
import {
|
|
4
|
+
import { $ as graphSql, D as seedSql, N as guardAuthAdminGrants, P as unguardAuthAdminGrants, S as accessSql, T as helpersSql, Y as closureBackfillSql, c as permissionHelpersSql, d as permittedByPermissionHelper, i as tableNames, r as tableNameOf, s as checkName, u as permissionKeysHelper } from "./tables-D-tmMHww.js";
|
|
5
5
|
import { i as qualifySqlTable } from "./sql-T4GaBh9X.js";
|
|
6
|
-
import { c as indexesSql, i as tableFor, l as pruneIndexTargets, n as compileGrants, r as inferredCommand, s as indexTargets, u as readTableIndexFacts } from "./compile-
|
|
7
|
-
import { a as CANDIDATES, c as rowHelpersSql, d as rebuildPlan, i as buildContext, l as rowSetSql, n as isRefusal, o as inheritTargets, r as splitsPart, s as levelKeys, t as generateOptions, u as DROPPED_LIST } from "./generate-options-
|
|
6
|
+
import { c as indexesSql, i as tableFor, l as pruneIndexTargets, n as compileGrants, r as inferredCommand, s as indexTargets, u as readTableIndexFacts } from "./compile-CT7x66_U.js";
|
|
7
|
+
import { a as CANDIDATES, c as rowHelpersSql, d as rebuildPlan, i as buildContext, l as rowSetSql, n as isRefusal, o as inheritTargets, r as splitsPart, s as levelKeys, t as generateOptions, u as DROPPED_LIST } from "./generate-options-AvKV0IXA.js";
|
|
8
8
|
import { t as policyFromCatalog } from "./policy-from-catalog-YKaTeaco.js";
|
|
9
|
-
import { t as fetchProjectPolicy } from "./pull-
|
|
9
|
+
import { t as fetchProjectPolicy } from "./pull-xhMWizWH.js";
|
|
10
10
|
import { c as requirePolicy } from "./load-CZnlAyZ8.js";
|
|
11
11
|
import { t as compact } from "./compact-C4LFuqbW.js";
|
|
12
|
-
import { a as nonEmptyOr } from "./output-
|
|
12
|
+
import { a as nonEmptyOr } from "./output-Cqtb8lW_.js";
|
|
13
13
|
import { i as INDEXES_MARKER, n as GRANTS_MARKER, o as SEEDS_MARKER, t as BACKFILL_MARKER } from "./markers-C-kThnKN.js";
|
|
14
14
|
import { G as graphHelper, H as byKey, K as graphSqlName, U as BOOTSTRAP_PERMISSIONS, lt as scopeSources, rt as memberIdsHelper, st as permittedIdsHelper, ut as scopeTable } from "./interactive-only-CQsgMc1E.js";
|
|
15
15
|
import { a as quoteIdent, c as quoteTable, i as qualified$1, o as quoteLiteral, s as quoteQualified } from "./quote-BKrTBbcH.js";
|
|
16
16
|
import { D as idTypeOf, O as scopeTypeOf, _ as subjectClaimJsonSql, c as SESSION_LIVE_HELPER, g as sessionLiveHelperSql, o as rootName, r as HELPERS, t as CUSTOM_ROLES, y as subjectIdSql } from "./shared-BdF5DJDQ.js";
|
|
17
|
-
import { a as supabaseHookSql, c as asideAuthzReceive, h as declarativeSql, p as resolveSchemas, t as grantsLabel, u as approvalsSql } from "./hook-sql-
|
|
18
|
-
import { i as assignmentSql, n as ownershipSql } from "./ownership-
|
|
17
|
+
import { a as supabaseHookSql, c as asideAuthzReceive, h as declarativeSql, p as resolveSchemas, t as grantsLabel, u as approvalsSql } from "./hook-sql-Cunsdk5x.js";
|
|
18
|
+
import { i as assignmentSql, n as ownershipSql } from "./ownership-fYxdtYs0.js";
|
|
19
19
|
import { p as scopeField } from "./tenancy-B5Xxt9Sc.js";
|
|
20
20
|
import { i as collectGrants, n as breakGlassHolder, r as breakGlassKey } from "./grants-C7bGZFPa.js";
|
|
21
21
|
import { t as supautilsRejections } from "./supautils-DXzJ2E2Q.js";
|
|
22
22
|
import { a as fieldViewsSql, c as ACTOR_MAY_WRITE, d as assemblePolicies, i as fieldViews, l as actorMayWriteCall, m as readOnlyActorPolicies, n as columnGrantSql, o as rowBranches, p as readOnlyActorKinds, r as columnRevokeSql, u as actorMayWriteSql } from "./fields-6d1j-q3c.js";
|
|
23
23
|
import { l as isFieldRelation } from "./resource-relations-Ck5sjYQR.js";
|
|
24
24
|
import { c as rootScope } from "./scopes-B-KX9EI8.js";
|
|
25
|
-
import { n as permissionHoldersSql } from "./resolve-names-
|
|
26
|
-
import { i as rbacScaffold } from "./rbac-
|
|
25
|
+
import { n as permissionHoldersSql } from "./resolve-names-B3PM0l3J.js";
|
|
26
|
+
import { i as rbacScaffold } from "./rbac-ir19O-e-.js";
|
|
27
27
|
import { i as dateAt } from "./time-r0CKBm57.js";
|
|
28
28
|
import { _ as writeOutputFiles, a as isSeedsDirectory, d as pgDeltaPath, g as underSchemaDir, h as serviceRel, l as parseSplit, m as seedsMigration, n as dataMigrationFile, p as seedDeltaNote, r as driftOf, u as partPath } from "./output-files-D5D-8-4l.js";
|
|
29
|
-
import { i as readSupabaseConfig } from "./supabase-config-
|
|
29
|
+
import { i as readSupabaseConfig } from "./supabase-config-BrhSp-U7.js";
|
|
30
30
|
import { a as splitUndiffed } from "./deciding-columns-BnglEKqU.js";
|
|
31
31
|
import { o as sqlFiles } from "./files-DAR51W3J.js";
|
|
32
32
|
import { n as MIGRATION_DIRS } from "./constants-PCJiir_3.js";
|
|
@@ -14,13 +14,13 @@ import { f as orSql, g as branchClauses } from "./fields-6d1j-q3c.js";
|
|
|
14
14
|
import { a as quoteIdent, c as quoteTable, i as qualified, o as quoteLiteral, s as quoteQualified } from "./quote-BKrTBbcH.js";
|
|
15
15
|
import { A as tenantTypeOf, C as parseMembershipsFlag, D as idTypeOf, E as firstScopeType, O as scopeTypeOf, a as customRolesOn, l as USER_ID_HELPER, r as HELPERS, s as signedIn, t as CUSTOM_ROLES, y as subjectIdSql } from "./shared-BdF5DJDQ.js";
|
|
16
16
|
import { H as byKey, I as raiseSql, K as graphSqlName, M as currentKeyExpr, R as rolesTableScope, V as byCodeUnit, _ as memoizes, g as memoizedSetofSql, ht as checkSuspension, i as interactiveOnlyKeys, m as memoHitList, o as memoUserSql } from "./interactive-only-CQsgMc1E.js";
|
|
17
|
-
import { A as tokenScopeUnlimitedSql, B as apiKeyUnlimitedSql, E as memoReadsSql, I as API_KEY_ALLOWS, M as memoReadTriggersSql, O as TOKEN_SCOPE_ALLOWS, R as apiKeyClaimSql, V as apiKeysPlan, X as
|
|
18
|
-
import { t as resolveNames } from "./resolve-names-
|
|
17
|
+
import { A as tokenScopeUnlimitedSql, B as apiKeyUnlimitedSql, E as memoReadsSql, I as API_KEY_ALLOWS, M as memoReadTriggersSql, O as TOKEN_SCOPE_ALLOWS, Q as graphPlan, R as apiKeyClaimSql, V as apiKeysPlan, X as closureDepths, Z as graphIdsSql, a as tablelessResources, d as permittedByPermissionHelper, i as tableNames, j as tokenScopesPlan, n as resolveVias, o as PERMISSION_HELPERS, t as checkSharedTables } from "./tables-D-tmMHww.js";
|
|
18
|
+
import { t as resolveNames } from "./resolve-names-B3PM0l3J.js";
|
|
19
19
|
import { a as roleNames, t as assignableRoles } from "./grants-C7bGZFPa.js";
|
|
20
|
-
import { a as resolveAuthorize } from "./rbac-
|
|
21
|
-
import { r as unsatisfiedKinds, t as ownershipRules } from "./ownership-
|
|
20
|
+
import { a as resolveAuthorize } from "./rbac-ir19O-e-.js";
|
|
21
|
+
import { r as unsatisfiedKinds, t as ownershipRules } from "./ownership-fYxdtYs0.js";
|
|
22
22
|
import { t as membershipSourcesOf } from "./sources-BbSUNmFX.js";
|
|
23
|
-
import { i as tableFor } from "./compile-
|
|
23
|
+
import { i as tableFor } from "./compile-CT7x66_U.js";
|
|
24
24
|
// src/cli/rls/custom-role-rebuild.ts
|
|
25
25
|
const PREFIX = "PermDock CLI";
|
|
26
26
|
/** A column of the roles-table row `r`. */
|
|
@@ -17,12 +17,12 @@ import { c as ACTOR_MAY_WRITE, p as readOnlyActorKinds } from "./fields-6d1j-q3c
|
|
|
17
17
|
import { a as quoteIdent, c as quoteTable, i as qualified$1, o as quoteLiteral, s as quoteQualified } from "./quote-BKrTBbcH.js";
|
|
18
18
|
import { A as tenantTypeOf, E as firstScopeType, O as scopeTypeOf, a as customRolesOn, j as userTypeOf, k as sqlType, l as USER_ID_HELPER, r as HELPERS, y as subjectIdSql } from "./shared-BdF5DJDQ.js";
|
|
19
19
|
import { J as hasMemberFor, Q as isTeamScope, U as BOOTSTRAP_PERMISSIONS, X as hasPermittedUsers, at as memberRoleOf, et as memberForHelper, ht as checkSuspension, i as interactiveOnlyKeys, it as memberOfHelper, j as globalRoleSource, nt as memberForTable, ot as permittedForHelper, pt as activeRowSql, rt as memberIdsHelper, st as permittedIdsHelper, t as INTERACTIVE_ALLOWS, tt as memberForSources } from "./interactive-only-CQsgMc1E.js";
|
|
20
|
-
import { H as HOOK_TEAM_READER, I as API_KEY_ALLOWS, O as TOKEN_SCOPE_ALLOWS, U as hookTeamReader, W as hookTeamsHelper, b as ASSIGNMENTS, d as permittedByPermissionHelper, l as permissionKeysForHelper, o as PERMISSION_HELPERS, s as checkName, x as OWNERSHIP, z as apiKeyFields } from "./tables-
|
|
21
|
-
import { r as permittedUsersHelper, t as resolveNames } from "./resolve-names-
|
|
22
|
-
import { a as supabaseConfig, t as declarativeSchemaDir } from "./supabase-config-
|
|
23
|
-
import { a as resolveAuthorize, n as hookUri, t as authAdminRead } from "./rbac-
|
|
20
|
+
import { H as HOOK_TEAM_READER, I as API_KEY_ALLOWS, O as TOKEN_SCOPE_ALLOWS, U as hookTeamReader, W as hookTeamsHelper, b as ASSIGNMENTS, d as permittedByPermissionHelper, l as permissionKeysForHelper, o as PERMISSION_HELPERS, s as checkName, x as OWNERSHIP, z as apiKeyFields } from "./tables-D-tmMHww.js";
|
|
21
|
+
import { r as permittedUsersHelper, t as resolveNames } from "./resolve-names-B3PM0l3J.js";
|
|
22
|
+
import { a as supabaseConfig, t as declarativeSchemaDir } from "./supabase-config-BrhSp-U7.js";
|
|
23
|
+
import { a as resolveAuthorize, n as hookUri, t as authAdminRead } from "./rbac-ir19O-e-.js";
|
|
24
24
|
import { a as splitUndiffed, r as tableKey, t as decidingColumns } from "./deciding-columns-BnglEKqU.js";
|
|
25
|
-
import { a as guardedTables, t as ownershipRules } from "./ownership-
|
|
25
|
+
import { a as guardedTables, t as ownershipRules } from "./ownership-fYxdtYs0.js";
|
|
26
26
|
import { t as membershipSourcesOf } from "./sources-BbSUNmFX.js";
|
|
27
27
|
// src/cli/claims-schema.ts
|
|
28
28
|
/**
|
|
@@ -6,7 +6,7 @@ import { t as applyFiles } from "./files-DuV7wRim.js";
|
|
|
6
6
|
import { n as httpRequest } from "./http-BbX_Ou3_.js";
|
|
7
7
|
import { i as readJsonFile } from "./files-DAR51W3J.js";
|
|
8
8
|
import { i as schemaExpression, t as emitPermissionsModule } from "./generate-5_kz2309.js";
|
|
9
|
-
import { t as validateOpenapi } from "./schema-
|
|
9
|
+
import { t as validateOpenapi } from "./schema-C-Nn6M1P.js";
|
|
10
10
|
import { existsSync, readFileSync } from "node:fs";
|
|
11
11
|
import { resolve } from "node:path";
|
|
12
12
|
// src/cli/openapi/import.ts
|