@514labs/moose-lib 0.6.238-ci-6-g1a6f273f → 0.6.239-ci-14-g85f6cfc1
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-CKgEUuZc.d.ts → browserCompatible-bG7qUssc.d.mts} +2 -26
- package/dist/{browserCompatible-DCc9Zd_X.d.mts → browserCompatible-mRmtV1to.d.ts} +2 -26
- package/dist/browserCompatible.d.mts +2 -2
- package/dist/browserCompatible.d.ts +2 -2
- package/dist/browserCompatible.js +43 -25
- package/dist/browserCompatible.js.map +1 -1
- package/dist/browserCompatible.mjs +43 -25
- package/dist/browserCompatible.mjs.map +1 -1
- package/dist/compilerPlugin.js +1 -25
- package/dist/compilerPlugin.js.map +1 -1
- package/dist/compilerPlugin.mjs +1 -25
- package/dist/compilerPlugin.mjs.map +1 -1
- package/dist/dataModels/toDataModels.js +1 -25
- package/dist/dataModels/toDataModels.js.map +1 -1
- package/dist/dataModels/toDataModels.mjs +1 -25
- 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 +43 -25
- package/dist/dmv2/index.js.map +1 -1
- package/dist/dmv2/index.mjs +43 -25
- package/dist/dmv2/index.mjs.map +1 -1
- package/dist/{index-CYFF3a0J.d.mts → index-DtHRzX8Z.d.mts} +12 -1
- package/dist/{index-CYFF3a0J.d.ts → index-DtHRzX8Z.d.ts} +12 -1
- package/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +43 -25
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +43 -25
- package/dist/index.mjs.map +1 -1
- package/dist/moose-runner.js +5 -2
- package/dist/moose-runner.js.map +1 -1
- package/dist/moose-runner.mjs +5 -2
- package/dist/moose-runner.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -357,24 +357,39 @@ var init_runtime = __esm({
|
|
|
357
357
|
}
|
|
358
358
|
});
|
|
359
359
|
|
|
360
|
-
// src/dmv2/
|
|
361
|
-
function
|
|
360
|
+
// src/dmv2/utils/stackTrace.ts
|
|
361
|
+
function shouldSkipStackLine(line) {
|
|
362
|
+
return line.includes("node_modules") || // Skip npm installed packages (prod)
|
|
363
|
+
line.includes("internal/modules") || // Skip Node.js internals
|
|
364
|
+
line.includes("ts-node") || // Skip TypeScript execution
|
|
365
|
+
line.includes("/ts-moose-lib/") || // Skip dev/linked moose-lib (Unix)
|
|
366
|
+
line.includes("\\ts-moose-lib\\");
|
|
367
|
+
}
|
|
368
|
+
function parseStackLine(line) {
|
|
369
|
+
const match = line.match(/\((.*):(\d+):(\d+)\)/) || line.match(/at (.*):(\d+):(\d+)/);
|
|
370
|
+
if (match && match[1]) {
|
|
371
|
+
return {
|
|
372
|
+
file: match[1],
|
|
373
|
+
line: match[2]
|
|
374
|
+
};
|
|
375
|
+
}
|
|
376
|
+
return void 0;
|
|
377
|
+
}
|
|
378
|
+
function getSourceFileInfo(stack) {
|
|
362
379
|
if (!stack) return {};
|
|
363
380
|
const lines = stack.split("\n");
|
|
364
381
|
for (const line of lines) {
|
|
365
|
-
if (
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
if (match && match[1]) {
|
|
369
|
-
return {
|
|
370
|
-
file: match[1],
|
|
371
|
-
line: match[2]
|
|
372
|
-
// Only the line number
|
|
373
|
-
};
|
|
374
|
-
}
|
|
382
|
+
if (shouldSkipStackLine(line)) continue;
|
|
383
|
+
const info = parseStackLine(line);
|
|
384
|
+
if (info) return info;
|
|
375
385
|
}
|
|
376
386
|
return {};
|
|
377
387
|
}
|
|
388
|
+
function getSourceFileFromStack(stack) {
|
|
389
|
+
return getSourceFileInfo(stack).file;
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
// src/dmv2/typedBase.ts
|
|
378
393
|
var TypedBase = class {
|
|
379
394
|
/** The JSON schema representation of type T. Injected by the compiler plugin. */
|
|
380
395
|
schema;
|
|
@@ -418,7 +433,7 @@ var TypedBase = class {
|
|
|
418
433
|
this.metadata = config?.metadata ? { ...config.metadata } : {};
|
|
419
434
|
const stack = new Error().stack;
|
|
420
435
|
if (stack) {
|
|
421
|
-
const info =
|
|
436
|
+
const info = getSourceFileInfo(stack);
|
|
422
437
|
this.metadata.source = { file: info.file, line: info.line };
|
|
423
438
|
} else {
|
|
424
439
|
this.metadata.source = void 0;
|
|
@@ -732,8 +747,7 @@ var dlqColumns = [
|
|
|
732
747
|
default: null,
|
|
733
748
|
annotations: [],
|
|
734
749
|
ttl: null,
|
|
735
|
-
codec: null
|
|
736
|
-
materialized: null
|
|
750
|
+
codec: null
|
|
737
751
|
},
|
|
738
752
|
{
|
|
739
753
|
name: "errorMessage",
|
|
@@ -744,8 +758,7 @@ var dlqColumns = [
|
|
|
744
758
|
default: null,
|
|
745
759
|
annotations: [],
|
|
746
760
|
ttl: null,
|
|
747
|
-
codec: null
|
|
748
|
-
materialized: null
|
|
761
|
+
codec: null
|
|
749
762
|
},
|
|
750
763
|
{
|
|
751
764
|
name: "errorType",
|
|
@@ -756,8 +769,7 @@ var dlqColumns = [
|
|
|
756
769
|
default: null,
|
|
757
770
|
annotations: [],
|
|
758
771
|
ttl: null,
|
|
759
|
-
codec: null
|
|
760
|
-
materialized: null
|
|
772
|
+
codec: null
|
|
761
773
|
},
|
|
762
774
|
{
|
|
763
775
|
name: "failedAt",
|
|
@@ -768,8 +780,7 @@ var dlqColumns = [
|
|
|
768
780
|
default: null,
|
|
769
781
|
annotations: [],
|
|
770
782
|
ttl: null,
|
|
771
|
-
codec: null
|
|
772
|
-
materialized: null
|
|
783
|
+
codec: null
|
|
773
784
|
},
|
|
774
785
|
{
|
|
775
786
|
name: "source",
|
|
@@ -780,8 +791,7 @@ var dlqColumns = [
|
|
|
780
791
|
default: null,
|
|
781
792
|
annotations: [],
|
|
782
793
|
ttl: null,
|
|
783
|
-
codec: null
|
|
784
|
-
materialized: null
|
|
794
|
+
codec: null
|
|
785
795
|
}
|
|
786
796
|
];
|
|
787
797
|
var getWorkflows = async () => {
|
|
@@ -1673,8 +1683,10 @@ var Stream = class extends TypedBase {
|
|
|
1673
1683
|
* @param config Optional configuration for this specific transformation step, like a version.
|
|
1674
1684
|
*/
|
|
1675
1685
|
addTransform(destination, transformation, config) {
|
|
1686
|
+
const sourceFile = getSourceFileFromStack(new Error().stack);
|
|
1676
1687
|
const transformConfig = {
|
|
1677
|
-
...config ?? {}
|
|
1688
|
+
...config ?? {},
|
|
1689
|
+
sourceFile
|
|
1678
1690
|
};
|
|
1679
1691
|
if (transformConfig.deadLetterQueue === void 0) {
|
|
1680
1692
|
transformConfig.deadLetterQueue = this.defaultDeadLetterQueue;
|
|
@@ -1701,8 +1713,10 @@ var Stream = class extends TypedBase {
|
|
|
1701
1713
|
* @param config Optional configuration for this specific consumer, like a version.
|
|
1702
1714
|
*/
|
|
1703
1715
|
addConsumer(consumer, config) {
|
|
1716
|
+
const sourceFile = getSourceFileFromStack(new Error().stack);
|
|
1704
1717
|
const consumerConfig = {
|
|
1705
|
-
...config ?? {}
|
|
1718
|
+
...config ?? {},
|
|
1719
|
+
sourceFile
|
|
1706
1720
|
};
|
|
1707
1721
|
if (consumerConfig.deadLetterQueue === void 0) {
|
|
1708
1722
|
consumerConfig.deadLetterQueue = this.defaultDeadLetterQueue;
|
|
@@ -2289,6 +2303,8 @@ var SqlResource = class {
|
|
|
2289
2303
|
pullsDataFrom;
|
|
2290
2304
|
/** List of OlapTables or Views that this resource writes data to. */
|
|
2291
2305
|
pushesDataTo;
|
|
2306
|
+
/** @internal Source file path where this resource was defined */
|
|
2307
|
+
sourceFile;
|
|
2292
2308
|
/**
|
|
2293
2309
|
* Creates a new SqlResource instance.
|
|
2294
2310
|
* @param name The name of the resource.
|
|
@@ -2313,6 +2329,8 @@ var SqlResource = class {
|
|
|
2313
2329
|
);
|
|
2314
2330
|
this.pullsDataFrom = options?.pullsDataFrom ?? [];
|
|
2315
2331
|
this.pushesDataTo = options?.pushesDataTo ?? [];
|
|
2332
|
+
const stack = new Error().stack;
|
|
2333
|
+
this.sourceFile = getSourceFileFromStack(stack);
|
|
2316
2334
|
}
|
|
2317
2335
|
};
|
|
2318
2336
|
|