@amazon/vinyl-util 1.1.0 → 1.2.0

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 (378) hide show
  1. package/README.md +32 -0
  2. package/dist/browserTestUtil/index.js +5 -5
  3. package/dist/browserTestUtil/index.js.map +2 -2
  4. package/dist/browserTestUtil/types/current/async/createCallbackTimingTest.d.ts +1 -1
  5. package/dist/browserTestUtil/types/current/async/createCallbackTimingTest.d.ts.map +1 -1
  6. package/dist/browserTestUtil/types/current/expect/typesafety.d.ts +5 -15
  7. package/dist/browserTestUtil/types/current/expect/typesafety.d.ts.map +1 -1
  8. package/dist/browserTestUtil/types/current/mock/dom/globals.d.ts +4 -4
  9. package/dist/browserTestUtil/types/current/mock/dom/globals.d.ts.map +1 -1
  10. package/dist/browserTestUtil/types/current/mock/dom/globals.js +1 -1
  11. package/dist/browserTestUtil/types/current/mock/dom/lib.dom.d.ts +499 -499
  12. package/dist/browserTestUtil/types/current/mock/dom/lib.dom.d.ts.map +1 -1
  13. package/dist/browserTestUtil/types/current/mock/dom/lib.dom.js +1 -1
  14. package/dist/browserTestUtil/types/current/mock/implementEventFakes.js +1 -1
  15. package/dist/browserTestUtil/types/current/mock/polyfillCustomEvent.js +1 -1
  16. package/dist/browserTestUtil/types/current/tsconfig.tsbuildinfo +1 -1
  17. package/dist/browserTestUtil/types/ts3.7/async/createCallbackTimingTest.d.ts +1 -1
  18. package/dist/browserTestUtil/types/ts3.7/expect/typesafety.d.ts +5 -15
  19. package/dist/browserTestUtil/types/ts3.7/mock/dom/globals.d.ts +4 -4
  20. package/dist/browserTestUtil/types/ts3.7/mock/dom/lib.dom.d.ts +499 -499
  21. package/dist/browserTestUtil/types/ts4.1/async/createCallbackTimingTest.d.ts +1 -1
  22. package/dist/browserTestUtil/types/ts4.1/expect/typesafety.d.ts +5 -15
  23. package/dist/browserTestUtil/types/ts4.1/mock/dom/globals.d.ts +4 -4
  24. package/dist/browserTestUtil/types/ts4.1/mock/dom/lib.dom.d.ts +499 -499
  25. package/dist/browserTestUtil/types/ts4.7/async/createCallbackTimingTest.d.ts +1 -1
  26. package/dist/browserTestUtil/types/ts4.7/expect/typesafety.d.ts +5 -15
  27. package/dist/browserTestUtil/types/ts4.7/mock/dom/globals.d.ts +4 -4
  28. package/dist/browserTestUtil/types/ts4.7/mock/dom/lib.dom.d.ts +499 -499
  29. package/dist/index.cjs +34 -34
  30. package/dist/index.cjs.map +2 -2
  31. package/dist/index.js +34 -34
  32. package/dist/index.js.map +2 -2
  33. package/dist/polyfill/index.js +6 -2
  34. package/dist/polyfill/index.js.map +1 -1
  35. package/dist/polyfill/tsconfig.tsbuildinfo +1 -1
  36. package/dist/test/benchmark.es5.js +15 -15
  37. package/dist/test/benchmark.js +12 -12
  38. package/dist/test/benchmark.js.map +2 -2
  39. package/dist/testUtil/index.js +1 -1
  40. package/dist/testUtil/index.js.map +1 -1
  41. package/dist/testUtil/types/current/mock/logging/MockLogger.d.ts +1 -1
  42. package/dist/testUtil/types/current/mock/logging/MockLogger.d.ts.map +1 -1
  43. package/dist/testUtil/types/current/mock/logging/MockLogger.js +1 -1
  44. package/dist/testUtil/types/current/mock/navigator/setMockNavigator.js +1 -1
  45. package/dist/testUtil/types/current/mock/network/MockNetworkMetricsController.d.ts +1 -1
  46. package/dist/testUtil/types/current/mock/network/MockNetworkMetricsController.d.ts.map +1 -1
  47. package/dist/testUtil/types/current/mock/network/MockNetworkMetricsController.js +1 -1
  48. package/dist/testUtil/types/current/mock/network/MockNetworkState.d.ts +1 -1
  49. package/dist/testUtil/types/current/mock/network/MockNetworkState.d.ts.map +1 -1
  50. package/dist/testUtil/types/current/mock/network/MockNetworkState.js +1 -1
  51. package/dist/testUtil/types/current/mock/network/MockRequester.d.ts +1 -1
  52. package/dist/testUtil/types/current/mock/network/MockRequester.d.ts.map +1 -1
  53. package/dist/testUtil/types/current/mock/network/MockRequester.js +1 -1
  54. package/dist/testUtil/types/current/reporters/RestApiReporter.d.ts +1 -1
  55. package/dist/testUtil/types/current/reporters/RestApiReporter.d.ts.map +1 -1
  56. package/dist/testUtil/types/current/reporters/RestApiReporter.js +1 -1
  57. package/dist/testUtil/types/current/tsconfig.tsbuildinfo +1 -1
  58. package/dist/testUtil/types/ts3.7/mock/logging/MockLogger.d.ts +1 -1
  59. package/dist/testUtil/types/ts3.7/mock/network/MockNetworkMetricsController.d.ts +1 -1
  60. package/dist/testUtil/types/ts3.7/mock/network/MockNetworkState.d.ts +1 -1
  61. package/dist/testUtil/types/ts3.7/mock/network/MockRequester.d.ts +1 -1
  62. package/dist/testUtil/types/ts3.7/reporters/RestApiReporter.d.ts +1 -1
  63. package/dist/testUtil/types/ts4.1/mock/logging/MockLogger.d.ts +1 -1
  64. package/dist/testUtil/types/ts4.1/mock/network/MockNetworkMetricsController.d.ts +1 -1
  65. package/dist/testUtil/types/ts4.1/mock/network/MockNetworkState.d.ts +1 -1
  66. package/dist/testUtil/types/ts4.1/mock/network/MockRequester.d.ts +1 -1
  67. package/dist/testUtil/types/ts4.1/reporters/RestApiReporter.d.ts +2 -2
  68. package/dist/testUtil/types/ts4.7/mock/logging/MockLogger.d.ts +1 -1
  69. package/dist/testUtil/types/ts4.7/mock/network/MockNetworkMetricsController.d.ts +1 -1
  70. package/dist/testUtil/types/ts4.7/mock/network/MockNetworkState.d.ts +1 -1
  71. package/dist/testUtil/types/ts4.7/mock/network/MockRequester.d.ts +1 -1
  72. package/dist/testUtil/types/ts4.7/reporters/RestApiReporter.d.ts +1 -1
  73. package/dist/types/current/client/Version.d.ts.map +1 -1
  74. package/dist/types/current/client/userAgent/UserAgentInfo.d.ts +1 -1
  75. package/dist/types/current/client/userAgent/UserAgentInfo.d.ts.map +1 -1
  76. package/dist/types/current/client/userAgent/hasBrowser.d.ts.map +1 -1
  77. package/dist/types/current/client/userAgent/hasBrowser.js +1 -1
  78. package/dist/types/current/client/userAgent/parseUserAgent.d.ts +1 -1
  79. package/dist/types/current/client/userAgent/parseUserAgent.d.ts.map +1 -1
  80. package/dist/types/current/client/userAgent/tokenizeUserAgent.d.ts +1 -1
  81. package/dist/types/current/client/userAgent/tokenizeUserAgent.d.ts.map +1 -1
  82. package/dist/types/current/client/userAgent/tokenizeUserAgent.js +1 -1
  83. package/dist/types/current/client/userAgent/userAgentRuleHelpers.d.ts.map +1 -1
  84. package/dist/types/current/core/disposable.d.ts +1 -1
  85. package/dist/types/current/core/disposable.d.ts.map +1 -1
  86. package/dist/types/current/error/AbortError.js +1 -1
  87. package/dist/types/current/error/MediaUnsupportedError.d.ts +1 -1
  88. package/dist/types/current/error/MediaUnsupportedError.d.ts.map +1 -1
  89. package/dist/types/current/error/MediaUnsupportedError.js +2 -2
  90. package/dist/types/current/error/ReportableError.d.ts.map +1 -1
  91. package/dist/types/current/error/ServiceResponseError.d.ts.map +1 -1
  92. package/dist/types/current/error/TimeoutError.js +1 -1
  93. package/dist/types/current/error/ValidationError.d.ts +1 -1
  94. package/dist/types/current/error/ValidationError.d.ts.map +1 -1
  95. package/dist/types/current/error/ValidationError.js +2 -2
  96. package/dist/types/current/event/DomEventHost.d.ts +1 -1
  97. package/dist/types/current/event/DomEventHost.d.ts.map +1 -1
  98. package/dist/types/current/event/EventHost.d.ts.map +1 -1
  99. package/dist/types/current/event/Signal.d.ts.map +1 -1
  100. package/dist/types/current/event/nextEventAsPromise.d.ts.map +1 -1
  101. package/dist/types/current/event/onAny.d.ts.map +1 -1
  102. package/dist/types/current/event/redispatchEvents.d.ts.map +1 -1
  103. package/dist/types/current/global/globalTarget.d.ts.map +1 -1
  104. package/dist/types/current/logging/ConsoleLogHandler.d.ts.map +1 -1
  105. package/dist/types/current/logging/HistoryLogHandler.d.ts.map +1 -1
  106. package/dist/types/current/logging/Logger.d.ts +2 -2
  107. package/dist/types/current/logging/Logger.d.ts.map +1 -1
  108. package/dist/types/current/logging/Logger.js +1 -1
  109. package/dist/types/current/logging/VinylLogging.d.ts +2 -2
  110. package/dist/types/current/logging/VinylLogging.d.ts.map +1 -1
  111. package/dist/types/current/logging/getLogLevelFromSearch.d.ts +1 -1
  112. package/dist/types/current/logging/getLogLevelFromSearch.d.ts.map +1 -1
  113. package/dist/types/current/logging/getLogLevelFromSearch.js +2 -2
  114. package/dist/types/current/logging/logTimer.d.ts +1 -1
  115. package/dist/types/current/logging/logTimer.d.ts.map +1 -1
  116. package/dist/types/current/logging/logTimer.js +1 -1
  117. package/dist/types/current/network/RequestError.d.ts.map +1 -1
  118. package/dist/types/current/network/Requester.d.ts.map +1 -1
  119. package/dist/types/current/network/RequesterImpl.d.ts +1 -1
  120. package/dist/types/current/network/RequesterImpl.d.ts.map +1 -1
  121. package/dist/types/current/network/RequesterImplEventMap.d.ts +1 -1
  122. package/dist/types/current/network/RequesterImplEventMap.d.ts.map +1 -1
  123. package/dist/types/current/network/createRequester.d.ts.map +1 -1
  124. package/dist/types/current/network/logging/networkLoggingHandler.d.ts +1 -1
  125. package/dist/types/current/network/logging/networkLoggingHandler.d.ts.map +1 -1
  126. package/dist/types/current/network/metrics/NetworkMetricsController.d.ts.map +1 -1
  127. package/dist/types/current/network/metrics/NetworkMetricsControllerImpl.d.ts +1 -1
  128. package/dist/types/current/network/metrics/NetworkMetricsControllerImpl.d.ts.map +1 -1
  129. package/dist/types/current/network/metrics/networkMetricsGlobal.d.ts +1 -1
  130. package/dist/types/current/network/metrics/networkMetricsGlobal.d.ts.map +1 -1
  131. package/dist/types/current/network/metrics/networkMetricsGlobal.js +1 -1
  132. package/dist/types/current/network/metrics/networkMetricsModel.d.ts.map +1 -1
  133. package/dist/types/current/network/network.d.ts +1 -1
  134. package/dist/types/current/network/network.d.ts.map +1 -1
  135. package/dist/types/current/network/requesterGlobal.d.ts +1 -1
  136. package/dist/types/current/network/requesterGlobal.d.ts.map +1 -1
  137. package/dist/types/current/network/requesterUtil.d.ts.map +1 -1
  138. package/dist/types/current/patch/network/fetch.d.ts.map +1 -1
  139. package/dist/types/current/patch/patchTarget.d.ts.map +1 -1
  140. package/dist/types/current/persistence/PersistentItem.d.ts +1 -1
  141. package/dist/types/current/persistence/PersistentItem.d.ts.map +1 -1
  142. package/dist/types/current/persistence/PersistentItem.js +1 -1
  143. package/dist/types/current/persistence/StoragePersistence.d.ts +1 -1
  144. package/dist/types/current/persistence/StoragePersistence.d.ts.map +1 -1
  145. package/dist/types/current/persistence/persistenceRef.d.ts +2 -2
  146. package/dist/types/current/persistence/persistenceRef.d.ts.map +1 -1
  147. package/dist/types/current/persistence/persistenceRef.js +1 -1
  148. package/dist/types/current/tsconfig.tsbuildinfo +1 -1
  149. package/dist/types/current/util/async/Abort.d.ts.map +1 -1
  150. package/dist/types/current/util/async/Abort.js +1 -1
  151. package/dist/types/current/util/async/TaskQueue.d.ts +2 -2
  152. package/dist/types/current/util/async/TaskQueue.d.ts.map +1 -1
  153. package/dist/types/current/util/async/TaskQueue.js +1 -1
  154. package/dist/types/current/util/async/TimeoutController.d.ts +1 -1
  155. package/dist/types/current/util/async/TimeoutController.d.ts.map +1 -1
  156. package/dist/types/current/util/async/TimeoutController.js +1 -1
  157. package/dist/types/current/util/async/TimeoutSlot.d.ts.map +1 -1
  158. package/dist/types/current/util/async/abortUtils.d.ts +1 -1
  159. package/dist/types/current/util/async/abortUtils.d.ts.map +1 -1
  160. package/dist/types/current/util/async/promise.d.ts +1 -1
  161. package/dist/types/current/util/async/promise.d.ts.map +1 -1
  162. package/dist/types/current/util/async/promise.js +2 -2
  163. package/dist/types/current/util/async/timeout.d.ts.map +1 -1
  164. package/dist/types/current/util/async/timeout.js +1 -1
  165. package/dist/types/current/util/browser/searchParams.d.ts +1 -1
  166. package/dist/types/current/util/browser/searchParams.d.ts.map +1 -1
  167. package/dist/types/current/util/browser/searchParams.js +1 -1
  168. package/dist/types/current/util/buffer/BufferError.d.ts.map +1 -1
  169. package/dist/types/current/util/buffer/BufferReader.js +2 -2
  170. package/dist/types/current/util/buffer/buffer.d.ts +1 -1
  171. package/dist/types/current/util/buffer/buffer.d.ts.map +1 -1
  172. package/dist/types/current/util/collection/CacheMap.d.ts +12 -2
  173. package/dist/types/current/util/collection/CacheMap.d.ts.map +1 -1
  174. package/dist/types/current/util/collection/LinkedList.d.ts +1 -4
  175. package/dist/types/current/util/collection/LinkedList.d.ts.map +1 -1
  176. package/dist/types/current/util/collection/LruCache.js +1 -1
  177. package/dist/types/current/util/collection/array.d.ts +2 -2
  178. package/dist/types/current/util/collection/array.d.ts.map +1 -1
  179. package/dist/types/current/util/collection/array.js +2 -2
  180. package/dist/types/current/util/comparison/compare.d.ts +1 -1
  181. package/dist/types/current/util/comparison/compare.d.ts.map +1 -1
  182. package/dist/types/current/util/config/ValueProvider.d.ts +1 -1
  183. package/dist/types/current/util/config/ValueProvider.d.ts.map +1 -1
  184. package/dist/types/current/util/date/date.d.ts +1 -1
  185. package/dist/types/current/util/date/date.d.ts.map +1 -1
  186. package/dist/types/current/util/date/date.js +1 -1
  187. package/dist/types/current/util/error/stack.d.ts +3 -3
  188. package/dist/types/current/util/error/stack.d.ts.map +1 -1
  189. package/dist/types/current/util/error/stack.js +2 -2
  190. package/dist/types/current/util/fun/debounce.d.ts.map +1 -1
  191. package/dist/types/current/util/fun/debounce.js +1 -1
  192. package/dist/types/current/util/fun/memoize.d.ts +1 -1
  193. package/dist/types/current/util/fun/memoize.d.ts.map +1 -1
  194. package/dist/types/current/util/fun/memoize.js +2 -2
  195. package/dist/types/current/util/fun/throttle.d.ts.map +1 -1
  196. package/dist/types/current/util/fun/throttle.js +1 -1
  197. package/dist/types/current/util/map/map.d.ts +11 -2
  198. package/dist/types/current/util/map/map.d.ts.map +1 -1
  199. package/dist/types/current/util/mpeg/parseSidxBox.js +1 -1
  200. package/dist/types/current/util/network/request.d.ts +1 -1
  201. package/dist/types/current/util/network/request.d.ts.map +1 -1
  202. package/dist/types/current/util/object/equalDeep.d.ts +1 -1
  203. package/dist/types/current/util/object/equalDeep.d.ts.map +1 -1
  204. package/dist/types/current/util/object/equalDeep.js +1 -1
  205. package/dist/types/current/util/object/lazy.d.ts.map +1 -1
  206. package/dist/types/current/util/object/mergeDeep.d.ts +1 -1
  207. package/dist/types/current/util/object/mergeDeep.d.ts.map +1 -1
  208. package/dist/types/current/util/object/mergeDeep.js +3 -3
  209. package/dist/types/current/util/object/mutableType.d.ts +1 -1
  210. package/dist/types/current/util/object/mutableType.d.ts.map +1 -1
  211. package/dist/types/current/util/object/readonlyType.d.ts +1 -1
  212. package/dist/types/current/util/object/readonlyType.d.ts.map +1 -1
  213. package/dist/types/current/util/range/IntersectionRanges.d.ts +1 -1
  214. package/dist/types/current/util/range/IntersectionRanges.d.ts.map +1 -1
  215. package/dist/types/current/util/range/Ranges.js +1 -1
  216. package/dist/types/current/util/range/UnionRanges.d.ts +1 -1
  217. package/dist/types/current/util/range/UnionRanges.d.ts.map +1 -1
  218. package/dist/types/current/util/serialization/ParseError.js +1 -1
  219. package/dist/types/current/util/serialization/json.d.ts +1 -1
  220. package/dist/types/current/util/serialization/json.d.ts.map +1 -1
  221. package/dist/types/current/util/serialization/json.js +1 -1
  222. package/dist/types/current/util/serialization/primitives.d.ts +1 -1
  223. package/dist/types/current/util/serialization/primitives.d.ts.map +1 -1
  224. package/dist/types/current/util/serialization/stringifyForPrint.js +1 -1
  225. package/dist/types/current/util/string/StringReader.d.ts +2 -2
  226. package/dist/types/current/util/string/StringReader.d.ts.map +1 -1
  227. package/dist/types/current/util/string/StringReader.js +1 -1
  228. package/dist/types/current/util/string/string.d.ts +2 -2
  229. package/dist/types/current/util/string/string.d.ts.map +1 -1
  230. package/dist/types/current/util/string/string.js +1 -1
  231. package/dist/types/current/util/type.d.ts +13 -0
  232. package/dist/types/current/util/type.d.ts.map +1 -1
  233. package/dist/types/ts3.7/client/userAgent/UserAgentInfo.d.ts +1 -1
  234. package/dist/types/ts3.7/client/userAgent/parseUserAgent.d.ts +1 -1
  235. package/dist/types/ts3.7/client/userAgent/tokenizeUserAgent.d.ts +1 -1
  236. package/dist/types/ts3.7/core/disposable.d.ts +1 -1
  237. package/dist/types/ts3.7/error/MediaUnsupportedError.d.ts +1 -1
  238. package/dist/types/ts3.7/error/ValidationError.d.ts +1 -1
  239. package/dist/types/ts3.7/event/DomEventHost.d.ts +1 -1
  240. package/dist/types/ts3.7/logging/Logger.d.ts +2 -2
  241. package/dist/types/ts3.7/logging/VinylLogging.d.ts +2 -2
  242. package/dist/types/ts3.7/logging/getLogLevelFromSearch.d.ts +1 -1
  243. package/dist/types/ts3.7/logging/logTimer.d.ts +1 -1
  244. package/dist/types/ts3.7/network/RequesterImpl.d.ts +1 -1
  245. package/dist/types/ts3.7/network/RequesterImplEventMap.d.ts +1 -1
  246. package/dist/types/ts3.7/network/logging/networkLoggingHandler.d.ts +1 -1
  247. package/dist/types/ts3.7/network/metrics/NetworkMetricsControllerImpl.d.ts +1 -1
  248. package/dist/types/ts3.7/network/metrics/networkMetricsGlobal.d.ts +1 -1
  249. package/dist/types/ts3.7/network/network.d.ts +1 -1
  250. package/dist/types/ts3.7/network/requesterGlobal.d.ts +1 -1
  251. package/dist/types/ts3.7/persistence/PersistentItem.d.ts +1 -1
  252. package/dist/types/ts3.7/persistence/StoragePersistence.d.ts +1 -1
  253. package/dist/types/ts3.7/persistence/persistenceRef.d.ts +2 -2
  254. package/dist/types/ts3.7/util/async/TaskQueue.d.ts +2 -2
  255. package/dist/types/ts3.7/util/async/TimeoutController.d.ts +1 -1
  256. package/dist/types/ts3.7/util/async/abortUtils.d.ts +1 -1
  257. package/dist/types/ts3.7/util/async/promise.d.ts +1 -1
  258. package/dist/types/ts3.7/util/browser/searchParams.d.ts +1 -1
  259. package/dist/types/ts3.7/util/buffer/buffer.d.ts +1 -1
  260. package/dist/types/ts3.7/util/collection/CacheMap.d.ts +12 -2
  261. package/dist/types/ts3.7/util/collection/LinkedList.d.ts +1 -4
  262. package/dist/types/ts3.7/util/collection/array.d.ts +2 -2
  263. package/dist/types/ts3.7/util/comparison/compare.d.ts +1 -1
  264. package/dist/types/ts3.7/util/config/ValueProvider.d.ts +1 -1
  265. package/dist/types/ts3.7/util/date/date.d.ts +1 -1
  266. package/dist/types/ts3.7/util/error/stack.d.ts +3 -3
  267. package/dist/types/ts3.7/util/fun/memoize.d.ts +1 -1
  268. package/dist/types/ts3.7/util/map/map.d.ts +14 -2
  269. package/dist/types/ts3.7/util/network/request.d.ts +1 -1
  270. package/dist/types/ts3.7/util/object/equalDeep.d.ts +1 -1
  271. package/dist/types/ts3.7/util/object/mergeDeep.d.ts +1 -1
  272. package/dist/types/ts3.7/util/object/mutableType.d.ts +1 -1
  273. package/dist/types/ts3.7/util/object/readonlyType.d.ts +1 -1
  274. package/dist/types/ts3.7/util/range/IntersectionRanges.d.ts +1 -1
  275. package/dist/types/ts3.7/util/range/UnionRanges.d.ts +1 -1
  276. package/dist/types/ts3.7/util/serialization/json.d.ts +1 -1
  277. package/dist/types/ts3.7/util/serialization/primitives.d.ts +1 -1
  278. package/dist/types/ts3.7/util/string/StringReader.d.ts +2 -2
  279. package/dist/types/ts3.7/util/string/string.d.ts +2 -2
  280. package/dist/types/ts3.7/util/type.d.ts +21 -0
  281. package/dist/types/ts4.1/client/userAgent/UserAgentInfo.d.ts +1 -1
  282. package/dist/types/ts4.1/client/userAgent/parseUserAgent.d.ts +1 -1
  283. package/dist/types/ts4.1/client/userAgent/tokenizeUserAgent.d.ts +1 -1
  284. package/dist/types/ts4.1/core/disposable.d.ts +1 -1
  285. package/dist/types/ts4.1/error/MediaUnsupportedError.d.ts +1 -1
  286. package/dist/types/ts4.1/error/ValidationError.d.ts +1 -1
  287. package/dist/types/ts4.1/event/DomEventHost.d.ts +1 -1
  288. package/dist/types/ts4.1/logging/Logger.d.ts +2 -2
  289. package/dist/types/ts4.1/logging/VinylLogging.d.ts +2 -2
  290. package/dist/types/ts4.1/logging/getLogLevelFromSearch.d.ts +1 -1
  291. package/dist/types/ts4.1/logging/logTimer.d.ts +1 -1
  292. package/dist/types/ts4.1/network/RequesterImpl.d.ts +1 -1
  293. package/dist/types/ts4.1/network/RequesterImplEventMap.d.ts +1 -1
  294. package/dist/types/ts4.1/network/logging/networkLoggingHandler.d.ts +1 -1
  295. package/dist/types/ts4.1/network/metrics/NetworkMetricsControllerImpl.d.ts +1 -1
  296. package/dist/types/ts4.1/network/metrics/networkMetricsGlobal.d.ts +1 -1
  297. package/dist/types/ts4.1/network/network.d.ts +1 -1
  298. package/dist/types/ts4.1/network/requesterGlobal.d.ts +1 -1
  299. package/dist/types/ts4.1/persistence/PersistentItem.d.ts +1 -1
  300. package/dist/types/ts4.1/persistence/StoragePersistence.d.ts +1 -1
  301. package/dist/types/ts4.1/persistence/persistenceRef.d.ts +2 -2
  302. package/dist/types/ts4.1/util/async/TaskQueue.d.ts +2 -2
  303. package/dist/types/ts4.1/util/async/TimeoutController.d.ts +1 -1
  304. package/dist/types/ts4.1/util/async/abortUtils.d.ts +1 -1
  305. package/dist/types/ts4.1/util/async/promise.d.ts +1 -1
  306. package/dist/types/ts4.1/util/browser/searchParams.d.ts +1 -1
  307. package/dist/types/ts4.1/util/buffer/buffer.d.ts +1 -1
  308. package/dist/types/ts4.1/util/collection/CacheMap.d.ts +12 -2
  309. package/dist/types/ts4.1/util/collection/LinkedList.d.ts +1 -4
  310. package/dist/types/ts4.1/util/collection/array.d.ts +2 -2
  311. package/dist/types/ts4.1/util/comparison/compare.d.ts +1 -1
  312. package/dist/types/ts4.1/util/config/ValueProvider.d.ts +1 -1
  313. package/dist/types/ts4.1/util/date/date.d.ts +1 -1
  314. package/dist/types/ts4.1/util/error/stack.d.ts +3 -3
  315. package/dist/types/ts4.1/util/fun/memoize.d.ts +1 -1
  316. package/dist/types/ts4.1/util/map/map.d.ts +14 -2
  317. package/dist/types/ts4.1/util/network/request.d.ts +1 -1
  318. package/dist/types/ts4.1/util/object/equalDeep.d.ts +1 -1
  319. package/dist/types/ts4.1/util/object/mergeDeep.d.ts +1 -1
  320. package/dist/types/ts4.1/util/object/mutableType.d.ts +1 -1
  321. package/dist/types/ts4.1/util/object/readonlyType.d.ts +1 -1
  322. package/dist/types/ts4.1/util/range/IntersectionRanges.d.ts +1 -1
  323. package/dist/types/ts4.1/util/range/UnionRanges.d.ts +1 -1
  324. package/dist/types/ts4.1/util/serialization/json.d.ts +1 -1
  325. package/dist/types/ts4.1/util/serialization/primitives.d.ts +1 -1
  326. package/dist/types/ts4.1/util/string/StringReader.d.ts +2 -2
  327. package/dist/types/ts4.1/util/string/string.d.ts +2 -2
  328. package/dist/types/ts4.1/util/type.d.ts +21 -0
  329. package/dist/types/ts4.7/client/userAgent/UserAgentInfo.d.ts +1 -1
  330. package/dist/types/ts4.7/client/userAgent/parseUserAgent.d.ts +1 -1
  331. package/dist/types/ts4.7/client/userAgent/tokenizeUserAgent.d.ts +1 -1
  332. package/dist/types/ts4.7/core/disposable.d.ts +1 -1
  333. package/dist/types/ts4.7/error/MediaUnsupportedError.d.ts +1 -1
  334. package/dist/types/ts4.7/error/ValidationError.d.ts +1 -1
  335. package/dist/types/ts4.7/event/DomEventHost.d.ts +1 -1
  336. package/dist/types/ts4.7/logging/Logger.d.ts +2 -2
  337. package/dist/types/ts4.7/logging/VinylLogging.d.ts +2 -2
  338. package/dist/types/ts4.7/logging/getLogLevelFromSearch.d.ts +1 -1
  339. package/dist/types/ts4.7/logging/logTimer.d.ts +1 -1
  340. package/dist/types/ts4.7/network/RequesterImpl.d.ts +1 -1
  341. package/dist/types/ts4.7/network/RequesterImplEventMap.d.ts +1 -1
  342. package/dist/types/ts4.7/network/logging/networkLoggingHandler.d.ts +1 -1
  343. package/dist/types/ts4.7/network/metrics/NetworkMetricsControllerImpl.d.ts +1 -1
  344. package/dist/types/ts4.7/network/metrics/networkMetricsGlobal.d.ts +1 -1
  345. package/dist/types/ts4.7/network/network.d.ts +1 -1
  346. package/dist/types/ts4.7/network/requesterGlobal.d.ts +1 -1
  347. package/dist/types/ts4.7/persistence/PersistentItem.d.ts +1 -1
  348. package/dist/types/ts4.7/persistence/StoragePersistence.d.ts +1 -1
  349. package/dist/types/ts4.7/persistence/persistenceRef.d.ts +2 -2
  350. package/dist/types/ts4.7/util/async/TaskQueue.d.ts +2 -2
  351. package/dist/types/ts4.7/util/async/TimeoutController.d.ts +1 -1
  352. package/dist/types/ts4.7/util/async/abortUtils.d.ts +1 -1
  353. package/dist/types/ts4.7/util/async/promise.d.ts +1 -1
  354. package/dist/types/ts4.7/util/browser/searchParams.d.ts +1 -1
  355. package/dist/types/ts4.7/util/buffer/buffer.d.ts +1 -1
  356. package/dist/types/ts4.7/util/collection/CacheMap.d.ts +12 -2
  357. package/dist/types/ts4.7/util/collection/LinkedList.d.ts +1 -4
  358. package/dist/types/ts4.7/util/collection/array.d.ts +2 -2
  359. package/dist/types/ts4.7/util/comparison/compare.d.ts +1 -1
  360. package/dist/types/ts4.7/util/config/ValueProvider.d.ts +1 -1
  361. package/dist/types/ts4.7/util/date/date.d.ts +1 -1
  362. package/dist/types/ts4.7/util/error/stack.d.ts +3 -3
  363. package/dist/types/ts4.7/util/fun/memoize.d.ts +1 -1
  364. package/dist/types/ts4.7/util/map/map.d.ts +14 -2
  365. package/dist/types/ts4.7/util/network/request.d.ts +1 -1
  366. package/dist/types/ts4.7/util/object/equalDeep.d.ts +1 -1
  367. package/dist/types/ts4.7/util/object/mergeDeep.d.ts +1 -1
  368. package/dist/types/ts4.7/util/object/mutableType.d.ts +1 -1
  369. package/dist/types/ts4.7/util/object/readonlyType.d.ts +1 -1
  370. package/dist/types/ts4.7/util/range/IntersectionRanges.d.ts +1 -1
  371. package/dist/types/ts4.7/util/range/UnionRanges.d.ts +1 -1
  372. package/dist/types/ts4.7/util/serialization/json.d.ts +1 -1
  373. package/dist/types/ts4.7/util/serialization/primitives.d.ts +1 -1
  374. package/dist/types/ts4.7/util/string/StringReader.d.ts +2 -2
  375. package/dist/types/ts4.7/util/string/string.d.ts +2 -2
  376. package/dist/types/ts4.7/util/type.d.ts +21 -0
  377. package/dist/unit/types/current/tsconfig.tsbuildinfo +1 -0
  378. package/package.json +11 -11
@@ -190,7 +190,7 @@ import { stringifyLogLevel } from "@amazon/vinyl-util";
190
190
  var RestApiReporter = class _RestApiReporter extends LogReporter {
191
191
  constructor(reportApi) {
192
192
  super();
193
- this.reportApi = reportApi;
193
+ __publicField(this, "reportApi", reportApi);
194
194
  }
195
195
  /**
196
196
  * Installs this reporter if this is a Browser environment and the report api has been provided as a query
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../test/testUtil/util/initializeUncaughtErrorLogging.ts", "../../test/testUtil/util/event/createEventSpy.ts", "../../test/testUtil/reporters/LogReporter.ts", "../../test/testUtil/reporters/RestApiReporter.ts", "../../test/testUtil/patch/addPatchTests.ts", "../../test/testUtil/mock/util/spyOnPropertySafe.ts", "../../test/testUtil/mock/persistence/MockPersistence.ts", "../../test/testUtil/mock/network/emptyRequestInfo.ts", "../../test/testUtil/mock/network/MockRequester.ts", "../../test/testUtil/mock/event/MockEventHost.ts", "../../test/testUtil/mock/network/MockNetworkState.ts", "../../test/testUtil/mock/network/MockNetworkMetricsController.ts", "../../test/testUtil/mock/network/MockNetworkInformation.ts", "../../test/testUtil/mock/navigator/setMockNavigator.ts", "../../test/testUtil/mock/logging/MockLogger.ts", "../../test/testUtil/global/overrideGlobalInit.ts", "../../test/testUtil/mock/event/emptyLogTarget.ts", "../../test/testUtil/error/uncaughtErrorUtil.ts"],
4
- "sourcesContent": ["/*\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\nlet loggingUncaughtErrors = false\n\n/**\n * Logs uncaught errors and promise rejections to the console, to be emitted to the report api.\n * Jasmine catches uncaught errors and only reports the message in the test failure, not the whole error event.\n */\nexport function initializeUncaughtErrorLogging() {\n if (loggingUncaughtErrors) return\n loggingUncaughtErrors = true\n window.addEventListener('error', (event) => {\n console.error('uncaught error event:', event)\n })\n\n window.addEventListener('unhandledrejection', (event) => {\n console.error('unhandled rejection:', event)\n })\n}\n", "/*\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport type {\n Disposable,\n EventHandler,\n Fun,\n ReadonlyEventHost,\n} from '@amazon/vinyl-util'\nimport { Deferred, substitute, withTimeout } from '@amazon/vinyl-util'\nimport createSpy = jasmine.createSpy\nimport Spy = jasmine.Spy\n\n/**\n * A Spy that provides a way to promisify the next call and unsubscribe.\n *\n * Do not use `and` on an EventSpy, the callFake is used to provide the next promise.\n */\nexport interface EventSpy<EventMap, K extends keyof EventMap>\n extends Spy<EventHandler<EventMap[K]>>, Fun, Disposable {\n /**\n * Returns a promise that resolves when the event has next been dispatched, or rejects\n * if timeout has elapsed.\n *\n * @param timeout The number of seconds before a timeout.\n * @param timeoutMessage An optional timeout message to use instead of the default.\n * This may use two tokens:\n * {0} - The event type.\n * {1} - Number of seconds before the timeout.\n */\n next(timeout?: number, timeoutMessage?: string): Promise<EventMap[K]>\n}\n\n/**\n * Adds a listener to an event host, returning a spy for assertions.\n *\n * The returned spy provides a `next` function to promisify the next call and a `dispose` function\n * to unsubscribe.\n *\n * @param host\n * @param type\n */\nexport function createEventSpy<EventMap, K extends keyof EventMap>(\n host: ReadonlyEventHost<EventMap>,\n type: K\n): EventSpy<EventMap, K> {\n const spy = createSpy(String(type))\n let nextCall = new Deferred<EventMap[K]>()\n spy.and.callFake(() => {\n nextCall.resolve(spy.calls.mostRecent().args[0])\n nextCall = new Deferred<EventMap[K]>()\n })\n const unsub = host.on(type, spy)\n\n return Object.assign(spy, {\n next(\n timeout = 5,\n timeoutMessage = `event '{type}' has not been dispatched after {timeout}s.`\n ) {\n return withTimeout(\n nextCall,\n timeout,\n substitute(timeoutMessage, {\n type,\n timeout,\n })\n )\n },\n dispose: unsub,\n })\n}\n", "/*\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport CustomReporter = jasmine.CustomReporter\nimport JasmineDoneInfo = jasmine.JasmineDoneInfo\nimport JasmineStartedInfo = jasmine.JasmineStartedInfo\nimport SpecResult = jasmine.SpecResult\nimport { LogLevel, type ReadonlyDate } from '@amazon/vinyl-util'\n\n/**\n * The minimum number of seconds between progress reports.\n */\nconst UPDATE_INTERVAL = 1\n\n/**\n * The maximum number of log statements before forcing a flush.\n * This can be reached if a single test is long-running and has excessive logs.\n */\nconst MAX_LOGS_BUFFER = 200\n\nexport interface LogReporterStartedEvent {\n readonly totalSpecs: number\n}\n\nexport interface LogReporterProgressEvent {\n readonly totalCompleted: number\n readonly totalSpecs: number\n readonly logs: readonly LogEntry[]\n}\n\nexport interface LogReporterDoneEvent {\n readonly overallStatus: 'passed' | 'failed'\n readonly totalCompleted: number\n readonly totalSpecs: number\n readonly reason: string\n}\n\nexport interface LogEntry {\n readonly timestamp: ReadonlyDate\n readonly messages: readonly any[]\n readonly level: LogLevel\n}\n\nexport abstract class LogReporter implements CustomReporter {\n /**\n * The first failed spec.\n *\n * Jasmine's spec result in `jasmineDone` does not provide these correctly in\n * failedExpectations, save this from `specDone`.\n */\n private failedResult: SpecResult | null = null\n\n private totalSpecs = 0\n private totalCompleted = 0\n\n /**\n * The timestamp of the last progress update.\n */\n protected lastProgressTimestamp = 0\n protected updateInterval = UPDATE_INTERVAL\n protected maxLogsBuffer = MAX_LOGS_BUFFER\n\n private consoleInterceptor = new ConsoleInterceptor()\n\n private readonly logs: LogEntry[] = []\n\n protected constructor() {\n this.consoleInterceptor.onLog = (entry) => {\n this.logs.push(entry)\n if (this.logs.length >= this.maxLogsBuffer)\n this.maybeReportProgress(true)\n }\n }\n\n jasmineStarted(suiteInfo: JasmineStartedInfo): void {\n this.onStarted({\n totalSpecs: suiteInfo.totalSpecsDefined,\n }).catch((e) => {\n console.error(`'done' failed to report`, e)\n })\n this.totalCompleted = 0\n this.totalSpecs = suiteInfo.totalSpecsDefined\n }\n\n protected abstract onStarted(action: LogReporterStartedEvent): Promise<void>\n\n specDone(result: SpecResult): void {\n if (!this.failedResult && result.status === 'failed')\n this.failedResult = result\n this.totalCompleted++\n this.maybeReportProgress()\n }\n\n jasmineDone(runDetails: JasmineDoneInfo): void {\n this.maybeReportProgress(true)\n this.consoleInterceptor.dispose()\n const reason = this.failedResult\n ? `${this.failedResult.fullName}:\\n${this.failedResult.failedExpectations[0]?.message}`\n : runDetails.overallStatus === 'incomplete'\n ? runDetails.incompleteReason\n : ''\n const body: LogReporterDoneEvent = {\n // one of: 'passed', 'failed', 'incomplete'\n overallStatus:\n runDetails.overallStatus === 'incomplete'\n ? 'passed'\n : (runDetails.overallStatus as 'passed' | 'failed'),\n totalCompleted: this.totalCompleted,\n totalSpecs: this.totalSpecs,\n reason,\n }\n this.onDone(body).catch((_) => {\n // One retry:\n this.onDone(body).catch((e) => {\n console.error(`'done' failed to report`, e)\n })\n })\n }\n\n /**\n * If there has not been a progress update within `updateInterval`, emit another progress\n * event.\n * @private\n */\n private maybeReportProgress(force: boolean = false) {\n const now = Date.now()\n if (\n force ||\n now - this.lastProgressTimestamp > this.updateInterval * 1000\n ) {\n const logs = this.logs.slice()\n this.logs.length = 0\n this.onProgress({\n totalCompleted: this.totalCompleted,\n totalSpecs: this.totalSpecs,\n logs,\n }).catch((e) => {\n console.error(`'progress' failed to report`, e)\n })\n this.lastProgressTimestamp = now\n }\n }\n\n protected abstract onProgress(\n action: LogReporterProgressEvent\n ): Promise<void>\n\n protected abstract onDone(action: LogReporterDoneEvent): Promise<void>\n}\n\nconst consoleMethods = [\n 'debug',\n 'log',\n 'info',\n 'warn',\n 'error',\n] as const satisfies (keyof Console)[]\n\nconst consoleMethodLevels: Record<string, LogLevel> = {\n debug: LogLevel.DEBUG,\n log: LogLevel.DEBUG,\n warn: LogLevel.WARN,\n info: LogLevel.INFO,\n error: LogLevel.ERROR,\n} as const\n\n/**\n * Intercepts console, logging to an array as well.\n */\nclass ConsoleInterceptor {\n private readonly originalMethods: Record<string, (...args: any[]) => void>\n\n /**\n * Invoked on every log statement.\n */\n onLog: ((entry: LogEntry) => void) | null = null\n\n constructor() {\n this.originalMethods = {}\n for (const consoleMethod of consoleMethods) {\n this.originalMethods[consoleMethod] = console[consoleMethod]\n console[consoleMethod] = (...args) => {\n if (this.onLog)\n this.onLog({\n level:\n consoleMethodLevels[consoleMethod] ??\n LogLevel.DEBUG,\n timestamp: new Date(),\n messages: args,\n })\n this.originalMethods[consoleMethod].apply(console, args)\n }\n }\n }\n\n dispose() {\n for (const consoleMethod of consoleMethods) {\n console[consoleMethod] = this.originalMethods[consoleMethod]\n }\n }\n}\n", "/*\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {\n type LogReporterProgressEvent,\n LogReporter,\n type LogReporterDoneEvent,\n type LogReporterStartedEvent,\n} from '@/reporters/LogReporter'\nimport { initializeUncaughtErrorLogging } from '@/util/initializeUncaughtErrorLogging'\nimport { stringifyLogLevel } from '@amazon/vinyl-util'\n\nexport class RestApiReporter extends LogReporter {\n /**\n * Installs this reporter if this is a Browser environment and the report api has been provided as a query\n * parameter.\n * @param searchParam\n */\n static installFromSearchParam(searchParam: string = 'reportApi') {\n if (typeof location === 'undefined') return\n const url = new URL('about:blank')\n url.search = location.search\n // Uses `URL.searchParams` over `new URLSearchParams`; URLSearchParams constructor is not\n // as widely supported.\n const reportApi = url.searchParams.get(searchParam)\n if (reportApi) {\n jasmine.getEnv().addReporter(new RestApiReporter(reportApi))\n initializeUncaughtErrorLogging()\n }\n }\n\n constructor(private readonly reportApi: string) {\n super()\n }\n\n protected onStarted(action: LogReporterStartedEvent): Promise<void> {\n return this.doRequest('started', action)\n }\n\n protected onProgress(action: LogReporterProgressEvent): Promise<void> {\n return this.doRequest('progress', {\n totalCompleted: action.totalCompleted,\n totalSpecs: action.totalSpecs,\n logs: action.logs.map((logEntry) => [\n stringifyLogLevel(logEntry.level),\n logEntry.timestamp.toISOString(),\n logArgsToStr(logEntry.messages),\n ]),\n })\n }\n\n protected onDone(action: LogReporterDoneEvent): Promise<void> {\n return this.doRequest('done', action)\n }\n\n /**\n * If the reportApi url was set in the URL parameters, report to that URL the test progress.\n *\n * @param action One of: 'started', 'progress', or 'done'\n * @param body\n * @private\n */\n private async doRequest(\n action: 'started' | 'progress' | 'done',\n body: any\n ): Promise<void> {\n if (!this.reportApi) return\n const response = await fetch(`${this.reportApi}/${action}`, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify(body),\n })\n if (!response.ok)\n throw new Error(`${response.status} Error: ${response.statusText}`)\n return await response.json()\n }\n}\n\n/**\n * Converts the arguments to console logging to a string.\n * @param args\n */\nfunction logArgsToStr(args: readonly any[]): string {\n return args\n .map((arg) => {\n if (arg != null && typeof arg === 'object') {\n try {\n return JSON.stringify(arg)\n } catch (_) {\n return String(arg)\n }\n } else {\n return String(arg)\n }\n })\n .join(' ')\n}\n", "/*\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport type { PatchedRef } from '@amazon/vinyl-util'\nimport { expectNothing } from '@amazon/vinyl-util/browserTestUtil'\n\nexport interface PatchTestOptions<T> {\n /**\n * True if the patch is enabled by default.\n */\n actualFlag: boolean | undefined\n\n /**\n * The target, not patched.\n */\n target: T\n\n /**\n * The patched target.\n */\n patchedRef: PatchedRef<T>\n\n /**\n * Runs the scenario to reproduce the issue on the target.\n * @param target\n */\n canReproduce: (target: T) => Promise<boolean>\n\n /**\n * If true and the tested flag is true but the issue cannot be reproduced, then only a\n * warning is logged, if false, then the test will be marked as a failure.\n */\n allowFalseNegative: boolean\n}\n\n/**\n * Adds tests to ensure that a patch flag is enabled when the issue can be reproduced for the UA,\n * and when the patch is applied the issue is no longer reproducible.\n *\n * @param flagName The flag name, used in test descriptions.\n * @param description The condition which requires the patch to be enabled.\n * @param optionsProvider\n */\nexport function addPatchTests<T>(\n flagName: string,\n description: string,\n optionsProvider: () => PatchTestOptions<T>\n) {\n let options: PatchTestOptions<T>\n\n beforeEach(() => {\n options = optionsProvider()\n })\n\n afterEach(() => {\n // null safety check required, if test is skipped, beforeEach is not called but\n // afterEach is.\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n options?.patchedRef.dispose()\n })\n\n it('sets the default flag to true only if the issue can be reproduced', async () => {\n const canReproduce = await options.canReproduce(options.target)\n if (canReproduce) {\n if (!options.actualFlag)\n fail(`expected patch flag '${flagName}' to be true`)\n } else {\n if (options.actualFlag) {\n // The flag was true but the issue could not be reproduced.\n // Most issues being patched cannot be reproduced with 100% reliability.\n // Allow reproduction misses to be merely a warning instead of failing the test.\n const message = `flag '${flagName}' was true but issue not reproduced`\n if (options.allowFalseNegative) console.warn(message)\n else fail(message)\n }\n }\n expectNothing()\n })\n\n describe(`when the ${flagName} is true`, () => {\n it(description, async () => {\n if (options.actualFlag) {\n if (await options.canReproduce(options.patchedRef.patched))\n fail('patch did not resolve issue')\n }\n expectNothing()\n })\n })\n}\n", "/*\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * A wrapper to jasmine spyOnProperty for property getters that will define property\n * if it doesn't exist.\n */\nexport function spyOnPropertySafe<\n T extends object,\n K extends keyof T = keyof T,\n>(object: T, property: K): jasmine.Spy<(this: T) => T[K]> {\n if (!(property in object)) {\n // Object does not have property attempting to be mocked\n // define it (with an undefined value) to allow spyOnProperty to succeed.\n Object.defineProperty(object, property, {\n configurable: true,\n enumerable: true,\n get: () => undefined,\n })\n }\n return spyOnProperty(object, property, 'get')\n}\n", "/*\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { createSpyFactory } from '@amazon/vinyl-util/browserTestUtil'\nimport type { KeyValuePersistence } from '@amazon/vinyl-util'\n\nexport class MockPersistence<T = any> implements KeyValuePersistence<T> {\n private readonly spyFactory = createSpyFactory<KeyValuePersistence<T>>()\n\n clear = this.spyFactory('clear')\n\n get = this.spyFactory('get')\n\n remove = this.spyFactory('remove')\n\n set = this.spyFactory('set')\n}\n", "/*\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\n//-------------------------------------------------------------\n// Empty FetchCompletedInfo objects for tests.\n//-------------------------------------------------------------\n\nimport {\n ErrorBodyType,\n type FetchRequestInfo,\n type RequestAttemptInfo,\n type RequestCaughtErrorEvent,\n type RequestNetworkErrorEvent,\n type RequestResponseErrorEvent,\n type RequestSuccessEvent,\n type ResponseInfo,\n} from '@amazon/vinyl-util'\nimport { RequestFailureType } from '@amazon/vinyl-util'\n\nexport const emptyRequestInfo: FetchRequestInfo = {\n requestId: '',\n requestOptions: { readErrorBody: ErrorBodyType.DISABLED, serviceId: null },\n init: {},\n input: '',\n maxRetries: 0,\n timestamp: 0,\n}\n\nexport const emptyRequestAttemptInfo: RequestAttemptInfo = {\n currentTry: 0,\n timestamp: 0,\n}\n\nexport const emptyResponseInfo: ResponseInfo = {\n ok: false,\n redirected: false,\n status: 0,\n statusText: '',\n type: 'default',\n url: '',\n contentLength: 0,\n}\n\nexport const emptyRequestSuccessEvent: RequestSuccessEvent = {\n ok: true,\n requestInfo: emptyRequestInfo,\n timestamp: 0,\n attemptInfo: emptyRequestAttemptInfo,\n responseInfo: emptyResponseInfo,\n}\n\nexport const emptyInternalError: RequestCaughtErrorEvent = {\n ok: false,\n reason: null,\n requestInfo: emptyRequestInfo,\n retryAfter: null,\n timestamp: 0,\n type: RequestFailureType.INTERNAL,\n willRetry: false,\n}\n\nexport const emptyNetworkError: RequestNetworkErrorEvent = {\n ok: false,\n reason: null,\n requestInfo: emptyRequestInfo,\n retryAfter: null,\n timestamp: 0,\n type: RequestFailureType.NETWORK,\n willRetry: false,\n attemptInfo: emptyRequestAttemptInfo,\n}\n\nexport const emptyResponseError: RequestResponseErrorEvent = {\n ok: false,\n reason: null,\n requestInfo: emptyRequestInfo,\n retryAfter: null,\n timestamp: 0,\n type: RequestFailureType.RESPONSE,\n willRetry: false,\n attemptInfo: emptyRequestAttemptInfo,\n responseInfo: emptyResponseInfo,\n}\n\nexport const emptyAbortError: RequestCaughtErrorEvent = {\n ...emptyInternalError,\n type: RequestFailureType.ABORT,\n}\n", "/*\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport type { Requester, RequesterImplEventMap } from '@amazon/vinyl-util'\nimport { createSpyFactory } from '@amazon/vinyl-util/browserTestUtil'\nimport { MockEventHost } from '@/mock/event/MockEventHost'\n\nconst spyFactory = createSpyFactory<Requester>()\nexport class MockRequester\n extends MockEventHost<RequesterImplEventMap>\n implements Requester\n{\n request = spyFactory('request')\n}\n", "/*\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { EventHostImpl } from '@amazon/vinyl-util'\nimport type { SpyFactory } from '@amazon/vinyl-util/browserTestUtil'\nimport { createSpyFactory } from '@amazon/vinyl-util/browserTestUtil'\n\n/**\n * MockEventHost creates spies with pass-through calls to the EventHost implementation.\n * While this is not a true mock, events become easier to test when using a real event dispatcher.\n */\nexport class MockEventHost<EventMap = any> extends EventHostImpl<EventMap> {\n private readonly spyFactory: SpyFactory<EventHostImpl<EventMap>> =\n createSpyFactory((key) => {\n return super[key].bind(this)\n })\n\n logPrefix = 'MockEventHost'\n hasAnyListeners = this.spyFactory('hasAnyListeners')\n hasListeners = this.spyFactory('hasListeners')\n dispatch = this.spyFactory('dispatch')\n on = this.spyFactory('on')\n dispose = this.spyFactory('dispose')\n}\n", "/*\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport type { NetworkState, NetworkStateEventMap } from '@amazon/vinyl-util'\nimport { createSpyFactory } from '@amazon/vinyl-util/browserTestUtil'\nimport { MockEventHost } from '@/mock/event/MockEventHost'\n\nconst spyFactory = createSpyFactory<NetworkState>()\nexport class MockNetworkState\n extends MockEventHost<NetworkStateEventMap>\n implements NetworkState\n{\n onLine = false\n\n nextOnLine = spyFactory('nextOnLine')\n}\n", "/*\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport type {\n NetworkMetrics,\n NetworkMetricsController,\n NetworkMetricsEventMap,\n} from '@amazon/vinyl-util'\nimport { EMPTY_NETWORK_METRICS } from '@amazon/vinyl-util'\nimport { createSpyFactory } from '@amazon/vinyl-util/browserTestUtil'\n\nimport { MockEventHost } from '@/mock/event/MockEventHost'\n\nconst spyFactory = createSpyFactory<NetworkMetricsController>()\nexport class MockNetworkMetricsController\n extends MockEventHost<NetworkMetricsEventMap>\n implements NetworkMetricsController\n{\n maxHistorySize = 0\n\n metrics: NetworkMetrics = EMPTY_NETWORK_METRICS\n\n addMetricsEntry = spyFactory('addMetricsEntry')\n\n getServiceMetrics = spyFactory('getServiceMetrics')\n\n addDownlinkTransferEntry = spyFactory('addDownlinkTransferEntry')\n}\n", "/*\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport type {\n NetworkInformation,\n NetworkInformationEffectiveType,\n NetworkInformationType,\n} from '@amazon/vinyl-util'\nimport { MockEventTarget } from '@amazon/vinyl-util/browserTestUtil'\n\nexport class MockNetworkInformation\n extends MockEventTarget\n implements NetworkInformation\n{\n downlink: number | undefined = undefined\n effectiveType: NetworkInformationEffectiveType = '4g'\n rtt = 0\n saveData = false\n type?: NetworkInformationType = undefined\n}\n", "/*\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { MockNavigator } from '@amazon/vinyl-util/browserTestUtil'\nimport { spyOnPropertySafe } from '@/mock/util/spyOnPropertySafe'\n\n/**\n * Sets the global navigator to a Mock\n * Returns the new MockNavigator instance.\n */\nexport function setMockNavigator(): MockNavigator {\n const navigator = new MockNavigator()\n spyOnPropertySafe(global, 'navigator').and.returnValue(navigator)\n return navigator\n}\n", "/*\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport type { LogEventMap, Logger, LogTarget } from '@amazon/vinyl-util'\nimport { loggerRef, LogLevel } from '@amazon/vinyl-util'\nimport { createSpyFactory } from '@amazon/vinyl-util/browserTestUtil'\nimport { overrideGlobalInit } from '@/global/overrideGlobalInit'\nimport { MockEventHost } from '@/mock/event/MockEventHost'\nimport createSpy = jasmine.createSpy\n\ntype LogFilterFun = (target: LogTarget, ...messages: any[]) => void\n\nconst spyFactory = createSpyFactory<Logger>()\nexport class MockLogger extends MockEventHost<LogEventMap> implements Logger {\n logLevel: LogLevel = LogLevel.DEBUG\n\n log = spyFactory('log').and.callFake((target, level, ...messages) => {\n switch (level) {\n // Delegates logs to spies separated by log level.\n case LogLevel.VERBOSE:\n this.verbose(target, ...messages)\n break\n case LogLevel.DEBUG:\n this.debug(target, ...messages)\n break\n case LogLevel.INFO:\n this.info(target, ...messages)\n break\n case LogLevel.WARN:\n this.warn(target, ...messages)\n break\n case LogLevel.ERROR:\n this.error(target, ...messages)\n break\n }\n })\n\n verbose = createSpy<LogFilterFun>('verbose')\n debug = createSpy<LogFilterFun>('debug')\n info = createSpy<LogFilterFun>('info')\n warn = createSpy<LogFilterFun>('warn')\n error = createSpy<LogFilterFun>('error')\n}\n\nexport function useMockLogger(): { readonly value: MockLogger } {\n return overrideGlobalInit(loggerRef, () => new MockLogger())\n}\n", "/*\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport type { GlobalRef } from '@amazon/vinyl-util'\n\nexport function overrideGlobalInit<T, U extends T>(\n initHandle: GlobalRef<T>,\n initOverride: () => U\n): { readonly value: U } {\n beforeEach(() => {\n initHandle.set(initOverride)\n })\n return initHandle as GlobalRef<U>\n}\n", "/*\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport type { LogTarget } from '@amazon/vinyl-util'\n\nexport const emptyLogTarget: LogTarget = {\n logPrefix: 'path',\n}\n", "/*\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport type { CodeRange } from '@amazon/vinyl-util'\nimport { parseStackLocation } from '@amazon/vinyl-util'\nimport type { MockEventTarget } from '@amazon/vinyl-util/browserTestUtil'\nimport {\n MockErrorEvent,\n MockPromiseRejectionEvent,\n} from '@amazon/vinyl-util/browserTestUtil'\n\n/**\n * Creates a code range object surrounding the given error.\n */\nexport function createRangeSurrounding(error: Error): CodeRange {\n const location = parseStackLocation(error.stack)\n if (!location) {\n pending('Cannot parse stacks in this environment.')\n return { start: null, end: null }\n }\n return {\n start: {\n source: location.source,\n file: location.file,\n row: location.row,\n col: (location.col ?? 0) - 1,\n },\n end: {\n source: location.source,\n file: location.file,\n row: location.row,\n col: (location.col ?? 0) + 1,\n },\n }\n}\n\n/**\n * Simulates an uncaught error event.\n */\nexport function throwMockError(target: MockEventTarget, error: any) {\n expect(target.removeEventListener).not.toHaveBeenCalled()\n const event = new MockErrorEvent()\n event.type = 'error'\n event.error = error\n target.dispatchEvent(event)\n}\n\n/**\n * Simulates an unhandled rejection to be caught by the global unhandled promise handler.\n */\nexport function rejectMockPromise(target: MockEventTarget, reason: any) {\n expect(target.removeEventListener).not.toHaveBeenCalled()\n // Not all environments can construct `PromiseRejectionEvent`\n const event = new MockPromiseRejectionEvent()\n event.type = 'unhandledrejection'\n event.reason = reason\n event.promise = Promise.reject(reason as Error).catch(() => void 0)\n target.dispatchEvent(event)\n}\n"],
4
+ "sourcesContent": ["/*\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\nlet loggingUncaughtErrors = false\n\n/**\n * Logs uncaught errors and promise rejections to the console, to be emitted to the report api.\n * Jasmine catches uncaught errors and only reports the message in the test failure, not the whole error event.\n */\nexport function initializeUncaughtErrorLogging() {\n if (loggingUncaughtErrors) return\n loggingUncaughtErrors = true\n window.addEventListener('error', (event) => {\n console.error('uncaught error event:', event)\n })\n\n window.addEventListener('unhandledrejection', (event) => {\n console.error('unhandled rejection:', event)\n })\n}\n", "/*\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport type {\n Disposable,\n EventHandler,\n Fun,\n ReadonlyEventHost,\n} from '@amazon/vinyl-util'\nimport { Deferred, substitute, withTimeout } from '@amazon/vinyl-util'\nimport createSpy = jasmine.createSpy\nimport Spy = jasmine.Spy\n\n/**\n * A Spy that provides a way to promisify the next call and unsubscribe.\n *\n * Do not use `and` on an EventSpy, the callFake is used to provide the next promise.\n */\nexport interface EventSpy<EventMap, K extends keyof EventMap>\n extends Spy<EventHandler<EventMap[K]>>, Fun, Disposable {\n /**\n * Returns a promise that resolves when the event has next been dispatched, or rejects\n * if timeout has elapsed.\n *\n * @param timeout The number of seconds before a timeout.\n * @param timeoutMessage An optional timeout message to use instead of the default.\n * This may use two tokens:\n * {0} - The event type.\n * {1} - Number of seconds before the timeout.\n */\n next(timeout?: number, timeoutMessage?: string): Promise<EventMap[K]>\n}\n\n/**\n * Adds a listener to an event host, returning a spy for assertions.\n *\n * The returned spy provides a `next` function to promisify the next call and a `dispose` function\n * to unsubscribe.\n *\n * @param host\n * @param type\n */\nexport function createEventSpy<EventMap, K extends keyof EventMap>(\n host: ReadonlyEventHost<EventMap>,\n type: K\n): EventSpy<EventMap, K> {\n const spy = createSpy(String(type))\n let nextCall = new Deferred<EventMap[K]>()\n spy.and.callFake(() => {\n nextCall.resolve(spy.calls.mostRecent().args[0])\n nextCall = new Deferred<EventMap[K]>()\n })\n const unsub = host.on(type, spy)\n\n return Object.assign(spy, {\n next(\n timeout = 5,\n timeoutMessage = `event '{type}' has not been dispatched after {timeout}s.`\n ) {\n return withTimeout(\n nextCall,\n timeout,\n substitute(timeoutMessage, {\n type,\n timeout,\n })\n )\n },\n dispose: unsub,\n })\n}\n", "/*\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport CustomReporter = jasmine.CustomReporter\nimport JasmineDoneInfo = jasmine.JasmineDoneInfo\nimport JasmineStartedInfo = jasmine.JasmineStartedInfo\nimport SpecResult = jasmine.SpecResult\nimport { LogLevel, type ReadonlyDate } from '@amazon/vinyl-util'\n\n/**\n * The minimum number of seconds between progress reports.\n */\nconst UPDATE_INTERVAL = 1\n\n/**\n * The maximum number of log statements before forcing a flush.\n * This can be reached if a single test is long-running and has excessive logs.\n */\nconst MAX_LOGS_BUFFER = 200\n\nexport interface LogReporterStartedEvent {\n readonly totalSpecs: number\n}\n\nexport interface LogReporterProgressEvent {\n readonly totalCompleted: number\n readonly totalSpecs: number\n readonly logs: readonly LogEntry[]\n}\n\nexport interface LogReporterDoneEvent {\n readonly overallStatus: 'passed' | 'failed'\n readonly totalCompleted: number\n readonly totalSpecs: number\n readonly reason: string\n}\n\nexport interface LogEntry {\n readonly timestamp: ReadonlyDate\n readonly messages: readonly any[]\n readonly level: LogLevel\n}\n\nexport abstract class LogReporter implements CustomReporter {\n /**\n * The first failed spec.\n *\n * Jasmine's spec result in `jasmineDone` does not provide these correctly in\n * failedExpectations, save this from `specDone`.\n */\n private failedResult: SpecResult | null = null\n\n private totalSpecs = 0\n private totalCompleted = 0\n\n /**\n * The timestamp of the last progress update.\n */\n protected lastProgressTimestamp = 0\n protected updateInterval = UPDATE_INTERVAL\n protected maxLogsBuffer = MAX_LOGS_BUFFER\n\n private consoleInterceptor = new ConsoleInterceptor()\n\n private readonly logs: LogEntry[] = []\n\n protected constructor() {\n this.consoleInterceptor.onLog = (entry) => {\n this.logs.push(entry)\n if (this.logs.length >= this.maxLogsBuffer)\n this.maybeReportProgress(true)\n }\n }\n\n jasmineStarted(suiteInfo: JasmineStartedInfo): void {\n this.onStarted({\n totalSpecs: suiteInfo.totalSpecsDefined,\n }).catch((e) => {\n console.error(`'done' failed to report`, e)\n })\n this.totalCompleted = 0\n this.totalSpecs = suiteInfo.totalSpecsDefined\n }\n\n protected abstract onStarted(action: LogReporterStartedEvent): Promise<void>\n\n specDone(result: SpecResult): void {\n if (!this.failedResult && result.status === 'failed')\n this.failedResult = result\n this.totalCompleted++\n this.maybeReportProgress()\n }\n\n jasmineDone(runDetails: JasmineDoneInfo): void {\n this.maybeReportProgress(true)\n this.consoleInterceptor.dispose()\n const reason = this.failedResult\n ? `${this.failedResult.fullName}:\\n${this.failedResult.failedExpectations[0]?.message}`\n : runDetails.overallStatus === 'incomplete'\n ? runDetails.incompleteReason\n : ''\n const body: LogReporterDoneEvent = {\n // one of: 'passed', 'failed', 'incomplete'\n overallStatus:\n runDetails.overallStatus === 'incomplete'\n ? 'passed'\n : (runDetails.overallStatus as 'passed' | 'failed'),\n totalCompleted: this.totalCompleted,\n totalSpecs: this.totalSpecs,\n reason,\n }\n this.onDone(body).catch((_) => {\n // One retry:\n this.onDone(body).catch((e) => {\n console.error(`'done' failed to report`, e)\n })\n })\n }\n\n /**\n * If there has not been a progress update within `updateInterval`, emit another progress\n * event.\n * @private\n */\n private maybeReportProgress(force: boolean = false) {\n const now = Date.now()\n if (\n force ||\n now - this.lastProgressTimestamp > this.updateInterval * 1000\n ) {\n const logs = this.logs.slice()\n this.logs.length = 0\n this.onProgress({\n totalCompleted: this.totalCompleted,\n totalSpecs: this.totalSpecs,\n logs,\n }).catch((e) => {\n console.error(`'progress' failed to report`, e)\n })\n this.lastProgressTimestamp = now\n }\n }\n\n protected abstract onProgress(\n action: LogReporterProgressEvent\n ): Promise<void>\n\n protected abstract onDone(action: LogReporterDoneEvent): Promise<void>\n}\n\nconst consoleMethods = [\n 'debug',\n 'log',\n 'info',\n 'warn',\n 'error',\n] as const satisfies (keyof Console)[]\n\nconst consoleMethodLevels: Record<string, LogLevel> = {\n debug: LogLevel.DEBUG,\n log: LogLevel.DEBUG,\n warn: LogLevel.WARN,\n info: LogLevel.INFO,\n error: LogLevel.ERROR,\n} as const\n\n/**\n * Intercepts console, logging to an array as well.\n */\nclass ConsoleInterceptor {\n private readonly originalMethods: Record<string, (...args: any[]) => void>\n\n /**\n * Invoked on every log statement.\n */\n onLog: ((entry: LogEntry) => void) | null = null\n\n constructor() {\n this.originalMethods = {}\n for (const consoleMethod of consoleMethods) {\n this.originalMethods[consoleMethod] = console[consoleMethod]\n console[consoleMethod] = (...args) => {\n if (this.onLog)\n this.onLog({\n level:\n consoleMethodLevels[consoleMethod] ??\n LogLevel.DEBUG,\n timestamp: new Date(),\n messages: args,\n })\n this.originalMethods[consoleMethod].apply(console, args)\n }\n }\n }\n\n dispose() {\n for (const consoleMethod of consoleMethods) {\n console[consoleMethod] = this.originalMethods[consoleMethod]\n }\n }\n}\n", "/*\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {\n type LogReporterProgressEvent,\n LogReporter,\n type LogReporterDoneEvent,\n type LogReporterStartedEvent,\n} from './LogReporter'\nimport { initializeUncaughtErrorLogging } from '../util/initializeUncaughtErrorLogging'\nimport { stringifyLogLevel } from '@amazon/vinyl-util'\n\nexport class RestApiReporter extends LogReporter {\n /**\n * Installs this reporter if this is a Browser environment and the report api has been provided as a query\n * parameter.\n * @param searchParam\n */\n static installFromSearchParam(searchParam: string = 'reportApi') {\n if (typeof location === 'undefined') return\n const url = new URL('about:blank')\n url.search = location.search\n // Uses `URL.searchParams` over `new URLSearchParams`; URLSearchParams constructor is not\n // as widely supported.\n const reportApi = url.searchParams.get(searchParam)\n if (reportApi) {\n jasmine.getEnv().addReporter(new RestApiReporter(reportApi))\n initializeUncaughtErrorLogging()\n }\n }\n\n constructor(private readonly reportApi: string) {\n super()\n }\n\n protected onStarted(action: LogReporterStartedEvent): Promise<void> {\n return this.doRequest('started', action)\n }\n\n protected onProgress(action: LogReporterProgressEvent): Promise<void> {\n return this.doRequest('progress', {\n totalCompleted: action.totalCompleted,\n totalSpecs: action.totalSpecs,\n logs: action.logs.map((logEntry) => [\n stringifyLogLevel(logEntry.level),\n logEntry.timestamp.toISOString(),\n logArgsToStr(logEntry.messages),\n ]),\n })\n }\n\n protected onDone(action: LogReporterDoneEvent): Promise<void> {\n return this.doRequest('done', action)\n }\n\n /**\n * If the reportApi url was set in the URL parameters, report to that URL the test progress.\n *\n * @param action One of: 'started', 'progress', or 'done'\n * @param body\n * @private\n */\n private async doRequest(\n action: 'started' | 'progress' | 'done',\n body: any\n ): Promise<void> {\n if (!this.reportApi) return\n const response = await fetch(`${this.reportApi}/${action}`, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify(body),\n })\n if (!response.ok)\n throw new Error(`${response.status} Error: ${response.statusText}`)\n return await response.json()\n }\n}\n\n/**\n * Converts the arguments to console logging to a string.\n * @param args\n */\nfunction logArgsToStr(args: readonly any[]): string {\n return args\n .map((arg) => {\n if (arg != null && typeof arg === 'object') {\n try {\n return JSON.stringify(arg)\n } catch (_) {\n return String(arg)\n }\n } else {\n return String(arg)\n }\n })\n .join(' ')\n}\n", "/*\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport type { PatchedRef } from '@amazon/vinyl-util'\nimport { expectNothing } from '@amazon/vinyl-util/browserTestUtil'\n\nexport interface PatchTestOptions<T> {\n /**\n * True if the patch is enabled by default.\n */\n actualFlag: boolean | undefined\n\n /**\n * The target, not patched.\n */\n target: T\n\n /**\n * The patched target.\n */\n patchedRef: PatchedRef<T>\n\n /**\n * Runs the scenario to reproduce the issue on the target.\n * @param target\n */\n canReproduce: (target: T) => Promise<boolean>\n\n /**\n * If true and the tested flag is true but the issue cannot be reproduced, then only a\n * warning is logged, if false, then the test will be marked as a failure.\n */\n allowFalseNegative: boolean\n}\n\n/**\n * Adds tests to ensure that a patch flag is enabled when the issue can be reproduced for the UA,\n * and when the patch is applied the issue is no longer reproducible.\n *\n * @param flagName The flag name, used in test descriptions.\n * @param description The condition which requires the patch to be enabled.\n * @param optionsProvider\n */\nexport function addPatchTests<T>(\n flagName: string,\n description: string,\n optionsProvider: () => PatchTestOptions<T>\n) {\n let options: PatchTestOptions<T>\n\n beforeEach(() => {\n options = optionsProvider()\n })\n\n afterEach(() => {\n // null safety check required, if test is skipped, beforeEach is not called but\n // afterEach is.\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n options?.patchedRef.dispose()\n })\n\n it('sets the default flag to true only if the issue can be reproduced', async () => {\n const canReproduce = await options.canReproduce(options.target)\n if (canReproduce) {\n if (!options.actualFlag)\n fail(`expected patch flag '${flagName}' to be true`)\n } else {\n if (options.actualFlag) {\n // The flag was true but the issue could not be reproduced.\n // Most issues being patched cannot be reproduced with 100% reliability.\n // Allow reproduction misses to be merely a warning instead of failing the test.\n const message = `flag '${flagName}' was true but issue not reproduced`\n if (options.allowFalseNegative) console.warn(message)\n else fail(message)\n }\n }\n expectNothing()\n })\n\n describe(`when the ${flagName} is true`, () => {\n it(description, async () => {\n if (options.actualFlag) {\n if (await options.canReproduce(options.patchedRef.patched))\n fail('patch did not resolve issue')\n }\n expectNothing()\n })\n })\n}\n", "/*\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * A wrapper to jasmine spyOnProperty for property getters that will define property\n * if it doesn't exist.\n */\nexport function spyOnPropertySafe<\n T extends object,\n K extends keyof T = keyof T,\n>(object: T, property: K): jasmine.Spy<(this: T) => T[K]> {\n if (!(property in object)) {\n // Object does not have property attempting to be mocked\n // define it (with an undefined value) to allow spyOnProperty to succeed.\n Object.defineProperty(object, property, {\n configurable: true,\n enumerable: true,\n get: () => undefined,\n })\n }\n return spyOnProperty(object, property, 'get')\n}\n", "/*\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { createSpyFactory } from '@amazon/vinyl-util/browserTestUtil'\nimport type { KeyValuePersistence } from '@amazon/vinyl-util'\n\nexport class MockPersistence<T = any> implements KeyValuePersistence<T> {\n private readonly spyFactory = createSpyFactory<KeyValuePersistence<T>>()\n\n clear = this.spyFactory('clear')\n\n get = this.spyFactory('get')\n\n remove = this.spyFactory('remove')\n\n set = this.spyFactory('set')\n}\n", "/*\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\n//-------------------------------------------------------------\n// Empty FetchCompletedInfo objects for tests.\n//-------------------------------------------------------------\n\nimport {\n ErrorBodyType,\n type FetchRequestInfo,\n type RequestAttemptInfo,\n type RequestCaughtErrorEvent,\n type RequestNetworkErrorEvent,\n type RequestResponseErrorEvent,\n type RequestSuccessEvent,\n type ResponseInfo,\n} from '@amazon/vinyl-util'\nimport { RequestFailureType } from '@amazon/vinyl-util'\n\nexport const emptyRequestInfo: FetchRequestInfo = {\n requestId: '',\n requestOptions: { readErrorBody: ErrorBodyType.DISABLED, serviceId: null },\n init: {},\n input: '',\n maxRetries: 0,\n timestamp: 0,\n}\n\nexport const emptyRequestAttemptInfo: RequestAttemptInfo = {\n currentTry: 0,\n timestamp: 0,\n}\n\nexport const emptyResponseInfo: ResponseInfo = {\n ok: false,\n redirected: false,\n status: 0,\n statusText: '',\n type: 'default',\n url: '',\n contentLength: 0,\n}\n\nexport const emptyRequestSuccessEvent: RequestSuccessEvent = {\n ok: true,\n requestInfo: emptyRequestInfo,\n timestamp: 0,\n attemptInfo: emptyRequestAttemptInfo,\n responseInfo: emptyResponseInfo,\n}\n\nexport const emptyInternalError: RequestCaughtErrorEvent = {\n ok: false,\n reason: null,\n requestInfo: emptyRequestInfo,\n retryAfter: null,\n timestamp: 0,\n type: RequestFailureType.INTERNAL,\n willRetry: false,\n}\n\nexport const emptyNetworkError: RequestNetworkErrorEvent = {\n ok: false,\n reason: null,\n requestInfo: emptyRequestInfo,\n retryAfter: null,\n timestamp: 0,\n type: RequestFailureType.NETWORK,\n willRetry: false,\n attemptInfo: emptyRequestAttemptInfo,\n}\n\nexport const emptyResponseError: RequestResponseErrorEvent = {\n ok: false,\n reason: null,\n requestInfo: emptyRequestInfo,\n retryAfter: null,\n timestamp: 0,\n type: RequestFailureType.RESPONSE,\n willRetry: false,\n attemptInfo: emptyRequestAttemptInfo,\n responseInfo: emptyResponseInfo,\n}\n\nexport const emptyAbortError: RequestCaughtErrorEvent = {\n ...emptyInternalError,\n type: RequestFailureType.ABORT,\n}\n", "/*\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport type { Requester, RequesterImplEventMap } from '@amazon/vinyl-util'\nimport { createSpyFactory } from '@amazon/vinyl-util/browserTestUtil'\nimport { MockEventHost } from '../event/MockEventHost'\n\nconst spyFactory = createSpyFactory<Requester>()\nexport class MockRequester\n extends MockEventHost<RequesterImplEventMap>\n implements Requester\n{\n request = spyFactory('request')\n}\n", "/*\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { EventHostImpl } from '@amazon/vinyl-util'\nimport type { SpyFactory } from '@amazon/vinyl-util/browserTestUtil'\nimport { createSpyFactory } from '@amazon/vinyl-util/browserTestUtil'\n\n/**\n * MockEventHost creates spies with pass-through calls to the EventHost implementation.\n * While this is not a true mock, events become easier to test when using a real event dispatcher.\n */\nexport class MockEventHost<EventMap = any> extends EventHostImpl<EventMap> {\n private readonly spyFactory: SpyFactory<EventHostImpl<EventMap>> =\n createSpyFactory((key) => {\n return super[key].bind(this)\n })\n\n logPrefix = 'MockEventHost'\n hasAnyListeners = this.spyFactory('hasAnyListeners')\n hasListeners = this.spyFactory('hasListeners')\n dispatch = this.spyFactory('dispatch')\n on = this.spyFactory('on')\n dispose = this.spyFactory('dispose')\n}\n", "/*\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport type { NetworkState, NetworkStateEventMap } from '@amazon/vinyl-util'\nimport { createSpyFactory } from '@amazon/vinyl-util/browserTestUtil'\nimport { MockEventHost } from '../event/MockEventHost'\n\nconst spyFactory = createSpyFactory<NetworkState>()\nexport class MockNetworkState\n extends MockEventHost<NetworkStateEventMap>\n implements NetworkState\n{\n onLine = false\n\n nextOnLine = spyFactory('nextOnLine')\n}\n", "/*\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport type {\n NetworkMetrics,\n NetworkMetricsController,\n NetworkMetricsEventMap,\n} from '@amazon/vinyl-util'\nimport { EMPTY_NETWORK_METRICS } from '@amazon/vinyl-util'\nimport { createSpyFactory } from '@amazon/vinyl-util/browserTestUtil'\n\nimport { MockEventHost } from '../event/MockEventHost'\n\nconst spyFactory = createSpyFactory<NetworkMetricsController>()\nexport class MockNetworkMetricsController\n extends MockEventHost<NetworkMetricsEventMap>\n implements NetworkMetricsController\n{\n maxHistorySize = 0\n\n metrics: NetworkMetrics = EMPTY_NETWORK_METRICS\n\n addMetricsEntry = spyFactory('addMetricsEntry')\n\n getServiceMetrics = spyFactory('getServiceMetrics')\n\n addDownlinkTransferEntry = spyFactory('addDownlinkTransferEntry')\n}\n", "/*\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport type {\n NetworkInformation,\n NetworkInformationEffectiveType,\n NetworkInformationType,\n} from '@amazon/vinyl-util'\nimport { MockEventTarget } from '@amazon/vinyl-util/browserTestUtil'\n\nexport class MockNetworkInformation\n extends MockEventTarget\n implements NetworkInformation\n{\n downlink: number | undefined = undefined\n effectiveType: NetworkInformationEffectiveType = '4g'\n rtt = 0\n saveData = false\n type?: NetworkInformationType = undefined\n}\n", "/*\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { MockNavigator } from '@amazon/vinyl-util/browserTestUtil'\nimport { spyOnPropertySafe } from '../util/spyOnPropertySafe'\n\n/**\n * Sets the global navigator to a Mock\n * Returns the new MockNavigator instance.\n */\nexport function setMockNavigator(): MockNavigator {\n const navigator = new MockNavigator()\n spyOnPropertySafe(global, 'navigator').and.returnValue(navigator)\n return navigator\n}\n", "/*\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport type { LogEventMap, Logger, LogTarget } from '@amazon/vinyl-util'\nimport { loggerRef, LogLevel } from '@amazon/vinyl-util'\nimport { createSpyFactory } from '@amazon/vinyl-util/browserTestUtil'\nimport { overrideGlobalInit } from '../../global/overrideGlobalInit'\nimport { MockEventHost } from '../event/MockEventHost'\nimport createSpy = jasmine.createSpy\n\ntype LogFilterFun = (target: LogTarget, ...messages: any[]) => void\n\nconst spyFactory = createSpyFactory<Logger>()\nexport class MockLogger extends MockEventHost<LogEventMap> implements Logger {\n logLevel: LogLevel = LogLevel.DEBUG\n\n log = spyFactory('log').and.callFake((target, level, ...messages) => {\n switch (level) {\n // Delegates logs to spies separated by log level.\n case LogLevel.VERBOSE:\n this.verbose(target, ...messages)\n break\n case LogLevel.DEBUG:\n this.debug(target, ...messages)\n break\n case LogLevel.INFO:\n this.info(target, ...messages)\n break\n case LogLevel.WARN:\n this.warn(target, ...messages)\n break\n case LogLevel.ERROR:\n this.error(target, ...messages)\n break\n }\n })\n\n verbose = createSpy<LogFilterFun>('verbose')\n debug = createSpy<LogFilterFun>('debug')\n info = createSpy<LogFilterFun>('info')\n warn = createSpy<LogFilterFun>('warn')\n error = createSpy<LogFilterFun>('error')\n}\n\nexport function useMockLogger(): { readonly value: MockLogger } {\n return overrideGlobalInit(loggerRef, () => new MockLogger())\n}\n", "/*\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport type { GlobalRef } from '@amazon/vinyl-util'\n\nexport function overrideGlobalInit<T, U extends T>(\n initHandle: GlobalRef<T>,\n initOverride: () => U\n): { readonly value: U } {\n beforeEach(() => {\n initHandle.set(initOverride)\n })\n return initHandle as GlobalRef<U>\n}\n", "/*\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport type { LogTarget } from '@amazon/vinyl-util'\n\nexport const emptyLogTarget: LogTarget = {\n logPrefix: 'path',\n}\n", "/*\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport type { CodeRange } from '@amazon/vinyl-util'\nimport { parseStackLocation } from '@amazon/vinyl-util'\nimport type { MockEventTarget } from '@amazon/vinyl-util/browserTestUtil'\nimport {\n MockErrorEvent,\n MockPromiseRejectionEvent,\n} from '@amazon/vinyl-util/browserTestUtil'\n\n/**\n * Creates a code range object surrounding the given error.\n */\nexport function createRangeSurrounding(error: Error): CodeRange {\n const location = parseStackLocation(error.stack)\n if (!location) {\n pending('Cannot parse stacks in this environment.')\n return { start: null, end: null }\n }\n return {\n start: {\n source: location.source,\n file: location.file,\n row: location.row,\n col: (location.col ?? 0) - 1,\n },\n end: {\n source: location.source,\n file: location.file,\n row: location.row,\n col: (location.col ?? 0) + 1,\n },\n }\n}\n\n/**\n * Simulates an uncaught error event.\n */\nexport function throwMockError(target: MockEventTarget, error: any) {\n expect(target.removeEventListener).not.toHaveBeenCalled()\n const event = new MockErrorEvent()\n event.type = 'error'\n event.error = error\n target.dispatchEvent(event)\n}\n\n/**\n * Simulates an unhandled rejection to be caught by the global unhandled promise handler.\n */\nexport function rejectMockPromise(target: MockEventTarget, reason: any) {\n expect(target.removeEventListener).not.toHaveBeenCalled()\n // Not all environments can construct `PromiseRejectionEvent`\n const event = new MockPromiseRejectionEvent()\n event.type = 'unhandledrejection'\n event.reason = reason\n event.promise = Promise.reject(reason as Error).catch(() => void 0)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AW,MAAM,IAAI,WAAW,CAAC;AAC/D;;;AEzCO,IAAM,iBAA4B;AAAA,EACrC,WAAW;AACf;;;ACHA,SAAS,0BAA0B;AAEnC;AAAA,EACI;AAAA,EACA;AAAA,OACG;AAKA,SAAS,uBAAuB,OAAyB;AAhBhE;AAiBI,QAAMI,YAAW,mBAAmB,MAAM,KAAK;AAC/C,MAAI,CAACA,WAAU;AACX,YAAQ,0CAA0C;AAClD,WAAO,EAAE,OAAO,MAAM,KAAK,KAAK;AAAA,EACpC;AACA,SAAO;AAAA,IACH,OAAO;AAAA,MACH,QAAQA,UAAS;AAAA,MACjB,MAAMA,UAAS;AAAA,MACf,KAAKA,UAAS;AAAA,MACd,OAAM,KAAAA,UAAS,QAAT,YAAgB,KAAK;AAAA,IAC/B;AAAA,IACA,KAAK;AAAA,MACD,QAAQA,UAAS;AAAA,MACjB,MAAMA,UAAS;AAAA,MACf,KAAKA,UAAS;AAAA,MACd,OAAM,KAAAA,UAAS,QAAT,YAAgB,KAAK;AAAA,IAC/B;AAAA,EACJ;AACJ;AAKO,SAAS,eAAe,QAAyB,OAAY;AAChE,SAAO,OAAO,mBAAmB,EAAE,IAAI,iBAAiB;AACxD,QAAM,QAAQ,IAAI,eAAe;AACjC,QAAM,OAAO;AACb,QAAM,QAAQ;AACd,SAAO,cAAc,KAAK;AAC9B;AAKO,SAAS,kBAAkB,QAAyB,QAAa;AACpE,SAAO,OAAO,mBAAmB,EAAE,IAAI,iBAAiB;AAExD,QAAM,QAAQ,IAAI,0BAA0B;AAC5C,QAAM,OAAO;AACb,QAAM,SAAS;AACf,QAAM,UAAU,QAAQ,OAAO,MAAe,EAAE,MAAM,MAAM,MAAM;AAClE,SAAO,cAAc,KAAK;AAC9B;",
6
6
  "names": ["createSpyFactory", "createSpyFactory", "createSpyFactory", "createSpyFactory", "createSpyFactory", "spyFactory", "createSpyFactory", "createSpyFactory", "spyFactory", "createSpyFactory", "LogLevel", "createSpyFactory", "createSpy", "spyFactory", "createSpyFactory", "LogLevel", "location"]
7
7
  }
@@ -1,6 +1,6 @@
1
1
  import type { LogEventMap, Logger, LogTarget } from '@amazon/vinyl-util';
2
2
  import { LogLevel } from '@amazon/vinyl-util';
3
- import { MockEventHost } from '../../mock/event/MockEventHost';
3
+ import { MockEventHost } from '../event/MockEventHost';
4
4
  type LogFilterFun = (target: LogTarget, ...messages: any[]) => void;
5
5
  export declare class MockLogger extends MockEventHost<LogEventMap> implements Logger {
6
6
  logLevel: LogLevel;
@@ -1 +1 @@
1
- {"version":3,"file":"MockLogger.d.ts","sourceRoot":"","sources":["../../../../../../test/testUtil/mock/logging/MockLogger.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AACxE,OAAO,EAAa,QAAQ,EAAE,MAAM,oBAAoB,CAAA;AAGxD,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAG1D,KAAK,YAAY,GAAG,CAAC,MAAM,EAAE,SAAS,EAAE,GAAG,QAAQ,EAAE,GAAG,EAAE,KAAK,IAAI,CAAA;AAGnE,qBAAa,UAAW,SAAQ,aAAa,CAAC,WAAW,CAAE,YAAW,MAAM;IACxE,QAAQ,EAAE,QAAQ,CAAiB;IAEnC,GAAG,yFAmBD;IAEF,OAAO,4BAAqC;IAC5C,KAAK,4BAAmC;IACxC,IAAI,4BAAkC;IACtC,IAAI,4BAAkC;IACtC,KAAK,4BAAmC;CAC3C;AAED,wBAAgB,aAAa,IAAI;IAAE,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAA;CAAE,CAE9D"}
1
+ {"version":3,"file":"MockLogger.d.ts","sourceRoot":"","sources":["../../../../../../test/testUtil/mock/logging/MockLogger.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AACxE,OAAO,EAAa,QAAQ,EAAE,MAAM,oBAAoB,CAAA;AAGxD,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAA;AAGtD,KAAK,YAAY,GAAG,CAAC,MAAM,EAAE,SAAS,EAAE,GAAG,QAAQ,EAAE,GAAG,EAAE,KAAK,IAAI,CAAA;AAGnE,qBAAa,UAAW,SAAQ,aAAa,CAAC,WAAW,CAAE,YAAW,MAAM;IACxE,QAAQ,EAAE,QAAQ,CAAiB;IAEnC,GAAG,yFAmBD;IAEF,OAAO,4BAAqC;IAC5C,KAAK,4BAAmC;IACxC,IAAI,4BAAkC;IACtC,IAAI,4BAAkC;IACtC,KAAK,4BAAmC;CAC3C;AAED,wBAAgB,aAAa,IAAI;IAAE,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAA;CAAE,CAE9D"}
@@ -5,7 +5,7 @@
5
5
  import { loggerRef, LogLevel } from '@amazon/vinyl-util';
6
6
  import { createSpyFactory } from '@amazon/vinyl-util/browserTestUtil';
7
7
  import { overrideGlobalInit } from '../../global/overrideGlobalInit';
8
- import { MockEventHost } from '../../mock/event/MockEventHost';
8
+ import { MockEventHost } from '../event/MockEventHost';
9
9
  var createSpy = jasmine.createSpy;
10
10
  const spyFactory = createSpyFactory();
11
11
  export class MockLogger extends MockEventHost {
@@ -3,7 +3,7 @@
3
3
  * SPDX-License-Identifier: Apache-2.0
4
4
  */
5
5
  import { MockNavigator } from '@amazon/vinyl-util/browserTestUtil';
6
- import { spyOnPropertySafe } from '../../mock/util/spyOnPropertySafe';
6
+ import { spyOnPropertySafe } from '../util/spyOnPropertySafe';
7
7
  /**
8
8
  * Sets the global navigator to a Mock
9
9
  * Returns the new MockNavigator instance.
@@ -1,5 +1,5 @@
1
1
  import type { NetworkMetrics, NetworkMetricsController, NetworkMetricsEventMap } from '@amazon/vinyl-util';
2
- import { MockEventHost } from '../../mock/event/MockEventHost';
2
+ import { MockEventHost } from '../event/MockEventHost';
3
3
  export declare class MockNetworkMetricsController extends MockEventHost<NetworkMetricsEventMap> implements NetworkMetricsController {
4
4
  maxHistorySize: number;
5
5
  metrics: NetworkMetrics;
@@ -1 +1 @@
1
- {"version":3,"file":"MockNetworkMetricsController.d.ts","sourceRoot":"","sources":["../../../../../../test/testUtil/mock/network/MockNetworkMetricsController.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EACR,cAAc,EACd,wBAAwB,EACxB,sBAAsB,EACzB,MAAM,oBAAoB,CAAA;AAI3B,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAG1D,qBAAa,4BACT,SAAQ,aAAa,CAAC,sBAAsB,CAC5C,YAAW,wBAAwB;IAEnC,cAAc,SAAI;IAElB,OAAO,EAAE,cAAc,CAAwB;IAE/C,eAAe,uHAAgC;IAE/C,iBAAiB,iOAAkC;IAEnD,wBAAwB,wHAAyC;CACpE"}
1
+ {"version":3,"file":"MockNetworkMetricsController.d.ts","sourceRoot":"","sources":["../../../../../../test/testUtil/mock/network/MockNetworkMetricsController.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EACR,cAAc,EACd,wBAAwB,EACxB,sBAAsB,EACzB,MAAM,oBAAoB,CAAA;AAI3B,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAA;AAGtD,qBAAa,4BACT,SAAQ,aAAa,CAAC,sBAAsB,CAC5C,YAAW,wBAAwB;IAEnC,cAAc,SAAI;IAElB,OAAO,EAAE,cAAc,CAAwB;IAE/C,eAAe,uHAAgC;IAE/C,iBAAiB,iOAAkC;IAEnD,wBAAwB,wHAAyC;CACpE"}
@@ -4,7 +4,7 @@
4
4
  */
5
5
  import { EMPTY_NETWORK_METRICS } from '@amazon/vinyl-util';
6
6
  import { createSpyFactory } from '@amazon/vinyl-util/browserTestUtil';
7
- import { MockEventHost } from '../../mock/event/MockEventHost';
7
+ import { MockEventHost } from '../event/MockEventHost';
8
8
  const spyFactory = createSpyFactory();
9
9
  export class MockNetworkMetricsController extends MockEventHost {
10
10
  maxHistorySize = 0;
@@ -1,5 +1,5 @@
1
1
  import type { NetworkState, NetworkStateEventMap } from '@amazon/vinyl-util';
2
- import { MockEventHost } from '../../mock/event/MockEventHost';
2
+ import { MockEventHost } from '../event/MockEventHost';
3
3
  export declare class MockNetworkState extends MockEventHost<NetworkStateEventMap> implements NetworkState {
4
4
  onLine: boolean;
5
5
  nextOnLine: import("@amazon/vinyl-util/browserTestUtil").Spy2<((abort?: import("@amazon/vinyl-util").Maybe<import("@amazon/vinyl-util").ReadonlyAbort>) => Promise<void>) & ((abort?: import("@amazon/vinyl-util").Maybe<import("@amazon/vinyl-util").ReadonlyAbort>) => any)>;
@@ -1 +1 @@
1
- {"version":3,"file":"MockNetworkState.d.ts","sourceRoot":"","sources":["../../../../../../test/testUtil/mock/network/MockNetworkState.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAA;AAE5E,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAG1D,qBAAa,gBACT,SAAQ,aAAa,CAAC,oBAAoB,CAC1C,YAAW,YAAY;IAEvB,MAAM,UAAQ;IAEd,UAAU,qQAA2B;CACxC"}
1
+ {"version":3,"file":"MockNetworkState.d.ts","sourceRoot":"","sources":["../../../../../../test/testUtil/mock/network/MockNetworkState.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAA;AAE5E,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAA;AAGtD,qBAAa,gBACT,SAAQ,aAAa,CAAC,oBAAoB,CAC1C,YAAW,YAAY;IAEvB,MAAM,UAAQ;IAEd,UAAU,qQAA2B;CACxC"}
@@ -3,7 +3,7 @@
3
3
  * SPDX-License-Identifier: Apache-2.0
4
4
  */
5
5
  import { createSpyFactory } from '@amazon/vinyl-util/browserTestUtil';
6
- import { MockEventHost } from '../../mock/event/MockEventHost';
6
+ import { MockEventHost } from '../event/MockEventHost';
7
7
  const spyFactory = createSpyFactory();
8
8
  export class MockNetworkState extends MockEventHost {
9
9
  onLine = false;
@@ -1,5 +1,5 @@
1
1
  import type { Requester, RequesterImplEventMap } from '@amazon/vinyl-util';
2
- import { MockEventHost } from '../../mock/event/MockEventHost';
2
+ import { MockEventHost } from '../event/MockEventHost';
3
3
  export declare class MockRequester extends MockEventHost<RequesterImplEventMap> implements Requester {
4
4
  request: import("@amazon/vinyl-util/browserTestUtil").Spy2<((input: RequestInfo | Readonly<URL>, init?: import("@amazon/vinyl-util").Maybe<import("@amazon/vinyl-util").RequestInitOptions>, requestOptions?: import("@amazon/vinyl-util").Maybe<import("@amazon/vinyl-util").RequestOptions>) => Promise<Response>) & ((input: RequestInfo | Readonly<URL>, init?: import("@amazon/vinyl-util").Maybe<Readonly<Omit<RequestInit, "signal">>>, requestOptions?: import("@amazon/vinyl-util").Maybe<import("@amazon/vinyl-util").RequestOptions>) => any)>;
5
5
  }
@@ -1 +1 @@
1
- {"version":3,"file":"MockRequester.d.ts","sourceRoot":"","sources":["../../../../../../test/testUtil/mock/network/MockRequester.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,SAAS,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAA;AAE1E,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAG1D,qBAAa,aACT,SAAQ,aAAa,CAAC,qBAAqB,CAC3C,YAAW,SAAS;IAEpB,OAAO,mhBAAwB;CAClC"}
1
+ {"version":3,"file":"MockRequester.d.ts","sourceRoot":"","sources":["../../../../../../test/testUtil/mock/network/MockRequester.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,SAAS,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAA;AAE1E,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAA;AAGtD,qBAAa,aACT,SAAQ,aAAa,CAAC,qBAAqB,CAC3C,YAAW,SAAS;IAEpB,OAAO,mhBAAwB;CAClC"}
@@ -3,7 +3,7 @@
3
3
  * SPDX-License-Identifier: Apache-2.0
4
4
  */
5
5
  import { createSpyFactory } from '@amazon/vinyl-util/browserTestUtil';
6
- import { MockEventHost } from '../../mock/event/MockEventHost';
6
+ import { MockEventHost } from '../event/MockEventHost';
7
7
  const spyFactory = createSpyFactory();
8
8
  export class MockRequester extends MockEventHost {
9
9
  request = spyFactory('request');
@@ -1,4 +1,4 @@
1
- import { type LogReporterProgressEvent, LogReporter, type LogReporterDoneEvent, type LogReporterStartedEvent } from '../reporters/LogReporter';
1
+ import { type LogReporterProgressEvent, LogReporter, type LogReporterDoneEvent, type LogReporterStartedEvent } from './LogReporter';
2
2
  export declare class RestApiReporter extends LogReporter {
3
3
  private readonly reportApi;
4
4
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"RestApiReporter.d.ts","sourceRoot":"","sources":["../../../../../test/testUtil/reporters/RestApiReporter.ts"],"names":[],"mappings":"AAKA,OAAO,EACH,KAAK,wBAAwB,EAC7B,WAAW,EACX,KAAK,oBAAoB,EACzB,KAAK,uBAAuB,EAC/B,MAAM,yBAAyB,CAAA;AAIhC,qBAAa,eAAgB,SAAQ,WAAW;IAmBhC,OAAO,CAAC,QAAQ,CAAC,SAAS;IAlBtC;;;;OAIG;IACH,MAAM,CAAC,sBAAsB,CAAC,WAAW,GAAE,MAAoB;gBAalC,SAAS,EAAE,MAAM;IAI9C,SAAS,CAAC,SAAS,CAAC,MAAM,EAAE,uBAAuB,GAAG,OAAO,CAAC,IAAI,CAAC;IAInE,SAAS,CAAC,UAAU,CAAC,MAAM,EAAE,wBAAwB,GAAG,OAAO,CAAC,IAAI,CAAC;IAYrE,SAAS,CAAC,MAAM,CAAC,MAAM,EAAE,oBAAoB,GAAG,OAAO,CAAC,IAAI,CAAC;IAI7D;;;;;;OAMG;YACW,SAAS;CAgB1B"}
1
+ {"version":3,"file":"RestApiReporter.d.ts","sourceRoot":"","sources":["../../../../../test/testUtil/reporters/RestApiReporter.ts"],"names":[],"mappings":"AAKA,OAAO,EACH,KAAK,wBAAwB,EAC7B,WAAW,EACX,KAAK,oBAAoB,EACzB,KAAK,uBAAuB,EAC/B,MAAM,eAAe,CAAA;AAItB,qBAAa,eAAgB,SAAQ,WAAW;IAmBhC,OAAO,CAAC,QAAQ,CAAC,SAAS;IAlBtC;;;;OAIG;IACH,MAAM,CAAC,sBAAsB,CAAC,WAAW,GAAE,MAAoB;gBAalC,SAAS,EAAE,MAAM;IAI9C,SAAS,CAAC,SAAS,CAAC,MAAM,EAAE,uBAAuB,GAAG,OAAO,CAAC,IAAI,CAAC;IAInE,SAAS,CAAC,UAAU,CAAC,MAAM,EAAE,wBAAwB,GAAG,OAAO,CAAC,IAAI,CAAC;IAYrE,SAAS,CAAC,MAAM,CAAC,MAAM,EAAE,oBAAoB,GAAG,OAAO,CAAC,IAAI,CAAC;IAI7D;;;;;;OAMG;YACW,SAAS;CAgB1B"}
@@ -2,7 +2,7 @@
2
2
  * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
3
  * SPDX-License-Identifier: Apache-2.0
4
4
  */
5
- import { LogReporter, } from '../reporters/LogReporter';
5
+ import { LogReporter, } from './LogReporter';
6
6
  import { initializeUncaughtErrorLogging } from '../util/initializeUncaughtErrorLogging';
7
7
  import { stringifyLogLevel } from '@amazon/vinyl-util';
8
8
  export class RestApiReporter extends LogReporter {