@514labs/moose-lib 0.6.264 → 0.6.266
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-Bqhjy4pn.d.ts → browserCompatible-CpjUXotI.d.ts} +1 -1
- package/dist/{browserCompatible-DTtKuO-Y.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 +31 -12
- package/dist/browserCompatible.js.map +1 -1
- package/dist/browserCompatible.mjs +31 -12
- package/dist/browserCompatible.mjs.map +1 -1
- package/dist/compilerPlugin.js +43 -3
- package/dist/compilerPlugin.js.map +1 -1
- package/dist/compilerPlugin.mjs +43 -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 +31 -12
- package/dist/dmv2/index.js.map +1 -1
- package/dist/dmv2/index.mjs +31 -12
- package/dist/dmv2/index.mjs.map +1 -1
- package/dist/{index-CQB6bk1i.d.mts → index-Dd3ZmpTq.d.mts} +25 -6
- package/dist/{index-CQB6bk1i.d.ts → index-Dd3ZmpTq.d.ts} +25 -6
- package/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +31 -12
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +31 -12
- package/dist/index.mjs.map +1 -1
- package/dist/moose-runner.js +2 -1
- package/dist/moose-runner.js.map +1 -1
- package/dist/moose-runner.mjs +2 -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';
|
|
@@ -500,6 +500,12 @@ var TypedBase = class {
|
|
|
500
500
|
validators;
|
|
501
501
|
/** Optional metadata for the resource, always present as an object. */
|
|
502
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;
|
|
503
509
|
/**
|
|
504
510
|
* @internal Constructor intended for internal use by subclasses and the compiler plugin.
|
|
505
511
|
* It expects the schema and columns to be provided, typically injected by the compiler.
|
|
@@ -508,8 +514,9 @@ var TypedBase = class {
|
|
|
508
514
|
* @param config The configuration object for the resource.
|
|
509
515
|
* @param schema The JSON schema for the resource's data type T (injected).
|
|
510
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).
|
|
511
518
|
*/
|
|
512
|
-
constructor(name, config, schema, columns, validators) {
|
|
519
|
+
constructor(name, config, schema, columns, validators, allowExtraFields) {
|
|
513
520
|
if (schema === void 0 || columns === void 0) {
|
|
514
521
|
throw new Error(
|
|
515
522
|
"Supply the type param T so that the schema is inserted by the compiler plugin."
|
|
@@ -525,6 +532,7 @@ var TypedBase = class {
|
|
|
525
532
|
this.name = name;
|
|
526
533
|
this.config = config;
|
|
527
534
|
this.validators = validators;
|
|
535
|
+
this.allowExtraFields = allowExtraFields ?? false;
|
|
528
536
|
this.metadata = config?.metadata ? { ...config.metadata } : {};
|
|
529
537
|
const stack = new Error().stack;
|
|
530
538
|
if (stack) {
|
|
@@ -1588,8 +1596,8 @@ var Stream = class extends TypedBase {
|
|
|
1588
1596
|
_memoizedProducer;
|
|
1589
1597
|
/** @internal Hash of the configuration used to create the memoized Kafka producer */
|
|
1590
1598
|
_kafkaConfigHash;
|
|
1591
|
-
constructor(name, config, schema, columns) {
|
|
1592
|
-
super(name, config ?? {}, schema, columns);
|
|
1599
|
+
constructor(name, config, schema, columns, validators, allowExtraFields) {
|
|
1600
|
+
super(name, config ?? {}, schema, columns, void 0, allowExtraFields);
|
|
1593
1601
|
const streams = getMooseInternal().streams;
|
|
1594
1602
|
if (streams.has(name)) {
|
|
1595
1603
|
throw new Error(`Stream with name ${name} already exists`);
|
|
@@ -1845,7 +1853,7 @@ var DeadLetterQueue = class extends Stream {
|
|
|
1845
1853
|
"Supply the type param T so that the schema is inserted by the compiler plugin."
|
|
1846
1854
|
);
|
|
1847
1855
|
}
|
|
1848
|
-
super(name, config ?? {}, dlqSchema, dlqColumns);
|
|
1856
|
+
super(name, config ?? {}, dlqSchema, dlqColumns, void 0, false);
|
|
1849
1857
|
this.typeGuard = typeGuard;
|
|
1850
1858
|
getMooseInternal().streams.set(name, this);
|
|
1851
1859
|
}
|
|
@@ -2011,8 +2019,8 @@ var Workflow = class {
|
|
|
2011
2019
|
|
|
2012
2020
|
// src/dmv2/sdk/ingestApi.ts
|
|
2013
2021
|
var IngestApi = class extends TypedBase {
|
|
2014
|
-
constructor(name, config, schema, columns) {
|
|
2015
|
-
super(name, config, schema, columns);
|
|
2022
|
+
constructor(name, config, schema, columns, validators, allowExtraFields) {
|
|
2023
|
+
super(name, config, schema, columns, void 0, allowExtraFields);
|
|
2016
2024
|
const ingestApis = getMooseInternal().ingestApis;
|
|
2017
2025
|
if (ingestApis.has(name)) {
|
|
2018
2026
|
throw new Error(`Ingest API with name ${name} already exists`);
|
|
@@ -2151,8 +2159,8 @@ var IngestPipeline = class extends TypedBase {
|
|
|
2151
2159
|
ingestApi;
|
|
2152
2160
|
/** The dead letter queue of the pipeline, if configured. */
|
|
2153
2161
|
deadLetterQueue;
|
|
2154
|
-
constructor(name, config, schema, columns, validators) {
|
|
2155
|
-
super(name, config, schema, columns, validators);
|
|
2162
|
+
constructor(name, config, schema, columns, validators, allowExtraFields) {
|
|
2163
|
+
super(name, config, schema, columns, validators, allowExtraFields);
|
|
2156
2164
|
if (config.ingest !== void 0) {
|
|
2157
2165
|
console.warn(
|
|
2158
2166
|
"\u26A0\uFE0F DEPRECATION WARNING: The 'ingest' parameter is deprecated and will be removed in a future version. Please use 'ingestApi' instead."
|
|
@@ -2164,6 +2172,7 @@ var IngestPipeline = class extends TypedBase {
|
|
|
2164
2172
|
if (config.table) {
|
|
2165
2173
|
const tableConfig = typeof config.table === "object" ? {
|
|
2166
2174
|
...config.table,
|
|
2175
|
+
lifeCycle: config.table.lifeCycle ?? config.lifeCycle,
|
|
2167
2176
|
...config.version && { version: config.version }
|
|
2168
2177
|
} : {
|
|
2169
2178
|
lifeCycle: config.lifeCycle,
|
|
@@ -2181,7 +2190,10 @@ var IngestPipeline = class extends TypedBase {
|
|
|
2181
2190
|
if (config.deadLetterQueue) {
|
|
2182
2191
|
const streamConfig = {
|
|
2183
2192
|
destination: void 0,
|
|
2184
|
-
...typeof config.deadLetterQueue === "object" ?
|
|
2193
|
+
...typeof config.deadLetterQueue === "object" ? {
|
|
2194
|
+
...config.deadLetterQueue,
|
|
2195
|
+
lifeCycle: config.deadLetterQueue.lifeCycle ?? config.lifeCycle
|
|
2196
|
+
} : { lifeCycle: config.lifeCycle },
|
|
2185
2197
|
...config.version && { version: config.version }
|
|
2186
2198
|
};
|
|
2187
2199
|
this.deadLetterQueue = new DeadLetterQueue(
|
|
@@ -2194,14 +2206,19 @@ var IngestPipeline = class extends TypedBase {
|
|
|
2194
2206
|
const streamConfig = {
|
|
2195
2207
|
destination: this.table,
|
|
2196
2208
|
defaultDeadLetterQueue: this.deadLetterQueue,
|
|
2197
|
-
...typeof config.stream === "object" ?
|
|
2209
|
+
...typeof config.stream === "object" ? {
|
|
2210
|
+
...config.stream,
|
|
2211
|
+
lifeCycle: config.stream.lifeCycle ?? config.lifeCycle
|
|
2212
|
+
} : { lifeCycle: config.lifeCycle },
|
|
2198
2213
|
...config.version && { version: config.version }
|
|
2199
2214
|
};
|
|
2200
2215
|
this.stream = new Stream(
|
|
2201
2216
|
name,
|
|
2202
2217
|
streamConfig,
|
|
2203
2218
|
this.schema,
|
|
2204
|
-
this.columnArray
|
|
2219
|
+
this.columnArray,
|
|
2220
|
+
void 0,
|
|
2221
|
+
this.allowExtraFields
|
|
2205
2222
|
);
|
|
2206
2223
|
this.stream.pipelineParent = this;
|
|
2207
2224
|
}
|
|
@@ -2221,7 +2238,9 @@ var IngestPipeline = class extends TypedBase {
|
|
|
2221
2238
|
name,
|
|
2222
2239
|
ingestConfig,
|
|
2223
2240
|
this.schema,
|
|
2224
|
-
this.columnArray
|
|
2241
|
+
this.columnArray,
|
|
2242
|
+
void 0,
|
|
2243
|
+
this.allowExtraFields
|
|
2225
2244
|
);
|
|
2226
2245
|
this.ingestApi.pipelineParent = this;
|
|
2227
2246
|
}
|