kitcn 0.33.8 → 0.33.9

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/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # kitcn
2
2
 
3
+ ## 0.33.9
4
+
5
+ ### Patch Changes
6
+
7
+ - [#484](https://github.com/udecode/kitcn/pull/484) [`153e95a`](https://github.com/udecode/kitcn/commit/153e95a4956dc4715da0dfd14d3ced7045ad1214) Thanks [@EfficiencyCorp](https://github.com/EfficiencyCorp)! - ## Patches
8
+
9
+ - Support Convex `1.45` and `1.46`.
10
+ - Scaffold new apps with Convex `1.46.0`.
11
+ - Require Node 20 or newer when running Convex `1.45` or later.
12
+
3
13
  ## 0.33.8
4
14
 
5
15
  ### Patch Changes
@@ -1,5 +1,5 @@
1
1
  import { Vn as ConvexTextBuilderInitial, Zt as ConvexTableWithColumns } from "../capabilities-Bxzoofl4.js";
2
- import { C as ConvexNumberBuilderInitial, E as ConvexIdBuilderInitial, N as ConvexCustomBuilderInitial } from "../where-clause-compiler-CTblNxLo.js";
2
+ import { C as ConvexNumberBuilderInitial, E as ConvexIdBuilderInitial, N as ConvexCustomBuilderInitial } from "../where-clause-compiler-BPQv90gK.js";
3
3
  import * as convex_values0 from "convex/values";
4
4
  import { GenericId, Infer, Value } from "convex/values";
5
5
  import { DocumentByName, GenericDataModel, GenericDatabaseReader, GenericDatabaseWriter, TableNamesInDataModel } from "convex/server";
@@ -1,2 +1,2 @@
1
- import { C as GenericAuthTriggerHandlers, S as GenericAuthTriggerChange, T as defineAuth, b as GenericAuthBeforeResult, i as getGeneratedAuthDisabledReason, n as GeneratedAuthDisabledReasonKind, r as createDisabledAuthRuntime, t as AuthRuntime, w as GenericAuthTriggers, x as GenericAuthDefinition, y as BetterAuthOptionsWithoutDatabase } from "../../generated-contract-disabled-CFLQf8Wg.js";
1
+ import { C as GenericAuthTriggerHandlers, S as GenericAuthTriggerChange, T as defineAuth, b as GenericAuthBeforeResult, i as getGeneratedAuthDisabledReason, n as GeneratedAuthDisabledReasonKind, r as createDisabledAuthRuntime, t as AuthRuntime, w as GenericAuthTriggers, x as GenericAuthDefinition, y as BetterAuthOptionsWithoutDatabase } from "../../generated-contract-disabled-QZXEzUnd.js";
2
2
  export { type AuthRuntime, BetterAuthOptionsWithoutDatabase, type GeneratedAuthDisabledReasonKind, GenericAuthBeforeResult, GenericAuthDefinition, GenericAuthTriggerChange, GenericAuthTriggerHandlers, GenericAuthTriggers, createDisabledAuthRuntime, defineAuth, getGeneratedAuthDisabledReason };
@@ -1,7 +1,7 @@
1
1
  import { a as QueryCtxWithPreferredOrmQueryTable, n as LookupByIdResultByCtx, t as DocByCtx } from "../query-context-BkNjkDCk.js";
2
2
  import { t as GetAuth } from "../types-ex0-J-SC.js";
3
3
  import { t as GenericCtx } from "../context-utils-Cbv4r0AA.js";
4
- import { C as GenericAuthTriggerHandlers, S as GenericAuthTriggerChange, T as defineAuth, _ as updateManyHandler, a as AuthFunctions, b as GenericAuthBeforeResult, c as consumeOneHandler, d as createHandler, f as deleteManyHandler, g as incrementOneHandler, h as findOneHandler, i as getGeneratedAuthDisabledReason, l as countHandler, m as findManyHandler, n as GeneratedAuthDisabledReasonKind, o as Triggers, p as deleteOneHandler, r as createDisabledAuthRuntime, s as createClient, t as AuthRuntime, u as createApi, v as updateOneHandler, w as GenericAuthTriggers, x as GenericAuthDefinition, y as BetterAuthOptionsWithoutDatabase } from "../generated-contract-disabled-CFLQf8Wg.js";
4
+ import { C as GenericAuthTriggerHandlers, S as GenericAuthTriggerChange, T as defineAuth, _ as updateManyHandler, a as AuthFunctions, b as GenericAuthBeforeResult, c as consumeOneHandler, d as createHandler, f as deleteManyHandler, g as incrementOneHandler, h as findOneHandler, i as getGeneratedAuthDisabledReason, l as countHandler, m as findManyHandler, n as GeneratedAuthDisabledReasonKind, o as Triggers, p as deleteOneHandler, r as createDisabledAuthRuntime, s as createClient, t as AuthRuntime, u as createApi, v as updateOneHandler, w as GenericAuthTriggers, x as GenericAuthDefinition, y as BetterAuthOptionsWithoutDatabase } from "../generated-contract-disabled-QZXEzUnd.js";
5
5
  import * as convex_values0 from "convex/values";
6
6
  import { Infer } from "convex/values";
7
7
  import { AuthConfig, DocumentByName, GenericDataModel, GenericMutationCtx, GenericQueryCtx, GenericSchema, PaginationOptions, PaginationResult, SchemaDefinition, TableNamesInDataModel } from "convex/server";
@@ -132,8 +132,8 @@ declare const adapterArgsValidator: convex_values0.VObject<{
132
132
  select?: string[] | undefined;
133
133
  offset?: number | undefined;
134
134
  sortBy?: {
135
- field: string;
136
135
  direction: "asc" | "desc";
136
+ field: string;
137
137
  } | undefined;
138
138
  model: string;
139
139
  }, {
@@ -142,12 +142,12 @@ declare const adapterArgsValidator: convex_values0.VObject<{
142
142
  offset: convex_values0.VFloat64<number | undefined, "optional">;
143
143
  select: convex_values0.VArray<string[] | undefined, convex_values0.VString<string, "required">, "optional">;
144
144
  sortBy: convex_values0.VObject<{
145
- field: string;
146
145
  direction: "asc" | "desc";
146
+ field: string;
147
147
  } | undefined, {
148
148
  direction: convex_values0.VUnion<"asc" | "desc", [convex_values0.VLiteral<"asc", "required">, convex_values0.VLiteral<"desc", "required">], "required", never>;
149
149
  field: convex_values0.VString<string, "required">;
150
- }, "optional", "field" | "direction">;
150
+ }, "optional", "direction" | "field">;
151
151
  where: convex_values0.VArray<{
152
152
  mode?: "sensitive" | "insensitive" | undefined;
153
153
  operator?: "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | "in" | "not_in" | "contains" | "starts_with" | "ends_with" | undefined;
@@ -167,7 +167,7 @@ declare const adapterArgsValidator: convex_values0.VObject<{
167
167
  operator: convex_values0.VUnion<"eq" | "ne" | "lt" | "lte" | "gt" | "gte" | "in" | "not_in" | "contains" | "starts_with" | "ends_with" | undefined, [convex_values0.VLiteral<"lt", "required">, convex_values0.VLiteral<"lte", "required">, convex_values0.VLiteral<"gt", "required">, convex_values0.VLiteral<"gte", "required">, convex_values0.VLiteral<"eq", "required">, convex_values0.VLiteral<"in", "required">, convex_values0.VLiteral<"not_in", "required">, convex_values0.VLiteral<"ne", "required">, convex_values0.VLiteral<"contains", "required">, convex_values0.VLiteral<"starts_with", "required">, convex_values0.VLiteral<"ends_with", "required">], "optional", never>;
168
168
  value: convex_values0.VUnion<string | number | boolean | string[] | number[] | null, [convex_values0.VString<string, "required">, convex_values0.VFloat64<number, "required">, convex_values0.VBoolean<boolean, "required">, convex_values0.VArray<string[], convex_values0.VString<string, "required">, "required">, convex_values0.VArray<number[], convex_values0.VFloat64<number, "required">, "required">, convex_values0.VNull<null, "required">], "required", never>;
169
169
  }, "required", "mode" | "operator" | "value" | "field" | "connector">, "optional">;
170
- }, "required", "limit" | "where" | "model" | "select" | "offset" | "sortBy" | "sortBy.field" | "sortBy.direction">;
170
+ }, "required", "limit" | "where" | "model" | "select" | "offset" | "sortBy" | "sortBy.direction" | "sortBy.field">;
171
171
  declare const hasUniqueFields: (betterAuthSchema: BetterAuthDBSchema, model: string, input: Record<string, any>) => boolean;
172
172
  declare const checkUniqueFields: <Schema extends SchemaDefinition<any, any>>(ctx: GenericQueryCtx<GenericDataModel>, schema: Schema, betterAuthSchema: BetterAuthDBSchema, table: string, input: Record<string, any>, doc?: Record<string, any>) => Promise<void>;
173
173
  declare const selectFields: <T extends TableNamesInDataModel<GenericDataModel>, D extends DocumentByName<GenericDataModel, T>>(doc: D | null, select?: string[]) => D | null;
package/dist/cli.mjs CHANGED
@@ -2318,7 +2318,7 @@ const PLAIN_VERSION_SPEC_RE = /^[\^~]?v?\d+\.\d+(?:\.\d+)?$/;
2318
2318
  const UPPER_BOUND_RE = /(?:^|\s)<={0,1}\s*v?(\d+)\.(\d+)(?:\.\d+)?/g;
2319
2319
  const LOWER_BOUND_RE = /(?:^|\s)>={0,1}\s*v?(\d+)\.(\d+)(?:\.\d+)?/g;
2320
2320
  const SUPPORTED_CONCAVE_CLI_VERSION = "0.0.1-alpha.14";
2321
- const SUPPORTED_CONVEX_VERSION = "1.44.0";
2321
+ const SUPPORTED_CONVEX_VERSION = "1.46.0";
2322
2322
  const SUPPORTED_CONVEX_MIN_VERSION = "1.42";
2323
2323
  const SUPPORTED_CONVEX_MIN_TYPE_VERSION = "1.42.3";
2324
2324
  const SUPPORTED_BETTER_AUTH_VERSION = "1.7.1";
@@ -289,8 +289,8 @@ declare const createApi: <Schema extends SchemaDefinition<any, any>, DataModel e
289
289
  }[] | undefined;
290
290
  offset?: number | undefined;
291
291
  sortBy?: {
292
- field: string;
293
292
  direction: "asc" | "desc";
293
+ field: string;
294
294
  } | undefined;
295
295
  paginationOpts: {
296
296
  id?: number;
@@ -1,5 +1,5 @@
1
1
  import { $n as TableName, $t as OrmLifecycleChange, An as ConvexCheckBuilder, At as UpdateSet, Bn as ConvexTextBuilder, Br as IsPrimaryKey, Bt as RelationsBuilderColumnBase, C as MigrationStep, Cn as ConvexVectorIndexConfig, Cr as not, Ct as OrderByClause, D as defineMigration, Dn as searchIndex, Dr as startsWith, Dt as ReturningAll, E as buildMigrationPlan, En as rankIndex, Er as or, Et as PredicateWhereIndexConfig, Fn as ConvexUniqueConstraintBuilderOn, Fr as ColumnBuilderTypeConfig, Ft as ExtractTablesFromSchema, Gn as Columns, Gt as TablesRelationalConfig, H as RlsMode, Hn as text, Hr as NotNull, In as ConvexUniqueConstraintConfig, Ir as ColumnBuilderWithTableName, It as ExtractTablesWithRelations, Jn as OrmSchemaExtensionTables, Jt as ConvexDeletionBuilder, Kt as defineRelations, Ln as check, Lr as ColumnDataType, Lt as ManyConfig, M as DatabaseWithQuery, Mn as ConvexForeignKeyBuilder, Mr as ColumnBuilder, Mt as VectorSearchProvider, N as OrmReader$1, Nn as ConvexForeignKeyConfig, Nr as ColumnBuilderBaseConfig, Nt as unsetToken, O as defineMigrationSet, On as uniqueIndex, Ot as ReturningResult, P as OrmWriter$1, Pn as ConvexUniqueConstraintBuilder, Pr as ColumnBuilderRuntimeConfig, Qn as OrmSchemaTriggers, Qt as DiscriminatorBuilderConfig, Rn as foreignKey, Rr as DrizzleEntity, Rt as OneConfig, S as MigrationStateMap, Sn as ConvexVectorIndexBuilderOn, Sr as ne, St as MutationRunMode, T as MigrationWriteMode, Tn as index, Tr as notInArray, Tt as PaginatedResult, U as EdgeMetadata, V as RlsContext, Vn as ConvexTextBuilderInitial, Vr as IsUnique, Vt as RelationsBuilderColumnConfig, W as extractRelationsConfig, Wn as Brand, Wt as TableRelationalConfig, Xn as OrmSchemaExtensions, Xt as ConvexTable, Yt as ConvexDeletionConfig, Zn as OrmSchemaRelations, Zt as ConvexTableWithColumns, _ as MigrationManifestEntry, _n as ConvexRankIndexBuilderOn, _r as isNotNull, _t as MutationExecutionMode, an as RlsPolicy, ar as UnaryExpression, at as BuildRelationResult, b as MigrationRunStatus, bn as ConvexSearchIndexConfig, br as lt, bt as MutationResult, cn as rlsPolicy, cr as contains, ct as DBQueryConfig, d as MigrationAppliedState, dn as rlsRole, dr as fieldRef, dt as InferInsertModel, en as OrmLifecycleOperation, er as BinaryExpression, f as MigrationDefinition, fn as ConvexAggregateIndexBuilder, fr as gt, ft as InferModelFromColumns, g as MigrationDriftIssue, gn as ConvexRankIndexBuilder, gr as isFieldReference, gt as MutationExecuteResult, h as MigrationDocContext, hn as ConvexIndexBuilderOn, hr as inArray, ht as MutationExecuteConfig, i as OrmMigrationCapability, in as discriminator, ir as LogicalExpression, it as BuildQueryResult, j as DatabaseWithMutations, jn as ConvexCheckConfig, jr as AnyColumn, jt as VectorQueryConfig, k as detectMigrationDrift, kn as vectorIndex, kr as SystemFields, kt as ReturningSelection, ln as RlsRole, lr as endsWith, lt as FilterOperators, m as MigrationDoc, mn as ConvexIndexBuilder, mr as ilike, mt as InsertValue, n as OrmCapabilities, nn as convexTable, nr as FieldReference, nt as AggregateFieldValue, on as RlsPolicyConfig, or as and, ot as CountConfig, p as MigrationDirection, pn as ConvexAggregateIndexBuilderOn, pr as gte, pt as InferSelectModel, qt as defineRelationsPart, r as OrmCapability, rn as deletion, rr as FilterExpression, rt as AggregateResult, sn as RlsPolicyToOption, sr as between, st as CountResult, t as OrmAggregateCapability, tn as TableConfig, tr as ExpressionVisitor, tt as AggregateConfig, un as RlsRoleConfig, ur as eq, ut as GetColumnData, v as MigrationMigrateOne, vn as ConvexSearchIndexBuilder, vr as isNull, vt as MutationPaginateConfig, w as MigrationTableName, wn as aggregateIndex, wr as notBetween, wt as OrderDirection, x as MigrationSet, xn as ConvexVectorIndexBuilder, xr as lte, xt as MutationReturning, y as MigrationPlan, yn as ConvexSearchIndexBuilderOn, yr as like, yt as MutationPaginatedResult, zn as unique, zr as HasDefault, zt as RelationsBuilder } from "../capabilities-Bxzoofl4.js";
2
- import { $ as OrmClientWithApi$1, A as ConvexDateMode, B as ConvexBytesBuilderInitial, C as ConvexNumberBuilderInitial, D as id, E as ConvexIdBuilderInitial, F as custom, G as ConvexBigIntBuilder, H as ConvexBooleanBuilder, I as json, J as CreateOrmOptions, K as ConvexBigIntBuilderInitial, L as objectOf, M as ConvexCustomBuilder, N as ConvexCustomBuilderInitial, O as ConvexDateBuilder, P as arrayOf, Q as OrmClientBase$1, R as unionOf, S as ConvexNumberBuilder, St as defineTriggers, T as ConvexIdBuilder, U as ConvexBooleanBuilderInitial, V as bytes, W as boolean, X as GenericOrmCtx$1, Y as GenericOrm$1, Z as OrmApiResult, _ as ConvexTimestampMode, _t as OrmBeforeResult, a as requireSchemaRelations, at as ScheduledMutationBatchArgs, b as ConvexTextEnumBuilderInitial, bt as OrmTriggerContext, c as TableConfigResult, ct as scheduledDeleteFactory, d as OrmNotFoundError, et as OrmFunctions, f as ConvexVectorBuilder, g as ConvexTimestampBuilderInitial, gt as defineSchemaExtension, h as ConvexTimestampBuilder, ht as SchemaExtension, i as getSchemaTriggers, it as createOrm, j as date, k as ConvexDateBuilderInitial, l as getTableColumns, m as vector, n as defineSchema, nt as OrmWriterCtx, o as asc, ot as scheduledMutationBatchFactory, p as ConvexVectorBuilderInitial, q as bigint, r as getSchemaRelations, rt as ResolveOrmSchema, s as desc, st as ScheduledDeleteArgs, t as WhereClauseResult, tt as OrmReaderCtx, u as getTableConfig, v as timestamp, vt as OrmTableTriggers, w as integer, x as textEnum, xt as OrmTriggers, y as ConvexTextEnumBuilder, yt as OrmTriggerChange, z as ConvexBytesBuilder } from "../where-clause-compiler-CTblNxLo.js";
2
+ import { $ as OrmClientWithApi$1, A as ConvexDateMode, B as ConvexBytesBuilderInitial, C as ConvexNumberBuilderInitial, D as id, E as ConvexIdBuilderInitial, F as custom, G as ConvexBigIntBuilder, H as ConvexBooleanBuilder, I as json, J as CreateOrmOptions, K as ConvexBigIntBuilderInitial, L as objectOf, M as ConvexCustomBuilder, N as ConvexCustomBuilderInitial, O as ConvexDateBuilder, P as arrayOf, Q as OrmClientBase$1, R as unionOf, S as ConvexNumberBuilder, St as defineTriggers, T as ConvexIdBuilder, U as ConvexBooleanBuilderInitial, V as bytes, W as boolean, X as GenericOrmCtx$1, Y as GenericOrm$1, Z as OrmApiResult, _ as ConvexTimestampMode, _t as OrmBeforeResult, a as requireSchemaRelations, at as ScheduledMutationBatchArgs, b as ConvexTextEnumBuilderInitial, bt as OrmTriggerContext, c as TableConfigResult, ct as scheduledDeleteFactory, d as OrmNotFoundError, et as OrmFunctions, f as ConvexVectorBuilder, g as ConvexTimestampBuilderInitial, gt as defineSchemaExtension, h as ConvexTimestampBuilder, ht as SchemaExtension, i as getSchemaTriggers, it as createOrm, j as date, k as ConvexDateBuilderInitial, l as getTableColumns, m as vector, n as defineSchema, nt as OrmWriterCtx, o as asc, ot as scheduledMutationBatchFactory, p as ConvexVectorBuilderInitial, q as bigint, r as getSchemaRelations, rt as ResolveOrmSchema, s as desc, st as ScheduledDeleteArgs, t as WhereClauseResult, tt as OrmReaderCtx, u as getTableConfig, v as timestamp, vt as OrmTableTriggers, w as integer, x as textEnum, xt as OrmTriggers, y as ConvexTextEnumBuilder, yt as OrmTriggerChange, z as ConvexBytesBuilder } from "../where-clause-compiler-BPQv90gK.js";
3
3
  import { i as pretendRequired, n as deprecated, r as pretend } from "../validators-0I-Ik1EN.js";
4
4
  import { a as QueryCtxWithPreferredOrmQueryTable, i as QueryCtxWithOrmQueryTable, n as LookupByIdResultByCtx, o as getByIdWithOrmQueryFallback, r as QueryCtxWithOptionalOrmQueryTable, t as DocByCtx } from "../query-context-BkNjkDCk.js";
5
5
  import { DefineSchemaOptions, GenericDatabaseReader, GenericDatabaseWriter, GenericSchema, SchemaDefinition } from "convex/server";
@@ -1,3 +1,3 @@
1
1
  import { C as MigrationStep, D as defineMigration, E as buildMigrationPlan, O as defineMigrationSet, S as MigrationStateMap, T as MigrationWriteMode, _ as MigrationManifestEntry, a as MAX_STATUS_RUN_LIMIT, b as MigrationRunStatus, c as MigrationRunChunkArgs, d as MigrationAppliedState, f as MigrationDefinition, g as MigrationDriftIssue, h as MigrationDocContext, k as detectMigrationDrift, l as MigrationStatusArgs, m as MigrationDoc, o as MigrationCancelArgs, p as MigrationDirection, s as MigrationRunArgs, u as createMigrationHandlers, v as MigrationMigrateOne, w as MigrationTableName, x as MigrationSet, y as MigrationPlan } from "../../capabilities-Bxzoofl4.js";
2
- import { Ct as migrationCapability, dt as MIGRATION_STORAGE_TABLE_NAMES, ft as injectMigrationStorageTables, lt as MIGRATION_RUN_TABLE, mt as migrationStorageTables, pt as migrationExtension, ut as MIGRATION_STATE_TABLE } from "../../where-clause-compiler-CTblNxLo.js";
2
+ import { Ct as migrationCapability, dt as MIGRATION_STORAGE_TABLE_NAMES, ft as injectMigrationStorageTables, lt as MIGRATION_RUN_TABLE, mt as migrationStorageTables, pt as migrationExtension, ut as MIGRATION_STATE_TABLE } from "../../where-clause-compiler-BPQv90gK.js";
3
3
  export { MAX_STATUS_RUN_LIMIT, MIGRATION_RUN_TABLE, MIGRATION_STATE_TABLE, MIGRATION_STORAGE_TABLE_NAMES, type MigrationAppliedState, type MigrationCancelArgs, type MigrationDefinition, type MigrationDirection, type MigrationDoc, type MigrationDocContext, type MigrationDriftIssue, type MigrationManifestEntry, type MigrationMigrateOne, type MigrationPlan, type MigrationRunArgs, type MigrationRunChunkArgs, type MigrationRunStatus, type MigrationSet, type MigrationStateMap, type MigrationStatusArgs, type MigrationStep, type MigrationTableName, type MigrationWriteMode, buildMigrationPlan, createMigrationHandlers, defineMigration, defineMigrationSet, detectMigrationDrift, injectMigrationStorageTables, migrationCapability, migrationExtension, migrationStorageTables };
@@ -102,25 +102,20 @@ declare const migrationStorageTables: {
102
102
  fieldName: "status";
103
103
  };
104
104
  };
105
- cursor: ConvexTextBuilderInitial<""> & {
105
+ migrationId: ConvexTextBuilderInitial<""> & {
106
106
  _: {
107
- tableName: "migration_state";
107
+ notNull: true;
108
108
  };
109
109
  } & {
110
- _: {
111
- fieldName: "cursor";
112
- };
113
- };
114
- direction: ConvexTextBuilderInitial<""> & {
115
110
  _: {
116
111
  tableName: "migration_state";
117
112
  };
118
113
  } & {
119
114
  _: {
120
- fieldName: "direction";
115
+ fieldName: "migrationId";
121
116
  };
122
117
  };
123
- migrationId: ConvexTextBuilderInitial<""> & {
118
+ checksum: ConvexTextBuilderInitial<""> & {
124
119
  _: {
125
120
  notNull: true;
126
121
  };
@@ -130,10 +125,10 @@ declare const migrationStorageTables: {
130
125
  };
131
126
  } & {
132
127
  _: {
133
- fieldName: "migrationId";
128
+ fieldName: "checksum";
134
129
  };
135
130
  };
136
- checksum: ConvexTextBuilderInitial<""> & {
131
+ applied: ConvexBooleanBuilderInitial<""> & {
137
132
  _: {
138
133
  notNull: true;
139
134
  };
@@ -143,29 +138,34 @@ declare const migrationStorageTables: {
143
138
  };
144
139
  } & {
145
140
  _: {
146
- fieldName: "checksum";
141
+ fieldName: "applied";
147
142
  };
148
143
  };
149
- applied: ConvexBooleanBuilderInitial<""> & {
144
+ direction: ConvexTextBuilderInitial<""> & {
150
145
  _: {
151
- notNull: true;
146
+ tableName: "migration_state";
152
147
  };
153
148
  } & {
149
+ _: {
150
+ fieldName: "direction";
151
+ };
152
+ };
153
+ runId: ConvexTextBuilderInitial<""> & {
154
154
  _: {
155
155
  tableName: "migration_state";
156
156
  };
157
157
  } & {
158
158
  _: {
159
- fieldName: "applied";
159
+ fieldName: "runId";
160
160
  };
161
161
  };
162
- runId: ConvexTextBuilderInitial<""> & {
162
+ cursor: ConvexTextBuilderInitial<""> & {
163
163
  _: {
164
164
  tableName: "migration_state";
165
165
  };
166
166
  } & {
167
167
  _: {
168
- fieldName: "runId";
168
+ fieldName: "cursor";
169
169
  };
170
170
  };
171
171
  processed: ConvexNumberBuilderInitial<""> & {
@@ -1011,7 +1011,7 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
1011
1011
  readonly aggregate_bucket: ConvexTableWithColumns<{
1012
1012
  name: "aggregate_bucket";
1013
1013
  columns: {
1014
- count: ConvexNumberBuilderInitial<""> & {
1014
+ updatedAt: ConvexNumberBuilderInitial<""> & {
1015
1015
  _: {
1016
1016
  notNull: true;
1017
1017
  };
@@ -1021,10 +1021,10 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
1021
1021
  };
1022
1022
  } & {
1023
1023
  _: {
1024
- fieldName: "count";
1024
+ fieldName: "updatedAt";
1025
1025
  };
1026
1026
  };
1027
- updatedAt: ConvexNumberBuilderInitial<""> & {
1027
+ count: ConvexNumberBuilderInitial<""> & {
1028
1028
  _: {
1029
1029
  notNull: true;
1030
1030
  };
@@ -1034,10 +1034,10 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
1034
1034
  };
1035
1035
  } & {
1036
1036
  _: {
1037
- fieldName: "updatedAt";
1037
+ fieldName: "count";
1038
1038
  };
1039
1039
  };
1040
- indexName: ConvexTextBuilderInitial<""> & {
1040
+ tableKey: ConvexTextBuilderInitial<""> & {
1041
1041
  _: {
1042
1042
  notNull: true;
1043
1043
  };
@@ -1047,10 +1047,10 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
1047
1047
  };
1048
1048
  } & {
1049
1049
  _: {
1050
- fieldName: "indexName";
1050
+ fieldName: "tableKey";
1051
1051
  };
1052
1052
  };
1053
- tableKey: ConvexTextBuilderInitial<""> & {
1053
+ indexName: ConvexTextBuilderInitial<""> & {
1054
1054
  _: {
1055
1055
  notNull: true;
1056
1056
  };
@@ -1060,7 +1060,7 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
1060
1060
  };
1061
1061
  } & {
1062
1062
  _: {
1063
- fieldName: "tableKey";
1063
+ fieldName: "indexName";
1064
1064
  };
1065
1065
  };
1066
1066
  keyHash: ConvexTextBuilderInitial<""> & {
@@ -1136,7 +1136,7 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
1136
1136
  readonly aggregate_member: ConvexTableWithColumns<{
1137
1137
  name: "aggregate_member";
1138
1138
  columns: {
1139
- kind: ConvexTextBuilderInitial<""> & {
1139
+ updatedAt: ConvexNumberBuilderInitial<""> & {
1140
1140
  _: {
1141
1141
  notNull: true;
1142
1142
  };
@@ -1146,10 +1146,10 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
1146
1146
  };
1147
1147
  } & {
1148
1148
  _: {
1149
- fieldName: "kind";
1149
+ fieldName: "updatedAt";
1150
1150
  };
1151
1151
  };
1152
- updatedAt: ConvexNumberBuilderInitial<""> & {
1152
+ kind: ConvexTextBuilderInitial<""> & {
1153
1153
  _: {
1154
1154
  notNull: true;
1155
1155
  };
@@ -1159,10 +1159,10 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
1159
1159
  };
1160
1160
  } & {
1161
1161
  _: {
1162
- fieldName: "updatedAt";
1162
+ fieldName: "kind";
1163
1163
  };
1164
1164
  };
1165
- indexName: ConvexTextBuilderInitial<""> & {
1165
+ tableKey: ConvexTextBuilderInitial<""> & {
1166
1166
  _: {
1167
1167
  notNull: true;
1168
1168
  };
@@ -1172,10 +1172,10 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
1172
1172
  };
1173
1173
  } & {
1174
1174
  _: {
1175
- fieldName: "indexName";
1175
+ fieldName: "tableKey";
1176
1176
  };
1177
1177
  };
1178
- tableKey: ConvexTextBuilderInitial<""> & {
1178
+ indexName: ConvexTextBuilderInitial<""> & {
1179
1179
  _: {
1180
1180
  notNull: true;
1181
1181
  };
@@ -1185,7 +1185,7 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
1185
1185
  };
1186
1186
  } & {
1187
1187
  _: {
1188
- fieldName: "tableKey";
1188
+ fieldName: "indexName";
1189
1189
  };
1190
1190
  };
1191
1191
  keyHash: ConvexTextBuilderInitial<""> & {
@@ -1326,7 +1326,7 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
1326
1326
  readonly aggregate_extrema: ConvexTableWithColumns<{
1327
1327
  name: "aggregate_extrema";
1328
1328
  columns: {
1329
- count: ConvexNumberBuilderInitial<""> & {
1329
+ updatedAt: ConvexNumberBuilderInitial<""> & {
1330
1330
  _: {
1331
1331
  notNull: true;
1332
1332
  };
@@ -1336,14 +1336,10 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
1336
1336
  };
1337
1337
  } & {
1338
1338
  _: {
1339
- fieldName: "count";
1339
+ fieldName: "updatedAt";
1340
1340
  };
1341
1341
  };
1342
- value: ConvexCustomBuilderInitial<"", convex_values0.VAny<any, "required", string>> & {
1343
- _: {
1344
- $type: convex_values0.Value;
1345
- };
1346
- } & {
1342
+ count: ConvexNumberBuilderInitial<""> & {
1347
1343
  _: {
1348
1344
  notNull: true;
1349
1345
  };
@@ -1353,10 +1349,14 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
1353
1349
  };
1354
1350
  } & {
1355
1351
  _: {
1356
- fieldName: "value";
1352
+ fieldName: "count";
1357
1353
  };
1358
1354
  };
1359
- updatedAt: ConvexNumberBuilderInitial<""> & {
1355
+ value: ConvexCustomBuilderInitial<"", convex_values0.VAny<any, "required", string>> & {
1356
+ _: {
1357
+ $type: convex_values0.Value;
1358
+ };
1359
+ } & {
1360
1360
  _: {
1361
1361
  notNull: true;
1362
1362
  };
@@ -1366,10 +1366,10 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
1366
1366
  };
1367
1367
  } & {
1368
1368
  _: {
1369
- fieldName: "updatedAt";
1369
+ fieldName: "value";
1370
1370
  };
1371
1371
  };
1372
- indexName: ConvexTextBuilderInitial<""> & {
1372
+ tableKey: ConvexTextBuilderInitial<""> & {
1373
1373
  _: {
1374
1374
  notNull: true;
1375
1375
  };
@@ -1379,10 +1379,10 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
1379
1379
  };
1380
1380
  } & {
1381
1381
  _: {
1382
- fieldName: "indexName";
1382
+ fieldName: "tableKey";
1383
1383
  };
1384
1384
  };
1385
- tableKey: ConvexTextBuilderInitial<""> & {
1385
+ indexName: ConvexTextBuilderInitial<""> & {
1386
1386
  _: {
1387
1387
  notNull: true;
1388
1388
  };
@@ -1392,7 +1392,7 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
1392
1392
  };
1393
1393
  } & {
1394
1394
  _: {
1395
- fieldName: "tableKey";
1395
+ fieldName: "indexName";
1396
1396
  };
1397
1397
  };
1398
1398
  keyHash: ConvexTextBuilderInitial<""> & {
@@ -1605,19 +1605,6 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
1605
1605
  fieldName: "cursor";
1606
1606
  };
1607
1607
  };
1608
- kind: ConvexTextBuilderInitial<""> & {
1609
- _: {
1610
- notNull: true;
1611
- };
1612
- } & {
1613
- _: {
1614
- tableName: "aggregate_state";
1615
- };
1616
- } & {
1617
- _: {
1618
- fieldName: "kind";
1619
- };
1620
- };
1621
1608
  processed: ConvexNumberBuilderInitial<""> & {
1622
1609
  _: {
1623
1610
  notNull: true;
@@ -1675,7 +1662,7 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
1675
1662
  fieldName: "lastError";
1676
1663
  };
1677
1664
  };
1678
- indexName: ConvexTextBuilderInitial<""> & {
1665
+ kind: ConvexTextBuilderInitial<""> & {
1679
1666
  _: {
1680
1667
  notNull: true;
1681
1668
  };
@@ -1685,10 +1672,10 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
1685
1672
  };
1686
1673
  } & {
1687
1674
  _: {
1688
- fieldName: "indexName";
1675
+ fieldName: "kind";
1689
1676
  };
1690
1677
  };
1691
- keyDefinitionHash: ConvexTextBuilderInitial<""> & {
1678
+ tableKey: ConvexTextBuilderInitial<""> & {
1692
1679
  _: {
1693
1680
  notNull: true;
1694
1681
  };
@@ -1698,10 +1685,10 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
1698
1685
  };
1699
1686
  } & {
1700
1687
  _: {
1701
- fieldName: "keyDefinitionHash";
1688
+ fieldName: "tableKey";
1702
1689
  };
1703
1690
  };
1704
- metricDefinitionHash: ConvexTextBuilderInitial<""> & {
1691
+ indexName: ConvexTextBuilderInitial<""> & {
1705
1692
  _: {
1706
1693
  notNull: true;
1707
1694
  };
@@ -1711,10 +1698,10 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
1711
1698
  };
1712
1699
  } & {
1713
1700
  _: {
1714
- fieldName: "metricDefinitionHash";
1701
+ fieldName: "indexName";
1715
1702
  };
1716
1703
  };
1717
- tableKey: ConvexTextBuilderInitial<""> & {
1704
+ keyDefinitionHash: ConvexTextBuilderInitial<""> & {
1718
1705
  _: {
1719
1706
  notNull: true;
1720
1707
  };
@@ -1724,7 +1711,20 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
1724
1711
  };
1725
1712
  } & {
1726
1713
  _: {
1727
- fieldName: "tableKey";
1714
+ fieldName: "keyDefinitionHash";
1715
+ };
1716
+ };
1717
+ metricDefinitionHash: ConvexTextBuilderInitial<""> & {
1718
+ _: {
1719
+ notNull: true;
1720
+ };
1721
+ } & {
1722
+ _: {
1723
+ tableName: "aggregate_state";
1724
+ };
1725
+ } & {
1726
+ _: {
1727
+ fieldName: "metricDefinitionHash";
1728
1728
  };
1729
1729
  };
1730
1730
  };
@@ -1751,25 +1751,20 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
1751
1751
  fieldName: "status";
1752
1752
  };
1753
1753
  };
1754
- cursor: ConvexTextBuilderInitial<""> & {
1754
+ migrationId: ConvexTextBuilderInitial<""> & {
1755
1755
  _: {
1756
- tableName: "migration_state";
1756
+ notNull: true;
1757
1757
  };
1758
1758
  } & {
1759
- _: {
1760
- fieldName: "cursor";
1761
- };
1762
- };
1763
- direction: ConvexTextBuilderInitial<""> & {
1764
1759
  _: {
1765
1760
  tableName: "migration_state";
1766
1761
  };
1767
1762
  } & {
1768
1763
  _: {
1769
- fieldName: "direction";
1764
+ fieldName: "migrationId";
1770
1765
  };
1771
1766
  };
1772
- migrationId: ConvexTextBuilderInitial<""> & {
1767
+ checksum: ConvexTextBuilderInitial<""> & {
1773
1768
  _: {
1774
1769
  notNull: true;
1775
1770
  };
@@ -1779,10 +1774,10 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
1779
1774
  };
1780
1775
  } & {
1781
1776
  _: {
1782
- fieldName: "migrationId";
1777
+ fieldName: "checksum";
1783
1778
  };
1784
1779
  };
1785
- checksum: ConvexTextBuilderInitial<""> & {
1780
+ applied: ConvexBooleanBuilderInitial<""> & {
1786
1781
  _: {
1787
1782
  notNull: true;
1788
1783
  };
@@ -1792,29 +1787,34 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
1792
1787
  };
1793
1788
  } & {
1794
1789
  _: {
1795
- fieldName: "checksum";
1790
+ fieldName: "applied";
1796
1791
  };
1797
1792
  };
1798
- applied: ConvexBooleanBuilderInitial<""> & {
1793
+ direction: ConvexTextBuilderInitial<""> & {
1799
1794
  _: {
1800
- notNull: true;
1795
+ tableName: "migration_state";
1801
1796
  };
1802
1797
  } & {
1798
+ _: {
1799
+ fieldName: "direction";
1800
+ };
1801
+ };
1802
+ runId: ConvexTextBuilderInitial<""> & {
1803
1803
  _: {
1804
1804
  tableName: "migration_state";
1805
1805
  };
1806
1806
  } & {
1807
1807
  _: {
1808
- fieldName: "applied";
1808
+ fieldName: "runId";
1809
1809
  };
1810
1810
  };
1811
- runId: ConvexTextBuilderInitial<""> & {
1811
+ cursor: ConvexTextBuilderInitial<""> & {
1812
1812
  _: {
1813
1813
  tableName: "migration_state";
1814
1814
  };
1815
1815
  } & {
1816
1816
  _: {
1817
- fieldName: "runId";
1817
+ fieldName: "cursor";
1818
1818
  };
1819
1819
  };
1820
1820
  processed: ConvexNumberBuilderInitial<""> & {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kitcn",
3
- "version": "0.33.8",
3
+ "version": "0.33.9",
4
4
  "description": "kitcn - React Query integration and CLI tools for Convex",
5
5
  "keywords": [
6
6
  "convex",
@@ -96,7 +96,7 @@
96
96
  "@tanstack/react-start": ">=1",
97
97
  "@tanstack/solid-query": ">=5",
98
98
  "better-auth": ">=1.7.0 <1.8.0",
99
- "convex": ">=1.42 <1.45.0",
99
+ "convex": ">=1.42 <1.47.0",
100
100
  "hono": "4.12.9",
101
101
  "next": ">=14",
102
102
  "react": ">=18",
@@ -102,7 +102,40 @@ export function HydrateClient({ children }: { children: React.ReactNode }) {
102
102
 
103
103
  With Next 16 `cacheComponents` and `partialPrefetching`, the default JWT expiry
104
104
  clock can trigger a Blocking Route error even after `await headers()`. The
105
- app owns clock timing. For request-time contexts, configure the server factory:
105
+ app owns request timing. Keep the default server factory and headers-first
106
+ context. Add this helper after `caller` in the RSC module:
107
+
108
+ ```ts
109
+ import { getSessionCookie } from 'better-auth/cookies';
110
+ import { headers } from 'next/headers';
111
+ import { connection } from 'next/server';
112
+ import { cache } from 'react';
113
+
114
+ export const getToken = cache(async () => {
115
+ const heads = await headers();
116
+ if (getSessionCookie(heads) === null) {
117
+ return undefined;
118
+ }
119
+ await connection();
120
+ return caller.getToken();
121
+ });
122
+ ```
123
+
124
+ Match custom session-cookie settings in `getSessionCookie`. Use this same
125
+ `getToken` in the provider/route gate and `getServerQueryClientOptions({
126
+ getToken, convexSiteUrl })`, not `caller.getToken`. The session check skips
127
+ signed-out requests. A session without a JWT cookie still waits before fetching.
128
+ Put token-dependent components under `Suspense`.
129
+
130
+ If a TanStack integration holds Next development validation aborts pending,
131
+ apply that app-owned policy around this `connection()` await before token
132
+ retrieval. The snippet does not suppress aborts. Do not suppress ordinary auth
133
+ or network failures, or classify every `AbortError` as a Next render abort.
134
+ Recording a rejected query can itself read `Date.now()`.
135
+
136
+ `jwtCache.now` controls the expiry comparison, not the complete token operation.
137
+ A read already gated by `connection()` does not need an extra clock hook. A
138
+ separately configured request-time clock can await it:
106
139
 
107
140
  ```ts
108
141
  import { connection } from 'next/server';
@@ -124,14 +157,16 @@ export const { createContext, createCaller, handler } = convexBetterAuth({
124
157
  `auth.jwtCache` accepts a boolean or `{ now?: () => number | Promise<number> }`.
125
158
  The clock returns finite **Unix seconds**, not milliseconds. The reader awaits
126
159
  it only for a decoded cached JWT with an expiry. Disabled caching, forced
127
- refresh, missing/malformed cookies, and absent expiry bypass the hook.
160
+ refresh, missing/malformed cookies, and absent expiry bypass the hook and fetch
161
+ a token. A decoded expired JWT with `exp` calls the clock, then fetches.
128
162
  `auth.expirationToleranceSeconds` remains a sibling option (default 60).
129
163
  Clock throws/rejections propagate unchanged; `NaN` and infinities are rejected.
130
164
 
131
165
  Keep `await headers()` in the RSC context creator. Put request-time token reads
132
166
  under `Suspense`, including a provider or route gate that awaits `caller.getToken()`.
133
167
  For `'use cache: private'`, use a separate factory with the default or a sync
134
- clock; **never call `connection()` inside private cache**. A private token helper
168
+ clock; **never call `connection()` inside private cache**. Do not use the
169
+ request-time `getToken` helper in private cache. A private token helper
135
170
  can use `cacheLife({ stale: 30 })`, read headers, create that context, and return
136
171
  `context.token`. A token-blocking layout must defer its token-dependent subtree
137
172
  with `Suspense`, including when awaiting a private-cache helper. Private caching
@@ -139,9 +174,8 @@ allows the clock read but does not make runtime auth data static.
139
174
 
140
175
  `auth: { jwtCache: false }` avoids the cookie expiry clock but fetches a token
141
176
  on every context creation. Kitcn does not import Next, detect render stages, or
142
- suppress render aborts. An app that runs a `connection()` clock through TanStack
143
- queries owns abort handling because recording a query failure can also read
144
- `Date.now()`. Do not suppress ordinary auth failures.
177
+ suppress render aborts. Handling aborts only inside `jwtCache.now` leaves the
178
+ token-fetch paths that bypass the clock uncovered.
145
179
 
146
180
  Full examples: [Next.js JWT cache guidance](https://kitcn.dev/docs/nextjs#jwt-cache-and-partial-prefetching).
147
181