@514labs/moose-lib 0.6.265 → 0.6.266-ci-12-g604d37bd

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.
Files changed (35) hide show
  1. package/dist/{browserCompatible-Bqhjy4pn.d.ts → browserCompatible-CpjUXotI.d.ts} +1 -1
  2. package/dist/{browserCompatible-DTtKuO-Y.d.mts → browserCompatible-fk6xPzoB.d.mts} +1 -1
  3. package/dist/browserCompatible.d.mts +2 -2
  4. package/dist/browserCompatible.d.ts +2 -2
  5. package/dist/browserCompatible.js +22 -10
  6. package/dist/browserCompatible.js.map +1 -1
  7. package/dist/browserCompatible.mjs +22 -10
  8. package/dist/browserCompatible.mjs.map +1 -1
  9. package/dist/compilerPlugin.js +43 -3
  10. package/dist/compilerPlugin.js.map +1 -1
  11. package/dist/compilerPlugin.mjs +43 -3
  12. package/dist/compilerPlugin.mjs.map +1 -1
  13. package/dist/dataModels/toDataModels.js +2 -2
  14. package/dist/dataModels/toDataModels.js.map +1 -1
  15. package/dist/dataModels/toDataModels.mjs +2 -2
  16. package/dist/dataModels/toDataModels.mjs.map +1 -1
  17. package/dist/dmv2/index.d.mts +1 -1
  18. package/dist/dmv2/index.d.ts +1 -1
  19. package/dist/dmv2/index.js +22 -10
  20. package/dist/dmv2/index.js.map +1 -1
  21. package/dist/dmv2/index.mjs +22 -10
  22. package/dist/dmv2/index.mjs.map +1 -1
  23. package/dist/{index-CQB6bk1i.d.mts → index-Dd3ZmpTq.d.mts} +25 -6
  24. package/dist/{index-CQB6bk1i.d.ts → index-Dd3ZmpTq.d.ts} +25 -6
  25. package/dist/index.d.mts +3 -3
  26. package/dist/index.d.ts +3 -3
  27. package/dist/index.js +22 -10
  28. package/dist/index.js.map +1 -1
  29. package/dist/index.mjs +22 -10
  30. package/dist/index.mjs.map +1 -1
  31. package/dist/moose-runner.js +2 -1
  32. package/dist/moose-runner.js.map +1 -1
  33. package/dist/moose-runner.mjs +2 -1
  34. package/dist/moose-runner.mjs.map +1 -1
  35. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -440,6 +440,12 @@ var TypedBase = class {
440
440
  validators;
441
441
  /** Optional metadata for the resource, always present as an object. */
442
442
  metadata;
443
+ /**
444
+ * Whether this resource allows extra fields beyond the defined columns.
445
+ * When true, extra fields in payloads are passed through to streaming functions.
446
+ * Injected by the compiler plugin when the type has an index signature.
447
+ */
448
+ allowExtraFields;
443
449
  /**
444
450
  * @internal Constructor intended for internal use by subclasses and the compiler plugin.
445
451
  * It expects the schema and columns to be provided, typically injected by the compiler.
@@ -448,8 +454,9 @@ var TypedBase = class {
448
454
  * @param config The configuration object for the resource.
449
455
  * @param schema The JSON schema for the resource's data type T (injected).
450
456
  * @param columns The array of Column definitions for T (injected).
457
+ * @param allowExtraFields Whether extra fields are allowed (injected when type has index signature).
451
458
  */
452
- constructor(name, config, schema, columns, validators) {
459
+ constructor(name, config, schema, columns, validators, allowExtraFields) {
453
460
  if (schema === void 0 || columns === void 0) {
454
461
  throw new Error(
455
462
  "Supply the type param T so that the schema is inserted by the compiler plugin."
@@ -465,6 +472,7 @@ var TypedBase = class {
465
472
  this.name = name;
466
473
  this.config = config;
467
474
  this.validators = validators;
475
+ this.allowExtraFields = allowExtraFields ?? false;
468
476
  this.metadata = config?.metadata ? { ...config.metadata } : {};
469
477
  const stack = new Error().stack;
470
478
  if (stack) {
@@ -1549,8 +1557,8 @@ var Stream = class extends TypedBase {
1549
1557
  _memoizedProducer;
1550
1558
  /** @internal Hash of the configuration used to create the memoized Kafka producer */
1551
1559
  _kafkaConfigHash;
1552
- constructor(name, config, schema, columns) {
1553
- super(name, config ?? {}, schema, columns);
1560
+ constructor(name, config, schema, columns, validators, allowExtraFields) {
1561
+ super(name, config ?? {}, schema, columns, void 0, allowExtraFields);
1554
1562
  const streams = getMooseInternal().streams;
1555
1563
  if (streams.has(name)) {
1556
1564
  throw new Error(`Stream with name ${name} already exists`);
@@ -1806,7 +1814,7 @@ var DeadLetterQueue = class extends Stream {
1806
1814
  "Supply the type param T so that the schema is inserted by the compiler plugin."
1807
1815
  );
1808
1816
  }
1809
- super(name, config ?? {}, dlqSchema, dlqColumns);
1817
+ super(name, config ?? {}, dlqSchema, dlqColumns, void 0, false);
1810
1818
  this.typeGuard = typeGuard;
1811
1819
  getMooseInternal().streams.set(name, this);
1812
1820
  }
@@ -1972,8 +1980,8 @@ var Workflow = class {
1972
1980
 
1973
1981
  // src/dmv2/sdk/ingestApi.ts
1974
1982
  var IngestApi = class extends TypedBase {
1975
- constructor(name, config, schema, columns) {
1976
- super(name, config, schema, columns);
1983
+ constructor(name, config, schema, columns, validators, allowExtraFields) {
1984
+ super(name, config, schema, columns, void 0, allowExtraFields);
1977
1985
  const ingestApis = getMooseInternal().ingestApis;
1978
1986
  if (ingestApis.has(name)) {
1979
1987
  throw new Error(`Ingest API with name ${name} already exists`);
@@ -2112,8 +2120,8 @@ var IngestPipeline = class extends TypedBase {
2112
2120
  ingestApi;
2113
2121
  /** The dead letter queue of the pipeline, if configured. */
2114
2122
  deadLetterQueue;
2115
- constructor(name, config, schema, columns, validators) {
2116
- super(name, config, schema, columns, validators);
2123
+ constructor(name, config, schema, columns, validators, allowExtraFields) {
2124
+ super(name, config, schema, columns, validators, allowExtraFields);
2117
2125
  if (config.ingest !== void 0) {
2118
2126
  console.warn(
2119
2127
  "\u26A0\uFE0F DEPRECATION WARNING: The 'ingest' parameter is deprecated and will be removed in a future version. Please use 'ingestApi' instead."
@@ -2169,7 +2177,9 @@ var IngestPipeline = class extends TypedBase {
2169
2177
  name,
2170
2178
  streamConfig,
2171
2179
  this.schema,
2172
- this.columnArray
2180
+ this.columnArray,
2181
+ void 0,
2182
+ this.allowExtraFields
2173
2183
  );
2174
2184
  this.stream.pipelineParent = this;
2175
2185
  }
@@ -2189,7 +2199,9 @@ var IngestPipeline = class extends TypedBase {
2189
2199
  name,
2190
2200
  ingestConfig,
2191
2201
  this.schema,
2192
- this.columnArray
2202
+ this.columnArray,
2203
+ void 0,
2204
+ this.allowExtraFields
2193
2205
  );
2194
2206
  this.ingestApi.pipelineParent = this;
2195
2207
  }