@514labs/moose-lib 0.6.271-ci-1-g2b350d57 → 0.6.272

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.
@@ -362,11 +362,10 @@ var init_runtime = __esm({
362
362
  // src/dmv2/utils/stackTrace.ts
363
363
  function shouldSkipStackLine(line) {
364
364
  return line.includes("node_modules") || // Skip npm installed packages (prod)
365
- line.includes("node:internal") || // Skip Node.js internals (modern format)
366
- line.includes("internal/modules") || // Skip Node.js internals (older format)
365
+ line.includes("internal/modules") || // Skip Node.js internals
367
366
  line.includes("ts-node") || // Skip TypeScript execution
368
- line.includes("/ts-moose-lib/src/") || // Skip dev/linked moose-lib src (Unix)
369
- line.includes("\\ts-moose-lib\\src\\");
367
+ line.includes("/ts-moose-lib/") || // Skip dev/linked moose-lib (Unix)
368
+ line.includes("\\ts-moose-lib\\");
370
369
  }
371
370
  function parseStackLine(line) {
372
371
  const match = line.match(/\((.*):(\d+):(\d+)\)/) || line.match(/at (.*):(\d+):(\d+)/);
@@ -469,12 +468,12 @@ var TypedBase = class {
469
468
  this.validators = validators;
470
469
  this.allowExtraFields = allowExtraFields ?? false;
471
470
  this.metadata = config?.metadata ? { ...config.metadata } : {};
472
- if (!this.metadata.source) {
473
- const stack = new Error().stack;
474
- if (stack) {
475
- const info = getSourceFileInfo(stack);
476
- this.metadata.source = { file: info.file, line: info.line };
477
- }
471
+ const stack = new Error().stack;
472
+ if (stack) {
473
+ const info = getSourceFileInfo(stack);
474
+ this.metadata.source = { file: info.file, line: info.line };
475
+ } else {
476
+ this.metadata.source = void 0;
478
477
  }
479
478
  }
480
479
  };
@@ -797,7 +796,8 @@ var OlapTable = class extends TypedBase {
797
796
  * @private
798
797
  */
799
798
  createConfigHash(clickhouseConfig) {
800
- const configString = `${clickhouseConfig.host}:${clickhouseConfig.port}:${clickhouseConfig.username}:${clickhouseConfig.password}:${clickhouseConfig.database}:${clickhouseConfig.useSSL}`;
799
+ const effectiveDatabase = this.config.database ?? clickhouseConfig.database;
800
+ const configString = `${clickhouseConfig.host}:${clickhouseConfig.port}:${clickhouseConfig.username}:${clickhouseConfig.password}:${effectiveDatabase}:${clickhouseConfig.useSSL}`;
801
801
  return createHash2("sha256").update(configString).digest("hex").substring(0, 16);
802
802
  }
803
803
  /**
@@ -822,10 +822,11 @@ var OlapTable = class extends TypedBase {
822
822
  } catch (error) {
823
823
  }
824
824
  }
825
+ const effectiveDatabase = this.config.database ?? clickhouseConfig.database;
825
826
  const client = getClickhouseClient2({
826
827
  username: clickhouseConfig.username,
827
828
  password: clickhouseConfig.password,
828
- database: clickhouseConfig.database,
829
+ database: effectiveDatabase,
829
830
  useSSL: clickhouseConfig.useSSL ? "true" : "false",
830
831
  host: clickhouseConfig.host,
831
832
  port: clickhouseConfig.port