@514labs/moose-lib 0.6.260-ci-2-g1b93253f → 0.6.261

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.
@@ -34,7 +34,6 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
34
34
  var commons_exports = {};
35
35
  __export(commons_exports, {
36
36
  ACKs: () => ACKs,
37
- LogLevel: () => LogLevel,
38
37
  MAX_RETRIES: () => MAX_RETRIES,
39
38
  MAX_RETRIES_PRODUCER: () => MAX_RETRIES_PRODUCER,
40
39
  MAX_RETRY_TIME_MS: () => MAX_RETRY_TIME_MS,
@@ -63,36 +62,6 @@ function isTruthy(value) {
63
62
  return false;
64
63
  }
65
64
  }
66
- function parseLogLevel(value) {
67
- if (!value) return "Info" /* Info */;
68
- const normalized = value.trim();
69
- switch (normalized) {
70
- case "Debug":
71
- case "debug":
72
- case "DEBUG":
73
- return "Debug" /* Debug */;
74
- case "Info":
75
- case "info":
76
- case "INFO":
77
- return "Info" /* Info */;
78
- case "Warn":
79
- case "warn":
80
- case "WARN":
81
- return "Warn" /* Warn */;
82
- case "Error":
83
- case "error":
84
- case "ERROR":
85
- return "Error" /* Error */;
86
- default:
87
- return "Info" /* Info */;
88
- }
89
- }
90
- function getLogLevel() {
91
- if (cachedLogLevel === null) {
92
- cachedLogLevel = parseLogLevel(process.env.MOOSE_LOGGER__LEVEL);
93
- }
94
- return cachedLogLevel;
95
- }
96
65
  function mapTstoJs(filePath) {
97
66
  return filePath.replace(/\.ts$/, ".js").replace(/\.cts$/, ".cjs").replace(/\.mts$/, ".mjs");
98
67
  }
@@ -118,7 +87,7 @@ async function getKafkaProducer(cfg, logger, maxMessageBytes) {
118
87
  await producer.connect();
119
88
  return producer;
120
89
  }
121
- var import_http, import_client, import_kafka_javascript, Kafka, LogLevel, cachedLogLevel, compilerLog, antiCachePath, getFileName, getClickhouseClient, cliLog, MAX_RETRIES, MAX_RETRY_TIME_MS, RETRY_INITIAL_TIME_MS, MAX_RETRIES_PRODUCER, RETRY_FACTOR_PRODUCER, ACKs, parseBrokerString, logError, buildSaslConfig, getKafkaClient;
90
+ var import_http, import_client, import_kafka_javascript, Kafka, compilerLog, antiCachePath, getFileName, getClickhouseClient, cliLog, MAX_RETRIES, MAX_RETRY_TIME_MS, RETRY_INITIAL_TIME_MS, MAX_RETRIES_PRODUCER, RETRY_FACTOR_PRODUCER, ACKs, parseBrokerString, logError, buildSaslConfig, getKafkaClient;
122
91
  var init_commons = __esm({
123
92
  "src/commons.ts"() {
124
93
  "use strict";
@@ -126,26 +95,8 @@ var init_commons = __esm({
126
95
  import_client = require("@clickhouse/client");
127
96
  import_kafka_javascript = require("@confluentinc/kafka-javascript");
128
97
  ({ Kafka } = import_kafka_javascript.KafkaJS);
129
- LogLevel = /* @__PURE__ */ ((LogLevel2) => {
130
- LogLevel2["Debug"] = "Debug";
131
- LogLevel2["Info"] = "Info";
132
- LogLevel2["Warn"] = "Warn";
133
- LogLevel2["Error"] = "Error";
134
- return LogLevel2;
135
- })(LogLevel || {});
136
- cachedLogLevel = null;
137
- compilerLog = (message, level = "Debug" /* Debug */) => {
138
- if (isTruthy(process.env.MOOSE_DISABLE_COMPILER_LOGS)) {
139
- return;
140
- }
141
- const currentLevel = getLogLevel();
142
- const levelPriority = {
143
- ["Debug" /* Debug */]: 0,
144
- ["Info" /* Info */]: 1,
145
- ["Warn" /* Warn */]: 2,
146
- ["Error" /* Error */]: 3
147
- };
148
- if (levelPriority[level] >= levelPriority[currentLevel]) {
98
+ compilerLog = (message) => {
99
+ if (!isTruthy(process.env.MOOSE_DISABLE_COMPILER_LOGS)) {
149
100
  console.log(message);
150
101
  }
151
102
  };
@@ -173,17 +124,7 @@ var init_commons = __esm({
173
124
  username,
174
125
  password,
175
126
  database,
176
- application: "moose",
177
- // Connection pool configuration for high load (100+ concurrent users)
178
- max_open_connections: 50,
179
- // Increased from default 10 to handle 100 concurrent users
180
- request_timeout: 6e4,
181
- // 60s timeout for HTTP requests (queries and inserts)
182
- keep_alive: {
183
- enabled: true,
184
- idle_socket_ttl: 2e3
185
- // 2s idle time (lower than default to prevent socket hang-ups)
186
- }
127
+ application: "moose"
187
128
  // Note: wait_end_of_query is configured per operation type, not globally
188
129
  // to preserve SELECT query performance while ensuring INSERT/DDL reliability
189
130
  });