@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) {
@@ -1498,8 +1506,8 @@ var Stream = class extends TypedBase {
1498
1506
  _memoizedProducer;
1499
1507
  /** @internal Hash of the configuration used to create the memoized Kafka producer */
1500
1508
  _kafkaConfigHash;
1501
- constructor(name, config, schema, columns) {
1502
- super(name, config ?? {}, schema, columns);
1509
+ constructor(name, config, schema, columns, validators, allowExtraFields) {
1510
+ super(name, config ?? {}, schema, columns, void 0, allowExtraFields);
1503
1511
  const streams = getMooseInternal().streams;
1504
1512
  if (streams.has(name)) {
1505
1513
  throw new Error(`Stream with name ${name} already exists`);
@@ -1755,7 +1763,7 @@ var DeadLetterQueue = class extends Stream {
1755
1763
  "Supply the type param T so that the schema is inserted by the compiler plugin."
1756
1764
  );
1757
1765
  }
1758
- super(name, config ?? {}, dlqSchema, dlqColumns);
1766
+ super(name, config ?? {}, dlqSchema, dlqColumns, void 0, false);
1759
1767
  this.typeGuard = typeGuard;
1760
1768
  getMooseInternal().streams.set(name, this);
1761
1769
  }
@@ -1921,8 +1929,8 @@ var Workflow = class {
1921
1929
 
1922
1930
  // src/dmv2/sdk/ingestApi.ts
1923
1931
  var IngestApi = class extends TypedBase {
1924
- constructor(name, config, schema, columns) {
1925
- super(name, config, schema, columns);
1932
+ constructor(name, config, schema, columns, validators, allowExtraFields) {
1933
+ super(name, config, schema, columns, void 0, allowExtraFields);
1926
1934
  const ingestApis = getMooseInternal().ingestApis;
1927
1935
  if (ingestApis.has(name)) {
1928
1936
  throw new Error(`Ingest API with name ${name} already exists`);
@@ -2061,8 +2069,8 @@ var IngestPipeline = class extends TypedBase {
2061
2069
  ingestApi;
2062
2070
  /** The dead letter queue of the pipeline, if configured. */
2063
2071
  deadLetterQueue;
2064
- constructor(name, config, schema, columns, validators) {
2065
- super(name, config, schema, columns, validators);
2072
+ constructor(name, config, schema, columns, validators, allowExtraFields) {
2073
+ super(name, config, schema, columns, validators, allowExtraFields);
2066
2074
  if (config.ingest !== void 0) {
2067
2075
  console.warn(
2068
2076
  "\u26A0\uFE0F DEPRECATION WARNING: The 'ingest' parameter is deprecated and will be removed in a future version. Please use 'ingestApi' instead."
@@ -2111,7 +2119,9 @@ var IngestPipeline = class extends TypedBase {
2111
2119
  name,
2112
2120
  streamConfig,
2113
2121
  this.schema,
2114
- this.columnArray
2122
+ this.columnArray,
2123
+ void 0,
2124
+ this.allowExtraFields
2115
2125
  );
2116
2126
  this.stream.pipelineParent = this;
2117
2127
  }
@@ -2131,7 +2141,9 @@ var IngestPipeline = class extends TypedBase {
2131
2141
  name,
2132
2142
  ingestConfig,
2133
2143
  this.schema,
2134
- this.columnArray
2144
+ this.columnArray,
2145
+ void 0,
2146
+ this.allowExtraFields
2135
2147
  );
2136
2148
  this.ingestApi.pipelineParent = this;
2137
2149
  }