@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.
@@ -1,4 +1,4 @@
1
- export { A as Aggregated, h as Api, i as ApiConfig, ag as ConsumerConfig, C as ConsumptionApi, e as DeadLetter, D as DeadLetterModel, f as DeadLetterQueue, l as ETLPipeline, m as ETLPipelineConfig, E as EgressConfig, F as FrameworkApp, I as IngestApi, g as IngestConfig, j as IngestPipeline, ak as IngestPipelineConfig, L as LifeCycle, M as MaterializedView, al as MaterializedViewConfig, a as OlapConfig, O as OlapTable, b as S3QueueTableSettings, S as SimpleAggregated, k as SqlResource, c as Stream, d as StreamConfig, T as Task, aj as TaskConfig, ai as TaskContext, ah as TransformConfig, V as View, n as WebApp, o as WebAppConfig, p as WebAppHandler, W as Workflow, x as getApi, w as getApis, v as getIngestApi, u as getIngestApis, z as getSqlResource, y as getSqlResources, t as getStream, s as getStreams, r as getTable, q as getTables, J as getWebApp, H as getWebApps, G as getWorkflow, B as getWorkflows } from '../index-CNlTyF6R.mjs';
1
+ export { A as Aggregated, h as Api, i as ApiConfig, ag as ConsumerConfig, C as ConsumptionApi, e as DeadLetter, D as DeadLetterModel, f as DeadLetterQueue, l as ETLPipeline, m as ETLPipelineConfig, E as EgressConfig, F as FrameworkApp, I as IngestApi, g as IngestConfig, j as IngestPipeline, ak as IngestPipelineConfig, L as LifeCycle, M as MaterializedView, al as MaterializedViewConfig, a as OlapConfig, O as OlapTable, b as S3QueueTableSettings, S as SimpleAggregated, k as SqlResource, c as Stream, d as StreamConfig, T as Task, aj as TaskConfig, ai as TaskContext, ah as TransformConfig, V as View, n as WebApp, o as WebAppConfig, p as WebAppHandler, W as Workflow, x as getApi, w as getApis, v as getIngestApi, u as getIngestApis, z as getSqlResource, y as getSqlResources, t as getStream, s as getStreams, r as getTable, q as getTables, J as getWebApp, H as getWebApps, G as getWorkflow, B as getWorkflows } from '../index-rECDLgTX.mjs';
2
2
  import 'typia';
3
3
  import 'typia/src/schemas/json/IJsonSchemaCollection';
4
4
  import 'node:stream';
@@ -1,4 +1,4 @@
1
- export { A as Aggregated, h as Api, i as ApiConfig, ag as ConsumerConfig, C as ConsumptionApi, e as DeadLetter, D as DeadLetterModel, f as DeadLetterQueue, l as ETLPipeline, m as ETLPipelineConfig, E as EgressConfig, F as FrameworkApp, I as IngestApi, g as IngestConfig, j as IngestPipeline, ak as IngestPipelineConfig, L as LifeCycle, M as MaterializedView, al as MaterializedViewConfig, a as OlapConfig, O as OlapTable, b as S3QueueTableSettings, S as SimpleAggregated, k as SqlResource, c as Stream, d as StreamConfig, T as Task, aj as TaskConfig, ai as TaskContext, ah as TransformConfig, V as View, n as WebApp, o as WebAppConfig, p as WebAppHandler, W as Workflow, x as getApi, w as getApis, v as getIngestApi, u as getIngestApis, z as getSqlResource, y as getSqlResources, t as getStream, s as getStreams, r as getTable, q as getTables, J as getWebApp, H as getWebApps, G as getWorkflow, B as getWorkflows } from '../index-CNlTyF6R.js';
1
+ export { A as Aggregated, h as Api, i as ApiConfig, ag as ConsumerConfig, C as ConsumptionApi, e as DeadLetter, D as DeadLetterModel, f as DeadLetterQueue, l as ETLPipeline, m as ETLPipelineConfig, E as EgressConfig, F as FrameworkApp, I as IngestApi, g as IngestConfig, j as IngestPipeline, ak as IngestPipelineConfig, L as LifeCycle, M as MaterializedView, al as MaterializedViewConfig, a as OlapConfig, O as OlapTable, b as S3QueueTableSettings, S as SimpleAggregated, k as SqlResource, c as Stream, d as StreamConfig, T as Task, aj as TaskConfig, ai as TaskContext, ah as TransformConfig, V as View, n as WebApp, o as WebAppConfig, p as WebAppHandler, W as Workflow, x as getApi, w as getApis, v as getIngestApi, u as getIngestApis, z as getSqlResource, y as getSqlResources, t as getStream, s as getStreams, r as getTable, q as getTables, J as getWebApp, H as getWebApps, G as getWorkflow, B as getWorkflows } from '../index-rECDLgTX.js';
2
2
  import 'typia';
3
3
  import 'typia/src/schemas/json/IJsonSchemaCollection';
4
4
  import 'node:stream';
@@ -42,7 +42,6 @@ __export(commons_exports, {
42
42
  antiCachePath: () => antiCachePath,
43
43
  cliLog: () => cliLog,
44
44
  compilerLog: () => compilerLog,
45
- createProducerConfig: () => createProducerConfig,
46
45
  getClickhouseClient: () => getClickhouseClient,
47
46
  getFileName: () => getFileName,
48
47
  getKafkaClient: () => getKafkaClient,
@@ -65,25 +64,18 @@ function isTruthy(value) {
65
64
  function mapTstoJs(filePath) {
66
65
  return filePath.replace(/\.ts$/, ".js").replace(/\.cts$/, ".cjs").replace(/\.mts$/, ".mjs");
67
66
  }
68
- function createProducerConfig(maxMessageBytes) {
69
- return {
67
+ async function getKafkaProducer(cfg, logger) {
68
+ const kafka = await getKafkaClient(cfg, logger);
69
+ const producer = kafka.producer({
70
70
  kafkaJS: {
71
- idempotent: false,
72
- // Not needed for at-least-once delivery
71
+ idempotent: true,
73
72
  acks: ACKs,
74
73
  retry: {
75
74
  retries: MAX_RETRIES_PRODUCER,
76
75
  maxRetryTime: MAX_RETRY_TIME_MS
77
76
  }
78
- },
79
- "linger.ms": 0,
80
- // Send immediately - batching happens at application level
81
- ...maxMessageBytes && { "message.max.bytes": maxMessageBytes }
82
- };
83
- }
84
- async function getKafkaProducer(cfg, logger, maxMessageBytes) {
85
- const kafka = await getKafkaClient(cfg, logger);
86
- const producer = kafka.producer(createProducerConfig(maxMessageBytes));
77
+ }
78
+ });
87
79
  await producer.connect();
88
80
  return producer;
89
81
  }
@@ -2458,7 +2450,19 @@ var WebApp = class {
2458
2450
  return app.callback();
2459
2451
  }
2460
2452
  if (typeof app.routing === "function") {
2461
- return (req, res) => {
2453
+ let isReady = false;
2454
+ let readyPromise = null;
2455
+ if (typeof app.ready === "function") {
2456
+ readyPromise = app.ready().then(() => {
2457
+ isReady = true;
2458
+ });
2459
+ } else {
2460
+ isReady = true;
2461
+ }
2462
+ return async (req, res) => {
2463
+ if (!isReady && readyPromise) {
2464
+ await readyPromise;
2465
+ }
2462
2466
  app.routing(req, res);
2463
2467
  };
2464
2468
  }