better-supabase 0.49.0 → 0.50.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 (67) hide show
  1. package/dist/{app-tables-D6Na4nwb.d.ts → app-tables-ByFny1cL.d.ts} +1 -1
  2. package/dist/{block-tables-Pd7nOPv3.d.ts → block-tables-CQHwZ9-v.d.ts} +1 -1
  3. package/dist/cli/{add-BXfK7N0H.js → add-BhQZHdAv.js} +2 -2
  4. package/dist/cli/add-C8CZuuRW.js +1 -0
  5. package/dist/cli/{add-Ca3FNbhm.js → add-yTy1CuMe.js} +10 -10
  6. package/dist/cli/{app-table-files-BR0zwJ7T.js → app-table-files-CSZU_cFC.js} +2 -2
  7. package/dist/cli/{app-tables-DAHcDTFh.js → app-tables-CmY2GVb3.js} +2 -2
  8. package/dist/cli/{backfill-DHD9e6XO.js → backfill-BUNIA-Vt.js} +1 -1
  9. package/dist/cli/bin.js +1 -1
  10. package/dist/cli/{blocks-C4J4d_Jx.js → blocks-BO-v5N1q.js} +1 -1
  11. package/dist/cli/{blocks-DtEsw6CG.js → blocks-CLaPv7TM.js} +1 -1
  12. package/dist/cli/{cache-DyhfGbUV.js → cache-VZU4FIOF.js} +1 -1
  13. package/dist/cli/{codemod-B7EdR7Fu.js → codemod-DgbHI_T7.js} +1 -1
  14. package/dist/cli/{content-mapper-BM9asZuL.js → content-mapper-5_KpJMOD.js} +2 -2
  15. package/dist/cli/{doctor-BuE0Ry7T.js → doctor-BsB5Sg9v.js} +142 -16
  16. package/dist/cli/{gen-DMAd__D1.js → gen-Dbtv-GLi.js} +11 -11
  17. package/dist/cli/index.d.ts +1 -1
  18. package/dist/cli/index.js +6 -6
  19. package/dist/cli/{init-BfpkhVgY.js → init-DbxcqUL_.js} +8 -8
  20. package/dist/cli/{live-XBM0kzT3.js → live-B86Xvfaj.js} +2 -2
  21. package/dist/cli/{mcp-C9HqqPIV.js → mcp-BjvRPCNn.js} +2 -2
  22. package/dist/cli/{metadata-dYoVRApT.js → metadata-BCKNATUX.js} +3 -3
  23. package/dist/cli/{migrate-DLWnaHNN.js → migrate-Ds8H9Vq6.js} +1 -1
  24. package/dist/cli/{migration-safety-Bh7VzARh.js → migration-safety-CVtbyZQ4.js} +1 -1
  25. package/dist/cli/{migrations-Cq5hkJsa.js → migrations-Dob5hF6K.js} +2 -2
  26. package/dist/cli/{module-migration-BUd_MAbE.js → module-migration-BSOn1xPx.js} +2 -2
  27. package/dist/cli/powersync-6wkF5mUR.js +1 -0
  28. package/dist/cli/{powersync-Cb8xtLDc.js → powersync-aGKsgFN9.js} +3 -3
  29. package/dist/cli/{print-BVeE5vr_.js → print-scQOZbuq.js} +2 -2
  30. package/dist/cli/{providers-xmyaROnG.js → providers-Dr7FyvN1.js} +1 -1
  31. package/dist/cli/{prune-workflows-DUOBOuHp.js → prune-workflows-DguQsnDA.js} +1 -1
  32. package/dist/cli/{remove-BuasHmdF.js → remove-BK_muhLi.js} +6 -6
  33. package/dist/cli/{render-Hvu_ZKtr.js → render-D8KGIoSK.js} +3 -3
  34. package/dist/cli/{run-KdsUN7Qj.js → run-BIAan13C.js} +9 -9
  35. package/dist/cli/{run-DMZQUy5b.js → run-aWo2fn_x.js} +29 -29
  36. package/dist/cli/{shared-3cetvs_N.js → shared-d7o6xxEZ.js} +1 -1
  37. package/dist/cli/{snapshot-D7h2oWfS.js → snapshot-BmBrjk2b.js} +2 -2
  38. package/dist/cli/{source-ENOc1zZ9.js → source-CEPki4I3.js} +1 -1
  39. package/dist/cli/{spec-CfKQ2Xxd.js → spec-36lt_pPC.js} +1 -1
  40. package/dist/cli/{spec-DGaKqtfR.js → spec-BKCoD-Ct.js} +2 -2
  41. package/dist/cli/{sql-layout-CGlyhvQ1.js → sql-layout-BevHhOrq.js} +2 -2
  42. package/dist/cli/{sync-DFJfT7dH.js → sync-x1M-Ywqf.js} +4 -4
  43. package/dist/cli/{upgrade-C2Kdvrj-.js → upgrade-BUDxM1EG.js} +5 -5
  44. package/dist/cli/{upgrade-DSi7r0MG.js → upgrade-Dqze3aEB.js} +2 -2
  45. package/dist/cli/{version-AGe2VWGm.js → version-CvNMxnwv.js} +1 -1
  46. package/dist/config/index.d.ts +1 -1
  47. package/dist/{context-DNwBlpKo.d.ts → context-BlLvUNCj.d.ts} +22 -1
  48. package/dist/contract/index.d.ts +1 -1
  49. package/dist/create/index.d.ts +3 -3
  50. package/dist/create/index.js +1 -1
  51. package/dist/create/lite/index.d.ts +2 -2
  52. package/dist/create/lite/index.js +1 -1
  53. package/dist/{index-EHczIYa7.d.ts → index-CdtD8fqI.d.ts} +29 -2
  54. package/dist/{index-D6y6ojUX.d.ts → index-DxmiTJJ5.d.ts} +1 -1
  55. package/dist/mapper/bin.js +5 -5
  56. package/dist/otel/index.js +4 -4
  57. package/dist/preset/index.d.ts +3 -3
  58. package/dist/{project-CwZtBezd.js → project-C71Z2pg2.js} +1 -1
  59. package/dist/sql/index.d.ts +5 -5
  60. package/dist/sql/index.js +2 -2
  61. package/dist/{sql-BPU70zf9.js → sql-DPDvUadH.js} +363 -66
  62. package/dist/testing/index.d.ts +1 -1
  63. package/dist/{types-D9r3axee.d.ts → types-Dp1r6bih.d.ts} +1 -1
  64. package/package.json +1 -1
  65. package/schemas/doctor-report-v1.json +1 -0
  66. package/dist/cli/add-4-omCrbh.js +0 -1
  67. package/dist/cli/powersync-ZBM_emZL.js +0 -1
@@ -1,11 +1,11 @@
1
1
  import { n as CliError, r as errorText } from "./errors-DcJ_PayO.js";
2
2
  import { n as importPath } from "./io-CQzy8PEZ.js";
3
- import { i as cachedTypesModule, n as cachedDatabaseTypes, s as typesModuleKey } from "./cache-DyhfGbUV.js";
3
+ import { i as cachedTypesModule, n as cachedDatabaseTypes, s as typesModuleKey } from "./cache-VZU4FIOF.js";
4
4
  import { t as byCodePoint } from "./compare-yl4sSwVn.js";
5
- import { f as generateDatabaseTypes, h as restrictSchemas, p as oxfmtInstalled, v as tsTypeOf } from "./snapshot-D7h2oWfS.js";
5
+ import { f as generateDatabaseTypes, h as restrictSchemas, p as oxfmtInstalled, v as tsTypeOf } from "./snapshot-BmBrjk2b.js";
6
6
  import { s as providerTruncatedClaim } from "./authorization-DJkkOjjG.js";
7
7
  import { t as isRecord$1 } from "./guards-DxwRG0Uv.js";
8
- import { a as toCatalog } from "./source-ENOc1zZ9.js";
8
+ import { a as toCatalog } from "./source-CEPki4I3.js";
9
9
  import { m as withTableTags } from "./config-C-DXllAX.js";
10
10
  import { basename, dirname, isAbsolute, join, posix, relative, resolve } from "node:path";
11
11
  import { entityNames } from "better-supabase/blocks";
@@ -1,17 +1,17 @@
1
1
  import { r as errorText } from "./errors-DcJ_PayO.js";
2
2
  import { a as sameText, t as display } from "./io-CQzy8PEZ.js";
3
- import { c as writeAtomic, o as storeTypesModule, s as typesModuleKey, t as CACHE_DIR } from "./cache-DyhfGbUV.js";
3
+ import { c as writeAtomic, o as storeTypesModule, s as typesModuleKey, t as CACHE_DIR } from "./cache-VZU4FIOF.js";
4
4
  import { t as byCodePoint } from "./compare-yl4sSwVn.js";
5
- import { _ as stabilizeMetadata, b as typegenVersionNotice, p as oxfmtInstalled, t as loadSnapshot, y as typegenVersion } from "./snapshot-D7h2oWfS.js";
6
- import { n as render } from "./render-Hvu_ZKtr.js";
5
+ import { _ as stabilizeMetadata, b as typegenVersionNotice, p as oxfmtInstalled, t as loadSnapshot, y as typegenVersion } from "./snapshot-BmBrjk2b.js";
6
+ import { n as render } from "./render-D8KGIoSK.js";
7
7
  import { a as moduleKeyProblems, c as unsafeKey, i as entitlementsMode, n as accessRequirements, o as providerLabel, r as entitlementRequirements } from "./authorization-DJkkOjjG.js";
8
- import { s as schemaStampPath } from "./content-mapper-BM9asZuL.js";
8
+ import { s as schemaStampPath } from "./content-mapper-5_KpJMOD.js";
9
9
  import { a as changedFiles, d as fileDiff, i as changeLines, r as applyPlan, s as hasConflicts } from "./files-DQayErI8.js";
10
- import { n as migrationsDir } from "./sql-layout-CGlyhvQ1.js";
11
- import { l as tableObject, n as exposed, o as policyObject, s as qualified, t as catalogOf } from "./shared-3cetvs_N.js";
12
- import { n as adoptionContext, r as appTablesOf, t as accessModule } from "./app-tables-DAHcDTFh.js";
13
- import { a as compiledReadSets } from "./providers-xmyaROnG.js";
14
- import { c as sameModuleMigration, l as writeLatestMigration, n as READ_SETS_SUFFIX, r as latestMigration, u as writesMigrations } from "./module-migration-BUd_MAbE.js";
10
+ import { n as migrationsDir } from "./sql-layout-BevHhOrq.js";
11
+ import { l as tableObject, n as exposed, o as policyObject, s as qualified, t as catalogOf } from "./shared-d7o6xxEZ.js";
12
+ import { n as adoptionContext, r as appTablesOf, t as accessModule } from "./app-tables-CmY2GVb3.js";
13
+ import { a as compiledReadSets } from "./providers-Dr7FyvN1.js";
14
+ import { c as sameModuleMigration, l as writeLatestMigration, n as READ_SETS_SUFFIX, r as latestMigration, u as writesMigrations } from "./module-migration-BSOn1xPx.js";
15
15
  import { existsSync } from "node:fs";
16
16
  import { dirname, isAbsolute, relative, resolve, sep } from "node:path";
17
17
  import { readFile } from "node:fs/promises";
@@ -1,6 +1,6 @@
1
1
  import { c as runsWithInvalidConfig, d as DOCS_ORIGIN, f as GROUPS, g as runCommand, h as parseArgs$2, i as joinRepeated, l as COMMANDS, o as listArgs, p as RESERVED_NAMES, s as readsLegacyTables, t as GLOBAL_ARGS } from "./command-bvbsvYpo.js";
2
2
  import { n as highlight, r as painter } from "./style-B5-nByxb.js";
3
- import { t as VERSION } from "./version-AGe2VWGm.js";
3
+ import { t as VERSION } from "./version-CvNMxnwv.js";
4
4
  import { n as CliError, o as toCliError } from "./errors-DcJ_PayO.js";
5
5
  import { a as missingInputNext, o as resolveAgent, t as checkConsent } from "./agent-Tqq3MAqx.js";
6
6
  import { a as globalFlags, c as resolveCommand, i as commandTree, n as closestName, o as isVariadic, r as commandArgs, t as checkArgs } from "./parse-ThNFQ1hP.js";
@@ -19,46 +19,46 @@ const LOADERS = [
19
19
  ["login", () => import("./account-BGMPSKJs.js").then((m) => m.loginCommand)],
20
20
  ["logout", () => import("./account-BGMPSKJs.js").then((m) => m.logoutCommand)],
21
21
  ["whoami", () => import("./account-BGMPSKJs.js").then((m) => m.whoamiCommand)],
22
- ["init", () => import("./init-BfpkhVgY.js").then((m) => m.initCommand)],
23
- ["add", () => import("./add-4-omCrbh.js").then((m) => m.addCommand)],
24
- ["remove", () => import("./remove-BuasHmdF.js").then((m) => m.removeCommand)],
25
- ["upgrade", () => import("./upgrade-DSi7r0MG.js").then((m) => m.upgradeCommand)],
22
+ ["init", () => import("./init-DbxcqUL_.js").then((m) => m.initCommand)],
23
+ ["add", () => import("./add-C8CZuuRW.js").then((m) => m.addCommand)],
24
+ ["remove", () => import("./remove-BK_muhLi.js").then((m) => m.removeCommand)],
25
+ ["upgrade", () => import("./upgrade-Dqze3aEB.js").then((m) => m.upgradeCommand)],
26
26
  ["table", () => import("./table-DJiZ_PJP.js").then((m) => m.tableCommand)],
27
- ["migrate schema-first", () => import("./migrate-DLWnaHNN.js").then((m) => m.migrateSchemaFirstCommand)],
28
- ["gen", () => import("./gen-DMAd__D1.js").then((m) => m.genCommand)],
29
- ["doctor", () => import("./doctor-BuE0Ry7T.js").then((m) => m.doctorCommand)],
27
+ ["migrate schema-first", () => import("./migrate-Ds8H9Vq6.js").then((m) => m.migrateSchemaFirstCommand)],
28
+ ["gen", () => import("./gen-Dbtv-GLi.js").then((m) => m.genCommand)],
29
+ ["doctor", () => import("./doctor-BsB5Sg9v.js").then((m) => m.doctorCommand)],
30
30
  ["db query", () => import("./db-CVoN3aLl.js").then((m) => m.dbQueryCommand)],
31
31
  ["db diff", () => import("./db-CVoN3aLl.js").then((m) => m.dbDiffCommand)],
32
32
  ["db seed", () => import("./seed-Ki7TgmY1.js").then((m) => m.seedCommand)],
33
- ["db backfill", () => import("./backfill-DHD9e6XO.js").then((m) => m.dbBackfillCommand)],
34
- ["db prune-workflows", () => import("./prune-workflows-DUOBOuHp.js").then((m) => m.dbPruneWorkflowsCommand)],
33
+ ["db backfill", () => import("./backfill-BUNIA-Vt.js").then((m) => m.dbBackfillCommand)],
34
+ ["db prune-workflows", () => import("./prune-workflows-DguQsnDA.js").then((m) => m.dbPruneWorkflowsCommand)],
35
35
  ["dev env", () => import("./env-C9HRYvnX.js").then((m) => m.envCommand)],
36
36
  ["dev run", () => import("./run-1ZTOS-gb.js").then((m) => m.runCommand)],
37
37
  ["dev keys", () => import("./keys-CRf_wOFs.js").then((m) => m.keysCommand)],
38
38
  ["dev stack ls", () => import("./stack-Dr_oEfmw.js").then((m) => m.stackLsCommand)],
39
39
  ["dev stack prune", () => import("./stack-Dr_oEfmw.js").then((m) => m.stackPruneCommand)],
40
40
  ["automations list", () => import("./automations-DKKuC8MW.js").then((m) => m.automationsListCommand)],
41
- ["blocks list", () => import("./blocks-DtEsw6CG.js").then((m) => m.blocksListCommand)],
42
- ["blocks view", () => import("./blocks-DtEsw6CG.js").then((m) => m.blocksViewCommand)],
43
- ["blocks search", () => import("./blocks-DtEsw6CG.js").then((m) => m.blocksSearchCommand)],
44
- ["powersync streams", () => import("./powersync-ZBM_emZL.js").then((m) => m.powersyncStreamsCommand)],
45
- ["spec emit", () => import("./spec-CfKQ2Xxd.js").then((m) => m.specEmitCommand)],
46
- ["spec validate", () => import("./spec-CfKQ2Xxd.js").then((m) => m.specValidateCommand)],
47
- ["mcp", () => import("./mcp-C9HqqPIV.js").then((m) => m.mcpCommand)],
41
+ ["blocks list", () => import("./blocks-CLaPv7TM.js").then((m) => m.blocksListCommand)],
42
+ ["blocks view", () => import("./blocks-CLaPv7TM.js").then((m) => m.blocksViewCommand)],
43
+ ["blocks search", () => import("./blocks-CLaPv7TM.js").then((m) => m.blocksSearchCommand)],
44
+ ["powersync streams", () => import("./powersync-6wkF5mUR.js").then((m) => m.powersyncStreamsCommand)],
45
+ ["spec emit", () => import("./spec-36lt_pPC.js").then((m) => m.specEmitCommand)],
46
+ ["spec validate", () => import("./spec-36lt_pPC.js").then((m) => m.specValidateCommand)],
47
+ ["mcp", () => import("./mcp-BjvRPCNn.js").then((m) => m.mcpCommand)],
48
48
  ["skills list", () => import("./skills-wZ94Fa8G.js").then((m) => m.skillsListCommand)],
49
49
  ["skills install", () => import("./skills-wZ94Fa8G.js").then((m) => m.skillsInstallCommand)],
50
- ["codemod 0.4", () => import("./codemod-B7EdR7Fu.js").then((m) => m.codemodCommand("0.4"))],
51
- ["codemod 0.5", () => import("./codemod-B7EdR7Fu.js").then((m) => m.codemodCommand("0.5"))],
52
- ["codemod 0.6", () => import("./codemod-B7EdR7Fu.js").then((m) => m.codemodCommand("0.6"))],
53
- ["codemod 0.9", () => import("./codemod-B7EdR7Fu.js").then((m) => m.codemodCommand("0.9"))],
54
- ["codemod 0.11", () => import("./codemod-B7EdR7Fu.js").then((m) => m.codemodCommand("0.11"))],
55
- ["codemod 0.15", () => import("./codemod-B7EdR7Fu.js").then((m) => m.codemodCommand("0.15"))],
56
- ["codemod 0.29", () => import("./codemod-B7EdR7Fu.js").then((m) => m.codemodCommand("0.29"))],
57
- ["codemod 0.32", () => import("./codemod-B7EdR7Fu.js").then((m) => m.codemodCommand("0.32"))],
58
- ["codemod 0.35", () => import("./codemod-B7EdR7Fu.js").then((m) => m.codemodCommand("0.35"))],
59
- ["codemod 0.37", () => import("./codemod-B7EdR7Fu.js").then((m) => m.codemodCommand("0.37"))],
60
- ["codemod 0.46", () => import("./codemod-B7EdR7Fu.js").then((m) => m.codemodCommand("0.46"))],
61
- ["codemod 0.47", () => import("./codemod-B7EdR7Fu.js").then((m) => m.codemodCommand("0.47"))],
50
+ ["codemod 0.4", () => import("./codemod-DgbHI_T7.js").then((m) => m.codemodCommand("0.4"))],
51
+ ["codemod 0.5", () => import("./codemod-DgbHI_T7.js").then((m) => m.codemodCommand("0.5"))],
52
+ ["codemod 0.6", () => import("./codemod-DgbHI_T7.js").then((m) => m.codemodCommand("0.6"))],
53
+ ["codemod 0.9", () => import("./codemod-DgbHI_T7.js").then((m) => m.codemodCommand("0.9"))],
54
+ ["codemod 0.11", () => import("./codemod-DgbHI_T7.js").then((m) => m.codemodCommand("0.11"))],
55
+ ["codemod 0.15", () => import("./codemod-DgbHI_T7.js").then((m) => m.codemodCommand("0.15"))],
56
+ ["codemod 0.29", () => import("./codemod-DgbHI_T7.js").then((m) => m.codemodCommand("0.29"))],
57
+ ["codemod 0.32", () => import("./codemod-DgbHI_T7.js").then((m) => m.codemodCommand("0.32"))],
58
+ ["codemod 0.35", () => import("./codemod-DgbHI_T7.js").then((m) => m.codemodCommand("0.35"))],
59
+ ["codemod 0.37", () => import("./codemod-DgbHI_T7.js").then((m) => m.codemodCommand("0.37"))],
60
+ ["codemod 0.46", () => import("./codemod-DgbHI_T7.js").then((m) => m.codemodCommand("0.46"))],
61
+ ["codemod 0.47", () => import("./codemod-DgbHI_T7.js").then((m) => m.codemodCommand("0.47"))],
62
62
  ["completion", () => import("./completion-C8zJwfzA.js").then((m) => m.completionCommand)],
63
63
  ["config", () => import("./config-CWQesy6K.js").then((m) => m.configCommand)]
64
64
  ];
@@ -1,4 +1,4 @@
1
- import { a as toCatalog } from "./source-ENOc1zZ9.js";
1
+ import { a as toCatalog } from "./source-CEPki4I3.js";
2
2
  import { h as tomlGet, p as sqlWorkflow, r as detectWorkflow } from "./supabase-toml-B6-eEV5p.js";
3
3
  // src/cli/doctor/shared.ts
4
4
  const catalogs = /* @__PURE__ */ new WeakMap();
@@ -1,7 +1,7 @@
1
1
  import { n as CliError, r as errorText } from "./errors-DcJ_PayO.js";
2
- import { d as readExtras, l as TYPEGEN_VERSION, r as cachedIntrospect } from "./cache-DyhfGbUV.js";
2
+ import { d as readExtras, l as TYPEGEN_VERSION, r as cachedIntrospect } from "./cache-VZU4FIOF.js";
3
3
  import { t as byCodePoint } from "./compare-yl4sSwVn.js";
4
- import { n as managementSource, r as pgSource } from "./source-ENOc1zZ9.js";
4
+ import { n as managementSource, r as pgSource } from "./source-CEPki4I3.js";
5
5
  import { n as databaseUrl, u as accessToken } from "./config-C-DXllAX.js";
6
6
  import { d as readSupabaseToml, f as schemaPaths, h as tomlGet, u as pgFunctionHooks } from "./supabase-toml-B6-eEV5p.js";
7
7
  import { t as connect } from "./db-B8zfxjl2.js";
@@ -1,4 +1,4 @@
1
- import { t as VERSION } from "./version-AGe2VWGm.js";
1
+ import { t as VERSION } from "./version-CvNMxnwv.js";
2
2
  import { n as CliError } from "./errors-DcJ_PayO.js";
3
3
  import { r as redactUrl } from "./redact--zOGdWzo.js";
4
4
  import { n as HTTP_CHANNEL } from "./trace-D3TNqWBg.js";
@@ -1 +1 @@
1
- export { n as specEmitCommand, i as specValidateCommand } from "./spec-DGaKqtfR.js";
1
+ export { n as specEmitCommand, i as specValidateCommand } from "./spec-BKCoD-Ct.js";
@@ -1,9 +1,9 @@
1
1
  import { n as __require, t as __commonJSMin } from "./rolldown-runtime-DegdyBIC.js";
2
2
  import { m as commandMeta, r as defineCliCommand } from "./command-bvbsvYpo.js";
3
- import { t as VERSION } from "./version-AGe2VWGm.js";
3
+ import { t as VERSION } from "./version-CvNMxnwv.js";
4
4
  import { i as failedResult, n as CliError, r as errorText } from "./errors-DcJ_PayO.js";
5
5
  import { t as display } from "./io-CQzy8PEZ.js";
6
- import { c as writeAtomic, t as CACHE_DIR } from "./cache-DyhfGbUV.js";
6
+ import { c as writeAtomic, t as CACHE_DIR } from "./cache-VZU4FIOF.js";
7
7
  import { t as isRecord } from "./guards-DxwRG0Uv.js";
8
8
  import { t as importFresh } from "./fresh-import-CdO2oQaQ.js";
9
9
  import { a as changedFiles, i as changeLines, r as applyPlan } from "./files-DQayErI8.js";
@@ -1,5 +1,5 @@
1
- import { d as TypegenMissingError, i as parseSnapshot } from "./snapshot-D7h2oWfS.js";
2
- import { a as toCatalog } from "./source-ENOc1zZ9.js";
1
+ import { d as TypegenMissingError, i as parseSnapshot } from "./snapshot-BmBrjk2b.js";
2
+ import { a as toCatalog } from "./source-CEPki4I3.js";
3
3
  import { d as readSupabaseToml, f as schemaPaths, n as declarativeSchemasDir, p as sqlWorkflow } from "./supabase-toml-B6-eEV5p.js";
4
4
  import { existsSync } from "node:fs";
5
5
  import { dirname, join, relative, resolve, sep } from "node:path";
@@ -2,10 +2,10 @@ import { n as CliError } from "./errors-DcJ_PayO.js";
2
2
  import { t as display } from "./io-CQzy8PEZ.js";
3
3
  import { d as readSupabaseToml, f as schemaPaths, h as tomlGet, i as diffEngine, l as migrationCommand, o as findSupabaseRoot, p as sqlWorkflow, t as PGDELTA_TABLE } from "./supabase-toml-B6-eEV5p.js";
4
4
  import { d as fileDiff, i as changeLines, l as keepHandEdit, o as handEditedError, r as applyPlan, t as HAND_EDITED, u as planResult } from "./files-DQayErI8.js";
5
- import { n as migrationsDir, o as sqlPlan } from "./sql-layout-CGlyhvQ1.js";
6
- import { r as layoutFor } from "./providers-xmyaROnG.js";
7
- import { a as writeExtensionsMigration, t as DATA_NEXT } from "./migrations-Cq5hkJsa.js";
8
- import { c as sameModuleMigration, l as writeLatestMigration, r as latestMigration, s as renderModuleMigration, t as MODULES_SUFFIX, u as writesMigrations } from "./module-migration-BUd_MAbE.js";
5
+ import { n as migrationsDir, o as sqlPlan } from "./sql-layout-BevHhOrq.js";
6
+ import { r as layoutFor } from "./providers-Dr7FyvN1.js";
7
+ import { a as writeExtensionsMigration, t as DATA_NEXT } from "./migrations-Dob5hF6K.js";
8
+ import { c as sameModuleMigration, l as writeLatestMigration, r as latestMigration, s as renderModuleMigration, t as MODULES_SUFFIX, u as writesMigrations } from "./module-migration-BSOn1xPx.js";
9
9
  import { t as loadTopics } from "./topics-Cdg0V7Tt.js";
10
10
  import { t as orphanedBlockFiles } from "./orphans-CPcR85QN.js";
11
11
  import { dirname, join, resolve } from "node:path";
@@ -1,10 +1,10 @@
1
1
  import { t as display } from "./io-CQzy8PEZ.js";
2
2
  import { d as fileDiff, i as changeLines, r as applyPlan } from "./files-DQayErI8.js";
3
- import { n as migrationsDir, o as sqlPlan } from "./sql-layout-CGlyhvQ1.js";
4
- import { r as layoutFor } from "./providers-xmyaROnG.js";
5
- import { r as migrationStamp } from "./migrations-Cq5hkJsa.js";
6
- import { a as migrationInstances, c as sameModuleMigration, o as migrationModules, r as latestMigration, s as renderModuleMigration, t as MODULES_SUFFIX, u as writesMigrations } from "./module-migration-BUd_MAbE.js";
7
- import { a as write, o as topicPolicyFile, r as nextStep } from "./sync-DFJfT7dH.js";
3
+ import { n as migrationsDir, o as sqlPlan } from "./sql-layout-BevHhOrq.js";
4
+ import { r as layoutFor } from "./providers-Dr7FyvN1.js";
5
+ import { r as migrationStamp } from "./migrations-Dob5hF6K.js";
6
+ import { a as migrationInstances, c as sameModuleMigration, o as migrationModules, r as latestMigration, s as renderModuleMigration, t as MODULES_SUFFIX, u as writesMigrations } from "./module-migration-BSOn1xPx.js";
7
+ import { a as write, o as topicPolicyFile, r as nextStep } from "./sync-x1M-Ywqf.js";
8
8
  import { a as legacyPrefixSql, i as legacyPrefixNames, r as legacyBlocksTableSql } from "./legacy-prefix-D8Jfku6I.js";
9
9
  import { resolve } from "node:path";
10
10
  import { readFile } from "node:fs/promises";
@@ -1,8 +1,8 @@
1
1
  import { m as commandMeta, r as defineCliCommand } from "./command-bvbsvYpo.js";
2
2
  import { i as plain } from "./style-B5-nByxb.js";
3
- import { t as syncModules } from "./sync-DFJfT7dH.js";
3
+ import { t as syncModules } from "./sync-x1M-Ywqf.js";
4
4
  import { t as SQL_ARGS } from "./args-_ZVgRBkx.js";
5
- import { t as upgrade } from "./upgrade-C2Kdvrj-.js";
5
+ import { t as upgrade } from "./upgrade-BUDxM1EG.js";
6
6
  // src/cli/commands/upgrade.ts
7
7
  const UPGRADE_ARGS = {
8
8
  check: {
@@ -1,3 +1,3 @@
1
1
  // src/cli/version.ts
2
- const VERSION = "0.49.0";
2
+ const VERSION = "0.50.0";
3
3
  export { VERSION as t };
@@ -1,6 +1,6 @@
1
1
  import { N as Casing } from "../types-CaYa549m.js";
2
2
  import { Ct as SubjectPermission, Et as SubjectsConfig, St as SubjectConfig, Tt as SubjectTeam, _ as OwnTablePolicies, c as BlockScope, d as DisabledRow, f as EntitiesConfig, i as BlockConfig, l as BlocksConfig, n as ActiveTenantSource, o as BlockMode, p as EntityConfig, r as AnyBlocksConfig, t as AccessBlockConfig, u as DEFAULT_ACTIVE_TENANT, wt as SubjectSearch, x as tenantNameOf } from "../blocks-ERs7xZ7E.js";
3
3
  import { $r as GEN_TASKS, Br as DoctorConfig, Gr as KeysConfig, Hr as GenConfig, Jr as PowerSyncGenConfig, Kr as MigrationSafetyConfig, Ur as GenTask, Vr as EnvFileConfig, Wr as IntegrationName, Xr as SkillsConfig, Yr as SkillsAgent, ei as INTEGRATION_INFO, ln as FieldFormat, ni as IntegrationInfo, qr as OpenApiConfig, ri as SKILLS_AGENTS, sn as FIELD_FORMATS, ti as INTEGRATION_NAMES, un as FieldFormatInput } from "../define-block-DiW9g10_.js";
4
- import { $ as BlockEntity, $r as AppColumnAccess, $t as BetterSupabaseConfig, Ai as ExtrasFunction, Ar as SeedSampleConfig, At as GeneratorFunction, B as standardSchema, Bi as PostgresFunction, Br as VectorDistance, Bt as RelationsConfig, Ci as CatalogGrant, Ct as GeneratedFile, Di as CatalogTrigger, Dr as ResolvedSqlConfig, Dt as GeneratorColumn, Ei as CatalogTable, Er as ResolvedSeedConfig, Et as GeneratorBlockEntity, F as ZodGeneratorOptions, Fi as Snapshot, Fr as TopicTriggerConfig, Ft as GeneratorModel, G as JsonSchemaGeneratorOptions, Gi as RpcFunctionReturns, Gt as DataHooksSelect, H as nuqs, Hi as RpcFunction, Hr as CONFIG_DEFAULTS, Ht as TableConfig, I as zod, Ii as SnapshotBucket, Ir as TopicTriggerLookupConfig, It as GeneratorNoun, J as JsonSchemaTarget, Jr as APP_COLUMN_FORMATS, Jt as ResolvedExtensions, K as buildJsonSchema, Ki as RpcReturnColumn, Kt as FlatConfig, L as ValibotGeneratorOptions, Li as SnapshotExtras, Lr as TopicTriggerPayloadValueConfig, Lt as GeneratorTable, Mi as ExtrasHookFunction, Mr as SqlBlockDefaults, Mt as GeneratorInput, Ni as ExtrasTable, Nr as SqlConfig, Nt as GeneratorInputSchema, Oi as CatalogUnique, Or as SeedConfig, Ot as GeneratorEntitySchemas, P as ZodFlavor, Pi as ForeignKeyAction, Pr as SqlWorkflow, Pt as GeneratorJsonSchema, Q as tenantClaimPaths, Qr as APP_TABLE_EVENT_KINDS, Qt as AuthConfig, R as valibot, Ri as GeneratorMetadata, Rr as TopicTriggerTopicConfig, Rt as JsonSchemaSource, Si as CatalogFunctionArg, St as CodecsConfig, Ti as CatalogPolicy, Tr as RealtimeConfig, Tt as GeneratorBlock, U as FactoriesGeneratorOptions, Ui as RpcFunctionArg, Ut as DataHooksConfig, V as NuqsGeneratorOptions, Vi as PostgresFunctionArg, Vr as VectorSearchConfig, Vt as SourceConfig, W as factories, Wi as RpcFunctionOverload, Wt as DataHooksFramework, X as DEFAULT_CLAIMS, Xr as APP_ON_DELETE_ACTIONS, Xt as AppTableInput, Y as ClaimPaths, Yr as APP_COLUMN_TYPES, Yt as ApiConfig, Z as claimPaths, Zr as APP_ROLLUP_AGGREGATES, Zt as AppTablesInput, _i as CatalogColumn, _t as BucketName, ai as AppReference, an as SqlInput, at as CONFIG_GROUPS, bi as CatalogForeignKey, bt as resolveJsonSchema, ci as AppRollupConfig, cn as EntitlementPlansSource, ct as blockEntrySource, di as AppTableEvents, dn as ExposeConfig, dt as groupEntries, ei as AppColumnConfig, en as BlockInput, et as blockEntities, fi as AppTableSubject, fn as ExposePrivilege, ft as CONFIG_SCHEMA_URL, gi as CatalogCheck, gt as BlockTableReference, hi as Catalog, hn as ResolvedExpose, ht as resolveConfig, ii as AppOnDeleteAction, in as GenGroupConfig, ir as ExpandedConfig, it as blockSubjectTypes, ji as ExtrasHook, jr as SeedSampleSize, jt as GeneratorFunctionArg, ki as ExtrasDomain, kr as SeedDefaultsConfig, kt as GeneratorField, li as AppTableConfig, ln as EntitlementsConfig, lt as flattenConfig, mi as AppTablesConfig, mn as Privilege, mt as defineConfig, ni as AppColumnType, nn as DatabaseConfig, nt as blockEventRenames, oi as AppReferenceTarget, on as TenantConfig, ot as RENAMED_BLOCK_KEYS, pi as AppTableVersions, pn as ExposeRole, pt as ResolveInput, q as jsonSchema, qi as RpcTypeReference, qr as APP_COLUMN_ACCESS, qt as ResolvedConfig, ri as AppLookupConfig, rn as EnvironmentConfig, rt as blockFormerFunctions, si as AppRollupAggregate, sn as ToolingConfig, st as RENAMED_CONFIG_KEYS, ti as AppColumnFormat, tn as BlocksInput, tt as blockEntityRenames, ui as AppTableEventKind, un as ColumnPrivilege, ut as groupConfig, vi as CatalogColumnGrant, vt as ConfigReferences, wi as CatalogIndex, wr as BucketConfig, wt as Generator, xi as CatalogFunction, xt as ClaimsConfig, yi as CatalogEnum, yt as RoleNames, z as StandardSchemaGeneratorOptions, zi as PostgresColumn, zr as TopicTriggerValueConfig, zt as JsonTypeConfig } from "../context-DNwBlpKo.js";
4
+ import { $ as ClaimPaths, $r as APP_COLUMN_TYPES, $t as ApiConfig, Ai as CatalogTable, Ar as ResolvedSeedConfig, At as GeneratorBlockEntity, B as zod, Bi as SnapshotBucket, Br as TopicTriggerLookupConfig, Bt as GeneratorNoun, Ci as CatalogEnum, Ct as RoleNames, Di as CatalogGrant, Dt as GeneratedFile, Ei as CatalogFunctionArg, Et as CodecsConfig, Fi as ExtrasHook, Fr as SeedSampleSize, Ft as GeneratorFunctionArg, G as NuqsGeneratorOptions, Gi as PostgresFunctionArg, Gr as VectorSearchConfig, Gt as SourceConfig, H as valibot, Hi as GeneratorMetadata, Hr as TopicTriggerTopicConfig, Ht as JsonSchemaSource, Ii as ExtrasHookFunction, Ir as SqlBlockDefaults, It as GeneratorInput, J as factories, Ji as RpcFunctionOverload, Jt as DataHooksFramework, K as nuqs, Ki as RpcFunction, Kr as CONFIG_DEFAULTS, Kt as TableConfig, Li as ExtrasTable, Lr as SqlConfig, Lt as GeneratorInputSchema, Mi as CatalogUnique, Mr as SeedConfig, Mt as GeneratorEntitySchemas, Ni as ExtrasDomain, Nr as SeedDefaultsConfig, Nt as GeneratorField, Oi as CatalogIndex, Or as BucketConfig, Ot as Generator, Pi as ExtrasFunction, Pr as SeedSampleConfig, Pt as GeneratorFunction, Q as JsonSchemaTarget, Qr as APP_COLUMN_FORMATS, Qt as ResolvedExtensions, R as ZodFlavor, Ri as ForeignKeyAction, Rr as SqlWorkflow, Rt as GeneratorJsonSchema, Si as CatalogColumnGrant, St as ConfigReferences, Ti as CatalogFunction, Tt as ClaimsConfig, U as StandardSchemaGeneratorOptions, Ui as PostgresColumn, Ur as TopicTriggerValueConfig, Ut as JsonTypeConfig, V as ValibotGeneratorOptions, Vi as SnapshotExtras, Vr as TopicTriggerPayloadValueConfig, Vt as GeneratorTable, W as standardSchema, Wi as PostgresFunction, Wr as VectorDistance, Wt as RelationsConfig, X as buildJsonSchema, Xi as RpcReturnColumn, Xt as FlatConfig, Y as JsonSchemaGeneratorOptions, Yi as RpcFunctionReturns, Yt as DataHooksSelect, Z as jsonSchema, Zi as RpcTypeReference, Zr as APP_COLUMN_ACCESS, Zt as ResolvedConfig, _i as AppTableVersions, _n as ExposeRole, _t as ResolveInput, ai as AppColumnFormat, an as BlocksInput, at as blockEntityRenames, bi as CatalogCheck, bt as BlockTableReference, ci as AppOnDeleteAction, cn as GenGroupConfig, cr as ExpandedConfig, ct as blockSubjectTypes, di as AppRollupAggregate, dn as ToolingConfig, dt as RENAMED_CONFIG_KEYS, ei as APP_ON_DELETE_ACTIONS, en as AppTableInput, et as DEFAULT_CLAIMS, fi as AppRollupConfig, fn as EntitlementPlansSource, ft as blockEntrySource, gi as AppTableSubject, gn as ExposePrivilege, gt as CONFIG_SCHEMA_URL, hi as AppTableEvents, hn as ExposeConfig, ht as groupEntries, ii as AppColumnConfig, in as BlockInput, it as blockEntities, ji as CatalogTrigger, jr as ResolvedSqlConfig, jt as GeneratorColumn, ki as CatalogPolicy, kr as RealtimeConfig, kt as GeneratorBlock, li as AppReference, ln as SqlInput, lt as CONFIG_GROUPS, mi as AppTableEventKind, mn as ColumnPrivilege, mt as groupConfig, ni as APP_TABLE_EVENT_KINDS, nn as AuthConfig, nt as tenantClaimPaths, oi as AppColumnType, on as DatabaseConfig, ot as blockEventRenames, pi as AppTableConfig, pn as EntitlementsConfig, pt as flattenConfig, q as FactoriesGeneratorOptions, qi as RpcFunctionArg, qt as DataHooksConfig, ri as AppColumnAccess, rn as BetterSupabaseConfig, rt as BlockEntity, si as AppLookupConfig, sn as EnvironmentConfig, st as blockFormerFunctions, ti as APP_ROLLUP_AGGREGATES, tn as AppTablesInput, tt as claimPaths, ui as AppReferenceTarget, un as TenantConfig, ut as RENAMED_BLOCK_KEYS, vi as AppTablesConfig, vn as Privilege, vt as defineConfig, wi as CatalogForeignKey, wt as resolveJsonSchema, xi as CatalogColumn, xt as BucketName, yi as Catalog, yn as ResolvedExpose, yt as resolveConfig, z as ZodGeneratorOptions, zi as Snapshot, zr as TopicTriggerConfig, zt as GeneratorModel } from "../context-BlLvUNCj.js";
5
5
  import { a as AuthorizationProvider, c as AuthorizationScope, d as providerApiProblem, i as AuthorizationPermission, l as AuthorizationTokenHook, n as AuthorizationMembership, o as AuthorizationRequirement, r as AuthorizationOperation, s as AuthorizationRoleSource, t as AuthorizationFunctions, u as AuthorizationVersions } from "../authorization-N4bh4KQS.js";
6
6
  export { APP_COLUMN_ACCESS, APP_COLUMN_FORMATS, APP_COLUMN_TYPES, APP_ON_DELETE_ACTIONS, APP_ROLLUP_AGGREGATES, APP_TABLE_EVENT_KINDS, type AccessBlockConfig, type ActiveTenantSource, type AnyBlocksConfig, type ApiConfig, type AppColumnAccess, type AppColumnConfig, type AppColumnFormat, type AppColumnType, type AppLookupConfig, type AppOnDeleteAction, type AppReference, type AppReferenceTarget, type AppRollupAggregate, type AppRollupConfig, type AppTableConfig, type AppTableEventKind, type AppTableEvents, type AppTableInput, type AppTableSubject, type AppTableVersions, type AppTablesConfig, type AppTablesInput, type AuthConfig, type AuthorizationFunctions, type AuthorizationMembership, type AuthorizationOperation, type AuthorizationPermission, type AuthorizationProvider, type AuthorizationRequirement, type AuthorizationRoleSource, type AuthorizationScope, type AuthorizationTokenHook, type AuthorizationVersions, type BetterSupabaseConfig, type BlockConfig, type BlockEntity, type BlockInput, type BlockMode, type BlockScope, type BlockTableReference, type BlocksConfig, type BlocksInput, type BucketConfig, type BucketName, CONFIG_DEFAULTS, CONFIG_GROUPS, CONFIG_SCHEMA_URL, type Casing, type Catalog, type CatalogCheck, type CatalogColumn, type CatalogColumnGrant, type CatalogEnum, type CatalogForeignKey, type CatalogFunction, type CatalogFunctionArg, type CatalogGrant, type CatalogIndex, type CatalogPolicy, type CatalogTable, type CatalogTrigger, type CatalogUnique, type ClaimPaths, type ClaimsConfig, type CodecsConfig, type ColumnPrivilege, type ConfigReferences, DEFAULT_ACTIVE_TENANT, DEFAULT_CLAIMS, type DataHooksConfig, type DataHooksFramework, type DataHooksSelect, type DatabaseConfig, type DisabledRow, type DoctorConfig, type EntitiesConfig, type EntitlementPlansSource, type EntitlementsConfig, type EntityConfig, type EnvFileConfig, type EnvironmentConfig, type ExpandedConfig, type ExposeConfig, type ExposePrivilege, type ExposeRole, type ExtrasDomain, type ExtrasFunction, type ExtrasHook, type ExtrasHookFunction, type ExtrasTable, FIELD_FORMATS, type FactoriesGeneratorOptions, type FieldFormat, type FieldFormatInput, type FlatConfig, type ForeignKeyAction, GEN_TASKS, type GenConfig, type GenGroupConfig, type GenTask, type GeneratedFile, type Generator, type GeneratorBlock, type GeneratorBlockEntity, type GeneratorColumn, type GeneratorEntitySchemas, type GeneratorField, type GeneratorFunction, type GeneratorFunctionArg, type GeneratorInput, type GeneratorInputSchema, type GeneratorJsonSchema, type GeneratorMetadata, type GeneratorModel, type GeneratorNoun, type GeneratorTable, INTEGRATION_INFO, INTEGRATION_NAMES, type IntegrationInfo, type IntegrationName, type JsonSchemaGeneratorOptions, type JsonSchemaSource, type JsonSchemaTarget, type JsonTypeConfig, type KeysConfig, type MigrationSafetyConfig, type NuqsGeneratorOptions, type OpenApiConfig, type OwnTablePolicies, type PostgresColumn, type PostgresFunction, type PostgresFunctionArg, type PowerSyncGenConfig, type Privilege, RENAMED_BLOCK_KEYS, RENAMED_CONFIG_KEYS, type RealtimeConfig, type RelationsConfig, type ResolveInput, type ResolvedConfig, type ResolvedExpose, type ResolvedExtensions, type ResolvedSeedConfig, type ResolvedSqlConfig, type RoleNames, type RpcFunction, type RpcFunctionArg, type RpcFunctionOverload, type RpcFunctionReturns, type RpcReturnColumn, type RpcTypeReference, SKILLS_AGENTS, type SeedConfig, type SeedDefaultsConfig, type SeedSampleConfig, type SeedSampleSize, type SkillsAgent, type SkillsConfig, type Snapshot, type SnapshotBucket, type SnapshotExtras, type SourceConfig, type SqlBlockDefaults, type SqlConfig, type SqlInput, type SqlWorkflow, type StandardSchemaGeneratorOptions, type SubjectConfig, type SubjectPermission, type SubjectSearch, type SubjectTeam, type SubjectsConfig, type TableConfig, type TenantConfig, type ToolingConfig, type TopicTriggerConfig, type TopicTriggerLookupConfig, type TopicTriggerPayloadValueConfig, type TopicTriggerTopicConfig, type TopicTriggerValueConfig, type ValibotGeneratorOptions, type VectorDistance, type VectorSearchConfig, type ZodFlavor, type ZodGeneratorOptions, blockEntities, blockEntityRenames, blockEntrySource, blockEventRenames, blockFormerFunctions, blockSubjectTypes, buildJsonSchema, claimPaths, defineConfig, factories, flattenConfig, groupConfig, groupEntries, jsonSchema, nuqs, providerApiProblem, resolveConfig, resolveJsonSchema, standardSchema, tenantClaimPaths, tenantNameOf, valibot, zod };
@@ -4337,6 +4337,27 @@ interface BlockSqlScope {
4337
4337
  */
4338
4338
  guestParty(tenant: string, type: string, id: string): string;
4339
4339
  }
4340
+ /**
4341
+ * One column's `blocks.<name>.values.<table>.<column>`: each label the block
4342
+ * writes or compares, mapped to the value the app's column stores, to several
4343
+ * values (the first is written, every one reads as the label), or to `null` for
4344
+ * a label the app does not support.
4345
+ */
4346
+ type ValueMap = Readonly<Record<string, string | readonly string[] | null>>;
4347
+ /** `blocks.<name>.values`: logical table to logical column to its map. */
4348
+ type ValueMaps = Readonly<Record<string, Readonly<Record<string, ValueMap>>>>;
4349
+ /**
4350
+ * `values`, checked against the module's tables: every table and column is one
4351
+ * the module declares and lists in `typed`, and every label and value is a
4352
+ * short string.
4353
+ */
4354
+ declare function checkedValueMaps(where: string, values: unknown, tables: Readonly<Record<string, {
4355
+ readonly columns: Readonly<Record<string, string>>;
4356
+ readonly typed?: readonly string[];
4357
+ readonly mappable?: readonly string[];
4358
+ }>>): ValueMaps;
4359
+ /** The app values `label` reads from, `[]` when the app does not support it. */
4360
+ declare function appValues(map: ValueMap | undefined, label: string): readonly string[];
4340
4361
  /** The `BlockSqlContext` methods that cast and map a typed column's values. */
4341
4362
  interface BlockSqlValueMethods {
4342
4363
  /**
@@ -4826,4 +4847,4 @@ interface ExtraColumn {
4826
4847
  /** Its SQL type, such as `text not null default 'en'`. */
4827
4848
  readonly type: string;
4828
4849
  }
4829
- export { BlockEntity as $, PresetCatalog as $i, presetKey as $n, AppColumnAccess as $r, BetterSupabaseConfig as $t, extensionSchema as A, ExtrasFunction as Ai, DesignErrorCode as An, SeedSampleConfig as Ar, GeneratorFunction as At, standardSchema as B, PostgresFunction as Bi, designConfig as Bn, VectorDistance as Br, RelationsConfig as Bt, addedColumnTypes as C, CatalogGrant as Ci, defaultPreset as Cn, resolvePreset as Cr, GeneratedFile as Ct, declaredTables as D, CatalogTrigger as Di, CreateDesign as Dn, ResolvedSqlConfig as Dr, GeneratorColumn as Dt, declaredTableColumns as E, CatalogTable as Ei, CREATE_URL as En, ResolvedSeedConfig as Er, GeneratorBlockEntity as Et, ZodGeneratorOptions as F, Snapshot as Fi, DesignTooLongError as Fn, TopicTriggerConfig as Fr, GeneratorModel as Ft, JsonSchemaGeneratorOptions as G, RpcFunctionReturns as Gi, encodeDesign as Gn, AuditedTable as Gr, DataHooksSelect as Gt, nuqs as H, RpcFunction as Hi, designFormat as Hn, CONFIG_DEFAULTS as Hr, TableConfig as Ht, zod as I, SnapshotBucket as Ii, MAX_DESIGN_CODE_LENGTH as In, TopicTriggerLookupConfig as Ir, GeneratorNoun as It, JsonSchemaTarget as J, CORE_BLOCKS as Ji, presetAndDesignOf as Jn, APP_COLUMN_FORMATS as Jr, ResolvedExtensions as Jt, buildJsonSchema as K, RpcReturnColumn as Ki, isDesignCode as Kn, auditRegistrations as Kr, FlatConfig as Kt, ValibotGeneratorOptions as L, SnapshotExtras as Li, createQuery as Ln, TopicTriggerPayloadValueConfig as Lr, GeneratorTable as Lt, rlsTables as M, ExtrasHookFunction as Mi, DesignParseError as Mn, SqlBlockDefaults as Mr, GeneratorInput as Mt, TableGrant as N, ExtrasTable as Ni, DesignParseIssue as Nn, SqlConfig as Nr, GeneratorInputSchema as Nt, declaredUpdatedAtTriggers as O, CatalogUnique as Oi, DESIGN_FILE as On, SeedConfig as Or, GeneratorEntitySchemas as Ot, ZodFlavor as P, ForeignKeyAction as Pi, DesignParseResult as Pn, SqlWorkflow as Pr, GeneratorJsonSchema as Pt, tenantClaimPaths as Q, BlockCatalogEntry as Qi, presetInstallCommand as Qn, APP_TABLE_EVENT_KINDS as Qr, AuthConfig as Qt, valibot as R, GeneratorMetadata as Ri, createUrl as Rn, TopicTriggerTopicConfig as Rr, JsonSchemaSource as Rt, PolicyGrant as S, CatalogFunctionArg as Si, PresetName as Sn, removeComposite as Sr, CodecsConfig as St, declaredIndexes as T, CatalogPolicy as Ti, namedPreset as Tn, RealtimeConfig as Tr, GeneratorBlock as Tt, FactoriesGeneratorOptions as U, RpcFunctionArg as Ui, designOf as Un, DeclaredForeignKey as Ur, DataHooksConfig as Ut, NuqsGeneratorOptions as V, PostgresFunctionArg as Vi, designFileSource as Vn, VectorSearchConfig as Vr, SourceConfig as Vt, factories as W, RpcFunctionOverload as Wi, designSchema as Wn, sameTenantLayout as Wr, DataHooksFramework as Wt, DEFAULT_CLAIMS as X, instancePrefix as Xi, presetArgumentOf as Xn, APP_ON_DELETE_ACTIONS as Xr, AppTableInput as Xt, ClaimPaths as Y, INSTANCE_NAME as Yi, presetApplyCommand as Yn, APP_COLUMN_TYPES as Yr, ApiConfig as Yt, claimPaths as Z, BlockCatalog as Zi, presetConfigSource as Zn, APP_ROLLUP_AGGREGATES as Zr, AppTablesInput as Zt, OwnView as _, CatalogColumn as _i, NamedPreset as _n, ResolvedComposite as _r, BucketName as _t, BlockSqlTableSpec as a, BlockSqlReadArgType as aa, AppReference as ai, SqlInput as an, PresetInput as ar, CONFIG_GROUPS as at, DeclaredView as b, CatalogForeignKey as bi, PRESET_NAMES as bn, listNames as br, resolveJsonSchema as bt, moduleIdType as c, readArgSqlType as ca, AppRollupConfig as ci, EntitlementPlansSource as cn, presetConfig as cr, blockEntrySource as ct, BlockSqlDeprecation as d, AppTableEvents as di, ExposeConfig as dn, presetFromSpec as dr, groupEntries as dt, PresetCatalogBlock as ea, AppColumnConfig as ei, BlockInput as en, readDesignFile as er, blockEntities as et, BlockSqlEntitlementsProvider as f, AppTableSubject as fi, ExposePrivilege as fn, presetOfSpec as fr, CONFIG_SCHEMA_URL as ft, BlockSqlUpgrade as g, CatalogCheck as gi, DEFAULT_PRESET_NAME as gn, PresetIntegration as gr, BlockTableReference as gt, BlockSqlTestFile as h, Catalog as hi, ResolvedExpose as hn, PresetConflict as hr, resolveConfig as ht, BlockSqlNames as i, BlockSqlReadArg as ia, AppOnDeleteAction as ii, GenGroupConfig as in, ExpandedConfig as ir, blockSubjectTypes as it, policyGrants as j, ExtrasHook as ji, DesignFile as jn, SeedSampleSize as jr, GeneratorFunctionArg as jt, declaredViews as k, ExtrasDomain as ki, DESIGN_FORMAT as kn, SeedDefaultsConfig as kr, GeneratorField as kt, BlockSql as l, AppTableConfig as li, EntitlementsConfig as ln, presetOf as lr, flattenConfig as lt, BlockSqlLayout as m, AppTablesConfig as mi, Privilege as mn, CompositeRemoval as mr, defineConfig as mt, BlockSqlContractFunction as n, PresetGlueItem as na, AppColumnType as ni, DatabaseConfig as nn, safeParseDesign as nr, blockEventRenames as nt, MODULE_ID_TYPES as o, declareRead as oa, AppReferenceTarget as oi, TenantConfig as on, conventionConfig as or, RENAMED_BLOCK_KEYS as ot, BlockSqlFile as p, AppTableVersions as pi, ExposeRole as pn, presetSpec as pr, ResolveInput as pt, jsonSchema as q, RpcTypeReference as qi, parseDesign as qn, APP_COLUMN_ACCESS as qr, ResolvedConfig as qt, BlockSqlIdType as r, BlockSqlRead as ra, AppLookupConfig as ri, EnvironmentConfig as rn, ConfigConventions as rr, blockFormerFunctions as rt, isBlockSqlIdType as s, readArgSource as sa, AppRollupAggregate as si, ToolingConfig as sn, expandPreset as sr, RENAMED_CONFIG_KEYS as st, BlockSqlContext as t, PresetCatalogManifest as ta, AppColumnFormat as ti, BlocksInput as tn, safeDesignFileSource as tr, blockEntityRenames as tt, BlockSqlAccessProvider as u, AppTableEventKind as ui, ColumnPrivilege as un, PresetSpec as ur, groupConfig as ut, blockSqlVersion as v, CatalogColumnGrant as vi, PRESETS as vn, ResolvedPreset as vr, ConfigReferences as vt, declaredColumnTypes as w, CatalogIndex as wi, isPresetName as wn, BucketConfig as wr, Generator as wt, OwnIndex as x, CatalogFunction as xi, PresetGroup as xn, presetBlockConflict as xr, ClaimsConfig as xt, notNullCheckName as y, CatalogEnum as yi, PRESET_GROUPS as yn, ResolvedPresetBlock as yr, RoleNames as yt, StandardSchemaGeneratorOptions as z, PostgresColumn as zi, decodeDesign as zn, TopicTriggerValueConfig as zr, JsonTypeConfig as zt };
4850
+ export { ClaimPaths as $, INSTANCE_NAME as $i, presetApplyCommand as $n, APP_COLUMN_TYPES as $r, ApiConfig as $t, declaredTableColumns as A, CatalogTable as Ai, CREATE_URL as An, ResolvedSeedConfig as Ar, GeneratorBlockEntity as At, zod as B, SnapshotBucket as Bi, MAX_DESIGN_CODE_LENGTH as Bn, TopicTriggerLookupConfig as Br, GeneratorNoun as Bt, notNullCheckName as C, CatalogEnum as Ci, PRESET_GROUPS as Cn, ResolvedPresetBlock as Cr, RoleNames as Ct, addedColumnTypes as D, CatalogGrant as Di, defaultPreset as Dn, resolvePreset as Dr, GeneratedFile as Dt, PolicyGrant as E, CatalogFunctionArg as Ei, PresetName as En, removeComposite as Er, CodecsConfig as Et, policyGrants as F, ExtrasHook as Fi, DesignFile as Fn, SeedSampleSize as Fr, GeneratorFunctionArg as Ft, NuqsGeneratorOptions as G, PostgresFunctionArg as Gi, designFileSource as Gn, VectorSearchConfig as Gr, SourceConfig as Gt, valibot as H, GeneratorMetadata as Hi, createUrl as Hn, TopicTriggerTopicConfig as Hr, JsonSchemaSource as Ht, rlsTables as I, ExtrasHookFunction as Ii, DesignParseError as In, SqlBlockDefaults as Ir, GeneratorInput as It, factories as J, RpcFunctionOverload as Ji, designSchema as Jn, sameTenantLayout as Jr, DataHooksFramework as Jt, nuqs as K, RpcFunction as Ki, designFormat as Kn, CONFIG_DEFAULTS as Kr, TableConfig as Kt, TableGrant as L, ExtrasTable as Li, DesignParseIssue as Ln, SqlConfig as Lr, GeneratorInputSchema as Lt, declaredUpdatedAtTriggers as M, CatalogUnique as Mi, DESIGN_FILE as Mn, SeedConfig as Mr, GeneratorEntitySchemas as Mt, declaredViews as N, ExtrasDomain as Ni, DESIGN_FORMAT as Nn, SeedDefaultsConfig as Nr, GeneratorField as Nt, declaredColumnTypes as O, CatalogIndex as Oi, isPresetName as On, BucketConfig as Or, Generator as Ot, extensionSchema as P, ExtrasFunction as Pi, DesignErrorCode as Pn, SeedSampleConfig as Pr, GeneratorFunction as Pt, JsonSchemaTarget as Q, CORE_BLOCKS as Qi, presetAndDesignOf as Qn, APP_COLUMN_FORMATS as Qr, ResolvedExtensions as Qt, ZodFlavor as R, ForeignKeyAction as Ri, DesignParseResult as Rn, SqlWorkflow as Rr, GeneratorJsonSchema as Rt, blockSqlVersion as S, CatalogColumnGrant as Si, PRESETS as Sn, ResolvedPreset as Sr, ConfigReferences as St, OwnIndex as T, CatalogFunction as Ti, PresetGroup as Tn, presetBlockConflict as Tr, ClaimsConfig as Tt, StandardSchemaGeneratorOptions as U, PostgresColumn as Ui, decodeDesign as Un, TopicTriggerValueConfig as Ur, JsonTypeConfig as Ut, ValibotGeneratorOptions as V, SnapshotExtras as Vi, createQuery as Vn, TopicTriggerPayloadValueConfig as Vr, GeneratorTable as Vt, standardSchema as W, PostgresFunction as Wi, designConfig as Wn, VectorDistance as Wr, RelationsConfig as Wt, buildJsonSchema as X, RpcReturnColumn as Xi, isDesignCode as Xn, auditRegistrations as Xr, FlatConfig as Xt, JsonSchemaGeneratorOptions as Y, RpcFunctionReturns as Yi, encodeDesign as Yn, AuditedTable as Yr, DataHooksSelect as Yt, jsonSchema as Z, RpcTypeReference as Zi, parseDesign as Zn, APP_COLUMN_ACCESS as Zr, ResolvedConfig as Zt, BlockSqlFile as _, AppTableVersions as _i, ExposeRole as _n, presetSpec as _r, ResolveInput as _t, BlockSqlTableSpec as a, PresetCatalogManifest as aa, AppColumnFormat as ai, BlocksInput as an, safeDesignFileSource as ar, blockEntityRenames as at, BlockSqlUpgrade as b, CatalogCheck as bi, DEFAULT_PRESET_NAME as bn, PresetIntegration as br, BlockTableReference as bt, moduleIdType as c, BlockSqlReadArg as ca, AppOnDeleteAction as ci, GenGroupConfig as cn, ExpandedConfig as cr, blockSubjectTypes as ct, appValues as d, readArgSource as da, AppRollupAggregate as di, ToolingConfig as dn, expandPreset as dr, RENAMED_CONFIG_KEYS as dt, instancePrefix as ea, APP_ON_DELETE_ACTIONS as ei, AppTableInput as en, presetArgumentOf as er, DEFAULT_CLAIMS as et, checkedValueMaps as f, readArgSqlType as fa, AppRollupConfig as fi, EntitlementPlansSource as fn, presetConfig as fr, blockEntrySource as ft, BlockSqlEntitlementsProvider as g, AppTableSubject as gi, ExposePrivilege as gn, presetOfSpec as gr, CONFIG_SCHEMA_URL as gt, BlockSqlDeprecation as h, AppTableEvents as hi, ExposeConfig as hn, presetFromSpec as hr, groupEntries as ht, BlockSqlNames as i, PresetCatalogBlock as ia, AppColumnConfig as ii, BlockInput as in, readDesignFile as ir, blockEntities as it, declaredTables as j, CatalogTrigger as ji, CreateDesign as jn, ResolvedSqlConfig as jr, GeneratorColumn as jt, declaredIndexes as k, CatalogPolicy as ki, namedPreset as kn, RealtimeConfig as kr, GeneratorBlock as kt, ValueMap as l, BlockSqlReadArgType as la, AppReference as li, SqlInput as ln, PresetInput as lr, CONFIG_GROUPS as lt, BlockSqlAccessProvider as m, AppTableEventKind as mi, ColumnPrivilege as mn, PresetSpec as mr, groupConfig as mt, BlockSqlContractFunction as n, BlockCatalogEntry as na, APP_TABLE_EVENT_KINDS as ni, AuthConfig as nn, presetInstallCommand as nr, tenantClaimPaths as nt, MODULE_ID_TYPES as o, PresetGlueItem as oa, AppColumnType as oi, DatabaseConfig as on, safeParseDesign as or, blockEventRenames as ot, BlockSql as p, AppTableConfig as pi, EntitlementsConfig as pn, presetOf as pr, flattenConfig as pt, FactoriesGeneratorOptions as q, RpcFunctionArg as qi, designOf as qn, DeclaredForeignKey as qr, DataHooksConfig as qt, BlockSqlIdType as r, PresetCatalog as ra, AppColumnAccess as ri, BetterSupabaseConfig as rn, presetKey as rr, BlockEntity as rt, isBlockSqlIdType as s, BlockSqlRead as sa, AppLookupConfig as si, EnvironmentConfig as sn, ConfigConventions as sr, blockFormerFunctions as st, BlockSqlContext as t, BlockCatalog as ta, APP_ROLLUP_AGGREGATES as ti, AppTablesInput as tn, presetConfigSource as tr, claimPaths as tt, ValueMaps as u, declareRead as ua, AppReferenceTarget as ui, TenantConfig as un, conventionConfig as ur, RENAMED_BLOCK_KEYS as ut, BlockSqlLayout as v, AppTablesConfig as vi, Privilege as vn, CompositeRemoval as vr, defineConfig as vt, DeclaredView as w, CatalogForeignKey as wi, PRESET_NAMES as wn, listNames as wr, resolveJsonSchema as wt, OwnView as x, CatalogColumn as xi, NamedPreset as xn, ResolvedComposite as xr, BucketName as xt, BlockSqlTestFile as y, Catalog as yi, ResolvedExpose as yn, PresetConflict as yr, resolveConfig as yt, ZodGeneratorOptions as z, Snapshot as zi, DesignTooLongError as zn, TopicTriggerConfig as zr, GeneratorModel as zt };
@@ -7,7 +7,7 @@ import { n as ApprovalOptions } from "../server-types-CBa24huI.js";
7
7
  import { s as ApiKeyResolverOptions } from "../api-keys-DAPc3sq_.js";
8
8
  import { r as AuthzVersionSource } from "../authz-topic-C7n3kIm_.js";
9
9
  import { a as ToolDecision, n as McpOptions, s as ToolRef } from "../index-iaMOudmP.js";
10
- import { n as BlockTables, t as BlockTable } from "../block-tables-Pd7nOPv3.js";
10
+ import { n as BlockTables, t as BlockTable } from "../block-tables-CQHwZ9-v.js";
11
11
  /**
12
12
  * The types an authorization library implements or reads, in one entry with no
13
13
  * runtime code. Every slot is versioned `apiVersion: 1`; a breaking change to
@@ -1,8 +1,8 @@
1
1
  /// <reference lib="esnext.temporal" />
2
2
  import { wr as Preset } from "../define-block-DiW9g10_.js";
3
- import { $r as AppColumnAccess, Dn as CreateDesign, Sn as PresetName, Xr as APP_ON_DELETE_ACTIONS, ar as PresetInput, ii as AppOnDeleteAction, ni as AppColumnType, u as BlockSqlAccessProvider, ur as PresetSpec } from "../context-DNwBlpKo.js";
4
- import { b as DesignChange } from "../index-D6y6ojUX.js";
5
- import { $ as SchemaTable, A as renameColumn, B as AppEvents, C as editTable, Ct as tableWithComputed, D as isEmptyDesign, Dt as IssueSeverity, E as isAppTable, Et as IssueCode, F as singular, G as subjectTypeError, H as eventsColumnsEdited, I as tidy, J as SchemaData, K as SchemaColumn, L as updateTable, M as setColumn, N as setExtraColumn, O as moveTables, Ot as IssueSource, P as setTableId, Q as SchemaSource, R as userConnection, S as duplicateTable, St as rollupSources, T as identifierError, Tt as Issue, U as subjectColumns, V as AppSubject, W as subjectColumnsEdited, X as SchemaOptions, Y as SchemaForeignKey, Z as SchemaSoftRef, _ as connect, _t as isRollupAggregate, a as AppScope, at as tenantColumnOf, b as deleteExtraColumn, bt as readableColumns, c as ConnectResult, ct as ComputedRow, d as EMPTY_DESIGN, dt as RollupAggregate, et as SchemaTarget, f as NamedDesign, ft as computedColumnRenamed, g as columnError, gt as fittedRollup, h as appTableId, ht as filterColumns, i as AppReference, it as tableStatements, j as renameTable, k as referenceFrom, l as Connection, lt as DraftRollup, m as addTable, mt as computedTableRenamed, n as APP_MODULE, nt as parseSchema, o as AppTable, ot as AppLookup, p as TablePatch, pt as computedRows, q as SchemaComputed, r as AppColumn, rt as schemaRelations, s as AppTableId, st as AppRollup, t as PresetMigrationFile, tt as keyColumnsOf, u as Design, ut as ROLLUP_AGGREGATES, v as defaultError, vt as lookupSources, w as freeTableName, wt as tableWithoutComputed, x as deleteTable, xt as rollupColumns, y as deleteColumn, yt as prunedComputed, z as withDesign } from "../types-D9r3axee.js";
3
+ import { En as PresetName, ci as AppOnDeleteAction, ei as APP_ON_DELETE_ACTIONS, jn as CreateDesign, lr as PresetInput, m as BlockSqlAccessProvider, mr as PresetSpec, oi as AppColumnType, ri as AppColumnAccess } from "../context-BlLvUNCj.js";
4
+ import { b as DesignChange } from "../index-DxmiTJJ5.js";
5
+ import { $ as SchemaTable, A as renameColumn, B as AppEvents, C as editTable, Ct as tableWithComputed, D as isEmptyDesign, Dt as IssueSeverity, E as isAppTable, Et as IssueCode, F as singular, G as subjectTypeError, H as eventsColumnsEdited, I as tidy, J as SchemaData, K as SchemaColumn, L as updateTable, M as setColumn, N as setExtraColumn, O as moveTables, Ot as IssueSource, P as setTableId, Q as SchemaSource, R as userConnection, S as duplicateTable, St as rollupSources, T as identifierError, Tt as Issue, U as subjectColumns, V as AppSubject, W as subjectColumnsEdited, X as SchemaOptions, Y as SchemaForeignKey, Z as SchemaSoftRef, _ as connect, _t as isRollupAggregate, a as AppScope, at as tenantColumnOf, b as deleteExtraColumn, bt as readableColumns, c as ConnectResult, ct as ComputedRow, d as EMPTY_DESIGN, dt as RollupAggregate, et as SchemaTarget, f as NamedDesign, ft as computedColumnRenamed, g as columnError, gt as fittedRollup, h as appTableId, ht as filterColumns, i as AppReference, it as tableStatements, j as renameTable, k as referenceFrom, l as Connection, lt as DraftRollup, m as addTable, mt as computedTableRenamed, n as APP_MODULE, nt as parseSchema, o as AppTable, ot as AppLookup, p as TablePatch, pt as computedRows, q as SchemaComputed, r as AppColumn, rt as schemaRelations, s as AppTableId, st as AppRollup, t as PresetMigrationFile, tt as keyColumnsOf, u as Design, ut as ROLLUP_AGGREGATES, v as defaultError, vt as lookupSources, w as freeTableName, wt as tableWithoutComputed, x as deleteTable, xt as rollupColumns, y as deleteColumn, yt as prunedComputed, z as withDesign } from "../types-Dp1r6bih.js";
6
6
  import { a as SupabaseLint, o as SupabaseOrganization, s as SupabaseProject } from "../management-DtX4ic1F.js";
7
7
  /** What `checkDesign` returns. */
8
8
  export type DesignCheck = {
@@ -1,6 +1,6 @@
1
1
  import { A as APP_ON_DELETE_ACTIONS } from "../instances-ukDFg8oN.js";
2
2
  import { m as diffDesigns } from "../preset-Be8m6-PH.js";
3
- import { $ as tableWithComputed, A as referenceFrom, B as withDesign, C as duplicateTable, D as isAppTable, E as identifierError, F as setTableId, G as filterColumns, H as computedColumnRenamed, I as singular, J as lookupSources, K as fittedRollup, L as tidy, M as renameTable, N as setColumn, O as isEmptyDesign, P as setExtraColumn, Q as rollupSources, R as updateTable, S as deleteTable, T as freeTableName, U as computedRows, V as ROLLUP_AGGREGATES, W as computedTableRenamed, X as readableColumns, Y as prunedComputed, Z as rollupColumns, _ as columnError, a as parseSchema, at as boundError, b as deleteColumn, c as tenantColumnOf, ct as fitted, d as previewFiles, dt as takesBounds, et as tableWithoutComputed, f as designIssues, ft as withBounds, g as appTableId, h as addTable, i as keyColumnsOf, it as subjectTypeError, j as renameColumn, k as moveTables, l as schemaData, lt as lockedWithoutDefault, m as EMPTY_DESIGN, n as loadProject, nt as subjectColumns, o as schemaRelations, ot as columnLabel, p as APP_MODULE, q as isRollupAggregate, r as checkDesign, rt as subjectColumnsEdited, s as tableStatements, st as encryptable, t as checkProject, tt as eventsColumnsEdited, u as previewAccessProvider, ut as optionError, v as connect, w as editTable, x as deleteExtraColumn, y as defaultError, z as userConnection } from "../project-CwZtBezd.js";
3
+ import { $ as tableWithComputed, A as referenceFrom, B as withDesign, C as duplicateTable, D as isAppTable, E as identifierError, F as setTableId, G as filterColumns, H as computedColumnRenamed, I as singular, J as lookupSources, K as fittedRollup, L as tidy, M as renameTable, N as setColumn, O as isEmptyDesign, P as setExtraColumn, Q as rollupSources, R as updateTable, S as deleteTable, T as freeTableName, U as computedRows, V as ROLLUP_AGGREGATES, W as computedTableRenamed, X as readableColumns, Y as prunedComputed, Z as rollupColumns, _ as columnError, a as parseSchema, at as boundError, b as deleteColumn, c as tenantColumnOf, ct as fitted, d as previewFiles, dt as takesBounds, et as tableWithoutComputed, f as designIssues, ft as withBounds, g as appTableId, h as addTable, i as keyColumnsOf, it as subjectTypeError, j as renameColumn, k as moveTables, l as schemaData, lt as lockedWithoutDefault, m as EMPTY_DESIGN, n as loadProject, nt as subjectColumns, o as schemaRelations, ot as columnLabel, p as APP_MODULE, q as isRollupAggregate, r as checkDesign, rt as subjectColumnsEdited, s as tableStatements, st as encryptable, t as checkProject, tt as eventsColumnsEdited, u as previewAccessProvider, ut as optionError, v as connect, w as editTable, x as deleteExtraColumn, y as defaultError, z as userConnection } from "../project-C71Z2pg2.js";
4
4
  // src/create/column-kinds.ts
5
5
  /** The groups of the column type picker, in the order it shows them. */
6
6
  const KIND_GROUPS = [
@@ -1,6 +1,6 @@
1
1
  import { st as SchemaMeta } from "../../types-CaYa549m.js";
2
- import { Dn as CreateDesign, ar as PresetInput } from "../../context-DNwBlpKo.js";
3
- import { Tt as Issue, t as PresetMigrationFile, u as Design } from "../../types-D9r3axee.js";
2
+ import { jn as CreateDesign, lr as PresetInput } from "../../context-BlLvUNCj.js";
3
+ import { Tt as Issue, t as PresetMigrationFile, u as Design } from "../../types-Dp1r6bih.js";
4
4
  import { c as SpecDiagnostic } from "../../format-BT0Z3V54.js";
5
5
  /**
6
6
  * The parts of `@supabase/lite` that `liteStack()` uses, typed structurally so
@@ -1,5 +1,5 @@
1
1
  import { b as appDefaultError } from "../../instances-ukDFg8oN.js";
2
- import { n as loadProject } from "../../project-CwZtBezd.js";
2
+ import { n as loadProject } from "../../project-C71Z2pg2.js";
3
3
  import { n as loadLite, t as LITE_INSTALL } from "../../runtime-qslVrC9l.js";
4
4
  import { t as defineApi } from "../../api-DXZh-j0l.js";
5
5
  // src/create/lite/apply.ts
@@ -1,7 +1,7 @@
1
1
  import { E as AccessPolicySql } from "./types-CaYa549m.js";
2
2
  import { St as SubjectConfig, r as AnyBlocksConfig } from "./blocks-ERs7xZ7E.js";
3
3
  import { G as ReadSet } from "./db-blocks-BZLF1SQ6.js";
4
- import { N as TableGrant, Ti as CatalogPolicy, d as BlockSqlDeprecation, f as BlockSqlEntitlementsProvider, l as BlockSql, li as AppTableConfig, m as BlockSqlLayout, n as BlockSqlContractFunction, p as BlockSqlFile, qt as ResolvedConfig, r as BlockSqlIdType, u as BlockSqlAccessProvider } from "./context-DNwBlpKo.js";
4
+ import { L as TableGrant, Zt as ResolvedConfig, _ as BlockSqlFile, g as BlockSqlEntitlementsProvider, h as BlockSqlDeprecation, ki as CatalogPolicy, m as BlockSqlAccessProvider, n as BlockSqlContractFunction, p as BlockSql, pi as AppTableConfig, r as BlockSqlIdType, v as BlockSqlLayout } from "./context-BlLvUNCj.js";
5
5
  import { t as AuthorizationFunctions } from "./authorization-N4bh4KQS.js";
6
6
  /** The contract's argument list with `{id}` resolved, as Postgres prints it. */
7
7
  declare function contractSignature(fn: BlockSqlContractFunction, idType: string): string;
@@ -166,6 +166,7 @@ declare function moduleEventTriggers(names: readonly string[], modules?: Readonl
166
166
  readonly module: string;
167
167
  readonly name: string;
168
168
  }[];
169
+ declare function moduleSource(name: string, layout?: BlockSqlLayout, installed?: readonly string[]): string | undefined;
169
170
  /** New modules go at the end: the position is part of the file name. */
170
171
  declare const SQL_MODULES: Readonly<Record<string, BlockSql>>;
171
172
  /**
@@ -346,6 +347,32 @@ type ReadRolesModule = "attachments" | "observations" | "medications" | "activit
346
347
  * decide reads.
347
348
  */
348
349
  declare function blockReadRoles(module: ReadRolesModule, layout: BlockSqlLayout, installed: readonly string[], instance: string): readonly string[] | undefined;
350
+ /** A simple membership check: one column and the values it accepts. */
351
+ interface CheckValues {
352
+ readonly column: string;
353
+ readonly values: readonly string[];
354
+ }
355
+ /**
356
+ * The column and values a `check (column in (...))` or `check (column = any
357
+ * (array[...]))` constraint accepts, as Postgres prints it or as a schema file
358
+ * writes it. `undefined` for a check that constrains more than one column, a
359
+ * negation, a pattern or an expression.
360
+ */
361
+ declare function checkValues(definition: string): CheckValues | undefined;
362
+ /** A check of a `create table` in the schema files, with its table. */
363
+ interface TableCheckValues extends CheckValues {
364
+ /** `schema.table`, unquoted. */
365
+ readonly table: string;
366
+ }
367
+ /**
368
+ * The membership checks of the `create table` statements in `files`, inline on
369
+ * a column or as a table constraint, keyed by the table. Checks in `schemas`
370
+ * only when `schemas` is given.
371
+ */
372
+ declare function declaredCheckValues(files: readonly {
373
+ readonly text: string;
374
+ }[], schemas?: readonly string[]): TableCheckValues[];
375
+ declare function writtenValues(sql: string, table: string, column: string): readonly string[];
349
376
  /** The Postgres types a scope's ids can have. */
350
377
  declare const SCOPE_ID_TYPES: readonly string[];
351
378
  /**
@@ -699,4 +726,4 @@ declare function tableTagComments(sql: string): {
699
726
  * when the feature has none or the file is already in the wanted state.
700
727
  */
701
728
  declare function setFeatureStatement(sql: string, schema: string, table: string, feature: TableFeature, enabled: boolean): string;
702
- export { sharedRolesProblems as $, formerBlockName as $t, appTablePolicyNotes as A, DEFAULT_ROLES as At, RenderPolicyOptions as B, modulePermissionKeys as Bt, disallowedPolicyCalls as C, adoptedColumnProblems as Ct, renderRule as D, APP_TABLES_MARKER as Dt, readRulePolicies as E, moduleWritesText as Et, Grant as F, resolveBlocks as Ft, readPolicies as G, sameBlockFile as Gt, maskSql as H, blockFileState as Ht, Policy as I, BlockSqlExtension as It, scopePolicyName as J, EntityRenamePlan as Jt, readPolicy as K, moduleDataDir as Kt, PolicyCommand$1 as L, BlockSqlPermissionKey as Lt, widenedCommands as M, SeedDefaultsFunction as Mt, TENANT_SCOPE_NAMES as N, seedDefaultsFunctions as Nt, renderRulePolicy as O, APP_TABLES_MODULE as Ot, TENANT_SCOPE_POLICY as P, SQL_MODULES as Pt, compileReadSets as Q, currentBlockName as Qt, PolicyInput as R, moduleEventTriggers as Rt, RuleValue as S, AdoptedView as St, policyFunctionsSql as T, adoptedViews as Tt, policy as U, isModuleDataFile as Ut, catalogPolicy as V, moduleSchemaExtensions as Vt, readGrants as W, moduleFileVersion as Wt, CompiledReadSet as X, entityRenamePlan as Xt, hasColumnAccess as Y, EntityRenameStep as Yt, compileReadSet as Z, BLOCK_RENAMES as Zt, ReadRulePolicy as _, SECRET_COLUMNS as _t, setFeatureStatement as a, BlockSqlTopic as an, sameTemplateFunction as at, RulePolicy as b, resolveExposeColumns as bt, tableTagComments as c, moduleTopics as cn, ReadRolesModule as ct, commentOnTableSql as d, TenantQuery as dt, renamedBlock as en, MigrationOptionUse as et, formatBsbComment as f, tenantsQuery as ft, PolicyFunctionsOptions as g, DataExportPlan as gt, POLICY_FUNCTIONS as h, sameTenantTrigger as ht, isTableFeature as i, upgradePlan as in, resolveProviderSql as it, declaredPolicies as j, instanceFunctions as jt, rulePolicy as k, appTablesFiles as kt, BsbComment as l, renderBlocks as ln, blockReadRoles as lt, setBsbTag as m, sameTenantColumn as mt, TableFeature as n, InstalledBlock as nn, moduleLayout as nt, setTableFeature as o, customContracts as on, scopeProblems as ot, parseBsbComment as p, expiredFlagsQuery as pt, renderPolicy as q, moduleFilePaths as qt, createsTable as r, moduleDeprecations as rn, SCOPE_ID_TYPES as rt, tableFeatures as s, moduleBody as sn, templateFunctions as st, TABLE_FEATURES as t, BlockSqlUpgradePlan as tn, migrationOptionUses as tt, BsbTag as u, contractSignature as un, subjectColumns as ut, Rule as v, dataExportPlan as vt, isRule as w, adoptedTables as wt, RulePolicyInput as x, AdoptedTable as xt, RuleOperator as y, excludedColumns as yt, ReadPolicy as z, moduleHidingColumns as zt };
729
+ export { sharedRolesProblems as $, moduleFilePaths as $t, appTablePolicyNotes as A, adoptedViews as At, RenderPolicyOptions as B, moduleSource as Bt, disallowedPolicyCalls as C, dataExportPlan as Ct, renderRule as D, AdoptedView as Dt, readRulePolicies as E, AdoptedTable as Et, Grant as F, DEFAULT_ROLES as Ft, readPolicies as G, moduleHidingColumns as Gt, maskSql as H, BlockSqlExtension as Ht, Policy as I, instanceFunctions as It, scopePolicyName as J, blockFileState as Jt, readPolicy as K, modulePermissionKeys as Kt, PolicyCommand$1 as L, SeedDefaultsFunction as Lt, widenedCommands as M, APP_TABLES_MARKER as Mt, TENANT_SCOPE_NAMES as N, APP_TABLES_MODULE as Nt, renderRulePolicy as O, adoptedColumnProblems as Ot, TENANT_SCOPE_POLICY as P, appTablesFiles as Pt, compileReadSets as Q, moduleDataDir as Qt, PolicyInput as R, seedDefaultsFunctions as Rt, RuleValue as S, SECRET_COLUMNS as St, policyFunctionsSql as T, resolveExposeColumns as Tt, policy as U, BlockSqlPermissionKey as Ut, catalogPolicy as V, resolveBlocks as Vt, readGrants as W, moduleEventTriggers as Wt, CompiledReadSet as X, moduleFileVersion as Xt, hasColumnAccess as Y, isModuleDataFile as Yt, compileReadSet as Z, sameBlockFile as Zt, ReadRulePolicy as _, tenantsQuery as _t, setFeatureStatement as a, formerBlockName as an, sameTemplateFunction as at, RulePolicy as b, sameTenantTrigger as bt, tableTagComments as c, InstalledBlock as cn, writtenValues as ct, commentOnTableSql as d, BlockSqlTopic as dn, checkValues as dt, EntityRenamePlan as en, MigrationOptionUse as et, formatBsbComment as f, customContracts as fn, declaredCheckValues as ft, PolicyFunctionsOptions as g, contractSignature as gn, TenantQuery as gt, POLICY_FUNCTIONS as h, renderBlocks as hn, subjectColumns as ht, isTableFeature as i, currentBlockName as in, resolveProviderSql as it, declaredPolicies as j, moduleWritesText as jt, rulePolicy as k, adoptedTables as kt, BsbComment as l, moduleDeprecations as ln, CheckValues as lt, setBsbTag as m, moduleTopics as mn, blockReadRoles as mt, TableFeature as n, entityRenamePlan as nn, moduleLayout as nt, setTableFeature as o, renamedBlock as on, scopeProblems as ot, parseBsbComment as p, moduleBody as pn, ReadRolesModule as pt, renderPolicy as q, moduleSchemaExtensions as qt, createsTable as r, BLOCK_RENAMES as rn, SCOPE_ID_TYPES as rt, tableFeatures as s, BlockSqlUpgradePlan as sn, templateFunctions as st, TABLE_FEATURES as t, EntityRenameStep as tn, migrationOptionUses as tt, BsbTag as u, upgradePlan as un, TableCheckValues as ut, Rule as v, expiredFlagsQuery as vt, isRule as w, excludedColumns as wt, RulePolicyInput as x, DataExportPlan as xt, RuleOperator as y, sameTenantColumn as yt, ReadPolicy as z, SQL_MODULES as zt };
@@ -1,5 +1,5 @@
1
1
  import { wr as Preset } from "./define-block-DiW9g10_.js";
2
- import { $i as PresetCatalog, Dn as CreateDesign, Zi as BlockCatalog, ei as AppColumnConfig, mi as AppTablesConfig, na as PresetGlueItem, ni as AppColumnType, vr as ResolvedPreset } from "./context-DNwBlpKo.js";
2
+ import { Sr as ResolvedPreset, ii as AppColumnConfig, jn as CreateDesign, oa as PresetGlueItem, oi as AppColumnType, ra as PresetCatalog, ta as BlockCatalog, vi as AppTablesConfig } from "./context-BlLvUNCj.js";
3
3
  declare const BLOCK_CATALOG: BlockCatalog;
4
4
  declare const PRESET_CATALOG: PresetCatalog;
5
5
  /**
@@ -1,10 +1,10 @@
1
- import { t as VERSION } from "../cli/version-AGe2VWGm.js";
2
- import { a as lastTypesModule, c as writeAtomic, s as typesModuleKey } from "../cli/cache-DyhfGbUV.js";
3
- import { t as loadSnapshot } from "../cli/snapshot-D7h2oWfS.js";
4
- import { i as renderTypesModule, t as mapperFilePath } from "../cli/render-Hvu_ZKtr.js";
1
+ import { t as VERSION } from "../cli/version-CvNMxnwv.js";
2
+ import { a as lastTypesModule, c as writeAtomic, s as typesModuleKey } from "../cli/cache-VZU4FIOF.js";
3
+ import { t as loadSnapshot } from "../cli/snapshot-BmBrjk2b.js";
4
+ import { i as renderTypesModule, t as mapperFilePath } from "../cli/render-D8KGIoSK.js";
5
5
  import { i as discoverConfig, s as loadConfig } from "../cli/config-C-DXllAX.js";
6
6
  import { i as parseEnv, n as configEnvironment } from "../cli/env-BLwQ6srP.js";
7
- import { s as schemaStampPath } from "../cli/content-mapper-BM9asZuL.js";
7
+ import { s as schemaStampPath } from "../cli/content-mapper-5_KpJMOD.js";
8
8
  import { existsSync, realpathSync } from "node:fs";
9
9
  import { basename, dirname, join, resolve } from "node:path";
10
10
  import { createHash } from "node:crypto";
@@ -39,9 +39,9 @@ function systemOf(executor) {
39
39
  * ```
40
40
  */
41
41
  function otel(options = {}) {
42
- const tracer = options.tracer ?? trace.getTracer("better-supabase", "0.49.0");
42
+ const tracer = options.tracer ?? trace.getTracer("better-supabase", "0.50.0");
43
43
  let histogram;
44
- if (options.metrics !== false) histogram = (options.meter ?? metrics.getMeter("better-supabase", "0.49.0")).createHistogram("db.client.operation.duration", {
44
+ if (options.metrics !== false) histogram = (options.meter ?? metrics.getMeter("better-supabase", "0.50.0")).createHistogram("db.client.operation.duration", {
45
45
  unit: "s",
46
46
  description: "Duration of database client operations.",
47
47
  advice: { explicitBucketBoundaries: [
@@ -226,7 +226,7 @@ function otel(options = {}) {
226
226
  * `betterSupabase.events`. Returns a function that stops listening.
227
227
  */
228
228
  function traceAuth(betterSupabase, options = {}) {
229
- const tracer = options.tracer ?? trace.getTracer("better-supabase", "0.49.0");
229
+ const tracer = options.tracer ?? trace.getTracer("better-supabase", "0.50.0");
230
230
  const offAuth = betterSupabase.events.on("auth", (event) => {
231
231
  const span = tracer.startSpan("auth.resolve", {
232
232
  kind: SpanKind.INTERNAL,
@@ -264,7 +264,7 @@ function traceAuth(betterSupabase, options = {}) {
264
264
  * `*.denied`) set an error status. Returns a function that stops listening.
265
265
  */
266
266
  function traceBlockEvents(betterSupabase, options = {}) {
267
- const tracer = options.tracer ?? trace.getTracer("better-supabase", "0.49.0");
267
+ const tracer = options.tracer ?? trace.getTracer("better-supabase", "0.50.0");
268
268
  return betterSupabase.events.on("block", (event) => {
269
269
  const attributes = {
270
270
  ...options.attributes,
@@ -1,5 +1,5 @@
1
1
  import { Ar as PresetFramework, Cr as PRESET_TENANT_NAMES, Dr as PresetField, Er as PresetConventions, Ir as PresetValueInfo, Lr as integrationsForFramework, Mr as PresetPlatforms, Nr as PresetScope, Or as PresetFieldKey, Pr as PresetSubjectSettings, Rr as presetField, Sr as PRESET_FRAMEWORKS, Tr as PresetAccess, br as CONVENTION_FIELDS, kr as PresetFieldValue, wr as Preset, xr as DEFAULT_CONVENTIONS, zr as presetValueLabel } from "../define-block-DiW9g10_.js";
2
- import { $i as PresetCatalog, $n as presetKey, An as DesignErrorCode, Bn as designConfig, Cn as defaultPreset, Cr as resolvePreset, Dn as CreateDesign, En as CREATE_URL, Fn as DesignTooLongError, Gn as encodeDesign, Hn as designFormat, In as MAX_DESIGN_CODE_LENGTH, Ji as CORE_BLOCKS, Jn as presetAndDesignOf, Jr as APP_COLUMN_FORMATS, Kn as isDesignCode, Ln as createQuery, Mn as DesignParseError, Nn as DesignParseIssue, On as DESIGN_FILE, Pn as DesignParseResult, Qi as BlockCatalogEntry, Qn as presetInstallCommand, Rn as createUrl, Sn as PresetName, Sr as removeComposite, Tn as namedPreset, Un as designOf, Vn as designFileSource, Wn as designSchema, Xi as instancePrefix, Xn as presetArgumentOf, Yi as INSTANCE_NAME, Yn as presetApplyCommand, Zi as BlockCatalog, Zn as presetConfigSource, _n as NamedPreset, _r as ResolvedComposite, ar as PresetInput, bn as PRESET_NAMES, br as listNames, cr as presetConfig, dr as presetFromSpec, ea as PresetCatalogBlock, er as readDesignFile, fr as presetOfSpec, gn as DEFAULT_PRESET_NAME, gr as PresetIntegration, hr as PresetConflict, ir as ExpandedConfig, jn as DesignFile, kn as DESIGN_FORMAT, lr as presetOf, mr as CompositeRemoval, na as PresetGlueItem, nr as safeParseDesign, or as conventionConfig, pr as presetSpec, qn as parseDesign, rr as ConfigConventions, sr as expandPreset, ta as PresetCatalogManifest, ti as AppColumnFormat, tr as safeDesignFileSource, ur as PresetSpec, vn as PRESETS, vr as ResolvedPreset, wn as isPresetName, xn as PresetGroup, xr as presetBlockConflict, yn as PRESET_GROUPS, yr as ResolvedPresetBlock, zn as decodeDesign } from "../context-DNwBlpKo.js";
3
- import { C as diffAppTables, D as PRESET_CATALOG, E as isAppDefault, O as BLOCK_CATALOG, S as DiffOptions, T as appDefaultError, _ as glueCommand, a as blockRequires, b as DesignChange, c as installedBlocks, d as instancesOf, f as presetInstances, g as PROVIDER_COMMENT, h as withoutInstance, i as blockEntities, l as instanceBlock, m as withInstance, n as BlockInstance, o as canAddInstance, p as withEntityName, r as PresetInstance, s as entityName, t as BlockEntity, u as instanceNameProblem, v as presetBlocksSource, w as diffDesigns, x as DesignChangeKind, y as presetGlue } from "../index-D6y6ojUX.js";
4
- import { i as appReservedColumns, n as appIdentifierError, r as appNameLengthError, t as APP_NAME_MAX } from "../app-tables-D6Na4nwb.js";
2
+ import { $i as INSTANCE_NAME, $n as presetApplyCommand, An as CREATE_URL, Bn as MAX_DESIGN_CODE_LENGTH, Cn as PRESET_GROUPS, Cr as ResolvedPresetBlock, Dn as defaultPreset, Dr as resolvePreset, En as PresetName, Er as removeComposite, Fn as DesignFile, Gn as designFileSource, Hn as createUrl, In as DesignParseError, Jn as designSchema, Kn as designFormat, Ln as DesignParseIssue, Mn as DESIGN_FILE, Nn as DESIGN_FORMAT, On as isPresetName, Pn as DesignErrorCode, Qi as CORE_BLOCKS, Qn as presetAndDesignOf, Qr as APP_COLUMN_FORMATS, Rn as DesignParseResult, Sn as PRESETS, Sr as ResolvedPreset, Tn as PresetGroup, Tr as presetBlockConflict, Un as decodeDesign, Vn as createQuery, Wn as designConfig, Xn as isDesignCode, Yn as encodeDesign, Zn as parseDesign, _r as presetSpec, aa as PresetCatalogManifest, ai as AppColumnFormat, ar as safeDesignFileSource, bn as DEFAULT_PRESET_NAME, br as PresetIntegration, cr as ExpandedConfig, dr as expandPreset, ea as instancePrefix, er as presetArgumentOf, fr as presetConfig, gr as presetOfSpec, hr as presetFromSpec, ia as PresetCatalogBlock, ir as readDesignFile, jn as CreateDesign, kn as namedPreset, lr as PresetInput, mr as PresetSpec, na as BlockCatalogEntry, nr as presetInstallCommand, oa as PresetGlueItem, or as safeParseDesign, pr as presetOf, qn as designOf, ra as PresetCatalog, rr as presetKey, sr as ConfigConventions, ta as BlockCatalog, tr as presetConfigSource, ur as conventionConfig, vr as CompositeRemoval, wn as PRESET_NAMES, wr as listNames, xn as NamedPreset, xr as ResolvedComposite, yr as PresetConflict, zn as DesignTooLongError } from "../context-BlLvUNCj.js";
3
+ import { C as diffAppTables, D as PRESET_CATALOG, E as isAppDefault, O as BLOCK_CATALOG, S as DiffOptions, T as appDefaultError, _ as glueCommand, a as blockRequires, b as DesignChange, c as installedBlocks, d as instancesOf, f as presetInstances, g as PROVIDER_COMMENT, h as withoutInstance, i as blockEntities, l as instanceBlock, m as withInstance, n as BlockInstance, o as canAddInstance, p as withEntityName, r as PresetInstance, s as entityName, t as BlockEntity, u as instanceNameProblem, v as presetBlocksSource, w as diffDesigns, x as DesignChangeKind, y as presetGlue } from "../index-DxmiTJJ5.js";
4
+ import { i as appReservedColumns, n as appIdentifierError, r as appNameLengthError, t as APP_NAME_MAX } from "../app-tables-ByFny1cL.js";
5
5
  export { APP_COLUMN_FORMATS, APP_NAME_MAX, type AppColumnFormat, BLOCK_CATALOG, type BlockCatalog, type BlockCatalogEntry, type BlockEntity, type BlockInstance, CONVENTION_FIELDS, CREATE_URL, type CompositeRemoval, type ConfigConventions, type CreateDesign, DEFAULT_CONVENTIONS, DEFAULT_PRESET_NAME, DESIGN_FILE, DESIGN_FORMAT, type DesignChange, type DesignChangeKind, type DesignErrorCode, type DesignFile, DesignParseError, type DesignParseIssue, type DesignParseResult, DesignTooLongError, type DiffOptions, type ExpandedConfig, INSTANCE_NAME, MAX_DESIGN_CODE_LENGTH, type NamedPreset, PRESETS, PRESET_CATALOG, PRESET_FRAMEWORKS, PRESET_GROUPS, PRESET_NAMES, PRESET_TENANT_NAMES, PROVIDER_COMMENT, type Preset, type PresetAccess, type PresetCatalog, type PresetCatalogBlock, type PresetCatalogManifest, type PresetConflict, type PresetConventions, type PresetField, type PresetFieldKey, type PresetFieldValue, type PresetFramework, type PresetGlueItem, type PresetGroup, type PresetInput, type PresetInstance, type PresetIntegration, type PresetName, type PresetPlatforms, type PresetScope, type PresetSpec, type PresetSubjectSettings, type PresetValueInfo, type ResolvedComposite, type ResolvedPreset, type ResolvedPresetBlock, CORE_BLOCKS as SINGLE_INSTANCE_BLOCKS, appDefaultError, appIdentifierError, appNameLengthError, appReservedColumns, blockEntities, blockRequires, canAddInstance, conventionConfig, createQuery, createUrl, decodeDesign, defaultPreset, designConfig, designFileSource, designFormat, designOf, designSchema, diffAppTables, diffDesigns, encodeDesign, entityName, expandPreset, glueCommand, installedBlocks, instanceBlock, instanceNameProblem, instancePrefix, instancesOf, integrationsForFramework, isAppDefault, isDesignCode, isPresetName, listNames, namedPreset, parseDesign, presetAndDesignOf, presetApplyCommand, presetArgumentOf, presetBlockConflict, presetBlocksSource, presetConfig, presetConfigSource, presetField, presetFromSpec, presetGlue, presetInstallCommand, presetInstances, presetKey, presetOf, presetOfSpec, presetSpec, presetValueLabel, readDesignFile, removeComposite, resolvePreset, safeDesignFileSource, safeParseDesign, withEntityName, withInstance, withoutInstance };