kitcn 0.14.1 → 0.14.3
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/{backend-core-DZHqsBcu.mjs → backend-core-cwf87w_T.mjs} +68 -46
- package/dist/cli.mjs +6 -2
- package/dist/orm/index.d.ts +1 -1
- package/dist/watcher.mjs +1 -1
- package/dist/{where-clause-compiler-DcEhkJ12.d.ts → where-clause-compiler-TMppDl9g.d.ts} +59 -59
- package/package.json +1 -1
- package/skills/{convex → kitcn}/SKILL.md +2 -5
- package/skills/{convex → kitcn}/references/features/auth-organizations.md +8 -4
- package/skills/{convex → kitcn}/references/setup/doc-guidelines.md +12 -9
- package/skills/{convex → kitcn}/references/setup/index.md +1 -1
- /package/skills/{convex → kitcn}/references/features/aggregates.md +0 -0
- /package/skills/{convex → kitcn}/references/features/auth-admin.md +0 -0
- /package/skills/{convex → kitcn}/references/features/auth-polar.md +0 -0
- /package/skills/{convex → kitcn}/references/features/auth.md +0 -0
- /package/skills/{convex → kitcn}/references/features/create-plugins.md +0 -0
- /package/skills/{convex → kitcn}/references/features/http.md +0 -0
- /package/skills/{convex → kitcn}/references/features/migrations.md +0 -0
- /package/skills/{convex → kitcn}/references/features/orm.md +0 -0
- /package/skills/{convex → kitcn}/references/features/react.md +0 -0
- /package/skills/{convex → kitcn}/references/features/scheduling.md +0 -0
- /package/skills/{convex → kitcn}/references/features/testing.md +0 -0
- /package/skills/{convex → kitcn}/references/setup/auth.md +0 -0
- /package/skills/{convex → kitcn}/references/setup/biome.md +0 -0
- /package/skills/{convex → kitcn}/references/setup/expo.md +0 -0
- /package/skills/{convex → kitcn}/references/setup/next.md +0 -0
- /package/skills/{convex → kitcn}/references/setup/react.md +0 -0
- /package/skills/{convex → kitcn}/references/setup/server.md +0 -0
- /package/skills/{convex → kitcn}/references/setup/start.md +0 -0
|
@@ -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-TMppDl9g.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";
|
|
@@ -5964,6 +5964,42 @@ async function pullEnv(options = {}, deps = {}) {
|
|
|
5964
5964
|
}
|
|
5965
5965
|
const syncEnv = pushEnv;
|
|
5966
5966
|
|
|
5967
|
+
//#endregion
|
|
5968
|
+
//#region src/cli/package-manager.ts
|
|
5969
|
+
function detectPackageManager(projectDir) {
|
|
5970
|
+
let current = resolve(projectDir);
|
|
5971
|
+
while (true) {
|
|
5972
|
+
const packageJsonPath = join(current, "package.json");
|
|
5973
|
+
if (fs.existsSync(packageJsonPath)) try {
|
|
5974
|
+
const pkg = JSON.parse(fs.readFileSync(packageJsonPath, "utf8"));
|
|
5975
|
+
if (typeof pkg.packageManager === "string") {
|
|
5976
|
+
if (pkg.packageManager.startsWith("bun@")) return "bun";
|
|
5977
|
+
if (pkg.packageManager.startsWith("pnpm@")) return "pnpm";
|
|
5978
|
+
if (pkg.packageManager.startsWith("yarn@")) return "yarn";
|
|
5979
|
+
if (pkg.packageManager.startsWith("npm@")) return "npm";
|
|
5980
|
+
}
|
|
5981
|
+
} catch {}
|
|
5982
|
+
if (fs.existsSync(join(current, "bun.lock")) || fs.existsSync(join(current, "bun.lockb"))) return "bun";
|
|
5983
|
+
if (fs.existsSync(join(current, "pnpm-lock.yaml")) || fs.existsSync(join(current, "pnpm-workspace.yaml"))) return "pnpm";
|
|
5984
|
+
if (fs.existsSync(join(current, "yarn.lock"))) return "yarn";
|
|
5985
|
+
if (fs.existsSync(join(current, "package-lock.json"))) return "npm";
|
|
5986
|
+
const parent = dirname(current);
|
|
5987
|
+
if (parent === current) break;
|
|
5988
|
+
current = parent;
|
|
5989
|
+
}
|
|
5990
|
+
return "bun";
|
|
5991
|
+
}
|
|
5992
|
+
function resolveDependencyInstallCommand(packageManager, packageSpecs) {
|
|
5993
|
+
return {
|
|
5994
|
+
command: packageManager,
|
|
5995
|
+
args: packageManager === "npm" ? ["install", ...packageSpecs] : ["add", ...packageSpecs]
|
|
5996
|
+
};
|
|
5997
|
+
}
|
|
5998
|
+
function formatDependencyInstallCommand(packageManager, packageSpecs) {
|
|
5999
|
+
const { args, command } = resolveDependencyInstallCommand(packageManager, packageSpecs);
|
|
6000
|
+
return `${command} ${args.join(" ")}`;
|
|
6001
|
+
}
|
|
6002
|
+
|
|
5967
6003
|
//#endregion
|
|
5968
6004
|
//#region src/cli/project-context.ts
|
|
5969
6005
|
function isReactScaffoldFramework(framework) {
|
|
@@ -6378,6 +6414,14 @@ const resolvePackageJsonInstallTarget = () => {
|
|
|
6378
6414
|
packageJson: packageJsonPath ? JSON.parse(fs.readFileSync(packageJsonPath, "utf8")) : null
|
|
6379
6415
|
};
|
|
6380
6416
|
};
|
|
6417
|
+
const runDependencyInstall = async (packageJsonPath, packageSpecs, execaFn) => {
|
|
6418
|
+
const cwd = dirname(packageJsonPath);
|
|
6419
|
+
const { args, command } = resolveDependencyInstallCommand(detectPackageManager(cwd), packageSpecs);
|
|
6420
|
+
await execaFn(command, args, {
|
|
6421
|
+
cwd,
|
|
6422
|
+
stdio: "inherit"
|
|
6423
|
+
});
|
|
6424
|
+
};
|
|
6381
6425
|
const resolveBunPeerWarningPreinstallSpecs = () => {
|
|
6382
6426
|
const { packageJsonPath, packageJson } = resolvePackageJsonInstallTarget();
|
|
6383
6427
|
if (!packageJsonPath || !packageJson) return [];
|
|
@@ -6392,10 +6436,7 @@ const applyBunPeerWarningPreinstall = async (execaFn) => {
|
|
|
6392
6436
|
const dependencySpecs = resolveBunPeerWarningPreinstallSpecs();
|
|
6393
6437
|
if (dependencySpecs.length === 0) return [];
|
|
6394
6438
|
const { packageJsonPath } = resolvePackageJsonInstallTarget();
|
|
6395
|
-
await
|
|
6396
|
-
cwd: dirname(packageJsonPath),
|
|
6397
|
-
stdio: "inherit"
|
|
6398
|
-
});
|
|
6439
|
+
await runDependencyInstall(packageJsonPath, dependencySpecs, execaFn);
|
|
6399
6440
|
return dependencySpecs;
|
|
6400
6441
|
};
|
|
6401
6442
|
const inspectPluginDependencyInstall = async (params) => {
|
|
@@ -6435,10 +6476,7 @@ const applyDependencyHintsInstall = async (dependencyHints, execaFn) => {
|
|
|
6435
6476
|
const installSpecs = resolveMissingDependencyHints(dependencyHints).filter((dependencyHint) => !preinstalledSpecs.includes(dependencyHint)).map((dependencyHint) => resolveSupportedDependencyInstallSpec(dependencyHint));
|
|
6436
6477
|
if (installSpecs.length === 0) return preinstalledSpecs;
|
|
6437
6478
|
const { packageJsonPath } = resolvePackageJsonInstallTarget();
|
|
6438
|
-
await
|
|
6439
|
-
cwd: dirname(packageJsonPath),
|
|
6440
|
-
stdio: "inherit"
|
|
6441
|
-
});
|
|
6479
|
+
await runDependencyInstall(packageJsonPath, installSpecs, execaFn);
|
|
6442
6480
|
return [...preinstalledSpecs, ...installSpecs];
|
|
6443
6481
|
};
|
|
6444
6482
|
const applyPlanningDependencyInstall = async (dependencySpecs, execaFn) => {
|
|
@@ -6446,20 +6484,14 @@ const applyPlanningDependencyInstall = async (dependencySpecs, execaFn) => {
|
|
|
6446
6484
|
const installSpecs = resolveMissingDependencyHints(dependencySpecs).filter((dependencySpec) => !preinstalledSpecs.includes(dependencySpec)).map((dependencySpec) => resolveSupportedDependencyInstallSpec(dependencySpec));
|
|
6447
6485
|
if (installSpecs.length === 0) return preinstalledSpecs;
|
|
6448
6486
|
const { packageJsonPath } = resolvePackageJsonInstallTarget();
|
|
6449
|
-
await
|
|
6450
|
-
cwd: dirname(packageJsonPath),
|
|
6451
|
-
stdio: "inherit"
|
|
6452
|
-
});
|
|
6487
|
+
await runDependencyInstall(packageJsonPath, installSpecs, execaFn);
|
|
6453
6488
|
return [...preinstalledSpecs, ...installSpecs];
|
|
6454
6489
|
};
|
|
6455
6490
|
const applyPluginDependencyInstall = async (install, execaFn) => {
|
|
6456
6491
|
if (install.skipped || !install.packageName || !install.packageJsonPath) return install;
|
|
6457
6492
|
await applyBunPeerWarningPreinstall(execaFn);
|
|
6458
6493
|
const packageSpec = install.packageSpec ?? install.packageName;
|
|
6459
|
-
await
|
|
6460
|
-
cwd: dirname(install.packageJsonPath),
|
|
6461
|
-
stdio: "inherit"
|
|
6462
|
-
});
|
|
6494
|
+
await runDependencyInstall(install.packageJsonPath, [packageSpec], execaFn);
|
|
6463
6495
|
return {
|
|
6464
6496
|
packageName: install.packageName,
|
|
6465
6497
|
packageSpec,
|
|
@@ -7361,8 +7393,10 @@ const buildPluginInstallPlan = async (params) => {
|
|
|
7361
7393
|
scaffoldFiles
|
|
7362
7394
|
}) ?? scaffoldFiles;
|
|
7363
7395
|
const dependency = await inspectPluginDependencyInstall({ descriptor: params.descriptor });
|
|
7396
|
+
const dependencyPackageSpec = dependency.packageSpec ?? dependency.packageName;
|
|
7364
7397
|
const dependencyHints = [...new Set(effectiveTemplates.flatMap((template) => template.dependencyHints))];
|
|
7365
|
-
const
|
|
7398
|
+
const dependencyPackageManager = detectPackageManager(dependency.packageJsonPath ? dirname(dependency.packageJsonPath) : process.cwd());
|
|
7399
|
+
const dependencyHintCommand = dependencyHints.length > 0 ? formatDependencyInstallCommand(dependencyPackageManager, dependencyHints) : void 0;
|
|
7366
7400
|
const envReminders = rawConvexAuthPreset ? [] : resolvePluginEnvReminders(params.functionsDir, params.descriptor.envFields ?? []);
|
|
7367
7401
|
const nextSteps = dependencyHintCommand ? [`Install scaffold dependencies: ${dependencyHintCommand}`] : [];
|
|
7368
7402
|
const codegenCommand = rawConvexAuthPreset ? "kitcn codegen --scope auth" : "kitcn codegen";
|
|
@@ -7444,8 +7478,8 @@ const buildPluginInstallPlan = async (params) => {
|
|
|
7444
7478
|
status: dependency.skipped ? "skipped" : "pending",
|
|
7445
7479
|
reason: dependency.reason === "already_present" ? "Dependency already installed." : dependency.reason === "missing_package_json" ? "No package.json found for dependency installation." : `Install ${dependency.packageSpec ?? dependency.packageName}.`,
|
|
7446
7480
|
path: dependency.packageJsonPath ? normalizePath$1(relative(process.cwd(), dependency.packageJsonPath)) : void 0,
|
|
7447
|
-
packageName:
|
|
7448
|
-
command:
|
|
7481
|
+
packageName: dependencyPackageSpec,
|
|
7482
|
+
command: dependencyPackageSpec && dependency.packageJsonPath && !dependency.skipped ? formatDependencyInstallCommand(dependencyPackageManager, [dependencyPackageSpec]) : void 0
|
|
7449
7483
|
},
|
|
7450
7484
|
{
|
|
7451
7485
|
kind: "codegen",
|
|
@@ -10469,7 +10503,17 @@ function buildAuthConvexStartProviderPlanFile(params) {
|
|
|
10469
10503
|
const projectContext = params.roots.projectContext;
|
|
10470
10504
|
if (!projectContext || projectContext.framework !== "tanstack-start") throw new Error("Auth preset \"convex\" requires a supported TanStack Start app shell.");
|
|
10471
10505
|
const providerPath = resolve(process.cwd(), projectContext.convexClientDir, "convex-provider.tsx");
|
|
10472
|
-
if (!fs.existsSync(providerPath))
|
|
10506
|
+
if (!fs.existsSync(providerPath)) {
|
|
10507
|
+
const normalizedPath = relative(process.cwd(), providerPath).replaceAll("\\", "/");
|
|
10508
|
+
return {
|
|
10509
|
+
action: "skip",
|
|
10510
|
+
content: "",
|
|
10511
|
+
kind: "scaffold",
|
|
10512
|
+
manualActions: [`Wrap your existing Convex provider with ConvexAuthProvider using src/lib/convex/auth-client.ts, or place the provider at ${normalizedPath} before rerunning auth adoption.`],
|
|
10513
|
+
path: normalizedPath,
|
|
10514
|
+
reason: "No Start provider found to patch."
|
|
10515
|
+
};
|
|
10516
|
+
}
|
|
10473
10517
|
return createPlanFile({
|
|
10474
10518
|
kind: "scaffold",
|
|
10475
10519
|
filePath: providerPath,
|
|
@@ -14811,29 +14855,6 @@ function buildTemplateInitializationPlanFiles(params) {
|
|
|
14811
14855
|
buildInitReactMainPlanFile(projectContext)
|
|
14812
14856
|
];
|
|
14813
14857
|
}
|
|
14814
|
-
function detectPackageManager(projectDir) {
|
|
14815
|
-
let current = resolve(projectDir);
|
|
14816
|
-
while (true) {
|
|
14817
|
-
const packageJsonPath = join(current, "package.json");
|
|
14818
|
-
if (fs.existsSync(packageJsonPath)) try {
|
|
14819
|
-
const pkg = JSON.parse(fs.readFileSync(packageJsonPath, "utf8"));
|
|
14820
|
-
if (typeof pkg.packageManager === "string") {
|
|
14821
|
-
if (pkg.packageManager.startsWith("bun@")) return "bun";
|
|
14822
|
-
if (pkg.packageManager.startsWith("pnpm@")) return "pnpm";
|
|
14823
|
-
if (pkg.packageManager.startsWith("yarn@")) return "yarn";
|
|
14824
|
-
if (pkg.packageManager.startsWith("npm@")) return "npm";
|
|
14825
|
-
}
|
|
14826
|
-
} catch {}
|
|
14827
|
-
if (fs.existsSync(join(current, "bun.lock")) || fs.existsSync(join(current, "bun.lockb"))) return "bun";
|
|
14828
|
-
if (fs.existsSync(join(current, "pnpm-lock.yaml")) || fs.existsSync(join(current, "pnpm-workspace.yaml"))) return "pnpm";
|
|
14829
|
-
if (fs.existsSync(join(current, "yarn.lock"))) return "yarn";
|
|
14830
|
-
if (fs.existsSync(join(current, "package-lock.json"))) return "npm";
|
|
14831
|
-
const parent = dirname(current);
|
|
14832
|
-
if (parent === current) break;
|
|
14833
|
-
current = parent;
|
|
14834
|
-
}
|
|
14835
|
-
return "bun";
|
|
14836
|
-
}
|
|
14837
14858
|
function resolveShadcnScaffoldProjectDir(projectDir, template) {
|
|
14838
14859
|
if (template !== "next") return projectDir;
|
|
14839
14860
|
const appsDir = join(projectDir, "apps");
|
|
@@ -14857,10 +14878,11 @@ function buildDependencyInstallPlan(projectDir, dependencies) {
|
|
|
14857
14878
|
if (missing.length === 0) return null;
|
|
14858
14879
|
const packageManager = detectPackageManager(projectDir);
|
|
14859
14880
|
const missingSpecs = missing.map((dependency) => dependency.installSpec);
|
|
14881
|
+
const installCommand = resolveDependencyInstallCommand(packageManager, missingSpecs);
|
|
14860
14882
|
return {
|
|
14861
14883
|
packageManager,
|
|
14862
|
-
command:
|
|
14863
|
-
args:
|
|
14884
|
+
command: installCommand.command,
|
|
14885
|
+
args: installCommand.args,
|
|
14864
14886
|
packages: missingSpecs,
|
|
14865
14887
|
cwd: projectDir
|
|
14866
14888
|
};
|
|
@@ -16531,4 +16553,4 @@ function isEntryPoint(entry, filename) {
|
|
|
16531
16553
|
}
|
|
16532
16554
|
|
|
16533
16555
|
//#endregion
|
|
16534
|
-
export { promptForScaffoldTemplateSelection as $, resolveCodegenTrimSegments as A, runConfiguredCodegen as B, isEntryPoint as C,
|
|
16556
|
+
export { promptForScaffoldTemplateSelection as $, resolveCodegenTrimSegments as A, highlighter as At, runConfiguredCodegen as B, isEntryPoint as C, formatDependencyInstallCommand as Ct, parseInitCommandArgs as D, generateMeta as Dt, parseBackendRunJson as E, stripConvexCommandNoise as Et, resolveRunDeps as F, runMigrationFlow as G, runDevSchemaBackfillIfNeeded as H, runAfterScaffoldScript as I, withWorkingDirectory as J, trackProcess as K, runAggregateBackfillFlow as L, resolveDocTopic as M, resolveInitProjectDir as N, readPackageVersions as O, getConvexConfig as Ot, resolveMigrationConfig as P, promptForPluginSelection as Q, runAggregatePruneFlow as R, isConvexDevPreRunConflictFlag as S, detectPackageManager as St, parseArgs as T, serializeEnvValue as Tt, runInitCommandFlow as U, runConvexInitIfNeeded as V, runMigrationCreate as W, collectPluginScaffoldTemplates as X, createSpinner as Y, filterScaffoldTemplatePathMap as Z, formatInfoOutput as _, applyPlanningDependencyInstall as _t, cleanup as a, getPluginCatalogEntry as at, getDevAggregateBackfillStatePath as b, resolveSupportedDependencyWarnings as bt, createCommandEnv as c, buildPluginInstallPlan as ct, extractBackfillCliOptions as d, collectInstalledPluginKeys as dt, resolveAddTemplateDefaults as et, extractConcaveRunTargetArgs as f, getPluginLockfilePath as ft, formatDocsOutput as g, applyDependencyHintsInstall as gt, extractResetCliOptions as h, resolveSchemaInstalledPlugins as ht, buildInitializationPlan as i, resolveTemplatesByIdOrThrow as it, resolveConfiguredBackend as j, resolveBackfillConfig as k, logger as kt, ensureConvexGitignoreEntry as l, resolvePluginScaffoldRoots as lt, extractMigrationDownOptions as m, readPluginLockfile as mt, applyPluginInstallPlanFiles as n, resolvePresetScaffoldTemplates as nt, createBackendAdapter as o, getSupportedPluginKeys as ot, extractMigrationCliOptions as p, getSchemaFilePath as pt, withLocalCodegenEnv as q, assertNoRemovedDevPreRunFlag as r, resolveTemplateSelectionSource as rt, createBackendCommandEnv as s, isSupportedPluginKey as st, applyDependencyInstallPlan as t, resolvePluginPreset as tt, extractBackendRunTargetArgs as u, assertSchemaFileExists as ut, getAggregateBackfillDeploymentKey as v, applyPluginDependencyInstall as vt, isInitialized as w, resolveAuthEnvState as wt, hasRemoteConvexDeploymentEnv as x, resolveProjectScaffoldContext as xt, getConvexDeploymentCommandEnv as y, inspectPluginDependencyInstall as yt, runBackendFunction as z };
|
package/dist/cli.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { $ as promptForScaffoldTemplateSelection, A as resolveCodegenTrimSegments, B as runConfiguredCodegen, C as isEntryPoint, Ct as
|
|
2
|
+
import { $ as promptForScaffoldTemplateSelection, A as resolveCodegenTrimSegments, At as highlighter, B as runConfiguredCodegen, C as isEntryPoint, Ct as formatDependencyInstallCommand, D as parseInitCommandArgs, E as parseBackendRunJson, Et as stripConvexCommandNoise, F as resolveRunDeps, G as runMigrationFlow, H as runDevSchemaBackfillIfNeeded, I as runAfterScaffoldScript, J as withWorkingDirectory, K as trackProcess, L as runAggregateBackfillFlow, M as resolveDocTopic, N as resolveInitProjectDir, O as readPackageVersions, P as resolveMigrationConfig, Q as promptForPluginSelection, R as runAggregatePruneFlow, S as isConvexDevPreRunConflictFlag, St as detectPackageManager, T as parseArgs, Tt as serializeEnvValue, U as runInitCommandFlow, V as runConvexInitIfNeeded, W as runMigrationCreate, X as collectPluginScaffoldTemplates, Y as createSpinner, Z as filterScaffoldTemplatePathMap, _ as formatInfoOutput, _t as applyPlanningDependencyInstall, a as cleanup, at as getPluginCatalogEntry, b as getDevAggregateBackfillStatePath, bt as resolveSupportedDependencyWarnings, c as createCommandEnv, ct as buildPluginInstallPlan, d as extractBackfillCliOptions, dt as collectInstalledPluginKeys, et as resolveAddTemplateDefaults, f as extractConcaveRunTargetArgs, ft as getPluginLockfilePath, g as formatDocsOutput, gt as applyDependencyHintsInstall, h as extractResetCliOptions, ht as resolveSchemaInstalledPlugins, i as buildInitializationPlan, it as resolveTemplatesByIdOrThrow, j as resolveConfiguredBackend, k as resolveBackfillConfig, kt as logger, l as ensureConvexGitignoreEntry, lt as resolvePluginScaffoldRoots, m as extractMigrationDownOptions, mt as readPluginLockfile, n as applyPluginInstallPlanFiles, nt as resolvePresetScaffoldTemplates, o as createBackendAdapter, ot as getSupportedPluginKeys, p as extractMigrationCliOptions, pt as getSchemaFilePath, q as withLocalCodegenEnv, r as assertNoRemovedDevPreRunFlag, rt as resolveTemplateSelectionSource, s as createBackendCommandEnv, st as isSupportedPluginKey, t as applyDependencyInstallPlan, tt as resolvePluginPreset, u as extractBackendRunTargetArgs, ut as assertSchemaFileExists, v as getAggregateBackfillDeploymentKey, vt as applyPluginDependencyInstall, w as isInitialized, wt as resolveAuthEnvState, x as hasRemoteConvexDeploymentEnv, xt as resolveProjectScaffoldContext, y as getConvexDeploymentCommandEnv, yt as inspectPluginDependencyInstall, z as runBackendFunction } from "./backend-core-cwf87w_T.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";
|
|
@@ -2765,7 +2765,11 @@ const printCommandHelp = (command, backend = "convex") => {
|
|
|
2765
2765
|
};
|
|
2766
2766
|
function warnSupportedDependencyIssues(command) {
|
|
2767
2767
|
if (!DEPENDENCY_WARNING_COMMANDS.has(command)) return;
|
|
2768
|
-
|
|
2768
|
+
const packageManager = detectPackageManager(process.cwd());
|
|
2769
|
+
for (const warning of resolveSupportedDependencyWarnings()) {
|
|
2770
|
+
const installCommand = formatDependencyInstallCommand(packageManager, [warning.installSpec]);
|
|
2771
|
+
logger.warn(`⚠️ kitcn expects ${warning.packageName} ${warning.minimum}; found ${warning.current}. Run \`${installCommand}\` when you can.`);
|
|
2772
|
+
}
|
|
2769
2773
|
}
|
|
2770
2774
|
const handlePassthroughCommand = async (argv, deps) => {
|
|
2771
2775
|
const parsed = parseArgs(argv);
|
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-TMppDl9g.js";
|
|
2
2
|
import { i as pretendRequired, n as deprecated, r as pretend } from "../validators-BhsByJeg.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-CNo9ffvI.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 { Dt as
|
|
2
|
+
import { Dt as generateMeta, F as resolveRunDeps, Ot as getConvexConfig, j as resolveConfiguredBackend, kt as logger, q as withLocalCodegenEnv } from "./backend-core-cwf87w_T.mjs";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import { fileURLToPath } from "node:url";
|
|
5
5
|
|
|
@@ -3717,7 +3717,7 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
3717
3717
|
readonly aggregate_bucket: ConvexTableWithColumns<{
|
|
3718
3718
|
name: "aggregate_bucket";
|
|
3719
3719
|
columns: {
|
|
3720
|
-
|
|
3720
|
+
tableKey: ConvexTextBuilderInitial<""> & {
|
|
3721
3721
|
_: {
|
|
3722
3722
|
notNull: true;
|
|
3723
3723
|
};
|
|
@@ -3727,10 +3727,10 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
3727
3727
|
};
|
|
3728
3728
|
} & {
|
|
3729
3729
|
_: {
|
|
3730
|
-
fieldName: "
|
|
3730
|
+
fieldName: "tableKey";
|
|
3731
3731
|
};
|
|
3732
3732
|
};
|
|
3733
|
-
|
|
3733
|
+
indexName: ConvexTextBuilderInitial<""> & {
|
|
3734
3734
|
_: {
|
|
3735
3735
|
notNull: true;
|
|
3736
3736
|
};
|
|
@@ -3740,10 +3740,10 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
3740
3740
|
};
|
|
3741
3741
|
} & {
|
|
3742
3742
|
_: {
|
|
3743
|
-
fieldName: "
|
|
3743
|
+
fieldName: "indexName";
|
|
3744
3744
|
};
|
|
3745
3745
|
};
|
|
3746
|
-
|
|
3746
|
+
updatedAt: ConvexNumberBuilderInitial<""> & {
|
|
3747
3747
|
_: {
|
|
3748
3748
|
notNull: true;
|
|
3749
3749
|
};
|
|
@@ -3753,10 +3753,10 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
3753
3753
|
};
|
|
3754
3754
|
} & {
|
|
3755
3755
|
_: {
|
|
3756
|
-
fieldName: "
|
|
3756
|
+
fieldName: "updatedAt";
|
|
3757
3757
|
};
|
|
3758
3758
|
};
|
|
3759
|
-
|
|
3759
|
+
keyHash: ConvexTextBuilderInitial<""> & {
|
|
3760
3760
|
_: {
|
|
3761
3761
|
notNull: true;
|
|
3762
3762
|
};
|
|
@@ -3766,10 +3766,14 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
3766
3766
|
};
|
|
3767
3767
|
} & {
|
|
3768
3768
|
_: {
|
|
3769
|
-
fieldName: "
|
|
3769
|
+
fieldName: "keyHash";
|
|
3770
3770
|
};
|
|
3771
3771
|
};
|
|
3772
|
-
|
|
3772
|
+
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">> & {
|
|
3773
|
+
_: {
|
|
3774
|
+
$type: convex_values0.Value[];
|
|
3775
|
+
};
|
|
3776
|
+
} & {
|
|
3773
3777
|
_: {
|
|
3774
3778
|
notNull: true;
|
|
3775
3779
|
};
|
|
@@ -3779,14 +3783,10 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
3779
3783
|
};
|
|
3780
3784
|
} & {
|
|
3781
3785
|
_: {
|
|
3782
|
-
fieldName: "
|
|
3786
|
+
fieldName: "keyParts";
|
|
3783
3787
|
};
|
|
3784
3788
|
};
|
|
3785
|
-
|
|
3786
|
-
_: {
|
|
3787
|
-
$type: convex_values0.Value[];
|
|
3788
|
-
};
|
|
3789
|
-
} & {
|
|
3789
|
+
count: ConvexNumberBuilderInitial<""> & {
|
|
3790
3790
|
_: {
|
|
3791
3791
|
notNull: true;
|
|
3792
3792
|
};
|
|
@@ -3796,7 +3796,7 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
3796
3796
|
};
|
|
3797
3797
|
} & {
|
|
3798
3798
|
_: {
|
|
3799
|
-
fieldName: "
|
|
3799
|
+
fieldName: "count";
|
|
3800
3800
|
};
|
|
3801
3801
|
};
|
|
3802
3802
|
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>>>) & {
|
|
@@ -3839,7 +3839,7 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
3839
3839
|
fieldName: "kind";
|
|
3840
3840
|
};
|
|
3841
3841
|
};
|
|
3842
|
-
|
|
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: "
|
|
3852
|
+
fieldName: "tableKey";
|
|
3853
3853
|
};
|
|
3854
3854
|
};
|
|
3855
|
-
|
|
3855
|
+
indexName: ConvexTextBuilderInitial<""> & {
|
|
3856
3856
|
_: {
|
|
3857
3857
|
notNull: true;
|
|
3858
3858
|
};
|
|
@@ -3862,10 +3862,10 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
3862
3862
|
};
|
|
3863
3863
|
} & {
|
|
3864
3864
|
_: {
|
|
3865
|
-
fieldName: "
|
|
3865
|
+
fieldName: "indexName";
|
|
3866
3866
|
};
|
|
3867
3867
|
};
|
|
3868
|
-
|
|
3868
|
+
updatedAt: ConvexNumberBuilderInitial<""> & {
|
|
3869
3869
|
_: {
|
|
3870
3870
|
notNull: true;
|
|
3871
3871
|
};
|
|
@@ -3875,7 +3875,7 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
3875
3875
|
};
|
|
3876
3876
|
} & {
|
|
3877
3877
|
_: {
|
|
3878
|
-
fieldName: "
|
|
3878
|
+
fieldName: "updatedAt";
|
|
3879
3879
|
};
|
|
3880
3880
|
};
|
|
3881
3881
|
keyHash: ConvexTextBuilderInitial<""> & {
|
|
@@ -4009,7 +4009,7 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
4009
4009
|
fieldName: "value";
|
|
4010
4010
|
};
|
|
4011
4011
|
};
|
|
4012
|
-
|
|
4012
|
+
tableKey: ConvexTextBuilderInitial<""> & {
|
|
4013
4013
|
_: {
|
|
4014
4014
|
notNull: true;
|
|
4015
4015
|
};
|
|
@@ -4019,10 +4019,10 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
4019
4019
|
};
|
|
4020
4020
|
} & {
|
|
4021
4021
|
_: {
|
|
4022
|
-
fieldName: "
|
|
4022
|
+
fieldName: "tableKey";
|
|
4023
4023
|
};
|
|
4024
4024
|
};
|
|
4025
|
-
|
|
4025
|
+
indexName: ConvexTextBuilderInitial<""> & {
|
|
4026
4026
|
_: {
|
|
4027
4027
|
notNull: true;
|
|
4028
4028
|
};
|
|
@@ -4032,10 +4032,10 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
4032
4032
|
};
|
|
4033
4033
|
} & {
|
|
4034
4034
|
_: {
|
|
4035
|
-
fieldName: "
|
|
4035
|
+
fieldName: "indexName";
|
|
4036
4036
|
};
|
|
4037
4037
|
};
|
|
4038
|
-
|
|
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: "
|
|
4048
|
+
fieldName: "updatedAt";
|
|
4049
4049
|
};
|
|
4050
4050
|
};
|
|
4051
|
-
|
|
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: "
|
|
4061
|
+
fieldName: "keyHash";
|
|
4062
4062
|
};
|
|
4063
4063
|
};
|
|
4064
|
-
|
|
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: "
|
|
4074
|
+
fieldName: "count";
|
|
4075
4075
|
};
|
|
4076
4076
|
};
|
|
4077
4077
|
fieldName: ConvexTextBuilderInitial<""> & {
|
|
@@ -4279,19 +4279,6 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
4279
4279
|
fieldName: "cursor";
|
|
4280
4280
|
};
|
|
4281
4281
|
};
|
|
4282
|
-
updatedAt: ConvexNumberBuilderInitial<""> & {
|
|
4283
|
-
_: {
|
|
4284
|
-
notNull: true;
|
|
4285
|
-
};
|
|
4286
|
-
} & {
|
|
4287
|
-
_: {
|
|
4288
|
-
tableName: "aggregate_state";
|
|
4289
|
-
};
|
|
4290
|
-
} & {
|
|
4291
|
-
_: {
|
|
4292
|
-
fieldName: "updatedAt";
|
|
4293
|
-
};
|
|
4294
|
-
};
|
|
4295
4282
|
tableKey: ConvexTextBuilderInitial<""> & {
|
|
4296
4283
|
_: {
|
|
4297
4284
|
notNull: true;
|
|
@@ -4370,6 +4357,19 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
4370
4357
|
fieldName: "startedAt";
|
|
4371
4358
|
};
|
|
4372
4359
|
};
|
|
4360
|
+
updatedAt: ConvexNumberBuilderInitial<""> & {
|
|
4361
|
+
_: {
|
|
4362
|
+
notNull: true;
|
|
4363
|
+
};
|
|
4364
|
+
} & {
|
|
4365
|
+
_: {
|
|
4366
|
+
tableName: "aggregate_state";
|
|
4367
|
+
};
|
|
4368
|
+
} & {
|
|
4369
|
+
_: {
|
|
4370
|
+
fieldName: "updatedAt";
|
|
4371
|
+
};
|
|
4372
|
+
};
|
|
4373
4373
|
completedAt: ConvexNumberBuilderInitial<""> & {
|
|
4374
4374
|
_: {
|
|
4375
4375
|
tableName: "aggregate_state";
|
|
@@ -4429,7 +4429,7 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
4429
4429
|
fieldName: "direction";
|
|
4430
4430
|
};
|
|
4431
4431
|
};
|
|
4432
|
-
|
|
4432
|
+
processed: ConvexNumberBuilderInitial<""> & {
|
|
4433
4433
|
_: {
|
|
4434
4434
|
notNull: true;
|
|
4435
4435
|
};
|
|
@@ -4439,29 +4439,29 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
4439
4439
|
};
|
|
4440
4440
|
} & {
|
|
4441
4441
|
_: {
|
|
4442
|
-
fieldName: "
|
|
4442
|
+
fieldName: "processed";
|
|
4443
4443
|
};
|
|
4444
4444
|
};
|
|
4445
|
-
|
|
4446
|
-
_: {
|
|
4447
|
-
notNull: true;
|
|
4448
|
-
};
|
|
4449
|
-
} & {
|
|
4445
|
+
startedAt: ConvexNumberBuilderInitial<""> & {
|
|
4450
4446
|
_: {
|
|
4451
4447
|
tableName: "migration_state";
|
|
4452
4448
|
};
|
|
4453
4449
|
} & {
|
|
4454
4450
|
_: {
|
|
4455
|
-
fieldName: "
|
|
4451
|
+
fieldName: "startedAt";
|
|
4456
4452
|
};
|
|
4457
4453
|
};
|
|
4458
|
-
|
|
4454
|
+
updatedAt: ConvexNumberBuilderInitial<""> & {
|
|
4455
|
+
_: {
|
|
4456
|
+
notNull: true;
|
|
4457
|
+
};
|
|
4458
|
+
} & {
|
|
4459
4459
|
_: {
|
|
4460
4460
|
tableName: "migration_state";
|
|
4461
4461
|
};
|
|
4462
4462
|
} & {
|
|
4463
4463
|
_: {
|
|
4464
|
-
fieldName: "
|
|
4464
|
+
fieldName: "updatedAt";
|
|
4465
4465
|
};
|
|
4466
4466
|
};
|
|
4467
4467
|
completedAt: ConvexNumberBuilderInitial<""> & {
|
|
@@ -4578,7 +4578,7 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
4578
4578
|
fieldName: "direction";
|
|
4579
4579
|
};
|
|
4580
4580
|
};
|
|
4581
|
-
|
|
4581
|
+
startedAt: ConvexNumberBuilderInitial<""> & {
|
|
4582
4582
|
_: {
|
|
4583
4583
|
notNull: true;
|
|
4584
4584
|
};
|
|
@@ -4588,10 +4588,10 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
4588
4588
|
};
|
|
4589
4589
|
} & {
|
|
4590
4590
|
_: {
|
|
4591
|
-
fieldName: "
|
|
4591
|
+
fieldName: "startedAt";
|
|
4592
4592
|
};
|
|
4593
4593
|
};
|
|
4594
|
-
|
|
4594
|
+
updatedAt: ConvexNumberBuilderInitial<""> & {
|
|
4595
4595
|
_: {
|
|
4596
4596
|
notNull: true;
|
|
4597
4597
|
};
|
|
@@ -4601,7 +4601,7 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
4601
4601
|
};
|
|
4602
4602
|
} & {
|
|
4603
4603
|
_: {
|
|
4604
|
-
fieldName: "
|
|
4604
|
+
fieldName: "updatedAt";
|
|
4605
4605
|
};
|
|
4606
4606
|
};
|
|
4607
4607
|
completedAt: ConvexNumberBuilderInitial<""> & {
|
package/package.json
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
3
|
-
description: ALWAYS use this skill when working with convex or kitcn. Covers
|
|
4
|
-
# biome-ignore format: keep sources compact so intent's 500-line validator passes
|
|
2
|
+
name: kitcn
|
|
3
|
+
description: ALWAYS use this skill when working with convex or kitcn. Covers both setup and e2e feature paths using cRPC + ORM + auth + React.
|
|
5
4
|
sources: [www/content/docs/concepts.mdx, www/content/docs/orm/index.mdx, www/content/docs/orm/schema/relations.mdx, www/content/docs/orm/schema/triggers.mdx, www/content/docs/orm/queries/aggregates.mdx, www/content/docs/orm/queries/pagination.mdx, www/content/docs/server/error-handling.mdx, www/content/docs/server/http.mdx, www/content/docs/server/middlewares.mdx, www/content/docs/server/procedures.mdx, www/content/docs/server/server-side-calls.mdx, www/content/docs/react/queries.mdx, www/content/docs/react/mutations.mdx, www/content/docs/react/infinite-queries.mdx, www/content/docs/auth/client.mdx, www/content/docs/auth/server.mdx]
|
|
6
|
-
# biome-ignore format: mirror blog/spec shape without burning 30 lines
|
|
7
5
|
metadata: { sources: [www/content/docs/concepts.mdx, www/content/docs/orm/index.mdx, www/content/docs/orm/schema/relations.mdx, www/content/docs/orm/schema/triggers.mdx, www/content/docs/orm/queries/aggregates.mdx, www/content/docs/orm/queries/pagination.mdx, www/content/docs/server/error-handling.mdx, www/content/docs/server/http.mdx, www/content/docs/server/middlewares.mdx, www/content/docs/server/procedures.mdx, www/content/docs/server/server-side-calls.mdx, www/content/docs/react/queries.mdx, www/content/docs/react/mutations.mdx, www/content/docs/react/infinite-queries.mdx, www/content/docs/auth/client.mdx, www/content/docs/auth/server.mdx] }
|
|
8
6
|
---
|
|
9
7
|
# kitcn Core Skill (80% Path)
|
|
@@ -64,7 +62,6 @@ Only remember these non-parity deltas:
|
|
|
64
62
|
29. Polymorphic unions are schema-first: use `actionType: discriminator({ variants, as? })` in `convexTable(...)`. Query config does not include a `polymorphic` option. Writes stay flat; reads synthesize nested `details` (or custom alias). Use `withVariants: true` to auto-load all `one()` relations on discriminator tables.
|
|
65
63
|
30. Do not add manual ORM mutation batching loops in app/plugin code by default. Convex runtime batching already handles mutation execution. Prefer set-based deletes/updates over per-row loops. Only add explicit chunking when batching external side effects (for example Resend API calls) or bounded cleanup sweeps.
|
|
66
64
|
## Directory Boundary (Important)
|
|
67
|
-
This skill is directory-scoped. Do not depend on reading files outside `packages/kitcn/skills/convex/**`.
|
|
68
65
|
Use `references/setup/` when the task needs:
|
|
69
66
|
1. Project/file structure setup → `setup/index.md` + `setup/server.md`
|
|
70
67
|
2. Auth bootstrap → `setup/auth.md`
|
|
@@ -430,14 +430,18 @@ export const updateOrganization = authMutation
|
|
|
430
430
|
if (input.name !== undefined) data.name = input.name;
|
|
431
431
|
if (slug !== undefined) data.slug = slug;
|
|
432
432
|
|
|
433
|
-
await ctx.
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
433
|
+
await ctx.orm
|
|
434
|
+
.update(organization)
|
|
435
|
+
.set(data)
|
|
436
|
+
.where(eq(organization.id, input.organizationId));
|
|
437
437
|
return null;
|
|
438
438
|
});
|
|
439
439
|
```
|
|
440
440
|
|
|
441
|
+
Use an `authAction` instead of an `authMutation` for any Better Auth endpoint
|
|
442
|
+
that can run external plugin work such as Stripe, Polar, or email delivery.
|
|
443
|
+
Convex mutations cannot call those SDKs.
|
|
444
|
+
|
|
441
445
|
### Delete Organization
|
|
442
446
|
|
|
443
447
|
```ts
|
|
@@ -52,16 +52,16 @@ Snippet policy:
|
|
|
52
52
|
|
|
53
53
|
Use non-overlapping placement.
|
|
54
54
|
|
|
55
|
-
| Destination
|
|
56
|
-
|
|
|
57
|
-
| `references/setup/`
|
|
58
|
-
| `SKILL.md`
|
|
59
|
-
| `references/features/` | Features (on-demand, self-contained)
|
|
55
|
+
| Destination | Role | Must Contain | Must Not Contain |
|
|
56
|
+
| ---------------------- | -------------------------------------------- | ------------------------------------------------------------------------------------------------ | --------------------------------------------------- |
|
|
57
|
+
| `references/setup/` | One-time bootstrap (loaded once per project) | install/bootstrap/env/config/initial wiring/framework setup | daily feature patterns and long advanced deep-dives |
|
|
58
|
+
| `SKILL.md` | Always-loaded core | generic everyday E2E feature implementation path; usable alone for standard feature delivery | setup/install workflows and advanced niche overload |
|
|
59
|
+
| `references/features/` | Features (on-demand, self-contained) | advanced/special cases, plugin depth, long snippets, niche troubleshooting, long-form API detail | setup bootstrap and generic core flow duplication |
|
|
60
60
|
|
|
61
61
|
Definition:
|
|
62
62
|
|
|
63
|
-
- setup == `packages/kitcn/skills/
|
|
64
|
-
- features == `packages/kitcn/skills/
|
|
63
|
+
- setup == `packages/kitcn/skills/kitcn/references/setup/*.md`
|
|
64
|
+
- features == `packages/kitcn/skills/kitcn/references/features/*.md`
|
|
65
65
|
|
|
66
66
|
## 5. WWW Sync Workflow (phase-by-phase)
|
|
67
67
|
|
|
@@ -104,18 +104,21 @@ Minimum acceptance statement per sync:
|
|
|
104
104
|
Run these checks before accepting a sync.
|
|
105
105
|
|
|
106
106
|
1. No stale setup command references in `.claude`:
|
|
107
|
+
|
|
107
108
|
```bash
|
|
108
109
|
rg -n "convex-setup\\.md|commands/convex-setup|\\bconvex-setup\\b" .claude -g '*.md' -g '*.mdc'
|
|
109
110
|
```
|
|
110
111
|
|
|
111
112
|
2. No legacy Ents/`ctx.table` snippets in active Convex skill docs:
|
|
113
|
+
|
|
112
114
|
```bash
|
|
113
|
-
rg -n "ctx\\.table\\(|ctx\\.table\\b|convex-ents|defineEnt\\(" packages/kitcn/skills/
|
|
115
|
+
rg -n "ctx\\.table\\(|ctx\\.table\\b|convex-ents|defineEnt\\(" packages/kitcn/skills/kitcn/SKILL.md packages/kitcn/skills/kitcn/references -g '*.md'
|
|
114
116
|
```
|
|
115
117
|
|
|
116
118
|
3. `SKILL.md` remains setup-free (manual + grep check):
|
|
119
|
+
|
|
117
120
|
```bash
|
|
118
|
-
rg -n "create-next-app|Installation|convex\\.json|\\.env|env push|one-time setup" packages/kitcn/skills/
|
|
121
|
+
rg -n "create-next-app|Installation|convex\\.json|\\.env|env push|one-time setup" packages/kitcn/skills/kitcn/SKILL.md
|
|
119
122
|
```
|
|
120
123
|
|
|
121
124
|
4. Every advanced reference has a discoverable pointer from core when relevant (manual review required).
|
|
@@ -24,7 +24,7 @@ If migration is needed, stop and use migration docs separately. Do not mix migra
|
|
|
24
24
|
This is the **mandatory first prompt** for agents helping users set up kitcn.
|
|
25
25
|
Ask these questions before editing files.
|
|
26
26
|
|
|
27
|
-
### 2.1 Ask These First
|
|
27
|
+
### 2.1 Ask These First
|
|
28
28
|
|
|
29
29
|
#### Required choices
|
|
30
30
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|