better-supabase 0.34.0 → 0.35.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 (154) hide show
  1. package/dist/ai-sdk/agents/index.d.ts +2 -2
  2. package/dist/{app-tables-Don-aNOB.d.ts → app-tables-X3yzJljM.d.ts} +1 -1
  3. package/dist/{authorization-DpVtxuKM.d.ts → authorization-D1P3VBOd.d.ts} +37 -0
  4. package/dist/{automations-Bw5cX7oj.js → automations-D4QTP8nI.js} +2 -1
  5. package/dist/{bind-BA05aoY9.d.ts → bind-Bvv-Zrdh.d.ts} +1 -1
  6. package/dist/{block-env-UX42PHLP.d.ts → block-env-h_uPl2f_.d.ts} +3 -3
  7. package/dist/{block-tables-Bre1zjau.d.ts → block-tables-pj3eHfoP.d.ts} +1 -1
  8. package/dist/blocks/ai-chat/index.d.ts +3 -3
  9. package/dist/blocks/announcements/index.d.ts +3 -3
  10. package/dist/blocks/api-keys/index.d.ts +1 -1
  11. package/dist/blocks/attachments/index.d.ts +1 -1
  12. package/dist/blocks/audit/index.d.ts +2 -2
  13. package/dist/blocks/automations/index.d.ts +1 -1
  14. package/dist/blocks/billing/index.d.ts +1 -1
  15. package/dist/blocks/bookings/index.d.ts +1 -1
  16. package/dist/blocks/calendar/index.d.ts +1 -1
  17. package/dist/blocks/catalog/index.d.ts +15 -0
  18. package/dist/blocks/catalog/index.js +23 -8
  19. package/dist/blocks/comments/index.d.ts +4 -4
  20. package/dist/blocks/deals/index.js +1 -1
  21. package/dist/blocks/entitlements/index.d.ts +2 -2
  22. package/dist/blocks/forms/index.d.ts +1 -1
  23. package/dist/blocks/inbox/index.d.ts +4 -4
  24. package/dist/blocks/index.d.ts +1 -1
  25. package/dist/blocks/invoices/index.d.ts +4 -0
  26. package/dist/blocks/invoices/index.js +6 -3
  27. package/dist/blocks/messaging/index.d.ts +4 -4
  28. package/dist/blocks/mfa/index.d.ts +1 -1
  29. package/dist/blocks/notifications/index.d.ts +3 -3
  30. package/dist/blocks/onboarding/index.d.ts +1 -1
  31. package/dist/blocks/organizations/index.d.ts +2 -2
  32. package/dist/blocks/permissions/index.d.ts +1 -1
  33. package/dist/blocks/push/index.d.ts +1 -1
  34. package/dist/blocks/quotes/index.js +1 -1
  35. package/dist/blocks/reactions/index.d.ts +3 -3
  36. package/dist/blocks/saved-views/index.d.ts +1 -1
  37. package/dist/blocks/search/index.d.ts +2 -2
  38. package/dist/blocks/sessions/index.d.ts +1 -1
  39. package/dist/blocks/settings/index.d.ts +1 -1
  40. package/dist/blocks/subjects/index.d.ts +1 -1
  41. package/dist/blocks/tags/index.d.ts +1 -1
  42. package/dist/blocks/time-tracking/index.js +1 -1
  43. package/dist/blocks/undo/index.d.ts +1 -1
  44. package/dist/blocks/usage/index.d.ts +1 -1
  45. package/dist/blocks/workflow-editor/index.d.ts +3 -3
  46. package/dist/blocks/workflows/index.d.ts +3 -3
  47. package/dist/claims/index.d.ts +3 -3
  48. package/dist/cli/add-BaB3y1lv.js +1 -0
  49. package/dist/cli/{add-THXE7juv.js → add-CYreXA68.js} +9 -9
  50. package/dist/cli/{add-DoEtJhZG.js → add-DzgsOE8V.js} +2 -2
  51. package/dist/cli/{app-table-files-BqLd5TuX.js → app-table-files-BnISa3uY.js} +2 -2
  52. package/dist/cli/{backfill-D-2W0fNT.js → backfill-BLLTSDSa.js} +1 -1
  53. package/dist/cli/bin.js +1 -1
  54. package/dist/cli/{blocks-XwUHeyUH.js → blocks-CpRvI7x8.js} +1 -1
  55. package/dist/cli/{blocks-BVU_FoLo.js → blocks-uzh1g_0v.js} +1 -1
  56. package/dist/cli/{cache-D4nwCBXc.js → cache-BPWC7tGD.js} +1 -1
  57. package/dist/cli/{codemod-Dh4lf_k4.js → codemod-CbJVS_kG.js} +1 -1
  58. package/dist/cli/{content-mapper-CwFH_PEn.js → content-mapper-Cjkm2Sg3.js} +2 -2
  59. package/dist/cli/{doctor-CyAMbZ_s.js → doctor-D94FEJZs.js} +19 -19
  60. package/dist/cli/{gen-EAUNnUY7.js → gen-Cd0VNDjE.js} +11 -11
  61. package/dist/cli/index.d.ts +1 -1
  62. package/dist/cli/index.js +6 -6
  63. package/dist/cli/{init-BRmmmGHJ.js → init-Co1N9ZoA.js} +8 -8
  64. package/dist/cli/{live-CV9mn-xC.js → live-NFNeZsP7.js} +2 -2
  65. package/dist/cli/{mcp-CnaxcLWa.js → mcp-WZ8t7NMz.js} +2 -2
  66. package/dist/cli/{metadata-CFQGBR5E.js → metadata-BzMkmrZR.js} +3 -3
  67. package/dist/cli/{migrate-z5oHDGNs.js → migrate-C9gyDAV7.js} +1 -1
  68. package/dist/cli/{migration-safety-BtAPMEZa.js → migration-safety-BNi8PIiM.js} +1 -1
  69. package/dist/cli/{migrations-CNa62JSi.js → migrations-Ds0J_TmZ.js} +2 -2
  70. package/dist/cli/{module-migration-CKJ8kRm1.js → module-migration-hFrlzQZ5.js} +2 -2
  71. package/dist/cli/powersync-J2Kms2NT.js +1 -0
  72. package/dist/cli/{powersync-BgoAWeRT.js → powersync-oFiwgsBi.js} +3 -3
  73. package/dist/cli/{print-CoqKHoy0.js → print-BtreoJSm.js} +2 -2
  74. package/dist/cli/{providers-CfbFxUOQ.js → providers-Be2dgyuR.js} +1 -1
  75. package/dist/cli/{prune-workflows-BigCoXLw.js → prune-workflows-BPxgRrqY.js} +1 -1
  76. package/dist/cli/{remove-C9zwn-Kk.js → remove-B4ad996E.js} +5 -5
  77. package/dist/cli/{render-DQCU_kBW.js → render-C-Mfq-o3.js} +3 -3
  78. package/dist/cli/{run-DOD00FFl.js → run-D2nuyyPo.js} +47 -39
  79. package/dist/cli/{run-CVaBuT18.js → run-cLdnJHH0.js} +25 -25
  80. package/dist/cli/{shared-COtj7l3r.js → shared-DCHxLAEL.js} +1 -1
  81. package/dist/cli/{snapshot-BvlEmTB0.js → snapshot-CloKPNxv.js} +2 -2
  82. package/dist/cli/{source-BhZRCitG.js → source-Bwyp18Rj.js} +1 -1
  83. package/dist/cli/{spec-DsMWuJLv.js → spec-DAUF4ybu.js} +2 -2
  84. package/dist/cli/{spec-Bo2wIViH.js → spec-DsVq4_qV.js} +1 -1
  85. package/dist/cli/{sql-layout-CA7xgRjR.js → sql-layout-CHpEL0oq.js} +3 -3
  86. package/dist/cli/{sync-D9xSGdzO.js → sync-DZu1r34s.js} +4 -4
  87. package/dist/cli/{upgrade-XK_CQKVJ.js → upgrade-A-BALvp3.js} +2 -2
  88. package/dist/cli/{upgrade-Ykf0LLEB.js → upgrade-Bpvi70zm.js} +5 -5
  89. package/dist/cli/{version-Dfdz7KSh.js → version-B59mZJoy.js} +1 -1
  90. package/dist/client/index.d.ts +5 -5
  91. package/dist/client/native/index.d.ts +4 -4
  92. package/dist/config/index.d.ts +2 -2
  93. package/dist/config/index.js +4 -4
  94. package/dist/{config-Bu6pwqcO.js → config-BZWSFxkG.js} +3 -3
  95. package/dist/{config-MDRA2sre.js → config-DQP0IvDX.js} +1 -1
  96. package/dist/{context-BGC0J3t9.d.ts → context-CderJRZf.d.ts} +1 -1
  97. package/dist/contract/index.d.ts +3 -3
  98. package/dist/{controller-CQrkLoRX.d.ts → controller-DaWA9eWS.d.ts} +1 -1
  99. package/dist/create/index.d.ts +3 -3
  100. package/dist/create/index.js +3 -3
  101. package/dist/create/lite/index.d.ts +3 -3
  102. package/dist/create/lite/index.js +2 -2
  103. package/dist/{entitlements-BOWTZaRf.d.ts → entitlements-BefkpQIz.d.ts} +1 -1
  104. package/dist/{field-errors-DxPZYw2m.d.ts → field-errors-D1meOs_H.d.ts} +4 -4
  105. package/dist/{index-QTZIopQj.d.ts → index-BQlLxOj5.d.ts} +1 -1
  106. package/dist/{index-CJB50jzQ.d.ts → index-BbDiBiKt.d.ts} +4 -4
  107. package/dist/{index-Bz0WLuh_.d.ts → index-C13UgV67.d.ts} +2 -2
  108. package/dist/{index-Bhkag9ZE.d.ts → index-ChLuLxy-.d.ts} +6 -6
  109. package/dist/{index-CeUwyJ3Z.d.ts → index-D9aV0Fvx.d.ts} +2 -2
  110. package/dist/{index-BfU0KR0X.d.ts → index-DXUiRyEk.d.ts} +1 -1
  111. package/dist/{index-DNAkWDXc.d.ts → index-ZQZMQF4l.d.ts} +1 -1
  112. package/dist/{instances-D31jrmKh.js → instances-D9YrkoAy.js} +28 -1
  113. package/dist/mapper/bin.js +5 -5
  114. package/dist/mcp/index.d.ts +1 -1
  115. package/dist/next/index.d.ts +4 -4
  116. package/dist/{operations-BG6prEnh.d.ts → operations-t_hlXkS4.d.ts} +1 -1
  117. package/dist/{options-CgMiQGOF.js → options-C9bp3SEA.js} +2 -0
  118. package/dist/{options-Sq4bYbf5.js → options-CuaWhsQS.js} +2 -0
  119. package/dist/{options-DjFbIRgV.js → options-DjdxZgHi.js} +2 -1
  120. package/dist/{options-C-NFS6e3.js → options-DxgZ8tVc.js} +2 -1
  121. package/dist/otel/index.js +4 -4
  122. package/dist/{permissions-CoHsUtZS.d.ts → permissions-C8p6RlIZ.d.ts} +1 -1
  123. package/dist/{ports-XvgCe7ey.d.ts → ports-C-8uduFM.d.ts} +1 -1
  124. package/dist/powersync/index.d.ts +2 -2
  125. package/dist/preset/index.d.ts +3 -3
  126. package/dist/preset/index.js +3 -3
  127. package/dist/{preset-om2rbdYw.js → preset-B_sSI9vg.js} +2 -2
  128. package/dist/{project-B7nqCzn5.js → project-DVlXQGEp.js} +5 -5
  129. package/dist/{push-token-kcc04ZaS.d.ts → push-token-D41lOoE8.d.ts} +1 -1
  130. package/dist/react/index.d.ts +5 -5
  131. package/dist/react/native/index.d.ts +1 -1
  132. package/dist/react/server.d.ts +5 -5
  133. package/dist/realtime/index.d.ts +3 -3
  134. package/dist/records/index.d.ts +3 -3
  135. package/dist/{resolved-names-DYYyh35i.js → resolved-names-h-3UbKcw.js} +1 -1
  136. package/dist/server/index.d.ts +3 -3
  137. package/dist/solid/index.d.ts +5 -5
  138. package/dist/sql/index.d.ts +5 -5
  139. package/dist/sql/index.js +2 -2
  140. package/dist/{sql-DdtukoIm.js → sql-C9nO-Mat.js} +250 -88
  141. package/dist/ssr/index.d.ts +1 -1
  142. package/dist/svelte/index.d.ts +5 -5
  143. package/dist/{tenant-DkKbvK5T.d.ts → tenant-gezshhcs.d.ts} +1 -1
  144. package/dist/testing/index.d.ts +3 -3
  145. package/dist/testing/index.js +1 -1
  146. package/dist/{topic-B6zuexk7.d.ts → topic-BVq5RdsI.d.ts} +1 -1
  147. package/dist/{types-BvHw2cCS.d.ts → types-hTj5OuFo.d.ts} +2 -2
  148. package/dist/vue/index.d.ts +5 -5
  149. package/dist/{watch-topic-YYSVJGDY.d.ts → watch-topic-BOclyLFd.d.ts} +1 -1
  150. package/dist/yjs/index.d.ts +1 -1
  151. package/package.json +1 -1
  152. package/schemas/config-v1.json +36 -0
  153. package/dist/cli/add-C13ZqJ_N.js +0 -1
  154. package/dist/cli/powersync-DoCruiOt.js +0 -1
@@ -7,9 +7,9 @@ import { a as BlockTenantOptions, r as BlockTemporalOptions } from "../../block-
7
7
  import { a as dbTransport, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-BEtC_Kis.js";
8
8
  import { n as BlockHooks } from "../../block-hooks-DrA_d1dJ.js";
9
9
  import { c as BlockOf } from "../../define-block-COmMkx2x.js";
10
- import { p as SubscriptionStatus } from "../../topic-B6zuexk7.js";
11
- import { n as TopicPort } from "../../watch-topic-YYSVJGDY.js";
12
- import { n as Controller, t as AuthPort } from "../../controller-CQrkLoRX.js";
10
+ import { p as SubscriptionStatus } from "../../topic-BVq5RdsI.js";
11
+ import { n as TopicPort } from "../../watch-topic-BOclyLFd.js";
12
+ import { n as Controller, t as AuthPort } from "../../controller-DaWA9eWS.js";
13
13
  interface ReactionsOptions extends BlockTemporalOptions, BlockTenantOptions {
14
14
  readonly transport: BlockTransport;
15
15
  /**
@@ -7,7 +7,7 @@ import { t as BlockTransport } from "../../block-transport-BEtC_Kis.js";
7
7
  import { n as BlockHooks } from "../../block-hooks-DrA_d1dJ.js";
8
8
  import { c as BlockOf } from "../../define-block-COmMkx2x.js";
9
9
  import { p as ListQueryInput } from "../../list-query-C7V8kUaD.js";
10
- import { n as Controller } from "../../controller-CQrkLoRX.js";
10
+ import { n as Controller } from "../../controller-DaWA9eWS.js";
11
11
  import { t as RankNeighbors } from "../../rank-result-B_xLQCBV.js";
12
12
  export declare const SAVED_VIEW_KINDS: readonly ["table", "board", "calendar", "timeline", "gantt"];
13
13
  type SavedViewKind = (typeof SAVED_VIEW_KINDS)[number];
@@ -6,8 +6,8 @@ import { a as dbTransport, o as rpcTransport, s as sqlTransport, t as BlockTrans
6
6
  import { n as BlockHooks } from "../../block-hooks-DrA_d1dJ.js";
7
7
  import { c as BlockOf } from "../../define-block-COmMkx2x.js";
8
8
  import { i as EventSink } from "../../cloud-event-DXWmXrus.js";
9
- import { i as KeyboardPort } from "../../ports-XvgCe7ey.js";
10
- import { n as Controller } from "../../controller-CQrkLoRX.js";
9
+ import { i as KeyboardPort } from "../../ports-C-8uduFM.js";
10
+ import { n as Controller } from "../../controller-DaWA9eWS.js";
11
11
  interface SearchOptions extends Pick<BlockOptions, "transport" | "service" | "schema" | "mappers"> {
12
12
  /** `withBlockHooks` hooks around the methods. */
13
13
  readonly hooks?: BlockHooks<Search>;
@@ -1,7 +1,7 @@
1
1
  /// <reference lib="esnext.temporal" />
2
2
  import { b as DbError, f as Result } from "../../result-DTOQRyGY.js";
3
3
  import { r as Block } from "../../define-block-COmMkx2x.js";
4
- import { n as Controller, t as AuthPort } from "../../controller-CQrkLoRX.js";
4
+ import { n as Controller, t as AuthPort } from "../../controller-DaWA9eWS.js";
5
5
  import { t as AuthReply } from "../../auth-reply-BMPJQssh.js";
6
6
  /** An OAuth client as the Auth OAuth server describes it. */
7
7
  interface RawOAuthClient {
@@ -5,7 +5,7 @@ import { n as BlockOptions } from "../../block-helpers-disoUWCp.js";
5
5
  import { a as dbTransport, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-BEtC_Kis.js";
6
6
  import { n as BlockHooks } from "../../block-hooks-DrA_d1dJ.js";
7
7
  import { c as BlockOf } from "../../define-block-COmMkx2x.js";
8
- import { n as Controller, t as AuthPort } from "../../controller-CQrkLoRX.js";
8
+ import { n as Controller, t as AuthPort } from "../../controller-DaWA9eWS.js";
9
9
  import { StandardSchemaV1 } from "@standard-schema/spec";
10
10
  /**
11
11
  * One setting: its Standard Schema and the value `get` returns when none is
@@ -2,7 +2,7 @@ import { b as DbError } from "../../result-DTOQRyGY.js";
2
2
  import { $ as RecordRef } from "../../types-BkYEUWdz.js";
3
3
  import { a as dbTransport, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-BEtC_Kis.js";
4
4
  import { c as BlockOf } from "../../define-block-COmMkx2x.js";
5
- import { n as Controller, t as AuthPort } from "../../controller-CQrkLoRX.js";
5
+ import { n as Controller, t as AuthPort } from "../../controller-DaWA9eWS.js";
6
6
  import { t as subjectKey } from "../../block-subjects-Br2MQNFn.js";
7
7
  import { c as Subjects, d as MY_WORK_KINDS, f as MyWorkKind, l as SubjectsOptions, n as MyWorkItem, o as ResolvedSubject, r as MyWorkOptions, s as SUBJECT_TITLES_LIMIT, t as MY_WORK_LIMIT, u as createSubjects } from "../../subjects-Bv2dPflD.js";
8
8
  /** The `subjects` block's manifest (ADR 0029). */
@@ -7,7 +7,7 @@ import { n as Logger } from "../../logger-0LfhvwE4.js";
7
7
  import { n as BlockOptions } from "../../block-helpers-disoUWCp.js";
8
8
  import { n as BlockHooks } from "../../block-hooks-DrA_d1dJ.js";
9
9
  import { Sn as EntitySchema, c as BlockOf, ln as RecordBindingWrite, rn as RecordBinding } from "../../define-block-COmMkx2x.js";
10
- import { n as Controller, t as AuthPort } from "../../controller-CQrkLoRX.js";
10
+ import { n as Controller, t as AuthPort } from "../../controller-DaWA9eWS.js";
11
11
  import { t as RankNeighbors } from "../../rank-result-B_xLQCBV.js";
12
12
  interface TagsOptions<S extends StandardSchemaV1 | undefined = undefined> extends BlockOptions {
13
13
  /**
@@ -2,7 +2,7 @@ import { n as isRecord } from "../../guards-CsRa6v57.js";
2
2
  import { s as nowInstant } from "../../temporal-DKTdGK9i.js";
3
3
  import { t as temporal } from "../../temporal-required-w_2u4EDp.js";
4
4
  import { t as AsyncResult } from "../../result-8xza7w5W.js";
5
- import { t as timeTrackingSqlOptions } from "../../options-DjFbIRgV.js";
5
+ import { t as timeTrackingSqlOptions } from "../../options-DjdxZgHi.js";
6
6
  import { r as defineMetric } from "../../metric-definition-D4H6IQT7.js";
7
7
  import { n as event, t as defineEvents } from "../../event-map-DxfsFgQT.js";
8
8
  import { A as recordsOf, C as optionalInstant, L as textOf, O as recordOf, U as rpcTransport, V as dbTransport, W as sqlTransport, d as enumOrThrow, j as requiredInstant, m as instantArg, n as applyTemporal, o as blockCall, w as optionalText } from "../../block-helpers-I7UzjNEf.js";
@@ -1,6 +1,6 @@
1
1
  import { a as dbTransport, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-BEtC_Kis.js";
2
2
  import { c as BlockOf } from "../../define-block-COmMkx2x.js";
3
- import { n as Controller } from "../../controller-CQrkLoRX.js";
3
+ import { n as Controller } from "../../controller-DaWA9eWS.js";
4
4
  import { a as UndoToken, c as undoToken, i as UndoOptions, n as Undo, o as createUndo, r as UndoCall, s as isUndoToken, t as UNDO_FUNCTIONS } from "../../undo-22ofP6Zp.js";
5
5
  interface UndoEntry {
6
6
  readonly id: number;
@@ -3,7 +3,7 @@ import { a as dbTransport, o as rpcTransport, s as sqlTransport, t as BlockTrans
3
3
  import { n as StripeSource, t as StripeClient } from "../../stripe-Bl-sjnl6.js";
4
4
  import { _ as reportUsageToStripe, a as Usage, c as UsageEntry, d as UsageMeterInfo, f as UsageOptions, g as createUsage, h as UsageStatus, i as ReportUsageResult, l as UsageHistoryEntry, m as UsageRecorded, n as RecordUsageOptions, o as UsageBatchRecorded, p as UsagePeriod, r as ReportUsageOptions, s as UsageBreakdownEntry, t as PurgeUsageOptions, u as UsageHistoryOptions } from "../../usage-CNCT6_3D.js";
5
5
  import { c as BlockOf } from "../../define-block-COmMkx2x.js";
6
- import { n as Controller, t as AuthPort } from "../../controller-CQrkLoRX.js";
6
+ import { n as Controller, t as AuthPort } from "../../controller-DaWA9eWS.js";
7
7
  /** The `usage` block's manifest (ADR 0029). */
8
8
  export declare const usageBlock: BlockOf<"usage", typeof createUsage>;
9
9
  interface UsageMeterControllerOptions {
@@ -5,9 +5,9 @@ import { Ct as Events, gt as WorkflowEventData } from "../../events-DVt3Z9hw.js"
5
5
  import { a as dbTransport, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-BEtC_Kis.js";
6
6
  import { c as BlockOf } from "../../define-block-COmMkx2x.js";
7
7
  import { g as Workflows, n as WorkflowRun } from "../../workflows-BljkWRxE.js";
8
- import { p as SubscriptionStatus } from "../../topic-B6zuexk7.js";
9
- import { n as TopicPort } from "../../watch-topic-YYSVJGDY.js";
10
- import { n as Controller, t as AuthPort } from "../../controller-CQrkLoRX.js";
8
+ import { p as SubscriptionStatus } from "../../topic-BVq5RdsI.js";
9
+ import { n as TopicPort } from "../../watch-topic-BOclyLFd.js";
10
+ import { n as Controller, t as AuthPort } from "../../controller-DaWA9eWS.js";
11
11
  import { A as WorkflowVersionOwner, B as WorkflowGraphNode, C as WorkflowGrantPrincipal, D as WorkflowTrigger, E as WorkflowStepInfo, F as WorkflowFilterCondition, G as durationMs, H as WorkflowNodeKind, I as WorkflowFilterField, J as matchesFilter, K as evaluateCondition, L as WorkflowGraph, M as GraphScope, N as WorkflowCondition, O as WorkflowTriggerKind, P as WorkflowConditionOperator, R as WorkflowGraphDiff, S as WorkflowGrantAction, T as WorkflowNodeRunStatus, U as approved, V as WorkflowNodeCondition, W as diffGraphs, X as validateGraph, Y as topologicalOrder, _ as WorkflowCredential, a as CredentialInput, b as WorkflowDefinitionScope, c as GraphCompiler, d as RunInput, f as TestRunInput, g as WorkflowBuilderHooks, h as WorkflowAlert, i as BuilderStarter, j as WorkflowVersionStatus, k as WorkflowVersion, l as NodeRunRecord, m as VersionSaveOptions, n as BuilderOptions, o as DefinitionInput, p as TriggerInput, q as filterConditionOf, r as BuilderStartCall, s as GrantInput, t as AlertInput, u as PublishOptions, v as WorkflowDefinition, w as WorkflowNodeRun, x as WorkflowEditor, y as WorkflowDefinitionGrant, z as WorkflowGraphEdge } from "../../types-d0JBRTAg.js";
12
12
  import { a as GraphSubject, c as startNodeOf, i as GraphStepCall, n as GraphRunFields, o as executeGraph, r as GraphRuntime, s as graphRunFields, t as GraphApprovalCall } from "../../executor-DqNRrFxx.js";
13
13
  /**
@@ -3,9 +3,9 @@ import { Ct as Events, _t as WorkflowRunEventData } from "../../events-DVt3Z9hw.
3
3
  import { a as dbTransport, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-BEtC_Kis.js";
4
4
  import { c as BlockOf } from "../../define-block-COmMkx2x.js";
5
5
  import { _ as WorkflowsHooks, a as WorkflowRunStatus, c as WorkflowScheduleInput, d as WorkflowStartTicket, f as WorkflowStarter, g as Workflows, h as WorkflowTickResult, i as WorkflowRunRecord, l as WorkflowStartCall, m as WorkflowTickOptions, n as WorkflowRun, o as WorkflowRunsQuery, s as WorkflowSchedule, u as WorkflowStartRequest, v as WorkflowsOptions, y as createWorkflows } from "../../workflows-BljkWRxE.js";
6
- import { p as SubscriptionStatus } from "../../topic-B6zuexk7.js";
7
- import { n as TopicPort } from "../../watch-topic-YYSVJGDY.js";
8
- import { n as Controller, t as AuthPort } from "../../controller-CQrkLoRX.js";
6
+ import { p as SubscriptionStatus } from "../../topic-BVq5RdsI.js";
7
+ import { n as TopicPort } from "../../watch-topic-BOclyLFd.js";
8
+ import { n as Controller, t as AuthPort } from "../../controller-DaWA9eWS.js";
9
9
  interface WorkflowRunsControllerOptions {
10
10
  readonly client: {
11
11
  readonly runs: Pick<Workflows["runs"], "list">;
@@ -1,8 +1,8 @@
1
1
  import { a as PERMISSIONS_TRUNCATED_CLAIM, i as PERMISSIONS_CLAIM, n as FEATURES_CLAIM, o as PERMISSION_CAP_CLAIM, r as MEMBERSHIPS_CLAIM, t as AUTHZ_VERSION_CLAIM } from "../index-IKfbX_39.js";
2
2
  import { G as permissionCapOf } from "../types-Dh2OGEW5.js";
3
3
  import { i as SessionSnapshot, o as isSessionSnapshot } from "../snapshot-BGsJw9xn.js";
4
- import { i as decodeEntitlementClaim, o as ClaimsRecord, r as MembershipClaim, s as ClaimsSource, t as EntitlementClaimOptions } from "../entitlements-BOWTZaRf.js";
5
- import { t as tenantOf } from "../tenant-DkKbvK5T.js";
6
- import { n as isTruncated, r as permissionsOf, t as PermissionsOfOptions } from "../permissions-CoHsUtZS.js";
4
+ import { i as decodeEntitlementClaim, o as ClaimsRecord, r as MembershipClaim, s as ClaimsSource, t as EntitlementClaimOptions } from "../entitlements-BefkpQIz.js";
5
+ import { t as tenantOf } from "../tenant-gezshhcs.js";
6
+ import { n as isTruncated, r as permissionsOf, t as PermissionsOfOptions } from "../permissions-C8p6RlIZ.js";
7
7
  import { a as isUserSession, i as isApiKeySession, n as AuthSession, r as UserSession, t as ApiKeySession } from "../view-Cy2XxYp1.js";
8
8
  export { AUTHZ_VERSION_CLAIM, type ApiKeySession, type AuthSession, type ClaimsRecord, type ClaimsSource, type EntitlementClaimOptions, FEATURES_CLAIM, MEMBERSHIPS_CLAIM, type MembershipClaim, PERMISSIONS_CLAIM, PERMISSIONS_TRUNCATED_CLAIM, PERMISSION_CAP_CLAIM, type PermissionsOfOptions, type SessionSnapshot, type UserSession, decodeEntitlementClaim, isApiKeySession, isSessionSnapshot, isTruncated, isUserSession, permissionCapOf, permissionsOf, tenantOf };
@@ -0,0 +1 @@
1
+ export { t as addCommand } from "./add-CYreXA68.js";
@@ -1,21 +1,21 @@
1
1
  import { a as list, m as commandMeta, r as defineCliCommand } from "./command-BpZ4AuhR.js";
2
2
  import { i as plain } from "./style-B5-nByxb.js";
3
- import { t as VERSION } from "./version-Dfdz7KSh.js";
3
+ import { t as VERSION } from "./version-B59mZJoy.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-BvlEmTB0.js";
6
+ import { t as loadSnapshot } from "./snapshot-CloKPNxv.js";
7
7
  import { t as isRecord } from "./guards-DxwRG0Uv.js";
8
- import { a as toCatalog } from "./source-BhZRCitG.js";
8
+ import { a as toCatalog } from "./source-Bwyp18Rj.js";
9
9
  import { a as findConfig, f as INTEGRATIONS, s as loadConfig } from "./config-DrrkMihk.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 dataMigration } from "./migrations-CNa62JSi.js";
12
- 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-BtAPMEZa.js";
11
+ import { n as dataMigration } from "./migrations-Ds0J_TmZ.js";
12
+ 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-BNi8PIiM.js";
13
13
  import { n as installCommand, t as detectProject } from "./detect-BcUDaO8I.js";
14
14
  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";
15
- import { t as syncModules } from "./sync-D9xSGdzO.js";
16
- import { t as addModules } from "./add-DoEtJhZG.js";
17
- import { t as appTablePlan } from "./app-table-files-BqLd5TuX.js";
18
- import { t as blockNames } from "./blocks-BVU_FoLo.js";
15
+ import { t as syncModules } from "./sync-DZu1r34s.js";
16
+ import { t as addModules } from "./add-DzgsOE8V.js";
17
+ import { t as appTablePlan } from "./app-table-files-BnISa3uY.js";
18
+ import { t as blockNames } from "./blocks-uzh1g_0v.js";
19
19
  import { i as sourceArgs, n as SOURCE_ARGS } from "./source-args-Bz5QQne2.js";
20
20
  import { existsSync } from "node:fs";
21
21
  import { dirname, join, posix, resolve } from "node:path";
@@ -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-CfbFxUOQ.js";
4
+ import { i as providerOwnsMemberships, r as layoutFor, t as MEMBERSHIP_CLAIM_MODULES } from "./providers-Be2dgyuR.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-D9xSGdzO.js";
6
+ import { a as write, i as unlistedModuleFiles, r as nextStep } from "./sync-DZu1r34s.js";
7
7
  import { basename, dirname } from "node:path";
8
8
  import { readFile } from "node:fs/promises";
9
9
  import { SQL_MODULES, resolveBlocks } from "better-supabase/sql";
@@ -1,8 +1,8 @@
1
1
  import { n as CliError } from "./errors-DcJ_PayO.js";
2
2
  import { h as subjectTagArgs } from "./config-DrrkMihk.js";
3
3
  import { d as readSupabaseToml, n as declarativeSchemasDir } from "./supabase-toml-B6-eEV5p.js";
4
- import { r as layoutFor } from "./providers-CfbFxUOQ.js";
5
- import { r as literal } from "./live-CV9mn-xC.js";
4
+ import { r as layoutFor } from "./providers-Be2dgyuR.js";
5
+ import { r as literal } from "./live-NFNeZsP7.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";
@@ -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-59XWXsRi.js";
4
4
  import { l as stdinDatabaseUrl, n as databaseUrl } from "./config-DrrkMihk.js";
5
5
  import { t as connect } from "./db-B8zfxjl2.js";
6
- import { n as ident } from "./live-CV9mn-xC.js";
6
+ import { n as ident } from "./live-NFNeZsP7.js";
7
7
  import { r as STACK_ARG, t as DB_URL_STDIN_ARG } from "./source-args-Bz5QQne2.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-CVaBuT18.js";
2
+ import { i as run } from "./run-cLdnJHH0.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-BVU_FoLo.js";
1
+ export { n as blocksListCommand, r as blocksSearchCommand, i as blocksViewCommand } from "./blocks-uzh1g_0v.js";
@@ -1,7 +1,7 @@
1
1
  import { m as commandMeta, r as defineCliCommand } from "./command-BpZ4AuhR.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-CoqKHoy0.js";
4
+ import { n as listModules, t as printModule } from "./print-BtreoJSm.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,4 +1,4 @@
1
- import { t as VERSION } from "./version-Dfdz7KSh.js";
1
+ import { t as VERSION } from "./version-B59mZJoy.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-BAFPdJz_.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, o as writtenByBlocks } from "./sql-layout-CA7xgRjR.js";
7
+ import { i as schemasDirOf, n as migrationsDir, o as writtenByBlocks } from "./sql-layout-CHpEL0oq.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 REVIEW_0_15, c as renameSubpaths, r as PLUGIN_IMPORT_RENAMES, s as SUBPATH_RENAMES_0_15, t as BLOCK_EXPORT_RENAMES } from "./codemod-block-renames-Dt3X1Wvg.js";
@@ -1,6 +1,6 @@
1
1
  import { r as readIfExists } from "./io-CQzy8PEZ.js";
2
- import { t as CACHE_DIR } from "./cache-D4nwCBXc.js";
3
- import { x as installedVersion } from "./snapshot-BvlEmTB0.js";
2
+ import { t as CACHE_DIR } from "./cache-BPWC7tGD.js";
3
+ import { x as installedVersion } from "./snapshot-CloKPNxv.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,37 +1,37 @@
1
1
  import { a as list, m as commandMeta, r as defineCliCommand } from "./command-BpZ4AuhR.js";
2
2
  import { i as plain } from "./style-B5-nByxb.js";
3
- import { t as VERSION } from "./version-Dfdz7KSh.js";
3
+ import { t as VERSION } from "./version-B59mZJoy.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-59XWXsRi.js";
6
6
  import { a as sameText, t as display } from "./io-CQzy8PEZ.js";
7
- import { t as CACHE_DIR } from "./cache-D4nwCBXc.js";
7
+ import { t as CACHE_DIR } from "./cache-BPWC7tGD.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 } from "./snapshot-BvlEmTB0.js";
10
- import { d as configFor, r as renderFiles, u as notNullTag } from "./render-DQCU_kBW.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 } from "./snapshot-CloKPNxv.js";
10
+ import { d as configFor, r as renderFiles, u as notNullTag } from "./render-C-Mfq-o3.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-BhZRCitG.js";
13
+ import { i as request } from "./source-Bwyp18Rj.js";
14
14
  import { l as stdinDatabaseUrl, n as databaseUrl } from "./config-DrrkMihk.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-BCuUsWOh.js";
17
17
  import { n as readStackStatus } from "./stack-status-Mxgqb3I4.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-CwFH_PEn.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-Cjkm2Sg3.js";
20
20
  import { c as insideRoot, i as changeLines, r as applyPlan } from "./files-DQayErI8.js";
21
- import { C as splinterTables, S as advisorRule, _ as withoutStrings, a as METADATA_GAPS_TEXT, b as appTablesOf, c as accessModule, d as RLS_RULES, f as appliesTo, g as policyHelpers, h as functionObject, l as entitlementsModule, m as functionBody, p as escape$2, s as AUTHORIZATION_RULES, u as COMMANDS$2, v as BLOCK_PREFIX, x as appViewsOf, y as blockTargets } from "./run-DOD00FFl.js";
22
- import { n as migrationsDir, r as moduleLayoutFor, t as blockDeclaredTables } from "./sql-layout-CA7xgRjR.js";
23
- 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-COtj7l3r.js";
24
- import { a as compiledReadSets } from "./providers-CfbFxUOQ.js";
25
- import { i as migrationHolds, o as migrationModules, r as latestMigration, t as MODULES_SUFFIX } from "./module-migration-CKJ8kRm1.js";
26
- import { o as wiringFor, r as configInstances, t as MIGRATION_SAFETY_RULES } from "./migration-safety-BtAPMEZa.js";
21
+ import { n as migrationsDir, r as moduleLayoutFor, t as blockDeclaredTables } from "./sql-layout-CHpEL0oq.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-DCHxLAEL.js";
23
+ import { C as appTablesOf, S as adoptionContext, _ as BLOCK_PREFIX, a as METADATA_GAPS_TEXT, b as splinterTables, c as entitlementsModule, d as appliesTo, f as escape$2, 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, w as appViewsOf, x as accessModule, y as advisorRule } from "./run-D2nuyyPo.js";
24
+ import { a as compiledReadSets } from "./providers-Be2dgyuR.js";
25
+ import { i as migrationHolds, o as migrationModules, r as latestMigration, t as MODULES_SUFFIX } from "./module-migration-hFrlzQZ5.js";
26
+ import { o as wiringFor, r as configInstances, t as MIGRATION_SAFETY_RULES } from "./migration-safety-BNi8PIiM.js";
27
27
  import { t as orphanedBlockFiles } from "./orphans-CPcR85QN.js";
28
- import { i as reservedRoles, n as ident$1, r as literal$1, t as LIVE_RULES } from "./live-CV9mn-xC.js";
28
+ import { i as reservedRoles, n as ident$1, r as literal$1, t as LIVE_RULES } from "./live-NFNeZsP7.js";
29
29
  import { a as sourceFlags, n as SOURCE_ARGS } from "./source-args-Bz5QQne2.js";
30
30
  import { i as PLUGIN_SUBPATH_RENAMES, n as BLOCK_SUBPATH_RENAMES, o as SPEC_SUBPATH_RENAMES, t as BLOCK_EXPORT_RENAMES } from "./codemod-block-renames-Dt3X1Wvg.js";
31
31
  import { n as PLATFORM_SCHEMAS } from "./in-stack-diff-huI7fGMX.js";
32
32
  import { a as staleVariables, i as stackEnvValues, r as redactValue, t as PREFIX_NAMES } from "./stack-env-BQhbUFa7.js";
33
33
  import { a as readSharedMemory, n as listStacks, t as branchName } from "./stacks-C5YL6Un9.js";
34
- import { i as refuseWithMetadata, r as readMetadataSnapshot } from "./metadata-CFQGBR5E.js";
34
+ import { i as refuseWithMetadata, r as readMetadataSnapshot } from "./metadata-BzMkmrZR.js";
35
35
  import { existsSync } from "node:fs";
36
36
  import { dirname, resolve } from "node:path";
37
37
  import { createHash } from "node:crypto";
@@ -235,7 +235,7 @@ async function fileState(context, file) {
235
235
  * the block's to grant.
236
236
  */
237
237
  function widenedAppTablePolicies(context) {
238
- const tables = adoptedTables(context.config.blocks, appTablesOf(context), { subjects: context.config.subjects });
238
+ const tables = adoptedTables(context.config.blocks, appTablesOf(context), adoptionContext(context));
239
239
  if (tables.length === 0) return [];
240
240
  const modules = /* @__PURE__ */ new Map();
241
241
  for (const table of tables) {
@@ -325,7 +325,7 @@ async function keptUpdatedAtTriggers(context) {
325
325
  * tables keep the app's names, as custom blocks' tables do.
326
326
  */
327
327
  function keepsAppsName(context) {
328
- const adopted = context.config.blockNames.some((name) => moduleDeprecations().some((entry) => entry.module === name && (entry.kind === "table" || entry.kind === "column"))) ? adoptedTables(context.config.blocks, appTablesOf(context), { subjects: context.config.subjects }) : [];
328
+ const adopted = context.config.blockNames.some((name) => moduleDeprecations().some((entry) => entry.module === name && (entry.kind === "table" || entry.kind === "column"))) ? adoptedTables(context.config.blocks, appTablesOf(context), adoptionContext(context)) : [];
329
329
  return (entry) => {
330
330
  if (entry.kind !== "table" && entry.kind !== "column") return false;
331
331
  if ((context.config.blocks[entry.module]?.mode ?? "managed") !== "managed") return true;
@@ -418,7 +418,7 @@ const ADOPTION_RULES = [
418
418
  check: (context) => {
419
419
  const { tables } = catalogOf(context);
420
420
  const ownTables = Object.fromEntries(tables.map((table) => [qualified(table), "database"]));
421
- return adoptedTables(context.config.blocks, ownTables, { subjects: context.config.subjects }).flatMap((adopted) => {
421
+ return adoptedTables(context.config.blocks, ownTables, adoptionContext(context)).flatMap((adopted) => {
422
422
  const table = tables.find((entry) => entry.schema === adopted.schema && entry.name === adopted.table);
423
423
  if (table === void 0) return [];
424
424
  return adopted.textColumns.flatMap((logical) => {
@@ -442,7 +442,7 @@ const ADOPTION_RULES = [
442
442
  check: (context) => {
443
443
  const block = context.config.blocks["webhooks-out"];
444
444
  if (block === void 0 || block.options?.["defaultFormat"] !== void 0 || typeof block.columns?.["endpoints"]?.["format"] === "string") return [];
445
- const adopted = adoptedTables(context.config.blocks, appTablesOf(context), { subjects: context.config.subjects }).find((entry) => entry.module === "webhooks-out" && entry.logical === "endpoints");
445
+ const adopted = adoptedTables(context.config.blocks, appTablesOf(context), adoptionContext(context)).find((entry) => entry.module === "webhooks-out" && entry.logical === "endpoints");
446
446
  if (adopted === void 0) return [];
447
447
  const table = catalogOf(context).tables.find((entry) => entry.schema === adopted.schema && entry.name === adopted.table);
448
448
  return [{
@@ -1772,7 +1772,7 @@ async function missingAdoptedColumns(context) {
1772
1772
  if (!db || "skipped" in db) return [];
1773
1773
  const tables = adoptedTables(context.config.blocks, appTablesOf(context), {
1774
1774
  ...appViewsOf(context),
1775
- subjects: context.config.subjects
1775
+ ...adoptionContext(context)
1776
1776
  });
1777
1777
  if (tables.length === 0) return [];
1778
1778
  const names = tables.map((table) => `(${literal$1(table.schema)}, ${literal$1(table.table)})`).join(", ");
@@ -1,22 +1,22 @@
1
1
  import { a as list, m as commandMeta, r as defineCliCommand } from "./command-BpZ4AuhR.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-D4nwCBXc.js";
5
- import { a as serializeSnapshot, g as serializeGenerator, h as restrictSchemas, o as snapshotFile, r as openSource, t as loadSnapshot } from "./snapshot-BvlEmTB0.js";
4
+ import { u as catalogFingerprint } from "./cache-BPWC7tGD.js";
5
+ import { a as serializeSnapshot, g as serializeGenerator, h as restrictSchemas, o as snapshotFile, r as openSource, t as loadSnapshot } from "./snapshot-CloKPNxv.js";
6
6
  import { d as GEN_TASKS, p as isGenTask } from "./config-DrrkMihk.js";
7
7
  import { c as insideRoot, r as applyPlan, u as planResult } from "./files-DQayErI8.js";
8
- import { n as runGen } from "./run-DOD00FFl.js";
9
- import { n as dataMigration } from "./migrations-CNa62JSi.js";
10
- import { t as syncModules } from "./sync-D9xSGdzO.js";
11
- import { t as addModules } from "./add-DoEtJhZG.js";
12
- import { n as listModules, t as printModule } from "./print-CoqKHoy0.js";
8
+ import { n as runGen } from "./run-D2nuyyPo.js";
9
+ import { n as dataMigration } from "./migrations-Ds0J_TmZ.js";
10
+ import { t as syncModules } from "./sync-DZu1r34s.js";
11
+ import { t as addModules } from "./add-DzgsOE8V.js";
12
+ import { n as listModules, t as printModule } from "./print-BtreoJSm.js";
13
13
  import { a as sourceFlags, i as sourceArgs, n as SOURCE_ARGS } from "./source-args-Bz5QQne2.js";
14
- import { a as runMetadataGen, n as checkMetadataFlags, t as EMITS } from "./metadata-CFQGBR5E.js";
14
+ import { a as runMetadataGen, n as checkMetadataFlags, t as EMITS } from "./metadata-BzMkmrZR.js";
15
15
  import { a as runEnv } from "./env-BAJn6wCA.js";
16
- import { c as watchLoop, o as parseInterval, r as specOptionsFromConfig, s as stampFiles, t as runSpec } from "./spec-DsMWuJLv.js";
17
- import { n as runPowerSync } from "./powersync-BgoAWeRT.js";
16
+ import { c as watchLoop, o as parseInterval, r as specOptionsFromConfig, s as stampFiles, t as runSpec } from "./spec-DAUF4ybu.js";
17
+ import { n as runPowerSync } from "./powersync-oFiwgsBi.js";
18
18
  import { t as runSeed } from "./seed-BpaqqyO8.js";
19
- import { t as upgrade } from "./upgrade-Ykf0LLEB.js";
19
+ import { t as upgrade } from "./upgrade-Bpvi70zm.js";
20
20
  import { existsSync } from "node:fs";
21
21
  import { resolve } from "node:path";
22
22
  // src/cli/commands/sql.ts
@@ -753,5 +753,5 @@ export declare function emitModule(model: Model, options: EmitOptions): string;
753
753
  export declare function loadConfig(cwd: string, explicit?: string, environment?: string, path?: string | undefined, options?: {
754
754
  readonly legacyTables?: boolean;
755
755
  }): Promise<ResolvedConfig>;
756
- export declare const VERSION = "0.34.0";
756
+ export declare const VERSION = "0.35.0";
757
757
  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-BpZ4AuhR.js";
2
- import { i as run, n as createCli, r as help, t as commandNames } from "./run-CVaBuT18.js";
3
- import { t as VERSION } from "./version-Dfdz7KSh.js";
2
+ import { i as run, n as createCli, r as help, t as commandNames } from "./run-cLdnJHH0.js";
3
+ import { t as VERSION } from "./version-B59mZJoy.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-BvlEmTB0.js";
6
- import { a as emitBlockConfig, l as buildModel, o as GENERATED_HEADER, r as renderFiles, s as emitModule } from "./render-DQCU_kBW.js";
7
- import { a as toCatalog, n as managementSource, r as pgSource } from "./source-BhZRCitG.js";
5
+ import { a as serializeSnapshot, i as parseSnapshot, l as introspect, t as loadSnapshot } from "./snapshot-CloKPNxv.js";
6
+ import { a as emitBlockConfig, l as buildModel, o as GENERATED_HEADER, r as renderFiles, s as emitModule } from "./render-C-Mfq-o3.js";
7
+ import { a as toCatalog, n as managementSource, r as pgSource } from "./source-Bwyp18Rj.js";
8
8
  import { s as loadConfig } from "./config-DrrkMihk.js";
9
- import { n as runGen } from "./run-DOD00FFl.js";
9
+ import { n as runGen } from "./run-D2nuyyPo.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-Bp
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-D4nwCBXc.js";
6
- import { a as serializeSnapshot, t as loadSnapshot } from "./snapshot-BvlEmTB0.js";
7
- import { a as toCatalog } from "./source-BhZRCitG.js";
5
+ import { l as TYPEGEN_VERSION } from "./cache-BPWC7tGD.js";
6
+ import { a as serializeSnapshot, t as loadSnapshot } from "./snapshot-CloKPNxv.js";
7
+ import { a as toCatalog } from "./source-Bwyp18Rj.js";
8
8
  import { a as findConfig, s as loadConfig } from "./config-DrrkMihk.js";
9
- import { r as contentMapperFiles } from "./content-mapper-CwFH_PEn.js";
9
+ import { r as contentMapperFiles } from "./content-mapper-Cjkm2Sg3.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-THXE7juv.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-BtAPMEZa.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-CYreXA68.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-BNi8PIiM.js";
13
13
  import { n as installCommand, t as detectProject } from "./detect-BcUDaO8I.js";
14
- import { s as enablePgDelta, t as syncModules } from "./sync-D9xSGdzO.js";
15
- import { t as appTablePlan } from "./app-table-files-BqLd5TuX.js";
14
+ import { s as enablePgDelta, t as syncModules } from "./sync-DZu1r34s.js";
15
+ import { t as appTablePlan } from "./app-table-files-BnISa3uY.js";
16
16
  import { existsSync } from "node:fs";
17
17
  import { join, posix, resolve } from "node:path";
18
18
  import { glob, readFile, readdir } from "node:fs/promises";
@@ -1,6 +1,6 @@
1
1
  import { r as errorText } from "./errors-DcJ_PayO.js";
2
- import "./source-BhZRCitG.js";
3
- import { l as tableObject, n as exposed, s as qualified, t as catalogOf } from "./shared-COtj7l3r.js";
2
+ import "./source-Bwyp18Rj.js";
3
+ import { l as tableObject, n as exposed, s as qualified, t as catalogOf } from "./shared-DCHxLAEL.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-BpZ4AuhR.js";
2
- import { a as envelope, i as run } from "./run-CVaBuT18.js";
3
- import { t as VERSION } from "./version-Dfdz7KSh.js";
2
+ import { a as envelope, i as run } from "./run-cLdnJHH0.js";
3
+ import { t as VERSION } from "./version-B59mZJoy.js";
4
4
  import { n as CliError } from "./errors-DcJ_PayO.js";
5
5
  import { n as consentToken } from "./agent-59XWXsRi.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-BCuUsWOh.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-BvlEmTB0.js";
4
- import { c as metaPaths, n as render } from "./render-DQCU_kBW.js";
5
- import { i as generationNotices, n as runGen, o as fromMetadata, r as UNFORMATTED, t as refuseRowConditionedBuckets } from "./run-DOD00FFl.js";
3
+ import { m as parseMetadataDocument, u as MetadataRejectedError } from "./snapshot-CloKPNxv.js";
4
+ import { c as metaPaths, n as render } from "./render-C-Mfq-o3.js";
5
+ import { i as generationNotices, n as runGen, o as fromMetadata, r as UNFORMATTED, t as refuseRowConditionedBuckets } from "./run-D2nuyyPo.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-BpZ4AuhR.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-BqLd5TuX.js";
4
+ import { t as appTablePlan } from "./app-table-files-BnISa3uY.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-DrrkMihk.js";
2
- import { c as splitStatements } from "./shared-COtj7l3r.js";
2
+ import { c as splitStatements } from "./shared-DCHxLAEL.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 { a as sqlPlan, n as migrationsDir } from "./sql-layout-CA7xgRjR.js";
4
- import { r as layoutFor } from "./providers-CfbFxUOQ.js";
3
+ import { a as sqlPlan, n as migrationsDir } from "./sql-layout-CHpEL0oq.js";
4
+ import { r as layoutFor } from "./providers-Be2dgyuR.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 { a as sqlPlan, n as migrationsDir } from "./sql-layout-CA7xgRjR.js";
4
- import { i as stampAfter } from "./migrations-CNa62JSi.js";
3
+ import { a as sqlPlan, n as migrationsDir } from "./sql-layout-CHpEL0oq.js";
4
+ import { i as stampAfter } from "./migrations-Ds0J_TmZ.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-oFiwgsBi.js";
@@ -1,8 +1,8 @@
1
1
  import { m as commandMeta, r as defineCliCommand } from "./command-BpZ4AuhR.js";
2
2
  import { n as PLAN_ARGS, r as applyPlan, u as planResult } from "./files-DQayErI8.js";
3
- import { n as migrationsDir } from "./sql-layout-CA7xgRjR.js";
4
- import { r as layoutFor } from "./providers-CfbFxUOQ.js";
5
- import { i as stampAfter } from "./migrations-CNa62JSi.js";
3
+ import { n as migrationsDir } from "./sql-layout-CHpEL0oq.js";
4
+ import { r as layoutFor } from "./providers-Be2dgyuR.js";
5
+ import { i as stampAfter } from "./migrations-Ds0J_TmZ.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-CfbFxUOQ.js";
3
- import { o as migrationModules, r as latestMigration, u as writesMigrations } from "./module-migration-CKJ8kRm1.js";
2
+ import { n as layout } from "./providers-Be2dgyuR.js";
3
+ import { o as migrationModules, r as latestMigration, u as writesMigrations } from "./module-migration-hFrlzQZ5.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-CA7xgRjR.js";
4
+ import { i as schemasDirOf, r as moduleLayoutFor } from "./sql-layout-CHpEL0oq.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";