@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
  };
@@ -892,7 +891,8 @@ var OlapTable = class extends TypedBase {
892
891
  * @private
893
892
  */
894
893
  createConfigHash(clickhouseConfig) {
895
- const configString = `${clickhouseConfig.host}:${clickhouseConfig.port}:${clickhouseConfig.username}:${clickhouseConfig.password}:${clickhouseConfig.database}:${clickhouseConfig.useSSL}`;
894
+ const effectiveDatabase = this.config.database ?? clickhouseConfig.database;
895
+ const configString = `${clickhouseConfig.host}:${clickhouseConfig.port}:${clickhouseConfig.username}:${clickhouseConfig.password}:${effectiveDatabase}:${clickhouseConfig.useSSL}`;
896
896
  return createHash2("sha256").update(configString).digest("hex").substring(0, 16);
897
897
  }
898
898
  /**
@@ -917,10 +917,11 @@ var OlapTable = class extends TypedBase {
917
917
  } catch (error) {
918
918
  }
919
919
  }
920
+ const effectiveDatabase = this.config.database ?? clickhouseConfig.database;
920
921
  const client = getClickhouseClient2({
921
922
  username: clickhouseConfig.username,
922
923
  password: clickhouseConfig.password,
923
- database: clickhouseConfig.database,
924
+ database: effectiveDatabase,
924
925
  useSSL: clickhouseConfig.useSSL ? "true" : "false",
925
926
  host: clickhouseConfig.host,
926
927
  port: clickhouseConfig.port