sysprom 1.2.0 → 1.2.2

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.
Files changed (54) hide show
  1. package/README.md +8 -0
  2. package/dist/src/canonical-json.d.ts +5 -1
  3. package/dist/src/canonical-json.js +5 -1
  4. package/dist/src/cli/define-command.d.ts +26 -0
  5. package/dist/src/cli/define-command.js +22 -0
  6. package/dist/src/cli/shared.d.ts +32 -2
  7. package/dist/src/cli/shared.js +29 -2
  8. package/dist/src/index.d.ts +0 -1
  9. package/dist/src/index.js +0 -1
  10. package/dist/src/io.d.ts +9 -2
  11. package/dist/src/io.js +9 -2
  12. package/dist/src/json-to-md.d.ts +13 -3
  13. package/dist/src/json-to-md.js +13 -3
  14. package/dist/src/md-to-json.d.ts +12 -3
  15. package/dist/src/md-to-json.js +12 -3
  16. package/dist/src/operations/add-node.d.ts +1 -2
  17. package/dist/src/operations/add-node.js +1 -2
  18. package/dist/src/operations/add-plan-task.d.ts +1 -2
  19. package/dist/src/operations/add-plan-task.js +1 -2
  20. package/dist/src/operations/add-relationship.d.ts +1 -2
  21. package/dist/src/operations/add-relationship.js +1 -2
  22. package/dist/src/operations/define-operation.d.ts +16 -8
  23. package/dist/src/operations/define-operation.js +12 -2
  24. package/dist/src/operations/mark-task-done.d.ts +1 -2
  25. package/dist/src/operations/mark-task-done.js +1 -2
  26. package/dist/src/operations/mark-task-undone.d.ts +1 -2
  27. package/dist/src/operations/mark-task-undone.js +1 -2
  28. package/dist/src/operations/next-id.d.ts +1 -2
  29. package/dist/src/operations/next-id.js +1 -2
  30. package/dist/src/operations/remove-node.d.ts +1 -2
  31. package/dist/src/operations/remove-node.js +1 -2
  32. package/dist/src/operations/remove-relationship.d.ts +1 -2
  33. package/dist/src/operations/remove-relationship.js +1 -2
  34. package/dist/src/operations/rename.d.ts +1 -2
  35. package/dist/src/operations/rename.js +1 -2
  36. package/dist/src/operations/task-list.d.ts +1 -2
  37. package/dist/src/operations/task-list.js +1 -2
  38. package/dist/src/operations/update-node.d.ts +1 -2
  39. package/dist/src/operations/update-node.js +1 -2
  40. package/dist/src/operations/update-plan-task.d.ts +1 -2
  41. package/dist/src/operations/update-plan-task.js +1 -2
  42. package/dist/src/schema.d.ts +9 -1
  43. package/dist/src/schema.js +9 -1
  44. package/dist/src/speckit/generate.d.ts +60 -6
  45. package/dist/src/speckit/generate.js +114 -6
  46. package/dist/src/speckit/parse.d.ts +61 -6
  47. package/dist/src/speckit/parse.js +105 -6
  48. package/dist/src/speckit/plan.d.ts +50 -0
  49. package/dist/src/speckit/plan.js +117 -0
  50. package/dist/src/speckit/project.d.ts +29 -0
  51. package/dist/src/speckit/project.js +49 -0
  52. package/dist/src/text.d.ts +25 -4
  53. package/dist/src/text.js +25 -4
  54. package/package.json +2 -1
package/dist/src/text.js CHANGED
@@ -1,20 +1,37 @@
1
- /** Normalise a text field (string | string[]) to a single string, joining with newlines.
1
+ /**
2
+ * Normalise a text field (string | string[]) to a single string, joining with newlines.
2
3
  * @param value - The text field to normalise.
3
4
  * @returns A single string.
5
+ * @example
6
+ * ```ts
7
+ * textToString(["line 1", "line 2"]) // => "line 1\nline 2"
8
+ * textToString("hello") // => "hello"
9
+ * ```
4
10
  */
5
11
  export function textToString(value) {
6
12
  return Array.isArray(value) ? value.join("\n") : value;
7
13
  }
8
- /** Normalise a text field to an array of lines.
14
+ /**
15
+ * Normalise a text field to an array of lines.
9
16
  * @param value - The text field to normalise.
10
17
  * @returns An array of lines.
18
+ * @example
19
+ * ```ts
20
+ * textToLines("hello") // => ["hello"]
21
+ * textToLines(["a", "b"]) // => ["a", "b"]
22
+ * ```
11
23
  */
12
24
  export function textToLines(value) {
13
25
  return Array.isArray(value) ? value : [value];
14
26
  }
15
- /** Format a text field for Markdown output — each line becomes a paragraph.
27
+ /**
28
+ * Format a text field for Markdown output — each line becomes a paragraph.
16
29
  * @param value - The text field to format.
17
30
  * @returns Markdown-formatted string.
31
+ * @example
32
+ * ```ts
33
+ * textToMarkdown(["para 1", "para 2"]) // => "para 1\npara 2"
34
+ * ```
18
35
  */
19
36
  export function textToMarkdown(value) {
20
37
  return textToLines(value).join("\n");
@@ -22,9 +39,13 @@ export function textToMarkdown(value) {
22
39
  /**
23
40
  * Parse a Markdown text block back into the canonical text representation.
24
41
  * Single-line content stays as a string; multiline becomes an array.
25
- *
26
42
  * @param block - The Markdown text block to parse.
27
43
  * @returns A string for single-line content, or an array of lines for multiline.
44
+ * @example
45
+ * ```ts
46
+ * markdownToText("single line") // => "single line"
47
+ * markdownToText("line 1\nline 2") // => ["line 1", "line 2"]
48
+ * ```
28
49
  */
29
50
  export function markdownToText(block) {
30
51
  const lines = block.split("\n");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sysprom",
3
- "version": "1.2.0",
3
+ "version": "1.2.2",
4
4
  "description": "SysProM — System Provenance Model CLI and library",
5
5
  "author": "ExaDev",
6
6
  "homepage": "https://exadev.github.io/SysProM",
@@ -76,6 +76,7 @@
76
76
  "conventional-changelog-conventionalcommits": "9.3.0",
77
77
  "eslint": "10.1.0",
78
78
  "eslint-config-prettier": "10.1.8",
79
+ "eslint-plugin-jsdoc": "62.8.0",
79
80
  "eslint-plugin-prettier": "5.5.5",
80
81
  "husky": "9.1.7",
81
82
  "prettier": "3.8.1",