better-supabase 0.33.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 (156) hide show
  1. package/dist/ai-sdk/agents/index.d.ts +2 -2
  2. package/dist/{app-tables-IrglDJCs.d.ts → app-tables-X3yzJljM.d.ts} +1 -1
  3. package/dist/{authorization-BlmDNI2b.d.ts → authorization-D1P3VBOd.d.ts} +53 -1
  4. package/dist/{automations-Bw5cX7oj.js → automations-D4QTP8nI.js} +2 -1
  5. package/dist/{bind-DP-KLgYI.d.ts → bind-Bvv-Zrdh.d.ts} +1 -1
  6. package/dist/{block-env-CJ38ZSTP.d.ts → block-env-h_uPl2f_.d.ts} +3 -3
  7. package/dist/{block-tables-CQTU71zn.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/drive/index.js +1 -1
  22. package/dist/blocks/entitlements/index.d.ts +2 -2
  23. package/dist/blocks/forms/index.d.ts +1 -1
  24. package/dist/blocks/inbox/index.d.ts +4 -4
  25. package/dist/blocks/index.d.ts +1 -1
  26. package/dist/blocks/invoices/index.d.ts +4 -0
  27. package/dist/blocks/invoices/index.js +6 -3
  28. package/dist/blocks/messaging/index.d.ts +4 -4
  29. package/dist/blocks/mfa/index.d.ts +1 -1
  30. package/dist/blocks/notifications/index.d.ts +3 -3
  31. package/dist/blocks/onboarding/index.d.ts +1 -1
  32. package/dist/blocks/organizations/index.d.ts +2 -2
  33. package/dist/blocks/permissions/index.d.ts +1 -1
  34. package/dist/blocks/push/index.d.ts +1 -1
  35. package/dist/blocks/quotes/index.js +1 -1
  36. package/dist/blocks/reactions/index.d.ts +3 -3
  37. package/dist/blocks/saved-views/index.d.ts +1 -1
  38. package/dist/blocks/search/index.d.ts +2 -2
  39. package/dist/blocks/sessions/index.d.ts +1 -1
  40. package/dist/blocks/settings/index.d.ts +1 -1
  41. package/dist/blocks/subjects/index.d.ts +1 -1
  42. package/dist/blocks/tags/index.d.ts +1 -1
  43. package/dist/blocks/time-tracking/index.js +1 -1
  44. package/dist/blocks/undo/index.d.ts +1 -1
  45. package/dist/blocks/usage/index.d.ts +1 -1
  46. package/dist/blocks/workflow-editor/index.d.ts +3 -3
  47. package/dist/blocks/workflows/index.d.ts +3 -3
  48. package/dist/claims/index.d.ts +3 -3
  49. package/dist/cli/add-BaB3y1lv.js +1 -0
  50. package/dist/cli/{add-D2pKTbPw.js → add-CYreXA68.js} +9 -9
  51. package/dist/cli/{add-BDLLVLI8.js → add-DzgsOE8V.js} +2 -2
  52. package/dist/cli/{app-table-files-CimWi_eh.js → app-table-files-BnISa3uY.js} +2 -2
  53. package/dist/cli/{backfill-B1xAsdL4.js → backfill-BLLTSDSa.js} +1 -1
  54. package/dist/cli/bin.js +1 -1
  55. package/dist/cli/{blocks-DtZtn-R4.js → blocks-CpRvI7x8.js} +1 -1
  56. package/dist/cli/{blocks-rBeis04I.js → blocks-uzh1g_0v.js} +1 -1
  57. package/dist/cli/{cache-CvBRwv02.js → cache-BPWC7tGD.js} +1 -1
  58. package/dist/cli/{codemod-DYbVbJ-e.js → codemod-CbJVS_kG.js} +1 -1
  59. package/dist/cli/{content-mapper-DrhtDsAm.js → content-mapper-Cjkm2Sg3.js} +2 -2
  60. package/dist/cli/{doctor-Dn4TzGmw.js → doctor-D94FEJZs.js} +19 -19
  61. package/dist/cli/{gen-BbeS0KgF.js → gen-Cd0VNDjE.js} +11 -11
  62. package/dist/cli/index.d.ts +1 -1
  63. package/dist/cli/index.js +6 -6
  64. package/dist/cli/{init-C30xdMSs.js → init-Co1N9ZoA.js} +8 -8
  65. package/dist/cli/{live-Ctc8Qh9Y.js → live-NFNeZsP7.js} +2 -2
  66. package/dist/cli/{mcp-5J0kUOtD.js → mcp-WZ8t7NMz.js} +2 -2
  67. package/dist/cli/{metadata-DxhUNctA.js → metadata-BzMkmrZR.js} +3 -3
  68. package/dist/cli/{migrate-ockrh3UX.js → migrate-C9gyDAV7.js} +1 -1
  69. package/dist/cli/{migration-safety-CLrqC0D-.js → migration-safety-BNi8PIiM.js} +1 -1
  70. package/dist/cli/{migrations-CZTg2UJM.js → migrations-Ds0J_TmZ.js} +2 -2
  71. package/dist/cli/{module-migration-BptQzmj2.js → module-migration-hFrlzQZ5.js} +2 -2
  72. package/dist/cli/powersync-J2Kms2NT.js +1 -0
  73. package/dist/cli/{powersync-DIvsipKr.js → powersync-oFiwgsBi.js} +3 -3
  74. package/dist/cli/{print-DdHt8xCc.js → print-BtreoJSm.js} +2 -2
  75. package/dist/cli/{providers-k-1cEna6.js → providers-Be2dgyuR.js} +1 -1
  76. package/dist/cli/{prune-workflows-Ddv-GfkO.js → prune-workflows-BPxgRrqY.js} +1 -1
  77. package/dist/cli/{remove-DEEQDoc7.js → remove-B4ad996E.js} +5 -5
  78. package/dist/cli/{render-SjSVz8yK.js → render-C-Mfq-o3.js} +3 -3
  79. package/dist/cli/{run-DdhIK7-K.js → run-D2nuyyPo.js} +47 -39
  80. package/dist/cli/{run-Ixt9mEb6.js → run-cLdnJHH0.js} +25 -25
  81. package/dist/cli/{shared-p6sxli_5.js → shared-DCHxLAEL.js} +1 -1
  82. package/dist/cli/{snapshot-Dd_8B9g-.js → snapshot-CloKPNxv.js} +2 -2
  83. package/dist/cli/{source-BYvVe_Es.js → source-Bwyp18Rj.js} +1 -1
  84. package/dist/cli/{spec-BxQgllJY.js → spec-DAUF4ybu.js} +2 -2
  85. package/dist/cli/{spec-liRzcZTa.js → spec-DsVq4_qV.js} +1 -1
  86. package/dist/cli/{sql-layout-DHwiUOaD.js → sql-layout-CHpEL0oq.js} +3 -3
  87. package/dist/cli/{sync-CreQWj53.js → sync-DZu1r34s.js} +4 -4
  88. package/dist/cli/{upgrade-U7IKj45h.js → upgrade-A-BALvp3.js} +2 -2
  89. package/dist/cli/{upgrade-3NQOUO1_.js → upgrade-Bpvi70zm.js} +5 -5
  90. package/dist/cli/{version-mBwP-aMG.js → version-B59mZJoy.js} +1 -1
  91. package/dist/client/index.d.ts +5 -5
  92. package/dist/client/native/index.d.ts +4 -4
  93. package/dist/config/index.d.ts +2 -2
  94. package/dist/config/index.js +4 -4
  95. package/dist/{config-Bu6pwqcO.js → config-BZWSFxkG.js} +3 -3
  96. package/dist/{config-MDRA2sre.js → config-DQP0IvDX.js} +1 -1
  97. package/dist/{context-D7jICqdN.d.ts → context-CderJRZf.d.ts} +1 -1
  98. package/dist/contract/index.d.ts +3 -3
  99. package/dist/{controller-DxtxeYdf.d.ts → controller-DaWA9eWS.d.ts} +1 -1
  100. package/dist/create/index.d.ts +3 -3
  101. package/dist/create/index.js +3 -3
  102. package/dist/create/lite/index.d.ts +3 -3
  103. package/dist/create/lite/index.js +2 -2
  104. package/dist/{entitlements-w04ivvAy.d.ts → entitlements-BefkpQIz.d.ts} +1 -1
  105. package/dist/{field-errors-DKCaSlZw.d.ts → field-errors-D1meOs_H.d.ts} +4 -4
  106. package/dist/{index-BvcMQYL-.d.ts → index-BQlLxOj5.d.ts} +1 -1
  107. package/dist/{index-DU0UwWvL.d.ts → index-BbDiBiKt.d.ts} +4 -4
  108. package/dist/{index-BZCmy767.d.ts → index-C13UgV67.d.ts} +2 -2
  109. package/dist/{index-BgkHbf9C.d.ts → index-ChLuLxy-.d.ts} +6 -6
  110. package/dist/{index-BdC2IqkU.d.ts → index-D9aV0Fvx.d.ts} +2 -2
  111. package/dist/{index-CbUXFzQV.d.ts → index-DXUiRyEk.d.ts} +1 -1
  112. package/dist/{index-CiE37wKX.d.ts → index-ZQZMQF4l.d.ts} +1 -1
  113. package/dist/{instances-D31jrmKh.js → instances-D9YrkoAy.js} +28 -1
  114. package/dist/mapper/bin.js +5 -5
  115. package/dist/mcp/index.d.ts +1 -1
  116. package/dist/next/index.d.ts +4 -4
  117. package/dist/{operations-CsCwruKT.d.ts → operations-t_hlXkS4.d.ts} +1 -1
  118. package/dist/{options-CgMiQGOF.js → options-C9bp3SEA.js} +2 -0
  119. package/dist/{options-B56njigZ.js → options-CjocPkX1.js} +2 -0
  120. package/dist/{options-Sq4bYbf5.js → options-CuaWhsQS.js} +2 -0
  121. package/dist/{options-DjFbIRgV.js → options-DjdxZgHi.js} +2 -1
  122. package/dist/{options-C-NFS6e3.js → options-DxgZ8tVc.js} +2 -1
  123. package/dist/otel/index.js +4 -4
  124. package/dist/{permissions-BP593xxk.d.ts → permissions-C8p6RlIZ.d.ts} +1 -1
  125. package/dist/{ports-BVLhLUvR.d.ts → ports-C-8uduFM.d.ts} +1 -1
  126. package/dist/powersync/index.d.ts +2 -2
  127. package/dist/preset/index.d.ts +3 -3
  128. package/dist/preset/index.js +3 -3
  129. package/dist/{preset-om2rbdYw.js → preset-B_sSI9vg.js} +2 -2
  130. package/dist/{project-D4ArwcS5.js → project-DVlXQGEp.js} +5 -5
  131. package/dist/{push-token-B0j171on.d.ts → push-token-D41lOoE8.d.ts} +1 -1
  132. package/dist/react/index.d.ts +5 -5
  133. package/dist/react/native/index.d.ts +1 -1
  134. package/dist/react/server.d.ts +5 -5
  135. package/dist/realtime/index.d.ts +3 -3
  136. package/dist/records/index.d.ts +3 -3
  137. package/dist/{resolved-names-DYYyh35i.js → resolved-names-h-3UbKcw.js} +1 -1
  138. package/dist/server/index.d.ts +3 -3
  139. package/dist/solid/index.d.ts +5 -5
  140. package/dist/sql/index.d.ts +5 -5
  141. package/dist/sql/index.js +2 -2
  142. package/dist/{sql-DiUP7fKX.js → sql-C9nO-Mat.js} +493 -198
  143. package/dist/ssr/index.d.ts +1 -1
  144. package/dist/svelte/index.d.ts +5 -5
  145. package/dist/{tenant-B3IIq8Eq.d.ts → tenant-gezshhcs.d.ts} +1 -1
  146. package/dist/testing/index.d.ts +3 -3
  147. package/dist/testing/index.js +1 -1
  148. package/dist/{topic-D2MyBeaI.d.ts → topic-BVq5RdsI.d.ts} +1 -1
  149. package/dist/{types-BFEKRmEK.d.ts → types-hTj5OuFo.d.ts} +2 -2
  150. package/dist/vue/index.d.ts +5 -5
  151. package/dist/{watch-topic-q6krNw0T.d.ts → watch-topic-BOclyLFd.d.ts} +1 -1
  152. package/dist/yjs/index.d.ts +1 -1
  153. package/package.json +1 -1
  154. package/schemas/config-v1.json +41 -0
  155. package/dist/cli/add-BaOCKKt6.js +0 -1
  156. package/dist/cli/powersync-CmsXOuui.js +0 -1
@@ -7,9 +7,9 @@ import { Ct as Events, W as InvitationEventData, Z as OrganizationEventData, o a
7
7
  import { r as BlockTemporalOptions } from "../../block-helpers-disoUWCp.js";
8
8
  import { a as dbTransport, i as RpcClient, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-BEtC_Kis.js";
9
9
  import { a as BlockTransportMiddleware, d as extendBlock, f as withBlockHooks, n as BlockHooks, p as wrapTransport } from "../../block-hooks-DrA_d1dJ.js";
10
- import { N as PlatformRolesOption } from "../../authorization-BlmDNI2b.js";
10
+ import { N as PlatformRolesOption } from "../../authorization-D1P3VBOd.js";
11
11
  import { c as BlockOf } from "../../define-block-COmMkx2x.js";
12
- import { n as Controller, t as AuthPort } from "../../controller-DxtxeYdf.js";
12
+ import { n as Controller, t as AuthPort } from "../../controller-DaWA9eWS.js";
13
13
  declare const INVITATION_ERRORS: {
14
14
  readonly INVITATION_FORBIDDEN: "42501";
15
15
  readonly INVITATION_ROLE_FORBIDDEN: "42501";
@@ -6,7 +6,7 @@ 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 { B as PermissionFlags, H as can, U as permissionFlags, V as PermissionSet, W as permissionMatches } from "../../index-BIAtapnD.js";
9
- import { n as Controller, t as AuthPort } from "../../controller-DxtxeYdf.js";
9
+ import { n as Controller, t as AuthPort } from "../../controller-DaWA9eWS.js";
10
10
  interface PermissionsOptions extends BlockOptions {
11
11
  /** `withBlockHooks` hooks around the client's methods. */
12
12
  readonly hooks?: BlockHooks<Permissions>;
@@ -10,7 +10,7 @@ import { a as dbTransport, o as rpcTransport, s as sqlTransport, t as BlockTrans
10
10
  import { n as BlockHooks } from "../../block-hooks-DrA_d1dJ.js";
11
11
  import { c as BlockOf } from "../../define-block-COmMkx2x.js";
12
12
  import { n as NotificationMessage, t as NotificationChannel } from "../../channel-B_kufDZy.js";
13
- import { t as ExpoNotificationsLike } from "../../push-token-B0j171on.js";
13
+ import { t as ExpoNotificationsLike } from "../../push-token-D41lOoE8.js";
14
14
  type PushPlatform = "ios" | "android" | "web";
15
15
  type PushProvider = "expo" | "fcm" | "apns" | "webpush";
16
16
  /**
@@ -1,6 +1,6 @@
1
1
  import { n as isRecord } from "../../guards-CsRa6v57.js";
2
2
  import { t as AsyncResult } from "../../result-8xza7w5W.js";
3
- import { n as QUOTE_TO_ORDER, r as quotesSqlOptions, t as QUOTES_AUTOMATIONS } from "../../automations-Bw5cX7oj.js";
3
+ import { n as QUOTE_TO_ORDER, r as quotesSqlOptions, t as QUOTES_AUTOMATIONS } from "../../automations-D4QTP8nI.js";
4
4
  import { n as event, t as defineEvents } from "../../event-map-DxfsFgQT.js";
5
5
  import { A as recordsOf, C as optionalInstant, L as textOf, O as recordOf, U as rpcTransport, V as dbTransport, W as sqlTransport, a as bigintOf, d as enumOrThrow, j as requiredInstant, n as applyTemporal, o as blockCall, w as optionalText } from "../../block-helpers-I7UzjNEf.js";
6
6
  import { i as wrapTransport, n as extendBlock, r as withBlockHooks } from "../../block-hooks-CadxQ9-_.js";
@@ -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-D2MyBeaI.js";
11
- import { n as TopicPort } from "../../watch-topic-q6krNw0T.js";
12
- import { n as Controller, t as AuthPort } from "../../controller-DxtxeYdf.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-DxtxeYdf.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-BVLhLUvR.js";
10
- import { n as Controller } from "../../controller-DxtxeYdf.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-DxtxeYdf.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-DxtxeYdf.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-DxtxeYdf.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-DxtxeYdf.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-DxtxeYdf.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-DxtxeYdf.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-D2MyBeaI.js";
9
- import { n as TopicPort } from "../../watch-topic-q6krNw0T.js";
10
- import { n as Controller, t as AuthPort } from "../../controller-DxtxeYdf.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-D2MyBeaI.js";
7
- import { n as TopicPort } from "../../watch-topic-q6krNw0T.js";
8
- import { n as Controller, t as AuthPort } from "../../controller-DxtxeYdf.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-w04ivvAy.js";
5
- import { t as tenantOf } from "../tenant-B3IIq8Eq.js";
6
- import { n as isTruncated, r as permissionsOf, t as PermissionsOfOptions } from "../permissions-BP593xxk.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-mBwP-aMG.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-Dd_8B9g-.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-BYvVe_Es.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-CZTg2UJM.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-CLrqC0D-.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-CreQWj53.js";
16
- import { t as addModules } from "./add-BDLLVLI8.js";
17
- import { t as appTablePlan } from "./app-table-files-CimWi_eh.js";
18
- import { t as blockNames } from "./blocks-rBeis04I.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-k-1cEna6.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-CreQWj53.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-k-1cEna6.js";
5
- import { r as literal } from "./live-Ctc8Qh9Y.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-Ctc8Qh9Y.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-Ixt9mEb6.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-rBeis04I.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-DdHt8xCc.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-mBwP-aMG.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-DHwiUOaD.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-CvBRwv02.js";
3
- import { x as installedVersion } from "./snapshot-Dd_8B9g-.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-mBwP-aMG.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-CvBRwv02.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-Dd_8B9g-.js";
10
- import { d as configFor, r as renderFiles, u as notNullTag } from "./render-SjSVz8yK.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-BYvVe_Es.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-DrhtDsAm.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-DdhIK7-K.js";
22
- import { n as migrationsDir, r as moduleLayoutFor, t as blockDeclaredTables } from "./sql-layout-DHwiUOaD.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-p6sxli_5.js";
24
- import { a as compiledReadSets } from "./providers-k-1cEna6.js";
25
- import { i as migrationHolds, o as migrationModules, r as latestMigration, t as MODULES_SUFFIX } from "./module-migration-BptQzmj2.js";
26
- import { o as wiringFor, r as configInstances, t as MIGRATION_SAFETY_RULES } from "./migration-safety-CLrqC0D-.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-Ctc8Qh9Y.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-DxhUNctA.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-CvBRwv02.js";
5
- import { a as serializeSnapshot, g as serializeGenerator, h as restrictSchemas, o as snapshotFile, r as openSource, t as loadSnapshot } from "./snapshot-Dd_8B9g-.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-DdhIK7-K.js";
9
- import { n as dataMigration } from "./migrations-CZTg2UJM.js";
10
- import { t as syncModules } from "./sync-CreQWj53.js";
11
- import { t as addModules } from "./add-BDLLVLI8.js";
12
- import { n as listModules, t as printModule } from "./print-DdHt8xCc.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-DxhUNctA.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-BxQgllJY.js";
17
- import { n as runPowerSync } from "./powersync-DIvsipKr.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-3NQOUO1_.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.33.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-Ixt9mEb6.js";
3
- import { t as VERSION } from "./version-mBwP-aMG.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-Dd_8B9g-.js";
6
- import { a as emitBlockConfig, l as buildModel, o as GENERATED_HEADER, r as renderFiles, s as emitModule } from "./render-SjSVz8yK.js";
7
- import { a as toCatalog, n as managementSource, r as pgSource } from "./source-BYvVe_Es.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-DdhIK7-K.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-CvBRwv02.js";
6
- import { a as serializeSnapshot, t as loadSnapshot } from "./snapshot-Dd_8B9g-.js";
7
- import { a as toCatalog } from "./source-BYvVe_Es.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-DrhtDsAm.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-D2pKTbPw.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-CLrqC0D-.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-CreQWj53.js";
15
- import { t as appTablePlan } from "./app-table-files-CimWi_eh.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-BYvVe_Es.js";
3
- import { l as tableObject, n as exposed, s as qualified, t as catalogOf } from "./shared-p6sxli_5.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-Ixt9mEb6.js";
3
- import { t as VERSION } from "./version-mBwP-aMG.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-Dd_8B9g-.js";
4
- import { c as metaPaths, n as render } from "./render-SjSVz8yK.js";
5
- import { i as generationNotices, n as runGen, o as fromMetadata, r as UNFORMATTED, t as refuseRowConditionedBuckets } from "./run-DdhIK7-K.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-CimWi_eh.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-p6sxli_5.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-DHwiUOaD.js";
4
- import { r as layoutFor } from "./providers-k-1cEna6.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";