@514labs/moose-lib 0.6.238-ci-6-g1a6f273f → 0.6.239-ci-14-g85f6cfc1
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-CKgEUuZc.d.ts → browserCompatible-bG7qUssc.d.mts} +2 -26
- package/dist/{browserCompatible-DCc9Zd_X.d.mts → browserCompatible-mRmtV1to.d.ts} +2 -26
- package/dist/browserCompatible.d.mts +2 -2
- package/dist/browserCompatible.d.ts +2 -2
- package/dist/browserCompatible.js +43 -25
- package/dist/browserCompatible.js.map +1 -1
- package/dist/browserCompatible.mjs +43 -25
- package/dist/browserCompatible.mjs.map +1 -1
- package/dist/compilerPlugin.js +1 -25
- package/dist/compilerPlugin.js.map +1 -1
- package/dist/compilerPlugin.mjs +1 -25
- package/dist/compilerPlugin.mjs.map +1 -1
- package/dist/dataModels/toDataModels.js +1 -25
- package/dist/dataModels/toDataModels.js.map +1 -1
- package/dist/dataModels/toDataModels.mjs +1 -25
- package/dist/dataModels/toDataModels.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 +43 -25
- package/dist/dmv2/index.js.map +1 -1
- package/dist/dmv2/index.mjs +43 -25
- package/dist/dmv2/index.mjs.map +1 -1
- package/dist/{index-CYFF3a0J.d.mts → index-DtHRzX8Z.d.mts} +12 -1
- package/dist/{index-CYFF3a0J.d.ts → index-DtHRzX8Z.d.ts} +12 -1
- package/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +43 -25
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +43 -25
- 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
|
@@ -104,7 +104,6 @@ interface Column {
|
|
|
104
104
|
unique: false;
|
|
105
105
|
primary_key: boolean;
|
|
106
106
|
default: string | null;
|
|
107
|
-
materialized: string | null;
|
|
108
107
|
ttl: string | null;
|
|
109
108
|
codec: string | null;
|
|
110
109
|
annotations: [string, any][];
|
|
@@ -989,6 +988,11 @@ interface TransformConfig<T> {
|
|
|
989
988
|
* unless a DeadLetterQueue is provided, or it is explicitly disabled with a null value
|
|
990
989
|
*/
|
|
991
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;
|
|
992
996
|
}
|
|
993
997
|
/**
|
|
994
998
|
* Configuration options for stream consumers.
|
|
@@ -1008,6 +1012,11 @@ interface ConsumerConfig<T> {
|
|
|
1008
1012
|
* unless a DeadLetterQueue is provided, or it is explicitly disabled with a null value
|
|
1009
1013
|
*/
|
|
1010
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;
|
|
1011
1020
|
}
|
|
1012
1021
|
type SchemaRegistryEncoding = "JSON" | "AVRO" | "PROTOBUF";
|
|
1013
1022
|
type SchemaRegistryReference = {
|
|
@@ -1797,6 +1806,8 @@ declare class SqlResource {
|
|
|
1797
1806
|
pullsDataFrom: SqlObject[];
|
|
1798
1807
|
/** List of OlapTables or Views that this resource writes data to. */
|
|
1799
1808
|
pushesDataTo: SqlObject[];
|
|
1809
|
+
/** @internal Source file path where this resource was defined */
|
|
1810
|
+
sourceFile?: string;
|
|
1800
1811
|
/**
|
|
1801
1812
|
* Creates a new SqlResource instance.
|
|
1802
1813
|
* @param name The name of the resource.
|
|
@@ -104,7 +104,6 @@ interface Column {
|
|
|
104
104
|
unique: false;
|
|
105
105
|
primary_key: boolean;
|
|
106
106
|
default: string | null;
|
|
107
|
-
materialized: string | null;
|
|
108
107
|
ttl: string | null;
|
|
109
108
|
codec: string | null;
|
|
110
109
|
annotations: [string, any][];
|
|
@@ -989,6 +988,11 @@ interface TransformConfig<T> {
|
|
|
989
988
|
* unless a DeadLetterQueue is provided, or it is explicitly disabled with a null value
|
|
990
989
|
*/
|
|
991
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;
|
|
992
996
|
}
|
|
993
997
|
/**
|
|
994
998
|
* Configuration options for stream consumers.
|
|
@@ -1008,6 +1012,11 @@ interface ConsumerConfig<T> {
|
|
|
1008
1012
|
* unless a DeadLetterQueue is provided, or it is explicitly disabled with a null value
|
|
1009
1013
|
*/
|
|
1010
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;
|
|
1011
1020
|
}
|
|
1012
1021
|
type SchemaRegistryEncoding = "JSON" | "AVRO" | "PROTOBUF";
|
|
1013
1022
|
type SchemaRegistryReference = {
|
|
@@ -1797,6 +1806,8 @@ declare class SqlResource {
|
|
|
1797
1806
|
pullsDataFrom: SqlObject[];
|
|
1798
1807
|
/** List of OlapTables or Views that this resource writes data to. */
|
|
1799
1808
|
pushesDataTo: SqlObject[];
|
|
1809
|
+
/** @internal Source file path where this resource was defined */
|
|
1810
|
+
sourceFile?: string;
|
|
1800
1811
|
/**
|
|
1801
1812
|
* Creates a new SqlResource instance.
|
|
1802
1813
|
* @param name The name of the resource.
|
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { C as ClickHouseByteSize,
|
|
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,
|
|
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;
|
|
@@ -835,8 +850,7 @@ var dlqColumns = [
|
|
|
835
850
|
default: null,
|
|
836
851
|
annotations: [],
|
|
837
852
|
ttl: null,
|
|
838
|
-
codec: null
|
|
839
|
-
materialized: null
|
|
853
|
+
codec: null
|
|
840
854
|
},
|
|
841
855
|
{
|
|
842
856
|
name: "errorMessage",
|
|
@@ -847,8 +861,7 @@ var dlqColumns = [
|
|
|
847
861
|
default: null,
|
|
848
862
|
annotations: [],
|
|
849
863
|
ttl: null,
|
|
850
|
-
codec: null
|
|
851
|
-
materialized: null
|
|
864
|
+
codec: null
|
|
852
865
|
},
|
|
853
866
|
{
|
|
854
867
|
name: "errorType",
|
|
@@ -859,8 +872,7 @@ var dlqColumns = [
|
|
|
859
872
|
default: null,
|
|
860
873
|
annotations: [],
|
|
861
874
|
ttl: null,
|
|
862
|
-
codec: null
|
|
863
|
-
materialized: null
|
|
875
|
+
codec: null
|
|
864
876
|
},
|
|
865
877
|
{
|
|
866
878
|
name: "failedAt",
|
|
@@ -871,8 +883,7 @@ var dlqColumns = [
|
|
|
871
883
|
default: null,
|
|
872
884
|
annotations: [],
|
|
873
885
|
ttl: null,
|
|
874
|
-
codec: null
|
|
875
|
-
materialized: null
|
|
886
|
+
codec: null
|
|
876
887
|
},
|
|
877
888
|
{
|
|
878
889
|
name: "source",
|
|
@@ -883,8 +894,7 @@ var dlqColumns = [
|
|
|
883
894
|
default: null,
|
|
884
895
|
annotations: [],
|
|
885
896
|
ttl: null,
|
|
886
|
-
codec: null
|
|
887
|
-
materialized: null
|
|
897
|
+
codec: null
|
|
888
898
|
}
|
|
889
899
|
];
|
|
890
900
|
var getWorkflows = async () => {
|
|
@@ -1776,8 +1786,10 @@ var Stream = class extends TypedBase {
|
|
|
1776
1786
|
* @param config Optional configuration for this specific transformation step, like a version.
|
|
1777
1787
|
*/
|
|
1778
1788
|
addTransform(destination, transformation, config) {
|
|
1789
|
+
const sourceFile = getSourceFileFromStack(new Error().stack);
|
|
1779
1790
|
const transformConfig = {
|
|
1780
|
-
...config ?? {}
|
|
1791
|
+
...config ?? {},
|
|
1792
|
+
sourceFile
|
|
1781
1793
|
};
|
|
1782
1794
|
if (transformConfig.deadLetterQueue === void 0) {
|
|
1783
1795
|
transformConfig.deadLetterQueue = this.defaultDeadLetterQueue;
|
|
@@ -1804,8 +1816,10 @@ var Stream = class extends TypedBase {
|
|
|
1804
1816
|
* @param config Optional configuration for this specific consumer, like a version.
|
|
1805
1817
|
*/
|
|
1806
1818
|
addConsumer(consumer, config) {
|
|
1819
|
+
const sourceFile = getSourceFileFromStack(new Error().stack);
|
|
1807
1820
|
const consumerConfig = {
|
|
1808
|
-
...config ?? {}
|
|
1821
|
+
...config ?? {},
|
|
1822
|
+
sourceFile
|
|
1809
1823
|
};
|
|
1810
1824
|
if (consumerConfig.deadLetterQueue === void 0) {
|
|
1811
1825
|
consumerConfig.deadLetterQueue = this.defaultDeadLetterQueue;
|
|
@@ -2392,6 +2406,8 @@ var SqlResource = class {
|
|
|
2392
2406
|
pullsDataFrom;
|
|
2393
2407
|
/** List of OlapTables or Views that this resource writes data to. */
|
|
2394
2408
|
pushesDataTo;
|
|
2409
|
+
/** @internal Source file path where this resource was defined */
|
|
2410
|
+
sourceFile;
|
|
2395
2411
|
/**
|
|
2396
2412
|
* Creates a new SqlResource instance.
|
|
2397
2413
|
* @param name The name of the resource.
|
|
@@ -2416,6 +2432,8 @@ var SqlResource = class {
|
|
|
2416
2432
|
);
|
|
2417
2433
|
this.pullsDataFrom = options?.pullsDataFrom ?? [];
|
|
2418
2434
|
this.pushesDataTo = options?.pushesDataTo ?? [];
|
|
2435
|
+
const stack = new Error().stack;
|
|
2436
|
+
this.sourceFile = getSourceFileFromStack(stack);
|
|
2419
2437
|
}
|
|
2420
2438
|
};
|
|
2421
2439
|
|