better-supabase 0.15.0 → 0.15.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{adapter-B0b6MXYS.js → adapter-Dyks1lX1.js} +1 -1
- package/dist/{agents-5n8DWRfP.d.ts → agents-CMIB3802.d.ts} +1 -1
- package/dist/{ai-cache-DyHohbFP.d.ts → ai-cache-2LGgaT7F.d.ts} +1 -1
- package/dist/{ai-chat-D1GuRnke.d.ts → ai-chat-BCaKsvLW.d.ts} +1 -1
- package/dist/{ai-schedules-CAquecT_.d.ts → ai-schedules-D_Hz-ik5.d.ts} +2 -2
- package/dist/ai-sdk/agents/index.d.ts +4 -4
- package/dist/ai-sdk/batches/index.d.ts +1 -1
- package/dist/ai-sdk/cache/index.d.ts +1 -1
- package/dist/ai-sdk/chat/index.d.ts +1 -1
- package/dist/ai-sdk/embeddings/index.d.ts +2 -2
- package/dist/ai-sdk/index.d.ts +4 -4
- package/dist/ai-sdk/memory/index.d.ts +3 -3
- package/dist/ai-sdk/workflow/index.d.ts +3 -3
- package/dist/{app-tables-CF2DD-Mu.d.ts → app-tables-CbCFSXLG.d.ts} +1 -1
- package/dist/{approvals-Crutd4-o.d.ts → approvals-Dh9dUXrN.d.ts} +1 -1
- package/dist/{assistant-CD_h8Vxx.d.ts → assistant-ndGdOBax.d.ts} +2 -2
- package/dist/astro/index.d.ts +2 -2
- package/dist/astro/index.js +2 -2
- package/dist/{authorization-hooks-Cs1vP_ej.d.ts → authorization-hooks-D_pwXlBs.d.ts} +4 -0
- package/dist/{bind-CrMBwrPN.d.ts → bind-h5jre2K0.d.ts} +3 -3
- package/dist/{block-env-B_uEM2xz.d.ts → block-env-BrfRvPrj.d.ts} +4 -4
- package/dist/blocks/access-requests/index.d.ts +1 -1
- package/dist/blocks/activities/index.d.ts +2 -2
- package/dist/blocks/agents/index.d.ts +2 -2
- package/dist/blocks/ai-cache/index.d.ts +2 -2
- package/dist/blocks/ai-chat/index.d.ts +5 -5
- package/dist/blocks/ai-files/index.d.ts +1 -1
- package/dist/blocks/ai-keys/index.d.ts +1 -1
- package/dist/blocks/ai-schedules/index.d.ts +2 -2
- package/dist/blocks/announcements/index.d.ts +4 -4
- package/dist/blocks/api-keys/index.d.ts +2 -2
- package/dist/blocks/approvals/index.d.ts +2 -2
- package/dist/blocks/assets/index.d.ts +1 -1
- package/dist/blocks/assignment/index.d.ts +1 -1
- package/dist/blocks/attachments/index.d.ts +2 -2
- package/dist/blocks/audit/index.d.ts +3 -3
- package/dist/blocks/automations/index.d.ts +4 -4
- package/dist/blocks/billable-time/index.d.ts +1 -1
- package/dist/blocks/billing/index.d.ts +2 -2
- package/dist/blocks/bookings/index.d.ts +3 -3
- package/dist/blocks/bulk/index.d.ts +1 -1
- package/dist/blocks/calendar/index.d.ts +2 -2
- package/dist/blocks/catalog/index.d.ts +1 -1
- package/dist/blocks/channels/index.d.ts +1 -1
- package/dist/blocks/collections/index.d.ts +1 -1
- package/dist/blocks/comments/index.d.ts +4 -4
- package/dist/blocks/compliance/index.d.ts +1 -1
- package/dist/blocks/connectors/index.d.ts +1 -1
- package/dist/blocks/contacts/index.d.ts +1 -1
- package/dist/blocks/content/index.d.ts +1 -1
- package/dist/blocks/contracts/index.d.ts +1 -1
- package/dist/blocks/courses/index.d.ts +1 -1
- package/dist/blocks/created-by/index.d.ts +1 -1
- package/dist/blocks/custom-fields/index.d.ts +1 -1
- package/dist/blocks/data-lifecycle/index.d.ts +2 -2
- package/dist/blocks/deals/index.d.ts +1 -1
- package/dist/blocks/dispatch/index.d.ts +1 -1
- package/dist/blocks/documents/index.d.ts +1 -1
- package/dist/blocks/domains/index.d.ts +1 -1
- package/dist/blocks/donations/index.d.ts +1 -1
- package/dist/blocks/drive/index.d.ts +2 -2
- package/dist/blocks/employees/index.d.ts +2 -2
- package/dist/blocks/enrichment/index.d.ts +1 -1
- package/dist/blocks/enrollments/index.d.ts +1 -1
- package/dist/blocks/entitlements/index.d.ts +3 -3
- package/dist/blocks/expenses/index.d.ts +1 -1
- package/dist/blocks/field-history/index.d.ts +1 -1
- package/dist/blocks/flags/index.d.ts +1 -1
- package/dist/blocks/forecasts/index.d.ts +1 -1
- package/dist/blocks/forms/index.d.ts +2 -2
- package/dist/blocks/goals/index.d.ts +1 -1
- package/dist/blocks/guests/index.d.ts +1 -1
- package/dist/blocks/hiring/index.d.ts +1 -1
- package/dist/blocks/identities/index.d.ts +2 -2
- package/dist/blocks/imports/index.d.ts +1 -1
- package/dist/blocks/inbox/index.d.ts +5 -5
- package/dist/blocks/incidents/index.d.ts +1 -1
- package/dist/blocks/index.d.ts +2 -2
- package/dist/blocks/inventory/index.d.ts +2 -2
- package/dist/blocks/invoices/index.d.ts +1 -1
- package/dist/blocks/knowledge/index.d.ts +2 -2
- package/dist/blocks/lead-scoring/index.d.ts +1 -1
- package/dist/blocks/leases/index.d.ts +1 -1
- package/dist/blocks/leave/index.d.ts +1 -1
- package/dist/blocks/ledger/index.d.ts +1 -1
- package/dist/blocks/mail-sync/index.d.ts +1 -1
- package/dist/blocks/memberships/index.d.ts +1 -1
- package/dist/blocks/memory/index.d.ts +3 -3
- package/dist/blocks/messaging/index.d.ts +4 -4
- package/dist/blocks/metrics/index.d.ts +2 -2
- package/dist/blocks/mfa/index.d.ts +2 -2
- package/dist/blocks/moderation/index.d.ts +1 -1
- package/dist/blocks/notifications/index.d.ts +5 -5
- package/dist/blocks/numbering/index.d.ts +1 -1
- package/dist/blocks/oauth-server/index.d.ts +1 -1
- package/dist/blocks/onboarding/index.d.ts +2 -2
- package/dist/blocks/orders/index.d.ts +3 -3
- package/dist/blocks/organizations/index.d.ts +2 -2
- package/dist/blocks/outbox/index.d.ts +2 -2
- package/dist/blocks/passes/index.d.ts +2 -2
- package/dist/blocks/permissions/index.d.ts +3 -3
- package/dist/blocks/pipelines/index.d.ts +1 -1
- package/dist/blocks/posts/index.d.ts +1 -1
- package/dist/blocks/profiles/index.d.ts +1 -1
- package/dist/blocks/promotions/index.d.ts +1 -1
- package/dist/blocks/push/index.d.ts +2 -2
- package/dist/blocks/queue/index.d.ts +2 -2
- package/dist/blocks/queue/index.js +1 -1
- package/dist/blocks/quotes/index.d.ts +1 -1
- package/dist/blocks/rank/index.d.ts +2 -2
- package/dist/blocks/reactions/index.d.ts +4 -4
- package/dist/blocks/relations/index.d.ts +1 -1
- package/dist/blocks/reminders/index.d.ts +3 -3
- package/dist/blocks/reviews/index.d.ts +1 -1
- package/dist/blocks/saved-views/index.d.ts +2 -2
- package/dist/blocks/scores/index.d.ts +1 -1
- package/dist/blocks/search/index.d.ts +3 -3
- package/dist/blocks/security-events/index.d.ts +1 -1
- package/dist/blocks/segments/index.d.ts +1 -1
- package/dist/blocks/sequences/index.d.ts +1 -1
- package/dist/blocks/service-accounts/index.d.ts +1 -1
- package/dist/blocks/sessions/index.d.ts +2 -2
- package/dist/blocks/settings/index.d.ts +2 -2
- package/dist/blocks/share-links/index.d.ts +1 -1
- package/dist/blocks/shipments/index.d.ts +1 -1
- package/dist/blocks/signatures/index.d.ts +1 -1
- package/dist/blocks/signing-keys/index.d.ts +1 -1
- package/dist/blocks/sla/index.d.ts +1 -1
- package/dist/blocks/sso/index.d.ts +1 -1
- package/dist/blocks/state-machine/index.d.ts +1 -1
- package/dist/blocks/subjects/index.d.ts +2 -2
- package/dist/blocks/tags/index.d.ts +2 -2
- package/dist/blocks/tasks/index.d.ts +2 -2
- package/dist/blocks/teams/index.d.ts +1 -1
- package/dist/blocks/templates/index.d.ts +3 -3
- package/dist/blocks/time-tracking/index.d.ts +1 -1
- package/dist/blocks/timeline/index.d.ts +1 -1
- package/dist/blocks/trash/index.d.ts +1 -1
- package/dist/blocks/undo/index.d.ts +2 -2
- package/dist/blocks/updated-at/index.d.ts +1 -1
- package/dist/blocks/usage/index.d.ts +3 -3
- package/dist/blocks/vercel-marketplace/index.d.ts +1 -1
- package/dist/blocks/versions/index.d.ts +1 -1
- package/dist/blocks/waitlist/index.d.ts +1 -1
- package/dist/blocks/webhooks/index.d.ts +3 -3
- package/dist/blocks/workflow-editor/index.d.ts +6 -6
- package/dist/blocks/workflow-editor/index.js +12 -1
- package/dist/blocks/workflows/index.d.ts +4 -4
- package/dist/{bookings-D4dvGXiR.d.ts → bookings-Dox2rced.d.ts} +1 -1
- package/dist/chat-sdk/index.d.ts +1 -1
- package/dist/cli/{add-DCI5JKjA.js → add-C04vkBk9.js} +2 -2
- package/dist/cli/add-CUH0rORo.js +1 -0
- package/dist/cli/{add-BgsUjCan.js → add-DNOL9PDu.js} +17 -12
- package/dist/cli/{backfill-nxPbcsns.js → backfill-VFzf-TJP.js} +1 -1
- package/dist/cli/bin.js +1 -1
- package/dist/cli/{blocks-Cr4HGePW.js → blocks-Bn7WUca5.js} +1 -1
- package/dist/cli/{blocks-BZHI8mRC.js → blocks-Cb7mILFU.js} +1 -1
- package/dist/cli/{cache-CXgR_Ahi.js → cache-DkplpIGe.js} +1 -1
- package/dist/cli/{codemod-DSN7iAdg.js → codemod-BbaE5dL_.js} +95 -3
- package/dist/cli/{content-mapper-DNs7lTu7.js → content-mapper-Cdx6arxu.js} +2 -2
- package/dist/cli/{doctor-DDrEM6S1.js → doctor-C-VO-QQ2.js} +29 -14
- package/dist/cli/{gen-MtijJQ9r.js → gen-yRHOHW1b.js} +10 -10
- package/dist/cli/index.d.ts +1 -1
- package/dist/cli/index.js +6 -6
- package/dist/cli/{init-D-aDv9r5.js → init-BOw0SX65.js} +5 -5
- package/dist/cli/legacy-prefix-DkTA3Rhx.js +141 -0
- package/dist/cli/{live-iEeH15ck.js → live-Lmg-hYyO.js} +2 -2
- package/dist/cli/{mcp-BAPyaQ62.js → mcp-DQ1zR2eA.js} +2 -2
- package/dist/cli/{metadata-DVx9Zgbj.js → metadata-CZaxkv21.js} +3 -3
- package/dist/cli/{migration-safety-D7PhzFxm.js → migration-safety-BbhLu2fo.js} +1 -1
- package/dist/cli/{module-migration-aPCckev6.js → module-migration-DOn6EmNz.js} +5 -216
- package/dist/cli/{print-BeWO7OJY.js → print-D_xf8PPj.js} +1 -1
- package/dist/cli/{remove-B46Dmd2M.js → remove-BY_TOTRj.js} +5 -4
- package/dist/cli/{render-ucJmUyuM.js → render-lJmHr0y9.js} +3 -3
- package/dist/cli/{run-CvYVAztY.js → run-BJ6IMs_H.js} +20 -7
- package/dist/cli/{run-DYhLBcFW.js → run-DkB0fhc9.js} +20 -20
- package/dist/cli/{shared-LZroULBe.js → shared-Bh-6IqJS.js} +1 -1
- package/dist/cli/{snapshot-C8MVPyO8.js → snapshot-Bzcigm7T.js} +2 -2
- package/dist/cli/{source-DANaJJVc.js → source-WoLdcQzN.js} +1 -1
- package/dist/cli/{spec-g8_G5K7o.js → spec-BF_dpwzW.js} +1 -1
- package/dist/cli/{spec-DGVNMSSB.js → spec-CZMiLhv_.js} +2 -2
- package/dist/cli/sql-layout-rFP0oq1N.js +247 -0
- package/dist/cli/{sync-btj01bcM.js → sync-mANmYYoL.js} +2 -1
- package/dist/cli/{upgrade-B596d4t8.js → upgrade-B0Q9wMs-.js} +4 -137
- package/dist/cli/{upgrade-Dw3TMQzn.js → upgrade-BrNLt92u.js} +2 -2
- package/dist/cli/{version-Du4CgONY.js → version-CyavsyGA.js} +1 -1
- package/dist/client/index.d.ts +5 -5
- package/dist/client/native/index.d.ts +4 -4
- package/dist/{composite-BARuBEDE.js → composite-B3TIjId4.js} +1 -1
- package/dist/{composite-Dsxj7T5K.d.ts → composite-BZYXlVBN.d.ts} +2 -2
- package/dist/config/index.d.ts +1 -1
- package/dist/{context-CEuTKrkz.d.ts → context-TGX2eDS5.d.ts} +24 -2
- package/dist/{controller-BrP0gn47.d.ts → controller-DyPPMFSw.d.ts} +1 -1
- package/dist/{conversion-BAbucuXq.d.ts → conversion-O-kyhXcC.d.ts} +1 -1
- package/dist/create/index.d.ts +2 -2
- package/dist/create/index.js +1 -1
- package/dist/{define-block-BVcLQ3DF.d.ts → define-block-DvvcM54N.d.ts} +1 -1
- package/dist/delegation-C7eWP2r8.d.ts +14 -0
- package/dist/{delegation--93jRsVO.js → delegation-DGOIiT8k.js} +12 -5
- package/dist/edge/index.d.ts +1 -1
- package/dist/edge/index.js +3 -3
- package/dist/{embeddings-kFbRvuic.d.ts → embeddings-D_RsS6ow.d.ts} +1 -1
- package/dist/{entitlements-CJpYQXeE.d.ts → entitlements-BnhDBxLW.d.ts} +1 -1
- package/dist/{envelope-Bzu0JnY2.js → envelope-DEI2iX-d.js} +1 -1
- package/dist/eve/index.d.ts +2 -2
- package/dist/{eve-BFSwTu1z.d.ts → eve-B7jxYPCw.d.ts} +2 -2
- package/dist/{executor-_2ekNofh.d.ts → executor-Bi056Cnj.d.ts} +1 -1
- package/dist/expo/index.d.ts +1 -1
- package/dist/expo/index.js +2 -2
- package/dist/{field-errors-fsbFktYF.d.ts → field-errors-DYtg1mwv.d.ts} +5 -5
- package/dist/{framework-DDdkR7FX.js → framework-BozTXRzt.js} +1 -1
- package/dist/{framework-BKyTeS-j.d.ts → framework-h5lP_5yj.d.ts} +3 -3
- package/dist/{gateway-TD1pRfTP.d.ts → gateway-DzI687yd.d.ts} +3 -3
- package/dist/hono/index.d.ts +1 -1
- package/dist/hono/index.js +2 -2
- package/dist/{index-BnH4Gomw.d.ts → index-Ab4UeEn_.d.ts} +8 -8
- package/dist/{index-BUuVq1co.d.ts → index-B4gcStOz.d.ts} +2 -2
- package/dist/{index-C-qpk8EQ.d.ts → index-BAHGLvGD.d.ts} +1 -1
- package/dist/{index-CguFm716.d.ts → index-BfK6olKm.d.ts} +31 -3
- package/dist/{index-DLq69k3F.d.ts → index-BfkltrGJ.d.ts} +1 -1
- package/dist/{index-B938YqY-.d.ts → index-DN9mfmhA.d.ts} +1 -1
- package/dist/{knowledge-CtL-Vfgy.d.ts → knowledge-F1IhRI4Q.d.ts} +1 -1
- package/dist/mapper/bin.js +5 -5
- package/dist/mcp/index.d.ts +1 -1
- package/dist/mcp/index.js +1 -1
- package/dist/mcp/sdk/index.d.ts +1 -1
- package/dist/mcp/sdk/index.js +1 -1
- package/dist/next/index.d.ts +8 -8
- package/dist/next/index.js +2 -2
- package/dist/orpc/index.d.ts +1 -1
- package/dist/orpc/index.js +1 -1
- package/dist/otel/index.js +4 -4
- package/dist/{outbox-HvGAJuBe.d.ts → outbox-HxjZTfF6.d.ts} +1 -1
- package/dist/{ports-sx226JUL.d.ts → ports-CpdiQv1D.d.ts} +1 -1
- package/dist/powersync/index.d.ts +1 -1
- package/dist/preset/index.d.ts +3 -3
- package/dist/{push-token-D3Vcf0Pf.d.ts → push-token-B3m3pWAv.d.ts} +1 -1
- package/dist/query/index.d.ts +1 -1
- package/dist/react/index.d.ts +5 -5
- package/dist/react/native/index.d.ts +1 -1
- package/dist/react/server.d.ts +5 -5
- package/dist/react-router/index.d.ts +2 -2
- package/dist/react-router/index.js +2 -2
- package/dist/realtime/index.d.ts +4 -4
- package/dist/{record-form-BYs9xv_N.d.ts → record-form-DB_5Ue_B.d.ts} +1 -1
- package/dist/records/index.d.ts +7 -7
- package/dist/server/index.d.ts +7 -6
- package/dist/server/index.js +5 -4
- package/dist/{server-types-CFtehAsr.d.ts → server-types-7QPzW2bF.d.ts} +1 -1
- package/dist/{session-CH0SKgIz.d.ts → session-CfBCJGgc.d.ts} +1 -1
- package/dist/{sign-in-DNCdrk05.js → sign-in-B64114O4.js} +1 -1
- package/dist/solid/index.d.ts +5 -5
- package/dist/solid-start/index.d.ts +2 -2
- package/dist/solid-start/index.js +2 -2
- package/dist/sql/index.d.ts +4 -4
- package/dist/sql/index.js +2 -2
- package/dist/{sql-ClHIdgKS.js → sql-OLVW4t08.js} +275 -13
- package/dist/ssr/index.d.ts +1 -1
- package/dist/{subject-readers-BNSzkqw_.d.ts → subject-readers-8GySC9Z8.d.ts} +1 -1
- package/dist/svelte/index.d.ts +5 -5
- package/dist/sveltekit/index.d.ts +2 -2
- package/dist/sveltekit/index.js +2 -2
- package/dist/tanstack-start/index.d.ts +2 -2
- package/dist/tanstack-start/index.js +2 -2
- package/dist/{tenant-yYg0E2-n.d.ts → tenant-DzFsg0Pc.d.ts} +1 -1
- package/dist/testing/index.d.ts +10 -10
- package/dist/{timeline-CtG0sehj.d.ts → timeline-WrFMgd3U.d.ts} +2 -2
- package/dist/{topic-CJrQZQaa.d.ts → topic-DNFEFGKI.d.ts} +1 -1
- package/dist/{types-CAQBmpDx.d.ts → types-A4yyKEsg.d.ts} +1 -1
- package/dist/{types-SFRomQF7.d.ts → types-Czq9Xtpa.d.ts} +1 -7
- package/dist/{types-BBQLbui9.d.ts → types-DsRfiQ0v.d.ts} +1 -1
- package/dist/{usage-D7QkrwzV.d.ts → usage-Dp45V42p.d.ts} +1 -1
- package/dist/vue/index.d.ts +5 -5
- package/dist/{watch-topic-BcGfvZOE.d.ts → watch-topic-Bo9S2R4P.d.ts} +1 -1
- package/dist/workflow-sdk/builder/index.d.ts +3 -3
- package/dist/workflow-sdk/builder/index.js +1 -1
- package/dist/workflow-sdk/index.d.ts +1 -1
- package/dist/workflow-sdk/index.js +1 -1
- package/dist/{workflow-sdk-BFHu4sci.d.ts → workflow-sdk-B3Ss55Fy.d.ts} +1 -1
- package/dist/{workflow-sdk-BVlFEB5Q.js → workflow-sdk-Cf0LAOFF.js} +2 -2
- package/dist/yjs/index.d.ts +1 -1
- package/package.json +1 -1
- package/schemas/doctor-report-v1.json +1 -0
- package/dist/cli/add-DWjlVwvP.js +0 -1
|
@@ -7,7 +7,7 @@ import { n as Logger } from "../../logger-DWVYUmwi.js";
|
|
|
7
7
|
import { n as BlockOptions } from "../../block-helpers-CRpAHrp_.js";
|
|
8
8
|
import { a as dbTransport, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-DWZSJrwN.js";
|
|
9
9
|
import { n as BlockHooks } from "../../block-hooks-DZN2w69m.js";
|
|
10
|
-
import { c as BlockOf } from "../../define-block-
|
|
10
|
+
import { c as BlockOf } from "../../define-block-DvvcM54N.js";
|
|
11
11
|
import { n as VerifyOptions } from "../../signatures-Dkx9OE8j.js";
|
|
12
12
|
//#region src/blocks/waitlist/waitlist.d.ts
|
|
13
13
|
type WaitlistStatus = "waiting" | "approved" | "rejected" | "joined";
|
|
@@ -7,11 +7,11 @@ import { r as BlockTemporalOptions } from "../../block-helpers-CRpAHrp_.js";
|
|
|
7
7
|
import { n as SqlClient } from "../../executor-hGjrop3A.js";
|
|
8
8
|
import { a as dbTransport, i as RpcClient, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-DWZSJrwN.js";
|
|
9
9
|
import { n as BlockHooks } from "../../block-hooks-DZN2w69m.js";
|
|
10
|
-
import { g as JobHandler, x as QueueSchemas, y as Queue } from "../../types-SFRomQF7.js";
|
|
11
10
|
import { t as BlockProblemOptions } from "../../problem-DNwN8iGz.js";
|
|
12
|
-
import {
|
|
11
|
+
import { g as JobHandler, x as QueueSchemas, y as Queue } from "../../types-Czq9Xtpa.js";
|
|
12
|
+
import { c as BlockOf } from "../../define-block-DvvcM54N.js";
|
|
13
13
|
import { i as EventSink, t as CloudEvent } from "../../cloud-event-CzZTJkXv.js";
|
|
14
|
-
import { g as SubscriberPolicy, i as AuthorizationHooks } from "../../authorization-hooks-
|
|
14
|
+
import { g as SubscriberPolicy, i as AuthorizationHooks } from "../../authorization-hooks-D_pwXlBs.js";
|
|
15
15
|
import { a as verifySharedSecret, i as signWebhook, n as VerifyOptions, o as verifyWebhook, r as WebhookInput, t as VerifiedWebhook } from "../../signatures-Dkx9OE8j.js";
|
|
16
16
|
import { a as DatabaseWebhookPayload, c as hookError, d as stripeInboxVerify, f as verifyStripeWebhook, i as DatabaseChange, l as isDatabaseWebhook, n as AuthHookKind, o as authHook, r as AuthHooks, s as databaseChange, t as AuthHookError, u as signStripeWebhook } from "../../verify-CMou8dWZ.js";
|
|
17
17
|
import { A as IncomingVerify, C as isPublicAddress, D as IncomingDelivery, E as CreatedIncomingWebhook, F as UpdateIncomingWebhookInput, I as UpdatedIncomingWebhook, M as IncomingWebhooks, N as IncomingWebhooksOptions, O as IncomingDestination, P as RotatedIncomingSecret, S as ResolveHost, T as CreateIncomingWebhookInput, _ as WebhookResponse, a as WebhookSignInput, b as AllowUrl, c as standardWebhooks, d as RotateSecretOptions, f as WebhookSecretStore, g as WebhookRequest, h as WebhookPolicyError, i as StandardWebhooksOptions, j as IncomingWebhook, k as IncomingDestinationResult, l as standardWebhooksAsymmetric, m as FetchTransportOptions, n as HmacSignerOptions, o as WebhookSigner, p as sqlSecretStore, r as RawSigner, s as hmacSigner, t as AsymmetricWebhooksOptions, u as webhookPublicKey, v as WebhookTransport, w as publicUrl, x as PublicUrlOptions, y as fetchTransport } from "../../signers-BAEzvTJ0.js";
|
|
@@ -3,13 +3,13 @@ import { t as StandardSchemaV1 } from "../../standard-DBV730sF.js";
|
|
|
3
3
|
import { r as FieldsOf } from "../../block-fields-BE7pInWZ.js";
|
|
4
4
|
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
|
-
import { c as BlockOf } from "../../define-block-
|
|
6
|
+
import { c as BlockOf } from "../../define-block-DvvcM54N.js";
|
|
7
7
|
import { g as Workflows, n as WorkflowRun } from "../../workflows-B0ZPAQu0.js";
|
|
8
|
-
import { p as SubscriptionStatus } from "../../topic-
|
|
9
|
-
import { n as TopicPort } from "../../watch-topic-
|
|
10
|
-
import { n as Controller, t as AuthPort } from "../../controller-
|
|
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-
|
|
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-
|
|
8
|
+
import { p as SubscriptionStatus } from "../../topic-DNFEFGKI.js";
|
|
9
|
+
import { n as TopicPort } from "../../watch-topic-Bo9S2R4P.js";
|
|
10
|
+
import { n as Controller, t as AuthPort } from "../../controller-DyPPMFSw.js";
|
|
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-DsRfiQ0v.js";
|
|
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-Bi056Cnj.js";
|
|
13
13
|
//#region src/blocks/workflow-editor/workflow-editor.d.ts
|
|
14
14
|
/**
|
|
15
15
|
* The `workflow-editor` module's definitions, versions, triggers, credentials,
|
|
@@ -5,7 +5,7 @@ import { t as workflowEditorSqlOptions } from "../../options-DgQo80Xh.js";
|
|
|
5
5
|
import { n as whileSignedIn, t as defineController } from "../../controller-BEliOBOv.js";
|
|
6
6
|
import { A as requiredInstant, B as dbTransport, C as optionalText, D as recordOf, F as stringsOf, H as rpcTransport, I as textOf, M as seconds, O as recordOrEmpty, S as optionalInstant, T as randomToken, U as sqlTransport, d as enumOrThrow, k as recordsOf, n as applyTemporal, o as blockCall, p as injectableOf } from "../../block-helpers-CtBdjgO4.js";
|
|
7
7
|
import { r as withBlockHooks } from "../../block-hooks-BfxX3682.js";
|
|
8
|
-
import { n as PERMISSION_CAP_CLAIM } from "../../delegation
|
|
8
|
+
import { n as LEGACY_PERMISSION_CAP_CLAIM, r as PERMISSION_CAP_CLAIM } from "../../delegation-DGOIiT8k.js";
|
|
9
9
|
import { n as credentialRefInTenant, r as foreignCredentialRef } from "../../provider-B6g7rBZX.js";
|
|
10
10
|
import { n as event, t as defineEvents } from "../../event-map-CtPFhcOp.js";
|
|
11
11
|
import { n as blockFields } from "../../block-fields-DE_FgpOU.js";
|
|
@@ -183,6 +183,16 @@ function defaultClaims(automation, publisher) {
|
|
|
183
183
|
[PERMISSION_CAP_CLAIM]: automation.permissions
|
|
184
184
|
};
|
|
185
185
|
}
|
|
186
|
+
let warnedLegacyCap = false;
|
|
187
|
+
/**
|
|
188
|
+
* Warns once when `runAs` returns the cap under its 0.14 name only: the access
|
|
189
|
+
* functions still read it through 0.15, a later minor release won't.
|
|
190
|
+
*/
|
|
191
|
+
function warnLegacyCap(claims) {
|
|
192
|
+
if (warnedLegacyCap || claims["bsb_permission_cap"] !== void 0 || claims["bs_permission_cap"] === void 0) return;
|
|
193
|
+
warnedLegacyCap = true;
|
|
194
|
+
console.warn(`automation.runAs returned the permission cap as ${LEGACY_PERMISSION_CAP_CLAIM}, its 0.14 name. 0.15 still reads it, a later minor release won't: return it as ${PERMISSION_CAP_CLAIM} (PERMISSION_CAP_CLAIM from better-supabase/server).`);
|
|
195
|
+
}
|
|
186
196
|
/** A hook's answer, with a throw or a rejection as `undefined`. */
|
|
187
197
|
async function settled(run) {
|
|
188
198
|
try {
|
|
@@ -236,6 +246,7 @@ function runAsPublisher(serviceCall, runAs, version, tenant) {
|
|
|
236
246
|
}
|
|
237
247
|
const claims = await settled(() => runAs(automation));
|
|
238
248
|
if (claims === void 0 || claims === null || !isRecord(claims)) return err(forbidden(automation.publisher === null ? "The app has no service principal for this organization's workflow" : "The user who published this workflow can no longer run it", "WORKFLOW_PUBLISHER_REVOKED"));
|
|
249
|
+
warnLegacyCap(claims);
|
|
239
250
|
return ok(claims);
|
|
240
251
|
});
|
|
241
252
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { b as DbError } from "../../result-DZeA5KS6.js";
|
|
2
2
|
import { Ct as Events, _t as WorkflowRunEventData } from "../../events-vcqenSYU.js";
|
|
3
3
|
import { a as dbTransport, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../../block-transport-DWZSJrwN.js";
|
|
4
|
-
import { c as BlockOf } from "../../define-block-
|
|
4
|
+
import { c as BlockOf } from "../../define-block-DvvcM54N.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-
|
|
7
|
-
import { n as TopicPort } from "../../watch-topic-
|
|
8
|
-
import { n as Controller, t as AuthPort } from "../../controller-
|
|
6
|
+
import { p as SubscriptionStatus } from "../../topic-DNFEFGKI.js";
|
|
7
|
+
import { n as TopicPort } from "../../watch-topic-Bo9S2R4P.js";
|
|
8
|
+
import { n as Controller, t as AuthPort } from "../../controller-DyPPMFSw.js";
|
|
9
9
|
//#region src/blocks/workflows/client.d.ts
|
|
10
10
|
interface WorkflowRunsControllerOptions {
|
|
11
11
|
readonly client: {
|
|
@@ -5,7 +5,7 @@ import { r as FieldsOf } from "./block-fields-BE7pInWZ.js";
|
|
|
5
5
|
import { n as Logger } from "./logger-DWVYUmwi.js";
|
|
6
6
|
import { n as BlockOptions } from "./block-helpers-CRpAHrp_.js";
|
|
7
7
|
import { n as BlockHooks } from "./block-hooks-DZN2w69m.js";
|
|
8
|
-
import { g as JobHandler } from "./types-
|
|
8
|
+
import { g as JobHandler } from "./types-Czq9Xtpa.js";
|
|
9
9
|
import { o as WeeklyHours } from "./availability-vguUvEK2.js";
|
|
10
10
|
//#region src/blocks/bookings/series.d.ts
|
|
11
11
|
/** An ISO weekday: 1 is Monday, 7 is Sunday. */
|
package/dist/chat-sdk/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { a as CredentialSubject, i as CredentialRef, o as CredentialToken, r as
|
|
|
4
4
|
import { a as dbTransport, o as rpcTransport, s as sqlTransport, t as BlockTransport } from "../block-transport-DWZSJrwN.js";
|
|
5
5
|
import { o as StreamStore } from "../store-CpheI-lN.js";
|
|
6
6
|
import { u as MessageFile } from "../messaging-C_Pr9tGx.js";
|
|
7
|
-
import { c as ChatActionHook, d as IdentityRef, f as IdentityTarget, i as AuthorizationHooks, p as PrincipalByIdentity, s as ChatAction, t as ApprovalRequestRef } from "../authorization-hooks-
|
|
7
|
+
import { c as ChatActionHook, d as IdentityRef, f as IdentityTarget, i as AuthorizationHooks, p as PrincipalByIdentity, s as ChatAction, t as ApprovalRequestRef } from "../authorization-hooks-D_pwXlBs.js";
|
|
8
8
|
import { S as StoredInboundEvent, c as DeliveryStatus, f as InboxFileSource, i as Conversation, l as InboundResult, p as InboxMessage, y as PendingInboxFile } from "../types-Dp3UCr1e.js";
|
|
9
9
|
import { a as Inbox } from "../inbox-NDKwSk_H.js";
|
|
10
10
|
import { Adapter, AdapterPostableMessage, Attachment, Author, Message, RawMessage, StateAdapter, WebhookOptions } from "chat";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { n as CliError } from "./errors-BTe6A15O.js";
|
|
2
|
-
import {
|
|
2
|
+
import { T as providerLabel, _ as layoutFor, h as MEMBERSHIP_CLAIM_MODULES, v as providerOwnsMemberships } from "./module-migration-DOn6EmNz.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-
|
|
5
|
+
import { a as write, i as unlistedModuleFiles, r as nextStep } from "./sync-mANmYYoL.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-DNOL9PDu.js";
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { a as list, p as commandMeta, r as defineCliCommand } from "./command-CQ61x6gN.js";
|
|
2
2
|
import { i as plain } from "./style-Bm2X5JrN.js";
|
|
3
|
-
import { t as VERSION } from "./version-
|
|
3
|
+
import { t as VERSION } from "./version-CyavsyGA.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-
|
|
6
|
+
import { t as loadSnapshot } from "./snapshot-Bzcigm7T.js";
|
|
7
7
|
import { t as isRecord } from "./guards-CUlDNYZs.js";
|
|
8
|
-
import { a as toCatalog } from "./source-
|
|
9
|
-
import { f as dataMigration } from "./module-migration-
|
|
8
|
+
import { a as toCatalog } from "./source-WoLdcQzN.js";
|
|
9
|
+
import { f as dataMigration } from "./module-migration-DOn6EmNz.js";
|
|
10
10
|
import { a as findConfig, f as INTEGRATIONS, s as loadConfig } from "./config-9t5ec_N7.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-
|
|
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-BbhLu2fo.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-
|
|
16
|
-
import { t as addModules } from "./add-
|
|
17
|
-
import { n as ident } from "./live-
|
|
18
|
-
import { t as blockNames } from "./blocks-
|
|
15
|
+
import { t as syncModules } from "./sync-mANmYYoL.js";
|
|
16
|
+
import { t as addModules } from "./add-C04vkBk9.js";
|
|
17
|
+
import { n as ident } from "./live-Lmg-hYyO.js";
|
|
18
|
+
import { t as blockNames } from "./blocks-Cb7mILFU.js";
|
|
19
19
|
import { i as sourceArgs, n as SOURCE_ARGS } from "./source-args-IpJRJO5t.js";
|
|
20
20
|
import { existsSync } from "node:fs";
|
|
21
21
|
import { dirname, join, posix, resolve } from "node:path";
|
|
@@ -252,7 +252,7 @@ function qualifiedName(name) {
|
|
|
252
252
|
}
|
|
253
253
|
/** The introspected tables in the shape a proposal reads. */
|
|
254
254
|
function existingTables(tables) {
|
|
255
|
-
return tables
|
|
255
|
+
return tables;
|
|
256
256
|
}
|
|
257
257
|
function candidates(logical, physical) {
|
|
258
258
|
const snake = toSnake(logical);
|
|
@@ -321,7 +321,7 @@ function matchTables(block, tables, from, schemas, errors) {
|
|
|
321
321
|
for (const name of from) {
|
|
322
322
|
const table = byName.get(qualifiedName(name));
|
|
323
323
|
if (table === void 0) {
|
|
324
|
-
errors.push(`${qualifiedName(name)} is not a table in the database.`);
|
|
324
|
+
errors.push(`${qualifiedName(name)} is not a table or view in the database.`);
|
|
325
325
|
continue;
|
|
326
326
|
}
|
|
327
327
|
const best = Object.entries(spec).filter(([logical]) => !chosen.has(logical)).map(([logical, names]) => ({
|
|
@@ -391,6 +391,7 @@ function proposeAdoption(block, tables, options = {}) {
|
|
|
391
391
|
for (const match of columns) {
|
|
392
392
|
if (match.column === null) {
|
|
393
393
|
if (table.optional?.includes(match.logical) === true) mapped[match.logical] = null;
|
|
394
|
+
else if (existing.kind === "view") errors.push(`${name} is a view with no column for ${logical}.${match.logical}, and the block can't add one to a view. Add ${table.columns[match.logical]} to the view, or map blocks.${block}.columns.${logical}.${match.logical} to the column that holds it.`);
|
|
394
395
|
else warnings.push(`${name} has no column for ${logical}.${match.logical}, so the block's migration adds ${table.columns[match.logical]}. Map blocks.${block}.columns.${logical}.${match.logical} instead when another column holds it.`);
|
|
395
396
|
continue;
|
|
396
397
|
}
|
|
@@ -417,10 +418,14 @@ function proposeAdoption(block, tables, options = {}) {
|
|
|
417
418
|
};
|
|
418
419
|
const adopted = [...chosen.values()].filter((table) => table !== null);
|
|
419
420
|
const ownTables = Object.fromEntries(tables.map((table) => [`${table.schema}.${table.name}`, "database"]));
|
|
421
|
+
const ownViews = Object.fromEntries(tables.filter((table) => table.kind === "view").map((table) => [`${table.schema}.${table.name}`, { updatable: table.updatable === true }]));
|
|
422
|
+
const ownColumns = Object.fromEntries(tables.map((table) => [`${table.schema}.${table.name}`, table.columns.map((column) => column.name)]));
|
|
420
423
|
try {
|
|
421
424
|
moduleBody(block, {
|
|
422
425
|
modules: blocks,
|
|
423
|
-
ownTables
|
|
426
|
+
ownTables,
|
|
427
|
+
ownViews,
|
|
428
|
+
ownColumns
|
|
424
429
|
});
|
|
425
430
|
errors.push(...adoptedColumnProblems(blocks, adopted.map((table) => ({ text: declaration(table) })), [...new Set(adopted.map((table) => table.schema))], ownTables));
|
|
426
431
|
} catch (error) {
|
|
@@ -3,7 +3,7 @@ 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 { l as stdinDatabaseUrl, n as databaseUrl } from "./config-9t5ec_N7.js";
|
|
5
5
|
import { t as connect } from "./db-CQCLx7cx.js";
|
|
6
|
-
import { n as ident } from "./live-
|
|
6
|
+
import { n as ident } from "./live-Lmg-hYyO.js";
|
|
7
7
|
import { r as STACK_ARG, t as DB_URL_STDIN_ARG } from "./source-args-IpJRJO5t.js";
|
|
8
8
|
//#region src/cli/commands/backfill.ts
|
|
9
9
|
const DEFAULT_BATCH = 1e3;
|
package/dist/cli/bin.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { n as blocksListCommand, r as blocksSearchCommand, i as blocksViewCommand } from "./blocks-
|
|
1
|
+
export { n as blocksListCommand, r as blocksSearchCommand, i as blocksViewCommand } from "./blocks-Cb7mILFU.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { p as commandMeta, r as defineCliCommand } from "./command-CQ61x6gN.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-
|
|
4
|
+
import { n as listModules, t as printModule } from "./print-D_xf8PPj.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,4 +1,4 @@
|
|
|
1
|
-
import { t as VERSION } from "./version-
|
|
1
|
+
import { t as VERSION } from "./version-CyavsyGA.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,9 +4,12 @@ import { n as CliError } from "./errors-BTe6A15O.js";
|
|
|
4
4
|
import { t as migrateCliCall } from "./moved-CsfDQcyk.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-rFP0oq1N.js";
|
|
7
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
|
+
import { i as legacyPrefixNames, n as LEGACY_PREFIXES, t as LEGACY_CLAIMS } from "./legacy-prefix-DkTA3Rhx.js";
|
|
8
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";
|
|
9
11
|
import { a as RECORD_BINDING_RENAMES, n as groupConfigJson, r as groupConfigSource, t as cutRange } from "./config-group-C8tjut39.js";
|
|
12
|
+
import { existsSync } from "node:fs";
|
|
10
13
|
import { extname, join, relative, resolve } from "node:path";
|
|
11
14
|
import { readFile, readdir, stat } from "node:fs/promises";
|
|
12
15
|
import { DEFAULT_CONVENTIONS, presetSpec } from "better-supabase/preset";
|
|
@@ -44,17 +47,39 @@ function cliCalls(text, migrate) {
|
|
|
44
47
|
}
|
|
45
48
|
return calls;
|
|
46
49
|
}
|
|
50
|
+
/**
|
|
51
|
+
* A CLI call followed by `&&` and the same call again. The call starts after a
|
|
52
|
+
* shell operator, a quote, a line break or a YAML `run:`, and the repeat ends
|
|
53
|
+
* at one, so only whole commands match.
|
|
54
|
+
*/
|
|
55
|
+
const REPEATED_CALL = /((?:^|&&|\|\||[;:\n"'`(])[ \t]*)([^&|;\n"'`()]*?(?<![\w.@-])(?:better-supabase|bsb)(?:@[\w.^~-]+)?[ \t][^&|;\n"'`()]*?)[ \t]*&&[ \t]*\2(?=[ \t]*(?:&&|\|\||[;\n"'`)]|$))/g;
|
|
56
|
+
/**
|
|
57
|
+
* `text` with each run of identical CLI calls joined by `&&` kept once. Two old
|
|
58
|
+
* commands can move to the same new one (`sql sync` and `sql upgrade` both
|
|
59
|
+
* become `upgrade`), and running it twice in a row does the work twice.
|
|
60
|
+
*/
|
|
61
|
+
function collapseRepeatedCalls(text) {
|
|
62
|
+
let out = text;
|
|
63
|
+
let previous;
|
|
64
|
+
while (out !== previous) {
|
|
65
|
+
previous = out;
|
|
66
|
+
out = out.replaceAll(REPEATED_CALL, "$1$2");
|
|
67
|
+
}
|
|
68
|
+
return out;
|
|
69
|
+
}
|
|
47
70
|
/** `text` with every moved CLI call spelled the new way. */
|
|
48
71
|
function rewriteCliCalls(text, migrate) {
|
|
72
|
+
const calls = cliCalls(text, migrate);
|
|
73
|
+
if (calls.length === 0) return text;
|
|
49
74
|
let out = "";
|
|
50
75
|
let cursor = 0;
|
|
51
|
-
for (const call of
|
|
76
|
+
for (const call of calls) {
|
|
52
77
|
const original = text.slice(call.start, call.end);
|
|
53
78
|
const trailing = /\s*$/u.exec(original)?.[0] ?? "";
|
|
54
79
|
out += `${text.slice(cursor, call.start)} ${call.to.join(" ")}${trailing}`;
|
|
55
80
|
cursor = call.end;
|
|
56
81
|
}
|
|
57
|
-
return out + text.slice(cursor);
|
|
82
|
+
return collapseRepeatedCalls(out + text.slice(cursor));
|
|
58
83
|
}
|
|
59
84
|
/** One review line per moved CLI call, with the new spelling. */
|
|
60
85
|
function cliCallHints(text, migrate) {
|
|
@@ -421,6 +446,71 @@ function designFileResult(source, rewrite) {
|
|
|
421
446
|
};
|
|
422
447
|
}
|
|
423
448
|
//#endregion
|
|
449
|
+
//#region src/cli/codemod-sql-names.ts
|
|
450
|
+
/**
|
|
451
|
+
* The 0.15 `bs_` to `bsb_` rename in the app's own SQL. The upgrade migration
|
|
452
|
+
* renames the objects in the database, but SQL the app wrote (pgTAP tests, its
|
|
453
|
+
* schema files, its newest migration) still names them the old way, so the
|
|
454
|
+
* codemod lists those lines. It never rewrites SQL: a pushed migration must not
|
|
455
|
+
* change, and a test may name an object on purpose.
|
|
456
|
+
*/
|
|
457
|
+
const LEGACY_NAME = /\bbs_[a-z0-9_]+/g;
|
|
458
|
+
const CURRENT_NAME = /\bbsb_[a-z0-9_]+/g;
|
|
459
|
+
/**
|
|
460
|
+
* The `bs_` names the 0.15 rename covers, from the files better-supabase wrote:
|
|
461
|
+
* their old `bs_` names before `upgrade` rewrites them, or the `bs_` form of
|
|
462
|
+
* their `bsb_` names after.
|
|
463
|
+
*/
|
|
464
|
+
function renamedSqlNames(blockFiles) {
|
|
465
|
+
const text = blockFiles.join("\n");
|
|
466
|
+
return /* @__PURE__ */ new Set([...legacyPrefixNames(text), ...[...new Set(text.match(CURRENT_NAME))].map((name) => `bs_${name.slice(4)}`).filter((name) => !LEGACY_CLAIMS.has(name))]);
|
|
467
|
+
}
|
|
468
|
+
const renamed = (name, names) => names.has(name) || LEGACY_PREFIXES.some((prefix) => name.startsWith(prefix));
|
|
469
|
+
/** One hint per line and renamed name in `sources`. */
|
|
470
|
+
function sqlNameHints(sources, names) {
|
|
471
|
+
const hints = [];
|
|
472
|
+
for (const source of sources) for (const [index, line] of source.text.split("\n").entries()) for (const name of new Set(line.match(LEGACY_NAME))) if (renamed(name, names)) hints.push({
|
|
473
|
+
file: source.path,
|
|
474
|
+
line: index + 1,
|
|
475
|
+
message: `${name} is bsb_${name.slice(3)} since 0.15, and the upgrade migration renames it in the database. Rename it here, in SQL that runs after that migration.`
|
|
476
|
+
});
|
|
477
|
+
return hints;
|
|
478
|
+
}
|
|
479
|
+
async function sqlFiles(dir) {
|
|
480
|
+
if (!existsSync(dir)) return [];
|
|
481
|
+
const files = [];
|
|
482
|
+
for (const entry of await readdir(dir, { withFileTypes: true })) {
|
|
483
|
+
const full = join(dir, entry.name);
|
|
484
|
+
if (entry.isDirectory()) files.push(...await sqlFiles(full));
|
|
485
|
+
else if (entry.name.endsWith(".sql")) files.push(full);
|
|
486
|
+
}
|
|
487
|
+
return files.toSorted();
|
|
488
|
+
}
|
|
489
|
+
/**
|
|
490
|
+
* Lines of the app's SQL that name a `bs_` object the 0.15 upgrade renames: the
|
|
491
|
+
* pgTAP tests (`sql.testsDir`), the schema files no block wrote, and the newest
|
|
492
|
+
* migration the app wrote. Older migrations already ran, so they stay as they
|
|
493
|
+
* are.
|
|
494
|
+
*/
|
|
495
|
+
async function legacySqlNameHints(config) {
|
|
496
|
+
const read = async (path) => ({
|
|
497
|
+
path: relative(config.root, path).replaceAll("\\", "/"),
|
|
498
|
+
text: await readFile(path, "utf-8")
|
|
499
|
+
});
|
|
500
|
+
const [tests, schemas, migrations] = await Promise.all([
|
|
501
|
+
Promise.all((await sqlFiles(join(config.root, config.sql.testsDir))).map(read)),
|
|
502
|
+
Promise.all((await sqlFiles(join(config.root, await schemasDirOf(config)))).map(read)),
|
|
503
|
+
Promise.all((await sqlFiles(join(config.root, migrationsDir(config)))).map(read))
|
|
504
|
+
]);
|
|
505
|
+
const names = renamedSqlNames([...schemas, ...migrations].filter(writtenByBlocks).map((file) => file.text));
|
|
506
|
+
const latest = migrations.findLast((file) => !writtenByBlocks(file));
|
|
507
|
+
return sqlNameHints([
|
|
508
|
+
...tests.filter((file) => !writtenByBlocks(file)),
|
|
509
|
+
...schemas.filter((file) => !writtenByBlocks(file)),
|
|
510
|
+
...latest === void 0 ? [] : [latest]
|
|
511
|
+
], names);
|
|
512
|
+
}
|
|
513
|
+
//#endregion
|
|
424
514
|
//#region src/cli/codemod-data-contract.ts
|
|
425
515
|
/** The query guards named after the retired verbs. */
|
|
426
516
|
const DATA_CONTRACT_OPTIONS = [{
|
|
@@ -1798,7 +1888,8 @@ const CODEMODS = {
|
|
|
1798
1888
|
},
|
|
1799
1889
|
"0.15": {
|
|
1800
1890
|
name: "0.15",
|
|
1801
|
-
description: "Regroups better-supabase.config.* into database, auth, gen, api and tooling (subjects to records, appTables to tables, integrations to adapters, a block's mode, scope, entities and hooks to ownership, owner, names and callbacks, and removes ownership: \"adopt\", since a block now leaves alone the tables the schema already has; claims.tenant and the tenant plugin's column to auth.organization); renames the requireTenant option and helper to requireOrganization; renames the runtime instance bs to bsb (the CLI's short name) where a file creates, imports or destructures it, and the bs key on request contexts (ctx.bs, c.var.bs, locals.bs, context.bs) to bsb; renames imports: SqlModule to BlockSql, ModuleDefinition to BlockSqlDefinition and the other Module* SQL types to BlockSql*, SubjectRef to RecordRef, entityForm to recordForm, ShipmentCarrier to ShippingProvider, QueueBackend to QueueProvider; rewrites CLI calls in package.json scripts and GitHub workflows to the 0.15 commands (apply and adopt to add, sql sync and sql upgrade to upgrade, introspect to gen --save-snapshot, seed to db seed, env, run, keys and stack to dev); renames the blocks 0.15 renamed (work-items to tasks, parties to contacts, engagements to activities, access to permissions, rules to automations, jobs to queue, activity to timeline and the rest of the 0.14 to 0.15 guide's table) in the config's blocks and preset.blocks, in operation names under auth.authorization.operations, in better-supabase/blocks/<name> imports and in the exports named after them; turns a 0.14 preset code in the config's preset into the preset name or object it holds, and a 0.14 design file into a design with its preset inside; moves the plugins key into blocks (timestamps to updated-at, actor to created-by, softDelete to trash, with their columns as the block's options; tenant to auth.organization.column when memberships is not installed) and the better-supabase/plugins/* imports to the block extensions, better-supabase/lint guards and validation from better-supabase; moves repository calls to the data contract (findMany to list, paginate to page, findById, findUnique and findOnly to get, findFirst to list with limit: 1, exists to count, createMany and upsertMany to create and upsert with an array, updateMany and deleteMany to update and delete with a { where } filter); renames generateFeatures to gen.recordTypes, the record section exports to record bindings (defineSection to defineRecordBinding, commentsSection to commentsBinding, loadSections to loadBindings and the rest) and lists record feature imports, recordServer and sectionAction calls for the move to bsb.record; cache tags, query keys and the debug header and route that start with bs are listed for review",
|
|
1891
|
+
description: "Regroups better-supabase.config.* into database, auth, gen, api and tooling (subjects to records, appTables to tables, integrations to adapters, a block's mode, scope, entities and hooks to ownership, owner, names and callbacks, and removes ownership: \"adopt\", since a block now leaves alone the tables the schema already has; claims.tenant and the tenant plugin's column to auth.organization); renames the requireTenant option and helper to requireOrganization; renames the runtime instance bs to bsb (the CLI's short name) where a file creates, imports or destructures it, and the bs key on request contexts (ctx.bs, c.var.bs, locals.bs, context.bs) to bsb; renames imports: SqlModule to BlockSql, ModuleDefinition to BlockSqlDefinition and the other Module* SQL types to BlockSql*, SubjectRef to RecordRef, entityForm to recordForm, ShipmentCarrier to ShippingProvider, QueueBackend to QueueProvider; rewrites CLI calls in package.json scripts and GitHub workflows to the 0.15 commands (apply and adopt to add, sql sync and sql upgrade to upgrade, introspect to gen --save-snapshot, seed to db seed, env, run, keys and stack to dev); renames the blocks 0.15 renamed (work-items to tasks, parties to contacts, engagements to activities, access to permissions, rules to automations, jobs to queue, activity to timeline and the rest of the 0.14 to 0.15 guide's table) in the config's blocks and preset.blocks, in operation names under auth.authorization.operations, in better-supabase/blocks/<name> imports and in the exports named after them; turns a 0.14 preset code in the config's preset into the preset name or object it holds, and a 0.14 design file into a design with its preset inside; moves the plugins key into blocks (timestamps to updated-at, actor to created-by, softDelete to trash, with their columns as the block's options; tenant to auth.organization.column when memberships is not installed) and the better-supabase/plugins/* imports to the block extensions, better-supabase/lint guards and validation from better-supabase; moves repository calls to the data contract (findMany to list, paginate to page, findById, findUnique and findOnly to get, findFirst to list with limit: 1, exists to count, createMany and upsertMany to create and upsert with an array, updateMany and deleteMany to update and delete with a { where } filter); renames generateFeatures to gen.recordTypes, the record section exports to record bindings (defineSection to defineRecordBinding, commentsSection to commentsBinding, loadSections to loadBindings and the rest) and lists record feature imports, recordServer and sectionAction calls for the move to bsb.record; cache tags, query keys and the debug header and route that start with bs are listed for review, and so are the lines of the app's SQL tests, schema files and newest migration that name a bs_ object the upgrade renames to bsb_",
|
|
1892
|
+
sqlNames: true,
|
|
1802
1893
|
bindings: {
|
|
1803
1894
|
bs: "bsb",
|
|
1804
1895
|
SqlModule: "BlockSql",
|
|
@@ -2305,6 +2396,7 @@ async function runCodemod(config, args, paint = plain) {
|
|
|
2305
2396
|
policy: "edit"
|
|
2306
2397
|
});
|
|
2307
2398
|
}
|
|
2399
|
+
if (codemod.sqlNames === true) review.push(...await legacySqlNameHints(config));
|
|
2308
2400
|
const plan = {
|
|
2309
2401
|
root: config.root,
|
|
2310
2402
|
regenerate: `better-supabase codemod ${codemod.name}`,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as readIfExists } from "./io-DH1kcmmP.js";
|
|
2
|
-
import { t as CACHE_DIR } from "./cache-
|
|
3
|
-
import { x as installedVersion } from "./snapshot-
|
|
2
|
+
import { t as CACHE_DIR } from "./cache-DkplpIGe.js";
|
|
3
|
+
import { x as installedVersion } from "./snapshot-Bzcigm7T.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";
|
|
@@ -1,40 +1,41 @@
|
|
|
1
1
|
import { a as list, p as commandMeta, r as defineCliCommand } from "./command-CQ61x6gN.js";
|
|
2
2
|
import { i as plain } from "./style-Bm2X5JrN.js";
|
|
3
|
-
import { t as VERSION } from "./version-
|
|
3
|
+
import { t as VERSION } from "./version-CyavsyGA.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-
|
|
7
|
+
import { t as CACHE_DIR } from "./cache-DkplpIGe.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-
|
|
10
|
-
import { d as configFor, r as renderFiles, u as notNullTag } from "./render-
|
|
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-Bzcigm7T.js";
|
|
10
|
+
import { d as configFor, r as renderFiles, u as notNullTag } from "./render-lJmHr0y9.js";
|
|
11
11
|
import { t as isRecord } from "./guards-CUlDNYZs.js";
|
|
12
|
-
import { i as request } from "./source-
|
|
13
|
-
import {
|
|
12
|
+
import { i as request } from "./source-WoLdcQzN.js";
|
|
13
|
+
import { T as providerLabel, i as migrationHolds, o as migrationModules, r as latestMigration, t as MODULES_SUFFIX, y as compiledReadSets } from "./module-migration-DOn6EmNz.js";
|
|
14
14
|
import { l as stdinDatabaseUrl, n as databaseUrl } from "./config-9t5ec_N7.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-
|
|
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-Cdx6arxu.js";
|
|
20
20
|
import { c as insideRoot, i as changeLines, r as applyPlan } from "./files-CX71yBm8.js";
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import { o as
|
|
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-BJ6IMs_H.js";
|
|
22
|
+
import { n as migrationsDir, r as moduleLayoutFor, t as blockDeclaredTables } from "./sql-layout-rFP0oq1N.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-Bh-6IqJS.js";
|
|
24
|
+
import { o as wiringFor, r as configInstances, t as MIGRATION_SAFETY_RULES } from "./migration-safety-BbhLu2fo.js";
|
|
24
25
|
import { t as orphanedBlockFiles } from "./orphans-BAboqyVM.js";
|
|
25
|
-
import { i as reservedRoles, n as ident$1, r as literal$1, t as LIVE_RULES } from "./live-
|
|
26
|
+
import { i as reservedRoles, n as ident$1, r as literal$1, t as LIVE_RULES } from "./live-Lmg-hYyO.js";
|
|
26
27
|
import { a as sourceFlags, n as SOURCE_ARGS } from "./source-args-IpJRJO5t.js";
|
|
27
28
|
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";
|
|
28
29
|
import { n as PLATFORM_SCHEMAS } from "./in-stack-diff-DQTW53Vf.js";
|
|
29
30
|
import { i as staleVariables, r as stackEnvValues, t as PREFIX_NAMES } from "./stack-env-6hS-WEmh.js";
|
|
30
31
|
import { a as readSharedMemory, n as listStacks, t as branchName } from "./stacks-BYlQ96WS.js";
|
|
31
|
-
import { i as refuseWithMetadata, r as readMetadataSnapshot } from "./metadata-
|
|
32
|
+
import { i as refuseWithMetadata, r as readMetadataSnapshot } from "./metadata-CZaxkv21.js";
|
|
32
33
|
import { existsSync } from "node:fs";
|
|
33
34
|
import { dirname, resolve } from "node:path";
|
|
34
35
|
import { createHash } from "node:crypto";
|
|
35
36
|
import { glob, mkdir, readFile, readdir, writeFile } from "node:fs/promises";
|
|
36
37
|
import { DEFAULT_ACTIVE_TENANT, tenantClaimPaths } from "better-supabase/config";
|
|
37
|
-
import { SECRET_COLUMNS, SQL_MODULES, TENANT_SCOPE_POLICY, adoptedTables, blockFileState, blockSqlVersion, contractSignature, customContracts, dataExportPlan, excludedColumns, expiredFlagsQuery, hasColumnAccess, migrationOptionUses, moduleDeprecations, moduleEventTriggers, moduleFileVersion, moduleLayout, notNullCheckName, renderBlocks, sameBlockFile, sameTenantColumn, sameTenantTrigger, scopePolicyName, sharedRolesProblems, subjectColumns, widenedCommands } from "better-supabase/sql";
|
|
38
|
+
import { SECRET_COLUMNS, SQL_MODULES, TENANT_SCOPE_POLICY, adoptedTables, adoptedViews, blockFileState, blockSqlVersion, contractSignature, customContracts, dataExportPlan, excludedColumns, expiredFlagsQuery, hasColumnAccess, migrationOptionUses, moduleDeprecations, moduleEventTriggers, moduleFileVersion, moduleLayout, notNullCheckName, renderBlocks, sameBlockFile, sameTenantColumn, sameTenantTrigger, scopePolicyName, sharedRolesProblems, subjectColumns, widenedCommands } from "better-supabase/sql";
|
|
38
39
|
import { defineBucket, parseSize } from "better-supabase/storage";
|
|
39
40
|
//#region src/cli/doctor/env.ts
|
|
40
41
|
const PUBLIC_PREFIXES = [
|
|
@@ -258,6 +259,20 @@ const ADOPTION_RULES = [
|
|
|
258
259
|
}];
|
|
259
260
|
}
|
|
260
261
|
},
|
|
262
|
+
{
|
|
263
|
+
code: "BS349",
|
|
264
|
+
severity: "warning",
|
|
265
|
+
title: "Block writes through a view Postgres can't update",
|
|
266
|
+
description: "A block table is mapped to a view of the app's (`blocks.<name>.tables`), and the block's TypeScript API inserts, updates or deletes its rows, but the view is not auto-updatable and has no `instead of` trigger: it has `distinct`, `group by`, a join, an aggregate or a set operation, or it is a materialized view. The block's functions that read the view work; the API calls that write it fail. Write those rows to the table under the view, add `instead of` triggers to the view, or map the block's table to a table.",
|
|
267
|
+
check: (context) => {
|
|
268
|
+
const views = appViewsOf(context);
|
|
269
|
+
if (Object.keys(views.ownViews).length === 0) return [];
|
|
270
|
+
return adoptedViews(context.config.blocks, appTablesOf(context), views).filter((view) => view.writes && !view.updatable).map((view) => ({
|
|
271
|
+
message: `blocks.${view.module}.tables.${view.logical} is the view ${view.view}, which Postgres can't write through, and the block's TypeScript API writes ${view.logical} rows. Those calls fail; write the rows to the table under the view, add instead of triggers, or map ${view.logical} to a table.`,
|
|
272
|
+
target: view.view
|
|
273
|
+
}));
|
|
274
|
+
}
|
|
275
|
+
},
|
|
261
276
|
{
|
|
262
277
|
code: "BS341",
|
|
263
278
|
severity: "warning",
|
|
@@ -1612,7 +1627,7 @@ async function danglingAuditRegistrations(context) {
|
|
|
1612
1627
|
async function missingAdoptedColumns(context) {
|
|
1613
1628
|
const db = context.database;
|
|
1614
1629
|
if (!db || "skipped" in db) return [];
|
|
1615
|
-
const tables = adoptedTables(context.config.blocks, appTablesOf(context));
|
|
1630
|
+
const tables = adoptedTables(context.config.blocks, appTablesOf(context), appViewsOf(context));
|
|
1616
1631
|
if (tables.length === 0) return [];
|
|
1617
1632
|
const names = tables.map((table) => `(${literal$1(table.schema)}, ${literal$1(table.table)})`).join(", ");
|
|
1618
1633
|
let rows;
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { a as list, p as commandMeta, r as defineCliCommand } from "./command-CQ61x6gN.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-
|
|
5
|
-
import { a as serializeSnapshot, g as serializeGenerator, h as restrictSchemas, o as snapshotFile, r as openSource, t as loadSnapshot } from "./snapshot-
|
|
6
|
-
import { f as dataMigration } from "./module-migration-
|
|
4
|
+
import { u as catalogFingerprint } from "./cache-DkplpIGe.js";
|
|
5
|
+
import { a as serializeSnapshot, g as serializeGenerator, h as restrictSchemas, o as snapshotFile, r as openSource, t as loadSnapshot } from "./snapshot-Bzcigm7T.js";
|
|
6
|
+
import { f as dataMigration } from "./module-migration-DOn6EmNz.js";
|
|
7
7
|
import { d as GEN_TASKS, p as isGenTask } from "./config-9t5ec_N7.js";
|
|
8
8
|
import { c as insideRoot, r as applyPlan, u as planResult } from "./files-CX71yBm8.js";
|
|
9
|
-
import { n as runGen } from "./run-
|
|
10
|
-
import { t as syncModules } from "./sync-
|
|
11
|
-
import { t as addModules } from "./add-
|
|
12
|
-
import { n as listModules, t as printModule } from "./print-
|
|
9
|
+
import { n as runGen } from "./run-BJ6IMs_H.js";
|
|
10
|
+
import { t as syncModules } from "./sync-mANmYYoL.js";
|
|
11
|
+
import { t as addModules } from "./add-C04vkBk9.js";
|
|
12
|
+
import { n as listModules, t as printModule } from "./print-D_xf8PPj.js";
|
|
13
13
|
import { a as sourceFlags, i as sourceArgs, n as SOURCE_ARGS } from "./source-args-IpJRJO5t.js";
|
|
14
|
-
import { a as runMetadataGen, n as checkMetadataFlags, t as EMITS } from "./metadata-
|
|
14
|
+
import { a as runMetadataGen, n as checkMetadataFlags, t as EMITS } from "./metadata-CZaxkv21.js";
|
|
15
15
|
import { a as runEnv } from "./env-BBl5L8Bf.js";
|
|
16
|
-
import { c as watchLoop, o as parseInterval, r as specOptionsFromConfig, s as stampFiles, t as runSpec } from "./spec-
|
|
16
|
+
import { c as watchLoop, o as parseInterval, r as specOptionsFromConfig, s as stampFiles, t as runSpec } from "./spec-CZMiLhv_.js";
|
|
17
17
|
import { t as runSeed } from "./seed-Cz8PcXeT.js";
|
|
18
|
-
import { t as upgrade } from "./upgrade-
|
|
18
|
+
import { t as upgrade } from "./upgrade-B0Q9wMs-.js";
|
|
19
19
|
import { existsSync } from "node:fs";
|
|
20
20
|
import { resolve } from "node:path";
|
|
21
21
|
//#region src/cli/commands/sql.ts
|
package/dist/cli/index.d.ts
CHANGED
|
@@ -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.15.
|
|
801
|
+
export declare const VERSION = "0.15.1";
|
|
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-CQ61x6gN.js";
|
|
2
|
-
import { i as run, n as createCli, r as help, t as commandNames } from "./run-
|
|
3
|
-
import { t as VERSION } from "./version-
|
|
2
|
+
import { i as run, n as createCli, r as help, t as commandNames } from "./run-DkB0fhc9.js";
|
|
3
|
+
import { t as VERSION } from "./version-CyavsyGA.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-
|
|
6
|
-
import { a as emitBlockConfig, l as buildModel, o as GENERATED_HEADER, r as renderFiles, s as emitModule } from "./render-
|
|
7
|
-
import { a as toCatalog, n as managementSource, r as pgSource } from "./source-
|
|
5
|
+
import { a as serializeSnapshot, i as parseSnapshot, l as introspect, t as loadSnapshot } from "./snapshot-Bzcigm7T.js";
|
|
6
|
+
import { a as emitBlockConfig, l as buildModel, o as GENERATED_HEADER, r as renderFiles, s as emitModule } from "./render-lJmHr0y9.js";
|
|
7
|
+
import { a as toCatalog, n as managementSource, r as pgSource } from "./source-WoLdcQzN.js";
|
|
8
8
|
import { s as loadConfig } from "./config-9t5ec_N7.js";
|
|
9
|
-
import { n as runGen } from "./run-
|
|
9
|
+
import { n as runGen } from "./run-BJ6IMs_H.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-CQ
|
|
|
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-
|
|
5
|
+
import { l as TYPEGEN_VERSION } from "./cache-DkplpIGe.js";
|
|
6
6
|
import { a as findConfig, s as loadConfig } from "./config-9t5ec_N7.js";
|
|
7
|
-
import { r as contentMapperFiles } from "./content-mapper-
|
|
7
|
+
import { r as contentMapperFiles } from "./content-mapper-Cdx6arxu.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-
|
|
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-
|
|
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-DNOL9PDu.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-BbhLu2fo.js";
|
|
11
11
|
import { n as installCommand, t as detectProject } from "./detect-D9JaAX20.js";
|
|
12
|
-
import { s as enablePgDelta, t as syncModules } from "./sync-
|
|
12
|
+
import { s as enablePgDelta, t as syncModules } from "./sync-mANmYYoL.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";
|