better-supabase 0.61.0 → 0.61.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. package/dist/{api-Q23GAwx1.js → api-Dq7hOzxh.js} +1 -1
  2. package/dist/{build-CRxrX567.js → build-Ds53XOWu.js} +1 -1
  3. package/dist/cli/add-BXNrz9sN.js +1 -0
  4. package/dist/cli/{add-CN5jkEFM.js → add-BegIE-Rb.js} +2 -2
  5. package/dist/cli/{add-ucxskHiv.js → add-BufF64Hx.js} +9 -9
  6. package/dist/cli/{app-table-files-FcgTfOf9.js → app-table-files-RdOXXDCt.js} +3 -3
  7. package/dist/cli/{app-tables-DCpSNfJ3.js → app-tables-CK-U5_ZN.js} +2 -2
  8. package/dist/cli/{backfill-DVP_elK_.js → backfill-CT6yncRM.js} +1 -1
  9. package/dist/cli/bin.js +1 -1
  10. package/dist/cli/{blocks-CFKjKW4s.js → blocks-CVadF4-D.js} +1 -1
  11. package/dist/cli/{blocks-iSEepN2Y.js → blocks-Q7wC6dj7.js} +1 -1
  12. package/dist/cli/{cache-CNa3fjK-.js → cache-BKwYvrrJ.js} +1 -1
  13. package/dist/cli/{codemod-DH-VSZps.js → codemod-BzEKQMSK.js} +4 -4
  14. package/dist/cli/{codemod-naming-CuQ0ltfE.js → codemod-naming-BpWNTsvf.js} +1 -1
  15. package/dist/cli/{column-renames-CtcG8MR5.js → column-renames-7IG0Gcf3.js} +2 -2
  16. package/dist/cli/{content-mapper-TATvvrmb.js → content-mapper-BUWZw8Yr.js} +1 -1
  17. package/dist/cli/{dev-BDv1efAy.js → dev-BRQUcr0M.js} +3 -3
  18. package/dist/cli/{doctor-CkO1yd7F.js → doctor-auNf55mF.js} +37 -20
  19. package/dist/cli/{emit-OhupwGNp.js → emit-CxD5qNz7.js} +2 -2
  20. package/dist/cli/{gen-1lVJoeH1.js → gen-B8K-GHgH.js} +3 -3
  21. package/dist/cli/{gen-tasks-BgxoXxuF.js → gen-tasks-oTH8W-xH.js} +9 -9
  22. package/dist/cli/index.d.ts +1 -1
  23. package/dist/cli/index.js +7 -7
  24. package/dist/cli/{init-Defy7VJ0.js → init-lNqq_JHu.js} +8 -8
  25. package/dist/cli/{live-DmvnAvGV.js → live-Dbt0gFSL.js} +2 -2
  26. package/dist/cli/{mcp-BGKeD-lo.js → mcp-Bs3746MS.js} +2 -2
  27. package/dist/cli/{memo-backend-3u-X51UO.js → memo-backend-BAduTvxg.js} +1 -1
  28. package/dist/cli/{metadata-D0UazHyQ.js → metadata-IpEhOh60.js} +4 -4
  29. package/dist/cli/{migrate-PshyB8a6.js → migrate-CaEzxtNU.js} +1 -1
  30. package/dist/cli/{migration-safety-DYgRA8-5.js → migration-safety-B473uP9G.js} +1 -1
  31. package/dist/cli/{module-migration-CRsIlrig.js → module-migration-BMmyFP2c.js} +1 -1
  32. package/dist/cli/{partition-ht8zldUV.js → partition-C9ta6Kld.js} +1 -1
  33. package/dist/cli/powersync-BLXxgdbk.js +1 -0
  34. package/dist/cli/{powersync-r6iL7zEo.js → powersync-DNUSeMtj.js} +3 -3
  35. package/dist/cli/{print-Ca78W5ZF.js → print-84kAnn1u.js} +2 -2
  36. package/dist/cli/{providers-DhMSptuy.js → providers-BgyVs06M.js} +1 -1
  37. package/dist/cli/{prune-workflows-DyZx-veL.js → prune-workflows-D96eYjdj.js} +1 -1
  38. package/dist/cli/{remove-37g_SvZW.js → remove-Y62Mu1VK.js} +6 -6
  39. package/dist/cli/{render-Bfh2EtMO.js → render-Div4K_TT.js} +4 -4
  40. package/dist/cli/{render-cache-BYkVt264.js → render-cache-CHTWh5Rl.js} +1 -1
  41. package/dist/cli/{run-CfWFddfH.js → run-BkbVZBeG.js} +7 -7
  42. package/dist/cli/{run-DEPt1rAn.js → run-Dx-CrkU_.js} +30 -30
  43. package/dist/cli/{shared-BrAtQXmC.js → shared-B0zV1qW9.js} +1 -1
  44. package/dist/cli/{source-Bt6UAek-.js → source-So9SSLFc.js} +1 -1
  45. package/dist/cli/{spec-DsNayDt2.js → spec-BA3jaJaL.js} +2 -2
  46. package/dist/cli/{spec-BJreyth3.js → spec-BiLpXtjI.js} +1 -1
  47. package/dist/cli/{sql-layout-Bt7NcWXk.js → sql-layout-BH9MeAY3.js} +2 -2
  48. package/dist/cli/{squash-DmbB7Gx9.js → squash-CZJcKsks.js} +1 -1
  49. package/dist/cli/{sync-DFAkNjw_.js → sync-Csq5olpt.js} +4 -4
  50. package/dist/cli/{upgrade-DP-30QID.js → upgrade-DBE7LYrq.js} +5 -5
  51. package/dist/cli/{upgrade-D8GOjXrv.js → upgrade-MfDU8Z5K.js} +5 -5
  52. package/dist/cli/{version-CHVFvh95.js → version-ljacjTnk.js} +1 -1
  53. package/dist/create/lite/index.js +1 -1
  54. package/dist/generators/factories/index.js +1 -1
  55. package/dist/generators/json-schema/index.js +1 -1
  56. package/dist/generators/nuqs/index.js +1 -1
  57. package/dist/generators/standard-schema/index.js +1 -1
  58. package/dist/generators/valibot/index.js +1 -1
  59. package/dist/generators/zod/index.js +1 -1
  60. package/dist/{json-schema-CU9Mg-_d.js → json-schema-CChz-Csz.js} +1 -1
  61. package/dist/mapper/bin.js +5 -5
  62. package/dist/mcp/index.js +1 -1
  63. package/dist/{mcp-CULIbS-b.js → mcp-B4bvacl4.js} +1 -1
  64. package/dist/otel/index.js +5 -5
  65. package/dist/spec/index.js +2 -2
  66. package/dist/testing/index.js +1 -1
  67. package/dist/{version-B0uw5rOF.js → version-BFYCXhul.js} +1 -1
  68. package/dist/webmcp/index.js +1 -1
  69. package/package.json +1 -1
  70. package/dist/cli/add-fra98UnY.js +0 -1
  71. package/dist/cli/powersync-BztAuUyy.js +0 -1
@@ -1,6 +1,6 @@
1
1
  import { r as isPlainObject } from "./clone-H_gCsL29.js";
2
2
  import { t as SPEC_PINS } from "./spec-pins-Dlz8OVqi.js";
3
- import { d as mergeJson, f as pointerToken, n as publishedResources, o as publishedBlocks, t as defineApiModel, u as pascal } from "./build-CRxrX567.js";
3
+ import { d as mergeJson, f as pointerToken, n as publishedResources, o as publishedBlocks, t as defineApiModel, u as pascal } from "./build-Ds53XOWu.js";
4
4
  // src/spec/format.ts
5
5
  /**
6
6
  * Identity helper that fixes `apiVersion` and checks that the default version
@@ -1,7 +1,7 @@
1
1
  import { r as isPlainObject } from "./clone-H_gCsL29.js";
2
2
  import { t as instanceProperty } from "./instance-property-BlH7QSDl.js";
3
3
  import { s as problemType, t as PROBLEM_CONTENT_TYPE } from "./problem-BwplIuhI.js";
4
- import { n as toJsonSchema } from "./json-schema-CU9Mg-_d.js";
4
+ import { n as toJsonSchema } from "./json-schema-CChz-Csz.js";
5
5
  import { n as pageQuery, r as pageSchema } from "./resource-schemas-Bq0g2RCQ.js";
6
6
  import { r as planResource } from "./resource-DQ4kIBpa.js";
7
7
  import { n as isRecord } from "./guards-CsRa6v57.js";
@@ -0,0 +1 @@
1
+ export { t as addCommand } from "./add-BufF64Hx.js";
@@ -3,8 +3,8 @@ import { n as CliError } from "./errors-B7i-VGxk.js";
3
3
  import { r as applyPlan } from "./files-NnXnawki.js";
4
4
  import { t as codeRanges } from "./code-ranges-uTOKmIXC.js";
5
5
  import { t as isRecord } from "./guards-DxwRG0Uv.js";
6
- import { i as providerOwnsMemberships, r as layoutFor, t as MEMBERSHIP_CLAIM_MODULES } from "./providers-DhMSptuy.js";
7
- import { a as write, i as unlistedModuleFiles, r as nextStep } from "./sync-DFAkNjw_.js";
6
+ import { i as providerOwnsMemberships, r as layoutFor, t as MEMBERSHIP_CLAIM_MODULES } from "./providers-BgyVs06M.js";
7
+ import { a as write, i as unlistedModuleFiles, r as nextStep } from "./sync-Csq5olpt.js";
8
8
  import { basename, dirname } from "node:path";
9
9
  import { readFile } from "node:fs/promises";
10
10
  import { SQL_MODULES, resolveBlocks } from "better-supabase/sql";
@@ -2,18 +2,18 @@ import { c as parseNames, n as CliError } from "./errors-B7i-VGxk.js";
2
2
  import { a as list, m as commandMeta, r as defineCliCommand } from "./command-fqvJ0TdG.js";
3
3
  import { i as changeLines, n as PLAN_ARGS, r as applyPlan, u as planResult } from "./files-NnXnawki.js";
4
4
  import { r as readIfExists, t as display } from "./io-CngfGyMA.js";
5
- import { a as wiringFiles, d as libEntry, f as needsLib, i as wiringChecklist, l as importFrom, n as latestMigrationVersion, o as wiringFor, p as resolveIntegrations, s as TEMPLATES, u as isIntegration } from "./migration-safety-DYgRA8-5.js";
6
- import { t as VERSION } from "./version-CHVFvh95.js";
5
+ import { a as wiringFiles, d as libEntry, f as needsLib, i as wiringChecklist, l as importFrom, n as latestMigrationVersion, o as wiringFor, p as resolveIntegrations, s as TEMPLATES, u as isIntegration } from "./migration-safety-B473uP9G.js";
6
+ import { t as VERSION } from "./version-ljacjTnk.js";
7
7
  import { n as installCommand, t as detectProject } from "./detect-CHR-SAmE.js";
8
- import { a as addBlocksToWiring, d as setBlockInConfig, f as setBlockInJson, g as setPresetInJson, h as setPresetInConfig, i as addBlocksToJson, m as setPathInJson, p as setPathInConfig, r as addBlocksToConfig, t as addModules } from "./add-CN5jkEFM.js";
9
- import { o as dataMigration, t as syncModules } from "./sync-DFAkNjw_.js";
10
- import { n as adoptionContext } from "./app-tables-DCpSNfJ3.js";
11
- import { a as toCatalog } from "./source-Bt6UAek-.js";
8
+ import { a as addBlocksToWiring, d as setBlockInConfig, f as setBlockInJson, g as setPresetInJson, h as setPresetInConfig, i as addBlocksToJson, m as setPathInJson, p as setPathInConfig, r as addBlocksToConfig, t as addModules } from "./add-BegIE-Rb.js";
9
+ import { o as dataMigration, t as syncModules } from "./sync-Csq5olpt.js";
10
+ import { n as adoptionContext } from "./app-tables-CK-U5_ZN.js";
11
+ import { a as toCatalog } from "./source-So9SSLFc.js";
12
12
  import { i as plain } from "./style-B5-nByxb.js";
13
- import { d as loadSnapshot } from "./sql-layout-Bt7NcWXk.js";
13
+ import { d as loadSnapshot } from "./sql-layout-BH9MeAY3.js";
14
14
  import { a as findConfig, h as INTEGRATIONS, s as loadConfig } from "./config-DX58lDf7.js";
15
- import { t as appTablePlan } from "./app-table-files-FcgTfOf9.js";
16
- import { t as blockNames } from "./blocks-iSEepN2Y.js";
15
+ import { t as appTablePlan } from "./app-table-files-RdOXXDCt.js";
16
+ import { t as blockNames } from "./blocks-Q7wC6dj7.js";
17
17
  import { i as sourceArgs, n as SOURCE_ARGS } from "./source-args-D5BSEgUG.js";
18
18
  import { existsSync } from "node:fs";
19
19
  import { dirname, join, posix, resolve } from "node:path";
@@ -1,8 +1,8 @@
1
1
  import { n as CliError } from "./errors-B7i-VGxk.js";
2
2
  import { d as readSupabaseToml, n as declarativeSchemasDir } from "./supabase-toml-B6-eEV5p.js";
3
- import { r as literal } from "./live-DmvnAvGV.js";
4
- import { r as layoutFor } from "./providers-DhMSptuy.js";
5
- import { n as renderBlocksCached } from "./render-cache-BYkVt264.js";
3
+ import { r as literal } from "./live-Dbt0gFSL.js";
4
+ import { r as layoutFor } from "./providers-BgyVs06M.js";
5
+ import { n as renderBlocksCached } from "./render-cache-CHTWh5Rl.js";
6
6
  import { f as subjectTagArgs } from "./config-DX58lDf7.js";
7
7
  import { join, resolve, sep } from "node:path";
8
8
  import { APP_TABLES_MODULE, setTableFeature } from "better-supabase/sql";
@@ -1,6 +1,6 @@
1
1
  import { t as accessProviderMode } from "./authorization-CNWhpdKb.js";
2
- import { u as writtenByBlocks } from "./sql-layout-Bt7NcWXk.js";
3
- import { c as qualified, t as catalogOf } from "./shared-BrAtQXmC.js";
2
+ import { u as writtenByBlocks } from "./sql-layout-BH9MeAY3.js";
3
+ import { c as qualified, t as catalogOf } from "./shared-B0zV1qW9.js";
4
4
  import { declaredTables, resolveBlocks } from "better-supabase/sql";
5
5
  // src/cli/doctor/app-tables.ts
6
6
  /**
@@ -3,7 +3,7 @@ import { i as isLocalDatabaseUrl, r as databaseHost } from "./agent-BlYLJPzM.js"
3
3
  import { m as commandMeta, r as defineCliCommand } from "./command-fqvJ0TdG.js";
4
4
  import { n as CliError, r as errorText } from "./errors-B7i-VGxk.js";
5
5
  import { t as connect } from "./db-B_xr3ZvK.js";
6
- import { n as ident } from "./live-DmvnAvGV.js";
6
+ import { n as ident } from "./live-Dbt0gFSL.js";
7
7
  import { r as STACK_ARG, t as DB_URL_STDIN_ARG } from "./source-args-D5BSEgUG.js";
8
8
  // src/cli/commands/backfill.ts
9
9
  const DEFAULT_BATCH = 1e3;
package/dist/cli/bin.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { i as run } from "./run-DEPt1rAn.js";
2
+ import { i as run } from "./run-Dx-CrkU_.js";
3
3
  import { t as colorEnabled } from "./style-B5-nByxb.js";
4
4
  import { existsSync } from "node:fs";
5
5
  import { basename } from "node:path";
@@ -1 +1 @@
1
- export { n as blocksListCommand, r as blocksSearchCommand, i as blocksViewCommand } from "./blocks-iSEepN2Y.js";
1
+ export { n as blocksListCommand, r as blocksSearchCommand, i as blocksViewCommand } from "./blocks-Q7wC6dj7.js";
@@ -1,7 +1,7 @@
1
1
  import { m as commandMeta, r as defineCliCommand } from "./command-fqvJ0TdG.js";
2
2
  import { n as CliError } from "./errors-B7i-VGxk.js";
3
3
  import { t as SQL_ARGS } from "./args-CS_64_tg.js";
4
- import { n as listModules, t as printModule } from "./print-Ca78W5ZF.js";
4
+ import { n as listModules, t as printModule } from "./print-84kAnn1u.js";
5
5
  import { t as decodePresetInput } from "./preset-CWfLlmTO.js";
6
6
  import { SQL_MODULES } from "better-supabase/sql";
7
7
  import { PRESET_CATALOG, PRESET_NAMES, glueCommand } from "better-supabase/preset";
@@ -1,5 +1,5 @@
1
1
  import { t as CACHE_DIR } from "./store-DP-nmqBt.js";
2
- import { t as VERSION } from "./version-CHVFvh95.js";
2
+ import { t as VERSION } from "./version-ljacjTnk.js";
3
3
  import { dirname, resolve } from "node:path";
4
4
  import { mkdir, readFile, rename, rm, writeFile } from "node:fs/promises";
5
5
  import { createHash } from "node:crypto";
@@ -1,10 +1,10 @@
1
1
  import { t as codeRanges } from "./code-ranges-uTOKmIXC.js";
2
- import { i as pinReview, n as namingCodemod, o as configCodemod, r as columnPins, t as NAMING_RENAMES } from "./codemod-naming-CuQ0ltfE.js";
2
+ import { i as pinReview, n as namingCodemod, o as configCodemod, r as columnPins, t as NAMING_RENAMES } from "./codemod-naming-BpWNTsvf.js";
3
3
  import { n as CliError } from "./errors-B7i-VGxk.js";
4
- import { r as layoutFor } from "./providers-DhMSptuy.js";
5
- import { c as snapshotColumnTypes, i as migrationsDir, o as ownLayout, u as writtenByBlocks } from "./sql-layout-Bt7NcWXk.js";
4
+ import { r as layoutFor } from "./providers-BgyVs06M.js";
5
+ import { c as snapshotColumnTypes, i as migrationsDir, o as ownLayout, u as writtenByBlocks } from "./sql-layout-BH9MeAY3.js";
6
6
  import { r as arrayEntries, t as PROMISE_ALL } from "./round-trips-BHfeIu6I.js";
7
- import { l as schemaModulePath } from "./emit-OhupwGNp.js";
7
+ import { l as schemaModulePath } from "./emit-CxD5qNz7.js";
8
8
  import { n as databaseUrl, s as loadConfig } from "./config-DX58lDf7.js";
9
9
  import { m as commandMeta, r as defineCliCommand } from "./command-fqvJ0TdG.js";
10
10
  import { a as changedFiles, i as changeLines, r as applyPlan, u as planResult } from "./files-NnXnawki.js";
@@ -1,5 +1,5 @@
1
1
  import { t as codeRanges } from "./code-ranges-uTOKmIXC.js";
2
- import { o as ownLayout } from "./sql-layout-Bt7NcWXk.js";
2
+ import { o as ownLayout } from "./sql-layout-BH9MeAY3.js";
3
3
  import { t as isRecord } from "./guards-DxwRG0Uv.js";
4
4
  import { LEGACY_OPTION, SQL_MODULES, bsbPolicyName, moduleContext, readPolicies, redundantNulls } from "better-supabase/sql";
5
5
  // src/cli/codemod-config.ts
@@ -1,5 +1,5 @@
1
- import { t as NAMING_RENAMES } from "./codemod-naming-CuQ0ltfE.js";
2
- import { u as writtenByBlocks } from "./sql-layout-Bt7NcWXk.js";
1
+ import { t as NAMING_RENAMES } from "./codemod-naming-BpWNTsvf.js";
2
+ import { u as writtenByBlocks } from "./sql-layout-BH9MeAY3.js";
3
3
  import { SQL_MODULES } from "better-supabase/sql";
4
4
  // src/cli/doctor/column-renames.ts
5
5
  const ADD_COLUMN = /\balter\s+table\s+(?:if\s+exists\s+)?(?:only\s+)?((?:"?[\w$]+"?\s*\.\s*)?"?[\w$]+"?)\s+add\s+column\s+if\s+not\s+exists\s+("?[\w$]+"?)/gi;
@@ -1,7 +1,7 @@
1
1
  import { t as i } from "./jsonc-Dyww6wHM.js";
2
2
  import { r as readIfExists } from "./io-CngfGyMA.js";
3
3
  import { t as CACHE_DIR } from "./store-DP-nmqBt.js";
4
- import { H as installedVersion } from "./sql-layout-Bt7NcWXk.js";
4
+ import { H as installedVersion } from "./sql-layout-BH9MeAY3.js";
5
5
  import { resolve } from "node:path";
6
6
  import { createHash } from "node:crypto";
7
7
  // src/cli/content-mapper.ts
@@ -1,9 +1,9 @@
1
1
  import { a as list, m as commandMeta, r as defineCliCommand } from "./command-fqvJ0TdG.js";
2
2
  import { n as CliError } from "./errors-B7i-VGxk.js";
3
3
  import { m as GEN_TASKS } from "./config-DX58lDf7.js";
4
- import { c as stampFiles, l as watchLoop, o as fileWaker, s as parseInterval } from "./spec-DsNayDt2.js";
5
- import { a as stepInputs, i as selectTasks, n as runTasks, r as parseTasks, t as poll } from "./gen-tasks-BgxoXxuF.js";
6
- import { g as snapshotFile, p as openSource } from "./sql-layout-Bt7NcWXk.js";
4
+ import { c as stampFiles, l as watchLoop, o as fileWaker, s as parseInterval } from "./spec-BA3jaJaL.js";
5
+ import { a as stepInputs, i as selectTasks, n as runTasks, r as parseTasks, t as poll } from "./gen-tasks-oTH8W-xH.js";
6
+ import { g as snapshotFile, p as openSource } from "./sql-layout-BH9MeAY3.js";
7
7
  import { i as sourceArgs, n as SOURCE_ARGS } from "./source-args-D5BSEgUG.js";
8
8
  import { dirname, resolve } from "node:path";
9
9
  import { readdir } from "node:fs/promises";
@@ -1,5 +1,5 @@
1
1
  import { d as subjectFromTag, l as stdinDatabaseUrl, n as databaseUrl, u as withTableTags } from "./config-DX58lDf7.js";
2
- import { a as hasContentMapper, c as supportsContentMappers, i as contentMapperSetup$1, n as TSCONFIG_SNIPPET, o as needsRunExternalCode, t as RUN_EXTERNAL_CODE } from "./content-mapper-TATvvrmb.js";
2
+ import { a as hasContentMapper, c as supportsContentMappers, i as contentMapperSetup$1, n as TSCONFIG_SNIPPET, o as needsRunExternalCode, t as RUN_EXTERNAL_CODE } from "./content-mapper-BUWZw8Yr.js";
3
3
  import { i as isLocalDatabaseUrl, r as databaseHost } from "./agent-BlYLJPzM.js";
4
4
  import { a as list, m as commandMeta, r as defineCliCommand } from "./command-fqvJ0TdG.js";
5
5
  import { n as CliError, r as errorText } from "./errors-B7i-VGxk.js";
@@ -7,35 +7,35 @@ import { c as insideRoot, i as changeLines, r as applyPlan } from "./files-NnXna
7
7
  import { a as sameText, t as display } from "./io-CngfGyMA.js";
8
8
  import { t as connect } from "./db-B_xr3ZvK.js";
9
9
  import { t as byCodePoint } from "./compare-yl4sSwVn.js";
10
- import { C as dataFiles, D as sourceFiles, E as seedFiles, H as installedVersion, O as sqlFiles, S as ENV_FILES, T as readText, U as peerVersions, W as satisfies, _ as liteDriverOf, a as moduleLayoutFor, d as loadSnapshot, f as managementTarget, g as snapshotFile, i as migrationsDir, j as MetadataRejectedError, p as openSource, r as blockDeclaredTables, u as writtenByBlocks, v as isSqliteLiteDriver, w as functionFiles } from "./sql-layout-Bt7NcWXk.js";
11
- import { i as request } from "./source-Bt6UAek-.js";
10
+ import { C as dataFiles, D as sourceFiles, E as seedFiles, H as installedVersion, O as sqlFiles, S as ENV_FILES, T as readText, U as peerVersions, W as satisfies, _ as liteDriverOf, a as moduleLayoutFor, d as loadSnapshot, f as managementTarget, g as snapshotFile, i as migrationsDir, j as MetadataRejectedError, p as openSource, r as blockDeclaredTables, u as writtenByBlocks, v as isSqliteLiteDriver, w as functionFiles } from "./sql-layout-BH9MeAY3.js";
11
+ import { i as request } from "./source-So9SSLFc.js";
12
12
  import { a as findRepoRoot, c as httpHooks, d as readSupabaseToml, h as tomlGet, i as diffEngine, l as migrationCommand, n as declarativeSchemasDir, p as sqlWorkflow, u as pgFunctionHooks } from "./supabase-toml-B6-eEV5p.js";
13
13
  import { r as supabaseCli } from "./exec-DBgtTCHK.js";
14
14
  import { t as CACHE_DIR } from "./store-DP-nmqBt.js";
15
- import { _ as BLOCK_PREFIX, a as METADATA_GAPS_TEXT, b as splinterTables, c as entitlementsModule, d as appliesTo, f as escape$7, g as withoutStrings, h as policyHelpers, l as COMMANDS$2, m as functionObject, p as functionBody, s as AUTHORIZATION_RULES, u as RLS_RULES, v as blockTargets, y as advisorRule } from "./run-CfWFddfH.js";
16
- import { r as renderFiles } from "./render-Bfh2EtMO.js";
17
- import { l as schemaModulePath, m as configFor, p as notNullTag } from "./emit-OhupwGNp.js";
15
+ import { _ as BLOCK_PREFIX, a as METADATA_GAPS_TEXT, b as splinterTables, c as entitlementsModule, d as appliesTo, f as escape$7, g as withoutStrings, h as policyHelpers, l as COMMANDS$2, m as functionObject, p as functionBody, s as AUTHORIZATION_RULES, u as RLS_RULES, v as blockTargets, y as advisorRule } from "./run-BkbVZBeG.js";
16
+ import { r as renderFiles } from "./render-Div4K_TT.js";
17
+ import { l as schemaModulePath, m as configFor, p as notNullTag } from "./emit-CxD5qNz7.js";
18
18
  import { t as orphanedBlockFiles } from "./orphans-ByB0gKOp.js";
19
- import { a as renameArguments, s as tenantEntries, t as NAMING_RENAMES } from "./codemod-naming-CuQ0ltfE.js";
19
+ import { a as renameArguments, s as tenantEntries, t as NAMING_RENAMES } from "./codemod-naming-BpWNTsvf.js";
20
20
  import { t as isRecord$1 } from "./guards-DxwRG0Uv.js";
21
- import { i as appViewsOf, n as adoptionContext, r as appTablesOf, t as accessModule } from "./app-tables-DCpSNfJ3.js";
22
- import { i as migrationHolds, o as migrationModules, r as latestMigration, t as MODULES_SUFFIX } from "./module-migration-CRsIlrig.js";
23
- import { n as renderBlocksCached } from "./render-cache-BYkVt264.js";
24
- import { a as lineOf, c as qualified, i as exposedSchemas, l as tableObject, n as deniesAll, o as permissionCatalogKeys, r as exposed, s as policyObject, t as catalogOf, u as workflowOf } from "./shared-BrAtQXmC.js";
25
- import { n as staleRenameKeys, t as shadowedBlockColumns } from "./column-renames-CtcG8MR5.js";
26
- import { a as reservedRoles, i as statementsView, n as ident$1, r as literal$1, t as LIVE_RULES } from "./live-DmvnAvGV.js";
21
+ import { i as appViewsOf, n as adoptionContext, r as appTablesOf, t as accessModule } from "./app-tables-CK-U5_ZN.js";
22
+ import { i as migrationHolds, o as migrationModules, r as latestMigration, t as MODULES_SUFFIX } from "./module-migration-BMmyFP2c.js";
23
+ import { n as renderBlocksCached } from "./render-cache-CHTWh5Rl.js";
24
+ import { a as lineOf, c as qualified, i as exposedSchemas, l as tableObject, n as deniesAll, o as permissionCatalogKeys, r as exposed, s as policyObject, t as catalogOf, u as workflowOf } from "./shared-B0zV1qW9.js";
25
+ import { n as staleRenameKeys, t as shadowedBlockColumns } from "./column-renames-7IG0Gcf3.js";
26
+ import { a as reservedRoles, i as statementsView, n as ident$1, r as literal$1, t as LIVE_RULES } from "./live-Dbt0gFSL.js";
27
27
  import { t as projectionsOf } from "./projection-DlVB5YL-.js";
28
28
  import { s as providerLabel } from "./authorization-CNWhpdKb.js";
29
- import { t as VERSION$1 } from "./version-CHVFvh95.js";
29
+ import { t as VERSION$1 } from "./version-ljacjTnk.js";
30
30
  import { t as PROCESS_ENV } from "./env-CQ831uY0.js";
31
31
  import { a as stackEnvValues, i as redactValue, o as staleVariables, t as PREFIX_NAMES } from "./stack-env-CtkfVXsR.js";
32
32
  import { n as readStackStatus } from "./stack-status-rNPCacin.js";
33
- import { o as wiringFor, r as configInstances, t as MIGRATION_SAFETY_RULES } from "./migration-safety-DYgRA8-5.js";
33
+ import { o as wiringFor, r as configInstances, t as MIGRATION_SAFETY_RULES } from "./migration-safety-B473uP9G.js";
34
34
  import { a as OPEN, c as functionsIn, i as CLOSE, l as statementEnd, n as ROUND_TRIP_RULES, o as closeOf, s as codeOnly, u as targetKeys } from "./round-trips-BHfeIu6I.js";
35
35
  import { n as PLATFORM_SCHEMAS } from "./in-stack-diff-3e1LT1bn.js";
36
36
  import { a as readSharedMemory, n as listStacks, t as branchName } from "./stacks-Eu6d45F8.js";
37
37
  import { i as plain$2 } from "./style-B5-nByxb.js";
38
- import { i as refuseWithMetadata, r as readMetadataSnapshot } from "./metadata-D0UazHyQ.js";
38
+ import { i as refuseWithMetadata, r as readMetadataSnapshot } from "./metadata-IpEhOh60.js";
39
39
  import { t as compiledReadSets } from "./read-sets-77o7SxpK.js";
40
40
  import { a as sourceFlags, n as SOURCE_ARGS } from "./source-args-D5BSEgUG.js";
41
41
  import { existsSync } from "node:fs";
@@ -5871,9 +5871,25 @@ const appSqlTexts = (context) => sqlTexts(context).filter((file) => !file.path.i
5871
5871
  * Whether a policy expression calls `schema.name` outside a `(select ...)`, the
5872
5872
  * form Postgres prints for an InitPlan.
5873
5873
  */
5874
- function callsPerRow(expression, name) {
5875
- return new RegExp(String.raw`(?<![\w.])(?<!select\s+)(?:"?\w+"?\.)?"?${escape$3(name)}"?\s*\(`, "gi").test(expression);
5874
+ function callsPerRow(expression, name, columns) {
5875
+ const call = new RegExp(String.raw`(?<![\w.])(?<!select\s+)(?:"?\w+"?\.)?"?${escape$3(name)}"?\s*\(`, "gi");
5876
+ return [...expression.matchAll(call)].some((match) => !/\b(?:from|join)\s+$/i.test(expression.slice(0, match.index)) || readsRow(argumentsAt(expression, match.index + match[0].length), columns));
5876
5877
  }
5878
+ function argumentsAt(expression, start) {
5879
+ let depth = 1;
5880
+ let quoted = false;
5881
+ let text = "";
5882
+ for (let at = start; at < expression.length && depth > 0; at += 1) {
5883
+ const char = expression.charAt(at);
5884
+ if (char === "'") quoted = !quoted;
5885
+ else if (!quoted) {
5886
+ depth += char === "(" ? 1 : char === ")" ? -1 : 0;
5887
+ text += depth > 0 ? char : "";
5888
+ }
5889
+ }
5890
+ return text;
5891
+ }
5892
+ const readsRow = (args, columns) => args.replaceAll(/::\s*"?\w+"?/g, "").split(/\W+/).some((word) => columns.has(word.toLowerCase()));
5877
5893
  /** The body of the first `create function` of `name` among the SQL files. */
5878
5894
  function functionSource(files, name) {
5879
5895
  const pattern = new RegExp(String.raw`^create\s+(?:or\s+replace\s+)?function\s+(?:"?\w+"?\.)?"?${escape$3(name)}"?\s*\(`, "i");
@@ -5952,18 +5968,19 @@ const SCALE_RULES = [
5952
5968
  code: "BS386",
5953
5969
  severity: "warning",
5954
5970
  title: "A policy calls a volatile or PL/pgSQL function per row",
5955
- description: "A policy that calls a volatile function, or one written in PL/pgSQL, outside `(select ...)` runs it once for every row the statement reads, and a volatile function can't be hoisted or folded. A 100,000 row list then costs 100,000 calls. Wrap the call in `(select fn(...))` so Postgres evaluates it once per statement, or replace a per-row check with a set helper such as `tenant_id in (select tenant_ids_with('key'))`. A helper that is called inside `(select ...)` is accepted even when it is volatile. Policies named `bsb_*` belong to a block module and are left to `upgrade`.",
5971
+ description: "A policy that calls a volatile function, or one written in PL/pgSQL, outside `(select ...)` runs it once for every row the statement reads, and a volatile function can't be hoisted or folded. A 100,000 row list then costs 100,000 calls. Wrap the call in `(select fn(...))` so Postgres evaluates it once per statement, or replace a per-row check with a set helper such as `tenant_id in (select tenant_ids_with('key'))`. A helper that is called inside `(select ...)` is accepted even when it is volatile, and so is a set helper in the `from` of a subquery whose arguments read no column of the row, such as `id in (select t.id from thread_ids('key') as t(id))`, because Postgres calls it once and rescans its result. Policies named `bsb_*` belong to a block module and are left to `upgrade`.",
5956
5972
  check(context) {
5957
5973
  const catalog = catalogOf(context);
5958
5974
  const functions = context.snapshot.extras.functions ?? [];
5959
5975
  return catalog.tables.flatMap((table) => table.policies.flatMap((policy) => {
5960
5976
  if (policy.name.startsWith("bsb_")) return [];
5961
5977
  const expressions = [policy.using, policy.check].filter((text) => text !== null);
5978
+ const columns = new Set(table.columns.map((column) => column.name.toLowerCase()));
5962
5979
  return (policy.functions ?? []).flatMap((called) => {
5963
5980
  const schema = called.slice(0, called.indexOf("."));
5964
5981
  const name = lastPart(called);
5965
5982
  if (SYSTEM_SCHEMAS.has(schema)) return [];
5966
- if (!functions.filter((candidate) => candidate.schema === schema && candidate.name === name).some((candidate) => candidate.volatility === "volatile" || candidate.language === "plpgsql") || !expressions.some((text) => callsPerRow(text, name))) return [];
5983
+ if (!functions.filter((candidate) => candidate.schema === schema && candidate.name === name).some((candidate) => candidate.volatility === "volatile" || candidate.language === "plpgsql") || !expressions.some((text) => callsPerRow(text, name, columns))) return [];
5967
5984
  return [{
5968
5985
  message: `${qualified(table)}: the policy ${policy.name} calls ${called}() once per row. Write (select ${called}(...)) so it runs once per statement, or use a set helper.`,
5969
5986
  target: `${qualified(table)}:${policy.name}`,
@@ -2,8 +2,8 @@ import { t as byCodePoint } from "./compare-yl4sSwVn.js";
2
2
  import { r as claimMarkerOverrides } from "./authorization-CNWhpdKb.js";
3
3
  import { n as CliError } from "./errors-B7i-VGxk.js";
4
4
  import { t as isRecord } from "./guards-DxwRG0Uv.js";
5
- import { a as toCatalog } from "./source-Bt6UAek-.js";
6
- import { F as restrictSchemas, R as tsTypeOf, b as bootstrapTables } from "./sql-layout-Bt7NcWXk.js";
5
+ import { a as toCatalog } from "./source-So9SSLFc.js";
6
+ import { F as restrictSchemas, R as tsTypeOf, b as bootstrapTables } from "./sql-layout-BH9MeAY3.js";
7
7
  import { resolveBlock, resolveProviderSql } from "better-supabase/sql";
8
8
  import { DEFAULT_CLAIMS, tenantClaimPaths } from "better-supabase/config";
9
9
  import { toCamel } from "better-supabase";
@@ -1,10 +1,10 @@
1
1
  import { a as list, m as commandMeta, r as defineCliCommand } from "./command-fqvJ0TdG.js";
2
2
  import { n as CliError } from "./errors-B7i-VGxk.js";
3
- import { a as runMetadataGen, n as checkMetadataFlags, t as EMITS } from "./metadata-D0UazHyQ.js";
3
+ import { a as runMetadataGen, n as checkMetadataFlags, t as EMITS } from "./metadata-IpEhOh60.js";
4
4
  import { m as GEN_TASKS } from "./config-DX58lDf7.js";
5
- import { i as selectTasks, n as runTasks, r as parseTasks } from "./gen-tasks-BgxoXxuF.js";
5
+ import { i as selectTasks, n as runTasks, r as parseTasks } from "./gen-tasks-oTH8W-xH.js";
6
6
  import { c as insideRoot, r as applyPlan, u as planResult } from "./files-NnXnawki.js";
7
- import { F as restrictSchemas, I as serializeGenerator, d as loadSnapshot, h as serializeSnapshot } from "./sql-layout-Bt7NcWXk.js";
7
+ import { F as restrictSchemas, I as serializeGenerator, d as loadSnapshot, h as serializeSnapshot } from "./sql-layout-BH9MeAY3.js";
8
8
  import { a as sourceFlags, i as sourceArgs, n as SOURCE_ARGS } from "./source-args-D5BSEgUG.js";
9
9
  // src/cli/commands/save-snapshot.ts
10
10
  /** The flags `gen --save-snapshot` reads. */
@@ -1,17 +1,17 @@
1
1
  import { c as parseNames, i as failedResult, n as CliError } from "./errors-B7i-VGxk.js";
2
- import { n as runGen } from "./run-CfWFddfH.js";
3
- import { l as catalogFingerprint } from "./cache-CNa3fjK-.js";
2
+ import { n as runGen } from "./run-BkbVZBeG.js";
3
+ import { l as catalogFingerprint } from "./cache-BKwYvrrJ.js";
4
4
  import { i as plain } from "./style-B5-nByxb.js";
5
5
  import { g as isGenTask, m as GEN_TASKS } from "./config-DX58lDf7.js";
6
6
  import { i as runEnv } from "./env-DtJNOdyD.js";
7
- import { n as runPowerSync } from "./powersync-r6iL7zEo.js";
7
+ import { n as runPowerSync } from "./powersync-DNUSeMtj.js";
8
8
  import { t as runSeed } from "./seed-pDWlnzyK.js";
9
- import { r as specOptionsFromConfig, t as runSpec } from "./spec-DsNayDt2.js";
10
- import { t as addModules } from "./add-CN5jkEFM.js";
11
- import { n as listModules, t as printModule } from "./print-Ca78W5ZF.js";
12
- import { o as dataMigration, t as syncModules } from "./sync-DFAkNjw_.js";
13
- import { t as upgrade } from "./upgrade-DP-30QID.js";
14
- import { d as loadSnapshot } from "./sql-layout-Bt7NcWXk.js";
9
+ import { r as specOptionsFromConfig, t as runSpec } from "./spec-BA3jaJaL.js";
10
+ import { t as addModules } from "./add-BegIE-Rb.js";
11
+ import { n as listModules, t as printModule } from "./print-84kAnn1u.js";
12
+ import { o as dataMigration, t as syncModules } from "./sync-Csq5olpt.js";
13
+ import { t as upgrade } from "./upgrade-DBE7LYrq.js";
14
+ import { d as loadSnapshot } from "./sql-layout-BH9MeAY3.js";
15
15
  import { existsSync } from "node:fs";
16
16
  import { resolve } from "node:path";
17
17
  // src/cli/commands/sql.ts
@@ -864,5 +864,5 @@ export declare function emitModule(model: Model, options: EmitOptions): string;
864
864
  export declare function loadConfig(cwd: string, explicit?: string, environment?: string, path?: string | undefined, options?: {
865
865
  readonly legacyTables?: boolean;
866
866
  }): Promise<ResolvedConfig>;
867
- export declare const VERSION = "0.61.0";
867
+ export declare const VERSION = "0.61.1";
868
868
  export type { Catalog, CatalogCheck, CatalogColumn, CatalogColumnGrant, CatalogEnum, CatalogForeignKey, CatalogFunction, CatalogFunctionArg, CatalogGrant, CatalogIndex, CatalogPolicy, CatalogTable, CatalogTrigger, CatalogUnique, Choice, Cli, CliCommand, CliCommandDef, CliContext, CliEnv, CliErrorCode, CliErrorOptions, CliIo, CliLog, CliProblem, CliProblemExtensions, CliValues, CommandResult, CreateCliOptions, ExitCode, ExtrasFunction, ExtrasHook, ExtrasHookFunction, ExtrasTable, ForeignKeyAction, Format, GeneratorMetadata, IntrospectionSource, ManagementSourceOptions, NextStep, Paint, Prompter, Queryable, RunOptions, RunResult, Snapshot, SnapshotBucket, SnapshotExtras };
package/dist/cli/index.js CHANGED
@@ -1,13 +1,13 @@
1
- import { i as run, n as createCli, r as help, t as commandNames } from "./run-DEPt1rAn.js";
1
+ import { i as run, n as createCli, r as help, t as commandNames } from "./run-Dx-CrkU_.js";
2
2
  import { a as list, r as defineCliCommand } from "./command-fqvJ0TdG.js";
3
3
  import { n as CliError, t as CLI_ERRORS_URL } from "./errors-B7i-VGxk.js";
4
- import { a as emitBlockConfig, c as emitClientBlocks, o as emitBlockConfigModule, r as renderFiles, s as emitBlockReads } from "./render-Bfh2EtMO.js";
5
- import { n as runGen } from "./run-CfWFddfH.js";
6
- import { d as loadSnapshot, h as serializeSnapshot, m as parseSnapshot, y as introspect } from "./sql-layout-Bt7NcWXk.js";
7
- import { a as emitModule, d as buildModel, t as GENERATED_HEADER } from "./emit-OhupwGNp.js";
8
- import { a as toCatalog, n as managementSource, r as pgSource } from "./source-Bt6UAek-.js";
4
+ import { a as emitBlockConfig, c as emitClientBlocks, o as emitBlockConfigModule, r as renderFiles, s as emitBlockReads } from "./render-Div4K_TT.js";
5
+ import { n as runGen } from "./run-BkbVZBeG.js";
6
+ import { d as loadSnapshot, h as serializeSnapshot, m as parseSnapshot, y as introspect } from "./sql-layout-BH9MeAY3.js";
7
+ import { a as emitModule, d as buildModel, t as GENERATED_HEADER } from "./emit-CxD5qNz7.js";
8
+ import { a as toCatalog, n as managementSource, r as pgSource } from "./source-So9SSLFc.js";
9
9
  import { s as loadConfig } from "./config-DX58lDf7.js";
10
- import { t as VERSION } from "./version-CHVFvh95.js";
10
+ import { t as VERSION } from "./version-ljacjTnk.js";
11
11
  // src/cli/introspect/from-catalog.ts
12
12
  /**
13
13
  * Builds a snapshot from catalog records: the inverse of `toCatalog`. Tests and
@@ -1,17 +1,17 @@
1
1
  import { a as findConfig, s as loadConfig } from "./config-DX58lDf7.js";
2
- import { r as contentMapperFiles } from "./content-mapper-TATvvrmb.js";
3
- import { C as withConventions, S as promptConventions, _ as CONVENTION_ARGS, a as writeDesign, b as defaultConventions, c as createUrlParam, d as integrationFiles, f as overwrite, g as templatePlan, h as templateContextFor, i as blocksWiringPath, l as CANCELLED, m as parseIntegrations, o as readPresetInput, p as packagesFor, r as blockConfigImport, s as AUTHZ_NOTE, u as chooseIntegrations, v as CONVENTION_COMPLETIONS, x as hasConventionFlags, y as conventionFlags } from "./add-ucxskHiv.js";
2
+ import { r as contentMapperFiles } from "./content-mapper-BUWZw8Yr.js";
3
+ import { C as withConventions, S as promptConventions, _ as CONVENTION_ARGS, a as writeDesign, b as defaultConventions, c as createUrlParam, d as integrationFiles, f as overwrite, g as templatePlan, h as templateContextFor, i as blocksWiringPath, l as CANCELLED, m as parseIntegrations, o as readPresetInput, p as packagesFor, r as blockConfigImport, s as AUTHZ_NOTE, u as chooseIntegrations, v as CONVENTION_COMPLETIONS, x as hasConventionFlags, y as conventionFlags } from "./add-BufF64Hx.js";
4
4
  import { a as list, m as commandMeta, r as defineCliCommand } from "./command-fqvJ0TdG.js";
5
5
  import { n as CliError } from "./errors-B7i-VGxk.js";
6
6
  import { c as insideRoot, i as changeLines, n as PLAN_ARGS, r as applyPlan, u as planResult } from "./files-NnXnawki.js";
7
7
  import { r as readIfExists } from "./io-CngfGyMA.js";
8
- import { a as wiringFiles, c as baseFiles, f as needsLib, i as wiringChecklist, m as suggestedIntegrations, n as latestMigrationVersion, o as wiringFor, p as resolveIntegrations, r as configInstances, s as TEMPLATES } from "./migration-safety-DYgRA8-5.js";
9
- import { c as enablePgDelta, t as syncModules } from "./sync-DFAkNjw_.js";
10
- import { A as suggestedPackage, d as loadSnapshot, h as serializeSnapshot, k as detectWorkspace } from "./sql-layout-Bt7NcWXk.js";
11
- import { a as toCatalog } from "./source-Bt6UAek-.js";
12
- import { c as TYPEGEN_VERSION } from "./cache-CNa3fjK-.js";
8
+ import { a as wiringFiles, c as baseFiles, f as needsLib, i as wiringChecklist, m as suggestedIntegrations, n as latestMigrationVersion, o as wiringFor, p as resolveIntegrations, r as configInstances, s as TEMPLATES } from "./migration-safety-B473uP9G.js";
9
+ import { c as enablePgDelta, t as syncModules } from "./sync-Csq5olpt.js";
10
+ import { A as suggestedPackage, d as loadSnapshot, h as serializeSnapshot, k as detectWorkspace } from "./sql-layout-BH9MeAY3.js";
11
+ import { a as toCatalog } from "./source-So9SSLFc.js";
12
+ import { c as TYPEGEN_VERSION } from "./cache-BKwYvrrJ.js";
13
13
  import { n as installCommand, t as detectProject } from "./detect-CHR-SAmE.js";
14
- import { t as appTablePlan } from "./app-table-files-FcgTfOf9.js";
14
+ import { t as appTablePlan } from "./app-table-files-RdOXXDCt.js";
15
15
  import { i as plain } from "./style-B5-nByxb.js";
16
16
  import { existsSync } from "node:fs";
17
17
  import { join, posix, resolve } from "node:path";
@@ -1,6 +1,6 @@
1
1
  import { r as errorText } from "./errors-B7i-VGxk.js";
2
- import "./source-Bt6UAek-.js";
3
- import { c as qualified, l as tableObject, r as exposed, t as catalogOf } from "./shared-BrAtQXmC.js";
2
+ import "./source-So9SSLFc.js";
3
+ import { c as qualified, l as tableObject, r as exposed, t as catalogOf } from "./shared-B0zV1qW9.js";
4
4
  // src/cli/doctor/reserved-roles.ts
5
5
  /**
6
6
  * Supautils' `reserved_roles` on Supabase. Nobody but a superuser may alter,
@@ -1,9 +1,9 @@
1
1
  import { m as commandMeta, r as defineCliCommand } from "./command-fqvJ0TdG.js";
2
- import { a as errorDocument, i as run } from "./run-DEPt1rAn.js";
2
+ import { a as errorDocument, i as run } from "./run-Dx-CrkU_.js";
3
3
  import { C as optional, D as record, N as unknown, a as array, d as is, j as string$1, k as safeParse, t as PROCESS_ENV, x as object } from "./env-CQ831uY0.js";
4
4
  import { n as consentDigest } from "./agent-BlYLJPzM.js";
5
5
  import { n as CliError } from "./errors-B7i-VGxk.js";
6
- import { t as VERSION } from "./version-CHVFvh95.js";
6
+ import { t as VERSION } from "./version-ljacjTnk.js";
7
7
  import { createInterface } from "node:readline";
8
8
  import { answerLine } from "better-supabase/mcp";
9
9
  // src/cli/mcp/server.ts
@@ -1,5 +1,5 @@
1
1
  import { t as generatorHash } from "./generator-hash-BkdtEywR.js";
2
- import { t as VERSION } from "./version-CHVFvh95.js";
2
+ import { t as VERSION } from "./version-ljacjTnk.js";
3
3
  import { n as cacheEnabled, r as cacheRoot } from "./store-DP-nmqBt.js";
4
4
  import { mkdirSync, readFileSync, renameSync, writeFileSync } from "node:fs";
5
5
  import { dirname, resolve } from "node:path";
@@ -1,9 +1,9 @@
1
1
  import { n as CliError, r as errorText } from "./errors-B7i-VGxk.js";
2
2
  import { i as readStdin } from "./io-CngfGyMA.js";
3
- import { i as generationNotices, n as runGen, o as fromMetadata, r as UNFORMATTED, t as refuseRowConditionedBuckets } from "./run-CfWFddfH.js";
4
- import { P as parseMetadataDocument, j as MetadataRejectedError } from "./sql-layout-Bt7NcWXk.js";
5
- import { c as metaPaths } from "./emit-OhupwGNp.js";
6
- import { n as render } from "./render-Bfh2EtMO.js";
3
+ import { i as generationNotices, n as runGen, o as fromMetadata, r as UNFORMATTED, t as refuseRowConditionedBuckets } from "./run-BkbVZBeG.js";
4
+ import { P as parseMetadataDocument, j as MetadataRejectedError } from "./sql-layout-BH9MeAY3.js";
5
+ import { c as metaPaths } from "./emit-CxD5qNz7.js";
6
+ import { n as render } from "./render-Div4K_TT.js";
7
7
  import { basename, join, relative, resolve, sep } from "node:path";
8
8
  import { readFile } from "node:fs/promises";
9
9
  import { jsonSchema } from "better-supabase/generators/json-schema";
@@ -1,6 +1,6 @@
1
1
  import { m as commandMeta, r as defineCliCommand } from "./command-fqvJ0TdG.js";
2
2
  import { n as PLAN_ARGS, r as applyPlan, u as planResult } from "./files-NnXnawki.js";
3
- import { t as appTablePlan } from "./app-table-files-FcgTfOf9.js";
3
+ import { t as appTablePlan } from "./app-table-files-RdOXXDCt.js";
4
4
  import { i as plain } from "./style-B5-nByxb.js";
5
5
  // src/cli/commands/migrate.ts
6
6
  const MIGRATE_ARGS = {};
@@ -1,5 +1,5 @@
1
1
  import { h as INTEGRATIONS } from "./config-DX58lDf7.js";
2
- import { l as schemaModulePath } from "./emit-OhupwGNp.js";
2
+ import { l as schemaModulePath } from "./emit-CxD5qNz7.js";
3
3
  import { dirname, join, posix } from "node:path";
4
4
  import { readdir } from "node:fs/promises";
5
5
  import { splitStatements } from "better-supabase/sql";
@@ -1,5 +1,5 @@
1
1
  import { i as changeLines, r as applyPlan } from "./files-NnXnawki.js";
2
- import { i as migrationsDir, l as sqlPlan } from "./sql-layout-Bt7NcWXk.js";
2
+ import { i as migrationsDir, l as sqlPlan } from "./sql-layout-BH9MeAY3.js";
3
3
  import { d as readSupabaseToml, p as sqlWorkflow } from "./supabase-toml-B6-eEV5p.js";
4
4
  import { n as migrationFile, t as hasMigrationSuffix } from "./migration-names-7zAdXfcd.js";
5
5
  import { resolve } from "node:path";
@@ -3,7 +3,7 @@ import { i as isLocalDatabaseUrl, r as databaseHost } from "./agent-BlYLJPzM.js"
3
3
  import { m as commandMeta, r as defineCliCommand } from "./command-fqvJ0TdG.js";
4
4
  import { n as CliError, r as errorText } from "./errors-B7i-VGxk.js";
5
5
  import { t as connect } from "./db-B_xr3ZvK.js";
6
- import { n as ident } from "./live-DmvnAvGV.js";
6
+ import { n as ident } from "./live-Dbt0gFSL.js";
7
7
  import { r as STACK_ARG, t as DB_URL_STDIN_ARG } from "./source-args-D5BSEgUG.js";
8
8
  // src/cli/commands/partition.ts
9
9
  const DEFAULT_BATCH = 5e4;
@@ -0,0 +1 @@
1
+ export { t as powersyncStreamsCommand } from "./powersync-DNUSeMtj.js";
@@ -1,10 +1,10 @@
1
1
  import { m as commandMeta, r as defineCliCommand } from "./command-fqvJ0TdG.js";
2
2
  import { n as PLAN_ARGS, r as applyPlan, u as planResult } from "./files-NnXnawki.js";
3
3
  import { t as projectionsOf } from "./projection-DlVB5YL-.js";
4
- import { c as snapshotColumnTypes, i as migrationsDir, n as appSchemaTexts, s as schemasDirOf } from "./sql-layout-Bt7NcWXk.js";
4
+ import { c as snapshotColumnTypes, i as migrationsDir, n as appSchemaTexts, s as schemasDirOf } from "./sql-layout-BH9MeAY3.js";
5
5
  import { n as migrationFile, t as hasMigrationSuffix } from "./migration-names-7zAdXfcd.js";
6
- import { r as layoutFor } from "./providers-DhMSptuy.js";
7
- import { n as renderBlocksCached } from "./render-cache-BYkVt264.js";
6
+ import { r as layoutFor } from "./providers-BgyVs06M.js";
7
+ import { n as renderBlocksCached } from "./render-cache-CHTWh5Rl.js";
8
8
  import { d as subjectFromTag } from "./config-DX58lDf7.js";
9
9
  import { existsSync } from "node:fs";
10
10
  import { join, resolve } from "node:path";
@@ -1,6 +1,6 @@
1
1
  import { n as CliError } from "./errors-B7i-VGxk.js";
2
- import { o as migrationModules, r as latestMigration, u as writesMigrations } from "./module-migration-CRsIlrig.js";
3
- import { n as layout } from "./providers-DhMSptuy.js";
2
+ import { o as migrationModules, r as latestMigration, u as writesMigrations } from "./module-migration-BMmyFP2c.js";
3
+ import { n as layout } from "./providers-BgyVs06M.js";
4
4
  import { existsSync } from "node:fs";
5
5
  import { resolve } from "node:path";
6
6
  import { SQL_MODULES, contractSignature, customContracts, moduleBody, moduleFilePaths } from "better-supabase/sql";
@@ -1,7 +1,7 @@
1
1
  import { a as entitlementsMode, o as moduleKeyProblems, t as accessProviderMode } from "./authorization-CNWhpdKb.js";
2
2
  import { n as CliError } from "./errors-B7i-VGxk.js";
3
3
  import { t as compiledReadSets } from "./read-sets-77o7SxpK.js";
4
- import { a as moduleLayoutFor, s as schemasDirOf } from "./sql-layout-Bt7NcWXk.js";
4
+ import { a as moduleLayoutFor, s as schemasDirOf } from "./sql-layout-BH9MeAY3.js";
5
5
  import { moduleLayout, modulePermissionKeys, resolveBlocks } from "better-supabase/sql";
6
6
  import { FormerPermissionKeyError } from "better-supabase/config";
7
7
  // src/cli/sql/providers.ts
@@ -3,7 +3,7 @@ import { i as isLocalDatabaseUrl, r as databaseHost } from "./agent-BlYLJPzM.js"
3
3
  import { m as commandMeta, r as defineCliCommand } from "./command-fqvJ0TdG.js";
4
4
  import { n as CliError, r as errorText } from "./errors-B7i-VGxk.js";
5
5
  import { t as connect } from "./db-B_xr3ZvK.js";
6
- import { n as ident } from "./live-DmvnAvGV.js";
6
+ import { n as ident } from "./live-Dbt0gFSL.js";
7
7
  import { r as STACK_ARG, t as DB_URL_STDIN_ARG } from "./source-args-D5BSEgUG.js";
8
8
  // src/cli/commands/prune-workflows.ts
9
9
  const TERMINAL = [
@@ -2,15 +2,15 @@ import { m as commandMeta, r as defineCliCommand } from "./command-fqvJ0TdG.js";
2
2
  import { n as CliError } from "./errors-B7i-VGxk.js";
3
3
  import { i as changeLines, n as PLAN_ARGS, r as applyPlan, t as HAND_EDITED, u as planResult } from "./files-NnXnawki.js";
4
4
  import { r as readIfExists, t as display } from "./io-CngfGyMA.js";
5
- import { h as templateContextFor, i as blocksWiringPath, n as blockClients } from "./add-ucxskHiv.js";
5
+ import { h as templateContextFor, i as blocksWiringPath, n as blockClients } from "./add-BufF64Hx.js";
6
6
  import { t as detectProject } from "./detect-CHR-SAmE.js";
7
- import { l as sqlPlan } from "./sql-layout-Bt7NcWXk.js";
8
- import { _ as tidyInline, c as cutRange, i as addBlocksToJson, l as mask, n as isComposite, o as closingIndex, r as addBlocksToConfig, s as configObject, u as properties, v as wiringBlocks } from "./add-CN5jkEFM.js";
7
+ import { l as sqlPlan } from "./sql-layout-BH9MeAY3.js";
8
+ import { _ as tidyInline, c as cutRange, i as addBlocksToJson, l as mask, n as isComposite, o as closingIndex, r as addBlocksToConfig, s as configObject, u as properties, v as wiringBlocks } from "./add-BegIE-Rb.js";
9
9
  import { t as SQL_ARGS } from "./args-CS_64_tg.js";
10
- import { r as layoutFor } from "./providers-DhMSptuy.js";
11
- import { n as guardedRemoval } from "./sync-DFAkNjw_.js";
10
+ import { r as layoutFor } from "./providers-BgyVs06M.js";
11
+ import { n as guardedRemoval } from "./sync-Csq5olpt.js";
12
12
  import { i as plain } from "./style-B5-nByxb.js";
13
- import { t as blockNames } from "./blocks-iSEepN2Y.js";
13
+ import { t as blockNames } from "./blocks-Q7wC6dj7.js";
14
14
  import { existsSync } from "node:fs";
15
15
  import { resolve } from "node:path";
16
16
  import { readFile } from "node:fs/promises";
@@ -1,11 +1,11 @@
1
1
  import { n as importPath } from "./io-CngfGyMA.js";
2
2
  import { n as cacheEnabled, t as CACHE_DIR } from "./store-DP-nmqBt.js";
3
3
  import { n as CliError, r as errorText } from "./errors-B7i-VGxk.js";
4
- import { o as typesModuleKey, r as cachedTypesModule, s as writeAtomic, t as cachedDatabaseTypes } from "./cache-CNa3fjK-.js";
5
- import { t as VERSION } from "./version-CHVFvh95.js";
6
- import { M as generateDatabaseTypes, N as oxfmtInstalled, n as appSchemaTexts, t as appColumnsFor, x as apiTypeSchemas } from "./sql-layout-Bt7NcWXk.js";
4
+ import { o as typesModuleKey, r as cachedTypesModule, s as writeAtomic, t as cachedDatabaseTypes } from "./cache-BKwYvrrJ.js";
5
+ import { t as VERSION } from "./version-ljacjTnk.js";
6
+ import { M as generateDatabaseTypes, N as oxfmtInstalled, n as appSchemaTexts, t as appColumnsFor, x as apiTypeSchemas } from "./sql-layout-BH9MeAY3.js";
7
7
  import { t as isRecord$1 } from "./guards-DxwRG0Uv.js";
8
- import { _ as prop, a as emitModule, b as singular, c as metaPaths, d as buildModel$1, f as generatorModel, g as pascal$2, h as identifier, i as emitMeta, l as schemaModulePath, n as emitFunctions, o as emitRuntime, r as emitFunctionsTypes, s as emitSchemaModule, t as GENERATED_HEADER, u as valueLists, v as q, x as applyCasing, y as runtimeSubpath } from "./emit-OhupwGNp.js";
8
+ import { _ as prop, a as emitModule, b as singular, c as metaPaths, d as buildModel$1, f as generatorModel, g as pascal$2, h as identifier, i as emitMeta, l as schemaModulePath, n as emitFunctions, o as emitRuntime, r as emitFunctionsTypes, s as emitSchemaModule, t as GENERATED_HEADER, u as valueLists, v as q, x as applyCasing, y as runtimeSubpath } from "./emit-CxD5qNz7.js";
9
9
  import { t as byCodePoint } from "./compare-yl4sSwVn.js";
10
10
  import { t as projectionsOf } from "./projection-DlVB5YL-.js";
11
11
  import { u as withTableTags } from "./config-DX58lDf7.js";
@@ -1,5 +1,5 @@
1
1
  import { t as CACHE_DIR } from "./store-DP-nmqBt.js";
2
- import { t as VERSION } from "./version-CHVFvh95.js";
2
+ import { t as VERSION } from "./version-ljacjTnk.js";
3
3
  import { t as generatorHash } from "./generator-hash-BkdtEywR.js";
4
4
  import { dirname, resolve } from "node:path";
5
5
  import { mkdir, readFile, rename, rm, writeFile } from "node:fs/promises";
@@ -1,17 +1,17 @@
1
1
  import { t as CACHE_DIR } from "./store-DP-nmqBt.js";
2
2
  import { a as entitlementsMode, c as unsafeKey, i as entitlementRequirements, n as accessRequirements, o as moduleKeyProblems, s as providerLabel } from "./authorization-CNWhpdKb.js";
3
- import { B as typegenVersionNotice, H as installedVersion, L as stabilizeMetadata, N as oxfmtInstalled, V as declaredPeers, W as satisfies, d as loadSnapshot, i as migrationsDir, z as typegenVersion } from "./sql-layout-Bt7NcWXk.js";
4
- import { s as schemaStampPath } from "./content-mapper-TATvvrmb.js";
3
+ import { B as typegenVersionNotice, H as installedVersion, L as stabilizeMetadata, N as oxfmtInstalled, V as declaredPeers, W as satisfies, d as loadSnapshot, i as migrationsDir, z as typegenVersion } from "./sql-layout-BH9MeAY3.js";
4
+ import { s as schemaStampPath } from "./content-mapper-BUWZw8Yr.js";
5
5
  import { a as changedFiles, d as fileDiff, i as changeLines, r as applyPlan, s as hasConflicts } from "./files-NnXnawki.js";
6
6
  import { a as sameText, t as display } from "./io-CngfGyMA.js";
7
- import { n as adoptionContext, r as appTablesOf, t as accessModule } from "./app-tables-DCpSNfJ3.js";
7
+ import { n as adoptionContext, r as appTablesOf, t as accessModule } from "./app-tables-CK-U5_ZN.js";
8
8
  import { r as errorText } from "./errors-B7i-VGxk.js";
9
- import { c as qualified, l as tableObject, r as exposed, s as policyObject, t as catalogOf } from "./shared-BrAtQXmC.js";
10
- import { a as storeTypesModule, o as typesModuleKey, s as writeAtomic } from "./cache-CNa3fjK-.js";
9
+ import { c as qualified, l as tableObject, r as exposed, s as policyObject, t as catalogOf } from "./shared-B0zV1qW9.js";
10
+ import { a as storeTypesModule, o as typesModuleKey, s as writeAtomic } from "./cache-BKwYvrrJ.js";
11
11
  import { t as compiledReadSets } from "./read-sets-77o7SxpK.js";
12
- import { c as sameModuleMigration, l as writeLatestMigration, n as READ_SETS_SUFFIX, r as latestMigration, u as writesMigrations } from "./module-migration-CRsIlrig.js";
12
+ import { c as sameModuleMigration, l as writeLatestMigration, n as READ_SETS_SUFFIX, r as latestMigration, u as writesMigrations } from "./module-migration-BMmyFP2c.js";
13
13
  import { t as byCodePoint } from "./compare-yl4sSwVn.js";
14
- import { n as render } from "./render-Bfh2EtMO.js";
14
+ import { n as render } from "./render-Div4K_TT.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,7 +1,7 @@
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-fqvJ0TdG.js";
2
2
  import { s as setCacheEnabled } from "./store-DP-nmqBt.js";
3
3
  import { n as highlight, r as painter } from "./style-B5-nByxb.js";
4
- import { t as VERSION } from "./version-CHVFvh95.js";
4
+ import { t as VERSION } from "./version-ljacjTnk.js";
5
5
  import { a as missingInputNext, o as resolveAgent, t as checkConsent } from "./agent-BlYLJPzM.js";
6
6
  import { a as isActionRequired, l as toCliError, n as CliError, o as isReport, s as isRetryable } from "./errors-B7i-VGxk.js";
7
7
  import { r as splitCommandLine } from "./shell-omi9-T2X.js";
@@ -21,48 +21,48 @@ const LOADERS = [
21
21
  ["login", () => import("./account-BzhVD6jJ.js").then((m) => m.loginCommand)],
22
22
  ["logout", () => import("./account-BzhVD6jJ.js").then((m) => m.logoutCommand)],
23
23
  ["whoami", () => import("./account-BzhVD6jJ.js").then((m) => m.whoamiCommand)],
24
- ["init", () => import("./init-Defy7VJ0.js").then((m) => m.initCommand)],
25
- ["add", () => import("./add-fra98UnY.js").then((m) => m.addCommand)],
26
- ["remove", () => import("./remove-37g_SvZW.js").then((m) => m.removeCommand)],
27
- ["upgrade", () => import("./upgrade-D8GOjXrv.js").then((m) => m.upgradeCommand)],
24
+ ["init", () => import("./init-lNqq_JHu.js").then((m) => m.initCommand)],
25
+ ["add", () => import("./add-BXNrz9sN.js").then((m) => m.addCommand)],
26
+ ["remove", () => import("./remove-Y62Mu1VK.js").then((m) => m.removeCommand)],
27
+ ["upgrade", () => import("./upgrade-MfDU8Z5K.js").then((m) => m.upgradeCommand)],
28
28
  ["table", () => import("./table-CcO-m_7t.js").then((m) => m.tableCommand)],
29
- ["migrate schema-first", () => import("./migrate-PshyB8a6.js").then((m) => m.migrateSchemaFirstCommand)],
30
- ["gen", () => import("./gen-1lVJoeH1.js").then((m) => m.genCommand)],
31
- ["doctor", () => import("./doctor-CkO1yd7F.js").then((m) => m.doctorCommand)],
29
+ ["migrate schema-first", () => import("./migrate-CaEzxtNU.js").then((m) => m.migrateSchemaFirstCommand)],
30
+ ["gen", () => import("./gen-B8K-GHgH.js").then((m) => m.genCommand)],
31
+ ["doctor", () => import("./doctor-auNf55mF.js").then((m) => m.doctorCommand)],
32
32
  ["codes", () => import("./codes-D_oa7Aw5.js").then((m) => m.codesCommand)],
33
33
  ["db query", () => import("./db-CZ9qHsDs.js").then((m) => m.dbQueryCommand)],
34
34
  ["db diff", () => import("./db-CZ9qHsDs.js").then((m) => m.dbDiffCommand)],
35
35
  ["db seed", () => import("./seed-B6_MBFd2.js").then((m) => m.seedCommand)],
36
- ["db backfill", () => import("./backfill-DVP_elK_.js").then((m) => m.dbBackfillCommand)],
36
+ ["db backfill", () => import("./backfill-CT6yncRM.js").then((m) => m.dbBackfillCommand)],
37
37
  ["db verify", () => import("./verify-O5zxWWuE.js").then((m) => m.dbVerifyCommand)],
38
- ["db partition", () => import("./partition-ht8zldUV.js").then((m) => m.dbPartitionCommand)],
39
- ["db squash", () => import("./squash-DmbB7Gx9.js").then((m) => m.dbSquashCommand)],
40
- ["workflows prune", () => import("./prune-workflows-DyZx-veL.js").then((m) => m.workflowsPruneCommand)],
41
- ["dev", () => import("./dev-BDv1efAy.js").then((m) => m.devCommand)],
38
+ ["db partition", () => import("./partition-C9ta6Kld.js").then((m) => m.dbPartitionCommand)],
39
+ ["db squash", () => import("./squash-CZJcKsks.js").then((m) => m.dbSquashCommand)],
40
+ ["workflows prune", () => import("./prune-workflows-D96eYjdj.js").then((m) => m.workflowsPruneCommand)],
41
+ ["dev", () => import("./dev-BRQUcr0M.js").then((m) => m.devCommand)],
42
42
  ["dev env", () => import("./env-bItpF97w.js").then((m) => m.envCommand)],
43
43
  ["dev run", () => import("./run-DbR0NaN_.js").then((m) => m.runCommand)],
44
44
  ["dev keys", () => import("./keys-f9iMQepr.js").then((m) => m.keysCommand)],
45
45
  ["dev stack ls", () => import("./stack-BUrc8jsg.js").then((m) => m.stackLsCommand)],
46
46
  ["dev stack prune", () => import("./stack-BUrc8jsg.js").then((m) => m.stackPruneCommand)],
47
47
  ["automations list", () => import("./automations-C1yZj3mn.js").then((m) => m.automationsListCommand)],
48
- ["blocks list", () => import("./blocks-CFKjKW4s.js").then((m) => m.blocksListCommand)],
49
- ["blocks view", () => import("./blocks-CFKjKW4s.js").then((m) => m.blocksViewCommand)],
50
- ["blocks search", () => import("./blocks-CFKjKW4s.js").then((m) => m.blocksSearchCommand)],
51
- ["powersync streams", () => import("./powersync-BztAuUyy.js").then((m) => m.powersyncStreamsCommand)],
52
- ["spec emit", () => import("./spec-BJreyth3.js").then((m) => m.specEmitCommand)],
53
- ["spec validate", () => import("./spec-BJreyth3.js").then((m) => m.specValidateCommand)],
54
- ["mcp", () => import("./mcp-BGKeD-lo.js").then((m) => m.mcpCommand)],
48
+ ["blocks list", () => import("./blocks-CVadF4-D.js").then((m) => m.blocksListCommand)],
49
+ ["blocks view", () => import("./blocks-CVadF4-D.js").then((m) => m.blocksViewCommand)],
50
+ ["blocks search", () => import("./blocks-CVadF4-D.js").then((m) => m.blocksSearchCommand)],
51
+ ["powersync streams", () => import("./powersync-BLXxgdbk.js").then((m) => m.powersyncStreamsCommand)],
52
+ ["spec emit", () => import("./spec-BiLpXtjI.js").then((m) => m.specEmitCommand)],
53
+ ["spec validate", () => import("./spec-BiLpXtjI.js").then((m) => m.specValidateCommand)],
54
+ ["mcp", () => import("./mcp-Bs3746MS.js").then((m) => m.mcpCommand)],
55
55
  ["skills list", () => import("./skills-C4vNmuxw.js").then((m) => m.skillsListCommand)],
56
56
  ["skills install", () => import("./skills-C4vNmuxw.js").then((m) => m.skillsInstallCommand)],
57
- ["codemod naming", () => import("./codemod-DH-VSZps.js").then((m) => m.codemodCommand("naming"))],
58
- ["codemod extra-columns", () => import("./codemod-DH-VSZps.js").then((m) => m.codemodCommand("extra-columns"))],
59
- ["codemod owned-columns", () => import("./codemod-DH-VSZps.js").then((m) => m.codemodCommand("owned-columns"))],
60
- ["codemod config", () => import("./codemod-DH-VSZps.js").then((m) => m.codemodCommand("config"))],
61
- ["codemod table-modules", () => import("./codemod-DH-VSZps.js").then((m) => m.codemodCommand("table-modules"))],
62
- ["codemod account-calls", () => import("./codemod-DH-VSZps.js").then((m) => m.codemodCommand("account-calls"))],
63
- ["codemod server-imports", () => import("./codemod-DH-VSZps.js").then((m) => m.codemodCommand("server-imports"))],
64
- ["codemod generators", () => import("./codemod-DH-VSZps.js").then((m) => m.codemodCommand("generators"))],
65
- ["codemod read-many", () => import("./codemod-DH-VSZps.js").then((m) => m.codemodCommand("read-many"))],
57
+ ["codemod naming", () => import("./codemod-BzEKQMSK.js").then((m) => m.codemodCommand("naming"))],
58
+ ["codemod extra-columns", () => import("./codemod-BzEKQMSK.js").then((m) => m.codemodCommand("extra-columns"))],
59
+ ["codemod owned-columns", () => import("./codemod-BzEKQMSK.js").then((m) => m.codemodCommand("owned-columns"))],
60
+ ["codemod config", () => import("./codemod-BzEKQMSK.js").then((m) => m.codemodCommand("config"))],
61
+ ["codemod table-modules", () => import("./codemod-BzEKQMSK.js").then((m) => m.codemodCommand("table-modules"))],
62
+ ["codemod account-calls", () => import("./codemod-BzEKQMSK.js").then((m) => m.codemodCommand("account-calls"))],
63
+ ["codemod server-imports", () => import("./codemod-BzEKQMSK.js").then((m) => m.codemodCommand("server-imports"))],
64
+ ["codemod generators", () => import("./codemod-BzEKQMSK.js").then((m) => m.codemodCommand("generators"))],
65
+ ["codemod read-many", () => import("./codemod-BzEKQMSK.js").then((m) => m.codemodCommand("read-many"))],
66
66
  ["completion", () => import("./completion-Ct0kXYpV.js").then((m) => m.completionCommand)],
67
67
  ["cache purge", () => import("./cache-DwdJCb29.js").then((m) => m.cachePurgeCommand)],
68
68
  ["config", () => import("./config-J8LaJ0Nl.js").then((m) => m.configCommand)]
@@ -747,7 +747,7 @@ function cliFromTree(init, extra = {}) {
747
747
  digest: globals["effects-digest"]
748
748
  });
749
749
  };
750
- await import("./memo-backend-3u-X51UO.js").then(({ installMemo }) => installMemo(config.root));
750
+ await import("./memo-backend-BAduTvxg.js").then(({ installMemo }) => installMemo(config.root));
751
751
  context = {
752
752
  cwd,
753
753
  config,
@@ -1,4 +1,4 @@
1
- import { a as toCatalog } from "./source-Bt6UAek-.js";
1
+ import { a as toCatalog } from "./source-So9SSLFc.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
  /**
@@ -1,4 +1,4 @@
1
- import { t as VERSION } from "./version-CHVFvh95.js";
1
+ import { t as VERSION } from "./version-ljacjTnk.js";
2
2
  import { n as CliError } from "./errors-B7i-VGxk.js";
3
3
  import { r as redactUrl } from "./redact--zOGdWzo.js";
4
4
  import { n as HTTP_CHANNEL } from "./trace-D3TNqWBg.js";
@@ -4,8 +4,8 @@ import { t as CACHE_DIR } from "./store-DP-nmqBt.js";
4
4
  import { i as failedResult, n as CliError, r as errorText } from "./errors-B7i-VGxk.js";
5
5
  import { a as changedFiles, i as changeLines, r as applyPlan } from "./files-NnXnawki.js";
6
6
  import { t as display } from "./io-CngfGyMA.js";
7
- import { s as writeAtomic } from "./cache-CNa3fjK-.js";
8
- import { t as VERSION } from "./version-CHVFvh95.js";
7
+ import { s as writeAtomic } from "./cache-BKwYvrrJ.js";
8
+ import { t as VERSION } from "./version-ljacjTnk.js";
9
9
  import { t as importFresh } from "./fresh-import-CdO2oQaQ.js";
10
10
  import { t as isRecord } from "./guards-DxwRG0Uv.js";
11
11
  import { t as loadTopics } from "./topics-CqhOV1S0.js";
@@ -1 +1 @@
1
- export { n as specEmitCommand, i as specValidateCommand } from "./spec-DsNayDt2.js";
1
+ export { n as specEmitCommand, i as specValidateCommand } from "./spec-BA3jaJaL.js";
@@ -4,8 +4,8 @@ import { d as readSupabaseToml, f as schemaPaths, h as tomlGet, n as declarative
4
4
  import { n as databaseUrl, p as accessToken } from "./config-DX58lDf7.js";
5
5
  import { n as CliError, r as errorText } from "./errors-B7i-VGxk.js";
6
6
  import { t as connect } from "./db-B_xr3ZvK.js";
7
- import { c as TYPEGEN_VERSION, n as cachedIntrospect, u as readExtras } from "./cache-CNa3fjK-.js";
8
- import { a as toCatalog, n as managementSource, r as pgSource } from "./source-Bt6UAek-.js";
7
+ import { c as TYPEGEN_VERSION, n as cachedIntrospect, u as readExtras } from "./cache-BKwYvrrJ.js";
8
+ import { a as toCatalog, n as managementSource, r as pgSource } from "./source-So9SSLFc.js";
9
9
  import { existsSync } from "node:fs";
10
10
  import { dirname, join, posix, relative, resolve, sep } from "node:path";
11
11
  import { glob, readFile, readdir } from "node:fs/promises";
@@ -1,7 +1,7 @@
1
1
  import { m as commandMeta, r as defineCliCommand } from "./command-fqvJ0TdG.js";
2
2
  import { n as CliError, r as errorText } from "./errors-B7i-VGxk.js";
3
3
  import { r as supabaseCli } from "./exec-DBgtTCHK.js";
4
- import { i as migrationsDir } from "./sql-layout-Bt7NcWXk.js";
4
+ import { i as migrationsDir } from "./sql-layout-BH9MeAY3.js";
5
5
  import { r as migrationStamp } from "./migration-names-7zAdXfcd.js";
6
6
  import { resolve } from "node:path";
7
7
  import { readFile, readdir, rm, writeFile } from "node:fs/promises";
@@ -1,12 +1,12 @@
1
1
  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-NnXnawki.js";
2
2
  import { t as display } from "./io-CngfGyMA.js";
3
- import { i as migrationsDir, l as sqlPlan } from "./sql-layout-Bt7NcWXk.js";
3
+ import { i as migrationsDir, l as sqlPlan } from "./sql-layout-BH9MeAY3.js";
4
4
  import { n as CliError } from "./errors-B7i-VGxk.js";
5
5
  import { t as loadTopics } from "./topics-CqhOV1S0.js";
6
- import { c as sameModuleMigration, l as writeLatestMigration, r as latestMigration, s as renderModuleMigration, t as MODULES_SUFFIX, u as writesMigrations } from "./module-migration-CRsIlrig.js";
6
+ import { c as sameModuleMigration, l as writeLatestMigration, r as latestMigration, s as renderModuleMigration, t as MODULES_SUFFIX, u as writesMigrations } from "./module-migration-BMmyFP2c.js";
7
7
  import { t as orphanedBlockFiles } from "./orphans-ByB0gKOp.js";
8
- import { r as layoutFor } from "./providers-DhMSptuy.js";
9
- import { n as renderBlocksCached, t as cacheOf } from "./render-cache-BYkVt264.js";
8
+ import { r as layoutFor } from "./providers-BgyVs06M.js";
9
+ import { n as renderBlocksCached, t as cacheOf } from "./render-cache-CHTWh5Rl.js";
10
10
  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";
11
11
  import { n as migrationFile, t as hasMigrationSuffix } from "./migration-names-7zAdXfcd.js";
12
12
  import { dirname, join, resolve } from "node:path";
@@ -1,12 +1,12 @@
1
1
  import { d as fileDiff, i as changeLines, r as applyPlan } from "./files-NnXnawki.js";
2
2
  import { t as display } from "./io-CngfGyMA.js";
3
- import { i as migrationsDir, l as sqlPlan } from "./sql-layout-Bt7NcWXk.js";
3
+ import { i as migrationsDir, l as sqlPlan } from "./sql-layout-BH9MeAY3.js";
4
4
  import { d as readSupabaseToml, p as sqlWorkflow } from "./supabase-toml-B6-eEV5p.js";
5
- import { a as write, r as nextStep, s as topicPolicyFile } from "./sync-DFAkNjw_.js";
5
+ import { a as write, r as nextStep, s as topicPolicyFile } from "./sync-Csq5olpt.js";
6
6
  import { n as migrationFile } from "./migration-names-7zAdXfcd.js";
7
- 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-CRsIlrig.js";
8
- import { r as layoutFor } from "./providers-DhMSptuy.js";
9
- import { n as renderBlocksCached, t as cacheOf } from "./render-cache-BYkVt264.js";
7
+ 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-BMmyFP2c.js";
8
+ import { r as layoutFor } from "./providers-BgyVs06M.js";
9
+ import { n as renderBlocksCached, t as cacheOf } from "./render-cache-CHTWh5Rl.js";
10
10
  import { resolve } from "node:path";
11
11
  import { readFile, readdir } from "node:fs/promises";
12
12
  import { PRELUDE_FUNCTIONS, PRELUDE_MODULE, SQL_MODULES, buildModel, conflicts, duplicatePolicies, entityRenamePlan, moduleFileVersion, moduleTopics, sameBlockFile, upgradePlan } from "better-supabase/sql";
@@ -1,10 +1,10 @@
1
1
  import { m as commandMeta, r as defineCliCommand } from "./command-fqvJ0TdG.js";
2
- import { t as shadowedBlockColumns } from "./column-renames-CtcG8MR5.js";
3
- import { n as appSchemaTexts } from "./sql-layout-Bt7NcWXk.js";
2
+ import { t as shadowedBlockColumns } from "./column-renames-7IG0Gcf3.js";
3
+ import { n as appSchemaTexts } from "./sql-layout-BH9MeAY3.js";
4
4
  import { t as SQL_ARGS } from "./args-CS_64_tg.js";
5
- import { o as dataMigration, t as syncModules } from "./sync-DFAkNjw_.js";
6
- import { r as renderStats } from "./render-cache-BYkVt264.js";
7
- import { t as upgrade } from "./upgrade-DP-30QID.js";
5
+ import { o as dataMigration, t as syncModules } from "./sync-Csq5olpt.js";
6
+ import { r as renderStats } from "./render-cache-CHTWh5Rl.js";
7
+ import { t as upgrade } from "./upgrade-DBE7LYrq.js";
8
8
  import { i as plain } from "./style-B5-nByxb.js";
9
9
  // src/cli/commands/upgrade.ts
10
10
  const UPGRADE_ARGS = {
@@ -1,3 +1,3 @@
1
1
  // src/cli/version.ts
2
- const VERSION = "0.61.0";
2
+ const VERSION = "0.61.1";
3
3
  export { VERSION as t };
@@ -1,6 +1,6 @@
1
1
  import { n as loadLite, t as LITE_INSTALL } from "../../runtime-sBnEajcK.js";
2
2
  import { b as appDefaultError } from "../../instances-07Lopbd1.js";
3
- import { t as defineApi } from "../../api-Q23GAwx1.js";
3
+ import { t as defineApi } from "../../api-Dq7hOzxh.js";
4
4
  import { n as loadProject } from "../../project-wJ3jYipI.js";
5
5
  import { c as resolvePersonas } from "../../config-cisS43w5.js";
6
6
  import { i as fillTemplate } from "../../access-sql-Dvl7BRy0.js";
@@ -1,4 +1,4 @@
1
- import { t as VERSION } from "../../version-B0uw5rOF.js";
1
+ import { t as VERSION } from "../../version-BFYCXhul.js";
2
2
  import { f as siblingPath, t as HEADER } from "../../shared-BXRDj6UR.js";
3
3
  import { r as relativeImport } from "../../kit-D6kdfQFj.js";
4
4
  // src/generators/factories.ts
@@ -1 +1 @@
1
- export { t as jsonSchema, n as toJsonSchema } from "../../json-schema-CU9Mg-_d.js";
1
+ export { t as jsonSchema, n as toJsonSchema } from "../../json-schema-CChz-Csz.js";
@@ -1,4 +1,4 @@
1
- import { t as VERSION } from "../../version-B0uw5rOF.js";
1
+ import { t as VERSION } from "../../version-BFYCXhul.js";
2
2
  import { f as siblingPath, t as HEADER } from "../../shared-BXRDj6UR.js";
3
3
  // src/generators/nuqs.ts
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { t as VERSION } from "../../version-B0uw5rOF.js";
1
+ import { t as VERSION } from "../../version-BFYCXhul.js";
2
2
  import { _ as variantTitle, c as parseImport, d as schemaName, f as siblingPath, i as fieldsFor, l as propertyKey, m as tableEntries, n as fieldDocs, p as tableDocs, r as fieldSpec, t as HEADER, v as variantsFor } from "../../shared-BXRDj6UR.js";
3
3
  import { a as objectType, i as fieldMetaLines, n as extraSchemas } from "../../extras-CW8CKLeE.js";
4
4
  import { r as relativeImport } from "../../kit-D6kdfQFj.js";
@@ -1,4 +1,4 @@
1
- import { t as VERSION } from "../../version-B0uw5rOF.js";
1
+ import { t as VERSION } from "../../version-BFYCXhul.js";
2
2
  import { _ as variantTitle, a as optionalLine, c as parseImport, d as schemaName, f as siblingPath, h as temporalGuardImport, i as fieldsFor, l as propertyKey, m as tableEntries, n as fieldDocs, p as tableDocs, t as HEADER, u as rowType, v as variantsFor } from "../../shared-BXRDj6UR.js";
3
3
  import { a as objectType, i as fieldMetaLines, n as extraSchemas, o as resultType, t as extraKinds } from "../../extras-CW8CKLeE.js";
4
4
  import { r as relativeImport } from "../../kit-D6kdfQFj.js";
@@ -1,4 +1,4 @@
1
- import { t as VERSION } from "../../version-B0uw5rOF.js";
1
+ import { t as VERSION } from "../../version-BFYCXhul.js";
2
2
  import { _ as variantTitle, a as optionalLine, c as parseImport, d as schemaName, f as siblingPath, h as temporalGuardImport, i as fieldsFor, l as propertyKey, m as tableEntries, n as fieldDocs, p as tableDocs, t as HEADER, u as rowType, v as variantsFor } from "../../shared-BXRDj6UR.js";
3
3
  import { a as objectType, i as fieldMetaLines, n as extraSchemas, o as resultType, t as extraKinds } from "../../extras-CW8CKLeE.js";
4
4
  import { r as relativeImport } from "../../kit-D6kdfQFj.js";
@@ -1,5 +1,5 @@
1
1
  import { i as tableJsonSchema, r as fieldJsonSchema, t as forTarget } from "./table-schema-CnUdpnfT.js";
2
- import { t as VERSION } from "./version-B0uw5rOF.js";
2
+ import { t as VERSION } from "./version-BFYCXhul.js";
3
3
  import { t as isList } from "./guards-CsRa6v57.js";
4
4
  import { n as extraSchemas, r as fieldMeta } from "./extras-CW8CKLeE.js";
5
5
  import { _ as variantTitle, f as siblingPath, i as fieldsFor, m as tableEntries, n as fieldDocs, p as tableDocs, r as fieldSpec, v as variantsFor } from "./shared-BXRDj6UR.js";
@@ -1,10 +1,10 @@
1
- import { d as loadSnapshot } from "../cli/sql-layout-Bt7NcWXk.js";
1
+ import { d as loadSnapshot } from "../cli/sql-layout-BH9MeAY3.js";
2
2
  import { i as discoverConfig, s as loadConfig } from "../cli/config-DX58lDf7.js";
3
- import { s as schemaStampPath } from "../cli/content-mapper-TATvvrmb.js";
3
+ import { s as schemaStampPath } from "../cli/content-mapper-BUWZw8Yr.js";
4
4
  import { i as parseEnv, n as configEnvironment } from "../cli/env-CQ831uY0.js";
5
- import { i as renderTypesModule, t as mapperFilePath } from "../cli/render-Bfh2EtMO.js";
6
- import { i as lastTypesModule, o as typesModuleKey, s as writeAtomic } from "../cli/cache-CNa3fjK-.js";
7
- import { t as VERSION } from "../cli/version-CHVFvh95.js";
5
+ import { i as renderTypesModule, t as mapperFilePath } from "../cli/render-Div4K_TT.js";
6
+ import { i as lastTypesModule, o as typesModuleKey, s as writeAtomic } from "../cli/cache-BKwYvrrJ.js";
7
+ import { t as VERSION } from "../cli/version-ljacjTnk.js";
8
8
  import { existsSync, realpathSync } from "node:fs";
9
9
  import { basename, dirname, join, resolve } from "node:path";
10
10
  import { readFile } from "node:fs/promises";
package/dist/mcp/index.js CHANGED
@@ -1 +1 @@
1
- export { r as MCP_PROTOCOL_VERSION, i as answerLine, a as answerMessage, t as createMcp, n as defineTool } from "../mcp-CULIbS-b.js";
1
+ export { r as MCP_PROTOCOL_VERSION, i as answerLine, a as answerMessage, t as createMcp, n as defineTool } from "../mcp-B4bvacl4.js";
@@ -3,7 +3,7 @@ import { n as jsonResponse, t as jsonReplacer } from "./json-O5vFw243.js";
3
3
  import { a as methodNotAllowed, c as toProblem, o as problemResponse } from "./problem-BwplIuhI.js";
4
4
  import { n as validate } from "./standard-DM4THQrL.js";
5
5
  import { t as boundedTtlCache } from "./ttl-cache-C5S0L2wx.js";
6
- import { n as toJsonSchema, r as toDraft07 } from "./json-schema-CU9Mg-_d.js";
6
+ import { n as toJsonSchema, r as toDraft07 } from "./json-schema-CChz-Csz.js";
7
7
  import { t as adapterBase } from "./adapter-base-DGiRWzEo.js";
8
8
  import { p as flushEvents } from "./sessions-w6xril_l.js";
9
9
  import { t as withExtra } from "./extra-Dz9n5y1s.js";
@@ -1,7 +1,7 @@
1
1
  import { r as blockEventAttributes } from "../block-events-uKWyOpAy.js";
2
2
  import { r as definePlugin } from "../plugin-Ca2qBiFZ.js";
3
3
  import { t as SPEC_PINS } from "../spec-pins-Dlz8OVqi.js";
4
- import "../version-B0uw5rOF.js";
4
+ import "../version-BFYCXhul.js";
5
5
  import { SpanKind, SpanStatusCode, context, metrics, propagation, trace } from "@opentelemetry/api";
6
6
  // src/otel/index.ts
7
7
  const INSTRUMENTATION_NAME = "better-supabase";
@@ -40,9 +40,9 @@ function systemOf(executor) {
40
40
  * ```
41
41
  */
42
42
  function otel(options = {}) {
43
- const tracer = options.tracer ?? trace.getTracer("better-supabase", "0.61.0");
43
+ const tracer = options.tracer ?? trace.getTracer("better-supabase", "0.61.1");
44
44
  let histogram;
45
- if (options.metrics !== false) histogram = (options.meter ?? metrics.getMeter("better-supabase", "0.61.0")).createHistogram("db.client.operation.duration", {
45
+ if (options.metrics !== false) histogram = (options.meter ?? metrics.getMeter("better-supabase", "0.61.1")).createHistogram("db.client.operation.duration", {
46
46
  unit: "s",
47
47
  description: "Duration of database client operations.",
48
48
  advice: { explicitBucketBoundaries: [
@@ -231,7 +231,7 @@ function otel(options = {}) {
231
231
  * `betterSupabase.events`. Returns a function that stops listening.
232
232
  */
233
233
  function traceAuth(betterSupabase, options = {}) {
234
- const tracer = options.tracer ?? trace.getTracer("better-supabase", "0.61.0");
234
+ const tracer = options.tracer ?? trace.getTracer("better-supabase", "0.61.1");
235
235
  const offAuth = betterSupabase.events.on("auth", (event) => {
236
236
  const span = tracer.startSpan("auth.resolve", {
237
237
  kind: SpanKind.INTERNAL,
@@ -270,7 +270,7 @@ function traceAuth(betterSupabase, options = {}) {
270
270
  * `*.denied`) set an error status. Returns a function that stops listening.
271
271
  */
272
272
  function traceBlockEvents(betterSupabase, options = {}) {
273
- const tracer = options.tracer ?? trace.getTracer("better-supabase", "0.61.0");
273
+ const tracer = options.tracer ?? trace.getTracer("better-supabase", "0.61.1");
274
274
  return betterSupabase.events.on("block", (event) => {
275
275
  const attributes = {
276
276
  ...options.attributes,
@@ -1,5 +1,5 @@
1
- import { a as toOpenApi30Schema, n as openapiFormat, o as defineDocumentFormat, r as OPENAPI_33_PREVIEW_VERSION, t as defineApi } from "../api-Q23GAwx1.js";
2
- import { a as topicsFrom, c as PROBLEM_SCHEMA, d as mergeJson, f as pointerToken, i as safeKey, l as convertStandard, r as CLOUD_EVENT_TRAIT, s as DEFAULT_ERRORS, t as defineApiModel, u as pascal } from "../build-CRxrX567.js";
1
+ import { a as toOpenApi30Schema, n as openapiFormat, o as defineDocumentFormat, r as OPENAPI_33_PREVIEW_VERSION, t as defineApi } from "../api-Dq7hOzxh.js";
2
+ import { a as topicsFrom, c as PROBLEM_SCHEMA, d as mergeJson, f as pointerToken, i as safeKey, l as convertStandard, r as CLOUD_EVENT_TRAIT, s as DEFAULT_ERRORS, t as defineApiModel, u as pascal } from "../build-Ds53XOWu.js";
3
3
  import { t as FUNCTION_DESCRIPTOR } from "../function-contract-Bf6llTkE.js";
4
4
  import { r as isPlainObject } from "../clone-H_gCsL29.js";
5
5
  import { a as methodNotAllowed } from "../problem-BwplIuhI.js";
@@ -34,7 +34,7 @@ import { t as AUTHZ_VERSION_CLAIM } from "../claim-names-B3KyK7Js.js";
34
34
  import { c as snapshotOf } from "../snapshot-C1KUHKTc.js";
35
35
  import { c as requestOf, i as defineAuthorizer, r as checkPermission } from "../authorizer-DtUCjKBn.js";
36
36
  import { t as mailHeaders } from "../delivery-SmPHu2_H.js";
37
- import { t as defineApiModel } from "../build-CRxrX567.js";
37
+ import { t as defineApiModel } from "../build-Ds53XOWu.js";
38
38
  import { i as resolveConfig, r as generatorProblem } from "../config-cisS43w5.js";
39
39
  import { i as embedVectors } from "../knowledge-LNI5C6QT.js";
40
40
  import { n as toFhirPrescription } from "../prescriptions-CzY13vFr.js";
@@ -1,3 +1,3 @@
1
1
  // src/core/version.ts
2
- const VERSION = "0.61.0";
2
+ const VERSION = "0.61.1";
3
3
  export { VERSION as t };
@@ -1,4 +1,4 @@
1
- import { n as defineTool } from "../mcp-CULIbS-b.js";
1
+ import { n as defineTool } from "../mcp-B4bvacl4.js";
2
2
  // src/webmcp/webmcp.ts
3
3
  /** The WebMCP tool name rule: 1 to 128 ASCII letters, digits, `_`, `-` or `.`. */
4
4
  const TOOL_NAME = /^[A-Za-z0-9_.-]{1,128}$/;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "better-supabase",
3
- "version": "0.61.0",
3
+ "version": "0.61.1",
4
4
  "description": "Strongly typed Supabase: generated schema, typed repositories, plugins, auth glue, framework integrations and the better-supabase CLI.",
5
5
  "keywords": [
6
6
  "cli",
@@ -1 +0,0 @@
1
- export { t as addCommand } from "./add-ucxskHiv.js";
@@ -1 +0,0 @@
1
- export { t as powersyncStreamsCommand } from "./powersync-r6iL7zEo.js";