kitcn 0.15.4 → 0.15.5
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 +12 -12
- package/dist/auth/start/index.d.ts +1 -15
- package/dist/auth/start/index.js +1 -124
- package/dist/auth/start/server/index.d.ts +17 -0
- package/dist/auth/start/server/index.js +126 -0
- package/dist/{backend-core-BA0CgHrL.mjs → backend-core-PsWKI66u.mjs} +1 -1
- package/dist/cli.mjs +1 -1
- package/dist/crpc/index.d.ts +1 -1
- package/dist/{generated-contract-disabled-xOmfTKh8.d.ts → generated-contract-disabled-0xEF3NtW.d.ts} +29 -29
- package/dist/orm/index.d.ts +1 -1
- package/dist/plugins/index.d.ts +1 -1
- package/dist/ratelimit/index.d.ts +1 -1
- package/dist/react/index.js +3 -2
- package/dist/rsc/index.d.ts +1 -1
- package/dist/watcher.mjs +1 -1
- package/dist/{where-clause-compiler-Dv-3mnJF.d.ts → where-clause-compiler-DcEhkJ12.d.ts} +12 -12
- package/package.json +7 -1
- package/skills/kitcn/references/setup/index.md +1 -1
- package/skills/kitcn/references/setup/start.md +1 -1
- /package/dist/{middleware-DrtexzF3.d.ts → middleware-Br5zubu7.d.ts} +0 -0
- /package/dist/{types-YHpe0rsb.d.ts → types-jNTcza_a.d.ts} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as ConvexNumberBuilderInitial, E as ConvexIdBuilderInitial, N as ConvexCustomBuilderInitial, dn as ConvexTableWithColumns, tr as ConvexTextBuilderInitial } from "../where-clause-compiler-
|
|
1
|
+
import { C as ConvexNumberBuilderInitial, E as ConvexIdBuilderInitial, N as ConvexCustomBuilderInitial, dn as ConvexTableWithColumns, tr as ConvexTextBuilderInitial } from "../where-clause-compiler-DcEhkJ12.js";
|
|
2
2
|
import * as convex_values0 from "convex/values";
|
|
3
3
|
import { GenericId, Infer, Value } from "convex/values";
|
|
4
4
|
import { DocumentByName, GenericDataModel, GenericDatabaseReader, GenericDatabaseWriter, TableNamesInDataModel } from "convex/server";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { S as defineAuth, _ as GenericAuthBeforeResult, b as GenericAuthTriggerHandlers, g as BetterAuthOptionsWithoutDatabase, i as getGeneratedAuthDisabledReason, n as GeneratedAuthDisabledReasonKind, r as createDisabledAuthRuntime, t as AuthRuntime, v as GenericAuthDefinition, x as GenericAuthTriggers, y as GenericAuthTriggerChange } from "../../generated-contract-disabled-
|
|
1
|
+
import { S as defineAuth, _ as GenericAuthBeforeResult, b as GenericAuthTriggerHandlers, g as BetterAuthOptionsWithoutDatabase, i as getGeneratedAuthDisabledReason, n as GeneratedAuthDisabledReasonKind, r as createDisabledAuthRuntime, t as AuthRuntime, v as GenericAuthDefinition, x as GenericAuthTriggers, y as GenericAuthTriggerChange } from "../../generated-contract-disabled-0xEF3NtW.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-0xEF3NtW.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";
|
|
@@ -107,27 +107,27 @@ type AdapterPaginationOptions = PaginationOptions & {
|
|
|
107
107
|
};
|
|
108
108
|
declare const adapterWhereValidator: convex_values0.VObject<{
|
|
109
109
|
mode?: "sensitive" | "insensitive" | undefined;
|
|
110
|
-
operator?: "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | "in" | "not_in" | "contains" | "starts_with" | "ends_with" | undefined;
|
|
111
110
|
connector?: "AND" | "OR" | undefined;
|
|
111
|
+
operator?: "lt" | "lte" | "gt" | "gte" | "eq" | "in" | "not_in" | "ne" | "contains" | "starts_with" | "ends_with" | undefined;
|
|
112
112
|
value: string | number | boolean | string[] | number[] | null;
|
|
113
113
|
field: string;
|
|
114
114
|
}, {
|
|
115
115
|
connector: convex_values0.VUnion<"AND" | "OR" | undefined, [convex_values0.VLiteral<"AND", "required">, convex_values0.VLiteral<"OR", "required">], "optional", never>;
|
|
116
116
|
field: convex_values0.VString<string, "required">;
|
|
117
117
|
mode: convex_values0.VUnion<"sensitive" | "insensitive" | undefined, [convex_values0.VLiteral<"sensitive", "required">, convex_values0.VLiteral<"insensitive", "required">], "optional", never>;
|
|
118
|
-
operator: convex_values0.VUnion<"
|
|
118
|
+
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>;
|
|
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
|
-
}, "required", "mode" | "
|
|
120
|
+
}, "required", "mode" | "value" | "connector" | "field" | "operator">;
|
|
121
121
|
declare const adapterArgsValidator: convex_values0.VObject<{
|
|
122
|
-
|
|
122
|
+
select?: string[] | undefined;
|
|
123
123
|
where?: {
|
|
124
124
|
mode?: "sensitive" | "insensitive" | undefined;
|
|
125
|
-
operator?: "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | "in" | "not_in" | "contains" | "starts_with" | "ends_with" | undefined;
|
|
126
125
|
connector?: "AND" | "OR" | undefined;
|
|
126
|
+
operator?: "lt" | "lte" | "gt" | "gte" | "eq" | "in" | "not_in" | "ne" | "contains" | "starts_with" | "ends_with" | undefined;
|
|
127
127
|
value: string | number | boolean | string[] | number[] | null;
|
|
128
128
|
field: string;
|
|
129
129
|
}[] | undefined;
|
|
130
|
-
|
|
130
|
+
limit?: number | undefined;
|
|
131
131
|
offset?: number | undefined;
|
|
132
132
|
sortBy?: {
|
|
133
133
|
field: string;
|
|
@@ -148,24 +148,24 @@ declare const adapterArgsValidator: convex_values0.VObject<{
|
|
|
148
148
|
}, "optional", "field" | "direction">;
|
|
149
149
|
where: convex_values0.VArray<{
|
|
150
150
|
mode?: "sensitive" | "insensitive" | undefined;
|
|
151
|
-
operator?: "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | "in" | "not_in" | "contains" | "starts_with" | "ends_with" | undefined;
|
|
152
151
|
connector?: "AND" | "OR" | undefined;
|
|
152
|
+
operator?: "lt" | "lte" | "gt" | "gte" | "eq" | "in" | "not_in" | "ne" | "contains" | "starts_with" | "ends_with" | undefined;
|
|
153
153
|
value: string | number | boolean | string[] | number[] | null;
|
|
154
154
|
field: string;
|
|
155
155
|
}[] | undefined, convex_values0.VObject<{
|
|
156
156
|
mode?: "sensitive" | "insensitive" | undefined;
|
|
157
|
-
operator?: "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | "in" | "not_in" | "contains" | "starts_with" | "ends_with" | undefined;
|
|
158
157
|
connector?: "AND" | "OR" | undefined;
|
|
158
|
+
operator?: "lt" | "lte" | "gt" | "gte" | "eq" | "in" | "not_in" | "ne" | "contains" | "starts_with" | "ends_with" | undefined;
|
|
159
159
|
value: string | number | boolean | string[] | number[] | null;
|
|
160
160
|
field: string;
|
|
161
161
|
}, {
|
|
162
162
|
connector: convex_values0.VUnion<"AND" | "OR" | undefined, [convex_values0.VLiteral<"AND", "required">, convex_values0.VLiteral<"OR", "required">], "optional", never>;
|
|
163
163
|
field: convex_values0.VString<string, "required">;
|
|
164
164
|
mode: convex_values0.VUnion<"sensitive" | "insensitive" | undefined, [convex_values0.VLiteral<"sensitive", "required">, convex_values0.VLiteral<"insensitive", "required">], "optional", never>;
|
|
165
|
-
operator: convex_values0.VUnion<"
|
|
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
|
-
}, "required", "mode" | "
|
|
168
|
-
}, "required", "
|
|
167
|
+
}, "required", "mode" | "value" | "connector" | "field" | "operator">, "optional">;
|
|
168
|
+
}, "required", "model" | "select" | "where" | "limit" | "offset" | "sortBy" | "sortBy.field" | "sortBy.direction">;
|
|
169
169
|
declare const hasUniqueFields: (betterAuthSchema: BetterAuthDBSchema, model: string, input: Record<string, any>) => boolean;
|
|
170
170
|
declare const checkUniqueFields: <Schema extends SchemaDefinition<any, any>>(ctx: GenericQueryCtx<GenericDataModel>, schema: Schema, betterAuthSchema: BetterAuthDBSchema, table: string, input: Record<string, any>, doc?: Record<string, any>) => Promise<void>;
|
|
171
171
|
declare const selectFields: <T extends TableNamesInDataModel<GenericDataModel>, D extends DocumentByName<GenericDataModel, T>>(doc: D | null, select?: string[]) => D | null;
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import { t as GetTokenOptions } from "../../token-B9Bjcqug.js";
|
|
2
|
-
import { FunctionReference, FunctionReturnType, OptionalRestArgs } from "convex/server";
|
|
3
|
-
|
|
4
1
|
//#region src/auth-start/index.d.ts
|
|
5
2
|
type MaybePromise<T> = Promise<T> | T;
|
|
6
3
|
type StartLoaderAuthClient = {
|
|
@@ -24,20 +21,9 @@ type StartLoaderAuthState = {
|
|
|
24
21
|
isAuthenticated: boolean;
|
|
25
22
|
token: null | string;
|
|
26
23
|
};
|
|
27
|
-
type ConvexBetterAuthReactStartOptions = Omit<GetTokenOptions, 'forceRefresh'> & {
|
|
28
|
-
convexSiteUrl: string;
|
|
29
|
-
convexUrl: string;
|
|
30
|
-
};
|
|
31
24
|
declare const syncConvexAuthForStartLoader: ({
|
|
32
25
|
convex,
|
|
33
26
|
getToken
|
|
34
27
|
}: SyncConvexAuthForStartLoaderOptions) => Promise<StartLoaderAuthState>;
|
|
35
|
-
declare const convexBetterAuthReactStart: (opts: ConvexBetterAuthReactStartOptions) => {
|
|
36
|
-
getToken: () => Promise<string | undefined>;
|
|
37
|
-
handler: (request: Request) => Promise<Response>;
|
|
38
|
-
fetchAuthQuery: <Query extends FunctionReference<"query">>(query: Query, ...args: OptionalRestArgs<Query>) => Promise<FunctionReturnType<Query>>;
|
|
39
|
-
fetchAuthMutation: <Mutation extends FunctionReference<"mutation">>(mutation: Mutation, ...args: OptionalRestArgs<Mutation>) => Promise<FunctionReturnType<Mutation>>;
|
|
40
|
-
fetchAuthAction: <Action extends FunctionReference<"action">>(action: Action, ...args: OptionalRestArgs<Action>) => Promise<FunctionReturnType<Action>>;
|
|
41
|
-
};
|
|
42
28
|
//#endregion
|
|
43
|
-
export { MaybePromise, StartLoaderAuthClient, StartLoaderAuthState, StartLoaderAuthTarget, StartLoaderConvexQueryClient, StartLoaderServerHttpClient, SyncConvexAuthForStartLoaderOptions,
|
|
29
|
+
export { MaybePromise, StartLoaderAuthClient, StartLoaderAuthState, StartLoaderAuthTarget, StartLoaderConvexQueryClient, StartLoaderServerHttpClient, SyncConvexAuthForStartLoaderOptions, syncConvexAuthForStartLoader };
|
package/dist/auth/start/index.js
CHANGED
|
@@ -1,13 +1,4 @@
|
|
|
1
|
-
import { t as getToken } from "../../token-oA2EMtPA.js";
|
|
2
|
-
import { stripIndent } from "common-tags";
|
|
3
|
-
import { ConvexHttpClient } from "convex/browser";
|
|
4
|
-
import React from "react";
|
|
5
|
-
|
|
6
1
|
//#region src/auth-start/index.ts
|
|
7
|
-
const fallbackCache = (fn) => fn;
|
|
8
|
-
const cache = React.cache ?? fallbackCache;
|
|
9
|
-
const TANSTACK_REACT_START_SERVER = "@tanstack/react-start/server";
|
|
10
|
-
const TRAILING_COLON_RE = /:$/;
|
|
11
2
|
const startLoaderAuthTokens = /* @__PURE__ */ new WeakMap();
|
|
12
3
|
const isStartLoaderConvexQueryClient = (target) => "convexClient" in target;
|
|
13
4
|
const syncConvexAuthForStartLoader = async ({ convex, getToken }) => {
|
|
@@ -34,120 +25,6 @@ const syncConvexAuthForStartLoader = async ({ convex, getToken }) => {
|
|
|
34
25
|
token
|
|
35
26
|
};
|
|
36
27
|
};
|
|
37
|
-
function setupClient(options) {
|
|
38
|
-
const client = new ConvexHttpClient(options.convexUrl);
|
|
39
|
-
if (options.token !== void 0) client.setAuth(options.token);
|
|
40
|
-
client.setFetchOptions?.({ cache: "no-store" });
|
|
41
|
-
return client;
|
|
42
|
-
}
|
|
43
|
-
const parseConvexSiteUrl = (url) => {
|
|
44
|
-
if (!url) throw new Error(stripIndent`
|
|
45
|
-
CONVEX_SITE_URL is not set.
|
|
46
|
-
This is automatically set in the Convex backend, but must be set in the TanStack Start environment.
|
|
47
|
-
For local development, this can be set in the .env.local file.
|
|
48
|
-
`);
|
|
49
|
-
if (url.endsWith(".convex.cloud")) throw new Error(stripIndent`
|
|
50
|
-
CONVEX_SITE_URL should be set to your Convex Site URL, which ends in .convex.site.
|
|
51
|
-
Currently set to ${url}.
|
|
52
|
-
`);
|
|
53
|
-
return url;
|
|
54
|
-
};
|
|
55
|
-
const appendSetCookieHeaders = (target, source) => {
|
|
56
|
-
const getSetCookie = source.getSetCookie;
|
|
57
|
-
if (typeof getSetCookie === "function") {
|
|
58
|
-
const values = getSetCookie.call(source);
|
|
59
|
-
for (const value of values) target.append("set-cookie", value);
|
|
60
|
-
return;
|
|
61
|
-
}
|
|
62
|
-
const value = source.get("set-cookie");
|
|
63
|
-
if (value) target.append("set-cookie", value);
|
|
64
|
-
};
|
|
65
|
-
const cloneAuthHandlerResponse = (response) => {
|
|
66
|
-
const headers = new Headers();
|
|
67
|
-
for (const [key, value] of response.headers.entries()) {
|
|
68
|
-
if (key.toLowerCase() === "set-cookie") continue;
|
|
69
|
-
headers.append(key, value);
|
|
70
|
-
}
|
|
71
|
-
appendSetCookieHeaders(headers, response.headers);
|
|
72
|
-
return new Response(response.body, {
|
|
73
|
-
headers,
|
|
74
|
-
status: response.status,
|
|
75
|
-
statusText: response.statusText
|
|
76
|
-
});
|
|
77
|
-
};
|
|
78
|
-
const handler = (request, opts) => {
|
|
79
|
-
const requestUrl = new URL(request.url);
|
|
80
|
-
const nextUrl = `${opts.convexSiteUrl}${requestUrl.pathname}${requestUrl.search}`;
|
|
81
|
-
const headers = new Headers(request.headers);
|
|
82
|
-
const proto = requestUrl.protocol.replace(TRAILING_COLON_RE, "");
|
|
83
|
-
headers.set("accept-encoding", "application/json");
|
|
84
|
-
headers.set("host", new URL(opts.convexSiteUrl).host);
|
|
85
|
-
headers.set("x-forwarded-host", requestUrl.host);
|
|
86
|
-
headers.set("x-forwarded-proto", proto);
|
|
87
|
-
headers.set("x-better-auth-forwarded-host", requestUrl.host);
|
|
88
|
-
headers.set("x-better-auth-forwarded-proto", proto);
|
|
89
|
-
return fetch(nextUrl, {
|
|
90
|
-
body: request.method !== "GET" && request.method !== "HEAD" ? request.body : void 0,
|
|
91
|
-
duplex: "half",
|
|
92
|
-
headers,
|
|
93
|
-
method: request.method,
|
|
94
|
-
redirect: "manual"
|
|
95
|
-
});
|
|
96
|
-
};
|
|
97
|
-
const convexBetterAuthReactStart = (opts) => {
|
|
98
|
-
const siteUrl = parseConvexSiteUrl(opts.convexSiteUrl);
|
|
99
|
-
const cachedGetToken = cache(async (opts) => {
|
|
100
|
-
const { getRequestHeaders } = await import(TANSTACK_REACT_START_SERVER);
|
|
101
|
-
const headers = getRequestHeaders();
|
|
102
|
-
const mutableHeaders = new Headers(headers);
|
|
103
|
-
mutableHeaders.delete("content-length");
|
|
104
|
-
mutableHeaders.delete("transfer-encoding");
|
|
105
|
-
mutableHeaders.set("accept-encoding", "identity");
|
|
106
|
-
return getToken(siteUrl, mutableHeaders, opts);
|
|
107
|
-
});
|
|
108
|
-
const callWithToken = async (fn) => {
|
|
109
|
-
const token = await cachedGetToken(opts) ?? {};
|
|
110
|
-
try {
|
|
111
|
-
return await fn(token?.token);
|
|
112
|
-
} catch (error) {
|
|
113
|
-
if (!opts?.jwtCache?.enabled || token.isFresh || !opts.jwtCache?.isAuthError(error)) throw error;
|
|
114
|
-
return await fn((await cachedGetToken({
|
|
115
|
-
...opts,
|
|
116
|
-
forceRefresh: true
|
|
117
|
-
})).token);
|
|
118
|
-
}
|
|
119
|
-
};
|
|
120
|
-
return {
|
|
121
|
-
getToken: async () => {
|
|
122
|
-
return (await cachedGetToken(opts)).token;
|
|
123
|
-
},
|
|
124
|
-
handler: async (request) => cloneAuthHandlerResponse(await handler(request, opts)),
|
|
125
|
-
fetchAuthQuery: async (query, ...args) => {
|
|
126
|
-
return callWithToken((token) => {
|
|
127
|
-
return setupClient({
|
|
128
|
-
...opts,
|
|
129
|
-
token
|
|
130
|
-
}).query(query, ...args);
|
|
131
|
-
});
|
|
132
|
-
},
|
|
133
|
-
fetchAuthMutation: async (mutation, ...args) => {
|
|
134
|
-
return callWithToken((token) => {
|
|
135
|
-
return setupClient({
|
|
136
|
-
...opts,
|
|
137
|
-
token
|
|
138
|
-
}).mutation(mutation, ...args);
|
|
139
|
-
});
|
|
140
|
-
},
|
|
141
|
-
fetchAuthAction: async (action, ...args) => {
|
|
142
|
-
return callWithToken((token) => {
|
|
143
|
-
return setupClient({
|
|
144
|
-
...opts,
|
|
145
|
-
token
|
|
146
|
-
}).action(action, ...args);
|
|
147
|
-
});
|
|
148
|
-
}
|
|
149
|
-
};
|
|
150
|
-
};
|
|
151
28
|
|
|
152
29
|
//#endregion
|
|
153
|
-
export {
|
|
30
|
+
export { syncConvexAuthForStartLoader };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { t as GetTokenOptions } from "../../../token-B9Bjcqug.js";
|
|
2
|
+
import { FunctionReference, FunctionReturnType, OptionalRestArgs } from "convex/server";
|
|
3
|
+
|
|
4
|
+
//#region src/auth-start/server.d.ts
|
|
5
|
+
type ConvexBetterAuthReactStartOptions = Omit<GetTokenOptions, 'forceRefresh'> & {
|
|
6
|
+
convexSiteUrl: string;
|
|
7
|
+
convexUrl: string;
|
|
8
|
+
};
|
|
9
|
+
declare const convexBetterAuthReactStart: (opts: ConvexBetterAuthReactStartOptions) => {
|
|
10
|
+
getToken: () => Promise<string | undefined>;
|
|
11
|
+
handler: (request: Request) => Promise<Response>;
|
|
12
|
+
fetchAuthQuery: <Query extends FunctionReference<"query">>(query: Query, ...args: OptionalRestArgs<Query>) => Promise<FunctionReturnType<Query>>;
|
|
13
|
+
fetchAuthMutation: <Mutation extends FunctionReference<"mutation">>(mutation: Mutation, ...args: OptionalRestArgs<Mutation>) => Promise<FunctionReturnType<Mutation>>;
|
|
14
|
+
fetchAuthAction: <Action extends FunctionReference<"action">>(action: Action, ...args: OptionalRestArgs<Action>) => Promise<FunctionReturnType<Action>>;
|
|
15
|
+
};
|
|
16
|
+
//#endregion
|
|
17
|
+
export { convexBetterAuthReactStart };
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { t as getToken } from "../../../token-oA2EMtPA.js";
|
|
2
|
+
import { stripIndent } from "common-tags";
|
|
3
|
+
import { getRequestHeaders } from "@tanstack/react-start/server";
|
|
4
|
+
import { ConvexHttpClient } from "convex/browser";
|
|
5
|
+
import React from "react";
|
|
6
|
+
|
|
7
|
+
//#region src/auth-start/server.ts
|
|
8
|
+
const fallbackCache = (fn) => fn;
|
|
9
|
+
const cache = React.cache ?? fallbackCache;
|
|
10
|
+
const TRAILING_COLON_RE = /:$/;
|
|
11
|
+
function setupClient(options) {
|
|
12
|
+
const client = new ConvexHttpClient(options.convexUrl);
|
|
13
|
+
if (options.token !== void 0) client.setAuth(options.token);
|
|
14
|
+
client.setFetchOptions?.({ cache: "no-store" });
|
|
15
|
+
return client;
|
|
16
|
+
}
|
|
17
|
+
const parseConvexSiteUrl = (url) => {
|
|
18
|
+
if (!url) throw new Error(stripIndent`
|
|
19
|
+
CONVEX_SITE_URL is not set.
|
|
20
|
+
This is automatically set in the Convex backend, but must be set in the TanStack Start environment.
|
|
21
|
+
For local development, this can be set in the .env.local file.
|
|
22
|
+
`);
|
|
23
|
+
if (url.endsWith(".convex.cloud")) throw new Error(stripIndent`
|
|
24
|
+
CONVEX_SITE_URL should be set to your Convex Site URL, which ends in .convex.site.
|
|
25
|
+
Currently set to ${url}.
|
|
26
|
+
`);
|
|
27
|
+
return url;
|
|
28
|
+
};
|
|
29
|
+
const appendSetCookieHeaders = (target, source) => {
|
|
30
|
+
const getSetCookie = source.getSetCookie;
|
|
31
|
+
if (typeof getSetCookie === "function") {
|
|
32
|
+
const values = getSetCookie.call(source);
|
|
33
|
+
for (const value of values) target.append("set-cookie", value);
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
const value = source.get("set-cookie");
|
|
37
|
+
if (value) target.append("set-cookie", value);
|
|
38
|
+
};
|
|
39
|
+
const cloneAuthHandlerResponse = (response) => {
|
|
40
|
+
const headers = new Headers();
|
|
41
|
+
for (const [key, value] of response.headers.entries()) {
|
|
42
|
+
if (key.toLowerCase() === "set-cookie") continue;
|
|
43
|
+
headers.append(key, value);
|
|
44
|
+
}
|
|
45
|
+
appendSetCookieHeaders(headers, response.headers);
|
|
46
|
+
return new Response(response.body, {
|
|
47
|
+
headers,
|
|
48
|
+
status: response.status,
|
|
49
|
+
statusText: response.statusText
|
|
50
|
+
});
|
|
51
|
+
};
|
|
52
|
+
const handler = (request, opts) => {
|
|
53
|
+
const requestUrl = new URL(request.url);
|
|
54
|
+
const nextUrl = `${opts.convexSiteUrl}${requestUrl.pathname}${requestUrl.search}`;
|
|
55
|
+
const headers = new Headers(request.headers);
|
|
56
|
+
const proto = requestUrl.protocol.replace(TRAILING_COLON_RE, "");
|
|
57
|
+
headers.set("accept-encoding", "application/json");
|
|
58
|
+
headers.set("host", new URL(opts.convexSiteUrl).host);
|
|
59
|
+
headers.set("x-forwarded-host", requestUrl.host);
|
|
60
|
+
headers.set("x-forwarded-proto", proto);
|
|
61
|
+
headers.set("x-better-auth-forwarded-host", requestUrl.host);
|
|
62
|
+
headers.set("x-better-auth-forwarded-proto", proto);
|
|
63
|
+
return fetch(nextUrl, {
|
|
64
|
+
body: request.method !== "GET" && request.method !== "HEAD" ? request.body : void 0,
|
|
65
|
+
duplex: "half",
|
|
66
|
+
headers,
|
|
67
|
+
method: request.method,
|
|
68
|
+
redirect: "manual"
|
|
69
|
+
});
|
|
70
|
+
};
|
|
71
|
+
const convexBetterAuthReactStart = (opts) => {
|
|
72
|
+
const siteUrl = parseConvexSiteUrl(opts.convexSiteUrl);
|
|
73
|
+
const cachedGetToken = cache(async (opts) => {
|
|
74
|
+
const headers = getRequestHeaders();
|
|
75
|
+
const mutableHeaders = new Headers(headers);
|
|
76
|
+
mutableHeaders.delete("content-length");
|
|
77
|
+
mutableHeaders.delete("transfer-encoding");
|
|
78
|
+
mutableHeaders.set("accept-encoding", "identity");
|
|
79
|
+
return getToken(siteUrl, mutableHeaders, opts);
|
|
80
|
+
});
|
|
81
|
+
const callWithToken = async (fn) => {
|
|
82
|
+
const token = await cachedGetToken(opts) ?? {};
|
|
83
|
+
try {
|
|
84
|
+
return await fn(token?.token);
|
|
85
|
+
} catch (error) {
|
|
86
|
+
if (!opts?.jwtCache?.enabled || token.isFresh || !opts.jwtCache?.isAuthError(error)) throw error;
|
|
87
|
+
return await fn((await cachedGetToken({
|
|
88
|
+
...opts,
|
|
89
|
+
forceRefresh: true
|
|
90
|
+
})).token);
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
return {
|
|
94
|
+
getToken: async () => {
|
|
95
|
+
return (await cachedGetToken(opts)).token;
|
|
96
|
+
},
|
|
97
|
+
handler: async (request) => cloneAuthHandlerResponse(await handler(request, opts)),
|
|
98
|
+
fetchAuthQuery: async (query, ...args) => {
|
|
99
|
+
return callWithToken((token) => {
|
|
100
|
+
return setupClient({
|
|
101
|
+
...opts,
|
|
102
|
+
token
|
|
103
|
+
}).query(query, ...args);
|
|
104
|
+
});
|
|
105
|
+
},
|
|
106
|
+
fetchAuthMutation: async (mutation, ...args) => {
|
|
107
|
+
return callWithToken((token) => {
|
|
108
|
+
return setupClient({
|
|
109
|
+
...opts,
|
|
110
|
+
token
|
|
111
|
+
}).mutation(mutation, ...args);
|
|
112
|
+
});
|
|
113
|
+
},
|
|
114
|
+
fetchAuthAction: async (action, ...args) => {
|
|
115
|
+
return callWithToken((token) => {
|
|
116
|
+
return setupClient({
|
|
117
|
+
...opts,
|
|
118
|
+
token
|
|
119
|
+
}).action(action, ...args);
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
};
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
//#endregion
|
|
126
|
+
export { convexBetterAuthReactStart };
|
|
@@ -9569,7 +9569,7 @@ export const Route = createFileRoute('/api/auth/$')({
|
|
|
9569
9569
|
|
|
9570
9570
|
//#endregion
|
|
9571
9571
|
//#region src/cli/registry/items/auth/auth-start-server.template.ts
|
|
9572
|
-
const AUTH_START_SERVER_TEMPLATE = `import { convexBetterAuthReactStart } from 'kitcn/auth/start';
|
|
9572
|
+
const AUTH_START_SERVER_TEMPLATE = `import { convexBetterAuthReactStart } from 'kitcn/auth/start/server';
|
|
9573
9573
|
|
|
9574
9574
|
export const {
|
|
9575
9575
|
handler,
|
package/dist/cli.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { $ as promptForScaffoldTemplateSelection, A as resolveCodegenTrimSegments, At as highlighter, B as runConfiguredCodegen, C as isEntryPoint, Ct as formatDependencyInstallCommand, D as parseInitCommandArgs, E as parseBackendRunJson, Et as stripConvexCommandNoise, F as resolveRunDeps, G as runMigrationFlow, H as runDevSchemaBackfillIfNeeded, I as runAfterScaffoldScript, J as withWorkingDirectory, K as trackProcess, L as runAggregateBackfillFlow, M as resolveDocTopic, N as resolveInitProjectDir, O as readPackageVersions, P as resolveMigrationConfig, Q as promptForPluginSelection, R as runAggregatePruneFlow, S as isConvexDevPreRunConflictFlag, St as detectPackageManager, T as parseArgs, Tt as serializeEnvValue, U as runInitCommandFlow, V as runConvexInitIfNeeded, W as runMigrationCreate, X as collectPluginScaffoldTemplates, Y as createSpinner, Z as filterScaffoldTemplatePathMap, _ as formatInfoOutput, _t as applyPlanningDependencyInstall, a as cleanup, at as getPluginCatalogEntry, b as getDevAggregateBackfillStatePath, bt as resolveSupportedDependencyWarnings, c as createCommandEnv, ct as buildPluginInstallPlan, d as extractBackfillCliOptions, dt as collectInstalledPluginKeys, et as resolveAddTemplateDefaults, f as extractConcaveRunTargetArgs, ft as getPluginLockfilePath, g as formatDocsOutput, gt as applyDependencyHintsInstall, h as extractResetCliOptions, ht as resolveSchemaInstalledPlugins, i as buildInitializationPlan, it as resolveTemplatesByIdOrThrow, j as resolveConfiguredBackend, k as resolveBackfillConfig, kt as logger, l as ensureConvexGitignoreEntry, lt as resolvePluginScaffoldRoots, m as extractMigrationDownOptions, mt as readPluginLockfile, n as applyPluginInstallPlanFiles, nt as resolvePresetScaffoldTemplates, o as createBackendAdapter, ot as getSupportedPluginKeys, p as extractMigrationCliOptions, pt as getSchemaFilePath, q as withLocalCodegenEnv, r as assertNoRemovedDevPreRunFlag, rt as resolveTemplateSelectionSource, s as createBackendCommandEnv, st as isSupportedPluginKey, t as applyDependencyInstallPlan, tt as resolvePluginPreset, u as extractBackendRunTargetArgs, ut as assertSchemaFileExists, v as getAggregateBackfillDeploymentKey, vt as applyPluginDependencyInstall, w as isInitialized, wt as resolveAuthEnvState, x as hasRemoteConvexDeploymentEnv, xt as resolveProjectScaffoldContext, y as getConvexDeploymentCommandEnv, yt as inspectPluginDependencyInstall, z as runBackendFunction } from "./backend-core-
|
|
2
|
+
import { $ as promptForScaffoldTemplateSelection, A as resolveCodegenTrimSegments, At as highlighter, B as runConfiguredCodegen, C as isEntryPoint, Ct as formatDependencyInstallCommand, D as parseInitCommandArgs, E as parseBackendRunJson, Et as stripConvexCommandNoise, F as resolveRunDeps, G as runMigrationFlow, H as runDevSchemaBackfillIfNeeded, I as runAfterScaffoldScript, J as withWorkingDirectory, K as trackProcess, L as runAggregateBackfillFlow, M as resolveDocTopic, N as resolveInitProjectDir, O as readPackageVersions, P as resolveMigrationConfig, Q as promptForPluginSelection, R as runAggregatePruneFlow, S as isConvexDevPreRunConflictFlag, St as detectPackageManager, T as parseArgs, Tt as serializeEnvValue, U as runInitCommandFlow, V as runConvexInitIfNeeded, W as runMigrationCreate, X as collectPluginScaffoldTemplates, Y as createSpinner, Z as filterScaffoldTemplatePathMap, _ as formatInfoOutput, _t as applyPlanningDependencyInstall, a as cleanup, at as getPluginCatalogEntry, b as getDevAggregateBackfillStatePath, bt as resolveSupportedDependencyWarnings, c as createCommandEnv, ct as buildPluginInstallPlan, d as extractBackfillCliOptions, dt as collectInstalledPluginKeys, et as resolveAddTemplateDefaults, f as extractConcaveRunTargetArgs, ft as getPluginLockfilePath, g as formatDocsOutput, gt as applyDependencyHintsInstall, h as extractResetCliOptions, ht as resolveSchemaInstalledPlugins, i as buildInitializationPlan, it as resolveTemplatesByIdOrThrow, j as resolveConfiguredBackend, k as resolveBackfillConfig, kt as logger, l as ensureConvexGitignoreEntry, lt as resolvePluginScaffoldRoots, m as extractMigrationDownOptions, mt as readPluginLockfile, n as applyPluginInstallPlanFiles, nt as resolvePresetScaffoldTemplates, o as createBackendAdapter, ot as getSupportedPluginKeys, p as extractMigrationCliOptions, pt as getSchemaFilePath, q as withLocalCodegenEnv, r as assertNoRemovedDevPreRunFlag, rt as resolveTemplateSelectionSource, s as createBackendCommandEnv, st as isSupportedPluginKey, t as applyDependencyInstallPlan, tt as resolvePluginPreset, u as extractBackendRunTargetArgs, ut as assertSchemaFileExists, v as getAggregateBackfillDeploymentKey, vt as applyPluginDependencyInstall, w as isInitialized, wt as resolveAuthEnvState, x as hasRemoteConvexDeploymentEnv, xt as resolveProjectScaffoldContext, y as getConvexDeploymentCommandEnv, yt as inspectPluginDependencyInstall, z as runBackendFunction } from "./backend-core-PsWKI66u.mjs";
|
|
3
3
|
import fs, { existsSync, readFileSync } from "node:fs";
|
|
4
4
|
import path, { delimiter, dirname, join, relative, resolve } from "node:path";
|
|
5
5
|
import { fileURLToPath } from "node:url";
|
package/dist/crpc/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { A as DataTransformer, F as decodeWire, I as defaultCRPCTransformer, L as encodeWire, M as WireCodec, N as createTaggedTransformer, O as CombinedDataTransformer, P as dateWireCodec, R as getTransformer, a as HttpProcedureCall, c as InferHttpInput, i as HttpErrorCode, j as DataTransformerOptions, k as DATE_CODEC_TAG, l as InferHttpOutput, n as HttpClientError, o as HttpRouteInfo, r as HttpClientFromRouter, s as HttpRouteMap, t as HttpClient, u as isHttpClientError, z as identityTransformer } from "../http-types-zsMHb_QN.js";
|
|
2
|
-
import { A as HttpInputArgs, C as ReservedMutationOptions, D as VanillaMutation, E as VanillaAction, F as replaceUrlParam, M as RESERVED_KEYS, N as buildSearchParams, O as HttpClientOptions, P as executeHttpRequest, S as ReservedInfiniteQueryOptions, T as StaticQueryOptsParam, _ as IsPaginated, a as BaseInfiniteQueryOptsParam, b as PaginatedFnMeta, c as ConvexMutationKey, d as ConvexQueryMeta, f as EmptyObject, g as InfiniteQueryInput, h as FnMeta, i as BaseConvexQueryOptions, j as HttpProxyBaseOptions, k as HttpFormValue, l as ConvexQueryHookOptions, m as FUNC_REF_SYMBOL, n as BaseConvexActionOptions, o as ConvexActionKey, p as ExtractPaginatedItem, r as BaseConvexInfiniteQueryOptions, s as ConvexInfiniteQueryMeta, t as AuthType, u as ConvexQueryKey, v as Meta, w as ReservedQueryOptions, x as PaginationOpts, y as MutationVariables } from "../types-
|
|
2
|
+
import { A as HttpInputArgs, C as ReservedMutationOptions, D as VanillaMutation, E as VanillaAction, F as replaceUrlParam, M as RESERVED_KEYS, N as buildSearchParams, O as HttpClientOptions, P as executeHttpRequest, S as ReservedInfiniteQueryOptions, T as StaticQueryOptsParam, _ as IsPaginated, a as BaseInfiniteQueryOptsParam, b as PaginatedFnMeta, c as ConvexMutationKey, d as ConvexQueryMeta, f as EmptyObject, g as InfiniteQueryInput, h as FnMeta, i as BaseConvexQueryOptions, j as HttpProxyBaseOptions, k as HttpFormValue, l as ConvexQueryHookOptions, m as FUNC_REF_SYMBOL, n as BaseConvexActionOptions, o as ConvexActionKey, p as ExtractPaginatedItem, r as BaseConvexInfiniteQueryOptions, s as ConvexInfiniteQueryMeta, t as AuthType, u as ConvexQueryKey, v as Meta, w as ReservedQueryOptions, x as PaginationOpts, y as MutationVariables } from "../types-jNTcza_a.js";
|
|
3
3
|
import { FunctionArgs, FunctionReference } from "convex/server";
|
|
4
4
|
|
|
5
5
|
//#region src/crpc/auth-error.d.ts
|
package/dist/{generated-contract-disabled-xOmfTKh8.d.ts → generated-contract-disabled-0xEF3NtW.d.ts}
RENAMED
|
@@ -173,18 +173,10 @@ declare const createApi: <Schema extends SchemaDefinition<any, any>, DataModel e
|
|
|
173
173
|
};
|
|
174
174
|
}, Promise<any>>;
|
|
175
175
|
deleteMany: convex_server0.RegisteredMutation<"internal", {
|
|
176
|
-
paginationOpts: {
|
|
177
|
-
id?: number;
|
|
178
|
-
endCursor?: string | null;
|
|
179
|
-
maximumRowsRead?: number;
|
|
180
|
-
maximumBytesRead?: number;
|
|
181
|
-
numItems: number;
|
|
182
|
-
cursor: string | null;
|
|
183
|
-
};
|
|
184
176
|
input: {
|
|
185
177
|
where?: {
|
|
186
|
-
operator?: "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | "in" | "not_in" | "contains" | "starts_with" | "ends_with" | undefined;
|
|
187
178
|
connector?: "AND" | "OR" | undefined;
|
|
179
|
+
operator?: "lt" | "lte" | "gt" | "gte" | "eq" | "in" | "not_in" | "ne" | "contains" | "starts_with" | "ends_with" | undefined;
|
|
188
180
|
value: string | number | boolean | string[] | number[] | null;
|
|
189
181
|
field: string;
|
|
190
182
|
}[] | undefined;
|
|
@@ -193,6 +185,14 @@ declare const createApi: <Schema extends SchemaDefinition<any, any>, DataModel e
|
|
|
193
185
|
where?: any[] | undefined;
|
|
194
186
|
model: string;
|
|
195
187
|
};
|
|
188
|
+
paginationOpts: {
|
|
189
|
+
id?: number;
|
|
190
|
+
endCursor?: string | null;
|
|
191
|
+
maximumRowsRead?: number;
|
|
192
|
+
maximumBytesRead?: number;
|
|
193
|
+
numItems: number;
|
|
194
|
+
cursor: string | null;
|
|
195
|
+
};
|
|
196
196
|
}, Promise<{
|
|
197
197
|
count: number;
|
|
198
198
|
ids: any[];
|
|
@@ -204,8 +204,8 @@ declare const createApi: <Schema extends SchemaDefinition<any, any>, DataModel e
|
|
|
204
204
|
deleteOne: convex_server0.RegisteredMutation<"internal", {
|
|
205
205
|
input: {
|
|
206
206
|
where?: {
|
|
207
|
-
operator?: "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | "in" | "not_in" | "contains" | "starts_with" | "ends_with" | undefined;
|
|
208
207
|
connector?: "AND" | "OR" | undefined;
|
|
208
|
+
operator?: "lt" | "lte" | "gt" | "gte" | "eq" | "in" | "not_in" | "ne" | "contains" | "starts_with" | "ends_with" | undefined;
|
|
209
209
|
value: string | number | boolean | string[] | number[] | null;
|
|
210
210
|
field: string;
|
|
211
211
|
}[] | undefined;
|
|
@@ -216,20 +216,21 @@ declare const createApi: <Schema extends SchemaDefinition<any, any>, DataModel e
|
|
|
216
216
|
};
|
|
217
217
|
}, Promise<Record<string, unknown> | undefined>>;
|
|
218
218
|
findMany: convex_server0.RegisteredQuery<"internal", {
|
|
219
|
-
limit?: number | undefined;
|
|
220
219
|
join?: any;
|
|
221
220
|
where?: {
|
|
222
221
|
mode?: "sensitive" | "insensitive" | undefined;
|
|
223
|
-
operator?: "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | "in" | "not_in" | "contains" | "starts_with" | "ends_with" | undefined;
|
|
224
222
|
connector?: "AND" | "OR" | undefined;
|
|
223
|
+
operator?: "lt" | "lte" | "gt" | "gte" | "eq" | "in" | "not_in" | "ne" | "contains" | "starts_with" | "ends_with" | undefined;
|
|
225
224
|
value: string | number | boolean | string[] | number[] | null;
|
|
226
225
|
field: string;
|
|
227
226
|
}[] | undefined;
|
|
227
|
+
limit?: number | undefined;
|
|
228
228
|
offset?: number | undefined;
|
|
229
229
|
sortBy?: {
|
|
230
230
|
field: string;
|
|
231
231
|
direction: "asc" | "desc";
|
|
232
232
|
} | undefined;
|
|
233
|
+
model: string;
|
|
233
234
|
paginationOpts: {
|
|
234
235
|
id?: number;
|
|
235
236
|
endCursor?: string | null;
|
|
@@ -238,48 +239,47 @@ declare const createApi: <Schema extends SchemaDefinition<any, any>, DataModel e
|
|
|
238
239
|
numItems: number;
|
|
239
240
|
cursor: string | null;
|
|
240
241
|
};
|
|
241
|
-
model: string;
|
|
242
242
|
}, Promise<convex_server0.PaginationResult<convex_server0.GenericDocument>>>;
|
|
243
243
|
findOne: convex_server0.RegisteredQuery<"internal", {
|
|
244
244
|
join?: any;
|
|
245
|
+
select?: string[] | undefined;
|
|
245
246
|
where?: {
|
|
246
247
|
mode?: "sensitive" | "insensitive" | undefined;
|
|
247
|
-
operator?: "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | "in" | "not_in" | "contains" | "starts_with" | "ends_with" | undefined;
|
|
248
248
|
connector?: "AND" | "OR" | undefined;
|
|
249
|
+
operator?: "lt" | "lte" | "gt" | "gte" | "eq" | "in" | "not_in" | "ne" | "contains" | "starts_with" | "ends_with" | undefined;
|
|
249
250
|
value: string | number | boolean | string[] | number[] | null;
|
|
250
251
|
field: string;
|
|
251
252
|
}[] | undefined;
|
|
252
|
-
select?: string[] | undefined;
|
|
253
253
|
model: string;
|
|
254
254
|
}, Promise<convex_server0.GenericDocument | null>>;
|
|
255
255
|
getLatestJwks: convex_server0.RegisteredAction<"internal", {}, Promise<unknown>>;
|
|
256
256
|
rotateKeys: convex_server0.RegisteredAction<"internal", {}, Promise<unknown>>;
|
|
257
257
|
updateMany: convex_server0.RegisteredMutation<"internal", {
|
|
258
|
-
paginationOpts: {
|
|
259
|
-
id?: number;
|
|
260
|
-
endCursor?: string | null;
|
|
261
|
-
maximumRowsRead?: number;
|
|
262
|
-
maximumBytesRead?: number;
|
|
263
|
-
numItems: number;
|
|
264
|
-
cursor: string | null;
|
|
265
|
-
};
|
|
266
258
|
input: {
|
|
267
259
|
where?: {
|
|
268
|
-
operator?: "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | "in" | "not_in" | "contains" | "starts_with" | "ends_with" | undefined;
|
|
269
260
|
connector?: "AND" | "OR" | undefined;
|
|
261
|
+
operator?: "lt" | "lte" | "gt" | "gte" | "eq" | "in" | "not_in" | "ne" | "contains" | "starts_with" | "ends_with" | undefined;
|
|
270
262
|
value: string | number | boolean | string[] | number[] | null;
|
|
271
263
|
field: string;
|
|
272
264
|
}[] | undefined;
|
|
265
|
+
model: string;
|
|
273
266
|
update: {
|
|
274
267
|
[x: string]: unknown;
|
|
275
268
|
[x: number]: unknown;
|
|
276
269
|
[x: symbol]: unknown;
|
|
277
270
|
};
|
|
278
|
-
model: string;
|
|
279
271
|
} | {
|
|
280
272
|
where?: any[] | undefined;
|
|
281
|
-
update: any;
|
|
282
273
|
model: string;
|
|
274
|
+
update: any;
|
|
275
|
+
};
|
|
276
|
+
paginationOpts: {
|
|
277
|
+
id?: number;
|
|
278
|
+
endCursor?: string | null;
|
|
279
|
+
maximumRowsRead?: number;
|
|
280
|
+
maximumBytesRead?: number;
|
|
281
|
+
numItems: number;
|
|
282
|
+
cursor: string | null;
|
|
283
283
|
};
|
|
284
284
|
}, Promise<{
|
|
285
285
|
count: number;
|
|
@@ -292,21 +292,21 @@ declare const createApi: <Schema extends SchemaDefinition<any, any>, DataModel e
|
|
|
292
292
|
updateOne: convex_server0.RegisteredMutation<"internal", {
|
|
293
293
|
input: {
|
|
294
294
|
where?: {
|
|
295
|
-
operator?: "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | "in" | "not_in" | "contains" | "starts_with" | "ends_with" | undefined;
|
|
296
295
|
connector?: "AND" | "OR" | undefined;
|
|
296
|
+
operator?: "lt" | "lte" | "gt" | "gte" | "eq" | "in" | "not_in" | "ne" | "contains" | "starts_with" | "ends_with" | undefined;
|
|
297
297
|
value: string | number | boolean | string[] | number[] | null;
|
|
298
298
|
field: string;
|
|
299
299
|
}[] | undefined;
|
|
300
|
+
model: string;
|
|
300
301
|
update: {
|
|
301
302
|
[x: string]: unknown;
|
|
302
303
|
[x: number]: unknown;
|
|
303
304
|
[x: symbol]: unknown;
|
|
304
305
|
};
|
|
305
|
-
model: string;
|
|
306
306
|
} | {
|
|
307
307
|
where?: any[] | undefined;
|
|
308
|
-
update: any;
|
|
309
308
|
model: string;
|
|
309
|
+
update: any;
|
|
310
310
|
};
|
|
311
311
|
}, Promise<any>>;
|
|
312
312
|
};
|
package/dist/orm/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as GenericOrmCtx$1, $n as unique, $r as endsWith, $t as ManyConfig, A as ConvexDateMode, An as ConvexRankIndexBuilder, Ar as ReturningResult, At as MigrationManifestEntry, B as ConvexBytesBuilderInitial, Bn as rankIndex, Br as OrmSchemaRelations, Bt as defineMigration, C as ConvexNumberBuilderInitial, Ci as ColumnBuilderWithTableName, Cn as RlsRole, Cr as MutationReturning, Ct as MigrationStatusArgs, D as id, Di as IsPrimaryKey, Dn as ConvexAggregateIndexBuilderOn, Dr as PaginatedResult, Dt as MigrationDoc, E as ConvexIdBuilderInitial, Ei as HasDefault, En as ConvexAggregateIndexBuilder, Er as OrderDirection, Et as MigrationDirection, F as custom, Fn as ConvexVectorIndexBuilder, Fr as unsetToken, Ft as MigrationStateMap, G as ConvexBigIntBuilder, Gn as ConvexCheckConfig, Gr as ExpressionVisitor, Gt as OrmReader$1, H as ConvexBooleanBuilder, Hn as uniqueIndex, Hr as TableName, Ht as detectMigrationDrift, I as json, In as ConvexVectorIndexBuilderOn, Ir as Brand, It as MigrationStep, J as CountBackfillChunkArgs, Jn as ConvexUniqueConstraintBuilder, Jr as LogicalExpression, Jt as RlsMode, K as ConvexBigIntBuilderInitial, Kn as ConvexForeignKeyBuilder, Kr as FieldReference, Kt as OrmWriter$1, L as objectOf, Ln as ConvexVectorIndexConfig, Lr as Columns, Lt as MigrationTableName, M as ConvexCustomBuilder, Mn as ConvexSearchIndexBuilder, Mr as UpdateSet, Mt as MigrationPlan, N as ConvexCustomBuilderInitial, Nn as ConvexSearchIndexBuilderOn, Nr as VectorQueryConfig, Nt as MigrationRunStatus, O as ConvexDateBuilder, Oi as IsUnique, On as ConvexIndexBuilder, Or as PredicateWhereIndexConfig, Ot as MigrationDocContext, P as arrayOf, Pn as ConvexSearchIndexConfig, Pr as VectorSearchProvider, Pt as MigrationSet, Q as GenericOrm$1, Qn as foreignKey, Qr as contains, Qt as ExtractTablesWithRelations, R as unionOf, Rn as aggregateIndex, Rr as OrmSchemaExtensionTables, Rt as MigrationWriteMode, S as ConvexNumberBuilder, Si as ColumnBuilderTypeConfig, Sn as rlsPolicy, Sr as MutationResult, St as MigrationRunChunkArgs, T as ConvexIdBuilder, Ti as DrizzleEntity, Tn as rlsRole, Tr as OrderByClause, Tt as MigrationDefinition, U as ConvexBooleanBuilderInitial, Un as vectorIndex, Ur as SystemFields, Ut as DatabaseWithMutations, V as bytes, Vn as searchIndex, Vr as OrmSchemaTriggers, Vt as defineMigrationSet, W as boolean, Wn as ConvexCheckBuilder, Wr as BinaryExpression, Wt as DatabaseWithQuery, X as CountBackfillStatusArgs, Xn as ConvexUniqueConstraintConfig, Xr as and, Xt as extractRelationsConfig, Y as CountBackfillKickoffArgs, Yn as ConvexUniqueConstraintBuilderOn, Yr as UnaryExpression, Yt as EdgeMetadata, Z as CreateOrmOptions, Zn as check, Zr as between, Zt as ExtractTablesFromSchema, _ as ConvexTimestampMode, _i as startsWith, _n as deletion, _r as MutationExecuteConfig, _t as OrmTriggerContext, a as requireSchemaRelations, ai as inArray, an as TablesRelationalConfig, ar as AggregateResult, at as OrmWriterCtx, b as ConvexTextEnumBuilderInitial, bi as ColumnBuilderBaseConfig, bn as RlsPolicyConfig, br as MutationPaginateConfig, bt as MigrationCancelArgs, c as TableConfigResult, ci as isNull, cn as ConvexDeletionBuilder, cr as CountConfig, ct as ScheduledMutationBatchArgs, d as OrmNotFoundError, di as lte, dn as ConvexTableWithColumns, dr as FilterOperators, dt as scheduledDeleteFactory, ei as eq, en as OneConfig, er as ConvexTextBuilder, et as OrmApiResult, f as ConvexVectorBuilder, fi as ne, fn as DiscriminatorBuilderConfig, fr as GetColumnData, ft as SchemaExtension, g as ConvexTimestampBuilderInitial, gi as or, gn as convexTable, gr as InsertValue, gt as OrmTriggerChange, h as ConvexTimestampBuilder, hi as notInArray, hn as TableConfig, hr as InferSelectModel, ht as OrmTableTriggers, i as getSchemaTriggers, ii as ilike, in as TableRelationalConfig, ir as AggregateFieldValue, it as OrmReaderCtx, j as date, jn as ConvexRankIndexBuilderOn, jr as ReturningSelection, jt as MigrationMigrateOne, k as ConvexDateBuilderInitial, ki as NotNull, kn as ConvexIndexBuilderOn, kr as ReturningAll, kt as MigrationDriftIssue, l as getTableColumns, li as like, ln as ConvexDeletionConfig, lr as CountResult, lt as scheduledMutationBatchFactory, m as vector, mi as notBetween, mn as OrmLifecycleOperation, mr as InferModelFromColumns, mt as OrmBeforeResult, n as defineSchema, ni as gt, nn as RelationsBuilderColumnBase, nr as text, nt as OrmClientWithApi$1, o as asc, oi as isFieldReference, on as defineRelations, or as BuildQueryResult, ot as ResolveOrmSchema, p as ConvexVectorBuilderInitial, pi as not, pn as OrmLifecycleChange, pr as InferInsertModel, pt as defineSchemaExtension, q as bigint, qn as ConvexForeignKeyConfig, qr as FilterExpression, qt as RlsContext, r as getSchemaRelations, ri as gte, rn as RelationsBuilderColumnConfig, rr as AggregateConfig, rt as OrmFunctions, s as desc, si as isNotNull, sn as defineRelationsPart, sr as BuildRelationResult, st as createOrm, t as WhereClauseResult, ti as fieldRef, tn as RelationsBuilder, tr as ConvexTextBuilderInitial, tt as OrmClientBase$1, u as getTableConfig, ui as lt, un as ConvexTable, ur as DBQueryConfig, ut as ScheduledDeleteArgs, v as timestamp, vi as AnyColumn, vn as discriminator, vr as MutationExecuteResult, vt as OrmTriggers, w as integer, wi as ColumnDataType, wn as RlsRoleConfig, wr as MutationRunMode, wt as MigrationAppliedState, x as textEnum, xi as ColumnBuilderRuntimeConfig, xn as RlsPolicyToOption, xr as MutationPaginatedResult, xt as MigrationRunArgs, y as ConvexTextEnumBuilder, yi as ColumnBuilder, yn as RlsPolicy, yr as MutationExecutionMode, yt as defineTriggers, z as ConvexBytesBuilder, zn as index, zr as OrmSchemaExtensions, zt as buildMigrationPlan } from "../where-clause-compiler-
|
|
1
|
+
import { $ as GenericOrmCtx$1, $n as unique, $r as endsWith, $t as ManyConfig, A as ConvexDateMode, An as ConvexRankIndexBuilder, Ar as ReturningResult, At as MigrationManifestEntry, B as ConvexBytesBuilderInitial, Bn as rankIndex, Br as OrmSchemaRelations, Bt as defineMigration, C as ConvexNumberBuilderInitial, Ci as ColumnBuilderWithTableName, Cn as RlsRole, Cr as MutationReturning, Ct as MigrationStatusArgs, D as id, Di as IsPrimaryKey, Dn as ConvexAggregateIndexBuilderOn, Dr as PaginatedResult, Dt as MigrationDoc, E as ConvexIdBuilderInitial, Ei as HasDefault, En as ConvexAggregateIndexBuilder, Er as OrderDirection, Et as MigrationDirection, F as custom, Fn as ConvexVectorIndexBuilder, Fr as unsetToken, Ft as MigrationStateMap, G as ConvexBigIntBuilder, Gn as ConvexCheckConfig, Gr as ExpressionVisitor, Gt as OrmReader$1, H as ConvexBooleanBuilder, Hn as uniqueIndex, Hr as TableName, Ht as detectMigrationDrift, I as json, In as ConvexVectorIndexBuilderOn, Ir as Brand, It as MigrationStep, J as CountBackfillChunkArgs, Jn as ConvexUniqueConstraintBuilder, Jr as LogicalExpression, Jt as RlsMode, K as ConvexBigIntBuilderInitial, Kn as ConvexForeignKeyBuilder, Kr as FieldReference, Kt as OrmWriter$1, L as objectOf, Ln as ConvexVectorIndexConfig, Lr as Columns, Lt as MigrationTableName, M as ConvexCustomBuilder, Mn as ConvexSearchIndexBuilder, Mr as UpdateSet, Mt as MigrationPlan, N as ConvexCustomBuilderInitial, Nn as ConvexSearchIndexBuilderOn, Nr as VectorQueryConfig, Nt as MigrationRunStatus, O as ConvexDateBuilder, Oi as IsUnique, On as ConvexIndexBuilder, Or as PredicateWhereIndexConfig, Ot as MigrationDocContext, P as arrayOf, Pn as ConvexSearchIndexConfig, Pr as VectorSearchProvider, Pt as MigrationSet, Q as GenericOrm$1, Qn as foreignKey, Qr as contains, Qt as ExtractTablesWithRelations, R as unionOf, Rn as aggregateIndex, Rr as OrmSchemaExtensionTables, Rt as MigrationWriteMode, S as ConvexNumberBuilder, Si as ColumnBuilderTypeConfig, Sn as rlsPolicy, Sr as MutationResult, St as MigrationRunChunkArgs, T as ConvexIdBuilder, Ti as DrizzleEntity, Tn as rlsRole, Tr as OrderByClause, Tt as MigrationDefinition, U as ConvexBooleanBuilderInitial, Un as vectorIndex, Ur as SystemFields, Ut as DatabaseWithMutations, V as bytes, Vn as searchIndex, Vr as OrmSchemaTriggers, Vt as defineMigrationSet, W as boolean, Wn as ConvexCheckBuilder, Wr as BinaryExpression, Wt as DatabaseWithQuery, X as CountBackfillStatusArgs, Xn as ConvexUniqueConstraintConfig, Xr as and, Xt as extractRelationsConfig, Y as CountBackfillKickoffArgs, Yn as ConvexUniqueConstraintBuilderOn, Yr as UnaryExpression, Yt as EdgeMetadata, Z as CreateOrmOptions, Zn as check, Zr as between, Zt as ExtractTablesFromSchema, _ as ConvexTimestampMode, _i as startsWith, _n as deletion, _r as MutationExecuteConfig, _t as OrmTriggerContext, a as requireSchemaRelations, ai as inArray, an as TablesRelationalConfig, ar as AggregateResult, at as OrmWriterCtx, b as ConvexTextEnumBuilderInitial, bi as ColumnBuilderBaseConfig, bn as RlsPolicyConfig, br as MutationPaginateConfig, bt as MigrationCancelArgs, c as TableConfigResult, ci as isNull, cn as ConvexDeletionBuilder, cr as CountConfig, ct as ScheduledMutationBatchArgs, d as OrmNotFoundError, di as lte, dn as ConvexTableWithColumns, dr as FilterOperators, dt as scheduledDeleteFactory, ei as eq, en as OneConfig, er as ConvexTextBuilder, et as OrmApiResult, f as ConvexVectorBuilder, fi as ne, fn as DiscriminatorBuilderConfig, fr as GetColumnData, ft as SchemaExtension, g as ConvexTimestampBuilderInitial, gi as or, gn as convexTable, gr as InsertValue, gt as OrmTriggerChange, h as ConvexTimestampBuilder, hi as notInArray, hn as TableConfig, hr as InferSelectModel, ht as OrmTableTriggers, i as getSchemaTriggers, ii as ilike, in as TableRelationalConfig, ir as AggregateFieldValue, it as OrmReaderCtx, j as date, jn as ConvexRankIndexBuilderOn, jr as ReturningSelection, jt as MigrationMigrateOne, k as ConvexDateBuilderInitial, ki as NotNull, kn as ConvexIndexBuilderOn, kr as ReturningAll, kt as MigrationDriftIssue, l as getTableColumns, li as like, ln as ConvexDeletionConfig, lr as CountResult, lt as scheduledMutationBatchFactory, m as vector, mi as notBetween, mn as OrmLifecycleOperation, mr as InferModelFromColumns, mt as OrmBeforeResult, n as defineSchema, ni as gt, nn as RelationsBuilderColumnBase, nr as text, nt as OrmClientWithApi$1, o as asc, oi as isFieldReference, on as defineRelations, or as BuildQueryResult, ot as ResolveOrmSchema, p as ConvexVectorBuilderInitial, pi as not, pn as OrmLifecycleChange, pr as InferInsertModel, pt as defineSchemaExtension, q as bigint, qn as ConvexForeignKeyConfig, qr as FilterExpression, qt as RlsContext, r as getSchemaRelations, ri as gte, rn as RelationsBuilderColumnConfig, rr as AggregateConfig, rt as OrmFunctions, s as desc, si as isNotNull, sn as defineRelationsPart, sr as BuildRelationResult, st as createOrm, t as WhereClauseResult, ti as fieldRef, tn as RelationsBuilder, tr as ConvexTextBuilderInitial, tt as OrmClientBase$1, u as getTableConfig, ui as lt, un as ConvexTable, ur as DBQueryConfig, ut as ScheduledDeleteArgs, v as timestamp, vi as AnyColumn, vn as discriminator, vr as MutationExecuteResult, vt as OrmTriggers, w as integer, wi as ColumnDataType, wn as RlsRoleConfig, wr as MutationRunMode, wt as MigrationAppliedState, x as textEnum, xi as ColumnBuilderRuntimeConfig, xn as RlsPolicyToOption, xr as MutationPaginatedResult, xt as MigrationRunArgs, y as ConvexTextEnumBuilder, yi as ColumnBuilder, yn as RlsPolicy, yr as MutationExecutionMode, yt as defineTriggers, z as ConvexBytesBuilder, zn as index, zr as OrmSchemaExtensions, zt as buildMigrationPlan } from "../where-clause-compiler-DcEhkJ12.js";
|
|
2
2
|
import { i as pretendRequired, n as deprecated, r as pretend } from "../validators-BhsByJeg.js";
|
|
3
3
|
import { a as QueryCtxWithPreferredOrmQueryTable, i as QueryCtxWithOrmQueryTable, n as LookupByIdResultByCtx, o as getByIdWithOrmQueryFallback, r as QueryCtxWithOptionalOrmQueryTable, t as DocByCtx } from "../query-context-CNo9ffvI.js";
|
|
4
4
|
import { DefineSchemaOptions, GenericDatabaseReader, GenericDatabaseWriter, GenericSchema, SchemaDefinition } from "convex/server";
|
package/dist/plugins/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as PluginConfigureResolver, i as PluginConfigureInput, n as PluginApiScope, o as definePlugin, r as PluginConfigureContext, s as resolvePluginOptions, t as Plugin } from "../middleware-
|
|
1
|
+
import { a as PluginConfigureResolver, i as PluginConfigureInput, n as PluginApiScope, o as definePlugin, r as PluginConfigureContext, s as resolvePluginOptions, t as Plugin } from "../middleware-Br5zubu7.js";
|
|
2
2
|
export { type Plugin, type PluginApiScope, type PluginConfigureContext, type PluginConfigureInput, type PluginConfigureResolver, definePlugin, resolvePluginOptions };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { o as MiddlewareBuilder } from "../types-CnTpHR1F.js";
|
|
2
|
-
import { t as Plugin } from "../middleware-
|
|
2
|
+
import { t as Plugin } from "../middleware-Br5zubu7.js";
|
|
3
3
|
import * as convex_server0 from "convex/server";
|
|
4
4
|
|
|
5
5
|
//#region src/ratelimit/duration.d.ts
|
package/dist/react/index.js
CHANGED
|
@@ -2136,8 +2136,9 @@ const getConvexQueryClientSingleton = ({ authStore, convex, queryClient, symbolK
|
|
|
2136
2136
|
transformer
|
|
2137
2137
|
});
|
|
2138
2138
|
else {
|
|
2139
|
-
if (globalStore[key])
|
|
2140
|
-
|
|
2139
|
+
if (globalStore[key]) {
|
|
2140
|
+
if (authStore !== void 0) globalStore[key].updateAuthStore(authStore);
|
|
2141
|
+
} else globalStore[key] = new ConvexQueryClient(convex, {
|
|
2141
2142
|
authStore,
|
|
2142
2143
|
unsubscribeDelay,
|
|
2143
2144
|
transformer
|
package/dist/rsc/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { n as DeepPartial, o as Simplify, r as DistributiveOmit } from "../types-DF2cg_w0.js";
|
|
2
2
|
import { C as HttpProcedure, d as CRPCHttpRouter, j as DataTransformerOptions, p as HttpRouterRecord } from "../http-types-zsMHb_QN.js";
|
|
3
3
|
import { g as UnsetMarker } from "../types-CnTpHR1F.js";
|
|
4
|
-
import { A as HttpInputArgs, C as ReservedMutationOptions$1, S as ReservedInfiniteQueryOptions, T as StaticQueryOptsParam, _ as IsPaginated, b as PaginatedFnMeta, c as ConvexMutationKey, d as ConvexQueryMeta, f as EmptyObject, g as InfiniteQueryInput, l as ConvexQueryHookOptions, m as FUNC_REF_SYMBOL, o as ConvexActionKey, p as ExtractPaginatedItem, s as ConvexInfiniteQueryMeta, u as ConvexQueryKey, w as ReservedQueryOptions$1, y as MutationVariables } from "../types-
|
|
4
|
+
import { A as HttpInputArgs, C as ReservedMutationOptions$1, S as ReservedInfiniteQueryOptions, T as StaticQueryOptsParam, _ as IsPaginated, b as PaginatedFnMeta, c as ConvexMutationKey, d as ConvexQueryMeta, f as EmptyObject, g as InfiniteQueryInput, l as ConvexQueryHookOptions, m as FUNC_REF_SYMBOL, o as ConvexActionKey, p as ExtractPaginatedItem, s as ConvexInfiniteQueryMeta, u as ConvexQueryKey, w as ReservedQueryOptions$1, y as MutationVariables } from "../types-jNTcza_a.js";
|
|
5
5
|
import { FunctionArgs, FunctionReference, FunctionReturnType } from "convex/server";
|
|
6
6
|
import { z } from "zod";
|
|
7
7
|
import { DefaultError, QueryFilters, SkipToken, UseMutationOptions, UseQueryOptions } from "@tanstack/react-query";
|
package/dist/watcher.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { Dt as generateMeta, F as resolveRunDeps, Ot as getConvexConfig, j as resolveConfiguredBackend, kt as logger, q as withLocalCodegenEnv } from "./backend-core-
|
|
2
|
+
import { Dt as generateMeta, F as resolveRunDeps, Ot as getConvexConfig, j as resolveConfiguredBackend, kt as logger, q as withLocalCodegenEnv } from "./backend-core-PsWKI66u.mjs";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import { fileURLToPath } from "node:url";
|
|
5
5
|
|
|
@@ -3992,7 +3992,11 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
3992
3992
|
readonly aggregate_extrema: ConvexTableWithColumns<{
|
|
3993
3993
|
name: "aggregate_extrema";
|
|
3994
3994
|
columns: {
|
|
3995
|
-
|
|
3995
|
+
value: ConvexCustomBuilderInitial<"", convex_values0.VAny<any, "required", string>> & {
|
|
3996
|
+
_: {
|
|
3997
|
+
$type: convex_values0.Value;
|
|
3998
|
+
};
|
|
3999
|
+
} & {
|
|
3996
4000
|
_: {
|
|
3997
4001
|
notNull: true;
|
|
3998
4002
|
};
|
|
@@ -4002,14 +4006,10 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
4002
4006
|
};
|
|
4003
4007
|
} & {
|
|
4004
4008
|
_: {
|
|
4005
|
-
fieldName: "
|
|
4009
|
+
fieldName: "value";
|
|
4006
4010
|
};
|
|
4007
4011
|
};
|
|
4008
|
-
|
|
4009
|
-
_: {
|
|
4010
|
-
$type: convex_values0.Value;
|
|
4011
|
-
};
|
|
4012
|
-
} & {
|
|
4012
|
+
count: ConvexNumberBuilderInitial<""> & {
|
|
4013
4013
|
_: {
|
|
4014
4014
|
notNull: true;
|
|
4015
4015
|
};
|
|
@@ -4019,7 +4019,7 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
4019
4019
|
};
|
|
4020
4020
|
} & {
|
|
4021
4021
|
_: {
|
|
4022
|
-
fieldName: "
|
|
4022
|
+
fieldName: "count";
|
|
4023
4023
|
};
|
|
4024
4024
|
};
|
|
4025
4025
|
updatedAt: ConvexNumberBuilderInitial<""> & {
|
|
@@ -4411,22 +4411,22 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
4411
4411
|
fieldName: "status";
|
|
4412
4412
|
};
|
|
4413
4413
|
};
|
|
4414
|
-
|
|
4414
|
+
cursor: ConvexTextBuilderInitial<""> & {
|
|
4415
4415
|
_: {
|
|
4416
4416
|
tableName: "migration_state";
|
|
4417
4417
|
};
|
|
4418
4418
|
} & {
|
|
4419
4419
|
_: {
|
|
4420
|
-
fieldName: "
|
|
4420
|
+
fieldName: "cursor";
|
|
4421
4421
|
};
|
|
4422
4422
|
};
|
|
4423
|
-
|
|
4423
|
+
direction: ConvexTextBuilderInitial<""> & {
|
|
4424
4424
|
_: {
|
|
4425
4425
|
tableName: "migration_state";
|
|
4426
4426
|
};
|
|
4427
4427
|
} & {
|
|
4428
4428
|
_: {
|
|
4429
|
-
fieldName: "
|
|
4429
|
+
fieldName: "direction";
|
|
4430
4430
|
};
|
|
4431
4431
|
};
|
|
4432
4432
|
updatedAt: ConvexNumberBuilderInitial<""> & {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kitcn",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.5",
|
|
4
4
|
"description": "kitcn - React Query integration and CLI tools for Convex",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"convex",
|
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
"./auth/http": "./dist/auth/http/index.js",
|
|
29
29
|
"./auth/nextjs": "./dist/auth/nextjs/index.js",
|
|
30
30
|
"./auth/start": "./dist/auth/start/index.js",
|
|
31
|
+
"./auth/start/server": "./dist/auth/start/server/index.js",
|
|
31
32
|
"./crpc": "./dist/crpc/index.js",
|
|
32
33
|
"./orm": "./dist/orm/index.js",
|
|
33
34
|
"./plugins": "./dist/plugins/index.js",
|
|
@@ -80,6 +81,7 @@
|
|
|
80
81
|
"@rollup/plugin-babel": "^6.1.0",
|
|
81
82
|
"@tanstack/intent": "0.0.23",
|
|
82
83
|
"@tanstack/query-core": "5.90.20",
|
|
84
|
+
"@tanstack/react-start": "1.166.15",
|
|
83
85
|
"@types/common-tags": "^1.8.4",
|
|
84
86
|
"babel-plugin-react-compiler": "^1.0.0",
|
|
85
87
|
"rolldown-plugin-solid": "^0.2.1",
|
|
@@ -88,6 +90,7 @@
|
|
|
88
90
|
"peerDependencies": {
|
|
89
91
|
"@tanstack/query-core": ">=5",
|
|
90
92
|
"@tanstack/react-query": ">=5",
|
|
93
|
+
"@tanstack/react-start": ">=1",
|
|
91
94
|
"@tanstack/solid-query": ">=5",
|
|
92
95
|
"better-auth": "1.6.9",
|
|
93
96
|
"convex": ">=1.38",
|
|
@@ -101,6 +104,9 @@
|
|
|
101
104
|
"@tanstack/react-query": {
|
|
102
105
|
"optional": true
|
|
103
106
|
},
|
|
107
|
+
"@tanstack/react-start": {
|
|
108
|
+
"optional": true
|
|
109
|
+
},
|
|
104
110
|
"@tanstack/solid-query": {
|
|
105
111
|
"optional": true
|
|
106
112
|
},
|
|
@@ -799,7 +799,7 @@ This runbook + references map to the canonical template shape as follows:
|
|
|
799
799
|
| `Property 'insert'/'update' does not exist on type 'OrmReader'` | Using query context for mutations | Ensure mutation handlers use `publicMutation` / `protectedMutation` builders |
|
|
800
800
|
| `useCRPC must be used within CRPCProvider` | Provider chain not mounted around route tree | Wrap app with `AppConvexProvider` and verify `CRPCProvider` is inside QueryClientProvider (Section 7.4 / 8.A.4) |
|
|
801
801
|
| Route auth cookies not set | Missing CORS auth headers | Add `Better-Auth-Cookie` allow/expose headers + credentials |
|
|
802
|
-
| TanStack Start auth helper import errors | Using `kitcn/auth/nextjs` in Start app | Use the
|
|
802
|
+
| TanStack Start auth helper import errors | Using `kitcn/auth/nextjs` in Start app | Use the shared Start loader helper from `kitcn/auth/start` and the server adapter from `kitcn/auth/start/server` |
|
|
803
803
|
| `Returned promise will never resolve` from internal function | Trigger path is recursively querying/updating related rows or stale component wiring still runs | Isolate failing write with logs, disable/move trigger-side sync into explicit mutation helper, rerun `bunx kitcn verify`, then retry the runtime proof |
|
|
804
804
|
| Better Auth secret mismatch/warnings in setup flows | `BETTER_AUTH_SECRET` manually set inconsistently or low entropy | Let `bunx kitcn dev` manage local bootstrap, or regenerate/push via `bunx kitcn env push` for active non-local targets |
|
|
805
805
|
| `Invalid orderBy value. Use a column or asc()/desc()` | Wrong `orderBy` shape (`[{ field, direction }]`) | Use object form only, e.g. `orderBy: { updatedAt: "desc" }` |
|
|
File without changes
|
|
File without changes
|