@514labs/moose-lib 0.6.241 → 0.6.243-ci-1-g45cc1511
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-BRa8sgXw.d.mts → browserCompatible-bG7qUssc.d.mts} +1 -1
- package/dist/{browserCompatible-CMLITD0_.d.ts → browserCompatible-mRmtV1to.d.ts} +1 -1
- package/dist/browserCompatible.d.mts +2 -2
- package/dist/browserCompatible.d.ts +2 -2
- package/dist/browserCompatible.js +38 -15
- package/dist/browserCompatible.js.map +1 -1
- package/dist/browserCompatible.mjs +38 -15
- package/dist/browserCompatible.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 +38 -15
- package/dist/dmv2/index.js.map +1 -1
- package/dist/dmv2/index.mjs +38 -15
- package/dist/dmv2/index.mjs.map +1 -1
- package/dist/{index-BG2HP0xG.d.mts → index-DtHRzX8Z.d.mts} +12 -0
- package/dist/{index-BG2HP0xG.d.ts → index-DtHRzX8Z.d.ts} +12 -0
- package/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +38 -15
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +38 -15
- package/dist/index.mjs.map +1 -1
- package/dist/moose-runner.js +5 -2
- package/dist/moose-runner.js.map +1 -1
- package/dist/moose-runner.mjs +5 -2
- package/dist/moose-runner.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -988,6 +988,11 @@ interface TransformConfig<T> {
|
|
|
988
988
|
* unless a DeadLetterQueue is provided, or it is explicitly disabled with a null value
|
|
989
989
|
*/
|
|
990
990
|
deadLetterQueue?: DeadLetterQueue<T> | null;
|
|
991
|
+
/**
|
|
992
|
+
* @internal Source file path where this transform was declared.
|
|
993
|
+
* Automatically captured from stack trace.
|
|
994
|
+
*/
|
|
995
|
+
sourceFile?: string;
|
|
991
996
|
}
|
|
992
997
|
/**
|
|
993
998
|
* Configuration options for stream consumers.
|
|
@@ -1007,6 +1012,11 @@ interface ConsumerConfig<T> {
|
|
|
1007
1012
|
* unless a DeadLetterQueue is provided, or it is explicitly disabled with a null value
|
|
1008
1013
|
*/
|
|
1009
1014
|
deadLetterQueue?: DeadLetterQueue<T> | null;
|
|
1015
|
+
/**
|
|
1016
|
+
* @internal Source file path where this consumer was declared.
|
|
1017
|
+
* Automatically captured from stack trace.
|
|
1018
|
+
*/
|
|
1019
|
+
sourceFile?: string;
|
|
1010
1020
|
}
|
|
1011
1021
|
type SchemaRegistryEncoding = "JSON" | "AVRO" | "PROTOBUF";
|
|
1012
1022
|
type SchemaRegistryReference = {
|
|
@@ -1796,6 +1806,8 @@ declare class SqlResource {
|
|
|
1796
1806
|
pullsDataFrom: SqlObject[];
|
|
1797
1807
|
/** List of OlapTables or Views that this resource writes data to. */
|
|
1798
1808
|
pushesDataTo: SqlObject[];
|
|
1809
|
+
/** @internal Source file path where this resource was defined */
|
|
1810
|
+
sourceFile?: string;
|
|
1799
1811
|
/**
|
|
1800
1812
|
* Creates a new SqlResource instance.
|
|
1801
1813
|
* @param name The name of the resource.
|
|
@@ -988,6 +988,11 @@ interface TransformConfig<T> {
|
|
|
988
988
|
* unless a DeadLetterQueue is provided, or it is explicitly disabled with a null value
|
|
989
989
|
*/
|
|
990
990
|
deadLetterQueue?: DeadLetterQueue<T> | null;
|
|
991
|
+
/**
|
|
992
|
+
* @internal Source file path where this transform was declared.
|
|
993
|
+
* Automatically captured from stack trace.
|
|
994
|
+
*/
|
|
995
|
+
sourceFile?: string;
|
|
991
996
|
}
|
|
992
997
|
/**
|
|
993
998
|
* Configuration options for stream consumers.
|
|
@@ -1007,6 +1012,11 @@ interface ConsumerConfig<T> {
|
|
|
1007
1012
|
* unless a DeadLetterQueue is provided, or it is explicitly disabled with a null value
|
|
1008
1013
|
*/
|
|
1009
1014
|
deadLetterQueue?: DeadLetterQueue<T> | null;
|
|
1015
|
+
/**
|
|
1016
|
+
* @internal Source file path where this consumer was declared.
|
|
1017
|
+
* Automatically captured from stack trace.
|
|
1018
|
+
*/
|
|
1019
|
+
sourceFile?: string;
|
|
1010
1020
|
}
|
|
1011
1021
|
type SchemaRegistryEncoding = "JSON" | "AVRO" | "PROTOBUF";
|
|
1012
1022
|
type SchemaRegistryReference = {
|
|
@@ -1796,6 +1806,8 @@ declare class SqlResource {
|
|
|
1796
1806
|
pullsDataFrom: SqlObject[];
|
|
1797
1807
|
/** List of OlapTables or Views that this resource writes data to. */
|
|
1798
1808
|
pushesDataTo: SqlObject[];
|
|
1809
|
+
/** @internal Source file path where this resource was defined */
|
|
1810
|
+
sourceFile?: string;
|
|
1799
1811
|
/**
|
|
1800
1812
|
* Creates a new SqlResource instance.
|
|
1801
1813
|
* @param name The name of the resource.
|
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { C as ClickHouseByteSize, p as ClickHouseCodec, j as ClickHouseDecimal, n as ClickHouseDefault, k as ClickHouseFixedStringSize, l as ClickHouseFloat, a as ClickHouseInt, m as ClickHouseJson, e as ClickHouseLineString, f as ClickHouseMultiLineString, h as ClickHouseMultiPolygon, b as ClickHouseNamedTuple, c as ClickHousePoint, g as ClickHousePolygon, i as ClickHousePrecision, d as ClickHouseRing, o as ClickHouseTTL, D as DateTime, q as DateTime64, s as DateTime64String, r as DateTimeString, B as Decimal, F as FixedString, t as Float32, u as Float64, v as Int16, w as Int32, x as Int64, I as Int8, J as JWT, K as Key, L as LowCardinality, y as UInt16, z as UInt32, A as UInt64, U as UInt8, W as WithDefault } from './browserCompatible-
|
|
2
|
-
import { K as ApiUtil, a4 as MooseClient } from './index-
|
|
3
|
-
export { A as Aggregated, h as Api, i as ApiConfig, ad as ApiHelpers, a5 as Blocks, a6 as ClickHouseEngines, C as ConsumptionApi, ae as ConsumptionHelpers, N as ConsumptionUtil, e as DeadLetter, D as DeadLetterModel, f as DeadLetterQueue, l as ETLPipeline, m as ETLPipelineConfig, E as EgressConfig, F as FrameworkApp, Q as IdentifierBrandedString, I as IngestApi, g as IngestConfig, j as IngestPipeline, L as LifeCycle, M as MaterializedView, R as NonIdentifierBrandedString, a as OlapConfig, O as OlapTable, aa as QueryClient, X as RawValue, b as S3QueueTableSettings, S as SimpleAggregated, Z as Sql, k as SqlResource, c as Stream, d as StreamConfig, T as Task, U as Value, V as View, n as WebApp, o as WebAppConfig, p as WebAppHandler, W as Workflow, ab as WorkflowClient, a2 as createClickhouseParameter, a8 as createMaterializedView, a7 as dropView, 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, ac as getTemporalClient, a1 as getValueFromParameter, J as getWebApp, H as getWebApps, G as getWorkflow, B as getWorkflows, af as joinQueries, a3 as mapToClickHouseType, a9 as populateTable, P as quoteIdentifier, Y as sql, $ as toQuery, a0 as toQueryPreview, _ as toStaticQuery } from './index-
|
|
1
|
+
export { C as ClickHouseByteSize, p as ClickHouseCodec, j as ClickHouseDecimal, n as ClickHouseDefault, k as ClickHouseFixedStringSize, l as ClickHouseFloat, a as ClickHouseInt, m as ClickHouseJson, e as ClickHouseLineString, f as ClickHouseMultiLineString, h as ClickHouseMultiPolygon, b as ClickHouseNamedTuple, c as ClickHousePoint, g as ClickHousePolygon, i as ClickHousePrecision, d as ClickHouseRing, o as ClickHouseTTL, D as DateTime, q as DateTime64, s as DateTime64String, r as DateTimeString, B as Decimal, F as FixedString, t as Float32, u as Float64, v as Int16, w as Int32, x as Int64, I as Int8, J as JWT, K as Key, L as LowCardinality, y as UInt16, z as UInt32, A as UInt64, U as UInt8, W as WithDefault } from './browserCompatible-bG7qUssc.mjs';
|
|
2
|
+
import { K as ApiUtil, a4 as MooseClient } from './index-DtHRzX8Z.mjs';
|
|
3
|
+
export { A as Aggregated, h as Api, i as ApiConfig, ad as ApiHelpers, a5 as Blocks, a6 as ClickHouseEngines, C as ConsumptionApi, ae as ConsumptionHelpers, N as ConsumptionUtil, e as DeadLetter, D as DeadLetterModel, f as DeadLetterQueue, l as ETLPipeline, m as ETLPipelineConfig, E as EgressConfig, F as FrameworkApp, Q as IdentifierBrandedString, I as IngestApi, g as IngestConfig, j as IngestPipeline, L as LifeCycle, M as MaterializedView, R as NonIdentifierBrandedString, a as OlapConfig, O as OlapTable, aa as QueryClient, X as RawValue, b as S3QueueTableSettings, S as SimpleAggregated, Z as Sql, k as SqlResource, c as Stream, d as StreamConfig, T as Task, U as Value, V as View, n as WebApp, o as WebAppConfig, p as WebAppHandler, W as Workflow, ab as WorkflowClient, a2 as createClickhouseParameter, a8 as createMaterializedView, a7 as dropView, 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, ac as getTemporalClient, a1 as getValueFromParameter, J as getWebApp, H as getWebApps, G as getWorkflow, B as getWorkflows, af as joinQueries, a3 as mapToClickHouseType, a9 as populateTable, P as quoteIdentifier, Y as sql, $ as toQuery, a0 as toQueryPreview, _ as toStaticQuery } from './index-DtHRzX8Z.mjs';
|
|
4
4
|
import * as _clickhouse_client from '@clickhouse/client';
|
|
5
5
|
import { KafkaJS } from '@confluentinc/kafka-javascript';
|
|
6
6
|
import http from 'http';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { C as ClickHouseByteSize, p as ClickHouseCodec, j as ClickHouseDecimal, n as ClickHouseDefault, k as ClickHouseFixedStringSize, l as ClickHouseFloat, a as ClickHouseInt, m as ClickHouseJson, e as ClickHouseLineString, f as ClickHouseMultiLineString, h as ClickHouseMultiPolygon, b as ClickHouseNamedTuple, c as ClickHousePoint, g as ClickHousePolygon, i as ClickHousePrecision, d as ClickHouseRing, o as ClickHouseTTL, D as DateTime, q as DateTime64, s as DateTime64String, r as DateTimeString, B as Decimal, F as FixedString, t as Float32, u as Float64, v as Int16, w as Int32, x as Int64, I as Int8, J as JWT, K as Key, L as LowCardinality, y as UInt16, z as UInt32, A as UInt64, U as UInt8, W as WithDefault } from './browserCompatible-
|
|
2
|
-
import { K as ApiUtil, a4 as MooseClient } from './index-
|
|
3
|
-
export { A as Aggregated, h as Api, i as ApiConfig, ad as ApiHelpers, a5 as Blocks, a6 as ClickHouseEngines, C as ConsumptionApi, ae as ConsumptionHelpers, N as ConsumptionUtil, e as DeadLetter, D as DeadLetterModel, f as DeadLetterQueue, l as ETLPipeline, m as ETLPipelineConfig, E as EgressConfig, F as FrameworkApp, Q as IdentifierBrandedString, I as IngestApi, g as IngestConfig, j as IngestPipeline, L as LifeCycle, M as MaterializedView, R as NonIdentifierBrandedString, a as OlapConfig, O as OlapTable, aa as QueryClient, X as RawValue, b as S3QueueTableSettings, S as SimpleAggregated, Z as Sql, k as SqlResource, c as Stream, d as StreamConfig, T as Task, U as Value, V as View, n as WebApp, o as WebAppConfig, p as WebAppHandler, W as Workflow, ab as WorkflowClient, a2 as createClickhouseParameter, a8 as createMaterializedView, a7 as dropView, 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, ac as getTemporalClient, a1 as getValueFromParameter, J as getWebApp, H as getWebApps, G as getWorkflow, B as getWorkflows, af as joinQueries, a3 as mapToClickHouseType, a9 as populateTable, P as quoteIdentifier, Y as sql, $ as toQuery, a0 as toQueryPreview, _ as toStaticQuery } from './index-
|
|
1
|
+
export { C as ClickHouseByteSize, p as ClickHouseCodec, j as ClickHouseDecimal, n as ClickHouseDefault, k as ClickHouseFixedStringSize, l as ClickHouseFloat, a as ClickHouseInt, m as ClickHouseJson, e as ClickHouseLineString, f as ClickHouseMultiLineString, h as ClickHouseMultiPolygon, b as ClickHouseNamedTuple, c as ClickHousePoint, g as ClickHousePolygon, i as ClickHousePrecision, d as ClickHouseRing, o as ClickHouseTTL, D as DateTime, q as DateTime64, s as DateTime64String, r as DateTimeString, B as Decimal, F as FixedString, t as Float32, u as Float64, v as Int16, w as Int32, x as Int64, I as Int8, J as JWT, K as Key, L as LowCardinality, y as UInt16, z as UInt32, A as UInt64, U as UInt8, W as WithDefault } from './browserCompatible-mRmtV1to.js';
|
|
2
|
+
import { K as ApiUtil, a4 as MooseClient } from './index-DtHRzX8Z.js';
|
|
3
|
+
export { A as Aggregated, h as Api, i as ApiConfig, ad as ApiHelpers, a5 as Blocks, a6 as ClickHouseEngines, C as ConsumptionApi, ae as ConsumptionHelpers, N as ConsumptionUtil, e as DeadLetter, D as DeadLetterModel, f as DeadLetterQueue, l as ETLPipeline, m as ETLPipelineConfig, E as EgressConfig, F as FrameworkApp, Q as IdentifierBrandedString, I as IngestApi, g as IngestConfig, j as IngestPipeline, L as LifeCycle, M as MaterializedView, R as NonIdentifierBrandedString, a as OlapConfig, O as OlapTable, aa as QueryClient, X as RawValue, b as S3QueueTableSettings, S as SimpleAggregated, Z as Sql, k as SqlResource, c as Stream, d as StreamConfig, T as Task, U as Value, V as View, n as WebApp, o as WebAppConfig, p as WebAppHandler, W as Workflow, ab as WorkflowClient, a2 as createClickhouseParameter, a8 as createMaterializedView, a7 as dropView, 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, ac as getTemporalClient, a1 as getValueFromParameter, J as getWebApp, H as getWebApps, G as getWorkflow, B as getWorkflows, af as joinQueries, a3 as mapToClickHouseType, a9 as populateTable, P as quoteIdentifier, Y as sql, $ as toQuery, a0 as toQueryPreview, _ as toStaticQuery } from './index-DtHRzX8Z.js';
|
|
4
4
|
import * as _clickhouse_client from '@clickhouse/client';
|
|
5
5
|
import { KafkaJS } from '@confluentinc/kafka-javascript';
|
|
6
6
|
import http from 'http';
|
package/dist/index.js
CHANGED
|
@@ -460,24 +460,39 @@ __export(index_exports, {
|
|
|
460
460
|
});
|
|
461
461
|
module.exports = __toCommonJS(index_exports);
|
|
462
462
|
|
|
463
|
-
// src/dmv2/
|
|
464
|
-
function
|
|
463
|
+
// src/dmv2/utils/stackTrace.ts
|
|
464
|
+
function shouldSkipStackLine(line) {
|
|
465
|
+
return line.includes("node_modules") || // Skip npm installed packages (prod)
|
|
466
|
+
line.includes("internal/modules") || // Skip Node.js internals
|
|
467
|
+
line.includes("ts-node") || // Skip TypeScript execution
|
|
468
|
+
line.includes("/ts-moose-lib/") || // Skip dev/linked moose-lib (Unix)
|
|
469
|
+
line.includes("\\ts-moose-lib\\");
|
|
470
|
+
}
|
|
471
|
+
function parseStackLine(line) {
|
|
472
|
+
const match = line.match(/\((.*):(\d+):(\d+)\)/) || line.match(/at (.*):(\d+):(\d+)/);
|
|
473
|
+
if (match && match[1]) {
|
|
474
|
+
return {
|
|
475
|
+
file: match[1],
|
|
476
|
+
line: match[2]
|
|
477
|
+
};
|
|
478
|
+
}
|
|
479
|
+
return void 0;
|
|
480
|
+
}
|
|
481
|
+
function getSourceFileInfo(stack) {
|
|
465
482
|
if (!stack) return {};
|
|
466
483
|
const lines = stack.split("\n");
|
|
467
484
|
for (const line of lines) {
|
|
468
|
-
if (
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
if (match && match[1]) {
|
|
472
|
-
return {
|
|
473
|
-
file: match[1],
|
|
474
|
-
line: match[2]
|
|
475
|
-
// Only the line number
|
|
476
|
-
};
|
|
477
|
-
}
|
|
485
|
+
if (shouldSkipStackLine(line)) continue;
|
|
486
|
+
const info = parseStackLine(line);
|
|
487
|
+
if (info) return info;
|
|
478
488
|
}
|
|
479
489
|
return {};
|
|
480
490
|
}
|
|
491
|
+
function getSourceFileFromStack(stack) {
|
|
492
|
+
return getSourceFileInfo(stack).file;
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
// src/dmv2/typedBase.ts
|
|
481
496
|
var TypedBase = class {
|
|
482
497
|
/** The JSON schema representation of type T. Injected by the compiler plugin. */
|
|
483
498
|
schema;
|
|
@@ -521,7 +536,7 @@ var TypedBase = class {
|
|
|
521
536
|
this.metadata = config?.metadata ? { ...config.metadata } : {};
|
|
522
537
|
const stack = new Error().stack;
|
|
523
538
|
if (stack) {
|
|
524
|
-
const info =
|
|
539
|
+
const info = getSourceFileInfo(stack);
|
|
525
540
|
this.metadata.source = { file: info.file, line: info.line };
|
|
526
541
|
} else {
|
|
527
542
|
this.metadata.source = void 0;
|
|
@@ -1771,8 +1786,10 @@ var Stream = class extends TypedBase {
|
|
|
1771
1786
|
* @param config Optional configuration for this specific transformation step, like a version.
|
|
1772
1787
|
*/
|
|
1773
1788
|
addTransform(destination, transformation, config) {
|
|
1789
|
+
const sourceFile = getSourceFileFromStack(new Error().stack);
|
|
1774
1790
|
const transformConfig = {
|
|
1775
|
-
...config ?? {}
|
|
1791
|
+
...config ?? {},
|
|
1792
|
+
sourceFile
|
|
1776
1793
|
};
|
|
1777
1794
|
if (transformConfig.deadLetterQueue === void 0) {
|
|
1778
1795
|
transformConfig.deadLetterQueue = this.defaultDeadLetterQueue;
|
|
@@ -1799,8 +1816,10 @@ var Stream = class extends TypedBase {
|
|
|
1799
1816
|
* @param config Optional configuration for this specific consumer, like a version.
|
|
1800
1817
|
*/
|
|
1801
1818
|
addConsumer(consumer, config) {
|
|
1819
|
+
const sourceFile = getSourceFileFromStack(new Error().stack);
|
|
1802
1820
|
const consumerConfig = {
|
|
1803
|
-
...config ?? {}
|
|
1821
|
+
...config ?? {},
|
|
1822
|
+
sourceFile
|
|
1804
1823
|
};
|
|
1805
1824
|
if (consumerConfig.deadLetterQueue === void 0) {
|
|
1806
1825
|
consumerConfig.deadLetterQueue = this.defaultDeadLetterQueue;
|
|
@@ -2387,6 +2406,8 @@ var SqlResource = class {
|
|
|
2387
2406
|
pullsDataFrom;
|
|
2388
2407
|
/** List of OlapTables or Views that this resource writes data to. */
|
|
2389
2408
|
pushesDataTo;
|
|
2409
|
+
/** @internal Source file path where this resource was defined */
|
|
2410
|
+
sourceFile;
|
|
2390
2411
|
/**
|
|
2391
2412
|
* Creates a new SqlResource instance.
|
|
2392
2413
|
* @param name The name of the resource.
|
|
@@ -2411,6 +2432,8 @@ var SqlResource = class {
|
|
|
2411
2432
|
);
|
|
2412
2433
|
this.pullsDataFrom = options?.pullsDataFrom ?? [];
|
|
2413
2434
|
this.pushesDataTo = options?.pushesDataTo ?? [];
|
|
2435
|
+
const stack = new Error().stack;
|
|
2436
|
+
this.sourceFile = getSourceFileFromStack(stack);
|
|
2414
2437
|
}
|
|
2415
2438
|
};
|
|
2416
2439
|
|