@saihu/common 1.1.60 → 1.1.61

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.
@@ -3,6 +3,6 @@ export declare const LOGIN_USER_KEY = "login_user:";
3
3
  export declare const COMMON_MODULE_OPTIONS = "COMMON_MODULE_OPTIONS";
4
4
  export declare const REDIS_SERVICE = "REDIS_SERVICE";
5
5
  export declare const RABBITMQ_SERVICE = "RABBITMQ_SERVICE";
6
- export declare const OPER_LOG_QUEUE = "q.oper.log.created.im-id";
6
+ export declare const OPER_LOG_QUEUE = "oper_log_queue";
7
7
  export declare const OPER_LOG_EXCHANGE = "oper_log_exchange";
8
8
  //# sourceMappingURL=common.consts.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"common.consts.d.ts","sourceRoot":"","sources":["../../src/consts/common.consts.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa,IAAI,CAAC;AAC/B,eAAO,MAAM,cAAc,gBAAgB,CAAC;AAC5C,eAAO,MAAM,qBAAqB,0BAA0B,CAAC;AAC7D,eAAO,MAAM,aAAa,kBAAkB,CAAC;AAC7C,eAAO,MAAM,gBAAgB,qBAAqB,CAAC;AACnD,eAAO,MAAM,cAAc,6BAA6B,CAAC;AACzD,eAAO,MAAM,iBAAiB,sBAAsB,CAAC"}
1
+ {"version":3,"file":"common.consts.d.ts","sourceRoot":"","sources":["../../src/consts/common.consts.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,aAAa,IAAI,CAAC;AAC/B,eAAO,MAAM,cAAc,gBAAgB,CAAC;AAC5C,eAAO,MAAM,qBAAqB,0BAA0B,CAAC;AAC7D,eAAO,MAAM,aAAa,kBAAkB,CAAC;AAC7C,eAAO,MAAM,gBAAgB,qBAAqB,CAAC;AACnD,eAAO,MAAM,cAAc,mBAAmB,CAAC;AAC/C,eAAO,MAAM,iBAAiB,sBAAsB,CAAC"}
@@ -6,5 +6,5 @@ exports.LOGIN_USER_KEY = 'login_user:';
6
6
  exports.COMMON_MODULE_OPTIONS = 'COMMON_MODULE_OPTIONS';
7
7
  exports.REDIS_SERVICE = 'REDIS_SERVICE';
8
8
  exports.RABBITMQ_SERVICE = 'RABBITMQ_SERVICE';
9
- exports.OPER_LOG_QUEUE = 'q.oper.log.created.im-id';
9
+ exports.OPER_LOG_QUEUE = 'oper_log_queue';
10
10
  exports.OPER_LOG_EXCHANGE = 'oper_log_exchange';
@@ -1,4 +1,3 @@
1
1
  export * from './base-error.filter';
2
2
  export * from './validation-exception.filter';
3
- export * from './base-error-rpc.filter';
4
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/filters/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,yBAAyB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/filters/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,+BAA+B,CAAC"}
@@ -16,4 +16,3 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./base-error.filter"), exports);
18
18
  __exportStar(require("./validation-exception.filter"), exports);
19
- __exportStar(require("./base-error-rpc.filter"), exports);
@@ -6,18 +6,18 @@ class SaihuLogger {
6
6
  if (!context)
7
7
  return false;
8
8
  const hiddenContexts = [
9
- // 'InstanceLoader',
10
- // 'RoutesResolver',
11
- // 'RouterExplorer',
12
- // 'NestFactory',
13
- // 'NestApplication',
14
- // 'ClientProxy',
15
- // 'NestMicroservice',
9
+ 'InstanceLoader',
10
+ 'RoutesResolver',
11
+ 'RouterExplorer',
12
+ 'NestFactory',
13
+ 'NestApplication',
14
+ 'ClientProxy',
15
+ 'NestMicroservice',
16
16
  'AmqpConnection',
17
- // 'MicroserviceConfiguration',
18
- // 'RabbitMQModule',
19
- // 'WebSocketsController',
20
- // 'ExceptionsHandler', // ← Add this
17
+ 'MicroserviceConfiguration',
18
+ 'RabbitMQModule',
19
+ 'WebSocketsController',
20
+ 'ExceptionsHandler', // ← Add this
21
21
  ];
22
22
  return hiddenContexts.some((hidden) => context.includes(hidden));
23
23
  }
@@ -93,7 +93,7 @@ exports.ExchangeTypes = {
93
93
  [Exchanges.IM_DATA]: 'topic',
94
94
  [Exchanges.IM_INVENTORY]: 'topic',
95
95
  [Exchanges.MASTER_DATA]: 'topic',
96
- [Exchanges.OPER_LOG_EXCHANGE]: 'topic',
96
+ [Exchanges.OPER_LOG_EXCHANGE]: 'direct',
97
97
  [Exchanges.IM_SALES_ORDER]: 'topic',
98
98
  [Exchanges.SCM_DATA]: 'topic',
99
99
  [Exchanges.IM_PROCUREMENT_ORDER_DLX]: 'topic',
@@ -1 +1 @@
1
- {"version":3,"file":"rabbitmq.service.d.ts","sourceRoot":"","sources":["../../src/services/rabbitmq.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,YAAY,EACZ,eAAe,EAGhB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAEtE,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAGlE,qBACa,mBACX,YAAW,eAAe,EAAE,YAAY,EAAE,eAAe;IAUvD,OAAO,CAAC,QAAQ,CAAC,OAAO;IAR1B,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAwC;IAC/D,OAAO,CAAC,UAAU,CAAgC;IAClD,OAAO,CAAC,OAAO,CAA2B;IAC1C,OAAO,CAAC,aAAa,CAAS;IAC9B,OAAO,CAAC,SAAS,CAAU;gBAIR,OAAO,EAAE,mBAAmB;IAKzC,YAAY;IAMZ,eAAe;IAIf,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IA6BxB,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAY3B,cAAc,CAAC,OAAO,EAAE,GAAG,GAAG,OAAO,CAAC,OAAO,CAAC;CAkBrD"}
1
+ {"version":3,"file":"rabbitmq.service.d.ts","sourceRoot":"","sources":["../../src/services/rabbitmq.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,YAAY,EACZ,eAAe,EAGhB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAMtE,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAElE,qBACa,mBACX,YAAW,eAAe,EAAE,YAAY,EAAE,eAAe;IAUvD,OAAO,CAAC,QAAQ,CAAC,OAAO;IAR1B,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAwC;IAC/D,OAAO,CAAC,UAAU,CAAgC;IAClD,OAAO,CAAC,OAAO,CAA2B;IAC1C,OAAO,CAAC,aAAa,CAAS;IAC9B,OAAO,CAAC,SAAS,CAAU;gBAIR,OAAO,EAAE,mBAAmB;IAKzC,YAAY;IAMZ,eAAe;IAIf,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IA6BxB,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAY3B,cAAc,CAAC,OAAO,EAAE,GAAG,GAAG,OAAO,CAAC,OAAO,CAAC;CAkBrD"}
@@ -50,7 +50,6 @@ exports.RabbitmqServiceImpl = void 0;
50
50
  const common_1 = require("@nestjs/common");
51
51
  const amqp = __importStar(require("amqplib"));
52
52
  const common_consts_1 = require("../consts/common.consts");
53
- const messaging_1 = require("../messaging");
54
53
  let RabbitmqServiceImpl = RabbitmqServiceImpl_1 = class RabbitmqServiceImpl {
55
54
  constructor(options) {
56
55
  this.options = options;
@@ -111,7 +110,7 @@ let RabbitmqServiceImpl = RabbitmqServiceImpl_1 = class RabbitmqServiceImpl {
111
110
  }
112
111
  try {
113
112
  const messageBuffer = Buffer.from(JSON.stringify(message));
114
- return this.channel.publish(messaging_1.Exchanges.OPER_LOG_EXCHANGE, messaging_1.RoutingKeys[messaging_1.Exchanges.OPER_LOG_EXCHANGE].OPER_LOG_CREATED, messageBuffer);
113
+ return this.channel.publish(common_consts_1.OPER_LOG_EXCHANGE, common_consts_1.OPER_LOG_QUEUE, messageBuffer);
115
114
  }
116
115
  catch (error) {
117
116
  this.logger.error('Failed to publish message to RabbitMQ:', error);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@saihu/common",
3
- "version": "1.1.60",
3
+ "version": "1.1.61",
4
4
  "description": "Common utilities for NestJS applications",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -33,7 +33,6 @@
33
33
  "@nestjs/config": "^4.0.2",
34
34
  "@nestjs/core": "^11.1.1",
35
35
  "@nestjs/jwt": "^11.0.0",
36
- "@nestjs/microservices": "^11.1.6",
37
36
  "amqp-connection-manager": "^5.0.0",
38
37
  "amqplib": "^0.10.9",
39
38
  "class-transformer": "^0.5.1",