@nan0web/release 3.2.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.
Files changed (69) hide show
  1. package/bin/nan0release.js +33 -2
  2. package/bin/serve.js +73 -0
  3. package/package.json +45 -17
  4. package/src/Release/Document.js +1 -0
  5. package/src/Release/Scanner.js +3 -2
  6. package/src/Release.js +7 -7
  7. package/src/domain/App.js +31 -2
  8. package/src/domain/BumpCommand.js +10 -3
  9. package/src/domain/CheckCommand.js +504 -146
  10. package/src/domain/CheckCommand.story.js +92 -0
  11. package/src/domain/CloseCommand.js +13 -9
  12. package/src/domain/Dashboard/Dashboard.story.js +155 -0
  13. package/src/domain/Dashboard/DashboardModel.js +308 -0
  14. package/src/domain/Dashboard/ReleaseDiscovery.js +132 -0
  15. package/src/domain/Dashboard/ReleaseParser.js +226 -0
  16. package/src/domain/Dashboard/index.js +19 -0
  17. package/src/domain/DepsCommand.js +5 -2
  18. package/src/domain/InitCommand.js +18 -16
  19. package/src/domain/ListCommand.js +45 -0
  20. package/src/domain/PreviewCommand.js +39 -0
  21. package/src/domain/PublishCommand.js +7 -3
  22. package/src/domain/Registry/Registry.story.js +82 -0
  23. package/src/domain/Registry/RegistryModel.js +124 -0
  24. package/src/domain/ServeCommand.js +165 -0
  25. package/src/domain/ServeCommand.story.js +88 -0
  26. package/src/domain/SpecCommand.js +3 -1
  27. package/src/domain/StatusCommand.js +249 -3
  28. package/src/domain/ViewCommand.js +99 -0
  29. package/src/domain/WebCommand.js +140 -0
  30. package/src/domain/inspect/ReleaseAuditor.js +508 -0
  31. package/src/domain/inspect/ReleaseAuditor.story.js +136 -0
  32. package/src/domain/templates/release.html +34 -0
  33. package/src/domain/templates/release.html.template.js +34 -0
  34. package/src/index.js +6 -0
  35. package/src/inspectors/inspect-js.js +32 -0
  36. package/src/releases/1/0/v1.0.3/task.test.js +1 -1
  37. package/src/utils/nodejs/GitTelemetry.js +154 -0
  38. package/types/Release/Document.d.ts +4 -0
  39. package/types/Release/Scanner.d.ts +2 -2
  40. package/types/domain/App.d.ts +19 -3
  41. package/types/domain/BumpCommand.d.ts +9 -3
  42. package/types/domain/CheckCommand.d.ts +127 -15
  43. package/types/domain/CheckCommand.story.d.ts +1 -0
  44. package/types/domain/CloseCommand.d.ts +2 -1
  45. package/types/domain/Dashboard/Dashboard.story.d.ts +1 -0
  46. package/types/domain/Dashboard/DashboardModel.d.ts +273 -0
  47. package/types/domain/Dashboard/GitTelemetry.d.ts +23 -0
  48. package/types/domain/Dashboard/ReleaseDiscovery.d.ts +47 -0
  49. package/types/domain/Dashboard/ReleaseParser.d.ts +79 -0
  50. package/types/domain/Dashboard/index.d.ts +3 -0
  51. package/types/domain/DepsCommand.d.ts +4 -2
  52. package/types/domain/InitCommand.d.ts +2 -1
  53. package/types/domain/ListCommand.d.ts +18 -0
  54. package/types/domain/PreviewCommand.d.ts +6 -0
  55. package/types/domain/PublishCommand.d.ts +6 -3
  56. package/types/domain/Registry/Registry.story.d.ts +1 -0
  57. package/types/domain/Registry/RegistryModel.d.ts +61 -0
  58. package/types/domain/ServeCommand.d.ts +59 -0
  59. package/types/domain/ServeCommand.story.d.ts +1 -0
  60. package/types/domain/SpecCommand.d.ts +2 -1
  61. package/types/domain/StatusCommand.d.ts +39 -0
  62. package/types/domain/ViewCommand.d.ts +27 -0
  63. package/types/domain/WebCommand.d.ts +47 -0
  64. package/types/domain/inspect/ReleaseAuditor.d.ts +134 -0
  65. package/types/domain/inspect/ReleaseAuditor.story.d.ts +1 -0
  66. package/types/domain/templates/release.html.template.d.ts +2 -0
  67. package/types/index.d.ts +5 -0
  68. package/types/inspectors/inspect-js.d.ts +2 -0
  69. package/types/utils/nodejs/GitTelemetry.d.ts +23 -0
@@ -0,0 +1,27 @@
1
+ /**
2
+ * ViewCommand - ModelAsApp Subcommand to inspect and view release details across multimodal interfaces.
3
+ */
4
+ export default class ViewCommand extends ModelAsApp {
5
+ static alias: string;
6
+ static UI: {
7
+ title: string;
8
+ help: string;
9
+ noReleases: string;
10
+ selectPrompt: string;
11
+ };
12
+ static version: {
13
+ help: string;
14
+ positional: boolean;
15
+ type: string;
16
+ default: string;
17
+ };
18
+ /**
19
+ * @param {Partial<ViewCommand>} [data]
20
+ * @param {import('@nan0web/types').ModelOptions} [options]
21
+ */
22
+ constructor(data?: Partial<ViewCommand>, options?: import("@nan0web/types").ModelOptions);
23
+ /** @type {string} */
24
+ version: string;
25
+ run(): AsyncGenerator<import("@nan0web/ui/src/core/Intent.js").ShowIntent, import("@nan0web/ui/src/core/Intent.js").ResultIntent, unknown>;
26
+ }
27
+ import { ModelAsApp } from '@nan0web/ui';
@@ -0,0 +1,47 @@
1
+ /**
2
+ * WebCommand - ModelAsApp Subcommand to generate and launch PM-as-Code Web Dashboard.
3
+ */
4
+ export default class WebCommand extends ModelAsApp {
5
+ static alias: string;
6
+ static UI: {
7
+ title: string;
8
+ help: string;
9
+ loading: string;
10
+ generated: string;
11
+ serving: string;
12
+ };
13
+ static registryFile: {
14
+ help: string;
15
+ default: string;
16
+ type: string;
17
+ alias: string;
18
+ };
19
+ static out: {
20
+ help: string;
21
+ default: string;
22
+ type: string;
23
+ alias: string;
24
+ };
25
+ static port: {
26
+ help: string;
27
+ default: number;
28
+ type: string;
29
+ alias: string;
30
+ };
31
+ static open: {
32
+ help: string;
33
+ default: boolean;
34
+ type: string;
35
+ };
36
+ /**
37
+ * @param {Partial<WebCommand>} [data]
38
+ * @param {import('@nan0web/types').ModelOptions} [options]
39
+ */
40
+ constructor(data?: Partial<WebCommand>, options?: import("@nan0web/types").ModelOptions);
41
+ /** @type {string} */ registryFile: string;
42
+ /** @type {string} */ out: string;
43
+ /** @type {number} */ port: number;
44
+ /** @type {boolean} */ open: boolean;
45
+ run(): AsyncGenerator<import("@nan0web/ui/src/core/Intent.js").ProgressIntent | import("@nan0web/ui/src/core/Intent.js").ShowIntent, import("@nan0web/ui/src/core/Intent.js").ResultIntent, unknown>;
46
+ }
47
+ import { ModelAsApp } from '@nan0web/ui';
@@ -0,0 +1,134 @@
1
+ /**
2
+ * @typedef {Object} ReleaseDiagnostic
3
+ * @property {'error' | 'warning' | 'info'} level
4
+ * @property {string} code
5
+ * @property {string} [check]
6
+ * @property {string} [file]
7
+ * @property {string} error
8
+ * @property {string} [suggestion]
9
+ * @property {string} [fix]
10
+ */
11
+ /**
12
+ * ReleaseAuditor — Architecture auditor and validator for PM-as-Code release structures.
13
+ */
14
+ export class ReleaseAuditor extends AuditorModel {
15
+ static changed: {
16
+ help: string;
17
+ default: boolean;
18
+ type: string;
19
+ alias: string;
20
+ };
21
+ static all: {
22
+ help: string;
23
+ default: boolean;
24
+ type: string;
25
+ alias: string;
26
+ };
27
+ static registryFile: {
28
+ help: string;
29
+ default: string;
30
+ type: string;
31
+ alias: string;
32
+ };
33
+ static UI: {
34
+ title: string;
35
+ header: string;
36
+ skipped: string;
37
+ missingPackageJson: string;
38
+ noReleasesDir: string;
39
+ releasesFound: string;
40
+ releaseHeader: string;
41
+ releaseDocCompleted: string;
42
+ missingReleaseDoc: string;
43
+ missingUserDoc: string;
44
+ incompleteUserMetrics: string;
45
+ userMetricsValid: string;
46
+ ambiguousContracts: string;
47
+ missingContract: string;
48
+ activeContractWip: string;
49
+ sealedRegressionClosed: string;
50
+ orphanFile: string;
51
+ summary: string;
52
+ Diagnostics: {
53
+ MISSING_PACKAGE_JSON: {
54
+ level: string;
55
+ code: string;
56
+ message: string;
57
+ fix: string;
58
+ };
59
+ MISSING_RELEASES_DIR: {
60
+ level: string;
61
+ code: string;
62
+ message: string;
63
+ fix: string;
64
+ };
65
+ MISSING_RELEASE_MD: {
66
+ level: string;
67
+ code: string;
68
+ message: string;
69
+ fix: string;
70
+ };
71
+ MISSING_USER_MD: {
72
+ level: string;
73
+ code: string;
74
+ message: string;
75
+ fix: string;
76
+ };
77
+ INCOMPLETE_USER_METRICS: {
78
+ level: string;
79
+ code: string;
80
+ message: string;
81
+ fix: string;
82
+ };
83
+ AMBIGUOUS_CONTRACTS: {
84
+ level: string;
85
+ code: string;
86
+ message: string;
87
+ fix: string;
88
+ };
89
+ MISSING_CONTRACT: {
90
+ level: string;
91
+ code: string;
92
+ message: string;
93
+ fix: string;
94
+ };
95
+ ORPHAN_RELEASE_FILE: {
96
+ level: string;
97
+ code: string;
98
+ message: string;
99
+ fix: string;
100
+ };
101
+ PROCEDURAL_RELEASE_ARTIFACT: {
102
+ level: string;
103
+ code: string;
104
+ message: string;
105
+ fix: string;
106
+ };
107
+ };
108
+ };
109
+ /**
110
+ * @param {Partial<ReleaseAuditor> | Record<string, any>} [data={}]
111
+ * @param {Partial<import('@nan0web/ui').ModelAsAppOptions>} [options={}]
112
+ */
113
+ constructor(data?: Partial<ReleaseAuditor> | Record<string, any>, options?: Partial<import("@nan0web/ui").ModelAsAppOptions>);
114
+ /** @type {boolean} */ changed: boolean;
115
+ /** @type {boolean} */ all: boolean;
116
+ /** @type {string} */ registryFile: string;
117
+ /**
118
+ * Runs the PM-as-Code release audit.
119
+ * @returns {AsyncGenerator<import('@nan0web/ui').Intent, any, any>}
120
+ */
121
+ run(): AsyncGenerator<import("@nan0web/ui").Intent, any, any>;
122
+ #private;
123
+ }
124
+ export default ReleaseAuditor;
125
+ export type ReleaseDiagnostic = {
126
+ level: "error" | "warning" | "info";
127
+ code: string;
128
+ check?: string | undefined;
129
+ file?: string | undefined;
130
+ error: string;
131
+ suggestion?: string | undefined;
132
+ fix?: string | undefined;
133
+ };
134
+ import { AuditorModel } from '@nan0web/inspect/domain/AuditorModel';
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ declare const _default: "<!DOCTYPE html>\n<html lang=\"uk\" data-bs-theme=\"dark\">\n<head>\n <meta charset=\"utf-8\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n <title>Releases Catalog \u2014 NaN\u2022Web</title>\n <style>\n :root {\n --bg: #0f172a;\n --surface: #1e293b;\n --accent: #38bdf8;\n --text: #f8fafc;\n --text-dim: #94a3b8;\n --border: #334155;\n }\n body { font-family: system-ui, -apple-system, sans-serif; background: var(--bg); color: var(--text); margin: 0; padding: 2.5rem 1.5rem; display: flex; justify-content: center; line-height: 1.6; }\n .container { max-width: 880px; width: 100%; }\n h1, h2, h3 { color: #fff; font-weight: 700; margin-top: 1.5rem; }\n h1 { font-size: 2rem; border-bottom: 1px solid var(--border); padding-bottom: 0.8rem; }\n a { color: var(--accent); text-decoration: none; }\n a:hover { text-decoration: underline; }\n table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; background: var(--surface); border-radius: 8px; overflow: hidden; }\n th, td { padding: 0.85rem 1rem; text-align: left; border-bottom: 1px solid var(--border); }\n th { background: rgba(0,0,0,0.2); font-weight: 600; color: var(--accent); }\n pre { background: var(--surface); padding: 1rem; border-radius: 8px; border: 1px solid var(--border); overflow-x: auto; color: #a5b4fc; font-family: monospace; }\n blockquote { border-left: 4px solid var(--accent); margin: 1rem 0; padding: 0.5rem 1rem; background: var(--surface); border-radius: 0 8px 8px 0; }\n </style>\n</head>\n<body>\n <div class=\"container\">\n {{CONTENT}}\n </div>\n</body>\n</html>";
2
+ export default _default;
package/types/index.d.ts CHANGED
@@ -6,6 +6,11 @@ export { default as DepsCommand } from "./domain/DepsCommand.js";
6
6
  export { default as PublishCommand } from "./domain/PublishCommand.js";
7
7
  export { default as SpecCommand } from "./domain/SpecCommand.js";
8
8
  export { default as StatusCommand } from "./domain/StatusCommand.js";
9
+ export { default as WebCommand } from "./domain/WebCommand.js";
10
+ export { default as PreviewCommand } from "./domain/PreviewCommand.js";
11
+ export { RegistryModel } from "./domain/Registry/RegistryModel.js";
12
+ export { DashboardModel } from "./domain/Dashboard/DashboardModel.js";
13
+ export { ReleaseAuditor } from "./domain/inspect/ReleaseAuditor.js";
9
14
  import Release from './Release.js';
10
15
  import ReleaseDocument from './Release/Document.js';
11
16
  import Person from './Release/Person.js';
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ export {};
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Reset internal Git caches (useful for testing or cache invalidation)
3
+ */
4
+ export function resetGitCache(): void;
5
+ /**
6
+ * Retrieve git branch and workspace status (clean / dirty)
7
+ * @param {string} [projectDir]
8
+ * @returns {{ branch: string, gitStatus: 'clean' | 'dirty' }}
9
+ */
10
+ export function getGitInfo(projectDir?: string): {
11
+ branch: string;
12
+ gitStatus: "clean" | "dirty";
13
+ };
14
+ /**
15
+ * Retrieve development hours and iterations from git commit log
16
+ * @param {string} [projectDir]
17
+ * @param {string} [releasePath]
18
+ * @returns {{ hours: number, iterations: number }}
19
+ */
20
+ export function getGitCommitTelemetry(projectDir?: string, releasePath?: string): {
21
+ hours: number;
22
+ iterations: number;
23
+ };