@nicia-ai/typegraph 0.29.0 → 0.31.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 +39 -0
- package/dist/backend/postgres/index.cjs +21 -20
- package/dist/backend/postgres/index.d.cts +6 -6
- package/dist/backend/postgres/index.d.ts +6 -6
- package/dist/backend/postgres/index.js +11 -10
- package/dist/backend/postgres/pglite.cjs +16 -15
- package/dist/backend/postgres/pglite.cjs.map +1 -1
- package/dist/backend/postgres/pglite.d.cts +3 -3
- package/dist/backend/postgres/pglite.d.ts +3 -3
- package/dist/backend/postgres/pglite.js +11 -10
- package/dist/backend/postgres/pglite.js.map +1 -1
- package/dist/backend/sqlite/index.cjs +18 -18
- package/dist/backend/sqlite/index.d.cts +12 -7
- package/dist/backend/sqlite/index.d.ts +12 -7
- package/dist/backend/sqlite/index.js +9 -9
- package/dist/backend/sqlite/libsql.cjs +14 -14
- package/dist/backend/sqlite/libsql.d.cts +3 -3
- package/dist/backend/sqlite/libsql.d.ts +3 -3
- package/dist/backend/sqlite/libsql.js +10 -10
- package/dist/backend/sqlite/local.cjs +17 -16
- package/dist/backend/sqlite/local.cjs.map +1 -1
- package/dist/backend/sqlite/local.d.cts +9 -3
- package/dist/backend/sqlite/local.d.ts +9 -3
- package/dist/backend/sqlite/local.js +12 -11
- package/dist/backend/sqlite/local.js.map +1 -1
- package/dist/{chunk-7KLVFWXR.js → chunk-2HZGWCB4.js} +121 -497
- package/dist/chunk-2HZGWCB4.js.map +1 -0
- package/dist/chunk-2YMGNYXY.js +40 -0
- package/dist/chunk-2YMGNYXY.js.map +1 -0
- package/dist/chunk-2ZY4K43M.js +90 -0
- package/dist/chunk-2ZY4K43M.js.map +1 -0
- package/dist/chunk-3EUKJEQ3.js +77 -0
- package/dist/chunk-3EUKJEQ3.js.map +1 -0
- package/dist/chunk-3JBJEYWE.cjs +604 -0
- package/dist/chunk-3JBJEYWE.cjs.map +1 -0
- package/dist/{chunk-A4H6QMV4.js → chunk-4A4GUZTQ.js} +15 -11
- package/dist/chunk-4A4GUZTQ.js.map +1 -0
- package/dist/{chunk-F2Q76CQ4.cjs → chunk-54JVNOAQ.cjs} +5 -37
- package/dist/chunk-54JVNOAQ.cjs.map +1 -0
- package/dist/{chunk-KGAJ5HFO.cjs → chunk-5CN7B4CZ.cjs} +17 -98
- package/dist/chunk-5CN7B4CZ.cjs.map +1 -0
- package/dist/{chunk-XTQHSOIC.cjs → chunk-5DTPBFX5.cjs} +88 -87
- package/dist/chunk-5DTPBFX5.cjs.map +1 -0
- package/dist/chunk-6G35I3VW.cjs +40 -0
- package/dist/chunk-6G35I3VW.cjs.map +1 -0
- package/dist/{chunk-UPBXUOW7.cjs → chunk-6RMLO5O4.cjs} +19 -64
- package/dist/chunk-6RMLO5O4.cjs.map +1 -0
- package/dist/chunk-6SA7UIQJ.cjs +94 -0
- package/dist/chunk-6SA7UIQJ.cjs.map +1 -0
- package/dist/chunk-6ZR4QC3O.cjs +12 -0
- package/dist/{chunk-Q3ZZLU3O.cjs.map → chunk-6ZR4QC3O.cjs.map} +1 -1
- package/dist/chunk-73KASJGO.cjs +52 -0
- package/dist/chunk-73KASJGO.cjs.map +1 -0
- package/dist/{chunk-R2LA6MKR.cjs → chunk-7JGLPAFV.cjs} +8 -8
- package/dist/{chunk-R2LA6MKR.cjs.map → chunk-7JGLPAFV.cjs.map} +1 -1
- package/dist/chunk-A3W7QG7K.js +45 -0
- package/dist/chunk-A3W7QG7K.js.map +1 -0
- package/dist/{chunk-Q5ASTPM4.cjs → chunk-ASYQDPPU.cjs} +19 -19
- package/dist/{chunk-Q5ASTPM4.cjs.map → chunk-ASYQDPPU.cjs.map} +1 -1
- package/dist/{chunk-IE2TPFBT.js → chunk-ATTXBMAX.js} +4 -74
- package/dist/chunk-ATTXBMAX.js.map +1 -0
- package/dist/chunk-AW4A3P5A.cjs +51 -0
- package/dist/chunk-AW4A3P5A.cjs.map +1 -0
- package/dist/{chunk-ZYQEXGYC.cjs → chunk-CIINW6PS.cjs} +92 -87
- package/dist/chunk-CIINW6PS.cjs.map +1 -0
- package/dist/{chunk-UP4QAJND.cjs → chunk-FLOI7QOT.cjs} +66 -65
- package/dist/chunk-FLOI7QOT.cjs.map +1 -0
- package/dist/{chunk-7V335GHG.cjs → chunk-FLRCVI2G.cjs} +12 -2
- package/dist/chunk-FLRCVI2G.cjs.map +1 -0
- package/dist/{chunk-HKN622O4.js → chunk-GKFWM3DS.js} +4 -32
- package/dist/chunk-GKFWM3DS.js.map +1 -0
- package/dist/chunk-HTGDWIDE.cjs +89 -0
- package/dist/chunk-HTGDWIDE.cjs.map +1 -0
- package/dist/{chunk-OGUH56BB.js → chunk-IJORSAC3.js} +6 -42
- package/dist/chunk-IJORSAC3.js.map +1 -0
- package/dist/{chunk-G6P3OVDY.cjs → chunk-JIEJCTDS.cjs} +18 -2
- package/dist/chunk-JIEJCTDS.cjs.map +1 -0
- package/dist/{chunk-NZ5PMBTG.js → chunk-K5P5OZXS.js} +12 -3
- package/dist/chunk-K5P5OZXS.js.map +1 -0
- package/dist/{chunk-HM6XMR3E.cjs → chunk-KTIEB7VH.cjs} +42 -32
- package/dist/chunk-KTIEB7VH.cjs.map +1 -0
- package/dist/chunk-LJLMDDCW.js +282 -0
- package/dist/chunk-LJLMDDCW.js.map +1 -0
- package/dist/{chunk-Z36W5WUM.js → chunk-MAQJYNJR.js} +3 -3
- package/dist/{chunk-Z36W5WUM.js.map → chunk-MAQJYNJR.js.map} +1 -1
- package/dist/{chunk-N3VVQDMA.js → chunk-MXE2U3EX.js} +3 -3
- package/dist/{chunk-N3VVQDMA.js.map → chunk-MXE2U3EX.js.map} +1 -1
- package/dist/{chunk-4K6IHUW6.cjs → chunk-N2MBPTAF.cjs} +14 -14
- package/dist/{chunk-4K6IHUW6.cjs.map → chunk-N2MBPTAF.cjs.map} +1 -1
- package/dist/{chunk-CUZGBWFT.js → chunk-O4VUR6SI.js} +3 -3
- package/dist/{chunk-CUZGBWFT.js.map → chunk-O4VUR6SI.js.map} +1 -1
- package/dist/chunk-RZ4DH4E7.cjs +15832 -0
- package/dist/chunk-RZ4DH4E7.cjs.map +1 -0
- package/dist/chunk-SAJSMR2B.js +35 -0
- package/dist/chunk-SAJSMR2B.js.map +1 -0
- package/dist/{chunk-RU5BBUU2.cjs → chunk-SFFJ2IKN.cjs} +71 -67
- package/dist/chunk-SFFJ2IKN.cjs.map +1 -0
- package/dist/{chunk-Y52UNT66.js → chunk-STP7QVUB.js} +8 -7
- package/dist/chunk-STP7QVUB.js.map +1 -0
- package/dist/chunk-THX25XW6.js +590 -0
- package/dist/chunk-THX25XW6.js.map +1 -0
- package/dist/{chunk-MB363HT5.js → chunk-TQOYM4LN.js} +18 -3
- package/dist/chunk-TQOYM4LN.js.map +1 -0
- package/dist/chunk-UIFEEPME.js +15787 -0
- package/dist/chunk-UIFEEPME.js.map +1 -0
- package/dist/{chunk-GPUNAJFH.js → chunk-UJ4V3YUQ.js} +3 -3
- package/dist/{chunk-GPUNAJFH.js.map → chunk-UJ4V3YUQ.js.map} +1 -1
- package/dist/{chunk-C2RWFIYP.cjs → chunk-V4IQYOQ4.cjs} +127 -511
- package/dist/chunk-V4IQYOQ4.cjs.map +1 -0
- package/dist/chunk-VMEWZU2N.cjs +287 -0
- package/dist/chunk-VMEWZU2N.cjs.map +1 -0
- package/dist/{chunk-3DTLDGIM.js → chunk-VZX2KSY3.js} +14 -9
- package/dist/chunk-VZX2KSY3.js.map +1 -0
- package/dist/{chunk-BMDF2S7S.js → chunk-WYTUF3QO.js} +3 -3
- package/dist/{chunk-BMDF2S7S.js.map → chunk-WYTUF3QO.js.map} +1 -1
- package/dist/{chunk-MRMD7S7E.js → chunk-XKJQQQVR.js} +9 -8
- package/dist/chunk-XKJQQQVR.js.map +1 -0
- package/dist/{chunk-SFNUHFON.js → chunk-YCV72E6L.js} +25 -19
- package/dist/chunk-YCV72E6L.js.map +1 -0
- package/dist/{chunk-VGU26WIU.cjs → chunk-YQGLVWB2.cjs} +4 -4
- package/dist/{chunk-VGU26WIU.cjs.map → chunk-YQGLVWB2.cjs.map} +1 -1
- package/dist/{ddl-BwH00BB6.d.ts → ddl-BJcPrB4L.d.ts} +3 -3
- package/dist/{ddl-D3o-RmsV.d.cts → ddl-CPZ7mB7X.d.cts} +3 -3
- package/dist/{extension-types-CwHV-Uk4.d.ts → extension-types-D1k0inWU.d.cts} +1 -1
- package/dist/{extension-types-CwHV-Uk4.d.cts → extension-types-D1k0inWU.d.ts} +1 -1
- package/dist/graph-extension/index.cjs +19 -19
- package/dist/graph-extension/index.d.cts +5 -16
- package/dist/graph-extension/index.d.ts +5 -16
- package/dist/graph-extension/index.js +4 -4
- package/dist/graph-merge/index.cjs +3822 -0
- package/dist/graph-merge/index.cjs.map +1 -0
- package/dist/graph-merge/index.d.cts +1191 -0
- package/dist/graph-merge/index.d.ts +1191 -0
- package/dist/graph-merge/index.js +3791 -0
- package/dist/graph-merge/index.js.map +1 -0
- package/dist/{index-CapHwi1a.d.ts → index-BEK0VtNB.d.ts} +11 -3
- package/dist/{index-jPPexxM5.d.cts → index-C8sSTErx.d.cts} +11 -3
- package/dist/index.cjs +365 -15732
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +12 -11
- package/dist/index.d.ts +12 -11
- package/dist/index.js +27 -15533
- package/dist/index.js.map +1 -1
- package/dist/indexes/index.cjs +32 -28
- package/dist/indexes/index.d.cts +5 -5
- package/dist/indexes/index.d.ts +5 -5
- package/dist/indexes/index.js +8 -4
- package/dist/interchange/index.cjs +50 -593
- package/dist/interchange/index.cjs.map +1 -1
- package/dist/interchange/index.d.cts +5 -5
- package/dist/interchange/index.d.ts +5 -5
- package/dist/interchange/index.js +3 -589
- package/dist/interchange/index.js.map +1 -1
- package/dist/{manager-BUugwCYz.d.ts → manager-By-WEd8M.d.ts} +3 -3
- package/dist/{manager-DpIpn1HQ.d.cts → manager-Np7VVSlE.d.cts} +3 -3
- package/dist/{materialize-indexes-lkawaDor.d.ts → materialize-indexes-CAGhqPHQ.d.ts} +1 -1
- package/dist/{materialize-indexes-oanE3RU0.d.cts → materialize-indexes-DEYkU-wr.d.cts} +1 -1
- package/dist/{postgres-CQL9UIn2.d.cts → postgres-4J2tmauh.d.cts} +1 -1
- package/dist/{postgres-CcRLaxz0.d.ts → postgres-BdIb7tS_.d.ts} +1 -1
- package/dist/profiler/index.cjs +9 -9
- package/dist/profiler/index.d.cts +7 -7
- package/dist/profiler/index.d.ts +7 -7
- package/dist/profiler/index.js +2 -2
- package/dist/result-DWo6mUVz.d.cts +37 -0
- package/dist/result-DWo6mUVz.d.ts +37 -0
- package/dist/schema/index.cjs +33 -32
- package/dist/schema/index.cjs.map +1 -1
- package/dist/schema/index.d.cts +7 -7
- package/dist/schema/index.d.ts +7 -7
- package/dist/schema/index.js +10 -9
- package/dist/schema/index.js.map +1 -1
- package/dist/{sqlite-Rj3xu4It.d.cts → sqlite-Gatk_iw_.d.cts} +1 -1
- package/dist/{sqlite-CZDFUfHS.d.ts → sqlite-aM_PAz-O.d.ts} +1 -1
- package/dist/{store-B43FpOVX.d.cts → store-DuCbdqsh.d.cts} +84 -44
- package/dist/{store-De0Y33wP.d.ts → store-MloRPwb9.d.ts} +84 -44
- package/dist/{types-DXCSyxac.d.cts → types-BKQljXom.d.ts} +18 -2
- package/dist/{types-CmAT-Z47.d.ts → types-C1CYxWrL.d.cts} +18 -2
- package/dist/{types-Bwlp_yvu.d.cts → types-DoByHGyU.d.cts} +2 -2
- package/dist/{types-B5GSeE3t.d.ts → types-K3vpaJAL.d.ts} +2 -2
- package/dist/{where-CP4qGIHd.d.ts → where-Dt49bvo6.d.ts} +2 -2
- package/dist/{where-2dsyYt3d.d.cts → where-DydZjGOb.d.cts} +2 -2
- package/package.json +6 -1
- package/dist/chunk-3DTLDGIM.js.map +0 -1
- package/dist/chunk-7KLVFWXR.js.map +0 -1
- package/dist/chunk-7V335GHG.cjs.map +0 -1
- package/dist/chunk-A4H6QMV4.js.map +0 -1
- package/dist/chunk-C2RWFIYP.cjs.map +0 -1
- package/dist/chunk-F2Q76CQ4.cjs.map +0 -1
- package/dist/chunk-G6P3OVDY.cjs.map +0 -1
- package/dist/chunk-HKN622O4.js.map +0 -1
- package/dist/chunk-HM6XMR3E.cjs.map +0 -1
- package/dist/chunk-IE2TPFBT.js.map +0 -1
- package/dist/chunk-KGAJ5HFO.cjs.map +0 -1
- package/dist/chunk-MB363HT5.js.map +0 -1
- package/dist/chunk-MRMD7S7E.js.map +0 -1
- package/dist/chunk-NZ5PMBTG.js.map +0 -1
- package/dist/chunk-OGUH56BB.js.map +0 -1
- package/dist/chunk-Q3ZZLU3O.cjs +0 -12
- package/dist/chunk-RU5BBUU2.cjs.map +0 -1
- package/dist/chunk-SFNUHFON.js.map +0 -1
- package/dist/chunk-UP4QAJND.cjs.map +0 -1
- package/dist/chunk-UPBXUOW7.cjs.map +0 -1
- package/dist/chunk-XTQHSOIC.cjs.map +0 -1
- package/dist/chunk-Y52UNT66.js.map +0 -1
- package/dist/chunk-ZYQEXGYC.cjs.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunkJIEJCTDS_cjs = require('./chunk-JIEJCTDS.cjs');
|
|
4
|
+
var chunkFLRCVI2G_cjs = require('./chunk-FLRCVI2G.cjs');
|
|
5
5
|
|
|
6
6
|
// src/ontology/closures.ts
|
|
7
7
|
function computeTransitiveClosure(relations) {
|
|
@@ -83,7 +83,7 @@ var GRAPH_EXTENSION_ISSUE_CODES = [
|
|
|
83
83
|
"EMPTY_INDEX_FIELDS",
|
|
84
84
|
"UNKNOWN_PROPERTY_KEY"
|
|
85
85
|
];
|
|
86
|
-
var GraphExtensionError = class extends
|
|
86
|
+
var GraphExtensionError = class extends chunkJIEJCTDS_cjs.TypeGraphError {
|
|
87
87
|
constructor(spec) {
|
|
88
88
|
super(spec.message, spec.code, {
|
|
89
89
|
details: spec.details,
|
|
@@ -243,6 +243,26 @@ var GraphExtensionVersionUnsupportedError = class extends GraphExtensionError {
|
|
|
243
243
|
}
|
|
244
244
|
};
|
|
245
245
|
|
|
246
|
+
// src/utils/result.ts
|
|
247
|
+
function ok(data) {
|
|
248
|
+
return { success: true, data };
|
|
249
|
+
}
|
|
250
|
+
function err(error) {
|
|
251
|
+
return { success: false, error };
|
|
252
|
+
}
|
|
253
|
+
function unwrap(result) {
|
|
254
|
+
if (result.success) {
|
|
255
|
+
return result.data;
|
|
256
|
+
}
|
|
257
|
+
throw result.error;
|
|
258
|
+
}
|
|
259
|
+
function isOk(result) {
|
|
260
|
+
return result.success;
|
|
261
|
+
}
|
|
262
|
+
function isErr(result) {
|
|
263
|
+
return !result.success;
|
|
264
|
+
}
|
|
265
|
+
|
|
246
266
|
// src/graph-extension/extension-types.ts
|
|
247
267
|
var LEGACY_GRAPH_EXTENSION_VERSION = 1;
|
|
248
268
|
var CURRENT_GRAPH_EXTENSION_VERSION = 1;
|
|
@@ -320,7 +340,7 @@ function describeNonPlain(value) {
|
|
|
320
340
|
return "non-plain object";
|
|
321
341
|
}
|
|
322
342
|
function throwInvalid(path, kind, ownerKind) {
|
|
323
|
-
throw new
|
|
343
|
+
throw new chunkJIEJCTDS_cjs.ConfigurationError(
|
|
324
344
|
`${ownerKind} ${path} contains a non-JSON value (${kind}). Annotations must be JSON-serializable.`,
|
|
325
345
|
{ path, valueKind: kind },
|
|
326
346
|
{
|
|
@@ -387,7 +407,7 @@ function assertSchemaKeysAreFree(entityKind, name, keys, reservedStructuralKeys)
|
|
|
387
407
|
);
|
|
388
408
|
if (structuralConflicts.length > 0) {
|
|
389
409
|
const label = entityKind.toLowerCase();
|
|
390
|
-
throw new
|
|
410
|
+
throw new chunkJIEJCTDS_cjs.ConfigurationError(
|
|
391
411
|
`${entityKind} "${name}" schema contains reserved property names: ${structuralConflicts.join(", ")}`,
|
|
392
412
|
{
|
|
393
413
|
[`${label}Type`]: name,
|
|
@@ -402,7 +422,7 @@ function assertSchemaKeysAreFree(entityKind, name, keys, reservedStructuralKeys)
|
|
|
402
422
|
const prefixConflicts = keys.filter((key) => isReservedPropertyName(key));
|
|
403
423
|
if (prefixConflicts.length > 0) {
|
|
404
424
|
const label = entityKind.toLowerCase();
|
|
405
|
-
throw new
|
|
425
|
+
throw new chunkJIEJCTDS_cjs.ConfigurationError(
|
|
406
426
|
`${entityKind} "${name}" schema uses the reserved "${RESERVED_PROPERTY_PREFIX}" prefix on: ${prefixConflicts.join(", ")}`,
|
|
407
427
|
{
|
|
408
428
|
[`${label}Type`]: name,
|
|
@@ -418,7 +438,7 @@ function assertSchemaKeysAreFree(entityKind, name, keys, reservedStructuralKeys)
|
|
|
418
438
|
function validateProjectionField(field, entityType, kind) {
|
|
419
439
|
const reserved = entityType === "node" ? RESERVED_NODE_KEYS : RESERVED_EDGE_KEYS;
|
|
420
440
|
if (reserved.has(field)) {
|
|
421
|
-
throw new
|
|
441
|
+
throw new chunkJIEJCTDS_cjs.ConfigurationError(
|
|
422
442
|
`Projection field "${field}" on ${entityType} kind "${kind}" conflicts with a reserved structural key`,
|
|
423
443
|
{ field, kind, entityType, reservedKeys: [...reserved] },
|
|
424
444
|
{
|
|
@@ -427,7 +447,7 @@ function validateProjectionField(field, entityType, kind) {
|
|
|
427
447
|
);
|
|
428
448
|
}
|
|
429
449
|
if (PROTOTYPE_POLLUTION_KEYS.has(field)) {
|
|
430
|
-
throw new
|
|
450
|
+
throw new chunkJIEJCTDS_cjs.ConfigurationError(
|
|
431
451
|
`Projection field "${field}" on ${entityType} kind "${kind}" is not allowed`,
|
|
432
452
|
{ field, kind, entityType },
|
|
433
453
|
{
|
|
@@ -446,20 +466,6 @@ function filterReservedKeys(props, reservedKeys) {
|
|
|
446
466
|
return filtered;
|
|
447
467
|
}
|
|
448
468
|
|
|
449
|
-
// src/utils/result.ts
|
|
450
|
-
function ok(data) {
|
|
451
|
-
return { success: true, data };
|
|
452
|
-
}
|
|
453
|
-
function err(error) {
|
|
454
|
-
return { success: false, error };
|
|
455
|
-
}
|
|
456
|
-
function unwrap(result) {
|
|
457
|
-
if (result.success) {
|
|
458
|
-
return result.data;
|
|
459
|
-
}
|
|
460
|
-
throw result.error;
|
|
461
|
-
}
|
|
462
|
-
|
|
463
469
|
// src/graph-extension/validation.ts
|
|
464
470
|
var META_EDGE_NAME_SET = new Set(ALL_META_EDGE_NAMES);
|
|
465
471
|
var SUPPORTED_PROPERTY_TYPES = /* @__PURE__ */ new Set([
|
|
@@ -498,7 +504,7 @@ function rejectUnknownPropertyKeys(raw, type, path, issues) {
|
|
|
498
504
|
for (const key of Object.keys(raw)) {
|
|
499
505
|
if (COMMON_PROPERTY_KEYS.has(key) || typeKeys.has(key)) continue;
|
|
500
506
|
issues.push({
|
|
501
|
-
path: `${path}/${
|
|
507
|
+
path: `${path}/${chunkFLRCVI2G_cjs.encodeJsonPointerSegment(key)}`,
|
|
502
508
|
message: `Unknown property key "${key}" for type "${type}". Recognized keys: ${recognized.join(", ")}.`,
|
|
503
509
|
code: "UNKNOWN_PROPERTY_KEY"
|
|
504
510
|
});
|
|
@@ -508,7 +514,7 @@ function rejectUnknownObjectKeys(raw, allowed, label, path, code, issues) {
|
|
|
508
514
|
for (const key of Object.keys(raw)) {
|
|
509
515
|
if (allowed.has(key)) continue;
|
|
510
516
|
issues.push({
|
|
511
|
-
path: `${path}/${
|
|
517
|
+
path: `${path}/${chunkFLRCVI2G_cjs.encodeJsonPointerSegment(key)}`,
|
|
512
518
|
message: `Unknown ${label} key "${key}". Allowed: ${[...allowed].join(", ")}.`,
|
|
513
519
|
code
|
|
514
520
|
});
|
|
@@ -580,7 +586,7 @@ function validateGraphExtension(input, options = {}) {
|
|
|
580
586
|
for (const key of Object.keys(documentRecord)) {
|
|
581
587
|
if (!KNOWN_DOCUMENT_KEYS.has(key)) {
|
|
582
588
|
issues.push({
|
|
583
|
-
path: `/${
|
|
589
|
+
path: `/${chunkFLRCVI2G_cjs.encodeJsonPointerSegment(key)}`,
|
|
584
590
|
message: `Unknown top-level key "${key}". Did you mean one of: ${[...KNOWN_DOCUMENT_KEYS].join(", ")}?`,
|
|
585
591
|
code: "UNKNOWN_DOCUMENT_KEY"
|
|
586
592
|
});
|
|
@@ -639,7 +645,7 @@ function validateNodesSection(rawNodes, issues, strict) {
|
|
|
639
645
|
const result = {};
|
|
640
646
|
const recorded = /* @__PURE__ */ new Set();
|
|
641
647
|
for (const [kindName, rawNode] of Object.entries(rawNodes)) {
|
|
642
|
-
const path = `/nodes/${
|
|
648
|
+
const path = `/nodes/${chunkFLRCVI2G_cjs.encodeJsonPointerSegment(kindName)}`;
|
|
643
649
|
if (!isValidKindName(kindName)) {
|
|
644
650
|
issues.push({
|
|
645
651
|
path,
|
|
@@ -733,7 +739,7 @@ function validateEdgesSection(rawEdges, issues, strict) {
|
|
|
733
739
|
const result = {};
|
|
734
740
|
const recorded = /* @__PURE__ */ new Set();
|
|
735
741
|
for (const [kindName, rawEdge] of Object.entries(rawEdges)) {
|
|
736
|
-
const path = `/edges/${
|
|
742
|
+
const path = `/edges/${chunkFLRCVI2G_cjs.encodeJsonPointerSegment(kindName)}`;
|
|
737
743
|
if (!isValidKindName(kindName)) {
|
|
738
744
|
issues.push({
|
|
739
745
|
path,
|
|
@@ -1269,7 +1275,7 @@ function validatePropertiesMap(raw, path, ownerType, ownerName, issues, strict)
|
|
|
1269
1275
|
const reserved = ownerType === "node" ? RESERVED_NODE_KEYS : RESERVED_EDGE_KEYS;
|
|
1270
1276
|
const result = {};
|
|
1271
1277
|
for (const [propertyName, propertyValue] of Object.entries(raw)) {
|
|
1272
|
-
const propertyPath = `${path}/${
|
|
1278
|
+
const propertyPath = `${path}/${chunkFLRCVI2G_cjs.encodeJsonPointerSegment(propertyName)}`;
|
|
1273
1279
|
if (reserved.has(propertyName)) {
|
|
1274
1280
|
issues.push({
|
|
1275
1281
|
path: propertyPath,
|
|
@@ -1594,7 +1600,7 @@ function validateObjectProperty(raw, path, depth, issues, strict) {
|
|
|
1594
1600
|
}
|
|
1595
1601
|
const fields = {};
|
|
1596
1602
|
for (const [name, value] of propertiesEntries) {
|
|
1597
|
-
const fieldPath = `${path}/properties/${
|
|
1603
|
+
const fieldPath = `${path}/properties/${chunkFLRCVI2G_cjs.encodeJsonPointerSegment(name)}`;
|
|
1598
1604
|
if (!isPlainObject(value)) {
|
|
1599
1605
|
issues.push({
|
|
1600
1606
|
path: fieldPath,
|
|
@@ -1939,7 +1945,7 @@ function validateAnnotations(raw, path, ownerLabel, issues) {
|
|
|
1939
1945
|
try {
|
|
1940
1946
|
assertJsonValue(raw, "annotations", ownerLabel);
|
|
1941
1947
|
} catch (error) {
|
|
1942
|
-
if (error instanceof
|
|
1948
|
+
if (error instanceof chunkJIEJCTDS_cjs.ConfigurationError) {
|
|
1943
1949
|
const detailPath = error.details.path;
|
|
1944
1950
|
const annotationPath = typeof detailPath === "string" ? `${path}/${detailPath.replace(/^annotations\.?/, "").replaceAll(".", "/")}` : path;
|
|
1945
1951
|
issues.push({
|
|
@@ -2058,12 +2064,16 @@ exports.assertJsonValue = assertJsonValue;
|
|
|
2058
2064
|
exports.assertSchemaKeysAreFree = assertSchemaKeysAreFree;
|
|
2059
2065
|
exports.compactUndefined = compactUndefined;
|
|
2060
2066
|
exports.computeTransitiveClosure = computeTransitiveClosure;
|
|
2067
|
+
exports.err = err;
|
|
2061
2068
|
exports.filterReservedKeys = filterReservedKeys;
|
|
2062
2069
|
exports.freezeDeep = freezeDeep;
|
|
2063
2070
|
exports.invertClosure = invertClosure;
|
|
2071
|
+
exports.isErr = isErr;
|
|
2072
|
+
exports.isOk = isOk;
|
|
2064
2073
|
exports.isReachable = isReachable;
|
|
2074
|
+
exports.ok = ok;
|
|
2065
2075
|
exports.unwrap = unwrap;
|
|
2066
2076
|
exports.validateGraphExtension = validateGraphExtension;
|
|
2067
2077
|
exports.validateProjectionField = validateProjectionField;
|
|
2068
|
-
//# sourceMappingURL=chunk-
|
|
2069
|
-
//# sourceMappingURL=chunk-
|
|
2078
|
+
//# sourceMappingURL=chunk-KTIEB7VH.cjs.map
|
|
2079
|
+
//# sourceMappingURL=chunk-KTIEB7VH.cjs.map
|