@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.
package/dist/index.mjs CHANGED
@@ -18,7 +18,6 @@ var __export = (target, all) => {
18
18
  var commons_exports = {};
19
19
  __export(commons_exports, {
20
20
  ACKs: () => ACKs,
21
- LogLevel: () => LogLevel,
22
21
  MAX_RETRIES: () => MAX_RETRIES,
23
22
  MAX_RETRIES_PRODUCER: () => MAX_RETRIES_PRODUCER,
24
23
  MAX_RETRY_TIME_MS: () => MAX_RETRY_TIME_MS,
@@ -50,36 +49,6 @@ function isTruthy(value) {
50
49
  return false;
51
50
  }
52
51
  }
53
- function parseLogLevel(value) {
54
- if (!value) return "Info" /* Info */;
55
- const normalized = value.trim();
56
- switch (normalized) {
57
- case "Debug":
58
- case "debug":
59
- case "DEBUG":
60
- return "Debug" /* Debug */;
61
- case "Info":
62
- case "info":
63
- case "INFO":
64
- return "Info" /* Info */;
65
- case "Warn":
66
- case "warn":
67
- case "WARN":
68
- return "Warn" /* Warn */;
69
- case "Error":
70
- case "error":
71
- case "ERROR":
72
- return "Error" /* Error */;
73
- default:
74
- return "Info" /* Info */;
75
- }
76
- }
77
- function getLogLevel() {
78
- if (cachedLogLevel === null) {
79
- cachedLogLevel = parseLogLevel(process.env.MOOSE_LOGGER__LEVEL);
80
- }
81
- return cachedLogLevel;
82
- }
83
52
  function mapTstoJs(filePath) {
84
53
  return filePath.replace(/\.ts$/, ".js").replace(/\.cts$/, ".cjs").replace(/\.mts$/, ".mjs");
85
54
  }
@@ -105,31 +74,13 @@ async function getKafkaProducer(cfg, logger, maxMessageBytes) {
105
74
  await producer.connect();
106
75
  return producer;
107
76
  }
108
- var 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;
77
+ var 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;
109
78
  var init_commons = __esm({
110
79
  "src/commons.ts"() {
111
80
  "use strict";
112
81
  ({ Kafka } = KafkaJS);
113
- LogLevel = /* @__PURE__ */ ((LogLevel2) => {
114
- LogLevel2["Debug"] = "Debug";
115
- LogLevel2["Info"] = "Info";
116
- LogLevel2["Warn"] = "Warn";
117
- LogLevel2["Error"] = "Error";
118
- return LogLevel2;
119
- })(LogLevel || {});
120
- cachedLogLevel = null;
121
- compilerLog = (message, level = "Debug" /* Debug */) => {
122
- if (isTruthy(process.env.MOOSE_DISABLE_COMPILER_LOGS)) {
123
- return;
124
- }
125
- const currentLevel = getLogLevel();
126
- const levelPriority = {
127
- ["Debug" /* Debug */]: 0,
128
- ["Info" /* Info */]: 1,
129
- ["Warn" /* Warn */]: 2,
130
- ["Error" /* Error */]: 3
131
- };
132
- if (levelPriority[level] >= levelPriority[currentLevel]) {
82
+ compilerLog = (message) => {
83
+ if (!isTruthy(process.env.MOOSE_DISABLE_COMPILER_LOGS)) {
133
84
  console.log(message);
134
85
  }
135
86
  };
@@ -157,17 +108,7 @@ var init_commons = __esm({
157
108
  username,
158
109
  password,
159
110
  database,
160
- application: "moose",
161
- // Connection pool configuration for high load (100+ concurrent users)
162
- max_open_connections: 50,
163
- // Increased from default 10 to handle 100 concurrent users
164
- request_timeout: 6e4,
165
- // 60s timeout for HTTP requests (queries and inserts)
166
- keep_alive: {
167
- enabled: true,
168
- idle_socket_ttl: 2e3
169
- // 2s idle time (lower than default to prevent socket hang-ups)
170
- }
111
+ application: "moose"
171
112
  // Note: wait_end_of_query is configured per operation type, not globally
172
113
  // to preserve SELECT query performance while ensuring INSERT/DDL reliability
173
114
  });
@@ -2889,21 +2830,7 @@ async function getTemporalClient(temporalUrl, namespace, clientCert, clientKey,
2889
2830
  );
2890
2831
  let connectionOptions = {
2891
2832
  address: temporalUrl,
2892
- connectTimeout: "30s",
2893
- // Increased from 3s to handle high load
2894
- // Add gRPC keepalive to prevent connection drops
2895
- channelArgs: {
2896
- "grpc.keepalive_time_ms": 3e4,
2897
- // Send keepalive every 30s
2898
- "grpc.keepalive_timeout_ms": 15e3,
2899
- // Wait 15s for keepalive response
2900
- "grpc.keepalive_permit_without_calls": 1,
2901
- // Allow keepalive without active calls
2902
- "grpc.http2.max_pings_without_data": 0,
2903
- // No limit on pings without data
2904
- "grpc.http2.min_time_between_pings_ms": 1e4
2905
- // Min 10s between pings
2906
- }
2833
+ connectTimeout: "3s"
2907
2834
  };
2908
2835
  if (clientCert && clientKey) {
2909
2836
  console.log("Using TLS for secure Temporal");
@@ -3359,7 +3286,6 @@ export {
3359
3286
  IngestApi,
3360
3287
  IngestPipeline,
3361
3288
  LifeCycle,
3362
- LogLevel,
3363
3289
  MAX_RETRIES,
3364
3290
  MAX_RETRIES_PRODUCER,
3365
3291
  MAX_RETRY_TIME_MS,