@itwin/core-i18n 5.0.0-dev.32 → 5.0.0-dev.35

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.
@@ -17010,6 +17010,7 @@ var CompressedId64Set;
17010
17010
  CompressedId64Set.compressIds = compressIds;
17011
17011
  /** This exists strictly for the purposes of compressed sets of 64-bit Ids, to avoid the overhead of BigInt for handling 64-bit integers. */
17012
17012
  class Uint64 {
17013
+ static { this._base = 0x100000000; }
17013
17014
  static assertUint32(num) {
17014
17015
  (0,_Assert__WEBPACK_IMPORTED_MODULE_0__.assert)(num >= 0);
17015
17016
  (0,_Assert__WEBPACK_IMPORTED_MODULE_0__.assert)(num < Uint64._base);
@@ -17071,7 +17072,6 @@ var CompressedId64Set;
17071
17072
  return _Id__WEBPACK_IMPORTED_MODULE_1__.Id64.fromUint32Pair(this.lower, this.upper);
17072
17073
  }
17073
17074
  }
17074
- Uint64._base = 0x100000000;
17075
17075
  /** Supplies an iterator over the [[Id64String]]s in a [[CompressedId64Set]].
17076
17076
  * The Ids are iterated in ascending order based on their unsigned 64-bit integer values.
17077
17077
  */
@@ -19086,6 +19086,7 @@ var LogLevel;
19086
19086
  * @public
19087
19087
  */
19088
19088
  class Logger {
19089
+ static { this._staticMetaData = new Map(); }
19089
19090
  /** An event raised whenever [[setLevel]] or [[setLevelDefault]] is called. */
19090
19091
  static get onLogLevelChanged() {
19091
19092
  // We have to lazily initialize because it's static and BeEvent imports UnexpectedErrors which imports Logger which wants to instantiate BeEvent.
@@ -19094,6 +19095,7 @@ class Logger {
19094
19095
  }
19095
19096
  return Logger._onLogLevelChanged;
19096
19097
  }
19098
+ static { this._categoryFilter = {}; }
19097
19099
  /** Maps category names to the least severe level at which messages in that category should be displayed,
19098
19100
  * or `undefined` if a minimum has not been defined.
19099
19101
  * @see [[setLevel]] to change the minimum logging level for a category.
@@ -19110,6 +19112,8 @@ class Logger {
19110
19112
  // NOTE: this property is accessed by native code. */
19111
19113
  return this._minLevel;
19112
19114
  }
19115
+ /** Should the call stack be included when an exception is logged? */
19116
+ static { this.logExceptionCallstacks = false; }
19113
19117
  /** Contains metadata that should be included with every logged message.
19114
19118
  * @beta
19115
19119
  */
@@ -19295,10 +19299,6 @@ class Logger {
19295
19299
  Logger._logTrace(category, message, metaData);
19296
19300
  }
19297
19301
  }
19298
- Logger._staticMetaData = new Map();
19299
- Logger._categoryFilter = {};
19300
- /** Should the call stack be included when an exception is logged? */
19301
- Logger.logExceptionCallstacks = false;
19302
19302
  /** Simple performance diagnostics utility.
19303
19303
  * It measures the time from construction to disposal. On disposal it logs the routine name along with
19304
19304
  * the duration in milliseconds.
@@ -19309,6 +19309,7 @@ Logger.logExceptionCallstacks = false;
19309
19309
  * @public
19310
19310
  */
19311
19311
  class PerfLogger {
19312
+ static { this._severity = LogLevel.Info; }
19312
19313
  constructor(operation, metaData) {
19313
19314
  this._operation = operation;
19314
19315
  this._metaData = metaData;
@@ -19334,7 +19335,6 @@ class PerfLogger {
19334
19335
  this.logMessage();
19335
19336
  }
19336
19337
  }
19337
- PerfLogger._severity = LogLevel.Info;
19338
19338
 
19339
19339
 
19340
19340
  /***/ }),
@@ -20425,6 +20425,7 @@ __webpack_require__.r(__webpack_exports__);
20425
20425
  * @alpha
20426
20426
  */
20427
20427
  class StatusCategory {
20428
+ static { this.handlers = new Set(); }
20428
20429
  static for(error) {
20429
20430
  for (const handler of this.handlers) {
20430
20431
  const category = handler(error);
@@ -20438,7 +20439,6 @@ class StatusCategory {
20438
20439
  return new UnknownError();
20439
20440
  }
20440
20441
  }
20441
- StatusCategory.handlers = new Set();
20442
20442
  /***
20443
20443
  * A success status.
20444
20444
  * @alpha
@@ -21611,7 +21611,6 @@ __webpack_require__.r(__webpack_exports__);
21611
21611
  /** @packageDocumentation
21612
21612
  * @module Errors
21613
21613
  */
21614
- var _a;
21615
21614
 
21616
21615
  /**
21617
21616
  * Utility for handling/reporting unexpected runtime errors. This class establishes a global handler for
@@ -21621,6 +21620,16 @@ var _a;
21621
21620
  * @public
21622
21621
  */
21623
21622
  class UnexpectedErrors {
21623
+ /** handler for re-throwing exceptions directly */
21624
+ static { this.reThrowImmediate = (e) => { throw e; }; }
21625
+ /** handler for re-throwing exceptions from an asynchronous interval (so the current call stack is not aborted) */
21626
+ static { this.reThrowDeferred = (e) => setTimeout(() => { throw e; }, 0); }
21627
+ /** handler for logging exception to console */
21628
+ static { this.consoleLog = (e) => console.error(e); } // eslint-disable-line no-console
21629
+ /** handler for logging exception with [[Logger]] */
21630
+ static { this.errorLog = (e) => _Logger__WEBPACK_IMPORTED_MODULE_0__.Logger.logException("unhandled", e); }
21631
+ static { this._telemetry = []; }
21632
+ static { this._handler = this.errorLog; } // default to error logging
21624
21633
  constructor() { } // this is a singleton
21625
21634
  /** Add a "telemetry tracker" for unexpected errors. Useful for tracking/reporting errors without changing handler.
21626
21635
  * @returns a method to remove the tracker
@@ -21657,17 +21666,6 @@ class UnexpectedErrors {
21657
21666
  return oldHandler;
21658
21667
  }
21659
21668
  }
21660
- _a = UnexpectedErrors;
21661
- /** handler for re-throwing exceptions directly */
21662
- UnexpectedErrors.reThrowImmediate = (e) => { throw e; };
21663
- /** handler for re-throwing exceptions from an asynchronous interval (so the current call stack is not aborted) */
21664
- UnexpectedErrors.reThrowDeferred = (e) => setTimeout(() => { throw e; }, 0);
21665
- /** handler for logging exception to console */
21666
- UnexpectedErrors.consoleLog = (e) => console.error(e); // eslint-disable-line no-console
21667
- /** handler for logging exception with [[Logger]] */
21668
- UnexpectedErrors.errorLog = (e) => _Logger__WEBPACK_IMPORTED_MODULE_0__.Logger.logException("unhandled", e);
21669
- UnexpectedErrors._telemetry = [];
21670
- UnexpectedErrors._handler = _a.errorLog; // default to error logging
21671
21669
 
21672
21670
 
21673
21671
  /***/ }),
@@ -22421,6 +22419,7 @@ class ITwinLocalization {
22421
22419
  }
22422
22420
  exports.ITwinLocalization = ITwinLocalization;
22423
22421
  class TranslationLogger {
22422
+ static { this.type = "logger"; }
22424
22423
  log(args) { core_bentley_1.Logger.logInfo("i18n", this.createLogMessage(args)); }
22425
22424
  warn(args) { core_bentley_1.Logger.logWarning("i18n", this.createLogMessage(args)); }
22426
22425
  error(args) { core_bentley_1.Logger.logError("i18n", this.createLogMessage(args)); }
@@ -22433,7 +22432,6 @@ class TranslationLogger {
22433
22432
  return message;
22434
22433
  }
22435
22434
  }
22436
- TranslationLogger.type = "logger";
22437
22435
 
22438
22436
 
22439
22437
  /***/ }),