jspurefix 1.4.1 → 2.0.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 (1079) hide show
  1. package/appveyor.yml +3 -0
  2. package/data/session/certs/ca/ca.crt +33 -0
  3. package/data/session/certs/ca/ca.key +54 -0
  4. package/data/session/certs/client/client.crt +31 -0
  5. package/data/session/certs/client/client.key +51 -0
  6. package/data/session/certs/server/server.crt +31 -0
  7. package/data/session/certs/server/server.key +51 -0
  8. package/dist/a-session-msg-factory.d.ts +0 -0
  9. package/dist/a-session-msg-factory.js +1 -0
  10. package/dist/a-session-msg-factory.js.map +1 -0
  11. package/dist/ascii-encoder.test.d.ts +0 -0
  12. package/dist/ascii-encoder.test.js +1 -0
  13. package/dist/ascii-encoder.test.js.map +1 -0
  14. package/dist/ascii-parser.test.d.ts +0 -0
  15. package/dist/ascii-parser.test.js +1 -0
  16. package/dist/ascii-parser.test.js.map +1 -0
  17. package/dist/ascii-segment.test.d.ts +0 -0
  18. package/dist/ascii-segment.test.js +1 -0
  19. package/dist/ascii-segment.test.js.map +1 -0
  20. package/dist/ascii-store-replay.test.d.ts +0 -0
  21. package/dist/ascii-store-replay.test.js +1 -0
  22. package/dist/ascii-store-replay.test.js.map +1 -0
  23. package/dist/ascii-tag-pos.test.d.ts +0 -0
  24. package/dist/ascii-tag-pos.test.js +1 -0
  25. package/dist/ascii-tag-pos.test.js.map +1 -0
  26. package/dist/buffer/{ascii-chars.d.ts → ascii/ascii-chars.d.ts} +0 -0
  27. package/dist/buffer/{ascii-chars.js → ascii/ascii-chars.js} +0 -0
  28. package/dist/buffer/ascii/ascii-chars.js.map +1 -0
  29. package/dist/buffer/ascii/ascii-encoder.d.ts +4 -2
  30. package/dist/buffer/ascii/ascii-encoder.js +54 -32
  31. package/dist/buffer/ascii/ascii-encoder.js.map +1 -1
  32. package/dist/buffer/ascii/ascii-parser-state.d.ts +3 -10
  33. package/dist/buffer/ascii/ascii-parser-state.js +37 -25
  34. package/dist/buffer/ascii/ascii-parser-state.js.map +1 -1
  35. package/dist/buffer/ascii/ascii-parser.d.ts +7 -7
  36. package/dist/buffer/ascii/ascii-parser.js +50 -24
  37. package/dist/buffer/ascii/ascii-parser.js.map +1 -1
  38. package/dist/buffer/ascii/ascii-segment-parser.d.ts +2 -2
  39. package/dist/buffer/ascii/ascii-segment-parser.js +34 -13
  40. package/dist/buffer/ascii/ascii-segment-parser.js.map +1 -1
  41. package/dist/buffer/ascii/ascii-view.d.ts +2 -4
  42. package/dist/buffer/ascii/ascii-view.js +11 -15
  43. package/dist/buffer/ascii/ascii-view.js.map +1 -1
  44. package/dist/buffer/ascii/index.d.ts +1 -0
  45. package/dist/buffer/ascii/index.js +1 -0
  46. package/dist/buffer/ascii/index.js.map +1 -1
  47. package/dist/buffer/ascii/parse-state.d.ts +8 -0
  48. package/dist/buffer/ascii/parse-state.js +13 -0
  49. package/dist/buffer/ascii/parse-state.js.map +1 -0
  50. package/dist/buffer/ascii/time-formatter.js +1 -1
  51. package/dist/buffer/ascii/time-formatter.js.map +1 -1
  52. package/dist/buffer/elastic-buffer.js +29 -8
  53. package/dist/buffer/elastic-buffer.js.map +1 -1
  54. package/dist/buffer/encode-proxy.d.ts +1 -1
  55. package/dist/buffer/encode-proxy.js +16 -17
  56. package/dist/buffer/encode-proxy.js.map +1 -1
  57. package/dist/buffer/fixml/fixml-encoder.d.ts +2 -1
  58. package/dist/buffer/fixml/fixml-encoder.js +43 -20
  59. package/dist/buffer/fixml/fixml-encoder.js.map +1 -1
  60. package/dist/buffer/fixml/fixml-parser.js +47 -24
  61. package/dist/buffer/fixml/fixml-parser.js.map +1 -1
  62. package/dist/buffer/fixml/fixml-view.d.ts +2 -4
  63. package/dist/buffer/fixml/fixml-view.js +13 -16
  64. package/dist/buffer/fixml/fixml-view.js.map +1 -1
  65. package/dist/buffer/fixml/populated-attributes.d.ts +5 -0
  66. package/dist/buffer/fixml/populated-attributes.js +3 -0
  67. package/dist/buffer/fixml/populated-attributes.js.map +1 -0
  68. package/dist/buffer/index.d.ts +4 -8
  69. package/dist/buffer/index.js +4 -8
  70. package/dist/buffer/index.js.map +1 -1
  71. package/dist/buffer/msg-encoder.d.ts +2 -1
  72. package/dist/buffer/msg-encoder.js.map +1 -1
  73. package/dist/buffer/msg-view.d.ts +3 -5
  74. package/dist/buffer/msg-view.js +8 -5
  75. package/dist/buffer/msg-view.js.map +1 -1
  76. package/dist/buffer/segment/segment-description.d.ts +26 -0
  77. package/dist/buffer/segment/segment-description.js +72 -0
  78. package/dist/buffer/segment/segment-description.js.map +1 -0
  79. package/dist/buffer/segment/segment-summary.d.ts +13 -0
  80. package/dist/buffer/segment/segment-summary.js +20 -0
  81. package/dist/buffer/segment/segment-summary.js.map +1 -0
  82. package/dist/buffer/segment/segment-type.d.ts +8 -0
  83. package/dist/buffer/segment/segment-type.js +13 -0
  84. package/dist/buffer/segment/segment-type.js.map +1 -0
  85. package/dist/buffer/segment-description.d.ts +2 -9
  86. package/dist/buffer/segment-description.js +5 -13
  87. package/dist/buffer/segment-description.js.map +1 -1
  88. package/dist/buffer/segment-type.d.ts +8 -0
  89. package/dist/buffer/segment-type.js +13 -0
  90. package/dist/buffer/segment-type.js.map +1 -0
  91. package/dist/buffer/structure.d.ts +3 -3
  92. package/dist/buffer/structure.js +1 -1
  93. package/dist/buffer/structure.js.map +1 -1
  94. package/dist/buffer/tag/tag-pos.d.ts +12 -0
  95. package/dist/buffer/tag/tag-pos.js +55 -0
  96. package/dist/buffer/tag/tag-pos.js.map +1 -0
  97. package/dist/buffer/tag/tag-type.d.ts +13 -0
  98. package/dist/buffer/tag/tag-type.js +18 -0
  99. package/dist/buffer/tag/tag-type.js.map +1 -0
  100. package/dist/buffer/tag/tags.d.ts +21 -0
  101. package/dist/buffer/tag/tags.js +122 -0
  102. package/dist/buffer/tag/tags.js.map +1 -0
  103. package/dist/buffer/tag-type.d.ts +13 -0
  104. package/dist/buffer/tag-type.js +18 -0
  105. package/dist/buffer/tag-type.js.map +1 -0
  106. package/dist/buffer/tags.d.ts +3 -14
  107. package/dist/buffer/tags.js +23 -36
  108. package/dist/buffer/tags.js.map +1 -1
  109. package/dist/config/get-js-fx-logger.d.ts +4 -0
  110. package/dist/{transport/make-fixl-session.js → config/get-js-fx-logger.js} +1 -1
  111. package/dist/config/get-js-fx-logger.js.map +1 -0
  112. package/dist/config/index.d.ts +1 -0
  113. package/dist/config/index.js +1 -0
  114. package/dist/config/index.js.map +1 -1
  115. package/dist/config/js-fix-config.d.ts +4 -1
  116. package/dist/config/js-fix-config.js +3 -3
  117. package/dist/config/js-fix-config.js.map +1 -1
  118. package/dist/config/js-fix-logger.d.ts +0 -3
  119. package/dist/config/js-fix-logger.js.map +1 -1
  120. package/dist/dict-parser.js +28 -23
  121. package/dist/dict-parser.js.map +1 -1
  122. package/dist/dictionary/compiler/compiler-type.js +7 -7
  123. package/dist/dictionary/compiler/compiler-type.js.map +1 -1
  124. package/dist/dictionary/compiler/enum-compiler.d.ts +1 -0
  125. package/dist/dictionary/compiler/enum-compiler.js +11 -1
  126. package/dist/dictionary/compiler/enum-compiler.js.map +1 -1
  127. package/dist/dictionary/compiler/msg-compiler.js +8 -6
  128. package/dist/dictionary/compiler/msg-compiler.js.map +1 -1
  129. package/dist/dictionary/contained/contained-component-field.js +2 -1
  130. package/dist/dictionary/contained/contained-component-field.js.map +1 -1
  131. package/dist/dictionary/contained/contained-field-dispatch.d.ts +1 -14
  132. package/dist/dictionary/contained/contained-field-dispatch.js +4 -4
  133. package/dist/dictionary/contained/contained-field-dispatch.js.map +1 -1
  134. package/dist/dictionary/contained/contained-field-dispatcher.d.ts +14 -0
  135. package/dist/dictionary/contained/contained-field-dispatcher.js +3 -0
  136. package/dist/dictionary/contained/contained-field-dispatcher.js.map +1 -0
  137. package/dist/dictionary/contained/contained-field-set.d.ts +1 -1
  138. package/dist/dictionary/contained/contained-field-set.js +12 -11
  139. package/dist/dictionary/contained/contained-field-set.js.map +1 -1
  140. package/dist/dictionary/contained/contained-field-type.d.ts +5 -0
  141. package/dist/dictionary/contained/contained-field-type.js +10 -0
  142. package/dist/dictionary/contained/contained-field-type.js.map +1 -0
  143. package/dist/dictionary/contained/contained-field.d.ts +1 -5
  144. package/dist/dictionary/contained/contained-field.js +1 -7
  145. package/dist/dictionary/contained/contained-field.js.map +1 -1
  146. package/dist/dictionary/contained/contained-group-field.js +2 -1
  147. package/dist/dictionary/contained/contained-group-field.js.map +1 -1
  148. package/dist/dictionary/contained/contained-simple-field.js +2 -1
  149. package/dist/dictionary/contained/contained-simple-field.js.map +1 -1
  150. package/dist/dictionary/{fields-dispatch.d.ts → contained/field-dispatcher.d.ts} +3 -2
  151. package/dist/dictionary/contained/field-dispatcher.js +3 -0
  152. package/dist/dictionary/contained/field-dispatcher.js.map +1 -0
  153. package/dist/dictionary/contained/fields-dispatch.d.ts +6 -0
  154. package/dist/dictionary/contained/fields-dispatch.js +42 -0
  155. package/dist/dictionary/contained/fields-dispatch.js.map +1 -0
  156. package/dist/dictionary/contained/index.d.ts +2 -0
  157. package/dist/dictionary/contained/index.js +2 -0
  158. package/dist/dictionary/contained/index.js.map +1 -1
  159. package/dist/dictionary/contained-set-type.d.ts +5 -0
  160. package/dist/dictionary/contained-set-type.js +10 -0
  161. package/dist/dictionary/contained-set-type.js.map +1 -0
  162. package/dist/dictionary/definition/component-field-definition.js +2 -2
  163. package/dist/dictionary/definition/component-field-definition.js.map +1 -1
  164. package/dist/dictionary/definition/fix-definitions.d.ts +2 -1
  165. package/dist/dictionary/definition/fix-definitions.js.map +1 -1
  166. package/dist/dictionary/definition/group-field-definition.js +2 -2
  167. package/dist/dictionary/definition/group-field-definition.js.map +1 -1
  168. package/dist/dictionary/definition/index.d.ts +0 -1
  169. package/dist/dictionary/definition/index.js +0 -1
  170. package/dist/dictionary/definition/index.js.map +1 -1
  171. package/dist/dictionary/definition/message-definition.js +2 -2
  172. package/dist/dictionary/definition/message-definition.js.map +1 -1
  173. package/dist/dictionary/definition/simple-field-definition.d.ts +1 -1
  174. package/dist/dictionary/definition/simple-field-definition.js +5 -4
  175. package/dist/dictionary/definition/simple-field-definition.js.map +1 -1
  176. package/dist/dictionary/dict-primitive.d.ts +0 -11
  177. package/dist/dictionary/dict-primitive.js +0 -7
  178. package/dist/dictionary/dict-primitive.js.map +1 -1
  179. package/dist/dictionary/fix-definition-source.d.ts +6 -0
  180. package/dist/dictionary/fix-definition-source.js +11 -0
  181. package/dist/dictionary/fix-definition-source.js.map +1 -0
  182. package/dist/dictionary/fix-versions.d.ts +0 -9
  183. package/dist/dictionary/fix-versions.js +1 -39
  184. package/dist/dictionary/fix-versions.js.map +1 -1
  185. package/dist/dictionary/index.d.ts +1 -5
  186. package/dist/dictionary/index.js +1 -5
  187. package/dist/dictionary/index.js.map +1 -1
  188. package/dist/dictionary/parser/fix-repository/abbreviations-parser.d.ts +1 -3
  189. package/dist/dictionary/parser/fix-repository/abbreviations-parser.js +2 -3
  190. package/dist/dictionary/parser/fix-repository/abbreviations-parser.js.map +1 -1
  191. package/dist/dictionary/parser/fix-repository/base-parser.d.ts +2 -4
  192. package/dist/dictionary/parser/fix-repository/base-parser.js +1 -2
  193. package/dist/dictionary/parser/fix-repository/base-parser.js.map +1 -1
  194. package/dist/dictionary/parser/fix-repository/components-parser.d.ts +1 -3
  195. package/dist/dictionary/parser/fix-repository/components-parser.js +2 -3
  196. package/dist/dictionary/parser/fix-repository/components-parser.js.map +1 -1
  197. package/dist/dictionary/parser/fix-repository/data-types-parser.d.ts +1 -3
  198. package/dist/dictionary/parser/fix-repository/data-types-parser.js +2 -3
  199. package/dist/dictionary/parser/fix-repository/data-types-parser.js.map +1 -1
  200. package/dist/dictionary/parser/fix-repository/enums-parser.d.ts +1 -3
  201. package/dist/dictionary/parser/fix-repository/enums-parser.js +2 -3
  202. package/dist/dictionary/parser/fix-repository/enums-parser.js.map +1 -1
  203. package/dist/dictionary/parser/fix-repository/fields-parser.d.ts +1 -3
  204. package/dist/dictionary/parser/fix-repository/fields-parser.js +2 -3
  205. package/dist/dictionary/parser/fix-repository/fields-parser.js.map +1 -1
  206. package/dist/dictionary/parser/fix-repository/messages-parser.d.ts +1 -3
  207. package/dist/dictionary/parser/fix-repository/messages-parser.js +2 -3
  208. package/dist/dictionary/parser/fix-repository/messages-parser.js.map +1 -1
  209. package/dist/dictionary/parser/fix-repository/msg-contents-parser.d.ts +1 -3
  210. package/dist/dictionary/parser/fix-repository/msg-contents-parser.js +2 -3
  211. package/dist/dictionary/parser/fix-repository/msg-contents-parser.js.map +1 -1
  212. package/dist/dictionary/parser/fix-repository/repository-abbreviation.d.ts +5 -0
  213. package/dist/dictionary/parser/fix-repository/repository-abbreviation.js +3 -0
  214. package/dist/dictionary/parser/fix-repository/repository-abbreviation.js.map +1 -0
  215. package/dist/dictionary/parser/fix-repository/repository-component.d.ts +10 -0
  216. package/dist/dictionary/parser/fix-repository/repository-component.js +3 -0
  217. package/dist/dictionary/parser/fix-repository/repository-component.js.map +1 -0
  218. package/dist/dictionary/parser/fix-repository/repository-data-type.d.ts +6 -0
  219. package/dist/dictionary/parser/fix-repository/repository-data-type.js +3 -0
  220. package/dist/dictionary/parser/fix-repository/repository-data-type.js.map +1 -0
  221. package/dist/dictionary/parser/fix-repository/repository-enum.d.ts +7 -0
  222. package/dist/dictionary/parser/fix-repository/repository-enum.js +3 -0
  223. package/dist/dictionary/parser/fix-repository/repository-enum.js.map +1 -0
  224. package/dist/dictionary/parser/fix-repository/repository-field.d.ts +11 -0
  225. package/dist/dictionary/parser/fix-repository/repository-field.js +3 -0
  226. package/dist/dictionary/parser/fix-repository/repository-field.js.map +1 -0
  227. package/dist/dictionary/parser/fix-repository/repository-message.d.ts +11 -0
  228. package/dist/dictionary/parser/fix-repository/repository-message.js +3 -0
  229. package/dist/dictionary/parser/fix-repository/repository-message.js.map +1 -0
  230. package/dist/dictionary/parser/fix-repository/repository-msg-content.d.ts +9 -0
  231. package/dist/dictionary/parser/fix-repository/repository-msg-content.js +3 -0
  232. package/dist/dictionary/parser/fix-repository/repository-msg-content.js.map +1 -0
  233. package/dist/dictionary/parser/fix-repository/repository-msg.d.ts +0 -0
  234. package/dist/dictionary/parser/fix-repository/repository-msg.js +1 -0
  235. package/dist/dictionary/parser/fix-repository/repository-msg.js.map +1 -0
  236. package/dist/dictionary/parser/fix-repository/repository-type.d.ts +0 -53
  237. package/dist/dictionary/parser/fix-repository/repository-type.js +0 -2
  238. package/dist/dictionary/parser/fix-repository/repository-type.js.map +1 -1
  239. package/dist/dictionary/parser/fix-repository/repository-xml-parser.js +10 -10
  240. package/dist/dictionary/parser/fix-repository/repository-xml-parser.js.map +1 -1
  241. package/dist/dictionary/parser/fix-repository/repository.d.ts +12 -1
  242. package/dist/dictionary/parser/fix-repository/repository.js +50 -28
  243. package/dist/dictionary/parser/fix-repository/repository.js.map +1 -1
  244. package/dist/dictionary/parser/fixml/components-parser.d.ts +1 -1
  245. package/dist/dictionary/parser/fixml/components-parser.js.map +1 -1
  246. package/dist/dictionary/parser/fixml/fields-parser.d.ts +1 -1
  247. package/dist/dictionary/parser/fixml/fields-parser.js.map +1 -1
  248. package/dist/dictionary/parser/fixml/fix-xsd-parser.js +3 -2
  249. package/dist/dictionary/parser/fixml/fix-xsd-parser.js.map +1 -1
  250. package/dist/dictionary/parser/fixml/include-graph.js.map +1 -1
  251. package/dist/dictionary/parser/fixml/xsd-parser.d.ts +1 -1
  252. package/dist/dictionary/parser/fixml/xsd-parser.js.map +1 -1
  253. package/dist/dictionary/parser/quickfix/field-definition-parser.d.ts +4 -4
  254. package/dist/dictionary/parser/quickfix/field-definition-parser.js +3 -3
  255. package/dist/dictionary/parser/quickfix/field-definition-parser.js.map +1 -1
  256. package/dist/dictionary/parser/quickfix/field-set-parser.d.ts +4 -4
  257. package/dist/dictionary/parser/quickfix/field-set-parser.js +3 -3
  258. package/dist/dictionary/parser/quickfix/field-set-parser.js.map +1 -1
  259. package/dist/dictionary/parser/quickfix/message-parser.d.ts +4 -4
  260. package/dist/dictionary/parser/quickfix/message-parser.js +3 -3
  261. package/dist/dictionary/parser/quickfix/message-parser.js.map +1 -1
  262. package/dist/dictionary/parser/quickfix/node-parser.d.ts +4 -5
  263. package/dist/dictionary/parser/quickfix/node-parser.js +4 -4
  264. package/dist/dictionary/parser/quickfix/node-parser.js.map +1 -1
  265. package/dist/dictionary/parser/quickfix/parse-state.d.ts +8 -0
  266. package/dist/dictionary/parser/quickfix/parse-state.js +13 -0
  267. package/dist/dictionary/parser/quickfix/parse-state.js.map +1 -0
  268. package/dist/dictionary/parser/quickfix/quick-fix-xml-file-parser.d.ts +1 -9
  269. package/dist/dictionary/parser/quickfix/quick-fix-xml-file-parser.js +28 -35
  270. package/dist/dictionary/parser/quickfix/quick-fix-xml-file-parser.js.map +1 -1
  271. package/dist/dictionary/sax-node.d.ts +6 -0
  272. package/dist/{types/FIX4.4/quickfix/set/header.js → dictionary/sax-node.js} +1 -1
  273. package/dist/dictionary/sax-node.js.map +1 -0
  274. package/dist/dictionary/set-reduce.d.ts +5 -12
  275. package/dist/dictionary/set-reduce.js +28 -26
  276. package/dist/dictionary/set-reduce.js.map +1 -1
  277. package/dist/dictionary/type-dispatcher.d.ts +12 -0
  278. package/dist/dictionary/type-dispatcher.js +3 -0
  279. package/dist/dictionary/type-dispatcher.js.map +1 -0
  280. package/dist/dictionary/version-util.d.ts +4 -0
  281. package/dist/dictionary/version-util.js +36 -0
  282. package/dist/dictionary/version-util.js.map +1 -0
  283. package/dist/execution-report.test.d.ts +0 -0
  284. package/dist/execution-report.test.js +1 -0
  285. package/dist/execution-report.test.js.map +1 -0
  286. package/dist/experiment.d.ts +0 -0
  287. package/dist/experiment.js +1 -0
  288. package/dist/experiment.js.map +1 -0
  289. package/dist/fix-repo-dict.test.d.ts +0 -0
  290. package/dist/fix-repo-dict.test.js +1 -0
  291. package/dist/fix-repo-dict.test.js.map +1 -0
  292. package/dist/fix-session-state-args.d.ts +0 -0
  293. package/dist/fix-session-state-args.js +1 -0
  294. package/dist/fix-session-state-args.js.map +1 -0
  295. package/dist/fix-session-state.d.ts +0 -0
  296. package/dist/fix-session-state.js +1 -0
  297. package/dist/fix-session-state.js.map +1 -0
  298. package/dist/fix-session.d.ts +0 -0
  299. package/dist/fix-session.js +1 -0
  300. package/dist/fix-session.js.map +1 -0
  301. package/dist/fix.txt +1 -0
  302. package/dist/fixml-alloc-parse.test.d.ts +0 -0
  303. package/dist/fixml-alloc-parse.test.js +1 -0
  304. package/dist/fixml-alloc-parse.test.js.map +1 -0
  305. package/dist/fixml-mkt-data-fut-parse.test.d.ts +0 -0
  306. package/dist/fixml-mkt-data-fut-parse.test.js +1 -0
  307. package/dist/fixml-mkt-data-fut-parse.test.js.map +1 -0
  308. package/dist/fixml-mkt-data-settle-parse.test.d.ts +0 -0
  309. package/dist/fixml-mkt-data-settle-parse.test.js +1 -0
  310. package/dist/fixml-mkt-data-settle-parse.test.js.map +1 -0
  311. package/dist/fixml-tc-bi-lateral-parse.test.d.ts +0 -0
  312. package/dist/fixml-tc-bi-lateral-parse.test.js +1 -0
  313. package/dist/fixml-tc-bi-lateral-parse.test.js.map +1 -0
  314. package/dist/includes.test.d.ts +0 -0
  315. package/dist/includes.test.js +1 -0
  316. package/dist/includes.test.js.map +1 -0
  317. package/dist/index.d.ts +1 -0
  318. package/dist/index.js +1 -0
  319. package/dist/index.js.map +1 -1
  320. package/dist/jsfix-cmd.d.ts +5 -0
  321. package/dist/jsfix-cmd.js +28 -21
  322. package/dist/jsfix-cmd.js.map +1 -1
  323. package/dist/launcher.d.ts +0 -0
  324. package/dist/launcher.js +1 -0
  325. package/dist/launcher.js.map +1 -0
  326. package/dist/logon.test.d.ts +0 -0
  327. package/dist/logon.test.js +1 -0
  328. package/dist/logon.test.js.map +1 -0
  329. package/dist/make-fix-session.d.ts +0 -0
  330. package/dist/make-fix-session.js +1 -0
  331. package/dist/make-fix-session.js.map +1 -0
  332. package/dist/memory-store.test.d.ts +0 -0
  333. package/dist/memory-store.test.js +1 -0
  334. package/dist/memory-store.test.js.map +1 -0
  335. package/dist/object.json +691 -0
  336. package/dist/qf-full-msg.test.d.ts +0 -0
  337. package/dist/qf-full-msg.test.js +1 -0
  338. package/dist/qf-full-msg.test.js.map +1 -0
  339. package/dist/repo-full-ascii-msg.test.d.ts +0 -0
  340. package/dist/repo-full-ascii-msg.test.js +1 -0
  341. package/dist/repo-full-ascii-msg.test.js.map +1 -0
  342. package/dist/runtime/DITokens.d.ts +20 -0
  343. package/dist/runtime/DITokens.js +25 -0
  344. package/dist/runtime/DITokens.js.map +1 -0
  345. package/dist/runtime/app-launcher.d.ts +27 -0
  346. package/dist/runtime/app-launcher.js +131 -0
  347. package/dist/runtime/app-launcher.js.map +1 -0
  348. package/dist/runtime/di-tokens.d.ts +28 -0
  349. package/dist/runtime/di-tokens.js +33 -0
  350. package/dist/runtime/di-tokens.js.map +1 -0
  351. package/dist/runtime/engine-factory.d.ts +4 -0
  352. package/dist/runtime/engine-factory.js +3 -0
  353. package/dist/runtime/engine-factory.js.map +1 -0
  354. package/dist/runtime/index.d.ts +5 -0
  355. package/dist/runtime/index.js +18 -0
  356. package/dist/runtime/index.js.map +1 -0
  357. package/dist/runtime/launcher.d.ts +29 -0
  358. package/dist/runtime/launcher.js +131 -0
  359. package/dist/runtime/launcher.js.map +1 -0
  360. package/dist/runtime/make-config.d.ts +11 -0
  361. package/dist/runtime/make-config.js +57 -0
  362. package/dist/runtime/make-config.js.map +1 -0
  363. package/dist/runtime/session-container.d.ts +16 -0
  364. package/dist/runtime/session-container.js +168 -0
  365. package/dist/runtime/session-container.js.map +1 -0
  366. package/dist/runtime/session-launcher.d.ts +26 -0
  367. package/dist/runtime/session-launcher.js +131 -0
  368. package/dist/runtime/session-launcher.js.map +1 -0
  369. package/dist/sample/http/oms/app.d.ts +1 -1
  370. package/dist/sample/http/oms/app.js +16 -14
  371. package/dist/sample/http/oms/app.js.map +1 -1
  372. package/dist/sample/http/oms/http-client.js +22 -2
  373. package/dist/sample/http/oms/http-client.js.map +1 -1
  374. package/dist/sample/http/oms/http-server.js +21 -2
  375. package/dist/sample/http/oms/http-server.js.map +1 -1
  376. package/dist/sample/launcher.d.ts +21 -4
  377. package/dist/sample/launcher.js +87 -19
  378. package/dist/sample/launcher.js.map +1 -1
  379. package/dist/sample/tcp/qf-md/app.d.ts +1 -1
  380. package/dist/sample/tcp/qf-md/app.js +11 -11
  381. package/dist/sample/tcp/qf-md/app.js.map +1 -1
  382. package/dist/sample/tcp/qf-md/md-client.js +21 -2
  383. package/dist/sample/tcp/qf-md/md-client.js.map +1 -1
  384. package/dist/sample/tcp/qf-md/md-server.js +20 -2
  385. package/dist/sample/tcp/qf-md/md-server.js.map +1 -1
  386. package/dist/sample/tcp/recovering-skeleton/app.d.ts +1 -1
  387. package/dist/sample/tcp/recovering-skeleton/app.js +36 -16
  388. package/dist/sample/tcp/recovering-skeleton/app.js.map +1 -1
  389. package/dist/sample/tcp/recovering-skeleton/respawn-acceptor.d.ts +3 -1
  390. package/dist/sample/tcp/recovering-skeleton/respawn-acceptor.js +30 -8
  391. package/dist/sample/tcp/recovering-skeleton/respawn-acceptor.js.map +1 -1
  392. package/dist/sample/tcp/recovering-skeleton/skeleton-client.d.ts +1 -1
  393. package/dist/sample/tcp/recovering-skeleton/skeleton-client.js +22 -3
  394. package/dist/sample/tcp/recovering-skeleton/skeleton-client.js.map +1 -1
  395. package/dist/sample/tcp/recovering-skeleton/skeleton-server.js +21 -2
  396. package/dist/sample/tcp/recovering-skeleton/skeleton-server.js.map +1 -1
  397. package/dist/sample/tcp/skeleton/app.d.ts +1 -1
  398. package/dist/sample/tcp/skeleton/app.js +8 -13
  399. package/dist/sample/tcp/skeleton/app.js.map +1 -1
  400. package/dist/sample/tcp/skeleton/skeleton-session.d.ts +1 -1
  401. package/dist/sample/tcp/skeleton/skeleton-session.js +26 -4
  402. package/dist/sample/tcp/skeleton/skeleton-session.js.map +1 -1
  403. package/dist/sample/tcp/tls-trade-capture/app.d.ts +1 -1
  404. package/dist/sample/tcp/tls-trade-capture/app.js +4 -24
  405. package/dist/sample/tcp/tls-trade-capture/app.js.map +1 -1
  406. package/dist/sample/tcp/trade-capture/app-launcher.d.ts +6 -0
  407. package/dist/sample/tcp/trade-capture/app-launcher.js +21 -0
  408. package/dist/sample/tcp/trade-capture/app-launcher.js.map +1 -0
  409. package/dist/sample/tcp/trade-capture/app-launher.d.ts +0 -0
  410. package/dist/sample/tcp/trade-capture/app-launher.js +1 -0
  411. package/dist/sample/tcp/trade-capture/app-launher.js.map +1 -0
  412. package/dist/sample/tcp/trade-capture/app.d.ts +1 -1
  413. package/dist/sample/tcp/trade-capture/app.js +4 -21
  414. package/dist/sample/tcp/trade-capture/app.js.map +1 -1
  415. package/dist/sample/tcp/trade-capture/jsfix.test_client.txt +11 -0
  416. package/dist/sample/tcp/trade-capture/jsfix.test_server.txt +10 -0
  417. package/dist/sample/tcp/trade-capture/trade-capture-client.js.map +1 -1
  418. package/dist/sample/tcp/trade-capture/trade-capture-server.js.map +1 -1
  419. package/dist/sample/tcp/trade-capture/trade-factory.js +7 -1
  420. package/dist/sample/tcp/trade-capture/trade-factory.js.map +1 -1
  421. package/dist/segment-description.d.ts +0 -0
  422. package/dist/segment-description.js +1 -0
  423. package/dist/segment-description.js.map +1 -0
  424. package/dist/segment-summary.d.ts +0 -0
  425. package/dist/segment-summary.js +1 -0
  426. package/dist/segment-summary.js.map +1 -0
  427. package/dist/segment-type.d.ts +0 -0
  428. package/dist/segment-type.js +1 -0
  429. package/dist/segment-type.js.map +1 -0
  430. package/dist/session-description.d.ts +0 -0
  431. package/dist/session-description.js +1 -0
  432. package/dist/session-description.js.map +1 -0
  433. package/dist/session-msg-factory.d.ts +0 -0
  434. package/dist/session-msg-factory.js +1 -0
  435. package/dist/session-msg-factory.js.map +1 -0
  436. package/dist/session-state.d.ts +0 -0
  437. package/dist/session-state.js +1 -0
  438. package/dist/session-state.js.map +1 -0
  439. package/dist/session-state.test.d.ts +0 -0
  440. package/dist/session-state.test.js +1 -0
  441. package/dist/session-state.test.js.map +1 -0
  442. package/dist/session.test.d.ts +0 -0
  443. package/dist/session.test.js +1 -0
  444. package/dist/session.test.js.map +1 -0
  445. package/dist/setup.d.ts +0 -0
  446. package/dist/setup.js +1 -0
  447. package/dist/setup.js.map +1 -0
  448. package/dist/skeleton-runner.d.ts +0 -0
  449. package/dist/skeleton-runner.js +1 -0
  450. package/dist/skeleton-runner.js.map +1 -0
  451. package/dist/store/fix-msg-ascii-store-resend.d.ts +1 -1
  452. package/dist/store/fix-msg-ascii-store-resend.js +2 -1
  453. package/dist/store/fix-msg-ascii-store-resend.js.map +1 -1
  454. package/dist/store/fix-msg-memory-store.d.ts +1 -1
  455. package/dist/store/fix-msg-memory-store.js.map +1 -1
  456. package/dist/store/fix-msg-store-record.d.ts +2 -0
  457. package/dist/store/fix-msg-store-record.js +4 -0
  458. package/dist/store/fix-msg-store-record.js.map +1 -1
  459. package/dist/store/fix-msg-store-state.d.ts +6 -0
  460. package/dist/store/fix-msg-store-state.js +3 -0
  461. package/dist/store/fix-msg-store-state.js.map +1 -0
  462. package/dist/store/fix-msg-store.d.ts +1 -6
  463. package/dist/store/fix-msg-store.js.map +1 -1
  464. package/dist/structure.json +631 -0
  465. package/dist/tag-pos.d.ts +0 -0
  466. package/dist/tag-pos.js +1 -0
  467. package/dist/tag-pos.js.map +1 -0
  468. package/dist/tag-type.d.ts +0 -0
  469. package/dist/tag-type.js +1 -0
  470. package/dist/tag-type.js.map +1 -0
  471. package/dist/tags.d.ts +0 -0
  472. package/dist/tags.js +1 -0
  473. package/dist/tags.js.map +1 -0
  474. package/dist/test/ascii/ascii-encoder.test.d.ts +1 -0
  475. package/dist/test/{ascii-encode.test.js → ascii/ascii-encoder.test.js} +140 -49
  476. package/dist/test/ascii/ascii-encoder.test.js.map +1 -0
  477. package/dist/test/ascii/ascii-parser.test.d.ts +1 -0
  478. package/dist/test/ascii/ascii-parser.test.js +123 -0
  479. package/dist/test/ascii/ascii-parser.test.js.map +1 -0
  480. package/dist/test/ascii/ascii-segment.test.d.ts +1 -0
  481. package/dist/test/ascii/ascii-segment.test.js +86 -0
  482. package/dist/test/ascii/ascii-segment.test.js.map +1 -0
  483. package/dist/test/ascii/ascii-store-replay.test.d.ts +1 -0
  484. package/dist/test/ascii/ascii-store-replay.test.js +92 -0
  485. package/dist/test/ascii/ascii-store-replay.test.js.map +1 -0
  486. package/dist/test/ascii/ascii-tag-pos.test.d.ts +1 -0
  487. package/dist/test/ascii/ascii-tag-pos.test.js +105 -0
  488. package/dist/test/ascii/ascii-tag-pos.test.js.map +1 -0
  489. package/dist/test/ascii/execution-report.test.d.ts +1 -0
  490. package/dist/test/ascii/execution-report.test.js +489 -0
  491. package/dist/test/ascii/execution-report.test.js.map +1 -0
  492. package/dist/test/ascii/fix-log-replay.test.d.ts +1 -0
  493. package/dist/test/ascii/fix-log-replay.test.js +47 -0
  494. package/dist/test/ascii/fix-log-replay.test.js.map +1 -0
  495. package/dist/test/ascii/fix-repo-dict.test.d.ts +1 -0
  496. package/dist/test/ascii/fix-repo-dict.test.js +128 -0
  497. package/dist/test/ascii/fix-repo-dict.test.js.map +1 -0
  498. package/dist/test/ascii/includes.test.d.ts +1 -0
  499. package/dist/test/ascii/includes.test.js +43 -0
  500. package/dist/test/ascii/includes.test.js.map +1 -0
  501. package/dist/test/ascii/logon.test.d.ts +1 -0
  502. package/dist/test/ascii/logon.test.js +91 -0
  503. package/dist/test/ascii/logon.test.js.map +1 -0
  504. package/dist/test/ascii/memory-store.test.d.ts +1 -0
  505. package/dist/test/ascii/memory-store.test.js +75 -0
  506. package/dist/test/ascii/memory-store.test.js.map +1 -0
  507. package/dist/test/ascii/qf-full-msg.test.d.ts +1 -0
  508. package/dist/test/ascii/qf-full-msg.test.js +81 -0
  509. package/dist/test/ascii/qf-full-msg.test.js.map +1 -0
  510. package/dist/test/ascii/repo-full-ascii-msg.test.d.ts +1 -0
  511. package/dist/test/ascii/repo-full-ascii-msg.test.js +87 -0
  512. package/dist/test/ascii/repo-full-ascii-msg.test.js.map +1 -0
  513. package/dist/test/ascii/session-state.test.d.ts +1 -0
  514. package/dist/test/ascii/session-state.test.js +73 -0
  515. package/dist/test/ascii/session-state.test.js.map +1 -0
  516. package/dist/test/ascii/session.test.d.ts +1 -0
  517. package/dist/test/ascii/session.test.js +280 -0
  518. package/dist/test/ascii/session.test.js.map +1 -0
  519. package/dist/test/ascii/time-formatter.test.d.ts +1 -0
  520. package/dist/test/ascii/time-formatter.test.js +80 -0
  521. package/dist/test/ascii/time-formatter.test.js.map +1 -0
  522. package/dist/test/ascii/view-decode.test.d.ts +1 -0
  523. package/dist/test/ascii/view-decode.test.js +183 -0
  524. package/dist/test/ascii/view-decode.test.js.map +1 -0
  525. package/dist/test/ascii-encoder.test.d.ts +1 -1
  526. package/dist/test/ascii-encoder.test.js +51 -48
  527. package/dist/test/ascii-encoder.test.js.map +1 -1
  528. package/dist/test/ascii-parser.test.d.ts +1 -1
  529. package/dist/test/ascii-parser.test.js +26 -45
  530. package/dist/test/ascii-parser.test.js.map +1 -1
  531. package/dist/test/ascii-segment.test.d.ts +1 -1
  532. package/dist/test/ascii-segment.test.js +13 -34
  533. package/dist/test/ascii-segment.test.js.map +1 -1
  534. package/dist/test/ascii-store-replay.test.d.ts +1 -1
  535. package/dist/test/ascii-store-replay.test.js +12 -41
  536. package/dist/test/ascii-store-replay.test.js.map +1 -1
  537. package/dist/test/ascii-tag-pos.test.d.ts +1 -1
  538. package/dist/test/ascii-tag-pos.test.js +8 -8
  539. package/dist/test/ascii-tag-pos.test.js.map +1 -1
  540. package/dist/test/elastic-buffer.test.d.ts +1 -1
  541. package/dist/test/elastic-buffer.test.js +3 -1
  542. package/dist/test/elastic-buffer.test.js.map +1 -1
  543. package/dist/test/encode-proxy.test.d.ts +1 -1
  544. package/dist/test/encode-proxy.test.js +9 -9
  545. package/dist/test/encode-proxy.test.js.map +1 -1
  546. package/dist/test/env/experiment.d.ts +23 -0
  547. package/dist/test/env/experiment.js +33 -0
  548. package/dist/test/env/experiment.js.map +1 -0
  549. package/dist/test/env/parsing-result.d.ts +10 -0
  550. package/dist/test/env/parsing-result.js +14 -0
  551. package/dist/test/env/parsing-result.js.map +1 -0
  552. package/dist/test/env/setup.d.ts +39 -0
  553. package/dist/test/env/setup.js +98 -0
  554. package/dist/test/env/setup.js.map +1 -0
  555. package/dist/test/env/skeleton-runner.d.ts +15 -0
  556. package/dist/test/env/skeleton-runner.js +108 -0
  557. package/dist/test/env/skeleton-runner.js.map +1 -0
  558. package/dist/test/env/test-recovery.d.ts +13 -0
  559. package/dist/test/env/test-recovery.js +41 -0
  560. package/dist/test/env/test-recovery.js.map +1 -0
  561. package/dist/test/env/to-views.d.ts +11 -0
  562. package/dist/test/env/to-views.js +56 -0
  563. package/dist/test/env/to-views.js.map +1 -0
  564. package/dist/test/execution-report.test.d.ts +1 -1
  565. package/dist/test/execution-report.test.js +53 -49
  566. package/dist/test/execution-report.test.js.map +1 -1
  567. package/dist/test/experiment.d.ts +23 -0
  568. package/dist/test/experiment.js +33 -0
  569. package/dist/test/experiment.js.map +1 -0
  570. package/dist/test/expieriment.d.ts +23 -0
  571. package/dist/test/expieriment.js +33 -0
  572. package/dist/test/expieriment.js.map +1 -0
  573. package/dist/test/fix-log-replay.test.d.ts +1 -1
  574. package/dist/test/fix-log-replay.test.js +7 -5
  575. package/dist/test/fix-log-replay.test.js.map +1 -1
  576. package/dist/test/fix-repo-dict.test.d.ts +1 -1
  577. package/dist/test/fix-repo-dict.test.js +6 -5
  578. package/dist/test/fix-repo-dict.test.js.map +1 -1
  579. package/dist/test/fixml/fixml-alloc-parse.test.d.ts +1 -0
  580. package/dist/test/fixml/fixml-alloc-parse.test.js +161 -0
  581. package/dist/test/fixml/fixml-alloc-parse.test.js.map +1 -0
  582. package/dist/test/fixml/fixml-mkt-data-fut-parse.test.d.ts +1 -0
  583. package/dist/test/fixml/fixml-mkt-data-fut-parse.test.js +61 -0
  584. package/dist/test/fixml/fixml-mkt-data-fut-parse.test.js.map +1 -0
  585. package/dist/test/fixml/fixml-mkt-data-settle-parse.test.d.ts +1 -0
  586. package/dist/test/fixml/fixml-mkt-data-settle-parse.test.js +34 -0
  587. package/dist/test/fixml/fixml-mkt-data-settle-parse.test.js.map +1 -0
  588. package/dist/test/fixml/fixml-tc-bi-lateral-parse.test.d.ts +1 -0
  589. package/dist/test/fixml/fixml-tc-bi-lateral-parse.test.js +97 -0
  590. package/dist/test/fixml/fixml-tc-bi-lateral-parse.test.js.map +1 -0
  591. package/dist/test/fixml/repo-full-fixml-msg.test.d.ts +1 -0
  592. package/dist/test/fixml/repo-full-fixml-msg.test.js +143 -0
  593. package/dist/test/fixml/repo-full-fixml-msg.test.js.map +1 -0
  594. package/dist/test/fixml-alloc-parse.test.d.ts +1 -1
  595. package/dist/test/fixml-alloc-parse.test.js +2 -1
  596. package/dist/test/fixml-alloc-parse.test.js.map +1 -1
  597. package/dist/test/fixml-mkt-data-fut-parse.test.d.ts +1 -1
  598. package/dist/test/fixml-mkt-data-fut-parse.test.js +2 -1
  599. package/dist/test/fixml-mkt-data-fut-parse.test.js.map +1 -1
  600. package/dist/test/fixml-mkt-data-settle-parse.test.d.ts +1 -1
  601. package/dist/test/fixml-mkt-data-settle-parse.test.js +2 -1
  602. package/dist/test/fixml-mkt-data-settle-parse.test.js.map +1 -1
  603. package/dist/test/fixml-tc-bi-lateral-parse.test.d.ts +1 -1
  604. package/dist/test/fixml-tc-bi-lateral-parse.test.js +2 -1
  605. package/dist/test/fixml-tc-bi-lateral-parse.test.js.map +1 -1
  606. package/dist/test/includes.test.d.ts +1 -1
  607. package/dist/test/includes.test.js +1 -0
  608. package/dist/test/includes.test.js.map +1 -1
  609. package/dist/test/logon.test.d.ts +1 -1
  610. package/dist/test/logon.test.js +11 -11
  611. package/dist/test/logon.test.js.map +1 -1
  612. package/dist/test/memory-store.test.d.ts +1 -1
  613. package/dist/test/memory-store.test.js +11 -8
  614. package/dist/test/memory-store.test.js.map +1 -1
  615. package/dist/test/qf-full-msg.test.d.ts +1 -1
  616. package/dist/test/qf-full-msg.test.js +13 -9
  617. package/dist/test/qf-full-msg.test.js.map +1 -1
  618. package/dist/test/repo-full-ascii-msg.test.d.ts +1 -1
  619. package/dist/test/repo-full-ascii-msg.test.js +14 -10
  620. package/dist/test/repo-full-ascii-msg.test.js.map +1 -1
  621. package/dist/test/repo-full-fixml-msg.test.d.ts +1 -1
  622. package/dist/test/repo-full-fixml-msg.test.js +7 -4
  623. package/dist/test/repo-full-fixml-msg.test.js.map +1 -1
  624. package/dist/test/session-state.test.d.ts +1 -1
  625. package/dist/test/session-state.test.js +1 -0
  626. package/dist/test/session-state.test.js.map +1 -1
  627. package/dist/test/session.test.d.ts +1 -1
  628. package/dist/test/session.test.js +13 -144
  629. package/dist/test/session.test.js.map +1 -1
  630. package/dist/test/setup.d.ts +45 -0
  631. package/dist/test/setup.js +102 -0
  632. package/dist/test/setup.js.map +1 -0
  633. package/dist/test/skeleton-runner.d.ts +15 -0
  634. package/dist/test/skeleton-runner.js +108 -0
  635. package/dist/test/skeleton-runner.js.map +1 -0
  636. package/dist/test/time-formatter.test.d.ts +1 -1
  637. package/dist/test/time-formatter.test.js +3 -1
  638. package/dist/test/time-formatter.test.js.map +1 -1
  639. package/dist/test/to-views.d.ts +1 -1
  640. package/dist/test/to-views.js +5 -4
  641. package/dist/test/to-views.js.map +1 -1
  642. package/dist/test/view-decode.test.d.ts +1 -1
  643. package/dist/test/view-decode.test.js +9 -34
  644. package/dist/test/view-decode.test.js.map +1 -1
  645. package/dist/time-formatter.test.d.ts +0 -0
  646. package/dist/time-formatter.test.js +1 -0
  647. package/dist/time-formatter.test.js.map +1 -0
  648. package/dist/to-views.d.ts +0 -0
  649. package/dist/to-views.js +1 -0
  650. package/dist/to-views.js.map +1 -0
  651. package/dist/token.txt +248 -0
  652. package/dist/transport/FixEntity.d.ts +8 -0
  653. package/dist/transport/FixEntity.js +12 -0
  654. package/dist/transport/FixEntity.js.map +1 -0
  655. package/dist/transport/a-session-msg-factory.d.ts +2 -2
  656. package/dist/transport/a-session-msg-factory.js.map +1 -1
  657. package/dist/transport/ascii/ascii-msg-transmitter.js +25 -6
  658. package/dist/transport/ascii/ascii-msg-transmitter.js.map +1 -1
  659. package/dist/transport/ascii/ascii-session-msg-factory.d.ts +2 -2
  660. package/dist/transport/ascii/ascii-session-msg-factory.js +1 -1
  661. package/dist/transport/ascii/ascii-session-msg-factory.js.map +1 -1
  662. package/dist/transport/ascii/ascii-session.d.ts +1 -1
  663. package/dist/transport/ascii/ascii-session.js +26 -23
  664. package/dist/transport/ascii/ascii-session.js.map +1 -1
  665. package/dist/transport/ascii/index.d.ts +0 -1
  666. package/dist/transport/ascii/index.js +0 -1
  667. package/dist/transport/ascii/index.js.map +1 -1
  668. package/dist/transport/duplex/http-duplex.d.ts +1 -1
  669. package/dist/transport/duplex/http-duplex.js.map +1 -1
  670. package/dist/transport/duplex/tcp-duplex.js +22 -2
  671. package/dist/transport/duplex/tcp-duplex.js.map +1 -1
  672. package/dist/transport/factory/index.d.ts +1 -0
  673. package/dist/transport/factory/index.js +14 -0
  674. package/dist/transport/factory/index.js.map +1 -0
  675. package/dist/transport/{msg-transport.d.ts → factory/msg-transport.d.ts} +4 -4
  676. package/dist/transport/factory/msg-transport.js +61 -0
  677. package/dist/transport/factory/msg-transport.js.map +1 -0
  678. package/dist/transport/fix-acceptor.d.ts +2 -2
  679. package/dist/transport/fix-acceptor.js.map +1 -1
  680. package/dist/transport/fix-entity.d.ts +8 -0
  681. package/dist/transport/fix-entity.js +12 -0
  682. package/dist/transport/fix-entity.js.map +1 -0
  683. package/dist/transport/fix-initiator.d.ts +2 -2
  684. package/dist/transport/fix-initiator.js.map +1 -1
  685. package/dist/transport/fix-msg-factory.d.ts +1 -1
  686. package/dist/transport/fix-msg-factory.js.map +1 -1
  687. package/dist/transport/fix-session-state-args.d.ts +8 -0
  688. package/dist/transport/fix-session-state-args.js +3 -0
  689. package/dist/transport/fix-session-state-args.js.map +1 -0
  690. package/dist/transport/fix-session-state.d.ts +3 -41
  691. package/dist/transport/fix-session-state.js +21 -54
  692. package/dist/transport/fix-session-state.js.map +1 -1
  693. package/dist/transport/fix-session.d.ts +3 -2
  694. package/dist/transport/fix-session.js +44 -42
  695. package/dist/transport/fix-session.js.map +1 -1
  696. package/dist/transport/fixml/fixml-msg-transmitter.js +23 -5
  697. package/dist/transport/fixml/fixml-msg-transmitter.js.map +1 -1
  698. package/dist/transport/fixml/fixml-session-msg-factory.d.ts +2 -2
  699. package/dist/transport/fixml/fixml-session-msg-factory.js +1 -1
  700. package/dist/transport/fixml/fixml-session-msg-factory.js.map +1 -1
  701. package/dist/transport/fixml/fixml-session.d.ts +1 -1
  702. package/dist/transport/fixml/fixml-session.js +3 -3
  703. package/dist/transport/fixml/fixml-session.js.map +1 -1
  704. package/dist/transport/fixml/index.d.ts +0 -2
  705. package/dist/transport/fixml/index.js +0 -2
  706. package/dist/transport/fixml/index.js.map +1 -1
  707. package/dist/transport/http/html-options.d.ts +8 -0
  708. package/dist/{store/replay-record.js → transport/http/html-options.js} +1 -1
  709. package/dist/transport/http/html-options.js.map +1 -0
  710. package/dist/transport/http/html-route.d.ts +5 -0
  711. package/dist/{types/FIX4.4/quickfix/set/trailer.js → transport/http/html-route.js} +1 -1
  712. package/dist/transport/http/html-route.js.map +1 -0
  713. package/dist/transport/http/http-acceptor-listener.d.ts +7 -0
  714. package/dist/transport/http/http-acceptor-listener.js +68 -0
  715. package/dist/transport/http/http-acceptor-listener.js.map +1 -0
  716. package/dist/transport/http/http-acceptor.js +24 -5
  717. package/dist/transport/http/http-acceptor.js.map +1 -1
  718. package/dist/transport/http/http-adapter.d.ts +7 -0
  719. package/dist/transport/http/http-adapter.js +3 -0
  720. package/dist/transport/http/http-adapter.js.map +1 -0
  721. package/dist/transport/http/http-initiator.d.ts +9 -3
  722. package/dist/transport/http/http-initiator.js +57 -26
  723. package/dist/transport/http/http-initiator.js.map +1 -1
  724. package/dist/transport/http/http-json-sample-adapter.d.ts +2 -1
  725. package/dist/transport/http/http-json-sample-adapter.js +21 -2
  726. package/dist/transport/http/http-json-sample-adapter.js.map +1 -1
  727. package/dist/transport/http/http-transaction.d.ts +1 -1
  728. package/dist/transport/http/http-transaction.js.map +1 -1
  729. package/dist/transport/http/http-transport-description.d.ts +8 -0
  730. package/dist/transport/http/http-transport-description.js +3 -0
  731. package/dist/transport/http/http-transport-description.js.map +1 -0
  732. package/dist/transport/http/index.d.ts +1 -0
  733. package/dist/transport/http/index.js +1 -0
  734. package/dist/transport/http/index.js.map +1 -1
  735. package/dist/transport/index.d.ts +11 -10
  736. package/dist/transport/index.js +11 -10
  737. package/dist/transport/index.js.map +1 -1
  738. package/dist/transport/{make-fixl-session.d.ts → make-fix-session.d.ts} +0 -0
  739. package/dist/transport/make-fix-session.js +3 -0
  740. package/dist/transport/make-fix-session.js.map +1 -0
  741. package/dist/transport/msg-application.d.ts +12 -0
  742. package/dist/transport/msg-application.js +3 -0
  743. package/dist/transport/msg-application.js.map +1 -0
  744. package/dist/transport/msg-transmitter.d.ts +5 -5
  745. package/dist/transport/msg-transmitter.js +2 -3
  746. package/dist/transport/msg-transmitter.js.map +1 -1
  747. package/dist/transport/session/a-session-msg-factory.d.ts +23 -0
  748. package/dist/transport/session/a-session-msg-factory.js +58 -0
  749. package/dist/transport/session/a-session-msg-factory.js.map +1 -0
  750. package/dist/transport/session/fix-session-state-args.d.ts +8 -0
  751. package/dist/transport/session/fix-session-state-args.js +3 -0
  752. package/dist/transport/session/fix-session-state-args.js.map +1 -0
  753. package/dist/transport/session/fix-session-state.d.ts +32 -0
  754. package/dist/transport/session/fix-session-state.js +133 -0
  755. package/dist/transport/session/fix-session-state.js.map +1 -0
  756. package/dist/transport/session/fix-session.d.ts +50 -0
  757. package/dist/transport/session/fix-session.js +291 -0
  758. package/dist/transport/session/fix-session.js.map +1 -0
  759. package/dist/transport/session/make-fix-session.d.ts +5 -0
  760. package/dist/transport/session/make-fix-session.js +3 -0
  761. package/dist/transport/session/make-fix-session.js.map +1 -0
  762. package/dist/transport/session/session-description.d.ts +17 -0
  763. package/dist/transport/session/session-description.js +3 -0
  764. package/dist/transport/session/session-description.js.map +1 -0
  765. package/dist/transport/session/session-msg-factory.d.ts +15 -0
  766. package/dist/transport/session/session-msg-factory.js +3 -0
  767. package/dist/transport/session/session-msg-factory.js.map +1 -0
  768. package/dist/transport/session/session-state.d.ts +25 -0
  769. package/dist/transport/session/session-state.js +30 -0
  770. package/dist/transport/session/session-state.js.map +1 -0
  771. package/dist/transport/session-description.d.ts +1 -48
  772. package/dist/transport/session-description.js.map +1 -1
  773. package/dist/transport/session-msg-factory.d.ts +7 -20
  774. package/dist/transport/session-msg-factory.js +0 -150
  775. package/dist/transport/session-msg-factory.js.map +1 -1
  776. package/dist/transport/session-state.d.ts +25 -0
  777. package/dist/transport/session-state.js +30 -0
  778. package/dist/transport/session-state.js.map +1 -0
  779. package/dist/transport/tcp/index.d.ts +3 -2
  780. package/dist/transport/tcp/index.js +3 -2
  781. package/dist/transport/tcp/index.js.map +1 -1
  782. package/dist/transport/tcp/recovering-tcp-initiator.d.ts +7 -9
  783. package/dist/transport/tcp/recovering-tcp-initiator.js +41 -16
  784. package/dist/transport/tcp/recovering-tcp-initiator.js.map +1 -1
  785. package/dist/transport/tcp/tcp-acceptor-listener.d.ts +7 -0
  786. package/dist/transport/tcp/tcp-acceptor-listener.js +70 -0
  787. package/dist/transport/tcp/tcp-acceptor-listener.js.map +1 -0
  788. package/dist/transport/tcp/tcp-acceptor.js +29 -12
  789. package/dist/transport/tcp/tcp-acceptor.js.map +1 -1
  790. package/dist/transport/tcp/tcp-initiator-connector.d.ts +10 -0
  791. package/dist/transport/tcp/tcp-initiator-connector.js +97 -0
  792. package/dist/transport/tcp/tcp-initiator-connector.js.map +1 -0
  793. package/dist/transport/tcp/tcp-initiator.d.ts +2 -2
  794. package/dist/transport/tcp/tcp-initiator.js +28 -9
  795. package/dist/transport/tcp/tcp-initiator.js.map +1 -1
  796. package/dist/transport/tcp/tcp-transport-description.d.ts +6 -0
  797. package/dist/transport/tcp/tcp-transport-description.js +3 -0
  798. package/dist/transport/tcp/tcp-transport-description.js.map +1 -0
  799. package/dist/transport/tcp/tls-options-factory.d.ts +9 -0
  800. package/dist/transport/tcp/tls-options-factory.js +53 -0
  801. package/dist/transport/tcp/tls-options-factory.js.map +1 -0
  802. package/dist/transport/tcp/tls-options.d.ts +10 -5
  803. package/dist/transport/tcp/tls-options.js +0 -49
  804. package/dist/transport/tcp/tls-options.js.map +1 -1
  805. package/dist/transport/tick-action.d.ts +8 -0
  806. package/dist/transport/tick-action.js +13 -0
  807. package/dist/transport/tick-action.js.map +1 -0
  808. package/dist/util/buffer-helper.js +1 -1
  809. package/dist/util/buffer-helper.js.map +1 -1
  810. package/dist/util/definition-factory.d.ts +10 -0
  811. package/dist/util/definition-factory.js +56 -0
  812. package/dist/util/definition-factory.js.map +1 -0
  813. package/dist/util/dictionary-path.d.ts +4 -0
  814. package/dist/util/dictionary-path.js +3 -0
  815. package/dist/util/dictionary-path.js.map +1 -0
  816. package/dist/util/index.d.ts +1 -1
  817. package/dist/util/index.js +1 -1
  818. package/dist/util/index.js.map +1 -1
  819. package/dist/util/json-helper.d.ts +3 -1
  820. package/dist/util/json-helper.js +13 -12
  821. package/dist/util/json-helper.js.map +1 -1
  822. package/dist/util/message-generator.d.ts +1 -1
  823. package/dist/util/message-generator.js +16 -15
  824. package/dist/util/message-generator.js.map +1 -1
  825. package/dist/util/replay.d.ts +6 -3
  826. package/dist/util/replay.js +24 -26
  827. package/dist/util/replay.js.map +1 -1
  828. package/package.json +15 -10
  829. package/script/build.cmd +1 -0
  830. package/script/build.sh +1 -0
  831. package/script/test.cmd +3 -0
  832. package/src/buffer/{ascii-chars.ts → ascii/ascii-chars.ts} +0 -0
  833. package/src/buffer/ascii/ascii-encoder.ts +9 -6
  834. package/src/buffer/ascii/ascii-parser-state.ts +7 -12
  835. package/src/buffer/ascii/ascii-parser.ts +23 -16
  836. package/src/buffer/ascii/ascii-segment-parser.ts +14 -8
  837. package/src/buffer/ascii/ascii-view.ts +4 -9
  838. package/src/buffer/ascii/index.ts +1 -0
  839. package/src/buffer/ascii/parse-state.ts +8 -0
  840. package/src/buffer/ascii/time-formatter.ts +1 -1
  841. package/src/buffer/elastic-buffer.ts +7 -2
  842. package/src/buffer/encode-proxy.ts +9 -4
  843. package/src/buffer/fixml/fixml-encoder.ts +15 -11
  844. package/src/buffer/fixml/fixml-parser.ts +16 -6
  845. package/src/buffer/fixml/fixml-view.ts +4 -9
  846. package/src/buffer/fixml/populated-attributes.ts +6 -0
  847. package/src/buffer/index.ts +4 -8
  848. package/src/buffer/msg-encoder.ts +2 -1
  849. package/src/buffer/msg-view.ts +13 -9
  850. package/src/buffer/{segment-description.ts → segment/segment-description.ts} +4 -11
  851. package/src/buffer/{segment-summary.ts → segment/segment-summary.ts} +0 -0
  852. package/src/buffer/segment/segment-type.ts +8 -0
  853. package/src/buffer/structure.ts +3 -3
  854. package/src/buffer/{tag-pos.ts → tag/tag-pos.ts} +0 -0
  855. package/src/buffer/tag/tag-type.ts +13 -0
  856. package/src/buffer/{tags.ts → tag/tags.ts} +4 -16
  857. package/src/config/get-js-fx-logger.ts +4 -0
  858. package/src/config/index.ts +1 -0
  859. package/src/config/js-fix-config.ts +5 -2
  860. package/src/config/js-fix-logger.ts +0 -3
  861. package/src/dictionary/compiler/compiler-type.ts +3 -3
  862. package/src/dictionary/compiler/enum-compiler.ts +12 -1
  863. package/src/dictionary/compiler/msg-compiler.ts +8 -7
  864. package/src/dictionary/contained/contained-component-field.ts +2 -1
  865. package/src/dictionary/contained/contained-field-dispatch.ts +3 -7
  866. package/src/dictionary/contained/contained-field-dispatcher.ts +9 -0
  867. package/src/dictionary/contained/contained-field-set.ts +5 -3
  868. package/src/dictionary/contained/contained-field-type.ts +5 -0
  869. package/src/dictionary/contained/contained-field.ts +1 -6
  870. package/src/dictionary/contained/contained-group-field.ts +2 -1
  871. package/src/dictionary/contained/contained-simple-field.ts +2 -1
  872. package/src/dictionary/contained/field-dispatcher.ts +9 -0
  873. package/src/dictionary/contained/fields-dispatch.ts +46 -0
  874. package/src/dictionary/contained/index.ts +2 -0
  875. package/src/dictionary/contained-set-type.ts +5 -0
  876. package/src/dictionary/definition/component-field-definition.ts +1 -1
  877. package/src/dictionary/definition/fix-definitions.ts +2 -1
  878. package/src/dictionary/definition/group-field-definition.ts +1 -1
  879. package/src/dictionary/definition/index.ts +0 -1
  880. package/src/dictionary/definition/message-definition.ts +1 -1
  881. package/src/dictionary/definition/simple-field-definition.ts +3 -1
  882. package/src/dictionary/dict-primitive.ts +0 -13
  883. package/src/dictionary/fix-definition-source.ts +6 -0
  884. package/src/dictionary/fix-versions.ts +0 -32
  885. package/src/dictionary/index.ts +1 -5
  886. package/src/dictionary/parser/fix-repository/abbreviations-parser.ts +2 -3
  887. package/src/dictionary/parser/fix-repository/base-parser.ts +2 -3
  888. package/src/dictionary/parser/fix-repository/components-parser.ts +2 -3
  889. package/src/dictionary/parser/fix-repository/data-types-parser.ts +2 -3
  890. package/src/dictionary/parser/fix-repository/enums-parser.ts +2 -3
  891. package/src/dictionary/parser/fix-repository/fields-parser.ts +2 -3
  892. package/src/dictionary/parser/fix-repository/messages-parser.ts +2 -3
  893. package/src/dictionary/parser/fix-repository/msg-contents-parser.ts +2 -3
  894. package/src/dictionary/parser/fix-repository/repository-abbreviation.ts +6 -0
  895. package/src/dictionary/parser/fix-repository/repository-component.ts +11 -0
  896. package/src/dictionary/parser/fix-repository/repository-data-type.ts +7 -0
  897. package/src/dictionary/parser/fix-repository/repository-enum.ts +8 -0
  898. package/src/dictionary/parser/fix-repository/repository-field.ts +12 -0
  899. package/src/dictionary/parser/fix-repository/repository-message.ts +12 -0
  900. package/src/dictionary/parser/fix-repository/repository-msg-content.ts +10 -0
  901. package/src/dictionary/parser/fix-repository/repository-type.ts +0 -59
  902. package/src/dictionary/parser/fix-repository/repository-xml-parser.ts +10 -9
  903. package/src/dictionary/parser/fix-repository/repository.ts +69 -38
  904. package/src/dictionary/parser/fixml/components-parser.ts +6 -3
  905. package/src/dictionary/parser/fixml/fields-parser.ts +1 -1
  906. package/src/dictionary/parser/fixml/fix-xsd-parser.ts +2 -1
  907. package/src/dictionary/parser/fixml/include-graph.ts +2 -1
  908. package/src/dictionary/parser/fixml/xsd-parser.ts +2 -1
  909. package/src/dictionary/parser/quickfix/field-definition-parser.ts +4 -5
  910. package/src/dictionary/parser/quickfix/field-set-parser.ts +4 -5
  911. package/src/dictionary/parser/quickfix/message-parser.ts +4 -5
  912. package/src/dictionary/parser/quickfix/node-parser.ts +3 -6
  913. package/src/dictionary/parser/quickfix/parse-state.ts +8 -0
  914. package/src/dictionary/parser/quickfix/quick-fix-xml-file-parser.ts +9 -15
  915. package/src/dictionary/sax-node.ts +7 -0
  916. package/src/dictionary/set-reduce.ts +30 -31
  917. package/src/dictionary/type-dispatcher.ts +7 -0
  918. package/src/dictionary/version-util.ts +25 -0
  919. package/src/index.ts +1 -0
  920. package/src/jsfix-cmd.ts +31 -16
  921. package/src/runtime/di-tokens.ts +48 -0
  922. package/src/runtime/engine-factory.ts +5 -0
  923. package/src/runtime/index.ts +5 -0
  924. package/src/runtime/make-config.ts +35 -0
  925. package/src/runtime/session-container.ts +180 -0
  926. package/src/runtime/session-launcher.ts +127 -0
  927. package/src/sample/http/oms/app.ts +20 -14
  928. package/src/sample/http/oms/http-client.ts +5 -2
  929. package/src/sample/http/oms/http-server.ts +5 -1
  930. package/src/sample/tcp/qf-md/app.ts +12 -12
  931. package/src/sample/tcp/qf-md/md-client.ts +4 -1
  932. package/src/sample/tcp/qf-md/md-server.ts +3 -1
  933. package/src/sample/tcp/recovering-skeleton/app.ts +37 -15
  934. package/src/sample/tcp/recovering-skeleton/respawn-acceptor.ts +16 -9
  935. package/src/sample/tcp/recovering-skeleton/skeleton-client.ts +4 -2
  936. package/src/sample/tcp/recovering-skeleton/skeleton-server.ts +4 -2
  937. package/src/sample/tcp/skeleton/app.ts +10 -15
  938. package/src/sample/tcp/skeleton/skeleton-session.ts +8 -4
  939. package/src/sample/tcp/tls-trade-capture/app.ts +8 -31
  940. package/src/sample/tcp/trade-capture/app-launcher.ts +22 -0
  941. package/src/sample/tcp/trade-capture/app.ts +3 -26
  942. package/src/sample/tcp/trade-capture/trade-capture-client.ts +2 -1
  943. package/src/sample/tcp/trade-capture/trade-capture-server.ts +2 -1
  944. package/src/sample/tcp/trade-capture/trade-factory.ts +7 -1
  945. package/src/store/fix-msg-ascii-store-resend.ts +3 -2
  946. package/src/store/fix-msg-memory-store.ts +1 -1
  947. package/src/store/fix-msg-store-record.ts +6 -0
  948. package/src/store/fix-msg-store-state.ts +6 -0
  949. package/src/store/fix-msg-store.ts +1 -7
  950. package/src/transport/ascii/ascii-msg-transmitter.ts +9 -5
  951. package/src/transport/ascii/ascii-session-msg-factory.ts +2 -2
  952. package/src/transport/ascii/ascii-session.ts +9 -6
  953. package/src/transport/ascii/index.ts +0 -1
  954. package/src/transport/duplex/http-duplex.ts +1 -1
  955. package/src/transport/duplex/tcp-duplex.ts +4 -1
  956. package/src/transport/factory/index.ts +1 -0
  957. package/src/transport/factory/msg-transport.ts +55 -0
  958. package/src/transport/fix-acceptor.ts +2 -2
  959. package/src/transport/fix-entity.ts +9 -0
  960. package/src/transport/fix-initiator.ts +2 -2
  961. package/src/transport/fixml/fixml-msg-transmitter.ts +8 -4
  962. package/src/transport/fixml/fixml-session-msg-factory.ts +2 -2
  963. package/src/transport/fixml/fixml-session.ts +2 -2
  964. package/src/transport/fixml/index.ts +0 -2
  965. package/src/transport/http/html-options.ts +8 -0
  966. package/src/transport/http/html-route.ts +6 -0
  967. package/src/transport/http/http-acceptor-listener.ts +42 -0
  968. package/src/transport/http/http-acceptor.ts +5 -2
  969. package/src/transport/http/http-adapter.ts +7 -0
  970. package/src/transport/http/http-initiator.ts +40 -25
  971. package/src/transport/http/http-json-sample-adapter.ts +7 -2
  972. package/src/transport/http/http-transaction.ts +1 -1
  973. package/src/transport/http/http-transport-description.ts +9 -0
  974. package/src/transport/http/index.ts +1 -0
  975. package/src/transport/index.ts +11 -10
  976. package/src/transport/msg-application.ts +13 -0
  977. package/src/transport/msg-transmitter.ts +5 -5
  978. package/src/transport/{a-session-msg-factory.ts → session/a-session-msg-factory.ts} +4 -4
  979. package/src/transport/session/fix-session-state-args.ts +9 -0
  980. package/src/transport/{fix-session-state.ts → session/fix-session-state.ts} +4 -44
  981. package/src/transport/{fix-session.ts → session/fix-session.ts} +10 -7
  982. package/src/transport/{make-fixl-session.ts → session/make-fix-session.ts} +1 -1
  983. package/src/transport/session/session-description.ts +18 -0
  984. package/src/transport/{fix-msg-factory.ts → session/session-msg-factory.ts} +2 -2
  985. package/src/transport/session/session-state.ts +25 -0
  986. package/src/transport/tcp/index.ts +3 -2
  987. package/src/transport/tcp/recovering-tcp-initiator.ts +24 -13
  988. package/src/transport/tcp/tcp-acceptor-listener.ts +45 -0
  989. package/src/transport/tcp/tcp-acceptor.ts +11 -10
  990. package/src/transport/tcp/tcp-initiator-connector.ts +71 -0
  991. package/src/transport/tcp/tcp-initiator.ts +10 -6
  992. package/src/transport/tcp/tcp-transport-description.ts +7 -0
  993. package/src/transport/tcp/tls-options-factory.ts +55 -0
  994. package/src/transport/tcp/tls-options.ts +9 -51
  995. package/src/transport/tick-action.ts +8 -0
  996. package/src/util/definition-factory.ts +47 -0
  997. package/src/util/dictionary-path.ts +4 -0
  998. package/src/util/index.ts +1 -1
  999. package/src/util/json-helper.ts +14 -4
  1000. package/src/util/message-generator.ts +6 -3
  1001. package/src/util/replay.ts +26 -21
  1002. package/tsconfig.json +2 -0
  1003. package/dist/buffer/ascii-chars.js.map +0 -1
  1004. package/dist/dictionary/fields-dispatch.js +0 -40
  1005. package/dist/dictionary/fields-dispatch.js.map +0 -1
  1006. package/dist/sample/tcp/recovering-skeleton/respawn-2.d.ts +0 -2
  1007. package/dist/sample/tcp/recovering-skeleton/respawn-2.js +0 -3
  1008. package/dist/sample/tcp/recovering-skeleton/respawn-2.js.map +0 -1
  1009. package/dist/store/fix-msg-ascii-store-recovery.d.ts +0 -12
  1010. package/dist/store/fix-msg-ascii-store-recovery.js +0 -60
  1011. package/dist/store/fix-msg-ascii-store-recovery.js.map +0 -1
  1012. package/dist/store/fix-msg-ascii-store-replay.d.ts +0 -13
  1013. package/dist/store/fix-msg-ascii-store-replay.js +0 -60
  1014. package/dist/store/fix-msg-ascii-store-replay.js.map +0 -1
  1015. package/dist/store/fix-replay-record.d.ts +0 -12
  1016. package/dist/store/fix-replay-record.js +0 -12
  1017. package/dist/store/fix-replay-record.js.map +0 -1
  1018. package/dist/store/fix-resend-record.d.ts +0 -12
  1019. package/dist/store/fix-resend-record.js +0 -12
  1020. package/dist/store/fix-resend-record.js.map +0 -1
  1021. package/dist/store/replay-record.d.ts +0 -6
  1022. package/dist/store/replay-record.js.map +0 -1
  1023. package/dist/store/store-replay-record.d.ts +0 -12
  1024. package/dist/store/store-replay-record.js +0 -12
  1025. package/dist/store/store-replay-record.js.map +0 -1
  1026. package/dist/tcp/tls-options.d.ts +0 -5
  1027. package/dist/tcp/tls-options.js +0 -45
  1028. package/dist/tcp/tls-options.js.map +0 -1
  1029. package/dist/test/ascii-encode.test.d.ts +0 -1
  1030. package/dist/test/ascii-encode.test.js.map +0 -1
  1031. package/dist/test/ascii-store-recovery.test.d.ts +0 -1
  1032. package/dist/test/ascii-store-recovery.test.js +0 -50
  1033. package/dist/test/ascii-store-recovery.test.js.map +0 -1
  1034. package/dist/transport/ascii-session-msg-factory.d.ts +0 -16
  1035. package/dist/transport/ascii-session-msg-factory.js +0 -47
  1036. package/dist/transport/ascii-session-msg-factory.js.map +0 -1
  1037. package/dist/transport/fixml/acceptor.d.ts +0 -3
  1038. package/dist/transport/fixml/acceptor.js +0 -38
  1039. package/dist/transport/fixml/acceptor.js.map +0 -1
  1040. package/dist/transport/fixml-session-msg-factory.d.ts +0 -13
  1041. package/dist/transport/fixml-session-msg-factory.js +0 -68
  1042. package/dist/transport/fixml-session-msg-factory.js.map +0 -1
  1043. package/dist/transport/make-config.d.ts +0 -4
  1044. package/dist/transport/make-config.js +0 -31
  1045. package/dist/transport/make-config.js.map +0 -1
  1046. package/dist/transport/make-fixl-session.js.map +0 -1
  1047. package/dist/transport/msg-transport.js +0 -57
  1048. package/dist/transport/msg-transport.js.map +0 -1
  1049. package/dist/transport/tcp/acceptor.d.ts +0 -3
  1050. package/dist/transport/tcp/acceptor.js +0 -40
  1051. package/dist/transport/tcp/acceptor.js.map +0 -1
  1052. package/dist/transport/tcp/initiator.d.ts +0 -3
  1053. package/dist/transport/tcp/initiator.js +0 -67
  1054. package/dist/transport/tcp/initiator.js.map +0 -1
  1055. package/dist/transport/tcp/recovering-initiator.d.ts +0 -17
  1056. package/dist/transport/tcp/recovering-initiator.js +0 -30
  1057. package/dist/transport/tcp/recovering-initiator.js.map +0 -1
  1058. package/dist/transport/tcp/recovering_initiator.d.ts +0 -12
  1059. package/dist/transport/tcp/recovering_initiator.js +0 -25
  1060. package/dist/transport/tcp/recovering_initiator.js.map +0 -1
  1061. package/dist/transport/tcp/resilient-initiator.d.ts +0 -12
  1062. package/dist/transport/tcp/resilient-initiator.js +0 -41
  1063. package/dist/transport/tcp/resilient-initiator.js.map +0 -1
  1064. package/dist/types/FIX4.4/quickfix/set/header.d.ts +0 -31
  1065. package/dist/types/FIX4.4/quickfix/set/header.js.map +0 -1
  1066. package/dist/types/FIX4.4/quickfix/set/trailer.d.ts +0 -6
  1067. package/dist/types/FIX4.4/quickfix/set/trailer.js.map +0 -1
  1068. package/dist/util/dictionary-definitions.d.ts +0 -8
  1069. package/dist/util/dictionary-definitions.js +0 -51
  1070. package/dist/util/dictionary-definitions.js.map +0 -1
  1071. package/src/dictionary/fields-dispatch.ts +0 -45
  1072. package/src/sample/launcher.ts +0 -56
  1073. package/src/transport/fixml/acceptor.ts +0 -29
  1074. package/src/transport/make-config.ts +0 -19
  1075. package/src/transport/msg-transport.ts +0 -67
  1076. package/src/transport/session-description.ts +0 -70
  1077. package/src/transport/tcp/acceptor.ts +0 -31
  1078. package/src/transport/tcp/initiator.ts +0 -59
  1079. package/src/util/dictionary-definitions.ts +0 -41
@@ -3,9 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.MsgContentsParser = void 0;
4
4
  const base_parser_1 = require("./base-parser");
5
5
  class MsgContentsParser extends base_parser_1.BaseParser {
6
- constructor(parser) {
7
- super(parser, 'MsgContent');
8
- this.parser = parser;
6
+ constructor() {
7
+ super('MsgContent');
9
8
  }
10
9
  }
11
10
  exports.MsgContentsParser = MsgContentsParser;
@@ -1 +1 @@
1
- {"version":3,"file":"msg-contents-parser.js","sourceRoot":"","sources":["../../../../src/dictionary/parser/fix-repository/msg-contents-parser.ts"],"names":[],"mappings":";;;AAAA,+CAA0C;AAG1C,MAAa,iBAAkB,SAAQ,wBAAU;IAC/C,YAAsB,MAA2B;QAC/C,KAAK,CAAC,MAAM,EAAE,YAAY,CAAC,CAAA;QADP,WAAM,GAAN,MAAM,CAAqB;IAEjD,CAAC;CACF;AAJD,8CAIC","sourcesContent":["import { BaseParser } from './base-parser'\r\nimport { RepositoryXmlParser } from './repository-xml-parser'\r\n\r\nexport class MsgContentsParser extends BaseParser {\r\n constructor (readonly parser: RepositoryXmlParser) {\r\n super(parser, 'MsgContent')\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"msg-contents-parser.js","sourceRoot":"","sources":["../../../../src/dictionary/parser/fix-repository/msg-contents-parser.ts"],"names":[],"mappings":";;;AAAA,+CAA0C;AAE1C,MAAa,iBAAkB,SAAQ,wBAAU;IAC/C;QACE,KAAK,CAAC,YAAY,CAAC,CAAA;IACrB,CAAC;CACF;AAJD,8CAIC","sourcesContent":["import { BaseParser } from './base-parser'\r\n\r\nexport class MsgContentsParser extends BaseParser {\r\n constructor () {\r\n super('MsgContent')\r\n }\r\n}\r\n"]}
@@ -0,0 +1,5 @@
1
+ import { ILooseObject } from '../../../collections/collection';
2
+ export interface IRepositoryAbbreviation extends ILooseObject {
3
+ Term: string;
4
+ AbbrTerm: string;
5
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=repository-abbreviation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"repository-abbreviation.js","sourceRoot":"","sources":["../../../../src/dictionary/parser/fix-repository/repository-abbreviation.ts"],"names":[],"mappings":"","sourcesContent":["import { ILooseObject } from '../../../collections/collection'\r\n\r\nexport interface IRepositoryAbbreviation extends ILooseObject {\r\n Term: string\r\n AbbrTerm: string\r\n}\r\n"]}
@@ -0,0 +1,10 @@
1
+ import { ILooseObject } from '../../../collections/collection';
2
+ export interface IRepositoryComponent extends ILooseObject {
3
+ ComponentID: string;
4
+ ComponentType: string;
5
+ CategoryID: string;
6
+ Name: string;
7
+ AbbrName: string;
8
+ NotReqXML: string;
9
+ Description: string;
10
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=repository-component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"repository-component.js","sourceRoot":"","sources":["../../../../src/dictionary/parser/fix-repository/repository-component.ts"],"names":[],"mappings":"","sourcesContent":["import { ILooseObject } from '../../../collections/collection'\r\n\r\nexport interface IRepositoryComponent extends ILooseObject {\r\n ComponentID: string\r\n ComponentType: string\r\n CategoryID: string\r\n Name: string\r\n AbbrName: string\r\n NotReqXML: string\r\n Description: string\r\n}\r\n"]}
@@ -0,0 +1,6 @@
1
+ import { ILooseObject } from '../../../collections/collection';
2
+ export interface IRepositoryDataType extends ILooseObject {
3
+ Name: string;
4
+ BaseType: string;
5
+ Description: string;
6
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=repository-data-type.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"repository-data-type.js","sourceRoot":"","sources":["../../../../src/dictionary/parser/fix-repository/repository-data-type.ts"],"names":[],"mappings":"","sourcesContent":["import { ILooseObject } from '../../../collections/collection'\r\n\r\nexport interface IRepositoryDataType extends ILooseObject {\r\n Name: string\r\n BaseType: string\r\n Description: string\r\n}\r\n"]}
@@ -0,0 +1,7 @@
1
+ import { ILooseObject } from '../../../collections/collection';
2
+ export interface IRepositoryEnum extends ILooseObject {
3
+ Tag: string;
4
+ Value: string;
5
+ SymbolicName: string;
6
+ Description: string;
7
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=repository-enum.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"repository-enum.js","sourceRoot":"","sources":["../../../../src/dictionary/parser/fix-repository/repository-enum.ts"],"names":[],"mappings":"","sourcesContent":["import { ILooseObject } from '../../../collections/collection'\r\n\r\nexport interface IRepositoryEnum extends ILooseObject {\r\n Tag: string\r\n Value: string\r\n SymbolicName: string\r\n Description: string\r\n}\r\n"]}
@@ -0,0 +1,11 @@
1
+ import { ILooseObject } from '../../../collections/collection';
2
+ export interface IRepositoryField extends ILooseObject {
3
+ Tag: string;
4
+ Name: string;
5
+ Type: string;
6
+ Description: string;
7
+ AbbrName: string;
8
+ NotReqXML: string;
9
+ BaseCategory: string;
10
+ BaseCategoryAbbrName: string;
11
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=repository-field.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"repository-field.js","sourceRoot":"","sources":["../../../../src/dictionary/parser/fix-repository/repository-field.ts"],"names":[],"mappings":"","sourcesContent":["import { ILooseObject } from '../../../collections/collection'\r\n\r\nexport interface IRepositoryField extends ILooseObject {\r\n Tag: string\r\n Name: string\r\n Type: string\r\n Description: string\r\n AbbrName: string\r\n NotReqXML: string\r\n BaseCategory: string\r\n BaseCategoryAbbrName: string\r\n}\r\n"]}
@@ -0,0 +1,11 @@
1
+ import { ILooseObject } from '../../../collections/collection';
2
+ export interface IRepositoryMessage extends ILooseObject {
3
+ ComponentID: string;
4
+ MsgType: string;
5
+ Name: string;
6
+ CategoryID: string;
7
+ SectionID: string;
8
+ AbbrName: string;
9
+ NotReqXML: string;
10
+ Description: string;
11
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=repository-message.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"repository-message.js","sourceRoot":"","sources":["../../../../src/dictionary/parser/fix-repository/repository-message.ts"],"names":[],"mappings":"","sourcesContent":["import { ILooseObject } from '../../../collections/collection'\r\n\r\nexport interface IRepositoryMessage extends ILooseObject {\r\n ComponentID: string\r\n MsgType: string\r\n Name: string\r\n CategoryID: string\r\n SectionID: string\r\n AbbrName: string\r\n NotReqXML: string\r\n Description: string\r\n}\r\n"]}
@@ -0,0 +1,9 @@
1
+ import { ILooseObject } from '../../../collections/collection';
2
+ export interface IRepositoryMsgContent extends ILooseObject {
3
+ ComponentID: string;
4
+ TagText: string;
5
+ Indent: string;
6
+ Position: string;
7
+ Reqd: string;
8
+ Description: string;
9
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=repository-msg-content.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"repository-msg-content.js","sourceRoot":"","sources":["../../../../src/dictionary/parser/fix-repository/repository-msg-content.ts"],"names":[],"mappings":"","sourcesContent":["import { ILooseObject } from '../../../collections/collection'\r\n\r\nexport interface IRepositoryMsgContent extends ILooseObject {\r\n ComponentID: string\r\n TagText: string\r\n Indent: string\r\n Position: string\r\n Reqd: string\r\n Description: string\r\n}\r\n"]}
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=repository-msg.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"repository-msg.js","sourceRoot":"","sources":["../../../../src/dictionary/parser/fix-repository/repository-msg.ts"],"names":[],"mappings":"","sourcesContent":[""]}
@@ -1,53 +0,0 @@
1
- import { ILooseObject } from '../../../collections/collection';
2
- export interface IRepositoryField extends ILooseObject {
3
- Tag: string;
4
- Name: string;
5
- Type: string;
6
- Description: string;
7
- AbbrName: string;
8
- NotReqXML: string;
9
- BaseCategory: string;
10
- BaseCategoryAbbrName: string;
11
- }
12
- export interface IRepositoryEnum extends ILooseObject {
13
- Tag: string;
14
- Value: string;
15
- SymbolicName: string;
16
- Description: string;
17
- }
18
- export interface IRepositoryDataType extends ILooseObject {
19
- Name: string;
20
- BaseType: string;
21
- Description: string;
22
- }
23
- export interface IRepositoryComponent extends ILooseObject {
24
- ComponentID: string;
25
- ComponentType: string;
26
- CategoryID: string;
27
- Name: string;
28
- AbbrName: string;
29
- NotReqXML: string;
30
- Description: string;
31
- }
32
- export interface IRepositoryMessage extends ILooseObject {
33
- ComponentID: string;
34
- MsgType: string;
35
- Name: string;
36
- CategoryID: string;
37
- SectionID: string;
38
- AbbrName: string;
39
- NotReqXML: string;
40
- Description: string;
41
- }
42
- export interface IRepositoryMsgContent extends ILooseObject {
43
- ComponentID: string;
44
- TagText: string;
45
- Indent: string;
46
- Position: string;
47
- Reqd: string;
48
- Description: string;
49
- }
50
- export interface IRepositoryAbbreviation extends ILooseObject {
51
- Term: string;
52
- AbbrTerm: string;
53
- }
@@ -1,3 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
1
  //# sourceMappingURL=repository-type.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"repository-type.js","sourceRoot":"","sources":["../../../../src/dictionary/parser/fix-repository/repository-type.ts"],"names":[],"mappings":"","sourcesContent":["import { ILooseObject } from '../../../collections/collection'\r\n\r\nexport interface IRepositoryField extends ILooseObject {\r\n Tag: string\r\n Name: string\r\n Type: string\r\n Description: string\r\n AbbrName: string\r\n NotReqXML: string\r\n BaseCategory: string\r\n BaseCategoryAbbrName: string\r\n}\r\n\r\nexport interface IRepositoryEnum extends ILooseObject {\r\n Tag: string\r\n Value: string\r\n SymbolicName: string\r\n Description: string\r\n}\r\n\r\nexport interface IRepositoryDataType extends ILooseObject {\r\n Name: string\r\n BaseType: string\r\n Description: string\r\n}\r\n\r\nexport interface IRepositoryComponent extends ILooseObject {\r\n ComponentID: string\r\n ComponentType: string\r\n CategoryID: string\r\n Name: string\r\n AbbrName: string\r\n NotReqXML: string\r\n Description: string\r\n}\r\n\r\nexport interface IRepositoryMessage extends ILooseObject {\r\n ComponentID: string\r\n MsgType: string\r\n Name: string\r\n CategoryID: string\r\n SectionID: string\r\n AbbrName: string\r\n NotReqXML: string\r\n Description: string\r\n}\r\n\r\nexport interface IRepositoryMsgContent extends ILooseObject {\r\n ComponentID: string\r\n TagText: string\r\n Indent: string\r\n Position: string\r\n Reqd: string\r\n Description: string\r\n}\r\n\r\nexport interface IRepositoryAbbreviation extends ILooseObject {\r\n Term: string\r\n AbbrTerm: string\r\n}\r\n"]}
1
+ {"version":3,"file":"repository-type.js","sourceRoot":"","sources":["../../../../src/dictionary/parser/fix-repository/repository-type.ts"],"names":[],"mappings":"","sourcesContent":["\r\n"]}
@@ -21,16 +21,16 @@ const messages_parser_1 = require("./messages-parser");
21
21
  const msg_contents_parser_1 = require("./msg-contents-parser");
22
22
  const repository_1 = require("./repository");
23
23
  const fix_parser_1 = require("../../fix-parser");
24
- const fix_versions_1 = require("../../fix-versions");
25
24
  const data_types_parser_1 = require("./data-types-parser");
25
+ const version_util_1 = require("../../version-util");
26
26
  class RepositoryXmlParser extends fix_parser_1.FixParser {
27
27
  constructor(rootPath, getLogger) {
28
28
  super();
29
29
  this.rootPath = rootPath;
30
30
  this.getLogger = getLogger;
31
- this.singlePass = util_1.promisify(RepositoryXmlParser.subscribe);
31
+ this.singlePass = (0, util_1.promisify)(RepositoryXmlParser.subscribe);
32
32
  this.logger = getLogger('RepositoryXmlParser');
33
- this.repository = new repository_1.Repository(fix_versions_1.VersionUtil.resolve(this.rootPath), getLogger);
33
+ this.repository = new repository_1.Repository(version_util_1.VersionUtil.resolve(this.rootPath), getLogger);
34
34
  }
35
35
  static subscribe(instance, saxStream, done) {
36
36
  let parser;
@@ -83,31 +83,31 @@ class RepositoryXmlParser extends fix_parser_1.FixParser {
83
83
  const saxNode = node;
84
84
  switch (saxNode.name) {
85
85
  case 'Datatypes': {
86
- parser = new data_types_parser_1.DataTypesParser(instance);
86
+ parser = new data_types_parser_1.DataTypesParser();
87
87
  break;
88
88
  }
89
89
  case 'Fields': {
90
- parser = new fields_parser_1.FieldsParser(instance);
90
+ parser = new fields_parser_1.FieldsParser();
91
91
  break;
92
92
  }
93
93
  case 'Enums': {
94
- parser = new enums_parser_1.EnumsParser(instance);
94
+ parser = new enums_parser_1.EnumsParser();
95
95
  break;
96
96
  }
97
97
  case 'Components': {
98
- parser = new components_parser_1.ComponentsParser(instance);
98
+ parser = new components_parser_1.ComponentsParser();
99
99
  break;
100
100
  }
101
101
  case 'Messages': {
102
- parser = new messages_parser_1.MessagesParser(instance);
102
+ parser = new messages_parser_1.MessagesParser();
103
103
  break;
104
104
  }
105
105
  case 'MsgContents': {
106
- parser = new msg_contents_parser_1.MsgContentsParser(instance);
106
+ parser = new msg_contents_parser_1.MsgContentsParser();
107
107
  break;
108
108
  }
109
109
  case 'Abbreviations': {
110
- parser = new abbreviations_parser_1.AbbreviationsParser(instance);
110
+ parser = new abbreviations_parser_1.AbbreviationsParser();
111
111
  break;
112
112
  }
113
113
  case 'Datatype':
@@ -1 +1 @@
1
- {"version":3,"file":"repository-xml-parser.js","sourceRoot":"","sources":["../../../../src/dictionary/parser/fix-repository/repository-xml-parser.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yBAAwB;AACxB,6BAA4B;AAE5B,+BAAgC;AAGhC,iEAA4D;AAE5D,2DAAsD;AACtD,iDAA4C;AAC5C,mDAA8C;AAC9C,uDAAkD;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IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,CAAA;gBAChC,MAAM,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,CAAA;gBAC/B,MAAM,IAAI,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAA;gBACpC,MAAM,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,CAAA;gBAClC,MAAM,IAAI,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAA;gBACrC,IAAI,IAAI,CAAC,UAAU,CAAC,qBAAqB,EAAE;oBACzC,MAAM,IAAI,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAA;iBACxC;gBACD,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,CAAA;aACpC;YAAC,OAAO,CAAC,EAAE;gBACV,MAAM,CAAC,CAAC,CAAC,CAAA;aACV;QACH,CAAC,CAAA,CAAC,CAAA;IACJ,CAAC;IAEa,OAAO,CAAE,QAAgB;;YACrC,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAA;YAC1B,MAAM,YAAY,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAA;YACvD,MAAM,IAAI,GAAkB,EAAE,CAAC,gBAAgB,CAAC,YAAY,CAAC,CAAA;YAC7D,MAAM,CAAC,IAAI,CAAC,WAAW,YAAY,EAAE,CAAC,CAAA;YACtC,MAAM,SAAS,GAAc,OAAO,CAAC,KAAK,CAAC,CAAC,YAAY,CAAC,IAAI,EAAE,EAAE,CAAC,CAAA;YAClE,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,CAAA;YACpB,MAAM,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,SAAS,CAAC,CAAA;QACxC,CAAC;KAAA;CACF;AA9JD,kDA8JC","sourcesContent":["import * as fs from 'fs'\r\nimport * as path from 'path'\r\nimport { SAXParser } from 'sax'\r\nimport { promisify } from 'util'\r\nimport { IDictDoneCb, ISaxNode, SAXStream } from '../../dict-primitive'\r\nimport { FixDefinitions } from '../../definition'\r\nimport { AbbreviationsParser } from './abbreviations-parser'\r\nimport { BaseParser } from './base-parser'\r\nimport { ComponentsParser } from './components-parser'\r\nimport { EnumsParser } from './enums-parser'\r\nimport { FieldsParser } from './fields-parser'\r\nimport { MessagesParser } from './messages-parser'\r\nimport { MsgContentsParser } from './msg-contents-parser'\r\nimport { Repository } from './repository'\r\nimport { FixParser } from '../../fix-parser'\r\nimport { VersionUtil } from '../../fix-versions'\r\nimport { GetJsFixLogger, IJsFixLogger } from '../../../config'\r\nimport { DataTypesParser } from './data-types-parser'\r\n\r\nexport class RepositoryXmlParser extends FixParser {\r\n public readonly repository: Repository\r\n private readonly singlePass = promisify(RepositoryXmlParser.subscribe)\r\n private readonly logger: IJsFixLogger\r\n\r\n constructor (public readonly rootPath: string, public readonly getLogger: GetJsFixLogger) {\r\n super()\r\n this.logger = getLogger('RepositoryXmlParser')\r\n this.repository = new Repository(VersionUtil.resolve(this.rootPath), getLogger)\r\n }\r\n\r\n private static subscribe (instance: RepositoryXmlParser, saxStream: SAXStream, done: IDictDoneCb): void {\r\n let parser: BaseParser\r\n let pending: string\r\n const saxParser: SAXParser = saxStream._parser\r\n\r\n saxStream.on('error', (e: Error) => {\r\n done(e, null)\r\n })\r\n\r\n saxStream.on('closetag', (name) => {\r\n\r\n switch (name) {\r\n case 'Datatypes':\r\n case 'Abbreviations':\r\n case 'Messages':\r\n case 'MsgContents':\r\n case 'Components':\r\n case 'Fields':\r\n case 'Enums': {\r\n if (parser != null) {\r\n parser.close(saxParser.line, name)\r\n instance.repository.assign(name, parser.data)\r\n parser = null\r\n }\r\n break\r\n }\r\n\r\n case 'Datatype':\r\n case 'Abbreviation':\r\n case 'MsgContent':\r\n case 'Field':\r\n case 'Enum':\r\n case 'Component':\r\n case 'Message': {\r\n if (parser != null) {\r\n parser.close(saxParser.line, name)\r\n }\r\n break\r\n }\r\n\r\n default: {\r\n pending = null\r\n break\r\n }\r\n }\r\n })\r\n\r\n saxStream.on('text', (t: string) => {\r\n t = t.trim()\r\n if (pending) {\r\n parser.value(saxParser.line, pending, t)\r\n }\r\n })\r\n\r\n saxStream.on('opentag', (node) => {\r\n const saxNode: ISaxNode = node as ISaxNode\r\n switch (saxNode.name) {\r\n case 'Datatypes': {\r\n parser = new DataTypesParser(instance)\r\n break\r\n }\r\n\r\n case 'Fields': {\r\n parser = new FieldsParser(instance)\r\n break\r\n }\r\n\r\n case 'Enums': {\r\n parser = new EnumsParser(instance)\r\n break\r\n }\r\n\r\n case 'Components': {\r\n parser = new ComponentsParser(instance)\r\n break\r\n }\r\n\r\n case 'Messages': {\r\n parser = new MessagesParser(instance)\r\n break\r\n }\r\n\r\n case 'MsgContents': {\r\n parser = new MsgContentsParser(instance)\r\n break\r\n }\r\n\r\n case 'Abbreviations': {\r\n parser = new AbbreviationsParser(instance)\r\n break\r\n }\r\n\r\n case 'Datatype':\r\n case 'Abbreviation':\r\n case 'Field':\r\n case 'Message':\r\n case 'MsgContent':\r\n case 'Enum':\r\n case 'Component': {\r\n if (parser != null) {\r\n parser.open(saxParser.line, saxNode)\r\n }\r\n break\r\n }\r\n\r\n default: {\r\n pending = saxNode.name\r\n }\r\n }\r\n })\r\n\r\n saxStream.on('ready', () => {\r\n if (done) {\r\n parser = null\r\n done(null, instance.repository.definitions)\r\n }\r\n })\r\n }\r\n\r\n public parse (): Promise<FixDefinitions> {\r\n return new Promise<FixDefinitions>(async (accept, reject) => {\r\n try {\r\n await this.onePass('Datatypes.xml')\r\n await this.onePass('Fields.xml')\r\n await this.onePass('Enums.xml')\r\n await this.onePass('Components.xml')\r\n await this.onePass('Messages.xml')\r\n await this.onePass('MsgContents.xml')\r\n if (this.repository.includesAbbreviations) {\r\n await this.onePass('Abbreviations.xml')\r\n }\r\n accept(this.repository.definitions)\r\n } catch (e) {\r\n reject(e)\r\n }\r\n })\r\n }\r\n\r\n private async onePass (fileName: string): Promise<any> {\r\n const logger = this.logger\r\n const fullFileName = path.join(this.rootPath, fileName)\r\n const pass: fs.ReadStream = fs.createReadStream(fullFileName)\r\n logger.info(`reading ${fullFileName}`)\r\n const saxStream: SAXStream = require('sax').createStream(true, {})\r\n pass.pipe(saxStream)\r\n await this.singlePass(this, saxStream)\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"repository-xml-parser.js","sourceRoot":"","sources":["../../../../src/dictionary/parser/fix-repository/repository-xml-parser.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yBAAwB;AACxB,6BAA4B;AAE5B,+BAAgC;AAGhC,iEAA4D;AAE5D,2DAAsD;AACtD,iDAA4C;AAC5C,mDAA8C;AAC9C,uDAAkD;AAClD,+DAAyD;AACzD,6CAAyC;AACzC,iDAA4C;AAE5C,2DAAqD;AAErD,qDAAgD;AAEhD,MAAa,mBAAoB,SAAQ,sBAAS;IAKhD,YAA6B,QAAgB,EAAkB,SAAyB;QACtF,KAAK,EAAE,CAAA;QADoB,aAAQ,GAAR,QAAQ,CAAQ;QAAkB,cAAS,GAAT,SAAS,CAAgB;QAHvE,eAAU,GAAG,IAAA,gBAAS,EAAC,mBAAmB,CAAC,SAAS,CAAC,CAAA;QAKpE,IAAI,CAAC,MAAM,GAAG,SAAS,CAAC,qBAAqB,CAAC,CAAA;QAC9C,IAAI,CAAC,UAAU,GAAG,IAAI,uBAAU,CAAC,0BAAW,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,SAAS,CAAC,CAAA;IACjF,CAAC;IAEO,MAAM,CAAC,SAAS,CAAE,QAA6B,EAAE,SAAoB,EAAE,IAAiB;QAC9F,IAAI,MAAkB,CAAA;QACtB,IAAI,OAAe,CAAA;QACnB,MAAM,SAAS,GAAc,SAAS,CAAC,OAAO,CAAA;QAE9C,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,CAAQ,EAAE,EAAE;YACjC,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC,CAAA;QACf,CAAC,CAAC,CAAA;QAEF,SAAS,CAAC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AC,YAAY,CAAC,IAAI,EAAE,EAAE,CAAC,CAAA;YAClE,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,CAAA;YACpB,MAAM,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,SAAS,CAAC,CAAA;QACxC,CAAC;KAAA;CACF;AA9JD,kDA8JC","sourcesContent":["import * as fs from 'fs'\r\nimport * as path from 'path'\r\nimport { SAXParser } from 'sax'\r\nimport { promisify } from 'util'\r\nimport { IDictDoneCb, SAXStream } from '../../dict-primitive'\r\nimport { FixDefinitions } from '../../definition'\r\nimport { AbbreviationsParser } from './abbreviations-parser'\r\nimport { BaseParser } from './base-parser'\r\nimport { ComponentsParser } from './components-parser'\r\nimport { EnumsParser } from './enums-parser'\r\nimport { FieldsParser } from './fields-parser'\r\nimport { MessagesParser } from './messages-parser'\r\nimport { MsgContentsParser } from './msg-contents-parser'\r\nimport { Repository } from './repository'\r\nimport { FixParser } from '../../fix-parser'\r\nimport { GetJsFixLogger, IJsFixLogger } from '../../../config'\r\nimport { DataTypesParser } from './data-types-parser'\r\nimport { ISaxNode } from '../../sax-node'\r\nimport { VersionUtil } from '../../version-util'\r\n\r\nexport class RepositoryXmlParser extends FixParser {\r\n public readonly repository: Repository\r\n private readonly singlePass = promisify(RepositoryXmlParser.subscribe)\r\n private readonly logger: IJsFixLogger\r\n\r\n constructor (public readonly rootPath: string, public readonly getLogger: GetJsFixLogger) {\r\n super()\r\n this.logger = getLogger('RepositoryXmlParser')\r\n this.repository = new Repository(VersionUtil.resolve(this.rootPath), getLogger)\r\n }\r\n\r\n private static subscribe (instance: RepositoryXmlParser, saxStream: SAXStream, done: IDictDoneCb): void {\r\n let parser: BaseParser\r\n let pending: string\r\n const saxParser: SAXParser = saxStream._parser\r\n\r\n saxStream.on('error', (e: Error) => {\r\n done(e, null)\r\n })\r\n\r\n saxStream.on('closetag', (name) => {\r\n\r\n switch (name) {\r\n case 'Datatypes':\r\n case 'Abbreviations':\r\n case 'Messages':\r\n case 'MsgContents':\r\n case 'Components':\r\n case 'Fields':\r\n case 'Enums': {\r\n if (parser != null) {\r\n parser.close(saxParser.line, name)\r\n instance.repository.assign(name, parser.data)\r\n parser = null\r\n }\r\n break\r\n }\r\n\r\n case 'Datatype':\r\n case 'Abbreviation':\r\n case 'MsgContent':\r\n case 'Field':\r\n case 'Enum':\r\n case 'Component':\r\n case 'Message': {\r\n if (parser != null) {\r\n parser.close(saxParser.line, name)\r\n }\r\n break\r\n }\r\n\r\n default: {\r\n pending = null\r\n break\r\n }\r\n }\r\n })\r\n\r\n saxStream.on('text', (t: string) => {\r\n t = t.trim()\r\n if (pending) {\r\n parser.value(saxParser.line, pending, t)\r\n }\r\n })\r\n\r\n saxStream.on('opentag', (node) => {\r\n const saxNode: ISaxNode = node as ISaxNode\r\n switch (saxNode.name) {\r\n case 'Datatypes': {\r\n parser = new DataTypesParser()\r\n break\r\n }\r\n\r\n case 'Fields': {\r\n parser = new FieldsParser()\r\n break\r\n }\r\n\r\n case 'Enums': {\r\n parser = new EnumsParser()\r\n break\r\n }\r\n\r\n case 'Components': {\r\n parser = new ComponentsParser()\r\n break\r\n }\r\n\r\n case 'Messages': {\r\n parser = new MessagesParser()\r\n break\r\n }\r\n\r\n case 'MsgContents': {\r\n parser = new MsgContentsParser()\r\n break\r\n }\r\n\r\n case 'Abbreviations': {\r\n parser = new AbbreviationsParser()\r\n break\r\n }\r\n\r\n case 'Datatype':\r\n case 'Abbreviation':\r\n case 'Field':\r\n case 'Message':\r\n case 'MsgContent':\r\n case 'Enum':\r\n case 'Component': {\r\n if (parser != null) {\r\n parser.open(saxParser.line, saxNode)\r\n }\r\n break\r\n }\r\n\r\n default: {\r\n pending = saxNode.name\r\n }\r\n }\r\n })\r\n\r\n saxStream.on('ready', () => {\r\n if (done) {\r\n parser = null\r\n done(null, instance.repository.definitions)\r\n }\r\n })\r\n }\r\n\r\n public parse (): Promise<FixDefinitions> {\r\n return new Promise<FixDefinitions>(async (accept, reject) => {\r\n try {\r\n await this.onePass('Datatypes.xml')\r\n await this.onePass('Fields.xml')\r\n await this.onePass('Enums.xml')\r\n await this.onePass('Components.xml')\r\n await this.onePass('Messages.xml')\r\n await this.onePass('MsgContents.xml')\r\n if (this.repository.includesAbbreviations) {\r\n await this.onePass('Abbreviations.xml')\r\n }\r\n accept(this.repository.definitions)\r\n } catch (e) {\r\n reject(e)\r\n }\r\n })\r\n }\r\n\r\n private async onePass (fileName: string): Promise<any> {\r\n const logger = this.logger\r\n const fullFileName = path.join(this.rootPath, fileName)\r\n const pass: fs.ReadStream = fs.createReadStream(fullFileName)\r\n logger.info(`reading ${fullFileName}`)\r\n const saxStream: SAXStream = require('sax').createStream(true, {})\r\n pass.pipe(saxStream)\r\n await this.singlePass(this, saxStream)\r\n }\r\n}\r\n"]}
@@ -2,7 +2,13 @@ import { ILooseObject } from '../../../collections/collection';
2
2
  import { FixDefinitions } from '../../definition';
3
3
  import { FixVersion } from '../../fix-versions';
4
4
  import { GetJsFixLogger } from '../../../config';
5
- import { IRepositoryEnum, IRepositoryField, IRepositoryDataType, IRepositoryComponent, IRepositoryMessage, IRepositoryMsgContent, IRepositoryAbbreviation } from './repository-type';
5
+ import { IRepositoryMessage } from './repository-message';
6
+ import { IRepositoryEnum } from './repository-enum';
7
+ import { IRepositoryDataType } from './repository-data-type';
8
+ import { IRepositoryComponent } from './repository-component';
9
+ import { IRepositoryField } from './repository-field';
10
+ import { IRepositoryAbbreviation } from './repository-abbreviation';
11
+ import { IRepositoryMsgContent } from './repository-msg-content';
6
12
  export declare class Repository {
7
13
  readonly version: FixVersion;
8
14
  readonly getLogger: GetJsFixLogger;
@@ -21,12 +27,17 @@ export declare class Repository {
21
27
  private dataTypeLookup;
22
28
  private readonly logger;
23
29
  constructor(version: FixVersion, getLogger: GetJsFixLogger);
30
+ private static doesIncludeAbbreviations;
24
31
  assign(name: string, data: ILooseObject[]): void;
25
32
  private summarise;
26
33
  private toDefinitions;
27
34
  private complex;
28
35
  private header;
29
36
  private trailer;
37
+ private static isNative;
38
+ private static makeSimple;
39
+ private getType;
40
+ private fieldEnums;
30
41
  private fields;
31
42
  private contents;
32
43
  private resolveToFieldSet;
@@ -4,27 +4,33 @@ exports.Repository = void 0;
4
4
  const definition_1 = require("../../definition");
5
5
  const collections_1 = require("../../../collections");
6
6
  const contained_1 = require("../../contained");
7
- const dict_primitive_1 = require("../../dict-primitive");
8
7
  const fix_versions_1 = require("../../fix-versions");
8
+ const fix_definition_source_1 = require("../../fix-definition-source");
9
+ const contained_set_type_1 = require("../../contained-set-type");
9
10
  class Repository {
10
11
  constructor(version, getLogger) {
11
12
  this.version = version;
12
13
  this.getLogger = getLogger;
13
14
  this.groupLookup = new collections_1.Dictionary();
14
15
  this.logger = getLogger('Repository');
16
+ this.includesAbbreviations = Repository.doesIncludeAbbreviations(version);
17
+ this.definitions = new definition_1.FixDefinitions(fix_definition_source_1.FixDefinitionSource.FixRepo, version);
18
+ }
19
+ static doesIncludeAbbreviations(version) {
20
+ let includesAbbreviations;
15
21
  switch (version) {
16
22
  case fix_versions_1.FixVersion.FIX44:
17
23
  case fix_versions_1.FixVersion.FIX50:
18
24
  case fix_versions_1.FixVersion.FIX50SP1:
19
25
  case fix_versions_1.FixVersion.FIX50SP2:
20
- this.includesAbbreviations = true;
26
+ includesAbbreviations = true;
21
27
  break;
22
28
  default: {
23
- this.includesAbbreviations = false;
29
+ includesAbbreviations = false;
24
30
  break;
25
31
  }
26
32
  }
27
- this.definitions = new definition_1.FixDefinitions(fix_versions_1.FixDefinitionSource.FixRepo, version);
33
+ return includesAbbreviations;
28
34
  }
29
35
  assign(name, data) {
30
36
  switch (name) {
@@ -64,9 +70,10 @@ class Repository {
64
70
  }
65
71
  summarise() {
66
72
  const logger = this.logger;
67
- logger.info(`definitions: ${this.definitions.simple.count()} fields`);
68
- logger.info(`definitions: ${this.definitions.component.count()} components`);
69
- logger.info(`definitions: ${this.definitions.message.count()} messages`);
73
+ const definitions = this.definitions;
74
+ logger.info(`definitions: ${definitions.simple.count()} fields`);
75
+ logger.info(`definitions: ${definitions.component.count()} components`);
76
+ logger.info(`definitions: ${definitions.message.count()} messages`);
70
77
  }
71
78
  toDefinitions() {
72
79
  this.fields();
@@ -93,26 +100,29 @@ class Repository {
93
100
  const t = this.definitions.component.get('StandardTrailer');
94
101
  this.definitions.component.add('trailer', t);
95
102
  }
96
- fields() {
97
- this.dataTypeLookup = this.types();
98
- const definitions = this.definitions;
103
+ static isNative(f) {
104
+ return f.Type === 'Boolean' ||
105
+ f.Type === 'data' ||
106
+ f.Type === 'LocalMktDate' ||
107
+ f.Type === 'UTCDateOnly' ||
108
+ f.Type === 'UTCTimestamp';
109
+ }
110
+ static makeSimple(f, type) {
111
+ return new definition_1.SimpleFieldDefinition(f.Tag, f.Name, f.AbbrName ? f.AbbrName : f.Name, f.BaseCategory, f.BaseCategoryAbbrName, type.toUpperCase(), f.Description);
112
+ }
113
+ getType(f) {
114
+ var _a;
99
115
  const types = this.dataTypeLookup;
100
- types.remove('boolean');
101
- types.remove('data');
102
- this.Fields.forEach((f) => {
103
- var _a;
104
- const nativeType = f.Type === 'Boolean' ||
105
- f.Type === 'data' ||
106
- f.Type === 'LocalMktDate' ||
107
- f.Type === 'UTCDateOnly' ||
108
- f.Type === 'UTCTimestamp';
109
- let type = f.Type;
110
- const mapped = !nativeType && types.get(type);
111
- if (mapped) {
112
- type = (_a = mapped.BaseType) !== null && _a !== void 0 ? _a : type;
113
- }
114
- definitions.addSimpleFieldDef(new definition_1.SimpleFieldDefinition(f.Tag, f.Name, f.AbbrName ? f.AbbrName : f.Name, f.BaseCategory, f.BaseCategoryAbbrName, type.toUpperCase(), f.Description));
115
- });
116
+ const nativeType = Repository.isNative(f);
117
+ let type = f.Type;
118
+ const mapped = !nativeType && types.get(type);
119
+ if (mapped) {
120
+ type = (_a = mapped.BaseType) !== null && _a !== void 0 ? _a : type;
121
+ }
122
+ return type;
123
+ }
124
+ fieldEnums() {
125
+ const definitions = this.definitions;
116
126
  for (const e of this.Enums) {
117
127
  const field = definitions.tagToSimple[parseInt(e.Tag, 10)];
118
128
  if (field == null) {
@@ -123,6 +133,18 @@ class Repository {
123
133
  }
124
134
  }
125
135
  }
136
+ fields() {
137
+ this.dataTypeLookup = this.types();
138
+ const definitions = this.definitions;
139
+ const types = this.dataTypeLookup;
140
+ types.remove('boolean');
141
+ types.remove('data');
142
+ this.Fields.forEach((f) => {
143
+ const type = this.getType(f);
144
+ definitions.addSimpleFieldDef(Repository.makeSimple(f, type));
145
+ });
146
+ this.fieldEnums();
147
+ }
126
148
  contents() {
127
149
  return this.MsgContents.reduce((a, current) => {
128
150
  let content = a.get(current.ComponentID);
@@ -153,11 +175,11 @@ class Repository {
153
175
  }
154
176
  }
155
177
  switch (childSet.type) {
156
- case dict_primitive_1.ContainedSetType.Component: {
178
+ case contained_set_type_1.ContainedSetType.Component: {
157
179
  parentSet.add(new contained_1.ContainedComponentField(childSet, parentSet.fields.length, required));
158
180
  break;
159
181
  }
160
- case dict_primitive_1.ContainedSetType.Group: {
182
+ case contained_set_type_1.ContainedSetType.Group: {
161
183
  parentSet.add(new contained_1.ContainedGroupField(childSet, parentSet.fields.length, required));
162
184
  break;
163
185
  }
@@ -1 +1 @@
1
- {"version":3,"file":"repository.js","sourceRoot":"","sources":["../../../../src/dictionary/parser/fix-repository/repository.ts"],"names":[],"mappings":";;;AACA,iDAA2I;AAC3I,sDAAiD;AACjD,+CAAuH;AACvH,yDAAuD;AACvD,qDAAoE;AAIpE,MAAa,UAAU;IAiBrB,YAA6B,OAAmB,EAAkB,SAAyB;QAA9D,YAAO,GAAP,OAAO,CAAY;QAAkB,cAAS,GAAT,SAAS,CAAgB;QAN1E,gBAAW,GAAqC,IAAI,wBAAU,EAAwB,CAAA;QAOrG,IAAI,CAAC,MAAM,GAAG,SAAS,CAAC,YAAY,CAAC,CAAA;QACrC,QAAQ,OAAO,EAAE;YACf,KAAK,yBAAU,CAAC,KAAK,CAAC;YACtB,KAAK,yBAAU,CAAC,KAAK,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S,CAAC,MAAM,CAAC,CAAC,CAAkC,EAAE,OAA4B,EAAE,EAAE;YAChG,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,CAAA;YAC5B,OAAO,CAAC,CAAA;QACV,CAAC,EAAE,IAAI,wBAAU,EAAuB,CAAC,CAAA;IAC3C,CAAC;CACF;AAlQD,gCAkQC","sourcesContent":["import { ILooseObject } from '../../../collections/collection'\r\nimport { SimpleFieldDefinition, GroupFieldDefinition, ComponentFieldDefinition, MessageDefinition, FixDefinitions } from '../../definition'\r\nimport { Dictionary } from '../../../collections'\r\nimport { ContainedFieldSet, ContainedComponentField, ContainedGroupField, ContainedSimpleField } from '../../contained'\r\nimport { ContainedSetType } from '../../dict-primitive'\r\nimport { FixDefinitionSource, FixVersion } from '../../fix-versions'\r\nimport { GetJsFixLogger, IJsFixLogger } from '../../../config'\r\nimport { IRepositoryEnum, IRepositoryField, IRepositoryDataType, IRepositoryComponent, IRepositoryMessage, IRepositoryMsgContent, IRepositoryAbbreviation } from './repository-type'\r\n\r\nexport class Repository {\r\n public Enums: IRepositoryEnum[]\r\n public Fields: IRepositoryField[]\r\n public DataTypes: IRepositoryDataType[]\r\n public Components: IRepositoryComponent[]\r\n public Messages: IRepositoryMessage[]\r\n public MsgContents: IRepositoryMsgContent[]\r\n public Abbreviations: IRepositoryAbbreviation[]\r\n public includesAbbreviations: boolean\r\n // derived from above\r\n public readonly definitions: FixDefinitions\r\n private readonly groupLookup: Dictionary<GroupFieldDefinition> = new Dictionary<GroupFieldDefinition>()\r\n private contentLookup: Dictionary<IRepositoryMsgContent[]>\r\n private componentLookup: Dictionary<IRepositoryComponent>\r\n private dataTypeLookup: Dictionary<IRepositoryDataType>\r\n private readonly logger: IJsFixLogger\r\n\r\n constructor (public readonly version: FixVersion, public readonly getLogger: GetJsFixLogger) {\r\n this.logger = getLogger('Repository')\r\n switch (version) {\r\n case FixVersion.FIX44:\r\n case FixVersion.FIX50:\r\n case FixVersion.FIX50SP1:\r\n case FixVersion.FIX50SP2:\r\n this.includesAbbreviations = true\r\n break\r\n\r\n default: {\r\n this.includesAbbreviations = false\r\n break\r\n }\r\n }\r\n this.definitions = new FixDefinitions(FixDefinitionSource.FixRepo, version)\r\n }\r\n\r\n public assign (name: string, data: ILooseObject[]): void {\r\n switch (name) {\r\n case 'Fields': {\r\n this.Fields = data as IRepositoryField[]\r\n break\r\n }\r\n\r\n case 'Enums': {\r\n this.Enums = data as IRepositoryEnum[]\r\n break\r\n }\r\n\r\n case 'Datatypes': {\r\n this.DataTypes = data as IRepositoryDataType[]\r\n break\r\n }\r\n\r\n case 'Components': {\r\n this.Components = data as IRepositoryComponent[]\r\n break\r\n }\r\n\r\n case 'Messages': {\r\n this.Messages = data as IRepositoryMessage[]\r\n break\r\n }\r\n\r\n case 'MsgContents': {\r\n this.MsgContents = data as IRepositoryMsgContent[]\r\n if (!this.includesAbbreviations) {\r\n this.toDefinitions()\r\n }\r\n break\r\n }\r\n\r\n case 'Abbreviations': {\r\n this.Abbreviations = data as IRepositoryAbbreviation[]\r\n this.toDefinitions()\r\n break\r\n }\r\n }\r\n }\r\n\r\n private summarise (): void {\r\n const logger = this.logger\r\n logger.info(`definitions: ${this.definitions.simple.count()} fields`)\r\n logger.info(`definitions: ${this.definitions.component.count()} components`)\r\n logger.info(`definitions: ${this.definitions.message.count()} messages`)\r\n }\r\n\r\n private toDefinitions (): void {\r\n this.fields()\r\n this.complex()\r\n this.header()\r\n this.trailer()\r\n this.summarise()\r\n }\r\n\r\n private complex (): void {\r\n this.contentLookup = this.contents()\r\n this.componentLookup = this.components()\r\n this.Components.forEach((c: IRepositoryComponent) => this.resolve(c))\r\n this.Messages.forEach((m: IRepositoryMessage) => {\r\n const msg = this.message(m)\r\n this.logger.debug(`${msg.toString()}`)\r\n this.definitions.addMessage(msg)\r\n })\r\n }\r\n\r\n private header (): void {\r\n const h: ComponentFieldDefinition = this.definitions.component.get('StandardHeader')\r\n this.definitions.component.add('header', h)\r\n }\r\n\r\n private trailer (): void {\r\n const t: ComponentFieldDefinition = this.definitions.component.get('StandardTrailer')\r\n this.definitions.component.add('trailer', t)\r\n }\r\n\r\n private fields (): void {\r\n this.dataTypeLookup = this.types()\r\n const definitions = this.definitions\r\n const types = this.dataTypeLookup\r\n types.remove('boolean')\r\n types.remove('data')\r\n this.Fields.forEach((f: IRepositoryField) => {\r\n const nativeType =\r\n f.Type === 'Boolean' ||\r\n f.Type === 'data' ||\r\n f.Type === 'LocalMktDate' ||\r\n f.Type === 'UTCDateOnly' ||\r\n f.Type === 'UTCTimestamp'\r\n let type = f.Type\r\n const mapped = !nativeType && types.get(type)\r\n if (mapped) {\r\n type = mapped.BaseType ?? type\r\n }\r\n definitions.addSimpleFieldDef(new SimpleFieldDefinition(\r\n f.Tag,\r\n f.Name,\r\n f.AbbrName ? f.AbbrName : f.Name,\r\n f.BaseCategory,\r\n f.BaseCategoryAbbrName,\r\n type.toUpperCase(),\r\n f.Description))\r\n })\r\n\r\n for (const e of this.Enums) {\r\n const field: SimpleFieldDefinition =\r\n definitions.tagToSimple[parseInt(e.Tag, 10)]\r\n if (field == null) {\r\n continue\r\n }\r\n if (e.Value && e.SymbolicName) {\r\n field.addEnum(e.Value, e.SymbolicName, e.Description)\r\n }\r\n }\r\n }\r\n\r\n private contents (): Dictionary<IRepositoryMsgContent[]> {\r\n return this.MsgContents.reduce((a, current) => {\r\n let content: IRepositoryMsgContent[] = a.get(current.ComponentID)\r\n if (!content) {\r\n content = []\r\n a.add(current.ComponentID, content)\r\n }\r\n content[content.length] = current\r\n return a\r\n }, new Dictionary<IRepositoryMsgContent[]>())\r\n }\r\n\r\n private resolveToFieldSet (content: IRepositoryMsgContent[], parentSet: ContainedFieldSet): void {\r\n content.forEach((current: IRepositoryMsgContent) => {\r\n const required: boolean = current.Reqd === '1'\r\n const tag: number = parseInt(current.TagText, 10)\r\n if (!isNaN(tag)) {\r\n const sf: SimpleFieldDefinition = this.definitions.tagToSimple[tag]\r\n if (sf) {\r\n parentSet.add(new ContainedSimpleField(sf, parentSet.fields.length, required, false))\r\n }\r\n } else {\r\n // is there a definition for this type yet create.\r\n let childSet: ContainedFieldSet = this.definitions.component.get(current.TagText)\r\n if (!childSet) {\r\n const cl: IRepositoryComponent = this.componentLookup.get(current.TagText)\r\n if (cl) {\r\n childSet = this.resolve(cl)\r\n }\r\n }\r\n switch (childSet.type) {\r\n case ContainedSetType.Component: {\r\n parentSet.add(new ContainedComponentField(childSet, parentSet.fields.length, required))\r\n break\r\n }\r\n\r\n case ContainedSetType.Group: {\r\n parentSet.add(new ContainedGroupField(childSet as GroupFieldDefinition, parentSet.fields.length, required))\r\n break\r\n }\r\n\r\n default: {\r\n throw new Error(`unknown set type ${childSet.type}`)\r\n }\r\n }\r\n }\r\n return parentSet\r\n })\r\n }\r\n\r\n private resolve (c: IRepositoryComponent): ContainedFieldSet {\r\n switch (c.ComponentType) {\r\n case 'ImplicitBlockRepeating':\r\n case 'BlockRepeating': {\r\n const content: IRepositoryMsgContent[] = this.contentLookup.get(c.ComponentID)\r\n const noField: SimpleFieldDefinition = this.definitions.tagToSimple[parseInt(content[0].TagText, 10)]\r\n let def: GroupFieldDefinition = this.groupLookup.get(c.ComponentID)\r\n if (!def) {\r\n def = new GroupFieldDefinition(c.Name, c.AbbrName, c.CategoryID, noField, c.Description)\r\n this.resolveToFieldSet(content.slice(1), def)\r\n this.groupLookup.add(c.ComponentID, def)\r\n }\r\n return def\r\n }\r\n\r\n default: {\r\n const content: IRepositoryMsgContent[] = this.contentLookup.get(c.ComponentID)\r\n let def: ComponentFieldDefinition = this.definitions.component.get(c.Name)\r\n if (!def) {\r\n def = new ComponentFieldDefinition(c.Name, c.AbbrName, c.CategoryID, c.Description)\r\n this.resolveToFieldSet(content, def)\r\n this.definitions.addComponentFieldDef(def)\r\n }\r\n return def\r\n }\r\n }\r\n }\r\n\r\n private message (m: IRepositoryMessage): MessageDefinition {\r\n const definitions = this.definitions\r\n const content: IRepositoryMsgContent[] = this.contentLookup.get(m.ComponentID)\r\n let def: MessageDefinition = definitions.message.get(m.Name)\r\n if (!def) {\r\n def = new MessageDefinition(m.Name, m.AbbrName, m.MsgType, m.CategoryID, m.Description)\r\n this.resolveToFieldSet(content, def)\r\n definitions.addComponentFieldDef(def)\r\n }\r\n return def\r\n }\r\n\r\n private components (): Dictionary<IRepositoryComponent> {\r\n return this.Components.reduce((a: Dictionary<IRepositoryComponent>, current: IRepositoryComponent) => {\r\n a.add(current.Name, current)\r\n a.add(current.ComponentID, current)\r\n return a\r\n }, new Dictionary<IRepositoryComponent>())\r\n }\r\n\r\n private types (): Dictionary<IRepositoryDataType> {\r\n return this.DataTypes.reduce((a: Dictionary<IRepositoryDataType>, current: IRepositoryDataType) => {\r\n a.add(current.Name, current)\r\n return a\r\n }, new Dictionary<IRepositoryDataType>())\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"repository.js","sourceRoot":"","sources":["../../../../src/dictionary/parser/fix-repository/repository.ts"],"names":[],"mappings":";;;AACA,iDAC6D;AAC7D,sDAAiD;AACjD,+CAAuH;AACvH,qDAA+C;AAE/C,uEAAiE;AACjE,iEAA2D;AAS3D,MAAa,UAAU;IAiBrB,YAA6B,OAAmB,EAAkB,SAAyB;QAA9D,YAAO,GAAP,OAAO,CAAY;QAAkB,cAAS,GAAT,SAAS,CAAgB;QAN1E,gBAAW,GAAqC,IAAI,wBAAU,EAAwB,CAAA;QAOrG,IAAI,CAAC,MAAM,GAAG,SAAS,CAAC,YAAY,CAAC,CAAA;QACrC,IAAI,CAAC,qBAAqB,GAAG,UAAU,CAAC,wBAAwB,CAAC,OAAO,CAAC,CAAA;QACzE,IAAI,CAAC,WAAW,GAAG,IAAI,2BAAc,CAAC,2CAAmB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAA;IAC7E,CAAC;IAEO,MAAM,CAAC,wBAAwB,CAAE,OAAmB;QAC1D,IAAI,qBAA8B,CAAA;QAClC,QAAQ,OAAO,EAAE;YACf,KAA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AAC,OAAO,EAAE,GAAG,CAAC,CAAA;YACpC,WAAW,CAAC,oBAAoB,CAAC,GAAG,CAAC,CAAA;SACtC;QACD,OAAO,GAAG,CAAA;IACZ,CAAC;IAEO,UAAU;QAChB,OAAO,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAmC,EAAE,OAA6B,EAAE,EAAE;YACnG,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,CAAA;YAC5B,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,WAAW,EAAE,OAAO,CAAC,CAAA;YACnC,OAAO,CAAC,CAAA;QACV,CAAC,EAAE,IAAI,wBAAU,EAAwB,CAAC,CAAA;IAC5C,CAAC;IAEO,KAAK;QACX,OAAO,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAkC,EAAE,OAA4B,EAAE,EAAE;YAChG,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,CAAA;YAC5B,OAAO,CAAC,CAAA;QACV,CAAC,EAAE,IAAI,wBAAU,EAAuB,CAAC,CAAA;IAC3C,CAAC;CACF;AAzRD,gCAyRC","sourcesContent":["import { ILooseObject } from '../../../collections/collection'\r\nimport { SimpleFieldDefinition, GroupFieldDefinition, ComponentFieldDefinition,\r\n MessageDefinition, FixDefinitions } from '../../definition'\r\nimport { Dictionary } from '../../../collections'\r\nimport { ContainedFieldSet, ContainedComponentField, ContainedGroupField, ContainedSimpleField } from '../../contained'\r\nimport { FixVersion } from '../../fix-versions'\r\nimport { GetJsFixLogger, IJsFixLogger } from '../../../config'\r\nimport { FixDefinitionSource } from '../../fix-definition-source'\r\nimport { ContainedSetType } from '../../contained-set-type'\r\nimport { IRepositoryMessage } from './repository-message'\r\nimport { IRepositoryEnum } from './repository-enum'\r\nimport { IRepositoryDataType } from './repository-data-type'\r\nimport { IRepositoryComponent } from './repository-component'\r\nimport { IRepositoryField } from './repository-field'\r\nimport { IRepositoryAbbreviation } from './repository-abbreviation'\r\nimport { IRepositoryMsgContent } from './repository-msg-content'\r\n\r\nexport class Repository {\r\n public Enums: IRepositoryEnum[]\r\n public Fields: IRepositoryField[]\r\n public DataTypes: IRepositoryDataType[]\r\n public Components: IRepositoryComponent[]\r\n public Messages: IRepositoryMessage[]\r\n public MsgContents: IRepositoryMsgContent[]\r\n public Abbreviations: IRepositoryAbbreviation[]\r\n public includesAbbreviations: boolean\r\n // derived from above\r\n public readonly definitions: FixDefinitions\r\n private readonly groupLookup: Dictionary<GroupFieldDefinition> = new Dictionary<GroupFieldDefinition>()\r\n private contentLookup: Dictionary<IRepositoryMsgContent[]>\r\n private componentLookup: Dictionary<IRepositoryComponent>\r\n private dataTypeLookup: Dictionary<IRepositoryDataType>\r\n private readonly logger: IJsFixLogger\r\n\r\n constructor (public readonly version: FixVersion, public readonly getLogger: GetJsFixLogger) {\r\n this.logger = getLogger('Repository')\r\n this.includesAbbreviations = Repository.doesIncludeAbbreviations(version)\r\n this.definitions = new FixDefinitions(FixDefinitionSource.FixRepo, version)\r\n }\r\n\r\n private static doesIncludeAbbreviations (version: FixVersion): boolean {\r\n let includesAbbreviations: boolean\r\n switch (version) {\r\n case FixVersion.FIX44:\r\n case FixVersion.FIX50:\r\n case FixVersion.FIX50SP1:\r\n case FixVersion.FIX50SP2:\r\n includesAbbreviations = true\r\n break\r\n\r\n default: {\r\n includesAbbreviations = false\r\n break\r\n }\r\n }\r\n return includesAbbreviations\r\n }\r\n\r\n public assign (name: string, data: ILooseObject[]): void {\r\n switch (name) {\r\n case 'Fields': {\r\n this.Fields = data as IRepositoryField[]\r\n break\r\n }\r\n\r\n case 'Enums': {\r\n this.Enums = data as IRepositoryEnum[]\r\n break\r\n }\r\n\r\n case 'Datatypes': {\r\n this.DataTypes = data as IRepositoryDataType[]\r\n break\r\n }\r\n\r\n case 'Components': {\r\n this.Components = data as IRepositoryComponent[]\r\n break\r\n }\r\n\r\n case 'Messages': {\r\n this.Messages = data as IRepositoryMessage[]\r\n break\r\n }\r\n\r\n case 'MsgContents': {\r\n this.MsgContents = data as IRepositoryMsgContent[]\r\n if (!this.includesAbbreviations) {\r\n this.toDefinitions()\r\n }\r\n break\r\n }\r\n\r\n case 'Abbreviations': {\r\n this.Abbreviations = data as IRepositoryAbbreviation[]\r\n this.toDefinitions()\r\n break\r\n }\r\n }\r\n }\r\n\r\n private summarise (): void {\r\n const logger = this.logger\r\n const definitions = this.definitions\r\n logger.info(`definitions: ${definitions.simple.count()} fields`)\r\n logger.info(`definitions: ${definitions.component.count()} components`)\r\n logger.info(`definitions: ${definitions.message.count()} messages`)\r\n }\r\n\r\n private toDefinitions (): void {\r\n this.fields()\r\n this.complex()\r\n this.header()\r\n this.trailer()\r\n this.summarise()\r\n }\r\n\r\n private complex (): void {\r\n this.contentLookup = this.contents()\r\n this.componentLookup = this.components()\r\n this.Components.forEach((c: IRepositoryComponent) => this.resolve(c))\r\n this.Messages.forEach((m: IRepositoryMessage) => {\r\n const msg = this.message(m)\r\n this.logger.debug(`${msg.toString()}`)\r\n this.definitions.addMessage(msg)\r\n })\r\n }\r\n\r\n private header (): void {\r\n const h: ComponentFieldDefinition = this.definitions.component.get('StandardHeader')\r\n this.definitions.component.add('header', h)\r\n }\r\n\r\n private trailer (): void {\r\n const t: ComponentFieldDefinition = this.definitions.component.get('StandardTrailer')\r\n this.definitions.component.add('trailer', t)\r\n }\r\n\r\n private static isNative (f: IRepositoryField): boolean {\r\n return f.Type === 'Boolean' ||\r\n f.Type === 'data' ||\r\n f.Type === 'LocalMktDate' ||\r\n f.Type === 'UTCDateOnly' ||\r\n f.Type === 'UTCTimestamp'\r\n }\r\n\r\n private static makeSimple (f: IRepositoryField, type: string) {\r\n return new SimpleFieldDefinition(\r\n f.Tag,\r\n f.Name,\r\n f.AbbrName ? f.AbbrName : f.Name,\r\n f.BaseCategory,\r\n f.BaseCategoryAbbrName,\r\n type.toUpperCase(),\r\n f.Description)\r\n }\r\n\r\n private getType (f: IRepositoryField): string {\r\n const types = this.dataTypeLookup\r\n const nativeType = Repository.isNative(f)\r\n let type = f.Type\r\n const mapped = !nativeType && types.get(type)\r\n if (mapped) {\r\n type = mapped.BaseType ?? type\r\n }\r\n return type\r\n }\r\n\r\n private fieldEnums () {\r\n const definitions = this.definitions\r\n for (const e of this.Enums) {\r\n const field: SimpleFieldDefinition = definitions.tagToSimple[parseInt(e.Tag, 10)]\r\n if (field == null) {\r\n continue\r\n }\r\n if (e.Value && e.SymbolicName) {\r\n field.addEnum(e.Value, e.SymbolicName, e.Description)\r\n }\r\n }\r\n }\r\n\r\n private fields (): void {\r\n this.dataTypeLookup = this.types()\r\n const definitions = this.definitions\r\n const types = this.dataTypeLookup\r\n types.remove('boolean')\r\n types.remove('data')\r\n this.Fields.forEach((f: IRepositoryField) => {\r\n const type = this.getType(f)\r\n definitions.addSimpleFieldDef(Repository.makeSimple(f, type))\r\n })\r\n this.fieldEnums()\r\n }\r\n\r\n private contents (): Dictionary<IRepositoryMsgContent[]> {\r\n return this.MsgContents.reduce((a, current) => {\r\n let content: IRepositoryMsgContent[] = a.get(current.ComponentID)\r\n if (!content) {\r\n content = []\r\n a.add(current.ComponentID, content)\r\n }\r\n content[content.length] = current\r\n return a\r\n }, new Dictionary<IRepositoryMsgContent[]>())\r\n }\r\n\r\n private resolveToFieldSet (content: IRepositoryMsgContent[], parentSet: ContainedFieldSet): void {\r\n content.forEach((current: IRepositoryMsgContent) => {\r\n const required: boolean = current.Reqd === '1'\r\n const tag: number = parseInt(current.TagText, 10)\r\n if (!isNaN(tag)) {\r\n const sf: SimpleFieldDefinition = this.definitions.tagToSimple[tag]\r\n if (sf) {\r\n parentSet.add(new ContainedSimpleField(sf, parentSet.fields.length, required, false))\r\n }\r\n } else {\r\n // is there a definition for this type yet create.\r\n let childSet: ContainedFieldSet = this.definitions.component.get(current.TagText)\r\n if (!childSet) {\r\n const cl: IRepositoryComponent = this.componentLookup.get(current.TagText)\r\n if (cl) {\r\n childSet = this.resolve(cl)\r\n }\r\n }\r\n switch (childSet.type) {\r\n case ContainedSetType.Component: {\r\n parentSet.add(new ContainedComponentField(childSet, parentSet.fields.length, required))\r\n break\r\n }\r\n\r\n case ContainedSetType.Group: {\r\n parentSet.add(new ContainedGroupField(childSet as GroupFieldDefinition, parentSet.fields.length, required))\r\n break\r\n }\r\n\r\n default: {\r\n throw new Error(`unknown set type ${childSet.type}`)\r\n }\r\n }\r\n }\r\n return parentSet\r\n })\r\n }\r\n\r\n private resolve (c: IRepositoryComponent): ContainedFieldSet {\r\n switch (c.ComponentType) {\r\n case 'ImplicitBlockRepeating':\r\n case 'BlockRepeating': {\r\n const content: IRepositoryMsgContent[] = this.contentLookup.get(c.ComponentID)\r\n const noField: SimpleFieldDefinition = this.definitions.tagToSimple[parseInt(content[0].TagText, 10)]\r\n let def: GroupFieldDefinition = this.groupLookup.get(c.ComponentID)\r\n if (!def) {\r\n def = new GroupFieldDefinition(c.Name, c.AbbrName, c.CategoryID, noField, c.Description)\r\n this.resolveToFieldSet(content.slice(1), def)\r\n this.groupLookup.add(c.ComponentID, def)\r\n }\r\n return def\r\n }\r\n\r\n default: {\r\n const content: IRepositoryMsgContent[] = this.contentLookup.get(c.ComponentID)\r\n let def: ComponentFieldDefinition = this.definitions.component.get(c.Name)\r\n if (!def) {\r\n def = new ComponentFieldDefinition(c.Name, c.AbbrName, c.CategoryID, c.Description)\r\n this.resolveToFieldSet(content, def)\r\n this.definitions.addComponentFieldDef(def)\r\n }\r\n return def\r\n }\r\n }\r\n }\r\n\r\n private message (m: IRepositoryMessage): MessageDefinition {\r\n const definitions = this.definitions\r\n const content: IRepositoryMsgContent[] = this.contentLookup.get(m.ComponentID)\r\n let def: MessageDefinition = definitions.message.get(m.Name)\r\n if (!def) {\r\n def = new MessageDefinition(m.Name, m.AbbrName, m.MsgType, m.CategoryID, m.Description)\r\n this.resolveToFieldSet(content, def)\r\n definitions.addComponentFieldDef(def)\r\n }\r\n return def\r\n }\r\n\r\n private components (): Dictionary<IRepositoryComponent> {\r\n return this.Components.reduce((a: Dictionary<IRepositoryComponent>, current: IRepositoryComponent) => {\r\n a.add(current.Name, current)\r\n a.add(current.ComponentID, current)\r\n return a\r\n }, new Dictionary<IRepositoryComponent>())\r\n }\r\n\r\n private types (): Dictionary<IRepositoryDataType> {\r\n return this.DataTypes.reduce((a: Dictionary<IRepositoryDataType>, current: IRepositoryDataType) => {\r\n a.add(current.Name, current)\r\n return a\r\n }, new Dictionary<IRepositoryDataType>())\r\n }\r\n}\r\n"]}
@@ -1,6 +1,6 @@
1
- import { ISaxNode } from '../../dict-primitive';
2
1
  import { XsdParser } from './xsd-parser';
3
2
  import { FixDefinitions } from '../../definition';
3
+ import { ISaxNode } from '../../sax-node';
4
4
  export declare class ComponentsParser extends XsdParser {
5
5
  readonly definitions: FixDefinitions;
6
6
  private readonly attributeGroups;