kitcn 0.12.17 → 0.12.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/aggregate/index.d.ts +1 -1
- package/dist/{api-entry-BckXqaLb.js → api-entry-BMCQSsCw.js} +6 -1
- package/dist/auth/client/index.js +82 -1
- package/dist/auth/generated/index.d.ts +1 -1
- package/dist/auth/index.d.ts +13 -13
- package/dist/auth/index.js +1 -1
- package/dist/auth/nextjs/index.d.ts +1 -1
- package/dist/auth/start/index.d.ts +7 -1
- package/dist/auth/start/index.js +37 -0
- package/dist/{auth-store-Cljlmdmi.js → auth-store-C0iMu34r.js} +53 -1
- package/dist/{backend-core-Rv9NorIW.mjs → backend-core-C0uwGXLx.mjs} +202 -167
- package/dist/{builder-CBdG5W6A.js → builder-Cb6gloDB.js} +161 -6
- package/dist/cli.mjs +1 -1
- package/dist/{context-utils-HPC5nXzx.d.ts → context-utils-BvWW0Ilq.d.ts} +8 -1
- package/dist/crpc/index.d.ts +2 -2
- package/dist/{generated-contract-disabled-Dzx2IRId.d.ts → generated-contract-disabled-UsFjh8jz.d.ts} +30 -30
- package/dist/{http-types-BS63Nsug.d.ts → http-types-BLFA9zS7.d.ts} +2 -1
- package/dist/{middleware-C2qTZ3V7.js → middleware-DkIhQXwg.js} +1 -1
- package/dist/{middleware-CU0mDiRs.d.ts → middleware-nS_qXecO.d.ts} +1 -1
- package/dist/orm/index.d.ts +1 -1
- package/dist/plugins/index.d.ts +1 -1
- package/dist/plugins/index.js +1 -1
- package/dist/{procedure-caller-MWcxhQDv.js → procedure-caller-AjLfkHyF.js} +1 -1
- package/dist/{procedure-caller-C15h5Iel.d.ts → procedure-name-D-fDCBlo.d.ts} +33 -131
- package/dist/ratelimit/index.d.ts +2 -2
- package/dist/ratelimit/index.js +3 -3
- package/dist/react/index.js +7 -2
- package/dist/rsc/index.d.ts +3 -3
- package/dist/server/index.d.ts +5 -5
- package/dist/server/index.js +4 -4
- package/dist/{types-DrB2VeNb.d.ts → types-C6pQrnzD.d.ts} +1 -1
- package/dist/{types-BqUIoMfT.d.ts → types-a-RHmrDZ.d.ts} +9 -1
- package/dist/watcher.mjs +12 -9
- package/dist/{where-clause-compiler-DdjN63Io.d.ts → where-clause-compiler-CuH2JNxb.d.ts} +12 -12
- package/package.json +1 -1
- package/skills/convex/SKILL.md +8 -4
- package/skills/convex/references/features/auth-organizations.md +7 -2
- package/skills/convex/references/features/react.md +18 -3
|
@@ -731,6 +731,7 @@ var CRPCError = class extends ConvexError {
|
|
|
731
731
|
const cause = getCauseFromUnknown(opts.cause);
|
|
732
732
|
const message = opts.message ?? cause?.message ?? opts.code;
|
|
733
733
|
super({
|
|
734
|
+
...opts.data ?? {},
|
|
734
735
|
code: opts.code,
|
|
735
736
|
message
|
|
736
737
|
});
|
|
@@ -924,9 +925,19 @@ function createNewHttpBuilder(def1, def2) {
|
|
|
924
925
|
...def2
|
|
925
926
|
});
|
|
926
927
|
}
|
|
928
|
+
function resolveHttpProcedureInfo(def) {
|
|
929
|
+
const route = def.route;
|
|
930
|
+
return {
|
|
931
|
+
type: "httpAction",
|
|
932
|
+
name: def.procedureName ?? (route ? `${route.method} ${route.path}` : void 0),
|
|
933
|
+
method: route?.method,
|
|
934
|
+
path: route?.path
|
|
935
|
+
};
|
|
936
|
+
}
|
|
927
937
|
/** Internal method to create the HTTP procedure */
|
|
928
938
|
function createProcedure(def, handler, _type) {
|
|
929
939
|
if (!def.route) throw new Error("Route must be defined before action. Use .route(path, method) first.");
|
|
940
|
+
const middlewareProcedure = resolveHttpProcedureInfo(def);
|
|
930
941
|
/**
|
|
931
942
|
* Hono-compatible handler function.
|
|
932
943
|
* When used with HttpRouterWithHono, Convex ctx is passed via c.env.
|
|
@@ -946,6 +957,7 @@ function createProcedure(def, handler, _type) {
|
|
|
946
957
|
for (const middleware of def.middlewares) {
|
|
947
958
|
const result = await middleware({
|
|
948
959
|
ctx,
|
|
960
|
+
procedure: middlewareProcedure,
|
|
949
961
|
input: currentInput,
|
|
950
962
|
getRawInput,
|
|
951
963
|
next: async (opts) => {
|
|
@@ -1091,6 +1103,9 @@ function createHttpBuilder(def) {
|
|
|
1091
1103
|
...value
|
|
1092
1104
|
} : value });
|
|
1093
1105
|
},
|
|
1106
|
+
name(value) {
|
|
1107
|
+
return createNewHttpBuilder(def, { procedureName: value });
|
|
1108
|
+
},
|
|
1094
1109
|
route(path, method) {
|
|
1095
1110
|
const pathParamNames = extractPathParams(path);
|
|
1096
1111
|
return createNewHttpBuilder(def, { route: {
|
|
@@ -1362,6 +1377,117 @@ function extractRouteMap(procedures) {
|
|
|
1362
1377
|
return result;
|
|
1363
1378
|
}
|
|
1364
1379
|
|
|
1380
|
+
//#endregion
|
|
1381
|
+
//#region src/server/procedure-name.ts
|
|
1382
|
+
const LOOKUP_KEY = "__KITCN_PROCEDURE_NAME_LOOKUP__";
|
|
1383
|
+
const HINTS_KEY = "__KITCN_PROCEDURE_NAME_HINTS__";
|
|
1384
|
+
const PATH_SEPARATOR_RE = /\\/g;
|
|
1385
|
+
const TRIM_SLASHES_RE = /^\/+|\/+$/g;
|
|
1386
|
+
const PACKAGE_FRAME_MARKERS = ["/node_modules/kitcn/", "/packages/kitcn/"];
|
|
1387
|
+
function decodeFileName(value) {
|
|
1388
|
+
if (!value.startsWith("file://")) return value;
|
|
1389
|
+
try {
|
|
1390
|
+
return decodeURIComponent(new URL(value).pathname);
|
|
1391
|
+
} catch {
|
|
1392
|
+
return value;
|
|
1393
|
+
}
|
|
1394
|
+
}
|
|
1395
|
+
function normalizePath(value) {
|
|
1396
|
+
return value.replace(PATH_SEPARATOR_RE, "/");
|
|
1397
|
+
}
|
|
1398
|
+
function normalizeHint(value) {
|
|
1399
|
+
return normalizePath(value).replace(TRIM_SLASHES_RE, "");
|
|
1400
|
+
}
|
|
1401
|
+
function getGlobalLookup() {
|
|
1402
|
+
const globalScope = globalThis;
|
|
1403
|
+
const existing = globalScope[LOOKUP_KEY];
|
|
1404
|
+
if (existing && typeof existing === "object") return existing;
|
|
1405
|
+
const lookup = {};
|
|
1406
|
+
globalScope[LOOKUP_KEY] = lookup;
|
|
1407
|
+
return lookup;
|
|
1408
|
+
}
|
|
1409
|
+
function getGlobalHints() {
|
|
1410
|
+
const globalScope = globalThis;
|
|
1411
|
+
const existing = globalScope[HINTS_KEY];
|
|
1412
|
+
if (Array.isArray(existing)) return existing;
|
|
1413
|
+
const hints = [];
|
|
1414
|
+
globalScope[HINTS_KEY] = hints;
|
|
1415
|
+
return hints;
|
|
1416
|
+
}
|
|
1417
|
+
function registerProcedureNameLookup(lookup, functionsDirHint) {
|
|
1418
|
+
const globalLookup = getGlobalLookup();
|
|
1419
|
+
for (const [relativeFilePath, entries] of Object.entries(lookup)) {
|
|
1420
|
+
const key = normalizePath(relativeFilePath);
|
|
1421
|
+
const existing = globalLookup[key] ?? [];
|
|
1422
|
+
const deduped = /* @__PURE__ */ new Map();
|
|
1423
|
+
for (const entry of [...existing, ...entries]) deduped.set(`${entry.line}:${entry.column}:${entry.name}`, entry);
|
|
1424
|
+
globalLookup[key] = [...deduped.values()].sort((left, right) => left.line - right.line || left.column - right.column || left.name.localeCompare(right.name));
|
|
1425
|
+
}
|
|
1426
|
+
const normalizedHint = normalizeHint(functionsDirHint);
|
|
1427
|
+
if (!normalizedHint) return;
|
|
1428
|
+
const hints = getGlobalHints();
|
|
1429
|
+
if (!hints.includes(normalizedHint)) {
|
|
1430
|
+
hints.push(normalizedHint);
|
|
1431
|
+
hints.sort((left, right) => right.length - left.length);
|
|
1432
|
+
}
|
|
1433
|
+
}
|
|
1434
|
+
function isPackageFrame(filePath) {
|
|
1435
|
+
const normalized = normalizePath(filePath);
|
|
1436
|
+
return PACKAGE_FRAME_MARKERS.some((marker) => normalized.includes(marker));
|
|
1437
|
+
}
|
|
1438
|
+
function captureCallsite() {
|
|
1439
|
+
const originalPrepareStackTrace = Error.prepareStackTrace;
|
|
1440
|
+
try {
|
|
1441
|
+
Error.prepareStackTrace = (_error, stack) => stack;
|
|
1442
|
+
const frames = (/* @__PURE__ */ new Error("Capture procedure callsite for middleware name inference.")).stack;
|
|
1443
|
+
for (const frame of frames ?? []) {
|
|
1444
|
+
const rawFileName = frame.getFileName?.();
|
|
1445
|
+
if (!rawFileName) continue;
|
|
1446
|
+
const filePath = normalizePath(decodeFileName(rawFileName));
|
|
1447
|
+
if (filePath.startsWith("node:") || isPackageFrame(filePath)) continue;
|
|
1448
|
+
const line = frame.getLineNumber?.();
|
|
1449
|
+
const column = frame.getColumnNumber?.();
|
|
1450
|
+
if (!line || !column) continue;
|
|
1451
|
+
return {
|
|
1452
|
+
filePath,
|
|
1453
|
+
line,
|
|
1454
|
+
column
|
|
1455
|
+
};
|
|
1456
|
+
}
|
|
1457
|
+
} catch {
|
|
1458
|
+
return;
|
|
1459
|
+
} finally {
|
|
1460
|
+
Error.prepareStackTrace = originalPrepareStackTrace;
|
|
1461
|
+
}
|
|
1462
|
+
}
|
|
1463
|
+
function resolveRelativeFilePath(filePath) {
|
|
1464
|
+
const normalizedFilePath = normalizePath(filePath);
|
|
1465
|
+
const hints = getGlobalHints();
|
|
1466
|
+
for (const hint of hints) {
|
|
1467
|
+
const marker = `/${hint}/`;
|
|
1468
|
+
const markerIndex = normalizedFilePath.lastIndexOf(marker);
|
|
1469
|
+
if (markerIndex >= 0) return normalizedFilePath.slice(markerIndex + marker.length);
|
|
1470
|
+
if (normalizedFilePath.startsWith(`${hint}/`)) return normalizedFilePath.slice(hint.length + 1);
|
|
1471
|
+
}
|
|
1472
|
+
}
|
|
1473
|
+
function findBestEntry(entries, location) {
|
|
1474
|
+
const sameLine = entries.filter((entry) => entry.line === location.line);
|
|
1475
|
+
if (sameLine.length === 0) return;
|
|
1476
|
+
return sameLine.reduce((best, entry) => {
|
|
1477
|
+
const bestDistance = Math.abs(best.column - location.column);
|
|
1478
|
+
return Math.abs(entry.column - location.column) < bestDistance ? entry : best;
|
|
1479
|
+
});
|
|
1480
|
+
}
|
|
1481
|
+
function inferProcedureNameFromCallsite() {
|
|
1482
|
+
const location = captureCallsite();
|
|
1483
|
+
if (!location) return;
|
|
1484
|
+
const relativeFilePath = resolveRelativeFilePath(location.filePath);
|
|
1485
|
+
if (!relativeFilePath) return;
|
|
1486
|
+
const entries = getGlobalLookup()[relativeFilePath];
|
|
1487
|
+
if (!entries || entries.length === 0) return;
|
|
1488
|
+
return findBestEntry(entries, location)?.name;
|
|
1489
|
+
}
|
|
1490
|
+
|
|
1365
1491
|
//#endregion
|
|
1366
1492
|
//#region src/server/builder.ts
|
|
1367
1493
|
/**
|
|
@@ -1407,8 +1533,15 @@ function createMiddlewareFactory() {
|
|
|
1407
1533
|
return createMiddlewareInner([fn]);
|
|
1408
1534
|
};
|
|
1409
1535
|
}
|
|
1536
|
+
const FUNCTION_NAME_SYMBOL = Symbol.for("functionName");
|
|
1537
|
+
const resolveProcedureInfo = (type, procedureName, procedureFn) => {
|
|
1538
|
+
return {
|
|
1539
|
+
type,
|
|
1540
|
+
name: (procedureFn && typeof procedureFn === "object" && typeof procedureFn[FUNCTION_NAME_SYMBOL] === "string" ? procedureFn[FUNCTION_NAME_SYMBOL] : void 0) ?? procedureName
|
|
1541
|
+
};
|
|
1542
|
+
};
|
|
1410
1543
|
/** Execute middleware chain recursively with input access */
|
|
1411
|
-
async function executeMiddlewares(middlewares, ctx, meta, input, getRawInput, index = 0) {
|
|
1544
|
+
async function executeMiddlewares(middlewares, ctx, meta, procedure, input, getRawInput, index = 0) {
|
|
1412
1545
|
if (index >= middlewares.length) return {
|
|
1413
1546
|
marker: void 0,
|
|
1414
1547
|
ctx,
|
|
@@ -1420,13 +1553,14 @@ async function executeMiddlewares(middlewares, ctx, meta, input, getRawInput, in
|
|
|
1420
1553
|
const nextCtx = opts?.ctx ?? ctx;
|
|
1421
1554
|
const nextInput = opts?.input ?? currentInput;
|
|
1422
1555
|
if (opts?.input !== void 0) currentInput = opts.input;
|
|
1423
|
-
return await executeMiddlewares(middlewares, nextCtx, meta, nextInput, getRawInput, index + 1);
|
|
1556
|
+
return await executeMiddlewares(middlewares, nextCtx, meta, procedure, nextInput, getRawInput, index + 1);
|
|
1424
1557
|
};
|
|
1425
1558
|
return {
|
|
1426
1559
|
marker: void 0,
|
|
1427
1560
|
ctx: (await middleware({
|
|
1428
1561
|
ctx,
|
|
1429
1562
|
meta,
|
|
1563
|
+
procedure,
|
|
1430
1564
|
input,
|
|
1431
1565
|
getRawInput,
|
|
1432
1566
|
next
|
|
@@ -1629,6 +1763,13 @@ var ProcedureBuilder = class {
|
|
|
1629
1763
|
} : value
|
|
1630
1764
|
};
|
|
1631
1765
|
}
|
|
1766
|
+
/** Set server-only procedure name for middleware/logging */
|
|
1767
|
+
_name(value) {
|
|
1768
|
+
return {
|
|
1769
|
+
...this._def,
|
|
1770
|
+
procedureName: value
|
|
1771
|
+
};
|
|
1772
|
+
}
|
|
1632
1773
|
/** Merge all input schemas into one */
|
|
1633
1774
|
_getMergedInput() {
|
|
1634
1775
|
const { inputSchemas } = this._def;
|
|
@@ -1636,7 +1777,7 @@ var ProcedureBuilder = class {
|
|
|
1636
1777
|
return Object.assign({}, ...inputSchemas);
|
|
1637
1778
|
}
|
|
1638
1779
|
_createFunction(handler, baseFunction, customFn, fnType) {
|
|
1639
|
-
const { middlewares, outputSchema, meta, functionConfig, isInternal } = this._def;
|
|
1780
|
+
const { middlewares, outputSchema, meta, procedureName, functionConfig, isInternal } = this._def;
|
|
1640
1781
|
const mergedInput = this._getMergedInput();
|
|
1641
1782
|
const inputSchema = mergedInput ? z.object(mergedInput) : void 0;
|
|
1642
1783
|
const convexArgs = resolveConvexArgsShape(mergedInput);
|
|
@@ -1645,7 +1786,9 @@ var ProcedureBuilder = class {
|
|
|
1645
1786
|
const typedReturnsSchema = returnsSchema;
|
|
1646
1787
|
const typedArgs = convexArgs ?? {};
|
|
1647
1788
|
const shouldValidateOutputWithZod = !!outputSchema && returnsSchema !== outputSchema;
|
|
1648
|
-
const
|
|
1789
|
+
const resolvedProcedureName = procedureName ?? inferProcedureNameFromCallsite();
|
|
1790
|
+
let fn;
|
|
1791
|
+
fn = customFunction({
|
|
1649
1792
|
args: typedArgs,
|
|
1650
1793
|
...typedReturnsSchema ? { returns: typedReturnsSchema } : {},
|
|
1651
1794
|
handler: async (ctx, rawInput) => {
|
|
@@ -1653,7 +1796,7 @@ var ProcedureBuilder = class {
|
|
|
1653
1796
|
const parsedInput = inputSchema ? inputSchema.parse(decodedInput) : decodedInput;
|
|
1654
1797
|
const getRawInput = async () => parsedInput;
|
|
1655
1798
|
try {
|
|
1656
|
-
const result = await executeMiddlewares(middlewares, ctx, meta, parsedInput, getRawInput);
|
|
1799
|
+
const result = await executeMiddlewares(middlewares, ctx, meta, resolveProcedureInfo(fnType, resolvedProcedureName, fn), parsedInput, getRawInput);
|
|
1657
1800
|
const handlerInput = result.input === parsedInput ? parsedInput : functionConfig.transformer.input.deserialize(result.input ?? parsedInput);
|
|
1658
1801
|
const output = await handler({
|
|
1659
1802
|
ctx: result.ctx,
|
|
@@ -1695,6 +1838,10 @@ var QueryProcedureBuilder = class QueryProcedureBuilder extends ProcedureBuilder
|
|
|
1695
1838
|
meta(value) {
|
|
1696
1839
|
return new QueryProcedureBuilder(this._meta(value));
|
|
1697
1840
|
}
|
|
1841
|
+
/** Set a server-only procedure name for middleware/logging */
|
|
1842
|
+
name(value) {
|
|
1843
|
+
return new QueryProcedureBuilder(this._name(value));
|
|
1844
|
+
}
|
|
1698
1845
|
/** Define input schema (chainable - schemas are merged) */
|
|
1699
1846
|
input(schema) {
|
|
1700
1847
|
return new QueryProcedureBuilder(this._input(schema));
|
|
@@ -1767,6 +1914,10 @@ var MutationProcedureBuilder = class MutationProcedureBuilder extends ProcedureB
|
|
|
1767
1914
|
meta(value) {
|
|
1768
1915
|
return new MutationProcedureBuilder(this._meta(value));
|
|
1769
1916
|
}
|
|
1917
|
+
/** Set a server-only procedure name for middleware/logging */
|
|
1918
|
+
name(value) {
|
|
1919
|
+
return new MutationProcedureBuilder(this._name(value));
|
|
1920
|
+
}
|
|
1770
1921
|
/** Define input schema (chainable - schemas are merged) */
|
|
1771
1922
|
input(schema) {
|
|
1772
1923
|
return new MutationProcedureBuilder(this._input(schema));
|
|
@@ -1806,6 +1957,10 @@ var ActionProcedureBuilder = class ActionProcedureBuilder extends ProcedureBuild
|
|
|
1806
1957
|
meta(value) {
|
|
1807
1958
|
return new ActionProcedureBuilder(this._meta(value));
|
|
1808
1959
|
}
|
|
1960
|
+
/** Set a server-only procedure name for middleware/logging */
|
|
1961
|
+
name(value) {
|
|
1962
|
+
return new ActionProcedureBuilder(this._name(value));
|
|
1963
|
+
}
|
|
1809
1964
|
/** Define input schema (chainable - schemas are merged) */
|
|
1810
1965
|
input(schema) {
|
|
1811
1966
|
return new ActionProcedureBuilder(this._input(schema));
|
|
@@ -1971,4 +2126,4 @@ const initCRPC = {
|
|
|
1971
2126
|
};
|
|
1972
2127
|
|
|
1973
2128
|
//#endregion
|
|
1974
|
-
export {
|
|
2129
|
+
export { zid as A, toCRPCError as C, zCustomAction as D, withSystemFields as E, zodOutputToConvexFields as M, zodToConvex as N, zCustomMutation as O, zodToConvexFields as P, isCRPCError as S, convexToZodFields as T, CRPCError as _, createMiddlewareFactory as a, getCRPCErrorFromUnknown as b, registerProcedureNameLookup as c, createHttpRouterFactory as d, extractRouteMap as f, matchPathParams as g, handleHttpError as h, QueryProcedureBuilder as i, zodOutputToConvex as j, zCustomQuery as k, HttpRouterWithHono as l, extractPathParams as m, MutationProcedureBuilder as n, initCRPC as o, createHttpProcedureBuilder as p, ProcedureBuilder as r, inferProcedureNameFromCallsite as s, ActionProcedureBuilder as t, createHttpRouter as u, CRPC_ERROR_CODES_BY_KEY as v, convexToZod as w, getHTTPStatusCodeFromError as x, CRPC_ERROR_CODE_TO_HTTP as y };
|
package/dist/cli.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { $ as resolveAddTemplateDefaults, A as resolveConfiguredBackend, B as runConvexInitIfNeeded, C as isInitialized, D as readPackageVersions, E as parseInitCommandArgs, Et as highlighter, F as runAfterScaffoldScript, G as trackProcess, H as runInitCommandFlow, I as runAggregateBackfillFlow, J as createSpinner, K as withLocalCodegenEnv, L as runAggregatePruneFlow, M as resolveInitProjectDir, N as resolveMigrationConfig, O as resolveBackfillConfig, P as resolveRunDeps, Q as promptForScaffoldTemplateSelection, R as runBackendFunction, S as isEntryPoint, St as stripConvexCommandNoise, T as parseBackendRunJson, Tt as logger, U as runMigrationCreate, V as runDevSchemaBackfillIfNeeded, W as runMigrationFlow, X as filterScaffoldTemplatePathMap, Y as collectPluginScaffoldTemplates, Z as promptForPluginSelection, _ as formatInfoOutput, _t as applyPluginDependencyInstall, a as cleanup, at as getSupportedPluginKeys, b as hasRemoteConvexDeploymentEnv, bt as resolveAuthEnvState, c as createCommandEnv, ct as resolvePluginScaffoldRoots, d as extractBackfillCliOptions, dt as getPluginLockfilePath, et as resolvePluginPreset, f as extractConcaveRunTargetArgs, ft as getSchemaFilePath, g as formatDocsOutput, gt as applyPlanningDependencyInstall, h as extractResetCliOptions, ht as applyDependencyHintsInstall, i as buildInitializationPlan, it as getPluginCatalogEntry, j as resolveDocTopic, k as resolveCodegenTrimSegments, l as ensureConvexGitignoreEntry, lt as assertSchemaFileExists, m as extractMigrationDownOptions, mt as resolveSchemaInstalledPlugins, n as applyPluginInstallPlanFiles, nt as resolveTemplateSelectionSource, o as createBackendAdapter, ot as isSupportedPluginKey, p as extractMigrationCliOptions, pt as readPluginLockfile, q as withWorkingDirectory, r as assertNoRemovedDevPreRunFlag, rt as resolveTemplatesByIdOrThrow, s as createBackendCommandEnv, st as buildPluginInstallPlan, t as applyDependencyInstallPlan, tt as resolvePresetScaffoldTemplates, u as extractBackendRunTargetArgs, ut as collectInstalledPluginKeys, v as getAggregateBackfillDeploymentKey, vt as inspectPluginDependencyInstall, w as parseArgs, x as isConvexDevPreRunConflictFlag, xt as serializeEnvValue, y as getDevAggregateBackfillStatePath, yt as resolveProjectScaffoldContext, z as runConfiguredCodegen } from "./backend-core-
|
|
2
|
+
import { $ as resolveAddTemplateDefaults, A as resolveConfiguredBackend, B as runConvexInitIfNeeded, C as isInitialized, D as readPackageVersions, E as parseInitCommandArgs, Et as highlighter, F as runAfterScaffoldScript, G as trackProcess, H as runInitCommandFlow, I as runAggregateBackfillFlow, J as createSpinner, K as withLocalCodegenEnv, L as runAggregatePruneFlow, M as resolveInitProjectDir, N as resolveMigrationConfig, O as resolveBackfillConfig, P as resolveRunDeps, Q as promptForScaffoldTemplateSelection, R as runBackendFunction, S as isEntryPoint, St as stripConvexCommandNoise, T as parseBackendRunJson, Tt as logger, U as runMigrationCreate, V as runDevSchemaBackfillIfNeeded, W as runMigrationFlow, X as filterScaffoldTemplatePathMap, Y as collectPluginScaffoldTemplates, Z as promptForPluginSelection, _ as formatInfoOutput, _t as applyPluginDependencyInstall, a as cleanup, at as getSupportedPluginKeys, b as hasRemoteConvexDeploymentEnv, bt as resolveAuthEnvState, c as createCommandEnv, ct as resolvePluginScaffoldRoots, d as extractBackfillCliOptions, dt as getPluginLockfilePath, et as resolvePluginPreset, f as extractConcaveRunTargetArgs, ft as getSchemaFilePath, g as formatDocsOutput, gt as applyPlanningDependencyInstall, h as extractResetCliOptions, ht as applyDependencyHintsInstall, i as buildInitializationPlan, it as getPluginCatalogEntry, j as resolveDocTopic, k as resolveCodegenTrimSegments, l as ensureConvexGitignoreEntry, lt as assertSchemaFileExists, m as extractMigrationDownOptions, mt as resolveSchemaInstalledPlugins, n as applyPluginInstallPlanFiles, nt as resolveTemplateSelectionSource, o as createBackendAdapter, ot as isSupportedPluginKey, p as extractMigrationCliOptions, pt as readPluginLockfile, q as withWorkingDirectory, r as assertNoRemovedDevPreRunFlag, rt as resolveTemplatesByIdOrThrow, s as createBackendCommandEnv, st as buildPluginInstallPlan, t as applyDependencyInstallPlan, tt as resolvePresetScaffoldTemplates, u as extractBackendRunTargetArgs, ut as collectInstalledPluginKeys, v as getAggregateBackfillDeploymentKey, vt as inspectPluginDependencyInstall, w as parseArgs, x as isConvexDevPreRunConflictFlag, xt as serializeEnvValue, y as getDevAggregateBackfillStatePath, yt as resolveProjectScaffoldContext, z as runConfiguredCodegen } from "./backend-core-C0uwGXLx.mjs";
|
|
3
3
|
import fs, { existsSync, readFileSync } from "node:fs";
|
|
4
4
|
import path, { delimiter, dirname, join, relative, resolve } from "node:path";
|
|
5
5
|
import { fileURLToPath } from "node:url";
|
|
@@ -5,13 +5,20 @@ type GenericCtx<DataModel extends GenericDataModel = GenericDataModel> = Generic
|
|
|
5
5
|
type RunMutationCtx<DataModel extends GenericDataModel> = (GenericMutationCtx<DataModel> | GenericActionCtx<DataModel>) & {
|
|
6
6
|
runMutation: GenericMutationCtx<DataModel>['runMutation'];
|
|
7
7
|
};
|
|
8
|
+
type SchedulerCtx<TCtx> = TCtx extends {
|
|
9
|
+
scheduler?: infer TScheduler;
|
|
10
|
+
} ? TCtx & {
|
|
11
|
+
scheduler: NonNullable<TScheduler>;
|
|
12
|
+
} : never;
|
|
8
13
|
declare const isQueryCtx: <DataModel extends GenericDataModel>(ctx: GenericCtx<DataModel>) => ctx is GenericQueryCtx<DataModel>;
|
|
9
14
|
declare const isMutationCtx: <DataModel extends GenericDataModel>(ctx: GenericCtx<DataModel>) => ctx is GenericMutationCtx<DataModel>;
|
|
10
15
|
declare const isActionCtx: <DataModel extends GenericDataModel>(ctx: GenericCtx<DataModel>) => ctx is GenericActionCtx<DataModel>;
|
|
11
16
|
declare const isRunMutationCtx: <DataModel extends GenericDataModel>(ctx: GenericCtx<DataModel>) => ctx is RunMutationCtx<DataModel>;
|
|
17
|
+
declare const isSchedulerCtx: <TCtx extends object>(ctx: TCtx) => ctx is SchedulerCtx<TCtx>;
|
|
12
18
|
declare const requireQueryCtx: <DataModel extends GenericDataModel>(ctx: GenericCtx<DataModel>) => GenericQueryCtx<DataModel>;
|
|
13
19
|
declare const requireMutationCtx: <DataModel extends GenericDataModel>(ctx: GenericCtx<DataModel>) => GenericMutationCtx<DataModel>;
|
|
14
20
|
declare const requireActionCtx: <DataModel extends GenericDataModel>(ctx: GenericCtx<DataModel>) => GenericActionCtx<DataModel>;
|
|
15
21
|
declare const requireRunMutationCtx: <DataModel extends GenericDataModel>(ctx: GenericCtx<DataModel>) => RunMutationCtx<DataModel>;
|
|
22
|
+
declare const requireSchedulerCtx: <TCtx extends object>(ctx: TCtx) => SchedulerCtx<TCtx>;
|
|
16
23
|
//#endregion
|
|
17
|
-
export {
|
|
24
|
+
export { isMutationCtx as a, isSchedulerCtx as c, requireQueryCtx as d, requireRunMutationCtx as f, isActionCtx as i, requireActionCtx as l, RunMutationCtx as n, isQueryCtx as o, requireSchedulerCtx as p, SchedulerCtx as r, isRunMutationCtx as s, GenericCtx as t, requireMutationCtx as u };
|
package/dist/crpc/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as DataTransformer, F as decodeWire, I as defaultCRPCTransformer, L as encodeWire, M as WireCodec, N as createTaggedTransformer, O as CombinedDataTransformer, P as dateWireCodec, R as getTransformer, a as HttpProcedureCall, c as InferHttpInput, i as HttpErrorCode, j as DataTransformerOptions, k as DATE_CODEC_TAG, l as InferHttpOutput, n as HttpClientError, o as HttpRouteInfo, r as HttpClientFromRouter, s as HttpRouteMap, t as HttpClient, u as isHttpClientError, z as identityTransformer } from "../http-types-
|
|
2
|
-
import { A as HttpInputArgs, C as ReservedMutationOptions, D as VanillaMutation, E as VanillaAction, F as replaceUrlParam, M as RESERVED_KEYS, N as buildSearchParams, O as HttpClientOptions, P as executeHttpRequest, S as ReservedInfiniteQueryOptions, T as StaticQueryOptsParam, _ as IsPaginated, a as BaseInfiniteQueryOptsParam, b as PaginatedFnMeta, c as ConvexMutationKey, d as ConvexQueryMeta, f as EmptyObject, g as InfiniteQueryInput, h as FnMeta, i as BaseConvexQueryOptions, j as HttpProxyBaseOptions, k as HttpFormValue, l as ConvexQueryHookOptions, m as FUNC_REF_SYMBOL, n as BaseConvexActionOptions, o as ConvexActionKey, p as ExtractPaginatedItem, r as BaseConvexInfiniteQueryOptions, s as ConvexInfiniteQueryMeta, t as AuthType, u as ConvexQueryKey, v as Meta, w as ReservedQueryOptions, x as PaginationOpts, y as MutationVariables } from "../types-
|
|
1
|
+
import { A as DataTransformer, F as decodeWire, I as defaultCRPCTransformer, L as encodeWire, M as WireCodec, N as createTaggedTransformer, O as CombinedDataTransformer, P as dateWireCodec, R as getTransformer, a as HttpProcedureCall, c as InferHttpInput, i as HttpErrorCode, j as DataTransformerOptions, k as DATE_CODEC_TAG, l as InferHttpOutput, n as HttpClientError, o as HttpRouteInfo, r as HttpClientFromRouter, s as HttpRouteMap, t as HttpClient, u as isHttpClientError, z as identityTransformer } from "../http-types-BLFA9zS7.js";
|
|
2
|
+
import { A as HttpInputArgs, C as ReservedMutationOptions, D as VanillaMutation, E as VanillaAction, F as replaceUrlParam, M as RESERVED_KEYS, N as buildSearchParams, O as HttpClientOptions, P as executeHttpRequest, S as ReservedInfiniteQueryOptions, T as StaticQueryOptsParam, _ as IsPaginated, a as BaseInfiniteQueryOptsParam, b as PaginatedFnMeta, c as ConvexMutationKey, d as ConvexQueryMeta, f as EmptyObject, g as InfiniteQueryInput, h as FnMeta, i as BaseConvexQueryOptions, j as HttpProxyBaseOptions, k as HttpFormValue, l as ConvexQueryHookOptions, m as FUNC_REF_SYMBOL, n as BaseConvexActionOptions, o as ConvexActionKey, p as ExtractPaginatedItem, r as BaseConvexInfiniteQueryOptions, s as ConvexInfiniteQueryMeta, t as AuthType, u as ConvexQueryKey, v as Meta, w as ReservedQueryOptions, x as PaginationOpts, y as MutationVariables } from "../types-C6pQrnzD.js";
|
|
3
3
|
import { FunctionArgs, FunctionReference } from "convex/server";
|
|
4
4
|
|
|
5
5
|
//#region src/crpc/auth-error.d.ts
|
package/dist/{generated-contract-disabled-Dzx2IRId.d.ts → generated-contract-disabled-UsFjh8jz.d.ts}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as GetAuth } from "./types-BiJE7qxR.js";
|
|
2
|
-
import { t as GenericCtx } from "./context-utils-
|
|
2
|
+
import { t as GenericCtx } from "./context-utils-BvWW0Ilq.js";
|
|
3
3
|
import * as convex_server0 from "convex/server";
|
|
4
4
|
import { DocumentByName, FunctionReference, GenericDataModel, GenericMutationCtx, GenericSchema, SchemaDefinition, TableNamesInDataModel, internalMutationGeneric } from "convex/server";
|
|
5
5
|
import * as better_auth_adapters0 from "better-auth/adapters";
|
|
@@ -173,10 +173,18 @@ declare const createApi: <Schema extends SchemaDefinition<any, any>, DataModel e
|
|
|
173
173
|
};
|
|
174
174
|
}, Promise<any>>;
|
|
175
175
|
deleteMany: convex_server0.RegisteredMutation<"internal", {
|
|
176
|
+
paginationOpts: {
|
|
177
|
+
id?: number;
|
|
178
|
+
endCursor?: string | null;
|
|
179
|
+
maximumRowsRead?: number;
|
|
180
|
+
maximumBytesRead?: number;
|
|
181
|
+
numItems: number;
|
|
182
|
+
cursor: string | null;
|
|
183
|
+
};
|
|
176
184
|
input: {
|
|
177
185
|
where?: {
|
|
186
|
+
operator?: "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | "in" | "not_in" | "contains" | "starts_with" | "ends_with" | undefined;
|
|
178
187
|
connector?: "AND" | "OR" | undefined;
|
|
179
|
-
operator?: "lt" | "lte" | "gt" | "gte" | "eq" | "in" | "not_in" | "ne" | "contains" | "starts_with" | "ends_with" | undefined;
|
|
180
188
|
value: string | number | boolean | string[] | number[] | null;
|
|
181
189
|
field: string;
|
|
182
190
|
}[] | undefined;
|
|
@@ -185,14 +193,6 @@ declare const createApi: <Schema extends SchemaDefinition<any, any>, DataModel e
|
|
|
185
193
|
where?: any[] | undefined;
|
|
186
194
|
model: string;
|
|
187
195
|
};
|
|
188
|
-
paginationOpts: {
|
|
189
|
-
id?: number;
|
|
190
|
-
endCursor?: string | null;
|
|
191
|
-
maximumRowsRead?: number;
|
|
192
|
-
maximumBytesRead?: number;
|
|
193
|
-
numItems: number;
|
|
194
|
-
cursor: string | null;
|
|
195
|
-
};
|
|
196
196
|
}, Promise<{
|
|
197
197
|
count: number;
|
|
198
198
|
ids: any[];
|
|
@@ -204,8 +204,8 @@ declare const createApi: <Schema extends SchemaDefinition<any, any>, DataModel e
|
|
|
204
204
|
deleteOne: convex_server0.RegisteredMutation<"internal", {
|
|
205
205
|
input: {
|
|
206
206
|
where?: {
|
|
207
|
+
operator?: "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | "in" | "not_in" | "contains" | "starts_with" | "ends_with" | undefined;
|
|
207
208
|
connector?: "AND" | "OR" | undefined;
|
|
208
|
-
operator?: "lt" | "lte" | "gt" | "gte" | "eq" | "in" | "not_in" | "ne" | "contains" | "starts_with" | "ends_with" | undefined;
|
|
209
209
|
value: string | number | boolean | string[] | number[] | null;
|
|
210
210
|
field: string;
|
|
211
211
|
}[] | undefined;
|
|
@@ -216,20 +216,19 @@ declare const createApi: <Schema extends SchemaDefinition<any, any>, DataModel e
|
|
|
216
216
|
};
|
|
217
217
|
}, Promise<Record<string, unknown> | undefined>>;
|
|
218
218
|
findMany: convex_server0.RegisteredQuery<"internal", {
|
|
219
|
+
limit?: number | undefined;
|
|
219
220
|
join?: any;
|
|
220
221
|
where?: {
|
|
222
|
+
operator?: "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | "in" | "not_in" | "contains" | "starts_with" | "ends_with" | undefined;
|
|
221
223
|
connector?: "AND" | "OR" | undefined;
|
|
222
|
-
operator?: "lt" | "lte" | "gt" | "gte" | "eq" | "in" | "not_in" | "ne" | "contains" | "starts_with" | "ends_with" | undefined;
|
|
223
224
|
value: string | number | boolean | string[] | number[] | null;
|
|
224
225
|
field: string;
|
|
225
226
|
}[] | undefined;
|
|
226
|
-
limit?: number | undefined;
|
|
227
227
|
offset?: number | undefined;
|
|
228
228
|
sortBy?: {
|
|
229
229
|
field: string;
|
|
230
230
|
direction: "asc" | "desc";
|
|
231
231
|
} | undefined;
|
|
232
|
-
model: string;
|
|
233
232
|
paginationOpts: {
|
|
234
233
|
id?: number;
|
|
235
234
|
endCursor?: string | null;
|
|
@@ -238,46 +237,47 @@ declare const createApi: <Schema extends SchemaDefinition<any, any>, DataModel e
|
|
|
238
237
|
numItems: number;
|
|
239
238
|
cursor: string | null;
|
|
240
239
|
};
|
|
240
|
+
model: string;
|
|
241
241
|
}, Promise<convex_server0.PaginationResult<convex_server0.GenericDocument>>>;
|
|
242
242
|
findOne: convex_server0.RegisteredQuery<"internal", {
|
|
243
243
|
join?: any;
|
|
244
|
-
select?: string[] | undefined;
|
|
245
244
|
where?: {
|
|
245
|
+
operator?: "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | "in" | "not_in" | "contains" | "starts_with" | "ends_with" | undefined;
|
|
246
246
|
connector?: "AND" | "OR" | undefined;
|
|
247
|
-
operator?: "lt" | "lte" | "gt" | "gte" | "eq" | "in" | "not_in" | "ne" | "contains" | "starts_with" | "ends_with" | undefined;
|
|
248
247
|
value: string | number | boolean | string[] | number[] | null;
|
|
249
248
|
field: string;
|
|
250
249
|
}[] | undefined;
|
|
250
|
+
select?: string[] | undefined;
|
|
251
251
|
model: string;
|
|
252
252
|
}, Promise<convex_server0.GenericDocument | null>>;
|
|
253
253
|
getLatestJwks: convex_server0.RegisteredAction<"internal", {}, Promise<unknown>>;
|
|
254
254
|
rotateKeys: convex_server0.RegisteredAction<"internal", {}, Promise<unknown>>;
|
|
255
255
|
updateMany: convex_server0.RegisteredMutation<"internal", {
|
|
256
|
+
paginationOpts: {
|
|
257
|
+
id?: number;
|
|
258
|
+
endCursor?: string | null;
|
|
259
|
+
maximumRowsRead?: number;
|
|
260
|
+
maximumBytesRead?: number;
|
|
261
|
+
numItems: number;
|
|
262
|
+
cursor: string | null;
|
|
263
|
+
};
|
|
256
264
|
input: {
|
|
257
265
|
where?: {
|
|
266
|
+
operator?: "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | "in" | "not_in" | "contains" | "starts_with" | "ends_with" | undefined;
|
|
258
267
|
connector?: "AND" | "OR" | undefined;
|
|
259
|
-
operator?: "lt" | "lte" | "gt" | "gte" | "eq" | "in" | "not_in" | "ne" | "contains" | "starts_with" | "ends_with" | undefined;
|
|
260
268
|
value: string | number | boolean | string[] | number[] | null;
|
|
261
269
|
field: string;
|
|
262
270
|
}[] | undefined;
|
|
263
|
-
model: string;
|
|
264
271
|
update: {
|
|
265
272
|
[x: string]: unknown;
|
|
266
273
|
[x: number]: unknown;
|
|
267
274
|
[x: symbol]: unknown;
|
|
268
275
|
};
|
|
276
|
+
model: string;
|
|
269
277
|
} | {
|
|
270
278
|
where?: any[] | undefined;
|
|
271
|
-
model: string;
|
|
272
279
|
update: any;
|
|
273
|
-
|
|
274
|
-
paginationOpts: {
|
|
275
|
-
id?: number;
|
|
276
|
-
endCursor?: string | null;
|
|
277
|
-
maximumRowsRead?: number;
|
|
278
|
-
maximumBytesRead?: number;
|
|
279
|
-
numItems: number;
|
|
280
|
-
cursor: string | null;
|
|
280
|
+
model: string;
|
|
281
281
|
};
|
|
282
282
|
}, Promise<{
|
|
283
283
|
count: number;
|
|
@@ -290,21 +290,21 @@ declare const createApi: <Schema extends SchemaDefinition<any, any>, DataModel e
|
|
|
290
290
|
updateOne: convex_server0.RegisteredMutation<"internal", {
|
|
291
291
|
input: {
|
|
292
292
|
where?: {
|
|
293
|
+
operator?: "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | "in" | "not_in" | "contains" | "starts_with" | "ends_with" | undefined;
|
|
293
294
|
connector?: "AND" | "OR" | undefined;
|
|
294
|
-
operator?: "lt" | "lte" | "gt" | "gte" | "eq" | "in" | "not_in" | "ne" | "contains" | "starts_with" | "ends_with" | undefined;
|
|
295
295
|
value: string | number | boolean | string[] | number[] | null;
|
|
296
296
|
field: string;
|
|
297
297
|
}[] | undefined;
|
|
298
|
-
model: string;
|
|
299
298
|
update: {
|
|
300
299
|
[x: string]: unknown;
|
|
301
300
|
[x: number]: unknown;
|
|
302
301
|
[x: symbol]: unknown;
|
|
303
302
|
};
|
|
303
|
+
model: string;
|
|
304
304
|
} | {
|
|
305
305
|
where?: any[] | undefined;
|
|
306
|
-
model: string;
|
|
307
306
|
update: any;
|
|
307
|
+
model: string;
|
|
308
308
|
};
|
|
309
309
|
}, Promise<any>>;
|
|
310
310
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { o as Simplify } from "./types-BTb_4BaU.js";
|
|
2
|
-
import {
|
|
2
|
+
import { g as UnsetMarker, t as AnyMiddleware } from "./types-a-RHmrDZ.js";
|
|
3
3
|
import { GenericActionCtx, GenericDataModel, HttpRouter } from "convex/server";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
import { Context, Hono } from "hono";
|
|
@@ -103,6 +103,7 @@ interface HttpProcedureBuilderDef<TCtx, TInput extends UnsetMarker | z.ZodTypeAn
|
|
|
103
103
|
middlewares: AnyMiddleware[];
|
|
104
104
|
outputSchema?: z.ZodTypeAny;
|
|
105
105
|
paramsSchema?: z.ZodTypeAny;
|
|
106
|
+
procedureName?: string;
|
|
106
107
|
querySchema?: z.ZodTypeAny;
|
|
107
108
|
route?: HttpRouteDefinition<TMethod>;
|
|
108
109
|
}
|
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/plugins/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as PluginConfigureResolver, i as PluginConfigureInput, n as PluginApiScope, o as definePlugin, r as PluginConfigureContext, s as resolvePluginOptions, t as Plugin } from "../middleware-
|
|
1
|
+
import { a as PluginConfigureResolver, i as PluginConfigureInput, n as PluginApiScope, o as definePlugin, r as PluginConfigureContext, s as resolvePluginOptions, t as Plugin } from "../middleware-nS_qXecO.js";
|
|
2
2
|
export { type Plugin, type PluginApiScope, type PluginConfigureContext, type PluginConfigureInput, type PluginConfigureResolver, definePlugin, resolvePluginOptions };
|
package/dist/plugins/index.js
CHANGED