sysprom 1.2.0 → 1.2.1
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/README.md +1 -0
- package/dist/src/canonical-json.d.ts +0 -1
- package/dist/src/canonical-json.js +0 -1
- package/dist/src/cli/define-command.d.ts +15 -0
- package/dist/src/cli/define-command.js +11 -0
- package/dist/src/cli/shared.d.ts +17 -2
- package/dist/src/cli/shared.js +14 -2
- package/dist/src/index.d.ts +0 -1
- package/dist/src/index.js +0 -1
- package/dist/src/io.d.ts +0 -2
- package/dist/src/io.js +0 -2
- package/dist/src/json-to-md.d.ts +0 -3
- package/dist/src/json-to-md.js +0 -3
- package/dist/src/md-to-json.d.ts +0 -3
- package/dist/src/md-to-json.js +0 -3
- package/dist/src/operations/add-node.d.ts +1 -2
- package/dist/src/operations/add-node.js +1 -2
- package/dist/src/operations/add-plan-task.d.ts +1 -2
- package/dist/src/operations/add-plan-task.js +1 -2
- package/dist/src/operations/add-relationship.d.ts +1 -2
- package/dist/src/operations/add-relationship.js +1 -2
- package/dist/src/operations/define-operation.d.ts +5 -8
- package/dist/src/operations/define-operation.js +1 -2
- package/dist/src/operations/mark-task-done.d.ts +1 -2
- package/dist/src/operations/mark-task-done.js +1 -2
- package/dist/src/operations/mark-task-undone.d.ts +1 -2
- package/dist/src/operations/mark-task-undone.js +1 -2
- package/dist/src/operations/next-id.d.ts +1 -2
- package/dist/src/operations/next-id.js +1 -2
- package/dist/src/operations/remove-node.d.ts +1 -2
- package/dist/src/operations/remove-node.js +1 -2
- package/dist/src/operations/remove-relationship.d.ts +1 -2
- package/dist/src/operations/remove-relationship.js +1 -2
- package/dist/src/operations/rename.d.ts +1 -2
- package/dist/src/operations/rename.js +1 -2
- package/dist/src/operations/task-list.d.ts +1 -2
- package/dist/src/operations/task-list.js +1 -2
- package/dist/src/operations/update-node.d.ts +1 -2
- package/dist/src/operations/update-node.js +1 -2
- package/dist/src/operations/update-plan-task.d.ts +1 -2
- package/dist/src/operations/update-plan-task.js +1 -2
- package/dist/src/schema.d.ts +4 -1
- package/dist/src/schema.js +4 -1
- package/dist/src/speckit/generate.d.ts +36 -6
- package/dist/src/speckit/generate.js +58 -6
- package/dist/src/speckit/parse.d.ts +37 -6
- package/dist/src/speckit/parse.js +53 -6
- package/dist/src/speckit/plan.d.ts +22 -0
- package/dist/src/speckit/plan.js +53 -0
- package/dist/src/speckit/project.d.ts +9 -0
- package/dist/src/speckit/project.js +17 -0
- package/dist/src/text.d.ts +6 -4
- package/dist/src/text.js +6 -4
- package/package.json +2 -1
|
@@ -28,18 +28,27 @@ export interface SpecKitFeature {
|
|
|
28
28
|
/**
|
|
29
29
|
* Detect Spec-Kit project structure from a directory.
|
|
30
30
|
* Looks for .specify/ and specs/ subdirectories.
|
|
31
|
+
* @param dir - Directory to scan.
|
|
32
|
+
* @returns Detected project structure.
|
|
31
33
|
*/
|
|
32
34
|
export declare function detectSpecKitProject(dir: string): SpecKitProject;
|
|
33
35
|
/**
|
|
34
36
|
* List all features in the specs/ directory, sorted by number.
|
|
37
|
+
* @param project - The detected project.
|
|
38
|
+
* @returns Sorted list of features.
|
|
35
39
|
*/
|
|
36
40
|
export declare function listFeatures(project: SpecKitProject): SpecKitFeature[];
|
|
37
41
|
/**
|
|
38
42
|
* Get a specific feature by number or name.
|
|
39
43
|
* Matches "001", "001-feature-name", or "feature-name".
|
|
44
|
+
* @param project - The detected project.
|
|
45
|
+
* @param idOrName - Feature ID, number, or name.
|
|
46
|
+
* @returns The matching feature, or null.
|
|
40
47
|
*/
|
|
41
48
|
export declare function getFeature(project: SpecKitProject, idOrName: string): SpecKitFeature | null;
|
|
42
49
|
/**
|
|
43
50
|
* Resolve the constitution.md file, checking .specify/memory/ first, then root.
|
|
51
|
+
* @param project - The detected project.
|
|
52
|
+
* @returns Path to constitution.md, or null.
|
|
44
53
|
*/
|
|
45
54
|
export declare function resolveConstitution(project: SpecKitProject): string | null;
|
|
@@ -3,6 +3,8 @@ import { join } from "node:path";
|
|
|
3
3
|
/**
|
|
4
4
|
* Detect Spec-Kit project structure from a directory.
|
|
5
5
|
* Looks for .specify/ and specs/ subdirectories.
|
|
6
|
+
* @param dir - Directory to scan.
|
|
7
|
+
* @returns Detected project structure.
|
|
6
8
|
*/
|
|
7
9
|
export function detectSpecKitProject(dir) {
|
|
8
10
|
const specifyDir = checkDir(join(dir, ".specify"));
|
|
@@ -30,6 +32,8 @@ export function detectSpecKitProject(dir) {
|
|
|
30
32
|
}
|
|
31
33
|
/**
|
|
32
34
|
* List all features in the specs/ directory, sorted by number.
|
|
35
|
+
* @param project - The detected project.
|
|
36
|
+
* @returns Sorted list of features.
|
|
33
37
|
*/
|
|
34
38
|
export function listFeatures(project) {
|
|
35
39
|
if (!project.specsDir) {
|
|
@@ -63,6 +67,9 @@ export function listFeatures(project) {
|
|
|
63
67
|
/**
|
|
64
68
|
* Get a specific feature by number or name.
|
|
65
69
|
* Matches "001", "001-feature-name", or "feature-name".
|
|
70
|
+
* @param project - The detected project.
|
|
71
|
+
* @param idOrName - Feature ID, number, or name.
|
|
72
|
+
* @returns The matching feature, or null.
|
|
66
73
|
*/
|
|
67
74
|
export function getFeature(project, idOrName) {
|
|
68
75
|
const features = listFeatures(project);
|
|
@@ -83,12 +90,16 @@ export function getFeature(project, idOrName) {
|
|
|
83
90
|
}
|
|
84
91
|
/**
|
|
85
92
|
* Resolve the constitution.md file, checking .specify/memory/ first, then root.
|
|
93
|
+
* @param project - The detected project.
|
|
94
|
+
* @returns Path to constitution.md, or null.
|
|
86
95
|
*/
|
|
87
96
|
export function resolveConstitution(project) {
|
|
88
97
|
return project.constitutionPath;
|
|
89
98
|
}
|
|
90
99
|
/**
|
|
91
100
|
* Check if a directory exists, return path or null.
|
|
101
|
+
* @param path - Path to check.
|
|
102
|
+
* @returns The path if it exists as a directory, or null.
|
|
92
103
|
*/
|
|
93
104
|
function checkDir(path) {
|
|
94
105
|
try {
|
|
@@ -101,6 +112,9 @@ function checkDir(path) {
|
|
|
101
112
|
}
|
|
102
113
|
/**
|
|
103
114
|
* Parse a feature directory and extract metadata and file paths.
|
|
115
|
+
* @param dir - Directory to search.
|
|
116
|
+
* @param dirName - Subdirectory name pattern.
|
|
117
|
+
* @returns Array of matching directory paths.
|
|
104
118
|
*/
|
|
105
119
|
function parseFeatureDirectory(dir, dirName) {
|
|
106
120
|
// Parse the directory name format: "NNN-feature-name"
|
|
@@ -128,6 +142,9 @@ function parseFeatureDirectory(dir, dirName) {
|
|
|
128
142
|
}
|
|
129
143
|
/**
|
|
130
144
|
* Check if a file exists in a directory, return path or null.
|
|
145
|
+
* @param dir - Directory to search.
|
|
146
|
+
* @param filename - File name to find.
|
|
147
|
+
* @returns Array of matching file paths.
|
|
131
148
|
*/
|
|
132
149
|
function checkFile(dir, filename) {
|
|
133
150
|
const path = join(dir, filename);
|
package/dist/src/text.d.ts
CHANGED
|
@@ -1,14 +1,17 @@
|
|
|
1
|
-
/**
|
|
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.
|
|
4
5
|
*/
|
|
5
6
|
export declare function textToString(value: string | string[]): string;
|
|
6
|
-
/**
|
|
7
|
+
/**
|
|
8
|
+
* Normalise a text field to an array of lines.
|
|
7
9
|
* @param value - The text field to normalise.
|
|
8
10
|
* @returns An array of lines.
|
|
9
11
|
*/
|
|
10
12
|
export declare function textToLines(value: string | string[]): string[];
|
|
11
|
-
/**
|
|
13
|
+
/**
|
|
14
|
+
* Format a text field for Markdown output — each line becomes a paragraph.
|
|
12
15
|
* @param value - The text field to format.
|
|
13
16
|
* @returns Markdown-formatted string.
|
|
14
17
|
*/
|
|
@@ -16,7 +19,6 @@ export declare function textToMarkdown(value: string | string[]): string;
|
|
|
16
19
|
/**
|
|
17
20
|
* Parse a Markdown text block back into the canonical text representation.
|
|
18
21
|
* Single-line content stays as a string; multiline becomes an array.
|
|
19
|
-
*
|
|
20
22
|
* @param block - The Markdown text block to parse.
|
|
21
23
|
* @returns A string for single-line content, or an array of lines for multiline.
|
|
22
24
|
*/
|
package/dist/src/text.js
CHANGED
|
@@ -1,18 +1,21 @@
|
|
|
1
|
-
/**
|
|
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.
|
|
4
5
|
*/
|
|
5
6
|
export function textToString(value) {
|
|
6
7
|
return Array.isArray(value) ? value.join("\n") : value;
|
|
7
8
|
}
|
|
8
|
-
/**
|
|
9
|
+
/**
|
|
10
|
+
* Normalise a text field to an array of lines.
|
|
9
11
|
* @param value - The text field to normalise.
|
|
10
12
|
* @returns An array of lines.
|
|
11
13
|
*/
|
|
12
14
|
export function textToLines(value) {
|
|
13
15
|
return Array.isArray(value) ? value : [value];
|
|
14
16
|
}
|
|
15
|
-
/**
|
|
17
|
+
/**
|
|
18
|
+
* Format a text field for Markdown output — each line becomes a paragraph.
|
|
16
19
|
* @param value - The text field to format.
|
|
17
20
|
* @returns Markdown-formatted string.
|
|
18
21
|
*/
|
|
@@ -22,7 +25,6 @@ export function textToMarkdown(value) {
|
|
|
22
25
|
/**
|
|
23
26
|
* Parse a Markdown text block back into the canonical text representation.
|
|
24
27
|
* Single-line content stays as a string; multiline becomes an array.
|
|
25
|
-
*
|
|
26
28
|
* @param block - The Markdown text block to parse.
|
|
27
29
|
* @returns A string for single-line content, or an array of lines for multiline.
|
|
28
30
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sysprom",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.1",
|
|
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",
|