kitcn 0.15.10 → 0.15.12
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/aggregate/index.js +1 -1
- package/dist/auth/client/index.d.ts +40 -3
- package/dist/auth/client/index.js +4 -2
- package/dist/auth/generated/index.d.ts +1 -1
- package/dist/auth/index.d.ts +12 -12
- package/dist/{backend-core-CsI3PBAE.mjs → backend-core-DqIPJnse.mjs} +3 -2
- package/dist/cli.mjs +1 -1
- package/dist/{generated-contract-disabled-BEZyT7tH.d.ts → generated-contract-disabled-0xEF3NtW.d.ts} +29 -29
- package/dist/orm/index.d.ts +1 -1
- package/dist/orm/index.js +1 -1
- package/dist/{runtime-i6t-HoZn.js → runtime-DmVSOe24.js} +3 -2
- package/dist/solid/index.d.ts +34 -3
- package/dist/solid/index.js +2 -1
- package/dist/watcher.mjs +1 -1
- package/dist/{where-clause-compiler-OCFz2Znw.d.ts → where-clause-compiler-D0D_4v_n.d.ts} +9 -11
- package/package.json +1 -1
|
@@ -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-D0D_4v_n.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";
|
package/dist/aggregate/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as TableAggregate$1, r as aggregateStorageTables, t as DirectAggregate$1 } from "../runtime-
|
|
1
|
+
import { n as TableAggregate$1, r as aggregateStorageTables, t as DirectAggregate$1 } from "../runtime-DmVSOe24.js";
|
|
2
2
|
|
|
3
3
|
//#region src/aggregate/index.ts
|
|
4
4
|
const wrapTriggerFactory = (methodName, factory) => ((...args) => {
|
|
@@ -309,7 +309,44 @@ type CrossDomainClient = BetterAuthClientPlugin & {
|
|
|
309
309
|
};
|
|
310
310
|
type PluginsWithCrossDomain = (CrossDomainClient | ConvexClient | BetterAuthClientPlugin)[];
|
|
311
311
|
type PluginsWithoutCrossDomain = (ConvexClient | BetterAuthClientPlugin)[];
|
|
312
|
-
type
|
|
312
|
+
type AuthSessionState = {
|
|
313
|
+
data: unknown;
|
|
314
|
+
error?: unknown;
|
|
315
|
+
isPending: boolean;
|
|
316
|
+
isRefetching?: boolean;
|
|
317
|
+
refetch?: (...args: never[]) => unknown;
|
|
318
|
+
};
|
|
319
|
+
type AuthClientStore = {
|
|
320
|
+
atoms?: {
|
|
321
|
+
session?: unknown;
|
|
322
|
+
};
|
|
323
|
+
};
|
|
324
|
+
type AuthConvexTokenArgs = {
|
|
325
|
+
fetchOptions?: {
|
|
326
|
+
headers?: {
|
|
327
|
+
Authorization: string;
|
|
328
|
+
};
|
|
329
|
+
throw?: false;
|
|
330
|
+
};
|
|
331
|
+
};
|
|
332
|
+
type AuthConvexTokenResult = {
|
|
333
|
+
data?: {
|
|
334
|
+
token?: string | null;
|
|
335
|
+
} | null;
|
|
336
|
+
} | null | undefined;
|
|
337
|
+
type ConvexAuthProviderClient = {
|
|
338
|
+
$store?: AuthClientStore;
|
|
339
|
+
convex: {
|
|
340
|
+
token: (args: AuthConvexTokenArgs) => Promise<AuthConvexTokenResult>;
|
|
341
|
+
};
|
|
342
|
+
crossDomain?: unknown;
|
|
343
|
+
getCookie?: (...args: never[]) => unknown;
|
|
344
|
+
getSession?: (...args: never[]) => unknown;
|
|
345
|
+
notifySessionSignal?: (...args: never[]) => unknown;
|
|
346
|
+
updateSession?: (...args: never[]) => unknown;
|
|
347
|
+
useSession: () => AuthSessionState;
|
|
348
|
+
} & Record<string, unknown>;
|
|
349
|
+
type AuthClientWithPlugins<Plugins extends PluginsWithCrossDomain | PluginsWithoutCrossDomain> = ReturnType<typeof createAuthClient<{
|
|
313
350
|
plugins: Plugins;
|
|
314
351
|
}>>;
|
|
315
352
|
type AuthClient = AuthClientWithPlugins<PluginsWithCrossDomain> | AuthClientWithPlugins<PluginsWithoutCrossDomain>;
|
|
@@ -321,7 +358,7 @@ type ConvexAuthProviderQueryClient = {
|
|
|
321
358
|
type ConvexAuthProviderProps = {
|
|
322
359
|
children: ReactNode; /** Convex client instance */
|
|
323
360
|
client: ConvexReactClient; /** Better Auth client instance */
|
|
324
|
-
authClient:
|
|
361
|
+
authClient: ConvexAuthProviderClient; /** Shared Convex query client to sync with auth state */
|
|
325
362
|
convexQueryClient?: ConvexAuthProviderQueryClient; /** Initial session token (from SSR) */
|
|
326
363
|
initialToken?: string; /** Callback when mutation called while unauthorized */
|
|
327
364
|
onMutationUnauthorized?: () => void; /** Callback when query called while unauthorized */
|
|
@@ -348,4 +385,4 @@ declare function ConvexAuthProvider({
|
|
|
348
385
|
isUnauthorized
|
|
349
386
|
}: ConvexAuthProviderProps): react_jsx_runtime0.JSX.Element;
|
|
350
387
|
//#endregion
|
|
351
|
-
export { type AuthClient, type AuthClientWithPlugins, ConvexAuthProvider, ConvexAuthProviderProps, ConvexAuthProviderQueryClient, type PluginsWithCrossDomain, type PluginsWithoutCrossDomain, convexClient };
|
|
388
|
+
export { type AuthClient, type AuthClientWithPlugins, ConvexAuthProvider, type ConvexAuthProviderClient, ConvexAuthProviderProps, ConvexAuthProviderQueryClient, type PluginsWithCrossDomain, type PluginsWithoutCrossDomain, convexClient };
|
|
@@ -33,11 +33,12 @@ const readAuthResultData = (result) => {
|
|
|
33
33
|
};
|
|
34
34
|
const getSessionFromPersistedToken = async (authClient, token) => {
|
|
35
35
|
await wait(250);
|
|
36
|
+
const getSession = authClient.getSession;
|
|
36
37
|
for (let attempt = 0; attempt < 10; attempt += 1) {
|
|
37
38
|
const data = readAuthResultData(authClient.$fetch ? await authClient.$fetch("/get-session", {
|
|
38
39
|
credentials: "omit",
|
|
39
40
|
headers: { Authorization: `Bearer ${token}` }
|
|
40
|
-
}) : await
|
|
41
|
+
}) : await getSession?.({ fetchOptions: {
|
|
41
42
|
credentials: "omit",
|
|
42
43
|
headers: { Authorization: `Bearer ${token}` }
|
|
43
44
|
} }));
|
|
@@ -321,7 +322,8 @@ function useOTTHandler(authClient) {
|
|
|
321
322
|
window.history.replaceState({}, "", url);
|
|
322
323
|
const session = (await authClientWithCrossDomain.crossDomain.oneTimeToken.verify({ token })).data?.session;
|
|
323
324
|
if (session && typeof authClient.getSession === "function") {
|
|
324
|
-
|
|
325
|
+
const getSession = authClient.getSession;
|
|
326
|
+
await getSession({ fetchOptions: {
|
|
325
327
|
credentials: "omit",
|
|
326
328
|
headers: { Authorization: `Bearer ${session.token}` }
|
|
327
329
|
} });
|
|
@@ -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" | "value" | "
|
|
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" | "value" | "
|
|
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;
|
|
@@ -797,9 +797,9 @@ var ConvexRankIndexBuilder = class {
|
|
|
797
797
|
};
|
|
798
798
|
}
|
|
799
799
|
orderBy(...columns) {
|
|
800
|
-
|
|
800
|
+
const orderColumns = columns.map((entry) => {
|
|
801
801
|
if (entry && typeof entry === "object" && "column" in entry && "direction" in entry) {
|
|
802
|
-
const builder = entry.column
|
|
802
|
+
const builder = entry.column;
|
|
803
803
|
if (!builder) throw new Error("rankIndex orderBy() expected a column builder.");
|
|
804
804
|
return {
|
|
805
805
|
column: builder,
|
|
@@ -811,6 +811,7 @@ var ConvexRankIndexBuilder = class {
|
|
|
811
811
|
direction: "asc"
|
|
812
812
|
};
|
|
813
813
|
});
|
|
814
|
+
this.config.orderColumns = [...this.config.orderColumns, ...orderColumns];
|
|
814
815
|
return this;
|
|
815
816
|
}
|
|
816
817
|
sum(field) {
|
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-DqIPJnse.mjs";
|
|
3
3
|
import fs, { existsSync, readFileSync } from "node:fs";
|
|
4
4
|
import path, { delimiter, dirname, join, relative, resolve } from "node:path";
|
|
5
5
|
import { fileURLToPath } from "node:url";
|
package/dist/{generated-contract-disabled-BEZyT7tH.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;
|
|
@@ -217,19 +217,20 @@ declare const createApi: <Schema extends SchemaDefinition<any, any>, DataModel e
|
|
|
217
217
|
}, Promise<Record<string, unknown> | undefined>>;
|
|
218
218
|
findMany: convex_server0.RegisteredQuery<"internal", {
|
|
219
219
|
join?: any;
|
|
220
|
-
limit?: number | undefined;
|
|
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-D0D_4v_n.js";
|
|
2
2
|
import { i as pretendRequired, n as deprecated, r as pretend } from "../validators-BhsByJeg.js";
|
|
3
3
|
import { a as QueryCtxWithPreferredOrmQueryTable, i as QueryCtxWithOrmQueryTable, n as LookupByIdResultByCtx, o as getByIdWithOrmQueryFallback, r as QueryCtxWithOptionalOrmQueryTable, t as DocByCtx } from "../query-context-CNo9ffvI.js";
|
|
4
4
|
import { DefineSchemaOptions, GenericDatabaseReader, GenericDatabaseWriter, GenericSchema, SchemaDefinition } from "convex/server";
|
package/dist/orm/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as vectorIndex, B as ConvexColumnBuilder, C as RlsPolicy, D as rankIndex, E as index, F as arrayOf, I as custom, L as json, M as createSystemFields, N as integer, O as searchIndex, P as id, R as objectOf, S as TablePolymorphic, T as aggregateIndex, V as entityKind, _ as OrmSchemaRelations, a as deletion, b as TableDeleteConfig, c as Columns, d as OrmSchemaDefinition, f as OrmSchemaExtensionRelations, g as OrmSchemaOptions, h as OrmSchemaExtensions, i as convexTable, j as text, k as uniqueIndex, l as EnableRLS, m as OrmSchemaExtensionTriggers, o as discriminator, p as OrmSchemaExtensionTables, s as Brand, t as DirectAggregate, u as OrmContext, v as OrmSchemaTriggers, w as rlsPolicy, x as TableName, y as RlsPolicies, z as unionOf } from "../runtime-
|
|
1
|
+
import { A as vectorIndex, B as ConvexColumnBuilder, C as RlsPolicy, D as rankIndex, E as index, F as arrayOf, I as custom, L as json, M as createSystemFields, N as integer, O as searchIndex, P as id, R as objectOf, S as TablePolymorphic, T as aggregateIndex, V as entityKind, _ as OrmSchemaRelations, a as deletion, b as TableDeleteConfig, c as Columns, d as OrmSchemaDefinition, f as OrmSchemaExtensionRelations, g as OrmSchemaOptions, h as OrmSchemaExtensions, i as convexTable, j as text, k as uniqueIndex, l as EnableRLS, m as OrmSchemaExtensionTriggers, o as discriminator, p as OrmSchemaExtensionTables, s as Brand, t as DirectAggregate, u as OrmContext, v as OrmSchemaTriggers, w as rlsPolicy, x as TableName, y as RlsPolicies, z as unionOf } from "../runtime-DmVSOe24.js";
|
|
2
2
|
import { a as pretendRequired, i as pretend, n as deprecated } from "../validators-C7LelqTN.js";
|
|
3
3
|
import { A as ne, C as inArray, D as like, E as isNull, F as notLike, I as or, L as startsWith, M as notBetween, N as notIlike, O as lt, P as notInArray, S as ilike, T as isNotNull, _ as endsWith, a as mergedStream, b as gt, c as isUnsetToken, d as arrayContained, f as arrayContains, g as contains, h as column, i as getIndexFields, j as not, k as lte, l as unsetToken, m as between, n as EmptyStream, o as stream, p as arrayOverlaps, r as QueryStream, s as streamIndexRange, t as getByIdWithOrmQueryFallback, u as and, v as eq, w as isFieldReference, x as gte, y as fieldRef } from "../query-context-ydn9kb6P.js";
|
|
4
4
|
import { v } from "convex/values";
|
|
@@ -579,9 +579,9 @@ var ConvexRankIndexBuilder = class {
|
|
|
579
579
|
};
|
|
580
580
|
}
|
|
581
581
|
orderBy(...columns) {
|
|
582
|
-
|
|
582
|
+
const orderColumns = columns.map((entry) => {
|
|
583
583
|
if (entry && typeof entry === "object" && "column" in entry && "direction" in entry) {
|
|
584
|
-
const builder = entry.column
|
|
584
|
+
const builder = entry.column;
|
|
585
585
|
if (!builder) throw new Error("rankIndex orderBy() expected a column builder.");
|
|
586
586
|
return {
|
|
587
587
|
column: builder,
|
|
@@ -593,6 +593,7 @@ var ConvexRankIndexBuilder = class {
|
|
|
593
593
|
direction: "asc"
|
|
594
594
|
};
|
|
595
595
|
});
|
|
596
|
+
this.config.orderColumns = [...this.config.orderColumns, ...orderColumns];
|
|
596
597
|
return this;
|
|
597
598
|
}
|
|
598
599
|
sum(field) {
|
package/dist/solid/index.d.ts
CHANGED
|
@@ -1201,7 +1201,38 @@ type CrossDomainClient = BetterAuthClientPlugin & {
|
|
|
1201
1201
|
};
|
|
1202
1202
|
type PluginsWithCrossDomain = (CrossDomainClient | ConvexClient$1 | BetterAuthClientPlugin)[];
|
|
1203
1203
|
type PluginsWithoutCrossDomain = (ConvexClient$1 | BetterAuthClientPlugin)[];
|
|
1204
|
-
type
|
|
1204
|
+
type SolidAuthSessionState = {
|
|
1205
|
+
data: unknown;
|
|
1206
|
+
error?: unknown;
|
|
1207
|
+
isPending: boolean;
|
|
1208
|
+
isRefetching?: boolean;
|
|
1209
|
+
refetch?: (...args: never[]) => unknown;
|
|
1210
|
+
};
|
|
1211
|
+
type SolidAuthConvexTokenArgs = {
|
|
1212
|
+
fetchOptions?: {
|
|
1213
|
+
headers?: {
|
|
1214
|
+
Authorization: string;
|
|
1215
|
+
};
|
|
1216
|
+
throw?: false;
|
|
1217
|
+
};
|
|
1218
|
+
};
|
|
1219
|
+
type SolidAuthConvexTokenResult = {
|
|
1220
|
+
data?: {
|
|
1221
|
+
token?: string | null;
|
|
1222
|
+
} | null;
|
|
1223
|
+
} | null | undefined;
|
|
1224
|
+
type SolidAuthProviderClient = {
|
|
1225
|
+
convex: {
|
|
1226
|
+
token: (args: SolidAuthConvexTokenArgs) => Promise<SolidAuthConvexTokenResult>;
|
|
1227
|
+
};
|
|
1228
|
+
crossDomain?: unknown;
|
|
1229
|
+
getCookie?: (...args: never[]) => unknown;
|
|
1230
|
+
getSession?: (...args: never[]) => unknown;
|
|
1231
|
+
notifySessionSignal?: (...args: never[]) => unknown;
|
|
1232
|
+
updateSession?: (...args: never[]) => unknown;
|
|
1233
|
+
useSession: () => () => SolidAuthSessionState;
|
|
1234
|
+
} & Record<string, unknown>;
|
|
1235
|
+
type AuthClientWithPlugins<Plugins extends PluginsWithCrossDomain | PluginsWithoutCrossDomain> = ReturnType<typeof createAuthClient<{
|
|
1205
1236
|
plugins: Plugins;
|
|
1206
1237
|
}>>;
|
|
1207
1238
|
type SolidAuthClient = AuthClientWithPlugins<PluginsWithCrossDomain> | AuthClientWithPlugins<PluginsWithoutCrossDomain>;
|
|
@@ -1210,7 +1241,7 @@ type SolidAuthClient = AuthClientWithPlugins<PluginsWithCrossDomain> | AuthClien
|
|
|
1210
1241
|
type ConvexAuthProviderProps = {
|
|
1211
1242
|
children: JSX.Element; /** Convex client instance */
|
|
1212
1243
|
client: ConvexClient; /** Better Auth client instance */
|
|
1213
|
-
authClient:
|
|
1244
|
+
authClient: SolidAuthProviderClient; /** Initial session token (from SSR) */
|
|
1214
1245
|
initialToken?: string; /** Callback when mutation called while unauthorized */
|
|
1215
1246
|
onMutationUnauthorized?: () => void; /** Callback when query called while unauthorized */
|
|
1216
1247
|
onQueryUnauthorized?: (info: {
|
|
@@ -1525,4 +1556,4 @@ declare function useUploadMutationOptions<TGenerateUrlMutation extends FunctionR
|
|
|
1525
1556
|
*/
|
|
1526
1557
|
declare function createVanillaCRPCProxy<TApi extends Record<string, unknown>>(api: TApi, meta: CallerMeta, convexClient: ConvexClient, transformer?: DataTransformerOptions): VanillaCRPCClient<TApi>;
|
|
1527
1558
|
//#endregion
|
|
1528
|
-
export { AuthMutationError, AuthProvider, AuthStore, AuthStoreState, AuthType, Authenticated, CRPCClient, CRPCHttpOptions, ConvexActionOptions, ConvexAuthBridge, ConvexAuthProvider, ConvexAuthProviderProps, ConvexInfiniteQueryOptions, ConvexInfiniteQueryOptionsWithRef, ConvexProvider, ConvexProviderWithAuth, ConvexQueryClient, ConvexQueryClientOptions, ConvexQueryClientSingletonOptions, ConvexQueryOptions, CreateCRPCContextOptions, DecorateAction, DecorateInfiniteQuery, DecorateMutation, DecorateQuery, FetchAccessTokenContext, FetchAccessTokenFn, HttpCRPCClient, HttpCRPCClientFromRouter, type HttpClientOptions, type HttpFormValue, type HttpInputArgs, HttpMutationKey, HttpProxyOptions, HttpQueryKey, HttpRouteInfo, HttpRouteMap, InfiniteQueryOptsParam, MaybeAuthenticated, MaybeUnauthenticated, MetaContext, PaginationState, PaginationStatus, SolidAuthClient, Unauthenticated, Unsubscribe, UseInfiniteQueryResult, VanillaCRPCClient, VanillaHttpCRPCClient, VanillaHttpCRPCClientFromRouter, VanillaQuery, createAuthMutations, createCRPCContext, createCRPCOptionsProxy, createHttpProxy, createVanillaCRPCProxy, decodeJwtExp, getAuthType, getConvexQueryClientSingleton, getQueryClientSingleton, isAuthMutationError, useAuth, useAuthGuard, useAuthSkip, useAuthStore, useAuthValue, useConvex, useConvexActionOptions, useConvexActionQueryOptions, useConvexAuth, useConvexAuthBridge, useConvexInfiniteQueryOptions, useConvexMutationOptions, useConvexQueryClient, useConvexQueryOptions, useFetchAccessToken, useFnMeta, useInfiniteQuery, useIsAuth, useMaybeAuth, useMeta, useSafeConvexAuth, useUploadMutationOptions };
|
|
1559
|
+
export { AuthMutationError, AuthProvider, AuthStore, AuthStoreState, AuthType, Authenticated, CRPCClient, CRPCHttpOptions, ConvexActionOptions, ConvexAuthBridge, ConvexAuthProvider, ConvexAuthProviderProps, ConvexInfiniteQueryOptions, ConvexInfiniteQueryOptionsWithRef, ConvexProvider, ConvexProviderWithAuth, ConvexQueryClient, ConvexQueryClientOptions, ConvexQueryClientSingletonOptions, ConvexQueryOptions, CreateCRPCContextOptions, DecorateAction, DecorateInfiniteQuery, DecorateMutation, DecorateQuery, FetchAccessTokenContext, FetchAccessTokenFn, HttpCRPCClient, HttpCRPCClientFromRouter, type HttpClientOptions, type HttpFormValue, type HttpInputArgs, HttpMutationKey, HttpProxyOptions, HttpQueryKey, HttpRouteInfo, HttpRouteMap, InfiniteQueryOptsParam, MaybeAuthenticated, MaybeUnauthenticated, MetaContext, PaginationState, PaginationStatus, SolidAuthClient, SolidAuthProviderClient, Unauthenticated, Unsubscribe, UseInfiniteQueryResult, VanillaCRPCClient, VanillaHttpCRPCClient, VanillaHttpCRPCClientFromRouter, VanillaQuery, createAuthMutations, createCRPCContext, createCRPCOptionsProxy, createHttpProxy, createVanillaCRPCProxy, decodeJwtExp, getAuthType, getConvexQueryClientSingleton, getQueryClientSingleton, isAuthMutationError, useAuth, useAuthGuard, useAuthSkip, useAuthStore, useAuthValue, useConvex, useConvexActionOptions, useConvexActionQueryOptions, useConvexAuth, useConvexAuthBridge, useConvexInfiniteQueryOptions, useConvexMutationOptions, useConvexQueryClient, useConvexQueryOptions, useFetchAccessToken, useFnMeta, useInfiniteQuery, useIsAuth, useMaybeAuth, useMeta, useSafeConvexAuth, useUploadMutationOptions };
|
package/dist/solid/index.js
CHANGED
|
@@ -2436,7 +2436,8 @@ function useOTTHandler(authClient) {
|
|
|
2436
2436
|
window.history.replaceState({}, "", url);
|
|
2437
2437
|
const session = (await authClientWithCrossDomain.crossDomain.oneTimeToken.verify({ token })).data?.session;
|
|
2438
2438
|
if (session) {
|
|
2439
|
-
|
|
2439
|
+
const getSession = authClient.getSession;
|
|
2440
|
+
await getSession?.({ fetchOptions: { headers: { Authorization: `Bearer ${session.token}` } } });
|
|
2440
2441
|
authClientWithCrossDomain.updateSession();
|
|
2441
2442
|
}
|
|
2442
2443
|
}
|
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-DqIPJnse.mjs";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import { fileURLToPath } from "node:url";
|
|
5
5
|
|
|
@@ -1467,12 +1467,10 @@ interface ConvexRankIndexOrderSpec<TColumn extends ConvexIndexColumn = ConvexInd
|
|
|
1467
1467
|
column: TColumn;
|
|
1468
1468
|
direction: 'asc' | 'desc';
|
|
1469
1469
|
}
|
|
1470
|
-
type ConvexRankOrderByInput<TColumn extends ConvexIndexColumn> = TColumn |
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
direction: 'asc' | 'desc';
|
|
1475
|
-
};
|
|
1470
|
+
type ConvexRankOrderByInput<TColumn extends ConvexIndexColumn> = TColumn | ConvexRankIndexOrderSpec<TColumn>;
|
|
1471
|
+
type ConvexRankOrderByInputToSpec<TInput> = TInput extends ConvexRankIndexOrderSpec<infer TColumn> ? ConvexRankIndexOrderSpec<TColumn> : TInput extends ConvexIndexColumn ? ConvexRankIndexOrderSpec<TInput> : never;
|
|
1472
|
+
type ConvexRankOrderByInputsToSpecs<TInputs extends readonly ConvexRankOrderByInput<ConvexIndexColumn>[]> = TInputs extends readonly [infer TFirst extends ConvexRankOrderByInput<ConvexIndexColumn>, ...infer TRest extends readonly ConvexRankOrderByInput<ConvexIndexColumn>[]] ? readonly [ConvexRankOrderByInputToSpec<TFirst>, ...ConvexRankOrderByInputsToSpecs<TRest>] : readonly [];
|
|
1473
|
+
type ConvexRankOrderByResultColumns<TExistingColumns extends readonly ConvexRankIndexOrderSpec[], TInputColumns extends readonly ConvexRankOrderByInput<ConvexIndexColumn>[]> = readonly [...TExistingColumns, ...ConvexRankOrderByInputsToSpecs<TInputColumns>];
|
|
1476
1474
|
interface ConvexRankIndexConfig<TName extends string = string, TPartitionColumns extends readonly ConvexIndexColumn[] = ConvexIndexColumn[], TOrderColumns extends readonly ConvexRankIndexOrderSpec[] = readonly ConvexRankIndexOrderSpec[]> {
|
|
1477
1475
|
name: TName;
|
|
1478
1476
|
orderColumns: TOrderColumns;
|
|
@@ -1578,7 +1576,7 @@ declare class ConvexRankIndexBuilder<TName extends string = string, TPartitionCo
|
|
|
1578
1576
|
};
|
|
1579
1577
|
config: ConvexRankIndexConfig<TName, TPartitionColumns, TOrderColumns>;
|
|
1580
1578
|
constructor(name: TName, partitionColumns: TPartitionColumns, orderColumns: TOrderColumns);
|
|
1581
|
-
orderBy<TNextColumns extends readonly
|
|
1579
|
+
orderBy<TNextColumns extends readonly ConvexRankOrderByInput<ConvexIndexColumn>[]>(...columns: TNextColumns): ConvexRankIndexBuilder<TName, TPartitionColumns, ConvexRankOrderByResultColumns<TOrderColumns, TNextColumns>>;
|
|
1582
1580
|
sum(field: ConvexIndexColumn): this;
|
|
1583
1581
|
}
|
|
1584
1582
|
declare class ConvexVectorIndexBuilder<TName extends string = string, TVectorField extends ConvexIndexColumn = ConvexIndexColumn, TFilterFields extends readonly ConvexIndexColumn[] = ConvexIndexColumn[]> {
|
|
@@ -4409,22 +4407,22 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
4409
4407
|
fieldName: "status";
|
|
4410
4408
|
};
|
|
4411
4409
|
};
|
|
4412
|
-
|
|
4410
|
+
cursor: ConvexTextBuilderInitial<""> & {
|
|
4413
4411
|
_: {
|
|
4414
4412
|
tableName: "migration_state";
|
|
4415
4413
|
};
|
|
4416
4414
|
} & {
|
|
4417
4415
|
_: {
|
|
4418
|
-
fieldName: "
|
|
4416
|
+
fieldName: "cursor";
|
|
4419
4417
|
};
|
|
4420
4418
|
};
|
|
4421
|
-
|
|
4419
|
+
direction: ConvexTextBuilderInitial<""> & {
|
|
4422
4420
|
_: {
|
|
4423
4421
|
tableName: "migration_state";
|
|
4424
4422
|
};
|
|
4425
4423
|
} & {
|
|
4426
4424
|
_: {
|
|
4427
|
-
fieldName: "
|
|
4425
|
+
fieldName: "direction";
|
|
4428
4426
|
};
|
|
4429
4427
|
};
|
|
4430
4428
|
updatedAt: ConvexNumberBuilderInitial<""> & {
|