@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/browserCompatible.js +4 -63
- package/dist/browserCompatible.js.map +1 -1
- package/dist/browserCompatible.mjs +4 -63
- package/dist/browserCompatible.mjs.map +1 -1
- package/dist/compilerPlugin.js +14 -73
- package/dist/compilerPlugin.js.map +1 -1
- package/dist/compilerPlugin.mjs +14 -73
- package/dist/compilerPlugin.mjs.map +1 -1
- package/dist/dmv2/index.js +4 -63
- package/dist/dmv2/index.js.map +1 -1
- package/dist/dmv2/index.mjs +4 -63
- package/dist/dmv2/index.mjs.map +1 -1
- package/dist/index.d.mts +2 -18
- package/dist/index.d.ts +2 -18
- package/dist/index.js +5 -80
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -79
- package/dist/index.mjs.map +1 -1
- package/dist/moose-runner.js +6 -86
- package/dist/moose-runner.js.map +1 -1
- package/dist/moose-runner.mjs +6 -86
- package/dist/moose-runner.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -12,7 +12,6 @@ var __export = (target, all) => {
|
|
|
12
12
|
var commons_exports = {};
|
|
13
13
|
__export(commons_exports, {
|
|
14
14
|
ACKs: () => ACKs,
|
|
15
|
-
LogLevel: () => LogLevel,
|
|
16
15
|
MAX_RETRIES: () => MAX_RETRIES,
|
|
17
16
|
MAX_RETRIES_PRODUCER: () => MAX_RETRIES_PRODUCER,
|
|
18
17
|
MAX_RETRY_TIME_MS: () => MAX_RETRY_TIME_MS,
|
|
@@ -44,36 +43,6 @@ function isTruthy(value) {
|
|
|
44
43
|
return false;
|
|
45
44
|
}
|
|
46
45
|
}
|
|
47
|
-
function parseLogLevel(value) {
|
|
48
|
-
if (!value) return "Info" /* Info */;
|
|
49
|
-
const normalized = value.trim();
|
|
50
|
-
switch (normalized) {
|
|
51
|
-
case "Debug":
|
|
52
|
-
case "debug":
|
|
53
|
-
case "DEBUG":
|
|
54
|
-
return "Debug" /* Debug */;
|
|
55
|
-
case "Info":
|
|
56
|
-
case "info":
|
|
57
|
-
case "INFO":
|
|
58
|
-
return "Info" /* Info */;
|
|
59
|
-
case "Warn":
|
|
60
|
-
case "warn":
|
|
61
|
-
case "WARN":
|
|
62
|
-
return "Warn" /* Warn */;
|
|
63
|
-
case "Error":
|
|
64
|
-
case "error":
|
|
65
|
-
case "ERROR":
|
|
66
|
-
return "Error" /* Error */;
|
|
67
|
-
default:
|
|
68
|
-
return "Info" /* Info */;
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
function getLogLevel() {
|
|
72
|
-
if (cachedLogLevel === null) {
|
|
73
|
-
cachedLogLevel = parseLogLevel(process.env.MOOSE_LOGGER__LEVEL);
|
|
74
|
-
}
|
|
75
|
-
return cachedLogLevel;
|
|
76
|
-
}
|
|
77
46
|
function mapTstoJs(filePath) {
|
|
78
47
|
return filePath.replace(/\.ts$/, ".js").replace(/\.cts$/, ".cjs").replace(/\.mts$/, ".mjs");
|
|
79
48
|
}
|
|
@@ -99,31 +68,13 @@ async function getKafkaProducer(cfg, logger, maxMessageBytes) {
|
|
|
99
68
|
await producer.connect();
|
|
100
69
|
return producer;
|
|
101
70
|
}
|
|
102
|
-
var Kafka,
|
|
71
|
+
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;
|
|
103
72
|
var init_commons = __esm({
|
|
104
73
|
"src/commons.ts"() {
|
|
105
74
|
"use strict";
|
|
106
75
|
({ Kafka } = KafkaJS);
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
LogLevel2["Info"] = "Info";
|
|
110
|
-
LogLevel2["Warn"] = "Warn";
|
|
111
|
-
LogLevel2["Error"] = "Error";
|
|
112
|
-
return LogLevel2;
|
|
113
|
-
})(LogLevel || {});
|
|
114
|
-
cachedLogLevel = null;
|
|
115
|
-
compilerLog = (message, level = "Debug" /* Debug */) => {
|
|
116
|
-
if (isTruthy(process.env.MOOSE_DISABLE_COMPILER_LOGS)) {
|
|
117
|
-
return;
|
|
118
|
-
}
|
|
119
|
-
const currentLevel = getLogLevel();
|
|
120
|
-
const levelPriority = {
|
|
121
|
-
["Debug" /* Debug */]: 0,
|
|
122
|
-
["Info" /* Info */]: 1,
|
|
123
|
-
["Warn" /* Warn */]: 2,
|
|
124
|
-
["Error" /* Error */]: 3
|
|
125
|
-
};
|
|
126
|
-
if (levelPriority[level] >= levelPriority[currentLevel]) {
|
|
76
|
+
compilerLog = (message) => {
|
|
77
|
+
if (!isTruthy(process.env.MOOSE_DISABLE_COMPILER_LOGS)) {
|
|
127
78
|
console.log(message);
|
|
128
79
|
}
|
|
129
80
|
};
|
|
@@ -151,17 +102,7 @@ var init_commons = __esm({
|
|
|
151
102
|
username,
|
|
152
103
|
password,
|
|
153
104
|
database,
|
|
154
|
-
application: "moose"
|
|
155
|
-
// Connection pool configuration for high load (100+ concurrent users)
|
|
156
|
-
max_open_connections: 50,
|
|
157
|
-
// Increased from default 10 to handle 100 concurrent users
|
|
158
|
-
request_timeout: 6e4,
|
|
159
|
-
// 60s timeout for HTTP requests (queries and inserts)
|
|
160
|
-
keep_alive: {
|
|
161
|
-
enabled: true,
|
|
162
|
-
idle_socket_ttl: 2e3
|
|
163
|
-
// 2s idle time (lower than default to prevent socket hang-ups)
|
|
164
|
-
}
|
|
105
|
+
application: "moose"
|
|
165
106
|
// Note: wait_end_of_query is configured per operation type, not globally
|
|
166
107
|
// to preserve SELECT query performance while ensuring INSERT/DDL reliability
|
|
167
108
|
});
|