@alanszp/eventbridge-client 10.0.2 → 10.0.3
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.
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.mapLaraEventToAWSEvent = void 0;
|
|
7
4
|
const lodash_1 = require("lodash");
|
|
8
|
-
const
|
|
5
|
+
const cuid2_1 = require("@paralleldrive/cuid2");
|
|
9
6
|
function mapLaraEventToAWSEvent({ topic, body }, env, appName, bus, logger, context) {
|
|
10
|
-
const lid = context.getLifecycleId() || (0,
|
|
7
|
+
const lid = context.getLifecycleId() || (0, cuid2_1.createId)();
|
|
11
8
|
const oldlLch = context.getLifecycleChain();
|
|
12
9
|
const lch = (0, lodash_1.compact)([oldlLch, "aws.eb"]).join(",");
|
|
13
10
|
try {
|
|
@@ -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":";;;AAIA,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;QACF,OAAO;YACL,UAAU,EAAE,KAAK;YACjB,MAAM,EAAE,IAAI,CAAC,SAAS,iCAAM,IAAI,KAAE,GAAG,EAAE,GAAG,IAAG;YAC7C,MAAM,EAAE,GAAG,GAAG,SAAS,OAAO,EAAE;YAChC,YAAY,EAAE,GAAG;YACjB,IAAI,EAAE,IAAI,IAAI,EAAE;YAChB,WAAW,EAAE,GAAG;SACjB,CAAC;KACH;IAAC,WAAM;QACN,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;KAClB;AACH,CAAC;AA7BD,wDA6BC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alanszp/eventbridge-client",
|
|
3
|
-
"version": "10.0.
|
|
3
|
+
"version": "10.0.3",
|
|
4
4
|
"description": "Alan's basic eventbridge client.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"typings": "dist/index.d.ts",
|
|
@@ -31,9 +31,9 @@
|
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@alanszp/logger": "^10.0.1",
|
|
33
33
|
"@alanszp/shared-context": "^10.0.2",
|
|
34
|
+
"@paralleldrive/cuid2": "^2.2.2",
|
|
34
35
|
"aws-sdk": "^2.1204.0",
|
|
35
|
-
"cuid": "^2.1.8",
|
|
36
36
|
"lodash": "^4.17.21"
|
|
37
37
|
},
|
|
38
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "701d6cc7bd3a51a8b297903e7b2fff9c1b830da6"
|
|
39
39
|
}
|
|
@@ -3,7 +3,7 @@ import { PutEventsRequestEntry } from "aws-sdk/clients/eventbridge";
|
|
|
3
3
|
import type { ILogger } from "@alanszp/logger";
|
|
4
4
|
import type { SharedContext } from "@alanszp/shared-context";
|
|
5
5
|
import { compact } from "lodash";
|
|
6
|
-
import
|
|
6
|
+
import { createId } from "@paralleldrive/cuid2";
|
|
7
7
|
|
|
8
8
|
export function mapLaraEventToAWSEvent(
|
|
9
9
|
{ topic, body }: LaraEvent,
|
|
@@ -13,7 +13,7 @@ export function mapLaraEventToAWSEvent(
|
|
|
13
13
|
logger: ILogger,
|
|
14
14
|
context: SharedContext
|
|
15
15
|
): PutEventsRequestEntry | undefined {
|
|
16
|
-
const lid = context.getLifecycleId() ||
|
|
16
|
+
const lid = context.getLifecycleId() || createId();
|
|
17
17
|
const oldlLch = context.getLifecycleChain();
|
|
18
18
|
const lch = compact([oldlLch, "aws.eb"]).join(",");
|
|
19
19
|
try {
|