@confect/server 9.0.2 → 9.1.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/CHANGELOG.md +26 -0
- package/dist/ActionCtx.d.ts +3 -2
- package/dist/ActionCtx.d.ts.map +1 -1
- package/dist/ActionCtx.js.map +1 -1
- package/dist/DatabaseReader.d.ts +18 -4324
- package/dist/DatabaseReader.d.ts.map +1 -1
- package/dist/DatabaseReader.js.map +1 -1
- package/dist/DatabaseWriter.d.ts +25 -33
- package/dist/DatabaseWriter.d.ts.map +1 -1
- package/dist/DatabaseWriter.js.map +1 -1
- package/dist/Document.d.ts +2 -0
- package/dist/Document.d.ts.map +1 -1
- package/dist/Document.js.map +1 -1
- package/dist/MutationCtx.d.ts +3 -2
- package/dist/MutationCtx.d.ts.map +1 -1
- package/dist/MutationCtx.js.map +1 -1
- package/dist/OrderedQuery.d.ts +6 -6
- package/dist/OrderedQuery.d.ts.map +1 -1
- package/dist/OrderedQuery.js.map +1 -1
- package/dist/QueryCtx.d.ts +3 -2
- package/dist/QueryCtx.d.ts.map +1 -1
- package/dist/QueryCtx.js.map +1 -1
- package/dist/QueryInitializer.d.ts +7 -7
- package/dist/QueryInitializer.d.ts.map +1 -1
- package/dist/QueryInitializer.js.map +1 -1
- package/dist/RegisteredConvexFunction.d.ts +1 -1089
- package/dist/RegisteredConvexFunction.d.ts.map +1 -1
- package/dist/RegisteredFunction.d.ts +1 -8
- package/dist/RegisteredFunction.d.ts.map +1 -1
- package/dist/VectorSearch.d.ts +15 -28
- package/dist/VectorSearch.d.ts.map +1 -1
- package/dist/VectorSearch.js.map +1 -1
- package/dist/tsconfig.src.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/src/ActionCtx.ts +10 -4
- package/src/DatabaseReader.ts +58 -13
- package/src/DatabaseWriter.ts +70 -7
- package/src/Document.ts +6 -0
- package/src/MutationCtx.ts +10 -4
- package/src/OrderedQuery.ts +6 -14
- package/src/QueryCtx.ts +10 -4
- package/src/QueryInitializer.ts +20 -25
- package/src/VectorSearch.ts +23 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,31 @@
|
|
|
1
1
|
# @confect/server
|
|
2
2
|
|
|
3
|
+
## 9.1.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 308b347: Fix codegen emitting an invalid `interface … extends Document.Document<…>` in `_generated/docs.ts` for tables whose document type is not a single object.
|
|
8
|
+
|
|
9
|
+
`Document.Document<Schema, Table>` is a type alias that resolves to whatever the table's schema is, so for a `Schema.Union` table (or any non-object document: branded primitives, `Schema.transform` results, …) it resolves to a union. An `interface` cannot extend a union, so the generated `XDoc` tripped `TS2312` and collapsed to an unusable type, which then broke every reader/writer helper that printed it.
|
|
10
|
+
|
|
11
|
+
Codegen now emits a `type` alias per table — `export type NotesDoc = Document.Document<typeof schemaDefinition, "notes">;` — which keeps the named document type (so declaration emit still prints `NotesDoc` rather than the expanded row) while supporting every document shape. Runtime behaviour is unchanged.
|
|
12
|
+
- @confect/core@9.1.1
|
|
13
|
+
|
|
14
|
+
## 9.1.0
|
|
15
|
+
|
|
16
|
+
### Minor Changes
|
|
17
|
+
|
|
18
|
+
- 8bbde87: Make Confect's public types declaration-emittable, fixing `TS7056` under `tsc --build` with `composite`/`declaration` (e.g. consuming a Confect backend as a referenced TypeScript project).
|
|
19
|
+
|
|
20
|
+
The schema-generic service tags (`DatabaseReader`, `DatabaseWriter`, `VectorSearch`, `QueryCtx`/`MutationCtx`/`ActionCtx`) now back their `Context.GenericTag` with named generic interfaces, and codegen annotates the `_generated/services.ts` exports with the corresponding tag aliases — so declaration emit prints the names by reference instead of re-expanding the whole data model (the example backend's `services.d.ts` drops from ~307 KB to ~5.6 KB).
|
|
21
|
+
|
|
22
|
+
Codegen also emits `_generated/docs.ts` — a nominal `interface` per table plus a `Docs` registry — threaded into the reader/writer tags via the `Document.Document<Schema, Table>` helper, so query/mutation helpers print named document types (e.g. `NotesDoc`) with no added annotations. Runtime behaviour is unchanged.
|
|
23
|
+
|
|
24
|
+
### Patch Changes
|
|
25
|
+
|
|
26
|
+
- Updated dependencies [4d8a568]
|
|
27
|
+
- @confect/core@9.1.0
|
|
28
|
+
|
|
3
29
|
## 9.0.2
|
|
4
30
|
|
|
5
31
|
### Patch Changes
|
package/dist/ActionCtx.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { GenericActionCtx, GenericDataModel } from "convex/server";
|
|
2
2
|
import * as Context from "effect/Context";
|
|
3
|
-
export
|
|
4
|
-
export
|
|
3
|
+
export type ActionCtxTag<DataModel extends GenericDataModel> = Context.Tag<GenericActionCtx<DataModel>, GenericActionCtx<DataModel>>;
|
|
4
|
+
export declare const ActionCtx: <DataModel extends GenericDataModel>() => ActionCtxTag<DataModel>;
|
|
5
|
+
export type ActionCtx<DataModel extends GenericDataModel> = GenericActionCtx<DataModel>;
|
|
5
6
|
//# sourceMappingURL=ActionCtx.d.ts.map
|
package/dist/ActionCtx.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActionCtx.d.ts","sourceRoot":"","sources":["../src/ActionCtx.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACxE,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAE1C,
|
|
1
|
+
{"version":3,"file":"ActionCtx.d.ts","sourceRoot":"","sources":["../src/ActionCtx.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACxE,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAE1C,MAAM,MAAM,YAAY,CAAC,SAAS,SAAS,gBAAgB,IAAI,OAAO,CAAC,GAAG,CACxE,gBAAgB,CAAC,SAAS,CAAC,EAC3B,gBAAgB,CAAC,SAAS,CAAC,CAC5B,CAAC;AAEF,eAAO,MAAM,SAAS,GACpB,SAAS,SAAS,gBAAgB,OAC/B,YAAY,CAAC,SAAS,CACmD,CAAC;AAE/E,MAAM,MAAM,SAAS,CAAC,SAAS,SAAS,gBAAgB,IACtD,gBAAgB,CAAC,SAAS,CAAC,CAAC"}
|
package/dist/ActionCtx.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActionCtx.js","names":[],"sources":["../src/ActionCtx.ts"],"sourcesContent":["import type { GenericActionCtx, GenericDataModel } from \"convex/server\";\nimport * as Context from \"effect/Context\";\n\nexport const ActionCtx =
|
|
1
|
+
{"version":3,"file":"ActionCtx.js","names":[],"sources":["../src/ActionCtx.ts"],"sourcesContent":["import type { GenericActionCtx, GenericDataModel } from \"convex/server\";\nimport * as Context from \"effect/Context\";\n\nexport type ActionCtxTag<DataModel extends GenericDataModel> = Context.Tag<\n GenericActionCtx<DataModel>,\n GenericActionCtx<DataModel>\n>;\n\nexport const ActionCtx = <\n DataModel extends GenericDataModel,\n>(): ActionCtxTag<DataModel> =>\n Context.GenericTag<GenericActionCtx<DataModel>>(\"@confect/server/ActionCtx\");\n\nexport type ActionCtx<DataModel extends GenericDataModel> =\n GenericActionCtx<DataModel>;\n"],"mappings":";;;;;AAQA,MAAa,kBAGX,QAAQ,WAAwC,4BAA4B"}
|