@aigne/doc-smith 0.9.9-beta.2 → 0.9.9-beta.3
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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.9.9-beta.3](https://github.com/AIGNE-io/aigne-doc-smith/compare/v0.9.9-beta.2...v0.9.9-beta.3) (2025-12-11)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* **diagram:** ensure accurate timestamp handling for images and generated content ([#360](https://github.com/AIGNE-io/aigne-doc-smith/issues/360)) ([b78f833](https://github.com/AIGNE-io/aigne-doc-smith/commit/b78f833bc413fb666b7481f4fa720d0656e0e1cc))
|
|
9
|
+
|
|
3
10
|
## [0.9.9-beta.2](https://github.com/AIGNE-io/aigne-doc-smith/compare/v0.9.9-beta.1...v0.9.9-beta.2) (2025-12-11)
|
|
4
11
|
|
|
5
12
|
|
package/package.json
CHANGED
package/utils/file-utils.mjs
CHANGED
|
@@ -95,7 +95,7 @@ function parseGitignoreContent(content) {
|
|
|
95
95
|
const lines = content
|
|
96
96
|
.split("\n")
|
|
97
97
|
.map((line) => line.trim())
|
|
98
|
-
.filter((line) => line && !line.startsWith("#"))
|
|
98
|
+
.filter((line) => line && !line.startsWith("#") && line !== ".") // A standalone dot (.) in .gitignore is ineffective and should be removed.
|
|
99
99
|
.map((line) => line.replace(/^\//, "")); // Remove leading slash
|
|
100
100
|
|
|
101
101
|
// Convert each gitignore pattern to glob patterns
|
|
@@ -87,7 +87,7 @@ function extractDiagramImagesWithTimestamp(content) {
|
|
|
87
87
|
images.push({
|
|
88
88
|
type: match[1] || DEFAULT_DIAGRAM_TYPE, // Diagram type (e.g., "architecture", "guide")
|
|
89
89
|
aspectRatio: match[2] || DEFAULT_ASPECT_RATIO, // Aspect ratio (e.g., "16:9", "4:3")
|
|
90
|
-
timestamp: match[3] ||
|
|
90
|
+
timestamp: (match[3] || "").replace(/^:/, ""), // Timestamp without leading colon (null for old format)
|
|
91
91
|
altText: match[4] || DEFAULT_ALT_TEXT, // Alt text from markdown
|
|
92
92
|
path: match[5] || "", // Image path
|
|
93
93
|
fullMatch: match[0] || "", // Full matched block
|
|
@@ -229,7 +229,8 @@ function createImageMarkdown(diagramType, aspectRatio, timestamp, altText, image
|
|
|
229
229
|
const type = diagramType || DEFAULT_DIAGRAM_TYPE;
|
|
230
230
|
const ratio = aspectRatio || DEFAULT_ASPECT_RATIO;
|
|
231
231
|
const alt = altText || DEFAULT_ALT_TEXT;
|
|
232
|
-
|
|
232
|
+
const timestampPart = timestamp ? `:${timestamp}` : "";
|
|
233
|
+
return `<!-- DIAGRAM_IMAGE_START:${type}:${ratio}${timestampPart} -->\n\n<!-- DIAGRAM_IMAGE_END -->`;
|
|
233
234
|
}
|
|
234
235
|
|
|
235
236
|
const processedDocuments = new Set();
|