@fy-stack/event-construct 0.0.142 → 0.0.144
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/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { EventConstruct } from './lib/event-construct';
|
|
2
|
-
export type {
|
|
2
|
+
export type { AppSchedule, EventConstructProps, MessageHandler, WebsocketConstructProps, } from './lib/types';
|
|
3
3
|
export { AuthProviderCapability } from './lib/types';
|
|
4
4
|
export { WebsocketConstruct } from './lib/websocket-construct';
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,YAAY,EACV,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,YAAY,EACV,WAAW,EACX,mBAAmB,EACnB,cAAc,EACd,uBAAuB,GACxB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event-construct.d.ts","sourceRoot":"","sources":["../../src/lib/event-construct.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAGxD,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,KAAK,GAAG,MAAM,qBAAqB,CAAC;AAE3C,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAEvC,OAAO,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAE9C;;;;;GAKG;AACH,qBAAa,cAAe,SAAQ,SAAU,YAAW,UAAU,EAAE,SAAS;IAC5E,SAAgB,KAAK,EAAE,GAAG,CAAC,KAAK,CAAC;gBAErB,KAAK,EAAE,SAAS,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,mBAAmB;
|
|
1
|
+
{"version":3,"file":"event-construct.d.ts","sourceRoot":"","sources":["../../src/lib/event-construct.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAGxD,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,KAAK,GAAG,MAAM,qBAAqB,CAAC;AAE3C,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAEvC,OAAO,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAE9C;;;;;GAKG;AACH,qBAAa,cAAe,SAAQ,SAAU,YAAW,UAAU,EAAE,SAAS;IAC5E,SAAgB,KAAK,EAAE,GAAG,CAAC,KAAK,CAAC;gBAErB,KAAK,EAAE,SAAS,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,mBAAmB;IA+DpE,UAAU;;;IAMV,SAAS,CAAC,KAAK,EAAE,UAAU;CAG5B"}
|
|
@@ -17,8 +17,8 @@ class EventConstruct extends constructs_1.Construct {
|
|
|
17
17
|
constructor(scope, id, props) {
|
|
18
18
|
super(scope, id);
|
|
19
19
|
this.topic = new sns.Topic(this, 'AppTopic');
|
|
20
|
-
for (const i in props?.
|
|
21
|
-
const appMessage = props?.
|
|
20
|
+
for (const i in props?.handlers ?? []) {
|
|
21
|
+
const appMessage = props?.handlers?.[i];
|
|
22
22
|
if (!appMessage)
|
|
23
23
|
continue;
|
|
24
24
|
const app = props.resources?.[appMessage.$resource];
|
|
@@ -42,6 +42,7 @@ class EventConstruct extends constructs_1.Construct {
|
|
|
42
42
|
new eventsTarget.SnsTopic(this.topic, {
|
|
43
43
|
message: events.RuleTargetInput.fromObject({
|
|
44
44
|
message,
|
|
45
|
+
payload: {}
|
|
45
46
|
}),
|
|
46
47
|
}),
|
|
47
48
|
];
|
package/dist/lib/types.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { AuthorizationType, CfnApiProps, LambdaAuthorizerConfig } from 'aws-cdk-
|
|
|
3
3
|
import { UserPool } from 'aws-cdk-lib/aws-cognito';
|
|
4
4
|
import type { CronOptions } from 'aws-cdk-lib/aws-events';
|
|
5
5
|
import type { Duration } from 'aws-cdk-lib/core';
|
|
6
|
-
export type
|
|
6
|
+
export type MessageHandler = ResourceRef & {
|
|
7
7
|
messages: string[];
|
|
8
8
|
};
|
|
9
9
|
export type AppSchedule = {
|
|
@@ -21,7 +21,7 @@ export interface EventConstructProps {
|
|
|
21
21
|
/**
|
|
22
22
|
* List of resource to messages mapping
|
|
23
23
|
* */
|
|
24
|
-
|
|
24
|
+
handlers?: MessageHandler[];
|
|
25
25
|
/**
|
|
26
26
|
* List of cron objects
|
|
27
27
|
* */
|
package/dist/lib/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/lib/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAClE,OAAO,EACL,iBAAiB,EACjB,WAAW,EACX,sBAAsB,EACvB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACnD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEjD,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/lib/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EA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QAAQ,CAAC;KACpB,GACD,CAAC;QACC;;aAEK;QACL,IAAI,EAAE,iBAAiB,CAAC,MAAM,CAAC;KAChC,GAAG,sBAAsB,CAAC,CAC9B,GAAG;QACF;;aAEK;QACL,YAAY,EAAE,sBAAsB,EAAE,CAAC;KACxC,CAAC,EAAE,CAAC;CACN"}
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fy-stack/event-construct",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.144",
|
|
4
4
|
"repository": "https://github.com/festusyuma/fy-stack",
|
|
5
5
|
"dependencies": {
|
|
6
|
-
"@fy-stack/types": "0.0.
|
|
6
|
+
"@fy-stack/types": "0.0.144",
|
|
7
7
|
"tslib": "^2.3.0"
|
|
8
8
|
},
|
|
9
9
|
"peerDependencies": {
|
|
10
|
-
"aws-cdk-lib": "^2.
|
|
10
|
+
"aws-cdk-lib": "^2.198.0",
|
|
11
11
|
"constructs": "^10.4.2"
|
|
12
12
|
},
|
|
13
13
|
"type": "commonjs",
|