@itwin/core-bentley 4.0.0-dev.7 → 4.0.0-dev.72

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.
Files changed (211) hide show
  1. package/CHANGELOG.md +50 -1
  2. package/lib/cjs/AccessToken.d.ts +10 -10
  3. package/lib/cjs/AccessToken.d.ts.map +1 -1
  4. package/lib/cjs/AccessToken.js +9 -9
  5. package/lib/cjs/Assert.d.ts +25 -25
  6. package/lib/cjs/Assert.js +45 -45
  7. package/lib/cjs/Assert.js.map +1 -1
  8. package/lib/cjs/BeEvent.d.ts +81 -81
  9. package/lib/cjs/BeEvent.d.ts.map +1 -1
  10. package/lib/cjs/BeEvent.js +156 -156
  11. package/lib/cjs/BeSQLite.d.ts +172 -170
  12. package/lib/cjs/BeSQLite.d.ts.map +1 -1
  13. package/lib/cjs/BeSQLite.js +185 -183
  14. package/lib/cjs/BeSQLite.js.map +1 -1
  15. package/lib/cjs/BentleyError.d.ts +378 -378
  16. package/lib/cjs/BentleyError.d.ts.map +1 -1
  17. package/lib/cjs/BentleyError.js +703 -702
  18. package/lib/cjs/BentleyError.js.map +1 -1
  19. package/lib/cjs/BentleyLoggerCategory.d.ts +11 -11
  20. package/lib/cjs/BentleyLoggerCategory.js +19 -19
  21. package/lib/cjs/ByteStream.d.ts +110 -110
  22. package/lib/cjs/ByteStream.js +159 -159
  23. package/lib/cjs/ClassUtils.d.ts +14 -14
  24. package/lib/cjs/ClassUtils.js +27 -27
  25. package/lib/cjs/Compare.d.ts +47 -47
  26. package/lib/cjs/Compare.d.ts.map +1 -1
  27. package/lib/cjs/Compare.js +75 -75
  28. package/lib/cjs/CompressedId64Set.d.ts +134 -134
  29. package/lib/cjs/CompressedId64Set.d.ts.map +1 -1
  30. package/lib/cjs/CompressedId64Set.js +428 -428
  31. package/lib/cjs/CompressedId64Set.js.map +1 -1
  32. package/lib/cjs/Dictionary.d.ts +125 -125
  33. package/lib/cjs/Dictionary.js +203 -203
  34. package/lib/cjs/Disposable.d.ts +80 -80
  35. package/lib/cjs/Disposable.d.ts.map +1 -1
  36. package/lib/cjs/Disposable.js +120 -120
  37. package/lib/cjs/Id.d.ts +285 -285
  38. package/lib/cjs/Id.d.ts.map +1 -1
  39. package/lib/cjs/Id.js +643 -643
  40. package/lib/cjs/IndexMap.d.ts +65 -65
  41. package/lib/cjs/IndexMap.js +91 -91
  42. package/lib/cjs/JsonSchema.d.ts +77 -77
  43. package/lib/cjs/JsonSchema.d.ts.map +1 -1
  44. package/lib/cjs/JsonSchema.js +9 -9
  45. package/lib/cjs/JsonUtils.d.ts +78 -78
  46. package/lib/cjs/JsonUtils.js +151 -151
  47. package/lib/cjs/LRUMap.d.ts +129 -129
  48. package/lib/cjs/LRUMap.js +333 -333
  49. package/lib/cjs/LRUMap.js.map +1 -1
  50. package/lib/cjs/Logger.d.ts +143 -143
  51. package/lib/cjs/Logger.d.ts.map +1 -1
  52. package/lib/cjs/Logger.js +256 -258
  53. package/lib/cjs/Logger.js.map +1 -1
  54. package/lib/cjs/ObservableSet.d.ts +23 -23
  55. package/lib/cjs/ObservableSet.js +51 -51
  56. package/lib/cjs/OneAtATimeAction.d.ts +31 -31
  57. package/lib/cjs/OneAtATimeAction.js +94 -94
  58. package/lib/cjs/OneAtATimeAction.js.map +1 -1
  59. package/lib/cjs/OrderedId64Iterable.d.ts +74 -74
  60. package/lib/cjs/OrderedId64Iterable.d.ts.map +1 -1
  61. package/lib/cjs/OrderedId64Iterable.js +235 -235
  62. package/lib/cjs/OrderedSet.d.ts +40 -40
  63. package/lib/cjs/OrderedSet.js +64 -64
  64. package/lib/cjs/PriorityQueue.d.ts +70 -70
  65. package/lib/cjs/PriorityQueue.d.ts.map +1 -1
  66. package/lib/cjs/PriorityQueue.js +140 -140
  67. package/lib/cjs/ProcessDetector.d.ts +59 -59
  68. package/lib/cjs/ProcessDetector.js +71 -71
  69. package/lib/cjs/SortedArray.d.ts +236 -232
  70. package/lib/cjs/SortedArray.d.ts.map +1 -1
  71. package/lib/cjs/SortedArray.js +315 -303
  72. package/lib/cjs/SortedArray.js.map +1 -1
  73. package/lib/cjs/StatusCategory.d.ts +30 -30
  74. package/lib/cjs/StatusCategory.d.ts.map +1 -1
  75. package/lib/cjs/StatusCategory.js +460 -460
  76. package/lib/cjs/StatusCategory.js.map +1 -1
  77. package/lib/cjs/StringUtils.d.ts +22 -22
  78. package/lib/cjs/StringUtils.js +148 -148
  79. package/lib/cjs/Time.d.ts +122 -122
  80. package/lib/cjs/Time.js +152 -152
  81. package/lib/cjs/Time.js.map +1 -1
  82. package/lib/cjs/Tracing.d.ts +43 -40
  83. package/lib/cjs/Tracing.d.ts.map +1 -1
  84. package/lib/cjs/Tracing.js +134 -130
  85. package/lib/cjs/Tracing.js.map +1 -1
  86. package/lib/cjs/TupleKeyedMap.d.ts +36 -36
  87. package/lib/cjs/TupleKeyedMap.js +102 -102
  88. package/lib/cjs/TypedArrayBuilder.d.ts +155 -155
  89. package/lib/cjs/TypedArrayBuilder.d.ts.map +1 -1
  90. package/lib/cjs/TypedArrayBuilder.js +206 -208
  91. package/lib/cjs/TypedArrayBuilder.js.map +1 -1
  92. package/lib/cjs/UnexpectedErrors.d.ts +43 -43
  93. package/lib/cjs/UnexpectedErrors.d.ts.map +1 -1
  94. package/lib/cjs/UnexpectedErrors.js +68 -68
  95. package/lib/cjs/UnexpectedErrors.js.map +1 -1
  96. package/lib/cjs/UtilityTypes.d.ts +112 -96
  97. package/lib/cjs/UtilityTypes.d.ts.map +1 -1
  98. package/lib/cjs/UtilityTypes.js +40 -40
  99. package/lib/cjs/UtilityTypes.js.map +1 -1
  100. package/lib/cjs/YieldManager.d.ts +18 -18
  101. package/lib/cjs/YieldManager.js +34 -34
  102. package/lib/cjs/core-bentley.d.ts +74 -74
  103. package/lib/cjs/core-bentley.js +94 -90
  104. package/lib/cjs/core-bentley.js.map +1 -1
  105. package/lib/cjs/partitionArray.d.ts +21 -21
  106. package/lib/cjs/partitionArray.js +43 -43
  107. package/lib/esm/AccessToken.d.ts +10 -10
  108. package/lib/esm/AccessToken.d.ts.map +1 -1
  109. package/lib/esm/AccessToken.js +8 -8
  110. package/lib/esm/Assert.d.ts +25 -25
  111. package/lib/esm/Assert.js +41 -41
  112. package/lib/esm/Assert.js.map +1 -1
  113. package/lib/esm/BeEvent.d.ts +81 -81
  114. package/lib/esm/BeEvent.d.ts.map +1 -1
  115. package/lib/esm/BeEvent.js +150 -150
  116. package/lib/esm/BeSQLite.d.ts +172 -170
  117. package/lib/esm/BeSQLite.d.ts.map +1 -1
  118. package/lib/esm/BeSQLite.js +182 -180
  119. package/lib/esm/BeSQLite.js.map +1 -1
  120. package/lib/esm/BentleyError.d.ts +378 -378
  121. package/lib/esm/BentleyError.d.ts.map +1 -1
  122. package/lib/esm/BentleyError.js +699 -698
  123. package/lib/esm/BentleyError.js.map +1 -1
  124. package/lib/esm/BentleyLoggerCategory.d.ts +11 -11
  125. package/lib/esm/BentleyLoggerCategory.js +16 -16
  126. package/lib/esm/ByteStream.d.ts +110 -110
  127. package/lib/esm/ByteStream.js +155 -155
  128. package/lib/esm/ClassUtils.d.ts +14 -14
  129. package/lib/esm/ClassUtils.js +22 -22
  130. package/lib/esm/Compare.d.ts +47 -47
  131. package/lib/esm/Compare.d.ts.map +1 -1
  132. package/lib/esm/Compare.js +63 -63
  133. package/lib/esm/CompressedId64Set.d.ts +134 -134
  134. package/lib/esm/CompressedId64Set.d.ts.map +1 -1
  135. package/lib/esm/CompressedId64Set.js +423 -423
  136. package/lib/esm/CompressedId64Set.js.map +1 -1
  137. package/lib/esm/Dictionary.d.ts +125 -125
  138. package/lib/esm/Dictionary.js +199 -199
  139. package/lib/esm/Disposable.d.ts +80 -80
  140. package/lib/esm/Disposable.d.ts.map +1 -1
  141. package/lib/esm/Disposable.js +112 -112
  142. package/lib/esm/Id.d.ts +285 -285
  143. package/lib/esm/Id.d.ts.map +1 -1
  144. package/lib/esm/Id.js +639 -639
  145. package/lib/esm/IndexMap.d.ts +65 -65
  146. package/lib/esm/IndexMap.js +86 -86
  147. package/lib/esm/JsonSchema.d.ts +77 -77
  148. package/lib/esm/JsonSchema.d.ts.map +1 -1
  149. package/lib/esm/JsonSchema.js +8 -8
  150. package/lib/esm/JsonUtils.d.ts +78 -78
  151. package/lib/esm/JsonUtils.js +148 -148
  152. package/lib/esm/LRUMap.d.ts +129 -129
  153. package/lib/esm/LRUMap.js +326 -326
  154. package/lib/esm/LRUMap.js.map +1 -1
  155. package/lib/esm/Logger.d.ts +143 -143
  156. package/lib/esm/Logger.d.ts.map +1 -1
  157. package/lib/esm/Logger.js +253 -253
  158. package/lib/esm/Logger.js.map +1 -1
  159. package/lib/esm/ObservableSet.d.ts +23 -23
  160. package/lib/esm/ObservableSet.js +47 -47
  161. package/lib/esm/OneAtATimeAction.d.ts +31 -31
  162. package/lib/esm/OneAtATimeAction.js +89 -89
  163. package/lib/esm/OneAtATimeAction.js.map +1 -1
  164. package/lib/esm/OrderedId64Iterable.d.ts +74 -74
  165. package/lib/esm/OrderedId64Iterable.d.ts.map +1 -1
  166. package/lib/esm/OrderedId64Iterable.js +232 -232
  167. package/lib/esm/OrderedSet.d.ts +40 -40
  168. package/lib/esm/OrderedSet.js +59 -59
  169. package/lib/esm/PriorityQueue.d.ts +70 -70
  170. package/lib/esm/PriorityQueue.d.ts.map +1 -1
  171. package/lib/esm/PriorityQueue.js +136 -136
  172. package/lib/esm/ProcessDetector.d.ts +59 -59
  173. package/lib/esm/ProcessDetector.js +67 -67
  174. package/lib/esm/SortedArray.d.ts +236 -232
  175. package/lib/esm/SortedArray.d.ts.map +1 -1
  176. package/lib/esm/SortedArray.js +308 -296
  177. package/lib/esm/SortedArray.js.map +1 -1
  178. package/lib/esm/StatusCategory.d.ts +30 -30
  179. package/lib/esm/StatusCategory.d.ts.map +1 -1
  180. package/lib/esm/StatusCategory.js +455 -454
  181. package/lib/esm/StatusCategory.js.map +1 -1
  182. package/lib/esm/StringUtils.d.ts +22 -22
  183. package/lib/esm/StringUtils.js +142 -142
  184. package/lib/esm/Time.d.ts +122 -122
  185. package/lib/esm/Time.js +146 -146
  186. package/lib/esm/Time.js.map +1 -1
  187. package/lib/esm/Tracing.d.ts +43 -40
  188. package/lib/esm/Tracing.d.ts.map +1 -1
  189. package/lib/esm/Tracing.js +130 -126
  190. package/lib/esm/Tracing.js.map +1 -1
  191. package/lib/esm/TupleKeyedMap.d.ts +36 -36
  192. package/lib/esm/TupleKeyedMap.js +98 -98
  193. package/lib/esm/TypedArrayBuilder.d.ts +155 -155
  194. package/lib/esm/TypedArrayBuilder.d.ts.map +1 -1
  195. package/lib/esm/TypedArrayBuilder.js +198 -200
  196. package/lib/esm/TypedArrayBuilder.js.map +1 -1
  197. package/lib/esm/UnexpectedErrors.d.ts +43 -43
  198. package/lib/esm/UnexpectedErrors.d.ts.map +1 -1
  199. package/lib/esm/UnexpectedErrors.js +65 -64
  200. package/lib/esm/UnexpectedErrors.js.map +1 -1
  201. package/lib/esm/UtilityTypes.d.ts +112 -96
  202. package/lib/esm/UtilityTypes.d.ts.map +1 -1
  203. package/lib/esm/UtilityTypes.js +34 -34
  204. package/lib/esm/UtilityTypes.js.map +1 -1
  205. package/lib/esm/YieldManager.d.ts +18 -18
  206. package/lib/esm/YieldManager.js +30 -30
  207. package/lib/esm/core-bentley.d.ts +74 -74
  208. package/lib/esm/core-bentley.js +78 -78
  209. package/lib/esm/partitionArray.d.ts +21 -21
  210. package/lib/esm/partitionArray.js +39 -39
  211. package/package.json +9 -9
@@ -1 +1 @@
1
- {"version":3,"file":"LRUMap.js","sourceRoot":"","sources":["../../src/LRUMap.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAGH,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C;;;;GAIG;AAEH;;GAEG;AACH,MAAM,OAAO,KAAK;IAGhB,YAAmB,GAAM,EAAS,KAAQ;QAAvB,QAAG,GAAH,GAAG,CAAG;QAAS,UAAK,G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AC;CACF;AAED;;GAEG;AACH,MAAM,OAAO,aAAoB,SAAQ,QAAc;IACrD;;;;OAIG;IACH,YAAY,KAAa,EAAE,WAAiC;QAC1D,KAAK,CAAC,KAAK,EAAE,IAAI,UAAU,CAAiB,WAAW,CAAC,CAAC,CAAC;IAC5D,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Collections\r\n */\r\n\r\nimport { OrderedComparator } from \"./Compare\";\r\nimport { Dictionary } from \"./Dictionary\";\r\n\r\n/**\r\n * Derived from:\r\n * Licensed under MIT. Copyright (c) 2010 Rasmus Andersson <http://hunch.se/>\r\n * See README.md at https://github.com/rsms/js-lru for details.\r\n */\r\n\r\n/** An entry holds the key and value, and pointers to any older and newer entries.\r\n * @public\r\n */\r\nexport class Entry<K, V> {\r\n public newer?: Entry<K, V>;\r\n public older?: Entry<K, V>;\r\n constructor(public key: K, public value: V) { }\r\n}\r\n\r\nclass EntryIterator<K, V> implements Iterator<[K, V] | undefined> {\r\n private _entry: Entry<K, V> | undefined;\r\n constructor(oldestEntry: Entry<K, V>) {\r\n this._entry = oldestEntry;\r\n }\r\n public next() {\r\n const ent = this._entry;\r\n if (!ent)\r\n return { done: true, value: undefined };\r\n this._entry = ent.newer;\r\n const val: [K, V] = [ent.key, ent.value];\r\n return { done: false, value: val };\r\n }\r\n}\r\n\r\nclass KeyIterator<K, V> implements Iterator<K | undefined> {\r\n private _entry: Entry<K, V> | undefined;\r\n constructor(oldestEntry: Entry<K, V>) {\r\n this._entry = oldestEntry;\r\n }\r\n public next() {\r\n const ent = this._entry;\r\n if (!ent)\r\n return { done: true, value: undefined };\r\n this._entry = ent.newer;\r\n return { done: false, value: ent.key };\r\n }\r\n}\r\n\r\nclass ValueIterator<K, V> implements Iterator<V | undefined> {\r\n private _entry: Entry<K, V> | undefined;\r\n constructor(oldestEntry: Entry<K, V>) {\r\n this._entry = oldestEntry;\r\n }\r\n public next() {\r\n const ent = this._entry;\r\n if (!ent)\r\n return { done: true, value: undefined };\r\n this._entry = ent.newer;\r\n return { done: false, value: ent.value };\r\n }\r\n}\r\n\r\n/** The interface that must be satisfied by the underlying container type used by a LRUCache.\r\n * Compatible with a [[Dictionary]] or a standard Map.\r\n * @public\r\n */\r\nexport interface EntryContainer<K, V> {\r\n readonly size: number;\r\n clear(): void;\r\n get(key: K): Entry<K, V> | undefined;\r\n set(key: K, value: Entry<K, V>): void;\r\n has(key: K): boolean;\r\n delete(key: K): void;\r\n}\r\n\r\n/**\r\n * A mapping of a key/value pairs, where the size of the cache can be limited.\r\n *\r\n * When entries are inserted, if the cache is \"full\", the\r\n * least-recently-used (LRU) value is dropped. When entries are retrieved, they are moved to the front of the LRU list.\r\n *\r\n * Illustration of the design:\r\n *\r\n * ```\r\n *\r\n * entry entry entry entry\r\n * ______ ______ ______ ______\r\n * | head |.newer => | |.newer => | |.newer => | tail |\r\n * | A | | B | | C | | D |\r\n * |______| <= older.|______| <= older.|______| <= older.|______|\r\n *\r\n * removed <-- <-- <-- <-- <-- <-- <-- <-- <-- <-- <-- added\r\n * ```\r\n * @public\r\n */\r\nexport class LRUCache<K, V> {\r\n private _container: EntryContainer<K, V>;\r\n\r\n /** Current number of items */\r\n public size: number;\r\n\r\n /** Maximum number of items this cache can hold */\r\n public limit: number;\r\n\r\n /** Least recently-used entry. Invalidated when cache is modified. */\r\n public oldest?: Entry<K, V>;\r\n\r\n /** Most recently-used entry. Invalidated when cache is modified. */\r\n public newest?: Entry<K, V>;\r\n\r\n /**\r\n * Construct a new LRUCache to hold up to `limit` entries.\r\n */\r\n public constructor(limit: number, container: EntryContainer<K, V>) {\r\n this.size = 0;\r\n this.limit = limit;\r\n this.oldest = this.newest = undefined;\r\n this._container = container;\r\n }\r\n\r\n private markEntryAsUsed(entry: Entry<K, V>) {\r\n if (entry === this.newest)\r\n return; // Already the most recently used entry, so no need to update the list\r\n\r\n // HEAD--------------TAIL\r\n // <.older .newer>\r\n // <--- add direction --\r\n // A B C <D> E\r\n if (entry.newer) {\r\n if (entry === this.oldest) {\r\n this.oldest = entry.newer;\r\n }\r\n entry.newer.older = entry.older; // C <-- E.\r\n }\r\n if (entry.older) {\r\n entry.older.newer = entry.newer; // C. --> E\r\n }\r\n entry.newer = undefined; // D --x\r\n entry.older = this.newest; // D. --> E\r\n if (this.newest) {\r\n this.newest.newer = entry; // E. <-- D\r\n }\r\n this.newest = entry;\r\n }\r\n\r\n /** Replace all values in this cache with key-value pairs (2-element Arrays) from provided iterable. */\r\n public assign(entries: Iterable<[K, V]>): void {\r\n let entry;\r\n let limit = this.limit || Number.MAX_VALUE;\r\n this._container.clear();\r\n const it = entries[Symbol.iterator]();\r\n for (let itv = it.next(); !itv.done; itv = it.next()) {\r\n const e = new Entry(itv.value[0], itv.value[1]);\r\n this._container.set(e.key, e);\r\n if (!entry) {\r\n this.oldest = e;\r\n } else {\r\n entry.newer = e;\r\n e.older = entry;\r\n }\r\n entry = e;\r\n if (limit-- === 0) {\r\n throw new Error(\"overflow\");\r\n }\r\n }\r\n this.newest = entry;\r\n this.size = this._container.size;\r\n }\r\n\r\n /** Get and register recent use of <key>.\r\n * Returns the value associated with <key> or undefined if not in cache.\r\n */\r\n public get(key: K): V | undefined {\r\n // First, find our cache entry\r\n const entry = this._container.get(key);\r\n if (!entry)\r\n return; // Not cached. Sorry.\r\n // As <key> was found in the cache, register it as being requested recently\r\n this.markEntryAsUsed(entry);\r\n return entry.value;\r\n }\r\n\r\n /** Put <value> into the cache associated with <key>. Replaces any existing entry with the same key.\r\n * @returns `this`.\r\n */\r\n public set(key: K, value: V): LRUCache<K, V> {\r\n let entry = this._container.get(key);\r\n if (entry) {\r\n // update existing\r\n entry.value = value;\r\n this.markEntryAsUsed(entry);\r\n return this;\r\n }\r\n\r\n // new entry\r\n this._container.set(key, (entry = new Entry(key, value)));\r\n\r\n if (this.newest) {\r\n // link previous tail to the new tail (entry)\r\n this.newest.newer = entry;\r\n entry.older = this.newest;\r\n } else {\r\n // we're first in\r\n this.oldest = entry;\r\n }\r\n\r\n // add new entry to the end of the linked list -- it is now the freshest entry.\r\n this.newest = entry;\r\n ++this.size;\r\n if (this.size > this.limit) {\r\n // we hit the limit -- remove the head\r\n this.shift();\r\n }\r\n return this;\r\n }\r\n\r\n /** Purge the least recently used (oldest) entry from the cache.\r\n * @returns The removed entry or undefined if the cache was empty.\r\n */\r\n public shift(): [K, V] | undefined {\r\n const entry = this.oldest;\r\n if (entry) {\r\n if (entry.newer) {\r\n // advance the list\r\n this.oldest = entry.newer;\r\n this.oldest.older = undefined;\r\n } else {\r\n // the cache is exhausted\r\n this.oldest = undefined;\r\n this.newest = undefined;\r\n }\r\n // Remove last strong reference to <entry> and remove links from the purged\r\n // entry being returned:\r\n entry.newer = entry.older = undefined;\r\n this._container.delete(entry.key);\r\n --this.size;\r\n return [entry.key, entry.value];\r\n }\r\n return undefined;\r\n }\r\n\r\n /** Access value for `key` without registering recent use. Useful if you do not\r\n * want to change the state of the cache, but only \"peek\" at it.\r\n * @returns The value associated with `key` if found, or undefined if not found.\r\n */\r\n public find(key: K): V | undefined {\r\n const e = this._container.get(key);\r\n return e ? e.value : undefined;\r\n }\r\n\r\n /** Check if there's a value for key in the cache without registering recent use. */\r\n public has(key: K): boolean {\r\n return this._container.has(key);\r\n }\r\n\r\n /** Remove entry `key` from cache and return its value.\r\n * @returns The removed value, or undefined if not found.\r\n */\r\n public delete(key: K): V | undefined {\r\n const entry = this._container.get(key);\r\n if (!entry)\r\n return;\r\n\r\n this._container.delete(entry.key);\r\n if (entry.newer && entry.older) {\r\n // re-link the older entry with the newer entry\r\n entry.older.newer = entry.newer;\r\n entry.newer.older = entry.older;\r\n } else if (entry.newer) {\r\n // remove the link to us\r\n entry.newer.older = undefined;\r\n // link the newer entry to head\r\n this.oldest = entry.newer;\r\n } else if (entry.older) {\r\n // remove the link to us\r\n entry.older.newer = undefined;\r\n // link the newer entry to head\r\n this.newest = entry.older;\r\n } else { // if(entry.older === undefined && entry.newer === undefined) {\r\n this.oldest = this.newest = undefined;\r\n }\r\n\r\n this.size--;\r\n return entry.value;\r\n }\r\n\r\n /** Removes all entries */\r\n public clear(): void {\r\n // Note: clearing links should be safe, as we don't expose live links to user\r\n this.oldest = this.newest = undefined;\r\n this.size = 0;\r\n this._container.clear();\r\n }\r\n\r\n /** Returns an iterator over all keys, starting with the oldest. */\r\n public keys(): Iterator<K | undefined> | undefined {\r\n return this.oldest ? new KeyIterator(this.oldest) : undefined;\r\n }\r\n\r\n /** Returns an iterator over all values, starting with the oldest. */\r\n public values(): Iterator<V | undefined> | undefined {\r\n return this.oldest ? new ValueIterator(this.oldest) : undefined;\r\n }\r\n\r\n /** Returns an iterator over all entries, starting with the oldest. */\r\n public entries(): Iterator<[K, V] | undefined> | undefined {\r\n return this.oldest ? new EntryIterator(this.oldest) : undefined;\r\n }\r\n\r\n /** Call `fun` for each entry, starting with the oldest entry. */\r\n public forEach(fun: (value: V, key: K, m: LRUCache<K, V>) => void, thisObj?: any): void {\r\n if (typeof thisObj !== \"object\") {\r\n thisObj = this;\r\n }\r\n let entry = this.oldest;\r\n while (entry) {\r\n fun.call(thisObj, entry.value, entry.key, this);\r\n entry = entry.newer;\r\n }\r\n }\r\n\r\n /** Returns a JSON (array) representation */\r\n public toJSON(): Array<{ key: K, value: V }> {\r\n const s = new Array(this.size);\r\n let i = 0;\r\n let entry = this.oldest;\r\n while (entry) {\r\n s[i++] = { key: entry.key, value: entry.value };\r\n entry = entry.newer;\r\n }\r\n return s;\r\n }\r\n\r\n /** Returns a String representation */\r\n public toString(): string {\r\n let s = \"\";\r\n let entry = this.oldest;\r\n while (entry) {\r\n s += `${String(entry.key)}:${entry.value}`;\r\n entry = entry.newer;\r\n if (entry) {\r\n s += \" < \";\r\n }\r\n }\r\n return s;\r\n }\r\n}\r\n\r\n/** A [[LRUCache]] using a standard Map as its internal storage.\r\n * @public\r\n */\r\nexport class LRUMap<K, V> extends LRUCache<K, V> {\r\n /**\r\n * Construct a new LRUMap to hold up to `limit` entries.\r\n */\r\n constructor(limit: number) {\r\n super(limit, new Map<K, Entry<K, V>>());\r\n }\r\n}\r\n\r\n/** A [[LRUCache]] using a [[Dictionary]] as its internal storage, permitting custom key comparison logic.\r\n * @public\r\n */\r\nexport class LRUDictionary<K, V> extends LRUCache<K, V> {\r\n /**\r\n * Construct a new LRUDictionary to hold up to `limit` entries.\r\n * @param limit The maximum number of entries permitted in the dictionary.\r\n * @param compareKeys The function used to compare keys within the dictionary.\r\n */\r\n constructor(limit: number, compareKeys: OrderedComparator<K>) {\r\n super(limit, new Dictionary<K, Entry<K, V>>(compareKeys));\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"LRUMap.js","sourceRoot":"","sources":["../../src/LRUMap.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAGH,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C;;;;GAIG;AAEH;;GAEG;AACH,MAAM,OAAO,KAAK;IAGhB,YAAmB,GAAM,EAAS,KAAQ;QAAvB,QAAG,GAAH,GAAG,CAAG;QAAS,UAAK,GAAL,KAAK,CAAG;IAAI,CAAC;CAChD;AAED,MAAM,aAAa;IAEjB,YAAY,WAAwB;QAClC,IAAI,CAAC,MAAM,GAAG,WAAW,CAAC;IAC5B,CAAC;IACM,IAAI;QACT,MAAM,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC;QACxB,IAAI,CAAC,GAAG;YACN,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC;QAC1C,IAAI,CAAC,MAAM,GAAG,GAAG,CAAC,KAAK,CAAC;QACxB,MAAM,GAAG,GAAW,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC;QACzC,OAAO,EAAE,IAAI,EAA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AI,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC;QACxB,OAAO,KAAK,EAAE;YACZ,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,CAAC,GAAG,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,CAAC;YAChD,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC;SACrB;QACD,OAAO,CAAC,CAAC;IACX,CAAC;IAED,sCAAsC;IAC/B,QAAQ;QACb,IAAI,CAAC,GAAG,EAAE,CAAC;QACX,IAAI,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC;QACxB,OAAO,KAAK,EAAE;YACZ,CAAC,IAAI,GAAG,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,KAAK,CAAC,KAAK,EAAE,CAAC;YAC3C,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC;YACpB,IAAI,KAAK,EAAE;gBACT,CAAC,IAAI,KAAK,CAAC;aACZ;SACF;QACD,OAAO,CAAC,CAAC;IACX,CAAC;CACF;AAED;;GAEG;AACH,MAAM,OAAO,MAAa,SAAQ,QAAc;IAC9C;;OAEG;IACH,YAAY,KAAa;QACvB,KAAK,CAAC,KAAK,EAAE,IAAI,GAAG,EAAkB,CAAC,CAAC;IAC1C,CAAC;CACF;AAED;;GAEG;AACH,MAAM,OAAO,aAAoB,SAAQ,QAAc;IACrD;;;;OAIG;IACH,YAAY,KAAa,EAAE,WAAiC;QAC1D,KAAK,CAAC,KAAK,EAAE,IAAI,UAAU,CAAiB,WAAW,CAAC,CAAC,CAAC;IAC5D,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Collections\r\n */\r\n\r\nimport { OrderedComparator } from \"./Compare\";\r\nimport { Dictionary } from \"./Dictionary\";\r\n\r\n/**\r\n * Derived from:\r\n * Licensed under MIT. Copyright (c) 2010 Rasmus Andersson <http://hunch.se/>\r\n * See README.md at https://github.com/rsms/js-lru for details.\r\n */\r\n\r\n/** An entry holds the key and value, and pointers to any older and newer entries.\r\n * @public\r\n */\r\nexport class Entry<K, V> {\r\n public newer?: Entry<K, V>;\r\n public older?: Entry<K, V>;\r\n constructor(public key: K, public value: V) { }\r\n}\r\n\r\nclass EntryIterator<K, V> implements Iterator<[K, V] | undefined> {\r\n private _entry: Entry<K, V> | undefined;\r\n constructor(oldestEntry: Entry<K, V>) {\r\n this._entry = oldestEntry;\r\n }\r\n public next() {\r\n const ent = this._entry;\r\n if (!ent)\r\n return { done: true, value: undefined };\r\n this._entry = ent.newer;\r\n const val: [K, V] = [ent.key, ent.value];\r\n return { done: false, value: val };\r\n }\r\n}\r\n\r\nclass KeyIterator<K, V> implements Iterator<K | undefined> {\r\n private _entry: Entry<K, V> | undefined;\r\n constructor(oldestEntry: Entry<K, V>) {\r\n this._entry = oldestEntry;\r\n }\r\n public next() {\r\n const ent = this._entry;\r\n if (!ent)\r\n return { done: true, value: undefined };\r\n this._entry = ent.newer;\r\n return { done: false, value: ent.key };\r\n }\r\n}\r\n\r\nclass ValueIterator<K, V> implements Iterator<V | undefined> {\r\n private _entry: Entry<K, V> | undefined;\r\n constructor(oldestEntry: Entry<K, V>) {\r\n this._entry = oldestEntry;\r\n }\r\n public next() {\r\n const ent = this._entry;\r\n if (!ent)\r\n return { done: true, value: undefined };\r\n this._entry = ent.newer;\r\n return { done: false, value: ent.value };\r\n }\r\n}\r\n\r\n/** The interface that must be satisfied by the underlying container type used by a LRUCache.\r\n * Compatible with a [[Dictionary]] or a standard Map.\r\n * @public\r\n */\r\nexport interface EntryContainer<K, V> {\r\n readonly size: number;\r\n clear(): void;\r\n get(key: K): Entry<K, V> | undefined;\r\n set(key: K, value: Entry<K, V>): void;\r\n has(key: K): boolean;\r\n delete(key: K): void;\r\n}\r\n\r\n/**\r\n * A mapping of a key/value pairs, where the size of the cache can be limited.\r\n *\r\n * When entries are inserted, if the cache is \"full\", the\r\n * least-recently-used (LRU) value is dropped. When entries are retrieved, they are moved to the front of the LRU list.\r\n *\r\n * Illustration of the design:\r\n *\r\n * ```\r\n *\r\n * entry entry entry entry\r\n * ______ ______ ______ ______\r\n * | head |.newer => | |.newer => | |.newer => | tail |\r\n * | A | | B | | C | | D |\r\n * |______| <= older.|______| <= older.|______| <= older.|______|\r\n *\r\n * removed <-- <-- <-- <-- <-- <-- <-- <-- <-- <-- <-- added\r\n * ```\r\n * @public\r\n */\r\nexport class LRUCache<K, V> {\r\n private _container: EntryContainer<K, V>;\r\n\r\n /** Current number of items */\r\n public size: number;\r\n\r\n /** Maximum number of items this cache can hold */\r\n public limit: number;\r\n\r\n /** Least recently-used entry. Invalidated when cache is modified. */\r\n public oldest?: Entry<K, V>;\r\n\r\n /** Most recently-used entry. Invalidated when cache is modified. */\r\n public newest?: Entry<K, V>;\r\n\r\n /**\r\n * Construct a new LRUCache to hold up to `limit` entries.\r\n */\r\n public constructor(limit: number, container: EntryContainer<K, V>) {\r\n this.size = 0;\r\n this.limit = limit;\r\n this.oldest = this.newest = undefined;\r\n this._container = container;\r\n }\r\n\r\n private markEntryAsUsed(entry: Entry<K, V>) {\r\n if (entry === this.newest)\r\n return; // Already the most recently used entry, so no need to update the list\r\n\r\n // HEAD--------------TAIL\r\n // <.older .newer>\r\n // <--- add direction --\r\n // A B C <D> E\r\n if (entry.newer) {\r\n if (entry === this.oldest) {\r\n this.oldest = entry.newer;\r\n }\r\n entry.newer.older = entry.older; // C <-- E.\r\n }\r\n if (entry.older) {\r\n entry.older.newer = entry.newer; // C. --> E\r\n }\r\n entry.newer = undefined; // D --x\r\n entry.older = this.newest; // D. --> E\r\n if (this.newest) {\r\n this.newest.newer = entry; // E. <-- D\r\n }\r\n this.newest = entry;\r\n }\r\n\r\n /** Replace all values in this cache with key-value pairs (2-element Arrays) from provided iterable. */\r\n public assign(entries: Iterable<[K, V]>): void {\r\n let entry;\r\n let limit = this.limit || Number.MAX_VALUE;\r\n this._container.clear();\r\n const it = entries[Symbol.iterator]();\r\n for (let itv = it.next(); !itv.done; itv = it.next()) {\r\n const e = new Entry(itv.value[0], itv.value[1]);\r\n this._container.set(e.key, e);\r\n if (!entry) {\r\n this.oldest = e;\r\n } else {\r\n entry.newer = e;\r\n e.older = entry;\r\n }\r\n entry = e;\r\n if (limit-- === 0) {\r\n throw new Error(\"overflow\");\r\n }\r\n }\r\n this.newest = entry;\r\n this.size = this._container.size;\r\n }\r\n\r\n /** Get and register recent use of <key>.\r\n * Returns the value associated with <key> or undefined if not in cache.\r\n */\r\n public get(key: K): V | undefined {\r\n // First, find our cache entry\r\n const entry = this._container.get(key);\r\n if (!entry)\r\n return; // Not cached. Sorry.\r\n // As <key> was found in the cache, register it as being requested recently\r\n this.markEntryAsUsed(entry);\r\n return entry.value;\r\n }\r\n\r\n /** Put <value> into the cache associated with <key>. Replaces any existing entry with the same key.\r\n * @returns `this`.\r\n */\r\n public set(key: K, value: V): LRUCache<K, V> {\r\n let entry = this._container.get(key);\r\n if (entry) {\r\n // update existing\r\n entry.value = value;\r\n this.markEntryAsUsed(entry);\r\n return this;\r\n }\r\n\r\n // new entry\r\n this._container.set(key, (entry = new Entry(key, value)));\r\n\r\n if (this.newest) {\r\n // link previous tail to the new tail (entry)\r\n this.newest.newer = entry;\r\n entry.older = this.newest;\r\n } else {\r\n // we're first in\r\n this.oldest = entry;\r\n }\r\n\r\n // add new entry to the end of the linked list -- it is now the freshest entry.\r\n this.newest = entry;\r\n ++this.size;\r\n if (this.size > this.limit) {\r\n // we hit the limit -- remove the head\r\n this.shift();\r\n }\r\n return this;\r\n }\r\n\r\n /** Purge the least recently used (oldest) entry from the cache.\r\n * @returns The removed entry or undefined if the cache was empty.\r\n */\r\n public shift(): [K, V] | undefined {\r\n const entry = this.oldest;\r\n if (entry) {\r\n if (entry.newer) {\r\n // advance the list\r\n this.oldest = entry.newer;\r\n this.oldest.older = undefined;\r\n } else {\r\n // the cache is exhausted\r\n this.oldest = undefined;\r\n this.newest = undefined;\r\n }\r\n // Remove last strong reference to <entry> and remove links from the purged\r\n // entry being returned:\r\n entry.newer = entry.older = undefined;\r\n this._container.delete(entry.key);\r\n --this.size;\r\n return [entry.key, entry.value];\r\n }\r\n return undefined;\r\n }\r\n\r\n /** Access value for `key` without registering recent use. Useful if you do not\r\n * want to change the state of the cache, but only \"peek\" at it.\r\n * @returns The value associated with `key` if found, or undefined if not found.\r\n */\r\n public find(key: K): V | undefined {\r\n const e = this._container.get(key);\r\n return e ? e.value : undefined;\r\n }\r\n\r\n /** Check if there's a value for key in the cache without registering recent use. */\r\n public has(key: K): boolean {\r\n return this._container.has(key);\r\n }\r\n\r\n /** Remove entry `key` from cache and return its value.\r\n * @returns The removed value, or undefined if not found.\r\n */\r\n public delete(key: K): V | undefined {\r\n const entry = this._container.get(key);\r\n if (!entry)\r\n return;\r\n\r\n this._container.delete(entry.key);\r\n if (entry.newer && entry.older) {\r\n // re-link the older entry with the newer entry\r\n entry.older.newer = entry.newer;\r\n entry.newer.older = entry.older;\r\n } else if (entry.newer) {\r\n // remove the link to us\r\n entry.newer.older = undefined;\r\n // link the newer entry to head\r\n this.oldest = entry.newer;\r\n } else if (entry.older) {\r\n // remove the link to us\r\n entry.older.newer = undefined;\r\n // link the newer entry to head\r\n this.newest = entry.older;\r\n } else { // if(entry.older === undefined && entry.newer === undefined) {\r\n this.oldest = this.newest = undefined;\r\n }\r\n\r\n this.size--;\r\n return entry.value;\r\n }\r\n\r\n /** Removes all entries */\r\n public clear(): void {\r\n // Note: clearing links should be safe, as we don't expose live links to user\r\n this.oldest = this.newest = undefined;\r\n this.size = 0;\r\n this._container.clear();\r\n }\r\n\r\n /** Returns an iterator over all keys, starting with the oldest. */\r\n public keys(): Iterator<K | undefined> | undefined {\r\n return this.oldest ? new KeyIterator(this.oldest) : undefined;\r\n }\r\n\r\n /** Returns an iterator over all values, starting with the oldest. */\r\n public values(): Iterator<V | undefined> | undefined {\r\n return this.oldest ? new ValueIterator(this.oldest) : undefined;\r\n }\r\n\r\n /** Returns an iterator over all entries, starting with the oldest. */\r\n public entries(): Iterator<[K, V] | undefined> | undefined {\r\n return this.oldest ? new EntryIterator(this.oldest) : undefined;\r\n }\r\n\r\n /** Call `fun` for each entry, starting with the oldest entry. */\r\n public forEach(fun: (value: V, key: K, m: LRUCache<K, V>) => void, thisObj?: any): void {\r\n if (typeof thisObj !== \"object\") {\r\n thisObj = this; // eslint-disable-line @typescript-eslint/no-this-alias\r\n }\r\n let entry = this.oldest;\r\n while (entry) {\r\n fun.call(thisObj, entry.value, entry.key, this);\r\n entry = entry.newer;\r\n }\r\n }\r\n\r\n /** Returns a JSON (array) representation */\r\n public toJSON(): Array<{ key: K, value: V }> {\r\n const s = new Array(this.size);\r\n let i = 0;\r\n let entry = this.oldest;\r\n while (entry) {\r\n s[i++] = { key: entry.key, value: entry.value };\r\n entry = entry.newer;\r\n }\r\n return s;\r\n }\r\n\r\n /** Returns a String representation */\r\n public toString(): string {\r\n let s = \"\";\r\n let entry = this.oldest;\r\n while (entry) {\r\n s += `${String(entry.key)}:${entry.value}`;\r\n entry = entry.newer;\r\n if (entry) {\r\n s += \" < \";\r\n }\r\n }\r\n return s;\r\n }\r\n}\r\n\r\n/** A [[LRUCache]] using a standard Map as its internal storage.\r\n * @public\r\n */\r\nexport class LRUMap<K, V> extends LRUCache<K, V> {\r\n /**\r\n * Construct a new LRUMap to hold up to `limit` entries.\r\n */\r\n constructor(limit: number) {\r\n super(limit, new Map<K, Entry<K, V>>());\r\n }\r\n}\r\n\r\n/** A [[LRUCache]] using a [[Dictionary]] as its internal storage, permitting custom key comparison logic.\r\n * @public\r\n */\r\nexport class LRUDictionary<K, V> extends LRUCache<K, V> {\r\n /**\r\n * Construct a new LRUDictionary to hold up to `limit` entries.\r\n * @param limit The maximum number of entries permitted in the dictionary.\r\n * @param compareKeys The function used to compare keys within the dictionary.\r\n */\r\n constructor(limit: number, compareKeys: OrderedComparator<K>) {\r\n super(limit, new Dictionary<K, Entry<K, V>>(compareKeys));\r\n }\r\n}\r\n"]}
@@ -1,144 +1,144 @@
1
- /** @packageDocumentation
2
- * @module Logging
3
- */
4
- import { LoggingMetaData } from "./BentleyError";
5
- import { IDisposable } from "./Disposable";
6
- /** Defines the *signature* for a log function.
7
- * @public
8
- */
9
- export declare type LogFunction = (category: string, message: string, metaData: LoggingMetaData) => void;
10
- /** Use to categorize logging messages by severity.
11
- * @public
12
- */
13
- export declare enum LogLevel {
14
- /** Tracing and debugging - low level */
15
- Trace = 0,
16
- /** Information - mid level */
17
- Info = 1,
18
- /** Warnings - high level */
19
- Warning = 2,
20
- /** Errors - highest level */
21
- Error = 3,
22
- /** Higher than any real logging level. This is used to turn a category off. */
23
- None = 4
24
- }
25
- /** Identifies a logging category and the LogLevel that should be used for it. The LogLevel is specified by its string name.
26
- * @public
27
- */
28
- export interface LoggerCategoryAndLevel {
29
- category: string;
30
- logLevel: string;
31
- }
32
- /** Specifies logging levels, including the default logging level and a set of categories and levels for them.
33
- * @public
34
- */
35
- export interface LoggerLevelsConfig {
36
- defaultLevel?: string;
37
- categoryLevels?: LoggerCategoryAndLevel[];
38
- }
39
- /** Logger allows libraries and apps to report potentially useful information about operations, and it allows apps and users to control
40
- * how or if the logged information is displayed or collected. See [Learning about Logging]($docs/learning/common/Logging.md).
41
- * @public
42
- */
43
- export declare class Logger {
44
- protected static _logError: LogFunction | undefined;
45
- protected static _logWarning: LogFunction | undefined;
46
- protected static _logInfo: LogFunction | undefined;
47
- protected static _logTrace: LogFunction | undefined;
48
- /** @internal */
49
- static logLevelChangedFn?: VoidFunction;
50
- private static _categoryFilter;
51
- private static _minLevel;
52
- /** Should the call stack be included when an exception is logged? */
53
- static logExceptionCallstacks: boolean;
54
- /** All static metadata is combined with per-call metadata and stringified in every log message.
55
- * Static metadata can either be an object or a function that returns an object.
56
- * Use a key to identify entries in the map so the can be removed individually.
57
- * @internal */
58
- static staticMetaData: Map<string, LoggingMetaData>;
59
- /** Initialize the logger streams. Should be called at application initialization time. */
60
- static initialize(logError?: LogFunction, logWarning?: LogFunction, logInfo?: LogFunction, logTrace?: LogFunction): void;
61
- /** Initialize the logger to output to the console. */
62
- static initializeToConsole(): void;
63
- /** merge the supplied metadata with all static metadata into one object */
64
- static getMetaData(metaData?: LoggingMetaData): object;
65
- /** stringify the metadata for a log message by merging the supplied metadata with all static metadata into one object that is then `JSON.stringify`ed. */
66
- static stringifyMetaData(metaData?: LoggingMetaData): string;
67
- /** Set the least severe level at which messages should be displayed by default. Call setLevel to override this default setting for specific categories. */
68
- static setLevelDefault(minLevel: LogLevel): void;
69
- /** Set the minimum logging level for the specified category. The minimum level is least severe level at which messages in the
70
- * specified category should be displayed.
71
- */
72
- static setLevel(category: string, minLevel: LogLevel): void;
73
- /** Interpret a string as the name of a LogLevel */
74
- static parseLogLevel(str: string): LogLevel;
75
- /** Set the log level for multiple categories at once. Also see [[validateProps]] */
76
- static configureLevels(cfg: LoggerLevelsConfig): void;
77
- private static isLogLevel;
78
- /** Check that the specified object is a valid LoggerLevelsConfig. This is useful when reading a config from a .json file. */
79
- static validateProps(config: any): void;
80
- /** Get the minimum logging level for the specified category. */
81
- static getLevel(category: string): LogLevel | undefined;
82
- /** Turns off the least severe level at which messages should be displayed by default.
83
- * This turns off logging for all messages for which no category minimum level is defined.
84
- */
85
- static turnOffLevelDefault(): void;
86
- /** Turns off all category level filters previously defined with [[Logger.setLevel]].
87
- */
88
- static turnOffCategories(): void;
89
- /** Check if messages in the specified category should be displayed at this level of severity. */
90
- static isEnabled(category: string, level: LogLevel): boolean;
91
- /** Log the specified message to the **error** stream.
92
- * @param category The category of the message.
93
- * @param message The message.
94
- * @param metaData Optional data for the message
95
- */
96
- static logError(category: string, message: string, metaData?: LoggingMetaData): void;
97
- private static getExceptionMessage;
98
- /** Log the specified exception. The special "ExceptionType" property will be added as metadata,
99
- * in addition to any other metadata that may be supplied by the caller, unless the
100
- * metadata supplied by the caller already includes this property.
101
- * @param category The category of the message.
102
- * @param err The exception object.
103
- * @param log The logger output function to use - defaults to Logger.logError
104
- * @param metaData Optional data for the message
105
- */
106
- static logException(category: string, err: any, log?: LogFunction): void;
107
- /** Log the specified message to the **warning** stream.
108
- * @param category The category of the message.
109
- * @param message The message.
110
- * @param metaData Optional data for the message
111
- */
112
- static logWarning(category: string, message: string, metaData?: LoggingMetaData): void;
113
- /** Log the specified message to the **info** stream.
114
- * @param category The category of the message.
115
- * @param message The message.
116
- * @param metaData Optional data for the message
117
- */
118
- static logInfo(category: string, message: string, metaData?: LoggingMetaData): void;
119
- /** Log the specified message to the **trace** stream.
120
- * @param category The category of the message.
121
- * @param message The message.
122
- * @param metaData Optional data for the message
123
- */
124
- static logTrace(category: string, message: string, metaData?: LoggingMetaData): void;
125
- }
126
- /** Simple performance diagnostics utility.
127
- * It measures the time from construction to disposal. On disposal it logs the routine name along with
128
- * the duration in milliseconds.
129
- * It also logs the routine name at construction time so that nested calls can be disambiguated.
130
- *
131
- * The timings are logged using the log category **Performance** and log severity [[LogLevel.INFO]].
132
- * Enable those, if you want to capture timings.
133
- * @public
134
- */
135
- export declare class PerfLogger implements IDisposable {
136
- private static _severity;
137
- private _operation;
138
- private _metaData?;
139
- private _startTimeStamp;
140
- constructor(operation: string, metaData?: LoggingMetaData);
141
- private logMessage;
142
- dispose(): void;
143
- }
1
+ /** @packageDocumentation
2
+ * @module Logging
3
+ */
4
+ import { LoggingMetaData } from "./BentleyError";
5
+ import { IDisposable } from "./Disposable";
6
+ /** Defines the *signature* for a log function.
7
+ * @public
8
+ */
9
+ export type LogFunction = (category: string, message: string, metaData: LoggingMetaData) => void;
10
+ /** Use to categorize logging messages by severity.
11
+ * @public
12
+ */
13
+ export declare enum LogLevel {
14
+ /** Tracing and debugging - low level */
15
+ Trace = 0,
16
+ /** Information - mid level */
17
+ Info = 1,
18
+ /** Warnings - high level */
19
+ Warning = 2,
20
+ /** Errors - highest level */
21
+ Error = 3,
22
+ /** Higher than any real logging level. This is used to turn a category off. */
23
+ None = 4
24
+ }
25
+ /** Identifies a logging category and the LogLevel that should be used for it. The LogLevel is specified by its string name.
26
+ * @public
27
+ */
28
+ export interface LoggerCategoryAndLevel {
29
+ category: string;
30
+ logLevel: string;
31
+ }
32
+ /** Specifies logging levels, including the default logging level and a set of categories and levels for them.
33
+ * @public
34
+ */
35
+ export interface LoggerLevelsConfig {
36
+ defaultLevel?: string;
37
+ categoryLevels?: LoggerCategoryAndLevel[];
38
+ }
39
+ /** Logger allows libraries and apps to report potentially useful information about operations, and it allows apps and users to control
40
+ * how or if the logged information is displayed or collected. See [Learning about Logging]($docs/learning/common/Logging.md).
41
+ * @public
42
+ */
43
+ export declare class Logger {
44
+ protected static _logError: LogFunction | undefined;
45
+ protected static _logWarning: LogFunction | undefined;
46
+ protected static _logInfo: LogFunction | undefined;
47
+ protected static _logTrace: LogFunction | undefined;
48
+ /** @internal */
49
+ static logLevelChangedFn?: VoidFunction;
50
+ private static _categoryFilter;
51
+ private static _minLevel;
52
+ /** Should the call stack be included when an exception is logged? */
53
+ static logExceptionCallstacks: boolean;
54
+ /** All static metadata is combined with per-call metadata and stringified in every log message.
55
+ * Static metadata can either be an object or a function that returns an object.
56
+ * Use a key to identify entries in the map so the can be removed individually.
57
+ * @internal */
58
+ static staticMetaData: Map<string, LoggingMetaData>;
59
+ /** Initialize the logger streams. Should be called at application initialization time. */
60
+ static initialize(logError?: LogFunction, logWarning?: LogFunction, logInfo?: LogFunction, logTrace?: LogFunction): void;
61
+ /** Initialize the logger to output to the console. */
62
+ static initializeToConsole(): void;
63
+ /** merge the supplied metadata with all static metadata into one object */
64
+ static getMetaData(metaData?: LoggingMetaData): object;
65
+ /** stringify the metadata for a log message by merging the supplied metadata with all static metadata into one object that is then `JSON.stringify`ed. */
66
+ static stringifyMetaData(metaData?: LoggingMetaData): string;
67
+ /** Set the least severe level at which messages should be displayed by default. Call setLevel to override this default setting for specific categories. */
68
+ static setLevelDefault(minLevel: LogLevel): void;
69
+ /** Set the minimum logging level for the specified category. The minimum level is least severe level at which messages in the
70
+ * specified category should be displayed.
71
+ */
72
+ static setLevel(category: string, minLevel: LogLevel): void;
73
+ /** Interpret a string as the name of a LogLevel */
74
+ static parseLogLevel(str: string): LogLevel;
75
+ /** Set the log level for multiple categories at once. Also see [[validateProps]] */
76
+ static configureLevels(cfg: LoggerLevelsConfig): void;
77
+ private static isLogLevel;
78
+ /** Check that the specified object is a valid LoggerLevelsConfig. This is useful when reading a config from a .json file. */
79
+ static validateProps(config: any): void;
80
+ /** Get the minimum logging level for the specified category. */
81
+ static getLevel(category: string): LogLevel | undefined;
82
+ /** Turns off the least severe level at which messages should be displayed by default.
83
+ * This turns off logging for all messages for which no category minimum level is defined.
84
+ */
85
+ static turnOffLevelDefault(): void;
86
+ /** Turns off all category level filters previously defined with [[Logger.setLevel]].
87
+ */
88
+ static turnOffCategories(): void;
89
+ /** Check if messages in the specified category should be displayed at this level of severity. */
90
+ static isEnabled(category: string, level: LogLevel): boolean;
91
+ /** Log the specified message to the **error** stream.
92
+ * @param category The category of the message.
93
+ * @param message The message.
94
+ * @param metaData Optional data for the message
95
+ */
96
+ static logError(category: string, message: string, metaData?: LoggingMetaData): void;
97
+ private static getExceptionMessage;
98
+ /** Log the specified exception. The special "ExceptionType" property will be added as metadata,
99
+ * in addition to any other metadata that may be supplied by the caller, unless the
100
+ * metadata supplied by the caller already includes this property.
101
+ * @param category The category of the message.
102
+ * @param err The exception object.
103
+ * @param log The logger output function to use - defaults to Logger.logError
104
+ * @param metaData Optional data for the message
105
+ */
106
+ static logException(category: string, err: any, log?: LogFunction): void;
107
+ /** Log the specified message to the **warning** stream.
108
+ * @param category The category of the message.
109
+ * @param message The message.
110
+ * @param metaData Optional data for the message
111
+ */
112
+ static logWarning(category: string, message: string, metaData?: LoggingMetaData): void;
113
+ /** Log the specified message to the **info** stream.
114
+ * @param category The category of the message.
115
+ * @param message The message.
116
+ * @param metaData Optional data for the message
117
+ */
118
+ static logInfo(category: string, message: string, metaData?: LoggingMetaData): void;
119
+ /** Log the specified message to the **trace** stream.
120
+ * @param category The category of the message.
121
+ * @param message The message.
122
+ * @param metaData Optional data for the message
123
+ */
124
+ static logTrace(category: string, message: string, metaData?: LoggingMetaData): void;
125
+ }
126
+ /** Simple performance diagnostics utility.
127
+ * It measures the time from construction to disposal. On disposal it logs the routine name along with
128
+ * the duration in milliseconds.
129
+ * It also logs the routine name at construction time so that nested calls can be disambiguated.
130
+ *
131
+ * The timings are logged using the log category **Performance** and log severity [[LogLevel.INFO]].
132
+ * Enable those, if you want to capture timings.
133
+ * @public
134
+ */
135
+ export declare class PerfLogger implements IDisposable {
136
+ private static _severity;
137
+ private _operation;
138
+ private _metaData?;
139
+ private _startTimeStamp;
140
+ constructor(operation: string, metaData?: LoggingMetaData);
141
+ private logMessage;
142
+ dispose(): void;
143
+ }
144
144
  //# sourceMappingURL=Logger.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Logger.d.ts","sourceRoot":"","sources":["../../src/Logger.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAA8B,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAE7E,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAE3C;;GAEG;AACH,oBAAY,WAAW,GAAG,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,eAAe,KAAK,IAAI,CAAC;AAEjG;;GAEG;AACH,oBAAY,QAAQ;IAClB,wCAAwC;IACxC,KAAK,IAAA;IACL,8BAA8B;IAC9B,IAAI,IAAA;IACJ,4BAA4B;IAC5B,OAAO,IAAA;IACP,6BAA6B;IAC7B,KAAK,IAAA;IACL,+EAA+E;IAC/E,IAAI,IAAA;CACL;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;CAClB;A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