@wdio/browserstack-service 0.0.0-canary-20260722132416

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 (331) hide show
  1. package/LICENSE-MIT +20 -0
  2. package/README.md +392 -0
  3. package/browserstack-service.d.ts +43 -0
  4. package/build/Percy/Percy-Handler.d.ts +32 -0
  5. package/build/Percy/Percy-Handler.d.ts.map +1 -0
  6. package/build/Percy/Percy-Handler.js +165 -0
  7. package/build/Percy/Percy-Handler.js.map +1 -0
  8. package/build/Percy/Percy.d.ts +19 -0
  9. package/build/Percy/Percy.d.ts.map +1 -0
  10. package/build/Percy/Percy.js +164 -0
  11. package/build/Percy/Percy.js.map +1 -0
  12. package/build/Percy/PercyBinary.d.ts +10 -0
  13. package/build/Percy/PercyBinary.d.ts.map +1 -0
  14. package/build/Percy/PercyBinary.js +161 -0
  15. package/build/Percy/PercyBinary.js.map +1 -0
  16. package/build/Percy/PercyCaptureMap.d.ts +9 -0
  17. package/build/Percy/PercyCaptureMap.d.ts.map +1 -0
  18. package/build/Percy/PercyCaptureMap.js +36 -0
  19. package/build/Percy/PercyCaptureMap.js.map +1 -0
  20. package/build/Percy/PercyHelper.d.ts +8 -0
  21. package/build/Percy/PercyHelper.d.ts.map +1 -0
  22. package/build/Percy/PercyHelper.js +68 -0
  23. package/build/Percy/PercyHelper.js.map +1 -0
  24. package/build/Percy/PercyLogger.d.ts +15 -0
  25. package/build/Percy/PercyLogger.d.ts.map +1 -0
  26. package/build/Percy/PercyLogger.js +68 -0
  27. package/build/Percy/PercyLogger.js.map +1 -0
  28. package/build/Percy/PercySDK.d.ts +4 -0
  29. package/build/Percy/PercySDK.d.ts.map +1 -0
  30. package/build/Percy/PercySDK.js +86 -0
  31. package/build/Percy/PercySDK.js.map +1 -0
  32. package/build/accessibility-handler.d.ts +52 -0
  33. package/build/accessibility-handler.d.ts.map +1 -0
  34. package/build/accessibility-handler.js +361 -0
  35. package/build/accessibility-handler.js.map +1 -0
  36. package/build/ai-handler.d.ts +23 -0
  37. package/build/ai-handler.d.ts.map +1 -0
  38. package/build/ai-handler.js +184 -0
  39. package/build/ai-handler.js.map +1 -0
  40. package/build/bstackLogger.d.ts +16 -0
  41. package/build/bstackLogger.d.ts.map +1 -0
  42. package/build/bstackLogger.js +71 -0
  43. package/build/bstackLogger.js.map +1 -0
  44. package/build/cleanup.d.ts +9 -0
  45. package/build/cleanup.d.ts.map +1 -0
  46. package/build/cleanup.js +101 -0
  47. package/build/cleanup.js.map +1 -0
  48. package/build/cli/apiUtils.d.ts +14 -0
  49. package/build/cli/apiUtils.d.ts.map +1 -0
  50. package/build/cli/apiUtils.js +25 -0
  51. package/build/cli/apiUtils.js.map +1 -0
  52. package/build/cli/cliLogger.d.ts +17 -0
  53. package/build/cli/cliLogger.d.ts.map +1 -0
  54. package/build/cli/cliLogger.js +82 -0
  55. package/build/cli/cliLogger.js.map +1 -0
  56. package/build/cli/cliUtils.d.ts +64 -0
  57. package/build/cli/cliUtils.d.ts.map +1 -0
  58. package/build/cli/cliUtils.js +461 -0
  59. package/build/cli/cliUtils.js.map +1 -0
  60. package/build/cli/eventDispatcher.d.ts +28 -0
  61. package/build/cli/eventDispatcher.d.ts.map +1 -0
  62. package/build/cli/eventDispatcher.js +49 -0
  63. package/build/cli/eventDispatcher.js.map +1 -0
  64. package/build/cli/frameworks/automationFramework.d.ts +89 -0
  65. package/build/cli/frameworks/automationFramework.d.ts.map +1 -0
  66. package/build/cli/frameworks/automationFramework.js +132 -0
  67. package/build/cli/frameworks/automationFramework.js.map +1 -0
  68. package/build/cli/frameworks/constants/automationFrameworkConstants.d.ts +18 -0
  69. package/build/cli/frameworks/constants/automationFrameworkConstants.d.ts.map +1 -0
  70. package/build/cli/frameworks/constants/automationFrameworkConstants.js +18 -0
  71. package/build/cli/frameworks/constants/automationFrameworkConstants.js.map +1 -0
  72. package/build/cli/frameworks/constants/testFrameworkConstants.d.ts +43 -0
  73. package/build/cli/frameworks/constants/testFrameworkConstants.d.ts.map +1 -0
  74. package/build/cli/frameworks/constants/testFrameworkConstants.js +43 -0
  75. package/build/cli/frameworks/constants/testFrameworkConstants.js.map +1 -0
  76. package/build/cli/frameworks/testFramework.d.ts +89 -0
  77. package/build/cli/frameworks/testFramework.d.ts.map +1 -0
  78. package/build/cli/frameworks/testFramework.js +126 -0
  79. package/build/cli/frameworks/testFramework.js.map +1 -0
  80. package/build/cli/frameworks/wdioAutomationFramework.d.ts +28 -0
  81. package/build/cli/frameworks/wdioAutomationFramework.d.ts.map +1 -0
  82. package/build/cli/frameworks/wdioAutomationFramework.js +67 -0
  83. package/build/cli/frameworks/wdioAutomationFramework.js.map +1 -0
  84. package/build/cli/frameworks/wdioMochaTestFramework.d.ts +82 -0
  85. package/build/cli/frameworks/wdioMochaTestFramework.d.ts.map +1 -0
  86. package/build/cli/frameworks/wdioMochaTestFramework.js +322 -0
  87. package/build/cli/frameworks/wdioMochaTestFramework.js.map +1 -0
  88. package/build/cli/grpcClient.d.ts +86 -0
  89. package/build/cli/grpcClient.d.ts.map +1 -0
  90. package/build/cli/grpcClient.js +532 -0
  91. package/build/cli/grpcClient.js.map +1 -0
  92. package/build/cli/index.d.ts +150 -0
  93. package/build/cli/index.d.ts.map +1 -0
  94. package/build/cli/index.js +464 -0
  95. package/build/cli/index.js.map +1 -0
  96. package/build/cli/instances/automationFrameworkInstance.d.ts +33 -0
  97. package/build/cli/instances/automationFrameworkInstance.d.ts.map +1 -0
  98. package/build/cli/instances/automationFrameworkInstance.js +45 -0
  99. package/build/cli/instances/automationFrameworkInstance.js.map +1 -0
  100. package/build/cli/instances/testFrameworkInstance.d.ts +62 -0
  101. package/build/cli/instances/testFrameworkInstance.d.ts.map +1 -0
  102. package/build/cli/instances/testFrameworkInstance.js +97 -0
  103. package/build/cli/instances/testFrameworkInstance.js.map +1 -0
  104. package/build/cli/instances/trackedContext.d.ts +32 -0
  105. package/build/cli/instances/trackedContext.d.ts.map +1 -0
  106. package/build/cli/instances/trackedContext.js +48 -0
  107. package/build/cli/instances/trackedContext.js.map +1 -0
  108. package/build/cli/instances/trackedInstance.d.ts +40 -0
  109. package/build/cli/instances/trackedInstance.d.ts.map +1 -0
  110. package/build/cli/instances/trackedInstance.js +64 -0
  111. package/build/cli/instances/trackedInstance.js.map +1 -0
  112. package/build/cli/modules/accessibilityModule.d.ts +46 -0
  113. package/build/cli/modules/accessibilityModule.d.ts.map +1 -0
  114. package/build/cli/modules/accessibilityModule.js +447 -0
  115. package/build/cli/modules/accessibilityModule.js.map +1 -0
  116. package/build/cli/modules/automateModule.d.ts +26 -0
  117. package/build/cli/modules/automateModule.d.ts.map +1 -0
  118. package/build/cli/modules/automateModule.js +223 -0
  119. package/build/cli/modules/automateModule.js.map +1 -0
  120. package/build/cli/modules/baseModule.d.ts +33 -0
  121. package/build/cli/modules/baseModule.d.ts.map +1 -0
  122. package/build/cli/modules/baseModule.js +52 -0
  123. package/build/cli/modules/baseModule.js.map +1 -0
  124. package/build/cli/modules/observabilityModule.d.ts +22 -0
  125. package/build/cli/modules/observabilityModule.d.ts.map +1 -0
  126. package/build/cli/modules/observabilityModule.js +46 -0
  127. package/build/cli/modules/observabilityModule.js.map +1 -0
  128. package/build/cli/modules/percyModule.d.ts +19 -0
  129. package/build/cli/modules/percyModule.d.ts.map +1 -0
  130. package/build/cli/modules/percyModule.js +78 -0
  131. package/build/cli/modules/percyModule.js.map +1 -0
  132. package/build/cli/modules/testHubModule.d.ts +30 -0
  133. package/build/cli/modules/testHubModule.d.ts.map +1 -0
  134. package/build/cli/modules/testHubModule.js +233 -0
  135. package/build/cli/modules/testHubModule.js.map +1 -0
  136. package/build/cli/modules/webdriverIOModule.d.ts +29 -0
  137. package/build/cli/modules/webdriverIOModule.d.ts.map +1 -0
  138. package/build/cli/modules/webdriverIOModule.js +129 -0
  139. package/build/cli/modules/webdriverIOModule.js.map +1 -0
  140. package/build/cli/states/automationFrameworkState.d.ts +65 -0
  141. package/build/cli/states/automationFrameworkState.d.ts.map +1 -0
  142. package/build/cli/states/automationFrameworkState.js +62 -0
  143. package/build/cli/states/automationFrameworkState.js.map +1 -0
  144. package/build/cli/states/hookState.d.ts +45 -0
  145. package/build/cli/states/hookState.d.ts.map +1 -0
  146. package/build/cli/states/hookState.js +44 -0
  147. package/build/cli/states/hookState.js.map +1 -0
  148. package/build/cli/states/testFrameworkState.d.ts +125 -0
  149. package/build/cli/states/testFrameworkState.d.ts.map +1 -0
  150. package/build/cli/states/testFrameworkState.js +116 -0
  151. package/build/cli/states/testFrameworkState.js.map +1 -0
  152. package/build/config.d.ts +29 -0
  153. package/build/config.d.ts.map +1 -0
  154. package/build/config.js +52 -0
  155. package/build/config.js.map +1 -0
  156. package/build/constants.d.ts +96 -0
  157. package/build/constants.d.ts.map +1 -0
  158. package/build/constants.js +156 -0
  159. package/build/constants.js.map +1 -0
  160. package/build/crash-reporter.d.ts +18 -0
  161. package/build/crash-reporter.d.ts.map +1 -0
  162. package/build/crash-reporter.js +134 -0
  163. package/build/crash-reporter.js.map +1 -0
  164. package/build/cucumber-types.d.ts +194 -0
  165. package/build/cucumber-types.d.ts.map +1 -0
  166. package/build/cucumber-types.js +2 -0
  167. package/build/cucumber-types.js.map +1 -0
  168. package/build/data-store.d.ts +4 -0
  169. package/build/data-store.d.ts.map +1 -0
  170. package/build/data-store.js +42 -0
  171. package/build/data-store.js.map +1 -0
  172. package/build/exitHandler.d.ts +4 -0
  173. package/build/exitHandler.d.ts.map +1 -0
  174. package/build/exitHandler.js +105 -0
  175. package/build/exitHandler.js.map +1 -0
  176. package/build/fileStream.d.ts +9 -0
  177. package/build/fileStream.d.ts.map +1 -0
  178. package/build/fileStream.js +13 -0
  179. package/build/fileStream.js.map +1 -0
  180. package/build/grpc/generated/sdk-messages-accessibility.d.ts +76 -0
  181. package/build/grpc/generated/sdk-messages-accessibility.d.ts.map +1 -0
  182. package/build/grpc/generated/sdk-messages-accessibility.js +908 -0
  183. package/build/grpc/generated/sdk-messages-accessibility.js.map +1 -0
  184. package/build/grpc/generated/sdk-messages-ai.d.ts +52 -0
  185. package/build/grpc/generated/sdk-messages-ai.d.ts.map +1 -0
  186. package/build/grpc/generated/sdk-messages-ai.js +643 -0
  187. package/build/grpc/generated/sdk-messages-ai.js.map +1 -0
  188. package/build/grpc/generated/sdk-messages-observability.d.ts +44 -0
  189. package/build/grpc/generated/sdk-messages-observability.d.ts.map +1 -0
  190. package/build/grpc/generated/sdk-messages-observability.js +505 -0
  191. package/build/grpc/generated/sdk-messages-observability.js.map +1 -0
  192. package/build/grpc/generated/sdk-messages-percy.d.ts +16 -0
  193. package/build/grpc/generated/sdk-messages-percy.d.ts.map +1 -0
  194. package/build/grpc/generated/sdk-messages-percy.js +111 -0
  195. package/build/grpc/generated/sdk-messages-percy.js.map +1 -0
  196. package/build/grpc/generated/sdk-messages-testhub.d.ts +16 -0
  197. package/build/grpc/generated/sdk-messages-testhub.d.ts.map +1 -0
  198. package/build/grpc/generated/sdk-messages-testhub.js +132 -0
  199. package/build/grpc/generated/sdk-messages-testhub.js.map +1 -0
  200. package/build/grpc/generated/sdk-messages.d.ts +288 -0
  201. package/build/grpc/generated/sdk-messages.d.ts.map +1 -0
  202. package/build/grpc/generated/sdk-messages.js +3958 -0
  203. package/build/grpc/generated/sdk-messages.js.map +1 -0
  204. package/build/grpc/generated/sdk.d.ts +282 -0
  205. package/build/grpc/generated/sdk.d.ts.map +1 -0
  206. package/build/grpc/generated/sdk.js +197 -0
  207. package/build/grpc/generated/sdk.js.map +1 -0
  208. package/build/grpc/index.d.ts +43 -0
  209. package/build/grpc/index.d.ts.map +1 -0
  210. package/build/grpc/index.js +154 -0
  211. package/build/grpc/index.js.map +1 -0
  212. package/build/index.d.ts +20 -0
  213. package/build/index.d.ts.map +1 -0
  214. package/build/index.js +13 -0
  215. package/build/index.js.map +1 -0
  216. package/build/insights-handler.d.ts +76 -0
  217. package/build/insights-handler.d.ts.map +1 -0
  218. package/build/insights-handler.js +855 -0
  219. package/build/insights-handler.js.map +1 -0
  220. package/build/instrumentation/funnelInstrumentation.d.ts +8 -0
  221. package/build/instrumentation/funnelInstrumentation.d.ts.map +1 -0
  222. package/build/instrumentation/funnelInstrumentation.js +235 -0
  223. package/build/instrumentation/funnelInstrumentation.js.map +1 -0
  224. package/build/instrumentation/performance/constants.d.ts +151 -0
  225. package/build/instrumentation/performance/constants.d.ts.map +1 -0
  226. package/build/instrumentation/performance/constants.js +158 -0
  227. package/build/instrumentation/performance/constants.js.map +1 -0
  228. package/build/instrumentation/performance/performance-tester.d.ts +55 -0
  229. package/build/instrumentation/performance/performance-tester.d.ts.map +1 -0
  230. package/build/instrumentation/performance/performance-tester.js +403 -0
  231. package/build/instrumentation/performance/performance-tester.js.map +1 -0
  232. package/build/launcher.d.ts +49 -0
  233. package/build/launcher.d.ts.map +1 -0
  234. package/build/launcher.js +1077 -0
  235. package/build/launcher.js.map +1 -0
  236. package/build/log4jsAppender.d.ts +2 -0
  237. package/build/log4jsAppender.d.ts.map +1 -0
  238. package/build/log4jsAppender.js +20 -0
  239. package/build/log4jsAppender.js.map +1 -0
  240. package/build/logPatcher.d.ts +13 -0
  241. package/build/logPatcher.d.ts.map +1 -0
  242. package/build/logPatcher.js +39 -0
  243. package/build/logPatcher.js.map +1 -0
  244. package/build/logReportingAPI.d.ts +12 -0
  245. package/build/logReportingAPI.d.ts.map +1 -0
  246. package/build/logReportingAPI.js +57 -0
  247. package/build/logReportingAPI.js.map +1 -0
  248. package/build/reporter.d.ts +40 -0
  249. package/build/reporter.d.ts.map +1 -0
  250. package/build/reporter.js +254 -0
  251. package/build/reporter.js.map +1 -0
  252. package/build/request-handler.d.ts +19 -0
  253. package/build/request-handler.d.ts.map +1 -0
  254. package/build/request-handler.js +78 -0
  255. package/build/request-handler.js.map +1 -0
  256. package/build/scripts/accessibility-scripts.d.ts +26 -0
  257. package/build/scripts/accessibility-scripts.d.ts.map +1 -0
  258. package/build/scripts/accessibility-scripts.js +91 -0
  259. package/build/scripts/accessibility-scripts.js.map +1 -0
  260. package/build/service.d.ts +68 -0
  261. package/build/service.d.ts.map +1 -0
  262. package/build/service.js +740 -0
  263. package/build/service.js.map +1 -0
  264. package/build/testHub/utils.d.ts +10 -0
  265. package/build/testHub/utils.d.ts.map +1 -0
  266. package/build/testHub/utils.js +67 -0
  267. package/build/testHub/utils.js.map +1 -0
  268. package/build/testOps/featureStats.d.ts +45 -0
  269. package/build/testOps/featureStats.d.ts.map +1 -0
  270. package/build/testOps/featureStats.js +117 -0
  271. package/build/testOps/featureStats.js.map +1 -0
  272. package/build/testOps/featureUsage.d.ts +22 -0
  273. package/build/testOps/featureUsage.d.ts.map +1 -0
  274. package/build/testOps/featureUsage.js +48 -0
  275. package/build/testOps/featureUsage.js.map +1 -0
  276. package/build/testOps/listener.d.ts +40 -0
  277. package/build/testOps/listener.d.ts.map +1 -0
  278. package/build/testOps/listener.js +269 -0
  279. package/build/testOps/listener.js.map +1 -0
  280. package/build/testOps/requestUtils.d.ts +4 -0
  281. package/build/testOps/requestUtils.d.ts.map +1 -0
  282. package/build/testOps/requestUtils.js +41 -0
  283. package/build/testOps/requestUtils.js.map +1 -0
  284. package/build/testOps/testOpsConfig.d.ts +11 -0
  285. package/build/testOps/testOpsConfig.d.ts.map +1 -0
  286. package/build/testOps/testOpsConfig.js +20 -0
  287. package/build/testOps/testOpsConfig.js.map +1 -0
  288. package/build/testOps/usageStats.d.ts +404 -0
  289. package/build/testOps/usageStats.d.ts.map +1 -0
  290. package/build/testOps/usageStats.js +115 -0
  291. package/build/testOps/usageStats.js.map +1 -0
  292. package/build/testorchestration/apply-orchestration.d.ts +7 -0
  293. package/build/testorchestration/apply-orchestration.d.ts.map +1 -0
  294. package/build/testorchestration/apply-orchestration.js +43 -0
  295. package/build/testorchestration/apply-orchestration.js.map +1 -0
  296. package/build/testorchestration/helpers.d.ts +20 -0
  297. package/build/testorchestration/helpers.d.ts.map +1 -0
  298. package/build/testorchestration/helpers.js +413 -0
  299. package/build/testorchestration/helpers.js.map +1 -0
  300. package/build/testorchestration/request-utils.d.ts +23 -0
  301. package/build/testorchestration/request-utils.d.ts.map +1 -0
  302. package/build/testorchestration/request-utils.js +82 -0
  303. package/build/testorchestration/request-utils.js.map +1 -0
  304. package/build/testorchestration/test-ordering-server.d.ts +33 -0
  305. package/build/testorchestration/test-ordering-server.d.ts.map +1 -0
  306. package/build/testorchestration/test-ordering-server.js +169 -0
  307. package/build/testorchestration/test-ordering-server.js.map +1 -0
  308. package/build/testorchestration/testorcherstrationhandler.d.ts +50 -0
  309. package/build/testorchestration/testorcherstrationhandler.d.ts.map +1 -0
  310. package/build/testorchestration/testorcherstrationhandler.js +134 -0
  311. package/build/testorchestration/testorcherstrationhandler.js.map +1 -0
  312. package/build/testorchestration/testorcherstrationutils.d.ts +86 -0
  313. package/build/testorchestration/testorcherstrationutils.d.ts.map +1 -0
  314. package/build/testorchestration/testorcherstrationutils.js +380 -0
  315. package/build/testorchestration/testorcherstrationutils.js.map +1 -0
  316. package/build/types.d.ts +413 -0
  317. package/build/types.d.ts.map +1 -0
  318. package/build/types.js +2 -0
  319. package/build/types.js.map +1 -0
  320. package/build/util.d.ts +241 -0
  321. package/build/util.d.ts.map +1 -0
  322. package/build/util.js +1665 -0
  323. package/build/util.js.map +1 -0
  324. package/package.json +96 -0
  325. package/src/proto/browserstack/sdk/v1/sdk-messages-accessibility.proto +71 -0
  326. package/src/proto/browserstack/sdk/v1/sdk-messages-ai.proto +48 -0
  327. package/src/proto/browserstack/sdk/v1/sdk-messages-observability.proto +39 -0
  328. package/src/proto/browserstack/sdk/v1/sdk-messages-percy.proto +10 -0
  329. package/src/proto/browserstack/sdk/v1/sdk-messages-testhub.proto +10 -0
  330. package/src/proto/browserstack/sdk/v1/sdk-messages.proto +276 -0
  331. package/src/proto/browserstack/sdk/v1/sdk.proto +41 -0
@@ -0,0 +1,404 @@
1
+ import FeatureStats from './featureStats.js';
2
+ import FeatureUsage from './featureUsage.js';
3
+ import type { TOUsageStats } from '../types.js';
4
+ declare class UsageStats {
5
+ static instance: UsageStats;
6
+ testStartedStats: FeatureStats;
7
+ testFinishedStats: FeatureStats;
8
+ hookStartedStats: FeatureStats;
9
+ hookFinishedStats: FeatureStats;
10
+ cbtSessionStats: FeatureStats;
11
+ logStats: FeatureStats;
12
+ launchBuildUsage: FeatureUsage;
13
+ stopBuildUsage: FeatureUsage;
14
+ static getInstance(): UsageStats;
15
+ constructor();
16
+ add(usageStats: UsageStats): void;
17
+ getFormattedData(workersData: any[]): TOUsageStats;
18
+ addDataFromWorkers(workersData: any[]): void;
19
+ getEventsData(): {
20
+ buildEvents: {
21
+ started: {
22
+ isTriggered: boolean | undefined;
23
+ status: string | undefined;
24
+ error: string | undefined;
25
+ };
26
+ finished: {
27
+ isTriggered: boolean | undefined;
28
+ status: string | undefined;
29
+ error: string | undefined;
30
+ };
31
+ };
32
+ testEvents: {
33
+ triggeredCount: number;
34
+ sentCount: number;
35
+ failedCount: number;
36
+ started: {
37
+ triggeredCount: number;
38
+ sentCount: number;
39
+ failedCount: number;
40
+ } | {
41
+ groups: Record<string, import("../types.js").FeatureStatsOverview>;
42
+ triggeredCount: number;
43
+ sentCount: number;
44
+ failedCount: number;
45
+ } | {
46
+ [x: string]: import("../types.js").FeatureStatsOverview;
47
+ } | {
48
+ groups: Record<string, import("../types.js").FeatureStatsOverview>;
49
+ };
50
+ finished: {
51
+ triggeredCount: number;
52
+ sentCount: number;
53
+ failedCount: number;
54
+ } | {
55
+ groups: Record<string, import("../types.js").FeatureStatsOverview>;
56
+ triggeredCount: number;
57
+ sentCount: number;
58
+ failedCount: number;
59
+ } | {
60
+ [x: string]: import("../types.js").FeatureStatsOverview;
61
+ } | {
62
+ groups: Record<string, import("../types.js").FeatureStatsOverview>;
63
+ };
64
+ } | {
65
+ groups: Record<string, import("../types.js").FeatureStatsOverview>;
66
+ triggeredCount: number;
67
+ sentCount: number;
68
+ failedCount: number;
69
+ started: {
70
+ triggeredCount: number;
71
+ sentCount: number;
72
+ failedCount: number;
73
+ } | {
74
+ groups: Record<string, import("../types.js").FeatureStatsOverview>;
75
+ triggeredCount: number;
76
+ sentCount: number;
77
+ failedCount: number;
78
+ } | {
79
+ [x: string]: import("../types.js").FeatureStatsOverview;
80
+ } | {
81
+ groups: Record<string, import("../types.js").FeatureStatsOverview>;
82
+ };
83
+ finished: {
84
+ triggeredCount: number;
85
+ sentCount: number;
86
+ failedCount: number;
87
+ } | {
88
+ groups: Record<string, import("../types.js").FeatureStatsOverview>;
89
+ triggeredCount: number;
90
+ sentCount: number;
91
+ failedCount: number;
92
+ } | {
93
+ [x: string]: import("../types.js").FeatureStatsOverview;
94
+ } | {
95
+ groups: Record<string, import("../types.js").FeatureStatsOverview>;
96
+ };
97
+ } | {
98
+ started: {
99
+ triggeredCount: number;
100
+ sentCount: number;
101
+ failedCount: number;
102
+ } | {
103
+ groups: Record<string, import("../types.js").FeatureStatsOverview>;
104
+ triggeredCount: number;
105
+ sentCount: number;
106
+ failedCount: number;
107
+ } | {
108
+ [x: string]: import("../types.js").FeatureStatsOverview;
109
+ } | {
110
+ groups: Record<string, import("../types.js").FeatureStatsOverview>;
111
+ };
112
+ finished: {
113
+ triggeredCount: number;
114
+ sentCount: number;
115
+ failedCount: number;
116
+ } | {
117
+ groups: Record<string, import("../types.js").FeatureStatsOverview>;
118
+ triggeredCount: number;
119
+ sentCount: number;
120
+ failedCount: number;
121
+ } | {
122
+ [x: string]: import("../types.js").FeatureStatsOverview;
123
+ } | {
124
+ groups: Record<string, import("../types.js").FeatureStatsOverview>;
125
+ };
126
+ } | {
127
+ groups: Record<string, import("../types.js").FeatureStatsOverview>;
128
+ started: {
129
+ triggeredCount: number;
130
+ sentCount: number;
131
+ failedCount: number;
132
+ } | {
133
+ groups: Record<string, import("../types.js").FeatureStatsOverview>;
134
+ triggeredCount: number;
135
+ sentCount: number;
136
+ failedCount: number;
137
+ } | {
138
+ [x: string]: import("../types.js").FeatureStatsOverview;
139
+ } | {
140
+ groups: Record<string, import("../types.js").FeatureStatsOverview>;
141
+ };
142
+ finished: {
143
+ triggeredCount: number;
144
+ sentCount: number;
145
+ failedCount: number;
146
+ } | {
147
+ groups: Record<string, import("../types.js").FeatureStatsOverview>;
148
+ triggeredCount: number;
149
+ sentCount: number;
150
+ failedCount: number;
151
+ } | {
152
+ [x: string]: import("../types.js").FeatureStatsOverview;
153
+ } | {
154
+ groups: Record<string, import("../types.js").FeatureStatsOverview>;
155
+ };
156
+ };
157
+ hookEvents: {
158
+ triggeredCount: number;
159
+ sentCount: number;
160
+ failedCount: number;
161
+ started: {
162
+ triggeredCount: number;
163
+ sentCount: number;
164
+ failedCount: number;
165
+ } | {
166
+ groups: Record<string, import("../types.js").FeatureStatsOverview>;
167
+ triggeredCount: number;
168
+ sentCount: number;
169
+ failedCount: number;
170
+ } | {
171
+ [x: string]: import("../types.js").FeatureStatsOverview;
172
+ } | {
173
+ groups: Record<string, import("../types.js").FeatureStatsOverview>;
174
+ };
175
+ finished: {
176
+ triggeredCount: number;
177
+ sentCount: number;
178
+ failedCount: number;
179
+ } | {
180
+ groups: Record<string, import("../types.js").FeatureStatsOverview>;
181
+ triggeredCount: number;
182
+ sentCount: number;
183
+ failedCount: number;
184
+ } | {
185
+ [x: string]: import("../types.js").FeatureStatsOverview;
186
+ } | {
187
+ groups: Record<string, import("../types.js").FeatureStatsOverview>;
188
+ };
189
+ } | {
190
+ groups: Record<string, import("../types.js").FeatureStatsOverview>;
191
+ triggeredCount: number;
192
+ sentCount: number;
193
+ failedCount: number;
194
+ started: {
195
+ triggeredCount: number;
196
+ sentCount: number;
197
+ failedCount: number;
198
+ } | {
199
+ groups: Record<string, import("../types.js").FeatureStatsOverview>;
200
+ triggeredCount: number;
201
+ sentCount: number;
202
+ failedCount: number;
203
+ } | {
204
+ [x: string]: import("../types.js").FeatureStatsOverview;
205
+ } | {
206
+ groups: Record<string, import("../types.js").FeatureStatsOverview>;
207
+ };
208
+ finished: {
209
+ triggeredCount: number;
210
+ sentCount: number;
211
+ failedCount: number;
212
+ } | {
213
+ groups: Record<string, import("../types.js").FeatureStatsOverview>;
214
+ triggeredCount: number;
215
+ sentCount: number;
216
+ failedCount: number;
217
+ } | {
218
+ [x: string]: import("../types.js").FeatureStatsOverview;
219
+ } | {
220
+ groups: Record<string, import("../types.js").FeatureStatsOverview>;
221
+ };
222
+ } | {
223
+ started: {
224
+ triggeredCount: number;
225
+ sentCount: number;
226
+ failedCount: number;
227
+ } | {
228
+ groups: Record<string, import("../types.js").FeatureStatsOverview>;
229
+ triggeredCount: number;
230
+ sentCount: number;
231
+ failedCount: number;
232
+ } | {
233
+ [x: string]: import("../types.js").FeatureStatsOverview;
234
+ } | {
235
+ groups: Record<string, import("../types.js").FeatureStatsOverview>;
236
+ };
237
+ finished: {
238
+ triggeredCount: number;
239
+ sentCount: number;
240
+ failedCount: number;
241
+ } | {
242
+ groups: Record<string, import("../types.js").FeatureStatsOverview>;
243
+ triggeredCount: number;
244
+ sentCount: number;
245
+ failedCount: number;
246
+ } | {
247
+ [x: string]: import("../types.js").FeatureStatsOverview;
248
+ } | {
249
+ groups: Record<string, import("../types.js").FeatureStatsOverview>;
250
+ };
251
+ } | {
252
+ groups: Record<string, import("../types.js").FeatureStatsOverview>;
253
+ started: {
254
+ triggeredCount: number;
255
+ sentCount: number;
256
+ failedCount: number;
257
+ } | {
258
+ groups: Record<string, import("../types.js").FeatureStatsOverview>;
259
+ triggeredCount: number;
260
+ sentCount: number;
261
+ failedCount: number;
262
+ } | {
263
+ [x: string]: import("../types.js").FeatureStatsOverview;
264
+ } | {
265
+ groups: Record<string, import("../types.js").FeatureStatsOverview>;
266
+ };
267
+ finished: {
268
+ triggeredCount: number;
269
+ sentCount: number;
270
+ failedCount: number;
271
+ } | {
272
+ groups: Record<string, import("../types.js").FeatureStatsOverview>;
273
+ triggeredCount: number;
274
+ sentCount: number;
275
+ failedCount: number;
276
+ } | {
277
+ [x: string]: import("../types.js").FeatureStatsOverview;
278
+ } | {
279
+ groups: Record<string, import("../types.js").FeatureStatsOverview>;
280
+ };
281
+ };
282
+ logEvents: {
283
+ triggeredCount: number;
284
+ sentCount: number;
285
+ failedCount: number;
286
+ } | {
287
+ groups: Record<string, import("../types.js").FeatureStatsOverview>;
288
+ triggeredCount: number;
289
+ sentCount: number;
290
+ failedCount: number;
291
+ } | {
292
+ [x: string]: import("../types.js").FeatureStatsOverview;
293
+ } | {
294
+ groups: Record<string, import("../types.js").FeatureStatsOverview>;
295
+ };
296
+ cbtSessionEvents: {
297
+ triggeredCount: number;
298
+ sentCount: number;
299
+ failedCount: number;
300
+ } | {
301
+ groups: Record<string, import("../types.js").FeatureStatsOverview>;
302
+ triggeredCount: number;
303
+ sentCount: number;
304
+ failedCount: number;
305
+ } | {
306
+ [x: string]: import("../types.js").FeatureStatsOverview;
307
+ } | {
308
+ groups: Record<string, import("../types.js").FeatureStatsOverview>;
309
+ };
310
+ };
311
+ getDataToSave(): {
312
+ testEvents: {
313
+ started: {
314
+ triggeredCount: number;
315
+ sentCount: number;
316
+ failedCount: number;
317
+ } | {
318
+ groups: Record<string, import("../types.js").FeatureStatsOverview>;
319
+ triggeredCount: number;
320
+ sentCount: number;
321
+ failedCount: number;
322
+ } | {
323
+ [x: string]: import("../types.js").FeatureStatsOverview;
324
+ } | {
325
+ groups: Record<string, import("../types.js").FeatureStatsOverview>;
326
+ };
327
+ finished: {
328
+ triggeredCount: number;
329
+ sentCount: number;
330
+ failedCount: number;
331
+ } | {
332
+ groups: Record<string, import("../types.js").FeatureStatsOverview>;
333
+ triggeredCount: number;
334
+ sentCount: number;
335
+ failedCount: number;
336
+ } | {
337
+ [x: string]: import("../types.js").FeatureStatsOverview;
338
+ } | {
339
+ groups: Record<string, import("../types.js").FeatureStatsOverview>;
340
+ };
341
+ };
342
+ hookEvents: {
343
+ started: {
344
+ triggeredCount: number;
345
+ sentCount: number;
346
+ failedCount: number;
347
+ } | {
348
+ groups: Record<string, import("../types.js").FeatureStatsOverview>;
349
+ triggeredCount: number;
350
+ sentCount: number;
351
+ failedCount: number;
352
+ } | {
353
+ [x: string]: import("../types.js").FeatureStatsOverview;
354
+ } | {
355
+ groups: Record<string, import("../types.js").FeatureStatsOverview>;
356
+ };
357
+ finished: {
358
+ triggeredCount: number;
359
+ sentCount: number;
360
+ failedCount: number;
361
+ } | {
362
+ groups: Record<string, import("../types.js").FeatureStatsOverview>;
363
+ triggeredCount: number;
364
+ sentCount: number;
365
+ failedCount: number;
366
+ } | {
367
+ [x: string]: import("../types.js").FeatureStatsOverview;
368
+ } | {
369
+ groups: Record<string, import("../types.js").FeatureStatsOverview>;
370
+ };
371
+ };
372
+ logEvents: {
373
+ triggeredCount: number;
374
+ sentCount: number;
375
+ failedCount: number;
376
+ } | {
377
+ groups: Record<string, import("../types.js").FeatureStatsOverview>;
378
+ triggeredCount: number;
379
+ sentCount: number;
380
+ failedCount: number;
381
+ } | {
382
+ [x: string]: import("../types.js").FeatureStatsOverview;
383
+ } | {
384
+ groups: Record<string, import("../types.js").FeatureStatsOverview>;
385
+ };
386
+ cbtSessionEvents: {
387
+ triggeredCount: number;
388
+ sentCount: number;
389
+ failedCount: number;
390
+ } | {
391
+ groups: Record<string, import("../types.js").FeatureStatsOverview>;
392
+ triggeredCount: number;
393
+ sentCount: number;
394
+ failedCount: number;
395
+ } | {
396
+ [x: string]: import("../types.js").FeatureStatsOverview;
397
+ } | {
398
+ groups: Record<string, import("../types.js").FeatureStatsOverview>;
399
+ };
400
+ };
401
+ static fromJSON(data: any): UsageStats;
402
+ }
403
+ export default UsageStats;
404
+ //# sourceMappingURL=usageStats.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usageStats.d.ts","sourceRoot":"","sources":["../../src/testOps/usageStats.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,mBAAmB,CAAA;AAC5C,OAAO,YAAY,MAAM,mBAAmB,CAAA;AAG5C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAE/C,cAAM,UAAU;IACZ,OAAc,QAAQ,EAAE,UAAU,CAAA;IAC3B,gBAAgB,EAAE,YAAY,CAAA;IAC9B,iBAAiB,EAAE,YAAY,CAAA;IAC/B,gBAAgB,EAAE,YAAY,CAAA;IAC9B,iBAAiB,EAAE,YAAY,CAAA;IAC/B,eAAe,EAAE,YAAY,CAAA;IAC7B,QAAQ,EAAE,YAAY,CAAA;IACtB,gBAAgB,EAAE,YAAY,CAAA;IAC9B,cAAc,EAAE,YAAY,CAAA;WAErB,WAAW,IAAI,UAAU;;IAkBhC,GAAG,CAAC,UAAU,EAAE,UAAU,GAAG,IAAI;IASjC,gBAAgB,CAAC,WAAW,EAAE,GAAG,EAAE;IAsBnC,kBAAkB,CAAC,WAAW,EAAE,GAAG,EAAE;IAWrC,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAqBb,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WAeN,QAAQ,CAAC,IAAI,EAAE,GAAG;CAUnC;AAED,eAAe,UAAU,CAAA"}
@@ -0,0 +1,115 @@
1
+ import FeatureStats from './featureStats.js';
2
+ import FeatureUsage from './featureUsage.js';
3
+ import { BStackLogger } from '../bstackLogger.js';
4
+ import TestOpsConfig from './testOpsConfig.js';
5
+ class UsageStats {
6
+ static instance;
7
+ testStartedStats;
8
+ testFinishedStats;
9
+ hookStartedStats;
10
+ hookFinishedStats;
11
+ cbtSessionStats;
12
+ logStats;
13
+ launchBuildUsage;
14
+ stopBuildUsage;
15
+ static getInstance() {
16
+ if (!UsageStats.instance) {
17
+ UsageStats.instance = new UsageStats();
18
+ }
19
+ return UsageStats.instance;
20
+ }
21
+ constructor() {
22
+ this.testStartedStats = new FeatureStats();
23
+ this.testFinishedStats = new FeatureStats();
24
+ this.hookStartedStats = new FeatureStats();
25
+ this.hookFinishedStats = new FeatureStats();
26
+ this.cbtSessionStats = new FeatureStats();
27
+ this.logStats = new FeatureStats();
28
+ this.launchBuildUsage = new FeatureUsage();
29
+ this.stopBuildUsage = new FeatureUsage();
30
+ }
31
+ add(usageStats) {
32
+ this.testStartedStats.add(usageStats.testStartedStats);
33
+ this.testFinishedStats.add(usageStats.testFinishedStats);
34
+ this.hookStartedStats.add(usageStats.hookStartedStats);
35
+ this.hookFinishedStats.add(usageStats.hookFinishedStats);
36
+ this.cbtSessionStats.add(usageStats.cbtSessionStats);
37
+ this.logStats.add(usageStats.logStats);
38
+ }
39
+ getFormattedData(workersData) {
40
+ this.addDataFromWorkers(workersData);
41
+ const testOpsConfig = TestOpsConfig.getInstance();
42
+ const usage = {
43
+ enabled: testOpsConfig.enabled,
44
+ manuallySet: testOpsConfig.manuallySet,
45
+ buildHashedId: testOpsConfig.buildHashedId
46
+ };
47
+ if (!usage.enabled) {
48
+ return usage;
49
+ }
50
+ try {
51
+ usage.events = this.getEventsData();
52
+ }
53
+ catch (e) {
54
+ BStackLogger.debug('exception in getFormattedData: ' + e);
55
+ }
56
+ return usage;
57
+ }
58
+ addDataFromWorkers(workersData) {
59
+ workersData.map(workerData => {
60
+ try {
61
+ const usageStatsForWorker = UsageStats.fromJSON(workerData.usageStats);
62
+ this.add(usageStatsForWorker);
63
+ }
64
+ catch (e) {
65
+ BStackLogger.debug('Exception in adding workerData: ' + e);
66
+ }
67
+ });
68
+ }
69
+ getEventsData() {
70
+ return {
71
+ buildEvents: {
72
+ started: this.launchBuildUsage.toJSON(),
73
+ finished: this.stopBuildUsage.toJSON()
74
+ },
75
+ testEvents: {
76
+ started: this.testStartedStats.toJSON(),
77
+ finished: this.testFinishedStats.toJSON({ omitGroups: true }),
78
+ ...this.testFinishedStats.toJSON({ onlyGroups: true })
79
+ },
80
+ hookEvents: {
81
+ started: this.hookStartedStats.toJSON(),
82
+ finished: this.hookFinishedStats.toJSON({ omitGroups: true }),
83
+ ...this.hookFinishedStats.toJSON({ onlyGroups: true })
84
+ },
85
+ logEvents: this.logStats.toJSON(),
86
+ cbtSessionEvents: this.cbtSessionStats.toJSON()
87
+ };
88
+ }
89
+ getDataToSave() {
90
+ return {
91
+ testEvents: {
92
+ started: this.testStartedStats.toJSON(),
93
+ finished: this.testFinishedStats.toJSON({ nestedGroups: true }),
94
+ },
95
+ hookEvents: {
96
+ started: this.hookStartedStats.toJSON(),
97
+ finished: this.hookFinishedStats.toJSON({ nestedGroups: true }),
98
+ },
99
+ logEvents: this.logStats.toJSON({ nestedGroups: true }),
100
+ cbtSessionEvents: this.cbtSessionStats.toJSON()
101
+ };
102
+ }
103
+ static fromJSON(data) {
104
+ const usageStats = new UsageStats();
105
+ usageStats.testStartedStats = FeatureStats.fromJSON(data.testEvents.started);
106
+ usageStats.testFinishedStats = FeatureStats.fromJSON(data.testEvents.finished);
107
+ usageStats.hookStartedStats = FeatureStats.fromJSON(data.hookEvents.started);
108
+ usageStats.hookFinishedStats = FeatureStats.fromJSON(data.hookEvents.finished);
109
+ usageStats.logStats = FeatureStats.fromJSON(data.logEvents);
110
+ usageStats.cbtSessionStats = FeatureStats.fromJSON(data.cbtSessionStats);
111
+ return usageStats;
112
+ }
113
+ }
114
+ export default UsageStats;
115
+ //# sourceMappingURL=usageStats.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usageStats.js","sourceRoot":"","sources":["../../src/testOps/usageStats.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,mBAAmB,CAAA;AAC5C,OAAO,YAAY,MAAM,mBAAmB,CAAA;AA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AAI,EAAE,CAAC;YACvD,gBAAgB,EAAE,IAAI,CAAC,eAAe,CAAC,MAAM,EAAE;SAClD,CAAA;IACL,CAAC;IAEM,MAAM,CAAC,QAAQ,CAAC,IAAS;QAC5B,MAAM,UAAU,GAAG,IAAI,UAAU,EAAE,CAAA;QACnC,UAAU,CAAC,gBAAgB,GAAG,YAAY,CAAC,QAAQ,CAAC,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,CAAA;QAC5E,UAAU,CAAC,iBAAiB,GAAG,YAAY,CAAC,QAAQ,CAAC,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAA;QAC9E,UAAU,CAAC,gBAAgB,GAAG,YAAY,CAAC,QAAQ,CAAC,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,CAAA;QAC5E,UAAU,CAAC,iBAAiB,GAAG,YAAY,CAAC,QAAQ,CAAC,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAA;QAC9E,UAAU,CAAC,QAAQ,GAAG,YAAY,CAAC,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,CAAA;QAC3D,UAAU,CAAC,eAAe,GAAG,YAAY,CAAC,QAAQ,CAAC,IAAI,CAAC,eAAe,CAAC,CAAA;QACxE,OAAO,UAAU,CAAA;IACrB,CAAC;CACJ;AAED,eAAe,UAAU,CAAA"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Applies test orchestration to the WebdriverIO test run
3
+ * This function is the main entry point for the orchestration integration
4
+ */
5
+ export declare function applyOrchestrationIfEnabled(specs: string[], config: Record<string, any>): Promise<string[]>;
6
+ export default applyOrchestrationIfEnabled;
7
+ //# sourceMappingURL=apply-orchestration.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"apply-orchestration.d.ts","sourceRoot":"","sources":["../../src/testorchestration/apply-orchestration.ts"],"names":[],"mappings":"AAIA;;;GAGG;AACH,wBAAsB,2BAA2B,CAC7C,KAAK,EAAE,MAAM,EAAE,EACf,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAC5B,OAAO,CAAC,MAAM,EAAE,CAAC,CA4CnB;AAED,eAAe,2BAA2B,CAAA"}
@@ -0,0 +1,43 @@
1
+ import { performance } from 'node:perf_hooks';
2
+ import { TestOrchestrationHandler } from './testorcherstrationhandler.js';
3
+ import { BStackLogger } from '../bstackLogger.js';
4
+ import { isValidEnabledValue } from '../util.js';
5
+ /**
6
+ * Applies test orchestration to the WebdriverIO test run
7
+ * This function is the main entry point for the orchestration integration
8
+ */
9
+ export async function applyOrchestrationIfEnabled(specs, config) {
10
+ // Initialize orchestration handler
11
+ const orchestrationHandler = TestOrchestrationHandler.getInstance(config);
12
+ if (!orchestrationHandler) {
13
+ BStackLogger.debug('Orchestration handler is not initialized. Skipping orchestration.');
14
+ return specs;
15
+ }
16
+ // Check if runSmartSelection is enabled in config
17
+ const runSmartSelectionEnabled = isValidEnabledValue(config?.testOrchestrationOptions?.runSmartSelection?.enabled);
18
+ if (!runSmartSelectionEnabled) {
19
+ BStackLogger.info('runSmartSelection is not enabled in config. Skipping orchestration.');
20
+ return specs;
21
+ }
22
+ const startTime = performance.now();
23
+ // if (orchestrationHandler.testOrderingEnabled()) {
24
+ BStackLogger.info('Test orchestration is enabled. Attempting to reorder test files.');
25
+ // Get the test files from the specs - pass them as received
26
+ const testFiles = specs;
27
+ BStackLogger.info(`Test files to be reordered: ${testFiles.join(', ')}`);
28
+ // Reorder the test files
29
+ const orderedFiles = await orchestrationHandler.reorderTestFiles(testFiles);
30
+ if (orderedFiles && orderedFiles.length > 0) {
31
+ BStackLogger.info(`Tests reordered using orchestration: ${orderedFiles.join(', ')}`);
32
+ // Return the ordered files as the new specs
33
+ orchestrationHandler.addToOrderingInstrumentationData('timeTakenToApply', Math.floor(performance.now() - startTime) // Time in milliseconds
34
+ );
35
+ return orderedFiles;
36
+ }
37
+ BStackLogger.info('No test files were reordered by orchestration.');
38
+ orchestrationHandler.addToOrderingInstrumentationData('timeTakenToApply', Math.floor(performance.now() - startTime) // Time in milliseconds
39
+ );
40
+ return specs;
41
+ }
42
+ export default applyOrchestrationIfEnabled;
43
+ //# sourceMappingURL=apply-orchestration.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"apply-orchestration.js","sourceRoot":"","sources":["../../src/testorchestration/apply-orchestration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAC7C,OAAO,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAA;AACzE,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AACjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAA;AAChD;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,2BAA2B,CAC7C,KAAe,EACf,MAA2B;IAE3B,mCAAmC;IACnC,MAAM,oBAAoB,GAAG,wBAAwB,CAAC,WAAW,CAAC,MAAM,CAAC,CAAA;IACzE,IAAI,CAAC,oBAAoB,EAAE,CAAC;QACxB,YAAY,CAAC,KAAK,CAAC,mEAAmE,CAAC,CAAA;QACvF,OAAO,KAAK,CAAA;IAChB,CAAC;IAED,kDAAkD;IAClD,MAAM,wBAAwB,GAAG,mBAAmB,CAAC,MAAM,EAAE,wBAAwB,EAAE,iBAAiB,EAAE,OAAO,CAAC,CAAA;IAClH,IAAI,CAAC,wBAAwB,EAAE,CAAC;QAC5B,YAAY,CAAC,IAAI,CAAC,qEAAqE,CAAC,CAAA;QACxF,OAAO,KAAK,CAAA;IAChB,CAAC;IAED,MAAM,SAAS,GAAG,WAAW,CAAC,GAAG,EAAE,CAAA;IAEnC,oDAAoD;IACpD,YAAY,CAAC,IAAI,CAAC,kEAAkE,CAAC,CAAA;IAErF,4DAA4D;IAC5D,MAAM,SAAS,GAAG,KAAK,CAAA;IACvB,YAAY,CAAC,IAAI,CAAC,+BAA+B,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;IAExE,yBAAyB;IACzB,MAAM,YAAY,GAAG,MAAM,oBAAoB,CAAC,gBAAgB,CAAC,SAAS,CAAC,CAAA;IAE3E,IAAI,YAAY,IAAI,YAAY,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC1C,YAAY,CAAC,IAAI,CAAC,wCAAwC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;QAEpF,4CAA4C;QAC5C,oBAAoB,CAAC,gCAAgC,CACjD,kBAAkB,EAClB,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,GAAG,EAAE,GAAG,SAAS,CAAC,CAAC,uBAAuB;SACpE,CAAA;QAED,OAAO,YAAY,CAAA;IACvB,CAAC;IACD,YAAY,CAAC,IAAI,CAAC,gDAAgD,CAAC,CAAA;IACnE,oBAAoB,CAAC,gCAAgC,CACjD,kBAAkB,EAClB,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,GAAG,EAAE,GAAG,SAAS,CAAC,CAAC,uBAAuB;KACpE,CAAA;IACD,OAAO,KAAK,CAAA;AAChB,CAAC;AAED,eAAe,2BAA2B,CAAA"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Get host information for the test orchestration
3
+ */
4
+ export declare function getHostInfo(): {
5
+ hostname: string;
6
+ platform: NodeJS.Platform;
7
+ architecture: NodeJS.Architecture;
8
+ release: string;
9
+ username: string;
10
+ };
11
+ /**
12
+ * Get git metadata
13
+ */
14
+ export declare function getGitMetadata(): Record<string, any>;
15
+ /**
16
+ * Get Git metadata for AI selection
17
+ * @param multiRepoSource Array of repository paths for multi-repo setup
18
+ */
19
+ export declare function getGitMetadataForAISelection(folders?: string[]): any[];
20
+ //# sourceMappingURL=helpers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../src/testorchestration/helpers.ts"],"names":[],"mappings":"AAUA;;GAEG;AACH,wBAAgB,WAAW;;;;;;EAQ1B;AA0ED;;GAEG;AACH,wBAAgB,cAAc,IAAI,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAyFpD;AA8FD;;;GAGG;AACH,wBAAgB,4BAA4B,CAAC,OAAO,GAAE,MAAM,EAAO,GAAG,GAAG,EAAE,CA4K1E"}