refactor: split telegram delivery and unify media/frontmatter/i18n pipelines

This commit is contained in:
Peter Steinberger
2026-03-02 04:12:23 +00:00
parent 706cfcd54f
commit e1f3ded033
15 changed files with 1239 additions and 925 deletions

View File

@@ -68,6 +68,35 @@ metadata:
expect(parsed.openclaw?.events).toEqual(["command:new"]);
});
it("preserves inline description values containing colons", () => {
const content = `---
name: sample-skill
description: Use anime style IMPORTANT: Must be kawaii
---`;
const result = parseFrontmatterBlock(content);
expect(result.description).toBe("Use anime style IMPORTANT: Must be kawaii");
});
it("does not replace YAML block scalars with block indicators", () => {
const content = `---
name: sample-skill
description: |-
{json-like text}
---`;
const result = parseFrontmatterBlock(content);
expect(result.description).toBe("{json-like text}");
});
it("keeps nested YAML mappings as structured JSON", () => {
const content = `---
name: sample-skill
metadata:
openclaw: true
---`;
const result = parseFrontmatterBlock(content);
expect(result.metadata).toBe('{"openclaw":true}');
});
it("returns empty when frontmatter is missing", () => {
const content = "# No frontmatter";
expect(parseFrontmatterBlock(content)).toEqual({});