@514labs/moose-lib 0.6.280 → 0.6.281

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/index.js CHANGED
@@ -472,10 +472,13 @@ module.exports = __toCommonJS(index_exports);
472
472
  // src/dmv2/utils/stackTrace.ts
473
473
  function shouldSkipStackLine(line) {
474
474
  return line.includes("node_modules") || // Skip npm installed packages (prod)
475
- line.includes("internal/modules") || // Skip Node.js internals
475
+ line.includes("node:internal") || // Skip Node.js internals (modern format)
476
+ line.includes("internal/modules") || // Skip Node.js internals (older format)
476
477
  line.includes("ts-node") || // Skip TypeScript execution
477
- line.includes("/ts-moose-lib/") || // Skip dev/linked moose-lib (Unix)
478
- line.includes("\\ts-moose-lib\\");
478
+ line.includes("/ts-moose-lib/src/") || // Skip dev/linked moose-lib src (Unix)
479
+ line.includes("\\ts-moose-lib\\src\\") || // Skip dev/linked moose-lib src (Windows)
480
+ line.includes("/ts-moose-lib/dist/") || // Skip dev/linked moose-lib dist (Unix)
481
+ line.includes("\\ts-moose-lib\\dist\\");
479
482
  }
480
483
  function parseStackLine(line) {
481
484
  const match = line.match(/\((.*):(\d+):(\d+)\)/) || line.match(/at (.*):(\d+):(\d+)/);
@@ -578,12 +581,12 @@ var TypedBase = class {
578
581
  this.validators = validators;
579
582
  this.allowExtraFields = allowExtraFields ?? false;
580
583
  this.metadata = config?.metadata ? { ...config.metadata } : {};
581
- const stack = new Error().stack;
582
- if (stack) {
583
- const info = getSourceFileInfo(stack);
584
- this.metadata.source = { file: info.file, line: info.line };
585
- } else {
586
- this.metadata.source = void 0;
584
+ if (!this.metadata.source) {
585
+ const stack = new Error().stack;
586
+ if (stack) {
587
+ const info = getSourceFileInfo(stack);
588
+ this.metadata.source = { file: info.file, line: info.line };
589
+ }
587
590
  }
588
591
  }
589
592
  };