@adviser/cement 0.2.26 → 0.2.28

Sign up to get free protection for your applications and to get access to all the features.
package/index.cjs CHANGED
@@ -8904,6 +8904,10 @@ var LoggerImpl = class _LoggerImpl {
8904
8904
  this._levelHandler.setDebug(...modules);
8905
8905
  return this;
8906
8906
  }
8907
+ SetFormatter(formatter) {
8908
+ this._formatter = formatter;
8909
+ return this;
8910
+ }
8907
8911
  Timestamp() {
8908
8912
  this._attributes["ts"] = logValue(() => this._sys.Time().Now().toISOString());
8909
8913
  return this;
@@ -9013,6 +9017,7 @@ var LoggerImpl = class _LoggerImpl {
9013
9017
  logWriter: this._logWriter,
9014
9018
  sys: this._sys,
9015
9019
  levelHandler: this._levelHandler,
9020
+ formatter: this._formatter,
9016
9021
  withAttributes: __spreadValues({
9017
9022
  module: this._attributes["module"]
9018
9023
  }, this._withAttributes)
@@ -9070,6 +9075,10 @@ var WithLoggerBuilder = class {
9070
9075
  this._li._levelHandler.setExposeStack(enable);
9071
9076
  return this;
9072
9077
  }
9078
+ SetFormatter(fmt) {
9079
+ this._li.SetFormatter(fmt);
9080
+ return this;
9081
+ }
9073
9082
  EnableLevel(level, ...modules) {
9074
9083
  this._li._levelHandler.enableLevel(level, ...modules);
9075
9084
  return this;
@@ -9354,6 +9363,7 @@ function digestSHA256(data) {
9354
9363
  function toCryptoRuntime(cryptoOpts = {}) {
9355
9364
  const runtime = {
9356
9365
  importKey: cryptoOpts.importKey || crypto.subtle.importKey.bind(crypto.subtle),
9366
+ exportKey: cryptoOpts.exportKey || crypto.subtle.exportKey.bind(crypto.subtle),
9357
9367
  encrypt: cryptoOpts.encrypt || crypto.subtle.encrypt.bind(crypto.subtle),
9358
9368
  decrypt: cryptoOpts.decrypt || crypto.subtle.decrypt.bind(crypto.subtle),
9359
9369
  randomBytes: cryptoOpts.randomBytes || randomBytes,