kitcn 0.12.27 → 0.13.1
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 +312 -4
- package/dist/auth/client/index.js +17 -5
- package/dist/auth/config/index.d.ts +1 -1
- package/dist/auth/generated/index.d.ts +1 -1
- package/dist/auth/generated/index.js +1 -1
- package/dist/auth/http/index.d.ts +12 -9
- package/dist/auth/http/index.js +35 -6
- package/dist/auth/index.d.ts +292 -8
- package/dist/auth/index.js +29 -23
- package/dist/auth/nextjs/index.d.ts +4 -3
- package/dist/auth/nextjs/index.js +9 -4
- package/dist/auth/start/index.d.ts +13 -3
- package/dist/auth/start/index.js +97 -8
- package/dist/{backend-core-DqCCa0nr.mjs → backend-core-yq-eWLRJ.mjs} +140 -54
- package/dist/{builder-Cb6gloDB.js → builder-DBgto1yn.js} +4 -3
- package/dist/{caller-factory-cTXNvYdz.js → caller-factory-NEfgD5E0.js} +3 -3
- package/dist/cli.mjs +26 -26
- package/dist/convex-plugin-C3N9BB-J.js +275 -0
- package/dist/convex-plugin-tWTDqoKJ.mjs +276 -0
- package/dist/{create-schema-orm-DOyiNDCx.js → create-schema-orm-B3f2Kc8O.js} +1 -1
- package/dist/crpc/index.d.ts +2 -2
- package/dist/crpc/index.js +3 -3
- package/dist/{customFunctions-C0voKmtx.js → customFunctions-DxEEO4Dq.js} +2 -1
- package/dist/{generated-contract-disabled-21YxPk5W.d.ts → generated-contract-disabled-C_-KWRfT.d.ts} +4 -2
- package/dist/{http-types-BLFA9zS7.d.ts → http-types-zsMHb_QN.d.ts} +2 -2
- package/dist/{middleware-DkIhQXwg.js → middleware-Bg-PdtrI.js} +1 -1
- package/dist/{middleware-nS_qXecO.d.ts → middleware-DrtexzF3.d.ts} +1 -1
- package/dist/orm/index.d.ts +3 -3
- package/dist/orm/index.js +3 -3
- package/dist/plugins/index.d.ts +1 -1
- package/dist/plugins/index.js +1 -1
- package/dist/{procedure-caller-AjLfkHyF.js → procedure-caller-DplSC7Us.js} +2 -2
- package/dist/{procedure-name-D-fDCBlo.d.ts → procedure-name-BCRBr6Po.d.ts} +3 -3
- package/dist/ratelimit/index.d.ts +2 -2
- package/dist/ratelimit/index.js +3 -3
- package/dist/react/index.d.ts +18 -14
- package/dist/react/index.js +14 -27
- package/dist/rsc/index.d.ts +4 -4
- package/dist/rsc/index.js +4 -4
- package/dist/{runtime-CtvJPkur.js → runtime-i6t-HoZn.js} +1 -1
- package/dist/server/index.d.ts +4 -4
- package/dist/server/index.js +4 -4
- package/dist/solid/index.d.ts +300 -4
- package/dist/token-B9Bjcqug.d.ts +13 -0
- package/dist/token-tpipF-7y.js +47 -0
- package/dist/{types-C6pQrnzD.d.ts → types-YHpe0rsb.d.ts} +1 -1
- package/dist/upstream-BR6sBLg3.js +84 -0
- package/dist/upstream-BUCdbLok.mjs +26 -0
- package/dist/{validators-B7oIJCAp.js → validators-C7LelqTN.js} +2 -84
- package/dist/watcher.mjs +1 -1
- package/dist/{where-clause-compiler-DdjN63Io.d.ts → where-clause-compiler-TMppDl9g.d.ts} +51 -51
- package/package.json +5 -4
- package/skills/convex/references/features/auth.md +20 -0
- package/skills/convex/references/features/orm.md +9 -0
- package/skills/convex/references/setup/auth.md +2 -0
- package/skills/convex/references/setup/index.md +5 -5
- package/skills/convex/references/setup/server.md +1 -1
- /package/dist/{api-entry-BUAh_K4k.js → api-entry-N3nBOlI2.js} +0 -0
- /package/dist/{context-utils-BvWW0Ilq.d.ts → context-utils-OMkMGhBk.d.ts} +0 -0
- /package/dist/{create-schema-odyF4kCy.js → create-schema-BXrKE2YY.js} +0 -0
- /package/dist/{error-BZEnI7Sq.js → error-Bvo7YEhk.js} +0 -0
- /package/dist/{generated-contract-disabled-Cih4eITO.js → generated-contract-disabled-BXaz7JCE.js} +0 -0
- /package/dist/{meta-utils-0Pu0Nrap.js → meta-utils-D9K4fICl.js} +0 -0
- /package/dist/{query-context-CFZqIvD7.d.ts → query-context-CNo9ffvI.d.ts} +0 -0
- /package/dist/{query-context-B8o6-8kC.js → query-context-ydn9kb6P.js} +0 -0
- /package/dist/{query-options-Dw7cOyXl.js → query-options-C96zLANM.js} +0 -0
- /package/dist/{transformer-DtDhR3Lc.js → transformer-C6pGVHqx.js} +0 -0
- /package/dist/{types-BiJE7qxR.d.ts → types-BCl8gfGy.d.ts} +0 -0
- /package/dist/{types-a-RHmrDZ.d.ts → types-CnTpHR1F.d.ts} +0 -0
- /package/dist/{types-BTb_4BaU.d.ts → types-DF2cg_w0.d.ts} +0 -0
- /package/dist/{validators-vzRKjBJC.d.ts → validators-BhsByJeg.d.ts} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as ReturnTypeOrValue, i as KnownKeysOnly, o as Simplify$1, t as Assume } from "./types-
|
|
1
|
+
import { a as ReturnTypeOrValue, i as KnownKeysOnly, o as Simplify$1, t as Assume } from "./types-DF2cg_w0.js";
|
|
2
2
|
import * as convex_values0 from "convex/values";
|
|
3
3
|
import { GenericId, Validator, Value } from "convex/values";
|
|
4
4
|
import { DefineSchemaOptions, FilterExpression, GenericDatabaseReader, GenericDatabaseWriter, GenericIndexFields, GenericSchema, GenericTableIndexes, GenericTableSearchIndexes, GenericTableVectorIndexes, IndexRange, IndexRangeBuilder, SchedulableFunctionReference, Scheduler, SchemaDefinition, TableDefinition, VectorFilterBuilder, internalActionGeneric, internalMutationGeneric } from "convex/server";
|
|
@@ -3717,19 +3717,6 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
3717
3717
|
readonly aggregate_bucket: ConvexTableWithColumns<{
|
|
3718
3718
|
name: "aggregate_bucket";
|
|
3719
3719
|
columns: {
|
|
3720
|
-
count: ConvexNumberBuilderInitial<""> & {
|
|
3721
|
-
_: {
|
|
3722
|
-
notNull: true;
|
|
3723
|
-
};
|
|
3724
|
-
} & {
|
|
3725
|
-
_: {
|
|
3726
|
-
tableName: "aggregate_bucket";
|
|
3727
|
-
};
|
|
3728
|
-
} & {
|
|
3729
|
-
_: {
|
|
3730
|
-
fieldName: "count";
|
|
3731
|
-
};
|
|
3732
|
-
};
|
|
3733
3720
|
tableKey: ConvexTextBuilderInitial<""> & {
|
|
3734
3721
|
_: {
|
|
3735
3722
|
notNull: true;
|
|
@@ -3799,6 +3786,19 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
3799
3786
|
fieldName: "keyParts";
|
|
3800
3787
|
};
|
|
3801
3788
|
};
|
|
3789
|
+
count: ConvexNumberBuilderInitial<""> & {
|
|
3790
|
+
_: {
|
|
3791
|
+
notNull: true;
|
|
3792
|
+
};
|
|
3793
|
+
} & {
|
|
3794
|
+
_: {
|
|
3795
|
+
tableName: "aggregate_bucket";
|
|
3796
|
+
};
|
|
3797
|
+
} & {
|
|
3798
|
+
_: {
|
|
3799
|
+
fieldName: "count";
|
|
3800
|
+
};
|
|
3801
|
+
};
|
|
3802
3802
|
sumValues: (NotNull<$Type<ConvexCustomBuilderInitial<"", convex_values0.VRecord<Record<string, any>, convex_values0.VString<string, "required">, convex_values0.VId<any, any> | convex_values0.VString<any, any> | convex_values0.VFloat64<any, any> | convex_values0.VInt64<any, any> | convex_values0.VBoolean<any, any> | convex_values0.VNull<any, any> | convex_values0.VAny<any, any, string> | convex_values0.VLiteral<any, any> | convex_values0.VBytes<any, any> | convex_values0.VObject<any, Record<string, convex_values0.Validator<any, convex_values0.OptionalProperty, any>>, any, any> | convex_values0.VArray<any, convex_values0.Validator<any, "required", any>, any> | convex_values0.VRecord<any, convex_values0.Validator<string, "required", any>, convex_values0.Validator<any, "required", any>, any, any> | convex_values0.VUnion<any, convex_values0.Validator<any, "required", any>[], any, any>, "required", string>>, Record<string, number>>> | NotNull<$Type<ConvexCustomBuilderInitial<"", convex_values0.VId<any, any> | convex_values0.VString<any, any> | convex_values0.VFloat64<any, any> | convex_values0.VInt64<any, any> | convex_values0.VBoolean<any, any> | convex_values0.VNull<any, any> | convex_values0.VAny<any, any, string> | convex_values0.VLiteral<any, any> | convex_values0.VBytes<any, any> | convex_values0.VObject<any, Record<string, convex_values0.Validator<any, convex_values0.OptionalProperty, any>>, any, any> | convex_values0.VArray<any, convex_values0.Validator<any, "required", any>, any> | convex_values0.VRecord<any, convex_values0.Validator<string, "required", any>, convex_values0.Validator<any, "required", any>, any, any> | convex_values0.VUnion<any, convex_values0.Validator<any, "required", any>[], any, any>>, Record<string, number>>>) & {
|
|
3803
3803
|
_: {
|
|
3804
3804
|
tableName: "aggregate_bucket";
|
|
@@ -4009,7 +4009,7 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
4009
4009
|
fieldName: "value";
|
|
4010
4010
|
};
|
|
4011
4011
|
};
|
|
4012
|
-
|
|
4012
|
+
tableKey: ConvexTextBuilderInitial<""> & {
|
|
4013
4013
|
_: {
|
|
4014
4014
|
notNull: true;
|
|
4015
4015
|
};
|
|
@@ -4019,10 +4019,10 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
4019
4019
|
};
|
|
4020
4020
|
} & {
|
|
4021
4021
|
_: {
|
|
4022
|
-
fieldName: "
|
|
4022
|
+
fieldName: "tableKey";
|
|
4023
4023
|
};
|
|
4024
4024
|
};
|
|
4025
|
-
|
|
4025
|
+
indexName: ConvexTextBuilderInitial<""> & {
|
|
4026
4026
|
_: {
|
|
4027
4027
|
notNull: true;
|
|
4028
4028
|
};
|
|
@@ -4032,10 +4032,10 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
4032
4032
|
};
|
|
4033
4033
|
} & {
|
|
4034
4034
|
_: {
|
|
4035
|
-
fieldName: "
|
|
4035
|
+
fieldName: "indexName";
|
|
4036
4036
|
};
|
|
4037
4037
|
};
|
|
4038
|
-
|
|
4038
|
+
updatedAt: ConvexNumberBuilderInitial<""> & {
|
|
4039
4039
|
_: {
|
|
4040
4040
|
notNull: true;
|
|
4041
4041
|
};
|
|
@@ -4045,10 +4045,10 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
4045
4045
|
};
|
|
4046
4046
|
} & {
|
|
4047
4047
|
_: {
|
|
4048
|
-
fieldName: "
|
|
4048
|
+
fieldName: "updatedAt";
|
|
4049
4049
|
};
|
|
4050
4050
|
};
|
|
4051
|
-
|
|
4051
|
+
keyHash: ConvexTextBuilderInitial<""> & {
|
|
4052
4052
|
_: {
|
|
4053
4053
|
notNull: true;
|
|
4054
4054
|
};
|
|
@@ -4058,10 +4058,10 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
4058
4058
|
};
|
|
4059
4059
|
} & {
|
|
4060
4060
|
_: {
|
|
4061
|
-
fieldName: "
|
|
4061
|
+
fieldName: "keyHash";
|
|
4062
4062
|
};
|
|
4063
4063
|
};
|
|
4064
|
-
|
|
4064
|
+
count: ConvexNumberBuilderInitial<""> & {
|
|
4065
4065
|
_: {
|
|
4066
4066
|
notNull: true;
|
|
4067
4067
|
};
|
|
@@ -4071,7 +4071,7 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
4071
4071
|
};
|
|
4072
4072
|
} & {
|
|
4073
4073
|
_: {
|
|
4074
|
-
fieldName: "
|
|
4074
|
+
fieldName: "count";
|
|
4075
4075
|
};
|
|
4076
4076
|
};
|
|
4077
4077
|
fieldName: ConvexTextBuilderInitial<""> & {
|
|
@@ -4244,6 +4244,19 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
4244
4244
|
readonly aggregate_state: ConvexTableWithColumns<{
|
|
4245
4245
|
name: "aggregate_state";
|
|
4246
4246
|
columns: {
|
|
4247
|
+
status: ConvexTextBuilderInitial<""> & {
|
|
4248
|
+
_: {
|
|
4249
|
+
notNull: true;
|
|
4250
|
+
};
|
|
4251
|
+
} & {
|
|
4252
|
+
_: {
|
|
4253
|
+
tableName: "aggregate_state";
|
|
4254
|
+
};
|
|
4255
|
+
} & {
|
|
4256
|
+
_: {
|
|
4257
|
+
fieldName: "status";
|
|
4258
|
+
};
|
|
4259
|
+
};
|
|
4247
4260
|
kind: ConvexTextBuilderInitial<""> & {
|
|
4248
4261
|
_: {
|
|
4249
4262
|
notNull: true;
|
|
@@ -4318,19 +4331,6 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
4318
4331
|
fieldName: "metricDefinitionHash";
|
|
4319
4332
|
};
|
|
4320
4333
|
};
|
|
4321
|
-
status: ConvexTextBuilderInitial<""> & {
|
|
4322
|
-
_: {
|
|
4323
|
-
notNull: true;
|
|
4324
|
-
};
|
|
4325
|
-
} & {
|
|
4326
|
-
_: {
|
|
4327
|
-
tableName: "aggregate_state";
|
|
4328
|
-
};
|
|
4329
|
-
} & {
|
|
4330
|
-
_: {
|
|
4331
|
-
fieldName: "status";
|
|
4332
|
-
};
|
|
4333
|
-
};
|
|
4334
4334
|
processed: ConvexNumberBuilderInitial<""> & {
|
|
4335
4335
|
_: {
|
|
4336
4336
|
notNull: true;
|
|
@@ -4398,35 +4398,35 @@ 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
|
+
_: {
|
|
4403
|
+
notNull: true;
|
|
4404
|
+
};
|
|
4405
|
+
} & {
|
|
4402
4406
|
_: {
|
|
4403
4407
|
tableName: "migration_state";
|
|
4404
4408
|
};
|
|
4405
4409
|
} & {
|
|
4406
4410
|
_: {
|
|
4407
|
-
fieldName: "
|
|
4411
|
+
fieldName: "status";
|
|
4408
4412
|
};
|
|
4409
4413
|
};
|
|
4410
|
-
|
|
4414
|
+
cursor: ConvexTextBuilderInitial<""> & {
|
|
4411
4415
|
_: {
|
|
4412
4416
|
tableName: "migration_state";
|
|
4413
4417
|
};
|
|
4414
4418
|
} & {
|
|
4415
4419
|
_: {
|
|
4416
|
-
fieldName: "
|
|
4420
|
+
fieldName: "cursor";
|
|
4417
4421
|
};
|
|
4418
4422
|
};
|
|
4419
|
-
|
|
4420
|
-
_: {
|
|
4421
|
-
notNull: true;
|
|
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
|
processed: ConvexNumberBuilderInitial<""> & {
|
|
@@ -4552,7 +4552,7 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
4552
4552
|
readonly migration_run: ConvexTableWithColumns<{
|
|
4553
4553
|
name: "migration_run";
|
|
4554
4554
|
columns: {
|
|
4555
|
-
|
|
4555
|
+
status: ConvexTextBuilderInitial<""> & {
|
|
4556
4556
|
_: {
|
|
4557
4557
|
notNull: true;
|
|
4558
4558
|
};
|
|
@@ -4562,10 +4562,10 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
4562
4562
|
};
|
|
4563
4563
|
} & {
|
|
4564
4564
|
_: {
|
|
4565
|
-
fieldName: "
|
|
4565
|
+
fieldName: "status";
|
|
4566
4566
|
};
|
|
4567
4567
|
};
|
|
4568
|
-
|
|
4568
|
+
direction: ConvexTextBuilderInitial<""> & {
|
|
4569
4569
|
_: {
|
|
4570
4570
|
notNull: true;
|
|
4571
4571
|
};
|
|
@@ -4575,7 +4575,7 @@ declare const BUILTIN_SCHEMA_EXTENSIONS: readonly [SchemaExtension<{
|
|
|
4575
4575
|
};
|
|
4576
4576
|
} & {
|
|
4577
4577
|
_: {
|
|
4578
|
-
fieldName: "
|
|
4578
|
+
fieldName: "direction";
|
|
4579
4579
|
};
|
|
4580
4580
|
};
|
|
4581
4581
|
startedAt: ConvexNumberBuilderInitial<""> & {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kitcn",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.1",
|
|
4
4
|
"description": "kitcn - React Query integration and CLI tools for Convex",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"convex",
|
|
@@ -58,8 +58,8 @@
|
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
60
|
"@babel/parser": "^7.28.4",
|
|
61
|
+
"@better-fetch/fetch": "^1.1.21",
|
|
61
62
|
"@clack/prompts": "^0.11.0",
|
|
62
|
-
"@convex-dev/better-auth": "^0.11.1",
|
|
63
63
|
"chokidar": "^5.0.0",
|
|
64
64
|
"common-tags": "^1.8.2",
|
|
65
65
|
"diff": "^8.0.2",
|
|
@@ -69,6 +69,7 @@
|
|
|
69
69
|
"jiti": "^2.6.1",
|
|
70
70
|
"jotai": "^2.18.0",
|
|
71
71
|
"jotai-x": "^2.3.3",
|
|
72
|
+
"jose": "^6.1.3",
|
|
72
73
|
"picocolors": "^1.1.1",
|
|
73
74
|
"remeda": "^2.33.6",
|
|
74
75
|
"svix": "^1.84.1",
|
|
@@ -88,8 +89,8 @@
|
|
|
88
89
|
"@tanstack/query-core": ">=5",
|
|
89
90
|
"@tanstack/react-query": ">=5",
|
|
90
91
|
"@tanstack/solid-query": ">=5",
|
|
91
|
-
"better-auth": "1.5
|
|
92
|
-
"convex": ">=1.
|
|
92
|
+
"better-auth": "1.6.5",
|
|
93
|
+
"convex": ">=1.35",
|
|
93
94
|
"hono": "4.12.9",
|
|
94
95
|
"next": ">=14",
|
|
95
96
|
"react": ">=18",
|
|
@@ -161,6 +161,9 @@ If you want to own the auth tables by hand, use `setup/server.md`.
|
|
|
161
161
|
|
|
162
162
|
Import auth route helpers from `kitcn/auth/http`.
|
|
163
163
|
That entrypoint auto-installs the Convex-safe `MessageChannel` polyfill.
|
|
164
|
+
`registerRoutes` is lazy by default, so Better Auth does not initialize during
|
|
165
|
+
`convex/http.ts` registration. If your auth config uses a custom base path, pass
|
|
166
|
+
the same `basePath` to `registerRoutes`.
|
|
164
167
|
|
|
165
168
|
### 7. HTTP Routes
|
|
166
169
|
|
|
@@ -186,6 +189,23 @@ app.use(authMiddleware(getAuth));
|
|
|
186
189
|
export default createHttpRouter(app, httpRouter);
|
|
187
190
|
```
|
|
188
191
|
|
|
192
|
+
```ts
|
|
193
|
+
// convex/functions/http.ts - plain Convex option
|
|
194
|
+
import { registerRoutes } from 'kitcn/auth/http';
|
|
195
|
+
import { httpRouter } from 'convex/server';
|
|
196
|
+
import { getAuth } from './generated/auth';
|
|
197
|
+
|
|
198
|
+
const http = httpRouter();
|
|
199
|
+
|
|
200
|
+
registerRoutes(http, getAuth, {
|
|
201
|
+
cors: {
|
|
202
|
+
allowedOrigins: [process.env.SITE_URL!],
|
|
203
|
+
},
|
|
204
|
+
});
|
|
205
|
+
|
|
206
|
+
export default http;
|
|
207
|
+
```
|
|
208
|
+
|
|
189
209
|
### 8. Environment Variables
|
|
190
210
|
|
|
191
211
|
```bash
|
|
@@ -75,6 +75,15 @@ parentId: text().references((): AnyColumn => commentsTable.id, {
|
|
|
75
75
|
onDelete: "cascade",
|
|
76
76
|
});
|
|
77
77
|
|
|
78
|
+
// Bidirectional CMS revision pointers also work.
|
|
79
|
+
// This shape is valid:
|
|
80
|
+
// - revision.pageLocaleId -> pageLocales.id
|
|
81
|
+
// - pageLocales.currentRevisionId -> pageLocaleRevisions.id
|
|
82
|
+
// - pageLocales.publishedRevisionId -> pageLocaleRevisions.id
|
|
83
|
+
currentRevisionId: id("pageLocaleRevisions").references(
|
|
84
|
+
() => pageLocaleRevisions.id
|
|
85
|
+
);
|
|
86
|
+
|
|
78
87
|
// Table-level (foreignKey builder, for non-id references)
|
|
79
88
|
import { foreignKey } from "kitcn/orm";
|
|
80
89
|
(t) => [foreignKey({ columns: [t.userSlug], foreignColumns: [users.slug] })];
|
|
@@ -200,6 +200,8 @@ Keep all auth reads/writes on ORM table definitions in `convex/functions/schema.
|
|
|
200
200
|
|
|
201
201
|
Use `kitcn/auth/http` for `authMiddleware` or `registerRoutes`.
|
|
202
202
|
It auto-installs the Convex-safe `MessageChannel` polyfill, so no manual `http-polyfills.ts` file is needed.
|
|
203
|
+
`registerRoutes` is lazy by default. If the auth config uses a custom base path,
|
|
204
|
+
pass that same `basePath` in the route options.
|
|
203
205
|
|
|
204
206
|
**Create:** `convex/functions/http.ts`
|
|
205
207
|
|
|
@@ -91,9 +91,9 @@ npx kitcn@latest init -t next --yes
|
|
|
91
91
|
|
|
92
92
|
Then start the long-running backend with `bunx kitcn dev`, run the
|
|
93
93
|
framework dev server (`bun dev` for the Next starter), and open `/convex` for
|
|
94
|
-
the scaffolded messages demo. In `--yes` mode,
|
|
95
|
-
|
|
96
|
-
|
|
94
|
+
the scaffolded messages demo. In `--yes` mode, Convex uses anonymous local
|
|
95
|
+
deployment setup when no account is linked yet, so the starter path does not
|
|
96
|
+
stop on a login prompt.
|
|
97
97
|
|
|
98
98
|
Use the CLI first:
|
|
99
99
|
|
|
@@ -759,7 +759,7 @@ This runbook + references map to the canonical template shape as follows:
|
|
|
759
759
|
| Symptom | Likely Cause | Fix |
|
|
760
760
|
| ------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
761
761
|
| `@convex/api` not found | `kitcn dev` not run | Run `bunx kitcn dev` and regenerate API metadata |
|
|
762
|
-
| `Cannot prompt for input in non-interactive terminals` during bootstrap | Convex deployment
|
|
762
|
+
| `Cannot prompt for input in non-interactive terminals` during bootstrap | Convex deployment targeting is ambiguous | Use `bunx kitcn verify` for local proof, or pass `--env-file` / deployment-target args so Convex can resolve the deployment without prompting |
|
|
763
763
|
| Can't find new local backend files under `~/.convex` | Convex now stores new local deployment state per project | Check `.convex/local/default/` in the current project root; treat `~/.convex/**` as legacy storage |
|
|
764
764
|
| `kitcn env push` fails to set auth vars | Target deployment is not active or not initialized | For local proof, run `bunx kitcn verify`. For remote targets, resolve deployment targeting, then rerun `bunx kitcn env push` |
|
|
765
765
|
| `Failed to analyze auth.js` with `Unexpected token` / `map is not a function` on JWKS | Static `JWKS` value is malformed JSON | Unset/fix `JWKS`; use `getAuthConfigProvider()` fallback or repush with `bunx kitcn env push` |
|
|
@@ -772,7 +772,7 @@ This runbook + references map to the canonical template shape as follows:
|
|
|
772
772
|
| `Property 'insert'/'update' does not exist on type 'OrmReader'` | Using query context for mutations | Ensure mutation handlers use `publicMutation` / `protectedMutation` builders |
|
|
773
773
|
| `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) |
|
|
774
774
|
| Route auth cookies not set | Missing CORS auth headers | Add `Better-Auth-Cookie` allow/expose headers + credentials |
|
|
775
|
-
| TanStack Start auth helper import errors | Using `kitcn/auth/nextjs` in Start app | Use TanStack Start
|
|
775
|
+
| TanStack Start auth helper import errors | Using `kitcn/auth/nextjs` in Start app | Use the TanStack Start helper from `kitcn/auth/start` |
|
|
776
776
|
| `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 |
|
|
777
777
|
| 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 |
|
|
778
778
|
| `Invalid orderBy value. Use a column or asc()/desc()` | Wrong `orderBy` shape (`[{ field, direction }]`) | Use object form only, e.g. `orderBy: { updatedAt: "desc" }` |
|
|
@@ -205,7 +205,7 @@ Do not fake generated files.
|
|
|
205
205
|
Automation/non-interactive path:
|
|
206
206
|
|
|
207
207
|
1. Run `npx kitcn@latest init --yes` when you want scaffold or adoption plus the one-shot local Convex bootstrap in one command.
|
|
208
|
-
2. Run `bunx kitcn verify` when you want a non-interactive local runtime proof in the current app. Stop any long-running local backend first. It reuses an existing local deployment when one is already configured, and
|
|
208
|
+
2. Run `bunx kitcn verify` when you want a non-interactive local runtime proof in the current app. Stop any long-running local backend first. It reuses an existing local deployment when one is already configured, and lets Convex create anonymous local state when no local deployment is configured.
|
|
209
209
|
3. Confirm the generated runtime exists in `convex/functions/generated/server.ts`.
|
|
210
210
|
4. Then run `bunx kitcn dev` for ongoing codegen/API refresh.
|
|
211
211
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/{generated-contract-disabled-Cih4eITO.js → generated-contract-disabled-BXaz7JCE.js}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|