@nan0web/release 3.3.0 → 3.4.0
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/bin/nan0release.js +33 -2
- package/bin/serve.js +73 -0
- package/package.json +45 -17
- package/src/Release/Document.js +1 -0
- package/src/Release/Scanner.js +3 -2
- package/src/Release.js +7 -7
- package/src/domain/App.js +31 -2
- package/src/domain/BumpCommand.js +10 -3
- package/src/domain/CheckCommand.js +504 -146
- package/src/domain/CheckCommand.story.js +92 -0
- package/src/domain/CloseCommand.js +13 -9
- package/src/domain/Dashboard/Dashboard.story.js +155 -0
- package/src/domain/Dashboard/DashboardModel.js +308 -0
- package/src/domain/Dashboard/ReleaseDiscovery.js +132 -0
- package/src/domain/Dashboard/ReleaseParser.js +226 -0
- package/src/domain/Dashboard/index.js +19 -0
- package/src/domain/DepsCommand.js +5 -2
- package/src/domain/InitCommand.js +18 -16
- package/src/domain/ListCommand.js +45 -0
- package/src/domain/PreviewCommand.js +39 -0
- package/src/domain/PublishCommand.js +7 -3
- package/src/domain/Registry/Registry.story.js +82 -0
- package/src/domain/Registry/RegistryModel.js +124 -0
- package/src/domain/ServeCommand.js +165 -0
- package/src/domain/ServeCommand.story.js +88 -0
- package/src/domain/SpecCommand.js +3 -1
- package/src/domain/StatusCommand.js +249 -3
- package/src/domain/ViewCommand.js +99 -0
- package/src/domain/WebCommand.js +140 -0
- package/src/domain/inspect/ReleaseAuditor.js +508 -0
- package/src/domain/inspect/ReleaseAuditor.story.js +136 -0
- package/src/domain/templates/release.html +34 -0
- package/src/domain/templates/release.html.template.js +34 -0
- package/src/index.js +6 -0
- package/src/inspectors/inspect-js.js +32 -0
- package/src/releases/1/0/v1.0.3/task.test.js +1 -1
- package/src/utils/nodejs/GitTelemetry.js +154 -0
- package/types/Release/Document.d.ts +24 -27
- package/types/Release/MarkdownToTest.d.ts +1 -1
- package/types/Release/Person.d.ts +9 -7
- package/types/Release/Scanner.d.ts +41 -41
- package/types/Release.d.ts +42 -42
- package/types/architecture/ProjectManagementAsCode.d.ts +59 -64
- package/types/domain/App.d.ts +24 -7
- package/types/domain/BumpCommand.d.ts +11 -6
- package/types/domain/CheckCommand.d.ts +128 -16
- package/types/domain/CheckCommand.story.d.ts +1 -0
- package/types/domain/CloseCommand.d.ts +4 -6
- package/types/domain/Dashboard/Dashboard.story.d.ts +1 -0
- package/types/domain/Dashboard/DashboardModel.d.ts +273 -0
- package/types/domain/Dashboard/GitTelemetry.d.ts +23 -0
- package/types/domain/Dashboard/ReleaseDiscovery.d.ts +47 -0
- package/types/domain/Dashboard/ReleaseParser.d.ts +79 -0
- package/types/domain/Dashboard/index.d.ts +3 -0
- package/types/domain/DepsCommand.d.ts +6 -6
- package/types/domain/InitCommand.d.ts +4 -6
- package/types/domain/ListCommand.d.ts +18 -0
- package/types/domain/PreviewCommand.d.ts +6 -0
- package/types/domain/PublishCommand.d.ts +8 -6
- package/types/domain/Registry/Registry.story.d.ts +1 -0
- package/types/domain/Registry/RegistryModel.d.ts +61 -0
- package/types/domain/ServeCommand.d.ts +59 -0
- package/types/domain/ServeCommand.story.d.ts +1 -0
- package/types/domain/SpecCommand.d.ts +4 -6
- package/types/domain/StatusCommand.d.ts +38 -3
- package/types/domain/ViewCommand.d.ts +27 -0
- package/types/domain/WebCommand.d.ts +47 -0
- package/types/domain/inspect/ReleaseAuditor.d.ts +134 -0
- package/types/domain/inspect/ReleaseAuditor.story.d.ts +1 -0
- package/types/domain/templates/release.html.template.d.ts +2 -0
- package/types/index.d.ts +18 -10
- package/types/inspectors/inspect-js.d.ts +2 -0
- package/types/utils/nodejs/GitTelemetry.d.ts +23 -0
|
@@ -1,42 +1,18 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* # Project Management as Code Architecture
|
|
3
|
-
*
|
|
4
|
-
* This architecture implements project management through automated testing,
|
|
5
|
-
* where each task is represented as a test case that validates system behavior.
|
|
6
|
-
*
|
|
7
|
-
* ## Core Concepts
|
|
8
|
-
*
|
|
9
|
-
* 1. **Tasks as Tests**: Each project task becomes a test suite that validates
|
|
10
|
-
* implementation correctness
|
|
11
|
-
* 2. **Status Tracking**: Task status moves automatically through CI/CD pipeline
|
|
12
|
-
* when tests pass/fail
|
|
13
|
-
* 3. **Release Validation**: Releases are validated by running task tests as
|
|
14
|
-
* part of the release process
|
|
15
|
-
*
|
|
16
|
-
* ## Implementation Details
|
|
17
|
-
*/
|
|
18
|
-
/**
|
|
19
|
-
* Base TestSuite class for task management
|
|
20
|
-
*/
|
|
21
|
-
declare class TestSuite {
|
|
22
|
-
name: string;
|
|
23
|
-
fn: Function;
|
|
24
|
-
/**
|
|
25
|
-
* @param {string} name - Suite name
|
|
26
|
-
* @param {Function} fn - Test function
|
|
27
|
-
*/
|
|
28
|
-
constructor(name: string, fn: Function);
|
|
29
|
-
/**
|
|
30
|
-
* Run the test suite
|
|
31
|
-
* @returns {Promise<Object>}
|
|
32
|
-
*/
|
|
33
|
-
run(): Promise<any>;
|
|
34
|
-
}
|
|
35
1
|
/**
|
|
36
2
|
* Task management through node:test infrastructure
|
|
37
3
|
* @class ProjectManagement
|
|
38
4
|
*/
|
|
39
|
-
export
|
|
5
|
+
export class ProjectManagement {
|
|
6
|
+
/**
|
|
7
|
+
* Initialize project management system
|
|
8
|
+
* @param {Object} [config] - Configuration options
|
|
9
|
+
* @param {string} [config.projectPath] - Path to project root
|
|
10
|
+
* @param {boolean} [config.autoTrack] - Enable automatic status tracking
|
|
11
|
+
*/
|
|
12
|
+
constructor(config?: {
|
|
13
|
+
projectPath?: string | undefined;
|
|
14
|
+
autoTrack?: boolean | undefined;
|
|
15
|
+
});
|
|
40
16
|
/** @type {string} */
|
|
41
17
|
projectPath: string;
|
|
42
18
|
/** @type {boolean} */
|
|
@@ -46,16 +22,6 @@ export declare class ProjectManagement {
|
|
|
46
22
|
* @type {Map<string, string>}
|
|
47
23
|
*/
|
|
48
24
|
tasks: Map<string, string>;
|
|
49
|
-
/**
|
|
50
|
-
* Initialize project management system
|
|
51
|
-
* @param {Object} [config] - Configuration options
|
|
52
|
-
* @param {string} [config.projectPath] - Path to project root
|
|
53
|
-
* @param {boolean} [config.autoTrack] - Enable automatic status tracking
|
|
54
|
-
*/
|
|
55
|
-
constructor(config?: {
|
|
56
|
-
projectPath?: string;
|
|
57
|
-
autoTrack?: boolean;
|
|
58
|
-
});
|
|
59
25
|
/**
|
|
60
26
|
* Register a task with its validation test
|
|
61
27
|
* @param {string} taskId - Unique task identifier
|
|
@@ -84,16 +50,16 @@ export declare class ProjectManagement {
|
|
|
84
50
|
* Release management system that coordinates task validation
|
|
85
51
|
* @class ReleaseManager
|
|
86
52
|
*/
|
|
87
|
-
export
|
|
88
|
-
/**
|
|
89
|
-
* @type {ProjectManagement}
|
|
90
|
-
*/
|
|
91
|
-
projectManager: ProjectManagement;
|
|
53
|
+
export class ReleaseManager {
|
|
92
54
|
/**
|
|
93
55
|
* Initialize release manager
|
|
94
56
|
* @param {ProjectManagement} projectManager - Project management instance
|
|
95
57
|
*/
|
|
96
58
|
constructor(projectManager: ProjectManagement);
|
|
59
|
+
/**
|
|
60
|
+
* @type {ProjectManagement}
|
|
61
|
+
*/
|
|
62
|
+
projectManager: ProjectManagement;
|
|
97
63
|
/**
|
|
98
64
|
* Execute release process with task validation
|
|
99
65
|
* @param {string} type - Release type (patch, minor, major)
|
|
@@ -119,7 +85,14 @@ export declare class ReleaseManager {
|
|
|
119
85
|
* Task test suite definition following node:test format
|
|
120
86
|
* @extends TestSuite
|
|
121
87
|
*/
|
|
122
|
-
export
|
|
88
|
+
export class TaskTestSuite extends TestSuite {
|
|
89
|
+
/**
|
|
90
|
+
* Initialize task test suite
|
|
91
|
+
* @param {string} taskId - Unique task identifier
|
|
92
|
+
* @param {string} description - Human-readable task description
|
|
93
|
+
* @param {Function} testFunction - Test implementation function
|
|
94
|
+
*/
|
|
95
|
+
constructor(taskId: string, description: string, testFunction: Function);
|
|
123
96
|
/**
|
|
124
97
|
* Task ID this test suite validates
|
|
125
98
|
* @type {string}
|
|
@@ -130,24 +103,12 @@ export declare class TaskTestSuite extends TestSuite {
|
|
|
130
103
|
* @type {string}
|
|
131
104
|
*/
|
|
132
105
|
description: string;
|
|
133
|
-
/**
|
|
134
|
-
* Initialize task test suite
|
|
135
|
-
* @param {string} taskId - Unique task identifier
|
|
136
|
-
* @param {string} description - Human-readable task description
|
|
137
|
-
* @param {Function} testFunction - Test implementation function
|
|
138
|
-
*/
|
|
139
|
-
constructor(taskId: string, description: string, testFunction: Function);
|
|
140
|
-
/**
|
|
141
|
-
* Execute task validation test
|
|
142
|
-
* @returns {Promise<Object>} Test execution result
|
|
143
|
-
*/
|
|
144
|
-
run(): Promise<any>;
|
|
145
106
|
}
|
|
146
107
|
/**
|
|
147
108
|
* Changelog-based task management for LLM-assisted development
|
|
148
109
|
* @class ChangelogTaskManager
|
|
149
110
|
*/
|
|
150
|
-
export
|
|
111
|
+
export class ChangelogTaskManager {
|
|
151
112
|
/**
|
|
152
113
|
* Parse changelog to extract tasks and their statuses
|
|
153
114
|
* @param {string} changelogContent - Raw changelog markdown
|
|
@@ -161,4 +122,38 @@ export declare class ChangelogTaskManager {
|
|
|
161
122
|
*/
|
|
162
123
|
generateTaskTests(tasks: Array<any>): Promise<void>;
|
|
163
124
|
}
|
|
125
|
+
/**
|
|
126
|
+
* # Project Management as Code Architecture
|
|
127
|
+
*
|
|
128
|
+
* This architecture implements project management through automated testing,
|
|
129
|
+
* where each task is represented as a test case that validates system behavior.
|
|
130
|
+
*
|
|
131
|
+
* ## Core Concepts
|
|
132
|
+
*
|
|
133
|
+
* 1. **Tasks as Tests**: Each project task becomes a test suite that validates
|
|
134
|
+
* implementation correctness
|
|
135
|
+
* 2. **Status Tracking**: Task status moves automatically through CI/CD pipeline
|
|
136
|
+
* when tests pass/fail
|
|
137
|
+
* 3. **Release Validation**: Releases are validated by running task tests as
|
|
138
|
+
* part of the release process
|
|
139
|
+
*
|
|
140
|
+
* ## Implementation Details
|
|
141
|
+
*/
|
|
142
|
+
/**
|
|
143
|
+
* Base TestSuite class for task management
|
|
144
|
+
*/
|
|
145
|
+
declare class TestSuite {
|
|
146
|
+
/**
|
|
147
|
+
* @param {string} name - Suite name
|
|
148
|
+
* @param {Function} fn - Test function
|
|
149
|
+
*/
|
|
150
|
+
constructor(name: string, fn: Function);
|
|
151
|
+
name: string;
|
|
152
|
+
fn: Function;
|
|
153
|
+
/**
|
|
154
|
+
* Run the test suite
|
|
155
|
+
* @returns {Promise<Object>}
|
|
156
|
+
*/
|
|
157
|
+
run(): Promise<any>;
|
|
158
|
+
}
|
|
164
159
|
export {};
|
package/types/domain/App.d.ts
CHANGED
|
@@ -1,16 +1,33 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
export class ReleaseApp extends ModelAsApp {
|
|
2
|
+
static alias: string;
|
|
3
|
+
static UI: {
|
|
4
|
+
title: string;
|
|
5
|
+
};
|
|
5
6
|
static command: {
|
|
6
7
|
help: string;
|
|
7
|
-
options: (typeof CheckCommand | typeof StatusCommand)[];
|
|
8
|
+
options: (typeof CheckCommand | typeof CloseCommand | typeof DepsCommand | typeof PublishCommand | typeof StatusCommand | typeof WebCommand | typeof ListCommand | typeof ServeCommand)[];
|
|
8
9
|
positional: boolean;
|
|
9
|
-
default:
|
|
10
|
+
default: typeof ViewCommand;
|
|
10
11
|
};
|
|
11
12
|
/**
|
|
12
13
|
* @param {Partial<ReleaseApp>} [data]
|
|
13
14
|
* @param {Partial<import('@nan0web/ui').ModelAsAppOptions>} [options]
|
|
14
15
|
*/
|
|
15
|
-
constructor(data?: Partial<ReleaseApp>, options?: Partial<import(
|
|
16
|
+
constructor(data?: Partial<ReleaseApp>, options?: Partial<import("@nan0web/ui").ModelAsAppOptions>);
|
|
17
|
+
/**
|
|
18
|
+
* Run the main controller logic.
|
|
19
|
+
* @returns {AsyncGenerator<import('@nan0web/ui').Intent, any, any>}
|
|
20
|
+
*/
|
|
21
|
+
run(): AsyncGenerator<import("@nan0web/ui").Intent, any, any>;
|
|
16
22
|
}
|
|
23
|
+
export default ReleaseApp;
|
|
24
|
+
import { ModelAsApp } from "@nan0web/ui";
|
|
25
|
+
import CheckCommand from './CheckCommand.js';
|
|
26
|
+
import CloseCommand from './CloseCommand.js';
|
|
27
|
+
import DepsCommand from './DepsCommand.js';
|
|
28
|
+
import PublishCommand from './PublishCommand.js';
|
|
29
|
+
import StatusCommand from './StatusCommand.js';
|
|
30
|
+
import WebCommand from './WebCommand.js';
|
|
31
|
+
import ListCommand from './ListCommand.js';
|
|
32
|
+
import ServeCommand from './ServeCommand.js';
|
|
33
|
+
import ViewCommand from './ViewCommand.js';
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import { ModelAsApp } from '@nan0web/ui';
|
|
2
1
|
/**
|
|
3
2
|
* Command to bump the version of changed packages in the monorepo.
|
|
3
|
+
* @property {string} version Target version to set
|
|
4
|
+
* @property {string} since Git reference to diff against
|
|
5
|
+
* @property {boolean} dryRun Run the command without making any changes
|
|
4
6
|
*/
|
|
5
7
|
export default class BumpCommand extends ModelAsApp {
|
|
6
8
|
static version: {
|
|
@@ -32,9 +34,12 @@ export default class BumpCommand extends ModelAsApp {
|
|
|
32
34
|
* @param {Partial<BumpCommand>} [data]
|
|
33
35
|
* @param {Partial<import('@nan0web/ui').ModelAsAppOptions>} [options]
|
|
34
36
|
*/
|
|
35
|
-
constructor(data?: Partial<BumpCommand>, options?: Partial<import(
|
|
36
|
-
/**
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
37
|
+
constructor(data?: Partial<BumpCommand>, options?: Partial<import("@nan0web/ui").ModelAsAppOptions>);
|
|
38
|
+
/** @type {string} Target version */
|
|
39
|
+
version: string;
|
|
40
|
+
/** @type {string} Git reference to diff against */
|
|
41
|
+
since: string;
|
|
42
|
+
/** @type {boolean} Run without making changes */
|
|
43
|
+
dryRun: boolean;
|
|
40
44
|
}
|
|
45
|
+
import { ModelAsApp } from '@nan0web/ui';
|
|
@@ -1,24 +1,136 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @typedef {Object} DiagnosticItem
|
|
3
|
+
* @property {'error' | 'warning' | 'info'} level
|
|
4
|
+
* @property {string} code
|
|
5
|
+
* @property {string} project
|
|
6
|
+
* @property {string} message
|
|
7
|
+
* @property {string} file
|
|
8
|
+
* @property {string} fix
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* CheckCommand - PM-as-Code Release Structure & Compliance Validator.
|
|
12
|
+
*/
|
|
13
|
+
export class CheckCommand extends ModelAsApp {
|
|
14
|
+
static alias: string;
|
|
3
15
|
static UI: {
|
|
16
|
+
errorDbRequired: string;
|
|
4
17
|
title: string;
|
|
5
|
-
|
|
6
|
-
|
|
18
|
+
header: string;
|
|
19
|
+
scanningCount: string;
|
|
20
|
+
projectHeader: string;
|
|
21
|
+
missingPackageJson: string;
|
|
22
|
+
packageJsonValid: string;
|
|
23
|
+
noReleasesDir: string;
|
|
24
|
+
releasesDirFound: string;
|
|
25
|
+
releaseHeader: string;
|
|
26
|
+
releaseDocCompleted: string;
|
|
27
|
+
missingReleaseDoc: string;
|
|
28
|
+
missingUserDoc: string;
|
|
29
|
+
incompleteUserMetrics: string;
|
|
30
|
+
userMetricsValid: string;
|
|
31
|
+
ambiguousContracts: string;
|
|
32
|
+
missingContract: string;
|
|
33
|
+
activeContractWip: string;
|
|
34
|
+
sealedRegressionClosed: string;
|
|
35
|
+
orphanFile: string;
|
|
36
|
+
recommendationsHeader: string;
|
|
37
|
+
recommendationItem: string;
|
|
38
|
+
summary: string;
|
|
39
|
+
Diagnostics: {
|
|
40
|
+
MISSING_PACKAGE_JSON: {
|
|
41
|
+
level: string;
|
|
42
|
+
code: string;
|
|
43
|
+
message: string;
|
|
44
|
+
fix: string;
|
|
45
|
+
};
|
|
46
|
+
MISSING_RELEASES_DIR: {
|
|
47
|
+
level: string;
|
|
48
|
+
code: string;
|
|
49
|
+
message: string;
|
|
50
|
+
fix: string;
|
|
51
|
+
};
|
|
52
|
+
MISSING_RELEASE_MD: {
|
|
53
|
+
level: string;
|
|
54
|
+
code: string;
|
|
55
|
+
message: string;
|
|
56
|
+
fix: string;
|
|
57
|
+
};
|
|
58
|
+
MISSING_USER_MD: {
|
|
59
|
+
level: string;
|
|
60
|
+
code: string;
|
|
61
|
+
message: string;
|
|
62
|
+
fix: string;
|
|
63
|
+
};
|
|
64
|
+
INCOMPLETE_USER_METRICS: {
|
|
65
|
+
level: string;
|
|
66
|
+
code: string;
|
|
67
|
+
message: string;
|
|
68
|
+
fix: string;
|
|
69
|
+
};
|
|
70
|
+
AMBIGUOUS_CONTRACTS: {
|
|
71
|
+
level: string;
|
|
72
|
+
code: string;
|
|
73
|
+
message: string;
|
|
74
|
+
fix: string;
|
|
75
|
+
};
|
|
76
|
+
MISSING_CONTRACT: {
|
|
77
|
+
level: string;
|
|
78
|
+
code: string;
|
|
79
|
+
message: string;
|
|
80
|
+
fix: string;
|
|
81
|
+
};
|
|
82
|
+
ORPHAN_RELEASE_FILE: {
|
|
83
|
+
level: string;
|
|
84
|
+
code: string;
|
|
85
|
+
message: string;
|
|
86
|
+
fix: string;
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
static target: {
|
|
91
|
+
help: string;
|
|
92
|
+
default: string;
|
|
93
|
+
type: string;
|
|
94
|
+
positional: boolean;
|
|
95
|
+
};
|
|
96
|
+
static registryFile: {
|
|
97
|
+
help: string;
|
|
98
|
+
default: string;
|
|
99
|
+
type: string;
|
|
100
|
+
alias: string;
|
|
101
|
+
};
|
|
102
|
+
static all: {
|
|
103
|
+
help: string;
|
|
104
|
+
default: boolean;
|
|
105
|
+
type: string;
|
|
106
|
+
alias: string;
|
|
7
107
|
};
|
|
8
|
-
static name: string;
|
|
9
|
-
/**
|
|
10
|
-
* @returns {AsyncGenerator<any, any, any>}
|
|
11
|
-
*/
|
|
12
|
-
run(): AsyncGenerator<any, any, any>;
|
|
13
108
|
/**
|
|
14
|
-
* @param {
|
|
15
|
-
* @
|
|
109
|
+
* @param {Partial<CheckCommand>} [data]
|
|
110
|
+
* @param {Partial<import('@nan0web/ui').ModelAsAppOptions>} [options]
|
|
16
111
|
*/
|
|
17
|
-
|
|
112
|
+
constructor(data?: Partial<CheckCommand>, options?: Partial<import("@nan0web/ui").ModelAsAppOptions>);
|
|
113
|
+
/** @type {string} */ target: string;
|
|
114
|
+
/** @type {string} */ registryFile: string;
|
|
115
|
+
/** @type {boolean} */ all: boolean;
|
|
18
116
|
/**
|
|
19
|
-
*
|
|
20
|
-
* @
|
|
21
|
-
* @returns {Promise<string[]>}
|
|
117
|
+
* Execute release structure check
|
|
118
|
+
* @returns {AsyncGenerator<import('@nan0web/ui').Intent, { success: boolean, diagnostics: DiagnosticItem[], checkedProjects: any[] }, any>}
|
|
22
119
|
*/
|
|
23
|
-
|
|
120
|
+
run(): AsyncGenerator<import("@nan0web/ui").Intent, {
|
|
121
|
+
success: boolean;
|
|
122
|
+
diagnostics: DiagnosticItem[];
|
|
123
|
+
checkedProjects: any[];
|
|
124
|
+
}, any>;
|
|
125
|
+
#private;
|
|
24
126
|
}
|
|
127
|
+
export default CheckCommand;
|
|
128
|
+
export type DiagnosticItem = {
|
|
129
|
+
level: "error" | "warning" | "info";
|
|
130
|
+
code: string;
|
|
131
|
+
project: string;
|
|
132
|
+
message: string;
|
|
133
|
+
file: string;
|
|
134
|
+
fix: string;
|
|
135
|
+
};
|
|
136
|
+
import { ModelAsApp } from '@nan0web/ui';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { ModelAsApp } from '@nan0web/ui';
|
|
2
1
|
export default class CloseCommand extends ModelAsApp {
|
|
3
2
|
static version: {
|
|
4
3
|
help: string;
|
|
@@ -12,9 +11,8 @@ export default class CloseCommand extends ModelAsApp {
|
|
|
12
11
|
* @param {Partial<CloseCommand>} [data]
|
|
13
12
|
* @param {Partial<import('@nan0web/ui').ModelAsAppOptions>} [options]
|
|
14
13
|
*/
|
|
15
|
-
constructor(data?: Partial<CloseCommand>, options?: Partial<import(
|
|
16
|
-
/**
|
|
17
|
-
|
|
18
|
-
*/
|
|
19
|
-
run(): AsyncGenerator<import('@nan0web/ui').Intent, import('@nan0web/ui').ResultIntent, any>;
|
|
14
|
+
constructor(data?: Partial<CloseCommand>, options?: Partial<import("@nan0web/ui").ModelAsAppOptions>);
|
|
15
|
+
/** @type {string} Release version */
|
|
16
|
+
version: string;
|
|
20
17
|
}
|
|
18
|
+
import { ModelAsApp } from '@nan0web/ui';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @typedef {import('./ReleaseParser.js').TaskItem} TaskItem
|
|
3
|
+
* @typedef {Object} ProjectDashboardEntry
|
|
4
|
+
* @property {string} path - Relative project path
|
|
5
|
+
* @property {string} name - Project name
|
|
6
|
+
* @property {string} version - Current release version
|
|
7
|
+
* @property {number} hours - Development hours spent
|
|
8
|
+
* @property {number} iterations - Test runs / refactor iterations
|
|
9
|
+
* @property {number} rrs - Release Readiness Score
|
|
10
|
+
* @property {'wip' | 'closed' | 'unknown'} status - Release state
|
|
11
|
+
* @property {TaskItem[]} tasks - Parsed tasks from release.md
|
|
12
|
+
* @property {string} branch - Git branch name
|
|
13
|
+
* @property {'clean' | 'dirty'} gitStatus - Git workspace status
|
|
14
|
+
* @property {string} userContent - Raw user.md content
|
|
15
|
+
* @property {string} releaseContent - Raw release.md content
|
|
16
|
+
* @property {string} sourceDoc - Relative path to the parsed release document
|
|
17
|
+
* @property {string} sourceUserDoc - Relative path to user.md
|
|
18
|
+
* @property {string?} deadline - Project release deadline
|
|
19
|
+
* @property {number?} daysRemaining - Days remaining until deadline
|
|
20
|
+
* @property {string?} priority - Priority (0 | 1 | 2 | 3)
|
|
21
|
+
* @property {number} [releasesCount] - Number of releases found
|
|
22
|
+
* @property {number} [totalHours] - Total hours across all releases
|
|
23
|
+
* @property {number} [totalIterations] - Total iterations across all releases
|
|
24
|
+
* @property {Array<any>} [allReleases] - List of all releases for project
|
|
25
|
+
*
|
|
26
|
+
* @typedef {Object} DashboardSummary
|
|
27
|
+
* @property {number} totalProjects - Total tracked projects
|
|
28
|
+
* @property {number} totalHours - Sum of hours across projects
|
|
29
|
+
* @property {number} totalIterations - Sum of iterations
|
|
30
|
+
* @property {number} wipCount - Active WIP releases
|
|
31
|
+
* @property {number} closedCount - Closed releases
|
|
32
|
+
* @property {number} [totalReleases] - Total releases counted
|
|
33
|
+
*/
|
|
34
|
+
/**
|
|
35
|
+
* DashboardModel - Aggregates release telemetry, tasks and readiness across projects.
|
|
36
|
+
*/
|
|
37
|
+
export class DashboardModel extends ModelAsApp {
|
|
38
|
+
static registryFile: {
|
|
39
|
+
help: string;
|
|
40
|
+
default: string;
|
|
41
|
+
type: string;
|
|
42
|
+
};
|
|
43
|
+
static summary: {
|
|
44
|
+
help: string;
|
|
45
|
+
default: {
|
|
46
|
+
totalProjects: number;
|
|
47
|
+
totalHours: number;
|
|
48
|
+
totalIterations: number;
|
|
49
|
+
wipCount: number;
|
|
50
|
+
closedCount: number;
|
|
51
|
+
};
|
|
52
|
+
type: string;
|
|
53
|
+
};
|
|
54
|
+
static projects: {
|
|
55
|
+
help: string;
|
|
56
|
+
default: () => never[];
|
|
57
|
+
type: string;
|
|
58
|
+
};
|
|
59
|
+
static UI: {
|
|
60
|
+
aggregating: string;
|
|
61
|
+
done: string;
|
|
62
|
+
};
|
|
63
|
+
static parseUserMetrics: typeof parseUserMetrics;
|
|
64
|
+
static normalizePriority: typeof normalizePriority;
|
|
65
|
+
static sortTasks: typeof sortTasks;
|
|
66
|
+
static versionToPath: typeof versionToPath;
|
|
67
|
+
/**
|
|
68
|
+
* @param {Partial<DashboardModel>} [data={}]
|
|
69
|
+
* @param {Partial<import('@nan0web/ui').ModelAsAppOptions & { gitTelemetry?: any }>} [options={}]
|
|
70
|
+
*/
|
|
71
|
+
constructor(data?: Partial<DashboardModel>, options?: Partial<import("@nan0web/ui").ModelAsAppOptions & {
|
|
72
|
+
gitTelemetry?: any;
|
|
73
|
+
}>);
|
|
74
|
+
/** @type {string} Path to releases.txt registry file */ registryFile: string;
|
|
75
|
+
/** @type {DashboardSummary} Aggregated metrics summary */ summary: DashboardSummary;
|
|
76
|
+
/** @type {ProjectDashboardEntry[]} List of projects with metrics */ projects: ProjectDashboardEntry[];
|
|
77
|
+
/** @type {any} Optional git telemetry adapter */
|
|
78
|
+
_gitTelemetry: any;
|
|
79
|
+
/**
|
|
80
|
+
* Canonical OLMUI Generator: Yields progress, show, and returns result.
|
|
81
|
+
* @returns {AsyncGenerator<import('@nan0web/ui').Intent, any, any>}
|
|
82
|
+
*/
|
|
83
|
+
run(): AsyncGenerator<import("@nan0web/ui").Intent, any, any>;
|
|
84
|
+
/**
|
|
85
|
+
* Programmatic aggregation helper
|
|
86
|
+
* @param {Function} [onProgress]
|
|
87
|
+
* @returns {Promise<{ summary: DashboardSummary, projects: ProjectDashboardEntry[] }>}
|
|
88
|
+
*/
|
|
89
|
+
aggregate(onProgress?: Function): Promise<{
|
|
90
|
+
summary: DashboardSummary;
|
|
91
|
+
projects: ProjectDashboardEntry[];
|
|
92
|
+
}>;
|
|
93
|
+
aggregateStream(): AsyncGenerator<{
|
|
94
|
+
current: number;
|
|
95
|
+
total: number;
|
|
96
|
+
project: string;
|
|
97
|
+
}, {
|
|
98
|
+
summary: DashboardSummary;
|
|
99
|
+
projects: ({
|
|
100
|
+
name: any;
|
|
101
|
+
version: any;
|
|
102
|
+
path: any;
|
|
103
|
+
status: string;
|
|
104
|
+
hours: number;
|
|
105
|
+
iterations: number;
|
|
106
|
+
rrs: number;
|
|
107
|
+
branch: any;
|
|
108
|
+
gitStatus: any;
|
|
109
|
+
tasks: never[];
|
|
110
|
+
deadline: null;
|
|
111
|
+
daysRemaining: null;
|
|
112
|
+
priority: string;
|
|
113
|
+
releasesCount: number;
|
|
114
|
+
totalHours: number;
|
|
115
|
+
totalIterations: number;
|
|
116
|
+
allReleases: never[];
|
|
117
|
+
sourceDoc: string;
|
|
118
|
+
sourceUserDoc: string;
|
|
119
|
+
userContent: string;
|
|
120
|
+
releaseContent: string;
|
|
121
|
+
} | {
|
|
122
|
+
path: string;
|
|
123
|
+
name: string;
|
|
124
|
+
version: string;
|
|
125
|
+
hours: number;
|
|
126
|
+
iterations: number;
|
|
127
|
+
totalHours: number;
|
|
128
|
+
totalIterations: number;
|
|
129
|
+
releasesCount: number;
|
|
130
|
+
allReleases: {
|
|
131
|
+
version: any;
|
|
132
|
+
path: any;
|
|
133
|
+
hours: number;
|
|
134
|
+
iterations: number;
|
|
135
|
+
rrs: number;
|
|
136
|
+
status: "wip" | "closed" | "unknown";
|
|
137
|
+
tasks: import("./ReleaseParser.js").TaskItem[];
|
|
138
|
+
sourceDoc: string;
|
|
139
|
+
}[];
|
|
140
|
+
rrs: number;
|
|
141
|
+
status: "wip" | "closed" | "unknown";
|
|
142
|
+
tasks: import("./ReleaseParser.js").TaskItem[];
|
|
143
|
+
branch: any;
|
|
144
|
+
gitStatus: any;
|
|
145
|
+
userContent: string;
|
|
146
|
+
releaseContent: string;
|
|
147
|
+
sourceDoc: string;
|
|
148
|
+
sourceUserDoc: string;
|
|
149
|
+
deadline: any;
|
|
150
|
+
daysRemaining: number | null;
|
|
151
|
+
priority: "0" | "1" | "2" | "3";
|
|
152
|
+
})[];
|
|
153
|
+
}, unknown>;
|
|
154
|
+
#private;
|
|
155
|
+
}
|
|
156
|
+
export type TaskItem = import("./ReleaseParser.js").TaskItem;
|
|
157
|
+
export type ProjectDashboardEntry = {
|
|
158
|
+
/**
|
|
159
|
+
* - Relative project path
|
|
160
|
+
*/
|
|
161
|
+
path: string;
|
|
162
|
+
/**
|
|
163
|
+
* - Project name
|
|
164
|
+
*/
|
|
165
|
+
name: string;
|
|
166
|
+
/**
|
|
167
|
+
* - Current release version
|
|
168
|
+
*/
|
|
169
|
+
version: string;
|
|
170
|
+
/**
|
|
171
|
+
* - Development hours spent
|
|
172
|
+
*/
|
|
173
|
+
hours: number;
|
|
174
|
+
/**
|
|
175
|
+
* - Test runs / refactor iterations
|
|
176
|
+
*/
|
|
177
|
+
iterations: number;
|
|
178
|
+
/**
|
|
179
|
+
* - Release Readiness Score
|
|
180
|
+
*/
|
|
181
|
+
rrs: number;
|
|
182
|
+
/**
|
|
183
|
+
* - Release state
|
|
184
|
+
*/
|
|
185
|
+
status: "wip" | "closed" | "unknown";
|
|
186
|
+
/**
|
|
187
|
+
* - Parsed tasks from release.md
|
|
188
|
+
*/
|
|
189
|
+
tasks: TaskItem[];
|
|
190
|
+
/**
|
|
191
|
+
* - Git branch name
|
|
192
|
+
*/
|
|
193
|
+
branch: string;
|
|
194
|
+
/**
|
|
195
|
+
* - Git workspace status
|
|
196
|
+
*/
|
|
197
|
+
gitStatus: "clean" | "dirty";
|
|
198
|
+
/**
|
|
199
|
+
* - Raw user.md content
|
|
200
|
+
*/
|
|
201
|
+
userContent: string;
|
|
202
|
+
/**
|
|
203
|
+
* - Raw release.md content
|
|
204
|
+
*/
|
|
205
|
+
releaseContent: string;
|
|
206
|
+
/**
|
|
207
|
+
* - Relative path to the parsed release document
|
|
208
|
+
*/
|
|
209
|
+
sourceDoc: string;
|
|
210
|
+
/**
|
|
211
|
+
* - Relative path to user.md
|
|
212
|
+
*/
|
|
213
|
+
sourceUserDoc: string;
|
|
214
|
+
/**
|
|
215
|
+
* - Project release deadline
|
|
216
|
+
*/
|
|
217
|
+
deadline: string | null;
|
|
218
|
+
/**
|
|
219
|
+
* - Days remaining until deadline
|
|
220
|
+
*/
|
|
221
|
+
daysRemaining: number | null;
|
|
222
|
+
/**
|
|
223
|
+
* - Priority (0 | 1 | 2 | 3)
|
|
224
|
+
*/
|
|
225
|
+
priority: string | null;
|
|
226
|
+
/**
|
|
227
|
+
* - Number of releases found
|
|
228
|
+
*/
|
|
229
|
+
releasesCount?: number | undefined;
|
|
230
|
+
/**
|
|
231
|
+
* - Total hours across all releases
|
|
232
|
+
*/
|
|
233
|
+
totalHours?: number | undefined;
|
|
234
|
+
/**
|
|
235
|
+
* - Total iterations across all releases
|
|
236
|
+
*/
|
|
237
|
+
totalIterations?: number | undefined;
|
|
238
|
+
/**
|
|
239
|
+
* - List of all releases for project
|
|
240
|
+
*/
|
|
241
|
+
allReleases?: any[] | undefined;
|
|
242
|
+
};
|
|
243
|
+
export type DashboardSummary = {
|
|
244
|
+
/**
|
|
245
|
+
* - Total tracked projects
|
|
246
|
+
*/
|
|
247
|
+
totalProjects: number;
|
|
248
|
+
/**
|
|
249
|
+
* - Sum of hours across projects
|
|
250
|
+
*/
|
|
251
|
+
totalHours: number;
|
|
252
|
+
/**
|
|
253
|
+
* - Sum of iterations
|
|
254
|
+
*/
|
|
255
|
+
totalIterations: number;
|
|
256
|
+
/**
|
|
257
|
+
* - Active WIP releases
|
|
258
|
+
*/
|
|
259
|
+
wipCount: number;
|
|
260
|
+
/**
|
|
261
|
+
* - Closed releases
|
|
262
|
+
*/
|
|
263
|
+
closedCount: number;
|
|
264
|
+
/**
|
|
265
|
+
* - Total releases counted
|
|
266
|
+
*/
|
|
267
|
+
totalReleases?: number | undefined;
|
|
268
|
+
};
|
|
269
|
+
import { ModelAsApp } from '@nan0web/ui';
|
|
270
|
+
import { parseUserMetrics } from './ReleaseParser.js';
|
|
271
|
+
import { normalizePriority } from './ReleaseParser.js';
|
|
272
|
+
import { sortTasks } from './ReleaseParser.js';
|
|
273
|
+
import { versionToPath } from './ReleaseDiscovery.js';
|