permdock 0.9.0 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/active-tenant-DVee32-T.js +39 -0
- package/dist/{adoption-scan-Ch07MdxN.js → adoption-scan-DKCOsfcF.js} +1 -1
- package/dist/{arazzo-BpS7LnV0.js → arazzo-BXaEhGHM.js} +1 -1
- package/dist/{arazzo-CmQaGPkM.js → arazzo-CTH5iN--.js} +1 -1
- package/dist/better-supabase/index.d.ts +188 -23
- package/dist/better-supabase/index.js +246 -62
- package/dist/{casbin-B7_yS-oo.js → casbin-BuTZnSPv.js} +1 -1
- package/dist/{casbin-bHyIxTNQ.js → casbin-DTi6HSsl.js} +1 -1
- package/dist/cli/bin.js +1 -1
- package/dist/cli/index.d.ts +6 -1
- package/dist/cli/index.js +10 -2
- package/dist/{cloud-3kWfjnYy.js → cloud-DiAiYFRo.js} +2 -2
- package/dist/{codemod-Bv5i-Mzo.js → codemod-C1U8_Zu3.js} +1 -1
- package/dist/{codemod-D9Aiii1r.js → codemod-_q_ZI01S.js} +2 -2
- package/dist/{collect-B80GYEot.js → collect-D9Tt0Bcx.js} +1 -1
- package/dist/{completion-_bc0OUQ-.js → completion-DLTuCf53.js} +1 -1
- package/dist/{config-BwPBfN0t.js → config-BR23fL8m.js} +2 -2
- package/dist/{config-D5XrLWpk.js → config-CmydKZr2.js} +1 -1
- package/dist/{config-report-BmWIskD7.js → config-report-5AwptLr2.js} +2 -2
- package/dist/{config-shape-ykV0Vm2n.js → config-shape-tsxHx71E.js} +2 -1
- package/dist/{create-BamXmeob.d.ts → create-CDd9c22W.d.ts} +10 -1
- package/dist/{doctor-LPMYjSqO.js → doctor-DxyVeUEE.js} +2 -2
- package/dist/{doctor-ClRVAtXQ.js → doctor-ktitU5Dl.js} +142 -14
- package/dist/{fields-D0vUI6dq.js → fields-DI8s3cPl.js} +1 -1
- package/dist/{gen-BtfFWGbz.js → gen-DuAhghDw.js} +1 -1
- package/dist/{gen-BFfzZSLH.js → gen-DwgCSC6V.js} +1 -1
- package/dist/{import-CST57XLp.js → import-CNBF96hB.js} +2 -2
- package/dist/{import-ACkOrv6g.js → import-t1yqnCyG.js} +1 -1
- package/dist/{index-vYjMrXyK.d.ts → index-Cay5-Kvx.d.ts} +3 -51
- package/dist/index.d.ts +2 -1
- package/dist/{init-txYTuW9u.js → init-CY7THM2v.js} +3 -3
- package/dist/{init-BjuFDYT1.js → init-DFwylmiN.js} +1 -1
- package/dist/{login-CgfCTO3F.js → login-B92-dZMK.js} +1 -1
- package/dist/{login-CfImTJGb.js → login-C5XLYZSF.js} +3 -3
- package/dist/{manifest-CzzWtnAb.d.ts → manifest-B5yF3CIq.d.ts} +19 -0
- package/dist/{manifest-wg8WkkpD.js → manifest-BXTbHNIV.js} +1 -1
- package/dist/{manifest-B2QPh19C.js → manifest-Cav1rjNQ.js} +33 -33
- package/dist/{manifest-schema-2r37XRhD.js → manifest-schema-DQkBK2Mr.js} +28 -1
- package/dist/{migrate-B7oP_sQU.js → migrate-BJHxQqT5.js} +2 -2
- package/dist/{module-values-BJTBdo6y.js → module-values-B1EVTkHP.js} +1 -1
- package/dist/next/index.d.ts +16 -3
- package/dist/next/index.js +1 -1
- package/dist/next/plugin.d.ts +1 -1
- package/dist/next/plugin.js +1 -1
- package/dist/{openapi-BGeuunWC.js → openapi-CuePQL4z.js} +1 -1
- package/dist/{openapi-BIpw3Mb7.js → openapi-gMQQSzNn.js} +2 -2
- package/dist/{output-DV5dwOTs.js → output-CtyBwTNB.js} +1 -1
- package/dist/{ownership-DA5YdYTm.js → ownership-qqBuGJXr.js} +3 -3
- package/dist/{postgrest-5Dr3W64L.js → postgrest-DAxFltvO.js} +1 -1
- package/dist/powersync-6vgKevSi.js +1 -0
- package/dist/{powersync-Bg8u-JcR.js → powersync-CBcsEvdr.js} +2 -2
- package/dist/{powersync-CJrT1DSc.js → powersync-CD8-Ypao.js} +188 -36
- package/dist/{pull-2nJr0qg_.js → pull-CAeaAioC.js} +2 -2
- package/dist/pull-DfJALUbS.js +1 -0
- package/dist/{push-Bn-lMEmI.js → push-Dq_ca4-j.js} +1 -1
- package/dist/{resolve-names-ConCSj1y.js → resolve-names-Y1Cb22cp.js} +4 -4
- package/dist/{rls-Ba9wN0SP.js → rls-BYHN5bcJ.js} +1 -1
- package/dist/{rls-Cx0dtsB7.js → rls-CtRaRrn3.js} +22 -15
- package/dist/run-0vOholnN.js +1 -0
- package/dist/{run-PbRlXTfh.js → run-B5nyNKe8.js} +3 -3
- package/dist/{run-ticket-Dv7aF7Dk.js → run-ticket-DfnZCh-u.js} +19 -6
- package/dist/{run-ticket-B2o2Kxz8.d.ts → run-ticket-ylovhyFQ.d.ts} +16 -1
- package/dist/{scan-CRTj6fke.js → scan-CvFWW_fU.js} +1 -1
- package/dist/{schema-BTsE1WRT.js → schema-CQzIJdEd.js} +1 -1
- package/dist/server/index.d.ts +2 -2
- package/dist/server/index.js +1 -1
- package/dist/{shared-Afctg7B0.js → shared-DrGLwM3s.js} +1 -1
- package/dist/{skills-C9uKfSF5.js → skills-BZc81VLt.js} +1 -1
- package/dist/{skills-CQQcuGBi.js → skills-Bar7ZqwM.js} +1 -1
- package/dist/{sources-CMAM-2A3.js → sources-C4vkzZJV.js} +12 -7
- package/dist/{types-BMVDHvI0.d.ts → sources-oB1Hg1Fm.d.ts} +316 -2
- package/dist/supabase/index.d.ts +10 -3
- package/dist/supabase/index.js +4 -4
- package/dist/{supabase-SBs3MYUE.js → supabase-CBEK6KEo.js} +2 -2
- package/dist/{supabase-DnMMg5Fn.js → supabase-CC6rIri4.js} +3 -2
- package/dist/supabase-hook-CWvEpdCh.js +1 -0
- package/dist/{supabase-hook-CrgU06WH.js → supabase-hook-CyuD9Wau.js} +110 -47
- package/dist/{supautils-ByezN3b8.js → supautils-C-_jqylY.js} +8 -8
- package/dist/{tables-BqrxBCir.js → tables-DimBcVWY.js} +2 -2
- package/dist/testing/fixtures/index.d.ts +1 -1
- package/dist/testing/fixtures/index.js +26 -28
- package/dist/testing/index.d.ts +4 -3
- package/dist/testing/index.js +3 -2
- package/dist/{types-CzOeVvcC.d.ts → types-Cklw5hJo.d.ts} +23 -2
- package/dist/unplugin/index.d.ts +1 -1
- package/dist/unplugin/index.js +1 -1
- package/dist/usage-CNca1i1W.js +1 -0
- package/dist/{usage-B9EtHWLa.js → usage-Y6xZUfE-.js} +2 -2
- package/dist/{usage-CBzgwfIs.js → usage-heV5KOiU.js} +1 -1
- package/dist/{verify-DlUcTDBz.js → verify-6EauWrkP.js} +6 -6
- package/dist/version-cache-Df11C2Qp.d.ts +51 -0
- package/dist/{watch-BFDKqmUa.js → watch-Bpci3hBY.js} +1 -1
- package/dist/watch-COuvly20.js +1 -0
- package/dist/workflow/index.d.ts +1 -1
- package/dist/workflow/index.js +22 -6
- package/dist/workflow-sdk/index.d.ts +1 -1
- package/package.json +2 -2
- package/schemas/run-v1.json +16 -0
- package/schemas/supabase-manifest-v1.json +28 -0
- package/skills/permdock-agents/references/operations-automations-chat.md +1 -0
- package/skills/permdock-approvals/references/stores-and-resume.md +1 -1
- package/skills/permdock-wire/references/adapters.md +2 -2
- package/dist/powersync-B701tvhE.js +0 -1
- package/dist/pull-C3EEGzSw.js +0 -1
- package/dist/run-Ck22anC2.js +0 -1
- package/dist/sources-CWG32C0G.d.ts +0 -312
- package/dist/supabase-hook-C0FyEACZ.js +0 -1
- package/dist/usage-0hjZPIRX.js +0 -1
- package/dist/watch-ClLuO2TL.js +0 -1
|
@@ -30,20 +30,20 @@ const SECTIONS = [
|
|
|
30
30
|
docs: "init",
|
|
31
31
|
effects: ["files"],
|
|
32
32
|
config: false,
|
|
33
|
-
load: async () => (await import("./init-
|
|
33
|
+
load: async () => (await import("./init-CY7THM2v.js")).init
|
|
34
34
|
}),
|
|
35
35
|
group("preset", "Decode a preset code, or print its permdock.com/create link", "preset", [leaf("decode", "Print what a preset code holds", {
|
|
36
36
|
examples: ["permdock preset decode p1AQIDBAc"],
|
|
37
37
|
docs: "preset",
|
|
38
38
|
effects: [],
|
|
39
39
|
config: false,
|
|
40
|
-
load: async () => (await import("./init-
|
|
40
|
+
load: async () => (await import("./init-CY7THM2v.js")).presetDecode
|
|
41
41
|
}), leaf("url", "Print the permdock.com/create link that opens a code", {
|
|
42
42
|
examples: ["permdock preset url p1AQIDBAc"],
|
|
43
43
|
docs: "preset",
|
|
44
44
|
effects: [],
|
|
45
45
|
config: false,
|
|
46
|
-
load: async () => (await import("./init-
|
|
46
|
+
load: async () => (await import("./init-CY7THM2v.js")).presetUrl
|
|
47
47
|
})]),
|
|
48
48
|
group("skills", "Install, update or list the PermDock Agent Skills", "skills", [
|
|
49
49
|
leaf("install", "Copy the Agent Skills into the agent folders", {
|
|
@@ -55,21 +55,21 @@ const SECTIONS = [
|
|
|
55
55
|
docs: "skills",
|
|
56
56
|
effects: ["files"],
|
|
57
57
|
config: false,
|
|
58
|
-
load: async () => (await import("./skills-
|
|
58
|
+
load: async () => (await import("./skills-BZc81VLt.js")).install
|
|
59
59
|
}),
|
|
60
60
|
leaf("update", "Replace installed skills with this version's", {
|
|
61
61
|
examples: ["permdock skills update"],
|
|
62
62
|
docs: "skills",
|
|
63
63
|
effects: ["files"],
|
|
64
64
|
config: false,
|
|
65
|
-
load: async () => (await import("./skills-
|
|
65
|
+
load: async () => (await import("./skills-BZc81VLt.js")).update
|
|
66
66
|
}),
|
|
67
67
|
leaf("list", "List the skills and where each is installed", {
|
|
68
68
|
examples: ["permdock skills list"],
|
|
69
69
|
docs: "skills",
|
|
70
70
|
effects: [],
|
|
71
71
|
config: false,
|
|
72
|
-
load: async () => (await import("./skills-
|
|
72
|
+
load: async () => (await import("./skills-BZc81VLt.js")).list
|
|
73
73
|
})
|
|
74
74
|
]),
|
|
75
75
|
leaf("doctor", "Check a PermDock installation and print a fix for each finding", {
|
|
@@ -82,7 +82,7 @@ const SECTIONS = [
|
|
|
82
82
|
effects: ["files"],
|
|
83
83
|
config: true,
|
|
84
84
|
findings: true,
|
|
85
|
-
load: async () => (await import("./doctor-
|
|
85
|
+
load: async () => (await import("./doctor-DxyVeUEE.js")).doctor
|
|
86
86
|
}),
|
|
87
87
|
leaf("completion", "Print the shell completion script for bash, zsh or fish", {
|
|
88
88
|
examples: ["permdock completion zsh > ~/.zfunc/_permdock", "eval \"$(permdock completion bash)\""],
|
|
@@ -90,7 +90,7 @@ const SECTIONS = [
|
|
|
90
90
|
effects: [],
|
|
91
91
|
config: false,
|
|
92
92
|
shellOutput: true,
|
|
93
|
-
load: async () => (await import("./completion-
|
|
93
|
+
load: async () => (await import("./completion-DLTuCf53.js")).completion
|
|
94
94
|
})
|
|
95
95
|
]
|
|
96
96
|
},
|
|
@@ -106,7 +106,7 @@ const SECTIONS = [
|
|
|
106
106
|
docs: "collect",
|
|
107
107
|
effects: ["files"],
|
|
108
108
|
config: true,
|
|
109
|
-
load: async () => (await import("./collect-
|
|
109
|
+
load: async () => (await import("./collect-D9Tt0Bcx.js")).collect
|
|
110
110
|
}),
|
|
111
111
|
leaf("catalog", "Export the catalog as catalog JSON, JSON Schema or Markdown", {
|
|
112
112
|
examples: ["permdock catalog --out permissions.catalog.json", "permdock catalog --kind markdown"],
|
|
@@ -124,7 +124,7 @@ const SECTIONS = [
|
|
|
124
124
|
docs: "gen",
|
|
125
125
|
effects: ["files"],
|
|
126
126
|
config: true,
|
|
127
|
-
load: async () => (await import("./gen-
|
|
127
|
+
load: async () => (await import("./gen-DwgCSC6V.js")).gen
|
|
128
128
|
}),
|
|
129
129
|
leaf("usage", "Report unused, ungranted and role-less permissions and conditions on undeclared fields", {
|
|
130
130
|
examples: ["permdock usage", "permdock usage --fail-on warning"],
|
|
@@ -132,7 +132,7 @@ const SECTIONS = [
|
|
|
132
132
|
effects: [],
|
|
133
133
|
config: true,
|
|
134
134
|
findings: true,
|
|
135
|
-
load: async () => (await import("./usage-
|
|
135
|
+
load: async () => (await import("./usage-heV5KOiU.js")).usage
|
|
136
136
|
}),
|
|
137
137
|
leaf("diff", "Compare two policies or catalogs; exit 1 on a breaking change", {
|
|
138
138
|
examples: ["permdock diff main.catalog.json permissions.catalog.json", "permdock diff ./old-policy.ts ./src/policy.ts --impact"],
|
|
@@ -147,7 +147,7 @@ const SECTIONS = [
|
|
|
147
147
|
effects: [],
|
|
148
148
|
config: true,
|
|
149
149
|
findings: true,
|
|
150
|
-
load: async () => (await import("./config-
|
|
150
|
+
load: async () => (await import("./config-CmydKZr2.js")).config
|
|
151
151
|
})
|
|
152
152
|
]
|
|
153
153
|
},
|
|
@@ -164,14 +164,14 @@ const SECTIONS = [
|
|
|
164
164
|
"network"
|
|
165
165
|
],
|
|
166
166
|
config: true,
|
|
167
|
-
load: async () => (await import("./rls-
|
|
167
|
+
load: async () => (await import("./rls-BYHN5bcJ.js")).generate
|
|
168
168
|
}),
|
|
169
169
|
leaf("import", "Turn existing RLS policies into a generated definition", {
|
|
170
170
|
examples: ["permdock rls import --sql schema.sql --out src/permissions.generated.ts", "permdock rls import --db-url-stdin --out src/permissions.generated.ts"],
|
|
171
171
|
docs: "rls",
|
|
172
172
|
effects: ["files", "database:read"],
|
|
173
173
|
config: true,
|
|
174
|
-
load: async () => (await import("./rls-
|
|
174
|
+
load: async () => (await import("./rls-BYHN5bcJ.js")).importPolicies
|
|
175
175
|
}),
|
|
176
176
|
leaf("verify", "Run the fixtures against the policies, or compare a live database", {
|
|
177
177
|
examples: [
|
|
@@ -183,21 +183,21 @@ const SECTIONS = [
|
|
|
183
183
|
effects: ["files", "database:read"],
|
|
184
184
|
config: true,
|
|
185
185
|
findings: true,
|
|
186
|
-
load: async () => (await import("./rls-
|
|
186
|
+
load: async () => (await import("./rls-BYHN5bcJ.js")).verify
|
|
187
187
|
}),
|
|
188
188
|
leaf("migrate", "Rewrite hand-written policies onto the generated helpers", {
|
|
189
189
|
examples: ["permdock rls migrate --sql supabase/migrations --dry-run", "permdock rls migrate --sql supabase/migrations"],
|
|
190
190
|
docs: "rls",
|
|
191
191
|
effects: ["rewrite", "files"],
|
|
192
192
|
config: true,
|
|
193
|
-
load: async () => (await import("./rls-
|
|
193
|
+
load: async () => (await import("./rls-BYHN5bcJ.js")).migrate
|
|
194
194
|
}),
|
|
195
195
|
leaf("explain", "Show the tables, membership sources and triggers the SQL binds to", {
|
|
196
196
|
examples: ["permdock rls explain", "permdock rls explain --db-url-stdin --json"],
|
|
197
197
|
docs: "rls",
|
|
198
198
|
effects: ["database:read"],
|
|
199
199
|
config: true,
|
|
200
|
-
load: async () => (await import("./rls-
|
|
200
|
+
load: async () => (await import("./rls-BYHN5bcJ.js")).explain
|
|
201
201
|
})
|
|
202
202
|
]),
|
|
203
203
|
group("supabase", "Generate the Supabase Custom Access Token Hook, or inspect its manifest", "supabase", [group("hook", "The Custom Access Token Hook", "supabase", [leaf("generate", "Compile the membership sources into the hook migration", {
|
|
@@ -205,26 +205,26 @@ const SECTIONS = [
|
|
|
205
205
|
docs: "supabase",
|
|
206
206
|
effects: ["files", "database:read"],
|
|
207
207
|
config: true,
|
|
208
|
-
load: async () => (await import("./supabase-
|
|
208
|
+
load: async () => (await import("./supabase-CBEK6KEo.js")).hookGenerate
|
|
209
209
|
})]), leaf("inspect", "Print or write the hook and helper manifest", {
|
|
210
210
|
examples: ["permdock supabase inspect", "permdock supabase inspect --out"],
|
|
211
211
|
docs: "supabase",
|
|
212
212
|
effects: ["files"],
|
|
213
213
|
config: true,
|
|
214
|
-
load: async () => (await import("./supabase-
|
|
214
|
+
load: async () => (await import("./supabase-CBEK6KEo.js")).inspect
|
|
215
215
|
})]),
|
|
216
216
|
group("powersync", "Generate PowerSync Sync Streams from the policy, or verify them", "powersync", [leaf("generate", "Compile the read grants into sync-config.yaml", {
|
|
217
217
|
examples: ["permdock powersync generate", "permdock powersync generate --check"],
|
|
218
218
|
docs: "powersync",
|
|
219
219
|
effects: ["files"],
|
|
220
220
|
config: true,
|
|
221
|
-
load: async () => (await import("./powersync-
|
|
221
|
+
load: async () => (await import("./powersync-CBcsEvdr.js")).generate
|
|
222
222
|
}), leaf("verify", "Fail on stale streams or a stream that syncs a denied row", {
|
|
223
223
|
examples: ["permdock powersync verify", "permdock powersync verify --db-url-stdin"],
|
|
224
224
|
docs: "powersync",
|
|
225
225
|
effects: ["database:read"],
|
|
226
226
|
config: true,
|
|
227
|
-
load: async () => (await import("./powersync-
|
|
227
|
+
load: async () => (await import("./powersync-CBcsEvdr.js")).verify
|
|
228
228
|
})]),
|
|
229
229
|
group("scim", "Generate the Postgres tables postgresDirectoryStore keeps a SCIM directory in", "scim", [leaf("generate", "Write the tenant-keyed users, groups and members tables", {
|
|
230
230
|
examples: [
|
|
@@ -247,13 +247,13 @@ const SECTIONS = [
|
|
|
247
247
|
docs: "openapi",
|
|
248
248
|
effects: ["files"],
|
|
249
249
|
config: true,
|
|
250
|
-
load: async () => (await import("./openapi-
|
|
250
|
+
load: async () => (await import("./openapi-gMQQSzNn.js")).emit
|
|
251
251
|
}), leaf("import", "Turn an OpenAPI document into a generated definition", {
|
|
252
252
|
examples: ["permdock openapi import --doc openapi.yaml --out src/permissions.generated.ts"],
|
|
253
253
|
docs: "openapi",
|
|
254
254
|
effects: ["files", "network"],
|
|
255
255
|
config: false,
|
|
256
|
-
load: async () => (await import("./openapi-
|
|
256
|
+
load: async () => (await import("./openapi-gMQQSzNn.js")).importDocument
|
|
257
257
|
})]),
|
|
258
258
|
group("arazzo", "Check Arazzo workflows against the permissions", "arazzo", [leaf("check", "Resolve every Arazzo step to x-permdock-permissions", {
|
|
259
259
|
examples: ["permdock arazzo check --doc arazzo.json --openapi openapi.json"],
|
|
@@ -261,7 +261,7 @@ const SECTIONS = [
|
|
|
261
261
|
effects: [],
|
|
262
262
|
config: true,
|
|
263
263
|
findings: true,
|
|
264
|
-
load: async () => (await import("./arazzo-
|
|
264
|
+
load: async () => (await import("./arazzo-BXaEhGHM.js")).check
|
|
265
265
|
})]),
|
|
266
266
|
leaf("scan", "List authorization checks written without PermDock, to adopt it in an existing app", {
|
|
267
267
|
examples: ["permdock scan", "permdock scan --src app,lib --pattern isBeta"],
|
|
@@ -269,7 +269,7 @@ const SECTIONS = [
|
|
|
269
269
|
effects: [],
|
|
270
270
|
config: true,
|
|
271
271
|
findings: true,
|
|
272
|
-
load: async () => (await import("./scan-
|
|
272
|
+
load: async () => (await import("./scan-CvFWW_fU.js")).scan
|
|
273
273
|
}),
|
|
274
274
|
group("casl", "Import CASL rules into a generated module", "casl", [leaf("import", "Turn CASL rules per role into a permissions and policy module", {
|
|
275
275
|
examples: ["permdock casl import --rules rules.json --out src/permissions.generated.ts"],
|
|
@@ -283,7 +283,7 @@ const SECTIONS = [
|
|
|
283
283
|
docs: "casbin",
|
|
284
284
|
effects: ["files"],
|
|
285
285
|
config: false,
|
|
286
|
-
load: async () => (await import("./casbin-
|
|
286
|
+
load: async () => (await import("./casbin-BuTZnSPv.js")).casbinImport
|
|
287
287
|
})])
|
|
288
288
|
]
|
|
289
289
|
},
|
|
@@ -295,34 +295,34 @@ const SECTIONS = [
|
|
|
295
295
|
docs: "login",
|
|
296
296
|
effects: ["network", "files"],
|
|
297
297
|
config: false,
|
|
298
|
-
load: async () => (await import("./login-
|
|
298
|
+
load: async () => (await import("./login-C5XLYZSF.js")).login
|
|
299
299
|
}),
|
|
300
300
|
leaf("logout", "Revoke and delete the stored PermDock Cloud login", {
|
|
301
301
|
examples: ["permdock logout"],
|
|
302
302
|
docs: "login",
|
|
303
303
|
effects: ["network", "files"],
|
|
304
304
|
config: false,
|
|
305
|
-
load: async () => (await import("./login-
|
|
305
|
+
load: async () => (await import("./login-C5XLYZSF.js")).logout
|
|
306
306
|
}),
|
|
307
307
|
leaf("whoami", "Print the PermDock Cloud identity the CLI acts as", {
|
|
308
308
|
examples: ["permdock whoami", "permdock whoami --json"],
|
|
309
309
|
docs: "login",
|
|
310
310
|
effects: [],
|
|
311
311
|
config: false,
|
|
312
|
-
load: async () => (await import("./login-
|
|
312
|
+
load: async () => (await import("./login-C5XLYZSF.js")).whoami
|
|
313
313
|
}),
|
|
314
314
|
group("cloud", "Publish to or pull from a PermDock Cloud project", "cloud", [leaf("push", "Publish the catalog, policy and manifest to a Cloud project", {
|
|
315
315
|
examples: ["permdock cloud push --dry-run", "permdock cloud push --project prj_123"],
|
|
316
316
|
docs: "cloud",
|
|
317
317
|
effects: ["network", "cloud:write"],
|
|
318
318
|
config: true,
|
|
319
|
-
load: async () => (await import("./cloud-
|
|
319
|
+
load: async () => (await import("./cloud-DiAiYFRo.js")).push
|
|
320
320
|
}), leaf("pull", "Write a Cloud project's published catalog and manifest", {
|
|
321
321
|
examples: ["permdock cloud pull --project prj_123"],
|
|
322
322
|
docs: "cloud",
|
|
323
323
|
effects: ["network", "files"],
|
|
324
324
|
config: true,
|
|
325
|
-
load: async () => (await import("./cloud-
|
|
325
|
+
load: async () => (await import("./cloud-DiAiYFRo.js")).pull
|
|
326
326
|
})])
|
|
327
327
|
]
|
|
328
328
|
},
|
|
@@ -333,7 +333,7 @@ const SECTIONS = [
|
|
|
333
333
|
docs: "codemod",
|
|
334
334
|
effects: ["rewrite"],
|
|
335
335
|
config: false,
|
|
336
|
-
load: async () => (await import("./codemod-
|
|
336
|
+
load: async () => (await import("./codemod-_q_ZI01S.js")).codemod
|
|
337
337
|
})]
|
|
338
338
|
}
|
|
339
339
|
];
|
|
@@ -345,7 +345,7 @@ const COMPLETE_LEAF = leaf("__complete", "Print completion candidates for a part
|
|
|
345
345
|
config: false,
|
|
346
346
|
shellOutput: true,
|
|
347
347
|
hidden: true,
|
|
348
|
-
load: async () => (await import("./completion-
|
|
348
|
+
load: async () => (await import("./completion-DLTuCf53.js")).complete
|
|
349
349
|
});
|
|
350
350
|
const ROOT = group("permdock", "Collect, export, diff and check the permissions a PermDock policy declares", "", [...SECTIONS.flatMap((section) => section.entries), COMPLETE_LEAF]);
|
|
351
351
|
/** Each leaf with its path from the root, in manifest order. */
|
|
@@ -47,6 +47,28 @@ const supabaseManifestSchema = freezeDeep({
|
|
|
47
47
|
type: "string",
|
|
48
48
|
pattern: "^[A-Za-z_][A-Za-z0-9_]*\\.[A-Za-z_][A-Za-z0-9_]*$"
|
|
49
49
|
}
|
|
50
|
+
},
|
|
51
|
+
activeFrom: {
|
|
52
|
+
description: "Where the hook reads the active first-scope id (supabase.hook.activeFrom): an app_metadata key, or a column of a table joined on id. Absent from a manifest written before 0.10.",
|
|
53
|
+
oneOf: [{
|
|
54
|
+
type: "object",
|
|
55
|
+
required: ["appMetadata"],
|
|
56
|
+
additionalProperties: false,
|
|
57
|
+
properties: { appMetadata: { type: "string" } }
|
|
58
|
+
}, {
|
|
59
|
+
type: "object",
|
|
60
|
+
required: [
|
|
61
|
+
"table",
|
|
62
|
+
"column",
|
|
63
|
+
"id"
|
|
64
|
+
],
|
|
65
|
+
additionalProperties: false,
|
|
66
|
+
properties: {
|
|
67
|
+
table: { type: "string" },
|
|
68
|
+
column: { type: "string" },
|
|
69
|
+
id: { type: "string" }
|
|
70
|
+
}
|
|
71
|
+
}]
|
|
50
72
|
}
|
|
51
73
|
}
|
|
52
74
|
},
|
|
@@ -450,7 +472,12 @@ const supabaseManifestSchema = freezeDeep({
|
|
|
450
472
|
pattern: "^[A-Za-z_][A-Za-z0-9_]*\\.[A-Za-z_][A-Za-z0-9_]*$"
|
|
451
473
|
},
|
|
452
474
|
id: { $ref: "#/$defs/identifier" },
|
|
453
|
-
column: { $ref: "#/$defs/identifier" }
|
|
475
|
+
column: { $ref: "#/$defs/identifier" },
|
|
476
|
+
on: {
|
|
477
|
+
description: "Every referencing column to the column of table it matches, when the reference spans several columns.",
|
|
478
|
+
type: "object",
|
|
479
|
+
additionalProperties: { $ref: "#/$defs/identifier" }
|
|
480
|
+
}
|
|
454
481
|
}
|
|
455
482
|
}
|
|
456
483
|
}
|
|
@@ -3,11 +3,11 @@ import { i as dateAt } from "./time-nR1JesoH.js";
|
|
|
3
3
|
import { a as describeError } from "./errors-Vpu6rKHl.js";
|
|
4
4
|
import { o as sqlFiles } from "./files-BSjrtIHw.js";
|
|
5
5
|
import { r as escapeSqlIdent, s as quoteSqlLiteral } from "./sql-0WjxIp9g.js";
|
|
6
|
-
import "./sources-
|
|
6
|
+
import "./sources-C4vkzZJV.js";
|
|
7
7
|
import { a as RETIRE_MARKER } from "./markers-BeHZ4x9Q.js";
|
|
8
8
|
import { i as refuseDirty, t as applyFiles } from "./files-B3AA05f1.js";
|
|
9
9
|
import { f as writeOutputFiles, n as dataMigrationFile } from "./output-files-BIQ_9pIs.js";
|
|
10
|
-
import { r as HELPERS } from "./shared-
|
|
10
|
+
import { r as HELPERS } from "./shared-DrGLwM3s.js";
|
|
11
11
|
import { o as sqlStatements } from "./deciding-columns-NB4wcyBf.js";
|
|
12
12
|
import { i as retireSql, r as retirePlan } from "./retire-B2xffQgY.js";
|
|
13
13
|
import { existsSync, readFileSync } from "node:fs";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { c as listPermissions } from "./permission-registry-B8tYxPIt.js";
|
|
2
2
|
import { i as configError } from "./errors-Vpu6rKHl.js";
|
|
3
3
|
import { a as loadModule, s as pickNamed, t as asPermissionTree } from "./load-DjSU5KXO.js";
|
|
4
|
-
import { i as isModuleKey, n as MODULE_KEYS } from "./config-shape-
|
|
4
|
+
import { i as isModuleKey, n as MODULE_KEYS } from "./config-shape-tsxHx71E.js";
|
|
5
5
|
import { existsSync, readFileSync, statSync } from "node:fs";
|
|
6
6
|
import { dirname, relative, resolve } from "node:path";
|
|
7
7
|
import { parseSync } from "oxc-parser";
|
package/dist/next/index.d.ts
CHANGED
|
@@ -65,13 +65,26 @@ type ServerPermissionState = {
|
|
|
65
65
|
readonly status: "ready";
|
|
66
66
|
readonly decision: Decision;
|
|
67
67
|
};
|
|
68
|
-
type NextPermDockProviderProps = {
|
|
69
|
-
|
|
70
|
-
|
|
68
|
+
type NextPermDockProviderProps = NextPermDockProviderDisplay & ({
|
|
69
|
+
/**
|
|
70
|
+
* The snapshot to hand to the client, usually from the app's `'use
|
|
71
|
+
* cache: private'` loader around `getSnapshot`, so a prefetch carries
|
|
72
|
+
* it. The loader decides what it includes.
|
|
73
|
+
*/
|
|
74
|
+
readonly snapshot: Promise<Snapshot>;
|
|
75
|
+
readonly include?: never;
|
|
76
|
+
readonly tenants?: never;
|
|
77
|
+
} | {
|
|
78
|
+
/** Without `snapshot`, the provider builds one outside any cache. */
|
|
79
|
+
readonly snapshot?: undefined;
|
|
71
80
|
readonly include?: readonly (Permission | {
|
|
72
81
|
readonly [key: string]: unknown;
|
|
73
82
|
})[];
|
|
74
83
|
readonly tenants?: "all";
|
|
84
|
+
});
|
|
85
|
+
type NextPermDockProviderDisplay = {
|
|
86
|
+
readonly children: ReactNode;
|
|
87
|
+
readonly tenant?: string;
|
|
75
88
|
/** Overrides the factory's `endpoint`; `false` is snapshot-only. */
|
|
76
89
|
readonly endpoint?: string | false;
|
|
77
90
|
/**
|
package/dist/next/index.js
CHANGED
|
@@ -251,7 +251,7 @@ function createPermDock(policy, given) {
|
|
|
251
251
|
} });
|
|
252
252
|
};
|
|
253
253
|
const PermDockProvider = (props) => {
|
|
254
|
-
const snapshotPromise = getPermDock(props.tenant === void 0 ? void 0 : { tenant: props.tenant }).then((permdock) => permdock.snapshot(compact({
|
|
254
|
+
const snapshotPromise = props.snapshot ?? getPermDock(props.tenant === void 0 ? void 0 : { tenant: props.tenant }).then((permdock) => permdock.snapshot(compact({
|
|
255
255
|
include: props.include,
|
|
256
256
|
tenants: props.tenants
|
|
257
257
|
})));
|
package/dist/next/plugin.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { s as PermDockPluginOptions } from "../types-
|
|
1
|
+
import { s as PermDockPluginOptions } from "../types-Cklw5hJo.js";
|
|
2
2
|
//#region src/cli/plugin.d.ts
|
|
3
3
|
/** Any object: Next's `NextConfig` is an interface, so no index signature. */
|
|
4
4
|
type NextConfigLike = object;
|
package/dist/next/plugin.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as describeError } from "../errors-Vpu6rKHl.js";
|
|
2
|
-
import { n as createCollectScheduler, r as report, t as collectOnce } from "../watch-
|
|
2
|
+
import { n as createCollectScheduler, r as report, t as collectOnce } from "../watch-Bpci3hBY.js";
|
|
3
3
|
//#region src/cli/plugin.ts
|
|
4
4
|
const PHASE_BUILD = "phase-production-build";
|
|
5
5
|
const PHASE_DEV = "phase-development-server";
|
|
@@ -7,7 +7,7 @@ import { a as loadModule, n as asPolicy, s as pickNamed, t as asPermissionTree }
|
|
|
7
7
|
import { t as shortDiff } from "./text-diff-BtfSmdUo.js";
|
|
8
8
|
import { c as openapiVersion, o as createPermDock } from "./openapi-BOsx0xn9.js";
|
|
9
9
|
import { i as fileDrift } from "./output-files-BIQ_9pIs.js";
|
|
10
|
-
import { n as validateOverlay, t as validateOpenapi } from "./schema-
|
|
10
|
+
import { n as validateOverlay, t as validateOpenapi } from "./schema-CQzIJdEd.js";
|
|
11
11
|
import { existsSync } from "node:fs";
|
|
12
12
|
import { resolve } from "node:path";
|
|
13
13
|
//#region src/cli/openapi/openapi.ts
|
|
@@ -80,7 +80,7 @@ const emit = defineLeaf({
|
|
|
80
80
|
}
|
|
81
81
|
},
|
|
82
82
|
async run(ctx, { flags }) {
|
|
83
|
-
return (await import("./openapi-
|
|
83
|
+
return (await import("./openapi-CuePQL4z.js")).runOpenapi({
|
|
84
84
|
cwd: ctx.cwd,
|
|
85
85
|
config: ctx.config,
|
|
86
86
|
rest: ["emit"],
|
|
@@ -122,7 +122,7 @@ const importDocument = defineLeaf({
|
|
|
122
122
|
async run(ctx, { flags }) {
|
|
123
123
|
const doc = given(flags.doc);
|
|
124
124
|
if (doc === void 0) throw missingInput("openapi import", ["--doc"], "the OpenAPI document to import");
|
|
125
|
-
return (await import("./import-
|
|
125
|
+
return (await import("./import-t1yqnCyG.js")).runOpenapiImport({
|
|
126
126
|
cwd: ctx.cwd,
|
|
127
127
|
doc,
|
|
128
128
|
out: fileOut("openapi import", flags.out),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { s as cliVersion } from "./version-DMQ0dnN5.js";
|
|
2
|
-
import { t as DOCS_BASE } from "./manifest-
|
|
2
|
+
import { t as DOCS_BASE } from "./manifest-Cav1rjNQ.js";
|
|
3
3
|
//#region src/cli/core/output.ts
|
|
4
4
|
const CLI_RESULT_SCHEMA = "https://permdock.com/schemas/cli-result-v1.json";
|
|
5
5
|
function envelope(input) {
|
|
@@ -9,9 +9,9 @@ import { r as relationCondition, t as inheritCondition } from "./grantee-conditi
|
|
|
9
9
|
import { i as configError } from "./errors-Vpu6rKHl.js";
|
|
10
10
|
import { i as qualifySqlTable } from "./sql-0WjxIp9g.js";
|
|
11
11
|
import { a as scopeMembershipTable, i as scopeColumn, s as relatedSql } from "./compile-EzEMB-7v.js";
|
|
12
|
-
import { l as roleColumn } from "./sources-
|
|
13
|
-
import { A as quoteQualified, D as qualified, E as helperSchema, L as sqlType, M as textArrayLiteral, O as quoteIdent, R as tenantTypeOf, S as CLAIM, T as declaredArray, _ as subjectClaimJsonSql, b as tenantClaimSql, d as keyTenantSql, f as kindFilterSql, h as roleKindSql, j as quoteTable, k as quoteLiteral, m as memberVia, p as liveSessionSql, s as signedIn, t as CUSTOM_ROLES, u as globalKindFilterSql, v as subjectClaimSql, y as subjectIdSql } from "./shared-
|
|
14
|
-
import { $ as graphSqlText, A as claimKeptLines, B as hasCustomRoleChecksFor, F as globalRoleRows, I as membershipRows, L as roleRows, M as memberColumn, N as sourceFilters, P as sourcesKeep, U as storedTenant, X as CLOSURE, Z as graphHelper, _t as activeMembershipSql, c as holderSources, ct as memberIdsHelper, d as sourceRowsSql, f as sourceTransferTriggerSql, g as OWNERSHIP, gt as activeInstancesSql, h as ASSIGNMENTS, ht as scopeTable, it as linkHelper, j as disabledColumn, l as pairsSql, m as transferTriggerSql, mt as scopeSources, nt as inheritedRowsHelper, p as holdersTriggerSql, pt as restrictedHelper, st as memberForTable, u as sourceHoldersTriggerSql, ut as memberRoleOf, yt as activeUserSql } from "./tables-
|
|
12
|
+
import { l as roleColumn } from "./sources-C4vkzZJV.js";
|
|
13
|
+
import { A as quoteQualified, D as qualified, E as helperSchema, L as sqlType, M as textArrayLiteral, O as quoteIdent, R as tenantTypeOf, S as CLAIM, T as declaredArray, _ as subjectClaimJsonSql, b as tenantClaimSql, d as keyTenantSql, f as kindFilterSql, h as roleKindSql, j as quoteTable, k as quoteLiteral, m as memberVia, p as liveSessionSql, s as signedIn, t as CUSTOM_ROLES, u as globalKindFilterSql, v as subjectClaimSql, y as subjectIdSql } from "./shared-DrGLwM3s.js";
|
|
14
|
+
import { $ as graphSqlText, A as claimKeptLines, B as hasCustomRoleChecksFor, F as globalRoleRows, I as membershipRows, L as roleRows, M as memberColumn, N as sourceFilters, P as sourcesKeep, U as storedTenant, X as CLOSURE, Z as graphHelper, _t as activeMembershipSql, c as holderSources, ct as memberIdsHelper, d as sourceRowsSql, f as sourceTransferTriggerSql, g as OWNERSHIP, gt as activeInstancesSql, h as ASSIGNMENTS, ht as scopeTable, it as linkHelper, j as disabledColumn, l as pairsSql, m as transferTriggerSql, mt as scopeSources, nt as inheritedRowsHelper, p as holdersTriggerSql, pt as restrictedHelper, st as memberForTable, u as sourceHoldersTriggerSql, ut as memberRoleOf, yt as activeUserSql } from "./tables-DimBcVWY.js";
|
|
15
15
|
//#region src/cli/sql/conditions.ts
|
|
16
16
|
const MAX_CLAIM_DEPTH = 8;
|
|
17
17
|
/**
|
|
@@ -5,7 +5,7 @@ import { t as anonymousSubject } from "./subject-BGoM5o8B.js";
|
|
|
5
5
|
import { t as readClaim } from "./claims-map-CKkoAAYF.js";
|
|
6
6
|
import { t as clientNameOf } from "./clients-DYr3U86j.js";
|
|
7
7
|
import "./budget-BELja5A9.js";
|
|
8
|
-
import { a as hookApiNames } from "./sources-
|
|
8
|
+
import { a as hookApiNames } from "./sources-C4vkzZJV.js";
|
|
9
9
|
//#region src/supabase/subject.ts
|
|
10
10
|
const REGISTERED = /* @__PURE__ */ new Set([
|
|
11
11
|
"sub",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { n as runPowerSync } from "./powersync-CD8-Ypao.js";
|
|
@@ -14,7 +14,7 @@ const generate = defineLeaf({
|
|
|
14
14
|
async run(ctx, { flags }) {
|
|
15
15
|
const out = fileOut("powersync", flags.out);
|
|
16
16
|
const from = given(flags.policy);
|
|
17
|
-
const { runPowerSync } = await import("./powersync-
|
|
17
|
+
const { runPowerSync } = await import("./powersync-6vgKevSi.js");
|
|
18
18
|
return runPowerSync({
|
|
19
19
|
cwd: ctx.cwd,
|
|
20
20
|
config: ctx.config,
|
|
@@ -45,7 +45,7 @@ const verify = defineLeaf({
|
|
|
45
45
|
const db = await dbUrl(ctx, flags, { required: true });
|
|
46
46
|
const fixtures = given(flags.fixtures);
|
|
47
47
|
const from = given(flags.policy);
|
|
48
|
-
const { runPowerSync } = await import("./powersync-
|
|
48
|
+
const { runPowerSync } = await import("./powersync-6vgKevSi.js");
|
|
49
49
|
return runPowerSync({
|
|
50
50
|
cwd: ctx.cwd,
|
|
51
51
|
config: ctx.config,
|