@alanszp/eventbridge-client 20.0.1 → 20.2.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/dist/aws/awsEventbridgeClient.js +1 -2
- package/dist/aws/awsEventbridgeClient.js.map +1 -1
- package/dist/aws/awsTypes.d.ts +2 -2
- package/dist/aws/index.js +5 -1
- package/dist/aws/index.js.map +1 -1
- package/dist/basicEventbridgeClient.d.ts +2 -2
- package/dist/helpers/mapLaraEventToAWSEvent.js +2 -3
- package/dist/helpers/mapLaraEventToAWSEvent.js.map +1 -1
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/dist/types/UpdatedEvent.d.ts +6 -6
- package/dist/types/index.js +5 -1
- package/dist/types/index.js.map +1 -1
- package/package.json +8 -8
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getEventbridgeClient =
|
|
3
|
+
exports.getEventbridgeClient = getEventbridgeClient;
|
|
4
4
|
const client_eventbridge_1 = require("@aws-sdk/client-eventbridge");
|
|
5
5
|
function getEventbridgeClient(endpoint, region) {
|
|
6
6
|
return new client_eventbridge_1.EventBridge(endpoint ? { endpoint, region } : {});
|
|
7
7
|
}
|
|
8
|
-
exports.getEventbridgeClient = getEventbridgeClient;
|
|
9
8
|
//# sourceMappingURL=awsEventbridgeClient.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"awsEventbridgeClient.js","sourceRoot":"","sources":["../../src/aws/awsEventbridgeClient.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"awsEventbridgeClient.js","sourceRoot":"","sources":["../../src/aws/awsEventbridgeClient.ts"],"names":[],"mappings":";;AAEA,oDAKC;AAPD,oEAA0D;AAE1D,SAAgB,oBAAoB,CAClC,QAAiB,EACjB,MAAe;IAEf,OAAO,IAAI,gCAAW,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;AAC/D,CAAC"}
|
package/dist/aws/awsTypes.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { PutEventsResultEntry, PutEventsRequestEntry } from "@aws-sdk/client-eventbridge";
|
|
2
|
-
export
|
|
3
|
-
export
|
|
2
|
+
export type PutEventEntryResponse = PutEventsResultEntry;
|
|
3
|
+
export type PutEventEntryRequest = PutEventsRequestEntry;
|
package/dist/aws/index.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
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);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
package/dist/aws/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/aws/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/aws/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yDAAuC;AACvC,6CAA2B"}
|
|
@@ -8,11 +8,11 @@ import { PutEventEntryRequest, PutEventEntryResponse } from "./aws";
|
|
|
8
8
|
* @property body: The body of the event. This will be used to match in the rules, along with the topic and maybe the id. If it has a property id it
|
|
9
9
|
* will be overwritten by the id sent to this method in the parameters.
|
|
10
10
|
*/
|
|
11
|
-
export
|
|
11
|
+
export type LaraEvent = {
|
|
12
12
|
topic: string;
|
|
13
13
|
body: Record<string, unknown>;
|
|
14
14
|
};
|
|
15
|
-
export
|
|
15
|
+
export type PutEventFailedEntryResponse = PutEventEntryResponse & {
|
|
16
16
|
event: PutEventEntryRequest;
|
|
17
17
|
};
|
|
18
18
|
export interface EventDispatchResult {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.mapLaraEventToAWSEvent =
|
|
3
|
+
exports.mapLaraEventToAWSEvent = mapLaraEventToAWSEvent;
|
|
4
4
|
const lodash_1 = require("lodash");
|
|
5
5
|
const cuid2_1 = require("@paralleldrive/cuid2");
|
|
6
6
|
function mapLaraEventToAWSEvent({ topic, body }, env, appName, bus, logger, context) {
|
|
@@ -10,7 +10,7 @@ function mapLaraEventToAWSEvent({ topic, body }, env, appName, bus, logger, cont
|
|
|
10
10
|
try {
|
|
11
11
|
return {
|
|
12
12
|
DetailType: topic,
|
|
13
|
-
Detail: JSON.stringify(Object.assign(Object.assign({}, body), { lch, lid })),
|
|
13
|
+
Detail: JSON.stringify(Object.assign(Object.assign({}, body), { lch, lid })), // lid is included here since the TraceHeader is not sent to the targets by aws
|
|
14
14
|
Source: `${env}.lara.${appName}`,
|
|
15
15
|
EventBusName: bus,
|
|
16
16
|
Time: new Date(),
|
|
@@ -27,5 +27,4 @@ function mapLaraEventToAWSEvent({ topic, body }, env, appName, bus, logger, cont
|
|
|
27
27
|
return undefined;
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
|
-
exports.mapLaraEventToAWSEvent = mapLaraEventToAWSEvent;
|
|
31
30
|
//# sourceMappingURL=mapLaraEventToAWSEvent.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mapLaraEventToAWSEvent.js","sourceRoot":"","sources":["../../src/helpers/mapLaraEventToAWSEvent.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"mapLaraEventToAWSEvent.js","sourceRoot":"","sources":["../../src/helpers/mapLaraEventToAWSEvent.ts"],"names":[],"mappings":";;AAOA,wDA6BC;AAhCD,mCAAiC;AACjC,gDAAgD;AAEhD,SAAgB,sBAAsB,CACpC,EAAE,KAAK,EAAE,IAAI,EAAa,EAC1B,GAAW,EACX,OAAe,EACf,GAAW,EACX,MAAe,EACf,OAAsB;IAEtB,MAAM,GAAG,GAAG,OAAO,CAAC,cAAc,EAAE,IAAI,IAAA,gBAAQ,GAAE,CAAC;IACnD,MAAM,OAAO,GAAG,OAAO,CAAC,iBAAiB,EAAE,CAAC;IAC5C,MAAM,GAAG,GAAG,IAAA,gBAAO,EAAC,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACnD,IAAI,CAAC;QACH,OAAO;YACL,UAAU,EAAE,KAAK;YACjB,MAAM,EAAE,IAAI,CAAC,SAAS,iCAAM,IAAI,KAAE,GAAG,EAAE,GAAG,IAAG,EAAE,+EAA+E;YAC9H,MAAM,EAAE,GAAG,GAAG,SAAS,OAAO,EAAE;YAChC,YAAY,EAAE,GAAG;YACjB,IAAI,EAAE,IAAI,IAAI,EAAE;YAChB,WAAW,EAAE,GAAG;SACjB,CAAC;IACJ,CAAC;IAAC,WAAM,CAAC;QACP,MAAM,GAAG,GAAG,IAAI,CAAC,qBAA+B,CAAC;QACjD,MAAM,CAAC,KAAK,CAAC,sDAAsD,EAAE;YACnE,KAAK;YACL,GAAG;YACH,GAAG;SACJ,CAAC,CAAC;QACH,OAAO,SAAS,CAAC;IACnB,CAAC;AACH,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
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);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2DAAyC;AACzC,iDAA+B;AAC/B,0CAAwB"}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
|
|
1
|
+
type PropertyKeys<T> = {
|
|
2
2
|
[K in keyof T as T[K] extends Function ? never : K]: T[K];
|
|
3
3
|
};
|
|
4
|
-
|
|
4
|
+
type UpdatedIdentifiers<Entity, Identifiers extends keyof PropertyKeys<Entity>, PartialEntity = Pick<PropertyKeys<Entity>, Identifiers>> = {
|
|
5
5
|
[K in keyof PartialEntity]: PartialEntity[K];
|
|
6
6
|
};
|
|
7
|
-
|
|
7
|
+
type UpdatedFields<Entity, Identifiers extends keyof PropertyKeys<Entity>, PartialEntity = Omit<PropertyKeys<Entity>, Identifiers>> = {
|
|
8
8
|
[K in keyof PartialEntity]?: PartialEntity[K];
|
|
9
9
|
};
|
|
10
|
-
export
|
|
11
|
-
export
|
|
10
|
+
export type CreatedEvent<Entity, Identifiers extends keyof PropertyKeys<Entity>> = UpdatedFields<Entity, Identifiers>;
|
|
11
|
+
export type UpdatedEvent<Entity, Identifiers extends keyof PropertyKeys<Entity>> = UpdatedFields<Entity, Identifiers> & UpdatedIdentifiers<Entity, Identifiers> & {
|
|
12
12
|
_previousValues?: UpdatedFields<Entity, Identifiers>;
|
|
13
13
|
modifiedKeys: (keyof UpdatedFields<Entity, Identifiers>)[];
|
|
14
14
|
};
|
|
15
|
-
export
|
|
15
|
+
export type DeletedEvent<Entity, Identifiers extends keyof PropertyKeys<Entity>> = UpdatedIdentifiers<Entity, Identifiers>;
|
|
16
16
|
export {};
|
package/dist/types/index.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
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);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
package/dist/types/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iDAA+B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alanszp/eventbridge-client",
|
|
3
|
-
"version": "20.0
|
|
3
|
+
"version": "20.2.0",
|
|
4
4
|
"description": "Alan's basic eventbridge client.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"typings": "dist/index.d.ts",
|
|
@@ -19,18 +19,18 @@
|
|
|
19
19
|
"devDependencies": {
|
|
20
20
|
"@babel/core": "^7.23.9",
|
|
21
21
|
"@types/jest": "^29.5.12",
|
|
22
|
-
"@types/node": "^
|
|
22
|
+
"@types/node": "^24.0.0",
|
|
23
23
|
"babel-jest": "^29.7.0",
|
|
24
24
|
"jest": "^29.7.0",
|
|
25
25
|
"ts-node": "^10.9.2",
|
|
26
|
-
"typescript": "^
|
|
26
|
+
"typescript": "^5.9.3"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@alanszp/logger": "^20.0
|
|
30
|
-
"@alanszp/shared-context": "^20.0
|
|
31
|
-
"@aws-sdk/client-eventbridge": "^3.
|
|
29
|
+
"@alanszp/logger": "^20.2.0",
|
|
30
|
+
"@alanszp/shared-context": "^20.2.0",
|
|
31
|
+
"@aws-sdk/client-eventbridge": "^3.1010.0",
|
|
32
32
|
"@paralleldrive/cuid2": "^2.2.2",
|
|
33
|
-
"lodash": "^4.17.
|
|
33
|
+
"lodash": "^4.17.23"
|
|
34
34
|
},
|
|
35
|
-
"gitHead": "
|
|
35
|
+
"gitHead": "5f7b992fc36b2b0291182f6c3ad380a837e6b754"
|
|
36
36
|
}
|