@hpcc-js/comms 2.99.0 → 3.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (525) hide show
  1. package/dist/index.js +6 -10397
  2. package/dist/index.js.map +7 -1
  3. package/dist/index.node.js +925 -10854
  4. package/dist/index.node.js.map +7 -1
  5. package/package.json +58 -63
  6. package/src/__package__.ts +2 -2
  7. package/src/clienttools/eclMeta.ts +1 -1
  8. package/src/clienttools/eclcc.ts +1 -1
  9. package/src/ecl/activity.ts +3 -3
  10. package/src/ecl/dfuWorkunit.ts +5 -5
  11. package/src/ecl/graph.ts +4 -4
  12. package/src/ecl/logicalFile.ts +3 -3
  13. package/src/ecl/machine.ts +2 -2
  14. package/src/ecl/query.ts +12 -12
  15. package/src/ecl/queryGraph.ts +3 -3
  16. package/src/ecl/resource.ts +1 -1
  17. package/src/ecl/result.ts +4 -4
  18. package/src/ecl/scope.ts +2 -2
  19. package/src/ecl/sourceFile.ts +2 -2
  20. package/src/ecl/store.ts +3 -3
  21. package/src/ecl/targetCluster.ts +4 -4
  22. package/src/ecl/timer.ts +2 -2
  23. package/src/ecl/topology.ts +3 -3
  24. package/src/ecl/workunit.ts +11 -11
  25. package/src/ecl/xsdParser.ts +0 -1
  26. package/src/espConnection.ts +1 -1
  27. package/src/index-common.ts +38 -38
  28. package/src/index.node.ts +9 -5
  29. package/src/index.ts +1 -3
  30. package/src/services/fileSpray.ts +1 -1
  31. package/src/services/wsAccess.ts +1 -1
  32. package/src/services/wsAccount.ts +2 -2
  33. package/src/services/wsCloud.ts +1 -1
  34. package/src/services/wsCodesign.ts +2 -2
  35. package/src/services/wsDFU.ts +1 -1
  36. package/src/services/wsDFUXRef.ts +2 -2
  37. package/src/services/wsDali.ts +1 -1
  38. package/src/services/wsEcl.ts +3 -3
  39. package/src/services/wsElk.ts +1 -1
  40. package/src/services/wsLogaccess.ts +3 -3
  41. package/src/services/wsMachine.ts +1 -1
  42. package/src/services/wsPackageProcess.ts +1 -1
  43. package/src/services/wsResources.ts +1 -1
  44. package/src/services/wsSMC.ts +2 -2
  45. package/src/services/wsSasha.ts +1 -1
  46. package/src/services/wsStore.ts +2 -2
  47. package/src/services/wsTopology.ts +2 -2
  48. package/src/services/wsWorkunits.ts +3 -2
  49. package/src/services/wsdl/FileSpray/v1.23/FileSpray.ts +828 -828
  50. package/src/services/wsdl/FileSpray/v1.25/FileSpray.ts +2 -2
  51. package/src/services/wsdl/FileSpray/v1.26/FileSpray.ts +2 -2
  52. package/src/services/wsdl/WsCloud/v1/WsCloud.ts +20 -20
  53. package/src/services/wsdl/WsDFUXRef/v1.02/WsDFUXRef.ts +165 -165
  54. package/src/services/wsdl/WsDali/v1.04/WsDali.ts +2 -2
  55. package/src/services/wsdl/WsDali/v1.07/WsDali.ts +2 -2
  56. package/src/services/wsdl/WsDfu/v1.62/WsDfu.ts +2 -2
  57. package/src/services/wsdl/WsDfu/v1.63/WsDfu.ts +2 -2
  58. package/src/services/wsdl/WsDfu/v1.65/WsDfu.ts +2 -2
  59. package/src/services/wsdl/WsFileIO/v1.01/WsFileIO.ts +86 -86
  60. package/src/services/wsdl/WsPackageProcess/v1.04/WsPackageProcess.ts +434 -434
  61. package/src/services/wsdl/WsResources/v1.01/WsResources.ts +2 -2
  62. package/src/services/wsdl/WsSMC/v1.24/WsSMC.ts +514 -514
  63. package/src/services/wsdl/WsSMC/v1.27/WsSMC.ts +2 -2
  64. package/src/services/wsdl/WsSasha/v1.01/WsSasha.ts +2 -2
  65. package/src/services/wsdl/WsTopology/v1.31/WsTopology.ts +2 -2
  66. package/src/services/wsdl/WsTopology/v1.32/WsTopology.ts +2 -2
  67. package/src/services/wsdl/WsWorkunits/v1.88/WsWorkunits.ts +2415 -2415
  68. package/src/services/wsdl/WsWorkunits/v1.94/WsWorkunits.ts +2 -2
  69. package/src/services/wsdl/WsWorkunits/v1.95/WsWorkunits.ts +2 -2
  70. package/src/services/wsdl/WsWorkunits/v1.97/WsWorkunits.ts +2 -2
  71. package/src/services/wsdl/WsWorkunits/v1.98/WsWorkunits.ts +2 -2
  72. package/src/services/wsdl/WsWorkunits/v1.99/WsWorkunits.ts +2 -2
  73. package/src/services/wsdl/WsWorkunits/v2/WsWorkunits.ts +2 -2
  74. package/src/services/wsdl/ws_access/v1.16/ws_access.ts +953 -953
  75. package/src/services/wsdl/ws_access/v1.17/ws_access.ts +2 -2
  76. package/src/services/wsdl/ws_account/v1.05/ws_account.ts +78 -78
  77. package/src/services/wsdl/ws_account/v1.06/ws_account.ts +2 -2
  78. package/src/services/wsdl/ws_codesign/v1.1/ws_codesign.ts +68 -68
  79. package/src/services/wsdl/ws_elk/v1/ws_elk.ts +29 -29
  80. package/src/services/wsdl/ws_logaccess/v1/ws_logaccess.ts +54 -54
  81. package/src/services/wsdl/ws_logaccess/v1.02/ws_logaccess.ts +2 -2
  82. package/src/services/wsdl/ws_logaccess/v1.03/ws_logaccess.ts +2 -2
  83. package/src/services/wsdl/ws_logaccess/v1.04/ws_logaccess.ts +2 -2
  84. package/src/services/wsdl/ws_logaccess/v1.05/ws_logaccess.ts +2 -2
  85. package/src/services/wsdl/ws_machine/v1.17/ws_machine.ts +2 -2
  86. package/src/services/wsdl/wsstore/v1.02/wsstore.ts +213 -213
  87. package/types/__package__.d.ts +2 -3
  88. package/types/clienttools/eclMeta.d.ts +1 -2
  89. package/types/clienttools/eclcc.d.ts +1 -2
  90. package/types/connection.d.ts +0 -1
  91. package/types/ecl/activity.d.ts +3 -4
  92. package/types/ecl/dfuWorkunit.d.ts +4 -5
  93. package/types/ecl/graph.d.ts +4 -5
  94. package/types/ecl/logicalFile.d.ts +2 -3
  95. package/types/ecl/machine.d.ts +2 -3
  96. package/types/ecl/query.d.ts +6 -7
  97. package/types/ecl/queryGraph.d.ts +0 -1
  98. package/types/ecl/resource.d.ts +1 -2
  99. package/types/ecl/result.d.ts +4 -5
  100. package/types/ecl/scope.d.ts +2 -3
  101. package/types/ecl/sourceFile.d.ts +2 -3
  102. package/types/ecl/store.d.ts +3 -4
  103. package/types/ecl/targetCluster.d.ts +4 -5
  104. package/types/ecl/timer.d.ts +2 -3
  105. package/types/ecl/topology.d.ts +3 -4
  106. package/types/ecl/workunit.d.ts +10 -11
  107. package/types/ecl/xsdParser.d.ts +0 -1
  108. package/types/espConnection.d.ts +1 -2
  109. package/types/index-common.d.ts +38 -39
  110. package/types/index.node.d.ts +3 -4
  111. package/types/pem/trustwave.d.ts +0 -1
  112. package/types/services/fileSpray.d.ts +1 -2
  113. package/types/services/wsAccess.d.ts +1 -2
  114. package/types/services/wsAccount.d.ts +1 -2
  115. package/types/services/wsCloud.d.ts +1 -2
  116. package/types/services/wsCodesign.d.ts +1 -2
  117. package/types/services/wsDFU.d.ts +1 -2
  118. package/types/services/wsDFUXRef.d.ts +2 -3
  119. package/types/services/wsDali.d.ts +1 -2
  120. package/types/services/wsEcl.d.ts +3 -4
  121. package/types/services/wsElk.d.ts +1 -2
  122. package/types/services/wsLogaccess.d.ts +1 -2
  123. package/types/services/wsMachine.d.ts +1 -2
  124. package/types/services/wsPackageProcess.d.ts +1 -2
  125. package/types/services/wsResources.d.ts +1 -2
  126. package/types/services/wsSMC.d.ts +2 -3
  127. package/types/services/wsSasha.d.ts +1 -2
  128. package/types/services/wsStore.d.ts +2 -3
  129. package/types/services/wsTopology.d.ts +2 -3
  130. package/types/services/wsWorkunits.d.ts +2 -3
  131. package/types/services/wsdl/FileSpray/v1.26/FileSpray.d.ts +2 -3
  132. package/types/services/wsdl/WsCloud/v1/WsCloud.d.ts +2 -3
  133. package/types/services/wsdl/WsDali/v1.07/WsDali.d.ts +2 -3
  134. package/types/services/wsdl/WsDfu/v1.65/WsDfu.d.ts +2 -3
  135. package/types/services/wsdl/WsPackageProcess/v1.04/WsPackageProcess.d.ts +2 -3
  136. package/types/services/wsdl/WsResources/v1.01/WsResources.d.ts +2 -3
  137. package/types/services/wsdl/WsSMC/v1.27/WsSMC.d.ts +2 -3
  138. package/types/services/wsdl/WsSasha/v1.01/WsSasha.d.ts +2 -3
  139. package/types/services/wsdl/WsTopology/v1.32/WsTopology.d.ts +2 -3
  140. package/types/services/wsdl/WsWorkunits/v2/WsWorkunits.d.ts +2 -3
  141. package/types/services/wsdl/ws_access/v1.17/ws_access.d.ts +2 -3
  142. package/types/services/wsdl/ws_account/v1.06/ws_account.d.ts +2 -3
  143. package/types/services/wsdl/ws_elk/v1/ws_elk.d.ts +2 -3
  144. package/types/services/wsdl/ws_logaccess/v1.05/ws_logaccess.d.ts +2 -3
  145. package/types/services/wsdl/ws_machine/v1.17/ws_machine.d.ts +2 -3
  146. package/dist/index.es6.js +0 -10713
  147. package/dist/index.es6.js.map +0 -1
  148. package/dist/index.min.js +0 -2
  149. package/dist/index.min.js.map +0 -1
  150. package/dist/index.node.min.js +0 -2
  151. package/dist/index.node.min.js.map +0 -1
  152. package/lib-es6/__package__.js +0 -4
  153. package/lib-es6/__package__.js.map +0 -1
  154. package/lib-es6/__tests__/dfuXRef.js +0 -32
  155. package/lib-es6/__tests__/dfuXRef.js.map +0 -1
  156. package/lib-es6/__tests__/https.js +0 -60
  157. package/lib-es6/__tests__/https.js.map +0 -1
  158. package/lib-es6/__tests__/workunit.js +0 -71
  159. package/lib-es6/__tests__/workunit.js.map +0 -1
  160. package/lib-es6/clienttools/eclMeta.js +0 -463
  161. package/lib-es6/clienttools/eclMeta.js.map +0 -1
  162. package/lib-es6/clienttools/eclcc.js +0 -585
  163. package/lib-es6/clienttools/eclcc.js.map +0 -1
  164. package/lib-es6/connection.js +0 -254
  165. package/lib-es6/connection.js.map +0 -1
  166. package/lib-es6/ecl/activity.js +0 -172
  167. package/lib-es6/ecl/activity.js.map +0 -1
  168. package/lib-es6/ecl/dfuWorkunit.js +0 -591
  169. package/lib-es6/ecl/dfuWorkunit.js.map +0 -1
  170. package/lib-es6/ecl/graph.js +0 -289
  171. package/lib-es6/ecl/graph.js.map +0 -1
  172. package/lib-es6/ecl/logicalFile.js +0 -394
  173. package/lib-es6/ecl/logicalFile.js.map +0 -1
  174. package/lib-es6/ecl/machine.js +0 -159
  175. package/lib-es6/ecl/machine.js.map +0 -1
  176. package/lib-es6/ecl/query.js +0 -425
  177. package/lib-es6/ecl/query.js.map +0 -1
  178. package/lib-es6/ecl/queryGraph.js +0 -759
  179. package/lib-es6/ecl/queryGraph.js.map +0 -1
  180. package/lib-es6/ecl/resource.js +0 -47
  181. package/lib-es6/ecl/resource.js.map +0 -1
  182. package/lib-es6/ecl/result.js +0 -288
  183. package/lib-es6/ecl/result.js.map +0 -1
  184. package/lib-es6/ecl/scope.js +0 -234
  185. package/lib-es6/ecl/scope.js.map +0 -1
  186. package/lib-es6/ecl/sourceFile.js +0 -60
  187. package/lib-es6/ecl/sourceFile.js.map +0 -1
  188. package/lib-es6/ecl/store.js +0 -166
  189. package/lib-es6/ecl/store.js.map +0 -1
  190. package/lib-es6/ecl/targetCluster.js +0 -194
  191. package/lib-es6/ecl/targetCluster.js.map +0 -1
  192. package/lib-es6/ecl/timer.js +0 -76
  193. package/lib-es6/ecl/timer.js.map +0 -1
  194. package/lib-es6/ecl/topology.js +0 -159
  195. package/lib-es6/ecl/topology.js.map +0 -1
  196. package/lib-es6/ecl/workunit.js +0 -1553
  197. package/lib-es6/ecl/workunit.js.map +0 -1
  198. package/lib-es6/ecl/xsdParser.js +0 -253
  199. package/lib-es6/ecl/xsdParser.js.map +0 -1
  200. package/lib-es6/espConnection.js +0 -154
  201. package/lib-es6/espConnection.js.map +0 -1
  202. package/lib-es6/index-common.js +0 -39
  203. package/lib-es6/index-common.js.map +0 -1
  204. package/lib-es6/index.js +0 -3
  205. package/lib-es6/index.js.map +0 -1
  206. package/lib-es6/index.node.js +0 -64
  207. package/lib-es6/index.node.js.map +0 -1
  208. package/lib-es6/pem/trustwave.js +0 -2
  209. package/lib-es6/pem/trustwave.js.map +0 -1
  210. package/lib-es6/services/fileSpray.js +0 -40
  211. package/lib-es6/services/fileSpray.js.map +0 -1
  212. package/lib-es6/services/wsAccess.js +0 -12
  213. package/lib-es6/services/wsAccess.js.map +0 -1
  214. package/lib-es6/services/wsAccount.js +0 -27
  215. package/lib-es6/services/wsAccount.js.map +0 -1
  216. package/lib-es6/services/wsCloud.js +0 -23
  217. package/lib-es6/services/wsCloud.js.map +0 -1
  218. package/lib-es6/services/wsCodesign.js +0 -26
  219. package/lib-es6/services/wsCodesign.js.map +0 -1
  220. package/lib-es6/services/wsDFU.js +0 -19
  221. package/lib-es6/services/wsDFU.js.map +0 -1
  222. package/lib-es6/services/wsDFUXRef.js +0 -45
  223. package/lib-es6/services/wsDFUXRef.js.map +0 -1
  224. package/lib-es6/services/wsDali.js +0 -11
  225. package/lib-es6/services/wsDali.js.map +0 -1
  226. package/lib-es6/services/wsEcl.js +0 -111
  227. package/lib-es6/services/wsEcl.js.map +0 -1
  228. package/lib-es6/services/wsElk.js +0 -11
  229. package/lib-es6/services/wsElk.js.map +0 -1
  230. package/lib-es6/services/wsLogaccess.js +0 -226
  231. package/lib-es6/services/wsLogaccess.js.map +0 -1
  232. package/lib-es6/services/wsMachine.js +0 -57
  233. package/lib-es6/services/wsMachine.js.map +0 -1
  234. package/lib-es6/services/wsPackageProcess.js +0 -11
  235. package/lib-es6/services/wsPackageProcess.js.map +0 -1
  236. package/lib-es6/services/wsResources.js +0 -11
  237. package/lib-es6/services/wsResources.js.map +0 -1
  238. package/lib-es6/services/wsSMC.js +0 -22
  239. package/lib-es6/services/wsSMC.js.map +0 -1
  240. package/lib-es6/services/wsSasha.js +0 -12
  241. package/lib-es6/services/wsSasha.js.map +0 -1
  242. package/lib-es6/services/wsStore.js +0 -56
  243. package/lib-es6/services/wsStore.js.map +0 -1
  244. package/lib-es6/services/wsTopology.js +0 -45
  245. package/lib-es6/services/wsTopology.js.map +0 -1
  246. package/lib-es6/services/wsWorkunits.js +0 -130
  247. package/lib-es6/services/wsWorkunits.js.map +0 -1
  248. package/lib-es6/services/wsdl/FileSpray/v1.23/FileSpray.js +0 -110
  249. package/lib-es6/services/wsdl/FileSpray/v1.23/FileSpray.js.map +0 -1
  250. package/lib-es6/services/wsdl/FileSpray/v1.25/FileSpray.js +0 -116
  251. package/lib-es6/services/wsdl/FileSpray/v1.25/FileSpray.js.map +0 -1
  252. package/lib-es6/services/wsdl/FileSpray/v1.26/FileSpray.js +0 -119
  253. package/lib-es6/services/wsdl/FileSpray/v1.26/FileSpray.js.map +0 -1
  254. package/lib-es6/services/wsdl/WsCloud/v1/WsCloud.js +0 -17
  255. package/lib-es6/services/wsdl/WsCloud/v1/WsCloud.js.map +0 -1
  256. package/lib-es6/services/wsdl/WsDFUXRef/v1.02/WsDFUXRef.js +0 -47
  257. package/lib-es6/services/wsdl/WsDFUXRef/v1.02/WsDFUXRef.js.map +0 -1
  258. package/lib-es6/services/wsdl/WsDali/v1.04/WsDali.js +0 -68
  259. package/lib-es6/services/wsdl/WsDali/v1.04/WsDali.js.map +0 -1
  260. package/lib-es6/services/wsdl/WsDali/v1.07/WsDali.js +0 -101
  261. package/lib-es6/services/wsdl/WsDali/v1.07/WsDali.js.map +0 -1
  262. package/lib-es6/services/wsdl/WsDfu/v1.62/WsDfu.js +0 -142
  263. package/lib-es6/services/wsdl/WsDfu/v1.62/WsDfu.js.map +0 -1
  264. package/lib-es6/services/wsdl/WsDfu/v1.63/WsDfu.js +0 -145
  265. package/lib-es6/services/wsdl/WsDfu/v1.63/WsDfu.js.map +0 -1
  266. package/lib-es6/services/wsdl/WsDfu/v1.65/WsDfu.js +0 -145
  267. package/lib-es6/services/wsdl/WsDfu/v1.65/WsDfu.js.map +0 -1
  268. package/lib-es6/services/wsdl/WsFileIO/v1.01/WsFileIO.js +0 -23
  269. package/lib-es6/services/wsdl/WsFileIO/v1.01/WsFileIO.js.map +0 -1
  270. package/lib-es6/services/wsdl/WsPackageProcess/v1.04/WsPackageProcess.js +0 -62
  271. package/lib-es6/services/wsdl/WsPackageProcess/v1.04/WsPackageProcess.js.map +0 -1
  272. package/lib-es6/services/wsdl/WsResources/v1.01/WsResources.js +0 -20
  273. package/lib-es6/services/wsdl/WsResources/v1.01/WsResources.js.map +0 -1
  274. package/lib-es6/services/wsdl/WsSMC/v1.24/WsSMC.js +0 -93
  275. package/lib-es6/services/wsdl/WsSMC/v1.24/WsSMC.js.map +0 -1
  276. package/lib-es6/services/wsdl/WsSMC/v1.27/WsSMC.js +0 -99
  277. package/lib-es6/services/wsdl/WsSMC/v1.27/WsSMC.js.map +0 -1
  278. package/lib-es6/services/wsdl/WsSasha/v1.01/WsSasha.js +0 -34
  279. package/lib-es6/services/wsdl/WsSasha/v1.01/WsSasha.js.map +0 -1
  280. package/lib-es6/services/wsdl/WsTopology/v1.31/WsTopology.js +0 -80
  281. package/lib-es6/services/wsdl/WsTopology/v1.31/WsTopology.js.map +0 -1
  282. package/lib-es6/services/wsdl/WsTopology/v1.32/WsTopology.js +0 -83
  283. package/lib-es6/services/wsdl/WsTopology/v1.32/WsTopology.js.map +0 -1
  284. package/lib-es6/services/wsdl/WsWorkunits/v1.88/WsWorkunits.js +0 -328
  285. package/lib-es6/services/wsdl/WsWorkunits/v1.88/WsWorkunits.js.map +0 -1
  286. package/lib-es6/services/wsdl/WsWorkunits/v1.94/WsWorkunits.js +0 -354
  287. package/lib-es6/services/wsdl/WsWorkunits/v1.94/WsWorkunits.js.map +0 -1
  288. package/lib-es6/services/wsdl/WsWorkunits/v1.95/WsWorkunits.js +0 -354
  289. package/lib-es6/services/wsdl/WsWorkunits/v1.95/WsWorkunits.js.map +0 -1
  290. package/lib-es6/services/wsdl/WsWorkunits/v1.97/WsWorkunits.js +0 -376
  291. package/lib-es6/services/wsdl/WsWorkunits/v1.97/WsWorkunits.js.map +0 -1
  292. package/lib-es6/services/wsdl/WsWorkunits/v1.98/WsWorkunits.js +0 -370
  293. package/lib-es6/services/wsdl/WsWorkunits/v1.98/WsWorkunits.js.map +0 -1
  294. package/lib-es6/services/wsdl/WsWorkunits/v1.99/WsWorkunits.js +0 -376
  295. package/lib-es6/services/wsdl/WsWorkunits/v1.99/WsWorkunits.js.map +0 -1
  296. package/lib-es6/services/wsdl/WsWorkunits/v2/WsWorkunits.js +0 -376
  297. package/lib-es6/services/wsdl/WsWorkunits/v2/WsWorkunits.js.map +0 -1
  298. package/lib-es6/services/wsdl/ws_access/v1.16/ws_access.js +0 -203
  299. package/lib-es6/services/wsdl/ws_access/v1.16/ws_access.js.map +0 -1
  300. package/lib-es6/services/wsdl/ws_access/v1.17/ws_access.js +0 -200
  301. package/lib-es6/services/wsdl/ws_access/v1.17/ws_access.js.map +0 -1
  302. package/lib-es6/services/wsdl/ws_account/v1.05/ws_account.js +0 -26
  303. package/lib-es6/services/wsdl/ws_account/v1.05/ws_account.js.map +0 -1
  304. package/lib-es6/services/wsdl/ws_account/v1.06/ws_account.js +0 -26
  305. package/lib-es6/services/wsdl/ws_account/v1.06/ws_account.js.map +0 -1
  306. package/lib-es6/services/wsdl/ws_codesign/v1.1/ws_codesign.js +0 -27
  307. package/lib-es6/services/wsdl/ws_codesign/v1.1/ws_codesign.js.map +0 -1
  308. package/lib-es6/services/wsdl/ws_elk/v1/ws_elk.js +0 -17
  309. package/lib-es6/services/wsdl/ws_elk/v1/ws_elk.js.map +0 -1
  310. package/lib-es6/services/wsdl/ws_logaccess/v1/ws_logaccess.js +0 -28
  311. package/lib-es6/services/wsdl/ws_logaccess/v1/ws_logaccess.js.map +0 -1
  312. package/lib-es6/services/wsdl/ws_logaccess/v1.02/ws_logaccess.js +0 -47
  313. package/lib-es6/services/wsdl/ws_logaccess/v1.02/ws_logaccess.js.map +0 -1
  314. package/lib-es6/services/wsdl/ws_logaccess/v1.03/ws_logaccess.js +0 -63
  315. package/lib-es6/services/wsdl/ws_logaccess/v1.03/ws_logaccess.js.map +0 -1
  316. package/lib-es6/services/wsdl/ws_logaccess/v1.04/ws_logaccess.js +0 -85
  317. package/lib-es6/services/wsdl/ws_logaccess/v1.04/ws_logaccess.js.map +0 -1
  318. package/lib-es6/services/wsdl/ws_logaccess/v1.05/ws_logaccess.js +0 -88
  319. package/lib-es6/services/wsdl/ws_logaccess/v1.05/ws_logaccess.js.map +0 -1
  320. package/lib-es6/services/wsdl/ws_machine/v1.17/ws_machine.js +0 -41
  321. package/lib-es6/services/wsdl/ws_machine/v1.17/ws_machine.js.map +0 -1
  322. package/lib-es6/services/wsdl/wsstore/v1.02/wsstore.js +0 -44
  323. package/lib-es6/services/wsdl/wsstore/v1.02/wsstore.js.map +0 -1
  324. package/src/__tests__/dfuXRef.ts +0 -22
  325. package/src/__tests__/https.ts +0 -69
  326. package/src/__tests__/workunit.ts +0 -35
  327. package/types/__package__.d.ts.map +0 -1
  328. package/types/__tests__/dfuXRef.d.ts +0 -2
  329. package/types/__tests__/dfuXRef.d.ts.map +0 -1
  330. package/types/__tests__/https.d.ts +0 -2
  331. package/types/__tests__/https.d.ts.map +0 -1
  332. package/types/__tests__/workunit.d.ts +0 -2
  333. package/types/__tests__/workunit.d.ts.map +0 -1
  334. package/types/clienttools/eclMeta.d.ts.map +0 -1
  335. package/types/clienttools/eclcc.d.ts.map +0 -1
  336. package/types/connection.d.ts.map +0 -1
  337. package/types/ecl/activity.d.ts.map +0 -1
  338. package/types/ecl/dfuWorkunit.d.ts.map +0 -1
  339. package/types/ecl/graph.d.ts.map +0 -1
  340. package/types/ecl/logicalFile.d.ts.map +0 -1
  341. package/types/ecl/machine.d.ts.map +0 -1
  342. package/types/ecl/query.d.ts.map +0 -1
  343. package/types/ecl/queryGraph.d.ts.map +0 -1
  344. package/types/ecl/resource.d.ts.map +0 -1
  345. package/types/ecl/result.d.ts.map +0 -1
  346. package/types/ecl/scope.d.ts.map +0 -1
  347. package/types/ecl/sourceFile.d.ts.map +0 -1
  348. package/types/ecl/store.d.ts.map +0 -1
  349. package/types/ecl/targetCluster.d.ts.map +0 -1
  350. package/types/ecl/timer.d.ts.map +0 -1
  351. package/types/ecl/topology.d.ts.map +0 -1
  352. package/types/ecl/workunit.d.ts.map +0 -1
  353. package/types/ecl/xsdParser.d.ts.map +0 -1
  354. package/types/espConnection.d.ts.map +0 -1
  355. package/types/index-common.d.ts.map +0 -1
  356. package/types/index.d.ts +0 -3
  357. package/types/index.d.ts.map +0 -1
  358. package/types/index.node.d.ts.map +0 -1
  359. package/types/pem/trustwave.d.ts.map +0 -1
  360. package/types/services/fileSpray.d.ts.map +0 -1
  361. package/types/services/wsAccess.d.ts.map +0 -1
  362. package/types/services/wsAccount.d.ts.map +0 -1
  363. package/types/services/wsCloud.d.ts.map +0 -1
  364. package/types/services/wsCodesign.d.ts.map +0 -1
  365. package/types/services/wsDFU.d.ts.map +0 -1
  366. package/types/services/wsDFUXRef.d.ts.map +0 -1
  367. package/types/services/wsDali.d.ts.map +0 -1
  368. package/types/services/wsEcl.d.ts.map +0 -1
  369. package/types/services/wsElk.d.ts.map +0 -1
  370. package/types/services/wsLogaccess.d.ts.map +0 -1
  371. package/types/services/wsMachine.d.ts.map +0 -1
  372. package/types/services/wsPackageProcess.d.ts.map +0 -1
  373. package/types/services/wsResources.d.ts.map +0 -1
  374. package/types/services/wsSMC.d.ts.map +0 -1
  375. package/types/services/wsSasha.d.ts.map +0 -1
  376. package/types/services/wsStore.d.ts.map +0 -1
  377. package/types/services/wsTopology.d.ts.map +0 -1
  378. package/types/services/wsWorkunits.d.ts.map +0 -1
  379. package/types/services/wsdl/FileSpray/v1.23/FileSpray.d.ts +0 -830
  380. package/types/services/wsdl/FileSpray/v1.23/FileSpray.d.ts.map +0 -1
  381. package/types/services/wsdl/FileSpray/v1.25/FileSpray.d.ts +0 -856
  382. package/types/services/wsdl/FileSpray/v1.25/FileSpray.d.ts.map +0 -1
  383. package/types/services/wsdl/FileSpray/v1.26/FileSpray.d.ts.map +0 -1
  384. package/types/services/wsdl/WsCloud/v1/WsCloud.d.ts.map +0 -1
  385. package/types/services/wsdl/WsDFUXRef/v1.02/WsDFUXRef.d.ts +0 -148
  386. package/types/services/wsdl/WsDFUXRef/v1.02/WsDFUXRef.d.ts.map +0 -1
  387. package/types/services/wsdl/WsDali/v1.04/WsDali.d.ts +0 -125
  388. package/types/services/wsdl/WsDali/v1.04/WsDali.d.ts.map +0 -1
  389. package/types/services/wsdl/WsDali/v1.07/WsDali.d.ts.map +0 -1
  390. package/types/services/wsdl/WsDfu/v1.62/WsDfu.d.ts +0 -1224
  391. package/types/services/wsdl/WsDfu/v1.62/WsDfu.d.ts.map +0 -1
  392. package/types/services/wsdl/WsDfu/v1.63/WsDfu.d.ts +0 -1233
  393. package/types/services/wsdl/WsDfu/v1.63/WsDfu.d.ts.map +0 -1
  394. package/types/services/wsdl/WsDfu/v1.65/WsDfu.d.ts.map +0 -1
  395. package/types/services/wsdl/WsFileIO/v1.01/WsFileIO.d.ts +0 -77
  396. package/types/services/wsdl/WsFileIO/v1.01/WsFileIO.d.ts.map +0 -1
  397. package/types/services/wsdl/WsPackageProcess/v1.04/WsPackageProcess.d.ts.map +0 -1
  398. package/types/services/wsdl/WsResources/v1.01/WsResources.d.ts.map +0 -1
  399. package/types/services/wsdl/WsSMC/v1.24/WsSMC.d.ts +0 -515
  400. package/types/services/wsdl/WsSMC/v1.24/WsSMC.d.ts.map +0 -1
  401. package/types/services/wsdl/WsSMC/v1.27/WsSMC.d.ts.map +0 -1
  402. package/types/services/wsdl/WsSasha/v1.01/WsSasha.d.ts.map +0 -1
  403. package/types/services/wsdl/WsTopology/v1.31/WsTopology.d.ts +0 -694
  404. package/types/services/wsdl/WsTopology/v1.31/WsTopology.d.ts.map +0 -1
  405. package/types/services/wsdl/WsTopology/v1.32/WsTopology.d.ts.map +0 -1
  406. package/types/services/wsdl/WsWorkunits/v1.88/WsWorkunits.d.ts +0 -2405
  407. package/types/services/wsdl/WsWorkunits/v1.88/WsWorkunits.d.ts.map +0 -1
  408. package/types/services/wsdl/WsWorkunits/v1.94/WsWorkunits.d.ts +0 -2520
  409. package/types/services/wsdl/WsWorkunits/v1.94/WsWorkunits.d.ts.map +0 -1
  410. package/types/services/wsdl/WsWorkunits/v1.95/WsWorkunits.d.ts +0 -2521
  411. package/types/services/wsdl/WsWorkunits/v1.95/WsWorkunits.d.ts.map +0 -1
  412. package/types/services/wsdl/WsWorkunits/v1.97/WsWorkunits.d.ts +0 -2529
  413. package/types/services/wsdl/WsWorkunits/v1.97/WsWorkunits.d.ts.map +0 -1
  414. package/types/services/wsdl/WsWorkunits/v1.98/WsWorkunits.d.ts +0 -2623
  415. package/types/services/wsdl/WsWorkunits/v1.98/WsWorkunits.d.ts.map +0 -1
  416. package/types/services/wsdl/WsWorkunits/v1.99/WsWorkunits.d.ts +0 -2555
  417. package/types/services/wsdl/WsWorkunits/v1.99/WsWorkunits.d.ts.map +0 -1
  418. package/types/services/wsdl/WsWorkunits/v2/WsWorkunits.d.ts.map +0 -1
  419. package/types/services/wsdl/ws_access/v1.16/ws_access.d.ts +0 -778
  420. package/types/services/wsdl/ws_access/v1.16/ws_access.d.ts.map +0 -1
  421. package/types/services/wsdl/ws_access/v1.17/ws_access.d.ts.map +0 -1
  422. package/types/services/wsdl/ws_account/v1.05/ws_account.d.ts +0 -74
  423. package/types/services/wsdl/ws_account/v1.05/ws_account.d.ts.map +0 -1
  424. package/types/services/wsdl/ws_account/v1.06/ws_account.d.ts.map +0 -1
  425. package/types/services/wsdl/ws_codesign/v1.1/ws_codesign.d.ts +0 -67
  426. package/types/services/wsdl/ws_codesign/v1.1/ws_codesign.d.ts.map +0 -1
  427. package/types/services/wsdl/ws_elk/v1/ws_elk.d.ts.map +0 -1
  428. package/types/services/wsdl/ws_logaccess/v1/ws_logaccess.d.ts +0 -56
  429. package/types/services/wsdl/ws_logaccess/v1/ws_logaccess.d.ts.map +0 -1
  430. package/types/services/wsdl/ws_logaccess/v1.02/ws_logaccess.d.ts +0 -126
  431. package/types/services/wsdl/ws_logaccess/v1.02/ws_logaccess.d.ts.map +0 -1
  432. package/types/services/wsdl/ws_logaccess/v1.03/ws_logaccess.d.ts +0 -150
  433. package/types/services/wsdl/ws_logaccess/v1.03/ws_logaccess.d.ts.map +0 -1
  434. package/types/services/wsdl/ws_logaccess/v1.04/ws_logaccess.d.ts +0 -171
  435. package/types/services/wsdl/ws_logaccess/v1.04/ws_logaccess.d.ts.map +0 -1
  436. package/types/services/wsdl/ws_logaccess/v1.05/ws_logaccess.d.ts.map +0 -1
  437. package/types/services/wsdl/ws_machine/v1.17/ws_machine.d.ts.map +0 -1
  438. package/types/services/wsdl/wsstore/v1.02/wsstore.d.ts +0 -179
  439. package/types/services/wsdl/wsstore/v1.02/wsstore.d.ts.map +0 -1
  440. package/types-3.4/__package__.d.ts +0 -4
  441. package/types-3.4/__tests__/dfuXRef.d.ts +0 -2
  442. package/types-3.4/__tests__/https.d.ts +0 -2
  443. package/types-3.4/__tests__/workunit.d.ts +0 -2
  444. package/types-3.4/clienttools/eclMeta.d.ts +0 -124
  445. package/types-3.4/clienttools/eclcc.d.ts +0 -105
  446. package/types-3.4/connection.d.ts +0 -43
  447. package/types-3.4/ecl/activity.d.ts +0 -40
  448. package/types-3.4/ecl/dfuWorkunit.d.ts +0 -103
  449. package/types-3.4/ecl/graph.d.ts +0 -46
  450. package/types-3.4/ecl/logicalFile.d.ts +0 -91
  451. package/types-3.4/ecl/machine.d.ts +0 -40
  452. package/types-3.4/ecl/query.d.ts +0 -70
  453. package/types-3.4/ecl/queryGraph.d.ts +0 -101
  454. package/types-3.4/ecl/resource.d.ts +0 -16
  455. package/types-3.4/ecl/result.d.ts +0 -88
  456. package/types-3.4/ecl/scope.d.ts +0 -55
  457. package/types-3.4/ecl/sourceFile.d.ts +0 -19
  458. package/types-3.4/ecl/store.d.ts +0 -40
  459. package/types-3.4/ecl/targetCluster.d.ts +0 -43
  460. package/types-3.4/ecl/timer.d.ts +0 -24
  461. package/types-3.4/ecl/topology.d.ts +0 -33
  462. package/types-3.4/ecl/workunit.d.ts +0 -275
  463. package/types-3.4/ecl/xsdParser.d.ts +0 -42
  464. package/types-3.4/espConnection.d.ts +0 -44
  465. package/types-3.4/index-common.d.ts +0 -39
  466. package/types-3.4/index.d.ts +0 -3
  467. package/types-3.4/index.node.d.ts +0 -4
  468. package/types-3.4/pem/trustwave.d.ts +0 -2
  469. package/types-3.4/services/fileSpray.d.ts +0 -27
  470. package/types-3.4/services/wsAccess.d.ts +0 -5
  471. package/types-3.4/services/wsAccount.d.ts +0 -6
  472. package/types-3.4/services/wsCloud.d.ts +0 -6
  473. package/types-3.4/services/wsCodesign.d.ts +0 -57
  474. package/types-3.4/services/wsDFU.d.ts +0 -11
  475. package/types-3.4/services/wsDFUXRef.d.ts +0 -220
  476. package/types-3.4/services/wsDali.d.ts +0 -5
  477. package/types-3.4/services/wsEcl.d.ts +0 -18
  478. package/types-3.4/services/wsElk.d.ts +0 -5
  479. package/types-3.4/services/wsLogaccess.d.ts +0 -55
  480. package/types-3.4/services/wsMachine.d.ts +0 -29
  481. package/types-3.4/services/wsPackageProcess.d.ts +0 -5
  482. package/types-3.4/services/wsResources.d.ts +0 -5
  483. package/types-3.4/services/wsSMC.d.ts +0 -8
  484. package/types-3.4/services/wsSasha.d.ts +0 -5
  485. package/types-3.4/services/wsStore.d.ts +0 -147
  486. package/types-3.4/services/wsTopology.d.ts +0 -10
  487. package/types-3.4/services/wsWorkunits.d.ts +0 -61
  488. package/types-3.4/services/wsdl/FileSpray/v1.23/FileSpray.d.ts +0 -830
  489. package/types-3.4/services/wsdl/FileSpray/v1.25/FileSpray.d.ts +0 -856
  490. package/types-3.4/services/wsdl/FileSpray/v1.26/FileSpray.d.ts +0 -736
  491. package/types-3.4/services/wsdl/WsCloud/v1/WsCloud.d.ts +0 -19
  492. package/types-3.4/services/wsdl/WsDFUXRef/v1.02/WsDFUXRef.d.ts +0 -148
  493. package/types-3.4/services/wsdl/WsDali/v1.04/WsDali.d.ts +0 -125
  494. package/types-3.4/services/wsdl/WsDali/v1.07/WsDali.d.ts +0 -158
  495. package/types-3.4/services/wsdl/WsDfu/v1.62/WsDfu.d.ts +0 -1224
  496. package/types-3.4/services/wsdl/WsDfu/v1.63/WsDfu.d.ts +0 -1233
  497. package/types-3.4/services/wsdl/WsDfu/v1.65/WsDfu.d.ts +0 -1011
  498. package/types-3.4/services/wsdl/WsFileIO/v1.01/WsFileIO.d.ts +0 -77
  499. package/types-3.4/services/wsdl/WsPackageProcess/v1.04/WsPackageProcess.d.ts +0 -396
  500. package/types-3.4/services/wsdl/WsResources/v1.01/WsResources.d.ts +0 -85
  501. package/types-3.4/services/wsdl/WsSMC/v1.24/WsSMC.d.ts +0 -515
  502. package/types-3.4/services/wsdl/WsSMC/v1.27/WsSMC.d.ts +0 -519
  503. package/types-3.4/services/wsdl/WsSasha/v1.01/WsSasha.d.ts +0 -65
  504. package/types-3.4/services/wsdl/WsTopology/v1.31/WsTopology.d.ts +0 -694
  505. package/types-3.4/services/wsdl/WsTopology/v1.32/WsTopology.d.ts +0 -716
  506. package/types-3.4/services/wsdl/WsWorkunits/v1.88/WsWorkunits.d.ts +0 -2405
  507. package/types-3.4/services/wsdl/WsWorkunits/v1.94/WsWorkunits.d.ts +0 -2520
  508. package/types-3.4/services/wsdl/WsWorkunits/v1.95/WsWorkunits.d.ts +0 -2521
  509. package/types-3.4/services/wsdl/WsWorkunits/v1.97/WsWorkunits.d.ts +0 -2529
  510. package/types-3.4/services/wsdl/WsWorkunits/v1.98/WsWorkunits.d.ts +0 -2623
  511. package/types-3.4/services/wsdl/WsWorkunits/v1.99/WsWorkunits.d.ts +0 -2555
  512. package/types-3.4/services/wsdl/WsWorkunits/v2/WsWorkunits.d.ts +0 -2549
  513. package/types-3.4/services/wsdl/ws_access/v1.16/ws_access.d.ts +0 -778
  514. package/types-3.4/services/wsdl/ws_access/v1.17/ws_access.d.ts +0 -721
  515. package/types-3.4/services/wsdl/ws_account/v1.05/ws_account.d.ts +0 -74
  516. package/types-3.4/services/wsdl/ws_account/v1.06/ws_account.d.ts +0 -71
  517. package/types-3.4/services/wsdl/ws_codesign/v1.1/ws_codesign.d.ts +0 -67
  518. package/types-3.4/services/wsdl/ws_elk/v1/ws_elk.d.ts +0 -28
  519. package/types-3.4/services/wsdl/ws_logaccess/v1/ws_logaccess.d.ts +0 -56
  520. package/types-3.4/services/wsdl/ws_logaccess/v1.02/ws_logaccess.d.ts +0 -126
  521. package/types-3.4/services/wsdl/ws_logaccess/v1.03/ws_logaccess.d.ts +0 -150
  522. package/types-3.4/services/wsdl/ws_logaccess/v1.04/ws_logaccess.d.ts +0 -171
  523. package/types-3.4/services/wsdl/ws_logaccess/v1.05/ws_logaccess.d.ts +0 -175
  524. package/types-3.4/services/wsdl/ws_machine/v1.17/ws_machine.d.ts +0 -470
  525. package/types-3.4/services/wsdl/wsstore/v1.02/wsstore.d.ts +0 -179
@@ -1,1553 +0,0 @@
1
- import { __assign, __awaiter, __extends, __generator } from "tslib";
2
- import { Cache, deepMixinT, scopedLogger, StateObject, XMLNode } from "@hpcc-js/util";
3
- import { format as d3Format } from "d3-format";
4
- import { utcFormat, utcParse } from "d3-time-format";
5
- import * as WsTopology from "../services/wsTopology";
6
- import { WsWorkunits, WUStateID, WorkunitsService, WorkunitsServiceEx, WUUpdate } from "../services/wsWorkunits";
7
- import { createGraph, createXGMMLGraph, ECLGraph, GraphCache } from "./graph";
8
- import { Resource } from "./resource";
9
- import { Result, ResultCache } from "./result";
10
- import { Scope } from "./scope";
11
- import { SourceFile } from "./sourceFile";
12
- import { Timer } from "./timer";
13
- var formatter = utcFormat("%Y-%m-%dT%H:%M:%S.%LZ");
14
- var parser = utcParse("%Y-%m-%dT%H:%M:%S.%LZ");
15
- var d3FormatNum = d3Format(",");
16
- function formatNum(num) {
17
- if (num && !isNaN(+num)) {
18
- return d3FormatNum(+num);
19
- }
20
- return num;
21
- }
22
- function safeDelete(obj, key, prop) {
23
- if (obj[key] === undefined || obj[key][prop] === undefined)
24
- return;
25
- if (key === "__proto__" || key === "constructor" || key === "prototype")
26
- return;
27
- delete obj[key][prop];
28
- }
29
- var DEFINITION_LIST = "DefinitionList";
30
- var definitionRegex = /([a-zA-Z]:)?(.*[\\\/])(.*)(\((\d+),(\d+)\))/;
31
- export var PropertyType = ["Avg", "Min", "Max", "Delta", "StdDev"];
32
- export var RelatedProperty = ["SkewMin", "SkewMax", "NodeMin", "NodeMax"];
33
- var metricKeyRegex = /[A-Z][a-z]*/g;
34
- function _splitMetric(fullLabel) {
35
- // Related properties ---
36
- for (var _i = 0, RelatedProperty_1 = RelatedProperty; _i < RelatedProperty_1.length; _i++) {
37
- var relProp = RelatedProperty_1[_i];
38
- var index = fullLabel.indexOf(relProp);
39
- if (index === 0) {
40
- var measure = "";
41
- var label = fullLabel.slice(index + relProp.length);
42
- return { measure: measure, ext: relProp, label: label };
43
- }
44
- }
45
- // Primary properties ---
46
- var labelParts = fullLabel.match(metricKeyRegex);
47
- if (labelParts === null || labelParts === void 0 ? void 0 : labelParts.length) {
48
- var measure = labelParts.shift();
49
- var label = labelParts.join("");
50
- for (var _a = 0, PropertyType_1 = PropertyType; _a < PropertyType_1.length; _a++) {
51
- var ext = PropertyType_1[_a];
52
- var index = label.indexOf(ext);
53
- if (index === 0) {
54
- label = label.slice(index + ext.length);
55
- return { measure: measure, ext: ext, label: label };
56
- }
57
- }
58
- // Not an aggregate property ---
59
- return { measure: measure, ext: "", label: label };
60
- }
61
- // No match found ---
62
- return { measure: "", ext: "", label: fullLabel };
63
- }
64
- var splitLabelCache = {};
65
- export function splitMetric(key) {
66
- var retVal = splitLabelCache[key];
67
- if (!retVal) {
68
- retVal = _splitMetric(key);
69
- splitLabelCache[key] = retVal;
70
- }
71
- return retVal;
72
- }
73
- function formatValue(item, key) {
74
- var _a, _b;
75
- return (_b = (_a = item.__formattedProps) === null || _a === void 0 ? void 0 : _a[key]) !== null && _b !== void 0 ? _b : item[key];
76
- }
77
- function safeParseFloat(val) {
78
- if (val === undefined)
79
- return undefined;
80
- var retVal = parseFloat(val);
81
- return isNaN(retVal) ? undefined : retVal;
82
- }
83
- function formatValues(item, key, dedup) {
84
- var keyParts = splitMetric(key);
85
- if (!dedup[keyParts.measure]) {
86
- dedup[keyParts.label] = true;
87
- var avg = safeParseFloat(item["".concat(keyParts.measure, "Avg").concat(keyParts.label)]);
88
- var min = safeParseFloat(item["".concat(keyParts.measure, "Min").concat(keyParts.label)]);
89
- var max = safeParseFloat(item["".concat(keyParts.measure, "Max").concat(keyParts.label)]);
90
- var stdDev = safeParseFloat(item["".concat(keyParts.measure, "StdDev").concat(keyParts.label)]);
91
- var StdDevs = Math.max((avg - min) / stdDev, (max - avg) / stdDev);
92
- return {
93
- Key: "".concat(keyParts.measure).concat(keyParts.label),
94
- Value: formatValue(item, "".concat(keyParts.measure).concat(keyParts.label)),
95
- // Extended properties ---
96
- Avg: formatValue(item, "".concat(keyParts.measure, "Avg").concat(keyParts.label)),
97
- Min: formatValue(item, "".concat(keyParts.measure, "Min").concat(keyParts.label)),
98
- Max: formatValue(item, "".concat(keyParts.measure, "Max").concat(keyParts.label)),
99
- Delta: formatValue(item, "".concat(keyParts.measure, "Delta").concat(keyParts.label)),
100
- StdDev: formatValue(item, "".concat(keyParts.measure, "StdDev").concat(keyParts.label)),
101
- StdDevs: isNaN(StdDevs) ? undefined : StdDevs,
102
- // Related properties ---
103
- SkewMin: formatValue(item, "SkewMin".concat(keyParts.label)),
104
- SkewMax: formatValue(item, "SkewMax".concat(keyParts.label)),
105
- NodeMin: formatValue(item, "NodeMin".concat(keyParts.label)),
106
- NodeMax: formatValue(item, "NodeMax".concat(keyParts.label))
107
- };
108
- }
109
- return null;
110
- }
111
- var logger = scopedLogger("workunit.ts");
112
- var WorkunitCache = /** @class */ (function (_super) {
113
- __extends(WorkunitCache, _super);
114
- function WorkunitCache() {
115
- return _super.call(this, function (obj) {
116
- return "".concat(obj.BaseUrl, "-").concat(obj.Wuid);
117
- }) || this;
118
- }
119
- return WorkunitCache;
120
- }(Cache));
121
- export { WorkunitCache };
122
- var _workunits = new WorkunitCache();
123
- var Workunit = /** @class */ (function (_super) {
124
- __extends(Workunit, _super);
125
- // --- --- ---
126
- function Workunit(optsConnection, wuid) {
127
- var _this = _super.call(this) || this;
128
- _this._debugMode = false;
129
- _this._resultCache = new ResultCache();
130
- _this._graphCache = new GraphCache();
131
- _this.connection = new WorkunitsService(optsConnection);
132
- _this.topologyConnection = new WsTopology.TopologyService(optsConnection);
133
- _this.clearState(wuid);
134
- return _this;
135
- }
136
- Object.defineProperty(Workunit.prototype, "BaseUrl", {
137
- get: function () { return this.connection.baseUrl; },
138
- enumerable: false,
139
- configurable: true
140
- });
141
- Object.defineProperty(Workunit.prototype, "properties", {
142
- // Accessors ---
143
- get: function () { return this.get(); },
144
- enumerable: false,
145
- configurable: true
146
- });
147
- Object.defineProperty(Workunit.prototype, "Wuid", {
148
- get: function () { return this.get("Wuid"); },
149
- enumerable: false,
150
- configurable: true
151
- });
152
- Object.defineProperty(Workunit.prototype, "Owner", {
153
- get: function () { return this.get("Owner", ""); },
154
- enumerable: false,
155
- configurable: true
156
- });
157
- Object.defineProperty(Workunit.prototype, "Cluster", {
158
- get: function () { return this.get("Cluster", ""); },
159
- enumerable: false,
160
- configurable: true
161
- });
162
- Object.defineProperty(Workunit.prototype, "Jobname", {
163
- get: function () { return this.get("Jobname", ""); },
164
- enumerable: false,
165
- configurable: true
166
- });
167
- Object.defineProperty(Workunit.prototype, "Description", {
168
- get: function () { return this.get("Description", ""); },
169
- enumerable: false,
170
- configurable: true
171
- });
172
- Object.defineProperty(Workunit.prototype, "ActionEx", {
173
- get: function () { return this.get("ActionEx", ""); },
174
- enumerable: false,
175
- configurable: true
176
- });
177
- Object.defineProperty(Workunit.prototype, "StateID", {
178
- get: function () { return this.get("StateID", WUStateID.Unknown); },
179
- enumerable: false,
180
- configurable: true
181
- });
182
- Object.defineProperty(Workunit.prototype, "State", {
183
- get: function () { return this.get("State") || WUStateID[this.StateID]; },
184
- enumerable: false,
185
- configurable: true
186
- });
187
- Object.defineProperty(Workunit.prototype, "Protected", {
188
- get: function () { return this.get("Protected", false); },
189
- enumerable: false,
190
- configurable: true
191
- });
192
- Object.defineProperty(Workunit.prototype, "Exceptions", {
193
- get: function () { return this.get("Exceptions", { ECLException: [] }); },
194
- enumerable: false,
195
- configurable: true
196
- });
197
- Object.defineProperty(Workunit.prototype, "ResultViews", {
198
- get: function () { return this.get("ResultViews", { View: [] }); },
199
- enumerable: false,
200
- configurable: true
201
- });
202
- Object.defineProperty(Workunit.prototype, "ResultCount", {
203
- get: function () { return this.get("ResultCount", 0); },
204
- enumerable: false,
205
- configurable: true
206
- });
207
- Object.defineProperty(Workunit.prototype, "Results", {
208
- get: function () { return this.get("Results", { ECLResult: [] }); },
209
- enumerable: false,
210
- configurable: true
211
- });
212
- Object.defineProperty(Workunit.prototype, "CResults", {
213
- get: function () {
214
- var _this = this;
215
- return this.Results.ECLResult.map(function (eclResult) {
216
- return _this._resultCache.get(eclResult, function () {
217
- return Result.attach(_this.connection, _this.Wuid, eclResult, _this.ResultViews.View);
218
- });
219
- });
220
- },
221
- enumerable: false,
222
- configurable: true
223
- });
224
- Object.defineProperty(Workunit.prototype, "SequenceResults", {
225
- get: function () {
226
- var retVal = {};
227
- this.CResults.forEach(function (result) {
228
- retVal[result.Sequence] = result;
229
- });
230
- return retVal;
231
- },
232
- enumerable: false,
233
- configurable: true
234
- });
235
- Object.defineProperty(Workunit.prototype, "Timers", {
236
- get: function () { return this.get("Timers", { ECLTimer: [] }); },
237
- enumerable: false,
238
- configurable: true
239
- });
240
- Object.defineProperty(Workunit.prototype, "CTimers", {
241
- get: function () {
242
- var _this = this;
243
- return this.Timers.ECLTimer.map(function (eclTimer) {
244
- return new Timer(_this.connection, _this.Wuid, eclTimer);
245
- });
246
- },
247
- enumerable: false,
248
- configurable: true
249
- });
250
- Object.defineProperty(Workunit.prototype, "GraphCount", {
251
- get: function () { return this.get("GraphCount", 0); },
252
- enumerable: false,
253
- configurable: true
254
- });
255
- Object.defineProperty(Workunit.prototype, "Graphs", {
256
- get: function () { return this.get("Graphs", { ECLGraph: [] }); },
257
- enumerable: false,
258
- configurable: true
259
- });
260
- Object.defineProperty(Workunit.prototype, "CGraphs", {
261
- get: function () {
262
- var _this = this;
263
- return this.Graphs.ECLGraph.map(function (eclGraph) {
264
- return _this._graphCache.get(eclGraph, function () {
265
- return new ECLGraph(_this, eclGraph, _this.CTimers);
266
- });
267
- });
268
- },
269
- enumerable: false,
270
- configurable: true
271
- });
272
- Object.defineProperty(Workunit.prototype, "ThorLogList", {
273
- get: function () { return this.get("ThorLogList"); },
274
- enumerable: false,
275
- configurable: true
276
- });
277
- Object.defineProperty(Workunit.prototype, "ResourceURLCount", {
278
- get: function () { return this.get("ResourceURLCount", 0); },
279
- enumerable: false,
280
- configurable: true
281
- });
282
- Object.defineProperty(Workunit.prototype, "ResourceURLs", {
283
- get: function () { return this.get("ResourceURLs", { URL: [] }); },
284
- enumerable: false,
285
- configurable: true
286
- });
287
- Object.defineProperty(Workunit.prototype, "CResourceURLs", {
288
- get: function () {
289
- var _this = this;
290
- return this.ResourceURLs.URL.map(function (url) {
291
- return new Resource(_this, url);
292
- });
293
- },
294
- enumerable: false,
295
- configurable: true
296
- });
297
- Object.defineProperty(Workunit.prototype, "TotalClusterTime", {
298
- get: function () { return this.get("TotalClusterTime", ""); },
299
- enumerable: false,
300
- configurable: true
301
- });
302
- Object.defineProperty(Workunit.prototype, "DateTimeScheduled", {
303
- get: function () { return this.get("DateTimeScheduled"); },
304
- enumerable: false,
305
- configurable: true
306
- });
307
- Object.defineProperty(Workunit.prototype, "IsPausing", {
308
- get: function () { return this.get("IsPausing"); },
309
- enumerable: false,
310
- configurable: true
311
- });
312
- Object.defineProperty(Workunit.prototype, "ThorLCR", {
313
- get: function () { return this.get("ThorLCR"); },
314
- enumerable: false,
315
- configurable: true
316
- });
317
- Object.defineProperty(Workunit.prototype, "ApplicationValues", {
318
- get: function () { return this.get("ApplicationValues", { ApplicationValue: [] }); },
319
- enumerable: false,
320
- configurable: true
321
- });
322
- Object.defineProperty(Workunit.prototype, "HasArchiveQuery", {
323
- get: function () { return this.get("HasArchiveQuery"); },
324
- enumerable: false,
325
- configurable: true
326
- });
327
- Object.defineProperty(Workunit.prototype, "StateEx", {
328
- get: function () { return this.get("StateEx"); },
329
- enumerable: false,
330
- configurable: true
331
- });
332
- Object.defineProperty(Workunit.prototype, "PriorityClass", {
333
- get: function () { return this.get("PriorityClass"); },
334
- enumerable: false,
335
- configurable: true
336
- });
337
- Object.defineProperty(Workunit.prototype, "PriorityLevel", {
338
- get: function () { return this.get("PriorityLevel"); },
339
- enumerable: false,
340
- configurable: true
341
- });
342
- Object.defineProperty(Workunit.prototype, "Snapshot", {
343
- get: function () { return this.get("Snapshot"); },
344
- enumerable: false,
345
- configurable: true
346
- });
347
- Object.defineProperty(Workunit.prototype, "ResultLimit", {
348
- get: function () { return this.get("ResultLimit"); },
349
- enumerable: false,
350
- configurable: true
351
- });
352
- Object.defineProperty(Workunit.prototype, "EventSchedule", {
353
- get: function () { return this.get("EventSchedule"); },
354
- enumerable: false,
355
- configurable: true
356
- });
357
- Object.defineProperty(Workunit.prototype, "Query", {
358
- get: function () { return this.get("Query"); },
359
- enumerable: false,
360
- configurable: true
361
- });
362
- Object.defineProperty(Workunit.prototype, "HelpersCount", {
363
- get: function () { return this.get("HelpersCount", 0); },
364
- enumerable: false,
365
- configurable: true
366
- });
367
- Object.defineProperty(Workunit.prototype, "Helpers", {
368
- get: function () { return this.get("Helpers", { ECLHelpFile: [] }); },
369
- enumerable: false,
370
- configurable: true
371
- });
372
- Object.defineProperty(Workunit.prototype, "DebugValues", {
373
- get: function () { return this.get("DebugValues"); },
374
- enumerable: false,
375
- configurable: true
376
- });
377
- Object.defineProperty(Workunit.prototype, "AllowedClusters", {
378
- get: function () { return this.get("AllowedClusters"); },
379
- enumerable: false,
380
- configurable: true
381
- });
382
- Object.defineProperty(Workunit.prototype, "ErrorCount", {
383
- get: function () { return this.get("ErrorCount", 0); },
384
- enumerable: false,
385
- configurable: true
386
- });
387
- Object.defineProperty(Workunit.prototype, "WarningCount", {
388
- get: function () { return this.get("WarningCount", 0); },
389
- enumerable: false,
390
- configurable: true
391
- });
392
- Object.defineProperty(Workunit.prototype, "InfoCount", {
393
- get: function () { return this.get("InfoCount", 0); },
394
- enumerable: false,
395
- configurable: true
396
- });
397
- Object.defineProperty(Workunit.prototype, "AlertCount", {
398
- get: function () { return this.get("AlertCount", 0); },
399
- enumerable: false,
400
- configurable: true
401
- });
402
- Object.defineProperty(Workunit.prototype, "SourceFileCount", {
403
- get: function () { return this.get("SourceFileCount", 0); },
404
- enumerable: false,
405
- configurable: true
406
- });
407
- Object.defineProperty(Workunit.prototype, "SourceFiles", {
408
- get: function () { return this.get("SourceFiles", { ECLSourceFile: [] }); },
409
- enumerable: false,
410
- configurable: true
411
- });
412
- Object.defineProperty(Workunit.prototype, "CSourceFiles", {
413
- get: function () {
414
- var _this = this;
415
- return this.SourceFiles.ECLSourceFile.map(function (eclSourceFile) { return new SourceFile(_this.connection, _this.Wuid, eclSourceFile); });
416
- },
417
- enumerable: false,
418
- configurable: true
419
- });
420
- Object.defineProperty(Workunit.prototype, "VariableCount", {
421
- get: function () { return this.get("VariableCount", 0); },
422
- enumerable: false,
423
- configurable: true
424
- });
425
- Object.defineProperty(Workunit.prototype, "Variables", {
426
- get: function () { return this.get("Variables", { ECLResult: [] }); },
427
- enumerable: false,
428
- configurable: true
429
- });
430
- Object.defineProperty(Workunit.prototype, "TimerCount", {
431
- get: function () { return this.get("TimerCount", 0); },
432
- enumerable: false,
433
- configurable: true
434
- });
435
- Object.defineProperty(Workunit.prototype, "HasDebugValue", {
436
- get: function () { return this.get("HasDebugValue"); },
437
- enumerable: false,
438
- configurable: true
439
- });
440
- Object.defineProperty(Workunit.prototype, "ApplicationValueCount", {
441
- get: function () { return this.get("ApplicationValueCount", 0); },
442
- enumerable: false,
443
- configurable: true
444
- });
445
- Object.defineProperty(Workunit.prototype, "XmlParams", {
446
- get: function () { return this.get("XmlParams"); },
447
- enumerable: false,
448
- configurable: true
449
- });
450
- Object.defineProperty(Workunit.prototype, "AccessFlag", {
451
- get: function () { return this.get("AccessFlag"); },
452
- enumerable: false,
453
- configurable: true
454
- });
455
- Object.defineProperty(Workunit.prototype, "ClusterFlag", {
456
- get: function () { return this.get("ClusterFlag"); },
457
- enumerable: false,
458
- configurable: true
459
- });
460
- Object.defineProperty(Workunit.prototype, "ResultViewCount", {
461
- get: function () { return this.get("ResultViewCount", 0); },
462
- enumerable: false,
463
- configurable: true
464
- });
465
- Object.defineProperty(Workunit.prototype, "DebugValueCount", {
466
- get: function () { return this.get("DebugValueCount", 0); },
467
- enumerable: false,
468
- configurable: true
469
- });
470
- Object.defineProperty(Workunit.prototype, "WorkflowCount", {
471
- get: function () { return this.get("WorkflowCount", 0); },
472
- enumerable: false,
473
- configurable: true
474
- });
475
- Object.defineProperty(Workunit.prototype, "Archived", {
476
- get: function () { return this.get("Archived"); },
477
- enumerable: false,
478
- configurable: true
479
- });
480
- Object.defineProperty(Workunit.prototype, "RoxieCluster", {
481
- get: function () { return this.get("RoxieCluster"); },
482
- enumerable: false,
483
- configurable: true
484
- });
485
- Object.defineProperty(Workunit.prototype, "DebugState", {
486
- get: function () { return this.get("DebugState", {}); },
487
- enumerable: false,
488
- configurable: true
489
- });
490
- Object.defineProperty(Workunit.prototype, "Queue", {
491
- get: function () { return this.get("Queue"); },
492
- enumerable: false,
493
- configurable: true
494
- });
495
- Object.defineProperty(Workunit.prototype, "Active", {
496
- get: function () { return this.get("Active"); },
497
- enumerable: false,
498
- configurable: true
499
- });
500
- Object.defineProperty(Workunit.prototype, "Action", {
501
- get: function () { return this.get("Action"); },
502
- enumerable: false,
503
- configurable: true
504
- });
505
- Object.defineProperty(Workunit.prototype, "Scope", {
506
- get: function () { return this.get("Scope"); },
507
- enumerable: false,
508
- configurable: true
509
- });
510
- Object.defineProperty(Workunit.prototype, "AbortBy", {
511
- get: function () { return this.get("AbortBy"); },
512
- enumerable: false,
513
- configurable: true
514
- });
515
- Object.defineProperty(Workunit.prototype, "AbortTime", {
516
- get: function () { return this.get("AbortTime"); },
517
- enumerable: false,
518
- configurable: true
519
- });
520
- Object.defineProperty(Workunit.prototype, "Workflows", {
521
- get: function () { return this.get("Workflows"); },
522
- enumerable: false,
523
- configurable: true
524
- });
525
- Object.defineProperty(Workunit.prototype, "TimingData", {
526
- get: function () { return this.get("TimingData"); },
527
- enumerable: false,
528
- configurable: true
529
- });
530
- Object.defineProperty(Workunit.prototype, "HelpersDesc", {
531
- get: function () { return this.get("HelpersDesc"); },
532
- enumerable: false,
533
- configurable: true
534
- });
535
- Object.defineProperty(Workunit.prototype, "GraphsDesc", {
536
- get: function () { return this.get("GraphsDesc"); },
537
- enumerable: false,
538
- configurable: true
539
- });
540
- Object.defineProperty(Workunit.prototype, "SourceFilesDesc", {
541
- get: function () { return this.get("SourceFilesDesc"); },
542
- enumerable: false,
543
- configurable: true
544
- });
545
- Object.defineProperty(Workunit.prototype, "ResultsDesc", {
546
- get: function () { return this.get("ResultsDesc"); },
547
- enumerable: false,
548
- configurable: true
549
- });
550
- Object.defineProperty(Workunit.prototype, "VariablesDesc", {
551
- get: function () { return this.get("VariablesDesc"); },
552
- enumerable: false,
553
- configurable: true
554
- });
555
- Object.defineProperty(Workunit.prototype, "TimersDesc", {
556
- get: function () { return this.get("TimersDesc"); },
557
- enumerable: false,
558
- configurable: true
559
- });
560
- Object.defineProperty(Workunit.prototype, "DebugValuesDesc", {
561
- get: function () { return this.get("DebugValuesDesc"); },
562
- enumerable: false,
563
- configurable: true
564
- });
565
- Object.defineProperty(Workunit.prototype, "ApplicationValuesDesc", {
566
- get: function () { return this.get("ApplicationValuesDesc"); },
567
- enumerable: false,
568
- configurable: true
569
- });
570
- Object.defineProperty(Workunit.prototype, "WorkflowsDesc", {
571
- get: function () { return this.get("WorkflowsDesc"); },
572
- enumerable: false,
573
- configurable: true
574
- });
575
- Object.defineProperty(Workunit.prototype, "ServiceNames", {
576
- get: function () { return this.get("ServiceNames"); },
577
- enumerable: false,
578
- configurable: true
579
- });
580
- Object.defineProperty(Workunit.prototype, "CompileCost", {
581
- get: function () { return this.get("CompileCost"); },
582
- enumerable: false,
583
- configurable: true
584
- });
585
- Object.defineProperty(Workunit.prototype, "ExecuteCost", {
586
- get: function () { return this.get("ExecuteCost"); },
587
- enumerable: false,
588
- configurable: true
589
- });
590
- Object.defineProperty(Workunit.prototype, "FileAccessCost", {
591
- get: function () { return this.get("FileAccessCost"); },
592
- enumerable: false,
593
- configurable: true
594
- });
595
- Object.defineProperty(Workunit.prototype, "NoAccess", {
596
- get: function () { return this.get("NoAccess"); },
597
- enumerable: false,
598
- configurable: true
599
- });
600
- Object.defineProperty(Workunit.prototype, "ECLWUProcessList", {
601
- get: function () { return this.get("ECLWUProcessList"); },
602
- enumerable: false,
603
- configurable: true
604
- });
605
- // Factories ---
606
- Workunit.create = function (optsConnection) {
607
- var retVal = new Workunit(optsConnection);
608
- return retVal.connection.WUCreate().then(function (response) {
609
- _workunits.set(retVal);
610
- retVal.set(response.Workunit);
611
- return retVal;
612
- });
613
- };
614
- Workunit.attach = function (optsConnection, wuid, state) {
615
- var retVal = _workunits.get({ BaseUrl: optsConnection.baseUrl, Wuid: wuid }, function () {
616
- return new Workunit(optsConnection, wuid);
617
- });
618
- if (state) {
619
- retVal.set(state);
620
- }
621
- return retVal;
622
- };
623
- Workunit.existsLocal = function (baseUrl, wuid) {
624
- return _workunits.has({ BaseUrl: baseUrl, Wuid: wuid });
625
- };
626
- Workunit.submit = function (server, target, ecl, compileOnly) {
627
- if (compileOnly === void 0) { compileOnly = false; }
628
- return Workunit.create(server).then(function (wu) {
629
- return wu.update({ QueryText: ecl });
630
- }).then(function (wu) {
631
- return compileOnly ? wu.submit(target, WUUpdate.Action.Compile) : wu.submit(target);
632
- });
633
- };
634
- Workunit.compile = function (server, target, ecl) {
635
- return Workunit.submit(server, target, ecl, true);
636
- };
637
- Workunit.query = function (server, opts) {
638
- var wsWorkunits = new WorkunitsService(server);
639
- return wsWorkunits.WUQuery(opts).then(function (response) {
640
- return response.Workunits.ECLWorkunit.map(function (wu) {
641
- return Workunit.attach(server, wu.Wuid, wu);
642
- });
643
- });
644
- };
645
- Workunit.prototype.clearState = function (wuid) {
646
- this.clear({
647
- Wuid: wuid,
648
- StateID: WUStateID.Unknown
649
- });
650
- };
651
- Workunit.prototype.update = function (request) {
652
- var _this = this;
653
- return this.connection.WUUpdate(__assign(__assign({}, request), {
654
- Wuid: this.Wuid,
655
- StateOrig: this.StateID,
656
- JobnameOrig: this.Jobname,
657
- DescriptionOrig: this.Description,
658
- ProtectedOrig: this.Protected,
659
- ClusterOrig: this.Cluster
660
- })).then(function (response) {
661
- _this.set(response.Workunit);
662
- return _this;
663
- });
664
- };
665
- Workunit.prototype.submit = function (_cluster, action, resultLimit) {
666
- var _this = this;
667
- if (action === void 0) { action = WUUpdate.Action.Run; }
668
- var clusterPromise;
669
- if (_cluster !== void 0) {
670
- clusterPromise = Promise.resolve(_cluster);
671
- }
672
- else {
673
- clusterPromise = this.topologyConnection.DefaultTpLogicalClusterQuery().then(function (response) {
674
- return response.Name;
675
- });
676
- }
677
- this._debugMode = false;
678
- if (action === WUUpdate.Action.Debug) {
679
- action = WUUpdate.Action.Run;
680
- this._debugMode = true;
681
- }
682
- return clusterPromise.then(function (cluster) {
683
- return _this.connection.WUUpdate({
684
- Wuid: _this.Wuid,
685
- Action: action,
686
- ResultLimit: resultLimit,
687
- DebugValues: {
688
- DebugValue: [
689
- {
690
- Name: "Debug",
691
- Value: _this._debugMode ? "1" : ""
692
- }
693
- ]
694
- }
695
- }).then(function (response) {
696
- _this.set(response.Workunit);
697
- _this._submitAction = action;
698
- return _this.connection.WUSubmit({ Wuid: _this.Wuid, Cluster: cluster });
699
- });
700
- }).then(function () {
701
- return _this;
702
- });
703
- };
704
- Workunit.prototype.isComplete = function () {
705
- switch (this.StateID) {
706
- case WUStateID.Compiled:
707
- return this.ActionEx === "compile" || this._submitAction === WUUpdate.Action.Compile;
708
- case WUStateID.Completed:
709
- case WUStateID.Failed:
710
- case WUStateID.Aborted:
711
- case WUStateID.NotFound:
712
- return true;
713
- default:
714
- }
715
- return false;
716
- };
717
- Workunit.prototype.isFailed = function () {
718
- switch (this.StateID) {
719
- case WUStateID.Aborted:
720
- case WUStateID.Failed:
721
- return true;
722
- default:
723
- }
724
- return false;
725
- };
726
- Workunit.prototype.isDeleted = function () {
727
- switch (this.StateID) {
728
- case WUStateID.NotFound:
729
- return true;
730
- default:
731
- }
732
- return false;
733
- };
734
- Workunit.prototype.isDebugging = function () {
735
- switch (this.StateID) {
736
- case WUStateID.DebugPaused:
737
- case WUStateID.DebugRunning:
738
- return true;
739
- default:
740
- }
741
- return this._debugMode;
742
- };
743
- Workunit.prototype.isRunning = function () {
744
- switch (this.StateID) {
745
- case WUStateID.Compiled:
746
- case WUStateID.Running:
747
- case WUStateID.Aborting:
748
- case WUStateID.Blocked:
749
- case WUStateID.DebugPaused:
750
- case WUStateID.DebugRunning:
751
- return true;
752
- default:
753
- }
754
- return false;
755
- };
756
- Workunit.prototype.setToFailed = function () {
757
- return this.WUAction(WsWorkunits.ECLWUActions.SetToFailed);
758
- };
759
- Workunit.prototype.pause = function () {
760
- return this.WUAction(WsWorkunits.ECLWUActions.Pause);
761
- };
762
- Workunit.prototype.pauseNow = function () {
763
- return this.WUAction(WsWorkunits.ECLWUActions.PauseNow);
764
- };
765
- Workunit.prototype.resume = function () {
766
- return this.WUAction(WsWorkunits.ECLWUActions.Resume);
767
- };
768
- Workunit.prototype.abort = function () {
769
- return this.WUAction(WsWorkunits.ECLWUActions.Abort);
770
- };
771
- Workunit.prototype.protect = function () {
772
- return this.WUAction(WsWorkunits.ECLWUActions.Protect);
773
- };
774
- Workunit.prototype.unprotect = function () {
775
- return this.WUAction(WsWorkunits.ECLWUActions.Unprotect);
776
- };
777
- Workunit.prototype.delete = function () {
778
- return this.WUAction(WsWorkunits.ECLWUActions.Delete);
779
- };
780
- Workunit.prototype.restore = function () {
781
- return this.WUAction(WsWorkunits.ECLWUActions.Restore);
782
- };
783
- Workunit.prototype.deschedule = function () {
784
- return this.WUAction(WsWorkunits.ECLWUActions.Deschedule);
785
- };
786
- Workunit.prototype.reschedule = function () {
787
- return this.WUAction(WsWorkunits.ECLWUActions.Reschedule);
788
- };
789
- Workunit.prototype.resubmit = function () {
790
- var _this = this;
791
- return this.WUResubmit({
792
- CloneWorkunit: false,
793
- ResetWorkflow: false
794
- }).then(function () {
795
- _this.clearState(_this.Wuid);
796
- return _this.refresh().then(function () {
797
- _this._monitor();
798
- return _this;
799
- });
800
- });
801
- };
802
- Workunit.prototype.clone = function () {
803
- var _this = this;
804
- return this.WUResubmit({
805
- CloneWorkunit: true,
806
- ResetWorkflow: false
807
- }).then(function (response) {
808
- return Workunit.attach(_this.connection.opts(), response.WUs.WU[0].WUID)
809
- .refresh();
810
- });
811
- };
812
- Workunit.prototype.refreshState = function () {
813
- return __awaiter(this, void 0, void 0, function () {
814
- return __generator(this, function (_a) {
815
- switch (_a.label) {
816
- case 0: return [4 /*yield*/, this.WUQuery()];
817
- case 1:
818
- _a.sent();
819
- if (!(this.StateID === WUStateID.Compiled && !this.ActionEx && !this._submitAction)) return [3 /*break*/, 3];
820
- return [4 /*yield*/, this.refreshInfo()];
821
- case 2:
822
- _a.sent();
823
- _a.label = 3;
824
- case 3: return [2 /*return*/, this];
825
- }
826
- });
827
- });
828
- };
829
- Workunit.prototype.refreshInfo = function (request) {
830
- return __awaiter(this, void 0, void 0, function () {
831
- return __generator(this, function (_a) {
832
- switch (_a.label) {
833
- case 0: return [4 /*yield*/, this.WUInfo(request)];
834
- case 1:
835
- _a.sent();
836
- return [2 /*return*/, this];
837
- }
838
- });
839
- });
840
- };
841
- Workunit.prototype.refreshDebug = function () {
842
- return __awaiter(this, void 0, void 0, function () {
843
- return __generator(this, function (_a) {
844
- switch (_a.label) {
845
- case 0: return [4 /*yield*/, this.debugStatus()];
846
- case 1:
847
- _a.sent();
848
- return [2 /*return*/, this];
849
- }
850
- });
851
- });
852
- };
853
- Workunit.prototype.refresh = function () {
854
- return __awaiter(this, arguments, void 0, function (full, request) {
855
- if (full === void 0) { full = false; }
856
- return __generator(this, function (_a) {
857
- switch (_a.label) {
858
- case 0:
859
- if (!full) return [3 /*break*/, 2];
860
- return [4 /*yield*/, Promise.all([this.refreshInfo(request), this.refreshDebug()])];
861
- case 1:
862
- _a.sent();
863
- return [3 /*break*/, 4];
864
- case 2: return [4 /*yield*/, this.refreshState()];
865
- case 3:
866
- _a.sent();
867
- _a.label = 4;
868
- case 4: return [2 /*return*/, this];
869
- }
870
- });
871
- });
872
- };
873
- Workunit.prototype.eclExceptions = function () {
874
- return this.Exceptions.ECLException;
875
- };
876
- Workunit.prototype.fetchArchive = function () {
877
- return this.connection.WUFileEx({
878
- Wuid: this.Wuid,
879
- Type: "ArchiveQuery"
880
- });
881
- };
882
- Workunit.prototype.fetchECLExceptions = function () {
883
- var _this = this;
884
- return this.WUInfo({ IncludeExceptions: true }).then(function () {
885
- return _this.eclExceptions();
886
- });
887
- };
888
- Workunit.prototype.fetchResults = function () {
889
- var _this = this;
890
- return this.WUInfo({ IncludeResults: true }).then(function () {
891
- return _this.CResults;
892
- });
893
- };
894
- Workunit.prototype.fetchGraphs = function () {
895
- var _this = this;
896
- return this.WUInfo({ IncludeGraphs: true }).then(function () {
897
- return _this.CGraphs;
898
- });
899
- };
900
- Workunit.prototype.fetchQuery = function () {
901
- var _this = this;
902
- return this.WUInfo({ IncludeECL: true, TruncateEclTo64k: false }).then(function () {
903
- return _this.Query;
904
- });
905
- };
906
- Workunit.prototype.fetchHelpers = function () {
907
- var _this = this;
908
- return this.WUInfo({ IncludeHelpers: true }).then(function () {
909
- var _a;
910
- return ((_a = _this.Helpers) === null || _a === void 0 ? void 0 : _a.ECLHelpFile) || [];
911
- });
912
- };
913
- Workunit.prototype.fetchAllowedClusters = function () {
914
- var _this = this;
915
- return this.WUInfo({ IncludeAllowedClusters: true }).then(function () {
916
- var _a;
917
- return ((_a = _this.AllowedClusters) === null || _a === void 0 ? void 0 : _a.AllowedCluster) || [];
918
- });
919
- };
920
- Workunit.prototype.fetchTotalClusterTime = function () {
921
- var _this = this;
922
- return this.WUInfo({ IncludeTotalClusterTime: true }).then(function () {
923
- return _this.TotalClusterTime;
924
- });
925
- };
926
- Workunit.prototype.fetchServiceNames = function () {
927
- var _this = this;
928
- return this.WUInfo({ IncludeServiceNames: true }).then(function () {
929
- var _a;
930
- return (_a = _this.ServiceNames) === null || _a === void 0 ? void 0 : _a.Item;
931
- });
932
- };
933
- Workunit.prototype.fetchDetailsMeta = function (request) {
934
- if (request === void 0) { request = {}; }
935
- return this.WUDetailsMeta(request);
936
- };
937
- Workunit.prototype.fetchDetailsRaw = function (request) {
938
- if (request === void 0) { request = {}; }
939
- return this.WUDetails(request).then(function (response) { return response.Scopes.Scope; });
940
- };
941
- Workunit.prototype.normalizeDetails = function (meta, scopes) {
942
- var _a;
943
- var columns = {
944
- id: {
945
- Measure: "label"
946
- },
947
- name: {
948
- Measure: "label"
949
- },
950
- type: {
951
- Measure: "label"
952
- }
953
- };
954
- var data = [];
955
- var _loop_1 = function (scope) {
956
- var props = {};
957
- var formattedProps = {};
958
- if (scope && scope.Id && scope.Properties && scope.Properties.Property) {
959
- for (var key in scope.Properties.Property) {
960
- var scopeProperty = scope.Properties.Property[key];
961
- if (scopeProperty.Measure === "ns") {
962
- scopeProperty.Measure = "s";
963
- }
964
- columns[scopeProperty.Name] = __assign({}, scopeProperty);
965
- safeDelete(columns, scopeProperty.Name, "RawValue");
966
- safeDelete(columns, scopeProperty.Name, "Formatted");
967
- switch (scopeProperty.Measure) {
968
- case "bool":
969
- props[scopeProperty.Name] = !!+scopeProperty.RawValue;
970
- break;
971
- case "sz":
972
- props[scopeProperty.Name] = +scopeProperty.RawValue;
973
- break;
974
- case "s":
975
- props[scopeProperty.Name] = +scopeProperty.RawValue / 1000000000;
976
- break;
977
- case "ns":
978
- props[scopeProperty.Name] = +scopeProperty.RawValue;
979
- break;
980
- case "ts":
981
- props[scopeProperty.Name] = new Date(+scopeProperty.RawValue / 1000).toISOString();
982
- break;
983
- case "cnt":
984
- props[scopeProperty.Name] = +scopeProperty.RawValue;
985
- break;
986
- case "cost":
987
- props[scopeProperty.Name] = +scopeProperty.RawValue / 1000000;
988
- break;
989
- case "cpu":
990
- case "skw":
991
- case "node":
992
- case "ppm":
993
- case "ip":
994
- case "cy":
995
- case "en":
996
- case "txt":
997
- case "id":
998
- case "fname":
999
- default:
1000
- props[scopeProperty.Name] = scopeProperty.RawValue;
1001
- }
1002
- formattedProps[scopeProperty.Name] = formatNum((_a = scopeProperty.Formatted) !== null && _a !== void 0 ? _a : props[scopeProperty.Name]);
1003
- }
1004
- // Other properties ---
1005
- }
1006
- var normalizedScope = __assign({ id: scope.Id, name: scope.ScopeName, type: scope.ScopeType, Kind: scope["Kind"], Label: scope["Label"], __formattedProps: formattedProps, __groupedProps: {}, __groupedRawProps: {}, __StdDevs: 0, __StdDevsSource: "" }, props);
1007
- if (normalizedScope[DEFINITION_LIST]) {
1008
- try {
1009
- var definitionList = JSON.parse(normalizedScope[DEFINITION_LIST].split("\\").join("\\\\"));
1010
- normalizedScope[DEFINITION_LIST] = [];
1011
- definitionList.forEach(function (definition, idx) {
1012
- var _a;
1013
- var matches = definition.match(definitionRegex);
1014
- if (matches) {
1015
- var filePath = ((_a = matches[1]) !== null && _a !== void 0 ? _a : "") + matches[2] + matches[3];
1016
- var line = parseInt(matches[5]);
1017
- var col = parseInt(matches[6]);
1018
- normalizedScope[DEFINITION_LIST].push({ filePath: filePath, line: line, col: col });
1019
- }
1020
- });
1021
- }
1022
- catch (e) {
1023
- logger.error("Unexpected \"DefinitionList\": ".concat(normalizedScope[DEFINITION_LIST]));
1024
- }
1025
- }
1026
- var dedup = {};
1027
- for (var key in normalizedScope) {
1028
- if (key.indexOf("__") !== 0) {
1029
- var row = formatValues(normalizedScope, key, dedup);
1030
- if (row) {
1031
- normalizedScope.__groupedProps[row.Key] = row;
1032
- if (!isNaN(row.StdDevs) && normalizedScope.__StdDevs < row.StdDevs) {
1033
- normalizedScope.__StdDevs = row.StdDevs;
1034
- normalizedScope.__StdDevsSource = row.Key;
1035
- }
1036
- }
1037
- }
1038
- }
1039
- data.push(normalizedScope);
1040
- };
1041
- for (var _i = 0, scopes_1 = scopes; _i < scopes_1.length; _i++) {
1042
- var scope = scopes_1[_i];
1043
- _loop_1(scope);
1044
- }
1045
- return {
1046
- meta: meta,
1047
- columns: columns,
1048
- data: data
1049
- };
1050
- };
1051
- Workunit.prototype.fetchDetailsNormalized = function (request) {
1052
- var _this = this;
1053
- if (request === void 0) { request = {}; }
1054
- return Promise.all([this.fetchDetailsMeta(), this.fetchDetailsRaw(request)]).then(function (promises) {
1055
- return _this.normalizeDetails(promises[0], promises[1]);
1056
- });
1057
- };
1058
- Workunit.prototype.fetchInfo = function (request) {
1059
- if (request === void 0) { request = {}; }
1060
- return this.WUInfo(request);
1061
- };
1062
- Workunit.prototype.fetchDetails = function (request) {
1063
- var _this = this;
1064
- if (request === void 0) { request = {}; }
1065
- return this.WUDetails(request).then(function (response) {
1066
- return response.Scopes.Scope.map(function (rawScope) {
1067
- return new Scope(_this, rawScope);
1068
- });
1069
- });
1070
- };
1071
- Workunit.prototype.fetchDetailsHierarchy = function (request) {
1072
- var _this = this;
1073
- if (request === void 0) { request = {}; }
1074
- return this.WUDetails(request).then(function (response) {
1075
- var retVal = [];
1076
- // Recreate Scope Hierarchy and dedup ---
1077
- var scopeMap = {};
1078
- response.Scopes.Scope.forEach(function (rawScope) {
1079
- if (scopeMap[rawScope.ScopeName]) {
1080
- scopeMap[rawScope.ScopeName].update(rawScope);
1081
- return null;
1082
- }
1083
- else {
1084
- var scope = new Scope(_this, rawScope);
1085
- scopeMap[scope.ScopeName] = scope;
1086
- return scope;
1087
- }
1088
- });
1089
- for (var key in scopeMap) {
1090
- if (scopeMap.hasOwnProperty(key)) {
1091
- var scope = scopeMap[key];
1092
- var parentScopeID = scope.parentScope();
1093
- if (parentScopeID && scopeMap[parentScopeID]) {
1094
- scopeMap[parentScopeID].children().push(scope);
1095
- }
1096
- else {
1097
- retVal.push(scope);
1098
- }
1099
- }
1100
- }
1101
- return retVal;
1102
- });
1103
- };
1104
- Workunit.prototype.fetchGraphDetails = function (graphIDs, rootTypes) {
1105
- if (graphIDs === void 0) { graphIDs = []; }
1106
- return this.fetchDetails({
1107
- ScopeFilter: {
1108
- MaxDepth: 999999,
1109
- Ids: graphIDs,
1110
- ScopeTypes: rootTypes,
1111
- },
1112
- NestedFilter: {
1113
- Depth: 999999,
1114
- ScopeTypes: ["graph", "subgraph", "activity", "edge", "function"]
1115
- },
1116
- PropertiesToReturn: {
1117
- AllStatistics: true,
1118
- AllAttributes: true,
1119
- AllHints: true,
1120
- AllProperties: true,
1121
- AllScopes: true
1122
- },
1123
- ScopeOptions: {
1124
- IncludeId: true,
1125
- IncludeScope: true,
1126
- IncludeScopeType: true
1127
- },
1128
- PropertyOptions: {
1129
- IncludeName: true,
1130
- IncludeRawValue: true,
1131
- IncludeFormatted: true,
1132
- IncludeMeasure: true,
1133
- IncludeCreator: false,
1134
- IncludeCreatorType: false
1135
- }
1136
- });
1137
- };
1138
- Workunit.prototype.fetchScopeGraphs = function (graphIDs) {
1139
- if (graphIDs === void 0) { graphIDs = []; }
1140
- return this.fetchGraphDetails(graphIDs, ["graph"]).then(function (scopes) {
1141
- return createGraph(scopes);
1142
- });
1143
- };
1144
- Workunit.prototype.fetchTimeElapsed = function () {
1145
- return this.fetchDetails({
1146
- ScopeFilter: {
1147
- PropertyFilters: {
1148
- PropertyFilter: [{ Name: "TimeElapsed" }]
1149
- }
1150
- }
1151
- }).then(function (scopes) {
1152
- var scopeInfo = {};
1153
- scopes.forEach(function (scope) {
1154
- scopeInfo[scope.ScopeName] = scopeInfo[scope.ScopeName] || {
1155
- scope: scope.ScopeName,
1156
- start: null,
1157
- elapsed: null,
1158
- finish: null
1159
- };
1160
- scope.CAttributes.forEach(function (attr) {
1161
- if (attr.Name === "TimeElapsed") {
1162
- scopeInfo[scope.ScopeName].elapsed = +attr.RawValue;
1163
- }
1164
- else if (attr.Measure === "ts" && attr.Name.indexOf("Started") >= 0) {
1165
- scopeInfo[scope.ScopeName].start = attr.Formatted;
1166
- }
1167
- });
1168
- });
1169
- // Workaround duplicate scope responses
1170
- var retVal = [];
1171
- for (var key in scopeInfo) {
1172
- var scope = scopeInfo[key];
1173
- if (scope.start && scope.elapsed) {
1174
- var endTime = parser(scope.start);
1175
- endTime.setMilliseconds(endTime.getMilliseconds() + scope.elapsed / 1000000);
1176
- scope.finish = formatter(endTime);
1177
- retVal.push(scope);
1178
- }
1179
- }
1180
- retVal.sort(function (l, r) {
1181
- if (l.start < r.start)
1182
- return -1;
1183
- if (l.start > r.start)
1184
- return 1;
1185
- return 0;
1186
- });
1187
- return retVal;
1188
- });
1189
- };
1190
- // Monitoring ---
1191
- Workunit.prototype._monitor = function () {
1192
- if (this.isComplete()) {
1193
- this._monitorTickCount = 0;
1194
- return;
1195
- }
1196
- _super.prototype._monitor.call(this);
1197
- };
1198
- Workunit.prototype._monitorTimeoutDuration = function () {
1199
- var retVal = _super.prototype._monitorTimeoutDuration.call(this);
1200
- if (this._monitorTickCount <= 1) { // Once
1201
- return 1000;
1202
- }
1203
- else if (this._monitorTickCount <= 3) { // Twice
1204
- return 3000;
1205
- }
1206
- else if (this._monitorTickCount <= 5) { // Twice
1207
- return 5000;
1208
- }
1209
- else if (this._monitorTickCount <= 7) { // Twice
1210
- return 10000;
1211
- }
1212
- return retVal;
1213
- };
1214
- // Events ---
1215
- Workunit.prototype.on = function (eventID, propIDorCallback, callback) {
1216
- var _this = this;
1217
- if (this.isCallback(propIDorCallback)) {
1218
- switch (eventID) {
1219
- case "completed":
1220
- _super.prototype.on.call(this, "propChanged", "StateID", function (changeInfo) {
1221
- if (_this.isComplete()) {
1222
- propIDorCallback([changeInfo]);
1223
- }
1224
- });
1225
- break;
1226
- case "changed":
1227
- _super.prototype.on.call(this, eventID, propIDorCallback);
1228
- break;
1229
- default:
1230
- }
1231
- }
1232
- else {
1233
- switch (eventID) {
1234
- case "changed":
1235
- _super.prototype.on.call(this, eventID, propIDorCallback, callback);
1236
- break;
1237
- default:
1238
- }
1239
- }
1240
- this._monitor();
1241
- return this;
1242
- };
1243
- Workunit.prototype.watchUntilComplete = function (callback) {
1244
- var _this = this;
1245
- return new Promise(function (resolve, _) {
1246
- var watchHandle = _this.watch(function (changes) {
1247
- if (callback) {
1248
- callback(changes);
1249
- }
1250
- if (_this.isComplete()) {
1251
- watchHandle.release();
1252
- resolve(_this);
1253
- }
1254
- });
1255
- });
1256
- };
1257
- Workunit.prototype.watchUntilRunning = function (callback) {
1258
- var _this = this;
1259
- return new Promise(function (resolve, _) {
1260
- var watchHandle = _this.watch(function (changes) {
1261
- if (callback) {
1262
- callback(changes);
1263
- }
1264
- if (_this.isComplete() || _this.isRunning()) {
1265
- watchHandle.release();
1266
- resolve(_this);
1267
- }
1268
- });
1269
- });
1270
- };
1271
- // WsWorkunits passthroughs ---
1272
- Workunit.prototype.WUQuery = function (_request) {
1273
- var _this = this;
1274
- if (_request === void 0) { _request = {}; }
1275
- return this.connection.WUQuery(__assign(__assign({}, _request), { Wuid: this.Wuid })).then(function (response) {
1276
- _this.set(response.Workunits.ECLWorkunit[0]);
1277
- return response;
1278
- }).catch(function (e) {
1279
- // deleted ---
1280
- var wuMissing = e.Exception.some(function (exception) {
1281
- if (exception.Code === 20081) {
1282
- _this.clearState(_this.Wuid);
1283
- _this.set("StateID", WUStateID.NotFound);
1284
- return true;
1285
- }
1286
- return false;
1287
- });
1288
- if (!wuMissing) {
1289
- logger.warning("Unexpected exception: ");
1290
- throw e;
1291
- }
1292
- return {};
1293
- });
1294
- };
1295
- Workunit.prototype.WUCreate = function () {
1296
- var _this = this;
1297
- return this.connection.WUCreate().then(function (response) {
1298
- _this.set(response.Workunit);
1299
- _workunits.set(_this);
1300
- return response;
1301
- });
1302
- };
1303
- Workunit.prototype.WUInfo = function (_request) {
1304
- var _this = this;
1305
- if (_request === void 0) { _request = {}; }
1306
- var includeResults = _request.IncludeResults || _request.IncludeResultsViewNames;
1307
- return this.connection.WUInfo(__assign(__assign({}, _request), { Wuid: this.Wuid, IncludeResults: includeResults, IncludeResultsViewNames: includeResults, SuppressResultSchemas: false })).then(function (response) {
1308
- _this.set(response.Workunit);
1309
- if (includeResults) {
1310
- _this.set({
1311
- ResultViews: response.ResultViews
1312
- });
1313
- }
1314
- return response;
1315
- }).catch(function (e) {
1316
- // deleted ---
1317
- var wuMissing = e.Exception.some(function (exception) {
1318
- if (exception.Code === 20080) {
1319
- _this.clearState(_this.Wuid);
1320
- _this.set("StateID", WUStateID.NotFound);
1321
- return true;
1322
- }
1323
- return false;
1324
- });
1325
- if (!wuMissing) {
1326
- logger.warning("Unexpected exception: ");
1327
- throw e;
1328
- }
1329
- return {};
1330
- });
1331
- };
1332
- Workunit.prototype.WUResubmit = function (request) {
1333
- return this.connection.WUResubmit(deepMixinT({}, request, {
1334
- Wuids: { Item: [this.Wuid] }
1335
- }));
1336
- };
1337
- Workunit.prototype.WUDetailsMeta = function (request) {
1338
- return this.connection.WUDetailsMeta(request);
1339
- };
1340
- Workunit.prototype.WUDetails = function (request) {
1341
- return this.connection.WUDetails(deepMixinT({
1342
- ScopeFilter: {
1343
- MaxDepth: 9999
1344
- },
1345
- ScopeOptions: {
1346
- IncludeMatchedScopesInResults: true,
1347
- IncludeScope: true,
1348
- IncludeId: false,
1349
- IncludeScopeType: false
1350
- },
1351
- PropertyOptions: {
1352
- IncludeName: true,
1353
- IncludeRawValue: false,
1354
- IncludeFormatted: true,
1355
- IncludeMeasure: true,
1356
- IncludeCreator: false,
1357
- IncludeCreatorType: false
1358
- }
1359
- }, request, { WUID: this.Wuid })).then(function (response) {
1360
- return deepMixinT({
1361
- Scopes: {
1362
- Scope: []
1363
- }
1364
- }, response);
1365
- });
1366
- };
1367
- Workunit.prototype.WUAction = function (actionType) {
1368
- var _this = this;
1369
- return this.connection.WUAction({
1370
- Wuids: { Item: [this.Wuid] },
1371
- WUActionType: actionType
1372
- }).then(function (response) {
1373
- return _this.refresh().then(function () {
1374
- _this._monitor();
1375
- return response;
1376
- });
1377
- });
1378
- };
1379
- Workunit.prototype.publish = function (name) {
1380
- return this.connection.WUPublishWorkunit({
1381
- Wuid: this.Wuid,
1382
- Cluster: this.Cluster,
1383
- JobName: name || this.Jobname,
1384
- AllowForeignFiles: true,
1385
- Activate: WsWorkunits.WUQueryActivationMode.ActivateQuery,
1386
- Wait: 5000
1387
- });
1388
- };
1389
- Workunit.prototype.publishEx = function (request) {
1390
- var service = new WorkunitsServiceEx({ baseUrl: "" });
1391
- var publishRequest = __assign({ Wuid: this.Wuid, Cluster: this.Cluster, JobName: this.Jobname, AllowForeignFiles: true, Activate: 1, Wait: 5000 }, request);
1392
- return service.WUPublishWorkunitEx(publishRequest);
1393
- };
1394
- Workunit.prototype.WUCDebug = function (command, opts) {
1395
- if (opts === void 0) { opts = {}; }
1396
- var optsStr = "";
1397
- for (var key in opts) {
1398
- if (opts.hasOwnProperty(key)) {
1399
- optsStr += " ".concat(key, "='").concat(opts[key], "'");
1400
- }
1401
- }
1402
- return this.connection.WUCDebugEx({
1403
- Wuid: this.Wuid,
1404
- Command: "<debug:".concat(command, " uid='").concat(this.Wuid, "'").concat(optsStr, "/>")
1405
- }).then(function (response) {
1406
- return response;
1407
- });
1408
- };
1409
- Workunit.prototype.debug = function (command, opts) {
1410
- if (!this.isDebugging()) {
1411
- return Promise.resolve(new XMLNode(command));
1412
- }
1413
- return this.WUCDebug(command, opts).then(function (response) {
1414
- var retVal = response.children(command);
1415
- if (retVal.length) {
1416
- return retVal[0];
1417
- }
1418
- return new XMLNode(command);
1419
- }).catch(function (_) {
1420
- logger.error(_);
1421
- return Promise.resolve(new XMLNode(command));
1422
- });
1423
- };
1424
- Workunit.prototype.debugStatus = function () {
1425
- var _this = this;
1426
- if (!this.isDebugging()) {
1427
- return Promise.resolve({
1428
- DebugState: { state: "unknown" }
1429
- });
1430
- }
1431
- return this.debug("status").then(function (response) {
1432
- var debugState = __assign(__assign({}, _this.DebugState), response.$);
1433
- _this.set({
1434
- DebugState: debugState
1435
- });
1436
- return response;
1437
- });
1438
- };
1439
- Workunit.prototype.debugContinue = function (mode) {
1440
- if (mode === void 0) { mode = ""; }
1441
- return this.debug("continue", {
1442
- mode: mode
1443
- });
1444
- };
1445
- Workunit.prototype.debugStep = function (mode) {
1446
- return this.debug("step", {
1447
- mode: mode
1448
- });
1449
- };
1450
- Workunit.prototype.debugPause = function () {
1451
- return this.debug("interrupt");
1452
- };
1453
- Workunit.prototype.debugQuit = function () {
1454
- return this.debug("quit");
1455
- };
1456
- Workunit.prototype.debugDeleteAllBreakpoints = function () {
1457
- return this.debug("delete", {
1458
- idx: 0
1459
- });
1460
- };
1461
- Workunit.prototype.debugBreakpointResponseParser = function (rootNode) {
1462
- return rootNode.children().map(function (childNode) {
1463
- if (childNode.name === "break") {
1464
- return childNode.$;
1465
- }
1466
- });
1467
- };
1468
- Workunit.prototype.debugBreakpointAdd = function (id, mode, action) {
1469
- var _this = this;
1470
- return this.debug("breakpoint", {
1471
- id: id,
1472
- mode: mode,
1473
- action: action
1474
- }).then(function (rootNode) {
1475
- return _this.debugBreakpointResponseParser(rootNode);
1476
- });
1477
- };
1478
- Workunit.prototype.debugBreakpointList = function () {
1479
- var _this = this;
1480
- return this.debug("list").then(function (rootNode) {
1481
- return _this.debugBreakpointResponseParser(rootNode);
1482
- });
1483
- };
1484
- Workunit.prototype.debugGraph = function () {
1485
- var _this = this;
1486
- if (this._debugAllGraph && this.DebugState["_prevGraphSequenceNum"] === this.DebugState["graphSequenceNum"]) {
1487
- return Promise.resolve(this._debugAllGraph);
1488
- }
1489
- return this.debug("graph", { name: "all" }).then(function (response) {
1490
- _this.DebugState["_prevGraphSequenceNum"] = _this.DebugState["graphSequenceNum"];
1491
- _this._debugAllGraph = createXGMMLGraph(_this.Wuid, response);
1492
- return _this._debugAllGraph;
1493
- });
1494
- };
1495
- Workunit.prototype.debugBreakpointValid = function (path) {
1496
- return this.debugGraph().then(function (graph) {
1497
- return breakpointLocations(graph, path);
1498
- });
1499
- };
1500
- Workunit.prototype.debugPrint = function (edgeID, startRow, numRows) {
1501
- if (startRow === void 0) { startRow = 0; }
1502
- if (numRows === void 0) { numRows = 10; }
1503
- return this.debug("print", {
1504
- edgeID: edgeID,
1505
- startRow: startRow,
1506
- numRows: numRows
1507
- }).then(function (response) {
1508
- return response.children().map(function (rowNode) {
1509
- var retVal = {};
1510
- rowNode.children().forEach(function (cellNode) {
1511
- retVal[cellNode.name] = cellNode.content;
1512
- });
1513
- return retVal;
1514
- });
1515
- });
1516
- };
1517
- return Workunit;
1518
- }(StateObject));
1519
- export { Workunit };
1520
- var ATTR_DEFINITION = "definition";
1521
- function hasECLDefinition(vertex) {
1522
- return vertex._[ATTR_DEFINITION] !== undefined;
1523
- }
1524
- function getECLDefinition(vertex) {
1525
- var match = /([a-z]:\\(?:[-\w\.\d]+\\)*(?:[-\w\.\d]+)?|(?:\/[\w\.\-]+)+)\((\d*),(\d*)\)/.exec(vertex._[ATTR_DEFINITION]);
1526
- if (match) {
1527
- var _file = match[1], _row = match[2], _col = match[3];
1528
- _file.replace(/\/\.\//g, "/");
1529
- return {
1530
- id: vertex._["id"],
1531
- file: _file,
1532
- line: +_row,
1533
- column: +_col
1534
- };
1535
- }
1536
- throw new Error("Bad definition: ".concat(vertex._[ATTR_DEFINITION]));
1537
- }
1538
- function breakpointLocations(graph, path) {
1539
- var retVal = [];
1540
- for (var _i = 0, _a = graph.vertices; _i < _a.length; _i++) {
1541
- var vertex = _a[_i];
1542
- if (hasECLDefinition(vertex)) {
1543
- var definition = getECLDefinition(vertex);
1544
- if (definition && !path || path === definition.file) {
1545
- retVal.push(definition);
1546
- }
1547
- }
1548
- }
1549
- return retVal.sort(function (l, r) {
1550
- return l.line - r.line;
1551
- });
1552
- }
1553
- //# sourceMappingURL=workunit.js.map