@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.
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
@@ -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) {
@@ -1430,8 +1438,8 @@ var Stream = class extends TypedBase {
1430
1438
  _memoizedProducer;
1431
1439
  /** @internal Hash of the configuration used to create the memoized Kafka producer */
1432
1440
  _kafkaConfigHash;
1433
- constructor(name, config, schema, columns) {
1434
- super(name, config ?? {}, schema, columns);
1441
+ constructor(name, config, schema, columns, validators, allowExtraFields) {
1442
+ super(name, config ?? {}, schema, columns, void 0, allowExtraFields);
1435
1443
  const streams = getMooseInternal().streams;
1436
1444
  if (streams.has(name)) {
1437
1445
  throw new Error(`Stream with name ${name} already exists`);
@@ -1687,7 +1695,7 @@ var DeadLetterQueue = class extends Stream {
1687
1695
  "Supply the type param T so that the schema is inserted by the compiler plugin."
1688
1696
  );
1689
1697
  }
1690
- super(name, config ?? {}, dlqSchema, dlqColumns);
1698
+ super(name, config ?? {}, dlqSchema, dlqColumns, void 0, false);
1691
1699
  this.typeGuard = typeGuard;
1692
1700
  getMooseInternal().streams.set(name, this);
1693
1701
  }
@@ -1853,8 +1861,8 @@ var Workflow = class {
1853
1861
 
1854
1862
  // src/dmv2/sdk/ingestApi.ts
1855
1863
  var IngestApi = class extends TypedBase {
1856
- constructor(name, config, schema, columns) {
1857
- super(name, config, schema, columns);
1864
+ constructor(name, config, schema, columns, validators, allowExtraFields) {
1865
+ super(name, config, schema, columns, void 0, allowExtraFields);
1858
1866
  const ingestApis = getMooseInternal().ingestApis;
1859
1867
  if (ingestApis.has(name)) {
1860
1868
  throw new Error(`Ingest API with name ${name} already exists`);
@@ -1993,8 +2001,8 @@ var IngestPipeline = class extends TypedBase {
1993
2001
  ingestApi;
1994
2002
  /** The dead letter queue of the pipeline, if configured. */
1995
2003
  deadLetterQueue;
1996
- constructor(name, config, schema, columns, validators) {
1997
- super(name, config, schema, columns, validators);
2004
+ constructor(name, config, schema, columns, validators, allowExtraFields) {
2005
+ super(name, config, schema, columns, validators, allowExtraFields);
1998
2006
  if (config.ingest !== void 0) {
1999
2007
  console.warn(
2000
2008
  "\u26A0\uFE0F DEPRECATION WARNING: The 'ingest' parameter is deprecated and will be removed in a future version. Please use 'ingestApi' instead."
@@ -2050,7 +2058,9 @@ var IngestPipeline = class extends TypedBase {
2050
2058
  name,
2051
2059
  streamConfig,
2052
2060
  this.schema,
2053
- this.columnArray
2061
+ this.columnArray,
2062
+ void 0,
2063
+ this.allowExtraFields
2054
2064
  );
2055
2065
  this.stream.pipelineParent = this;
2056
2066
  }
@@ -2070,7 +2080,9 @@ var IngestPipeline = class extends TypedBase {
2070
2080
  name,
2071
2081
  ingestConfig,
2072
2082
  this.schema,
2073
- this.columnArray
2083
+ this.columnArray,
2084
+ void 0,
2085
+ this.allowExtraFields
2074
2086
  );
2075
2087
  this.ingestApi.pipelineParent = this;
2076
2088
  }