kitcn 0.12.12 → 0.12.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/aggregate/index.d.ts +1 -1
- package/dist/auth/generated/index.d.ts +1 -1
- package/dist/auth/index.d.ts +3 -3
- package/dist/{backend-core-Cf6h5gQc.mjs → backend-core-By8TtoIo.mjs} +168 -26
- package/dist/cli.mjs +11 -2
- package/dist/{generated-contract-disabled-9Yg1NHlV.d.ts → generated-contract-disabled-ngvXLZ4i.d.ts} +1 -1
- package/dist/orm/index.d.ts +1 -1
- package/dist/watcher.mjs +1 -1
- package/dist/{where-clause-compiler-BpfS2FJi.d.ts → where-clause-compiler-CuH2JNxb.d.ts} +8 -8
- package/package.json +1 -1
|
@@ -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-
|
|
1
|
+
import { C as ConvexNumberBuilderInitial, E as ConvexIdBuilderInitial, N as ConvexCustomBuilderInitial, dn as ConvexTableWithColumns, tr as ConvexTextBuilderInitial } from "../where-clause-compiler-CuH2JNxb.js";
|
|
2
2
|
import * as convex_values0 from "convex/values";
|
|
3
3
|
import { GenericId, Infer, Value } from "convex/values";
|
|
4
4
|
import { DocumentByName, GenericDataModel, GenericDatabaseReader, GenericDatabaseWriter, TableNamesInDataModel } from "convex/server";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { S as defineAuth, _ as GenericAuthBeforeResult, b as GenericAuthTriggerHandlers, g as BetterAuthOptionsWithoutDatabase, i as getGeneratedAuthDisabledReason, n as GeneratedAuthDisabledReasonKind, r as createDisabledAuthRuntime, t as AuthRuntime, v as GenericAuthDefinition, x as GenericAuthTriggers, y as GenericAuthTriggerChange } from "../../generated-contract-disabled-
|
|
1
|
+
import { S as defineAuth, _ as GenericAuthBeforeResult, b as GenericAuthTriggerHandlers, g as BetterAuthOptionsWithoutDatabase, i as getGeneratedAuthDisabledReason, n as GeneratedAuthDisabledReasonKind, r as createDisabledAuthRuntime, t as AuthRuntime, v as GenericAuthDefinition, x as GenericAuthTriggers, y as GenericAuthTriggerChange } from "../../generated-contract-disabled-ngvXLZ4i.js";
|
|
2
2
|
export { type AuthRuntime, BetterAuthOptionsWithoutDatabase, type GeneratedAuthDisabledReasonKind, GenericAuthBeforeResult, GenericAuthDefinition, GenericAuthTriggerChange, GenericAuthTriggerHandlers, GenericAuthTriggers, createDisabledAuthRuntime, defineAuth, getGeneratedAuthDisabledReason };
|
package/dist/auth/index.d.ts
CHANGED
|
@@ -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-
|
|
4
|
+
import { S as defineAuth, _ as GenericAuthBeforeResult, a as AuthFunctions, b as GenericAuthTriggerHandlers, c as createApi, d as deleteOneHandler, f as findManyHandler, g as BetterAuthOptionsWithoutDatabase, h as updateOneHandler, i as getGeneratedAuthDisabledReason, l as createHandler, m as updateManyHandler, n as GeneratedAuthDisabledReasonKind, o as Triggers, p as findOneHandler, r as createDisabledAuthRuntime, s as createClient, t as AuthRuntime, u as deleteManyHandler, v as GenericAuthDefinition, x as GenericAuthTriggers, y as GenericAuthTriggerChange } from "../generated-contract-disabled-ngvXLZ4i.js";
|
|
5
5
|
import * as convex_values0 from "convex/values";
|
|
6
6
|
import { Infer } from "convex/values";
|
|
7
7
|
import { DocumentByName, GenericDataModel, GenericMutationCtx, GenericQueryCtx, GenericSchema, PaginationOptions, PaginationResult, SchemaDefinition, TableNamesInDataModel } from "convex/server";
|
|
@@ -112,7 +112,7 @@ declare const adapterWhereValidator: convex_values0.VObject<{
|
|
|
112
112
|
field: convex_values0.VString<string, "required">;
|
|
113
113
|
operator: convex_values0.VUnion<"eq" | "ne" | "lt" | "lte" | "gt" | "gte" | "in" | "not_in" | "contains" | "starts_with" | "ends_with" | undefined, [convex_values0.VLiteral<"lt", "required">, convex_values0.VLiteral<"lte", "required">, convex_values0.VLiteral<"gt", "required">, convex_values0.VLiteral<"gte", "required">, convex_values0.VLiteral<"eq", "required">, convex_values0.VLiteral<"in", "required">, convex_values0.VLiteral<"not_in", "required">, convex_values0.VLiteral<"ne", "required">, convex_values0.VLiteral<"contains", "required">, convex_values0.VLiteral<"starts_with", "required">, convex_values0.VLiteral<"ends_with", "required">], "optional", never>;
|
|
114
114
|
value: convex_values0.VUnion<string | number | boolean | string[] | number[] | null, [convex_values0.VString<string, "required">, convex_values0.VFloat64<number, "required">, convex_values0.VBoolean<boolean, "required">, convex_values0.VArray<string[], convex_values0.VString<string, "required">, "required">, convex_values0.VArray<number[], convex_values0.VFloat64<number, "required">, "required">, convex_values0.VNull<null, "required">], "required", never>;
|
|
115
|
-
}, "required", "
|
|
115
|
+
}, "required", "operator" | "value" | "field" | "connector">;
|
|
116
116
|
declare const adapterArgsValidator: convex_values0.VObject<{
|
|
117
117
|
limit?: number | undefined;
|
|
118
118
|
where?: {
|
|
@@ -155,7 +155,7 @@ declare const adapterArgsValidator: convex_values0.VObject<{
|
|
|
155
155
|
field: convex_values0.VString<string, "required">;
|
|
156
156
|
operator: convex_values0.VUnion<"eq" | "ne" | "lt" | "lte" | "gt" | "gte" | "in" | "not_in" | "contains" | "starts_with" | "ends_with" | undefined, [convex_values0.VLiteral<"lt", "required">, convex_values0.VLiteral<"lte", "required">, convex_values0.VLiteral<"gt", "required">, convex_values0.VLiteral<"gte", "required">, convex_values0.VLiteral<"eq", "required">, convex_values0.VLiteral<"in", "required">, convex_values0.VLiteral<"not_in", "required">, convex_values0.VLiteral<"ne", "required">, convex_values0.VLiteral<"contains", "required">, convex_values0.VLiteral<"starts_with", "required">, convex_values0.VLiteral<"ends_with", "required">], "optional", never>;
|
|
157
157
|
value: convex_values0.VUnion<string | number | boolean | string[] | number[] | null, [convex_values0.VString<string, "required">, convex_values0.VFloat64<number, "required">, convex_values0.VBoolean<boolean, "required">, convex_values0.VArray<string[], convex_values0.VString<string, "required">, "required">, convex_values0.VArray<number[], convex_values0.VFloat64<number, "required">, "required">, convex_values0.VNull<null, "required">], "required", never>;
|
|
158
|
-
}, "required", "
|
|
158
|
+
}, "required", "operator" | "value" | "field" | "connector">, "optional">;
|
|
159
159
|
}, "required", "limit" | "where" | "model" | "select" | "offset" | "sortBy" | "sortBy.field" | "sortBy.direction">;
|
|
160
160
|
declare const hasUniqueFields: (betterAuthSchema: BetterAuthDBSchema, model: string, input: Record<string, any>) => boolean;
|
|
161
161
|
declare const checkUniqueFields: <Schema extends SchemaDefinition<any, any>>(ctx: GenericQueryCtx<GenericDataModel>, schema: Schema, betterAuthSchema: BetterAuthDBSchema, table: string, input: Record<string, any>, doc?: Record<string, any>) => Promise<void>;
|
|
@@ -7,12 +7,12 @@ import { createHash, randomBytes } from "node:crypto";
|
|
|
7
7
|
import { confirm, isCancel, multiselect, select, spinner } from "@clack/prompts";
|
|
8
8
|
import { parse } from "dotenv";
|
|
9
9
|
import { execa } from "execa";
|
|
10
|
-
import { createJiti } from "jiti";
|
|
11
10
|
import { v } from "convex/values";
|
|
12
11
|
import "convex/server";
|
|
13
12
|
import { createInterface } from "node:readline/promises";
|
|
14
13
|
import { build } from "esbuild";
|
|
15
14
|
import { createColors } from "picocolors";
|
|
15
|
+
import { createJiti } from "jiti";
|
|
16
16
|
import os from "node:os";
|
|
17
17
|
import { parse as parse$1 } from "@babel/parser";
|
|
18
18
|
|
|
@@ -2195,6 +2195,161 @@ const highlighter = {
|
|
|
2195
2195
|
}
|
|
2196
2196
|
};
|
|
2197
2197
|
|
|
2198
|
+
//#endregion
|
|
2199
|
+
//#region src/cli/utils/project-jiti.ts
|
|
2200
|
+
const JITI_EXPORT_CONDITION_PRIORITY = [
|
|
2201
|
+
"bun",
|
|
2202
|
+
"import",
|
|
2203
|
+
"module",
|
|
2204
|
+
"default",
|
|
2205
|
+
"require"
|
|
2206
|
+
];
|
|
2207
|
+
const SERVER_PARSER_SHIM_SOURCE = `const createProcedureBuilder = () => {
|
|
2208
|
+
const builder = {
|
|
2209
|
+
internal() {
|
|
2210
|
+
return builder;
|
|
2211
|
+
},
|
|
2212
|
+
use() {
|
|
2213
|
+
return builder;
|
|
2214
|
+
},
|
|
2215
|
+
meta() {
|
|
2216
|
+
return builder;
|
|
2217
|
+
},
|
|
2218
|
+
input() {
|
|
2219
|
+
return builder;
|
|
2220
|
+
},
|
|
2221
|
+
output() {
|
|
2222
|
+
return builder;
|
|
2223
|
+
},
|
|
2224
|
+
query(handler) {
|
|
2225
|
+
return {
|
|
2226
|
+
_crpcMeta: { type: "query" },
|
|
2227
|
+
_handler: handler,
|
|
2228
|
+
};
|
|
2229
|
+
},
|
|
2230
|
+
mutation(handler) {
|
|
2231
|
+
return {
|
|
2232
|
+
_crpcMeta: { type: "mutation" },
|
|
2233
|
+
_handler: handler,
|
|
2234
|
+
};
|
|
2235
|
+
},
|
|
2236
|
+
action(handler) {
|
|
2237
|
+
return {
|
|
2238
|
+
_crpcMeta: { type: "action" },
|
|
2239
|
+
_handler: handler,
|
|
2240
|
+
};
|
|
2241
|
+
},
|
|
2242
|
+
};
|
|
2243
|
+
|
|
2244
|
+
return builder;
|
|
2245
|
+
};
|
|
2246
|
+
|
|
2247
|
+
export const initCRPC = {
|
|
2248
|
+
meta() {
|
|
2249
|
+
return this;
|
|
2250
|
+
},
|
|
2251
|
+
dataModel() {
|
|
2252
|
+
return this;
|
|
2253
|
+
},
|
|
2254
|
+
context() {
|
|
2255
|
+
return this;
|
|
2256
|
+
},
|
|
2257
|
+
create() {
|
|
2258
|
+
return {
|
|
2259
|
+
query: createProcedureBuilder(),
|
|
2260
|
+
mutation: createProcedureBuilder(),
|
|
2261
|
+
action: createProcedureBuilder(),
|
|
2262
|
+
httpAction: createProcedureBuilder(),
|
|
2263
|
+
router: (record = {}) => record,
|
|
2264
|
+
};
|
|
2265
|
+
},
|
|
2266
|
+
};
|
|
2267
|
+
|
|
2268
|
+
export class CRPCError extends Error {
|
|
2269
|
+
constructor(options = {}) {
|
|
2270
|
+
super(options.message ?? options.code ?? "CRPC error");
|
|
2271
|
+
this.code = options.code;
|
|
2272
|
+
}
|
|
2273
|
+
}
|
|
2274
|
+
|
|
2275
|
+
export const createEnv = ({ schema }) => () =>
|
|
2276
|
+
typeof schema?.parse === "function" ? schema.parse(process.env) : process.env;
|
|
2277
|
+
export const createHttpRouter = (_app, httpRouter) => httpRouter ?? {};
|
|
2278
|
+
export const createCallerFactory = () => () => ({});
|
|
2279
|
+
export const createApiLeaf = (fnOrRoot, pathOrMeta, maybeMeta) => {
|
|
2280
|
+
const meta = maybeMeta ?? pathOrMeta;
|
|
2281
|
+
const fn = Array.isArray(pathOrMeta)
|
|
2282
|
+
? pathOrMeta.reduce((current, segment) => current?.[segment], fnOrRoot)
|
|
2283
|
+
: fnOrRoot;
|
|
2284
|
+
return Object.assign(fn ?? {}, meta ?? {}, { functionRef: fn });
|
|
2285
|
+
};
|
|
2286
|
+
export const createGeneratedFunctionReference = (name) => ({
|
|
2287
|
+
[Symbol.for("functionName")]: name,
|
|
2288
|
+
});
|
|
2289
|
+
export const typedProcedureResolver = (_functionRef, resolver) => resolver;
|
|
2290
|
+
export const createGeneratedRegistryRuntime = () => ({
|
|
2291
|
+
getCallerFactory() {
|
|
2292
|
+
return () => ({});
|
|
2293
|
+
},
|
|
2294
|
+
getHandlerFactory() {
|
|
2295
|
+
return () => ({});
|
|
2296
|
+
},
|
|
2297
|
+
});
|
|
2298
|
+
`;
|
|
2299
|
+
const resolveJitiExportTarget = (target) => {
|
|
2300
|
+
if (typeof target === "string") return target;
|
|
2301
|
+
if (Array.isArray(target)) {
|
|
2302
|
+
for (const entry of target) {
|
|
2303
|
+
const resolved = resolveJitiExportTarget(entry);
|
|
2304
|
+
if (resolved) return resolved;
|
|
2305
|
+
}
|
|
2306
|
+
return null;
|
|
2307
|
+
}
|
|
2308
|
+
if (!target || typeof target !== "object") return null;
|
|
2309
|
+
const record = target;
|
|
2310
|
+
for (const condition of JITI_EXPORT_CONDITION_PRIORITY) {
|
|
2311
|
+
const resolved = resolveJitiExportTarget(record[condition]);
|
|
2312
|
+
if (resolved) return resolved;
|
|
2313
|
+
}
|
|
2314
|
+
for (const value of Object.values(record)) {
|
|
2315
|
+
const resolved = resolveJitiExportTarget(value);
|
|
2316
|
+
if (resolved) return resolved;
|
|
2317
|
+
}
|
|
2318
|
+
return null;
|
|
2319
|
+
};
|
|
2320
|
+
const buildLocalPackageExportAliases = (cwd, packageName) => {
|
|
2321
|
+
const packageDir = path.join(cwd, "node_modules", ...packageName.split("/"));
|
|
2322
|
+
const packageJsonPath = path.join(packageDir, "package.json");
|
|
2323
|
+
if (!fs.existsSync(packageJsonPath)) return {};
|
|
2324
|
+
const exportsField = JSON.parse(fs.readFileSync(packageJsonPath, "utf8")).exports;
|
|
2325
|
+
if (!exportsField || typeof exportsField !== "object" || Array.isArray(exportsField)) return {};
|
|
2326
|
+
const aliases = {};
|
|
2327
|
+
for (const [exportKey, exportTarget] of Object.entries(exportsField)) {
|
|
2328
|
+
const resolvedTarget = resolveJitiExportTarget(exportTarget);
|
|
2329
|
+
if (!resolvedTarget || !resolvedTarget.startsWith("./")) continue;
|
|
2330
|
+
const specifier = exportKey === "." ? packageName : exportKey.startsWith("./") ? `${packageName}${exportKey.slice(1)}` : null;
|
|
2331
|
+
if (!specifier) continue;
|
|
2332
|
+
aliases[specifier] = path.join(packageDir, resolvedTarget);
|
|
2333
|
+
}
|
|
2334
|
+
return aliases;
|
|
2335
|
+
};
|
|
2336
|
+
const ensureServerParserShim = (cwd) => {
|
|
2337
|
+
const shimDir = path.join(cwd, "node_modules", ".kitcn");
|
|
2338
|
+
const shimPath = path.join(shimDir, "project-jiti-server-shim.mjs");
|
|
2339
|
+
fs.mkdirSync(shimDir, { recursive: true });
|
|
2340
|
+
if (!fs.existsSync(shimPath) || fs.readFileSync(shimPath, "utf8") !== SERVER_PARSER_SHIM_SOURCE) fs.writeFileSync(shimPath, SERVER_PARSER_SHIM_SOURCE, "utf8");
|
|
2341
|
+
return shimPath;
|
|
2342
|
+
};
|
|
2343
|
+
const createProjectJiti = (cwd = process.cwd()) => createJiti(cwd, {
|
|
2344
|
+
interopDefault: true,
|
|
2345
|
+
moduleCache: false,
|
|
2346
|
+
alias: {
|
|
2347
|
+
...buildLocalPackageExportAliases(cwd, "kitcn"),
|
|
2348
|
+
...buildLocalPackageExportAliases(cwd, "convex"),
|
|
2349
|
+
"kitcn/server": ensureServerParserShim(cwd)
|
|
2350
|
+
}
|
|
2351
|
+
});
|
|
2352
|
+
|
|
2198
2353
|
//#endregion
|
|
2199
2354
|
//#region src/cli/analyze.ts
|
|
2200
2355
|
const MB = 1024 * 1024;
|
|
@@ -2427,10 +2582,7 @@ const listConvexHandlerExports = async (entryPoint, jitiInstance) => {
|
|
|
2427
2582
|
const scanHandlerExportsByEntry = async (entryPoints) => {
|
|
2428
2583
|
globalThis.__KITCN_CODEGEN__ = true;
|
|
2429
2584
|
try {
|
|
2430
|
-
const jitiInstance =
|
|
2431
|
-
interopDefault: true,
|
|
2432
|
-
moduleCache: false
|
|
2433
|
-
});
|
|
2585
|
+
const jitiInstance = createProjectJiti();
|
|
2434
2586
|
const results = await Promise.all(entryPoints.map(async (entryPoint) => ({
|
|
2435
2587
|
entryPoint,
|
|
2436
2588
|
exportNames: await listConvexHandlerExports(entryPoint, jitiInstance)
|
|
@@ -4166,10 +4318,7 @@ async function resolveSchemaMetadataForCodegen(functionsDir, debug) {
|
|
|
4166
4318
|
hasRelations: false,
|
|
4167
4319
|
hasTriggers: false
|
|
4168
4320
|
};
|
|
4169
|
-
const jitiInstance =
|
|
4170
|
-
interopDefault: true,
|
|
4171
|
-
moduleCache: false
|
|
4172
|
-
});
|
|
4321
|
+
const jitiInstance = createProjectJiti();
|
|
4173
4322
|
try {
|
|
4174
4323
|
const schemaModule = await jitiInstance.import(schemaPath);
|
|
4175
4324
|
const schemaValue = schemaModule && typeof schemaModule === "object" ? schemaModule.default ?? schemaModule : null;
|
|
@@ -4803,10 +4952,7 @@ async function generateMeta(sharedDir, options) {
|
|
|
4803
4952
|
if (generateApi) {
|
|
4804
4953
|
globalThis.__KITCN_CODEGEN__ = true;
|
|
4805
4954
|
try {
|
|
4806
|
-
const jitiInstance =
|
|
4807
|
-
interopDefault: true,
|
|
4808
|
-
moduleCache: false
|
|
4809
|
-
});
|
|
4955
|
+
const jitiInstance = createProjectJiti();
|
|
4810
4956
|
const files = listFilesRecursive(functionsDir).filter((file) => file.endsWith(".ts") && isValidConvexFile(file));
|
|
4811
4957
|
const existingRuntimeFilesBeforeParse = new Set(listGeneratedRuntimeFiles(functionsDir));
|
|
4812
4958
|
const runtimePlaceholderModules = [...new Set([
|
|
@@ -6465,10 +6611,7 @@ const readPluginRootSchemaOwnership = (value) => {
|
|
|
6465
6611
|
const resolveSchemaInstalledPlugins = async (functionsDir) => {
|
|
6466
6612
|
const schemaPath = getSchemaFilePath(functionsDir);
|
|
6467
6613
|
if (!fs.existsSync(schemaPath)) return [];
|
|
6468
|
-
const jiti =
|
|
6469
|
-
interopDefault: true,
|
|
6470
|
-
moduleCache: false
|
|
6471
|
-
});
|
|
6614
|
+
const jiti = createProjectJiti();
|
|
6472
6615
|
try {
|
|
6473
6616
|
const schemaModule = await jiti.import(schemaPath);
|
|
6474
6617
|
const schemaValue = schemaModule && typeof schemaModule === "object" ? schemaModule.default ?? schemaModule : null;
|
|
@@ -9072,10 +9215,7 @@ const loadAuthOptionsFromDefinition = async (authDefinitionPath) => {
|
|
|
9072
9215
|
fs.writeFileSync(tempAuthPath, authSource.replaceAll(GENERATED_AUTH_IMPORT_RE, `./generated/${tempGeneratedAuthBase}`), "utf8");
|
|
9073
9216
|
}
|
|
9074
9217
|
try {
|
|
9075
|
-
const authModule = await
|
|
9076
|
-
interopDefault: true,
|
|
9077
|
-
moduleCache: false
|
|
9078
|
-
}).import(importPath);
|
|
9218
|
+
const authModule = await createProjectJiti().import(importPath);
|
|
9079
9219
|
const authDefinition = authModule && typeof authModule === "object" ? authModule.default : null;
|
|
9080
9220
|
if (typeof authDefinition !== "function") return null;
|
|
9081
9221
|
const authOptions = authDefinition({});
|
|
@@ -12327,6 +12467,11 @@ const CONVEX_DEPLOYMENT_ENV_KEYS = [
|
|
|
12327
12467
|
"CONVEX_SELF_HOSTED_ADMIN_KEY"
|
|
12328
12468
|
];
|
|
12329
12469
|
const LOCAL_CONVEX_DEPLOYMENT_PREFIXES = ["local:", "anonymous:"];
|
|
12470
|
+
const LOCAL_CONVEX_DEPLOYMENT_VALUES = ["anonymous-agent"];
|
|
12471
|
+
function isLocalConvexDeploymentValue(deployment) {
|
|
12472
|
+
if (!deployment) return false;
|
|
12473
|
+
return LOCAL_CONVEX_DEPLOYMENT_VALUES.includes(deployment) || LOCAL_CONVEX_DEPLOYMENT_PREFIXES.some((prefix) => deployment.startsWith(prefix));
|
|
12474
|
+
}
|
|
12330
12475
|
function createBackendCommandEnv(overrides) {
|
|
12331
12476
|
const clearedDeploymentEnv = Object.fromEntries(CONVEX_DEPLOYMENT_ENV_KEYS.map((key) => [key, void 0]));
|
|
12332
12477
|
return {
|
|
@@ -12337,7 +12482,7 @@ function createBackendCommandEnv(overrides) {
|
|
|
12337
12482
|
}
|
|
12338
12483
|
function hasRemoteConvexDeploymentEnv(env) {
|
|
12339
12484
|
const deployment = env.CONVEX_DEPLOYMENT?.trim();
|
|
12340
|
-
if (deployment && !
|
|
12485
|
+
if (deployment && !isLocalConvexDeploymentValue(deployment)) return true;
|
|
12341
12486
|
return Boolean(env.CONVEX_DEPLOY_KEY?.trim() || env.CONVEX_SELF_HOSTED_URL?.trim() || env.CONVEX_SELF_HOSTED_ADMIN_KEY?.trim());
|
|
12342
12487
|
}
|
|
12343
12488
|
function readConvexTargetEnvFile(args, cwd = process.cwd()) {
|
|
@@ -13727,10 +13872,7 @@ function buildAggregateFingerprintPayload(tables) {
|
|
|
13727
13872
|
async function computeAggregateIndexFingerprint(functionsDir) {
|
|
13728
13873
|
const schemaPath = join(functionsDir, "schema.ts");
|
|
13729
13874
|
if (!fs.existsSync(schemaPath)) return null;
|
|
13730
|
-
const schemaModule = await
|
|
13731
|
-
interopDefault: true,
|
|
13732
|
-
moduleCache: false
|
|
13733
|
-
}).import(schemaPath);
|
|
13875
|
+
const schemaModule = await createProjectJiti().import(schemaPath);
|
|
13734
13876
|
if (!schemaModule || typeof schemaModule !== "object") return null;
|
|
13735
13877
|
const schemaValue = resolveSchemaDefaultExport(schemaModule);
|
|
13736
13878
|
if (!schemaValue) return null;
|
package/dist/cli.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { $ as resolvePluginPreset, A as resolveConfiguredBackend, B as runConvexInitIfNeeded, C as isInitialized, D as readPackageVersions, E as parseInitCommandArgs, F as runAfterScaffoldScript, G as trackProcess, H as runInitCommandFlow, I as runAggregateBackfillFlow, J as collectPluginScaffoldTemplates, K as withWorkingDirectory, L as runAggregatePruneFlow, M as resolveInitProjectDir, N as resolveMigrationConfig, O as resolveBackfillConfig, P as resolveRunDeps, Q as resolveAddTemplateDefaults, R as runBackendFunction, S as isEntryPoint, T as parseBackendRunJson, Tt as highlighter, U as runMigrationCreate, V as runDevSchemaBackfillIfNeeded, W as runMigrationFlow, X as promptForPluginSelection, Y as filterScaffoldTemplatePathMap, Z as promptForScaffoldTemplateSelection, _ as formatInfoOutput, _t as inspectPluginDependencyInstall, a as cleanup, at as isSupportedPluginKey, b as hasRemoteConvexDeploymentEnv, bt as serializeEnvValue, c as createCommandEnv, ct as assertSchemaFileExists, d as extractBackfillCliOptions, dt as getSchemaFilePath, et as resolvePresetScaffoldTemplates, f as extractConcaveRunTargetArgs, ft as readPluginLockfile, g as formatDocsOutput, gt as applyPluginDependencyInstall, h as extractResetCliOptions, ht as applyPlanningDependencyInstall, i as buildInitializationPlan, it as getSupportedPluginKeys, j as resolveDocTopic, k as resolveCodegenTrimSegments, l as ensureConvexGitignoreEntry, lt as collectInstalledPluginKeys, m as extractMigrationDownOptions, mt as applyDependencyHintsInstall, n as applyPluginInstallPlanFiles, nt as resolveTemplatesByIdOrThrow, o as createBackendAdapter, ot as buildPluginInstallPlan, p as extractMigrationCliOptions, pt as resolveSchemaInstalledPlugins, q as createSpinner, r as assertNoRemovedDevPreRunFlag, rt as getPluginCatalogEntry, s as createBackendCommandEnv, st as resolvePluginScaffoldRoots, t as applyDependencyInstallPlan, tt as resolveTemplateSelectionSource, u as extractBackendRunTargetArgs, ut as getPluginLockfilePath, v as getAggregateBackfillDeploymentKey, vt as resolveProjectScaffoldContext, w as parseArgs, wt as logger, x as isConvexDevPreRunConflictFlag, xt as stripConvexCommandNoise, y as getDevAggregateBackfillStatePath, yt as resolveAuthEnvState, z as runConfiguredCodegen } from "./backend-core-
|
|
2
|
+
import { $ as resolvePluginPreset, A as resolveConfiguredBackend, B as runConvexInitIfNeeded, C as isInitialized, D as readPackageVersions, E as parseInitCommandArgs, F as runAfterScaffoldScript, G as trackProcess, H as runInitCommandFlow, I as runAggregateBackfillFlow, J as collectPluginScaffoldTemplates, K as withWorkingDirectory, L as runAggregatePruneFlow, M as resolveInitProjectDir, N as resolveMigrationConfig, O as resolveBackfillConfig, P as resolveRunDeps, Q as resolveAddTemplateDefaults, R as runBackendFunction, S as isEntryPoint, T as parseBackendRunJson, Tt as highlighter, U as runMigrationCreate, V as runDevSchemaBackfillIfNeeded, W as runMigrationFlow, X as promptForPluginSelection, Y as filterScaffoldTemplatePathMap, Z as promptForScaffoldTemplateSelection, _ as formatInfoOutput, _t as inspectPluginDependencyInstall, a as cleanup, at as isSupportedPluginKey, b as hasRemoteConvexDeploymentEnv, bt as serializeEnvValue, c as createCommandEnv, ct as assertSchemaFileExists, d as extractBackfillCliOptions, dt as getSchemaFilePath, et as resolvePresetScaffoldTemplates, f as extractConcaveRunTargetArgs, ft as readPluginLockfile, g as formatDocsOutput, gt as applyPluginDependencyInstall, h as extractResetCliOptions, ht as applyPlanningDependencyInstall, i as buildInitializationPlan, it as getSupportedPluginKeys, j as resolveDocTopic, k as resolveCodegenTrimSegments, l as ensureConvexGitignoreEntry, lt as collectInstalledPluginKeys, m as extractMigrationDownOptions, mt as applyDependencyHintsInstall, n as applyPluginInstallPlanFiles, nt as resolveTemplatesByIdOrThrow, o as createBackendAdapter, ot as buildPluginInstallPlan, p as extractMigrationCliOptions, pt as resolveSchemaInstalledPlugins, q as createSpinner, r as assertNoRemovedDevPreRunFlag, rt as getPluginCatalogEntry, s as createBackendCommandEnv, st as resolvePluginScaffoldRoots, t as applyDependencyInstallPlan, tt as resolveTemplateSelectionSource, u as extractBackendRunTargetArgs, ut as getPluginLockfilePath, v as getAggregateBackfillDeploymentKey, vt as resolveProjectScaffoldContext, w as parseArgs, wt as logger, x as isConvexDevPreRunConflictFlag, xt as stripConvexCommandNoise, y as getDevAggregateBackfillStatePath, yt as resolveAuthEnvState, z as runConfiguredCodegen } from "./backend-core-By8TtoIo.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";
|
|
@@ -652,6 +652,12 @@ function resolveImplicitConvexRemoteDeploymentEnv(cwd = process.cwd()) {
|
|
|
652
652
|
CONVEX_SELF_HOSTED_ADMIN_KEY: parsed.CONVEX_SELF_HOSTED_ADMIN_KEY
|
|
653
653
|
};
|
|
654
654
|
}
|
|
655
|
+
function resolveImplicitConvexAnonymousAgentMode(cwd = process.cwd()) {
|
|
656
|
+
const envLocalPath = join(cwd, ".env.local");
|
|
657
|
+
if (!fs.existsSync(envLocalPath)) return;
|
|
658
|
+
const deployment = parseEnv(fs.readFileSync(envLocalPath, "utf8")).CONVEX_DEPLOYMENT?.trim();
|
|
659
|
+
if (deployment === "anonymous-agent" || deployment?.startsWith("anonymous:")) return "anonymous";
|
|
660
|
+
}
|
|
655
661
|
function resolveConvexEnvFileCommandEnv(args, cwd = process.cwd()) {
|
|
656
662
|
let envFilePath = null;
|
|
657
663
|
for (let i = 0; i < args.length; i += 1) {
|
|
@@ -874,6 +880,7 @@ const handleDevCommand = async (argv, deps) => {
|
|
|
874
880
|
const explicitConvexTargetArgs = extractBackendRunTargetArgs("convex", convexDevArgs);
|
|
875
881
|
const explicitConvexCommandEnv = resolveConvexEnvFileCommandEnv(convexDevArgs);
|
|
876
882
|
const implicitConvexCommandEnv = backend === "convex" && explicitConvexTargetArgs.length === 0 && explicitConvexCommandEnv === null ? resolveImplicitConvexRemoteDeploymentEnv() : null;
|
|
883
|
+
const implicitConvexAgentMode = backend === "convex" && explicitConvexTargetArgs.length === 0 && !explicitConvexCommandEnv?.CONVEX_AGENT_MODE && !implicitConvexCommandEnv?.CONVEX_AGENT_MODE ? resolveImplicitConvexAnonymousAgentMode() : void 0;
|
|
877
884
|
const effectiveConvexCommandEnv = explicitConvexCommandEnv ?? implicitConvexCommandEnv;
|
|
878
885
|
const preRunFunction = config.dev.preRun;
|
|
879
886
|
if (bootstrap && backend !== "convex") throw new Error("`kitcn dev --bootstrap` is only supported for backend convex.");
|
|
@@ -919,7 +926,8 @@ const handleDevCommand = async (argv, deps) => {
|
|
|
919
926
|
echoOutput: false,
|
|
920
927
|
env: {
|
|
921
928
|
...localNodeEnvOverrides,
|
|
922
|
-
...effectiveConvexCommandEnv
|
|
929
|
+
...effectiveConvexCommandEnv,
|
|
930
|
+
...implicitConvexAgentMode ? { CONVEX_AGENT_MODE: implicitConvexAgentMode } : {}
|
|
923
931
|
},
|
|
924
932
|
targetArgs
|
|
925
933
|
});
|
|
@@ -970,6 +978,7 @@ const handleDevCommand = async (argv, deps) => {
|
|
|
970
978
|
env: createBackendCommandEnv({
|
|
971
979
|
...localNodeEnvOverrides,
|
|
972
980
|
...effectiveConvexCommandEnv,
|
|
981
|
+
...implicitConvexAgentMode ? { CONVEX_AGENT_MODE: implicitConvexAgentMode } : {},
|
|
973
982
|
...concaveLocalDevContract?.backendEnv
|
|
974
983
|
}),
|
|
975
984
|
reject: false
|
package/dist/{generated-contract-disabled-9Yg1NHlV.d.ts → generated-contract-disabled-ngvXLZ4i.d.ts}
RENAMED
|
@@ -216,8 +216,8 @@ 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
|
-
join?: any;
|
|
220
219
|
limit?: number | undefined;
|
|
220
|
+
join?: any;
|
|
221
221
|
where?: {
|
|
222
222
|
operator?: "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | "in" | "not_in" | "contains" | "starts_with" | "ends_with" | undefined;
|
|
223
223
|
connector?: "AND" | "OR" | undefined;
|
package/dist/orm/index.d.ts
CHANGED
|
@@ -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-
|
|
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";
|
package/dist/watcher.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { A as resolveConfiguredBackend, Ct as getConvexConfig, P as resolveRunDeps, St as generateMeta, wt as logger } from "./backend-core-
|
|
2
|
+
import { A as resolveConfiguredBackend, Ct as getConvexConfig, P as resolveRunDeps, St as generateMeta, wt as logger } from "./backend-core-By8TtoIo.mjs";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import { fileURLToPath } from "node:url";
|
|
5
5
|
|
|
@@ -3992,11 +3992,7 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
3992
3992
|
readonly aggregate_extrema: ConvexTableWithColumns<{
|
|
3993
3993
|
name: "aggregate_extrema";
|
|
3994
3994
|
columns: {
|
|
3995
|
-
|
|
3996
|
-
_: {
|
|
3997
|
-
$type: convex_values0.Value;
|
|
3998
|
-
};
|
|
3999
|
-
} & {
|
|
3995
|
+
count: ConvexNumberBuilderInitial<""> & {
|
|
4000
3996
|
_: {
|
|
4001
3997
|
notNull: true;
|
|
4002
3998
|
};
|
|
@@ -4006,10 +4002,14 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
4006
4002
|
};
|
|
4007
4003
|
} & {
|
|
4008
4004
|
_: {
|
|
4009
|
-
fieldName: "
|
|
4005
|
+
fieldName: "count";
|
|
4010
4006
|
};
|
|
4011
4007
|
};
|
|
4012
|
-
|
|
4008
|
+
value: ConvexCustomBuilderInitial<"", convex_values0.VAny<any, "required", string>> & {
|
|
4009
|
+
_: {
|
|
4010
|
+
$type: convex_values0.Value;
|
|
4011
|
+
};
|
|
4012
|
+
} & {
|
|
4013
4013
|
_: {
|
|
4014
4014
|
notNull: true;
|
|
4015
4015
|
};
|
|
@@ -4019,7 +4019,7 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
4019
4019
|
};
|
|
4020
4020
|
} & {
|
|
4021
4021
|
_: {
|
|
4022
|
-
fieldName: "
|
|
4022
|
+
fieldName: "value";
|
|
4023
4023
|
};
|
|
4024
4024
|
};
|
|
4025
4025
|
tableKey: ConvexTextBuilderInitial<""> & {
|