@harness-engineering/graph 0.7.0 → 0.7.1
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.js +5 -0
- package/dist/index.mjs +5 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2052,6 +2052,7 @@ var BusinessKnowledgeIngestor = class {
|
|
|
2052
2052
|
content: body.trim(),
|
|
2053
2053
|
metadata: {
|
|
2054
2054
|
domain,
|
|
2055
|
+
...frontmatter.source && { source: frontmatter.source },
|
|
2055
2056
|
...frontmatter.tags && { tags: frontmatter.tags },
|
|
2056
2057
|
...frontmatter.related && { related: frontmatter.related }
|
|
2057
2058
|
}
|
|
@@ -5335,6 +5336,10 @@ var KnowledgeDocMaterializer = class {
|
|
|
5335
5336
|
const mappedType = this.mapNodeType(node);
|
|
5336
5337
|
const sanitize = (s) => s.replace(/[\n\r]/g, " ").replace(/:/g, "-");
|
|
5337
5338
|
const lines = ["---", `type: ${sanitize(mappedType)}`, `domain: ${sanitize(domain)}`];
|
|
5339
|
+
const source = node.metadata?.source;
|
|
5340
|
+
if (typeof source === "string" && source.length > 0) {
|
|
5341
|
+
lines.push(`source: ${sanitize(source)}`);
|
|
5342
|
+
}
|
|
5338
5343
|
const tags = node.metadata?.tags;
|
|
5339
5344
|
if (Array.isArray(tags) && tags.length > 0) {
|
|
5340
5345
|
lines.push(`tags: [${tags.map((t) => sanitize(String(t))).join(", ")}]`);
|
package/dist/index.mjs
CHANGED
|
@@ -1941,6 +1941,7 @@ var BusinessKnowledgeIngestor = class {
|
|
|
1941
1941
|
content: body.trim(),
|
|
1942
1942
|
metadata: {
|
|
1943
1943
|
domain,
|
|
1944
|
+
...frontmatter.source && { source: frontmatter.source },
|
|
1944
1945
|
...frontmatter.tags && { tags: frontmatter.tags },
|
|
1945
1946
|
...frontmatter.related && { related: frontmatter.related }
|
|
1946
1947
|
}
|
|
@@ -5224,6 +5225,10 @@ var KnowledgeDocMaterializer = class {
|
|
|
5224
5225
|
const mappedType = this.mapNodeType(node);
|
|
5225
5226
|
const sanitize = (s) => s.replace(/[\n\r]/g, " ").replace(/:/g, "-");
|
|
5226
5227
|
const lines = ["---", `type: ${sanitize(mappedType)}`, `domain: ${sanitize(domain)}`];
|
|
5228
|
+
const source = node.metadata?.source;
|
|
5229
|
+
if (typeof source === "string" && source.length > 0) {
|
|
5230
|
+
lines.push(`source: ${sanitize(source)}`);
|
|
5231
|
+
}
|
|
5227
5232
|
const tags = node.metadata?.tags;
|
|
5228
5233
|
if (Array.isArray(tags) && tags.length > 0) {
|
|
5229
5234
|
lines.push(`tags: [${tags.map((t) => sanitize(String(t))).join(", ")}]`);
|