openplanr 1.2.5 → 1.2.6
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"markdown.d.ts","sourceRoot":"","sources":["../../src/utils/markdown.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAE9D,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,mBAAmB,CAAC;IAC1B,OAAO,EAAE,MAAM,CAAC;CACjB;
|
|
1
|
+
{"version":3,"file":"markdown.d.ts","sourceRoot":"","sources":["../../src/utils/markdown.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAE9D,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,mBAAmB,CAAC;IAC1B,OAAO,EAAE,MAAM,CAAC;CACjB;AAID,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,cAAc,CAWzD;AAED,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,mBAAmB,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAG5F"}
|
package/dist/utils/markdown.js
CHANGED
|
@@ -1,11 +1,17 @@
|
|
|
1
|
-
import
|
|
1
|
+
import YAML from 'yaml';
|
|
2
|
+
const FRONTMATTER_REGEX = /^---[^\S\r\n]*\r?\n([\s\S]*?)\r?\n---[^\S\r\n]*\r?\n?([\s\S]*)$/;
|
|
2
3
|
export function parseMarkdown(raw) {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
const match = FRONTMATTER_REGEX.exec(raw);
|
|
5
|
+
if (!match) {
|
|
6
|
+
return { data: {}, content: raw };
|
|
7
|
+
}
|
|
8
|
+
const yamlStr = match[1];
|
|
9
|
+
const content = match[2];
|
|
10
|
+
const data = YAML.parse(yamlStr) ?? {};
|
|
6
11
|
return { data: data, content };
|
|
7
12
|
}
|
|
8
13
|
export function toMarkdownWithFrontmatter(data, content) {
|
|
9
|
-
|
|
14
|
+
const yamlStr = YAML.stringify(data).trimEnd();
|
|
15
|
+
return `---\n${yamlStr}\n---\n${content}`;
|
|
10
16
|
}
|
|
11
17
|
//# sourceMappingURL=markdown.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"markdown.js","sourceRoot":"","sources":["../../src/utils/markdown.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"markdown.js","sourceRoot":"","sources":["../../src/utils/markdown.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AAQxB,MAAM,iBAAiB,GAAG,iEAAiE,CAAC;AAE5F,MAAM,UAAU,aAAa,CAAC,GAAW;IACvC,MAAM,KAAK,GAAG,iBAAiB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC1C,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,OAAO,EAAE,IAAI,EAAE,EAAyB,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC;IAC3D,CAAC;IAED,MAAM,OAAO,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;IACzB,MAAM,OAAO,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;IAEzB,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;IACvC,OAAO,EAAE,IAAI,EAAE,IAA2B,EAAE,OAAO,EAAE,CAAC;AACxD,CAAC;AAED,MAAM,UAAU,yBAAyB,CAAC,IAAyB,EAAE,OAAe;IAClF,MAAM,OAAO,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,CAAC;IAC/C,OAAO,QAAQ,OAAO,UAAU,OAAO,EAAE,CAAC;AAC5C,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "openplanr",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.6",
|
|
4
4
|
"description": "AI-powered planning CLI — backlog, sprints, task templates, estimation, GitHub sync, and AI agent rules for Cursor, Claude Code, and Codex",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/cli/index.js",
|
|
@@ -76,9 +76,9 @@
|
|
|
76
76
|
"@napi-rs/keyring": "^1.2.0",
|
|
77
77
|
"chalk": "^5.3.0",
|
|
78
78
|
"commander": "^14.0.3",
|
|
79
|
-
"gray-matter": "^4.0.3",
|
|
80
79
|
"handlebars": "^4.7.9",
|
|
81
80
|
"openai": "^6.33.0",
|
|
81
|
+
"yaml": "^2.8.3",
|
|
82
82
|
"zod": "^4.3.6"
|
|
83
83
|
},
|
|
84
84
|
"devDependencies": {
|