@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.
package/dist/index.mjs CHANGED
@@ -368,11 +368,10 @@ var init_runtime = __esm({
368
368
  // src/dmv2/utils/stackTrace.ts
369
369
  function shouldSkipStackLine(line) {
370
370
  return line.includes("node_modules") || // Skip npm installed packages (prod)
371
- line.includes("node:internal") || // Skip Node.js internals (modern format)
372
- line.includes("internal/modules") || // Skip Node.js internals (older format)
371
+ line.includes("internal/modules") || // Skip Node.js internals
373
372
  line.includes("ts-node") || // Skip TypeScript execution
374
- line.includes("/ts-moose-lib/src/") || // Skip dev/linked moose-lib src (Unix)
375
- line.includes("\\ts-moose-lib\\src\\");
373
+ line.includes("/ts-moose-lib/") || // Skip dev/linked moose-lib (Unix)
374
+ line.includes("\\ts-moose-lib\\");
376
375
  }
377
376
  function parseStackLine(line) {
378
377
  const match = line.match(/\((.*):(\d+):(\d+)\)/) || line.match(/at (.*):(\d+):(\d+)/);
@@ -475,12 +474,12 @@ var TypedBase = class {
475
474
  this.validators = validators;
476
475
  this.allowExtraFields = allowExtraFields ?? false;
477
476
  this.metadata = config?.metadata ? { ...config.metadata } : {};
478
- if (!this.metadata.source) {
479
- const stack = new Error().stack;
480
- if (stack) {
481
- const info = getSourceFileInfo(stack);
482
- this.metadata.source = { file: info.file, line: info.line };
483
- }
477
+ const stack = new Error().stack;
478
+ if (stack) {
479
+ const info = getSourceFileInfo(stack);
480
+ this.metadata.source = { file: info.file, line: info.line };
481
+ } else {
482
+ this.metadata.source = void 0;
484
483
  }
485
484
  }
486
485
  };
@@ -918,7 +917,8 @@ var OlapTable = class extends TypedBase {
918
917
  * @private
919
918
  */
920
919
  createConfigHash(clickhouseConfig) {
921
- const configString = `${clickhouseConfig.host}:${clickhouseConfig.port}:${clickhouseConfig.username}:${clickhouseConfig.password}:${clickhouseConfig.database}:${clickhouseConfig.useSSL}`;
920
+ const effectiveDatabase = this.config.database ?? clickhouseConfig.database;
921
+ const configString = `${clickhouseConfig.host}:${clickhouseConfig.port}:${clickhouseConfig.username}:${clickhouseConfig.password}:${effectiveDatabase}:${clickhouseConfig.useSSL}`;
922
922
  return createHash("sha256").update(configString).digest("hex").substring(0, 16);
923
923
  }
924
924
  /**
@@ -943,10 +943,11 @@ var OlapTable = class extends TypedBase {
943
943
  } catch (error) {
944
944
  }
945
945
  }
946
+ const effectiveDatabase = this.config.database ?? clickhouseConfig.database;
946
947
  const client = getClickhouseClient2({
947
948
  username: clickhouseConfig.username,
948
949
  password: clickhouseConfig.password,
949
- database: clickhouseConfig.database,
950
+ database: effectiveDatabase,
950
951
  useSSL: clickhouseConfig.useSSL ? "true" : "false",
951
952
  host: clickhouseConfig.host,
952
953
  port: clickhouseConfig.port