pipecraft 0.29.2 → 0.36.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 (136) hide show
  1. package/README.md +98 -34
  2. package/dist/cli/index.d.ts +3 -3
  3. package/dist/cli/index.js +66 -24
  4. package/dist/cli/index.js.map +1 -1
  5. package/dist/generators/init.tpl.d.ts +4 -4
  6. package/dist/generators/init.tpl.d.ts.map +1 -1
  7. package/dist/generators/init.tpl.js +369 -79
  8. package/dist/generators/init.tpl.js.map +1 -1
  9. package/dist/generators/workflows.tpl.d.ts +9 -9
  10. package/dist/generators/workflows.tpl.d.ts.map +1 -1
  11. package/dist/generators/workflows.tpl.js +33 -24
  12. package/dist/generators/workflows.tpl.js.map +1 -1
  13. package/dist/templates/actions/calculate-version.yml.tpl.d.ts +7 -4
  14. package/dist/templates/actions/calculate-version.yml.tpl.d.ts.map +1 -1
  15. package/dist/templates/actions/calculate-version.yml.tpl.js +16 -9
  16. package/dist/templates/actions/calculate-version.yml.tpl.js.map +1 -1
  17. package/dist/templates/actions/create-pr.yml.tpl.d.ts +5 -2
  18. package/dist/templates/actions/create-pr.yml.tpl.d.ts.map +1 -1
  19. package/dist/templates/actions/create-pr.yml.tpl.js +9 -6
  20. package/dist/templates/actions/create-pr.yml.tpl.js.map +1 -1
  21. package/dist/templates/actions/create-release.yml.tpl.d.ts +5 -2
  22. package/dist/templates/actions/create-release.yml.tpl.d.ts.map +1 -1
  23. package/dist/templates/actions/create-release.yml.tpl.js +9 -6
  24. package/dist/templates/actions/create-release.yml.tpl.js.map +1 -1
  25. package/dist/templates/actions/create-tag.yml.tpl.d.ts +5 -2
  26. package/dist/templates/actions/create-tag.yml.tpl.d.ts.map +1 -1
  27. package/dist/templates/actions/create-tag.yml.tpl.js +9 -6
  28. package/dist/templates/actions/create-tag.yml.tpl.js.map +1 -1
  29. package/dist/templates/actions/detect-changes.yml.tpl.d.ts +24 -52
  30. package/dist/templates/actions/detect-changes.yml.tpl.d.ts.map +1 -1
  31. package/dist/templates/actions/detect-changes.yml.tpl.js +281 -108
  32. package/dist/templates/actions/detect-changes.yml.tpl.js.map +1 -1
  33. package/dist/templates/actions/manage-branch.yml.tpl.d.ts +5 -2
  34. package/dist/templates/actions/manage-branch.yml.tpl.d.ts.map +1 -1
  35. package/dist/templates/actions/manage-branch.yml.tpl.js +9 -6
  36. package/dist/templates/actions/manage-branch.yml.tpl.js.map +1 -1
  37. package/dist/templates/actions/promote-branch.yml.tpl.d.ts +5 -2
  38. package/dist/templates/actions/promote-branch.yml.tpl.d.ts.map +1 -1
  39. package/dist/templates/actions/promote-branch.yml.tpl.js +27 -76
  40. package/dist/templates/actions/promote-branch.yml.tpl.js.map +1 -1
  41. package/dist/templates/actions/run-nx-affected.yml.tpl.d.ts +33 -0
  42. package/dist/templates/actions/run-nx-affected.yml.tpl.d.ts.map +1 -0
  43. package/dist/templates/actions/run-nx-affected.yml.tpl.js +346 -0
  44. package/dist/templates/actions/run-nx-affected.yml.tpl.js.map +1 -0
  45. package/dist/templates/release-it.cjs.tpl.d.ts +1 -1
  46. package/dist/templates/release-it.cjs.tpl.d.ts.map +1 -1
  47. package/dist/templates/release-it.cjs.tpl.js +24 -26
  48. package/dist/templates/release-it.cjs.tpl.js.map +1 -1
  49. package/dist/templates/workflows/enforce-pr-target.yml.tpl.d.ts +1 -1
  50. package/dist/templates/workflows/enforce-pr-target.yml.tpl.d.ts.map +1 -1
  51. package/dist/templates/workflows/enforce-pr-target.yml.tpl.js +2 -3
  52. package/dist/templates/workflows/enforce-pr-target.yml.tpl.js.map +1 -1
  53. package/dist/templates/workflows/pipeline-nx.yml.tpl.d.ts +2 -2
  54. package/dist/templates/workflows/pipeline-nx.yml.tpl.d.ts.map +1 -1
  55. package/dist/templates/workflows/pipeline-nx.yml.tpl.js +300 -93
  56. package/dist/templates/workflows/pipeline-nx.yml.tpl.js.map +1 -1
  57. package/dist/templates/workflows/pipeline.yml.tpl.d.ts +2 -2
  58. package/dist/templates/workflows/pipeline.yml.tpl.d.ts.map +1 -1
  59. package/dist/templates/workflows/pipeline.yml.tpl.js +347 -74
  60. package/dist/templates/workflows/pipeline.yml.tpl.js.map +1 -1
  61. package/dist/templates/workflows/pr-title-check.yml.tpl.d.ts +1 -1
  62. package/dist/templates/workflows/pr-title-check.yml.tpl.d.ts.map +1 -1
  63. package/dist/templates/workflows/pr-title-check.yml.tpl.js +101 -22
  64. package/dist/templates/workflows/pr-title-check.yml.tpl.js.map +1 -1
  65. package/dist/templates/workflows/shared/index.d.ts +3 -2
  66. package/dist/templates/workflows/shared/index.d.ts.map +1 -1
  67. package/dist/templates/workflows/shared/index.js +3 -2
  68. package/dist/templates/workflows/shared/index.js.map +1 -1
  69. package/dist/templates/workflows/shared/operations-changes.d.ts +13 -2
  70. package/dist/templates/workflows/shared/operations-changes.d.ts.map +1 -1
  71. package/dist/templates/workflows/shared/operations-changes.js +47 -16
  72. package/dist/templates/workflows/shared/operations-changes.js.map +1 -1
  73. package/dist/templates/workflows/shared/operations-domain-jobs.d.ts +18 -1
  74. package/dist/templates/workflows/shared/operations-domain-jobs.d.ts.map +1 -1
  75. package/dist/templates/workflows/shared/operations-domain-jobs.js +143 -19
  76. package/dist/templates/workflows/shared/operations-domain-jobs.js.map +1 -1
  77. package/dist/templates/workflows/shared/operations-gate.d.ts +32 -0
  78. package/dist/templates/workflows/shared/operations-gate.d.ts.map +1 -0
  79. package/dist/templates/workflows/shared/operations-gate.js +77 -0
  80. package/dist/templates/workflows/shared/operations-gate.js.map +1 -0
  81. package/dist/templates/workflows/shared/operations-header.d.ts +1 -1
  82. package/dist/templates/workflows/shared/operations-header.d.ts.map +1 -1
  83. package/dist/templates/workflows/shared/operations-header.js +46 -6
  84. package/dist/templates/workflows/shared/operations-header.js.map +1 -1
  85. package/dist/templates/workflows/shared/operations-tag-promote.d.ts +5 -1
  86. package/dist/templates/workflows/shared/operations-tag-promote.d.ts.map +1 -1
  87. package/dist/templates/workflows/shared/operations-tag-promote.js +138 -31
  88. package/dist/templates/workflows/shared/operations-tag-promote.js.map +1 -1
  89. package/dist/templates/workflows/shared/operations-version.d.ts +3 -1
  90. package/dist/templates/workflows/shared/operations-version.d.ts.map +1 -1
  91. package/dist/templates/workflows/shared/operations-version.js +18 -10
  92. package/dist/templates/workflows/shared/operations-version.js.map +1 -1
  93. package/dist/templates/yaml-format-utils.d.ts.map +1 -1
  94. package/dist/templates/yaml-format-utils.js.map +1 -1
  95. package/dist/types/index.d.ts +57 -4
  96. package/dist/types/index.d.ts.map +1 -1
  97. package/dist/utils/action-reference.d.ts +73 -0
  98. package/dist/utils/action-reference.d.ts.map +1 -0
  99. package/dist/utils/action-reference.js +120 -0
  100. package/dist/utils/action-reference.js.map +1 -0
  101. package/dist/utils/ast-path-operations.d.ts +3 -3
  102. package/dist/utils/ast-path-operations.d.ts.map +1 -1
  103. package/dist/utils/ast-path-operations.js +58 -17
  104. package/dist/utils/ast-path-operations.js.map +1 -1
  105. package/dist/utils/config.d.ts +11 -5
  106. package/dist/utils/config.d.ts.map +1 -1
  107. package/dist/utils/config.js +33 -8
  108. package/dist/utils/config.js.map +1 -1
  109. package/dist/utils/github-setup.d.ts +4 -4
  110. package/dist/utils/github-setup.d.ts.map +1 -1
  111. package/dist/utils/github-setup.js +57 -36
  112. package/dist/utils/github-setup.js.map +1 -1
  113. package/dist/utils/logger.d.ts.map +1 -1
  114. package/dist/utils/logger.js.map +1 -1
  115. package/dist/utils/messaging.d.ts.map +1 -1
  116. package/dist/utils/messaging.js +7 -3
  117. package/dist/utils/messaging.js.map +1 -1
  118. package/dist/utils/preflight.d.ts +2 -2
  119. package/dist/utils/preflight.d.ts.map +1 -1
  120. package/dist/utils/preflight.js +43 -41
  121. package/dist/utils/preflight.js.map +1 -1
  122. package/dist/utils/versioning.d.ts +1 -1
  123. package/dist/utils/versioning.d.ts.map +1 -1
  124. package/dist/utils/versioning.js +10 -10
  125. package/dist/utils/versioning.js.map +1 -1
  126. package/package.json +11 -4
  127. package/src/generators/init.tpl.ts +434 -96
  128. package/src/generators/workflows.tpl.ts +54 -45
  129. package/dist/templates/actions/detect-changes-nx.yml.tpl.d.ts +0 -32
  130. package/dist/templates/actions/detect-changes-nx.yml.tpl.d.ts.map +0 -1
  131. package/dist/templates/actions/detect-changes-nx.yml.tpl.js +0 -227
  132. package/dist/templates/actions/detect-changes-nx.yml.tpl.js.map +0 -1
  133. package/dist/utils/idempotency.d.ts +0 -187
  134. package/dist/utils/idempotency.d.ts.map +0 -1
  135. package/dist/utils/idempotency.js +0 -304
  136. package/dist/utils/idempotency.js.map +0 -1
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Init Template Generator
3
3
  *
4
- * Generates the initial PipeCraft configuration file (.pipecraftrc.json) with default settings.
4
+ * Generates the initial PipeCraft configuration file (.pipecraftrc) with default settings.
5
5
  * This generator is invoked by the `pipecraft init` command and prompts the user for
6
6
  * basic project configuration preferences.
7
7
  *
@@ -14,7 +14,7 @@
14
14
  * // Called by CLI with Pinion context
15
15
  * await generate(pinionContext)
16
16
  *
17
- * // Creates .pipecraftrc.json with:
17
+ * // Creates .pipecraftrc with:
18
18
  * // - CI provider (GitHub/GitLab)
19
19
  * // - Merge strategy (fast-forward/merge)
20
20
  * // - Branch flow configuration
@@ -27,8 +27,7 @@
27
27
  * for the initial release to ensure consistent behavior. Future versions will
28
28
  * respect user input and allow customization.
29
29
  */
30
- import { toFile, writeJSON } from '@featherscloud/pinion';
31
- import { existsSync, readFileSync } from 'fs';
30
+ import { existsSync, readFileSync, writeFileSync } from 'fs';
32
31
  import inquirer from 'inquirer';
33
32
  /**
34
33
  * Default PipeCraft configuration for new projects.
@@ -56,8 +55,19 @@ const defaultConfig = {
56
55
  },
57
56
  semver: {
58
57
  bumpRules: {
59
- feat: 'minor',
58
+ test: 'ignore',
59
+ build: 'ignore',
60
+ ci: 'patch',
61
+ docs: 'patch',
62
+ style: 'patch',
60
63
  fix: 'patch',
64
+ perf: 'patch',
65
+ refactor: 'patch',
66
+ chore: 'patch',
67
+ patch: 'patch',
68
+ feat: 'minor',
69
+ minor: 'minor',
70
+ major: 'major',
61
71
  breaking: 'major'
62
72
  }
63
73
  },
@@ -81,36 +91,194 @@ const defaultConfig = {
81
91
  }
82
92
  };
83
93
  /**
84
- * Generates a JSON string representation of the PipeCraft configuration.
85
- *
86
- * Serializes the configuration object with proper formatting (2-space indentation)
87
- * for writing to .pipecraftrc.json file.
94
+ * Generates a YAML configuration file with comprehensive comments.
88
95
  *
89
- * @param {PipecraftConfig} ctx - The configuration context to serialize
90
- * @returns {string} JSON string representation of the configuration
96
+ * Creates a .pipecraftrc file with:
97
+ * - Descriptive section headers
98
+ * - Inline comments for each configuration option
99
+ * - Examples and valid values
100
+ * - Proper YAML formatting
91
101
  *
92
- * @note The function extracts specific fields from the context to ensure
93
- * only valid configuration properties are included in the output file.
102
+ * @param {any} config - The configuration object to serialize
103
+ * @returns {string} YAML string with comments
94
104
  */
95
- const configTemplate = (ctx) => {
96
- const config = {
97
- ciProvider: ctx.ciProvider,
98
- mergeStrategy: ctx.mergeStrategy,
99
- requireConventionalCommits: ctx.requireConventionalCommits,
100
- initialBranch: ctx.initialBranch,
101
- finalBranch: ctx.finalBranch,
102
- branchFlow: ctx.branchFlow,
103
- autoMerge: ctx.autoMerge,
104
- semver: {
105
- bumpRules: ctx.semver.bumpRules
105
+ const generateYamlConfig = (config) => {
106
+ const lines = [];
107
+ // Header
108
+ lines.push('# PipeCraft Configuration');
109
+ lines.push('# Trunk-based development workflow automation');
110
+ lines.push('# https://pipecraft.thecraftlab.dev');
111
+ lines.push('');
112
+ // CI Provider
113
+ lines.push('# CI/CD Platform');
114
+ lines.push(`ciProvider: ${config.ciProvider}`);
115
+ lines.push('');
116
+ // Merge Strategy
117
+ lines.push('# Merge strategy for automatic promotions');
118
+ lines.push("# Options: 'fast-forward' (clean linear history, recommended) | 'merge' (creates merge commits)");
119
+ lines.push(`mergeStrategy: ${config.mergeStrategy}`);
120
+ lines.push('');
121
+ // Conventional Commits
122
+ lines.push('# Enforce conventional commit messages (feat:, fix:, etc.)');
123
+ lines.push(`requireConventionalCommits: ${config.requireConventionalCommits}`);
124
+ lines.push('');
125
+ // Branch Configuration
126
+ lines.push('# Branch flow configuration');
127
+ lines.push(`initialBranch: ${config.initialBranch} # Where features land`);
128
+ lines.push(`finalBranch: ${config.finalBranch} # Production branch`);
129
+ lines.push('');
130
+ // Branch Flow
131
+ lines.push(`# Promotion flow: ${config.branchFlow.join(' → ')}`);
132
+ lines.push('branchFlow:');
133
+ config.branchFlow.forEach((branch, index) => {
134
+ const comments = [
135
+ '# Feature integration and initial testing',
136
+ '# Pre-production validation',
137
+ '# Production releases'
138
+ ];
139
+ lines.push(` - ${branch} ${comments[index] || ''}`);
140
+ });
141
+ lines.push('');
142
+ // Auto Merge
143
+ lines.push('# Automatic promotion after successful tests');
144
+ lines.push('autoMerge:');
145
+ const autoMergeEntries = Object.entries(config.autoMerge);
146
+ autoMergeEntries.forEach(([key, value]) => {
147
+ const flowIndex = config.branchFlow.indexOf(key);
148
+ const fromBranch = flowIndex > 0 ? config.branchFlow[flowIndex - 1] : '';
149
+ const comment = fromBranch ? ` # Auto-promote ${fromBranch} → ${key}` : '';
150
+ lines.push(` ${key}: ${value}${comment}`);
151
+ });
152
+ lines.push('');
153
+ // Package Manager (if present)
154
+ if (config.packageManager) {
155
+ lines.push('# Package manager');
156
+ lines.push(`packageManager: ${config.packageManager}`);
157
+ lines.push('');
158
+ }
159
+ // Semantic Versioning
160
+ lines.push('# Semantic versioning rules');
161
+ lines.push('# Prefixes are used to determine the type of change and the version bump level');
162
+ lines.push('semver:');
163
+ lines.push(' bumpRules:');
164
+ const bumpRules = config.semver.bumpRules;
165
+ const ruleGroups = [
166
+ { title: '# Ignored types (no version bump)', keys: ['test', 'build'] },
167
+ {
168
+ title: '# Patch-level changes (0.0.x)',
169
+ keys: ['ci', 'docs', 'style', 'fix', 'perf', 'refactor', 'chore', 'patch']
106
170
  },
107
- domains: ctx.domains
108
- };
109
- // Include Nx configuration if detected
110
- if (ctx.nx) {
111
- config.nx = ctx.nx;
171
+ { title: '# Minor-level changes (0.x.0)', keys: ['feat', 'minor'] },
172
+ { title: '# Major-level changes (x.0.0)', keys: ['major', 'breaking'] }
173
+ ];
174
+ ruleGroups.forEach((group, groupIndex) => {
175
+ if (groupIndex > 0)
176
+ lines.push('');
177
+ lines.push(` ${group.title}`);
178
+ group.keys.forEach(key => {
179
+ if (bumpRules[key]) {
180
+ lines.push(` ${key}: '${bumpRules[key]}'`);
181
+ }
182
+ });
183
+ });
184
+ lines.push('');
185
+ // Domains
186
+ lines.push('# Domain definitions - what parts of your codebase trigger which jobs');
187
+ lines.push('# Will create placeholder jobs for each domain if no jobs are defined in the pipeline.yml');
188
+ lines.push('domains:');
189
+ Object.entries(config.domains).forEach(([domainName, domainConfig]) => {
190
+ lines.push(` ${domainName}:`);
191
+ // Description (always write as field)
192
+ if (domainConfig.description) {
193
+ lines.push(` description: '${domainConfig.description}'`);
194
+ }
195
+ // Paths
196
+ if (domainConfig.paths) {
197
+ lines.push(' paths:');
198
+ domainConfig.paths.forEach((path) => {
199
+ lines.push(` - ${path}`);
200
+ });
201
+ }
202
+ // Prefixes (if present)
203
+ if (domainConfig.prefixes) {
204
+ lines.push(` prefixes: [${domainConfig.prefixes.map((p) => `'${p}'`).join(', ')}]`);
205
+ }
206
+ lines.push('');
207
+ });
208
+ // Nx Configuration (if present)
209
+ if (config.nx) {
210
+ lines.push('# Nx integration for monorepo optimization');
211
+ lines.push('nx:');
212
+ lines.push(` enabled: ${config.nx.enabled}`);
213
+ if (config.nx.tasks !== undefined) {
214
+ if (config.nx.tasks.length > 0) {
215
+ lines.push(' tasks:');
216
+ config.nx.tasks.forEach((task) => {
217
+ lines.push(` - ${task}`);
218
+ });
219
+ }
220
+ else {
221
+ lines.push(' tasks: []');
222
+ }
223
+ }
224
+ if (config.nx.baseRef) {
225
+ lines.push(` baseRef: ${config.nx.baseRef}`);
226
+ }
227
+ if (config.nx.enableCache !== undefined) {
228
+ lines.push(` enableCache: ${config.nx.enableCache}`);
229
+ }
230
+ lines.push('');
112
231
  }
113
- return JSON.stringify(config, null, 2);
232
+ // Versioning (if present)
233
+ if (config.versioning) {
234
+ lines.push('# Version calculation and release automation');
235
+ lines.push('versioning:');
236
+ lines.push(` enabled: ${config.versioning.enabled}`);
237
+ if (config.versioning.releaseItConfig) {
238
+ lines.push(` releaseItConfig: ${config.versioning.releaseItConfig}`);
239
+ }
240
+ if (config.versioning.conventionalCommits !== undefined) {
241
+ lines.push(` conventionalCommits: ${config.versioning.conventionalCommits} # Use conventional commits for version bumps`);
242
+ }
243
+ if (config.versioning.autoTag !== undefined) {
244
+ lines.push(` autoTag: ${config.versioning.autoTag} # Automatically create git tags`);
245
+ }
246
+ if (config.versioning.autoPush !== undefined) {
247
+ lines.push(` autoPush: ${config.versioning.autoPush} # Manual control over git push`);
248
+ }
249
+ if (config.versioning.changelog !== undefined) {
250
+ lines.push(` changelog: ${config.versioning.changelog} # Generate CHANGELOG.md`);
251
+ }
252
+ if (config.versioning.bumpRules) {
253
+ lines.push(' bumpRules:');
254
+ Object.entries(config.versioning.bumpRules).forEach(([key, value]) => {
255
+ lines.push(` ${key}: ${value}`);
256
+ });
257
+ }
258
+ lines.push('');
259
+ }
260
+ // Rebuild configuration (if present)
261
+ if (config.rebuild) {
262
+ lines.push('# Workflow rebuild optimization');
263
+ lines.push('rebuild:');
264
+ lines.push(` enabled: ${config.rebuild.enabled} # Enable smart rebuild detection`);
265
+ if (config.rebuild.skipIfUnchanged !== undefined) {
266
+ lines.push(` skipIfUnchanged: ${config.rebuild.skipIfUnchanged} # Skip regeneration if config hasn't changed`);
267
+ }
268
+ if (config.rebuild.forceRegenerate !== undefined) {
269
+ lines.push(` forceRegenerate: ${config.rebuild.forceRegenerate} # Force regenerate even if unchanged`);
270
+ }
271
+ if (config.rebuild.cacheFile) {
272
+ lines.push(` cacheFile: ${config.rebuild.cacheFile}`);
273
+ }
274
+ lines.push('');
275
+ }
276
+ // Remove trailing empty line
277
+ while (lines[lines.length - 1] === '') {
278
+ lines.pop();
279
+ }
280
+ lines.push(''); // Single trailing newline
281
+ return lines.join('\n');
114
282
  };
115
283
  /**
116
284
  * Init generator main entry point.
@@ -155,6 +323,29 @@ const configTemplate = (ctx) => {
155
323
  */
156
324
  export const generate = async (ctx) => {
157
325
  const cwd = ctx.cwd || process.cwd();
326
+ // Check if .pipecraftrc already exists (YAML format)
327
+ const configPath = `${cwd}/.pipecraftrc`;
328
+ const legacyConfigPath = `${cwd}/.pipecraftrc.json`;
329
+ if (existsSync(configPath) || existsSync(legacyConfigPath)) {
330
+ const existingPath = existsSync(configPath) ? '.pipecraftrc' : '.pipecraftrc.json';
331
+ const overwriteAnswer = await inquirer.prompt([
332
+ {
333
+ type: 'confirm',
334
+ name: 'overwrite',
335
+ message: `⚠️ ${existingPath} already exists. Overwrite it?`,
336
+ default: false
337
+ }
338
+ ]);
339
+ if (!overwriteAnswer.overwrite) {
340
+ console.log('\n❌ Init cancelled. Existing configuration preserved.\n');
341
+ return;
342
+ }
343
+ console.log('\n✅ Proceeding with overwrite...\n');
344
+ // Set force flag to true so Pinion will overwrite the file
345
+ if (ctx.pinion) {
346
+ ctx.pinion.force = true;
347
+ }
348
+ }
158
349
  // Detect package manager before prompting
159
350
  let detectedPackageManager = 'npm';
160
351
  if (existsSync(`${cwd}/pnpm-lock.yaml`)) {
@@ -166,14 +357,52 @@ export const generate = async (ctx) => {
166
357
  else if (existsSync(`${cwd}/package-lock.json`)) {
167
358
  detectedPackageManager = 'npm';
168
359
  }
360
+ // Detect Nx workspace before prompting
361
+ const nxJsonPath = `${cwd}/nx.json`;
362
+ let detectedNxTasks = [];
363
+ let nxDetected = false;
364
+ if (existsSync(nxJsonPath)) {
365
+ try {
366
+ const nxJsonContent = readFileSync(nxJsonPath, 'utf8');
367
+ const nxJson = JSON.parse(nxJsonContent);
368
+ // Extract tasks from targetDefaults
369
+ const tasks = nxJson.targetDefaults ? Object.keys(nxJson.targetDefaults) : [];
370
+ // Sort tasks in a logical order (quality → test → build → e2e)
371
+ const taskOrder = [
372
+ 'lint',
373
+ 'typecheck',
374
+ 'test',
375
+ 'unit-test',
376
+ 'build',
377
+ 'integration-test',
378
+ 'e2e',
379
+ 'e2e-ci'
380
+ ];
381
+ detectedNxTasks = tasks.sort((a, b) => {
382
+ const aIdx = taskOrder.indexOf(a);
383
+ const bIdx = taskOrder.indexOf(b);
384
+ if (aIdx === -1 && bIdx === -1)
385
+ return 0;
386
+ if (aIdx === -1)
387
+ return 1;
388
+ if (bIdx === -1)
389
+ return -1;
390
+ return aIdx - bIdx;
391
+ });
392
+ nxDetected = true;
393
+ console.log('\n✅ Nx workspace detected!');
394
+ console.log(` Found tasks: ${detectedNxTasks.join(', ')}`);
395
+ console.log(' Pipecraft can optimize your CI pipeline using Nx affected commands.\n');
396
+ }
397
+ catch (error) {
398
+ console.warn('\n⚠️ Found nx.json but could not parse it:', error);
399
+ console.log(' Nx integration will use default tasks.\n');
400
+ nxDetected = true;
401
+ detectedNxTasks = ['lint', 'test', 'build', 'integration-test'];
402
+ }
403
+ }
169
404
  // Run inquirer prompts
170
405
  const answers = await inquirer.prompt([
171
- {
172
- type: 'input',
173
- name: 'projectName',
174
- message: 'What is your project name?',
175
- default: 'my-project'
176
- },
177
406
  {
178
407
  type: 'list',
179
408
  name: 'ciProvider',
@@ -225,51 +454,106 @@ export const generate = async (ctx) => {
225
454
  message: `Which package manager do you use? (detected: ${detectedPackageManager})`,
226
455
  choices: ['npm', 'yarn', 'pnpm'],
227
456
  default: detectedPackageManager
457
+ },
458
+ {
459
+ type: 'confirm',
460
+ name: 'enableNx',
461
+ message: nxDetected
462
+ ? `Enable Nx integration? (detected ${detectedNxTasks.length} tasks)`
463
+ : 'Enable Nx integration?',
464
+ default: nxDetected,
465
+ when: () => nxDetected // Only show if Nx is detected
466
+ },
467
+ {
468
+ type: 'list',
469
+ name: 'domainSelection',
470
+ message: 'What domains exist in your codebase?',
471
+ choices: [
472
+ { name: 'API + Web (common monorepo)', value: 'api-web' },
473
+ { name: 'Frontend + Backend', value: 'frontend-backend' },
474
+ { name: 'Apps + Libs (Nx-style)', value: 'apps-libs' },
475
+ { name: 'Custom domains', value: 'custom' }
476
+ ],
477
+ default: 'api-web'
228
478
  }
229
479
  ]);
480
+ // Handle custom domain selection
481
+ let selectedDomains = [];
482
+ if (answers.domainSelection === 'custom') {
483
+ const customDomainsAnswer = await inquirer.prompt([
484
+ {
485
+ type: 'input',
486
+ name: 'customDomains',
487
+ message: 'Enter your domains (comma-separated)',
488
+ validate: (input) => {
489
+ if (!input.trim()) {
490
+ return 'Please enter at least one domain';
491
+ }
492
+ const domains = input
493
+ .split(',')
494
+ .map(d => d.trim())
495
+ .filter(d => d);
496
+ if (domains.length === 0) {
497
+ return 'Please enter valid domain names';
498
+ }
499
+ return true;
500
+ },
501
+ filter: (input) => input
502
+ .split(',')
503
+ .map(d => d.trim())
504
+ .filter(d => d)
505
+ }
506
+ ]);
507
+ selectedDomains = customDomainsAnswer.customDomains;
508
+ }
509
+ else {
510
+ // Map predefined selections to domain names
511
+ const domainMappings = {
512
+ 'api-web': ['api', 'web'],
513
+ 'frontend-backend': ['frontend', 'backend'],
514
+ 'apps-libs': ['apps', 'libs']
515
+ };
516
+ selectedDomains = domainMappings[answers.domainSelection] || [
517
+ 'api',
518
+ 'web'
519
+ ];
520
+ }
521
+ // Generate domain configuration
522
+ const domainConfig = {};
523
+ selectedDomains.forEach((domain) => {
524
+ domainConfig[domain] = {
525
+ paths: [`${domain}/**`], // Default path pattern
526
+ description: `${domain} application changes`
527
+ };
528
+ });
529
+ // Add cicd domain for CI/CD changes
530
+ domainConfig.cicd = {
531
+ paths: ['.github/**'],
532
+ description: 'CI/CD configuration changes'
533
+ };
534
+ // Show warning for custom domains about path editing
535
+ if (answers.domainSelection === 'custom') {
536
+ console.log('\n⚠️ Custom domains selected!');
537
+ console.log(' You will need to edit the paths in .pipecraftrc after generation');
538
+ console.log(' to match your actual project structure.\n');
539
+ }
230
540
  // Merge answers with context and defaults
231
541
  const mergedCtx = { ...ctx, ...defaultConfig, ...answers };
232
- // Detect Nx workspace
233
- const nxJsonPath = `${cwd}/nx.json`;
234
- let nxConfig = undefined;
235
- if (existsSync(nxJsonPath)) {
236
- try {
237
- const nxJsonContent = readFileSync(nxJsonPath, 'utf8');
238
- const nxJson = JSON.parse(nxJsonContent);
239
- // Extract tasks from targetDefaults
240
- const tasks = nxJson.targetDefaults ? Object.keys(nxJson.targetDefaults) : [];
241
- // Sort tasks in a logical order (quality → test → build → e2e)
242
- const taskOrder = ['lint', 'typecheck', 'test', 'unit-test', 'build', 'integration-test', 'e2e', 'e2e-ci'];
243
- const sortedTasks = tasks.sort((a, b) => {
244
- const aIdx = taskOrder.indexOf(a);
245
- const bIdx = taskOrder.indexOf(b);
246
- if (aIdx === -1 && bIdx === -1)
247
- return 0;
248
- if (aIdx === -1)
249
- return 1;
250
- if (bIdx === -1)
251
- return -1;
252
- return aIdx - bIdx;
253
- });
254
- console.log('✅ Nx workspace detected - enabling Nx integration');
255
- console.log(` Detected tasks: ${sortedTasks.join(', ')}`);
256
- nxConfig = {
257
- enabled: true,
258
- tasks: sortedTasks,
259
- baseRef: 'origin/main',
260
- enableCache: true
261
- };
262
- }
263
- catch (error) {
264
- console.warn('⚠️ Found nx.json but could not parse it:', error);
265
- console.log(' Using default Nx configuration');
266
- nxConfig = {
267
- enabled: true,
268
- tasks: ['lint', 'test', 'build', 'integration-test'],
269
- baseRef: 'origin/main',
270
- enableCache: true
271
- };
272
- }
542
+ // Configure Nx based on detection and user confirmation
543
+ let nxConfig;
544
+ if (nxDetected && answers.enableNx) {
545
+ console.log('\n✅ Nx integration enabled!');
546
+ console.log(` Tasks to run: ${detectedNxTasks.join(', ')}\n`);
547
+ nxConfig = {
548
+ enabled: true,
549
+ tasks: detectedNxTasks,
550
+ baseRef: 'origin/main',
551
+ enableCache: true
552
+ };
553
+ }
554
+ else if (nxDetected && !answers.enableNx) {
555
+ console.log('\n⚠️ Nx detected but integration disabled.');
556
+ console.log(' You can enable it later by editing .pipecraftrc\n');
273
557
  }
274
558
  const configData = {
275
559
  ciProvider: mergedCtx.ciProvider,
@@ -283,12 +567,18 @@ export const generate = async (ctx) => {
283
567
  semver: {
284
568
  bumpRules: mergedCtx.semver.bumpRules
285
569
  },
286
- domains: mergedCtx.domains
570
+ domains: domainConfig // Use user-selected domains instead of defaults
287
571
  };
288
572
  // Add Nx config if detected
289
573
  if (nxConfig) {
290
574
  configData.nx = nxConfig;
291
575
  }
292
- return writeJSON(() => configData, toFile('.pipecraftrc.json'))(mergedCtx);
576
+ // Generate YAML content with comments
577
+ const yamlContent = generateYamlConfig(configData);
578
+ // Write the .pipecraftrc file
579
+ const outputPath = `${cwd}/.pipecraftrc`;
580
+ writeFileSync(outputPath, yamlContent, 'utf-8');
581
+ console.log(`\n✅ Created ${outputPath}\n`);
582
+ return mergedCtx;
293
583
  };
294
584
  //# sourceMappingURL=init.tpl.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"init.tpl.js","sourceRoot":"","sources":["../../src/generators/init.tpl.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,EAAiB,MAAM,EAAkB,SAAS,EAAE,MAAM,uBAAuB,CAAA;AACxF,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,IAAI,CAAA;AAC7C,OAAO,QAAQ,MAAM,UAAU,CAAA;AAK/B;;;;;;;;;;;;GAYG;AACH,MAAM,aAAa,GAAG;IACpB,UAAU,EAAE,QAAiB;IAC7B,aAAa,EAAE,cAAuB;IACtC,0BAA0B,EAAE,IAAI;IAChC,aAAa,EAAE,SAAS;IACxB,WAAW,EAAE,MAAM;IACnB,UAAU,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,MAAM,CAAC;IAC1C,SAAS,EAAE;QACT,OAAO,EAAE,IAAI;QACb,IAA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AAQ;QACtB,UAAU,EAAE,SAAS,CAAC,UAAU;QAChC,aAAa,EAAE,SAAS,CAAC,aAAa;QACtC,0BAA0B,EAAE,SAAS,CAAC,0BAA0B;QAChE,aAAa,EAAE,SAAS,CAAC,aAAa;QACtC,WAAW,EAAE,SAAS,CAAC,WAAW;QAClC,UAAU,EAAE,SAAS,CAAC,UAAU;QAChC,SAAS,EAAE,SAAS,CAAC,SAAS;QAC9B,cAAc,EAAE,SAAS,CAAC,cAAc;QACxC,MAAM,EAAE;YACN,SAAS,EAAE,SAAS,CAAC,MAAM,CAAC,SAAS;SACtC;QACD,OAAO,EAAE,YAAY,CAAC,gDAAgD;KACvE,CAAA;IAED,4BAA4B;IAC5B,IAAI,QAAQ,EAAE,CAAC;QACb,UAAU,CAAC,EAAE,GAAG,QAAQ,CAAA;IAC1B,CAAC;IAED,sCAAsC;IACtC,MAAM,WAAW,GAAG,kBAAkB,CAAC,UAAU,CAAC,CAAA;IAElD,8BAA8B;IAC9B,MAAM,UAAU,GAAG,GAAG,GAAG,eAAe,CAAA;IACxC,aAAa,CAAC,UAAU,EAAE,WAAW,EAAE,OAAO,CAAC,CAAA;IAE/C,OAAO,CAAC,GAAG,CAAC,eAAe,UAAU,IAAI,CAAC,CAAA;IAE1C,OAAO,SAAS,CAAA;AAClB,CAAC,CAAA"}
@@ -30,17 +30,17 @@
30
30
  *
31
31
  * // Creates:
32
32
  * // .github/workflows/pipeline.yml - Main pipeline
33
- * // .github/actions/detect-changes/... - Change detection action
34
- * // .github/actions/calculate-version/... - Version calculation action
35
- * // .github/actions/create-tag/... - Tag creation action
36
- * // .github/actions/create-pr/... - PR creation action
37
- * // .github/actions/manage-branch/... - Branch management action
38
- * // .github/actions/promote-branch/... - Branch promotion action
39
- * // .github/actions/create-release/... - Release creation action
33
+ * // actions/detect-changes/... - Change detection action
34
+ * // actions/calculate-version/... - Version calculation action
35
+ * // actions/create-tag/... - Tag creation action
36
+ * // actions/create-pr/... - PR creation action
37
+ * // actions/manage-branch/... - Branch management action
38
+ * // actions/promote-branch/... - Branch promotion action
39
+ * // actions/create-release/... - Release creation action
40
40
  * // .release-it.cjs - Release-it configuration
41
41
  * ```
42
42
  */
43
- import { PinionContext } from '@featherscloud/pinion';
43
+ import { type PinionContext } from '@featherscloud/pinion';
44
44
  /**
45
45
  * Workflows generator main entry point.
46
46
  *
@@ -81,7 +81,7 @@ import { PinionContext } from '@featherscloud/pinion';
81
81
  *
82
82
  * @note The generator creates 9 files:
83
83
  * - 1 main workflow (pipeline.yml)
84
- * - 7 composite actions (in .github/actions/)
84
+ * - 7 composite actions (in actions/)
85
85
  * - 1 release-it configuration (.release-it.cjs)
86
86
  *
87
87
  * All actions are generated in parallel for performance, followed by
@@ -1 +1 @@
1
- {"version":3,"file":"workflows.tpl.d.ts","sourceRoot":"","sources":["../../src/generators/workflows.tpl.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AAEH,OAAO,EAAE,aAAa,EAA0C,MAAM,uBAAuB,CAAA;AAmD7F;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AACH,eAAO,MAAM,QAAQ,GAAI,KAAK,aAAa,GAAG;IAAE,YAAY,CAAC,EAAE,MAAM,CAAC;IAAC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,GAAG,CAAA;CAAE,iBA4D5G,CAAA"}
1
+ {"version":3,"file":"workflows.tpl.d.ts","sourceRoot":"","sources":["../../src/generators/workflows.tpl.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AAEH,OAAO,EAAY,KAAK,aAAa,EAAgC,MAAM,uBAAuB,CAAA;AAiDlG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AACH,eAAO,MAAM,QAAQ,GACnB,KAAK,aAAa,GAAG;IAAE,YAAY,CAAC,EAAE,MAAM,CAAC;IAAC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,GAAG,CAAA;CAAE,iBAsErF,CAAA"}