@514labs/moose-lib 0.6.259-ci-1-g418c03bd → 0.6.259-ci-8-g7b4b6f96

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-B_aEflr_.d.ts → browserCompatible-DKJsM6sO.d.ts} +1 -1
  2. package/dist/{browserCompatible-DnYA4Zgi.d.mts → browserCompatible-G5C0qk2P.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 +35 -3
  10. package/dist/compilerPlugin.js.map +1 -1
  11. package/dist/compilerPlugin.mjs +35 -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-rECDLgTX.d.mts → index-DzjegH9H.d.mts} +25 -6
  24. package/dist/{index-rECDLgTX.d.ts → index-DzjegH9H.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
@@ -407,6 +407,12 @@ var TypedBase = class {
407
407
  validators;
408
408
  /** Optional metadata for the resource, always present as an object. */
409
409
  metadata;
410
+ /**
411
+ * Whether this resource allows extra fields beyond the defined columns.
412
+ * When true, extra fields in payloads are passed through to streaming functions.
413
+ * Injected by the compiler plugin when the type has an index signature.
414
+ */
415
+ allowExtraFields;
410
416
  /**
411
417
  * @internal Constructor intended for internal use by subclasses and the compiler plugin.
412
418
  * It expects the schema and columns to be provided, typically injected by the compiler.
@@ -415,8 +421,9 @@ var TypedBase = class {
415
421
  * @param config The configuration object for the resource.
416
422
  * @param schema The JSON schema for the resource's data type T (injected).
417
423
  * @param columns The array of Column definitions for T (injected).
424
+ * @param allowExtraFields Whether extra fields are allowed (injected when type has index signature).
418
425
  */
419
- constructor(name, config, schema, columns, validators) {
426
+ constructor(name, config, schema, columns, validators, allowExtraFields) {
420
427
  if (schema === void 0 || columns === void 0) {
421
428
  throw new Error(
422
429
  "Supply the type param T so that the schema is inserted by the compiler plugin."
@@ -432,6 +439,7 @@ var TypedBase = class {
432
439
  this.name = name;
433
440
  this.config = config;
434
441
  this.validators = validators;
442
+ this.allowExtraFields = allowExtraFields ?? false;
435
443
  this.metadata = config?.metadata ? { ...config.metadata } : {};
436
444
  const stack = new Error().stack;
437
445
  if (stack) {
@@ -1403,8 +1411,8 @@ var Stream = class extends TypedBase {
1403
1411
  _memoizedProducer;
1404
1412
  /** @internal Hash of the configuration used to create the memoized Kafka producer */
1405
1413
  _kafkaConfigHash;
1406
- constructor(name, config, schema, columns) {
1407
- super(name, config ?? {}, schema, columns);
1414
+ constructor(name, config, schema, columns, validators, allowExtraFields) {
1415
+ super(name, config ?? {}, schema, columns, void 0, allowExtraFields);
1408
1416
  const streams = getMooseInternal().streams;
1409
1417
  if (streams.has(name)) {
1410
1418
  throw new Error(`Stream with name ${name} already exists`);
@@ -1660,7 +1668,7 @@ var DeadLetterQueue = class extends Stream {
1660
1668
  "Supply the type param T so that the schema is inserted by the compiler plugin."
1661
1669
  );
1662
1670
  }
1663
- super(name, config ?? {}, dlqSchema, dlqColumns);
1671
+ super(name, config ?? {}, dlqSchema, dlqColumns, void 0, false);
1664
1672
  this.typeGuard = typeGuard;
1665
1673
  getMooseInternal().streams.set(name, this);
1666
1674
  }
@@ -1826,8 +1834,8 @@ var Workflow = class {
1826
1834
 
1827
1835
  // src/dmv2/sdk/ingestApi.ts
1828
1836
  var IngestApi = class extends TypedBase {
1829
- constructor(name, config, schema, columns) {
1830
- super(name, config, schema, columns);
1837
+ constructor(name, config, schema, columns, validators, allowExtraFields) {
1838
+ super(name, config, schema, columns, void 0, allowExtraFields);
1831
1839
  const ingestApis = getMooseInternal().ingestApis;
1832
1840
  if (ingestApis.has(name)) {
1833
1841
  throw new Error(`Ingest API with name ${name} already exists`);
@@ -1966,8 +1974,8 @@ var IngestPipeline = class extends TypedBase {
1966
1974
  ingestApi;
1967
1975
  /** The dead letter queue of the pipeline, if configured. */
1968
1976
  deadLetterQueue;
1969
- constructor(name, config, schema, columns, validators) {
1970
- super(name, config, schema, columns, validators);
1977
+ constructor(name, config, schema, columns, validators, allowExtraFields) {
1978
+ super(name, config, schema, columns, validators, allowExtraFields);
1971
1979
  if (config.ingest !== void 0) {
1972
1980
  console.warn(
1973
1981
  "\u26A0\uFE0F DEPRECATION WARNING: The 'ingest' parameter is deprecated and will be removed in a future version. Please use 'ingestApi' instead."
@@ -2016,7 +2024,9 @@ var IngestPipeline = class extends TypedBase {
2016
2024
  name,
2017
2025
  streamConfig,
2018
2026
  this.schema,
2019
- this.columnArray
2027
+ this.columnArray,
2028
+ void 0,
2029
+ this.allowExtraFields
2020
2030
  );
2021
2031
  this.stream.pipelineParent = this;
2022
2032
  }
@@ -2036,7 +2046,9 @@ var IngestPipeline = class extends TypedBase {
2036
2046
  name,
2037
2047
  ingestConfig,
2038
2048
  this.schema,
2039
- this.columnArray
2049
+ this.columnArray,
2050
+ void 0,
2051
+ this.allowExtraFields
2040
2052
  );
2041
2053
  this.ingestApi.pipelineParent = this;
2042
2054
  }