Repository navigation
v0.29.0
@kitcn/resend
Published @kitcn/resend@0.29.0.
kitcn
Minor Changes
-
#421
26dd9b5Thanks @MikeyZhang75! - ## Breaking changes- Register
migrationStatusandaggregateBackfillStatusas internal
queries instead of internal mutations. Polling migration or aggregate
status no longer opens a write transaction, so a status monitor stops
competing for OCC write slots on the very tables it is reporting on. Both can
now back a live subscription, and neither can be scheduled any more.
// Before — status read had to run from a mutation context export const getStatus = authMutation.mutation(async ({ ctx }) => { const server = createServerCaller(ctx); return await server.migrationStatus({}); }); // After — status reads from a query context export const getStatus = authQuery.query(async ({ ctx }) => { const server = createServerCaller(ctx); return await server.migrationStatus({}); });
- Accept an
internalQuerybuilder increateOrm(...)alongside
internalMutation. Apps generated bykitcn codegenpass it automatically;
hand-writtencreateOrmcalls that useorm.api()should pass it too so the
status procedures are built with the app's own Convex builder.
// Before const orm = createOrm({ schema, ormFunctions, internalMutation }); // After const orm = createOrm({ schema, ormFunctions, internalMutation, internalQuery, });
Patches
- Fix
migrationStatusreading the entiremigration_runhistory to return the
most recent runs. The listing now walks a newby_started_atindex in reverse
and stops atlimit, so the cost of a status call no longer grows with the
number of migrations ever run. Runs that share astartedAtmillisecond now
order newest-first. - Bound the
limitargument ofmigrationStatusatMAX_STATUS_RUN_LIMIT
(100, default25), exported fromkitcn/orm/migrations, so a caller
cannot reintroduce an unbounded read through the args. - Resolve
migrationStatus'srunIdandactiveRunthrough their existing
indexes instead of scanning the run history.activeRunnow agrees with the
run thatmigrate canceltargets.
- Register