@514labs/moose-lib 0.6.252-ci-2-g41538689 → 0.6.252-ci-3-g37e54b29
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-CoxWbneN.d.ts → browserCompatible-B_aEflr_.d.ts} +1 -1
- package/dist/{browserCompatible-BTN82akc.d.mts → browserCompatible-DnYA4Zgi.d.mts} +1 -1
- package/dist/browserCompatible.d.mts +2 -2
- package/dist/browserCompatible.d.ts +2 -2
- package/dist/browserCompatible.js +19 -15
- package/dist/browserCompatible.js.map +1 -1
- package/dist/browserCompatible.mjs +19 -15
- package/dist/browserCompatible.mjs.map +1 -1
- package/dist/compilerPlugin.js.map +1 -1
- package/dist/compilerPlugin.mjs.map +1 -1
- package/dist/dmv2/index.d.mts +1 -1
- package/dist/dmv2/index.d.ts +1 -1
- package/dist/dmv2/index.js +19 -15
- package/dist/dmv2/index.js.map +1 -1
- package/dist/dmv2/index.mjs +19 -15
- package/dist/dmv2/index.mjs.map +1 -1
- package/dist/{index-CNlTyF6R.d.mts → index-rECDLgTX.d.mts} +1 -0
- package/dist/{index-CNlTyF6R.d.ts → index-rECDLgTX.d.ts} +1 -0
- package/dist/index.d.mts +5 -28
- package/dist/index.d.ts +5 -28
- package/dist/index.js +19 -17
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +19 -16
- package/dist/index.mjs.map +1 -1
- package/dist/moose-runner.js +202 -100
- package/dist/moose-runner.js.map +1 -1
- package/dist/moose-runner.mjs +202 -100
- package/dist/moose-runner.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -26,7 +26,6 @@ __export(commons_exports, {
|
|
|
26
26
|
antiCachePath: () => antiCachePath,
|
|
27
27
|
cliLog: () => cliLog,
|
|
28
28
|
compilerLog: () => compilerLog,
|
|
29
|
-
createProducerConfig: () => createProducerConfig,
|
|
30
29
|
getClickhouseClient: () => getClickhouseClient,
|
|
31
30
|
getFileName: () => getFileName,
|
|
32
31
|
getKafkaClient: () => getKafkaClient,
|
|
@@ -52,25 +51,18 @@ function isTruthy(value) {
|
|
|
52
51
|
function mapTstoJs(filePath) {
|
|
53
52
|
return filePath.replace(/\.ts$/, ".js").replace(/\.cts$/, ".cjs").replace(/\.mts$/, ".mjs");
|
|
54
53
|
}
|
|
55
|
-
function
|
|
56
|
-
|
|
54
|
+
async function getKafkaProducer(cfg, logger) {
|
|
55
|
+
const kafka = await getKafkaClient(cfg, logger);
|
|
56
|
+
const producer = kafka.producer({
|
|
57
57
|
kafkaJS: {
|
|
58
|
-
idempotent:
|
|
59
|
-
// Not needed for at-least-once delivery
|
|
58
|
+
idempotent: true,
|
|
60
59
|
acks: ACKs,
|
|
61
60
|
retry: {
|
|
62
61
|
retries: MAX_RETRIES_PRODUCER,
|
|
63
62
|
maxRetryTime: MAX_RETRY_TIME_MS
|
|
64
63
|
}
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
// Send immediately - batching happens at application level
|
|
68
|
-
...maxMessageBytes && { "message.max.bytes": maxMessageBytes }
|
|
69
|
-
};
|
|
70
|
-
}
|
|
71
|
-
async function getKafkaProducer(cfg, logger, maxMessageBytes) {
|
|
72
|
-
const kafka = await getKafkaClient(cfg, logger);
|
|
73
|
-
const producer = kafka.producer(createProducerConfig(maxMessageBytes));
|
|
64
|
+
}
|
|
65
|
+
});
|
|
74
66
|
await producer.connect();
|
|
75
67
|
return producer;
|
|
76
68
|
}
|
|
@@ -2522,7 +2514,19 @@ var WebApp = class {
|
|
|
2522
2514
|
return app.callback();
|
|
2523
2515
|
}
|
|
2524
2516
|
if (typeof app.routing === "function") {
|
|
2525
|
-
|
|
2517
|
+
let isReady = false;
|
|
2518
|
+
let readyPromise = null;
|
|
2519
|
+
if (typeof app.ready === "function") {
|
|
2520
|
+
readyPromise = app.ready().then(() => {
|
|
2521
|
+
isReady = true;
|
|
2522
|
+
});
|
|
2523
|
+
} else {
|
|
2524
|
+
isReady = true;
|
|
2525
|
+
}
|
|
2526
|
+
return async (req, res) => {
|
|
2527
|
+
if (!isReady && readyPromise) {
|
|
2528
|
+
await readyPromise;
|
|
2529
|
+
}
|
|
2526
2530
|
app.routing(req, res);
|
|
2527
2531
|
};
|
|
2528
2532
|
}
|
|
@@ -3305,7 +3309,6 @@ export {
|
|
|
3305
3309
|
createClickhouseParameter,
|
|
3306
3310
|
createConsumptionApi,
|
|
3307
3311
|
createMaterializedView,
|
|
3308
|
-
createProducerConfig,
|
|
3309
3312
|
dropView,
|
|
3310
3313
|
expressMiddleware,
|
|
3311
3314
|
getApi,
|