@utaba/deep-memory 0.8.0 → 0.9.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/index.cjs +29 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +14 -2
- package/dist/index.d.ts +14 -2
- package/dist/index.js +28 -3
- package/dist/index.js.map +1 -1
- package/dist/types/index.cjs.map +1 -1
- package/dist/types/index.d.cts +54 -1
- package/dist/types/index.d.ts +54 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -49,6 +49,7 @@ __export(src_exports, {
|
|
|
49
49
|
TraversalValidationError: () => TraversalValidationError,
|
|
50
50
|
TraversalVocabularyError: () => TraversalVocabularyError,
|
|
51
51
|
VocabularyValidationError: () => VocabularyValidationError,
|
|
52
|
+
createSafeSink: () => createSafeSink,
|
|
52
53
|
generateId: () => generateId,
|
|
53
54
|
isValidUuid: () => isValidUuid,
|
|
54
55
|
matchesPropertyFilters: () => matchesPropertyFilters,
|
|
@@ -3489,7 +3490,7 @@ var EventBus = class {
|
|
|
3489
3490
|
};
|
|
3490
3491
|
|
|
3491
3492
|
// src/portability/RepositoryExporter.ts
|
|
3492
|
-
var LIBRARY_VERSION = true ? "0.
|
|
3493
|
+
var LIBRARY_VERSION = true ? "0.9.0" : "0.1.0";
|
|
3493
3494
|
var RepositoryExporter = class {
|
|
3494
3495
|
storage;
|
|
3495
3496
|
provenance;
|
|
@@ -4073,8 +4074,21 @@ var RepositoryImporter = class {
|
|
|
4073
4074
|
relationshipId: rel.id
|
|
4074
4075
|
});
|
|
4075
4076
|
} else {
|
|
4076
|
-
|
|
4077
|
-
|
|
4077
|
+
try {
|
|
4078
|
+
await this.storage.createRelationship(repositoryId, rel);
|
|
4079
|
+
relationshipsImported++;
|
|
4080
|
+
} catch (err) {
|
|
4081
|
+
if (err instanceof DuplicateRelationshipError) {
|
|
4082
|
+
relationshipsSkipped++;
|
|
4083
|
+
warnings.push({
|
|
4084
|
+
code: "relationship_skipped",
|
|
4085
|
+
message: `Relationship "${rel.id}" already exists \u2014 skipped`,
|
|
4086
|
+
relationshipId: rel.id
|
|
4087
|
+
});
|
|
4088
|
+
} else {
|
|
4089
|
+
throw err;
|
|
4090
|
+
}
|
|
4091
|
+
}
|
|
4078
4092
|
}
|
|
4079
4093
|
}
|
|
4080
4094
|
}
|
|
@@ -4531,6 +4545,17 @@ var DeepMemory = class {
|
|
|
4531
4545
|
}
|
|
4532
4546
|
};
|
|
4533
4547
|
|
|
4548
|
+
// src/usage/safeSink.ts
|
|
4549
|
+
function createSafeSink(sink) {
|
|
4550
|
+
if (!sink) return void 0;
|
|
4551
|
+
return (usage) => {
|
|
4552
|
+
try {
|
|
4553
|
+
sink(usage);
|
|
4554
|
+
} catch {
|
|
4555
|
+
}
|
|
4556
|
+
};
|
|
4557
|
+
}
|
|
4558
|
+
|
|
4534
4559
|
// src/relationships/compilers/GremlinCompiler.ts
|
|
4535
4560
|
var DEFAULT_ESTIMATED_FANOUT_PER_HOP = 10;
|
|
4536
4561
|
var GremlinCompiler = class {
|
|
@@ -5606,6 +5631,7 @@ var NoOpEmbeddingProvider = class {
|
|
|
5606
5631
|
TraversalValidationError,
|
|
5607
5632
|
TraversalVocabularyError,
|
|
5608
5633
|
VocabularyValidationError,
|
|
5634
|
+
createSafeSink,
|
|
5609
5635
|
generateId,
|
|
5610
5636
|
isValidUuid,
|
|
5611
5637
|
matchesPropertyFilters,
|