@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
package/dist/dmv2/index.mjs
CHANGED
|
@@ -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) {
|
|
@@ -493,9 +501,6 @@ function createMaterializedView(options) {
|
|
|
493
501
|
AS ${options.select}`.trim();
|
|
494
502
|
}
|
|
495
503
|
|
|
496
|
-
// src/dmv2/internal.ts
|
|
497
|
-
import process2 from "process";
|
|
498
|
-
|
|
499
504
|
// src/index.ts
|
|
500
505
|
init_commons();
|
|
501
506
|
|
|
@@ -538,7 +543,6 @@ var DEFAULT_CSV_CONFIG = {
|
|
|
538
543
|
|
|
539
544
|
// src/dmv2/internal.ts
|
|
540
545
|
init_commons();
|
|
541
|
-
var isClientOnlyMode = () => process2.env.MOOSE_CLIENT_ONLY === "true";
|
|
542
546
|
var moose_internal = {
|
|
543
547
|
tables: /* @__PURE__ */ new Map(),
|
|
544
548
|
streams: /* @__PURE__ */ new Map(),
|
|
@@ -702,7 +706,7 @@ var OlapTable = class extends TypedBase {
|
|
|
702
706
|
this.name = name;
|
|
703
707
|
const tables = getMooseInternal().tables;
|
|
704
708
|
const registryKey = this.config.version ? `${name}_${this.config.version}` : name;
|
|
705
|
-
if (
|
|
709
|
+
if (tables.has(registryKey)) {
|
|
706
710
|
throw new Error(
|
|
707
711
|
`OlapTable with name ${name} and version ${config?.version ?? "unversioned"} already exists`
|
|
708
712
|
);
|
|
@@ -1375,8 +1379,8 @@ var Stream = class extends TypedBase {
|
|
|
1375
1379
|
_memoizedProducer;
|
|
1376
1380
|
/** @internal Hash of the configuration used to create the memoized Kafka producer */
|
|
1377
1381
|
_kafkaConfigHash;
|
|
1378
|
-
constructor(name, config, schema, columns) {
|
|
1379
|
-
super(name, config ?? {}, schema, columns);
|
|
1382
|
+
constructor(name, config, schema, columns, validators, allowExtraFields) {
|
|
1383
|
+
super(name, config ?? {}, schema, columns, void 0, allowExtraFields);
|
|
1380
1384
|
const streams = getMooseInternal().streams;
|
|
1381
1385
|
if (streams.has(name)) {
|
|
1382
1386
|
throw new Error(`Stream with name ${name} already exists`);
|
|
@@ -1628,7 +1632,7 @@ var DeadLetterQueue = class extends Stream {
|
|
|
1628
1632
|
"Supply the type param T so that the schema is inserted by the compiler plugin."
|
|
1629
1633
|
);
|
|
1630
1634
|
}
|
|
1631
|
-
super(name, config ?? {}, dlqSchema, dlqColumns);
|
|
1635
|
+
super(name, config ?? {}, dlqSchema, dlqColumns, void 0, false);
|
|
1632
1636
|
this.typeGuard = typeGuard;
|
|
1633
1637
|
getMooseInternal().streams.set(name, this);
|
|
1634
1638
|
}
|
|
@@ -1794,8 +1798,8 @@ var Workflow = class {
|
|
|
1794
1798
|
|
|
1795
1799
|
// src/dmv2/sdk/ingestApi.ts
|
|
1796
1800
|
var IngestApi = class extends TypedBase {
|
|
1797
|
-
constructor(name, config, schema, columns) {
|
|
1798
|
-
super(name, config, schema, columns);
|
|
1801
|
+
constructor(name, config, schema, columns, validators, allowExtraFields) {
|
|
1802
|
+
super(name, config, schema, columns, void 0, allowExtraFields);
|
|
1799
1803
|
const ingestApis = getMooseInternal().ingestApis;
|
|
1800
1804
|
if (ingestApis.has(name)) {
|
|
1801
1805
|
throw new Error(`Ingest API with name ${name} already exists`);
|
|
@@ -1934,8 +1938,8 @@ var IngestPipeline = class extends TypedBase {
|
|
|
1934
1938
|
ingestApi;
|
|
1935
1939
|
/** The dead letter queue of the pipeline, if configured. */
|
|
1936
1940
|
deadLetterQueue;
|
|
1937
|
-
constructor(name, config, schema, columns, validators) {
|
|
1938
|
-
super(name, config, schema, columns, validators);
|
|
1941
|
+
constructor(name, config, schema, columns, validators, allowExtraFields) {
|
|
1942
|
+
super(name, config, schema, columns, validators, allowExtraFields);
|
|
1939
1943
|
if (config.ingest !== void 0) {
|
|
1940
1944
|
console.warn(
|
|
1941
1945
|
"\u26A0\uFE0F DEPRECATION WARNING: The 'ingest' parameter is deprecated and will be removed in a future version. Please use 'ingestApi' instead."
|
|
@@ -1984,7 +1988,9 @@ var IngestPipeline = class extends TypedBase {
|
|
|
1984
1988
|
name,
|
|
1985
1989
|
streamConfig,
|
|
1986
1990
|
this.schema,
|
|
1987
|
-
this.columnArray
|
|
1991
|
+
this.columnArray,
|
|
1992
|
+
void 0,
|
|
1993
|
+
this.allowExtraFields
|
|
1988
1994
|
);
|
|
1989
1995
|
this.stream.pipelineParent = this;
|
|
1990
1996
|
}
|
|
@@ -2004,7 +2010,9 @@ var IngestPipeline = class extends TypedBase {
|
|
|
2004
2010
|
name,
|
|
2005
2011
|
ingestConfig,
|
|
2006
2012
|
this.schema,
|
|
2007
|
-
this.columnArray
|
|
2013
|
+
this.columnArray,
|
|
2014
|
+
void 0,
|
|
2015
|
+
this.allowExtraFields
|
|
2008
2016
|
);
|
|
2009
2017
|
this.ingestApi.pipelineParent = this;
|
|
2010
2018
|
}
|
|
@@ -2178,7 +2186,7 @@ var SqlResource = class {
|
|
|
2178
2186
|
*/
|
|
2179
2187
|
constructor(name, setup, teardown, options) {
|
|
2180
2188
|
const sqlResources = getMooseInternal().sqlResources;
|
|
2181
|
-
if (
|
|
2189
|
+
if (sqlResources.has(name)) {
|
|
2182
2190
|
throw new Error(`SqlResource with name ${name} already exists`);
|
|
2183
2191
|
}
|
|
2184
2192
|
sqlResources.set(name, this);
|