@jvittechs/jai1-cli 0.1.62 → 0.1.63
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/cli.js +13 -2
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -33,7 +33,7 @@ var NetworkError = class extends Jai1Error {
|
|
|
33
33
|
// package.json
|
|
34
34
|
var package_default = {
|
|
35
35
|
name: "@jvittechs/jai1-cli",
|
|
36
|
-
version: "0.1.
|
|
36
|
+
version: "0.1.63",
|
|
37
37
|
description: "Unified CLI for Jai1 Framework Management and Redmine Context Sync",
|
|
38
38
|
type: "module",
|
|
39
39
|
bin: {
|
|
@@ -5671,13 +5671,24 @@ import { marked } from "marked";
|
|
|
5671
5671
|
import TerminalRenderer from "marked-terminal";
|
|
5672
5672
|
async function handleMarkdownPreview(file, options) {
|
|
5673
5673
|
try {
|
|
5674
|
-
|
|
5674
|
+
let content = await readFile5(file, "utf-8");
|
|
5675
5675
|
if (options.raw) {
|
|
5676
5676
|
console.log("\u{1F4C4} Markdown File (Raw):");
|
|
5677
5677
|
console.log("\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n");
|
|
5678
5678
|
console.log(content);
|
|
5679
5679
|
console.log();
|
|
5680
5680
|
} else {
|
|
5681
|
+
content = content.replace(/```mermaid\n([\s\S]*?)```/g, (match, code) => {
|
|
5682
|
+
return `
|
|
5683
|
+
\u{1F3A8} **Mermaid Diagram**
|
|
5684
|
+
|
|
5685
|
+
\`\`\`
|
|
5686
|
+
${code.trim()}
|
|
5687
|
+
\`\`\`
|
|
5688
|
+
|
|
5689
|
+
\u{1F4A1} *Tip: Mermaid diagrams cannot be rendered in terminal. View in a Markdown viewer.*
|
|
5690
|
+
`;
|
|
5691
|
+
});
|
|
5681
5692
|
marked.setOptions({
|
|
5682
5693
|
// @ts-ignore - marked-terminal types may not match perfectly
|
|
5683
5694
|
renderer: new TerminalRenderer()
|