@514labs/moose-lib 0.6.239-ci-1-g1e5af572 → 0.6.239-ci-6-g7634f0cb
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.
- package/dist/{browserCompatible-CMLITD0_.d.ts → browserCompatible-B3DCF1U4.d.ts} +1 -1
- package/dist/{browserCompatible-BRa8sgXw.d.mts → browserCompatible-BonAvoqJ.d.mts} +1 -1
- package/dist/browserCompatible.d.mts +2 -2
- package/dist/browserCompatible.d.ts +2 -2
- package/dist/browserCompatible.js +24 -16
- package/dist/browserCompatible.js.map +1 -1
- package/dist/browserCompatible.mjs +24 -16
- package/dist/browserCompatible.mjs.map +1 -1
- package/dist/compilerPlugin.js +35 -3
- package/dist/compilerPlugin.js.map +1 -1
- package/dist/compilerPlugin.mjs +35 -3
- package/dist/compilerPlugin.mjs.map +1 -1
- package/dist/dataModels/toDataModels.js +2 -2
- package/dist/dataModels/toDataModels.js.map +1 -1
- package/dist/dataModels/toDataModels.mjs +2 -2
- package/dist/dataModels/toDataModels.mjs.map +1 -1
- package/dist/dmv2/index.d.mts +1 -1
- package/dist/dmv2/index.d.ts +1 -1
- package/dist/dmv2/index.js +24 -16
- package/dist/dmv2/index.js.map +1 -1
- package/dist/dmv2/index.mjs +24 -16
- package/dist/dmv2/index.mjs.map +1 -1
- package/dist/{index-BG2HP0xG.d.mts → index-DsCMbhN3.d.mts} +13 -4
- package/dist/{index-BG2HP0xG.d.ts → index-DsCMbhN3.d.ts} +13 -4
- package/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +24 -13
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +24 -13
- package/dist/index.mjs.map +1 -1
- package/dist/moose-runner.js +2 -1
- package/dist/moose-runner.js.map +1 -1
- package/dist/moose-runner.mjs +2 -1
- package/dist/moose-runner.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -384,6 +384,12 @@ var TypedBase = class {
|
|
|
384
384
|
validators;
|
|
385
385
|
/** Optional metadata for the resource, always present as an object. */
|
|
386
386
|
metadata;
|
|
387
|
+
/**
|
|
388
|
+
* Whether this resource allows extra fields beyond the defined columns.
|
|
389
|
+
* When true, extra fields in payloads are passed through to streaming functions.
|
|
390
|
+
* Injected by the compiler plugin when the type has an index signature.
|
|
391
|
+
*/
|
|
392
|
+
allowExtraFields;
|
|
387
393
|
/**
|
|
388
394
|
* @internal Constructor intended for internal use by subclasses and the compiler plugin.
|
|
389
395
|
* It expects the schema and columns to be provided, typically injected by the compiler.
|
|
@@ -392,8 +398,9 @@ var TypedBase = class {
|
|
|
392
398
|
* @param config The configuration object for the resource.
|
|
393
399
|
* @param schema The JSON schema for the resource's data type T (injected).
|
|
394
400
|
* @param columns The array of Column definitions for T (injected).
|
|
401
|
+
* @param allowExtraFields Whether extra fields are allowed (injected when type has index signature).
|
|
395
402
|
*/
|
|
396
|
-
constructor(name, config, schema, columns, validators) {
|
|
403
|
+
constructor(name, config, schema, columns, validators, allowExtraFields) {
|
|
397
404
|
if (schema === void 0 || columns === void 0) {
|
|
398
405
|
throw new Error(
|
|
399
406
|
"Supply the type param T so that the schema is inserted by the compiler plugin."
|
|
@@ -409,6 +416,7 @@ var TypedBase = class {
|
|
|
409
416
|
this.name = name;
|
|
410
417
|
this.config = config;
|
|
411
418
|
this.validators = validators;
|
|
419
|
+
this.allowExtraFields = allowExtraFields ?? false;
|
|
412
420
|
this.metadata = config?.metadata ? { ...config.metadata } : {};
|
|
413
421
|
const stack = new Error().stack;
|
|
414
422
|
if (stack) {
|
|
@@ -588,9 +596,6 @@ function createMaterializedView(options) {
|
|
|
588
596
|
AS ${options.select}`.trim();
|
|
589
597
|
}
|
|
590
598
|
|
|
591
|
-
// src/dmv2/internal.ts
|
|
592
|
-
import process2 from "process";
|
|
593
|
-
|
|
594
599
|
// src/index.ts
|
|
595
600
|
init_commons();
|
|
596
601
|
|
|
@@ -633,7 +638,6 @@ var DEFAULT_CSV_CONFIG = {
|
|
|
633
638
|
|
|
634
639
|
// src/dmv2/internal.ts
|
|
635
640
|
init_commons();
|
|
636
|
-
var isClientOnlyMode = () => process2.env.MOOSE_CLIENT_ONLY === "true";
|
|
637
641
|
var moose_internal = {
|
|
638
642
|
tables: /* @__PURE__ */ new Map(),
|
|
639
643
|
streams: /* @__PURE__ */ new Map(),
|
|
@@ -797,7 +801,7 @@ var OlapTable = class extends TypedBase {
|
|
|
797
801
|
this.name = name;
|
|
798
802
|
const tables = getMooseInternal().tables;
|
|
799
803
|
const registryKey = this.config.version ? `${name}_${this.config.version}` : name;
|
|
800
|
-
if (
|
|
804
|
+
if (tables.has(registryKey)) {
|
|
801
805
|
throw new Error(
|
|
802
806
|
`OlapTable with name ${name} and version ${config?.version ?? "unversioned"} already exists`
|
|
803
807
|
);
|
|
@@ -1470,8 +1474,8 @@ var Stream = class extends TypedBase {
|
|
|
1470
1474
|
_memoizedProducer;
|
|
1471
1475
|
/** @internal Hash of the configuration used to create the memoized Kafka producer */
|
|
1472
1476
|
_kafkaConfigHash;
|
|
1473
|
-
constructor(name, config, schema, columns) {
|
|
1474
|
-
super(name, config ?? {}, schema, columns);
|
|
1477
|
+
constructor(name, config, schema, columns, validators, allowExtraFields) {
|
|
1478
|
+
super(name, config ?? {}, schema, columns, void 0, allowExtraFields);
|
|
1475
1479
|
const streams = getMooseInternal().streams;
|
|
1476
1480
|
if (streams.has(name)) {
|
|
1477
1481
|
throw new Error(`Stream with name ${name} already exists`);
|
|
@@ -1723,7 +1727,7 @@ var DeadLetterQueue = class extends Stream {
|
|
|
1723
1727
|
"Supply the type param T so that the schema is inserted by the compiler plugin."
|
|
1724
1728
|
);
|
|
1725
1729
|
}
|
|
1726
|
-
super(name, config ?? {}, dlqSchema, dlqColumns);
|
|
1730
|
+
super(name, config ?? {}, dlqSchema, dlqColumns, void 0, false);
|
|
1727
1731
|
this.typeGuard = typeGuard;
|
|
1728
1732
|
getMooseInternal().streams.set(name, this);
|
|
1729
1733
|
}
|
|
@@ -1889,8 +1893,8 @@ var Workflow = class {
|
|
|
1889
1893
|
|
|
1890
1894
|
// src/dmv2/sdk/ingestApi.ts
|
|
1891
1895
|
var IngestApi = class extends TypedBase {
|
|
1892
|
-
constructor(name, config, schema, columns) {
|
|
1893
|
-
super(name, config, schema, columns);
|
|
1896
|
+
constructor(name, config, schema, columns, validators, allowExtraFields) {
|
|
1897
|
+
super(name, config, schema, columns, void 0, allowExtraFields);
|
|
1894
1898
|
const ingestApis = getMooseInternal().ingestApis;
|
|
1895
1899
|
if (ingestApis.has(name)) {
|
|
1896
1900
|
throw new Error(`Ingest API with name ${name} already exists`);
|
|
@@ -2029,8 +2033,8 @@ var IngestPipeline = class extends TypedBase {
|
|
|
2029
2033
|
ingestApi;
|
|
2030
2034
|
/** The dead letter queue of the pipeline, if configured. */
|
|
2031
2035
|
deadLetterQueue;
|
|
2032
|
-
constructor(name, config, schema, columns, validators) {
|
|
2033
|
-
super(name, config, schema, columns, validators);
|
|
2036
|
+
constructor(name, config, schema, columns, validators, allowExtraFields) {
|
|
2037
|
+
super(name, config, schema, columns, validators, allowExtraFields);
|
|
2034
2038
|
if (config.ingest !== void 0) {
|
|
2035
2039
|
console.warn(
|
|
2036
2040
|
"\u26A0\uFE0F DEPRECATION WARNING: The 'ingest' parameter is deprecated and will be removed in a future version. Please use 'ingestApi' instead."
|
|
@@ -2079,7 +2083,9 @@ var IngestPipeline = class extends TypedBase {
|
|
|
2079
2083
|
name,
|
|
2080
2084
|
streamConfig,
|
|
2081
2085
|
this.schema,
|
|
2082
|
-
this.columnArray
|
|
2086
|
+
this.columnArray,
|
|
2087
|
+
void 0,
|
|
2088
|
+
this.allowExtraFields
|
|
2083
2089
|
);
|
|
2084
2090
|
this.stream.pipelineParent = this;
|
|
2085
2091
|
}
|
|
@@ -2099,7 +2105,9 @@ var IngestPipeline = class extends TypedBase {
|
|
|
2099
2105
|
name,
|
|
2100
2106
|
ingestConfig,
|
|
2101
2107
|
this.schema,
|
|
2102
|
-
this.columnArray
|
|
2108
|
+
this.columnArray,
|
|
2109
|
+
void 0,
|
|
2110
|
+
this.allowExtraFields
|
|
2103
2111
|
);
|
|
2104
2112
|
this.ingestApi.pipelineParent = this;
|
|
2105
2113
|
}
|
|
@@ -2273,7 +2281,7 @@ var SqlResource = class {
|
|
|
2273
2281
|
*/
|
|
2274
2282
|
constructor(name, setup, teardown, options) {
|
|
2275
2283
|
const sqlResources = getMooseInternal().sqlResources;
|
|
2276
|
-
if (
|
|
2284
|
+
if (sqlResources.has(name)) {
|
|
2277
2285
|
throw new Error(`SqlResource with name ${name} already exists`);
|
|
2278
2286
|
}
|
|
2279
2287
|
sqlResources.set(name, this);
|