@cadenza.io/service 2.17.63 → 2.17.64

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
@@ -6587,6 +6587,7 @@ var SCHEMA_TYPES = [
6587
6587
  var import_pg = require("pg");
6588
6588
  var import_lodash_es = require("lodash-es");
6589
6589
  var AUTHORITY_SYNC_DEBUG_PREFIX = "[CADENZA_DB_TASK_DEBUG]";
6590
+ var AUTHORITY_SYNC_DEBUG_ENABLED = typeof process !== "undefined" && typeof process.env === "object" && process.env.CADENZA_DB_TASK_DEBUG === "true";
6590
6591
  var AUTHORITY_SYNC_DEBUG_TASK_NAMES = /* @__PURE__ */ new Set([
6591
6592
  "Query service_instance",
6592
6593
  "Query service_instance_transport",
@@ -6601,6 +6602,9 @@ var AUTHORITY_SYNC_DEBUG_TASK_NAMES = /* @__PURE__ */ new Set([
6601
6602
  ]);
6602
6603
  var AUTHORITY_SYNC_DEBUG_ROUTINE_NAMES = /* @__PURE__ */ new Set(["Sync services"]);
6603
6604
  function logAuthoritySyncDebug(event, payload) {
6605
+ if (!AUTHORITY_SYNC_DEBUG_ENABLED) {
6606
+ return;
6607
+ }
6604
6608
  console.log(`${AUTHORITY_SYNC_DEBUG_PREFIX} ${event}`, payload);
6605
6609
  }
6606
6610
  function resolveAuthoritySyncPayloadName(payload, tableName) {
@@ -6619,6 +6623,9 @@ function resolveAuthoritySyncPayloadName(payload, tableName) {
6619
6623
  return null;
6620
6624
  }
6621
6625
  function shouldDebugAuthoritySyncPayload(tableName, payload) {
6626
+ if (!AUTHORITY_SYNC_DEBUG_ENABLED) {
6627
+ return false;
6628
+ }
6622
6629
  if (tableName !== "task" && tableName !== "task_to_routine_map") {
6623
6630
  return false;
6624
6631
  }