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

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,10 +368,11 @@ 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("internal/modules") || // Skip Node.js internals
371
+ line.includes("node:internal") || // Skip Node.js internals (modern format)
372
+ line.includes("internal/modules") || // Skip Node.js internals (older format)
372
373
  line.includes("ts-node") || // Skip TypeScript execution
373
- line.includes("/ts-moose-lib/") || // Skip dev/linked moose-lib (Unix)
374
- line.includes("\\ts-moose-lib\\");
374
+ line.includes("/ts-moose-lib/src/") || // Skip dev/linked moose-lib src (Unix)
375
+ line.includes("\\ts-moose-lib\\src\\");
375
376
  }
376
377
  function parseStackLine(line) {
377
378
  const match = line.match(/\((.*):(\d+):(\d+)\)/) || line.match(/at (.*):(\d+):(\d+)/);
@@ -474,12 +475,12 @@ var TypedBase = class {
474
475
  this.validators = validators;
475
476
  this.allowExtraFields = allowExtraFields ?? false;
476
477
  this.metadata = config?.metadata ? { ...config.metadata } : {};
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;
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
+ }
483
484
  }
484
485
  }
485
486
  };
@@ -917,7 +918,8 @@ var OlapTable = class extends TypedBase {
917
918
  * @private
918
919
  */
919
920
  createConfigHash(clickhouseConfig) {
920
- const configString = `${clickhouseConfig.host}:${clickhouseConfig.port}:${clickhouseConfig.username}:${clickhouseConfig.password}:${clickhouseConfig.database}:${clickhouseConfig.useSSL}`;
921
+ const effectiveDatabase = this.config.database ?? clickhouseConfig.database;
922
+ const configString = `${clickhouseConfig.host}:${clickhouseConfig.port}:${clickhouseConfig.username}:${clickhouseConfig.password}:${effectiveDatabase}:${clickhouseConfig.useSSL}`;
921
923
  return createHash("sha256").update(configString).digest("hex").substring(0, 16);
922
924
  }
923
925
  /**
@@ -942,10 +944,11 @@ var OlapTable = class extends TypedBase {
942
944
  } catch (error) {
943
945
  }
944
946
  }
947
+ const effectiveDatabase = this.config.database ?? clickhouseConfig.database;
945
948
  const client = getClickhouseClient2({
946
949
  username: clickhouseConfig.username,
947
950
  password: clickhouseConfig.password,
948
- database: clickhouseConfig.database,
951
+ database: effectiveDatabase,
949
952
  useSSL: clickhouseConfig.useSSL ? "true" : "false",
950
953
  host: clickhouseConfig.host,
951
954
  port: clickhouseConfig.port