@nicia-ai/typegraph 0.14.0 → 0.16.0
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/backend/postgres/index.cjs +32 -26
- package/dist/backend/postgres/index.cjs.map +1 -1
- package/dist/backend/postgres/index.d.cts +5 -5
- package/dist/backend/postgres/index.d.ts +5 -5
- package/dist/backend/postgres/index.js +14 -8
- package/dist/backend/postgres/index.js.map +1 -1
- package/dist/backend/sqlite/index.cjs +12 -12
- package/dist/backend/sqlite/index.d.cts +5 -5
- package/dist/backend/sqlite/index.d.ts +5 -5
- package/dist/backend/sqlite/index.js +2 -2
- package/dist/backend/sqlite/local.cjs +5 -5
- package/dist/backend/sqlite/local.cjs.map +1 -1
- package/dist/backend/sqlite/local.d.cts +3 -3
- package/dist/backend/sqlite/local.d.ts +3 -3
- package/dist/backend/sqlite/local.js +5 -5
- package/dist/backend/sqlite/local.js.map +1 -1
- package/dist/{chunk-QFZ5QB2J.cjs → chunk-3HQLOKS5.cjs} +25 -3
- package/dist/chunk-3HQLOKS5.cjs.map +1 -0
- package/dist/{chunk-OEKH5PWL.cjs → chunk-56RQFK7U.cjs} +22 -15
- package/dist/chunk-56RQFK7U.cjs.map +1 -0
- package/dist/{chunk-KE2BL3JZ.cjs → chunk-CRMN2NOM.cjs} +179 -179
- package/dist/chunk-CRMN2NOM.cjs.map +1 -0
- package/dist/{chunk-BNIBR5U2.js → chunk-HWWF3FOP.js} +91 -91
- package/dist/chunk-HWWF3FOP.js.map +1 -0
- package/dist/{chunk-KLOSTZDQ.js → chunk-L4ON6RJF.js} +25 -3
- package/dist/chunk-L4ON6RJF.js.map +1 -0
- package/dist/{chunk-RVUEBUBH.js → chunk-XZBAGJJH.js} +15 -8
- package/dist/chunk-XZBAGJJH.js.map +1 -0
- package/dist/{ddl-BJg93HDN.d.cts → ddl-BBo2EcFc.d.cts} +2 -2
- package/dist/{ddl-CsfWcl_B.d.ts → ddl-D4jlcOH_.d.ts} +2 -2
- package/dist/index.cjs +92 -74
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6 -6
- package/dist/index.d.ts +6 -6
- package/dist/index.js +61 -43
- package/dist/index.js.map +1 -1
- package/dist/indexes/index.d.cts +2 -2
- package/dist/indexes/index.d.ts +2 -2
- package/dist/interchange/index.d.cts +3 -3
- package/dist/interchange/index.d.ts +3 -3
- package/dist/{manager-oh2mTMvy.d.cts → manager-Bj1UEnhE.d.cts} +2 -2
- package/dist/{manager-qRSdnKEO.d.ts → manager-Chhrq1vl.d.ts} +2 -2
- package/dist/profiler/index.d.cts +3 -3
- package/dist/profiler/index.d.ts +3 -3
- package/dist/schema/index.cjs +20 -20
- package/dist/schema/index.d.cts +4 -4
- package/dist/schema/index.d.ts +4 -4
- package/dist/schema/index.js +2 -2
- package/dist/{sqlite-DVca_IIy.d.cts → sqlite-Blq-AhmK.d.ts} +1 -1
- package/dist/{sqlite-H01wIXvB.d.ts → sqlite-DE-6NWtC.d.cts} +1 -1
- package/dist/{store-B9ItxA-Q.d.ts → store-Bitii3qj.d.ts} +85 -16
- package/dist/{store-BJPIoe8u.d.cts → store-gTd_qa6u.d.cts} +85 -16
- package/dist/{types-Ckfwgv9l.d.cts → types-B3mmOMJV.d.cts} +8 -0
- package/dist/{types-C8Ra3ROE.d.cts → types-CZd2PEOc.d.cts} +8 -2
- package/dist/{types-CC8eB0PB.d.ts → types-Ceb01czq.d.ts} +8 -2
- package/dist/{types-5t_MIcvv.d.ts → types-ThB4cFLp.d.ts} +8 -0
- package/package.json +3 -3
- package/dist/chunk-BNIBR5U2.js.map +0 -1
- package/dist/chunk-KE2BL3JZ.cjs.map +0 -1
- package/dist/chunk-KLOSTZDQ.js.map +0 -1
- package/dist/chunk-OEKH5PWL.cjs.map +0 -1
- package/dist/chunk-QFZ5QB2J.cjs.map +0 -1
- package/dist/chunk-RVUEBUBH.js.map +0 -1
|
@@ -99,7 +99,10 @@ type NonEmptyJsonPointerFor<T> = Exclude<JsonPointerFor<T>, "">;
|
|
|
99
99
|
type NonEmptyJsonPointerSegmentsFor<T> = Exclude<JsonPointerSegmentsFor<T>, readonly []>;
|
|
100
100
|
type IndexFieldInput<T> = (keyof T & string) | NonEmptyJsonPointerFor<T> | NonEmptyJsonPointerSegmentsFor<T> | JsonPointer;
|
|
101
101
|
type NodeIndexConfig<N extends NodeType> = Readonly<{
|
|
102
|
-
fields: readonly
|
|
102
|
+
fields: readonly [
|
|
103
|
+
IndexFieldInput<z.infer<N["schema"]>>,
|
|
104
|
+
...IndexFieldInput<z.infer<N["schema"]>>[]
|
|
105
|
+
];
|
|
103
106
|
coveringFields?: readonly IndexFieldInput<z.infer<N["schema"]>>[] | undefined;
|
|
104
107
|
unique?: boolean | undefined;
|
|
105
108
|
name?: string | undefined;
|
|
@@ -108,7 +111,10 @@ type NodeIndexConfig<N extends NodeType> = Readonly<{
|
|
|
108
111
|
}>;
|
|
109
112
|
type EdgeIndexDirection = "out" | "in" | "none";
|
|
110
113
|
type EdgeIndexConfig<E extends AnyEdgeType> = Readonly<{
|
|
111
|
-
fields: readonly
|
|
114
|
+
fields: readonly [
|
|
115
|
+
IndexFieldInput<z.infer<E["schema"]>>,
|
|
116
|
+
...IndexFieldInput<z.infer<E["schema"]>>[]
|
|
117
|
+
];
|
|
112
118
|
coveringFields?: readonly IndexFieldInput<z.infer<E["schema"]>>[] | undefined;
|
|
113
119
|
unique?: boolean | undefined;
|
|
114
120
|
name?: string | undefined;
|
|
@@ -99,7 +99,10 @@ type NonEmptyJsonPointerFor<T> = Exclude<JsonPointerFor<T>, "">;
|
|
|
99
99
|
type NonEmptyJsonPointerSegmentsFor<T> = Exclude<JsonPointerSegmentsFor<T>, readonly []>;
|
|
100
100
|
type IndexFieldInput<T> = (keyof T & string) | NonEmptyJsonPointerFor<T> | NonEmptyJsonPointerSegmentsFor<T> | JsonPointer;
|
|
101
101
|
type NodeIndexConfig<N extends NodeType> = Readonly<{
|
|
102
|
-
fields: readonly
|
|
102
|
+
fields: readonly [
|
|
103
|
+
IndexFieldInput<z.infer<N["schema"]>>,
|
|
104
|
+
...IndexFieldInput<z.infer<N["schema"]>>[]
|
|
105
|
+
];
|
|
103
106
|
coveringFields?: readonly IndexFieldInput<z.infer<N["schema"]>>[] | undefined;
|
|
104
107
|
unique?: boolean | undefined;
|
|
105
108
|
name?: string | undefined;
|
|
@@ -108,7 +111,10 @@ type NodeIndexConfig<N extends NodeType> = Readonly<{
|
|
|
108
111
|
}>;
|
|
109
112
|
type EdgeIndexDirection = "out" | "in" | "none";
|
|
110
113
|
type EdgeIndexConfig<E extends AnyEdgeType> = Readonly<{
|
|
111
|
-
fields: readonly
|
|
114
|
+
fields: readonly [
|
|
115
|
+
IndexFieldInput<z.infer<E["schema"]>>,
|
|
116
|
+
...IndexFieldInput<z.infer<E["schema"]>>[]
|
|
117
|
+
];
|
|
112
118
|
coveringFields?: readonly IndexFieldInput<z.infer<E["schema"]>>[] | undefined;
|
|
113
119
|
unique?: boolean | undefined;
|
|
114
120
|
name?: string | undefined;
|
|
@@ -593,6 +593,14 @@ type GraphBackend = Readonly<{
|
|
|
593
593
|
* Intended for import-replacement workflows. No hooks, no per-row logic.
|
|
594
594
|
*/
|
|
595
595
|
clearGraph: (graphId: string) => Promise<void>;
|
|
596
|
+
/**
|
|
597
|
+
* Creates the base TypeGraph tables if they don't already exist.
|
|
598
|
+
*
|
|
599
|
+
* Called automatically by `createStoreWithSchema()` when a fresh database
|
|
600
|
+
* is detected. Users who manage DDL themselves via `createStore()` never
|
|
601
|
+
* hit this path.
|
|
602
|
+
*/
|
|
603
|
+
bootstrapTables?: () => Promise<void>;
|
|
596
604
|
execute: <T>(query: SQL) => Promise<readonly T[]>;
|
|
597
605
|
/** Execute pre-compiled SQL text with bound parameters. Available on sync SQLite and pg backends. */
|
|
598
606
|
executeRaw?: <T>(sqlText: string, params: readonly unknown[]) => Promise<readonly T[]>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nicia-ai/typegraph",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.16.0",
|
|
4
4
|
"description": "TypeScript-first embedded knowledge graph library with ontological reasoning",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -142,11 +142,11 @@
|
|
|
142
142
|
"@types/pg": "^8.20.0",
|
|
143
143
|
"@vitest/coverage-v8": "^4.1.2",
|
|
144
144
|
"better-sqlite3": "^12.8.0",
|
|
145
|
-
"drizzle-orm": "^0.45.
|
|
145
|
+
"drizzle-orm": "^0.45.2",
|
|
146
146
|
"eslint": "^10.1.0",
|
|
147
147
|
"fast-check": "^4.6.0",
|
|
148
148
|
"pg": "^8.20.0",
|
|
149
|
-
"sqlite-vec": "^0.1.
|
|
149
|
+
"sqlite-vec": "^0.1.8",
|
|
150
150
|
"tsd": "^0.33.0",
|
|
151
151
|
"tsup": "^8.5.1",
|
|
152
152
|
"typescript": "^5.9.3",
|