pipecraft 0.43.2 → 0.43.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/templates/workflows/enforce-pr-target.yml.tpl.d.ts.map +1 -1
- package/dist/templates/workflows/enforce-pr-target.yml.tpl.js +4 -2
- package/dist/templates/workflows/enforce-pr-target.yml.tpl.js.map +1 -1
- package/dist/templates/workflows/pr-title-check.yml.tpl.d.ts.map +1 -1
- package/dist/templates/workflows/pr-title-check.yml.tpl.js +3 -1
- package/dist/templates/workflows/pr-title-check.yml.tpl.js.map +1 -1
- package/dist/templates/workflows/shared/fully-managed-header.d.ts +21 -0
- package/dist/templates/workflows/shared/fully-managed-header.d.ts.map +1 -0
- package/dist/templates/workflows/shared/fully-managed-header.js +37 -0
- package/dist/templates/workflows/shared/fully-managed-header.js.map +1 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enforce-pr-target.yml.tpl.d.ts","sourceRoot":"","sources":["../../../src/templates/workflows/enforce-pr-target.yml.tpl.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,EAAE,KAAK,aAAa,EAA0B,MAAM,uBAAuB,CAAA;
|
|
1
|
+
{"version":3,"file":"enforce-pr-target.yml.tpl.d.ts","sourceRoot":"","sources":["../../../src/templates/workflows/enforce-pr-target.yml.tpl.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,EAAE,KAAK,aAAa,EAA0B,MAAM,uBAAuB,CAAA;AAMlF;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,4CAA4C,CAAA;AAE/E;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,QAAQ,GAAI,KAAK,aAAa,iBAgFxC,CAAA"}
|
|
@@ -27,6 +27,8 @@
|
|
|
27
27
|
* ```
|
|
28
28
|
*/
|
|
29
29
|
import { renderTemplate, toFile } from '@featherscloud/pinion';
|
|
30
|
+
import { fullyManagedHeader } from './shared/fully-managed-header.js';
|
|
31
|
+
const ENFORCE_HEADER = fullyManagedHeader(['initialBranch', 'finalBranch']);
|
|
30
32
|
/**
|
|
31
33
|
* Repo-relative path this template writes to.
|
|
32
34
|
*
|
|
@@ -67,7 +69,7 @@ export const generate = (ctx) => Promise.resolve(ctx).then(renderTemplate((ctx)
|
|
|
67
69
|
// rule requiring the `check-pr-target` status keeps getting a result — deleting the
|
|
68
70
|
// workflow would leave that check permanently unreported and block every PR.
|
|
69
71
|
if (initialBranch === finalBranch) {
|
|
70
|
-
return
|
|
72
|
+
return `${ENFORCE_HEADER}name: Enforce PR Target Branch
|
|
71
73
|
|
|
72
74
|
on:
|
|
73
75
|
pull_request:
|
|
@@ -86,7 +88,7 @@ jobs:
|
|
|
86
88
|
echo "Single-branch flow: '${initialBranch}' is the only branch in the flow."
|
|
87
89
|
`;
|
|
88
90
|
}
|
|
89
|
-
return
|
|
91
|
+
return `${ENFORCE_HEADER}name: Enforce PR Target Branch
|
|
90
92
|
|
|
91
93
|
on:
|
|
92
94
|
pull_request:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enforce-pr-target.yml.tpl.js","sourceRoot":"","sources":["../../../src/templates/workflows/enforce-pr-target.yml.tpl.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,EAAsB,cAAc,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAA;AAElF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,yCAAyC,CAAA;AAE/E;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,GAAkB,EAAE,EAAE,CAC7C,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,IAAI,CACvB,cAAc,CACZ,CAAC,GAAQ,EAAE,EAAE;IACX,MAAM,EAAE,aAAa,GAAG,SAAS,EAAE,WAAW,GAAG,MAAM,EAAE,GAAG,GAAG,CAAA;IAE/D,qFAAqF;IACrF,qFAAqF;IACrF,kEAAkE;IAClE,EAAE;IACF,sFAAsF;IACtF,sFAAsF;IACtF,oFAAoF;IACpF,6EAA6E;IAC7E,IAAI,aAAa,KAAK,WAAW,EAAE,CAAC;QAClC,OAAO;;;;;
|
|
1
|
+
{"version":3,"file":"enforce-pr-target.yml.tpl.js","sourceRoot":"","sources":["../../../src/templates/workflows/enforce-pr-target.yml.tpl.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,EAAsB,cAAc,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAA;AAElF,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAA;AAErE,MAAM,cAAc,GAAG,kBAAkB,CAAC,CAAC,eAAe,EAAE,aAAa,CAAC,CAAC,CAAA;AAE3E;;;;;GAKG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,yCAAyC,CAAA;AAE/E;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,GAAkB,EAAE,EAAE,CAC7C,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,IAAI,CACvB,cAAc,CACZ,CAAC,GAAQ,EAAE,EAAE;IACX,MAAM,EAAE,aAAa,GAAG,SAAS,EAAE,WAAW,GAAG,MAAM,EAAE,GAAG,GAAG,CAAA;IAE/D,qFAAqF;IACrF,qFAAqF;IACrF,kEAAkE;IAClE,EAAE;IACF,sFAAsF;IACtF,sFAAsF;IACtF,oFAAoF;IACpF,6EAA6E;IAC7E,IAAI,aAAa,KAAK,WAAW,EAAE,CAAC;QAClC,OAAO,GAAG,cAAc;;;;;6BAKL,WAAW;;UAE9B,WAAW;;;;;;;;0CAQqB,aAAa;uCAChB,aAAa;CACnD,CAAA;IACO,CAAC;IAED,OAAO,GAAG,cAAc;;;;;;;;;;UAUtB,WAAW;;;;;;;;;;kCAUa,WAAW;;sDAES,aAAa,kBAAkB,WAAW;6DACnC,aAAa;;;;;8CAK5B,WAAW,SAAS,aAAa;;;;kCAI7C,aAAa;;0CAEL,aAAa;CACtD,CAAA;AACK,CAAC,EACD,MAAM,CAAC,sBAAsB,CAAC;AAC9B,oFAAoF;AACpF,gFAAgF;AAChF,oFAAoF;AACpF,+EAA+E;AAC/E,sCAAsC;AACtC,EAAE,KAAK,EAAE,IAAI,EAAE,CAChB,CACF,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pr-title-check.yml.tpl.d.ts","sourceRoot":"","sources":["../../../src/templates/workflows/pr-title-check.yml.tpl.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,EAAE,KAAK,aAAa,EAA0B,MAAM,uBAAuB,CAAA;
|
|
1
|
+
{"version":3,"file":"pr-title-check.yml.tpl.d.ts","sourceRoot":"","sources":["../../../src/templates/workflows/pr-title-check.yml.tpl.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,EAAE,KAAK,aAAa,EAA0B,MAAM,uBAAuB,CAAA;AAMlF;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,QAAQ,GAAI,KAAK,aAAa,iBA2KvC,CAAA"}
|
|
@@ -26,6 +26,8 @@
|
|
|
26
26
|
* ```
|
|
27
27
|
*/
|
|
28
28
|
import { renderTemplate, toFile } from '@featherscloud/pinion';
|
|
29
|
+
import { fullyManagedHeader } from './shared/fully-managed-header.js';
|
|
30
|
+
const TITLE_CHECK_HEADER = fullyManagedHeader(['initialBranch', 'semver.bumpRules']);
|
|
29
31
|
/**
|
|
30
32
|
* Generates the pr-title-check.yml workflow file.
|
|
31
33
|
*
|
|
@@ -81,7 +83,7 @@ export const generate = (ctx) => Promise.resolve(ctx).then(ctx => {
|
|
|
81
83
|
build
|
|
82
84
|
revert
|
|
83
85
|
major`;
|
|
84
|
-
return
|
|
86
|
+
return `${TITLE_CHECK_HEADER}name: "PR Title Format Check"
|
|
85
87
|
|
|
86
88
|
on:
|
|
87
89
|
pull_request:
|
|
@@ -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,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,CACnB,CAAC,GAAQ,EAAE,EAAE;QACX,qFAAqF;QACrF,+EAA+E;QAC/E,MAAM,aAAa,GAAG,GAAG,CAAC,aAAa,IAAI,GAAG,CAAC,MAAM,EAAE,aAAa,IAAI,SAAS,CAAA;QACjF,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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Ea,CAAA;IACjB,CAAC,EACD,MAAM,CAAC,sCAAsC,CAAC;IAC9C,uFAAuF;IACvF,qFAAqF;IACrF,kFAAkF;IAClF,EAAE,KAAK,EAAE,IAAI,EAAE,CAChB,CAAC,GAAG,CAAC,CAAA;AACR,CAAC,CAAC,CAAA"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Header for workflows Pipecraft renders whole from config.
|
|
3
|
+
*
|
|
4
|
+
* `pipeline.yml` announces itself as managed and lists what it preserves, so a reader
|
|
5
|
+
* reasonably takes an unlabelled workflow to be theirs. `enforce-pr-target.yml` and
|
|
6
|
+
* `pr-title-check.yml` carried no such notice while Pinion was skipping them on
|
|
7
|
+
* regeneration, which made hand-editing look safe. They are rewritten on every generate
|
|
8
|
+
* as of v0.43.2, so the file has to say so.
|
|
9
|
+
*
|
|
10
|
+
* Unlike pipeline.yml there are no preserved regions here: the whole file is replaced.
|
|
11
|
+
*
|
|
12
|
+
* @module templates/workflows/shared/fully-managed-header
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* Build the comment block that opens a fully-generated workflow.
|
|
16
|
+
*
|
|
17
|
+
* @param derivedFrom - Config keys this workflow's content comes from, for the reader who
|
|
18
|
+
* wants to know which knob to turn instead of editing the file.
|
|
19
|
+
*/
|
|
20
|
+
export declare function fullyManagedHeader(derivedFrom: string[]): string;
|
|
21
|
+
//# sourceMappingURL=fully-managed-header.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fully-managed-header.d.ts","sourceRoot":"","sources":["../../../../src/templates/workflows/shared/fully-managed-header.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,WAAW,EAAE,MAAM,EAAE,GAAG,MAAM,CAiBhE"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Header for workflows Pipecraft renders whole from config.
|
|
3
|
+
*
|
|
4
|
+
* `pipeline.yml` announces itself as managed and lists what it preserves, so a reader
|
|
5
|
+
* reasonably takes an unlabelled workflow to be theirs. `enforce-pr-target.yml` and
|
|
6
|
+
* `pr-title-check.yml` carried no such notice while Pinion was skipping them on
|
|
7
|
+
* regeneration, which made hand-editing look safe. They are rewritten on every generate
|
|
8
|
+
* as of v0.43.2, so the file has to say so.
|
|
9
|
+
*
|
|
10
|
+
* Unlike pipeline.yml there are no preserved regions here: the whole file is replaced.
|
|
11
|
+
*
|
|
12
|
+
* @module templates/workflows/shared/fully-managed-header
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* Build the comment block that opens a fully-generated workflow.
|
|
16
|
+
*
|
|
17
|
+
* @param derivedFrom - Config keys this workflow's content comes from, for the reader who
|
|
18
|
+
* wants to know which knob to turn instead of editing the file.
|
|
19
|
+
*/
|
|
20
|
+
export function fullyManagedHeader(derivedFrom) {
|
|
21
|
+
const sources = derivedFrom.map(key => `# - ${key}`).join('\n');
|
|
22
|
+
return `#=============================================================================
|
|
23
|
+
# PIPECRAFT MANAGED WORKFLOW
|
|
24
|
+
#=============================================================================
|
|
25
|
+
#
|
|
26
|
+
# 🔒 THIS ENTIRE FILE IS GENERATED. Edits are overwritten on the next
|
|
27
|
+
# 'pipecraft generate'. Unlike pipeline.yml, nothing here is preserved.
|
|
28
|
+
#
|
|
29
|
+
# ⚙️ Generated from your .pipecraftrc:
|
|
30
|
+
${sources}
|
|
31
|
+
#
|
|
32
|
+
# ✏️ To change this workflow, change the config above and regenerate. To add
|
|
33
|
+
# checks of your own, put them in a separate workflow file.
|
|
34
|
+
#=============================================================================
|
|
35
|
+
`;
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=fully-managed-header.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fully-managed-header.js","sourceRoot":"","sources":["../../../../src/templates/workflows/shared/fully-managed-header.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH;;;;;GAKG;AACH,MAAM,UAAU,kBAAkB,CAAC,WAAqB;IACtD,MAAM,OAAO,GAAG,WAAW,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,SAAS,GAAG,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IAEjE,OAAO;;;;;;;;EAQP,OAAO;;;;;CAKR,CAAA;AACD,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pipecraft",
|
|
3
|
-
"version": "0.43.
|
|
3
|
+
"version": "0.43.4",
|
|
4
4
|
"description": "Automated CI/CD pipeline generator for trunk-based development. Generates intelligent GitHub Actions workflows with domain-based change detection, semantic versioning, and branch flow management. Full documentation: https://pipecraft.thecraftlab.dev",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|