@flit/cdk-pipeline 1.4.4 → 2.0.0

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,101 +1,99 @@
1
1
  {
2
- "name": "@flit/cdk-pipeline",
3
- "version": "1.4.4",
4
- "description": "A highly customizable and extensible CI/CD pipeline intended as alternative to CDK's native CodePipeline",
5
- "keywords": [
6
- "aws",
7
- "cdk",
8
- "awscdk",
9
- "aws-cdk",
10
- "pipeline",
11
- "codepipeline",
12
- "cicd"
13
- ],
14
- "homepage": "https://github.com/vierroth/cdk-pipeline",
15
- "bugs": "https://github.com/vierroth/cdk-pipeline/issues",
16
- "repository": {
17
- "type": "git",
18
- "url": "https://github.com/vierroth/cdk-pipeline.git"
19
- },
20
- "license": "Apache-2.0",
21
- "author": {
22
- "name": "Luis Vierroth",
23
- "url": "https://github.com/p-mercury"
24
- },
25
- "main": "./dist/index.js",
26
- "types": "./dist/index.d.ts",
27
- "files": [
28
- "./dist",
29
- "./src",
30
- "./.jsii",
31
- "./LICENSE.txt",
32
- "./README.md"
33
- ],
34
- "workspaces": [
35
- "./example"
36
- ],
37
- "scripts": {
38
- "build": "jsii && (cd example && npm run build)",
39
- "prepack": "jsii"
40
- },
41
- "prettier": {
42
- "plugins": [
43
- "prettier-plugin-packagejson"
44
- ],
45
- "tabWidth": 2,
46
- "overrides": [
47
- {
48
- "files": "*.sublime-project",
49
- "options": {
50
- "parser": "json"
51
- }
52
- }
53
- ]
54
- },
55
- "devDependencies": {
56
- "@types/node": "^22.13.5",
57
- "aws-cdk-lib": "^2.174.0",
58
- "constructs": "^10.4.0",
59
- "jsii": "^5.7.6",
60
- "jsii-pacmak": "^1.108.0",
61
- "prettier": "^3.5.2",
62
- "prettier-plugin-packagejson": "^2.5.8",
63
- "typescript": "^5.7.3"
64
- },
65
- "peerDependencies": {
66
- "aws-cdk-lib": "^2.174.0",
67
- "constructs": "^10.4.0"
68
- },
69
- "publishConfig": {
70
- "access": "public"
71
- },
72
- "jsii": {
73
- "outdir": "./dist",
74
- "tsc": {
75
- "rootDir": "./src",
76
- "outDir": "./dist"
77
- },
78
- "targets": {
79
- "java": {
80
- "package": "flit.cdk-pipeline",
81
- "maven": {
82
- "groupId": "flit",
83
- "artifactId": "cdk-pipeline"
84
- }
85
- },
86
- "dotnet": {
87
- "namespace": "Flit.CDK.Pipeline",
88
- "packageId": "Flit.CDK.Pipeline"
89
- },
90
- "python": {
91
- "libName": "flit.cdk-pipeline",
92
- "module": "flit.cdk-pipeline",
93
- "classifiers": [
94
- "Framework :: AWS CDK",
95
- "Framework :: AWS CDK :: 2"
96
- ]
97
- }
98
- }
99
- },
100
- "stability": "stable"
2
+ "name": "@flit/cdk-pipeline",
3
+ "version": "2.0.0",
4
+ "description": "A highly customizable and extensible CI/CD pipeline intended as alternative to CDK's native CodePipeline",
5
+ "keywords": [
6
+ "aws",
7
+ "cdk",
8
+ "awscdk",
9
+ "aws-cdk",
10
+ "pipeline",
11
+ "codepipeline",
12
+ "cicd"
13
+ ],
14
+ "homepage": "https://github.com/vierroth/cdk-pipeline",
15
+ "bugs": "https://github.com/vierroth/cdk-pipeline/issues",
16
+ "repository": {
17
+ "type": "git",
18
+ "url": "https://github.com/vierroth/cdk-pipeline.git"
19
+ },
20
+ "license": "Apache-2.0",
21
+ "author": {
22
+ "name": "Vierroth GmbH",
23
+ "url": "https://github.com/vierroth"
24
+ },
25
+ "contributors": [
26
+ {
27
+ "name": "Luis Vierroth",
28
+ "url": "https://github.com/p-mercury"
29
+ }
30
+ ],
31
+ "main": "./dist/index.js",
32
+ "types": "./dist/index.d.ts",
33
+ "files": [
34
+ "./dist",
35
+ "./src",
36
+ "./.jsii",
37
+ "./LICENSE.txt",
38
+ "./README.md"
39
+ ],
40
+ "workspaces": [
41
+ "./example"
42
+ ],
43
+ "scripts": {
44
+ "build": "jsii && (cd example && npm run build)",
45
+ "prepack": "jsii"
46
+ },
47
+ "prettier": {
48
+ "plugins": [
49
+ "prettier-plugin-packagejson"
50
+ ],
51
+ "useTabs": true
52
+ },
53
+ "devDependencies": {
54
+ "@types/node": "^24.3.1",
55
+ "aws-cdk-lib": "^2.214.0",
56
+ "constructs": "^10.4.2",
57
+ "jsii": "^5.9.4",
58
+ "jsii-pacmak": "^1.114.1",
59
+ "prettier": "^3.6.2",
60
+ "prettier-plugin-packagejson": "^2.5.19",
61
+ "typescript": "^5.9.2"
62
+ },
63
+ "peerDependencies": {
64
+ "aws-cdk-lib": "^2.210.0",
65
+ "constructs": "^10.4.2"
66
+ },
67
+ "publishConfig": {
68
+ "access": "public"
69
+ },
70
+ "jsii": {
71
+ "outdir": "./dist",
72
+ "tsc": {
73
+ "rootDir": "./src",
74
+ "outDir": "./dist"
75
+ },
76
+ "targets": {
77
+ "java": {
78
+ "package": "flit.cdk-pipeline",
79
+ "maven": {
80
+ "groupId": "flit",
81
+ "artifactId": "cdk-pipeline"
82
+ }
83
+ },
84
+ "dotnet": {
85
+ "namespace": "Flit.CDK.Pipeline",
86
+ "packageId": "Flit.CDK.Pipeline"
87
+ },
88
+ "python": {
89
+ "libName": "flit.cdk-pipeline",
90
+ "module": "flit.cdk-pipeline",
91
+ "classifiers": [
92
+ "Framework :: AWS CDK",
93
+ "Framework :: AWS CDK :: 2"
94
+ ]
95
+ }
96
+ }
97
+ },
98
+ "stability": "stable"
101
99
  }
package/src/artifact.ts CHANGED
@@ -3,22 +3,22 @@ import { Artifact as AwsArtifact } from "aws-cdk-lib/aws-codepipeline";
3
3
  import { Segment } from "./segment";
4
4
 
5
5
  export class Artifact extends AwsArtifact {
6
- private _producer?: Segment;
7
- private _consumers: Segment[] = [];
8
- constructor(artifactName?: string) {
9
- super(artifactName);
10
- }
11
- produce(producer: Segment) {
12
- if (this._producer) throw new Error("Artifact is already produced");
13
- this._producer = producer;
14
- }
15
- consume(producer: Segment) {
16
- this.consumers.push(producer);
17
- }
18
- get producer(): Segment | undefined {
19
- return this._producer;
20
- }
21
- get consumers(): Segment[] {
22
- return this._consumers;
23
- }
6
+ private _producer?: Segment;
7
+ private _consumers: Segment[] = [];
8
+ constructor(artifactName?: string) {
9
+ super(artifactName);
10
+ }
11
+ produce(producer: Segment) {
12
+ if (this._producer) throw new Error("Artifact is already produced");
13
+ this._producer = producer;
14
+ }
15
+ consume(producer: Segment) {
16
+ this.consumers.push(producer);
17
+ }
18
+ get producer(): Segment | undefined {
19
+ return this._producer;
20
+ }
21
+ get consumers(): Segment[] {
22
+ return this._consumers;
23
+ }
24
24
  }
@@ -1,7 +1,7 @@
1
1
  import { IAction } from "aws-cdk-lib/aws-codepipeline";
2
2
  import {
3
- CodeCommitSourceAction,
4
- CodeCommitTrigger,
3
+ CodeCommitSourceAction,
4
+ CodeCommitTrigger,
5
5
  } from "aws-cdk-lib/aws-codepipeline-actions";
6
6
  import { IRepository } from "aws-cdk-lib/aws-codecommit";
7
7
 
@@ -11,50 +11,50 @@ import { SegmentConstructed } from "./segment";
11
11
  import { SourceSegment, SourceSegmentProps } from "./source-segment";
12
12
 
13
13
  export interface CodeCommitSourceSegmentProps extends SourceSegmentProps {
14
- readonly repository: IRepository;
15
- readonly branch?: string;
16
- readonly trigger?: CodeCommitTrigger;
17
- readonly variablesNamespace?: string;
14
+ readonly repository: IRepository;
15
+ readonly branch?: string;
16
+ readonly trigger?: CodeCommitTrigger;
17
+ readonly variablesNamespace?: string;
18
18
  }
19
19
 
20
20
  /**
21
21
  * @category Segments
22
22
  */
23
23
  export class CodeCommitSourceSegment extends SourceSegment {
24
- private props: CodeCommitSourceSegmentProps;
25
- constructor(props: CodeCommitSourceSegmentProps) {
26
- super(props);
27
- this.props = props;
28
- }
29
- construct(scope: Pipeline): SegmentConstructed {
30
- const name = `${this.props.repository}-${this.props.branch || "master"}`;
24
+ private props: CodeCommitSourceSegmentProps;
25
+ constructor(props: CodeCommitSourceSegmentProps) {
26
+ super(props);
27
+ this.props = props;
28
+ }
29
+ construct(scope: Pipeline): SegmentConstructed {
30
+ const name = `${this.props.repository}-${this.props.branch || "master"}`;
31
31
 
32
- return new CodeCommitSourceSegmentConstructed(scope, name, {
33
- ...this.props,
34
- actionName: name,
35
- });
36
- }
32
+ return new CodeCommitSourceSegmentConstructed(scope, name, {
33
+ ...this.props,
34
+ actionName: name,
35
+ });
36
+ }
37
37
  }
38
38
 
39
39
  export interface CodeCommitSourceSegmentConstructedProps {
40
- readonly output: Artifact;
41
- readonly actionName: string;
42
- readonly repository: IRepository;
43
- readonly branch?: string;
44
- readonly trigger?: CodeCommitTrigger;
45
- readonly variablesNamespace?: string;
40
+ readonly output: Artifact;
41
+ readonly actionName: string;
42
+ readonly repository: IRepository;
43
+ readonly branch?: string;
44
+ readonly trigger?: CodeCommitTrigger;
45
+ readonly variablesNamespace?: string;
46
46
  }
47
47
 
48
48
  export class CodeCommitSourceSegmentConstructed extends SegmentConstructed {
49
- readonly name: string;
50
- readonly actions: IAction[];
51
- constructor(
52
- scope: Pipeline,
53
- id: string,
54
- props: CodeCommitSourceSegmentConstructedProps,
55
- ) {
56
- super(scope, id);
57
- this.name = "Source";
58
- this.actions = [new CodeCommitSourceAction(props)];
59
- }
49
+ readonly name: string;
50
+ readonly actions: IAction[];
51
+ constructor(
52
+ scope: Pipeline,
53
+ id: string,
54
+ props: CodeCommitSourceSegmentConstructedProps,
55
+ ) {
56
+ super(scope, id);
57
+ this.name = "Source";
58
+ this.actions = [new CodeCommitSourceAction(props)];
59
+ }
60
60
  }
@@ -7,76 +7,76 @@ import { SegmentConstructed } from "./segment";
7
7
  import { SourceSegment, SourceSegmentProps } from "./source-segment";
8
8
 
9
9
  export interface CodeStarSourceSegmentProps extends SourceSegmentProps {
10
- /**
11
- * The owning user or organization of the repository.
12
- * @example "aws"
13
- */
14
- readonly owner: string;
15
- /**
16
- * The ARN of the CodeStar Connection created in the AWS console
17
- * that has permissions to access this GitHub or BitBucket repository.
18
- * @example `"arn:aws:codestar-connections:us-east-1:123456789012:connection/12345678-abcd-12ab-34cdef5678gh"`
19
- * @see https://docs.aws.amazon.com/codepipeline/latest/userguide/connections-create.html
20
- */
21
- readonly connectionArn: string;
22
- /**
23
- * The name of the repository.
24
- * @example "aws-cdk"
25
- */
26
- readonly repository: string;
27
- /**
28
- * The branch to build.
29
- * @default "master"
30
- */
31
- readonly branch?: string;
32
- readonly triggerOnPush?: boolean;
33
- readonly variablesNamespace?: string;
10
+ /**
11
+ * The owning user or organization of the repository.
12
+ * @example "aws"
13
+ */
14
+ readonly owner: string;
15
+ /**
16
+ * The ARN of the CodeStar Connection created in the AWS console
17
+ * that has permissions to access this GitHub or BitBucket repository.
18
+ * @example `"arn:aws:codestar-connections:us-east-1:123456789012:connection/12345678-abcd-12ab-34cdef5678gh"`
19
+ * @see https://docs.aws.amazon.com/codepipeline/latest/userguide/connections-create.html
20
+ */
21
+ readonly connectionArn: string;
22
+ /**
23
+ * The name of the repository.
24
+ * @example "aws-cdk"
25
+ */
26
+ readonly repository: string;
27
+ /**
28
+ * The branch to build.
29
+ * @default "master"
30
+ */
31
+ readonly branch?: string;
32
+ readonly triggerOnPush?: boolean;
33
+ readonly variablesNamespace?: string;
34
34
  }
35
35
 
36
36
  /**
37
37
  * @category Segments
38
38
  */
39
39
  export class CodeStarSourceSegment extends SourceSegment {
40
- private props: CodeStarSourceSegmentProps;
41
- constructor(props: CodeStarSourceSegmentProps) {
42
- super(props);
43
- this.props = props;
44
- }
45
- construct(scope: Pipeline): SegmentConstructed {
46
- const name = `${this.props.owner}-${this.props.repository}-${
47
- this.props.branch || "master"
48
- }`;
40
+ private props: CodeStarSourceSegmentProps;
41
+ constructor(props: CodeStarSourceSegmentProps) {
42
+ super(props);
43
+ this.props = props;
44
+ }
45
+ construct(scope: Pipeline): SegmentConstructed {
46
+ const name = `${this.props.owner}-${this.props.repository}-${
47
+ this.props.branch || "master"
48
+ }`;
49
49
 
50
- return new CodeStarSourceSegmentConstructed(scope, name, {
51
- ...this.props,
52
- actionName: name,
53
- repo: this.props.repository,
54
- });
55
- }
50
+ return new CodeStarSourceSegmentConstructed(scope, name, {
51
+ ...this.props,
52
+ actionName: name,
53
+ repo: this.props.repository,
54
+ });
55
+ }
56
56
  }
57
57
 
58
58
  export interface CodeStarSourceSegmentConstructedProps {
59
- readonly output: Artifact;
60
- readonly actionName: string;
61
- readonly connectionArn: string;
62
- readonly owner: string;
63
- readonly repo: string;
64
- readonly branch?: string;
65
- readonly runOrder?: number;
66
- readonly triggerOnPush?: boolean;
67
- readonly variablesNamespace?: string;
59
+ readonly output: Artifact;
60
+ readonly actionName: string;
61
+ readonly connectionArn: string;
62
+ readonly owner: string;
63
+ readonly repo: string;
64
+ readonly branch?: string;
65
+ readonly runOrder?: number;
66
+ readonly triggerOnPush?: boolean;
67
+ readonly variablesNamespace?: string;
68
68
  }
69
69
 
70
70
  export class CodeStarSourceSegmentConstructed extends SegmentConstructed {
71
- readonly name: string;
72
- readonly actions: IAction[];
73
- constructor(
74
- scope: Pipeline,
75
- id: string,
76
- props: CodeStarSourceSegmentConstructedProps,
77
- ) {
78
- super(scope, id);
79
- this.name = "Source";
80
- this.actions = [new CodeStarConnectionsSourceAction(props)];
81
- }
71
+ readonly name: string;
72
+ readonly actions: IAction[];
73
+ constructor(
74
+ scope: Pipeline,
75
+ id: string,
76
+ props: CodeStarSourceSegmentConstructedProps,
77
+ ) {
78
+ super(scope, id);
79
+ this.name = "Source";
80
+ this.actions = [new CodeStarConnectionsSourceAction(props)];
81
+ }
82
82
  }
@@ -1,7 +1,7 @@
1
1
  import { IAction } from "aws-cdk-lib/aws-codepipeline";
2
2
  import {
3
- GitHubSourceAction,
4
- GitHubTrigger,
3
+ GitHubSourceAction,
4
+ GitHubTrigger,
5
5
  } from "aws-cdk-lib/aws-codepipeline-actions";
6
6
  import { SecretValue } from "aws-cdk-lib";
7
7
 
@@ -11,70 +11,70 @@ import { SegmentConstructed } from "./segment";
11
11
  import { SourceSegment, SourceSegmentProps } from "./source-segment";
12
12
 
13
13
  export interface GitHubSourceSegmentProps extends SourceSegmentProps {
14
- readonly oauthToken: SecretValue;
15
- /**
16
- * The owning user or organization of the repository.
17
- * @example "aws"
18
- */
19
- readonly owner: string;
20
- /**
21
- * The name of the repository.
22
- * @example "aws-cdk"
23
- */
24
- readonly repository: string;
25
- /**
26
- * The branch to build.
27
- * @default "master"
28
- */
29
- readonly branch?: string;
30
- readonly trigger?: GitHubTrigger;
31
- readonly variablesNamespace?: string;
14
+ readonly oauthToken: SecretValue;
15
+ /**
16
+ * The owning user or organization of the repository.
17
+ * @example "aws"
18
+ */
19
+ readonly owner: string;
20
+ /**
21
+ * The name of the repository.
22
+ * @example "aws-cdk"
23
+ */
24
+ readonly repository: string;
25
+ /**
26
+ * The branch to build.
27
+ * @default "master"
28
+ */
29
+ readonly branch?: string;
30
+ readonly trigger?: GitHubTrigger;
31
+ readonly variablesNamespace?: string;
32
32
  }
33
33
 
34
34
  /**
35
35
  * @category Segments
36
36
  */
37
37
  export class GitHubSourceSegment extends SourceSegment {
38
- private props: GitHubSourceSegmentProps;
39
- constructor(props: GitHubSourceSegmentProps) {
40
- super(props);
41
- this.props = props;
42
- }
43
- construct(scope: Pipeline): SegmentConstructed {
44
- const name = `${this.props.owner}-${this.props.repository}-${
45
- this.props.branch || "master"
46
- }`;
38
+ private props: GitHubSourceSegmentProps;
39
+ constructor(props: GitHubSourceSegmentProps) {
40
+ super(props);
41
+ this.props = props;
42
+ }
43
+ construct(scope: Pipeline): SegmentConstructed {
44
+ const name = `${this.props.owner}-${this.props.repository}-${
45
+ this.props.branch || "master"
46
+ }`;
47
47
 
48
- return new GitHubSourceSegmentConstructed(scope, name, {
49
- ...this.props,
50
- actionName: name,
51
- repo: this.props.repository,
52
- });
53
- }
48
+ return new GitHubSourceSegmentConstructed(scope, name, {
49
+ ...this.props,
50
+ actionName: name,
51
+ repo: this.props.repository,
52
+ });
53
+ }
54
54
  }
55
55
 
56
56
  export interface GitHubSourceSegmentConstructedProps {
57
- readonly output: Artifact;
58
- readonly actionName: string;
59
- readonly oauthToken: SecretValue;
60
- readonly owner: string;
61
- readonly repo: string;
62
- readonly branch?: string;
63
- readonly runOrder?: number;
64
- readonly trigger?: GitHubTrigger;
65
- readonly variablesNamespace?: string;
57
+ readonly output: Artifact;
58
+ readonly actionName: string;
59
+ readonly oauthToken: SecretValue;
60
+ readonly owner: string;
61
+ readonly repo: string;
62
+ readonly branch?: string;
63
+ readonly runOrder?: number;
64
+ readonly trigger?: GitHubTrigger;
65
+ readonly variablesNamespace?: string;
66
66
  }
67
67
 
68
68
  export class GitHubSourceSegmentConstructed extends SegmentConstructed {
69
- readonly name: string;
70
- readonly actions: IAction[];
71
- constructor(
72
- scope: Pipeline,
73
- id: string,
74
- props: GitHubSourceSegmentConstructedProps,
75
- ) {
76
- super(scope, id);
77
- this.name = "Source";
78
- this.actions = [new GitHubSourceAction(props)];
79
- }
69
+ readonly name: string;
70
+ readonly actions: IAction[];
71
+ constructor(
72
+ scope: Pipeline,
73
+ id: string,
74
+ props: GitHubSourceSegmentConstructedProps,
75
+ ) {
76
+ super(scope, id);
77
+ this.name = "Source";
78
+ this.actions = [new GitHubSourceAction(props)];
79
+ }
80
80
  }