@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.js CHANGED
@@ -472,11 +472,10 @@ 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("node:internal") || // Skip Node.js internals (modern format)
476
- line.includes("internal/modules") || // Skip Node.js internals (older format)
475
+ line.includes("internal/modules") || // Skip Node.js internals
477
476
  line.includes("ts-node") || // Skip TypeScript execution
478
- line.includes("/ts-moose-lib/src/") || // Skip dev/linked moose-lib src (Unix)
479
- line.includes("\\ts-moose-lib\\src\\");
477
+ line.includes("/ts-moose-lib/") || // Skip dev/linked moose-lib (Unix)
478
+ line.includes("\\ts-moose-lib\\");
480
479
  }
481
480
  function parseStackLine(line) {
482
481
  const match = line.match(/\((.*):(\d+):(\d+)\)/) || line.match(/at (.*):(\d+):(\d+)/);
@@ -579,12 +578,12 @@ var TypedBase = class {
579
578
  this.validators = validators;
580
579
  this.allowExtraFields = allowExtraFields ?? false;
581
580
  this.metadata = config?.metadata ? { ...config.metadata } : {};
582
- if (!this.metadata.source) {
583
- const stack = new Error().stack;
584
- if (stack) {
585
- const info = getSourceFileInfo(stack);
586
- this.metadata.source = { file: info.file, line: info.line };
587
- }
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;
588
587
  }
589
588
  }
590
589
  };
@@ -1022,7 +1021,8 @@ var OlapTable = class extends TypedBase {
1022
1021
  * @private
1023
1022
  */
1024
1023
  createConfigHash(clickhouseConfig) {
1025
- const configString = `${clickhouseConfig.host}:${clickhouseConfig.port}:${clickhouseConfig.username}:${clickhouseConfig.password}:${clickhouseConfig.database}:${clickhouseConfig.useSSL}`;
1024
+ const effectiveDatabase = this.config.database ?? clickhouseConfig.database;
1025
+ const configString = `${clickhouseConfig.host}:${clickhouseConfig.port}:${clickhouseConfig.username}:${clickhouseConfig.password}:${effectiveDatabase}:${clickhouseConfig.useSSL}`;
1026
1026
  return (0, import_node_crypto.createHash)("sha256").update(configString).digest("hex").substring(0, 16);
1027
1027
  }
1028
1028
  /**
@@ -1047,10 +1047,11 @@ var OlapTable = class extends TypedBase {
1047
1047
  } catch (error) {
1048
1048
  }
1049
1049
  }
1050
+ const effectiveDatabase = this.config.database ?? clickhouseConfig.database;
1050
1051
  const client = getClickhouseClient2({
1051
1052
  username: clickhouseConfig.username,
1052
1053
  password: clickhouseConfig.password,
1053
- database: clickhouseConfig.database,
1054
+ database: effectiveDatabase,
1054
1055
  useSSL: clickhouseConfig.useSSL ? "true" : "false",
1055
1056
  host: clickhouseConfig.host,
1056
1057
  port: clickhouseConfig.port