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,4 +1,4 @@
1
- import { li as AppTableConfig } from "./context-DNwBlpKo.js";
1
+ import { pi as AppTableConfig } from "./context-BlLvUNCj.js";
2
2
  /**
3
3
  * The columns every app table gets, which `columns` may not name: `id`,
4
4
  * `created_at`, `updated_at`, `user_id` and the tenant column
@@ -1,4 +1,4 @@
1
- import { qt as ResolvedConfig } from "./context-DNwBlpKo.js";
1
+ import { Zt as ResolvedConfig } from "./context-BlLvUNCj.js";
2
2
  /**
3
3
  * One block table as the config names it: unquoted schema and table, and each
4
4
  * logical column's written name, or `null` when an adopted table lacks it.
@@ -1,9 +1,9 @@
1
1
  import { n as CliError } from "./errors-DcJ_PayO.js";
2
2
  import { o as providerLabel } from "./authorization-DJkkOjjG.js";
3
3
  import { r as applyPlan } from "./files-DQayErI8.js";
4
- import { i as providerOwnsMemberships, r as layoutFor, t as MEMBERSHIP_CLAIM_MODULES } from "./providers-xmyaROnG.js";
4
+ import { i as providerOwnsMemberships, r as layoutFor, t as MEMBERSHIP_CLAIM_MODULES } from "./providers-Dr7FyvN1.js";
5
5
  import { n as addBlocksToJson, s as keyText, t as addBlocksToConfig } from "./config-edit-C6sQ1MqT.js";
6
- import { a as write, i as unlistedModuleFiles, r as nextStep } from "./sync-DFJfT7dH.js";
6
+ import { a as write, i as unlistedModuleFiles, r as nextStep } from "./sync-x1M-Ywqf.js";
7
7
  import { basename, dirname } from "node:path";
8
8
  import { readFile } from "node:fs/promises";
9
9
  import { DEFAULT_CONVENTIONS, PRESET_CATALOG, resolvePreset } from "better-supabase/preset";
@@ -0,0 +1 @@
1
+ export { t as addCommand } from "./add-yTy1CuMe.js";
@@ -1,22 +1,22 @@
1
1
  import { a as list, 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 VERSION } from "./version-AGe2VWGm.js";
3
+ import { t as VERSION } from "./version-CvNMxnwv.js";
4
4
  import { a as parseNames, n as CliError } from "./errors-DcJ_PayO.js";
5
5
  import { r as readIfExists, t as display } from "./io-CQzy8PEZ.js";
6
- import { t as loadSnapshot } from "./snapshot-D7h2oWfS.js";
6
+ import { t as loadSnapshot } from "./snapshot-BmBrjk2b.js";
7
7
  import { t as isRecord } 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 { a as findConfig, f as INTEGRATIONS, s as loadConfig } from "./config-C-DXllAX.js";
10
10
  import { i as changeLines, n as PLAN_ARGS, r as applyPlan, u as planResult } from "./files-DQayErI8.js";
11
- import { n as adoptionContext } from "./app-tables-DAHcDTFh.js";
12
- import { n as dataMigration } from "./migrations-Cq5hkJsa.js";
13
- 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-Bh7VzARh.js";
11
+ import { n as adoptionContext } from "./app-tables-CmY2GVb3.js";
12
+ import { n as dataMigration } from "./migrations-Dob5hF6K.js";
13
+ 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-CVtbyZQ4.js";
14
14
  import { n as installCommand, t as detectProject } from "./detect-BcUDaO8I.js";
15
15
  import { d as setBlockInJson, f as setPathInConfig, h as setPresetInJson, m as setPresetInConfig, n as addBlocksToJson, p as setPathInJson, r as addBlocksToWiring, t as addBlocksToConfig, u as setBlockInConfig } from "./config-edit-C6sQ1MqT.js";
16
- import { t as syncModules } from "./sync-DFJfT7dH.js";
17
- import { t as addModules } from "./add-BXfK7N0H.js";
18
- import { t as appTablePlan } from "./app-table-files-BR0zwJ7T.js";
19
- import { t as blockNames } from "./blocks-C4J4d_Jx.js";
16
+ import { t as syncModules } from "./sync-x1M-Ywqf.js";
17
+ import { t as addModules } from "./add-BhQZHdAv.js";
18
+ import { t as appTablePlan } from "./app-table-files-CSZU_cFC.js";
19
+ import { t as blockNames } from "./blocks-BO-v5N1q.js";
20
20
  import { i as sourceArgs, n as SOURCE_ARGS } from "./source-args-Deg53QHe.js";
21
21
  import { existsSync } from "node:fs";
22
22
  import { dirname, join, posix, resolve } from "node:path";
@@ -1,8 +1,8 @@
1
1
  import { n as CliError } from "./errors-DcJ_PayO.js";
2
2
  import { h as subjectTagArgs } from "./config-C-DXllAX.js";
3
3
  import { d as readSupabaseToml, n as declarativeSchemasDir } from "./supabase-toml-B6-eEV5p.js";
4
- import { r as layoutFor } from "./providers-xmyaROnG.js";
5
- import { r as literal } from "./live-XBM0kzT3.js";
4
+ import { r as layoutFor } from "./providers-Dr7FyvN1.js";
5
+ import { r as literal } from "./live-B86Xvfaj.js";
6
6
  import { join, resolve, sep } from "node:path";
7
7
  import { FIELD_FORMATS } from "better-supabase/config";
8
8
  import { APP_TABLES_MODULE, renderBlocks, setTableFeature } from "better-supabase/sql";
@@ -1,6 +1,6 @@
1
1
  import { t as accessProviderMode } from "./authorization-DJkkOjjG.js";
2
- import { s as writtenByBlocks } from "./sql-layout-CGlyhvQ1.js";
3
- import { s as qualified, t as catalogOf } from "./shared-3cetvs_N.js";
2
+ import { s as writtenByBlocks } from "./sql-layout-BevHhOrq.js";
3
+ import { s as qualified, t as catalogOf } from "./shared-d7o6xxEZ.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 { n as CliError, r as errorText } from "./errors-DcJ_PayO.js";
3
3
  import { i as isLocalDatabaseUrl, r as databaseHost } from "./agent-Tqq3MAqx.js";
4
4
  import { l as stdinDatabaseUrl, n as databaseUrl } from "./config-C-DXllAX.js";
5
5
  import { t as connect } from "./db-B8zfxjl2.js";
6
- import { n as ident } from "./live-XBM0kzT3.js";
6
+ import { n as ident } from "./live-B86Xvfaj.js";
7
7
  import { r as STACK_ARG, t as DB_URL_STDIN_ARG } from "./source-args-Deg53QHe.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-DMZQUy5b.js";
2
+ import { i as run } from "./run-aWo2fn_x.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,7 +1,7 @@
1
1
  import { m as commandMeta, r as defineCliCommand } from "./command-bvbsvYpo.js";
2
2
  import { n as CliError } from "./errors-DcJ_PayO.js";
3
3
  import { t as SQL_ARGS } from "./args-_ZVgRBkx.js";
4
- import { n as listModules, t as printModule } from "./print-BVeE5vr_.js";
4
+ import { n as listModules, t as printModule } from "./print-scQOZbuq.js";
5
5
  import { t as decodePresetInput } from "./preset-BQnjDCSR.js";
6
6
  import { BLOCK_CATEGORIES } from "better-supabase/blocks";
7
7
  import { PRESET_CATALOG, PRESET_NAMES, glueCommand } from "better-supabase/preset";
@@ -1 +1 @@
1
- export { n as blocksListCommand, r as blocksSearchCommand, i as blocksViewCommand } from "./blocks-C4J4d_Jx.js";
1
+ export { n as blocksListCommand, r as blocksSearchCommand, i as blocksViewCommand } from "./blocks-BO-v5N1q.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 { dirname, resolve } from "node:path";
3
3
  import { createHash } from "node:crypto";
4
4
  import { mkdir, readFile, rename, rm, writeFile } from "node:fs/promises";
@@ -4,7 +4,7 @@ import { n as CliError } from "./errors-DcJ_PayO.js";
4
4
  import { t as migrateCliCall } from "./moved-btVl2MAQ.js";
5
5
  import { t as isRecord$1 } from "./guards-DxwRG0Uv.js";
6
6
  import { a as changedFiles, i as changeLines, r as applyPlan, u as planResult } from "./files-DQayErI8.js";
7
- import { i as schemasDirOf, n as migrationsDir, s as writtenByBlocks } from "./sql-layout-CGlyhvQ1.js";
7
+ import { i as schemasDirOf, n as migrationsDir, s as writtenByBlocks } from "./sql-layout-BevHhOrq.js";
8
8
  import { a as configObject, c as mask, f as setPathInConfig, g as skipSpace, h as setPresetInJson, i as closingIndex, l as properties, m as setPresetInConfig, o as indentAt, p as setPathInJson, t as addBlocksToConfig, v as codeRanges } from "./config-edit-C6sQ1MqT.js";
9
9
  import { i as legacyPrefixNames, n as LEGACY_PREFIXES, t as LEGACY_CLAIMS } from "./legacy-prefix-D8Jfku6I.js";
10
10
  import { a as PLUGIN_IMPORT_RENAMES, l as SUBPATH_RENAMES_0_15, n as rewriteObjectInputCalls, r as BLOCK_EXPORT_RENAMES, s as REVIEW_0_15, u as renameSubpaths } from "./codemod-object-inputs-dn5dnZO_.js";
@@ -1,6 +1,6 @@
1
1
  import { r as readIfExists } from "./io-CQzy8PEZ.js";
2
- import { t as CACHE_DIR } from "./cache-DyhfGbUV.js";
3
- import { x as installedVersion } from "./snapshot-D7h2oWfS.js";
2
+ import { t as CACHE_DIR } from "./cache-VZU4FIOF.js";
3
+ import { x as installedVersion } from "./snapshot-BmBrjk2b.js";
4
4
  import { t as i } from "./jsonc-u_UiXFxs.js";
5
5
  import { resolve } from "node:path";
6
6
  import { createHash } from "node:crypto";
@@ -1,46 +1,46 @@
1
1
  import { a as list, 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 VERSION$1 } from "./version-AGe2VWGm.js";
3
+ import { t as VERSION$1 } from "./version-CvNMxnwv.js";
4
4
  import { n as CliError, r as errorText } from "./errors-DcJ_PayO.js";
5
5
  import { i as isLocalDatabaseUrl, r as databaseHost } from "./agent-Tqq3MAqx.js";
6
6
  import { a as sameText, t as display } from "./io-CQzy8PEZ.js";
7
- import { t as CACHE_DIR } from "./cache-DyhfGbUV.js";
7
+ import { t as CACHE_DIR } from "./cache-VZU4FIOF.js";
8
8
  import { t as byCodePoint } from "./compare-yl4sSwVn.js";
9
- import { C as satisfies, S as peerVersions, c as isSqliteLiteDriver, n as managementTarget, o as snapshotFile, r as openSource, s as liteDriverOf, t as loadSnapshot, u as MetadataRejectedError, x as installedVersion } from "./snapshot-D7h2oWfS.js";
10
- import { d as configFor, r as renderFiles, u as notNullTag } from "./render-Hvu_ZKtr.js";
9
+ import { C as satisfies, S as peerVersions, c as isSqliteLiteDriver, n as managementTarget, o as snapshotFile, r as openSource, s as liteDriverOf, t as loadSnapshot, u as MetadataRejectedError, x as installedVersion } from "./snapshot-BmBrjk2b.js";
10
+ import { d as configFor, r as renderFiles, u as notNullTag } from "./render-D8KGIoSK.js";
11
11
  import { o as providerLabel } from "./authorization-DJkkOjjG.js";
12
12
  import { t as isRecord } from "./guards-DxwRG0Uv.js";
13
- import { i as request } from "./source-ENOc1zZ9.js";
13
+ import { i as request } from "./source-CEPki4I3.js";
14
14
  import { l as stdinDatabaseUrl, m as withTableTags, n as databaseUrl } from "./config-C-DXllAX.js";
15
15
  import { a as findRepoRoot, c as httpHooks, d as readSupabaseToml, f as schemaPaths, h as tomlGet, i as diffEngine, l as migrationCommand, n as declarativeSchemasDir, p as sqlWorkflow, u as pgFunctionHooks } from "./supabase-toml-B6-eEV5p.js";
16
16
  import { t as PROCESS_ENV } from "./env-BLwQ6srP.js";
17
17
  import { n as readStackStatus } from "./stack-status-CTiDYKS8.js";
18
18
  import { t as connect } from "./db-B8zfxjl2.js";
19
- 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-BM9asZuL.js";
19
+ 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-5_KpJMOD.js";
20
20
  import { c as insideRoot, i as changeLines, r as applyPlan } from "./files-DQayErI8.js";
21
- import { n as migrationsDir, r as moduleLayoutFor, t as blockDeclaredTables } from "./sql-layout-CGlyhvQ1.js";
22
- import { a as permissionCatalogKeys, i as lineOf, l as tableObject, n as exposed, o as policyObject, r as exposedSchemas, s as qualified, t as catalogOf, u as workflowOf } from "./shared-3cetvs_N.js";
23
- import { i as appViewsOf, n as adoptionContext, r as appTablesOf, t as accessModule } from "./app-tables-DAHcDTFh.js";
24
- import { _ as BLOCK_PREFIX, a as METADATA_GAPS_TEXT, b as splinterTables, c as entitlementsModule, d as appliesTo, f as escape$3, 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-KdsUN7Qj.js";
25
- import { a as compiledReadSets } from "./providers-xmyaROnG.js";
26
- import { i as migrationHolds, o as migrationModules, r as latestMigration, t as MODULES_SUFFIX } from "./module-migration-BUd_MAbE.js";
27
- import { o as wiringFor, r as configInstances, t as MIGRATION_SAFETY_RULES } from "./migration-safety-Bh7VzARh.js";
21
+ import { n as migrationsDir, r as moduleLayoutFor, t as blockDeclaredTables } from "./sql-layout-BevHhOrq.js";
22
+ import { a as permissionCatalogKeys, i as lineOf, l as tableObject, n as exposed, o as policyObject, r as exposedSchemas, s as qualified, t as catalogOf, u as workflowOf } from "./shared-d7o6xxEZ.js";
23
+ import { i as appViewsOf, n as adoptionContext, r as appTablesOf, t as accessModule } from "./app-tables-CmY2GVb3.js";
24
+ import { _ as BLOCK_PREFIX, a as METADATA_GAPS_TEXT, b as splinterTables, c as entitlementsModule, d as appliesTo, f as escape$3, 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-BIAan13C.js";
25
+ import { a as compiledReadSets } from "./providers-Dr7FyvN1.js";
26
+ import { i as migrationHolds, o as migrationModules, r as latestMigration, t as MODULES_SUFFIX } from "./module-migration-BSOn1xPx.js";
27
+ import { o as wiringFor, r as configInstances, t as MIGRATION_SAFETY_RULES } from "./migration-safety-CVtbyZQ4.js";
28
28
  import { t as orphanedBlockFiles } from "./orphans-CPcR85QN.js";
29
- import { i as reservedRoles, n as ident$1, r as literal$1, t as LIVE_RULES } from "./live-XBM0kzT3.js";
29
+ import { i as reservedRoles, n as ident$1, r as literal$1, t as LIVE_RULES } from "./live-B86Xvfaj.js";
30
30
  import { a as sourceFlags, n as SOURCE_ARGS } from "./source-args-Deg53QHe.js";
31
31
  import { c as SPEC_SUBPATH_RENAMES, i as BLOCK_SUBPATH_RENAMES, o as PLUGIN_SUBPATH_RENAMES, r as BLOCK_EXPORT_RENAMES, t as findObjectInputCalls } from "./codemod-object-inputs-dn5dnZO_.js";
32
32
  import { n as PLATFORM_SCHEMAS } from "./in-stack-diff-huI7fGMX.js";
33
33
  import { a as staleVariables, i as stackEnvValues, r as redactValue, t as PREFIX_NAMES } from "./stack-env-BQhbUFa7.js";
34
34
  import { a as readSharedMemory, n as listStacks, t as branchName } from "./stacks-CEnRw_PH.js";
35
35
  import { t as detectWorkspace } from "./workspace-DRLyXr3q.js";
36
- import { i as refuseWithMetadata, r as readMetadataSnapshot } from "./metadata-dYoVRApT.js";
36
+ import { i as refuseWithMetadata, r as readMetadataSnapshot } from "./metadata-BCKNATUX.js";
37
37
  import { existsSync } from "node:fs";
38
38
  import { dirname, join, posix, relative, resolve } from "node:path";
39
39
  import { createHash } from "node:crypto";
40
40
  import { glob, mkdir, readFile, readdir, writeFile } from "node:fs/promises";
41
41
  import { CONFIG_DEFAULTS, DEFAULT_ACTIVE_TENANT, tenantClaimPaths, tenantNameOf } from "better-supabase/config";
42
42
  import { PRESET_CATALOG } from "better-supabase/preset";
43
- import { SECRET_COLUMNS, SQL_MODULES, TENANT_SCOPE_NAMES, TENANT_SCOPE_POLICY, adoptedTables, adoptedViews, appTablePolicyNotes, blockFileState, blockSqlVersion, blockTables, contractSignature, customContracts, dataExportPlan, excludedColumns, expiredFlagsQuery, hasColumnAccess, migrationOptionUses, moduleDeprecations, moduleEventTriggers, moduleFileVersion, moduleLayout, notNullCheckName, renderBlocks, resolveBlocks, sameBlockFile, sameTenantColumn, sameTenantTrigger, scopePolicyName, sharedRolesProblems, subjectColumns, tableTagComments, widenedCommands } from "better-supabase/sql";
43
+ import { SECRET_COLUMNS, SQL_MODULES, TENANT_SCOPE_NAMES, TENANT_SCOPE_POLICY, adoptedTables, adoptedViews, appTablePolicyNotes, appValues, blockFileState, blockSqlVersion, blockTables, checkValues, checkedValueMaps, contractSignature, customContracts, dataExportPlan, declaredCheckValues, excludedColumns, expiredFlagsQuery, hasColumnAccess, migrationOptionUses, moduleDeprecations, moduleEventTriggers, moduleFileVersion, moduleLayout, moduleSource, notNullCheckName, renderBlocks, resolveBlocks, sameBlockFile, sameTenantColumn, sameTenantTrigger, scopePolicyName, sharedRolesProblems, subjectColumns, tableTagComments, widenedCommands, writtenValues } from "better-supabase/sql";
44
44
  import { ENTITY_KEY_RENAMES, ENTITY_RENAMES_CODEMOD, EVENT_TYPE_RENAMES, EVENT_TYPE_SPLITS, HINT_RENAMES, currentEventTypes, isOldEventType, toSnake } from "better-supabase";
45
45
  import { RENAMES_CODEMOD, currentPermissionKeys, isOldPermissionKey } from "better-supabase/blocks/permissions";
46
46
  import { defineBucket, parseSize } from "better-supabase/storage";
@@ -557,6 +557,13 @@ const ADOPTION_RULES = [
557
557
  description: "A block runs over a table of the app's with `ownTablePolicies: \"app\"`, so it adds none of its `bsb_` policies there, and the table has no permissive policy for a command one of those policies would have granted. With row level security on, or off (the block's file turns it on), Postgres denies that command to every caller, so the block's functions that run as the caller and its TypeScript API find no rows for it. A missing `select` policy is a warning, a missing write policy is info. Add the app's own policy for each command the app uses, or set `ownTablePolicies` back to `block` for the block.",
558
558
  check: appTablesWithoutPolicies
559
559
  },
560
+ {
561
+ code: "BS361",
562
+ severity: "warning",
563
+ title: "App table's check rejects values a block writes",
564
+ description: "A block runs over one of your tables, and a check constraint or an enum on a column the block writes rejects a value the block writes into it. The module's own table declares the values it writes in its `check (column in (...))` constraint, and the block writes them through the column your config maps. A narrower check or enum makes the block's inserts and updates fail. Widen the check constraint or add the values to the enum.",
565
+ check: checkValuesOverAdoptedTables
566
+ },
560
567
  {
561
568
  code: "BS341",
562
569
  severity: "warning",
@@ -608,6 +615,125 @@ function patternOf(pattern) {
608
615
  return;
609
616
  }
610
617
  }
618
+ const TEXT_TYPES = /* @__PURE__ */ new Set([
619
+ "text",
620
+ "varchar",
621
+ "bpchar",
622
+ "char",
623
+ "citext",
624
+ "name"
625
+ ]);
626
+ /** The values an app column accepts: its enum, or its membership checks. */
627
+ function allowedValues(column, table, enums) {
628
+ if (column.isArray) return;
629
+ if (column.isEnum) {
630
+ const entry = enums.get(`${column.typeSchema}.${column.udt}`);
631
+ return entry === void 0 ? void 0 : {
632
+ values: new Set(entry.values),
633
+ enumName: `${entry.schema}.${entry.name}`
634
+ };
635
+ }
636
+ if (!TEXT_TYPES.has(column.udt)) return;
637
+ let found;
638
+ for (const check of table.checks) {
639
+ const parsed = checkValues(check.definition);
640
+ if (parsed === void 0 || parsed.column !== column.name) continue;
641
+ const accepted = new Set(parsed.values);
642
+ found = {
643
+ values: found === void 0 ? accepted : new Set([...found.values].filter((value) => accepted.has(value))),
644
+ constraint: found?.constraint ?? check.name
645
+ };
646
+ }
647
+ return found;
648
+ }
649
+ function managedTables(name, context) {
650
+ const module = SQL_MODULES[name];
651
+ const tables = module?.names?.tables;
652
+ if (module === void 0 || tables === void 0) return;
653
+ try {
654
+ const adoption = adoptionContext(context);
655
+ const layout = {
656
+ ...moduleLayout(context.config, void 0, [], void 0, adoption.accessProvider),
657
+ ownTables: appTablesOf(context),
658
+ ...appViewsOf(context)
659
+ };
660
+ return {
661
+ checks: declaredCheckValues([{ text: module.sql }]),
662
+ tables,
663
+ values: checkedValueMaps(`blocks.${name}`, context.config.blocks[name]?.values, tables),
664
+ sql: moduleSource(name, layout, context.config.blockNames) ?? module.sql
665
+ };
666
+ } catch (error) {
667
+ return error instanceof Error ? error : new Error(String(error));
668
+ }
669
+ }
670
+ /** `blocks.<name>.options.statuses`: the stored value a block gives a label. */
671
+ function optionValues(options, label) {
672
+ const statuses = options?.["statuses"];
673
+ if (!isRecord(statuses)) return [];
674
+ const value = statuses[label];
675
+ return typeof value === "string" && value.length > 0 ? [value] : [];
676
+ }
677
+ function checkRejectsMessage(table, logical, column, missing, allowed) {
678
+ const name = `${table.schema}.${table.table}`;
679
+ const values = missing.map((value) => `"${value}"`).join(", ");
680
+ const writes = `blocks.${table.module} writes ${values} into ${table.logical}.${logical}`;
681
+ if ("enumName" in allowed) return `${name}.${column} is the enum ${allowed.enumName}, which lacks ${values}, and ${writes}, so those writes fail. Add the values to the enum.`;
682
+ return `${name}.${column} allows ${[...allowed.values].map((value) => `"${value}"`).join(", ")}, and ${writes}, so those writes fail. Widen the check constraint ${allowed.constraint} to accept ${values}.`;
683
+ }
684
+ /** Checks of the app's tables that reject a value the module writes (BS361). */
685
+ function checkValuesOverAdoptedTables(context) {
686
+ const adopted = adoptedTables(context.config.blocks, appTablesOf(context), adoptionContext(context));
687
+ if (adopted.length === 0) return [];
688
+ const { tables, enums } = catalogOf(context);
689
+ const byName = new Map(tables.map((table) => [qualified(table), table]));
690
+ const enumByName = new Map(enums.map((entry) => [`${entry.schema}.${entry.name}`, entry]));
691
+ const rendered = /* @__PURE__ */ new Map();
692
+ const findings = [];
693
+ for (const adoptedTable of adopted) {
694
+ let managed = rendered.get(adoptedTable.module);
695
+ if (!rendered.has(adoptedTable.module)) {
696
+ managed = managedTables(adoptedTable.module, context);
697
+ rendered.set(adoptedTable.module, managed);
698
+ if (managed instanceof Error) findings.push({
699
+ severity: "info",
700
+ message: `blocks.${adoptedTable.module} could not be rendered with this config (${managed.message}), so doctor did not check the values it writes into your tables.`,
701
+ target: `blocks.${adoptedTable.module}`
702
+ });
703
+ }
704
+ if (managed === void 0 || managed instanceof Error) continue;
705
+ const spec = managed.tables[adoptedTable.logical];
706
+ if (spec === void 0) continue;
707
+ const name = `${adoptedTable.schema}.${adoptedTable.table}`;
708
+ const catalogTable = byName.get(name);
709
+ if (catalogTable === void 0) continue;
710
+ const logicalByColumn = new Map(Object.entries(spec.columns).map(([logical, column]) => [column, logical]));
711
+ for (const check of managed.checks) {
712
+ if (check.table.split(".").at(-1) !== spec.name) continue;
713
+ const logical = logicalByColumn.get(check.column);
714
+ if (logical === void 0) continue;
715
+ const physical = adoptedTable.columns[logical];
716
+ if (physical === void 0) continue;
717
+ const column = catalogTable.columns.find((entry) => entry.name === physical);
718
+ if (column === void 0) continue;
719
+ const allowed = allowedValues(column, catalogTable, enumByName);
720
+ if (allowed === void 0) continue;
721
+ const options = context.config.blocks[adoptedTable.module]?.options;
722
+ const written = new Set(writtenValues(managed.sql, `${adoptedTable.schema}.${adoptedTable.table}`, physical));
723
+ const missing = [...new Set(check.values.flatMap((label) => {
724
+ const mapped = optionValues(options, label);
725
+ const first = (mapped.length > 0 ? mapped : appValues(managed.values[adoptedTable.logical]?.[logical], label))[0];
726
+ return first !== void 0 && written.has(first) ? [first] : [];
727
+ }))].filter((value) => !allowed.values.has(value));
728
+ if (missing.length === 0) continue;
729
+ findings.push({
730
+ message: checkRejectsMessage(adoptedTable, logical, physical, missing, allowed),
731
+ target: `${name}.${physical}`
732
+ });
733
+ }
734
+ }
735
+ return findings;
736
+ }
611
737
  // src/cli/doctor/app-table-scope.ts
612
738
  const SCHEMA = "public";
613
739
  const COMMANDS$1 = [
@@ -1,22 +1,22 @@
1
1
  import { a as list, m as commandMeta, r as defineCliCommand } from "./command-bvbsvYpo.js";
2
2
  import { i as plain } from "./style-B5-nByxb.js";
3
3
  import { a as parseNames, i as failedResult, n as CliError } from "./errors-DcJ_PayO.js";
4
- import { u as catalogFingerprint } from "./cache-DyhfGbUV.js";
5
- import { a as serializeSnapshot, g as serializeGenerator, h as restrictSchemas, o as snapshotFile, r as openSource, t as loadSnapshot } from "./snapshot-D7h2oWfS.js";
4
+ import { u as catalogFingerprint } from "./cache-VZU4FIOF.js";
5
+ import { a as serializeSnapshot, g as serializeGenerator, h as restrictSchemas, o as snapshotFile, r as openSource, t as loadSnapshot } from "./snapshot-BmBrjk2b.js";
6
6
  import { d as GEN_TASKS, p as isGenTask } from "./config-C-DXllAX.js";
7
7
  import { c as insideRoot, r as applyPlan, u as planResult } from "./files-DQayErI8.js";
8
- import { n as runGen } from "./run-KdsUN7Qj.js";
9
- import { n as dataMigration } from "./migrations-Cq5hkJsa.js";
10
- import { t as syncModules } from "./sync-DFJfT7dH.js";
11
- import { t as addModules } from "./add-BXfK7N0H.js";
12
- import { n as listModules, t as printModule } from "./print-BVeE5vr_.js";
8
+ import { n as runGen } from "./run-BIAan13C.js";
9
+ import { n as dataMigration } from "./migrations-Dob5hF6K.js";
10
+ import { t as syncModules } from "./sync-x1M-Ywqf.js";
11
+ import { t as addModules } from "./add-BhQZHdAv.js";
12
+ import { n as listModules, t as printModule } from "./print-scQOZbuq.js";
13
13
  import { a as sourceFlags, i as sourceArgs, n as SOURCE_ARGS } from "./source-args-Deg53QHe.js";
14
- import { a as runMetadataGen, n as checkMetadataFlags, t as EMITS } from "./metadata-dYoVRApT.js";
14
+ import { a as runMetadataGen, n as checkMetadataFlags, t as EMITS } from "./metadata-BCKNATUX.js";
15
15
  import { a as runEnv } from "./env-Bco8UGR3.js";
16
- import { c as watchLoop, o as parseInterval, r as specOptionsFromConfig, s as stampFiles, t as runSpec } from "./spec-DGaKqtfR.js";
17
- import { n as runPowerSync } from "./powersync-Cb8xtLDc.js";
16
+ import { c as watchLoop, o as parseInterval, r as specOptionsFromConfig, s as stampFiles, t as runSpec } from "./spec-BKCoD-Ct.js";
17
+ import { n as runPowerSync } from "./powersync-aGKsgFN9.js";
18
18
  import { t as runSeed } from "./seed-C7eiVpBy.js";
19
- import { t as upgrade } from "./upgrade-C2Kdvrj-.js";
19
+ import { t as upgrade } from "./upgrade-BUDxM1EG.js";
20
20
  import { existsSync } from "node:fs";
21
21
  import { resolve } from "node:path";
22
22
  // src/cli/commands/sql.ts
@@ -764,5 +764,5 @@ export declare function emitModule(model: Model, options: EmitOptions): string;
764
764
  export declare function loadConfig(cwd: string, explicit?: string, environment?: string, path?: string | undefined, options?: {
765
765
  readonly legacyTables?: boolean;
766
766
  }): Promise<ResolvedConfig>;
767
- export declare const VERSION = "0.49.0";
767
+ export declare const VERSION = "0.50.0";
768
768
  export type { Catalog, CatalogCheck, CatalogColumn, CatalogColumnGrant, CatalogEnum, CatalogForeignKey, CatalogFunction, CatalogFunctionArg, CatalogGrant, CatalogIndex, CatalogPolicy, CatalogTable, CatalogTrigger, CatalogUnique, Choice, Cli, CliArgs, CliCommand, CliCommandDef, CliContext, CliEnv, CliErrorCode, CliErrorOptions, CliIo, CliLog, CliProblem, CliProblemExtensions, 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,12 +1,12 @@
1
1
  import { a as list, r as defineCliCommand } from "./command-bvbsvYpo.js";
2
- import { i as run, n as createCli, r as help, t as commandNames } from "./run-DMZQUy5b.js";
3
- import { t as VERSION } from "./version-AGe2VWGm.js";
2
+ import { i as run, n as createCli, r as help, t as commandNames } from "./run-aWo2fn_x.js";
3
+ import { t as VERSION } from "./version-CvNMxnwv.js";
4
4
  import { n as CliError, t as CLI_ERRORS_URL } from "./errors-DcJ_PayO.js";
5
- import { a as serializeSnapshot, i as parseSnapshot, l as introspect, t as loadSnapshot } from "./snapshot-D7h2oWfS.js";
6
- import { a as emitBlockConfig, l as buildModel, o as GENERATED_HEADER, r as renderFiles, s as emitModule } from "./render-Hvu_ZKtr.js";
7
- import { a as toCatalog, n as managementSource, r as pgSource } from "./source-ENOc1zZ9.js";
5
+ import { a as serializeSnapshot, i as parseSnapshot, l as introspect, t as loadSnapshot } from "./snapshot-BmBrjk2b.js";
6
+ import { a as emitBlockConfig, l as buildModel, o as GENERATED_HEADER, r as renderFiles, s as emitModule } from "./render-D8KGIoSK.js";
7
+ import { a as toCatalog, n as managementSource, r as pgSource } from "./source-CEPki4I3.js";
8
8
  import { s as loadConfig } from "./config-C-DXllAX.js";
9
- import { n as runGen } from "./run-KdsUN7Qj.js";
9
+ import { n as runGen } from "./run-BIAan13C.js";
10
10
  // src/cli/introspect/from-catalog.ts
11
11
  /**
12
12
  * Builds a snapshot from catalog records: the inverse of `toCatalog`. Tests and
@@ -2,17 +2,17 @@ import { a as list, m as commandMeta, r as defineCliCommand } from "./command-bv
2
2
  import { i as plain } from "./style-B5-nByxb.js";
3
3
  import { n as CliError } from "./errors-DcJ_PayO.js";
4
4
  import { r as readIfExists } from "./io-CQzy8PEZ.js";
5
- import { l as TYPEGEN_VERSION } from "./cache-DyhfGbUV.js";
6
- import { a as serializeSnapshot, t as loadSnapshot } from "./snapshot-D7h2oWfS.js";
7
- import { a as toCatalog } from "./source-ENOc1zZ9.js";
5
+ import { l as TYPEGEN_VERSION } from "./cache-VZU4FIOF.js";
6
+ import { a as serializeSnapshot, t as loadSnapshot } from "./snapshot-BmBrjk2b.js";
7
+ import { a as toCatalog } from "./source-CEPki4I3.js";
8
8
  import { a as findConfig, s as loadConfig } from "./config-C-DXllAX.js";
9
- import { r as contentMapperFiles } from "./content-mapper-BM9asZuL.js";
9
+ import { r as contentMapperFiles } from "./content-mapper-5_KpJMOD.js";
10
10
  import { c as insideRoot, i as changeLines, n as PLAN_ARGS, r as applyPlan, u as planResult } from "./files-DQayErI8.js";
11
- import { C as promptConventions, S as hasConventionFlags, _ as templatePlan, b as conventionFlags, c as AUTHZ_NOTE, d as chooseIntegrations, f as integrationFiles, g as templateContextFor, h as parseIntegrations, i as blocksWiringPath, l as createUrlParam, m as packagesFor, o as writeDesign, p as overwrite, r as blockConfigImport, s as readPresetInput, u as CANCELLED, v as CONVENTION_ARGS, w as withConventions, x as defaultConventions, y as CONVENTION_COMPLETIONS } from "./add-Ca3FNbhm.js";
12
- 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-Bh7VzARh.js";
11
+ import { C as promptConventions, S as hasConventionFlags, _ as templatePlan, b as conventionFlags, c as AUTHZ_NOTE, d as chooseIntegrations, f as integrationFiles, g as templateContextFor, h as parseIntegrations, i as blocksWiringPath, l as createUrlParam, m as packagesFor, o as writeDesign, p as overwrite, r as blockConfigImport, s as readPresetInput, u as CANCELLED, v as CONVENTION_ARGS, w as withConventions, x as defaultConventions, y as CONVENTION_COMPLETIONS } from "./add-yTy1CuMe.js";
12
+ 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-CVtbyZQ4.js";
13
13
  import { n as installCommand, t as detectProject } from "./detect-BcUDaO8I.js";
14
- import { s as enablePgDelta, t as syncModules } from "./sync-DFJfT7dH.js";
15
- import { t as appTablePlan } from "./app-table-files-BR0zwJ7T.js";
14
+ import { s as enablePgDelta, t as syncModules } from "./sync-x1M-Ywqf.js";
15
+ import { t as appTablePlan } from "./app-table-files-CSZU_cFC.js";
16
16
  import { n as suggestedPackage, t as detectWorkspace } from "./workspace-DRLyXr3q.js";
17
17
  import { existsSync } from "node:fs";
18
18
  import { join, posix, resolve } from "node:path";
@@ -1,6 +1,6 @@
1
1
  import { r as errorText } from "./errors-DcJ_PayO.js";
2
- import "./source-ENOc1zZ9.js";
3
- import { l as tableObject, n as exposed, s as qualified, t as catalogOf } from "./shared-3cetvs_N.js";
2
+ import "./source-CEPki4I3.js";
3
+ import { l as tableObject, n as exposed, s as qualified, t as catalogOf } from "./shared-d7o6xxEZ.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,6 +1,6 @@
1
1
  import { m as commandMeta, r as defineCliCommand } from "./command-bvbsvYpo.js";
2
- import { a as envelope, i as run } from "./run-DMZQUy5b.js";
3
- import { t as VERSION } from "./version-AGe2VWGm.js";
2
+ import { a as envelope, i as run } from "./run-aWo2fn_x.js";
3
+ import { t as VERSION } from "./version-CvNMxnwv.js";
4
4
  import { n as CliError } from "./errors-DcJ_PayO.js";
5
5
  import { n as consentToken } from "./agent-Tqq3MAqx.js";
6
6
  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-BLwQ6srP.js";
@@ -1,8 +1,8 @@
1
1
  import { n as CliError, r as errorText } from "./errors-DcJ_PayO.js";
2
2
  import { i as readStdin } from "./io-CQzy8PEZ.js";
3
- import { m as parseMetadataDocument, u as MetadataRejectedError } from "./snapshot-D7h2oWfS.js";
4
- import { c as metaPaths, n as render } from "./render-Hvu_ZKtr.js";
5
- import { i as generationNotices, n as runGen, o as fromMetadata, r as UNFORMATTED, t as refuseRowConditionedBuckets } from "./run-KdsUN7Qj.js";
3
+ import { m as parseMetadataDocument, u as MetadataRejectedError } from "./snapshot-BmBrjk2b.js";
4
+ import { c as metaPaths, n as render } from "./render-D8KGIoSK.js";
5
+ import { i as generationNotices, n as runGen, o as fromMetadata, r as UNFORMATTED, t as refuseRowConditionedBuckets } from "./run-BIAan13C.js";
6
6
  import { basename, join, relative, resolve, sep } from "node:path";
7
7
  import { readFile } from "node:fs/promises";
8
8
  import { jsonSchema, standardSchema, valibot, zod } from "better-supabase/config";
@@ -1,7 +1,7 @@
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
3
  import { n as PLAN_ARGS, r as applyPlan, u as planResult } from "./files-DQayErI8.js";
4
- import { t as appTablePlan } from "./app-table-files-BR0zwJ7T.js";
4
+ import { t as appTablePlan } from "./app-table-files-CSZU_cFC.js";
5
5
  // src/cli/commands/migrate.ts
6
6
  const MIGRATE_ARGS = {};
7
7
  /**
@@ -1,5 +1,5 @@
1
1
  import { f as INTEGRATIONS } from "./config-C-DXllAX.js";
2
- import { c as splitStatements } from "./shared-3cetvs_N.js";
2
+ import { c as splitStatements } from "./shared-d7o6xxEZ.js";
3
3
  import { dirname, join, posix } from "node:path";
4
4
  import { readdir } from "node:fs/promises";
5
5
  import { INTEGRATION_INFO, groupEntries } from "better-supabase/config";
@@ -1,7 +1,7 @@
1
1
  import { d as readSupabaseToml, p as sqlWorkflow } from "./supabase-toml-B6-eEV5p.js";
2
2
  import { 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";
3
+ import { n as migrationsDir, o as sqlPlan } from "./sql-layout-BevHhOrq.js";
4
+ import { r as layoutFor } from "./providers-Dr7FyvN1.js";
5
5
  import { resolve } from "node:path";
6
6
  import { readFile, readdir } from "node:fs/promises";
7
7
  import { moduleSchemaExtensions, renderBlocks } from "better-supabase/sql";
@@ -1,7 +1,7 @@
1
1
  import { d as readSupabaseToml, p as sqlWorkflow } from "./supabase-toml-B6-eEV5p.js";
2
2
  import { 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 { i as stampAfter } from "./migrations-Cq5hkJsa.js";
3
+ import { n as migrationsDir, o as sqlPlan } from "./sql-layout-BevHhOrq.js";
4
+ import { i as stampAfter } from "./migrations-Dob5hF6K.js";
5
5
  import { resolve } from "node:path";
6
6
  import { readFile, readdir } from "node:fs/promises";
7
7
  import { moduleSchemaExtensions } from "better-supabase/sql";
@@ -0,0 +1 @@
1
+ export { t as powersyncStreamsCommand } from "./powersync-aGKsgFN9.js";
@@ -1,8 +1,8 @@
1
1
  import { m as commandMeta, r as defineCliCommand } from "./command-bvbsvYpo.js";
2
2
  import { n as PLAN_ARGS, r as applyPlan, u as planResult } from "./files-DQayErI8.js";
3
- import { a as snapshotColumnTypes, n as migrationsDir } from "./sql-layout-CGlyhvQ1.js";
4
- import { r as layoutFor } from "./providers-xmyaROnG.js";
5
- import { i as stampAfter } from "./migrations-Cq5hkJsa.js";
3
+ import { a as snapshotColumnTypes, n as migrationsDir } from "./sql-layout-BevHhOrq.js";
4
+ import { r as layoutFor } from "./providers-Dr7FyvN1.js";
5
+ import { i as stampAfter } from "./migrations-Dob5hF6K.js";
6
6
  import { existsSync } from "node:fs";
7
7
  import { join, resolve } from "node:path";
8
8
  import { readFile, readdir } from "node:fs/promises";
@@ -1,6 +1,6 @@
1
1
  import { n as CliError } from "./errors-DcJ_PayO.js";
2
- import { n as layout } from "./providers-xmyaROnG.js";
3
- import { o as migrationModules, r as latestMigration, u as writesMigrations } from "./module-migration-BUd_MAbE.js";
2
+ import { n as layout } from "./providers-Dr7FyvN1.js";
3
+ import { o as migrationModules, r as latestMigration, u as writesMigrations } from "./module-migration-BSOn1xPx.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 { n as CliError } from "./errors-DcJ_PayO.js";
2
2
  import { a as moduleKeyProblems, i as entitlementsMode, t as accessProviderMode } from "./authorization-DJkkOjjG.js";
3
3
  import { t as importFresh } from "./fresh-import-CdO2oQaQ.js";
4
- import { i as schemasDirOf, r as moduleLayoutFor } from "./sql-layout-CGlyhvQ1.js";
4
+ import { i as schemasDirOf, r as moduleLayoutFor } from "./sql-layout-BevHhOrq.js";
5
5
  import { resolve } from "node:path";
6
6
  import { compileReadSets, moduleLayout, modulePermissionKeys, resolveBlocks } from "better-supabase/sql";
7
7
  import { isReadSet } from "better-supabase";
@@ -3,7 +3,7 @@ import { n as CliError, r as errorText } from "./errors-DcJ_PayO.js";
3
3
  import { i as isLocalDatabaseUrl, r as databaseHost } from "./agent-Tqq3MAqx.js";
4
4
  import { l as stdinDatabaseUrl, n as databaseUrl } from "./config-C-DXllAX.js";
5
5
  import { t as connect } from "./db-B8zfxjl2.js";
6
- import { n as ident } from "./live-XBM0kzT3.js";
6
+ import { n as ident } from "./live-B86Xvfaj.js";
7
7
  import { r as STACK_ARG, t as DB_URL_STDIN_ARG } from "./source-args-Deg53QHe.js";
8
8
  // src/cli/commands/prune-workflows.ts
9
9
  const TERMINAL = [
@@ -3,15 +3,15 @@ import { i as plain } from "./style-B5-nByxb.js";
3
3
  import { n as CliError } from "./errors-DcJ_PayO.js";
4
4
  import { r as readIfExists, t as display } from "./io-CQzy8PEZ.js";
5
5
  import { i as changeLines, n as PLAN_ARGS, r as applyPlan, t as HAND_EDITED, u as planResult } from "./files-DQayErI8.js";
6
- import { o as sqlPlan } from "./sql-layout-CGlyhvQ1.js";
7
- import { r as layoutFor } from "./providers-xmyaROnG.js";
8
- import { g as templateContextFor, i as blocksWiringPath, n as blockClients } from "./add-Ca3FNbhm.js";
6
+ import { o as sqlPlan } from "./sql-layout-BevHhOrq.js";
7
+ import { r as layoutFor } from "./providers-Dr7FyvN1.js";
8
+ import { g as templateContextFor, i as blocksWiringPath, n as blockClients } from "./add-yTy1CuMe.js";
9
9
  import { t as detectProject } from "./detect-BcUDaO8I.js";
10
10
  import { _ as wiringBlocks, a as configObject, c as mask, i as closingIndex, l as properties, n as addBlocksToJson, t as addBlocksToConfig } from "./config-edit-C6sQ1MqT.js";
11
- import { n as guardedRemoval } from "./sync-DFJfT7dH.js";
12
- import { n as isComposite } from "./add-BXfK7N0H.js";
11
+ import { n as guardedRemoval } from "./sync-x1M-Ywqf.js";
12
+ import { n as isComposite } from "./add-BhQZHdAv.js";
13
13
  import { t as SQL_ARGS } from "./args-_ZVgRBkx.js";
14
- import { t as blockNames } from "./blocks-C4J4d_Jx.js";
14
+ import { t as blockNames } from "./blocks-BO-v5N1q.js";
15
15
  import { i as tidyInline, t as cutRange } from "./config-group-D4JWh4kG.js";
16
16
  import { existsSync } from "node:fs";
17
17
  import { resolve } from "node:path";