@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 +7 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -6536,6 +6536,7 @@ var SCHEMA_TYPES = [
|
|
|
6536
6536
|
import { Pool } from "pg";
|
|
6537
6537
|
import { camelCase, kebabCase, snakeCase } from "lodash-es";
|
|
6538
6538
|
var AUTHORITY_SYNC_DEBUG_PREFIX = "[CADENZA_DB_TASK_DEBUG]";
|
|
6539
|
+
var AUTHORITY_SYNC_DEBUG_ENABLED = typeof process !== "undefined" && typeof process.env === "object" && process.env.CADENZA_DB_TASK_DEBUG === "true";
|
|
6539
6540
|
var AUTHORITY_SYNC_DEBUG_TASK_NAMES = /* @__PURE__ */ new Set([
|
|
6540
6541
|
"Query service_instance",
|
|
6541
6542
|
"Query service_instance_transport",
|
|
@@ -6550,6 +6551,9 @@ var AUTHORITY_SYNC_DEBUG_TASK_NAMES = /* @__PURE__ */ new Set([
|
|
|
6550
6551
|
]);
|
|
6551
6552
|
var AUTHORITY_SYNC_DEBUG_ROUTINE_NAMES = /* @__PURE__ */ new Set(["Sync services"]);
|
|
6552
6553
|
function logAuthoritySyncDebug(event, payload) {
|
|
6554
|
+
if (!AUTHORITY_SYNC_DEBUG_ENABLED) {
|
|
6555
|
+
return;
|
|
6556
|
+
}
|
|
6553
6557
|
console.log(`${AUTHORITY_SYNC_DEBUG_PREFIX} ${event}`, payload);
|
|
6554
6558
|
}
|
|
6555
6559
|
function resolveAuthoritySyncPayloadName(payload, tableName) {
|
|
@@ -6568,6 +6572,9 @@ function resolveAuthoritySyncPayloadName(payload, tableName) {
|
|
|
6568
6572
|
return null;
|
|
6569
6573
|
}
|
|
6570
6574
|
function shouldDebugAuthoritySyncPayload(tableName, payload) {
|
|
6575
|
+
if (!AUTHORITY_SYNC_DEBUG_ENABLED) {
|
|
6576
|
+
return false;
|
|
6577
|
+
}
|
|
6571
6578
|
if (tableName !== "task" && tableName !== "task_to_routine_map") {
|
|
6572
6579
|
return false;
|
|
6573
6580
|
}
|