kitcn 0.14.0 → 0.14.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/aggregate/index.d.ts +1 -1
- package/dist/auth/generated/index.d.ts +1 -1
- package/dist/auth/index.d.ts +3 -3
- package/dist/{backend-core-DZHqsBcu.mjs → backend-core-DDs8CYH7.mjs} +11 -1
- package/dist/cli.mjs +1 -1
- package/dist/{generated-contract-disabled-B8d7NKUf.d.ts → generated-contract-disabled-C_-KWRfT.d.ts} +1 -1
- package/dist/orm/index.d.ts +1 -1
- package/dist/orm/index.js +6 -5
- package/dist/watcher.mjs +1 -1
- package/dist/{where-clause-compiler-CFCtA01K.d.ts → where-clause-compiler-DcEhkJ12.d.ts} +8 -8
- 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-DcEhkJ12.js";
|
|
2
2
|
import * as convex_values0 from "convex/values";
|
|
3
3
|
import { GenericId, Infer, Value } from "convex/values";
|
|
4
4
|
import { DocumentByName, GenericDataModel, GenericDatabaseReader, GenericDatabaseWriter, TableNamesInDataModel } from "convex/server";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { S as defineAuth, _ as GenericAuthBeforeResult, b as GenericAuthTriggerHandlers, g as BetterAuthOptionsWithoutDatabase, i as getGeneratedAuthDisabledReason, n as GeneratedAuthDisabledReasonKind, r as createDisabledAuthRuntime, t as AuthRuntime, v as GenericAuthDefinition, x as GenericAuthTriggers, y as GenericAuthTriggerChange } from "../../generated-contract-disabled-
|
|
1
|
+
import { S as defineAuth, _ as GenericAuthBeforeResult, b as GenericAuthTriggerHandlers, g as BetterAuthOptionsWithoutDatabase, i as getGeneratedAuthDisabledReason, n as GeneratedAuthDisabledReasonKind, r as createDisabledAuthRuntime, t as AuthRuntime, v as GenericAuthDefinition, x as GenericAuthTriggers, y as GenericAuthTriggerChange } from "../../generated-contract-disabled-C_-KWRfT.js";
|
|
2
2
|
export { type AuthRuntime, BetterAuthOptionsWithoutDatabase, type GeneratedAuthDisabledReasonKind, GenericAuthBeforeResult, GenericAuthDefinition, GenericAuthTriggerChange, GenericAuthTriggerHandlers, GenericAuthTriggers, createDisabledAuthRuntime, defineAuth, getGeneratedAuthDisabledReason };
|
package/dist/auth/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a as QueryCtxWithPreferredOrmQueryTable, n as LookupByIdResultByCtx, t as DocByCtx } from "../query-context-CNo9ffvI.js";
|
|
2
2
|
import { t as GetAuth } from "../types-BCl8gfGy.js";
|
|
3
3
|
import { t as GenericCtx } from "../context-utils-OMkMGhBk.js";
|
|
4
|
-
import { S as defineAuth, _ as GenericAuthBeforeResult, a as AuthFunctions, b as GenericAuthTriggerHandlers, c as createApi, d as deleteOneHandler, f as findManyHandler, g as BetterAuthOptionsWithoutDatabase, h as updateOneHandler, i as getGeneratedAuthDisabledReason, l as createHandler, m as updateManyHandler, n as GeneratedAuthDisabledReasonKind, o as Triggers, p as findOneHandler, r as createDisabledAuthRuntime, s as createClient, t as AuthRuntime, u as deleteManyHandler, v as GenericAuthDefinition, x as GenericAuthTriggers, y as GenericAuthTriggerChange } from "../generated-contract-disabled-
|
|
4
|
+
import { S as defineAuth, _ as GenericAuthBeforeResult, a as AuthFunctions, b as GenericAuthTriggerHandlers, c as createApi, d as deleteOneHandler, f as findManyHandler, g as BetterAuthOptionsWithoutDatabase, h as updateOneHandler, i as getGeneratedAuthDisabledReason, l as createHandler, m as updateManyHandler, n as GeneratedAuthDisabledReasonKind, o as Triggers, p as findOneHandler, r as createDisabledAuthRuntime, s as createClient, t as AuthRuntime, u as deleteManyHandler, v as GenericAuthDefinition, x as GenericAuthTriggers, y as GenericAuthTriggerChange } from "../generated-contract-disabled-C_-KWRfT.js";
|
|
5
5
|
import * as convex_values0 from "convex/values";
|
|
6
6
|
import { Infer } from "convex/values";
|
|
7
7
|
import { AuthConfig, DocumentByName, GenericDataModel, GenericMutationCtx, GenericQueryCtx, GenericSchema, PaginationOptions, PaginationResult, SchemaDefinition, TableNamesInDataModel } from "convex/server";
|
|
@@ -119,7 +119,6 @@ declare const adapterWhereValidator: convex_values0.VObject<{
|
|
|
119
119
|
value: convex_values0.VUnion<string | number | boolean | string[] | number[] | null, [convex_values0.VString<string, "required">, convex_values0.VFloat64<number, "required">, convex_values0.VBoolean<boolean, "required">, convex_values0.VArray<string[], convex_values0.VString<string, "required">, "required">, convex_values0.VArray<number[], convex_values0.VFloat64<number, "required">, "required">, convex_values0.VNull<null, "required">], "required", never>;
|
|
120
120
|
}, "required", "mode" | "value" | "connector" | "field" | "operator">;
|
|
121
121
|
declare const adapterArgsValidator: convex_values0.VObject<{
|
|
122
|
-
limit?: number | undefined;
|
|
123
122
|
select?: string[] | undefined;
|
|
124
123
|
where?: {
|
|
125
124
|
mode?: "sensitive" | "insensitive" | undefined;
|
|
@@ -128,6 +127,7 @@ declare const adapterArgsValidator: convex_values0.VObject<{
|
|
|
128
127
|
value: string | number | boolean | string[] | number[] | null;
|
|
129
128
|
field: string;
|
|
130
129
|
}[] | undefined;
|
|
130
|
+
limit?: number | undefined;
|
|
131
131
|
offset?: number | undefined;
|
|
132
132
|
sortBy?: {
|
|
133
133
|
field: string;
|
|
@@ -165,7 +165,7 @@ declare const adapterArgsValidator: convex_values0.VObject<{
|
|
|
165
165
|
operator: convex_values0.VUnion<"lt" | "lte" | "gt" | "gte" | "eq" | "in" | "not_in" | "ne" | "contains" | "starts_with" | "ends_with" | undefined, [convex_values0.VLiteral<"lt", "required">, convex_values0.VLiteral<"lte", "required">, convex_values0.VLiteral<"gt", "required">, convex_values0.VLiteral<"gte", "required">, convex_values0.VLiteral<"eq", "required">, convex_values0.VLiteral<"in", "required">, convex_values0.VLiteral<"not_in", "required">, convex_values0.VLiteral<"ne", "required">, convex_values0.VLiteral<"contains", "required">, convex_values0.VLiteral<"starts_with", "required">, convex_values0.VLiteral<"ends_with", "required">], "optional", never>;
|
|
166
166
|
value: convex_values0.VUnion<string | number | boolean | string[] | number[] | null, [convex_values0.VString<string, "required">, convex_values0.VFloat64<number, "required">, convex_values0.VBoolean<boolean, "required">, convex_values0.VArray<string[], convex_values0.VString<string, "required">, "required">, convex_values0.VArray<number[], convex_values0.VFloat64<number, "required">, "required">, convex_values0.VNull<null, "required">], "required", never>;
|
|
167
167
|
}, "required", "mode" | "value" | "connector" | "field" | "operator">, "optional">;
|
|
168
|
-
}, "required", "
|
|
168
|
+
}, "required", "model" | "select" | "where" | "limit" | "offset" | "sortBy" | "sortBy.field" | "sortBy.direction">;
|
|
169
169
|
declare const hasUniqueFields: (betterAuthSchema: BetterAuthDBSchema, model: string, input: Record<string, any>) => boolean;
|
|
170
170
|
declare const checkUniqueFields: <Schema extends SchemaDefinition<any, any>>(ctx: GenericQueryCtx<GenericDataModel>, schema: Schema, betterAuthSchema: BetterAuthDBSchema, table: string, input: Record<string, any>, doc?: Record<string, any>) => Promise<void>;
|
|
171
171
|
declare const selectFields: <T extends TableNamesInDataModel<GenericDataModel>, D extends DocumentByName<GenericDataModel, T>>(doc: D | null, select?: string[]) => D | null;
|
|
@@ -10469,7 +10469,17 @@ function buildAuthConvexStartProviderPlanFile(params) {
|
|
|
10469
10469
|
const projectContext = params.roots.projectContext;
|
|
10470
10470
|
if (!projectContext || projectContext.framework !== "tanstack-start") throw new Error("Auth preset \"convex\" requires a supported TanStack Start app shell.");
|
|
10471
10471
|
const providerPath = resolve(process.cwd(), projectContext.convexClientDir, "convex-provider.tsx");
|
|
10472
|
-
if (!fs.existsSync(providerPath))
|
|
10472
|
+
if (!fs.existsSync(providerPath)) {
|
|
10473
|
+
const normalizedPath = relative(process.cwd(), providerPath).replaceAll("\\", "/");
|
|
10474
|
+
return {
|
|
10475
|
+
action: "skip",
|
|
10476
|
+
content: "",
|
|
10477
|
+
kind: "scaffold",
|
|
10478
|
+
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.`],
|
|
10479
|
+
path: normalizedPath,
|
|
10480
|
+
reason: "No Start provider found to patch."
|
|
10481
|
+
};
|
|
10482
|
+
}
|
|
10473
10483
|
return createPlanFile({
|
|
10474
10484
|
kind: "scaffold",
|
|
10475
10485
|
filePath: providerPath,
|
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 serializeEnvValue, D as parseInitCommandArgs, Dt as logger, E as parseBackendRunJson, 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, Ot as highlighter, P as resolveMigrationConfig, Q as promptForPluginSelection, R as runAggregatePruneFlow, S as isConvexDevPreRunConflictFlag, St as resolveAuthEnvState, T as parseArgs, 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, 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 stripConvexCommandNoise, x as hasRemoteConvexDeploymentEnv, xt as resolveProjectScaffoldContext, y as getConvexDeploymentCommandEnv, yt as inspectPluginDependencyInstall, z as runBackendFunction } from "./backend-core-
|
|
2
|
+
import { $ as promptForScaffoldTemplateSelection, A as resolveCodegenTrimSegments, B as runConfiguredCodegen, C as isEntryPoint, Ct as serializeEnvValue, D as parseInitCommandArgs, Dt as logger, E as parseBackendRunJson, 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, Ot as highlighter, P as resolveMigrationConfig, Q as promptForPluginSelection, R as runAggregatePruneFlow, S as isConvexDevPreRunConflictFlag, St as resolveAuthEnvState, T as parseArgs, 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, 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 stripConvexCommandNoise, x as hasRemoteConvexDeploymentEnv, xt as resolveProjectScaffoldContext, y as getConvexDeploymentCommandEnv, yt as inspectPluginDependencyInstall, z as runBackendFunction } from "./backend-core-DDs8CYH7.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";
|
package/dist/{generated-contract-disabled-B8d7NKUf.d.ts → generated-contract-disabled-C_-KWRfT.d.ts}
RENAMED
|
@@ -216,7 +216,6 @@ declare const createApi: <Schema extends SchemaDefinition<any, any>, DataModel e
|
|
|
216
216
|
};
|
|
217
217
|
}, Promise<Record<string, unknown> | undefined>>;
|
|
218
218
|
findMany: convex_server0.RegisteredQuery<"internal", {
|
|
219
|
-
limit?: number | undefined;
|
|
220
219
|
join?: any;
|
|
221
220
|
where?: {
|
|
222
221
|
mode?: "sensitive" | "insensitive" | undefined;
|
|
@@ -225,6 +224,7 @@ declare const createApi: <Schema extends SchemaDefinition<any, any>, DataModel e
|
|
|
225
224
|
value: string | number | boolean | string[] | number[] | null;
|
|
226
225
|
field: string;
|
|
227
226
|
}[] | undefined;
|
|
227
|
+
limit?: number | undefined;
|
|
228
228
|
offset?: number | undefined;
|
|
229
229
|
sortBy?: {
|
|
230
230
|
field: string;
|
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-DcEhkJ12.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/orm/index.js
CHANGED
|
@@ -8704,6 +8704,7 @@ var ConvexUpdateBuilder = class extends QueryPromise {
|
|
|
8704
8704
|
...onUpdateSet,
|
|
8705
8705
|
...normalizedSetValues
|
|
8706
8706
|
};
|
|
8707
|
+
const writeSet = normalizeDateFieldsForWrite(this.table, effectiveSet);
|
|
8707
8708
|
const tableName = getTableName(this.table);
|
|
8708
8709
|
let rows;
|
|
8709
8710
|
let continueCursor = null;
|
|
@@ -8808,7 +8809,7 @@ var ConvexUpdateBuilder = class extends QueryPromise {
|
|
|
8808
8809
|
const updates = await Promise.all(rows.map(async (row) => {
|
|
8809
8810
|
const updatedRow = {
|
|
8810
8811
|
...row,
|
|
8811
|
-
...
|
|
8812
|
+
...writeSet
|
|
8812
8813
|
};
|
|
8813
8814
|
return {
|
|
8814
8815
|
row,
|
|
@@ -8831,9 +8832,9 @@ var ConvexUpdateBuilder = class extends QueryPromise {
|
|
|
8831
8832
|
const fkBatchSize = isPaginated ? pagination.limit : batchSize;
|
|
8832
8833
|
for (const { row, updatedRow, decision } of updates) {
|
|
8833
8834
|
if (!decision.allowed) continue;
|
|
8834
|
-
enforcePolymorphicWrite(this.table, updatedRow, { changedFields: new Set(Object.keys(
|
|
8835
|
+
enforcePolymorphicWrite(this.table, updatedRow, { changedFields: new Set(Object.keys(writeSet)) });
|
|
8835
8836
|
enforceCheckConstraints(this.table, updatedRow);
|
|
8836
|
-
await enforceForeignKeys(this.db, this.table, updatedRow, { changedFields: new Set(Object.keys(
|
|
8837
|
+
await enforceForeignKeys(this.db, this.table, updatedRow, { changedFields: new Set(Object.keys(writeSet)) });
|
|
8837
8838
|
await applyIncomingForeignKeyActionsOnUpdate(this.db, this.table, row, updatedRow, {
|
|
8838
8839
|
graph: foreignKeyGraph,
|
|
8839
8840
|
batchSize: fkBatchSize,
|
|
@@ -8850,9 +8851,9 @@ var ConvexUpdateBuilder = class extends QueryPromise {
|
|
|
8850
8851
|
});
|
|
8851
8852
|
await enforceUniqueIndexes(this.db, this.table, updatedRow, {
|
|
8852
8853
|
currentId: row._id,
|
|
8853
|
-
changedFields: new Set(Object.keys(
|
|
8854
|
+
changedFields: new Set(Object.keys(writeSet))
|
|
8854
8855
|
});
|
|
8855
|
-
await this.db.patch(tableName, row._id,
|
|
8856
|
+
await this.db.patch(tableName, row._id, writeSet);
|
|
8856
8857
|
numAffected++;
|
|
8857
8858
|
if (!this.returningFields) continue;
|
|
8858
8859
|
const updated = await this.db.get(row._id);
|
package/dist/watcher.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { Dt as logger, Et as getConvexConfig, F as resolveRunDeps, Tt as generateMeta, j as resolveConfiguredBackend, q as withLocalCodegenEnv } from "./backend-core-
|
|
2
|
+
import { Dt as logger, Et as getConvexConfig, F as resolveRunDeps, Tt as generateMeta, j as resolveConfiguredBackend, q as withLocalCodegenEnv } from "./backend-core-DDs8CYH7.mjs";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import { fileURLToPath } from "node:url";
|
|
5
5
|
|
|
@@ -4257,26 +4257,26 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
4257
4257
|
fieldName: "status";
|
|
4258
4258
|
};
|
|
4259
4259
|
};
|
|
4260
|
-
|
|
4260
|
+
kind: ConvexTextBuilderInitial<""> & {
|
|
4261
4261
|
_: {
|
|
4262
|
-
|
|
4262
|
+
notNull: true;
|
|
4263
4263
|
};
|
|
4264
4264
|
} & {
|
|
4265
4265
|
_: {
|
|
4266
|
-
|
|
4266
|
+
tableName: "aggregate_state";
|
|
4267
4267
|
};
|
|
4268
|
-
}
|
|
4269
|
-
kind: ConvexTextBuilderInitial<""> & {
|
|
4268
|
+
} & {
|
|
4270
4269
|
_: {
|
|
4271
|
-
|
|
4270
|
+
fieldName: "kind";
|
|
4272
4271
|
};
|
|
4273
|
-
}
|
|
4272
|
+
};
|
|
4273
|
+
cursor: ConvexTextBuilderInitial<""> & {
|
|
4274
4274
|
_: {
|
|
4275
4275
|
tableName: "aggregate_state";
|
|
4276
4276
|
};
|
|
4277
4277
|
} & {
|
|
4278
4278
|
_: {
|
|
4279
|
-
fieldName: "
|
|
4279
|
+
fieldName: "cursor";
|
|
4280
4280
|
};
|
|
4281
4281
|
};
|
|
4282
4282
|
updatedAt: 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
|