kitcn 0.12.7 → 0.12.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -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-ner2TQ3O.js";
1
+ import { C as ConvexNumberBuilderInitial, E as ConvexIdBuilderInitial, N as ConvexCustomBuilderInitial, dn as ConvexTableWithColumns, tr as ConvexTextBuilderInitial } from "../where-clause-compiler-Dw3EVdi6.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-Cf7sqlVD.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-Dzx2IRId.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-Cf7sqlVD.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";
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,29 +103,29 @@ 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;
107
106
  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<"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>;
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>;
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" | "operator" | "field" | "connector">;
115
+ }, "required", "value" | "connector" | "field" | "operator">;
116
116
  declare const adapterArgsValidator: convex_values0.VObject<{
117
- limit?: number | undefined;
117
+ select?: string[] | undefined;
118
118
  where?: {
119
- operator?: "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | "in" | "not_in" | "contains" | "starts_with" | "ends_with" | undefined;
120
119
  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
- select?: string[] | undefined;
124
+ limit?: number | undefined;
125
125
  offset?: number | undefined;
126
126
  sortBy?: {
127
- direction: "asc" | "desc";
128
127
  field: string;
128
+ direction: "asc" | "desc";
129
129
  } | undefined;
130
130
  model: string;
131
131
  }, {
@@ -134,29 +134,29 @@ declare const adapterArgsValidator: convex_values0.VObject<{
134
134
  offset: convex_values0.VFloat64<number | undefined, "optional">;
135
135
  select: convex_values0.VArray<string[] | undefined, convex_values0.VString<string, "required">, "optional">;
136
136
  sortBy: convex_values0.VObject<{
137
- direction: "asc" | "desc";
138
137
  field: string;
138
+ direction: "asc" | "desc";
139
139
  } | undefined, {
140
140
  direction: convex_values0.VUnion<"asc" | "desc", [convex_values0.VLiteral<"asc", "required">, convex_values0.VLiteral<"desc", "required">], "required", never>;
141
141
  field: convex_values0.VString<string, "required">;
142
- }, "optional", "direction" | "field">;
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;
145
144
  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;
150
149
  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<"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>;
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>;
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" | "operator" | "field" | "connector">, "optional">;
159
- }, "required", "limit" | "where" | "model" | "select" | "offset" | "sortBy" | "sortBy.direction" | "sortBy.field">;
158
+ }, "required", "value" | "connector" | "field" | "operator">, "optional">;
159
+ }, "required", "model" | "select" | "where" | "limit" | "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;
package/dist/cli.mjs CHANGED
@@ -1950,7 +1950,10 @@ const CONVEX_MANAGED_ENV_KEYS = new Set([
1950
1950
  "NEXT_PUBLIC_CONVEX_URL",
1951
1951
  "VITE_CONVEX_URL"
1952
1952
  ]);
1953
- const defaultRunCommand = async (args, cwd) => runLocalConvexCommand(args, { cwd });
1953
+ const defaultRunCommand = async (args, cwd, env) => runLocalConvexCommand(args, {
1954
+ cwd,
1955
+ env
1956
+ });
1954
1957
  const generateAuthSecret = () => randomBytes(32).toString("base64url");
1955
1958
  const defaultSecretGenerator = () => generateAuthSecret();
1956
1959
  const normalizeRelativePath = (cwd, filePath) => path.relative(cwd, filePath).replaceAll("\\", "/") || ".";
@@ -2015,8 +2018,8 @@ const ensureAuthSecret = (params) => {
2015
2018
  if (!params.silent) logger.info("Generated BETTER_AUTH_SECRET in convex/.env");
2016
2019
  return secret;
2017
2020
  };
2018
- const runConvexCommand = async (runCommand, cwd, args) => {
2019
- const result = await runCommand(args, cwd);
2021
+ const runConvexCommand = async (runCommand, cwd, args, env) => {
2022
+ const result = await runCommand(args, cwd, env);
2020
2023
  if (result.exitCode !== 0) throw new Error(formatConvexCommandFailure(args, result));
2021
2024
  return result;
2022
2025
  };
@@ -2069,6 +2072,7 @@ async function pushEnv(options = {}, deps = {}) {
2069
2072
  const rotate = options.rotate ?? false;
2070
2073
  const silent = options.silent ?? false;
2071
2074
  const targetArgs = options.targetArgs ?? [];
2075
+ const commandEnv = options.commandEnv;
2072
2076
  const runCommand = deps.runCommand ?? defaultRunCommand;
2073
2077
  const secretGenerator = deps.secretGenerator ?? defaultSecretGenerator;
2074
2078
  const envPath = path.join(cwd, "convex", ".env");
@@ -2096,7 +2100,7 @@ async function pushEnv(options = {}, deps = {}) {
2096
2100
  envFilePath: tempEnvPath,
2097
2101
  force,
2098
2102
  targetArgs
2099
- }));
2103
+ }), commandEnv);
2100
2104
  return true;
2101
2105
  } finally {
2102
2106
  fs.rmSync(tempDir, {
@@ -2144,14 +2148,14 @@ async function pushEnv(options = {}, deps = {}) {
2144
2148
  "run",
2145
2149
  AUTH_ROTATE_KEYS_FUNCTION,
2146
2150
  ...targetArgs
2147
- ]);
2151
+ ], commandEnv);
2148
2152
  if (!silent) logger.info("Rotated auth keys.");
2149
2153
  }
2150
2154
  nextVars.JWKS = parseConvexRunValue((await runConvexCommand(runCommand, cwd, [
2151
2155
  "run",
2152
2156
  AUTH_JWKS_FUNCTION,
2153
2157
  ...targetArgs
2154
- ])).stdout);
2158
+ ], commandEnv)).stdout);
2155
2159
  await finalizePush();
2156
2160
  return;
2157
2161
  }
@@ -2169,23 +2173,26 @@ async function pushEnv(options = {}, deps = {}) {
2169
2173
  "run",
2170
2174
  AUTH_ROTATE_KEYS_FUNCTION,
2171
2175
  ...targetArgs
2172
- ]);
2176
+ ], commandEnv);
2173
2177
  if (!silent) logger.info("Rotated auth keys.");
2174
2178
  }
2175
2179
  nextVars.JWKS = parseConvexRunValue((await runConvexCommand(runCommand, cwd, [
2176
2180
  "run",
2177
2181
  AUTH_JWKS_FUNCTION,
2178
2182
  ...targetArgs
2179
- ])).stdout);
2183
+ ], commandEnv)).stdout);
2180
2184
  await finalizePush();
2181
2185
  }
2182
2186
  async function pullEnv(options = {}, deps = {}) {
2183
2187
  const cwd = process.cwd();
2184
- const result = await runConvexCommand(deps.runCommand ?? defaultRunCommand, cwd, [
2188
+ const runCommand = deps.runCommand ?? defaultRunCommand;
2189
+ const targetArgs = options.targetArgs ?? [];
2190
+ const commandEnv = options.commandEnv;
2191
+ const result = await runConvexCommand(runCommand, cwd, [
2185
2192
  "env",
2186
2193
  "list",
2187
- ...options.targetArgs ?? []
2188
- ]);
2194
+ ...targetArgs
2195
+ ], commandEnv);
2189
2196
  if (options.outFilePath) {
2190
2197
  const outputPath = path.resolve(cwd, options.outFilePath);
2191
2198
  fs.mkdirSync(path.dirname(outputPath), { recursive: true });
@@ -4565,16 +4572,11 @@ export default function AuthPage() {
4565
4572
  const isPending =
4566
4573
  signIn.isPending || signUp.isPending || signOut.isPending;
4567
4574
 
4568
- function getCallbackURL() {
4569
- return '/auth';
4570
- }
4571
-
4572
4575
  function handleSubmit(event: React.FormEvent<HTMLFormElement>) {
4573
4576
  event.preventDefault();
4574
4577
 
4575
4578
  if (mode === 'signup') {
4576
4579
  signUp.mutate({
4577
- callbackURL: getCallbackURL(),
4578
4580
  email,
4579
4581
  name,
4580
4582
  password,
@@ -4583,7 +4585,6 @@ export default function AuthPage() {
4583
4585
  }
4584
4586
 
4585
4587
  signIn.mutate({
4586
- callbackURL: getCallbackURL(),
4587
4588
  email,
4588
4589
  password,
4589
4590
  });
@@ -8599,14 +8600,41 @@ const resolveAddTemplateDefaults = (params) => {
8599
8600
  const presetTemplateIds = normalizeTemplateIds(params.presetTemplateIds);
8600
8601
  return typeof params.presetArg === "string" ? presetTemplateIds : lockfileTemplateIds.length > 0 ? lockfileTemplateIds : presetTemplateIds;
8601
8602
  };
8602
- const promptForScaffoldTemplateSelection = async (promptAdapter, descriptor, allTemplates, presetTemplateIds, roots) => {
8603
+ const promptForScaffoldTemplateSelection = async (promptAdapter, descriptor, selectableTemplates, initialTemplateIds, roots) => {
8604
+ const resolveTemplateRootDir = (template) => {
8605
+ if (template.target === "lib") return roots.libRootDir;
8606
+ if (template.target === "app") return roots.appRootDir ?? roots.functionsRootDir;
8607
+ if (template.target === "client-lib") return roots.clientLibRootDir ?? roots.functionsRootDir;
8608
+ return roots.functionsRootDir;
8609
+ };
8610
+ const resolveTemplateLabel = (template) => normalizePath$2(relative(process.cwd(), join(resolveTemplateRootDir(template), template.path)));
8611
+ const preferredTemplateIds = new Set(initialTemplateIds.map((templateId) => templateId.trim()).filter((templateId) => templateId.length > 0));
8612
+ const optionsByLabel = /* @__PURE__ */ new Map();
8613
+ for (const template of selectableTemplates) {
8614
+ const label = resolveTemplateLabel(template);
8615
+ const existing = optionsByLabel.get(label);
8616
+ if (!existing) {
8617
+ optionsByLabel.set(label, template);
8618
+ continue;
8619
+ }
8620
+ const existingPreferred = preferredTemplateIds.has(existing.id);
8621
+ if (preferredTemplateIds.has(template.id) && !existingPreferred) optionsByLabel.set(label, template);
8622
+ }
8623
+ const optionTemplateById = new Map([...optionsByLabel.values()].map((template) => [template.id, template]));
8624
+ const templateById = new Map(selectableTemplates.map((template) => [template.id, template]));
8625
+ const normalizedInitialTemplateIds = [...new Set(initialTemplateIds.flatMap((templateId) => {
8626
+ const template = templateById.get(templateId.trim());
8627
+ if (!template) return [];
8628
+ const selectedTemplate = optionsByLabel.get(resolveTemplateLabel(template));
8629
+ return selectedTemplate ? [selectedTemplate.id] : [];
8630
+ }))].filter((templateId) => optionTemplateById.has(templateId));
8603
8631
  const selected = await promptAdapter.multiselect({
8604
8632
  message: `Select scaffold files for plugin "${descriptor.key}". Space to toggle. Enter to submit.`,
8605
- options: allTemplates.map((template) => ({
8633
+ options: [...optionsByLabel.entries()].map(([label, template]) => ({
8606
8634
  value: template.id,
8607
- label: normalizePath$2(relative(process.cwd(), join(template.target === "lib" ? roots.libRootDir : roots.functionsRootDir, template.path)))
8635
+ label
8608
8636
  })),
8609
- initialValues: presetTemplateIds,
8637
+ initialValues: normalizedInitialTemplateIds,
8610
8638
  required: true
8611
8639
  });
8612
8640
  if (isCancel(selected)) throw new Error("Scaffold file selection cancelled.");
@@ -9185,6 +9213,7 @@ const CONVEX_DEPLOYMENT_ENV_KEYS = [
9185
9213
  "CONVEX_SELF_HOSTED_URL",
9186
9214
  "CONVEX_SELF_HOSTED_ADMIN_KEY"
9187
9215
  ];
9216
+ const LOCAL_CONVEX_DEPLOYMENT_PREFIXES = ["local:", "anonymous:"];
9188
9217
  function createBackendCommandEnv(overrides) {
9189
9218
  const clearedDeploymentEnv = Object.fromEntries(CONVEX_DEPLOYMENT_ENV_KEYS.map((key) => [key, void 0]));
9190
9219
  return {
@@ -9193,6 +9222,26 @@ function createBackendCommandEnv(overrides) {
9193
9222
  ...overrides
9194
9223
  };
9195
9224
  }
9225
+ function hasRemoteConvexDeploymentEnv(env) {
9226
+ const deployment = env.CONVEX_DEPLOYMENT?.trim();
9227
+ if (deployment && !LOCAL_CONVEX_DEPLOYMENT_PREFIXES.some((prefix) => deployment.startsWith(prefix))) return true;
9228
+ return Boolean(env.CONVEX_DEPLOY_KEY?.trim() || env.CONVEX_SELF_HOSTED_URL?.trim() || env.CONVEX_SELF_HOSTED_ADMIN_KEY?.trim());
9229
+ }
9230
+ function readConvexTargetEnvFile(args, cwd = process.cwd()) {
9231
+ const envFile = readOptionalCliFlagValue(args, "--env-file");
9232
+ if (!envFile) return null;
9233
+ const envFilePath = resolve(cwd, envFile);
9234
+ if (!fs.existsSync(envFilePath)) return null;
9235
+ return parse(fs.readFileSync(envFilePath, "utf8"));
9236
+ }
9237
+ function resolveRemoteConvexDeploymentKey(env) {
9238
+ if (!hasRemoteConvexDeploymentEnv(env)) return null;
9239
+ const deployment = env.CONVEX_DEPLOYMENT?.trim();
9240
+ if (deployment) return `deployment-env:${deployment}`;
9241
+ const selfHostedUrl = env.CONVEX_SELF_HOSTED_URL?.trim();
9242
+ if (selfHostedUrl) return `self-hosted-env:${selfHostedUrl}`;
9243
+ return "remote-env";
9244
+ }
9196
9245
  async function withLocalConvexEnv(sharedDir, fn) {
9197
9246
  const { functionsDir } = getConvexConfig(sharedDir);
9198
9247
  const envPath = join(functionsDir, "..", ".env");
@@ -10591,12 +10640,19 @@ function writeAggregateFingerprintState(statePath, state) {
10591
10640
  fs.writeFileSync(tmpPath, JSON.stringify(state, null, 2));
10592
10641
  fs.renameSync(tmpPath, statePath);
10593
10642
  }
10594
- function getAggregateBackfillDeploymentKey(args) {
10643
+ function getAggregateBackfillDeploymentKey(args, cwd = process.cwd(), env) {
10595
10644
  if (args.includes("--prod")) return "prod";
10596
10645
  const deploymentName = readOptionalCliFlagValue(args, "--deployment-name");
10597
10646
  if (deploymentName) return `deployment:${deploymentName}`;
10598
10647
  const previewName = readOptionalCliFlagValue(args, "--preview-name");
10599
10648
  if (previewName) return `preview:${previewName}`;
10649
+ const envKey = env ? resolveRemoteConvexDeploymentKey(env) : null;
10650
+ if (envKey) return envKey;
10651
+ const envFileVars = readConvexTargetEnvFile(args, cwd);
10652
+ if (envFileVars) {
10653
+ const envFileKey = resolveRemoteConvexDeploymentKey(envFileVars);
10654
+ if (envFileKey) return envFileKey;
10655
+ }
10600
10656
  return "local";
10601
10657
  }
10602
10658
  function ensureConvexGitignoreEntry(cwd = process.cwd()) {
@@ -10804,9 +10860,6 @@ function buildCodegenBootstrapArgs(targetArgs) {
10804
10860
  function didConvexInitCreateConfiguration(output) {
10805
10861
  return CONVEX_INIT_CREATED_CONFIG_RE.test(output);
10806
10862
  }
10807
- function hasRemoteConvexInitTargetArgs(targetArgs) {
10808
- return targetArgs?.some((arg) => arg === "--prod" || arg === "--preview-name" || arg === "--deployment-name") ?? false;
10809
- }
10810
10863
  async function runConvexInitIfNeeded(params) {
10811
10864
  if (params.backendAdapter.publicName !== "convex") return {
10812
10865
  created: false,
@@ -10814,7 +10867,7 @@ async function runConvexInitIfNeeded(params) {
10814
10867
  stdout: "",
10815
10868
  stderr: ""
10816
10869
  };
10817
- const agentModeOverride = params.yes && !hasRemoteConvexInitTargetArgs(params.targetArgs) ? "anonymous" : params.env?.CONVEX_AGENT_MODE;
10870
+ const agentModeOverride = params.yes && getAggregateBackfillDeploymentKey(params.targetArgs ?? [], process.cwd(), params.env) === "local" ? "anonymous" : params.env?.CONVEX_AGENT_MODE;
10818
10871
  const result = normalizeConvexCommandResult(await params.execaFn(params.backendAdapter.command, [
10819
10872
  ...params.backendAdapter.argsPrefix,
10820
10873
  "init",
@@ -11428,7 +11481,7 @@ async function runBackendFunction(execaFn, backendAdapter, functionName, args, t
11428
11481
  JSON.stringify(args)
11429
11482
  ], {
11430
11483
  cwd: process.cwd(),
11431
- env: createBackendCommandEnv(),
11484
+ env: createBackendCommandEnv(options?.env),
11432
11485
  reject: false,
11433
11486
  stdio: "pipe"
11434
11487
  });
@@ -11445,13 +11498,16 @@ async function runBackendFunction(execaFn, backendAdapter, functionName, args, t
11445
11498
  };
11446
11499
  }
11447
11500
  async function runAggregateBackfillFlow(params) {
11448
- const { execaFn, backendAdapter, backfillConfig, mode, targetArgs, signal, context } = params;
11501
+ const { execaFn, backendAdapter, backfillConfig, mode, targetArgs, env, signal, context } = params;
11449
11502
  if (signal?.aborted) return 0;
11450
11503
  if (backfillConfig.enabled === "off") return 0;
11451
11504
  const kickoff = await runBackendFunction(execaFn, backendAdapter, "generated/server:aggregateBackfill", {
11452
11505
  mode,
11453
11506
  batchSize: backfillConfig.batchSize
11454
- }, targetArgs, { echoOutput: false });
11507
+ }, targetArgs, {
11508
+ echoOutput: false,
11509
+ env
11510
+ });
11455
11511
  if (kickoff.exitCode !== 0) {
11456
11512
  const combinedOutput = `${kickoff.stdout}\n${kickoff.stderr}`;
11457
11513
  if (backfillConfig.enabled === "auto" && isMissingBackfillFunctionOutput(combinedOutput)) {
@@ -11478,7 +11534,10 @@ async function runAggregateBackfillFlow(params) {
11478
11534
  const deadline = Date.now() + backfillConfig.timeoutMs;
11479
11535
  let lastProgress = "";
11480
11536
  while (!signal?.aborted) {
11481
- const statusResult = await runBackendFunction(execaFn, backendAdapter, "generated/server:aggregateBackfillStatus", {}, targetArgs, { echoOutput: false });
11537
+ const statusResult = await runBackendFunction(execaFn, backendAdapter, "generated/server:aggregateBackfillStatus", {}, targetArgs, {
11538
+ echoOutput: false,
11539
+ env
11540
+ });
11482
11541
  if (statusResult.exitCode !== 0) return statusResult.exitCode;
11483
11542
  const statuses = parseBackendRunJson(statusResult.stdout);
11484
11543
  const failed = statuses.find((entry) => Boolean(entry.lastError));
@@ -11613,7 +11672,7 @@ export const migration = defineMigration({
11613
11672
  logger.info(`manifest: ${manifestFile}`);
11614
11673
  }
11615
11674
  async function runMigrationFlow(params) {
11616
- const { execaFn, backendAdapter, migrationConfig, targetArgs, signal, context, direction, steps, to } = params;
11675
+ const { execaFn, backendAdapter, migrationConfig, targetArgs, env, signal, context, direction, steps, to } = params;
11617
11676
  if (signal?.aborted || migrationConfig.enabled === "off") return 0;
11618
11677
  const kickoff = await runBackendFunction(execaFn, backendAdapter, "generated/server:migrationRun", {
11619
11678
  direction,
@@ -11621,7 +11680,10 @@ async function runMigrationFlow(params) {
11621
11680
  allowDrift: migrationConfig.allowDrift,
11622
11681
  ...steps !== void 0 ? { steps } : {},
11623
11682
  ...to !== void 0 ? { to } : {}
11624
- }, targetArgs, { echoOutput: false });
11683
+ }, targetArgs, {
11684
+ echoOutput: false,
11685
+ env
11686
+ });
11625
11687
  if (kickoff.exitCode !== 0) {
11626
11688
  const combinedOutput = `${kickoff.stdout}\n${kickoff.stderr}`;
11627
11689
  if (migrationConfig.enabled === "auto" && isMissingBackfillFunctionOutput(combinedOutput)) {
@@ -11656,7 +11718,10 @@ async function runMigrationFlow(params) {
11656
11718
  const deadline = Date.now() + migrationConfig.timeoutMs;
11657
11719
  let lastStatusLine = "";
11658
11720
  while (!signal?.aborted) {
11659
- const statusResult = await runBackendFunction(execaFn, backendAdapter, "generated/server:migrationStatus", { runId }, targetArgs, { echoOutput: false });
11721
+ const statusResult = await runBackendFunction(execaFn, backendAdapter, "generated/server:migrationStatus", { runId }, targetArgs, {
11722
+ echoOutput: false,
11723
+ env
11724
+ });
11660
11725
  if (statusResult.exitCode !== 0) return statusResult.exitCode;
11661
11726
  const statusPayload = parseBackendRunJson(statusResult.stdout);
11662
11727
  const runStatus = typeof statusPayload === "object" && statusPayload !== null && !Array.isArray(statusPayload) ? statusPayload.activeRun?.status ?? statusPayload.runs?.[0]?.status ?? "unknown" : "unknown";
@@ -11691,10 +11756,10 @@ async function runMigrationFlow(params) {
11691
11756
  return 0;
11692
11757
  }
11693
11758
  async function runDevSchemaBackfillIfNeeded(params) {
11694
- const { execaFn, backendAdapter, backfillConfig, functionsDir, targetArgs, signal } = params;
11759
+ const { execaFn, backendAdapter, backfillConfig, functionsDir, targetArgs, env, signal } = params;
11695
11760
  const fingerprint = await computeAggregateIndexFingerprint(functionsDir);
11696
11761
  if (!fingerprint) return 0;
11697
- const deploymentKey = getAggregateBackfillDeploymentKey(targetArgs);
11762
+ const deploymentKey = getAggregateBackfillDeploymentKey(targetArgs, process.cwd(), env);
11698
11763
  const statePath = getDevAggregateBackfillStatePath();
11699
11764
  const state = readAggregateFingerprintState(statePath);
11700
11765
  if (state.entries[deploymentKey]?.fingerprint === fingerprint) return 0;
@@ -11708,6 +11773,7 @@ async function runDevSchemaBackfillIfNeeded(params) {
11708
11773
  },
11709
11774
  mode: "resume",
11710
11775
  targetArgs,
11776
+ env,
11711
11777
  signal,
11712
11778
  context: "dev"
11713
11779
  });
@@ -12066,6 +12132,59 @@ function resolveConcaveLocalSiteUrl(cwd = process.cwd()) {
12066
12132
  const parsed = parseEnv(fs.readFileSync(envLocalPath, "utf8"));
12067
12133
  return parsed.NEXT_PUBLIC_SITE_URL ?? parsed.VITE_SITE_URL ?? "http://localhost:3000";
12068
12134
  }
12135
+ function resolveImplicitConvexRemoteDeploymentEnv(cwd = process.cwd()) {
12136
+ const envLocalPath = join(cwd, ".env.local");
12137
+ if (!fs.existsSync(envLocalPath)) return null;
12138
+ const parsed = parseEnv(fs.readFileSync(envLocalPath, "utf8"));
12139
+ if (!hasRemoteConvexDeploymentEnv(parsed)) return null;
12140
+ return {
12141
+ CONVEX_DEPLOYMENT: parsed.CONVEX_DEPLOYMENT,
12142
+ CONVEX_DEPLOY_KEY: parsed.CONVEX_DEPLOY_KEY,
12143
+ CONVEX_SELF_HOSTED_URL: parsed.CONVEX_SELF_HOSTED_URL,
12144
+ CONVEX_SELF_HOSTED_ADMIN_KEY: parsed.CONVEX_SELF_HOSTED_ADMIN_KEY
12145
+ };
12146
+ }
12147
+ function resolveConvexEnvFileCommandEnv(args, cwd = process.cwd()) {
12148
+ let envFilePath = null;
12149
+ for (let i = 0; i < args.length; i += 1) {
12150
+ const arg = args[i];
12151
+ if (arg === "--env-file") {
12152
+ envFilePath = args[i + 1] ?? null;
12153
+ break;
12154
+ }
12155
+ if (arg.startsWith("--env-file=")) {
12156
+ envFilePath = arg.slice(11) || null;
12157
+ break;
12158
+ }
12159
+ }
12160
+ if (!envFilePath) return null;
12161
+ const resolvedPath = resolve(cwd, envFilePath);
12162
+ if (!fs.existsSync(resolvedPath)) return null;
12163
+ const parsed = parseEnv(fs.readFileSync(resolvedPath, "utf8"));
12164
+ return {
12165
+ CONVEX_DEPLOYMENT: parsed.CONVEX_DEPLOYMENT,
12166
+ CONVEX_DEPLOY_KEY: parsed.CONVEX_DEPLOY_KEY,
12167
+ CONVEX_SELF_HOSTED_URL: parsed.CONVEX_SELF_HOSTED_URL,
12168
+ CONVEX_SELF_HOSTED_ADMIN_KEY: parsed.CONVEX_SELF_HOSTED_ADMIN_KEY
12169
+ };
12170
+ }
12171
+ function stripConvexEnvFileTargetArgs(args) {
12172
+ const nextArgs = [];
12173
+ let skipNext = false;
12174
+ for (const arg of args) {
12175
+ if (skipNext) {
12176
+ skipNext = false;
12177
+ continue;
12178
+ }
12179
+ if (arg === "--env-file") {
12180
+ skipNext = true;
12181
+ continue;
12182
+ }
12183
+ if (arg.startsWith("--env-file=")) continue;
12184
+ nextArgs.push(arg);
12185
+ }
12186
+ return nextArgs;
12187
+ }
12069
12188
  const resolveWatcherCommand = (currentFilename = __filename$1, currentDir = __dirname) => {
12070
12189
  const isTs = currentFilename.endsWith(".ts");
12071
12190
  return {
@@ -12244,6 +12363,10 @@ const handleDevCommand = async (argv, deps) => {
12244
12363
  const debug = parsed.debug || config.dev.debug;
12245
12364
  assertNoRemovedDevPreRunFlag(config.dev.args);
12246
12365
  const { bootstrap, remainingArgs: convexDevArgs } = extractDevBootstrapCliFlag([...config.dev.args, ...devCommandArgs]);
12366
+ const explicitConvexTargetArgs = extractBackendRunTargetArgs("convex", convexDevArgs);
12367
+ const explicitConvexCommandEnv = resolveConvexEnvFileCommandEnv(convexDevArgs);
12368
+ const implicitConvexCommandEnv = backend === "convex" && explicitConvexTargetArgs.length === 0 && explicitConvexCommandEnv === null ? resolveImplicitConvexRemoteDeploymentEnv() : null;
12369
+ const effectiveConvexCommandEnv = explicitConvexCommandEnv ?? implicitConvexCommandEnv;
12247
12370
  const preRunFunction = config.dev.preRun;
12248
12371
  if (bootstrap && backend !== "convex") throw new Error("`kitcn dev --bootstrap` is only supported for backend convex.");
12249
12372
  if (preRunFunction && backend === "concave") throw new Error("`dev.preRun` is only supported for backend convex. Concave dev has no equivalent `--run` flow.");
@@ -12260,10 +12383,10 @@ const handleDevCommand = async (argv, deps) => {
12260
12383
  const concaveLocalDevContract = backend === "concave" ? resolveConcaveLocalDevContract(convexDevArgs, (deps?.resolveConcaveLocalSiteUrl ?? resolveConcaveLocalSiteUrl)(process.cwd())) : null;
12261
12384
  const backendDevArgs = concaveLocalDevContract?.backendArgs ?? applyConvexDevPreRunArgs(convexDevArgs, preRunFunction);
12262
12385
  const backendOutputMode = debug || backend === "convex" && !hasDevArg(backendDevArgs, "--once") ? "raw" : "filtered";
12263
- const targetArgs = concaveLocalDevContract?.targetArgs ?? extractBackendRunTargetArgs(backend, convexDevArgs);
12386
+ const targetArgs = concaveLocalDevContract?.targetArgs ?? stripConvexEnvFileTargetArgs(extractBackendRunTargetArgs(backend, convexDevArgs));
12264
12387
  const trimSegments = resolveCodegenTrimSegments(config);
12265
12388
  const localNodeEnvOverrides = backend === "convex" ? await resolveSupportedLocalNodeEnvOverridesFn({ execaFn }) : {};
12266
- if (!bootstrap && backend === "convex" && !debug) logger.info("Bootstrapping local Convex...");
12389
+ if (!bootstrap && backend === "convex" && !debug && getAggregateBackfillDeploymentKey(targetArgs, process.cwd(), effectiveConvexCommandEnv ?? void 0) === "local") logger.info("Bootstrapping local Convex...");
12267
12390
  if (bootstrap) return runLocalConvexBootstrap({
12268
12391
  authSyncMode: "complete",
12269
12392
  config,
@@ -12286,7 +12409,10 @@ const handleDevCommand = async (argv, deps) => {
12286
12409
  execaFn,
12287
12410
  backendAdapter,
12288
12411
  echoOutput: false,
12289
- env: localNodeEnvOverrides,
12412
+ env: {
12413
+ ...localNodeEnvOverrides,
12414
+ ...effectiveConvexCommandEnv
12415
+ },
12290
12416
  targetArgs
12291
12417
  });
12292
12418
  if (convexInitResult.exitCode !== 0) return convexInitResult.exitCode;
@@ -12297,6 +12423,7 @@ const handleDevCommand = async (argv, deps) => {
12297
12423
  });
12298
12424
  if (backend === "convex" && (fs.existsSync(localConvexEnvPath) || authEnvState.installed)) await syncEnvFn({
12299
12425
  authSyncMode: authEnvState.installed ? "prepare" : "skip",
12426
+ commandEnv: effectiveConvexCommandEnv ?? void 0,
12300
12427
  force: true,
12301
12428
  sharedDir,
12302
12429
  silent: true,
@@ -12332,6 +12459,7 @@ const handleDevCommand = async (argv, deps) => {
12332
12459
  cwd: process.cwd(),
12333
12460
  env: createBackendCommandEnv({
12334
12461
  ...localNodeEnvOverrides,
12462
+ ...effectiveConvexCommandEnv,
12335
12463
  ...concaveLocalDevContract?.backendEnv
12336
12464
  }),
12337
12465
  reject: false
@@ -12345,6 +12473,7 @@ const handleDevCommand = async (argv, deps) => {
12345
12473
  signal: backfillAbortController.signal,
12346
12474
  runTask: () => syncEnvFn({
12347
12475
  authSyncMode: "complete",
12476
+ commandEnv: effectiveConvexCommandEnv ?? void 0,
12348
12477
  force: true,
12349
12478
  sharedDir,
12350
12479
  silent: true,
@@ -12367,6 +12496,7 @@ const handleDevCommand = async (argv, deps) => {
12367
12496
  backendAdapter,
12368
12497
  backfillConfig: devBackfillConfig,
12369
12498
  functionsDir,
12499
+ env: effectiveConvexCommandEnv ?? void 0,
12370
12500
  targetArgs,
12371
12501
  signal: backfillAbortController.signal
12372
12502
  }) !== 0 && !backfillAbortController.signal.aborted) logger.warn("⚠️ aggregateBackfill on schema update failed in dev (continuing without blocking).");
@@ -12394,6 +12524,7 @@ const handleDevCommand = async (argv, deps) => {
12394
12524
  await authEnvSyncPromise;
12395
12525
  await syncEnvFn({
12396
12526
  authSyncMode: "auto",
12527
+ commandEnv: effectiveConvexCommandEnv ?? void 0,
12397
12528
  force: true,
12398
12529
  sharedDir,
12399
12530
  silent: true,
@@ -12421,6 +12552,7 @@ const handleDevCommand = async (argv, deps) => {
12421
12552
  runTask: () => runMigrationFlow({
12422
12553
  execaFn,
12423
12554
  backendAdapter,
12555
+ env: effectiveConvexCommandEnv ?? void 0,
12424
12556
  migrationConfig: devMigrationConfig,
12425
12557
  targetArgs,
12426
12558
  signal: backfillAbortController.signal,
@@ -12443,6 +12575,7 @@ const handleDevCommand = async (argv, deps) => {
12443
12575
  execaFn,
12444
12576
  backendAdapter,
12445
12577
  backfillConfig: devBackfillConfig,
12578
+ env: effectiveConvexCommandEnv ?? void 0,
12446
12579
  mode: "resume",
12447
12580
  targetArgs,
12448
12581
  signal: backfillAbortController.signal,
@@ -12748,8 +12881,9 @@ const handleAddCommand = async (argv, deps = {}) => {
12748
12881
  presetTemplateIds,
12749
12882
  availableTemplateIds: allTemplates.map((template) => template.id)
12750
12883
  });
12884
+ const selectableTemplates = resolveTemplatesByIdOrThrow(pluginDescriptor, allTemplates, selectionSource === "lockfile" ? [...new Set([...existingTemplateIds, ...presetTemplateIds])] : presetTemplateIds, "add selection prompt");
12751
12885
  const scaffoldRoots = resolvePluginScaffoldRoots(effectiveFunctionsDir, pluginDescriptor, effectiveConfig, resolvedPreset);
12752
- const selectedTemplateIds = !addArgs.yes && promptAdapter.isInteractive() ? await promptForScaffoldTemplateSelection(promptAdapter, pluginDescriptor, allTemplates, defaultTemplateIds, scaffoldRoots) : defaultTemplateIds;
12886
+ const selectedTemplateIds = !addArgs.yes && promptAdapter.isInteractive() ? await promptForScaffoldTemplateSelection(promptAdapter, pluginDescriptor, selectableTemplates, defaultTemplateIds, scaffoldRoots) : defaultTemplateIds;
12753
12887
  const selectedTemplates = resolveTemplatesByIdOrThrow(pluginDescriptor, allTemplates, selectedTemplateIds, "add");
12754
12888
  if (selectedPlugin === "auth" && addArgs.schema) {
12755
12889
  const authLockEntry = lockfile.plugins.auth;
@@ -173,18 +173,10 @@ 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
- };
184
176
  input: {
185
177
  where?: {
186
- operator?: "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | "in" | "not_in" | "contains" | "starts_with" | "ends_with" | undefined;
187
178
  connector?: "AND" | "OR" | undefined;
179
+ operator?: "lt" | "lte" | "gt" | "gte" | "eq" | "in" | "not_in" | "ne" | "contains" | "starts_with" | "ends_with" | undefined;
188
180
  value: string | number | boolean | string[] | number[] | null;
189
181
  field: string;
190
182
  }[] | undefined;
@@ -193,6 +185,14 @@ declare const createApi: <Schema extends SchemaDefinition<any, any>, DataModel e
193
185
  where?: any[] | undefined;
194
186
  model: string;
195
187
  };
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;
208
207
  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,19 +216,20 @@ 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;
220
219
  join?: any;
221
220
  where?: {
222
- operator?: "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | "in" | "not_in" | "contains" | "starts_with" | "ends_with" | undefined;
223
221
  connector?: "AND" | "OR" | undefined;
222
+ operator?: "lt" | "lte" | "gt" | "gte" | "eq" | "in" | "not_in" | "ne" | "contains" | "starts_with" | "ends_with" | undefined;
224
223
  value: string | number | boolean | string[] | number[] | null;
225
224
  field: string;
226
225
  }[] | undefined;
226
+ limit?: number | undefined;
227
227
  offset?: number | undefined;
228
228
  sortBy?: {
229
- direction: "asc" | "desc";
230
229
  field: string;
230
+ direction: "asc" | "desc";
231
231
  } | undefined;
232
+ model: string;
232
233
  paginationOpts: {
233
234
  id?: number;
234
235
  endCursor?: string | null;
@@ -237,47 +238,46 @@ declare const createApi: <Schema extends SchemaDefinition<any, any>, DataModel e
237
238
  numItems: number;
238
239
  cursor: string | null;
239
240
  };
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;
244
245
  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;
247
248
  value: string | number | boolean | string[] | number[] | null;
248
249
  field: string;
249
250
  }[] | 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
- };
264
256
  input: {
265
257
  where?: {
266
- operator?: "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | "in" | "not_in" | "contains" | "starts_with" | "ends_with" | undefined;
267
258
  connector?: "AND" | "OR" | undefined;
259
+ operator?: "lt" | "lte" | "gt" | "gte" | "eq" | "in" | "not_in" | "ne" | "contains" | "starts_with" | "ends_with" | undefined;
268
260
  value: string | number | boolean | string[] | number[] | null;
269
261
  field: string;
270
262
  }[] | undefined;
263
+ model: string;
271
264
  update: {
272
265
  [x: string]: unknown;
273
266
  [x: number]: unknown;
274
267
  [x: symbol]: unknown;
275
268
  };
276
- model: string;
277
269
  } | {
278
270
  where?: any[] | undefined;
279
- update: any;
280
271
  model: string;
272
+ 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;
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;
294
293
  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;
298
299
  update: {
299
300
  [x: string]: unknown;
300
301
  [x: number]: unknown;
301
302
  [x: symbol]: unknown;
302
303
  };
303
- model: string;
304
304
  } | {
305
305
  where?: any[] | undefined;
306
- update: any;
307
306
  model: string;
307
+ update: any;
308
308
  };
309
309
  }, Promise<any>>;
310
310
  };
@@ -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-ner2TQ3O.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-Dw3EVdi6.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";
@@ -3743,6 +3743,19 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
3743
3743
  fieldName: "indexName";
3744
3744
  };
3745
3745
  };
3746
+ updatedAt: ConvexNumberBuilderInitial<""> & {
3747
+ _: {
3748
+ notNull: true;
3749
+ };
3750
+ } & {
3751
+ _: {
3752
+ tableName: "aggregate_bucket";
3753
+ };
3754
+ } & {
3755
+ _: {
3756
+ fieldName: "updatedAt";
3757
+ };
3758
+ };
3746
3759
  keyHash: ConvexTextBuilderInitial<""> & {
3747
3760
  _: {
3748
3761
  notNull: true;
@@ -3804,19 +3817,6 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
3804
3817
  fieldName: "nonNullCountValues";
3805
3818
  };
3806
3819
  };
3807
- updatedAt: ConvexNumberBuilderInitial<""> & {
3808
- _: {
3809
- notNull: true;
3810
- };
3811
- } & {
3812
- _: {
3813
- tableName: "aggregate_bucket";
3814
- };
3815
- } & {
3816
- _: {
3817
- fieldName: "updatedAt";
3818
- };
3819
- };
3820
3820
  };
3821
3821
  }, {
3822
3822
  by_creation_time: ["_creationTime"];
@@ -3826,7 +3826,7 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
3826
3826
  readonly aggregate_member: ConvexTableWithColumns<{
3827
3827
  name: "aggregate_member";
3828
3828
  columns: {
3829
- tableKey: ConvexTextBuilderInitial<""> & {
3829
+ kind: ConvexTextBuilderInitial<""> & {
3830
3830
  _: {
3831
3831
  notNull: true;
3832
3832
  };
@@ -3836,10 +3836,10 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
3836
3836
  };
3837
3837
  } & {
3838
3838
  _: {
3839
- fieldName: "tableKey";
3839
+ fieldName: "kind";
3840
3840
  };
3841
3841
  };
3842
- indexName: ConvexTextBuilderInitial<""> & {
3842
+ tableKey: ConvexTextBuilderInitial<""> & {
3843
3843
  _: {
3844
3844
  notNull: true;
3845
3845
  };
@@ -3849,10 +3849,10 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
3849
3849
  };
3850
3850
  } & {
3851
3851
  _: {
3852
- fieldName: "indexName";
3852
+ fieldName: "tableKey";
3853
3853
  };
3854
3854
  };
3855
- keyHash: ConvexTextBuilderInitial<""> & {
3855
+ indexName: ConvexTextBuilderInitial<""> & {
3856
3856
  _: {
3857
3857
  notNull: true;
3858
3858
  };
@@ -3862,14 +3862,10 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
3862
3862
  };
3863
3863
  } & {
3864
3864
  _: {
3865
- fieldName: "keyHash";
3865
+ fieldName: "indexName";
3866
3866
  };
3867
3867
  };
3868
- keyParts: ConvexCustomBuilderInitial<"", convex_values0.VArray<any[], convex_values0.VId<any, any> | convex_values0.VString<any, any> | convex_values0.VFloat64<any, any> | convex_values0.VInt64<any, any> | convex_values0.VBoolean<any, any> | convex_values0.VNull<any, any> | convex_values0.VAny<any, any, string> | convex_values0.VLiteral<any, any> | convex_values0.VBytes<any, any> | convex_values0.VObject<any, Record<string, convex_values0.Validator<any, convex_values0.OptionalProperty, any>>, any, any> | convex_values0.VArray<any, convex_values0.Validator<any, "required", any>, any> | convex_values0.VRecord<any, convex_values0.Validator<string, "required", any>, convex_values0.Validator<any, "required", any>, any, any> | convex_values0.VUnion<any, convex_values0.Validator<any, "required", any>[], any, any>, "required">> & {
3869
- _: {
3870
- $type: convex_values0.Value[];
3871
- };
3872
- } & {
3868
+ updatedAt: ConvexNumberBuilderInitial<""> & {
3873
3869
  _: {
3874
3870
  notNull: true;
3875
3871
  };
@@ -3879,28 +3875,27 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
3879
3875
  };
3880
3876
  } & {
3881
3877
  _: {
3882
- fieldName: "keyParts";
3878
+ fieldName: "updatedAt";
3883
3879
  };
3884
3880
  };
3885
- sumValues: (NotNull<$Type<ConvexCustomBuilderInitial<"", convex_values0.VRecord<Record<string, any>, convex_values0.VString<string, "required">, convex_values0.VId<any, any> | convex_values0.VString<any, any> | convex_values0.VFloat64<any, any> | convex_values0.VInt64<any, any> | convex_values0.VBoolean<any, any> | convex_values0.VNull<any, any> | convex_values0.VAny<any, any, string> | convex_values0.VLiteral<any, any> | convex_values0.VBytes<any, any> | convex_values0.VObject<any, Record<string, convex_values0.Validator<any, convex_values0.OptionalProperty, any>>, any, any> | convex_values0.VArray<any, convex_values0.Validator<any, "required", any>, any> | convex_values0.VRecord<any, convex_values0.Validator<string, "required", any>, convex_values0.Validator<any, "required", any>, any, any> | convex_values0.VUnion<any, convex_values0.Validator<any, "required", any>[], any, any>, "required", string>>, Record<string, number>>> | NotNull<$Type<ConvexCustomBuilderInitial<"", convex_values0.VId<any, any> | convex_values0.VString<any, any> | convex_values0.VFloat64<any, any> | convex_values0.VInt64<any, any> | convex_values0.VBoolean<any, any> | convex_values0.VNull<any, any> | convex_values0.VAny<any, any, string> | convex_values0.VLiteral<any, any> | convex_values0.VBytes<any, any> | convex_values0.VObject<any, Record<string, convex_values0.Validator<any, convex_values0.OptionalProperty, any>>, any, any> | convex_values0.VArray<any, convex_values0.Validator<any, "required", any>, any> | convex_values0.VRecord<any, convex_values0.Validator<string, "required", any>, convex_values0.Validator<any, "required", any>, any, any> | convex_values0.VUnion<any, convex_values0.Validator<any, "required", any>[], any, any>>, Record<string, number>>>) & {
3881
+ keyHash: ConvexTextBuilderInitial<""> & {
3886
3882
  _: {
3887
- tableName: "aggregate_member";
3883
+ notNull: true;
3888
3884
  };
3889
3885
  } & {
3890
- _: {
3891
- fieldName: "sumValues";
3892
- };
3893
- };
3894
- nonNullCountValues: (NotNull<$Type<ConvexCustomBuilderInitial<"", convex_values0.VRecord<Record<string, any>, convex_values0.VString<string, "required">, convex_values0.VId<any, any> | convex_values0.VString<any, any> | convex_values0.VFloat64<any, any> | convex_values0.VInt64<any, any> | convex_values0.VBoolean<any, any> | convex_values0.VNull<any, any> | convex_values0.VAny<any, any, string> | convex_values0.VLiteral<any, any> | convex_values0.VBytes<any, any> | convex_values0.VObject<any, Record<string, convex_values0.Validator<any, convex_values0.OptionalProperty, any>>, any, any> | convex_values0.VArray<any, convex_values0.Validator<any, "required", any>, any> | convex_values0.VRecord<any, convex_values0.Validator<string, "required", any>, convex_values0.Validator<any, "required", any>, any, any> | convex_values0.VUnion<any, convex_values0.Validator<any, "required", any>[], any, any>, "required", string>>, Record<string, number>>> | NotNull<$Type<ConvexCustomBuilderInitial<"", convex_values0.VId<any, any> | convex_values0.VString<any, any> | convex_values0.VFloat64<any, any> | convex_values0.VInt64<any, any> | convex_values0.VBoolean<any, any> | convex_values0.VNull<any, any> | convex_values0.VAny<any, any, string> | convex_values0.VLiteral<any, any> | convex_values0.VBytes<any, any> | convex_values0.VObject<any, Record<string, convex_values0.Validator<any, convex_values0.OptionalProperty, any>>, any, any> | convex_values0.VArray<any, convex_values0.Validator<any, "required", any>, any> | convex_values0.VRecord<any, convex_values0.Validator<string, "required", any>, convex_values0.Validator<any, "required", any>, any, any> | convex_values0.VUnion<any, convex_values0.Validator<any, "required", any>[], any, any>>, Record<string, number>>>) & {
3895
3886
  _: {
3896
3887
  tableName: "aggregate_member";
3897
3888
  };
3898
3889
  } & {
3899
3890
  _: {
3900
- fieldName: "nonNullCountValues";
3891
+ fieldName: "keyHash";
3901
3892
  };
3902
3893
  };
3903
- updatedAt: ConvexNumberBuilderInitial<""> & {
3894
+ keyParts: ConvexCustomBuilderInitial<"", convex_values0.VArray<any[], convex_values0.VId<any, any> | convex_values0.VString<any, any> | convex_values0.VFloat64<any, any> | convex_values0.VInt64<any, any> | convex_values0.VBoolean<any, any> | convex_values0.VNull<any, any> | convex_values0.VAny<any, any, string> | convex_values0.VLiteral<any, any> | convex_values0.VBytes<any, any> | convex_values0.VObject<any, Record<string, convex_values0.Validator<any, convex_values0.OptionalProperty, any>>, any, any> | convex_values0.VArray<any, convex_values0.Validator<any, "required", any>, any> | convex_values0.VRecord<any, convex_values0.Validator<string, "required", any>, convex_values0.Validator<any, "required", any>, any, any> | convex_values0.VUnion<any, convex_values0.Validator<any, "required", any>[], any, any>, "required">> & {
3895
+ _: {
3896
+ $type: convex_values0.Value[];
3897
+ };
3898
+ } & {
3904
3899
  _: {
3905
3900
  notNull: true;
3906
3901
  };
@@ -3910,20 +3905,25 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
3910
3905
  };
3911
3906
  } & {
3912
3907
  _: {
3913
- fieldName: "updatedAt";
3908
+ fieldName: "keyParts";
3914
3909
  };
3915
3910
  };
3916
- kind: ConvexTextBuilderInitial<""> & {
3911
+ sumValues: (NotNull<$Type<ConvexCustomBuilderInitial<"", convex_values0.VRecord<Record<string, any>, convex_values0.VString<string, "required">, convex_values0.VId<any, any> | convex_values0.VString<any, any> | convex_values0.VFloat64<any, any> | convex_values0.VInt64<any, any> | convex_values0.VBoolean<any, any> | convex_values0.VNull<any, any> | convex_values0.VAny<any, any, string> | convex_values0.VLiteral<any, any> | convex_values0.VBytes<any, any> | convex_values0.VObject<any, Record<string, convex_values0.Validator<any, convex_values0.OptionalProperty, any>>, any, any> | convex_values0.VArray<any, convex_values0.Validator<any, "required", any>, any> | convex_values0.VRecord<any, convex_values0.Validator<string, "required", any>, convex_values0.Validator<any, "required", any>, any, any> | convex_values0.VUnion<any, convex_values0.Validator<any, "required", any>[], any, any>, "required", string>>, Record<string, number>>> | NotNull<$Type<ConvexCustomBuilderInitial<"", convex_values0.VId<any, any> | convex_values0.VString<any, any> | convex_values0.VFloat64<any, any> | convex_values0.VInt64<any, any> | convex_values0.VBoolean<any, any> | convex_values0.VNull<any, any> | convex_values0.VAny<any, any, string> | convex_values0.VLiteral<any, any> | convex_values0.VBytes<any, any> | convex_values0.VObject<any, Record<string, convex_values0.Validator<any, convex_values0.OptionalProperty, any>>, any, any> | convex_values0.VArray<any, convex_values0.Validator<any, "required", any>, any> | convex_values0.VRecord<any, convex_values0.Validator<string, "required", any>, convex_values0.Validator<any, "required", any>, any, any> | convex_values0.VUnion<any, convex_values0.Validator<any, "required", any>[], any, any>>, Record<string, number>>>) & {
3917
3912
  _: {
3918
- notNull: true;
3913
+ tableName: "aggregate_member";
3919
3914
  };
3920
3915
  } & {
3916
+ _: {
3917
+ fieldName: "sumValues";
3918
+ };
3919
+ };
3920
+ nonNullCountValues: (NotNull<$Type<ConvexCustomBuilderInitial<"", convex_values0.VRecord<Record<string, any>, convex_values0.VString<string, "required">, convex_values0.VId<any, any> | convex_values0.VString<any, any> | convex_values0.VFloat64<any, any> | convex_values0.VInt64<any, any> | convex_values0.VBoolean<any, any> | convex_values0.VNull<any, any> | convex_values0.VAny<any, any, string> | convex_values0.VLiteral<any, any> | convex_values0.VBytes<any, any> | convex_values0.VObject<any, Record<string, convex_values0.Validator<any, convex_values0.OptionalProperty, any>>, any, any> | convex_values0.VArray<any, convex_values0.Validator<any, "required", any>, any> | convex_values0.VRecord<any, convex_values0.Validator<string, "required", any>, convex_values0.Validator<any, "required", any>, any, any> | convex_values0.VUnion<any, convex_values0.Validator<any, "required", any>[], any, any>, "required", string>>, Record<string, number>>> | NotNull<$Type<ConvexCustomBuilderInitial<"", convex_values0.VId<any, any> | convex_values0.VString<any, any> | convex_values0.VFloat64<any, any> | convex_values0.VInt64<any, any> | convex_values0.VBoolean<any, any> | convex_values0.VNull<any, any> | convex_values0.VAny<any, any, string> | convex_values0.VLiteral<any, any> | convex_values0.VBytes<any, any> | convex_values0.VObject<any, Record<string, convex_values0.Validator<any, convex_values0.OptionalProperty, any>>, any, any> | convex_values0.VArray<any, convex_values0.Validator<any, "required", any>, any> | convex_values0.VRecord<any, convex_values0.Validator<string, "required", any>, convex_values0.Validator<any, "required", any>, any, any> | convex_values0.VUnion<any, convex_values0.Validator<any, "required", any>[], any, any>>, Record<string, number>>>) & {
3921
3921
  _: {
3922
3922
  tableName: "aggregate_member";
3923
3923
  };
3924
3924
  } & {
3925
3925
  _: {
3926
- fieldName: "kind";
3926
+ fieldName: "nonNullCountValues";
3927
3927
  };
3928
3928
  };
3929
3929
  docId: ConvexTextBuilderInitial<""> & {
@@ -4035,7 +4035,7 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
4035
4035
  fieldName: "indexName";
4036
4036
  };
4037
4037
  };
4038
- keyHash: ConvexTextBuilderInitial<""> & {
4038
+ updatedAt: ConvexNumberBuilderInitial<""> & {
4039
4039
  _: {
4040
4040
  notNull: true;
4041
4041
  };
@@ -4045,10 +4045,10 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
4045
4045
  };
4046
4046
  } & {
4047
4047
  _: {
4048
- fieldName: "keyHash";
4048
+ fieldName: "updatedAt";
4049
4049
  };
4050
4050
  };
4051
- count: ConvexNumberBuilderInitial<""> & {
4051
+ keyHash: ConvexTextBuilderInitial<""> & {
4052
4052
  _: {
4053
4053
  notNull: true;
4054
4054
  };
@@ -4058,10 +4058,10 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
4058
4058
  };
4059
4059
  } & {
4060
4060
  _: {
4061
- fieldName: "count";
4061
+ fieldName: "keyHash";
4062
4062
  };
4063
4063
  };
4064
- updatedAt: ConvexNumberBuilderInitial<""> & {
4064
+ count: ConvexNumberBuilderInitial<""> & {
4065
4065
  _: {
4066
4066
  notNull: true;
4067
4067
  };
@@ -4071,7 +4071,7 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
4071
4071
  };
4072
4072
  } & {
4073
4073
  _: {
4074
- fieldName: "updatedAt";
4074
+ fieldName: "count";
4075
4075
  };
4076
4076
  };
4077
4077
  fieldName: ConvexTextBuilderInitial<""> & {
@@ -4244,7 +4244,7 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
4244
4244
  readonly aggregate_state: ConvexTableWithColumns<{
4245
4245
  name: "aggregate_state";
4246
4246
  columns: {
4247
- tableKey: ConvexTextBuilderInitial<""> & {
4247
+ kind: ConvexTextBuilderInitial<""> & {
4248
4248
  _: {
4249
4249
  notNull: true;
4250
4250
  };
@@ -4254,23 +4254,19 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
4254
4254
  };
4255
4255
  } & {
4256
4256
  _: {
4257
- fieldName: "tableKey";
4257
+ fieldName: "kind";
4258
4258
  };
4259
4259
  };
4260
- indexName: ConvexTextBuilderInitial<""> & {
4261
- _: {
4262
- notNull: true;
4263
- };
4264
- } & {
4260
+ cursor: ConvexTextBuilderInitial<""> & {
4265
4261
  _: {
4266
4262
  tableName: "aggregate_state";
4267
4263
  };
4268
4264
  } & {
4269
4265
  _: {
4270
- fieldName: "indexName";
4266
+ fieldName: "cursor";
4271
4267
  };
4272
4268
  };
4273
- updatedAt: ConvexNumberBuilderInitial<""> & {
4269
+ tableKey: ConvexTextBuilderInitial<""> & {
4274
4270
  _: {
4275
4271
  notNull: true;
4276
4272
  };
@@ -4280,10 +4276,10 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
4280
4276
  };
4281
4277
  } & {
4282
4278
  _: {
4283
- fieldName: "updatedAt";
4279
+ fieldName: "tableKey";
4284
4280
  };
4285
4281
  };
4286
- kind: ConvexTextBuilderInitial<""> & {
4282
+ indexName: ConvexTextBuilderInitial<""> & {
4287
4283
  _: {
4288
4284
  notNull: true;
4289
4285
  };
@@ -4293,7 +4289,7 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
4293
4289
  };
4294
4290
  } & {
4295
4291
  _: {
4296
- fieldName: "kind";
4292
+ fieldName: "indexName";
4297
4293
  };
4298
4294
  };
4299
4295
  keyDefinitionHash: ConvexTextBuilderInitial<""> & {
@@ -4335,16 +4331,20 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
4335
4331
  fieldName: "status";
4336
4332
  };
4337
4333
  };
4338
- cursor: ConvexTextBuilderInitial<""> & {
4334
+ processed: ConvexNumberBuilderInitial<""> & {
4335
+ _: {
4336
+ notNull: true;
4337
+ };
4338
+ } & {
4339
4339
  _: {
4340
4340
  tableName: "aggregate_state";
4341
4341
  };
4342
4342
  } & {
4343
4343
  _: {
4344
- fieldName: "cursor";
4344
+ fieldName: "processed";
4345
4345
  };
4346
4346
  };
4347
- processed: ConvexNumberBuilderInitial<""> & {
4347
+ startedAt: ConvexNumberBuilderInitial<""> & {
4348
4348
  _: {
4349
4349
  notNull: true;
4350
4350
  };
@@ -4354,10 +4354,10 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
4354
4354
  };
4355
4355
  } & {
4356
4356
  _: {
4357
- fieldName: "processed";
4357
+ fieldName: "startedAt";
4358
4358
  };
4359
4359
  };
4360
- startedAt: ConvexNumberBuilderInitial<""> & {
4360
+ updatedAt: ConvexNumberBuilderInitial<""> & {
4361
4361
  _: {
4362
4362
  notNull: true;
4363
4363
  };
@@ -4367,7 +4367,7 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
4367
4367
  };
4368
4368
  } & {
4369
4369
  _: {
4370
- fieldName: "startedAt";
4370
+ fieldName: "updatedAt";
4371
4371
  };
4372
4372
  };
4373
4373
  completedAt: ConvexNumberBuilderInitial<""> & {
@@ -4398,17 +4398,22 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
4398
4398
  readonly migration_state: ConvexTableWithColumns<{
4399
4399
  name: "migration_state";
4400
4400
  columns: {
4401
- updatedAt: ConvexNumberBuilderInitial<""> & {
4401
+ cursor: ConvexTextBuilderInitial<""> & {
4402
4402
  _: {
4403
- notNull: true;
4403
+ tableName: "migration_state";
4404
4404
  };
4405
4405
  } & {
4406
+ _: {
4407
+ fieldName: "cursor";
4408
+ };
4409
+ };
4410
+ direction: ConvexTextBuilderInitial<""> & {
4406
4411
  _: {
4407
4412
  tableName: "migration_state";
4408
4413
  };
4409
4414
  } & {
4410
4415
  _: {
4411
- fieldName: "updatedAt";
4416
+ fieldName: "direction";
4412
4417
  };
4413
4418
  };
4414
4419
  status: ConvexTextBuilderInitial<""> & {
@@ -4424,15 +4429,6 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
4424
4429
  fieldName: "status";
4425
4430
  };
4426
4431
  };
4427
- cursor: ConvexTextBuilderInitial<""> & {
4428
- _: {
4429
- tableName: "migration_state";
4430
- };
4431
- } & {
4432
- _: {
4433
- fieldName: "cursor";
4434
- };
4435
- };
4436
4432
  processed: ConvexNumberBuilderInitial<""> & {
4437
4433
  _: {
4438
4434
  notNull: true;
@@ -4455,6 +4451,19 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
4455
4451
  fieldName: "startedAt";
4456
4452
  };
4457
4453
  };
4454
+ updatedAt: ConvexNumberBuilderInitial<""> & {
4455
+ _: {
4456
+ notNull: true;
4457
+ };
4458
+ } & {
4459
+ _: {
4460
+ tableName: "migration_state";
4461
+ };
4462
+ } & {
4463
+ _: {
4464
+ fieldName: "updatedAt";
4465
+ };
4466
+ };
4458
4467
  completedAt: ConvexNumberBuilderInitial<""> & {
4459
4468
  _: {
4460
4469
  tableName: "migration_state";
@@ -4512,15 +4521,6 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
4512
4521
  fieldName: "applied";
4513
4522
  };
4514
4523
  };
4515
- direction: ConvexTextBuilderInitial<""> & {
4516
- _: {
4517
- tableName: "migration_state";
4518
- };
4519
- } & {
4520
- _: {
4521
- fieldName: "direction";
4522
- };
4523
- };
4524
4524
  runId: ConvexTextBuilderInitial<""> & {
4525
4525
  _: {
4526
4526
  tableName: "migration_state";
@@ -4552,7 +4552,7 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
4552
4552
  readonly migration_run: ConvexTableWithColumns<{
4553
4553
  name: "migration_run";
4554
4554
  columns: {
4555
- updatedAt: ConvexNumberBuilderInitial<""> & {
4555
+ direction: ConvexTextBuilderInitial<""> & {
4556
4556
  _: {
4557
4557
  notNull: true;
4558
4558
  };
@@ -4562,7 +4562,7 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
4562
4562
  };
4563
4563
  } & {
4564
4564
  _: {
4565
- fieldName: "updatedAt";
4565
+ fieldName: "direction";
4566
4566
  };
4567
4567
  };
4568
4568
  status: ConvexTextBuilderInitial<""> & {
@@ -4591,35 +4591,35 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
4591
4591
  fieldName: "startedAt";
4592
4592
  };
4593
4593
  };
4594
- completedAt: ConvexNumberBuilderInitial<""> & {
4594
+ updatedAt: ConvexNumberBuilderInitial<""> & {
4595
+ _: {
4596
+ notNull: true;
4597
+ };
4598
+ } & {
4595
4599
  _: {
4596
4600
  tableName: "migration_run";
4597
4601
  };
4598
4602
  } & {
4599
4603
  _: {
4600
- fieldName: "completedAt";
4604
+ fieldName: "updatedAt";
4601
4605
  };
4602
4606
  };
4603
- lastError: ConvexTextBuilderInitial<""> & {
4607
+ completedAt: ConvexNumberBuilderInitial<""> & {
4604
4608
  _: {
4605
4609
  tableName: "migration_run";
4606
4610
  };
4607
4611
  } & {
4608
4612
  _: {
4609
- fieldName: "lastError";
4613
+ fieldName: "completedAt";
4610
4614
  };
4611
4615
  };
4612
- direction: ConvexTextBuilderInitial<""> & {
4613
- _: {
4614
- notNull: true;
4615
- };
4616
- } & {
4616
+ lastError: ConvexTextBuilderInitial<""> & {
4617
4617
  _: {
4618
4618
  tableName: "migration_run";
4619
4619
  };
4620
4620
  } & {
4621
4621
  _: {
4622
- fieldName: "direction";
4622
+ fieldName: "lastError";
4623
4623
  };
4624
4624
  };
4625
4625
  runId: ConvexTextBuilderInitial<""> & {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kitcn",
3
- "version": "0.12.7",
3
+ "version": "0.12.9",
4
4
  "description": "kitcn - React Query integration and CLI tools for Convex",
5
5
  "keywords": [
6
6
  "convex",