@gammarers/aws-codesuite-state-change-detection-event-rules 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/.jsii +3560 -0
- package/API.md +468 -0
- package/LICENSE +202 -0
- package/README.md +57 -0
- package/lib/codepipeline-execution-state-change-detection-event-rule.d.ts +13 -0
- package/lib/codepipeline-execution-state-change-detection-event-rule.js +27 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +18 -0
- package/package.json +135 -0
package/README.md
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# AWS CodeSuite State Change Detection Event Rule
|
|
2
|
+
|
|
3
|
+
[](https://github.com/gammarers/aws-codesuite-state-change-detection-event-rules/blob/main/LICENSE)
|
|
4
|
+
[](https://www.npmjs.com/package/@gammarers/aws-codesuite-state-change-detection-event-rules)
|
|
5
|
+
[](https://github.com/gammarers/aws-codesuite-state-change-detection-event-rules/actions/workflows/release.yml)
|
|
6
|
+
[](https://github.com/gammarers/aws-codesuite-state-change-detection-event-rules/releases)
|
|
7
|
+
|
|
8
|
+
[](https://constructs.dev/packages/@gammarers/aws-codesuite-state-change-detection-event-rules)
|
|
9
|
+
|
|
10
|
+
This an AWS CodePipeline execution state change detection event rule
|
|
11
|
+
|
|
12
|
+
## Install
|
|
13
|
+
|
|
14
|
+
### TypeScript
|
|
15
|
+
|
|
16
|
+
#### install by npm
|
|
17
|
+
|
|
18
|
+
```shell
|
|
19
|
+
npm install @gammarers/aws-codesuite-state-change-detection-event-rules
|
|
20
|
+
```
|
|
21
|
+
#### install by yarn
|
|
22
|
+
|
|
23
|
+
```shell
|
|
24
|
+
yarn add @gammarers/aws-codesuite-state-change-detection-event-rules
|
|
25
|
+
```
|
|
26
|
+
#### install by pnpm
|
|
27
|
+
|
|
28
|
+
```shell
|
|
29
|
+
pnpm add @gammarers/aws-codesuite-state-change-detection-event-rules
|
|
30
|
+
```
|
|
31
|
+
#### install by bun
|
|
32
|
+
|
|
33
|
+
```shell
|
|
34
|
+
bun add @gammarers/aws-codesuite-state-change-detection-event-rules
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Example
|
|
38
|
+
|
|
39
|
+
```typescript
|
|
40
|
+
import { CodePipelineExecutionStateChangeDetectionEventRule } from '@gammarers/aws-codesuite-state-change-detection-event-rules';
|
|
41
|
+
|
|
42
|
+
const fn = new lambda.Function(this, 'MyFunc', {
|
|
43
|
+
runtime: lambda.Runtime.NODEJS_LATEST,
|
|
44
|
+
handler: 'index.handler',
|
|
45
|
+
code: lambda.Code.fromInline(`exports.handler = handler.toString()`),
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
const rule = new CodePipelineExecutionStateChangeDetectionEventRule(stack, 'CodePipelineStateChangeDetectionEventRule', {
|
|
49
|
+
ruleName: 'example-codepipeline-state-change-detection-event-rules',
|
|
50
|
+
targets: new targets.LambdaFunction(fn),
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## License
|
|
56
|
+
|
|
57
|
+
This project is licensed under the Apache-2.0 License.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as events from 'aws-cdk-lib/aws-events';
|
|
2
|
+
import { Construct } from 'constructs';
|
|
3
|
+
/**
|
|
4
|
+
* @TODO: Not yet supported Omit
|
|
5
|
+
* https://github.com/aws/jsii/issues/4468
|
|
6
|
+
* type omitKeys = 'eventPattern';
|
|
7
|
+
* export interface CodePipelineStateChangeDetectionEventRuleProps extends Omit<events.RuleProps, 'eventPattern'> {}
|
|
8
|
+
*/
|
|
9
|
+
export interface CodePipelineExecutionStateChangeDetectionEventRuleProps extends events.RuleProps {
|
|
10
|
+
}
|
|
11
|
+
export declare class CodePipelineExecutionStateChangeDetectionEventRule extends events.Rule {
|
|
12
|
+
constructor(scope: Construct, id: string, props: CodePipelineExecutionStateChangeDetectionEventRuleProps);
|
|
13
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var _a;
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.CodePipelineExecutionStateChangeDetectionEventRule = void 0;
|
|
5
|
+
const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti");
|
|
6
|
+
const aws_cdk_errors_1 = require("@gammarers/aws-cdk-errors");
|
|
7
|
+
const events = require("aws-cdk-lib/aws-events");
|
|
8
|
+
class CodePipelineExecutionStateChangeDetectionEventRule extends events.Rule {
|
|
9
|
+
constructor(scope, id, props) {
|
|
10
|
+
super(scope, id, {
|
|
11
|
+
...props,
|
|
12
|
+
eventPattern: (() => {
|
|
13
|
+
if (props.eventPattern) {
|
|
14
|
+
throw new aws_cdk_errors_1.InvalidInternalDefinitionParameterError('eventPattern');
|
|
15
|
+
}
|
|
16
|
+
return {
|
|
17
|
+
source: ['aws.codepipeline'],
|
|
18
|
+
detailType: ['CodePipeline Pipeline Execution State Change'],
|
|
19
|
+
};
|
|
20
|
+
})(),
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
exports.CodePipelineExecutionStateChangeDetectionEventRule = CodePipelineExecutionStateChangeDetectionEventRule;
|
|
25
|
+
_a = JSII_RTTI_SYMBOL_1;
|
|
26
|
+
CodePipelineExecutionStateChangeDetectionEventRule[_a] = { fqn: "@gammarers/aws-codesuite-state-change-detection-event-rules.CodePipelineExecutionStateChangeDetectionEventRule", version: "2.0.0" };
|
|
27
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29kZXBpcGVsaW5lLWV4ZWN1dGlvbi1zdGF0ZS1jaGFuZ2UtZGV0ZWN0aW9uLWV2ZW50LXJ1bGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvY29kZXBpcGVsaW5lLWV4ZWN1dGlvbi1zdGF0ZS1jaGFuZ2UtZGV0ZWN0aW9uLWV2ZW50LXJ1bGUudH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ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './codepipeline-execution-state-change-detection-event-rule';
|
package/lib/index.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./codepipeline-execution-state-change-detection-event-rule"), exports);
|
|
18
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7OztBQUFBLDZGQUEyRSIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGZyb20gJy4vY29kZXBpcGVsaW5lLWV4ZWN1dGlvbi1zdGF0ZS1jaGFuZ2UtZGV0ZWN0aW9uLWV2ZW50LXJ1bGUnOyJdfQ==
|
package/package.json
ADDED
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@gammarers/aws-codesuite-state-change-detection-event-rules",
|
|
3
|
+
"description": "This is an AWS CodePipeline execution state change detection event catch rule.",
|
|
4
|
+
"repository": {
|
|
5
|
+
"type": "git",
|
|
6
|
+
"url": "https://github.com/gammarers/aws-codesuite-state-change-detection-event-rules.git"
|
|
7
|
+
},
|
|
8
|
+
"scripts": {
|
|
9
|
+
"build": "npx projen build",
|
|
10
|
+
"bump": "npx projen bump",
|
|
11
|
+
"clobber": "npx projen clobber",
|
|
12
|
+
"compat": "npx projen compat",
|
|
13
|
+
"compile": "npx projen compile",
|
|
14
|
+
"default": "npx projen default",
|
|
15
|
+
"docgen": "npx projen docgen",
|
|
16
|
+
"eject": "npx projen eject",
|
|
17
|
+
"eslint": "npx projen eslint",
|
|
18
|
+
"package": "npx projen package",
|
|
19
|
+
"package-all": "npx projen package-all",
|
|
20
|
+
"package:js": "npx projen package:js",
|
|
21
|
+
"post-compile": "npx projen post-compile",
|
|
22
|
+
"post-upgrade": "npx projen post-upgrade",
|
|
23
|
+
"pre-compile": "npx projen pre-compile",
|
|
24
|
+
"release": "npx projen release",
|
|
25
|
+
"test": "npx projen test",
|
|
26
|
+
"test:watch": "npx projen test:watch",
|
|
27
|
+
"unbump": "npx projen unbump",
|
|
28
|
+
"upgrade": "npx projen upgrade",
|
|
29
|
+
"watch": "npx projen watch",
|
|
30
|
+
"projen": "npx projen"
|
|
31
|
+
},
|
|
32
|
+
"author": {
|
|
33
|
+
"name": "yicr",
|
|
34
|
+
"email": "yicr@users.noreply.github.com",
|
|
35
|
+
"organization": true
|
|
36
|
+
},
|
|
37
|
+
"devDependencies": {
|
|
38
|
+
"@types/jest": "^29.5.13",
|
|
39
|
+
"@types/node": "^18",
|
|
40
|
+
"@typescript-eslint/eslint-plugin": "^7",
|
|
41
|
+
"@typescript-eslint/parser": "^7",
|
|
42
|
+
"aws-cdk-lib": "2.80.0",
|
|
43
|
+
"commit-and-tag-version": "^12",
|
|
44
|
+
"constructs": "10.0.5",
|
|
45
|
+
"eslint": "^8",
|
|
46
|
+
"eslint-import-resolver-typescript": "^3.6.3",
|
|
47
|
+
"eslint-plugin-import": "^2.30.0",
|
|
48
|
+
"jest": "^29.7.0",
|
|
49
|
+
"jest-junit": "^15",
|
|
50
|
+
"jsii": "5.5.x",
|
|
51
|
+
"jsii-diff": "^1.103.1",
|
|
52
|
+
"jsii-docgen": "^10.5.0",
|
|
53
|
+
"jsii-pacmak": "^1.103.1",
|
|
54
|
+
"jsii-rosetta": "5.5.x",
|
|
55
|
+
"projen": "^0.88.0",
|
|
56
|
+
"ts-jest": "^29.2.5",
|
|
57
|
+
"ts-node": "^10.9.2",
|
|
58
|
+
"typescript": "5.5.x"
|
|
59
|
+
},
|
|
60
|
+
"peerDependencies": {
|
|
61
|
+
"aws-cdk-lib": "^2.80.0",
|
|
62
|
+
"constructs": "^10.0.5"
|
|
63
|
+
},
|
|
64
|
+
"dependencies": {
|
|
65
|
+
"@gammarers/aws-cdk-errors": "^0.2.0"
|
|
66
|
+
},
|
|
67
|
+
"keywords": [
|
|
68
|
+
"cdk"
|
|
69
|
+
],
|
|
70
|
+
"engines": {
|
|
71
|
+
"node": ">= 18.0.0"
|
|
72
|
+
},
|
|
73
|
+
"main": "lib/index.js",
|
|
74
|
+
"license": "Apache-2.0",
|
|
75
|
+
"publishConfig": {
|
|
76
|
+
"access": "public"
|
|
77
|
+
},
|
|
78
|
+
"version": "2.0.0",
|
|
79
|
+
"jest": {
|
|
80
|
+
"coverageProvider": "v8",
|
|
81
|
+
"testMatch": [
|
|
82
|
+
"<rootDir>/@(src|test)/**/*(*.)@(spec|test).ts?(x)",
|
|
83
|
+
"<rootDir>/@(src|test)/**/__tests__/**/*.ts?(x)",
|
|
84
|
+
"<rootDir>/@(projenrc)/**/*(*.)@(spec|test).ts?(x)",
|
|
85
|
+
"<rootDir>/@(projenrc)/**/__tests__/**/*.ts?(x)"
|
|
86
|
+
],
|
|
87
|
+
"clearMocks": true,
|
|
88
|
+
"collectCoverage": true,
|
|
89
|
+
"coverageReporters": [
|
|
90
|
+
"json",
|
|
91
|
+
"lcov",
|
|
92
|
+
"clover",
|
|
93
|
+
"cobertura",
|
|
94
|
+
"text"
|
|
95
|
+
],
|
|
96
|
+
"coverageDirectory": "coverage",
|
|
97
|
+
"coveragePathIgnorePatterns": [
|
|
98
|
+
"/node_modules/"
|
|
99
|
+
],
|
|
100
|
+
"testPathIgnorePatterns": [
|
|
101
|
+
"/node_modules/"
|
|
102
|
+
],
|
|
103
|
+
"watchPathIgnorePatterns": [
|
|
104
|
+
"/node_modules/"
|
|
105
|
+
],
|
|
106
|
+
"reporters": [
|
|
107
|
+
"default",
|
|
108
|
+
[
|
|
109
|
+
"jest-junit",
|
|
110
|
+
{
|
|
111
|
+
"outputDirectory": "test-reports"
|
|
112
|
+
}
|
|
113
|
+
]
|
|
114
|
+
],
|
|
115
|
+
"transform": {
|
|
116
|
+
"^.+\\.[t]sx?$": [
|
|
117
|
+
"ts-jest",
|
|
118
|
+
{
|
|
119
|
+
"tsconfig": "tsconfig.dev.json"
|
|
120
|
+
}
|
|
121
|
+
]
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
"types": "lib/index.d.ts",
|
|
125
|
+
"stability": "stable",
|
|
126
|
+
"jsii": {
|
|
127
|
+
"outdir": "dist",
|
|
128
|
+
"targets": {},
|
|
129
|
+
"tsc": {
|
|
130
|
+
"outDir": "lib",
|
|
131
|
+
"rootDir": "src"
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
"//": "~~ Generated by projen. To modify, edit .projenrc.ts and run \"npx projen\"."
|
|
135
|
+
}
|