@514labs/moose-lib 0.6.252-ci-1-g901efb04 → 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 +203 -78
- package/dist/moose-runner.js.map +1 -1
- package/dist/moose-runner.mjs +203 -78
- package/dist/moose-runner.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -20,7 +20,6 @@ __export(commons_exports, {
|
|
|
20
20
|
antiCachePath: () => antiCachePath,
|
|
21
21
|
cliLog: () => cliLog,
|
|
22
22
|
compilerLog: () => compilerLog,
|
|
23
|
-
createProducerConfig: () => createProducerConfig,
|
|
24
23
|
getClickhouseClient: () => getClickhouseClient,
|
|
25
24
|
getFileName: () => getFileName,
|
|
26
25
|
getKafkaClient: () => getKafkaClient,
|
|
@@ -46,25 +45,18 @@ function isTruthy(value) {
|
|
|
46
45
|
function mapTstoJs(filePath) {
|
|
47
46
|
return filePath.replace(/\.ts$/, ".js").replace(/\.cts$/, ".cjs").replace(/\.mts$/, ".mjs");
|
|
48
47
|
}
|
|
49
|
-
function
|
|
50
|
-
|
|
48
|
+
async function getKafkaProducer(cfg, logger) {
|
|
49
|
+
const kafka = await getKafkaClient(cfg, logger);
|
|
50
|
+
const producer = kafka.producer({
|
|
51
51
|
kafkaJS: {
|
|
52
|
-
idempotent:
|
|
53
|
-
// Not needed for at-least-once delivery
|
|
52
|
+
idempotent: true,
|
|
54
53
|
acks: ACKs,
|
|
55
54
|
retry: {
|
|
56
55
|
retries: MAX_RETRIES_PRODUCER,
|
|
57
56
|
maxRetryTime: MAX_RETRY_TIME_MS
|
|
58
57
|
}
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
// Send immediately - batching happens at application level
|
|
62
|
-
...maxMessageBytes && { "message.max.bytes": maxMessageBytes }
|
|
63
|
-
};
|
|
64
|
-
}
|
|
65
|
-
async function getKafkaProducer(cfg, logger, maxMessageBytes) {
|
|
66
|
-
const kafka = await getKafkaClient(cfg, logger);
|
|
67
|
-
const producer = kafka.producer(createProducerConfig(maxMessageBytes));
|
|
58
|
+
}
|
|
59
|
+
});
|
|
68
60
|
await producer.connect();
|
|
69
61
|
return producer;
|
|
70
62
|
}
|
|
@@ -2499,7 +2491,19 @@ var WebApp = class {
|
|
|
2499
2491
|
return app.callback();
|
|
2500
2492
|
}
|
|
2501
2493
|
if (typeof app.routing === "function") {
|
|
2502
|
-
|
|
2494
|
+
let isReady = false;
|
|
2495
|
+
let readyPromise = null;
|
|
2496
|
+
if (typeof app.ready === "function") {
|
|
2497
|
+
readyPromise = app.ready().then(() => {
|
|
2498
|
+
isReady = true;
|
|
2499
|
+
});
|
|
2500
|
+
} else {
|
|
2501
|
+
isReady = true;
|
|
2502
|
+
}
|
|
2503
|
+
return async (req, res) => {
|
|
2504
|
+
if (!isReady && readyPromise) {
|
|
2505
|
+
await readyPromise;
|
|
2506
|
+
}
|
|
2503
2507
|
app.routing(req, res);
|
|
2504
2508
|
};
|
|
2505
2509
|
}
|