kitcn 0.12.9 → 0.12.11
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/client/index.js +32 -8
- package/dist/auth/generated/index.d.ts +1 -1
- package/dist/auth/index.d.ts +15 -15
- package/dist/backend-core-DUsUG58E.mjs +14929 -0
- package/dist/cli.mjs +256 -11746
- package/dist/{generated-contract-disabled-Dzx2IRId.d.ts → generated-contract-disabled-Cf7sqlVD.d.ts} +30 -30
- package/dist/orm/index.d.ts +1 -1
- package/dist/orm/index.js +2878 -2870
- package/dist/react/index.d.ts +5 -1
- package/dist/react/index.js +67 -47
- package/dist/watcher.mjs +63 -3
- package/dist/{where-clause-compiler-Dw3EVdi6.d.ts → where-clause-compiler-DJ2S06w0.d.ts} +56 -56
- package/package.json +1 -1
- package/skills/convex/references/setup/auth.md +9 -1
- package/dist/codegen-B60fOYhd.mjs +0 -3420
package/dist/react/index.d.ts
CHANGED
|
@@ -350,7 +350,7 @@ declare class ConvexQueryClient {
|
|
|
350
350
|
subscriptions: Record<string, {
|
|
351
351
|
watch: Watch<unknown>;
|
|
352
352
|
unsubscribe: () => void;
|
|
353
|
-
queryKey:
|
|
353
|
+
queryKey: QueryKey;
|
|
354
354
|
}>;
|
|
355
355
|
/** Cleanup function for QueryCache subscription */
|
|
356
356
|
unsubscribe: (() => void) | undefined;
|
|
@@ -377,6 +377,9 @@ declare class ConvexQueryClient {
|
|
|
377
377
|
private cancelPendingUnsubscribe;
|
|
378
378
|
/** Unsubscribe a live Convex watch (if present) and remove it from the subscription map. */
|
|
379
379
|
private unsubscribeQueryByHash;
|
|
380
|
+
private isAuthBoundQuery;
|
|
381
|
+
private isQueryDisabled;
|
|
382
|
+
private subscribeQuery;
|
|
380
383
|
/** Update auth store (for HMR where jotai store may reset) */
|
|
381
384
|
updateAuthStore(authStore?: AuthStore): void;
|
|
382
385
|
/** Get current auth state from store */
|
|
@@ -411,6 +414,7 @@ declare class ConvexQueryClient {
|
|
|
411
414
|
* Call before logout to prevent UNAUTHORIZED errors during session invalidation.
|
|
412
415
|
*/
|
|
413
416
|
unsubscribeAuthQueries(): void;
|
|
417
|
+
resetAuthQueries(): Promise<void>;
|
|
414
418
|
/**
|
|
415
419
|
* Batch update all subscriptions.
|
|
416
420
|
* Called internally when Convex client reconnects.
|
package/dist/react/index.js
CHANGED
|
@@ -1185,7 +1185,24 @@ function createCRPCContext(options) {
|
|
|
1185
1185
|
/** Inner provider */
|
|
1186
1186
|
function CRPCProviderInner({ children, convexClient, convexQueryClient }) {
|
|
1187
1187
|
const authStore = useAuthStore();
|
|
1188
|
+
const token = useAuthValue("token");
|
|
1189
|
+
const isAuthenticated = useAuthValue("isAuthenticated");
|
|
1190
|
+
const previousAuthRef = useRef(null);
|
|
1188
1191
|
const fetchAccessToken = useFetchAccessToken();
|
|
1192
|
+
useEffect(() => {
|
|
1193
|
+
const previous = previousAuthRef.current;
|
|
1194
|
+
const tokenReady = token === null || decodeJwtExp(token) !== null;
|
|
1195
|
+
previousAuthRef.current = {
|
|
1196
|
+
isAuthenticated,
|
|
1197
|
+
token
|
|
1198
|
+
};
|
|
1199
|
+
if (!previous) return;
|
|
1200
|
+
if (tokenReady && (previous.token !== token || previous.isAuthenticated !== isAuthenticated)) convexQueryClient.resetAuthQueries();
|
|
1201
|
+
}, [
|
|
1202
|
+
convexQueryClient,
|
|
1203
|
+
isAuthenticated,
|
|
1204
|
+
token
|
|
1205
|
+
]);
|
|
1189
1206
|
const httpProxy = useMemo(() => {
|
|
1190
1207
|
if (!httpOptions.convexSiteUrl || !meta._http) return;
|
|
1191
1208
|
return createHttpProxy({
|
|
@@ -1438,12 +1455,14 @@ function createAuthMutations(authClient) {
|
|
|
1438
1455
|
authStoreApi.set("token", null);
|
|
1439
1456
|
authStoreApi.set("expiresAt", null);
|
|
1440
1457
|
authStoreApi.set("sessionSyncGraceUntil", null);
|
|
1458
|
+
await convexQueryClient?.resetAuthQueries();
|
|
1441
1459
|
return res;
|
|
1442
1460
|
}
|
|
1443
1461
|
};
|
|
1444
1462
|
});
|
|
1445
1463
|
const useSignInSocialMutationOptions = ((options) => {
|
|
1446
1464
|
const authStoreApi = useAuthStore();
|
|
1465
|
+
const convexQueryClient = useConvexQueryClient();
|
|
1447
1466
|
return {
|
|
1448
1467
|
...options,
|
|
1449
1468
|
mutationFn: async (args) => {
|
|
@@ -1452,12 +1471,15 @@ function createAuthMutations(authClient) {
|
|
|
1452
1471
|
seedReturnedToken(authStoreApi, res);
|
|
1453
1472
|
await hydrateReturnedSession(authClient, res);
|
|
1454
1473
|
await ensureAuth(authStoreApi);
|
|
1474
|
+
authStoreApi.set("isAuthenticated", true);
|
|
1475
|
+
await convexQueryClient?.resetAuthQueries();
|
|
1455
1476
|
return res;
|
|
1456
1477
|
}
|
|
1457
1478
|
};
|
|
1458
1479
|
});
|
|
1459
1480
|
const useSignInMutationOptions = ((options) => {
|
|
1460
1481
|
const authStoreApi = useAuthStore();
|
|
1482
|
+
const convexQueryClient = useConvexQueryClient();
|
|
1461
1483
|
return {
|
|
1462
1484
|
...options,
|
|
1463
1485
|
mutationFn: async (args) => {
|
|
@@ -1466,12 +1488,15 @@ function createAuthMutations(authClient) {
|
|
|
1466
1488
|
seedReturnedToken(authStoreApi, res);
|
|
1467
1489
|
await hydrateReturnedSession(authClient, res);
|
|
1468
1490
|
await ensureAuth(authStoreApi);
|
|
1491
|
+
authStoreApi.set("isAuthenticated", true);
|
|
1492
|
+
await convexQueryClient?.resetAuthQueries();
|
|
1469
1493
|
return res;
|
|
1470
1494
|
}
|
|
1471
1495
|
};
|
|
1472
1496
|
});
|
|
1473
1497
|
const useSignUpMutationOptions = ((options) => {
|
|
1474
1498
|
const authStoreApi = useAuthStore();
|
|
1499
|
+
const convexQueryClient = useConvexQueryClient();
|
|
1475
1500
|
return {
|
|
1476
1501
|
...options,
|
|
1477
1502
|
mutationFn: async (args) => {
|
|
@@ -1480,6 +1505,8 @@ function createAuthMutations(authClient) {
|
|
|
1480
1505
|
seedReturnedToken(authStoreApi, res);
|
|
1481
1506
|
await hydrateReturnedSession(authClient, res);
|
|
1482
1507
|
await ensureAuth(authStoreApi);
|
|
1508
|
+
authStoreApi.set("isAuthenticated", true);
|
|
1509
|
+
await convexQueryClient?.resetAuthQueries();
|
|
1483
1510
|
return res;
|
|
1484
1511
|
}
|
|
1485
1512
|
};
|
|
@@ -1701,6 +1728,31 @@ var ConvexQueryClient = class {
|
|
|
1701
1728
|
sub.unsubscribe();
|
|
1702
1729
|
delete this.subscriptions[queryHash];
|
|
1703
1730
|
}
|
|
1731
|
+
isAuthBoundQuery(query) {
|
|
1732
|
+
const meta = query.meta;
|
|
1733
|
+
return meta?.authType === "required" || meta?.authType === "optional";
|
|
1734
|
+
}
|
|
1735
|
+
isQueryDisabled(query) {
|
|
1736
|
+
return query.isDisabled();
|
|
1737
|
+
}
|
|
1738
|
+
subscribeQuery(query) {
|
|
1739
|
+
if (this.subscriptions[query.queryHash]) return;
|
|
1740
|
+
const meta = query.meta;
|
|
1741
|
+
if (meta?.subscribe === false) return;
|
|
1742
|
+
if (query.getObserversCount() === 0) return;
|
|
1743
|
+
if (this.isQueryDisabled(query)) return;
|
|
1744
|
+
if (this.shouldSkipSubscription(meta?.authType)) return;
|
|
1745
|
+
const [, funcName, args] = query.queryKey;
|
|
1746
|
+
const watch = this.convexClient.watchQuery(funcName, this.transformer.input.serialize(args));
|
|
1747
|
+
const unsubscribe = watch.onUpdate(() => {
|
|
1748
|
+
this.onUpdateQueryKeyHash(query.queryHash);
|
|
1749
|
+
});
|
|
1750
|
+
this.subscriptions[query.queryHash] = {
|
|
1751
|
+
queryKey: query.queryKey,
|
|
1752
|
+
watch,
|
|
1753
|
+
unsubscribe
|
|
1754
|
+
};
|
|
1755
|
+
}
|
|
1704
1756
|
/** Update auth store (for HMR where jotai store may reset) */
|
|
1705
1757
|
updateAuthStore(authStore) {
|
|
1706
1758
|
this.authStore = authStore;
|
|
@@ -1783,6 +1835,15 @@ var ConvexQueryClient = class {
|
|
|
1783
1835
|
this.unsubscribeQueryByHash(queryHash);
|
|
1784
1836
|
}
|
|
1785
1837
|
}
|
|
1838
|
+
async resetAuthQueries() {
|
|
1839
|
+
const authQueries = this.queryClient.getQueryCache().getAll().filter((query) => this.isAuthBoundQuery(query));
|
|
1840
|
+
for (const query of authQueries) {
|
|
1841
|
+
this.cancelPendingUnsubscribe(query.queryHash);
|
|
1842
|
+
this.unsubscribeQueryByHash(query.queryHash);
|
|
1843
|
+
}
|
|
1844
|
+
await this.queryClient.resetQueries({ predicate: (query) => this.isAuthBoundQuery(query) });
|
|
1845
|
+
for (const query of this.queryClient.getQueryCache().getAll()) if (this.isAuthBoundQuery(query)) this.subscribeQuery(query);
|
|
1846
|
+
}
|
|
1786
1847
|
/**
|
|
1787
1848
|
* Batch update all subscriptions.
|
|
1788
1849
|
* Called internally when Convex client reconnects.
|
|
@@ -1860,42 +1921,13 @@ var ConvexQueryClient = class {
|
|
|
1860
1921
|
this.cancelPendingUnsubscribe(event.query.queryHash);
|
|
1861
1922
|
this.unsubscribeQueryByHash(event.query.queryHash);
|
|
1862
1923
|
break;
|
|
1863
|
-
case "added":
|
|
1864
|
-
|
|
1865
|
-
if (meta?.subscribe === false) break;
|
|
1866
|
-
const [, funcName, args] = event.query.queryKey;
|
|
1867
|
-
if (event.query.getObserversCount() === 0) break;
|
|
1868
|
-
if (this.shouldSkipSubscription(meta?.authType)) break;
|
|
1869
|
-
const watch = this.convexClient.watchQuery(funcName, this.transformer.input.serialize(args));
|
|
1870
|
-
const unsubscribe = watch.onUpdate(() => {
|
|
1871
|
-
this.onUpdateQueryKeyHash(event.query.queryHash);
|
|
1872
|
-
});
|
|
1873
|
-
this.subscriptions[event.query.queryHash] = {
|
|
1874
|
-
queryKey: event.query.queryKey,
|
|
1875
|
-
watch,
|
|
1876
|
-
unsubscribe
|
|
1877
|
-
};
|
|
1924
|
+
case "added":
|
|
1925
|
+
this.subscribeQuery(event.query);
|
|
1878
1926
|
break;
|
|
1879
|
-
|
|
1880
|
-
case "observerAdded": {
|
|
1927
|
+
case "observerAdded":
|
|
1881
1928
|
this.cancelPendingUnsubscribe(event.query.queryHash);
|
|
1882
|
-
|
|
1883
|
-
if (event.query.options.enabled === false) break;
|
|
1884
|
-
const meta = event.query.meta;
|
|
1885
|
-
if (meta?.subscribe === false) break;
|
|
1886
|
-
const [, funcName, args] = event.query.queryKey;
|
|
1887
|
-
if (this.shouldSkipSubscription(meta?.authType)) break;
|
|
1888
|
-
const watch = this.convexClient.watchQuery(funcName, this.transformer.input.serialize(args));
|
|
1889
|
-
const unsubscribe = watch.onUpdate(() => {
|
|
1890
|
-
this.onUpdateQueryKeyHash(event.query.queryHash);
|
|
1891
|
-
});
|
|
1892
|
-
this.subscriptions[event.query.queryHash] = {
|
|
1893
|
-
queryKey: event.query.queryKey,
|
|
1894
|
-
watch,
|
|
1895
|
-
unsubscribe
|
|
1896
|
-
};
|
|
1929
|
+
this.subscribeQuery(event.query);
|
|
1897
1930
|
break;
|
|
1898
|
-
}
|
|
1899
1931
|
case "observerRemoved":
|
|
1900
1932
|
if (event.query.getObserversCount() === 0 && this.subscriptions[event.query.queryHash]) {
|
|
1901
1933
|
const queryHash = event.query.queryHash;
|
|
@@ -1911,7 +1943,7 @@ var ConvexQueryClient = class {
|
|
|
1911
1943
|
if (event.action.type === "setState" && event.action.setStateOptions?.meta === "set by ConvexQueryClient") break;
|
|
1912
1944
|
break;
|
|
1913
1945
|
case "observerOptionsUpdated": {
|
|
1914
|
-
const isDisabled = event.query
|
|
1946
|
+
const isDisabled = this.isQueryDisabled(event.query);
|
|
1915
1947
|
const isSubscribed = !!this.subscriptions[event.query.queryHash];
|
|
1916
1948
|
if (isDisabled && isSubscribed) {
|
|
1917
1949
|
this.cancelPendingUnsubscribe(event.query.queryHash);
|
|
@@ -1919,19 +1951,7 @@ var ConvexQueryClient = class {
|
|
|
1919
1951
|
break;
|
|
1920
1952
|
}
|
|
1921
1953
|
if (isSubscribed || isDisabled) break;
|
|
1922
|
-
|
|
1923
|
-
if (meta?.subscribe === false) break;
|
|
1924
|
-
const [, funcName, args] = event.query.queryKey;
|
|
1925
|
-
if (this.shouldSkipSubscription(meta?.authType)) break;
|
|
1926
|
-
const watch = this.convexClient.watchQuery(funcName, this.transformer.input.serialize(args));
|
|
1927
|
-
const unsubscribe = watch.onUpdate(() => {
|
|
1928
|
-
this.onUpdateQueryKeyHash(event.query.queryHash);
|
|
1929
|
-
});
|
|
1930
|
-
this.subscriptions[event.query.queryHash] = {
|
|
1931
|
-
queryKey: event.query.queryKey,
|
|
1932
|
-
watch,
|
|
1933
|
-
unsubscribe
|
|
1934
|
-
};
|
|
1954
|
+
this.subscribeQuery(event.query);
|
|
1935
1955
|
break;
|
|
1936
1956
|
}
|
|
1937
1957
|
}
|
package/dist/watcher.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
2
|
+
import { N as resolveRunDeps, St as logger, bt as generateMeta, k as resolveConfiguredBackend, xt as getConvexConfig } from "./backend-core-DUsUG58E.mjs";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import { fileURLToPath } from "node:url";
|
|
5
5
|
|
|
@@ -8,6 +8,17 @@ function getWatchRoots(functionsDir) {
|
|
|
8
8
|
const convexDir = path.dirname(functionsDir);
|
|
9
9
|
return [functionsDir, path.join(convexDir, "routers")];
|
|
10
10
|
}
|
|
11
|
+
function parseWatcherBackendEnv(value) {
|
|
12
|
+
if (value === "convex" || value === "concave") return value;
|
|
13
|
+
}
|
|
14
|
+
function resolveWatcherCliCommand(currentFilename = fileURLToPath(import.meta.url)) {
|
|
15
|
+
const currentDir = path.dirname(currentFilename);
|
|
16
|
+
const isTs = currentFilename.endsWith(".ts");
|
|
17
|
+
return {
|
|
18
|
+
cliPath: isTs ? path.join(currentDir, "cli.ts") : path.join(currentDir, "cli.mjs"),
|
|
19
|
+
runtime: isTs ? "bun" : "node"
|
|
20
|
+
};
|
|
21
|
+
}
|
|
11
22
|
function parseTrimSegmentsEnv(value) {
|
|
12
23
|
if (!value) return;
|
|
13
24
|
const parseFromArray = (segments) => {
|
|
@@ -26,14 +37,54 @@ function shouldIgnoreWatchPath(watchedPath, functionsDir, outputFile) {
|
|
|
26
37
|
const normalizedPath = path.resolve(watchedPath);
|
|
27
38
|
const normalizedFunctionsDir = path.resolve(functionsDir);
|
|
28
39
|
const normalizedOutputFile = path.resolve(outputFile);
|
|
40
|
+
const convexGeneratedDir = path.join(normalizedFunctionsDir, "_generated");
|
|
29
41
|
const generatedDir = path.join(normalizedFunctionsDir, "generated");
|
|
30
42
|
const generatedFile = path.join(normalizedFunctionsDir, "generated.ts");
|
|
31
43
|
if (normalizedPath === normalizedOutputFile) return true;
|
|
32
44
|
if (normalizedPath === generatedFile) return true;
|
|
45
|
+
if (normalizedPath === convexGeneratedDir || normalizedPath.startsWith(`${convexGeneratedDir}${path.sep}`)) return true;
|
|
33
46
|
if (normalizedPath === generatedDir || normalizedPath.startsWith(`${generatedDir}${path.sep}`)) return true;
|
|
34
47
|
return normalizedPath.endsWith(".runtime.ts");
|
|
35
48
|
}
|
|
49
|
+
async function runWatcherCodegen(params, deps = {}) {
|
|
50
|
+
const resolveRunDepsFn = deps.resolveRunDeps ?? resolveRunDeps;
|
|
51
|
+
const resolveConfiguredBackendFn = deps.resolveConfiguredBackendFn ?? resolveConfiguredBackend;
|
|
52
|
+
const { execa: execaFn, generateMeta: generateMetaFn, loadCliConfig: loadCliConfigFn } = resolveRunDepsFn();
|
|
53
|
+
const config = loadCliConfigFn(params.configPath);
|
|
54
|
+
if (resolveConfiguredBackendFn({
|
|
55
|
+
backendArg: params.backendArg,
|
|
56
|
+
config
|
|
57
|
+
}) !== "concave") {
|
|
58
|
+
await generateMetaFn(params.sharedDir, {
|
|
59
|
+
debug: params.debug,
|
|
60
|
+
silent: true,
|
|
61
|
+
scope: params.scope,
|
|
62
|
+
trimSegments: params.trimSegments
|
|
63
|
+
});
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
const { cliPath, runtime } = resolveWatcherCliCommand();
|
|
67
|
+
const args = [
|
|
68
|
+
cliPath,
|
|
69
|
+
"codegen",
|
|
70
|
+
"--backend",
|
|
71
|
+
"concave",
|
|
72
|
+
"--scope",
|
|
73
|
+
params.scope
|
|
74
|
+
];
|
|
75
|
+
if (params.sharedDir) args.push("--api", params.sharedDir);
|
|
76
|
+
if (params.configPath) args.push("--config", params.configPath);
|
|
77
|
+
if (params.debug) args.push("--debug");
|
|
78
|
+
const result = await execaFn(runtime, args, {
|
|
79
|
+
cwd: process.cwd(),
|
|
80
|
+
reject: false,
|
|
81
|
+
stdio: "pipe"
|
|
82
|
+
});
|
|
83
|
+
if (result.exitCode !== 0) throw new Error(`Watcher codegen failed with exit code ${result.exitCode}.\n${`${result.stdout ?? ""}\n${result.stderr ?? ""}`.trim()}`);
|
|
84
|
+
}
|
|
36
85
|
async function startWatcher(opts) {
|
|
86
|
+
const backendArg = opts?.backend ?? parseWatcherBackendEnv(process.env.KITCN_BACKEND);
|
|
87
|
+
const configPath = opts?.configPath ?? process.env.KITCN_CONFIG_PATH;
|
|
37
88
|
const sharedDir = opts?.sharedDir ?? (process.env.KITCN_API_OUTPUT_DIR || void 0);
|
|
38
89
|
const debug = opts?.debug ?? process.env.KITCN_DEBUG === "1";
|
|
39
90
|
const scope = opts?.scope ?? process.env.KITCN_CODEGEN_SCOPE ?? "all";
|
|
@@ -41,6 +92,7 @@ async function startWatcher(opts) {
|
|
|
41
92
|
const debounceMs = opts?.debounceMs ?? 100;
|
|
42
93
|
const resolveConfig = opts?.getConvexConfig ?? getConvexConfig;
|
|
43
94
|
const runGenerateMeta = opts?.generateMeta ?? generateMeta;
|
|
95
|
+
const runWatchCodegen = opts?.runWatcherCodegen ?? runWatcherCodegen;
|
|
44
96
|
const { functionsDir, outputFile } = resolveConfig(sharedDir);
|
|
45
97
|
const watchRoots = getWatchRoots(functionsDir);
|
|
46
98
|
const watch = opts?.watch ?? (await import("chokidar")).watch;
|
|
@@ -63,7 +115,15 @@ async function startWatcher(opts) {
|
|
|
63
115
|
}
|
|
64
116
|
generateMetaInFlight = true;
|
|
65
117
|
try {
|
|
66
|
-
|
|
118
|
+
if (backendArg || configPath) await runWatchCodegen({
|
|
119
|
+
backendArg,
|
|
120
|
+
configPath,
|
|
121
|
+
debug,
|
|
122
|
+
scope,
|
|
123
|
+
sharedDir,
|
|
124
|
+
trimSegments
|
|
125
|
+
});
|
|
126
|
+
else await runGenerateMeta(sharedDir, createGenerateOptions());
|
|
67
127
|
logger.success("Convex api updated");
|
|
68
128
|
} catch (error) {
|
|
69
129
|
logger.error("Watch codegen error:", error);
|
|
@@ -93,4 +153,4 @@ if (process.argv[1] && path.resolve(process.argv[1]) === fileURLToPath(import.me
|
|
|
93
153
|
});
|
|
94
154
|
|
|
95
155
|
//#endregion
|
|
96
|
-
export { getWatchRoots, shouldIgnoreWatchPath, startWatcher };
|
|
156
|
+
export { getWatchRoots, runWatcherCodegen, shouldIgnoreWatchPath, startWatcher };
|
|
@@ -3826,7 +3826,7 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
3826
3826
|
readonly aggregate_member: ConvexTableWithColumns<{
|
|
3827
3827
|
name: "aggregate_member";
|
|
3828
3828
|
columns: {
|
|
3829
|
-
|
|
3829
|
+
tableKey: ConvexTextBuilderInitial<""> & {
|
|
3830
3830
|
_: {
|
|
3831
3831
|
notNull: true;
|
|
3832
3832
|
};
|
|
@@ -3836,10 +3836,10 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
3836
3836
|
};
|
|
3837
3837
|
} & {
|
|
3838
3838
|
_: {
|
|
3839
|
-
fieldName: "
|
|
3839
|
+
fieldName: "tableKey";
|
|
3840
3840
|
};
|
|
3841
3841
|
};
|
|
3842
|
-
|
|
3842
|
+
kind: ConvexTextBuilderInitial<""> & {
|
|
3843
3843
|
_: {
|
|
3844
3844
|
notNull: true;
|
|
3845
3845
|
};
|
|
@@ -3849,7 +3849,7 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
3849
3849
|
};
|
|
3850
3850
|
} & {
|
|
3851
3851
|
_: {
|
|
3852
|
-
fieldName: "
|
|
3852
|
+
fieldName: "kind";
|
|
3853
3853
|
};
|
|
3854
3854
|
};
|
|
3855
3855
|
indexName: ConvexTextBuilderInitial<""> & {
|
|
@@ -3992,11 +3992,7 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
3992
3992
|
readonly aggregate_extrema: ConvexTableWithColumns<{
|
|
3993
3993
|
name: "aggregate_extrema";
|
|
3994
3994
|
columns: {
|
|
3995
|
-
|
|
3996
|
-
_: {
|
|
3997
|
-
$type: convex_values0.Value;
|
|
3998
|
-
};
|
|
3999
|
-
} & {
|
|
3995
|
+
tableKey: ConvexTextBuilderInitial<""> & {
|
|
4000
3996
|
_: {
|
|
4001
3997
|
notNull: true;
|
|
4002
3998
|
};
|
|
@@ -4006,10 +4002,10 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
4006
4002
|
};
|
|
4007
4003
|
} & {
|
|
4008
4004
|
_: {
|
|
4009
|
-
fieldName: "
|
|
4005
|
+
fieldName: "tableKey";
|
|
4010
4006
|
};
|
|
4011
4007
|
};
|
|
4012
|
-
|
|
4008
|
+
indexName: ConvexTextBuilderInitial<""> & {
|
|
4013
4009
|
_: {
|
|
4014
4010
|
notNull: true;
|
|
4015
4011
|
};
|
|
@@ -4019,10 +4015,10 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
4019
4015
|
};
|
|
4020
4016
|
} & {
|
|
4021
4017
|
_: {
|
|
4022
|
-
fieldName: "
|
|
4018
|
+
fieldName: "indexName";
|
|
4023
4019
|
};
|
|
4024
4020
|
};
|
|
4025
|
-
|
|
4021
|
+
updatedAt: ConvexNumberBuilderInitial<""> & {
|
|
4026
4022
|
_: {
|
|
4027
4023
|
notNull: true;
|
|
4028
4024
|
};
|
|
@@ -4032,10 +4028,14 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
4032
4028
|
};
|
|
4033
4029
|
} & {
|
|
4034
4030
|
_: {
|
|
4035
|
-
fieldName: "
|
|
4031
|
+
fieldName: "updatedAt";
|
|
4036
4032
|
};
|
|
4037
4033
|
};
|
|
4038
|
-
|
|
4034
|
+
value: ConvexCustomBuilderInitial<"", convex_values0.VAny<any, "required", string>> & {
|
|
4035
|
+
_: {
|
|
4036
|
+
$type: convex_values0.Value;
|
|
4037
|
+
};
|
|
4038
|
+
} & {
|
|
4039
4039
|
_: {
|
|
4040
4040
|
notNull: true;
|
|
4041
4041
|
};
|
|
@@ -4045,7 +4045,7 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
4045
4045
|
};
|
|
4046
4046
|
} & {
|
|
4047
4047
|
_: {
|
|
4048
|
-
fieldName: "
|
|
4048
|
+
fieldName: "value";
|
|
4049
4049
|
};
|
|
4050
4050
|
};
|
|
4051
4051
|
keyHash: ConvexTextBuilderInitial<""> & {
|
|
@@ -4244,7 +4244,7 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
4244
4244
|
readonly aggregate_state: ConvexTableWithColumns<{
|
|
4245
4245
|
name: "aggregate_state";
|
|
4246
4246
|
columns: {
|
|
4247
|
-
|
|
4247
|
+
tableKey: ConvexTextBuilderInitial<""> & {
|
|
4248
4248
|
_: {
|
|
4249
4249
|
notNull: true;
|
|
4250
4250
|
};
|
|
@@ -4254,19 +4254,10 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
4254
4254
|
};
|
|
4255
4255
|
} & {
|
|
4256
4256
|
_: {
|
|
4257
|
-
fieldName: "
|
|
4258
|
-
};
|
|
4259
|
-
};
|
|
4260
|
-
cursor: ConvexTextBuilderInitial<""> & {
|
|
4261
|
-
_: {
|
|
4262
|
-
tableName: "aggregate_state";
|
|
4263
|
-
};
|
|
4264
|
-
} & {
|
|
4265
|
-
_: {
|
|
4266
|
-
fieldName: "cursor";
|
|
4257
|
+
fieldName: "tableKey";
|
|
4267
4258
|
};
|
|
4268
4259
|
};
|
|
4269
|
-
|
|
4260
|
+
kind: ConvexTextBuilderInitial<""> & {
|
|
4270
4261
|
_: {
|
|
4271
4262
|
notNull: true;
|
|
4272
4263
|
};
|
|
@@ -4276,7 +4267,7 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
4276
4267
|
};
|
|
4277
4268
|
} & {
|
|
4278
4269
|
_: {
|
|
4279
|
-
fieldName: "
|
|
4270
|
+
fieldName: "kind";
|
|
4280
4271
|
};
|
|
4281
4272
|
};
|
|
4282
4273
|
indexName: ConvexTextBuilderInitial<""> & {
|
|
@@ -4331,6 +4322,15 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
4331
4322
|
fieldName: "status";
|
|
4332
4323
|
};
|
|
4333
4324
|
};
|
|
4325
|
+
cursor: ConvexTextBuilderInitial<""> & {
|
|
4326
|
+
_: {
|
|
4327
|
+
tableName: "aggregate_state";
|
|
4328
|
+
};
|
|
4329
|
+
} & {
|
|
4330
|
+
_: {
|
|
4331
|
+
fieldName: "cursor";
|
|
4332
|
+
};
|
|
4333
|
+
};
|
|
4334
4334
|
processed: ConvexNumberBuilderInitial<""> & {
|
|
4335
4335
|
_: {
|
|
4336
4336
|
notNull: true;
|
|
@@ -4398,35 +4398,26 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
4398
4398
|
readonly migration_state: ConvexTableWithColumns<{
|
|
4399
4399
|
name: "migration_state";
|
|
4400
4400
|
columns: {
|
|
4401
|
-
|
|
4401
|
+
status: ConvexTextBuilderInitial<""> & {
|
|
4402
4402
|
_: {
|
|
4403
|
-
|
|
4403
|
+
notNull: true;
|
|
4404
4404
|
};
|
|
4405
4405
|
} & {
|
|
4406
|
-
_: {
|
|
4407
|
-
fieldName: "cursor";
|
|
4408
|
-
};
|
|
4409
|
-
};
|
|
4410
|
-
direction: ConvexTextBuilderInitial<""> & {
|
|
4411
4406
|
_: {
|
|
4412
4407
|
tableName: "migration_state";
|
|
4413
4408
|
};
|
|
4414
4409
|
} & {
|
|
4415
4410
|
_: {
|
|
4416
|
-
fieldName: "
|
|
4411
|
+
fieldName: "status";
|
|
4417
4412
|
};
|
|
4418
4413
|
};
|
|
4419
|
-
|
|
4420
|
-
_: {
|
|
4421
|
-
notNull: true;
|
|
4422
|
-
};
|
|
4423
|
-
} & {
|
|
4414
|
+
cursor: ConvexTextBuilderInitial<""> & {
|
|
4424
4415
|
_: {
|
|
4425
4416
|
tableName: "migration_state";
|
|
4426
4417
|
};
|
|
4427
4418
|
} & {
|
|
4428
4419
|
_: {
|
|
4429
|
-
fieldName: "
|
|
4420
|
+
fieldName: "cursor";
|
|
4430
4421
|
};
|
|
4431
4422
|
};
|
|
4432
4423
|
processed: ConvexNumberBuilderInitial<""> & {
|
|
@@ -4521,6 +4512,15 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
4521
4512
|
fieldName: "applied";
|
|
4522
4513
|
};
|
|
4523
4514
|
};
|
|
4515
|
+
direction: ConvexTextBuilderInitial<""> & {
|
|
4516
|
+
_: {
|
|
4517
|
+
tableName: "migration_state";
|
|
4518
|
+
};
|
|
4519
|
+
} & {
|
|
4520
|
+
_: {
|
|
4521
|
+
fieldName: "direction";
|
|
4522
|
+
};
|
|
4523
|
+
};
|
|
4524
4524
|
runId: ConvexTextBuilderInitial<""> & {
|
|
4525
4525
|
_: {
|
|
4526
4526
|
tableName: "migration_state";
|
|
@@ -4552,19 +4552,6 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
4552
4552
|
readonly migration_run: ConvexTableWithColumns<{
|
|
4553
4553
|
name: "migration_run";
|
|
4554
4554
|
columns: {
|
|
4555
|
-
direction: ConvexTextBuilderInitial<""> & {
|
|
4556
|
-
_: {
|
|
4557
|
-
notNull: true;
|
|
4558
|
-
};
|
|
4559
|
-
} & {
|
|
4560
|
-
_: {
|
|
4561
|
-
tableName: "migration_run";
|
|
4562
|
-
};
|
|
4563
|
-
} & {
|
|
4564
|
-
_: {
|
|
4565
|
-
fieldName: "direction";
|
|
4566
|
-
};
|
|
4567
|
-
};
|
|
4568
4555
|
status: ConvexTextBuilderInitial<""> & {
|
|
4569
4556
|
_: {
|
|
4570
4557
|
notNull: true;
|
|
@@ -4622,6 +4609,19 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
4622
4609
|
fieldName: "lastError";
|
|
4623
4610
|
};
|
|
4624
4611
|
};
|
|
4612
|
+
direction: ConvexTextBuilderInitial<""> & {
|
|
4613
|
+
_: {
|
|
4614
|
+
notNull: true;
|
|
4615
|
+
};
|
|
4616
|
+
} & {
|
|
4617
|
+
_: {
|
|
4618
|
+
tableName: "migration_run";
|
|
4619
|
+
};
|
|
4620
|
+
} & {
|
|
4621
|
+
_: {
|
|
4622
|
+
fieldName: "direction";
|
|
4623
|
+
};
|
|
4624
|
+
};
|
|
4625
4625
|
runId: ConvexTextBuilderInitial<""> & {
|
|
4626
4626
|
_: {
|
|
4627
4627
|
notNull: true;
|
package/package.json
CHANGED
|
@@ -272,7 +272,15 @@ Repair / remote sync:
|
|
|
272
272
|
bunx kitcn env push
|
|
273
273
|
```
|
|
274
274
|
|
|
275
|
-
Use this
|
|
275
|
+
Use this to sync static `JWKS` onto the target deployment too.
|
|
276
|
+
|
|
277
|
+
```bash
|
|
278
|
+
bunx kitcn env push --prod
|
|
279
|
+
bunx kitcn env push --rotate
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
Use `--prod` for production and `--rotate` when you want fresh keys plus fresh
|
|
283
|
+
`JWKS`. See `/docs/cli/backend#env` for the full env command surface.
|
|
276
284
|
|
|
277
285
|
Rotate later:
|
|
278
286
|
|