@loggerjs/node 0.5.2 → 0.5.4

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 CHANGED
@@ -1038,12 +1038,18 @@ function queueName(args, fallback) {
1038
1038
  const first = args[0];
1039
1039
  return typeof first === "string" ? first : fallback;
1040
1040
  }
1041
+ function operationFor(method) {
1042
+ if (method === "process") return "consume";
1043
+ if (method === "add" || method === "addBulk") return "publish";
1044
+ return "other";
1045
+ }
1041
1046
  function bullMqIntegration(options) {
1042
1047
  return queueIntegration({
1043
1048
  ...options,
1044
1049
  name: options.name ?? "bullmq",
1045
1050
  system: "bullmq",
1046
1051
  methods: options.methods ?? bullMqMethods,
1052
+ getOperation: options.getOperation ?? operationFor,
1047
1053
  queueName: options.queueName ?? options.client.name,
1048
1054
  getQueueName: (args) => queueName(args, options.queueName ?? options.client.name)
1049
1055
  });
@@ -1633,6 +1639,11 @@ function koaIntegration(logger, options = {}) {
1633
1639
  }
1634
1640
  //#endregion
1635
1641
  //#region src/nest-integration.ts
1642
+ /**
1643
+ * Express-compatible Nest middleware adapter. It observes the same request and
1644
+ * response completion surface as `expressIntegration`; it does not hook Nest
1645
+ * exception filters, interceptors, guards, or the original thrown `Error`.
1646
+ */
1636
1647
  function nestMiddlewareIntegration(logger, options = {}) {
1637
1648
  return expressIntegration(logger, {
1638
1649
  name: "nestjs",