kitcn 0.12.14 → 0.12.16

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.
@@ -1,4 +1,4 @@
1
- import { C as ConvexNumberBuilderInitial, E as ConvexIdBuilderInitial, N as ConvexCustomBuilderInitial, dn as ConvexTableWithColumns, tr as ConvexTextBuilderInitial } from "../where-clause-compiler-DdjN63Io.js";
1
+ import { C as ConvexNumberBuilderInitial, E as ConvexIdBuilderInitial, N as ConvexCustomBuilderInitial, dn as ConvexTableWithColumns, tr as ConvexTextBuilderInitial } from "../where-clause-compiler-CuH2JNxb.js";
2
2
  import * as convex_values0 from "convex/values";
3
3
  import { GenericId, Infer, Value } from "convex/values";
4
4
  import { DocumentByName, GenericDataModel, GenericDatabaseReader, GenericDatabaseWriter, TableNamesInDataModel } from "convex/server";
@@ -1,2 +1,2 @@
1
- import { S as defineAuth, _ as GenericAuthBeforeResult, b as GenericAuthTriggerHandlers, g as BetterAuthOptionsWithoutDatabase, i as getGeneratedAuthDisabledReason, n as GeneratedAuthDisabledReasonKind, r as createDisabledAuthRuntime, t as AuthRuntime, v as GenericAuthDefinition, x as GenericAuthTriggers, y as GenericAuthTriggerChange } from "../../generated-contract-disabled-Dzx2IRId.js";
1
+ import { S as defineAuth, _ as GenericAuthBeforeResult, b as GenericAuthTriggerHandlers, g as BetterAuthOptionsWithoutDatabase, i as getGeneratedAuthDisabledReason, n as GeneratedAuthDisabledReasonKind, r as createDisabledAuthRuntime, t as AuthRuntime, v as GenericAuthDefinition, x as GenericAuthTriggers, y as GenericAuthTriggerChange } from "../../generated-contract-disabled-ngvXLZ4i.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-CFZqIvD7.js";
2
2
  import { t as GetAuth } from "../types-BiJE7qxR.js";
3
3
  import { t as GenericCtx } from "../context-utils-HPC5nXzx.js";
4
- import { S as defineAuth, _ as GenericAuthBeforeResult, a as AuthFunctions, b as GenericAuthTriggerHandlers, c as createApi, d as deleteOneHandler, f as findManyHandler, g as BetterAuthOptionsWithoutDatabase, h as updateOneHandler, i as getGeneratedAuthDisabledReason, l as createHandler, m as updateManyHandler, n as GeneratedAuthDisabledReasonKind, o as Triggers, p as findOneHandler, r as createDisabledAuthRuntime, s as createClient, t as AuthRuntime, u as deleteManyHandler, v as GenericAuthDefinition, x as GenericAuthTriggers, y as GenericAuthTriggerChange } from "../generated-contract-disabled-Dzx2IRId.js";
4
+ import { S as defineAuth, _ as GenericAuthBeforeResult, a as AuthFunctions, b as GenericAuthTriggerHandlers, c as createApi, d as deleteOneHandler, f as findManyHandler, g as BetterAuthOptionsWithoutDatabase, h as updateOneHandler, i as getGeneratedAuthDisabledReason, l as createHandler, m as updateManyHandler, n as GeneratedAuthDisabledReasonKind, o as Triggers, p as findOneHandler, r as createDisabledAuthRuntime, s as createClient, t as AuthRuntime, u as deleteManyHandler, v as GenericAuthDefinition, x as GenericAuthTriggers, y as GenericAuthTriggerChange } from "../generated-contract-disabled-ngvXLZ4i.js";
5
5
  import * as convex_values0 from "convex/values";
6
6
  import { Infer } from "convex/values";
7
7
  import { DocumentByName, GenericDataModel, GenericMutationCtx, GenericQueryCtx, GenericSchema, PaginationOptions, PaginationResult, SchemaDefinition, TableNamesInDataModel } from "convex/server";
@@ -103,25 +103,25 @@ type AdapterPaginationOptions = PaginationOptions & {
103
103
  maximumRowsRead?: number;
104
104
  };
105
105
  declare const adapterWhereValidator: convex_values0.VObject<{
106
+ operator?: "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | "in" | "not_in" | "contains" | "starts_with" | "ends_with" | undefined;
106
107
  connector?: "AND" | "OR" | undefined;
107
- operator?: "lt" | "lte" | "gt" | "gte" | "eq" | "in" | "not_in" | "ne" | "contains" | "starts_with" | "ends_with" | undefined;
108
108
  value: string | number | boolean | string[] | number[] | null;
109
109
  field: string;
110
110
  }, {
111
111
  connector: convex_values0.VUnion<"AND" | "OR" | undefined, [convex_values0.VLiteral<"AND", "required">, convex_values0.VLiteral<"OR", "required">], "optional", never>;
112
112
  field: convex_values0.VString<string, "required">;
113
- operator: convex_values0.VUnion<"lt" | "lte" | "gt" | "gte" | "eq" | "in" | "not_in" | "ne" | "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>;
113
+ 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>;
114
114
  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>;
115
- }, "required", "value" | "connector" | "field" | "operator">;
115
+ }, "required", "operator" | "value" | "field" | "connector">;
116
116
  declare const adapterArgsValidator: convex_values0.VObject<{
117
- select?: string[] | undefined;
117
+ limit?: number | undefined;
118
118
  where?: {
119
+ operator?: "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | "in" | "not_in" | "contains" | "starts_with" | "ends_with" | undefined;
119
120
  connector?: "AND" | "OR" | undefined;
120
- operator?: "lt" | "lte" | "gt" | "gte" | "eq" | "in" | "not_in" | "ne" | "contains" | "starts_with" | "ends_with" | undefined;
121
121
  value: string | number | boolean | string[] | number[] | null;
122
122
  field: string;
123
123
  }[] | undefined;
124
- limit?: number | undefined;
124
+ select?: string[] | undefined;
125
125
  offset?: number | undefined;
126
126
  sortBy?: {
127
127
  field: string;
@@ -141,22 +141,22 @@ declare const adapterArgsValidator: convex_values0.VObject<{
141
141
  field: convex_values0.VString<string, "required">;
142
142
  }, "optional", "field" | "direction">;
143
143
  where: convex_values0.VArray<{
144
+ operator?: "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | "in" | "not_in" | "contains" | "starts_with" | "ends_with" | undefined;
144
145
  connector?: "AND" | "OR" | undefined;
145
- operator?: "lt" | "lte" | "gt" | "gte" | "eq" | "in" | "not_in" | "ne" | "contains" | "starts_with" | "ends_with" | undefined;
146
146
  value: string | number | boolean | string[] | number[] | null;
147
147
  field: string;
148
148
  }[] | undefined, convex_values0.VObject<{
149
+ operator?: "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | "in" | "not_in" | "contains" | "starts_with" | "ends_with" | undefined;
149
150
  connector?: "AND" | "OR" | undefined;
150
- operator?: "lt" | "lte" | "gt" | "gte" | "eq" | "in" | "not_in" | "ne" | "contains" | "starts_with" | "ends_with" | undefined;
151
151
  value: string | number | boolean | string[] | number[] | null;
152
152
  field: string;
153
153
  }, {
154
154
  connector: convex_values0.VUnion<"AND" | "OR" | undefined, [convex_values0.VLiteral<"AND", "required">, convex_values0.VLiteral<"OR", "required">], "optional", never>;
155
155
  field: convex_values0.VString<string, "required">;
156
- operator: convex_values0.VUnion<"lt" | "lte" | "gt" | "gte" | "eq" | "in" | "not_in" | "ne" | "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>;
156
+ 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>;
157
157
  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>;
158
- }, "required", "value" | "connector" | "field" | "operator">, "optional">;
159
- }, "required", "model" | "select" | "where" | "limit" | "offset" | "sortBy" | "sortBy.field" | "sortBy.direction">;
158
+ }, "required", "operator" | "value" | "field" | "connector">, "optional">;
159
+ }, "required", "limit" | "where" | "model" | "select" | "offset" | "sortBy" | "sortBy.field" | "sortBy.direction">;
160
160
  declare const hasUniqueFields: (betterAuthSchema: BetterAuthDBSchema, model: string, input: Record<string, any>) => boolean;
161
161
  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>;
162
162
  declare const selectFields: <T extends TableNamesInDataModel<GenericDataModel>, D extends DocumentByName<GenericDataModel, T>>(doc: D | null, select?: string[]) => D | null;
@@ -1,4 +1,4 @@
1
- import { I as ConvexContext, R as LazyCaller } from "../../procedure-caller-DtxLmGwA.js";
1
+ import { I as ConvexContext, R as LazyCaller } from "../../procedure-caller-C15h5Iel.js";
2
2
  import { GetTokenOptions } from "@convex-dev/better-auth/utils";
3
3
 
4
4
  //#region src/auth-nextjs/index.d.ts
@@ -2204,13 +2204,14 @@ const JITI_EXPORT_CONDITION_PRIORITY = [
2204
2204
  "default",
2205
2205
  "require"
2206
2206
  ];
2207
- const SERVER_PARSER_SHIM_SOURCE = `const createProcedureBuilder = () => {
2208
- const createMiddleware = (handler = undefined) => ({
2209
- _handler: handler,
2210
- pipe(nextHandler) {
2211
- return createMiddleware(nextHandler);
2212
- },
2213
- });
2207
+ const SERVER_PARSER_SHIM_SOURCE = `const createMiddleware = (handler = undefined) => ({
2208
+ _handler: handler,
2209
+ pipe(nextHandler) {
2210
+ return createMiddleware(nextHandler);
2211
+ },
2212
+ });
2213
+
2214
+ const createProcedureBuilder = () => {
2214
2215
  const builder = {
2215
2216
  internal() {
2216
2217
  return builder;
@@ -2353,13 +2354,14 @@ const ensureServerParserShim = (cwd) => {
2353
2354
  if (!fs.existsSync(shimPath) || fs.readFileSync(shimPath, "utf8") !== SERVER_PARSER_SHIM_SOURCE) fs.writeFileSync(shimPath, SERVER_PARSER_SHIM_SOURCE, "utf8");
2354
2355
  return shimPath;
2355
2356
  };
2357
+ const getProjectServerParserShimPath = (cwd = process.cwd()) => ensureServerParserShim(cwd);
2356
2358
  const createProjectJiti = (cwd = process.cwd()) => createJiti(cwd, {
2357
2359
  interopDefault: true,
2358
2360
  moduleCache: false,
2359
2361
  alias: {
2360
2362
  ...buildLocalPackageExportAliases(cwd, "kitcn"),
2361
2363
  ...buildLocalPackageExportAliases(cwd, "convex"),
2362
- "kitcn/server": ensureServerParserShim(cwd)
2364
+ "kitcn/server": getProjectServerParserShimPath(cwd)
2363
2365
  }
2364
2366
  });
2365
2367
 
@@ -4230,6 +4232,13 @@ export type MutationCtx = ServerMutationCtx;
4230
4232
  export type ActionCtx = ServerActionCtx;
4231
4233
  export type GenericCtx = QueryCtx | MutationCtx | ActionCtx;
4232
4234
 
4235
+ const createMiddleware = (handler?: unknown) => ({
4236
+ _handler: handler,
4237
+ pipe(nextHandler?: unknown) {
4238
+ return createMiddleware(nextHandler);
4239
+ },
4240
+ });
4241
+
4233
4242
  const createProcedureBuilder = () => {
4234
4243
  const builder = {
4235
4244
  internal() {
@@ -4256,6 +4265,9 @@ const createProcedureBuilder = () => {
4256
4265
  action(handler?: unknown) {
4257
4266
  return handler ?? builder;
4258
4267
  },
4268
+ middleware(handler?: unknown) {
4269
+ return createMiddleware(handler);
4270
+ },
4259
4271
  };
4260
4272
 
4261
4273
  return builder;
@@ -4271,12 +4283,16 @@ export const initCRPC = {
4271
4283
  context() {
4272
4284
  return this;
4273
4285
  },
4286
+ middleware(handler?: unknown) {
4287
+ return createMiddleware(handler);
4288
+ },
4274
4289
  create() {
4275
4290
  return {
4276
4291
  query: createProcedureBuilder(),
4277
4292
  mutation: createProcedureBuilder(),
4278
4293
  action: createProcedureBuilder(),
4279
4294
  httpAction: createProcedureBuilder(),
4295
+ middleware: createMiddleware,
4280
4296
  router: (record = {}) => record,
4281
4297
  };
4282
4298
  },
@@ -4921,13 +4937,21 @@ function isCRPCHttpRouter(value) {
4921
4937
  * Import a module using jiti and extract cRPC metadata from exports.
4922
4938
  */
4923
4939
  async function parseModuleRuntime(filePath, jitiInstance) {
4940
+ const source = fs.readFileSync(filePath, "utf8");
4941
+ const rewrittenSource = source.replaceAll(/from\s+(['"])kitcn\/server\1/g, `from ${JSON.stringify(normalizeImportPath(getProjectServerParserShimPath()))}`);
4942
+ const importPath = rewrittenSource === source ? filePath : (() => {
4943
+ const tempFilePath = `${filePath}.kitcn-parse.ts`;
4944
+ fs.writeFileSync(tempFilePath, rewrittenSource, "utf8");
4945
+ return tempFilePath;
4946
+ })();
4924
4947
  const result = {};
4925
4948
  const httpRoutes = {};
4926
4949
  const procedures = [];
4927
4950
  const isHttp = filePath.endsWith("http.ts");
4928
- const module = await jitiInstance.import(filePath);
4951
+ const module = await jitiInstance.import(importPath);
4929
4952
  if (!module || typeof module !== "object") {
4930
4953
  if (isHttp) logger.error(" http.ts: module is empty or not an object");
4954
+ if (importPath !== filePath) fs.rmSync(importPath, { force: true });
4931
4955
  return {
4932
4956
  meta: null,
4933
4957
  httpRoutes: {},
@@ -4962,6 +4986,7 @@ async function parseModuleRuntime(filePath, jitiInstance) {
4962
4986
  };
4963
4987
  }
4964
4988
  }
4989
+ if (importPath !== filePath) fs.rmSync(importPath, { force: true });
4965
4990
  return {
4966
4991
  meta: Object.keys(result).length > 0 ? result : null,
4967
4992
  httpRoutes,
package/dist/cli.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { $ as resolvePluginPreset, A as resolveConfiguredBackend, B as runConvexInitIfNeeded, C as isInitialized, D as readPackageVersions, E as parseInitCommandArgs, F as runAfterScaffoldScript, G as trackProcess, H as runInitCommandFlow, I as runAggregateBackfillFlow, J as collectPluginScaffoldTemplates, K as withWorkingDirectory, L as runAggregatePruneFlow, M as resolveInitProjectDir, N as resolveMigrationConfig, O as resolveBackfillConfig, P as resolveRunDeps, Q as resolveAddTemplateDefaults, R as runBackendFunction, S as isEntryPoint, T as parseBackendRunJson, Tt as highlighter, U as runMigrationCreate, V as runDevSchemaBackfillIfNeeded, W as runMigrationFlow, X as promptForPluginSelection, Y as filterScaffoldTemplatePathMap, Z as promptForScaffoldTemplateSelection, _ as formatInfoOutput, _t as inspectPluginDependencyInstall, a as cleanup, at as isSupportedPluginKey, b as hasRemoteConvexDeploymentEnv, bt as serializeEnvValue, c as createCommandEnv, ct as assertSchemaFileExists, d as extractBackfillCliOptions, dt as getSchemaFilePath, et as resolvePresetScaffoldTemplates, f as extractConcaveRunTargetArgs, ft as readPluginLockfile, g as formatDocsOutput, gt as applyPluginDependencyInstall, h as extractResetCliOptions, ht as applyPlanningDependencyInstall, i as buildInitializationPlan, it as getSupportedPluginKeys, j as resolveDocTopic, k as resolveCodegenTrimSegments, l as ensureConvexGitignoreEntry, lt as collectInstalledPluginKeys, m as extractMigrationDownOptions, mt as applyDependencyHintsInstall, n as applyPluginInstallPlanFiles, nt as resolveTemplatesByIdOrThrow, o as createBackendAdapter, ot as buildPluginInstallPlan, p as extractMigrationCliOptions, pt as resolveSchemaInstalledPlugins, q as createSpinner, r as assertNoRemovedDevPreRunFlag, rt as getPluginCatalogEntry, s as createBackendCommandEnv, st as resolvePluginScaffoldRoots, t as applyDependencyInstallPlan, tt as resolveTemplateSelectionSource, u as extractBackendRunTargetArgs, ut as getPluginLockfilePath, v as getAggregateBackfillDeploymentKey, vt as resolveProjectScaffoldContext, w as parseArgs, wt as logger, x as isConvexDevPreRunConflictFlag, xt as stripConvexCommandNoise, y as getDevAggregateBackfillStatePath, yt as resolveAuthEnvState, z as runConfiguredCodegen } from "./backend-core-7NEZ71jw.mjs";
2
+ import { $ as resolvePluginPreset, A as resolveConfiguredBackend, B as runConvexInitIfNeeded, C as isInitialized, D as readPackageVersions, E as parseInitCommandArgs, F as runAfterScaffoldScript, G as trackProcess, H as runInitCommandFlow, I as runAggregateBackfillFlow, J as collectPluginScaffoldTemplates, K as withWorkingDirectory, L as runAggregatePruneFlow, M as resolveInitProjectDir, N as resolveMigrationConfig, O as resolveBackfillConfig, P as resolveRunDeps, Q as resolveAddTemplateDefaults, R as runBackendFunction, S as isEntryPoint, T as parseBackendRunJson, Tt as highlighter, U as runMigrationCreate, V as runDevSchemaBackfillIfNeeded, W as runMigrationFlow, X as promptForPluginSelection, Y as filterScaffoldTemplatePathMap, Z as promptForScaffoldTemplateSelection, _ as formatInfoOutput, _t as inspectPluginDependencyInstall, a as cleanup, at as isSupportedPluginKey, b as hasRemoteConvexDeploymentEnv, bt as serializeEnvValue, c as createCommandEnv, ct as assertSchemaFileExists, d as extractBackfillCliOptions, dt as getSchemaFilePath, et as resolvePresetScaffoldTemplates, f as extractConcaveRunTargetArgs, ft as readPluginLockfile, g as formatDocsOutput, gt as applyPluginDependencyInstall, h as extractResetCliOptions, ht as applyPlanningDependencyInstall, i as buildInitializationPlan, it as getSupportedPluginKeys, j as resolveDocTopic, k as resolveCodegenTrimSegments, l as ensureConvexGitignoreEntry, lt as collectInstalledPluginKeys, m as extractMigrationDownOptions, mt as applyDependencyHintsInstall, n as applyPluginInstallPlanFiles, nt as resolveTemplatesByIdOrThrow, o as createBackendAdapter, ot as buildPluginInstallPlan, p as extractMigrationCliOptions, pt as resolveSchemaInstalledPlugins, q as createSpinner, r as assertNoRemovedDevPreRunFlag, rt as getPluginCatalogEntry, s as createBackendCommandEnv, st as resolvePluginScaffoldRoots, t as applyDependencyInstallPlan, tt as resolveTemplateSelectionSource, u as extractBackendRunTargetArgs, ut as getPluginLockfilePath, v as getAggregateBackfillDeploymentKey, vt as resolveProjectScaffoldContext, w as parseArgs, wt as logger, x as isConvexDevPreRunConflictFlag, xt as stripConvexCommandNoise, y as getDevAggregateBackfillStatePath, yt as resolveAuthEnvState, z as runConfiguredCodegen } from "./backend-core-DA9iT-To.mjs";
3
3
  import fs, { existsSync, readFileSync } from "node:fs";
4
4
  import path, { delimiter, dirname, join, relative, resolve } from "node:path";
5
5
  import { fileURLToPath } from "node:url";
@@ -1,5 +1,5 @@
1
- import { A as DataTransformer, F as decodeWire, I as defaultCRPCTransformer, L as encodeWire, M as WireCodec, N as createTaggedTransformer, O as CombinedDataTransformer, P as dateWireCodec, R as getTransformer, a as HttpProcedureCall, c as InferHttpInput, i as HttpErrorCode, j as DataTransformerOptions, k as DATE_CODEC_TAG, l as InferHttpOutput, n as HttpClientError, o as HttpRouteInfo, r as HttpClientFromRouter, s as HttpRouteMap, t as HttpClient, u as isHttpClientError, z as identityTransformer } from "../http-types-DqJubRPJ.js";
2
- import { A as HttpInputArgs, C as ReservedMutationOptions, D as VanillaMutation, E as VanillaAction, F as replaceUrlParam, M as RESERVED_KEYS, N as buildSearchParams, O as HttpClientOptions, P as executeHttpRequest, S as ReservedInfiniteQueryOptions, T as StaticQueryOptsParam, _ as IsPaginated, a as BaseInfiniteQueryOptsParam, b as PaginatedFnMeta, c as ConvexMutationKey, d as ConvexQueryMeta, f as EmptyObject, g as InfiniteQueryInput, h as FnMeta, i as BaseConvexQueryOptions, j as HttpProxyBaseOptions, k as HttpFormValue, l as ConvexQueryHookOptions, m as FUNC_REF_SYMBOL, n as BaseConvexActionOptions, o as ConvexActionKey, p as ExtractPaginatedItem, r as BaseConvexInfiniteQueryOptions, s as ConvexInfiniteQueryMeta, t as AuthType, u as ConvexQueryKey, v as Meta, w as ReservedQueryOptions, x as PaginationOpts, y as MutationVariables } from "../types-BLvtq_eH.js";
1
+ import { A as DataTransformer, F as decodeWire, I as defaultCRPCTransformer, L as encodeWire, M as WireCodec, N as createTaggedTransformer, O as CombinedDataTransformer, P as dateWireCodec, R as getTransformer, a as HttpProcedureCall, c as InferHttpInput, i as HttpErrorCode, j as DataTransformerOptions, k as DATE_CODEC_TAG, l as InferHttpOutput, n as HttpClientError, o as HttpRouteInfo, r as HttpClientFromRouter, s as HttpRouteMap, t as HttpClient, u as isHttpClientError, z as identityTransformer } from "../http-types-BS63Nsug.js";
2
+ import { A as HttpInputArgs, C as ReservedMutationOptions, D as VanillaMutation, E as VanillaAction, F as replaceUrlParam, M as RESERVED_KEYS, N as buildSearchParams, O as HttpClientOptions, P as executeHttpRequest, S as ReservedInfiniteQueryOptions, T as StaticQueryOptsParam, _ as IsPaginated, a as BaseInfiniteQueryOptsParam, b as PaginatedFnMeta, c as ConvexMutationKey, d as ConvexQueryMeta, f as EmptyObject, g as InfiniteQueryInput, h as FnMeta, i as BaseConvexQueryOptions, j as HttpProxyBaseOptions, k as HttpFormValue, l as ConvexQueryHookOptions, m as FUNC_REF_SYMBOL, n as BaseConvexActionOptions, o as ConvexActionKey, p as ExtractPaginatedItem, r as BaseConvexInfiniteQueryOptions, s as ConvexInfiniteQueryMeta, t as AuthType, u as ConvexQueryKey, v as Meta, w as ReservedQueryOptions, x as PaginationOpts, y as MutationVariables } from "../types-DrB2VeNb.js";
3
3
  import { FunctionArgs, FunctionReference } from "convex/server";
4
4
 
5
5
  //#region src/crpc/auth-error.d.ts
@@ -173,10 +173,18 @@ declare const createApi: <Schema extends SchemaDefinition<any, any>, DataModel e
173
173
  };
174
174
  }, Promise<any>>;
175
175
  deleteMany: convex_server0.RegisteredMutation<"internal", {
176
+ paginationOpts: {
177
+ id?: number;
178
+ endCursor?: string | null;
179
+ maximumRowsRead?: number;
180
+ maximumBytesRead?: number;
181
+ numItems: number;
182
+ cursor: string | null;
183
+ };
176
184
  input: {
177
185
  where?: {
186
+ operator?: "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | "in" | "not_in" | "contains" | "starts_with" | "ends_with" | undefined;
178
187
  connector?: "AND" | "OR" | undefined;
179
- operator?: "lt" | "lte" | "gt" | "gte" | "eq" | "in" | "not_in" | "ne" | "contains" | "starts_with" | "ends_with" | undefined;
180
188
  value: string | number | boolean | string[] | number[] | null;
181
189
  field: string;
182
190
  }[] | undefined;
@@ -185,14 +193,6 @@ declare const createApi: <Schema extends SchemaDefinition<any, any>, DataModel e
185
193
  where?: any[] | undefined;
186
194
  model: string;
187
195
  };
188
- paginationOpts: {
189
- id?: number;
190
- endCursor?: string | null;
191
- maximumRowsRead?: number;
192
- maximumBytesRead?: number;
193
- numItems: number;
194
- cursor: string | null;
195
- };
196
196
  }, Promise<{
197
197
  count: number;
198
198
  ids: any[];
@@ -204,8 +204,8 @@ declare const createApi: <Schema extends SchemaDefinition<any, any>, DataModel e
204
204
  deleteOne: convex_server0.RegisteredMutation<"internal", {
205
205
  input: {
206
206
  where?: {
207
+ operator?: "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | "in" | "not_in" | "contains" | "starts_with" | "ends_with" | undefined;
207
208
  connector?: "AND" | "OR" | undefined;
208
- operator?: "lt" | "lte" | "gt" | "gte" | "eq" | "in" | "not_in" | "ne" | "contains" | "starts_with" | "ends_with" | undefined;
209
209
  value: string | number | boolean | string[] | number[] | null;
210
210
  field: string;
211
211
  }[] | undefined;
@@ -216,20 +216,19 @@ declare const createApi: <Schema extends SchemaDefinition<any, any>, DataModel e
216
216
  };
217
217
  }, Promise<Record<string, unknown> | undefined>>;
218
218
  findMany: convex_server0.RegisteredQuery<"internal", {
219
+ limit?: number | undefined;
219
220
  join?: any;
220
221
  where?: {
222
+ operator?: "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | "in" | "not_in" | "contains" | "starts_with" | "ends_with" | undefined;
221
223
  connector?: "AND" | "OR" | undefined;
222
- operator?: "lt" | "lte" | "gt" | "gte" | "eq" | "in" | "not_in" | "ne" | "contains" | "starts_with" | "ends_with" | undefined;
223
224
  value: string | number | boolean | string[] | number[] | null;
224
225
  field: string;
225
226
  }[] | undefined;
226
- limit?: number | undefined;
227
227
  offset?: number | undefined;
228
228
  sortBy?: {
229
229
  field: string;
230
230
  direction: "asc" | "desc";
231
231
  } | undefined;
232
- model: string;
233
232
  paginationOpts: {
234
233
  id?: number;
235
234
  endCursor?: string | null;
@@ -238,46 +237,47 @@ declare const createApi: <Schema extends SchemaDefinition<any, any>, DataModel e
238
237
  numItems: number;
239
238
  cursor: string | null;
240
239
  };
240
+ model: string;
241
241
  }, Promise<convex_server0.PaginationResult<convex_server0.GenericDocument>>>;
242
242
  findOne: convex_server0.RegisteredQuery<"internal", {
243
243
  join?: any;
244
- select?: string[] | undefined;
245
244
  where?: {
245
+ operator?: "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | "in" | "not_in" | "contains" | "starts_with" | "ends_with" | undefined;
246
246
  connector?: "AND" | "OR" | undefined;
247
- operator?: "lt" | "lte" | "gt" | "gte" | "eq" | "in" | "not_in" | "ne" | "contains" | "starts_with" | "ends_with" | undefined;
248
247
  value: string | number | boolean | string[] | number[] | null;
249
248
  field: string;
250
249
  }[] | undefined;
250
+ select?: string[] | undefined;
251
251
  model: string;
252
252
  }, Promise<convex_server0.GenericDocument | null>>;
253
253
  getLatestJwks: convex_server0.RegisteredAction<"internal", {}, Promise<unknown>>;
254
254
  rotateKeys: convex_server0.RegisteredAction<"internal", {}, Promise<unknown>>;
255
255
  updateMany: convex_server0.RegisteredMutation<"internal", {
256
+ paginationOpts: {
257
+ id?: number;
258
+ endCursor?: string | null;
259
+ maximumRowsRead?: number;
260
+ maximumBytesRead?: number;
261
+ numItems: number;
262
+ cursor: string | null;
263
+ };
256
264
  input: {
257
265
  where?: {
266
+ operator?: "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | "in" | "not_in" | "contains" | "starts_with" | "ends_with" | undefined;
258
267
  connector?: "AND" | "OR" | undefined;
259
- operator?: "lt" | "lte" | "gt" | "gte" | "eq" | "in" | "not_in" | "ne" | "contains" | "starts_with" | "ends_with" | undefined;
260
268
  value: string | number | boolean | string[] | number[] | null;
261
269
  field: string;
262
270
  }[] | undefined;
263
- model: string;
264
271
  update: {
265
272
  [x: string]: unknown;
266
273
  [x: number]: unknown;
267
274
  [x: symbol]: unknown;
268
275
  };
276
+ model: string;
269
277
  } | {
270
278
  where?: any[] | undefined;
271
- model: string;
272
279
  update: any;
273
- };
274
- paginationOpts: {
275
- id?: number;
276
- endCursor?: string | null;
277
- maximumRowsRead?: number;
278
- maximumBytesRead?: number;
279
- numItems: number;
280
- cursor: string | null;
280
+ model: string;
281
281
  };
282
282
  }, Promise<{
283
283
  count: number;
@@ -290,21 +290,21 @@ declare const createApi: <Schema extends SchemaDefinition<any, any>, DataModel e
290
290
  updateOne: convex_server0.RegisteredMutation<"internal", {
291
291
  input: {
292
292
  where?: {
293
+ operator?: "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | "in" | "not_in" | "contains" | "starts_with" | "ends_with" | undefined;
293
294
  connector?: "AND" | "OR" | undefined;
294
- operator?: "lt" | "lte" | "gt" | "gte" | "eq" | "in" | "not_in" | "ne" | "contains" | "starts_with" | "ends_with" | undefined;
295
295
  value: string | number | boolean | string[] | number[] | null;
296
296
  field: string;
297
297
  }[] | undefined;
298
- model: string;
299
298
  update: {
300
299
  [x: string]: unknown;
301
300
  [x: number]: unknown;
302
301
  [x: symbol]: unknown;
303
302
  };
303
+ model: string;
304
304
  } | {
305
305
  where?: any[] | undefined;
306
- model: string;
307
306
  update: any;
307
+ model: string;
308
308
  };
309
309
  }, Promise<any>>;
310
310
  };
@@ -1,5 +1,5 @@
1
1
  import { o as Simplify } from "./types-BTb_4BaU.js";
2
- import { m as UnsetMarker, t as AnyMiddleware } from "./types-DEJpkIhw.js";
2
+ import { m as UnsetMarker, t as AnyMiddleware } from "./types-BqUIoMfT.js";
3
3
  import { GenericActionCtx, GenericDataModel, HttpRouter } from "convex/server";
4
4
  import { z } from "zod";
5
5
  import { Context, Hono } from "hono";
@@ -1,4 +1,4 @@
1
- import { o as MiddlewareBuilder } from "./types-DEJpkIhw.js";
1
+ import { o as MiddlewareBuilder } from "./types-BqUIoMfT.js";
2
2
 
3
3
  //#region src/plugins/middleware.d.ts
4
4
  declare const PLUGIN_CONFIG_RESOLVERS: unique symbol;
@@ -1,4 +1,4 @@
1
- import { $ as GenericOrmCtx$1, $n as unique, $r as endsWith, $t as ManyConfig, A as ConvexDateMode, An as ConvexRankIndexBuilder, Ar as ReturningResult, At as MigrationManifestEntry, B as ConvexBytesBuilderInitial, Bn as rankIndex, Br as OrmSchemaRelations, Bt as defineMigration, C as ConvexNumberBuilderInitial, Ci as ColumnBuilderWithTableName, Cn as RlsRole, Cr as MutationReturning, Ct as MigrationStatusArgs, D as id, Di as IsPrimaryKey, Dn as ConvexAggregateIndexBuilderOn, Dr as PaginatedResult, Dt as MigrationDoc, E as ConvexIdBuilderInitial, Ei as HasDefault, En as ConvexAggregateIndexBuilder, Er as OrderDirection, Et as MigrationDirection, F as custom, Fn as ConvexVectorIndexBuilder, Fr as unsetToken, Ft as MigrationStateMap, G as ConvexBigIntBuilder, Gn as ConvexCheckConfig, Gr as ExpressionVisitor, Gt as OrmReader$1, H as ConvexBooleanBuilder, Hn as uniqueIndex, Hr as TableName, Ht as detectMigrationDrift, I as json, In as ConvexVectorIndexBuilderOn, Ir as Brand, It as MigrationStep, J as CountBackfillChunkArgs, Jn as ConvexUniqueConstraintBuilder, Jr as LogicalExpression, Jt as RlsMode, K as ConvexBigIntBuilderInitial, Kn as ConvexForeignKeyBuilder, Kr as FieldReference, Kt as OrmWriter$1, L as objectOf, Ln as ConvexVectorIndexConfig, Lr as Columns, Lt as MigrationTableName, M as ConvexCustomBuilder, Mn as ConvexSearchIndexBuilder, Mr as UpdateSet, Mt as MigrationPlan, N as ConvexCustomBuilderInitial, Nn as ConvexSearchIndexBuilderOn, Nr as VectorQueryConfig, Nt as MigrationRunStatus, O as ConvexDateBuilder, Oi as IsUnique, On as ConvexIndexBuilder, Or as PredicateWhereIndexConfig, Ot as MigrationDocContext, P as arrayOf, Pn as ConvexSearchIndexConfig, Pr as VectorSearchProvider, Pt as MigrationSet, Q as GenericOrm$1, Qn as foreignKey, Qr as contains, Qt as ExtractTablesWithRelations, R as unionOf, Rn as aggregateIndex, Rr as OrmSchemaExtensionTables, Rt as MigrationWriteMode, S as ConvexNumberBuilder, Si as ColumnBuilderTypeConfig, Sn as rlsPolicy, Sr as MutationResult, St as MigrationRunChunkArgs, T as ConvexIdBuilder, Ti as DrizzleEntity, Tn as rlsRole, Tr as OrderByClause, Tt as MigrationDefinition, U as ConvexBooleanBuilderInitial, Un as vectorIndex, Ur as SystemFields, Ut as DatabaseWithMutations, V as bytes, Vn as searchIndex, Vr as OrmSchemaTriggers, Vt as defineMigrationSet, W as boolean, Wn as ConvexCheckBuilder, Wr as BinaryExpression, Wt as DatabaseWithQuery, X as CountBackfillStatusArgs, Xn as ConvexUniqueConstraintConfig, Xr as and, Xt as extractRelationsConfig, Y as CountBackfillKickoffArgs, Yn as ConvexUniqueConstraintBuilderOn, Yr as UnaryExpression, Yt as EdgeMetadata, Z as CreateOrmOptions, Zn as check, Zr as between, Zt as ExtractTablesFromSchema, _ as ConvexTimestampMode, _i as startsWith, _n as deletion, _r as MutationExecuteConfig, _t as OrmTriggerContext, a as requireSchemaRelations, ai as inArray, an as TablesRelationalConfig, ar as AggregateResult, at as OrmWriterCtx, b as ConvexTextEnumBuilderInitial, bi as ColumnBuilderBaseConfig, bn as RlsPolicyConfig, br as MutationPaginateConfig, bt as MigrationCancelArgs, c as TableConfigResult, ci as isNull, cn as ConvexDeletionBuilder, cr as CountConfig, ct as ScheduledMutationBatchArgs, d as OrmNotFoundError, di as lte, dn as ConvexTableWithColumns, dr as FilterOperators, dt as scheduledDeleteFactory, ei as eq, en as OneConfig, er as ConvexTextBuilder, et as OrmApiResult, f as ConvexVectorBuilder, fi as ne, fn as DiscriminatorBuilderConfig, fr as GetColumnData, ft as SchemaExtension, g as ConvexTimestampBuilderInitial, gi as or, gn as convexTable, gr as InsertValue, gt as OrmTriggerChange, h as ConvexTimestampBuilder, hi as notInArray, hn as TableConfig, hr as InferSelectModel, ht as OrmTableTriggers, i as getSchemaTriggers, ii as ilike, in as TableRelationalConfig, ir as AggregateFieldValue, it as OrmReaderCtx, j as date, jn as ConvexRankIndexBuilderOn, jr as ReturningSelection, jt as MigrationMigrateOne, k as ConvexDateBuilderInitial, ki as NotNull, kn as ConvexIndexBuilderOn, kr as ReturningAll, kt as MigrationDriftIssue, l as getTableColumns, li as like, ln as ConvexDeletionConfig, lr as CountResult, lt as scheduledMutationBatchFactory, m as vector, mi as notBetween, mn as OrmLifecycleOperation, mr as InferModelFromColumns, mt as OrmBeforeResult, n as defineSchema, ni as gt, nn as RelationsBuilderColumnBase, nr as text, nt as OrmClientWithApi$1, o as asc, oi as isFieldReference, on as defineRelations, or as BuildQueryResult, ot as ResolveOrmSchema, p as ConvexVectorBuilderInitial, pi as not, pn as OrmLifecycleChange, pr as InferInsertModel, pt as defineSchemaExtension, q as bigint, qn as ConvexForeignKeyConfig, qr as FilterExpression, qt as RlsContext, r as getSchemaRelations, ri as gte, rn as RelationsBuilderColumnConfig, rr as AggregateConfig, rt as OrmFunctions, s as desc, si as isNotNull, sn as defineRelationsPart, sr as BuildRelationResult, st as createOrm, t as WhereClauseResult, ti as fieldRef, tn as RelationsBuilder, tr as ConvexTextBuilderInitial, tt as OrmClientBase$1, u as getTableConfig, ui as lt, un as ConvexTable, ur as DBQueryConfig, ut as ScheduledDeleteArgs, v as timestamp, vi as AnyColumn, vn as discriminator, vr as MutationExecuteResult, vt as OrmTriggers, w as integer, wi as ColumnDataType, wn as RlsRoleConfig, wr as MutationRunMode, wt as MigrationAppliedState, x as textEnum, xi as ColumnBuilderRuntimeConfig, xn as RlsPolicyToOption, xr as MutationPaginatedResult, xt as MigrationRunArgs, y as ConvexTextEnumBuilder, yi as ColumnBuilder, yn as RlsPolicy, yr as MutationExecutionMode, yt as defineTriggers, z as ConvexBytesBuilder, zn as index, zr as OrmSchemaExtensions, zt as buildMigrationPlan } from "../where-clause-compiler-DdjN63Io.js";
1
+ import { $ as GenericOrmCtx$1, $n as unique, $r as endsWith, $t as ManyConfig, A as ConvexDateMode, An as ConvexRankIndexBuilder, Ar as ReturningResult, At as MigrationManifestEntry, B as ConvexBytesBuilderInitial, Bn as rankIndex, Br as OrmSchemaRelations, Bt as defineMigration, C as ConvexNumberBuilderInitial, Ci as ColumnBuilderWithTableName, Cn as RlsRole, Cr as MutationReturning, Ct as MigrationStatusArgs, D as id, Di as IsPrimaryKey, Dn as ConvexAggregateIndexBuilderOn, Dr as PaginatedResult, Dt as MigrationDoc, E as ConvexIdBuilderInitial, Ei as HasDefault, En as ConvexAggregateIndexBuilder, Er as OrderDirection, Et as MigrationDirection, F as custom, Fn as ConvexVectorIndexBuilder, Fr as unsetToken, Ft as MigrationStateMap, G as ConvexBigIntBuilder, Gn as ConvexCheckConfig, Gr as ExpressionVisitor, Gt as OrmReader$1, H as ConvexBooleanBuilder, Hn as uniqueIndex, Hr as TableName, Ht as detectMigrationDrift, I as json, In as ConvexVectorIndexBuilderOn, Ir as Brand, It as MigrationStep, J as CountBackfillChunkArgs, Jn as ConvexUniqueConstraintBuilder, Jr as LogicalExpression, Jt as RlsMode, K as ConvexBigIntBuilderInitial, Kn as ConvexForeignKeyBuilder, Kr as FieldReference, Kt as OrmWriter$1, L as objectOf, Ln as ConvexVectorIndexConfig, Lr as Columns, Lt as MigrationTableName, M as ConvexCustomBuilder, Mn as ConvexSearchIndexBuilder, Mr as UpdateSet, Mt as MigrationPlan, N as ConvexCustomBuilderInitial, Nn as ConvexSearchIndexBuilderOn, Nr as VectorQueryConfig, Nt as MigrationRunStatus, O as ConvexDateBuilder, Oi as IsUnique, On as ConvexIndexBuilder, Or as PredicateWhereIndexConfig, Ot as MigrationDocContext, P as arrayOf, Pn as ConvexSearchIndexConfig, Pr as VectorSearchProvider, Pt as MigrationSet, Q as GenericOrm$1, Qn as foreignKey, Qr as contains, Qt as ExtractTablesWithRelations, R as unionOf, Rn as aggregateIndex, Rr as OrmSchemaExtensionTables, Rt as MigrationWriteMode, S as ConvexNumberBuilder, Si as ColumnBuilderTypeConfig, Sn as rlsPolicy, Sr as MutationResult, St as MigrationRunChunkArgs, T as ConvexIdBuilder, Ti as DrizzleEntity, Tn as rlsRole, Tr as OrderByClause, Tt as MigrationDefinition, U as ConvexBooleanBuilderInitial, Un as vectorIndex, Ur as SystemFields, Ut as DatabaseWithMutations, V as bytes, Vn as searchIndex, Vr as OrmSchemaTriggers, Vt as defineMigrationSet, W as boolean, Wn as ConvexCheckBuilder, Wr as BinaryExpression, Wt as DatabaseWithQuery, X as CountBackfillStatusArgs, Xn as ConvexUniqueConstraintConfig, Xr as and, Xt as extractRelationsConfig, Y as CountBackfillKickoffArgs, Yn as ConvexUniqueConstraintBuilderOn, Yr as UnaryExpression, Yt as EdgeMetadata, Z as CreateOrmOptions, Zn as check, Zr as between, Zt as ExtractTablesFromSchema, _ as ConvexTimestampMode, _i as startsWith, _n as deletion, _r as MutationExecuteConfig, _t as OrmTriggerContext, a as requireSchemaRelations, ai as inArray, an as TablesRelationalConfig, ar as AggregateResult, at as OrmWriterCtx, b as ConvexTextEnumBuilderInitial, bi as ColumnBuilderBaseConfig, bn as RlsPolicyConfig, br as MutationPaginateConfig, bt as MigrationCancelArgs, c as TableConfigResult, ci as isNull, cn as ConvexDeletionBuilder, cr as CountConfig, ct as ScheduledMutationBatchArgs, d as OrmNotFoundError, di as lte, dn as ConvexTableWithColumns, dr as FilterOperators, dt as scheduledDeleteFactory, ei as eq, en as OneConfig, er as ConvexTextBuilder, et as OrmApiResult, f as ConvexVectorBuilder, fi as ne, fn as DiscriminatorBuilderConfig, fr as GetColumnData, ft as SchemaExtension, g as ConvexTimestampBuilderInitial, gi as or, gn as convexTable, gr as InsertValue, gt as OrmTriggerChange, h as ConvexTimestampBuilder, hi as notInArray, hn as TableConfig, hr as InferSelectModel, ht as OrmTableTriggers, i as getSchemaTriggers, ii as ilike, in as TableRelationalConfig, ir as AggregateFieldValue, it as OrmReaderCtx, j as date, jn as ConvexRankIndexBuilderOn, jr as ReturningSelection, jt as MigrationMigrateOne, k as ConvexDateBuilderInitial, ki as NotNull, kn as ConvexIndexBuilderOn, kr as ReturningAll, kt as MigrationDriftIssue, l as getTableColumns, li as like, ln as ConvexDeletionConfig, lr as CountResult, lt as scheduledMutationBatchFactory, m as vector, mi as notBetween, mn as OrmLifecycleOperation, mr as InferModelFromColumns, mt as OrmBeforeResult, n as defineSchema, ni as gt, nn as RelationsBuilderColumnBase, nr as text, nt as OrmClientWithApi$1, o as asc, oi as isFieldReference, on as defineRelations, or as BuildQueryResult, ot as ResolveOrmSchema, p as ConvexVectorBuilderInitial, pi as not, pn as OrmLifecycleChange, pr as InferInsertModel, pt as defineSchemaExtension, q as bigint, qn as ConvexForeignKeyConfig, qr as FilterExpression, qt as RlsContext, r as getSchemaRelations, ri as gte, rn as RelationsBuilderColumnConfig, rr as AggregateConfig, rt as OrmFunctions, s as desc, si as isNotNull, sn as defineRelationsPart, sr as BuildRelationResult, st as createOrm, t as WhereClauseResult, ti as fieldRef, tn as RelationsBuilder, tr as ConvexTextBuilderInitial, tt as OrmClientBase$1, u as getTableConfig, ui as lt, un as ConvexTable, ur as DBQueryConfig, ut as ScheduledDeleteArgs, v as timestamp, vi as AnyColumn, vn as discriminator, vr as MutationExecuteResult, vt as OrmTriggers, w as integer, wi as ColumnDataType, wn as RlsRoleConfig, wr as MutationRunMode, wt as MigrationAppliedState, x as textEnum, xi as ColumnBuilderRuntimeConfig, xn as RlsPolicyToOption, xr as MutationPaginatedResult, xt as MigrationRunArgs, y as ConvexTextEnumBuilder, yi as ColumnBuilder, yn as RlsPolicy, yr as MutationExecutionMode, yt as defineTriggers, z as ConvexBytesBuilder, zn as index, zr as OrmSchemaExtensions, zt as buildMigrationPlan } from "../where-clause-compiler-CuH2JNxb.js";
2
2
  import { i as pretendRequired, n as deprecated, r as pretend } from "../validators-vzRKjBJC.js";
3
3
  import { a as QueryCtxWithPreferredOrmQueryTable, i as QueryCtxWithOrmQueryTable, n as LookupByIdResultByCtx, o as getByIdWithOrmQueryFallback, r as QueryCtxWithOptionalOrmQueryTable, t as DocByCtx } from "../query-context-CFZqIvD7.js";
4
4
  import { DefineSchemaOptions, GenericDatabaseReader, GenericDatabaseWriter, GenericSchema, SchemaDefinition } from "convex/server";
@@ -1,2 +1,2 @@
1
- import { a as PluginConfigureResolver, i as PluginConfigureInput, n as PluginApiScope, o as definePlugin, r as PluginConfigureContext, s as resolvePluginOptions, t as Plugin } from "../middleware-BL2wn3s0.js";
1
+ import { a as PluginConfigureResolver, i as PluginConfigureInput, n as PluginApiScope, o as definePlugin, r as PluginConfigureContext, s as resolvePluginOptions, t as Plugin } from "../middleware-CU0mDiRs.js";
2
2
  export { type Plugin, type PluginApiScope, type PluginConfigureContext, type PluginConfigureInput, type PluginConfigureResolver, definePlugin, resolvePluginOptions };
@@ -1,6 +1,6 @@
1
1
  import { t as VRequired } from "./validators-vzRKjBJC.js";
2
- import { C as HttpProcedure, D as ProcedureMeta, R as getTransformer, S as HttpMethod, c as InferHttpInput, d as CRPCHttpRouter, j as DataTransformerOptions, l as InferHttpOutput, p as HttpRouterRecord, w as HttpProcedureBuilderDef, x as HttpHandlerOpts } from "./http-types-DqJubRPJ.js";
3
- import { d as Overwrite$1, i as IntersectIfDefined, m as UnsetMarker, o as MiddlewareBuilder, s as MiddlewareFunction, t as AnyMiddleware } from "./types-DEJpkIhw.js";
2
+ import { C as HttpProcedure, D as ProcedureMeta, R as getTransformer, S as HttpMethod, c as InferHttpInput, d as CRPCHttpRouter, j as DataTransformerOptions, l as InferHttpOutput, p as HttpRouterRecord, w as HttpProcedureBuilderDef, x as HttpHandlerOpts } from "./http-types-BS63Nsug.js";
3
+ import { d as Overwrite$1, i as IntersectIfDefined, m as UnsetMarker, o as MiddlewareBuilder, s as MiddlewareFunction, t as AnyMiddleware } from "./types-BqUIoMfT.js";
4
4
  import { ConvexError, GenericId, GenericValidator, ObjectType, OptionalProperty, PropertyValidators, VAny, VArray, VBoolean, VBytes, VFloat64, VId, VInt64, VLiteral, VNull, VObject, VOptional, VRecord, VString, VUnion, Validator } from "convex/values";
5
5
  import * as convex_server0 from "convex/server";
6
6
  import { ActionBuilder, ArgsArrayToObject, DefaultFunctionArgs, FunctionReference, FunctionReturnType, FunctionVisibility, GenericActionCtx, GenericDataModel, GenericMutationCtx, GenericQueryCtx, MutationBuilder, QueryBuilder, RegisteredAction, RegisteredMutation, RegisteredQuery, TableNamesInDataModel } from "convex/server";
@@ -1,5 +1,5 @@
1
- import { o as MiddlewareBuilder } from "../types-DEJpkIhw.js";
2
- import { t as Plugin } from "../middleware-BL2wn3s0.js";
1
+ import { o as MiddlewareBuilder } from "../types-BqUIoMfT.js";
2
+ import { t as Plugin } from "../middleware-CU0mDiRs.js";
3
3
  import * as convex_server0 from "convex/server";
4
4
 
5
5
  //#region src/ratelimit/duration.d.ts
@@ -203,7 +203,6 @@ declare const RatelimitPlugin: Plugin<"ratelimit", AnyRatelimitPluginOptions, An
203
203
  [x: string]: any;
204
204
  [x: number]: any;
205
205
  [x: symbol]: any;
206
- api: Record<string, unknown> & Record<"ratelimit", AnyRatelimitPluginOptions>;
207
206
  }, unknown>;
208
207
  }, "middleware">>;
209
208
  //#endregion
@@ -1,7 +1,7 @@
1
1
  import { n as DeepPartial, o as Simplify, r as DistributiveOmit } from "../types-BTb_4BaU.js";
2
- import { C as HttpProcedure, d as CRPCHttpRouter, j as DataTransformerOptions, p as HttpRouterRecord } from "../http-types-DqJubRPJ.js";
3
- import { m as UnsetMarker } from "../types-DEJpkIhw.js";
4
- import { A as HttpInputArgs, C as ReservedMutationOptions$1, S as ReservedInfiniteQueryOptions, T as StaticQueryOptsParam, _ as IsPaginated, b as PaginatedFnMeta, c as ConvexMutationKey, d as ConvexQueryMeta, f as EmptyObject, g as InfiniteQueryInput, l as ConvexQueryHookOptions, m as FUNC_REF_SYMBOL, o as ConvexActionKey, p as ExtractPaginatedItem, s as ConvexInfiniteQueryMeta, u as ConvexQueryKey, w as ReservedQueryOptions$1, y as MutationVariables } from "../types-BLvtq_eH.js";
2
+ import { C as HttpProcedure, d as CRPCHttpRouter, j as DataTransformerOptions, p as HttpRouterRecord } from "../http-types-BS63Nsug.js";
3
+ import { m as UnsetMarker } from "../types-BqUIoMfT.js";
4
+ import { A as HttpInputArgs, C as ReservedMutationOptions$1, S as ReservedInfiniteQueryOptions, T as StaticQueryOptsParam, _ as IsPaginated, b as PaginatedFnMeta, c as ConvexMutationKey, d as ConvexQueryMeta, f as EmptyObject, g as InfiniteQueryInput, l as ConvexQueryHookOptions, m as FUNC_REF_SYMBOL, o as ConvexActionKey, p as ExtractPaginatedItem, s as ConvexInfiniteQueryMeta, u as ConvexQueryKey, w as ReservedQueryOptions$1, y as MutationVariables } from "../types-DrB2VeNb.js";
5
5
  import { FunctionArgs, FunctionReference, FunctionReturnType } from "convex/server";
6
6
  import { z } from "zod";
7
7
  import { DefaultError, QueryFilters, SkipToken, UseMutationOptions, UseQueryOptions } from "@tanstack/react-query";
@@ -1,5 +1,5 @@
1
- import { $ as initCRPC, A as getCRPCErrorFromUnknown, B as CallerMeta, C as WithHttpRouter, D as CRPCErrorCode, E as CRPCError, F as createEnv, G as createGeneratedFunctionReference, H as ServerCaller, I as ConvexContext, J as CRPCFunctionTypeHint, K as getGeneratedValue, L as createCallerFactory, M as isCRPCError, N as toCRPCError, O as CRPC_ERROR_CODES_BY_KEY, P as CreateEnvOptions, Q as createMiddlewareFactory, R as LazyCaller, S as typedProcedureResolver, St as zodToConvexFields, T as inferApiOutputs, U as createServerCaller, V as CallerOpts, W as createApiLeaf, X as ProcedureBuilder, Y as MutationProcedureBuilder, Z as QueryProcedureBuilder, _ as createGenericHandlerFactory, _t as zCustomQuery, a as GeneratedRegistryCallerForContext, at as ConvexValidatorFromZod, b as defineProcedure, bt as zodOutputToConvexFields, c as ProcedureActionCallerFromRegistry, ct as ZCustomCtx, d as ProcedureDefinition, dt as ZodValidatorFromConvex, et as HttpProcedureBuilder, f as ProcedureFromFunctionReference, ft as convexToZod, g as createGenericCallerFactory, gt as zCustomMutation, h as createGeneratedRegistryRuntime, ht as zCustomAction, i as GeneratedRegistryCallerFactory, it as matchPathParams, j as getHTTPStatusCodeFromError, k as CRPC_ERROR_CODE_TO_HTTP, l as ProcedureCaller, lt as Zid, m as ProcedureScheduleCallerFromRegistry, mt as withSystemFields, n as GeneratedProcedureRegistry, nt as extractPathParams, o as GeneratedRegistryHandlerFactory, ot as ConvexValidatorFromZodOutput, p as ProcedureSchedulableCallerFromRegistry, pt as convexToZodFields, q as ActionProcedureBuilder, r as GeneratedProcedureRegistryEntry, rt as handleHttpError, s as GeneratedRegistryHandlerForContext, st as CustomBuilder, t as CreateProcedureCallerFactoryOptions, tt as createHttpProcedureBuilder, u as ProcedureCallerFromRegistry, ut as ZodFromValidatorBase, v as createProcedureCallerFactory, vt as zid, w as inferApiInputs, x as getGeneratedFunctionReference, xt as zodToConvex, y as createProcedureHandlerFactory, yt as zodOutputToConvex, z as createLazyCaller } from "../procedure-caller-DtxLmGwA.js";
2
- import { C as HttpProcedure, D as ProcedureMeta, E as InferHttpInput, S as HttpMethod, T as HttpRouteDefinition, _ as extractRouteMap, b as HttpActionHandler, d as CRPCHttpRouter, f as HttpRouterDef, g as createHttpRouterFactory, h as createHttpRouter, m as HttpRouterWithHono, p as HttpRouterRecord, v as CRPCHonoHandler, w as HttpProcedureBuilderDef, x as HttpHandlerOpts, y as HttpActionConstructor } from "../http-types-DqJubRPJ.js";
3
- import { a as MergeZodObjects, c as MiddlewareMarker, d as Overwrite, f as ResolveIfSet, i as IntersectIfDefined, l as MiddlewareNext, m as UnsetMarker, n as AnyMiddlewareBuilder, o as MiddlewareBuilder, p as Simplify, r as GetRawInputFn, s as MiddlewareFunction, t as AnyMiddleware, u as MiddlewareResult } from "../types-DEJpkIhw.js";
1
+ import { $ as initCRPC, A as getCRPCErrorFromUnknown, B as CallerMeta, C as WithHttpRouter, D as CRPCErrorCode, E as CRPCError, F as createEnv, G as createGeneratedFunctionReference, H as ServerCaller, I as ConvexContext, J as CRPCFunctionTypeHint, K as getGeneratedValue, L as createCallerFactory, M as isCRPCError, N as toCRPCError, O as CRPC_ERROR_CODES_BY_KEY, P as CreateEnvOptions, Q as createMiddlewareFactory, R as LazyCaller, S as typedProcedureResolver, St as zodToConvexFields, T as inferApiOutputs, U as createServerCaller, V as CallerOpts, W as createApiLeaf, X as ProcedureBuilder, Y as MutationProcedureBuilder, Z as QueryProcedureBuilder, _ as createGenericHandlerFactory, _t as zCustomQuery, a as GeneratedRegistryCallerForContext, at as ConvexValidatorFromZod, b as defineProcedure, bt as zodOutputToConvexFields, c as ProcedureActionCallerFromRegistry, ct as ZCustomCtx, d as ProcedureDefinition, dt as ZodValidatorFromConvex, et as HttpProcedureBuilder, f as ProcedureFromFunctionReference, ft as convexToZod, g as createGenericCallerFactory, gt as zCustomMutation, h as createGeneratedRegistryRuntime, ht as zCustomAction, i as GeneratedRegistryCallerFactory, it as matchPathParams, j as getHTTPStatusCodeFromError, k as CRPC_ERROR_CODE_TO_HTTP, l as ProcedureCaller, lt as Zid, m as ProcedureScheduleCallerFromRegistry, mt as withSystemFields, n as GeneratedProcedureRegistry, nt as extractPathParams, o as GeneratedRegistryHandlerFactory, ot as ConvexValidatorFromZodOutput, p as ProcedureSchedulableCallerFromRegistry, pt as convexToZodFields, q as ActionProcedureBuilder, r as GeneratedProcedureRegistryEntry, rt as handleHttpError, s as GeneratedRegistryHandlerForContext, st as CustomBuilder, t as CreateProcedureCallerFactoryOptions, tt as createHttpProcedureBuilder, u as ProcedureCallerFromRegistry, ut as ZodFromValidatorBase, v as createProcedureCallerFactory, vt as zid, w as inferApiInputs, x as getGeneratedFunctionReference, xt as zodToConvex, y as createProcedureHandlerFactory, yt as zodOutputToConvex, z as createLazyCaller } from "../procedure-caller-C15h5Iel.js";
2
+ import { C as HttpProcedure, D as ProcedureMeta, E as InferHttpInput, S as HttpMethod, T as HttpRouteDefinition, _ as extractRouteMap, b as HttpActionHandler, d as CRPCHttpRouter, f as HttpRouterDef, g as createHttpRouterFactory, h as createHttpRouter, m as HttpRouterWithHono, p as HttpRouterRecord, v as CRPCHonoHandler, w as HttpProcedureBuilderDef, x as HttpHandlerOpts, y as HttpActionConstructor } from "../http-types-BS63Nsug.js";
3
+ import { a as MergeZodObjects, c as MiddlewareMarker, d as Overwrite, f as ResolveIfSet, i as IntersectIfDefined, l as MiddlewareNext, m as UnsetMarker, n as AnyMiddlewareBuilder, o as MiddlewareBuilder, p as Simplify, r as GetRawInputFn, s as MiddlewareFunction, t as AnyMiddleware, u as MiddlewareResult } from "../types-BqUIoMfT.js";
4
4
  import { a as isQueryCtx, c as requireMutationCtx, i as isMutationCtx, l as requireQueryCtx, n as RunMutationCtx, o as isRunMutationCtx, r as isActionCtx, s as requireActionCtx, t as GenericCtx, u as requireRunMutationCtx } from "../context-utils-HPC5nXzx.js";
5
5
  export { ActionProcedureBuilder, AnyMiddleware, AnyMiddlewareBuilder, CRPCError, CRPCErrorCode, CRPCFunctionTypeHint, CRPCHonoHandler, CRPCHttpRouter, CRPC_ERROR_CODES_BY_KEY, CRPC_ERROR_CODE_TO_HTTP, CallerMeta, CallerOpts, ConvexContext, ConvexValidatorFromZod, ConvexValidatorFromZodOutput, CreateEnvOptions, CreateProcedureCallerFactoryOptions, CustomBuilder, GeneratedProcedureRegistry, GeneratedProcedureRegistryEntry, GeneratedRegistryCallerFactory, GeneratedRegistryCallerForContext, GeneratedRegistryHandlerFactory, GeneratedRegistryHandlerForContext, GenericCtx, GetRawInputFn, HttpActionConstructor, HttpActionHandler, HttpHandlerOpts, HttpMethod, HttpProcedure, HttpProcedureBuilder, HttpProcedureBuilderDef, HttpRouteDefinition, HttpRouterDef, HttpRouterRecord, HttpRouterWithHono, InferHttpInput, IntersectIfDefined, LazyCaller, MergeZodObjects, MiddlewareBuilder, MiddlewareFunction, MiddlewareMarker, MiddlewareNext, MiddlewareResult, MutationProcedureBuilder, Overwrite, ProcedureActionCallerFromRegistry, ProcedureBuilder, ProcedureCaller, ProcedureCallerFromRegistry, ProcedureDefinition, ProcedureFromFunctionReference, ProcedureMeta, ProcedureSchedulableCallerFromRegistry, ProcedureScheduleCallerFromRegistry, QueryProcedureBuilder, ResolveIfSet, RunMutationCtx, ServerCaller, Simplify, UnsetMarker, WithHttpRouter, ZCustomCtx, Zid, ZodFromValidatorBase, ZodValidatorFromConvex, convexToZod, convexToZodFields, createApiLeaf, createCallerFactory, createEnv, createGeneratedFunctionReference, createGeneratedRegistryRuntime, createGenericCallerFactory, createGenericHandlerFactory, createHttpProcedureBuilder, createHttpRouter, createHttpRouterFactory, createLazyCaller, createMiddlewareFactory, createProcedureCallerFactory, createProcedureHandlerFactory, createServerCaller, defineProcedure, extractPathParams, extractRouteMap, getCRPCErrorFromUnknown, getGeneratedFunctionReference, getGeneratedValue, getHTTPStatusCodeFromError, handleHttpError, inferApiInputs, inferApiOutputs, initCRPC, isActionCtx, isCRPCError, isMutationCtx, isQueryCtx, isRunMutationCtx, matchPathParams, requireActionCtx, requireMutationCtx, requireQueryCtx, requireRunMutationCtx, toCRPCError, typedProcedureResolver, withSystemFields, zCustomAction, zCustomMutation, zCustomQuery, zid, zodOutputToConvex, zodOutputToConvexFields, zodToConvex, zodToConvexFields };
@@ -40,17 +40,22 @@ type MiddlewareResult<TContext> = {
40
40
  };
41
41
  /** Function to get raw input before validation */
42
42
  type GetRawInputFn = () => Promise<unknown>;
43
+ type CurrentMiddlewareContext<TContext, TContextOverridesIn> = Simplify<Overwrite<TContext, TContextOverridesIn>>;
44
+ type ChangedKeys<TCurrent, TNext> = { [K in keyof TNext]: K extends keyof TCurrent ? [TNext[K]] extends [TCurrent[K]] ? [TCurrent[K]] extends [TNext[K]] ? never : K : K : K }[keyof TNext];
45
+ type ContextOverridesFromNext<TCurrent, TNext> = TNext extends object ? Simplify<Pick<TNext, ChangedKeys<TCurrent, TNext>>> extends infer TDiff ? keyof TDiff extends never ? UnsetMarker : TDiff : never : TNext;
43
46
  /**
44
47
  * Next function overloads - key to automatic context and input inference
45
48
  * Matches tRPC's pattern: can modify context, input, or both
46
49
  */
47
- type MiddlewareNext<TContextOverridesIn> = {
48
- /** Continue without modification - passes through existing overrides */(): Promise<MiddlewareResult<TContextOverridesIn>>; /** Continue with modified context and/or input */
49
- <$ContextOverride>(opts: {
50
- ctx?: $ContextOverride;
51
- input?: unknown;
52
- }): Promise<MiddlewareResult<$ContextOverride>>;
53
- };
50
+ /**
51
+ * Continue middleware execution with optional ctx/input changes.
52
+ * When ctx includes the current context plus extra fields, only the delta is
53
+ * carried forward as middleware overrides.
54
+ */
55
+ type MiddlewareNext<TContext, TContextOverridesIn> = <TNextContext extends object = CurrentMiddlewareContext<TContext, TContextOverridesIn>>(opts?: {
56
+ ctx?: TNextContext;
57
+ input?: unknown;
58
+ }) => Promise<MiddlewareResult<Overwrite<TContextOverridesIn, ContextOverridesFromNext<CurrentMiddlewareContext<TContext, TContextOverridesIn>, TNextContext>>>>;
54
59
  /**
55
60
  * Middleware function signature with input access (tRPC-compatible)
56
61
  *
@@ -61,11 +66,11 @@ type MiddlewareNext<TContextOverridesIn> = {
61
66
  * @typeParam TInputOut - Parsed input type (unknown if before .input(), typed if after)
62
67
  */
63
68
  type MiddlewareFunction<TContext, TMeta, TContextOverridesIn, $ContextOverridesOut, TInputOut = unknown> = (opts: {
64
- ctx: Simplify<Overwrite<TContext, TContextOverridesIn>>;
69
+ ctx: CurrentMiddlewareContext<TContext, TContextOverridesIn>;
65
70
  meta: TMeta;
66
71
  input: TInputOut;
67
72
  getRawInput: GetRawInputFn;
68
- next: MiddlewareNext<TContextOverridesIn>;
73
+ next: MiddlewareNext<TContext, TContextOverridesIn>;
69
74
  }) => Promise<MiddlewareResult<$ContextOverridesOut>>;
70
75
  /** Stored middleware with type info erased for runtime */
71
76
  type AnyMiddleware = MiddlewareFunction<any, any, any, any, any>;
@@ -1,4 +1,4 @@
1
- import { O as CombinedDataTransformer, n as HttpClientError } from "./http-types-DqJubRPJ.js";
1
+ import { O as CombinedDataTransformer, n as HttpClientError } from "./http-types-BS63Nsug.js";
2
2
  import { FunctionArgs, FunctionReference, FunctionReturnType } from "convex/server";
3
3
 
4
4
  //#region src/crpc/http-client.d.ts
package/dist/watcher.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { A as resolveConfiguredBackend, Ct as getConvexConfig, P as resolveRunDeps, St as generateMeta, wt as logger } from "./backend-core-7NEZ71jw.mjs";
2
+ import { A as resolveConfiguredBackend, Ct as getConvexConfig, P as resolveRunDeps, St as generateMeta, wt as logger } from "./backend-core-DA9iT-To.mjs";
3
3
  import path from "node:path";
4
4
  import { fileURLToPath } from "node:url";
5
5
 
@@ -3992,11 +3992,7 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
3992
3992
  readonly aggregate_extrema: ConvexTableWithColumns<{
3993
3993
  name: "aggregate_extrema";
3994
3994
  columns: {
3995
- value: ConvexCustomBuilderInitial<"", convex_values0.VAny<any, "required", string>> & {
3996
- _: {
3997
- $type: convex_values0.Value;
3998
- };
3999
- } & {
3995
+ count: ConvexNumberBuilderInitial<""> & {
4000
3996
  _: {
4001
3997
  notNull: true;
4002
3998
  };
@@ -4006,10 +4002,14 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
4006
4002
  };
4007
4003
  } & {
4008
4004
  _: {
4009
- fieldName: "value";
4005
+ fieldName: "count";
4010
4006
  };
4011
4007
  };
4012
- count: ConvexNumberBuilderInitial<""> & {
4008
+ value: ConvexCustomBuilderInitial<"", convex_values0.VAny<any, "required", string>> & {
4009
+ _: {
4010
+ $type: convex_values0.Value;
4011
+ };
4012
+ } & {
4013
4013
  _: {
4014
4014
  notNull: true;
4015
4015
  };
@@ -4019,7 +4019,7 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
4019
4019
  };
4020
4020
  } & {
4021
4021
  _: {
4022
- fieldName: "count";
4022
+ fieldName: "value";
4023
4023
  };
4024
4024
  };
4025
4025
  tableKey: ConvexTextBuilderInitial<""> & {
@@ -4398,22 +4398,22 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
4398
4398
  readonly migration_state: ConvexTableWithColumns<{
4399
4399
  name: "migration_state";
4400
4400
  columns: {
4401
- cursor: ConvexTextBuilderInitial<""> & {
4401
+ direction: ConvexTextBuilderInitial<""> & {
4402
4402
  _: {
4403
4403
  tableName: "migration_state";
4404
4404
  };
4405
4405
  } & {
4406
4406
  _: {
4407
- fieldName: "cursor";
4407
+ fieldName: "direction";
4408
4408
  };
4409
4409
  };
4410
- direction: ConvexTextBuilderInitial<""> & {
4410
+ cursor: ConvexTextBuilderInitial<""> & {
4411
4411
  _: {
4412
4412
  tableName: "migration_state";
4413
4413
  };
4414
4414
  } & {
4415
4415
  _: {
4416
- fieldName: "direction";
4416
+ fieldName: "cursor";
4417
4417
  };
4418
4418
  };
4419
4419
  status: ConvexTextBuilderInitial<""> & {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kitcn",
3
- "version": "0.12.14",
3
+ "version": "0.12.16",
4
4
  "description": "kitcn - React Query integration and CLI tools for Convex",
5
5
  "keywords": [
6
6
  "convex",
@@ -227,7 +227,8 @@ Builder rules that matter:
227
227
  1. Build `public`, `optional`, `auth`, and `private` procedure families once in `convex/lib/crpc.ts`.
228
228
  2. `.meta(...)` is client-visible via generated API metadata. Never put secrets there.
229
229
  3. Resolve session/user once in middleware. Do not re-fetch auth state in every procedure.
230
- 4. Keep deeper auth/runtime edge cases in `references/setup/server.md` and `references/features/auth*.md`.
230
+ 4. Shared `c.middleware()` chains preserve mutation writer types on mutation procedures. If the middleware itself performs writes, type it as mutation-only with `c.middleware<MutationCtx>(...)`.
231
+ 5. Keep deeper auth/runtime edge cases in `references/setup/server.md` and `references/features/auth*.md`.
231
232
 
232
233
  ### 3) Query + Mutation Procedure Template
233
234