@514labs/moose-lib 0.6.265 → 0.6.266-ci-11-g69efdf88
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 +22 -10
- package/dist/browserCompatible.js.map +1 -1
- package/dist/browserCompatible.mjs +22 -10
- 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 +22 -10
- package/dist/dmv2/index.js.map +1 -1
- package/dist/dmv2/index.mjs +22 -10
- 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 +22 -10
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +22 -10
- 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
|
@@ -434,6 +434,12 @@ var TypedBase = class {
|
|
|
434
434
|
validators;
|
|
435
435
|
/** Optional metadata for the resource, always present as an object. */
|
|
436
436
|
metadata;
|
|
437
|
+
/**
|
|
438
|
+
* Whether this resource allows extra fields beyond the defined columns.
|
|
439
|
+
* When true, extra fields in payloads are passed through to streaming functions.
|
|
440
|
+
* Injected by the compiler plugin when the type has an index signature.
|
|
441
|
+
*/
|
|
442
|
+
allowExtraFields;
|
|
437
443
|
/**
|
|
438
444
|
* @internal Constructor intended for internal use by subclasses and the compiler plugin.
|
|
439
445
|
* It expects the schema and columns to be provided, typically injected by the compiler.
|
|
@@ -442,8 +448,9 @@ var TypedBase = class {
|
|
|
442
448
|
* @param config The configuration object for the resource.
|
|
443
449
|
* @param schema The JSON schema for the resource's data type T (injected).
|
|
444
450
|
* @param columns The array of Column definitions for T (injected).
|
|
451
|
+
* @param allowExtraFields Whether extra fields are allowed (injected when type has index signature).
|
|
445
452
|
*/
|
|
446
|
-
constructor(name, config, schema, columns, validators) {
|
|
453
|
+
constructor(name, config, schema, columns, validators, allowExtraFields) {
|
|
447
454
|
if (schema === void 0 || columns === void 0) {
|
|
448
455
|
throw new Error(
|
|
449
456
|
"Supply the type param T so that the schema is inserted by the compiler plugin."
|
|
@@ -459,6 +466,7 @@ var TypedBase = class {
|
|
|
459
466
|
this.name = name;
|
|
460
467
|
this.config = config;
|
|
461
468
|
this.validators = validators;
|
|
469
|
+
this.allowExtraFields = allowExtraFields ?? false;
|
|
462
470
|
this.metadata = config?.metadata ? { ...config.metadata } : {};
|
|
463
471
|
const stack = new Error().stack;
|
|
464
472
|
if (stack) {
|
|
@@ -1525,8 +1533,8 @@ var Stream = class extends TypedBase {
|
|
|
1525
1533
|
_memoizedProducer;
|
|
1526
1534
|
/** @internal Hash of the configuration used to create the memoized Kafka producer */
|
|
1527
1535
|
_kafkaConfigHash;
|
|
1528
|
-
constructor(name, config, schema, columns) {
|
|
1529
|
-
super(name, config ?? {}, schema, columns);
|
|
1536
|
+
constructor(name, config, schema, columns, validators, allowExtraFields) {
|
|
1537
|
+
super(name, config ?? {}, schema, columns, void 0, allowExtraFields);
|
|
1530
1538
|
const streams = getMooseInternal().streams;
|
|
1531
1539
|
if (streams.has(name)) {
|
|
1532
1540
|
throw new Error(`Stream with name ${name} already exists`);
|
|
@@ -1782,7 +1790,7 @@ var DeadLetterQueue = class extends Stream {
|
|
|
1782
1790
|
"Supply the type param T so that the schema is inserted by the compiler plugin."
|
|
1783
1791
|
);
|
|
1784
1792
|
}
|
|
1785
|
-
super(name, config ?? {}, dlqSchema, dlqColumns);
|
|
1793
|
+
super(name, config ?? {}, dlqSchema, dlqColumns, void 0, false);
|
|
1786
1794
|
this.typeGuard = typeGuard;
|
|
1787
1795
|
getMooseInternal().streams.set(name, this);
|
|
1788
1796
|
}
|
|
@@ -1948,8 +1956,8 @@ var Workflow = class {
|
|
|
1948
1956
|
|
|
1949
1957
|
// src/dmv2/sdk/ingestApi.ts
|
|
1950
1958
|
var IngestApi = class extends TypedBase {
|
|
1951
|
-
constructor(name, config, schema, columns) {
|
|
1952
|
-
super(name, config, schema, columns);
|
|
1959
|
+
constructor(name, config, schema, columns, validators, allowExtraFields) {
|
|
1960
|
+
super(name, config, schema, columns, void 0, allowExtraFields);
|
|
1953
1961
|
const ingestApis = getMooseInternal().ingestApis;
|
|
1954
1962
|
if (ingestApis.has(name)) {
|
|
1955
1963
|
throw new Error(`Ingest API with name ${name} already exists`);
|
|
@@ -2088,8 +2096,8 @@ var IngestPipeline = class extends TypedBase {
|
|
|
2088
2096
|
ingestApi;
|
|
2089
2097
|
/** The dead letter queue of the pipeline, if configured. */
|
|
2090
2098
|
deadLetterQueue;
|
|
2091
|
-
constructor(name, config, schema, columns, validators) {
|
|
2092
|
-
super(name, config, schema, columns, validators);
|
|
2099
|
+
constructor(name, config, schema, columns, validators, allowExtraFields) {
|
|
2100
|
+
super(name, config, schema, columns, validators, allowExtraFields);
|
|
2093
2101
|
if (config.ingest !== void 0) {
|
|
2094
2102
|
console.warn(
|
|
2095
2103
|
"\u26A0\uFE0F DEPRECATION WARNING: The 'ingest' parameter is deprecated and will be removed in a future version. Please use 'ingestApi' instead."
|
|
@@ -2145,7 +2153,9 @@ var IngestPipeline = class extends TypedBase {
|
|
|
2145
2153
|
name,
|
|
2146
2154
|
streamConfig,
|
|
2147
2155
|
this.schema,
|
|
2148
|
-
this.columnArray
|
|
2156
|
+
this.columnArray,
|
|
2157
|
+
void 0,
|
|
2158
|
+
this.allowExtraFields
|
|
2149
2159
|
);
|
|
2150
2160
|
this.stream.pipelineParent = this;
|
|
2151
2161
|
}
|
|
@@ -2165,7 +2175,9 @@ var IngestPipeline = class extends TypedBase {
|
|
|
2165
2175
|
name,
|
|
2166
2176
|
ingestConfig,
|
|
2167
2177
|
this.schema,
|
|
2168
|
-
this.columnArray
|
|
2178
|
+
this.columnArray,
|
|
2179
|
+
void 0,
|
|
2180
|
+
this.allowExtraFields
|
|
2169
2181
|
);
|
|
2170
2182
|
this.ingestApi.pipelineParent = this;
|
|
2171
2183
|
}
|