@nicia-ai/typegraph 0.33.0 → 0.35.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/README.md +20 -0
- package/dist/backend/postgres/index.cjs +30 -26
- package/dist/backend/postgres/index.d.cts +39 -7
- package/dist/backend/postgres/index.d.ts +39 -7
- package/dist/backend/postgres/index.js +17 -13
- package/dist/backend/postgres/pglite.cjs +22 -18
- package/dist/backend/postgres/pglite.cjs.map +1 -1
- package/dist/backend/postgres/pglite.d.cts +4 -4
- package/dist/backend/postgres/pglite.d.ts +4 -4
- package/dist/backend/postgres/pglite.js +17 -13
- package/dist/backend/postgres/pglite.js.map +1 -1
- package/dist/backend/sqlite/index.cjs +26 -23
- package/dist/backend/sqlite/index.d.cts +8 -8
- package/dist/backend/sqlite/index.d.ts +8 -8
- package/dist/backend/sqlite/index.js +14 -11
- package/dist/backend/sqlite/libsql.cjs +21 -17
- package/dist/backend/sqlite/libsql.cjs.map +1 -1
- package/dist/backend/sqlite/libsql.d.cts +13 -6
- package/dist/backend/sqlite/libsql.d.ts +13 -6
- package/dist/backend/sqlite/libsql.js +17 -13
- package/dist/backend/sqlite/libsql.js.map +1 -1
- package/dist/backend/sqlite/local.cjs +102 -18
- package/dist/backend/sqlite/local.cjs.map +1 -1
- package/dist/backend/sqlite/local.d.cts +95 -5
- package/dist/backend/sqlite/local.d.ts +95 -5
- package/dist/backend/sqlite/local.js +96 -13
- package/dist/backend/sqlite/local.js.map +1 -1
- package/dist/{chunk-JHOBXD7O.js → chunk-3TWF3SH4.js} +332 -64
- package/dist/chunk-3TWF3SH4.js.map +1 -0
- package/dist/chunk-4JEZZJ6S.cjs +1271 -0
- package/dist/chunk-4JEZZJ6S.cjs.map +1 -0
- package/dist/{chunk-I4W7MKVG.cjs → chunk-4TOD4LBZ.cjs} +249 -294
- package/dist/chunk-4TOD4LBZ.cjs.map +1 -0
- package/dist/chunk-55MZDDZV.js +239 -0
- package/dist/chunk-55MZDDZV.js.map +1 -0
- package/dist/{chunk-LM2IC4ZJ.cjs → chunk-5A6FNS6N.cjs} +75 -19
- package/dist/chunk-5A6FNS6N.cjs.map +1 -0
- package/dist/{chunk-FDN43KXV.cjs → chunk-5AQIKK56.cjs} +65 -24
- package/dist/chunk-5AQIKK56.cjs.map +1 -0
- package/dist/{chunk-IZ4PCL47.js → chunk-5SEGFTZX.js} +4 -66
- package/dist/chunk-5SEGFTZX.js.map +1 -0
- package/dist/{chunk-CWFPJ3RC.js → chunk-6FR2MMS6.js} +7 -7
- package/dist/chunk-6FR2MMS6.js.map +1 -0
- package/dist/chunk-7YSP4V4R.cjs +69 -0
- package/dist/chunk-7YSP4V4R.cjs.map +1 -0
- package/dist/chunk-A42GCBGX.cjs +28 -0
- package/dist/chunk-A42GCBGX.cjs.map +1 -0
- package/dist/chunk-ACSVZPK7.cjs +21 -0
- package/dist/chunk-ACSVZPK7.cjs.map +1 -0
- package/dist/{chunk-OIE2UPVG.cjs → chunk-BLZDPRXT.cjs} +52 -21
- package/dist/chunk-BLZDPRXT.cjs.map +1 -0
- package/dist/chunk-BYPOGQWK.js +25 -0
- package/dist/chunk-BYPOGQWK.js.map +1 -0
- package/dist/{chunk-NG5N7R45.cjs → chunk-CK5BVQOW.cjs} +325 -213
- package/dist/chunk-CK5BVQOW.cjs.map +1 -0
- package/dist/chunk-CTTSDJLY.cjs +261 -0
- package/dist/chunk-CTTSDJLY.cjs.map +1 -0
- package/dist/chunk-CUHM5CWJ.cjs +12 -0
- package/dist/chunk-CUHM5CWJ.cjs.map +1 -0
- package/dist/chunk-CZQ3FO2Q.js +2320 -0
- package/dist/chunk-CZQ3FO2Q.js.map +1 -0
- package/dist/{chunk-CFNT3ITG.cjs → chunk-D7ZEOS56.cjs} +25 -52
- package/dist/chunk-D7ZEOS56.cjs.map +1 -0
- package/dist/chunk-DFVLCOP6.js +10 -0
- package/dist/chunk-DFVLCOP6.js.map +1 -0
- package/dist/chunk-DI74SMXS.cjs +29 -0
- package/dist/chunk-DI74SMXS.cjs.map +1 -0
- package/dist/{chunk-KY5SDVA7.cjs → chunk-EM3CWPND.cjs} +442 -113
- package/dist/chunk-EM3CWPND.cjs.map +1 -0
- package/dist/chunk-EMF62TZG.cjs +1176 -0
- package/dist/chunk-EMF62TZG.cjs.map +1 -0
- package/dist/chunk-EOLERH7Y.cjs +40 -0
- package/dist/chunk-EOLERH7Y.cjs.map +1 -0
- package/dist/{chunk-3QRBXYT5.cjs → chunk-FACJJWGF.cjs} +24 -6
- package/dist/chunk-FACJJWGF.cjs.map +1 -0
- package/dist/{chunk-KTIEB7VH.cjs → chunk-FL472AMI.cjs} +49 -165
- package/dist/chunk-FL472AMI.cjs.map +1 -0
- package/dist/{chunk-4RBAJVEC.cjs → chunk-FN35DLCN.cjs} +31 -9
- package/dist/chunk-FN35DLCN.cjs.map +1 -0
- package/dist/{chunk-C4C4Q7A6.js → chunk-FPIZFYHE.js} +12 -35
- package/dist/chunk-FPIZFYHE.js.map +1 -0
- package/dist/{chunk-XKNAK27R.js → chunk-FRV5Q5IO.js} +64 -8
- package/dist/chunk-FRV5Q5IO.js.map +1 -0
- package/dist/{chunk-K5P5OZXS.js → chunk-G6Q5UM7U.js} +2 -2
- package/dist/{chunk-K5P5OZXS.js.map → chunk-G6Q5UM7U.js.map} +1 -1
- package/dist/chunk-GSQ6NPH6.cjs +100 -0
- package/dist/chunk-GSQ6NPH6.cjs.map +1 -0
- package/dist/chunk-GUR2FNB5.cjs +12 -0
- package/dist/{chunk-6ZR4QC3O.cjs.map → chunk-GUR2FNB5.cjs.map} +1 -1
- package/dist/{chunk-ZFWNO3GE.cjs → chunk-H7YNSMA7.cjs} +107 -2
- package/dist/chunk-H7YNSMA7.cjs.map +1 -0
- package/dist/{chunk-GYVBEZAO.js → chunk-I7ZUZKFD.js} +47 -19
- package/dist/chunk-I7ZUZKFD.js.map +1 -0
- package/dist/chunk-ITE4IXAK.js +25 -0
- package/dist/chunk-ITE4IXAK.js.map +1 -0
- package/dist/{chunk-D3EWZ67S.cjs → chunk-J7WFGBJR.cjs} +3372 -4970
- package/dist/chunk-J7WFGBJR.cjs.map +1 -0
- package/dist/{chunk-PYD3UCDU.js → chunk-JBTOYDMN.js} +202 -251
- package/dist/chunk-JBTOYDMN.js.map +1 -0
- package/dist/{chunk-XVUJY72M.js → chunk-K3PPLHY7.js} +234 -118
- package/dist/chunk-K3PPLHY7.js.map +1 -0
- package/dist/{chunk-454I6GDF.js → chunk-KBGQIPRQ.js} +102 -3
- package/dist/chunk-KBGQIPRQ.js.map +1 -0
- package/dist/chunk-KMI7LYAF.js +1252 -0
- package/dist/chunk-KMI7LYAF.js.map +1 -0
- package/dist/{chunk-JIEJCTDS.cjs → chunk-LGEALRC6.cjs} +21 -4
- package/dist/chunk-LGEALRC6.cjs.map +1 -0
- package/dist/{chunk-TQOYM4LN.js → chunk-MP2JQKSG.js} +21 -5
- package/dist/chunk-MP2JQKSG.js.map +1 -0
- package/dist/{chunk-3642VBVC.cjs → chunk-O7UN7OXA.cjs} +389 -121
- package/dist/chunk-O7UN7OXA.cjs.map +1 -0
- package/dist/chunk-OHMP6N2J.js +47 -0
- package/dist/chunk-OHMP6N2J.js.map +1 -0
- package/dist/{chunk-6NRFUHMS.js → chunk-OR5ZA5WP.js} +135 -24
- package/dist/chunk-OR5ZA5WP.js.map +1 -0
- package/dist/{chunk-PRMKPFN5.js → chunk-Q5TEXCTB.js} +61 -6
- package/dist/chunk-Q5TEXCTB.js.map +1 -0
- package/dist/chunk-QNKSQTKQ.js +1312 -0
- package/dist/chunk-QNKSQTKQ.js.map +1 -0
- package/dist/{chunk-YCV72E6L.js → chunk-QOTI55H7.js} +7 -116
- package/dist/chunk-QOTI55H7.js.map +1 -0
- package/dist/{chunk-QBYTJSAY.js → chunk-QWEUYILR.js} +99 -34
- package/dist/chunk-QWEUYILR.js.map +1 -0
- package/dist/{chunk-OS6KS3HV.js → chunk-RGP33ZJ5.js} +485 -82
- package/dist/chunk-RGP33ZJ5.js.map +1 -0
- package/dist/chunk-RGPG7EOJ.js +94 -0
- package/dist/chunk-RGPG7EOJ.js.map +1 -0
- package/dist/{chunk-WWVV44DY.cjs → chunk-S55OV6PW.cjs} +15 -15
- package/dist/chunk-S55OV6PW.cjs.map +1 -0
- package/dist/{chunk-3E7SNSIA.cjs → chunk-SJDMVITW.cjs} +4 -4
- package/dist/{chunk-3E7SNSIA.cjs.map → chunk-SJDMVITW.cjs.map} +1 -1
- package/dist/{chunk-XLUNB2TZ.js → chunk-SNXVDZAJ.js} +3 -3
- package/dist/{chunk-XLUNB2TZ.js.map → chunk-SNXVDZAJ.js.map} +1 -1
- package/dist/{chunk-CEF2QOTO.js → chunk-T2WUSPDA.js} +49 -8
- package/dist/chunk-T2WUSPDA.js.map +1 -0
- package/dist/{chunk-YW7GHMF4.cjs → chunk-TCOCYN2P.cjs} +75 -20
- package/dist/chunk-TCOCYN2P.cjs.map +1 -0
- package/dist/{chunk-FLRCVI2G.cjs → chunk-TDXIBCGY.cjs} +2 -2
- package/dist/{chunk-FLRCVI2G.cjs.map → chunk-TDXIBCGY.cjs.map} +1 -1
- package/dist/chunk-TEDRJXOG.cjs +32 -0
- package/dist/chunk-TEDRJXOG.cjs.map +1 -0
- package/dist/{chunk-WLP6TKFB.js → chunk-UES55P7G.js} +2809 -4398
- package/dist/chunk-UES55P7G.js.map +1 -0
- package/dist/{chunk-EF3Z645U.cjs → chunk-UMDVATGY.cjs} +6 -72
- package/dist/chunk-UMDVATGY.cjs.map +1 -0
- package/dist/chunk-UR7W5YQK.js +18 -0
- package/dist/chunk-UR7W5YQK.js.map +1 -0
- package/dist/chunk-UT3S4SEN.js +31 -0
- package/dist/chunk-UT3S4SEN.js.map +1 -0
- package/dist/{chunk-3IR2GEMJ.cjs → chunk-UUT7UN2N.cjs} +149 -38
- package/dist/chunk-UUT7UN2N.cjs.map +1 -0
- package/dist/{chunk-PIHXFF73.js → chunk-UZV3AZKF.js} +21 -3
- package/dist/chunk-UZV3AZKF.js.map +1 -0
- package/dist/{chunk-DJYRRDHA.js → chunk-VHMPG6UL.js} +29 -7
- package/dist/chunk-VHMPG6UL.js.map +1 -0
- package/dist/{chunk-MBLXCV2Y.cjs → chunk-VPYHY3LJ.cjs} +111 -43
- package/dist/chunk-VPYHY3LJ.cjs.map +1 -0
- package/dist/{chunk-WYTUF3QO.js → chunk-VSPCZAXF.js} +3 -3
- package/dist/{chunk-WYTUF3QO.js.map → chunk-VSPCZAXF.js.map} +1 -1
- package/dist/chunk-W63OVYY4.js +29 -0
- package/dist/chunk-W63OVYY4.js.map +1 -0
- package/dist/{chunk-UPDMJEW6.js → chunk-WDBCBWC4.js} +356 -30
- package/dist/chunk-WDBCBWC4.js.map +1 -0
- package/dist/chunk-WJT7OU7E.cjs +1334 -0
- package/dist/chunk-WJT7OU7E.cjs.map +1 -0
- package/dist/chunk-XOX22WHL.cjs +2383 -0
- package/dist/chunk-XOX22WHL.cjs.map +1 -0
- package/dist/{ddl-CVnHJcar.d.ts → ddl-C2rZ-Aen.d.ts} +4 -4
- package/dist/{ddl-Dxt_fBHr.d.cts → ddl-CZz7a0E8.d.cts} +4 -4
- package/dist/{extension-types-YGFJPrzK.d.cts → extension-types-ixRpJVUp.d.cts} +24 -1
- package/dist/{extension-types-YGFJPrzK.d.ts → extension-types-ixRpJVUp.d.ts} +24 -1
- package/dist/{types-DGylBhWo.d.ts → fulltext-strategy-B57yvC5Q.d.ts} +2558 -2125
- package/dist/{types-C_UnQOQp.d.cts → fulltext-strategy-CDkSSYhq.d.cts} +2558 -2125
- package/dist/graph-extension/index.cjs +21 -19
- package/dist/graph-extension/index.d.cts +4 -4
- package/dist/graph-extension/index.d.ts +4 -4
- package/dist/graph-extension/index.js +6 -4
- package/dist/graph-merge/index.cjs +408 -169
- package/dist/graph-merge/index.cjs.map +1 -1
- package/dist/graph-merge/index.d.cts +63 -33
- package/dist/graph-merge/index.d.ts +63 -33
- package/dist/graph-merge/index.js +286 -47
- package/dist/graph-merge/index.js.map +1 -1
- package/dist/{index-DGX6D9j1.d.ts → index-6CSUAq-x.d.ts} +234 -93
- package/dist/{index-SEvUHDA6.d.cts → index-Bks_3HHK.d.cts} +234 -93
- package/dist/index.cjs +240 -211
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +11 -11
- package/dist/index.d.ts +11 -11
- package/dist/index.js +35 -27
- package/dist/index.js.map +1 -1
- package/dist/indexes/index.cjs +28 -27
- package/dist/indexes/index.d.cts +5 -5
- package/dist/indexes/index.d.ts +5 -5
- package/dist/indexes/index.js +10 -9
- package/dist/interchange/index.cjs +47 -17
- package/dist/interchange/index.d.cts +126 -12
- package/dist/interchange/index.d.ts +126 -12
- package/dist/interchange/index.js +14 -4
- package/dist/{manager-BYl_zyZR.d.cts → manager-DwQi8eV0.d.cts} +9 -2
- package/dist/{manager-C0_r0ALf.d.ts → manager-ejUCB52T.d.ts} +9 -2
- package/dist/{materialize-indexes-D20xNluI.d.cts → materialize-indexes-B4e9360H.d.cts} +20 -4
- package/dist/{materialize-indexes-CAkIYFV-.d.ts → materialize-indexes-te9TPMMJ.d.ts} +20 -4
- package/dist/{postgres-_9psmVGm.d.cts → postgres-CfEqsRMp.d.cts} +152 -1
- package/dist/{postgres-MzBPkYzq.d.ts → postgres-DQ5R6rzV.d.ts} +152 -1
- package/dist/profiler/index.cjs +11 -11
- package/dist/profiler/index.d.cts +7 -7
- package/dist/profiler/index.d.ts +7 -7
- package/dist/profiler/index.js +4 -4
- package/dist/provenance/index.cjs +590 -0
- package/dist/provenance/index.cjs.map +1 -0
- package/dist/provenance/index.d.cts +73 -0
- package/dist/provenance/index.d.ts +73 -0
- package/dist/provenance/index.js +588 -0
- package/dist/provenance/index.js.map +1 -0
- package/dist/schema/index.cjs +55 -38
- package/dist/schema/index.cjs.map +1 -1
- package/dist/schema/index.d.cts +57 -57
- package/dist/schema/index.d.ts +57 -57
- package/dist/schema/index.js +30 -13
- package/dist/schema/index.js.map +1 -1
- package/dist/{sqlite-gm44dShb.d.ts → sqlite-D7zBinNR.d.cts} +92 -1
- package/dist/{sqlite-BfksSb45.d.cts → sqlite-DvQndLky.d.ts} +92 -1
- package/dist/{store-view-FfE5_7eo.d.ts → store-view-BSpqvAxK.d.cts} +445 -46
- package/dist/{store-view-9jQ2rPum.d.cts → store-view-CKbHFRnn.d.ts} +445 -46
- package/dist/{types-B6mhrcLv.d.cts → types-Bv9DcS_E.d.cts} +2 -2
- package/dist/{types-CdWxK-nD.d.ts → types-CoxuV7EJ.d.ts} +2 -2
- package/dist/{where-Bpp2ul_z.d.cts → where-7RKFOsXt.d.ts} +2 -2
- package/dist/{where-BsEXraKW.d.ts → where-DdMIXOtH.d.cts} +2 -2
- package/package.json +21 -14
- package/dist/chunk-2YMGNYXY.js +0 -40
- package/dist/chunk-2YMGNYXY.js.map +0 -1
- package/dist/chunk-3642VBVC.cjs.map +0 -1
- package/dist/chunk-3EUKJEQ3.js +0 -77
- package/dist/chunk-3EUKJEQ3.js.map +0 -1
- package/dist/chunk-3IR2GEMJ.cjs.map +0 -1
- package/dist/chunk-3QRBXYT5.cjs.map +0 -1
- package/dist/chunk-454I6GDF.js.map +0 -1
- package/dist/chunk-4RBAJVEC.cjs.map +0 -1
- package/dist/chunk-6NRFUHMS.js.map +0 -1
- package/dist/chunk-6ZR4QC3O.cjs +0 -12
- package/dist/chunk-73KASJGO.cjs +0 -52
- package/dist/chunk-73KASJGO.cjs.map +0 -1
- package/dist/chunk-BF3ZDEUE.cjs +0 -773
- package/dist/chunk-BF3ZDEUE.cjs.map +0 -1
- package/dist/chunk-C4C4Q7A6.js.map +0 -1
- package/dist/chunk-CEF2QOTO.js.map +0 -1
- package/dist/chunk-CFNT3ITG.cjs.map +0 -1
- package/dist/chunk-CWFPJ3RC.js.map +0 -1
- package/dist/chunk-D3EWZ67S.cjs.map +0 -1
- package/dist/chunk-DJYRRDHA.js.map +0 -1
- package/dist/chunk-EF3Z645U.cjs.map +0 -1
- package/dist/chunk-FDN43KXV.cjs.map +0 -1
- package/dist/chunk-GYVBEZAO.js.map +0 -1
- package/dist/chunk-HTGDWIDE.cjs +0 -89
- package/dist/chunk-HTGDWIDE.cjs.map +0 -1
- package/dist/chunk-I4W7MKVG.cjs.map +0 -1
- package/dist/chunk-IZ4PCL47.js.map +0 -1
- package/dist/chunk-JHOBXD7O.js.map +0 -1
- package/dist/chunk-JIEJCTDS.cjs.map +0 -1
- package/dist/chunk-KTIEB7VH.cjs.map +0 -1
- package/dist/chunk-KY5SDVA7.cjs.map +0 -1
- package/dist/chunk-LM2IC4ZJ.cjs.map +0 -1
- package/dist/chunk-MBLXCV2Y.cjs.map +0 -1
- package/dist/chunk-NG5N7R45.cjs.map +0 -1
- package/dist/chunk-OIE2UPVG.cjs.map +0 -1
- package/dist/chunk-OS6KS3HV.js.map +0 -1
- package/dist/chunk-PIHXFF73.js.map +0 -1
- package/dist/chunk-PRMKPFN5.js.map +0 -1
- package/dist/chunk-PYD3UCDU.js.map +0 -1
- package/dist/chunk-QBYTJSAY.js.map +0 -1
- package/dist/chunk-SPT5JMME.js +0 -610
- package/dist/chunk-SPT5JMME.js.map +0 -1
- package/dist/chunk-SST7XDY6.cjs +0 -624
- package/dist/chunk-SST7XDY6.cjs.map +0 -1
- package/dist/chunk-TQOYM4LN.js.map +0 -1
- package/dist/chunk-UPDMJEW6.js.map +0 -1
- package/dist/chunk-WLP6TKFB.js.map +0 -1
- package/dist/chunk-WWVV44DY.cjs.map +0 -1
- package/dist/chunk-XKNAK27R.js.map +0 -1
- package/dist/chunk-XVUJY72M.js.map +0 -1
- package/dist/chunk-YCV72E6L.js.map +0 -1
- package/dist/chunk-YW7GHMF4.cjs.map +0 -1
- package/dist/chunk-ZFWNO3GE.cjs.map +0 -1
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunkGSQ6NPH6_cjs = require('./chunk-GSQ6NPH6.cjs');
|
|
4
|
+
var chunkDI74SMXS_cjs = require('./chunk-DI74SMXS.cjs');
|
|
5
|
+
var chunkLGEALRC6_cjs = require('./chunk-LGEALRC6.cjs');
|
|
6
|
+
var chunkTDXIBCGY_cjs = require('./chunk-TDXIBCGY.cjs');
|
|
5
7
|
|
|
6
8
|
// src/ontology/closures.ts
|
|
7
9
|
function computeTransitiveClosure(relations) {
|
|
@@ -83,7 +85,7 @@ var GRAPH_EXTENSION_ISSUE_CODES = [
|
|
|
83
85
|
"EMPTY_INDEX_FIELDS",
|
|
84
86
|
"UNKNOWN_PROPERTY_KEY"
|
|
85
87
|
];
|
|
86
|
-
var GraphExtensionError = class extends
|
|
88
|
+
var GraphExtensionError = class extends chunkLGEALRC6_cjs.TypeGraphError {
|
|
87
89
|
constructor(spec) {
|
|
88
90
|
super(spec.message, spec.code, {
|
|
89
91
|
details: spec.details,
|
|
@@ -274,28 +276,6 @@ var GRAPH_EXTENSION_TOP_LEVEL_KEYS = [
|
|
|
274
276
|
"indexes"
|
|
275
277
|
];
|
|
276
278
|
|
|
277
|
-
// src/utils/object.ts
|
|
278
|
-
function isPlainObject(value) {
|
|
279
|
-
if (typeof value !== "object" || value === null) return false;
|
|
280
|
-
const prototype = Object.getPrototypeOf(value);
|
|
281
|
-
return prototype === Object.prototype || prototype === null;
|
|
282
|
-
}
|
|
283
|
-
function compactUndefined(value) {
|
|
284
|
-
const result = {};
|
|
285
|
-
for (const [key, fieldValue] of Object.entries(value)) {
|
|
286
|
-
if (fieldValue !== void 0) result[key] = fieldValue;
|
|
287
|
-
}
|
|
288
|
-
return result;
|
|
289
|
-
}
|
|
290
|
-
function freezeDeep(value) {
|
|
291
|
-
if (value === null || typeof value !== "object") return value;
|
|
292
|
-
if (Object.isFrozen(value)) return value;
|
|
293
|
-
for (const nested of Object.values(value)) {
|
|
294
|
-
freezeDeep(nested);
|
|
295
|
-
}
|
|
296
|
-
return Object.freeze(value);
|
|
297
|
-
}
|
|
298
|
-
|
|
299
279
|
// src/core/json-value.ts
|
|
300
280
|
function assertJsonValue(value, rootLabel, ownerKind) {
|
|
301
281
|
walk(value, rootLabel, ownerKind);
|
|
@@ -319,7 +299,7 @@ function walk(value, path, ownerKind) {
|
|
|
319
299
|
}
|
|
320
300
|
return;
|
|
321
301
|
}
|
|
322
|
-
if (!isPlainObject(value)) {
|
|
302
|
+
if (!chunkDI74SMXS_cjs.isPlainObject(value)) {
|
|
323
303
|
throwInvalid(path, describeNonPlain(value), ownerKind);
|
|
324
304
|
}
|
|
325
305
|
for (const [key, nested] of Object.entries(value)) {
|
|
@@ -340,7 +320,7 @@ function describeNonPlain(value) {
|
|
|
340
320
|
return "non-plain object";
|
|
341
321
|
}
|
|
342
322
|
function throwInvalid(path, kind, ownerKind) {
|
|
343
|
-
throw new
|
|
323
|
+
throw new chunkLGEALRC6_cjs.ConfigurationError(
|
|
344
324
|
`${ownerKind} ${path} contains a non-JSON value (${kind}). Annotations must be JSON-serializable.`,
|
|
345
325
|
{ path, valueKind: kind },
|
|
346
326
|
{
|
|
@@ -377,95 +357,6 @@ var ALL_META_EDGE_NAMES = [
|
|
|
377
357
|
META_EDGE_IMPLIES
|
|
378
358
|
];
|
|
379
359
|
|
|
380
|
-
// src/store/reserved-keys.ts
|
|
381
|
-
var RESERVED_NODE_KEYS = /* @__PURE__ */ new Set([
|
|
382
|
-
"id",
|
|
383
|
-
"kind",
|
|
384
|
-
"meta"
|
|
385
|
-
]);
|
|
386
|
-
var RESERVED_EDGE_KEYS = /* @__PURE__ */ new Set([
|
|
387
|
-
"id",
|
|
388
|
-
"kind",
|
|
389
|
-
"meta",
|
|
390
|
-
"fromKind",
|
|
391
|
-
"fromId",
|
|
392
|
-
"toKind",
|
|
393
|
-
"toId"
|
|
394
|
-
]);
|
|
395
|
-
var PROTOTYPE_POLLUTION_KEYS = /* @__PURE__ */ new Set([
|
|
396
|
-
"__proto__",
|
|
397
|
-
"constructor",
|
|
398
|
-
"prototype"
|
|
399
|
-
]);
|
|
400
|
-
var RESERVED_PROPERTY_PREFIX = "$";
|
|
401
|
-
function isReservedPropertyName(name) {
|
|
402
|
-
return name.startsWith(RESERVED_PROPERTY_PREFIX);
|
|
403
|
-
}
|
|
404
|
-
function assertSchemaKeysAreFree(entityKind, name, keys, reservedStructuralKeys) {
|
|
405
|
-
const structuralConflicts = keys.filter(
|
|
406
|
-
(key) => reservedStructuralKeys.has(key)
|
|
407
|
-
);
|
|
408
|
-
if (structuralConflicts.length > 0) {
|
|
409
|
-
const label = entityKind.toLowerCase();
|
|
410
|
-
throw new chunkJIEJCTDS_cjs.ConfigurationError(
|
|
411
|
-
`${entityKind} "${name}" schema contains reserved property names: ${structuralConflicts.join(", ")}`,
|
|
412
|
-
{
|
|
413
|
-
[`${label}Type`]: name,
|
|
414
|
-
conflicts: structuralConflicts,
|
|
415
|
-
reservedKeys: [...reservedStructuralKeys]
|
|
416
|
-
},
|
|
417
|
-
{
|
|
418
|
-
suggestion: `Rename the conflicting properties. Reserved names (${[...reservedStructuralKeys].join(", ")}) are added automatically to all ${label}s.`
|
|
419
|
-
}
|
|
420
|
-
);
|
|
421
|
-
}
|
|
422
|
-
const prefixConflicts = keys.filter((key) => isReservedPropertyName(key));
|
|
423
|
-
if (prefixConflicts.length > 0) {
|
|
424
|
-
const label = entityKind.toLowerCase();
|
|
425
|
-
throw new chunkJIEJCTDS_cjs.ConfigurationError(
|
|
426
|
-
`${entityKind} "${name}" schema uses the reserved "${RESERVED_PROPERTY_PREFIX}" prefix on: ${prefixConflicts.join(", ")}`,
|
|
427
|
-
{
|
|
428
|
-
[`${label}Type`]: name,
|
|
429
|
-
conflicts: prefixConflicts,
|
|
430
|
-
reservedPrefix: RESERVED_PROPERTY_PREFIX
|
|
431
|
-
},
|
|
432
|
-
{
|
|
433
|
-
suggestion: `Property names starting with "${RESERVED_PROPERTY_PREFIX}" are reserved for TypeGraph accessors (e.g. $fulltext). Rename each field.`
|
|
434
|
-
}
|
|
435
|
-
);
|
|
436
|
-
}
|
|
437
|
-
}
|
|
438
|
-
function validateProjectionField(field, entityType, kind) {
|
|
439
|
-
const reserved = entityType === "node" ? RESERVED_NODE_KEYS : RESERVED_EDGE_KEYS;
|
|
440
|
-
if (reserved.has(field)) {
|
|
441
|
-
throw new chunkJIEJCTDS_cjs.ConfigurationError(
|
|
442
|
-
`Projection field "${field}" on ${entityType} kind "${kind}" conflicts with a reserved structural key`,
|
|
443
|
-
{ field, kind, entityType, reservedKeys: [...reserved] },
|
|
444
|
-
{
|
|
445
|
-
suggestion: `Remove "${field}" from the projection. Structural fields (${[...reserved].join(", ")}) are included automatically when relevant.`
|
|
446
|
-
}
|
|
447
|
-
);
|
|
448
|
-
}
|
|
449
|
-
if (PROTOTYPE_POLLUTION_KEYS.has(field)) {
|
|
450
|
-
throw new chunkJIEJCTDS_cjs.ConfigurationError(
|
|
451
|
-
`Projection field "${field}" on ${entityType} kind "${kind}" is not allowed`,
|
|
452
|
-
{ field, kind, entityType },
|
|
453
|
-
{
|
|
454
|
-
suggestion: `"${field}" cannot be used as a projection field name.`
|
|
455
|
-
}
|
|
456
|
-
);
|
|
457
|
-
}
|
|
458
|
-
}
|
|
459
|
-
function filterReservedKeys(props, reservedKeys) {
|
|
460
|
-
const filtered = {};
|
|
461
|
-
for (const [key, value] of Object.entries(props)) {
|
|
462
|
-
if (!reservedKeys.has(key)) {
|
|
463
|
-
filtered[key] = value;
|
|
464
|
-
}
|
|
465
|
-
}
|
|
466
|
-
return filtered;
|
|
467
|
-
}
|
|
468
|
-
|
|
469
360
|
// src/graph-extension/validation.ts
|
|
470
361
|
var META_EDGE_NAME_SET = new Set(ALL_META_EDGE_NAMES);
|
|
471
362
|
var SUPPORTED_PROPERTY_TYPES = /* @__PURE__ */ new Set([
|
|
@@ -504,7 +395,7 @@ function rejectUnknownPropertyKeys(raw, type, path, issues) {
|
|
|
504
395
|
for (const key of Object.keys(raw)) {
|
|
505
396
|
if (COMMON_PROPERTY_KEYS.has(key) || typeKeys.has(key)) continue;
|
|
506
397
|
issues.push({
|
|
507
|
-
path: `${path}/${
|
|
398
|
+
path: `${path}/${chunkTDXIBCGY_cjs.encodeJsonPointerSegment(key)}`,
|
|
508
399
|
message: `Unknown property key "${key}" for type "${type}". Recognized keys: ${recognized.join(", ")}.`,
|
|
509
400
|
code: "UNKNOWN_PROPERTY_KEY"
|
|
510
401
|
});
|
|
@@ -514,7 +405,7 @@ function rejectUnknownObjectKeys(raw, allowed, label, path, code, issues) {
|
|
|
514
405
|
for (const key of Object.keys(raw)) {
|
|
515
406
|
if (allowed.has(key)) continue;
|
|
516
407
|
issues.push({
|
|
517
|
-
path: `${path}/${
|
|
408
|
+
path: `${path}/${chunkTDXIBCGY_cjs.encodeJsonPointerSegment(key)}`,
|
|
518
409
|
message: `Unknown ${label} key "${key}". Allowed: ${[...allowed].join(", ")}.`,
|
|
519
410
|
code
|
|
520
411
|
});
|
|
@@ -573,7 +464,7 @@ var EDGE_INDEX_KEYS = /* @__PURE__ */ new Set([
|
|
|
573
464
|
function validateGraphExtension(input, options = {}) {
|
|
574
465
|
const issues = [];
|
|
575
466
|
const strict = options.strict === true;
|
|
576
|
-
if (!isPlainObject(input)) {
|
|
467
|
+
if (!chunkDI74SMXS_cjs.isPlainObject(input)) {
|
|
577
468
|
issues.push({
|
|
578
469
|
path: "",
|
|
579
470
|
message: "Document must be a plain object.",
|
|
@@ -586,7 +477,7 @@ function validateGraphExtension(input, options = {}) {
|
|
|
586
477
|
for (const key of Object.keys(documentRecord)) {
|
|
587
478
|
if (!KNOWN_DOCUMENT_KEYS.has(key)) {
|
|
588
479
|
issues.push({
|
|
589
|
-
path: `/${
|
|
480
|
+
path: `/${chunkTDXIBCGY_cjs.encodeJsonPointerSegment(key)}`,
|
|
590
481
|
message: `Unknown top-level key "${key}". Did you mean one of: ${[...KNOWN_DOCUMENT_KEYS].join(", ")}?`,
|
|
591
482
|
code: "UNKNOWN_DOCUMENT_KEY"
|
|
592
483
|
});
|
|
@@ -634,7 +525,7 @@ function validateVersion(raw, issues) {
|
|
|
634
525
|
}
|
|
635
526
|
function validateNodesSection(rawNodes, issues, strict) {
|
|
636
527
|
if (rawNodes === void 0) return void 0;
|
|
637
|
-
if (!isPlainObject(rawNodes)) {
|
|
528
|
+
if (!chunkDI74SMXS_cjs.isPlainObject(rawNodes)) {
|
|
638
529
|
issues.push({
|
|
639
530
|
path: "/nodes",
|
|
640
531
|
message: "`nodes` must be a plain object keyed by node-kind name.",
|
|
@@ -645,7 +536,7 @@ function validateNodesSection(rawNodes, issues, strict) {
|
|
|
645
536
|
const result = {};
|
|
646
537
|
const recorded = /* @__PURE__ */ new Set();
|
|
647
538
|
for (const [kindName, rawNode] of Object.entries(rawNodes)) {
|
|
648
|
-
const path = `/nodes/${
|
|
539
|
+
const path = `/nodes/${chunkTDXIBCGY_cjs.encodeJsonPointerSegment(kindName)}`;
|
|
649
540
|
if (!isValidKindName(kindName)) {
|
|
650
541
|
issues.push({
|
|
651
542
|
path,
|
|
@@ -670,7 +561,7 @@ function validateNodesSection(rawNodes, issues, strict) {
|
|
|
670
561
|
return result;
|
|
671
562
|
}
|
|
672
563
|
function validateNodeDocument(kindName, raw, path, issues, strict) {
|
|
673
|
-
if (!isPlainObject(raw)) {
|
|
564
|
+
if (!chunkDI74SMXS_cjs.isPlainObject(raw)) {
|
|
674
565
|
issues.push({
|
|
675
566
|
path,
|
|
676
567
|
message: `Node "${kindName}" must be a plain object.`,
|
|
@@ -719,7 +610,7 @@ function validateNodeDocument(kindName, raw, path, issues, strict) {
|
|
|
719
610
|
issues,
|
|
720
611
|
strict
|
|
721
612
|
);
|
|
722
|
-
return compactUndefined({
|
|
613
|
+
return chunkDI74SMXS_cjs.compactUndefined({
|
|
723
614
|
description,
|
|
724
615
|
annotations,
|
|
725
616
|
properties,
|
|
@@ -728,7 +619,7 @@ function validateNodeDocument(kindName, raw, path, issues, strict) {
|
|
|
728
619
|
}
|
|
729
620
|
function validateEdgesSection(rawEdges, issues, strict) {
|
|
730
621
|
if (rawEdges === void 0) return void 0;
|
|
731
|
-
if (!isPlainObject(rawEdges)) {
|
|
622
|
+
if (!chunkDI74SMXS_cjs.isPlainObject(rawEdges)) {
|
|
732
623
|
issues.push({
|
|
733
624
|
path: "/edges",
|
|
734
625
|
message: "`edges` must be a plain object keyed by edge-kind name.",
|
|
@@ -739,7 +630,7 @@ function validateEdgesSection(rawEdges, issues, strict) {
|
|
|
739
630
|
const result = {};
|
|
740
631
|
const recorded = /* @__PURE__ */ new Set();
|
|
741
632
|
for (const [kindName, rawEdge] of Object.entries(rawEdges)) {
|
|
742
|
-
const path = `/edges/${
|
|
633
|
+
const path = `/edges/${chunkTDXIBCGY_cjs.encodeJsonPointerSegment(kindName)}`;
|
|
743
634
|
if (!isValidKindName(kindName)) {
|
|
744
635
|
issues.push({
|
|
745
636
|
path,
|
|
@@ -764,7 +655,7 @@ function validateEdgesSection(rawEdges, issues, strict) {
|
|
|
764
655
|
return result;
|
|
765
656
|
}
|
|
766
657
|
function validateEdgeDocument(kindName, raw, path, issues, strict) {
|
|
767
|
-
if (!isPlainObject(raw)) {
|
|
658
|
+
if (!chunkDI74SMXS_cjs.isPlainObject(raw)) {
|
|
768
659
|
issues.push({
|
|
769
660
|
path,
|
|
770
661
|
message: `Edge "${kindName}" must be a plain object.`,
|
|
@@ -808,7 +699,7 @@ function validateEdgeDocument(kindName, raw, path, issues, strict) {
|
|
|
808
699
|
strict
|
|
809
700
|
);
|
|
810
701
|
if (properties === void 0) return void 0;
|
|
811
|
-
return compactUndefined({
|
|
702
|
+
return chunkDI74SMXS_cjs.compactUndefined({
|
|
812
703
|
description,
|
|
813
704
|
annotations,
|
|
814
705
|
from,
|
|
@@ -860,7 +751,7 @@ function validateOntologySection(raw, issues, strict) {
|
|
|
860
751
|
const result = [];
|
|
861
752
|
for (const [index, entry] of raw.entries()) {
|
|
862
753
|
const path = `/ontology/${index}`;
|
|
863
|
-
if (!isPlainObject(entry)) {
|
|
754
|
+
if (!chunkDI74SMXS_cjs.isPlainObject(entry)) {
|
|
864
755
|
issues.push({
|
|
865
756
|
path,
|
|
866
757
|
message: "Ontology entry must be a plain object.",
|
|
@@ -1055,7 +946,7 @@ function validateIndexesSection(rawIndexes, issues, strict) {
|
|
|
1055
946
|
return result;
|
|
1056
947
|
}
|
|
1057
948
|
function validateIndexEntry(raw, path, issues, strict) {
|
|
1058
|
-
if (!isPlainObject(raw)) {
|
|
949
|
+
if (!chunkDI74SMXS_cjs.isPlainObject(raw)) {
|
|
1059
950
|
issues.push({
|
|
1060
951
|
path,
|
|
1061
952
|
message: "Index entry must be a plain object.",
|
|
@@ -1139,7 +1030,7 @@ function validateIndexEntry(raw, path, issues, strict) {
|
|
|
1139
1030
|
strict
|
|
1140
1031
|
);
|
|
1141
1032
|
if (entity === "node") {
|
|
1142
|
-
return compactUndefined({
|
|
1033
|
+
return chunkDI74SMXS_cjs.compactUndefined({
|
|
1143
1034
|
entity: "node",
|
|
1144
1035
|
kind: raw.kind,
|
|
1145
1036
|
name,
|
|
@@ -1160,7 +1051,7 @@ function validateIndexEntry(raw, path, issues, strict) {
|
|
|
1160
1051
|
);
|
|
1161
1052
|
if (!directionResult.ok) return void 0;
|
|
1162
1053
|
const direction = directionResult.value;
|
|
1163
|
-
return compactUndefined({
|
|
1054
|
+
return chunkDI74SMXS_cjs.compactUndefined({
|
|
1164
1055
|
entity: "edge",
|
|
1165
1056
|
kind: raw.kind,
|
|
1166
1057
|
name,
|
|
@@ -1224,7 +1115,7 @@ function validateStringList(raw, path, issues, options) {
|
|
|
1224
1115
|
}
|
|
1225
1116
|
function validateGraphExtensionIndexWhere(raw, path, issues, strict) {
|
|
1226
1117
|
if (raw === void 0) return void 0;
|
|
1227
|
-
if (!isPlainObject(raw)) {
|
|
1118
|
+
if (!chunkDI74SMXS_cjs.isPlainObject(raw)) {
|
|
1228
1119
|
issues.push({
|
|
1229
1120
|
path,
|
|
1230
1121
|
message: "Index `where` must be a plain object.",
|
|
@@ -1264,7 +1155,7 @@ function validateGraphExtensionIndexWhere(raw, path, issues, strict) {
|
|
|
1264
1155
|
});
|
|
1265
1156
|
}
|
|
1266
1157
|
function validatePropertiesMap(raw, path, ownerType, ownerName, issues, strict) {
|
|
1267
|
-
if (!isPlainObject(raw)) {
|
|
1158
|
+
if (!chunkDI74SMXS_cjs.isPlainObject(raw)) {
|
|
1268
1159
|
issues.push({
|
|
1269
1160
|
path,
|
|
1270
1161
|
message: `\`properties\` must be a plain object.`,
|
|
@@ -1272,10 +1163,10 @@ function validatePropertiesMap(raw, path, ownerType, ownerName, issues, strict)
|
|
|
1272
1163
|
});
|
|
1273
1164
|
return void 0;
|
|
1274
1165
|
}
|
|
1275
|
-
const reserved = ownerType === "node" ? RESERVED_NODE_KEYS : RESERVED_EDGE_KEYS;
|
|
1166
|
+
const reserved = ownerType === "node" ? chunkGSQ6NPH6_cjs.RESERVED_NODE_KEYS : chunkGSQ6NPH6_cjs.RESERVED_EDGE_KEYS;
|
|
1276
1167
|
const result = {};
|
|
1277
1168
|
for (const [propertyName, propertyValue] of Object.entries(raw)) {
|
|
1278
|
-
const propertyPath = `${path}/${
|
|
1169
|
+
const propertyPath = `${path}/${chunkTDXIBCGY_cjs.encodeJsonPointerSegment(propertyName)}`;
|
|
1279
1170
|
if (reserved.has(propertyName)) {
|
|
1280
1171
|
issues.push({
|
|
1281
1172
|
path: propertyPath,
|
|
@@ -1305,7 +1196,7 @@ function validatePropertiesMap(raw, path, ownerType, ownerName, issues, strict)
|
|
|
1305
1196
|
return result;
|
|
1306
1197
|
}
|
|
1307
1198
|
function validateProperty(raw, path, depth, issues, strict) {
|
|
1308
|
-
if (!isPlainObject(raw)) {
|
|
1199
|
+
if (!chunkDI74SMXS_cjs.isPlainObject(raw)) {
|
|
1309
1200
|
issues.push({
|
|
1310
1201
|
path,
|
|
1311
1202
|
message: "Property descriptor must be a plain object with a `type` field.",
|
|
@@ -1535,7 +1426,7 @@ function validateArrayProperty(raw, path, depth, issues, strict) {
|
|
|
1535
1426
|
});
|
|
1536
1427
|
return void 0;
|
|
1537
1428
|
}
|
|
1538
|
-
if (!isPlainObject(itemsRaw)) {
|
|
1429
|
+
if (!chunkDI74SMXS_cjs.isPlainObject(itemsRaw)) {
|
|
1539
1430
|
issues.push({
|
|
1540
1431
|
path: `${path}/items`,
|
|
1541
1432
|
message: "`array.items` must be a plain property descriptor.",
|
|
@@ -1581,7 +1472,7 @@ function validateObjectProperty(raw, path, depth, issues, strict) {
|
|
|
1581
1472
|
return void 0;
|
|
1582
1473
|
}
|
|
1583
1474
|
const propertiesRaw = raw.properties;
|
|
1584
|
-
if (!isPlainObject(propertiesRaw)) {
|
|
1475
|
+
if (!chunkDI74SMXS_cjs.isPlainObject(propertiesRaw)) {
|
|
1585
1476
|
issues.push({
|
|
1586
1477
|
path: `${path}/properties`,
|
|
1587
1478
|
message: "`object.properties` must be a plain object.",
|
|
@@ -1600,8 +1491,8 @@ function validateObjectProperty(raw, path, depth, issues, strict) {
|
|
|
1600
1491
|
}
|
|
1601
1492
|
const fields = {};
|
|
1602
1493
|
for (const [name, value] of propertiesEntries) {
|
|
1603
|
-
const fieldPath = `${path}/properties/${
|
|
1604
|
-
if (!isPlainObject(value)) {
|
|
1494
|
+
const fieldPath = `${path}/properties/${chunkTDXIBCGY_cjs.encodeJsonPointerSegment(name)}`;
|
|
1495
|
+
if (!chunkDI74SMXS_cjs.isPlainObject(value)) {
|
|
1605
1496
|
issues.push({
|
|
1606
1497
|
path: fieldPath,
|
|
1607
1498
|
message: "Object field descriptor must be a plain object.",
|
|
@@ -1631,7 +1522,7 @@ function validateObjectProperty(raw, path, depth, issues, strict) {
|
|
|
1631
1522
|
);
|
|
1632
1523
|
}
|
|
1633
1524
|
function finalizeProperty(type, specific, modifiers) {
|
|
1634
|
-
return compactUndefined({
|
|
1525
|
+
return chunkDI74SMXS_cjs.compactUndefined({
|
|
1635
1526
|
type,
|
|
1636
1527
|
...specific,
|
|
1637
1528
|
optional: modifiers.optional,
|
|
@@ -1657,7 +1548,7 @@ function validatePropertyModifiers(raw, path, propertyType, issues) {
|
|
|
1657
1548
|
message: `\`searchable\` is only valid on string properties (got "${propertyType}").`,
|
|
1658
1549
|
code: "INVALID_MODIFIER_TARGET"
|
|
1659
1550
|
});
|
|
1660
|
-
} else if (isPlainObject(raw.searchable)) {
|
|
1551
|
+
} else if (chunkDI74SMXS_cjs.isPlainObject(raw.searchable)) {
|
|
1661
1552
|
const searchableRaw = raw.searchable;
|
|
1662
1553
|
const language = searchableRaw.language;
|
|
1663
1554
|
if (language === void 0) {
|
|
@@ -1685,14 +1576,14 @@ function validatePropertyModifiers(raw, path, propertyType, issues) {
|
|
|
1685
1576
|
if (raw.embedding !== void 0) {
|
|
1686
1577
|
if (propertyType === "array") {
|
|
1687
1578
|
const itemsRaw = raw.items;
|
|
1688
|
-
const itemType = isPlainObject(itemsRaw) ? itemsRaw.type : void 0;
|
|
1579
|
+
const itemType = chunkDI74SMXS_cjs.isPlainObject(itemsRaw) ? itemsRaw.type : void 0;
|
|
1689
1580
|
if (itemType !== "number") {
|
|
1690
1581
|
issues.push({
|
|
1691
1582
|
path: `${path}/embedding`,
|
|
1692
1583
|
message: '`embedding` requires `array.items.type === "number"`.',
|
|
1693
1584
|
code: "INVALID_MODIFIER_TARGET"
|
|
1694
1585
|
});
|
|
1695
|
-
} else if (isPlainObject(raw.embedding)) {
|
|
1586
|
+
} else if (chunkDI74SMXS_cjs.isPlainObject(raw.embedding)) {
|
|
1696
1587
|
const dim = raw.embedding.dimensions;
|
|
1697
1588
|
if (typeof dim !== "number" || !Number.isInteger(dim) || dim <= 0) {
|
|
1698
1589
|
issues.push({
|
|
@@ -1701,7 +1592,7 @@ function validatePropertyModifiers(raw, path, propertyType, issues) {
|
|
|
1701
1592
|
code: "INVALID_EMBEDDING_DIMENSIONS"
|
|
1702
1593
|
});
|
|
1703
1594
|
} else {
|
|
1704
|
-
const itemsObject = isPlainObject(itemsRaw) ? itemsRaw : {};
|
|
1595
|
+
const itemsObject = chunkDI74SMXS_cjs.isPlainObject(itemsRaw) ? itemsRaw : {};
|
|
1705
1596
|
const extraneous = Object.keys(itemsObject).filter(
|
|
1706
1597
|
(key) => key !== "type"
|
|
1707
1598
|
);
|
|
@@ -1743,7 +1634,7 @@ function validatePropertyModifiers(raw, path, propertyType, issues) {
|
|
|
1743
1634
|
}
|
|
1744
1635
|
}
|
|
1745
1636
|
if (issues.length > issuesAtEntry) return void 0;
|
|
1746
|
-
return compactUndefined({
|
|
1637
|
+
return chunkDI74SMXS_cjs.compactUndefined({
|
|
1747
1638
|
optional,
|
|
1748
1639
|
searchable,
|
|
1749
1640
|
embedding,
|
|
@@ -1764,7 +1655,7 @@ function validateUniqueConstraints(raw, path, properties, issues, strict) {
|
|
|
1764
1655
|
const names = /* @__PURE__ */ new Set();
|
|
1765
1656
|
for (const [index, entry] of raw.entries()) {
|
|
1766
1657
|
const constraintPath = `${path}/${index}`;
|
|
1767
|
-
if (!isPlainObject(entry)) {
|
|
1658
|
+
if (!chunkDI74SMXS_cjs.isPlainObject(entry)) {
|
|
1768
1659
|
issues.push({
|
|
1769
1660
|
path: constraintPath,
|
|
1770
1661
|
message: "Unique constraint must be a plain object.",
|
|
@@ -1874,7 +1765,7 @@ function validateUniqueConstraints(raw, path, properties, issues, strict) {
|
|
|
1874
1765
|
);
|
|
1875
1766
|
if (constraint.where !== void 0 && where === void 0) continue;
|
|
1876
1767
|
result.push(
|
|
1877
|
-
compactUndefined({
|
|
1768
|
+
chunkDI74SMXS_cjs.compactUndefined({
|
|
1878
1769
|
name,
|
|
1879
1770
|
fields,
|
|
1880
1771
|
scope,
|
|
@@ -1886,7 +1777,7 @@ function validateUniqueConstraints(raw, path, properties, issues, strict) {
|
|
|
1886
1777
|
return result;
|
|
1887
1778
|
}
|
|
1888
1779
|
function validateUniqueWhere(raw, path, properties, issues, strict) {
|
|
1889
|
-
if (!isPlainObject(raw)) {
|
|
1780
|
+
if (!chunkDI74SMXS_cjs.isPlainObject(raw)) {
|
|
1890
1781
|
issues.push({
|
|
1891
1782
|
path,
|
|
1892
1783
|
message: "Unique constraint `where` must be `{ field, op }`.",
|
|
@@ -1934,7 +1825,7 @@ function validateUniqueWhere(raw, path, properties, issues, strict) {
|
|
|
1934
1825
|
}
|
|
1935
1826
|
function validateAnnotations(raw, path, ownerLabel, issues) {
|
|
1936
1827
|
if (raw === void 0) return void 0;
|
|
1937
|
-
if (!isPlainObject(raw)) {
|
|
1828
|
+
if (!chunkDI74SMXS_cjs.isPlainObject(raw)) {
|
|
1938
1829
|
issues.push({
|
|
1939
1830
|
path,
|
|
1940
1831
|
message: `Annotations must be a plain JSON object.`,
|
|
@@ -1945,7 +1836,7 @@ function validateAnnotations(raw, path, ownerLabel, issues) {
|
|
|
1945
1836
|
try {
|
|
1946
1837
|
assertJsonValue(raw, "annotations", ownerLabel);
|
|
1947
1838
|
} catch (error) {
|
|
1948
|
-
if (error instanceof
|
|
1839
|
+
if (error instanceof chunkLGEALRC6_cjs.ConfigurationError) {
|
|
1949
1840
|
const detailPath = error.details.path;
|
|
1950
1841
|
const annotationPath = typeof detailPath === "string" ? `${path}/${detailPath.replace(/^annotations\.?/, "").replaceAll(".", "/")}` : path;
|
|
1951
1842
|
issues.push({
|
|
@@ -2020,14 +1911,14 @@ function describeUnknownValue(value) {
|
|
|
2020
1911
|
}
|
|
2021
1912
|
function freezeDocument(input) {
|
|
2022
1913
|
return Object.freeze(
|
|
2023
|
-
compactUndefined({
|
|
1914
|
+
chunkDI74SMXS_cjs.compactUndefined({
|
|
2024
1915
|
version: input.version,
|
|
2025
|
-
nodes: input.nodes === void 0 ? void 0 : freezeDeep(input.nodes),
|
|
2026
|
-
edges: input.edges === void 0 ? void 0 : freezeDeep(input.edges),
|
|
1916
|
+
nodes: input.nodes === void 0 ? void 0 : chunkDI74SMXS_cjs.freezeDeep(input.nodes),
|
|
1917
|
+
edges: input.edges === void 0 ? void 0 : chunkDI74SMXS_cjs.freezeDeep(input.edges),
|
|
2027
1918
|
ontology: input.ontology === void 0 ? void 0 : Object.freeze(
|
|
2028
1919
|
input.ontology.map((entry) => Object.freeze({ ...entry }))
|
|
2029
1920
|
),
|
|
2030
|
-
indexes: input.indexes === void 0 ? void 0 : Object.freeze(input.indexes.map((entry) => freezeDeep({ ...entry })))
|
|
1921
|
+
indexes: input.indexes === void 0 ? void 0 : Object.freeze(input.indexes.map((entry) => chunkDI74SMXS_cjs.freezeDeep({ ...entry })))
|
|
2031
1922
|
})
|
|
2032
1923
|
);
|
|
2033
1924
|
}
|
|
@@ -2057,16 +1948,10 @@ exports.META_EDGE_PART_OF = META_EDGE_PART_OF;
|
|
|
2057
1948
|
exports.META_EDGE_RELATED_TO = META_EDGE_RELATED_TO;
|
|
2058
1949
|
exports.META_EDGE_SAME_AS = META_EDGE_SAME_AS;
|
|
2059
1950
|
exports.META_EDGE_SUB_CLASS_OF = META_EDGE_SUB_CLASS_OF;
|
|
2060
|
-
exports.RESERVED_EDGE_KEYS = RESERVED_EDGE_KEYS;
|
|
2061
|
-
exports.RESERVED_NODE_KEYS = RESERVED_NODE_KEYS;
|
|
2062
1951
|
exports.RemoveCompileTimeKindError = RemoveCompileTimeKindError;
|
|
2063
1952
|
exports.assertJsonValue = assertJsonValue;
|
|
2064
|
-
exports.assertSchemaKeysAreFree = assertSchemaKeysAreFree;
|
|
2065
|
-
exports.compactUndefined = compactUndefined;
|
|
2066
1953
|
exports.computeTransitiveClosure = computeTransitiveClosure;
|
|
2067
1954
|
exports.err = err;
|
|
2068
|
-
exports.filterReservedKeys = filterReservedKeys;
|
|
2069
|
-
exports.freezeDeep = freezeDeep;
|
|
2070
1955
|
exports.invertClosure = invertClosure;
|
|
2071
1956
|
exports.isErr = isErr;
|
|
2072
1957
|
exports.isOk = isOk;
|
|
@@ -2074,6 +1959,5 @@ exports.isReachable = isReachable;
|
|
|
2074
1959
|
exports.ok = ok;
|
|
2075
1960
|
exports.unwrap = unwrap;
|
|
2076
1961
|
exports.validateGraphExtension = validateGraphExtension;
|
|
2077
|
-
|
|
2078
|
-
//# sourceMappingURL=chunk-
|
|
2079
|
-
//# sourceMappingURL=chunk-KTIEB7VH.cjs.map
|
|
1962
|
+
//# sourceMappingURL=chunk-FL472AMI.cjs.map
|
|
1963
|
+
//# sourceMappingURL=chunk-FL472AMI.cjs.map
|