@cadenza.io/service 2.17.62 → 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/browser/index.js +5 -4
- package/dist/browser/index.js.map +1 -1
- package/dist/browser/index.mjs +5 -4
- package/dist/browser/index.mjs.map +1 -1
- package/dist/index.js +12 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +12 -4
- 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
|
}
|
|
@@ -8908,6 +8915,7 @@ var AUTHORITY_QUERY_RESULT_KEYS = {
|
|
|
8908
8915
|
};
|
|
8909
8916
|
var EARLY_SYNC_REQUEST_DELAYS_MS = [2e3, 1e4, 3e4];
|
|
8910
8917
|
var SYNC_DEBUG_PREFIX = "[CADENZA_SYNC_DEBUG]";
|
|
8918
|
+
var SYNC_DEBUG_ENABLED = typeof process !== "undefined" && typeof process.env === "object" && process.env.CADENZA_SYNC_DEBUG === "true";
|
|
8911
8919
|
var SYNC_DEBUG_TABLES = /* @__PURE__ */ new Set(["intent_to_task_map"]);
|
|
8912
8920
|
var SYNC_DEBUG_TASK_NAMES = /* @__PURE__ */ new Set([
|
|
8913
8921
|
"Query service_instance",
|
|
@@ -8943,16 +8951,16 @@ var SYNC_DEBUG_INTENT_NAMES = /* @__PURE__ */ new Set([
|
|
|
8943
8951
|
"query-pg-cadenza-db-postgres-actor-signal_to_task_map"
|
|
8944
8952
|
]);
|
|
8945
8953
|
function shouldDebugSyncTable(tableName) {
|
|
8946
|
-
return SYNC_DEBUG_TABLES.has(tableName);
|
|
8954
|
+
return SYNC_DEBUG_ENABLED && SYNC_DEBUG_TABLES.has(tableName);
|
|
8947
8955
|
}
|
|
8948
8956
|
function shouldDebugSyncTaskName(taskName) {
|
|
8949
|
-
return typeof taskName === "string" && SYNC_DEBUG_TASK_NAMES.has(taskName);
|
|
8957
|
+
return SYNC_DEBUG_ENABLED && typeof taskName === "string" && SYNC_DEBUG_TASK_NAMES.has(taskName);
|
|
8950
8958
|
}
|
|
8951
8959
|
function shouldDebugSyncRoutineName(routineName) {
|
|
8952
|
-
return typeof routineName === "string" && SYNC_DEBUG_ROUTINE_NAMES.has(routineName);
|
|
8960
|
+
return SYNC_DEBUG_ENABLED && typeof routineName === "string" && SYNC_DEBUG_ROUTINE_NAMES.has(routineName);
|
|
8953
8961
|
}
|
|
8954
8962
|
function shouldDebugSyncIntentName(intentName) {
|
|
8955
|
-
return typeof intentName === "string" && SYNC_DEBUG_INTENT_NAMES.has(intentName);
|
|
8963
|
+
return SYNC_DEBUG_ENABLED && typeof intentName === "string" && SYNC_DEBUG_INTENT_NAMES.has(intentName);
|
|
8956
8964
|
}
|
|
8957
8965
|
function summarizeSyncDebugValue(value, depth = 0) {
|
|
8958
8966
|
if (value === null || value === void 0) {
|