kitcn 0.33.8 → 0.33.10
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/CHANGELOG.md +18 -0
- package/dist/aggregate/index.d.ts +1 -1
- package/dist/auth/generated/index.d.ts +1 -1
- package/dist/auth/index.d.ts +16 -16
- package/dist/cli.mjs +2 -2
- package/dist/{generated-contract-disabled-CFLQf8Wg.d.ts → generated-contract-disabled-PdNGvNYP.d.ts} +25 -25
- package/dist/{local-env-DfRydipT.mjs → local-env-CaFwt5Bw.mjs} +18 -14
- package/dist/orm/index.d.ts +1 -1
- package/dist/orm/migrations/index.d.ts +1 -1
- package/dist/watcher.mjs +1 -1
- package/dist/{where-clause-compiler-CTblNxLo.d.ts → where-clause-compiler-DNFGsYBl.d.ts} +30 -30
- package/package.json +2 -2
- package/skills/kitcn/references/setup/next.md +40 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# kitcn
|
|
2
2
|
|
|
3
|
+
## 0.33.10
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#480](https://github.com/udecode/kitcn/pull/480) [`7d976bd`](https://github.com/udecode/kitcn/commit/7d976bd84c5012c115f00f7bc89a5f93a37e886d) Thanks [@EfficiencyCorp](https://github.com/EfficiencyCorp)! - ## Patches
|
|
8
|
+
|
|
9
|
+
- Fix generated auth modules missing the internal `consumeOne` and `incrementOne` mutations that the Better Auth adapter calls. Rerun `kitcn codegen` and redeploy.
|
|
10
|
+
|
|
11
|
+
## 0.33.9
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [#484](https://github.com/udecode/kitcn/pull/484) [`153e95a`](https://github.com/udecode/kitcn/commit/153e95a4956dc4715da0dfd14d3ced7045ad1214) Thanks [@EfficiencyCorp](https://github.com/EfficiencyCorp)! - ## Patches
|
|
16
|
+
|
|
17
|
+
- Support Convex `1.45` and `1.46`.
|
|
18
|
+
- Scaffold new apps with Convex `1.46.0`.
|
|
19
|
+
- Require Node 20 or newer when running Convex `1.45` or later.
|
|
20
|
+
|
|
3
21
|
## 0.33.8
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Vn as ConvexTextBuilderInitial, Zt as ConvexTableWithColumns } from "../capabilities-Bxzoofl4.js";
|
|
2
|
-
import { C as ConvexNumberBuilderInitial, E as ConvexIdBuilderInitial, N as ConvexCustomBuilderInitial } from "../where-clause-compiler-
|
|
2
|
+
import { C as ConvexNumberBuilderInitial, E as ConvexIdBuilderInitial, N as ConvexCustomBuilderInitial } from "../where-clause-compiler-DNFGsYBl.js";
|
|
3
3
|
import * as convex_values0 from "convex/values";
|
|
4
4
|
import { GenericId, Infer, Value } from "convex/values";
|
|
5
5
|
import { DocumentByName, GenericDataModel, GenericDatabaseReader, GenericDatabaseWriter, TableNamesInDataModel } from "convex/server";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { C as GenericAuthTriggerHandlers, S as GenericAuthTriggerChange, T as defineAuth, b as GenericAuthBeforeResult, i as getGeneratedAuthDisabledReason, n as GeneratedAuthDisabledReasonKind, r as createDisabledAuthRuntime, t as AuthRuntime, w as GenericAuthTriggers, x as GenericAuthDefinition, y as BetterAuthOptionsWithoutDatabase } from "../../generated-contract-disabled-
|
|
1
|
+
import { C as GenericAuthTriggerHandlers, S as GenericAuthTriggerChange, T as defineAuth, b as GenericAuthBeforeResult, i as getGeneratedAuthDisabledReason, n as GeneratedAuthDisabledReasonKind, r as createDisabledAuthRuntime, t as AuthRuntime, w as GenericAuthTriggers, x as GenericAuthDefinition, y as BetterAuthOptionsWithoutDatabase } from "../../generated-contract-disabled-PdNGvNYP.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-BkNjkDCk.js";
|
|
2
2
|
import { t as GetAuth } from "../types-ex0-J-SC.js";
|
|
3
3
|
import { t as GenericCtx } from "../context-utils-Cbv4r0AA.js";
|
|
4
|
-
import { C as GenericAuthTriggerHandlers, S as GenericAuthTriggerChange, T as defineAuth, _ as updateManyHandler, a as AuthFunctions, b as GenericAuthBeforeResult, c as consumeOneHandler, d as createHandler, f as deleteManyHandler, g as incrementOneHandler, h as findOneHandler, i as getGeneratedAuthDisabledReason, l as countHandler, m as findManyHandler, n as GeneratedAuthDisabledReasonKind, o as Triggers, p as deleteOneHandler, r as createDisabledAuthRuntime, s as createClient, t as AuthRuntime, u as createApi, v as updateOneHandler, w as GenericAuthTriggers, x as GenericAuthDefinition, y as BetterAuthOptionsWithoutDatabase } from "../generated-contract-disabled-
|
|
4
|
+
import { C as GenericAuthTriggerHandlers, S as GenericAuthTriggerChange, T as defineAuth, _ as updateManyHandler, a as AuthFunctions, b as GenericAuthBeforeResult, c as consumeOneHandler, d as createHandler, f as deleteManyHandler, g as incrementOneHandler, h as findOneHandler, i as getGeneratedAuthDisabledReason, l as countHandler, m as findManyHandler, n as GeneratedAuthDisabledReasonKind, o as Triggers, p as deleteOneHandler, r as createDisabledAuthRuntime, s as createClient, t as AuthRuntime, u as createApi, v as updateOneHandler, w as GenericAuthTriggers, x as GenericAuthDefinition, y as BetterAuthOptionsWithoutDatabase } from "../generated-contract-disabled-PdNGvNYP.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";
|
|
@@ -109,28 +109,28 @@ type AdapterPaginationOptions = PaginationOptions & {
|
|
|
109
109
|
};
|
|
110
110
|
declare const adapterWhereValidator: convex_values0.VObject<{
|
|
111
111
|
mode?: "sensitive" | "insensitive" | undefined;
|
|
112
|
-
operator?: "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | "in" | "not_in" | "contains" | "starts_with" | "ends_with" | undefined;
|
|
113
112
|
connector?: "AND" | "OR" | undefined;
|
|
114
|
-
|
|
113
|
+
operator?: "lt" | "lte" | "gt" | "gte" | "eq" | "in" | "not_in" | "ne" | "contains" | "starts_with" | "ends_with" | undefined;
|
|
115
114
|
field: string;
|
|
115
|
+
value: string | number | boolean | string[] | number[] | null;
|
|
116
116
|
}, {
|
|
117
117
|
connector: convex_values0.VUnion<"AND" | "OR" | undefined, [convex_values0.VLiteral<"AND", "required">, convex_values0.VLiteral<"OR", "required">], "optional", never>;
|
|
118
118
|
field: convex_values0.VString<string, "required">;
|
|
119
119
|
mode: convex_values0.VUnion<"sensitive" | "insensitive" | undefined, [convex_values0.VLiteral<"sensitive", "required">, convex_values0.VLiteral<"insensitive", "required">], "optional", never>;
|
|
120
|
-
operator: convex_values0.VUnion<"
|
|
120
|
+
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>;
|
|
121
121
|
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>;
|
|
122
|
-
}, "required", "mode" | "
|
|
122
|
+
}, "required", "mode" | "connector" | "field" | "operator" | "value">;
|
|
123
123
|
declare const adapterArgsValidator: convex_values0.VObject<{
|
|
124
|
-
limit?: number | undefined;
|
|
125
124
|
where?: {
|
|
126
125
|
mode?: "sensitive" | "insensitive" | undefined;
|
|
127
|
-
operator?: "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | "in" | "not_in" | "contains" | "starts_with" | "ends_with" | undefined;
|
|
128
126
|
connector?: "AND" | "OR" | undefined;
|
|
129
|
-
|
|
127
|
+
operator?: "lt" | "lte" | "gt" | "gte" | "eq" | "in" | "not_in" | "ne" | "contains" | "starts_with" | "ends_with" | undefined;
|
|
130
128
|
field: string;
|
|
129
|
+
value: string | number | boolean | string[] | number[] | null;
|
|
131
130
|
}[] | undefined;
|
|
132
|
-
|
|
131
|
+
limit?: number | undefined;
|
|
133
132
|
offset?: number | undefined;
|
|
133
|
+
select?: string[] | undefined;
|
|
134
134
|
sortBy?: {
|
|
135
135
|
field: string;
|
|
136
136
|
direction: "asc" | "desc";
|
|
@@ -150,24 +150,24 @@ declare const adapterArgsValidator: convex_values0.VObject<{
|
|
|
150
150
|
}, "optional", "field" | "direction">;
|
|
151
151
|
where: convex_values0.VArray<{
|
|
152
152
|
mode?: "sensitive" | "insensitive" | undefined;
|
|
153
|
-
operator?: "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | "in" | "not_in" | "contains" | "starts_with" | "ends_with" | undefined;
|
|
154
153
|
connector?: "AND" | "OR" | undefined;
|
|
155
|
-
|
|
154
|
+
operator?: "lt" | "lte" | "gt" | "gte" | "eq" | "in" | "not_in" | "ne" | "contains" | "starts_with" | "ends_with" | undefined;
|
|
156
155
|
field: string;
|
|
156
|
+
value: string | number | boolean | string[] | number[] | null;
|
|
157
157
|
}[] | undefined, convex_values0.VObject<{
|
|
158
158
|
mode?: "sensitive" | "insensitive" | undefined;
|
|
159
|
-
operator?: "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | "in" | "not_in" | "contains" | "starts_with" | "ends_with" | undefined;
|
|
160
159
|
connector?: "AND" | "OR" | undefined;
|
|
161
|
-
|
|
160
|
+
operator?: "lt" | "lte" | "gt" | "gte" | "eq" | "in" | "not_in" | "ne" | "contains" | "starts_with" | "ends_with" | undefined;
|
|
162
161
|
field: string;
|
|
162
|
+
value: string | number | boolean | string[] | number[] | null;
|
|
163
163
|
}, {
|
|
164
164
|
connector: convex_values0.VUnion<"AND" | "OR" | undefined, [convex_values0.VLiteral<"AND", "required">, convex_values0.VLiteral<"OR", "required">], "optional", never>;
|
|
165
165
|
field: convex_values0.VString<string, "required">;
|
|
166
166
|
mode: convex_values0.VUnion<"sensitive" | "insensitive" | undefined, [convex_values0.VLiteral<"sensitive", "required">, convex_values0.VLiteral<"insensitive", "required">], "optional", never>;
|
|
167
|
-
operator: convex_values0.VUnion<"
|
|
167
|
+
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>;
|
|
168
168
|
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>;
|
|
169
|
-
}, "required", "mode" | "
|
|
170
|
-
}, "required", "
|
|
169
|
+
}, "required", "mode" | "connector" | "field" | "operator" | "value">, "optional">;
|
|
170
|
+
}, "required", "model" | "where" | "limit" | "offset" | "select" | "sortBy" | "sortBy.field" | "sortBy.direction">;
|
|
171
171
|
declare const hasUniqueFields: (betterAuthSchema: BetterAuthDBSchema, model: string, input: Record<string, any>) => boolean;
|
|
172
172
|
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>;
|
|
173
173
|
declare const selectFields: <T extends TableNamesInDataModel<GenericDataModel>, D extends DocumentByName<GenericDataModel, T>>(doc: D | null, select?: string[]) => D | null;
|
package/dist/cli.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { C as Columns, D as TableName, E as RlsPolicies, O as createSystemFields, S as getRankIndexes, T as OrmSchemaExtensions, _ as loadEsbuild, a as generateMeta, b as getAggregateIndexes, c as resolveSchemaDefaultExport, f as createProjectJiti, g as loadDotenv, h as loadClackPrompts, i as resolveConfiguredBackend, l as schemaDeclaresAggregateIndexes, m as loadBabelParser, n as withLocalCodegenEnv, o as getConvexConfig, p as CRPC_BUILDER_STUB_SOURCE, r as loadCliConfig, s as collectSchemaTables, t as getLocalBackendEnvVars, u as logger, v as highlighter, w as EnableRLS, x as getIndexes, y as isColorEnabled } from "./local-env-
|
|
2
|
+
import { C as Columns, D as TableName, E as RlsPolicies, O as createSystemFields, S as getRankIndexes, T as OrmSchemaExtensions, _ as loadEsbuild, a as generateMeta, b as getAggregateIndexes, c as resolveSchemaDefaultExport, f as createProjectJiti, g as loadDotenv, h as loadClackPrompts, i as resolveConfiguredBackend, l as schemaDeclaresAggregateIndexes, m as loadBabelParser, n as withLocalCodegenEnv, o as getConvexConfig, p as CRPC_BUILDER_STUB_SOURCE, r as loadCliConfig, s as collectSchemaTables, t as getLocalBackendEnvVars, u as logger, v as highlighter, w as EnableRLS, x as getIndexes, y as isColorEnabled } from "./local-env-CaFwt5Bw.mjs";
|
|
3
3
|
import { createRequire } from "node:module";
|
|
4
4
|
import fs, { existsSync, readFileSync } from "node:fs";
|
|
5
5
|
import path, { basename, delimiter, dirname, extname, isAbsolute, join, posix, relative, resolve } from "node:path";
|
|
@@ -2318,7 +2318,7 @@ const PLAIN_VERSION_SPEC_RE = /^[\^~]?v?\d+\.\d+(?:\.\d+)?$/;
|
|
|
2318
2318
|
const UPPER_BOUND_RE = /(?:^|\s)<={0,1}\s*v?(\d+)\.(\d+)(?:\.\d+)?/g;
|
|
2319
2319
|
const LOWER_BOUND_RE = /(?:^|\s)>={0,1}\s*v?(\d+)\.(\d+)(?:\.\d+)?/g;
|
|
2320
2320
|
const SUPPORTED_CONCAVE_CLI_VERSION = "0.0.1-alpha.14";
|
|
2321
|
-
const SUPPORTED_CONVEX_VERSION = "1.
|
|
2321
|
+
const SUPPORTED_CONVEX_VERSION = "1.46.0";
|
|
2322
2322
|
const SUPPORTED_CONVEX_MIN_VERSION = "1.42";
|
|
2323
2323
|
const SUPPORTED_CONVEX_MIN_TYPE_VERSION = "1.42.3";
|
|
2324
2324
|
const SUPPORTED_BETTER_AUTH_VERSION = "1.7.1";
|
package/dist/{generated-contract-disabled-CFLQf8Wg.d.ts → generated-contract-disabled-PdNGvNYP.d.ts}
RENAMED
|
@@ -199,20 +199,20 @@ declare const createApi: <Schema extends SchemaDefinition<any, any>, DataModel e
|
|
|
199
199
|
count: convex_server0.RegisteredQuery<"internal", {
|
|
200
200
|
where?: {
|
|
201
201
|
mode?: "sensitive" | "insensitive" | undefined;
|
|
202
|
-
operator?: "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | "in" | "not_in" | "contains" | "starts_with" | "ends_with" | undefined;
|
|
203
202
|
connector?: "AND" | "OR" | undefined;
|
|
204
|
-
|
|
203
|
+
operator?: "lt" | "lte" | "gt" | "gte" | "eq" | "in" | "not_in" | "ne" | "contains" | "starts_with" | "ends_with" | undefined;
|
|
205
204
|
field: string;
|
|
205
|
+
value: string | number | boolean | string[] | number[] | null;
|
|
206
206
|
}[] | undefined;
|
|
207
207
|
model: string;
|
|
208
208
|
}, Promise<number | null>>;
|
|
209
209
|
consumeOne: convex_server0.RegisteredMutation<"internal", {
|
|
210
210
|
input: {
|
|
211
211
|
where?: {
|
|
212
|
-
operator?: "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | "in" | "not_in" | "contains" | "starts_with" | "ends_with" | undefined;
|
|
213
212
|
connector?: "AND" | "OR" | undefined;
|
|
214
|
-
|
|
213
|
+
operator?: "lt" | "lte" | "gt" | "gte" | "eq" | "in" | "not_in" | "ne" | "contains" | "starts_with" | "ends_with" | undefined;
|
|
215
214
|
field: string;
|
|
215
|
+
value: string | number | boolean | string[] | number[] | null;
|
|
216
216
|
}[] | undefined;
|
|
217
217
|
model: string;
|
|
218
218
|
} | {
|
|
@@ -237,10 +237,10 @@ declare const createApi: <Schema extends SchemaDefinition<any, any>, DataModel e
|
|
|
237
237
|
deleteMany: convex_server0.RegisteredMutation<"internal", {
|
|
238
238
|
input: {
|
|
239
239
|
where?: {
|
|
240
|
-
operator?: "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | "in" | "not_in" | "contains" | "starts_with" | "ends_with" | undefined;
|
|
241
240
|
connector?: "AND" | "OR" | undefined;
|
|
242
|
-
|
|
241
|
+
operator?: "lt" | "lte" | "gt" | "gte" | "eq" | "in" | "not_in" | "ne" | "contains" | "starts_with" | "ends_with" | undefined;
|
|
243
242
|
field: string;
|
|
243
|
+
value: string | number | boolean | string[] | number[] | null;
|
|
244
244
|
}[] | undefined;
|
|
245
245
|
model: string;
|
|
246
246
|
} | {
|
|
@@ -266,10 +266,10 @@ declare const createApi: <Schema extends SchemaDefinition<any, any>, DataModel e
|
|
|
266
266
|
deleteOne: convex_server0.RegisteredMutation<"internal", {
|
|
267
267
|
input: {
|
|
268
268
|
where?: {
|
|
269
|
-
operator?: "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | "in" | "not_in" | "contains" | "starts_with" | "ends_with" | undefined;
|
|
270
269
|
connector?: "AND" | "OR" | undefined;
|
|
271
|
-
|
|
270
|
+
operator?: "lt" | "lte" | "gt" | "gte" | "eq" | "in" | "not_in" | "ne" | "contains" | "starts_with" | "ends_with" | undefined;
|
|
272
271
|
field: string;
|
|
272
|
+
value: string | number | boolean | string[] | number[] | null;
|
|
273
273
|
}[] | undefined;
|
|
274
274
|
model: string;
|
|
275
275
|
} | {
|
|
@@ -278,20 +278,21 @@ declare const createApi: <Schema extends SchemaDefinition<any, any>, DataModel e
|
|
|
278
278
|
};
|
|
279
279
|
}, Promise<Record<string, unknown> | undefined>>;
|
|
280
280
|
findMany: convex_server0.RegisteredQuery<"internal", {
|
|
281
|
-
limit?: number | undefined;
|
|
282
281
|
join?: any;
|
|
283
282
|
where?: {
|
|
284
283
|
mode?: "sensitive" | "insensitive" | undefined;
|
|
285
|
-
operator?: "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | "in" | "not_in" | "contains" | "starts_with" | "ends_with" | undefined;
|
|
286
284
|
connector?: "AND" | "OR" | undefined;
|
|
287
|
-
|
|
285
|
+
operator?: "lt" | "lte" | "gt" | "gte" | "eq" | "in" | "not_in" | "ne" | "contains" | "starts_with" | "ends_with" | undefined;
|
|
288
286
|
field: string;
|
|
287
|
+
value: string | number | boolean | string[] | number[] | null;
|
|
289
288
|
}[] | undefined;
|
|
289
|
+
limit?: number | undefined;
|
|
290
290
|
offset?: number | undefined;
|
|
291
291
|
sortBy?: {
|
|
292
292
|
field: string;
|
|
293
293
|
direction: "asc" | "desc";
|
|
294
294
|
} | undefined;
|
|
295
|
+
model: string;
|
|
295
296
|
paginationOpts: {
|
|
296
297
|
id?: number;
|
|
297
298
|
endCursor?: string | null;
|
|
@@ -300,16 +301,15 @@ declare const createApi: <Schema extends SchemaDefinition<any, any>, DataModel e
|
|
|
300
301
|
numItems: number;
|
|
301
302
|
cursor: string | null;
|
|
302
303
|
};
|
|
303
|
-
model: string;
|
|
304
304
|
}, Promise<PaginationResult<convex_server0.GenericDocument>>>;
|
|
305
305
|
findOne: convex_server0.RegisteredQuery<"internal", {
|
|
306
306
|
join?: any;
|
|
307
307
|
where?: {
|
|
308
308
|
mode?: "sensitive" | "insensitive" | undefined;
|
|
309
|
-
operator?: "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | "in" | "not_in" | "contains" | "starts_with" | "ends_with" | undefined;
|
|
310
309
|
connector?: "AND" | "OR" | undefined;
|
|
311
|
-
|
|
310
|
+
operator?: "lt" | "lte" | "gt" | "gte" | "eq" | "in" | "not_in" | "ne" | "contains" | "starts_with" | "ends_with" | undefined;
|
|
312
311
|
field: string;
|
|
312
|
+
value: string | number | boolean | string[] | number[] | null;
|
|
313
313
|
}[] | undefined;
|
|
314
314
|
select?: string[] | undefined;
|
|
315
315
|
model: string;
|
|
@@ -317,14 +317,14 @@ declare const createApi: <Schema extends SchemaDefinition<any, any>, DataModel e
|
|
|
317
317
|
getLatestJwks: convex_server0.RegisteredAction<"internal", {}, Promise<unknown>>;
|
|
318
318
|
incrementOne: convex_server0.RegisteredMutation<"internal", {
|
|
319
319
|
input: {
|
|
320
|
-
set?: Record<string, any> | undefined;
|
|
321
320
|
where?: {
|
|
322
321
|
mode?: "sensitive" | "insensitive" | undefined;
|
|
323
|
-
operator?: "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | "in" | "not_in" | "contains" | "starts_with" | "ends_with" | undefined;
|
|
324
322
|
connector?: "AND" | "OR" | undefined;
|
|
325
|
-
|
|
323
|
+
operator?: "lt" | "lte" | "gt" | "gte" | "eq" | "in" | "not_in" | "ne" | "contains" | "starts_with" | "ends_with" | undefined;
|
|
326
324
|
field: string;
|
|
325
|
+
value: string | number | boolean | string[] | number[] | null;
|
|
327
326
|
}[] | undefined;
|
|
327
|
+
set?: Record<string, any> | undefined;
|
|
328
328
|
model: string;
|
|
329
329
|
increment: Record<string, number>;
|
|
330
330
|
};
|
|
@@ -333,21 +333,21 @@ declare const createApi: <Schema extends SchemaDefinition<any, any>, DataModel e
|
|
|
333
333
|
updateMany: convex_server0.RegisteredMutation<"internal", {
|
|
334
334
|
input: {
|
|
335
335
|
where?: {
|
|
336
|
-
operator?: "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | "in" | "not_in" | "contains" | "starts_with" | "ends_with" | undefined;
|
|
337
336
|
connector?: "AND" | "OR" | undefined;
|
|
338
|
-
|
|
337
|
+
operator?: "lt" | "lte" | "gt" | "gte" | "eq" | "in" | "not_in" | "ne" | "contains" | "starts_with" | "ends_with" | undefined;
|
|
339
338
|
field: string;
|
|
339
|
+
value: string | number | boolean | string[] | number[] | null;
|
|
340
340
|
}[] | undefined;
|
|
341
|
+
model: string;
|
|
341
342
|
update: {
|
|
342
343
|
[x: string]: unknown;
|
|
343
344
|
[x: number]: unknown;
|
|
344
345
|
[x: symbol]: unknown;
|
|
345
346
|
};
|
|
346
|
-
model: string;
|
|
347
347
|
} | {
|
|
348
348
|
where?: any[] | undefined;
|
|
349
|
-
update: any;
|
|
350
349
|
model: string;
|
|
350
|
+
update: any;
|
|
351
351
|
};
|
|
352
352
|
paginationOpts: {
|
|
353
353
|
id?: number;
|
|
@@ -368,21 +368,21 @@ declare const createApi: <Schema extends SchemaDefinition<any, any>, DataModel e
|
|
|
368
368
|
updateOne: convex_server0.RegisteredMutation<"internal", {
|
|
369
369
|
input: {
|
|
370
370
|
where?: {
|
|
371
|
-
operator?: "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | "in" | "not_in" | "contains" | "starts_with" | "ends_with" | undefined;
|
|
372
371
|
connector?: "AND" | "OR" | undefined;
|
|
373
|
-
|
|
372
|
+
operator?: "lt" | "lte" | "gt" | "gte" | "eq" | "in" | "not_in" | "ne" | "contains" | "starts_with" | "ends_with" | undefined;
|
|
374
373
|
field: string;
|
|
374
|
+
value: string | number | boolean | string[] | number[] | null;
|
|
375
375
|
}[] | undefined;
|
|
376
|
+
model: string;
|
|
376
377
|
update: {
|
|
377
378
|
[x: string]: unknown;
|
|
378
379
|
[x: number]: unknown;
|
|
379
380
|
[x: symbol]: unknown;
|
|
380
381
|
};
|
|
381
|
-
model: string;
|
|
382
382
|
} | {
|
|
383
383
|
where?: any[] | undefined;
|
|
384
|
-
update: any;
|
|
385
384
|
model: string;
|
|
385
|
+
update: any;
|
|
386
386
|
};
|
|
387
387
|
}, Promise<any>>;
|
|
388
388
|
};
|
|
@@ -2758,6 +2758,11 @@ const AUTH_RUNTIME_PROCEDURES = [
|
|
|
2758
2758
|
internal: true,
|
|
2759
2759
|
type: "query"
|
|
2760
2760
|
},
|
|
2761
|
+
{
|
|
2762
|
+
exportName: "consumeOne",
|
|
2763
|
+
internal: true,
|
|
2764
|
+
type: "mutation"
|
|
2765
|
+
},
|
|
2761
2766
|
{
|
|
2762
2767
|
exportName: "create",
|
|
2763
2768
|
internal: true,
|
|
@@ -2788,6 +2793,11 @@ const AUTH_RUNTIME_PROCEDURES = [
|
|
|
2788
2793
|
internal: true,
|
|
2789
2794
|
type: "action"
|
|
2790
2795
|
},
|
|
2796
|
+
{
|
|
2797
|
+
exportName: "incrementOne",
|
|
2798
|
+
internal: true,
|
|
2799
|
+
type: "mutation"
|
|
2800
|
+
},
|
|
2791
2801
|
{
|
|
2792
2802
|
exportName: "rotateKeys",
|
|
2793
2803
|
internal: true,
|
|
@@ -2804,6 +2814,13 @@ const AUTH_RUNTIME_PROCEDURES = [
|
|
|
2804
2814
|
type: "mutation"
|
|
2805
2815
|
}
|
|
2806
2816
|
];
|
|
2817
|
+
const AUTH_RUNTIME_EXPORTS = [
|
|
2818
|
+
"authEnabled",
|
|
2819
|
+
"authClient",
|
|
2820
|
+
"getAuth",
|
|
2821
|
+
"auth",
|
|
2822
|
+
...AUTH_RUNTIME_PROCEDURES.map((entry) => entry.exportName)
|
|
2823
|
+
];
|
|
2807
2824
|
const GENERATED_ORM_RUNTIME_PROCEDURES = [
|
|
2808
2825
|
{
|
|
2809
2826
|
exportName: "scheduledMutationBatch",
|
|
@@ -3626,20 +3643,7 @@ const authRuntime: ${hasAuthDefaultExport ? `AuthRuntime<
|
|
|
3626
3643
|
})`};
|
|
3627
3644
|
|
|
3628
3645
|
export const {
|
|
3629
|
-
|
|
3630
|
-
authClient,
|
|
3631
|
-
getAuth,
|
|
3632
|
-
auth,
|
|
3633
|
-
count,
|
|
3634
|
-
create,
|
|
3635
|
-
deleteMany,
|
|
3636
|
-
deleteOne,
|
|
3637
|
-
findMany,
|
|
3638
|
-
findOne,
|
|
3639
|
-
updateMany,
|
|
3640
|
-
updateOne,
|
|
3641
|
-
getLatestJwks,
|
|
3642
|
-
rotateKeys,
|
|
3646
|
+
${AUTH_RUNTIME_EXPORTS.map((name) => ` ${name},`).join("\n")}
|
|
3643
3647
|
} = authRuntime;
|
|
3644
3648
|
`;
|
|
3645
3649
|
}
|
package/dist/orm/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { $n as TableName, $t as OrmLifecycleChange, An as ConvexCheckBuilder, At as UpdateSet, Bn as ConvexTextBuilder, Br as IsPrimaryKey, Bt as RelationsBuilderColumnBase, C as MigrationStep, Cn as ConvexVectorIndexConfig, Cr as not, Ct as OrderByClause, D as defineMigration, Dn as searchIndex, Dr as startsWith, Dt as ReturningAll, E as buildMigrationPlan, En as rankIndex, Er as or, Et as PredicateWhereIndexConfig, Fn as ConvexUniqueConstraintBuilderOn, Fr as ColumnBuilderTypeConfig, Ft as ExtractTablesFromSchema, Gn as Columns, Gt as TablesRelationalConfig, H as RlsMode, Hn as text, Hr as NotNull, In as ConvexUniqueConstraintConfig, Ir as ColumnBuilderWithTableName, It as ExtractTablesWithRelations, Jn as OrmSchemaExtensionTables, Jt as ConvexDeletionBuilder, Kt as defineRelations, Ln as check, Lr as ColumnDataType, Lt as ManyConfig, M as DatabaseWithQuery, Mn as ConvexForeignKeyBuilder, Mr as ColumnBuilder, Mt as VectorSearchProvider, N as OrmReader$1, Nn as ConvexForeignKeyConfig, Nr as ColumnBuilderBaseConfig, Nt as unsetToken, O as defineMigrationSet, On as uniqueIndex, Ot as ReturningResult, P as OrmWriter$1, Pn as ConvexUniqueConstraintBuilder, Pr as ColumnBuilderRuntimeConfig, Qn as OrmSchemaTriggers, Qt as DiscriminatorBuilderConfig, Rn as foreignKey, Rr as DrizzleEntity, Rt as OneConfig, S as MigrationStateMap, Sn as ConvexVectorIndexBuilderOn, Sr as ne, St as MutationRunMode, T as MigrationWriteMode, Tn as index, Tr as notInArray, Tt as PaginatedResult, U as EdgeMetadata, V as RlsContext, Vn as ConvexTextBuilderInitial, Vr as IsUnique, Vt as RelationsBuilderColumnConfig, W as extractRelationsConfig, Wn as Brand, Wt as TableRelationalConfig, Xn as OrmSchemaExtensions, Xt as ConvexTable, Yt as ConvexDeletionConfig, Zn as OrmSchemaRelations, Zt as ConvexTableWithColumns, _ as MigrationManifestEntry, _n as ConvexRankIndexBuilderOn, _r as isNotNull, _t as MutationExecutionMode, an as RlsPolicy, ar as UnaryExpression, at as BuildRelationResult, b as MigrationRunStatus, bn as ConvexSearchIndexConfig, br as lt, bt as MutationResult, cn as rlsPolicy, cr as contains, ct as DBQueryConfig, d as MigrationAppliedState, dn as rlsRole, dr as fieldRef, dt as InferInsertModel, en as OrmLifecycleOperation, er as BinaryExpression, f as MigrationDefinition, fn as ConvexAggregateIndexBuilder, fr as gt, ft as InferModelFromColumns, g as MigrationDriftIssue, gn as ConvexRankIndexBuilder, gr as isFieldReference, gt as MutationExecuteResult, h as MigrationDocContext, hn as ConvexIndexBuilderOn, hr as inArray, ht as MutationExecuteConfig, i as OrmMigrationCapability, in as discriminator, ir as LogicalExpression, it as BuildQueryResult, j as DatabaseWithMutations, jn as ConvexCheckConfig, jr as AnyColumn, jt as VectorQueryConfig, k as detectMigrationDrift, kn as vectorIndex, kr as SystemFields, kt as ReturningSelection, ln as RlsRole, lr as endsWith, lt as FilterOperators, m as MigrationDoc, mn as ConvexIndexBuilder, mr as ilike, mt as InsertValue, n as OrmCapabilities, nn as convexTable, nr as FieldReference, nt as AggregateFieldValue, on as RlsPolicyConfig, or as and, ot as CountConfig, p as MigrationDirection, pn as ConvexAggregateIndexBuilderOn, pr as gte, pt as InferSelectModel, qt as defineRelationsPart, r as OrmCapability, rn as deletion, rr as FilterExpression, rt as AggregateResult, sn as RlsPolicyToOption, sr as between, st as CountResult, t as OrmAggregateCapability, tn as TableConfig, tr as ExpressionVisitor, tt as AggregateConfig, un as RlsRoleConfig, ur as eq, ut as GetColumnData, v as MigrationMigrateOne, vn as ConvexSearchIndexBuilder, vr as isNull, vt as MutationPaginateConfig, w as MigrationTableName, wn as aggregateIndex, wr as notBetween, wt as OrderDirection, x as MigrationSet, xn as ConvexVectorIndexBuilder, xr as lte, xt as MutationReturning, y as MigrationPlan, yn as ConvexSearchIndexBuilderOn, yr as like, yt as MutationPaginatedResult, zn as unique, zr as HasDefault, zt as RelationsBuilder } from "../capabilities-Bxzoofl4.js";
|
|
2
|
-
import { $ as OrmClientWithApi$1, A as ConvexDateMode, B as ConvexBytesBuilderInitial, C as ConvexNumberBuilderInitial, D as id, E as ConvexIdBuilderInitial, F as custom, G as ConvexBigIntBuilder, H as ConvexBooleanBuilder, I as json, J as CreateOrmOptions, K as ConvexBigIntBuilderInitial, L as objectOf, M as ConvexCustomBuilder, N as ConvexCustomBuilderInitial, O as ConvexDateBuilder, P as arrayOf, Q as OrmClientBase$1, R as unionOf, S as ConvexNumberBuilder, St as defineTriggers, T as ConvexIdBuilder, U as ConvexBooleanBuilderInitial, V as bytes, W as boolean, X as GenericOrmCtx$1, Y as GenericOrm$1, Z as OrmApiResult, _ as ConvexTimestampMode, _t as OrmBeforeResult, a as requireSchemaRelations, at as ScheduledMutationBatchArgs, b as ConvexTextEnumBuilderInitial, bt as OrmTriggerContext, c as TableConfigResult, ct as scheduledDeleteFactory, d as OrmNotFoundError, et as OrmFunctions, f as ConvexVectorBuilder, g as ConvexTimestampBuilderInitial, gt as defineSchemaExtension, h as ConvexTimestampBuilder, ht as SchemaExtension, i as getSchemaTriggers, it as createOrm, j as date, k as ConvexDateBuilderInitial, l as getTableColumns, m as vector, n as defineSchema, nt as OrmWriterCtx, o as asc, ot as scheduledMutationBatchFactory, p as ConvexVectorBuilderInitial, q as bigint, r as getSchemaRelations, rt as ResolveOrmSchema, s as desc, st as ScheduledDeleteArgs, t as WhereClauseResult, tt as OrmReaderCtx, u as getTableConfig, v as timestamp, vt as OrmTableTriggers, w as integer, x as textEnum, xt as OrmTriggers, y as ConvexTextEnumBuilder, yt as OrmTriggerChange, z as ConvexBytesBuilder } from "../where-clause-compiler-
|
|
2
|
+
import { $ as OrmClientWithApi$1, A as ConvexDateMode, B as ConvexBytesBuilderInitial, C as ConvexNumberBuilderInitial, D as id, E as ConvexIdBuilderInitial, F as custom, G as ConvexBigIntBuilder, H as ConvexBooleanBuilder, I as json, J as CreateOrmOptions, K as ConvexBigIntBuilderInitial, L as objectOf, M as ConvexCustomBuilder, N as ConvexCustomBuilderInitial, O as ConvexDateBuilder, P as arrayOf, Q as OrmClientBase$1, R as unionOf, S as ConvexNumberBuilder, St as defineTriggers, T as ConvexIdBuilder, U as ConvexBooleanBuilderInitial, V as bytes, W as boolean, X as GenericOrmCtx$1, Y as GenericOrm$1, Z as OrmApiResult, _ as ConvexTimestampMode, _t as OrmBeforeResult, a as requireSchemaRelations, at as ScheduledMutationBatchArgs, b as ConvexTextEnumBuilderInitial, bt as OrmTriggerContext, c as TableConfigResult, ct as scheduledDeleteFactory, d as OrmNotFoundError, et as OrmFunctions, f as ConvexVectorBuilder, g as ConvexTimestampBuilderInitial, gt as defineSchemaExtension, h as ConvexTimestampBuilder, ht as SchemaExtension, i as getSchemaTriggers, it as createOrm, j as date, k as ConvexDateBuilderInitial, l as getTableColumns, m as vector, n as defineSchema, nt as OrmWriterCtx, o as asc, ot as scheduledMutationBatchFactory, p as ConvexVectorBuilderInitial, q as bigint, r as getSchemaRelations, rt as ResolveOrmSchema, s as desc, st as ScheduledDeleteArgs, t as WhereClauseResult, tt as OrmReaderCtx, u as getTableConfig, v as timestamp, vt as OrmTableTriggers, w as integer, x as textEnum, xt as OrmTriggers, y as ConvexTextEnumBuilder, yt as OrmTriggerChange, z as ConvexBytesBuilder } from "../where-clause-compiler-DNFGsYBl.js";
|
|
3
3
|
import { i as pretendRequired, n as deprecated, r as pretend } from "../validators-0I-Ik1EN.js";
|
|
4
4
|
import { a as QueryCtxWithPreferredOrmQueryTable, i as QueryCtxWithOrmQueryTable, n as LookupByIdResultByCtx, o as getByIdWithOrmQueryFallback, r as QueryCtxWithOptionalOrmQueryTable, t as DocByCtx } from "../query-context-BkNjkDCk.js";
|
|
5
5
|
import { DefineSchemaOptions, GenericDatabaseReader, GenericDatabaseWriter, GenericSchema, SchemaDefinition } from "convex/server";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { C as MigrationStep, D as defineMigration, E as buildMigrationPlan, O as defineMigrationSet, S as MigrationStateMap, T as MigrationWriteMode, _ as MigrationManifestEntry, a as MAX_STATUS_RUN_LIMIT, b as MigrationRunStatus, c as MigrationRunChunkArgs, d as MigrationAppliedState, f as MigrationDefinition, g as MigrationDriftIssue, h as MigrationDocContext, k as detectMigrationDrift, l as MigrationStatusArgs, m as MigrationDoc, o as MigrationCancelArgs, p as MigrationDirection, s as MigrationRunArgs, u as createMigrationHandlers, v as MigrationMigrateOne, w as MigrationTableName, x as MigrationSet, y as MigrationPlan } from "../../capabilities-Bxzoofl4.js";
|
|
2
|
-
import { Ct as migrationCapability, dt as MIGRATION_STORAGE_TABLE_NAMES, ft as injectMigrationStorageTables, lt as MIGRATION_RUN_TABLE, mt as migrationStorageTables, pt as migrationExtension, ut as MIGRATION_STATE_TABLE } from "../../where-clause-compiler-
|
|
2
|
+
import { Ct as migrationCapability, dt as MIGRATION_STORAGE_TABLE_NAMES, ft as injectMigrationStorageTables, lt as MIGRATION_RUN_TABLE, mt as migrationStorageTables, pt as migrationExtension, ut as MIGRATION_STATE_TABLE } from "../../where-clause-compiler-DNFGsYBl.js";
|
|
3
3
|
export { MAX_STATUS_RUN_LIMIT, MIGRATION_RUN_TABLE, MIGRATION_STATE_TABLE, MIGRATION_STORAGE_TABLE_NAMES, type MigrationAppliedState, type MigrationCancelArgs, type MigrationDefinition, type MigrationDirection, type MigrationDoc, type MigrationDocContext, type MigrationDriftIssue, type MigrationManifestEntry, type MigrationMigrateOne, type MigrationPlan, type MigrationRunArgs, type MigrationRunChunkArgs, type MigrationRunStatus, type MigrationSet, type MigrationStateMap, type MigrationStatusArgs, type MigrationStep, type MigrationTableName, type MigrationWriteMode, buildMigrationPlan, createMigrationHandlers, defineMigration, defineMigrationSet, detectMigrationDrift, injectMigrationStorageTables, migrationCapability, migrationExtension, migrationStorageTables };
|
package/dist/watcher.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { a as generateMeta, d as PARSE_SNAPSHOT_SUFFIX, i as resolveConfiguredBackend, n as withLocalCodegenEnv, o as getConvexConfig, r as loadCliConfig, u as logger } from "./local-env-
|
|
2
|
+
import { a as generateMeta, d as PARSE_SNAPSHOT_SUFFIX, i as resolveConfiguredBackend, n as withLocalCodegenEnv, o as getConvexConfig, r as loadCliConfig, u as logger } from "./local-env-CaFwt5Bw.mjs";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import { fileURLToPath } from "node:url";
|
|
5
5
|
|
|
@@ -102,22 +102,22 @@ declare const migrationStorageTables: {
|
|
|
102
102
|
fieldName: "status";
|
|
103
103
|
};
|
|
104
104
|
};
|
|
105
|
-
|
|
105
|
+
direction: ConvexTextBuilderInitial<""> & {
|
|
106
106
|
_: {
|
|
107
107
|
tableName: "migration_state";
|
|
108
108
|
};
|
|
109
109
|
} & {
|
|
110
110
|
_: {
|
|
111
|
-
fieldName: "
|
|
111
|
+
fieldName: "direction";
|
|
112
112
|
};
|
|
113
113
|
};
|
|
114
|
-
|
|
114
|
+
cursor: ConvexTextBuilderInitial<""> & {
|
|
115
115
|
_: {
|
|
116
116
|
tableName: "migration_state";
|
|
117
117
|
};
|
|
118
118
|
} & {
|
|
119
119
|
_: {
|
|
120
|
-
fieldName: "
|
|
120
|
+
fieldName: "cursor";
|
|
121
121
|
};
|
|
122
122
|
};
|
|
123
123
|
migrationId: ConvexTextBuilderInitial<""> & {
|
|
@@ -1011,7 +1011,7 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
1011
1011
|
readonly aggregate_bucket: ConvexTableWithColumns<{
|
|
1012
1012
|
name: "aggregate_bucket";
|
|
1013
1013
|
columns: {
|
|
1014
|
-
|
|
1014
|
+
updatedAt: ConvexNumberBuilderInitial<""> & {
|
|
1015
1015
|
_: {
|
|
1016
1016
|
notNull: true;
|
|
1017
1017
|
};
|
|
@@ -1021,10 +1021,10 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
1021
1021
|
};
|
|
1022
1022
|
} & {
|
|
1023
1023
|
_: {
|
|
1024
|
-
fieldName: "
|
|
1024
|
+
fieldName: "updatedAt";
|
|
1025
1025
|
};
|
|
1026
1026
|
};
|
|
1027
|
-
|
|
1027
|
+
count: ConvexNumberBuilderInitial<""> & {
|
|
1028
1028
|
_: {
|
|
1029
1029
|
notNull: true;
|
|
1030
1030
|
};
|
|
@@ -1034,7 +1034,7 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
1034
1034
|
};
|
|
1035
1035
|
} & {
|
|
1036
1036
|
_: {
|
|
1037
|
-
fieldName: "
|
|
1037
|
+
fieldName: "count";
|
|
1038
1038
|
};
|
|
1039
1039
|
};
|
|
1040
1040
|
indexName: ConvexTextBuilderInitial<""> & {
|
|
@@ -1326,7 +1326,11 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
1326
1326
|
readonly aggregate_extrema: ConvexTableWithColumns<{
|
|
1327
1327
|
name: "aggregate_extrema";
|
|
1328
1328
|
columns: {
|
|
1329
|
-
|
|
1329
|
+
value: ConvexCustomBuilderInitial<"", convex_values0.VAny<any, "required", string>> & {
|
|
1330
|
+
_: {
|
|
1331
|
+
$type: convex_values0.Value;
|
|
1332
|
+
};
|
|
1333
|
+
} & {
|
|
1330
1334
|
_: {
|
|
1331
1335
|
notNull: true;
|
|
1332
1336
|
};
|
|
@@ -1336,14 +1340,10 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
1336
1340
|
};
|
|
1337
1341
|
} & {
|
|
1338
1342
|
_: {
|
|
1339
|
-
fieldName: "
|
|
1343
|
+
fieldName: "value";
|
|
1340
1344
|
};
|
|
1341
1345
|
};
|
|
1342
|
-
|
|
1343
|
-
_: {
|
|
1344
|
-
$type: convex_values0.Value;
|
|
1345
|
-
};
|
|
1346
|
-
} & {
|
|
1346
|
+
updatedAt: ConvexNumberBuilderInitial<""> & {
|
|
1347
1347
|
_: {
|
|
1348
1348
|
notNull: true;
|
|
1349
1349
|
};
|
|
@@ -1353,10 +1353,10 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
1353
1353
|
};
|
|
1354
1354
|
} & {
|
|
1355
1355
|
_: {
|
|
1356
|
-
fieldName: "
|
|
1356
|
+
fieldName: "updatedAt";
|
|
1357
1357
|
};
|
|
1358
1358
|
};
|
|
1359
|
-
|
|
1359
|
+
count: ConvexNumberBuilderInitial<""> & {
|
|
1360
1360
|
_: {
|
|
1361
1361
|
notNull: true;
|
|
1362
1362
|
};
|
|
@@ -1366,7 +1366,7 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
1366
1366
|
};
|
|
1367
1367
|
} & {
|
|
1368
1368
|
_: {
|
|
1369
|
-
fieldName: "
|
|
1369
|
+
fieldName: "count";
|
|
1370
1370
|
};
|
|
1371
1371
|
};
|
|
1372
1372
|
indexName: ConvexTextBuilderInitial<""> & {
|
|
@@ -1596,26 +1596,26 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
1596
1596
|
fieldName: "status";
|
|
1597
1597
|
};
|
|
1598
1598
|
};
|
|
1599
|
-
|
|
1599
|
+
kind: ConvexTextBuilderInitial<""> & {
|
|
1600
1600
|
_: {
|
|
1601
|
-
|
|
1601
|
+
notNull: true;
|
|
1602
1602
|
};
|
|
1603
1603
|
} & {
|
|
1604
1604
|
_: {
|
|
1605
|
-
|
|
1605
|
+
tableName: "aggregate_state";
|
|
1606
1606
|
};
|
|
1607
|
-
}
|
|
1608
|
-
kind: ConvexTextBuilderInitial<""> & {
|
|
1607
|
+
} & {
|
|
1609
1608
|
_: {
|
|
1610
|
-
|
|
1609
|
+
fieldName: "kind";
|
|
1611
1610
|
};
|
|
1612
|
-
}
|
|
1611
|
+
};
|
|
1612
|
+
cursor: ConvexTextBuilderInitial<""> & {
|
|
1613
1613
|
_: {
|
|
1614
1614
|
tableName: "aggregate_state";
|
|
1615
1615
|
};
|
|
1616
1616
|
} & {
|
|
1617
1617
|
_: {
|
|
1618
|
-
fieldName: "
|
|
1618
|
+
fieldName: "cursor";
|
|
1619
1619
|
};
|
|
1620
1620
|
};
|
|
1621
1621
|
processed: ConvexNumberBuilderInitial<""> & {
|
|
@@ -1751,22 +1751,22 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
1751
1751
|
fieldName: "status";
|
|
1752
1752
|
};
|
|
1753
1753
|
};
|
|
1754
|
-
|
|
1754
|
+
direction: ConvexTextBuilderInitial<""> & {
|
|
1755
1755
|
_: {
|
|
1756
1756
|
tableName: "migration_state";
|
|
1757
1757
|
};
|
|
1758
1758
|
} & {
|
|
1759
1759
|
_: {
|
|
1760
|
-
fieldName: "
|
|
1760
|
+
fieldName: "direction";
|
|
1761
1761
|
};
|
|
1762
1762
|
};
|
|
1763
|
-
|
|
1763
|
+
cursor: ConvexTextBuilderInitial<""> & {
|
|
1764
1764
|
_: {
|
|
1765
1765
|
tableName: "migration_state";
|
|
1766
1766
|
};
|
|
1767
1767
|
} & {
|
|
1768
1768
|
_: {
|
|
1769
|
-
fieldName: "
|
|
1769
|
+
fieldName: "cursor";
|
|
1770
1770
|
};
|
|
1771
1771
|
};
|
|
1772
1772
|
migrationId: ConvexTextBuilderInitial<""> & {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kitcn",
|
|
3
|
-
"version": "0.33.
|
|
3
|
+
"version": "0.33.10",
|
|
4
4
|
"description": "kitcn - React Query integration and CLI tools for Convex",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"convex",
|
|
@@ -96,7 +96,7 @@
|
|
|
96
96
|
"@tanstack/react-start": ">=1",
|
|
97
97
|
"@tanstack/solid-query": ">=5",
|
|
98
98
|
"better-auth": ">=1.7.0 <1.8.0",
|
|
99
|
-
"convex": ">=1.42 <1.
|
|
99
|
+
"convex": ">=1.42 <1.47.0",
|
|
100
100
|
"hono": "4.12.9",
|
|
101
101
|
"next": ">=14",
|
|
102
102
|
"react": ">=18",
|
|
@@ -102,7 +102,40 @@ export function HydrateClient({ children }: { children: React.ReactNode }) {
|
|
|
102
102
|
|
|
103
103
|
With Next 16 `cacheComponents` and `partialPrefetching`, the default JWT expiry
|
|
104
104
|
clock can trigger a Blocking Route error even after `await headers()`. The
|
|
105
|
-
app owns
|
|
105
|
+
app owns request timing. Keep the default server factory and headers-first
|
|
106
|
+
context. Add this helper after `caller` in the RSC module:
|
|
107
|
+
|
|
108
|
+
```ts
|
|
109
|
+
import { getSessionCookie } from 'better-auth/cookies';
|
|
110
|
+
import { headers } from 'next/headers';
|
|
111
|
+
import { connection } from 'next/server';
|
|
112
|
+
import { cache } from 'react';
|
|
113
|
+
|
|
114
|
+
export const getToken = cache(async () => {
|
|
115
|
+
const heads = await headers();
|
|
116
|
+
if (getSessionCookie(heads) === null) {
|
|
117
|
+
return undefined;
|
|
118
|
+
}
|
|
119
|
+
await connection();
|
|
120
|
+
return caller.getToken();
|
|
121
|
+
});
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
Match custom session-cookie settings in `getSessionCookie`. Use this same
|
|
125
|
+
`getToken` in the provider/route gate and `getServerQueryClientOptions({
|
|
126
|
+
getToken, convexSiteUrl })`, not `caller.getToken`. The session check skips
|
|
127
|
+
signed-out requests. A session without a JWT cookie still waits before fetching.
|
|
128
|
+
Put token-dependent components under `Suspense`.
|
|
129
|
+
|
|
130
|
+
If a TanStack integration holds Next development validation aborts pending,
|
|
131
|
+
apply that app-owned policy around this `connection()` await before token
|
|
132
|
+
retrieval. The snippet does not suppress aborts. Do not suppress ordinary auth
|
|
133
|
+
or network failures, or classify every `AbortError` as a Next render abort.
|
|
134
|
+
Recording a rejected query can itself read `Date.now()`.
|
|
135
|
+
|
|
136
|
+
`jwtCache.now` controls the expiry comparison, not the complete token operation.
|
|
137
|
+
A read already gated by `connection()` does not need an extra clock hook. A
|
|
138
|
+
separately configured request-time clock can await it:
|
|
106
139
|
|
|
107
140
|
```ts
|
|
108
141
|
import { connection } from 'next/server';
|
|
@@ -124,14 +157,16 @@ export const { createContext, createCaller, handler } = convexBetterAuth({
|
|
|
124
157
|
`auth.jwtCache` accepts a boolean or `{ now?: () => number | Promise<number> }`.
|
|
125
158
|
The clock returns finite **Unix seconds**, not milliseconds. The reader awaits
|
|
126
159
|
it only for a decoded cached JWT with an expiry. Disabled caching, forced
|
|
127
|
-
refresh, missing/malformed cookies, and absent expiry bypass the hook
|
|
160
|
+
refresh, missing/malformed cookies, and absent expiry bypass the hook and fetch
|
|
161
|
+
a token. A decoded expired JWT with `exp` calls the clock, then fetches.
|
|
128
162
|
`auth.expirationToleranceSeconds` remains a sibling option (default 60).
|
|
129
163
|
Clock throws/rejections propagate unchanged; `NaN` and infinities are rejected.
|
|
130
164
|
|
|
131
165
|
Keep `await headers()` in the RSC context creator. Put request-time token reads
|
|
132
166
|
under `Suspense`, including a provider or route gate that awaits `caller.getToken()`.
|
|
133
167
|
For `'use cache: private'`, use a separate factory with the default or a sync
|
|
134
|
-
clock; **never call `connection()` inside private cache**.
|
|
168
|
+
clock; **never call `connection()` inside private cache**. Do not use the
|
|
169
|
+
request-time `getToken` helper in private cache. A private token helper
|
|
135
170
|
can use `cacheLife({ stale: 30 })`, read headers, create that context, and return
|
|
136
171
|
`context.token`. A token-blocking layout must defer its token-dependent subtree
|
|
137
172
|
with `Suspense`, including when awaiting a private-cache helper. Private caching
|
|
@@ -139,9 +174,8 @@ allows the clock read but does not make runtime auth data static.
|
|
|
139
174
|
|
|
140
175
|
`auth: { jwtCache: false }` avoids the cookie expiry clock but fetches a token
|
|
141
176
|
on every context creation. Kitcn does not import Next, detect render stages, or
|
|
142
|
-
suppress render aborts.
|
|
143
|
-
|
|
144
|
-
`Date.now()`. Do not suppress ordinary auth failures.
|
|
177
|
+
suppress render aborts. Handling aborts only inside `jwtCache.now` leaves the
|
|
178
|
+
token-fetch paths that bypass the clock uncovered.
|
|
145
179
|
|
|
146
180
|
Full examples: [Next.js JWT cache guidance](https://kitcn.dev/docs/nextjs#jwt-cache-and-partial-prefetching).
|
|
147
181
|
|