kitcn 0.12.18 → 0.12.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/dist/aggregate/index.d.ts +1 -1
  2. package/dist/{api-entry-BckXqaLb.js → api-entry-BMCQSsCw.js} +6 -1
  3. package/dist/auth/generated/index.d.ts +1 -1
  4. package/dist/auth/index.d.ts +13 -13
  5. package/dist/auth/index.js +1 -1
  6. package/dist/auth/nextjs/index.d.ts +1 -1
  7. package/dist/{backend-core-CGjsBIOp.mjs → backend-core-C0uwGXLx.mjs} +107 -14
  8. package/dist/{builder-Bh18Y2t0.js → builder-Cb6gloDB.js} +160 -6
  9. package/dist/cli.mjs +1 -1
  10. package/dist/{context-utils-HPC5nXzx.d.ts → context-utils-BvWW0Ilq.d.ts} +8 -1
  11. package/dist/crpc/index.d.ts +2 -2
  12. package/dist/{generated-contract-disabled-Dzx2IRId.d.ts → generated-contract-disabled-UsFjh8jz.d.ts} +30 -30
  13. package/dist/{http-types-BS63Nsug.d.ts → http-types-BLFA9zS7.d.ts} +2 -1
  14. package/dist/{middleware-C5P1Q29c.js → middleware-DkIhQXwg.js} +1 -1
  15. package/dist/{middleware-CU0mDiRs.d.ts → middleware-nS_qXecO.d.ts} +1 -1
  16. package/dist/orm/index.d.ts +1 -1
  17. package/dist/plugins/index.d.ts +1 -1
  18. package/dist/plugins/index.js +1 -1
  19. package/dist/{procedure-caller-DL0Ubgky.js → procedure-caller-AjLfkHyF.js} +1 -1
  20. package/dist/{procedure-caller-DloN1DNv.d.ts → procedure-name-D-fDCBlo.d.ts} +28 -128
  21. package/dist/ratelimit/index.d.ts +2 -2
  22. package/dist/ratelimit/index.js +3 -3
  23. package/dist/rsc/index.d.ts +3 -3
  24. package/dist/server/index.d.ts +5 -5
  25. package/dist/server/index.js +4 -4
  26. package/dist/{types-DrB2VeNb.d.ts → types-C6pQrnzD.d.ts} +1 -1
  27. package/dist/{types-BqUIoMfT.d.ts → types-a-RHmrDZ.d.ts} +9 -1
  28. package/dist/watcher.mjs +12 -9
  29. package/dist/{where-clause-compiler-Dw3EVdi6.d.ts → where-clause-compiler-CuH2JNxb.d.ts} +30 -30
  30. package/package.json +1 -1
  31. package/skills/convex/SKILL.md +5 -4
  32. package/skills/convex/references/features/auth-organizations.md +7 -2
@@ -925,9 +925,19 @@ function createNewHttpBuilder(def1, def2) {
925
925
  ...def2
926
926
  });
927
927
  }
928
+ function resolveHttpProcedureInfo(def) {
929
+ const route = def.route;
930
+ return {
931
+ type: "httpAction",
932
+ name: def.procedureName ?? (route ? `${route.method} ${route.path}` : void 0),
933
+ method: route?.method,
934
+ path: route?.path
935
+ };
936
+ }
928
937
  /** Internal method to create the HTTP procedure */
929
938
  function createProcedure(def, handler, _type) {
930
939
  if (!def.route) throw new Error("Route must be defined before action. Use .route(path, method) first.");
940
+ const middlewareProcedure = resolveHttpProcedureInfo(def);
931
941
  /**
932
942
  * Hono-compatible handler function.
933
943
  * When used with HttpRouterWithHono, Convex ctx is passed via c.env.
@@ -947,6 +957,7 @@ function createProcedure(def, handler, _type) {
947
957
  for (const middleware of def.middlewares) {
948
958
  const result = await middleware({
949
959
  ctx,
960
+ procedure: middlewareProcedure,
950
961
  input: currentInput,
951
962
  getRawInput,
952
963
  next: async (opts) => {
@@ -1092,6 +1103,9 @@ function createHttpBuilder(def) {
1092
1103
  ...value
1093
1104
  } : value });
1094
1105
  },
1106
+ name(value) {
1107
+ return createNewHttpBuilder(def, { procedureName: value });
1108
+ },
1095
1109
  route(path, method) {
1096
1110
  const pathParamNames = extractPathParams(path);
1097
1111
  return createNewHttpBuilder(def, { route: {
@@ -1363,6 +1377,117 @@ function extractRouteMap(procedures) {
1363
1377
  return result;
1364
1378
  }
1365
1379
 
1380
+ //#endregion
1381
+ //#region src/server/procedure-name.ts
1382
+ const LOOKUP_KEY = "__KITCN_PROCEDURE_NAME_LOOKUP__";
1383
+ const HINTS_KEY = "__KITCN_PROCEDURE_NAME_HINTS__";
1384
+ const PATH_SEPARATOR_RE = /\\/g;
1385
+ const TRIM_SLASHES_RE = /^\/+|\/+$/g;
1386
+ const PACKAGE_FRAME_MARKERS = ["/node_modules/kitcn/", "/packages/kitcn/"];
1387
+ function decodeFileName(value) {
1388
+ if (!value.startsWith("file://")) return value;
1389
+ try {
1390
+ return decodeURIComponent(new URL(value).pathname);
1391
+ } catch {
1392
+ return value;
1393
+ }
1394
+ }
1395
+ function normalizePath(value) {
1396
+ return value.replace(PATH_SEPARATOR_RE, "/");
1397
+ }
1398
+ function normalizeHint(value) {
1399
+ return normalizePath(value).replace(TRIM_SLASHES_RE, "");
1400
+ }
1401
+ function getGlobalLookup() {
1402
+ const globalScope = globalThis;
1403
+ const existing = globalScope[LOOKUP_KEY];
1404
+ if (existing && typeof existing === "object") return existing;
1405
+ const lookup = {};
1406
+ globalScope[LOOKUP_KEY] = lookup;
1407
+ return lookup;
1408
+ }
1409
+ function getGlobalHints() {
1410
+ const globalScope = globalThis;
1411
+ const existing = globalScope[HINTS_KEY];
1412
+ if (Array.isArray(existing)) return existing;
1413
+ const hints = [];
1414
+ globalScope[HINTS_KEY] = hints;
1415
+ return hints;
1416
+ }
1417
+ function registerProcedureNameLookup(lookup, functionsDirHint) {
1418
+ const globalLookup = getGlobalLookup();
1419
+ for (const [relativeFilePath, entries] of Object.entries(lookup)) {
1420
+ const key = normalizePath(relativeFilePath);
1421
+ const existing = globalLookup[key] ?? [];
1422
+ const deduped = /* @__PURE__ */ new Map();
1423
+ for (const entry of [...existing, ...entries]) deduped.set(`${entry.line}:${entry.column}:${entry.name}`, entry);
1424
+ globalLookup[key] = [...deduped.values()].sort((left, right) => left.line - right.line || left.column - right.column || left.name.localeCompare(right.name));
1425
+ }
1426
+ const normalizedHint = normalizeHint(functionsDirHint);
1427
+ if (!normalizedHint) return;
1428
+ const hints = getGlobalHints();
1429
+ if (!hints.includes(normalizedHint)) {
1430
+ hints.push(normalizedHint);
1431
+ hints.sort((left, right) => right.length - left.length);
1432
+ }
1433
+ }
1434
+ function isPackageFrame(filePath) {
1435
+ const normalized = normalizePath(filePath);
1436
+ return PACKAGE_FRAME_MARKERS.some((marker) => normalized.includes(marker));
1437
+ }
1438
+ function captureCallsite() {
1439
+ const originalPrepareStackTrace = Error.prepareStackTrace;
1440
+ try {
1441
+ Error.prepareStackTrace = (_error, stack) => stack;
1442
+ const frames = (/* @__PURE__ */ new Error("Capture procedure callsite for middleware name inference.")).stack;
1443
+ for (const frame of frames ?? []) {
1444
+ const rawFileName = frame.getFileName?.();
1445
+ if (!rawFileName) continue;
1446
+ const filePath = normalizePath(decodeFileName(rawFileName));
1447
+ if (filePath.startsWith("node:") || isPackageFrame(filePath)) continue;
1448
+ const line = frame.getLineNumber?.();
1449
+ const column = frame.getColumnNumber?.();
1450
+ if (!line || !column) continue;
1451
+ return {
1452
+ filePath,
1453
+ line,
1454
+ column
1455
+ };
1456
+ }
1457
+ } catch {
1458
+ return;
1459
+ } finally {
1460
+ Error.prepareStackTrace = originalPrepareStackTrace;
1461
+ }
1462
+ }
1463
+ function resolveRelativeFilePath(filePath) {
1464
+ const normalizedFilePath = normalizePath(filePath);
1465
+ const hints = getGlobalHints();
1466
+ for (const hint of hints) {
1467
+ const marker = `/${hint}/`;
1468
+ const markerIndex = normalizedFilePath.lastIndexOf(marker);
1469
+ if (markerIndex >= 0) return normalizedFilePath.slice(markerIndex + marker.length);
1470
+ if (normalizedFilePath.startsWith(`${hint}/`)) return normalizedFilePath.slice(hint.length + 1);
1471
+ }
1472
+ }
1473
+ function findBestEntry(entries, location) {
1474
+ const sameLine = entries.filter((entry) => entry.line === location.line);
1475
+ if (sameLine.length === 0) return;
1476
+ return sameLine.reduce((best, entry) => {
1477
+ const bestDistance = Math.abs(best.column - location.column);
1478
+ return Math.abs(entry.column - location.column) < bestDistance ? entry : best;
1479
+ });
1480
+ }
1481
+ function inferProcedureNameFromCallsite() {
1482
+ const location = captureCallsite();
1483
+ if (!location) return;
1484
+ const relativeFilePath = resolveRelativeFilePath(location.filePath);
1485
+ if (!relativeFilePath) return;
1486
+ const entries = getGlobalLookup()[relativeFilePath];
1487
+ if (!entries || entries.length === 0) return;
1488
+ return findBestEntry(entries, location)?.name;
1489
+ }
1490
+
1366
1491
  //#endregion
1367
1492
  //#region src/server/builder.ts
1368
1493
  /**
@@ -1408,8 +1533,15 @@ function createMiddlewareFactory() {
1408
1533
  return createMiddlewareInner([fn]);
1409
1534
  };
1410
1535
  }
1536
+ const FUNCTION_NAME_SYMBOL = Symbol.for("functionName");
1537
+ const resolveProcedureInfo = (type, procedureName, procedureFn) => {
1538
+ return {
1539
+ type,
1540
+ name: (procedureFn && typeof procedureFn === "object" && typeof procedureFn[FUNCTION_NAME_SYMBOL] === "string" ? procedureFn[FUNCTION_NAME_SYMBOL] : void 0) ?? procedureName
1541
+ };
1542
+ };
1411
1543
  /** Execute middleware chain recursively with input access */
1412
- async function executeMiddlewares(middlewares, ctx, meta, input, getRawInput, index = 0) {
1544
+ async function executeMiddlewares(middlewares, ctx, meta, procedure, input, getRawInput, index = 0) {
1413
1545
  if (index >= middlewares.length) return {
1414
1546
  marker: void 0,
1415
1547
  ctx,
@@ -1421,13 +1553,14 @@ async function executeMiddlewares(middlewares, ctx, meta, input, getRawInput, in
1421
1553
  const nextCtx = opts?.ctx ?? ctx;
1422
1554
  const nextInput = opts?.input ?? currentInput;
1423
1555
  if (opts?.input !== void 0) currentInput = opts.input;
1424
- return await executeMiddlewares(middlewares, nextCtx, meta, nextInput, getRawInput, index + 1);
1556
+ return await executeMiddlewares(middlewares, nextCtx, meta, procedure, nextInput, getRawInput, index + 1);
1425
1557
  };
1426
1558
  return {
1427
1559
  marker: void 0,
1428
1560
  ctx: (await middleware({
1429
1561
  ctx,
1430
1562
  meta,
1563
+ procedure,
1431
1564
  input,
1432
1565
  getRawInput,
1433
1566
  next
@@ -1630,6 +1763,13 @@ var ProcedureBuilder = class {
1630
1763
  } : value
1631
1764
  };
1632
1765
  }
1766
+ /** Set server-only procedure name for middleware/logging */
1767
+ _name(value) {
1768
+ return {
1769
+ ...this._def,
1770
+ procedureName: value
1771
+ };
1772
+ }
1633
1773
  /** Merge all input schemas into one */
1634
1774
  _getMergedInput() {
1635
1775
  const { inputSchemas } = this._def;
@@ -1637,7 +1777,7 @@ var ProcedureBuilder = class {
1637
1777
  return Object.assign({}, ...inputSchemas);
1638
1778
  }
1639
1779
  _createFunction(handler, baseFunction, customFn, fnType) {
1640
- const { middlewares, outputSchema, meta, functionConfig, isInternal } = this._def;
1780
+ const { middlewares, outputSchema, meta, procedureName, functionConfig, isInternal } = this._def;
1641
1781
  const mergedInput = this._getMergedInput();
1642
1782
  const inputSchema = mergedInput ? z.object(mergedInput) : void 0;
1643
1783
  const convexArgs = resolveConvexArgsShape(mergedInput);
@@ -1646,7 +1786,9 @@ var ProcedureBuilder = class {
1646
1786
  const typedReturnsSchema = returnsSchema;
1647
1787
  const typedArgs = convexArgs ?? {};
1648
1788
  const shouldValidateOutputWithZod = !!outputSchema && returnsSchema !== outputSchema;
1649
- const fn = customFunction({
1789
+ const resolvedProcedureName = procedureName ?? inferProcedureNameFromCallsite();
1790
+ let fn;
1791
+ fn = customFunction({
1650
1792
  args: typedArgs,
1651
1793
  ...typedReturnsSchema ? { returns: typedReturnsSchema } : {},
1652
1794
  handler: async (ctx, rawInput) => {
@@ -1654,7 +1796,7 @@ var ProcedureBuilder = class {
1654
1796
  const parsedInput = inputSchema ? inputSchema.parse(decodedInput) : decodedInput;
1655
1797
  const getRawInput = async () => parsedInput;
1656
1798
  try {
1657
- const result = await executeMiddlewares(middlewares, ctx, meta, parsedInput, getRawInput);
1799
+ const result = await executeMiddlewares(middlewares, ctx, meta, resolveProcedureInfo(fnType, resolvedProcedureName, fn), parsedInput, getRawInput);
1658
1800
  const handlerInput = result.input === parsedInput ? parsedInput : functionConfig.transformer.input.deserialize(result.input ?? parsedInput);
1659
1801
  const output = await handler({
1660
1802
  ctx: result.ctx,
@@ -1696,6 +1838,10 @@ var QueryProcedureBuilder = class QueryProcedureBuilder extends ProcedureBuilder
1696
1838
  meta(value) {
1697
1839
  return new QueryProcedureBuilder(this._meta(value));
1698
1840
  }
1841
+ /** Set a server-only procedure name for middleware/logging */
1842
+ name(value) {
1843
+ return new QueryProcedureBuilder(this._name(value));
1844
+ }
1699
1845
  /** Define input schema (chainable - schemas are merged) */
1700
1846
  input(schema) {
1701
1847
  return new QueryProcedureBuilder(this._input(schema));
@@ -1768,6 +1914,10 @@ var MutationProcedureBuilder = class MutationProcedureBuilder extends ProcedureB
1768
1914
  meta(value) {
1769
1915
  return new MutationProcedureBuilder(this._meta(value));
1770
1916
  }
1917
+ /** Set a server-only procedure name for middleware/logging */
1918
+ name(value) {
1919
+ return new MutationProcedureBuilder(this._name(value));
1920
+ }
1771
1921
  /** Define input schema (chainable - schemas are merged) */
1772
1922
  input(schema) {
1773
1923
  return new MutationProcedureBuilder(this._input(schema));
@@ -1807,6 +1957,10 @@ var ActionProcedureBuilder = class ActionProcedureBuilder extends ProcedureBuild
1807
1957
  meta(value) {
1808
1958
  return new ActionProcedureBuilder(this._meta(value));
1809
1959
  }
1960
+ /** Set a server-only procedure name for middleware/logging */
1961
+ name(value) {
1962
+ return new ActionProcedureBuilder(this._name(value));
1963
+ }
1810
1964
  /** Define input schema (chainable - schemas are merged) */
1811
1965
  input(schema) {
1812
1966
  return new ActionProcedureBuilder(this._input(schema));
@@ -1972,4 +2126,4 @@ const initCRPC = {
1972
2126
  };
1973
2127
 
1974
2128
  //#endregion
1975
- export { zodOutputToConvexFields as A, convexToZodFields as C, zCustomQuery as D, zCustomMutation as E, zodToConvexFields as M, zid as O, convexToZod as S, zCustomAction as T, CRPC_ERROR_CODE_TO_HTTP as _, createMiddlewareFactory as a, isCRPCError as b, createHttpRouter as c, createHttpProcedureBuilder as d, extractPathParams as f, CRPC_ERROR_CODES_BY_KEY as g, CRPCError as h, QueryProcedureBuilder as i, zodToConvex as j, zodOutputToConvex as k, createHttpRouterFactory as l, matchPathParams as m, MutationProcedureBuilder as n, initCRPC as o, handleHttpError as p, ProcedureBuilder as r, HttpRouterWithHono as s, ActionProcedureBuilder as t, extractRouteMap as u, getCRPCErrorFromUnknown as v, withSystemFields as w, toCRPCError as x, getHTTPStatusCodeFromError as y };
2129
+ export { zid as A, toCRPCError as C, zCustomAction as D, withSystemFields as E, zodOutputToConvexFields as M, zodToConvex as N, zCustomMutation as O, zodToConvexFields as P, isCRPCError as S, convexToZodFields as T, CRPCError as _, createMiddlewareFactory as a, getCRPCErrorFromUnknown as b, registerProcedureNameLookup as c, createHttpRouterFactory as d, extractRouteMap as f, matchPathParams as g, handleHttpError as h, QueryProcedureBuilder as i, zodOutputToConvex as j, zCustomQuery as k, HttpRouterWithHono as l, extractPathParams as m, MutationProcedureBuilder as n, initCRPC as o, createHttpProcedureBuilder as p, ProcedureBuilder as r, inferProcedureNameFromCallsite as s, ActionProcedureBuilder as t, createHttpRouter as u, CRPC_ERROR_CODES_BY_KEY as v, convexToZod as w, getHTTPStatusCodeFromError as x, CRPC_ERROR_CODE_TO_HTTP as y };
package/dist/cli.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { $ as resolveAddTemplateDefaults, A as resolveConfiguredBackend, B as runConvexInitIfNeeded, C as isInitialized, D as readPackageVersions, E as parseInitCommandArgs, Et as highlighter, F as runAfterScaffoldScript, G as trackProcess, H as runInitCommandFlow, I as runAggregateBackfillFlow, J as createSpinner, K as withLocalCodegenEnv, L as runAggregatePruneFlow, M as resolveInitProjectDir, N as resolveMigrationConfig, O as resolveBackfillConfig, P as resolveRunDeps, Q as promptForScaffoldTemplateSelection, R as runBackendFunction, S as isEntryPoint, St as stripConvexCommandNoise, T as parseBackendRunJson, Tt as logger, U as runMigrationCreate, V as runDevSchemaBackfillIfNeeded, W as runMigrationFlow, X as filterScaffoldTemplatePathMap, Y as collectPluginScaffoldTemplates, Z as promptForPluginSelection, _ as formatInfoOutput, _t as applyPluginDependencyInstall, a as cleanup, at as getSupportedPluginKeys, b as hasRemoteConvexDeploymentEnv, bt as resolveAuthEnvState, c as createCommandEnv, ct as resolvePluginScaffoldRoots, d as extractBackfillCliOptions, dt as getPluginLockfilePath, et as resolvePluginPreset, f as extractConcaveRunTargetArgs, ft as getSchemaFilePath, g as formatDocsOutput, gt as applyPlanningDependencyInstall, h as extractResetCliOptions, ht as applyDependencyHintsInstall, i as buildInitializationPlan, it as getPluginCatalogEntry, j as resolveDocTopic, k as resolveCodegenTrimSegments, l as ensureConvexGitignoreEntry, lt as assertSchemaFileExists, m as extractMigrationDownOptions, mt as resolveSchemaInstalledPlugins, n as applyPluginInstallPlanFiles, nt as resolveTemplateSelectionSource, o as createBackendAdapter, ot as isSupportedPluginKey, p as extractMigrationCliOptions, pt as readPluginLockfile, q as withWorkingDirectory, r as assertNoRemovedDevPreRunFlag, rt as resolveTemplatesByIdOrThrow, s as createBackendCommandEnv, st as buildPluginInstallPlan, t as applyDependencyInstallPlan, tt as resolvePresetScaffoldTemplates, u as extractBackendRunTargetArgs, ut as collectInstalledPluginKeys, v as getAggregateBackfillDeploymentKey, vt as inspectPluginDependencyInstall, w as parseArgs, x as isConvexDevPreRunConflictFlag, xt as serializeEnvValue, y as getDevAggregateBackfillStatePath, yt as resolveProjectScaffoldContext, z as runConfiguredCodegen } from "./backend-core-CGjsBIOp.mjs";
2
+ import { $ as resolveAddTemplateDefaults, A as resolveConfiguredBackend, B as runConvexInitIfNeeded, C as isInitialized, D as readPackageVersions, E as parseInitCommandArgs, Et as highlighter, F as runAfterScaffoldScript, G as trackProcess, H as runInitCommandFlow, I as runAggregateBackfillFlow, J as createSpinner, K as withLocalCodegenEnv, L as runAggregatePruneFlow, M as resolveInitProjectDir, N as resolveMigrationConfig, O as resolveBackfillConfig, P as resolveRunDeps, Q as promptForScaffoldTemplateSelection, R as runBackendFunction, S as isEntryPoint, St as stripConvexCommandNoise, T as parseBackendRunJson, Tt as logger, U as runMigrationCreate, V as runDevSchemaBackfillIfNeeded, W as runMigrationFlow, X as filterScaffoldTemplatePathMap, Y as collectPluginScaffoldTemplates, Z as promptForPluginSelection, _ as formatInfoOutput, _t as applyPluginDependencyInstall, a as cleanup, at as getSupportedPluginKeys, b as hasRemoteConvexDeploymentEnv, bt as resolveAuthEnvState, c as createCommandEnv, ct as resolvePluginScaffoldRoots, d as extractBackfillCliOptions, dt as getPluginLockfilePath, et as resolvePluginPreset, f as extractConcaveRunTargetArgs, ft as getSchemaFilePath, g as formatDocsOutput, gt as applyPlanningDependencyInstall, h as extractResetCliOptions, ht as applyDependencyHintsInstall, i as buildInitializationPlan, it as getPluginCatalogEntry, j as resolveDocTopic, k as resolveCodegenTrimSegments, l as ensureConvexGitignoreEntry, lt as assertSchemaFileExists, m as extractMigrationDownOptions, mt as resolveSchemaInstalledPlugins, n as applyPluginInstallPlanFiles, nt as resolveTemplateSelectionSource, o as createBackendAdapter, ot as isSupportedPluginKey, p as extractMigrationCliOptions, pt as readPluginLockfile, q as withWorkingDirectory, r as assertNoRemovedDevPreRunFlag, rt as resolveTemplatesByIdOrThrow, s as createBackendCommandEnv, st as buildPluginInstallPlan, t as applyDependencyInstallPlan, tt as resolvePresetScaffoldTemplates, u as extractBackendRunTargetArgs, ut as collectInstalledPluginKeys, v as getAggregateBackfillDeploymentKey, vt as inspectPluginDependencyInstall, w as parseArgs, x as isConvexDevPreRunConflictFlag, xt as serializeEnvValue, y as getDevAggregateBackfillStatePath, yt as resolveProjectScaffoldContext, z as runConfiguredCodegen } from "./backend-core-C0uwGXLx.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";
@@ -5,13 +5,20 @@ type GenericCtx<DataModel extends GenericDataModel = GenericDataModel> = Generic
5
5
  type RunMutationCtx<DataModel extends GenericDataModel> = (GenericMutationCtx<DataModel> | GenericActionCtx<DataModel>) & {
6
6
  runMutation: GenericMutationCtx<DataModel>['runMutation'];
7
7
  };
8
+ type SchedulerCtx<TCtx> = TCtx extends {
9
+ scheduler?: infer TScheduler;
10
+ } ? TCtx & {
11
+ scheduler: NonNullable<TScheduler>;
12
+ } : never;
8
13
  declare const isQueryCtx: <DataModel extends GenericDataModel>(ctx: GenericCtx<DataModel>) => ctx is GenericQueryCtx<DataModel>;
9
14
  declare const isMutationCtx: <DataModel extends GenericDataModel>(ctx: GenericCtx<DataModel>) => ctx is GenericMutationCtx<DataModel>;
10
15
  declare const isActionCtx: <DataModel extends GenericDataModel>(ctx: GenericCtx<DataModel>) => ctx is GenericActionCtx<DataModel>;
11
16
  declare const isRunMutationCtx: <DataModel extends GenericDataModel>(ctx: GenericCtx<DataModel>) => ctx is RunMutationCtx<DataModel>;
17
+ declare const isSchedulerCtx: <TCtx extends object>(ctx: TCtx) => ctx is SchedulerCtx<TCtx>;
12
18
  declare const requireQueryCtx: <DataModel extends GenericDataModel>(ctx: GenericCtx<DataModel>) => GenericQueryCtx<DataModel>;
13
19
  declare const requireMutationCtx: <DataModel extends GenericDataModel>(ctx: GenericCtx<DataModel>) => GenericMutationCtx<DataModel>;
14
20
  declare const requireActionCtx: <DataModel extends GenericDataModel>(ctx: GenericCtx<DataModel>) => GenericActionCtx<DataModel>;
15
21
  declare const requireRunMutationCtx: <DataModel extends GenericDataModel>(ctx: GenericCtx<DataModel>) => RunMutationCtx<DataModel>;
22
+ declare const requireSchedulerCtx: <TCtx extends object>(ctx: TCtx) => SchedulerCtx<TCtx>;
16
23
  //#endregion
17
- export { isQueryCtx as a, requireMutationCtx as c, isMutationCtx as i, requireQueryCtx as l, RunMutationCtx as n, isRunMutationCtx as o, isActionCtx as r, requireActionCtx as s, GenericCtx as t, requireRunMutationCtx as u };
24
+ export { isMutationCtx as a, isSchedulerCtx as c, requireQueryCtx as d, requireRunMutationCtx as f, isActionCtx as i, requireActionCtx as l, RunMutationCtx as n, isQueryCtx as o, requireSchedulerCtx as p, SchedulerCtx as r, isRunMutationCtx as s, GenericCtx as t, requireMutationCtx as u };
@@ -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-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";
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-BLFA9zS7.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-C6pQrnzD.js";
3
3
  import { FunctionArgs, FunctionReference } from "convex/server";
4
4
 
5
5
  //#region src/crpc/auth-error.d.ts
@@ -1,5 +1,5 @@
1
1
  import { t as GetAuth } from "./types-BiJE7qxR.js";
2
- import { t as GenericCtx } from "./context-utils-HPC5nXzx.js";
2
+ import { t as GenericCtx } from "./context-utils-BvWW0Ilq.js";
3
3
  import * as convex_server0 from "convex/server";
4
4
  import { DocumentByName, FunctionReference, GenericDataModel, GenericMutationCtx, GenericSchema, SchemaDefinition, TableNamesInDataModel, internalMutationGeneric } from "convex/server";
5
5
  import * as better_auth_adapters0 from "better-auth/adapters";
@@ -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-BqUIoMfT.js";
2
+ import { g as UnsetMarker, t as AnyMiddleware } from "./types-a-RHmrDZ.js";
3
3
  import { GenericActionCtx, GenericDataModel, HttpRouter } from "convex/server";
4
4
  import { z } from "zod";
5
5
  import { Context, Hono } from "hono";
@@ -103,6 +103,7 @@ interface HttpProcedureBuilderDef<TCtx, TInput extends UnsetMarker | z.ZodTypeAn
103
103
  middlewares: AnyMiddleware[];
104
104
  outputSchema?: z.ZodTypeAny;
105
105
  paramsSchema?: z.ZodTypeAny;
106
+ procedureName?: string;
106
107
  querySchema?: z.ZodTypeAny;
107
108
  route?: HttpRouteDefinition<TMethod>;
108
109
  }
@@ -1,4 +1,4 @@
1
- import { a as createMiddlewareFactory } from "./builder-Bh18Y2t0.js";
1
+ import { a as createMiddlewareFactory } from "./builder-Cb6gloDB.js";
2
2
 
3
3
  //#region src/plugins/middleware.ts
4
4
  const PLUGIN_CONFIG_RESOLVERS = Symbol.for("kitcn:PluginConfigResolvers");
@@ -1,4 +1,4 @@
1
- import { o as MiddlewareBuilder } from "./types-BqUIoMfT.js";
1
+ import { o as MiddlewareBuilder } from "./types-a-RHmrDZ.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-Dw3EVdi6.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-CU0mDiRs.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-nS_qXecO.js";
2
2
  export { type Plugin, type PluginApiScope, type PluginConfigureContext, type PluginConfigureInput, type PluginConfigureResolver, definePlugin, resolvePluginOptions };
@@ -1,3 +1,3 @@
1
- import { n as resolvePluginOptions, t as definePlugin } from "../middleware-C5P1Q29c.js";
1
+ import { n as resolvePluginOptions, t as definePlugin } from "../middleware-DkIhQXwg.js";
2
2
 
3
3
  export { definePlugin, resolvePluginOptions };
@@ -1,5 +1,5 @@
1
1
  import { i as decodeWire, o as encodeWire } from "./transformer-DtDhR3Lc.js";
2
- import { h as CRPCError } from "./builder-Bh18Y2t0.js";
2
+ import { _ as CRPCError } from "./builder-Cb6gloDB.js";
3
3
  import { z } from "zod";
4
4
 
5
5
  //#region src/server/env.ts