core-services-sdk 1.3.27 → 1.3.28
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/package.json
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
|
-
import * as amqp from 'amqplib'
|
|
3
2
|
import { ulid } from 'ulid'
|
|
3
|
+
import * as amqp from 'amqplib'
|
|
4
|
+
|
|
5
|
+
import { mask } from '../util/mask-sensitive.js'
|
|
4
6
|
|
|
5
7
|
/**
|
|
6
8
|
* @typedef {Object} Log
|
|
@@ -19,7 +21,7 @@ const generateMsgId = () => `rbt_${ulid()}`
|
|
|
19
21
|
*/
|
|
20
22
|
export const connectQueueService = async ({ host, log }) => {
|
|
21
23
|
const t0 = Date.now()
|
|
22
|
-
const logger = log.child({ op: 'connectQueueService', host })
|
|
24
|
+
const logger = log.child({ op: 'connectQueueService', host: mask(host) })
|
|
23
25
|
|
|
24
26
|
try {
|
|
25
27
|
logger.debug('start')
|
|
@@ -48,7 +50,7 @@ export const connectQueueService = async ({ host, log }) => {
|
|
|
48
50
|
*/
|
|
49
51
|
export const createChannel = async ({ host, log }) => {
|
|
50
52
|
const t0 = Date.now()
|
|
51
|
-
const logger = log.child({ op: 'createChannel', host })
|
|
53
|
+
const logger = log.child({ op: 'createChannel', host: mask(host) })
|
|
52
54
|
|
|
53
55
|
try {
|
|
54
56
|
logger.debug('start')
|
|
@@ -168,7 +170,7 @@ export const subscribeToQueue = async ({
|
|
|
168
170
|
*/
|
|
169
171
|
export const initializeQueue = async ({ host, log }) => {
|
|
170
172
|
const channel = await createChannel({ host, log })
|
|
171
|
-
const logger = log.child({ op: 'initializeQueue' })
|
|
173
|
+
const logger = log.child({ op: 'initializeQueue', host: mask(host) })
|
|
172
174
|
|
|
173
175
|
/**
|
|
174
176
|
* Publishes a message to a queue with a generated `rbt_<ulid>` ID.
|