@nicia-ai/typegraph 0.38.0 → 0.39.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 +16 -16
- package/dist/backend/postgres/index.js +3 -3
- package/dist/backend/postgres/pglite-store.cjs +11 -11
- package/dist/backend/postgres/pglite-store.d.cts +1 -1
- package/dist/backend/postgres/pglite-store.d.ts +1 -1
- package/dist/backend/postgres/pglite-store.js +8 -8
- package/dist/backend/postgres/pglite.cjs +5 -5
- package/dist/backend/postgres/pglite.js +4 -4
- package/dist/backend/sqlite/index.cjs +6 -6
- package/dist/backend/sqlite/index.js +3 -3
- package/dist/backend/sqlite/libsql.cjs +5 -5
- package/dist/backend/sqlite/libsql.js +3 -3
- package/dist/backend/sqlite/local-store.cjs +11 -11
- package/dist/backend/sqlite/local-store.d.cts +1 -1
- package/dist/backend/sqlite/local-store.d.ts +1 -1
- package/dist/backend/sqlite/local-store.js +9 -9
- package/dist/backend/sqlite/local.cjs +6 -6
- package/dist/backend/sqlite/local.js +4 -4
- package/dist/{chunk-UPXDVI3T.js → chunk-3SK4SVTW.js} +3 -3
- package/dist/{chunk-UPXDVI3T.js.map → chunk-3SK4SVTW.js.map} +1 -1
- package/dist/{chunk-NU23DUSJ.cjs → chunk-3YFDFOYB.cjs} +7 -7
- package/dist/{chunk-NU23DUSJ.cjs.map → chunk-3YFDFOYB.cjs.map} +1 -1
- package/dist/{chunk-NWYCOFEZ.cjs → chunk-5ELKD2FQ.cjs} +4 -4
- package/dist/chunk-5ELKD2FQ.cjs.map +1 -0
- package/dist/{chunk-2SL7OGPR.cjs → chunk-6SRLCSAV.cjs} +478 -338
- package/dist/chunk-6SRLCSAV.cjs.map +1 -0
- package/dist/{chunk-A2FGSWMQ.js → chunk-CBK2IVI2.js} +167 -27
- package/dist/chunk-CBK2IVI2.js.map +1 -0
- package/dist/{chunk-TE5ZA4VX.js → chunk-DOKUXLFH.js} +14 -10
- package/dist/chunk-DOKUXLFH.js.map +1 -0
- package/dist/{chunk-KCLZHYPU.cjs → chunk-E2Q7SP2K.cjs} +52 -52
- package/dist/{chunk-KCLZHYPU.cjs.map → chunk-E2Q7SP2K.cjs.map} +1 -1
- package/dist/{chunk-YLINFV7Z.cjs → chunk-GKQU44SQ.cjs} +67 -63
- package/dist/chunk-GKQU44SQ.cjs.map +1 -0
- package/dist/{chunk-O5H62ZWJ.cjs → chunk-HP6LWBLB.cjs} +14 -2
- package/dist/chunk-HP6LWBLB.cjs.map +1 -0
- package/dist/{chunk-7VLCN3JB.cjs → chunk-HTQOBY75.cjs} +59 -59
- package/dist/{chunk-7VLCN3JB.cjs.map → chunk-HTQOBY75.cjs.map} +1 -1
- package/dist/{chunk-RQPRCEIO.js → chunk-IFDXG2YJ.js} +3 -3
- package/dist/chunk-IFDXG2YJ.js.map +1 -0
- package/dist/{chunk-YJDSPA5E.js → chunk-IFRPHG7O.js} +4 -4
- package/dist/{chunk-YJDSPA5E.js.map → chunk-IFRPHG7O.js.map} +1 -1
- package/dist/{chunk-LZ3TVJY4.cjs → chunk-JD2YC62H.cjs} +17 -17
- package/dist/{chunk-LZ3TVJY4.cjs.map → chunk-JD2YC62H.cjs.map} +1 -1
- package/dist/{chunk-XD6X7O5R.js → chunk-KAFXPB2L.js} +4 -4
- package/dist/{chunk-XD6X7O5R.js.map → chunk-KAFXPB2L.js.map} +1 -1
- package/dist/{chunk-ZHX4KEM7.cjs → chunk-KIZSHRUI.cjs} +7 -7
- package/dist/{chunk-ZHX4KEM7.cjs.map → chunk-KIZSHRUI.cjs.map} +1 -1
- package/dist/{chunk-G32AO634.js → chunk-KXFUQNF2.js} +3 -3
- package/dist/{chunk-G32AO634.js.map → chunk-KXFUQNF2.js.map} +1 -1
- package/dist/{chunk-E6YZRKMM.js → chunk-NQBYTLPW.js} +4 -4
- package/dist/{chunk-E6YZRKMM.js.map → chunk-NQBYTLPW.js.map} +1 -1
- package/dist/{chunk-VBH7ZXSZ.js → chunk-SU7VQOJ3.js} +3 -3
- package/dist/{chunk-VBH7ZXSZ.js.map → chunk-SU7VQOJ3.js.map} +1 -1
- package/dist/{chunk-KFLXWVUJ.js → chunk-UUIBACKJ.js} +14 -3
- package/dist/chunk-UUIBACKJ.js.map +1 -0
- package/dist/{chunk-CQC6VBAF.cjs → chunk-VXAFOF6Z.cjs} +5 -5
- package/dist/{chunk-CQC6VBAF.cjs.map → chunk-VXAFOF6Z.cjs.map} +1 -1
- package/dist/{chunk-XFY73JWD.cjs → chunk-Y6UA55YS.cjs} +5 -5
- package/dist/{chunk-XFY73JWD.cjs.map → chunk-Y6UA55YS.cjs.map} +1 -1
- package/dist/{chunk-6G5CQ6JX.js → chunk-YPUNPG2T.js} +4 -4
- package/dist/{chunk-6G5CQ6JX.js.map → chunk-YPUNPG2T.js.map} +1 -1
- package/dist/graph-merge/index.cjs +30 -32
- package/dist/graph-merge/index.cjs.map +1 -1
- package/dist/graph-merge/index.d.cts +10 -5
- package/dist/graph-merge/index.d.ts +10 -5
- package/dist/graph-merge/index.js +9 -11
- package/dist/graph-merge/index.js.map +1 -1
- package/dist/index.cjs +68 -68
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +5 -5
- package/dist/interchange/index.cjs +23 -23
- package/dist/interchange/index.d.cts +1 -1
- package/dist/interchange/index.d.ts +1 -1
- package/dist/interchange/index.js +4 -4
- package/dist/profiler/index.d.cts +1 -1
- package/dist/profiler/index.d.ts +1 -1
- package/dist/provenance/index.cjs +11 -11
- package/dist/provenance/index.d.cts +1 -1
- package/dist/provenance/index.d.ts +1 -1
- package/dist/provenance/index.js +2 -2
- package/dist/schema/index.cjs +22 -22
- package/dist/schema/index.js +3 -3
- package/dist/{store-view-BoHqdHjB.d.cts → store-view-BJd6Vwpt.d.cts} +39 -17
- package/dist/{store-view-Ctq-3OHy.d.ts → store-view-CLIhwMMX.d.ts} +39 -17
- package/package.json +1 -1
- package/dist/chunk-2SL7OGPR.cjs.map +0 -1
- package/dist/chunk-A2FGSWMQ.js.map +0 -1
- package/dist/chunk-KFLXWVUJ.js.map +0 -1
- package/dist/chunk-NWYCOFEZ.cjs.map +0 -1
- package/dist/chunk-O5H62ZWJ.cjs.map +0 -1
- package/dist/chunk-RQPRCEIO.js.map +0 -1
- package/dist/chunk-TE5ZA4VX.js.map +0 -1
- package/dist/chunk-YLINFV7Z.cjs.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { G as GraphDef, N as NodeKinds, c as GetNodeType } from '../define-graph-CzEvA_8F.cjs';
|
|
2
|
-
import { a as Store, ar as Node,
|
|
2
|
+
import { a as Store, ar as Node, bQ as UniqueIntrospection } from '../store-view-BJd6Vwpt.cjs';
|
|
3
3
|
import { m as NodeId, a as NodeType, g as EdgeId, J as JsonValue, l as KindAnnotations, d as EdgeType, D as DeleteBehavior, T as TemporalMode, k as GraphExtensionVersion, u as ExtensionNodeDef, v as ExtensionEdgeDef, w as ExtensionOntologyRelation, x as ExtensionIndex } from '../extension-types-BLEVH4SG.cjs';
|
|
4
4
|
import { $ as TypeGraphError } from '../index-BihFPsPu.cjs';
|
|
5
5
|
import { R as Result } from '../result-DWo6mUVz.cjs';
|
|
@@ -1013,11 +1013,16 @@ type ProvenanceGraph = ReturnType<typeof buildProvenanceGraph>;
|
|
|
1013
1013
|
/** A persisted provenance node (the queryable record). */
|
|
1014
1014
|
type ProvenanceNode = Node<typeof Provenance>;
|
|
1015
1015
|
/**
|
|
1016
|
-
* Opens — materializing the schema if needed — the provenance store for a target
|
|
1017
|
-
*
|
|
1018
|
-
*
|
|
1019
|
-
*
|
|
1016
|
+
* Opens — materializing the schema if needed — the provenance store for a target.
|
|
1017
|
+
* Pass the target Store in ordinary application code; inspection tools that do
|
|
1018
|
+
* not have its GraphDef may instead pass the backend and target graph id.
|
|
1019
|
+
*
|
|
1020
|
+
* Idempotent: safe to call before every persist/query, and shares the backend
|
|
1021
|
+
* with the target (so the caller must NOT close it separately — closing the
|
|
1022
|
+
* shared backend is the target owner's job).
|
|
1020
1023
|
*/
|
|
1024
|
+
declare function openProvenanceStore<G extends GraphDef>(target: Store<G>): Promise<Store<ProvenanceGraph>>;
|
|
1025
|
+
/** Opens a provenance store for standalone inspection without a target GraphDef. */
|
|
1021
1026
|
declare function openProvenanceStore(backend: GraphBackend, targetGraphId: string): Promise<Store<ProvenanceGraph>>;
|
|
1022
1027
|
/**
|
|
1023
1028
|
* Upserts one `Provenance` node per record into the sidecar store, keyed by the
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { G as GraphDef, N as NodeKinds, c as GetNodeType } from '../define-graph-DRo9xpYN.js';
|
|
2
|
-
import { a as Store, ar as Node,
|
|
2
|
+
import { a as Store, ar as Node, bQ as UniqueIntrospection } from '../store-view-CLIhwMMX.js';
|
|
3
3
|
import { m as NodeId, a as NodeType, g as EdgeId, J as JsonValue, l as KindAnnotations, d as EdgeType, D as DeleteBehavior, T as TemporalMode, k as GraphExtensionVersion, u as ExtensionNodeDef, v as ExtensionEdgeDef, w as ExtensionOntologyRelation, x as ExtensionIndex } from '../extension-types-BLEVH4SG.js';
|
|
4
4
|
import { $ as TypeGraphError } from '../index-BD_3TCgh.js';
|
|
5
5
|
import { R as Result } from '../result-DWo6mUVz.js';
|
|
@@ -1013,11 +1013,16 @@ type ProvenanceGraph = ReturnType<typeof buildProvenanceGraph>;
|
|
|
1013
1013
|
/** A persisted provenance node (the queryable record). */
|
|
1014
1014
|
type ProvenanceNode = Node<typeof Provenance>;
|
|
1015
1015
|
/**
|
|
1016
|
-
* Opens — materializing the schema if needed — the provenance store for a target
|
|
1017
|
-
*
|
|
1018
|
-
*
|
|
1019
|
-
*
|
|
1016
|
+
* Opens — materializing the schema if needed — the provenance store for a target.
|
|
1017
|
+
* Pass the target Store in ordinary application code; inspection tools that do
|
|
1018
|
+
* not have its GraphDef may instead pass the backend and target graph id.
|
|
1019
|
+
*
|
|
1020
|
+
* Idempotent: safe to call before every persist/query, and shares the backend
|
|
1021
|
+
* with the target (so the caller must NOT close it separately — closing the
|
|
1022
|
+
* shared backend is the target owner's job).
|
|
1020
1023
|
*/
|
|
1024
|
+
declare function openProvenanceStore<G extends GraphDef>(target: Store<G>): Promise<Store<ProvenanceGraph>>;
|
|
1025
|
+
/** Opens a provenance store for standalone inspection without a target GraphDef. */
|
|
1021
1026
|
declare function openProvenanceStore(backend: GraphBackend, targetGraphId: string): Promise<Store<ProvenanceGraph>>;
|
|
1022
1027
|
/**
|
|
1023
1028
|
* Upserts one `Provenance` node per record into the sidecar store, keyed by the
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { createStoreWithSchema } from '../chunk-
|
|
1
|
+
import { createStoreWithSchema } from '../chunk-CBK2IVI2.js';
|
|
2
2
|
import { compareStrings } from '../chunk-DRACN6XG.js';
|
|
3
3
|
import '../chunk-AOL64O4Z.js';
|
|
4
|
-
import { importGraphStream, exportGraphStream } from '../chunk-
|
|
5
|
-
import '../chunk-
|
|
6
|
-
import { storeBackend, generateId, computeUniqueKey, transactionBackend, lockRecordedGraphWrite, readRevisionOrigin, readRecordedClock } from '../chunk-
|
|
4
|
+
import { importGraphStream, exportGraphStream } from '../chunk-NQBYTLPW.js';
|
|
5
|
+
import '../chunk-3SK4SVTW.js';
|
|
6
|
+
import { storeBackend, generateId, computeUniqueKey, transactionBackend, lockRecordedGraphWrite, readRevisionOrigin, readRecordedClock } from '../chunk-IFDXG2YJ.js';
|
|
7
7
|
import '../chunk-35S6P5ZU.js';
|
|
8
8
|
import '../chunk-PZHC5GCD.js';
|
|
9
9
|
import '../chunk-J6IJARLG.js';
|
|
10
|
-
import { computeSchemaHash, serializeSchema } from '../chunk-
|
|
10
|
+
import { computeSchemaHash, serializeSchema } from '../chunk-SU7VQOJ3.js';
|
|
11
11
|
import { defineNode } from '../chunk-76HE7DJP.js';
|
|
12
12
|
import '../chunk-ZE6NVENI.js';
|
|
13
13
|
import { sortedReplacer } from '../chunk-UR7W5YQK.js';
|
|
14
|
-
import '../chunk-
|
|
14
|
+
import '../chunk-UUIBACKJ.js';
|
|
15
15
|
import { getNodeKinds, getEdgeKinds, defineGraph } from '../chunk-PH4IJ3V5.js';
|
|
16
16
|
import '../chunk-I6FX7AAG.js';
|
|
17
17
|
import '../chunk-U4JDJKPD.js';
|
|
@@ -2190,7 +2190,8 @@ function buildProvenanceGraph(targetGraphId) {
|
|
|
2190
2190
|
edges: {}
|
|
2191
2191
|
});
|
|
2192
2192
|
}
|
|
2193
|
-
async function openProvenanceStore(
|
|
2193
|
+
async function openProvenanceStore(...args) {
|
|
2194
|
+
const [backend, targetGraphId] = args.length === 1 ? [storeBackend(args[0]), args[0].graphId] : args;
|
|
2194
2195
|
const [store] = await createStoreWithSchema(
|
|
2195
2196
|
buildProvenanceGraph(targetGraphId),
|
|
2196
2197
|
backend
|
|
@@ -3636,10 +3637,7 @@ async function resolveMerge(store, target, branches, options, useBaseSources, in
|
|
|
3636
3637
|
let provenancePersisted;
|
|
3637
3638
|
if (options.persistProvenance) {
|
|
3638
3639
|
try {
|
|
3639
|
-
const provenanceStore = await openProvenanceStore(
|
|
3640
|
-
storeBackend(target),
|
|
3641
|
-
target.graphId
|
|
3642
|
-
);
|
|
3640
|
+
const provenanceStore = await openProvenanceStore(target);
|
|
3643
3641
|
const count = await persistProvenanceRecords(
|
|
3644
3642
|
provenanceStore,
|
|
3645
3643
|
target.graphId,
|