better-supabase 0.22.0 → 0.23.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 (169) hide show
  1. package/dist/{access-sql-CNIgUqWf.js → access-sql-bjWFUWlk.js} +11 -0
  2. package/dist/ai-sdk/agents/index.d.ts +2 -2
  3. package/dist/{app-tables-BGzdnQm5.d.ts → app-tables-CJO6pWwy.d.ts} +1 -1
  4. package/dist/{authorization-DhoA7dsD.d.ts → authorization-Dtwpjeuz.d.ts} +91 -13
  5. package/dist/{bind-CFsctoFJ.d.ts → bind-DaoTunvE.d.ts} +1 -1
  6. package/dist/{block-env-BrUNeuJ_.d.ts → block-env-DUyo2I5O.d.ts} +3 -3
  7. package/dist/blocks/ai-chat/index.d.ts +3 -3
  8. package/dist/blocks/announcements/index.d.ts +3 -3
  9. package/dist/blocks/api-keys/index.d.ts +1 -1
  10. package/dist/blocks/attachments/index.d.ts +1 -1
  11. package/dist/blocks/audit/index.d.ts +2 -2
  12. package/dist/blocks/automations/index.d.ts +1 -1
  13. package/dist/blocks/billing/index.d.ts +1 -1
  14. package/dist/blocks/bookings/index.d.ts +1 -1
  15. package/dist/blocks/calendar/index.d.ts +5 -1
  16. package/dist/blocks/calendar/index.js +6 -3
  17. package/dist/blocks/comments/index.d.ts +4 -4
  18. package/dist/blocks/custom-fields/index.d.ts +43 -1
  19. package/dist/blocks/custom-fields/index.js +40 -1
  20. package/dist/blocks/drive/index.d.ts +1 -1
  21. package/dist/blocks/employees/index.d.ts +4 -0
  22. package/dist/blocks/employees/index.js +1 -1
  23. package/dist/blocks/entitlements/index.d.ts +2 -2
  24. package/dist/blocks/forms/index.d.ts +1 -1
  25. package/dist/blocks/inbox/index.d.ts +4 -4
  26. package/dist/blocks/index.d.ts +1 -1
  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/reactions/index.d.ts +3 -3
  35. package/dist/blocks/saved-views/index.d.ts +1 -1
  36. package/dist/blocks/search/index.d.ts +4 -2
  37. package/dist/blocks/search/index.js +2 -0
  38. package/dist/blocks/sessions/index.d.ts +1 -1
  39. package/dist/blocks/settings/index.d.ts +1 -1
  40. package/dist/blocks/share-links/index.d.ts +28 -3
  41. package/dist/blocks/share-links/index.js +58 -22
  42. package/dist/blocks/subjects/index.d.ts +1 -1
  43. package/dist/blocks/tags/index.d.ts +18 -3
  44. package/dist/blocks/tags/index.js +15 -2
  45. package/dist/blocks/teams/index.d.ts +26 -4
  46. package/dist/blocks/teams/index.js +10 -3
  47. package/dist/blocks/time-tracking/index.d.ts +18 -0
  48. package/dist/blocks/time-tracking/index.js +12 -3
  49. package/dist/blocks/undo/index.d.ts +1 -1
  50. package/dist/blocks/usage/index.d.ts +1 -1
  51. package/dist/blocks/workflow-editor/index.d.ts +3 -3
  52. package/dist/blocks/workflows/index.d.ts +3 -3
  53. package/dist/cli/{add-BXFzr0Wf.js → add-C7lKQNBL.js} +11 -11
  54. package/dist/cli/{add-B6CQOt3A.js → add-DVHniZOO.js} +2 -2
  55. package/dist/cli/add-vZRn-uH0.js +1 -0
  56. package/dist/cli/{backfill-Dflp6JZk.js → backfill-Lrn-Qp5X.js} +3 -3
  57. package/dist/cli/bin.js +1 -1
  58. package/dist/cli/{blocks-CBH3N7Fy.js → blocks-2Yw9t-_U.js} +1 -1
  59. package/dist/cli/{blocks-FtOIcUbu.js → blocks-BKNd886C.js} +1 -1
  60. package/dist/cli/{cache-61VwYKEv.js → cache-ByhPVMo-.js} +1 -1
  61. package/dist/cli/{codemod-CqPRa25J.js → codemod-C0eXpzFu.js} +1 -1
  62. package/dist/cli/{config-BH0goim0.js → config-BVfeG3A5.js} +37 -5
  63. package/dist/cli/{config-CTRzkX0H.js → config-CeaQMrvS.js} +1 -1
  64. package/dist/cli/{content-mapper-DGQQY5IA.js → content-mapper-qH-_YQ8H.js} +2 -2
  65. package/dist/cli/{db-DCeyHS1y.js → db-DwjyUbAh.js} +2 -2
  66. package/dist/cli/{doctor-BxxSO193.js → doctor-BnxkqXGA.js} +16 -16
  67. package/dist/cli/{gen-D2cqqqTH.js → gen-aERmP3Sw.js} +14 -14
  68. package/dist/cli/index.d.ts +1 -1
  69. package/dist/cli/index.js +7 -7
  70. package/dist/cli/{init-BnG1IE1y.js → init-DWUqVSVW.js} +6 -6
  71. package/dist/cli/{live-D26OWOAb.js → live-KcdTBUij.js} +2 -2
  72. package/dist/cli/{mcp-1l3C_GdB.js → mcp-Dsjjo-LT.js} +2 -2
  73. package/dist/cli/{metadata-DDfPBHwI.js → metadata-DWQSIZ59.js} +3 -3
  74. package/dist/cli/{migration-safety-CQbrfZIx.js → migration-safety-Cy7xlU4G.js} +2 -2
  75. package/dist/cli/{migrations-Ch5Uuvyj.js → migrations-CUjNXokR.js} +1 -1
  76. package/dist/cli/{module-migration-Dul1uTYX.js → module-migration-C6NLY9iZ.js} +2 -2
  77. package/dist/cli/powersync-BOhjVQCb.js +1 -0
  78. package/dist/cli/{powersync-CfT-tRx1.js → powersync-CE_hQdgc.js} +2 -2
  79. package/dist/cli/{print-CbPT4PTL.js → print-Cy_ram9N.js} +2 -2
  80. package/dist/cli/{remove-kDH1yxKZ.js → remove-DmwjzqaW.js} +5 -5
  81. package/dist/cli/{render-0Vd7BaNA.js → render-CF09FCra.js} +7 -4
  82. package/dist/cli/{run-DxTd55Ug.js → run-BYpZ8FjF.js} +25 -25
  83. package/dist/cli/{run-Dafms0D2.js → run-lh-chAJW.js} +8 -8
  84. package/dist/cli/{seed-CdSxunFT.js → seed-BMynpMPy.js} +2 -2
  85. package/dist/cli/seed-CO3j_bly.js +1 -0
  86. package/dist/cli/{shared-BQAMXvwd.js → shared-D05A6t1e.js} +1 -1
  87. package/dist/cli/{snapshot-B8K6gYjA.js → snapshot-BITNbA5V.js} +3 -3
  88. package/dist/cli/{source-CXDyCWz5.js → source-GGJHuzpH.js} +1 -1
  89. package/dist/cli/{source-args-z-jkabmO.js → source-args-CDmmFmFG.js} +1 -1
  90. package/dist/cli/{spec-BGsnTkIl.js → spec-BGcRdlhN.js} +2 -2
  91. package/dist/cli/{spec-CaN7nOqI.js → spec-BjxXWaNQ.js} +1 -1
  92. package/dist/cli/{sql-layout-BGAlcp1U.js → sql-layout-BoD5ynN9.js} +2 -2
  93. package/dist/cli/{sync-CT_5VG0E.js → sync-_QlsTmqu.js} +3 -3
  94. package/dist/cli/{upgrade-frUtPDDb.js → upgrade-Cwhb1M7O.js} +4 -4
  95. package/dist/cli/{upgrade-DA7aO88E.js → upgrade-n9ar1kc4.js} +2 -2
  96. package/dist/cli/{version-CUdPyV6J.js → version-RSpJIWDd.js} +1 -1
  97. package/dist/client/index.d.ts +5 -5
  98. package/dist/client/native/index.d.ts +4 -4
  99. package/dist/config/index.d.ts +4 -4
  100. package/dist/config/index.js +4 -4
  101. package/dist/{config-CH-D2B-4.js → config-RwpFcPq8.js} +3 -3
  102. package/dist/{config-C9AOcQ9S.js → config-vHLJ8SKf.js} +1 -1
  103. package/dist/{context-DEisra3V.d.ts → context-CMf4OKpN.d.ts} +57 -13
  104. package/dist/{controller-B6vWdKSa.d.ts → controller-BGto_kYM.d.ts} +1 -1
  105. package/dist/create/index.d.ts +3 -3
  106. package/dist/create/index.js +3 -3
  107. package/dist/create/lite/index.d.ts +3 -3
  108. package/dist/create/lite/index.js +2 -2
  109. package/dist/{entitlements-BPaPd3MD.d.ts → entitlements-CIhVQ-0u.d.ts} +1 -1
  110. package/dist/{field-errors-DBgDCITw.d.ts → field-errors-BDhPaO0a.d.ts} +4 -4
  111. package/dist/{index-ByF22_C6.d.ts → index--OhYKouV.d.ts} +2 -2
  112. package/dist/{index-CM2aGNRo.d.ts → index-4MStWaeF.d.ts} +185 -7
  113. package/dist/{index-3p_oWttZ.d.ts → index-CFWlHuVY.d.ts} +1 -1
  114. package/dist/{index-CdMZQCYR.d.ts → index-lV43eM34.d.ts} +2 -2
  115. package/dist/{index-C4sjewrr.d.ts → index-ujNqgZ6B.d.ts} +6 -6
  116. package/dist/{instances-CK0jR3Pc.js → instances-BPJSESPx.js} +29 -8
  117. package/dist/mapper/bin.js +6 -6
  118. package/dist/mcp/index.d.ts +1 -1
  119. package/dist/next/index.d.ts +3 -3
  120. package/dist/{operations-DC3wU3Sy.d.ts → operations-qSBBV5vl.d.ts} +1 -1
  121. package/dist/{options-fMxhtuVR.js → options-BJtdsK7b.js} +4 -1
  122. package/dist/{options-DhdazgTZ.js → options-BPp2zzsz.js} +3 -1
  123. package/dist/options-BSsYXjhC.js +9 -0
  124. package/dist/{options-ChiL-4ZS.js → options-D4ADKTKo.js} +3 -1
  125. package/dist/{options-C1-pwEqm.js → options-DztCKw_f.js} +4 -1
  126. package/dist/{options-BfFC4iFE.js → options-jsOCvLUz.js} +3 -1
  127. package/dist/otel/index.js +4 -4
  128. package/dist/{ports-BbBJVyS0.d.ts → ports-DbHiNSAa.d.ts} +1 -1
  129. package/dist/powersync/index.d.ts +2 -2
  130. package/dist/preset/index.d.ts +3 -3
  131. package/dist/preset/index.js +3 -3
  132. package/dist/{preset-CS490mYJ.js → preset-B1xXOJ0T.js} +2 -2
  133. package/dist/{project-NmP1NdLi.js → project-BM6QMtzV.js} +5 -5
  134. package/dist/{push-token-CPJfPFa2.d.ts → push-token-BwF1fyjA.d.ts} +1 -1
  135. package/dist/react/index.d.ts +5 -5
  136. package/dist/react/native/index.d.ts +1 -1
  137. package/dist/react/server.d.ts +5 -5
  138. package/dist/realtime/index.d.ts +3 -3
  139. package/dist/realtime/index.js +1 -1
  140. package/dist/records/index.d.ts +3 -3
  141. package/dist/{resolved-names-DdlJzoMK.js → resolved-names-WzRYhUez.js} +1 -1
  142. package/dist/server/index.d.ts +1 -1
  143. package/dist/solid/index.d.ts +5 -5
  144. package/dist/sql/index.d.ts +5 -5
  145. package/dist/sql/index.js +5 -5
  146. package/dist/{sql-BMXEHTvr.js → sql-CNH8kjLS.js} +2712 -954
  147. package/dist/ssr/index.d.ts +1 -1
  148. package/dist/storage/index.js +1 -1
  149. package/dist/subjects-NomQg6Eg.d.ts +131 -0
  150. package/dist/svelte/index.d.ts +5 -5
  151. package/dist/{tenant-BHvMFNXl.d.ts → tenant-D4BA7XQ-.d.ts} +1 -1
  152. package/dist/testing/index.d.ts +3 -3
  153. package/dist/testing/index.js +2 -2
  154. package/dist/{topic-DClSoqY7.js → topic-F0FKzJyQ.js} +1 -1
  155. package/dist/{topic-gTVjLGTk.d.ts → topic-utZqhw96.d.ts} +1 -1
  156. package/dist/{types-BC1HLEVx.d.ts → types-DLnBJ3ST.d.ts} +2 -2
  157. package/dist/vue/index.d.ts +5 -5
  158. package/dist/{watch-topic-C6HhbnVz.d.ts → watch-topic-B1UCoQfz.d.ts} +1 -1
  159. package/dist/workflow-sdk/world/index.js +1 -1
  160. package/dist/{workflow-sdk-DELaQEp3.js → workflow-sdk-CE8sEK57.js} +38 -1
  161. package/dist/yjs/index.d.ts +1 -1
  162. package/dist/yjs/index.js +1 -1
  163. package/package.json +1 -1
  164. package/schemas/config-v1.json +166 -2
  165. package/dist/cli/add-w_HumDPX.js +0 -1
  166. package/dist/cli/powersync-Vmhw5c1N.js +0 -1
  167. package/dist/cli/seed-CXJvTU5D.js +0 -1
  168. package/dist/options-CTv-xmbA.js +0 -5
  169. package/dist/subjects-DvmQeF_F.d.ts +0 -79
@@ -1,5 +1,5 @@
1
1
  import { n as isRecord } from "../../guards-6F2bCtQR.js";
2
- import { t as teamsSqlOptions } from "../../options-BfFC4iFE.js";
2
+ import { t as teamsSqlOptions } from "../../options-jsOCvLUz.js";
3
3
  import { n as event, t as defineEvents } from "../../event-map-CtPFhcOp.js";
4
4
  import { A as recordsOf, L as textOf, O as recordOf, n as applyTemporal, o as blockCall, w as optionalText } from "../../block-helpers-B0f0ZVb5.js";
5
5
  import { r as withBlockHooks } from "../../block-hooks-DKtz0HRh.js";
@@ -21,19 +21,24 @@ function createTeams(options) {
21
21
  const call = blockCall(options.transport, options.schema, options.mappers);
22
22
  const fields = blockFields(options.fields, "team fields");
23
23
  return withBlockHooks({
24
- create: (organizationId, name, description, extra) => fields.args(extra).andThen((checked) => call("create_team", {
24
+ create: (organizationId, name, description, extra, settings) => fields.args(extra).andThen((checked) => call("create_team", {
25
25
  tenant: organizationId,
26
26
  name,
27
27
  description: description ?? null,
28
+ ...settings?.slug === void 0 ? {} : { slug: settings.slug },
28
29
  fields: checked
29
30
  }, (value) => ({
30
31
  ...teamOf(value),
31
32
  name
32
33
  })).andThen(fields.row)),
33
- update: (id, name, description, extra) => fields.args(extra).andThen((checked) => call("update_team", {
34
+ update: (id, name, description, extra, settings) => fields.args(extra).andThen((checked) => call("update_team", {
34
35
  team: id,
35
36
  name,
36
37
  description: description ?? null,
38
+ ...settings === void 0 || settings.slug === void 0 && settings.description === void 0 ? {} : { patch: {
39
+ ...settings.slug === void 0 ? {} : { slug: settings.slug },
40
+ ...settings.description === void 0 ? {} : { description: settings.description }
41
+ } },
37
42
  fields: checked
38
43
  }, (value) => ({
39
44
  ...teamOf(value),
@@ -41,6 +46,7 @@ function createTeams(options) {
41
46
  slug: optionalText(recordOf(value, "team")["slug"]) ?? ""
42
47
  })).andThen(fields.row)),
43
48
  archive: (id) => call("archive_team", { team: id }, (value) => value === true),
49
+ restore: (id) => call("restore_team", { team: id }, (value) => value === true),
44
50
  delete: (id) => call("delete_team", { team: id }, (value) => value === true),
45
51
  addMember: (teamId, userId) => call("add_team_member", {
46
52
  team: teamId,
@@ -63,6 +69,7 @@ const teamsEvents = defineEvents({
63
69
  "team.created": event(),
64
70
  "team.updated": event(),
65
71
  "team.archived": event(),
72
+ "team.restored": event(),
66
73
  "team.deleted": event(),
67
74
  "team_member.added": event(),
68
75
  "team_member.removed": event()
@@ -108,6 +108,12 @@ interface Timesheet {
108
108
  readonly note?: string;
109
109
  readonly submittedAt?: Temporal.Instant;
110
110
  readonly approvedAt?: Temporal.Instant;
111
+ /** With `options.approvals: false`: who decided the week. */
112
+ readonly decidedBy?: string;
113
+ /** With `options.approvals: false`: when the week was decided. */
114
+ readonly decidedAt?: Temporal.Instant;
115
+ /** With `options.approvals: false`: the note of a rejection. */
116
+ readonly decisionNote?: string;
111
117
  }
112
118
  interface TimesheetTotals {
113
119
  /** Every entry, running ones up to now. */
@@ -157,6 +163,16 @@ interface TimeTracking<F extends object = Record<never, never>> {
157
163
  submit(week: Temporal.PlainDate, note?: string): AsyncResult<Timesheet>;
158
164
  /** Unlocks an approved week; needs `time_tracking.manage`. */
159
165
  reopen(timesheetId: string): AsyncResult<Timesheet>;
166
+ /**
167
+ * With `options.approvals: false`: approves a submitted week; needs
168
+ * `time_tracking.approve`, and nobody approves their own.
169
+ */
170
+ approve(timesheetId: string): AsyncResult<Timesheet>;
171
+ /**
172
+ * With `options.approvals: false`: sends a submitted week back with a note,
173
+ * which unlocks it.
174
+ */
175
+ reject(timesheetId: string, note?: string): AsyncResult<Timesheet>;
160
176
  /** Newest week first. */
161
177
  timesheets(options?: TimesheetListOptions): AsyncResult<readonly Timesheet[]>;
162
178
  }
@@ -264,6 +280,8 @@ type TimeTrackingEvents = {
264
280
  readonly "timesheet.submitted": TimesheetEventData;
265
281
  readonly "timesheet.approved": TimesheetEventData;
266
282
  readonly "timesheet.reopened": TimesheetEventData;
283
+ /** With `options.approvals: false`: an approver rejected the week. */
284
+ readonly "timesheet.rejected": TimesheetEventData;
267
285
  };
268
286
  /** The `time-tracking` block's event types, for its manifest and `onBlockEvent`. */
269
287
  export declare const timeTrackingEvents: Events<TimeTrackingEvents>;
@@ -2,7 +2,7 @@ import { n as isRecord } from "../../guards-6F2bCtQR.js";
2
2
  import { s as nowInstant } from "../../temporal-Dbo0fLzc.js";
3
3
  import { t as temporal } from "../../temporal-required-DcLhnDhQ.js";
4
4
  import { t as AsyncResult } from "../../result-ntFBW2p2.js";
5
- import { t as timeTrackingSqlOptions } from "../../options-DhdazgTZ.js";
5
+ import { t as timeTrackingSqlOptions } from "../../options-BPp2zzsz.js";
6
6
  import { r as defineMetric } from "../../metric-definition-BjxVn4R5.js";
7
7
  import { n as event, t as defineEvents } from "../../event-map-CtPFhcOp.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-B0f0ZVb5.js";
@@ -53,7 +53,10 @@ function timesheetOf(value, fn) {
53
53
  ...optional("approvalId", optionalText(row["approvalId"])),
54
54
  ...optional("note", optionalText(row["note"])),
55
55
  ...optional("submittedAt", optionalInstant(row["submittedAt"])),
56
- ...optional("approvedAt", optionalInstant(row["approvedAt"]))
56
+ ...optional("approvedAt", optionalInstant(row["approvedAt"])),
57
+ ...optional("decidedBy", optionalText(row["decidedBy"])),
58
+ ...optional("decidedAt", optionalInstant(row["decidedAt"])),
59
+ ...optional("decisionNote", optionalText(row["decisionNote"]))
57
60
  };
58
61
  }
59
62
  function totalsOf(value) {
@@ -167,6 +170,11 @@ function createTimeTracking(options) {
167
170
  week: week.toString(),
168
171
  note: note ?? null
169
172
  }, (value) => timesheetOf(value, "submit_timesheet"))),
173
+ approve: (timesheetId) => call("approve_timesheet", { timesheet_id: timesheetId }, (value) => timesheetOf(value, "approve_timesheet")),
174
+ reject: (timesheetId, note) => call("reject_timesheet", {
175
+ timesheet_id: timesheetId,
176
+ note: note ?? null
177
+ }, (value) => timesheetOf(value, "reject_timesheet")),
170
178
  reopen: (timesheetId) => call("reopen_timesheet", { timesheet_id: timesheetId }, (value) => timesheetOf(value, "reopen_timesheet")),
171
179
  timesheets: (list = {}) => tenant().andThen((organizationId) => call("list_timesheets", {
172
180
  tenant: organizationId,
@@ -302,7 +310,8 @@ const timeTrackingEvents = defineEvents({
302
310
  "time_entry.deleted": event(),
303
311
  "timesheet.submitted": event(),
304
312
  "timesheet.approved": event(),
305
- "timesheet.reopened": event()
313
+ "timesheet.reopened": event(),
314
+ "timesheet.rejected": event()
306
315
  });
307
316
  //#endregion
308
317
  //#region src/blocks/time-tracking/manifest.ts
@@ -1,6 +1,6 @@
1
1
  import { a as dbTransport, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-DWZSJrwN.js";
2
2
  import { c as BlockOf } from "../../define-block-DCAiOrNX.js";
3
- import { n as Controller } from "../../controller-B6vWdKSa.js";
3
+ import { n as Controller } from "../../controller-BGto_kYM.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-B1jwnVyN.js";
5
5
  //#region src/blocks/undo/client.d.ts
6
6
  interface UndoEntry {
@@ -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-X22LjuH-.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-Dp45V42p.js";
5
5
  import { c as BlockOf } from "../../define-block-DCAiOrNX.js";
6
- import { n as Controller, t as AuthPort } from "../../controller-B6vWdKSa.js";
6
+ import { n as Controller, t as AuthPort } from "../../controller-BGto_kYM.js";
7
7
  //#region src/blocks/usage/manifest.d.ts
8
8
  /** The `usage` block's manifest (ADR 0029). */
9
9
  export declare const usageBlock: BlockOf<"usage", typeof createUsage>;
@@ -5,9 +5,9 @@ import { Ct as Events, gt as WorkflowEventData } from "../../events-vcqenSYU.js"
5
5
  import { a as dbTransport, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-DWZSJrwN.js";
6
6
  import { c as BlockOf } from "../../define-block-DCAiOrNX.js";
7
7
  import { g as Workflows, n as WorkflowRun } from "../../workflows-B0ZPAQu0.js";
8
- import { p as SubscriptionStatus } from "../../topic-gTVjLGTk.js";
9
- import { n as TopicPort } from "../../watch-topic-C6HhbnVz.js";
10
- import { n as Controller, t as AuthPort } from "../../controller-B6vWdKSa.js";
8
+ import { p as SubscriptionStatus } from "../../topic-utZqhw96.js";
9
+ import { n as TopicPort } from "../../watch-topic-B1UCoQfz.js";
10
+ import { n as Controller, t as AuthPort } from "../../controller-BGto_kYM.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-yj8VF4oY.js";
12
12
  import { a as GraphSubject, c as graphRunFields, i as GraphStepCall, l as startNodeOf, n as GraphRunFields, o as approvalToken, r as GraphRuntime, s as executeGraph, t as GraphApprovalCall } from "../../executor-DNK401lZ.js";
13
13
  //#region src/blocks/workflow-editor/workflow-editor.d.ts
@@ -3,9 +3,9 @@ import { Ct as Events, _t as WorkflowRunEventData } from "../../events-vcqenSYU.
3
3
  import { a as dbTransport, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-DWZSJrwN.js";
4
4
  import { c as BlockOf } from "../../define-block-DCAiOrNX.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-B0ZPAQu0.js";
6
- import { p as SubscriptionStatus } from "../../topic-gTVjLGTk.js";
7
- import { n as TopicPort } from "../../watch-topic-C6HhbnVz.js";
8
- import { n as Controller, t as AuthPort } from "../../controller-B6vWdKSa.js";
6
+ import { p as SubscriptionStatus } from "../../topic-utZqhw96.js";
7
+ import { n as TopicPort } from "../../watch-topic-B1UCoQfz.js";
8
+ import { n as Controller, t as AuthPort } from "../../controller-BGto_kYM.js";
9
9
  //#region src/blocks/workflows/client.d.ts
10
10
  interface WorkflowRunsControllerOptions {
11
11
  readonly client: {
@@ -1,22 +1,22 @@
1
1
  import { a as list, p as commandMeta, r as defineCliCommand } from "./command-BWEEXmtz.js";
2
2
  import { i as plain } from "./style-Bm2X5JrN.js";
3
- import { t as VERSION } from "./version-CUdPyV6J.js";
3
+ import { t as VERSION } from "./version-RSpJIWDd.js";
4
4
  import { a as parseNames, n as CliError } from "./errors-BTe6A15O.js";
5
5
  import { r as readIfExists, t as display } from "./io-DH1kcmmP.js";
6
- import { t as loadSnapshot } from "./snapshot-B8K6gYjA.js";
6
+ import { t as loadSnapshot } from "./snapshot-BITNbA5V.js";
7
7
  import { t as isRecord } from "./guards-CUlDNYZs.js";
8
- import { a as toCatalog } from "./source-CXDyCWz5.js";
9
- import { n as dataMigration } from "./migrations-Ch5Uuvyj.js";
10
- import { a as findConfig, f as INTEGRATIONS, s as loadConfig } from "./config-BH0goim0.js";
8
+ import { a as toCatalog } from "./source-GGJHuzpH.js";
9
+ import { n as dataMigration } from "./migrations-CUjNXokR.js";
10
+ import { a as findConfig, f as INTEGRATIONS, s as loadConfig } from "./config-BVfeG3A5.js";
11
11
  import { i as changeLines, n as PLAN_ARGS, r as applyPlan, u as planResult } from "./files-CX71yBm8.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-CQbrfZIx.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-Cy7xlU4G.js";
13
13
  import { n as installCommand, t as detectProject } from "./detect-D9JaAX20.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-CrWfk8s3.js";
15
- import { t as syncModules } from "./sync-CT_5VG0E.js";
16
- import { t as addModules } from "./add-B6CQOt3A.js";
17
- import { n as ident } from "./live-D26OWOAb.js";
18
- import { t as blockNames } from "./blocks-CBH3N7Fy.js";
19
- import { i as sourceArgs, n as SOURCE_ARGS } from "./source-args-z-jkabmO.js";
15
+ import { t as syncModules } from "./sync-_QlsTmqu.js";
16
+ import { t as addModules } from "./add-DVHniZOO.js";
17
+ import { n as ident } from "./live-KcdTBUij.js";
18
+ import { t as blockNames } from "./blocks-2Yw9t-_U.js";
19
+ import { i as sourceArgs, n as SOURCE_ARGS } from "./source-args-CDmmFmFG.js";
20
20
  import { existsSync } from "node:fs";
21
21
  import { dirname, join, posix, resolve } from "node:path";
22
22
  import { readFile } from "node:fs/promises";
@@ -1,8 +1,8 @@
1
1
  import { n as CliError } from "./errors-BTe6A15O.js";
2
- import { c as layoutFor, g as providerLabel, l as providerOwnsMemberships, o as MEMBERSHIP_CLAIM_MODULES } from "./migrations-Ch5Uuvyj.js";
2
+ import { c as layoutFor, g as providerLabel, l as providerOwnsMemberships, o as MEMBERSHIP_CLAIM_MODULES } from "./migrations-CUjNXokR.js";
3
3
  import { r as applyPlan } from "./files-CX71yBm8.js";
4
4
  import { n as addBlocksToJson, s as keyText, t as addBlocksToConfig } from "./config-edit-CrWfk8s3.js";
5
- import { a as write, i as unlistedModuleFiles, r as nextStep } from "./sync-CT_5VG0E.js";
5
+ import { a as write, i as unlistedModuleFiles, r as nextStep } from "./sync-_QlsTmqu.js";
6
6
  import { basename, dirname } from "node:path";
7
7
  import { readFile } from "node:fs/promises";
8
8
  import { SQL_MODULES, resolveBlocks } from "better-supabase/sql";
@@ -0,0 +1 @@
1
+ export { t as addCommand } from "./add-C7lKQNBL.js";
@@ -1,10 +1,10 @@
1
1
  import { p as commandMeta, r as defineCliCommand } from "./command-BWEEXmtz.js";
2
2
  import { n as CliError, r as errorText } from "./errors-BTe6A15O.js";
3
3
  import { i as isLocalDatabaseUrl, r as databaseHost } from "./agent-CbuPvI2x.js";
4
- import { l as stdinDatabaseUrl, n as databaseUrl } from "./config-BH0goim0.js";
4
+ import { l as stdinDatabaseUrl, n as databaseUrl } from "./config-BVfeG3A5.js";
5
5
  import { t as connect } from "./db-CQCLx7cx.js";
6
- import { n as ident } from "./live-D26OWOAb.js";
7
- import { r as STACK_ARG, t as DB_URL_STDIN_ARG } from "./source-args-z-jkabmO.js";
6
+ import { n as ident } from "./live-KcdTBUij.js";
7
+ import { r as STACK_ARG, t as DB_URL_STDIN_ARG } from "./source-args-CDmmFmFG.js";
8
8
  //#region src/cli/commands/backfill.ts
9
9
  const DEFAULT_BATCH = 1e3;
10
10
  const ARGS = {
package/dist/cli/bin.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { i as run } from "./run-DxTd55Ug.js";
2
+ import { i as run } from "./run-BYpZ8FjF.js";
3
3
  import { t as colorEnabled } from "./style-Bm2X5JrN.js";
4
4
  import { existsSync } from "node:fs";
5
5
  import { basename } from "node:path";
@@ -1,7 +1,7 @@
1
1
  import { p as commandMeta, r as defineCliCommand } from "./command-BWEEXmtz.js";
2
2
  import { n as CliError } from "./errors-BTe6A15O.js";
3
3
  import { t as SQL_ARGS } from "./args-UEwg0l-N.js";
4
- import { n as listModules, t as printModule } from "./print-CbPT4PTL.js";
4
+ import { n as listModules, t as printModule } from "./print-Cy_ram9N.js";
5
5
  import { t as decodePresetInput } from "./preset-BwmIfFnh.js";
6
6
  import { BLOCK_CATEGORIES } from "better-supabase/blocks";
7
7
  import { PRESET_CATALOG, PRESET_NAMES, glueCommand } from "better-supabase/preset";
@@ -1 +1 @@
1
- export { n as blocksListCommand, r as blocksSearchCommand, i as blocksViewCommand } from "./blocks-CBH3N7Fy.js";
1
+ export { n as blocksListCommand, r as blocksSearchCommand, i as blocksViewCommand } from "./blocks-2Yw9t-_U.js";
@@ -1,4 +1,4 @@
1
- import { t as VERSION } from "./version-CUdPyV6J.js";
1
+ import { t as VERSION } from "./version-RSpJIWDd.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-BTe6A15O.js";
4
4
  import { t as migrateCliCall } from "./moved-DVwgE8lV.js";
5
5
  import { t as isRecord$1 } from "./guards-CUlDNYZs.js";
6
6
  import { a as changedFiles, i as changeLines, r as applyPlan, u as planResult } from "./files-CX71yBm8.js";
7
- import { i as schemasDirOf, n as migrationsDir, o as writtenByBlocks } from "./sql-layout-BGAlcp1U.js";
7
+ import { i as schemasDirOf, n as migrationsDir, o as writtenByBlocks } from "./sql-layout-BoD5ynN9.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-CrWfk8s3.js";
9
9
  import { i as legacyPrefixNames, n as LEGACY_PREFIXES, t as LEGACY_CLAIMS } from "./legacy-prefix-R7UChFFl.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-BuSaTE_G.js";
@@ -686,6 +686,38 @@ function _isDirectory(path) {
686
686
  }
687
687
  }
688
688
  //#endregion
689
+ //#region src/cli/block-config-schema.ts
690
+ /**
691
+ * `blocks.<name>.values`: table to column to label to an app value, a list of
692
+ * app values, or `null`. The module context checks the names.
693
+ */
694
+ const valueMapsSchema = record(string(), record(string(), record(string(), nullable(union([string(), array(string())])))));
695
+ /**
696
+ * `records.<type>.permissions`: action to a key, or to `{ key, rows, owner }`.
697
+ * The subject registry checks the names.
698
+ */
699
+ const subjectPermissionsSchema = record(string(), union([string(), strictObject({
700
+ key: optional(string()),
701
+ rows: optional(string()),
702
+ owner: optional(string())
703
+ })]));
704
+ /** `records.<type>.search`. The subject registry checks the names. */
705
+ const subjectSearchSchema = strictObject({
706
+ title: optional(string()),
707
+ body: optional(array(string())),
708
+ description: optional(string()),
709
+ exclude: optional(string()),
710
+ from: optional(strictObject({
711
+ view: string(),
712
+ key: string()
713
+ })),
714
+ watch: optional(array(strictObject({
715
+ table: string(),
716
+ key: string(),
717
+ via: optional(string())
718
+ })))
719
+ });
720
+ //#endregion
689
721
  //#region src/cli/config-moved.ts
690
722
  /** Where each top-level key of a 0.14 config moved in 0.15. */
691
723
  const MOVED_KEYS = new Map([...Object.entries(CONFIG_GROUPS).flatMap(([group, keys]) => keys.filter((key) => key !== "tables").map((key) => [key, `${group}.${key}`])), ...RENAMED_CONFIG_KEYS.map(([grouped, flat]) => [flat, grouped])]);
@@ -780,6 +812,7 @@ const blockEntries = {
780
812
  ownership: optional(picklist(["managed", "custom"], (issue) => issue.input === "adopt" ? ADOPT_REMOVED : issue.message)),
781
813
  schema: optional(string()),
782
814
  columns: optional(record(string(), record(string(), nullable(string())))),
815
+ values: optional(valueMapsSchema),
783
816
  idType: optional(string()),
784
817
  owner: optional(picklist([
785
818
  "tenant",
@@ -882,6 +915,8 @@ const authorization = strictObject({
882
915
  holdersOf: optional(string()),
883
916
  actorMayWrite: optional(string()),
884
917
  permitted: optional(string()),
918
+ rowsWith: optional(string()),
919
+ rowsWithFor: optional(string()),
885
920
  portalSubjects: optional(string()),
886
921
  portalParties: optional(string())
887
922
  }),
@@ -1239,14 +1274,11 @@ const FLAT = {
1239
1274
  tenant: optional(union([string(), literal(false)])),
1240
1275
  title: optional(string()),
1241
1276
  url: optional(string()),
1242
- permissions: optional(record(string(), string())),
1277
+ permissions: optional(subjectPermissionsSchema),
1243
1278
  scope: optional(string()),
1244
1279
  cascade: optional(boolean()),
1245
1280
  deletedAt: optional(string()),
1246
- search: optional(strictObject({
1247
- title: optional(string()),
1248
- body: optional(strings)
1249
- })),
1281
+ search: optional(subjectSearchSchema),
1250
1282
  rank: optional(strictObject({
1251
1283
  column: string(),
1252
1284
  group: optional(string())
@@ -1 +1 @@
1
- export { t as applyEnvironment, n as databaseUrl, r as defaultConfig, i as discoverConfig, a as findConfig, o as importExport, s as loadConfig, c as readSupabasePort, l as stdinDatabaseUrl } from "./config-BH0goim0.js";
1
+ export { t as applyEnvironment, n as databaseUrl, r as defaultConfig, i as discoverConfig, a as findConfig, o as importExport, s as loadConfig, c as readSupabasePort, l as stdinDatabaseUrl } from "./config-BVfeG3A5.js";
@@ -1,6 +1,6 @@
1
1
  import { r as readIfExists } from "./io-DH1kcmmP.js";
2
- import { t as CACHE_DIR } from "./cache-61VwYKEv.js";
3
- import { x as installedVersion } from "./snapshot-B8K6gYjA.js";
2
+ import { t as CACHE_DIR } from "./cache-ByhPVMo-.js";
3
+ import { x as installedVersion } from "./snapshot-BITNbA5V.js";
4
4
  import { t as i } from "./jsonc-D5Fu67jw.js";
5
5
  import { resolve } from "node:path";
6
6
  import { createHash } from "node:crypto";
@@ -2,11 +2,11 @@ import { p as commandMeta, r as defineCliCommand } from "./command-BWEEXmtz.js";
2
2
  import { n as CliError, r as errorText } from "./errors-BTe6A15O.js";
3
3
  import { i as isLocalDatabaseUrl, r as databaseHost } from "./agent-CbuPvI2x.js";
4
4
  import { t as display } from "./io-DH1kcmmP.js";
5
- import { l as stdinDatabaseUrl, n as databaseUrl } from "./config-BH0goim0.js";
5
+ import { l as stdinDatabaseUrl, n as databaseUrl } from "./config-BVfeG3A5.js";
6
6
  import { d as readSupabaseToml, f as schemaPaths, n as declarativeSchemasDir, p as sqlWorkflow } from "./supabase-toml-CncmQbO0.js";
7
7
  import { r as supabaseCli } from "./exec--Q1ZEWUW.js";
8
8
  import { t as connect } from "./db-CQCLx7cx.js";
9
- import { r as STACK_ARG, t as DB_URL_STDIN_ARG } from "./source-args-z-jkabmO.js";
9
+ import { r as STACK_ARG, t as DB_URL_STDIN_ARG } from "./source-args-CDmmFmFG.js";
10
10
  import { a as migrationFiles, i as isShadowFailure, o as migrationVersion, r as inStackDiff, t as MIGRATION_HEADER } from "./in-stack-diff-DQTW53Vf.js";
11
11
  import { dirname, join, resolve } from "node:path";
12
12
  import { mkdir, readFile, writeFile } from "node:fs/promises";
@@ -1,36 +1,36 @@
1
1
  import { a as list, p as commandMeta, r as defineCliCommand } from "./command-BWEEXmtz.js";
2
2
  import { i as plain } from "./style-Bm2X5JrN.js";
3
- import { t as VERSION } from "./version-CUdPyV6J.js";
3
+ import { t as VERSION } from "./version-RSpJIWDd.js";
4
4
  import { n as CliError, r as errorText } from "./errors-BTe6A15O.js";
5
5
  import { i as isLocalDatabaseUrl, r as databaseHost } from "./agent-CbuPvI2x.js";
6
6
  import { a as sameText, t as display } from "./io-DH1kcmmP.js";
7
- import { t as CACHE_DIR } from "./cache-61VwYKEv.js";
7
+ import { t as CACHE_DIR } from "./cache-ByhPVMo-.js";
8
8
  import { t as byCodePoint } from "./compare-BmIWVEui.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-B8K6gYjA.js";
10
- import { d as configFor, r as renderFiles, u as notNullTag } from "./render-0Vd7BaNA.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-BITNbA5V.js";
10
+ import { d as configFor, r as renderFiles, u as notNullTag } from "./render-CF09FCra.js";
11
11
  import { t as isRecord } from "./guards-CUlDNYZs.js";
12
- import { i as request } from "./source-CXDyCWz5.js";
13
- import { g as providerLabel, u as compiledReadSets } from "./migrations-Ch5Uuvyj.js";
14
- import { l as stdinDatabaseUrl, n as databaseUrl } from "./config-BH0goim0.js";
12
+ import { i as request } from "./source-GGJHuzpH.js";
13
+ import { g as providerLabel, u as compiledReadSets } from "./migrations-CUjNXokR.js";
14
+ import { l as stdinDatabaseUrl, n as databaseUrl } from "./config-BVfeG3A5.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-CncmQbO0.js";
16
16
  import { t as PROCESS_ENV } from "./env-DMgjB_4y.js";
17
17
  import { n as readStackStatus } from "./stack-status-B_Ipd_-z.js";
18
18
  import { t as connect } from "./db-CQCLx7cx.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-DGQQY5IA.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-qH-_YQ8H.js";
20
20
  import { c as insideRoot, i as changeLines, r as applyPlan } from "./files-CX71yBm8.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-Dafms0D2.js";
22
- import { n as migrationsDir, r as moduleLayoutFor, t as blockDeclaredTables } from "./sql-layout-BGAlcp1U.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-BQAMXvwd.js";
24
- import { i as migrationHolds, o as migrationModules, r as latestMigration, t as MODULES_SUFFIX } from "./module-migration-Dul1uTYX.js";
25
- import { o as wiringFor, r as configInstances, t as MIGRATION_SAFETY_RULES } from "./migration-safety-CQbrfZIx.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-lh-chAJW.js";
22
+ import { n as migrationsDir, r as moduleLayoutFor, t as blockDeclaredTables } from "./sql-layout-BoD5ynN9.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-D05A6t1e.js";
24
+ import { i as migrationHolds, o as migrationModules, r as latestMigration, t as MODULES_SUFFIX } from "./module-migration-C6NLY9iZ.js";
25
+ import { o as wiringFor, r as configInstances, t as MIGRATION_SAFETY_RULES } from "./migration-safety-Cy7xlU4G.js";
26
26
  import { t as orphanedBlockFiles } from "./orphans-BAboqyVM.js";
27
- import { i as reservedRoles, n as ident$1, r as literal$1, t as LIVE_RULES } from "./live-D26OWOAb.js";
28
- import { a as sourceFlags, n as SOURCE_ARGS } from "./source-args-z-jkabmO.js";
27
+ import { i as reservedRoles, n as ident$1, r as literal$1, t as LIVE_RULES } from "./live-KcdTBUij.js";
28
+ import { a as sourceFlags, n as SOURCE_ARGS } from "./source-args-CDmmFmFG.js";
29
29
  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-BuSaTE_G.js";
30
30
  import { n as PLATFORM_SCHEMAS } from "./in-stack-diff-DQTW53Vf.js";
31
31
  import { i as staleVariables, r as stackEnvValues, t as PREFIX_NAMES } from "./stack-env-6hS-WEmh.js";
32
32
  import { a as readSharedMemory, n as listStacks, t as branchName } from "./stacks-BYlQ96WS.js";
33
- import { i as refuseWithMetadata, r as readMetadataSnapshot } from "./metadata-DDfPBHwI.js";
33
+ import { i as refuseWithMetadata, r as readMetadataSnapshot } from "./metadata-DWQSIZ59.js";
34
34
  import { existsSync } from "node:fs";
35
35
  import { dirname, resolve } from "node:path";
36
36
  import { createHash } from "node:crypto";
@@ -1,22 +1,22 @@
1
1
  import { a as list, p as commandMeta, r as defineCliCommand } from "./command-BWEEXmtz.js";
2
2
  import { i as plain } from "./style-Bm2X5JrN.js";
3
3
  import { a as parseNames, i as failedResult, n as CliError } from "./errors-BTe6A15O.js";
4
- import { u as catalogFingerprint } from "./cache-61VwYKEv.js";
5
- import { a as serializeSnapshot, g as serializeGenerator, h as restrictSchemas, o as snapshotFile, r as openSource, t as loadSnapshot } from "./snapshot-B8K6gYjA.js";
6
- import { n as dataMigration } from "./migrations-Ch5Uuvyj.js";
7
- import { d as GEN_TASKS, p as isGenTask } from "./config-BH0goim0.js";
4
+ import { u as catalogFingerprint } from "./cache-ByhPVMo-.js";
5
+ import { a as serializeSnapshot, g as serializeGenerator, h as restrictSchemas, o as snapshotFile, r as openSource, t as loadSnapshot } from "./snapshot-BITNbA5V.js";
6
+ import { n as dataMigration } from "./migrations-CUjNXokR.js";
7
+ import { d as GEN_TASKS, p as isGenTask } from "./config-BVfeG3A5.js";
8
8
  import { c as insideRoot, r as applyPlan, u as planResult } from "./files-CX71yBm8.js";
9
- import { n as runGen } from "./run-Dafms0D2.js";
10
- import { t as syncModules } from "./sync-CT_5VG0E.js";
11
- import { t as addModules } from "./add-B6CQOt3A.js";
12
- import { n as listModules, t as printModule } from "./print-CbPT4PTL.js";
13
- import { a as sourceFlags, i as sourceArgs, n as SOURCE_ARGS } from "./source-args-z-jkabmO.js";
14
- import { a as runMetadataGen, n as checkMetadataFlags, t as EMITS } from "./metadata-DDfPBHwI.js";
9
+ import { n as runGen } from "./run-lh-chAJW.js";
10
+ import { t as syncModules } from "./sync-_QlsTmqu.js";
11
+ import { t as addModules } from "./add-DVHniZOO.js";
12
+ import { n as listModules, t as printModule } from "./print-Cy_ram9N.js";
13
+ import { a as sourceFlags, i as sourceArgs, n as SOURCE_ARGS } from "./source-args-CDmmFmFG.js";
14
+ import { a as runMetadataGen, n as checkMetadataFlags, t as EMITS } from "./metadata-DWQSIZ59.js";
15
15
  import { a as runEnv } from "./env-BCgVZkcb.js";
16
- import { c as watchLoop, o as parseInterval, r as specOptionsFromConfig, s as stampFiles, t as runSpec } from "./spec-BGsnTkIl.js";
17
- import { n as runPowerSync } from "./powersync-CfT-tRx1.js";
18
- import { t as runSeed } from "./seed-CdSxunFT.js";
19
- import { t as upgrade } from "./upgrade-frUtPDDb.js";
16
+ import { c as watchLoop, o as parseInterval, r as specOptionsFromConfig, s as stampFiles, t as runSpec } from "./spec-BGcRdlhN.js";
17
+ import { n as runPowerSync } from "./powersync-CE_hQdgc.js";
18
+ import { t as runSeed } from "./seed-BMynpMPy.js";
19
+ import { t as upgrade } from "./upgrade-Cwhb1M7O.js";
20
20
  import { existsSync } from "node:fs";
21
21
  import { resolve } from "node:path";
22
22
  //#region src/cli/commands/sql.ts
@@ -798,6 +798,6 @@ export declare function emitModule(model: Model, options: EmitOptions): string;
798
798
  export declare function loadConfig(cwd: string, explicit?: string, environment?: string, path?: string | undefined): Promise<ResolvedConfig>;
799
799
  //#endregion
800
800
  //#region src/cli/version.d.ts
801
- export declare const VERSION = "0.22.0";
801
+ export declare const VERSION = "0.23.0";
802
802
  //#endregion
803
803
  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-BWEEXmtz.js";
2
- import { i as run, n as createCli, r as help, t as commandNames } from "./run-DxTd55Ug.js";
3
- import { t as VERSION } from "./version-CUdPyV6J.js";
2
+ import { i as run, n as createCli, r as help, t as commandNames } from "./run-BYpZ8FjF.js";
3
+ import { t as VERSION } from "./version-RSpJIWDd.js";
4
4
  import { n as CliError, t as CLI_ERRORS_URL } from "./errors-BTe6A15O.js";
5
- import { a as serializeSnapshot, i as parseSnapshot, l as introspect, t as loadSnapshot } from "./snapshot-B8K6gYjA.js";
6
- import { a as emitBlockConfig, l as buildModel, o as GENERATED_HEADER, r as renderFiles, s as emitModule } from "./render-0Vd7BaNA.js";
7
- import { a as toCatalog, n as managementSource, r as pgSource } from "./source-CXDyCWz5.js";
8
- import { s as loadConfig } from "./config-BH0goim0.js";
9
- import { n as runGen } from "./run-Dafms0D2.js";
5
+ import { a as serializeSnapshot, i as parseSnapshot, l as introspect, t as loadSnapshot } from "./snapshot-BITNbA5V.js";
6
+ import { a as emitBlockConfig, l as buildModel, o as GENERATED_HEADER, r as renderFiles, s as emitModule } from "./render-CF09FCra.js";
7
+ import { a as toCatalog, n as managementSource, r as pgSource } from "./source-GGJHuzpH.js";
8
+ import { s as loadConfig } from "./config-BVfeG3A5.js";
9
+ import { n as runGen } from "./run-lh-chAJW.js";
10
10
  //#region src/cli/introspect/from-catalog.ts
11
11
  /**
12
12
  * Builds a snapshot from catalog records: the inverse of `toCatalog`. Tests and
@@ -2,14 +2,14 @@ import { a as list, p as commandMeta, r as defineCliCommand } from "./command-BW
2
2
  import { i as plain } from "./style-Bm2X5JrN.js";
3
3
  import { n as CliError } from "./errors-BTe6A15O.js";
4
4
  import { r as readIfExists } from "./io-DH1kcmmP.js";
5
- import { l as TYPEGEN_VERSION } from "./cache-61VwYKEv.js";
6
- import { a as findConfig, s as loadConfig } from "./config-BH0goim0.js";
7
- import { r as contentMapperFiles } from "./content-mapper-DGQQY5IA.js";
5
+ import { l as TYPEGEN_VERSION } from "./cache-ByhPVMo-.js";
6
+ import { a as findConfig, s as loadConfig } from "./config-BVfeG3A5.js";
7
+ import { r as contentMapperFiles } from "./content-mapper-qH-_YQ8H.js";
8
8
  import { i as changeLines, n as PLAN_ARGS, r as applyPlan, u as planResult } from "./files-CX71yBm8.js";
9
- 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-BXFzr0Wf.js";
10
- 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-CQbrfZIx.js";
9
+ 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-C7lKQNBL.js";
10
+ 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-Cy7xlU4G.js";
11
11
  import { n as installCommand, t as detectProject } from "./detect-D9JaAX20.js";
12
- import { s as enablePgDelta, t as syncModules } from "./sync-CT_5VG0E.js";
12
+ import { s as enablePgDelta, t as syncModules } from "./sync-_QlsTmqu.js";
13
13
  import { existsSync } from "node:fs";
14
14
  import { join, posix, resolve } from "node:path";
15
15
  import { glob, readFile } from "node:fs/promises";
@@ -1,6 +1,6 @@
1
1
  import { r as errorText } from "./errors-BTe6A15O.js";
2
- import "./source-CXDyCWz5.js";
3
- import { l as tableObject, n as exposed, s as qualified, t as catalogOf } from "./shared-BQAMXvwd.js";
2
+ import "./source-GGJHuzpH.js";
3
+ import { l as tableObject, n as exposed, s as qualified, t as catalogOf } from "./shared-D05A6t1e.js";
4
4
  //#region 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 { p as commandMeta, r as defineCliCommand } from "./command-BWEEXmtz.js";
2
- import { a as envelope, i as run } from "./run-DxTd55Ug.js";
3
- import { t as VERSION } from "./version-CUdPyV6J.js";
2
+ import { a as envelope, i as run } from "./run-BYpZ8FjF.js";
3
+ import { t as VERSION } from "./version-RSpJIWDd.js";
4
4
  import { n as CliError } from "./errors-BTe6A15O.js";
5
5
  import { n as consentToken } from "./agent-CbuPvI2x.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, o as boolean, t as PROCESS_ENV, x as object } from "./env-DMgjB_4y.js";
@@ -1,8 +1,8 @@
1
1
  import { n as CliError, r as errorText } from "./errors-BTe6A15O.js";
2
2
  import { i as readStdin } from "./io-DH1kcmmP.js";
3
- import { m as parseMetadataDocument, u as MetadataRejectedError } from "./snapshot-B8K6gYjA.js";
4
- import { c as metaPaths, n as render } from "./render-0Vd7BaNA.js";
5
- import { i as generationNotices, n as runGen, o as fromMetadata, r as UNFORMATTED, t as refuseRowConditionedBuckets } from "./run-Dafms0D2.js";
3
+ import { m as parseMetadataDocument, u as MetadataRejectedError } from "./snapshot-BITNbA5V.js";
4
+ import { c as metaPaths, n as render } from "./render-CF09FCra.js";
5
+ import { i as generationNotices, n as runGen, o as fromMetadata, r as UNFORMATTED, t as refuseRowConditionedBuckets } from "./run-lh-chAJW.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,5 +1,5 @@
1
- import { f as INTEGRATIONS } from "./config-BH0goim0.js";
2
- import { c as splitStatements } from "./shared-BQAMXvwd.js";
1
+ import { f as INTEGRATIONS } from "./config-BVfeG3A5.js";
2
+ import { c as splitStatements } from "./shared-D05A6t1e.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";
@@ -2,7 +2,7 @@ import { n as CliError } from "./errors-BTe6A15O.js";
2
2
  import { d as readSupabaseToml, p as sqlWorkflow } from "./supabase-toml-CncmQbO0.js";
3
3
  import { t as importFresh } from "./fresh-import-DzgsGHkX.js";
4
4
  import { i as changeLines, r as applyPlan } from "./files-CX71yBm8.js";
5
- import { a as sqlPlan, i as schemasDirOf, n as migrationsDir, r as moduleLayoutFor } from "./sql-layout-BGAlcp1U.js";
5
+ import { a as sqlPlan, i as schemasDirOf, n as migrationsDir, r as moduleLayoutFor } from "./sql-layout-BoD5ynN9.js";
6
6
  import { resolve } from "node:path";
7
7
  import { readFile, readdir } from "node:fs/promises";
8
8
  import { MODULE_ID_TYPES, compileReadSets, moduleIdType, moduleLayout, modulePermissionKeys, moduleSchemaExtensions, renderBlocks, resolveBlocks, scopeProblems, templateFunctions } from "better-supabase/sql";