@imolko/create-ultra-reporter 2.1.23-beta

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 (182) hide show
  1. package/README.md +219 -0
  2. package/bin/classes/index.d.ts +0 -0
  3. package/bin/classes/index.js +2 -0
  4. package/bin/classes/index.js.map +1 -0
  5. package/bin/classes/logger.d.ts +42 -0
  6. package/bin/classes/logger.js +185 -0
  7. package/bin/classes/logger.js.map +1 -0
  8. package/bin/cli.d.ts +2 -0
  9. package/bin/cli.js +48 -0
  10. package/bin/cli.js.map +1 -0
  11. package/bin/commands/build.d.ts +2 -0
  12. package/bin/commands/build.js +151 -0
  13. package/bin/commands/build.js.map +1 -0
  14. package/bin/commands/create.d.ts +60 -0
  15. package/bin/commands/create.js +368 -0
  16. package/bin/commands/create.js.map +1 -0
  17. package/bin/commands/generate-documentation.d.ts +2 -0
  18. package/bin/commands/generate-documentation.js +249 -0
  19. package/bin/commands/generate-documentation.js.map +1 -0
  20. package/bin/commands/generate.d.ts +2 -0
  21. package/bin/commands/generate.js +79 -0
  22. package/bin/commands/generate.js.map +1 -0
  23. package/bin/commands/index.d.ts +6 -0
  24. package/bin/commands/index.js +16 -0
  25. package/bin/commands/index.js.map +1 -0
  26. package/bin/commands/init.d.ts +2 -0
  27. package/bin/commands/init.js +54 -0
  28. package/bin/commands/init.js.map +1 -0
  29. package/bin/commands/serve.d.ts +2 -0
  30. package/bin/commands/serve.js +124 -0
  31. package/bin/commands/serve.js.map +1 -0
  32. package/bin/commands/types.d.ts +65 -0
  33. package/bin/commands/types.js +9 -0
  34. package/bin/commands/types.js.map +1 -0
  35. package/bin/config/reader.d.ts +17 -0
  36. package/bin/config/reader.js +166 -0
  37. package/bin/config/reader.js.map +1 -0
  38. package/bin/config/types.d.ts +57 -0
  39. package/bin/config/types.js +21 -0
  40. package/bin/config/types.js.map +1 -0
  41. package/bin/data/documentation-folder.d.ts +1 -0
  42. package/bin/data/documentation-folder.js +5 -0
  43. package/bin/data/documentation-folder.js.map +1 -0
  44. package/bin/data/files-generated.d.ts +1 -0
  45. package/bin/data/files-generated.js +10 -0
  46. package/bin/data/files-generated.js.map +1 -0
  47. package/bin/data/index.d.ts +2 -0
  48. package/bin/data/index.js +8 -0
  49. package/bin/data/index.js.map +1 -0
  50. package/bin/pipeline/generate.d.ts +26 -0
  51. package/bin/pipeline/generate.js +269 -0
  52. package/bin/pipeline/generate.js.map +1 -0
  53. package/bin/reporters/data-loading.d.ts +121 -0
  54. package/bin/reporters/data-loading.js +398 -0
  55. package/bin/reporters/data-loading.js.map +1 -0
  56. package/bin/reporters/data-transformation.d.ts +101 -0
  57. package/bin/reporters/data-transformation.js +392 -0
  58. package/bin/reporters/data-transformation.js.map +1 -0
  59. package/bin/reporters/file-writing.d.ts +29 -0
  60. package/bin/reporters/file-writing.js +100 -0
  61. package/bin/reporters/file-writing.js.map +1 -0
  62. package/bin/reporters/generate-domain-documentation.d.ts +17 -0
  63. package/bin/reporters/generate-domain-documentation.js +161 -0
  64. package/bin/reporters/generate-domain-documentation.js.map +1 -0
  65. package/bin/reporters/generate-use-cases-documentation.d.ts +18 -0
  66. package/bin/reporters/generate-use-cases-documentation.js +123 -0
  67. package/bin/reporters/generate-use-cases-documentation.js.map +1 -0
  68. package/bin/reporters/rendering.d.ts +116 -0
  69. package/bin/reporters/rendering.js +385 -0
  70. package/bin/reporters/rendering.js.map +1 -0
  71. package/bin/reporters/templates/README.md +28 -0
  72. package/bin/reporters/templates/card.template.jsx +5 -0
  73. package/bin/reporters/templates/cards-container.template.jsx +5 -0
  74. package/bin/reporters/types.d.ts +190 -0
  75. package/bin/reporters/types.js +8 -0
  76. package/bin/reporters/types.js.map +1 -0
  77. package/bin/scaffold/assembler.d.ts +13 -0
  78. package/bin/scaffold/assembler.js +371 -0
  79. package/bin/scaffold/assembler.js.map +1 -0
  80. package/bin/scaffold/doc-assembler.d.ts +10 -0
  81. package/bin/scaffold/doc-assembler.js +113 -0
  82. package/bin/scaffold/doc-assembler.js.map +1 -0
  83. package/bin/scripts/add-import.d.ts +1 -0
  84. package/bin/scripts/add-import.js +26 -0
  85. package/bin/scripts/add-import.js.map +1 -0
  86. package/bin/scripts/converter.d.ts +6 -0
  87. package/bin/scripts/converter.js +120 -0
  88. package/bin/scripts/converter.js.map +1 -0
  89. package/bin/scripts/copy-files.d.ts +1 -0
  90. package/bin/scripts/copy-files.js +96 -0
  91. package/bin/scripts/copy-files.js.map +1 -0
  92. package/bin/scripts/create-folder.d.ts +1 -0
  93. package/bin/scripts/create-folder.js +23 -0
  94. package/bin/scripts/create-folder.js.map +1 -0
  95. package/bin/scripts/delete-paths.d.ts +1 -0
  96. package/bin/scripts/delete-paths.js +34 -0
  97. package/bin/scripts/delete-paths.js.map +1 -0
  98. package/bin/scripts/exists-file.d.ts +5 -0
  99. package/bin/scripts/exists-file.js +12 -0
  100. package/bin/scripts/exists-file.js.map +1 -0
  101. package/bin/scripts/generate-track-artifacts.d.ts +1 -0
  102. package/bin/scripts/generate-track-artifacts.js +59 -0
  103. package/bin/scripts/generate-track-artifacts.js.map +1 -0
  104. package/bin/scripts/get-artifacts.d.ts +1 -0
  105. package/bin/scripts/get-artifacts.js +38 -0
  106. package/bin/scripts/get-artifacts.js.map +1 -0
  107. package/bin/scripts/get-directories.d.ts +1 -0
  108. package/bin/scripts/get-directories.js +10 -0
  109. package/bin/scripts/get-directories.js.map +1 -0
  110. package/bin/scripts/get-file.d.ts +9 -0
  111. package/bin/scripts/get-file.js +38 -0
  112. package/bin/scripts/get-file.js.map +1 -0
  113. package/bin/scripts/labels.d.ts +35 -0
  114. package/bin/scripts/labels.js +108 -0
  115. package/bin/scripts/labels.js.map +1 -0
  116. package/bin/scripts/markdown.d.ts +34 -0
  117. package/bin/scripts/markdown.js +99 -0
  118. package/bin/scripts/markdown.js.map +1 -0
  119. package/bin/scripts/names.d.ts +18 -0
  120. package/bin/scripts/names.js +64 -0
  121. package/bin/scripts/names.js.map +1 -0
  122. package/bin/scripts/track-artifacts.d.ts +2 -0
  123. package/bin/scripts/track-artifacts.js +101 -0
  124. package/bin/scripts/track-artifacts.js.map +1 -0
  125. package/bin/utils/create-folder.d.ts +1 -0
  126. package/bin/utils/create-folder.js +23 -0
  127. package/bin/utils/create-folder.js.map +1 -0
  128. package/bin/utils/delete-markdown-files.d.ts +1 -0
  129. package/bin/utils/delete-markdown-files.js +46 -0
  130. package/bin/utils/delete-markdown-files.js.map +1 -0
  131. package/bin/utils/delete-paths.d.ts +5 -0
  132. package/bin/utils/delete-paths.js +26 -0
  133. package/bin/utils/delete-paths.js.map +1 -0
  134. package/bin/utils/exists-file.d.ts +6 -0
  135. package/bin/utils/exists-file.js +13 -0
  136. package/bin/utils/exists-file.js.map +1 -0
  137. package/bin/utils/exists-folder.d.ts +6 -0
  138. package/bin/utils/exists-folder.js +13 -0
  139. package/bin/utils/exists-folder.js.map +1 -0
  140. package/bin/utils/get-internal-resource-path.d.ts +1 -0
  141. package/bin/utils/get-internal-resource-path.js +43 -0
  142. package/bin/utils/get-internal-resource-path.js.map +1 -0
  143. package/bin/utils/get-json-file.d.ts +1 -0
  144. package/bin/utils/get-json-file.js +27 -0
  145. package/bin/utils/get-json-file.js.map +1 -0
  146. package/bin/utils/index.d.ts +6 -0
  147. package/bin/utils/index.js +16 -0
  148. package/bin/utils/index.js.map +1 -0
  149. package/bin/utils/run-command.d.ts +5 -0
  150. package/bin/utils/run-command.js +36 -0
  151. package/bin/utils/run-command.js.map +1 -0
  152. package/jsdoc.conf.json +30 -0
  153. package/package.json +75 -0
  154. package/templates/documentation/README.md +41 -0
  155. package/templates/documentation/docs/.gitkeep +0 -0
  156. package/templates/documentation/docusaurus.config.ts +127 -0
  157. package/templates/documentation/package-lock.json +19431 -0
  158. package/templates/documentation/package.json +49 -0
  159. package/templates/documentation/sidebars.ts +33 -0
  160. package/templates/documentation/src/components/ArtifactTable/FilterBar.tsx +185 -0
  161. package/templates/documentation/src/components/ArtifactTable/index.tsx +298 -0
  162. package/templates/documentation/src/components/ArtifactTable/styles.module.css +282 -0
  163. package/templates/documentation/src/components/ArtifactTable/types.ts +31 -0
  164. package/templates/documentation/src/components/HomepageFeatures/index.tsx +77 -0
  165. package/templates/documentation/src/components/HomepageFeatures/styles.module.css +11 -0
  166. package/templates/documentation/src/css/custom.css +30 -0
  167. package/templates/documentation/src/pages/index.module.css +23 -0
  168. package/templates/documentation/src/pages/index.tsx +43 -0
  169. package/templates/documentation/src/pages/markdown-page.md +7 -0
  170. package/templates/documentation/static/.nojekyll +0 -0
  171. package/templates/documentation/static/img/docusaurus-social-card.jpg +0 -0
  172. package/templates/documentation/static/img/docusaurus.png +0 -0
  173. package/templates/documentation/static/img/favicon.ico +0 -0
  174. package/templates/documentation/static/img/logo.svg +1 -0
  175. package/templates/documentation/static/img/logo_imolko_azul.png +0 -0
  176. package/templates/documentation/static/img/undraw_docusaurus_mountain.svg +171 -0
  177. package/templates/documentation/static/img/undraw_docusaurus_react.svg +170 -0
  178. package/templates/documentation/static/img/undraw_docusaurus_tree.svg +40 -0
  179. package/templates/documentation/tsconfig.json +8 -0
  180. package/templates/documentation/ultra-reporter.config.json +55 -0
  181. package/templates/track-artifacts-script.ts +44 -0
  182. package/tsconfig.build-track.json +39 -0
@@ -0,0 +1,151 @@
1
+ "use strict";
2
+ // ---------------------------------------------------------------------------
3
+ // build command — generate docs + docusaurus build → static output
4
+ //
5
+ // For production deployment:
6
+ // ultra-reporter build [--output ./public]
7
+ // ---------------------------------------------------------------------------
8
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
9
+ if (k2 === undefined) k2 = k;
10
+ var desc = Object.getOwnPropertyDescriptor(m, k);
11
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
12
+ desc = { enumerable: true, get: function() { return m[k]; } };
13
+ }
14
+ Object.defineProperty(o, k2, desc);
15
+ }) : (function(o, m, k, k2) {
16
+ if (k2 === undefined) k2 = k;
17
+ o[k2] = m[k];
18
+ }));
19
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
20
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
21
+ }) : function(o, v) {
22
+ o["default"] = v;
23
+ });
24
+ var __importStar = (this && this.__importStar) || (function () {
25
+ var ownKeys = function(o) {
26
+ ownKeys = Object.getOwnPropertyNames || function (o) {
27
+ var ar = [];
28
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
29
+ return ar;
30
+ };
31
+ return ownKeys(o);
32
+ };
33
+ return function (mod) {
34
+ if (mod && mod.__esModule) return mod;
35
+ var result = {};
36
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
37
+ __setModuleDefault(result, mod);
38
+ return result;
39
+ };
40
+ })();
41
+ var __importDefault = (this && this.__importDefault) || function (mod) {
42
+ return (mod && mod.__esModule) ? mod : { "default": mod };
43
+ };
44
+ Object.defineProperty(exports, "__esModule", { value: true });
45
+ exports.registerCommandBuild = registerCommandBuild;
46
+ const path = __importStar(require("path"));
47
+ const path_1 = require("path");
48
+ const child_process_1 = require("child_process");
49
+ const fs = __importStar(require("fs"));
50
+ const logger_1 = __importDefault(require("../classes/logger"));
51
+ const reader_1 = require("../config/reader");
52
+ const assembler_1 = require("../scaffold/assembler");
53
+ const doc_assembler_1 = require("../scaffold/doc-assembler");
54
+ const generate_1 = require("../pipeline/generate");
55
+ const utils_1 = require("../utils");
56
+ const cmdLogger = logger_1.default.createContextLogger('cmd:build');
57
+ function registerCommandBuild(program) {
58
+ program
59
+ .command('build')
60
+ .description('Generate documentation and produce a static build')
61
+ .option('--output <path>', 'Output directory for static files', '.ultra-reporter/build')
62
+ .action(async (options) => {
63
+ cmdLogger.info('Starting build command');
64
+ const cwd = process.cwd();
65
+ // Find config
66
+ const configPath = (0, reader_1.findConfig)(cwd);
67
+ if (!configPath) {
68
+ cmdLogger.error('No ultra-reporter.config.json found. Run "npx @imolko/create-ultra-reporter create" first.');
69
+ process.exit(1);
70
+ }
71
+ const configDir = path.dirname(configPath);
72
+ const docusaurusDir = path.resolve(configDir, '.ultra-reporter', 'docusaurus');
73
+ const cmdRoot = (0, path_1.resolve)(__dirname, '..');
74
+ // 1. Assemble/update scaffold
75
+ const libraryTemplateDir = (0, path_1.resolve)(cmdRoot, '../templates/documentation');
76
+ (0, assembler_1.assembleScaffold)(configDir, libraryTemplateDir);
77
+ // 2. Lazy npm install
78
+ if (!(0, utils_1.existsFolder)(path.join(docusaurusDir, 'node_modules'))) {
79
+ cmdLogger.info('Installing Docusaurus dependencies (first run)...');
80
+ try {
81
+ await execPromise('npm install', { cwd: docusaurusDir });
82
+ cmdLogger.info('Dependencies installed.');
83
+ }
84
+ catch (err) {
85
+ cmdLogger.error('Failed to install Docusaurus dependencies');
86
+ process.exit(1);
87
+ }
88
+ }
89
+ // 3. Generate docs
90
+ cmdLogger.info('Generating documentation...');
91
+ await (0, generate_1.generateAllDocs)(configDir, cmdRoot);
92
+ // 4. Assemble docs
93
+ (0, doc_assembler_1.assembleDocs)(configDir);
94
+ // 5. Run docusaurus build
95
+ cmdLogger.info('Building static site...');
96
+ try {
97
+ await execPromise('npx docusaurus build', { cwd: docusaurusDir });
98
+ }
99
+ catch (err) {
100
+ cmdLogger.error('Docusaurus build failed');
101
+ process.exit(1);
102
+ }
103
+ // 6. Copy build output to target directory
104
+ const outputDir = (0, path_1.resolve)(cwd, options.output || '.ultra-reporter/build');
105
+ const docusaurusBuildDir = path.join(docusaurusDir, 'build');
106
+ if (fs.existsSync(docusaurusBuildDir)) {
107
+ // Clean and recreate output directory
108
+ if (fs.existsSync(outputDir)) {
109
+ fs.rmSync(outputDir, { recursive: true, force: true });
110
+ }
111
+ copyDirRecursive(docusaurusBuildDir, outputDir);
112
+ cmdLogger.info(`Static site built to ${outputDir}`);
113
+ console.log(`\n📦 Static site built to: ${outputDir}\n`);
114
+ }
115
+ else {
116
+ cmdLogger.error('Docusaurus build did not produce output');
117
+ process.exit(1);
118
+ }
119
+ });
120
+ }
121
+ // ---------------------------------------------------------------------------
122
+ // Helpers
123
+ // ---------------------------------------------------------------------------
124
+ function execPromise(command, options) {
125
+ return new Promise((resolve, reject) => {
126
+ const child = (0, child_process_1.exec)(command, { ...options }, (error, stdout, stderr) => {
127
+ if (error) {
128
+ reject(stderr || error.message);
129
+ return;
130
+ }
131
+ resolve(stdout);
132
+ });
133
+ child.stdout?.pipe(process.stdout);
134
+ child.stderr?.pipe(process.stderr);
135
+ });
136
+ }
137
+ function copyDirRecursive(src, dest) {
138
+ fs.mkdirSync(dest, { recursive: true });
139
+ const entries = fs.readdirSync(src, { withFileTypes: true });
140
+ for (const entry of entries) {
141
+ const srcPath = path.join(src, entry.name);
142
+ const destPath = path.join(dest, entry.name);
143
+ if (entry.isDirectory()) {
144
+ copyDirRecursive(srcPath, destPath);
145
+ }
146
+ else {
147
+ fs.copyFileSync(srcPath, destPath);
148
+ }
149
+ }
150
+ }
151
+ //# sourceMappingURL=build.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"build.js","sourceRoot":"","sources":["../../src/commands/build.ts"],"names":[],"mappings":";AAAA,8EAA8E;AAC9E,mEAAmE;AACnE,EAAE;AACF,6BAA6B;AAC7B,6CAA6C;AAC7C,8EAA8E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoB9E,oDAwEC;AAzFD,2CAA6B;AAC7B,+BAA+B;AAC/B,iDAAqC;AACrC,uCAAyB;AACzB,+DAAuC;AACvC,6CAA8C;AAC9C,qDAAyD;AACzD,6DAAyD;AACzD,mDAAuD;AACvD,oCAAwC;AAExC,MAAM,SAAS,GAAG,gBAAM,CAAC,mBAAmB,CAAC,WAAW,CAAC,CAAC;AAM1D,SAAgB,oBAAoB,CAAC,OAAgB;IACnD,OAAO;SACJ,OAAO,CAAC,OAAO,CAAC;SAChB,WAAW,CAAC,mDAAmD,CAAC;SAChE,MAAM,CAAC,iBAA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AAI,KAAK,CAAC,WAAW,EAAE,EAAE,CAAC;YACxB,gBAAgB,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;QACtC,CAAC;aAAM,CAAC;YACN,EAAE,CAAC,YAAY,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;QACrC,CAAC;IACH,CAAC;AACH,CAAC"}
@@ -0,0 +1,60 @@
1
+ import { Command } from 'commander';
2
+ import type { UltraReporterConfig } from '../config/types';
3
+ /** Results of the project detection phase. */
4
+ export interface ProjectDetection {
5
+ /** Project name from package.json (sluggified). */
6
+ projectName: string;
7
+ /** Repository URL from package.json (or undefined). */
8
+ repoUrl: string | undefined;
9
+ /** Path to the jest config file found (or null if none). */
10
+ jestConfigPath: string | null;
11
+ /** Extension of the jest config file: 'ts' | 'js' | 'mjs' | null. */
12
+ jestConfigType: 'ts' | 'js' | 'mjs' | null;
13
+ /** Whether jest-ctrf-json-reporter is installed. */
14
+ hasCtrfReporter: boolean;
15
+ /** Whether domain/src exists. */
16
+ hasDomainSrc: boolean;
17
+ /** Whether features/src exists. */
18
+ hasFeaturesSrc: boolean;
19
+ /** Whether docs/ exists. */
20
+ hasDocs: boolean;
21
+ /** package.json path (for modification). */
22
+ packageJsonPath: string;
23
+ }
24
+ /**
25
+ * Detects the project structure from the current working directory.
26
+ * Returns all detected values with smart defaults.
27
+ */
28
+ export declare function detectProject(cwd: string): ProjectDetection | null;
29
+ /** Answers collected from the wizard or CLI flags. */
30
+ export interface CreateAnswers {
31
+ domainName: string;
32
+ domainSrc: string;
33
+ useCasesSrc?: string;
34
+ useCasesTitle?: string;
35
+ docsPath?: string;
36
+ repoSourceUrl?: string;
37
+ installCtrf: boolean;
38
+ modifyJest: boolean;
39
+ domainTestResultsPath?: string;
40
+ useCasesTestResultsPath?: string;
41
+ addScripts: boolean;
42
+ }
43
+ /**
44
+ * Builds an UltraReporterConfig from wizard answers.
45
+ */
46
+ export declare function buildConfig(answers: CreateAnswers): UltraReporterConfig;
47
+ /**
48
+ * Modifies a jest config file to add the jest-ctrf-json-reporter.
49
+ * Handles .ts, .js, and .mjs formats.
50
+ *
51
+ * Returns the modified content, or null if the reporter is already configured.
52
+ */
53
+ export declare function addCtrfReporterToJestConfig(content: string, configType: 'ts' | 'js' | 'mjs'): string | null;
54
+ /**
55
+ * Ensures `.ultra-reporter/` is in .gitignore.
56
+ * Creates the file if it doesn't exist.
57
+ * Returns true if the file was modified.
58
+ */
59
+ export declare function addUltraReporterToGitignore(cwd: string): boolean;
60
+ export declare function registerCommandCreate(program: Command): void;
@@ -0,0 +1,368 @@
1
+ "use strict";
2
+ // ---------------------------------------------------------------------------
3
+ // create command — wizard-driven ultra-reporter setup
4
+ //
5
+ // Replaces the old `init` command. Supports interactive and parameter-driven
6
+ // modes. Detects project structure, asks minimal questions with smart defaults,
7
+ // and configures the project in one step.
8
+ // ---------------------------------------------------------------------------
9
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ var desc = Object.getOwnPropertyDescriptor(m, k);
12
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
13
+ desc = { enumerable: true, get: function() { return m[k]; } };
14
+ }
15
+ Object.defineProperty(o, k2, desc);
16
+ }) : (function(o, m, k, k2) {
17
+ if (k2 === undefined) k2 = k;
18
+ o[k2] = m[k];
19
+ }));
20
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
21
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
22
+ }) : function(o, v) {
23
+ o["default"] = v;
24
+ });
25
+ var __importStar = (this && this.__importStar) || (function () {
26
+ var ownKeys = function(o) {
27
+ ownKeys = Object.getOwnPropertyNames || function (o) {
28
+ var ar = [];
29
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
30
+ return ar;
31
+ };
32
+ return ownKeys(o);
33
+ };
34
+ return function (mod) {
35
+ if (mod && mod.__esModule) return mod;
36
+ var result = {};
37
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
38
+ __setModuleDefault(result, mod);
39
+ return result;
40
+ };
41
+ })();
42
+ var __importDefault = (this && this.__importDefault) || function (mod) {
43
+ return (mod && mod.__esModule) ? mod : { "default": mod };
44
+ };
45
+ Object.defineProperty(exports, "__esModule", { value: true });
46
+ exports.detectProject = detectProject;
47
+ exports.buildConfig = buildConfig;
48
+ exports.addCtrfReporterToJestConfig = addCtrfReporterToJestConfig;
49
+ exports.addUltraReporterToGitignore = addUltraReporterToGitignore;
50
+ exports.registerCommandCreate = registerCommandCreate;
51
+ const path = __importStar(require("path"));
52
+ const fs = __importStar(require("fs"));
53
+ const logger_1 = __importDefault(require("../classes/logger"));
54
+ const reader_1 = require("../config/reader");
55
+ const cmdLogger = logger_1.default.createContextLogger('cmd:create');
56
+ // ---------------------------------------------------------------------------
57
+ // Detection
58
+ // ---------------------------------------------------------------------------
59
+ /**
60
+ * Detects the project structure from the current working directory.
61
+ * Returns all detected values with smart defaults.
62
+ */
63
+ function detectProject(cwd) {
64
+ const packageJsonPath = path.join(cwd, 'package.json');
65
+ if (!fs.existsSync(packageJsonPath)) {
66
+ return null; // Not a Node.js project
67
+ }
68
+ let pkg = {};
69
+ try {
70
+ pkg = JSON.parse(fs.readFileSync(packageJsonPath, 'utf-8'));
71
+ }
72
+ catch {
73
+ return null;
74
+ }
75
+ // Project name from package.json
76
+ const projectName = slugify((typeof pkg.name === 'string' ? pkg.name : path.basename(cwd)) || 'project');
77
+ // Repository URL
78
+ let repoUrl;
79
+ if (pkg.repository && typeof pkg.repository === 'object') {
80
+ const repo = pkg.repository;
81
+ if (typeof repo.url === 'string') {
82
+ repoUrl = repo.url
83
+ .replace(/^git\+/, '')
84
+ .replace(/\.git$/, '')
85
+ .replace(/^git:\/\//, 'https://')
86
+ .replace(/^git@/, 'https://')
87
+ .replace(/:(\d)/, '/$1'); // git@github.com:org/repo → https://github.com/org/repo
88
+ }
89
+ }
90
+ else if (typeof pkg.repository === 'string') {
91
+ repoUrl = pkg.repository;
92
+ }
93
+ // Jest config detection
94
+ const jestFiles = [
95
+ { path: path.join(cwd, 'jest.config.ts'), type: 'ts' },
96
+ { path: path.join(cwd, 'jest.config.js'), type: 'js' },
97
+ { path: path.join(cwd, 'jest.config.mjs'), type: 'mjs' },
98
+ ];
99
+ let jestConfigPath = null;
100
+ let jestConfigType = null;
101
+ for (const jf of jestFiles) {
102
+ if (fs.existsSync(jf.path)) {
103
+ jestConfigPath = jf.path;
104
+ jestConfigType = jf.type;
105
+ break;
106
+ }
107
+ }
108
+ // Check for jest key in package.json
109
+ if (!jestConfigPath && pkg.jest) {
110
+ jestConfigPath = packageJsonPath;
111
+ jestConfigType = null; // inline config doesn't have a file extension
112
+ }
113
+ // Check if jest-ctrf-json-reporter is installed
114
+ const hasCtrfReporter = checkPackageInstalled(cwd, 'jest-ctrf-json-reporter');
115
+ // Folder detection
116
+ const hasDomainSrc = fs.existsSync(path.join(cwd, 'domain', 'src'));
117
+ const hasFeaturesSrc = fs.existsSync(path.join(cwd, 'features', 'src'));
118
+ const hasDocs = fs.existsSync(path.join(cwd, 'docs'));
119
+ return {
120
+ projectName,
121
+ repoUrl,
122
+ jestConfigPath,
123
+ jestConfigType,
124
+ hasCtrfReporter,
125
+ hasDomainSrc,
126
+ hasFeaturesSrc,
127
+ hasDocs,
128
+ packageJsonPath,
129
+ };
130
+ }
131
+ // ---------------------------------------------------------------------------
132
+ // Helpers
133
+ // ---------------------------------------------------------------------------
134
+ /** Converts a string to a URL-friendly slug. */
135
+ function slugify(name) {
136
+ return name
137
+ .replace(/^@/, '')
138
+ .replace(/[^a-zA-Z0-9]+/g, '-')
139
+ .replace(/^-+|-+$/g, '')
140
+ .toLowerCase() || 'project';
141
+ }
142
+ /** Checks if a package is installed (in node_modules or devDependencies/dependencies). */
143
+ function checkPackageInstalled(cwd, packageName) {
144
+ // Check node_modules
145
+ const modulePath = path.join(cwd, 'node_modules', packageName);
146
+ if (fs.existsSync(modulePath)) {
147
+ return true;
148
+ }
149
+ // Check parent directories (monorepo support)
150
+ let currentDir = cwd;
151
+ // eslint-disable-next-line no-constant-condition
152
+ while (true) {
153
+ const parentModulePath = path.join(currentDir, 'node_modules', packageName);
154
+ if (fs.existsSync(parentModulePath)) {
155
+ return true;
156
+ }
157
+ const parentDir = path.dirname(currentDir);
158
+ if (parentDir === currentDir)
159
+ break;
160
+ currentDir = parentDir;
161
+ }
162
+ return false;
163
+ }
164
+ /**
165
+ * Builds an UltraReporterConfig from wizard answers.
166
+ */
167
+ function buildConfig(answers) {
168
+ const config = {
169
+ domain: {
170
+ name: answers.domainName,
171
+ srcPath: answers.domainSrc,
172
+ testResultsPath: answers.installCtrf
173
+ ? answers.domainTestResultsPath || './domain/ctrf.json'
174
+ : undefined,
175
+ },
176
+ };
177
+ if (answers.repoSourceUrl) {
178
+ config.repoSourceUrl = answers.repoSourceUrl;
179
+ }
180
+ if (answers.useCasesSrc) {
181
+ config.useCases = {
182
+ title: answers.useCasesTitle || `${answers.domainName} Use Cases`,
183
+ srcPath: answers.useCasesSrc,
184
+ testResultsPath: answers.installCtrf
185
+ ? answers.useCasesTestResultsPath || './features/ctrf.json'
186
+ : undefined,
187
+ };
188
+ }
189
+ if (answers.docsPath) {
190
+ config.docs = {
191
+ path: answers.docsPath,
192
+ };
193
+ }
194
+ return config;
195
+ }
196
+ // ---------------------------------------------------------------------------
197
+ // Jest config modification
198
+ // ---------------------------------------------------------------------------
199
+ /**
200
+ * Modifies a jest config file to add the jest-ctrf-json-reporter.
201
+ * Handles .ts, .js, and .mjs formats.
202
+ *
203
+ * Returns the modified content, or null if the reporter is already configured.
204
+ */
205
+ function addCtrfReporterToJestConfig(content, configType) {
206
+ if (content.includes('jest-ctrf-json-reporter')) {
207
+ return null; // Already configured
208
+ }
209
+ const reporterEntry = `
210
+ [
211
+ 'jest-ctrf-json-reporter',
212
+ {
213
+ outputDir: '.',
214
+ outputFile: 'ctrf.json',
215
+ }
216
+ ],`;
217
+ if (configType === 'ts') {
218
+ return addReporterToTsConfig(content, reporterEntry);
219
+ }
220
+ return addReporterToJsConfig(content, reporterEntry);
221
+ }
222
+ function addReporterToTsConfig(content, reporterEntry) {
223
+ // Find the reporters array
224
+ if (content.includes('reporters:')) {
225
+ // Insert into existing reporters array
226
+ return content.replace(/(reporters:\s*\[)/, `$1\n "default",${reporterEntry}`);
227
+ }
228
+ // No reporters array — insert before the last `};` in the config object.
229
+ // This works regardless of export statement format.
230
+ const lastClosingBrace = content.lastIndexOf('\n};');
231
+ if (lastClosingBrace === -1) {
232
+ // Fallback: append to end of content
233
+ return content.trimEnd() +
234
+ `\n reporters: [\n "default",${reporterEntry}\n ],\n};\n`;
235
+ }
236
+ const before = content.slice(0, lastClosingBrace);
237
+ const after = content.slice(lastClosingBrace);
238
+ return before +
239
+ `\n reporters: [\n "default",${reporterEntry}\n ],` +
240
+ after;
241
+ }
242
+ function addReporterToJsConfig(content, reporterEntry) {
243
+ if (content.includes('reporters:')) {
244
+ return content.replace(/(reporters:\s*\[)/, `$1\n "default",${reporterEntry}`);
245
+ }
246
+ return content.replace(/(\n\};?)\s*$/, `\n reporters: [\n "default",${reporterEntry}\n ],\n};`);
247
+ }
248
+ // ---------------------------------------------------------------------------
249
+ // Gitignore modification
250
+ // ---------------------------------------------------------------------------
251
+ /**
252
+ * Ensures `.ultra-reporter/` is in .gitignore.
253
+ * Creates the file if it doesn't exist.
254
+ * Returns true if the file was modified.
255
+ */
256
+ function addUltraReporterToGitignore(cwd) {
257
+ const gitignorePath = path.join(cwd, '.gitignore');
258
+ const entry = '.ultra-reporter/';
259
+ let content;
260
+ if (fs.existsSync(gitignorePath)) {
261
+ content = fs.readFileSync(gitignorePath, 'utf-8');
262
+ if (content.includes('.ultra-reporter/')) {
263
+ return false; // Already present
264
+ }
265
+ }
266
+ else {
267
+ content = '';
268
+ }
269
+ // Add entry (with leading newline if file already has content)
270
+ const newContent = content.trimEnd() + '\n' + entry + '\n';
271
+ fs.writeFileSync(gitignorePath, newContent);
272
+ return true;
273
+ }
274
+ function registerCommandCreate(program) {
275
+ program
276
+ .command('create')
277
+ .description('Initialize ultra-reporter in your project')
278
+ .option('--domain-name <name>', 'Domain name (e.g., "sentinel")')
279
+ .option('--domain-src <path>', 'Domain source folder (e.g., "./domain/src")')
280
+ .option('--use-cases-src <path>', 'Use-cases source folder (e.g., "./features/src")')
281
+ .option('--use-cases-title <title>', 'Use-cases title (e.g., "Sentinel Use Cases")')
282
+ .option('--docs-path <path>', 'Manual docs folder (e.g., "./docs")')
283
+ .option('--repo-source-url <url>', 'Repository URL for [View source] links')
284
+ .option('-i, --interactive', 'Force interactive mode even when flags provided', false)
285
+ .option('-y, --yes', 'Skip prompts and use all detected defaults', false)
286
+ .action(async (options) => {
287
+ cmdLogger.info('Starting create command');
288
+ const cwd = process.cwd();
289
+ // Check if already configured
290
+ const existingConfig = (0, reader_1.findConfig)(cwd);
291
+ if (existingConfig) {
292
+ cmdLogger.warn(`ultra-reporter is already configured (${existingConfig}). Use --yes to overwrite or remove the existing config first.`);
293
+ if (!options.yes) {
294
+ process.exit(1);
295
+ }
296
+ }
297
+ // Run detection
298
+ const detected = detectProject(cwd);
299
+ if (!detected) {
300
+ cmdLogger.error('Not a Node.js project. Ensure package.json exists in the current directory.');
301
+ process.exit(1);
302
+ }
303
+ // TODO: Interactive wizard (Phase 3b) — for now, use defaults + CLI flags
304
+ const answers = {
305
+ domainName: options.domainName || detected.projectName,
306
+ domainSrc: options.domainSrc || (detected.hasDomainSrc ? './domain/src' : './src'),
307
+ useCasesSrc: options.useCasesSrc || (detected.hasFeaturesSrc ? './features/src' : undefined),
308
+ useCasesTitle: options.useCasesTitle,
309
+ docsPath: options.docsPath || (detected.hasDocs ? './docs' : './docs'),
310
+ repoSourceUrl: options.repoSourceUrl || detected.repoUrl,
311
+ installCtrf: detected.jestConfigPath !== null && !detected.hasCtrfReporter,
312
+ modifyJest: detected.jestConfigPath !== null && detected.jestConfigType !== null,
313
+ domainTestResultsPath: './domain/ctrf.json',
314
+ useCasesTestResultsPath: './features/ctrf.json',
315
+ addScripts: true,
316
+ };
317
+ // Build and write config
318
+ const config = buildConfig(answers);
319
+ const configPath = path.join(cwd, 'ultra-reporter.config.json');
320
+ fs.writeFileSync(configPath, JSON.stringify(config, null, 2));
321
+ cmdLogger.info(`Configuration written to ${configPath}`);
322
+ // Modify jest config if opted in
323
+ if (answers.modifyJest && answers.installCtrf && detected.jestConfigPath && detected.jestConfigType) {
324
+ const jestContent = fs.readFileSync(detected.jestConfigPath, 'utf-8');
325
+ const modified = addCtrfReporterToJestConfig(jestContent, detected.jestConfigType);
326
+ if (modified !== null) {
327
+ fs.writeFileSync(detected.jestConfigPath, modified);
328
+ cmdLogger.info(`Added CTRF reporter to ${detected.jestConfigPath}`);
329
+ }
330
+ else {
331
+ cmdLogger.info('CTRF reporter already configured in jest config');
332
+ }
333
+ }
334
+ // Update .gitignore
335
+ const gitignoreChanged = addUltraReporterToGitignore(cwd);
336
+ if (gitignoreChanged) {
337
+ cmdLogger.info('Added .ultra-reporter/ to .gitignore');
338
+ }
339
+ // Create docs/ with sample if opted in
340
+ if (answers.docsPath) {
341
+ const docsDir = path.resolve(cwd, answers.docsPath);
342
+ if (!fs.existsSync(docsDir)) {
343
+ fs.mkdirSync(docsDir, { recursive: true });
344
+ const sampleIntro = path.join(docsDir, 'intro.md');
345
+ fs.writeFileSync(sampleIntro, `---\ntitle: Introduction\n---\n\n# Welcome to ${answers.domainName}\n\nThis is your documentation site. Add markdown files to this folder and they will appear in the docs.\n`);
346
+ cmdLogger.info(`Created ${answers.docsPath}/ with sample intro.md`);
347
+ }
348
+ }
349
+ cmdLogger.info('Create command completed successfully!');
350
+ console.log(`
351
+ ✨ ultra-reporter configured!
352
+
353
+ Configuration: ultra-reporter.config.json
354
+ Generated data: .ultra-reporter/ (gitignored)
355
+ Manual docs: ${answers.docsPath || '(none)'}
356
+ Overrides: .ultra-reporter-overrides/ (optional)
357
+
358
+ Next steps:
359
+ npm run test # generate CTRF test results
360
+ npm run docs:serve # start documentation server
361
+ npm run docs:gen # generate docs without server
362
+ npm run docs:build # production build
363
+
364
+ Docs will be available at http://localhost:3000
365
+ `);
366
+ });
367
+ }
368
+ //# sourceMappingURL=create.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create.js","sourceRoot":"","sources":["../../src/commands/create.ts"],"names":[],"mappings":";AAAA,8EAA8E;AAC9E,sDAAsD;AACtD,EAAE;AACF,6EAA6E;AAC7E,gFAAgF;AAChF,0CAA0C;AAC1C,8EAA8E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+C9E,sCAiFC;AA6DD,kCAgCC;AAYD,kEAsBC;AAmDD,kEAkBC;AAiBD,sDA4GC;AA9bD,2CAA6B;AAC7B,uCAAyB;AAEzB,+DAAuC;AAGvC,6CAA8C;AAE9C,MAAM,SAAS,GAAG,gBAAM,CAAC,mBAAmB,CAAC,YAAY,CAAC,CAAC;AA4B3D,8EAA8E;AAC9E,YAAY;AACZ,8EAA8E;AAE9E;;;GAGG;AACH,SAAgB,aAAa,CAAC,GAAW;IACvC,MAAM,eAAe,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,cAAc,CAAC,CAAC;IAEvD,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,eAAe,CAAC,EAAE,CAAC;QACpC,OAAO,IAAI,CAAC,CAAC,wBAAwB;IACvC,CAAC;IAED,IAAI,GAAG,GAA4B,EAAE,CAAC;IACtC,IAAI,CAAC;QACH,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,YAAY,CAAC,eAAe,EAAE,OAAO,CAAC,CAAC,CAAC;IAC9D,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;IAED,iCAAiC;IACjC,MAAM,WAAW,GAAG,OAAO,CACzB,CAAC,OAAO,GAAG,CAAC,IAAI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