@flit/cdk-pipeline 1.4.0 → 1.4.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flit/cdk-pipeline",
3
- "version": "1.4.0",
3
+ "version": "1.4.1",
4
4
  "description": "A highly customizable and extensible CI/CD pipeline intended as alternative to CDK's native CodePipeline",
5
5
  "keywords": [
6
6
  "aws",
package/src/pipeline.ts CHANGED
@@ -68,7 +68,7 @@ export class Pipeline extends Stack {
68
68
  throw new Error("First segment must contain only source segments");
69
69
  }
70
70
 
71
- if (segments.find((unit) => unit.filter(isSource).length)) {
71
+ if (segments.slice(1).find((unit) => unit.filter(isSource).length)) {
72
72
  throw new Error("Only the first segment can contain source segments");
73
73
  }
74
74
 
@@ -79,7 +79,7 @@ export class Pipeline extends Stack {
79
79
  throw new Error("Second segment must be the pipeline segment");
80
80
  }
81
81
 
82
- if (segments.find((unit) => unit.filter(isPipeline).length)) {
82
+ if (segments.slice(2).find((unit) => unit.filter(isPipeline).length)) {
83
83
  throw new Error("Only the second segment can be the pipeline segment");
84
84
  }
85
85