@api-client/core 0.3.11 → 0.4.1

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 (356) hide show
  1. package/build/browser.d.ts +10 -8
  2. package/build/browser.js +11 -7
  3. package/build/browser.js.map +1 -1
  4. package/build/index.d.ts +12 -11
  5. package/build/index.js +9 -9
  6. package/build/index.js.map +1 -1
  7. package/build/src/data/JmesparthReader.d.ts +1 -1
  8. package/build/src/data/JmesparthReader.js +1 -1
  9. package/build/src/events/models/ProjectEvents.d.ts +1 -1
  10. package/build/src/events/models/ProjectEvents.js +1 -2
  11. package/build/src/events/models/ProjectEvents.js.map +1 -1
  12. package/build/src/lib/transformers/PayloadSerializer.d.ts +2 -2
  13. package/build/src/lib/transformers/PayloadSerializer.js +3 -3
  14. package/build/src/lib/transformers/PayloadSerializer.js.map +1 -1
  15. package/build/src/mocking/ProjectMock.d.ts +7 -1
  16. package/build/src/mocking/ProjectMock.js +6 -0
  17. package/build/src/mocking/ProjectMock.js.map +1 -1
  18. package/build/src/mocking/lib/History.d.ts +70 -0
  19. package/build/src/mocking/lib/History.js +120 -0
  20. package/build/src/mocking/lib/History.js.map +1 -0
  21. package/build/src/mocking/lib/Request.d.ts +2 -2
  22. package/build/src/mocking/lib/Request.js +3 -2
  23. package/build/src/mocking/lib/Request.js.map +1 -1
  24. package/build/src/mocking/lib/Response.d.ts +6 -6
  25. package/build/src/mocking/lib/Response.js +6 -6
  26. package/build/src/mocking/lib/Response.js.map +1 -1
  27. package/build/src/mocking/lib/User.d.ts +20 -0
  28. package/build/src/mocking/lib/User.js +54 -0
  29. package/build/src/mocking/lib/User.js.map +1 -0
  30. package/build/src/models/AuthorizationData.d.ts +2 -2
  31. package/build/src/models/AuthorizationData.js +2 -2
  32. package/build/src/models/Backend.d.ts +85 -0
  33. package/build/src/models/ClientCertificate.d.ts +1 -1
  34. package/build/src/models/Environment.d.ts +3 -3
  35. package/build/src/models/Environment.js +3 -3
  36. package/build/src/models/Environment.js.map +1 -1
  37. package/build/src/models/ErrorResponse.d.ts +1 -1
  38. package/build/src/models/ErrorResponse.js +1 -1
  39. package/build/src/models/HostRule.d.ts +4 -4
  40. package/build/src/models/HostRule.js +4 -4
  41. package/build/src/models/HostRule.js.map +1 -1
  42. package/build/src/models/HttpHistory.d.ts +64 -18
  43. package/build/src/models/HttpHistory.js +43 -19
  44. package/build/src/models/HttpHistory.js.map +1 -1
  45. package/build/src/models/HttpProject.d.ts +4 -5
  46. package/build/src/models/HttpProject.js +3 -3
  47. package/build/src/models/HttpProject.js.map +1 -1
  48. package/build/src/models/HttpProjectListItem.d.ts +1 -1
  49. package/build/src/models/HttpProjectListItem.js +1 -1
  50. package/build/src/models/HttpProjectListItem.js.map +1 -1
  51. package/build/src/models/HttpRequest.d.ts +2 -2
  52. package/build/src/models/HttpRequest.js +2 -2
  53. package/build/src/models/HttpRequest.js.map +1 -1
  54. package/build/src/models/HttpResponse.d.ts +2 -2
  55. package/build/src/models/HttpResponse.js +3 -3
  56. package/build/src/models/HttpResponse.js.map +1 -1
  57. package/build/src/models/License.d.ts +3 -3
  58. package/build/src/models/License.js +3 -3
  59. package/build/src/models/License.js.map +1 -1
  60. package/build/src/models/ProjectFolder.d.ts +2 -2
  61. package/build/src/models/ProjectFolder.js +3 -3
  62. package/build/src/models/ProjectFolder.js.map +1 -1
  63. package/build/src/models/ProjectItem.d.ts +1 -1
  64. package/build/src/models/ProjectItem.js +2 -2
  65. package/build/src/models/ProjectItem.js.map +1 -1
  66. package/build/src/models/ProjectRequest.d.ts +2 -2
  67. package/build/src/models/ProjectRequest.js +1 -1
  68. package/build/src/models/ProjectRequest.js.map +1 -1
  69. package/build/src/models/ProjectSchema.d.ts +2 -2
  70. package/build/src/models/ProjectSchema.js +1 -1
  71. package/build/src/models/ProjectSchema.js.map +1 -1
  72. package/build/src/models/Property.d.ts +4 -4
  73. package/build/src/models/Property.js +4 -4
  74. package/build/src/models/Property.js.map +1 -1
  75. package/build/src/models/Provider.d.ts +3 -3
  76. package/build/src/models/Provider.js +3 -3
  77. package/build/src/models/Provider.js.map +1 -1
  78. package/build/src/models/Request.d.ts +2 -2
  79. package/build/src/models/Request.js +3 -3
  80. package/build/src/models/Request.js.map +1 -1
  81. package/build/src/models/RequestActions.d.ts +2 -4
  82. package/build/src/models/RequestActions.js +2 -4
  83. package/build/src/models/RequestActions.js.map +1 -1
  84. package/build/src/models/RequestAuthorization.d.ts +3 -5
  85. package/build/src/models/RequestAuthorization.js +2 -4
  86. package/build/src/models/RequestAuthorization.js.map +1 -1
  87. package/build/src/models/RequestConfig.d.ts +3 -5
  88. package/build/src/models/RequestConfig.js +1 -3
  89. package/build/src/models/RequestConfig.js.map +1 -1
  90. package/build/src/models/RequestLog.d.ts +14 -8
  91. package/build/src/models/RequestLog.js +18 -7
  92. package/build/src/models/RequestLog.js.map +1 -1
  93. package/build/src/models/RequestTime.d.ts +4 -6
  94. package/build/src/models/RequestTime.js +2 -4
  95. package/build/src/models/RequestTime.js.map +1 -1
  96. package/build/src/models/RequestUiMeta.d.ts +5 -5
  97. package/build/src/models/RequestUiMeta.js +2 -2
  98. package/build/src/models/RequestUiMeta.js.map +1 -1
  99. package/build/src/models/RequestsSize.d.ts +1 -3
  100. package/build/src/models/RequestsSize.js +1 -3
  101. package/build/src/models/RequestsSize.js.map +1 -1
  102. package/build/src/models/{ArcResponse.d.ts → Response.d.ts} +7 -9
  103. package/build/src/models/{ArcResponse.js → Response.js} +4 -6
  104. package/build/src/models/Response.js.map +1 -0
  105. package/build/src/models/ResponseAuthorization.d.ts +3 -3
  106. package/build/src/models/ResponseAuthorization.js +3 -3
  107. package/build/src/models/ResponseAuthorization.js.map +1 -1
  108. package/build/src/models/ResponseRedirect.d.ts +3 -5
  109. package/build/src/models/ResponseRedirect.js +1 -3
  110. package/build/src/models/ResponseRedirect.js.map +1 -1
  111. package/build/src/models/RevisionInfo.d.ts +1 -1
  112. package/build/src/models/RevisionInfo.js +1 -1
  113. package/build/src/models/RevisionInfo.js.map +1 -1
  114. package/build/src/models/SentRequest.d.ts +2 -4
  115. package/build/src/models/SentRequest.js +1 -3
  116. package/build/src/models/SentRequest.js.map +1 -1
  117. package/build/src/models/Server.d.ts +3 -3
  118. package/build/src/models/Server.js +3 -3
  119. package/build/src/models/Server.js.map +1 -1
  120. package/build/src/models/Thing.d.ts +3 -3
  121. package/build/src/models/Thing.js +3 -3
  122. package/build/src/models/Thing.js.map +1 -1
  123. package/build/src/models/Url.d.ts +2 -4
  124. package/build/src/models/Url.js +2 -4
  125. package/build/src/models/Url.js.map +1 -1
  126. package/build/src/models/User.d.ts +2 -1
  127. package/build/src/models/User.js +1 -1
  128. package/build/src/models/User.js.map +1 -1
  129. package/build/src/models/WebApi.d.ts +1 -1
  130. package/build/src/models/WebApi.js +1 -1
  131. package/build/src/models/WebApi.js.map +1 -1
  132. package/build/src/models/WebApiIndex.d.ts +1 -1
  133. package/build/src/models/WebApiIndex.js +1 -1
  134. package/build/src/models/WebApiIndex.js.map +1 -1
  135. package/build/src/models/Workspace.d.ts +4 -4
  136. package/build/src/models/Workspace.js +4 -4
  137. package/build/src/models/Workspace.js.map +1 -1
  138. package/build/src/models/actions/Action.d.ts +2 -2
  139. package/build/src/models/actions/Action.js +1 -1
  140. package/build/src/models/actions/Action.js.map +1 -1
  141. package/build/src/models/actions/Condition.d.ts +2 -2
  142. package/build/src/models/actions/Condition.js +1 -1
  143. package/build/src/models/actions/Condition.js.map +1 -1
  144. package/build/src/models/actions/RunnableAction.d.ts +1 -1
  145. package/build/src/models/actions/RunnableAction.js +1 -1
  146. package/build/src/models/actions/RunnableAction.js.map +1 -1
  147. package/build/src/models/actions/runnable/DeleteCookieAction.d.ts +2 -2
  148. package/build/src/models/actions/runnable/DeleteCookieAction.js +1 -1
  149. package/build/src/models/actions/runnable/DeleteCookieAction.js.map +1 -1
  150. package/build/src/models/actions/runnable/SetCookieAction.d.ts +2 -2
  151. package/build/src/models/actions/runnable/SetCookieAction.js +1 -1
  152. package/build/src/models/actions/runnable/SetCookieAction.js.map +1 -1
  153. package/build/src/models/actions/runnable/SetVariableAction.d.ts +2 -2
  154. package/build/src/models/actions/runnable/SetVariableAction.js +1 -1
  155. package/build/src/models/actions/runnable/SetVariableAction.js.map +1 -1
  156. package/build/src/models/transformers/ImportUtils.d.ts +1 -1
  157. package/build/src/models/transformers/ImportUtils.js +1 -1
  158. package/build/src/models/transformers/PostmanBackupTransformer.js +2 -1
  159. package/build/src/models/transformers/PostmanBackupTransformer.js.map +1 -1
  160. package/build/src/models/transformers/PostmanV21Transformer.js +2 -1
  161. package/build/src/models/transformers/PostmanV21Transformer.js.map +1 -1
  162. package/build/src/models/transformers/PostmanV2Transformer.js +2 -1
  163. package/build/src/models/transformers/PostmanV2Transformer.js.map +1 -1
  164. package/build/src/runtime/actions/RunnableCondition.d.ts +6 -7
  165. package/build/src/runtime/actions/RunnableCondition.js +4 -5
  166. package/build/src/runtime/actions/RunnableCondition.js.map +1 -1
  167. package/build/src/runtime/http-engine/{ArcEngine.d.ts → CoreEngine.d.ts} +3 -3
  168. package/build/src/runtime/http-engine/{ArcEngine.js → CoreEngine.js} +8 -8
  169. package/build/src/runtime/http-engine/CoreEngine.js.map +1 -0
  170. package/build/src/runtime/http-engine/HttpEngine.d.ts +3 -3
  171. package/build/src/runtime/http-engine/HttpEngine.js +3 -20
  172. package/build/src/runtime/http-engine/HttpEngine.js.map +1 -1
  173. package/build/src/runtime/modules/BasicAuthCache.js +2 -5
  174. package/build/src/runtime/modules/BasicAuthCache.js.map +1 -1
  175. package/build/src/runtime/modules/RequestCookies.d.ts +1 -1
  176. package/build/src/runtime/modules/RequestCookies.js +3 -2
  177. package/build/src/runtime/modules/RequestCookies.js.map +1 -1
  178. package/build/src/runtime/node/InteropInterfaces.d.ts +115 -0
  179. package/build/src/runtime/node/InteropInterfaces.js +2 -0
  180. package/build/src/runtime/node/InteropInterfaces.js.map +1 -0
  181. package/build/src/runtime/node/ProjectParallelRunner.d.ts +2 -7
  182. package/build/src/runtime/node/ProjectParallelRunner.js.map +1 -1
  183. package/build/src/runtime/node/ProjectRequestRunner.d.ts +17 -49
  184. package/build/src/runtime/node/ProjectRequestRunner.js +39 -10
  185. package/build/src/runtime/node/ProjectRequestRunner.js.map +1 -1
  186. package/build/src/runtime/node/ProjectRunner.d.ts +1 -59
  187. package/build/src/runtime/node/ProjectRunner.js.map +1 -1
  188. package/build/src/runtime/node/ProjectRunnerWorker.js.map +1 -1
  189. package/build/src/runtime/node/RequestFactory.d.ts +1 -1
  190. package/build/src/runtime/node/RequestFactory.js +3 -3
  191. package/build/src/runtime/node/RequestFactory.js.map +1 -1
  192. package/build/src/runtime/reporters/ProjectRunCliReporter.js.map +1 -1
  193. package/build/src/runtime/reporters/Reporter.js.map +1 -1
  194. package/build/src/runtime/store/AuthSdk.d.ts +28 -0
  195. package/build/src/runtime/store/AuthSdk.js +123 -0
  196. package/build/src/runtime/store/AuthSdk.js.map +1 -0
  197. package/build/src/runtime/store/BackendSdk.d.ts +8 -0
  198. package/build/src/runtime/store/BackendSdk.js +25 -0
  199. package/build/src/runtime/store/BackendSdk.js.map +1 -0
  200. package/build/src/runtime/store/HistorySdk.d.ts +48 -0
  201. package/build/src/runtime/store/HistorySdk.js +142 -0
  202. package/build/src/runtime/store/HistorySdk.js.map +1 -0
  203. package/build/src/runtime/store/Http.d.ts +14 -0
  204. package/build/src/runtime/store/Http.js +4 -0
  205. package/build/src/runtime/store/Http.js.map +1 -0
  206. package/build/src/runtime/store/HttpNode.d.ts +16 -0
  207. package/build/src/runtime/store/HttpNode.js +95 -0
  208. package/build/src/runtime/store/HttpNode.js.map +1 -0
  209. package/build/src/runtime/store/HttpWeb.d.ts +15 -0
  210. package/build/src/runtime/store/HttpWeb.js +83 -0
  211. package/build/src/runtime/store/HttpWeb.js.map +1 -0
  212. package/build/src/runtime/store/ProjectsSdk.d.ts +43 -0
  213. package/build/src/runtime/store/ProjectsSdk.js +144 -0
  214. package/build/src/runtime/store/ProjectsSdk.js.map +1 -0
  215. package/build/src/runtime/store/RouteBuilder.d.ts +42 -0
  216. package/build/src/runtime/store/RouteBuilder.js +75 -0
  217. package/build/src/runtime/store/RouteBuilder.js.map +1 -0
  218. package/build/src/runtime/store/Sdk.d.ts +79 -0
  219. package/build/src/runtime/store/Sdk.js +117 -0
  220. package/build/src/runtime/store/Sdk.js.map +1 -0
  221. package/build/src/runtime/store/SdkBase.d.ts +45 -0
  222. package/build/src/runtime/store/SdkBase.js +40 -0
  223. package/build/src/runtime/store/SdkBase.js.map +1 -0
  224. package/build/src/runtime/store/SpacesSdk.d.ts +50 -0
  225. package/build/src/runtime/store/SpacesSdk.js +185 -0
  226. package/build/src/runtime/store/SpacesSdk.js.map +1 -0
  227. package/build/src/runtime/store/StoreSdkNode.d.ts +10 -0
  228. package/build/src/runtime/store/StoreSdkNode.js +11 -0
  229. package/build/src/runtime/store/StoreSdkNode.js.map +1 -0
  230. package/build/src/runtime/store/StoreSdkWeb.d.ts +10 -0
  231. package/build/src/runtime/store/StoreSdkWeb.js +11 -0
  232. package/build/src/runtime/store/StoreSdkWeb.js.map +1 -0
  233. package/build/src/runtime/store/UsersSdk.d.ts +18 -0
  234. package/build/src/runtime/store/UsersSdk.js +88 -0
  235. package/build/src/runtime/store/UsersSdk.js.map +1 -0
  236. package/build/src/runtime/store/WsClient.d.ts +24 -0
  237. package/build/src/runtime/store/WsClient.js +4 -0
  238. package/build/src/runtime/store/WsClient.js.map +1 -0
  239. package/build/src/runtime/store/WsClientNode.d.ts +24 -0
  240. package/build/src/runtime/store/WsClientNode.js +66 -0
  241. package/build/src/runtime/store/WsClientNode.js.map +1 -0
  242. package/build/src/runtime/store/WsClientWeb.d.ts +23 -0
  243. package/build/src/runtime/store/WsClientWeb.js +73 -0
  244. package/build/src/runtime/store/WsClientWeb.js.map +1 -0
  245. package/package.json +6 -8
  246. package/readme.md +5 -5
  247. package/src/data/JmesparthReader.ts +1 -1
  248. package/src/events/models/ProjectEvents.ts +2 -2
  249. package/src/events/readme.md +1 -1
  250. package/src/lib/transformers/PayloadSerializer.ts +3 -3
  251. package/src/mocking/ProjectMock.ts +9 -1
  252. package/src/mocking/lib/History.ts +179 -0
  253. package/src/mocking/lib/Request.ts +5 -5
  254. package/src/mocking/lib/Response.ts +10 -10
  255. package/src/mocking/lib/User.ts +68 -0
  256. package/src/models/AuthorizationData.ts +2 -2
  257. package/src/models/Backend.ts +93 -0
  258. package/src/models/ClientCertificate.ts +1 -1
  259. package/src/models/Environment.ts +4 -4
  260. package/src/models/ErrorResponse.ts +1 -1
  261. package/src/models/HostRule.ts +5 -5
  262. package/src/models/HttpHistory.ts +89 -27
  263. package/src/models/HttpProject.ts +5 -6
  264. package/src/models/HttpProjectListItem.ts +1 -1
  265. package/src/models/HttpRequest.ts +2 -2
  266. package/src/models/HttpResponse.ts +3 -3
  267. package/src/models/License.ts +4 -4
  268. package/src/models/ProjectFolder.ts +3 -3
  269. package/src/models/ProjectItem.ts +2 -2
  270. package/src/models/ProjectRequest.ts +2 -2
  271. package/src/models/ProjectSchema.ts +2 -2
  272. package/src/models/Property.ts +5 -5
  273. package/src/models/Provider.ts +4 -4
  274. package/src/models/README.md +2 -2
  275. package/src/models/Request.ts +4 -4
  276. package/src/models/RequestActions.ts +2 -4
  277. package/src/models/RequestAuthorization.ts +3 -5
  278. package/src/models/RequestConfig.ts +3 -5
  279. package/src/models/RequestLog.ts +25 -11
  280. package/src/models/RequestTime.ts +4 -6
  281. package/src/models/RequestUiMeta.ts +5 -5
  282. package/src/models/RequestsSize.ts +1 -3
  283. package/src/models/{ArcResponse.ts → Response.ts} +12 -14
  284. package/src/models/ResponseAuthorization.ts +4 -4
  285. package/src/models/ResponseRedirect.ts +3 -5
  286. package/src/models/RevisionInfo.ts +1 -1
  287. package/src/models/SentRequest.ts +2 -4
  288. package/src/models/Server.ts +4 -4
  289. package/src/models/Thing.ts +4 -4
  290. package/src/models/Url.ts +2 -4
  291. package/src/models/User.ts +2 -1
  292. package/src/models/WebApi.ts +1 -1
  293. package/src/models/WebApiIndex.ts +1 -1
  294. package/src/models/Workspace.ts +5 -5
  295. package/src/models/actions/Action.ts +2 -2
  296. package/src/models/actions/Condition.ts +2 -2
  297. package/src/models/actions/RunnableAction.ts +1 -1
  298. package/src/models/actions/runnable/DeleteCookieAction.ts +2 -2
  299. package/src/models/actions/runnable/SetCookieAction.ts +2 -2
  300. package/src/models/actions/runnable/SetVariableAction.ts +2 -2
  301. package/src/models/transformers/ImportUtils.ts +1 -1
  302. package/src/models/transformers/PostmanBackupTransformer.ts +2 -1
  303. package/src/models/transformers/PostmanV21Transformer.ts +2 -1
  304. package/src/models/transformers/PostmanV2Transformer.ts +2 -1
  305. package/src/runtime/actions/RunnableCondition.ts +6 -7
  306. package/src/runtime/http-engine/{ArcEngine.ts → CoreEngine.ts} +7 -7
  307. package/src/runtime/http-engine/HttpEngine.ts +5 -24
  308. package/src/runtime/modules/BasicAuthCache.ts +2 -6
  309. package/src/runtime/modules/RequestCookies.ts +6 -5
  310. package/src/runtime/node/InteropInterfaces.ts +121 -0
  311. package/src/runtime/node/ProjectParallelRunner.ts +2 -9
  312. package/src/runtime/node/ProjectRequestRunner.ts +42 -61
  313. package/src/runtime/node/ProjectRunner.ts +1 -60
  314. package/src/runtime/node/ProjectRunnerWorker.ts +2 -1
  315. package/src/runtime/node/RequestFactory.ts +3 -3
  316. package/src/runtime/reporters/ProjectRunCliReporter.ts +2 -2
  317. package/src/runtime/reporters/Reporter.ts +4 -4
  318. package/src/runtime/store/AuthSdk.ts +126 -0
  319. package/src/runtime/store/BackendSdk.ts +25 -0
  320. package/src/runtime/store/HistorySdk.ts +157 -0
  321. package/src/runtime/store/Http.ts +18 -0
  322. package/src/runtime/store/HttpNode.ts +100 -0
  323. package/src/runtime/store/HttpWeb.ts +89 -0
  324. package/src/runtime/store/ProjectsSdk.ts +147 -0
  325. package/src/runtime/store/RouteBuilder.ts +89 -0
  326. package/src/runtime/store/Sdk.ts +131 -0
  327. package/src/runtime/store/SdkBase.ts +72 -0
  328. package/src/runtime/store/SpacesSdk.ts +190 -0
  329. package/src/runtime/store/StoreSdkNode.ts +13 -0
  330. package/src/runtime/store/StoreSdkWeb.ts +13 -0
  331. package/src/runtime/store/UsersSdk.ts +89 -0
  332. package/src/runtime/store/WsClient.ts +28 -0
  333. package/src/runtime/store/WsClientNode.ts +68 -0
  334. package/src/runtime/store/WsClientWeb.ts +75 -0
  335. package/build/src/models/ArcResponse.js.map +0 -1
  336. package/build/src/models/HistoryIndex.d.ts +0 -43
  337. package/build/src/models/HistoryIndex.js +0 -53
  338. package/build/src/models/HistoryIndex.js.map +0 -1
  339. package/build/src/models/HistoryRequest.d.ts +0 -13
  340. package/build/src/models/HistoryRequest.js +0 -25
  341. package/build/src/models/HistoryRequest.js.map +0 -1
  342. package/build/src/runtime/http-engine/ArcEngine.js.map +0 -1
  343. package/build/src/runtime/http-engine/NodeEngine.d.ts +0 -154
  344. package/build/src/runtime/http-engine/NodeEngine.js +0 -766
  345. package/build/src/runtime/http-engine/NodeEngine.js.map +0 -1
  346. package/build/src/runtime/http-engine/NodeEngineDirect.d.ts +0 -113
  347. package/build/src/runtime/http-engine/NodeEngineDirect.js +0 -449
  348. package/build/src/runtime/http-engine/NodeEngineDirect.js.map +0 -1
  349. package/build/src/runtime/store/StoreSdk.d.ts +0 -279
  350. package/build/src/runtime/store/StoreSdk.js +0 -840
  351. package/build/src/runtime/store/StoreSdk.js.map +0 -1
  352. package/src/models/HistoryIndex.ts +0 -76
  353. package/src/models/HistoryRequest.ts +0 -28
  354. package/src/runtime/http-engine/NodeEngine.ts +0 -792
  355. package/src/runtime/http-engine/NodeEngineDirect.ts +0 -482
  356. package/src/runtime/store/StoreSdk.ts +0 -895
@@ -1,24 +1,23 @@
1
1
  import { IRunnableAction, RunnableAction } from '../../models/actions/RunnableAction.js';
2
2
  import { IHttpRequest } from '../../models/HttpRequest.js';
3
- import { IArcResponse } from '../../models/ArcResponse.js';
3
+ import { IResponse } from '../../models/Response.js';
4
4
  import { ISentRequest } from '../../models/SentRequest.js';
5
5
  import { IErrorResponse } from '../../models/ErrorResponse.js';
6
6
  import { RequestDataExtractor } from '../../data/RequestDataExtractor.js';
7
7
  import { checkCondition } from './ConditionRunner.js';
8
8
 
9
9
  /**
10
- * A class that represents ARC condition that runs actions when the condition is met.
10
+ * A class that represents API Client condition that runs actions when the condition is met.
11
11
  */
12
12
  export class RunnableCondition extends RunnableAction {
13
13
  /**
14
14
  * Tests whether the condition is satisfied for request and/or response.
15
15
  *
16
- * @param request The ARC request object.
17
- * @param executed The request object representing the actual request that has been executed by the transport library.
18
- * @param response The ARC response object, if available.
16
+ * @param request The API Client request object.
17
+ * @param response The API Client response object, if available.
19
18
  * @return True when the condition is satisfied.
20
19
  */
21
- async satisfied(request: IHttpRequest | ISentRequest, response?: IArcResponse | IErrorResponse): Promise<boolean> {
20
+ async satisfied(request: IHttpRequest | ISentRequest, response?: IResponse | IErrorResponse): Promise<boolean> {
22
21
  if (this.enabled === false) {
23
22
  return false;
24
23
  }
@@ -38,7 +37,7 @@ export class RunnableCondition extends RunnableAction {
38
37
 
39
38
  /**
40
39
  * Maps runnables interface to
41
- * If an item is not an instance of `ArcAction` then it creates an instance of it
40
+ * If an item is not an instance of `RunnableCondition` then it creates an instance of it
42
41
  * by passing the map as an argument.
43
42
  *
44
43
  * @param value Passed list of actions.
@@ -5,7 +5,7 @@ import https from 'https';
5
5
  import { HttpEngine, HttpEngineOptions, HeadersReceivedDetail } from './HttpEngine.js';
6
6
  import { IRequestLog } from 'src/models/RequestLog.js';
7
7
  import { IHttpRequest } from '../../models/HttpRequest.js';
8
- import { ArcResponse } from '../../models/ArcResponse.js';
8
+ import { Response } from '../../models/Response.js';
9
9
  import { SerializableError } from '../../models/SerializableError.js';
10
10
  import { Headers } from '../../lib/headers/Headers.js';
11
11
  import { PayloadSupport } from './PayloadSupport.js';
@@ -34,11 +34,11 @@ interface ResponseInfo {
34
34
  }
35
35
 
36
36
  /**
37
- * ARC's HTTP engine.
37
+ * API Client's HTTP engine.
38
38
  * An HTTP 1.1 engine working directly on the socket. It communicates with the remote machine and
39
39
  * collects stats about the request and response.
40
40
  */
41
- export class ArcEngine extends HttpEngine {
41
+ export class CoreEngine extends HttpEngine {
42
42
  state = RequestState.Status;
43
43
  rawHeaders?: Buffer;
44
44
  _hostTestReg = /^\s*host\s*:/im;
@@ -119,7 +119,7 @@ export class ArcEngine extends HttpEngine {
119
119
  }
120
120
 
121
121
  /**
122
- * Prepares an HTTP message from ARC's request object.
122
+ * Prepares an HTTP message from API Client's request object.
123
123
  *
124
124
  * @returns Resolved promise to an `ArrayBuffer`.
125
125
  */
@@ -539,7 +539,7 @@ export class ArcEngine extends HttpEngine {
539
539
  * @return Redirect response object
540
540
  */
541
541
  async _createRedirectResponse(location: string): Promise<ResponseRedirect> {
542
- const { currentResponse = new ArcResponse() } = this;
542
+ const { currentResponse = new Response() } = this;
543
543
  this.currentResponse = currentResponse;
544
544
  if (!this.currentResponse.payload) {
545
545
  if (this._rawBody) {
@@ -626,7 +626,7 @@ export class ArcEngine extends HttpEngine {
626
626
  if (this.aborted) {
627
627
  return;
628
628
  }
629
- const response = ArcResponse.fromValues(0);
629
+ const response = Response.fromValues(0);
630
630
  response.loadingTime = 0;
631
631
  this.currentResponse = response;
632
632
  if (!data) {
@@ -1000,7 +1000,7 @@ export class ArcEngine extends HttpEngine {
1000
1000
  }
1001
1001
  if (res.statusCode === 401) {
1002
1002
  this.currentHeaders = new Headers(res.headers);
1003
- const currentResponse = ArcResponse.fromValues(res.statusCode, res.statusMessage, this.currentHeaders.toString());
1003
+ const currentResponse = Response.fromValues(res.statusCode, res.statusMessage, this.currentHeaders.toString());
1004
1004
  currentResponse.loadingTime = 0;
1005
1005
  this.currentResponse = currentResponse;
1006
1006
  if (head.length) {
@@ -12,7 +12,7 @@ import { IRequestAuthorization } from '../../models/RequestAuthorization.js';
12
12
  import { HostRule } from '../../models/HostRule.js';
13
13
  import { IRequestCertificate } from '../../models/ClientCertificate.js';
14
14
  import { SentRequest } from '../../models/SentRequest.js';
15
- import { ArcResponse } from '../../models/ArcResponse.js';
15
+ import { Response } from '../../models/Response.js';
16
16
  import { ErrorResponse } from '../../models/ErrorResponse.js';
17
17
  import { RequestsSize } from '../../models/RequestsSize.js';
18
18
  import { HttpResponse } from '../../models/HttpResponse.js';
@@ -154,7 +154,7 @@ export abstract class HttpEngine extends EventEmitter {
154
154
  /**
155
155
  * The response object build during the execution.
156
156
  */
157
- currentResponse?: ArcResponse;
157
+ currentResponse?: Response;
158
158
 
159
159
  /**
160
160
  * @return True if following redirects is allowed.
@@ -470,7 +470,7 @@ export abstract class HttpEngine extends EventEmitter {
470
470
  * @return Redirect response object
471
471
  */
472
472
  async _createRedirectResponse(location: string): Promise<ResponseRedirect> {
473
- const { currentResponse = new ArcResponse() } = this;
473
+ const { currentResponse = new Response() } = this;
474
474
 
475
475
  const response = HttpResponse.fromValues(
476
476
  currentResponse.status,
@@ -498,7 +498,7 @@ export abstract class HttpEngine extends EventEmitter {
498
498
  *
499
499
  * @return A response object.
500
500
  */
501
- async _createResponse(): Promise<ArcResponse | undefined> {
501
+ async _createResponse(): Promise<Response | undefined> {
502
502
  if (this.aborted) {
503
503
  return;
504
504
  }
@@ -513,36 +513,17 @@ It means that the successful connection wasn't made.
513
513
  Check your request parameters.`);
514
514
  }
515
515
  const body = await this.decompress(this._rawBody);
516
- const response = ArcResponse.fromValues(
516
+ const response = Response.fromValues(
517
517
  status,
518
518
  currentResponse.statusText,
519
519
  currentResponse.headers,
520
520
  );
521
521
  response.timings = this._computeStats(this.stats);
522
522
  response.loadingTime = response.timings.total();
523
-
524
- // const response = /** @type ArcResponse */ ({
525
- // size: {
526
- // request: 0,
527
- // response: 0,
528
- // },
529
- // });
530
-
531
523
  if (body) {
532
524
  await response.writePayload(body);
533
525
  currentResponse.payload = response.payload;
534
526
  }
535
- // if (body) {
536
- // response.payload = body;
537
- // currentResponse.payload = body;
538
- // response.size.response = body.length;
539
- // }
540
- // if (this.sentRequest.httpMessage) {
541
- // response.size.request = Buffer.from(this.sentRequest.httpMessage).length;
542
- // }
543
- // if (opts.includeRedirects && this.redirects.length) {
544
- // response.redirects = Array.from(this.redirects);
545
- // }
546
527
  if (status === 401) {
547
528
  response.auth = this._getAuth();
548
529
  }
@@ -2,7 +2,7 @@ import { Headers } from '../../lib/headers/Headers.js';
2
2
  import { IHttpRequest } from '../../models/HttpRequest.js';
3
3
  import { INtlmAuthorization, IBasicAuthorization } from '../../models/Authorization.js';
4
4
  import { ExecutionContext } from './ModulesRegistry.js';
5
- import { IRequestAuthorization } from '../../models/RequestAuthorization.js';
5
+ import { IRequestAuthorization, Kind as RequestAuthorizationKind } from '../../models/RequestAuthorization.js';
6
6
 
7
7
  const cache: any = {};
8
8
 
@@ -89,16 +89,12 @@ export function applyRequestBasicAuthData(request: IHttpRequest, data: IBasicAut
89
89
  * but whole NTLM configuration object.
90
90
  *
91
91
  * Applied the `auth` object to the event's `detail.auth` object.
92
- *
93
- * @param {ArcBaseRequest} request The event's detail object. Changes made here will be propagated to
94
- * the event.
95
- * @param {NtlmAuthorization} values The authorization data to apply.
96
92
  */
97
93
  function applyRequestNtlmAuthData(authorization: IRequestAuthorization[], values: INtlmAuthorization): void {
98
94
  let ntlm: IRequestAuthorization | undefined = authorization.find(((method) => method.type === 'ntlm'));
99
95
  if (!ntlm) {
100
96
  ntlm = {
101
- kind: '',
97
+ kind: RequestAuthorizationKind,
102
98
  enabled: true,
103
99
  type: 'ntlm',
104
100
  config: {},
@@ -4,10 +4,11 @@ import { Headers } from '../../lib/headers/Headers.js';
4
4
  import { IHttpRequest } from '../../models/HttpRequest.js';
5
5
  import { ExecutionContext } from './ModulesRegistry.js';
6
6
  import { IResponseRedirect } from '../../models/ResponseRedirect.js';
7
- import { IArcResponse } from '../../models/ArcResponse.js';
7
+ import { IResponse } from '../../models/Response.js';
8
8
  import { IErrorResponse } from '../../models/ErrorResponse.js';
9
9
  import { IRequestLog } from '../../models/RequestLog.js';
10
10
  import { HttpCookie } from '../../models/HttpCookie.js';
11
+ import { Kind as RequestConfigKind } from '../../models/RequestConfig.js';
11
12
  import { Cookie } from '../../lib/cookies/Cookie.js';
12
13
 
13
14
  /**
@@ -51,7 +52,7 @@ function applyCookieHeader(header: string, request: IHttpRequest): void {
51
52
  * @param redirects List of redirect responses
52
53
  * @returns An object with `cookies` and `expired` arrays of cookies.
53
54
  */
54
- function extract(response: IArcResponse, url: string, redirects?: IResponseRedirect[]): Record<'expired'|'cookies', Cookie[]> {
55
+ function extract(response: IResponse, url: string, redirects?: IResponseRedirect[]): Record<'expired'|'cookies', Cookie[]> {
55
56
  let expired: Cookie[] = [];
56
57
  let parser;
57
58
  let exp;
@@ -100,7 +101,7 @@ function extract(response: IArcResponse, url: string, redirects?: IResponseRedir
100
101
  *
101
102
  * Unregister this module when the application settings change to not to use session storage.
102
103
  *
103
- * In ARC electron the session storage is a chrome persistent partition with a session shared with the "log in to a web service".
104
+ * In electron the session storage is a chrome persistent partition with a session shared with the "log in to a web service".
104
105
  * This way cookies can be acquired in through the browser login and store in the application to use them with the request.
105
106
  */
106
107
  export async function processRequestCookies(request: IHttpRequest, context: ExecutionContext): Promise<void> {
@@ -126,7 +127,7 @@ export async function processResponseCookies(log: IRequestLog, context: Executio
126
127
  return;
127
128
  }
128
129
  const config = context.config || {
129
- kind: 'ARC#RequestConfig',
130
+ kind: RequestConfigKind,
130
131
  enabled: false,
131
132
  };
132
133
  let ignore = false;
@@ -137,7 +138,7 @@ export async function processResponseCookies(log: IRequestLog, context: Executio
137
138
  if (ignore) {
138
139
  return;
139
140
  }
140
- const typedResponse = log.response as IArcResponse;
141
+ const typedResponse = log.response as IResponse;
141
142
  const result = extract(typedResponse, log.request.url, log.redirects);
142
143
  if (result.cookies.length) {
143
144
  await CookieEvents.updateBulk(context.eventsTarget, result.cookies.map(c => HttpCookie.fromCookieParser(c).toJSON()));
@@ -0,0 +1,121 @@
1
+ import { IProjectRequestIterator, IHttpProject } from '../../models/HttpProject.js';
2
+ import { Environment } from '../../models/Environment.js';
3
+ import { Logger } from '../../lib/logging/Logger.js';
4
+ import { IRequestLog } from '../../models/RequestLog.js';
5
+
6
+ export interface ProjectRunnerOptions {
7
+ /**
8
+ * When provided it overrides any project / folder defined environment.
9
+ */
10
+ environment?: Environment;
11
+ /**
12
+ * Additional variables to pass to the selected environment.
13
+ * This can be use to pass system variables, when needed.
14
+ *
15
+ * To use system variables tou can use `init.variables = process.env`;
16
+ */
17
+ variables?: Record<string, string>;
18
+ /**
19
+ * Overrides the default logger (console).
20
+ */
21
+ logger?: Logger;
22
+ /**
23
+ * The event target to use.
24
+ * By default it creates its own target.
25
+ */
26
+ eventTarget?: EventTarget;
27
+ }
28
+
29
+ export interface ProjectRunnerRunOptions extends IProjectRequestIterator {
30
+ }
31
+
32
+ export interface RunResult {
33
+ /**
34
+ * The key of the request from the HttpProject that was executed.
35
+ */
36
+ key: string;
37
+ /**
38
+ * The key of parent folder of the executed request.
39
+ */
40
+ parent?: string;
41
+ /**
42
+ * Set when a fatal error occurred so the request couldn't be executed.
43
+ * This is not the same as error reported during a request. The log's response can still be IResponseError.
44
+ */
45
+ error?: boolean;
46
+ /**
47
+ * The error message. Always set when the `error` is `true`.
48
+ */
49
+ errorMessage?: string;
50
+ /**
51
+ * The request log.
52
+ * Always set when the `error` is `false`.
53
+ */
54
+ log?: IRequestLog;
55
+ }
56
+
57
+ export interface IProjectParallelRunnerOptions extends IProjectRunnerOptions {
58
+ }
59
+
60
+ export interface IProjectParallelWorkerOptions extends IProjectRunnerOptions {
61
+ project: IHttpProject;
62
+ }
63
+
64
+ export interface IProjectRunnerOptions {
65
+ /**
66
+ * The environment to use.
67
+ * This can be a name or the key of the environment located under the parent or root.
68
+ * It can also be a path to the environment definition. If the file exists it is used. Otherwise it tried to
69
+ * find the environment in the project.
70
+ */
71
+ environment?: string;
72
+ /**
73
+ * The parent folder to execute.
74
+ */
75
+ parent?: string;
76
+ /**
77
+ * The names or the keys of requests to execute.
78
+ * This can be used to limit the number of requests.
79
+ */
80
+ request?: string[];
81
+ /**
82
+ * The number of times the execution should be repeated.
83
+ * Default to 1.
84
+ */
85
+ iterations?: number;
86
+ /**
87
+ * The number of milliseconds to wait between each iteration.
88
+ * Default to the next frame (vary from 1 to tens of milliseconds).
89
+ */
90
+ iterationDelay?: number;
91
+ /**
92
+ * When set it performs parallel execution for each iteration.
93
+ * The number of executions at the same time depends on the number of processor cores
94
+ * available on the current machine. The maximum of the parallel execution
95
+ * is the number of available cores. When the `iterations` number is higher
96
+ * then the "rest" is added to the iterations per each core.
97
+ */
98
+ parallel?: boolean;
99
+ /**
100
+ * When set it includes requests in the current folder and sub-folder according to the order
101
+ * defined in the folder.
102
+ */
103
+ recursive?: boolean;
104
+ /**
105
+ * The opposite of the `requests`. The list of names or keys of requests or folders to ignore.
106
+ * Note, ignore is tested before the `requests`.
107
+ */
108
+ ignore?: string[];
109
+ /**
110
+ * The logger to use with the request factory.
111
+ * When not set it uses the dummy logger (no output).
112
+ */
113
+ logger?: Logger;
114
+ /**
115
+ * When true it copies all system variables to the execution environment.
116
+ * When an array of strings, only takes system variables that are listed in the array.
117
+ * When a map, it uses this map as a list of variables.
118
+ * When not set it does not read system variables.
119
+ */
120
+ variables?: boolean | string[] | Record<string, string>;
121
+ }
@@ -2,10 +2,10 @@ import cluster, { Worker } from 'cluster';
2
2
  import { cpus } from 'os';
3
3
  import { dirname, join } from 'path';
4
4
  import { fileURLToPath } from 'url';
5
- import { HttpProject, IHttpProject } from '../../models/HttpProject.js';
6
- import { IProjectRunnerOptions } from './ProjectRunner.js';
5
+ import { HttpProject } from '../../models/HttpProject.js';
7
6
  import { IProjectExecutionLog, IProjectExecutionIteration } from '../reporters/Reporter.js';
8
7
  import { BaseRunner } from './BaseRunner.js';
8
+ import { IProjectParallelRunnerOptions, IProjectParallelWorkerOptions } from './InteropInterfaces.js'
9
9
 
10
10
  const numCPUs = cpus().length;
11
11
  const __dirname = dirname(fileURLToPath(import.meta.url));
@@ -40,13 +40,6 @@ export interface IWorkerMessage {
40
40
  data?: unknown;
41
41
  }
42
42
 
43
- export interface IProjectParallelRunnerOptions extends IProjectRunnerOptions {
44
- }
45
-
46
- export interface IProjectParallelWorkerOptions extends IProjectRunnerOptions {
47
- project: IHttpProject;
48
- }
49
-
50
43
  export interface ProjectParallelRunner {
51
44
  /**
52
45
  * Dispatched when a status of a worker change.
@@ -6,64 +6,14 @@ import { Property } from '../../models/Property.js';
6
6
  import { ProjectFolder, Kind as ProjectFolderKind } from '../../models/ProjectFolder.js';
7
7
  import { ProjectRequest } from '../../models/ProjectRequest.js';
8
8
  import { IHttpRequest } from '../../models/HttpRequest.js';
9
- import { HttpProject, IProjectRequestIterator } from '../../models/HttpProject.js';
9
+ import { HttpProject } from '../../models/HttpProject.js';
10
10
  import { SentRequest } from '../../models/SentRequest.js';
11
11
  import { ErrorResponse } from '../../models/ErrorResponse.js';
12
12
  import { VariablesStore } from './VariablesStore.js';
13
13
  import { VariablesProcessor } from '../variables/VariablesProcessor.js';
14
14
  import { RequestFactory } from './RequestFactory.js';
15
15
  import { EventTypes } from '../../events/EventTypes.js';
16
-
17
- export interface ProjectRunnerOptions {
18
- /**
19
- * When provided it overrides any project / folder defined environment.
20
- */
21
- environment?: Environment;
22
- /**
23
- * Additional variables to pass to the selected environment.
24
- * This can be use to pass system variables, when needed.
25
- *
26
- * To use system variables tou can use `init.variables = process.env`;
27
- */
28
- variables?: Record<string, string>;
29
- /**
30
- * Overrides the default logger (console).
31
- */
32
- logger?: Logger;
33
- /**
34
- * The event target to use.
35
- * By default it creates its own target.
36
- */
37
- eventTarget?: EventTarget;
38
- }
39
-
40
- export interface ProjectRunnerRunOptions extends IProjectRequestIterator {
41
- }
42
-
43
- export interface RunResult {
44
- /**
45
- * The key of the request from the HttpProject that was executed.
46
- */
47
- key: string;
48
- /**
49
- * The key of parent folder of the executed request.
50
- */
51
- parent?: string;
52
- /**
53
- * Set when a fatal error occurred so the request couldn't be executed.
54
- * This is not the same as error reported during a request. The log's response can still be IResponseError.
55
- */
56
- error?: boolean;
57
- /**
58
- * The error message. Always set when the `error` is `true`.
59
- */
60
- errorMessage?: string;
61
- /**
62
- * The request log.
63
- * Always set when the `error` is `false`.
64
- */
65
- log?: IRequestLog;
66
- }
16
+ import { ProjectRunnerOptions, ProjectRunnerRunOptions, RunResult } from './InteropInterfaces.js';
67
17
 
68
18
  export interface ProjectRequestRunner {
69
19
  /**
@@ -130,20 +80,50 @@ export class ProjectRequestRunner extends EventEmitter {
130
80
  const { project } = this;
131
81
  const executed: RunResult[] = [];
132
82
  for (const request of project.requestIterator(options)) {
133
- const parent = request.getParent() || project;
134
- let variables: Record<string, string>;
135
- if (VariablesStore.has(parent)) {
136
- variables = VariablesStore.get(parent);
137
- } else {
138
- variables = await this.getVariables(parent);
139
- VariablesStore.set(parent, variables);
140
- }
141
- const info = await this.execute(request, variables);
83
+ const info = await this._runItem(request);
142
84
  executed.push(info);
143
85
  }
144
86
  return executed;
145
87
  }
146
88
 
89
+ /**
90
+ * Allows to iterate over project requests recursively and execute each request
91
+ * in order. The generator yields the `RunResult` for the request.
92
+ *
93
+ * Example:
94
+ *
95
+ * ```javascript
96
+ * const runner = new ProjectRequestRunner(...);
97
+ * for await (let runResult of runner) {
98
+ * console.log(runResult);
99
+ * }
100
+ * ```
101
+ */
102
+ async* [Symbol.asyncIterator](): AsyncGenerator<RunResult> {
103
+ const { project } = this;
104
+ for (const request of project.requestIterator({ recursive: true })) {
105
+ const info = await this._runItem(request);
106
+ yield info;
107
+ }
108
+ }
109
+
110
+ private async _runItem(request: ProjectRequest): Promise<RunResult> {
111
+ const folder = request.getParent();
112
+ const parent = folder || this.project;
113
+ let variables: Record<string, string>;
114
+ if (VariablesStore.has(parent)) {
115
+ variables = VariablesStore.get(parent);
116
+ } else {
117
+ variables = await this.getVariables(parent);
118
+ VariablesStore.set(parent, variables);
119
+ }
120
+ const info = await this.execute(request, variables);
121
+ if (folder && folder !== this.project) {
122
+ info.parent = folder.key;
123
+ }
124
+ return info;
125
+ }
126
+
147
127
  protected async execute(request: ProjectRequest, variables: Record<string, string>): Promise<RunResult> {
148
128
  const config = request.getConfig();
149
129
  const factory = new RequestFactory(this.eventTarget);
@@ -189,6 +169,7 @@ export class ProjectRequestRunner extends EventEmitter {
189
169
  this.emit('request', request.key, { ...requestCopy });
190
170
  await factory.processRequestLogic(requestCopy);
191
171
  const result = await factory.executeRequest(requestCopy);
172
+ result.requestId = request.key;
192
173
  await factory.processResponse(result);
193
174
  request.setLog(result);
194
175
  info.log = result;
@@ -3,75 +3,16 @@ import { HttpProject } from '../../models/HttpProject.js';
3
3
  import { ProjectFolder } from '../../models/ProjectFolder.js';
4
4
  import { Environment, IEnvironment } from '../../models/Environment.js';
5
5
  import { DummyLogger } from '../../lib/logging/DummyLogger.js';
6
- import { Logger } from '../../lib/logging/Logger.js';
7
6
  import { IRequestLog } from '../../models/RequestLog.js';
8
7
  import { IHttpRequest } from '../../models/HttpRequest.js';
9
8
  import { ProjectRequestRunner } from './ProjectRequestRunner.js';
10
9
  import { IProjectExecutionIteration, IProjectExecutionLog } from '../reporters/Reporter.js';
11
10
  import { pathExists, readJson } from '../../lib/fs/Fs.js';
12
11
  import { BaseRunner } from './BaseRunner.js';
12
+ import { IProjectRunnerOptions } from './InteropInterfaces.js';
13
13
 
14
14
  type ProjectParent = HttpProject | ProjectFolder;
15
15
 
16
- export interface IProjectRunnerOptions {
17
- /**
18
- * The environment to use.
19
- * This can be a name or the key of the environment located under the parent or root.
20
- * It can also be a path to the environment definition. If the file exists it is used. Otherwise it tried to
21
- * find the environment in the project.
22
- */
23
- environment?: string;
24
- /**
25
- * The parent folder to execute.
26
- */
27
- parent?: string;
28
- /**
29
- * The names or the keys of requests to execute.
30
- * This can be used to limit the number of requests.
31
- */
32
- request?: string[];
33
- /**
34
- * The number of times the execution should be repeated.
35
- * Default to 1.
36
- */
37
- iterations?: number;
38
- /**
39
- * The number of milliseconds to wait between each iteration.
40
- * Default to the next frame (vary from 1 to tens of milliseconds).
41
- */
42
- iterationDelay?: number;
43
- /**
44
- * When set it performs parallel execution for each iteration.
45
- * The number of executions at the same time depends on the number of processor cores
46
- * available on the current machine. The maximum of the parallel execution
47
- * is the number of available cores. When the `iterations` number is higher
48
- * then the "rest" is added to the iterations per each core.
49
- */
50
- parallel?: boolean;
51
- /**
52
- * When set it includes requests in the current folder and sub-folder according to the order
53
- * defined in the folder.
54
- */
55
- recursive?: boolean;
56
- /**
57
- * The opposite of the `requests`. The list of names or keys of requests or folders to ignore.
58
- * Note, ignore is tested before the `requests`.
59
- */
60
- ignore?: string[];
61
- /**
62
- * The logger to use with the request factory.
63
- * When not set it uses the dummy logger (no output).
64
- */
65
- logger?: Logger;
66
- /**
67
- * When true it copies all system variables to the execution environment.
68
- * When an array of strings, only takes system variables that are listed in the array.
69
- * When a map, it uses this map as a list of variables.
70
- * When not set it does not read system variables.
71
- */
72
- variables?: boolean | string[] | Record<string, string>;
73
- }
74
-
75
16
  export interface ProjectRunner {
76
17
  /**
77
18
  * Event dispatched when an iteration is about to start.
@@ -3,7 +3,8 @@ import process from 'process';
3
3
  import cluster from 'cluster';
4
4
  import { HttpProject } from '../../models/HttpProject.js';
5
5
  import { IProjectExecutionLog } from '../reporters/Reporter.js';
6
- import { IWorkerMessage, IProjectParallelWorkerOptions } from './ProjectParallelRunner.js';
6
+ import { IWorkerMessage } from './ProjectParallelRunner.js';
7
+ import { IProjectParallelWorkerOptions } from './InteropInterfaces.js';
7
8
  import { sleep } from '../../lib/timers/Timers.js';
8
9
  import { ProjectRunner } from './ProjectRunner.js';
9
10
 
@@ -11,14 +11,14 @@ import { Action } from '../../models/actions/Action.js';
11
11
  import { RunnableCondition } from '../actions/RunnableCondition.js';
12
12
  import { ActionRunner } from '../actions/ActionRunner.js';
13
13
  import { HttpEngineOptions } from '../http-engine/HttpEngine.js';
14
- import { ArcEngine } from '../http-engine/ArcEngine.js';
14
+ import { CoreEngine } from '../http-engine/CoreEngine.js';
15
15
  import { ModulesRegistry, RegisteredRequestModule, RegisteredResponseModule, ExecutionContext, RegistryPermission } from '../modules/ModulesRegistry.js';
16
16
  import { ExecutionResponse } from '../modules/ExecutionResponse.js';
17
17
  import { Events } from '../../events/Events.js';
18
18
  import { Logger } from '../../lib/logging/Logger.js';
19
19
 
20
20
  /**
21
- * The main class to make HTTP requests in the API Client / ARC.
21
+ * The main class to make HTTP requests in the API Client.
22
22
  * This factory includes all logic components to perform the entire HTTP request lifecycle. This includes:
23
23
  *
24
24
  * - variables evaluation on the request object
@@ -294,7 +294,7 @@ export class RequestFactory {
294
294
  */
295
295
  async executeRequest(request: IHttpRequest): Promise<IRequestLog> {
296
296
  const opts = await this.prepareEngineConfig();
297
- const engine = new ArcEngine(request, opts);
297
+ const engine = new CoreEngine(request, opts);
298
298
  return engine.send();
299
299
  }
300
300
 
@@ -1,7 +1,7 @@
1
1
  import { Table } from 'console-table-printer';
2
2
  import chalk from 'chalk';
3
3
  import { ErrorResponse, IErrorResponse } from '../../models/ErrorResponse.js';
4
- import { IArcResponse } from '../../models/ArcResponse.js';
4
+ import { IResponse } from '../../models/Response.js';
5
5
  import { ISerializedError } from '../../models/SerializableError.js';
6
6
  import { Reporter } from './Reporter.js';
7
7
 
@@ -70,7 +70,7 @@ export class ProjectRunCliReporter extends Reporter {
70
70
  process.stdout.write('Request not executed.\n');
71
71
  return;
72
72
  }
73
- const response = log.response as IArcResponse;
73
+ const response = log.response as IResponse;
74
74
  process.stdout.write(`${prefix} Status code is: ${response.status}\n`);
75
75
  });
76
76
  process.stdout.write('\n\n');