kitcn 0.13.9 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/aggregate/index.d.ts +1 -1
- package/dist/auth/generated/index.d.ts +1 -1
- package/dist/auth/index.d.ts +3 -3
- package/dist/auth/index.js +1 -1
- package/dist/auth/nextjs/index.js +1 -1
- package/dist/auth/start/index.js +1 -1
- package/dist/{backend-core-DnVT-R6D.mjs → backend-core-DZHqsBcu.mjs} +3 -3
- package/dist/cli.mjs +6 -1
- package/dist/{convex-plugin-CVdfB0MA.js → convex-plugin-BHVCqWTH.js} +12 -2
- package/dist/{generated-contract-disabled-C_-KWRfT.d.ts → generated-contract-disabled-B8d7NKUf.d.ts} +1 -1
- package/dist/orm/index.d.ts +1 -1
- package/dist/react/index.d.ts +7 -7
- package/dist/react/index.js +16 -9
- package/dist/{token-B5i4LfQA.js → token-oA2EMtPA.js} +1 -1
- package/dist/watcher.mjs +1 -1
- package/dist/{where-clause-compiler-DcEhkJ12.d.ts → where-clause-compiler-CFCtA01K.d.ts} +8 -8
- package/package.json +3 -3
- package/skills/convex/references/features/auth.md +1 -0
- package/skills/convex/references/features/migrations.md +2 -0
- package/skills/convex/references/setup/index.md +20 -2
- package/skills/convex/references/setup/server.md +4 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as ConvexNumberBuilderInitial, E as ConvexIdBuilderInitial, N as ConvexCustomBuilderInitial, dn as ConvexTableWithColumns, tr as ConvexTextBuilderInitial } from "../where-clause-compiler-
|
|
1
|
+
import { C as ConvexNumberBuilderInitial, E as ConvexIdBuilderInitial, N as ConvexCustomBuilderInitial, dn as ConvexTableWithColumns, tr as ConvexTextBuilderInitial } from "../where-clause-compiler-CFCtA01K.js";
|
|
2
2
|
import * as convex_values0 from "convex/values";
|
|
3
3
|
import { GenericId, Infer, Value } from "convex/values";
|
|
4
4
|
import { DocumentByName, GenericDataModel, GenericDatabaseReader, GenericDatabaseWriter, TableNamesInDataModel } from "convex/server";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { S as defineAuth, _ as GenericAuthBeforeResult, b as GenericAuthTriggerHandlers, g as BetterAuthOptionsWithoutDatabase, i as getGeneratedAuthDisabledReason, n as GeneratedAuthDisabledReasonKind, r as createDisabledAuthRuntime, t as AuthRuntime, v as GenericAuthDefinition, x as GenericAuthTriggers, y as GenericAuthTriggerChange } from "../../generated-contract-disabled-
|
|
1
|
+
import { S as defineAuth, _ as GenericAuthBeforeResult, b as GenericAuthTriggerHandlers, g as BetterAuthOptionsWithoutDatabase, i as getGeneratedAuthDisabledReason, n as GeneratedAuthDisabledReasonKind, r as createDisabledAuthRuntime, t as AuthRuntime, v as GenericAuthDefinition, x as GenericAuthTriggers, y as GenericAuthTriggerChange } from "../../generated-contract-disabled-B8d7NKUf.js";
|
|
2
2
|
export { type AuthRuntime, BetterAuthOptionsWithoutDatabase, type GeneratedAuthDisabledReasonKind, GenericAuthBeforeResult, GenericAuthDefinition, GenericAuthTriggerChange, GenericAuthTriggerHandlers, GenericAuthTriggers, createDisabledAuthRuntime, defineAuth, getGeneratedAuthDisabledReason };
|
package/dist/auth/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a as QueryCtxWithPreferredOrmQueryTable, n as LookupByIdResultByCtx, t as DocByCtx } from "../query-context-CNo9ffvI.js";
|
|
2
2
|
import { t as GetAuth } from "../types-BCl8gfGy.js";
|
|
3
3
|
import { t as GenericCtx } from "../context-utils-OMkMGhBk.js";
|
|
4
|
-
import { S as defineAuth, _ as GenericAuthBeforeResult, a as AuthFunctions, b as GenericAuthTriggerHandlers, c as createApi, d as deleteOneHandler, f as findManyHandler, g as BetterAuthOptionsWithoutDatabase, h as updateOneHandler, i as getGeneratedAuthDisabledReason, l as createHandler, m as updateManyHandler, n as GeneratedAuthDisabledReasonKind, o as Triggers, p as findOneHandler, r as createDisabledAuthRuntime, s as createClient, t as AuthRuntime, u as deleteManyHandler, v as GenericAuthDefinition, x as GenericAuthTriggers, y as GenericAuthTriggerChange } from "../generated-contract-disabled-
|
|
4
|
+
import { S as defineAuth, _ as GenericAuthBeforeResult, a as AuthFunctions, b as GenericAuthTriggerHandlers, c as createApi, d as deleteOneHandler, f as findManyHandler, g as BetterAuthOptionsWithoutDatabase, h as updateOneHandler, i as getGeneratedAuthDisabledReason, l as createHandler, m as updateManyHandler, n as GeneratedAuthDisabledReasonKind, o as Triggers, p as findOneHandler, r as createDisabledAuthRuntime, s as createClient, t as AuthRuntime, u as deleteManyHandler, v as GenericAuthDefinition, x as GenericAuthTriggers, y as GenericAuthTriggerChange } from "../generated-contract-disabled-B8d7NKUf.js";
|
|
5
5
|
import * as convex_values0 from "convex/values";
|
|
6
6
|
import { Infer } from "convex/values";
|
|
7
7
|
import { AuthConfig, DocumentByName, GenericDataModel, GenericMutationCtx, GenericQueryCtx, GenericSchema, PaginationOptions, PaginationResult, SchemaDefinition, TableNamesInDataModel } from "convex/server";
|
|
@@ -119,6 +119,7 @@ declare const adapterWhereValidator: convex_values0.VObject<{
|
|
|
119
119
|
value: convex_values0.VUnion<string | number | boolean | string[] | number[] | null, [convex_values0.VString<string, "required">, convex_values0.VFloat64<number, "required">, convex_values0.VBoolean<boolean, "required">, convex_values0.VArray<string[], convex_values0.VString<string, "required">, "required">, convex_values0.VArray<number[], convex_values0.VFloat64<number, "required">, "required">, convex_values0.VNull<null, "required">], "required", never>;
|
|
120
120
|
}, "required", "mode" | "value" | "connector" | "field" | "operator">;
|
|
121
121
|
declare const adapterArgsValidator: convex_values0.VObject<{
|
|
122
|
+
limit?: number | undefined;
|
|
122
123
|
select?: string[] | undefined;
|
|
123
124
|
where?: {
|
|
124
125
|
mode?: "sensitive" | "insensitive" | undefined;
|
|
@@ -127,7 +128,6 @@ declare const adapterArgsValidator: convex_values0.VObject<{
|
|
|
127
128
|
value: string | number | boolean | string[] | number[] | null;
|
|
128
129
|
field: string;
|
|
129
130
|
}[] | undefined;
|
|
130
|
-
limit?: number | undefined;
|
|
131
131
|
offset?: number | undefined;
|
|
132
132
|
sortBy?: {
|
|
133
133
|
field: string;
|
|
@@ -165,7 +165,7 @@ declare const adapterArgsValidator: convex_values0.VObject<{
|
|
|
165
165
|
operator: convex_values0.VUnion<"lt" | "lte" | "gt" | "gte" | "eq" | "in" | "not_in" | "ne" | "contains" | "starts_with" | "ends_with" | undefined, [convex_values0.VLiteral<"lt", "required">, convex_values0.VLiteral<"lte", "required">, convex_values0.VLiteral<"gt", "required">, convex_values0.VLiteral<"gte", "required">, convex_values0.VLiteral<"eq", "required">, convex_values0.VLiteral<"in", "required">, convex_values0.VLiteral<"not_in", "required">, convex_values0.VLiteral<"ne", "required">, convex_values0.VLiteral<"contains", "required">, convex_values0.VLiteral<"starts_with", "required">, convex_values0.VLiteral<"ends_with", "required">], "optional", never>;
|
|
166
166
|
value: convex_values0.VUnion<string | number | boolean | string[] | number[] | null, [convex_values0.VString<string, "required">, convex_values0.VFloat64<number, "required">, convex_values0.VBoolean<boolean, "required">, convex_values0.VArray<string[], convex_values0.VString<string, "required">, "required">, convex_values0.VArray<number[], convex_values0.VFloat64<number, "required">, "required">, convex_values0.VNull<null, "required">], "required", never>;
|
|
167
167
|
}, "required", "mode" | "value" | "connector" | "field" | "operator">, "optional">;
|
|
168
|
-
}, "required", "
|
|
168
|
+
}, "required", "limit" | "model" | "select" | "where" | "offset" | "sortBy" | "sortBy.field" | "sortBy.direction">;
|
|
169
169
|
declare const hasUniqueFields: (betterAuthSchema: BetterAuthDBSchema, model: string, input: Record<string, any>) => boolean;
|
|
170
170
|
declare const checkUniqueFields: <Schema extends SchemaDefinition<any, any>>(ctx: GenericQueryCtx<GenericDataModel>, schema: Schema, betterAuthSchema: BetterAuthDBSchema, table: string, input: Record<string, any>, doc?: Record<string, any>) => Promise<void>;
|
|
171
171
|
declare const selectFields: <T extends TableNamesInDataModel<GenericDataModel>, D extends DocumentByName<GenericDataModel, T>>(doc: D | null, select?: string[]) => D | null;
|
package/dist/auth/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import { i as defineAuth, n as createDisabledAuthRuntime, r as getGeneratedAuthD
|
|
|
4
4
|
import { n as createGeneratedFunctionReference, o as isQueryCtx, s as isRunMutationCtx } from "../api-entry-N3nBOlI2.js";
|
|
5
5
|
import { n as customCtx, r as customMutation } from "../customFunctions-DxEEO4Dq.js";
|
|
6
6
|
import { a as mergedStream, l as unsetToken, o as stream, t as getByIdWithOrmQueryFallback, v as eq } from "../query-context-ydn9kb6P.js";
|
|
7
|
-
import { n as convex } from "../convex-plugin-
|
|
7
|
+
import { n as convex } from "../convex-plugin-BHVCqWTH.js";
|
|
8
8
|
import { v } from "convex/values";
|
|
9
9
|
import { internalActionGeneric, internalMutationGeneric, internalQueryGeneric, paginationOptsValidator } from "convex/server";
|
|
10
10
|
import { createAdapterFactory } from "better-auth/adapters";
|
package/dist/auth/start/index.js
CHANGED
|
@@ -6188,8 +6188,8 @@ const EXACT_VERSION_RE = /^(\d+)\.(\d+)\.\d+$/;
|
|
|
6188
6188
|
const VERSION_IN_SPEC_RE = /(\d+)\.(\d+)(?:\.\d+)?/;
|
|
6189
6189
|
const PLAIN_VERSION_SPEC_RE = /^[\^~]?v?\d+\.\d+(?:\.\d+)?$/;
|
|
6190
6190
|
const UPPER_BOUND_RE = /(?:^|\s)<={0,1}\s*v?(\d+)\.(\d+)(?:\.\d+)?/g;
|
|
6191
|
-
const SUPPORTED_CONVEX_VERSION = "1.
|
|
6192
|
-
const SUPPORTED_BETTER_AUTH_VERSION = "1.6.
|
|
6191
|
+
const SUPPORTED_CONVEX_VERSION = "1.36.1";
|
|
6192
|
+
const SUPPORTED_BETTER_AUTH_VERSION = "1.6.9";
|
|
6193
6193
|
const SUPPORTED_HONO_VERSION = "4.12.9";
|
|
6194
6194
|
const SUPPORTED_OPENTELEMETRY_API_VERSION = "1.9.0";
|
|
6195
6195
|
const SUPPORTED_TANSTACK_REACT_QUERY_VERSION = "5.95.2";
|
|
@@ -10113,7 +10113,7 @@ const AUTH_ENV_FIELDS = [
|
|
|
10113
10113
|
schema: "z.string().optional()"
|
|
10114
10114
|
}
|
|
10115
10115
|
];
|
|
10116
|
-
const BETTER_AUTH_EXPO_INSTALL_SPEC = "@better-auth/expo@1.6.
|
|
10116
|
+
const BETTER_AUTH_EXPO_INSTALL_SPEC = "@better-auth/expo@1.6.9";
|
|
10117
10117
|
const EXPO_SECURE_STORE_INSTALL_SPEC = "expo-secure-store@~55.0.8";
|
|
10118
10118
|
const EXPO_NETWORK_INSTALL_SPEC = "expo-network@~55.0.8";
|
|
10119
10119
|
const AUTH_FILES = [
|
package/dist/cli.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { $ as promptForScaffoldTemplateSelection, A as resolveCodegenTrimSegments, B as runConfiguredCodegen, C as isEntryPoint, Ct as serializeEnvValue, D as parseInitCommandArgs, Dt as logger, E as parseBackendRunJson, F as resolveRunDeps, G as runMigrationFlow, H as runDevSchemaBackfillIfNeeded, I as runAfterScaffoldScript, J as withWorkingDirectory, K as trackProcess, L as runAggregateBackfillFlow, M as resolveDocTopic, N as resolveInitProjectDir, O as readPackageVersions, Ot as highlighter, P as resolveMigrationConfig, Q as promptForPluginSelection, R as runAggregatePruneFlow, S as isConvexDevPreRunConflictFlag, St as resolveAuthEnvState, T as parseArgs, U as runInitCommandFlow, V as runConvexInitIfNeeded, W as runMigrationCreate, X as collectPluginScaffoldTemplates, Y as createSpinner, Z as filterScaffoldTemplatePathMap, _ as formatInfoOutput, _t as applyPlanningDependencyInstall, a as cleanup, at as getPluginCatalogEntry, b as getDevAggregateBackfillStatePath, bt as resolveSupportedDependencyWarnings, c as createCommandEnv, ct as buildPluginInstallPlan, d as extractBackfillCliOptions, dt as collectInstalledPluginKeys, et as resolveAddTemplateDefaults, f as extractConcaveRunTargetArgs, ft as getPluginLockfilePath, g as formatDocsOutput, gt as applyDependencyHintsInstall, h as extractResetCliOptions, ht as resolveSchemaInstalledPlugins, i as buildInitializationPlan, it as resolveTemplatesByIdOrThrow, j as resolveConfiguredBackend, k as resolveBackfillConfig, l as ensureConvexGitignoreEntry, lt as resolvePluginScaffoldRoots, m as extractMigrationDownOptions, mt as readPluginLockfile, n as applyPluginInstallPlanFiles, nt as resolvePresetScaffoldTemplates, o as createBackendAdapter, ot as getSupportedPluginKeys, p as extractMigrationCliOptions, pt as getSchemaFilePath, q as withLocalCodegenEnv, r as assertNoRemovedDevPreRunFlag, rt as resolveTemplateSelectionSource, s as createBackendCommandEnv, st as isSupportedPluginKey, t as applyDependencyInstallPlan, tt as resolvePluginPreset, u as extractBackendRunTargetArgs, ut as assertSchemaFileExists, v as getAggregateBackfillDeploymentKey, vt as applyPluginDependencyInstall, w as isInitialized, wt as stripConvexCommandNoise, x as hasRemoteConvexDeploymentEnv, xt as resolveProjectScaffoldContext, y as getConvexDeploymentCommandEnv, yt as inspectPluginDependencyInstall, z as runBackendFunction } from "./backend-core-
|
|
2
|
+
import { $ as promptForScaffoldTemplateSelection, A as resolveCodegenTrimSegments, B as runConfiguredCodegen, C as isEntryPoint, Ct as serializeEnvValue, D as parseInitCommandArgs, Dt as logger, E as parseBackendRunJson, F as resolveRunDeps, G as runMigrationFlow, H as runDevSchemaBackfillIfNeeded, I as runAfterScaffoldScript, J as withWorkingDirectory, K as trackProcess, L as runAggregateBackfillFlow, M as resolveDocTopic, N as resolveInitProjectDir, O as readPackageVersions, Ot as highlighter, P as resolveMigrationConfig, Q as promptForPluginSelection, R as runAggregatePruneFlow, S as isConvexDevPreRunConflictFlag, St as resolveAuthEnvState, T as parseArgs, U as runInitCommandFlow, V as runConvexInitIfNeeded, W as runMigrationCreate, X as collectPluginScaffoldTemplates, Y as createSpinner, Z as filterScaffoldTemplatePathMap, _ as formatInfoOutput, _t as applyPlanningDependencyInstall, a as cleanup, at as getPluginCatalogEntry, b as getDevAggregateBackfillStatePath, bt as resolveSupportedDependencyWarnings, c as createCommandEnv, ct as buildPluginInstallPlan, d as extractBackfillCliOptions, dt as collectInstalledPluginKeys, et as resolveAddTemplateDefaults, f as extractConcaveRunTargetArgs, ft as getPluginLockfilePath, g as formatDocsOutput, gt as applyDependencyHintsInstall, h as extractResetCliOptions, ht as resolveSchemaInstalledPlugins, i as buildInitializationPlan, it as resolveTemplatesByIdOrThrow, j as resolveConfiguredBackend, k as resolveBackfillConfig, l as ensureConvexGitignoreEntry, lt as resolvePluginScaffoldRoots, m as extractMigrationDownOptions, mt as readPluginLockfile, n as applyPluginInstallPlanFiles, nt as resolvePresetScaffoldTemplates, o as createBackendAdapter, ot as getSupportedPluginKeys, p as extractMigrationCliOptions, pt as getSchemaFilePath, q as withLocalCodegenEnv, r as assertNoRemovedDevPreRunFlag, rt as resolveTemplateSelectionSource, s as createBackendCommandEnv, st as isSupportedPluginKey, t as applyDependencyInstallPlan, tt as resolvePluginPreset, u as extractBackendRunTargetArgs, ut as assertSchemaFileExists, v as getAggregateBackfillDeploymentKey, vt as applyPluginDependencyInstall, w as isInitialized, wt as stripConvexCommandNoise, x as hasRemoteConvexDeploymentEnv, xt as resolveProjectScaffoldContext, y as getConvexDeploymentCommandEnv, yt as inspectPluginDependencyInstall, z as runBackendFunction } from "./backend-core-DZHqsBcu.mjs";
|
|
3
3
|
import fs, { existsSync, readFileSync } from "node:fs";
|
|
4
4
|
import path, { delimiter, dirname, join, relative, resolve } from "node:path";
|
|
5
5
|
import { fileURLToPath } from "node:url";
|
|
@@ -1866,6 +1866,7 @@ const handleDocsCommand = async (argv, deps = {}) => {
|
|
|
1866
1866
|
//#region src/cli/commands/env.ts
|
|
1867
1867
|
const HELP_FLAGS$6 = new Set(["--help", "-h"]);
|
|
1868
1868
|
const SUPPORTED_ENV_SUBCOMMANDS = [
|
|
1869
|
+
"default",
|
|
1869
1870
|
"push",
|
|
1870
1871
|
"pull",
|
|
1871
1872
|
"list",
|
|
@@ -1887,6 +1888,7 @@ const TARGET_FLAGS_WITH_VALUE = new Set([
|
|
|
1887
1888
|
const ENV_HELP_TEXT = `Usage: kitcn env <command> [options]
|
|
1888
1889
|
|
|
1889
1890
|
Commands:
|
|
1891
|
+
default <command> Manage default env values for new deployments
|
|
1890
1892
|
push Push local env values to Convex
|
|
1891
1893
|
pull Pull remote env values from Convex
|
|
1892
1894
|
list List remote env values
|
|
@@ -1902,6 +1904,9 @@ Push options:
|
|
|
1902
1904
|
Pull options:
|
|
1903
1905
|
--out <path> Write pulled values to a file
|
|
1904
1906
|
|
|
1907
|
+
Default options:
|
|
1908
|
+
Forwarded to convex env default.
|
|
1909
|
+
|
|
1905
1910
|
Target options:
|
|
1906
1911
|
--prod
|
|
1907
1912
|
--deployment-name <name>
|
|
@@ -139,6 +139,7 @@ const convex = (opts) => {
|
|
|
139
139
|
ctx.context.session = ctx.context.session ?? ctx.context.newSession;
|
|
140
140
|
const { token } = await jwt$1.endpoints.getToken({
|
|
141
141
|
...ctx,
|
|
142
|
+
asResponse: false,
|
|
142
143
|
headers: {},
|
|
143
144
|
method: "GET",
|
|
144
145
|
returnHeaders: false,
|
|
@@ -168,6 +169,7 @@ const convex = (opts) => {
|
|
|
168
169
|
}, async (ctx) => {
|
|
169
170
|
return await oidcProvider$1.endpoints.getOpenIdConfig({
|
|
170
171
|
...ctx,
|
|
172
|
+
asResponse: false,
|
|
171
173
|
returnHeaders: false,
|
|
172
174
|
returnStatus: false
|
|
173
175
|
});
|
|
@@ -181,6 +183,7 @@ const convex = (opts) => {
|
|
|
181
183
|
}, async (ctx) => {
|
|
182
184
|
return await jwt$1.endpoints.getJwks({
|
|
183
185
|
...ctx,
|
|
186
|
+
asResponse: false,
|
|
184
187
|
returnHeaders: false,
|
|
185
188
|
returnStatus: false
|
|
186
189
|
});
|
|
@@ -195,7 +198,10 @@ const convex = (opts) => {
|
|
|
195
198
|
}, async (ctx) => {
|
|
196
199
|
await jwt(jwtOptions).endpoints.getJwks({
|
|
197
200
|
...ctx,
|
|
198
|
-
|
|
201
|
+
asResponse: false,
|
|
202
|
+
method: "GET",
|
|
203
|
+
returnHeaders: false,
|
|
204
|
+
returnStatus: false
|
|
199
205
|
});
|
|
200
206
|
const jwks = await ctx.context.adapter.findMany({
|
|
201
207
|
model: "jwks",
|
|
@@ -222,7 +228,10 @@ const convex = (opts) => {
|
|
|
222
228
|
});
|
|
223
229
|
await jwt(jwtOptions).endpoints.getJwks({
|
|
224
230
|
...ctx,
|
|
225
|
-
|
|
231
|
+
asResponse: false,
|
|
232
|
+
method: "GET",
|
|
233
|
+
returnHeaders: false,
|
|
234
|
+
returnStatus: false
|
|
226
235
|
});
|
|
227
236
|
const jwks = await ctx.context.adapter.findMany({
|
|
228
237
|
model: "jwks",
|
|
@@ -244,6 +253,7 @@ const convex = (opts) => {
|
|
|
244
253
|
const runEndpoint = async () => {
|
|
245
254
|
const response = await jwt$1.endpoints.getToken({
|
|
246
255
|
...ctx,
|
|
256
|
+
asResponse: false,
|
|
247
257
|
returnHeaders: false,
|
|
248
258
|
returnStatus: false
|
|
249
259
|
});
|
package/dist/{generated-contract-disabled-C_-KWRfT.d.ts → generated-contract-disabled-B8d7NKUf.d.ts}
RENAMED
|
@@ -216,6 +216,7 @@ declare const createApi: <Schema extends SchemaDefinition<any, any>, DataModel e
|
|
|
216
216
|
};
|
|
217
217
|
}, Promise<Record<string, unknown> | undefined>>;
|
|
218
218
|
findMany: convex_server0.RegisteredQuery<"internal", {
|
|
219
|
+
limit?: number | undefined;
|
|
219
220
|
join?: any;
|
|
220
221
|
where?: {
|
|
221
222
|
mode?: "sensitive" | "insensitive" | undefined;
|
|
@@ -224,7 +225,6 @@ declare const createApi: <Schema extends SchemaDefinition<any, any>, DataModel e
|
|
|
224
225
|
value: string | number | boolean | string[] | number[] | null;
|
|
225
226
|
field: string;
|
|
226
227
|
}[] | undefined;
|
|
227
|
-
limit?: number | undefined;
|
|
228
228
|
offset?: number | undefined;
|
|
229
229
|
sortBy?: {
|
|
230
230
|
field: string;
|
package/dist/orm/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as GenericOrmCtx$1, $n as unique, $r as endsWith, $t as ManyConfig, A as ConvexDateMode, An as ConvexRankIndexBuilder, Ar as ReturningResult, At as MigrationManifestEntry, B as ConvexBytesBuilderInitial, Bn as rankIndex, Br as OrmSchemaRelations, Bt as defineMigration, C as ConvexNumberBuilderInitial, Ci as ColumnBuilderWithTableName, Cn as RlsRole, Cr as MutationReturning, Ct as MigrationStatusArgs, D as id, Di as IsPrimaryKey, Dn as ConvexAggregateIndexBuilderOn, Dr as PaginatedResult, Dt as MigrationDoc, E as ConvexIdBuilderInitial, Ei as HasDefault, En as ConvexAggregateIndexBuilder, Er as OrderDirection, Et as MigrationDirection, F as custom, Fn as ConvexVectorIndexBuilder, Fr as unsetToken, Ft as MigrationStateMap, G as ConvexBigIntBuilder, Gn as ConvexCheckConfig, Gr as ExpressionVisitor, Gt as OrmReader$1, H as ConvexBooleanBuilder, Hn as uniqueIndex, Hr as TableName, Ht as detectMigrationDrift, I as json, In as ConvexVectorIndexBuilderOn, Ir as Brand, It as MigrationStep, J as CountBackfillChunkArgs, Jn as ConvexUniqueConstraintBuilder, Jr as LogicalExpression, Jt as RlsMode, K as ConvexBigIntBuilderInitial, Kn as ConvexForeignKeyBuilder, Kr as FieldReference, Kt as OrmWriter$1, L as objectOf, Ln as ConvexVectorIndexConfig, Lr as Columns, Lt as MigrationTableName, M as ConvexCustomBuilder, Mn as ConvexSearchIndexBuilder, Mr as UpdateSet, Mt as MigrationPlan, N as ConvexCustomBuilderInitial, Nn as ConvexSearchIndexBuilderOn, Nr as VectorQueryConfig, Nt as MigrationRunStatus, O as ConvexDateBuilder, Oi as IsUnique, On as ConvexIndexBuilder, Or as PredicateWhereIndexConfig, Ot as MigrationDocContext, P as arrayOf, Pn as ConvexSearchIndexConfig, Pr as VectorSearchProvider, Pt as MigrationSet, Q as GenericOrm$1, Qn as foreignKey, Qr as contains, Qt as ExtractTablesWithRelations, R as unionOf, Rn as aggregateIndex, Rr as OrmSchemaExtensionTables, Rt as MigrationWriteMode, S as ConvexNumberBuilder, Si as ColumnBuilderTypeConfig, Sn as rlsPolicy, Sr as MutationResult, St as MigrationRunChunkArgs, T as ConvexIdBuilder, Ti as DrizzleEntity, Tn as rlsRole, Tr as OrderByClause, Tt as MigrationDefinition, U as ConvexBooleanBuilderInitial, Un as vectorIndex, Ur as SystemFields, Ut as DatabaseWithMutations, V as bytes, Vn as searchIndex, Vr as OrmSchemaTriggers, Vt as defineMigrationSet, W as boolean, Wn as ConvexCheckBuilder, Wr as BinaryExpression, Wt as DatabaseWithQuery, X as CountBackfillStatusArgs, Xn as ConvexUniqueConstraintConfig, Xr as and, Xt as extractRelationsConfig, Y as CountBackfillKickoffArgs, Yn as ConvexUniqueConstraintBuilderOn, Yr as UnaryExpression, Yt as EdgeMetadata, Z as CreateOrmOptions, Zn as check, Zr as between, Zt as ExtractTablesFromSchema, _ as ConvexTimestampMode, _i as startsWith, _n as deletion, _r as MutationExecuteConfig, _t as OrmTriggerContext, a as requireSchemaRelations, ai as inArray, an as TablesRelationalConfig, ar as AggregateResult, at as OrmWriterCtx, b as ConvexTextEnumBuilderInitial, bi as ColumnBuilderBaseConfig, bn as RlsPolicyConfig, br as MutationPaginateConfig, bt as MigrationCancelArgs, c as TableConfigResult, ci as isNull, cn as ConvexDeletionBuilder, cr as CountConfig, ct as ScheduledMutationBatchArgs, d as OrmNotFoundError, di as lte, dn as ConvexTableWithColumns, dr as FilterOperators, dt as scheduledDeleteFactory, ei as eq, en as OneConfig, er as ConvexTextBuilder, et as OrmApiResult, f as ConvexVectorBuilder, fi as ne, fn as DiscriminatorBuilderConfig, fr as GetColumnData, ft as SchemaExtension, g as ConvexTimestampBuilderInitial, gi as or, gn as convexTable, gr as InsertValue, gt as OrmTriggerChange, h as ConvexTimestampBuilder, hi as notInArray, hn as TableConfig, hr as InferSelectModel, ht as OrmTableTriggers, i as getSchemaTriggers, ii as ilike, in as TableRelationalConfig, ir as AggregateFieldValue, it as OrmReaderCtx, j as date, jn as ConvexRankIndexBuilderOn, jr as ReturningSelection, jt as MigrationMigrateOne, k as ConvexDateBuilderInitial, ki as NotNull, kn as ConvexIndexBuilderOn, kr as ReturningAll, kt as MigrationDriftIssue, l as getTableColumns, li as like, ln as ConvexDeletionConfig, lr as CountResult, lt as scheduledMutationBatchFactory, m as vector, mi as notBetween, mn as OrmLifecycleOperation, mr as InferModelFromColumns, mt as OrmBeforeResult, n as defineSchema, ni as gt, nn as RelationsBuilderColumnBase, nr as text, nt as OrmClientWithApi$1, o as asc, oi as isFieldReference, on as defineRelations, or as BuildQueryResult, ot as ResolveOrmSchema, p as ConvexVectorBuilderInitial, pi as not, pn as OrmLifecycleChange, pr as InferInsertModel, pt as defineSchemaExtension, q as bigint, qn as ConvexForeignKeyConfig, qr as FilterExpression, qt as RlsContext, r as getSchemaRelations, ri as gte, rn as RelationsBuilderColumnConfig, rr as AggregateConfig, rt as OrmFunctions, s as desc, si as isNotNull, sn as defineRelationsPart, sr as BuildRelationResult, st as createOrm, t as WhereClauseResult, ti as fieldRef, tn as RelationsBuilder, tr as ConvexTextBuilderInitial, tt as OrmClientBase$1, u as getTableConfig, ui as lt, un as ConvexTable, ur as DBQueryConfig, ut as ScheduledDeleteArgs, v as timestamp, vi as AnyColumn, vn as discriminator, vr as MutationExecuteResult, vt as OrmTriggers, w as integer, wi as ColumnDataType, wn as RlsRoleConfig, wr as MutationRunMode, wt as MigrationAppliedState, x as textEnum, xi as ColumnBuilderRuntimeConfig, xn as RlsPolicyToOption, xr as MutationPaginatedResult, xt as MigrationRunArgs, y as ConvexTextEnumBuilder, yi as ColumnBuilder, yn as RlsPolicy, yr as MutationExecutionMode, yt as defineTriggers, z as ConvexBytesBuilder, zn as index, zr as OrmSchemaExtensions, zt as buildMigrationPlan } from "../where-clause-compiler-
|
|
1
|
+
import { $ as GenericOrmCtx$1, $n as unique, $r as endsWith, $t as ManyConfig, A as ConvexDateMode, An as ConvexRankIndexBuilder, Ar as ReturningResult, At as MigrationManifestEntry, B as ConvexBytesBuilderInitial, Bn as rankIndex, Br as OrmSchemaRelations, Bt as defineMigration, C as ConvexNumberBuilderInitial, Ci as ColumnBuilderWithTableName, Cn as RlsRole, Cr as MutationReturning, Ct as MigrationStatusArgs, D as id, Di as IsPrimaryKey, Dn as ConvexAggregateIndexBuilderOn, Dr as PaginatedResult, Dt as MigrationDoc, E as ConvexIdBuilderInitial, Ei as HasDefault, En as ConvexAggregateIndexBuilder, Er as OrderDirection, Et as MigrationDirection, F as custom, Fn as ConvexVectorIndexBuilder, Fr as unsetToken, Ft as MigrationStateMap, G as ConvexBigIntBuilder, Gn as ConvexCheckConfig, Gr as ExpressionVisitor, Gt as OrmReader$1, H as ConvexBooleanBuilder, Hn as uniqueIndex, Hr as TableName, Ht as detectMigrationDrift, I as json, In as ConvexVectorIndexBuilderOn, Ir as Brand, It as MigrationStep, J as CountBackfillChunkArgs, Jn as ConvexUniqueConstraintBuilder, Jr as LogicalExpression, Jt as RlsMode, K as ConvexBigIntBuilderInitial, Kn as ConvexForeignKeyBuilder, Kr as FieldReference, Kt as OrmWriter$1, L as objectOf, Ln as ConvexVectorIndexConfig, Lr as Columns, Lt as MigrationTableName, M as ConvexCustomBuilder, Mn as ConvexSearchIndexBuilder, Mr as UpdateSet, Mt as MigrationPlan, N as ConvexCustomBuilderInitial, Nn as ConvexSearchIndexBuilderOn, Nr as VectorQueryConfig, Nt as MigrationRunStatus, O as ConvexDateBuilder, Oi as IsUnique, On as ConvexIndexBuilder, Or as PredicateWhereIndexConfig, Ot as MigrationDocContext, P as arrayOf, Pn as ConvexSearchIndexConfig, Pr as VectorSearchProvider, Pt as MigrationSet, Q as GenericOrm$1, Qn as foreignKey, Qr as contains, Qt as ExtractTablesWithRelations, R as unionOf, Rn as aggregateIndex, Rr as OrmSchemaExtensionTables, Rt as MigrationWriteMode, S as ConvexNumberBuilder, Si as ColumnBuilderTypeConfig, Sn as rlsPolicy, Sr as MutationResult, St as MigrationRunChunkArgs, T as ConvexIdBuilder, Ti as DrizzleEntity, Tn as rlsRole, Tr as OrderByClause, Tt as MigrationDefinition, U as ConvexBooleanBuilderInitial, Un as vectorIndex, Ur as SystemFields, Ut as DatabaseWithMutations, V as bytes, Vn as searchIndex, Vr as OrmSchemaTriggers, Vt as defineMigrationSet, W as boolean, Wn as ConvexCheckBuilder, Wr as BinaryExpression, Wt as DatabaseWithQuery, X as CountBackfillStatusArgs, Xn as ConvexUniqueConstraintConfig, Xr as and, Xt as extractRelationsConfig, Y as CountBackfillKickoffArgs, Yn as ConvexUniqueConstraintBuilderOn, Yr as UnaryExpression, Yt as EdgeMetadata, Z as CreateOrmOptions, Zn as check, Zr as between, Zt as ExtractTablesFromSchema, _ as ConvexTimestampMode, _i as startsWith, _n as deletion, _r as MutationExecuteConfig, _t as OrmTriggerContext, a as requireSchemaRelations, ai as inArray, an as TablesRelationalConfig, ar as AggregateResult, at as OrmWriterCtx, b as ConvexTextEnumBuilderInitial, bi as ColumnBuilderBaseConfig, bn as RlsPolicyConfig, br as MutationPaginateConfig, bt as MigrationCancelArgs, c as TableConfigResult, ci as isNull, cn as ConvexDeletionBuilder, cr as CountConfig, ct as ScheduledMutationBatchArgs, d as OrmNotFoundError, di as lte, dn as ConvexTableWithColumns, dr as FilterOperators, dt as scheduledDeleteFactory, ei as eq, en as OneConfig, er as ConvexTextBuilder, et as OrmApiResult, f as ConvexVectorBuilder, fi as ne, fn as DiscriminatorBuilderConfig, fr as GetColumnData, ft as SchemaExtension, g as ConvexTimestampBuilderInitial, gi as or, gn as convexTable, gr as InsertValue, gt as OrmTriggerChange, h as ConvexTimestampBuilder, hi as notInArray, hn as TableConfig, hr as InferSelectModel, ht as OrmTableTriggers, i as getSchemaTriggers, ii as ilike, in as TableRelationalConfig, ir as AggregateFieldValue, it as OrmReaderCtx, j as date, jn as ConvexRankIndexBuilderOn, jr as ReturningSelection, jt as MigrationMigrateOne, k as ConvexDateBuilderInitial, ki as NotNull, kn as ConvexIndexBuilderOn, kr as ReturningAll, kt as MigrationDriftIssue, l as getTableColumns, li as like, ln as ConvexDeletionConfig, lr as CountResult, lt as scheduledMutationBatchFactory, m as vector, mi as notBetween, mn as OrmLifecycleOperation, mr as InferModelFromColumns, mt as OrmBeforeResult, n as defineSchema, ni as gt, nn as RelationsBuilderColumnBase, nr as text, nt as OrmClientWithApi$1, o as asc, oi as isFieldReference, on as defineRelations, or as BuildQueryResult, ot as ResolveOrmSchema, p as ConvexVectorBuilderInitial, pi as not, pn as OrmLifecycleChange, pr as InferInsertModel, pt as defineSchemaExtension, q as bigint, qn as ConvexForeignKeyConfig, qr as FilterExpression, qt as RlsContext, r as getSchemaRelations, ri as gte, rn as RelationsBuilderColumnConfig, rr as AggregateConfig, rt as OrmFunctions, s as desc, si as isNotNull, sn as defineRelationsPart, sr as BuildRelationResult, st as createOrm, t as WhereClauseResult, ti as fieldRef, tn as RelationsBuilder, tr as ConvexTextBuilderInitial, tt as OrmClientBase$1, u as getTableConfig, ui as lt, un as ConvexTable, ur as DBQueryConfig, ut as ScheduledDeleteArgs, v as timestamp, vi as AnyColumn, vn as discriminator, vr as MutationExecuteResult, vt as OrmTriggers, w as integer, wi as ColumnDataType, wn as RlsRoleConfig, wr as MutationRunMode, wt as MigrationAppliedState, x as textEnum, xi as ColumnBuilderRuntimeConfig, xn as RlsPolicyToOption, xr as MutationPaginatedResult, xt as MigrationRunArgs, y as ConvexTextEnumBuilder, yi as ColumnBuilder, yn as RlsPolicy, yr as MutationExecutionMode, yt as defineTriggers, z as ConvexBytesBuilder, zn as index, zr as OrmSchemaExtensions, zt as buildMigrationPlan } from "../where-clause-compiler-CFCtA01K.js";
|
|
2
2
|
import { i as pretendRequired, n as deprecated, r as pretend } from "../validators-BhsByJeg.js";
|
|
3
3
|
import { a as QueryCtxWithPreferredOrmQueryTable, i as QueryCtxWithOrmQueryTable, n as LookupByIdResultByCtx, o as getByIdWithOrmQueryFallback, r as QueryCtxWithOptionalOrmQueryTable, t as DocByCtx } from "../query-context-CNo9ffvI.js";
|
|
4
4
|
import { DefineSchemaOptions, GenericDatabaseReader, GenericDatabaseWriter, GenericSchema, SchemaDefinition } from "convex/server";
|
package/dist/react/index.d.ts
CHANGED
|
@@ -41,7 +41,7 @@ declare function isAuthMutationError(error: unknown): error is AuthMutationError
|
|
|
41
41
|
//#endregion
|
|
42
42
|
//#region src/react/auth-mutations.d.ts
|
|
43
43
|
type MutationOptionsHook<TData, TVariables = void> = (options?: Omit<UseMutationOptions<TData, DefaultError, TVariables>, 'mutationFn'>) => UseMutationOptions<TData, DefaultError, TVariables>;
|
|
44
|
-
type
|
|
44
|
+
type AnyAuthFn = (...args: never[]) => unknown;
|
|
45
45
|
type MutationArgsWithFetchOptions = {
|
|
46
46
|
fetchOptions?: Record<string, unknown>;
|
|
47
47
|
};
|
|
@@ -70,15 +70,15 @@ type AuthClient = {
|
|
|
70
70
|
};
|
|
71
71
|
};
|
|
72
72
|
};
|
|
73
|
-
getSession?:
|
|
74
|
-
signOut?:
|
|
73
|
+
getSession?: AnyAuthFn;
|
|
74
|
+
signOut?: AnyAuthFn;
|
|
75
75
|
signIn?: {
|
|
76
|
-
anonymous?:
|
|
77
|
-
social?:
|
|
78
|
-
email?:
|
|
76
|
+
anonymous?: AnyAuthFn;
|
|
77
|
+
social?: AnyAuthFn;
|
|
78
|
+
email?: AnyAuthFn;
|
|
79
79
|
};
|
|
80
80
|
signUp?: {
|
|
81
|
-
email?:
|
|
81
|
+
email?: AnyAuthFn;
|
|
82
82
|
};
|
|
83
83
|
};
|
|
84
84
|
/**
|
package/dist/react/index.js
CHANGED
|
@@ -1493,6 +1493,9 @@ const toAuthMutationError = (error) => new AuthMutationError({
|
|
|
1493
1493
|
status: error?.status ?? 500,
|
|
1494
1494
|
statusText: error?.statusText ?? "AUTH_ERROR"
|
|
1495
1495
|
});
|
|
1496
|
+
const callAuthMethod = async (method, ...args) => {
|
|
1497
|
+
return method(...args);
|
|
1498
|
+
};
|
|
1496
1499
|
const syncSessionAtom = (authClient, sessionData) => {
|
|
1497
1500
|
const sessionAtom = authClient.$store?.atoms?.session;
|
|
1498
1501
|
if (typeof sessionAtom?.get !== "function" || typeof sessionAtom.set !== "function") return;
|
|
@@ -1508,7 +1511,7 @@ const syncSessionAtom = (authClient, sessionData) => {
|
|
|
1508
1511
|
const hydrateReturnedSession = async (authClient, value) => {
|
|
1509
1512
|
const token = readReturnedToken(value);
|
|
1510
1513
|
if (!token || typeof authClient.getSession !== "function") return;
|
|
1511
|
-
const session = await authClient.getSession
|
|
1514
|
+
const session = await callAuthMethod(authClient.getSession, { fetchOptions: {
|
|
1512
1515
|
credentials: "omit",
|
|
1513
1516
|
headers: { Authorization: `Bearer ${token}` }
|
|
1514
1517
|
} });
|
|
@@ -1534,10 +1537,11 @@ function createAuthMutations(authClient) {
|
|
|
1534
1537
|
return {
|
|
1535
1538
|
...options,
|
|
1536
1539
|
mutationFn: async (args) => {
|
|
1537
|
-
|
|
1540
|
+
const signOut = authClient.signOut;
|
|
1541
|
+
if (typeof signOut !== "function") throw new Error("Auth client does not expose signOut");
|
|
1538
1542
|
authStoreApi.set("isAuthenticated", false);
|
|
1539
1543
|
convexQueryClient?.unsubscribeAuthQueries();
|
|
1540
|
-
const res = await
|
|
1544
|
+
const res = await callAuthMethod(signOut, args);
|
|
1541
1545
|
if (res?.error) throw toAuthMutationError(res.error);
|
|
1542
1546
|
authStoreApi.set("token", null);
|
|
1543
1547
|
authStoreApi.set("expiresAt", null);
|
|
@@ -1554,8 +1558,9 @@ function createAuthMutations(authClient) {
|
|
|
1554
1558
|
return {
|
|
1555
1559
|
...options,
|
|
1556
1560
|
mutationFn: async (args) => {
|
|
1557
|
-
|
|
1558
|
-
|
|
1561
|
+
const signInSocial = authClient.signIn?.social;
|
|
1562
|
+
if (typeof signInSocial !== "function") throw new Error("Auth client does not expose signIn.social");
|
|
1563
|
+
const res = await callAuthMethod(signInSocial, withDisabledSessionSignal(args));
|
|
1559
1564
|
if (res?.error) throw toAuthMutationError(res.error);
|
|
1560
1565
|
seedReturnedToken(authStoreApi, res);
|
|
1561
1566
|
await hydrateReturnedSession(authClient, res);
|
|
@@ -1572,8 +1577,9 @@ function createAuthMutations(authClient) {
|
|
|
1572
1577
|
return {
|
|
1573
1578
|
...options,
|
|
1574
1579
|
mutationFn: async (args) => {
|
|
1575
|
-
|
|
1576
|
-
|
|
1580
|
+
const signInEmail = authClient.signIn?.email;
|
|
1581
|
+
if (typeof signInEmail !== "function") throw new Error("Auth client does not expose signIn.email");
|
|
1582
|
+
const res = await callAuthMethod(signInEmail, withDisabledSessionSignal(args));
|
|
1577
1583
|
if (res?.error) throw toAuthMutationError(res.error);
|
|
1578
1584
|
seedReturnedToken(authStoreApi, res);
|
|
1579
1585
|
await hydrateReturnedSession(authClient, res);
|
|
@@ -1590,8 +1596,9 @@ function createAuthMutations(authClient) {
|
|
|
1590
1596
|
return {
|
|
1591
1597
|
...options,
|
|
1592
1598
|
mutationFn: async (args) => {
|
|
1593
|
-
|
|
1594
|
-
|
|
1599
|
+
const signUpEmail = authClient.signUp?.email;
|
|
1600
|
+
if (typeof signUpEmail !== "function") throw new Error("Auth client does not expose signUp.email");
|
|
1601
|
+
const res = await callAuthMethod(signUpEmail, withDisabledSessionSignal(args));
|
|
1595
1602
|
if (res?.error) throw toAuthMutationError(res.error);
|
|
1596
1603
|
seedReturnedToken(authStoreApi, res);
|
|
1597
1604
|
await hydrateReturnedSession(authClient, res);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as JWT_COOKIE_NAME } from "./convex-plugin-
|
|
1
|
+
import { t as JWT_COOKIE_NAME } from "./convex-plugin-BHVCqWTH.js";
|
|
2
2
|
import { betterFetch } from "@better-fetch/fetch";
|
|
3
3
|
import { getSessionCookie } from "better-auth/cookies";
|
|
4
4
|
import * as jose from "jose";
|
package/dist/watcher.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { Dt as logger, Et as getConvexConfig, F as resolveRunDeps, Tt as generateMeta, j as resolveConfiguredBackend, q as withLocalCodegenEnv } from "./backend-core-
|
|
2
|
+
import { Dt as logger, Et as getConvexConfig, F as resolveRunDeps, Tt as generateMeta, j as resolveConfiguredBackend, q as withLocalCodegenEnv } from "./backend-core-DZHqsBcu.mjs";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import { fileURLToPath } from "node:url";
|
|
5
5
|
|
|
@@ -4257,26 +4257,26 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
4257
4257
|
fieldName: "status";
|
|
4258
4258
|
};
|
|
4259
4259
|
};
|
|
4260
|
-
|
|
4261
|
-
_: {
|
|
4262
|
-
notNull: true;
|
|
4263
|
-
};
|
|
4264
|
-
} & {
|
|
4260
|
+
cursor: ConvexTextBuilderInitial<""> & {
|
|
4265
4261
|
_: {
|
|
4266
4262
|
tableName: "aggregate_state";
|
|
4267
4263
|
};
|
|
4268
4264
|
} & {
|
|
4269
4265
|
_: {
|
|
4270
|
-
fieldName: "
|
|
4266
|
+
fieldName: "cursor";
|
|
4271
4267
|
};
|
|
4272
4268
|
};
|
|
4273
|
-
|
|
4269
|
+
kind: ConvexTextBuilderInitial<""> & {
|
|
4270
|
+
_: {
|
|
4271
|
+
notNull: true;
|
|
4272
|
+
};
|
|
4273
|
+
} & {
|
|
4274
4274
|
_: {
|
|
4275
4275
|
tableName: "aggregate_state";
|
|
4276
4276
|
};
|
|
4277
4277
|
} & {
|
|
4278
4278
|
_: {
|
|
4279
|
-
fieldName: "
|
|
4279
|
+
fieldName: "kind";
|
|
4280
4280
|
};
|
|
4281
4281
|
};
|
|
4282
4282
|
updatedAt: ConvexNumberBuilderInitial<""> & {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kitcn",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.14.0",
|
|
4
4
|
"description": "kitcn - React Query integration and CLI tools for Convex",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"convex",
|
|
@@ -89,8 +89,8 @@
|
|
|
89
89
|
"@tanstack/query-core": ">=5",
|
|
90
90
|
"@tanstack/react-query": ">=5",
|
|
91
91
|
"@tanstack/solid-query": ">=5",
|
|
92
|
-
"better-auth": "1.6.
|
|
93
|
-
"convex": ">=1.
|
|
92
|
+
"better-auth": "1.6.9",
|
|
93
|
+
"convex": ">=1.36",
|
|
94
94
|
"hono": "4.12.9",
|
|
95
95
|
"next": ">=14",
|
|
96
96
|
"react": ">=18",
|
|
@@ -228,6 +228,7 @@ Convex remote / repair:
|
|
|
228
228
|
2. Use `npx kitcn env push --prod` for production sync.
|
|
229
229
|
3. Use `npx kitcn env push --rotate` when you want fresh keys plus fresh `JWKS`.
|
|
230
230
|
4. `kitcn env push` writes deployment env for you. No manual copy step.
|
|
231
|
+
5. Use `npx kitcn env default set ... --type <dev|preview|prod>` for project defaults that should apply to new deployments.
|
|
231
232
|
|
|
232
233
|
Concave manual lane:
|
|
233
234
|
1. Use `npx kitcn --backend concave auth jwks` when you need a manual static `JWKS` payload.
|
|
@@ -94,6 +94,8 @@ export const migrations = defineMigrationSet([migration1, migration2]);
|
|
|
94
94
|
## Deploy Integration
|
|
95
95
|
|
|
96
96
|
`kitcn deploy` auto-runs: `convex deploy` → `migrate up` → `aggregate backfill`.
|
|
97
|
+
Convex deploy flags pass through first, including `--message` for deployment
|
|
98
|
+
history and `--preview-name` for reusable preview deployments.
|
|
97
99
|
|
|
98
100
|
Config in `kitcn.json`:
|
|
99
101
|
|
|
@@ -600,6 +600,7 @@ Recommended scripts:
|
|
|
600
600
|
"verify": "kitcn verify",
|
|
601
601
|
"reset": "kitcn reset --yes --after init",
|
|
602
602
|
"seed": "convex run seed:seed",
|
|
603
|
+
"inspect": "kitcn run --inline-query 'await ctx.db.query(\"messages\").take(5)'",
|
|
603
604
|
"env:push": "kitcn env push",
|
|
604
605
|
"env:push:rotate": "kitcn env push --rotate"
|
|
605
606
|
}
|
|
@@ -623,10 +624,18 @@ bunx kitcn codegen
|
|
|
623
624
|
bunx kitcn env push
|
|
624
625
|
bunx kitcn env push --prod
|
|
625
626
|
bunx kitcn env push --rotate
|
|
627
|
+
bunx kitcn env default list --type dev
|
|
628
|
+
bunx kitcn env default set SITE_URL https://app.example.com --type prod
|
|
626
629
|
bunx kitcn auth jwks
|
|
627
630
|
bunx kitcn auth jwks --rotate
|
|
631
|
+
# ad-hoc readonly database inspection:
|
|
632
|
+
bunx kitcn run --inline-query 'await ctx.db.query("messages").take(5)'
|
|
633
|
+
# create/select a branch-scoped cloud dev deployment:
|
|
634
|
+
bunx kitcn deployment create "$(git branch --show-current)" --type dev --select
|
|
628
635
|
# deploy with automatic aggregate backfill:
|
|
629
636
|
bunx kitcn deploy --prod
|
|
637
|
+
bunx kitcn deploy --prod --message "Release $(git rev-parse --short HEAD)"
|
|
638
|
+
bunx kitcn deploy --preview-name "$(git branch --show-current)"
|
|
630
639
|
# aggregate index management:
|
|
631
640
|
bunx kitcn aggregate rebuild --prod
|
|
632
641
|
bunx kitcn aggregate backfill --prod
|
|
@@ -644,8 +653,17 @@ bunx kitcn --backend concave auth jwks --rotate --url http://localhost:3210
|
|
|
644
653
|
On backend `convex`, `kitcn dev` watches `convex/.env` during a local
|
|
645
654
|
dev session and auto-pushes later edits. Keep `env push` for `--prod`,
|
|
646
655
|
`--rotate`, or explicit repair against an already active deployment.
|
|
647
|
-
|
|
648
|
-
|
|
656
|
+
Use `env default` when new dev, preview, or production deployments should start
|
|
657
|
+
with the same project-level values.
|
|
658
|
+
Unknown Convex commands pass through `kitcn`, so use `kitcn run --inline-query`
|
|
659
|
+
for quick readonly inspection and `kitcn deployment create ... --select` for
|
|
660
|
+
branch-scoped cloud dev deployments. `kitcn deploy` forwards Convex deployment
|
|
661
|
+
flags such as `--message` and `--preview-name`, then runs kitcn migrations and
|
|
662
|
+
aggregate backfill against the selected deployment.
|
|
663
|
+
Convex `ctx.meta` APIs belong inside app functions; do not invent a kitcn
|
|
664
|
+
wrapper for them.
|
|
665
|
+
|
|
666
|
+
On backend `concave`, `kitcn env` is not the right command. Use `auth jwks`
|
|
649
667
|
for manual static `JWKS` export instead.
|
|
650
668
|
|
|
651
669
|
### 11.2 Phase A gate: non-auth baseline (required before auth work)
|
|
@@ -225,6 +225,10 @@ Agent command policy:
|
|
|
225
225
|
4. Use `bunx kitcn verify` for one-shot local runtime proof in CI or agent runs, with any long-running local backend stopped first.
|
|
226
226
|
5. Use manual `bunx kitcn codegen` only as fallback when `kitcn dev` cannot be run and backend is already active.
|
|
227
227
|
6. Use `bunx kitcn insights` for cloud-deployment debugging; it forwards to the upstream Convex insights CLI.
|
|
228
|
+
7. Use `bunx kitcn run --inline-query 'await ctx.db.query("messages").take(5)'` for quick readonly database inspection.
|
|
229
|
+
8. Use `bunx kitcn deployment create "$(git branch --show-current)" --type dev --select` when a branch needs its own shared cloud dev deployment.
|
|
230
|
+
9. Use `bunx kitcn env default set ... --type <dev|preview|prod>` before creating deployments that should start with shared env defaults.
|
|
231
|
+
10. Use Convex `ctx.meta` APIs directly inside functions. Do not add kitcn wrappers for function metadata or transaction metrics.
|
|
228
232
|
|
|
229
233
|
One-time codegen (optional; use only when `kitcn dev` is not running):
|
|
230
234
|
|