@514labs/moose-lib 0.6.262 → 0.6.263-ci-10-gc7213e03
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-CC6Jamxn.d.ts → browserCompatible-CpjUXotI.d.ts} +1 -1
- package/dist/{browserCompatible-GsBQtLKo.d.mts → browserCompatible-fk6xPzoB.d.mts} +1 -1
- package/dist/browserCompatible.d.mts +2 -2
- package/dist/browserCompatible.d.ts +2 -2
- package/dist/browserCompatible.js +60 -12
- package/dist/browserCompatible.js.map +1 -1
- package/dist/browserCompatible.mjs +60 -12
- package/dist/browserCompatible.mjs.map +1 -1
- package/dist/compilerPlugin.js +35 -3
- package/dist/compilerPlugin.js.map +1 -1
- package/dist/compilerPlugin.mjs +35 -3
- package/dist/compilerPlugin.mjs.map +1 -1
- package/dist/dataModels/toDataModels.js +2 -2
- package/dist/dataModels/toDataModels.js.map +1 -1
- package/dist/dataModels/toDataModels.mjs +2 -2
- 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 +60 -12
- package/dist/dmv2/index.js.map +1 -1
- package/dist/dmv2/index.mjs +60 -12
- package/dist/dmv2/index.mjs.map +1 -1
- package/dist/{index-B1HsstjQ.d.mts → index-Dd3ZmpTq.d.mts} +29 -6
- package/dist/{index-B1HsstjQ.d.ts → index-Dd3ZmpTq.d.ts} +29 -6
- package/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +60 -12
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +60 -12
- package/dist/index.mjs.map +1 -1
- package/dist/moose-runner.js +4 -1
- package/dist/moose-runner.js.map +1 -1
- package/dist/moose-runner.mjs +4 -1
- package/dist/moose-runner.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { A as Aggregated, h as Api, i as ApiConfig, K as ApiUtil, C as ConsumptionApi, 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, 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, a2 as createClickhouseParameter, 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, a1 as getValueFromParameter, J as getWebApp, H as getWebApps, G as getWorkflow, B as getWorkflows, a3 as mapToClickHouseType, P as quoteIdentifier, Y as sql, $ as toQuery, a0 as toQueryPreview, _ as toStaticQuery } from './index-
|
|
2
|
-
export { C as ClickHouseByteSize, q as ClickHouseCodec, j as ClickHouseDecimal, n as ClickHouseDefault, k as ClickHouseFixedStringSize, l as ClickHouseFloat, a as ClickHouseInt, m as ClickHouseJson, p as ClickHouseMaterialized, b as ClickHouseNamedTuple, i as ClickHousePrecision, o as ClickHouseTTL, D as DateTime, r as DateTime64, t as DateTime64String, s as DateTimeString, E as Decimal, F as FixedString, u as Float32, v as Float64, w as Int16, x as Int32, y as Int64, I as Int8, J as JWT, K as Key, L as LowCardinality, z as UInt16, A as UInt32, B as UInt64, U as UInt8, W as WithDefault } from './browserCompatible-
|
|
1
|
+
export { A as Aggregated, h as Api, i as ApiConfig, K as ApiUtil, C as ConsumptionApi, 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, 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, a2 as createClickhouseParameter, 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, a1 as getValueFromParameter, J as getWebApp, H as getWebApps, G as getWorkflow, B as getWorkflows, a3 as mapToClickHouseType, P as quoteIdentifier, Y as sql, $ as toQuery, a0 as toQueryPreview, _ as toStaticQuery } from './index-Dd3ZmpTq.mjs';
|
|
2
|
+
export { C as ClickHouseByteSize, q as ClickHouseCodec, j as ClickHouseDecimal, n as ClickHouseDefault, k as ClickHouseFixedStringSize, l as ClickHouseFloat, a as ClickHouseInt, m as ClickHouseJson, p as ClickHouseMaterialized, b as ClickHouseNamedTuple, i as ClickHousePrecision, o as ClickHouseTTL, D as DateTime, r as DateTime64, t as DateTime64String, s as DateTimeString, E as Decimal, F as FixedString, u as Float32, v as Float64, w as Int16, x as Int32, y as Int64, I as Int8, J as JWT, K as Key, L as LowCardinality, z as UInt16, A as UInt32, B as UInt64, U as UInt8, W as WithDefault } from './browserCompatible-fk6xPzoB.mjs';
|
|
3
3
|
import 'typia';
|
|
4
4
|
import 'typia/src/schemas/json/IJsonSchemaCollection';
|
|
5
5
|
import 'node:stream';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { A as Aggregated, h as Api, i as ApiConfig, K as ApiUtil, C as ConsumptionApi, 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, 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, a2 as createClickhouseParameter, 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, a1 as getValueFromParameter, J as getWebApp, H as getWebApps, G as getWorkflow, B as getWorkflows, a3 as mapToClickHouseType, P as quoteIdentifier, Y as sql, $ as toQuery, a0 as toQueryPreview, _ as toStaticQuery } from './index-
|
|
2
|
-
export { C as ClickHouseByteSize, q as ClickHouseCodec, j as ClickHouseDecimal, n as ClickHouseDefault, k as ClickHouseFixedStringSize, l as ClickHouseFloat, a as ClickHouseInt, m as ClickHouseJson, p as ClickHouseMaterialized, b as ClickHouseNamedTuple, i as ClickHousePrecision, o as ClickHouseTTL, D as DateTime, r as DateTime64, t as DateTime64String, s as DateTimeString, E as Decimal, F as FixedString, u as Float32, v as Float64, w as Int16, x as Int32, y as Int64, I as Int8, J as JWT, K as Key, L as LowCardinality, z as UInt16, A as UInt32, B as UInt64, U as UInt8, W as WithDefault } from './browserCompatible-
|
|
1
|
+
export { A as Aggregated, h as Api, i as ApiConfig, K as ApiUtil, C as ConsumptionApi, 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, 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, a2 as createClickhouseParameter, 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, a1 as getValueFromParameter, J as getWebApp, H as getWebApps, G as getWorkflow, B as getWorkflows, a3 as mapToClickHouseType, P as quoteIdentifier, Y as sql, $ as toQuery, a0 as toQueryPreview, _ as toStaticQuery } from './index-Dd3ZmpTq.js';
|
|
2
|
+
export { C as ClickHouseByteSize, q as ClickHouseCodec, j as ClickHouseDecimal, n as ClickHouseDefault, k as ClickHouseFixedStringSize, l as ClickHouseFloat, a as ClickHouseInt, m as ClickHouseJson, p as ClickHouseMaterialized, b as ClickHouseNamedTuple, i as ClickHousePrecision, o as ClickHouseTTL, D as DateTime, r as DateTime64, t as DateTime64String, s as DateTimeString, E as Decimal, F as FixedString, u as Float32, v as Float64, w as Int16, x as Int32, y as Int64, I as Int8, J as JWT, K as Key, L as LowCardinality, z as UInt16, A as UInt32, B as UInt64, U as UInt8, W as WithDefault } from './browserCompatible-CpjUXotI.js';
|
|
3
3
|
import 'typia';
|
|
4
4
|
import 'typia/src/schemas/json/IJsonSchemaCollection';
|
|
5
5
|
import 'node:stream';
|
|
@@ -453,8 +453,35 @@ function getSourceFileInfo(stack) {
|
|
|
453
453
|
}
|
|
454
454
|
return {};
|
|
455
455
|
}
|
|
456
|
+
function getSourceLocationFromStack(stack) {
|
|
457
|
+
if (!stack) return void 0;
|
|
458
|
+
const lines = stack.split("\n");
|
|
459
|
+
for (const line of lines.slice(1)) {
|
|
460
|
+
if (shouldSkipStackLine(line)) {
|
|
461
|
+
continue;
|
|
462
|
+
}
|
|
463
|
+
const v8Match = line.match(/at\s+(?:.*?\s+\()?(.+):(\d+):(\d+)\)?/);
|
|
464
|
+
if (v8Match) {
|
|
465
|
+
return {
|
|
466
|
+
file: v8Match[1],
|
|
467
|
+
line: parseInt(v8Match[2], 10),
|
|
468
|
+
column: parseInt(v8Match[3], 10)
|
|
469
|
+
};
|
|
470
|
+
}
|
|
471
|
+
const smMatch = line.match(/(?:.*@)?(.+):(\d+):(\d+)/);
|
|
472
|
+
if (smMatch) {
|
|
473
|
+
return {
|
|
474
|
+
file: smMatch[1],
|
|
475
|
+
line: parseInt(smMatch[2], 10),
|
|
476
|
+
column: parseInt(smMatch[3], 10)
|
|
477
|
+
};
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
return void 0;
|
|
481
|
+
}
|
|
456
482
|
function getSourceFileFromStack(stack) {
|
|
457
|
-
|
|
483
|
+
const location = getSourceLocationFromStack(stack);
|
|
484
|
+
return location?.file;
|
|
458
485
|
}
|
|
459
486
|
|
|
460
487
|
// src/dmv2/typedBase.ts
|
|
@@ -473,6 +500,12 @@ var TypedBase = class {
|
|
|
473
500
|
validators;
|
|
474
501
|
/** Optional metadata for the resource, always present as an object. */
|
|
475
502
|
metadata;
|
|
503
|
+
/**
|
|
504
|
+
* Whether this resource allows extra fields beyond the defined columns.
|
|
505
|
+
* When true, extra fields in payloads are passed through to streaming functions.
|
|
506
|
+
* Injected by the compiler plugin when the type has an index signature.
|
|
507
|
+
*/
|
|
508
|
+
allowExtraFields;
|
|
476
509
|
/**
|
|
477
510
|
* @internal Constructor intended for internal use by subclasses and the compiler plugin.
|
|
478
511
|
* It expects the schema and columns to be provided, typically injected by the compiler.
|
|
@@ -481,8 +514,9 @@ var TypedBase = class {
|
|
|
481
514
|
* @param config The configuration object for the resource.
|
|
482
515
|
* @param schema The JSON schema for the resource's data type T (injected).
|
|
483
516
|
* @param columns The array of Column definitions for T (injected).
|
|
517
|
+
* @param allowExtraFields Whether extra fields are allowed (injected when type has index signature).
|
|
484
518
|
*/
|
|
485
|
-
constructor(name, config, schema, columns, validators) {
|
|
519
|
+
constructor(name, config, schema, columns, validators, allowExtraFields) {
|
|
486
520
|
if (schema === void 0 || columns === void 0) {
|
|
487
521
|
throw new Error(
|
|
488
522
|
"Supply the type param T so that the schema is inserted by the compiler plugin."
|
|
@@ -498,6 +532,7 @@ var TypedBase = class {
|
|
|
498
532
|
this.name = name;
|
|
499
533
|
this.config = config;
|
|
500
534
|
this.validators = validators;
|
|
535
|
+
this.allowExtraFields = allowExtraFields ?? false;
|
|
501
536
|
this.metadata = config?.metadata ? { ...config.metadata } : {};
|
|
502
537
|
const stack = new Error().stack;
|
|
503
538
|
if (stack) {
|
|
@@ -1561,8 +1596,8 @@ var Stream = class extends TypedBase {
|
|
|
1561
1596
|
_memoizedProducer;
|
|
1562
1597
|
/** @internal Hash of the configuration used to create the memoized Kafka producer */
|
|
1563
1598
|
_kafkaConfigHash;
|
|
1564
|
-
constructor(name, config, schema, columns) {
|
|
1565
|
-
super(name, config ?? {}, schema, columns);
|
|
1599
|
+
constructor(name, config, schema, columns, validators, allowExtraFields) {
|
|
1600
|
+
super(name, config ?? {}, schema, columns, void 0, allowExtraFields);
|
|
1566
1601
|
const streams = getMooseInternal().streams;
|
|
1567
1602
|
if (streams.has(name)) {
|
|
1568
1603
|
throw new Error(`Stream with name ${name} already exists`);
|
|
@@ -1818,7 +1853,7 @@ var DeadLetterQueue = class extends Stream {
|
|
|
1818
1853
|
"Supply the type param T so that the schema is inserted by the compiler plugin."
|
|
1819
1854
|
);
|
|
1820
1855
|
}
|
|
1821
|
-
super(name, config ?? {}, dlqSchema, dlqColumns);
|
|
1856
|
+
super(name, config ?? {}, dlqSchema, dlqColumns, void 0, false);
|
|
1822
1857
|
this.typeGuard = typeGuard;
|
|
1823
1858
|
getMooseInternal().streams.set(name, this);
|
|
1824
1859
|
}
|
|
@@ -1984,8 +2019,8 @@ var Workflow = class {
|
|
|
1984
2019
|
|
|
1985
2020
|
// src/dmv2/sdk/ingestApi.ts
|
|
1986
2021
|
var IngestApi = class extends TypedBase {
|
|
1987
|
-
constructor(name, config, schema, columns) {
|
|
1988
|
-
super(name, config, schema, columns);
|
|
2022
|
+
constructor(name, config, schema, columns, validators, allowExtraFields) {
|
|
2023
|
+
super(name, config, schema, columns, void 0, allowExtraFields);
|
|
1989
2024
|
const ingestApis = getMooseInternal().ingestApis;
|
|
1990
2025
|
if (ingestApis.has(name)) {
|
|
1991
2026
|
throw new Error(`Ingest API with name ${name} already exists`);
|
|
@@ -2124,8 +2159,8 @@ var IngestPipeline = class extends TypedBase {
|
|
|
2124
2159
|
ingestApi;
|
|
2125
2160
|
/** The dead letter queue of the pipeline, if configured. */
|
|
2126
2161
|
deadLetterQueue;
|
|
2127
|
-
constructor(name, config, schema, columns, validators) {
|
|
2128
|
-
super(name, config, schema, columns, validators);
|
|
2162
|
+
constructor(name, config, schema, columns, validators, allowExtraFields) {
|
|
2163
|
+
super(name, config, schema, columns, validators, allowExtraFields);
|
|
2129
2164
|
if (config.ingest !== void 0) {
|
|
2130
2165
|
console.warn(
|
|
2131
2166
|
"\u26A0\uFE0F DEPRECATION WARNING: The 'ingest' parameter is deprecated and will be removed in a future version. Please use 'ingestApi' instead."
|
|
@@ -2174,7 +2209,9 @@ var IngestPipeline = class extends TypedBase {
|
|
|
2174
2209
|
name,
|
|
2175
2210
|
streamConfig,
|
|
2176
2211
|
this.schema,
|
|
2177
|
-
this.columnArray
|
|
2212
|
+
this.columnArray,
|
|
2213
|
+
void 0,
|
|
2214
|
+
this.allowExtraFields
|
|
2178
2215
|
);
|
|
2179
2216
|
this.stream.pipelineParent = this;
|
|
2180
2217
|
}
|
|
@@ -2194,7 +2231,9 @@ var IngestPipeline = class extends TypedBase {
|
|
|
2194
2231
|
name,
|
|
2195
2232
|
ingestConfig,
|
|
2196
2233
|
this.schema,
|
|
2197
|
-
this.columnArray
|
|
2234
|
+
this.columnArray,
|
|
2235
|
+
void 0,
|
|
2236
|
+
this.allowExtraFields
|
|
2198
2237
|
);
|
|
2199
2238
|
this.ingestApi.pipelineParent = this;
|
|
2200
2239
|
}
|
|
@@ -2359,6 +2398,10 @@ var SqlResource = class {
|
|
|
2359
2398
|
pushesDataTo;
|
|
2360
2399
|
/** @internal Source file path where this resource was defined */
|
|
2361
2400
|
sourceFile;
|
|
2401
|
+
/** @internal Source line number where this resource was defined */
|
|
2402
|
+
sourceLine;
|
|
2403
|
+
/** @internal Source column number where this resource was defined */
|
|
2404
|
+
sourceColumn;
|
|
2362
2405
|
/**
|
|
2363
2406
|
* Creates a new SqlResource instance.
|
|
2364
2407
|
* @param name The name of the resource.
|
|
@@ -2384,7 +2427,12 @@ var SqlResource = class {
|
|
|
2384
2427
|
this.pullsDataFrom = options?.pullsDataFrom ?? [];
|
|
2385
2428
|
this.pushesDataTo = options?.pushesDataTo ?? [];
|
|
2386
2429
|
const stack = new Error().stack;
|
|
2387
|
-
|
|
2430
|
+
const location = getSourceLocationFromStack(stack);
|
|
2431
|
+
if (location) {
|
|
2432
|
+
this.sourceFile = location.file;
|
|
2433
|
+
this.sourceLine = location.line;
|
|
2434
|
+
this.sourceColumn = location.column;
|
|
2435
|
+
}
|
|
2388
2436
|
}
|
|
2389
2437
|
};
|
|
2390
2438
|
|