@514labs/moose-lib 0.6.259-ci-3-g1a0c45fe → 0.6.259-ci-9-gf56269b8

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
package/dist/index.mjs CHANGED
@@ -413,6 +413,12 @@ var TypedBase = class {
413
413
  validators;
414
414
  /** Optional metadata for the resource, always present as an object. */
415
415
  metadata;
416
+ /**
417
+ * Whether this resource allows extra fields beyond the defined columns.
418
+ * When true, extra fields in payloads are passed through to streaming functions.
419
+ * Injected by the compiler plugin when the type has an index signature.
420
+ */
421
+ allowExtraFields;
416
422
  /**
417
423
  * @internal Constructor intended for internal use by subclasses and the compiler plugin.
418
424
  * It expects the schema and columns to be provided, typically injected by the compiler.
@@ -421,8 +427,9 @@ var TypedBase = class {
421
427
  * @param config The configuration object for the resource.
422
428
  * @param schema The JSON schema for the resource's data type T (injected).
423
429
  * @param columns The array of Column definitions for T (injected).
430
+ * @param allowExtraFields Whether extra fields are allowed (injected when type has index signature).
424
431
  */
425
- constructor(name, config, schema, columns, validators) {
432
+ constructor(name, config, schema, columns, validators, allowExtraFields) {
426
433
  if (schema === void 0 || columns === void 0) {
427
434
  throw new Error(
428
435
  "Supply the type param T so that the schema is inserted by the compiler plugin."
@@ -438,6 +445,7 @@ var TypedBase = class {
438
445
  this.name = name;
439
446
  this.config = config;
440
447
  this.validators = validators;
448
+ this.allowExtraFields = allowExtraFields ?? false;
441
449
  this.metadata = config?.metadata ? { ...config.metadata } : {};
442
450
  const stack = new Error().stack;
443
451
  if (stack) {
@@ -1521,8 +1529,8 @@ var Stream = class extends TypedBase {
1521
1529
  _memoizedProducer;
1522
1530
  /** @internal Hash of the configuration used to create the memoized Kafka producer */
1523
1531
  _kafkaConfigHash;
1524
- constructor(name, config, schema, columns) {
1525
- super(name, config ?? {}, schema, columns);
1532
+ constructor(name, config, schema, columns, validators, allowExtraFields) {
1533
+ super(name, config ?? {}, schema, columns, void 0, allowExtraFields);
1526
1534
  const streams = getMooseInternal().streams;
1527
1535
  if (streams.has(name)) {
1528
1536
  throw new Error(`Stream with name ${name} already exists`);
@@ -1778,7 +1786,7 @@ var DeadLetterQueue = class extends Stream {
1778
1786
  "Supply the type param T so that the schema is inserted by the compiler plugin."
1779
1787
  );
1780
1788
  }
1781
- super(name, config ?? {}, dlqSchema, dlqColumns);
1789
+ super(name, config ?? {}, dlqSchema, dlqColumns, void 0, false);
1782
1790
  this.typeGuard = typeGuard;
1783
1791
  getMooseInternal().streams.set(name, this);
1784
1792
  }
@@ -1944,8 +1952,8 @@ var Workflow = class {
1944
1952
 
1945
1953
  // src/dmv2/sdk/ingestApi.ts
1946
1954
  var IngestApi = class extends TypedBase {
1947
- constructor(name, config, schema, columns) {
1948
- super(name, config, schema, columns);
1955
+ constructor(name, config, schema, columns, validators, allowExtraFields) {
1956
+ super(name, config, schema, columns, void 0, allowExtraFields);
1949
1957
  const ingestApis = getMooseInternal().ingestApis;
1950
1958
  if (ingestApis.has(name)) {
1951
1959
  throw new Error(`Ingest API with name ${name} already exists`);
@@ -2084,8 +2092,8 @@ var IngestPipeline = class extends TypedBase {
2084
2092
  ingestApi;
2085
2093
  /** The dead letter queue of the pipeline, if configured. */
2086
2094
  deadLetterQueue;
2087
- constructor(name, config, schema, columns, validators) {
2088
- super(name, config, schema, columns, validators);
2095
+ constructor(name, config, schema, columns, validators, allowExtraFields) {
2096
+ super(name, config, schema, columns, validators, allowExtraFields);
2089
2097
  if (config.ingest !== void 0) {
2090
2098
  console.warn(
2091
2099
  "\u26A0\uFE0F DEPRECATION WARNING: The 'ingest' parameter is deprecated and will be removed in a future version. Please use 'ingestApi' instead."
@@ -2134,7 +2142,9 @@ var IngestPipeline = class extends TypedBase {
2134
2142
  name,
2135
2143
  streamConfig,
2136
2144
  this.schema,
2137
- this.columnArray
2145
+ this.columnArray,
2146
+ void 0,
2147
+ this.allowExtraFields
2138
2148
  );
2139
2149
  this.stream.pipelineParent = this;
2140
2150
  }
@@ -2154,7 +2164,9 @@ var IngestPipeline = class extends TypedBase {
2154
2164
  name,
2155
2165
  ingestConfig,
2156
2166
  this.schema,
2157
- this.columnArray
2167
+ this.columnArray,
2168
+ void 0,
2169
+ this.allowExtraFields
2158
2170
  );
2159
2171
  this.ingestApi.pipelineParent = this;
2160
2172
  }