@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
|
@@ -351,24 +351,39 @@ var init_runtime = __esm({
|
|
|
351
351
|
}
|
|
352
352
|
});
|
|
353
353
|
|
|
354
|
-
// src/dmv2/
|
|
355
|
-
function
|
|
354
|
+
// src/dmv2/utils/stackTrace.ts
|
|
355
|
+
function shouldSkipStackLine(line) {
|
|
356
|
+
return line.includes("node_modules") || // Skip npm installed packages (prod)
|
|
357
|
+
line.includes("internal/modules") || // Skip Node.js internals
|
|
358
|
+
line.includes("ts-node") || // Skip TypeScript execution
|
|
359
|
+
line.includes("/ts-moose-lib/") || // Skip dev/linked moose-lib (Unix)
|
|
360
|
+
line.includes("\\ts-moose-lib\\");
|
|
361
|
+
}
|
|
362
|
+
function parseStackLine(line) {
|
|
363
|
+
const match = line.match(/\((.*):(\d+):(\d+)\)/) || line.match(/at (.*):(\d+):(\d+)/);
|
|
364
|
+
if (match && match[1]) {
|
|
365
|
+
return {
|
|
366
|
+
file: match[1],
|
|
367
|
+
line: match[2]
|
|
368
|
+
};
|
|
369
|
+
}
|
|
370
|
+
return void 0;
|
|
371
|
+
}
|
|
372
|
+
function getSourceFileInfo(stack) {
|
|
356
373
|
if (!stack) return {};
|
|
357
374
|
const lines = stack.split("\n");
|
|
358
375
|
for (const line of lines) {
|
|
359
|
-
if (
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
if (match && match[1]) {
|
|
363
|
-
return {
|
|
364
|
-
file: match[1],
|
|
365
|
-
line: match[2]
|
|
366
|
-
// Only the line number
|
|
367
|
-
};
|
|
368
|
-
}
|
|
376
|
+
if (shouldSkipStackLine(line)) continue;
|
|
377
|
+
const info = parseStackLine(line);
|
|
378
|
+
if (info) return info;
|
|
369
379
|
}
|
|
370
380
|
return {};
|
|
371
381
|
}
|
|
382
|
+
function getSourceFileFromStack(stack) {
|
|
383
|
+
return getSourceFileInfo(stack).file;
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
// src/dmv2/typedBase.ts
|
|
372
387
|
var TypedBase = class {
|
|
373
388
|
/** The JSON schema representation of type T. Injected by the compiler plugin. */
|
|
374
389
|
schema;
|
|
@@ -412,7 +427,7 @@ var TypedBase = class {
|
|
|
412
427
|
this.metadata = config?.metadata ? { ...config.metadata } : {};
|
|
413
428
|
const stack = new Error().stack;
|
|
414
429
|
if (stack) {
|
|
415
|
-
const info =
|
|
430
|
+
const info = getSourceFileInfo(stack);
|
|
416
431
|
this.metadata.source = { file: info.file, line: info.line };
|
|
417
432
|
} else {
|
|
418
433
|
this.metadata.source = void 0;
|
|
@@ -711,8 +726,7 @@ var dlqColumns = [
|
|
|
711
726
|
default: null,
|
|
712
727
|
annotations: [],
|
|
713
728
|
ttl: null,
|
|
714
|
-
codec: null
|
|
715
|
-
materialized: null
|
|
729
|
+
codec: null
|
|
716
730
|
},
|
|
717
731
|
{
|
|
718
732
|
name: "errorMessage",
|
|
@@ -723,8 +737,7 @@ var dlqColumns = [
|
|
|
723
737
|
default: null,
|
|
724
738
|
annotations: [],
|
|
725
739
|
ttl: null,
|
|
726
|
-
codec: null
|
|
727
|
-
materialized: null
|
|
740
|
+
codec: null
|
|
728
741
|
},
|
|
729
742
|
{
|
|
730
743
|
name: "errorType",
|
|
@@ -735,8 +748,7 @@ var dlqColumns = [
|
|
|
735
748
|
default: null,
|
|
736
749
|
annotations: [],
|
|
737
750
|
ttl: null,
|
|
738
|
-
codec: null
|
|
739
|
-
materialized: null
|
|
751
|
+
codec: null
|
|
740
752
|
},
|
|
741
753
|
{
|
|
742
754
|
name: "failedAt",
|
|
@@ -747,8 +759,7 @@ var dlqColumns = [
|
|
|
747
759
|
default: null,
|
|
748
760
|
annotations: [],
|
|
749
761
|
ttl: null,
|
|
750
|
-
codec: null
|
|
751
|
-
materialized: null
|
|
762
|
+
codec: null
|
|
752
763
|
},
|
|
753
764
|
{
|
|
754
765
|
name: "source",
|
|
@@ -759,8 +770,7 @@ var dlqColumns = [
|
|
|
759
770
|
default: null,
|
|
760
771
|
annotations: [],
|
|
761
772
|
ttl: null,
|
|
762
|
-
codec: null
|
|
763
|
-
materialized: null
|
|
773
|
+
codec: null
|
|
764
774
|
}
|
|
765
775
|
];
|
|
766
776
|
|
|
@@ -1647,8 +1657,10 @@ var Stream = class extends TypedBase {
|
|
|
1647
1657
|
* @param config Optional configuration for this specific transformation step, like a version.
|
|
1648
1658
|
*/
|
|
1649
1659
|
addTransform(destination, transformation, config) {
|
|
1660
|
+
const sourceFile = getSourceFileFromStack(new Error().stack);
|
|
1650
1661
|
const transformConfig = {
|
|
1651
|
-
...config ?? {}
|
|
1662
|
+
...config ?? {},
|
|
1663
|
+
sourceFile
|
|
1652
1664
|
};
|
|
1653
1665
|
if (transformConfig.deadLetterQueue === void 0) {
|
|
1654
1666
|
transformConfig.deadLetterQueue = this.defaultDeadLetterQueue;
|
|
@@ -1675,8 +1687,10 @@ var Stream = class extends TypedBase {
|
|
|
1675
1687
|
* @param config Optional configuration for this specific consumer, like a version.
|
|
1676
1688
|
*/
|
|
1677
1689
|
addConsumer(consumer, config) {
|
|
1690
|
+
const sourceFile = getSourceFileFromStack(new Error().stack);
|
|
1678
1691
|
const consumerConfig = {
|
|
1679
|
-
...config ?? {}
|
|
1692
|
+
...config ?? {},
|
|
1693
|
+
sourceFile
|
|
1680
1694
|
};
|
|
1681
1695
|
if (consumerConfig.deadLetterQueue === void 0) {
|
|
1682
1696
|
consumerConfig.deadLetterQueue = this.defaultDeadLetterQueue;
|
|
@@ -2263,6 +2277,8 @@ var SqlResource = class {
|
|
|
2263
2277
|
pullsDataFrom;
|
|
2264
2278
|
/** List of OlapTables or Views that this resource writes data to. */
|
|
2265
2279
|
pushesDataTo;
|
|
2280
|
+
/** @internal Source file path where this resource was defined */
|
|
2281
|
+
sourceFile;
|
|
2266
2282
|
/**
|
|
2267
2283
|
* Creates a new SqlResource instance.
|
|
2268
2284
|
* @param name The name of the resource.
|
|
@@ -2287,6 +2303,8 @@ var SqlResource = class {
|
|
|
2287
2303
|
);
|
|
2288
2304
|
this.pullsDataFrom = options?.pullsDataFrom ?? [];
|
|
2289
2305
|
this.pushesDataTo = options?.pushesDataTo ?? [];
|
|
2306
|
+
const stack = new Error().stack;
|
|
2307
|
+
this.sourceFile = getSourceFileFromStack(stack);
|
|
2290
2308
|
}
|
|
2291
2309
|
};
|
|
2292
2310
|
|