@hypertestco/node-sdk-v3 0.0.1-8

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 (392) hide show
  1. package/Date/DateMock.d.ts +27 -0
  2. package/Date/HtDate.d.ts +3 -0
  3. package/helpers/appCrashHandlers.d.ts +1 -0
  4. package/helpers/backendClient.d.ts +22 -0
  5. package/helpers/cliClient.d.ts +21 -0
  6. package/helpers/coverageProxy.d.ts +1 -0
  7. package/helpers/discardRequest.d.ts +2 -0
  8. package/helpers/generateMockMapForMemoryStore.d.ts +4 -0
  9. package/helpers/getRequestAttributes.d.ts +6 -0
  10. package/helpers/getRootMocks.d.ts +6 -0
  11. package/helpers/htConfigHelper.d.ts +25 -0
  12. package/helpers/htTraceExporter.d.ts +2 -0
  13. package/helpers/inMemorySpanExporter.d.ts +3 -0
  14. package/helpers/isContinuousCoverageActive.d.ts +1 -0
  15. package/helpers/isValidUuidV4.d.ts +1 -0
  16. package/helpers/killAppUnderTest.d.ts +1 -0
  17. package/helpers/markAppAsReady.d.ts +1 -0
  18. package/helpers/pingOtelCollector.d.ts +7 -0
  19. package/helpers/posthog.d.ts +2 -0
  20. package/helpers/removeUnicodeFromReplayResult.d.ts +7 -0
  21. package/helpers/requestFilter.d.ts +3 -0
  22. package/helpers/syncWaitPort.d.ts +6 -0
  23. package/helpers/synchronousHttpCall.d.ts +15 -0
  24. package/helpers/transformDbObjToReadableInputHelpers.d.ts +15 -0
  25. package/hooks/index.d.ts +140 -0
  26. package/hooks.mjs +3 -0
  27. package/htKvStore/env-proxy.d.ts +1 -0
  28. package/htKvStore/index.d.ts +6 -0
  29. package/htKvStore/kvMock.d.ts +32 -0
  30. package/index.cjs +224732 -0
  31. package/index.d.ts +52 -0
  32. package/index.mjs +232251 -0
  33. package/instrumentation/core/baseClasses/HtInstrumentationAbstract.d.ts +36 -0
  34. package/instrumentation/core/baseClasses/HtInstrumentationBase.d.ts +34 -0
  35. package/instrumentation/core/baseClasses/HtInstrumentationMockAbstract.d.ts +117 -0
  36. package/instrumentation/core/baseClasses/HtInstrumentationMockAbstractForAxiosError.d.ts +11 -0
  37. package/instrumentation/core/baseClasses/HtInstrumentationNodeModule.d.ts +9 -0
  38. package/instrumentation/core/baseClasses/HtInstrumentationNodeModuleFile.d.ts +8 -0
  39. package/instrumentation/core/baseClasses/HtServerMockAbstract.d.ts +68 -0
  40. package/instrumentation/core/constants/index.d.ts +12 -0
  41. package/instrumentation/core/helpers/createNewSpanHelper.d.ts +21 -0
  42. package/instrumentation/core/helpers/executeFnOrInitClassWithContext.d.ts +23 -0
  43. package/instrumentation/core/helpers/generateHtRequestId.d.ts +2 -0
  44. package/instrumentation/core/helpers/getContextForServerInstrumentations.d.ts +9 -0
  45. package/instrumentation/core/helpers/htMode.d.ts +6 -0
  46. package/instrumentation/core/helpers/instrumentationTestingMode.d.ts +1 -0
  47. package/instrumentation/core/helpers/memoryStore.d.ts +345 -0
  48. package/instrumentation/core/helpers/rootMockCounter.d.ts +8 -0
  49. package/instrumentation/core/helpers/selectBestMatchMockForReplayHelpers.d.ts +7 -0
  50. package/instrumentation/core/helpers/shimmer.d.ts +6 -0
  51. package/instrumentation/core/helpers/utils.d.ts +56 -0
  52. package/instrumentation/core/types/ExperimentalFlagEnums.d.ts +8 -0
  53. package/instrumentation/core/types/HtInstrumentationEnums.d.ts +37 -0
  54. package/instrumentation/core/types/HtInstrumentationModuleNames.d.ts +1 -0
  55. package/instrumentation/core/types/index.d.ts +77 -0
  56. package/instrumentation/helpers/blockRequestsHelpers.d.ts +70 -0
  57. package/instrumentation/helpers/callbackHelpers.d.ts +3 -0
  58. package/instrumentation/helpers/commitHash.d.ts +3 -0
  59. package/instrumentation/helpers/getConstitentKeysAndTypesMap.d.ts +2 -0
  60. package/instrumentation/helpers/measureContinuousCoverage.d.ts +9 -0
  61. package/instrumentation/helpers/memoryUsageLimiter.d.ts +8 -0
  62. package/instrumentation/helpers/outboundClusterPathConfigFromUsers.d.ts +14 -0
  63. package/instrumentation/helpers/samplingLogic.d.ts +112 -0
  64. package/instrumentation/helpers/setBranchName.d.ts +2 -0
  65. package/instrumentation/helpers/sqlParser.d.ts +17 -0
  66. package/instrumentation/helpers/toJSONHandlers.d.ts +7 -0
  67. package/instrumentation/helpers/utils.d.ts +10 -0
  68. package/instrumentation/index.d.ts +4 -0
  69. package/instrumentation/libraries/amqplib/instrumentation.d.ts +16 -0
  70. package/instrumentation/libraries/amqplib/mocks/AckMock.d.ts +3 -0
  71. package/instrumentation/libraries/amqplib/mocks/AmqpConsumerMock.d.ts +71 -0
  72. package/instrumentation/libraries/amqplib/mocks/AssertExchangeMock.d.ts +4 -0
  73. package/instrumentation/libraries/amqplib/mocks/AssertQueueMock.d.ts +4 -0
  74. package/instrumentation/libraries/amqplib/mocks/BindUnbindExchangeMock.d.ts +6 -0
  75. package/instrumentation/libraries/amqplib/mocks/BindUnbindQueueMock.d.ts +6 -0
  76. package/instrumentation/libraries/amqplib/mocks/CancelMock.d.ts +4 -0
  77. package/instrumentation/libraries/amqplib/mocks/CheckExchangeMock.d.ts +4 -0
  78. package/instrumentation/libraries/amqplib/mocks/CheckQueueMock.d.ts +4 -0
  79. package/instrumentation/libraries/amqplib/mocks/ConsumeMock.d.ts +4 -0
  80. package/instrumentation/libraries/amqplib/mocks/DeleteExchangeMock.d.ts +4 -0
  81. package/instrumentation/libraries/amqplib/mocks/DeleteQueueMock.d.ts +4 -0
  82. package/instrumentation/libraries/amqplib/mocks/EmptyMock.d.ts +13 -0
  83. package/instrumentation/libraries/amqplib/mocks/GetMock.d.ts +4 -0
  84. package/instrumentation/libraries/amqplib/mocks/NackAllMock.d.ts +3 -0
  85. package/instrumentation/libraries/amqplib/mocks/NackMock.d.ts +51 -0
  86. package/instrumentation/libraries/amqplib/mocks/PrefetchMock.d.ts +4 -0
  87. package/instrumentation/libraries/amqplib/mocks/PublishMock.d.ts +4 -0
  88. package/instrumentation/libraries/amqplib/mocks/PurgeQueueMock.d.ts +4 -0
  89. package/instrumentation/libraries/amqplib/mocks/RejectMock.d.ts +3 -0
  90. package/instrumentation/libraries/amqplib/mocks/SendToQueueMock.d.ts +4 -0
  91. package/instrumentation/libraries/amqplib/patchFnImports.d.ts +71 -0
  92. package/instrumentation/libraries/amqplib/replayModeHandlers.d.ts +9 -0
  93. package/instrumentation/libraries/amqplib/utils.d.ts +24 -0
  94. package/instrumentation/libraries/auth0/instrumentation.d.ts +16 -0
  95. package/instrumentation/libraries/auth0/mocks/authenticationClient/GetProfileMock.d.ts +40 -0
  96. package/instrumentation/libraries/auth0/mocks/authenticationClient/RequestChangePasswordEmailMock.d.ts +34 -0
  97. package/instrumentation/libraries/auth0/mocks/managementClient/AssignRolestoUserMock.d.ts +40 -0
  98. package/instrumentation/libraries/auth0/mocks/managementClient/CreateUserMock.d.ts +57 -0
  99. package/instrumentation/libraries/auth0/mocks/managementClient/DeleteUserMock.d.ts +32 -0
  100. package/instrumentation/libraries/auth0/mocks/managementClient/GetRoleMock.d.ts +36 -0
  101. package/instrumentation/libraries/auth0/mocks/managementClient/GetRolesMock.d.ts +40 -0
  102. package/instrumentation/libraries/auth0/mocks/managementClient/GetUserMock.d.ts +50 -0
  103. package/instrumentation/libraries/auth0/mocks/managementClient/GetUsersByEmail.d.ts +54 -0
  104. package/instrumentation/libraries/auth0/mocks/managementClient/GetUsersMock.d.ts +54 -0
  105. package/instrumentation/libraries/auth0/mocks/managementClient/RemoveRolesFromUserMock.d.ts +40 -0
  106. package/instrumentation/libraries/auth0/mocks/managementClient/UpdateUserMock.d.ts +57 -0
  107. package/instrumentation/libraries/auth0/patchFnImports.d.ts +31 -0
  108. package/instrumentation/libraries/aws-sdk/instrumentation.d.ts +12 -0
  109. package/instrumentation/libraries/aws-sdk/mocks/AwsClientMock.d.ts +28 -0
  110. package/instrumentation/libraries/aws-sdk/utils.d.ts +5 -0
  111. package/instrumentation/libraries/cassandra/instrumentation.d.ts +13 -0
  112. package/instrumentation/libraries/cassandra/utils.d.ts +10 -0
  113. package/instrumentation/libraries/couchbase/instrumentation.d.ts +37 -0
  114. package/instrumentation/libraries/couchbase/mocks/CouchbaseMock.d.ts +30 -0
  115. package/instrumentation/libraries/couchbase/utils.d.ts +1 -0
  116. package/instrumentation/libraries/date/helpers/dateInstrumentationConfigHelpers.d.ts +49 -0
  117. package/instrumentation/libraries/date/instrumentation.d.ts +8 -0
  118. package/instrumentation/libraries/elastic-search/instrumentation.d.ts +20 -0
  119. package/instrumentation/libraries/elastic-search/mocks/EsInfoMock.d.ts +32 -0
  120. package/instrumentation/libraries/elastic-search/mocks/EsTransportV7RequestMock.d.ts +51 -0
  121. package/instrumentation/libraries/elastic-search/mocks/EsTransportV8RequestMock.d.ts +51 -0
  122. package/instrumentation/libraries/elastic-search/utils.d.ts +13 -0
  123. package/instrumentation/libraries/etcd3/helpers/processBuffers.d.ts +4 -0
  124. package/instrumentation/libraries/etcd3/htFakeClasses/HtFakeCampaign.d.ts +7 -0
  125. package/instrumentation/libraries/etcd3/htFakeClasses/HtFakeElection.d.ts +13 -0
  126. package/instrumentation/libraries/etcd3/htFakeClasses/HtFakeElectionObserver.d.ts +6 -0
  127. package/instrumentation/libraries/etcd3/htFakeClasses/HtFakeWatcher.d.ts +15 -0
  128. package/instrumentation/libraries/etcd3/instrumentation.d.ts +8 -0
  129. package/instrumentation/libraries/etcd3/modules/builders/comparatorBuilder/Etcd3ComparatorBuilderMock.d.ts +107 -0
  130. package/instrumentation/libraries/etcd3/modules/builders/deleteBuilder/Etcd3DeleteBuilderExecMock.d.ts +77 -0
  131. package/instrumentation/libraries/etcd3/modules/builders/multiRangeBuilder/Etcd3MultiRangeBuilderCountMock.d.ts +56 -0
  132. package/instrumentation/libraries/etcd3/modules/builders/multiRangeBuilder/Etcd3MultiRangeBuilderExecMock.d.ts +83 -0
  133. package/instrumentation/libraries/etcd3/modules/builders/putBuilder/Etcd3PutBuilderExecMock.d.ts +74 -0
  134. package/instrumentation/libraries/etcd3/modules/builders/singleRangeBuilder/Etcd3SingleRangeBuilderExecMock.d.ts +78 -0
  135. package/instrumentation/libraries/etcd3/modules/builders/singleRangeBuilder/Etcd3SingleRangeBuilderExistsMock.d.ts +49 -0
  136. package/instrumentation/libraries/etcd3/modules/client/Etcd3ClientCloseMock.d.ts +29 -0
  137. package/instrumentation/libraries/etcd3/modules/client/Etcd3ClientElectionMock.d.ts +3 -0
  138. package/instrumentation/libraries/etcd3/modules/client/Etcd3ClientGetRolesMock.d.ts +30 -0
  139. package/instrumentation/libraries/etcd3/modules/client/Etcd3ClientGetUsersMock.d.ts +30 -0
  140. package/instrumentation/libraries/etcd3/modules/client/Etcd3ClientLeaseMock.d.ts +8 -0
  141. package/instrumentation/libraries/etcd3/modules/kvClient/Etcd3kvClientMock.d.ts +3 -0
  142. package/instrumentation/libraries/etcd3/modules/lease/Etcd3LeaseGrantMock.d.ts +3 -0
  143. package/instrumentation/libraries/etcd3/modules/lease/Etcd3LeaseKeepaliveOnceMock.d.ts +3 -0
  144. package/instrumentation/libraries/etcd3/modules/lease/Etcd3LeaseReleaseMock.d.ts +3 -0
  145. package/instrumentation/libraries/etcd3/modules/lease/Etcd3LeaseRevokeMock.d.ts +3 -0
  146. package/instrumentation/libraries/etcd3/modules/lock/Etcd3LockAcquireMock.d.ts +3 -0
  147. package/instrumentation/libraries/etcd3/modules/lock/Etcd3LockLeaseIdMock.d.ts +3 -0
  148. package/instrumentation/libraries/etcd3/modules/lock/Etcd3LockReleaseMock.d.ts +3 -0
  149. package/instrumentation/libraries/etcd3/modules/lock/Etcd3LockTtlMock.d.ts +3 -0
  150. package/instrumentation/libraries/etcd3/modules/role/Etcd3RoleAddUserMock.d.ts +31 -0
  151. package/instrumentation/libraries/etcd3/modules/role/Etcd3RoleCreateMock.d.ts +30 -0
  152. package/instrumentation/libraries/etcd3/modules/role/Etcd3RoleDeleteMock.d.ts +30 -0
  153. package/instrumentation/libraries/etcd3/modules/role/Etcd3RoleGrantMock.d.ts +66 -0
  154. package/instrumentation/libraries/etcd3/modules/role/Etcd3RolePermissionsMock.d.ts +57 -0
  155. package/instrumentation/libraries/etcd3/modules/role/Etcd3RoleRemoveUserMock.d.ts +31 -0
  156. package/instrumentation/libraries/etcd3/modules/role/Etcd3RoleRevokeMock.d.ts +66 -0
  157. package/instrumentation/libraries/etcd3/modules/transaction/Etcd3TransactionCommitMock.d.ts +28 -0
  158. package/instrumentation/libraries/etcd3/modules/transaction/Etcd3TransactionTransactMock.d.ts +3 -0
  159. package/instrumentation/libraries/etcd3/modules/user/Etcd3UserAddRoleMock.d.ts +31 -0
  160. package/instrumentation/libraries/etcd3/modules/user/Etcd3UserCreateMock.d.ts +33 -0
  161. package/instrumentation/libraries/etcd3/modules/user/Etcd3UserDeleteMock.d.ts +30 -0
  162. package/instrumentation/libraries/etcd3/modules/user/Etcd3UserRemoveRole.d.ts +31 -0
  163. package/instrumentation/libraries/etcd3/modules/user/Etcd3UserRolesMock.d.ts +32 -0
  164. package/instrumentation/libraries/etcd3/modules/user/Etcd3UserSetPasswordMock.d.ts +33 -0
  165. package/instrumentation/libraries/etcd3/modules/watchBuilder/Etcd3WatchBuilderWatcherMock.d.ts +3 -0
  166. package/instrumentation/libraries/express/instrumentation.d.ts +12 -0
  167. package/instrumentation/libraries/express/utils.d.ts +3 -0
  168. package/instrumentation/libraries/fastify/instrumentation.d.ts +8 -0
  169. package/instrumentation/libraries/graphql/instrumentation.d.ts +24 -0
  170. package/instrumentation/libraries/graphql/mocks/GraphqlClientMock.d.ts +41 -0
  171. package/instrumentation/libraries/graphql/mocks/GraphqlServerRequestMock.d.ts +30 -0
  172. package/instrumentation/libraries/graphql/utils.d.ts +64 -0
  173. package/instrumentation/libraries/grpc/instrumentation.d.ts +28 -0
  174. package/instrumentation/libraries/grpc/mocks/GetDeadlineMock.d.ts +29 -0
  175. package/instrumentation/libraries/grpc/mocks/GrpcClientMock.d.ts +42 -0
  176. package/instrumentation/libraries/grpc/mocks/GrpcServerMock.d.ts +40 -0
  177. package/instrumentation/libraries/grpc/replayModeHandlers.d.ts +8 -0
  178. package/instrumentation/libraries/grpc/utils.d.ts +33 -0
  179. package/instrumentation/libraries/http/HtHttpMockSocket.d.ts +51 -0
  180. package/instrumentation/libraries/http/HtMockClientRequest.d.ts +28 -0
  181. package/instrumentation/libraries/http/helpers/decodeBody.d.ts +1 -0
  182. package/instrumentation/libraries/http/helpers/eventPropagator.d.ts +3 -0
  183. package/instrumentation/libraries/http/helpers/getClusterPathForClientReqDuringReplay.d.ts +7 -0
  184. package/instrumentation/libraries/http/helpers/htHttpBodyParser.d.ts +34 -0
  185. package/instrumentation/libraries/http/helpers/processedInputOutputSchemaHelper.d.ts +5 -0
  186. package/instrumentation/libraries/http/httpHooks.d.ts +59 -0
  187. package/instrumentation/libraries/http/instrumentation.d.ts +24 -0
  188. package/instrumentation/libraries/http/mocks/HttpClientRequestMock.d.ts +19 -0
  189. package/instrumentation/libraries/http/mocks/HttpServerRequestMock.d.ts +47 -0
  190. package/instrumentation/libraries/http/utils.d.ts +52 -0
  191. package/instrumentation/libraries/ioredis/instrumentation.d.ts +11 -0
  192. package/instrumentation/libraries/ioredis/mocks/IORedisClusterMock.d.ts +42 -0
  193. package/instrumentation/libraries/ioredis/mocks/IORedisMock.d.ts +42 -0
  194. package/instrumentation/libraries/ioredis/mocks/IORedisPipelineExecMock.d.ts +43 -0
  195. package/instrumentation/libraries/ioredis/patchFnImports.d.ts +11 -0
  196. package/instrumentation/libraries/jsonwebtoken/instrumentation.d.ts +13 -0
  197. package/instrumentation/libraries/jsonwebtoken/mocks/JwtVerifyMock.d.ts +27 -0
  198. package/instrumentation/libraries/kafka/instrumentation.d.ts +68 -0
  199. package/instrumentation/libraries/kafka/mocks/KafkaClientMock.d.ts +29 -0
  200. package/instrumentation/libraries/kafka/mocks/KafkaSendBatchMock.d.ts +55 -0
  201. package/instrumentation/libraries/kafka/mocks/KafkaSendMock.d.ts +51 -0
  202. package/instrumentation/libraries/kafka/mocks/KafkaServerMock.d.ts +35 -0
  203. package/instrumentation/libraries/kafka/replayModeHandlers.d.ts +18 -0
  204. package/instrumentation/libraries/kafka/utils.d.ts +30 -0
  205. package/instrumentation/libraries/mongodb/instrumentation.d.ts +8 -0
  206. package/instrumentation/libraries/mongodb/modules/admin/MongoDbAdminAddUserMock.d.ts +45 -0
  207. package/instrumentation/libraries/mongodb/modules/admin/MongoDbAdminCommandMock.d.ts +48 -0
  208. package/instrumentation/libraries/mongodb/modules/admin/MongoDbAdminListDatabasesMock.d.ts +51 -0
  209. package/instrumentation/libraries/mongodb/modules/admin/MongoDbAdminPingMock.d.ts +42 -0
  210. package/instrumentation/libraries/mongodb/modules/admin/MongoDbAdminRemoveUserMock.d.ts +45 -0
  211. package/instrumentation/libraries/mongodb/modules/admin/MongoDbAdminReplGetSetStatusMock.d.ts +42 -0
  212. package/instrumentation/libraries/mongodb/modules/admin/MongoDbAdminServerInfoMock.d.ts +42 -0
  213. package/instrumentation/libraries/mongodb/modules/admin/MongoDbAdminServerStatusMock.d.ts +42 -0
  214. package/instrumentation/libraries/mongodb/modules/admin/MongoDbAdminValidateCollectionMock.d.ts +46 -0
  215. package/instrumentation/libraries/mongodb/modules/admin/MongoDbBuildInfoMock.d.ts +42 -0
  216. package/instrumentation/libraries/mongodb/modules/bulkOperation/MongoDbBulkOpExecuteMock.d.ts +56 -0
  217. package/instrumentation/libraries/mongodb/modules/client/MongoDbClientCloseMock.d.ts +33 -0
  218. package/instrumentation/libraries/mongodb/modules/client/MongoDbClientDbMock.d.ts +9 -0
  219. package/instrumentation/libraries/mongodb/modules/client/MongoDbClientStartSessionPatch.d.ts +16 -0
  220. package/instrumentation/libraries/mongodb/modules/client/MongoDbConnectMock.d.ts +7 -0
  221. package/instrumentation/libraries/mongodb/modules/clientSession/MongoDbClientSessionMock.d.ts +42 -0
  222. package/instrumentation/libraries/mongodb/modules/collection/MongoDbAggregateMock.d.ts +50 -0
  223. package/instrumentation/libraries/mongodb/modules/collection/MongoDbBulkOpMock.d.ts +9 -0
  224. package/instrumentation/libraries/mongodb/modules/collection/MongoDbBulkWriteMock.d.ts +53 -0
  225. package/instrumentation/libraries/mongodb/modules/collection/MongoDbCountDocumentsMock.d.ts +52 -0
  226. package/instrumentation/libraries/mongodb/modules/collection/MongoDbDeleteMock.d.ts +53 -0
  227. package/instrumentation/libraries/mongodb/modules/collection/MongoDbDistinctMock.d.ts +56 -0
  228. package/instrumentation/libraries/mongodb/modules/collection/MongoDbDropAllIndexesMock.d.ts +35 -0
  229. package/instrumentation/libraries/mongodb/modules/collection/MongoDbDropIndexMock.d.ts +51 -0
  230. package/instrumentation/libraries/mongodb/modules/collection/MongoDbDropIndexesMock.d.ts +47 -0
  231. package/instrumentation/libraries/mongodb/modules/collection/MongoDbDropMock.d.ts +46 -0
  232. package/instrumentation/libraries/mongodb/modules/collection/MongoDbDropSearchIndexMock.d.ts +41 -0
  233. package/instrumentation/libraries/mongodb/modules/collection/MongoDbEnsureIndexMock.d.ts +44 -0
  234. package/instrumentation/libraries/mongodb/modules/collection/MongoDbEstimatedDocumentCountMock.d.ts +46 -0
  235. package/instrumentation/libraries/mongodb/modules/collection/MongoDbFindAndModifyMock.d.ts +60 -0
  236. package/instrumentation/libraries/mongodb/modules/collection/MongoDbFindAndRemoveMock.d.ts +48 -0
  237. package/instrumentation/libraries/mongodb/modules/collection/MongoDbFindMock.d.ts +58 -0
  238. package/instrumentation/libraries/mongodb/modules/collection/MongoDbFindOneAndDeleteMock.d.ts +58 -0
  239. package/instrumentation/libraries/mongodb/modules/collection/MongoDbFindOneAndReplaceMock.d.ts +63 -0
  240. package/instrumentation/libraries/mongodb/modules/collection/MongoDbFindOneMock.d.ts +59 -0
  241. package/instrumentation/libraries/mongodb/modules/collection/MongoDbGeoHaystackSearchMock.d.ts +45 -0
  242. package/instrumentation/libraries/mongodb/modules/collection/MongoDbGroupMock.d.ts +56 -0
  243. package/instrumentation/libraries/mongodb/modules/collection/MongoDbIndexExistsMock.d.ts +51 -0
  244. package/instrumentation/libraries/mongodb/modules/collection/MongoDbIndexInformationMock.d.ts +48 -0
  245. package/instrumentation/libraries/mongodb/modules/collection/MongoDbIndexMock.d.ts +74 -0
  246. package/instrumentation/libraries/mongodb/modules/collection/MongoDbIndexesMock.d.ts +46 -0
  247. package/instrumentation/libraries/mongodb/modules/collection/MongoDbInsertMock.d.ts +47 -0
  248. package/instrumentation/libraries/mongodb/modules/collection/MongoDbInsertionMock.d.ts +53 -0
  249. package/instrumentation/libraries/mongodb/modules/collection/MongoDbIsCappedMock.d.ts +46 -0
  250. package/instrumentation/libraries/mongodb/modules/collection/MongoDbListIndexesMock.d.ts +47 -0
  251. package/instrumentation/libraries/mongodb/modules/collection/MongoDbListSearchIndexesMock.d.ts +43 -0
  252. package/instrumentation/libraries/mongodb/modules/collection/MongoDbMapReduceMock.d.ts +42 -0
  253. package/instrumentation/libraries/mongodb/modules/collection/MongoDbOptionsMock.d.ts +47 -0
  254. package/instrumentation/libraries/mongodb/modules/collection/MongoDbParallelCollectionScanMock.d.ts +2 -0
  255. package/instrumentation/libraries/mongodb/modules/collection/MongoDbReindexMock.d.ts +40 -0
  256. package/instrumentation/libraries/mongodb/modules/collection/MongoDbRemoveMock.d.ts +58 -0
  257. package/instrumentation/libraries/mongodb/modules/collection/MongoDbRenameMock.d.ts +50 -0
  258. package/instrumentation/libraries/mongodb/modules/collection/MongoDbReplaceOneMock.d.ts +59 -0
  259. package/instrumentation/libraries/mongodb/modules/collection/MongoDbSaveMock.d.ts +45 -0
  260. package/instrumentation/libraries/mongodb/modules/collection/MongoDbSearchIndexMock.d.ts +50 -0
  261. package/instrumentation/libraries/mongodb/modules/collection/MongoDbStatsMock.d.ts +46 -0
  262. package/instrumentation/libraries/mongodb/modules/collection/MongoDbUpdateMock.d.ts +66 -0
  263. package/instrumentation/libraries/mongodb/modules/collection/MongoDbUpdateOneOrManyMock.d.ts +59 -0
  264. package/instrumentation/libraries/mongodb/modules/collection/MongoDbUpdateSearchIndexMock.d.ts +49 -0
  265. package/instrumentation/libraries/mongodb/modules/collection/MongoDbWatchMock.d.ts +2 -0
  266. package/instrumentation/libraries/mongodb/modules/cursor/MongoDbCountMock.d.ts +41 -0
  267. package/instrumentation/libraries/mongodb/modules/cursor/MongoDbCursorMock.d.ts +25 -0
  268. package/instrumentation/libraries/mongodb/modules/cursor/MongoDbExplainMock.d.ts +35 -0
  269. package/instrumentation/libraries/mongodb/modules/db/MongoDbAddUserMock.d.ts +45 -0
  270. package/instrumentation/libraries/mongodb/modules/db/MongoDbCollectionsMock.d.ts +41 -0
  271. package/instrumentation/libraries/mongodb/modules/db/MongoDbCommandMock.d.ts +47 -0
  272. package/instrumentation/libraries/mongodb/modules/db/MongoDbCreateCollection.d.ts +45 -0
  273. package/instrumentation/libraries/mongodb/modules/db/MongoDbCreateIndexMock.d.ts +56 -0
  274. package/instrumentation/libraries/mongodb/modules/db/MongoDbDbAggregateMock.d.ts +50 -0
  275. package/instrumentation/libraries/mongodb/modules/db/MongoDbDbEnsureIndexMock.d.ts +44 -0
  276. package/instrumentation/libraries/mongodb/modules/db/MongoDbDropCollection.d.ts +45 -0
  277. package/instrumentation/libraries/mongodb/modules/db/MongoDbDropDbMock.d.ts +41 -0
  278. package/instrumentation/libraries/mongodb/modules/db/MongoDbExecuteDbAdminCommandMock.d.ts +46 -0
  279. package/instrumentation/libraries/mongodb/modules/db/MongoDbIndexInformationMock.d.ts +46 -0
  280. package/instrumentation/libraries/mongodb/modules/db/MongoDbListCollectionsMock.d.ts +50 -0
  281. package/instrumentation/libraries/mongodb/modules/db/MongoDbProfilingLevel.d.ts +40 -0
  282. package/instrumentation/libraries/mongodb/modules/db/MongoDbRemoveUserMock.d.ts +43 -0
  283. package/instrumentation/libraries/mongodb/modules/db/MongoDbRenameCollection.d.ts +48 -0
  284. package/instrumentation/libraries/mongodb/modules/db/MongoDbRunCursorCommandMock.d.ts +48 -0
  285. package/instrumentation/libraries/mongodb/modules/db/MongoDbSetProfilingLevelMock.d.ts +46 -0
  286. package/instrumentation/libraries/mongodb/modules/db/MongoDbUnrefMock.d.ts +2 -0
  287. package/instrumentation/libraries/mongodb/modules/db/MongodbStatsMock.d.ts +42 -0
  288. package/instrumentation/libraries/mongodb/modules/db/MongodbWatchMock.d.ts +2 -0
  289. package/instrumentation/libraries/mongodb/mongoHelpers/FakeBulkWriteResult.d.ts +113 -0
  290. package/instrumentation/libraries/mongodb/mongoHelpers/FakeTopology.d.ts +7 -0
  291. package/instrumentation/libraries/mongodb/mongoHelpers/fakeCursors/v3/HtFakeAggregationCursor.d.ts +28 -0
  292. package/instrumentation/libraries/mongodb/mongoHelpers/fakeCursors/v3/HtFakeChangeStream.d.ts +4 -0
  293. package/instrumentation/libraries/mongodb/mongoHelpers/fakeCursors/v3/HtFakeCommandCursor.d.ts +16 -0
  294. package/instrumentation/libraries/mongodb/mongoHelpers/fakeCursors/v3/HtFakeCoreCursor.d.ts +26 -0
  295. package/instrumentation/libraries/mongodb/mongoHelpers/fakeCursors/v3/HtFakeCursor.d.ts +30 -0
  296. package/instrumentation/libraries/mongodb/mongoHelpers/fakeCursors/v3/HtFakeFindCursor.d.ts +15 -0
  297. package/instrumentation/libraries/mongodb/mongoHelpers/fakeCursors/v4AndAbove/HtFakeAggregationCursor.d.ts +27 -0
  298. package/instrumentation/libraries/mongodb/mongoHelpers/fakeCursors/v4AndAbove/HtFakeChangeStream.d.ts +4 -0
  299. package/instrumentation/libraries/mongodb/mongoHelpers/fakeCursors/v4AndAbove/HtFakeCoreCursor.d.ts +37 -0
  300. package/instrumentation/libraries/mongodb/mongoHelpers/fakeCursors/v4AndAbove/HtFakeFindCursor.d.ts +33 -0
  301. package/instrumentation/libraries/mongodb/mongoHelpers/fakeCursors/v4AndAbove/HtFakeListCollectionsCursor.d.ts +12 -0
  302. package/instrumentation/libraries/mongodb/mongoHelpers/fakeCursors/v4AndAbove/HtFakeListIndexesCursor.d.ts +12 -0
  303. package/instrumentation/libraries/mongodb/mongoHelpers/fakeCursors/v4AndAbove/HtFakeRunCommandCursor.d.ts +24 -0
  304. package/instrumentation/libraries/mongodb/mongoHelpers/fakeCursors/v4AndAbove/cursorErrors.d.ts +63 -0
  305. package/instrumentation/libraries/mongodb/mongoHelpers/getInternalSymbol.d.ts +1 -0
  306. package/instrumentation/libraries/mongodb/mongoHelpers/makeReadableInputForBulkOpExecute.d.ts +18 -0
  307. package/instrumentation/libraries/mongodb/mongoHelpers/maybeCallback.d.ts +1 -0
  308. package/instrumentation/libraries/mongodb/mongoHelpers/processPayloadHelpers.d.ts +16 -0
  309. package/instrumentation/libraries/mongodb/mongoHelpers/removeConnectionAndMessageObj.d.ts +1 -0
  310. package/instrumentation/libraries/mongodb/mongoHelpers/removeSessionAndSanitizeOptions.d.ts +6 -0
  311. package/instrumentation/libraries/mongodb/utils.d.ts +34 -0
  312. package/instrumentation/libraries/mongoose/MongooseCursor.d.ts +21 -0
  313. package/instrumentation/libraries/mongoose/instrumentation.d.ts +32 -0
  314. package/instrumentation/libraries/mongoose/internalTypes.d.ts +19 -0
  315. package/instrumentation/libraries/mongoose/mocks/MongooseMock.d.ts +40 -0
  316. package/instrumentation/libraries/mongoose/mongooseHelpers/processPayloadHelpers.d.ts +13 -0
  317. package/instrumentation/libraries/mongoose/utils.d.ts +25 -0
  318. package/instrumentation/libraries/mysql/defaultMocks/index.d.ts +690 -0
  319. package/instrumentation/libraries/mysql/instrumentation.d.ts +34 -0
  320. package/instrumentation/libraries/mysql/mocks/MysqlErrOnlyCallbackMock.d.ts +28 -0
  321. package/instrumentation/libraries/mysql/mocks/MysqlQueryMock.d.ts +62 -0
  322. package/instrumentation/libraries/mysql2/defaultMocks/getMysql2DefaultMocks.d.ts +1334 -0
  323. package/instrumentation/libraries/mysql2/instrumentation.d.ts +62 -0
  324. package/instrumentation/libraries/mysql2/internalTypes.d.ts +26 -0
  325. package/instrumentation/libraries/mysql2/mocks/Mysql2ConnectMock.d.ts +27 -0
  326. package/instrumentation/libraries/mysql2/mocks/Mysql2ErrOnlyCallbackMock.d.ts +29 -0
  327. package/instrumentation/libraries/mysql2/mocks/Mysql2PrepareMock.d.ts +36 -0
  328. package/instrumentation/libraries/mysql2/mocks/Mysql2QueryMock.d.ts +60 -0
  329. package/instrumentation/libraries/mysql2/utils.d.ts +12 -0
  330. package/instrumentation/libraries/node-cache/instrumentation.d.ts +9 -0
  331. package/instrumentation/libraries/node-cache/mocks/NodeCacheMock.d.ts +37 -0
  332. package/instrumentation/libraries/nodemailer/instrumentation.d.ts +11 -0
  333. package/instrumentation/libraries/nodemailer/mocks/NodemailerSendMailMock.d.ts +32 -0
  334. package/instrumentation/libraries/nodemailer/mocks/NodemailerVerifyMock.d.ts +28 -0
  335. package/instrumentation/libraries/nodemailer/utils.d.ts +10 -0
  336. package/instrumentation/libraries/opossum/instrumentation.d.ts +9 -0
  337. package/instrumentation/libraries/pg/defaultMocks/getPgDefaultMocks.d.ts +591 -0
  338. package/instrumentation/libraries/pg/instrumentation.d.ts +16 -0
  339. package/instrumentation/libraries/pg/internalTypes.d.ts +47 -0
  340. package/instrumentation/libraries/pg/mockPgClient.d.ts +16 -0
  341. package/instrumentation/libraries/pg/mocks/ConnectMock.d.ts +28 -0
  342. package/instrumentation/libraries/pg/mocks/CursorReadMock.d.ts +27 -0
  343. package/instrumentation/libraries/pg/mocks/CursorSubmitMock.d.ts +30 -0
  344. package/instrumentation/libraries/pg/mocks/PgQueryMock.d.ts +44 -0
  345. package/instrumentation/libraries/pg/utils.d.ts +12 -0
  346. package/instrumentation/libraries/prisma/instrumentation.d.ts +14 -0
  347. package/instrumentation/libraries/prisma/mocks/PrismaMock.d.ts +45 -0
  348. package/instrumentation/libraries/redis/instrumentation.d.ts +16 -0
  349. package/instrumentation/libraries/redis/mocks/RedisMock.d.ts +41 -0
  350. package/instrumentation/libraries/redis/utils.d.ts +18 -0
  351. package/instrumentation/libraries/redis3/instrumentation.d.ts +10 -0
  352. package/instrumentation/libraries/redis3/mocks/CreateClientMock.d.ts +6 -0
  353. package/instrumentation/libraries/redis3/mocks/InternalSendCommandMock.d.ts +13 -0
  354. package/instrumentation/libraries/redis3/mocks/MultiMock.d.ts +13 -0
  355. package/instrumentation/libraries/sentry/instrumentation.d.ts +10 -0
  356. package/instrumentation/libraries/sequelize/helpers/processPayloadHelpers.d.ts +12 -0
  357. package/instrumentation/libraries/sequelize/instrumentation.d.ts +36 -0
  358. package/instrumentation/libraries/sequelize/internalTypes.d.ts +22 -0
  359. package/instrumentation/libraries/sequelize/mocks/SequelizeMock.d.ts +38 -0
  360. package/instrumentation/libraries/sequelize/mocks/SequelizeRawQueryMock.d.ts +55 -0
  361. package/instrumentation/libraries/sequelize/utils.d.ts +6 -0
  362. package/instrumentation/libraries/socket.io/instrumentation.d.ts +26 -0
  363. package/instrumentation/libraries/sqlite3/instrumentation.d.ts +20 -0
  364. package/instrumentation/libraries/sqlite3/mocks/sqlite3DatabaseMock.d.ts +38 -0
  365. package/instrumentation/libraries/sqlite3/mocks/sqlite3DbCloseMock.d.ts +30 -0
  366. package/instrumentation/libraries/sqlite3/mocks/sqlite3DbPrepareMock.d.ts +37 -0
  367. package/instrumentation/libraries/sqlite3/mocks/sqlite3EachMock.d.ts +41 -0
  368. package/instrumentation/libraries/sqlite3/mocks/sqlite3MapMock.d.ts +38 -0
  369. package/instrumentation/libraries/sqlite3/mocks/sqlite3StatementMock.d.ts +40 -0
  370. package/instrumentation/libraries/typeorm/helpers.d.ts +4 -0
  371. package/instrumentation/libraries/typeorm/instrumentation.d.ts +68 -0
  372. package/instrumentation/libraries/typeorm/internalTypes.d.ts +71 -0
  373. package/instrumentation/libraries/typeorm/mocks/TypeormEntityUpdateMock.d.ts +46 -0
  374. package/instrumentation/libraries/typeorm/mocks/TypeormGetManyAndCountMock.d.ts +36 -0
  375. package/instrumentation/libraries/typeorm/mocks/TypeormGetRawAndEntitiesMock.d.ts +39 -0
  376. package/instrumentation/libraries/typeorm/mocks/TypeormInsertUpsertMock.d.ts +52 -0
  377. package/instrumentation/libraries/typeorm/mocks/TypeormMock.d.ts +28 -0
  378. package/instrumentation/libraries/typeorm/mocks/TypeormQueryBuilderStreamMock.d.ts +30 -0
  379. package/instrumentation/libraries/typeorm/mocks/TypeormRawQueryMock.d.ts +26 -0
  380. package/instrumentation/libraries/typeorm/mocks/TypeormRunMigrationMock.d.ts +37 -0
  381. package/instrumentation/libraries/zookeeper/instrumentation.d.ts +30 -0
  382. package/instrumentation/libraries/zookeeper/mocks/NodeZookeeperClientMock.d.ts +35 -0
  383. package/instrumentation/libraries/zookeeper/utils.d.ts +9 -0
  384. package/manualMock/index.d.ts +30 -0
  385. package/manualMock/manualMock.d.ts +33 -0
  386. package/manualMock/manualMockV2.d.ts +44 -0
  387. package/manualRequest/ManualServerRequestMock.d.ts +35 -0
  388. package/manualRequest/index.d.ts +15 -0
  389. package/manualRequest/replayModeHandlers.d.ts +5 -0
  390. package/package.json +17 -0
  391. package/server/index.d.ts +13 -0
  392. package/server/zodSchemaAndTypes.d.ts +1368 -0
@@ -0,0 +1,345 @@
1
+ import type { Span } from 'opentelemetry-api';
2
+ import type { AmqpRequestReplayResult, AnyFunction, GRPCRequestReplayResult, GraphqlMetaMap, GraphqlRequestReplayResult, HTTPRequestReplayResult, HtMockMemoryMap, HtReplayMockObj, KafkaRequestReplayResult, ManualRequestReplayResult, ReplayMockSchemaMap, RootTagType, SpanId, SpansChecksumArray, TerminatedSpansArr } from '../../../../../utils/types';
3
+ import type { SamplingMode } from '../../helpers/samplingLogic';
4
+ import type { GraphqlServerRequestMock } from '../../../instrumentation/libraries/graphql/mocks/GraphqlServerRequestMock';
5
+ import type { JsonableMap } from '../../../../../utils/types/jsonableTypes';
6
+ import type { ExperimentalFlags } from '../types/ExperimentalFlagEnums';
7
+ type HtRequestId = string;
8
+ type RouteObject = {
9
+ endpointPath: string;
10
+ routerFn: AnyFunction;
11
+ };
12
+ type SpanInfo = {
13
+ spanId: string;
14
+ inputValueHash: string;
15
+ outputValueHash: string;
16
+ instrumentationName: string;
17
+ submoduleName: string;
18
+ };
19
+ export default class MemoryStore {
20
+ private static instance;
21
+ /**
22
+ * Maps current otel trace id to current ht trace id
23
+ * */
24
+ private readonly traceIdMap;
25
+ /**
26
+ * Stores root mocks
27
+ * */
28
+ private readonly rootMockMap;
29
+ private rootMockUpdated;
30
+ /**
31
+ * Maps root mocks to its replayed mocks
32
+ */
33
+ private readonly rootReplayMockMap;
34
+ /**
35
+ * Maps request id to its mocks
36
+ * */
37
+ private readonly requestMockMap;
38
+ /**
39
+ * Maps trace id to its replayed mocks
40
+ * */
41
+ private readonly requestReplayMockMap;
42
+ /**
43
+ * Maps http request id to its result schemas(response, replay mocks)
44
+ * */
45
+ private readonly httpRequestReplayResultMap;
46
+ /**
47
+ * Maps manual request id to its result schemas(response, replay mocks)
48
+ * */
49
+ private readonly manualRequestReplayResultMap;
50
+ /**
51
+ * Maps graphql request id to its result schemas(response, replay mocks)
52
+ * */
53
+ private readonly graphqlRequestReplayResultMap;
54
+ /**
55
+ * Maps request id to its result schemas for kafka requests (replay mocks) // We don't store response schema for kafka requests
56
+ **/
57
+ private readonly kafkaRequestReplayResultMap;
58
+ /**
59
+ * Maps request id to its result schemas for grpc requests (replay mocks)
60
+ **/
61
+ private readonly grpcRequestReplayResultMap;
62
+ /**
63
+ * Maps request id to its result schemas for amqp requests (replay mocks) // We don't store response schema for amqp requests
64
+ **/
65
+ private readonly amqpRequestReplayResultMap;
66
+ /**
67
+ * Maps request id to its associated spansChecksumArr(Array<spanId>)
68
+ * */
69
+ private readonly spansChecksumArrMap;
70
+ /**
71
+ * Maps request id to its associated spans({ spanId: ClientMock })
72
+ * */
73
+ private readonly spanMetadataMap;
74
+ /**
75
+ * Maps request id to its associated terminatedSpansArr(Array<spanId>)
76
+ * */
77
+ private readonly terminatedSpansArrMap;
78
+ /**
79
+ * This is to propagate a htRequestId for one selection set in a graphql request
80
+ * This is done to handle namespacing
81
+ * */
82
+ private readonly graphqlNamespaceMap;
83
+ /**
84
+ * This is to store all the selection set Requests to use in execute patch to create
85
+ * graphql requests with the same request id for each selection set
86
+ * */
87
+ private readonly selectionSetRequestIds;
88
+ private readonly debug;
89
+ /**
90
+ * Set of all HT_REQUEST_IDS whose server spans needs to be deleted as they are part of some other mockType
91
+ */
92
+ private readonly discardedHtRequestIds;
93
+ private appHealthStatus;
94
+ /**
95
+ * Flag to notify that the server is apollo graphql based and http headers should be saved against htRequestId in memory store
96
+ * for graphql instrumentation use and later cleared
97
+ */
98
+ private isGraphqlServer;
99
+ /**
100
+ * User will provide us known cluster paths from the functions exposed by the SDK
101
+ * This is usefull for better clustering of outbound calls and deduplication
102
+ *
103
+ * Cluster paths from downstream service's response headers precedes these
104
+ */
105
+ private userDefinedClusterPaths;
106
+ /**
107
+ * User will provide us known cluster paths from the functions exposed by the SDK
108
+ * This is usefull for better clustering of outbound calls and deduplication
109
+ *
110
+ * These are prioritized over cluster paths from downstream service's response headers
111
+ */
112
+ private highPriorityUserClusterPaths;
113
+ /**
114
+ * Map to store http based graphql req headers
115
+ */
116
+ private readonly graphqlRequestHeaders;
117
+ /**
118
+ * Map to store graphql defintion for a operation
119
+ */
120
+ private readonly graphqlDefinition;
121
+ /** Map to store clusterPath for a request */
122
+ private readonly clusterPathMap;
123
+ /** Map to temporarily store clusterPaths against requestId */
124
+ private readonly tempReqClusterPathMap;
125
+ /**
126
+ * Map to temporarily store graphql server mock against its htRequestId.
127
+ * This needs to be done as its creation happens in resolver patch and readableInput attachment happens in execute patch
128
+ * **/
129
+ private readonly graphqlServerMockMap;
130
+ /**
131
+ * This is a list of root tags created on boot
132
+ */
133
+ private rootTags;
134
+ /**
135
+ * This is a list of unique tags created for a particular requestId
136
+ */
137
+ private htRequestIdTags;
138
+ /**
139
+ This is a map of request ids vs their respective serverSpanStartTimestamp( as a ISO string )
140
+ */
141
+ private serverSpanStartTimestampMap;
142
+ private selectionSetMap;
143
+ /**
144
+ * This is a map to store http server context client instrumentation mocks for a graphql request
145
+ */
146
+ private httpServerCtxInstrumentationSpans;
147
+ private codeCoverageMap;
148
+ /**
149
+ * This is a map of htRequestId to the current value of the execution counter for the code coverage
150
+ */
151
+ private htRequestIdExecutionCounterMap;
152
+ private experimentalFlagMap;
153
+ /**
154
+ * List of libraries to ignore while initialising hypertest sdk
155
+ */
156
+ private libsToIgnoreWhileHtSdkInitialise;
157
+ /**
158
+ * This is a set to store patched initialised function to track if original function is invoked
159
+ * If patch results in an error then we call the original function to handle instrumentation exception in record mode.
160
+ * We collect data of error and send it to posthog to fix the issue.
161
+ */
162
+ private patchedFnInvokeStatusHash;
163
+ private gqlSelectionSetSamplingModeMap;
164
+ private uniqueSpanValueHashMap;
165
+ private repeatedSpanValueHashMap;
166
+ /**
167
+ This is a map of request ids vs their respective userMeta, (that the user created during record)
168
+ */
169
+ private userMetaMap;
170
+ /**
171
+ * This is a map of global discarded spans which will be filtered out in the trace exporter to reduce load on logger
172
+ */
173
+ private discardedSpansMap;
174
+ /**
175
+ * This is map of htRequestId as key to the value being the identifiers of manual mock v2 to avoid mocks
176
+ */
177
+ private uniqueManualMockV2IdsOfCurrentReq;
178
+ /**
179
+ * This is map of htRequestId as key to the value being the properties of kv mock to avoid duplicates
180
+ */
181
+ private uniqueKvMockPropsOfCurrentReq;
182
+ private constructor();
183
+ static getInstance(): MemoryStore;
184
+ isKvMockAlreadyRecorded(htRequestId: string, property: string): boolean;
185
+ addUniqueKvMockPropsOfCurrentReq(htRequestId: string, property: string): void;
186
+ removeUniqueKvMockPropsOfCurrentReq(htRequestId: string): void;
187
+ addUniqueManualMockV2IdsOfCurrentReq(htRequestId: string, identifier: string): void;
188
+ isManualMockV2IdPresentInCurrentReq(htRequestId: string, identifier: string): boolean;
189
+ removeUniqueManualMockV2IdsOfCurrentReq(htRequestId: string): void;
190
+ addDiscardedSpan(span: Span): void;
191
+ getDiscardedSpansMap(): WeakSet<Span>;
192
+ initialiseUniqueSpanValueHashMap(htRequestId: string): void;
193
+ addUniqueSpanValueHash(htRequestId: string, spanInfo: SpanInfo): void;
194
+ removeUniqueSpanValueHash(htRequestId: string): void;
195
+ initialiseRepeatedSpanValueHashMap(htRequestId: string): void;
196
+ addRepeatedSpanValueHash(htRequestId: string, spanInfo: SpanInfo): void;
197
+ removeRepeatedSpanValueHash(htRequestId: string): void;
198
+ getUniqueSpanValueHashArr(htRequestId: string): {
199
+ spanId: string;
200
+ instrumentationName: string;
201
+ submoduleName: string;
202
+ inputValueHash: string;
203
+ outputValueHash: string;
204
+ }[];
205
+ getRepeatedSpanValueHashArr(htRequestId: string): {
206
+ spanId: string;
207
+ instrumentationName: string;
208
+ submoduleName: string;
209
+ inputValueHash: string;
210
+ outputValueHash: string;
211
+ }[];
212
+ setLibsToIgnoreWhileHtSdkInitialise(libsToIgnore: string[]): void;
213
+ getLibsToIgnoreWhileHtSdkInitialise(): string[];
214
+ initializePatchedFnInvokeStatus(uniqueFnId: string): void;
215
+ getPatchedFnInvokeStatus(uniqueFnId: string): boolean;
216
+ removePatchedFnInvokeStatus(uniqueFnId: string): void;
217
+ addHttpReqInstrumentationMocks(htRequestId: string, span: Span): void;
218
+ getHttpReqInstrumentationMocks(htRequestId: string): Span[];
219
+ deleteHttpReqInstrumentationMocks(htRequestId: string): void;
220
+ getRootTags(): RootTagType[];
221
+ addRootTag(payload: RootTagType): void;
222
+ setHtRequestIdTags(htRequestId: string, payload: RootTagType): boolean;
223
+ deleteHtRequestIdTags(htRequestId: string): void;
224
+ getGraphqlServerMock(htRequestId: string): GraphqlServerRequestMock;
225
+ setGraphqlServerMock(htRequestId: string, graphqlServerMock: GraphqlServerRequestMock): void;
226
+ deleteGraphqlServerMock(htRequestId: string): void;
227
+ getIsGraphqlServerBoolean(): boolean;
228
+ setIsGraphqlServerBoolean(): void;
229
+ getGraphqlDefinition(gqlOpId: string): Record<string, string>;
230
+ setGraphqlDefinition(gqlOpId: string, gqlDefn: Record<string, unknown>): void;
231
+ deleteGraphqlDefinition(gqlOpId: string): boolean;
232
+ setGraphqlRequestHeaders(htRequestId: string, headers: Record<string, string>): void;
233
+ getGraphqlRequestHeaders(htRequestId: string): Record<string, string>;
234
+ deleteGraphqlRequestHeaders(htRequestId: string): void;
235
+ setTraceId(currentTraceId: string, mainTraceId?: string): void;
236
+ getTraceId(currentTraceId: string): string | null;
237
+ deleteTraceId(currentTraceId: string): boolean;
238
+ setRootMock(value: HtMockMemoryMap): void;
239
+ getRootMock(): HtMockMemoryMap;
240
+ isRootMockUpdated(): boolean;
241
+ getRootReplayMock(): ReplayMockSchemaMap;
242
+ setRootReplayMock(instrumentationName: string, submoduleName: string, replayMock: HtReplayMockObj): void;
243
+ deleteRootReplayMock(): void;
244
+ setRequestMock(requestId: string, value: HtMockMemoryMap): void;
245
+ getRequestMock(requestId: string): HtMockMemoryMap;
246
+ removeRequestMock(requestId: string): boolean;
247
+ setUserMeta(requestId: string, value: JsonableMap): void;
248
+ getUserMeta(requestId: string): JsonableMap;
249
+ removeUserMeta(requestId: string): boolean;
250
+ addDiscardedHtRequestId(htRequestId: HtRequestId): void;
251
+ removeDiscardedHtRequestId(htRequestId: HtRequestId): boolean;
252
+ setRequestReplayMock(requestId: string | null, instrumentationName: string, submoduleName: string, replayMock: HtReplayMockObj): void;
253
+ getRequestReplayMock(requestId: string): ReplayMockSchemaMap;
254
+ deleteRequestReplayMock(requestId: string): void;
255
+ setHttpRequestReplayResult(requestId: string, value: HTTPRequestReplayResult): void;
256
+ getHttpRequestReplayResult(requestId: string): HTTPRequestReplayResult;
257
+ deleteHttpRequestReplayResult(requestId: string): void;
258
+ setManualRequestReplayResult(requestId: string, value: ManualRequestReplayResult): void;
259
+ getManualRequestReplayResult(requestId: string): ManualRequestReplayResult | undefined;
260
+ deleteManualRequestReplayResult(requestId: string): void;
261
+ setGraphqlRequestReplayResult(requestId: string, value: GraphqlRequestReplayResult): void;
262
+ getGraphqlRequestReplayResult(requestId: string): GraphqlRequestReplayResult;
263
+ deleteGraphqlRequestReplayResult(requestId: string): void;
264
+ setKafkaRequestReplayResult(requestId: string, value: KafkaRequestReplayResult): void;
265
+ getKafkaRequestReplayResult(requestId: string): KafkaRequestReplayResult;
266
+ deleteKafkaRequestReplayResult(requestId: string): void;
267
+ setGrpcRequestReplayResult(requestId: string, value: GRPCRequestReplayResult): void;
268
+ getGrpcRequestReplayResult(requestId: string): GRPCRequestReplayResult;
269
+ deleteGrpcRequestReplayResult(requestId: string): void;
270
+ setAmqpRequestReplayResult(requestId: string, value: AmqpRequestReplayResult): void;
271
+ getAmqpRequestReplayResult(requestId: string): AmqpRequestReplayResult;
272
+ deleteAmqpRequestReplayResult(requestId: string): void;
273
+ addSpanToChecksumArr(requestId: string, spanId: SpanId): void;
274
+ initialiseChecksumArr(requestId: string): void;
275
+ addSpanToTerminatedSpansArr(requestId: string, spanId: SpanId): void;
276
+ initialiseTerminatedSpansArr(requestId: string): void;
277
+ getGraphqlNamespaceMap(selectionSetName: string): string;
278
+ setGraphqlNamespaceMap(selectionSetName: string, htRequestId: string): void;
279
+ deleteGraphqlNamespaceMap(selectionSetName: string): void;
280
+ getSelectionSetRequestIds(id: string): GraphqlMetaMap;
281
+ deleteSelectionSetRequestIds(id: string): void;
282
+ setSelectionSetRequestIds({ id, htRequestId, topLevelResolverName, selectionSetQuery, fragmentQueries, resolverChain, }: {
283
+ id: string;
284
+ htRequestId: string;
285
+ topLevelResolverName: string;
286
+ selectionSetQuery: string;
287
+ fragmentQueries: Record<string, string>[];
288
+ resolverChain: Set<string>;
289
+ }): void;
290
+ getGqlSelectionSetSamplingMode(requestId: string): Record<string, SamplingMode>;
291
+ setGqlSelectionSetSamplingMode(requestId: string, config: Record<string, SamplingMode>): void;
292
+ deleteGqlSelectionSetSamplingMode(requestId: string): void;
293
+ getSpansChecksumArr(requestId: string): SpansChecksumArray;
294
+ getTerminatedSpansArr(requestId: string): TerminatedSpansArr;
295
+ getUnterminatedSpans(requestId: string): SpanId[];
296
+ setAppHealthStatus(status: 'UP' | 'DOWN'): void;
297
+ getAppHealthStatus(): 'UP' | 'DOWN';
298
+ setClusterPath(requestId: string, clusterPath: string): void;
299
+ getClusterPath(requestId: string): string;
300
+ deleteClusterPath(requestId: string): void;
301
+ setClusterPathArrForReq(requestId: string, clusterPathArr: RouteObject[]): void;
302
+ getClusterPathArrForReq(requestId: string): RouteObject[];
303
+ deleteClusterPathArrForReq(requestId: string): void;
304
+ setUserDefinedClusterPaths(clusterPaths: Array<{
305
+ clusterPath: string;
306
+ regex: RegExp;
307
+ }>): void;
308
+ getUserDefinedClusterPaths(): Array<{
309
+ clusterPath: string;
310
+ regex: RegExp;
311
+ }>;
312
+ setHighPriorityUserClusterPaths(clusterPaths: Array<{
313
+ clusterPath: string;
314
+ regex: RegExp;
315
+ }>): void;
316
+ getHighPriorityUserClusterPaths(): Array<{
317
+ clusterPath: string;
318
+ regex: RegExp;
319
+ }>;
320
+ setServerSpanStartTimestamp(requestId: string, serverSpanStartTimestamp: string): void;
321
+ getServerSpanStartTimestamp(requestId: string): string;
322
+ setSelectionSet(requestId: string, selectionSet: string): void;
323
+ getSelectionSet(requestId: string): string;
324
+ getHtRequestIdExecutionCounter(htRequestId: string): number;
325
+ updateRequestCoverage(htRequestId: string, filePathAbs: string, lineNumber: string): void;
326
+ getRequestCoverage(htRequestId: string): {
327
+ [filePathAbs: string]: {
328
+ [lineNumber: string]: number[];
329
+ };
330
+ };
331
+ deleteRequestCoverage(htRequestId: string): boolean;
332
+ setExperimentalFlag(flagName: ExperimentalFlags): void;
333
+ getExperimentalFlag(flagName: ExperimentalFlags): true;
334
+ setSpanMetadata(htRequestId: string, spanId: string, data: Partial<{
335
+ submoduleName: string;
336
+ packageName: string;
337
+ readableInput: unknown;
338
+ }>): void;
339
+ getSpanMetadata(htRequestId: string, spanId: string): Partial<{
340
+ submoduleName: string;
341
+ packageName: string;
342
+ readableInput: unknown;
343
+ }>;
344
+ }
345
+ export {};
@@ -0,0 +1,8 @@
1
+ export default class RootMockCounter {
2
+ private static instance;
3
+ private count;
4
+ private constructor();
5
+ static getInstance(): RootMockCounter;
6
+ increment(): number;
7
+ getCount(): number;
8
+ }
@@ -0,0 +1,7 @@
1
+ import type { JsonSchema } from '../../../../../utils/jsonSchemaDiffGenerator/jsonSchemaTypes';
2
+ import type { HtMockMemoryObj } from '../../../../../utils/types';
3
+ export declare enum MockMatchingCriteria {
4
+ EXACT_MATCH = "EXACT_MATCH",
5
+ LEVEN_DIST = "LEVEN_DIST"
6
+ }
7
+ export declare const selectBestMatchMocks: (processedInputJsonSchema: JsonSchema, availableMocks: HtMockMemoryObj[], matchingCriteria: MockMatchingCriteria) => HtMockMemoryObj[];
@@ -0,0 +1,6 @@
1
+ type AnyFunction = Function;
2
+ export declare function wrap(nodule: object, name: string | symbol, wrapper: AnyFunction): (...args: any[]) => unknown;
3
+ export declare function massWrap(nodules: any, names: any, wrapper: any): void;
4
+ export declare function unwrap(nodule: object, name: string): any;
5
+ export declare function massUnwrap(nodules: Record<string, unknown>[], names: string[]): void;
6
+ export {};
@@ -0,0 +1,56 @@
1
+ import type * as express from 'express';
2
+ import type { FastifyReply } from 'fastify';
3
+ import type { JsonSchema } from '../../../../../utils/jsonSchemaDiffGenerator/jsonSchemaTypes';
4
+ import { MockTypeCollector, type RootTagType } from '../../../../../utils/types';
5
+ import type { Jsonable } from '../../../../../utils/types/jsonableTypes';
6
+ import type { HtInstrumentation, HtInstrumentationModuleDefinition, HtShimWrapped } from '../types';
7
+ export declare function isUtf8(input: Buffer): boolean;
8
+ export declare function isWrapped(func: unknown): func is HtShimWrapped;
9
+ export declare const isServerMockType: (mockType: MockTypeCollector) => boolean;
10
+ export declare const HT_DO_NOT_MOCK: symbol;
11
+ export declare const HT_SERVER_TYPE: symbol;
12
+ export declare const IS_ROOT_TRACE_KEY: symbol;
13
+ export declare const DONT_TAMPER_HTTP_REQUEST_HEADERS: symbol;
14
+ export declare const CURRENT_SERVER_MOCK: symbol;
15
+ export declare const HT_REQUEST_ID: symbol;
16
+ export declare const ORIGINAL_FN_ID: symbol;
17
+ export declare const HTTP_PARENT_REQUEST_HEADER = "hypertest-parent-req-id";
18
+ export declare const PARENT_REQUEST_HEADER = "hypertest-parent-req-id";
19
+ export declare const HT_GRAPHQL_OP_ID: symbol;
20
+ export declare function getCurrTraceId(): null | string;
21
+ export declare function isRootTraceFn(): boolean;
22
+ export declare function NOOP(..._args: unknown[]): void;
23
+ export declare function bufferToString(buffer: Buffer): {
24
+ encoding: HtRawEncoding;
25
+ bufferStr: string;
26
+ };
27
+ export declare function getObjectHash(obj: Jsonable): string;
28
+ export declare function getSchemaHash(obj: JsonSchema): string;
29
+ export declare function getHtJsonSchema(obj: unknown): JsonSchema;
30
+ export declare function createUnmockedContext(): import("@opentelemetry/api").Context;
31
+ export declare function getCurrentActiveContext(): import("@opentelemetry/api").Context;
32
+ export declare function isUnmockedContext(): boolean;
33
+ export declare function createManualMockContext(): import("@opentelemetry/api").Context;
34
+ export declare function isManualMockContext(): boolean;
35
+ export declare function getHttpClusterPathFromMemStore(): string;
36
+ export declare function createAndSendInstrumentationErrPayload({ args, plugin, functionName, }: {
37
+ args: unknown;
38
+ plugin: HtInstrumentation;
39
+ functionName: string;
40
+ }): void;
41
+ export declare function clearHttpClusterPathFromMemStore(): void;
42
+ export declare const stripQmarkAndTrailingSlashesFromClusterPath: (path: string) => string;
43
+ export declare function setHttpClusterPathInMemStoreAndResHeaders(clusterPath: string, responseObj: express.Response | FastifyReply): void;
44
+ export declare function setTempHttpClusterPathArrForReqInMemStore(): void;
45
+ export declare function getTempHttpClusterPathArrayFromMemStore(): {
46
+ endpointPath: string;
47
+ routerFn: import("../../../../../utils/types").AnyFunction;
48
+ }[];
49
+ export declare function deleteHttpClusterPathArrayFromMemStore(): void;
50
+ export declare function calculateSimilarityScoreHelper(similarityObjSource: unknown, similarityObjTarget: unknown, currentDepth: number, depth: number): number;
51
+ export declare function calculateSimilarityScore(similarityObjSource: unknown, similarityObjTarget: unknown, depth: number): number;
52
+ export declare function getModuleVersion<T>(modulesArray: HtInstrumentationModuleDefinition<T>[], packageName: string): string;
53
+ export declare function isMockNotFoundError(error: Error): boolean;
54
+ export declare function pushRootTagToMemoryStore(payload: RootTagType): void;
55
+ export declare function setHtRequestIdTagsIntoStore(htRequestId: string, tag: RootTagType): boolean;
56
+ export declare function deleteHtRequestIdTagsFromStore(htRequestId: string): void;
@@ -0,0 +1,8 @@
1
+ export declare enum ExperimentalFlags {
2
+ EnableSqlite3Instrumentation = "enableSqlite3Instrumentation",
3
+ EnableRedisShortSubmoduleName = "enableRedisShortSubmoduleName",
4
+ EnableMongooseConnectionUnmocking = "enableMongooseConnectionUnmocking",
5
+ EnableRecordModeExceptionHandling = "enableRecordModeExceptionHandling",
6
+ EnableElasticV8Instrumentation = "enableElasticV8Instrumentation",
7
+ EnableInstanceOfPatch = "enableInstanceOfPatch"
8
+ }
@@ -0,0 +1,37 @@
1
+ export declare enum HtInstrumentations {
2
+ HtMysqlInstrumentation = "ht-instrumentation-mysql",
3
+ HtPgInstrumentation = "ht-instrumentation-pg",
4
+ HtPrismaInstrumentation = "ht-instrumentation-prisma-client",
5
+ HtMysql2Instrumentation = "ht-instrumentation-mysql2",
6
+ HtSocketIoInstrumentation = "ht-instrumentation-socketIo",
7
+ HtRedisInstrumentation = "ht-instrumentation-redis",
8
+ HtRedis3Instrumentation = "ht-instrumentation-redis-3",
9
+ HtKafkaInstrumentation = "ht-instrumentation-kafka",
10
+ HtAwsSdkInstrumentation = "ht-instrumentation-aws-sdk",
11
+ HtAmqplibInstrumentation = "ht-instrumentation-amqplib",
12
+ HtNodemailerInstrumentation = "ht-instrumentation-nodemailer",
13
+ HtIoredisInstrumentation = "ht-instrumentation-ioredis",
14
+ HtMongoDbInstrumentation = "ht-instrumentation-mongo",
15
+ HtMongooseInstrumentation = "ht-instrumentation-mongoose",
16
+ HtHttpInstrumentation = "ht-instrumentation-http",
17
+ HtSequelizeInstrumentation = "ht-instrumentation-sequelize",
18
+ HtGraphqlInstrumentation = "ht-instrumentation-graphql",
19
+ HtGrpcInstrumentation = "ht-instrumentation-grpc",
20
+ HtTypeormInstrumentation = "ht-instrumentation-typeorm",
21
+ HtExpressInstrumentation = "ht-instrumentation-express",
22
+ HtJsonWebTokenInstrumentation = "ht-instrumentation-jsonwebtoken",
23
+ HtEtcd3Instrumentation = "ht-instrumentation-etcd3",
24
+ HtNodeZookeeperClientInstrumentation = "ht-instrumentation-node-zookeeper-client",
25
+ HtFastifyInstrumentation = "ht-instrumentation-fastify",
26
+ HtAuth0Instrumentation = "ht-instrumentation-auth0",
27
+ HtDateInstrumentation = "ht-instrumentation-date",
28
+ HtElasticSearchInstrumentation = "ht-instrumentation-elastic-search",
29
+ HtSqlite3Instrumentaion = "ht-instrumentation-sqlite3",
30
+ HtOpossumInstrumentation = "ht-instrumentation-opossum",
31
+ HtSentryInstrumentation = "ht-instrumentation-sentry",
32
+ ManualMock = "ht-instrumentation-manual",
33
+ ManualMockV2 = "ht-manual-mock-v2",
34
+ HtKVStore = "ht-kv-store",
35
+ HtCouchbaseInstrumentation = "ht-instrumentation-couchbase",
36
+ HtNodeCacheInstrumentation = "ht-instrumentation-node-cache"
37
+ }
@@ -0,0 +1 @@
1
+ export declare const HtInstrumentationModuleNames: string[];
@@ -0,0 +1,77 @@
1
+ import type { TracerProvider } from '@opentelemetry/api';
2
+ import type { AnyFunction } from '../../../../../utils/types';
3
+ import type { HtInstrumentations } from './HtInstrumentationEnums';
4
+ export type HtShimWrapped = {
5
+ __ht_shim_wrapped: boolean;
6
+ __ht_shim_unwrap: AnyFunction;
7
+ __ht_shim_original: AnyFunction;
8
+ } & AnyFunction;
9
+ export type HtInstrumentationConfig = {
10
+ /**
11
+ * Whether to enable the instrumentation.
12
+ * @default true
13
+ */
14
+ enabled?: boolean;
15
+ disableInstrumentations?: HtInstrumentations[];
16
+ ignoredHostsForHttpReqs?: Array<string | RegExp>;
17
+ };
18
+ export type HtInstrumentation = {
19
+ /** Instrumentation Name */
20
+ instrumentationName: string;
21
+ /**
22
+ * Instrumentation Description - please describe all useful information
23
+ * as Instrumentation might patch different version of different modules,
24
+ * or support different browsers etc.
25
+ */
26
+ instrumentationDescription?: string;
27
+ /**
28
+ * Contains all supported versions.
29
+ * All versions must be compatible with [semver](https://semver.org/spec/v2.0.0.html) format.
30
+ * If the version is not supported, we won't apply instrumentation patch (see `enable` method).
31
+ * If omitted, all versions of the module will be patched.
32
+ */
33
+ supportedVersions?: string[];
34
+ /** Method to disable the instrumentation */
35
+ disable(): void;
36
+ /** Method to enable the instrumentation */
37
+ enable(): void;
38
+ /** Method to set tracer provider */
39
+ setTracerProvider(tracerProvider: TracerProvider): void;
40
+ /** Method to set instrumentation config */
41
+ setConfig(config: HtInstrumentationConfig): void;
42
+ /** Method to get instrumentation config */
43
+ getConfig(): HtInstrumentationConfig;
44
+ };
45
+ export type HtInstrumentationModuleFile<T> = {
46
+ /** Name of file to be patched with relative path */
47
+ name: string;
48
+ moduleExports?: T;
49
+ /** Supported version this file */
50
+ supportedVersions: string[];
51
+ /** Method to patch the instrumentation */
52
+ patch(moduleExports: T, moduleVersion?: string): T;
53
+ /** Method to patch the instrumentation */
54
+ /** Method to unpatch the instrumentation */
55
+ unpatch(moduleExports?: T, moduleVersion?: string): void;
56
+ };
57
+ export type HtInstrumentationModuleDefinition<T> = {
58
+ /** Module name or path */
59
+ name: string;
60
+ moduleExports?: T;
61
+ /** Instrumented module version */
62
+ moduleVersion?: string;
63
+ /** Supported version of module */
64
+ supportedVersions: string[];
65
+ /** Module internal files to be patched */
66
+ files?: HtInstrumentationModuleFile<unknown>[];
67
+ /** Method to patch the instrumentation */
68
+ patch?: (moduleExports: T, moduleVersion?: string) => T;
69
+ /** Method to unpatch the instrumentation */
70
+ unpatch?: (moduleExports: T, moduleVersion?: string) => void;
71
+ };
72
+ export declare enum FunctionTypeEnum {
73
+ SYNC = "SYNC",
74
+ ASYNC = "ASYNC",
75
+ CALLBACK = "CALLBACK"
76
+ }
77
+ export declare const HT_MOCK_ATTRIBUTE = "ht_mock";
@@ -0,0 +1,70 @@
1
+ import type { HttpMethodEnum } from '../../../../utils/types';
2
+ type BlockRequestsConfig = {
3
+ http?: {
4
+ path: string | RegExp;
5
+ method?: string;
6
+ }[];
7
+ grpc?: {
8
+ service: string;
9
+ method: string;
10
+ }[];
11
+ kafka?: {
12
+ groupId: string;
13
+ topic: string;
14
+ }[];
15
+ amqp?: {
16
+ queue: string;
17
+ }[];
18
+ graphql?: {
19
+ selectionSet: string;
20
+ }[];
21
+ manualRequest?: {
22
+ name: string;
23
+ }[];
24
+ };
25
+ export declare const processedBlockRequestsConfig: {
26
+ http: {
27
+ path: RegExp;
28
+ method: HttpMethodEnum | '*';
29
+ }[];
30
+ grpc: {
31
+ service: string;
32
+ method: string;
33
+ }[];
34
+ kafka: {
35
+ groupId: string;
36
+ topic: string;
37
+ }[];
38
+ amqp: {
39
+ queue: string;
40
+ }[];
41
+ graphql: {
42
+ selectionSet: string;
43
+ }[];
44
+ manualRequest: {
45
+ name: string;
46
+ }[];
47
+ };
48
+ export declare function setBlockRequestsConfig({ http, grpc, kafka, amqp, graphql, manualRequest, }: BlockRequestsConfig): void;
49
+ export declare function isIncomingHttpRequestBlocked({ incomingRequestPath, incomingRequestMethod, }: {
50
+ incomingRequestPath: string;
51
+ incomingRequestMethod: HttpMethodEnum;
52
+ }): boolean;
53
+ export declare function isIncomingGrpcRequestBlocked({ incomingRequestService, incomingRequestMethod, }: {
54
+ incomingRequestService: string;
55
+ incomingRequestMethod: string;
56
+ }): boolean;
57
+ export declare function isIncomingKafkaRequestBlocked({ incomingRequestGroupId, incomingRequestTopic, }: {
58
+ incomingRequestGroupId: string;
59
+ incomingRequestTopic: string;
60
+ }): boolean;
61
+ export declare function isIncomingAmqpRequestBlocked({ incomingRequestQueue, }: {
62
+ incomingRequestQueue: string;
63
+ }): boolean;
64
+ export declare function isIncomingGraphqlRequestBlocked({ incomingRequestSelectionSet, }: {
65
+ incomingRequestSelectionSet: string;
66
+ }): boolean;
67
+ export declare function isIncomingManualRequestBlocked({ incomingRequestName, }: {
68
+ incomingRequestName: string;
69
+ }): boolean;
70
+ export {};
@@ -0,0 +1,3 @@
1
+ export type CallbackFn = (...args: unknown[]) => unknown;
2
+ export declare const getCallbackFn: (args: unknown[]) => CallbackFn | null;
3
+ export declare const replaceCallbackFn: (args: unknown[], pathchedCallback: CallbackFn) => unknown[];
@@ -0,0 +1,3 @@
1
+ export declare const setGitCommitHash: (commitHash: string) => void;
2
+ export declare const setCommitHashFromGit: () => string;
3
+ export declare const getGitCommitHash: () => string;
@@ -0,0 +1,2 @@
1
+ declare const getConsistentKeysAndtypesMap: (input: Record<string, unknown> | unknown[]) => Record<string, string> | Record<string, never>;
2
+ export default getConsistentKeysAndtypesMap;
@@ -0,0 +1,9 @@
1
+ type MeasureContinuousCoverageConfig = {
2
+ backendBaseUrl: string;
3
+ htExtraHeaders?: Record<string, string>;
4
+ buildId: string;
5
+ serviceId: string;
6
+ refreshIntervalInSec?: number;
7
+ };
8
+ export declare const measureContinuousCoverage: ({ backendBaseUrl, htExtraHeaders, buildId, serviceId, refreshIntervalInSec, }: MeasureContinuousCoverageConfig) => void;
9
+ export {};
@@ -0,0 +1,8 @@
1
+ type MemoryUsageLimiterConfig = {
2
+ memoryUsageUpperThresholdMB: number;
3
+ memoryUsageLowerThresholdMB: number;
4
+ memoryCheckIntervalMs?: number;
5
+ };
6
+ export declare function getShouldDisableSdk(): boolean;
7
+ export declare function setMemoryUsageLimiterConfig(memoryUsageLimiterConfigParam: MemoryUsageLimiterConfig): void;
8
+ export {};