@514labs/moose-lib 0.6.239-ci-1-g1e5af572 → 0.6.239-ci-6-g7634f0cb
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-CMLITD0_.d.ts → browserCompatible-B3DCF1U4.d.ts} +1 -1
- package/dist/{browserCompatible-BRa8sgXw.d.mts → browserCompatible-BonAvoqJ.d.mts} +1 -1
- package/dist/browserCompatible.d.mts +2 -2
- package/dist/browserCompatible.d.ts +2 -2
- package/dist/browserCompatible.js +24 -16
- package/dist/browserCompatible.js.map +1 -1
- package/dist/browserCompatible.mjs +24 -16
- 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 +24 -16
- package/dist/dmv2/index.js.map +1 -1
- package/dist/dmv2/index.mjs +24 -16
- package/dist/dmv2/index.mjs.map +1 -1
- package/dist/{index-BG2HP0xG.d.mts → index-DsCMbhN3.d.mts} +13 -4
- package/dist/{index-BG2HP0xG.d.ts → index-DsCMbhN3.d.ts} +13 -4
- package/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +24 -13
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +24 -13
- 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, p as ClickHouseCodec, j as ClickHouseDecimal, n as ClickHouseDefault, k as ClickHouseFixedStringSize, l as ClickHouseFloat, a as ClickHouseInt, m as ClickHouseJson, b as ClickHouseNamedTuple, i as ClickHousePrecision, 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-
|
|
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-DsCMbhN3.mjs';
|
|
2
|
+
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, b as ClickHouseNamedTuple, i as ClickHousePrecision, 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-BonAvoqJ.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, p as ClickHouseCodec, j as ClickHouseDecimal, n as ClickHouseDefault, k as ClickHouseFixedStringSize, l as ClickHouseFloat, a as ClickHouseInt, m as ClickHouseJson, b as ClickHouseNamedTuple, i as ClickHousePrecision, 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-
|
|
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-DsCMbhN3.js';
|
|
2
|
+
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, b as ClickHouseNamedTuple, i as ClickHousePrecision, 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-B3DCF1U4.js';
|
|
3
3
|
import 'typia';
|
|
4
4
|
import 'typia/src/schemas/json/IJsonSchemaCollection';
|
|
5
5
|
import 'node:stream';
|
|
@@ -450,6 +450,12 @@ var TypedBase = class {
|
|
|
450
450
|
validators;
|
|
451
451
|
/** Optional metadata for the resource, always present as an object. */
|
|
452
452
|
metadata;
|
|
453
|
+
/**
|
|
454
|
+
* Whether this resource allows extra fields beyond the defined columns.
|
|
455
|
+
* When true, extra fields in payloads are passed through to streaming functions.
|
|
456
|
+
* Injected by the compiler plugin when the type has an index signature.
|
|
457
|
+
*/
|
|
458
|
+
allowExtraFields;
|
|
453
459
|
/**
|
|
454
460
|
* @internal Constructor intended for internal use by subclasses and the compiler plugin.
|
|
455
461
|
* It expects the schema and columns to be provided, typically injected by the compiler.
|
|
@@ -458,8 +464,9 @@ var TypedBase = class {
|
|
|
458
464
|
* @param config The configuration object for the resource.
|
|
459
465
|
* @param schema The JSON schema for the resource's data type T (injected).
|
|
460
466
|
* @param columns The array of Column definitions for T (injected).
|
|
467
|
+
* @param allowExtraFields Whether extra fields are allowed (injected when type has index signature).
|
|
461
468
|
*/
|
|
462
|
-
constructor(name, config, schema, columns, validators) {
|
|
469
|
+
constructor(name, config, schema, columns, validators, allowExtraFields) {
|
|
463
470
|
if (schema === void 0 || columns === void 0) {
|
|
464
471
|
throw new Error(
|
|
465
472
|
"Supply the type param T so that the schema is inserted by the compiler plugin."
|
|
@@ -475,6 +482,7 @@ var TypedBase = class {
|
|
|
475
482
|
this.name = name;
|
|
476
483
|
this.config = config;
|
|
477
484
|
this.validators = validators;
|
|
485
|
+
this.allowExtraFields = allowExtraFields ?? false;
|
|
478
486
|
this.metadata = config?.metadata ? { ...config.metadata } : {};
|
|
479
487
|
const stack = new Error().stack;
|
|
480
488
|
if (stack) {
|
|
@@ -654,9 +662,6 @@ function createMaterializedView(options) {
|
|
|
654
662
|
AS ${options.select}`.trim();
|
|
655
663
|
}
|
|
656
664
|
|
|
657
|
-
// src/dmv2/internal.ts
|
|
658
|
-
var import_process = __toESM(require("process"));
|
|
659
|
-
|
|
660
665
|
// src/index.ts
|
|
661
666
|
init_commons();
|
|
662
667
|
|
|
@@ -696,7 +701,6 @@ var DEFAULT_CSV_CONFIG = {
|
|
|
696
701
|
|
|
697
702
|
// src/dmv2/internal.ts
|
|
698
703
|
init_commons();
|
|
699
|
-
var isClientOnlyMode = () => import_process.default.env.MOOSE_CLIENT_ONLY === "true";
|
|
700
704
|
var moose_internal = {
|
|
701
705
|
tables: /* @__PURE__ */ new Map(),
|
|
702
706
|
streams: /* @__PURE__ */ new Map(),
|
|
@@ -860,7 +864,7 @@ var OlapTable = class extends TypedBase {
|
|
|
860
864
|
this.name = name;
|
|
861
865
|
const tables = getMooseInternal().tables;
|
|
862
866
|
const registryKey = this.config.version ? `${name}_${this.config.version}` : name;
|
|
863
|
-
if (
|
|
867
|
+
if (tables.has(registryKey)) {
|
|
864
868
|
throw new Error(
|
|
865
869
|
`OlapTable with name ${name} and version ${config?.version ?? "unversioned"} already exists`
|
|
866
870
|
);
|
|
@@ -1533,8 +1537,8 @@ var Stream = class extends TypedBase {
|
|
|
1533
1537
|
_memoizedProducer;
|
|
1534
1538
|
/** @internal Hash of the configuration used to create the memoized Kafka producer */
|
|
1535
1539
|
_kafkaConfigHash;
|
|
1536
|
-
constructor(name, config, schema, columns) {
|
|
1537
|
-
super(name, config ?? {}, schema, columns);
|
|
1540
|
+
constructor(name, config, schema, columns, validators, allowExtraFields) {
|
|
1541
|
+
super(name, config ?? {}, schema, columns, void 0, allowExtraFields);
|
|
1538
1542
|
const streams = getMooseInternal().streams;
|
|
1539
1543
|
if (streams.has(name)) {
|
|
1540
1544
|
throw new Error(`Stream with name ${name} already exists`);
|
|
@@ -1786,7 +1790,7 @@ var DeadLetterQueue = class extends Stream {
|
|
|
1786
1790
|
"Supply the type param T so that the schema is inserted by the compiler plugin."
|
|
1787
1791
|
);
|
|
1788
1792
|
}
|
|
1789
|
-
super(name, config ?? {}, dlqSchema, dlqColumns);
|
|
1793
|
+
super(name, config ?? {}, dlqSchema, dlqColumns, void 0, false);
|
|
1790
1794
|
this.typeGuard = typeGuard;
|
|
1791
1795
|
getMooseInternal().streams.set(name, this);
|
|
1792
1796
|
}
|
|
@@ -1952,8 +1956,8 @@ var Workflow = class {
|
|
|
1952
1956
|
|
|
1953
1957
|
// src/dmv2/sdk/ingestApi.ts
|
|
1954
1958
|
var IngestApi = class extends TypedBase {
|
|
1955
|
-
constructor(name, config, schema, columns) {
|
|
1956
|
-
super(name, config, schema, columns);
|
|
1959
|
+
constructor(name, config, schema, columns, validators, allowExtraFields) {
|
|
1960
|
+
super(name, config, schema, columns, void 0, allowExtraFields);
|
|
1957
1961
|
const ingestApis = getMooseInternal().ingestApis;
|
|
1958
1962
|
if (ingestApis.has(name)) {
|
|
1959
1963
|
throw new Error(`Ingest API with name ${name} already exists`);
|
|
@@ -2092,8 +2096,8 @@ var IngestPipeline = class extends TypedBase {
|
|
|
2092
2096
|
ingestApi;
|
|
2093
2097
|
/** The dead letter queue of the pipeline, if configured. */
|
|
2094
2098
|
deadLetterQueue;
|
|
2095
|
-
constructor(name, config, schema, columns, validators) {
|
|
2096
|
-
super(name, config, schema, columns, validators);
|
|
2099
|
+
constructor(name, config, schema, columns, validators, allowExtraFields) {
|
|
2100
|
+
super(name, config, schema, columns, validators, allowExtraFields);
|
|
2097
2101
|
if (config.ingest !== void 0) {
|
|
2098
2102
|
console.warn(
|
|
2099
2103
|
"\u26A0\uFE0F DEPRECATION WARNING: The 'ingest' parameter is deprecated and will be removed in a future version. Please use 'ingestApi' instead."
|
|
@@ -2142,7 +2146,9 @@ var IngestPipeline = class extends TypedBase {
|
|
|
2142
2146
|
name,
|
|
2143
2147
|
streamConfig,
|
|
2144
2148
|
this.schema,
|
|
2145
|
-
this.columnArray
|
|
2149
|
+
this.columnArray,
|
|
2150
|
+
void 0,
|
|
2151
|
+
this.allowExtraFields
|
|
2146
2152
|
);
|
|
2147
2153
|
this.stream.pipelineParent = this;
|
|
2148
2154
|
}
|
|
@@ -2162,7 +2168,9 @@ var IngestPipeline = class extends TypedBase {
|
|
|
2162
2168
|
name,
|
|
2163
2169
|
ingestConfig,
|
|
2164
2170
|
this.schema,
|
|
2165
|
-
this.columnArray
|
|
2171
|
+
this.columnArray,
|
|
2172
|
+
void 0,
|
|
2173
|
+
this.allowExtraFields
|
|
2166
2174
|
);
|
|
2167
2175
|
this.ingestApi.pipelineParent = this;
|
|
2168
2176
|
}
|
|
@@ -2336,7 +2344,7 @@ var SqlResource = class {
|
|
|
2336
2344
|
*/
|
|
2337
2345
|
constructor(name, setup, teardown, options) {
|
|
2338
2346
|
const sqlResources = getMooseInternal().sqlResources;
|
|
2339
|
-
if (
|
|
2347
|
+
if (sqlResources.has(name)) {
|
|
2340
2348
|
throw new Error(`SqlResource with name ${name} already exists`);
|
|
2341
2349
|
}
|
|
2342
2350
|
sqlResources.set(name, this);
|