@autofleet/shtinker 1.1.0 → 1.1.2
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.js +0 -2
- package/dist/types.d.ts +3 -0
- package/dist/types.js +3 -0
- package/package.json +2 -2
- package/src/index.ts +0 -2
- package/src/types.ts +3 -0
package/dist/index.js
CHANGED
|
@@ -42,7 +42,6 @@ exports.enableAuditing = enableAuditing;
|
|
|
42
42
|
const setAuditContext = (entityType, action) => (req, res, next) => __awaiter(void 0, void 0, void 0, function* () {
|
|
43
43
|
try {
|
|
44
44
|
const currentTrace = (0, zehut_1.getCurrentPayload)();
|
|
45
|
-
logger_1.default.info('setAuditContext', { currentTrace });
|
|
46
45
|
if (currentTrace && currentTrace.context && currentTrace.context.get) {
|
|
47
46
|
const user = currentTrace.context.get(const_1.USER_CONTEXT_KEY);
|
|
48
47
|
const auditLogContext = {
|
|
@@ -65,7 +64,6 @@ exports.setAuditContext = setAuditContext;
|
|
|
65
64
|
const setRabbitAuditContext = (entityType, action) => (endpoint) => __awaiter(void 0, void 0, void 0, function* () {
|
|
66
65
|
var _a;
|
|
67
66
|
const currentTrace = (0, zehut_1.getCurrentPayload)();
|
|
68
|
-
logger_1.default.info('setRabbitAuditContext', { currentTrace });
|
|
69
67
|
if ((_a = currentTrace === null || currentTrace === void 0 ? void 0 : currentTrace.context) === null || _a === void 0 ? void 0 : _a.get) {
|
|
70
68
|
const user = currentTrace.context.get(const_1.USER_CONTEXT_KEY);
|
|
71
69
|
const auditLogContext = {
|
package/dist/types.d.ts
CHANGED
package/dist/types.js
CHANGED
|
@@ -14,6 +14,9 @@ var Action;
|
|
|
14
14
|
Action["BULK_ASSIGN"] = "bulk-assign";
|
|
15
15
|
Action["REASSIGN"] = "reassign";
|
|
16
16
|
Action["DISPATCH"] = "dispatch";
|
|
17
|
+
Action["BULK_DISPATCH"] = "bulk-dispatch";
|
|
18
|
+
Action["BULK_UPSERT"] = "bulk-upsert";
|
|
19
|
+
Action["UPSERT"] = "upsert";
|
|
17
20
|
Action["JOIN"] = "join";
|
|
18
21
|
Action["MOVE"] = "move";
|
|
19
22
|
})(Action = exports.Action || (exports.Action = {}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@autofleet/shtinker",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.2",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"@autofleet/errors": "^1.2.2",
|
|
16
16
|
"@autofleet/logger": "^2.0.5",
|
|
17
17
|
"@autofleet/network": "^1.4.7",
|
|
18
|
-
"@autofleet/rabbit": "^3.1.
|
|
18
|
+
"@autofleet/rabbit": "^3.1.1",
|
|
19
19
|
"@autofleet/zehut": "^3.0.2",
|
|
20
20
|
"sequelize-typescript": "^2.1.5"
|
|
21
21
|
},
|
package/src/index.ts
CHANGED
|
@@ -19,7 +19,6 @@ export const setAuditContext = (
|
|
|
19
19
|
) => async (req: any, res: any, next: any): Promise<any> => {
|
|
20
20
|
try {
|
|
21
21
|
const currentTrace = getCurrentTrace();
|
|
22
|
-
logger.info('setAuditContext', { currentTrace });
|
|
23
22
|
if (currentTrace && currentTrace.context && currentTrace.context.get) {
|
|
24
23
|
const user = currentTrace.context.get(USER_CONTEXT_KEY);
|
|
25
24
|
const auditLogContext: AuditLogContext = {
|
|
@@ -43,7 +42,6 @@ export const setRabbitAuditContext = (
|
|
|
43
42
|
action: string,
|
|
44
43
|
) => async (endpoint: string): Promise<any> => {
|
|
45
44
|
const currentTrace = getCurrentTrace();
|
|
46
|
-
logger.info('setRabbitAuditContext', { currentTrace });
|
|
47
45
|
if (currentTrace?.context?.get) {
|
|
48
46
|
const user = currentTrace.context.get(USER_CONTEXT_KEY);
|
|
49
47
|
const auditLogContext: AuditLogContext = {
|
package/src/types.ts
CHANGED