pipecraft 0.29.3 → 0.36.14

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 (142) hide show
  1. package/README.md +128 -54
  2. package/dist/cli/index.d.ts +3 -3
  3. package/dist/cli/index.js +68 -25
  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 +214 -108
  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 -36
  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 +49 -23
  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 +14 -8
  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 +16 -11
  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 +13 -9
  28. package/dist/templates/actions/create-tag.yml.tpl.js.map +1 -1
  29. package/dist/templates/actions/detect-changes.yml.tpl.d.ts +17 -51
  30. package/dist/templates/actions/detect-changes.yml.tpl.d.ts.map +1 -1
  31. package/dist/templates/actions/detect-changes.yml.tpl.js +130 -110
  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 +13 -9
  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 +39 -92
  40. package/dist/templates/actions/promote-branch.yml.tpl.js.map +1 -1
  41. package/dist/templates/release-it.cjs.tpl.d.ts +1 -1
  42. package/dist/templates/release-it.cjs.tpl.d.ts.map +1 -1
  43. package/dist/templates/release-it.cjs.tpl.js +38 -29
  44. package/dist/templates/release-it.cjs.tpl.js.map +1 -1
  45. package/dist/templates/workflows/enforce-pr-target.yml.tpl.d.ts +1 -1
  46. package/dist/templates/workflows/enforce-pr-target.yml.tpl.d.ts.map +1 -1
  47. package/dist/templates/workflows/enforce-pr-target.yml.tpl.js +2 -3
  48. package/dist/templates/workflows/enforce-pr-target.yml.tpl.js.map +1 -1
  49. package/dist/templates/workflows/pipeline.yml.tpl.d.ts +2 -2
  50. package/dist/templates/workflows/pipeline.yml.tpl.d.ts.map +1 -1
  51. package/dist/templates/workflows/pipeline.yml.tpl.js +337 -84
  52. package/dist/templates/workflows/pipeline.yml.tpl.js.map +1 -1
  53. package/dist/templates/workflows/pr-title-check.yml.tpl.d.ts +1 -1
  54. package/dist/templates/workflows/pr-title-check.yml.tpl.d.ts.map +1 -1
  55. package/dist/templates/workflows/pr-title-check.yml.tpl.js +101 -22
  56. package/dist/templates/workflows/pr-title-check.yml.tpl.js.map +1 -1
  57. package/dist/templates/workflows/shared/index.d.ts +4 -2
  58. package/dist/templates/workflows/shared/index.d.ts.map +1 -1
  59. package/dist/templates/workflows/shared/index.js +4 -2
  60. package/dist/templates/workflows/shared/index.js.map +1 -1
  61. package/dist/templates/workflows/shared/managed-workflow.d.ts +32 -0
  62. package/dist/templates/workflows/shared/managed-workflow.d.ts.map +1 -0
  63. package/dist/templates/workflows/shared/managed-workflow.js +51 -0
  64. package/dist/templates/workflows/shared/managed-workflow.js.map +1 -0
  65. package/dist/templates/workflows/shared/operations-changes.d.ts +13 -3
  66. package/dist/templates/workflows/shared/operations-changes.d.ts.map +1 -1
  67. package/dist/templates/workflows/shared/operations-changes.js +42 -16
  68. package/dist/templates/workflows/shared/operations-changes.js.map +1 -1
  69. package/dist/templates/workflows/shared/operations-domain-jobs.d.ts +18 -1
  70. package/dist/templates/workflows/shared/operations-domain-jobs.d.ts.map +1 -1
  71. package/dist/templates/workflows/shared/operations-domain-jobs.js +142 -17
  72. package/dist/templates/workflows/shared/operations-domain-jobs.js.map +1 -1
  73. package/dist/templates/workflows/shared/operations-gate.d.ts +6 -0
  74. package/dist/templates/workflows/shared/operations-gate.d.ts.map +1 -0
  75. package/dist/templates/workflows/shared/operations-gate.js +116 -0
  76. package/dist/templates/workflows/shared/operations-gate.js.map +1 -0
  77. package/dist/templates/workflows/shared/operations-header.d.ts +11 -1
  78. package/dist/templates/workflows/shared/operations-header.d.ts.map +1 -1
  79. package/dist/templates/workflows/shared/operations-header.js +66 -7
  80. package/dist/templates/workflows/shared/operations-header.js.map +1 -1
  81. package/dist/templates/workflows/shared/operations-tag-promote.d.ts +4 -3
  82. package/dist/templates/workflows/shared/operations-tag-promote.d.ts.map +1 -1
  83. package/dist/templates/workflows/shared/operations-tag-promote.js +144 -33
  84. package/dist/templates/workflows/shared/operations-tag-promote.js.map +1 -1
  85. package/dist/templates/workflows/shared/operations-version.d.ts +3 -2
  86. package/dist/templates/workflows/shared/operations-version.d.ts.map +1 -1
  87. package/dist/templates/workflows/shared/operations-version.js +17 -16
  88. package/dist/templates/workflows/shared/operations-version.js.map +1 -1
  89. package/dist/templates/yaml-format-utils.d.ts.map +1 -1
  90. package/dist/templates/yaml-format-utils.js +1 -5
  91. package/dist/templates/yaml-format-utils.js.map +1 -1
  92. package/dist/types/index.d.ts +65 -53
  93. package/dist/types/index.d.ts.map +1 -1
  94. package/dist/utils/action-reference.d.ts +73 -0
  95. package/dist/utils/action-reference.d.ts.map +1 -0
  96. package/dist/utils/action-reference.js +120 -0
  97. package/dist/utils/action-reference.js.map +1 -0
  98. package/dist/utils/ast-path-operations.d.ts +3 -3
  99. package/dist/utils/ast-path-operations.d.ts.map +1 -1
  100. package/dist/utils/ast-path-operations.js +58 -17
  101. package/dist/utils/ast-path-operations.js.map +1 -1
  102. package/dist/utils/config.d.ts +16 -5
  103. package/dist/utils/config.d.ts.map +1 -1
  104. package/dist/utils/config.js +69 -12
  105. package/dist/utils/config.js.map +1 -1
  106. package/dist/utils/github-setup.d.ts +7 -7
  107. package/dist/utils/github-setup.d.ts.map +1 -1
  108. package/dist/utils/github-setup.js +84 -63
  109. package/dist/utils/github-setup.js.map +1 -1
  110. package/dist/utils/logger.d.ts.map +1 -1
  111. package/dist/utils/logger.js.map +1 -1
  112. package/dist/utils/messaging.d.ts +2 -2
  113. package/dist/utils/messaging.d.ts.map +1 -1
  114. package/dist/utils/messaging.js +12 -8
  115. package/dist/utils/messaging.js.map +1 -1
  116. package/dist/utils/preflight.d.ts +2 -2
  117. package/dist/utils/preflight.d.ts.map +1 -1
  118. package/dist/utils/preflight.js +43 -41
  119. package/dist/utils/preflight.js.map +1 -1
  120. package/dist/utils/versioning.d.ts +1 -1
  121. package/dist/utils/versioning.d.ts.map +1 -1
  122. package/dist/utils/versioning.js +10 -10
  123. package/dist/utils/versioning.js.map +1 -1
  124. package/dist/utils/workflow-semantics.d.ts +61 -0
  125. package/dist/utils/workflow-semantics.d.ts.map +1 -0
  126. package/dist/utils/workflow-semantics.js +230 -0
  127. package/dist/utils/workflow-semantics.js.map +1 -0
  128. package/package.json +12 -4
  129. package/src/generators/init.tpl.ts +275 -128
  130. package/src/generators/workflows.tpl.ts +54 -57
  131. package/dist/templates/actions/detect-changes-nx.yml.tpl.d.ts +0 -32
  132. package/dist/templates/actions/detect-changes-nx.yml.tpl.d.ts.map +0 -1
  133. package/dist/templates/actions/detect-changes-nx.yml.tpl.js +0 -227
  134. package/dist/templates/actions/detect-changes-nx.yml.tpl.js.map +0 -1
  135. package/dist/templates/workflows/pipeline-nx.yml.tpl.d.ts +0 -22
  136. package/dist/templates/workflows/pipeline-nx.yml.tpl.d.ts.map +0 -1
  137. package/dist/templates/workflows/pipeline-nx.yml.tpl.js +0 -196
  138. package/dist/templates/workflows/pipeline-nx.yml.tpl.js.map +0 -1
  139. package/dist/utils/idempotency.d.ts +0 -187
  140. package/dist/utils/idempotency.d.ts.map +0 -1
  141. package/dist/utils/idempotency.js +0 -304
  142. package/dist/utils/idempotency.js.map +0 -1
@@ -25,7 +25,7 @@
25
25
  * })
26
26
  * ```
27
27
  */
28
- import { toFile, renderTemplate } from '@featherscloud/pinion';
28
+ import { renderTemplate, toFile } from '@featherscloud/pinion';
29
29
  /**
30
30
  * Generates the pr-title-check.yml workflow file.
31
31
  *
@@ -48,14 +48,40 @@ import { toFile, renderTemplate } from '@featherscloud/pinion';
48
48
  * // Creates: .github/workflows/pr-title-check.yml
49
49
  * ```
50
50
  */
51
- export const generate = (ctx) => Promise.resolve(ctx)
52
- .then((ctx) => {
51
+ export const generate = (ctx) => Promise.resolve(ctx).then(ctx => {
53
52
  const { requireConventionalCommits = true } = ctx;
54
53
  // Only generate if conventional commits are required
55
54
  if (!requireConventionalCommits) {
56
55
  return ctx;
57
56
  }
58
- return renderTemplate((ctx) => `name: "PR Title Format Check"
57
+ return renderTemplate((ctx) => {
58
+ // Get all commit types from bumpRules config
59
+ const bumpRules = ctx.config?.semver?.bumpRules || ctx.config?.versioning?.bumpRules || {};
60
+ const allTypes = Object.keys(bumpRules);
61
+ // Get major bump types for breaking change detection
62
+ const majorTypes = Object.entries(bumpRules)
63
+ .filter(([_, level]) => level === 'major')
64
+ .map(([type, _]) => type);
65
+ // Build the types list for the PR title validator
66
+ // Use config types, or fall back to common conventional commit types
67
+ const typesList = allTypes.length > 0
68
+ ? allTypes.map(type => ` ${type}`).join('\n')
69
+ : ` fix
70
+ feat
71
+ docs
72
+ style
73
+ chore
74
+ refactor
75
+ perf
76
+ test
77
+ ci
78
+ build
79
+ revert
80
+ major`;
81
+ // Build regex pattern for detecting major bump types
82
+ // Format: ^(major|breaking|othermajortype):
83
+ const majorTypesPattern = majorTypes.length > 0 ? `^(${majorTypes.join('|')}):` : '^major:';
84
+ return `name: "PR Title Format Check"
59
85
 
60
86
  on:
61
87
  pull_request:
@@ -66,7 +92,8 @@ on:
66
92
  - reopened
67
93
 
68
94
  permissions:
69
- pull-requests: read
95
+ pull-requests: write
96
+ contents: read
70
97
 
71
98
  jobs:
72
99
  main:
@@ -79,22 +106,40 @@ jobs:
79
106
  GITHUB_TOKEN: \${{ secrets.GITHUB_TOKEN }}
80
107
  with:
81
108
  # Configure which types are allowed (newline-delimited).
82
- # Default: https://github.com/commitizen/conventional-commit-types
109
+ # Types are derived from pipecraft config bumpRules
83
110
  types: |
84
- fix
85
- feat
86
- docs
87
- style
88
- chore
89
- refactor
90
- perf
91
- test
92
- ci
93
- build
94
- revert
95
- major
111
+ ${typesList}
96
112
  requireScope: false
97
113
 
114
+ # Check for breaking changes
115
+ - name: Check for breaking changes
116
+ id: breaking_check
117
+ if: always()
118
+ env:
119
+ PR_TITLE: \${{ github.event.pull_request.title }}
120
+ PR_BODY: \${{ github.event.pull_request.body }}
121
+ run: |
122
+
123
+ # Check if title starts with types that bump major version or contains "!" or "BREAKING"
124
+ # Types that bump major: ${majorTypes.join(', ')}
125
+ ${majorTypes.length > 0
126
+ ? `IS_MAJOR_TYPE=false
127
+ for type in ${majorTypes.map(t => `"${t}"`).join(' ')}; do
128
+ if [[ "$PR_TITLE" =~ ^$type: ]]; then
129
+ IS_MAJOR_TYPE=true
130
+ break
131
+ fi
132
+ done
133
+ if [ "$IS_MAJOR_TYPE" = "true" ] || [[ "$PR_TITLE" =~ ^[a-z]+!: ]] || [[ "$PR_TITLE" =~ BREAKING ]] || [[ "$PR_TITLE" =~ breaking ]]; then`
134
+ : `if [[ "$PR_TITLE" =~ ^major: ]] || [[ "$PR_TITLE" =~ ^[a-z]+!: ]] || [[ "$PR_TITLE" =~ BREAKING ]] || [[ "$PR_TITLE" =~ breaking ]]; then`}
135
+ echo "is_breaking=true" >> $GITHUB_OUTPUT
136
+ echo "⚠️ Breaking change detected in PR title"
137
+ elif [[ "$PR_BODY" =~ BREAKING[[:space:]]CHANGE ]]; then
138
+ echo "is_breaking=true" >> $GITHUB_OUTPUT
139
+ echo "⚠️ Breaking change detected in PR body"
140
+ else
141
+ echo "is_breaking=false" >> $GITHUB_OUTPUT
142
+ fi
98
143
 
99
144
  - uses: marocchino/sticky-pull-request-comment@v2
100
145
  # When the previous steps fails, the workflow would stop. By adding this
@@ -104,11 +149,11 @@ jobs:
104
149
  header: pr-title-lint-error
105
150
  message: |
106
151
  Hey there and thank you for opening this pull request! 👋🏼
107
-
152
+
108
153
  We require pull request titles to follow the [Conventional Commits specification](https://www.conventionalcommits.org/en/v1.0.0/) and it looks like your proposed title needs to be adjusted.
109
154
 
110
155
  Details:
111
-
156
+
112
157
  \`\`\`
113
158
  \${{ steps.lint_pr_title.outputs.error_message }}
114
159
  \`\`\`
@@ -116,8 +161,42 @@ jobs:
116
161
  # Delete a previous comment when the issue has been resolved
117
162
  - if: \${{ steps.lint_pr_title.outputs.error_message == null }}
118
163
  uses: marocchino/sticky-pull-request-comment@v2
119
- with:
164
+ with:
120
165
  header: pr-title-lint-error
121
- delete: true`, toFile('.github/workflows/pr-title-check.yml'))(ctx);
166
+ delete: true
167
+
168
+ # Add warning comment for breaking changes
169
+ - name: Add breaking change warning
170
+ if: always() && steps.breaking_check.outputs.is_breaking == 'true'
171
+ uses: marocchino/sticky-pull-request-comment@v2
172
+ with:
173
+ header: breaking-change-warning
174
+ message: |
175
+ ## ⚠️ BREAKING CHANGE DETECTED
176
+
177
+ This PR contains a **BREAKING CHANGE** which will result in a **MAJOR version bump**.
178
+
179
+ **Important considerations:**
180
+ - Breaking changes require careful review by maintainers
181
+ - This will increment the major version (e.g., 1.x.x → 2.0.0)
182
+ - Users will need to update their code when upgrading
183
+ - Documentation should be updated to reflect the breaking changes
184
+ - Consider if this change can be made backwards-compatible
185
+
186
+ **Required actions:**
187
+ - [ ] Breaking changes are documented in the PR description
188
+ - [ ] Migration guide is provided (if applicable)
189
+ - [ ] All maintainers have been notified for review
190
+
191
+ **Reviewers:** This PR requires additional scrutiny due to the breaking change.
192
+
193
+ # Delete breaking change warning when resolved
194
+ - name: Remove breaking change warning
195
+ if: always() && steps.breaking_check.outputs.is_breaking == 'false'
196
+ uses: marocchino/sticky-pull-request-comment@v2
197
+ with:
198
+ header: breaking-change-warning
199
+ delete: true`;
200
+ }, toFile('.github/workflows/pr-title-check.yml'))(ctx);
122
201
  });
123
202
  //# sourceMappingURL=pr-title-check.yml.tpl.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"pr-title-check.yml.tpl.js","sourceRoot":"","sources":["../../../src/templates/workflows/pr-title-check.yml.tpl.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,EAAiB,MAAM,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AAE7E;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,GAAkB,EAAE,EAAE,CAC7C,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC;KACjB,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE;IACZ,MAAM,EAAE,0BAA0B,GAAG,IAAI,EAAE,GAAG,GAAU,CAAA;IAExD,qDAAqD;IACrD,IAAI,CAAC,0BAA0B,EAAE,CAAC;QAChC,OAAO,GAAG,CAAA;IACZ,CAAC;IAED,OAAO,cAAc,CACnB,CAAC,GAAQ,EAAE,EAAE,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uBA+DC,EACf,MAAM,CAAC,sCAAsC,CAAC,CAC/C,CAAC,GAAG,CAAC,CAAA;AACR,CAAC,CAAC,CAAA"}
1
+ {"version":3,"file":"pr-title-check.yml.tpl.js","sourceRoot":"","sources":["../../../src/templates/workflows/pr-title-check.yml.tpl.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,EAAsB,cAAc,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAA;AAElF;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,GAAkB,EAAE,EAAE,CAC7C,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE;IAC9B,MAAM,EAAE,0BAA0B,GAAG,IAAI,EAAE,GAAG,GAAU,CAAA;IAExD,qDAAqD;IACrD,IAAI,CAAC,0BAA0B,EAAE,CAAC;QAChC,OAAO,GAAG,CAAA;IACZ,CAAC;IAED,OAAO,cAAc,CAAC,CAAC,GAAQ,EAAE,EAAE;QACjC,6CAA6C;QAC7C,MAAM,SAAS,GAAG,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,IAAI,GAAG,CAAC,MAAM,EAAE,UAAU,EAAE,SAAS,IAAI,EAAE,CAAA;QAC1F,MAAM,QAAQ,GAAG,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAA;QAEvC,qDAAqD;QACrD,MAAM,UAAU,GAAG,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC;aACzC,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,KAAK,KAAK,OAAO,CAAC;aACzC,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,CAAA;QAE3B,kDAAkD;QAClD,qEAAqE;QACrE,MAAM,SAAS,GACb,QAAQ,CAAC,MAAM,GAAG,CAAC;YACjB,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,eAAe,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;YACxD,CAAC,CAAC;;;;;;;;;;;kBAWM,CAAA;QAEZ,qDAAqD;QACrD,4CAA4C;QAC5C,MAAM,iBAAiB,GAAG,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAA;QAE3F,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2BX,SAAS;;;;;;;;;;;;;qCAa0B,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC;YAE9C,UAAU,CAAC,MAAM,GAAG,CAAC;YACnB,CAAC,CAAC;wBACQ,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC;;;;;;qJAMsF;YACvI,CAAC,CAAC,2IACN;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uBAiEa,CAAA;IACnB,CAAC,EAAE,MAAM,CAAC,sCAAsC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAA;AACzD,CAAC,CAAC,CAAA"}
@@ -3,9 +3,11 @@
3
3
  *
4
4
  * Export all shared operation generators for building workflow templates.
5
5
  */
6
- export * from './operations-header.js';
7
6
  export * from './operations-changes.js';
8
7
  export * from './operations-domain-jobs.js';
9
- export * from './operations-version.js';
8
+ export * from './operations-gate.js';
9
+ export * from './operations-header.js';
10
10
  export * from './operations-tag-promote.js';
11
+ export * from './operations-version.js';
12
+ export * from './managed-workflow.js';
11
13
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/templates/workflows/shared/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,wBAAwB,CAAA;AACtC,cAAc,yBAAyB,CAAA;AACvC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,yBAAyB,CAAA;AACvC,cAAc,6BAA6B,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/templates/workflows/shared/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,yBAAyB,CAAA;AACvC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,sBAAsB,CAAA;AACpC,cAAc,wBAAwB,CAAA;AACtC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,yBAAyB,CAAA;AACvC,cAAc,uBAAuB,CAAA"}
@@ -3,9 +3,11 @@
3
3
  *
4
4
  * Export all shared operation generators for building workflow templates.
5
5
  */
6
- export * from './operations-header.js';
7
6
  export * from './operations-changes.js';
8
7
  export * from './operations-domain-jobs.js';
9
- export * from './operations-version.js';
8
+ export * from './operations-gate.js';
9
+ export * from './operations-header.js';
10
10
  export * from './operations-tag-promote.js';
11
+ export * from './operations-version.js';
12
+ export * from './managed-workflow.js';
11
13
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/templates/workflows/shared/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,wBAAwB,CAAA;AACtC,cAAc,yBAAyB,CAAA;AACvC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,yBAAyB,CAAA;AACvC,cAAc,6BAA6B,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/templates/workflows/shared/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,yBAAyB,CAAA;AACvC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,sBAAsB,CAAA;AACpC,cAAc,wBAAwB,CAAA;AACtC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,yBAAyB,CAAA;AACvC,cAAc,uBAAuB,CAAA"}
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Managed Workflow Utilities
3
+ *
4
+ * Provides helpers for creating and updating workflow YAML documents that
5
+ * include the standard Pipecraft-managed jobs (changes, version, gate, tag,
6
+ * promote, release) along with optional runner-specific test jobs.
7
+ *
8
+ * These utilities centralize the shared pieces of the path-based and Nx
9
+ * workflow generators so new runner implementations (Turbo, Bazel, Pants, etc.)
10
+ * can reuse the same core structure.
11
+ */
12
+ import type { Configuration, PinionContext } from '@featherscloud/pinion';
13
+ import { Document } from 'yaml';
14
+ import { type PathOperationConfig } from '../../../utils/ast-path-operations.js';
15
+ export interface ManagedWorkflowContext extends Omit<PinionContext, 'pinion'> {
16
+ pinion?: Configuration & {
17
+ force?: boolean;
18
+ };
19
+ }
20
+ declare const DEFAULT_STRINGIFY_OPTIONS: {
21
+ lineWidth: number;
22
+ indent: number;
23
+ defaultStringType: "PLAIN";
24
+ defaultKeyType: "PLAIN";
25
+ minContentWidth: number;
26
+ };
27
+ export declare function createManagedWorkflowDocument(headerComment: string, operations: PathOperationConfig[], ctx: ManagedWorkflowContext): Document.Parsed;
28
+ export declare function updateManagedWorkflowDocument(existingContent: string, operations: PathOperationConfig[], ctx: ManagedWorkflowContext): Document.Parsed;
29
+ export declare function applyManagedWorkflowOperations(doc: Document.Parsed, operations: PathOperationConfig[], ctx: ManagedWorkflowContext): void;
30
+ export declare function stringifyManagedWorkflow(doc: Document.Parsed, options?: typeof DEFAULT_STRINGIFY_OPTIONS): string;
31
+ export { DEFAULT_STRINGIFY_OPTIONS as MANAGED_WORKFLOW_STRINGIFY_OPTIONS };
32
+ //# sourceMappingURL=managed-workflow.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"managed-workflow.d.ts","sourceRoot":"","sources":["../../../../src/templates/workflows/shared/managed-workflow.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAA;AACzE,OAAO,EAAE,QAAQ,EAAqC,MAAM,MAAM,CAAA;AAElE,OAAO,EAEL,KAAK,mBAAmB,EACzB,MAAM,uCAAuC,CAAA;AAG9C,MAAM,WAAW,sBAAuB,SAAQ,IAAI,CAAC,aAAa,EAAE,QAAQ,CAAC;IAC3E,MAAM,CAAC,EAAE,aAAa,GAAG;QACvB,KAAK,CAAC,EAAE,OAAO,CAAA;KAChB,CAAA;CACF;AAED,QAAA,MAAM,yBAAyB;;;;;;CAM9B,CAAA;AAoBD,wBAAgB,6BAA6B,CAC3C,aAAa,EAAE,MAAM,EACrB,UAAU,EAAE,mBAAmB,EAAE,EACjC,GAAG,EAAE,sBAAsB,GAC1B,QAAQ,CAAC,MAAM,CAKjB;AAED,wBAAgB,6BAA6B,CAC3C,eAAe,EAAE,MAAM,EACvB,UAAU,EAAE,mBAAmB,EAAE,EACjC,GAAG,EAAE,sBAAsB,GAC1B,QAAQ,CAAC,MAAM,CAIjB;AAED,wBAAgB,8BAA8B,CAC5C,GAAG,EAAE,QAAQ,CAAC,MAAM,EACpB,UAAU,EAAE,mBAAmB,EAAE,EACjC,GAAG,EAAE,sBAAsB,QAG5B;AAED,wBAAgB,wBAAwB,CACtC,GAAG,EAAE,QAAQ,CAAC,MAAM,EACpB,OAAO,GAAE,OAAO,yBAAqD,UAGtE;AAED,OAAO,EAAE,yBAAyB,IAAI,kCAAkC,EAAE,CAAA"}
@@ -0,0 +1,51 @@
1
+ /**
2
+ * Managed Workflow Utilities
3
+ *
4
+ * Provides helpers for creating and updating workflow YAML documents that
5
+ * include the standard Pipecraft-managed jobs (changes, version, gate, tag,
6
+ * promote, release) along with optional runner-specific test jobs.
7
+ *
8
+ * These utilities centralize the shared pieces of the path-based and Nx
9
+ * workflow generators so new runner implementations (Turbo, Bazel, Pants, etc.)
10
+ * can reuse the same core structure.
11
+ */
12
+ import { parseDocument, stringify } from 'yaml';
13
+ import { applyPathOperations } from '../../../utils/ast-path-operations.js';
14
+ import { ensureGateJob } from './operations-gate.js';
15
+ const DEFAULT_STRINGIFY_OPTIONS = {
16
+ lineWidth: 0,
17
+ indent: 2,
18
+ defaultStringType: 'PLAIN',
19
+ defaultKeyType: 'PLAIN',
20
+ minContentWidth: 0
21
+ };
22
+ function applyManagedOperations(doc, operations, force) {
23
+ if (!doc.contents) {
24
+ return;
25
+ }
26
+ const rootNode = doc.contents;
27
+ if (rootNode && typeof rootNode === 'object' && 'flow' in rootNode) {
28
+ rootNode.flow = false;
29
+ }
30
+ applyPathOperations(rootNode, operations, doc);
31
+ ensureGateJob(doc, { force });
32
+ }
33
+ export function createManagedWorkflowDocument(headerComment, operations, ctx) {
34
+ const doc = parseDocument('{}');
35
+ doc.commentBefore = headerComment;
36
+ applyManagedOperations(doc, operations, Boolean(ctx.pinion?.force));
37
+ return doc;
38
+ }
39
+ export function updateManagedWorkflowDocument(existingContent, operations, ctx) {
40
+ const doc = parseDocument(existingContent);
41
+ applyManagedOperations(doc, operations, Boolean(ctx.pinion?.force));
42
+ return doc;
43
+ }
44
+ export function applyManagedWorkflowOperations(doc, operations, ctx) {
45
+ applyManagedOperations(doc, operations, Boolean(ctx.pinion?.force));
46
+ }
47
+ export function stringifyManagedWorkflow(doc, options = DEFAULT_STRINGIFY_OPTIONS) {
48
+ return stringify(doc, options);
49
+ }
50
+ export { DEFAULT_STRINGIFY_OPTIONS as MANAGED_WORKFLOW_STRINGIFY_OPTIONS };
51
+ //# sourceMappingURL=managed-workflow.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"managed-workflow.js","sourceRoot":"","sources":["../../../../src/templates/workflows/shared/managed-workflow.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,EAAqB,aAAa,EAAE,SAAS,EAAE,MAAM,MAAM,CAAA;AAElE,OAAO,EACL,mBAAmB,EAEpB,MAAM,uCAAuC,CAAA;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AAQpD,MAAM,yBAAyB,GAAG;IAChC,SAAS,EAAE,CAAC;IACZ,MAAM,EAAE,CAAC;IACT,iBAAiB,EAAE,OAAgB;IACnC,cAAc,EAAE,OAAgB;IAChC,eAAe,EAAE,CAAC;CACnB,CAAA;AAED,SAAS,sBAAsB,CAC7B,GAAoB,EACpB,UAAiC,EACjC,KAAc;IAEd,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC;QAClB,OAAM;IACR,CAAC;IAED,MAAM,QAAQ,GAAG,GAAG,CAAC,QAAmB,CAAA;IACxC,IAAI,QAAQ,IAAI,OAAO,QAAQ,KAAK,QAAQ,IAAI,MAAM,IAAI,QAAQ,EAAE,CAAC;QACnE,QAAQ,CAAC,IAAI,GAAG,KAAK,CAAA;IACvB,CAAC;IAED,mBAAmB,CAAC,QAAQ,EAAE,UAAU,EAAE,GAAG,CAAC,CAAA;IAC9C,aAAa,CAAC,GAAG,EAAE,EAAE,KAAK,EAAE,CAAC,CAAA;AAC/B,CAAC;AAED,MAAM,UAAU,6BAA6B,CAC3C,aAAqB,EACrB,UAAiC,EACjC,GAA2B;IAE3B,MAAM,GAAG,GAAG,aAAa,CAAC,IAAI,CAAC,CAAA;IAC/B,GAAG,CAAC,aAAa,GAAG,aAAa,CAAA;IACjC,sBAAsB,CAAC,GAAG,EAAE,UAAU,EAAE,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAAA;IACnE,OAAO,GAAG,CAAA;AACZ,CAAC;AAED,MAAM,UAAU,6BAA6B,CAC3C,eAAuB,EACvB,UAAiC,EACjC,GAA2B;IAE3B,MAAM,GAAG,GAAG,aAAa,CAAC,eAAe,CAAC,CAAA;IAC1C,sBAAsB,CAAC,GAAG,EAAE,UAAU,EAAE,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAAA;IACnE,OAAO,GAAG,CAAA;AACZ,CAAC;AAED,MAAM,UAAU,8BAA8B,CAC5C,GAAoB,EACpB,UAAiC,EACjC,GAA2B;IAE3B,sBAAsB,CAAC,GAAG,EAAE,UAAU,EAAE,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAAA;AACrE,CAAC;AAED,MAAM,UAAU,wBAAwB,CACtC,GAAoB,EACpB,UAA4C,yBAAyB;IAErE,OAAO,SAAS,CAAC,GAAG,EAAE,OAAO,CAAC,CAAA;AAChC,CAAC;AAED,OAAO,EAAE,yBAAyB,IAAI,kCAAkC,EAAE,CAAA"}
@@ -3,15 +3,25 @@
3
3
  *
4
4
  * Generates the changes detection job that identifies which domains have changed.
5
5
  * Supports both Nx-based detection (using dependency graph) and path-based detection.
6
+ *
7
+ * **Pipeline-Embedded Approach:**
8
+ * - Domain definitions are BAKED INTO the pipeline file at generation time
9
+ * - The detect-changes action is generic and reusable
10
+ * - When domains change in .pipecraftrc, regenerate to update the pipeline
11
+ * - Actions themselves never change
6
12
  */
7
- import { PathOperationConfig } from '../../../utils/ast-path-operations.js';
13
+ import { type PathOperationConfig } from '../../../utils/ast-path-operations.js';
14
+ import type { PipecraftConfig } from '../../../types/index.js';
8
15
  export interface ChangesContext {
9
16
  domains: Record<string, any>;
10
- useNx?: boolean;
11
17
  baseRef?: string;
18
+ config?: Partial<PipecraftConfig>;
12
19
  }
13
20
  /**
14
- * Create the changes detection job operation
21
+ * Create the changes detection job operation.
22
+ *
23
+ * Embeds domain configuration directly into the pipeline YAML at generation time.
24
+ * The detect-changes action receives this as structured input.
15
25
  */
16
26
  export declare function createChangesJobOperation(ctx: ChangesContext): PathOperationConfig;
17
27
  //# sourceMappingURL=operations-changes.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"operations-changes.d.ts","sourceRoot":"","sources":["../../../../src/templates/workflows/shared/operations-changes.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,mBAAmB,EAAyB,MAAM,uCAAuC,CAAA;AAElG,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC5B,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAED;;GAEG;AACH,wBAAgB,yBAAyB,CAAC,GAAG,EAAE,cAAc,GAAG,mBAAmB,CA0ClF"}
1
+ {"version":3,"file":"operations-changes.d.ts","sourceRoot":"","sources":["../../../../src/templates/workflows/shared/operations-changes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAEL,KAAK,mBAAmB,EACzB,MAAM,uCAAuC,CAAA;AAE9C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAA;AAE9D,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC5B,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,MAAM,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC,CAAA;CAClC;AAED;;;;;GAKG;AACH,wBAAgB,yBAAyB,CAAC,GAAG,EAAE,cAAc,GAAG,mBAAmB,CA0DlF"}
@@ -3,46 +3,72 @@
3
3
  *
4
4
  * Generates the changes detection job that identifies which domains have changed.
5
5
  * Supports both Nx-based detection (using dependency graph) and path-based detection.
6
+ *
7
+ * **Pipeline-Embedded Approach:**
8
+ * - Domain definitions are BAKED INTO the pipeline file at generation time
9
+ * - The detect-changes action is generic and reusable
10
+ * - When domains change in .pipecraftrc, regenerate to update the pipeline
11
+ * - Actions themselves never change
6
12
  */
7
13
  import { createValueFromString } from '../../../utils/ast-path-operations.js';
14
+ import { getActionReference } from '../../../utils/action-reference.js';
8
15
  /**
9
- * Create the changes detection job operation
16
+ * Create the changes detection job operation.
17
+ *
18
+ * Embeds domain configuration directly into the pipeline YAML at generation time.
19
+ * The detect-changes action receives this as structured input.
10
20
  */
11
21
  export function createChangesJobOperation(ctx) {
12
- const { domains, useNx = false, baseRef = 'main' } = ctx;
13
- const action = useNx ? 'detect-changes-nx' : 'detect-changes';
22
+ const { domains, baseRef = 'main', config = {} } = ctx;
14
23
  const sortedDomains = Object.keys(domains).sort();
24
+ // Get the action reference based on configuration
25
+ const actionRef = getActionReference('detect-changes', config);
15
26
  const comment = `
16
27
  =============================================================================
17
- CHANGES DETECTION (⚠️ Managed by Pipecraft - do not modify)
28
+ CHANGES DETECTION (⚠️ Managed by Pipecraft - do not modify)
18
29
  =============================================================================
19
- ${useNx
20
- ? 'Detects which domains have changed using Nx dependency graph and path-based fallback'
21
- : 'Detects which domains have changed using path-based detection'}
30
+ This job detects which domains have changed.
31
+ Domain definitions are baked into this file at generation time.
32
+ Run 'pipecraft generate' to update when domains change in .pipecraftrc.
22
33
  `;
23
- const outputsSection = sortedDomains.map(domain => ` ${domain}: \${{ steps.detect.outputs.${domain} }}`).join('\n');
24
- const nxOutputs = useNx
25
- ? ` nxAvailable: \${{ steps.detect.outputs.nxAvailable }}
26
- affectedProjects: \${{ steps.detect.outputs.affectedProjects }}`
27
- : '';
34
+ // Generate individual domain outputs by parsing the JSON changes output
35
+ const outputsSection = sortedDomains
36
+ .map(domain => ` ${domain}: \${{ fromJSON(steps.detect.outputs.changes).${domain} }}`)
37
+ .join('\n');
38
+ // Build domain configuration as YAML that will be embedded in the pipeline
39
+ // This gets regenerated when running pipecraft generate
40
+ const domainsYaml = sortedDomains
41
+ .map(domainName => {
42
+ const domain = domains[domainName];
43
+ const pathsYaml = domain.paths.map((path) => ` - '${path}'`).join('\n');
44
+ return ` ${domainName}:\n paths:\n${pathsYaml}`;
45
+ })
46
+ .join('\n');
28
47
  return {
29
48
  path: 'jobs.changes',
30
49
  operation: 'overwrite',
50
+ spaceBefore: true,
31
51
  commentBefore: comment,
32
52
  value: createValueFromString(`
33
53
  runs-on: ubuntu-latest
54
+ env:
55
+ # Domain configuration (regenerated by pipecraft generate)
56
+ DOMAINS: |
57
+ ${domainsYaml}
34
58
  steps:
35
59
  - uses: actions/checkout@v4
36
60
  with:
37
61
  ref: \${{ inputs.commitSha || github.sha }}
38
- fetch-depth: 0
39
- - uses: ./.github/actions/${action}
62
+ fetch-depth: \${{ env.FETCH_DEPTH_AFFECTED }}
63
+ - uses: ${actionRef}
40
64
  id: detect
41
65
  with:
42
- baseRef: \${{ inputs.baseRef || '${baseRef}' }}${useNx ? '\n useNx: \'true\'' : ''}
66
+ baseRef: \${{ inputs.baseRef || '${baseRef}' }}
67
+ domains-config: \${{ env.DOMAINS }}
43
68
  outputs:
44
69
  ${outputsSection}
45
- ${nxOutputs}
70
+ changes: \${{ steps.detect.outputs.changes }}
71
+ affectedDomains: \${{ steps.detect.outputs.affectedDomains }}
46
72
  `)
47
73
  };
48
74
  }
@@ -1 +1 @@
1
- {"version":3,"file":"operations-changes.js","sourceRoot":"","sources":["../../../../src/templates/workflows/shared/operations-changes.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAuB,qBAAqB,EAAE,MAAM,uCAAuC,CAAA;AAQlG;;GAEG;AACH,MAAM,UAAU,yBAAyB,CAAC,GAAmB;IAC3D,MAAM,EAAE,OAAO,EAAE,KAAK,GAAG,KAAK,EAAE,OAAO,GAAG,MAAM,EAAE,GAAG,GAAG,CAAA;IACxD,MAAM,MAAM,GAAG,KAAK,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,gBAAgB,CAAA;IAC7D,MAAM,aAAa,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,CAAA;IAEjD,MAAM,OAAO,GAAG;;;;EAIhB,KAAK;QACH,CAAC,CAAC,sFAAsF;QACxF,CAAC,CAAC,+DACN;CACC,CAAA;IAEC,MAAM,cAAc,GAAG,aAAa,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,SAAS,MAAM,+BAA+B,MAAM,KAAK,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IAExH,MAAM,SAAS,GAAG,KAAK;QACrB,CAAC,CAAC;sEACgE;QAClE,CAAC,CAAC,EAAE,CAAA;IAEN,OAAO;QACL,IAAI,EAAE,cAAc;QACpB,SAAS,EAAE,WAAW;QACtB,aAAa,EAAE,OAAO;QACtB,KAAK,EAAE,qBAAqB,CAAC;;;;;;;kCAOC,MAAM;;;6CAGK,OAAO,OAAO,KAAK,CAAC,CAAC,CAAC,6BAA6B,CAAC,CAAC,CAAC,EAAE;;EAEnG,cAAc;EACd,SAAS;GACR,CAAC;KACD,CAAA;AACH,CAAC"}
1
+ {"version":3,"file":"operations-changes.js","sourceRoot":"","sources":["../../../../src/templates/workflows/shared/operations-changes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EACL,qBAAqB,EAEtB,MAAM,uCAAuC,CAAA;AAC9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAA;AASvE;;;;;GAKG;AACH,MAAM,UAAU,yBAAyB,CAAC,GAAmB;IAC3D,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,MAAM,EAAE,MAAM,GAAG,EAAE,EAAE,GAAG,GAAG,CAAA;IACtD,MAAM,aAAa,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,CAAA;IAEjD,kDAAkD;IAClD,MAAM,SAAS,GAAG,kBAAkB,CAAC,gBAAgB,EAAE,MAAM,CAAC,CAAA;IAE9D,MAAM,OAAO,GAAG;;;;;;;CAOjB,CAAA;IAEC,wEAAwE;IACxE,MAAM,cAAc,GAAG,aAAa;SACjC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,SAAS,MAAM,iDAAiD,MAAM,KAAK,CAAC;SAC1F,IAAI,CAAC,IAAI,CAAC,CAAA;IAEb,2EAA2E;IAC3E,wDAAwD;IACxD,MAAM,WAAW,GAAG,aAAa;SAC9B,GAAG,CAAC,UAAU,CAAC,EAAE;QAChB,MAAM,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC,CAAA;QAClC,MAAM,SAAS,GAAG,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAY,EAAE,EAAE,CAAC,oBAAoB,IAAI,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QAC5F,OAAO,eAAe,UAAU,4BAA4B,SAAS,EAAE,CAAA;IACzE,CAAC,CAAC;SACD,IAAI,CAAC,IAAI,CAAC,CAAA;IAEb,OAAO;QACL,IAAI,EAAE,cAAc;QACpB,SAAS,EAAE,WAAW;QACtB,WAAW,EAAE,IAAI;QACjB,aAAa,EAAE,OAAO;QACtB,KAAK,EAAE,qBAAqB,CAAC;;;;;EAK/B,WAAW;;;;;;gBAMG,SAAS;;;6CAGoB,OAAO;;;EAGlD,cAAc;;;GAGb,CAAC;KACD,CAAA;AACH,CAAC"}
@@ -4,10 +4,21 @@
4
4
  * Generates test, deploy, and remote-test jobs for each domain.
5
5
  * These jobs are marked as 'preserve' so users can customize them.
6
6
  */
7
- import { PathOperationConfig } from '../../../utils/ast-path-operations.js';
7
+ import { type PathOperationConfig } from '../../../utils/ast-path-operations.js';
8
8
  export interface DomainJobsContext {
9
9
  domains: Record<string, any>;
10
10
  }
11
+ /**
12
+ * Create placeholder job operations for domains with custom prefixes
13
+ *
14
+ * Generates jobs based on the `prefixes` field in domain config.
15
+ * For example, with domain 'core' and prefixes ['lint', 'build', 'test'],
16
+ * this creates: lint-core, build-core, test-core
17
+ *
18
+ * @param ctx Context with domain configurations
19
+ * @returns Array of path operations for all prefix-based jobs
20
+ */
21
+ export declare function createPrefixedDomainJobOperations(ctx: DomainJobsContext): PathOperationConfig[];
11
22
  /**
12
23
  * Create test job operations for each domain
13
24
  */
@@ -22,10 +33,16 @@ export declare function createDomainDeployJobOperations(ctx: DomainJobsContext):
22
33
  export declare function createDomainRemoteTestJobOperations(ctx: DomainJobsContext): PathOperationConfig[];
23
34
  /**
24
35
  * Get list of all domain job names for dependency management
36
+ *
37
+ * Supports both legacy boolean flags (testable, deployable, remoteTestable)
38
+ * and new flexible prefixes array.
39
+ *
40
+ * @returns Object with arrays of job names categorized by type
25
41
  */
26
42
  export declare function getDomainJobNames(domains: Record<string, any>): {
27
43
  testJobs: string[];
28
44
  deployJobs: string[];
29
45
  remoteTestJobs: string[];
46
+ allJobsByPrefix: Record<string, string[]>;
30
47
  };
31
48
  //# sourceMappingURL=operations-domain-jobs.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"operations-domain-jobs.d.ts","sourceRoot":"","sources":["../../../../src/templates/workflows/shared/operations-domain-jobs.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,mBAAmB,EAAyB,MAAM,uCAAuC,CAAA;AAElG,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;CAC7B;AAED;;GAEG;AACH,wBAAgB,6BAA6B,CAAC,GAAG,EAAE,iBAAiB,GAAG,mBAAmB,EAAE,CAuC3F;AAED;;GAEG;AACH,wBAAgB,+BAA+B,CAAC,GAAG,EAAE,iBAAiB,GAAG,mBAAmB,EAAE,CAuC7F;AAED;;GAEG;AACH,wBAAgB,mCAAmC,CAAC,GAAG,EAAE,iBAAiB,GAAG,mBAAmB,EAAE,CAuCjG;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG;IAC/D,QAAQ,EAAE,MAAM,EAAE,CAAA;IAClB,UAAU,EAAE,MAAM,EAAE,CAAA;IACpB,cAAc,EAAE,MAAM,EAAE,CAAA;CACzB,CAMA"}
1
+ {"version":3,"file":"operations-domain-jobs.d.ts","sourceRoot":"","sources":["../../../../src/templates/workflows/shared/operations-domain-jobs.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAEL,KAAK,mBAAmB,EACzB,MAAM,uCAAuC,CAAA;AAE9C,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;CAC7B;AAED;;;;;;;;;GASG;AACH,wBAAgB,iCAAiC,CAAC,GAAG,EAAE,iBAAiB,GAAG,mBAAmB,EAAE,CAwD/F;AAED;;GAEG;AACH,wBAAgB,6BAA6B,CAAC,GAAG,EAAE,iBAAiB,GAAG,mBAAmB,EAAE,CAyC3F;AAED;;GAEG;AACH,wBAAgB,+BAA+B,CAAC,GAAG,EAAE,iBAAiB,GAAG,mBAAmB,EAAE,CAyC7F;AAED;;GAEG;AACH,wBAAgB,mCAAmC,CAAC,GAAG,EAAE,iBAAiB,GAAG,mBAAmB,EAAE,CAyCjG;AAED;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG;IAC/D,QAAQ,EAAE,MAAM,EAAE,CAAA;IAClB,UAAU,EAAE,MAAM,EAAE,CAAA;IACpB,cAAc,EAAE,MAAM,EAAE,CAAA;IACxB,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAA;CAC1C,CA+DA"}