kitcn 0.33.7 → 0.33.9
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/nextjs/index.d.ts +3 -3
- package/dist/auth/nextjs/index.js +3 -2
- package/dist/auth/start/server/index.d.ts +1 -1
- package/dist/auth/start/server/index.js +1 -1
- package/dist/cli.mjs +1 -1
- package/dist/orm/index.d.ts +1 -1
- package/dist/orm/migrations/index.d.ts +1 -1
- package/dist/{token-tlbNKQS0.d.ts → token-COZD00dG.d.ts} +2 -1
- package/dist/{token-CgIvcEZX.js → token-CZbuEcTL.js} +13 -4
- package/dist/{where-clause-compiler-DAqhUREe.d.ts → where-clause-compiler-BPQv90gK.d.ts} +152 -152
- package/package.json +2 -2
- package/skills/kitcn/references/features/react.md +5 -1
- package/skills/kitcn/references/setup/next.md +82 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# kitcn
|
|
2
2
|
|
|
3
|
+
## 0.33.9
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#484](https://github.com/udecode/kitcn/pull/484) [`153e95a`](https://github.com/udecode/kitcn/commit/153e95a4956dc4715da0dfd14d3ced7045ad1214) Thanks [@EfficiencyCorp](https://github.com/EfficiencyCorp)! - ## Patches
|
|
8
|
+
|
|
9
|
+
- Support Convex `1.45` and `1.46`.
|
|
10
|
+
- Scaffold new apps with Convex `1.46.0`.
|
|
11
|
+
- Require Node 20 or newer when running Convex `1.45` or later.
|
|
12
|
+
|
|
13
|
+
## 0.33.8
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- [#478](https://github.com/udecode/kitcn/pull/478) [`03b1ad1`](https://github.com/udecode/kitcn/commit/03b1ad1bd72333ce3867f79d8f079193cf77c170) Thanks [@zbeyens](https://github.com/zbeyens)! - ## Patches
|
|
18
|
+
|
|
19
|
+
- Support app-owned synchronous or asynchronous JWT cache clocks for Next.js partial prefetching and private-cache rendering.
|
|
20
|
+
|
|
3
21
|
## 0.33.7
|
|
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-BPQv90gK.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,11 +1,11 @@
|
|
|
1
1
|
import { H as ConvexContext, W as LazyCaller } from "../../procedure-name-DRSOwAJY.js";
|
|
2
|
-
import { t as GetTokenOptions } from "../../token-
|
|
2
|
+
import { t as GetTokenOptions } from "../../token-COZD00dG.js";
|
|
3
3
|
|
|
4
4
|
//#region src/auth-nextjs/index.d.ts
|
|
5
5
|
/** Auth options for server-side calls. */
|
|
6
6
|
type AuthOptions = {
|
|
7
|
-
/** Better Auth auth route base path. Defaults to `/api/auth`. */basePath?: string; /** Enable/disable JWT caching. Default: true */
|
|
8
|
-
jwtCache?: boolean
|
|
7
|
+
/** Better Auth auth route base path. Defaults to `/api/auth`. */basePath?: string; /** Enable/disable JWT caching or provide a Unix-seconds clock. Default: true. */
|
|
8
|
+
jwtCache?: boolean | Pick<NonNullable<GetTokenOptions['jwtCache']>, 'now'>; /** Custom function to detect UNAUTHORIZED errors. Default checks code property. */
|
|
9
9
|
isUnauthorized?: (error: unknown) => boolean; /** Expiration tolerance in seconds. */
|
|
10
10
|
expirationToleranceSeconds?: number;
|
|
11
11
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as getToken } from "../../token-
|
|
1
|
+
import { t as getToken } from "../../token-CZbuEcTL.js";
|
|
2
2
|
import { n as defaultIsUnauthorized } from "../../error-CLgc9khF.js";
|
|
3
3
|
import { t as createCallerFactory } from "../../caller-factory-CEKbQdGY.js";
|
|
4
4
|
|
|
@@ -80,7 +80,8 @@ function convexBetterAuth(opts) {
|
|
|
80
80
|
jwtCache: {
|
|
81
81
|
enabled: jwtCacheEnabled,
|
|
82
82
|
expirationToleranceSeconds: auth.expirationToleranceSeconds,
|
|
83
|
-
isAuthError: auth.isUnauthorized ?? defaultIsUnauthorized
|
|
83
|
+
isAuthError: auth.isUnauthorized ?? defaultIsUnauthorized,
|
|
84
|
+
now: typeof auth.jwtCache === "object" ? auth.jwtCache.now : void 0
|
|
84
85
|
}
|
|
85
86
|
});
|
|
86
87
|
},
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { H as ConvexContext, W as LazyCaller } from "../../../procedure-name-DRSOwAJY.js";
|
|
2
|
-
import { t as GetTokenOptions } from "../../../token-
|
|
2
|
+
import { t as GetTokenOptions } from "../../../token-COZD00dG.js";
|
|
3
3
|
import { FunctionReference, FunctionReturnType, OptionalRestArgs } from "convex/server";
|
|
4
4
|
|
|
5
5
|
//#region src/auth-start/server.d.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as getToken } from "../../../token-
|
|
1
|
+
import { t as getToken } from "../../../token-CZbuEcTL.js";
|
|
2
2
|
import { n as defaultIsUnauthorized } from "../../../error-CLgc9khF.js";
|
|
3
3
|
import { t as createCallerFactory } from "../../../caller-factory-CEKbQdGY.js";
|
|
4
4
|
import { stripIndent } from "common-tags";
|
package/dist/cli.mjs
CHANGED
|
@@ -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/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-BPQv90gK.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-BPQv90gK.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 };
|
|
@@ -6,7 +6,8 @@ type GetTokenOptions = {
|
|
|
6
6
|
jwtCache?: {
|
|
7
7
|
enabled: boolean;
|
|
8
8
|
expirationToleranceSeconds?: number;
|
|
9
|
-
isAuthError: (error: unknown) => boolean;
|
|
9
|
+
isAuthError: (error: unknown) => boolean; /** Current Unix time in seconds. Defaults to the system clock. */
|
|
10
|
+
now?: () => number | Promise<number>;
|
|
10
11
|
};
|
|
11
12
|
};
|
|
12
13
|
//#endregion
|
|
@@ -32,14 +32,23 @@ const getToken = async (siteUrl, headers, opts) => {
|
|
|
32
32
|
cookiePrefix: opts?.cookiePrefix
|
|
33
33
|
});
|
|
34
34
|
if (!token) return await fetchToken();
|
|
35
|
+
let claims;
|
|
35
36
|
try {
|
|
36
|
-
|
|
37
|
-
isFresh: false,
|
|
38
|
-
token
|
|
39
|
-
};
|
|
37
|
+
claims = jose.decodeJwt(token);
|
|
40
38
|
} catch (error) {
|
|
41
39
|
console.error("Error decoding JWT", error);
|
|
40
|
+
return await fetchToken();
|
|
41
|
+
}
|
|
42
|
+
if (!claims.exp) return await fetchToken();
|
|
43
|
+
let now;
|
|
44
|
+
if (opts.jwtCache.now) {
|
|
45
|
+
now = await opts.jwtCache.now();
|
|
46
|
+
if (!Number.isFinite(now)) throw new RangeError("JWT cache now must return finite Unix time in seconds");
|
|
42
47
|
}
|
|
48
|
+
if (!isTokenExpired(claims.exp, opts.jwtCache.expirationToleranceSeconds ?? 60, now)) return {
|
|
49
|
+
isFresh: false,
|
|
50
|
+
token
|
|
51
|
+
};
|
|
43
52
|
return await fetchToken();
|
|
44
53
|
};
|
|
45
54
|
|
|
@@ -102,16 +102,20 @@ declare const migrationStorageTables: {
|
|
|
102
102
|
fieldName: "status";
|
|
103
103
|
};
|
|
104
104
|
};
|
|
105
|
-
|
|
105
|
+
migrationId: ConvexTextBuilderInitial<""> & {
|
|
106
|
+
_: {
|
|
107
|
+
notNull: true;
|
|
108
|
+
};
|
|
109
|
+
} & {
|
|
106
110
|
_: {
|
|
107
111
|
tableName: "migration_state";
|
|
108
112
|
};
|
|
109
113
|
} & {
|
|
110
114
|
_: {
|
|
111
|
-
fieldName: "
|
|
115
|
+
fieldName: "migrationId";
|
|
112
116
|
};
|
|
113
117
|
};
|
|
114
|
-
|
|
118
|
+
checksum: ConvexTextBuilderInitial<""> & {
|
|
115
119
|
_: {
|
|
116
120
|
notNull: true;
|
|
117
121
|
};
|
|
@@ -121,50 +125,50 @@ declare const migrationStorageTables: {
|
|
|
121
125
|
};
|
|
122
126
|
} & {
|
|
123
127
|
_: {
|
|
124
|
-
fieldName: "
|
|
128
|
+
fieldName: "checksum";
|
|
125
129
|
};
|
|
126
130
|
};
|
|
127
|
-
|
|
131
|
+
applied: ConvexBooleanBuilderInitial<""> & {
|
|
128
132
|
_: {
|
|
129
|
-
|
|
133
|
+
notNull: true;
|
|
130
134
|
};
|
|
131
135
|
} & {
|
|
132
136
|
_: {
|
|
133
|
-
|
|
137
|
+
tableName: "migration_state";
|
|
134
138
|
};
|
|
135
|
-
}
|
|
136
|
-
updatedAt: ConvexNumberBuilderInitial<""> & {
|
|
139
|
+
} & {
|
|
137
140
|
_: {
|
|
138
|
-
|
|
141
|
+
fieldName: "applied";
|
|
139
142
|
};
|
|
140
|
-
}
|
|
143
|
+
};
|
|
144
|
+
direction: ConvexTextBuilderInitial<""> & {
|
|
141
145
|
_: {
|
|
142
146
|
tableName: "migration_state";
|
|
143
147
|
};
|
|
144
148
|
} & {
|
|
145
149
|
_: {
|
|
146
|
-
fieldName: "
|
|
150
|
+
fieldName: "direction";
|
|
147
151
|
};
|
|
148
152
|
};
|
|
149
|
-
|
|
153
|
+
runId: ConvexTextBuilderInitial<""> & {
|
|
150
154
|
_: {
|
|
151
155
|
tableName: "migration_state";
|
|
152
156
|
};
|
|
153
157
|
} & {
|
|
154
158
|
_: {
|
|
155
|
-
fieldName: "
|
|
159
|
+
fieldName: "runId";
|
|
156
160
|
};
|
|
157
161
|
};
|
|
158
|
-
|
|
162
|
+
cursor: ConvexTextBuilderInitial<""> & {
|
|
159
163
|
_: {
|
|
160
164
|
tableName: "migration_state";
|
|
161
165
|
};
|
|
162
166
|
} & {
|
|
163
167
|
_: {
|
|
164
|
-
fieldName: "
|
|
168
|
+
fieldName: "cursor";
|
|
165
169
|
};
|
|
166
170
|
};
|
|
167
|
-
|
|
171
|
+
processed: ConvexNumberBuilderInitial<""> & {
|
|
168
172
|
_: {
|
|
169
173
|
notNull: true;
|
|
170
174
|
};
|
|
@@ -174,23 +178,19 @@ declare const migrationStorageTables: {
|
|
|
174
178
|
};
|
|
175
179
|
} & {
|
|
176
180
|
_: {
|
|
177
|
-
fieldName: "
|
|
181
|
+
fieldName: "processed";
|
|
178
182
|
};
|
|
179
183
|
};
|
|
180
|
-
|
|
181
|
-
_: {
|
|
182
|
-
notNull: true;
|
|
183
|
-
};
|
|
184
|
-
} & {
|
|
184
|
+
startedAt: ConvexNumberBuilderInitial<""> & {
|
|
185
185
|
_: {
|
|
186
186
|
tableName: "migration_state";
|
|
187
187
|
};
|
|
188
188
|
} & {
|
|
189
189
|
_: {
|
|
190
|
-
fieldName: "
|
|
190
|
+
fieldName: "startedAt";
|
|
191
191
|
};
|
|
192
192
|
};
|
|
193
|
-
|
|
193
|
+
updatedAt: ConvexNumberBuilderInitial<""> & {
|
|
194
194
|
_: {
|
|
195
195
|
notNull: true;
|
|
196
196
|
};
|
|
@@ -200,25 +200,25 @@ declare const migrationStorageTables: {
|
|
|
200
200
|
};
|
|
201
201
|
} & {
|
|
202
202
|
_: {
|
|
203
|
-
fieldName: "
|
|
203
|
+
fieldName: "updatedAt";
|
|
204
204
|
};
|
|
205
205
|
};
|
|
206
|
-
|
|
206
|
+
completedAt: ConvexNumberBuilderInitial<""> & {
|
|
207
207
|
_: {
|
|
208
208
|
tableName: "migration_state";
|
|
209
209
|
};
|
|
210
210
|
} & {
|
|
211
211
|
_: {
|
|
212
|
-
fieldName: "
|
|
212
|
+
fieldName: "completedAt";
|
|
213
213
|
};
|
|
214
214
|
};
|
|
215
|
-
|
|
215
|
+
lastError: ConvexTextBuilderInitial<""> & {
|
|
216
216
|
_: {
|
|
217
217
|
tableName: "migration_state";
|
|
218
218
|
};
|
|
219
219
|
} & {
|
|
220
220
|
_: {
|
|
221
|
-
fieldName: "
|
|
221
|
+
fieldName: "lastError";
|
|
222
222
|
};
|
|
223
223
|
};
|
|
224
224
|
writeMode: ConvexTextBuilderInitial<""> & {
|
|
@@ -256,7 +256,7 @@ declare const migrationStorageTables: {
|
|
|
256
256
|
fieldName: "status";
|
|
257
257
|
};
|
|
258
258
|
};
|
|
259
|
-
|
|
259
|
+
direction: ConvexTextBuilderInitial<""> & {
|
|
260
260
|
_: {
|
|
261
261
|
notNull: true;
|
|
262
262
|
};
|
|
@@ -266,10 +266,10 @@ declare const migrationStorageTables: {
|
|
|
266
266
|
};
|
|
267
267
|
} & {
|
|
268
268
|
_: {
|
|
269
|
-
fieldName: "
|
|
269
|
+
fieldName: "direction";
|
|
270
270
|
};
|
|
271
271
|
};
|
|
272
|
-
|
|
272
|
+
runId: ConvexTextBuilderInitial<""> & {
|
|
273
273
|
_: {
|
|
274
274
|
notNull: true;
|
|
275
275
|
};
|
|
@@ -279,28 +279,23 @@ declare const migrationStorageTables: {
|
|
|
279
279
|
};
|
|
280
280
|
} & {
|
|
281
281
|
_: {
|
|
282
|
-
fieldName: "
|
|
282
|
+
fieldName: "runId";
|
|
283
283
|
};
|
|
284
284
|
};
|
|
285
|
-
|
|
285
|
+
startedAt: ConvexNumberBuilderInitial<""> & {
|
|
286
286
|
_: {
|
|
287
|
-
|
|
287
|
+
notNull: true;
|
|
288
288
|
};
|
|
289
289
|
} & {
|
|
290
|
-
_: {
|
|
291
|
-
fieldName: "completedAt";
|
|
292
|
-
};
|
|
293
|
-
};
|
|
294
|
-
lastError: ConvexTextBuilderInitial<""> & {
|
|
295
290
|
_: {
|
|
296
291
|
tableName: "migration_run";
|
|
297
292
|
};
|
|
298
293
|
} & {
|
|
299
294
|
_: {
|
|
300
|
-
fieldName: "
|
|
295
|
+
fieldName: "startedAt";
|
|
301
296
|
};
|
|
302
297
|
};
|
|
303
|
-
|
|
298
|
+
updatedAt: ConvexNumberBuilderInitial<""> & {
|
|
304
299
|
_: {
|
|
305
300
|
notNull: true;
|
|
306
301
|
};
|
|
@@ -310,20 +305,25 @@ declare const migrationStorageTables: {
|
|
|
310
305
|
};
|
|
311
306
|
} & {
|
|
312
307
|
_: {
|
|
313
|
-
fieldName: "
|
|
308
|
+
fieldName: "updatedAt";
|
|
314
309
|
};
|
|
315
310
|
};
|
|
316
|
-
|
|
311
|
+
completedAt: ConvexNumberBuilderInitial<""> & {
|
|
317
312
|
_: {
|
|
318
|
-
|
|
313
|
+
tableName: "migration_run";
|
|
319
314
|
};
|
|
320
315
|
} & {
|
|
316
|
+
_: {
|
|
317
|
+
fieldName: "completedAt";
|
|
318
|
+
};
|
|
319
|
+
};
|
|
320
|
+
lastError: ConvexTextBuilderInitial<""> & {
|
|
321
321
|
_: {
|
|
322
322
|
tableName: "migration_run";
|
|
323
323
|
};
|
|
324
324
|
} & {
|
|
325
325
|
_: {
|
|
326
|
-
fieldName: "
|
|
326
|
+
fieldName: "lastError";
|
|
327
327
|
};
|
|
328
328
|
};
|
|
329
329
|
dryRun: ConvexBooleanBuilderInitial<""> & {
|
|
@@ -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
|
tableKey: ConvexTextBuilderInitial<""> & {
|
|
@@ -1050,7 +1050,7 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
1050
1050
|
fieldName: "tableKey";
|
|
1051
1051
|
};
|
|
1052
1052
|
};
|
|
1053
|
-
|
|
1053
|
+
indexName: ConvexTextBuilderInitial<""> & {
|
|
1054
1054
|
_: {
|
|
1055
1055
|
notNull: true;
|
|
1056
1056
|
};
|
|
@@ -1060,7 +1060,7 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
1060
1060
|
};
|
|
1061
1061
|
} & {
|
|
1062
1062
|
_: {
|
|
1063
|
-
fieldName: "
|
|
1063
|
+
fieldName: "indexName";
|
|
1064
1064
|
};
|
|
1065
1065
|
};
|
|
1066
1066
|
keyHash: ConvexTextBuilderInitial<""> & {
|
|
@@ -1136,7 +1136,7 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
1136
1136
|
readonly aggregate_member: ConvexTableWithColumns<{
|
|
1137
1137
|
name: "aggregate_member";
|
|
1138
1138
|
columns: {
|
|
1139
|
-
|
|
1139
|
+
updatedAt: ConvexNumberBuilderInitial<""> & {
|
|
1140
1140
|
_: {
|
|
1141
1141
|
notNull: true;
|
|
1142
1142
|
};
|
|
@@ -1146,10 +1146,10 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
1146
1146
|
};
|
|
1147
1147
|
} & {
|
|
1148
1148
|
_: {
|
|
1149
|
-
fieldName: "
|
|
1149
|
+
fieldName: "updatedAt";
|
|
1150
1150
|
};
|
|
1151
1151
|
};
|
|
1152
|
-
|
|
1152
|
+
kind: ConvexTextBuilderInitial<""> & {
|
|
1153
1153
|
_: {
|
|
1154
1154
|
notNull: true;
|
|
1155
1155
|
};
|
|
@@ -1159,10 +1159,10 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
1159
1159
|
};
|
|
1160
1160
|
} & {
|
|
1161
1161
|
_: {
|
|
1162
|
-
fieldName: "
|
|
1162
|
+
fieldName: "kind";
|
|
1163
1163
|
};
|
|
1164
1164
|
};
|
|
1165
|
-
|
|
1165
|
+
tableKey: ConvexTextBuilderInitial<""> & {
|
|
1166
1166
|
_: {
|
|
1167
1167
|
notNull: true;
|
|
1168
1168
|
};
|
|
@@ -1172,10 +1172,10 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
1172
1172
|
};
|
|
1173
1173
|
} & {
|
|
1174
1174
|
_: {
|
|
1175
|
-
fieldName: "
|
|
1175
|
+
fieldName: "tableKey";
|
|
1176
1176
|
};
|
|
1177
1177
|
};
|
|
1178
|
-
|
|
1178
|
+
indexName: ConvexTextBuilderInitial<""> & {
|
|
1179
1179
|
_: {
|
|
1180
1180
|
notNull: true;
|
|
1181
1181
|
};
|
|
@@ -1185,7 +1185,7 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
1185
1185
|
};
|
|
1186
1186
|
} & {
|
|
1187
1187
|
_: {
|
|
1188
|
-
fieldName: "
|
|
1188
|
+
fieldName: "indexName";
|
|
1189
1189
|
};
|
|
1190
1190
|
};
|
|
1191
1191
|
keyHash: ConvexTextBuilderInitial<""> & {
|
|
@@ -1326,7 +1326,7 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
1326
1326
|
readonly aggregate_extrema: ConvexTableWithColumns<{
|
|
1327
1327
|
name: "aggregate_extrema";
|
|
1328
1328
|
columns: {
|
|
1329
|
-
|
|
1329
|
+
updatedAt: ConvexNumberBuilderInitial<""> & {
|
|
1330
1330
|
_: {
|
|
1331
1331
|
notNull: true;
|
|
1332
1332
|
};
|
|
@@ -1336,10 +1336,10 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
1336
1336
|
};
|
|
1337
1337
|
} & {
|
|
1338
1338
|
_: {
|
|
1339
|
-
fieldName: "
|
|
1339
|
+
fieldName: "updatedAt";
|
|
1340
1340
|
};
|
|
1341
1341
|
};
|
|
1342
|
-
|
|
1342
|
+
count: ConvexNumberBuilderInitial<""> & {
|
|
1343
1343
|
_: {
|
|
1344
1344
|
notNull: true;
|
|
1345
1345
|
};
|
|
@@ -1349,10 +1349,14 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
1349
1349
|
};
|
|
1350
1350
|
} & {
|
|
1351
1351
|
_: {
|
|
1352
|
-
fieldName: "
|
|
1352
|
+
fieldName: "count";
|
|
1353
1353
|
};
|
|
1354
1354
|
};
|
|
1355
|
-
|
|
1355
|
+
value: ConvexCustomBuilderInitial<"", convex_values0.VAny<any, "required", string>> & {
|
|
1356
|
+
_: {
|
|
1357
|
+
$type: convex_values0.Value;
|
|
1358
|
+
};
|
|
1359
|
+
} & {
|
|
1356
1360
|
_: {
|
|
1357
1361
|
notNull: true;
|
|
1358
1362
|
};
|
|
@@ -1362,10 +1366,10 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
1362
1366
|
};
|
|
1363
1367
|
} & {
|
|
1364
1368
|
_: {
|
|
1365
|
-
fieldName: "
|
|
1369
|
+
fieldName: "value";
|
|
1366
1370
|
};
|
|
1367
1371
|
};
|
|
1368
|
-
|
|
1372
|
+
tableKey: ConvexTextBuilderInitial<""> & {
|
|
1369
1373
|
_: {
|
|
1370
1374
|
notNull: true;
|
|
1371
1375
|
};
|
|
@@ -1375,14 +1379,10 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
1375
1379
|
};
|
|
1376
1380
|
} & {
|
|
1377
1381
|
_: {
|
|
1378
|
-
fieldName: "
|
|
1382
|
+
fieldName: "tableKey";
|
|
1379
1383
|
};
|
|
1380
1384
|
};
|
|
1381
|
-
|
|
1382
|
-
_: {
|
|
1383
|
-
$type: convex_values0.Value;
|
|
1384
|
-
};
|
|
1385
|
-
} & {
|
|
1385
|
+
indexName: ConvexTextBuilderInitial<""> & {
|
|
1386
1386
|
_: {
|
|
1387
1387
|
notNull: true;
|
|
1388
1388
|
};
|
|
@@ -1392,7 +1392,7 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
1392
1392
|
};
|
|
1393
1393
|
} & {
|
|
1394
1394
|
_: {
|
|
1395
|
-
fieldName: "
|
|
1395
|
+
fieldName: "indexName";
|
|
1396
1396
|
};
|
|
1397
1397
|
};
|
|
1398
1398
|
keyHash: ConvexTextBuilderInitial<""> & {
|
|
@@ -1596,20 +1596,16 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
1596
1596
|
fieldName: "status";
|
|
1597
1597
|
};
|
|
1598
1598
|
};
|
|
1599
|
-
|
|
1600
|
-
_: {
|
|
1601
|
-
notNull: true;
|
|
1602
|
-
};
|
|
1603
|
-
} & {
|
|
1599
|
+
cursor: ConvexTextBuilderInitial<""> & {
|
|
1604
1600
|
_: {
|
|
1605
1601
|
tableName: "aggregate_state";
|
|
1606
1602
|
};
|
|
1607
1603
|
} & {
|
|
1608
1604
|
_: {
|
|
1609
|
-
fieldName: "
|
|
1605
|
+
fieldName: "cursor";
|
|
1610
1606
|
};
|
|
1611
1607
|
};
|
|
1612
|
-
|
|
1608
|
+
processed: ConvexNumberBuilderInitial<""> & {
|
|
1613
1609
|
_: {
|
|
1614
1610
|
notNull: true;
|
|
1615
1611
|
};
|
|
@@ -1619,10 +1615,10 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
1619
1615
|
};
|
|
1620
1616
|
} & {
|
|
1621
1617
|
_: {
|
|
1622
|
-
fieldName: "
|
|
1618
|
+
fieldName: "processed";
|
|
1623
1619
|
};
|
|
1624
1620
|
};
|
|
1625
|
-
|
|
1621
|
+
startedAt: ConvexNumberBuilderInitial<""> & {
|
|
1626
1622
|
_: {
|
|
1627
1623
|
notNull: true;
|
|
1628
1624
|
};
|
|
@@ -1632,10 +1628,10 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
1632
1628
|
};
|
|
1633
1629
|
} & {
|
|
1634
1630
|
_: {
|
|
1635
|
-
fieldName: "
|
|
1631
|
+
fieldName: "startedAt";
|
|
1636
1632
|
};
|
|
1637
1633
|
};
|
|
1638
|
-
|
|
1634
|
+
updatedAt: ConvexNumberBuilderInitial<""> & {
|
|
1639
1635
|
_: {
|
|
1640
1636
|
notNull: true;
|
|
1641
1637
|
};
|
|
@@ -1645,32 +1641,28 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
1645
1641
|
};
|
|
1646
1642
|
} & {
|
|
1647
1643
|
_: {
|
|
1648
|
-
fieldName: "
|
|
1644
|
+
fieldName: "updatedAt";
|
|
1649
1645
|
};
|
|
1650
1646
|
};
|
|
1651
|
-
|
|
1647
|
+
completedAt: ConvexNumberBuilderInitial<""> & {
|
|
1652
1648
|
_: {
|
|
1653
1649
|
tableName: "aggregate_state";
|
|
1654
1650
|
};
|
|
1655
1651
|
} & {
|
|
1656
1652
|
_: {
|
|
1657
|
-
fieldName: "
|
|
1653
|
+
fieldName: "completedAt";
|
|
1658
1654
|
};
|
|
1659
1655
|
};
|
|
1660
|
-
|
|
1661
|
-
_: {
|
|
1662
|
-
notNull: true;
|
|
1663
|
-
};
|
|
1664
|
-
} & {
|
|
1656
|
+
lastError: ConvexTextBuilderInitial<""> & {
|
|
1665
1657
|
_: {
|
|
1666
1658
|
tableName: "aggregate_state";
|
|
1667
1659
|
};
|
|
1668
1660
|
} & {
|
|
1669
1661
|
_: {
|
|
1670
|
-
fieldName: "
|
|
1662
|
+
fieldName: "lastError";
|
|
1671
1663
|
};
|
|
1672
1664
|
};
|
|
1673
|
-
|
|
1665
|
+
kind: ConvexTextBuilderInitial<""> & {
|
|
1674
1666
|
_: {
|
|
1675
1667
|
notNull: true;
|
|
1676
1668
|
};
|
|
@@ -1680,10 +1672,10 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
1680
1672
|
};
|
|
1681
1673
|
} & {
|
|
1682
1674
|
_: {
|
|
1683
|
-
fieldName: "
|
|
1675
|
+
fieldName: "kind";
|
|
1684
1676
|
};
|
|
1685
1677
|
};
|
|
1686
|
-
|
|
1678
|
+
tableKey: ConvexTextBuilderInitial<""> & {
|
|
1687
1679
|
_: {
|
|
1688
1680
|
notNull: true;
|
|
1689
1681
|
};
|
|
@@ -1693,28 +1685,36 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
1693
1685
|
};
|
|
1694
1686
|
} & {
|
|
1695
1687
|
_: {
|
|
1696
|
-
fieldName: "
|
|
1688
|
+
fieldName: "tableKey";
|
|
1697
1689
|
};
|
|
1698
1690
|
};
|
|
1699
|
-
|
|
1691
|
+
indexName: ConvexTextBuilderInitial<""> & {
|
|
1692
|
+
_: {
|
|
1693
|
+
notNull: true;
|
|
1694
|
+
};
|
|
1695
|
+
} & {
|
|
1700
1696
|
_: {
|
|
1701
1697
|
tableName: "aggregate_state";
|
|
1702
1698
|
};
|
|
1703
1699
|
} & {
|
|
1704
1700
|
_: {
|
|
1705
|
-
fieldName: "
|
|
1701
|
+
fieldName: "indexName";
|
|
1706
1702
|
};
|
|
1707
1703
|
};
|
|
1708
|
-
|
|
1704
|
+
keyDefinitionHash: ConvexTextBuilderInitial<""> & {
|
|
1705
|
+
_: {
|
|
1706
|
+
notNull: true;
|
|
1707
|
+
};
|
|
1708
|
+
} & {
|
|
1709
1709
|
_: {
|
|
1710
1710
|
tableName: "aggregate_state";
|
|
1711
1711
|
};
|
|
1712
1712
|
} & {
|
|
1713
1713
|
_: {
|
|
1714
|
-
fieldName: "
|
|
1714
|
+
fieldName: "keyDefinitionHash";
|
|
1715
1715
|
};
|
|
1716
1716
|
};
|
|
1717
|
-
|
|
1717
|
+
metricDefinitionHash: ConvexTextBuilderInitial<""> & {
|
|
1718
1718
|
_: {
|
|
1719
1719
|
notNull: true;
|
|
1720
1720
|
};
|
|
@@ -1724,7 +1724,7 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
1724
1724
|
};
|
|
1725
1725
|
} & {
|
|
1726
1726
|
_: {
|
|
1727
|
-
fieldName: "
|
|
1727
|
+
fieldName: "metricDefinitionHash";
|
|
1728
1728
|
};
|
|
1729
1729
|
};
|
|
1730
1730
|
};
|
|
@@ -1751,16 +1751,20 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
1751
1751
|
fieldName: "status";
|
|
1752
1752
|
};
|
|
1753
1753
|
};
|
|
1754
|
-
|
|
1754
|
+
migrationId: ConvexTextBuilderInitial<""> & {
|
|
1755
|
+
_: {
|
|
1756
|
+
notNull: true;
|
|
1757
|
+
};
|
|
1758
|
+
} & {
|
|
1755
1759
|
_: {
|
|
1756
1760
|
tableName: "migration_state";
|
|
1757
1761
|
};
|
|
1758
1762
|
} & {
|
|
1759
1763
|
_: {
|
|
1760
|
-
fieldName: "
|
|
1764
|
+
fieldName: "migrationId";
|
|
1761
1765
|
};
|
|
1762
1766
|
};
|
|
1763
|
-
|
|
1767
|
+
checksum: ConvexTextBuilderInitial<""> & {
|
|
1764
1768
|
_: {
|
|
1765
1769
|
notNull: true;
|
|
1766
1770
|
};
|
|
@@ -1770,50 +1774,50 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
1770
1774
|
};
|
|
1771
1775
|
} & {
|
|
1772
1776
|
_: {
|
|
1773
|
-
fieldName: "
|
|
1777
|
+
fieldName: "checksum";
|
|
1774
1778
|
};
|
|
1775
1779
|
};
|
|
1776
|
-
|
|
1780
|
+
applied: ConvexBooleanBuilderInitial<""> & {
|
|
1777
1781
|
_: {
|
|
1778
|
-
|
|
1782
|
+
notNull: true;
|
|
1779
1783
|
};
|
|
1780
1784
|
} & {
|
|
1781
1785
|
_: {
|
|
1782
|
-
|
|
1786
|
+
tableName: "migration_state";
|
|
1783
1787
|
};
|
|
1784
|
-
}
|
|
1785
|
-
updatedAt: ConvexNumberBuilderInitial<""> & {
|
|
1788
|
+
} & {
|
|
1786
1789
|
_: {
|
|
1787
|
-
|
|
1790
|
+
fieldName: "applied";
|
|
1788
1791
|
};
|
|
1789
|
-
}
|
|
1792
|
+
};
|
|
1793
|
+
direction: ConvexTextBuilderInitial<""> & {
|
|
1790
1794
|
_: {
|
|
1791
1795
|
tableName: "migration_state";
|
|
1792
1796
|
};
|
|
1793
1797
|
} & {
|
|
1794
1798
|
_: {
|
|
1795
|
-
fieldName: "
|
|
1799
|
+
fieldName: "direction";
|
|
1796
1800
|
};
|
|
1797
1801
|
};
|
|
1798
|
-
|
|
1802
|
+
runId: ConvexTextBuilderInitial<""> & {
|
|
1799
1803
|
_: {
|
|
1800
1804
|
tableName: "migration_state";
|
|
1801
1805
|
};
|
|
1802
1806
|
} & {
|
|
1803
1807
|
_: {
|
|
1804
|
-
fieldName: "
|
|
1808
|
+
fieldName: "runId";
|
|
1805
1809
|
};
|
|
1806
1810
|
};
|
|
1807
|
-
|
|
1811
|
+
cursor: ConvexTextBuilderInitial<""> & {
|
|
1808
1812
|
_: {
|
|
1809
1813
|
tableName: "migration_state";
|
|
1810
1814
|
};
|
|
1811
1815
|
} & {
|
|
1812
1816
|
_: {
|
|
1813
|
-
fieldName: "
|
|
1817
|
+
fieldName: "cursor";
|
|
1814
1818
|
};
|
|
1815
1819
|
};
|
|
1816
|
-
|
|
1820
|
+
processed: ConvexNumberBuilderInitial<""> & {
|
|
1817
1821
|
_: {
|
|
1818
1822
|
notNull: true;
|
|
1819
1823
|
};
|
|
@@ -1823,23 +1827,19 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
1823
1827
|
};
|
|
1824
1828
|
} & {
|
|
1825
1829
|
_: {
|
|
1826
|
-
fieldName: "
|
|
1830
|
+
fieldName: "processed";
|
|
1827
1831
|
};
|
|
1828
1832
|
};
|
|
1829
|
-
|
|
1830
|
-
_: {
|
|
1831
|
-
notNull: true;
|
|
1832
|
-
};
|
|
1833
|
-
} & {
|
|
1833
|
+
startedAt: ConvexNumberBuilderInitial<""> & {
|
|
1834
1834
|
_: {
|
|
1835
1835
|
tableName: "migration_state";
|
|
1836
1836
|
};
|
|
1837
1837
|
} & {
|
|
1838
1838
|
_: {
|
|
1839
|
-
fieldName: "
|
|
1839
|
+
fieldName: "startedAt";
|
|
1840
1840
|
};
|
|
1841
1841
|
};
|
|
1842
|
-
|
|
1842
|
+
updatedAt: ConvexNumberBuilderInitial<""> & {
|
|
1843
1843
|
_: {
|
|
1844
1844
|
notNull: true;
|
|
1845
1845
|
};
|
|
@@ -1849,25 +1849,25 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
1849
1849
|
};
|
|
1850
1850
|
} & {
|
|
1851
1851
|
_: {
|
|
1852
|
-
fieldName: "
|
|
1852
|
+
fieldName: "updatedAt";
|
|
1853
1853
|
};
|
|
1854
1854
|
};
|
|
1855
|
-
|
|
1855
|
+
completedAt: ConvexNumberBuilderInitial<""> & {
|
|
1856
1856
|
_: {
|
|
1857
1857
|
tableName: "migration_state";
|
|
1858
1858
|
};
|
|
1859
1859
|
} & {
|
|
1860
1860
|
_: {
|
|
1861
|
-
fieldName: "
|
|
1861
|
+
fieldName: "completedAt";
|
|
1862
1862
|
};
|
|
1863
1863
|
};
|
|
1864
|
-
|
|
1864
|
+
lastError: ConvexTextBuilderInitial<""> & {
|
|
1865
1865
|
_: {
|
|
1866
1866
|
tableName: "migration_state";
|
|
1867
1867
|
};
|
|
1868
1868
|
} & {
|
|
1869
1869
|
_: {
|
|
1870
|
-
fieldName: "
|
|
1870
|
+
fieldName: "lastError";
|
|
1871
1871
|
};
|
|
1872
1872
|
};
|
|
1873
1873
|
writeMode: ConvexTextBuilderInitial<""> & {
|
|
@@ -1905,7 +1905,7 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
1905
1905
|
fieldName: "status";
|
|
1906
1906
|
};
|
|
1907
1907
|
};
|
|
1908
|
-
|
|
1908
|
+
direction: ConvexTextBuilderInitial<""> & {
|
|
1909
1909
|
_: {
|
|
1910
1910
|
notNull: true;
|
|
1911
1911
|
};
|
|
@@ -1915,10 +1915,10 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
1915
1915
|
};
|
|
1916
1916
|
} & {
|
|
1917
1917
|
_: {
|
|
1918
|
-
fieldName: "
|
|
1918
|
+
fieldName: "direction";
|
|
1919
1919
|
};
|
|
1920
1920
|
};
|
|
1921
|
-
|
|
1921
|
+
runId: ConvexTextBuilderInitial<""> & {
|
|
1922
1922
|
_: {
|
|
1923
1923
|
notNull: true;
|
|
1924
1924
|
};
|
|
@@ -1928,28 +1928,23 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
1928
1928
|
};
|
|
1929
1929
|
} & {
|
|
1930
1930
|
_: {
|
|
1931
|
-
fieldName: "
|
|
1931
|
+
fieldName: "runId";
|
|
1932
1932
|
};
|
|
1933
1933
|
};
|
|
1934
|
-
|
|
1934
|
+
startedAt: ConvexNumberBuilderInitial<""> & {
|
|
1935
1935
|
_: {
|
|
1936
|
-
|
|
1936
|
+
notNull: true;
|
|
1937
1937
|
};
|
|
1938
1938
|
} & {
|
|
1939
|
-
_: {
|
|
1940
|
-
fieldName: "completedAt";
|
|
1941
|
-
};
|
|
1942
|
-
};
|
|
1943
|
-
lastError: ConvexTextBuilderInitial<""> & {
|
|
1944
1939
|
_: {
|
|
1945
1940
|
tableName: "migration_run";
|
|
1946
1941
|
};
|
|
1947
1942
|
} & {
|
|
1948
1943
|
_: {
|
|
1949
|
-
fieldName: "
|
|
1944
|
+
fieldName: "startedAt";
|
|
1950
1945
|
};
|
|
1951
1946
|
};
|
|
1952
|
-
|
|
1947
|
+
updatedAt: ConvexNumberBuilderInitial<""> & {
|
|
1953
1948
|
_: {
|
|
1954
1949
|
notNull: true;
|
|
1955
1950
|
};
|
|
@@ -1959,20 +1954,25 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
1959
1954
|
};
|
|
1960
1955
|
} & {
|
|
1961
1956
|
_: {
|
|
1962
|
-
fieldName: "
|
|
1957
|
+
fieldName: "updatedAt";
|
|
1963
1958
|
};
|
|
1964
1959
|
};
|
|
1965
|
-
|
|
1960
|
+
completedAt: ConvexNumberBuilderInitial<""> & {
|
|
1966
1961
|
_: {
|
|
1967
|
-
|
|
1962
|
+
tableName: "migration_run";
|
|
1968
1963
|
};
|
|
1969
1964
|
} & {
|
|
1965
|
+
_: {
|
|
1966
|
+
fieldName: "completedAt";
|
|
1967
|
+
};
|
|
1968
|
+
};
|
|
1969
|
+
lastError: ConvexTextBuilderInitial<""> & {
|
|
1970
1970
|
_: {
|
|
1971
1971
|
tableName: "migration_run";
|
|
1972
1972
|
};
|
|
1973
1973
|
} & {
|
|
1974
1974
|
_: {
|
|
1975
|
-
fieldName: "
|
|
1975
|
+
fieldName: "lastError";
|
|
1976
1976
|
};
|
|
1977
1977
|
};
|
|
1978
1978
|
dryRun: ConvexBooleanBuilderInitial<""> & {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kitcn",
|
|
3
|
-
"version": "0.33.
|
|
3
|
+
"version": "0.33.9",
|
|
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",
|
|
@@ -539,7 +539,11 @@ export const { createContext, createCaller, handler } = convexBetterAuth({
|
|
|
539
539
|
| `createCaller` | Server-side caller factory |
|
|
540
540
|
| `handler` | Next.js API route handler (`export const { GET, POST, OPTIONS } = handler;`) |
|
|
541
541
|
|
|
542
|
-
Options: `api`, `convexSiteUrl`, `auth.jwtCache` (default true),
|
|
542
|
+
Options: `api`, `convexSiteUrl`, `auth.jwtCache` (boolean or `{ now }`, default true),
|
|
543
|
+
`auth.expirationToleranceSeconds` (default 60), `auth.isUnauthorized`.
|
|
544
|
+
`now` returns finite Unix seconds or a promise of seconds. For Next partial
|
|
545
|
+
prefetching and request-time versus private-cache clocks, follow
|
|
546
|
+
[Next setup](../setup/next.md#8a4-jwt-cache-and-partial-prefetching).
|
|
543
547
|
|
|
544
548
|
### Client Provider with Auth
|
|
545
549
|
|
|
@@ -98,7 +98,88 @@ export function HydrateClient({ children }: { children: React.ReactNode }) {
|
|
|
98
98
|
}
|
|
99
99
|
```
|
|
100
100
|
|
|
101
|
-
### 8.A.4
|
|
101
|
+
### 8.A.4 JWT cache and partial prefetching
|
|
102
|
+
|
|
103
|
+
With Next 16 `cacheComponents` and `partialPrefetching`, the default JWT expiry
|
|
104
|
+
clock can trigger a Blocking Route error even after `await headers()`. The
|
|
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:
|
|
139
|
+
|
|
140
|
+
```ts
|
|
141
|
+
import { connection } from 'next/server';
|
|
142
|
+
|
|
143
|
+
export const { createContext, createCaller, handler } = convexBetterAuth({
|
|
144
|
+
api,
|
|
145
|
+
convexSiteUrl: process.env.NEXT_PUBLIC_CONVEX_SITE_URL!,
|
|
146
|
+
auth: {
|
|
147
|
+
jwtCache: {
|
|
148
|
+
now: async () => {
|
|
149
|
+
await connection();
|
|
150
|
+
return Math.floor(Date.now() / 1000);
|
|
151
|
+
},
|
|
152
|
+
},
|
|
153
|
+
},
|
|
154
|
+
});
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
`auth.jwtCache` accepts a boolean or `{ now?: () => number | Promise<number> }`.
|
|
158
|
+
The clock returns finite **Unix seconds**, not milliseconds. The reader awaits
|
|
159
|
+
it only for a decoded cached JWT with an expiry. Disabled caching, forced
|
|
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.
|
|
162
|
+
`auth.expirationToleranceSeconds` remains a sibling option (default 60).
|
|
163
|
+
Clock throws/rejections propagate unchanged; `NaN` and infinities are rejected.
|
|
164
|
+
|
|
165
|
+
Keep `await headers()` in the RSC context creator. Put request-time token reads
|
|
166
|
+
under `Suspense`, including a provider or route gate that awaits `caller.getToken()`.
|
|
167
|
+
For `'use cache: private'`, use a separate factory with the default or a sync
|
|
168
|
+
clock; **never call `connection()` inside private cache**. Do not use the
|
|
169
|
+
request-time `getToken` helper in private cache. A private token helper
|
|
170
|
+
can use `cacheLife({ stale: 30 })`, read headers, create that context, and return
|
|
171
|
+
`context.token`. A token-blocking layout must defer its token-dependent subtree
|
|
172
|
+
with `Suspense`, including when awaiting a private-cache helper. Private caching
|
|
173
|
+
allows the clock read but does not make runtime auth data static.
|
|
174
|
+
|
|
175
|
+
`auth: { jwtCache: false }` avoids the cookie expiry clock but fetches a token
|
|
176
|
+
on every context creation. Kitcn does not import Next, detect render stages, or
|
|
177
|
+
suppress render aborts. Handling aborts only inside `jwtCache.now` leaves the
|
|
178
|
+
token-fetch paths that bypass the clock uncovered.
|
|
179
|
+
|
|
180
|
+
Full examples: [Next.js JWT cache guidance](https://kitcn.dev/docs/nextjs#jwt-cache-and-partial-prefetching).
|
|
181
|
+
|
|
182
|
+
### 8.A.5 Pass server token to provider
|
|
102
183
|
|
|
103
184
|
```tsx
|
|
104
185
|
// app/(app)/layout.tsx
|